@samba425/diagramforge-react 0.1.0
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/diagramforge.css +1 -0
- package/dist/diagramforge.js +35052 -0
- package/dist/diagramforge.umd.cjs +139 -0
- package/dist/index.d.ts +191 -0
- package/package.json +103 -0
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
(function(Zt,_){typeof exports=="object"&&typeof module<"u"?_(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],_):(Zt=typeof globalThis<"u"?globalThis:Zt||self,_(Zt.DiagramForge={},Zt.jsxRuntime,Zt.React))})(this,(function(Zt,_,ke){"use strict";const fI=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Am=(...t)=>t.filter((e,r,A)=>!!e&&e.trim()!==""&&A.indexOf(e)===r).join(" ").trim();var hI={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const dI=ke.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:A,className:n="",children:i,iconNode:s,...a},o)=>ke.createElement("svg",{ref:o,...hI,width:e,height:e,stroke:t,strokeWidth:A?Number(r)*24/Number(e):r,className:Am("lucide",n),...a},[...s.map(([l,c])=>ke.createElement(l,c)),...Array.isArray(i)?i:[i]]));const tt=(t,e)=>{const r=ke.forwardRef(({className:A,...n},i)=>ke.createElement(dI,{ref:i,iconNode:e,className:Am(`lucide-${fI(t)}`,A),...n}));return r.displayName=`${t}`,r};const pI=tt("AlignEndHorizontal",[["rect",{width:"6",height:"16",x:"4",y:"2",rx:"2",key:"z5wdxg"}],["rect",{width:"6",height:"9",x:"14",y:"9",rx:"2",key:"um7a8w"}],["path",{d:"M22 22H2",key:"19qnx5"}]]);const gI=tt("AlignEndVertical",[["rect",{width:"16",height:"6",x:"2",y:"4",rx:"2",key:"10wcwx"}],["rect",{width:"9",height:"6",x:"9",y:"14",rx:"2",key:"4p5bwg"}],["path",{d:"M22 22V2",key:"12ipfv"}]]);const vI=tt("AlignHorizontalJustifyCenter",[["rect",{width:"6",height:"14",x:"2",y:"5",rx:"2",key:"dy24zr"}],["rect",{width:"6",height:"10",x:"16",y:"7",rx:"2",key:"13zkjt"}],["path",{d:"M12 2v20",key:"t6zp3m"}]]);const mI=tt("AlignStartHorizontal",[["rect",{width:"6",height:"16",x:"4",y:"6",rx:"2",key:"1n4dg1"}],["rect",{width:"6",height:"9",x:"14",y:"6",rx:"2",key:"17khns"}],["path",{d:"M22 2H2",key:"fhrpnj"}]]);const wI=tt("AlignStartVertical",[["rect",{width:"9",height:"6",x:"6",y:"14",rx:"2",key:"lpm2y7"}],["rect",{width:"16",height:"6",x:"6",y:"4",rx:"2",key:"rdj6ps"}],["path",{d:"M2 2v20",key:"1ivd8o"}]]);const yI=tt("AlignVerticalJustifyCenter",[["rect",{width:"14",height:"6",x:"5",y:"16",rx:"2",key:"1i8z2d"}],["rect",{width:"10",height:"6",x:"7",y:"2",rx:"2",key:"ypihtt"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);const nm=tt("BookmarkPlus",[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z",key:"1fy3hk"}],["line",{x1:"12",x2:"12",y1:"7",y2:"13",key:"1cppfj"}],["line",{x1:"15",x2:"9",y1:"10",y2:"10",key:"1gty7f"}]]);const im=tt("Braces",[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]]);const BI=tt("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const Vc=tt("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const bI=tt("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);const qc=tt("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const CI=tt("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const xI=tt("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);const EI=tt("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);const SI=tt("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);const FI=tt("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);const II=tt("Columns2",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M12 3v18",key:"108xh3"}]]);const UI=tt("Columns3",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);const _I=tt("Diamond",[["path",{d:"M2.7 10.3a2.41 2.41 0 0 0 0 3.41l7.59 7.59a2.41 2.41 0 0 0 3.41 0l7.59-7.59a2.41 2.41 0 0 0 0-3.41l-7.59-7.59a2.41 2.41 0 0 0-3.41 0Z",key:"1f1r0c"}]]);const QI=tt("EllipsisVertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]);const kI=tt("Eraser",[["path",{d:"m7 21-4.3-4.3c-1-1-1-2.5 0-3.4l9.6-9.6c1-1 2.5-1 3.4 0l5.6 5.6c1 1 1 2.5 0 3.4L13 21",key:"182aya"}],["path",{d:"M22 21H7",key:"t4ddhn"}],["path",{d:"m5 11 9 9",key:"1mo9qw"}]]);const am=tt("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);const Wc=tt("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);const oo=tt("FileDown",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M12 18v-6",key:"17g6i2"}],["path",{d:"m9 15 3 3 3-3",key:"1npd3o"}]]);const LI=tt("FilePlus2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M3 15h6",key:"4e2qda"}],["path",{d:"M6 12v6",key:"1u72j0"}]]);const TI=tt("FileUp",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M12 12v6",key:"3ahymv"}],["path",{d:"m15 15-3-3-3 3",key:"15xj92"}]]);const NI=tt("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);const OI=tt("Group",[["path",{d:"M3 7V5c0-1.1.9-2 2-2h2",key:"adw53z"}],["path",{d:"M17 3h2c1.1 0 2 .9 2 2v2",key:"an4l38"}],["path",{d:"M21 17v2c0 1.1-.9 2-2 2h-2",key:"144t0e"}],["path",{d:"M7 21H5c-1.1 0-2-.9-2-2v-2",key:"rtnfgi"}],["rect",{width:"7",height:"5",x:"7",y:"7",rx:"1",key:"1eyiv7"}],["rect",{width:"7",height:"5",x:"10",y:"12",rx:"1",key:"1qlmkx"}]]);const PI=tt("Hand",[["path",{d:"M18 11V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2",key:"1fvzgz"}],["path",{d:"M14 10V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2",key:"1kc0my"}],["path",{d:"M10 10.5V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2v8",key:"10h0bg"}],["path",{d:"M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15",key:"1s1gnw"}]]);const MI=tt("Hexagon",[["path",{d:"M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z",key:"yt0hxn"}]]);const DI=tt("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);const HI=tt("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);const sm=tt("Keyboard",[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]]);const $c=tt("LayoutTemplate",[["rect",{width:"18",height:"7",x:"3",y:"3",rx:"1",key:"f1a2em"}],["rect",{width:"9",height:"7",x:"3",y:"14",rx:"1",key:"jqznyg"}],["rect",{width:"5",height:"7",x:"16",y:"14",rx:"1",key:"q5h2i8"}]]);const Mh=tt("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);const RI=tt("LockOpen",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 9.9-1",key:"1mm8w8"}]]);const jI=tt("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);const KI=tt("Map",[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]]);const zI=tt("Maximize",[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]]);const GI=tt("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);const om=tt("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);const VI=tt("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);const qI=tt("MousePointer2",[["path",{d:"M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z",key:"edeuup"}]]);const WI=tt("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);const $I=tt("Paintbrush",[["path",{d:"m14.622 17.897-10.68-2.913",key:"vj2p1u"}],["path",{d:"M18.376 2.622a1 1 0 1 1 3.002 3.002L17.36 9.643a.5.5 0 0 0 0 .707l.944.944a2.41 2.41 0 0 1 0 3.408l-.944.944a.5.5 0 0 1-.707 0L8.354 7.348a.5.5 0 0 1 0-.707l.944-.944a2.41 2.41 0 0 1 3.408 0l.944.944a.5.5 0 0 0 .707 0z",key:"18tc5c"}],["path",{d:"M9 8c-1.804 2.71-3.97 3.46-6.583 3.948a.507.507 0 0 0-.302.819l7.32 8.883a1 1 0 0 0 1.185.204C12.735 20.405 16 16.792 16 15",key:"ytzfxy"}]]);const Dh=tt("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);const YI=tt("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);const Hh=tt("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const XI=tt("Presentation",[["path",{d:"M2 3h20",key:"91anmk"}],["path",{d:"M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3",key:"2k9sn8"}],["path",{d:"m7 21 5-5 5 5",key:"bip4we"}]]);const JI=tt("Puzzle",[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]]);const ZI=tt("Redo2",[["path",{d:"m15 14 5-5-5-5",key:"12vg1m"}],["path",{d:"M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",key:"6uklza"}]]);const eU=tt("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);const Rh=tt("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);const jh=tt("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);const tU=tt("SquareDashed",[["path",{d:"M5 3a2 2 0 0 0-2 2",key:"y57alp"}],["path",{d:"M19 3a2 2 0 0 1 2 2",key:"18rm91"}],["path",{d:"M21 19a2 2 0 0 1-2 2",key:"1j7049"}],["path",{d:"M5 21a2 2 0 0 1-2-2",key:"sbafld"}],["path",{d:"M9 3h1",key:"1yesri"}],["path",{d:"M9 21h1",key:"15o7lz"}],["path",{d:"M14 3h1",key:"1ec4yj"}],["path",{d:"M14 21h1",key:"v9vybs"}],["path",{d:"M3 9v1",key:"1r0deq"}],["path",{d:"M21 9v1",key:"mxsmne"}],["path",{d:"M3 14v1",key:"vnatye"}],["path",{d:"M21 14v1",key:"169vum"}]]);const lm=tt("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);const rU=tt("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);const AU=tt("StickyNote",[["path",{d:"M16 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8Z",key:"qazsjp"}],["path",{d:"M15 3v4a2 2 0 0 0 2 2h4",key:"40519r"}]]);const nU=tt("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);const cm=tt("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);const iU=tt("Triangle",[["path",{d:"M13.73 4a2 2 0 0 0-3.46 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z",key:"14u9p9"}]]);const aU=tt("Type",[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]);const sU=tt("Undo2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]);const oU=tt("Ungroup",[["rect",{width:"8",height:"6",x:"5",y:"4",rx:"1",key:"nzclkv"}],["rect",{width:"8",height:"6",x:"11",y:"14",rx:"1",key:"4tytwb"}]]);const Kh=tt("Workflow",[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]]);const lo=tt("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),um=t=>{let e;const r=new Set,A=(l,c)=>{const f=typeof l=="function"?l(e):l;if(!Object.is(f,e)){const h=e;e=c??(typeof f!="object"||f===null)?f:Object.assign({},e,f),r.forEach(u=>u(e,h))}},n=()=>e,a={setState:A,getState:n,getInitialState:()=>o,subscribe:l=>(r.add(l),()=>r.delete(l))},o=e=t(A,n,a);return a},lU=(t=>t?um(t):um),cU=t=>t;function uU(t,e=cU){const r=ke.useSyncExternalStore(t.subscribe,ke.useCallback(()=>e(t.getState()),[t,e]),ke.useCallback(()=>e(t.getInitialState()),[t,e]));return ke.useDebugValue(r),r}const fm=t=>{const e=lU(t),r=A=>uU(e,A);return Object.assign(r,e),r},Yc=(t=>t?fm(t):fm);function zh(t,e,r){return Math.min(Math.max(t,e),r)}function Gh(t,e){return e<=0?t:Math.round(t/e)*e}function as(t,e){return{x:(t.x-e.x)/e.zoom,y:(t.y-e.y)/e.zoom}}function Vh(t,e){return{x:t.x*e.zoom+e.x,y:t.y*e.zoom+e.y}}function fU(t){return{x:t.x+t.width/2,y:t.y+t.height/2}}function Xc(t,e){return t.x>=e.x&&t.x<=e.x+e.width&&t.y>=e.y&&t.y<=e.y+e.height}function qh(t,e){return t.x<e.x+e.width&&t.x+t.width>e.x&&t.y<e.y+e.height&&t.y+t.height>e.y}function hm(t,e){const r=Math.min(t.x,e.x),A=Math.min(t.y,e.y);return{x:r,y:A,width:Math.abs(t.x-e.x),height:Math.abs(t.y-e.y)}}function Jc(t){if(t.length===0)return null;let e=1/0,r=1/0,A=-1/0,n=-1/0;for(const i of t)e=Math.min(e,i.x),r=Math.min(r,i.y),A=Math.max(A,i.x+i.width),n=Math.max(n,i.y+i.height);return{x:e,y:r,width:A-e,height:n-r}}class hU{handlers=new Map;on(e,r){let A=this.handlers.get(e);return A||(A=new Set,this.handlers.set(e,A)),A.add(r),()=>A.delete(r)}emit(e,r){const A=this.handlers.get(e);if(A)for(const n of A)n(r)}clear(){this.handlers.clear()}}const Xe=new hU,Wh=.1,$h=8,_e=Yc((t,e)=>({camera:{x:0,y:0,zoom:1},tool:"select",selectedIds:[],editingTextId:null,themeMode:"system",sidebarOpen:!0,propertyPanelOpen:!0,layersPanelOpen:!1,minimapOpen:!0,searchOpen:!1,shortcutsOpen:!1,templatesOpen:!1,welcomeOpen:!1,hoveredShapeId:null,connectTargetId:null,readOnly:!1,presentationOpen:!1,presentationIndex:0,presentationFlowActive:!1,presentationFlowStep:0,presentationFlowPath:[],formatPainterActive:!1,formatPainterStyle:null,viewMode:"canvas",sourceFormat:"json",activeGroupId:null,setTool:r=>t({tool:r}),setCamera:r=>t({camera:r}),panBy:(r,A)=>t(n=>({camera:{...n.camera,x:n.camera.x+r,y:n.camera.y+A}})),zoomBy:(r,A)=>{const{camera:n}=e(),i=zh(n.zoom*r,Wh,$h);dm(t,n,i,A)},setZoom:(r,A)=>{const{camera:n}=e(),i=zh(r,Wh,$h);dm(t,n,i,A)},fitToBounds:(r,A,n=60)=>{if(r.width<=0||r.height<=0){t({camera:{x:A.width/2-r.x,y:A.height/2-r.y,zoom:1}});return}const i=zh(Math.min((A.width-n*2)/r.width,(A.height-n*2)/r.height),Wh,$h),s=r.x+r.width/2,a=r.y+r.height/2;t({camera:{zoom:i,x:A.width/2-s*i,y:A.height/2-a*i}})},centerOn:(r,A)=>{const{camera:n}=e();t({camera:{...n,x:A.width/2-r.x*n.zoom,y:A.height/2-r.y*n.zoom}})},select:r=>{t({selectedIds:r}),Xe.emit("selection:changed",{ids:r})},addToSelection:r=>{const A=e().selectedIds.includes(r)?e().selectedIds:[...e().selectedIds,r];t({selectedIds:A}),Xe.emit("selection:changed",{ids:A})},toggleSelection:r=>{const A=e().selectedIds,n=A.includes(r)?A.filter(i=>i!==r):[...A,r];t({selectedIds:n}),Xe.emit("selection:changed",{ids:n})},clearSelection:()=>{e().selectedIds.length!==0&&(t({selectedIds:[]}),Xe.emit("selection:changed",{ids:[]}))},setEditingText:r=>t({editingTextId:r}),setThemeMode:r=>t({themeMode:r}),toggleSidebar:()=>t(r=>({sidebarOpen:!r.sidebarOpen})),togglePropertyPanel:()=>t(r=>({propertyPanelOpen:!r.propertyPanelOpen})),toggleLayersPanel:()=>t(r=>({layersPanelOpen:!r.layersPanelOpen})),toggleMinimap:()=>t(r=>({minimapOpen:!r.minimapOpen})),setSearchOpen:r=>t({searchOpen:r}),setShortcutsOpen:r=>t({shortcutsOpen:r}),setTemplatesOpen:r=>t({templatesOpen:r}),setWelcomeOpen:r=>t({welcomeOpen:r}),setHoveredShapeId:r=>t({hoveredShapeId:r}),setConnectTargetId:r=>t({connectTargetId:r}),setReadOnly:r=>t({readOnly:r}),setPresentationOpen:r=>t(r?{presentationOpen:!0}:{presentationOpen:!1,presentationFlowActive:!1,presentationFlowStep:0,presentationFlowPath:[]}),setPresentationIndex:r=>t({presentationIndex:r}),setPresentationFlowActive:r=>t({presentationFlowActive:r,presentationFlowStep:0}),setPresentationFlowStep:r=>t({presentationFlowStep:r}),setPresentationFlowPath:r=>t({presentationFlowPath:r}),setFormatPainterActive:r=>t({formatPainterActive:r}),setFormatPainterStyle:r=>t({formatPainterStyle:r}),setViewMode:r=>t({viewMode:r}),setSourceFormat:r=>t({sourceFormat:r}),setActiveGroupId:r=>t({activeGroupId:r})}));function dm(t,e,r,A){const n={x:(A.x-e.x)/e.zoom,y:(A.y-e.y)/e.zoom},i=Vh(n,{...e,zoom:r});t({camera:{zoom:r,x:e.x+(A.x-i.x),y:e.y+(A.y-i.y)}})}let dU="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",pU=(t=21)=>{let e="",r=crypto.getRandomValues(new Uint8Array(t|=0));for(;t--;)e+=dU[r[t]&63];return e};const gU={fontFamily:"Inter, system-ui, sans-serif",fontSize:14,fontWeight:500,fontStyle:"normal",textDecoration:"none",color:"#1f2430",align:"center",verticalAlign:"middle",lineHeight:1.3},vU={enabled:!1,color:"rgba(15,23,42,0.35)",blur:8,offsetX:2,offsetY:3},pm=1,mU={gridSize:20,showGrid:!0,snapToGrid:!0,snapToObjects:!0},gm=[{name:"Indigo",fill:"#e0e7ff",stroke:"#6366f1",text:"#312e81"},{name:"Emerald",fill:"#d1fae5",stroke:"#10b981",text:"#065f46"},{name:"Amber",fill:"#fef3c7",stroke:"#f59e0b",text:"#92400e"},{name:"Rose",fill:"#ffe4e6",stroke:"#f43f5e",text:"#9f1239"},{name:"Sky",fill:"#e0f2fe",stroke:"#0ea5e9",text:"#075985"},{name:"Violet",fill:"#ede9fe",stroke:"#8b5cf6",text:"#5b21b6"},{name:"Teal",fill:"#ccfbf1",stroke:"#14b8a6",text:"#115e59"},{name:"Orange",fill:"#ffedd5",stroke:"#f97316",text:"#9a3412"},{name:"Slate",fill:"#f1f5f9",stroke:"#64748b",text:"#1e293b"}],wU=["#ffffff","#f8fafc","#e2e8f0","#94a3b8","#475569","#1e293b","#0f172a","#000000","#fee2e2","#fecaca","#f87171","#ef4444","#dc2626","#b91c1c","#7f1d1d","#450a0a","#ffedd5","#fdba74","#fb923c","#f97316","#ea580c","#c2410c","#9a3412","#7c2d12","#fef9c3","#fde047","#facc15","#eab308","#ca8a04","#a16207","#854d0e","#713f12","#dcfce7","#86efac","#4ade80","#22c55e","#16a34a","#15803d","#166534","#14532d","#cffafe","#67e8f9","#22d3ee","#06b6d4","#0891b2","#0e7490","#155e75","#164e63","#dbeafe","#93c5fd","#60a5fa","#3b82f6","#2563eb","#1d4ed8","#1e40af","#1e3a8a","#e0e7ff","#a5b4fc","#818cf8","#6366f1","#4f46e5","#4338ca","#3730a3","#312e81","#f3e8ff","#d8b4fe","#c084fc","#a855f7","#9333ea","#7e22ce","#6b21a8","#581c87","#fce7f3","#f9a8d4","#f472b6","#ec4899","#db2777","#be185d","#9d174d","#831843"];function la(t="id"){return`${t}_${pU(10)}`}function Yh(t="Layer 1",e=0){return{id:la("layer"),name:t,visible:!0,locked:!1,order:e}}function vr(t,e,r=0){const A=gm[r%gm.length];return{id:t.id??la("shape"),kind:t.kind,libraryId:t.libraryId,x:t.x,y:t.y,width:t.width,height:t.height,rotation:t.rotation??0,opacity:t.opacity??1,fill:t.fill??{type:"solid",color:A.fill},stroke:t.stroke??A.stroke,strokeWidth:t.strokeWidth??2,dash:t.dash??"solid",cornerRadius:t.cornerRadius??(t.kind==="rounded-rectangle"?12:0),shadow:t.shadow??{...vU},blur:t.blur??0,text:t.text??"",typography:t.typography??{...gU,color:A.text},locked:t.locked??!1,hidden:t.hidden??!1,layerId:t.layerId??e,parentId:t.parentId,src:t.src,points:t.points,metadata:t.metadata??{},hyperlink:t.hyperlink??""}}function Xr(t,e){return{id:t.id??la("edge"),source:t.source,target:t.target,router:t.router??"orthogonal",stroke:t.stroke??"#475569",strokeWidth:t.strokeWidth??2,dash:t.dash??"solid",animated:t.animated??!1,startArrow:t.startArrow??"none",endArrow:t.endArrow??"triangle",label:t.label??"",opacity:t.opacity??1,locked:t.locked??!1,hidden:t.hidden??!1,layerId:t.layerId??e,groupId:t.groupId,waypoints:t.waypoints??[],labelOffset:t.labelOffset}}function ml(t="Page 1"){const e=Yh("Layer 1",0);return{id:la("page"),name:t,shapes:{},edges:{},layers:[e],order:[],background:"#ffffff"}}function Gn(t="Untitled Diagram"){const e=Date.now();return{version:pm,id:la("project"),name:t,pages:[ml("Page 1")],assets:[],settings:{...mU},theme:"system",createdAt:e,updatedAt:e}}function vm(t,e){let r=t.shapes[e],A=e;const n=new Set;for(;r?.parentId&&!n.has(r.parentId);)n.add(r.parentId),A=r.parentId,r=t.shapes[r.parentId];return A}function co(t,e){const r=[],A=[e];for(;A.length;){const n=A.pop();for(const i of Object.values(t.shapes))i.parentId===n&&(r.push(i.id),A.push(i.id))}return r}function ca(t){return t?.kind==="group"}function mm(t,e){const r=new Set;for(const A of e)if(t.shapes[A]){r.add(A);for(const i of co(t,A))t.shapes[i]&&r.add(i)}return[...r]}function wm(t,e){const A=co(t,e).map(n=>t.shapes[n]).filter(n=>!!n).map(n=>({x:n.x,y:n.y,width:n.width,height:n.height}));return Jc(A)}function ym(t,e){const r=new Set;for(const A of e){const n=t.shapes[A];if(!n)continue;ca(n)&&r.add(A);let i=n.parentId;for(;i;){const s=t.shapes[i];s&&ca(s)&&r.add(s.id),i=s?.parentId}}return[...r]}function Xh(t,e){const r={};for(const A of e){const n=wm(t,A);n&&(r[A]={x:n.x,y:n.y,width:n.width,height:n.height})}return r}function yU(t,e){const r={},A=n=>{n.locked||(r[n.id]={x:n.x,y:n.y})};for(const n of mm(t,e)){const i=t.shapes[n];i&&A(i)}return r}function BU(t,e){const r=new Set(e);for(const A of e)if(ca(t.shapes[A])){for(const n of co(t,A))r.add(n);for(const n of Object.values(t.edges))n.groupId===A&&r.add(n.id)}return[...r]}function Jr(t,e,r){const A=t.pages.map(n=>n.id===e?r(n):n);return{...t,pages:A,updatedAt:Date.now()}}const Qe=Yc((t,e)=>({project:Gn(),activePageId:"",activePage:()=>{const{project:r,activePageId:A}=e();return r.pages.find(n=>n.id===A)??r.pages[0]},replaceProject:(r,A)=>t({project:r,activePageId:A??r.pages[0].id}),setActivePage:r=>t({activePageId:r}),renameProject:r=>t(A=>({project:{...A.project,name:r,updatedAt:Date.now()}})),addShape:r=>t(A=>({project:Jr(A.project,A.activePageId,n=>({...n,shapes:{...n.shapes,[r.id]:r},order:[...n.order,r.id]}))})),addShapes:r=>t(A=>({project:Jr(A.project,A.activePageId,n=>{const i={...n.shapes};for(const s of r)i[s.id]=s;return{...n,shapes:i,order:[...n.order,...r.map(s=>s.id)]}})})),updateShape:(r,A)=>t(n=>({project:Jr(n.project,n.activePageId,i=>{const s=i.shapes[r];return s?{...i,shapes:{...i.shapes,[r]:{...s,...A}}}:i})})),updateShapes:r=>t(A=>({project:Jr(A.project,A.activePageId,n=>{const i={...n.shapes};for(const[s,a]of Object.entries(r)){const o=i[s];o&&(i[s]={...o,...a})}return{...n,shapes:i}})})),removeElements:r=>t(A=>({project:Jr(A.project,A.activePageId,n=>{const i={...n.shapes},s={...n.edges},a=new Set(BU(n,r));for(const o of a)delete i[o],delete s[o];for(const[o,l]of Object.entries(s))(l.source.shapeId&&a.has(l.source.shapeId)||l.target.shapeId&&a.has(l.target.shapeId))&&(delete s[o],a.add(o));return{...n,shapes:i,edges:s,order:n.order.filter(o=>!a.has(o))}})})),addEdge:r=>t(A=>({project:Jr(A.project,A.activePageId,n=>({...n,edges:{...n.edges,[r.id]:r},order:[...n.order,r.id]}))})),addEdges:r=>t(A=>({project:Jr(A.project,A.activePageId,n=>{const i={...n.edges};for(const s of r)i[s.id]=s;return{...n,edges:i,order:[...n.order,...r.map(s=>s.id)]}})})),updateEdge:(r,A)=>t(n=>({project:Jr(n.project,n.activePageId,i=>{const s=i.edges[r];return s?{...i,edges:{...i.edges,[r]:{...s,...A}}}:i})})),updateEdges:r=>t(A=>({project:Jr(A.project,A.activePageId,n=>{const i={...n.edges};for(const[s,a]of Object.entries(r)){const o=i[s];o&&(i[s]={...o,...a})}return{...n,edges:i}})})),setPageOrder:r=>t(A=>({project:Jr(A.project,A.activePageId,n=>({...n,order:r}))})),moveElementsBy:(r,A,n)=>t(i=>({project:Jr(i.project,i.activePageId,s=>{const a={...s.shapes},o=mm(s,r);for(const f of o){const h=a[f];h&&!h.locked&&(a[f]={...h,x:h.x+A,y:h.y+n})}const l={...s,shapes:a},c=Xh(l,ym(s,o));for(const[f,h]of Object.entries(c)){const u=a[f];u&&(a[f]={...u,...h})}return{...s,shapes:a}})})),reorder:(r,A)=>t(n=>({project:Jr(n.project,n.activePageId,i=>{const s=[...i.order],a=s.indexOf(r);return a===-1?i:(s.splice(a,1),A==="front"?s.push(r):A==="back"?s.unshift(r):A==="forward"?s.splice(Math.min(a+1,s.length),0,r):s.splice(Math.max(a-1,0),0,r),{...i,order:s})})})),addPage:()=>{const r=ml(`Page ${e().project.pages.length+1}`);return t(A=>({project:{...A.project,pages:[...A.project.pages,r]}})),Xe.emit("project:changed",{reason:"add-page"}),r.id},duplicatePage:r=>{const A=e().project.pages.find(i=>i.id===r),n=A?{...structuredClone(A),id:ml().id,name:`${A.name} copy`}:ml();return t(i=>({project:{...i.project,pages:[...i.project.pages,n]}})),n.id},removePage:r=>t(A=>{if(A.project.pages.length<=1)return A;const n=A.project.pages.filter(s=>s.id!==r),i=A.activePageId===r?n[0].id:A.activePageId;return{project:{...A.project,pages:n},activePageId:i}}),renamePage:(r,A)=>t(n=>({project:{...n.project,pages:n.project.pages.map(i=>i.id===r?{...i,name:A}:i)}})),addLayer:r=>{const A=Yh(r??`Layer ${e().activePage().layers.length+1}`,e().activePage().layers.length);return t(n=>({project:Jr(n.project,n.activePageId,i=>({...i,layers:[...i.layers,A]}))})),A.id},renameLayer:(r,A)=>t(n=>({project:Jr(n.project,n.activePageId,i=>({...i,layers:i.layers.map(s=>s.id===r?{...s,name:A}:s)}))})),removeLayer:r=>t(A=>({project:Jr(A.project,A.activePageId,n=>{if(n.layers.length<=1)return n;const i=n.layers.find(a=>a.id!==r),s={...n.shapes};for(const[a,o]of Object.entries(s))o.layerId===r&&(s[a]={...o,layerId:i.id});return{...n,layers:n.layers.filter(a=>a.id!==r),shapes:s}})})),setLayerVisible:(r,A)=>t(n=>({project:Jr(n.project,n.activePageId,i=>({...i,layers:i.layers.map(s=>s.id===r?{...s,visible:A}:s)}))})),setLayerLocked:(r,A)=>t(n=>({project:Jr(n.project,n.activePageId,i=>({...i,layers:i.layers.map(s=>s.id===r?{...s,locked:A}:s)}))})),reorderLayer:(r,A)=>t(n=>({project:Jr(n.project,n.activePageId,i=>{const s=[...i.layers],a=s.findIndex(l=>l.id===r),o=A==="up"?a+1:a-1;return a===-1||o<0||o>=s.length?i:([s[a],s[o]]=[s[o],s[a]],{...i,layers:s.map((l,c)=>({...l,order:c}))})})})),setShapeLayer:(r,A)=>t(n=>({project:Jr(n.project,n.activePageId,i=>{const s=i.shapes[r];return s?{...i,shapes:{...i.shapes,[r]:{...s,layerId:A}}}:i})}))}));Qe.setState(t=>({activePageId:t.project.pages[0].id}));function Zc(t){Xe.emit("history:changed",{canUndo:t.past.length>0,canRedo:t.future.length>0})}const Et=Yc((t,e)=>({past:[],future:[],baseline:null,capture:()=>t({baseline:Qe.getState().project}),commit:r=>{const{baseline:A}=e(),n=Qe.getState().project;if(!A||A===n){t({baseline:null});return}const i=[...e().past,{label:r,project:A}].slice(-500);t({past:i,future:[],baseline:null}),Zc(e())},cancel:()=>t({baseline:null}),run:(r,A)=>{e().capture(),A(),e().commit(r)},undo:()=>{const{past:r}=e();if(r.length===0)return;const A=r[r.length-1],n=Qe.getState().project;Qe.getState().replaceProject(A.project),t({past:r.slice(0,-1),future:[{label:A.label,project:n},...e().future]}),Zc(e())},redo:()=>{const{future:r}=e();if(r.length===0)return;const A=r[0],n=Qe.getState().project;Qe.getState().replaceProject(A.project),t({future:r.slice(1),past:[...e().past,{label:A.label,project:n}]}),Zc(e())},clear:()=>{t({past:[],future:[],baseline:null}),Zc(e())}})),Br=ke.forwardRef(function({active:e=!1,label:r,className:A="",children:n,...i},s){return _.jsx("button",{ref:s,type:"button",title:r,"aria-label":r,"aria-pressed":e,className:`df-focus-ring inline-flex h-9 w-9 items-center justify-center rounded-md transition-colors ${e?"text-white":"hover:brightness-110"} ${A}`,style:{background:e?"var(--color-accent)":"transparent",color:e?"#fff":"var(--color-text)"},...i,children:n})}),wl=new Map;function Bm(t){wl.set(t.id,t)}function bm(t){for(const e of t)wl.set(e.id,e)}function Jh(t){return wl.get(t)}function Cm(){return[...wl.values()]}function bU(t){return[...wl.values()].filter(e=>e.category===t)}class CU{plugins=new Map;contributions={commands:new Map,toolbar:[],menu:[],shortcuts:[],exporters:[],importers:[]};buildContext(){return{registerShapes:e=>bm(e),registerCommand:e=>this.contributions.commands.set(e.id,e),registerToolbarItem:e=>this.contributions.toolbar.push(e),registerMenuItem:e=>this.contributions.menu.push(e),registerShortcut:e=>this.contributions.shortcuts.push(e),registerExporter:e=>this.contributions.exporters.push(e),registerImporter:e=>this.contributions.importers.push(e),getProject:()=>Qe.getState().project,getActivePage:()=>Qe.getState().activePage(),notify:(e,r="info")=>Xe.emit("toast",{message:e,kind:r})}}register(e){if(!this.plugins.has(e.id)){this.plugins.set(e.id,e);try{e.activate(this.buildContext())}catch(r){const A=r instanceof Error?r.message:String(r);Xe.emit("toast",{message:`Plugin “${e.name}” failed: ${A}`,kind:"error"});return}Xe.emit("project:changed",{reason:"plugin-registered"})}}list(){return[...this.plugins.values()]}runCommand(e){this.contributions.commands.get(e)?.run()}toolbarItems(){return this.contributions.toolbar}menuItems(){return this.contributions.menu}shortcuts(){return this.contributions.shortcuts}exporters(){return this.contributions.exporters}importers(){return this.contributions.importers}}const FA=new CU;var ss=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Zh(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function eu(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var ed={exports:{}};var xm;function xU(){return xm||(xm=1,(function(t,e){(function(r){t.exports=r()})(function(){return(function r(A,n,i){function s(l,c){if(!n[l]){if(!A[l]){var f=typeof eu=="function"&&eu;if(!c&&f)return f(l,!0);if(a)return a(l,!0);var h=new Error("Cannot find module '"+l+"'");throw h.code="MODULE_NOT_FOUND",h}var u=n[l]={exports:{}};A[l][0].call(u.exports,function(g){var p=A[l][1][g];return s(p||g)},u,u.exports,r,A,n,i)}return n[l].exports}for(var a=typeof eu=="function"&&eu,o=0;o<i.length;o++)s(i[o]);return s})({1:[function(r,A,n){var i=r("./utils"),s=r("./support"),a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";n.encode=function(o){for(var l,c,f,h,u,g,p,w=[],m=0,B=o.length,x=B,E=i.getTypeOf(o)!=="string";m<o.length;)x=B-m,f=E?(l=o[m++],c=m<B?o[m++]:0,m<B?o[m++]:0):(l=o.charCodeAt(m++),c=m<B?o.charCodeAt(m++):0,m<B?o.charCodeAt(m++):0),h=l>>2,u=(3&l)<<4|c>>4,g=1<x?(15&c)<<2|f>>6:64,p=2<x?63&f:64,w.push(a.charAt(h)+a.charAt(u)+a.charAt(g)+a.charAt(p));return w.join("")},n.decode=function(o){var l,c,f,h,u,g,p=0,w=0,m="data:";if(o.substr(0,m.length)===m)throw new Error("Invalid base64 input, it looks like a data url.");var B,x=3*(o=o.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(o.charAt(o.length-1)===a.charAt(64)&&x--,o.charAt(o.length-2)===a.charAt(64)&&x--,x%1!=0)throw new Error("Invalid base64 input, bad content length.");for(B=s.uint8array?new Uint8Array(0|x):new Array(0|x);p<o.length;)l=a.indexOf(o.charAt(p++))<<2|(h=a.indexOf(o.charAt(p++)))>>4,c=(15&h)<<4|(u=a.indexOf(o.charAt(p++)))>>2,f=(3&u)<<6|(g=a.indexOf(o.charAt(p++))),B[w++]=l,u!==64&&(B[w++]=c),g!==64&&(B[w++]=f);return B}},{"./support":30,"./utils":32}],2:[function(r,A,n){var i=r("./external"),s=r("./stream/DataWorker"),a=r("./stream/Crc32Probe"),o=r("./stream/DataLengthProbe");function l(c,f,h,u,g){this.compressedSize=c,this.uncompressedSize=f,this.crc32=h,this.compression=u,this.compressedContent=g}l.prototype={getContentWorker:function(){var c=new s(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new o("data_length")),f=this;return c.on("end",function(){if(this.streamInfo.data_length!==f.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),c},getCompressedWorker:function(){return new s(i.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},l.createWorkerFrom=function(c,f,h){return c.pipe(new a).pipe(new o("uncompressedSize")).pipe(f.compressWorker(h)).pipe(new o("compressedSize")).withStreamInfo("compression",f)},A.exports=l},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(r,A,n){var i=r("./stream/GenericWorker");n.STORE={magic:"\0\0",compressWorker:function(){return new i("STORE compression")},uncompressWorker:function(){return new i("STORE decompression")}},n.DEFLATE=r("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(r,A,n){var i=r("./utils"),s=(function(){for(var a,o=[],l=0;l<256;l++){a=l;for(var c=0;c<8;c++)a=1&a?3988292384^a>>>1:a>>>1;o[l]=a}return o})();A.exports=function(a,o){return a!==void 0&&a.length?i.getTypeOf(a)!=="string"?(function(l,c,f,h){var u=s,g=h+f;l^=-1;for(var p=h;p<g;p++)l=l>>>8^u[255&(l^c[p])];return-1^l})(0|o,a,a.length,0):(function(l,c,f,h){var u=s,g=h+f;l^=-1;for(var p=h;p<g;p++)l=l>>>8^u[255&(l^c.charCodeAt(p))];return-1^l})(0|o,a,a.length,0):0}},{"./utils":32}],5:[function(r,A,n){n.base64=!1,n.binary=!1,n.dir=!1,n.createFolders=!0,n.date=null,n.compression=null,n.compressionOptions=null,n.comment=null,n.unixPermissions=null,n.dosPermissions=null},{}],6:[function(r,A,n){var i=null;i=typeof Promise<"u"?Promise:r("lie"),A.exports={Promise:i}},{lie:37}],7:[function(r,A,n){var i=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",s=r("pako"),a=r("./utils"),o=r("./stream/GenericWorker"),l=i?"uint8array":"array";function c(f,h){o.call(this,"FlateWorker/"+f),this._pako=null,this._pakoAction=f,this._pakoOptions=h,this.meta={}}n.magic="\b\0",a.inherits(c,o),c.prototype.processChunk=function(f){this.meta=f.meta,this._pako===null&&this._createPako(),this._pako.push(a.transformTo(l,f.data),!1)},c.prototype.flush=function(){o.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},c.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this._pako=null},c.prototype._createPako=function(){this._pako=new s[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var f=this;this._pako.onData=function(h){f.push({data:h,meta:f.meta})}},n.compressWorker=function(f){return new c("Deflate",f)},n.uncompressWorker=function(){return new c("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(r,A,n){function i(u,g){var p,w="";for(p=0;p<g;p++)w+=String.fromCharCode(255&u),u>>>=8;return w}function s(u,g,p,w,m,B){var x,E,k=u.file,H=u.compression,K=B!==l.utf8encode,R=a.transformTo("string",B(k.name)),I=a.transformTo("string",l.utf8encode(k.name)),W=k.comment,L=a.transformTo("string",B(W)),F=a.transformTo("string",l.utf8encode(W)),M=I.length!==k.name.length,b=F.length!==W.length,Y="",ce="",ee="",le=k.dir,Ae=k.date,te={crc32:0,compressedSize:0,uncompressedSize:0};g&&!p||(te.crc32=u.crc32,te.compressedSize=u.compressedSize,te.uncompressedSize=u.uncompressedSize);var T=0;g&&(T|=8),K||!M&&!b||(T|=2048);var S=0,O=0;le&&(S|=16),m==="UNIX"?(O=798,S|=(function(z,ie){var fe=z;return z||(fe=ie?16893:33204),(65535&fe)<<16})(k.unixPermissions,le)):(O=20,S|=(function(z){return 63&(z||0)})(k.dosPermissions)),x=Ae.getUTCHours(),x<<=6,x|=Ae.getUTCMinutes(),x<<=5,x|=Ae.getUTCSeconds()/2,E=Ae.getUTCFullYear()-1980,E<<=4,E|=Ae.getUTCMonth()+1,E<<=5,E|=Ae.getUTCDate(),M&&(ce=i(1,1)+i(c(R),4)+I,Y+="up"+i(ce.length,2)+ce),b&&(ee=i(1,1)+i(c(L),4)+F,Y+="uc"+i(ee.length,2)+ee);var P="";return P+=`
|
|
2
|
+
\0`,P+=i(T,2),P+=H.magic,P+=i(x,2),P+=i(E,2),P+=i(te.crc32,4),P+=i(te.compressedSize,4),P+=i(te.uncompressedSize,4),P+=i(R.length,2),P+=i(Y.length,2),{fileRecord:f.LOCAL_FILE_HEADER+P+R+Y,dirRecord:f.CENTRAL_FILE_HEADER+i(O,2)+P+i(L.length,2)+"\0\0\0\0"+i(S,4)+i(w,4)+R+Y+L}}var a=r("../utils"),o=r("../stream/GenericWorker"),l=r("../utf8"),c=r("../crc32"),f=r("../signature");function h(u,g,p,w){o.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=g,this.zipPlatform=p,this.encodeFileName=w,this.streamFiles=u,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(h,o),h.prototype.push=function(u){var g=u.meta.percent||0,p=this.entriesCount,w=this._sources.length;this.accumulate?this.contentBuffer.push(u):(this.bytesWritten+=u.data.length,o.prototype.push.call(this,{data:u.data,meta:{currentFile:this.currentFile,percent:p?(g+100*(p-w-1))/p:100}}))},h.prototype.openedSource=function(u){this.currentSourceOffset=this.bytesWritten,this.currentFile=u.file.name;var g=this.streamFiles&&!u.file.dir;if(g){var p=s(u,g,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:p.fileRecord,meta:{percent:0}})}else this.accumulate=!0},h.prototype.closedSource=function(u){this.accumulate=!1;var g=this.streamFiles&&!u.file.dir,p=s(u,g,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(p.dirRecord),g)this.push({data:(function(w){return f.DATA_DESCRIPTOR+i(w.crc32,4)+i(w.compressedSize,4)+i(w.uncompressedSize,4)})(u),meta:{percent:100}});else for(this.push({data:p.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},h.prototype.flush=function(){for(var u=this.bytesWritten,g=0;g<this.dirRecords.length;g++)this.push({data:this.dirRecords[g],meta:{percent:100}});var p=this.bytesWritten-u,w=(function(m,B,x,E,k){var H=a.transformTo("string",k(E));return f.CENTRAL_DIRECTORY_END+"\0\0\0\0"+i(m,2)+i(m,2)+i(B,4)+i(x,4)+i(H.length,2)+H})(this.dirRecords.length,p,u,this.zipComment,this.encodeFileName);this.push({data:w,meta:{percent:100}})},h.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},h.prototype.registerPrevious=function(u){this._sources.push(u);var g=this;return u.on("data",function(p){g.processChunk(p)}),u.on("end",function(){g.closedSource(g.previous.streamInfo),g._sources.length?g.prepareNextSource():g.end()}),u.on("error",function(p){g.error(p)}),this},h.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},h.prototype.error=function(u){var g=this._sources;if(!o.prototype.error.call(this,u))return!1;for(var p=0;p<g.length;p++)try{g[p].error(u)}catch{}return!0},h.prototype.lock=function(){o.prototype.lock.call(this);for(var u=this._sources,g=0;g<u.length;g++)u[g].lock()},A.exports=h},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(r,A,n){var i=r("../compressions"),s=r("./ZipFileWorker");n.generateWorker=function(a,o,l){var c=new s(o.streamFiles,l,o.platform,o.encodeFileName),f=0;try{a.forEach(function(h,u){f++;var g=(function(B,x){var E=B||x,k=i[E];if(!k)throw new Error(E+" is not a valid compression method !");return k})(u.options.compression,o.compression),p=u.options.compressionOptions||o.compressionOptions||{},w=u.dir,m=u.date;u._compressWorker(g,p).withStreamInfo("file",{name:h,dir:w,date:m,comment:u.comment||"",unixPermissions:u.unixPermissions,dosPermissions:u.dosPermissions}).pipe(c)}),c.entriesCount=f}catch(h){c.error(h)}return c}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(r,A,n){function i(){if(!(this instanceof i))return new i;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var s=new i;for(var a in this)typeof this[a]!="function"&&(s[a]=this[a]);return s}}(i.prototype=r("./object")).loadAsync=r("./load"),i.support=r("./support"),i.defaults=r("./defaults"),i.version="3.10.1",i.loadAsync=function(s,a){return new i().loadAsync(s,a)},i.external=r("./external"),A.exports=i},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(r,A,n){var i=r("./utils"),s=r("./external"),a=r("./utf8"),o=r("./zipEntries"),l=r("./stream/Crc32Probe"),c=r("./nodejsUtils");function f(h){return new s.Promise(function(u,g){var p=h.decompressed.getContentWorker().pipe(new l);p.on("error",function(w){g(w)}).on("end",function(){p.streamInfo.crc32!==h.decompressed.crc32?g(new Error("Corrupted zip : CRC32 mismatch")):u()}).resume()})}A.exports=function(h,u){var g=this;return u=i.extend(u||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:a.utf8decode}),c.isNode&&c.isStream(h)?s.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):i.prepareContent("the loaded zip file",h,!0,u.optimizedBinaryString,u.base64).then(function(p){var w=new o(u);return w.load(p),w}).then(function(p){var w=[s.Promise.resolve(p)],m=p.files;if(u.checkCRC32)for(var B=0;B<m.length;B++)w.push(f(m[B]));return s.Promise.all(w)}).then(function(p){for(var w=p.shift(),m=w.files,B=0;B<m.length;B++){var x=m[B],E=x.fileNameStr,k=i.resolve(x.fileNameStr);g.file(k,x.decompressed,{binary:!0,optimizedBinaryString:!0,date:x.date,dir:x.dir,comment:x.fileCommentStr.length?x.fileCommentStr:null,unixPermissions:x.unixPermissions,dosPermissions:x.dosPermissions,createFolders:u.createFolders}),x.dir||(g.file(k).unsafeOriginalName=E)}return w.zipComment.length&&(g.comment=w.zipComment),g})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(r,A,n){var i=r("../utils"),s=r("../stream/GenericWorker");function a(o,l){s.call(this,"Nodejs stream input adapter for "+o),this._upstreamEnded=!1,this._bindStream(l)}i.inherits(a,s),a.prototype._bindStream=function(o){var l=this;(this._stream=o).pause(),o.on("data",function(c){l.push({data:c,meta:{percent:0}})}).on("error",function(c){l.isPaused?this.generatedError=c:l.error(c)}).on("end",function(){l.isPaused?l._upstreamEnded=!0:l.end()})},a.prototype.pause=function(){return!!s.prototype.pause.call(this)&&(this._stream.pause(),!0)},a.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},A.exports=a},{"../stream/GenericWorker":28,"../utils":32}],13:[function(r,A,n){var i=r("readable-stream").Readable;function s(a,o,l){i.call(this,o),this._helper=a;var c=this;a.on("data",function(f,h){c.push(f)||c._helper.pause(),l&&l(h)}).on("error",function(f){c.emit("error",f)}).on("end",function(){c.push(null)})}r("../utils").inherits(s,i),s.prototype._read=function(){this._helper.resume()},A.exports=s},{"../utils":32,"readable-stream":16}],14:[function(r,A,n){A.exports={isNode:typeof Buffer<"u",newBufferFrom:function(i,s){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(i,s);if(typeof i=="number")throw new Error('The "data" argument must not be a number');return new Buffer(i,s)},allocBuffer:function(i){if(Buffer.alloc)return Buffer.alloc(i);var s=new Buffer(i);return s.fill(0),s},isBuffer:function(i){return Buffer.isBuffer(i)},isStream:function(i){return i&&typeof i.on=="function"&&typeof i.pause=="function"&&typeof i.resume=="function"}}},{}],15:[function(r,A,n){function i(k,H,K){var R,I=a.getTypeOf(H),W=a.extend(K||{},c);W.date=W.date||new Date,W.compression!==null&&(W.compression=W.compression.toUpperCase()),typeof W.unixPermissions=="string"&&(W.unixPermissions=parseInt(W.unixPermissions,8)),W.unixPermissions&&16384&W.unixPermissions&&(W.dir=!0),W.dosPermissions&&16&W.dosPermissions&&(W.dir=!0),W.dir&&(k=m(k)),W.createFolders&&(R=w(k))&&B.call(this,R,!0);var L=I==="string"&&W.binary===!1&&W.base64===!1;K&&K.binary!==void 0||(W.binary=!L),(H instanceof f&&H.uncompressedSize===0||W.dir||!H||H.length===0)&&(W.base64=!1,W.binary=!0,H="",W.compression="STORE",I="string");var F=null;F=H instanceof f||H instanceof o?H:g.isNode&&g.isStream(H)?new p(k,H):a.prepareContent(k,H,W.binary,W.optimizedBinaryString,W.base64);var M=new h(k,F,W);this.files[k]=M}var s=r("./utf8"),a=r("./utils"),o=r("./stream/GenericWorker"),l=r("./stream/StreamHelper"),c=r("./defaults"),f=r("./compressedObject"),h=r("./zipObject"),u=r("./generate"),g=r("./nodejsUtils"),p=r("./nodejs/NodejsStreamInputAdapter"),w=function(k){k.slice(-1)==="/"&&(k=k.substring(0,k.length-1));var H=k.lastIndexOf("/");return 0<H?k.substring(0,H):""},m=function(k){return k.slice(-1)!=="/"&&(k+="/"),k},B=function(k,H){return H=H!==void 0?H:c.createFolders,k=m(k),this.files[k]||i.call(this,k,null,{dir:!0,createFolders:H}),this.files[k]};function x(k){return Object.prototype.toString.call(k)==="[object RegExp]"}var E={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(k){var H,K,R;for(H in this.files)R=this.files[H],(K=H.slice(this.root.length,H.length))&&H.slice(0,this.root.length)===this.root&&k(K,R)},filter:function(k){var H=[];return this.forEach(function(K,R){k(K,R)&&H.push(R)}),H},file:function(k,H,K){if(arguments.length!==1)return k=this.root+k,i.call(this,k,H,K),this;if(x(k)){var R=k;return this.filter(function(W,L){return!L.dir&&R.test(W)})}var I=this.files[this.root+k];return I&&!I.dir?I:null},folder:function(k){if(!k)return this;if(x(k))return this.filter(function(I,W){return W.dir&&k.test(I)});var H=this.root+k,K=B.call(this,H),R=this.clone();return R.root=K.name,R},remove:function(k){k=this.root+k;var H=this.files[k];if(H||(k.slice(-1)!=="/"&&(k+="/"),H=this.files[k]),H&&!H.dir)delete this.files[k];else for(var K=this.filter(function(I,W){return W.name.slice(0,k.length)===k}),R=0;R<K.length;R++)delete this.files[K[R].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(k){var H,K={};try{if((K=a.extend(k||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:s.utf8encode})).type=K.type.toLowerCase(),K.compression=K.compression.toUpperCase(),K.type==="binarystring"&&(K.type="string"),!K.type)throw new Error("No output type specified.");a.checkSupport(K.type),K.platform!=="darwin"&&K.platform!=="freebsd"&&K.platform!=="linux"&&K.platform!=="sunos"||(K.platform="UNIX"),K.platform==="win32"&&(K.platform="DOS");var R=K.comment||this.comment||"";H=u.generateWorker(this,K,R)}catch(I){(H=new o("error")).error(I)}return new l(H,K.type||"string",K.mimeType)},generateAsync:function(k,H){return this.generateInternalStream(k).accumulate(H)},generateNodeStream:function(k,H){return(k=k||{}).type||(k.type="nodebuffer"),this.generateInternalStream(k).toNodejsStream(H)}};A.exports=E},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(r,A,n){A.exports=r("stream")},{stream:void 0}],17:[function(r,A,n){var i=r("./DataReader");function s(a){i.call(this,a);for(var o=0;o<this.data.length;o++)a[o]=255&a[o]}r("../utils").inherits(s,i),s.prototype.byteAt=function(a){return this.data[this.zero+a]},s.prototype.lastIndexOfSignature=function(a){for(var o=a.charCodeAt(0),l=a.charCodeAt(1),c=a.charCodeAt(2),f=a.charCodeAt(3),h=this.length-4;0<=h;--h)if(this.data[h]===o&&this.data[h+1]===l&&this.data[h+2]===c&&this.data[h+3]===f)return h-this.zero;return-1},s.prototype.readAndCheckSignature=function(a){var o=a.charCodeAt(0),l=a.charCodeAt(1),c=a.charCodeAt(2),f=a.charCodeAt(3),h=this.readData(4);return o===h[0]&&l===h[1]&&c===h[2]&&f===h[3]},s.prototype.readData=function(a){if(this.checkOffset(a),a===0)return[];var o=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,o},A.exports=s},{"../utils":32,"./DataReader":18}],18:[function(r,A,n){var i=r("../utils");function s(a){this.data=a,this.length=a.length,this.index=0,this.zero=0}s.prototype={checkOffset:function(a){this.checkIndex(this.index+a)},checkIndex:function(a){if(this.length<this.zero+a||a<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+a+"). Corrupted zip ?")},setIndex:function(a){this.checkIndex(a),this.index=a},skip:function(a){this.setIndex(this.index+a)},byteAt:function(){},readInt:function(a){var o,l=0;for(this.checkOffset(a),o=this.index+a-1;o>=this.index;o--)l=(l<<8)+this.byteAt(o);return this.index+=a,l},readString:function(a){return i.transformTo("string",this.readData(a))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var a=this.readInt(4);return new Date(Date.UTC(1980+(a>>25&127),(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1))}},A.exports=s},{"../utils":32}],19:[function(r,A,n){var i=r("./Uint8ArrayReader");function s(a){i.call(this,a)}r("../utils").inherits(s,i),s.prototype.readData=function(a){this.checkOffset(a);var o=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,o},A.exports=s},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(r,A,n){var i=r("./DataReader");function s(a){i.call(this,a)}r("../utils").inherits(s,i),s.prototype.byteAt=function(a){return this.data.charCodeAt(this.zero+a)},s.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)-this.zero},s.prototype.readAndCheckSignature=function(a){return a===this.readData(4)},s.prototype.readData=function(a){this.checkOffset(a);var o=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,o},A.exports=s},{"../utils":32,"./DataReader":18}],21:[function(r,A,n){var i=r("./ArrayReader");function s(a){i.call(this,a)}r("../utils").inherits(s,i),s.prototype.readData=function(a){if(this.checkOffset(a),a===0)return new Uint8Array(0);var o=this.data.subarray(this.zero+this.index,this.zero+this.index+a);return this.index+=a,o},A.exports=s},{"../utils":32,"./ArrayReader":17}],22:[function(r,A,n){var i=r("../utils"),s=r("../support"),a=r("./ArrayReader"),o=r("./StringReader"),l=r("./NodeBufferReader"),c=r("./Uint8ArrayReader");A.exports=function(f){var h=i.getTypeOf(f);return i.checkSupport(h),h!=="string"||s.uint8array?h==="nodebuffer"?new l(f):s.uint8array?new c(i.transformTo("uint8array",f)):new a(i.transformTo("array",f)):new o(f)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(r,A,n){n.LOCAL_FILE_HEADER="PK",n.CENTRAL_FILE_HEADER="PK",n.CENTRAL_DIRECTORY_END="PK",n.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",n.ZIP64_CENTRAL_DIRECTORY_END="PK",n.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(r,A,n){var i=r("./GenericWorker"),s=r("../utils");function a(o){i.call(this,"ConvertWorker to "+o),this.destType=o}s.inherits(a,i),a.prototype.processChunk=function(o){this.push({data:s.transformTo(this.destType,o.data),meta:o.meta})},A.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(r,A,n){var i=r("./GenericWorker"),s=r("../crc32");function a(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}r("../utils").inherits(a,i),a.prototype.processChunk=function(o){this.streamInfo.crc32=s(o.data,this.streamInfo.crc32||0),this.push(o)},A.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(r,A,n){var i=r("../utils"),s=r("./GenericWorker");function a(o){s.call(this,"DataLengthProbe for "+o),this.propName=o,this.withStreamInfo(o,0)}i.inherits(a,s),a.prototype.processChunk=function(o){if(o){var l=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=l+o.data.length}s.prototype.processChunk.call(this,o)},A.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(r,A,n){var i=r("../utils"),s=r("./GenericWorker");function a(o){s.call(this,"DataWorker");var l=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,o.then(function(c){l.dataIsReady=!0,l.data=c,l.max=c&&c.length||0,l.type=i.getTypeOf(c),l.isPaused||l._tickAndRepeat()},function(c){l.error(c)})}i.inherits(a,s),a.prototype.cleanUp=function(){s.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var o=null,l=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":o=this.data.substring(this.index,l);break;case"uint8array":o=this.data.subarray(this.index,l);break;case"array":case"nodebuffer":o=this.data.slice(this.index,l)}return this.index=l,this.push({data:o,meta:{percent:this.max?this.index/this.max*100:0}})},A.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(r,A,n){function i(s){this.name=s||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}i.prototype={push:function(s){this.emit("data",s)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(s){this.emit("error",s)}return!0},error:function(s){return!this.isFinished&&(this.isPaused?this.generatedError=s:(this.isFinished=!0,this.emit("error",s),this.previous&&this.previous.error(s),this.cleanUp()),!0)},on:function(s,a){return this._listeners[s].push(a),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(s,a){if(this._listeners[s])for(var o=0;o<this._listeners[s].length;o++)this._listeners[s][o].call(this,a)},pipe:function(s){return s.registerPrevious(this)},registerPrevious:function(s){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=s.streamInfo,this.mergeStreamInfo(),this.previous=s;var a=this;return s.on("data",function(o){a.processChunk(o)}),s.on("end",function(){a.end()}),s.on("error",function(o){a.error(o)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var s=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),s=!0),this.previous&&this.previous.resume(),!s},flush:function(){},processChunk:function(s){this.push(s)},withStreamInfo:function(s,a){return this.extraStreamInfo[s]=a,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var s in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,s)&&(this.streamInfo[s]=this.extraStreamInfo[s])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var s="Worker "+this.name;return this.previous?this.previous+" -> "+s:s}},A.exports=i},{}],29:[function(r,A,n){var i=r("../utils"),s=r("./ConvertWorker"),a=r("./GenericWorker"),o=r("../base64"),l=r("../support"),c=r("../external"),f=null;if(l.nodestream)try{f=r("../nodejs/NodejsStreamOutputAdapter")}catch{}function h(g,p){return new c.Promise(function(w,m){var B=[],x=g._internalType,E=g._outputType,k=g._mimeType;g.on("data",function(H,K){B.push(H),p&&p(K)}).on("error",function(H){B=[],m(H)}).on("end",function(){try{var H=(function(K,R,I){switch(K){case"blob":return i.newBlob(i.transformTo("arraybuffer",R),I);case"base64":return o.encode(R);default:return i.transformTo(K,R)}})(E,(function(K,R){var I,W=0,L=null,F=0;for(I=0;I<R.length;I++)F+=R[I].length;switch(K){case"string":return R.join("");case"array":return Array.prototype.concat.apply([],R);case"uint8array":for(L=new Uint8Array(F),I=0;I<R.length;I++)L.set(R[I],W),W+=R[I].length;return L;case"nodebuffer":return Buffer.concat(R);default:throw new Error("concat : unsupported type '"+K+"'")}})(x,B),k);w(H)}catch(K){m(K)}B=[]}).resume()})}function u(g,p,w){var m=p;switch(p){case"blob":case"arraybuffer":m="uint8array";break;case"base64":m="string"}try{this._internalType=m,this._outputType=p,this._mimeType=w,i.checkSupport(m),this._worker=g.pipe(new s(m)),g.lock()}catch(B){this._worker=new a("error"),this._worker.error(B)}}u.prototype={accumulate:function(g){return h(this,g)},on:function(g,p){var w=this;return g==="data"?this._worker.on(g,function(m){p.call(w,m.data,m.meta)}):this._worker.on(g,function(){i.delay(p,arguments,w)}),this},resume:function(){return i.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(g){if(i.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new f(this,{objectMode:this._outputType!=="nodebuffer"},g)}},A.exports=u},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(r,A,n){if(n.base64=!0,n.array=!0,n.string=!0,n.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",n.nodebuffer=typeof Buffer<"u",n.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")n.blob=!1;else{var i=new ArrayBuffer(0);try{n.blob=new Blob([i],{type:"application/zip"}).size===0}catch{try{var s=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);s.append(i),n.blob=s.getBlob("application/zip").size===0}catch{n.blob=!1}}}try{n.nodestream=!!r("readable-stream").Readable}catch{n.nodestream=!1}},{"readable-stream":16}],31:[function(r,A,n){for(var i=r("./utils"),s=r("./support"),a=r("./nodejsUtils"),o=r("./stream/GenericWorker"),l=new Array(256),c=0;c<256;c++)l[c]=252<=c?6:248<=c?5:240<=c?4:224<=c?3:192<=c?2:1;l[254]=l[254]=1;function f(){o.call(this,"utf-8 decode"),this.leftOver=null}function h(){o.call(this,"utf-8 encode")}n.utf8encode=function(u){return s.nodebuffer?a.newBufferFrom(u,"utf-8"):(function(g){var p,w,m,B,x,E=g.length,k=0;for(B=0;B<E;B++)(64512&(w=g.charCodeAt(B)))==55296&&B+1<E&&(64512&(m=g.charCodeAt(B+1)))==56320&&(w=65536+(w-55296<<10)+(m-56320),B++),k+=w<128?1:w<2048?2:w<65536?3:4;for(p=s.uint8array?new Uint8Array(k):new Array(k),B=x=0;x<k;B++)(64512&(w=g.charCodeAt(B)))==55296&&B+1<E&&(64512&(m=g.charCodeAt(B+1)))==56320&&(w=65536+(w-55296<<10)+(m-56320),B++),w<128?p[x++]=w:(w<2048?p[x++]=192|w>>>6:(w<65536?p[x++]=224|w>>>12:(p[x++]=240|w>>>18,p[x++]=128|w>>>12&63),p[x++]=128|w>>>6&63),p[x++]=128|63&w);return p})(u)},n.utf8decode=function(u){return s.nodebuffer?i.transformTo("nodebuffer",u).toString("utf-8"):(function(g){var p,w,m,B,x=g.length,E=new Array(2*x);for(p=w=0;p<x;)if((m=g[p++])<128)E[w++]=m;else if(4<(B=l[m]))E[w++]=65533,p+=B-1;else{for(m&=B===2?31:B===3?15:7;1<B&&p<x;)m=m<<6|63&g[p++],B--;1<B?E[w++]=65533:m<65536?E[w++]=m:(m-=65536,E[w++]=55296|m>>10&1023,E[w++]=56320|1023&m)}return E.length!==w&&(E.subarray?E=E.subarray(0,w):E.length=w),i.applyFromCharCode(E)})(u=i.transformTo(s.uint8array?"uint8array":"array",u))},i.inherits(f,o),f.prototype.processChunk=function(u){var g=i.transformTo(s.uint8array?"uint8array":"array",u.data);if(this.leftOver&&this.leftOver.length){if(s.uint8array){var p=g;(g=new Uint8Array(p.length+this.leftOver.length)).set(this.leftOver,0),g.set(p,this.leftOver.length)}else g=this.leftOver.concat(g);this.leftOver=null}var w=(function(B,x){var E;for((x=x||B.length)>B.length&&(x=B.length),E=x-1;0<=E&&(192&B[E])==128;)E--;return E<0||E===0?x:E+l[B[E]]>x?E:x})(g),m=g;w!==g.length&&(s.uint8array?(m=g.subarray(0,w),this.leftOver=g.subarray(w,g.length)):(m=g.slice(0,w),this.leftOver=g.slice(w,g.length))),this.push({data:n.utf8decode(m),meta:u.meta})},f.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=f,i.inherits(h,o),h.prototype.processChunk=function(u){this.push({data:n.utf8encode(u.data),meta:u.meta})},n.Utf8EncodeWorker=h},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(r,A,n){var i=r("./support"),s=r("./base64"),a=r("./nodejsUtils"),o=r("./external");function l(p){return p}function c(p,w){for(var m=0;m<p.length;++m)w[m]=255&p.charCodeAt(m);return w}r("setimmediate"),n.newBlob=function(p,w){n.checkSupport("blob");try{return new Blob([p],{type:w})}catch{try{var m=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return m.append(p),m.getBlob(w)}catch{throw new Error("Bug : can't construct the Blob.")}}};var f={stringifyByChunk:function(p,w,m){var B=[],x=0,E=p.length;if(E<=m)return String.fromCharCode.apply(null,p);for(;x<E;)w==="array"||w==="nodebuffer"?B.push(String.fromCharCode.apply(null,p.slice(x,Math.min(x+m,E)))):B.push(String.fromCharCode.apply(null,p.subarray(x,Math.min(x+m,E)))),x+=m;return B.join("")},stringifyByChar:function(p){for(var w="",m=0;m<p.length;m++)w+=String.fromCharCode(p[m]);return w},applyCanBeUsed:{uint8array:(function(){try{return i.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return i.nodebuffer&&String.fromCharCode.apply(null,a.allocBuffer(1)).length===1}catch{return!1}})()}};function h(p){var w=65536,m=n.getTypeOf(p),B=!0;if(m==="uint8array"?B=f.applyCanBeUsed.uint8array:m==="nodebuffer"&&(B=f.applyCanBeUsed.nodebuffer),B)for(;1<w;)try{return f.stringifyByChunk(p,m,w)}catch{w=Math.floor(w/2)}return f.stringifyByChar(p)}function u(p,w){for(var m=0;m<p.length;m++)w[m]=p[m];return w}n.applyFromCharCode=h;var g={};g.string={string:l,array:function(p){return c(p,new Array(p.length))},arraybuffer:function(p){return g.string.uint8array(p).buffer},uint8array:function(p){return c(p,new Uint8Array(p.length))},nodebuffer:function(p){return c(p,a.allocBuffer(p.length))}},g.array={string:h,array:l,arraybuffer:function(p){return new Uint8Array(p).buffer},uint8array:function(p){return new Uint8Array(p)},nodebuffer:function(p){return a.newBufferFrom(p)}},g.arraybuffer={string:function(p){return h(new Uint8Array(p))},array:function(p){return u(new Uint8Array(p),new Array(p.byteLength))},arraybuffer:l,uint8array:function(p){return new Uint8Array(p)},nodebuffer:function(p){return a.newBufferFrom(new Uint8Array(p))}},g.uint8array={string:h,array:function(p){return u(p,new Array(p.length))},arraybuffer:function(p){return p.buffer},uint8array:l,nodebuffer:function(p){return a.newBufferFrom(p)}},g.nodebuffer={string:h,array:function(p){return u(p,new Array(p.length))},arraybuffer:function(p){return g.nodebuffer.uint8array(p).buffer},uint8array:function(p){return u(p,new Uint8Array(p.length))},nodebuffer:l},n.transformTo=function(p,w){if(w=w||"",!p)return w;n.checkSupport(p);var m=n.getTypeOf(w);return g[m][p](w)},n.resolve=function(p){for(var w=p.split("/"),m=[],B=0;B<w.length;B++){var x=w[B];x==="."||x===""&&B!==0&&B!==w.length-1||(x===".."?m.pop():m.push(x))}return m.join("/")},n.getTypeOf=function(p){return typeof p=="string"?"string":Object.prototype.toString.call(p)==="[object Array]"?"array":i.nodebuffer&&a.isBuffer(p)?"nodebuffer":i.uint8array&&p instanceof Uint8Array?"uint8array":i.arraybuffer&&p instanceof ArrayBuffer?"arraybuffer":void 0},n.checkSupport=function(p){if(!i[p.toLowerCase()])throw new Error(p+" is not supported by this platform")},n.MAX_VALUE_16BITS=65535,n.MAX_VALUE_32BITS=-1,n.pretty=function(p){var w,m,B="";for(m=0;m<(p||"").length;m++)B+="\\x"+((w=p.charCodeAt(m))<16?"0":"")+w.toString(16).toUpperCase();return B},n.delay=function(p,w,m){setImmediate(function(){p.apply(m||null,w||[])})},n.inherits=function(p,w){function m(){}m.prototype=w.prototype,p.prototype=new m},n.extend=function(){var p,w,m={};for(p=0;p<arguments.length;p++)for(w in arguments[p])Object.prototype.hasOwnProperty.call(arguments[p],w)&&m[w]===void 0&&(m[w]=arguments[p][w]);return m},n.prepareContent=function(p,w,m,B,x){return o.Promise.resolve(w).then(function(E){return i.blob&&(E instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(E))!==-1)&&typeof FileReader<"u"?new o.Promise(function(k,H){var K=new FileReader;K.onload=function(R){k(R.target.result)},K.onerror=function(R){H(R.target.error)},K.readAsArrayBuffer(E)}):E}).then(function(E){var k=n.getTypeOf(E);return k?(k==="arraybuffer"?E=n.transformTo("uint8array",E):k==="string"&&(x?E=s.decode(E):m&&B!==!0&&(E=(function(H){return c(H,i.uint8array?new Uint8Array(H.length):new Array(H.length))})(E))),E):o.Promise.reject(new Error("Can't read the data of '"+p+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(r,A,n){var i=r("./reader/readerFor"),s=r("./utils"),a=r("./signature"),o=r("./zipEntry"),l=r("./support");function c(f){this.files=[],this.loadOptions=f}c.prototype={checkSignature:function(f){if(!this.reader.readAndCheckSignature(f)){this.reader.index-=4;var h=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+s.pretty(h)+", expected "+s.pretty(f)+")")}},isSignature:function(f,h){var u=this.reader.index;this.reader.setIndex(f);var g=this.reader.readString(4)===h;return this.reader.setIndex(u),g},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var f=this.reader.readData(this.zipCommentLength),h=l.uint8array?"uint8array":"array",u=s.transformTo(h,f);this.zipComment=this.loadOptions.decodeFileName(u)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var f,h,u,g=this.zip64EndOfCentralSize-44;0<g;)f=this.reader.readInt(2),h=this.reader.readInt(4),u=this.reader.readData(h),this.zip64ExtensibleData[f]={id:f,length:h,value:u}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var f,h;for(f=0;f<this.files.length;f++)h=this.files[f],this.reader.setIndex(h.localHeaderOffset),this.checkSignature(a.LOCAL_FILE_HEADER),h.readLocalPart(this.reader),h.handleUTF8(),h.processAttributes()},readCentralDir:function(){var f;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(a.CENTRAL_FILE_HEADER);)(f=new o({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(f);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var f=this.reader.lastIndexOfSignature(a.CENTRAL_DIRECTORY_END);if(f<0)throw this.isSignature(0,a.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(f);var h=f;if(this.checkSignature(a.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===s.MAX_VALUE_16BITS||this.diskWithCentralDirStart===s.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===s.MAX_VALUE_16BITS||this.centralDirRecords===s.MAX_VALUE_16BITS||this.centralDirSize===s.MAX_VALUE_32BITS||this.centralDirOffset===s.MAX_VALUE_32BITS){if(this.zip64=!0,(f=this.reader.lastIndexOfSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(f),this.checkSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,a.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(a.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(a.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var u=this.centralDirOffset+this.centralDirSize;this.zip64&&(u+=20,u+=12+this.zip64EndOfCentralSize);var g=h-u;if(0<g)this.isSignature(h,a.CENTRAL_FILE_HEADER)||(this.reader.zero=g);else if(g<0)throw new Error("Corrupted zip: missing "+Math.abs(g)+" bytes.")},prepareReader:function(f){this.reader=i(f)},load:function(f){this.prepareReader(f),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},A.exports=c},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(r,A,n){var i=r("./reader/readerFor"),s=r("./utils"),a=r("./compressedObject"),o=r("./crc32"),l=r("./utf8"),c=r("./compressions"),f=r("./support");function h(u,g){this.options=u,this.loadOptions=g}h.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(u){var g,p;if(u.skip(22),this.fileNameLength=u.readInt(2),p=u.readInt(2),this.fileName=u.readData(this.fileNameLength),u.skip(p),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((g=(function(w){for(var m in c)if(Object.prototype.hasOwnProperty.call(c,m)&&c[m].magic===w)return c[m];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+s.pretty(this.compressionMethod)+" unknown (inner file : "+s.transformTo("string",this.fileName)+")");this.decompressed=new a(this.compressedSize,this.uncompressedSize,this.crc32,g,u.readData(this.compressedSize))},readCentralPart:function(u){this.versionMadeBy=u.readInt(2),u.skip(2),this.bitFlag=u.readInt(2),this.compressionMethod=u.readString(2),this.date=u.readDate(),this.crc32=u.readInt(4),this.compressedSize=u.readInt(4),this.uncompressedSize=u.readInt(4);var g=u.readInt(2);if(this.extraFieldsLength=u.readInt(2),this.fileCommentLength=u.readInt(2),this.diskNumberStart=u.readInt(2),this.internalFileAttributes=u.readInt(2),this.externalFileAttributes=u.readInt(4),this.localHeaderOffset=u.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");u.skip(g),this.readExtraFields(u),this.parseZIP64ExtraField(u),this.fileComment=u.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var u=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),u==0&&(this.dosPermissions=63&this.externalFileAttributes),u==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var u=i(this.extraFields[1].value);this.uncompressedSize===s.MAX_VALUE_32BITS&&(this.uncompressedSize=u.readInt(8)),this.compressedSize===s.MAX_VALUE_32BITS&&(this.compressedSize=u.readInt(8)),this.localHeaderOffset===s.MAX_VALUE_32BITS&&(this.localHeaderOffset=u.readInt(8)),this.diskNumberStart===s.MAX_VALUE_32BITS&&(this.diskNumberStart=u.readInt(4))}},readExtraFields:function(u){var g,p,w,m=u.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});u.index+4<m;)g=u.readInt(2),p=u.readInt(2),w=u.readData(p),this.extraFields[g]={id:g,length:p,value:w};u.setIndex(m)},handleUTF8:function(){var u=f.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=l.utf8decode(this.fileName),this.fileCommentStr=l.utf8decode(this.fileComment);else{var g=this.findExtraFieldUnicodePath();if(g!==null)this.fileNameStr=g;else{var p=s.transformTo(u,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(p)}var w=this.findExtraFieldUnicodeComment();if(w!==null)this.fileCommentStr=w;else{var m=s.transformTo(u,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(m)}}},findExtraFieldUnicodePath:function(){var u=this.extraFields[28789];if(u){var g=i(u.value);return g.readInt(1)!==1||o(this.fileName)!==g.readInt(4)?null:l.utf8decode(g.readData(u.length-5))}return null},findExtraFieldUnicodeComment:function(){var u=this.extraFields[25461];if(u){var g=i(u.value);return g.readInt(1)!==1||o(this.fileComment)!==g.readInt(4)?null:l.utf8decode(g.readData(u.length-5))}return null}},A.exports=h},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(r,A,n){function i(g,p,w){this.name=g,this.dir=w.dir,this.date=w.date,this.comment=w.comment,this.unixPermissions=w.unixPermissions,this.dosPermissions=w.dosPermissions,this._data=p,this._dataBinary=w.binary,this.options={compression:w.compression,compressionOptions:w.compressionOptions}}var s=r("./stream/StreamHelper"),a=r("./stream/DataWorker"),o=r("./utf8"),l=r("./compressedObject"),c=r("./stream/GenericWorker");i.prototype={internalStream:function(g){var p=null,w="string";try{if(!g)throw new Error("No output type specified.");var m=(w=g.toLowerCase())==="string"||w==="text";w!=="binarystring"&&w!=="text"||(w="string"),p=this._decompressWorker();var B=!this._dataBinary;B&&!m&&(p=p.pipe(new o.Utf8EncodeWorker)),!B&&m&&(p=p.pipe(new o.Utf8DecodeWorker))}catch(x){(p=new c("error")).error(x)}return new s(p,w,"")},async:function(g,p){return this.internalStream(g).accumulate(p)},nodeStream:function(g,p){return this.internalStream(g||"nodebuffer").toNodejsStream(p)},_compressWorker:function(g,p){if(this._data instanceof l&&this._data.compression.magic===g.magic)return this._data.getCompressedWorker();var w=this._decompressWorker();return this._dataBinary||(w=w.pipe(new o.Utf8EncodeWorker)),l.createWorkerFrom(w,g,p)},_decompressWorker:function(){return this._data instanceof l?this._data.getContentWorker():this._data instanceof c?this._data:new a(this._data)}};for(var f=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],h=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},u=0;u<f.length;u++)i.prototype[f[u]]=h;A.exports=i},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(r,A,n){(function(i){var s,a,o=i.MutationObserver||i.WebKitMutationObserver;if(o){var l=0,c=new o(g),f=i.document.createTextNode("");c.observe(f,{characterData:!0}),s=function(){f.data=l=++l%2}}else if(i.setImmediate||i.MessageChannel===void 0)s="document"in i&&"onreadystatechange"in i.document.createElement("script")?function(){var p=i.document.createElement("script");p.onreadystatechange=function(){g(),p.onreadystatechange=null,p.parentNode.removeChild(p),p=null},i.document.documentElement.appendChild(p)}:function(){setTimeout(g,0)};else{var h=new i.MessageChannel;h.port1.onmessage=g,s=function(){h.port2.postMessage(0)}}var u=[];function g(){var p,w;a=!0;for(var m=u.length;m;){for(w=u,u=[],p=-1;++p<m;)w[p]();m=u.length}a=!1}A.exports=function(p){u.push(p)!==1||a||s()}}).call(this,typeof ss<"u"?ss:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(r,A,n){var i=r("immediate");function s(){}var a={},o=["REJECTED"],l=["FULFILLED"],c=["PENDING"];function f(m){if(typeof m!="function")throw new TypeError("resolver must be a function");this.state=c,this.queue=[],this.outcome=void 0,m!==s&&p(this,m)}function h(m,B,x){this.promise=m,typeof B=="function"&&(this.onFulfilled=B,this.callFulfilled=this.otherCallFulfilled),typeof x=="function"&&(this.onRejected=x,this.callRejected=this.otherCallRejected)}function u(m,B,x){i(function(){var E;try{E=B(x)}catch(k){return a.reject(m,k)}E===m?a.reject(m,new TypeError("Cannot resolve promise with itself")):a.resolve(m,E)})}function g(m){var B=m&&m.then;if(m&&(typeof m=="object"||typeof m=="function")&&typeof B=="function")return function(){B.apply(m,arguments)}}function p(m,B){var x=!1;function E(K){x||(x=!0,a.reject(m,K))}function k(K){x||(x=!0,a.resolve(m,K))}var H=w(function(){B(k,E)});H.status==="error"&&E(H.value)}function w(m,B){var x={};try{x.value=m(B),x.status="success"}catch(E){x.status="error",x.value=E}return x}(A.exports=f).prototype.finally=function(m){if(typeof m!="function")return this;var B=this.constructor;return this.then(function(x){return B.resolve(m()).then(function(){return x})},function(x){return B.resolve(m()).then(function(){throw x})})},f.prototype.catch=function(m){return this.then(null,m)},f.prototype.then=function(m,B){if(typeof m!="function"&&this.state===l||typeof B!="function"&&this.state===o)return this;var x=new this.constructor(s);return this.state!==c?u(x,this.state===l?m:B,this.outcome):this.queue.push(new h(x,m,B)),x},h.prototype.callFulfilled=function(m){a.resolve(this.promise,m)},h.prototype.otherCallFulfilled=function(m){u(this.promise,this.onFulfilled,m)},h.prototype.callRejected=function(m){a.reject(this.promise,m)},h.prototype.otherCallRejected=function(m){u(this.promise,this.onRejected,m)},a.resolve=function(m,B){var x=w(g,B);if(x.status==="error")return a.reject(m,x.value);var E=x.value;if(E)p(m,E);else{m.state=l,m.outcome=B;for(var k=-1,H=m.queue.length;++k<H;)m.queue[k].callFulfilled(B)}return m},a.reject=function(m,B){m.state=o,m.outcome=B;for(var x=-1,E=m.queue.length;++x<E;)m.queue[x].callRejected(B);return m},f.resolve=function(m){return m instanceof this?m:a.resolve(new this(s),m)},f.reject=function(m){var B=new this(s);return a.reject(B,m)},f.all=function(m){var B=this;if(Object.prototype.toString.call(m)!=="[object Array]")return this.reject(new TypeError("must be an array"));var x=m.length,E=!1;if(!x)return this.resolve([]);for(var k=new Array(x),H=0,K=-1,R=new this(s);++K<x;)I(m[K],K);return R;function I(W,L){B.resolve(W).then(function(F){k[L]=F,++H!==x||E||(E=!0,a.resolve(R,k))},function(F){E||(E=!0,a.reject(R,F))})}},f.race=function(m){var B=this;if(Object.prototype.toString.call(m)!=="[object Array]")return this.reject(new TypeError("must be an array"));var x=m.length,E=!1;if(!x)return this.resolve([]);for(var k=-1,H=new this(s);++k<x;)K=m[k],B.resolve(K).then(function(R){E||(E=!0,a.resolve(H,R))},function(R){E||(E=!0,a.reject(H,R))});var K;return H}},{immediate:36}],38:[function(r,A,n){var i={};(0,r("./lib/utils/common").assign)(i,r("./lib/deflate"),r("./lib/inflate"),r("./lib/zlib/constants")),A.exports=i},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(r,A,n){var i=r("./zlib/deflate"),s=r("./utils/common"),a=r("./utils/strings"),o=r("./zlib/messages"),l=r("./zlib/zstream"),c=Object.prototype.toString,f=0,h=-1,u=0,g=8;function p(m){if(!(this instanceof p))return new p(m);this.options=s.assign({level:h,method:g,chunkSize:16384,windowBits:15,memLevel:8,strategy:u,to:""},m||{});var B=this.options;B.raw&&0<B.windowBits?B.windowBits=-B.windowBits:B.gzip&&0<B.windowBits&&B.windowBits<16&&(B.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var x=i.deflateInit2(this.strm,B.level,B.method,B.windowBits,B.memLevel,B.strategy);if(x!==f)throw new Error(o[x]);if(B.header&&i.deflateSetHeader(this.strm,B.header),B.dictionary){var E;if(E=typeof B.dictionary=="string"?a.string2buf(B.dictionary):c.call(B.dictionary)==="[object ArrayBuffer]"?new Uint8Array(B.dictionary):B.dictionary,(x=i.deflateSetDictionary(this.strm,E))!==f)throw new Error(o[x]);this._dict_set=!0}}function w(m,B){var x=new p(B);if(x.push(m,!0),x.err)throw x.msg||o[x.err];return x.result}p.prototype.push=function(m,B){var x,E,k=this.strm,H=this.options.chunkSize;if(this.ended)return!1;E=B===~~B?B:B===!0?4:0,typeof m=="string"?k.input=a.string2buf(m):c.call(m)==="[object ArrayBuffer]"?k.input=new Uint8Array(m):k.input=m,k.next_in=0,k.avail_in=k.input.length;do{if(k.avail_out===0&&(k.output=new s.Buf8(H),k.next_out=0,k.avail_out=H),(x=i.deflate(k,E))!==1&&x!==f)return this.onEnd(x),!(this.ended=!0);k.avail_out!==0&&(k.avail_in!==0||E!==4&&E!==2)||(this.options.to==="string"?this.onData(a.buf2binstring(s.shrinkBuf(k.output,k.next_out))):this.onData(s.shrinkBuf(k.output,k.next_out)))}while((0<k.avail_in||k.avail_out===0)&&x!==1);return E===4?(x=i.deflateEnd(this.strm),this.onEnd(x),this.ended=!0,x===f):E!==2||(this.onEnd(f),!(k.avail_out=0))},p.prototype.onData=function(m){this.chunks.push(m)},p.prototype.onEnd=function(m){m===f&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=s.flattenChunks(this.chunks)),this.chunks=[],this.err=m,this.msg=this.strm.msg},n.Deflate=p,n.deflate=w,n.deflateRaw=function(m,B){return(B=B||{}).raw=!0,w(m,B)},n.gzip=function(m,B){return(B=B||{}).gzip=!0,w(m,B)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(r,A,n){var i=r("./zlib/inflate"),s=r("./utils/common"),a=r("./utils/strings"),o=r("./zlib/constants"),l=r("./zlib/messages"),c=r("./zlib/zstream"),f=r("./zlib/gzheader"),h=Object.prototype.toString;function u(p){if(!(this instanceof u))return new u(p);this.options=s.assign({chunkSize:16384,windowBits:0,to:""},p||{});var w=this.options;w.raw&&0<=w.windowBits&&w.windowBits<16&&(w.windowBits=-w.windowBits,w.windowBits===0&&(w.windowBits=-15)),!(0<=w.windowBits&&w.windowBits<16)||p&&p.windowBits||(w.windowBits+=32),15<w.windowBits&&w.windowBits<48&&(15&w.windowBits)==0&&(w.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new c,this.strm.avail_out=0;var m=i.inflateInit2(this.strm,w.windowBits);if(m!==o.Z_OK)throw new Error(l[m]);this.header=new f,i.inflateGetHeader(this.strm,this.header)}function g(p,w){var m=new u(w);if(m.push(p,!0),m.err)throw m.msg||l[m.err];return m.result}u.prototype.push=function(p,w){var m,B,x,E,k,H,K=this.strm,R=this.options.chunkSize,I=this.options.dictionary,W=!1;if(this.ended)return!1;B=w===~~w?w:w===!0?o.Z_FINISH:o.Z_NO_FLUSH,typeof p=="string"?K.input=a.binstring2buf(p):h.call(p)==="[object ArrayBuffer]"?K.input=new Uint8Array(p):K.input=p,K.next_in=0,K.avail_in=K.input.length;do{if(K.avail_out===0&&(K.output=new s.Buf8(R),K.next_out=0,K.avail_out=R),(m=i.inflate(K,o.Z_NO_FLUSH))===o.Z_NEED_DICT&&I&&(H=typeof I=="string"?a.string2buf(I):h.call(I)==="[object ArrayBuffer]"?new Uint8Array(I):I,m=i.inflateSetDictionary(this.strm,H)),m===o.Z_BUF_ERROR&&W===!0&&(m=o.Z_OK,W=!1),m!==o.Z_STREAM_END&&m!==o.Z_OK)return this.onEnd(m),!(this.ended=!0);K.next_out&&(K.avail_out!==0&&m!==o.Z_STREAM_END&&(K.avail_in!==0||B!==o.Z_FINISH&&B!==o.Z_SYNC_FLUSH)||(this.options.to==="string"?(x=a.utf8border(K.output,K.next_out),E=K.next_out-x,k=a.buf2string(K.output,x),K.next_out=E,K.avail_out=R-E,E&&s.arraySet(K.output,K.output,x,E,0),this.onData(k)):this.onData(s.shrinkBuf(K.output,K.next_out)))),K.avail_in===0&&K.avail_out===0&&(W=!0)}while((0<K.avail_in||K.avail_out===0)&&m!==o.Z_STREAM_END);return m===o.Z_STREAM_END&&(B=o.Z_FINISH),B===o.Z_FINISH?(m=i.inflateEnd(this.strm),this.onEnd(m),this.ended=!0,m===o.Z_OK):B!==o.Z_SYNC_FLUSH||(this.onEnd(o.Z_OK),!(K.avail_out=0))},u.prototype.onData=function(p){this.chunks.push(p)},u.prototype.onEnd=function(p){p===o.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=s.flattenChunks(this.chunks)),this.chunks=[],this.err=p,this.msg=this.strm.msg},n.Inflate=u,n.inflate=g,n.inflateRaw=function(p,w){return(w=w||{}).raw=!0,g(p,w)},n.ungzip=g},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(r,A,n){var i=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";n.assign=function(o){for(var l=Array.prototype.slice.call(arguments,1);l.length;){var c=l.shift();if(c){if(typeof c!="object")throw new TypeError(c+"must be non-object");for(var f in c)c.hasOwnProperty(f)&&(o[f]=c[f])}}return o},n.shrinkBuf=function(o,l){return o.length===l?o:o.subarray?o.subarray(0,l):(o.length=l,o)};var s={arraySet:function(o,l,c,f,h){if(l.subarray&&o.subarray)o.set(l.subarray(c,c+f),h);else for(var u=0;u<f;u++)o[h+u]=l[c+u]},flattenChunks:function(o){var l,c,f,h,u,g;for(l=f=0,c=o.length;l<c;l++)f+=o[l].length;for(g=new Uint8Array(f),l=h=0,c=o.length;l<c;l++)u=o[l],g.set(u,h),h+=u.length;return g}},a={arraySet:function(o,l,c,f,h){for(var u=0;u<f;u++)o[h+u]=l[c+u]},flattenChunks:function(o){return[].concat.apply([],o)}};n.setTyped=function(o){o?(n.Buf8=Uint8Array,n.Buf16=Uint16Array,n.Buf32=Int32Array,n.assign(n,s)):(n.Buf8=Array,n.Buf16=Array,n.Buf32=Array,n.assign(n,a))},n.setTyped(i)},{}],42:[function(r,A,n){var i=r("./common"),s=!0,a=!0;try{String.fromCharCode.apply(null,[0])}catch{s=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{a=!1}for(var o=new i.Buf8(256),l=0;l<256;l++)o[l]=252<=l?6:248<=l?5:240<=l?4:224<=l?3:192<=l?2:1;function c(f,h){if(h<65537&&(f.subarray&&a||!f.subarray&&s))return String.fromCharCode.apply(null,i.shrinkBuf(f,h));for(var u="",g=0;g<h;g++)u+=String.fromCharCode(f[g]);return u}o[254]=o[254]=1,n.string2buf=function(f){var h,u,g,p,w,m=f.length,B=0;for(p=0;p<m;p++)(64512&(u=f.charCodeAt(p)))==55296&&p+1<m&&(64512&(g=f.charCodeAt(p+1)))==56320&&(u=65536+(u-55296<<10)+(g-56320),p++),B+=u<128?1:u<2048?2:u<65536?3:4;for(h=new i.Buf8(B),p=w=0;w<B;p++)(64512&(u=f.charCodeAt(p)))==55296&&p+1<m&&(64512&(g=f.charCodeAt(p+1)))==56320&&(u=65536+(u-55296<<10)+(g-56320),p++),u<128?h[w++]=u:(u<2048?h[w++]=192|u>>>6:(u<65536?h[w++]=224|u>>>12:(h[w++]=240|u>>>18,h[w++]=128|u>>>12&63),h[w++]=128|u>>>6&63),h[w++]=128|63&u);return h},n.buf2binstring=function(f){return c(f,f.length)},n.binstring2buf=function(f){for(var h=new i.Buf8(f.length),u=0,g=h.length;u<g;u++)h[u]=f.charCodeAt(u);return h},n.buf2string=function(f,h){var u,g,p,w,m=h||f.length,B=new Array(2*m);for(u=g=0;u<m;)if((p=f[u++])<128)B[g++]=p;else if(4<(w=o[p]))B[g++]=65533,u+=w-1;else{for(p&=w===2?31:w===3?15:7;1<w&&u<m;)p=p<<6|63&f[u++],w--;1<w?B[g++]=65533:p<65536?B[g++]=p:(p-=65536,B[g++]=55296|p>>10&1023,B[g++]=56320|1023&p)}return c(B,g)},n.utf8border=function(f,h){var u;for((h=h||f.length)>f.length&&(h=f.length),u=h-1;0<=u&&(192&f[u])==128;)u--;return u<0||u===0?h:u+o[f[u]]>h?u:h}},{"./common":41}],43:[function(r,A,n){A.exports=function(i,s,a,o){for(var l=65535&i|0,c=i>>>16&65535|0,f=0;a!==0;){for(a-=f=2e3<a?2e3:a;c=c+(l=l+s[o++]|0)|0,--f;);l%=65521,c%=65521}return l|c<<16|0}},{}],44:[function(r,A,n){A.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(r,A,n){var i=(function(){for(var s,a=[],o=0;o<256;o++){s=o;for(var l=0;l<8;l++)s=1&s?3988292384^s>>>1:s>>>1;a[o]=s}return a})();A.exports=function(s,a,o,l){var c=i,f=l+o;s^=-1;for(var h=l;h<f;h++)s=s>>>8^c[255&(s^a[h])];return-1^s}},{}],46:[function(r,A,n){var i,s=r("../utils/common"),a=r("./trees"),o=r("./adler32"),l=r("./crc32"),c=r("./messages"),f=0,h=4,u=0,g=-2,p=-1,w=4,m=2,B=8,x=9,E=286,k=30,H=19,K=2*E+1,R=15,I=3,W=258,L=W+I+1,F=42,M=113,b=1,Y=2,ce=3,ee=4;function le(Q,N){return Q.msg=c[N],N}function Ae(Q){return(Q<<1)-(4<Q?9:0)}function te(Q){for(var N=Q.length;0<=--N;)Q[N]=0}function T(Q){var N=Q.state,ue=N.pending;ue>Q.avail_out&&(ue=Q.avail_out),ue!==0&&(s.arraySet(Q.output,N.pending_buf,N.pending_out,ue,Q.next_out),Q.next_out+=ue,N.pending_out+=ue,Q.total_out+=ue,Q.avail_out-=ue,N.pending-=ue,N.pending===0&&(N.pending_out=0))}function S(Q,N){a._tr_flush_block(Q,0<=Q.block_start?Q.block_start:-1,Q.strstart-Q.block_start,N),Q.block_start=Q.strstart,T(Q.strm)}function O(Q,N){Q.pending_buf[Q.pending++]=N}function P(Q,N){Q.pending_buf[Q.pending++]=N>>>8&255,Q.pending_buf[Q.pending++]=255&N}function z(Q,N){var ue,J,q=Q.max_chain_length,ne=Q.strstart,xe=Q.prev_length,ye=Q.nice_match,he=Q.strstart>Q.w_size-L?Q.strstart-(Q.w_size-L):0,Se=Q.window,ve=Q.w_mask,Ce=Q.prev,Le=Q.strstart+W,Ge=Se[ne+xe-1],Ke=Se[ne+xe];Q.prev_length>=Q.good_match&&(q>>=2),ye>Q.lookahead&&(ye=Q.lookahead);do if(Se[(ue=N)+xe]===Ke&&Se[ue+xe-1]===Ge&&Se[ue]===Se[ne]&&Se[++ue]===Se[ne+1]){ne+=2,ue++;do;while(Se[++ne]===Se[++ue]&&Se[++ne]===Se[++ue]&&Se[++ne]===Se[++ue]&&Se[++ne]===Se[++ue]&&Se[++ne]===Se[++ue]&&Se[++ne]===Se[++ue]&&Se[++ne]===Se[++ue]&&Se[++ne]===Se[++ue]&&ne<Le);if(J=W-(Le-ne),ne=Le-W,xe<J){if(Q.match_start=N,ye<=(xe=J))break;Ge=Se[ne+xe-1],Ke=Se[ne+xe]}}while((N=Ce[N&ve])>he&&--q!=0);return xe<=Q.lookahead?xe:Q.lookahead}function ie(Q){var N,ue,J,q,ne,xe,ye,he,Se,ve,Ce=Q.w_size;do{if(q=Q.window_size-Q.lookahead-Q.strstart,Q.strstart>=Ce+(Ce-L)){for(s.arraySet(Q.window,Q.window,Ce,Ce,0),Q.match_start-=Ce,Q.strstart-=Ce,Q.block_start-=Ce,N=ue=Q.hash_size;J=Q.head[--N],Q.head[N]=Ce<=J?J-Ce:0,--ue;);for(N=ue=Ce;J=Q.prev[--N],Q.prev[N]=Ce<=J?J-Ce:0,--ue;);q+=Ce}if(Q.strm.avail_in===0)break;if(xe=Q.strm,ye=Q.window,he=Q.strstart+Q.lookahead,Se=q,ve=void 0,ve=xe.avail_in,Se<ve&&(ve=Se),ue=ve===0?0:(xe.avail_in-=ve,s.arraySet(ye,xe.input,xe.next_in,ve,he),xe.state.wrap===1?xe.adler=o(xe.adler,ye,ve,he):xe.state.wrap===2&&(xe.adler=l(xe.adler,ye,ve,he)),xe.next_in+=ve,xe.total_in+=ve,ve),Q.lookahead+=ue,Q.lookahead+Q.insert>=I)for(ne=Q.strstart-Q.insert,Q.ins_h=Q.window[ne],Q.ins_h=(Q.ins_h<<Q.hash_shift^Q.window[ne+1])&Q.hash_mask;Q.insert&&(Q.ins_h=(Q.ins_h<<Q.hash_shift^Q.window[ne+I-1])&Q.hash_mask,Q.prev[ne&Q.w_mask]=Q.head[Q.ins_h],Q.head[Q.ins_h]=ne,ne++,Q.insert--,!(Q.lookahead+Q.insert<I)););}while(Q.lookahead<L&&Q.strm.avail_in!==0)}function fe(Q,N){for(var ue,J;;){if(Q.lookahead<L){if(ie(Q),Q.lookahead<L&&N===f)return b;if(Q.lookahead===0)break}if(ue=0,Q.lookahead>=I&&(Q.ins_h=(Q.ins_h<<Q.hash_shift^Q.window[Q.strstart+I-1])&Q.hash_mask,ue=Q.prev[Q.strstart&Q.w_mask]=Q.head[Q.ins_h],Q.head[Q.ins_h]=Q.strstart),ue!==0&&Q.strstart-ue<=Q.w_size-L&&(Q.match_length=z(Q,ue)),Q.match_length>=I)if(J=a._tr_tally(Q,Q.strstart-Q.match_start,Q.match_length-I),Q.lookahead-=Q.match_length,Q.match_length<=Q.max_lazy_match&&Q.lookahead>=I){for(Q.match_length--;Q.strstart++,Q.ins_h=(Q.ins_h<<Q.hash_shift^Q.window[Q.strstart+I-1])&Q.hash_mask,ue=Q.prev[Q.strstart&Q.w_mask]=Q.head[Q.ins_h],Q.head[Q.ins_h]=Q.strstart,--Q.match_length!=0;);Q.strstart++}else Q.strstart+=Q.match_length,Q.match_length=0,Q.ins_h=Q.window[Q.strstart],Q.ins_h=(Q.ins_h<<Q.hash_shift^Q.window[Q.strstart+1])&Q.hash_mask;else J=a._tr_tally(Q,0,Q.window[Q.strstart]),Q.lookahead--,Q.strstart++;if(J&&(S(Q,!1),Q.strm.avail_out===0))return b}return Q.insert=Q.strstart<I-1?Q.strstart:I-1,N===h?(S(Q,!0),Q.strm.avail_out===0?ce:ee):Q.last_lit&&(S(Q,!1),Q.strm.avail_out===0)?b:Y}function Z(Q,N){for(var ue,J,q;;){if(Q.lookahead<L){if(ie(Q),Q.lookahead<L&&N===f)return b;if(Q.lookahead===0)break}if(ue=0,Q.lookahead>=I&&(Q.ins_h=(Q.ins_h<<Q.hash_shift^Q.window[Q.strstart+I-1])&Q.hash_mask,ue=Q.prev[Q.strstart&Q.w_mask]=Q.head[Q.ins_h],Q.head[Q.ins_h]=Q.strstart),Q.prev_length=Q.match_length,Q.prev_match=Q.match_start,Q.match_length=I-1,ue!==0&&Q.prev_length<Q.max_lazy_match&&Q.strstart-ue<=Q.w_size-L&&(Q.match_length=z(Q,ue),Q.match_length<=5&&(Q.strategy===1||Q.match_length===I&&4096<Q.strstart-Q.match_start)&&(Q.match_length=I-1)),Q.prev_length>=I&&Q.match_length<=Q.prev_length){for(q=Q.strstart+Q.lookahead-I,J=a._tr_tally(Q,Q.strstart-1-Q.prev_match,Q.prev_length-I),Q.lookahead-=Q.prev_length-1,Q.prev_length-=2;++Q.strstart<=q&&(Q.ins_h=(Q.ins_h<<Q.hash_shift^Q.window[Q.strstart+I-1])&Q.hash_mask,ue=Q.prev[Q.strstart&Q.w_mask]=Q.head[Q.ins_h],Q.head[Q.ins_h]=Q.strstart),--Q.prev_length!=0;);if(Q.match_available=0,Q.match_length=I-1,Q.strstart++,J&&(S(Q,!1),Q.strm.avail_out===0))return b}else if(Q.match_available){if((J=a._tr_tally(Q,0,Q.window[Q.strstart-1]))&&S(Q,!1),Q.strstart++,Q.lookahead--,Q.strm.avail_out===0)return b}else Q.match_available=1,Q.strstart++,Q.lookahead--}return Q.match_available&&(J=a._tr_tally(Q,0,Q.window[Q.strstart-1]),Q.match_available=0),Q.insert=Q.strstart<I-1?Q.strstart:I-1,N===h?(S(Q,!0),Q.strm.avail_out===0?ce:ee):Q.last_lit&&(S(Q,!1),Q.strm.avail_out===0)?b:Y}function pe(Q,N,ue,J,q){this.good_length=Q,this.max_lazy=N,this.nice_length=ue,this.max_chain=J,this.func=q}function we(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=B,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new s.Buf16(2*K),this.dyn_dtree=new s.Buf16(2*(2*k+1)),this.bl_tree=new s.Buf16(2*(2*H+1)),te(this.dyn_ltree),te(this.dyn_dtree),te(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new s.Buf16(R+1),this.heap=new s.Buf16(2*E+1),te(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new s.Buf16(2*E+1),te(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function be(Q){var N;return Q&&Q.state?(Q.total_in=Q.total_out=0,Q.data_type=m,(N=Q.state).pending=0,N.pending_out=0,N.wrap<0&&(N.wrap=-N.wrap),N.status=N.wrap?F:M,Q.adler=N.wrap===2?0:1,N.last_flush=f,a._tr_init(N),u):le(Q,g)}function je(Q){var N=be(Q);return N===u&&(function(ue){ue.window_size=2*ue.w_size,te(ue.head),ue.max_lazy_match=i[ue.level].max_lazy,ue.good_match=i[ue.level].good_length,ue.nice_match=i[ue.level].nice_length,ue.max_chain_length=i[ue.level].max_chain,ue.strstart=0,ue.block_start=0,ue.lookahead=0,ue.insert=0,ue.match_length=ue.prev_length=I-1,ue.match_available=0,ue.ins_h=0})(Q.state),N}function Te(Q,N,ue,J,q,ne){if(!Q)return g;var xe=1;if(N===p&&(N=6),J<0?(xe=0,J=-J):15<J&&(xe=2,J-=16),q<1||x<q||ue!==B||J<8||15<J||N<0||9<N||ne<0||w<ne)return le(Q,g);J===8&&(J=9);var ye=new we;return(Q.state=ye).strm=Q,ye.wrap=xe,ye.gzhead=null,ye.w_bits=J,ye.w_size=1<<ye.w_bits,ye.w_mask=ye.w_size-1,ye.hash_bits=q+7,ye.hash_size=1<<ye.hash_bits,ye.hash_mask=ye.hash_size-1,ye.hash_shift=~~((ye.hash_bits+I-1)/I),ye.window=new s.Buf8(2*ye.w_size),ye.head=new s.Buf16(ye.hash_size),ye.prev=new s.Buf16(ye.w_size),ye.lit_bufsize=1<<q+6,ye.pending_buf_size=4*ye.lit_bufsize,ye.pending_buf=new s.Buf8(ye.pending_buf_size),ye.d_buf=1*ye.lit_bufsize,ye.l_buf=3*ye.lit_bufsize,ye.level=N,ye.strategy=ne,ye.method=ue,je(Q)}i=[new pe(0,0,0,0,function(Q,N){var ue=65535;for(ue>Q.pending_buf_size-5&&(ue=Q.pending_buf_size-5);;){if(Q.lookahead<=1){if(ie(Q),Q.lookahead===0&&N===f)return b;if(Q.lookahead===0)break}Q.strstart+=Q.lookahead,Q.lookahead=0;var J=Q.block_start+ue;if((Q.strstart===0||Q.strstart>=J)&&(Q.lookahead=Q.strstart-J,Q.strstart=J,S(Q,!1),Q.strm.avail_out===0)||Q.strstart-Q.block_start>=Q.w_size-L&&(S(Q,!1),Q.strm.avail_out===0))return b}return Q.insert=0,N===h?(S(Q,!0),Q.strm.avail_out===0?ce:ee):(Q.strstart>Q.block_start&&(S(Q,!1),Q.strm.avail_out),b)}),new pe(4,4,8,4,fe),new pe(4,5,16,8,fe),new pe(4,6,32,32,fe),new pe(4,4,16,16,Z),new pe(8,16,32,32,Z),new pe(8,16,128,128,Z),new pe(8,32,128,256,Z),new pe(32,128,258,1024,Z),new pe(32,258,258,4096,Z)],n.deflateInit=function(Q,N){return Te(Q,N,B,15,8,0)},n.deflateInit2=Te,n.deflateReset=je,n.deflateResetKeep=be,n.deflateSetHeader=function(Q,N){return Q&&Q.state?Q.state.wrap!==2?g:(Q.state.gzhead=N,u):g},n.deflate=function(Q,N){var ue,J,q,ne;if(!Q||!Q.state||5<N||N<0)return Q?le(Q,g):g;if(J=Q.state,!Q.output||!Q.input&&Q.avail_in!==0||J.status===666&&N!==h)return le(Q,Q.avail_out===0?-5:g);if(J.strm=Q,ue=J.last_flush,J.last_flush=N,J.status===F)if(J.wrap===2)Q.adler=0,O(J,31),O(J,139),O(J,8),J.gzhead?(O(J,(J.gzhead.text?1:0)+(J.gzhead.hcrc?2:0)+(J.gzhead.extra?4:0)+(J.gzhead.name?8:0)+(J.gzhead.comment?16:0)),O(J,255&J.gzhead.time),O(J,J.gzhead.time>>8&255),O(J,J.gzhead.time>>16&255),O(J,J.gzhead.time>>24&255),O(J,J.level===9?2:2<=J.strategy||J.level<2?4:0),O(J,255&J.gzhead.os),J.gzhead.extra&&J.gzhead.extra.length&&(O(J,255&J.gzhead.extra.length),O(J,J.gzhead.extra.length>>8&255)),J.gzhead.hcrc&&(Q.adler=l(Q.adler,J.pending_buf,J.pending,0)),J.gzindex=0,J.status=69):(O(J,0),O(J,0),O(J,0),O(J,0),O(J,0),O(J,J.level===9?2:2<=J.strategy||J.level<2?4:0),O(J,3),J.status=M);else{var xe=B+(J.w_bits-8<<4)<<8;xe|=(2<=J.strategy||J.level<2?0:J.level<6?1:J.level===6?2:3)<<6,J.strstart!==0&&(xe|=32),xe+=31-xe%31,J.status=M,P(J,xe),J.strstart!==0&&(P(J,Q.adler>>>16),P(J,65535&Q.adler)),Q.adler=1}if(J.status===69)if(J.gzhead.extra){for(q=J.pending;J.gzindex<(65535&J.gzhead.extra.length)&&(J.pending!==J.pending_buf_size||(J.gzhead.hcrc&&J.pending>q&&(Q.adler=l(Q.adler,J.pending_buf,J.pending-q,q)),T(Q),q=J.pending,J.pending!==J.pending_buf_size));)O(J,255&J.gzhead.extra[J.gzindex]),J.gzindex++;J.gzhead.hcrc&&J.pending>q&&(Q.adler=l(Q.adler,J.pending_buf,J.pending-q,q)),J.gzindex===J.gzhead.extra.length&&(J.gzindex=0,J.status=73)}else J.status=73;if(J.status===73)if(J.gzhead.name){q=J.pending;do{if(J.pending===J.pending_buf_size&&(J.gzhead.hcrc&&J.pending>q&&(Q.adler=l(Q.adler,J.pending_buf,J.pending-q,q)),T(Q),q=J.pending,J.pending===J.pending_buf_size)){ne=1;break}ne=J.gzindex<J.gzhead.name.length?255&J.gzhead.name.charCodeAt(J.gzindex++):0,O(J,ne)}while(ne!==0);J.gzhead.hcrc&&J.pending>q&&(Q.adler=l(Q.adler,J.pending_buf,J.pending-q,q)),ne===0&&(J.gzindex=0,J.status=91)}else J.status=91;if(J.status===91)if(J.gzhead.comment){q=J.pending;do{if(J.pending===J.pending_buf_size&&(J.gzhead.hcrc&&J.pending>q&&(Q.adler=l(Q.adler,J.pending_buf,J.pending-q,q)),T(Q),q=J.pending,J.pending===J.pending_buf_size)){ne=1;break}ne=J.gzindex<J.gzhead.comment.length?255&J.gzhead.comment.charCodeAt(J.gzindex++):0,O(J,ne)}while(ne!==0);J.gzhead.hcrc&&J.pending>q&&(Q.adler=l(Q.adler,J.pending_buf,J.pending-q,q)),ne===0&&(J.status=103)}else J.status=103;if(J.status===103&&(J.gzhead.hcrc?(J.pending+2>J.pending_buf_size&&T(Q),J.pending+2<=J.pending_buf_size&&(O(J,255&Q.adler),O(J,Q.adler>>8&255),Q.adler=0,J.status=M)):J.status=M),J.pending!==0){if(T(Q),Q.avail_out===0)return J.last_flush=-1,u}else if(Q.avail_in===0&&Ae(N)<=Ae(ue)&&N!==h)return le(Q,-5);if(J.status===666&&Q.avail_in!==0)return le(Q,-5);if(Q.avail_in!==0||J.lookahead!==0||N!==f&&J.status!==666){var ye=J.strategy===2?(function(he,Se){for(var ve;;){if(he.lookahead===0&&(ie(he),he.lookahead===0)){if(Se===f)return b;break}if(he.match_length=0,ve=a._tr_tally(he,0,he.window[he.strstart]),he.lookahead--,he.strstart++,ve&&(S(he,!1),he.strm.avail_out===0))return b}return he.insert=0,Se===h?(S(he,!0),he.strm.avail_out===0?ce:ee):he.last_lit&&(S(he,!1),he.strm.avail_out===0)?b:Y})(J,N):J.strategy===3?(function(he,Se){for(var ve,Ce,Le,Ge,Ke=he.window;;){if(he.lookahead<=W){if(ie(he),he.lookahead<=W&&Se===f)return b;if(he.lookahead===0)break}if(he.match_length=0,he.lookahead>=I&&0<he.strstart&&(Ce=Ke[Le=he.strstart-1])===Ke[++Le]&&Ce===Ke[++Le]&&Ce===Ke[++Le]){Ge=he.strstart+W;do;while(Ce===Ke[++Le]&&Ce===Ke[++Le]&&Ce===Ke[++Le]&&Ce===Ke[++Le]&&Ce===Ke[++Le]&&Ce===Ke[++Le]&&Ce===Ke[++Le]&&Ce===Ke[++Le]&&Le<Ge);he.match_length=W-(Ge-Le),he.match_length>he.lookahead&&(he.match_length=he.lookahead)}if(he.match_length>=I?(ve=a._tr_tally(he,1,he.match_length-I),he.lookahead-=he.match_length,he.strstart+=he.match_length,he.match_length=0):(ve=a._tr_tally(he,0,he.window[he.strstart]),he.lookahead--,he.strstart++),ve&&(S(he,!1),he.strm.avail_out===0))return b}return he.insert=0,Se===h?(S(he,!0),he.strm.avail_out===0?ce:ee):he.last_lit&&(S(he,!1),he.strm.avail_out===0)?b:Y})(J,N):i[J.level].func(J,N);if(ye!==ce&&ye!==ee||(J.status=666),ye===b||ye===ce)return Q.avail_out===0&&(J.last_flush=-1),u;if(ye===Y&&(N===1?a._tr_align(J):N!==5&&(a._tr_stored_block(J,0,0,!1),N===3&&(te(J.head),J.lookahead===0&&(J.strstart=0,J.block_start=0,J.insert=0))),T(Q),Q.avail_out===0))return J.last_flush=-1,u}return N!==h?u:J.wrap<=0?1:(J.wrap===2?(O(J,255&Q.adler),O(J,Q.adler>>8&255),O(J,Q.adler>>16&255),O(J,Q.adler>>24&255),O(J,255&Q.total_in),O(J,Q.total_in>>8&255),O(J,Q.total_in>>16&255),O(J,Q.total_in>>24&255)):(P(J,Q.adler>>>16),P(J,65535&Q.adler)),T(Q),0<J.wrap&&(J.wrap=-J.wrap),J.pending!==0?u:1)},n.deflateEnd=function(Q){var N;return Q&&Q.state?(N=Q.state.status)!==F&&N!==69&&N!==73&&N!==91&&N!==103&&N!==M&&N!==666?le(Q,g):(Q.state=null,N===M?le(Q,-3):u):g},n.deflateSetDictionary=function(Q,N){var ue,J,q,ne,xe,ye,he,Se,ve=N.length;if(!Q||!Q.state||(ne=(ue=Q.state).wrap)===2||ne===1&&ue.status!==F||ue.lookahead)return g;for(ne===1&&(Q.adler=o(Q.adler,N,ve,0)),ue.wrap=0,ve>=ue.w_size&&(ne===0&&(te(ue.head),ue.strstart=0,ue.block_start=0,ue.insert=0),Se=new s.Buf8(ue.w_size),s.arraySet(Se,N,ve-ue.w_size,ue.w_size,0),N=Se,ve=ue.w_size),xe=Q.avail_in,ye=Q.next_in,he=Q.input,Q.avail_in=ve,Q.next_in=0,Q.input=N,ie(ue);ue.lookahead>=I;){for(J=ue.strstart,q=ue.lookahead-(I-1);ue.ins_h=(ue.ins_h<<ue.hash_shift^ue.window[J+I-1])&ue.hash_mask,ue.prev[J&ue.w_mask]=ue.head[ue.ins_h],ue.head[ue.ins_h]=J,J++,--q;);ue.strstart=J,ue.lookahead=I-1,ie(ue)}return ue.strstart+=ue.lookahead,ue.block_start=ue.strstart,ue.insert=ue.lookahead,ue.lookahead=0,ue.match_length=ue.prev_length=I-1,ue.match_available=0,Q.next_in=ye,Q.input=he,Q.avail_in=xe,ue.wrap=ne,u},n.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(r,A,n){A.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(r,A,n){A.exports=function(i,s){var a,o,l,c,f,h,u,g,p,w,m,B,x,E,k,H,K,R,I,W,L,F,M,b,Y;a=i.state,o=i.next_in,b=i.input,l=o+(i.avail_in-5),c=i.next_out,Y=i.output,f=c-(s-i.avail_out),h=c+(i.avail_out-257),u=a.dmax,g=a.wsize,p=a.whave,w=a.wnext,m=a.window,B=a.hold,x=a.bits,E=a.lencode,k=a.distcode,H=(1<<a.lenbits)-1,K=(1<<a.distbits)-1;e:do{x<15&&(B+=b[o++]<<x,x+=8,B+=b[o++]<<x,x+=8),R=E[B&H];t:for(;;){if(B>>>=I=R>>>24,x-=I,(I=R>>>16&255)===0)Y[c++]=65535&R;else{if(!(16&I)){if((64&I)==0){R=E[(65535&R)+(B&(1<<I)-1)];continue t}if(32&I){a.mode=12;break e}i.msg="invalid literal/length code",a.mode=30;break e}W=65535&R,(I&=15)&&(x<I&&(B+=b[o++]<<x,x+=8),W+=B&(1<<I)-1,B>>>=I,x-=I),x<15&&(B+=b[o++]<<x,x+=8,B+=b[o++]<<x,x+=8),R=k[B&K];r:for(;;){if(B>>>=I=R>>>24,x-=I,!(16&(I=R>>>16&255))){if((64&I)==0){R=k[(65535&R)+(B&(1<<I)-1)];continue r}i.msg="invalid distance code",a.mode=30;break e}if(L=65535&R,x<(I&=15)&&(B+=b[o++]<<x,(x+=8)<I&&(B+=b[o++]<<x,x+=8)),u<(L+=B&(1<<I)-1)){i.msg="invalid distance too far back",a.mode=30;break e}if(B>>>=I,x-=I,(I=c-f)<L){if(p<(I=L-I)&&a.sane){i.msg="invalid distance too far back",a.mode=30;break e}if(M=m,(F=0)===w){if(F+=g-I,I<W){for(W-=I;Y[c++]=m[F++],--I;);F=c-L,M=Y}}else if(w<I){if(F+=g+w-I,(I-=w)<W){for(W-=I;Y[c++]=m[F++],--I;);if(F=0,w<W){for(W-=I=w;Y[c++]=m[F++],--I;);F=c-L,M=Y}}}else if(F+=w-I,I<W){for(W-=I;Y[c++]=m[F++],--I;);F=c-L,M=Y}for(;2<W;)Y[c++]=M[F++],Y[c++]=M[F++],Y[c++]=M[F++],W-=3;W&&(Y[c++]=M[F++],1<W&&(Y[c++]=M[F++]))}else{for(F=c-L;Y[c++]=Y[F++],Y[c++]=Y[F++],Y[c++]=Y[F++],2<(W-=3););W&&(Y[c++]=Y[F++],1<W&&(Y[c++]=Y[F++]))}break}}break}}while(o<l&&c<h);o-=W=x>>3,B&=(1<<(x-=W<<3))-1,i.next_in=o,i.next_out=c,i.avail_in=o<l?l-o+5:5-(o-l),i.avail_out=c<h?h-c+257:257-(c-h),a.hold=B,a.bits=x}},{}],49:[function(r,A,n){var i=r("../utils/common"),s=r("./adler32"),a=r("./crc32"),o=r("./inffast"),l=r("./inftrees"),c=1,f=2,h=0,u=-2,g=1,p=852,w=592;function m(F){return(F>>>24&255)+(F>>>8&65280)+((65280&F)<<8)+((255&F)<<24)}function B(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function x(F){var M;return F&&F.state?(M=F.state,F.total_in=F.total_out=M.total=0,F.msg="",M.wrap&&(F.adler=1&M.wrap),M.mode=g,M.last=0,M.havedict=0,M.dmax=32768,M.head=null,M.hold=0,M.bits=0,M.lencode=M.lendyn=new i.Buf32(p),M.distcode=M.distdyn=new i.Buf32(w),M.sane=1,M.back=-1,h):u}function E(F){var M;return F&&F.state?((M=F.state).wsize=0,M.whave=0,M.wnext=0,x(F)):u}function k(F,M){var b,Y;return F&&F.state?(Y=F.state,M<0?(b=0,M=-M):(b=1+(M>>4),M<48&&(M&=15)),M&&(M<8||15<M)?u:(Y.window!==null&&Y.wbits!==M&&(Y.window=null),Y.wrap=b,Y.wbits=M,E(F))):u}function H(F,M){var b,Y;return F?(Y=new B,(F.state=Y).window=null,(b=k(F,M))!==h&&(F.state=null),b):u}var K,R,I=!0;function W(F){if(I){var M;for(K=new i.Buf32(512),R=new i.Buf32(32),M=0;M<144;)F.lens[M++]=8;for(;M<256;)F.lens[M++]=9;for(;M<280;)F.lens[M++]=7;for(;M<288;)F.lens[M++]=8;for(l(c,F.lens,0,288,K,0,F.work,{bits:9}),M=0;M<32;)F.lens[M++]=5;l(f,F.lens,0,32,R,0,F.work,{bits:5}),I=!1}F.lencode=K,F.lenbits=9,F.distcode=R,F.distbits=5}function L(F,M,b,Y){var ce,ee=F.state;return ee.window===null&&(ee.wsize=1<<ee.wbits,ee.wnext=0,ee.whave=0,ee.window=new i.Buf8(ee.wsize)),Y>=ee.wsize?(i.arraySet(ee.window,M,b-ee.wsize,ee.wsize,0),ee.wnext=0,ee.whave=ee.wsize):(Y<(ce=ee.wsize-ee.wnext)&&(ce=Y),i.arraySet(ee.window,M,b-Y,ce,ee.wnext),(Y-=ce)?(i.arraySet(ee.window,M,b-Y,Y,0),ee.wnext=Y,ee.whave=ee.wsize):(ee.wnext+=ce,ee.wnext===ee.wsize&&(ee.wnext=0),ee.whave<ee.wsize&&(ee.whave+=ce))),0}n.inflateReset=E,n.inflateReset2=k,n.inflateResetKeep=x,n.inflateInit=function(F){return H(F,15)},n.inflateInit2=H,n.inflate=function(F,M){var b,Y,ce,ee,le,Ae,te,T,S,O,P,z,ie,fe,Z,pe,we,be,je,Te,Q,N,ue,J,q=0,ne=new i.Buf8(4),xe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!F||!F.state||!F.output||!F.input&&F.avail_in!==0)return u;(b=F.state).mode===12&&(b.mode=13),le=F.next_out,ce=F.output,te=F.avail_out,ee=F.next_in,Y=F.input,Ae=F.avail_in,T=b.hold,S=b.bits,O=Ae,P=te,N=h;e:for(;;)switch(b.mode){case g:if(b.wrap===0){b.mode=13;break}for(;S<16;){if(Ae===0)break e;Ae--,T+=Y[ee++]<<S,S+=8}if(2&b.wrap&&T===35615){ne[b.check=0]=255&T,ne[1]=T>>>8&255,b.check=a(b.check,ne,2,0),S=T=0,b.mode=2;break}if(b.flags=0,b.head&&(b.head.done=!1),!(1&b.wrap)||(((255&T)<<8)+(T>>8))%31){F.msg="incorrect header check",b.mode=30;break}if((15&T)!=8){F.msg="unknown compression method",b.mode=30;break}if(S-=4,Q=8+(15&(T>>>=4)),b.wbits===0)b.wbits=Q;else if(Q>b.wbits){F.msg="invalid window size",b.mode=30;break}b.dmax=1<<Q,F.adler=b.check=1,b.mode=512&T?10:12,S=T=0;break;case 2:for(;S<16;){if(Ae===0)break e;Ae--,T+=Y[ee++]<<S,S+=8}if(b.flags=T,(255&b.flags)!=8){F.msg="unknown compression method",b.mode=30;break}if(57344&b.flags){F.msg="unknown header flags set",b.mode=30;break}b.head&&(b.head.text=T>>8&1),512&b.flags&&(ne[0]=255&T,ne[1]=T>>>8&255,b.check=a(b.check,ne,2,0)),S=T=0,b.mode=3;case 3:for(;S<32;){if(Ae===0)break e;Ae--,T+=Y[ee++]<<S,S+=8}b.head&&(b.head.time=T),512&b.flags&&(ne[0]=255&T,ne[1]=T>>>8&255,ne[2]=T>>>16&255,ne[3]=T>>>24&255,b.check=a(b.check,ne,4,0)),S=T=0,b.mode=4;case 4:for(;S<16;){if(Ae===0)break e;Ae--,T+=Y[ee++]<<S,S+=8}b.head&&(b.head.xflags=255&T,b.head.os=T>>8),512&b.flags&&(ne[0]=255&T,ne[1]=T>>>8&255,b.check=a(b.check,ne,2,0)),S=T=0,b.mode=5;case 5:if(1024&b.flags){for(;S<16;){if(Ae===0)break e;Ae--,T+=Y[ee++]<<S,S+=8}b.length=T,b.head&&(b.head.extra_len=T),512&b.flags&&(ne[0]=255&T,ne[1]=T>>>8&255,b.check=a(b.check,ne,2,0)),S=T=0}else b.head&&(b.head.extra=null);b.mode=6;case 6:if(1024&b.flags&&(Ae<(z=b.length)&&(z=Ae),z&&(b.head&&(Q=b.head.extra_len-b.length,b.head.extra||(b.head.extra=new Array(b.head.extra_len)),i.arraySet(b.head.extra,Y,ee,z,Q)),512&b.flags&&(b.check=a(b.check,Y,z,ee)),Ae-=z,ee+=z,b.length-=z),b.length))break e;b.length=0,b.mode=7;case 7:if(2048&b.flags){if(Ae===0)break e;for(z=0;Q=Y[ee+z++],b.head&&Q&&b.length<65536&&(b.head.name+=String.fromCharCode(Q)),Q&&z<Ae;);if(512&b.flags&&(b.check=a(b.check,Y,z,ee)),Ae-=z,ee+=z,Q)break e}else b.head&&(b.head.name=null);b.length=0,b.mode=8;case 8:if(4096&b.flags){if(Ae===0)break e;for(z=0;Q=Y[ee+z++],b.head&&Q&&b.length<65536&&(b.head.comment+=String.fromCharCode(Q)),Q&&z<Ae;);if(512&b.flags&&(b.check=a(b.check,Y,z,ee)),Ae-=z,ee+=z,Q)break e}else b.head&&(b.head.comment=null);b.mode=9;case 9:if(512&b.flags){for(;S<16;){if(Ae===0)break e;Ae--,T+=Y[ee++]<<S,S+=8}if(T!==(65535&b.check)){F.msg="header crc mismatch",b.mode=30;break}S=T=0}b.head&&(b.head.hcrc=b.flags>>9&1,b.head.done=!0),F.adler=b.check=0,b.mode=12;break;case 10:for(;S<32;){if(Ae===0)break e;Ae--,T+=Y[ee++]<<S,S+=8}F.adler=b.check=m(T),S=T=0,b.mode=11;case 11:if(b.havedict===0)return F.next_out=le,F.avail_out=te,F.next_in=ee,F.avail_in=Ae,b.hold=T,b.bits=S,2;F.adler=b.check=1,b.mode=12;case 12:if(M===5||M===6)break e;case 13:if(b.last){T>>>=7&S,S-=7&S,b.mode=27;break}for(;S<3;){if(Ae===0)break e;Ae--,T+=Y[ee++]<<S,S+=8}switch(b.last=1&T,S-=1,3&(T>>>=1)){case 0:b.mode=14;break;case 1:if(W(b),b.mode=20,M!==6)break;T>>>=2,S-=2;break e;case 2:b.mode=17;break;case 3:F.msg="invalid block type",b.mode=30}T>>>=2,S-=2;break;case 14:for(T>>>=7&S,S-=7&S;S<32;){if(Ae===0)break e;Ae--,T+=Y[ee++]<<S,S+=8}if((65535&T)!=(T>>>16^65535)){F.msg="invalid stored block lengths",b.mode=30;break}if(b.length=65535&T,S=T=0,b.mode=15,M===6)break e;case 15:b.mode=16;case 16:if(z=b.length){if(Ae<z&&(z=Ae),te<z&&(z=te),z===0)break e;i.arraySet(ce,Y,ee,z,le),Ae-=z,ee+=z,te-=z,le+=z,b.length-=z;break}b.mode=12;break;case 17:for(;S<14;){if(Ae===0)break e;Ae--,T+=Y[ee++]<<S,S+=8}if(b.nlen=257+(31&T),T>>>=5,S-=5,b.ndist=1+(31&T),T>>>=5,S-=5,b.ncode=4+(15&T),T>>>=4,S-=4,286<b.nlen||30<b.ndist){F.msg="too many length or distance symbols",b.mode=30;break}b.have=0,b.mode=18;case 18:for(;b.have<b.ncode;){for(;S<3;){if(Ae===0)break e;Ae--,T+=Y[ee++]<<S,S+=8}b.lens[xe[b.have++]]=7&T,T>>>=3,S-=3}for(;b.have<19;)b.lens[xe[b.have++]]=0;if(b.lencode=b.lendyn,b.lenbits=7,ue={bits:b.lenbits},N=l(0,b.lens,0,19,b.lencode,0,b.work,ue),b.lenbits=ue.bits,N){F.msg="invalid code lengths set",b.mode=30;break}b.have=0,b.mode=19;case 19:for(;b.have<b.nlen+b.ndist;){for(;pe=(q=b.lencode[T&(1<<b.lenbits)-1])>>>16&255,we=65535&q,!((Z=q>>>24)<=S);){if(Ae===0)break e;Ae--,T+=Y[ee++]<<S,S+=8}if(we<16)T>>>=Z,S-=Z,b.lens[b.have++]=we;else{if(we===16){for(J=Z+2;S<J;){if(Ae===0)break e;Ae--,T+=Y[ee++]<<S,S+=8}if(T>>>=Z,S-=Z,b.have===0){F.msg="invalid bit length repeat",b.mode=30;break}Q=b.lens[b.have-1],z=3+(3&T),T>>>=2,S-=2}else if(we===17){for(J=Z+3;S<J;){if(Ae===0)break e;Ae--,T+=Y[ee++]<<S,S+=8}S-=Z,Q=0,z=3+(7&(T>>>=Z)),T>>>=3,S-=3}else{for(J=Z+7;S<J;){if(Ae===0)break e;Ae--,T+=Y[ee++]<<S,S+=8}S-=Z,Q=0,z=11+(127&(T>>>=Z)),T>>>=7,S-=7}if(b.have+z>b.nlen+b.ndist){F.msg="invalid bit length repeat",b.mode=30;break}for(;z--;)b.lens[b.have++]=Q}}if(b.mode===30)break;if(b.lens[256]===0){F.msg="invalid code -- missing end-of-block",b.mode=30;break}if(b.lenbits=9,ue={bits:b.lenbits},N=l(c,b.lens,0,b.nlen,b.lencode,0,b.work,ue),b.lenbits=ue.bits,N){F.msg="invalid literal/lengths set",b.mode=30;break}if(b.distbits=6,b.distcode=b.distdyn,ue={bits:b.distbits},N=l(f,b.lens,b.nlen,b.ndist,b.distcode,0,b.work,ue),b.distbits=ue.bits,N){F.msg="invalid distances set",b.mode=30;break}if(b.mode=20,M===6)break e;case 20:b.mode=21;case 21:if(6<=Ae&&258<=te){F.next_out=le,F.avail_out=te,F.next_in=ee,F.avail_in=Ae,b.hold=T,b.bits=S,o(F,P),le=F.next_out,ce=F.output,te=F.avail_out,ee=F.next_in,Y=F.input,Ae=F.avail_in,T=b.hold,S=b.bits,b.mode===12&&(b.back=-1);break}for(b.back=0;pe=(q=b.lencode[T&(1<<b.lenbits)-1])>>>16&255,we=65535&q,!((Z=q>>>24)<=S);){if(Ae===0)break e;Ae--,T+=Y[ee++]<<S,S+=8}if(pe&&(240&pe)==0){for(be=Z,je=pe,Te=we;pe=(q=b.lencode[Te+((T&(1<<be+je)-1)>>be)])>>>16&255,we=65535&q,!(be+(Z=q>>>24)<=S);){if(Ae===0)break e;Ae--,T+=Y[ee++]<<S,S+=8}T>>>=be,S-=be,b.back+=be}if(T>>>=Z,S-=Z,b.back+=Z,b.length=we,pe===0){b.mode=26;break}if(32&pe){b.back=-1,b.mode=12;break}if(64&pe){F.msg="invalid literal/length code",b.mode=30;break}b.extra=15&pe,b.mode=22;case 22:if(b.extra){for(J=b.extra;S<J;){if(Ae===0)break e;Ae--,T+=Y[ee++]<<S,S+=8}b.length+=T&(1<<b.extra)-1,T>>>=b.extra,S-=b.extra,b.back+=b.extra}b.was=b.length,b.mode=23;case 23:for(;pe=(q=b.distcode[T&(1<<b.distbits)-1])>>>16&255,we=65535&q,!((Z=q>>>24)<=S);){if(Ae===0)break e;Ae--,T+=Y[ee++]<<S,S+=8}if((240&pe)==0){for(be=Z,je=pe,Te=we;pe=(q=b.distcode[Te+((T&(1<<be+je)-1)>>be)])>>>16&255,we=65535&q,!(be+(Z=q>>>24)<=S);){if(Ae===0)break e;Ae--,T+=Y[ee++]<<S,S+=8}T>>>=be,S-=be,b.back+=be}if(T>>>=Z,S-=Z,b.back+=Z,64&pe){F.msg="invalid distance code",b.mode=30;break}b.offset=we,b.extra=15&pe,b.mode=24;case 24:if(b.extra){for(J=b.extra;S<J;){if(Ae===0)break e;Ae--,T+=Y[ee++]<<S,S+=8}b.offset+=T&(1<<b.extra)-1,T>>>=b.extra,S-=b.extra,b.back+=b.extra}if(b.offset>b.dmax){F.msg="invalid distance too far back",b.mode=30;break}b.mode=25;case 25:if(te===0)break e;if(z=P-te,b.offset>z){if((z=b.offset-z)>b.whave&&b.sane){F.msg="invalid distance too far back",b.mode=30;break}ie=z>b.wnext?(z-=b.wnext,b.wsize-z):b.wnext-z,z>b.length&&(z=b.length),fe=b.window}else fe=ce,ie=le-b.offset,z=b.length;for(te<z&&(z=te),te-=z,b.length-=z;ce[le++]=fe[ie++],--z;);b.length===0&&(b.mode=21);break;case 26:if(te===0)break e;ce[le++]=b.length,te--,b.mode=21;break;case 27:if(b.wrap){for(;S<32;){if(Ae===0)break e;Ae--,T|=Y[ee++]<<S,S+=8}if(P-=te,F.total_out+=P,b.total+=P,P&&(F.adler=b.check=b.flags?a(b.check,ce,P,le-P):s(b.check,ce,P,le-P)),P=te,(b.flags?T:m(T))!==b.check){F.msg="incorrect data check",b.mode=30;break}S=T=0}b.mode=28;case 28:if(b.wrap&&b.flags){for(;S<32;){if(Ae===0)break e;Ae--,T+=Y[ee++]<<S,S+=8}if(T!==(4294967295&b.total)){F.msg="incorrect length check",b.mode=30;break}S=T=0}b.mode=29;case 29:N=1;break e;case 30:N=-3;break e;case 31:return-4;default:return u}return F.next_out=le,F.avail_out=te,F.next_in=ee,F.avail_in=Ae,b.hold=T,b.bits=S,(b.wsize||P!==F.avail_out&&b.mode<30&&(b.mode<27||M!==4))&&L(F,F.output,F.next_out,P-F.avail_out)?(b.mode=31,-4):(O-=F.avail_in,P-=F.avail_out,F.total_in+=O,F.total_out+=P,b.total+=P,b.wrap&&P&&(F.adler=b.check=b.flags?a(b.check,ce,P,F.next_out-P):s(b.check,ce,P,F.next_out-P)),F.data_type=b.bits+(b.last?64:0)+(b.mode===12?128:0)+(b.mode===20||b.mode===15?256:0),(O==0&&P===0||M===4)&&N===h&&(N=-5),N)},n.inflateEnd=function(F){if(!F||!F.state)return u;var M=F.state;return M.window&&(M.window=null),F.state=null,h},n.inflateGetHeader=function(F,M){var b;return F&&F.state?(2&(b=F.state).wrap)==0?u:((b.head=M).done=!1,h):u},n.inflateSetDictionary=function(F,M){var b,Y=M.length;return F&&F.state?(b=F.state).wrap!==0&&b.mode!==11?u:b.mode===11&&s(1,M,Y,0)!==b.check?-3:L(F,M,Y,Y)?(b.mode=31,-4):(b.havedict=1,h):u},n.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(r,A,n){var i=r("../utils/common"),s=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],a=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],o=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],l=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];A.exports=function(c,f,h,u,g,p,w,m){var B,x,E,k,H,K,R,I,W,L=m.bits,F=0,M=0,b=0,Y=0,ce=0,ee=0,le=0,Ae=0,te=0,T=0,S=null,O=0,P=new i.Buf16(16),z=new i.Buf16(16),ie=null,fe=0;for(F=0;F<=15;F++)P[F]=0;for(M=0;M<u;M++)P[f[h+M]]++;for(ce=L,Y=15;1<=Y&&P[Y]===0;Y--);if(Y<ce&&(ce=Y),Y===0)return g[p++]=20971520,g[p++]=20971520,m.bits=1,0;for(b=1;b<Y&&P[b]===0;b++);for(ce<b&&(ce=b),F=Ae=1;F<=15;F++)if(Ae<<=1,(Ae-=P[F])<0)return-1;if(0<Ae&&(c===0||Y!==1))return-1;for(z[1]=0,F=1;F<15;F++)z[F+1]=z[F]+P[F];for(M=0;M<u;M++)f[h+M]!==0&&(w[z[f[h+M]]++]=M);if(K=c===0?(S=ie=w,19):c===1?(S=s,O-=257,ie=a,fe-=257,256):(S=o,ie=l,-1),F=b,H=p,le=M=T=0,E=-1,k=(te=1<<(ee=ce))-1,c===1&&852<te||c===2&&592<te)return 1;for(;;){for(R=F-le,W=w[M]<K?(I=0,w[M]):w[M]>K?(I=ie[fe+w[M]],S[O+w[M]]):(I=96,0),B=1<<F-le,b=x=1<<ee;g[H+(T>>le)+(x-=B)]=R<<24|I<<16|W|0,x!==0;);for(B=1<<F-1;T&B;)B>>=1;if(B!==0?(T&=B-1,T+=B):T=0,M++,--P[F]==0){if(F===Y)break;F=f[h+w[M]]}if(ce<F&&(T&k)!==E){for(le===0&&(le=ce),H+=b,Ae=1<<(ee=F-le);ee+le<Y&&!((Ae-=P[ee+le])<=0);)ee++,Ae<<=1;if(te+=1<<ee,c===1&&852<te||c===2&&592<te)return 1;g[E=T&k]=ce<<24|ee<<16|H-p|0}}return T!==0&&(g[H+T]=F-le<<24|64<<16|0),m.bits=ce,0}},{"../utils/common":41}],51:[function(r,A,n){A.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(r,A,n){var i=r("../utils/common"),s=0,a=1;function o(q){for(var ne=q.length;0<=--ne;)q[ne]=0}var l=0,c=29,f=256,h=f+1+c,u=30,g=19,p=2*h+1,w=15,m=16,B=7,x=256,E=16,k=17,H=18,K=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],R=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],I=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],W=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],L=new Array(2*(h+2));o(L);var F=new Array(2*u);o(F);var M=new Array(512);o(M);var b=new Array(256);o(b);var Y=new Array(c);o(Y);var ce,ee,le,Ae=new Array(u);function te(q,ne,xe,ye,he){this.static_tree=q,this.extra_bits=ne,this.extra_base=xe,this.elems=ye,this.max_length=he,this.has_stree=q&&q.length}function T(q,ne){this.dyn_tree=q,this.max_code=0,this.stat_desc=ne}function S(q){return q<256?M[q]:M[256+(q>>>7)]}function O(q,ne){q.pending_buf[q.pending++]=255&ne,q.pending_buf[q.pending++]=ne>>>8&255}function P(q,ne,xe){q.bi_valid>m-xe?(q.bi_buf|=ne<<q.bi_valid&65535,O(q,q.bi_buf),q.bi_buf=ne>>m-q.bi_valid,q.bi_valid+=xe-m):(q.bi_buf|=ne<<q.bi_valid&65535,q.bi_valid+=xe)}function z(q,ne,xe){P(q,xe[2*ne],xe[2*ne+1])}function ie(q,ne){for(var xe=0;xe|=1&q,q>>>=1,xe<<=1,0<--ne;);return xe>>>1}function fe(q,ne,xe){var ye,he,Se=new Array(w+1),ve=0;for(ye=1;ye<=w;ye++)Se[ye]=ve=ve+xe[ye-1]<<1;for(he=0;he<=ne;he++){var Ce=q[2*he+1];Ce!==0&&(q[2*he]=ie(Se[Ce]++,Ce))}}function Z(q){var ne;for(ne=0;ne<h;ne++)q.dyn_ltree[2*ne]=0;for(ne=0;ne<u;ne++)q.dyn_dtree[2*ne]=0;for(ne=0;ne<g;ne++)q.bl_tree[2*ne]=0;q.dyn_ltree[2*x]=1,q.opt_len=q.static_len=0,q.last_lit=q.matches=0}function pe(q){8<q.bi_valid?O(q,q.bi_buf):0<q.bi_valid&&(q.pending_buf[q.pending++]=q.bi_buf),q.bi_buf=0,q.bi_valid=0}function we(q,ne,xe,ye){var he=2*ne,Se=2*xe;return q[he]<q[Se]||q[he]===q[Se]&&ye[ne]<=ye[xe]}function be(q,ne,xe){for(var ye=q.heap[xe],he=xe<<1;he<=q.heap_len&&(he<q.heap_len&&we(ne,q.heap[he+1],q.heap[he],q.depth)&&he++,!we(ne,ye,q.heap[he],q.depth));)q.heap[xe]=q.heap[he],xe=he,he<<=1;q.heap[xe]=ye}function je(q,ne,xe){var ye,he,Se,ve,Ce=0;if(q.last_lit!==0)for(;ye=q.pending_buf[q.d_buf+2*Ce]<<8|q.pending_buf[q.d_buf+2*Ce+1],he=q.pending_buf[q.l_buf+Ce],Ce++,ye===0?z(q,he,ne):(z(q,(Se=b[he])+f+1,ne),(ve=K[Se])!==0&&P(q,he-=Y[Se],ve),z(q,Se=S(--ye),xe),(ve=R[Se])!==0&&P(q,ye-=Ae[Se],ve)),Ce<q.last_lit;);z(q,x,ne)}function Te(q,ne){var xe,ye,he,Se=ne.dyn_tree,ve=ne.stat_desc.static_tree,Ce=ne.stat_desc.has_stree,Le=ne.stat_desc.elems,Ge=-1;for(q.heap_len=0,q.heap_max=p,xe=0;xe<Le;xe++)Se[2*xe]!==0?(q.heap[++q.heap_len]=Ge=xe,q.depth[xe]=0):Se[2*xe+1]=0;for(;q.heap_len<2;)Se[2*(he=q.heap[++q.heap_len]=Ge<2?++Ge:0)]=1,q.depth[he]=0,q.opt_len--,Ce&&(q.static_len-=ve[2*he+1]);for(ne.max_code=Ge,xe=q.heap_len>>1;1<=xe;xe--)be(q,Se,xe);for(he=Le;xe=q.heap[1],q.heap[1]=q.heap[q.heap_len--],be(q,Se,1),ye=q.heap[1],q.heap[--q.heap_max]=xe,q.heap[--q.heap_max]=ye,Se[2*he]=Se[2*xe]+Se[2*ye],q.depth[he]=(q.depth[xe]>=q.depth[ye]?q.depth[xe]:q.depth[ye])+1,Se[2*xe+1]=Se[2*ye+1]=he,q.heap[1]=he++,be(q,Se,1),2<=q.heap_len;);q.heap[--q.heap_max]=q.heap[1],(function(Ke,We){var At,$e,_t,at,Bt,bt,Tt=We.dyn_tree,st=We.max_code,Pt=We.stat_desc.static_tree,rt=We.stat_desc.has_stree,wt=We.stat_desc.extra_bits,Kt=We.stat_desc.extra_base,lt=We.stat_desc.max_length,ht=0;for(at=0;at<=w;at++)Ke.bl_count[at]=0;for(Tt[2*Ke.heap[Ke.heap_max]+1]=0,At=Ke.heap_max+1;At<p;At++)lt<(at=Tt[2*Tt[2*($e=Ke.heap[At])+1]+1]+1)&&(at=lt,ht++),Tt[2*$e+1]=at,st<$e||(Ke.bl_count[at]++,Bt=0,Kt<=$e&&(Bt=wt[$e-Kt]),bt=Tt[2*$e],Ke.opt_len+=bt*(at+Bt),rt&&(Ke.static_len+=bt*(Pt[2*$e+1]+Bt)));if(ht!==0){do{for(at=lt-1;Ke.bl_count[at]===0;)at--;Ke.bl_count[at]--,Ke.bl_count[at+1]+=2,Ke.bl_count[lt]--,ht-=2}while(0<ht);for(at=lt;at!==0;at--)for($e=Ke.bl_count[at];$e!==0;)st<(_t=Ke.heap[--At])||(Tt[2*_t+1]!==at&&(Ke.opt_len+=(at-Tt[2*_t+1])*Tt[2*_t],Tt[2*_t+1]=at),$e--)}})(q,ne),fe(Se,Ge,q.bl_count)}function Q(q,ne,xe){var ye,he,Se=-1,ve=ne[1],Ce=0,Le=7,Ge=4;for(ve===0&&(Le=138,Ge=3),ne[2*(xe+1)+1]=65535,ye=0;ye<=xe;ye++)he=ve,ve=ne[2*(ye+1)+1],++Ce<Le&&he===ve||(Ce<Ge?q.bl_tree[2*he]+=Ce:he!==0?(he!==Se&&q.bl_tree[2*he]++,q.bl_tree[2*E]++):Ce<=10?q.bl_tree[2*k]++:q.bl_tree[2*H]++,Se=he,Ge=(Ce=0)===ve?(Le=138,3):he===ve?(Le=6,3):(Le=7,4))}function N(q,ne,xe){var ye,he,Se=-1,ve=ne[1],Ce=0,Le=7,Ge=4;for(ve===0&&(Le=138,Ge=3),ye=0;ye<=xe;ye++)if(he=ve,ve=ne[2*(ye+1)+1],!(++Ce<Le&&he===ve)){if(Ce<Ge)for(;z(q,he,q.bl_tree),--Ce!=0;);else he!==0?(he!==Se&&(z(q,he,q.bl_tree),Ce--),z(q,E,q.bl_tree),P(q,Ce-3,2)):Ce<=10?(z(q,k,q.bl_tree),P(q,Ce-3,3)):(z(q,H,q.bl_tree),P(q,Ce-11,7));Se=he,Ge=(Ce=0)===ve?(Le=138,3):he===ve?(Le=6,3):(Le=7,4)}}o(Ae);var ue=!1;function J(q,ne,xe,ye){P(q,(l<<1)+(ye?1:0),3),(function(he,Se,ve,Ce){pe(he),O(he,ve),O(he,~ve),i.arraySet(he.pending_buf,he.window,Se,ve,he.pending),he.pending+=ve})(q,ne,xe)}n._tr_init=function(q){ue||((function(){var ne,xe,ye,he,Se,ve=new Array(w+1);for(he=ye=0;he<c-1;he++)for(Y[he]=ye,ne=0;ne<1<<K[he];ne++)b[ye++]=he;for(b[ye-1]=he,he=Se=0;he<16;he++)for(Ae[he]=Se,ne=0;ne<1<<R[he];ne++)M[Se++]=he;for(Se>>=7;he<u;he++)for(Ae[he]=Se<<7,ne=0;ne<1<<R[he]-7;ne++)M[256+Se++]=he;for(xe=0;xe<=w;xe++)ve[xe]=0;for(ne=0;ne<=143;)L[2*ne+1]=8,ne++,ve[8]++;for(;ne<=255;)L[2*ne+1]=9,ne++,ve[9]++;for(;ne<=279;)L[2*ne+1]=7,ne++,ve[7]++;for(;ne<=287;)L[2*ne+1]=8,ne++,ve[8]++;for(fe(L,h+1,ve),ne=0;ne<u;ne++)F[2*ne+1]=5,F[2*ne]=ie(ne,5);ce=new te(L,K,f+1,h,w),ee=new te(F,R,0,u,w),le=new te(new Array(0),I,0,g,B)})(),ue=!0),q.l_desc=new T(q.dyn_ltree,ce),q.d_desc=new T(q.dyn_dtree,ee),q.bl_desc=new T(q.bl_tree,le),q.bi_buf=0,q.bi_valid=0,Z(q)},n._tr_stored_block=J,n._tr_flush_block=function(q,ne,xe,ye){var he,Se,ve=0;0<q.level?(q.strm.data_type===2&&(q.strm.data_type=(function(Ce){var Le,Ge=4093624447;for(Le=0;Le<=31;Le++,Ge>>>=1)if(1&Ge&&Ce.dyn_ltree[2*Le]!==0)return s;if(Ce.dyn_ltree[18]!==0||Ce.dyn_ltree[20]!==0||Ce.dyn_ltree[26]!==0)return a;for(Le=32;Le<f;Le++)if(Ce.dyn_ltree[2*Le]!==0)return a;return s})(q)),Te(q,q.l_desc),Te(q,q.d_desc),ve=(function(Ce){var Le;for(Q(Ce,Ce.dyn_ltree,Ce.l_desc.max_code),Q(Ce,Ce.dyn_dtree,Ce.d_desc.max_code),Te(Ce,Ce.bl_desc),Le=g-1;3<=Le&&Ce.bl_tree[2*W[Le]+1]===0;Le--);return Ce.opt_len+=3*(Le+1)+5+5+4,Le})(q),he=q.opt_len+3+7>>>3,(Se=q.static_len+3+7>>>3)<=he&&(he=Se)):he=Se=xe+5,xe+4<=he&&ne!==-1?J(q,ne,xe,ye):q.strategy===4||Se===he?(P(q,2+(ye?1:0),3),je(q,L,F)):(P(q,4+(ye?1:0),3),(function(Ce,Le,Ge,Ke){var We;for(P(Ce,Le-257,5),P(Ce,Ge-1,5),P(Ce,Ke-4,4),We=0;We<Ke;We++)P(Ce,Ce.bl_tree[2*W[We]+1],3);N(Ce,Ce.dyn_ltree,Le-1),N(Ce,Ce.dyn_dtree,Ge-1)})(q,q.l_desc.max_code+1,q.d_desc.max_code+1,ve+1),je(q,q.dyn_ltree,q.dyn_dtree)),Z(q),ye&&pe(q)},n._tr_tally=function(q,ne,xe){return q.pending_buf[q.d_buf+2*q.last_lit]=ne>>>8&255,q.pending_buf[q.d_buf+2*q.last_lit+1]=255&ne,q.pending_buf[q.l_buf+q.last_lit]=255&xe,q.last_lit++,ne===0?q.dyn_ltree[2*xe]++:(q.matches++,ne--,q.dyn_ltree[2*(b[xe]+f+1)]++,q.dyn_dtree[2*S(ne)]++),q.last_lit===q.lit_bufsize-1},n._tr_align=function(q){P(q,2,3),z(q,x,L),(function(ne){ne.bi_valid===16?(O(ne,ne.bi_buf),ne.bi_buf=0,ne.bi_valid=0):8<=ne.bi_valid&&(ne.pending_buf[ne.pending++]=255&ne.bi_buf,ne.bi_buf>>=8,ne.bi_valid-=8)})(q)}},{"../utils/common":41}],53:[function(r,A,n){A.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(r,A,n){(function(i){(function(s,a){if(!s.setImmediate){var o,l,c,f,h=1,u={},g=!1,p=s.document,w=Object.getPrototypeOf&&Object.getPrototypeOf(s);w=w&&w.setTimeout?w:s,o={}.toString.call(s.process)==="[object process]"?function(E){process.nextTick(function(){B(E)})}:(function(){if(s.postMessage&&!s.importScripts){var E=!0,k=s.onmessage;return s.onmessage=function(){E=!1},s.postMessage("","*"),s.onmessage=k,E}})()?(f="setImmediate$"+Math.random()+"$",s.addEventListener?s.addEventListener("message",x,!1):s.attachEvent("onmessage",x),function(E){s.postMessage(f+E,"*")}):s.MessageChannel?((c=new MessageChannel).port1.onmessage=function(E){B(E.data)},function(E){c.port2.postMessage(E)}):p&&"onreadystatechange"in p.createElement("script")?(l=p.documentElement,function(E){var k=p.createElement("script");k.onreadystatechange=function(){B(E),k.onreadystatechange=null,l.removeChild(k),k=null},l.appendChild(k)}):function(E){setTimeout(B,0,E)},w.setImmediate=function(E){typeof E!="function"&&(E=new Function(""+E));for(var k=new Array(arguments.length-1),H=0;H<k.length;H++)k[H]=arguments[H+1];var K={callback:E,args:k};return u[h]=K,o(h),h++},w.clearImmediate=m}function m(E){delete u[E]}function B(E){if(g)setTimeout(B,0,E);else{var k=u[E];if(k){g=!0;try{(function(H){var K=H.callback,R=H.args;switch(R.length){case 0:K();break;case 1:K(R[0]);break;case 2:K(R[0],R[1]);break;case 3:K(R[0],R[1],R[2]);break;default:K.apply(a,R)}})(k)}finally{m(E),g=!1}}}}function x(E){E.source===s&&typeof E.data=="string"&&E.data.indexOf(f)===0&&B(+E.data.slice(f.length))}})(typeof self>"u"?i===void 0?this:i:self)}).call(this,typeof ss<"u"?ss:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(ed)),ed.exports}var EU=xU();const SU=Zh(EU);function $t(t){"@babel/helpers - typeof";return $t=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},$t(t)}var Vn=Uint8Array,pn=Uint16Array,td=Int32Array,rd=new Vn([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Ad=new Vn([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Em=new Vn([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Sm=function(t,e){for(var r=new pn(31),A=0;A<31;++A)r[A]=e+=1<<t[A-1];for(var n=new td(r[30]),A=1;A<30;++A)for(var i=r[A];i<r[A+1];++i)n[i]=i-r[A]<<5|A;return{b:r,r:n}},Fm=Sm(rd,2),FU=Fm.b,nd=Fm.r;FU[28]=258,nd[258]=28;for(var IU=Sm(Ad,0),Im=IU.r,id=new pn(32768),hr=0;hr<32768;++hr){var ua=(hr&43690)>>1|(hr&21845)<<1;ua=(ua&52428)>>2|(ua&13107)<<2,ua=(ua&61680)>>4|(ua&3855)<<4,id[hr]=((ua&65280)>>8|(ua&255)<<8)>>1}for(var yl=(function(t,e,r){for(var A=t.length,n=0,i=new pn(e);n<A;++n)t[n]&&++i[t[n]-1];var s=new pn(e);for(n=1;n<e;++n)s[n]=s[n-1]+i[n-1]<<1;var a;if(r){a=new pn(1<<e);var o=15-e;for(n=0;n<A;++n)if(t[n])for(var l=n<<4|t[n],c=e-t[n],f=s[t[n]-1]++<<c,h=f|(1<<c)-1;f<=h;++f)a[id[f]>>o]=l}else for(a=new pn(A),n=0;n<A;++n)t[n]&&(a[n]=id[s[t[n]-1]++]>>15-t[n]);return a}),os=new Vn(288),hr=0;hr<144;++hr)os[hr]=8;for(var hr=144;hr<256;++hr)os[hr]=9;for(var hr=256;hr<280;++hr)os[hr]=7;for(var hr=280;hr<288;++hr)os[hr]=8;for(var tu=new Vn(32),hr=0;hr<32;++hr)tu[hr]=5;var UU=yl(os,9,0),_U=yl(tu,5,0),Um=function(t){return(t+7)/8|0},QU=function(t,e,r){return(r==null||r>t.length)&&(r=t.length),new Vn(t.subarray(e,r))},Qi=function(t,e,r){r<<=e&7;var A=e/8|0;t[A]|=r,t[A+1]|=r>>8},Bl=function(t,e,r){r<<=e&7;var A=e/8|0;t[A]|=r,t[A+1]|=r>>8,t[A+2]|=r>>16},ad=function(t,e){for(var r=[],A=0;A<t.length;++A)t[A]&&r.push({s:A,f:t[A]});var n=r.length,i=r.slice();if(!n)return{t:Lm,l:0};if(n==1){var s=new Vn(r[0].s+1);return s[r[0].s]=1,{t:s,l:1}}r.sort(function(k,H){return k.f-H.f}),r.push({s:-1,f:25001});var a=r[0],o=r[1],l=0,c=1,f=2;for(r[0]={s:-1,f:a.f+o.f,l:a,r:o};c!=n-1;)a=r[r[l].f<r[f].f?l++:f++],o=r[l!=c&&r[l].f<r[f].f?l++:f++],r[c++]={s:-1,f:a.f+o.f,l:a,r:o};for(var h=i[0].s,A=1;A<n;++A)i[A].s>h&&(h=i[A].s);var u=new pn(h+1),g=sd(r[c-1],u,0);if(g>e){var A=0,p=0,w=g-e,m=1<<w;for(i.sort(function(H,K){return u[K.s]-u[H.s]||H.f-K.f});A<n;++A){var B=i[A].s;if(u[B]>e)p+=m-(1<<g-u[B]),u[B]=e;else break}for(p>>=w;p>0;){var x=i[A].s;u[x]<e?p-=1<<e-u[x]++-1:++A}for(;A>=0&&p;--A){var E=i[A].s;u[E]==e&&(--u[E],++p)}g=e}return{t:new Vn(u),l:g}},sd=function(t,e,r){return t.s==-1?Math.max(sd(t.l,e,r+1),sd(t.r,e,r+1)):e[t.s]=r},_m=function(t){for(var e=t.length;e&&!t[--e];);for(var r=new pn(++e),A=0,n=t[0],i=1,s=function(o){r[A++]=o},a=1;a<=e;++a)if(t[a]==n&&a!=e)++i;else{if(!n&&i>2){for(;i>138;i-=138)s(32754);i>2&&(s(i>10?i-11<<5|28690:i-3<<5|12305),i=0)}else if(i>3){for(s(n),--i;i>6;i-=6)s(8304);i>2&&(s(i-3<<5|8208),i=0)}for(;i--;)s(n);i=1,n=t[a]}return{c:r.subarray(0,A),n:e}},bl=function(t,e){for(var r=0,A=0;A<e.length;++A)r+=t[A]*e[A];return r},Qm=function(t,e,r){var A=r.length,n=Um(e+2);t[n]=A&255,t[n+1]=A>>8,t[n+2]=t[n]^255,t[n+3]=t[n+1]^255;for(var i=0;i<A;++i)t[n+i+4]=r[i];return(n+4+A)*8},km=function(t,e,r,A,n,i,s,a,o,l,c){Qi(e,c++,r),++n[256];for(var f=ad(n,15),h=f.t,u=f.l,g=ad(i,15),p=g.t,w=g.l,m=_m(h),B=m.c,x=m.n,E=_m(p),k=E.c,H=E.n,K=new pn(19),R=0;R<B.length;++R)++K[B[R]&31];for(var R=0;R<k.length;++R)++K[k[R]&31];for(var I=ad(K,7),W=I.t,L=I.l,F=19;F>4&&!W[Em[F-1]];--F);var M=l+5<<3,b=bl(n,os)+bl(i,tu)+s,Y=bl(n,h)+bl(i,p)+s+14+3*F+bl(K,W)+2*K[16]+3*K[17]+7*K[18];if(o>=0&&M<=b&&M<=Y)return Qm(e,c,t.subarray(o,o+l));var ce,ee,le,Ae;if(Qi(e,c,1+(Y<b)),c+=2,Y<b){ce=yl(h,u,0),ee=h,le=yl(p,w,0),Ae=p;var te=yl(W,L,0);Qi(e,c,x-257),Qi(e,c+5,H-1),Qi(e,c+10,F-4),c+=14;for(var R=0;R<F;++R)Qi(e,c+3*R,W[Em[R]]);c+=3*F;for(var T=[B,k],S=0;S<2;++S)for(var O=T[S],R=0;R<O.length;++R){var P=O[R]&31;Qi(e,c,te[P]),c+=W[P],P>15&&(Qi(e,c,O[R]>>5&127),c+=O[R]>>12)}}else ce=UU,ee=os,le=_U,Ae=tu;for(var R=0;R<a;++R){var z=A[R];if(z>255){var P=z>>18&31;Bl(e,c,ce[P+257]),c+=ee[P+257],P>7&&(Qi(e,c,z>>23&31),c+=rd[P]);var ie=z&31;Bl(e,c,le[ie]),c+=Ae[ie],ie>3&&(Bl(e,c,z>>5&8191),c+=Ad[ie])}else Bl(e,c,ce[z]),c+=ee[z]}return Bl(e,c,ce[256]),c+ee[256]},kU=new td([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Lm=new Vn(0),LU=function(t,e,r,A,n,i){var s=i.z||t.length,a=new Vn(A+s+5*(1+Math.ceil(s/7e3))+n),o=a.subarray(A,a.length-n),l=i.l,c=(i.r||0)&7;if(e){c&&(o[0]=i.r>>3);for(var f=kU[e-1],h=f>>13,u=f&8191,g=(1<<r)-1,p=i.p||new pn(32768),w=i.h||new pn(g+1),m=Math.ceil(r/3),B=2*m,x=function(Q){return(t[Q]^t[Q+1]<<m^t[Q+2]<<B)&g},E=new td(25e3),k=new pn(288),H=new pn(32),K=0,R=0,I=i.i||0,W=0,L=i.w||0,F=0;I+2<s;++I){var M=x(I),b=I&32767,Y=w[M];if(p[b]=Y,w[M]=b,L<=I){var ce=s-I;if((K>7e3||W>24576)&&(ce>423||!l)){c=km(t,o,0,E,k,H,R,W,F,I-F,c),W=K=R=0,F=I;for(var ee=0;ee<286;++ee)k[ee]=0;for(var ee=0;ee<30;++ee)H[ee]=0}var le=2,Ae=0,te=u,T=b-Y&32767;if(ce>2&&M==x(I-T))for(var S=Math.min(h,ce)-1,O=Math.min(32767,I),P=Math.min(258,ce);T<=O&&--te&&b!=Y;){if(t[I+le]==t[I+le-T]){for(var z=0;z<P&&t[I+z]==t[I+z-T];++z);if(z>le){if(le=z,Ae=T,z>S)break;for(var ie=Math.min(T,z-2),fe=0,ee=0;ee<ie;++ee){var Z=I-T+ee&32767,pe=p[Z],we=Z-pe&32767;we>fe&&(fe=we,Y=Z)}}}b=Y,Y=p[b],T+=b-Y&32767}if(Ae){E[W++]=268435456|nd[le]<<18|Im[Ae];var be=nd[le]&31,je=Im[Ae]&31;R+=rd[be]+Ad[je],++k[257+be],++H[je],L=I+le,++K}else E[W++]=t[I],++k[t[I]]}}for(I=Math.max(I,L);I<s;++I)E[W++]=t[I],++k[t[I]];c=km(t,o,l,E,k,H,R,W,F,I-F,c),l||(i.r=c&7|o[c/8|0]<<3,c-=7,i.h=w,i.p=p,i.i=I,i.w=L)}else{for(var I=i.w||0;I<s+l;I+=65535){var Te=I+65535;Te>=s&&(o[c/8|0]=l,Te=s),c=Qm(o,c+1,t.subarray(I,Te))}i.i=s}return QU(a,0,A+Um(c)+n)},Tm=function(){var t=1,e=0;return{p:function(r){for(var A=t,n=e,i=r.length|0,s=0;s!=i;){for(var a=Math.min(s+2655,i);s<a;++s)n+=A+=r[s];A=(A&65535)+15*(A>>16),n=(n&65535)+15*(n>>16)}t=A,e=n},d:function(){return t%=65521,e%=65521,(t&255)<<24|(t&65280)<<8|(e&255)<<8|e>>8}}},TU=function(t,e,r,A,n){if(!n&&(n={l:1},e.dictionary)){var i=e.dictionary.subarray(-32768),s=new Vn(i.length+t.length);s.set(i),s.set(t,i.length),t=s,n.w=i.length}return LU(t,e.level==null?6:e.level,e.mem==null?n.l?Math.ceil(Math.max(8,Math.min(13,Math.log(t.length)))*1.5):20:12+e.mem,r,A,n)},Nm=function(t,e,r){for(;r;++e)t[e]=r,r>>>=8},NU=function(t,e){var r=e.level,A=r==0?0:r<6?1:r==9?3:2;if(t[0]=120,t[1]=A<<6|(e.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,e.dictionary){var n=Tm();n.p(e.dictionary),Nm(t,2,n.d())}};function od(t,e){e||(e={});var r=Tm();r.p(t);var A=TU(t,e,e.dictionary?6:2,4);return NU(A,e),Nm(A,A.length-4,r.d()),A}var OU=typeof TextDecoder<"u"&&new TextDecoder,PU=0;try{OU.decode(Lm,{stream:!0}),PU=1}catch{}function MU(t){if(Array.isArray(t))return t}function DU(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var A,n,i,s,a=[],o=!0,l=!1;try{if(i=(r=r.call(t)).next,e!==0)for(;!(o=(A=i.call(r)).done)&&(a.push(A.value),a.length!==e);o=!0);}catch(c){l=!0,n=c}finally{try{if(!o&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(l)throw n}}return a}}function Om(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,A=Array(e);r<e;r++)A[r]=t[r];return A}function HU(t,e){if(t){if(typeof t=="string")return Om(t,e);var r={}.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Om(t,e):void 0}}function RU(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Pm(t,e){return MU(t)||DU(t,e)||HU(t,e)||RU()}function Mm(t,e="utf8"){return new TextDecoder(e).decode(t)}const jU=new TextEncoder;function KU(t){return jU.encode(t)}const zU=1024*8,GU=(()=>{const t=new Uint8Array(4),e=new Uint32Array(t.buffer);return!((e[0]=1)&t[0])})(),ld={int8:globalThis.Int8Array,uint8:globalThis.Uint8Array,int16:globalThis.Int16Array,uint16:globalThis.Uint16Array,int32:globalThis.Int32Array,uint32:globalThis.Uint32Array,uint64:globalThis.BigUint64Array,int64:globalThis.BigInt64Array,float32:globalThis.Float32Array,float64:globalThis.Float64Array};class cd{buffer;byteLength;byteOffset;length;offset;lastWrittenByte;littleEndian;_data;_mark;_marks;constructor(e=zU,r={}){let A=!1;typeof e=="number"?e=new ArrayBuffer(e):(A=!0,this.lastWrittenByte=e.byteLength);const n=r.offset?r.offset>>>0:0,i=e.byteLength-n;let s=n;(ArrayBuffer.isView(e)||e instanceof cd)&&(e.byteLength!==e.buffer.byteLength&&(s=e.byteOffset+n),e=e.buffer),A?this.lastWrittenByte=i:this.lastWrittenByte=0,this.buffer=e,this.length=i,this.byteLength=i,this.byteOffset=s,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,s,i),this._mark=0,this._marks=[]}available(e=1){return this.offset+e<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){return this.littleEndian=!0,this}isBigEndian(){return!this.littleEndian}setBigEndian(){return this.littleEndian=!1,this}skip(e=1){return this.offset+=e,this}back(e=1){return this.offset-=e,this}seek(e){return this.offset=e,this}mark(){return this._mark=this.offset,this}reset(){return this.offset=this._mark,this}pushMark(){return this._marks.push(this.offset),this}popMark(){const e=this._marks.pop();if(e===void 0)throw new Error("Mark stack empty");return this.seek(e),this}rewind(){return this.offset=0,this}ensureAvailable(e=1){if(!this.available(e)){const A=(this.offset+e)*2,n=new Uint8Array(A);n.set(new Uint8Array(this.buffer)),this.buffer=n.buffer,this.length=A,this.byteLength=A,this._data=new DataView(this.buffer)}return this}readBoolean(){return this.readUint8()!==0}readInt8(){return this._data.getInt8(this.offset++)}readUint8(){return this._data.getUint8(this.offset++)}readByte(){return this.readUint8()}readBytes(e=1){return this.readArray(e,"uint8")}readArray(e,r){const A=ld[r].BYTES_PER_ELEMENT*e,n=this.byteOffset+this.offset,i=this.buffer.slice(n,n+A);if(this.littleEndian===GU&&r!=="uint8"&&r!=="int8"){const a=new Uint8Array(this.buffer.slice(n,n+A));a.reverse();const o=new ld[r](a.buffer);return this.offset+=A,o.reverse(),o}const s=new ld[r](i);return this.offset+=A,s}readInt16(){const e=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,e}readUint16(){const e=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,e}readInt32(){const e=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,e}readUint32(){const e=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,e}readFloat32(){const e=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,e}readFloat64(){const e=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,e}readBigInt64(){const e=this._data.getBigInt64(this.offset,this.littleEndian);return this.offset+=8,e}readBigUint64(){const e=this._data.getBigUint64(this.offset,this.littleEndian);return this.offset+=8,e}readChar(){return String.fromCharCode(this.readInt8())}readChars(e=1){let r="";for(let A=0;A<e;A++)r+=this.readChar();return r}readUtf8(e=1){return Mm(this.readBytes(e))}decodeText(e=1,r="utf8"){return Mm(this.readBytes(e),r)}writeBoolean(e){return this.writeUint8(e?255:0),this}writeInt8(e){return this.ensureAvailable(1),this._data.setInt8(this.offset++,e),this._updateLastWrittenByte(),this}writeUint8(e){return this.ensureAvailable(1),this._data.setUint8(this.offset++,e),this._updateLastWrittenByte(),this}writeByte(e){return this.writeUint8(e)}writeBytes(e){this.ensureAvailable(e.length);for(let r=0;r<e.length;r++)this._data.setUint8(this.offset++,e[r]);return this._updateLastWrittenByte(),this}writeInt16(e){return this.ensureAvailable(2),this._data.setInt16(this.offset,e,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeUint16(e){return this.ensureAvailable(2),this._data.setUint16(this.offset,e,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeInt32(e){return this.ensureAvailable(4),this._data.setInt32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeUint32(e){return this.ensureAvailable(4),this._data.setUint32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat32(e){return this.ensureAvailable(4),this._data.setFloat32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat64(e){return this.ensureAvailable(8),this._data.setFloat64(this.offset,e,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigInt64(e){return this.ensureAvailable(8),this._data.setBigInt64(this.offset,e,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigUint64(e){return this.ensureAvailable(8),this._data.setBigUint64(this.offset,e,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeChar(e){return this.writeUint8(e.charCodeAt(0))}writeChars(e){for(let r=0;r<e.length;r++)this.writeUint8(e.charCodeAt(r));return this}writeUtf8(e){return this.writeBytes(KU(e))}toArray(){return new Uint8Array(this.buffer,this.byteOffset,this.lastWrittenByte)}getWrittenByteLength(){return this.lastWrittenByte-this.byteOffset}_updateLastWrittenByte(){this.offset>this.lastWrittenByte&&(this.lastWrittenByte=this.offset)}}function uo(t){let e=t.length;for(;--e>=0;)t[e]=0}const VU=3,qU=258,Dm=29,WU=256+1+Dm,Hm=30,$U=512,YU=new Array((WU+2)*2);uo(YU);const XU=new Array(Hm*2);uo(XU);const JU=new Array($U);uo(JU);const ZU=new Array(qU-VU+1);uo(ZU);const e_=new Array(Dm);uo(e_);const t_=new Array(Hm);uo(t_);var ud=(t,e,r,A)=>{let n=t&65535|0,i=t>>>16&65535|0,s=0;for(;r!==0;){s=r>2e3?2e3:r,r-=s;do n=n+e[A++]|0,i=i+n|0;while(--s);n%=65521,i%=65521}return n|i<<16|0};const r_=()=>{let t,e=[];for(var r=0;r<256;r++){t=r;for(var A=0;A<8;A++)t=t&1?3988292384^t>>>1:t>>>1;e[r]=t}return e},A_=new Uint32Array(r_());var fi=(t,e,r,A)=>{const n=A_,i=A+r;t^=-1;for(let s=A;s<i;s++)t=t>>>8^n[(t^e[s])&255];return t^-1},fd={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},Rm={Z_NO_FLUSH:0,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_DEFLATED:8};const n_=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var i_=function(t){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const r=e.shift();if(r){if(typeof r!="object")throw new TypeError(r+"must be non-object");for(const A in r)n_(r,A)&&(t[A]=r[A])}}return t},a_=t=>{let e=0;for(let A=0,n=t.length;A<n;A++)e+=t[A].length;const r=new Uint8Array(e);for(let A=0,n=0,i=t.length;A<i;A++){let s=t[A];r.set(s,n),n+=s.length}return r},jm={assign:i_,flattenChunks:a_};let Km=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{Km=!1}const Cl=new Uint8Array(256);for(let t=0;t<256;t++)Cl[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;Cl[254]=Cl[255]=1;var s_=t=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(t);let e,r,A,n,i,s=t.length,a=0;for(n=0;n<s;n++)r=t.charCodeAt(n),(r&64512)===55296&&n+1<s&&(A=t.charCodeAt(n+1),(A&64512)===56320&&(r=65536+(r-55296<<10)+(A-56320),n++)),a+=r<128?1:r<2048?2:r<65536?3:4;for(e=new Uint8Array(a),i=0,n=0;i<a;n++)r=t.charCodeAt(n),(r&64512)===55296&&n+1<s&&(A=t.charCodeAt(n+1),(A&64512)===56320&&(r=65536+(r-55296<<10)+(A-56320),n++)),r<128?e[i++]=r:r<2048?(e[i++]=192|r>>>6,e[i++]=128|r&63):r<65536?(e[i++]=224|r>>>12,e[i++]=128|r>>>6&63,e[i++]=128|r&63):(e[i++]=240|r>>>18,e[i++]=128|r>>>12&63,e[i++]=128|r>>>6&63,e[i++]=128|r&63);return e};const o_=(t,e)=>{if(e<65534&&t.subarray&&Km)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));let r="";for(let A=0;A<e;A++)r+=String.fromCharCode(t[A]);return r};var l_=(t,e)=>{const r=e||t.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(t.subarray(0,e));let A,n;const i=new Array(r*2);for(n=0,A=0;A<r;){let s=t[A++];if(s<128){i[n++]=s;continue}let a=Cl[s];if(a>4){i[n++]=65533,A+=a-1;continue}for(s&=a===2?31:a===3?15:7;a>1&&A<r;)s=s<<6|t[A++]&63,a--;if(a>1){i[n++]=65533;continue}s<65536?i[n++]=s:(s-=65536,i[n++]=55296|s>>10&1023,i[n++]=56320|s&1023)}return o_(i,n)},c_=(t,e)=>{e=e||t.length,e>t.length&&(e=t.length);let r=e-1;for(;r>=0&&(t[r]&192)===128;)r--;return r<0||r===0?e:r+Cl[t[r]]>e?r:e},hd={string2buf:s_,buf2string:l_,utf8border:c_};function u_(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var f_=u_;const ru=16209,h_=16191;var d_=function(e,r){let A,n,i,s,a,o,l,c,f,h,u,g,p,w,m,B,x,E,k,H,K,R,I,W;const L=e.state;A=e.next_in,I=e.input,n=A+(e.avail_in-5),i=e.next_out,W=e.output,s=i-(r-e.avail_out),a=i+(e.avail_out-257),o=L.dmax,l=L.wsize,c=L.whave,f=L.wnext,h=L.window,u=L.hold,g=L.bits,p=L.lencode,w=L.distcode,m=(1<<L.lenbits)-1,B=(1<<L.distbits)-1;e:do{g<15&&(u+=I[A++]<<g,g+=8,u+=I[A++]<<g,g+=8),x=p[u&m];t:for(;;){if(E=x>>>24,u>>>=E,g-=E,E=x>>>16&255,E===0)W[i++]=x&65535;else if(E&16){k=x&65535,E&=15,E&&(g<E&&(u+=I[A++]<<g,g+=8),k+=u&(1<<E)-1,u>>>=E,g-=E),g<15&&(u+=I[A++]<<g,g+=8,u+=I[A++]<<g,g+=8),x=w[u&B];r:for(;;){if(E=x>>>24,u>>>=E,g-=E,E=x>>>16&255,E&16){if(H=x&65535,E&=15,g<E&&(u+=I[A++]<<g,g+=8,g<E&&(u+=I[A++]<<g,g+=8)),H+=u&(1<<E)-1,H>o){e.msg="invalid distance too far back",L.mode=ru;break e}if(u>>>=E,g-=E,E=i-s,H>E){if(E=H-E,E>c&&L.sane){e.msg="invalid distance too far back",L.mode=ru;break e}if(K=0,R=h,f===0){if(K+=l-E,E<k){k-=E;do W[i++]=h[K++];while(--E);K=i-H,R=W}}else if(f<E){if(K+=l+f-E,E-=f,E<k){k-=E;do W[i++]=h[K++];while(--E);if(K=0,f<k){E=f,k-=E;do W[i++]=h[K++];while(--E);K=i-H,R=W}}}else if(K+=f-E,E<k){k-=E;do W[i++]=h[K++];while(--E);K=i-H,R=W}for(;k>2;)W[i++]=R[K++],W[i++]=R[K++],W[i++]=R[K++],k-=3;k&&(W[i++]=R[K++],k>1&&(W[i++]=R[K++]))}else{K=i-H;do W[i++]=W[K++],W[i++]=W[K++],W[i++]=W[K++],k-=3;while(k>2);k&&(W[i++]=W[K++],k>1&&(W[i++]=W[K++]))}}else if((E&64)===0){x=w[(x&65535)+(u&(1<<E)-1)];continue r}else{e.msg="invalid distance code",L.mode=ru;break e}break}}else if((E&64)===0){x=p[(x&65535)+(u&(1<<E)-1)];continue t}else if(E&32){L.mode=h_;break e}else{e.msg="invalid literal/length code",L.mode=ru;break e}break}}while(A<n&&i<a);k=g>>3,A-=k,g-=k<<3,u&=(1<<g)-1,e.next_in=A,e.next_out=i,e.avail_in=A<n?5+(n-A):5-(A-n),e.avail_out=i<a?257+(a-i):257-(i-a),L.hold=u,L.bits=g};const fo=15,zm=852,Gm=592,Vm=0,dd=1,qm=2,p_=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),g_=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,199,75]),v_=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),m_=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var xl=(t,e,r,A,n,i,s,a)=>{const o=a.bits;let l=0,c=0,f=0,h=0,u=0,g=0,p=0,w=0,m=0,B=0,x,E,k,H,K,R=null,I;const W=new Uint16Array(fo+1),L=new Uint16Array(fo+1);let F=null,M,b,Y;for(l=0;l<=fo;l++)W[l]=0;for(c=0;c<A;c++)W[e[r+c]]++;for(u=o,h=fo;h>=1&&W[h]===0;h--);if(u>h&&(u=h),h===0)return n[i++]=1<<24|64<<16|0,n[i++]=1<<24|64<<16|0,a.bits=1,0;for(f=1;f<h&&W[f]===0;f++);for(u<f&&(u=f),w=1,l=1;l<=fo;l++)if(w<<=1,w-=W[l],w<0)return-1;if(w>0&&(t===Vm||h!==1))return-1;for(L[1]=0,l=1;l<fo;l++)L[l+1]=L[l]+W[l];for(c=0;c<A;c++)e[r+c]!==0&&(s[L[e[r+c]]++]=c);if(t===Vm?(R=F=s,I=20):t===dd?(R=p_,F=g_,I=257):(R=v_,F=m_,I=0),B=0,c=0,l=f,K=i,g=u,p=0,k=-1,m=1<<u,H=m-1,t===dd&&m>zm||t===qm&&m>Gm)return 1;for(;;){M=l-p,s[c]+1<I?(b=0,Y=s[c]):s[c]>=I?(b=F[s[c]-I],Y=R[s[c]-I]):(b=96,Y=0),x=1<<l-p,E=1<<g,f=E;do E-=x,n[K+(B>>p)+E]=M<<24|b<<16|Y|0;while(E!==0);for(x=1<<l-1;B&x;)x>>=1;if(x!==0?(B&=x-1,B+=x):B=0,c++,--W[l]===0){if(l===h)break;l=e[r+s[c]]}if(l>u&&(B&H)!==k){for(p===0&&(p=u),K+=f,g=l-p,w=1<<g;g+p<h&&(w-=W[g+p],!(w<=0));)g++,w<<=1;if(m+=1<<g,t===dd&&m>zm||t===qm&&m>Gm)return 1;k=B&H,n[k]=u<<24|g<<16|K-i|0}}return B!==0&&(n[K+B]=l-p<<24|64<<16|0),a.bits=u,0};const w_=0,Wm=1,$m=2,{Z_FINISH:Ym,Z_BLOCK:y_,Z_TREES:Au,Z_OK:ls,Z_STREAM_END:B_,Z_NEED_DICT:b_,Z_STREAM_ERROR:Ln,Z_DATA_ERROR:Xm,Z_MEM_ERROR:Jm,Z_BUF_ERROR:C_,Z_DEFLATED:Zm}=Rm,nu=16180,ew=16181,tw=16182,rw=16183,Aw=16184,nw=16185,iw=16186,aw=16187,sw=16188,ow=16189,iu=16190,ki=16191,pd=16192,lw=16193,gd=16194,cw=16195,uw=16196,fw=16197,hw=16198,au=16199,su=16200,dw=16201,pw=16202,gw=16203,vw=16204,mw=16205,vd=16206,ww=16207,yw=16208,mr=16209,Bw=16210,bw=16211,x_=852,E_=592,S_=15,Cw=t=>(t>>>24&255)+(t>>>8&65280)+((t&65280)<<8)+((t&255)<<24);function F_(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const cs=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.mode<nu||e.mode>bw?1:0},xw=t=>{if(cs(t))return Ln;const e=t.state;return t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=e.wrap&1),e.mode=nu,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(x_),e.distcode=e.distdyn=new Int32Array(E_),e.sane=1,e.back=-1,ls},Ew=t=>{if(cs(t))return Ln;const e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,xw(t)},Sw=(t,e)=>{let r;if(cs(t))return Ln;const A=t.state;return e<0?(r=0,e=-e):(r=(e>>4)+5,e<48&&(e&=15)),e&&(e<8||e>15)?Ln:(A.window!==null&&A.wbits!==e&&(A.window=null),A.wrap=r,A.wbits=e,Ew(t))},Fw=(t,e)=>{if(!t)return Ln;const r=new F_;t.state=r,r.strm=t,r.window=null,r.mode=nu;const A=Sw(t,e);return A!==ls&&(t.state=null),A},I_=t=>Fw(t,S_);let Iw=!0,md,wd;const U_=t=>{if(Iw){md=new Int32Array(512),wd=new Int32Array(32);let e=0;for(;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(xl(Wm,t.lens,0,288,md,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;xl($m,t.lens,0,32,wd,0,t.work,{bits:5}),Iw=!1}t.lencode=md,t.lenbits=9,t.distcode=wd,t.distbits=5},Uw=(t,e,r,A)=>{let n;const i=t.state;return i.window===null&&(i.window=new Uint8Array(1<<i.wbits)),i.wsize===0&&(i.wsize=1<<i.wbits,i.wnext=0,i.whave=0),A>=i.wsize?(i.window.set(e.subarray(r-i.wsize,r),0),i.wnext=0,i.whave=i.wsize):(n=i.wsize-i.wnext,n>A&&(n=A),i.window.set(e.subarray(r-A,r-A+n),i.wnext),A-=n,A?(i.window.set(e.subarray(r-A,r),0),i.wnext=A,i.whave=i.wsize):(i.wnext+=n,i.wnext===i.wsize&&(i.wnext=0),i.whave<i.wsize&&(i.whave+=n))),0},__=(t,e)=>{let r,A,n,i,s,a,o,l,c,f,h,u,g,p,w=0,m,B,x,E,k,H,K,R;const I=new Uint8Array(4);let W,L;const F=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(cs(t)||!t.output||!t.input&&t.avail_in!==0)return Ln;r=t.state,r.mode===ki&&(r.mode=pd),s=t.next_out,n=t.output,o=t.avail_out,i=t.next_in,A=t.input,a=t.avail_in,l=r.hold,c=r.bits,f=a,h=o,R=ls;e:for(;;)switch(r.mode){case nu:if(r.wrap===0){r.mode=pd;break}for(;c<16;){if(a===0)break e;a--,l+=A[i++]<<c,c+=8}if(r.wrap&2&&l===35615){r.wbits===0&&(r.wbits=15),r.check=0,I[0]=l&255,I[1]=l>>>8&255,r.check=fi(r.check,I,2,0),l=0,c=0,r.mode=ew;break}if(r.head&&(r.head.done=!1),!(r.wrap&1)||(((l&255)<<8)+(l>>8))%31){t.msg="incorrect header check",r.mode=mr;break}if((l&15)!==Zm){t.msg="unknown compression method",r.mode=mr;break}if(l>>>=4,c-=4,K=(l&15)+8,r.wbits===0&&(r.wbits=K),K>15||K>r.wbits){t.msg="invalid window size",r.mode=mr;break}r.dmax=1<<r.wbits,r.flags=0,t.adler=r.check=1,r.mode=l&512?ow:ki,l=0,c=0;break;case ew:for(;c<16;){if(a===0)break e;a--,l+=A[i++]<<c,c+=8}if(r.flags=l,(r.flags&255)!==Zm){t.msg="unknown compression method",r.mode=mr;break}if(r.flags&57344){t.msg="unknown header flags set",r.mode=mr;break}r.head&&(r.head.text=l>>8&1),r.flags&512&&r.wrap&4&&(I[0]=l&255,I[1]=l>>>8&255,r.check=fi(r.check,I,2,0)),l=0,c=0,r.mode=tw;case tw:for(;c<32;){if(a===0)break e;a--,l+=A[i++]<<c,c+=8}r.head&&(r.head.time=l),r.flags&512&&r.wrap&4&&(I[0]=l&255,I[1]=l>>>8&255,I[2]=l>>>16&255,I[3]=l>>>24&255,r.check=fi(r.check,I,4,0)),l=0,c=0,r.mode=rw;case rw:for(;c<16;){if(a===0)break e;a--,l+=A[i++]<<c,c+=8}r.head&&(r.head.xflags=l&255,r.head.os=l>>8),r.flags&512&&r.wrap&4&&(I[0]=l&255,I[1]=l>>>8&255,r.check=fi(r.check,I,2,0)),l=0,c=0,r.mode=Aw;case Aw:if(r.flags&1024){for(;c<16;){if(a===0)break e;a--,l+=A[i++]<<c,c+=8}r.length=l,r.head&&(r.head.extra_len=l),r.flags&512&&r.wrap&4&&(I[0]=l&255,I[1]=l>>>8&255,r.check=fi(r.check,I,2,0)),l=0,c=0}else r.head&&(r.head.extra=null);r.mode=nw;case nw:if(r.flags&1024&&(u=r.length,u>a&&(u=a),u&&(r.head&&(K=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Uint8Array(r.head.extra_len)),r.head.extra.set(A.subarray(i,i+u),K)),r.flags&512&&r.wrap&4&&(r.check=fi(r.check,A,u,i)),a-=u,i+=u,r.length-=u),r.length))break e;r.length=0,r.mode=iw;case iw:if(r.flags&2048){if(a===0)break e;u=0;do K=A[i+u++],r.head&&K&&r.length<65536&&(r.head.name+=String.fromCharCode(K));while(K&&u<a);if(r.flags&512&&r.wrap&4&&(r.check=fi(r.check,A,u,i)),a-=u,i+=u,K)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=aw;case aw:if(r.flags&4096){if(a===0)break e;u=0;do K=A[i+u++],r.head&&K&&r.length<65536&&(r.head.comment+=String.fromCharCode(K));while(K&&u<a);if(r.flags&512&&r.wrap&4&&(r.check=fi(r.check,A,u,i)),a-=u,i+=u,K)break e}else r.head&&(r.head.comment=null);r.mode=sw;case sw:if(r.flags&512){for(;c<16;){if(a===0)break e;a--,l+=A[i++]<<c,c+=8}if(r.wrap&4&&l!==(r.check&65535)){t.msg="header crc mismatch",r.mode=mr;break}l=0,c=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=ki;break;case ow:for(;c<32;){if(a===0)break e;a--,l+=A[i++]<<c,c+=8}t.adler=r.check=Cw(l),l=0,c=0,r.mode=iu;case iu:if(r.havedict===0)return t.next_out=s,t.avail_out=o,t.next_in=i,t.avail_in=a,r.hold=l,r.bits=c,b_;t.adler=r.check=1,r.mode=ki;case ki:if(e===y_||e===Au)break e;case pd:if(r.last){l>>>=c&7,c-=c&7,r.mode=vd;break}for(;c<3;){if(a===0)break e;a--,l+=A[i++]<<c,c+=8}switch(r.last=l&1,l>>>=1,c-=1,l&3){case 0:r.mode=lw;break;case 1:if(U_(r),r.mode=au,e===Au){l>>>=2,c-=2;break e}break;case 2:r.mode=uw;break;case 3:t.msg="invalid block type",r.mode=mr}l>>>=2,c-=2;break;case lw:for(l>>>=c&7,c-=c&7;c<32;){if(a===0)break e;a--,l+=A[i++]<<c,c+=8}if((l&65535)!==(l>>>16^65535)){t.msg="invalid stored block lengths",r.mode=mr;break}if(r.length=l&65535,l=0,c=0,r.mode=gd,e===Au)break e;case gd:r.mode=cw;case cw:if(u=r.length,u){if(u>a&&(u=a),u>o&&(u=o),u===0)break e;n.set(A.subarray(i,i+u),s),a-=u,i+=u,o-=u,s+=u,r.length-=u;break}r.mode=ki;break;case uw:for(;c<14;){if(a===0)break e;a--,l+=A[i++]<<c,c+=8}if(r.nlen=(l&31)+257,l>>>=5,c-=5,r.ndist=(l&31)+1,l>>>=5,c-=5,r.ncode=(l&15)+4,l>>>=4,c-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=mr;break}r.have=0,r.mode=fw;case fw:for(;r.have<r.ncode;){for(;c<3;){if(a===0)break e;a--,l+=A[i++]<<c,c+=8}r.lens[F[r.have++]]=l&7,l>>>=3,c-=3}for(;r.have<19;)r.lens[F[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,W={bits:r.lenbits},R=xl(w_,r.lens,0,19,r.lencode,0,r.work,W),r.lenbits=W.bits,R){t.msg="invalid code lengths set",r.mode=mr;break}r.have=0,r.mode=hw;case hw:for(;r.have<r.nlen+r.ndist;){for(;w=r.lencode[l&(1<<r.lenbits)-1],m=w>>>24,B=w>>>16&255,x=w&65535,!(m<=c);){if(a===0)break e;a--,l+=A[i++]<<c,c+=8}if(x<16)l>>>=m,c-=m,r.lens[r.have++]=x;else{if(x===16){for(L=m+2;c<L;){if(a===0)break e;a--,l+=A[i++]<<c,c+=8}if(l>>>=m,c-=m,r.have===0){t.msg="invalid bit length repeat",r.mode=mr;break}K=r.lens[r.have-1],u=3+(l&3),l>>>=2,c-=2}else if(x===17){for(L=m+3;c<L;){if(a===0)break e;a--,l+=A[i++]<<c,c+=8}l>>>=m,c-=m,K=0,u=3+(l&7),l>>>=3,c-=3}else{for(L=m+7;c<L;){if(a===0)break e;a--,l+=A[i++]<<c,c+=8}l>>>=m,c-=m,K=0,u=11+(l&127),l>>>=7,c-=7}if(r.have+u>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=mr;break}for(;u--;)r.lens[r.have++]=K}}if(r.mode===mr)break;if(r.lens[256]===0){t.msg="invalid code -- missing end-of-block",r.mode=mr;break}if(r.lenbits=9,W={bits:r.lenbits},R=xl(Wm,r.lens,0,r.nlen,r.lencode,0,r.work,W),r.lenbits=W.bits,R){t.msg="invalid literal/lengths set",r.mode=mr;break}if(r.distbits=6,r.distcode=r.distdyn,W={bits:r.distbits},R=xl($m,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,W),r.distbits=W.bits,R){t.msg="invalid distances set",r.mode=mr;break}if(r.mode=au,e===Au)break e;case au:r.mode=su;case su:if(a>=6&&o>=258){t.next_out=s,t.avail_out=o,t.next_in=i,t.avail_in=a,r.hold=l,r.bits=c,d_(t,h),s=t.next_out,n=t.output,o=t.avail_out,i=t.next_in,A=t.input,a=t.avail_in,l=r.hold,c=r.bits,r.mode===ki&&(r.back=-1);break}for(r.back=0;w=r.lencode[l&(1<<r.lenbits)-1],m=w>>>24,B=w>>>16&255,x=w&65535,!(m<=c);){if(a===0)break e;a--,l+=A[i++]<<c,c+=8}if(B&&(B&240)===0){for(E=m,k=B,H=x;w=r.lencode[H+((l&(1<<E+k)-1)>>E)],m=w>>>24,B=w>>>16&255,x=w&65535,!(E+m<=c);){if(a===0)break e;a--,l+=A[i++]<<c,c+=8}l>>>=E,c-=E,r.back+=E}if(l>>>=m,c-=m,r.back+=m,r.length=x,B===0){r.mode=mw;break}if(B&32){r.back=-1,r.mode=ki;break}if(B&64){t.msg="invalid literal/length code",r.mode=mr;break}r.extra=B&15,r.mode=dw;case dw:if(r.extra){for(L=r.extra;c<L;){if(a===0)break e;a--,l+=A[i++]<<c,c+=8}r.length+=l&(1<<r.extra)-1,l>>>=r.extra,c-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=pw;case pw:for(;w=r.distcode[l&(1<<r.distbits)-1],m=w>>>24,B=w>>>16&255,x=w&65535,!(m<=c);){if(a===0)break e;a--,l+=A[i++]<<c,c+=8}if((B&240)===0){for(E=m,k=B,H=x;w=r.distcode[H+((l&(1<<E+k)-1)>>E)],m=w>>>24,B=w>>>16&255,x=w&65535,!(E+m<=c);){if(a===0)break e;a--,l+=A[i++]<<c,c+=8}l>>>=E,c-=E,r.back+=E}if(l>>>=m,c-=m,r.back+=m,B&64){t.msg="invalid distance code",r.mode=mr;break}r.offset=x,r.extra=B&15,r.mode=gw;case gw:if(r.extra){for(L=r.extra;c<L;){if(a===0)break e;a--,l+=A[i++]<<c,c+=8}r.offset+=l&(1<<r.extra)-1,l>>>=r.extra,c-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=mr;break}r.mode=vw;case vw:if(o===0)break e;if(u=h-o,r.offset>u){if(u=r.offset-u,u>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=mr;break}u>r.wnext?(u-=r.wnext,g=r.wsize-u):g=r.wnext-u,u>r.length&&(u=r.length),p=r.window}else p=n,g=s-r.offset,u=r.length;u>o&&(u=o),o-=u,r.length-=u;do n[s++]=p[g++];while(--u);r.length===0&&(r.mode=su);break;case mw:if(o===0)break e;n[s++]=r.length,o--,r.mode=su;break;case vd:if(r.wrap){for(;c<32;){if(a===0)break e;a--,l|=A[i++]<<c,c+=8}if(h-=o,t.total_out+=h,r.total+=h,r.wrap&4&&h&&(t.adler=r.check=r.flags?fi(r.check,n,h,s-h):ud(r.check,n,h,s-h)),h=o,r.wrap&4&&(r.flags?l:Cw(l))!==r.check){t.msg="incorrect data check",r.mode=mr;break}l=0,c=0}r.mode=ww;case ww:if(r.wrap&&r.flags){for(;c<32;){if(a===0)break e;a--,l+=A[i++]<<c,c+=8}if(r.wrap&4&&l!==(r.total&4294967295)){t.msg="incorrect length check",r.mode=mr;break}l=0,c=0}r.mode=yw;case yw:R=B_;break e;case mr:R=Xm;break e;case Bw:return Jm;case bw:default:return Ln}return t.next_out=s,t.avail_out=o,t.next_in=i,t.avail_in=a,r.hold=l,r.bits=c,(r.wsize||h!==t.avail_out&&r.mode<mr&&(r.mode<vd||e!==Ym))&&Uw(t,t.output,t.next_out,h-t.avail_out),f-=t.avail_in,h-=t.avail_out,t.total_in+=f,t.total_out+=h,r.total+=h,r.wrap&4&&h&&(t.adler=r.check=r.flags?fi(r.check,n,h,t.next_out-h):ud(r.check,n,h,t.next_out-h)),t.data_type=r.bits+(r.last?64:0)+(r.mode===ki?128:0)+(r.mode===au||r.mode===gd?256:0),(f===0&&h===0||e===Ym)&&R===ls&&(R=C_),R},Q_=t=>{if(cs(t))return Ln;let e=t.state;return e.window&&(e.window=null),t.state=null,ls},k_=(t,e)=>{if(cs(t))return Ln;const r=t.state;return(r.wrap&2)===0?Ln:(r.head=e,e.done=!1,ls)},L_=(t,e)=>{const r=e.length;let A,n,i;return cs(t)||(A=t.state,A.wrap!==0&&A.mode!==iu)?Ln:A.mode===iu&&(n=1,n=ud(n,e,r,0),n!==A.check)?Xm:(i=Uw(t,e,r,r),i?(A.mode=Bw,Jm):(A.havedict=1,ls))};var T_=Ew,N_=Sw,O_=xw,P_=I_,M_=Fw,D_=__,H_=Q_,R_=k_,j_=L_,K_="pako inflate (from Nodeca project)",hi={inflateReset:T_,inflateReset2:N_,inflateResetKeep:O_,inflateInit:P_,inflateInit2:M_,inflate:D_,inflateEnd:H_,inflateGetHeader:R_,inflateSetDictionary:j_,inflateInfo:K_};function z_(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var G_=z_;const _w=Object.prototype.toString,{Z_NO_FLUSH:V_,Z_FINISH:Qw,Z_OK:ho,Z_STREAM_END:yd,Z_NEED_DICT:Bd,Z_STREAM_ERROR:q_,Z_DATA_ERROR:kw,Z_MEM_ERROR:W_,Z_BUF_ERROR:Lw}=Rm,$_={chunkSize:1024*64,windowBits:15,to:""};function El(t){this.options=jm.assign({},$_,t||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,e.windowBits===0&&(e.windowBits=-15)),e.windowBits>=0&&e.windowBits<16&&!(t&&t.windowBits)&&(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&(e.windowBits&15)===0&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new f_,this.strm.avail_out=0;let r=hi.inflateInit2(this.strm,e.windowBits);if(r!==ho)throw new Error(fd[r]);if(this.header=new G_,hi.inflateGetHeader(this.strm,this.header),e.dictionary&&(typeof e.dictionary=="string"?e.dictionary=hd.string2buf(e.dictionary):_w.call(e.dictionary)==="[object ArrayBuffer]"&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(r=hi.inflateSetDictionary(this.strm,e.dictionary),r!==ho)))throw new Error(fd[r])}El.prototype.push=function(t,e){const r=this.strm,A=this.options.chunkSize,n=this.options.dictionary;let i,s,a;if(this.ended)return!1;for(e===~~e?s=e:s=e===!0?Qw:V_,_w.call(t)==="[object ArrayBuffer]"?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;){for(r.avail_out===0&&(r.output=new Uint8Array(A),r.next_out=0,r.avail_out=A),i=hi.inflate(r,s),i===Bd&&n&&(i=hi.inflateSetDictionary(r,n),i===ho?i=hi.inflate(r,s):i===kw&&(i=Bd));r.avail_in>0&&i===yd&&r.state.wrap&2&&r.state.flags!==0&&r.input[r.next_in]!==0;)hi.inflateReset(r),i=hi.inflate(r,s);switch(i){case q_:case kw:case Bd:case W_:return this.onEnd(i),this.ended=!0,!1}if(a=r.avail_out,r.next_out&&(r.avail_out===0||i===yd||s>0))if(this.options.to==="string"){let o=hd.utf8border(r.output,r.next_out),l=r.next_out-o,c=hd.buf2string(r.output,o);r.next_out=l,r.avail_out=A-l,l&&r.output.set(r.output.subarray(o,o+l),0),this.onData(c)}else this.onData(r.output.length===r.next_out?r.output:r.output.subarray(0,r.next_out)),r.avail_out=0,r.next_out=0;if(!((i===ho||i===Lw)&&a===0)){if(i===yd)return i=hi.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,!0;if(r.avail_in===0){if(s===Qw)return i=hi.inflateEnd(this.strm),this.onEnd(i===ho?Lw:i),this.ended=!0,!1;break}}}return!0},El.prototype.onData=function(t){this.chunks.push(t)},El.prototype.onEnd=function(t){t===ho&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=jm.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};function Y_(t,e){const r=new El(e);if(r.push(t,!0),r.err)throw r.msg||fd[r.err];return r.result}var X_=El,J_=Y_,Z_={Inflate:X_,inflate:J_};const{Inflate:eQ,inflate:tQ}=Z_;var Tw=eQ,rQ=tQ;const Nw=[];for(let t=0;t<256;t++){let e=t;for(let r=0;r<8;r++)e&1?e=3988292384^e>>>1:e=e>>>1;Nw[t]=e}const Ow=4294967295;function AQ(t,e,r){let A=t;for(let n=0;n<r;n++)A=Nw[(A^e[n])&255]^A>>>8;return A}function nQ(t,e){return(AQ(Ow,t,e)^Ow)>>>0}function Pw(t,e,r){const A=t.readUint32(),n=nQ(new Uint8Array(t.buffer,t.byteOffset+t.offset-e-4,e),e);if(n!==A)throw new Error(`CRC mismatch for chunk ${r}. Expected ${A}, found ${n}`)}function Mw(t,e,r){for(let A=0;A<r;A++)e[A]=t[A]}function Dw(t,e,r,A){let n=0;for(;n<A;n++)e[n]=t[n];for(;n<r;n++)e[n]=t[n]+e[n-A]&255}function Hw(t,e,r,A){let n=0;if(r.length===0)for(;n<A;n++)e[n]=t[n];else for(;n<A;n++)e[n]=t[n]+r[n]&255}function Rw(t,e,r,A,n){let i=0;if(r.length===0){for(;i<n;i++)e[i]=t[i];for(;i<A;i++)e[i]=t[i]+(e[i-n]>>1)&255}else{for(;i<n;i++)e[i]=t[i]+(r[i]>>1)&255;for(;i<A;i++)e[i]=t[i]+(e[i-n]+r[i]>>1)&255}}function jw(t,e,r,A,n){let i=0;if(r.length===0){for(;i<n;i++)e[i]=t[i];for(;i<A;i++)e[i]=t[i]+e[i-n]&255}else{for(;i<n;i++)e[i]=t[i]+r[i]&255;for(;i<A;i++)e[i]=t[i]+iQ(e[i-n],r[i],r[i-n])&255}}function iQ(t,e,r){const A=t+e-r,n=Math.abs(A-t),i=Math.abs(A-e),s=Math.abs(A-r);return n<=i&&n<=s?t:i<=s?e:r}function aQ(t,e,r,A,n,i){switch(t){case 0:Mw(e,r,n);break;case 1:Dw(e,r,n,i);break;case 2:Hw(e,r,A,n);break;case 3:Rw(e,r,A,n,i);break;case 4:jw(e,r,A,n,i);break;default:throw new Error(`Unsupported filter: ${t}`)}}const sQ=new Uint16Array([255]),oQ=new Uint8Array(sQ.buffer)[0]===255;function lQ(t){const{data:e,width:r,height:A,channels:n,depth:i}=t,s=[{x:0,y:0,xStep:8,yStep:8},{x:4,y:0,xStep:8,yStep:8},{x:0,y:4,xStep:4,yStep:8},{x:2,y:0,xStep:4,yStep:4},{x:0,y:2,xStep:2,yStep:4},{x:1,y:0,xStep:2,yStep:2},{x:0,y:1,xStep:1,yStep:2}],a=Math.ceil(i/8)*n,o=new Uint8Array(A*r*a);let l=0;for(let c=0;c<7;c++){const f=s[c],h=Math.ceil((r-f.x)/f.xStep),u=Math.ceil((A-f.y)/f.yStep);if(h<=0||u<=0)continue;const g=h*a,p=new Uint8Array(g);for(let w=0;w<u;w++){const m=e[l++],B=e.subarray(l,l+g);l+=g;const x=new Uint8Array(g);aQ(m,B,x,p,g,a),p.set(x);for(let E=0;E<h;E++){const k=f.x+E*f.xStep,H=f.y+w*f.yStep;if(!(k>=r||H>=A))for(let K=0;K<a;K++)o[(H*r+k)*a+K]=x[E*a+K]}}}if(i===16){const c=new Uint16Array(o.buffer);if(oQ)for(let f=0;f<c.length;f++)c[f]=cQ(c[f]);return c}else return o}function cQ(t){return(t&255)<<8|t>>8&255}const uQ=new Uint16Array([255]),fQ=new Uint8Array(uQ.buffer)[0]===255,hQ=new Uint8Array(0);function Kw(t){const{data:e,width:r,height:A,channels:n,depth:i}=t,s=Math.ceil(i/8)*n,a=Math.ceil(i/8*n*r),o=new Uint8Array(A*a);let l=hQ,c=0,f,h;for(let u=0;u<A;u++){switch(f=e.subarray(c+1,c+1+a),h=o.subarray(u*a,(u+1)*a),e[c]){case 0:Mw(f,h,a);break;case 1:Dw(f,h,a,s);break;case 2:Hw(f,h,l,a);break;case 3:Rw(f,h,l,a,s);break;case 4:jw(f,h,l,a,s);break;default:throw new Error(`Unsupported filter: ${e[c]}`)}l=h,c+=a+1}if(i===16){const u=new Uint16Array(o.buffer);if(fQ)for(let g=0;g<u.length;g++)u[g]=dQ(u[g]);return u}else return o}function dQ(t){return(t&255)<<8|t>>8&255}const ou=Uint8Array.of(137,80,78,71,13,10,26,10);function zw(t){if(!pQ(t.readBytes(ou.length)))throw new Error("wrong PNG signature")}function pQ(t){if(t.length<ou.length)return!1;for(let e=0;e<ou.length;e++)if(t[e]!==ou[e])return!1;return!0}const gQ="tEXt",vQ=0,Gw=new TextDecoder("latin1");function mQ(t){if(yQ(t),t.length===0||t.length>79)throw new Error("keyword length must be between 1 and 79")}const wQ=/^[\u0000-\u00FF]*$/;function yQ(t){if(!wQ.test(t))throw new Error("invalid latin1 text")}function BQ(t,e,r){const A=Vw(e);t[A]=bQ(e,r-A.length-1)}function Vw(t){for(t.mark();t.readByte()!==vQ;);const e=t.offset;t.reset();const r=Gw.decode(t.readBytes(e-t.offset-1));return t.skip(1),mQ(r),r}function bQ(t,e){return Gw.decode(t.readBytes(e))}const gn={UNKNOWN:-1,GREYSCALE:0,TRUECOLOUR:2,INDEXED_COLOUR:3,GREYSCALE_ALPHA:4,TRUECOLOUR_ALPHA:6},bd={UNKNOWN:-1,DEFLATE:0},qw={UNKNOWN:-1,ADAPTIVE:0},Cd={UNKNOWN:-1,NO_INTERLACE:0,ADAM7:1},lu={NONE:0,BACKGROUND:1,PREVIOUS:2},xd={SOURCE:0,OVER:1};class CQ extends cd{_checkCrc;_inflator;_png;_apng;_end;_hasPalette;_palette;_hasTransparency;_transparency;_compressionMethod;_filterMethod;_interlaceMethod;_colorType;_isAnimated;_numberOfFrames;_numberOfPlays;_frames;_writingDataChunks;constructor(e,r={}){super(e);const{checkCrc:A=!1}=r;this._checkCrc=A,this._inflator=new Tw,this._png={width:-1,height:-1,channels:-1,data:new Uint8Array(0),depth:1,text:{}},this._apng={width:-1,height:-1,channels:-1,depth:1,numberOfFrames:1,numberOfPlays:0,text:{},frames:[]},this._end=!1,this._hasPalette=!1,this._palette=[],this._hasTransparency=!1,this._transparency=new Uint16Array(0),this._compressionMethod=bd.UNKNOWN,this._filterMethod=qw.UNKNOWN,this._interlaceMethod=Cd.UNKNOWN,this._colorType=gn.UNKNOWN,this._isAnimated=!1,this._numberOfFrames=1,this._numberOfPlays=0,this._frames=[],this._writingDataChunks=!1,this.setBigEndian()}decode(){for(zw(this);!this._end;){const e=this.readUint32(),r=this.readChars(4);this.decodeChunk(e,r)}return this.decodeImage(),this._png}decodeApng(){for(zw(this);!this._end;){const e=this.readUint32(),r=this.readChars(4);this.decodeApngChunk(e,r)}return this.decodeApngImage(),this._apng}decodeChunk(e,r){const A=this.offset;switch(r){case"IHDR":this.decodeIHDR();break;case"PLTE":this.decodePLTE(e);break;case"IDAT":this.decodeIDAT(e);break;case"IEND":this._end=!0;break;case"tRNS":this.decodetRNS(e);break;case"iCCP":this.decodeiCCP(e);break;case gQ:BQ(this._png.text,this,e);break;case"pHYs":this.decodepHYs();break;default:this.skip(e);break}if(this.offset-A!==e)throw new Error(`Length mismatch while decoding chunk ${r}`);this._checkCrc?Pw(this,e+4,r):this.skip(4)}decodeApngChunk(e,r){const A=this.offset;switch(r!=="fdAT"&&r!=="IDAT"&&this._writingDataChunks&&this.pushDataToFrame(),r){case"acTL":this.decodeACTL();break;case"fcTL":this.decodeFCTL();break;case"fdAT":this.decodeFDAT(e);break;default:this.decodeChunk(e,r),this.offset=A+e;break}if(this.offset-A!==e)throw new Error(`Length mismatch while decoding chunk ${r}`);this._checkCrc?Pw(this,e+4,r):this.skip(4)}decodeIHDR(){const e=this._png;e.width=this.readUint32(),e.height=this.readUint32(),e.depth=xQ(this.readUint8());const r=this.readUint8();this._colorType=r;let A;switch(r){case gn.GREYSCALE:A=1;break;case gn.TRUECOLOUR:A=3;break;case gn.INDEXED_COLOUR:A=1;break;case gn.GREYSCALE_ALPHA:A=2;break;case gn.TRUECOLOUR_ALPHA:A=4;break;case gn.UNKNOWN:default:throw new Error(`Unknown color type: ${r}`)}if(this._png.channels=A,this._compressionMethod=this.readUint8(),this._compressionMethod!==bd.DEFLATE)throw new Error(`Unsupported compression method: ${this._compressionMethod}`);this._filterMethod=this.readUint8(),this._interlaceMethod=this.readUint8()}decodeACTL(){this._numberOfFrames=this.readUint32(),this._numberOfPlays=this.readUint32(),this._isAnimated=!0}decodeFCTL(){const e={sequenceNumber:this.readUint32(),width:this.readUint32(),height:this.readUint32(),xOffset:this.readUint32(),yOffset:this.readUint32(),delayNumber:this.readUint16(),delayDenominator:this.readUint16(),disposeOp:this.readUint8(),blendOp:this.readUint8(),data:new Uint8Array(0)};this._frames.push(e)}decodePLTE(e){if(e%3!==0)throw new RangeError(`PLTE field length must be a multiple of 3. Got ${e}`);const r=e/3;this._hasPalette=!0;const A=[];this._palette=A;for(let n=0;n<r;n++)A.push([this.readUint8(),this.readUint8(),this.readUint8()])}decodeIDAT(e){this._writingDataChunks=!0;const r=e,A=this.offset+this.byteOffset;if(this._inflator.push(new Uint8Array(this.buffer,A,r)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(e)}decodeFDAT(e){this._writingDataChunks=!0;let r=e,A=this.offset+this.byteOffset;if(A+=4,r-=4,this._inflator.push(new Uint8Array(this.buffer,A,r)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(e)}decodetRNS(e){switch(this._colorType){case gn.GREYSCALE:case gn.TRUECOLOUR:{if(e%2!==0)throw new RangeError(`tRNS chunk length must be a multiple of 2. Got ${e}`);if(e/2>this._png.width*this._png.height)throw new Error(`tRNS chunk contains more alpha values than there are pixels (${e/2} vs ${this._png.width*this._png.height})`);this._hasTransparency=!0,this._transparency=new Uint16Array(e/2);for(let r=0;r<e/2;r++)this._transparency[r]=this.readUint16();break}case gn.INDEXED_COLOUR:{if(e>this._palette.length)throw new Error(`tRNS chunk contains more alpha values than there are palette colors (${e} vs ${this._palette.length})`);let r=0;for(;r<e;r++){const A=this.readByte();this._palette[r].push(A)}for(;r<this._palette.length;r++)this._palette[r].push(255);break}case gn.UNKNOWN:case gn.GREYSCALE_ALPHA:case gn.TRUECOLOUR_ALPHA:default:throw new Error(`tRNS chunk is not supported for color type ${this._colorType}`)}}decodeiCCP(e){const r=Vw(this),A=this.readUint8();if(A!==bd.DEFLATE)throw new Error(`Unsupported iCCP compression method: ${A}`);const n=this.readBytes(e-r.length-2);this._png.iccEmbeddedProfile={name:r,profile:rQ(n)}}decodepHYs(){const e=this.readUint32(),r=this.readUint32(),A=this.readByte();this._png.resolution={x:e,y:r,unit:A}}decodeApngImage(){this._apng.width=this._png.width,this._apng.height=this._png.height,this._apng.channels=this._png.channels,this._apng.depth=this._png.depth,this._apng.numberOfFrames=this._numberOfFrames,this._apng.numberOfPlays=this._numberOfPlays,this._apng.text=this._png.text,this._apng.resolution=this._png.resolution;for(let e=0;e<this._numberOfFrames;e++){const r={sequenceNumber:this._frames[e].sequenceNumber,delayNumber:this._frames[e].delayNumber,delayDenominator:this._frames[e].delayDenominator,data:this._apng.depth===8?new Uint8Array(this._apng.width*this._apng.height*this._apng.channels):new Uint16Array(this._apng.width*this._apng.height*this._apng.channels)},A=this._frames.at(e);if(A){if(A.data=Kw({data:A.data,width:A.width,height:A.height,channels:this._apng.channels,depth:this._apng.depth}),this._hasPalette&&(this._apng.palette=this._palette),this._hasTransparency&&(this._apng.transparency=this._transparency),e===0||A.xOffset===0&&A.yOffset===0&&A.width===this._png.width&&A.height===this._png.height)r.data=A.data;else{const n=this._apng.frames.at(e-1);this.disposeFrame(A,n,r),this.addFrameDataToCanvas(r,A)}this._apng.frames.push(r)}}return this._apng}disposeFrame(e,r,A){switch(e.disposeOp){case lu.NONE:break;case lu.BACKGROUND:for(let n=0;n<this._png.height;n++)for(let i=0;i<this._png.width;i++){const s=(n*e.width+i)*this._png.channels;for(let a=0;a<this._png.channels;a++)A.data[s+a]=0}break;case lu.PREVIOUS:A.data.set(r.data);break;default:throw new Error("Unknown disposeOp")}}addFrameDataToCanvas(e,r){const A=1<<this._png.depth,n=(i,s)=>{const a=((i+r.yOffset)*this._png.width+r.xOffset+s)*this._png.channels,o=(i*r.width+s)*this._png.channels;return{index:a,frameIndex:o}};switch(r.blendOp){case xd.SOURCE:for(let i=0;i<r.height;i++)for(let s=0;s<r.width;s++){const{index:a,frameIndex:o}=n(i,s);for(let l=0;l<this._png.channels;l++)e.data[a+l]=r.data[o+l]}break;case xd.OVER:for(let i=0;i<r.height;i++)for(let s=0;s<r.width;s++){const{index:a,frameIndex:o}=n(i,s);for(let l=0;l<this._png.channels;l++){const c=r.data[o+this._png.channels-1]/A,f=l%(this._png.channels-1)===0?1:r.data[o+l],h=Math.floor(c*f+(1-c)*e.data[a+l]);e.data[a+l]+=h}}break;default:throw new Error("Unknown blendOp")}}decodeImage(){if(this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);const e=this._isAnimated?(this._frames?.at(0)).data:this._inflator.result;if(this._filterMethod!==qw.ADAPTIVE)throw new Error(`Filter method ${this._filterMethod} not supported`);if(this._interlaceMethod===Cd.NO_INTERLACE)this._png.data=Kw({data:e,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else if(this._interlaceMethod===Cd.ADAM7)this._png.data=lQ({data:e,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else throw new Error(`Interlace method ${this._interlaceMethod} not supported`);this._hasPalette&&(this._png.palette=this._palette),this._hasTransparency&&(this._png.transparency=this._transparency)}pushDataToFrame(){const e=this._inflator.result,r=this._frames.at(-1);r?r.data=e:this._frames.push({sequenceNumber:0,width:this._png.width,height:this._png.height,xOffset:0,yOffset:0,delayNumber:0,delayDenominator:0,disposeOp:lu.NONE,blendOp:xd.SOURCE,data:e}),this._inflator=new Tw,this._writingDataChunks=!1}}function xQ(t){if(t!==1&&t!==2&&t!==4&&t!==8&&t!==16)throw new Error(`invalid bit depth: ${t}`);return t}var Ww;(function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.METRE=1]="METRE"})(Ww||(Ww={}));function EQ(t,e){return new CQ(t,e).decode()}var St=(function(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this})();function Ed(){St.console&&typeof St.console.log=="function"&&St.console.log.apply(St.console,arguments)}var nr={log:Ed,warn:function(t){St.console&&(typeof St.console.warn=="function"?St.console.warn.apply(St.console,arguments):Ed.call(null,arguments))},error:function(t){St.console&&(typeof St.console.error=="function"?St.console.error.apply(St.console,arguments):Ed(t))}};function Sd(t,e,r){var A=new XMLHttpRequest;A.open("GET",t),A.responseType="blob",A.onload=function(){us(A.response,e,r)},A.onerror=function(){nr.error("could not download file")},A.send()}function $w(t){var e=new XMLHttpRequest;e.open("HEAD",t,!1);try{e.send()}catch{}return e.status>=200&&e.status<=299}function cu(t){try{t.dispatchEvent(new MouseEvent("click"))}catch{var e=document.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(e)}}var us=St.saveAs||((typeof window>"u"?"undefined":$t(window))!=="object"||window!==St?function(){}:typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype?function(t,e,r){var A=St.URL||St.webkitURL,n=document.createElement("a");e=e||t.name||"download",n.download=e,n.rel="noopener",typeof t=="string"?(n.href=t,n.origin!==location.origin?$w(n.href)?Sd(t,e,r):cu(n,n.target="_blank"):cu(n)):(n.href=A.createObjectURL(t),setTimeout(function(){A.revokeObjectURL(n.href)},4e4),setTimeout(function(){cu(n)},0))}:"msSaveOrOpenBlob"in navigator?function(t,e,r){if(e=e||t.name||"download",typeof t=="string")if($w(t))Sd(t,e,r);else{var A=document.createElement("a");A.href=t,A.target="_blank",setTimeout(function(){cu(A)})}else navigator.msSaveOrOpenBlob((function(n,i){return i===void 0?i={autoBom:!1}:$t(i)!=="object"&&(nr.warn("Deprecated: Expected third argument to be a object"),i={autoBom:!i}),i.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(n.type)?new Blob(["\uFEFF",n],{type:n.type}):n})(t,r),e)}:function(t,e,r,A){if((A=A||open("","_blank"))&&(A.document.title=A.document.body.innerText="downloading..."),typeof t=="string")return Sd(t,e,r);var n=t.type==="application/octet-stream",i=/constructor/i.test(St.HTMLElement)||St.safari,s=/CriOS\/[\d]+/.test(navigator.userAgent);if((s||n&&i)&&(typeof FileReader>"u"?"undefined":$t(FileReader))==="object"){var a=new FileReader;a.onloadend=function(){var c=a.result;c=s?c:c.replace(/^data:[^;]*;/,"data:attachment/file;"),A?A.location.href=c:location=c,A=null},a.readAsDataURL(t)}else{var o=St.URL||St.webkitURL,l=o.createObjectURL(t);A?A.location=l:location.href=l,A=null,setTimeout(function(){o.revokeObjectURL(l)},4e4)}});function Yw(t){var e;t=t||"",this.ok=!1,t.charAt(0)=="#"&&(t=t.substr(1,6)),t={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",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",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",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:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"}[t=(t=t.replace(/ /g,"")).toLowerCase()]||t;for(var r=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(a){return[parseInt(a[1]),parseInt(a[2]),parseInt(a[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(a){return[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(a){return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)]}}],A=0;A<r.length;A++){var n=r[A].re,i=r[A].process,s=n.exec(t);s&&(e=i(s),this.r=e[0],this.g=e[1],this.b=e[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var a=this.r.toString(16),o=this.g.toString(16),l=this.b.toString(16);return a.length==1&&(a="0"+a),o.length==1&&(o="0"+o),l.length==1&&(l="0"+l),"#"+a+o+l}}var uu=St.atob.bind(St),Xw=St.btoa.bind(St);function Fd(t,e){var r=t[0],A=t[1],n=t[2],i=t[3];r=IA(r,A,n,i,e[0],7,-680876936),i=IA(i,r,A,n,e[1],12,-389564586),n=IA(n,i,r,A,e[2],17,606105819),A=IA(A,n,i,r,e[3],22,-1044525330),r=IA(r,A,n,i,e[4],7,-176418897),i=IA(i,r,A,n,e[5],12,1200080426),n=IA(n,i,r,A,e[6],17,-1473231341),A=IA(A,n,i,r,e[7],22,-45705983),r=IA(r,A,n,i,e[8],7,1770035416),i=IA(i,r,A,n,e[9],12,-1958414417),n=IA(n,i,r,A,e[10],17,-42063),A=IA(A,n,i,r,e[11],22,-1990404162),r=IA(r,A,n,i,e[12],7,1804603682),i=IA(i,r,A,n,e[13],12,-40341101),n=IA(n,i,r,A,e[14],17,-1502002290),r=UA(r,A=IA(A,n,i,r,e[15],22,1236535329),n,i,e[1],5,-165796510),i=UA(i,r,A,n,e[6],9,-1069501632),n=UA(n,i,r,A,e[11],14,643717713),A=UA(A,n,i,r,e[0],20,-373897302),r=UA(r,A,n,i,e[5],5,-701558691),i=UA(i,r,A,n,e[10],9,38016083),n=UA(n,i,r,A,e[15],14,-660478335),A=UA(A,n,i,r,e[4],20,-405537848),r=UA(r,A,n,i,e[9],5,568446438),i=UA(i,r,A,n,e[14],9,-1019803690),n=UA(n,i,r,A,e[3],14,-187363961),A=UA(A,n,i,r,e[8],20,1163531501),r=UA(r,A,n,i,e[13],5,-1444681467),i=UA(i,r,A,n,e[2],9,-51403784),n=UA(n,i,r,A,e[7],14,1735328473),r=_A(r,A=UA(A,n,i,r,e[12],20,-1926607734),n,i,e[5],4,-378558),i=_A(i,r,A,n,e[8],11,-2022574463),n=_A(n,i,r,A,e[11],16,1839030562),A=_A(A,n,i,r,e[14],23,-35309556),r=_A(r,A,n,i,e[1],4,-1530992060),i=_A(i,r,A,n,e[4],11,1272893353),n=_A(n,i,r,A,e[7],16,-155497632),A=_A(A,n,i,r,e[10],23,-1094730640),r=_A(r,A,n,i,e[13],4,681279174),i=_A(i,r,A,n,e[0],11,-358537222),n=_A(n,i,r,A,e[3],16,-722521979),A=_A(A,n,i,r,e[6],23,76029189),r=_A(r,A,n,i,e[9],4,-640364487),i=_A(i,r,A,n,e[12],11,-421815835),n=_A(n,i,r,A,e[15],16,530742520),r=QA(r,A=_A(A,n,i,r,e[2],23,-995338651),n,i,e[0],6,-198630844),i=QA(i,r,A,n,e[7],10,1126891415),n=QA(n,i,r,A,e[14],15,-1416354905),A=QA(A,n,i,r,e[5],21,-57434055),r=QA(r,A,n,i,e[12],6,1700485571),i=QA(i,r,A,n,e[3],10,-1894986606),n=QA(n,i,r,A,e[10],15,-1051523),A=QA(A,n,i,r,e[1],21,-2054922799),r=QA(r,A,n,i,e[8],6,1873313359),i=QA(i,r,A,n,e[15],10,-30611744),n=QA(n,i,r,A,e[6],15,-1560198380),A=QA(A,n,i,r,e[13],21,1309151649),r=QA(r,A,n,i,e[4],6,-145523070),i=QA(i,r,A,n,e[11],10,-1120210379),n=QA(n,i,r,A,e[2],15,718787259),A=QA(A,n,i,r,e[9],21,-343485551),t[0]=fa(r,t[0]),t[1]=fa(A,t[1]),t[2]=fa(n,t[2]),t[3]=fa(i,t[3])}function fu(t,e,r,A,n,i){return e=fa(fa(e,t),fa(A,i)),fa(e<<n|e>>>32-n,r)}function IA(t,e,r,A,n,i,s){return fu(e&r|~e&A,t,e,n,i,s)}function UA(t,e,r,A,n,i,s){return fu(e&A|r&~A,t,e,n,i,s)}function _A(t,e,r,A,n,i,s){return fu(e^r^A,t,e,n,i,s)}function QA(t,e,r,A,n,i,s){return fu(r^(e|~A),t,e,n,i,s)}function Jw(t){var e,r=t.length,A=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=t.length;e+=64)Fd(A,SQ(t.substring(e-64,e)));t=t.substring(e-64);var n=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e<t.length;e++)n[e>>2]|=t.charCodeAt(e)<<(e%4<<3);if(n[e>>2]|=128<<(e%4<<3),e>55)for(Fd(A,n),e=0;e<16;e++)n[e]=0;return n[14]=8*r,Fd(A,n),A}function SQ(t){var e,r=[];for(e=0;e<64;e+=4)r[e>>2]=t.charCodeAt(e)+(t.charCodeAt(e+1)<<8)+(t.charCodeAt(e+2)<<16)+(t.charCodeAt(e+3)<<24);return r}var Zw="0123456789abcdef".split("");function FQ(t){for(var e="",r=0;r<4;r++)e+=Zw[t>>8*r+4&15]+Zw[t>>8*r&15];return e}function IQ(t){return String.fromCharCode(255&t,(65280&t)>>8,(16711680&t)>>16,(4278190080&t)>>24)}function Id(t){return Jw(t).map(IQ).join("")}var UQ=(function(t){for(var e=0;e<t.length;e++)t[e]=FQ(t[e]);return t.join("")})(Jw("hello"))!="5d41402abc4b2a76b9719d911017c592";function fa(t,e){if(UQ){var r=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(r>>16)<<16|65535&r}return t+e&4294967295}function Ud(t,e){var r,A,n,i;if(t!==r){for(var s=(n=t,i=1+(256/t.length|0),new Array(i+1).join(n)),a=[],o=0;o<256;o++)a[o]=o;var l=0;for(o=0;o<256;o++){var c=a[o];l=(l+c+s.charCodeAt(o))%256,a[o]=a[l],a[l]=c}r=t,A=a}else a=A;var f=e.length,h=0,u=0,g="";for(o=0;o<f;o++)u=(u+(c=a[h=(h+1)%256]))%256,a[h]=a[u],a[u]=c,s=a[(a[h]+a[u])%256],g+=String.fromCharCode(e.charCodeAt(o)^s);return g}var ey={print:4,modify:8,copy:16,"annot-forms":32};function po(t,e,r,A){this.v=1,this.r=2;var n=192;t.forEach(function(a){if(ey.perm!==void 0)throw new Error("Invalid permission: "+a);n+=ey[a]}),this.padding="(¿N^NuAd\0NVÿú\b..\0¶Ðh>/\f©þdSiz";var i=(e+this.padding).substr(0,32),s=(r+this.padding).substr(0,32);this.O=this.processOwnerPassword(i,s),this.P=-(1+(255^n)),this.encryptionKey=Id(i+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(A)).substr(0,5),this.U=Ud(this.encryptionKey,this.padding)}function go(t){if(/[^\u0000-\u00ff]/.test(t))throw new Error("Invalid PDF Name Object: "+t+", Only accept ASCII characters.");for(var e="",r=t.length,A=0;A<r;A++){var n=t.charCodeAt(A);e+=n<33||n===35||n===37||n===40||n===41||n===47||n===60||n===62||n===91||n===93||n===123||n===125||n>126?"#"+("0"+n.toString(16)).slice(-2):t[A]}return e}function ty(t){if($t(t)!=="object")throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var e={};this.subscribe=function(r,A,n){if(n=n||!1,typeof r!="string"||typeof A!="function"||typeof n!="boolean")throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");e.hasOwnProperty(r)||(e[r]={});var i=Math.random().toString(35);return e[r][i]=[A,!!n],i},this.unsubscribe=function(r){for(var A in e)if(e[A][r])return delete e[A][r],Object.keys(e[A]).length===0&&delete e[A],!0;return!1},this.publish=function(r){if(e.hasOwnProperty(r)){var A=Array.prototype.slice.call(arguments,1),n=[];for(var i in e[r]){var s=e[r][i];try{s[0].apply(t,A)}catch(a){St.console&&nr.error("jsPDF PubSub Error",a.message,a)}s[1]&&n.push(i)}n.length&&n.forEach(this.unsubscribe)}},this.getTopics=function(){return e}}function hu(t){if(!(this instanceof hu))return new hu(t);var e="opacity,stroke-opacity".split(",");for(var r in t)t.hasOwnProperty(r)&&e.indexOf(r)>=0&&(this[r]=t[r]);this.id="",this.objectNumber=-1}function ry(t,e){this.gState=t,this.matrix=e,this.id="",this.objectNumber=-1}function fs(t,e,r,A,n){if(!(this instanceof fs))return new fs(t,e,r,A,n);this.type=t==="axial"?2:3,this.coords=e,this.colors=r,ry.call(this,A,n)}function vo(t,e,r,A,n){if(!(this instanceof vo))return new vo(t,e,r,A,n);this.boundingBox=t,this.xStep=e,this.yStep=r,this.stream="",this.cloneIndex=0,ry.call(this,A,n)}function dt(t){var e,r=typeof arguments[0]=="string"?arguments[0]:"p",A=arguments[1],n=arguments[2],i=arguments[3],s=[],a=1,o=16,l="S",c=null;$t(t=t||{})==="object"&&(r=t.orientation,A=t.unit||A,n=t.format||n,i=t.compress||t.compressPdf||i,(c=t.encryption||null)!==null&&(c.userPassword=c.userPassword||"",c.ownerPassword=c.ownerPassword||"",c.userPermissions=c.userPermissions||[]),a=typeof t.userUnit=="number"?Math.abs(t.userUnit):1,t.precision!==void 0&&(e=t.precision),t.floatPrecision!==void 0&&(o=t.floatPrecision),l=t.defaultPathOperation||"S"),s=t.filters||(i===!0?["FlateEncode"]:s),A=A||"mm",r=(""+(r||"P")).toLowerCase();var f=t.putOnlyUsedFonts||!1,h={},u={internal:{},__private__:{}};u.__private__.PubSub=ty;var g="1.3",p=u.__private__.getPdfVersion=function(){return g};u.__private__.setPdfVersion=function(y){g=y};var w={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};u.__private__.getPageFormats=function(){return w};var m=u.__private__.getPageFormat=function(y){return w[y]};n=n||"a4";var B="compat",x="advanced",E=B;function k(){this.saveGraphicsState(),N(new yt(At,0,0,-At,0,$s()*At).toString()+" cm"),this.setFontSize(this.getFontSize()/At),l="n",E=x}function H(){this.restoreGraphicsState(),l="S",E=B}var K=u.__private__.combineFontStyleAndFontWeight=function(y,D){if(y=="bold"&&D=="normal"||y=="bold"&&D==400||y=="normal"&&D=="italic"||y=="bold"&&D=="italic")throw new Error("Invalid Combination of fontweight and fontstyle");return D&&(y=D==400||D==="normal"?y==="italic"?"italic":"normal":D!=700&&D!=="bold"||y!=="normal"?(D==700?"bold":D)+""+y:"bold"),y};u.advancedAPI=function(y){var D=E===B;return D&&k.call(this),typeof y!="function"||(y(this),D&&H.call(this)),this},u.compatAPI=function(y){var D=E===x;return D&&H.call(this),typeof y!="function"||(y(this),D&&k.call(this)),this},u.isAdvancedAPI=function(){return E===x};var R,I=function(y){if(E!==x)throw new Error(y+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},W=u.roundToPrecision=u.__private__.roundToPrecision=function(y,D){var ae=e||D;if(isNaN(y)||isNaN(ae))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return y.toFixed(ae).replace(/0+$/,"")};R=u.hpf=u.__private__.hpf=typeof o=="number"?function(y){if(isNaN(y))throw new Error("Invalid argument passed to jsPDF.hpf");return W(y,o)}:o==="smart"?function(y){if(isNaN(y))throw new Error("Invalid argument passed to jsPDF.hpf");return W(y,y>-1&&y<1?16:5)}:function(y){if(isNaN(y))throw new Error("Invalid argument passed to jsPDF.hpf");return W(y,16)};var L=u.f2=u.__private__.f2=function(y){if(isNaN(y))throw new Error("Invalid argument passed to jsPDF.f2");return W(y,2)},F=u.__private__.f3=function(y){if(isNaN(y))throw new Error("Invalid argument passed to jsPDF.f3");return W(y,3)},M=u.scale=u.__private__.scale=function(y){if(isNaN(y))throw new Error("Invalid argument passed to jsPDF.scale");return E===B?y*At:E===x?y:void 0},b=function(y){return M((function(D){return E===B?$s()-D:E===x?D:void 0})(y))};u.__private__.setPrecision=u.setPrecision=function(y){typeof parseInt(y,10)=="number"&&(e=parseInt(y,10))};var Y,ce="00000000000000000000000000000000",ee=u.__private__.getFileId=function(){return ce},le=u.__private__.setFileId=function(y){return ce=y!==void 0&&/^[a-fA-F0-9]{32}$/.test(y)?y.toUpperCase():ce.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),c!==null&&(tA=new po(c.userPermissions,c.userPassword,c.ownerPassword,ce)),ce};u.setFileId=function(y){return le(y),this},u.getFileId=function(){return ee()};var Ae=u.__private__.convertDateToPDFDate=function(y){var D=y.getTimezoneOffset(),ae=D<0?"+":"-",de=Math.floor(Math.abs(D/60)),Be=Math.abs(D%60),Ne=[ae,P(de),"'",P(Be),"'"].join("");return["D:",y.getFullYear(),P(y.getMonth()+1),P(y.getDate()),P(y.getHours()),P(y.getMinutes()),P(y.getSeconds()),Ne].join("")},te=u.__private__.convertPDFDateToDate=function(y){var D=parseInt(y.substr(2,4),10),ae=parseInt(y.substr(6,2),10)-1,de=parseInt(y.substr(8,2),10),Be=parseInt(y.substr(10,2),10),Ne=parseInt(y.substr(12,2),10),De=parseInt(y.substr(14,2),10);return new Date(D,ae,de,Be,Ne,De,0)},T=u.__private__.setCreationDate=function(y){var D;if(y===void 0&&(y=new Date),y instanceof Date)D=Ae(y);else{if(!/^D:(20[0-2][0-9]|203[0-7]|19[7-9][0-9])(0[0-9]|1[0-2])([0-2][0-9]|3[0-1])(0[0-9]|1[0-9]|2[0-3])(0[0-9]|[1-5][0-9])(0[0-9]|[1-5][0-9])(\+0[0-9]|\+1[0-4]|-0[0-9]|-1[0-1])'(0[0-9]|[1-5][0-9])'?$/.test(y))throw new Error("Invalid argument passed to jsPDF.setCreationDate");D=y}return Y=D},S=u.__private__.getCreationDate=function(y){var D=Y;return y==="jsDate"&&(D=te(Y)),D};u.setCreationDate=function(y){return T(y),this},u.getCreationDate=function(y){return S(y)};var O,P=u.__private__.padd2=function(y){return("0"+parseInt(y)).slice(-2)},z=u.__private__.padd2Hex=function(y){return("00"+(y=y.toString())).substr(y.length)},ie=0,fe=[],Z=[],pe=0,we=[],be=[],je=!1,Te=Z;u.__private__.setCustomOutputDestination=function(y){je=!0,Te=y};var Q=function(y){je||(Te=y)};u.__private__.resetCustomOutputDestination=function(){je=!1,Te=Z};var N=u.__private__.out=function(y){return y=y.toString(),pe+=y.length+1,Te.push(y),Te},ue=u.__private__.write=function(y){return N(arguments.length===1?y.toString():Array.prototype.join.call(arguments," "))},J=u.__private__.getArrayBuffer=function(y){for(var D=y.length,ae=new ArrayBuffer(D),de=new Uint8Array(ae);D--;)de[D]=y.charCodeAt(D);return ae},q=[["Helvetica","helvetica","normal","WinAnsiEncoding"],["Helvetica-Bold","helvetica","bold","WinAnsiEncoding"],["Helvetica-Oblique","helvetica","italic","WinAnsiEncoding"],["Helvetica-BoldOblique","helvetica","bolditalic","WinAnsiEncoding"],["Courier","courier","normal","WinAnsiEncoding"],["Courier-Bold","courier","bold","WinAnsiEncoding"],["Courier-Oblique","courier","italic","WinAnsiEncoding"],["Courier-BoldOblique","courier","bolditalic","WinAnsiEncoding"],["Times-Roman","times","normal","WinAnsiEncoding"],["Times-Bold","times","bold","WinAnsiEncoding"],["Times-Italic","times","italic","WinAnsiEncoding"],["Times-BoldItalic","times","bolditalic","WinAnsiEncoding"],["ZapfDingbats","zapfdingbats","normal",null],["Symbol","symbol","normal",null]];u.__private__.getStandardFonts=function(){return q};var ne=t.fontSize||16;u.__private__.setFontSize=u.setFontSize=function(y){return ne=E===x?y/At:y,this};var xe,ye=u.__private__.getFontSize=u.getFontSize=function(){return E===B?ne:ne*At},he=t.R2L||!1;u.__private__.setR2L=u.setR2L=function(y){return he=y,this},u.__private__.getR2L=u.getR2L=function(){return he};var Se,ve=u.__private__.setZoomMode=function(y){if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(y))xe=y;else if(isNaN(y)){if([void 0,null,"fullwidth","fullheight","fullpage","original"].indexOf(y)===-1)throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+y+'" is not recognized.');xe=y}else xe=parseInt(y,10)};u.__private__.getZoomMode=function(){return xe};var Ce,Le=u.__private__.setPageMode=function(y){if([void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(y)==-1)throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+y+'" is not recognized.');Se=y};u.__private__.getPageMode=function(){return Se};var Ge=u.__private__.setLayoutMode=function(y){if([void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(y)==-1)throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+y+'" is not recognized.');Ce=y};u.__private__.getLayoutMode=function(){return Ce},u.__private__.setDisplayMode=u.setDisplayMode=function(y,D,ae){return ve(y),Ge(D),Le(ae),this};var Ke={title:"",subject:"",author:"",keywords:"",creator:""};u.__private__.getDocumentProperty=function(y){if(Object.keys(Ke).indexOf(y)===-1)throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return Ke[y]},u.__private__.getDocumentProperties=function(){return Ke},u.__private__.setDocumentProperties=u.setProperties=u.setDocumentProperties=function(y){for(var D in Ke)Ke.hasOwnProperty(D)&&y[D]&&(Ke[D]=y[D]);return this},u.__private__.setDocumentProperty=function(y,D){if(Object.keys(Ke).indexOf(y)===-1)throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return Ke[y]=D};var We,At,$e,_t,at,Bt={},bt={},Tt=[],st={},Pt={},rt={},wt={},Kt=null,lt=0,ht=[],qt=new ty(u),Dn=t.hotfixes||[],Pr={},Gr={},CA=[],yt=function y(D,ae,de,Be,Ne,De){if(!(this instanceof y))return new y(D,ae,de,Be,Ne,De);isNaN(D)&&(D=1),isNaN(ae)&&(ae=0),isNaN(de)&&(de=0),isNaN(Be)&&(Be=1),isNaN(Ne)&&(Ne=0),isNaN(De)&&(De=0),this._matrix=[D,ae,de,Be,Ne,De]};Object.defineProperty(yt.prototype,"sx",{get:function(){return this._matrix[0]},set:function(y){this._matrix[0]=y}}),Object.defineProperty(yt.prototype,"shy",{get:function(){return this._matrix[1]},set:function(y){this._matrix[1]=y}}),Object.defineProperty(yt.prototype,"shx",{get:function(){return this._matrix[2]},set:function(y){this._matrix[2]=y}}),Object.defineProperty(yt.prototype,"sy",{get:function(){return this._matrix[3]},set:function(y){this._matrix[3]=y}}),Object.defineProperty(yt.prototype,"tx",{get:function(){return this._matrix[4]},set:function(y){this._matrix[4]=y}}),Object.defineProperty(yt.prototype,"ty",{get:function(){return this._matrix[5]},set:function(y){this._matrix[5]=y}}),Object.defineProperty(yt.prototype,"a",{get:function(){return this._matrix[0]},set:function(y){this._matrix[0]=y}}),Object.defineProperty(yt.prototype,"b",{get:function(){return this._matrix[1]},set:function(y){this._matrix[1]=y}}),Object.defineProperty(yt.prototype,"c",{get:function(){return this._matrix[2]},set:function(y){this._matrix[2]=y}}),Object.defineProperty(yt.prototype,"d",{get:function(){return this._matrix[3]},set:function(y){this._matrix[3]=y}}),Object.defineProperty(yt.prototype,"e",{get:function(){return this._matrix[4]},set:function(y){this._matrix[4]=y}}),Object.defineProperty(yt.prototype,"f",{get:function(){return this._matrix[5]},set:function(y){this._matrix[5]=y}}),Object.defineProperty(yt.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(yt.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(yt.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(yt.prototype,"isIdentity",{get:function(){return this.sx===1&&this.shy===0&&this.shx===0&&this.sy===1&&this.tx===0&&this.ty===0}}),yt.prototype.join=function(y){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(R).join(y)},yt.prototype.multiply=function(y){var D=y.sx*this.sx+y.shy*this.shx,ae=y.sx*this.shy+y.shy*this.sy,de=y.shx*this.sx+y.sy*this.shx,Be=y.shx*this.shy+y.sy*this.sy,Ne=y.tx*this.sx+y.ty*this.shx+this.tx,De=y.tx*this.shy+y.ty*this.sy+this.ty;return new yt(D,ae,de,Be,Ne,De)},yt.prototype.decompose=function(){var y=this.sx,D=this.shy,ae=this.shx,de=this.sy,Be=this.tx,Ne=this.ty,De=Math.sqrt(y*y+D*D),ct=(y/=De)*ae+(D/=De)*de;ae-=y*ct,de-=D*ct;var ot=Math.sqrt(ae*ae+de*de);return ct/=ot,y*(de/=ot)<D*(ae/=ot)&&(y=-y,D=-D,ct=-ct,De=-De),{scale:new yt(De,0,0,ot,0,0),translate:new yt(1,0,0,1,Be,Ne),rotate:new yt(y,D,-D,y,0,0),skew:new yt(1,0,ct,1,0,0)}},yt.prototype.toString=function(y){return this.join(" ")},yt.prototype.inversed=function(){var y=this.sx,D=this.shy,ae=this.shx,de=this.sy,Be=this.tx,Ne=this.ty,De=1/(y*de-D*ae),ct=de*De,ot=-D*De,It=-ae*De,kt=y*De;return new yt(ct,ot,It,kt,-ct*Be-It*Ne,-ot*Be-kt*Ne)},yt.prototype.applyToPoint=function(y){var D=y.x*this.sx+y.y*this.shx+this.tx,ae=y.x*this.shy+y.y*this.sy+this.ty;return new Ws(D,ae)},yt.prototype.applyToRectangle=function(y){var D=this.applyToPoint(y),ae=this.applyToPoint(new Ws(y.x+y.w,y.y+y.h));return new Qc(D.x,D.y,ae.x-D.x,ae.y-D.y)},yt.prototype.clone=function(){var y=this.sx,D=this.shy,ae=this.shx,de=this.sy,Be=this.tx,Ne=this.ty;return new yt(y,D,ae,de,Be,Ne)},u.Matrix=yt;var Bn=u.matrixMult=function(y,D){return D.multiply(y)},ii=new yt(1,0,0,1,0,0);u.unitMatrix=u.identityMatrix=ii;var WA=function(y,D){if(!Pt[y]){var ae=(D instanceof fs?"Sh":"P")+(Object.keys(st).length+1).toString(10);D.id=ae,Pt[y]=ae,st[ae]=D,qt.publish("addPattern",D)}};u.ShadingPattern=fs,u.TilingPattern=vo,u.addShadingPattern=function(y,D){return I("addShadingPattern()"),WA(y,D),this},u.beginTilingPattern=function(y){I("beginTilingPattern()"),kc(y.boundingBox[0],y.boundingBox[1],y.boundingBox[2]-y.boundingBox[0],y.boundingBox[3]-y.boundingBox[1],y.matrix)},u.endTilingPattern=function(y,D){I("endTilingPattern()"),D.stream=be[O].join(`
|
|
4
|
+
`),WA(y,D),qt.publish("endTilingPattern",D),CA.pop().restore()};var MA,dr=u.__private__.newObject=function(){var y=Ir();return eA(y,!0),y},Ir=u.__private__.newObjectDeferred=function(){return ie++,fe[ie]=function(){return pe},ie},eA=function(y,D){return D=typeof D=="boolean"&&D,fe[y]=pe,D&&N(y+" 0 obj"),y},bn=u.__private__.newAdditionalObject=function(){var y={objId:Ir(),content:""};return we.push(y),y},Ei=Ir(),Cn=Ir(),zt=u.__private__.decodeColorString=function(y){var D=y.split(" ");if(D.length!==2||D[1]!=="g"&&D[1]!=="G")D.length!==5||D[4]!=="k"&&D[4]!=="K"||(D=[(1-D[0])*(1-D[3]),(1-D[1])*(1-D[3]),(1-D[2])*(1-D[3]),"r"]);else{var ae=parseFloat(D[0]);D=[ae,ae,ae,"r"]}for(var de="#",Be=0;Be<3;Be++)de+=("0"+Math.floor(255*parseFloat(D[Be])).toString(16)).slice(-2);return de},pA=u.__private__.encodeColorString=function(y){var D;typeof y=="string"&&(y={ch1:y});var ae=y.ch1,de=y.ch2,Be=y.ch3,Ne=y.ch4,De=y.pdfColorType==="draw"?["G","RG","K"]:["g","rg","k"];if(typeof ae=="string"&&ae.charAt(0)!=="#"){var ct=new Yw(ae);if(ct.ok)ae=ct.toHex();else if(!/^\d*\.?\d*$/.test(ae))throw new Error('Invalid color "'+ae+'" passed to jsPDF.encodeColorString.')}if(typeof ae=="string"&&/^#[0-9A-Fa-f]{3}$/.test(ae)&&(ae="#"+ae[1]+ae[1]+ae[2]+ae[2]+ae[3]+ae[3]),typeof ae=="string"&&/^#[0-9A-Fa-f]{6}$/.test(ae)){var ot=parseInt(ae.substr(1),16);ae=ot>>16&255,de=ot>>8&255,Be=255&ot}if(de===void 0||Ne===void 0&&ae===de&&de===Be)D=typeof ae=="string"?ae+" "+De[0]:y.precision===2?L(ae/255)+" "+De[0]:F(ae/255)+" "+De[0];else if(Ne===void 0||$t(Ne)==="object"){if(Ne&&!isNaN(Ne.a)&&Ne.a===0)return["1.","1.","1.",De[1]].join(" ");D=typeof ae=="string"?[ae,de,Be,De[1]].join(" "):y.precision===2?[L(ae/255),L(de/255),L(Be/255),De[1]].join(" "):[F(ae/255),F(de/255),F(Be/255),De[1]].join(" ")}else D=typeof ae=="string"?[ae,de,Be,Ne,De[2]].join(" "):y.precision===2?[L(ae),L(de),L(Be),L(Ne),De[2]].join(" "):[F(ae),F(de),F(Be),F(Ne),De[2]].join(" ");return D},xn=u.__private__.getFilters=function(){return s},$A=u.__private__.putStream=function(y){var D=(y=y||{}).data||"",ae=y.filters||xn(),de=y.alreadyAppliedFilters||[],Be=y.addLength1||!1,Ne=D.length,De=y.objectId,ct=function(pr){return pr};if(c!==null&&De===void 0)throw new Error("ObjectId must be passed to putStream for file encryption");c!==null&&(ct=tA.encryptor(De,0));var ot={};ae===!0&&(ae=["FlateEncode"]);var It=y.additionalKeyValues||[],kt=(ot=dt.API.processDataByFilters!==void 0?dt.API.processDataByFilters(D,ae):{data:D,reverseChain:[]}).reverseChain+(Array.isArray(de)?de.join(" "):de.toString());if(ot.data.length!==0&&(It.push({key:"Length",value:ot.data.length}),Be===!0&&It.push({key:"Length1",value:Ne})),kt.length!=0)if(kt.split("/").length-1==1)It.push({key:"Filter",value:kt});else{It.push({key:"Filter",value:"["+kt+"]"});for(var Gt=0;Gt<It.length;Gt+=1)if(It[Gt].key==="DecodeParms"){for(var $r=[],ir=0;ir<ot.reverseChain.split("/").length-1;ir+=1)$r.push("null");$r.push(It[Gt].value),It[Gt].value="["+$r.join(" ")+"]"}}N("<<");for(var Ar=0;Ar<It.length;Ar++)N("/"+It[Ar].key+" "+It[Ar].value);N(">>"),ot.data.length!==0&&(N("stream"),N(ct(ot.data)),N("endstream"))},ai=u.__private__.putPage=function(y){var D=y.number,ae=y.data,de=y.objId,Be=y.contentsObjId;eA(de,!0),N("<</Type /Page"),N("/Parent "+y.rootDictionaryObjId+" 0 R"),N("/Resources "+y.resourceDictionaryObjId+" 0 R"),N("/MediaBox ["+parseFloat(R(y.mediaBox.bottomLeftX))+" "+parseFloat(R(y.mediaBox.bottomLeftY))+" "+R(y.mediaBox.topRightX)+" "+R(y.mediaBox.topRightY)+"]"),y.cropBox!==null&&N("/CropBox ["+R(y.cropBox.bottomLeftX)+" "+R(y.cropBox.bottomLeftY)+" "+R(y.cropBox.topRightX)+" "+R(y.cropBox.topRightY)+"]"),y.bleedBox!==null&&N("/BleedBox ["+R(y.bleedBox.bottomLeftX)+" "+R(y.bleedBox.bottomLeftY)+" "+R(y.bleedBox.topRightX)+" "+R(y.bleedBox.topRightY)+"]"),y.trimBox!==null&&N("/TrimBox ["+R(y.trimBox.bottomLeftX)+" "+R(y.trimBox.bottomLeftY)+" "+R(y.trimBox.topRightX)+" "+R(y.trimBox.topRightY)+"]"),y.artBox!==null&&N("/ArtBox ["+R(y.artBox.bottomLeftX)+" "+R(y.artBox.bottomLeftY)+" "+R(y.artBox.topRightX)+" "+R(y.artBox.topRightY)+"]"),typeof y.userUnit=="number"&&y.userUnit!==1&&N("/UserUnit "+y.userUnit),qt.publish("putPage",{objId:de,pageContext:ht[D],pageNumber:D,page:ae}),N("/Contents "+Be+" 0 R"),N(">>"),N("endobj");var Ne=ae.join(`
|
|
5
|
+
`);return E===x&&(Ne+=`
|
|
6
|
+
Q`),eA(Be,!0),$A({data:Ne,filters:xn(),objectId:Be}),N("endobj"),de},En=u.__private__.putPages=function(){var y,D,ae=[];for(y=1;y<=lt;y++)ht[y].objId=Ir(),ht[y].contentsObjId=Ir();for(y=1;y<=lt;y++)ae.push(ai({number:y,data:be[y],objId:ht[y].objId,contentsObjId:ht[y].contentsObjId,mediaBox:ht[y].mediaBox,cropBox:ht[y].cropBox,bleedBox:ht[y].bleedBox,trimBox:ht[y].trimBox,artBox:ht[y].artBox,userUnit:ht[y].userUnit,rootDictionaryObjId:Ei,resourceDictionaryObjId:Cn}));eA(Ei,!0),N("<</Type /Pages");var de="/Kids [";for(D=0;D<lt;D++)de+=ae[D]+" 0 R ";N(de+"]"),N("/Count "+lt),N(">>"),N("endobj"),qt.publish("postPutPages")},Si=function(y){qt.publish("putFont",{font:y,out:N,newObject:dr,putStream:$A}),y.isAlreadyPutted!==!0&&(y.objectNumber=dr(),N("<<"),N("/Type /Font"),N("/BaseFont /"+go(y.postScriptName)),N("/Subtype /Type1"),typeof y.encoding=="string"&&N("/Encoding /"+y.encoding),N("/FirstChar 32"),N("/LastChar 255"),N(">>"),N("endobj"))},Ra=function(y){y.objectNumber=dr();var D=[];D.push({key:"Type",value:"/XObject"}),D.push({key:"Subtype",value:"/Form"}),D.push({key:"BBox",value:"["+[R(y.x),R(y.y),R(y.x+y.width),R(y.y+y.height)].join(" ")+"]"}),D.push({key:"Matrix",value:"["+y.matrix.toString()+"]"});var ae=y.pages[1].join(`
|
|
7
|
+
`);$A({data:ae,additionalKeyValues:D,objectId:y.objectNumber}),N("endobj")},ja=function(y,D){D||(D=21);var ae=dr(),de=(function(De,ct){var ot,It=[],kt=1/(ct-1);for(ot=0;ot<1;ot+=kt)It.push(ot);if(It.push(1),De[0].offset!=0){var Gt={offset:0,color:De[0].color};De.unshift(Gt)}if(De[De.length-1].offset!=1){var $r={offset:1,color:De[De.length-1].color};De.push($r)}for(var ir="",Ar=0,pr=0;pr<It.length;pr++){for(ot=It[pr];ot>De[Ar+1].offset;)Ar++;var br=De[Ar].offset,Cr=(ot-br)/(De[Ar+1].offset-br),DA=De[Ar].color,Aa=De[Ar+1].color;ir+=z(Math.round((1-Cr)*DA[0]+Cr*Aa[0]).toString(16))+z(Math.round((1-Cr)*DA[1]+Cr*Aa[1]).toString(16))+z(Math.round((1-Cr)*DA[2]+Cr*Aa[2]).toString(16))}return ir.trim()})(y.colors,D),Be=[];Be.push({key:"FunctionType",value:"0"}),Be.push({key:"Domain",value:"[0.0 1.0]"}),Be.push({key:"Size",value:"["+D+"]"}),Be.push({key:"BitsPerSample",value:"8"}),Be.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),Be.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),$A({data:de,additionalKeyValues:Be,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:ae}),N("endobj"),y.objectNumber=dr(),N("<< /ShadingType "+y.type),N("/ColorSpace /DeviceRGB");var Ne="/Coords ["+R(parseFloat(y.coords[0]))+" "+R(parseFloat(y.coords[1]))+" ";y.type===2?Ne+=R(parseFloat(y.coords[2]))+" "+R(parseFloat(y.coords[3])):Ne+=R(parseFloat(y.coords[2]))+" "+R(parseFloat(y.coords[3]))+" "+R(parseFloat(y.coords[4]))+" "+R(parseFloat(y.coords[5])),N(Ne+="]"),y.matrix&&N("/Matrix ["+y.matrix.toString()+"]"),N("/Function "+ae+" 0 R"),N("/Extend [true true]"),N(">>"),N("endobj")},Ka=function(y,D){var ae=Ir(),de=dr();D.push({resourcesOid:ae,objectOid:de}),y.objectNumber=de;var Be=[];Be.push({key:"Type",value:"/Pattern"}),Be.push({key:"PatternType",value:"1"}),Be.push({key:"PaintType",value:"1"}),Be.push({key:"TilingType",value:"1"}),Be.push({key:"BBox",value:"["+y.boundingBox.map(R).join(" ")+"]"}),Be.push({key:"XStep",value:R(y.xStep)}),Be.push({key:"YStep",value:R(y.yStep)}),Be.push({key:"Resources",value:ae+" 0 R"}),y.matrix&&Be.push({key:"Matrix",value:"["+y.matrix.toString()+"]"}),$A({data:y.stream,additionalKeyValues:Be,objectId:y.objectNumber}),N("endobj")},Fc=function(y){for(var D in y.objectNumber=dr(),N("<<"),y)switch(D){case"opacity":N("/ca "+L(y[D]));break;case"stroke-opacity":N("/CA "+L(y[D]))}N(">>"),N("endobj")},cn=function(y){eA(y.resourcesOid,!0),N("<<"),N("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),(function(){for(var D in N("/Font <<"),Bt)Bt.hasOwnProperty(D)&&(f===!1||f===!0&&h.hasOwnProperty(D))&&N("/"+D+" "+Bt[D].objectNumber+" 0 R");N(">>")})(),(function(){if(Object.keys(st).length>0){for(var D in N("/Shading <<"),st)st.hasOwnProperty(D)&&st[D]instanceof fs&&st[D].objectNumber>=0&&N("/"+D+" "+st[D].objectNumber+" 0 R");qt.publish("putShadingPatternDict"),N(">>")}})(),(function(D){if(Object.keys(st).length>0){for(var ae in N("/Pattern <<"),st)st.hasOwnProperty(ae)&&st[ae]instanceof u.TilingPattern&&st[ae].objectNumber>=0&&st[ae].objectNumber<D&&N("/"+ae+" "+st[ae].objectNumber+" 0 R");qt.publish("putTilingPatternDict"),N(">>")}})(y.objectOid),(function(){if(Object.keys(rt).length>0){var D;for(D in N("/ExtGState <<"),rt)rt.hasOwnProperty(D)&&rt[D].objectNumber>=0&&N("/"+D+" "+rt[D].objectNumber+" 0 R");qt.publish("putGStateDict"),N(">>")}})(),(function(){for(var D in N("/XObject <<"),Pr)Pr.hasOwnProperty(D)&&Pr[D].objectNumber>=0&&N("/"+D+" "+Pr[D].objectNumber+" 0 R");qt.publish("putXobjectDict"),N(">>")})(),N(">>"),N("endobj")},qi=function(y){bt[y.fontName]=bt[y.fontName]||{},bt[y.fontName][y.fontStyle]=y.id},Hn=function(y,D,ae,de,Be){var Ne={id:"F"+(Object.keys(Bt).length+1).toString(10),postScriptName:y,fontName:D,fontStyle:ae,encoding:de,isStandardFont:Be||!1,metadata:{}};return qt.publish("addFont",{font:Ne,instance:this}),Bt[Ne.id]=Ne,qi(Ne),Ne.id},un=u.__private__.pdfEscape=u.pdfEscape=function(y,D){return(function(ae,de){var Be,Ne,De,ct,ot,It,kt,Gt,$r;if(De=(de=de||{}).sourceEncoding||"Unicode",ot=de.outputEncoding,(de.autoencode||ot)&&Bt[We].metadata&&Bt[We].metadata[De]&&Bt[We].metadata[De].encoding&&(ct=Bt[We].metadata[De].encoding,!ot&&Bt[We].encoding&&(ot=Bt[We].encoding),!ot&&ct.codePages&&(ot=ct.codePages[0]),typeof ot=="string"&&(ot=ct[ot]),ot)){for(kt=!1,It=[],Be=0,Ne=ae.length;Be<Ne;Be++)(Gt=ot[ae.charCodeAt(Be)])?It.push(String.fromCharCode(Gt)):It.push(ae[Be]),It[Be].charCodeAt(0)>>8&&(kt=!0);ae=It.join("")}for(Be=ae.length;kt===void 0&&Be!==0;)ae.charCodeAt(Be-1)>>8&&(kt=!0),Be--;if(!kt)return ae;for(It=de.noBOM?[]:[254,255],Be=0,Ne=ae.length;Be<Ne;Be++){if(($r=(Gt=ae.charCodeAt(Be))>>8)>>8)throw new Error("Character at position "+Be+" of string '"+ae+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");It.push($r),It.push(Gt-($r<<8))}return String.fromCharCode.apply(void 0,It)})(y,D).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Wi=u.__private__.beginPage=function(y){be[++lt]=[],ht[lt]={objId:0,contentsObjId:0,userUnit:Number(a),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(y[0]),topRightY:Number(y[1])}},zs(lt),Q(be[O])},rl=function(y,D){var ae,de,Be;switch(r=D||r,typeof y=="string"&&(ae=m(y.toLowerCase()),Array.isArray(ae)&&(de=ae[0],Be=ae[1])),Array.isArray(y)&&(de=y[0]*At,Be=y[1]*At),isNaN(de)&&(de=n[0],Be=n[1]),(de>14400||Be>14400)&&(nr.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),de=Math.min(14400,de),Be=Math.min(14400,Be)),n=[de,Be],r.substr(0,1)){case"l":Be>de&&(n=[Be,de]);break;case"p":de>Be&&(n=[Be,de])}Wi(n),kv(Ft),N(nl),Uc!==0&&N(Uc+" J"),Wa!==0&&N(Wa+" j"),qt.publish("addPage",{pageNumber:lt})},za=function(y){y>0&&y<=lt&&(be.splice(y,1),ht.splice(y,1),lt--,O>lt&&(O=lt),this.setPage(O))},zs=function(y){y>0&&y<=lt&&(O=y)},$i=u.__private__.getNumberOfPages=u.getNumberOfPages=function(){return be.length-1},Ga=function(y,D,ae){var de,Be=void 0;return ae=ae||{},y=y!==void 0?y:Bt[We].fontName,D=D!==void 0?D:Bt[We].fontStyle,de=y.toLowerCase(),bt[de]!==void 0&&bt[de][D]!==void 0?Be=bt[de][D]:bt[y]!==void 0&&bt[y][D]!==void 0?Be=bt[y][D]:ae.disableWarning===!1&&nr.warn("Unable to look up font label for font '"+y+"', '"+D+"'. Refer to getFontList() for available fonts."),Be||ae.noFallback||(Be=bt.times[D])==null&&(Be=bt.times.normal),Be},YA=u.__private__.putInfo=function(){var y=dr(),D=function(de){return de};for(var ae in c!==null&&(D=tA.encryptor(y,0)),N("<<"),N("/Producer ("+un(D("jsPDF "+dt.version))+")"),Ke)Ke.hasOwnProperty(ae)&&Ke[ae]&&N("/"+ae.substr(0,1).toUpperCase()+ae.substr(1)+" ("+un(D(Ke[ae]))+")");N("/CreationDate ("+un(D(Y))+")"),N(">>"),N("endobj")},Sn=u.__private__.putCatalog=function(y){var D=(y=y||{}).rootDictionaryObjId||Ei;switch(dr(),N("<<"),N("/Type /Catalog"),N("/Pages "+D+" 0 R"),xe||(xe="fullwidth"),xe){case"fullwidth":N("/OpenAction [3 0 R /FitH null]");break;case"fullheight":N("/OpenAction [3 0 R /FitV null]");break;case"fullpage":N("/OpenAction [3 0 R /Fit]");break;case"original":N("/OpenAction [3 0 R /XYZ null null 1]");break;default:var ae=""+xe;ae.substr(ae.length-1)==="%"&&(xe=parseInt(xe)/100),typeof xe=="number"&&N("/OpenAction [3 0 R /XYZ null null "+L(xe)+"]")}switch(Ce||(Ce="continuous"),Ce){case"continuous":N("/PageLayout /OneColumn");break;case"single":N("/PageLayout /SinglePage");break;case"two":case"twoleft":N("/PageLayout /TwoColumnLeft");break;case"tworight":N("/PageLayout /TwoColumnRight")}Se&&N("/PageMode /"+Se),qt.publish("putCatalog"),N(">>"),N("endobj")},Yi=u.__private__.putTrailer=function(){N("trailer"),N("<<"),N("/Size "+(ie+1)),N("/Root "+ie+" 0 R"),N("/Info "+(ie-1)+" 0 R"),c!==null&&N("/Encrypt "+tA.oid+" 0 R"),N("/ID [ <"+ce+"> <"+ce+"> ]"),N(">>")},Yt=u.__private__.putHeader=function(){N("%PDF-"+g),N("%ºß¬à")},Al=u.__private__.putXRef=function(){var y="0000000000";N("xref"),N("0 "+(ie+1)),N("0000000000 65535 f ");for(var D=1;D<=ie;D++)typeof fe[D]=="function"?N((y+fe[D]()).slice(-10)+" 00000 n "):fe[D]!==void 0?N((y+fe[D]).slice(-10)+" 00000 n "):N("0000000000 00000 n ")},Rn=u.__private__.buildDocument=function(){var y;ie=0,pe=0,Z=[],fe=[],we=[],Ei=Ir(),Cn=Ir(),Q(Z),qt.publish("buildDocument"),Yt(),En(),(function(){qt.publish("putAdditionalObjects");for(var ae=0;ae<we.length;ae++){var de=we[ae];eA(de.objId,!0),N(de.content),N("endobj")}qt.publish("postPutAdditionalObjects")})(),y=[],(function(){for(var ae in Bt)Bt.hasOwnProperty(ae)&&(f===!1||f===!0&&h.hasOwnProperty(ae))&&Si(Bt[ae])})(),(function(){var ae;for(ae in rt)rt.hasOwnProperty(ae)&&Fc(rt[ae])})(),(function(){for(var ae in Pr)Pr.hasOwnProperty(ae)&&Ra(Pr[ae])})(),(function(ae){var de;for(de in st)st.hasOwnProperty(de)&&(st[de]instanceof fs?ja(st[de]):st[de]instanceof vo&&Ka(st[de],ae))})(y),qt.publish("putResources"),y.forEach(cn),cn({resourcesOid:Cn,objectOid:Number.MAX_SAFE_INTEGER}),qt.publish("postPutResources"),c!==null&&(tA.oid=dr(),N("<<"),N("/Filter /Standard"),N("/V "+tA.v),N("/R "+tA.r),N("/U <"+tA.toHexString(tA.U)+">"),N("/O <"+tA.toHexString(tA.O)+">"),N("/P "+tA.P),N(">>"),N("endobj")),YA(),Sn();var D=pe;return Al(),Yi(),N("startxref"),N(""+D),N("%%EOF"),Q(be[O]),Z.join(`
|
|
8
|
+
`)},Xi=u.__private__.getBlob=function(y){return new Blob([J(y)],{type:"application/pdf"})},Va=function(y){for(;y.firstChild;)y.removeChild(y.firstChild)},XA=function(y){var D,ae=y.document,de=ae.documentElement,Be=ae.head,Ne=ae.body;return Be||(Be=ae.createElement("head"),de.appendChild(Be)),Ne||(Ne=ae.createElement("body"),de.appendChild(Ne)),Va(Be),Va(Ne),(D=ae.createElement("style")).appendChild(ae.createTextNode("html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}")),Be.appendChild(D),{document:ae,body:Ne}},Ji=u.output=u.__private__.output=(MA=function(y,D){switch(typeof(D=D||{})=="string"?D={filename:D}:D.filename=D.filename||"generated.pdf",y){case void 0:return Rn();case"save":u.save(D.filename);break;case"arraybuffer":return J(Rn());case"blob":return Xi(Rn());case"bloburi":case"bloburl":if(St.URL!==void 0&&typeof St.URL.createObjectURL=="function")return St.URL&&St.URL.createObjectURL(Xi(Rn()))||void 0;nr.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var ae="",de=Rn();try{ae=Xw(de)}catch{ae=Xw(unescape(encodeURIComponent(de)))}return"data:application/pdf;filename="+encodeURIComponent(D.filename)+";base64,"+ae;case"pdfobjectnewwindow":if(Object.prototype.toString.call(St)==="[object Window]"){var Be="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",Ne=!D.pdfObjectUrl;Ne||(Be=D.pdfObjectUrl);var De=St.open();if(De!==null){var ct=XA(De),ot=ct.document.createElement("script"),It=this;ot.src=Be,Ne&&(ot.integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==",ot.crossOrigin="anonymous"),ot.onload=function(){De.PDFObject.embed(It.output("dataurlstring"),D)},ct.body.appendChild(ot)}return De}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if(Object.prototype.toString.call(St)==="[object Window]"){var kt=D.pdfJsUrl||"examples/PDF.js/web/viewer.html",Gt=St.open();if(Gt!==null){var $r=XA(Gt),ir=$r.document.createElement("iframe"),Ar=kt.indexOf("?")===-1?"?":"&";It=this,ir.id="pdfViewer",ir.width="500px",ir.height="400px",ir.src=kt+Ar+"file=&downloadName="+encodeURIComponent(D.filename),ir.onload=function(){Gt.document.title=D.filename,ir.contentWindow.PDFViewerApplication.open(It.output("bloburl"))},$r.body.appendChild(ir)}return Gt}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if(Object.prototype.toString.call(St)!=="[object Window]")throw new Error("The option dataurlnewwindow just works in a browser-environment.");var pr=St.open();if(pr!==null){var br=XA(pr),Cr=br.document.createElement("iframe");Cr.src=this.output("datauristring",D),br.body.appendChild(Cr),pr.document.title=D.filename}if(pr||typeof safari>"u")return pr;break;case"datauri":case"dataurl":return St.document.location.href=this.output("datauristring",D);default:return null}},MA.foo=function(){try{return MA.apply(this,arguments)}catch(ae){var y=ae.stack||"";~y.indexOf(" at ")&&(y=y.split(" at ")[1]);var D="Error in function "+y.split(`
|
|
9
|
+
`)[0].split("<")[0]+": "+ae.message;if(!St.console)throw new Error(D);St.console.error(D,ae),St.alert&&alert(D)}},MA.foo.bar=MA,MA.foo),si=function(y){return Array.isArray(Dn)===!0&&Dn.indexOf(y)>-1};switch(A){case"pt":At=1;break;case"mm":At=72/25.4;break;case"cm":At=72/2.54;break;case"in":At=72;break;case"px":At=si("px_scaling")==1?.75:96/72;break;case"pc":case"em":At=12;break;case"ex":At=6;break;default:if(typeof A!="number")throw new Error("Invalid unit: "+A);At=A}var tA=null;T(),le();var Gs=u.__private__.getPageInfo=u.getPageInfo=function(y){if(isNaN(y)||y%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:ht[y].objId,pageNumber:y,pageContext:ht[y]}},qa=u.__private__.getPageInfoByObjId=function(y){if(isNaN(y)||y%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var D in ht)if(ht[D].objId===y)break;return Gs(D)},Vs=u.__private__.getCurrentPageInfo=u.getCurrentPageInfo=function(){return{objId:ht[O].objId,pageNumber:O,pageContext:ht[O]}};u.addPage=function(){return rl.apply(this,arguments),this},u.setPage=function(){return zs.apply(this,arguments),Q.call(this,be[O]),this},u.insertPage=function(y){return this.addPage(),this.movePage(O,y),this},u.movePage=function(y,D){var ae,de;if(y>D){ae=be[y],de=ht[y];for(var Be=y;Be>D;Be--)be[Be]=be[Be-1],ht[Be]=ht[Be-1];be[D]=ae,ht[D]=de,this.setPage(D)}else if(y<D){ae=be[y],de=ht[y];for(var Ne=y;Ne<D;Ne++)be[Ne]=be[Ne+1],ht[Ne]=ht[Ne+1];be[D]=ae,ht[D]=de,this.setPage(D)}return this},u.deletePage=function(){return za.apply(this,arguments),this},u.__private__.text=u.text=function(y,D,ae,de,Be){var Ne,De,ct,ot,It,kt,Gt,$r,ir,Ar=(de=de||{}).scope||this;if(typeof y=="number"&&typeof D=="number"&&(typeof ae=="string"||Array.isArray(ae))){var pr=ae;ae=D,D=y,y=pr}if(arguments[3]instanceof yt==0?(ct=arguments[4],ot=arguments[5],$t(Gt=arguments[3])==="object"&&Gt!==null||(typeof ct=="string"&&(ot=ct,ct=null),typeof Gt=="string"&&(ot=Gt,Gt=null),typeof Gt=="number"&&(ct=Gt,Gt=null),de={flags:Gt,angle:ct,align:ot})):(I("The transform parameter of text() with a Matrix value"),ir=Be),isNaN(D)||isNaN(ae)||y==null)throw new Error("Invalid arguments passed to jsPDF.text");if(y.length===0)return Ar;var br,Cr="",DA=typeof de.lineHeightFactor=="number"?de.lineHeightFactor:qs,Aa=Ar.internal.scaleFactor;function Lc(cr){return cr=cr.split(" ").join(Array(de.TabLen||9).join(" ")),un(cr,Gt)}function Ys(cr){for(var ur,Mr=cr.concat(),nA=[],ia=Mr.length;ia--;)typeof(ur=Mr.shift())=="string"?nA.push(ur):Array.isArray(cr)&&(ur.length===1||ur[1]===void 0&&ur[2]===void 0)?nA.push(ur[0]):nA.push([ur[0],ur[1],ur[2]]);return nA}function Xs(cr,ur){var Mr;if(typeof cr=="string")Mr=ur(cr)[0];else if(Array.isArray(cr)){for(var nA,ia,Dc=cr.concat(),gl=[],Bh=Dc.length;Bh--;)typeof(nA=Dc.shift())=="string"?gl.push(ur(nA)[0]):Array.isArray(nA)&&typeof nA[0]=="string"&&(ia=ur(nA[0],nA[1],nA[2]),gl.push([ia[0],ia[1],ia[2]]));Mr=gl}return Mr}var $a=!1,Js=!0;if(typeof y=="string")$a=!0;else if(Array.isArray(y)){var ol=y.concat();De=[];for(var ll,HA=ol.length;HA--;)(typeof(ll=ol.shift())!="string"||Array.isArray(ll)&&typeof ll[0]!="string")&&(Js=!1);$a=Js}if($a===!1)throw new Error('Type of text must be string or Array. "'+y+'" is not recognized.');typeof y=="string"&&(y=y.match(/[\r?\n]/)?y.split(/\r\n|\r|\n/g):[y]);var Zs=ne/Ar.internal.scaleFactor,eo=Zs*(DA-1);switch(de.baseline){case"bottom":ae-=eo;break;case"top":ae+=Zs-eo;break;case"hanging":ae+=Zs-2*eo;break;case"middle":ae+=Zs/2-eo}if((kt=de.maxWidth||0)>0&&(typeof y=="string"?y=Ar.splitTextToSize(y,kt):Object.prototype.toString.call(y)==="[object Array]"&&(y=y.reduce(function(cr,ur){return cr.concat(Ar.splitTextToSize(ur,kt))},[]))),Ne={text:y,x:D,y:ae,options:de,mutex:{pdfEscape:un,activeFontKey:We,fonts:Bt,activeFontSize:ne}},qt.publish("preProcessText",Ne),y=Ne.text,ct=(de=Ne.options).angle,ir instanceof yt==0&&ct&&typeof ct=="number"){ct*=Math.PI/180,de.rotationDirection===0&&(ct=-ct),E===x&&(ct=-ct);var Tc=Math.cos(ct),Ii=Math.sin(ct);ir=new yt(Tc,Ii,-Ii,Tc,0,0)}else ct&&ct instanceof yt&&(ir=ct);E!==x||ir||(ir=ii),(It=de.charSpace||il)!==void 0&&(Cr+=R(M(It))+` Tc
|
|
10
|
+
`,this.setCharSpace(this.getCharSpace()||0)),($r=de.horizontalScale)!==void 0&&(Cr+=R(100*$r)+` Tz
|
|
11
|
+
`),de.lang;var JA=-1,wh=de.renderingMode!==void 0?de.renderingMode:de.stroke,cl=Ar.internal.getCurrentPageInfo().pageContext;switch(wh){case 0:case!1:case"fill":JA=0;break;case 1:case!0:case"stroke":JA=1;break;case 2:case"fillThenStroke":JA=2;break;case 3:case"invisible":JA=3;break;case 4:case"fillAndAddForClipping":JA=4;break;case 5:case"strokeAndAddPathForClipping":JA=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":JA=6;break;case 7:case"addToPathForClipping":JA=7}var yh=cl.usedRenderingMode!==void 0?cl.usedRenderingMode:-1;JA!==-1?Cr+=JA+` Tr
|
|
12
|
+
`:yh!==-1&&(Cr+=`0 Tr
|
|
13
|
+
`),JA!==-1&&(cl.usedRenderingMode=JA),ot=de.align||"left";var jn,to=ne*DA,Nc=Ar.internal.pageSize.getWidth(),ul=Bt[We];It=de.charSpace||il,kt=de.maxWidth||0,Gt=Object.assign({autoencode:!0,noBOM:!0},de.flags);var ro=[],Oc=function(cr){return Ar.getStringUnitWidth(cr,{font:ul,charSpace:It,fontSize:ne,doKerning:!1})*ne/Aa};if(Object.prototype.toString.call(y)==="[object Array]"){var ZA;De=Ys(y),ot!=="left"&&(jn=De.map(Oc));var fn,fl=0;if(ot==="right"){D-=jn[0],y=[],HA=De.length;for(var Ya=0;Ya<HA;Ya++)Ya===0?(fn=Zi(D),ZA=ea(ae)):(fn=M(fl-jn[Ya]),ZA=-to),y.push([De[Ya],fn,ZA]),fl=jn[Ya]}else if(ot==="center"){D-=jn[0]/2,y=[],HA=De.length;for(var Xa=0;Xa<HA;Xa++)Xa===0?(fn=Zi(D),ZA=ea(ae)):(fn=M((fl-jn[Xa])/2),ZA=-to),y.push([De[Xa],fn,ZA]),fl=jn[Xa]}else if(ot==="left"){y=[],HA=De.length;for(var hl=0;hl<HA;hl++)y.push(De[hl])}else if(ot==="justify"&&ul.encoding==="Identity-H"){y=[],HA=De.length,kt=kt!==0?kt:Nc;for(var Ao=0,Yr=0;Yr<HA;Yr++)if(ZA=Yr===0?ea(ae):-to,fn=Yr===0?Zi(D):Ao,Yr<HA-1){var Hv=M((kt-jn[Yr])/(De[Yr].split(" ").length-1)),Ui=De[Yr].split(" ");y.push([Ui[0]+" ",fn,ZA]),Ao=0;for(var oi=1;oi<Ui.length;oi++){var no=(Oc(Ui[oi-1]+" "+Ui[oi])-Oc(Ui[oi]))*Aa+Hv;oi==Ui.length-1?y.push([Ui[oi],no,0]):y.push([Ui[oi]+" ",no,0]),Ao-=no}}else y.push([De[Yr],fn,ZA]);y.push(["",Ao,0])}else{if(ot!=="justify")throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');for(y=[],HA=De.length,kt=kt!==0?kt:Nc,Yr=0;Yr<HA;Yr++){ZA=Yr===0?ea(ae):-to,fn=Yr===0?Zi(D):0;var Pc=De[Yr].split(" ").length-1,Mc=Pc>0?(kt-jn[Yr])/Pc:0;Yr<HA-1?ro.push(R(M(Mc))):ro.push(0),y.push([De[Yr],fn,ZA])}}}(typeof de.R2L=="boolean"?de.R2L:he)===!0&&(y=Xs(y,function(cr,ur,Mr){return[cr.split("").reverse().join(""),ur,Mr]})),Ne={text:y,x:D,y:ae,options:de,mutex:{pdfEscape:un,activeFontKey:We,fonts:Bt,activeFontSize:ne}},qt.publish("postProcessText",Ne),y=Ne.text,br=Ne.mutex.isHex||!1;var dl=Bt[We].encoding;dl!=="WinAnsiEncoding"&&dl!=="StandardEncoding"||(y=Xs(y,function(cr,ur,Mr){return[Lc(cr),ur,Mr]})),De=Ys(y),y=[];for(var io,ao,Ja,na=Array.isArray(De[0])?1:0,Za="",pl=function(cr,ur,Mr){var nA="";return Mr instanceof yt?(Mr=typeof de.angle=="number"?Bn(Mr,new yt(1,0,0,1,cr,ur)):Bn(new yt(1,0,0,1,cr,ur),Mr),E===x&&(Mr=Bn(new yt(1,0,0,-1,0,0),Mr)),nA=Mr.join(" ")+` Tm
|
|
14
|
+
`):nA=R(cr)+" "+R(ur)+` Td
|
|
15
|
+
`,nA},RA=0;RA<De.length;RA++){switch(Za="",na){case 1:Ja=(br?"<":"(")+De[RA][0]+(br?">":")"),io=parseFloat(De[RA][1]),ao=parseFloat(De[RA][2]);break;case 0:Ja=(br?"<":"(")+De[RA]+(br?">":")"),io=Zi(D),ao=ea(ae)}ro!==void 0&&ro[RA]!==void 0&&(Za=ro[RA]+` Tw
|
|
16
|
+
`),RA===0?y.push(Za+pl(io,ao,ir)+Ja):na===0?y.push(Za+Ja):na===1&&y.push(Za+pl(io,ao,ir)+Ja)}y=na===0?y.join(` Tj
|
|
17
|
+
T* `):y.join(` Tj
|
|
18
|
+
`),y+=` Tj
|
|
19
|
+
`;var _i=`BT
|
|
20
|
+
/`;return _i+=We+" "+ne+` Tf
|
|
21
|
+
`,_i+=R(ne*DA)+` TL
|
|
22
|
+
`,_i+=Fi+`
|
|
23
|
+
`,_i+=Cr,_i+=y,N(_i+="ET"),h[We]=!0,Ar};var qe=u.__private__.clip=u.clip=function(y){return N(y==="evenodd"?"W*":"W"),this};u.clipEvenOdd=function(){return qe("evenodd")},u.__private__.discardPath=u.discardPath=function(){return N("n"),this};var re=u.__private__.isValidStyle=function(y){var D=!1;return[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(y)!==-1&&(D=!0),D};u.__private__.setDefaultPathOperation=u.setDefaultPathOperation=function(y){return re(y)&&(l=y),this};var Ie=u.__private__.getStyle=u.getStyle=function(y){var D=l;switch(y){case"D":case"S":D="S";break;case"F":D="f";break;case"FD":case"DF":D="B";break;case"f":case"f*":case"B":case"B*":D=y}return D},He=u.close=function(){return N("h"),this};u.stroke=function(){return N("S"),this},u.fill=function(y){return et("f",y),this},u.fillEvenOdd=function(y){return et("f*",y),this},u.fillStroke=function(y){return et("B",y),this},u.fillStrokeEvenOdd=function(y){return et("B*",y),this};var et=function(y,D){$t(D)==="object"?lr(D,y):N(y)},vt=function(y){y===null||E===x&&y===void 0||(y=Ie(y),N(y))};function xt(y,D,ae,de,Be){var Ne=new vo(D||this.boundingBox,ae||this.xStep,de||this.yStep,this.gState,Be||this.matrix);Ne.stream=this.stream;var De=y+"$$"+this.cloneIndex+++"$$";return WA(De,Ne),Ne}var lr=function(y,D){var ae=Pt[y.key],de=st[ae];if(de instanceof fs)N("q"),N(Vr(D)),de.gState&&u.setGState(de.gState),N(y.matrix.toString()+" cm"),N("/"+ae+" sh"),N("Q");else if(de instanceof vo){var Be=new yt(1,0,0,-1,0,$s());y.matrix&&(Be=Be.multiply(y.matrix||ii),ae=xt.call(de,y.key,y.boundingBox,y.xStep,y.yStep,Be).id),N("q"),N("/Pattern cs"),N("/"+ae+" scn"),de.gState&&u.setGState(de.gState),N(D),N("Q")}},Vr=function(y){switch(y){case"f":case"F":case"n":return"W n";case"f*":return"W* n";case"B":case"S":return"W S";case"B*":return"W* S"}},qr=u.moveTo=function(y,D){return N(R(M(y))+" "+R(b(D))+" m"),this},rA=u.lineTo=function(y,D){return N(R(M(y))+" "+R(b(D))+" l"),this},Wr=u.curveTo=function(y,D,ae,de,Be,Ne){return N([R(M(y)),R(b(D)),R(M(ae)),R(b(de)),R(M(Be)),R(b(Ne)),"c"].join(" ")),this};u.__private__.line=u.line=function(y,D,ae,de,Be){if(isNaN(y)||isNaN(D)||isNaN(ae)||isNaN(de)||!re(Be))throw new Error("Invalid arguments passed to jsPDF.line");return E===B?this.lines([[ae-y,de-D]],y,D,[1,1],Be||"S"):this.lines([[ae-y,de-D]],y,D,[1,1]).stroke()},u.__private__.lines=u.lines=function(y,D,ae,de,Be,Ne){var De,ct,ot,It,kt,Gt,$r,ir,Ar,pr,br,Cr;if(typeof y=="number"&&(Cr=ae,ae=D,D=y,y=Cr),de=de||[1,1],Ne=Ne||!1,isNaN(D)||isNaN(ae)||!Array.isArray(y)||!Array.isArray(de)||!re(Be)||typeof Ne!="boolean")throw new Error("Invalid arguments passed to jsPDF.lines");for(qr(D,ae),De=de[0],ct=de[1],It=y.length,pr=D,br=ae,ot=0;ot<It;ot++)(kt=y[ot]).length===2?(pr=kt[0]*De+pr,br=kt[1]*ct+br,rA(pr,br)):(Gt=kt[0]*De+pr,$r=kt[1]*ct+br,ir=kt[2]*De+pr,Ar=kt[3]*ct+br,pr=kt[4]*De+pr,br=kt[5]*ct+br,Wr(Gt,$r,ir,Ar,pr,br));return Ne&&He(),vt(Be),this},u.path=function(y){for(var D=0;D<y.length;D++){var ae=y[D],de=ae.c;switch(ae.op){case"m":qr(de[0],de[1]);break;case"l":rA(de[0],de[1]);break;case"c":Wr.apply(this,de);break;case"h":He()}}return this},u.__private__.rect=u.rect=function(y,D,ae,de,Be){if(isNaN(y)||isNaN(D)||isNaN(ae)||isNaN(de)||!re(Be))throw new Error("Invalid arguments passed to jsPDF.rect");return E===B&&(de=-de),N([R(M(y)),R(b(D)),R(M(ae)),R(M(de)),"re"].join(" ")),vt(Be),this},u.__private__.triangle=u.triangle=function(y,D,ae,de,Be,Ne,De){if(isNaN(y)||isNaN(D)||isNaN(ae)||isNaN(de)||isNaN(Be)||isNaN(Ne)||!re(De))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[ae-y,de-D],[Be-ae,Ne-de],[y-Be,D-Ne]],y,D,[1,1],De,!0),this},u.__private__.roundedRect=u.roundedRect=function(y,D,ae,de,Be,Ne,De){if(isNaN(y)||isNaN(D)||isNaN(ae)||isNaN(de)||isNaN(Be)||isNaN(Ne)||!re(De))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var ct=4/3*(Math.SQRT2-1);return Be=Math.min(Be,.5*ae),Ne=Math.min(Ne,.5*de),this.lines([[ae-2*Be,0],[Be*ct,0,Be,Ne-Ne*ct,Be,Ne],[0,de-2*Ne],[0,Ne*ct,-Be*ct,Ne,-Be,Ne],[2*Be-ae,0],[-Be*ct,0,-Be,-Ne*ct,-Be,-Ne],[0,2*Ne-de],[0,-Ne*ct,Be*ct,-Ne,Be,-Ne]],y+Be,D,[1,1],De,!0),this},u.__private__.ellipse=u.ellipse=function(y,D,ae,de,Be){if(isNaN(y)||isNaN(D)||isNaN(ae)||isNaN(de)||!re(Be))throw new Error("Invalid arguments passed to jsPDF.ellipse");var Ne=4/3*(Math.SQRT2-1)*ae,De=4/3*(Math.SQRT2-1)*de;return qr(y+ae,D),Wr(y+ae,D-De,y+Ne,D-de,y,D-de),Wr(y-Ne,D-de,y-ae,D-De,y-ae,D),Wr(y-ae,D+De,y-Ne,D+de,y,D+de),Wr(y+Ne,D+de,y+ae,D+De,y+ae,D),vt(Be),this},u.__private__.circle=u.circle=function(y,D,ae,de){if(isNaN(y)||isNaN(D)||isNaN(ae)||!re(de))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(y,D,ae,ae,de)},u.setFont=function(y,D,ae){return ae&&(D=K(D,ae)),We=Ga(y,D,{disableWarning:!1}),this};var AA=u.__private__.getFont=u.getFont=function(){return Bt[Ga.apply(u,arguments)]};u.__private__.getFontList=u.getFontList=function(){var y,D,ae={};for(y in bt)if(bt.hasOwnProperty(y))for(D in ae[y]=[],bt[y])bt[y].hasOwnProperty(D)&&ae[y].push(D);return ae},u.addFont=function(y,D,ae,de,Be){var Ne=["StandardEncoding","MacRomanEncoding","Identity-H","WinAnsiEncoding"];return arguments[3]&&Ne.indexOf(arguments[3])!==-1?Be=arguments[3]:arguments[3]&&Ne.indexOf(arguments[3])==-1&&(ae=K(ae,de)),Hn.call(this,y,D,ae,Be=Be||"Identity-H")};var qs,Ft=t.lineWidth||.200025,Qv=u.__private__.getLineWidth=u.getLineWidth=function(){return Ft},kv=u.__private__.setLineWidth=u.setLineWidth=function(y){return Ft=y,N(R(M(y))+" w"),this};u.__private__.setLineDash=dt.API.setLineDash=dt.API.setLineDashPattern=function(y,D){if(y=y||[],D=D||0,isNaN(D)||!Array.isArray(y))throw new Error("Invalid arguments passed to jsPDF.setLineDash");return y=y.map(function(ae){return R(M(ae))}).join(" "),D=R(M(D)),N("["+y+"] "+D+" d"),this};var Lv=u.__private__.getLineHeight=u.getLineHeight=function(){return ne*qs};u.__private__.getLineHeight=u.getLineHeight=function(){return ne*qs};var Tv=u.__private__.setLineHeightFactor=u.setLineHeightFactor=function(y){return typeof(y=y||1.15)=="number"&&(qs=y),this},Nv=u.__private__.getLineHeightFactor=u.getLineHeightFactor=function(){return qs};Tv(t.lineHeight);var Zi=u.__private__.getHorizontalCoordinate=function(y){return M(y)},ea=u.__private__.getVerticalCoordinate=function(y){return E===x?y:ht[O].mediaBox.topRightY-ht[O].mediaBox.bottomLeftY-M(y)},Ov=u.__private__.getHorizontalCoordinateString=u.getHorizontalCoordinateString=function(y){return R(Zi(y))},Pv=u.__private__.getVerticalCoordinateString=u.getVerticalCoordinateString=function(y){return R(ea(y))},nl=t.strokeColor||"0 G";u.__private__.getStrokeColor=u.getDrawColor=function(){return zt(nl)},u.__private__.setStrokeColor=u.setDrawColor=function(y,D,ae,de){return nl=pA({ch1:y,ch2:D,ch3:ae,ch4:de,pdfColorType:"draw",precision:2}),N(nl),this};var Ic=t.fillColor||"0 g";u.__private__.getFillColor=u.getFillColor=function(){return zt(Ic)},u.__private__.setFillColor=u.setFillColor=function(y,D,ae,de){return Ic=pA({ch1:y,ch2:D,ch3:ae,ch4:de,pdfColorType:"fill",precision:2}),N(Ic),this};var Fi=t.textColor||"0 g",Mv=u.__private__.getTextColor=u.getTextColor=function(){return zt(Fi)};u.__private__.setTextColor=u.setTextColor=function(y,D,ae,de){return Fi=pA({ch1:y,ch2:D,ch3:ae,ch4:de,pdfColorType:"text",precision:3}),this};var il=t.charSpace,Dv=u.__private__.getCharSpace=u.getCharSpace=function(){return parseFloat(il||0)};u.__private__.setCharSpace=u.setCharSpace=function(y){if(isNaN(y))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return il=y,this};var Uc=0;u.CapJoinStyles={0:0,butt:0,but:0,miter:0,1:1,round:1,rounded:1,circle:1,2:2,projecting:2,project:2,square:2,bevel:2},u.__private__.setLineCap=u.setLineCap=function(y){var D=u.CapJoinStyles[y];if(D===void 0)throw new Error("Line cap style of '"+y+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Uc=D,N(D+" J"),this};var Wa=0;u.__private__.setLineJoin=u.setLineJoin=function(y){var D=u.CapJoinStyles[y];if(D===void 0)throw new Error("Line join style of '"+y+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Wa=D,N(D+" j"),this},u.__private__.setLineMiterLimit=u.__private__.setMiterLimit=u.setLineMiterLimit=u.setMiterLimit=function(y){if(y=y||0,isNaN(y))throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");return N(R(M(y))+" M"),this},u.GState=hu,u.setGState=function(y){(y=typeof y=="string"?rt[wt[y]]:_c(null,y)).equals(Kt)||(N("/"+y.id+" gs"),Kt=y)};var _c=function(y,D){if(!y||!wt[y]){var ae=!1;for(var de in rt)if(rt.hasOwnProperty(de)&&rt[de].equals(D)){ae=!0;break}if(ae)D=rt[de];else{var Be="GS"+(Object.keys(rt).length+1).toString(10);rt[Be]=D,D.id=Be}return y&&(wt[y]=D.id),qt.publish("addGState",D),D}};u.addGState=function(y,D){return _c(y,D),this},u.saveGraphicsState=function(){return N("q"),Tt.push({key:We,size:ne,color:Fi}),this},u.restoreGraphicsState=function(){N("Q");var y=Tt.pop();return We=y.key,ne=y.size,Fi=y.color,Kt=null,this},u.setCurrentTransformationMatrix=function(y){return N(y.toString()+" cm"),this},u.comment=function(y){return N("#"+y),this};var Ws=function(y,D){var ae=y||0;Object.defineProperty(this,"x",{enumerable:!0,get:function(){return ae},set:function(Ne){isNaN(Ne)||(ae=parseFloat(Ne))}});var de=D||0;Object.defineProperty(this,"y",{enumerable:!0,get:function(){return de},set:function(Ne){isNaN(Ne)||(de=parseFloat(Ne))}});var Be="pt";return Object.defineProperty(this,"type",{enumerable:!0,get:function(){return Be},set:function(Ne){Be=Ne.toString()}}),this},Qc=function(y,D,ae,de){Ws.call(this,y,D),this.type="rect";var Be=ae||0;Object.defineProperty(this,"w",{enumerable:!0,get:function(){return Be},set:function(De){isNaN(De)||(Be=parseFloat(De))}});var Ne=de||0;return Object.defineProperty(this,"h",{enumerable:!0,get:function(){return Ne},set:function(De){isNaN(De)||(Ne=parseFloat(De))}}),this},al=function(){this.page=lt,this.currentPage=O,this.pages=be.slice(0),this.pagesContext=ht.slice(0),this.x=$e,this.y=_t,this.matrix=at,this.width=dh(O),this.height=ra(O),this.outputDestination=Te,this.id="",this.objectNumber=-1};al.prototype.restore=function(){lt=this.page,O=this.currentPage,ht=this.pagesContext,be=this.pages,$e=this.x,_t=this.y,at=this.matrix,ta(O,this.width),ph(O,this.height),Te=this.outputDestination};var kc=function(y,D,ae,de,Be){CA.push(new al),lt=O=0,be=[],$e=y,_t=D,at=Be,Wi([ae,de])};for(var sl in u.beginFormObject=function(y,D,ae,de,Be){return kc(y,D,ae,de,Be),this},u.endFormObject=function(y){return(function(D){if(Gr[D])CA.pop().restore();else{var ae=new al,de="Xo"+(Object.keys(Pr).length+1).toString(10);ae.id=de,Gr[D]=de,Pr[de]=ae,qt.publish("addFormObject",ae),CA.pop().restore()}})(y),this},u.doFormObject=function(y,D){var ae=Pr[Gr[y]];return N("q"),N(D.toString()+" cm"),N("/"+ae.id+" Do"),N("Q"),this},u.getFormObject=function(y){var D=Pr[Gr[y]];return{x:D.x,y:D.y,width:D.width,height:D.height,matrix:D.matrix}},u.save=function(y,D){return y=y||"generated.pdf",(D=D||{}).returnPromise=D.returnPromise||!1,D.returnPromise===!1?(us(Xi(Rn()),y),typeof us.unload=="function"&&St.setTimeout&&setTimeout(us.unload,911),this):new Promise(function(ae,de){try{var Be=us(Xi(Rn()),y);typeof us.unload=="function"&&St.setTimeout&&setTimeout(us.unload,911),ae(Be)}catch(Ne){de(Ne.message)}})},dt.API)dt.API.hasOwnProperty(sl)&&(sl==="events"&&dt.API.events.length?(function(y,D){var ae,de,Be;for(Be=D.length-1;Be!==-1;Be--)ae=D[Be][0],de=D[Be][1],y.subscribe.apply(y,[ae].concat(typeof de=="function"?[de]:de))})(qt,dt.API.events):u[sl]=dt.API[sl]);function dh(y){return ht[y].mediaBox.topRightX-ht[y].mediaBox.bottomLeftX}function ta(y,D){ht[y].mediaBox.topRightX=D+ht[y].mediaBox.bottomLeftX}function ra(y){return ht[y].mediaBox.topRightY-ht[y].mediaBox.bottomLeftY}function ph(y,D){ht[y].mediaBox.topRightY=D+ht[y].mediaBox.bottomLeftY}var gh=u.getPageWidth=function(y){return dh(y=y||O)/At},vh=u.setPageWidth=function(y,D){ta(y,D*At)},$s=u.getPageHeight=function(y){return ra(y=y||O)/At},mh=u.setPageHeight=function(y,D){ph(y,D*At)};return u.internal={pdfEscape:un,getStyle:Ie,getFont:AA,getFontSize:ye,getCharSpace:Dv,getTextColor:Mv,getLineHeight:Lv,getLineHeightFactor:Nv,getLineWidth:Qv,write:ue,getHorizontalCoordinate:Zi,getVerticalCoordinate:ea,getCoordinateString:Ov,getVerticalCoordinateString:Pv,collections:{},newObject:dr,newAdditionalObject:bn,newObjectDeferred:Ir,newObjectDeferredBegin:eA,getFilters:xn,putStream:$A,events:qt,scaleFactor:At,pageSize:{getWidth:function(){return gh(O)},setWidth:function(y){vh(O,y)},getHeight:function(){return $s(O)},setHeight:function(y){mh(O,y)}},encryptionOptions:c,encryption:tA,getEncryptor:function(y){return c!==null?tA.encryptor(y,0):function(D){return D}},output:Ji,getNumberOfPages:$i,get pages(){return be},out:N,f2:L,f3:F,getPageInfo:Gs,getPageInfoByObjId:qa,getCurrentPageInfo:Vs,getPDFVersion:p,Point:Ws,Rectangle:Qc,Matrix:yt,hasHotfix:si},Object.defineProperty(u.internal.pageSize,"width",{get:function(){return gh(O)},set:function(y){vh(O,y)},enumerable:!0,configurable:!0}),Object.defineProperty(u.internal.pageSize,"height",{get:function(){return $s(O)},set:function(y){mh(O,y)},enumerable:!0,configurable:!0}),(function(y){for(var D=0,ae=q.length;D<ae;D++){var de=Hn.call(this,y[D][0],y[D][1],y[D][2],q[D][3],!0);f===!1&&(h[de]=!0);var Be=y[D][0].split("-");qi({id:de,fontName:Be[0],fontStyle:Be[1]||""})}qt.publish("addFonts",{fonts:Bt,dictionary:bt})}).call(u,q),We="F1",rl(n,r),qt.publish("initialized"),u}po.prototype.lsbFirstWord=function(t){return String.fromCharCode(255&t,t>>8&255,t>>16&255,t>>24&255)},po.prototype.toHexString=function(t){return t.split("").map(function(e){return("0"+(255&e.charCodeAt(0)).toString(16)).slice(-2)}).join("")},po.prototype.hexToBytes=function(t){for(var e=[],r=0;r<t.length;r+=2)e.push(String.fromCharCode(parseInt(t.substr(r,2),16)));return e.join("")},po.prototype.processOwnerPassword=function(t,e){return Ud(Id(e).substr(0,5),t)},po.prototype.encryptor=function(t,e){var r=Id(this.encryptionKey+String.fromCharCode(255&t,t>>8&255,t>>16&255,255&e,e>>8&255)).substr(0,10);return function(A){return Ud(r,A)}},hu.prototype.equals=function(t){var e,r="id,objectNumber,equals";if(!t||$t(t)!==$t(this))return!1;var A=0;for(e in this)if(!(r.indexOf(e)>=0)){if(this.hasOwnProperty(e)&&!t.hasOwnProperty(e)||this[e]!==t[e])return!1;A++}for(e in t)t.hasOwnProperty(e)&&r.indexOf(e)<0&&A--;return A===0},dt.API={events:[]},dt.version="4.2.1";var xr=dt.API,_d=1,hs=function(t){return t.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},mo=function(t){return t.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},ds=function(t){return t.toString().replace(/#/g,"#23").replace(/[\s\n\r()<>[\]{}\/%]/g,function(e){var r=e.charCodeAt(0).toString(16).toUpperCase();return"#"+(r.length===1?"0"+r:r)})},Ut=function(t){return t.toFixed(2)},ha=function(t){return t.toFixed(5)};xr.__acroform__={};var An=function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t},Ay=function(t){return t*_d},di=function(t){var e=new iy,r=it.internal.getHeight(t)||0,A=it.internal.getWidth(t)||0;return e.BBox=[0,0,Number(Ut(A)),Number(Ut(r))],e},_Q=xr.__acroform__.setBit=function(t,e){if(t=t||0,e=e||0,isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return t|1<<e},QQ=xr.__acroform__.clearBit=function(t,e){if(t=t||0,e=e||0,isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");return t&~(1<<e)},kQ=xr.__acroform__.getBit=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return t&1<<e?1:0},Qr=xr.__acroform__.getBitForPdf=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return kQ(t,e-1)},kr=xr.__acroform__.setBitForPdf=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return _Q(t,e-1)},Lr=xr.__acroform__.clearBitForPdf=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return QQ(t,e-1)},LQ=xr.__acroform__.calculateCoordinates=function(t,e){var r=e.internal.getHorizontalCoordinate,A=e.internal.getVerticalCoordinate,n=t[0],i=t[1],s=t[2],a=t[3],o={};return o.lowerLeft_X=r(n)||0,o.lowerLeft_Y=A(i+a)||0,o.upperRight_X=r(n+s)||0,o.upperRight_Y=A(i)||0,[Number(Ut(o.lowerLeft_X)),Number(Ut(o.lowerLeft_Y)),Number(Ut(o.upperRight_X)),Number(Ut(o.upperRight_Y))]},TQ=function(t){if(t.appearanceStreamContent)return t.appearanceStreamContent;if(t.V||t.DV){var e=[],r=t._V||t.DV,A=Qd(t,r),n=t.scope.internal.getFont(t.fontName,t.fontStyle).id;e.push("/Tx BMC"),e.push("q"),e.push("BT"),e.push(t.scope.__private__.encodeColorString(t.color)),e.push("/"+n+" "+Ut(A.fontSize)+" Tf"),e.push("1 0 0 1 0 0 Tm"),e.push(A.text),e.push("ET"),e.push("Q"),e.push("EMC");var i=di(t);return i.scope=t.scope,i.stream=e.join(`
|
|
24
|
+
`),i}},Qd=function(t,e){var r=t.fontSize===0?t.maxFontSize:t.fontSize,A={text:"",fontSize:""},n=(e=(e=e.substr(0,1)=="("?e.substr(1):e).substr(e.length-1)==")"?e.substr(0,e.length-1):e).split(" ");n=t.multiline?n.map(function(L){return L.split(`
|
|
25
|
+
`)}):n.map(function(L){return[L]});var i=r,s=it.internal.getHeight(t)||0;s=s<0?-s:s;var a=it.internal.getWidth(t)||0;a=a<0?-a:a;var o=function(L,F,M){if(L+1<n.length){var b=F+" "+n[L+1][0];return du(b,t,M).width<=a-4}return!1};i++;e:for(;i>0;){e="",i--;var l,c,f=du("3",t,i).height,h=t.multiline?s-i:(s-f)/2,u=h+=2,g=0,p=0,w=0;if(i<=0){e=`(...) Tj
|
|
26
|
+
`,e+="% Width of Text: "+du(e,t,i=12).width+", FieldWidth:"+a+`
|
|
27
|
+
`;break}for(var m="",B=0,x=0;x<n.length;x++)if(n.hasOwnProperty(x)){var E=!1;if(n[x].length!==1&&w!==n[x].length-1){if((f+2)*(B+2)+2>s)continue e;m+=n[x][w],E=!0,p=x,x--}else{m=(m+=n[x][w]+" ").substr(m.length-1)==" "?m.substr(0,m.length-1):m;var k=parseInt(x),H=o(k,m,i),K=x>=n.length-1;if(H&&!K){m+=" ",w=0;continue}if(H||K){if(K)p=k;else if(t.multiline&&(f+2)*(B+2)+2>s)continue e}else{if(!t.multiline||(f+2)*(B+2)+2>s)continue e;p=k}}for(var R="",I=g;I<=p;I++){var W=n[I];if(t.multiline){if(I===p){R+=W[w]+" ",w=(w+1)%W.length;continue}if(I===g){R+=W[W.length-1]+" ";continue}}R+=W[0]+" "}switch(R=R.substr(R.length-1)==" "?R.substr(0,R.length-1):R,c=du(R,t,i).width,t.textAlign){case"right":l=a-c-2;break;case"center":l=(a-c)/2;break;default:l=2}e+=Ut(l)+" "+Ut(u)+` Td
|
|
28
|
+
`,e+="("+hs(R)+`) Tj
|
|
29
|
+
`,e+=-Ut(l)+` 0 Td
|
|
30
|
+
`,u=-(i+2),c=0,g=E?p:p+1,B++,m=""}break}return A.text=e,A.fontSize=i,A},du=function(t,e,r){var A=e.scope.internal.getFont(e.fontName,e.fontStyle),n=e.scope.getStringUnitWidth(t,{font:A,fontSize:parseFloat(r),charSpace:0})*parseFloat(r);return{height:e.scope.getStringUnitWidth("3",{font:A,fontSize:parseFloat(r),charSpace:0})*parseFloat(r)*1.5,width:n}},NQ={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},OQ=function(t,e){var r={type:"reference",object:t};e.internal.getPageInfo(t.page).pageContext.annotations.find(function(A){return A.type===r.type&&A.object===r.object})===void 0&&e.internal.getPageInfo(t.page).pageContext.annotations.push(r)},PQ=function(t,e){if(e.scope=t,t.internal!==void 0&&(t.internal.acroformPlugin===void 0||t.internal.acroformPlugin.isInitialized===!1)){if(qn.FieldNum=0,t.internal.acroformPlugin=JSON.parse(JSON.stringify(NQ)),t.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");_d=t.internal.scaleFactor,t.internal.acroformPlugin.acroFormDictionaryRoot=new ay,t.internal.acroformPlugin.acroFormDictionaryRoot.scope=t,t.internal.acroformPlugin.acroFormDictionaryRoot._eventID=t.internal.events.subscribe("postPutResources",function(){(function(r){r.internal.events.unsubscribe(r.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete r.internal.acroformPlugin.acroFormDictionaryRoot._eventID,r.internal.acroformPlugin.printedOut=!0})(t)}),t.internal.events.subscribe("buildDocument",function(){(function(r){r.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var A=r.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var n in A)if(A.hasOwnProperty(n)){var i=A[n];i.objId=void 0,i.hasAnnotation&&OQ(i,r)}})(t)}),t.internal.events.subscribe("putCatalog",function(){(function(r){if(r.internal.acroformPlugin.acroFormDictionaryRoot===void 0)throw new Error("putCatalogCallback: Root missing.");r.internal.write("/AcroForm "+r.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")})(t)}),t.internal.events.subscribe("postPutPages",function(r){(function(A,n){var i=!A;for(var s in A||(n.internal.newObjectDeferredBegin(n.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),n.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),A=A||n.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(A.hasOwnProperty(s)){var a=A[s],o=[],l=a.Rect;if(a.Rect&&(a.Rect=LQ(a.Rect,n)),n.internal.newObjectDeferredBegin(a.objId,!0),a.DA=it.createDefaultAppearanceStream(a),$t(a)==="object"&&typeof a.getKeyValueListForStream=="function"&&(o=a.getKeyValueListForStream()),a.Rect=l,a.hasAppearanceStream&&!a.appearanceStreamContent){var c=TQ(a);o.push({key:"AP",value:"<</N "+c+">>"}),n.internal.acroformPlugin.xForms.push(c)}if(a.appearanceStreamContent){var f="";for(var h in a.appearanceStreamContent)if(a.appearanceStreamContent.hasOwnProperty(h)){var u=a.appearanceStreamContent[h];if(f+="/"+h+" ",f+="<<",Object.keys(u).length>=1||Array.isArray(u)){for(var s in u)if(u.hasOwnProperty(s)){var g=u[s];typeof g=="function"&&(g=g.call(n,a)),f+="/"+s+" "+g+" ",n.internal.acroformPlugin.xForms.indexOf(g)>=0||n.internal.acroformPlugin.xForms.push(g)}}else typeof(g=u)=="function"&&(g=g.call(n,a)),f+="/"+s+" "+g,n.internal.acroformPlugin.xForms.indexOf(g)>=0||n.internal.acroformPlugin.xForms.push(g);f+=">>"}o.push({key:"AP",value:`<<
|
|
31
|
+
`+f+">>"})}n.internal.putStream({additionalKeyValues:o,objectId:a.objId}),n.internal.out("endobj")}i&&(function(p,w){for(var m in p)if(p.hasOwnProperty(m)){var B=m,x=p[m];w.internal.newObjectDeferredBegin(x.objId,!0),$t(x)==="object"&&typeof x.putStream=="function"&&x.putStream(),delete p[B]}})(n.internal.acroformPlugin.xForms,n)})(r,t)}),t.internal.acroformPlugin.isInitialized=!0}},ny=xr.__acroform__.arrayToPdfArray=function(t,e,r){var A=function(s){return s};if(Array.isArray(t)){for(var n="[",i=0;i<t.length;i++)switch(i!==0&&(n+=" "),$t(t[i])){case"boolean":case"number":case"object":n+=t[i].toString();break;case"string":t[i].substr(0,1)==="/"?n+="/"+ds(t[i].substr(1)):(e!==void 0&&r&&(A=r.internal.getEncryptor(e)),n+="("+hs(A(t[i].toString()))+")")}return n+"]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},kd=function(t,e,r){var A=function(n){return n};return e!==void 0&&r&&(A=r.internal.getEncryptor(e)),(t=t||"").toString(),"("+hs(A(t))+")"},pi=function(){this._objId=void 0,this._scope=void 0,Object.defineProperty(this,"objId",{get:function(){if(this._objId===void 0){if(this.scope===void 0)return;this._objId=this.scope.internal.newObjectDeferred()}return this._objId},set:function(t){this._objId=t}}),Object.defineProperty(this,"scope",{value:this._scope,writable:!0})};pi.prototype.toString=function(){return this.objId+" 0 R"},pi.prototype.putStream=function(){var t=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:t,objectId:this.objId}),this.scope.internal.out("endobj")},pi.prototype.getKeyValueListForStream=function(){var t=[],e=Object.getOwnPropertyNames(this).filter(function(i){return i!="content"&&i!="appearanceStreamContent"&&i!="scope"&&i!="objId"&&i.substring(0,1)!="_"});for(var r in e)if(Object.getOwnPropertyDescriptor(this,e[r]).configurable===!1){var A=e[r],n=this[A];n&&(Array.isArray(n)?t.push({key:A,value:ny(n,this.objId,this.scope)}):n instanceof pi?(n.scope=this.scope,t.push({key:A,value:n.objId+" 0 R"})):typeof n!="function"&&t.push({key:A,value:n}))}return t};var iy=function(){pi.call(this),Object.defineProperty(this,"Type",{value:"/XObject",configurable:!1,writable:!0}),Object.defineProperty(this,"Subtype",{value:"/Form",configurable:!1,writable:!0}),Object.defineProperty(this,"FormType",{value:1,configurable:!1,writable:!0});var t,e=[];Object.defineProperty(this,"BBox",{configurable:!1,get:function(){return e},set:function(r){e=r}}),Object.defineProperty(this,"Resources",{value:"2 0 R",configurable:!1,writable:!0}),Object.defineProperty(this,"stream",{enumerable:!1,configurable:!0,set:function(r){t=r.trim()},get:function(){return t||null}})};An(iy,pi);var ay=function(){pi.call(this);var t,e=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){return e.length>0?e:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return e}}),Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){if(t){var r=function(A){return A};return this.scope&&(r=this.scope.internal.getEncryptor(this.objId)),"("+hs(r(t))+")"}},set:function(r){t=r}})};An(ay,pi);var qn=function t(){pi.call(this);var e=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return e},set:function(m){if(isNaN(m))throw new Error('Invalid value "'+m+'" for attribute F supplied.');e=m}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return!!Qr(e,3)},set:function(m){m?this.F=kr(e,3):this.F=Lr(e,3)}});var r=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return r},set:function(m){if(isNaN(m))throw new Error('Invalid value "'+m+'" for attribute Ff supplied.');r=m}});var A=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(A.length!==0)return A},set:function(m){A=m!==void 0?m:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!A||isNaN(A[0])?0:A[0]},set:function(m){A[0]=m}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!A||isNaN(A[1])?0:A[1]},set:function(m){A[1]=m}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!A||isNaN(A[2])?0:A[2]},set:function(m){A[2]=m}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!A||isNaN(A[3])?0:A[3]},set:function(m){A[3]=m}});var n="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return n},set:function(m){switch(m){case"/Btn":case"/Tx":case"/Ch":case"/Sig":n=m;break;default:throw new Error('Invalid value "'+m+'" for attribute FT supplied.')}}});var i=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!i||i.length<1){if(this instanceof vu)return;i="FieldObject"+t.FieldNum++}var m=function(B){return B};return this.scope&&(m=this.scope.internal.getEncryptor(this.objId)),"("+hs(m(i))+")"},set:function(m){i=m.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return i},set:function(m){i=m}});var s="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return s},set:function(m){s=m}});var a="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return a},set:function(m){a=m}});var o=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return o},set:function(m){o=m}});var l=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return l===void 0?50/_d:l},set:function(m){l=m}});var c="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return c},set:function(m){c=m}});var f="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!f||this instanceof vu||this instanceof ps))return kd(f,this.objId,this.scope)},set:function(m){m=m.toString(),f=m}});var h=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(h)return this instanceof oA==0?kd(h,this.objId,this.scope):h},set:function(m){m=m.toString(),h=this instanceof oA==0?m.substr(0,1)==="("?mo(m.substr(1,m.length-2)):mo(m):m}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof oA==1?mo(h.substr(1,h.length-1)):h},set:function(m){m=m.toString(),h=this instanceof oA==1?"/"+ds(m):m}});var u=null;Object.defineProperty(this,"_V",{enumerable:!1,configurable:!1,get:function(){if(u)return u},set:function(m){this.V=m}}),Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(u)return this instanceof oA==0?kd(u,this.objId,this.scope):u},set:function(m){m=m.toString(),u=this instanceof oA==0?m.substr(0,1)==="("?mo(m.substr(1,m.length-2)):mo(m):m}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof oA==1?mo(u.substr(1,u.length-1)):u},set:function(m){m=m.toString(),u=this instanceof oA==1?"/"+ds(m):m}}),Object.defineProperty(this,"hasAnnotation",{enumerable:!0,configurable:!0,get:function(){return this.Rect}}),Object.defineProperty(this,"Type",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Annot":null}}),Object.defineProperty(this,"Subtype",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Widget":null}});var g,p=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return p},set:function(m){m=!!m,p=m}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,get:function(){if(g)return g},set:function(m){g=m}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return!!Qr(this.Ff,1)},set:function(m){m?this.Ff=kr(this.Ff,1):this.Ff=Lr(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return!!Qr(this.Ff,2)},set:function(m){m?this.Ff=kr(this.Ff,2):this.Ff=Lr(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return!!Qr(this.Ff,3)},set:function(m){m?this.Ff=kr(this.Ff,3):this.Ff=Lr(this.Ff,3)}});var w=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(w!==null)return w},set:function(m){if([0,1,2].indexOf(m)===-1)throw new Error('Invalid value "'+m+'" for attribute Q supplied.');w=m}}),Object.defineProperty(this,"textAlign",{get:function(){var m;switch(w){case 0:default:m="left";break;case 1:m="center";break;case 2:m="right"}return m},configurable:!0,enumerable:!0,set:function(m){switch(m){case"right":case 2:w=2;break;case"center":case 1:w=1;break;default:w=0}}})};An(qn,pi);var wo=function(){qn.call(this),this.FT="/Ch",this.V="()",this.fontName="zapfdingbats";var t=0;Object.defineProperty(this,"TI",{enumerable:!0,configurable:!1,get:function(){return t},set:function(r){t=r}}),Object.defineProperty(this,"topIndex",{enumerable:!0,configurable:!0,get:function(){return t},set:function(r){t=r}});var e=[];Object.defineProperty(this,"Opt",{enumerable:!0,configurable:!1,get:function(){return ny(e,this.objId,this.scope)},set:function(r){var A,n;n=[],typeof(A=r)=="string"&&(n=(function(i,s,a){a||(a=1);for(var o,l=[];o=s.exec(i);)l.push(o[a]);return l})(A,/\((.*?)\)/g)),e=n}}),this.getOptions=function(){return e},this.setOptions=function(r){e=r,this.sort&&e.sort()},this.addOption=function(r){r=(r=r||"").toString(),e.push(r),this.sort&&e.sort()},this.removeOption=function(r,A){for(A=A||!1,r=(r=r||"").toString();e.indexOf(r)!==-1&&(e.splice(e.indexOf(r),1),A!==!1););},Object.defineProperty(this,"combo",{enumerable:!0,configurable:!0,get:function(){return!!Qr(this.Ff,18)},set:function(r){r?this.Ff=kr(this.Ff,18):this.Ff=Lr(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return!!Qr(this.Ff,19)},set:function(r){this.combo===!0&&(r?this.Ff=kr(this.Ff,19):this.Ff=Lr(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return!!Qr(this.Ff,20)},set:function(r){r?(this.Ff=kr(this.Ff,20),e.sort()):this.Ff=Lr(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return!!Qr(this.Ff,22)},set:function(r){r?this.Ff=kr(this.Ff,22):this.Ff=Lr(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!Qr(this.Ff,23)},set:function(r){r?this.Ff=kr(this.Ff,23):this.Ff=Lr(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return!!Qr(this.Ff,27)},set:function(r){r?this.Ff=kr(this.Ff,27):this.Ff=Lr(this.Ff,27)}}),this.hasAppearanceStream=!1};An(wo,qn);var yo=function(){wo.call(this),this.fontName="helvetica",this.combo=!1};An(yo,wo);var Bo=function(){yo.call(this),this.combo=!0};An(Bo,yo);var pu=function(){Bo.call(this),this.edit=!0};An(pu,Bo);var oA=function(){qn.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return!!Qr(this.Ff,15)},set:function(r){r?this.Ff=kr(this.Ff,15):this.Ff=Lr(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return!!Qr(this.Ff,16)},set:function(r){r?this.Ff=kr(this.Ff,16):this.Ff=Lr(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return!!Qr(this.Ff,17)},set:function(r){r?this.Ff=kr(this.Ff,17):this.Ff=Lr(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return!!Qr(this.Ff,26)},set:function(r){r?this.Ff=kr(this.Ff,26):this.Ff=Lr(this.Ff,26)}});var t,e={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var r=function(i){return i};if(this.scope&&(r=this.scope.internal.getEncryptor(this.objId)),Object.keys(e).length!==0){var A,n=[];for(A in n.push("<<"),e)n.push("/"+A+" ("+hs(r(e[A]))+")");return n.push(">>"),n.join(`
|
|
32
|
+
`)}},set:function(r){$t(r)==="object"&&(e=r)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return e.CA||""},set:function(r){typeof r=="string"&&(e.CA=r)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return t},set:function(r){var A=r==null?"":r.toString();A.substr(0,1)==="/"&&(A=A.substr(1)),t="/"+ds(A)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return t.substr(1,t.length-1)},set:function(r){t="/"+ds(r)}})};An(oA,qn);var gu=function(){oA.call(this),this.pushButton=!0};An(gu,oA);var bo=function(){oA.call(this),this.radio=!0,this.pushButton=!1;var t=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return t},set:function(e){t=e!==void 0?e:[]}})};An(bo,oA);var vu=function(){var t,e;qn.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return t},set:function(n){t=n}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return e},set:function(n){e=n}});var r,A={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var n=function(a){return a};this.scope&&(n=this.scope.internal.getEncryptor(this.objId));var i,s=[];for(i in s.push("<<"),A)s.push("/"+i+" ("+hs(n(A[i]))+")");return s.push(">>"),s.join(`
|
|
33
|
+
`)},set:function(n){$t(n)==="object"&&(A=n)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return A.CA||""},set:function(n){typeof n=="string"&&(A.CA=n)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return r},set:function(n){var i=n==null?"":n.toString();i.substr(0,1)==="/"&&(i=i.substr(1)),r="/"+ds(i)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return r.substr(1,r.length-1)},set:function(n){var i=n==null?"":n.toString();i.substr(0,1)==="/"&&(i=i.substr(1)),r="/"+ds(i)}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=it.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};An(vu,qn),bo.prototype.setAppearance=function(t){if(!("createAppearanceStream"in t)||!("getCA"in t))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var e in this.Kids)if(this.Kids.hasOwnProperty(e)){var r=this.Kids[e];r.appearanceStreamContent=t.createAppearanceStream(r.optionName),r.caption=t.getCA()}},bo.prototype.createOption=function(t){var e=new vu;return e.Parent=this,e.optionName=t,this.Kids.push(e),MQ.call(this.scope,e),e};var mu=function(){oA.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=it.CheckBox.createAppearanceStream()};An(mu,oA);var ps=function(){qn.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return!!Qr(this.Ff,13)},set:function(e){e?this.Ff=kr(this.Ff,13):this.Ff=Lr(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return!!Qr(this.Ff,21)},set:function(e){e?this.Ff=kr(this.Ff,21):this.Ff=Lr(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!Qr(this.Ff,23)},set:function(e){e?this.Ff=kr(this.Ff,23):this.Ff=Lr(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return!!Qr(this.Ff,24)},set:function(e){e?this.Ff=kr(this.Ff,24):this.Ff=Lr(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return!!Qr(this.Ff,25)},set:function(e){e?this.Ff=kr(this.Ff,25):this.Ff=Lr(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return!!Qr(this.Ff,26)},set:function(e){e?this.Ff=kr(this.Ff,26):this.Ff=Lr(this.Ff,26)}});var t=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return t},set:function(e){t=e}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return t},set:function(e){Number.isInteger(e)&&(t=e)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};An(ps,qn);var wu=function(){ps.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return!!Qr(this.Ff,14)},set:function(t){t?this.Ff=kr(this.Ff,14):this.Ff=Lr(this.Ff,14)}}),this.password=!0};An(wu,ps);var it={CheckBox:{createAppearanceStream:function(){return{N:{On:it.CheckBox.YesNormal},D:{On:it.CheckBox.YesPushDown,Off:it.CheckBox.OffPushDown}}},YesPushDown:function(t){var e=di(t);e.scope=t.scope;var r=[],A=t.scope.internal.getFont(t.fontName,t.fontStyle).id,n=t.scope.__private__.encodeColorString(t.color),i=Qd(t,t.caption);return r.push("0.749023 g"),r.push("0 0 "+Ut(it.internal.getWidth(t))+" "+Ut(it.internal.getHeight(t))+" re"),r.push("f"),r.push("BMC"),r.push("q"),r.push("0 0 1 rg"),r.push("/"+A+" "+Ut(i.fontSize)+" Tf "+n),r.push("BT"),r.push(i.text),r.push("ET"),r.push("Q"),r.push("EMC"),e.stream=r.join(`
|
|
34
|
+
`),e},YesNormal:function(t){var e=di(t);e.scope=t.scope;var r=t.scope.internal.getFont(t.fontName,t.fontStyle).id,A=t.scope.__private__.encodeColorString(t.color),n=[],i=it.internal.getHeight(t),s=it.internal.getWidth(t),a=Qd(t,t.caption);return n.push("1 g"),n.push("0 0 "+Ut(s)+" "+Ut(i)+" re"),n.push("f"),n.push("q"),n.push("0 0 1 rg"),n.push("0 0 "+Ut(s-1)+" "+Ut(i-1)+" re"),n.push("W"),n.push("n"),n.push("0 g"),n.push("BT"),n.push("/"+r+" "+Ut(a.fontSize)+" Tf "+A),n.push(a.text),n.push("ET"),n.push("Q"),e.stream=n.join(`
|
|
35
|
+
`),e},OffPushDown:function(t){var e=di(t);e.scope=t.scope;var r=[];return r.push("0.749023 g"),r.push("0 0 "+Ut(it.internal.getWidth(t))+" "+Ut(it.internal.getHeight(t))+" re"),r.push("f"),e.stream=r.join(`
|
|
36
|
+
`),e}},RadioButton:{Circle:{createAppearanceStream:function(t){var e={D:{Off:it.RadioButton.Circle.OffPushDown},N:{}};return e.N[t]=it.RadioButton.Circle.YesNormal,e.D[t]=it.RadioButton.Circle.YesPushDown,e},getCA:function(){return"l"},YesNormal:function(t){var e=di(t);e.scope=t.scope;var r=[],A=it.internal.getWidth(t)<=it.internal.getHeight(t)?it.internal.getWidth(t)/4:it.internal.getHeight(t)/4;A=Number((.9*A).toFixed(5));var n=it.internal.Bezier_C,i=Number((A*n).toFixed(5));return r.push("q"),r.push("1 0 0 1 "+ha(it.internal.getWidth(t)/2)+" "+ha(it.internal.getHeight(t)/2)+" cm"),r.push(A+" 0 m"),r.push(A+" "+i+" "+i+" "+A+" 0 "+A+" c"),r.push("-"+i+" "+A+" -"+A+" "+i+" -"+A+" 0 c"),r.push("-"+A+" -"+i+" -"+i+" -"+A+" 0 -"+A+" c"),r.push(i+" -"+A+" "+A+" -"+i+" "+A+" 0 c"),r.push("f"),r.push("Q"),e.stream=r.join(`
|
|
37
|
+
`),e},YesPushDown:function(t){var e=di(t);e.scope=t.scope;var r=[],A=it.internal.getWidth(t)<=it.internal.getHeight(t)?it.internal.getWidth(t)/4:it.internal.getHeight(t)/4;A=Number((.9*A).toFixed(5));var n=Number((2*A).toFixed(5)),i=Number((n*it.internal.Bezier_C).toFixed(5)),s=Number((A*it.internal.Bezier_C).toFixed(5));return r.push("0.749023 g"),r.push("q"),r.push("1 0 0 1 "+ha(it.internal.getWidth(t)/2)+" "+ha(it.internal.getHeight(t)/2)+" cm"),r.push(n+" 0 m"),r.push(n+" "+i+" "+i+" "+n+" 0 "+n+" c"),r.push("-"+i+" "+n+" -"+n+" "+i+" -"+n+" 0 c"),r.push("-"+n+" -"+i+" -"+i+" -"+n+" 0 -"+n+" c"),r.push(i+" -"+n+" "+n+" -"+i+" "+n+" 0 c"),r.push("f"),r.push("Q"),r.push("0 g"),r.push("q"),r.push("1 0 0 1 "+ha(it.internal.getWidth(t)/2)+" "+ha(it.internal.getHeight(t)/2)+" cm"),r.push(A+" 0 m"),r.push(A+" "+s+" "+s+" "+A+" 0 "+A+" c"),r.push("-"+s+" "+A+" -"+A+" "+s+" -"+A+" 0 c"),r.push("-"+A+" -"+s+" -"+s+" -"+A+" 0 -"+A+" c"),r.push(s+" -"+A+" "+A+" -"+s+" "+A+" 0 c"),r.push("f"),r.push("Q"),e.stream=r.join(`
|
|
38
|
+
`),e},OffPushDown:function(t){var e=di(t);e.scope=t.scope;var r=[],A=it.internal.getWidth(t)<=it.internal.getHeight(t)?it.internal.getWidth(t)/4:it.internal.getHeight(t)/4;A=Number((.9*A).toFixed(5));var n=Number((2*A).toFixed(5)),i=Number((n*it.internal.Bezier_C).toFixed(5));return r.push("0.749023 g"),r.push("q"),r.push("1 0 0 1 "+ha(it.internal.getWidth(t)/2)+" "+ha(it.internal.getHeight(t)/2)+" cm"),r.push(n+" 0 m"),r.push(n+" "+i+" "+i+" "+n+" 0 "+n+" c"),r.push("-"+i+" "+n+" -"+n+" "+i+" -"+n+" 0 c"),r.push("-"+n+" -"+i+" -"+i+" -"+n+" 0 -"+n+" c"),r.push(i+" -"+n+" "+n+" -"+i+" "+n+" 0 c"),r.push("f"),r.push("Q"),e.stream=r.join(`
|
|
39
|
+
`),e}},Cross:{createAppearanceStream:function(t){var e={D:{Off:it.RadioButton.Cross.OffPushDown},N:{}};return e.N[t]=it.RadioButton.Cross.YesNormal,e.D[t]=it.RadioButton.Cross.YesPushDown,e},getCA:function(){return"8"},YesNormal:function(t){var e=di(t);e.scope=t.scope;var r=[],A=it.internal.calculateCross(t);return r.push("q"),r.push("1 1 "+Ut(it.internal.getWidth(t)-2)+" "+Ut(it.internal.getHeight(t)-2)+" re"),r.push("W"),r.push("n"),r.push(Ut(A.x1.x)+" "+Ut(A.x1.y)+" m"),r.push(Ut(A.x2.x)+" "+Ut(A.x2.y)+" l"),r.push(Ut(A.x4.x)+" "+Ut(A.x4.y)+" m"),r.push(Ut(A.x3.x)+" "+Ut(A.x3.y)+" l"),r.push("s"),r.push("Q"),e.stream=r.join(`
|
|
40
|
+
`),e},YesPushDown:function(t){var e=di(t);e.scope=t.scope;var r=it.internal.calculateCross(t),A=[];return A.push("0.749023 g"),A.push("0 0 "+Ut(it.internal.getWidth(t))+" "+Ut(it.internal.getHeight(t))+" re"),A.push("f"),A.push("q"),A.push("1 1 "+Ut(it.internal.getWidth(t)-2)+" "+Ut(it.internal.getHeight(t)-2)+" re"),A.push("W"),A.push("n"),A.push(Ut(r.x1.x)+" "+Ut(r.x1.y)+" m"),A.push(Ut(r.x2.x)+" "+Ut(r.x2.y)+" l"),A.push(Ut(r.x4.x)+" "+Ut(r.x4.y)+" m"),A.push(Ut(r.x3.x)+" "+Ut(r.x3.y)+" l"),A.push("s"),A.push("Q"),e.stream=A.join(`
|
|
41
|
+
`),e},OffPushDown:function(t){var e=di(t);e.scope=t.scope;var r=[];return r.push("0.749023 g"),r.push("0 0 "+Ut(it.internal.getWidth(t))+" "+Ut(it.internal.getHeight(t))+" re"),r.push("f"),e.stream=r.join(`
|
|
42
|
+
`),e}}},createDefaultAppearanceStream:function(t){var e=t.scope.internal.getFont(t.fontName,t.fontStyle).id,r=t.scope.__private__.encodeColorString(t.color);return"/"+e+" "+t.fontSize+" Tf "+r}};it.internal={Bezier_C:.551915024494,calculateCross:function(t){var e=it.internal.getWidth(t),r=it.internal.getHeight(t),A=Math.min(e,r);return{x1:{x:(e-A)/2,y:(r-A)/2+A},x2:{x:(e-A)/2+A,y:(r-A)/2},x3:{x:(e-A)/2,y:(r-A)/2},x4:{x:(e-A)/2+A,y:(r-A)/2+A}}}},it.internal.getWidth=function(t){var e=0;return $t(t)==="object"&&(e=Ay(t.Rect[2])),e},it.internal.getHeight=function(t){var e=0;return $t(t)==="object"&&(e=Ay(t.Rect[3])),e};var MQ=xr.addField=function(t){if(PQ(this,t),!(t instanceof qn))throw new Error("Invalid argument passed to jsPDF.addField.");var e;return(e=t).scope.internal.acroformPlugin.printedOut&&(e.scope.internal.acroformPlugin.printedOut=!1,e.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),e.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(e),t.page=t.scope.internal.getCurrentPageInfo().pageNumber,this};xr.AcroFormChoiceField=wo,xr.AcroFormListBox=yo,xr.AcroFormComboBox=Bo,xr.AcroFormEditBox=pu,xr.AcroFormButton=oA,xr.AcroFormPushButton=gu,xr.AcroFormRadioButton=bo,xr.AcroFormCheckBox=mu,xr.AcroFormTextField=ps,xr.AcroFormPasswordField=wu,xr.AcroFormAppearance=it,xr.AcroForm={ChoiceField:wo,ListBox:yo,ComboBox:Bo,EditBox:pu,Button:oA,PushButton:gu,RadioButton:bo,CheckBox:mu,TextField:ps,PasswordField:wu,Appearance:it},dt.AcroForm={ChoiceField:wo,ListBox:yo,ComboBox:Bo,EditBox:pu,Button:oA,PushButton:gu,RadioButton:bo,CheckBox:mu,TextField:ps,PasswordField:wu,Appearance:it},dt.AcroForm;function sy(t){return t.reduce(function(e,r,A){return e[r]=A,e},{})}(function(t){var e="addImage_";t.__addimage__={};var r="UNKNOWN",A={PNG:[[137,80,78,71]],TIFF:[[77,77,0,42],[73,73,42,0]],JPEG:[[255,216,255,224,void 0,void 0,74,70,73,70,0],[255,216,255,225,void 0,void 0,69,120,105,102,0,0],[255,216,255,219],[255,216,255,238]],JPEG2000:[[0,0,0,12,106,80,32,32]],GIF87a:[[71,73,70,56,55,97]],GIF89a:[[71,73,70,56,57,97]],WEBP:[[82,73,70,70,void 0,void 0,void 0,void 0,87,69,66,80]],BMP:[[66,77],[66,65],[67,73],[67,80],[73,67],[80,84]]},n=t.__addimage__.getImageFileTypeByImageData=function(L,F){var M,b,Y,ce,ee,le=r;if((F=F||r)==="RGBA"||L.data!==void 0&&L.data instanceof Uint8ClampedArray&&"height"in L&&"width"in L)return"RGBA";if(H(L))for(ee in A)for(Y=A[ee],M=0;M<Y.length;M+=1){for(ce=!0,b=0;b<Y[M].length;b+=1)if(Y[M][b]!==void 0&&Y[M][b]!==L[b]){ce=!1;break}if(ce===!0){le=ee;break}}else for(ee in A)for(Y=A[ee],M=0;M<Y.length;M+=1){for(ce=!0,b=0;b<Y[M].length;b+=1)if(Y[M][b]!==void 0&&Y[M][b]!==L.charCodeAt(b)){ce=!1;break}if(ce===!0){le=ee;break}}return le===r&&F!==r&&(le=F),le},i=function L(F){for(var M=this.internal.write,b=this.internal.putStream,Y=(0,this.internal.getFilters)();Y.indexOf("FlateEncode")!==-1;)Y.splice(Y.indexOf("FlateEncode"),1);F.objectId=this.internal.newObject();var ce=[];if(ce.push({key:"Type",value:"/XObject"}),ce.push({key:"Subtype",value:"/Image"}),ce.push({key:"Width",value:F.width}),ce.push({key:"Height",value:F.height}),F.colorSpace===m.INDEXED?ce.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(F.palette.length/3-1)+" "+("sMask"in F&&F.sMask!==void 0?F.objectId+2:F.objectId+1)+" 0 R]"}):(ce.push({key:"ColorSpace",value:"/"+F.colorSpace}),F.colorSpace===m.DEVICE_CMYK&&ce.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),ce.push({key:"BitsPerComponent",value:F.bitsPerComponent}),"decodeParameters"in F&&F.decodeParameters!==void 0&&ce.push({key:"DecodeParms",value:"<<"+F.decodeParameters+">>"}),"transparency"in F&&Array.isArray(F.transparency)&&F.transparency.length>0){for(var ee="",le=0,Ae=F.transparency.length;le<Ae;le++)ee+=F.transparency[le]+" "+F.transparency[le]+" ";ce.push({key:"Mask",value:"["+ee+"]"})}F.sMask!==void 0&&ce.push({key:"SMask",value:F.objectId+1+" 0 R"});var te=F.filter!==void 0?["/"+F.filter]:void 0;if(b({data:F.data,additionalKeyValues:ce,alreadyAppliedFilters:te,objectId:F.objectId}),M("endobj"),"sMask"in F&&F.sMask!==void 0){var T,S=(T=F.sMaskBitsPerComponent)!==null&&T!==void 0?T:F.bitsPerComponent,O={width:F.width,height:F.height,colorSpace:"DeviceGray",bitsPerComponent:S,data:F.sMask};"filter"in F&&(O.decodeParameters="/Predictor ".concat(F.predictor," /Colors 1 /BitsPerComponent ").concat(S," /Columns ").concat(F.width),O.filter=F.filter),L.call(this,O)}if(F.colorSpace===m.INDEXED){var P=this.internal.newObject();b({data:R(new Uint8Array(F.palette)),objectId:P}),M("endobj")}},s=function(){var L=this.internal.collections[e+"images"];for(var F in L)i.call(this,L[F])},a=function(){var L,F=this.internal.collections[e+"images"],M=this.internal.write;for(var b in F)M("/I"+(L=F[b]).index,L.objectId,"0","R")},o=function(){this.internal.collections[e+"images"]||(this.internal.collections[e+"images"]={},this.internal.events.subscribe("putResources",s),this.internal.events.subscribe("putXobjectDict",a))},l=function(){var L=this.internal.collections[e+"images"];return o.call(this),L},c=function(){return Object.keys(this.internal.collections[e+"images"]).length},f=function(L){return typeof t["process"+L.toUpperCase()]=="function"},h=function(L){return $t(L)==="object"&&L.nodeType===1},u=function(L,F){if(L.nodeName==="IMG"&&L.hasAttribute("src")){var M=""+L.getAttribute("src");if(M.indexOf("data:image/")===0)return uu(unescape(M).split("base64,").pop());var b=t.loadFile(M,!0);if(b!==void 0)return b}if(L.nodeName==="CANVAS"){if(L.width===0||L.height===0)throw new Error("Given canvas must have data. Canvas width: "+L.width+", height: "+L.height);var Y;switch(F){case"PNG":Y="image/png";break;case"WEBP":Y="image/webp";break;default:Y="image/jpeg"}return uu(L.toDataURL(Y,1).split("base64,").pop())}},g=function(L){var F=this.internal.collections[e+"images"];if(F){for(var M in F)if(L===F[M].alias)return F[M]}},p=function(L,F,M){return L||F||(L=-96,F=-96),L<0&&(L=-1*M.width*72/L/this.internal.scaleFactor),F<0&&(F=-1*M.height*72/F/this.internal.scaleFactor),L===0&&(L=F*M.width/M.height),F===0&&(F=L*M.height/M.width),[L,F]},w=function(L,F,M,b,Y,ce){var ee=p.call(this,M,b,Y),le=this.internal.getCoordinateString,Ae=this.internal.getVerticalCoordinateString,te=l.call(this);if(M=ee[0],b=ee[1],te[Y.index]=Y,ce){ce*=Math.PI/180;var T=Math.cos(ce),S=Math.sin(ce),O=function(z){return z.toFixed(4)},P=[O(T),O(S),O(-1*S),O(T),0,0,"cm"]}this.internal.write("q"),ce?(this.internal.write([1,"0","0",1,le(L),Ae(F+b),"cm"].join(" ")),this.internal.write(P.join(" ")),this.internal.write([le(M),"0","0",le(b),"0","0","cm"].join(" "))):this.internal.write([le(M),"0","0",le(b),le(L),Ae(F+b),"cm"].join(" ")),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,"cm"].join(" ")),this.internal.write("/I"+Y.index+" Do"),this.internal.write("Q")},m=t.color_spaces={DEVICE_RGB:"DeviceRGB",DEVICE_GRAY:"DeviceGray",DEVICE_CMYK:"DeviceCMYK",CAL_GREY:"CalGray",CAL_RGB:"CalRGB",LAB:"Lab",ICC_BASED:"ICCBased",INDEXED:"Indexed",PATTERN:"Pattern",SEPARATION:"Separation",DEVICE_N:"DeviceN"};t.decode={DCT_DECODE:"DCTDecode",FLATE_DECODE:"FlateDecode",LZW_DECODE:"LZWDecode",JPX_DECODE:"JPXDecode",JBIG2_DECODE:"JBIG2Decode",ASCII85_DECODE:"ASCII85Decode",ASCII_HEX_DECODE:"ASCIIHexDecode",RUN_LENGTH_DECODE:"RunLengthDecode",CCITT_FAX_DECODE:"CCITTFaxDecode"};var B=t.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},x=t.__addimage__.sHashCode=function(L){var F,M,b=0;if(typeof L=="string")for(M=L.length,F=0;F<M;F++)b=(b<<5)-b+L.charCodeAt(F),b|=0;else if(H(L))for(M=L.byteLength/2,F=0;F<M;F++)b=(b<<5)-b+L[F],b|=0;return b},E=t.__addimage__.validateStringAsBase64=function(L){(L=L||"").toString().trim();var F=!0;return L.length===0&&(F=!1),L.length%4!=0&&(F=!1),/^[A-Za-z0-9+/]+$/.test(L.substr(0,L.length-2))===!1&&(F=!1),/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(L.substr(-2))===!1&&(F=!1),F},k=t.__addimage__.extractImageFromDataUrl=function(L){if(L==null||!(L=L.trim()).startsWith("data:"))return null;var F=L.indexOf(",");return F<0?null:L.substring(0,F).trim().endsWith("base64")?L.substring(F+1):null};t.__addimage__.isArrayBuffer=function(L){return L instanceof ArrayBuffer};var H=t.__addimage__.isArrayBufferView=function(L){return L instanceof Int8Array||L instanceof Uint8Array||L instanceof Uint8ClampedArray||L instanceof Int16Array||L instanceof Uint16Array||L instanceof Int32Array||L instanceof Uint32Array||L instanceof Float32Array||L instanceof Float64Array},K=t.__addimage__.binaryStringToUint8Array=function(L){for(var F=L.length,M=new Uint8Array(F),b=0;b<F;b++)M[b]=L.charCodeAt(b);return M},R=t.__addimage__.arrayBufferToBinaryString=function(L){for(var F="",M=H(L)?L:new Uint8Array(L),b=0;b<M.length;b+=8192)F+=String.fromCharCode.apply(null,M.subarray(b,b+8192));return F};t.addImage=function(){var L,F,M,b,Y,ce,ee,le,Ae;if(typeof arguments[1]=="number"?(F=r,M=arguments[1],b=arguments[2],Y=arguments[3],ce=arguments[4],ee=arguments[5],le=arguments[6],Ae=arguments[7]):(F=arguments[1],M=arguments[2],b=arguments[3],Y=arguments[4],ce=arguments[5],ee=arguments[6],le=arguments[7],Ae=arguments[8]),$t(L=arguments[0])==="object"&&!h(L)&&"imageData"in L){var te=L;L=te.imageData,F=te.format||F||r,M=te.x||M||0,b=te.y||b||0,Y=te.w||te.width||Y,ce=te.h||te.height||ce,ee=te.alias||ee,le=te.compression||le,Ae=te.rotation||te.angle||Ae}var T=this.internal.getFilters();if(le===void 0&&T.indexOf("FlateEncode")!==-1&&(le="SLOW"),isNaN(M)||isNaN(b))throw new Error("Invalid coordinates passed to jsPDF.addImage");o.call(this);var S=I.call(this,L,F,ee,le);return w.call(this,M,b,Y,ce,S,Ae),this};var I=function(L,F,M,b){var Y,ce,ee;if(typeof L=="string"&&n(L)===r){L=unescape(L);var le=W(L,!1);(le!==""||(le=t.loadFile(L,!0))!==void 0)&&(L=le)}if(h(L)&&(L=u(L,F)),F=n(L,F),!f(F))throw new Error("addImage does not support files of type '"+F+"', please ensure that a plugin for '"+F+"' support is added.");if(((ee=M)==null||ee.length===0)&&(M=(function(Ae){return typeof Ae=="string"||H(Ae)?x(Ae):H(Ae.data)?x(Ae.data):null})(L)),(Y=g.call(this,M))||(L instanceof Uint8Array||F==="RGBA"||(ce=L,L=K(L)),Y=this["process"+F.toUpperCase()](L,c.call(this),M,(function(Ae){return Ae&&typeof Ae=="string"&&(Ae=Ae.toUpperCase()),Ae in t.image_compression?Ae:B.NONE})(b),ce)),!Y)throw new Error("An unknown error occurred whilst processing the image.");return Y},W=t.__addimage__.convertBase64ToBinaryString=function(L,F){F=typeof F!="boolean"||F;var M,b="";if(typeof L=="string"){var Y;M=(Y=k(L))!==null&&Y!==void 0?Y:L;try{b=uu(M)}catch(ce){if(F)throw E(M)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+ce.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return b};t.getImageProperties=function(L){var F,M,b="";if(h(L)&&(L=u(L)),typeof L=="string"&&n(L)===r&&((b=W(L,!1))===""&&(b=t.loadFile(L)||""),L=b),M=n(L),!f(M))throw new Error("addImage does not support files of type '"+M+"', please ensure that a plugin for '"+M+"' support is added.");if(L instanceof Uint8Array||(L=K(L)),!(F=this["process"+M.toUpperCase()](L)))throw new Error("An unknown error occurred whilst processing the image");return F.fileType=M,F}})(dt.API),(function(t){var e=function(r){if(r!==void 0&&r!="")return!0};dt.API.events.push(["addPage",function(r){this.internal.getPageInfo(r.pageNumber).pageContext.annotations=[]}]),t.events.push(["putPage",function(r){for(var A,n,i,s=this.internal.getCoordinateString,a=this.internal.getVerticalCoordinateString,o=this.internal.getPageInfoByObjId(r.objId),l=r.pageContext.annotations,c=!1,f=0;f<l.length&&!c;f++)switch((A=l[f]).type){case"link":(e(A.options.url)||e(A.options.pageNumber))&&(c=!0);break;case"reference":case"text":case"freetext":c=!0}if(c!=0){this.internal.write("/Annots [");for(var h=0;h<l.length;h++){A=l[h];var u=this.internal.pdfEscape,g=this.internal.getEncryptor(r.objId);switch(A.type){case"reference":this.internal.write(" "+A.object.objId+" 0 R ");break;case"text":var p=this.internal.newAdditionalObject(),w=this.internal.newAdditionalObject(),m=this.internal.getEncryptor(p.objId),B=A.title||"Note";i="<</Type /Annot /Subtype /Text "+(n="/Rect ["+s(A.bounds.x)+" "+a(A.bounds.y+A.bounds.h)+" "+s(A.bounds.x+A.bounds.w)+" "+a(A.bounds.y)+"] ")+"/Contents ("+u(m(A.contents))+")",i+=" /Popup "+w.objId+" 0 R",i+=" /P "+o.objId+" 0 R",i+=" /T ("+u(m(B))+") >>",p.content=i;var x=p.objId+" 0 R";i="<</Type /Annot /Subtype /Popup "+(n="/Rect ["+s(A.bounds.x+30)+" "+a(A.bounds.y+A.bounds.h)+" "+s(A.bounds.x+A.bounds.w+30)+" "+a(A.bounds.y)+"] ")+" /Parent "+x,A.open&&(i+=" /Open true"),i+=" >>",w.content=i,this.internal.write(p.objId,"0 R",w.objId,"0 R");break;case"freetext":n="/Rect ["+s(A.bounds.x)+" "+a(A.bounds.y)+" "+s(A.bounds.x+A.bounds.w)+" "+a(A.bounds.y+A.bounds.h)+"] ";var E="font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+(A.color||"#000000");i="<</Type /Annot /Subtype /FreeText "+n+"/Contents ("+u(g(A.contents))+")",i+=" /DS("+u(g(E))+")",i+=" /Border [0 0 0]",i+=" >>",this.internal.write(i);break;case"link":if(A.options.name){var k=this.annotations._nameMap[A.options.name];A.options.pageNumber=k.page,A.options.top=k.y}else A.options.top||(A.options.top=0);if(n="/Rect ["+A.finalBounds.x+" "+A.finalBounds.y+" "+A.finalBounds.w+" "+A.finalBounds.h+"] ",i="",A.options.url)i="<</Type /Annot /Subtype /Link "+n+"/Border [0 0 0] /A <</S /URI /URI ("+u(g(A.options.url))+") >>";else if(A.options.pageNumber)switch(i="<</Type /Annot /Subtype /Link "+n+"/Border [0 0 0] /Dest ["+this.internal.getPageInfo(A.options.pageNumber).objId+" 0 R",A.options.magFactor=A.options.magFactor||"XYZ",A.options.magFactor){case"Fit":i+=" /Fit]";break;case"FitH":i+=" /FitH "+A.options.top+"]";break;case"FitV":A.options.left=A.options.left||0,i+=" /FitV "+A.options.left+"]";break;default:var H=a(A.options.top);A.options.left=A.options.left||0,A.options.zoom===void 0&&(A.options.zoom=0),i+=" /XYZ "+A.options.left+" "+H+" "+A.options.zoom+"]"}i!=""&&(i+=" >>",this.internal.write(i))}}this.internal.write("]")}}]),t.createAnnotation=function(r){var A=this.internal.getCurrentPageInfo();switch(r.type){case"link":this.link(r.bounds.x,r.bounds.y,r.bounds.w,r.bounds.h,r);break;case"text":case"freetext":A.pageContext.annotations.push(r)}},t.link=function(r,A,n,i,s){var a=this.internal.getCurrentPageInfo(),o=this.internal.getCoordinateString,l=this.internal.getVerticalCoordinateString;a.pageContext.annotations.push({finalBounds:{x:o(r),y:l(A),w:o(r+n),h:l(A+i)},options:s,type:"link"})},t.textWithLink=function(r,A,n,i){var s,a,o=this.getTextWidth(r),l=this.internal.getLineHeight()/this.internal.scaleFactor;if(i.maxWidth!==void 0){a=i.maxWidth;var c=this.splitTextToSize(r,a).length;s=Math.ceil(l*c)}else a=o,s=l;return this.text(r,A,n,i),n+=.2*l,i.align==="center"&&(A-=o/2),i.align==="right"&&(A-=o),this.link(A,n-l,a,s,i),o},t.getTextWidth=function(r){var A=this.internal.getFontSize();return this.getStringUnitWidth(r)*A/this.internal.scaleFactor}})(dt.API),(function(t){var e={1569:[65152],1570:[65153,65154],1571:[65155,65156],1572:[65157,65158],1573:[65159,65160],1574:[65161,65162,65163,65164],1575:[65165,65166],1576:[65167,65168,65169,65170],1577:[65171,65172],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194],1584:[65195,65196],1585:[65197,65198],1586:[65199,65200],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1649:[64336,64337],1655:[64477],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393],1676:[64388,64389],1677:[64386,64387],1678:[64390,64391],1681:[64396,64397],1688:[64394,64395],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421],1729:[64422,64423,64424,64425],1733:[64480,64481],1734:[64473,64474],1735:[64471,64472],1736:[64475,64476],1737:[64482,64483],1739:[64478,64479],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431],1747:[64432,64433]},r={65247:{65154:65269,65156:65271,65160:65273,65166:65275},65248:{65154:65270,65156:65272,65160:65274,65166:65276},65165:{65247:{65248:{65258:65010}}},1617:{1612:64606,1613:64607,1614:64608,1615:64609,1616:64610}},A={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},n=[1570,1571,1573,1575];t.__arabicParser__={};var i=t.__arabicParser__.isInArabicSubstitutionA=function(p){return e[p.charCodeAt(0)]!==void 0},s=t.__arabicParser__.isArabicLetter=function(p){return typeof p=="string"&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(p)},a=t.__arabicParser__.isArabicEndLetter=function(p){return s(p)&&i(p)&&e[p.charCodeAt(0)].length<=2},o=t.__arabicParser__.isArabicAlfLetter=function(p){return s(p)&&n.indexOf(p.charCodeAt(0))>=0};t.__arabicParser__.arabicLetterHasIsolatedForm=function(p){return s(p)&&i(p)&&e[p.charCodeAt(0)].length>=1};var l=t.__arabicParser__.arabicLetterHasFinalForm=function(p){return s(p)&&i(p)&&e[p.charCodeAt(0)].length>=2};t.__arabicParser__.arabicLetterHasInitialForm=function(p){return s(p)&&i(p)&&e[p.charCodeAt(0)].length>=3};var c=t.__arabicParser__.arabicLetterHasMedialForm=function(p){return s(p)&&i(p)&&e[p.charCodeAt(0)].length==4},f=t.__arabicParser__.resolveLigatures=function(p){var w=0,m=r,B="",x=0;for(w=0;w<p.length;w+=1)m[p.charCodeAt(w)]!==void 0?(x++,typeof(m=m[p.charCodeAt(w)])=="number"&&(B+=String.fromCharCode(m),m=r,x=0),w===p.length-1&&(m=r,B+=p.charAt(w-(x-1)),w-=x-1,x=0)):(m=r,B+=p.charAt(w-x),w-=x,x=0);return B};t.__arabicParser__.isArabicDiacritic=function(p){return p!==void 0&&A[p.charCodeAt(0)]!==void 0};var h=t.__arabicParser__.getCorrectForm=function(p,w,m){return s(p)?i(p)===!1?-1:!l(p)||!s(w)&&!s(m)||!s(m)&&a(w)||a(p)&&!s(w)||a(p)&&o(w)||a(p)&&a(w)?0:c(p)&&s(w)&&!a(w)&&s(m)&&l(m)?3:a(p)||!s(m)?1:2:-1},u=function(p){var w=0,m=0,B=0,x="",E="",k="",H=(p=p||"").split("\\s+"),K=[];for(w=0;w<H.length;w+=1){for(K.push(""),m=0;m<H[w].length;m+=1)x=H[w][m],E=H[w][m-1],k=H[w][m+1],s(x)?(B=h(x,E,k),K[w]+=B!==-1?String.fromCharCode(e[x.charCodeAt(0)][B]):x):K[w]+=x;K[w]=f(K[w])}return K.join(" ")},g=t.__arabicParser__.processArabic=t.processArabic=function(){var p,w=typeof arguments[0]=="string"?arguments[0]:arguments[0].text,m=[];if(Array.isArray(w)){var B=0;for(m=[],B=0;B<w.length;B+=1)Array.isArray(w[B])?m.push([u(w[B][0]),w[B][1],w[B][2]]):m.push([u(w[B])]);p=m}else p=u(w);return typeof arguments[0]=="string"?p:(arguments[0].text=p,arguments[0])};t.events.push(["preProcessText",g])})(dt.API),dt.API.autoPrint=function(t){var e;return(t=t||{}).variant=t.variant||"non-conform",t.variant==="javascript"?this.addJS("print({});"):(this.internal.events.subscribe("postPutResources",function(){e=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /Named"),this.internal.out("/Type /Action"),this.internal.out("/N /Print"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){this.internal.out("/OpenAction "+e+" 0 R")})),this},(function(t){var e=function(){var r=void 0;Object.defineProperty(this,"pdf",{get:function(){return r},set:function(a){r=a}});var A=150;Object.defineProperty(this,"width",{get:function(){return A},set:function(a){A=isNaN(a)||Number.isInteger(a)===!1||a<0?150:a,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=A+1)}});var n=300;Object.defineProperty(this,"height",{get:function(){return n},set:function(a){n=isNaN(a)||Number.isInteger(a)===!1||a<0?300:a,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=n+1)}});var i=[];Object.defineProperty(this,"childNodes",{get:function(){return i},set:function(a){i=a}});var s={};Object.defineProperty(this,"style",{get:function(){return s},set:function(a){s=a}}),Object.defineProperty(this,"parentNode",{})};e.prototype.getContext=function(r,A){var n;if((r=r||"2d")!=="2d")return null;for(n in A)this.pdf.context2d.hasOwnProperty(n)&&(this.pdf.context2d[n]=A[n]);return this.pdf.context2d._canvas=this,this.pdf.context2d},e.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},t.events.push(["initialized",function(){this.canvas=new e,this.canvas.pdf=this}])})(dt.API),(function(t){var e={left:0,top:0,bottom:0,right:0},r=!1,A=function(){this.internal.__cell__===void 0&&(this.internal.__cell__={},this.internal.__cell__.padding=3,this.internal.__cell__.headerFunction=void 0,this.internal.__cell__.margins=Object.assign({},e),this.internal.__cell__.margins.width=this.getPageWidth(),n.call(this))},n=function(){this.internal.__cell__.lastCell=new i,this.internal.__cell__.pages=1},i=function(){var o=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return o},set:function(p){o=p}});var l=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return l},set:function(p){l=p}});var c=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return c},set:function(p){c=p}});var f=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return f},set:function(p){f=p}});var h=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return h},set:function(p){h=p}});var u=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return u},set:function(p){u=p}});var g=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return g},set:function(p){g=p}}),this};i.prototype.clone=function(){return new i(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},i.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},t.setHeaderFunction=function(o){return A.call(this),this.internal.__cell__.headerFunction=typeof o=="function"?o:void 0,this},t.getTextDimensions=function(o,l){A.call(this);var c=(l=l||{}).fontSize||this.getFontSize(),f=l.font||this.getFont(),h=l.scaleFactor||this.internal.scaleFactor,u=0,g=0,p=0,w=this;if(!Array.isArray(o)&&typeof o!="string"){if(typeof o!="number")throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");o=String(o)}var m=l.maxWidth;m>0?typeof o=="string"?o=this.splitTextToSize(o,m):Object.prototype.toString.call(o)==="[object Array]"&&(o=o.reduce(function(x,E){return x.concat(w.splitTextToSize(E,m))},[])):o=Array.isArray(o)?o:[o];for(var B=0;B<o.length;B++)u<(p=this.getStringUnitWidth(o[B],{font:f})*c)&&(u=p);return u!==0&&(g=o.length),{w:u/=h,h:Math.max((g*c*this.getLineHeightFactor()-c*(this.getLineHeightFactor()-1))/h,0)}},t.cellAddPage=function(){A.call(this),this.addPage();var o=this.internal.__cell__.margins||e;return this.internal.__cell__.lastCell=new i(o.left,o.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var s=t.cell=function(){var o;o=arguments[0]instanceof i?arguments[0]:new i(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6]),A.call(this);var l=this.internal.__cell__.lastCell,c=this.internal.__cell__.padding,f=this.internal.__cell__.margins||e,h=this.internal.__cell__.tableHeaderRow,u=this.internal.__cell__.printHeaders;return l.lineNumber!==void 0&&(l.lineNumber===o.lineNumber?(o.x=(l.x||0)+(l.width||0),o.y=l.y||0):l.y+l.height+o.height+f.bottom>this.getPageHeight()?(this.cellAddPage(),o.y=f.top,u&&h&&(this.printHeaderRow(o.lineNumber,!0),o.y+=h[0].height)):o.y=l.y+l.height||o.y),o.text[0]!==void 0&&(this.rect(o.x,o.y,o.width,o.height,r===!0?"FD":void 0),o.align==="right"?this.text(o.text,o.x+o.width-c,o.y+c,{align:"right",baseline:"top"}):o.align==="center"?this.text(o.text,o.x+o.width/2,o.y+c,{align:"center",baseline:"top",maxWidth:o.width-c-c}):this.text(o.text,o.x+c,o.y+c,{align:"left",baseline:"top",maxWidth:o.width-c-c})),this.internal.__cell__.lastCell=o,this};t.table=function(o,l,c,f,h){if(A.call(this),!c)throw new Error("No data for PDF table.");var u,g,p,w,m=[],B=[],x=[],E={},k={},H=[],K=[],R=(h=h||{}).autoSize||!1,I=h.printHeaders!==!1,W=h.css&&h.css["font-size"]!==void 0?16*h.css["font-size"]:h.fontSize||12,L=h.margins||Object.assign({width:this.getPageWidth()},e),F=typeof h.padding=="number"?h.padding:3,M=h.headerBackgroundColor||"#c8c8c8",b=h.headerTextColor||"#000";if(n.call(this),this.internal.__cell__.printHeaders=I,this.internal.__cell__.margins=L,this.internal.__cell__.table_font_size=W,this.internal.__cell__.padding=F,this.internal.__cell__.headerBackgroundColor=M,this.internal.__cell__.headerTextColor=b,this.setFontSize(W),f==null)B=m=Object.keys(c[0]),x=m.map(function(){return"left"});else if(Array.isArray(f)&&$t(f[0])==="object")for(m=f.map(function(te){return te.name}),B=f.map(function(te){return te.prompt||te.name||""}),x=f.map(function(te){return te.align||"left"}),u=0;u<f.length;u+=1)k[f[u].name]=.7499990551181103*f[u].width;else Array.isArray(f)&&typeof f[0]=="string"&&(B=m=f,x=m.map(function(){return"left"}));if(R||Array.isArray(f)&&typeof f[0]=="string")for(u=0;u<m.length;u+=1){for(E[w=m[u]]=c.map(function(te){return te[w]}),this.setFont(void 0,"bold"),H.push(this.getTextDimensions(B[u],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),g=E[w],this.setFont(void 0,"normal"),p=0;p<g.length;p+=1)H.push(this.getTextDimensions(g[p],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);k[w]=Math.max.apply(null,H)+F+F,H=[]}if(I){var Y={};for(u=0;u<m.length;u+=1)Y[m[u]]={},Y[m[u]].text=B[u],Y[m[u]].align=x[u];var ce=a.call(this,Y,k);K=m.map(function(te){return new i(o,l,k[te],ce,Y[te].text,void 0,Y[te].align)}),this.setTableHeaderRow(K),this.printHeaderRow(1,!1)}var ee=f.reduce(function(te,T){return te[T.name]=T.align,te},{});for(u=0;u<c.length;u+=1){"rowStart"in h&&h.rowStart instanceof Function&&h.rowStart({row:u,data:c[u]},this);var le=a.call(this,c[u],k);for(p=0;p<m.length;p+=1){var Ae=c[u][m[p]];"cellStart"in h&&h.cellStart instanceof Function&&h.cellStart({row:u,col:p,data:Ae},this),s.call(this,new i(o,l,k[m[p]],le,Ae,u+2,ee[m[p]]))}}return this.internal.__cell__.table_x=o,this.internal.__cell__.table_y=l,this};var a=function(o,l){var c=this.internal.__cell__.padding,f=this.internal.__cell__.table_font_size,h=this.internal.scaleFactor;return Object.keys(o).map(function(u){var g=o[u];return this.splitTextToSize(g.hasOwnProperty("text")?g.text:g,l[u]-c-c)},this).map(function(u){return this.getLineHeightFactor()*u.length*f/h+c+c},this).reduce(function(u,g){return Math.max(u,g)},0)};t.setTableHeaderRow=function(o){A.call(this),this.internal.__cell__.tableHeaderRow=o},t.printHeaderRow=function(o,l){if(A.call(this),!this.internal.__cell__.tableHeaderRow)throw new Error("Property tableHeaderRow does not exist.");var c;if(r=!0,typeof this.internal.__cell__.headerFunction=="function"){var f=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new i(f[0],f[1],f[2],f[3],void 0,-1)}this.setFont(void 0,"bold");for(var h=[],u=0;u<this.internal.__cell__.tableHeaderRow.length;u+=1){c=this.internal.__cell__.tableHeaderRow[u].clone(),l&&(c.y=this.internal.__cell__.margins.top||0,h.push(c)),c.lineNumber=o;var g=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),s.call(this,c),this.setTextColor(g)}h.length>0&&this.setTableHeaderRow(h),this.setFont(void 0,"normal"),r=!1}})(dt.API);var oy={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},ly=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],Ld=sy(ly),cy=[100,200,300,400,500,600,700,800,900],DQ=sy(cy);function Td(t){var e=t.family.replace(/"|'/g,"").toLowerCase(),r=(function(i){return oy[i=i||"normal"]?i:"normal"})(t.style),A=(function(i){return i?typeof i=="number"?i>=100&&i<=900&&i%100==0?i:400:/^\d00$/.test(i)?parseInt(i):i==="bold"?700:400:400})(t.weight),n=(function(i){return typeof Ld[i=i||"normal"]=="number"?i:"normal"})(t.stretch);return{family:e,style:r,weight:A,stretch:n,src:t.src||[],ref:t.ref||{name:e,style:[n,r,A].join(" ")}}}function uy(t,e,r,A){var n;for(n=r;n>=0&&n<e.length;n+=A)if(t[e[n]])return t[e[n]];for(n=r;n>=0&&n<e.length;n-=A)if(t[e[n]])return t[e[n]]}var HQ={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},fy={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function hy(t){return[t.stretch,t.style,t.weight,t.family].join(" ")}function dy(t){return t.trimLeft()}function RQ(t,e){for(var r=0;r<t.length;){if(t.charAt(r)===e)return[t.substring(0,r),t.substring(r+1)];r+=1}return null}function jQ(t){var e=t.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);return e===null?null:[e[0],t.substring(e[0].length)]}var Co,yu,py,gy,vy,Nd=["times"];function my(t,e,r,A,n){var i=4,s=yy;switch(n){case dt.API.image_compression.FAST:i=1,s=wy;break;case dt.API.image_compression.MEDIUM:i=6,s=By;break;case dt.API.image_compression.SLOW:i=9,s=by}t=(function(o,l,c,f){for(var h,u=o.length/l,g=new Uint8Array(o.length+u),p=[KQ,wy,yy,By,by],w=0;w<u;w+=1){var m=w*l,B=o.subarray(m,m+l);if(f)g.set(f(B,c,h),m+w);else{for(var x=p.length,E=[],k=0;k<x;k+=1)E[k]=p[k](B,c,h);var H=GQ(E.concat());g.set(E[H],m+w)}h=B}return g})(t,e,Math.ceil(r*A/8),s);var a=od(t,{level:i});return dt.API.__addimage__.arrayBufferToBinaryString(a)}function KQ(t){var e=Array.apply([],t);return e.unshift(0),e}function wy(t,e){var r=t.length,A=[];A[0]=1;for(var n=0;n<r;n+=1){var i=t[n-e]||0;A[n+1]=t[n]-i+256&255}return A}function yy(t,e,r){var A=t.length,n=[];n[0]=2;for(var i=0;i<A;i+=1){var s=r&&r[i]||0;n[i+1]=t[i]-s+256&255}return n}function By(t,e,r){var A=t.length,n=[];n[0]=3;for(var i=0;i<A;i+=1){var s=t[i-e]||0,a=r&&r[i]||0;n[i+1]=t[i]+256-(s+a>>>1)&255}return n}function by(t,e,r){var A=t.length,n=[];n[0]=4;for(var i=0;i<A;i+=1){var s=zQ(t[i-e]||0,r&&r[i]||0,r&&r[i-e]||0);n[i+1]=t[i]-s+256&255}return n}function zQ(t,e,r){if(t===e&&e===r)return t;var A=Math.abs(e-r),n=Math.abs(t-r),i=Math.abs(t+e-r-r);return A<=n&&A<=i?t:n<=i?e:r}function GQ(t){var e=t.map(function(r){return r.reduce(function(A,n){return A+Math.abs(n)},0)});return e.indexOf(Math.min.apply(null,e))}function Od(t,e,r){var A=e*r,n=Math.floor(A/8),i=16-(A-8*n+r),s=(1<<r)-1;return xy(t,n)>>i&s}function Cy(t,e,r,A){var n=r*A,i=Math.floor(n/8),s=16-(n-8*i+A),a=(1<<A)-1,o=(e&a)<<s;(function(l,c,f){if(c+1<l.byteLength)l.setUint16(c,f,!1);else{var h=f>>8&255;l.setUint8(c,h)}})(t,i,xy(t,i)&~(a<<s)&65535|o)}function xy(t,e){return e+1<t.byteLength?t.getUint16(e,!1):t.getUint8(e)<<8}function VQ(t){var e=0;if(t[e++]!==71||t[e++]!==73||t[e++]!==70||t[e++]!==56||(t[e++]+1&253)!=56||t[e++]!==97)throw new Error("Invalid GIF 87a/89a header.");var r=t[e++]|t[e++]<<8,A=t[e++]|t[e++]<<8,n=t[e++],i=n>>7,s=1<<1+(7&n);t[e++],t[e++];var a=null,o=null;i&&(a=e,o=s,e+=3*s);var l=!0,c=[],f=0,h=null,u=0,g=null;for(this.width=r,this.height=A;l&&e<t.length;)switch(t[e++]){case 33:switch(t[e++]){case 255:if(t[e]!==11||t[e+1]==78&&t[e+2]==69&&t[e+3]==84&&t[e+4]==83&&t[e+5]==67&&t[e+6]==65&&t[e+7]==80&&t[e+8]==69&&t[e+9]==50&&t[e+10]==46&&t[e+11]==48&&t[e+12]==3&&t[e+13]==1&&t[e+16]==0)e+=14,g=t[e++]|t[e++]<<8,e++;else for(e+=12;;){if(!((L=t[e++])>=0))throw Error("Invalid block size");if(L===0)break;e+=L}break;case 249:if(t[e++]!==4||t[e+4]!==0)throw new Error("Invalid graphics extension block.");var p=t[e++];f=t[e++]|t[e++]<<8,h=t[e++],1&p||(h=null),u=p>>2&7,e++;break;case 254:for(;;){if(!((L=t[e++])>=0))throw Error("Invalid block size");if(L===0)break;e+=L}break;default:throw new Error("Unknown graphic control label: 0x"+t[e-1].toString(16))}break;case 44:var w=t[e++]|t[e++]<<8,m=t[e++]|t[e++]<<8,B=t[e++]|t[e++]<<8,x=t[e++]|t[e++]<<8,E=t[e++],k=E>>6&1,H=1<<1+(7&E),K=a,R=o,I=!1;E>>7&&(I=!0,K=e,R=H,e+=3*H);var W=e;for(e++;;){var L;if(!((L=t[e++])>=0))throw Error("Invalid block size");if(L===0)break;e+=L}c.push({x:w,y:m,width:B,height:x,has_local_palette:I,palette_offset:K,palette_size:R,data_offset:W,data_length:e-W,transparent_index:h,interlaced:!!k,delay:f,disposal:u});break;case 59:l=!1;break;default:throw new Error("Unknown gif block: 0x"+t[e-1].toString(16))}this.numFrames=function(){return c.length},this.loopCount=function(){return g},this.frameInfo=function(F){if(F<0||F>=c.length)throw new Error("Frame index out of range.");return c[F]},this.decodeAndBlitFrameBGRA=function(F,M){var b=this.frameInfo(F),Y=b.width*b.height;if(Y>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");var ce=new Uint8Array(Y);Ey(t,b.data_offset,ce,Y);var ee=b.palette_offset,le=b.transparent_index;le===null&&(le=256);var Ae=b.width,te=r-Ae,T=Ae,S=4*(b.y*r+b.x),O=4*((b.y+b.height)*r+b.x),P=S,z=4*te;b.interlaced===!0&&(z+=4*r*7);for(var ie=8,fe=0,Z=ce.length;fe<Z;++fe){var pe=ce[fe];if(T===0&&(T=Ae,(P+=z)>=O&&(z=4*te+4*r*(ie-1),P=S+(Ae+te)*(ie<<1),ie>>=1)),pe===le)P+=4;else{var we=t[ee+3*pe],be=t[ee+3*pe+1],je=t[ee+3*pe+2];M[P++]=je,M[P++]=be,M[P++]=we,M[P++]=255}--T}},this.decodeAndBlitFrameRGBA=function(F,M){var b=this.frameInfo(F),Y=b.width*b.height;if(Y>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");var ce=new Uint8Array(Y);Ey(t,b.data_offset,ce,Y);var ee=b.palette_offset,le=b.transparent_index;le===null&&(le=256);var Ae=b.width,te=r-Ae,T=Ae,S=4*(b.y*r+b.x),O=4*((b.y+b.height)*r+b.x),P=S,z=4*te;b.interlaced===!0&&(z+=4*r*7);for(var ie=8,fe=0,Z=ce.length;fe<Z;++fe){var pe=ce[fe];if(T===0&&(T=Ae,(P+=z)>=O&&(z=4*te+4*r*(ie-1),P=S+(Ae+te)*(ie<<1),ie>>=1)),pe===le)P+=4;else{var we=t[ee+3*pe],be=t[ee+3*pe+1],je=t[ee+3*pe+2];M[P++]=we,M[P++]=be,M[P++]=je,M[P++]=255}--T}}}function Ey(t,e,r,A){for(var n=t[e++],i=1<<n,s=i+1,a=s+1,o=n+1,l=(1<<o)-1,c=0,f=0,h=0,u=t[e++],g=new Int32Array(4096),p=null;;){for(;c<16&&u!==0;)f|=t[e++]<<c,c+=8,u===1?u=t[e++]:--u;if(c<o)break;var w=f&l;if(f>>=o,c-=o,w!==i){if(w===s)break;for(var m=w<a?w:p,B=0,x=m;x>i;)x=g[x]>>8,++B;var E=x;if(h+B+(m!==w?1:0)>A)return void nr.log("Warning, gif stream longer than expected.");r[h++]=E;var k=h+=B;for(m!==w&&(r[h++]=E),x=m;B--;)x=g[x],r[--k]=255&x,x>>=8;p!==null&&a<4096&&(g[a++]=p<<8|E,a>=l+1&&o<12&&(++o,l=l<<1|1)),p=w}else a=s+1,l=(1<<(o=n+1))-1,p=null}return h!==A&&nr.log("Warning, gif stream shorter than expected."),r}function Pd(t){var e,r,A,n,i,s=Math.floor,a=new Array(64),o=new Array(64),l=new Array(64),c=new Array(64),f=new Array(65535),h=new Array(65535),u=new Array(64),g=new Array(64),p=[],w=0,m=7,B=new Array(64),x=new Array(64),E=new Array(64),k=new Array(256),H=new Array(2048),K=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],R=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],I=[0,1,2,3,4,5,6,7,8,9,10,11],W=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],L=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],F=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],M=[0,1,2,3,4,5,6,7,8,9,10,11],b=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],Y=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function ce(S,O){for(var P=0,z=0,ie=new Array,fe=1;fe<=16;fe++){for(var Z=1;Z<=S[fe];Z++)ie[O[z]]=[],ie[O[z]][0]=P,ie[O[z]][1]=fe,z++,P++;P*=2}return ie}function ee(S){for(var O=S[0],P=S[1]-1;P>=0;)O&1<<P&&(w|=1<<m),P--,--m<0&&(w==255?(le(255),le(0)):le(w),m=7,w=0)}function le(S){p.push(S)}function Ae(S){le(S>>8&255),le(255&S)}function te(S,O,P,z,ie){for(var fe,Z=ie[0],pe=ie[240],we=(function(ne,xe){var ye,he,Se,ve,Ce,Le,Ge,Ke,We,At,$e=0;for(We=0;We<8;++We){ye=ne[$e],he=ne[$e+1],Se=ne[$e+2],ve=ne[$e+3],Ce=ne[$e+4],Le=ne[$e+5],Ge=ne[$e+6];var _t=ye+(Ke=ne[$e+7]),at=ye-Ke,Bt=he+Ge,bt=he-Ge,Tt=Se+Le,st=Se-Le,Pt=ve+Ce,rt=ve-Ce,wt=_t+Pt,Kt=_t-Pt,lt=Bt+Tt,ht=Bt-Tt;ne[$e]=wt+lt,ne[$e+4]=wt-lt;var qt=.707106781*(ht+Kt);ne[$e+2]=Kt+qt,ne[$e+6]=Kt-qt;var Dn=.382683433*((wt=rt+st)-(ht=bt+at)),Pr=.5411961*wt+Dn,Gr=1.306562965*ht+Dn,CA=.707106781*(lt=st+bt),yt=at+CA,Bn=at-CA;ne[$e+5]=Bn+Pr,ne[$e+3]=Bn-Pr,ne[$e+1]=yt+Gr,ne[$e+7]=yt-Gr,$e+=8}for($e=0,We=0;We<8;++We){ye=ne[$e],he=ne[$e+8],Se=ne[$e+16],ve=ne[$e+24],Ce=ne[$e+32],Le=ne[$e+40],Ge=ne[$e+48];var ii=ye+(Ke=ne[$e+56]),WA=ye-Ke,MA=he+Ge,dr=he-Ge,Ir=Se+Le,eA=Se-Le,bn=ve+Ce,Ei=ve-Ce,Cn=ii+bn,zt=ii-bn,pA=MA+Ir,xn=MA-Ir;ne[$e]=Cn+pA,ne[$e+32]=Cn-pA;var $A=.707106781*(xn+zt);ne[$e+16]=zt+$A,ne[$e+48]=zt-$A;var ai=.382683433*((Cn=Ei+eA)-(xn=dr+WA)),En=.5411961*Cn+ai,Si=1.306562965*xn+ai,Ra=.707106781*(pA=eA+dr),ja=WA+Ra,Ka=WA-Ra;ne[$e+40]=Ka+En,ne[$e+24]=Ka-En,ne[$e+8]=ja+Si,ne[$e+56]=ja-Si,$e++}for(We=0;We<64;++We)At=ne[We]*xe[We],u[We]=At>0?At+.5|0:At-.5|0;return u})(S,O),be=0;be<64;++be)g[K[be]]=we[be];var je=g[0]-P;P=g[0],je==0?ee(z[0]):(ee(z[h[fe=32767+je]]),ee(f[fe]));for(var Te=63;Te>0&&g[Te]==0;)Te--;if(Te==0)return ee(Z),P;for(var Q,N=1;N<=Te;){for(var ue=N;g[N]==0&&N<=Te;)++N;var J=N-ue;if(J>=16){Q=J>>4;for(var q=1;q<=Q;++q)ee(pe);J&=15}fe=32767+g[N],ee(ie[(J<<4)+h[fe]]),ee(f[fe]),N++}return Te!=63&&ee(Z),P}function T(S){S=Math.min(Math.max(S,1),100),i!=S&&((function(O){for(var P=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],z=0;z<64;z++){var ie=s((P[z]*O+50)/100);ie=Math.min(Math.max(ie,1),255),a[K[z]]=ie}for(var fe=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],Z=0;Z<64;Z++){var pe=s((fe[Z]*O+50)/100);pe=Math.min(Math.max(pe,1),255),o[K[Z]]=pe}for(var we=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],be=0,je=0;je<8;je++)for(var Te=0;Te<8;Te++)l[be]=1/(a[K[be]]*we[je]*we[Te]*8),c[be]=1/(o[K[be]]*we[je]*we[Te]*8),be++})(S<50?Math.floor(5e3/S):Math.floor(200-2*S)),i=S)}this.encode=function(S,O){O&&T(O),p=new Array,w=0,m=7,Ae(65496),Ae(65504),Ae(16),le(74),le(70),le(73),le(70),le(0),le(1),le(1),le(0),Ae(1),Ae(1),le(0),le(0),(function(){Ae(65499),Ae(132),le(0);for(var he=0;he<64;he++)le(a[he]);le(1);for(var Se=0;Se<64;Se++)le(o[Se])})(),(function(he,Se){Ae(65472),Ae(17),le(8),Ae(Se),Ae(he),le(3),le(1),le(17),le(0),le(2),le(17),le(1),le(3),le(17),le(1)})(S.width,S.height),(function(){Ae(65476),Ae(418),le(0);for(var he=0;he<16;he++)le(R[he+1]);for(var Se=0;Se<=11;Se++)le(I[Se]);le(16);for(var ve=0;ve<16;ve++)le(W[ve+1]);for(var Ce=0;Ce<=161;Ce++)le(L[Ce]);le(1);for(var Le=0;Le<16;Le++)le(F[Le+1]);for(var Ge=0;Ge<=11;Ge++)le(M[Ge]);le(17);for(var Ke=0;Ke<16;Ke++)le(b[Ke+1]);for(var We=0;We<=161;We++)le(Y[We])})(),Ae(65498),Ae(12),le(3),le(1),le(0),le(2),le(17),le(3),le(17),le(0),le(63),le(0);var P=0,z=0,ie=0;w=0,m=7,this.encode.displayName="_encode_";for(var fe,Z,pe,we,be,je,Te,Q,N,ue=S.data,J=S.width,q=S.height,ne=4*J,xe=0;xe<q;){for(fe=0;fe<ne;){for(be=ne*xe+fe,Te=-1,Q=0,N=0;N<64;N++)je=be+(Q=N>>3)*ne+(Te=4*(7&N)),xe+Q>=q&&(je-=ne*(xe+1+Q-q)),fe+Te>=ne&&(je-=fe+Te-ne+4),Z=ue[je++],pe=ue[je++],we=ue[je++],B[N]=(H[Z]+H[pe+256|0]+H[we+512|0]>>16)-128,x[N]=(H[Z+768|0]+H[pe+1024|0]+H[we+1280|0]>>16)-128,E[N]=(H[Z+1280|0]+H[pe+1536|0]+H[we+1792|0]>>16)-128;P=te(B,l,P,e,A),z=te(x,c,z,r,n),ie=te(E,c,ie,r,n),fe+=32}xe+=8}if(m>=0){var ye=[];ye[1]=m+1,ye[0]=(1<<m+1)-1,ee(ye)}return Ae(65497),new Uint8Array(p)},t=t||50,(function(){for(var S=String.fromCharCode,O=0;O<256;O++)k[O]=S(O)})(),e=ce(R,I),r=ce(F,M),A=ce(W,L),n=ce(b,Y),(function(){for(var S=1,O=2,P=1;P<=15;P++){for(var z=S;z<O;z++)h[32767+z]=P,f[32767+z]=[],f[32767+z][1]=P,f[32767+z][0]=z;for(var ie=-(O-1);ie<=-S;ie++)h[32767+ie]=P,f[32767+ie]=[],f[32767+ie][1]=P,f[32767+ie][0]=O-1+ie;S<<=1,O<<=1}})(),(function(){for(var S=0;S<256;S++)H[S]=19595*S,H[S+256|0]=38470*S,H[S+512|0]=7471*S+32768,H[S+768|0]=-11059*S,H[S+1024|0]=-21709*S,H[S+1280|0]=32768*S+8421375,H[S+1536|0]=-27439*S,H[S+1792|0]=-5329*S})(),T(t)}function Wn(t,e){if(this.pos=0,this.buffer=t,this.datav=new DataView(t.buffer),this.is_with_alpha=!!e,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,["BM","BA","CI","CP","IC","PT"].indexOf(this.flag)===-1)throw new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function Sy(t){function e(I){if(!I)throw Error("assert :P")}function r(I,W,L){for(var F=0;4>F;F++)if(I[W+F]!=L.charCodeAt(F))return!0;return!1}function A(I,W,L,F,M){for(var b=0;b<M;b++)I[W+b]=L[F+b]}function n(I,W,L,F){for(var M=0;M<F;M++)I[W+M]=L}function i(I){return new Int32Array(I)}function s(I,W){for(var L=[],F=0;F<I;F++)L.push(new W);return L}function a(I,W){var L=[];return(function F(M,b,Y){for(var ce=Y[b],ee=0;ee<ce&&(M.push(Y.length>b+1?[]:new W),!(Y.length<b+1));ee++)F(M[ee],b+1,Y)})(L,0,I),L}var o=function(){var I=this;function W(d,v){for(var C=1<<v-1>>>0;d&C;)C>>>=1;return C?(d&C-1)+C:d}function L(d,v,C,U,j){e(!(U%C));do d[v+(U-=C)]=j;while(0<U)}function F(d,v,C,U,j){if(e(2328>=j),512>=j)var G=i(512);else if((G=i(j))==null)return 0;return(function(V,$,X,se,ge,Ue){var oe,me,Ee=$,Oe=1<<X,Fe=i(16),Pe=i(16);for(e(ge!=0),e(se!=null),e(V!=null),e(0<X),me=0;me<ge;++me){if(15<se[me])return 0;++Fe[se[me]]}if(Fe[0]==ge)return 0;for(Pe[1]=0,oe=1;15>oe;++oe){if(Fe[oe]>1<<oe)return 0;Pe[oe+1]=Pe[oe]+Fe[oe]}for(me=0;me<ge;++me)oe=se[me],0<se[me]&&(Ue[Pe[oe]++]=me);if(Pe[15]==1)return(se=new M).g=0,se.value=Ue[0],L(V,Ee,1,Oe,se),Oe;var Me,Ve=-1,Re=Oe-1,pt=0,nt=1,Nt=1,ut=1<<X;for(me=0,oe=1,ge=2;oe<=X;++oe,ge<<=1){if(nt+=Nt<<=1,0>(Nt-=Fe[oe]))return 0;for(;0<Fe[oe];--Fe[oe])(se=new M).g=oe,se.value=Ue[me++],L(V,Ee+pt,ge,ut,se),pt=W(pt,oe)}for(oe=X+1,ge=2;15>=oe;++oe,ge<<=1){if(nt+=Nt<<=1,0>(Nt-=Fe[oe]))return 0;for(;0<Fe[oe];--Fe[oe]){if(se=new M,(pt&Re)!=Ve){for(Ee+=ut,Me=1<<(Ve=oe)-X;15>Ve&&!(0>=(Me-=Fe[Ve]));)++Ve,Me<<=1;Oe+=ut=1<<(Me=Ve-X),V[$+(Ve=pt&Re)].g=Me+X,V[$+Ve].value=Ee-$-Ve}se.g=oe-X,se.value=Ue[me++],L(V,Ee+(pt>>X),ge,ut,se),pt=W(pt,oe)}}return nt!=2*Pe[15]-1?0:Oe})(d,v,C,U,j,G)}function M(){this.value=this.g=0}function b(){this.value=this.g=0}function Y(){this.G=s(5,M),this.H=i(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=s(ul,b)}function ce(d,v,C,U){e(d!=null),e(v!=null),e(2147483648>U),d.Ca=254,d.I=0,d.b=-8,d.Ka=0,d.oa=v,d.pa=C,d.Jd=v,d.Yc=C+U,d.Zc=4<=U?C+U-4+1:C,Z(d)}function ee(d,v){for(var C=0;0<v--;)C|=we(d,128)<<v;return C}function le(d,v){var C=ee(d,v);return pe(d)?-C:C}function Ae(d,v,C,U){var j,G=0;for(e(d!=null),e(v!=null),e(4294967288>U),d.Sb=U,d.Ra=0,d.u=0,d.h=0,4<U&&(U=4),j=0;j<U;++j)G+=v[C+j]<<8*j;d.Ra=G,d.bb=U,d.oa=v,d.pa=C}function te(d){for(;8<=d.u&&d.bb<d.Sb;)d.Ra>>>=8,d.Ra+=d.oa[d.pa+d.bb]<<ZA-8>>>0,++d.bb,d.u-=8;z(d)&&(d.h=1,d.u=0)}function T(d,v){if(e(0<=v),!d.h&&v<=Oc){var C=P(d)&ro[v];return d.u+=v,te(d),C}return d.h=1,d.u=0}function S(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function O(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function P(d){return d.Ra>>>(d.u&ZA-1)>>>0}function z(d){return e(d.bb<=d.Sb),d.h||d.bb==d.Sb&&d.u>ZA}function ie(d,v){d.u=v,d.h=z(d)}function fe(d){d.u>=fn&&(e(d.u>=fn),te(d))}function Z(d){e(d!=null&&d.oa!=null),d.pa<d.Zc?(d.I=(d.oa[d.pa++]|d.I<<8)>>>0,d.b+=8):(e(d!=null&&d.oa!=null),d.pa<d.Yc?(d.b+=8,d.I=d.oa[d.pa++]|d.I<<8):d.Ka?d.b=0:(d.I<<=8,d.b+=8,d.Ka=1))}function pe(d){return ee(d,1)}function we(d,v){var C=d.Ca;0>d.b&&Z(d);var U=d.b,j=C*v>>>8,G=(d.I>>>U>j)+0;for(G?(C-=j,d.I-=j+1<<U>>>0):C=j+1,U=C,j=0;256<=U;)j+=8,U>>=8;return U=7^j+fl[U],d.b-=U,d.Ca=(C<<U)-1,G}function be(d,v,C){d[v+0]=C>>24&255,d[v+1]=C>>16&255,d[v+2]=C>>8&255,d[v+3]=255&C}function je(d,v){return d[v+0]|d[v+1]<<8}function Te(d,v){return je(d,v)|d[v+2]<<16}function Q(d,v){return je(d,v)|je(d,v+2)<<16}function N(d,v){var C=1<<v;return e(d!=null),e(0<v),d.X=i(C),d.X==null?0:(d.Mb=32-v,d.Xa=v,1)}function ue(d,v){e(d!=null),e(v!=null),e(d.Xa==v.Xa),A(v.X,0,d.X,0,1<<v.Xa)}function J(){this.X=[],this.Xa=this.Mb=0}function q(d,v,C,U){e(C!=null),e(U!=null);var j=C[0],G=U[0];return j==0&&(j=(d*G+v/2)/v),G==0&&(G=(v*j+d/2)/d),0>=j||0>=G?0:(C[0]=j,U[0]=G,1)}function ne(d,v){return d+(1<<v)-1>>>v}function xe(d,v){return((4278255360&d)+(4278255360&v)>>>0&4278255360)+((16711935&d)+(16711935&v)>>>0&16711935)>>>0}function ye(d,v){I[v]=function(C,U,j,G,V,$,X){var se;for(se=0;se<V;++se){var ge=I[d]($[X+se-1],j,G+se);$[X+se]=xe(C[U+se],ge)}}}function he(){this.ud=this.hd=this.jd=0}function Se(d,v){return((4278124286&(d^v))>>>1)+(d&v)>>>0}function ve(d){return 0<=d&&256>d?d:0>d?0:255<d?255:void 0}function Ce(d,v){return ve(d+(d-v+.5>>1))}function Le(d,v,C){return Math.abs(v-C)-Math.abs(d-C)}function Ge(d,v,C,U,j,G,V){for(U=G[V-1],C=0;C<j;++C)G[V+C]=U=xe(d[v+C],U)}function Ke(d,v,C,U,j){var G;for(G=0;G<C;++G){var V=d[v+G],$=V>>8&255,X=16711935&(X=(X=16711935&V)+(($<<16)+$));U[j+G]=(4278255360&V)+X>>>0}}function We(d,v){v.jd=255&d,v.hd=d>>8&255,v.ud=d>>16&255}function At(d,v,C,U,j,G){var V;for(V=0;V<U;++V){var $=v[C+V],X=$>>>8,se=$,ge=255&(ge=(ge=$>>>16)+((d.jd<<24>>24)*(X<<24>>24)>>>5));se=255&(se=(se+=(d.hd<<24>>24)*(X<<24>>24)>>>5)+((d.ud<<24>>24)*(ge<<24>>24)>>>5)),j[G+V]=(4278255360&$)+(ge<<16)+se}}function $e(d,v,C,U,j){I[v]=function(G,V,$,X,se,ge,Ue,oe,me){for(X=Ue;X<oe;++X)for(Ue=0;Ue<me;++Ue)se[ge++]=j($[U(G[V++])])},I[d]=function(G,V,$,X,se,ge,Ue){var oe=8>>G.b,me=G.Ea,Ee=G.K[0],Oe=G.w;if(8>oe)for(G=(1<<G.b)-1,Oe=(1<<oe)-1;V<$;++V){var Fe,Pe=0;for(Fe=0;Fe<me;++Fe)Fe&G||(Pe=U(X[se++])),ge[Ue++]=j(Ee[Pe&Oe]),Pe>>=oe}else I["VP8LMapColor"+C](X,se,Ee,Oe,ge,Ue,V,$,me)}}function _t(d,v,C,U,j){for(C=v+C;v<C;){var G=d[v++];U[j++]=G>>16&255,U[j++]=G>>8&255,U[j++]=255&G}}function at(d,v,C,U,j){for(C=v+C;v<C;){var G=d[v++];U[j++]=G>>16&255,U[j++]=G>>8&255,U[j++]=255&G,U[j++]=G>>24&255}}function Bt(d,v,C,U,j){for(C=v+C;v<C;){var G=(V=d[v++])>>16&240|V>>12&15,V=240&V|V>>28&15;U[j++]=G,U[j++]=V}}function bt(d,v,C,U,j){for(C=v+C;v<C;){var G=(V=d[v++])>>16&248|V>>13&7,V=V>>5&224|V>>3&31;U[j++]=G,U[j++]=V}}function Tt(d,v,C,U,j){for(C=v+C;v<C;){var G=d[v++];U[j++]=255&G,U[j++]=G>>8&255,U[j++]=G>>16&255}}function st(d,v,C,U,j,G){if(G==0)for(C=v+C;v<C;)be(U,((G=d[v++])[0]>>24|G[1]>>8&65280|G[2]<<8&16711680|G[3]<<24)>>>0),j+=32;else A(U,j,d,v,C)}function Pt(d,v){I[v][0]=I[d+"0"],I[v][1]=I[d+"1"],I[v][2]=I[d+"2"],I[v][3]=I[d+"3"],I[v][4]=I[d+"4"],I[v][5]=I[d+"5"],I[v][6]=I[d+"6"],I[v][7]=I[d+"7"],I[v][8]=I[d+"8"],I[v][9]=I[d+"9"],I[v][10]=I[d+"10"],I[v][11]=I[d+"11"],I[v][12]=I[d+"12"],I[v][13]=I[d+"13"],I[v][14]=I[d+"0"],I[v][15]=I[d+"0"]}function rt(d){return d==Kv||d==zv||d==Fh||d==Gv}function wt(){this.eb=[],this.size=this.A=this.fb=0}function Kt(){this.y=[],this.f=[],this.ea=[],this.F=[],this.Tc=this.Ed=this.Cd=this.Fd=this.lb=this.Db=this.Ab=this.fa=this.J=this.W=this.N=this.O=0}function lt(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new wt,this.f.kb=new Kt,this.sd=null}function ht(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function qt(){this.Id=this.fd=this.Md=this.hb=this.ib=this.da=this.bd=this.cd=this.j=this.v=this.Da=this.Sd=this.ob=0}function Dn(d){return alert("todo:WebPSamplerProcessPlane"),d.T}function Pr(d,v){var C=d.T,U=v.ba.f.RGBA,j=U.eb,G=U.fb+d.ka*U.A,V=zn[v.ba.S],$=d.y,X=d.O,se=d.f,ge=d.N,Ue=d.ea,oe=d.W,me=v.cc,Ee=v.dc,Oe=v.Mc,Fe=v.Nc,Pe=d.ka,Me=d.ka+d.T,Ve=d.U,Re=Ve+1>>1;for(Pe==0?V($,X,null,null,se,ge,Ue,oe,se,ge,Ue,oe,j,G,null,null,Ve):(V(v.ec,v.fc,$,X,me,Ee,Oe,Fe,se,ge,Ue,oe,j,G-U.A,j,G,Ve),++C);Pe+2<Me;Pe+=2)me=se,Ee=ge,Oe=Ue,Fe=oe,ge+=d.Rc,oe+=d.Rc,G+=2*U.A,V($,(X+=2*d.fa)-d.fa,$,X,me,Ee,Oe,Fe,se,ge,Ue,oe,j,G-U.A,j,G,Ve);return X+=d.fa,d.j+Me<d.o?(A(v.ec,v.fc,$,X,Ve),A(v.cc,v.dc,se,ge,Re),A(v.Mc,v.Nc,Ue,oe,Re),C--):1&Me||V($,X,null,null,se,ge,Ue,oe,se,ge,Ue,oe,j,G+U.A,null,null,Ve),C}function Gr(d,v,C){var U=d.F,j=[d.J];if(U!=null){var G=d.U,V=v.ba.S,$=V==Sh||V==Fh;v=v.ba.f.RGBA;var X=[0],se=d.ka;X[0]=d.T,d.Kb&&(se==0?--X[0]:(--se,j[0]-=d.width),d.j+d.ka+d.T==d.o&&(X[0]=d.o-d.j-se));var ge=v.eb;se=v.fb+se*v.A,d=NF(U,j[0],d.width,G,X,ge,se+($?0:3),v.A),e(C==X),d&&rt(V)&&Hc(ge,se,$,G,X,v.A)}return 0}function CA(d){var v=d.ma,C=v.ba.S,U=11>C,j=C==xh||C==Eh||C==Sh||C==jv||C==12||rt(C);if(v.memory=null,v.Ib=null,v.Jb=null,v.Nd=null,!jn(v.Oa,d,j?11:12))return 0;if(j&&rt(C)&&Aa(),d.da)alert("todo:use_scaling");else{if(U){if(v.Ib=Dn,d.Kb){if(C=d.U+1>>1,v.memory=i(d.U+2*C),v.memory==null)return 0;v.ec=v.memory,v.fc=0,v.cc=v.ec,v.dc=v.fc+d.U,v.Mc=v.cc,v.Nc=v.dc+C,v.Ib=Pr,Aa()}}else alert("todo:EmitYUV");j&&(v.Jb=Gr,U&&Cr())}if(U&&!XF){for(d=0;256>d;++d)IK[d]=89858*(d-128)+Uh>>Ih,QK[d]=-22014*(d-128)+Uh,_K[d]=-45773*(d-128),UK[d]=113618*(d-128)+Uh>>Ih;for(d=jc;d<Wv;++d)v=76283*(d-16)+Uh>>Ih,kK[d-jc]=YA(v,255),LK[d-jc]=YA(v+8>>4,15);XF=1}return 1}function yt(d){var v=d.ma,C=d.U,U=d.T;return e(!(1&d.ka)),0>=C||0>=U?0:(C=v.Ib(d,v),v.Jb!=null&&v.Jb(d,v,C),v.Dc+=C,1)}function Bn(d){d.ma.memory=null}function ii(d,v,C,U){return T(d,8)!=47?0:(v[0]=T(d,14)+1,C[0]=T(d,14)+1,U[0]=T(d,1),T(d,3)!=0?0:!d.h)}function WA(d,v){if(4>d)return d+1;var C=d-2>>1;return(2+(1&d)<<C)+T(v,C)+1}function MA(d,v){return 120<v?v-120:1<=(C=((C=dK[v-1])>>4)*d+(8-(15&C)))?C:1;var C}function dr(d,v,C){var U=P(C),j=d[v+=255&U].g-8;return 0<j&&(ie(C,C.u+8),U=P(C),v+=d[v].value,v+=U&(1<<j)-1),ie(C,C.u+d[v].g),d[v].value}function Ir(d,v,C){return C.g+=d.g,C.value+=d.value<<v>>>0,e(8>=C.g),d.g}function eA(d,v,C){var U=d.xc;return e((v=U==0?0:d.vc[d.md*(C>>U)+(v>>U)])<d.Wb),d.Ya[v]}function bn(d,v,C,U){var j=d.ab,G=d.c*v,V=d.C;v=V+v;var $=C,X=U;for(U=d.Ta,C=d.Ua;0<j--;){var se=d.gc[j],ge=V,Ue=v,oe=$,me=X,Ee=(X=U,$=C,se.Ea);switch(e(ge<Ue),e(Ue<=se.nc),se.hc){case 2:hl(oe,me,(Ue-ge)*Ee,X,$);break;case 0:var Oe=ge,Fe=Ue,Pe=X,Me=$,Ve=(ut=se).Ea;Oe==0&&(Ya(oe,me,null,null,1,Pe,Me),Ge(oe,me+1,0,0,Ve-1,Pe,Me+1),me+=Ve,Me+=Ve,++Oe);for(var Re=1<<ut.b,pt=Re-1,nt=ne(Ve,ut.b),Nt=ut.K,ut=ut.w+(Oe>>ut.b)*nt;Oe<Fe;){var Ht=Nt,iA=ut,Ot=1;for(Xa(oe,me,Pe,Me-Ve,1,Pe,Me);Ot<Ve;){var ft=(Ot&~pt)+Re;ft>Ve&&(ft=Ve),(0,oi[Ht[iA++]>>8&15])(oe,me+ +Ot,Pe,Me+Ot-Ve,ft-Ot,Pe,Me+Ot),Ot=ft}me+=Ve,Me+=Ve,++Oe&pt||(ut+=nt)}Ue!=se.nc&&A(X,$-Ee,X,$+(Ue-ge-1)*Ee,Ee);break;case 1:for(Ee=oe,Fe=me,Ve=(oe=se.Ea)-(Me=oe&~(Pe=(me=1<<se.b)-1)),Oe=ne(oe,se.b),Re=se.K,se=se.w+(ge>>se.b)*Oe;ge<Ue;){for(pt=Re,nt=se,Nt=new he,ut=Fe+Me,Ht=Fe+oe;Fe<ut;)We(pt[nt++],Nt),no(Nt,Ee,Fe,me,X,$),Fe+=me,$+=me;Fe<Ht&&(We(pt[nt++],Nt),no(Nt,Ee,Fe,Ve,X,$),Fe+=Ve,$+=Ve),++ge&Pe||(se+=Oe)}break;case 3:if(oe==X&&me==$&&0<se.b){for(Fe=X,oe=Ee=$+(Ue-ge)*Ee-(Me=(Ue-ge)*ne(se.Ea,se.b)),me=X,Pe=$,Oe=[],Me=(Ve=Me)-1;0<=Me;--Me)Oe[Me]=me[Pe+Me];for(Me=Ve-1;0<=Me;--Me)Fe[oe+Me]=Oe[Me];Ao(se,ge,Ue,X,Ee,X,$)}else Ao(se,ge,Ue,oe,me,X,$)}$=U,X=C}X!=C&&A(U,C,$,X,G)}function Ei(d,v){var C=d.V,U=d.Ba+d.c*d.C,j=v-d.C;if(e(v<=d.l.o),e(16>=j),0<j){var G=d.l,V=d.Ta,$=d.Ua,X=G.width;if(bn(d,j,C,U),j=$=[$],e((C=d.C)<(U=v)),e(G.v<G.va),U>G.o&&(U=G.o),C<G.j){var se=G.j-C;C=G.j,j[0]+=se*X}if(C>=U?C=0:(j[0]+=4*G.v,G.ka=C-G.j,G.U=G.va-G.v,G.T=U-C,C=1),C){if($=$[0],11>(C=d.ca).S){var ge=C.f.RGBA,Ue=(U=C.S,j=G.U,G=G.T,se=ge.eb,ge.A),oe=G;for(ge=ge.fb+d.Ma*ge.A;0<oe--;){var me=V,Ee=$,Oe=j,Fe=se,Pe=ge;switch(U){case Ch:Pc(me,Ee,Oe,Fe,Pe);break;case xh:Mc(me,Ee,Oe,Fe,Pe);break;case Kv:Mc(me,Ee,Oe,Fe,Pe),Hc(Fe,Pe,0,Oe,1,0);break;case jF:ao(me,Ee,Oe,Fe,Pe);break;case Eh:st(me,Ee,Oe,Fe,Pe,1);break;case zv:st(me,Ee,Oe,Fe,Pe,1),Hc(Fe,Pe,0,Oe,1,0);break;case Sh:st(me,Ee,Oe,Fe,Pe,0);break;case Fh:st(me,Ee,Oe,Fe,Pe,0),Hc(Fe,Pe,1,Oe,1,0);break;case jv:dl(me,Ee,Oe,Fe,Pe);break;case Gv:dl(me,Ee,Oe,Fe,Pe),TF(Fe,Pe,Oe,1,0);break;case KF:io(me,Ee,Oe,Fe,Pe);break;default:e(0)}$+=X,ge+=Ue}d.Ma+=G}else alert("todo:EmitRescaledRowsYUVA");e(d.Ma<=C.height)}}d.C=v,e(d.C<=d.i)}function Cn(d){var v;if(0<d.ua)return 0;for(v=0;v<d.Wb;++v){var C=d.Ya[v].G,U=d.Ya[v].H;if(0<C[1][U[1]+0].g||0<C[2][U[2]+0].g||0<C[3][U[3]+0].g)return 0}return 1}function zt(d,v,C,U,j,G){if(d.Z!=0){var V=d.qd,$=d.rd;for(e(ts[d.Z]!=null);v<C;++v)ts[d.Z](V,$,U,j,U,j,G),V=U,$=j,j+=G;d.qd=V,d.rd=$}}function pA(d,v){var C=d.l.ma,U=C.Z==0||C.Z==1?d.l.j:d.C;if(U=d.C<U?U:d.C,e(v<=d.l.o),v>U){var j=d.l.width,G=C.ca,V=C.tb+j*U,$=d.V,X=d.Ba+d.c*U,se=d.gc;e(d.ab==1),e(se[0].hc==3),Hv(se[0],U,v,$,X,G,V),zt(C,U,v,G,V,j)}d.C=d.Ma=v}function xn(d,v,C,U,j,G,V){var $=d.$/U,X=d.$%U,se=d.m,ge=d.s,Ue=C+d.$,oe=Ue;j=C+U*j;var me=C+U*G,Ee=280+ge.ua,Oe=d.Pb?$:16777216,Fe=0<ge.ua?ge.Wa:null,Pe=ge.wc,Me=Ue<me?eA(ge,X,$):null;e(d.C<G),e(me<=j);var Ve=!1;e:for(;;){for(;Ve||Ue<me;){var Re=0;if($>=Oe){var pt=Ue-C;e((Oe=d).Pb),Oe.wd=Oe.m,Oe.xd=pt,0<Oe.s.ua&&ue(Oe.s.Wa,Oe.s.vb),Oe=$+gK}if(X&Pe||(Me=eA(ge,X,$)),e(Me!=null),Me.Qb&&(v[Ue]=Me.qb,Ve=!0),!Ve)if(fe(se),Me.jc){Re=se,pt=v;var nt=Ue,Nt=Me.pd[P(Re)&ul-1];e(Me.jc),256>Nt.g?(ie(Re,Re.u+Nt.g),pt[nt]=Nt.value,Re=0):(ie(Re,Re.u+Nt.g-256),e(256<=Nt.value),Re=Nt.value),Re==0&&(Ve=!0)}else Re=dr(Me.G[0],Me.H[0],se);if(se.h)break;if(Ve||256>Re){if(!Ve)if(Me.nd)v[Ue]=(Me.qb|Re<<8)>>>0;else{if(fe(se),Ve=dr(Me.G[1],Me.H[1],se),fe(se),pt=dr(Me.G[2],Me.H[2],se),nt=dr(Me.G[3],Me.H[3],se),se.h)break;v[Ue]=(nt<<24|Ve<<16|Re<<8|pt)>>>0}if(Ve=!1,++Ue,++X>=U&&(X=0,++$,V!=null&&$<=G&&!($%16)&&V(d,$),Fe!=null))for(;oe<Ue;)Re=v[oe++],Fe.X[(506832829*Re&4294967295)>>>Fe.Mb]=Re}else if(280>Re){if(Re=WA(Re-256,se),pt=dr(Me.G[4],Me.H[4],se),fe(se),pt=MA(U,pt=WA(pt,se)),se.h)break;if(Ue-C<pt||j-Ue<Re)break e;for(nt=0;nt<Re;++nt)v[Ue+nt]=v[Ue+nt-pt];for(Ue+=Re,X+=Re;X>=U;)X-=U,++$,V!=null&&$<=G&&!($%16)&&V(d,$);if(e(Ue<=j),X&Pe&&(Me=eA(ge,X,$)),Fe!=null)for(;oe<Ue;)Re=v[oe++],Fe.X[(506832829*Re&4294967295)>>>Fe.Mb]=Re}else{if(!(Re<Ee))break e;for(Ve=Re-280,e(Fe!=null);oe<Ue;)Re=v[oe++],Fe.X[(506832829*Re&4294967295)>>>Fe.Mb]=Re;Re=Ue,e(!(Ve>>>(pt=Fe).Xa)),v[Re]=pt.X[Ve],Ve=!0}Ve||e(se.h==z(se))}if(d.Pb&&se.h&&Ue<j)e(d.m.h),d.a=5,d.m=d.wd,d.$=d.xd,0<d.s.ua&&ue(d.s.vb,d.s.Wa);else{if(se.h)break e;V?.(d,$>G?G:$),d.a=0,d.$=Ue-C}return 1}return d.a=3,0}function $A(d){e(d!=null),d.vc=null,d.yc=null,d.Ya=null;var v=d.Wa;v!=null&&(v.X=null),d.vb=null,e(d!=null)}function ai(){var d=new ct;return d==null?null:(d.a=0,d.xb=VF,Pt("Predictor","VP8LPredictors"),Pt("Predictor","VP8LPredictors_C"),Pt("PredictorAdd","VP8LPredictorsAdd"),Pt("PredictorAdd","VP8LPredictorsAdd_C"),hl=Ke,no=At,Pc=_t,Mc=at,dl=Bt,io=bt,ao=Tt,I.VP8LMapColor32b=Yr,I.VP8LMapColor8b=Ui,d)}function En(d,v,C,U,j){var G=1,V=[d],$=[v],X=U.m,se=U.s,ge=null,Ue=0;e:for(;;){if(C)for(;G&&T(X,1);){var oe=V,me=$,Ee=U,Oe=1,Fe=Ee.m,Pe=Ee.gc[Ee.ab],Me=T(Fe,2);if(Ee.Oc&1<<Me)G=0;else{switch(Ee.Oc|=1<<Me,Pe.hc=Me,Pe.Ea=oe[0],Pe.nc=me[0],Pe.K=[null],++Ee.ab,e(4>=Ee.ab),Me){case 0:case 1:Pe.b=T(Fe,3)+2,Oe=En(ne(Pe.Ea,Pe.b),ne(Pe.nc,Pe.b),0,Ee,Pe.K),Pe.K=Pe.K[0];break;case 3:var Ve,Re=T(Fe,8)+1,pt=16<Re?0:4<Re?1:2<Re?2:3;if(oe[0]=ne(Pe.Ea,pt),Pe.b=pt,Ve=Oe=En(Re,1,0,Ee,Pe.K)){var nt,Nt=Re,ut=Pe,Ht=1<<(8>>ut.b),iA=i(Ht);if(iA==null)Ve=0;else{var Ot=ut.K[0],ft=ut.w;for(iA[0]=ut.K[0][0],nt=1;nt<1*Nt;++nt)iA[nt]=xe(Ot[ft+nt],iA[nt-1]);for(;nt<4*Ht;++nt)iA[nt]=0;ut.K[0]=null,ut.K[0]=iA,Ve=1}}Oe=Ve;break;case 2:break;default:e(0)}G=Oe}}if(V=V[0],$=$[0],G&&T(X,1)&&!(G=1<=(Ue=T(X,4))&&11>=Ue)){U.a=3;break e}var Ye;if(Ye=G)t:{var Dr,Lt,Vt,gr=U,xA=V,en=$,Ur=Ue,jA=C,tn=gr.m,aA=gr.s,Wt=[null],er=1,_r=0,tr=pK[Ur];r:for(;;){if(jA&&T(tn,1)){var EA=T(tn,3)+2,ci=ne(xA,EA),Hr=ne(en,EA),hn=ci*Hr;if(!En(ci,Hr,0,gr,Wt))break r;for(Wt=Wt[0],aA.xc=EA,Dr=0;Dr<hn;++Dr){var ar=Wt[Dr]>>8&65535;Wt[Dr]=ar,ar>=er&&(er=ar+1)}}if(tn.h)break r;for(Lt=0;5>Lt;++Lt){var sA=zF[Lt];!Lt&&0<Ur&&(sA+=1<<Ur),_r<sA&&(_r=sA)}var In=s(er*tr,M),rn=er,Un=s(rn,Y);if(Un==null)var _n=null;else e(65536>=rn),_n=Un;var dn=i(_r);if(_n==null||dn==null||In==null){gr.a=1;break r}var Qn=In;for(Dr=Vt=0;Dr<er;++Dr){var fr=_n[Dr],kn=fr.G,ui=fr.H,so=0,sa=1,SA=0;for(Lt=0;5>Lt;++Lt){sA=zF[Lt],kn[Lt]=Qn,ui[Lt]=Vt,!Lt&&0<Ur&&(sA+=1<<Ur);n:{var Qh,$v=sA,kh=gr,Kc=dn,OK=Qn,PK=Vt,Yv=0,rs=kh.m,MK=T(rs,1);if(n(Kc,0,0,$v),MK){var DK=T(rs,1)+1,HK=T(rs,1),eI=T(rs,HK==0?1:8);Kc[eI]=1,DK==2&&(Kc[eI=T(rs,8)]=1);var Lh=1}else{var tI=i(19),rI=T(rs,4)+4;if(19<rI){kh.a=3;var Th=0;break n}for(Qh=0;Qh<rI;++Qh)tI[hK[Qh]]=T(rs,3);var Xv=void 0,zc=void 0,AI=kh,RK=tI,Nh=$v,nI=Kc,Jv=0,As=AI.m,iI=8,aI=s(128,M);A:for(;F(aI,0,7,RK,19);){if(T(As,1)){var jK=2+2*T(As,3);if((Xv=2+T(As,jK))>Nh)break A}else Xv=Nh;for(zc=0;zc<Nh&&Xv--;){fe(As);var sI=aI[0+(127&P(As))];ie(As,As.u+sI.g);var vl=sI.value;if(16>vl)nI[zc++]=vl,vl!=0&&(iI=vl);else{var KK=vl==16,oI=vl-16,zK=uK[oI],lI=T(As,cK[oI])+zK;if(zc+lI>Nh)break A;for(var GK=KK?iI:0;0<lI--;)nI[zc++]=GK}}Jv=1;break A}Jv||(AI.a=3),Lh=Jv}(Lh=Lh&&!rs.h)&&(Yv=F(OK,PK,8,Kc,$v)),Lh&&Yv!=0?Th=Yv:(kh.a=3,Th=0)}if(Th==0)break r;if(sa&&fK[Lt]==1&&(sa=Qn[Vt].g==0),so+=Qn[Vt].g,Vt+=Th,3>=Lt){var Gc,Zv=dn[0];for(Gc=1;Gc<sA;++Gc)dn[Gc]>Zv&&(Zv=dn[Gc]);SA+=Zv}}if(fr.nd=sa,fr.Qb=0,sa&&(fr.qb=(kn[3][ui[3]+0].value<<24|kn[1][ui[1]+0].value<<16|kn[2][ui[2]+0].value)>>>0,so==0&&256>kn[0][ui[0]+0].value&&(fr.Qb=1,fr.qb+=kn[0][ui[0]+0].value<<8)),fr.jc=!fr.Qb&&6>SA,fr.jc){var Oh,oa=fr;for(Oh=0;Oh<ul;++Oh){var ns=Oh,is=oa.pd[ns],Ph=oa.G[0][oa.H[0]+ns];256<=Ph.value?(is.g=Ph.g+256,is.value=Ph.value):(is.g=0,is.value=0,ns>>=Ir(Ph,8,is),ns>>=Ir(oa.G[1][oa.H[1]+ns],16,is),ns>>=Ir(oa.G[2][oa.H[2]+ns],0,is),Ir(oa.G[3][oa.H[3]+ns],24,is))}}}aA.vc=Wt,aA.Wb=er,aA.Ya=_n,aA.yc=In,Ye=1;break t}Ye=0}if(!(G=Ye)){U.a=3;break e}if(0<Ue){if(se.ua=1<<Ue,!N(se.Wa,Ue)){U.a=1,G=0;break e}}else se.ua=0;var em=U,cI=V,VK=$,tm=em.s,rm=tm.xc;if(em.c=cI,em.i=VK,tm.md=ne(cI,rm),tm.wc=rm==0?-1:(1<<rm)-1,C){U.xb=CK;break e}if((ge=i(V*$))==null){U.a=1,G=0;break e}G=(G=xn(U,ge,0,V,$,$,null))&&!X.h;break e}return G?(j!=null?j[0]=ge:(e(ge==null),e(C)),U.$=0,C||$A(se)):$A(se),G}function Si(d,v){var C=d.c*d.i,U=C+v+16*v;return e(d.c<=v),d.V=i(U),d.V==null?(d.Ta=null,d.Ua=0,d.a=1,0):(d.Ta=d.V,d.Ua=d.Ba+C+v,1)}function Ra(d,v){var C=d.C,U=v-C,j=d.V,G=d.Ba+d.c*C;for(e(v<=d.l.o);0<U;){var V=16<U?16:U,$=d.l.ma,X=d.l.width,se=X*V,ge=$.ca,Ue=$.tb+X*C,oe=d.Ta,me=d.Ua;bn(d,V,j,G),OF(oe,me,ge,Ue,se),zt($,C,C+V,ge,Ue,X),U-=V,j+=V*d.c,C+=V}e(C==v),d.C=d.Ma=v}function ja(){this.ub=this.yd=this.td=this.Rb=0}function Ka(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function Fc(){this.Fb=this.Bb=this.Cb=0,this.Zb=i(4),this.Lb=i(4)}function cn(){this.Yb=(function(){var d=[];return(function v(C,U,j){for(var G=j[U],V=0;V<G&&(C.push(j.length>U+1?[]:0),!(j.length<U+1));V++)v(C[V],U+1,j)})(d,0,[3,11]),d})()}function qi(){this.jb=i(3),this.Wc=a([4,8],cn),this.Xc=a([4,17],cn)}function Hn(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new i(4),this.od=new i(4)}function un(){this.ld=this.La=this.dd=this.tc=0}function Wi(){this.Na=this.la=0}function rl(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function za(){this.ad=i(384),this.Za=0,this.Ob=i(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function zs(){this.uc=this.M=this.Nb=0,this.wa=Array(new un),this.Y=0,this.ya=Array(new za),this.aa=0,this.l=new Sn}function $i(){this.y=i(16),this.f=i(8),this.ea=i(8)}function Ga(){this.cb=this.a=0,this.sc="",this.m=new S,this.Od=new ja,this.Kc=new Ka,this.ed=new Hn,this.Qa=new Fc,this.Ic=this.$c=this.Aa=0,this.D=new zs,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=s(8,S),this.ia=0,this.pb=s(4,rl),this.Pa=new qi,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new $i),this.Hd=0,this.rb=Array(new Wi),this.sb=0,this.wa=Array(new un),this.Y=0,this.oc=[],this.pc=0,this.sa=[],this.ta=0,this.qa=[],this.ra=0,this.Ha=[],this.B=this.R=this.Ia=0,this.Ec=[],this.M=this.ja=this.Vb=this.Fc=0,this.ya=Array(new za),this.L=this.aa=0,this.gd=a([4,2],un),this.ga=null,this.Fa=[],this.Cc=this.qc=this.P=0,this.Gb=[],this.Uc=0,this.mb=[],this.nb=0,this.rc=[],this.Ga=this.Vc=0}function YA(d,v){return 0>d?0:d>v?v:d}function Sn(){this.T=this.U=this.ka=this.height=this.width=0,this.y=[],this.f=[],this.ea=[],this.Rc=this.fa=this.W=this.N=this.O=0,this.ma="void",this.put="VP8IoPutHook",this.ac="VP8IoSetupHook",this.bc="VP8IoTeardownHook",this.ha=this.Kb=0,this.data=[],this.hb=this.ib=this.da=this.o=this.j=this.va=this.v=this.Da=this.ob=this.w=0,this.F=[],this.J=0}function Yi(){var d=new Ga;return d!=null&&(d.a=0,d.sc="OK",d.cb=0,d.Xb=0,Rc||(Rc=Xi)),d}function Yt(d,v,C){return d.a==0&&(d.a=v,d.sc=C,d.cb=0),0}function Al(d,v,C){return 3<=C&&d[v+0]==157&&d[v+1]==1&&d[v+2]==42}function Rn(d,v){if(d==null)return 0;if(d.a=0,d.sc="OK",v==null)return Yt(d,2,"null VP8Io passed to VP8GetHeaders()");var C=v.data,U=v.w,j=v.ha;if(4>j)return Yt(d,7,"Truncated header.");var G=C[U+0]|C[U+1]<<8|C[U+2]<<16,V=d.Od;if(V.Rb=!(1&G),V.td=G>>1&7,V.yd=G>>4&1,V.ub=G>>5,3<V.td)return Yt(d,3,"Incorrect keyframe parameters.");if(!V.yd)return Yt(d,4,"Frame not displayable.");U+=3,j-=3;var $=d.Kc;if(V.Rb){if(7>j)return Yt(d,7,"cannot parse picture header");if(!Al(C,U,j))return Yt(d,3,"Bad code word");$.c=16383&(C[U+4]<<8|C[U+3]),$.Td=C[U+4]>>6,$.i=16383&(C[U+6]<<8|C[U+5]),$.Ud=C[U+6]>>6,U+=7,j-=7,d.za=$.c+15>>4,d.Ub=$.i+15>>4,v.width=$.c,v.height=$.i,v.Da=0,v.j=0,v.v=0,v.va=v.width,v.o=v.height,v.da=0,v.ib=v.width,v.hb=v.height,v.U=v.width,v.T=v.height,n((G=d.Pa).jb,0,255,G.jb.length),e((G=d.Qa)!=null),G.Cb=0,G.Bb=0,G.Fb=1,n(G.Zb,0,0,G.Zb.length),n(G.Lb,0,0,G.Lb)}if(V.ub>j)return Yt(d,7,"bad partition length");ce(G=d.m,C,U,V.ub),U+=V.ub,j-=V.ub,V.Rb&&($.Ld=pe(G),$.Kd=pe(G)),$=d.Qa;var X,se=d.Pa;if(e(G!=null),e($!=null),$.Cb=pe(G),$.Cb){if($.Bb=pe(G),pe(G)){for($.Fb=pe(G),X=0;4>X;++X)$.Zb[X]=pe(G)?le(G,7):0;for(X=0;4>X;++X)$.Lb[X]=pe(G)?le(G,6):0}if($.Bb)for(X=0;3>X;++X)se.jb[X]=pe(G)?ee(G,8):255}else $.Bb=0;if(G.Ka)return Yt(d,3,"cannot parse segment header");if(($=d.ed).zd=pe(G),$.Tb=ee(G,6),$.wb=ee(G,3),$.Pc=pe(G),$.Pc&&pe(G)){for(se=0;4>se;++se)pe(G)&&($.vd[se]=le(G,6));for(se=0;4>se;++se)pe(G)&&($.od[se]=le(G,6))}if(d.L=$.Tb==0?0:$.zd?1:2,G.Ka)return Yt(d,3,"cannot parse filter header");var ge=j;if(j=X=U,U=X+ge,$=ge,d.Xb=(1<<ee(d.m,2))-1,ge<3*(se=d.Xb))C=7;else{for(X+=3*se,$-=3*se,ge=0;ge<se;++ge){var Ue=C[j+0]|C[j+1]<<8|C[j+2]<<16;Ue>$&&(Ue=$),ce(d.Jc[+ge],C,X,Ue),X+=Ue,$-=Ue,j+=3}ce(d.Jc[+se],C,X,$),C=X<U?0:5}if(C!=0)return Yt(d,C,"cannot parse partitions");for(C=ee(X=d.m,7),j=pe(X)?le(X,4):0,U=pe(X)?le(X,4):0,$=pe(X)?le(X,4):0,se=pe(X)?le(X,4):0,X=pe(X)?le(X,4):0,ge=d.Qa,Ue=0;4>Ue;++Ue){if(ge.Cb){var oe=ge.Zb[Ue];ge.Fb||(oe+=C)}else{if(0<Ue){d.pb[Ue]=d.pb[0];continue}oe=C}var me=d.pb[Ue];me.Sc[0]=Vv[YA(oe+j,127)],me.Sc[1]=qv[YA(oe+0,127)],me.Eb[0]=2*Vv[YA(oe+U,127)],me.Eb[1]=101581*qv[YA(oe+$,127)]>>16,8>me.Eb[1]&&(me.Eb[1]=8),me.Qc[0]=Vv[YA(oe+se,117)],me.Qc[1]=qv[YA(oe+X,127)],me.lc=oe+X}if(!V.Rb)return Yt(d,4,"Not a key frame.");for(pe(G),V=d.Pa,C=0;4>C;++C){for(j=0;8>j;++j)for(U=0;3>U;++U)for($=0;11>$;++$)se=we(G,BK[C][j][U][$])?ee(G,8):wK[C][j][U][$],V.Wc[C][j].Yb[U][$]=se;for(j=0;17>j;++j)V.Xc[C][j]=V.Wc[C][bK[j]]}return d.kc=pe(G),d.kc&&(d.Bd=ee(G,8)),d.cb=1}function Xi(d,v,C,U,j,G,V){var $=v[j].Yb[C];for(C=0;16>j;++j){if(!we(d,$[C+0]))return j;for(;!we(d,$[C+1]);)if($=v[++j].Yb[0],C=0,j==16)return 16;var X=v[j+1].Yb;if(we(d,$[C+2])){var se=d,ge=0;if(we(se,(oe=$)[(Ue=C)+3]))if(we(se,oe[Ue+6])){for($=0,Ue=2*(ge=we(se,oe[Ue+8]))+(oe=we(se,oe[Ue+9+ge])),ge=0,oe=vK[Ue];oe[$];++$)ge+=ge+we(se,oe[$]);ge+=3+(8<<Ue)}else we(se,oe[Ue+7])?(ge=7+2*we(se,165),ge+=we(se,145)):ge=5+we(se,159);else ge=we(se,oe[Ue+4])?3+we(se,oe[Ue+5]):2;$=X[2]}else ge=1,$=X[1];X=V+mK[j],0>(se=d).b&&Z(se);var Ue,oe=se.b,me=(Ue=se.Ca>>1)-(se.I>>oe)>>31;--se.b,se.Ca+=me,se.Ca|=1,se.I-=(Ue+1&me)<<oe,G[X]=((ge^me)-me)*U[(0<j)+0]}return 16}function Va(d){var v=d.rb[d.sb-1];v.la=0,v.Na=0,n(d.zc,0,0,d.zc.length),d.ja=0}function XA(d,v,C,U,j){j=d[v+C+32*U]+(j>>3),d[v+C+32*U]=-256&j?0>j?0:255:j}function Ji(d,v,C,U,j,G){XA(d,v,0,C,U+j),XA(d,v,1,C,U+G),XA(d,v,2,C,U-G),XA(d,v,3,C,U-j)}function si(d){return(20091*d>>16)+d}function tA(d,v,C,U){var j,G=0,V=i(16);for(j=0;4>j;++j){var $=d[v+0]+d[v+8],X=d[v+0]-d[v+8],se=(35468*d[v+4]>>16)-si(d[v+12]),ge=si(d[v+4])+(35468*d[v+12]>>16);V[G+0]=$+ge,V[G+1]=X+se,V[G+2]=X-se,V[G+3]=$-ge,G+=4,v++}for(j=G=0;4>j;++j)$=(d=V[G+0]+4)+V[G+8],X=d-V[G+8],se=(35468*V[G+4]>>16)-si(V[G+12]),XA(C,U,0,0,$+(ge=si(V[G+4])+(35468*V[G+12]>>16))),XA(C,U,1,0,X+se),XA(C,U,2,0,X-se),XA(C,U,3,0,$-ge),G++,U+=32}function Gs(d,v,C,U){var j=d[v+0]+4,G=35468*d[v+4]>>16,V=si(d[v+4]),$=35468*d[v+1]>>16;Ji(C,U,0,j+V,d=si(d[v+1]),$),Ji(C,U,1,j+G,d,$),Ji(C,U,2,j-G,d,$),Ji(C,U,3,j-V,d,$)}function qa(d,v,C,U,j){tA(d,v,C,U),j&&tA(d,v+16,C,U+4)}function Vs(d,v,C,U){na(d,v+0,C,U,1),na(d,v+32,C,U+128,1)}function qe(d,v,C,U){var j;for(d=d[v+0]+4,j=0;4>j;++j)for(v=0;4>v;++v)XA(C,U,v,j,d)}function re(d,v,C,U){d[v+0]&&RA(d,v+0,C,U),d[v+16]&&RA(d,v+16,C,U+4),d[v+32]&&RA(d,v+32,C,U+128),d[v+48]&&RA(d,v+48,C,U+128+4)}function Ie(d,v,C,U){var j,G=i(16);for(j=0;4>j;++j){var V=d[v+0+j]+d[v+12+j],$=d[v+4+j]+d[v+8+j],X=d[v+4+j]-d[v+8+j],se=d[v+0+j]-d[v+12+j];G[0+j]=V+$,G[8+j]=V-$,G[4+j]=se+X,G[12+j]=se-X}for(j=0;4>j;++j)V=(d=G[0+4*j]+3)+G[3+4*j],$=G[1+4*j]+G[2+4*j],X=G[1+4*j]-G[2+4*j],se=d-G[3+4*j],C[U+0]=V+$>>3,C[U+16]=se+X>>3,C[U+32]=V-$>>3,C[U+48]=se-X>>3,U+=64}function He(d,v,C){var U,j=v-32,G=Fn,V=255-d[j-1];for(U=0;U<C;++U){var $,X=G,se=V+d[v-1];for($=0;$<C;++$)d[v+$]=X[se+d[j+$]];v+=32}}function et(d,v){He(d,v,4)}function vt(d,v){He(d,v,8)}function xt(d,v){He(d,v,16)}function lr(d,v){var C;for(C=0;16>C;++C)A(d,v+32*C,d,v-32,16)}function Vr(d,v){var C;for(C=16;0<C;--C)n(d,v,d[v-1],16),v+=32}function qr(d,v,C){var U;for(U=0;16>U;++U)n(v,C+32*U,d,16)}function rA(d,v){var C,U=16;for(C=0;16>C;++C)U+=d[v-1+32*C]+d[v+C-32];qr(U>>5,d,v)}function Wr(d,v){var C,U=8;for(C=0;16>C;++C)U+=d[v-1+32*C];qr(U>>4,d,v)}function AA(d,v){var C,U=8;for(C=0;16>C;++C)U+=d[v+C-32];qr(U>>4,d,v)}function qs(d,v){qr(128,d,v)}function Ft(d,v,C){return d+2*v+C+2>>2}function Qv(d,v){var C,U=v-32;for(U=new Uint8Array([Ft(d[U-1],d[U+0],d[U+1]),Ft(d[U+0],d[U+1],d[U+2]),Ft(d[U+1],d[U+2],d[U+3]),Ft(d[U+2],d[U+3],d[U+4])]),C=0;4>C;++C)A(d,v+32*C,U,0,U.length)}function kv(d,v){var C=d[v-1],U=d[v-1+32],j=d[v-1+64],G=d[v-1+96];be(d,v+0,16843009*Ft(d[v-1-32],C,U)),be(d,v+32,16843009*Ft(C,U,j)),be(d,v+64,16843009*Ft(U,j,G)),be(d,v+96,16843009*Ft(j,G,G))}function Lv(d,v){var C,U=4;for(C=0;4>C;++C)U+=d[v+C-32]+d[v-1+32*C];for(U>>=3,C=0;4>C;++C)n(d,v+32*C,U,4)}function Tv(d,v){var C=d[v-1+0],U=d[v-1+32],j=d[v-1+64],G=d[v-1-32],V=d[v+0-32],$=d[v+1-32],X=d[v+2-32],se=d[v+3-32];d[v+0+96]=Ft(U,j,d[v-1+96]),d[v+1+96]=d[v+0+64]=Ft(C,U,j),d[v+2+96]=d[v+1+64]=d[v+0+32]=Ft(G,C,U),d[v+3+96]=d[v+2+64]=d[v+1+32]=d[v+0+0]=Ft(V,G,C),d[v+3+64]=d[v+2+32]=d[v+1+0]=Ft($,V,G),d[v+3+32]=d[v+2+0]=Ft(X,$,V),d[v+3+0]=Ft(se,X,$)}function Nv(d,v){var C=d[v+1-32],U=d[v+2-32],j=d[v+3-32],G=d[v+4-32],V=d[v+5-32],$=d[v+6-32],X=d[v+7-32];d[v+0+0]=Ft(d[v+0-32],C,U),d[v+1+0]=d[v+0+32]=Ft(C,U,j),d[v+2+0]=d[v+1+32]=d[v+0+64]=Ft(U,j,G),d[v+3+0]=d[v+2+32]=d[v+1+64]=d[v+0+96]=Ft(j,G,V),d[v+3+32]=d[v+2+64]=d[v+1+96]=Ft(G,V,$),d[v+3+64]=d[v+2+96]=Ft(V,$,X),d[v+3+96]=Ft($,X,X)}function Zi(d,v){var C=d[v-1+0],U=d[v-1+32],j=d[v-1+64],G=d[v-1-32],V=d[v+0-32],$=d[v+1-32],X=d[v+2-32],se=d[v+3-32];d[v+0+0]=d[v+1+64]=G+V+1>>1,d[v+1+0]=d[v+2+64]=V+$+1>>1,d[v+2+0]=d[v+3+64]=$+X+1>>1,d[v+3+0]=X+se+1>>1,d[v+0+96]=Ft(j,U,C),d[v+0+64]=Ft(U,C,G),d[v+0+32]=d[v+1+96]=Ft(C,G,V),d[v+1+32]=d[v+2+96]=Ft(G,V,$),d[v+2+32]=d[v+3+96]=Ft(V,$,X),d[v+3+32]=Ft($,X,se)}function ea(d,v){var C=d[v+0-32],U=d[v+1-32],j=d[v+2-32],G=d[v+3-32],V=d[v+4-32],$=d[v+5-32],X=d[v+6-32],se=d[v+7-32];d[v+0+0]=C+U+1>>1,d[v+1+0]=d[v+0+64]=U+j+1>>1,d[v+2+0]=d[v+1+64]=j+G+1>>1,d[v+3+0]=d[v+2+64]=G+V+1>>1,d[v+0+32]=Ft(C,U,j),d[v+1+32]=d[v+0+96]=Ft(U,j,G),d[v+2+32]=d[v+1+96]=Ft(j,G,V),d[v+3+32]=d[v+2+96]=Ft(G,V,$),d[v+3+64]=Ft(V,$,X),d[v+3+96]=Ft($,X,se)}function Ov(d,v){var C=d[v-1+0],U=d[v-1+32],j=d[v-1+64],G=d[v-1+96];d[v+0+0]=C+U+1>>1,d[v+2+0]=d[v+0+32]=U+j+1>>1,d[v+2+32]=d[v+0+64]=j+G+1>>1,d[v+1+0]=Ft(C,U,j),d[v+3+0]=d[v+1+32]=Ft(U,j,G),d[v+3+32]=d[v+1+64]=Ft(j,G,G),d[v+3+64]=d[v+2+64]=d[v+0+96]=d[v+1+96]=d[v+2+96]=d[v+3+96]=G}function Pv(d,v){var C=d[v-1+0],U=d[v-1+32],j=d[v-1+64],G=d[v-1+96],V=d[v-1-32],$=d[v+0-32],X=d[v+1-32],se=d[v+2-32];d[v+0+0]=d[v+2+32]=C+V+1>>1,d[v+0+32]=d[v+2+64]=U+C+1>>1,d[v+0+64]=d[v+2+96]=j+U+1>>1,d[v+0+96]=G+j+1>>1,d[v+3+0]=Ft($,X,se),d[v+2+0]=Ft(V,$,X),d[v+1+0]=d[v+3+32]=Ft(C,V,$),d[v+1+32]=d[v+3+64]=Ft(U,C,V),d[v+1+64]=d[v+3+96]=Ft(j,U,C),d[v+1+96]=Ft(G,j,U)}function nl(d,v){var C;for(C=0;8>C;++C)A(d,v+32*C,d,v-32,8)}function Ic(d,v){var C;for(C=0;8>C;++C)n(d,v,d[v-1],8),v+=32}function Fi(d,v,C){var U;for(U=0;8>U;++U)n(v,C+32*U,d,8)}function Mv(d,v){var C,U=8;for(C=0;8>C;++C)U+=d[v+C-32]+d[v-1+32*C];Fi(U>>4,d,v)}function il(d,v){var C,U=4;for(C=0;8>C;++C)U+=d[v+C-32];Fi(U>>3,d,v)}function Dv(d,v){var C,U=4;for(C=0;8>C;++C)U+=d[v-1+32*C];Fi(U>>3,d,v)}function Uc(d,v){Fi(128,d,v)}function Wa(d,v,C){var U=d[v-C],j=d[v+0],G=3*(j-U)+Rv[1020+d[v-2*C]-d[v+C]],V=bh[112+(G+4>>3)];d[v-C]=Fn[255+U+bh[112+(G+3>>3)]],d[v+0]=Fn[255+j-V]}function _c(d,v,C,U){var j=d[v+0],G=d[v+C];return Kn[255+d[v-2*C]-d[v-C]]>U||Kn[255+G-j]>U}function Ws(d,v,C,U){return 4*Kn[255+d[v-C]-d[v+0]]+Kn[255+d[v-2*C]-d[v+C]]<=U}function Qc(d,v,C,U,j){var G=d[v-3*C],V=d[v-2*C],$=d[v-C],X=d[v+0],se=d[v+C],ge=d[v+2*C],Ue=d[v+3*C];return 4*Kn[255+$-X]+Kn[255+V-se]>U?0:Kn[255+d[v-4*C]-G]<=j&&Kn[255+G-V]<=j&&Kn[255+V-$]<=j&&Kn[255+Ue-ge]<=j&&Kn[255+ge-se]<=j&&Kn[255+se-X]<=j}function al(d,v,C,U){var j=2*U+1;for(U=0;16>U;++U)Ws(d,v+U,C,j)&&Wa(d,v+U,C)}function kc(d,v,C,U){var j=2*U+1;for(U=0;16>U;++U)Ws(d,v+U*C,1,j)&&Wa(d,v+U*C,1)}function sl(d,v,C,U){var j;for(j=3;0<j;--j)al(d,v+=4*C,C,U)}function dh(d,v,C,U){var j;for(j=3;0<j;--j)kc(d,v+=4,C,U)}function ta(d,v,C,U,j,G,V,$){for(G=2*G+1;0<j--;){if(Qc(d,v,C,G,V))if(_c(d,v,C,$))Wa(d,v,C);else{var X=d,se=v,ge=C,Ue=X[se-2*ge],oe=X[se-ge],me=X[se+0],Ee=X[se+ge],Oe=X[se+2*ge],Fe=27*(Me=Rv[1020+3*(me-oe)+Rv[1020+Ue-Ee]])+63>>7,Pe=18*Me+63>>7,Me=9*Me+63>>7;X[se-3*ge]=Fn[255+X[se-3*ge]+Me],X[se-2*ge]=Fn[255+Ue+Pe],X[se-ge]=Fn[255+oe+Fe],X[se+0]=Fn[255+me-Fe],X[se+ge]=Fn[255+Ee-Pe],X[se+2*ge]=Fn[255+Oe-Me]}v+=U}}function ra(d,v,C,U,j,G,V,$){for(G=2*G+1;0<j--;){if(Qc(d,v,C,G,V))if(_c(d,v,C,$))Wa(d,v,C);else{var X=d,se=v,ge=C,Ue=X[se-ge],oe=X[se+0],me=X[se+ge],Ee=bh[112+(4+(Oe=3*(oe-Ue))>>3)],Oe=bh[112+(Oe+3>>3)],Fe=Ee+1>>1;X[se-2*ge]=Fn[255+X[se-2*ge]+Fe],X[se-ge]=Fn[255+Ue+Oe],X[se+0]=Fn[255+oe-Ee],X[se+ge]=Fn[255+me-Fe]}v+=U}}function ph(d,v,C,U,j,G){ta(d,v,C,1,16,U,j,G)}function gh(d,v,C,U,j,G){ta(d,v,1,C,16,U,j,G)}function vh(d,v,C,U,j,G){var V;for(V=3;0<V;--V)ra(d,v+=4*C,C,1,16,U,j,G)}function $s(d,v,C,U,j,G){var V;for(V=3;0<V;--V)ra(d,v+=4,1,C,16,U,j,G)}function mh(d,v,C,U,j,G,V,$){ta(d,v,j,1,8,G,V,$),ta(C,U,j,1,8,G,V,$)}function y(d,v,C,U,j,G,V,$){ta(d,v,1,j,8,G,V,$),ta(C,U,1,j,8,G,V,$)}function D(d,v,C,U,j,G,V,$){ra(d,v+4*j,j,1,8,G,V,$),ra(C,U+4*j,j,1,8,G,V,$)}function ae(d,v,C,U,j,G,V,$){ra(d,v+4,1,j,8,G,V,$),ra(C,U+4,1,j,8,G,V,$)}function de(){this.ba=new lt,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new qt,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function Be(){this.data=[],this.offset=this.kd=this.ha=this.w=0,this.na=[],this.xa=this.gb=this.Ja=this.Sa=this.P=0}function Ne(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function De(){this.ua=0,this.Wa=new J,this.vb=new J,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new Y,this.yc=new M}function ct(){this.xb=this.a=0,this.l=new Sn,this.ca=new lt,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new O,this.Pb=0,this.wd=new O,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new De,this.ab=0,this.gc=s(4,Ne),this.Oc=0}function ot(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new Sn,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function It(d,v,C,U,j,G,V){for(d=d==null?0:d[v+0],v=0;v<V;++v)j[G+v]=d+C[U+v]&255,d=j[G+v]}function kt(d,v,C,U,j,G,V){var $;if(d==null)It(null,null,C,U,j,G,V);else for($=0;$<V;++$)j[G+$]=d[v+$]+C[U+$]&255}function Gt(d,v,C,U,j,G,V){if(d==null)It(null,null,C,U,j,G,V);else{var $,X=d[v+0],se=X,ge=X;for($=0;$<V;++$)se=ge+(X=d[v+$])-se,ge=C[U+$]+(-256&se?0>se?0:255:se)&255,se=X,j[G+$]=ge}}function $r(d,v,C,U){var j=v.width,G=v.o;if(e(d!=null&&v!=null),0>C||0>=U||C+U>G)return null;if(!d.Cc){if(d.ga==null){var V;if(d.ga=new ot,(V=d.ga==null)||(V=v.width*v.o,e(d.Gb.length==0),d.Gb=i(V),d.Uc=0,d.Gb==null?V=0:(d.mb=d.Gb,d.nb=d.Uc,d.rc=null,V=1),V=!V),!V){V=d.ga;var $=d.Fa,X=d.P,se=d.qc,ge=d.mb,Ue=d.nb,oe=X+1,me=se-1,Ee=V.l;if(e($!=null&&ge!=null&&v!=null),ts[0]=null,ts[1]=It,ts[2]=kt,ts[3]=Gt,V.ca=ge,V.tb=Ue,V.c=v.width,V.i=v.height,e(0<V.c&&0<V.i),1>=se)v=0;else if(V.$a=3&$[X+0],V.Z=$[X+0]>>2&3,V.Lc=$[X+0]>>4&3,X=$[X+0]>>6&3,0>V.$a||1<V.$a||4<=V.Z||1<V.Lc||X)v=0;else if(Ee.put=yt,Ee.ac=CA,Ee.bc=Bn,Ee.ma=V,Ee.width=v.width,Ee.height=v.height,Ee.Da=v.Da,Ee.v=v.v,Ee.va=v.va,Ee.j=v.j,Ee.o=v.o,V.$a)e:{e(V.$a==1),v=ai();t:for(;;){if(v==null){v=0;break e}if(e(V!=null),V.mc=v,v.c=V.c,v.i=V.i,v.l=V.l,v.l.ma=V,v.l.width=V.c,v.l.height=V.i,v.a=0,Ae(v.m,$,oe,me),!En(V.c,V.i,1,v,null)||(v.ab==1&&v.gc[0].hc==3&&Cn(v.s)?(V.ic=1,$=v.c*v.i,v.Ta=null,v.Ua=0,v.V=i($),v.Ba=0,v.V==null?(v.a=1,v=0):v=1):(V.ic=0,v=Si(v,V.c)),!v))break t;v=1;break e}V.mc=null,v=0}else v=me>=V.c*V.i;V=!v}if(V)return null;d.ga.Lc!=1?d.Ga=0:U=G-C}e(d.ga!=null),e(C+U<=G);e:{if(v=($=d.ga).c,G=$.l.o,$.$a==0){if(oe=d.rc,me=d.Vc,Ee=d.Fa,X=d.P+1+C*v,se=d.mb,ge=d.nb+C*v,e(X<=d.P+d.qc),$.Z!=0)for(e(ts[$.Z]!=null),V=0;V<U;++V)ts[$.Z](oe,me,Ee,X,se,ge,v),oe=se,me=ge,ge+=v,X+=v;else for(V=0;V<U;++V)A(se,ge,Ee,X,v),oe=se,me=ge,ge+=v,X+=v;d.rc=oe,d.Vc=me}else{if(e($.mc!=null),v=C+U,e((V=$.mc)!=null),e(v<=V.i),V.C>=v)v=1;else if($.ic||Cr(),$.ic){$=V.V,oe=V.Ba,me=V.c;var Oe=V.i,Fe=(Ee=1,X=V.$/me,se=V.$%me,ge=V.m,Ue=V.s,V.$),Pe=me*Oe,Me=me*v,Ve=Ue.wc,Re=Fe<Me?eA(Ue,se,X):null;e(Fe<=Pe),e(v<=Oe),e(Cn(Ue));t:for(;;){for(;!ge.h&&Fe<Me;){if(se&Ve||(Re=eA(Ue,se,X)),e(Re!=null),fe(ge),256>(Oe=dr(Re.G[0],Re.H[0],ge)))$[oe+Fe]=Oe,++Fe,++se>=me&&(se=0,++X<=v&&!(X%16)&&pA(V,X));else{if(!(280>Oe)){Ee=0;break t}Oe=WA(Oe-256,ge);var pt,nt=dr(Re.G[4],Re.H[4],ge);if(fe(ge),!(Fe>=(nt=MA(me,nt=WA(nt,ge)))&&Pe-Fe>=Oe)){Ee=0;break t}for(pt=0;pt<Oe;++pt)$[oe+Fe+pt]=$[oe+Fe+pt-nt];for(Fe+=Oe,se+=Oe;se>=me;)se-=me,++X<=v&&!(X%16)&&pA(V,X);Fe<Me&&se&Ve&&(Re=eA(Ue,se,X))}e(ge.h==z(ge))}pA(V,X>v?v:X);break t}!Ee||ge.h&&Fe<Pe?(Ee=0,V.a=ge.h?5:3):V.$=Fe,v=Ee}else v=xn(V,V.V,V.Ba,V.c,V.i,v,Ra);if(!v){U=0;break e}}C+U>=G&&(d.Cc=1),U=1}if(!U)return null;if(d.Cc&&((U=d.ga)!=null&&(U.mc=null),d.ga=null,0<d.Ga))return alert("todo:WebPDequantizeLevels"),null}return d.nb+C*j}function ir(d,v,C,U,j,G){for(;0<j--;){var V,$=d,X=v+(C?1:0),se=d,ge=v+(C?0:3);for(V=0;V<U;++V){var Ue=se[ge+4*V];Ue!=255&&(Ue*=32897,$[X+4*V+0]=$[X+4*V+0]*Ue>>23,$[X+4*V+1]=$[X+4*V+1]*Ue>>23,$[X+4*V+2]=$[X+4*V+2]*Ue>>23)}v+=G}}function Ar(d,v,C,U,j){for(;0<U--;){var G;for(G=0;G<C;++G){var V=d[v+2*G+0],$=15&(se=d[v+2*G+1]),X=4369*$,se=(240&se|se>>4)*X>>16;d[v+2*G+0]=(240&V|V>>4)*X>>16&240|(15&V|V<<4)*X>>16>>4&15,d[v+2*G+1]=240&se|$}v+=j}}function pr(d,v,C,U,j,G,V,$){var X,se,ge=255;for(se=0;se<j;++se){for(X=0;X<U;++X){var Ue=d[v+X];G[V+4*X]=Ue,ge&=Ue}v+=C,V+=$}return ge!=255}function br(d,v,C,U,j){var G;for(G=0;G<j;++G)C[U+G]=d[v+G]>>8}function Cr(){Hc=ir,TF=Ar,NF=pr,OF=br}function DA(d,v,C){I[d]=function(U,j,G,V,$,X,se,ge,Ue,oe,me,Ee,Oe,Fe,Pe,Me,Ve){var Re,pt=Ve-1>>1,nt=$[X+0]|se[ge+0]<<16,Nt=Ue[oe+0]|me[Ee+0]<<16;e(U!=null);var ut=3*nt+Nt+131074>>2;for(v(U[j+0],255&ut,ut>>16,Oe,Fe),G!=null&&(ut=3*Nt+nt+131074>>2,v(G[V+0],255&ut,ut>>16,Pe,Me)),Re=1;Re<=pt;++Re){var Ht=$[X+Re]|se[ge+Re]<<16,iA=Ue[oe+Re]|me[Ee+Re]<<16,Ot=nt+Ht+Nt+iA+524296,ft=Ot+2*(Ht+Nt)>>3;ut=ft+nt>>1,nt=(Ot=Ot+2*(nt+iA)>>3)+Ht>>1,v(U[j+2*Re-1],255&ut,ut>>16,Oe,Fe+(2*Re-1)*C),v(U[j+2*Re-0],255&nt,nt>>16,Oe,Fe+(2*Re-0)*C),G!=null&&(ut=Ot+Nt>>1,nt=ft+iA>>1,v(G[V+2*Re-1],255&ut,ut>>16,Pe,Me+(2*Re-1)*C),v(G[V+2*Re+0],255&nt,nt>>16,Pe,Me+(2*Re+0)*C)),nt=Ht,Nt=iA}1&Ve||(ut=3*nt+Nt+131074>>2,v(U[j+Ve-1],255&ut,ut>>16,Oe,Fe+(Ve-1)*C),G!=null&&(ut=3*Nt+nt+131074>>2,v(G[V+Ve-1],255&ut,ut>>16,Pe,Me+(Ve-1)*C)))}}function Aa(){zn[Ch]=xK,zn[xh]=qF,zn[jF]=EK,zn[Eh]=WF,zn[Sh]=$F,zn[jv]=YF,zn[KF]=SK,zn[Kv]=qF,zn[zv]=WF,zn[Fh]=$F,zn[Gv]=YF}function Lc(d){return d&-16384?0>d?0:255:d>>FK}function Ys(d,v){return Lc((19077*d>>8)+(26149*v>>8)-14234)}function Xs(d,v,C){return Lc((19077*d>>8)-(6419*v>>8)-(13320*C>>8)+8708)}function $a(d,v){return Lc((19077*d>>8)+(33050*v>>8)-17685)}function Js(d,v,C,U,j){U[j+0]=Ys(d,C),U[j+1]=Xs(d,v,C),U[j+2]=$a(d,v)}function ol(d,v,C,U,j){U[j+0]=$a(d,v),U[j+1]=Xs(d,v,C),U[j+2]=Ys(d,C)}function ll(d,v,C,U,j){var G=Xs(d,v,C);v=G<<3&224|$a(d,v)>>3,U[j+0]=248&Ys(d,C)|G>>5,U[j+1]=v}function HA(d,v,C,U,j){var G=240&$a(d,v)|15;U[j+0]=240&Ys(d,C)|Xs(d,v,C)>>4,U[j+1]=G}function Zs(d,v,C,U,j){U[j+0]=255,Js(d,v,C,U,j+1)}function eo(d,v,C,U,j){ol(d,v,C,U,j),U[j+3]=255}function Tc(d,v,C,U,j){Js(d,v,C,U,j),U[j+3]=255}function Ii(d,v,C){I[d]=function(U,j,G,V,$,X,se,ge,Ue){for(var oe=ge+(-2&Ue)*C;ge!=oe;)v(U[j+0],G[V+0],$[X+0],se,ge),v(U[j+1],G[V+0],$[X+0],se,ge+C),j+=2,++V,++X,ge+=2*C;1&Ue&&v(U[j+0],G[V+0],$[X+0],se,ge)}}function JA(d,v,C){return C==0?d==0?v==0?6:5:v==0?4:0:C}function wh(d,v,C,U,j){switch(d>>>30){case 3:na(v,C,U,j,0);break;case 2:Za(v,C,U,j);break;case 1:RA(v,C,U,j)}}function cl(d,v){var C,U,j=v.M,G=v.Nb,V=d.oc,$=d.pc+40,X=d.oc,se=d.pc+584,ge=d.oc,Ue=d.pc+600;for(C=0;16>C;++C)V[$+32*C-1]=129;for(C=0;8>C;++C)X[se+32*C-1]=129,ge[Ue+32*C-1]=129;for(0<j?V[$-1-32]=X[se-1-32]=ge[Ue-1-32]=129:(n(V,$-32-1,127,21),n(X,se-32-1,127,9),n(ge,Ue-32-1,127,9)),U=0;U<d.za;++U){var oe=v.ya[v.aa+U];if(0<U){for(C=-1;16>C;++C)A(V,$+32*C-4,V,$+32*C+12,4);for(C=-1;8>C;++C)A(X,se+32*C-4,X,se+32*C+4,4),A(ge,Ue+32*C-4,ge,Ue+32*C+4,4)}var me=d.Gd,Ee=d.Hd+U,Oe=oe.ad,Fe=oe.Hc;if(0<j&&(A(V,$-32,me[Ee].y,0,16),A(X,se-32,me[Ee].f,0,8),A(ge,Ue-32,me[Ee].ea,0,8)),oe.Za){var Pe=V,Me=$-32+16;for(0<j&&(U>=d.za-1?n(Pe,Me,me[Ee].y[15],4):A(Pe,Me,me[Ee+1].y,0,4)),C=0;4>C;C++)Pe[Me+128+C]=Pe[Me+256+C]=Pe[Me+384+C]=Pe[Me+0+C];for(C=0;16>C;++C,Fe<<=2)Pe=V,Me=$+JF[C],li[oe.Ob[C]](Pe,Me),wh(Fe,Oe,16*+C,Pe,Me)}else if(Pe=JA(U,j,oe.Ob[0]),es[Pe](V,$),Fe!=0)for(C=0;16>C;++C,Fe<<=2)wh(Fe,Oe,16*+C,V,$+JF[C]);for(C=oe.Gc,Pe=JA(U,j,oe.Dd),aa[Pe](X,se),aa[Pe](ge,Ue),Fe=Oe,Pe=X,Me=se,255&(oe=0|C)&&(170&oe?pl(Fe,256,Pe,Me):_i(Fe,256,Pe,Me)),oe=ge,Fe=Ue,255&(C>>=8)&&(170&C?pl(Oe,320,oe,Fe):_i(Oe,320,oe,Fe)),j<d.Ub-1&&(A(me[Ee].y,0,V,$+480,16),A(me[Ee].f,0,X,se+224,8),A(me[Ee].ea,0,ge,Ue+224,8)),C=8*G*d.B,me=d.sa,Ee=d.ta+16*U+16*G*d.R,Oe=d.qa,oe=d.ra+8*U+C,Fe=d.Ha,Pe=d.Ia+8*U+C,C=0;16>C;++C)A(me,Ee+C*d.R,V,$+32*C,16);for(C=0;8>C;++C)A(Oe,oe+C*d.B,X,se+32*C,8),A(Fe,Pe+C*d.B,ge,Ue+32*C,8)}}function yh(d,v,C,U,j,G,V,$,X){var se=[0],ge=[0],Ue=0,oe=X!=null?X.kd:0,me=X??new Be;if(d==null||12>C)return 7;me.data=d,me.w=v,me.ha=C,v=[v],C=[C],me.gb=[me.gb];e:{var Ee=v,Oe=C,Fe=me.gb;if(e(d!=null),e(Oe!=null),e(Fe!=null),Fe[0]=0,12<=Oe[0]&&!r(d,Ee[0],"RIFF")){if(r(d,Ee[0]+8,"WEBP")){Fe=3;break e}var Pe=Q(d,Ee[0]+4);if(12>Pe||4294967286<Pe){Fe=3;break e}if(oe&&Pe>Oe[0]-8){Fe=7;break e}Fe[0]=Pe,Ee[0]+=12,Oe[0]-=12}Fe=0}if(Fe!=0)return Fe;for(Pe=0<me.gb[0],C=C[0];;){e:{var Me=d;Oe=v,Fe=C;var Ve=se,Re=ge,pt=Ee=[0];if((ut=Ue=[Ue])[0]=0,8>Fe[0])Fe=7;else{if(!r(Me,Oe[0],"VP8X")){if(Q(Me,Oe[0]+4)!=10){Fe=3;break e}if(18>Fe[0]){Fe=7;break e}var nt=Q(Me,Oe[0]+8),Nt=1+Te(Me,Oe[0]+12);if(2147483648<=Nt*(Me=1+Te(Me,Oe[0]+15))){Fe=3;break e}pt!=null&&(pt[0]=nt),Ve!=null&&(Ve[0]=Nt),Re!=null&&(Re[0]=Me),Oe[0]+=18,Fe[0]-=18,ut[0]=1}Fe=0}}if(Ue=Ue[0],Ee=Ee[0],Fe!=0)return Fe;if(Oe=!!(2&Ee),!Pe&&Ue)return 3;if(G!=null&&(G[0]=!!(16&Ee)),V!=null&&(V[0]=Oe),$!=null&&($[0]=0),V=se[0],Ee=ge[0],Ue&&Oe&&X==null){Fe=0;break}if(4>C){Fe=7;break}if(Pe&&Ue||!Pe&&!Ue&&!r(d,v[0],"ALPH")){C=[C],me.na=[me.na],me.P=[me.P],me.Sa=[me.Sa];e:{nt=d,Fe=v,Pe=C;var ut=me.gb;Ve=me.na,Re=me.P,pt=me.Sa,Nt=22,e(nt!=null),e(Pe!=null),Me=Fe[0];var Ht=Pe[0];for(e(Ve!=null),e(pt!=null),Ve[0]=null,Re[0]=null,pt[0]=0;;){if(Fe[0]=Me,Pe[0]=Ht,8>Ht){Fe=7;break e}var iA=Q(nt,Me+4);if(4294967286<iA){Fe=3;break e}var Ot=8+iA+1&-2;if(Nt+=Ot,0<ut&&Nt>ut){Fe=3;break e}if(!r(nt,Me,"VP8 ")||!r(nt,Me,"VP8L")){Fe=0;break e}if(Ht[0]<Ot){Fe=7;break e}r(nt,Me,"ALPH")||(Ve[0]=nt,Re[0]=Me+8,pt[0]=iA),Me+=Ot,Ht-=Ot}}if(C=C[0],me.na=me.na[0],me.P=me.P[0],me.Sa=me.Sa[0],Fe!=0)break}C=[C],me.Ja=[me.Ja],me.xa=[me.xa];e:if(ut=d,Fe=v,Pe=C,Ve=me.gb[0],Re=me.Ja,pt=me.xa,nt=Fe[0],Me=!r(ut,nt,"VP8 "),Nt=!r(ut,nt,"VP8L"),e(ut!=null),e(Pe!=null),e(Re!=null),e(pt!=null),8>Pe[0])Fe=7;else{if(Me||Nt){if(ut=Q(ut,nt+4),12<=Ve&&ut>Ve-12){Fe=3;break e}if(oe&&ut>Pe[0]-8){Fe=7;break e}Re[0]=ut,Fe[0]+=8,Pe[0]-=8,pt[0]=Nt}else pt[0]=5<=Pe[0]&&ut[nt+0]==47&&!(ut[nt+4]>>5),Re[0]=Pe[0];Fe=0}if(C=C[0],me.Ja=me.Ja[0],me.xa=me.xa[0],v=v[0],Fe!=0)break;if(4294967286<me.Ja)return 3;if($==null||Oe||($[0]=me.xa?2:1),V=[V],Ee=[Ee],me.xa){if(5>C){Fe=7;break}$=V,oe=Ee,Oe=G,d==null||5>C?d=0:5<=C&&d[v+0]==47&&!(d[v+4]>>5)?(Pe=[0],ut=[0],Ve=[0],Ae(Re=new O,d,v,C),ii(Re,Pe,ut,Ve)?($!=null&&($[0]=Pe[0]),oe!=null&&(oe[0]=ut[0]),Oe!=null&&(Oe[0]=Ve[0]),d=1):d=0):d=0}else{if(10>C){Fe=7;break}$=Ee,d==null||10>C||!Al(d,v+3,C-3)?d=0:(oe=d[v+0]|d[v+1]<<8|d[v+2]<<16,Oe=16383&(d[v+7]<<8|d[v+6]),d=16383&(d[v+9]<<8|d[v+8]),1&oe||3<(oe>>1&7)||!(oe>>4&1)||oe>>5>=me.Ja||!Oe||!d?d=0:(V&&(V[0]=Oe),$&&($[0]=d),d=1))}if(!d||(V=V[0],Ee=Ee[0],Ue&&(se[0]!=V||ge[0]!=Ee)))return 3;X!=null&&(X[0]=me,X.offset=v-X.w,e(4294967286>v-X.w),e(X.offset==X.ha-C));break}return Fe==0||Fe==7&&Ue&&X==null?(G!=null&&(G[0]|=me.na!=null&&0<me.na.length),U!=null&&(U[0]=V),j!=null&&(j[0]=Ee),0):Fe}function jn(d,v,C){var U=v.width,j=v.height,G=0,V=0,$=U,X=j;if(v.Da=d!=null&&0<d.Da,v.Da&&($=d.cd,X=d.bd,G=d.v,V=d.j,11>C||(G&=-2,V&=-2),0>G||0>V||0>=$||0>=X||G+$>U||V+X>j))return 0;if(v.v=G,v.j=V,v.va=G+$,v.o=V+X,v.U=$,v.T=X,v.da=d!=null&&0<d.da,v.da){if(!q($,X,C=[d.ib],G=[d.hb]))return 0;v.ib=C[0],v.hb=G[0]}return v.ob=d!=null&&d.ob,v.Kb=d==null||!d.Sd,v.da&&(v.ob=v.ib<3*U/4&&v.hb<3*j/4,v.Kb=0),1}function to(d){if(d==null)return 2;if(11>d.S){var v=d.f.RGBA;v.fb+=(d.height-1)*v.A,v.A=-v.A}else v=d.f.kb,d=d.height,v.O+=(d-1)*v.fa,v.fa=-v.fa,v.N+=(d-1>>1)*v.Ab,v.Ab=-v.Ab,v.W+=(d-1>>1)*v.Db,v.Db=-v.Db,v.F!=null&&(v.J+=(d-1)*v.lb,v.lb=-v.lb);return 0}function Nc(d,v,C,U){if(U==null||0>=d||0>=v)return 2;if(C!=null){if(C.Da){var j=C.cd,G=C.bd,V=-2&C.v,$=-2&C.j;if(0>V||0>$||0>=j||0>=G||V+j>d||$+G>v)return 2;d=j,v=G}if(C.da){if(!q(d,v,j=[C.ib],G=[C.hb]))return 2;d=j[0],v=G[0]}}U.width=d,U.height=v;e:{var X=U.width,se=U.height;if(d=U.S,0>=X||0>=se||!(d>=Ch&&13>d))d=2;else{if(0>=U.Rd&&U.sd==null){V=G=j=v=0;var ge=($=X*ZF[d])*se;if(11>d||(G=(se+1)/2*(v=(X+1)/2),d==12&&(V=(j=X)*se)),(se=i(ge+2*G+V))==null){d=1;break e}U.sd=se,11>d?((X=U.f.RGBA).eb=se,X.fb=0,X.A=$,X.size=ge):((X=U.f.kb).y=se,X.O=0,X.fa=$,X.Fd=ge,X.f=se,X.N=0+ge,X.Ab=v,X.Cd=G,X.ea=se,X.W=0+ge+G,X.Db=v,X.Ed=G,d==12&&(X.F=se,X.J=0+ge+2*G),X.Tc=V,X.lb=j)}if(v=1,j=U.S,G=U.width,V=U.height,j>=Ch&&13>j)if(11>j)d=U.f.RGBA,v&=($=Math.abs(d.A))*(V-1)+G<=d.size,v&=$>=G*ZF[j],v&=d.eb!=null;else{d=U.f.kb,$=(G+1)/2,ge=(V+1)/2,X=Math.abs(d.fa),se=Math.abs(d.Ab);var Ue=Math.abs(d.Db),oe=Math.abs(d.lb),me=oe*(V-1)+G;v&=X*(V-1)+G<=d.Fd,v&=se*(ge-1)+$<=d.Cd,v=(v&=Ue*(ge-1)+$<=d.Ed)&X>=G&se>=$&Ue>=$,v&=d.y!=null,v&=d.f!=null,v&=d.ea!=null,j==12&&(v&=oe>=G,v&=me<=d.Tc,v&=d.F!=null)}else v=0;d=v?0:2}}return d!=0||C!=null&&C.fd&&(d=to(U)),d}var ul=64,ro=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215],Oc=24,ZA=32,fn=8,fl=[0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7];ye("Predictor0","PredictorAdd0"),I.Predictor0=function(){return 4278190080},I.Predictor1=function(d){return d},I.Predictor2=function(d,v,C){return v[C+0]},I.Predictor3=function(d,v,C){return v[C+1]},I.Predictor4=function(d,v,C){return v[C-1]},I.Predictor5=function(d,v,C){return Se(Se(d,v[C+1]),v[C+0])},I.Predictor6=function(d,v,C){return Se(d,v[C-1])},I.Predictor7=function(d,v,C){return Se(d,v[C+0])},I.Predictor8=function(d,v,C){return Se(v[C-1],v[C+0])},I.Predictor9=function(d,v,C){return Se(v[C+0],v[C+1])},I.Predictor10=function(d,v,C){return Se(Se(d,v[C-1]),Se(v[C+0],v[C+1]))},I.Predictor11=function(d,v,C){var U=v[C+0];return 0>=Le(U>>24&255,d>>24&255,(v=v[C-1])>>24&255)+Le(U>>16&255,d>>16&255,v>>16&255)+Le(U>>8&255,d>>8&255,v>>8&255)+Le(255&U,255&d,255&v)?U:d},I.Predictor12=function(d,v,C){var U=v[C+0];return(ve((d>>24&255)+(U>>24&255)-((v=v[C-1])>>24&255))<<24|ve((d>>16&255)+(U>>16&255)-(v>>16&255))<<16|ve((d>>8&255)+(U>>8&255)-(v>>8&255))<<8|ve((255&d)+(255&U)-(255&v)))>>>0},I.Predictor13=function(d,v,C){var U=v[C-1];return(Ce((d=Se(d,v[C+0]))>>24&255,U>>24&255)<<24|Ce(d>>16&255,U>>16&255)<<16|Ce(d>>8&255,U>>8&255)<<8|Ce(255&d,255&U))>>>0};var Ya=I.PredictorAdd0;I.PredictorAdd1=Ge,ye("Predictor2","PredictorAdd2"),ye("Predictor3","PredictorAdd3"),ye("Predictor4","PredictorAdd4"),ye("Predictor5","PredictorAdd5"),ye("Predictor6","PredictorAdd6"),ye("Predictor7","PredictorAdd7"),ye("Predictor8","PredictorAdd8"),ye("Predictor9","PredictorAdd9"),ye("Predictor10","PredictorAdd10"),ye("Predictor11","PredictorAdd11"),ye("Predictor12","PredictorAdd12"),ye("Predictor13","PredictorAdd13");var Xa=I.PredictorAdd2;$e("ColorIndexInverseTransform","MapARGB","32b",function(d){return d>>8&255},function(d){return d}),$e("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(d){return d},function(d){return d>>8&255});var hl,Ao=I.ColorIndexInverseTransform,Yr=I.MapARGB,Hv=I.VP8LColorIndexInverseTransformAlpha,Ui=I.MapAlpha,oi=I.VP8LPredictorsAdd=[];oi.length=16,(I.VP8LPredictors=[]).length=16,(I.VP8LPredictorsAdd_C=[]).length=16,(I.VP8LPredictors_C=[]).length=16;var no,Pc,Mc,dl,io,ao,Ja,na,Za,pl,RA,_i,cr,ur,Mr,nA,ia,Dc,gl,Bh,_F,QF,kF,LF,Hc,TF,NF,OF,PF=i(511),MF=i(2041),DF=i(225),HF=i(767),RF=0,Rv=MF,bh=DF,Fn=HF,Kn=PF,Ch=0,xh=1,jF=2,Eh=3,Sh=4,jv=5,KF=6,Kv=7,zv=8,Fh=9,Gv=10,cK=[2,3,7],uK=[3,3,11],zF=[280,256,256,256,40],fK=[0,1,1,1,0],hK=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],dK=[24,7,23,25,40,6,39,41,22,26,38,42,56,5,55,57,21,27,54,58,37,43,72,4,71,73,20,28,53,59,70,74,36,44,88,69,75,52,60,3,87,89,19,29,86,90,35,45,68,76,85,91,51,61,104,2,103,105,18,30,102,106,34,46,84,92,67,77,101,107,50,62,120,1,119,121,83,93,17,31,100,108,66,78,118,122,33,47,117,123,49,63,99,109,82,94,0,116,124,65,79,16,32,98,110,48,115,125,81,95,64,114,126,97,111,80,113,127,96,112],pK=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],gK=8,Vv=[4,5,6,7,8,9,10,10,11,12,13,14,15,16,17,17,18,19,20,20,21,21,22,22,23,23,24,25,25,26,27,28,29,30,31,32,33,34,35,36,37,37,38,39,40,41,42,43,44,45,46,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,76,77,78,79,80,81,82,83,84,85,86,87,88,89,91,93,95,96,98,100,101,102,104,106,108,110,112,114,116,118,122,124,126,128,130,132,134,136,138,140,143,145,148,151,154,157],qv=[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,119,122,125,128,131,134,137,140,143,146,149,152,155,158,161,164,167,170,173,177,181,185,189,193,197,201,205,209,213,217,221,225,229,234,239,245,249,254,259,264,269,274,279,284],Rc=null,vK=[[173,148,140,0],[176,155,140,135,0],[180,157,141,134,130,0],[254,254,243,230,196,177,153,140,133,130,129,0]],mK=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],GF=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],wK=[[[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]],[[253,136,254,255,228,219,128,128,128,128,128],[189,129,242,255,227,213,255,219,128,128,128],[106,126,227,252,214,209,255,255,128,128,128]],[[1,98,248,255,236,226,255,255,128,128,128],[181,133,238,254,221,234,255,154,128,128,128],[78,134,202,247,198,180,255,219,128,128,128]],[[1,185,249,255,243,255,128,128,128,128,128],[184,150,247,255,236,224,128,128,128,128,128],[77,110,216,255,236,230,128,128,128,128,128]],[[1,101,251,255,241,255,128,128,128,128,128],[170,139,241,252,236,209,255,255,128,128,128],[37,116,196,243,228,255,255,255,128,128,128]],[[1,204,254,255,245,255,128,128,128,128,128],[207,160,250,255,238,128,128,128,128,128,128],[102,103,231,255,211,171,128,128,128,128,128]],[[1,152,252,255,240,255,128,128,128,128,128],[177,135,243,255,234,225,128,128,128,128,128],[80,129,211,255,194,224,128,128,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[246,1,255,128,128,128,128,128,128,128,128],[255,128,128,128,128,128,128,128,128,128,128]]],[[[198,35,237,223,193,187,162,160,145,155,62],[131,45,198,221,172,176,220,157,252,221,1],[68,47,146,208,149,167,221,162,255,223,128]],[[1,149,241,255,221,224,255,255,128,128,128],[184,141,234,253,222,220,255,199,128,128,128],[81,99,181,242,176,190,249,202,255,255,128]],[[1,129,232,253,214,197,242,196,255,255,128],[99,121,210,250,201,198,255,202,128,128,128],[23,91,163,242,170,187,247,210,255,255,128]],[[1,200,246,255,234,255,128,128,128,128,128],[109,178,241,255,231,245,255,255,128,128,128],[44,130,201,253,205,192,255,255,128,128,128]],[[1,132,239,251,219,209,255,165,128,128,128],[94,136,225,251,218,190,255,255,128,128,128],[22,100,174,245,186,161,255,199,128,128,128]],[[1,182,249,255,232,235,128,128,128,128,128],[124,143,241,255,227,234,128,128,128,128,128],[35,77,181,251,193,211,255,205,128,128,128]],[[1,157,247,255,236,231,255,255,128,128,128],[121,141,235,255,225,227,255,255,128,128,128],[45,99,188,251,195,217,255,224,128,128,128]],[[1,1,251,255,213,255,128,128,128,128,128],[203,1,248,255,255,128,128,128,128,128,128],[137,1,177,255,224,255,128,128,128,128,128]]],[[[253,9,248,251,207,208,255,192,128,128,128],[175,13,224,243,193,185,249,198,255,255,128],[73,17,171,221,161,179,236,167,255,234,128]],[[1,95,247,253,212,183,255,255,128,128,128],[239,90,244,250,211,209,255,255,128,128,128],[155,77,195,248,188,195,255,255,128,128,128]],[[1,24,239,251,218,219,255,205,128,128,128],[201,51,219,255,196,186,128,128,128,128,128],[69,46,190,239,201,218,255,228,128,128,128]],[[1,191,251,255,255,128,128,128,128,128,128],[223,165,249,255,213,255,128,128,128,128,128],[141,124,248,255,255,128,128,128,128,128,128]],[[1,16,248,255,255,128,128,128,128,128,128],[190,36,230,255,236,255,128,128,128,128,128],[149,1,255,128,128,128,128,128,128,128,128]],[[1,226,255,128,128,128,128,128,128,128,128],[247,192,255,128,128,128,128,128,128,128,128],[240,128,255,128,128,128,128,128,128,128,128]],[[1,134,252,255,255,128,128,128,128,128,128],[213,62,250,255,255,128,128,128,128,128,128],[55,93,255,128,128,128,128,128,128,128,128]],[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]]],[[[202,24,213,235,186,191,220,160,240,175,255],[126,38,182,232,169,184,228,174,255,187,128],[61,46,138,219,151,178,240,170,255,216,128]],[[1,112,230,250,199,191,247,159,255,255,128],[166,109,228,252,211,215,255,174,128,128,128],[39,77,162,232,172,180,245,178,255,255,128]],[[1,52,220,246,198,199,249,220,255,255,128],[124,74,191,243,183,193,250,221,255,255,128],[24,71,130,219,154,170,243,182,255,255,128]],[[1,182,225,249,219,240,255,224,128,128,128],[149,150,226,252,216,205,255,171,128,128,128],[28,108,170,242,183,194,254,223,255,255,128]],[[1,81,230,252,204,203,255,192,128,128,128],[123,102,209,247,188,196,255,233,128,128,128],[20,95,153,243,164,173,255,203,128,128,128]],[[1,222,248,255,216,213,128,128,128,128,128],[168,175,246,252,235,205,255,255,128,128,128],[47,116,215,255,211,212,255,255,128,128,128]],[[1,121,236,253,212,214,255,255,128,128,128],[141,84,213,252,201,202,255,219,128,128,128],[42,80,160,240,162,185,255,205,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[244,1,255,128,128,128,128,128,128,128,128],[238,1,255,128,128,128,128,128,128,128,128]]]],yK=[[[231,120,48,89,115,113,120,152,112],[152,179,64,126,170,118,46,70,95],[175,69,143,80,85,82,72,155,103],[56,58,10,171,218,189,17,13,152],[114,26,17,163,44,195,21,10,173],[121,24,80,195,26,62,44,64,85],[144,71,10,38,171,213,144,34,26],[170,46,55,19,136,160,33,206,71],[63,20,8,114,114,208,12,9,226],[81,40,11,96,182,84,29,16,36]],[[134,183,89,137,98,101,106,165,148],[72,187,100,130,157,111,32,75,80],[66,102,167,99,74,62,40,234,128],[41,53,9,178,241,141,26,8,107],[74,43,26,146,73,166,49,23,157],[65,38,105,160,51,52,31,115,128],[104,79,12,27,217,255,87,17,7],[87,68,71,44,114,51,15,186,23],[47,41,14,110,182,183,21,17,194],[66,45,25,102,197,189,23,18,22]],[[88,88,147,150,42,46,45,196,205],[43,97,183,117,85,38,35,179,61],[39,53,200,87,26,21,43,232,171],[56,34,51,104,114,102,29,93,77],[39,28,85,171,58,165,90,98,64],[34,22,116,206,23,34,43,166,73],[107,54,32,26,51,1,81,43,31],[68,25,106,22,64,171,36,225,114],[34,19,21,102,132,188,16,76,124],[62,18,78,95,85,57,50,48,51]],[[193,101,35,159,215,111,89,46,111],[60,148,31,172,219,228,21,18,111],[112,113,77,85,179,255,38,120,114],[40,42,1,196,245,209,10,25,109],[88,43,29,140,166,213,37,43,154],[61,63,30,155,67,45,68,1,209],[100,80,8,43,154,1,51,26,71],[142,78,78,16,255,128,34,197,171],[41,40,5,102,211,183,4,1,221],[51,50,17,168,209,192,23,25,82]],[[138,31,36,171,27,166,38,44,229],[67,87,58,169,82,115,26,59,179],[63,59,90,180,59,166,93,73,154],[40,40,21,116,143,209,34,39,175],[47,15,16,183,34,223,49,45,183],[46,17,33,183,6,98,15,32,183],[57,46,22,24,128,1,54,17,37],[65,32,73,115,28,128,23,128,205],[40,3,9,115,51,192,18,6,223],[87,37,9,115,59,77,64,21,47]],[[104,55,44,218,9,54,53,130,226],[64,90,70,205,40,41,23,26,57],[54,57,112,184,5,41,38,166,213],[30,34,26,133,152,116,10,32,134],[39,19,53,221,26,114,32,73,255],[31,9,65,234,2,15,1,118,73],[75,32,12,51,192,255,160,43,51],[88,31,35,67,102,85,55,186,85],[56,21,23,111,59,205,45,37,192],[55,38,70,124,73,102,1,34,98]],[[125,98,42,88,104,85,117,175,82],[95,84,53,89,128,100,113,101,45],[75,79,123,47,51,128,81,171,1],[57,17,5,71,102,57,53,41,49],[38,33,13,121,57,73,26,1,85],[41,10,67,138,77,110,90,47,114],[115,21,2,10,102,255,166,23,6],[101,29,16,10,85,128,101,196,26],[57,18,10,102,102,213,34,20,43],[117,20,15,36,163,128,68,1,26]],[[102,61,71,37,34,53,31,243,192],[69,60,71,38,73,119,28,222,37],[68,45,128,34,1,47,11,245,171],[62,17,19,70,146,85,55,62,70],[37,43,37,154,100,163,85,160,1],[63,9,92,136,28,64,32,201,85],[75,15,9,9,64,255,184,119,16],[86,6,28,5,64,255,25,248,1],[56,8,17,132,137,255,55,116,128],[58,15,20,82,135,57,26,121,40]],[[164,50,31,137,154,133,25,35,218],[51,103,44,131,131,123,31,6,158],[86,40,64,135,148,224,45,183,128],[22,26,17,131,240,154,14,1,209],[45,16,21,91,64,222,7,1,197],[56,21,39,155,60,138,23,102,213],[83,12,13,54,192,255,68,47,28],[85,26,85,85,128,128,32,146,171],[18,11,7,63,144,171,4,4,246],[35,27,10,146,174,171,12,26,128]],[[190,80,35,99,180,80,126,54,45],[85,126,47,87,176,51,41,20,32],[101,75,128,139,118,146,116,128,85],[56,41,15,176,236,85,37,9,62],[71,30,17,119,118,255,17,18,138],[101,38,60,138,55,70,43,26,142],[146,36,19,30,171,255,97,27,20],[138,45,61,62,219,1,81,188,64],[32,41,20,117,151,142,20,21,163],[112,19,12,61,195,128,48,4,24]]],BK=[[[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[176,246,255,255,255,255,255,255,255,255,255],[223,241,252,255,255,255,255,255,255,255,255],[249,253,253,255,255,255,255,255,255,255,255]],[[255,244,252,255,255,255,255,255,255,255,255],[234,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255]],[[255,246,254,255,255,255,255,255,255,255,255],[239,253,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[251,255,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[251,254,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,254,253,255,254,255,255,255,255,255,255],[250,255,254,255,254,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[217,255,255,255,255,255,255,255,255,255,255],[225,252,241,253,255,255,254,255,255,255,255],[234,250,241,250,253,255,253,254,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[223,254,254,255,255,255,255,255,255,255,255],[238,253,254,254,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[249,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,255,255,255,255,255,255,255,255,255],[247,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[252,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[186,251,250,255,255,255,255,255,255,255,255],[234,251,244,254,255,255,255,255,255,255,255],[251,251,243,253,254,255,254,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[236,253,254,255,255,255,255,255,255,255,255],[251,253,253,254,254,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[254,254,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[254,254,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[248,255,255,255,255,255,255,255,255,255,255],[250,254,252,254,255,255,255,255,255,255,255],[248,254,249,253,255,255,255,255,255,255,255]],[[255,253,253,255,255,255,255,255,255,255,255],[246,253,253,255,255,255,255,255,255,255,255],[252,254,251,254,254,255,255,255,255,255,255]],[[255,254,252,255,255,255,255,255,255,255,255],[248,254,253,255,255,255,255,255,255,255,255],[253,255,254,254,255,255,255,255,255,255,255]],[[255,251,254,255,255,255,255,255,255,255,255],[245,251,254,255,255,255,255,255,255,255,255],[253,253,254,255,255,255,255,255,255,255,255]],[[255,251,253,255,255,255,255,255,255,255,255],[252,253,254,255,255,255,255,255,255,255,255],[255,254,255,255,255,255,255,255,255,255,255]],[[255,252,255,255,255,255,255,255,255,255,255],[249,255,254,255,255,255,255,255,255,255,255],[255,255,254,255,255,255,255,255,255,255,255]],[[255,255,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]]],bK=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],es=[],li=[],aa=[],CK=1,VF=2,ts=[],zn=[];DA("UpsampleRgbLinePair",Js,3),DA("UpsampleBgrLinePair",ol,3),DA("UpsampleRgbaLinePair",Tc,4),DA("UpsampleBgraLinePair",eo,4),DA("UpsampleArgbLinePair",Zs,4),DA("UpsampleRgba4444LinePair",HA,2),DA("UpsampleRgb565LinePair",ll,2);var xK=I.UpsampleRgbLinePair,EK=I.UpsampleBgrLinePair,qF=I.UpsampleRgbaLinePair,WF=I.UpsampleBgraLinePair,$F=I.UpsampleArgbLinePair,YF=I.UpsampleRgba4444LinePair,SK=I.UpsampleRgb565LinePair,Ih=16,Uh=1<<Ih-1,jc=-227,Wv=482,FK=6,XF=0,IK=i(256),UK=i(256),_K=i(256),QK=i(256),kK=i(Wv-jc),LK=i(Wv-jc);Ii("YuvToRgbRow",Js,3),Ii("YuvToBgrRow",ol,3),Ii("YuvToRgbaRow",Tc,4),Ii("YuvToBgraRow",eo,4),Ii("YuvToArgbRow",Zs,4),Ii("YuvToRgba4444Row",HA,2),Ii("YuvToRgb565Row",ll,2);var JF=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],_h=[0,2,8],TK=[8,7,6,4,4,2,2,2,1,1,1,1],NK=1;this.WebPDecodeRGBA=function(d,v,C,U,j){var G=xh,V=new de,$=new lt;V.ba=$,$.S=G,$.width=[$.width],$.height=[$.height];var X=$.width,se=$.height,ge=new ht;if(ge==null||d==null)var Ue=2;else e(ge!=null),Ue=yh(d,v,C,ge.width,ge.height,ge.Pd,ge.Qd,ge.format,null);if(Ue!=0?X=0:(X!=null&&(X[0]=ge.width[0]),se!=null&&(se[0]=ge.height[0]),X=1),X){$.width=$.width[0],$.height=$.height[0],U!=null&&(U[0]=$.width),j!=null&&(j[0]=$.height);e:{if(U=new Sn,(j=new Be).data=d,j.w=v,j.ha=C,j.kd=1,v=[0],e(j!=null),((d=yh(j.data,j.w,j.ha,null,null,null,v,null,j))==0||d==7)&&v[0]&&(d=4),(v=d)==0){if(e(V!=null),U.data=j.data,U.w=j.w+j.offset,U.ha=j.ha-j.offset,U.put=yt,U.ac=CA,U.bc=Bn,U.ma=V,j.xa){if((d=ai())==null){V=1;break e}if((function(oe,me){var Ee=[0],Oe=[0],Fe=[0];t:for(;;){if(oe==null)return 0;if(me==null)return oe.a=2,0;if(oe.l=me,oe.a=0,Ae(oe.m,me.data,me.w,me.ha),!ii(oe.m,Ee,Oe,Fe)){oe.a=3;break t}if(oe.xb=VF,me.width=Ee[0],me.height=Oe[0],!En(Ee[0],Oe[0],1,oe,null))break t;return 1}return e(oe.a!=0),0})(d,U)){if(U=(v=Nc(U.width,U.height,V.Oa,V.ba))==0){t:{U=d;r:for(;;){if(U==null){U=0;break t}if(e(U.s.yc!=null),e(U.s.Ya!=null),e(0<U.s.Wb),e((C=U.l)!=null),e((j=C.ma)!=null),U.xb!=0){if(U.ca=j.ba,U.tb=j.tb,e(U.ca!=null),!jn(j.Oa,C,Eh)){U.a=2;break r}if(!Si(U,C.width)||C.da)break r;if((C.da||rt(U.ca.S))&&Cr(),11>U.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),U.ca.f.kb.F!=null&&Cr()),U.Pb&&0<U.s.ua&&U.s.vb.X==null&&!N(U.s.vb,U.s.Wa.Xa)){U.a=1;break r}U.xb=0}if(!xn(U,U.V,U.Ba,U.c,U.i,C.o,Ei))break r;j.Dc=U.Ma,U=1;break t}e(U.a!=0),U=0}U=!U}U&&(v=d.a)}else v=d.a}else{if((d=new Yi)==null){V=1;break e}if(d.Fa=j.na,d.P=j.P,d.qc=j.Sa,Rn(d,U)){if((v=Nc(U.width,U.height,V.Oa,V.ba))==0){if(d.Aa=0,C=V.Oa,e((j=d)!=null),C!=null){if(0<(X=0>(X=C.Md)?0:100<X?255:255*X/100)){for(se=ge=0;4>se;++se)12>(Ue=j.pb[se]).lc&&(Ue.ia=X*TK[0>Ue.lc?0:Ue.lc]>>3),ge|=Ue.ia;ge&&(alert("todo:VP8InitRandom"),j.ia=1)}j.Ga=C.Id,100<j.Ga?j.Ga=100:0>j.Ga&&(j.Ga=0)}(function(oe,me){if(oe==null)return 0;if(me==null)return Yt(oe,2,"NULL VP8Io parameter in VP8Decode().");if(!oe.cb&&!Rn(oe,me))return 0;if(e(oe.cb),me.ac==null||me.ac(me)){me.ob&&(oe.L=0);var Ee=_h[oe.L];if(oe.L==2?(oe.yb=0,oe.zb=0):(oe.yb=me.v-Ee>>4,oe.zb=me.j-Ee>>4,0>oe.yb&&(oe.yb=0),0>oe.zb&&(oe.zb=0)),oe.Va=me.o+15+Ee>>4,oe.Hb=me.va+15+Ee>>4,oe.Hb>oe.za&&(oe.Hb=oe.za),oe.Va>oe.Ub&&(oe.Va=oe.Ub),0<oe.L){var Oe=oe.ed;for(Ee=0;4>Ee;++Ee){var Fe;if(oe.Qa.Cb){var Pe=oe.Qa.Lb[Ee];oe.Qa.Fb||(Pe+=Oe.Tb)}else Pe=Oe.Tb;for(Fe=0;1>=Fe;++Fe){var Me=oe.gd[Ee][Fe],Ve=Pe;if(Oe.Pc&&(Ve+=Oe.vd[0],Fe&&(Ve+=Oe.od[0])),0<(Ve=0>Ve?0:63<Ve?63:Ve)){var Re=Ve;0<Oe.wb&&(Re=4<Oe.wb?Re>>2:Re>>1)>9-Oe.wb&&(Re=9-Oe.wb),1>Re&&(Re=1),Me.dd=Re,Me.tc=2*Ve+Re,Me.ld=40<=Ve?2:15<=Ve?1:0}else Me.tc=0;Me.La=Fe}}}Ee=0}else Yt(oe,6,"Frame setup failed"),Ee=oe.a;if(Ee=Ee==0){if(Ee){oe.$c=0,0<oe.Aa||(oe.Ic=NK);t:{Ee=oe.Ic,Oe=4*(Re=oe.za);var pt=32*Re,nt=Re+1,Nt=0<oe.L?Re*(0<oe.Aa?2:1):0,ut=(oe.Aa==2?2:1)*Re;if((Me=Oe+832+(Fe=3*(16*Ee+_h[oe.L])/2*pt)+(Pe=oe.Fa!=null&&0<oe.Fa.length?oe.Kc.c*oe.Kc.i:0))!=Me)Ee=0;else{if(Me>oe.Vb){if(oe.Vb=0,oe.Ec=i(Me),oe.Fc=0,oe.Ec==null){Ee=Yt(oe,1,"no memory during frame initialization.");break t}oe.Vb=Me}Me=oe.Ec,Ve=oe.Fc,oe.Ac=Me,oe.Bc=Ve,Ve+=Oe,oe.Gd=s(pt,$i),oe.Hd=0,oe.rb=s(nt+1,Wi),oe.sb=1,oe.wa=Nt?s(Nt,un):null,oe.Y=0,oe.D.Nb=0,oe.D.wa=oe.wa,oe.D.Y=oe.Y,0<oe.Aa&&(oe.D.Y+=Re),e(!0),oe.oc=Me,oe.pc=Ve,Ve+=832,oe.ya=s(ut,za),oe.aa=0,oe.D.ya=oe.ya,oe.D.aa=oe.aa,oe.Aa==2&&(oe.D.aa+=Re),oe.R=16*Re,oe.B=8*Re,Re=(pt=_h[oe.L])*oe.R,pt=pt/2*oe.B,oe.sa=Me,oe.ta=Ve+Re,oe.qa=oe.sa,oe.ra=oe.ta+16*Ee*oe.R+pt,oe.Ha=oe.qa,oe.Ia=oe.ra+8*Ee*oe.B+pt,oe.$c=0,Ve+=Fe,oe.mb=Pe?Me:null,oe.nb=Pe?Ve:null,e(Ve+Pe<=oe.Fc+oe.Vb),Va(oe),n(oe.Ac,oe.Bc,0,Oe),Ee=1}}if(Ee){if(me.ka=0,me.y=oe.sa,me.O=oe.ta,me.f=oe.qa,me.N=oe.ra,me.ea=oe.Ha,me.Vd=oe.Ia,me.fa=oe.R,me.Rc=oe.B,me.F=null,me.J=0,!RF){for(Ee=-255;255>=Ee;++Ee)PF[255+Ee]=0>Ee?-Ee:Ee;for(Ee=-1020;1020>=Ee;++Ee)MF[1020+Ee]=-128>Ee?-128:127<Ee?127:Ee;for(Ee=-112;112>=Ee;++Ee)DF[112+Ee]=-16>Ee?-16:15<Ee?15:Ee;for(Ee=-255;510>=Ee;++Ee)HF[255+Ee]=0>Ee?0:255<Ee?255:Ee;RF=1}Ja=Ie,na=qa,pl=Vs,RA=qe,_i=re,Za=Gs,cr=ph,ur=gh,Mr=mh,nA=y,ia=vh,Dc=$s,gl=D,Bh=ae,_F=al,QF=kc,kF=sl,LF=dh,li[0]=Lv,li[1]=et,li[2]=Qv,li[3]=kv,li[4]=Tv,li[5]=Zi,li[6]=Nv,li[7]=ea,li[8]=Pv,li[9]=Ov,es[0]=rA,es[1]=xt,es[2]=lr,es[3]=Vr,es[4]=Wr,es[5]=AA,es[6]=qs,aa[0]=Mv,aa[1]=vt,aa[2]=nl,aa[3]=Ic,aa[4]=Dv,aa[5]=il,aa[6]=Uc,Ee=1}else Ee=0}Ee&&(Ee=(function(Ht,iA){for(Ht.M=0;Ht.M<Ht.Va;++Ht.M){var Ot,ft=Ht.Jc[Ht.M&Ht.Xb],Ye=Ht.m,Dr=Ht;for(Ot=0;Ot<Dr.za;++Ot){var Lt=Ye,Vt=Dr,gr=Vt.Ac,xA=Vt.Bc+4*Ot,en=Vt.zc,Ur=Vt.ya[Vt.aa+Ot];if(Vt.Qa.Bb?Ur.$b=we(Lt,Vt.Pa.jb[0])?2+we(Lt,Vt.Pa.jb[2]):we(Lt,Vt.Pa.jb[1]):Ur.$b=0,Vt.kc&&(Ur.Ad=we(Lt,Vt.Bd)),Ur.Za=!we(Lt,145)+0,Ur.Za){var jA=Ur.Ob,tn=0;for(Vt=0;4>Vt;++Vt){var aA,Wt=en[0+Vt];for(aA=0;4>aA;++aA){Wt=yK[gr[xA+aA]][Wt];for(var er=GF[we(Lt,Wt[0])];0<er;)er=GF[2*er+we(Lt,Wt[er])];Wt=-er,gr[xA+aA]=Wt}A(jA,tn,gr,xA,4),tn+=4,en[0+Vt]=Wt}}else Wt=we(Lt,156)?we(Lt,128)?1:3:we(Lt,163)?2:0,Ur.Ob[0]=Wt,n(gr,xA,Wt,4),n(en,0,Wt,4);Ur.Dd=we(Lt,142)?we(Lt,114)?we(Lt,183)?1:3:2:0}if(Dr.m.Ka)return Yt(Ht,7,"Premature end-of-partition0 encountered.");for(;Ht.ja<Ht.za;++Ht.ja){if(Dr=ft,Lt=(Ye=Ht).rb[Ye.sb-1],gr=Ye.rb[Ye.sb+Ye.ja],Ot=Ye.ya[Ye.aa+Ye.ja],xA=Ye.kc?Ot.Ad:0)Lt.la=gr.la=0,Ot.Za||(Lt.Na=gr.Na=0),Ot.Hc=0,Ot.Gc=0,Ot.ia=0;else{var _r,tr;if(Lt=gr,gr=Dr,xA=Ye.Pa.Xc,en=Ye.ya[Ye.aa+Ye.ja],Ur=Ye.pb[en.$b],Vt=en.ad,jA=0,tn=Ye.rb[Ye.sb-1],Wt=aA=0,n(Vt,jA,0,384),en.Za)var EA=0,ci=xA[3];else{er=i(16);var Hr=Lt.Na+tn.Na;if(Hr=Rc(gr,xA[1],Hr,Ur.Eb,0,er,0),Lt.Na=tn.Na=(0<Hr)+0,1<Hr)Ja(er,0,Vt,jA);else{var hn=er[0]+3>>3;for(er=0;256>er;er+=16)Vt[jA+er]=hn}EA=1,ci=xA[0]}var ar=15&Lt.la,sA=15&tn.la;for(er=0;4>er;++er){var In=1&sA;for(hn=tr=0;4>hn;++hn)ar=ar>>1|(In=(Hr=Rc(gr,ci,Hr=In+(1&ar),Ur.Sc,EA,Vt,jA))>EA)<<7,tr=tr<<2|(3<Hr?3:1<Hr?2:Vt[jA+0]!=0),jA+=16;ar>>=4,sA=sA>>1|In<<7,aA=(aA<<8|tr)>>>0}for(ci=ar,EA=sA>>4,_r=0;4>_r;_r+=2){for(tr=0,ar=Lt.la>>4+_r,sA=tn.la>>4+_r,er=0;2>er;++er){for(In=1&sA,hn=0;2>hn;++hn)Hr=In+(1&ar),ar=ar>>1|(In=0<(Hr=Rc(gr,xA[2],Hr,Ur.Qc,0,Vt,jA)))<<3,tr=tr<<2|(3<Hr?3:1<Hr?2:Vt[jA+0]!=0),jA+=16;ar>>=2,sA=sA>>1|In<<5}Wt|=tr<<4*_r,ci|=ar<<4<<_r,EA|=(240&sA)<<_r}Lt.la=ci,tn.la=EA,en.Hc=aA,en.Gc=Wt,en.ia=43690&Wt?0:Ur.ia,xA=!(aA|Wt)}if(0<Ye.L&&(Ye.wa[Ye.Y+Ye.ja]=Ye.gd[Ot.$b][Ot.Za],Ye.wa[Ye.Y+Ye.ja].La|=!xA),Dr.Ka)return Yt(Ht,7,"Premature end-of-file encountered.")}if(Va(Ht),Ye=iA,Dr=1,Ot=(ft=Ht).D,Lt=0<ft.L&&ft.M>=ft.zb&&ft.M<=ft.Va,ft.Aa==0)t:{if(Ot.M=ft.M,Ot.uc=Lt,cl(ft,Ot),Dr=1,Ot=(tr=ft.D).Nb,Lt=(Wt=_h[ft.L])*ft.R,gr=Wt/2*ft.B,er=16*Ot*ft.R,hn=8*Ot*ft.B,xA=ft.sa,en=ft.ta-Lt+er,Ur=ft.qa,Vt=ft.ra-gr+hn,jA=ft.Ha,tn=ft.Ia-gr+hn,sA=(ar=tr.M)==0,aA=ar>=ft.Va-1,ft.Aa==2&&cl(ft,tr),tr.uc)for(In=(Hr=ft).D.M,e(Hr.D.uc),tr=Hr.yb;tr<Hr.Hb;++tr){EA=tr,ci=In;var rn=(Un=(SA=Hr).D).Nb;_r=SA.R;var Un=Un.wa[Un.Y+EA],_n=SA.sa,dn=SA.ta+16*rn*_r+16*EA,Qn=Un.dd,fr=Un.tc;if(fr!=0)if(e(3<=fr),SA.L==1)0<EA&&QF(_n,dn,_r,fr+4),Un.La&&LF(_n,dn,_r,fr),0<ci&&_F(_n,dn,_r,fr+4),Un.La&&kF(_n,dn,_r,fr);else{var kn=SA.B,ui=SA.qa,so=SA.ra+8*rn*kn+8*EA,sa=SA.Ha,SA=SA.Ia+8*rn*kn+8*EA;rn=Un.ld,0<EA&&(ur(_n,dn,_r,fr+4,Qn,rn),nA(ui,so,sa,SA,kn,fr+4,Qn,rn)),Un.La&&(Dc(_n,dn,_r,fr,Qn,rn),Bh(ui,so,sa,SA,kn,fr,Qn,rn)),0<ci&&(cr(_n,dn,_r,fr+4,Qn,rn),Mr(ui,so,sa,SA,kn,fr+4,Qn,rn)),Un.La&&(ia(_n,dn,_r,fr,Qn,rn),gl(ui,so,sa,SA,kn,fr,Qn,rn))}}if(ft.ia&&alert("todo:DitherRow"),Ye.put!=null){if(tr=16*ar,ar=16*(ar+1),sA?(Ye.y=ft.sa,Ye.O=ft.ta+er,Ye.f=ft.qa,Ye.N=ft.ra+hn,Ye.ea=ft.Ha,Ye.W=ft.Ia+hn):(tr-=Wt,Ye.y=xA,Ye.O=en,Ye.f=Ur,Ye.N=Vt,Ye.ea=jA,Ye.W=tn),aA||(ar-=Wt),ar>Ye.o&&(ar=Ye.o),Ye.F=null,Ye.J=null,ft.Fa!=null&&0<ft.Fa.length&&tr<ar&&(Ye.J=$r(ft,Ye,tr,ar-tr),Ye.F=ft.mb,Ye.F==null&&Ye.F.length==0)){Dr=Yt(ft,3,"Could not decode alpha data.");break t}tr<Ye.j&&(Wt=Ye.j-tr,tr=Ye.j,e(!(1&Wt)),Ye.O+=ft.R*Wt,Ye.N+=ft.B*(Wt>>1),Ye.W+=ft.B*(Wt>>1),Ye.F!=null&&(Ye.J+=Ye.width*Wt)),tr<ar&&(Ye.O+=Ye.v,Ye.N+=Ye.v>>1,Ye.W+=Ye.v>>1,Ye.F!=null&&(Ye.J+=Ye.v),Ye.ka=tr-Ye.j,Ye.U=Ye.va-Ye.v,Ye.T=ar-tr,Dr=Ye.put(Ye))}Ot+1!=ft.Ic||aA||(A(ft.sa,ft.ta-Lt,xA,en+16*ft.R,Lt),A(ft.qa,ft.ra-gr,Ur,Vt+8*ft.B,gr),A(ft.Ha,ft.Ia-gr,jA,tn+8*ft.B,gr))}if(!Dr)return Yt(Ht,6,"Output aborted.")}return 1})(oe,me)),me.bc!=null&&me.bc(me),Ee&=1}return Ee?(oe.cb=0,Ee):0})(d,U)||(v=d.a)}}else v=d.a}v==0&&V.Oa!=null&&V.Oa.fd&&(v=to(V.ba))}V=v}G=V!=0?null:11>G?$.f.RGBA.eb:$.f.kb.y}else G=null;return G};var ZF=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function l(I,W){for(var L="",F=0;F<4;F++)L+=String.fromCharCode(I[W++]);return L}function c(I,W){return I[W+0]|I[W+1]<<8}function f(I,W){return(I[W+0]|I[W+1]<<8|I[W+2]<<16)>>>0}function h(I,W){return(I[W+0]|I[W+1]<<8|I[W+2]<<16|I[W+3]<<24)>>>0}new o;var u=[0],g=[0],p=[],w=new o,m=t,B=(function(I,W){var L={},F=0,M=!1,b=0,Y=0;if(L.frames=[],!(function(S,O){for(var P=0;P<4;P++)if(S[O+P]!="RIFF".charCodeAt(P))return!0;return!1})(I,W)){for(h(I,W+=4),W+=8;W<I.length;){var ce=l(I,W),ee=h(I,W+=4);W+=4;var le=ee+(1&ee);switch(ce){case"VP8 ":case"VP8L":L.frames[F]===void 0&&(L.frames[F]={}),(T=L.frames[F]).src_off=M?Y:W-8,T.src_size=b+ee+8,F++,M&&(M=!1,b=0,Y=0);break;case"VP8X":(T=L.header={}).feature_flags=I[W];var Ae=W+4;T.canvas_width=1+f(I,Ae),Ae+=3,T.canvas_height=1+f(I,Ae),Ae+=3;break;case"ALPH":M=!0,b=le+8,Y=W-8;break;case"ANIM":(T=L.header).bgcolor=h(I,W),Ae=W+4,T.loop_count=c(I,Ae),Ae+=2;break;case"ANMF":var te,T;(T=L.frames[F]={}).offset_x=2*f(I,W),W+=3,T.offset_y=2*f(I,W),W+=3,T.width=1+f(I,W),W+=3,T.height=1+f(I,W),W+=3,T.duration=f(I,W),W+=3,te=I[W++],T.dispose=1&te,T.blend=te>>1&1}ce!="ANMF"&&(W+=le)}return L}})(m,0);B.response=m,B.rgbaoutput=!0,B.dataurl=!1;var x=B.header?B.header:null,E=B.frames?B.frames:null;if(x){x.loop_counter=x.loop_count,u=[x.canvas_height],g=[x.canvas_width];for(var k=0;k<E.length&&E[k].blend!=0;k++);}var H=E[0],K=w.WebPDecodeRGBA(m,H.src_off,H.src_size,g,u);H.rgba=K,H.imgwidth=g[0],H.imgheight=u[0];for(var R=0;R<g[0]*u[0]*4;R++)p[R]=K[R];return this.width=g,this.height=u,this.data=p,this}function qQ(){var t,e=this.internal.__metadata__.metadata,r=unescape(encodeURIComponent(e));t=this.internal.__metadata__.rawXml?r:'<x:xmpmeta xmlns:x="adobe:ns:meta/"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:jspdf="'+this.internal.__metadata__.namespaceUri+'"><jspdf:metadata>'+r.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")+"</jspdf:metadata></rdf:Description></rdf:RDF></x:xmpmeta>",this.internal.__metadata__.metadataObjectNumber=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+t.length+" >>"),this.internal.write("stream"),this.internal.write(t),this.internal.write("endstream"),this.internal.write("endobj")}function WQ(){this.internal.__metadata__.metadataObjectNumber&&this.internal.write("/Metadata "+this.internal.__metadata__.metadataObjectNumber+" 0 R")}(function(t){var e,r,A,n,i,s,a,o,l,c=function(S){return S=S||{},this.isStrokeTransparent=S.isStrokeTransparent||!1,this.strokeOpacity=S.strokeOpacity||1,this.strokeStyle=S.strokeStyle||"#000000",this.fillStyle=S.fillStyle||"#000000",this.isFillTransparent=S.isFillTransparent||!1,this.fillOpacity=S.fillOpacity||1,this.font=S.font||"10px sans-serif",this.textBaseline=S.textBaseline||"alphabetic",this.textAlign=S.textAlign||"left",this.lineWidth=S.lineWidth||1,this.lineJoin=S.lineJoin||"miter",this.lineCap=S.lineCap||"butt",this.path=S.path||[],this.transform=S.transform!==void 0?S.transform.clone():new o,this.globalCompositeOperation=S.globalCompositeOperation||"normal",this.globalAlpha=S.globalAlpha||1,this.clip_path=S.clip_path||[],this.currentPoint=S.currentPoint||new s,this.miterLimit=S.miterLimit||10,this.lastPoint=S.lastPoint||new s,this.lineDashOffset=S.lineDashOffset||0,this.lineDash=S.lineDash||[],this.margin=S.margin||[0,0,0,0],this.prevPageLastElemOffset=S.prevPageLastElemOffset||0,this.ignoreClearRect=typeof S.ignoreClearRect!="boolean"||S.ignoreClearRect,this};t.events.push(["initialized",function(){this.context2d=new f(this),e=this.internal.f2,r=this.internal.getCoordinateString,A=this.internal.getVerticalCoordinateString,n=this.internal.getHorizontalCoordinate,i=this.internal.getVerticalCoordinate,s=this.internal.Point,a=this.internal.Rectangle,o=this.internal.Matrix,l=new c}]);var f=function(S){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var O=S;Object.defineProperty(this,"pdf",{get:function(){return O}});var P=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return P},set:function(N){P=!!N}});var z=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return z},set:function(N){z=!!N}});var ie=0;Object.defineProperty(this,"posX",{get:function(){return ie},set:function(N){isNaN(N)||(ie=N)}});var fe=0;Object.defineProperty(this,"posY",{get:function(){return fe},set:function(N){isNaN(N)||(fe=N)}}),Object.defineProperty(this,"margin",{get:function(){return l.margin},set:function(N){var ue;typeof N=="number"?ue=[N,N,N,N]:((ue=new Array(4))[0]=N[0],ue[1]=N.length>=2?N[1]:ue[0],ue[2]=N.length>=3?N[2]:ue[0],ue[3]=N.length>=4?N[3]:ue[1]),l.margin=ue}});var Z=!1;Object.defineProperty(this,"autoPaging",{get:function(){return Z},set:function(N){Z=N}});var pe=0;Object.defineProperty(this,"lastBreak",{get:function(){return pe},set:function(N){pe=N}});var we=[];Object.defineProperty(this,"pageBreaks",{get:function(){return we},set:function(N){we=N}}),Object.defineProperty(this,"ctx",{get:function(){return l},set:function(N){N instanceof c&&(l=N)}}),Object.defineProperty(this,"path",{get:function(){return l.path},set:function(N){l.path=N}});var be=[];Object.defineProperty(this,"ctxStack",{get:function(){return be},set:function(N){be=N}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(N){var ue;ue=h(N),this.ctx.fillStyle=ue.style,this.ctx.isFillTransparent=ue.a===0,this.ctx.fillOpacity=ue.a,this.pdf.setFillColor(ue.r,ue.g,ue.b,{a:ue.a}),this.pdf.setTextColor(ue.r,ue.g,ue.b,{a:ue.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(N){var ue=h(N);this.ctx.strokeStyle=ue.style,this.ctx.isStrokeTransparent=ue.a===0,this.ctx.strokeOpacity=ue.a,ue.a===0?this.pdf.setDrawColor(255,255,255):(ue.a,this.pdf.setDrawColor(ue.r,ue.g,ue.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(N){["butt","round","square"].indexOf(N)!==-1&&(this.ctx.lineCap=N,this.pdf.setLineCap(N))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(N){isNaN(N)||(this.ctx.lineWidth=N,this.pdf.setLineWidth(N))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(N){["bevel","round","miter"].indexOf(N)!==-1&&(this.ctx.lineJoin=N,this.pdf.setLineJoin(N))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(N){isNaN(N)||(this.ctx.miterLimit=N,this.pdf.setMiterLimit(N))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(N){this.ctx.textBaseline=N}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(N){["right","end","center","left","start"].indexOf(N)!==-1&&(this.ctx.textAlign=N)}});var je=null,Te=null,Q=null;Object.defineProperty(this,"fontFaces",{get:function(){return Q},set:function(N){je=null,Te=null,Q=N}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(N){var ue;if(this.ctx.font=N,(ue=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-_,\"\'\sa-z0-9]+?)\s*$/i.exec(N))!==null){var J=ue[1];ue[2];var q=ue[3],ne=ue[4];ue[5];var xe=ue[6],ye=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(ne)[2];ne=Math.floor(ye==="px"?parseFloat(ne)*this.pdf.internal.scaleFactor:ye==="em"?parseFloat(ne)*this.pdf.getFontSize():parseFloat(ne)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(ne);var he=(function($e){var _t,at,Bt=[],bt=$e.trim();if(bt==="")return Nd;if(bt in fy)return[fy[bt]];for(;bt!=="";){switch(at=null,_t=(bt=dy(bt)).charAt(0)){case'"':case"'":at=RQ(bt.substring(1),_t);break;default:at=jQ(bt)}if(at===null||(Bt.push(at[0]),(bt=dy(at[1]))!==""&&bt.charAt(0)!==","))return Nd;bt=bt.replace(/^,/,"")}return Bt})(xe);if(this.fontFaces){var Se=(function($e,_t){var at=$e.getFontList(),Bt=JSON.stringify(at);if(je===null||Te!==Bt){var bt=(function(Tt){var st=[];return Object.keys(Tt).forEach(function(Pt){Tt[Pt].forEach(function(rt){var wt=null;switch(rt){case"bold":wt={family:Pt,weight:"bold"};break;case"italic":wt={family:Pt,style:"italic"};break;case"bolditalic":wt={family:Pt,weight:"bold",style:"italic"};break;case"":case"normal":wt={family:Pt}}wt!==null&&(wt.ref={name:Pt,style:rt},st.push(wt))})}),st})(at);je=(function(Tt){for(var st={},Pt=0;Pt<Tt.length;++Pt){var rt=Td(Tt[Pt]),wt=rt.family,Kt=rt.stretch,lt=rt.style,ht=rt.weight;st[wt]=st[wt]||{},st[wt][Kt]=st[wt][Kt]||{},st[wt][Kt][lt]=st[wt][Kt][lt]||{},st[wt][Kt][lt][ht]=rt}return st})(bt.concat(_t)),Te=Bt}return je})(this.pdf,this.fontFaces),ve=he.map(function($e){return{family:$e,stretch:"normal",weight:q,style:J}}),Ce=(function($e,_t,at){for(var Bt=(at=at||{}).defaultFontFamily||"times",bt=Object.assign({},HQ,at.genericFontFamilies||{}),Tt=null,st=null,Pt=0;Pt<_t.length;++Pt)if(bt[(Tt=Td(_t[Pt])).family]&&(Tt.family=bt[Tt.family]),$e.hasOwnProperty(Tt.family)){st=$e[Tt.family];break}if(!(st=st||$e[Bt]))throw new Error("Could not find a font-family for the rule '"+hy(Tt)+"' and default family '"+Bt+"'.");if(st=(function(rt,wt){if(wt[rt])return wt[rt];var Kt=Ld[rt],lt=Kt<=Ld.normal?-1:1,ht=uy(wt,ly,Kt,lt);if(!ht)throw new Error("Could not find a matching font-stretch value for "+rt);return ht})(Tt.stretch,st),st=(function(rt,wt){if(wt[rt])return wt[rt];for(var Kt=oy[rt],lt=0;lt<Kt.length;++lt)if(wt[Kt[lt]])return wt[Kt[lt]];throw new Error("Could not find a matching font-style for "+rt)})(Tt.style,st),!(st=(function(rt,wt){if(wt[rt])return wt[rt];if(rt===400&&wt[500])return wt[500];if(rt===500&&wt[400])return wt[400];var Kt=DQ[rt],lt=uy(wt,cy,Kt,rt<400?-1:1);if(!lt)throw new Error("Could not find a matching font-weight for value "+rt);return lt})(Tt.weight,st)))throw new Error("Failed to resolve a font for the rule '"+hy(Tt)+"'.");return st})(Se,ve);this.pdf.setFont(Ce.ref.name,Ce.ref.style)}else{var Le="";(q==="bold"||parseInt(q,10)>=700||J==="bold")&&(Le="bold"),J==="italic"&&(Le+="italic"),Le.length===0&&(Le="normal");for(var Ge="",Ke={arial:"Helvetica",Arial:"Helvetica",verdana:"Helvetica",Verdana:"Helvetica",helvetica:"Helvetica",Helvetica:"Helvetica","sans-serif":"Helvetica",fixed:"Courier",monospace:"Courier",terminal:"Courier",cursive:"Times",fantasy:"Times",serif:"Times"},We=0;We<he.length;We++){if(this.pdf.internal.getFont(he[We],Le,{noFallback:!0,disableWarning:!0})!==void 0){Ge=he[We];break}if(Le==="bolditalic"&&this.pdf.internal.getFont(he[We],"bold",{noFallback:!0,disableWarning:!0})!==void 0)Ge=he[We],Le="bold";else if(this.pdf.internal.getFont(he[We],"normal",{noFallback:!0,disableWarning:!0})!==void 0){Ge=he[We],Le="normal";break}}if(Ge===""){for(var At=0;At<he.length;At++)if(Ke[he[At]]){Ge=Ke[he[At]];break}}Ge=Ge===""?"Times":Ge,this.pdf.setFont(Ge,Le)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(N){this.ctx.globalCompositeOperation=N}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(N){this.ctx.globalAlpha=N}}),Object.defineProperty(this,"lineDashOffset",{get:function(){return this.ctx.lineDashOffset},set:function(N){this.ctx.lineDashOffset=N,T.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(N){this.ctx.lineDash=N,T.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(N){this.ctx.ignoreClearRect=!!N}})};f.prototype.setLineDash=function(S){this.lineDash=S},f.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},f.prototype.fill=function(){E.call(this,"fill",!1)},f.prototype.stroke=function(){E.call(this,"stroke",!1)},f.prototype.beginPath=function(){this.path=[{type:"begin"}]},f.prototype.moveTo=function(S,O){if(isNaN(S)||isNaN(O))throw nr.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.moveTo");var P=this.ctx.transform.applyToPoint(new s(S,O));this.path.push({type:"mt",x:P.x,y:P.y}),this.ctx.lastPoint=new s(S,O)},f.prototype.closePath=function(){var S=new s(0,0),O=0;for(O=this.path.length-1;O!==-1;O--)if(this.path[O].type==="begin"&&$t(this.path[O+1])==="object"&&typeof this.path[O+1].x=="number"){S=new s(this.path[O+1].x,this.path[O+1].y);break}this.path.push({type:"close"}),this.ctx.lastPoint=new s(S.x,S.y)},f.prototype.lineTo=function(S,O){if(isNaN(S)||isNaN(O))throw nr.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.lineTo");var P=this.ctx.transform.applyToPoint(new s(S,O));this.path.push({type:"lt",x:P.x,y:P.y}),this.ctx.lastPoint=new s(P.x,P.y)},f.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),E.call(this,null,!0)},f.prototype.quadraticCurveTo=function(S,O,P,z){if(isNaN(P)||isNaN(z)||isNaN(S)||isNaN(O))throw nr.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var ie=this.ctx.transform.applyToPoint(new s(P,z)),fe=this.ctx.transform.applyToPoint(new s(S,O));this.path.push({type:"qct",x1:fe.x,y1:fe.y,x:ie.x,y:ie.y}),this.ctx.lastPoint=new s(ie.x,ie.y)},f.prototype.bezierCurveTo=function(S,O,P,z,ie,fe){if(isNaN(ie)||isNaN(fe)||isNaN(S)||isNaN(O)||isNaN(P)||isNaN(z))throw nr.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var Z=this.ctx.transform.applyToPoint(new s(ie,fe)),pe=this.ctx.transform.applyToPoint(new s(S,O)),we=this.ctx.transform.applyToPoint(new s(P,z));this.path.push({type:"bct",x1:pe.x,y1:pe.y,x2:we.x,y2:we.y,x:Z.x,y:Z.y}),this.ctx.lastPoint=new s(Z.x,Z.y)},f.prototype.arc=function(S,O,P,z,ie,fe){if(isNaN(S)||isNaN(O)||isNaN(P)||isNaN(z)||isNaN(ie))throw nr.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");if(fe=!!fe,!this.ctx.transform.isIdentity){var Z=this.ctx.transform.applyToPoint(new s(S,O));S=Z.x,O=Z.y;var pe=this.ctx.transform.applyToPoint(new s(0,P)),we=this.ctx.transform.applyToPoint(new s(0,0));P=Math.sqrt(Math.pow(pe.x-we.x,2)+Math.pow(pe.y-we.y,2))}Math.abs(ie-z)>=2*Math.PI&&(z=0,ie=2*Math.PI),this.path.push({type:"arc",x:S,y:O,radius:P,startAngle:z,endAngle:ie,counterclockwise:fe})},f.prototype.arcTo=function(S,O,P,z,ie){throw new Error("arcTo not implemented.")},f.prototype.rect=function(S,O,P,z){if(isNaN(S)||isNaN(O)||isNaN(P)||isNaN(z))throw nr.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(S,O),this.lineTo(S+P,O),this.lineTo(S+P,O+z),this.lineTo(S,O+z),this.lineTo(S,O),this.lineTo(S+P,O),this.lineTo(S,O)},f.prototype.fillRect=function(S,O,P,z){if(isNaN(S)||isNaN(O)||isNaN(P)||isNaN(z))throw nr.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!u.call(this)){var ie={};this.lineCap!=="butt"&&(ie.lineCap=this.lineCap,this.lineCap="butt"),this.lineJoin!=="miter"&&(ie.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(S,O,P,z),this.fill(),ie.hasOwnProperty("lineCap")&&(this.lineCap=ie.lineCap),ie.hasOwnProperty("lineJoin")&&(this.lineJoin=ie.lineJoin)}},f.prototype.strokeRect=function(S,O,P,z){if(isNaN(S)||isNaN(O)||isNaN(P)||isNaN(z))throw nr.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");g.call(this)||(this.beginPath(),this.rect(S,O,P,z),this.stroke())},f.prototype.clearRect=function(S,O,P,z){if(isNaN(S)||isNaN(O)||isNaN(P)||isNaN(z))throw nr.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(S,O,P,z))},f.prototype.save=function(S){S=typeof S!="boolean"||S;for(var O=this.pdf.internal.getCurrentPageInfo().pageNumber,P=0;P<this.pdf.internal.getNumberOfPages();P++)this.pdf.setPage(P+1),this.pdf.internal.out("q");if(this.pdf.setPage(O),S){this.ctx.fontSize=this.pdf.internal.getFontSize();var z=new c(this.ctx);this.ctxStack.push(this.ctx),this.ctx=z}},f.prototype.restore=function(S){S=typeof S!="boolean"||S;for(var O=this.pdf.internal.getCurrentPageInfo().pageNumber,P=0;P<this.pdf.internal.getNumberOfPages();P++)this.pdf.setPage(P+1),this.pdf.internal.out("Q");this.pdf.setPage(O),S&&this.ctxStack.length!==0&&(this.ctx=this.ctxStack.pop(),this.fillStyle=this.ctx.fillStyle,this.strokeStyle=this.ctx.strokeStyle,this.font=this.ctx.font,this.lineCap=this.ctx.lineCap,this.lineWidth=this.ctx.lineWidth,this.lineJoin=this.ctx.lineJoin,this.lineDash=this.ctx.lineDash,this.lineDashOffset=this.ctx.lineDashOffset)},f.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.")};var h=function(S){var O,P,z,ie;if(S.isCanvasGradient===!0&&(S=S.getColor()),!S)return{r:0,g:0,b:0,a:0,style:S};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(S))O=0,P=0,z=0,ie=0;else{var fe=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(S);if(fe!==null)O=parseInt(fe[1]),P=parseInt(fe[2]),z=parseInt(fe[3]),ie=1;else if((fe=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(S))!==null)O=parseInt(fe[1]),P=parseInt(fe[2]),z=parseInt(fe[3]),ie=parseFloat(fe[4]);else{if(ie=1,typeof S=="string"&&S.charAt(0)!=="#"){var Z=new Yw(S);S=Z.ok?Z.toHex():"#000000"}S.length===4?(O=S.substring(1,2),O+=O,P=S.substring(2,3),P+=P,z=S.substring(3,4),z+=z):(O=S.substring(1,3),P=S.substring(3,5),z=S.substring(5,7)),O=parseInt(O,16),P=parseInt(P,16),z=parseInt(z,16)}}return{r:O,g:P,b:z,a:ie,style:S}},u=function(){return this.ctx.isFillTransparent||this.globalAlpha==0},g=function(){return!!(this.ctx.isStrokeTransparent||this.globalAlpha==0)};f.prototype.fillText=function(S,O,P,z){if(isNaN(O)||isNaN(P)||typeof S!="string")throw nr.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");if(z=isNaN(z)?void 0:z,!u.call(this)){var ie=le(this.ctx.transform.rotation),fe=this.ctx.transform.scaleX;F.call(this,{text:S,x:O,y:P,scale:fe,angle:ie,align:this.textAlign,maxWidth:z})}},f.prototype.strokeText=function(S,O,P,z){if(isNaN(O)||isNaN(P)||typeof S!="string")throw nr.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!g.call(this)){z=isNaN(z)?void 0:z;var ie=le(this.ctx.transform.rotation),fe=this.ctx.transform.scaleX;F.call(this,{text:S,x:O,y:P,scale:fe,renderingMode:"stroke",angle:ie,align:this.textAlign,maxWidth:z})}},f.prototype.measureText=function(S){if(typeof S!="string")throw nr.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var O=this.pdf,P=this.pdf.internal.scaleFactor,z=O.internal.getFontSize(),ie=O.getStringUnitWidth(S)*z/O.internal.scaleFactor;return new function(fe){var Z=(fe=fe||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return Z}}),this}({width:ie*=Math.round(96*P/72*1e4)/1e4})},f.prototype.scale=function(S,O){if(isNaN(S)||isNaN(O))throw nr.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var P=new o(S,0,0,O,0,0);this.ctx.transform=this.ctx.transform.multiply(P)},f.prototype.rotate=function(S){if(isNaN(S))throw nr.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");var O=new o(Math.cos(S),Math.sin(S),-Math.sin(S),Math.cos(S),0,0);this.ctx.transform=this.ctx.transform.multiply(O)},f.prototype.translate=function(S,O){if(isNaN(S)||isNaN(O))throw nr.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var P=new o(1,0,0,1,S,O);this.ctx.transform=this.ctx.transform.multiply(P)},f.prototype.transform=function(S,O,P,z,ie,fe){if(isNaN(S)||isNaN(O)||isNaN(P)||isNaN(z)||isNaN(ie)||isNaN(fe))throw nr.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var Z=new o(S,O,P,z,ie,fe);this.ctx.transform=this.ctx.transform.multiply(Z)},f.prototype.setTransform=function(S,O,P,z,ie,fe){S=isNaN(S)?1:S,O=isNaN(O)?0:O,P=isNaN(P)?0:P,z=isNaN(z)?1:z,ie=isNaN(ie)?0:ie,fe=isNaN(fe)?0:fe,this.ctx.transform=new o(S,O,P,z,ie,fe)};var p=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};f.prototype.drawImage=function(S,O,P,z,ie,fe,Z,pe,we){var be=this.pdf.getImageProperties(S),je=1,Te=1,Q=1,N=1;z!==void 0&&pe!==void 0&&(Q=pe/z,N=we/ie,je=be.width/z*pe/z,Te=be.height/ie*we/ie),fe===void 0&&(fe=O,Z=P,O=0,P=0),z!==void 0&&pe===void 0&&(pe=z,we=ie),z===void 0&&pe===void 0&&(pe=be.width,we=be.height);var ue=this.ctx.transform.decompose(),J=le(ue.rotate.shx),q=new o,ne=(q=(q=(q=q.multiply(ue.translate)).multiply(ue.skew)).multiply(ue.scale)).applyToRectangle(new a(fe-O*Q,Z-P*N,z*je,ie*Te));if(this.autoPaging){for(var xe,ye=w.call(this,ne),he=[],Se=0;Se<ye.length;Se+=1)he.indexOf(ye[Se])===-1&&he.push(ye[Se]);x(he);for(var ve=he[0],Ce=he[he.length-1],Le=ve;Le<Ce+1;Le++){this.pdf.setPage(Le);var Ge=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],Ke=Le===1?this.posY+this.margin[0]:this.margin[0],We=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],At=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],$e=Le===1?0:We+(Le-2)*At;if(this.ctx.clip_path.length!==0){var _t=this.path;xe=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=B(xe,this.posX+this.margin[3],-$e+Ke+this.ctx.prevPageLastElemOffset),k.call(this,"fill",!0),this.path=_t}var at=JSON.parse(JSON.stringify(ne));at=B([at],this.posX+this.margin[3],-$e+Ke+this.ctx.prevPageLastElemOffset)[0];var Bt=(Le>ve||Le<Ce)&&p.call(this);Bt&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],Ge,At,null).clip().discardPath()),this.pdf.addImage(S,"JPEG",at.x,at.y,at.w,at.h,null,null,J),Bt&&this.pdf.restoreGraphicsState()}}else this.pdf.addImage(S,"JPEG",ne.x,ne.y,ne.w,ne.h,null,null,J)};var w=function(S,O,P){var z=[];O=O||this.pdf.internal.pageSize.width,P=P||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var ie=this.posY+this.ctx.prevPageLastElemOffset;switch(S.type){default:case"mt":case"lt":z.push(Math.floor((S.y+ie)/P)+1);break;case"arc":z.push(Math.floor((S.y+ie-S.radius)/P)+1),z.push(Math.floor((S.y+ie+S.radius)/P)+1);break;case"qct":var fe=Ae(this.ctx.lastPoint.x,this.ctx.lastPoint.y,S.x1,S.y1,S.x,S.y);z.push(Math.floor((fe.y+ie)/P)+1),z.push(Math.floor((fe.y+fe.h+ie)/P)+1);break;case"bct":var Z=te(this.ctx.lastPoint.x,this.ctx.lastPoint.y,S.x1,S.y1,S.x2,S.y2,S.x,S.y);z.push(Math.floor((Z.y+ie)/P)+1),z.push(Math.floor((Z.y+Z.h+ie)/P)+1);break;case"rect":z.push(Math.floor((S.y+ie)/P)+1),z.push(Math.floor((S.y+S.h+ie)/P)+1)}for(var pe=0;pe<z.length;pe+=1)for(;this.pdf.internal.getNumberOfPages()<z[pe];)m.call(this);return z},m=function(){var S=this.fillStyle,O=this.strokeStyle,P=this.font,z=this.lineCap,ie=this.lineWidth,fe=this.lineJoin;this.pdf.addPage(),this.fillStyle=S,this.strokeStyle=O,this.font=P,this.lineCap=z,this.lineWidth=ie,this.lineJoin=fe},B=function(S,O,P){for(var z=0;z<S.length;z++)switch(S[z].type){case"bct":S[z].x2+=O,S[z].y2+=P;case"qct":S[z].x1+=O,S[z].y1+=P;default:S[z].x+=O,S[z].y+=P}return S},x=function(S){return S.sort(function(O,P){return O-P})},E=function(S,O){var P=this.fillStyle,z=this.strokeStyle,ie=this.lineCap,fe=this.lineWidth,Z=Math.abs(fe*this.ctx.transform.scaleX),pe=this.lineJoin;if(this.autoPaging){for(var we,be,je=JSON.parse(JSON.stringify(this.path)),Te=JSON.parse(JSON.stringify(this.path)),Q=[],N=0;N<Te.length;N++)if(Te[N].x!==void 0)for(var ue=w.call(this,Te[N]),J=0;J<ue.length;J+=1)Q.indexOf(ue[J])===-1&&Q.push(ue[J]);for(var q=0;q<Q.length;q++)for(;this.pdf.internal.getNumberOfPages()<Q[q];)m.call(this);x(Q);for(var ne=Q[0],xe=Q[Q.length-1],ye=ne;ye<xe+1;ye++){this.pdf.setPage(ye),this.fillStyle=P,this.strokeStyle=z,this.lineCap=ie,this.lineWidth=Z,this.lineJoin=pe;var he=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],Se=ye===1?this.posY+this.margin[0]:this.margin[0],ve=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],Ce=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],Le=ye===1?0:ve+(ye-2)*Ce;if(this.ctx.clip_path.length!==0){var Ge=this.path;we=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=B(we,this.posX+this.margin[3],-Le+Se+this.ctx.prevPageLastElemOffset),k.call(this,S,!0),this.path=Ge}if(be=JSON.parse(JSON.stringify(je)),this.path=B(be,this.posX+this.margin[3],-Le+Se+this.ctx.prevPageLastElemOffset),O===!1||ye===0){var Ke=(ye>ne||ye<xe)&&p.call(this);Ke&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],he,Ce,null).clip().discardPath()),k.call(this,S,O),Ke&&this.pdf.restoreGraphicsState()}this.lineWidth=fe}this.path=je}else this.lineWidth=Z,k.call(this,S,O),this.lineWidth=fe},k=function(S,O){if((S!=="stroke"||O||!g.call(this))&&(S==="stroke"||O||!u.call(this))){for(var P,z,ie=[],fe=this.path,Z=0;Z<fe.length;Z++){var pe=fe[Z];switch(pe.type){case"begin":ie.push({begin:!0});break;case"close":ie.push({close:!0});break;case"mt":ie.push({start:pe,deltas:[],abs:[]});break;case"lt":var we=ie.length;if(fe[Z-1]&&!isNaN(fe[Z-1].x)&&(P=[pe.x-fe[Z-1].x,pe.y-fe[Z-1].y],we>0)){for(;we>=0;we--)if(ie[we-1].close!==!0&&ie[we-1].begin!==!0){ie[we-1].deltas.push(P),ie[we-1].abs.push(pe);break}}break;case"bct":P=[pe.x1-fe[Z-1].x,pe.y1-fe[Z-1].y,pe.x2-fe[Z-1].x,pe.y2-fe[Z-1].y,pe.x-fe[Z-1].x,pe.y-fe[Z-1].y],ie[ie.length-1].deltas.push(P);break;case"qct":var be=fe[Z-1].x+2/3*(pe.x1-fe[Z-1].x),je=fe[Z-1].y+2/3*(pe.y1-fe[Z-1].y),Te=pe.x+2/3*(pe.x1-pe.x),Q=pe.y+2/3*(pe.y1-pe.y),N=pe.x,ue=pe.y;P=[be-fe[Z-1].x,je-fe[Z-1].y,Te-fe[Z-1].x,Q-fe[Z-1].y,N-fe[Z-1].x,ue-fe[Z-1].y],ie[ie.length-1].deltas.push(P);break;case"arc":ie.push({deltas:[],abs:[],arc:!0}),Array.isArray(ie[ie.length-1].abs)&&ie[ie.length-1].abs.push(pe)}}z=O?null:S==="stroke"?"stroke":"fill";for(var J=!1,q=0;q<ie.length;q++)if(ie[q].arc)for(var ne=ie[q].abs,xe=0;xe<ne.length;xe++){var ye=ne[xe];ye.type==="arc"?R.call(this,ye.x,ye.y,ye.radius,ye.startAngle,ye.endAngle,ye.counterclockwise,void 0,O,!J):M.call(this,ye.x,ye.y),J=!0}else if(ie[q].close===!0)this.pdf.internal.out("h"),J=!1;else if(ie[q].begin!==!0){var he=ie[q].start.x,Se=ie[q].start.y;b.call(this,ie[q].deltas,he,Se),J=!0}z&&I.call(this,z),O&&W.call(this)}},H=function(S){var O=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,P=O*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return S-P;case"top":return S+O-P;case"hanging":return S+O-2*P;case"middle":return S+O/2-P;default:return S}},K=function(S){return S+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};f.prototype.createLinearGradient=function(){var S=function(){};return S.colorStops=[],S.addColorStop=function(O,P){this.colorStops.push([O,P])},S.getColor=function(){return this.colorStops.length===0?"#000000":this.colorStops[0][1]},S.isCanvasGradient=!0,S},f.prototype.createPattern=function(){return this.createLinearGradient()},f.prototype.createRadialGradient=function(){return this.createLinearGradient()};var R=function(S,O,P,z,ie,fe,Z,pe,we){for(var be=ce.call(this,P,z,ie,fe),je=0;je<be.length;je++){var Te=be[je];je===0&&(we?L.call(this,Te.x1+S,Te.y1+O):M.call(this,Te.x1+S,Te.y1+O)),Y.call(this,S,O,Te.x2,Te.y2,Te.x3,Te.y3,Te.x4,Te.y4)}pe?W.call(this):I.call(this,Z)},I=function(S){switch(S){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},W=function(){this.pdf.clip(),this.pdf.discardPath()},L=function(S,O){this.pdf.internal.out(r(S)+" "+A(O)+" m")},F=function(S){var O;switch(S.align){case"right":case"end":O="right";break;case"center":O="center";break;default:O="left"}var P,z,ie,fe=this.pdf.getTextDimensions(S.text),Z=H.call(this,S.y),pe=K.call(this,Z)-fe.h,we=this.ctx.transform.applyToPoint(new s(S.x,Z));if(this.autoPaging){var be=this.ctx.transform.decompose(),je=new o;je=(je=(je=je.multiply(be.translate)).multiply(be.skew)).multiply(be.scale);for(var Te=this.ctx.transform.applyToRectangle(new a(S.x,Z,fe.w,fe.h)),Q=je.applyToRectangle(new a(S.x,pe,fe.w,fe.h)),N=w.call(this,Q),ue=[],J=0;J<N.length;J+=1)ue.indexOf(N[J])===-1&&ue.push(N[J]);x(ue);for(var q=ue[0],ne=ue[ue.length-1],xe=q;xe<ne+1;xe++){this.pdf.setPage(xe);var ye=xe===1?this.posY+this.margin[0]:this.margin[0],he=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],Se=this.pdf.internal.pageSize.height-this.margin[2],ve=Se-this.margin[0],Ce=this.pdf.internal.pageSize.width-this.margin[1],Le=Ce-this.margin[3],Ge=xe===1?0:he+(xe-2)*ve;if(this.ctx.clip_path.length!==0){var Ke=this.path;P=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=B(P,this.posX+this.margin[3],-1*Ge+ye),k.call(this,"fill",!0),this.path=Ke}var We=B([JSON.parse(JSON.stringify(Q))],this.posX+this.margin[3],-Ge+ye+this.ctx.prevPageLastElemOffset)[0];S.scale>=.01&&(z=this.pdf.internal.getFontSize(),this.pdf.setFontSize(z*S.scale),ie=this.lineWidth,this.lineWidth=ie*S.scale);var At=this.autoPaging!=="text";if(At||We.y+We.h<=Se){if(At||We.y>=ye&&We.x<=Ce){var $e=At?S.text:this.pdf.splitTextToSize(S.text,S.maxWidth||Ce-We.x)[0],_t=B([JSON.parse(JSON.stringify(Te))],this.posX+this.margin[3],-Ge+ye+this.ctx.prevPageLastElemOffset)[0],at=At&&(xe>q||xe<ne)&&p.call(this);at&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],Le,ve,null).clip().discardPath()),this.pdf.text($e,_t.x,_t.y,{angle:S.angle,align:O,renderingMode:S.renderingMode}),at&&this.pdf.restoreGraphicsState()}}else We.y<Se&&(this.ctx.prevPageLastElemOffset+=Se-We.y);S.scale>=.01&&(this.pdf.setFontSize(z),this.lineWidth=ie)}}else S.scale>=.01&&(z=this.pdf.internal.getFontSize(),this.pdf.setFontSize(z*S.scale),ie=this.lineWidth,this.lineWidth=ie*S.scale),this.pdf.text(S.text,we.x+this.posX,we.y+this.posY,{angle:S.angle,align:O,renderingMode:S.renderingMode,maxWidth:S.maxWidth}),S.scale>=.01&&(this.pdf.setFontSize(z),this.lineWidth=ie)},M=function(S,O,P,z){P=P||0,z=z||0,this.pdf.internal.out(r(S+P)+" "+A(O+z)+" l")},b=function(S,O,P){return this.pdf.lines(S,O,P,null,null)},Y=function(S,O,P,z,ie,fe,Z,pe){this.pdf.internal.out([e(n(P+S)),e(i(z+O)),e(n(ie+S)),e(i(fe+O)),e(n(Z+S)),e(i(pe+O)),"c"].join(" "))},ce=function(S,O,P,z){for(var ie=2*Math.PI,fe=Math.PI/2;O>P;)O-=ie;var Z=Math.abs(P-O);Z<ie&&z&&(Z=ie-Z);for(var pe=[],we=z?-1:1,be=O;Z>1e-5;){var je=be+we*Math.min(Z,fe);pe.push(ee.call(this,S,be,je)),Z-=Math.abs(je-be),be=je}return pe},ee=function(S,O,P){var z=(P-O)/2,ie=S*Math.cos(z),fe=S*Math.sin(z),Z=ie,pe=-fe,we=Z*Z+pe*pe,be=we+Z*ie+pe*fe,je=4/3*(Math.sqrt(2*we*be)-be)/(Z*fe-pe*ie),Te=Z-je*pe,Q=pe+je*Z,N=Te,ue=-Q,J=z+O,q=Math.cos(J),ne=Math.sin(J);return{x1:S*Math.cos(O),y1:S*Math.sin(O),x2:Te*q-Q*ne,y2:Te*ne+Q*q,x3:N*q-ue*ne,y3:N*ne+ue*q,x4:S*Math.cos(P),y4:S*Math.sin(P)}},le=function(S){return 180*S/Math.PI},Ae=function(S,O,P,z,ie,fe){var Z=S+.5*(P-S),pe=O+.5*(z-O),we=ie+.5*(P-ie),be=fe+.5*(z-fe),je=Math.min(S,ie,Z,we),Te=Math.max(S,ie,Z,we),Q=Math.min(O,fe,pe,be),N=Math.max(O,fe,pe,be);return new a(je,Q,Te-je,N-Q)},te=function(S,O,P,z,ie,fe,Z,pe){var we,be,je,Te,Q,N,ue,J,q,ne,xe,ye,he,Se,ve=P-S,Ce=z-O,Le=ie-P,Ge=fe-z,Ke=Z-ie,We=pe-fe;for(be=0;be<41;be++)q=(ue=(je=S+(we=be/40)*ve)+we*((Q=P+we*Le)-je))+we*(Q+we*(ie+we*Ke-Q)-ue),ne=(J=(Te=O+we*Ce)+we*((N=z+we*Ge)-Te))+we*(N+we*(fe+we*We-N)-J),be==0?(xe=q,ye=ne,he=q,Se=ne):(xe=Math.min(xe,q),ye=Math.min(ye,ne),he=Math.max(he,q),Se=Math.max(Se,ne));return new a(Math.round(xe),Math.round(ye),Math.round(he-xe),Math.round(Se-ye))},T=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var S,O,P=(S=this.ctx.lineDash,O=this.ctx.lineDashOffset,JSON.stringify({lineDash:S,lineDashOffset:O}));this.prevLineDash!==P&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=P)}}})(dt.API),(function(t){var e=function(s){var a,o,l,c,f,h,u,g,p,w;for(o=[],l=0,c=(s+=a="\0\0\0\0".slice(s.length%4||4)).length;c>l;l+=4)(f=(s.charCodeAt(l)<<24)+(s.charCodeAt(l+1)<<16)+(s.charCodeAt(l+2)<<8)+s.charCodeAt(l+3))!==0?(h=(f=((f=((f=((f=(f-(w=f%85))/85)-(p=f%85))/85)-(g=f%85))/85)-(u=f%85))/85)%85,o.push(h+33,u+33,g+33,p+33,w+33)):o.push(122);return(function(m,B){for(var x=B;x>0;x--)m.pop()})(o,a.length),String.fromCharCode.apply(String,o)+"~>"},r=function(s){var a,o,l,c,f,h=String,u="length",g=255,p="charCodeAt",w="slice",m="replace";for(s[w](-2),s=s[w](0,-2)[m](/\s/g,"")[m]("z","!!!!!"),l=[],c=0,f=(s+=a="uuuuu"[w](s[u]%5||5))[u];f>c;c+=5)o=52200625*(s[p](c)-33)+614125*(s[p](c+1)-33)+7225*(s[p](c+2)-33)+85*(s[p](c+3)-33)+(s[p](c+4)-33),l.push(g&o>>24,g&o>>16,g&o>>8,g&o);return(function(B,x){for(var E=x;E>0;E--)B.pop()})(l,a[u]),h.fromCharCode.apply(h,l)},A=function(s){return s.split("").map(function(a){return("0"+a.charCodeAt().toString(16)).slice(-2)}).join("")+">"},n=function(s){var a=new RegExp(/^([0-9A-Fa-f]{2})+$/);if((s=s.replace(/\s/g,"")).indexOf(">")!==-1&&(s=s.substr(0,s.indexOf(">"))),s.length%2&&(s+="0"),a.test(s)===!1)return"";for(var o="",l=0;l<s.length;l+=2)o+=String.fromCharCode("0x"+(s[l]+s[l+1]));return o},i=function(s){for(var a=new Uint8Array(s.length),o=s.length;o--;)a[o]=s.charCodeAt(o);return(a=od(a)).reduce(function(l,c){return l+String.fromCharCode(c)},"")};t.processDataByFilters=function(s,a){var o=0,l=s||"",c=[];for(typeof(a=a||[])=="string"&&(a=[a]),o=0;o<a.length;o+=1)switch(a[o]){case"ASCII85Decode":case"/ASCII85Decode":l=r(l),c.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":l=e(l),c.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":l=n(l),c.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":l=A(l),c.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":l=i(l),c.push("/FlateDecode");break;default:throw new Error('The filter: "'+a[o]+'" is not implemented')}return{data:l,reverseChain:c.reverse().join(" ")}}})(dt.API),(function(t){t.loadFile=function(e,r,A){return(function(n,i,s){i=i!==!1,s=typeof s=="function"?s:function(){};var a=void 0;try{a=(function(o,l,c){var f=new XMLHttpRequest,h=0,u=function(g){var p=g.length,w=[],m=String.fromCharCode;for(h=0;h<p;h+=1)w.push(m(255&g.charCodeAt(h)));return w.join("")};if(f.open("GET",o,!l),f.overrideMimeType("text/plain; charset=x-user-defined"),l===!1&&(f.onload=function(){f.status===200?c(u(this.responseText)):c(void 0)}),f.send(null),l&&f.status===200)return u(f.responseText)})(n,i,s)}catch{}return a})(e,r,A)},t.allowFsRead=void 0,t.loadImageFile=t.loadFile})(dt.API),(function(t){function e(){return(St.html2canvas?Promise.resolve(St.html2canvas):Promise.resolve().then(()=>bR)).catch(function(a){return Promise.reject(new Error("Could not load html2canvas: "+a))}).then(function(a){return a.default?a.default:a})}function r(){return(St.DOMPurify?Promise.resolve(St.DOMPurify):Promise.resolve().then(()=>r9)).catch(function(a){return Promise.reject(new Error("Could not load dompurify: "+a))}).then(function(a){return a.default?a.default:a})}var A=function(a){var o=$t(a);return o==="undefined"?"undefined":o==="string"||a instanceof String?"string":o==="number"||a instanceof Number?"number":o==="function"||a instanceof Function?"function":a&&a.constructor===Array?"array":a&&a.nodeType===1?"element":o==="object"?"object":"unknown"},n=function(a,o){var l=document.createElement(a);for(var c in o.className&&(l.className=o.className),o.innerHTML&&o.dompurify&&(l.innerHTML=o.dompurify.sanitize(o.innerHTML)),o.style)l.style[c]=o.style[c];return l},i=function a(o,l){for(var c=o.nodeType===3?document.createTextNode(o.nodeValue):o.cloneNode(!1),f=o.firstChild;f;f=f.nextSibling)l!==!0&&f.nodeType===1&&f.nodeName==="SCRIPT"||c.appendChild(a(f,l));return o.nodeType===1&&(o.nodeName==="CANVAS"?(c.width=o.width,c.height=o.height,c.getContext("2d").drawImage(o,0,0)):o.nodeName!=="TEXTAREA"&&o.nodeName!=="SELECT"||(c.value=o.value),c.addEventListener("load",function(){c.scrollTop=o.scrollTop,c.scrollLeft=o.scrollLeft},!0)),c},s=function a(o){var l=Object.assign(a.convert(Promise.resolve()),JSON.parse(JSON.stringify(a.template))),c=a.convert(Promise.resolve(),l);return(c=c.setProgress(1,a,1,[a])).set(o)};(s.prototype=Object.create(Promise.prototype)).constructor=s,s.convert=function(a,o){return a.__proto__=o||s.prototype,a},s.template={prop:{src:null,container:null,overlay:null,canvas:null,img:null,pdf:null,pageSize:null,callback:function(){}},progress:{val:0,state:null,n:0,stack:[]},opt:{filename:"file.pdf",margin:[0,0,0,0],enableLinks:!0,x:0,y:0,html2canvas:{},jsPDF:{},backgroundColor:"transparent"}},s.prototype.from=function(a,o){return this.then(function(){switch(o=o||(function(l){switch(A(l)){case"string":return"string";case"element":return l.nodeName.toLowerCase()==="canvas"?"canvas":"element";default:return"unknown"}})(a),o){case"string":return this.then(r).then(function(l){return this.set({src:n("div",{innerHTML:a,dompurify:l})})});case"element":return this.set({src:a});case"canvas":return this.set({canvas:a});case"img":return this.set({img:a});default:return this.error("Unknown source type.")}})},s.prototype.to=function(a){switch(a){case"container":return this.toContainer();case"canvas":return this.toCanvas();case"img":return this.toImg();case"pdf":return this.toPdf();default:return this.error("Invalid target.")}},s.prototype.toContainer=function(){return this.thenList([function(){return this.prop.src||this.error("Cannot duplicate - no source HTML.")},function(){return this.prop.pageSize||this.setPageSize()}]).then(function(){var a={position:"relative",display:"inline-block",width:(typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?Math.max(this.prop.src.clientWidth,this.prop.src.scrollWidth,this.prop.src.offsetWidth):this.opt.windowWidth)+"px",left:0,right:0,top:0,margin:"auto",backgroundColor:this.opt.backgroundColor},o=i(this.prop.src,this.opt.html2canvas.javascriptEnabled);o.tagName==="BODY"&&(a.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=n("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=n("div",{className:"html2pdf__container",style:a}),this.prop.container.appendChild(o),this.prop.container.firstChild.appendChild(n("div",{style:{clear:"both",border:"0 none transparent",margin:0,padding:0,height:0}})),this.prop.container.style.float="none",this.prop.overlay.appendChild(this.prop.container),document.body.appendChild(this.prop.overlay),this.prop.container.firstChild.style.position="relative",this.prop.container.height=Math.max(this.prop.container.firstChild.clientHeight,this.prop.container.firstChild.scrollHeight,this.prop.container.firstChild.offsetHeight)+"px"})},s.prototype.toCanvas=function(){var a=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(a).then(e).then(function(o){var l=Object.assign({},this.opt.html2canvas);return delete l.onrendered,o(this.prop.container,l)}).then(function(o){(this.opt.html2canvas.onrendered||function(){})(o),this.prop.canvas=o,document.body.removeChild(this.prop.overlay)})},s.prototype.toContext2d=function(){var a=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(a).then(e).then(function(o){var l=this.opt.jsPDF,c=this.opt.fontFaces,f=typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?1:this.opt.width/this.opt.windowWidth,h=Object.assign({async:!0,allowTaint:!0,scale:f,scrollX:this.opt.scrollX||0,scrollY:this.opt.scrollY||0,backgroundColor:"#ffffff",imageTimeout:15e3,logging:!0,proxy:null,removeContainer:!0,foreignObjectRendering:!1,useCORS:!1},this.opt.html2canvas);if(delete h.onrendered,l.context2d.autoPaging=this.opt.autoPaging===void 0||this.opt.autoPaging,l.context2d.posX=this.opt.x,l.context2d.posY=this.opt.y,l.context2d.margin=this.opt.margin,l.context2d.fontFaces=c,c)for(var u=0;u<c.length;++u){var g=c[u],p=g.src.find(function(w){return w.format==="truetype"});p&&l.addFont(p.url,g.ref.name,g.ref.style)}return h.windowHeight=h.windowHeight||0,h.windowHeight=h.windowHeight==0?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):h.windowHeight,l.context2d.save(!0),o(this.prop.container,h)}).then(function(o){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(o),this.prop.canvas=o,document.body.removeChild(this.prop.overlay)})},s.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var a=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=a})},s.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF})},s.prototype.output=function(a,o,l){return(l=l||"pdf").toLowerCase()==="img"||l.toLowerCase()==="image"?this.outputImg(a,o):this.outputPdf(a,o)},s.prototype.outputPdf=function(a,o){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(a,o)})},s.prototype.outputImg=function(a){return this.thenList([function(){return this.prop.img||this.toImg()}]).then(function(){switch(a){case void 0:case"img":return this.prop.img;case"datauristring":case"dataurlstring":return this.prop.img.src;case"datauri":case"dataurl":return document.location.href=this.prop.img.src;default:throw'Image output type "'+a+'" is not supported.'}})},s.prototype.save=function(a){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(a?{filename:a}:null).then(function(){this.prop.pdf.save(this.opt.filename)})},s.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf)})},s.prototype.set=function(a){if(A(a)!=="object")return this;var o=Object.keys(a||{}).map(function(l){if(l in s.template.prop)return function(){this.prop[l]=a[l]};switch(l){case"margin":return this.setMargin.bind(this,a.margin);case"jsPDF":return function(){return this.opt.jsPDF=a.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,a.pageSize);default:return function(){this.opt[l]=a[l]}}},this);return this.then(function(){return this.thenList(o)})},s.prototype.get=function(a,o){return this.then(function(){var l=a in s.template.prop?this.prop[a]:this.opt[a];return o?o(l):l})},s.prototype.setMargin=function(a){return this.then(function(){switch(A(a)){case"number":a=[a,a,a,a];case"array":if(a.length===2&&(a=[a[0],a[1],a[0],a[1]]),a.length===4)break;default:return this.error("Invalid margin array.")}this.opt.margin=a}).then(this.setPageSize)},s.prototype.setPageSize=function(a){function o(l,c){return Math.floor(l*c/72*96)}return this.then(function(){(a=a||dt.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(a.inner={width:a.width-this.opt.margin[1]-this.opt.margin[3],height:a.height-this.opt.margin[0]-this.opt.margin[2]},a.inner.px={width:o(a.inner.width,a.k),height:o(a.inner.height,a.k)},a.inner.ratio=a.inner.height/a.inner.width),this.prop.pageSize=a})},s.prototype.setProgress=function(a,o,l,c){return a!=null&&(this.progress.val=a),o!=null&&(this.progress.state=o),l!=null&&(this.progress.n=l),c!=null&&(this.progress.stack=c),this.progress.ratio=this.progress.val/this.progress.state,this},s.prototype.updateProgress=function(a,o,l,c){return this.setProgress(a?this.progress.val+a:null,o||null,l?this.progress.n+l:null,c?this.progress.stack.concat(c):null)},s.prototype.then=function(a,o){var l=this;return this.thenCore(a,o,function(c,f){return l.updateProgress(null,null,1,[c]),Promise.prototype.then.call(this,function(h){return l.updateProgress(null,c),h}).then(c,f).then(function(h){return l.updateProgress(1),h})})},s.prototype.thenCore=function(a,o,l){l=l||Promise.prototype.then;var c=this;a&&(a=a.bind(c)),o&&(o=o.bind(c));var f=Promise.toString().indexOf("[native code]")!==-1&&Promise.name==="Promise"?c:s.convert(Object.assign({},c),Promise.prototype),h=l.call(f,a,o);return s.convert(h,c.__proto__)},s.prototype.thenExternal=function(a,o){return Promise.prototype.then.call(this,a,o)},s.prototype.thenList=function(a){var o=this;return a.forEach(function(l){o=o.thenCore(l)}),o},s.prototype.catch=function(a){a&&(a=a.bind(this));var o=Promise.prototype.catch.call(this,a);return s.convert(o,this)},s.prototype.catchExternal=function(a){return Promise.prototype.catch.call(this,a)},s.prototype.error=function(a){return this.then(function(){throw new Error(a)})},s.prototype.using=s.prototype.set,s.prototype.saveAs=s.prototype.save,s.prototype.export=s.prototype.output,s.prototype.run=s.prototype.then,dt.getPageSize=function(a,o,l){if($t(a)==="object"){var c=a;a=c.orientation,o=c.unit||o,l=c.format||l}o=o||"mm",l=l||"a4",a=(""+(a||"P")).toLowerCase();var f,h=(""+l).toLowerCase(),u={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};switch(o){case"pt":f=1;break;case"mm":f=72/25.4;break;case"cm":f=72/2.54;break;case"in":f=72;break;case"px":f=.75;break;case"pc":case"em":f=12;break;case"ex":f=6;break;default:throw"Invalid unit: "+o}var g,p=0,w=0;if(u.hasOwnProperty(h))p=u[h][1]/f,w=u[h][0]/f;else try{p=l[1],w=l[0]}catch{throw new Error("Invalid format: "+l)}if(a==="p"||a==="portrait")a="p",w>p&&(g=w,w=p,p=g);else{if(a!=="l"&&a!=="landscape")throw"Invalid orientation: "+a;a="l",p>w&&(g=w,w=p,p=g)}return{width:w,height:p,unit:o,k:f,orientation:a}},t.html=function(a,o){(o=o||{}).callback=o.callback||function(){},o.html2canvas=o.html2canvas||{},o.html2canvas.canvas=o.html2canvas.canvas||this.canvas,o.jsPDF=o.jsPDF||this,o.fontFaces=o.fontFaces?o.fontFaces.map(Td):null;var l=new s(o);return o.worker?l:l.from(a).doCallback()}})(dt.API),dt.API.addJS=function(t){var e,r,A=(function(n){for(var i="",s=0;s<n.length;s++){var a=n[s];if(a==="("||a===")"){for(var o=0,l=s-1;l>=0&&n[l]==="\\";l--)o++;i+=o%2==0?"\\"+a:a}else i+=a}return i})(t);return this.internal.events.subscribe("postPutResources",function(){e=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(e+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),r=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+A+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){e!==void 0&&r!==void 0&&this.internal.out("/Names <</JavaScript "+e+" 0 R>>")}),this},(function(t){var e;t.events.push(["postPutResources",function(){var r=this,A=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var n=r.outline.render().split(/\r\n/),i=0;i<n.length;i++){var s=n[i],a=A.exec(s);if(a!=null){var o=a[1];r.internal.newObjectDeferredBegin(o,!1)}r.internal.write(s)}if(this.outline.createNamedDestinations){var l=this.internal.pages.length,c=[];for(i=0;i<l;i++){var f=r.internal.newObject();c.push(f);var h=r.internal.getPageInfo(i+1);r.internal.write("<< /D["+h.objId+" 0 R /XYZ null null null]>> endobj")}var u=r.internal.newObject();for(r.internal.write("<< /Names [ "),i=0;i<c.length;i++)r.internal.write("(page_"+(i+1)+")"+c[i]+" 0 R");r.internal.write(" ] >>","endobj"),e=r.internal.newObject(),r.internal.write("<< /Dests "+u+" 0 R"),r.internal.write(">>","endobj")}}]),t.events.push(["putCatalog",function(){var r=this;r.outline.root.children.length>0&&(r.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&r.internal.write("/Names "+e+" 0 R"))}]),t.events.push(["initialized",function(){var r=this;r.outline={createNamedDestinations:!1,root:{children:[]}},r.outline.add=function(A,n,i){var s={title:n,options:i,children:[]};return A==null&&(A=this.root),A.children.push(s),s},r.outline.render=function(){return this.ctx={},this.ctx.val="",this.ctx.pdf=r,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},r.outline.genIds_r=function(A){A.id=r.internal.newObjectDeferred();for(var n=0;n<A.children.length;n++)this.genIds_r(A.children[n])},r.outline.renderRoot=function(A){this.objStart(A),this.line("/Type /Outlines"),A.children.length>0&&(this.line("/First "+this.makeRef(A.children[0])),this.line("/Last "+this.makeRef(A.children[A.children.length-1]))),this.line("/Count "+this.count_r({count:0},A)),this.objEnd()},r.outline.renderItems=function(A){for(var n=this.ctx.pdf.internal.getVerticalCoordinateString,i=0;i<A.children.length;i++){var s=A.children[i];this.objStart(s),this.line("/Title "+this.makeString(s.title)),this.line("/Parent "+this.makeRef(A)),i>0&&this.line("/Prev "+this.makeRef(A.children[i-1])),i<A.children.length-1&&this.line("/Next "+this.makeRef(A.children[i+1])),s.children.length>0&&(this.line("/First "+this.makeRef(s.children[0])),this.line("/Last "+this.makeRef(s.children[s.children.length-1])));var a=this.count=this.count_r({count:0},s);if(a>0&&this.line("/Count "+a),s.options&&s.options.pageNumber){var o=r.internal.getPageInfo(s.options.pageNumber);this.line("/Dest ["+o.objId+" 0 R /XYZ 0 "+n(0)+" 0]")}this.objEnd()}for(var l=0;l<A.children.length;l++)this.renderItems(A.children[l])},r.outline.line=function(A){this.ctx.val+=A+`\r
|
|
43
|
+
`},r.outline.makeRef=function(A){return A.id+" 0 R"},r.outline.makeString=function(A){return"("+r.internal.pdfEscape(A)+")"},r.outline.objStart=function(A){this.ctx.val+=`\r
|
|
44
|
+
`+A.id+` 0 obj\r
|
|
45
|
+
<<\r
|
|
46
|
+
`},r.outline.objEnd=function(){this.ctx.val+=`>> \r
|
|
47
|
+
endobj\r
|
|
48
|
+
`},r.outline.count_r=function(A,n){for(var i=0;i<n.children.length;i++)A.count++,this.count_r(A,n.children[i]);return A.count}}])})(dt.API),(function(t){var e=[192,193,194,195,196,197,198,199];t.processJPEG=function(r,A,n,i,s,a){var o,l=this.decode.DCT_DECODE,c=null;if(typeof r=="string"||this.__addimage__.isArrayBuffer(r)||this.__addimage__.isArrayBufferView(r)){switch(r=s||r,r=this.__addimage__.isArrayBuffer(r)?new Uint8Array(r):r,o=(function(f){for(var h,u=256*f.charCodeAt(4)+f.charCodeAt(5),g=f.length,p={width:0,height:0,numcomponents:1},w=4;w<g;w+=2){if(w+=u,e.indexOf(f.charCodeAt(w+1))!==-1){h=256*f.charCodeAt(w+5)+f.charCodeAt(w+6),p={width:256*f.charCodeAt(w+7)+f.charCodeAt(w+8),height:h,numcomponents:f.charCodeAt(w+9)};break}u=256*f.charCodeAt(w+2)+f.charCodeAt(w+3)}return p})(r=this.__addimage__.isArrayBufferView(r)?this.__addimage__.arrayBufferToBinaryString(r):r),o.numcomponents){case 1:a=this.color_spaces.DEVICE_GRAY;break;case 4:a=this.color_spaces.DEVICE_CMYK;break;case 3:a=this.color_spaces.DEVICE_RGB}c={data:r,width:o.width,height:o.height,colorSpace:a,bitsPerComponent:8,filter:l,index:A,alias:n}}return c}})(dt.API),dt.API.processPNG=function(t,e,r,A){if(this.__addimage__.isArrayBuffer(t)&&(t=new Uint8Array(t)),this.__addimage__.isArrayBufferView(t)){var n,i=EQ(t,{checkCrc:!0}),s=i.width,a=i.height,o=i.channels,l=i.palette,c=i.depth;n=l&&o===1?(function(R){for(var I=R.width,W=R.height,L=R.data,F=R.palette,M=R.depth,b=!1,Y=[],ce=[],ee=void 0,le=!1,Ae=0,te=0;te<F.length;te++){var T=Pm(F[te],4),S=T[0],O=T[1],P=T[2],z=T[3];Y.push(S,O,P),z!=null&&(z===0?(Ae++,ce.length<1&&ce.push(te)):z<255&&(le=!0))}if(le||Ae>1){b=!0,ce=void 0;var ie=I*W;ee=new Uint8Array(ie);for(var fe=new DataView(L.buffer),Z=0;Z<ie;Z++){var pe=Od(fe,Z,M),we=Pm(F[pe],4)[3];ee[Z]=we}}else Ae===0&&(ce=void 0);return{colorSpace:"Indexed",colorsPerPixel:1,sMaskBitsPerComponent:b?8:void 0,colorBytes:L,alphaBytes:ee,needSMask:b,palette:Y,mask:ce}})(i):o===2||o===4?(function(R){for(var I=R.data,W=R.width,L=R.height,F=R.channels,M=R.depth,b=F===2?"DeviceGray":"DeviceRGB",Y=F-1,ce=W*L,ee=Y,le=ce*ee,Ae=1*ce,te=Math.ceil(le*M/8),T=Math.ceil(Ae*M/8),S=new Uint8Array(te),O=new Uint8Array(T),P=new DataView(I.buffer),z=new DataView(S.buffer),ie=new DataView(O.buffer),fe=!1,Z=0;Z<ce;Z++){for(var pe=Z*F,we=0;we<ee;we++)Cy(z,Od(P,pe+we,M),Z*ee+we,M);var be=Od(P,pe+ee,M);be<(1<<M)-1&&(fe=!0),Cy(ie,be,1*Z,M)}return{colorSpace:b,colorsPerPixel:Y,sMaskBitsPerComponent:fe?M:void 0,colorBytes:S,alphaBytes:O,needSMask:fe}})(i):(function(R){var I=R.data,W=R.channels===1?"DeviceGray":"DeviceRGB";return{colorSpace:W,colorsPerPixel:W==="DeviceGray"?1:3,colorBytes:I instanceof Uint16Array?(function(L){for(var F=L.length,M=new Uint8Array(2*F),b=new DataView(M.buffer,M.byteOffset,M.byteLength),Y=0;Y<F;Y++)b.setUint16(2*Y,L[Y],!1);return M})(I):I,needSMask:!1}})(i);var f,h,u,g=n,p=g.colorSpace,w=g.colorsPerPixel,m=g.sMaskBitsPerComponent,B=g.colorBytes,x=g.alphaBytes,E=g.needSMask,k=g.palette,H=g.mask,K=null;return A!==dt.API.image_compression.NONE&&typeof od=="function"?(K=(function(R){var I;switch(R){case dt.API.image_compression.FAST:I=11;break;case dt.API.image_compression.MEDIUM:I=13;break;case dt.API.image_compression.SLOW:I=14;break;default:I=12}return I})(A),f=this.decode.FLATE_DECODE,h="/Predictor ".concat(K," /Colors ").concat(w," /BitsPerComponent ").concat(c," /Columns ").concat(s),t=my(B,Math.ceil(s*w*c/8),w,c,A),E&&(u=my(x,Math.ceil(s*m/8),1,m,A))):(f=void 0,h=void 0,t=B,E&&(u=x)),(this.__addimage__.isArrayBuffer(t)||this.__addimage__.isArrayBufferView(t))&&(t=this.__addimage__.arrayBufferToBinaryString(t)),(u&&this.__addimage__.isArrayBuffer(u)||this.__addimage__.isArrayBufferView(u))&&(u=this.__addimage__.arrayBufferToBinaryString(u)),{alias:r,data:t,index:e,filter:f,decodeParameters:h,transparency:H,palette:k,sMask:u,predictor:K,width:s,height:a,bitsPerComponent:c,sMaskBitsPerComponent:m,colorSpace:p}}},(function(t){t.processGIF89A=function(e,r,A,n){var i=new VQ(e),s=i.width,a=i.height,o=[];i.decodeAndBlitFrameRGBA(0,o);var l={data:o,width:s,height:a},c=new Pd(100).encode(l,100);return t.processJPEG.call(this,c,r,A,n)},t.processGIF87A=t.processGIF89A})(dt.API),Wn.prototype.parseHeader=function(){if(this.fileSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.reserved=this.datav.getUint32(this.pos,!0),this.pos+=4,this.offset=this.datav.getUint32(this.pos,!0),this.pos+=4,this.headerSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.width=this.datav.getUint32(this.pos,!0),this.pos+=4,this.height=this.datav.getInt32(this.pos,!0),this.pos+=4,this.planes=this.datav.getUint16(this.pos,!0),this.pos+=2,this.bitPP=this.datav.getUint16(this.pos,!0),this.pos+=2,this.compress=this.datav.getUint32(this.pos,!0),this.pos+=4,this.rawSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.hr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.vr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.colors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.importantColors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.bitPP===16&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var t=this.colors===0?1<<this.bitPP:this.colors;this.palette=new Array(t);for(var e=0;e<t;e++){var r=this.datav.getUint8(this.pos++,!0),A=this.datav.getUint8(this.pos++,!0),n=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0);this.palette[e]={red:n,green:A,blue:r,quad:i}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},Wn.prototype.parseBGR=function(){this.pos=this.offset;var t="bit"+this.bitPP,e=this.width*this.height*4;if(e>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");this.data=new Uint8Array(e);try{this[t]()}catch(r){nr.log("bit decode error:"+r)}},Wn.prototype.bit1=function(){var t,e=Math.ceil(this.width/8),r=e%4;for(t=this.height-1;t>=0;t--){for(var A=this.bottom_up?t:this.height-1-t,n=0;n<e;n++)for(var i=this.datav.getUint8(this.pos++,!0),s=A*this.width*4+8*n*4,a=0;a<8&&8*n+a<this.width;a++){var o=this.palette[i>>7-a&1];this.data[s+4*a]=o.blue,this.data[s+4*a+1]=o.green,this.data[s+4*a+2]=o.red,this.data[s+4*a+3]=255}r!==0&&(this.pos+=4-r)}},Wn.prototype.bit4=function(){for(var t=Math.ceil(this.width/2),e=t%4,r=this.height-1;r>=0;r--){for(var A=this.bottom_up?r:this.height-1-r,n=0;n<t;n++){var i=this.datav.getUint8(this.pos++,!0),s=A*this.width*4+2*n*4,a=i>>4,o=15&i,l=this.palette[a];if(this.data[s]=l.blue,this.data[s+1]=l.green,this.data[s+2]=l.red,this.data[s+3]=255,2*n+1>=this.width)break;l=this.palette[o],this.data[s+4]=l.blue,this.data[s+4+1]=l.green,this.data[s+4+2]=l.red,this.data[s+4+3]=255}e!==0&&(this.pos+=4-e)}},Wn.prototype.bit8=function(){for(var t=this.width%4,e=this.height-1;e>=0;e--){for(var r=this.bottom_up?e:this.height-1-e,A=0;A<this.width;A++){var n=this.datav.getUint8(this.pos++,!0),i=r*this.width*4+4*A;if(n<this.palette.length){var s=this.palette[n];this.data[i]=s.red,this.data[i+1]=s.green,this.data[i+2]=s.blue,this.data[i+3]=255}else this.data[i]=255,this.data[i+1]=255,this.data[i+2]=255,this.data[i+3]=255}t!==0&&(this.pos+=4-t)}},Wn.prototype.bit15=function(){for(var t=this.width%3,e=parseInt("11111",2),r=this.height-1;r>=0;r--){for(var A=this.bottom_up?r:this.height-1-r,n=0;n<this.width;n++){var i=this.datav.getUint16(this.pos,!0);this.pos+=2;var s=(i&e)/e*255|0,a=(i>>5&e)/e*255|0,o=(i>>10&e)/e*255|0,l=i>>15?255:0,c=A*this.width*4+4*n;this.data[c]=o,this.data[c+1]=a,this.data[c+2]=s,this.data[c+3]=l}this.pos+=t}},Wn.prototype.bit16=function(){for(var t=this.width%3,e=parseInt("11111",2),r=parseInt("111111",2),A=this.height-1;A>=0;A--){for(var n=this.bottom_up?A:this.height-1-A,i=0;i<this.width;i++){var s=this.datav.getUint16(this.pos,!0);this.pos+=2;var a=(s&e)/e*255|0,o=(s>>5&r)/r*255|0,l=(s>>11)/e*255|0,c=n*this.width*4+4*i;this.data[c]=l,this.data[c+1]=o,this.data[c+2]=a,this.data[c+3]=255}this.pos+=t}},Wn.prototype.bit24=function(){for(var t=this.height-1;t>=0;t--){for(var e=this.bottom_up?t:this.height-1-t,r=0;r<this.width;r++){var A=this.datav.getUint8(this.pos++,!0),n=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),s=e*this.width*4+4*r;this.data[s]=i,this.data[s+1]=n,this.data[s+2]=A,this.data[s+3]=255}this.pos+=this.width%4}},Wn.prototype.bit32=function(){for(var t=this.height-1;t>=0;t--)for(var e=this.bottom_up?t:this.height-1-t,r=0;r<this.width;r++){var A=this.datav.getUint8(this.pos++,!0),n=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),s=this.datav.getUint8(this.pos++,!0),a=e*this.width*4+4*r;this.data[a]=i,this.data[a+1]=n,this.data[a+2]=A,this.data[a+3]=s}},Wn.prototype.getData=function(){return this.data},(function(t){t.processBMP=function(e,r,A,n){var i=new Wn(e,!1),s=i.width,a=i.height,o={data:i.getData(),width:s,height:a},l=new Pd(100).encode(o,100);return t.processJPEG.call(this,l,r,A,n)}})(dt.API),Sy.prototype.getData=function(){return this.data},(function(t){t.processWEBP=function(e,r,A,n){var i=new Sy(e),s=i.width,a=i.height,o={data:i.getData(),width:s,height:a},l=new Pd(100).encode(o,100);return t.processJPEG.call(this,l,r,A,n)}})(dt.API),dt.API.processRGBA=function(t,e,r){for(var A=t.data,n=A.length,i=new Uint8Array(n/4*3),s=new Uint8Array(n/4),a=0,o=0,l=0;l<n;l+=4){var c=A[l],f=A[l+1],h=A[l+2],u=A[l+3];i[a++]=c,i[a++]=f,i[a++]=h,s[o++]=u}var g=this.__addimage__.arrayBufferToBinaryString(i);return{alpha:this.__addimage__.arrayBufferToBinaryString(s),data:g,index:e,alias:r,colorSpace:"DeviceRGB",bitsPerComponent:8,width:t.width,height:t.height}},dt.API.setLanguage=function(t){return this.internal.languageSettings===void 0&&(this.internal.languageSettings={},this.internal.languageSettings.isSubscribed=!1),{af:"Afrikaans",sq:"Albanian",ar:"Arabic (Standard)","ar-DZ":"Arabic (Algeria)","ar-BH":"Arabic (Bahrain)","ar-EG":"Arabic (Egypt)","ar-IQ":"Arabic (Iraq)","ar-JO":"Arabic (Jordan)","ar-KW":"Arabic (Kuwait)","ar-LB":"Arabic (Lebanon)","ar-LY":"Arabic (Libya)","ar-MA":"Arabic (Morocco)","ar-OM":"Arabic (Oman)","ar-QA":"Arabic (Qatar)","ar-SA":"Arabic (Saudi Arabia)","ar-SY":"Arabic (Syria)","ar-TN":"Arabic (Tunisia)","ar-AE":"Arabic (U.A.E.)","ar-YE":"Arabic (Yemen)",an:"Aragonese",hy:"Armenian",as:"Assamese",ast:"Asturian",az:"Azerbaijani",eu:"Basque",be:"Belarusian",bn:"Bengali",bs:"Bosnian",br:"Breton",bg:"Bulgarian",my:"Burmese",ca:"Catalan",ch:"Chamorro",ce:"Chechen",zh:"Chinese","zh-HK":"Chinese (Hong Kong)","zh-CN":"Chinese (PRC)","zh-SG":"Chinese (Singapore)","zh-TW":"Chinese (Taiwan)",cv:"Chuvash",co:"Corsican",cr:"Cree",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch (Standard)","nl-BE":"Dutch (Belgian)",en:"English","en-AU":"English (Australia)","en-BZ":"English (Belize)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-JM":"English (Jamaica)","en-NZ":"English (New Zealand)","en-PH":"English (Philippines)","en-ZA":"English (South Africa)","en-TT":"English (Trinidad & Tobago)","en-GB":"English (United Kingdom)","en-US":"English (United States)","en-ZW":"English (Zimbabwe)",eo:"Esperanto",et:"Estonian",fo:"Faeroese",fj:"Fijian",fi:"Finnish",fr:"French (Standard)","fr-BE":"French (Belgium)","fr-CA":"French (Canada)","fr-FR":"French (France)","fr-LU":"French (Luxembourg)","fr-MC":"French (Monaco)","fr-CH":"French (Switzerland)",fy:"Frisian",fur:"Friulian",gd:"Gaelic (Scots)","gd-IE":"Gaelic (Irish)",gl:"Galacian",ka:"Georgian",de:"German (Standard)","de-AT":"German (Austria)","de-DE":"German (Germany)","de-LI":"German (Liechtenstein)","de-LU":"German (Luxembourg)","de-CH":"German (Switzerland)",el:"Greek",gu:"Gujurati",ht:"Haitian",he:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",iu:"Inuktitut",ga:"Irish",it:"Italian (Standard)","it-CH":"Italian (Switzerland)",ja:"Japanese",kn:"Kannada",ks:"Kashmiri",kk:"Kazakh",km:"Khmer",ky:"Kirghiz",tlh:"Klingon",ko:"Korean","ko-KP":"Korean (North Korea)","ko-KR":"Korean (South Korea)",la:"Latin",lv:"Latvian",lt:"Lithuanian",lb:"Luxembourgish",mk:"North Macedonia",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi",mo:"Moldavian",nv:"Navajo",ng:"Ndonga",ne:"Nepali",no:"Norwegian",nb:"Norwegian (Bokmal)",nn:"Norwegian (Nynorsk)",oc:"Occitan",or:"Oriya",om:"Oromo",fa:"Persian","fa-IR":"Persian/Iran",pl:"Polish",pt:"Portuguese","pt-BR":"Portuguese (Brazil)",pa:"Punjabi","pa-IN":"Punjabi (India)","pa-PK":"Punjabi (Pakistan)",qu:"Quechua",rm:"Rhaeto-Romanic",ro:"Romanian","ro-MO":"Romanian (Moldavia)",ru:"Russian","ru-MO":"Russian (Moldavia)",sz:"Sami (Lappish)",sg:"Sango",sa:"Sanskrit",sc:"Sardinian",sd:"Sindhi",si:"Singhalese",sr:"Serbian",sk:"Slovak",sl:"Slovenian",so:"Somani",sb:"Sorbian",es:"Spanish","es-AR":"Spanish (Argentina)","es-BO":"Spanish (Bolivia)","es-CL":"Spanish (Chile)","es-CO":"Spanish (Colombia)","es-CR":"Spanish (Costa Rica)","es-DO":"Spanish (Dominican Republic)","es-EC":"Spanish (Ecuador)","es-SV":"Spanish (El Salvador)","es-GT":"Spanish (Guatemala)","es-HN":"Spanish (Honduras)","es-MX":"Spanish (Mexico)","es-NI":"Spanish (Nicaragua)","es-PA":"Spanish (Panama)","es-PY":"Spanish (Paraguay)","es-PE":"Spanish (Peru)","es-PR":"Spanish (Puerto Rico)","es-ES":"Spanish (Spain)","es-UY":"Spanish (Uruguay)","es-VE":"Spanish (Venezuela)",sx:"Sutu",sw:"Swahili",sv:"Swedish","sv-FI":"Swedish (Finland)","sv-SV":"Swedish (Sweden)",ta:"Tamil",tt:"Tatar",te:"Teluga",th:"Thai",tig:"Tigre",ts:"Tsonga",tn:"Tswana",tr:"Turkish",tk:"Turkmen",uk:"Ukrainian",hsb:"Upper Sorbian",ur:"Urdu",ve:"Venda",vi:"Vietnamese",vo:"Volapuk",wa:"Walloon",cy:"Welsh",xh:"Xhosa",ji:"Yiddish",zu:"Zulu"}[t]!==void 0&&(this.internal.languageSettings.languageCode=t,this.internal.languageSettings.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){this.internal.write("/Lang ("+this.internal.languageSettings.languageCode+")")}),this.internal.languageSettings.isSubscribed=!0)),this},Co=dt.API,yu=Co.getCharWidthsArray=function(t,e){var r,A,n=(e=e||{}).font||this.internal.getFont(),i=e.fontSize||this.internal.getFontSize(),s=e.charSpace||this.internal.getCharSpace(),a=e.widths?e.widths:n.metadata.Unicode.widths,o=a.fof?a.fof:1,l=e.kerning?e.kerning:n.metadata.Unicode.kerning,c=l.fof?l.fof:1,f=e.doKerning!==!1,h=0,u=t.length,g=0,p=a[0]||o,w=[];for(r=0;r<u;r++)A=t.charCodeAt(r),typeof n.metadata.widthOfString=="function"?w.push((n.metadata.widthOfGlyph(n.metadata.characterToGlyph(A))+s*(1e3/i)||0)/1e3):(h=f&&$t(l[A])==="object"&&!isNaN(parseInt(l[A][g],10))?l[A][g]/c:0,w.push((a[A]||p)/o+h)),g=A;return w},py=Co.getStringUnitWidth=function(t,e){var r=(e=e||{}).fontSize||this.internal.getFontSize(),A=e.font||this.internal.getFont(),n=e.charSpace||this.internal.getCharSpace();return Co.processArabic&&(t=Co.processArabic(t)),typeof A.metadata.widthOfString=="function"?A.metadata.widthOfString(t,r,n)/r:yu.apply(this,arguments).reduce(function(i,s){return i+s},0)},gy=function(t,e,r,A){for(var n=[],i=0,s=t.length,a=0;i!==s&&a+e[i]<r;)a+=e[i],i++;n.push(t.slice(0,i));var o=i;for(a=0;i!==s;)a+e[i]>A&&(n.push(t.slice(o,i)),a=0,o=i),a+=e[i],i++;return o!==i&&n.push(t.slice(o,i)),n},vy=function(t,e,r){r||(r={});var A,n,i,s,a,o,l,c=[],f=[c],h=r.textIndent||0,u=0,g=0,p=t.split(" "),w=yu.apply(this,[" ",r])[0];if(o=r.lineIndent===-1?p[0].length+2:r.lineIndent||0){var m=Array(o).join(" "),B=[];p.map(function(E){(E=E.split(/\s*\n/)).length>1?B=B.concat(E.map(function(k,H){return(H&&k.length?`
|
|
49
|
+
`:"")+k})):B.push(E[0])}),p=B,o=py.apply(this,[m,r])}for(i=0,s=p.length;i<s;i++){var x=0;if(A=p[i],o&&A[0]==`
|
|
50
|
+
`&&(A=A.substr(1),x=1),h+u+(g=(n=yu.apply(this,[A,r])).reduce(function(E,k){return E+k},0))>e||x){if(g>e){for(a=gy.apply(this,[A,n,e-(h+u),e]),c.push(a.shift()),c=[a.pop()];a.length;)f.push([a.shift()]);g=n.slice(A.length-(c[0]?c[0].length:0)).reduce(function(E,k){return E+k},0)}else c=[A];f.push(c),h=g+o,u=w}else c.push(A),h+=u+g,u=w}return l=o?function(E,k){return(k?m:"")+E.join(" ")}:function(E){return E.join(" ")},f.map(l)},Co.splitTextToSize=function(t,e,r){var A,n=(r=r||{}).fontSize||this.internal.getFontSize(),i=(function(c){if(c.widths&&c.kerning)return{widths:c.widths,kerning:c.kerning};var f=this.internal.getFont(c.fontName,c.fontStyle),h="Unicode";return f.metadata[h]?{widths:f.metadata[h].widths||{0:1},kerning:f.metadata[h].kerning||{}}:{font:f.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,r);A=Array.isArray(t)?t:String(t).split(/\r?\n/);var s=1*this.internal.scaleFactor*e/n;i.textIndent=r.textIndent?1*r.textIndent*this.internal.scaleFactor/n:0,i.lineIndent=r.lineIndent;var a,o,l=[];for(a=0,o=A.length;a<o;a++)l=l.concat(vy.apply(this,[A[a],s,i]));return l},(function(t){t.__fontmetrics__=t.__fontmetrics__||{};for(var e="0123456789abcdef",r="klmnopqrstuvwxyz",A={},n={},i=0;i<16;i++)A[r[i]]=e[i],n[e[i]]=r[i];var s=function(h){return"0x"+parseInt(h,10).toString(16)},a=t.__fontmetrics__.compress=function(h){var u,g,p,w,m=["{"];for(var B in h){if(u=h[B],isNaN(parseInt(B,10))?g="'"+B+"'":(B=parseInt(B,10),g=(g=s(B).slice(2)).slice(0,-1)+n[g.slice(-1)]),typeof u=="number")u<0?(p=s(u).slice(3),w="-"):(p=s(u).slice(2),w=""),p=w+p.slice(0,-1)+n[p.slice(-1)];else{if($t(u)!=="object")throw new Error("Don't know what to do with value type "+$t(u)+".");p=a(u)}m.push(g+p)}return m.push("}"),m.join("")},o=t.__fontmetrics__.uncompress=function(h){if(typeof h!="string")throw new Error("Invalid argument passed to uncompress.");for(var u,g,p,w,m={},B=1,x=m,E=[],k="",H="",K=h.length-1,R=1;R<K;R+=1)(w=h[R])=="'"?u?(p=u.join(""),u=void 0):u=[]:u?u.push(w):w=="{"?(E.push([x,p]),x={},p=void 0):w=="}"?((g=E.pop())[0][g[1]]=x,p=void 0,x=g[0]):w=="-"?B=-1:p===void 0?A.hasOwnProperty(w)?(k+=A[w],p=parseInt(k,16)*B,B=1,k=""):k+=w:A.hasOwnProperty(w)?(H+=A[w],x[p]=parseInt(H,16)*B,B=1,p=void 0,H=""):H+=w;return m},l={codePages:["WinAnsiEncoding"],WinAnsiEncoding:o("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},c={Unicode:{Courier:l,"Courier-Bold":l,"Courier-BoldOblique":l,"Courier-Oblique":l,Helvetica:l,"Helvetica-Bold":l,"Helvetica-BoldOblique":l,"Helvetica-Oblique":l,"Times-Roman":l,"Times-Bold":l,"Times-BoldItalic":l,"Times-Italic":l}},f={Unicode:{"Courier-Oblique":o("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":o("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":o("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),Courier:o("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":o("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":o("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),Symbol:o("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:o("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),"Helvetica-BoldOblique":o("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),ZapfDingbats:o("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":o("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":o("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),"Times-Roman":o("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),"Helvetica-Oblique":o("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}};t.events.push(["addFont",function(h){var u=h.font,g=f.Unicode[u.postScriptName];g&&(u.metadata.Unicode={},u.metadata.Unicode.widths=g.widths,u.metadata.Unicode.kerning=g.kerning);var p=c.Unicode[u.postScriptName];p&&(u.metadata.Unicode.encoding=p,u.encoding=p.codePages[0])}])})(dt.API),(function(t){var e=function(r){for(var A=r.length,n=new Uint8Array(A),i=0;i<A;i++)n[i]=r.charCodeAt(i);return n};t.API.events.push(["addFont",function(r){var A=void 0,n=r.font,i=r.instance;if(!n.isStandardFont){if(i===void 0)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+n.postScriptName+"').");if(typeof(A=i.existsFileInVFS(n.postScriptName)===!1?i.loadFile(n.postScriptName):i.getFileFromVFS(n.postScriptName))!="string")throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+n.postScriptName+"').");(function(s,a){a=/^\x00\x01\x00\x00/.test(a)?e(a):e(uu(a)),s.metadata=t.API.TTFFont.open(a),s.metadata.Unicode=s.metadata.Unicode||{encoding:{},kerning:{},widths:[]},s.metadata.glyIdsUsed=[0]})(n,A)}}])})(dt),dt.API.addSvgAsImage=function(t,e,r,A,n,i,s,a){if(isNaN(e)||isNaN(r))throw nr.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(A)||isNaN(n))throw nr.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var o=document.createElement("canvas");o.width=A,o.height=n;var l=o.getContext("2d");l.fillStyle="#fff",l.fillRect(0,0,o.width,o.height);var c={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},f=this;return(St.canvg?Promise.resolve(St.canvg):Promise.resolve().then(()=>lK)).catch(function(h){return Promise.reject(new Error("Could not load canvg: "+h))}).then(function(h){return h.default?h.default:h}).then(function(h){return h.fromString(l,t,c)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(h){return h.render(c)}).then(function(){f.addImage(o.toDataURL("image/jpeg",1),e,r,A,n,s,a)})},dt.API.putTotalPages=function(t){var e,r=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(e=new RegExp(t,"g"),r=this.internal.getNumberOfPages()):(e=new RegExp(this.pdfEscape16(t,this.internal.getFont()),"g"),r=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var A=1;A<=this.internal.getNumberOfPages();A++)for(var n=0;n<this.internal.pages[A].length;n++)this.internal.pages[A][n]=this.internal.pages[A][n].replace(e,r);return this},dt.API.viewerPreferences=function(t,e){var r;t=t||{},e=e||!1;var A,n,i,s={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},a=Object.keys(s),o=[],l=0,c=0,f=0;function h(g,p){var w,m=!1;for(w=0;w<g.length;w+=1)g[w]===p&&(m=!0);return m}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(s)),this.internal.viewerpreferences.isSubscribed=!1),r=this.internal.viewerpreferences.configuration,t==="reset"||e===!0){var u=a.length;for(f=0;f<u;f+=1)r[a[f]].value=r[a[f]].defaultValue,r[a[f]].explicitSet=!1}if($t(t)==="object"){for(n in t)if(i=t[n],h(a,n)&&i!==void 0){if(r[n].type==="boolean"&&typeof i=="boolean")r[n].value=i;else if(r[n].type==="name"&&h(r[n].valueSet,i))r[n].value=i;else if(r[n].type==="integer"&&Number.isInteger(i))r[n].value=i;else if(r[n].type==="array"){for(l=0;l<i.length;l+=1)if(A=!0,i[l].length===1&&typeof i[l][0]=="number")o.push(String(i[l]-1));else if(i[l].length>1){for(c=0;c<i[l].length;c+=1)typeof i[l][c]!="number"&&(A=!1);A===!0&&o.push([i[l][0]-1,i[l][1]-1].join(" "))}r[n].value="["+o.join(" ")+"]"}else r[n].value=r[n].defaultValue;r[n].explicitSet=!0}}return this.internal.viewerpreferences.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){var g,p=[];for(g in r)r[g].explicitSet===!0&&(r[g].type==="name"?p.push("/"+g+" /"+r[g].value):p.push("/"+g+" "+r[g].value));p.length!==0&&this.internal.write(`/ViewerPreferences
|
|
51
|
+
<<
|
|
52
|
+
`+p.join(`
|
|
53
|
+
`)+`
|
|
54
|
+
>>`)}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=r,this},dt.API.addMetadata=function(t,e){return this.internal.__metadata__===void 0&&(this.internal.__metadata__={metadata:t,namespaceUri:e??"http://jspdf.default.namespaceuri/",rawXml:typeof e=="boolean"&&e},this.internal.events.subscribe("putCatalog",WQ),this.internal.events.subscribe("postPutResources",qQ)),this},(function(t){var e=t.API,r=e.pdfEscape16=function(i,s){for(var a,o=s.metadata.Unicode.widths,l=["","0","00","000","0000"],c=[""],f=0,h=i.length;f<h;++f){if(a=s.metadata.characterToGlyph(i.charCodeAt(f)),s.metadata.glyIdsUsed.push(a),s.metadata.toUnicode[a]=i.charCodeAt(f),o.indexOf(a)==-1&&(o.push(a),o.push([parseInt(s.metadata.widthOfGlyph(a),10)])),a=="0")return c.join("");a=a.toString(16),c.push(l[4-a.length],a)}return c.join("")},A=function(i){var s,a,o,l,c,f,h;for(c=`/CIDInit /ProcSet findresource begin
|
|
55
|
+
12 dict begin
|
|
56
|
+
begincmap
|
|
57
|
+
/CIDSystemInfo <<
|
|
58
|
+
/Registry (Adobe)
|
|
59
|
+
/Ordering (UCS)
|
|
60
|
+
/Supplement 0
|
|
61
|
+
>> def
|
|
62
|
+
/CMapName /Adobe-Identity-UCS def
|
|
63
|
+
/CMapType 2 def
|
|
64
|
+
1 begincodespacerange
|
|
65
|
+
<0000><ffff>
|
|
66
|
+
endcodespacerange`,o=[],f=0,h=(a=Object.keys(i).sort(function(u,g){return u-g})).length;f<h;f++)s=a[f],o.length>=100&&(c+=`
|
|
67
|
+
`+o.length+` beginbfchar
|
|
68
|
+
`+o.join(`
|
|
69
|
+
`)+`
|
|
70
|
+
endbfchar`,o=[]),i[s]!==void 0&&i[s]!==null&&typeof i[s].toString=="function"&&(l=("0000"+i[s].toString(16)).slice(-4),s=("0000"+(+s).toString(16)).slice(-4),o.push("<"+s+"><"+l+">"));return o.length&&(c+=`
|
|
71
|
+
`+o.length+` beginbfchar
|
|
72
|
+
`+o.join(`
|
|
73
|
+
`)+`
|
|
74
|
+
endbfchar
|
|
75
|
+
`),c+`endcmap
|
|
76
|
+
CMapName currentdict /CMap defineresource pop
|
|
77
|
+
end
|
|
78
|
+
end`};e.events.push(["putFont",function(i){(function(s){var a=s.font,o=s.out,l=s.newObject,c=s.putStream;if(a.metadata instanceof t.API.TTFFont&&a.encoding==="Identity-H"){for(var f=a.metadata.Unicode.widths,h=a.metadata.subset.encode(a.metadata.glyIdsUsed,1),u="",g=0;g<h.length;g++)u+=String.fromCharCode(h[g]);var p=l();c({data:u,addLength1:!0,objectId:p}),o("endobj");var w=l();c({data:A(a.metadata.toUnicode),addLength1:!0,objectId:w}),o("endobj");var m=l();o("<<"),o("/Type /FontDescriptor"),o("/FontName /"+go(a.fontName)),o("/FontFile2 "+p+" 0 R"),o("/FontBBox "+t.API.PDFObject.convert(a.metadata.bbox)),o("/Flags "+a.metadata.flags),o("/StemV "+a.metadata.stemV),o("/ItalicAngle "+a.metadata.italicAngle),o("/Ascent "+a.metadata.ascender),o("/Descent "+a.metadata.decender),o("/CapHeight "+a.metadata.capHeight),o(">>"),o("endobj");var B=l();o("<<"),o("/Type /Font"),o("/BaseFont /"+go(a.fontName)),o("/FontDescriptor "+m+" 0 R"),o("/W "+t.API.PDFObject.convert(f)),o("/CIDToGIDMap /Identity"),o("/DW 1000"),o("/Subtype /CIDFontType2"),o("/CIDSystemInfo"),o("<<"),o("/Supplement 0"),o("/Registry (Adobe)"),o("/Ordering ("+a.encoding+")"),o(">>"),o(">>"),o("endobj"),a.objectNumber=l(),o("<<"),o("/Type /Font"),o("/Subtype /Type0"),o("/ToUnicode "+w+" 0 R"),o("/BaseFont /"+go(a.fontName)),o("/Encoding /"+a.encoding),o("/DescendantFonts ["+B+" 0 R]"),o(">>"),o("endobj"),a.isAlreadyPutted=!0}})(i)}]),e.events.push(["putFont",function(i){(function(s){var a=s.font,o=s.out,l=s.newObject,c=s.putStream;if(a.metadata instanceof t.API.TTFFont&&a.encoding==="WinAnsiEncoding"){for(var f=a.metadata.rawData,h="",u=0;u<f.length;u++)h+=String.fromCharCode(f[u]);var g=l();c({data:h,addLength1:!0,objectId:g}),o("endobj");var p=l();c({data:A(a.metadata.toUnicode),addLength1:!0,objectId:p}),o("endobj");var w=l();o("<<"),o("/Descent "+a.metadata.decender),o("/CapHeight "+a.metadata.capHeight),o("/StemV "+a.metadata.stemV),o("/Type /FontDescriptor"),o("/FontFile2 "+g+" 0 R"),o("/Flags 96"),o("/FontBBox "+t.API.PDFObject.convert(a.metadata.bbox)),o("/FontName /"+go(a.fontName)),o("/ItalicAngle "+a.metadata.italicAngle),o("/Ascent "+a.metadata.ascender),o(">>"),o("endobj"),a.objectNumber=l();for(var m=0;m<a.metadata.hmtx.widths.length;m++)a.metadata.hmtx.widths[m]=parseInt(a.metadata.hmtx.widths[m]*(1e3/a.metadata.head.unitsPerEm));o("<</Subtype/TrueType/Type/Font/ToUnicode "+p+" 0 R/BaseFont/"+go(a.fontName)+"/FontDescriptor "+w+" 0 R/Encoding/"+a.encoding+" /FirstChar 29 /LastChar 255 /Widths "+t.API.PDFObject.convert(a.metadata.hmtx.widths)+">>"),o("endobj"),a.isAlreadyPutted=!0}})(i)}]);var n=function(i){var s,a=i.text||"",o=i.x,l=i.y,c=i.options||{},f=i.mutex||{},h=f.pdfEscape,u=f.activeFontKey,g=f.fonts,p=u,w="",m=0,B="",x=g[p].encoding;if(g[p].encoding!=="Identity-H")return{text:a,x:o,y:l,options:c,mutex:f};for(B=a,p=u,Array.isArray(a)&&(B=a[0]),m=0;m<B.length;m+=1)g[p].metadata.hasOwnProperty("cmap")&&(s=g[p].metadata.cmap.unicode.codeMap[B[m].charCodeAt(0)]),s||B[m].charCodeAt(0)<256&&g[p].metadata.hasOwnProperty("Unicode")?w+=B[m]:w+="";var E="";return parseInt(p.slice(1))<14||x==="WinAnsiEncoding"?E=h(w,p).split("").map(function(k){return k.charCodeAt(0).toString(16)}).join(""):x==="Identity-H"&&(E=r(w,g[p])),f.isHex=!0,{text:E,x:o,y:l,options:c,mutex:f}};e.events.push(["postProcessText",function(i){var s=i.text||"",a=[],o={text:s,x:i.x,y:i.y,options:i.options,mutex:i.mutex};if(Array.isArray(s)){var l=0;for(l=0;l<s.length;l+=1)Array.isArray(s[l])&&s[l].length===3?a.push([n(Object.assign({},o,{text:s[l][0]})).text,s[l][1],s[l][2]]):a.push(n(Object.assign({},o,{text:s[l]})).text);i.text=a}else i.text=n(Object.assign({},o,{text:s})).text}])})(dt),(function(t){var e=function(){return this.internal.vFS===void 0&&(this.internal.vFS={}),!0};t.existsFileInVFS=function(r){return e.call(this),this.internal.vFS[r]!==void 0},t.addFileToVFS=function(r,A){return e.call(this),this.internal.vFS[r]=A,this},t.getFileFromVFS=function(r){return e.call(this),this.internal.vFS[r]!==void 0?this.internal.vFS[r]:null}})(dt.API),(function(t){t.__bidiEngine__=t.prototype.__bidiEngine__=function(A){var n,i,s,a,o,l,c,f=e,h=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],u=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],g={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},p={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},w=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","‹","›","‹","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],m=new RegExp(/^([1-4|9]|1[0-9]|2[0-9]|3[0168]|4[04589]|5[012]|7[78]|159|16[0-9]|17[0-2]|21[569]|22[03489]|250)$/),B=!1,x=0;this.__bidiEngine__={};var E=function(L){var F=L.charCodeAt(),M=F>>8,b=p[M];return b!==void 0?f[256*b+(255&F)]:M===252||M===253?"AL":m.test(M)?"L":M===8?"R":"N"},k=function(L){for(var F,M=0;M<L.length;M++){if((F=E(L.charAt(M)))==="L")return!1;if(F==="R")return!0}return!1},H=function(L,F,M,b){var Y,ce,ee,le,Ae=F[b];switch(Ae){case"L":case"R":case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":B=!1;break;case"N":case"AN":break;case"EN":B&&(Ae="AN");break;case"AL":B=!0,Ae="R";break;case"WS":case"BN":Ae="N";break;case"CS":b<1||b+1>=F.length||(Y=M[b-1])!=="EN"&&Y!=="AN"||(ce=F[b+1])!=="EN"&&ce!=="AN"?Ae="N":B&&(ce="AN"),Ae=ce===Y?ce:"N";break;case"ES":Ae=(Y=b>0?M[b-1]:"B")==="EN"&&b+1<F.length&&F[b+1]==="EN"?"EN":"N";break;case"ET":if(b>0&&M[b-1]==="EN"){Ae="EN";break}if(B){Ae="N";break}for(ee=b+1,le=F.length;ee<le&&F[ee]==="ET";)ee++;Ae=ee<le&&F[ee]==="EN"?"EN":"N";break;case"NSM":if(s&&!a){for(le=F.length,ee=b+1;ee<le&&F[ee]==="NSM";)ee++;if(ee<le){var te=L[b],T=te>=1425&&te<=2303||te===64286;if(Y=F[ee],T&&(Y==="R"||Y==="AL")){Ae="R";break}}}Ae=b<1||(Y=F[b-1])==="B"?"N":M[b-1];break;case"B":B=!1,n=!0,Ae=x;break;case"S":i=!0,Ae="N"}return Ae},K=function(L,F,M){var b=L.split("");return M&&R(b,M,{hiLevel:x}),b.reverse(),F&&F.reverse(),b.join("")},R=function(L,F,M){var b,Y,ce,ee,le,Ae=-1,te=L.length,T=0,S=[],O=x?u:h,P=[];for(B=!1,n=!1,i=!1,Y=0;Y<te;Y++)P[Y]=E(L[Y]);for(ce=0;ce<te;ce++){if(le=T,S[ce]=H(L,P,S,ce),b=240&(T=O[le][g[S[ce]]]),T&=15,F[ce]=ee=O[T][5],b>0)if(b===16){for(Y=Ae;Y<ce;Y++)F[Y]=1;Ae=-1}else Ae=-1;if(O[T][6])Ae===-1&&(Ae=ce);else if(Ae>-1){for(Y=Ae;Y<ce;Y++)F[Y]=ee;Ae=-1}P[ce]==="B"&&(F[ce]=0),M.hiLevel|=ee}i&&(function(z,ie,fe){for(var Z=0;Z<fe;Z++)if(z[Z]==="S"){ie[Z]=x;for(var pe=Z-1;pe>=0&&z[pe]==="WS";pe--)ie[pe]=x}})(P,F,te)},I=function(L,F,M,b,Y){if(!(Y.hiLevel<L)){if(L===1&&x===1&&!n)return F.reverse(),void(M&&M.reverse());for(var ce,ee,le,Ae,te=F.length,T=0;T<te;){if(b[T]>=L){for(le=T+1;le<te&&b[le]>=L;)le++;for(Ae=T,ee=le-1;Ae<ee;Ae++,ee--)ce=F[Ae],F[Ae]=F[ee],F[ee]=ce,M&&(ce=M[Ae],M[Ae]=M[ee],M[ee]=ce);T=le}T++}}},W=function(L,F,M){var b=L.split(""),Y={hiLevel:x};return M||(M=[]),R(b,M,Y),(function(ce,ee,le){if(le.hiLevel!==0&&c)for(var Ae,te=0;te<ce.length;te++)ee[te]===1&&(Ae=w.indexOf(ce[te]))>=0&&(ce[te]=w[Ae+1])})(b,M,Y),I(2,b,F,M,Y),I(1,b,F,M,Y),b.join("")};return this.__bidiEngine__.doBidiReorder=function(L,F,M){if((function(Y,ce){if(ce)for(var ee=0;ee<Y.length;ee++)ce[ee]=ee;a===void 0&&(a=k(Y)),l===void 0&&(l=k(Y))})(L,F),s||!o||l)if(s&&o&&a^l)x=a?1:0,L=K(L,F,M);else if(!s&&o&&l)x=a?1:0,L=W(L,F,M),L=K(L,F);else if(!s||a||o||l){if(s&&!o&&a^l)L=K(L,F),a?(x=0,L=W(L,F,M)):(x=1,L=W(L,F,M),L=K(L,F));else if(s&&a&&!o&&l)x=1,L=W(L,F,M),L=K(L,F);else if(!s&&!o&&a^l){var b=c;a?(x=1,L=W(L,F,M),x=0,c=!1,L=W(L,F,M),c=b):(x=0,L=W(L,F,M),L=K(L,F),x=1,c=!1,L=W(L,F,M),c=b,L=K(L,F))}}else x=0,L=W(L,F,M);else x=a?1:0,L=W(L,F,M);return L},this.__bidiEngine__.setOptions=function(L){L&&(s=L.isInputVisual,o=L.isOutputVisual,a=L.isInputRtl,l=L.isOutputRtl,c=L.isSymmetricSwapping)},this.__bidiEngine__.setOptions(A),this.__bidiEngine__};var e=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","N","ET","ET","ET","ET","N","N","N","N","L","N","N","BN","N","N","ET","ET","EN","EN","N","L","N","N","N","EN","L","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","N","N","N","N","N","ET","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","NSM","R","NSM","NSM","R","NSM","NSM","R","NSM","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","N","N","N","N","N","R","R","R","R","R","N","N","N","N","N","N","N","N","N","N","N","AN","AN","AN","AN","AN","AN","N","N","AL","ET","ET","AL","CS","AL","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","N","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","NSM","NSM","N","NSM","NSM","NSM","NSM","AL","AL","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","R","N","N","N","N","R","N","N","N","N","N","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","BN","BN","BN","L","R","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","B","LRE","RLE","PDF","LRO","RLO","CS","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","BN","BN","BN","BN","BN","N","LRI","RLI","FSI","PDI","BN","BN","BN","BN","BN","BN","EN","L","N","N","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","L","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","N","N","N","N","N","R","NSM","R","R","R","R","R","R","R","R","R","R","ES","R","R","R","R","R","R","R","R","R","R","R","R","R","N","R","R","R","R","R","N","R","N","R","R","N","R","R","N","R","R","R","R","R","R","R","R","R","R","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","CS","N","N","CS","N","N","N","N","N","N","N","N","N","ET","N","N","ES","ES","N","N","N","N","N","ET","ET","N","N","N","N","N","AL","AL","AL","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","BN","N","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","N","N","N","ET","ET","N","N","N","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N"],r=new t.__bidiEngine__({isInputVisual:!0});t.API.events.push(["postProcessText",function(A){var n=A.text;A.x,A.y;var i=A.options||{};A.mutex,i.lang;var s=[];if(i.isInputVisual=typeof i.isInputVisual!="boolean"||i.isInputVisual,r.setOptions(i),Object.prototype.toString.call(n)==="[object Array]"){var a=0;for(s=[],a=0;a<n.length;a+=1)Object.prototype.toString.call(n[a])==="[object Array]"?s.push([r.doBidiReorder(n[a][0]),n[a][1],n[a][2]]):s.push([r.doBidiReorder(n[a])]);A.text=s}else A.text=r.doBidiReorder(n);r.setOptions({isInputVisual:!0})}])})(dt),dt.API.TTFFont=(function(){function t(e){var r;if(this.rawData=e,r=this.contents=new da(e),this.contents.pos=4,r.readString(4)==="ttcf")throw new Error("TTCF not supported.");r.pos=0,this.parse(),this.subset=new l6(this),this.registerTTF()}return t.open=function(e){return new t(e)},t.prototype.parse=function(){return this.directory=new $Q(this.contents),this.head=new XQ(this),this.name=new r6(this),this.cmap=new Iy(this),this.toUnicode={},this.hhea=new JQ(this),this.maxp=new A6(this),this.hmtx=new n6(this),this.post=new e6(this),this.os2=new ZQ(this),this.loca=new o6(this),this.glyf=new i6(this),this.ascender=this.os2.exists&&this.os2.ascender||this.hhea.ascender,this.decender=this.os2.exists&&this.os2.decender||this.hhea.decender,this.lineGap=this.os2.exists&&this.os2.lineGap||this.hhea.lineGap,this.bbox=[this.head.xMin,this.head.yMin,this.head.xMax,this.head.yMax]},t.prototype.registerTTF=function(){var e,r,A,n,i;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=(function(){var s,a,o,l;for(l=[],s=0,a=(o=this.bbox).length;s<a;s++)e=o[s],l.push(Math.round(e*this.scaleFactor));return l}).call(this),this.stemV=0,this.post.exists?(A=255&(n=this.post.italic_angle),32768&(r=n>>16)&&(r=-(1+(65535^r))),this.italicAngle=+(r+"."+A)):this.italicAngle=0,this.ascender=Math.round(this.ascender*this.scaleFactor),this.decender=Math.round(this.decender*this.scaleFactor),this.lineGap=Math.round(this.lineGap*this.scaleFactor),this.capHeight=this.os2.exists&&this.os2.capHeight||this.ascender,this.xHeight=this.os2.exists&&this.os2.xHeight||0,this.familyClass=(this.os2.exists&&this.os2.familyClass||0)>>8,this.isSerif=(i=this.familyClass)===1||i===2||i===3||i===4||i===5||i===7,this.isScript=this.familyClass===10,this.flags=0,this.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),this.italicAngle!==0&&(this.flags|=64),this.flags|=32,!this.cmap.unicode)throw new Error("No unicode cmap for font")},t.prototype.characterToGlyph=function(e){var r;return((r=this.cmap.unicode)!=null?r.codeMap[e]:void 0)||0},t.prototype.widthOfGlyph=function(e){var r;return r=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(e).advance*r},t.prototype.widthOfString=function(e,r,A){var n,i,s,a;for(s=0,i=0,a=(e=""+e).length;0<=a?i<a:i>a;i=0<=a?++i:--i)n=e.charCodeAt(i),s+=this.widthOfGlyph(this.characterToGlyph(n))+A*(1e3/r)||0;return s*(r/1e3)},t.prototype.lineHeight=function(e,r){var A;return r==null&&(r=!1),A=r?this.lineGap:0,(this.ascender+A-this.decender)/1e3*e},t})();var $n,da=(function(){function t(e){this.data=e??[],this.pos=0,this.length=this.data.length}return t.prototype.readByte=function(){return this.data[this.pos++]},t.prototype.writeByte=function(e){return this.data[this.pos++]=e},t.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},t.prototype.writeUInt32=function(e){return this.writeByte(e>>>24&255),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e)},t.prototype.readInt32=function(){var e;return(e=this.readUInt32())>=2147483648?e-4294967296:e},t.prototype.writeInt32=function(e){return e<0&&(e+=4294967296),this.writeUInt32(e)},t.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},t.prototype.writeUInt16=function(e){return this.writeByte(e>>8&255),this.writeByte(255&e)},t.prototype.readInt16=function(){var e;return(e=this.readUInt16())>=32768?e-65536:e},t.prototype.writeInt16=function(e){return e<0&&(e+=65536),this.writeUInt16(e)},t.prototype.readString=function(e){var r,A;for(A=[],r=0;0<=e?r<e:r>e;r=0<=e?++r:--r)A[r]=String.fromCharCode(this.readByte());return A.join("")},t.prototype.writeString=function(e){var r,A,n;for(n=[],r=0,A=e.length;0<=A?r<A:r>A;r=0<=A?++r:--r)n.push(this.writeByte(e.charCodeAt(r)));return n},t.prototype.readShort=function(){return this.readInt16()},t.prototype.writeShort=function(e){return this.writeInt16(e)},t.prototype.readLongLong=function(){var e,r,A,n,i,s,a,o;return e=this.readByte(),r=this.readByte(),A=this.readByte(),n=this.readByte(),i=this.readByte(),s=this.readByte(),a=this.readByte(),o=this.readByte(),128&e?-1*(72057594037927940*(255^e)+281474976710656*(255^r)+1099511627776*(255^A)+4294967296*(255^n)+16777216*(255^i)+65536*(255^s)+256*(255^a)+(255^o)+1):72057594037927940*e+281474976710656*r+1099511627776*A+4294967296*n+16777216*i+65536*s+256*a+o},t.prototype.writeLongLong=function(e){var r,A;return r=Math.floor(e/4294967296),A=4294967295&e,this.writeByte(r>>24&255),this.writeByte(r>>16&255),this.writeByte(r>>8&255),this.writeByte(255&r),this.writeByte(A>>24&255),this.writeByte(A>>16&255),this.writeByte(A>>8&255),this.writeByte(255&A)},t.prototype.readInt=function(){return this.readInt32()},t.prototype.writeInt=function(e){return this.writeInt32(e)},t.prototype.read=function(e){var r,A;for(r=[],A=0;0<=e?A<e:A>e;A=0<=e?++A:--A)r.push(this.readByte());return r},t.prototype.write=function(e){var r,A,n,i;for(i=[],A=0,n=e.length;A<n;A++)r=e[A],i.push(this.writeByte(r));return i},t})(),$Q=(function(){var t;function e(r){var A,n,i;for(this.scalarType=r.readInt(),this.tableCount=r.readShort(),this.searchRange=r.readShort(),this.entrySelector=r.readShort(),this.rangeShift=r.readShort(),this.tables={},n=0,i=this.tableCount;0<=i?n<i:n>i;n=0<=i?++n:--n)A={tag:r.readString(4),checksum:r.readInt(),offset:r.readInt(),length:r.readInt()},this.tables[A.tag]=A}return e.prototype.encode=function(r){var A,n,i,s,a,o,l,c,f,h,u,g,p;for(p in u=Object.keys(r).length,o=Math.log(2),f=16*Math.floor(Math.log(u)/o),s=Math.floor(f/o),c=16*u-f,(n=new da).writeInt(this.scalarType),n.writeShort(u),n.writeShort(f),n.writeShort(s),n.writeShort(c),i=16*u,l=n.pos+i,a=null,g=[],r)for(h=r[p],n.writeString(p),n.writeInt(t(h)),n.writeInt(l),n.writeInt(h.length),g=g.concat(h),p==="head"&&(a=l),l+=h.length;l%4;)g.push(0),l++;return n.write(g),A=2981146554-t(n.data),n.pos=a+8,n.writeUInt32(A),n.data},t=function(r){var A,n,i,s;for(r=Uy.call(r);r.length%4;)r.push(0);for(i=new da(r),n=0,A=0,s=r.length;A<s;A=A+=4)n+=i.readUInt32();return 4294967295&n},e})(),YQ={}.hasOwnProperty,gi=function(t,e){for(var r in e)YQ.call(e,r)&&(t[r]=e[r]);function A(){this.constructor=t}return A.prototype=e.prototype,t.prototype=new A,t.__super__=e.prototype,t};$n=(function(){function t(e){var r;this.file=e,r=this.file.directory.tables[this.tag],this.exists=!!r,r&&(this.offset=r.offset,this.length=r.length,this.parse(this.file.contents))}return t.prototype.parse=function(){},t.prototype.encode=function(){},t.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},t})();var XQ=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return gi(t,$n),t.prototype.tag="head",t.prototype.parse=function(e){return e.pos=this.offset,this.version=e.readInt(),this.revision=e.readInt(),this.checkSumAdjustment=e.readInt(),this.magicNumber=e.readInt(),this.flags=e.readShort(),this.unitsPerEm=e.readShort(),this.created=e.readLongLong(),this.modified=e.readLongLong(),this.xMin=e.readShort(),this.yMin=e.readShort(),this.xMax=e.readShort(),this.yMax=e.readShort(),this.macStyle=e.readShort(),this.lowestRecPPEM=e.readShort(),this.fontDirectionHint=e.readShort(),this.indexToLocFormat=e.readShort(),this.glyphDataFormat=e.readShort()},t.prototype.encode=function(e){var r;return(r=new da).writeInt(this.version),r.writeInt(this.revision),r.writeInt(this.checkSumAdjustment),r.writeInt(this.magicNumber),r.writeShort(this.flags),r.writeShort(this.unitsPerEm),r.writeLongLong(this.created),r.writeLongLong(this.modified),r.writeShort(this.xMin),r.writeShort(this.yMin),r.writeShort(this.xMax),r.writeShort(this.yMax),r.writeShort(this.macStyle),r.writeShort(this.lowestRecPPEM),r.writeShort(this.fontDirectionHint),r.writeShort(e),r.writeShort(this.glyphDataFormat),r.data},t})(),Fy=(function(){function t(e,r){var A,n,i,s,a,o,l,c,f,h,u,g,p,w,m,B,x;switch(this.platformID=e.readUInt16(),this.encodingID=e.readShort(),this.offset=r+e.readInt(),f=e.pos,e.pos=this.offset,this.format=e.readUInt16(),this.length=e.readUInt16(),this.language=e.readUInt16(),this.isUnicode=this.platformID===3&&this.encodingID===1&&this.format===4||this.platformID===0&&this.format===4,this.codeMap={},this.format){case 0:for(o=0;o<256;++o)this.codeMap[o]=e.readByte();break;case 4:for(u=e.readUInt16(),h=u/2,e.pos+=6,i=(function(){var E,k;for(k=[],o=E=0;0<=h?E<h:E>h;o=0<=h?++E:--E)k.push(e.readUInt16());return k})(),e.pos+=2,p=(function(){var E,k;for(k=[],o=E=0;0<=h?E<h:E>h;o=0<=h?++E:--E)k.push(e.readUInt16());return k})(),l=(function(){var E,k;for(k=[],o=E=0;0<=h?E<h:E>h;o=0<=h?++E:--E)k.push(e.readUInt16());return k})(),c=(function(){var E,k;for(k=[],o=E=0;0<=h?E<h:E>h;o=0<=h?++E:--E)k.push(e.readUInt16());return k})(),n=(this.length-e.pos+this.offset)/2,a=(function(){var E,k;for(k=[],o=E=0;0<=n?E<n:E>n;o=0<=n?++E:--E)k.push(e.readUInt16());return k})(),o=m=0,x=i.length;m<x;o=++m)for(w=i[o],A=B=g=p[o];g<=w?B<=w:B>=w;A=g<=w?++B:--B)c[o]===0?s=A+l[o]:(s=a[c[o]/2+(A-g)-(h-o)]||0)!==0&&(s+=l[o]),this.codeMap[A]=65535&s}e.pos=f}return t.encode=function(e,r){var A,n,i,s,a,o,l,c,f,h,u,g,p,w,m,B,x,E,k,H,K,R,I,W,L,F,M,b,Y,ce,ee,le,Ae,te,T,S,O,P,z,ie,fe,Z,pe,we,be,je;switch(b=new da,s=Object.keys(e).sort(function(Te,Q){return Te-Q}),r){case"macroman":for(p=0,w=(function(){var Te=[];for(g=0;g<256;++g)Te.push(0);return Te})(),B={0:0},i={},Y=0,Ae=s.length;Y<Ae;Y++)B[pe=e[n=s[Y]]]==null&&(B[pe]=++p),i[n]={old:e[n],new:B[e[n]]},w[n]=B[e[n]];return b.writeUInt16(1),b.writeUInt16(0),b.writeUInt32(12),b.writeUInt16(0),b.writeUInt16(262),b.writeUInt16(0),b.write(w),{charMap:i,subtable:b.data,maxGlyphID:p+1};case"unicode":for(F=[],f=[],x=0,B={},A={},m=l=null,ce=0,te=s.length;ce<te;ce++)B[k=e[n=s[ce]]]==null&&(B[k]=++x),A[n]={old:k,new:B[k]},a=B[k]-n,m!=null&&a===l||(m&&f.push(m),F.push(n),l=a),m=n;for(m&&f.push(m),f.push(65535),F.push(65535),W=2*(I=F.length),R=2*Math.pow(Math.log(I)/Math.LN2,2),h=Math.log(R/2)/Math.LN2,K=2*I-R,o=[],H=[],u=[],g=ee=0,T=F.length;ee<T;g=++ee){if(L=F[g],c=f[g],L===65535){o.push(0),H.push(0);break}if(L-(M=A[L].new)>=32768)for(o.push(0),H.push(2*(u.length+I-g)),n=le=L;L<=c?le<=c:le>=c;n=L<=c?++le:--le)u.push(A[n].new);else o.push(M-L),H.push(0)}for(b.writeUInt16(3),b.writeUInt16(1),b.writeUInt32(12),b.writeUInt16(4),b.writeUInt16(16+8*I+2*u.length),b.writeUInt16(0),b.writeUInt16(W),b.writeUInt16(R),b.writeUInt16(h),b.writeUInt16(K),fe=0,S=f.length;fe<S;fe++)n=f[fe],b.writeUInt16(n);for(b.writeUInt16(0),Z=0,O=F.length;Z<O;Z++)n=F[Z],b.writeUInt16(n);for(we=0,P=o.length;we<P;we++)a=o[we],b.writeUInt16(a);for(be=0,z=H.length;be<z;be++)E=H[be],b.writeUInt16(E);for(je=0,ie=u.length;je<ie;je++)p=u[je],b.writeUInt16(p);return{charMap:A,subtable:b.data,maxGlyphID:x+1}}},t})(),Iy=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return gi(t,$n),t.prototype.tag="cmap",t.prototype.parse=function(e){var r,A,n;for(e.pos=this.offset,this.version=e.readUInt16(),n=e.readUInt16(),this.tables=[],this.unicode=null,A=0;0<=n?A<n:A>n;A=0<=n?++A:--A)r=new Fy(e,this.offset),this.tables.push(r),r.isUnicode&&this.unicode==null&&(this.unicode=r);return!0},t.encode=function(e,r){var A,n;return r==null&&(r="macroman"),A=Fy.encode(e,r),(n=new da).writeUInt16(0),n.writeUInt16(1),A.table=n.data.concat(A.subtable),A},t})(),JQ=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return gi(t,$n),t.prototype.tag="hhea",t.prototype.parse=function(e){return e.pos=this.offset,this.version=e.readInt(),this.ascender=e.readShort(),this.decender=e.readShort(),this.lineGap=e.readShort(),this.advanceWidthMax=e.readShort(),this.minLeftSideBearing=e.readShort(),this.minRightSideBearing=e.readShort(),this.xMaxExtent=e.readShort(),this.caretSlopeRise=e.readShort(),this.caretSlopeRun=e.readShort(),this.caretOffset=e.readShort(),e.pos+=8,this.metricDataFormat=e.readShort(),this.numberOfMetrics=e.readUInt16()},t})(),ZQ=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return gi(t,$n),t.prototype.tag="OS/2",t.prototype.parse=function(e){if(e.pos=this.offset,this.version=e.readUInt16(),this.averageCharWidth=e.readShort(),this.weightClass=e.readUInt16(),this.widthClass=e.readUInt16(),this.type=e.readShort(),this.ySubscriptXSize=e.readShort(),this.ySubscriptYSize=e.readShort(),this.ySubscriptXOffset=e.readShort(),this.ySubscriptYOffset=e.readShort(),this.ySuperscriptXSize=e.readShort(),this.ySuperscriptYSize=e.readShort(),this.ySuperscriptXOffset=e.readShort(),this.ySuperscriptYOffset=e.readShort(),this.yStrikeoutSize=e.readShort(),this.yStrikeoutPosition=e.readShort(),this.familyClass=e.readShort(),this.panose=(function(){var r,A;for(A=[],r=0;r<10;++r)A.push(e.readByte());return A})(),this.charRange=(function(){var r,A;for(A=[],r=0;r<4;++r)A.push(e.readInt());return A})(),this.vendorID=e.readString(4),this.selection=e.readShort(),this.firstCharIndex=e.readShort(),this.lastCharIndex=e.readShort(),this.version>0&&(this.ascent=e.readShort(),this.descent=e.readShort(),this.lineGap=e.readShort(),this.winAscent=e.readShort(),this.winDescent=e.readShort(),this.codePageRange=(function(){var r,A;for(A=[],r=0;r<2;r=++r)A.push(e.readInt());return A})(),this.version>1))return this.xHeight=e.readShort(),this.capHeight=e.readShort(),this.defaultChar=e.readShort(),this.breakChar=e.readShort(),this.maxContext=e.readShort()},t})(),e6=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return gi(t,$n),t.prototype.tag="post",t.prototype.parse=function(e){var r,A,n;switch(e.pos=this.offset,this.format=e.readInt(),this.italicAngle=e.readInt(),this.underlinePosition=e.readShort(),this.underlineThickness=e.readShort(),this.isFixedPitch=e.readInt(),this.minMemType42=e.readInt(),this.maxMemType42=e.readInt(),this.minMemType1=e.readInt(),this.maxMemType1=e.readInt(),this.format){case 65536:case 196608:break;case 131072:var i;for(A=e.readUInt16(),this.glyphNameIndex=[],i=0;0<=A?i<A:i>A;i=0<=A?++i:--i)this.glyphNameIndex.push(e.readUInt16());for(this.names=[],n=[];e.pos<this.offset+this.length;)r=e.readByte(),n.push(this.names.push(e.readString(r)));return n;case 151552:return A=e.readUInt16(),this.offsets=e.read(A);case 262144:return this.map=(function(){var s,a,o;for(o=[],i=s=0,a=this.file.maxp.numGlyphs;0<=a?s<a:s>a;i=0<=a?++s:--s)o.push(e.readUInt32());return o}).call(this)}},t})(),t6=function(t,e){this.raw=t,this.length=t.length,this.platformID=e.platformID,this.encodingID=e.encodingID,this.languageID=e.languageID},r6=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return gi(t,$n),t.prototype.tag="name",t.prototype.parse=function(e){var r,A,n,i,s,a,o,l,c,f,h;for(e.pos=this.offset,e.readShort(),r=e.readShort(),a=e.readShort(),A=[],i=0;0<=r?i<r:i>r;i=0<=r?++i:--i)A.push({platformID:e.readShort(),encodingID:e.readShort(),languageID:e.readShort(),nameID:e.readShort(),length:e.readShort(),offset:this.offset+a+e.readShort()});for(o={},i=c=0,f=A.length;c<f;i=++c)n=A[i],e.pos=n.offset,l=e.readString(n.length),s=new t6(l,n),o[h=n.nameID]==null&&(o[h]=[]),o[n.nameID].push(s);this.strings=o,this.copyright=o[0],this.fontFamily=o[1],this.fontSubfamily=o[2],this.uniqueSubfamily=o[3],this.fontName=o[4],this.version=o[5];try{this.postscriptName=o[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}catch{this.postscriptName=o[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}return this.trademark=o[7],this.manufacturer=o[8],this.designer=o[9],this.description=o[10],this.vendorUrl=o[11],this.designerUrl=o[12],this.license=o[13],this.licenseUrl=o[14],this.preferredFamily=o[15],this.preferredSubfamily=o[17],this.compatibleFull=o[18],this.sampleText=o[19]},t})(),A6=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return gi(t,$n),t.prototype.tag="maxp",t.prototype.parse=function(e){return e.pos=this.offset,this.version=e.readInt(),this.numGlyphs=e.readUInt16(),this.maxPoints=e.readUInt16(),this.maxContours=e.readUInt16(),this.maxCompositePoints=e.readUInt16(),this.maxComponentContours=e.readUInt16(),this.maxZones=e.readUInt16(),this.maxTwilightPoints=e.readUInt16(),this.maxStorage=e.readUInt16(),this.maxFunctionDefs=e.readUInt16(),this.maxInstructionDefs=e.readUInt16(),this.maxStackElements=e.readUInt16(),this.maxSizeOfInstructions=e.readUInt16(),this.maxComponentElements=e.readUInt16(),this.maxComponentDepth=e.readUInt16()},t})(),n6=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return gi(t,$n),t.prototype.tag="hmtx",t.prototype.parse=function(e){var r,A,n,i,s,a,o;for(e.pos=this.offset,this.metrics=[],r=0,a=this.file.hhea.numberOfMetrics;0<=a?r<a:r>a;r=0<=a?++r:--r)this.metrics.push({advance:e.readUInt16(),lsb:e.readInt16()});for(n=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=(function(){var l,c;for(c=[],r=l=0;0<=n?l<n:l>n;r=0<=n?++l:--l)c.push(e.readInt16());return c})(),this.widths=(function(){var l,c,f,h;for(h=[],l=0,c=(f=this.metrics).length;l<c;l++)i=f[l],h.push(i.advance);return h}).call(this),A=this.widths[this.widths.length-1],o=[],r=s=0;0<=n?s<n:s>n;r=0<=n?++s:--s)o.push(this.widths.push(A));return o},t.prototype.forGlyph=function(e){return e in this.metrics?this.metrics[e]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[e-this.metrics.length]}},t})(),Uy=[].slice,i6=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return gi(t,$n),t.prototype.tag="glyf",t.prototype.parse=function(){return this.cache={}},t.prototype.glyphFor=function(e){var r,A,n,i,s,a,o,l,c,f;return e in this.cache?this.cache[e]:(i=this.file.loca,r=this.file.contents,A=i.indexOf(e),(n=i.lengthOf(e))===0?this.cache[e]=null:(r.pos=this.offset+A,s=(a=new da(r.read(n))).readShort(),l=a.readShort(),f=a.readShort(),o=a.readShort(),c=a.readShort(),this.cache[e]=s===-1?new s6(a,l,f,o,c):new a6(a,s,l,f,o,c),this.cache[e]))},t.prototype.encode=function(e,r,A){var n,i,s,a,o;for(s=[],i=[],a=0,o=r.length;a<o;a++)n=e[r[a]],i.push(s.length),n&&(s=s.concat(n.encode(A)));return i.push(s.length),{table:s,offsets:i}},t})(),a6=(function(){function t(e,r,A,n,i,s){this.raw=e,this.numberOfContours=r,this.xMin=A,this.yMin=n,this.xMax=i,this.yMax=s,this.compound=!1}return t.prototype.encode=function(){return this.raw.data},t})(),s6=(function(){function t(e,r,A,n,i){var s,a;for(this.raw=e,this.xMin=r,this.yMin=A,this.xMax=n,this.yMax=i,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],s=this.raw;a=s.readShort(),this.glyphOffsets.push(s.pos),this.glyphIDs.push(s.readUInt16()),32&a;)s.pos+=1&a?4:2,128&a?s.pos+=8:64&a?s.pos+=4:8&a&&(s.pos+=2)}return t.prototype.encode=function(){var e,r,A;for(r=new da(Uy.call(this.raw.data)),e=0,A=this.glyphIDs.length;e<A;++e)r.pos=this.glyphOffsets[e];return r.data},t})(),o6=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return gi(t,$n),t.prototype.tag="loca",t.prototype.parse=function(e){var r,A;return e.pos=this.offset,r=this.file.head.indexToLocFormat,this.offsets=r===0?(function(){var n,i;for(i=[],A=0,n=this.length;A<n;A+=2)i.push(2*e.readUInt16());return i}).call(this):(function(){var n,i;for(i=[],A=0,n=this.length;A<n;A+=4)i.push(e.readUInt32());return i}).call(this)},t.prototype.indexOf=function(e){return this.offsets[e]},t.prototype.lengthOf=function(e){return this.offsets[e+1]-this.offsets[e]},t.prototype.encode=function(e,r){for(var A=new Uint32Array(this.offsets.length),n=0,i=0,s=0;s<A.length;++s)if(A[s]=n,i<r.length&&r[i]==s){++i,A[s]=n;var a=this.offsets[s],o=this.offsets[s+1]-a;o>0&&(n+=o)}for(var l=new Array(4*A.length),c=0;c<A.length;++c)l[4*c+3]=255&A[c],l[4*c+2]=(65280&A[c])>>8,l[4*c+1]=(16711680&A[c])>>16,l[4*c]=(4278190080&A[c])>>24;return l},t})(),l6=(function(){function t(e){this.font=e,this.subset={},this.unicodes={},this.next=33}return t.prototype.generateCmap=function(){var e,r,A,n,i;for(r in n=this.font.cmap.tables[0].codeMap,e={},i=this.subset)A=i[r],e[r]=n[A];return e},t.prototype.glyphsFor=function(e){var r,A,n,i,s,a,o;for(n={},s=0,a=e.length;s<a;s++)n[i=e[s]]=this.font.glyf.glyphFor(i);for(i in r=[],n)(A=n[i])!=null&&A.compound&&r.push.apply(r,A.glyphIDs);if(r.length>0)for(i in o=this.glyphsFor(r))A=o[i],n[i]=A;return n},t.prototype.encode=function(e,r){var A,n,i,s,a,o,l,c,f,h,u,g,p,w,m;for(n in A=Iy.encode(this.generateCmap(),"unicode"),s=this.glyphsFor(e),u={0:0},m=A.charMap)u[(o=m[n]).old]=o.new;for(g in h=A.maxGlyphID,s)g in u||(u[g]=h++);return c=(function(B){var x,E;for(x in E={},B)E[B[x]]=x;return E})(u),f=Object.keys(c).sort(function(B,x){return B-x}),p=(function(){var B,x,E;for(E=[],B=0,x=f.length;B<x;B++)a=f[B],E.push(c[a]);return E})(),i=this.font.glyf.encode(s,p,u),l=this.font.loca.encode(i.offsets,p),w={cmap:this.font.cmap.raw(),glyf:i.table,loca:l,hmtx:this.font.hmtx.raw(),hhea:this.font.hhea.raw(),maxp:this.font.maxp.raw(),post:this.font.post.raw(),name:this.font.name.raw(),head:this.font.head.encode(r)},this.font.os2.exists&&(w["OS/2"]=this.font.os2.raw()),this.font.directory.encode(w)},t})();dt.API.PDFObject=(function(){var t;function e(){}return t=function(r,A){return(Array(A+1).join("0")+r).slice(-A)},e.convert=function(r){var A,n,i,s;if(Array.isArray(r))return"["+(function(){var a,o,l;for(l=[],a=0,o=r.length;a<o;a++)A=r[a],l.push(e.convert(A));return l})().join(" ")+"]";if(typeof r=="string")return"/"+r;if(r?.isString)return"("+r+")";if(r instanceof Date)return"(D:"+t(r.getUTCFullYear(),4)+t(r.getUTCMonth(),2)+t(r.getUTCDate(),2)+t(r.getUTCHours(),2)+t(r.getUTCMinutes(),2)+t(r.getUTCSeconds(),2)+"Z)";if({}.toString.call(r)==="[object Object]"){for(n in i=["<<"],r)s=r[n],i.push("/"+n+" "+e.convert(s));return i.push(">>"),i.join(`
|
|
79
|
+
`)}return""+r},e})();const Md="diagramforge";function xo(t){return JSON.stringify({app:Md,version:pm,project:t},null,2)}function _y(t){if(typeof t!="object"||t===null)return!1;const e=t;return typeof e.id=="string"&&typeof e.name=="string"&&Array.isArray(e.pages)&&Array.isArray(e.assets)}function Bu(t){let e;try{e=JSON.parse(t)}catch{throw new Error("File is not valid JSON.")}if(typeof e=="object"&&e!==null&&"project"in e){const r=e;if(r.app&&r.app!==Md)throw new Error("Unrecognized document format.");if(!_y(r.project))throw new Error("Document is missing a valid project.");return r.project}if(_y(e))return e;throw new Error("Document does not contain a diagram project.")}function Dd(t,e){const r=URL.createObjectURL(t),A=document.createElement("a");A.href=r,A.download=e,document.body.appendChild(A),A.click(),A.remove(),setTimeout(()=>URL.revokeObjectURL(r),1e3)}function Hd(t,e,r="text/plain"){Dd(new Blob([t],{type:`${r};charset=utf-8`}),e)}function Eo(t,e="diagram"){return t.trim().replace(/[^\w.\- ]+/g,"").replace(/\s+/g,"-").replace(/^[-.]+/,"").slice(0,80)||e}function bu(t,e,r){return t.map(([A,n],i)=>`${i===0?"M":"L"} ${A*e} ${n*r}`).join(" ")+" Z"}function Qy(t){const{width:e,height:r,kind:A,cornerRadius:n}=t;return c6(A,e,r,n)}function c6(t,e,r,A=0){switch(t){case"rectangle":case"text":case"sticky-note":case"image":case"icon":case"group":case"swimlane-pool":case"swimlane-lane":return{type:"rect",rx:0};case"rounded-rectangle":return{type:"rect",rx:Math.min(A||12,e/2,r/2)};case"ellipse":case"circle":return{type:"ellipse"};case"diamond":return{type:"path",d:bu([[.5,0],[1,.5],[.5,1],[0,.5]],e,r)};case"triangle":return{type:"path",d:bu([[.5,0],[1,1],[0,1]],e,r)};case"hexagon":return{type:"path",d:bu([[.25,0],[.75,0],[1,.5],[.75,1],[.25,1],[0,.5]],e,r)};case"parallelogram":return{type:"path",d:bu([[.25,0],[1,0],[.75,1],[0,1]],e,r)};case"comment":return{type:"path",d:u6(e,r)};case"cloud":return{type:"path",d:f6(e,r)};case"cylinder":return{type:"path",d:h6(e,r)};case"actor":return{type:"path",d:d6(e,r)};default:return{type:"rect",rx:0}}}function u6(t,e){const r=Math.min(12,t/4,e/4),A=e*.8;return[`M ${r} 0`,`H ${t-r}`,`Q ${t} 0 ${t} ${r}`,`V ${A-r}`,`Q ${t} ${A} ${t-r} ${A}`,`H ${t*.3}`,`L ${t*.16} ${e}`,`L ${t*.18} ${A}`,`H ${r}`,`Q 0 ${A} 0 ${A-r}`,`V ${r}`,`Q 0 0 ${r} 0`,"Z"].join(" ")}function ky(t,e,r){return t.length===0?"":t.map((A,n)=>`${n===0?"M":"L"} ${A.x*e} ${A.y*r}`).join(" ")}function f6(t,e){const r=(A,n)=>`${A*t} ${n*e}`;return[`M ${r(.25,.75)}`,`A ${.18*t} ${.22*e} 0 0 1 ${r(.2,.4)}`,`A ${.2*t} ${.25*e} 0 0 1 ${r(.5,.28)}`,`A ${.2*t} ${.25*e} 0 0 1 ${r(.82,.42)}`,`A ${.16*t} ${.2*e} 0 0 1 ${r(.78,.78)}`,"Z"].join(" ")}function h6(t,e){const r=e*.12;return[`M 0 ${r}`,`A ${t/2} ${r} 0 0 1 ${t} ${r}`,`L ${t} ${e-r}`,`A ${t/2} ${r} 0 0 1 0 ${e-r}`,"Z",`M 0 ${r}`,`A ${t/2} ${r} 0 0 0 ${t} ${r}`].join(" ")}function d6(t,e){const r=t/2,A=Math.min(t,e)*.16,n=A;return[`M ${r} ${n-A}`,`a ${A} ${A} 0 1 0 0.01 0`,"Z",`M ${r} ${n+A} L ${r} ${e*.62}`,`M ${t*.15} ${e*.42} L ${t*.85} ${e*.42}`,`M ${r} ${e*.62} L ${t*.2} ${e}`,`M ${r} ${e*.62} L ${t*.8} ${e}`].join(" ")}function Sl(t,e){switch(t){case"dashed":return`${e*3} ${e*2}`;case"dotted":return`${e} ${e*2}`;default:return}}function p6(t,e){return t.type==="none"?"none":t.type==="gradient"&&t.gradientColor?`url(#${e})`:t.color}const Ly={top:{x:.5,y:0},right:{x:1,y:.5},bottom:{x:.5,y:1},left:{x:0,y:.5},center:{x:.5,y:.5},"top-left":{x:0,y:0},"top-right":{x:1,y:0},"bottom-left":{x:0,y:1},"bottom-right":{x:1,y:1}},Rd=["top","right","bottom","left"];function g6(t){if(!t)return{x:.5,y:.5};if(t in Ly)return Ly[t];const[e,r]=t.split(":").map(Number);return Number.isFinite(e)&&Number.isFinite(r)?{x:e,y:r}:{x:.5,y:.5}}function Li(t,e){const r=g6(e);return{x:t.x+t.width*r.x,y:t.y+t.height*r.y}}function Fl(t){return fU({x:t.x,y:t.y,width:t.width,height:t.height})}function jd(t,e){let r={name:"center",point:Fl(t)},A=1/0;for(const n of Rd){const i=Li(t,n),s=(i.x-e.x)**2+(i.y-e.y)**2;s<A&&(A=s,r={name:n,point:i})}return r}function v6(t,e){const r=Fl(t),A=Fl(e),n=A.x-r.x,i=A.y-r.y,s=Math.min(t.height,e.height)*.25;return i>s?{source:"bottom",target:"top"}:i<-s?{source:"top",target:"bottom"}:n>=0?{source:"right",target:"left"}:{source:"left",target:"right"}}function Ty(t){switch(t){case"top":return{x:0,y:-1};case"bottom":return{x:0,y:1};case"left":return{x:-1,y:0};case"right":return{x:1,y:0};default:return{x:0,y:0}}}function Ny(t,e){const r=e.x-t.x,A=e.y-t.y;return Math.abs(A)>=Math.abs(r)?A>=0?"bottom":"top":r>=0?"right":"left"}function Oy(t,e,r,A){if(e.shapeId){const n=t.shapes[e.shapeId];if(n){if(e.anchor)return{point:Li(n,e.anchor),anchor:e.anchor};const i=A.shapeId?t.shapes[A.shapeId]:void 0;if(i){const s=v6(r==="source"?n:i,r==="source"?i:n),a=r==="source"?s.source:s.target;return{point:Li(n,a),anchor:a}}if(A.point){const s=jd(n,A.point);return{point:s.point,anchor:s.name}}return{point:Fl(n),anchor:"center"}}}return{point:e.point??{x:0,y:0}}}function Il(t,e){const r=Oy(e,t.source,"source",t.target),A=Oy(e,t.target,"target",t.source),n=r.point,i=A.point;let s;switch(t.router){case"straight":s=[n,...t.waypoints,i];break;case"orthogonal":s=m6(n,r.anchor,i,A.anchor,t.waypoints);break;case"curved":s=[n,...t.waypoints,i];break;case"bezier":s=[n,i];break;default:s=[n,...t.waypoints,i]}let a;switch(t.router){case"straight":a=Cu(s);break;case"orthogonal":a=Cu(s);break;case"curved":a=b6(s);break;case"bezier":a=C6(n,i);break;default:a=Cu(s)}const o=s.length>=2?s:[n,i],l=o[o.length-2]??n,c=o[1]??i;return{path:a,start:n,end:i,mid:B6(o),endAngle:Math.atan2(i.y-l.y,i.x-l.x),startAngle:Math.atan2(c.y-n.y,c.x-n.x)}}const Py=14;function m6(t,e,r,A,n){if(n.length>0)return[t,...n,r];const i=e??Ny(t,r),s=A??Ny(r,t),a=My(t,Ty(i),Py),o=My(r,Ty(s),Py),l=w6(a,o,i,s);return y6([t,a,...l,o,r])}function My(t,e,r){return{x:t.x+e.x*r,y:t.y+e.y*r}}function w6(t,e,r,A){const n=r==="top"||r==="bottom",i=A==="top"||A==="bottom";if(n&&i){const s=(t.y+e.y)/2;return[{x:t.x,y:s},{x:e.x,y:s},e]}if(!n&&!i){const s=(t.x+e.x)/2;return[{x:s,y:t.y},{x:s,y:e.y},e]}return n?[{x:t.x,y:e.y},e]:[{x:e.x,y:t.y},e]}function y6(t){const e=[];for(const r of t){const A=e[e.length-1];A&&Math.abs(A.x-r.x)<.01&&Math.abs(A.y-r.y)<.01||e.push(r)}return e}function B6(t){if(t.length<2)return t[0]??{x:0,y:0};let e=0;const r=[];for(let i=0;i<t.length-1;i++){const s=t[i],a=t[i+1],o=Math.hypot(a.x-s.x,a.y-s.y);r.push({a:s,b:a,len:o}),e+=o}const A=e/2;let n=0;for(const i of r){if(n+i.len>=A){const s=i.len===0?0:(A-n)/i.len;return{x:i.a.x+(i.b.x-i.a.x)*s,y:i.a.y+(i.b.y-i.a.y)*s}}n+=i.len}return t[Math.floor(t.length/2)]}function Cu(t){return t.map((e,r)=>`${r===0?"M":"L"} ${e.x} ${e.y}`).join(" ")}function b6(t){if(t.length<3)return Cu(t);let e=`M ${t[0].x} ${t[0].y}`;for(let r=0;r<t.length-1;r++){const A=t[r],n=t[r+1],i=(A.x+n.x)/2;e+=` Q ${A.x} ${A.y} ${i} ${(A.y+n.y)/2}`,e+=` T ${n.x} ${n.y}`}return e}function C6(t,e){const r=Math.abs(e.x-t.x)*.5+20;return`M ${t.x} ${t.y} C ${t.x+r} ${t.y} ${e.x-r} ${e.y} ${e.x} ${e.y}`}function Ul(t){return new Map(t.layers.map(e=>[e.id,e]))}function x6(t,e){let r=t.get(e);for(;r;){if(!r.visible)return!1;r=r.parentId?t.get(r.parentId):void 0}return!0}function E6(t,e){let r=t.get(e);for(;r;){if(r.locked)return!0;r=r.parentId?t.get(r.parentId):void 0}return!1}function xu(t,e){return!e.hidden&&x6(t,e.layerId)}function S6(t,e){return e.locked||E6(t,e.layerId)}function vn(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Kd(t){const e=Ul(t),r=[];for(const a of Object.values(t.shapes))xu(e,a)&&r.push({x:a.x,y:a.y,width:a.width,height:a.height});for(const a of Object.values(t.edges)){if(a.hidden)continue;const o=Il(a,t);r.push({x:o.start.x,y:o.start.y,width:0,height:0}),r.push({x:o.end.x,y:o.end.y,width:0,height:0})}if(r.length===0)return null;let A=1/0,n=1/0,i=-1/0,s=-1/0;for(const a of r)A=Math.min(A,a.x),n=Math.min(n,a.y),i=Math.max(i,a.x+a.width),s=Math.max(s,a.y+a.height);return{x:A,y:n,width:i-A,height:s-n}}function Eu(t,e,r={}){const A=r.padding??24,n=Kd(e)??{x:0,y:0,width:100,height:100},i=Math.ceil(n.width+A*2),s=Math.ceil(n.height+A*2),a=n.x-A,o=n.y-A,l=Ul(e),c=[];r.background&&c.push(`<rect x="${a}" y="${o}" width="${i}" height="${s}" fill="${vn(r.background)}"/>`);for(const h of e.order){const u=e.edges[h];if(u){u.hidden||c.push(_6(u,e));continue}const g=e.shapes[h];g&&xu(l,g)&&c.push(F6(g))}return{svg:`<svg xmlns="http://www.w3.org/2000/svg" width="${i}" height="${s}" viewBox="${a} ${o} ${i} ${s}"><title>${vn(t.name)} — ${vn(e.name)}</title>`+c.join("")+"</svg>",width:i,height:s}}function F6(t){const e=`translate(${t.x} ${t.y}) rotate(${t.rotation} ${t.width/2} ${t.height/2})`,r=I6(t),A=t.text?U6(t):"";return`<g transform="${e}" opacity="${t.opacity}">${r}${A}</g>`}function I6(t){if(t.kind==="group")return"";if(t.kind==="image"&&t.src)return`<image href="${vn(t.src)}" width="${t.width}" height="${t.height}" preserveAspectRatio="xMidYMid meet"/>`;if(t.kind==="icon"&&t.libraryId){const i=Jh(t.libraryId);if(i)return`<g transform="${`scale(${t.width/i.viewSize} ${t.height/i.viewSize})`}">${i.body}</g>`}if(t.kind==="freehand"&&t.points)return`<path d="${ky(t.points,t.width,t.height)}" fill="none" stroke="${vn(t.stroke)}" stroke-width="${t.strokeWidth}" stroke-linecap="round" stroke-linejoin="round"/>`;const e=t.fill.type==="none"?"none":t.fill.color,r=Sl(t.dash,t.strokeWidth),A=`fill="${vn(e)}" stroke="${vn(t.stroke)}" stroke-width="${t.strokeWidth}"`+(r?` stroke-dasharray="${r}"`:""),n=Qy(t);return n.type==="rect"?`<rect width="${t.width}" height="${t.height}" rx="${n.rx}" ry="${n.rx}" ${A}/>`:n.type==="ellipse"?`<ellipse cx="${t.width/2}" cy="${t.height/2}" rx="${t.width/2}" ry="${t.height/2}" ${A}/>`:`<path d="${n.d}" ${A}/>`}function U6(t){const e=t.typography,r=t.text.split(`
|
|
80
|
+
`),A=e.fontSize*e.lineHeight,n=e.align==="left"?"start":e.align==="right"?"end":"middle",i=e.align==="left"?6:e.align==="right"?t.width-6:t.width/2,s=r.length*A;let a;e.verticalAlign==="top"?a=e.fontSize:e.verticalAlign==="bottom"?a=t.height-s+e.fontSize:a=(t.height-s)/2+e.fontSize;const o=r.map((l,c)=>`<tspan x="${i}" y="${a+c*A}">${vn(l)}</tspan>`).join("");return`<text text-anchor="${n}" font-family="${vn(e.fontFamily)}" font-size="${e.fontSize}" font-weight="${e.fontWeight}" font-style="${e.fontStyle}" text-decoration="${e.textDecoration}" fill="${vn(e.color)}">${o}</text>`}function _6(t,e){const r=Il(t,e),A=t.animated?`${t.strokeWidth*4} ${t.strokeWidth*3}`:Sl(t.dash,t.strokeWidth),n=Q6(t),i=t.endArrow!=="none"?` marker-end="url(#arrow_${t.id}_end)"`:"",s=t.startArrow!=="none"?` marker-start="url(#arrow_${t.id}_start)"`:"",a=`<path d="${r.path}" fill="none" stroke="${vn(t.stroke)}" stroke-width="${t.strokeWidth}" stroke-linejoin="round" stroke-linecap="round"`+(A?` stroke-dasharray="${A}"`:"")+`${i}${s}/>`;let o="";if(t.label){const l=Math.max(t.label.length*7+12,20);o=`<g transform="translate(${r.mid.x} ${r.mid.y})"><rect x="${-l/2}" y="-11" width="${l}" height="22" rx="4" fill="#ffffff" opacity="0.9"/><text text-anchor="middle" dominant-baseline="middle" font-size="12" fill="#1f2430">${vn(t.label)}</text></g>`}return`<g opacity="${t.opacity}"><defs>${n}</defs>${a}${o}</g>`}function Q6(t){const e=[],r=(i,s)=>{switch(i){case"triangle":return`<path d="M1,1 L11,6 L1,11 Z" fill="${s}"/>`;case"arrow":return`<path d="M1,1 L11,6 L1,11" fill="none" stroke="${s}" stroke-width="2" stroke-linejoin="round"/>`;case"diamond":return`<path d="M1,6 L6,1 L11,6 L6,11 Z" fill="${s}"/>`;case"circle":return`<circle cx="6" cy="6" r="4" fill="${s}"/>`;default:return""}},A=vn(t.stroke),n=i=>i==="circle"?10:11;return t.endArrow!=="none"&&e.push(`<marker id="arrow_${t.id}_end" markerWidth="12" markerHeight="12" refX="${n(t.endArrow)}" refY="6" orient="auto" markerUnits="userSpaceOnUse">${r(t.endArrow,A)}</marker>`),t.startArrow!=="none"&&e.push(`<marker id="arrow_${t.id}_start" markerWidth="12" markerHeight="12" refX="${n(t.startArrow)}" refY="6" orient="auto-start-reverse" markerUnits="userSpaceOnUse">${r(t.startArrow,A)}</marker>`),e.join("")}function k6(t,e,r){const A=new Blob([t],{type:"image/svg+xml;charset=utf-8"}),n=URL.createObjectURL(A);return new Promise((i,s)=>{const a=new Image;a.width=e,a.height=r,a.onload=()=>{URL.revokeObjectURL(n),i(a)},a.onerror=()=>{URL.revokeObjectURL(n),s(new Error("Failed to rasterize SVG"))},a.src=n})}async function Dy(t,e,r,A){const n=A.scale??2,i=await k6(t,e,r),s=document.createElement("canvas");s.width=Math.max(1,Math.round(e*n)),s.height=Math.max(1,Math.round(r*n));const a=s.getContext("2d");if(!a)throw new Error("Canvas 2D context unavailable");return A.background&&(a.fillStyle=A.background,a.fillRect(0,0,s.width,s.height)),a.drawImage(i,0,0,s.width,s.height),s}async function L6(t,e,r,A={}){const n=await Dy(t,e,r,A),i=A.type??"image/png";return new Promise((s,a)=>{n.toBlob(o=>o?s(o):a(new Error("Canvas toBlob failed")),i,A.quality)})}async function T6(t,e,r,A={}){const n=await Dy(t,e,r,A);return{dataUrl:n.toDataURL(A.type??"image/png",A.quality),pixelWidth:n.width,pixelHeight:n.height}}function Hy(t,e){const{svg:r}=Eu(t,e);Hd(r,`${Su(t,e)}.svg`,"image/svg+xml")}async function Ry(t,e,r={}){const{svg:A,width:n,height:i}=Eu(t,e,{background:r.background}),s=await L6(A,n,i,{scale:r.scale??2,type:"image/png"});Dd(s,`${Su(t,e)}.png`)}async function jy(t,e,r={}){const{svg:A,width:n,height:i}=Eu(t,e,{background:r.background??"#ffffff"}),{dataUrl:s}=await T6(A,n,i,{scale:r.scale??2,background:r.background??"#ffffff"}),a=n>=i?"landscape":"portrait",o=new dt({orientation:a,unit:"pt",format:[n,i]});o.addImage(s,"PNG",0,0,n,i),o.save(`${Su(t,e)}.pdf`)}function Ky(t){Hd(xo(t),`${Eo(t.name)}.dgm.json`,"application/json")}async function zy(t){const e=new SU;e.file(`${Eo(t.name)}.dgm.json`,xo(t));const r=e.folder("pages");t.pages.forEach((n,i)=>{const{svg:s}=Eu(t,n);r?.file(`${String(i+1).padStart(2,"0")}-${Eo(n.name,"page")}.svg`,s)});const A=await e.generateAsync({type:"blob",compression:"DEFLATE"});Dd(A,`${Eo(t.name)}.zip`)}function N6(t,e,r){const A=FA.exporters().find(i=>i.id===t);if(!A)throw new Error(`Unknown exporter: ${t}`);const n=A.serialize(e,r);Hd(n,`${Su(e,r)}.${A.extension}`,A.mimeType??"text/plain")}function Su(t,e){const r=Eo(t.name),A=Eo(e.name,"page");return t.pages.length>1?`${r}-${A}`:r}const zd="d=",Gd="dv=";function O6(t){const e=new TextEncoder().encode(t);let r="";for(const A of e)r+=String.fromCharCode(A);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function P6(t){let e=t.replace(/-/g,"+").replace(/_/g,"/");for(;e.length%4;)e+="=";const r=atob(e),A=Uint8Array.from(r,n=>n.charCodeAt(0));return new TextDecoder().decode(A)}function Gy(t,e=!1){const r=xo(t);return(e?Gd:zd)+O6(r)}function M6(t){const e=t.startsWith("#")?t.slice(1):t;let r,A=!1;if(e.startsWith(Gd))r=e.slice(Gd.length),A=!0;else if(e.startsWith(zd))r=e.slice(zd.length);else return null;try{return{project:Bu(P6(r)),viewOnly:A}}catch{return null}}function Vd(t,e=!1){return`${window.location.href.split("#")[0]}#${Gy(t,e)}`}async function Vy(t){const e=Vd(t,!1);return await navigator.clipboard.writeText(e),e}async function qy(t){const e=Vd(t,!0);return await navigator.clipboard.writeText(e),e}const Wy="diagramforge.userTemplates";function qd(){try{const t=localStorage.getItem(Wy);if(!t)return[];const e=JSON.parse(t);return Array.isArray(e)?e:[]}catch{return[]}}function $y(t){localStorage.setItem(Wy,JSON.stringify(t))}function Yy(){return qd().sort((t,e)=>e.savedAt-t.savedAt)}function Xy(t,e=""){const r=structuredClone(Qe.getState().activePage()),A={id:`user-${Date.now()}`,title:t.trim()||r.name,description:e.trim()||`Saved from ${r.name}`,category:"My templates",accent:"#6366f1",savedAt:Date.now(),page:r};return $y([A,...qd()]),A}function D6(t){$y(qd().filter(e=>e.id!==t))}function H6(t){const e=Gn(t.title),r=e.pages[0];return Object.assign(r,structuredClone(t.page),{id:r.id,name:t.title}),e}function R6(){const[t,e]=ke.useState(!1),r=ke.useRef(null),A=Qe(l=>l.replaceProject),n=Qe(l=>l.renameProject),i=Qe(l=>l.project),s=i.name,a=_e(l=>l.setTemplatesOpen);ke.useEffect(()=>{if(!t)return;const l=c=>{r.current&&!r.current.contains(c.target)&&e(!1)};return window.addEventListener("mousedown",l),()=>window.removeEventListener("mousedown",l)},[t]);const o=[{label:"New diagram",icon:LI,action:()=>{A(Gn()),Et.getState().clear()}},{label:"Rename diagram...",icon:Dh,action:()=>{const l=window.prompt("Diagram name",s);l&&l.trim()&&n(l.trim())}},{label:"Browse templates...",icon:$c,action:()=>a(!0)},{label:"Save page as template...",icon:nm,action:()=>{const l=Qe.getState().activePage(),c=window.prompt("Template name",l.name);if(!c?.trim())return;const f=window.prompt("Description (optional)",`Saved from ${l.name}`)??"";Xy(c.trim(),f),Xe.emit("toast",{message:`Saved “${c.trim()}” to My templates.`,kind:"success"})}},{label:"Copy share link",icon:Mh,action:()=>{Vy(i).then(()=>Xe.emit("toast",{message:"Share link copied.",kind:"success"})).catch(()=>Xe.emit("toast",{message:"Could not copy link.",kind:"error"}))}},{label:"Copy view-only link",icon:Mh,action:()=>{qy(i).then(()=>Xe.emit("toast",{message:"View-only link copied.",kind:"success"})).catch(()=>Xe.emit("toast",{message:"Could not copy link.",kind:"error"}))}},{label:"Import file...",icon:TI,action:()=>Xe.emit("import:request",void 0)},{label:"Save as JSON",icon:oo,action:()=>Xe.emit("export:request",{format:"json"})},{label:"Export as PNG",icon:oo,action:()=>Xe.emit("export:request",{format:"png"})},{label:"Export as SVG",icon:oo,action:()=>Xe.emit("export:request",{format:"svg"})},{label:"Export as PDF",icon:oo,action:()=>Xe.emit("export:request",{format:"pdf"})},{label:"Export project (.zip)",icon:oo,action:()=>Xe.emit("export:request",{format:"zip"})},...FA.exporters().map(l=>({label:l.title,icon:oo,action:()=>{const c=Qe.getState();try{N6(l.id,c.project,c.activePage())}catch(f){const h=f instanceof Error?f.message:"Export failed";Xe.emit("toast",{message:h,kind:"error"})}}}))];return _.jsxs("div",{className:"relative",ref:r,children:[_.jsxs("button",{type:"button",onClick:()=>e(l=>!l),className:"df-focus-ring flex items-center gap-1.5 rounded-md px-2 py-1.5 text-sm font-semibold hover:brightness-110",style:{color:"var(--color-text)"},"aria-haspopup":"menu","aria-expanded":t,children:[_.jsx(Kh,{size:18,style:{color:"var(--color-accent)"}}),_.jsx("span",{className:"max-w-[140px] truncate",children:s}),_.jsx(Vc,{size:14})]}),t&&_.jsx("div",{role:"menu",className:"absolute left-0 top-full z-50 mt-1 w-56 overflow-hidden rounded-lg border bordered py-1 shadow-xl surface",children:o.map(l=>_.jsxs("button",{role:"menuitem",type:"button",onClick:()=>{l.action(),e(!1)},className:"flex w-full items-center gap-2.5 px-3 py-1.5 text-left text-sm hover:brightness-110",style:{color:"var(--color-text)"},children:[_.jsx(l.icon,{size:15}),l.label]},l.label))})]})}const Jy=200,Zy=140,j6=80,K6=80,eB={x:80,y:80};function z6(t,e){const r=new Map;for(const n of t)r.set(n,0);const A=t.size+1;for(let n=0;n<A;n++){let i=!1;for(const s of Object.values(e.edges)){const a=s.source.shapeId,o=s.target.shapeId;if(!a||!o||!t.has(a)||!t.has(o))continue;const l=r.get(a)??0;(r.get(o)??0)<l+1&&(r.set(o,l+1),i=!0)}if(!i)break}return r}function Wd(t,e){const r=e&&e.length>0?new Set(e.filter(s=>t.shapes[s])):new Set(Object.keys(t.shapes));if(r.size===0)return{};const A=z6(r,t),n=new Map;for(const s of r){const a=A.get(s)??0,o=n.get(a)??[];o.push(s),n.set(a,o)}const i={};for(const[s,a]of n)a.forEach((o,l)=>{const c=t.shapes[o],f=s*(Zy+K6),h=l*(Jy+j6);i[o]={x:eB.x+h+(Jy-c.width)/2,y:eB.y+f+(Zy-c.height)/2}});return i}function tB(t){const e=Qe.getState(),r=e.activePage(),A=Wd(r,t);Object.keys(A).length!==0&&Et.getState().run("Auto layout",()=>e.updateShapes(A))}function G6(t){return{fill:t.fill,stroke:t.stroke,strokeWidth:t.strokeWidth,dash:t.dash,opacity:t.opacity,shadow:t.shadow,blur:t.blur,typography:{...t.typography},cornerRadius:t.cornerRadius}}function rB(){const t=_e.getState(),e=Qe.getState().activePage(),r=t.selectedIds.find(n=>e.shapes[n]);if(!r)return!1;const A=G6(e.shapes[r]);return t.setFormatPainterStyle(A),t.setFormatPainterActive(!0),!0}function V6(t){const e=_e.getState().formatPainterStyle;if(!e||t.length===0)return;const r=Qe.getState();Et.getState().run("Apply format",()=>{for(const A of t)r.activePage().shapes[A]&&r.updateShape(A,e)})}function $d(){const t=_e.getState();t.setFormatPainterActive(!1),t.setFormatPainterStyle(null)}function q6(){const t=_e.getState().camera,r=document.querySelector('[aria-label="Diagram canvas"]')?.getBoundingClientRect();return as({x:(r?.width??800)/2,y:(r?.height??600)/2},t)}const Yd=720,AB=36,Xd=100,W6=120;function nB(t=3){const e=Math.max(1,Math.min(8,t)),r=Qe.getState(),n=r.activePage().layers[0].id,i=q6(),s=AB+e*Xd,a=i.x-Yd/2,o=i.y-s/2,l=vr({kind:"swimlane-pool",x:a,y:o,width:Yd,height:s,text:"Pool",fill:{type:"solid",color:"#f8fafc"},stroke:"#64748b",strokeWidth:2,locked:!0},n),c=[];for(let h=0;h<e;h++)c.push(vr({kind:"swimlane-lane",x:a,y:o+AB+h*Xd,width:Yd,height:Xd,text:`Lane ${h+1}`,fill:{type:"solid",color:h%2===0?"#ffffff":"#f1f5f9"},stroke:"#94a3b8",strokeWidth:1,metadata:{laneHeader:W6}},n,h));const f=[l,...c];Et.getState().run("Insert swimlane",()=>{r.addShapes(f),_e.getState().select(c.map(h=>h.id))})}function So(t,e,r){if(e===r)return!0;let A=t.shapes[e];for(;A?.parentId;){if(A.parentId===r)return!0;A=t.shapes[A.parentId]}return!1}function $6(t,e,r){if(r&&So(t,e,r))return e;let A=t.shapes[e],n=e;const i=new Set;for(;A?.parentId&&!i.has(A.parentId);)i.add(A.parentId),n=A.parentId,A=t.shapes[A.parentId];return n}function iB(t,e,r){for(let A=t.order.length-1;A>=0;A--){const n=t.order[A],i=t.shapes[n];if(!(!i||!ca(i)||i.hidden)&&!(r&&(n===r||So(t,r,n)))&&Xc(e,{x:i.x,y:i.y,width:i.width,height:i.height}))return i}}function aB(t,e){const r=new Set(co(t,e)),A={};for(const n of Object.values(t.edges)){const i=n.source.shapeId,s=n.target.shapeId,a=!!(i&&s&&r.has(i)&&r.has(s));a&&n.groupId!==e&&(A[n.id]={groupId:e}),!a&&n.groupId===e&&(A[n.id]={groupId:void 0})}return A}function Y6(t){const e=Qe.getState(),r=e.activePage(),A=new Set(t.filter(l=>ca(r.shapes[l]))),n={},i=new Set;for(const l of t){const c=r.shapes[l];if(!c||ca(c)||[...A].some(g=>So(r,l,g)))continue;const f={x:c.x+c.width/2,y:c.y+c.height/2},u=iB(r,f,l)?.id;u!==c.parentId&&(n[l]={parentId:u},c.parentId&&i.add(c.parentId),u&&i.add(u))}if(Object.keys(n).length===0)return;e.updateShapes(n);const s={};let a=e.activePage();for(const l of i)Object.assign(s,aB(a,l));Object.keys(s).length>0&&(e.updateEdges(s),a=e.activePage());const o=Xh(a,[...i]);Object.keys(o).length>0&&e.updateShapes(o)}function X6(t,e){const r=Qe.getState();r.updateShape(t,{parentId:e});let A=r.activePage();r.updateEdges(aB(A,e)),A=r.activePage();const n=wm(A,e);n&&r.updateShape(e,{x:n.x,y:n.y,width:n.width,height:n.height})}function _l(t){return t.kind==="group"&&t.metadata.showBorder===!0}const sB="#6366f1";function Jd(t,e){return Object.values(t.edges).filter(r=>{const A=r.source.shapeId,n=r.target.shapeId;return!!(A&&n&&e.has(A)&&e.has(n))})}function Zd(t,e){return Object.values(t.edges).filter(r=>r.groupId===e)}function ep(t,e){return co(t,e)}function oB(t,e){const r=new Map,A=new Map;for(const n of e){const i=t.shapes[n];if(i)if(ca(i)){r.set(i.id,i);for(const a of ep(t,i.id)){const o=t.shapes[a];o&&r.set(o.id,o)}for(const a of Zd(t,i.id))A.set(a.id,a)}else r.set(i.id,i);const s=t.edges[n];s&&A.set(s.id,s)}if(r.size>=2)for(const n of Jd(t,new Set(r.keys())))A.set(n.id,n);return{shapes:[...r.values()],edges:[...A.values()]}}function lB(t,e,r){return{...t,shapeId:t.shapeId?e.get(t.shapeId):void 0,point:t.point?{x:t.point.x+r.x,y:t.point.y+r.y}:void 0}}function cB(t,e={x:0,y:0}){const r=new Map;for(const a of t.shapes)r.set(a.id,la("shape"));for(const a of t.edges)r.set(a.id,la("edge"));const A=new Set(t.shapes.map(a=>a.id)),n=t.shapes.map(a=>({...structuredClone(a),id:r.get(a.id),x:a.x+e.x,y:a.y+e.y,parentId:a.parentId&&A.has(a.parentId)?r.get(a.parentId):void 0})),i=t.edges.map(a=>({...structuredClone(a),id:r.get(a.id),groupId:a.groupId&&A.has(a.groupId)?r.get(a.groupId):void 0,source:lB(a.source,r,e),target:lB(a.target,r,e),waypoints:a.waypoints.map(o=>({x:o.x+e.x,y:o.y+e.y}))})),s=[];for(const a of n){const o=t.shapes.find(l=>r.get(l.id)===a.id);o&&(!o.parentId||!A.has(o.parentId))&&s.push(a.id)}return{shapes:n,edges:i,selectIds:s}}function tp(t,e){const r=new Set,A=new Set;for(const n of e){const i=t.shapes[n];if(i&&(r.add(n),ca(i))){for(const s of ep(t,n))r.add(s);for(const s of Zd(t,n))A.add(s.id)}t.edges[n]&&A.add(n)}return{shapeIds:[...r],edgeIds:[...A]}}function J6(t,e,r){const A=e.width>0?r.width/e.width:1,n=e.height>0?r.height/e.height:1,i={};for(const[s,a]of Object.entries(t))i[s]={x:r.x+(a.x-e.x)*A,y:r.y+(a.y-e.y)*n,width:Math.max(a.width*A,8),height:Math.max(a.height*n,8)};return i}function Z6(t,e,r){const A=r*Math.PI/180,n=Math.cos(A),i=Math.sin(A),s={};for(const[a,o]of Object.entries(t)){const l=o.x+o.width/2,c=o.y+o.height/2,f=l-e.x,h=c-e.y,u=e.x+f*n-h*i,g=e.y+f*i+h*n;s[a]={x:u-o.width/2,y:g-o.height/2,rotation:Math.round(o.rotation+r)}}return s}function uB(t,e){const r={};for(const A of ep(t,e)){const n=t.shapes[A];n&&(r[A]={x:n.x,y:n.y,width:n.width,height:n.height,rotation:n.rotation})}return r}function ek(t,e,r){const A=t.filter(l=>e.has(l));if(A.length===0)return t;const n=t.filter(l=>!e.has(l)),i=t.findIndex(l=>e.has(l));if(r==="front")return[...n,...A];if(r==="back")return[...A,...n];if(r==="forward"){const c=t.slice(i+A.length).find(h=>!e.has(h));if(!c)return[...n,...A];const f=n.indexOf(c);return[...n.slice(0,f+1),...A,...n.slice(f+1)]}const a=t.slice(0,i).reverse().find(l=>!e.has(l));if(!a)return[...A,...n];const o=n.indexOf(a);return[...n.slice(0,o),...A,...n.slice(o)]}function tk(t,e){const r=Jc(t.map(n=>({x:n.x,y:n.y,width:n.width,height:n.height})));if(!r||t.length<2)return{};const A={};for(const n of t)switch(e){case"left":A[n.id]={x:r.x};break;case"right":A[n.id]={x:r.x+r.width-n.width};break;case"hcenter":A[n.id]={x:r.x+r.width/2-n.width/2};break;case"top":A[n.id]={y:r.y};break;case"bottom":A[n.id]={y:r.y+r.height-n.height};break;case"vcenter":A[n.id]={y:r.y+r.height/2-n.height/2};break}return A}function rk(t,e){if(t.length<3)return{};const r=e==="horizontal",A=[...t].sort((h,u)=>r?h.x-u.x:h.y-u.y),n=A[0],i=A[A.length-1],s=r?n.x:n.y,a=r?i.x+i.width:i.y+i.height,o=A.reduce((h,u)=>h+(r?u.width:u.height),0),l=(a-s-o)/(A.length-1),c={};let f=s;for(const h of A)c[h.id]=r?{x:f}:{y:f},f+=(r?h.width:h.height)+l;return c}function rp(){const t=Qe.getState().activePage();return _e.getState().selectedIds.map(e=>t.shapes[e]).filter(e=>!!e)}function fB(){const t=_e.getState().selectedIds;t.length!==0&&Et.getState().run("Delete",()=>{Qe.getState().removeElements(t),_e.getState().clearSelection()})}function hB(t=16){const e=Qe.getState().activePage(),r=_e.getState().selectedIds,A=oB(e,r);if(A.shapes.length===0)return;const n=cB(A,{x:t,y:t});Et.getState().run("Duplicate",()=>{const i=Qe.getState();i.addShapes(n.shapes),i.addEdges(n.edges),_e.getState().select(n.selectIds)})}function Fu(t,e){const r=_e.getState().selectedIds;r.length!==0&&Et.getState().run("Nudge",()=>{Qe.getState().moveElementsBy(r,t,e)})}function Iu(t){const e=rp(),r=tk(e,t);Object.keys(r).length!==0&&Et.getState().run("Align",()=>Qe.getState().updateShapes(r))}function Uu(t){const e=rp(),r=rk(e,t);Object.keys(r).length!==0&&Et.getState().run("Distribute",()=>Qe.getState().updateShapes(r))}function _u(t){const e=_e.getState().selectedIds;e.length!==0&&Et.getState().run("Reorder",()=>{const r=Qe.getState(),A=r.activePage(),{shapeIds:n,edgeIds:i}=tp(A,e),s=new Set([...n,...i]),a=ek(A.order,s,t);r.setPageOrder(a)})}function dB(t){const e=_e.getState().selectedIds;if(e.length===0)return;const r=Qe.getState().activePage(),{shapeIds:A,edgeIds:n}=tp(r,e),i=Object.fromEntries(A.map(a=>[a,{locked:t}])),s=Object.fromEntries(n.map(a=>[a,{locked:t}]));Et.getState().run(t?"Lock":"Unlock",()=>{const a=Qe.getState();a.updateShapes(i),a.updateEdges(s)})}function Ak(t){const e=_e.getState().selectedIds;if(e.length===0)return;const r=Qe.getState().activePage(),{shapeIds:A,edgeIds:n}=tp(r,e),i=Object.fromEntries(A.map(a=>[a,{hidden:t}])),s=Object.fromEntries(n.map(a=>[a,{hidden:t}]));Et.getState().run("Hide",()=>{const a=Qe.getState();a.updateShapes(i),a.updateEdges(s)})}function pB(t,e,r){const A=Qe.getState(),n=A.activePage(),i=n.layers[0].id,s=Object.keys(n.shapes).length,a=t.defaultSize??{width:96,height:72},o=e.x-a.width/2,l=e.y-a.height/2,c={x:o,y:l,width:a.width,height:a.height},f=t.shapeKind?vr({...c,kind:t.shapeKind,text:t.defaultText??"",fill:t.defaultFill?{type:"solid",color:t.defaultFill}:{type:"none",color:"none"},stroke:t.defaultStroke??"#475569",strokeWidth:t.defaultStroke?2:1.5},i,s):vr({...c,kind:"icon",libraryId:t.id,fill:{type:"none",color:"none"},stroke:"none",strokeWidth:0},i,s);Et.getState().run("Add shape",()=>{A.addShape(f),r?.parentGroupId&&X6(f.id,r.parentGroupId),_e.getState().select([f.id])})}function gB(){const t=Qe.getState().activePage();_e.getState().select(t.order.filter(e=>!t.shapes[e]?.hidden))}function Ap(t){const e=rp().filter(o=>o.kind!=="group");if(e.length<2){Xe.emit("toast",{message:"Select at least 2 shapes to group (Ctrl+G).",kind:"info"});return}const r=Jc(e.map(o=>({x:o.x,y:o.y,width:o.width,height:o.height})));if(!r)return;let A=t?.name??"Group",n=t?.showBorder??!1;if(t?.prompt!==!1){const o=window.prompt("Group name (optional)","Group");if(o===null)return;A=o.trim(),n=window.confirm("Show a dashed border around this group?")}const i=Qe.getState().activePage(),s=vr({kind:"group",x:r.x,y:r.y,width:r.width,height:r.height,text:A.trim(),fill:{type:"none",color:"none"},stroke:n?sB:"none",strokeWidth:n?1.5:0,dash:n?"dashed":"solid",metadata:{showBorder:n}},i.layers[0].id);Et.getState().run("Group",()=>{const o=Qe.getState();o.addShape(s);const l=Object.fromEntries(e.map(f=>[f.id,{parentId:s.id}]));o.updateShapes(l);const c=new Set(e.map(f=>f.id));for(const f of Jd(o.activePage(),c))o.updateEdge(f.id,{groupId:s.id});_e.getState().select([s.id])});const a=Jd(i,new Set(e.map(o=>o.id))).length;Xe.emit("toast",{message:a>0?`Grouped ${e.length} shapes and ${a} connectors.`:`Grouped ${e.length} shapes.`,kind:"success"})}function vB(){const t=Qe.getState().activePage();return _e.getState().selectedIds.some(e=>t.shapes[e]?.kind==="group")}function np(){const t=Qe.getState().activePage(),e=_e.getState().selectedIds.map(r=>t.shapes[r]).filter(r=>r?.kind==="group");if(e.length===0){Xe.emit("toast",{message:"Select a group to ungroup (Ctrl+Shift+G).",kind:"info"});return}Et.getState().run("Ungroup",()=>{const r=Qe.getState(),A=[];for(const n of e){const i=co(r.activePage(),n.id),s=Object.fromEntries(i.filter(a=>r.activePage().shapes[a]?.parentId===n.id).map(a=>[a,{parentId:void 0}]));r.updateShapes(s);for(const a of Zd(r.activePage(),n.id))r.updateEdge(a.id,{groupId:void 0});A.push(...Object.keys(s)),r.removeElements([n.id])}_e.getState().select(A)}),Xe.emit("toast",{message:"Group dissolved.",kind:"success"})}function nk(t,e,r=200){const A=r/t.zoom;return{x:-t.x/t.zoom-A,y:-t.y/t.zoom-A,width:e.width/t.zoom+A*2,height:e.height/t.zoom+A*2}}function ik(t){if(!t.rotation)return{x:t.x,y:t.y,width:t.width,height:t.height};const e=t.x+t.width/2,r=t.y+t.height/2,A=t.rotation*Math.PI/180,n=Math.abs(Math.cos(A)),i=Math.abs(Math.sin(A)),s=t.width*n+t.height*i,a=t.width*i+t.height*n;return{x:e-s/2,y:r-a/2,width:s,height:a}}function ak(t,e){const r=[t.source,t.target].map(a=>a.shapeId&&e.shapes[a.shapeId]?Li(e.shapes[a.shapeId],a.anchor):a.point??{x:0,y:0});for(const a of t.waypoints)r.push(a);const A=r.map(a=>a.x),n=r.map(a=>a.y),i=Math.min(...A),s=Math.min(...n);return{x:i,y:s,width:Math.max(...A)-i,height:Math.max(...n)-s}}const mB=8,sk=8;class gs{constructor(e,r=mB,A=sk,n=0){this.boundary=e,this.capacity=r,this.maxDepth=A,this.depth=n}boundary;capacity;maxDepth;depth;items=[];children=null;insert(e){if(this.children){const r=this.childFor(e.bounds);if(r){r.insert(e);return}}this.items.push(e),!this.children&&this.items.length>this.capacity&&this.depth<this.maxDepth&&this.subdivide()}query(e,r=new Set){if(!qh(e,this.boundary))return r;for(const A of this.items)qh(e,A.bounds)&&r.add(A.id);if(this.children)for(const A of this.children)A.query(e,r);return r}queryPoint(e,r=new Set){if(!Xc(e,this.boundary))return r;for(const A of this.items)Xc(e,A.bounds)&&r.add(A.id);if(this.children)for(const A of this.children)A.queryPoint(e,r);return r}subdivide(){const{x:e,y:r,width:A,height:n}=this.boundary,i=A/2,s=n/2,a=this.depth+1;this.children=[new gs({x:e,y:r,width:i,height:s},this.capacity,this.maxDepth,a),new gs({x:e+i,y:r,width:i,height:s},this.capacity,this.maxDepth,a),new gs({x:e,y:r+s,width:i,height:s},this.capacity,this.maxDepth,a),new gs({x:e+i,y:r+s,width:i,height:s},this.capacity,this.maxDepth,a)];const o=[];for(const l of this.items){const c=this.childFor(l.bounds);c?c.insert(l):o.push(l)}this.items=o}childFor(e){if(!this.children)return null;for(const r of this.children)if(e.x>=r.boundary.x&&e.y>=r.boundary.y&&e.x+e.width<=r.boundary.x+r.boundary.width&&e.y+e.height<=r.boundary.y+r.boundary.height)return r;return null}}function ok(t,e=mB){if(t.length===0)return new gs({x:0,y:0,width:1,height:1},e);let r=1/0,A=1/0,n=-1/0,i=-1/0;for(const{bounds:o}of t)r=Math.min(r,o.x),A=Math.min(A,o.y),n=Math.max(n,o.x+o.width),i=Math.max(i,o.y+o.height);const s=10,a=new gs({x:r-s,y:A-s,width:n-r+s*2,height:i-A+s*2},e);for(const o of t)a.insert(o);return a}const lk=["nw","n","ne","e","se","s","sw","w"],ck={nw:"nwse-resize",n:"ns-resize",ne:"nesw-resize",e:"ew-resize",se:"nwse-resize",s:"ns-resize",sw:"nesw-resize",w:"ew-resize"};function uk(t){return{nw:{x:0,y:0},n:{x:.5,y:0},ne:{x:1,y:0},e:{x:1,y:.5},se:{x:1,y:1},s:{x:.5,y:1},sw:{x:0,y:1},w:{x:0,y:.5}}[t]}const Qu=8;function wB(t,e,r,A){let{x:n,y:i,width:s,height:a}=t;const o=n+s,l=i+a,c=A(r.x),f=A(r.y);return e.includes("w")&&(n=Math.min(c,o-Qu),s=o-n),e.includes("e")&&(s=Math.max(c-n,Qu)),e.includes("n")&&(i=Math.min(f,l-Qu),a=l-i),e.includes("s")&&(a=Math.max(f-i,Qu)),{x:n,y:i,width:s,height:a}}function Ql(t,e,r){for(let A=t.order.length-1;A>=0;A--){const n=t.order[A];if(r?.has(n))continue;const i=t.shapes[n];if(!(!i||i.hidden)&&Xc(e,{x:i.x,y:i.y,width:i.width,height:i.height}))return i}}const fk=6;function ku(t,e){return e==="x"?[t.x,t.x+t.width/2,t.x+t.width]:[t.y,t.y+t.height/2,t.y+t.height]}function yB(t,e,r=fk){let A=null,n=null;const i=ku(t,"x"),s=ku(t,"y");for(const o of e){for(const l of ku(o,"x"))for(const c of i){const f=l-c;Math.abs(f)<=r&&(!A||Math.abs(f)<Math.abs(A.delta))&&(A={delta:f,guide:{orientation:"v",position:l,from:Math.min(o.y,t.y),to:Math.max(o.y+o.height,t.y+t.height)}})}for(const l of ku(o,"y"))for(const c of s){const f=l-c;Math.abs(f)<=r&&(!n||Math.abs(f)<Math.abs(n.delta))&&(n={delta:f,guide:{orientation:"h",position:l,from:Math.min(o.x,t.x),to:Math.max(o.x+o.width,t.x+t.width)}})}}const a=[];return A&&a.push(A.guide),n&&a.push(n.guide),{dx:A?.delta??0,dy:n?.delta??0,guides:a}}function hk(t,e,r){let A={...t};const n=[];if(r.snapToGrid&&r.gridSize>0&&(A={x:Gh(A.x,r.gridSize),y:Gh(A.y,r.gridSize)}),r.snapToObjects){const i=8/r.zoom;for(const l of Object.values(e.shapes))if(!(l.hidden||r.excludeShapeIds?.has(l.id)))for(const c of Rd){const f=Li(l,c);if(Math.hypot(A.x-f.x,A.y-f.y)<=i)return{point:f,guides:n}}const s={x:A.x-1,y:A.y-1,width:2,height:2},a=Object.values(e.shapes).filter(l=>!l.hidden&&!r.excludeShapeIds?.has(l.id)).map(l=>({x:l.x,y:l.y,width:l.width,height:l.height})),o=yB(s,a,i);(o.dx||o.dy)&&(A={x:A.x+o.dx,y:A.y+o.dy},n.push(...o.guides))}return{point:A,guides:n}}function dk(t){const e=t.trim().split(/\s+/),r=[];for(let A=0;A<e.length;A++)if(e[A]==="M"||e[A]==="L"){const n=Number(e[A+1]),i=Number(e[A+2]);Number.isFinite(n)&&Number.isFinite(i)&&r.push({x:n,y:i}),A+=2}return r}function BB(t,e,r){const A=r.x-e.x,n=r.y-e.y,i=A*A+n*n;if(i===0)return{dist:Math.hypot(t.x-e.x,t.y-e.y),t:0,point:{...e}};let s=((t.x-e.x)*A+(t.y-e.y)*n)/i;s=Math.max(0,Math.min(1,s));const a={x:e.x+s*A,y:e.y+s*n};return{dist:Math.hypot(t.x-a.x,t.y-a.y),t:s,point:a}}function pk(t,e,r){const A=Il(t,e),n=dk(A.path);if(n.length<2)return[...t.waypoints,r];let i=0,s=BB(r,n[0],n[1]);for(let c=1;c<n.length-1;c++){const f=BB(r,n[c],n[c+1]);f.dist<s.dist&&(s=f,i=c)}const a=s.point,o=[...t.waypoints];if(o.length===0)return[a];const l=Math.min(o.length,Math.max(0,Math.round(i/(n.length-1)*o.length)));return o.splice(l,0,a),o}function vs(){return ke.useMemo(()=>({begin:()=>Et.getState().capture(),commit:t=>Et.getState().commit(t),cancel:()=>Et.getState().cancel(),run:(t,e)=>Et.getState().run(t,e),undo:()=>Et.getState().undo(),redo:()=>Et.getState().redo()}),[])}function gk(t){const e=t.trim();if(!e)return;let r=e;!/^https?:\/\//i.test(r)&&!/^mailto:/i.test(r)&&(r=`https://${r}`),!(!/^https?:\/\//i.test(r)&&!/^mailto:/i.test(r))&&window.open(r,"_blank","noopener,noreferrer")}const vk={rectangle:"rectangle","rounded-rectangle":"rounded-rectangle",ellipse:"ellipse",diamond:"diamond",triangle:"triangle",hexagon:"hexagon",text:"text","sticky-note":"sticky-note",comment:"comment"};function bB(t){return{x:t.x,y:t.y,width:t.width,height:t.height}}function mk(t,e){const{setMarquee:r,setConnectPreview:A,setGuides:n,setPenPreview:i,setConnectTargetId:s,readOnly:a=!1}=e,o=ke.useRef({mode:"idle"}),l=ke.useRef(!1),c=vs(),f=ke.useCallback((te,T)=>{const S=t.current?.getBoundingClientRect(),O=_e.getState().camera;return as({x:te-(S?.left??0),y:T-(S?.top??0)},O)},[t]),h=ke.useCallback(te=>{const{settings:T}=Qe.getState().project;return T.snapToGrid?Gh(te,T.gridSize):te},[]),u=ke.useCallback((te,T)=>{const S=Qe.getState(),O=S.activePage(),{settings:P}=S.project,z=_e.getState().camera.zoom;return hk(te,O,{gridSize:P.gridSize,snapToGrid:P.snapToGrid,snapToObjects:P.snapToObjects,zoom:z,excludeShapeIds:T})},[]),g=ke.useCallback(te=>{if(te.length<2)return;const T=te.map(be=>be.x),S=te.map(be=>be.y),O=Math.min(...T),P=Math.min(...S),z=Math.max(Math.max(...T)-O,1),ie=Math.max(Math.max(...S)-P,1),fe=te.map(be=>({x:(be.x-O)/z,y:(be.y-P)/ie})),Z=Qe.getState(),pe=Z.activePage(),we=vr({kind:"freehand",x:O,y:P,width:z,height:ie,points:fe,fill:{type:"none",color:"none"},stroke:"#1f2430",strokeWidth:2},pe.layers[0].id);c.run("Draw",()=>{Z.addShape(we),_e.getState().select([we.id])})},[c]),p=ke.useRef(()=>{}),w=ke.useRef(()=>{}),m=ke.useRef(te=>p.current(te)),B=ke.useRef(()=>w.current()),x=ke.useCallback(()=>{l.current||(window.addEventListener("pointermove",m.current),window.addEventListener("pointerup",B.current),l.current=!0)},[]),E=ke.useCallback(()=>{l.current&&(window.removeEventListener("pointermove",m.current),window.removeEventListener("pointerup",B.current),l.current=!1)},[]);p.current=te=>{const T=o.current,S=_e.getState(),O=Qe.getState();if(T.mode==="pan"){S.setCamera({...S.camera,x:T.startCamera.x+(te.clientX-T.startClient.x),y:T.startCamera.y+(te.clientY-T.startClient.y)});return}const P=f(te.clientX,te.clientY);switch(T.mode){case"marquee":{T.current=hm(T.startWorld,P),r(T.current);break}case"move":{const z=P.x-T.startWorld.x,ie=P.y-T.startWorld.y,fe=O.activePage(),Z={};for(const[je,Te]of Object.entries(T.origins))Z[je]={x:h(Te.x+z),y:h(Te.y+ie)};if(O.project.settings.snapToObjects){const je=[],Te=new Set(Object.keys(T.origins));for(const[ue,J]of Object.entries(Z)){const q=fe.shapes[ue];q&&je.push({x:J.x,y:J.y,width:q.width,height:q.height})}const Q=Jc(je),N=Object.values(fe.shapes).filter(ue=>!ue.hidden&&!Te.has(ue.id)).map(ue=>({x:ue.x,y:ue.y,width:ue.width,height:ue.height}));if(Q){const ue=_e.getState().camera.zoom,J=yB(Q,N,6/ue);if(J.dx||J.dy)for(const q of Object.values(Z))q.x=(q.x??0)+J.dx,q.y=(q.y??0)+J.dy;n(J.guides)}}O.updateShapes(Z);const we=Object.keys(Z),be=Xh(Qe.getState().activePage(),ym(fe,we));Object.keys(be).length>0&&O.updateShapes(be),T.moved=!0;break}case"resize":O.updateShape(T.id,wB(T.original,T.handle,P,h));break;case"resize-group":{const z=wB(T.original,T.handle,P,h),ie=J6(T.childSnapshots,T.original,z);O.updateShapes({[T.id]:z,...ie});break}case"rotate":{const z=Math.atan2(P.y-T.center.y,P.x-T.center.x),ie=T.original+(z-T.startAngle)*(180/Math.PI);O.updateShape(T.id,{rotation:Math.round(ie)});break}case"rotate-group":{const ie=(Math.atan2(P.y-T.center.y,P.x-T.center.x)-T.startAngle)*(180/Math.PI);O.updateShapes(Z6(T.childSnapshots,T.center,ie));break}case"create":{const z=hm(T.startWorld,P);O.updateShape(T.id,{x:z.x,y:z.y,width:Math.max(z.width,1),height:Math.max(z.height,1)}),T.moved=!0;break}case"connect":{const z=T.source.shapeId?new Set([T.source.shapeId]):void 0,ie=u(P,z);A({from:T.from,to:ie.point}),n(ie.guides);const fe=Ql(O.activePage(),ie.point,z);s(fe?.id??null);break}case"reconnect":{const z=O.activePage().edges[T.edgeId],ie=T.which==="source"?z?.target.shapeId:z?.source.shapeId,fe=ie?new Set([ie]):void 0,Z=u(P,fe);A({from:T.anchor,to:Z.point}),n(Z.guides);const pe=Ql(O.activePage(),Z.point,fe);s(pe?.id??null);break}case"waypoint":{const z=u(P),ie=[...O.activePage().edges[T.edgeId].waypoints];ie[T.index]=z.point,O.updateEdge(T.edgeId,{waypoints:ie}),n(z.guides);break}case"label":{const z=P.x-T.startWorld.x,ie=P.y-T.startWorld.y;O.updateEdge(T.edgeId,{labelOffset:{x:T.originalOffset.x+z,y:T.originalOffset.y+ie}});break}case"pen":{T.points.push(P),i([...T.points]);break}case"erase":{const z=Ql(O.activePage(),P,T.erased);z&&(T.erased.add(z.id),O.removeElements([z.id]));break}}},w.current=()=>{const te=o.current,T=_e.getState(),S=Qe.getState(),O=S.activePage();switch(te.mode){case"marquee":{const P=Object.values(O.shapes).filter(z=>!z.hidden&&qh(te.current,bB(z))).map(z=>z.id);T.select(P);break}case"move":te.moved?(Y6(Object.keys(te.origins)),c.commit("Move")):c.cancel();break;case"resize":c.commit("Resize");break;case"resize-group":c.commit("Resize group");break;case"rotate":c.commit("Rotate");break;case"rotate-group":c.commit("Rotate group");break;case"create":{const P=O.shapes[te.id];P&&!te.moved&&S.updateShape(te.id,{width:120,height:P.kind==="text"?40:80}),T.select([te.id]),T.setTool("select"),c.commit("Create");break}case"connect":{const P=k.current,z=te.source.shapeId?new Set([te.source.shapeId]):void 0,ie=P?u(P,z):null,fe=R(ie?.point??P,te.source.shapeId);if(P&&wk(te.source,fe)){const Z=Xr({source:te.source,target:fe},O.layers[0].id);c.run("Create connector",()=>S.addEdge(Z)),T.setTool("select"),T.select([Z.id])}A(null),s(null);break}case"reconnect":{const P=k.current,z=O.edges[te.edgeId];if(z&&P){const ie=te.which==="source"?z.target.shapeId:z.source.shapeId,Z=u(P,ie?new Set([ie]):void 0),pe=R(Z.point,ie);c.run("Reconnect",()=>S.updateEdge(te.edgeId,{[te.which]:pe}))}A(null),s(null);break}case"waypoint":c.commit("Move waypoint");break;case"label":c.commit("Move label");break;case"pen":{g(te.points),i(null);break}case"erase":{te.erased.size>0?c.commit("Erase"):c.cancel();break}}o.current={mode:"idle"},r(null),n([]),E()};const k=ke.useRef(null),H=ke.useRef(te=>{k.current=K.current(te.clientX,te.clientY),p.current(te)}),K=ke.useRef(f);K.current=f,m.current=H.current;const R=ke.useCallback((te,T)=>{if(!te)return{point:{x:0,y:0}};const S=Qe.getState().activePage(),P=Ql(S,te,T?new Set([T]):void 0);return P?{shapeId:P.id,anchor:jd(P,te).name}:{point:te}},[]),I=ke.useCallback(te=>{const T=_e.getState(),S=Qe.getState(),O=f(te.clientX,te.clientY);if(k.current=O,a){o.current={mode:"pan",startClient:{x:te.clientX,y:te.clientY},startCamera:{x:T.camera.x,y:T.camera.y}},x();return}if(T.tool==="pan"||te.button===1){o.current={mode:"pan",startClient:{x:te.clientX,y:te.clientY},startCamera:{x:T.camera.x,y:T.camera.y}},x();return}const P=vk[T.tool];if(P){const ie=S.activePage(),fe=ie.layers[0].id,Z=Object.keys(ie.shapes).length,pe=vr({kind:P,x:O.x,y:O.y,width:1,height:1,text:P==="sticky-note"?"Note":P==="comment"?"Comment":"",...P==="comment"?{fill:{type:"solid",color:"#fef9c3"},stroke:"#ca8a04"}:{}},fe,Z);c.begin(),S.addShape(pe),o.current={mode:"create",startWorld:O,kind:P,id:pe.id,moved:!1},x();return}if(T.tool==="connector"){o.current={mode:"connect",source:{point:O},from:O},A({from:O,to:O}),x();return}if(T.tool==="pen"){o.current={mode:"pen",points:[O]},i([O]),x();return}if(T.tool==="eraser"){const ie=new Set,fe=Ql(S.activePage(),O);c.begin(),fe&&(ie.add(fe.id),S.removeElements([fe.id])),o.current={mode:"erase",erased:ie},x();return}T.clearSelection();const z={x:O.x,y:O.y,width:0,height:0};o.current={mode:"marquee",startWorld:O,current:z},r(z),x()},[f,c,a,A,r,i,x]),W=ke.useCallback((te,T)=>{te.stopPropagation();const S=_e.getState(),O=Qe.getState(),P=O.activePage(),z=P.shapes[T];if(!z)return;if(k.current=f(te.clientX,te.clientY),(te.metaKey||te.ctrlKey)&&z.hyperlink?.trim()){gk(z.hyperlink);return}if(a)return;if(S.formatPainterActive&&S.formatPainterStyle){const we=vm(P,T);V6([we]);return}if(S.tool==="eraser"){const we=new Set([vm(P,T)]);c.begin(),O.removeElements([...we]),o.current={mode:"erase",erased:we},x();return}if(S.tool==="pen"){const we=k.current;o.current={mode:"pen",points:[we]},i([we]),x();return}if(S.tool==="connector"){const we=k.current,be=jd(z,we);o.current={mode:"connect",source:{shapeId:T,anchor:be.name},from:be.point},A({from:be.point,to:we}),x();return}if(S.tool!=="select"||S6(Ul(P),z))return;const ie=$6(P,T,S.activeGroupId);let fe=S.selectedIds;te.shiftKey?(S.toggleSelection(ie),fe=_e.getState().selectedIds):fe.includes(ie)||(S.select([ie]),fe=[ie]);const Z=k.current,pe=yU(P,fe);o.current={mode:"move",startWorld:Z,origins:pe,moved:!1},c.begin(),x()},[f,c,a,A,i,x]),L=ke.useCallback((te,T)=>{te.stopPropagation();const S=_e.getState();S.tool==="select"&&(te.shiftKey?S.toggleSelection(T):S.select([T]))},[]),F=ke.useCallback((te,T,S)=>{te.stopPropagation();const O=Qe.getState().activePage(),P=O.shapes[S];if(!P)return;const z=bB(P);P.kind==="group"?o.current={mode:"resize-group",handle:T,original:z,id:S,childSnapshots:uB(O,S)}:o.current={mode:"resize",handle:T,original:z,id:S},c.begin(),x()},[c,x]),M=ke.useCallback((te,T)=>{te.stopPropagation();const S=Qe.getState().activePage(),O=S.shapes[T];if(!O)return;const P={x:O.x+O.width/2,y:O.y+O.height/2},z=f(te.clientX,te.clientY),ie=Math.atan2(z.y-P.y,z.x-P.x);O.kind==="group"?o.current={mode:"rotate-group",center:P,id:T,startAngle:ie,childSnapshots:uB(S,T)}:o.current={mode:"rotate",center:P,id:T,startAngle:ie,original:O.rotation},c.begin(),x()},[f,c,x]),b=ke.useCallback((te,T,S)=>{te.stopPropagation();const O=Qe.getState().activePage().shapes[T];if(!O)return;const P=Li(O,S);k.current=f(te.clientX,te.clientY),o.current={mode:"connect",source:{shapeId:T,anchor:S},from:P},A({from:P,to:k.current}),x()},[f,A,x]),Y=ke.useCallback((te,T,S)=>{te.stopPropagation();const O=Qe.getState().activePage(),P=O.edges[T];if(!P)return;const z=S==="source"?P.target:P.source,ie=z.shapeId&&O.shapes[z.shapeId]?Li(O.shapes[z.shapeId],z.anchor):z.point??{x:0,y:0};o.current={mode:"reconnect",edgeId:T,which:S,anchor:ie},k.current=f(te.clientX,te.clientY),A({from:ie,to:k.current}),c.begin(),x()},[f,c,A,x]),ce=ke.useCallback((te,T,S)=>{te.stopPropagation();const P=Qe.getState().activePage().edges[T];if(!P)return;if(te.altKey){c.run("Remove waypoint",()=>{const ie=[...P.waypoints];ie.splice(S,1),Qe.getState().updateEdge(T,{waypoints:ie})});return}const z=f(te.clientX,te.clientY);k.current=z,o.current={mode:"waypoint",edgeId:T,index:S,startWorld:z,original:P.waypoints[S]??z},c.begin(),x()},[f,c,x]),ee=ke.useCallback((te,T)=>{te.stopPropagation();const S=Qe.getState().activePage().edges[T];if(!S)return;const O=f(te.clientX,te.clientY);k.current=O,o.current={mode:"label",edgeId:T,startWorld:O,originalOffset:S.labelOffset??{x:0,y:0}},c.begin(),x()},[f,c,x]),le=ke.useCallback((te,T)=>{if(te.stopPropagation(),a)return;const S=_e.getState();if(S.tool!=="select")return;const O=Qe.getState().activePage(),P=O.shapes[T];if(P){if(P.kind==="group"&&S.activeGroupId!==T){S.setActiveGroupId(T),S.select([T]),Xe.emit("toast",{message:"Inside group — Esc to exit.",kind:"info"});return}if(S.activeGroupId&&So(O,T,S.activeGroupId)){S.setEditingText(T);return}P.kind!=="group"&&S.setEditingText(T)}},[a]),Ae=ke.useCallback((te,T)=>{if(a)return;const S=_e.getState();if(S.tool!=="select")return;const O=Qe.getState().activePage(),P=O.edges[T];if(!P)return;const z=t.current?.getBoundingClientRect(),ie=S.camera,fe=as({x:te.clientX-(z?.left??0),y:te.clientY-(z?.top??0)},ie),Z=pk(P,O,fe);c.run("Add waypoint",()=>{Qe.getState().updateEdge(T,{waypoints:Z})})},[c,a,t]);return{onSvgPointerDown:I,onShapePointerDown:W,onEdgePointerDown:L,onResizeHandleDown:F,onRotateHandleDown:M,onAnchorDown:b,onEndpointDown:Y,onWaypointDown:ce,onLabelDown:ee,onShapeDoubleClick:le,onEdgeDoubleClick:Ae}}function wk(t,e){return t.shapeId&&e.shapeId?t.shapeId!==e.shapeId:!0}function yk(t,e){let r;try{r=t()}catch{return}return{getItem:n=>{var i;const s=o=>o===null?null:JSON.parse(o,void 0),a=(i=r.getItem(n))!=null?i:null;return a instanceof Promise?a.then(s):s(a)},setItem:(n,i)=>r.setItem(n,JSON.stringify(i,void 0)),removeItem:n=>r.removeItem(n)}}const ip=t=>e=>{try{const r=t(e);return r instanceof Promise?r:{then(A){return ip(A)(r)},catch(A){return this}}}catch(r){return{then(A){return this},catch(A){return ip(A)(r)}}}},Bk=(t,e)=>(r,A,n)=>{let i={storage:yk(()=>window.localStorage),partialize:w=>w,version:0,merge:(w,m)=>({...m,...w}),...e},s=!1,a=0;const o=new Set,l=new Set;let c=i.storage;if(!c)return t((...w)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),r(...w)},A,n);const f=()=>{const w=i.partialize({...A()});return c.setItem(i.name,{state:w,version:i.version})},h=n.setState;n.setState=(w,m)=>(h(w,m),f());const u=t((...w)=>(r(...w),f()),A,n);n.getInitialState=()=>u;let g;const p=()=>{var w,m;if(!c)return;const B=++a;s=!1,o.forEach(E=>{var k;return E((k=A())!=null?k:u)});const x=((m=i.onRehydrateStorage)==null?void 0:m.call(i,(w=A())!=null?w:u))||void 0;return ip(c.getItem.bind(c))(i.name).then(E=>{if(E)if(typeof E.version=="number"&&E.version!==i.version){if(i.migrate){const k=i.migrate(E.state,E.version);return k instanceof Promise?k.then(H=>[!0,H]):[!0,k]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,E.state];return[!1,void 0]}).then(E=>{var k;if(B!==a)return;const[H,K]=E;if(g=i.merge(K,(k=A())!=null?k:u),r(g,!0),H)return f()}).then(()=>{B===a&&(x?.(A(),void 0),g=A(),s=!0,l.forEach(E=>E(g)))}).catch(E=>{B===a&&x?.(void 0,E)})};return n.persist={setOptions:w=>{i={...i,...w},w.storage&&(c=w.storage)},clearStorage:()=>{c?.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>p(),hasHydrated:()=>s,onHydrate:w=>(o.add(w),()=>{o.delete(w)}),onFinishHydration:w=>(l.add(w),()=>{l.delete(w)})},i.skipHydration||p(),g||u},kl=Yc()(Bk((t,e)=>({favorites:[],customIcons:[],toggleFavorite:r=>t(A=>({favorites:A.favorites.includes(r)?A.favorites.filter(n=>n!==r):[...A.favorites,r]})),isFavorite:r=>e().favorites.includes(r),addCustomIcon:r=>{Bm(r),t(A=>({customIcons:[...A.customIcons.filter(n=>n.id!==r.id),r]}))},removeCustomIcon:r=>t(A=>({customIcons:A.customIcons.filter(n=>n.id!==r),favorites:A.favorites.filter(n=>n!==r)}))}),{name:"drawio-library",onRehydrateStorage:()=>t=>{t?.customIcons.forEach(e=>Bm(e))}})),ap="application/x-drawio-icon";function bk(t){const e=_e.getState().camera,A=document.querySelector('[aria-label="Diagram canvas"]')?.getBoundingClientRect(),n=as({x:(A?.width??800)/2,y:(A?.height??600)/2},e);pB(t,n)}const Ck=ke.memo(function({icon:e}){const r=kl(n=>n.favorites.includes(e.id)),A=kl(n=>n.toggleFavorite);return _.jsxs("div",{className:"group relative",children:[_.jsx("button",{type:"button",title:e.label,draggable:!0,onDragStart:n=>{n.dataTransfer.setData(ap,e.id),n.dataTransfer.setData("text/plain",e.label),n.dataTransfer.effectAllowed="copy"},onClick:()=>bk(e),className:"df-focus-ring flex aspect-square w-full cursor-grab items-center justify-center rounded-md border bordered p-1 transition-colors hover:bg-[var(--color-surface-alt)] active:cursor-grabbing",children:_.jsx("svg",{viewBox:`0 0 ${e.viewSize} ${e.viewSize}`,className:"h-8 w-8","aria-hidden":!0,children:_.jsx("g",{dangerouslySetInnerHTML:{__html:e.body}})})}),_.jsx("button",{type:"button","aria-label":r?`Unfavorite ${e.label}`:`Favorite ${e.label}`,onClick:n=>{n.stopPropagation(),A(e.id)},className:`absolute right-0.5 top-0.5 rounded p-0.5 transition-opacity ${r?"opacity-100":"opacity-0 group-hover:opacity-100"}`,style:{color:r?"#f59e0b":"var(--color-text-muted)"},children:_.jsx(rU,{size:12,fill:r?"#f59e0b":"none"})})]})}),xk=new Set(["script","foreignobject","iframe","embed","object","audio","video","animate","animatetransform","animatemotion","set","handler","listener"]),Ek=new Set(["href","xlink:href","src","from","to","values","begin"]);function Sk(t){const e=t.trim().toLowerCase();return e.startsWith("#")||e.startsWith("data:image/")?!0:!/^[a-z][a-z0-9+.-]*:/.test(e)}function CB(t){for(const e of Array.from(t.children)){if(xk.has(e.tagName.toLowerCase())){e.remove();continue}CB(e)}for(const e of Array.from(t.attributes)){const r=e.name.toLowerCase();if(r.startsWith("on")){t.removeAttribute(e.name);continue}if(Ek.has(r)&&!Sk(e.value)){t.removeAttribute(e.name);continue}r==="style"&&/url\s*\(|expression\s*\(|javascript:/i.test(e.value)&&t.removeAttribute(e.name)}}function Fk(t){if(/<!DOCTYPE/i.test(t)||/<!ENTITY/i.test(t))throw new Error("SVG contains a DOCTYPE/entity declaration and was rejected.");const r=new DOMParser().parseFromString(t,"image/svg+xml");if(r.querySelector("parsererror"))throw new Error("File is not valid SVG.");const n=r.documentElement;if(!n||n.tagName.toLowerCase()!=="svg")throw new Error("File is not an SVG.");CB(n);let i=parseFloat(n.getAttribute("width")??"")||0,s=parseFloat(n.getAttribute("height")??"")||0;const a=n.getAttribute("viewBox");if((!i||!s)&&a){const f=a.split(/[\s,]+/).map(Number);f.length===4&&(i=i||f[2],s=s||f[3])}i=i||100,s=s||100;const o=Math.max(i,s);return{body:`<svg viewBox="${a??`0 0 ${i} ${s}`}" width="${o}" height="${o}" preserveAspectRatio="xMidYMid meet">${n.innerHTML}</svg>`,viewSize:o,width:i,height:s}}function xB(t){const e={};for(const r of t.split(";")){if(!r)continue;const A=r.indexOf("=");A===-1?e[r.trim()]="true":e[r.slice(0,A).trim()]=r.slice(A+1).trim()}return e}function Ik(t){return"ellipse"in t?"ellipse":"rhombus"in t?"diamond":"triangle"in t?"triangle":"hexagon"in t?"hexagon":"cylinder"in t||"cylinder3"in t?"cylinder":"cloud"in t?"cloud":"parallelogram"in t?"parallelogram":t.shape==="actor"||t.shape==="umlActor"?"actor":t.text==="true"||t.shape==="text"?"text":t.rounded==="1"?"rounded-rectangle":"rectangle"}function EB(t){if(!t)return"";const e=t.replace(/<br\s*\/?>/gi,`
|
|
81
|
+
`);return(new DOMParser().parseFromString(e,"text/html").body.textContent??"").trim()}function Uk(t,e){if(/<!DOCTYPE/i.test(t)||/<!ENTITY/i.test(t))throw new Error("Document contains a DOCTYPE/entity declaration and was rejected.");const r=new DOMParser().parseFromString(t,"application/xml");if(r.querySelector("parsererror"))throw new Error("File is not valid XML.");const A=r.querySelector("mxGraphModel");if(!A)throw r.querySelector("diagram")?new Error('Compressed draw.io files are unsupported — re-export with "Uncompressed".'):new Error("No mxGraphModel found in document.");const n=Array.from(A.querySelectorAll("mxCell")),i=new Map,s=[];let a=0;for(const l of n){if(l.getAttribute("vertex")!=="1")continue;const c=l.querySelector("mxGeometry");if(!c)continue;const f=xB(l.getAttribute("style")??""),h=l.getAttribute("id")??"",u=parseFloat(c.getAttribute("x")??"0")||0,g=parseFloat(c.getAttribute("y")??"0")||0,p=parseFloat(c.getAttribute("width")??"120")||120,w=parseFloat(c.getAttribute("height")??"60")||60,m=vr({kind:Ik(f),x:u,y:g,width:p,height:w,text:EB(l.getAttribute("value")??""),...f.fillColor&&f.fillColor!=="none"?{fill:{type:"solid",color:f.fillColor}}:f.fillColor==="none"?{fill:{type:"none",color:"none"}}:{},...f.strokeColor&&f.strokeColor!=="none"?{stroke:f.strokeColor}:{},...f.dashed==="1"?{dash:"dashed"}:{}},e,a++);f.fontColor&&(m.typography={...m.typography,color:f.fontColor}),i.set(h,m.id),s.push(m)}const o=[];for(const l of n){if(l.getAttribute("edge")!=="1")continue;const c=xB(l.getAttribute("style")??""),f=l.getAttribute("source"),h=l.getAttribute("target"),u=f?i.get(f):void 0,g=h?i.get(h):void 0,p=Xr({source:u?{shapeId:u}:{point:{x:0,y:0}},target:g?{shapeId:g}:{point:{x:120,y:120}},router:c.edgeStyle==="orthogonalEdgeStyle"?"orthogonal":"straight",label:EB(l.getAttribute("value")??""),...c.strokeColor?{stroke:c.strokeColor}:{},...c.dashed==="1"?{dash:"dashed"}:{},...c.startArrow==="none"?{startArrow:"none"}:{},...c.endArrow==="none"?{endArrow:"none"}:{}},e);o.push(p)}if(s.length===0&&o.length===0)throw new Error("No importable cells found in the draw.io document.");return{shapes:s,edges:o}}function Lu(t){return t.text()}function _k(t){return new Promise((e,r)=>{const A=new FileReader;A.onload=()=>e(A.result),A.onerror=()=>r(new Error("Failed to read file.")),A.readAsDataURL(t)})}function Qk(t){return new Promise(e=>{const r=new Image;r.onload=()=>e({width:r.naturalWidth||200,height:r.naturalHeight||200}),r.onerror=()=>e({width:200,height:200}),r.src=t})}function SB(){const t=_e.getState().camera,r=document.querySelector('[aria-label="Diagram canvas"]')?.getBoundingClientRect();return as({x:(r?.width??800)/2,y:(r?.height??600)/2},t)}async function kk(t){const e=Bu(await Lu(t));Qe.getState().replaceProject(e),Et.getState().clear(),Xe.emit("toast",{message:`Opened “${e.name}”.`,kind:"success"})}async function Lk(t){const e=await _k(t),{width:r,height:A}=await Qk(e),n=Qe.getState(),i=n.activePage(),s=SB(),a=vr({kind:"image",x:s.x-r/2,y:s.y-A/2,width:r,height:A,src:e,fill:{type:"none",color:"none"},stroke:"none",strokeWidth:0},i.layers[0].id);Et.getState().run("Import image",()=>{n.addShape(a),_e.getState().select([a.id])}),Xe.emit("toast",{message:"Image imported.",kind:"success"})}async function Tk(t){const e=Fk(await Lu(t)),r={id:la("custom"),label:t.name.replace(/\.svg$/i,"").slice(0,40)||"Custom SVG",category:"Custom SVG",viewSize:e.viewSize,body:e.body,defaultSize:{width:e.width,height:e.height},keywords:["custom","svg"]};kl.getState().addCustomIcon(r);const A=Qe.getState(),n=A.activePage(),i=SB(),s=vr({kind:"icon",libraryId:r.id,x:i.x-r.defaultSize.width/2,y:i.y-r.defaultSize.height/2,width:r.defaultSize.width,height:r.defaultSize.height,fill:{type:"none",color:"none"},stroke:"none",strokeWidth:0},n.layers[0].id);Et.getState().run("Import SVG",()=>{A.addShape(s),_e.getState().select([s.id])}),Xe.emit("toast",{message:"SVG imported to Custom library.",kind:"success"})}async function Nk(t){const e=Qe.getState(),r=e.activePage(),{shapes:A,edges:n}=Uk(await Lu(t),r.layers[0].id);Et.getState().run("Import draw.io",()=>{e.addShapes(A);for(const i of n)e.addEdge(i);_e.getState().select(A.map(i=>i.id))}),Xe.emit("toast",{message:`Imported ${A.length} shapes and ${n.length} connectors.`,kind:"success"})}async function FB(t){const e=t.name.toLowerCase(),r=e.split(".").pop()??"";try{const A=FA.importers().find(n=>n.extensions.includes(r));if(A){await A.handle(await Lu(t),FA.buildContext());return}if(e.endsWith(".drawio")||e.endsWith(".xml"))await Nk(t);else if(e.endsWith(".svg")||t.type==="image/svg+xml")await Tk(t);else if(t.type.startsWith("image/"))await Lk(t);else if(e.endsWith(".json")||t.type==="application/json")await kk(t);else throw new Error(`Unsupported file type: ${t.name}`)}catch(A){const n=A instanceof Error?A.message:"Import failed.";Xe.emit("toast",{message:n,kind:"error"})}}const Ok=ke.memo(function({camera:e,size:r}){const A=r*e.zoom,n=A*5;return _.jsxs(_.Fragment,{children:[_.jsxs("defs",{children:[_.jsx("pattern",{id:"df-grid-minor",width:A,height:A,patternUnits:"userSpaceOnUse",x:e.x,y:e.y,children:_.jsx("path",{d:`M ${A} 0 L 0 0 0 ${A}`,fill:"none",stroke:"var(--color-grid)",strokeWidth:1})}),_.jsxs("pattern",{id:"df-grid-major",width:n,height:n,patternUnits:"userSpaceOnUse",x:e.x,y:e.y,children:[_.jsx("rect",{width:n,height:n,fill:"url(#df-grid-minor)"}),_.jsx("path",{d:`M ${n} 0 L 0 0 0 ${n}`,fill:"none",stroke:"var(--color-grid-strong)",strokeWidth:1})]})]}),_.jsx("rect",{x:0,y:0,width:"100%",height:"100%",fill:"url(#df-grid-major)"})]})}),Pk=ke.memo(function({shape:e}){const r=e.typography,A=r.align==="left"?"flex-start":r.align==="right"?"flex-end":"center",n=r.verticalAlign==="top"?"flex-start":r.verticalAlign==="bottom"?"flex-end":"center";return _.jsx("foreignObject",{x:0,y:0,width:e.width,height:e.height,pointerEvents:"none",children:_.jsx("div",{style:{width:"100%",height:"100%",display:"flex",alignItems:n,justifyContent:A,textAlign:r.align,padding:"4px 6px",boxSizing:"border-box",fontFamily:r.fontFamily,fontSize:r.fontSize,fontWeight:r.fontWeight,fontStyle:r.fontStyle,textDecoration:r.textDecoration,lineHeight:r.lineHeight,color:r.color,overflow:"hidden",wordBreak:"break-word",whiteSpace:"pre-wrap"},children:e.text})})}),Mk=ke.memo(function({shape:e,commonProps:r}){const A=e.libraryId?Jh(e.libraryId):void 0;return A?_.jsx("g",{transform:`scale(${e.width/A.viewSize} ${e.height/A.viewSize})`,dangerouslySetInnerHTML:{__html:A.body}}):_.jsx("rect",{width:e.width,height:e.height,rx:8,...r})}),Dk=ke.memo(function({shape:e,selected:r,flowHighlighted:A=!1,flowDimmed:n=!1,onPointerDown:i,onDoubleClick:s,onPointerEnter:a,onPointerLeave:o}){if(e.hidden)return null;const l=Qy(e),c=`grad_${e.id}`,f=`shadow_${e.id}`,h=p6(e.fill,c),u=Sl(e.dash,e.strokeWidth),g=e.shadow.enabled,p=!!e.hyperlink?.trim(),w=n?e.opacity*.2:e.opacity,m=A?"var(--color-accent, #7c3aed)":e.stroke,B=A?e.strokeWidth+2:e.strokeWidth,x={fill:h,stroke:m,strokeWidth:B,strokeDasharray:u,filter:g?`url(#${f})`:void 0};return _.jsxs("g",{transform:`translate(${e.x} ${e.y}) rotate(${e.rotation} ${e.width/2} ${e.height/2})`,opacity:w,style:{cursor:e.locked?"default":p?"pointer":"move"},onPointerDown:E=>i(E,e.id),onPointerEnter:()=>a?.(e.id),onPointerLeave:()=>o?.(e.id),onDoubleClick:E=>s(E,e.id),"data-shape-id":e.id,role:"img","aria-label":e.text||e.kind,children:[_.jsxs("defs",{children:[e.fill.type==="gradient"&&e.fill.gradientColor&&_.jsxs("linearGradient",{id:c,gradientTransform:`rotate(${e.fill.gradientAngle??0} 0.5 0.5)`,children:[_.jsx("stop",{offset:"0%",stopColor:e.fill.color}),_.jsx("stop",{offset:"100%",stopColor:e.fill.gradientColor})]}),g&&_.jsx("filter",{id:f,x:"-30%",y:"-30%",width:"160%",height:"160%",children:_.jsx("feDropShadow",{dx:e.shadow.offsetX,dy:e.shadow.offsetY,stdDeviation:e.shadow.blur/2,floodColor:e.shadow.color})})]}),e.blur>0&&_.jsx("defs",{children:_.jsx("filter",{id:`blur_${e.id}`,children:_.jsx("feGaussianBlur",{stdDeviation:e.blur})})}),_.jsx("g",{filter:e.blur>0?`url(#blur_${e.id})`:void 0,children:e.kind==="group"?_.jsxs(_.Fragment,{children:[_.jsx("rect",{width:e.width,height:e.height,fill:"transparent",stroke:_l(e)?e.stroke:"none",strokeWidth:_l(e)?e.strokeWidth:0,strokeDasharray:_l(e)?Sl(e.dash,e.strokeWidth):void 0,rx:4}),e.text&&_.jsx("text",{x:8,y:18,fontSize:12,fontWeight:600,fill:"var(--color-text-muted)",pointerEvents:"none",children:e.text})]}):e.kind==="image"&&e.src?_.jsx("image",{href:e.src,width:e.width,height:e.height,preserveAspectRatio:"xMidYMid meet"}):e.kind==="icon"&&e.libraryId?_.jsx(Mk,{shape:e,commonProps:x}):e.kind==="freehand"&&e.points?_.jsx("path",{d:ky(e.points,e.width,e.height),fill:"none",stroke:e.stroke,strokeWidth:e.strokeWidth,strokeLinecap:"round",strokeLinejoin:"round",filter:g?`url(#${f})`:void 0}):e.kind==="swimlane-pool"?_.jsxs(_.Fragment,{children:[_.jsx("rect",{width:e.width,height:e.height,...x}),_.jsx("rect",{width:e.width,height:36,fill:"#e2e8f0",stroke:e.stroke,strokeWidth:e.strokeWidth}),_.jsx("line",{x1:0,y1:36,x2:e.width,y2:36,stroke:e.stroke,strokeWidth:e.strokeWidth})]}):e.kind==="swimlane-lane"?_.jsxs(_.Fragment,{children:[_.jsx("rect",{width:e.width,height:e.height,...x}),_.jsx("rect",{width:Number(e.metadata.laneHeader??120),height:e.height,fill:"#e2e8f0",stroke:e.stroke,strokeWidth:e.strokeWidth}),_.jsx("line",{x1:Number(e.metadata.laneHeader??120),y1:0,x2:Number(e.metadata.laneHeader??120),y2:e.height,stroke:e.stroke,strokeWidth:e.strokeWidth})]}):l.type==="rect"?_.jsx("rect",{width:e.width,height:e.height,rx:l.rx,ry:l.rx,...x}):l.type==="ellipse"?_.jsx("ellipse",{cx:e.width/2,cy:e.height/2,rx:e.width/2,ry:e.height/2,...x}):_.jsx("path",{d:l.d,...x})}),e.text&&_.jsx(Pk,{shape:e}),p&&_.jsxs("g",{transform:`translate(${e.width-14} 8)`,pointerEvents:"none",children:[_.jsx("circle",{r:6,fill:"var(--color-accent)"}),_.jsx("path",{d:"M -2.5 1.5 L 1.5 -2.5 M -0.5 -2.5 h2 v2",stroke:"#fff",strokeWidth:1.2,fill:"none",strokeLinecap:"round"})]}),r&&_.jsx("rect",{width:e.width,height:e.height,fill:"none",stroke:"var(--color-selection)",strokeWidth:1,vectorEffect:"non-scaling-stroke",pointerEvents:"none",opacity:.5})]})});function IB(t,e,r){if(t!=="none")return`url(#arrow_${e}_${r})`}const Hk=ke.memo(function({edge:e,page:r,selected:A,flowHighlighted:n=!1,flowDimmed:i=!1,onPointerDown:s,onDoubleClick:a}){if(e.hidden)return null;const o=Il(e,r),l=Sl(e.dash,e.strokeWidth),c=e.labelOffset??{x:0,y:0},f=i?e.opacity*.2:e.opacity;return _.jsxs("g",{opacity:f,onPointerDown:h=>s(h,e.id),onDoubleClick:h=>a(h,e.id),"data-edge-id":e.id,style:{cursor:"pointer"},children:[_.jsxs("defs",{children:[_.jsx(_B,{id:`arrow_${e.id}_end`,style:e.endArrow,color:e.stroke}),_.jsx(_B,{id:`arrow_${e.id}_start`,style:e.startArrow,color:e.stroke,reverse:!0})]}),_.jsx("path",{d:o.path,fill:"none",stroke:"transparent",strokeWidth:Math.max(e.strokeWidth+12,14)}),_.jsx("path",{d:o.path,fill:"none",stroke:n?"var(--color-accent, #7c3aed)":e.stroke,strokeWidth:n?e.strokeWidth+2:e.strokeWidth,strokeDasharray:e.animated?`${e.strokeWidth*4} ${e.strokeWidth*3}`:l,strokeLinejoin:"round",strokeLinecap:"round",markerEnd:IB(e.endArrow,e.id,"end"),markerStart:IB(e.startArrow,e.id,"start"),children:e.animated&&_.jsx("animate",{attributeName:"stroke-dashoffset",from:e.strokeWidth*7,to:"0",dur:"0.6s",repeatCount:"indefinite"})}),A&&_.jsx("path",{d:o.path,fill:"none",stroke:"var(--color-selection)",strokeWidth:e.strokeWidth+2,opacity:.35,pointerEvents:"none"}),e.label&&_.jsxs("g",{transform:`translate(${o.mid.x+c.x} ${o.mid.y+c.y})`,pointerEvents:"none",children:[_.jsx("rect",{x:-UB(e.label)/2,y:-11,width:UB(e.label),height:22,rx:4,fill:"var(--color-surface)",opacity:.9}),_.jsx("text",{textAnchor:"middle",dominantBaseline:"middle",fontSize:12,fill:"var(--color-text)",children:e.label})]})]})});function UB(t){return Math.max(t.length*7+12,20)}function _B({id:t,style:e,color:r,reverse:A}){if(e==="none")return null;const s={id:t,markerWidth:12,markerHeight:12,refX:e==="circle"?10:11,refY:6,orient:A?"auto-start-reverse":"auto",markerUnits:"userSpaceOnUse"};return _.jsxs("marker",{...s,children:[e==="triangle"&&_.jsx("path",{d:"M1,1 L11,6 L1,11 Z",fill:r,stroke:"none"}),e==="arrow"&&_.jsx("path",{d:"M1,1 L11,6 L1,11",fill:"none",stroke:r,strokeWidth:2,strokeLinejoin:"round"}),e==="diamond"&&_.jsx("path",{d:"M1,6 L6,1 L11,6 L6,11 Z",fill:r,stroke:"none"}),e==="circle"&&_.jsx("circle",{cx:6,cy:6,r:4,fill:r,stroke:"none"})]})}const Rk=ke.memo(function({shapes:e,zoom:r,showHandles:A=!0,onResizeHandleDown:n,onRotateHandleDown:i}){if(e.length===0)return null;const s=9/r,a=e.length===1?e[0]:null;return _.jsxs("g",{pointerEvents:"all",children:[e.map(o=>_.jsx("rect",{x:o.x,y:o.y,width:o.width,height:o.height,transform:`rotate(${o.rotation} ${o.x+o.width/2} ${o.y+o.height/2})`,fill:"none",stroke:"var(--color-selection)",strokeWidth:1.5/r,pointerEvents:"none"},`bbox_${o.id}`)),A&&a&&!a.locked&&_.jsxs("g",{transform:`rotate(${a.rotation} ${a.x+a.width/2} ${a.y+a.height/2})`,children:[_.jsx("line",{x1:a.x+a.width/2,y1:a.y,x2:a.x+a.width/2,y2:a.y-24/r,stroke:"var(--color-selection)",strokeWidth:1.5/r}),_.jsx("circle",{cx:a.x+a.width/2,cy:a.y-24/r,r:s/1.4,fill:"var(--color-surface)",stroke:"var(--color-selection)",strokeWidth:1.5/r,style:{cursor:"grab"},onPointerDown:o=>i(o,a.id)}),lk.map(o=>{const l=uk(o),c=a.x+a.width*l.x,f=a.y+a.height*l.y;return _.jsx("rect",{x:c-s/2,y:f-s/2,width:s,height:s,rx:1.5/r,fill:"var(--color-surface)",stroke:"var(--color-selection)",strokeWidth:1.5/r,style:{cursor:ck[o]},onPointerDown:h=>n(h,o,a.id)},o)})]})]})});function jk(t,e,r){const A=Li(t,e);switch(e){case"top":return{x:A.x,y:A.y-r};case"bottom":return{x:A.x,y:A.y+r};case"left":return{x:A.x-r,y:A.y};case"right":return{x:A.x+r,y:A.y};default:return A}}const Kk=ke.memo(function({page:e,zoom:r,shapeIds:A,outward:n=0,onAnchorDown:i}){const s=5/r;return _.jsx("g",{"aria-label":"Connection points",children:e.order.map(a=>{if(A&&!A.has(a))return null;const o=e.shapes[a];return!o||o.hidden||o.locked?null:Rd.map(l=>{const c=n>0?jk(o,l,n):Li(o,l);return _.jsx("circle",{cx:c.x,cy:c.y,r:s,fill:"var(--color-accent)",stroke:"var(--color-surface)",strokeWidth:1.5/r,style:{cursor:"crosshair"},"aria-label":`Connect from ${l}`,onPointerDown:f=>i(f,a,l)},`${a}_${l}`)})})})}),zk=ke.memo(function({edge:e,page:r,zoom:A,onEndpointDown:n,onWaypointDown:i,onLabelDown:s}){const a=Il(e,r),o=5/A,l=e.labelOffset??{x:0,y:0},c=a.mid.x+l.x,f=a.mid.y+l.y;return _.jsxs("g",{children:[e.waypoints.map((h,u)=>_.jsx("rect",{x:h.x-o,y:h.y-o,width:o*2,height:o*2,fill:"var(--color-surface)",stroke:"var(--color-selection)",strokeWidth:2/A,rx:1/A,style:{cursor:"move"},onPointerDown:g=>i(g,e.id,u)},u)),_.jsx("circle",{cx:a.start.x,cy:a.start.y,r:o,fill:"var(--color-surface)",stroke:"var(--color-selection)",strokeWidth:2/A,style:{cursor:"grab"},onPointerDown:h=>n(h,e.id,"source")}),_.jsx("circle",{cx:a.end.x,cy:a.end.y,r:o,fill:"var(--color-surface)",stroke:"var(--color-selection)",strokeWidth:2/A,style:{cursor:"grab"},onPointerDown:h=>n(h,e.id,"target")}),e.label&&_.jsx("circle",{cx:c,cy:f,r:o+1/A,fill:"var(--color-accent)",fillOpacity:.25,stroke:"var(--color-accent)",strokeWidth:1.5/A,style:{cursor:"move"},onPointerDown:h=>s(h,e.id)})]})});function Gk(t){const e=Object.values(t.edges).filter(l=>!l.hidden);if(e.length===0)return t.order.filter(l=>t.shapes[l]);const r=new Map,A=new Map;for(const l of e){const c=l.source.shapeId,f=l.target.shapeId;if(!c||!f)continue;r.set(f,(r.get(f)??0)+1);const h=A.get(c)??[];h.push(l.id),A.set(c,h)}const n=Object.keys(t.shapes).filter(l=>!t.shapes[l].hidden&&(r.get(l)??0)===0),i=n.length>0?n:Object.keys(t.shapes).slice(0,1),s=[],a=new Set,o=l=>{if(s.includes(l))return;s.push(l);const c=A.get(l)??[];for(const f of c){if(a.has(f))continue;a.add(f);const h=t.edges[f];if(!h)continue;s.push(f);const u=h.target.shapeId;u&&o(u)}};for(const l of i)o(l);for(const l of e)a.has(l.id)||(s.push(l.id),a.add(l.id));return s}function Vk(t,e){return e<0||t.length===0?new Set:new Set(t.slice(0,e+1))}function qk(){const t=_e(n=>n.activeGroupId),e=_e(n=>n.setActiveGroupId),r=Qe(n=>n.project.pages.find(i=>i.id===n.activePageId)??n.project.pages[0]);if(!t)return null;const A=r.shapes[t];return A?_.jsxs("div",{className:"pointer-events-auto absolute left-3 top-3 z-20 flex items-center gap-1 rounded-lg border bordered px-2 py-1 text-xs shadow-md surface",style:{color:"var(--color-text)"},children:[_.jsx("span",{style:{color:"var(--color-text-muted)"},children:"Page"}),_.jsx(qc,{size:12,style:{color:"var(--color-text-muted)"}}),_.jsx("span",{className:"font-medium",children:A.text?.trim()||"Group"}),_.jsx("button",{type:"button","aria-label":"Exit group",title:"Exit group (Esc)",onClick:()=>e(null),className:"ml-1 rounded p-0.5 hover:brightness-125",style:{color:"var(--color-text-muted)"},children:_.jsx(lo,{size:14})})]}):null}const Wk=300;function QB({readOnly:t}={}){const e=ke.useRef(null),[r,A]=ke.useState(null),[n,i]=ke.useState(null),[s,a]=ke.useState([]),[o,l]=ke.useState(null),[c,f]=ke.useState({width:0,height:0}),h=_e(Z=>Z.camera),u=_e(Z=>Z.selectedIds),g=_e(Z=>Z.tool),p=_e(Z=>Z.hoveredShapeId),w=_e(Z=>Z.connectTargetId),m=_e(Z=>Z.readOnly),B=_e(Z=>Z.presentationFlowActive),x=_e(Z=>Z.presentationFlowStep),E=_e(Z=>Z.presentationFlowPath),k=_e(Z=>Z.activeGroupId),H=t??m,K=_e(Z=>Z.setHoveredShapeId),R=_e(Z=>Z.zoomBy),I=Qe(Z=>Z.project),W=Qe(Z=>Z.activePageId),L=I.pages.find(Z=>Z.id===W)??I.pages[0],F=mk(e,{setMarquee:A,setConnectPreview:i,setGuides:a,setPenPreview:l,setConnectTargetId:_e.getState().setConnectTargetId,readOnly:H}),M=new Set(u),b=Ul(L),Y=B?Vk(E,x):null,ce=ke.useMemo(()=>{if(g==="connector")return;const Z=new Set(u);return p&&Z.add(p),Z.size>0?Z:null},[g,u,p]);ke.useEffect(()=>{const Z=e.current;if(!Z)return;const pe=()=>{const be=Z.getBoundingClientRect();f({width:be.width,height:be.height})};pe();const we=new ResizeObserver(pe);return we.observe(Z),()=>we.disconnect()},[]);const ee=ke.useMemo(()=>{if(L.order.length<=Wk)return null;const Z=[];for(const pe of L.order){const we=L.shapes[pe];if(we){Z.push({id:pe,bounds:ik(we)});continue}const be=L.edges[pe];be&&Z.push({id:pe,bounds:ak(be,L)})}return ok(Z)},[L]),le=ke.useMemo(()=>{if(!ee||c.width===0)return null;const Z=nk(h,c),pe=ee.query(Z);for(const we of u)pe.add(we);return pe},[ee,h,c,u]);ke.useEffect(()=>Xe.on("zoom:fit",()=>{const Z=Kd(L),pe=e.current?.getBoundingClientRect();!Z||!pe||_e.getState().fitToBounds(Z,{width:pe.width,height:pe.height})}),[L]);const Ae=ke.useCallback(Z=>{const pe=e.current?.getBoundingClientRect(),we={x:Z.clientX-(pe?.left??0),y:Z.clientY-(pe?.top??0)};R(Math.exp(-Z.deltaY*.0015),we)},[R]),te=ke.useCallback(Z=>K(Z),[K]),T=ke.useCallback(Z=>{_e.getState().hoveredShapeId===Z&&K(null)},[K]),S=ke.useCallback(Z=>{const pe=Z.dataTransfer.types;(pe.includes(ap)||pe.includes("Files"))&&(Z.preventDefault(),Z.dataTransfer.dropEffect="copy")},[]),O=ke.useCallback(Z=>{if(Z.dataTransfer.files.length>0){Z.preventDefault(),FB(Z.dataTransfer.files[0]);return}const pe=Z.dataTransfer.getData(ap);if(!pe)return;Z.preventDefault();const we=Jh(pe);if(!we)return;const be=e.current?.getBoundingClientRect(),je=_e.getState().camera,Te=as({x:Z.clientX-(be?.left??0),y:Z.clientY-(be?.top??0)},je);pB(we,Te,{parentGroupId:iB(Qe.getState().activePage(),Te)?.id})},[]),P=u.map(Z=>L.shapes[Z]).filter(Z=>!!Z),z=u.length===1?L.edges[u[0]]:void 0,ie=ke.useCallback(Z=>k?Z!==k&&!So(L,Z,k):!1,[k,L]),fe=H?g==="pan"?"grab":"default":g==="pan"?"grab":g==="select"?"default":"crosshair";return _.jsxs("div",{className:"relative h-full w-full",children:[!H&&_.jsx(qk,{}),_.jsxs("svg",{ref:e,className:"h-full w-full touch-none select-none",style:{background:"var(--color-canvas)",cursor:fe},onPointerDown:F.onSvgPointerDown,onWheel:Ae,onDragOver:S,onDrop:O,role:"application","aria-label":"Diagram canvas",children:[_.jsx(Ok,{camera:h,size:I.settings.gridSize}),_.jsxs("g",{transform:`translate(${h.x} ${h.y}) scale(${h.zoom})`,children:[L.order.map(Z=>{if(le&&!le.has(Z))return null;const pe=L.edges[Z];if(pe){const be=Y?.has(Z)??!1;return _.jsx(Hk,{edge:pe,page:L,selected:M.has(Z),flowHighlighted:be,flowDimmed:!!(Y&&!be),onPointerDown:F.onEdgePointerDown,onDoubleClick:F.onEdgeDoubleClick},Z)}const we=L.shapes[Z];if(we){if(!xu(b,we))return null;const be=Y?.has(Z)??!1,je=!!(Y&&!be)||ie(Z);return _.jsx(Dk,{shape:we,selected:M.has(Z),flowHighlighted:be,flowDimmed:je,onPointerDown:F.onShapePointerDown,onDoubleClick:F.onShapeDoubleClick,onPointerEnter:te,onPointerLeave:T},Z)}return null}),(g==="connector"||ce)&&_.jsx(Kk,{page:L,zoom:h.zoom,shapeIds:ce??void 0,outward:10/h.zoom,onAnchorDown:F.onAnchorDown}),w&&L.shapes[w]&&_.jsx("rect",{x:L.shapes[w].x-6/h.zoom,y:L.shapes[w].y-6/h.zoom,width:L.shapes[w].width+12/h.zoom,height:L.shapes[w].height+12/h.zoom,fill:"none",stroke:"var(--color-accent)",strokeWidth:2/h.zoom,rx:4/h.zoom,pointerEvents:"none",opacity:.85}),_.jsx(Rk,{shapes:P,zoom:h.zoom,showHandles:g==="select",onResizeHandleDown:F.onResizeHandleDown,onRotateHandleDown:F.onRotateHandleDown}),z&&g==="select"&&!H&&_.jsx(zk,{edge:z,page:L,zoom:h.zoom,onEndpointDown:F.onEndpointDown,onWaypointDown:F.onWaypointDown,onLabelDown:F.onLabelDown}),s.map((Z,pe)=>Z.orientation==="v"?_.jsx("line",{x1:Z.position,y1:Z.from,x2:Z.position,y2:Z.to,stroke:"#ec4899",strokeWidth:1/h.zoom,pointerEvents:"none"},`g${pe}`):_.jsx("line",{x1:Z.from,y1:Z.position,x2:Z.to,y2:Z.position,stroke:"#ec4899",strokeWidth:1/h.zoom,pointerEvents:"none"},`g${pe}`)),o&&o.length>1&&_.jsx("polyline",{points:o.map(Z=>`${Z.x},${Z.y}`).join(" "),fill:"none",stroke:"#1f2430",strokeWidth:2/h.zoom,strokeLinecap:"round",strokeLinejoin:"round",pointerEvents:"none"}),n&&_.jsx("line",{x1:n.from.x,y1:n.from.y,x2:n.to.x,y2:n.to.y,stroke:"var(--color-accent)",strokeWidth:2/h.zoom,strokeDasharray:`${5/h.zoom} ${4/h.zoom}`,pointerEvents:"none"}),r&&_.jsx("rect",{x:r.x,y:r.y,width:r.width,height:r.height,fill:"var(--color-selection)",fillOpacity:.08,stroke:"var(--color-selection)",strokeWidth:1/h.zoom,strokeDasharray:`${4/h.zoom} ${3/h.zoom}`,pointerEvents:"none"})]})]})]})}function $k(){const t=_e(w=>w.presentationOpen),e=_e(w=>w.setPresentationOpen),r=_e(w=>w.presentationIndex),A=_e(w=>w.setPresentationIndex),n=_e(w=>w.presentationFlowActive),i=_e(w=>w.presentationFlowStep),s=_e(w=>w.presentationFlowPath),a=_e(w=>w.setPresentationFlowActive),o=_e(w=>w.setPresentationFlowStep),l=_e(w=>w.setPresentationFlowPath),c=_e(w=>w.fitToBounds),f=Qe(w=>w.project.pages),h=Qe(w=>w.activePageId),u=Qe(w=>w.setActivePage),g=ke.useCallback(w=>{const m=f.findIndex(x=>x.id===h),B=Math.max(0,Math.min(f.length-1,m+w));A(B),u(f[B].id)},[f,h,u,A]),p=ke.useCallback(w=>{if(s.length===0)return;const m=Math.max(0,Math.min(s.length-1,i+w));o(m)},[s.length,i,o]);return ke.useEffect(()=>{if(!t)return;const w=f.findIndex(m=>m.id===h);w>=0&&A(w)},[t,f,h,A]),ke.useEffect(()=>{if(!t)return;const w=f[r];if(!w)return;l(Gk(w)),o(0);const m=Kd(w);if(!m)return;const B=setTimeout(()=>{c(m,{width:window.innerWidth,height:window.innerHeight-56},40)},50);return()=>clearTimeout(B)},[t,r,f,c,l,o]),ke.useEffect(()=>{if(!t)return;const w=m=>{if(m.key==="Escape"&&e(!1),n){(m.key==="ArrowRight"||m.key===" ")&&(m.preventDefault(),p(1)),m.key==="ArrowLeft"&&p(-1);return}(m.key==="ArrowRight"||m.key===" ")&&(m.preventDefault(),g(1)),m.key==="ArrowLeft"&&g(-1)};return window.addEventListener("keydown",w),()=>window.removeEventListener("keydown",w)},[t,n,p,g,e]),t?_.jsxs("div",{className:"fixed inset-0 z-[100] flex flex-col bg-black",children:[_.jsxs("div",{className:"flex items-center gap-3 px-4 py-2 text-white/90",children:[_.jsxs("span",{className:"text-sm font-medium",children:["Slide ",r+1," / ",f.length]}),_.jsx("span",{className:"truncate text-sm text-white/60",children:f[r]?.name}),_.jsxs("button",{type:"button",onClick:()=>a(!n),className:`ml-2 flex items-center gap-1.5 rounded px-2 py-1 text-xs font-medium ${n?"bg-white/20 text-white":"text-white/70 hover:bg-white/10"}`,title:"Step through connected flow (Space / arrows)",children:[_.jsx(YI,{size:14}),"Flow"]}),n&&s.length>0&&_.jsxs("span",{className:"text-xs text-white/60",children:["Step ",i+1," / ",s.length]}),_.jsxs("div",{className:"ml-auto flex items-center gap-1",children:[_.jsx("button",{type:"button","aria-label":n?"Previous step":"Previous slide",onClick:()=>n?p(-1):g(-1),className:"rounded p-2 hover:bg-white/10",children:_.jsx(bI,{size:20})}),_.jsx("button",{type:"button","aria-label":n?"Next step":"Next slide",onClick:()=>n?p(1):g(1),className:"rounded p-2 hover:bg-white/10",children:_.jsx(qc,{size:20})}),_.jsx("button",{type:"button","aria-label":"Exit presentation",onClick:()=>e(!1),className:"rounded p-2 hover:bg-white/10",children:_.jsx(lo,{size:20})})]})]}),_.jsx("div",{className:"min-h-0 flex-1",children:_.jsx(QB,{readOnly:!0})})]}):null}function sp(){const t=Qe.getState(),e=t.project.pages.findIndex(r=>r.id===t.activePageId);_e.getState().setPresentationIndex(Math.max(0,e)),_e.getState().setPresentationFlowActive(!1),_e.getState().setPresentationFlowStep(0),_e.getState().setPresentationOpen(!0)}const Yk=[{id:"select",label:"Select (V)",icon:qI},{id:"pan",label:"Pan (H)",icon:PI},{id:"rectangle",label:"Rectangle (R)",icon:lm},{id:"rounded-rectangle",label:"Rounded rectangle",icon:tU},{id:"ellipse",label:"Ellipse (O)",icon:SI},{id:"diamond",label:"Diamond (D)",icon:_I},{id:"triangle",label:"Triangle",icon:iU},{id:"hexagon",label:"Hexagon",icon:MI},{id:"connector",label:"Connect shapes (C)",icon:om},{id:"text",label:"Text (T)",icon:aU},{id:"sticky-note",label:"Sticky note (N)",icon:AU},{id:"comment",label:"Comment",icon:GI},{id:"pen",label:"Pen (P)",icon:Dh},{id:"eraser",label:"Eraser (E)",icon:kI},{id:"image",label:"Image",icon:DI}],op=["light","dark","system"];function Xk(){const t=_e(I=>I.tool),e=_e(I=>I.setTool),r=_e(I=>I.themeMode),A=_e(I=>I.setThemeMode),n=_e(I=>I.camera),i=_e(I=>I.setZoom),s=_e(I=>I.minimapOpen),a=_e(I=>I.toggleMinimap),o=_e(I=>I.setSearchOpen),l=_e(I=>I.setTemplatesOpen),c=_e(I=>I.setShortcutsOpen),f=_e(I=>I.selectedIds),h=_e(I=>I.formatPainterActive),u=_e(I=>I.viewMode),g=_e(I=>I.setViewMode),p=Et(I=>I.past.length>0),w=Et(I=>I.future.length>0),m=Et(I=>I.undo),B=Et(I=>I.redo),x=()=>({x:window.innerWidth/2,y:window.innerHeight/2}),E=()=>{const I=op[(op.indexOf(r)+1)%op.length];A(I)},k=()=>{Vy(Qe.getState().project).then(()=>Xe.emit("toast",{message:"Share link copied to clipboard.",kind:"success"})).catch(()=>Xe.emit("toast",{message:"Could not copy share link.",kind:"error"}))},H=()=>{const I=f.filter(W=>Qe.getState().activePage().shapes[W]);tB(I.length>0?I:void 0),Xe.emit("toast",{message:I.length>0?"Auto-layout applied to selection.":"Auto-layout applied to page.",kind:"success"})},K=()=>{if(h){$d(),Xe.emit("toast",{message:"Format painter off.",kind:"info"});return}if(!rB()){Xe.emit("toast",{message:"Select a shape to copy its style first.",kind:"error"});return}Xe.emit("toast",{message:"Format painter on — click shapes to apply.",kind:"success"})},R=()=>{qy(Qe.getState().project).then(()=>Xe.emit("toast",{message:"View-only link copied.",kind:"success"})).catch(()=>Xe.emit("toast",{message:"Could not copy link.",kind:"error"}))};return _.jsxs("div",{className:"flex items-center gap-1 border-b bordered px-2 py-1.5 surface",role:"toolbar","aria-label":"Editor toolbar",children:[_.jsx(R6,{}),_.jsx(Tu,{}),Yk.map(I=>_.jsx(Br,{label:I.label,active:t===I.id,onClick:()=>I.id==="image"?Xe.emit("import:request",void 0):e(I.id),children:_.jsx(I.icon,{size:18})},I.id)),_.jsx(Tu,{}),_.jsx(Br,{label:"Group selection (Ctrl+G)",disabled:f.filter(I=>Qe.getState().activePage().shapes[I]).length<2,onClick:()=>Ap(),children:_.jsx(OI,{size:18})}),_.jsx(Br,{label:"Ungroup (Ctrl+Shift+G)",disabled:!vB(),onClick:np,children:_.jsx(oU,{size:18})}),_.jsx(Br,{label:"Undo (Ctrl+Z)",disabled:!p,onClick:m,children:_.jsx(sU,{size:18})}),_.jsx(Br,{label:"Redo (Ctrl+Shift+Z)",disabled:!w,onClick:B,children:_.jsx(ZI,{size:18})}),_.jsx(Tu,{}),_.jsx(Br,{label:"Zoom out",onClick:()=>i(n.zoom/1.2,x()),children:_.jsx(om,{size:18})}),_.jsxs("span",{className:"w-12 text-center text-xs tabular-nums",style:{color:"var(--color-text-muted)"},children:[Math.round(n.zoom*100),"%"]}),_.jsx(Br,{label:"Zoom in",onClick:()=>i(n.zoom*1.2,x()),children:_.jsx(Hh,{size:18})}),_.jsx(Br,{label:"Fit to screen (Shift+1)",onClick:()=>Xe.emit("zoom:fit",void 0),children:_.jsx(zI,{size:18})}),FA.toolbarItems().length>0&&_.jsx(Tu,{}),FA.toolbarItems().map(I=>_.jsx(Br,{label:I.title,onClick:()=>FA.runCommand(I.command),children:_.jsx(JI,{size:18})},I.id)),_.jsx("div",{className:"ml-auto"}),_.jsx(Br,{label:"Split view (canvas + source)",active:u==="split",onClick:()=>g(u==="split"?"canvas":"split"),children:_.jsx(II,{size:18})}),_.jsx(Br,{label:"Source editor (JSON / YAML / Mermaid)",active:u==="source",onClick:()=>g(u==="source"?"canvas":"source"),children:_.jsx(im,{size:18})}),_.jsx(Br,{label:"Templates",onClick:()=>l(!0),children:_.jsx($c,{size:18})}),_.jsx(Br,{label:"Auto layout",onClick:H,children:_.jsx(WI,{size:18})}),_.jsx(Br,{label:"Insert swimlane (3 lanes)",onClick:()=>nB(3),children:_.jsx(UI,{size:18})}),_.jsx(Br,{label:"Format painter",active:h,onClick:K,children:_.jsx($I,{size:18})}),_.jsx(Br,{label:"Presentation (F5)",onClick:sp,children:_.jsx(XI,{size:18})}),_.jsx(Br,{label:"Copy share link",onClick:k,children:_.jsx(Mh,{size:18})}),_.jsx(Br,{label:"Copy view-only link",onClick:R,children:_.jsx(Wc,{size:18})}),_.jsx(Br,{label:"Keyboard shortcuts (?)",onClick:()=>c(!0),children:_.jsx(sm,{size:18})}),_.jsx(Br,{label:"Generate with AI",onClick:()=>Xe.emit("ai:open",void 0),children:_.jsx(jh,{size:18})}),_.jsx(Br,{label:"Find (Ctrl+F)",onClick:()=>o(!0),children:_.jsx(Rh,{size:18})}),_.jsx(Br,{label:"Toggle minimap",active:s,onClick:a,children:_.jsx(KI,{size:18})}),_.jsx(Br,{label:`Theme: ${r}`,onClick:E,children:r==="dark"?_.jsx(VI,{size:18}):_.jsx(nU,{size:18})})]})}function Tu(){return _.jsx("div",{className:"mx-1 h-6 w-px",style:{background:"var(--color-border)"}})}const kB=48;function gA({id:t,label:e,category:r,bg:A,glyph:n,keywords:i,size:s}){return{id:t,label:e,category:r,viewSize:kB,body:`<rect x="1" y="1" width="46" height="46" rx="8" fill="${A}"/>${n}`,keywords:i??[e.toLowerCase()],defaultSize:s??{width:72,height:72}}}function Ct(t,e,r,A,n={}){return{id:t,label:e,category:r,viewSize:kB,body:A,keywords:n.keywords??[e.toLowerCase()],defaultSize:n.size??{width:96,height:72},shapeKind:n.shapeKind,defaultText:n.defaultText,defaultFill:n.defaultFill,defaultStroke:n.defaultStroke}}const Jk="#dbeafe",LB="#3b82f6",Yn=`fill="${Jk}" stroke="${LB}" stroke-width="2"`,Zk=[Ct("basic.rectangle","Rectangle","Basic",`<rect x="4" y="10" width="40" height="28" rx="2" ${Yn}/>`,{shapeKind:"rectangle",size:{width:120,height:80}}),Ct("basic.rounded","Rounded","Basic",`<rect x="4" y="10" width="40" height="28" rx="10" ${Yn}/>`,{shapeKind:"rounded-rectangle",size:{width:120,height:80}}),Ct("basic.ellipse","Ellipse","Basic",`<ellipse cx="24" cy="24" rx="20" ry="14" ${Yn}/>`,{shapeKind:"ellipse",size:{width:120,height:80}}),Ct("basic.circle","Circle","Basic",`<circle cx="24" cy="24" r="18" ${Yn}/>`,{shapeKind:"circle",size:{width:90,height:90}}),Ct("basic.diamond","Diamond","Basic",`<path d="M24 4 L44 24 L24 44 L4 24 Z" ${Yn}/>`,{shapeKind:"diamond",size:{width:100,height:100}}),Ct("basic.triangle","Triangle","Basic",`<path d="M24 6 L42 40 L6 40 Z" ${Yn}/>`,{shapeKind:"triangle",size:{width:110,height:90}}),Ct("basic.hexagon","Hexagon","Basic",`<path d="M14 8 L34 8 L44 24 L34 40 L14 40 L4 24 Z" ${Yn}/>`,{shapeKind:"hexagon",size:{width:120,height:90}}),Ct("basic.parallelogram","Parallelogram","Basic",`<path d="M14 10 L44 10 L34 38 L4 38 Z" ${Yn}/>`,{shapeKind:"parallelogram",size:{width:130,height:80}}),Ct("basic.cloud","Cloud","Basic",`<path d="M14 36 a9 9 0 0 1 1 -18 a11 11 0 0 1 20 3 a7 7 0 0 1 -2 15 Z" ${Yn}/>`,{shapeKind:"cloud",size:{width:130,height:90}}),Ct("basic.cylinder","Cylinder","Basic",`<path d="M8 12 v24 a16 5 0 0 0 32 0 v-24" ${Yn}/><ellipse cx="24" cy="12" rx="16" ry="5" ${Yn}/>`,{shapeKind:"cylinder",size:{width:90,height:110}}),Ct("basic.text","Text","Basic",`<text x="24" y="31" text-anchor="middle" font-size="26" font-family="sans-serif" fill="${LB}">T</text>`,{shapeKind:"text",defaultText:"Text",size:{width:120,height:40}})],eL="#e0e7ff",TB="#6366f1",pa=`fill="${eL}" stroke="${TB}" stroke-width="2"`,tL=[Ct("flowchart.process","Process","Flowchart",`<rect x="3" y="12" width="42" height="24" rx="2" ${pa}/>`),Ct("flowchart.decision","Decision","Flowchart",`<path d="M24 4 L44 24 L24 44 L4 24 Z" ${pa}/>`),Ct("flowchart.terminator","Terminator","Flowchart",`<rect x="3" y="14" width="42" height="20" rx="10" ${pa}/>`),Ct("flowchart.data","Data","Flowchart",`<path d="M11 12 L45 12 L37 36 L3 36 Z" ${pa}/>`),Ct("flowchart.document","Document","Flowchart",`<path d="M4 10 H44 V34 C36 42 12 26 4 34 Z" ${pa}/>`),Ct("flowchart.database","Database","Flowchart",`<path d="M6 12 C6 8 42 8 42 12 L42 36 C42 40 6 40 6 36 Z" ${pa}/><path d="M6 12 C6 16 42 16 42 12" fill="none" stroke="${TB}" stroke-width="2"/>`),Ct("flowchart.manual-input","Manual Input","Flowchart",`<path d="M4 16 L44 10 L44 36 L4 36 Z" ${pa}/>`),Ct("flowchart.preparation","Preparation","Flowchart",`<path d="M12 12 L36 12 L44 24 L36 36 L12 36 L4 24 Z" ${pa}/>`)],rL="#ccfbf1",Ll="#14b8a6",ga=`fill="${rL}" stroke="${Ll}" stroke-width="2"`,AL=[Ct("uml.class","Class","UML",`<rect x="4" y="6" width="40" height="36" ${ga}/><line x1="4" y1="18" x2="44" y2="18" stroke="${Ll}" stroke-width="2"/><line x1="4" y1="30" x2="44" y2="30" stroke="${Ll}" stroke-width="2"/>`,{size:{width:140,height:100}}),Ct("uml.interface","Interface","UML",`<circle cx="24" cy="24" r="18" ${ga}/>`),Ct("uml.actor","Actor","UML",`<g fill="none" stroke="${Ll}" stroke-width="2.5"><circle cx="24" cy="10" r="5"/><line x1="24" y1="15" x2="24" y2="32"/><line x1="12" y1="22" x2="36" y2="22"/><line x1="24" y1="32" x2="14" y2="44"/><line x1="24" y1="32" x2="34" y2="44"/></g>`,{size:{width:60,height:96}}),Ct("uml.usecase","Use Case","UML",`<ellipse cx="24" cy="24" rx="22" ry="14" ${ga}/>`,{size:{width:120,height:72}}),Ct("uml.component","Component","UML",`<rect x="8" y="8" width="34" height="32" ${ga}/><rect x="2" y="14" width="12" height="7" ${ga}/><rect x="2" y="27" width="12" height="7" ${ga}/>`),Ct("uml.package","Package","UML",`<path d="M4 12 H20 V16 H44 V42 H4 Z" ${ga}/>`,{size:{width:120,height:90}}),Ct("uml.note","Note","UML",`<path d="M4 6 H36 L44 14 V42 H4 Z" ${ga}/><path d="M36 6 V14 H44" fill="none" stroke="${Ll}" stroke-width="2"/>`)],lp="#fef3c7",ms="#f59e0b",nL=[Ct("bpmn.start-event","Start Event","BPMN",'<circle cx="24" cy="24" r="20" fill="#dcfce7" stroke="#16a34a" stroke-width="3"/>',{size:{width:60,height:60}}),Ct("bpmn.end-event","End Event","BPMN",'<circle cx="24" cy="24" r="20" fill="#fee2e2" stroke="#dc2626" stroke-width="5"/>',{size:{width:60,height:60}}),Ct("bpmn.task","Task","BPMN",`<rect x="3" y="10" width="42" height="28" rx="6" fill="${lp}" stroke="${ms}" stroke-width="2"/>`,{size:{width:120,height:72}}),Ct("bpmn.gateway","Gateway","BPMN",`<path d="M24 4 L44 24 L24 44 L4 24 Z" fill="${lp}" stroke="${ms}" stroke-width="2"/><path d="M17 17 L31 31 M31 17 L17 31" stroke="${ms}" stroke-width="3"/>`,{size:{width:72,height:72}}),Ct("bpmn.subprocess","Subprocess","BPMN",`<rect x="3" y="10" width="42" height="28" rx="6" fill="${lp}" stroke="${ms}" stroke-width="2"/><rect x="21" y="30" width="6" height="6" fill="none" stroke="${ms}" stroke-width="1.5"/><line x1="24" y1="31" x2="24" y2="35" stroke="${ms}"/><line x1="22" y1="33" x2="26" y2="33" stroke="${ms}"/>`,{size:{width:120,height:72}})],va="#ff9900",vA='fill="none" stroke="#fff" stroke-width="2.5" stroke-linejoin="round" stroke-linecap="round"',iL=[gA({id:"aws.ec2",label:"EC2",category:"AWS",bg:va,glyph:`<rect x="14" y="14" width="20" height="20" rx="2" ${vA}/><path d="M18 10 v-3 M24 10 v-3 M30 10 v-3 M18 41 v-3 M24 41 v-3 M30 41 v-3 M10 18 h-3 M10 24 h-3 M10 30 h-3 M41 18 h3 M41 24 h3 M41 30 h3" ${vA}/>`}),gA({id:"aws.s3",label:"S3",category:"AWS",bg:va,glyph:`<path d="M14 14 h20 l-2 22 a8 4 0 0 1 -16 0 Z" ${vA}/><path d="M12 14 a12 4 0 0 0 24 0" ${vA}/>`}),gA({id:"aws.lambda",label:"Lambda",category:"AWS",bg:va,glyph:'<path d="M12 38 L22 12 h6 L18 38 Z M26 20 L38 38 h-6 L24 26" fill="#fff" stroke="none"/>'}),gA({id:"aws.rds",label:"RDS",category:"AWS",bg:va,glyph:`<ellipse cx="24" cy="14" rx="11" ry="4" ${vA}/><path d="M13 14 v20 a11 4 0 0 0 22 0 v-20" ${vA}/>`}),gA({id:"aws.vpc",label:"VPC",category:"AWS",bg:va,glyph:`<rect x="10" y="10" width="28" height="28" rx="3" ${vA}/><circle cx="18" cy="24" r="3" ${vA}/><circle cx="30" cy="17" r="3" ${vA}/><circle cx="30" cy="31" r="3" ${vA}/><path d="M21 24 h6 M27 20 l-6 4 M27 28 l-6 -4" ${vA}/>`}),gA({id:"aws.dynamodb",label:"DynamoDB",category:"AWS",bg:va,glyph:`<ellipse cx="24" cy="14" rx="12" ry="4" ${vA}/><path d="M12 14 v20 a12 4 0 0 0 24 0 v-20 M12 24 a12 4 0 0 0 24 0" ${vA}/>`}),gA({id:"aws.cloudfront",label:"CloudFront",category:"AWS",bg:va,glyph:`<circle cx="24" cy="24" r="14" ${vA}/><path d="M10 24 h28 M24 10 c6 6 6 22 0 28 c-6 -6 -6 -22 0 -28" ${vA}/>`}),gA({id:"aws.sns",label:"SNS",category:"AWS",bg:va,glyph:`<circle cx="24" cy="24" r="5" ${vA}/><path d="M24 19 v-8 M24 29 v8 M19 24 h-8 M29 24 h8" ${vA}/>`})],ma="#0078d4",lA='fill="none" stroke="#fff" stroke-width="2.5" stroke-linejoin="round" stroke-linecap="round"',aL=[gA({id:"azure.vm",label:"Virtual Machine",category:"Azure",bg:ma,glyph:`<rect x="10" y="13" width="28" height="18" rx="2" ${lA}/><path d="M18 38 h12 M24 31 v7" ${lA}/>`}),gA({id:"azure.storage",label:"Storage",category:"Azure",bg:ma,glyph:`<rect x="10" y="14" width="28" height="20" rx="2" ${lA}/><path d="M10 21 h28 M10 27 h28" ${lA}/>`}),gA({id:"azure.functions",label:"Functions",category:"Azure",bg:ma,glyph:`<path d="M20 38 L28 10 M16 22 h14 M14 30 h14" ${lA}/>`}),gA({id:"azure.sql",label:"SQL Database",category:"Azure",bg:ma,glyph:`<ellipse cx="24" cy="14" rx="11" ry="4" ${lA}/><path d="M13 14 v20 a11 4 0 0 0 22 0 v-20" ${lA}/>`}),gA({id:"azure.appservice",label:"App Service",category:"Azure",bg:ma,glyph:`<circle cx="24" cy="24" r="14" ${lA}/><path d="M10 24 h28 M24 10 c6 6 6 22 0 28 c-6 -6 -6 -22 0 -28" ${lA}/>`}),gA({id:"azure.cosmosdb",label:"Cosmos DB",category:"Azure",bg:ma,glyph:`<circle cx="24" cy="24" r="14" ${lA}/><ellipse cx="24" cy="24" rx="14" ry="6" ${lA}/><ellipse cx="24" cy="24" rx="6" ry="14" ${lA}/>`}),gA({id:"azure.aks",label:"Kubernetes Service",category:"Azure",bg:ma,glyph:`<path d="M24 9 L37 16 V32 L24 39 L11 32 V16 Z" ${lA}/><circle cx="24" cy="24" r="4" ${lA}/>`}),gA({id:"azure.loadbalancer",label:"Load Balancer",category:"Azure",bg:ma,glyph:`<circle cx="24" cy="12" r="4" ${lA}/><circle cx="13" cy="36" r="4" ${lA}/><circle cx="35" cy="36" r="4" ${lA}/><path d="M24 16 v8 M24 24 l-11 8 M24 24 l11 8" ${lA}/>`})],sL="#326ce5",oL='fill="none" stroke="#fff" stroke-width="2.5" stroke-linejoin="round" stroke-linecap="round"',wa=(t,e,r)=>gA({id:e,label:t,category:"Kubernetes",bg:sL,glyph:`<path d="M24 8 L36 14 L39 27 L31 38 L17 38 L9 27 L12 14 Z" ${oL}/>${r}`}),lL=[wa("Pod","k8s.pod",'<text x="24" y="29" text-anchor="middle" fill="#fff" font-size="12" font-family="sans-serif" font-weight="700">pod</text>'),wa("Deployment","k8s.deployment",'<text x="24" y="29" text-anchor="middle" fill="#fff" font-size="14" font-family="sans-serif" font-weight="700">D</text>'),wa("Service","k8s.service",'<text x="24" y="29" text-anchor="middle" fill="#fff" font-size="14" font-family="sans-serif" font-weight="700">svc</text>'),wa("Ingress","k8s.ingress",'<text x="24" y="29" text-anchor="middle" fill="#fff" font-size="14" font-family="sans-serif" font-weight="700">ing</text>'),wa("ConfigMap","k8s.configmap",'<text x="24" y="29" text-anchor="middle" fill="#fff" font-size="14" font-family="sans-serif" font-weight="700">cm</text>'),wa("Secret","k8s.secret",'<text x="24" y="30" text-anchor="middle" fill="#fff" font-size="16" font-family="sans-serif" font-weight="700">S</text>'),wa("Node","k8s.node",'<text x="24" y="30" text-anchor="middle" fill="#fff" font-size="16" font-family="sans-serif" font-weight="700">N</text>'),wa("Namespace","k8s.namespace",'<text x="24" y="29" text-anchor="middle" fill="#fff" font-size="14" font-family="sans-serif" font-weight="700">ns</text>')],Fo="#1ba0d7",Io=`fill="none" stroke="${Fo}" stroke-width="2.5" stroke-linejoin="round" stroke-linecap="round"`,vi=`fill="#e0f2fe" stroke="${Fo}" stroke-width="2.5"`,cL=[Ct("net.router","Router","Network",`<circle cx="24" cy="24" r="18" ${vi}/><path d="M17 27 h14 M31 27 l-4 -3 M31 27 l-4 3 M31 21 h-14 M17 21 l4 -3 M17 21 l4 3" ${Io}/>`,{size:{width:72,height:72}}),Ct("net.switch","Switch","Network",`<rect x="4" y="16" width="40" height="16" rx="3" ${vi}/><path d="M12 24 h6 M20 24 l-3 -2 M20 24 l-3 2 M36 24 h-6 M28 24 l3 -2 M28 24 l3 2" ${Io}/>`,{size:{width:96,height:48}}),Ct("net.firewall","Firewall","Network",'<rect x="6" y="10" width="36" height="28" rx="2" fill="#fee2e2" stroke="#dc2626" stroke-width="2.5"/><path d="M6 19 h36 M6 29 h36 M18 10 v9 M30 19 v10 M18 29 v9" stroke="#dc2626" stroke-width="2"/>',{size:{width:72,height:60}}),Ct("net.server","Server","Network",`<rect x="12" y="6" width="24" height="36" rx="2" ${vi}/><circle cx="18" cy="13" r="1.6" fill="${Fo}"/><circle cx="18" cy="20" r="1.6" fill="${Fo}"/><path d="M24 13 h8 M24 20 h8" ${Io}/>`,{size:{width:56,height:84}}),Ct("net.cloud","Cloud","Network",`<path d="M14 34 a9 9 0 0 1 1 -18 a11 11 0 0 1 20 3 a7 7 0 0 1 -2 15 Z" ${vi}/>`,{size:{width:96,height:64}}),Ct("net.laptop","Laptop","Network",`<rect x="10" y="10" width="28" height="18" rx="2" ${vi}/><path d="M6 34 h36 l-3 -6 H9 Z" ${vi}/>`,{size:{width:84,height:64}}),Ct("net.database","Database","Network",`<ellipse cx="24" cy="12" rx="12" ry="4" ${vi}/><path d="M12 12 v24 a12 4 0 0 0 24 0 v-24" ${Io}/>`,{size:{width:64,height:84}}),Ct("net.mobile","Mobile","Network",`<rect x="16" y="6" width="16" height="36" rx="3" ${vi}/><line x1="21" y1="38" x2="27" y2="38" ${Io}/>`,{size:{width:44,height:84}}),Ct("net.printer","Printer","Network",`<rect x="10" y="18" width="28" height="16" rx="2" ${vi}/><rect x="16" y="8" width="16" height="10" ${vi}/><rect x="16" y="30" width="16" height="10" fill="#fff" stroke="${Fo}" stroke-width="2"/>`,{size:{width:72,height:72}}),Ct("net.accesspoint","Access Point","Network",`<circle cx="24" cy="34" r="4" fill="${Fo}"/><path d="M16 26 a11 11 0 0 1 16 0 M12 21 a17 17 0 0 1 24 0" ${Io}/>`,{size:{width:72,height:60}})],uL=[Ct("mindmap.central","Central Topic","Mind Map",'<ellipse cx="24" cy="24" rx="20" ry="13" fill="#8b5cf6" stroke="#6d28d9" stroke-width="2"/>',{shapeKind:"ellipse",defaultText:"Central Topic",size:{width:150,height:70}}),Ct("mindmap.main","Main Topic","Mind Map",'<rect x="4" y="13" width="40" height="22" rx="11" fill="#c4b5fd" stroke="#8b5cf6" stroke-width="2"/>',{shapeKind:"rounded-rectangle",defaultText:"Main Topic",size:{width:130,height:56}}),Ct("mindmap.subtopic","Subtopic","Mind Map",'<rect x="4" y="16" width="40" height="16" rx="8" fill="#ede9fe" stroke="#a78bfa" stroke-width="2"/>',{shapeKind:"rounded-rectangle",defaultText:"Subtopic",size:{width:110,height:44}})],fL=[Ct("org.executive","Executive","Org Chart",'<rect x="4" y="10" width="40" height="28" rx="3" fill="#1e293b" stroke="#0f172a" stroke-width="2"/><circle cx="24" cy="22" r="5" fill="#fff"/><path d="M15 34 a9 7 0 0 1 18 0" fill="#fff"/>',{shapeKind:"rectangle",defaultText:"Executive",size:{width:140,height:70}}),Ct("org.manager","Manager","Org Chart",'<rect x="4" y="10" width="40" height="28" rx="3" fill="#3b82f6" stroke="#2563eb" stroke-width="2"/><circle cx="24" cy="22" r="5" fill="#fff"/><path d="M15 34 a9 7 0 0 1 18 0" fill="#fff"/>',{shapeKind:"rectangle",defaultText:"Manager",size:{width:140,height:70}}),Ct("org.employee","Employee","Org Chart",'<rect x="4" y="10" width="40" height="28" rx="3" fill="#dbeafe" stroke="#3b82f6" stroke-width="2"/><circle cx="24" cy="22" r="5" fill="#3b82f6"/><path d="M15 34 a9 7 0 0 1 18 0" fill="#3b82f6"/>',{shapeKind:"rectangle",defaultText:"Employee",size:{width:140,height:70}}),Ct("org.team","Team","Org Chart",'<rect x="4" y="12" width="40" height="24" rx="3" fill="#d1fae5" stroke="#10b981" stroke-width="2"/><circle cx="18" cy="22" r="4" fill="#10b981"/><circle cx="30" cy="22" r="4" fill="#10b981"/>',{shapeKind:"rectangle",defaultText:"Team",size:{width:150,height:64}})];function Tl(t,e,r,A){return Ct(t,e,"Sticky Notes",`<path d="M6 6 H42 V34 L34 42 H6 Z" fill="${r}" stroke="${A}" stroke-width="1.5"/><path d="M42 34 L34 34 L34 42 Z" fill="${A}" opacity="0.4"/>`,{shapeKind:"sticky-note",defaultText:"",size:{width:120,height:120},defaultFill:r,defaultStroke:A})}const hL=[Tl("sticky.yellow","Yellow Note","#fef08a","#eab308"),Tl("sticky.green","Green Note","#bbf7d0","#22c55e"),Tl("sticky.blue","Blue Note","#bfdbfe","#3b82f6"),Tl("sticky.pink","Pink Note","#fbcfe8","#ec4899"),Tl("sticky.orange","Orange Note","#fed7aa","#f97316")];function kA(t,e,r){return Ct(t,e,"Icons",r,{size:{width:64,height:64}})}const ws="#2563eb",Uo="#16a34a",dL="#dc2626",ys="#f59e0b",cp="#7c3aed",pL=[kA("icon.user","User",`<circle cx="24" cy="17" r="8" fill="${ws}"/><path d="M8 42 a16 13 0 0 1 32 0 Z" fill="${ws}"/>`),kA("icon.mail","Mail",`<rect x="5" y="12" width="38" height="26" rx="3" fill="${ws}"/><path d="M6 14 L24 28 L42 14" fill="none" stroke="#fff" stroke-width="2.5"/>`),kA("icon.phone","Phone",`<path d="M14 6 c-6 2 -8 8 -6 16 c3 12 12 21 24 24 c8 2 14 0 16 -6 l-8 -6 c-3 3 -6 2 -9 0 c-5 -3 -9 -7 -12 -12 c-2 -3 -3 -6 0 -9 Z" fill="${Uo}"/>`),kA("icon.gear","Settings",'<circle cx="24" cy="24" r="8" fill="none" stroke="#475569" stroke-width="4"/><g fill="#475569"><rect x="21" y="2" width="6" height="9"/><rect x="21" y="37" width="6" height="9"/><rect x="2" y="21" width="9" height="6"/><rect x="37" y="21" width="9" height="6"/></g>'),kA("icon.lock","Lock",`<rect x="10" y="20" width="28" height="22" rx="3" fill="${ys}"/><path d="M15 20 v-5 a9 9 0 0 1 18 0 v5" fill="none" stroke="${ys}" stroke-width="4"/><circle cx="24" cy="30" r="3" fill="#fff"/>`),kA("icon.cloud","Cloud",`<path d="M14 36 a9 9 0 0 1 1 -18 a11 11 0 0 1 20 3 a7 7 0 0 1 -2 15 Z" fill="${ws}"/>`),kA("icon.database","Database",`<ellipse cx="24" cy="11" rx="14" ry="5" fill="${cp}"/><path d="M10 11 v26 a14 5 0 0 0 28 0 v-26" fill="${cp}"/><path d="M10 24 a14 5 0 0 0 28 0" fill="none" stroke="#fff" stroke-width="1.5"/>`),kA("icon.folder","Folder",`<path d="M4 12 h14 l4 5 h22 v25 h-40 Z" fill="${ys}"/>`),kA("icon.chart","Chart",`<rect x="8" y="26" width="7" height="16" fill="${ws}"/><rect x="20" y="16" width="7" height="26" fill="${Uo}"/><rect x="32" y="8" width="7" height="34" fill="${cp}"/>`),kA("icon.bell","Bell",`<path d="M24 6 a12 12 0 0 1 12 12 v10 l4 6 h-32 l4 -6 v-10 a12 12 0 0 1 12 -12 Z" fill="${ys}"/><circle cx="24" cy="42" r="4" fill="${ys}"/>`),kA("icon.heart","Heart",`<path d="M24 42 C6 28 6 14 16 12 c5 -1 8 3 8 5 c0 -2 3 -6 8 -5 c10 2 10 16 -8 30 Z" fill="${dL}"/>`),kA("icon.star","Star",`<path d="M24 4 L30 18 L45 19 L34 29 L37 44 L24 36 L11 44 L14 29 L3 19 L18 18 Z" fill="${ys}"/>`),kA("icon.check","Check",`<circle cx="24" cy="24" r="20" fill="${Uo}"/><path d="M14 25 L21 32 L34 17" fill="none" stroke="#fff" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>`),kA("icon.warning","Warning",`<path d="M24 4 L46 42 H2 Z" fill="${ys}"/><rect x="21" y="18" width="6" height="14" fill="#fff"/><rect x="21" y="35" width="6" height="5" fill="#fff"/>`),kA("icon.clock","Clock",`<circle cx="24" cy="24" r="20" fill="none" stroke="${ws}" stroke-width="4"/><path d="M24 12 v13 l9 5" fill="none" stroke="${ws}" stroke-width="4" stroke-linecap="round"/>`),kA("icon.globe","Globe",`<circle cx="24" cy="24" r="20" fill="none" stroke="${Uo}" stroke-width="3"/><ellipse cx="24" cy="24" rx="9" ry="20" fill="none" stroke="${Uo}" stroke-width="3"/><path d="M5 24 h38 M8 14 h32 M8 34 h32" stroke="${Uo}" stroke-width="2"/>`)];let NB=!1;const gL=["Basic","Flowchart","UML","BPMN","AWS","Azure","Kubernetes","Network","Mind Map","Org Chart","Sticky Notes","Icons"];function vL(){NB||(bm([...Zk,...tL,...AL,...nL,...iL,...aL,...lL,...cL,...uL,...fL,...hL,...pL]),NB=!0)}function OB({icons:t}){return _.jsx("div",{className:"grid grid-cols-3 gap-2",children:t.map(e=>_.jsx(Ck,{icon:e},e.id))})}function up({title:t,icons:e,defaultOpen:r=!1}){const[A,n]=ke.useState(r);return e.length===0?null:_.jsxs("section",{className:"border-b bordered",children:[_.jsxs("button",{type:"button",onClick:()=>n(i=>!i),className:"df-focus-ring flex w-full items-center gap-1 px-3 py-2 text-xs font-semibold uppercase tracking-wide",style:{color:"var(--color-text-muted)"},"aria-expanded":A,children:[A?_.jsx(Vc,{size:14}):_.jsx(qc,{size:14}),t,_.jsx("span",{className:"ml-auto font-normal",children:e.length})]}),A&&_.jsx("div",{className:"px-3 pb-3",children:_.jsx(OB,{icons:e})})]})}function mL(){const[t,e]=ke.useState(""),r=kl(s=>s.favorites),A=kl(s=>s.customIcons),n=ke.useMemo(()=>{const s=t.trim().toLowerCase();return s?Cm().filter(a=>a.label.toLowerCase().includes(s)||a.category.toLowerCase().includes(s)||(a.keywords??[]).some(o=>o.includes(s))):null},[t]),i=ke.useMemo(()=>r.map(s=>Cm().find(a=>a.id===s)).filter(s=>!!s),[r]);return _.jsxs("div",{className:"flex flex-col",children:[_.jsx("div",{className:"border-b bordered p-2",children:_.jsxs("div",{className:"relative",children:[_.jsx(Rh,{size:14,className:"pointer-events-none absolute left-2 top-1/2 -translate-y-1/2",style:{color:"var(--color-text-muted)"}}),_.jsx("input",{type:"search",value:t,onChange:s=>e(s.target.value),placeholder:"Search shapes…","aria-label":"Search shapes",className:"df-focus-ring w-full rounded-md border bordered py-1.5 pl-7 pr-2 text-sm",style:{background:"var(--color-surface-alt)"}})]})}),n?n.length>0?_.jsx("div",{className:"px-3 py-3",children:_.jsx(OB,{icons:n})}):_.jsxs("p",{className:"px-3 py-4 text-xs",style:{color:"var(--color-text-muted)"},children:["No shapes match “",t,"”."]}):_.jsxs(_.Fragment,{children:[i.length>0&&_.jsx(up,{title:"Favorites",icons:i,defaultOpen:!0}),gL.map((s,a)=>_.jsx(up,{title:s,icons:bU(s),defaultOpen:a===0},s)),_.jsx(up,{title:"Custom SVG",icons:A})]})]})}function mn({title:t,children:e,className:r="",actions:A}){return _.jsxs("section",{className:`border-b bordered ${r}`,children:[t&&_.jsxs("header",{className:"flex items-center justify-between px-3 pb-1 pt-3",children:[_.jsx("h3",{className:"text-xs font-semibold uppercase tracking-wide",style:{color:"var(--color-text-muted)"},children:t}),A]}),_.jsx("div",{className:"px-3 pb-3 pt-1",children:e})]})}function wL(){const t=Qe(u=>u.project),e=Qe(u=>u.activePageId),r=Qe(u=>u.addLayer),A=Qe(u=>u.renameLayer),n=Qe(u=>u.removeLayer),i=Qe(u=>u.setLayerVisible),s=Qe(u=>u.setLayerLocked),a=Qe(u=>u.reorderLayer),o=vs(),[l,c]=ke.useState(null),f=t.pages.find(u=>u.id===e)??t.pages[0],h=[...f.layers].sort((u,g)=>g.order-u.order);return _.jsx(mn,{title:"Layers",actions:_.jsx("button",{type:"button",title:"Add layer","aria-label":"Add layer",onClick:()=>o.run("Add layer",()=>r()),className:"df-focus-ring inline-flex h-5 w-5 items-center justify-center rounded",style:{color:"var(--color-text-muted)"},children:_.jsx(Hh,{size:14})}),children:_.jsx("ul",{className:"flex flex-col gap-0.5",children:h.map((u,g)=>_.jsxs("li",{className:"flex items-center gap-1 rounded-md px-1 py-1",style:{background:"transparent"},children:[_.jsx("button",{type:"button",title:u.visible?"Hide layer":"Show layer",onClick:()=>o.run("Toggle layer",()=>i(u.id,!u.visible)),className:"df-focus-ring inline-flex h-6 w-6 items-center justify-center rounded",style:{color:"var(--color-text-muted)"},children:u.visible?_.jsx(Wc,{size:14}):_.jsx(am,{size:14})}),_.jsx("button",{type:"button",title:u.locked?"Unlock layer":"Lock layer",onClick:()=>o.run("Toggle lock",()=>s(u.id,!u.locked)),className:"df-focus-ring inline-flex h-6 w-6 items-center justify-center rounded",style:{color:"var(--color-text-muted)"},children:u.locked?_.jsx(jI,{size:14}):_.jsx(RI,{size:14})}),l===u.id?_.jsx("input",{autoFocus:!0,defaultValue:u.name,onBlur:p=>{o.run("Rename layer",()=>A(u.id,p.target.value||u.name)),c(null)},onKeyDown:p=>{p.key==="Enter"&&p.target.blur()},className:"df-focus-ring min-w-0 flex-1 rounded border bordered px-1 text-xs surface-alt",style:{color:"var(--color-text)"}}):_.jsx("button",{type:"button",onDoubleClick:()=>c(u.id),className:"min-w-0 flex-1 truncate text-left text-xs",style:{color:"var(--color-text)"},title:"Double-click to rename",children:u.name}),_.jsx("button",{type:"button",title:"Move up",disabled:g===0,onClick:()=>o.run("Reorder layer",()=>a(u.id,"up")),className:"df-focus-ring inline-flex h-6 w-5 items-center justify-center rounded disabled:opacity-30",style:{color:"var(--color-text-muted)"},children:_.jsx(CI,{size:13})}),_.jsx("button",{type:"button",title:"Move down",disabled:g===h.length-1,onClick:()=>o.run("Reorder layer",()=>a(u.id,"down")),className:"df-focus-ring inline-flex h-6 w-5 items-center justify-center rounded disabled:opacity-30",style:{color:"var(--color-text-muted)"},children:_.jsx(Vc,{size:13})}),_.jsx("button",{type:"button",title:"Delete layer",disabled:f.layers.length<=1,onClick:()=>o.run("Delete layer",()=>n(u.id)),className:"df-focus-ring inline-flex h-6 w-5 items-center justify-center rounded disabled:opacity-30",style:{color:"var(--color-text-muted)"},children:_.jsx(cm,{size:13})})]},u.id))})})}function yL(t){const e=new Map;for(const n of Object.values(t.shapes)){const i=n.parentId,s=e.get(i)??[];s.push(n),e.set(i,s)}const r=n=>[...n].sort((i,s)=>t.order.indexOf(i.id)-t.order.indexOf(s.id)),A=n=>r(e.get(n)??[]).map(i=>({shape:i,children:i.kind==="group"?A(i.id):[]}));return A(void 0)}function BL(){const t=Qe(g=>g.project),e=Qe(g=>g.activePageId),r=Qe(g=>g.updateShape),A=_e(g=>g.selectedIds),n=_e(g=>g.select),i=_e(g=>g.setActiveGroupId),s=_e(g=>g.activeGroupId),a=vs(),[o,l]=ke.useState(()=>new Set),c=t.pages.find(g=>g.id===e)??t.pages[0],f=ke.useMemo(()=>yL(c),[c]),h=g=>{l(p=>{const w=new Set(p);return w.has(g)?w.delete(g):w.add(g),w})},u=(g,p=0)=>{const{shape:w}=g,m=w.kind==="group",B=o.has(w.id),x=A.includes(w.id),E=w.text?.trim()||(m?"Group":w.kind);return _.jsxs("li",{children:[_.jsxs("div",{className:"flex items-center gap-0.5 rounded-md py-0.5 pr-1",style:{paddingLeft:p*12,background:x?"color-mix(in srgb, var(--color-selection) 18%, transparent)":void 0},children:[m?_.jsx("button",{type:"button","aria-label":B?"Collapse group":"Expand group",onClick:()=>h(w.id),className:"inline-flex h-6 w-5 items-center justify-center rounded",style:{color:"var(--color-text-muted)"},children:B?_.jsx(Vc,{size:13}):_.jsx(qc,{size:13})}):_.jsx("span",{className:"inline-block w-5"}),_.jsx("button",{type:"button",title:w.hidden?"Show":"Hide",onClick:()=>a.run("Toggle visibility",()=>r(w.id,{hidden:!w.hidden})),className:"inline-flex h-6 w-5 items-center justify-center rounded",style:{color:"var(--color-text-muted)"},children:w.hidden?_.jsx(am,{size:13}):_.jsx(Wc,{size:13})}),_.jsxs("button",{type:"button",className:"flex min-w-0 flex-1 items-center gap-1 truncate text-left text-xs",style:{color:"var(--color-text)"},onClick:()=>{n([w.id]),m?i(w.id):s&&So(c,w.id,s)||i(null)},onDoubleClick:()=>{m&&(i(w.id),n([w.id]))},children:[m?_.jsx(NI,{size:13,style:{color:"var(--color-accent)"}}):_.jsx(lm,{size:12}),_.jsx("span",{className:"truncate",children:E})]})]}),m&&B&&g.children.length>0&&_.jsx("ul",{children:g.children.map(k=>u(k,p+1))})]},w.id)};return _.jsx(mn,{title:"Elements",children:f.length===0?_.jsx("p",{className:"text-xs",style:{color:"var(--color-text-muted)"},children:"No shapes on this page."}):_.jsx("ul",{className:"flex flex-col gap-0.5",children:f.map(g=>u(g))})})}function bL(){return _.jsxs("aside",{className:"df-scroll flex w-60 shrink-0 flex-col overflow-y-auto border-r bordered surface","aria-label":"Shape library",children:[_.jsx(mL,{}),_.jsx(BL,{}),_.jsx(wL,{})]})}const PB=200,MB=140;function DB(t,e){if(!t)return e;if(!e)return t;const r=Math.min(t.x,e.x),A=Math.min(t.y,e.y),n=Math.max(t.x+t.width,e.x+e.width),i=Math.max(t.y+t.height,e.y+e.height);return{x:r,y:A,width:n-r,height:i-A}}function CL(){const t=_e(w=>w.minimapOpen),e=_e(w=>w.camera),r=Qe(w=>w.project),A=Qe(w=>w.activePageId),n=r.pages.find(w=>w.id===A)??r.pages[0],s=(typeof document<"u"?document.querySelector('[aria-label="Diagram canvas"]'):null)?.getBoundingClientRect(),a=s?.width??800,o=s?.height??600,{shapeRects:l,viewport:c,scale:f,origin:h}=ke.useMemo(()=>{const w=Ul(n),m=[];for(const R of Object.values(n.shapes))xu(w,R)&&m.push({x:R.x,y:R.y,width:R.width,height:R.height});let B=null;for(const R of m)B=DB(B,R);const x={x:-e.x/e.zoom,y:-e.y/e.zoom,width:a/e.zoom,height:o/e.zoom},E=DB(B,x)??{x:0,y:0,width:1e3,height:700},k=Math.max(E.width,E.height)*.05+20,H={x:E.x-k,y:E.y-k,width:E.width+k*2,height:E.height+k*2},K=Math.min(PB/H.width,MB/H.height);return{shapeRects:m,viewport:x,scale:K,origin:{x:H.x,y:H.y}}},[n,e,a,o]);if(!t)return null;const u=(w,m)=>({x:(w-h.x)*f,y:(m-h.y)*f}),g=w=>{const m=w.currentTarget.getBoundingClientRect(),B=(w.clientX-m.left)/f+h.x,x=(w.clientY-m.top)/f+h.y;_e.getState().centerOn({x:B,y:x},{width:a,height:o})},p=u(c.x,c.y);return _.jsx("div",{className:"pointer-events-auto absolute bottom-3 left-3 overflow-hidden rounded-lg border bordered shadow-lg surface","aria-label":"Minimap",children:_.jsxs("svg",{width:PB,height:MB,className:"block cursor-pointer",style:{background:"var(--color-canvas)"},onMouseDown:g,children:[l.map((w,m)=>{const B=u(w.x,w.y);return _.jsx("rect",{x:B.x,y:B.y,width:Math.max(w.width*f,1),height:Math.max(w.height*f,1),fill:"var(--color-accent)",opacity:.5},m)}),_.jsx("rect",{x:p.x,y:p.y,width:c.width*f,height:c.height*f,fill:"none",stroke:"var(--color-selection)",strokeWidth:1.5})]})})}function xL(){const t=_e(o=>o.searchOpen),e=_e(o=>o.setSearchOpen),r=Qe(o=>o.activePage()),[A,n]=ke.useState(""),i=ke.useRef(null);ke.useEffect(()=>{t&&i.current?.focus()},[t]);const s=ke.useMemo(()=>{const o=A.trim().toLowerCase();if(!o)return[];const l=[];for(const c of Object.values(r.shapes))c.text&&c.text.toLowerCase().includes(o)&&l.push({id:c.id,label:c.text,center:{x:c.x+c.width/2,y:c.y+c.height/2}});for(const c of Object.values(r.edges))if(c.label&&c.label.toLowerCase().includes(o)){const f=c.source.shapeId?r.shapes[c.source.shapeId]:void 0,h=f?{x:f.x+f.width/2,y:f.y+f.height/2}:c.source.point??{x:0,y:0};l.push({id:c.id,label:c.label,center:h})}return l.slice(0,50)},[A,r]);if(!t)return null;const a=o=>{const l=document.querySelector('[aria-label="Diagram canvas"]')?.getBoundingClientRect();_e.getState().centerOn(o.center,{width:l?.width??800,height:l?.height??600}),_e.getState().select([o.id])};return _.jsxs("div",{className:"absolute right-3 top-3 z-20 w-64 rounded-lg border bordered shadow-lg surface",children:[_.jsxs("div",{className:"flex items-center gap-2 border-b bordered px-2 py-1.5",children:[_.jsx(Rh,{size:14,style:{color:"var(--color-text-muted)"}}),_.jsx("input",{ref:i,value:A,onChange:o=>n(o.target.value),onKeyDown:o=>o.key==="Escape"&&e(!1),placeholder:"Find in diagram…","aria-label":"Find in diagram",className:"df-focus-ring min-w-0 flex-1 bg-transparent text-sm outline-none"}),_.jsx("button",{type:"button","aria-label":"Close search",onClick:()=>e(!1),className:"rounded p-0.5 hover:brightness-125",style:{color:"var(--color-text-muted)"},children:_.jsx(lo,{size:14})})]}),A.trim()&&_.jsx("div",{className:"df-scroll max-h-64 overflow-y-auto py-1",children:s.length===0?_.jsx("p",{className:"px-3 py-2 text-xs",style:{color:"var(--color-text-muted)"},children:"No matches."}):s.map(o=>_.jsx("button",{type:"button",onClick:()=>a(o),className:"block w-full truncate px-3 py-1.5 text-left text-sm hover:brightness-125",style:{color:"var(--color-text)"},title:o.label,children:o.label},o.id))})]})}function mi({label:t,value:e,onChange:r,min:A,max:n,step:i=1}){const[s,a]=ke.useState(String(e));ke.useEffect(()=>a(String(e)),[e]);const o=l=>{const c=Number(l);if(!Number.isFinite(c))return;let f=c;A!==void 0&&(f=Math.max(A,f)),n!==void 0&&(f=Math.min(n,f)),r(f)};return _.jsxs("label",{className:"flex flex-col gap-1",children:[_.jsx("span",{className:"text-[10px] font-medium uppercase",style:{color:"var(--color-text-muted)"},children:t}),_.jsx("input",{type:"number",value:s,min:A,max:n,step:i,onChange:l=>{a(l.target.value),o(l.target.value)},className:"df-focus-ring w-full rounded-md border bordered px-2 py-1 text-sm tabular-nums surface-alt",style:{color:"var(--color-text)"}})]})}function Nu({label:t,value:e,onChange:r,allowNone:A=!1}){const[n,i]=ke.useState(!1),s=ke.useRef(null);ke.useEffect(()=>{if(!n)return;const o=l=>{s.current&&!s.current.contains(l.target)&&i(!1)};return window.addEventListener("mousedown",o),()=>window.removeEventListener("mousedown",o)},[n]);const a=e==="none"||e==="transparent";return _.jsxs("div",{className:"flex items-center justify-between gap-2",ref:s,children:[_.jsx("span",{className:"text-xs",style:{color:"var(--color-text-muted)"},children:t}),_.jsxs("div",{className:"relative",children:[_.jsx("button",{type:"button",onClick:()=>i(o=>!o),className:"df-focus-ring h-6 w-10 rounded border bordered",style:{background:a?"repeating-conic-gradient(#ccc 0% 25%, #fff 0% 50%) 50% / 10px 10px":e},"aria-label":`${t} color`}),n&&_.jsxs("div",{className:"absolute right-0 z-50 mt-1 w-[188px] rounded-lg border bordered p-2 shadow-xl surface",children:[_.jsx("div",{className:"grid grid-cols-8 gap-1",children:wU.map(o=>_.jsx("button",{type:"button",title:o,onClick:()=>{r(o),i(!1)},className:"h-4 w-4 rounded-sm border",style:{background:o,borderColor:"var(--color-border)"}},o))}),_.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[_.jsx("input",{type:"color",value:a?"#ffffff":e,onChange:o=>r(o.target.value),className:"h-7 w-full cursor-pointer rounded","aria-label":"Custom color"}),A&&_.jsx("button",{type:"button",onClick:()=>{r("none"),i(!1)},className:"rounded border bordered px-2 py-1 text-xs",children:"None"})]})]})]})]})}function Bs({label:t,value:e,options:r,onChange:A}){return _.jsxs("label",{className:"flex items-center justify-between gap-2",children:[_.jsx("span",{className:"text-xs",style:{color:"var(--color-text-muted)"},children:t}),_.jsx("select",{value:e,onChange:n=>A(n.target.value),className:"df-focus-ring w-32 rounded-md border bordered px-2 py-1 text-sm surface-alt",style:{color:"var(--color-text)"},children:r.map(n=>_.jsx("option",{value:n.value,children:n.label},n.value))})]})}function _o({label:t,value:e,min:r,max:A,step:n=1,onChange:i}){return _.jsxs("label",{className:"flex items-center justify-between gap-2",children:[_.jsx("span",{className:"text-xs",style:{color:"var(--color-text-muted)"},children:t}),_.jsxs("div",{className:"flex items-center gap-2",children:[_.jsx("input",{type:"range",min:r,max:A,step:n,value:e,onChange:s=>i(Number(s.target.value)),className:"w-24 accent-[var(--color-accent)]"}),_.jsx("span",{className:"w-8 text-right text-xs tabular-nums",style:{color:"var(--color-text-muted)"},children:e})]})]})}function fp({label:t,checked:e,onChange:r}){return _.jsxs("label",{className:"flex items-center justify-between gap-2",children:[_.jsx("span",{className:"text-xs",style:{color:"var(--color-text-muted)"},children:t}),_.jsx("input",{type:"checkbox",checked:e,onChange:A=>r(A.target.checked),className:"h-4 w-4 accent-[var(--color-accent)]"})]})}function Ou({label:t,value:e,onChange:r,placeholder:A}){return _.jsxs("label",{className:"flex flex-col gap-1",children:[_.jsx("span",{className:"text-xs",style:{color:"var(--color-text-muted)"},children:t}),_.jsx("textarea",{value:e,onChange:n=>r(n.target.value),placeholder:A,rows:2,className:"df-focus-ring w-full resize-none rounded-md border bordered px-2 py-1 text-sm surface-alt",style:{color:"var(--color-text)"}})]})}const EL=[{value:"solid",label:"Solid"},{value:"dashed",label:"Dashed"},{value:"dotted",label:"Dotted"}],SL=[{value:"left",label:"Left"},{value:"center",label:"Center"},{value:"right",label:"Right"}];function FL({shape:t}){const e=Qe(n=>n.updateShape),r=vs(),A=(n,i="Property change")=>{r.run(i,()=>e(t.id,n))};return _.jsxs(_.Fragment,{children:[_.jsx(mn,{title:"Position & Size",children:_.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[_.jsx(mi,{label:"X",value:Math.round(t.x),onChange:n=>A({x:n})}),_.jsx(mi,{label:"Y",value:Math.round(t.y),onChange:n=>A({y:n})}),_.jsx(mi,{label:"W",value:Math.round(t.width),min:1,onChange:n=>A({width:n})}),_.jsx(mi,{label:"H",value:Math.round(t.height),min:1,onChange:n=>A({height:n})}),_.jsx(mi,{label:"Angle",value:Math.round(t.rotation),onChange:n=>A({rotation:n})}),(t.kind==="rectangle"||t.kind==="rounded-rectangle")&&_.jsx(mi,{label:"Radius",value:Math.round(t.cornerRadius),min:0,onChange:n=>A({cornerRadius:n})})]})}),_.jsx(mn,{title:"Appearance",children:_.jsxs("div",{className:"flex flex-col gap-2",children:[_.jsx(Nu,{label:"Fill",value:t.fill.type==="none"?"none":t.fill.color,allowNone:!0,onChange:n=>A({fill:n==="none"?{...t.fill,type:"none"}:{...t.fill,type:"solid",color:n}})}),_.jsx(Nu,{label:"Stroke",value:t.stroke,onChange:n=>A({stroke:n})}),_.jsx(_o,{label:"Stroke width",value:t.strokeWidth,min:0,max:20,onChange:n=>A({strokeWidth:n})}),_.jsx(Bs,{label:"Line style",value:t.dash,options:EL,onChange:n=>A({dash:n})}),_.jsx(_o,{label:"Opacity",value:Math.round(t.opacity*100),min:0,max:100,onChange:n=>A({opacity:n/100})}),_.jsx(_o,{label:"Blur",value:t.blur,min:0,max:20,onChange:n=>A({blur:n})}),_.jsx(fp,{label:"Shadow",checked:t.shadow.enabled,onChange:n=>A({shadow:{...t.shadow,enabled:n}})})]})}),_.jsx(mn,{title:"Text",children:_.jsxs("div",{className:"flex flex-col gap-2",children:[_.jsx(Ou,{label:"Label",value:t.text,onChange:n=>A({text:n},"Edit text"),placeholder:"Type a label..."}),_.jsx(_o,{label:"Font size",value:t.typography.fontSize,min:8,max:72,onChange:n=>A({typography:{...t.typography,fontSize:n}})}),_.jsx(Nu,{label:"Text color",value:t.typography.color,onChange:n=>A({typography:{...t.typography,color:n}})}),_.jsx(Bs,{label:"Align",value:t.typography.align,options:SL,onChange:n=>A({typography:{...t.typography,align:n}})})]})}),_.jsx(mn,{title:"Link",children:_.jsx(Ou,{label:"Hyperlink (Ctrl+Click to open)",value:t.hyperlink??"",onChange:n=>A({hyperlink:n},"Edit hyperlink"),placeholder:"https://example.com"})})]})}const IL=[{value:"solid",label:"Solid"},{value:"dashed",label:"Dashed"},{value:"dotted",label:"Dotted"}];function UL({shape:t}){const e=Qe(i=>i.updateShape),r=vs(),A=(i,s="Property change")=>{r.run(s,()=>e(t.id,i))},n=i=>{A({metadata:{...t.metadata,showBorder:i},stroke:i?sB:"none",strokeWidth:i?1.5:0,dash:i?"dashed":"solid"},"Group border")};return _.jsxs(_.Fragment,{children:[_.jsx(mn,{title:"Group",children:_.jsxs("div",{className:"flex flex-col gap-2",children:[_.jsx(Ou,{label:"Name",value:t.text,onChange:i=>A({text:i},"Rename group"),placeholder:"Group name..."}),_.jsx(fp,{label:"Show border",checked:_l(t),onChange:n}),_l(t)&&_.jsx(Bs,{label:"Border style",value:t.dash,options:IL,onChange:i=>A({dash:i})})]})}),_.jsxs(mn,{title:"Bounds",children:[_.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[_.jsx(mi,{label:"X",value:Math.round(t.x),onChange:i=>A({x:i})}),_.jsx(mi,{label:"Y",value:Math.round(t.y),onChange:i=>A({y:i})}),_.jsx(mi,{label:"W",value:Math.round(t.width),min:1,onChange:i=>A({width:i})}),_.jsx(mi,{label:"H",value:Math.round(t.height),min:1,onChange:i=>A({height:i})})]}),_.jsx("p",{className:"mt-2 text-[11px]",style:{color:"var(--color-text-muted)"},children:"Double-click the group to edit shapes inside. Drag shapes onto the group to add them."})]})]})}const _L=[{value:"straight",label:"Straight"},{value:"orthogonal",label:"Orthogonal"},{value:"curved",label:"Curved"},{value:"bezier",label:"Bezier"}],HB=[{value:"none",label:"None"},{value:"triangle",label:"Triangle"},{value:"arrow",label:"Arrow"},{value:"diamond",label:"Diamond"},{value:"circle",label:"Circle"}],QL=[{value:"solid",label:"Solid"},{value:"dashed",label:"Dashed"},{value:"dotted",label:"Dotted"}];function kL({edge:t}){const e=Qe(n=>n.updateEdge),r=vs(),A=(n,i="Edge change")=>{r.run(i,()=>e(t.id,n))};return _.jsxs(_.Fragment,{children:[_.jsx(mn,{title:"Connector",children:_.jsxs("div",{className:"flex flex-col gap-2",children:[_.jsx(Bs,{label:"Router",value:t.router,options:_L,onChange:n=>A({router:n})}),_.jsx(Bs,{label:"Start arrow",value:t.startArrow,options:HB,onChange:n=>A({startArrow:n})}),_.jsx(Bs,{label:"End arrow",value:t.endArrow,options:HB,onChange:n=>A({endArrow:n})})]})}),_.jsx(mn,{title:"Style",children:_.jsxs("div",{className:"flex flex-col gap-2",children:[_.jsx(Nu,{label:"Stroke",value:t.stroke,onChange:n=>A({stroke:n})}),_.jsx(_o,{label:"Width",value:t.strokeWidth,min:1,max:16,onChange:n=>A({strokeWidth:n})}),_.jsx(Bs,{label:"Line style",value:t.dash,options:QL,onChange:n=>A({dash:n})}),_.jsx(_o,{label:"Opacity",value:Math.round(t.opacity*100),min:0,max:100,onChange:n=>A({opacity:n/100})}),_.jsx(fp,{label:"Animated",checked:t.animated,onChange:n=>A({animated:n})})]})}),_.jsx(mn,{title:"Label",children:_.jsx(Ou,{label:"Text",value:t.label,onChange:n=>A({label:n},"Edit label")})})]})}const LL=[{mode:"left",label:"Align left",icon:wI},{mode:"hcenter",label:"Align center",icon:vI},{mode:"right",label:"Align right",icon:gI},{mode:"top",label:"Align top",icon:mI},{mode:"vcenter",label:"Align middle",icon:yI},{mode:"bottom",label:"Align bottom",icon:pI}];function TL(){const t=_e(o=>o.selectedIds),e=Qe(o=>o.project),r=Qe(o=>o.activePageId),A=e.pages.find(o=>o.id===r)??e.pages[0],n=t.length===1?t[0]:void 0,i=n?A.shapes[n]:void 0,s=n?A.edges[n]:void 0,a=t.length>=2;return _.jsxs("aside",{className:"df-scroll flex w-64 shrink-0 flex-col overflow-y-auto border-l bordered surface","aria-label":"Properties",children:[i&&i.kind==="group"&&_.jsx(UL,{shape:i}),i&&i.kind!=="group"&&_.jsx(FL,{shape:i}),s&&_.jsx(kL,{edge:s}),a&&_.jsxs(mn,{title:`${t.length} selected`,children:[_.jsx("div",{className:"grid grid-cols-6 gap-1",children:LL.map(o=>_.jsx("button",{type:"button",title:o.label,"aria-label":o.label,onClick:()=>Iu(o.mode),className:"df-focus-ring flex h-8 items-center justify-center rounded-md border bordered hover:brightness-110",style:{color:"var(--color-text)"},children:_.jsx(o.icon,{size:15})},o.mode))}),_.jsxs("div",{className:"mt-2 flex gap-1",children:[_.jsx("button",{type:"button",onClick:()=>Uu("horizontal"),className:"df-focus-ring flex-1 rounded-md border bordered px-2 py-1 text-xs hover:brightness-110",style:{color:"var(--color-text)"},children:"Distribute H"}),_.jsx("button",{type:"button",onClick:()=>Uu("vertical"),className:"df-focus-ring flex-1 rounded-md border bordered px-2 py-1 text-xs hover:brightness-110",style:{color:"var(--color-text)"},children:"Distribute V"})]})]}),!i&&!s&&!a&&_.jsx(mn,{title:"Properties",children:_.jsx("p",{className:"text-xs",style:{color:"var(--color-text-muted)"},children:"Select a shape or connector to edit its properties."})})]})}function NL(){const t=Qe(h=>h.project.pages),e=Qe(h=>h.activePageId),r=Qe(h=>h.setActivePage),A=Qe(h=>h.addPage),n=Qe(h=>h.duplicatePage),i=Qe(h=>h.removePage),s=Qe(h=>h.renamePage),[a,o]=ke.useState(null),[l,c]=ke.useState(null),f=ke.useRef(null);return ke.useEffect(()=>{if(!l)return;const h=u=>{f.current&&!f.current.contains(u.target)&&c(null)};return window.addEventListener("mousedown",h),()=>window.removeEventListener("mousedown",h)},[l]),_.jsxs("div",{className:"flex items-center gap-1 border-t bordered px-2 py-1 surface",role:"tablist","aria-label":"Pages",children:[t.map(h=>_.jsxs("div",{className:"relative flex items-center",children:[a===h.id?_.jsx("input",{autoFocus:!0,defaultValue:h.name,onBlur:u=>{s(h.id,u.target.value||h.name),o(null)},onKeyDown:u=>{u.key==="Enter"&&u.target.blur()},className:"df-focus-ring w-28 rounded-md border bordered px-2 py-1 text-xs surface-alt",style:{color:"var(--color-text)"}}):_.jsxs("button",{type:"button",role:"tab","aria-selected":h.id===e,onClick:()=>r(h.id),onDoubleClick:()=>o(h.id),className:"df-focus-ring flex max-w-[160px] items-center gap-1 truncate rounded-md py-1 pl-3 pr-1 text-xs font-medium",style:{background:h.id===e?"var(--color-surface-alt)":"transparent",color:h.id===e?"var(--color-text)":"var(--color-text-muted)"},children:[_.jsx("span",{className:"truncate",children:h.name}),_.jsx("span",{role:"button",tabIndex:0,title:"Page options",onClick:u=>{u.stopPropagation(),c(g=>g===h.id?null:h.id)},className:"inline-flex h-5 w-5 items-center justify-center rounded hover:brightness-125",children:_.jsx(QI,{size:13})})]}),l===h.id&&_.jsx("div",{ref:f,role:"menu",className:"absolute bottom-full left-0 z-50 mb-1 w-40 overflow-hidden rounded-lg border bordered py-1 shadow-xl surface",children:[{label:"Rename",action:()=>o(h.id)},{label:"Duplicate",action:()=>r(n(h.id))},{label:"Delete",action:()=>i(h.id),disabled:t.length<=1}].map(u=>_.jsx("button",{type:"button",role:"menuitem",disabled:"disabled"in u?u.disabled:!1,onClick:()=>{u.action(),c(null)},className:"w-full px-3 py-1.5 text-left text-xs disabled:opacity-40 enabled:hover:brightness-110",style:{color:"var(--color-text)"},children:u.label},u.label))})]},h.id)),_.jsx("button",{type:"button",title:"Add page","aria-label":"Add page",onClick:()=>r(A()),className:"df-focus-ring inline-flex h-7 w-7 items-center justify-center rounded-md hover:brightness-110",style:{color:"var(--color-text)"},children:_.jsx(Hh,{size:16})})]})}let ya=null,hp=0;const OL=16;function dp(){const t=Qe.getState().activePage(),e=_e.getState().selectedIds,r=oB(t,e);r.shapes.length!==0&&(ya={type:"diagramforge/bundle",shapes:r.shapes,edges:r.edges},hp=0,navigator.clipboard?.writeText(JSON.stringify(ya)).catch(()=>{}))}function RB(){dp();const t=_e.getState().selectedIds;t.length!==0&&Et.getState().run("Cut",()=>{Qe.getState().removeElements(t),_e.getState().clearSelection()})}function jB(){if(!ya||ya.shapes.length===0)return;hp+=1;const t=OL*hp,e=cB({shapes:ya.shapes,edges:ya.edges},{x:t,y:t});Et.getState().run("Paste",()=>{const r=Qe.getState();r.addShapes(e.shapes),r.addEdges(e.edges),_e.getState().select(e.selectIds)})}function PL(){return!!(ya&&ya.shapes.length>0)}function ML(){const[t,e]=ke.useState(null),r=_e(o=>o.selectedIds),A=_e(o=>o.formatPainterActive);if(ke.useEffect(()=>{const o=c=>{c.target?.closest('[role="application"]')&&(c.preventDefault(),e({x:c.clientX,y:c.clientY}))},l=()=>e(null);return window.addEventListener("contextmenu",o),window.addEventListener("pointerdown",l),window.addEventListener("blur",l),()=>{window.removeEventListener("contextmenu",o),window.removeEventListener("pointerdown",l),window.removeEventListener("blur",l)}},[]),!t)return null;const n=r.length>0,i=r.length>=2,s=[{label:"Cut",shortcut:"Ctrl+X",action:RB,disabled:!n},{label:"Copy",shortcut:"Ctrl+C",action:dp,disabled:!n},{label:"Paste",shortcut:"Ctrl+V",action:jB,disabled:!PL()},{label:"Duplicate",shortcut:"Ctrl+D",action:hB,disabled:!n},{label:A?"Turn off format painter":"Copy format",action:()=>{A?$d():rB()||Xe.emit("toast",{message:"Select a shape first.",kind:"error"})},disabled:!n&&!A},{separator:!0},{label:"Group",shortcut:"Ctrl+G",action:Ap,disabled:!i},{label:"Ungroup",shortcut:"Ctrl+Shift+G",action:np,disabled:!vB()},{separator:!0},{label:"Bring to front",action:()=>_u("front"),disabled:!n},{label:"Send to back",action:()=>_u("back"),disabled:!n},{label:"Bring forward",action:()=>_u("forward"),disabled:!n},{label:"Send backward",action:()=>_u("backward"),disabled:!n},{separator:!0},{label:"Align left",action:()=>Iu("left"),disabled:!i},{label:"Align center",action:()=>Iu("hcenter"),disabled:!i},{label:"Align right",action:()=>Iu("right"),disabled:!i},{label:"Distribute horizontally",action:()=>Uu("horizontal"),disabled:r.length<3},{label:"Distribute vertically",action:()=>Uu("vertical"),disabled:r.length<3},{label:"Auto layout",action:()=>{const o=r.filter(l=>Qe.getState().activePage().shapes[l]);tB(o.length>0?o:void 0)},disabled:!n},{label:"Insert swimlane",action:()=>nB(3)},{label:"Presentation mode",action:sp},{separator:!0},{label:"Lock",action:()=>dB(!0),disabled:!n},{label:"Unlock",action:()=>dB(!1),disabled:!n},{label:"Hide",action:()=>Ak(!0),disabled:!n},{separator:!0},{label:"Select all",shortcut:"Ctrl+A",action:gB},{label:"Delete",shortcut:"Del",action:fB,disabled:!n}],a=FA.menuItems();if(a.length>0){s.push({separator:!0});for(const o of a)s.push({label:o.title,action:()=>FA.runCommand(o.command),disabled:o.requiresSelection?!n:!1})}return _.jsx("div",{role:"menu",className:"fixed z-[60] min-w-[220px] overflow-hidden rounded-lg border bordered py-1 shadow-2xl surface",style:{left:Math.min(t.x,window.innerWidth-240),top:Math.min(t.y,window.innerHeight-420)},onPointerDown:o=>o.stopPropagation(),children:s.map((o,l)=>"separator"in o?_.jsx("div",{className:"my-1 h-px",style:{background:"var(--color-border)"}},`sep${l}`):_.jsxs("button",{role:"menuitem",type:"button",disabled:o.disabled,onClick:()=>{o.action(),e(null)},className:"flex w-full items-center justify-between gap-6 px-3 py-1.5 text-left text-sm disabled:opacity-40 enabled:hover:brightness-110",style:{color:"var(--color-text)"},children:[_.jsx("span",{children:o.label}),o.shortcut&&_.jsx("span",{className:"text-xs",style:{color:"var(--color-text-muted)"},children:o.shortcut})]},o.label))})}function DL(){const t=_e(E=>E.editingTextId),e=_e(E=>E.setEditingText),r=_e(E=>E.camera),A=Qe(E=>E.project),n=Qe(E=>E.activePageId),i=Qe(E=>E.updateShape),s=Qe(E=>E.updateEdge),a=vs(),o=ke.useRef(null),l=A.pages.find(E=>E.id===n)??A.pages[0],c=t?l.shapes[t]:void 0,f=t?l.edges[t]:void 0,[h,u]=ke.useState("");if(ke.useEffect(()=>{c?u(c.text):f&&u(f.label),t&&requestAnimationFrame(()=>o.current?.focus())},[t,c,f]),!t||!c&&!f)return null;const g=()=>{c?a.run("Edit text",()=>i(c.id,{text:h})):f&&a.run("Edit label",()=>s(f.id,{label:h})),e(null)},p=()=>e(null);let w,m,B,x;if(c){const E=Vh({x:c.x,y:c.y},r);w=E.x,m=E.y,B=c.width*r.zoom,x=c.height*r.zoom}else{const E=f.source.point??{x:0,y:0},k=Vh(E,r);w=k.x-60,m=k.y-14,B=120,x=28}return _.jsx("textarea",{ref:o,value:h,onChange:E=>u(E.target.value),onBlur:g,onKeyDown:E=>{E.key==="Escape"?(E.preventDefault(),p()):E.key==="Enter"&&!E.shiftKey&&(E.preventDefault(),g())},className:"absolute z-40 resize-none rounded border bordered p-1 text-center",style:{left:w,top:m,width:Math.max(B,40),height:Math.max(x,24),background:"var(--color-surface)",color:"var(--color-text)",outline:"2px solid var(--color-accent)",fontSize:(c?.typography.fontSize??14)*r.zoom},"aria-label":"Edit label"})}const HL=["start","end","process","decision","data","actor","note"];function RL(t){if(typeof t!="object"||t===null)throw new Error("Diagram spec must be an object");const e=t,A=(Array.isArray(e.nodes)?e.nodes:[]).slice(0,200).map(a=>{if(typeof a!="object"||a===null)return null;const o=a;if(typeof o.id!="string"||!o.id)return null;const l=HL.includes(o.kind)?o.kind:"process";return{id:o.id.slice(0,64),label:typeof o.label=="string"?o.label.slice(0,200):"",kind:l}}).filter(a=>a!==null),n=new Set(A.map(a=>a.id)),s=(Array.isArray(e.edges)?e.edges:[]).slice(0,400).map(a=>{if(typeof a!="object"||a===null)return null;const o=a;return typeof o.from!="string"||typeof o.to!="string"||!n.has(o.from)||!n.has(o.to)?null:{from:o.from,to:o.to,...typeof o.label=="string"?{label:o.label.slice(0,120)}:{}}}).filter(a=>a!==null);if(A.length===0)throw new Error("Diagram spec has no valid nodes");return{...typeof e.title=="string"?{title:e.title.slice(0,120)}:{},direction:e.direction==="LR"?"LR":"TB",nodes:A,edges:s}}function jL(t){const e=t.trim();if(!e)return[];const r=e.split(/\n|->|=>|;|\bthen\b|→/i).map(i=>i.trim()).filter(Boolean);if(r.length>1)return r;const A=e.split(/(?:^|\s)(?:\d+[.)]|[-*•])\s+/).map(i=>i.trim()).filter(Boolean);if(A.length>1)return A;const n=e.split(new RegExp("(?<=[.!?])\\s+")).map(i=>i.replace(/[.!?]+$/,"").trim()).filter(Boolean);return n.length>0?n:[e]}function KL(t,e,r){const A=t.toLowerCase();return/\?$|^(if|whether|decide|check|is |are |should)/.test(A)?"decision":/(store|save|database|record|data|file)/.test(A)?"data":/(user|customer|actor|person|admin)/.test(A)?"actor":e===0?"start":e===r-1?"end":"process"}function zL(t,e=30){const r=jL(t).slice(0,Math.max(1,e)),A=r.map((i,s)=>({id:`n${s+1}`,label:i.replace(/\s+/g," ").slice(0,80),kind:KL(i,s,r.length)})),n=[];for(let i=0;i<A.length-1;i++){const s=A[i],a=A[i+1];n.push({from:s.id,to:a.id,...s.kind==="decision"?{label:"yes"}:{}})}return{title:t.replace(/\s+/g," ").slice(0,60),direction:"TB",nodes:A,edges:n}}const pp={ai:!0,presentation:!0,sourceEditor:!0,minimap:!0,welcome:!1,persistence:!1},GL={ai:!0,presentation:!0,sourceEditor:!0,minimap:!0,welcome:!0,persistence:!0};let Qo={features:{...pp}};function VL(){return Qo}function Ba(t){return Qo.features[t]??!0}function qL(t){const e=t.standalone?GL:pp;Qo={apiBaseUrl:t.apiBaseUrl??Qo.apiBaseUrl,onChange:t.onChange??Qo.onChange,features:{...e,...t.features}}}function WL(){Qo={features:{...pp}}}function KB(){const t=VL().apiBaseUrl;if(typeof t=="string"&&t.trim())return t.replace(/\/$/,"")}function $L(){return KB()!==void 0}async function YL(t,e=30){const r=KB();if(r)try{const A=new AbortController,n=setTimeout(()=>A.abort(),2e4),i=await fetch(`${r}/api/ai/generate`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({prompt:t,maxNodes:e}),signal:A.signal});if(clearTimeout(n),i.ok){const s=await i.json();return{spec:RL(s.spec),source:s.source==="provider"?"provider":"heuristic"}}}catch{}return{spec:zL(t,e),source:"offline"}}const XL={start:{kind:"rounded-rectangle",width:150,height:60,colorIndex:2},end:{kind:"rounded-rectangle",width:150,height:60,colorIndex:6},process:{kind:"rectangle",width:170,height:68,colorIndex:0},decision:{kind:"diamond",width:160,height:100,colorIndex:3},data:{kind:"cylinder",width:140,height:96,colorIndex:1},actor:{kind:"actor",width:80,height:120,colorIndex:4},note:{kind:"sticky-note",width:150,height:100,colorIndex:5}},zB=80,GB=80;function JL(t){const e=new Map;for(const A of t.nodes)e.set(A.id,0);const r=t.nodes.length+1;for(let A=0;A<r;A++){let n=!1;for(const i of t.edges){const s=e.get(i.from)??0;(e.get(i.to)??0)<s+1&&(e.set(i.to,s+1),n=!0)}if(!n)break}return e}function ZL(t,e){const n=Qe.getState().activePage().layers[0].id,i=JL(t),s=new Map;for(const g of t.nodes){const p=i.get(g.id)??0,w=s.get(p)??[];w.push(g.id),s.set(p,w)}const a=t.direction==="LR",o=190,l=150,c=new Map,f=[];for(const g of t.nodes){const p=XL[g.kind],w=i.get(g.id)??0,B=s.get(w).indexOf(g.id),x=w*(a?o+zB:l+GB),E=B*(a?l+GB:o+zB),k=e.x+(a?x:E)+o/2,H=e.y+(a?E:x)+l/2,K=vr({kind:p.kind,x:k-p.width/2,y:H-p.height/2,width:p.width,height:p.height,text:g.label},n,p.colorIndex);f.push(K),c.set(g.id,K)}const h=t.edges.map(g=>{const p=c.get(g.from),w=c.get(g.to);return!p||!w?null:Xr({source:{shapeId:p.id},target:{shapeId:w.id},router:"orthogonal",endArrow:"triangle",label:g.label??""},n)}).filter(g=>g!==null),u=[...f.map(g=>g.id),...h.map(g=>g.id)];return Et.getState().run("Generate diagram",()=>{const g=Qe.getState();g.addShapes(f);for(const p of h)g.addEdge(p);_e.getState().select(f.map(p=>p.id))}),u}function VB(t){return t.trim().toLowerCase().replace(/\s+/g," ")}function ko(t,e){const r=VB(e),A=Object.values(t.shapes).filter(s=>!s.hidden&&s.text?.trim());let n,i=0;for(const s of A){const a=VB(s.text);if(a===r)return s;if(a.includes(r)||r.includes(a)){const o=Math.min(a.length,r.length);o>i&&(i=o,n=s)}}return n}function eT(t,e){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function gp(t){return Fl(t)}function qB(t,e,r){return Object.values(t.edges).find(A=>A.source.shapeId===e&&A.target.shapeId===r)}function tT(t){const e=t.trim();if(!e)return"Enter an edit instruction.";const r=e.match(/(?:add|insert)\s+(.+?)\s+between\s+(.+?)\s+and\s+(.+)$/i);if(r){const[,s,a,o]=r;return rT(s,a,o)}const A=e.match(/(?:add|insert)\s+(.+?)\s+after\s+(.+)$/i);if(A){const[,s,a]=A;return AT(s,a)}const n=e.match(/connect\s+(.+?)\s+to\s+(.+)$/i);if(n){const[,s,a]=n;return nT(s,a)}const i=e.match(/(?:remove|delete)\s+(.+)$/i);return i?iT(i[1]):'Try: "Add cache between API and DB", "Connect A to B", or "Delete old step".'}function rT(t,e,r){const A=Qe.getState().activePage(),n=ko(A,e),i=ko(A,r);if(!n)return`Could not find a shape matching "${e}".`;if(!i)return`Could not find a shape matching "${r}".`;const s=A.layers[0].id,a=eT(gp(n),gp(i)),o=vr({kind:"rounded-rectangle",x:a.x-80,y:a.y-28,width:160,height:56,text:t.trim()},s,Object.keys(A.shapes).length),l=qB(A,n.id,i.id),c=[Xr({source:{shapeId:n.id},target:{shapeId:o.id},router:"orthogonal",endArrow:"triangle"},s),Xr({source:{shapeId:o.id},target:{shapeId:i.id},router:"orthogonal",endArrow:"triangle"},s)];return Et.getState().run("AI edit",()=>{const f=Qe.getState();l&&f.removeElements([l.id]),f.addShape(o);for(const h of c)f.addEdge(h);_e.getState().select([o.id])}),null}function AT(t,e){const r=Qe.getState().activePage(),A=ko(r,e);if(!A)return`Could not find a shape matching "${e}".`;const n=r.layers[0].id,i=gp(A),s=vr({kind:"rectangle",x:i.x-80,y:i.y+A.height/2+60,width:160,height:56,text:t.trim()},n,Object.keys(r.shapes).length),a=Xr({source:{shapeId:A.id},target:{shapeId:s.id},router:"orthogonal",endArrow:"triangle"},n);return Et.getState().run("AI edit",()=>{const o=Qe.getState();o.addShape(s),o.addEdge(a),_e.getState().select([s.id])}),null}function nT(t,e){const r=Qe.getState().activePage(),A=ko(r,t),n=ko(r,e);if(!A)return`Could not find a shape matching "${t}".`;if(!n)return`Could not find a shape matching "${e}".`;if(qB(r,A.id,n.id))return"Those shapes are already connected.";const i=Xr({source:{shapeId:A.id},target:{shapeId:n.id},router:"orthogonal",endArrow:"triangle"},r.layers[0].id);return Et.getState().run("AI edit",()=>{Qe.getState().addEdge(i),_e.getState().select([i.id])}),null}function iT(t){const e=Qe.getState().activePage(),r=ko(e,t);return r?(Et.getState().run("AI edit",()=>{Qe.getState().removeElements([r.id]),_e.getState().clearSelection()}),null):`Could not find a shape matching "${t}".`}const aT=["User signs up -> Verify email -> Set password -> Log in","Order received; Check stock; Is item available?; Ship order; Notify customer","Idea, Research, Prototype, Test, Launch"],sT=["Add cache between API and DB","Add logging after gateway","Connect frontend to API","Delete old step"];function oT(){const t=_e.getState().camera,e=document.querySelector('[aria-label="Diagram canvas"]')?.getBoundingClientRect(),r=as({x:(e?.width??800)/2,y:(e?.height??600)/2},t);return{x:r.x-95,y:r.y-200}}function lT(){const[t,e]=ke.useState(!1),[r,A]=ke.useState("generate"),[n,i]=ke.useState(""),[s,a]=ke.useState(!1),o=ke.useRef(null);if(ke.useEffect(()=>Xe.on("ai:open",()=>e(!0)),[]),ke.useEffect(()=>{t&&o.current?.focus()},[t,r]),!t)return null;const l=()=>{s||e(!1)},c=async()=>{const p=n.trim();if(!(!p||s)){a(!0);try{const{spec:w,source:m}=await YL(p);ZL(w,oT()),Xe.emit("zoom:fit",void 0),Xe.emit("toast",{message:m==="provider"?`Generated ${w.nodes.length} nodes with AI.`:`Generated ${w.nodes.length} nodes (offline).`,kind:"success"}),e(!1),i("")}catch(w){Xe.emit("toast",{message:w instanceof Error?w.message:"Generation failed.",kind:"error"})}finally{a(!1)}}},f=()=>{const p=n.trim();if(!(!p||s)){a(!0);try{const w=tT(p);if(w){Xe.emit("toast",{message:w,kind:"error"});return}Xe.emit("toast",{message:"Diagram updated.",kind:"success"}),e(!1),i("")}finally{a(!1)}}},h=r==="generate"?aT:sT,u=r==="generate"?"Generate diagram":"Edit diagram",g=r==="generate"?"Describe a process or flow. Separate steps with commas, new lines, or arrows (->).":'Describe a change, e.g. "Add cache between API and DB" or "Connect A to B".';return _.jsx("div",{className:"fixed inset-0 z-40 flex items-start justify-center bg-black/40 pt-24",role:"dialog","aria-modal":"true","aria-label":u,onMouseDown:l,children:_.jsxs("div",{className:"w-[min(560px,92vw)] rounded-xl border bordered shadow-2xl surface",onMouseDown:p=>p.stopPropagation(),children:[_.jsxs("div",{className:"flex items-center gap-2 border-b bordered px-4 py-3",children:[r==="generate"?_.jsx(jh,{size:18,style:{color:"var(--color-accent, #7c3aed)"}}):_.jsx(Dh,{size:18,style:{color:"var(--color-accent, #7c3aed)"}}),_.jsx("h2",{className:"flex-1 text-sm font-semibold",style:{color:"var(--color-text)"},children:u}),_.jsx("button",{type:"button","aria-label":"Close",onClick:l,className:"rounded p-1 hover:brightness-125",style:{color:"var(--color-text-muted)"},children:_.jsx(lo,{size:16})})]}),_.jsxs("div",{className:"flex gap-1 border-b bordered px-4 pt-2",role:"tablist",children:[_.jsx("button",{type:"button",role:"tab","aria-selected":r==="generate",onClick:()=>A("generate"),className:`rounded-t-md px-3 py-1.5 text-xs font-medium ${r==="generate"?"border bordered border-b-0 bg-[var(--color-surface)]":"text-[var(--color-text-muted)]"}`,children:"Generate mode"}),_.jsx("button",{type:"button",role:"tab","aria-selected":r==="edit",onClick:()=>A("edit"),className:`rounded-t-md px-3 py-1.5 text-xs font-medium ${r==="edit"?"border bordered border-b-0 bg-[var(--color-surface)]":"text-[var(--color-text-muted)]"}`,children:"Edit mode"})]}),_.jsxs("div",{className:"px-4 py-3",children:[_.jsx("textarea",{ref:o,value:n,onChange:p=>i(p.target.value),onKeyDown:p=>{p.key==="Escape"&&l(),(p.metaKey||p.ctrlKey)&&p.key==="Enter"&&(r==="generate"?c():f())},rows:4,placeholder:g,"aria-label":r==="generate"?"Diagram description":"Edit instruction",className:"df-focus-ring w-full resize-none rounded-lg border bordered bg-transparent px-3 py-2 text-sm outline-none",style:{color:"var(--color-text)"}}),_.jsx("div",{className:"mt-2 flex flex-wrap gap-1.5",children:h.map(p=>_.jsx("button",{type:"button",onClick:()=>i(p),className:"max-w-full truncate rounded-full border bordered px-2.5 py-1 text-[11px] hover:brightness-125",style:{color:"var(--color-text-muted)"},title:p,children:p},p))})]}),_.jsxs("div",{className:"flex items-center justify-between gap-2 border-t bordered px-4 py-3",children:[_.jsx("span",{className:"text-[11px]",style:{color:"var(--color-text-muted)"},children:r==="generate"?$L()?"Using backend AI service":"Offline generator":"Offline edit heuristics"}),_.jsxs("div",{className:"flex items-center gap-2",children:[_.jsx("button",{type:"button",onClick:l,disabled:s,className:"rounded-lg border bordered px-3 py-1.5 text-sm hover:brightness-125 disabled:opacity-50",style:{color:"var(--color-text)"},children:"Cancel"}),_.jsx("button",{type:"button",onClick:()=>r==="generate"?void c():f(),disabled:s||!n.trim(),className:"rounded-lg px-3 py-1.5 text-sm font-medium text-white disabled:opacity-50",style:{background:"var(--color-accent, #7c3aed)"},children:s?r==="generate"?"Generating…":"Applying…":r==="generate"?"Generate":"Apply edit"})]})]})]})})}const cT={info:HI,success:xI,error:EI},uT={info:"var(--color-accent)",success:"#22c55e",error:"#ef4444"};function fT(){const[t,e]=ke.useState([]);return ke.useEffect(()=>{let r=0;return Xe.on("toast",({message:A,kind:n})=>{const i=++r;e(s=>[...s,{id:i,message:A,kind:n}]),setTimeout(()=>e(s=>s.filter(a=>a.id!==i)),4e3)})},[]),_.jsx("div",{className:"pointer-events-none fixed bottom-16 right-4 z-[100] flex flex-col gap-2",children:t.map(r=>{const A=cT[r.kind];return _.jsxs("div",{role:"status",className:"pointer-events-auto flex items-center gap-2 rounded-lg border bordered px-3 py-2 text-sm shadow-lg surface",children:[_.jsx(A,{size:16,style:{color:uT[r.kind]}}),_.jsx("span",{style:{color:"var(--color-text)"},children:r.message})]},r.id)})})}const vp=(t,e)=>e.some(r=>t instanceof r);let WB,$B;function hT(){return WB||(WB=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function dT(){return $B||($B=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const mp=new WeakMap,wp=new WeakMap,Pu=new WeakMap;function pT(t){const e=new Promise((r,A)=>{const n=()=>{t.removeEventListener("success",i),t.removeEventListener("error",s)},i=()=>{r(bs(t.result)),n()},s=()=>{A(t.error),n()};t.addEventListener("success",i),t.addEventListener("error",s)});return Pu.set(e,t),e}function gT(t){if(mp.has(t))return;const e=new Promise((r,A)=>{const n=()=>{t.removeEventListener("complete",i),t.removeEventListener("error",s),t.removeEventListener("abort",s)},i=()=>{r(),n()},s=()=>{A(t.error||new DOMException("AbortError","AbortError")),n()};t.addEventListener("complete",i),t.addEventListener("error",s),t.addEventListener("abort",s)});mp.set(t,e)}let yp={get(t,e,r){if(t instanceof IDBTransaction){if(e==="done")return mp.get(t);if(e==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return bs(t[e])},set(t,e,r){return t[e]=r,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function YB(t){yp=t(yp)}function vT(t){return dT().includes(t)?function(...e){return t.apply(Bp(this),e),bs(this.request)}:function(...e){return bs(t.apply(Bp(this),e))}}function mT(t){return typeof t=="function"?vT(t):(t instanceof IDBTransaction&&gT(t),vp(t,hT())?new Proxy(t,yp):t)}function bs(t){if(t instanceof IDBRequest)return pT(t);if(wp.has(t))return wp.get(t);const e=mT(t);return e!==t&&(wp.set(t,e),Pu.set(e,t)),e}const Bp=t=>Pu.get(t);function wT(t,e,{blocked:r,upgrade:A,blocking:n,terminated:i}={}){const s=indexedDB.open(t,e),a=bs(s);return A&&s.addEventListener("upgradeneeded",o=>{A(bs(s.result),o.oldVersion,o.newVersion,bs(s.transaction),o)}),r&&s.addEventListener("blocked",o=>r(o.oldVersion,o.newVersion,o)),a.then(o=>{i&&o.addEventListener("close",()=>i()),n&&o.addEventListener("versionchange",l=>n(l.oldVersion,l.newVersion,l))}).catch(()=>{}),a}const yT=["get","getKey","getAll","getAllKeys","count"],BT=["put","add","delete","clear"],bp=new Map;function XB(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(bp.get(e))return bp.get(e);const r=e.replace(/FromIndex$/,""),A=e!==r,n=BT.includes(r);if(!(r in(A?IDBIndex:IDBObjectStore).prototype)||!(n||yT.includes(r)))return;const i=async function(s,...a){const o=this.transaction(s,n?"readwrite":"readonly");let l=o.store;return A&&(l=l.index(a.shift())),(await Promise.all([l[r](...a),n&&o.done]))[0]};return bp.set(e,i),i}YB(t=>({...t,get:(e,r,A)=>XB(e,r)||t.get(e,r,A),has:(e,r)=>!!XB(e,r)||t.has(e,r)}));const bT=["continue","continuePrimaryKey","advance"],JB={},Cp=new WeakMap,ZB=new WeakMap,CT={get(t,e){if(!bT.includes(e))return t[e];let r=JB[e];return r||(r=JB[e]=function(...A){Cp.set(this,ZB.get(this)[e](...A))}),r}};async function*xT(...t){let e=this;if(e instanceof IDBCursor||(e=await e.openCursor(...t)),!e)return;e=e;const r=new Proxy(e,CT);for(ZB.set(r,e),Pu.set(r,Bp(e));e;)yield r,e=await(Cp.get(r)||e.continue()),Cp.delete(r)}function eb(t,e){return e===Symbol.asyncIterator&&vp(t,[IDBIndex,IDBObjectStore,IDBCursor])||e==="iterate"&&vp(t,[IDBIndex,IDBObjectStore])}YB(t=>({...t,get(e,r,A){return eb(e,r)?xT:t.get(e,r,A)},has(e,r){return eb(e,r)||t.has(e,r)}}));const ET="diagramforge",ST=1,Nl="projects",xp="meta",tb="lastProjectId";let Ep=null;function Sp(){return Ep||(Ep=wT(ET,ST,{upgrade(t){t.createObjectStore(Nl,{keyPath:"id"}).createIndex("by-updated","updatedAt"),t.createObjectStore(xp)}})),Ep}async function FT(t){const e=await Sp();await e.put(Nl,t),await e.put(xp,t.id,tb)}async function IT(){const t=await Sp(),e=await t.get(xp,tb);if(e){const A=await t.get(Nl,e);if(A)return A}const r=await t.getAllFromIndex(Nl,"by-updated");return r[r.length-1]}async function UT(){return(await(await Sp()).getAllFromIndex(Nl,"by-updated")).reverse()}const rb="diagramforge.welcomeShown";function _T(){const t=_e(l=>l.welcomeOpen),e=_e(l=>l.setWelcomeOpen),r=_e(l=>l.setTemplatesOpen),[A,n]=ke.useState([]);if(ke.useEffect(()=>{t&&UT().then(l=>n(l.slice(0,5)))},[t]),!t)return null;const i=()=>{sessionStorage.setItem(rb,"1"),e(!1)},s=l=>{Qe.getState().replaceProject(l),Et.getState().clear(),i(),Xe.emit("zoom:fit",void 0),Xe.emit("toast",{message:`Opened “${l.name}”.`,kind:"success"})},a=()=>{Qe.getState().replaceProject(Gn()),Et.getState().clear(),i()},o=()=>{i(),r(!0)};return _.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",role:"dialog","aria-modal":"true","aria-label":"Welcome to DiagramForge",children:_.jsxs("div",{className:"w-[min(480px,96vw)] rounded-xl border bordered shadow-2xl surface",children:[_.jsxs("div",{className:"border-b bordered px-5 py-4",children:[_.jsxs("div",{className:"flex items-center gap-2",children:[_.jsx(Kh,{size:22,style:{color:"var(--color-accent)"}}),_.jsx("h1",{className:"text-lg font-bold",style:{color:"var(--color-text)"},children:"Welcome to DiagramForge"})]}),_.jsx("p",{className:"mt-1 text-sm",style:{color:"var(--color-text-muted)"},children:"Offline diagram editor — pick a template, open a recent file, or start blank."})]}),_.jsxs("div",{className:"space-y-2 p-4",children:[_.jsxs("button",{type:"button",onClick:o,className:"df-focus-ring flex w-full items-center gap-3 rounded-lg border bordered px-3 py-2.5 text-left hover:brightness-110",children:[_.jsx($c,{size:18,style:{color:"var(--color-accent)"}}),_.jsxs("span",{children:[_.jsx("span",{className:"block text-sm font-medium",children:"Browse templates"}),_.jsx("span",{className:"text-xs",style:{color:"var(--color-text-muted)"},children:"Flowchart, AWS, org chart, retro board"})]})]}),_.jsxs("button",{type:"button",onClick:()=>{i(),Xe.emit("ai:open",void 0)},className:"df-focus-ring flex w-full items-center gap-3 rounded-lg border bordered px-3 py-2.5 text-left hover:brightness-110",children:[_.jsx(jh,{size:18,style:{color:"#a855f7"}}),_.jsxs("span",{children:[_.jsx("span",{className:"block text-sm font-medium",children:"Generate with AI"}),_.jsx("span",{className:"text-xs",style:{color:"var(--color-text-muted)"},children:"Describe a flow in plain language"})]})]}),_.jsxs("button",{type:"button",onClick:a,className:"df-focus-ring flex w-full items-center gap-3 rounded-lg border bordered px-3 py-2.5 text-left hover:brightness-110",children:[_.jsx(Kh,{size:18}),_.jsx("span",{className:"text-sm font-medium",children:"Blank diagram"})]}),A.length>0&&_.jsxs("div",{className:"pt-2",children:[_.jsxs("div",{className:"mb-1.5 flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wide",style:{color:"var(--color-text-muted)"},children:[_.jsx(FI,{size:12})," Recent (autosaved)"]}),_.jsx("ul",{className:"space-y-1",children:A.map(l=>_.jsx("li",{children:_.jsxs("button",{type:"button",onClick:()=>s(l),className:"w-full truncate rounded px-2 py-1.5 text-left text-sm hover:brightness-110",style:{color:"var(--color-text)"},children:[l.name,_.jsx("span",{className:"ml-2 text-[10px]",style:{color:"var(--color-text-muted)"},children:new Date(l.updatedAt).toLocaleString()})]})},l.id))})]})]}),_.jsx("div",{className:"border-t bordered px-4 py-3 text-right",children:_.jsx("button",{type:"button",onClick:i,className:"rounded-lg px-3 py-1.5 text-sm font-medium text-white",style:{background:"var(--color-accent)"},children:"Continue editing"})})]})})}function QT(){const t=_e(e=>e.setWelcomeOpen);ke.useEffect(()=>{if(!Ba("welcome")||sessionStorage.getItem(rb)||window.location.hash.startsWith("#d=")||window.location.hash.startsWith("#dv="))return;const e=setTimeout(()=>t(!0),400);return()=>clearTimeout(e)},[t])}function kT(){const t=Gn("Flowchart starter"),e=t.pages[0],r=e.layers[0].id,A=["Start","Process step","Decision?","End"],n=["rounded-rectangle","rectangle","diamond","rounded-rectangle"],i=A.map((a,o)=>vr({kind:n[o],x:80+o*220,y:120,width:160,height:o===2?100:64,text:a},r,o));e.shapes=Object.fromEntries(i.map(a=>[a.id,a])),e.order=i.map(a=>a.id);const s=[Xr({source:{shapeId:i[0].id},target:{shapeId:i[1].id},router:"orthogonal",endArrow:"triangle"},r),Xr({source:{shapeId:i[1].id},target:{shapeId:i[2].id},router:"orthogonal",endArrow:"triangle"},r),Xr({source:{shapeId:i[2].id},target:{shapeId:i[3].id},router:"orthogonal",endArrow:"triangle",label:"yes"},r)];return e.edges=Object.fromEntries(s.map(a=>[a.id,a])),e.order.push(...s.map(a=>a.id)),t}function LT(){const t=Gn("AWS 3-tier architecture"),e=t.pages[0],r=e.layers[0].id,n=[{text:"Users",kind:"actor",x:80,y:80,w:80,h:120},{text:"CloudFront",kind:"rounded-rectangle",x:220,y:100,w:140,h:64},{text:"ALB",kind:"rounded-rectangle",x:420,y:100,w:120,h:64},{text:"EC2 / ECS",kind:"rectangle",x:600,y:80,w:150,h:90},{text:"RDS",kind:"cylinder",x:620,y:240,w:120,h:90}].map((a,o)=>vr({kind:a.kind,x:a.x,y:a.y,width:a.w,height:a.h,text:a.text},r,o));e.shapes=Object.fromEntries(n.map(a=>[a.id,a])),e.order=n.map(a=>a.id);const i=n.slice(0,4),s=i.slice(0,-1).map((a,o)=>Xr({source:{shapeId:a.id},target:{shapeId:i[o+1].id},router:"orthogonal",endArrow:"triangle"},r));return s.push(Xr({source:{shapeId:n[3].id},target:{shapeId:n[4].id},router:"orthogonal",endArrow:"triangle"},r)),e.edges=Object.fromEntries(s.map(a=>[a.id,a])),e.order.push(...s.map(a=>a.id)),t}function TT(){const t=Gn("Org chart"),e=t.pages[0],r=e.layers[0].id,A=vr({kind:"rectangle",x:340,y:60,width:160,height:56,text:"CEO"},r,0),n=vr({kind:"rectangle",x:140,y:180,width:160,height:56,text:"Engineering"},r,1),i=vr({kind:"rectangle",x:540,y:180,width:160,height:56,text:"Product"},r,2),s=vr({kind:"rectangle",x:80,y:300,width:140,height:48,text:"Developer"},r,3),a=vr({kind:"rectangle",x:560,y:300,width:140,height:48,text:"Designer"},r,4),o=[A,n,i,s,a];e.shapes=Object.fromEntries(o.map(c=>[c.id,c])),e.order=o.map(c=>c.id);const l=[Xr({source:{shapeId:A.id},target:{shapeId:n.id},router:"orthogonal",endArrow:"triangle"},r),Xr({source:{shapeId:A.id},target:{shapeId:i.id},router:"orthogonal",endArrow:"triangle"},r),Xr({source:{shapeId:n.id},target:{shapeId:s.id},router:"orthogonal",endArrow:"triangle"},r),Xr({source:{shapeId:i.id},target:{shapeId:a.id},router:"orthogonal",endArrow:"triangle"},r)];return e.edges=Object.fromEntries(l.map(c=>[c.id,c])),e.order.push(...l.map(c=>c.id)),t}function NT(){const t=Gn("Sprint retro board"),e=t.pages[0],r=e.layers[0].id,n=[{text:"Went well",x:80,fill:"#dcfce7",stroke:"#16a34a"},{text:"To improve",x:320,fill:"#fef9c3",stroke:"#ca8a04"},{text:"Action items",x:560,fill:"#dbeafe",stroke:"#2563eb"}].map((i,s)=>vr({kind:"sticky-note",x:i.x,y:100,width:180,height:140,text:i.text,fill:{type:"solid",color:i.fill},stroke:i.stroke},r,s));return e.shapes=Object.fromEntries(n.map(i=>[i.id,i])),e.order=n.map(i=>i.id),t}const Mu=[{id:"flowchart",title:"Flowchart",description:"Start → process → decision → end with connectors.",category:"Flowchart",accent:"#6366f1",build:kT},{id:"aws-3tier",title:"AWS 3-tier",description:"Users, CDN, load balancer, compute, and database.",category:"Architecture",accent:"#ff9900",build:LT},{id:"org-chart",title:"Org chart",description:"CEO, managers, and team members with hierarchy.",category:"Org",accent:"#0ea5e9",build:TT},{id:"retro",title:"Sprint retro",description:"Three-column sticky-note whiteboard.",category:"Whiteboard",accent:"#eab308",build:NT}];function OT(t){return Mu.find(r=>r.id===t)?.build()}function PT(){const t=_e(l=>l.templatesOpen),e=_e(l=>l.setTemplatesOpen),[r,A]=ke.useState(()=>Yy());if(!t)return null;const n=()=>A(Yy()),i=l=>{const c=Mu.find(h=>h.id===l);if(!c)return;const f=c.build();Qe.getState().replaceProject(f),Et.getState().clear(),e(!1),Xe.emit("zoom:fit",void 0),Xe.emit("toast",{message:`Loaded “${c.title}” template.`,kind:"success"})},s=l=>{const c=H6(l);Qe.getState().replaceProject(c),Et.getState().clear(),e(!1),Xe.emit("zoom:fit",void 0),Xe.emit("toast",{message:`Loaded “${l.title}”.`,kind:"success"})},a=()=>{const l=Qe.getState().activePage(),c=window.prompt("Template name",l.name);if(!c?.trim())return;const f=window.prompt("Description (optional)",`Saved from ${l.name}`)??"";Xy(c.trim(),f),n(),Xe.emit("toast",{message:`Saved “${c.trim()}” to My templates.`,kind:"success"})},o=(l,c)=>{window.confirm(`Delete template “${c}”?`)&&(D6(l),n(),Xe.emit("toast",{message:"Template deleted.",kind:"success"}))};return _.jsx("div",{className:"fixed inset-0 z-50 flex items-start justify-center bg-black/40 pt-16 p-4",role:"dialog","aria-modal":"true","aria-label":"Diagram templates",onMouseDown:()=>e(!1),children:_.jsxs("div",{className:"max-h-[85vh] w-[min(640px,96vw)] overflow-y-auto rounded-xl border bordered shadow-2xl surface",onMouseDown:l=>l.stopPropagation(),children:[_.jsxs("div",{className:"sticky top-0 z-10 flex items-center gap-2 border-b bordered bg-[var(--color-surface)] px-4 py-3",children:[_.jsx($c,{size:18,style:{color:"var(--color-accent)"}}),_.jsx("h2",{className:"flex-1 text-sm font-semibold",children:"Start from a template"}),_.jsxs("button",{type:"button",onClick:a,className:"flex items-center gap-1 rounded-lg border bordered px-2 py-1 text-xs hover:brightness-110",style:{color:"var(--color-text)"},children:[_.jsx(nm,{size:14}),"Save current page"]}),_.jsx("button",{type:"button","aria-label":"Close",onClick:()=>e(!1),className:"rounded p-1 hover:brightness-125",children:_.jsx(lo,{size:16})})]}),r.length>0&&_.jsxs("section",{className:"border-b bordered p-4",children:[_.jsx("h3",{className:"mb-2 text-xs font-semibold uppercase tracking-wide",style:{color:"var(--color-text-muted)"},children:"My templates"}),_.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:r.map(l=>_.jsxs("div",{className:"relative rounded-lg border bordered p-3",children:[_.jsxs("button",{type:"button",onClick:()=>s(l),className:"df-focus-ring w-full text-left transition hover:brightness-110",children:[_.jsx("div",{className:"mb-2 h-1.5 w-12 rounded-full",style:{background:l.accent}}),_.jsx("div",{className:"text-sm font-semibold",style:{color:"var(--color-text)"},children:l.title}),_.jsx("div",{className:"mt-0.5 text-xs",style:{color:"var(--color-text-muted)"},children:l.description})]}),_.jsx("button",{type:"button","aria-label":`Delete ${l.title}`,onClick:()=>o(l.id,l.title),className:"absolute right-2 top-2 rounded p-1 hover:bg-red-500/10",style:{color:"var(--color-text-muted)"},children:_.jsx(cm,{size:14})})]},l.id))})]}),_.jsx("div",{className:"grid grid-cols-1 gap-3 p-4 sm:grid-cols-2",children:Mu.map(l=>_.jsxs("button",{type:"button",onClick:()=>i(l.id),className:"df-focus-ring rounded-lg border bordered p-3 text-left transition hover:brightness-110",children:[_.jsx("div",{className:"mb-2 h-1.5 w-12 rounded-full",style:{background:l.accent}}),_.jsx("div",{className:"text-sm font-semibold",style:{color:"var(--color-text)"},children:l.title}),_.jsx("div",{className:"mt-0.5 text-xs",style:{color:"var(--color-text-muted)"},children:l.description}),_.jsx("span",{className:"mt-2 inline-block text-[10px] uppercase tracking-wide",style:{color:"var(--color-text-muted)"},children:l.category})]},l.id))})]})})}const MT=[{title:"Tools",items:[{keys:"V",action:"Select"},{keys:"H",action:"Pan (hand)"},{keys:"R",action:"Rectangle"},{keys:"O",action:"Ellipse"},{keys:"D",action:"Diamond"},{keys:"T",action:"Text"},{keys:"C",action:"Connect shapes"},{keys:"N",action:"Sticky note"},{keys:"P",action:"Pen"},{keys:"E",action:"Eraser"}]},{title:"Editing",items:[{keys:"Mod+Z",action:"Undo"},{keys:"Mod+Shift+Z",action:"Redo"},{keys:"Mod+A",action:"Select all"},{keys:"Mod+C / X / V",action:"Copy / cut / paste"},{keys:"Mod+D",action:"Duplicate"},{keys:"Mod+G",action:"Group"},{keys:"Mod+Shift+G",action:"Ungroup"},{keys:"Delete",action:"Delete selection"},{keys:"Arrow keys",action:"Nudge (Shift = 10px)"}]},{title:"View & file",items:[{keys:"Mod+F",action:"Find in diagram"},{keys:"Mod+S",action:"Save as JSON"},{keys:"Mod+P",action:"Export PDF"},{keys:"Shift+1",action:"Fit to screen"},{keys:"?",action:"This help panel"},{keys:"F5",action:"Presentation mode"},{keys:"Mod+Shift+J",action:"JSON / YAML / Mermaid source (full)"},{keys:"Mod+Shift+K",action:"Split view (canvas + source)"},{keys:"Ctrl+Click shape",action:"Open hyperlink"},{keys:"Escape",action:"Clear selection / close panels"}]},{title:"Connectors",items:[{keys:"Select shape",action:"Purple dots appear — drag to connect"},{keys:"C",action:"Connect tool — dots on all shapes"},{keys:"Drag dot → shape",action:"Create connector"}]}];function DT(){const t=_e(r=>r.shortcutsOpen),e=_e(r=>r.setShortcutsOpen);return t?_.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40 p-4",role:"dialog","aria-modal":"true","aria-label":"Keyboard shortcuts",onMouseDown:()=>e(!1),children:_.jsxs("div",{className:"max-h-[85vh] w-[min(520px,96vw)] overflow-hidden rounded-xl border bordered shadow-2xl surface",onMouseDown:r=>r.stopPropagation(),children:[_.jsxs("div",{className:"flex items-center gap-2 border-b bordered px-4 py-3",children:[_.jsx(sm,{size:18,style:{color:"var(--color-accent)"}}),_.jsx("h2",{className:"flex-1 text-sm font-semibold",children:"Keyboard shortcuts"}),_.jsx("button",{type:"button",onClick:()=>e(!1),className:"rounded px-2 py-1 text-xs hover:brightness-125",style:{color:"var(--color-text-muted)"},children:"Close"})]}),_.jsx("div",{className:"df-scroll max-h-[70vh] overflow-y-auto px-4 py-3",children:MT.map(r=>_.jsxs("div",{className:"mb-4 last:mb-0",children:[_.jsx("h3",{className:"mb-2 text-xs font-semibold uppercase tracking-wide",style:{color:"var(--color-text-muted)"},children:r.title}),_.jsx("dl",{className:"space-y-1.5",children:r.items.map(A=>_.jsxs("div",{className:"flex items-start justify-between gap-3 text-sm",children:[_.jsx("dt",{children:_.jsx("kbd",{className:"rounded border bordered px-1.5 py-0.5 font-mono text-[11px]",children:A.keys})}),_.jsx("dd",{className:"text-right",style:{color:"var(--color-text)"},children:A.action})]},A.keys+A.action))})]},r.title))})]})}):null}var Rt=Symbol("NOT_RESOLVED"),Fp=Symbol("MERGE_KEY");function LA(t,e){return{tagName:t,nodeKind:"scalar",implicit:e.implicit??!1,matchByTagPrefix:e.matchByTagPrefix??!1,implicitFirstChars:e.implicitFirstChars??null,resolve:e.resolve,identify:e.identify??null,represent:e.represent??(r=>String(r)),representTagName:e.representTagName??null}}function Ip(t,e){const r=e.finalize===void 0;return{tagName:t,nodeKind:"sequence",implicit:!1,matchByTagPrefix:e.matchByTagPrefix??!1,create:e.create,addItem:e.addItem,finalize:e.finalize??(A=>A),carrierIsResult:r,identify:e.identify??null,represent:e.represent??(A=>A),representTagName:e.representTagName??null}}function Du(t,e){const r=e.finalize===void 0;return{tagName:t,nodeKind:"mapping",implicit:!1,matchByTagPrefix:e.matchByTagPrefix??!1,create:e.create,addPair:e.addPair,has:e.has,keys:e.keys,get:e.get,finalize:e.finalize??(A=>A),carrierIsResult:r,identify:e.identify??null,represent:e.represent??(A=>A),representTagName:e.representTagName??null}}var HT=LA("tag:yaml.org,2002:str",{resolve:t=>t,identify:t=>typeof t=="string"}),RT=["","~","null","Null","NULL"],jT=LA("tag:yaml.org,2002:null",{implicit:!0,implicitFirstChars:["","~","n","N"],resolve:t=>RT.indexOf(t)!==-1?null:Rt,identify:t=>t===null,represent:()=>"null"}),KT=LA("tag:yaml.org,2002:null",{implicit:!0,implicitFirstChars:["n"],resolve:(t,e)=>t==="null"||e&&t===""?null:Rt,identify:t=>t===null,represent:()=>"null"}),zT=["","~","null","Null","NULL"],GT=LA("tag:yaml.org,2002:null",{implicit:!0,implicitFirstChars:["","~","n","N"],resolve:t=>zT.indexOf(t)!==-1?null:Rt,identify:t=>t===null,represent:()=>"null"}),VT=["true","True","TRUE"],qT=["false","False","FALSE"],WT=LA("tag:yaml.org,2002:bool",{implicit:!0,implicitFirstChars:["t","T","f","F"],resolve:t=>VT.indexOf(t)!==-1?!0:qT.indexOf(t)!==-1?!1:Rt,identify:t=>Object.prototype.toString.call(t)==="[object Boolean]",represent:t=>t?"true":"false"}),$T=["true"],YT=["false"],XT=LA("tag:yaml.org,2002:bool",{implicit:!0,implicitFirstChars:["t","f"],resolve:t=>$T.indexOf(t)!==-1?!0:YT.indexOf(t)!==-1?!1:Rt,identify:t=>Object.prototype.toString.call(t)==="[object Boolean]",represent:t=>t?"true":"false"}),JT=["true","True","TRUE","y","Y","yes","Yes","YES","on","On","ON"],ZT=["false","False","FALSE","n","N","no","No","NO","off","Off","OFF"],eN=LA("tag:yaml.org,2002:bool",{implicit:!0,implicitFirstChars:["y","Y","n","N","t","T","f","F","o","O"],resolve:t=>JT.indexOf(t)!==-1?!0:ZT.indexOf(t)!==-1?!1:Rt,identify:t=>Object.prototype.toString.call(t)==="[object Boolean]",represent:t=>t?"true":"false"}),tN=new RegExp("^(?:0o[0-7]+|0x[0-9a-fA-F]+|[-+]?[0-9]+)$"),rN=new RegExp("^(?:[-+]?0b[0-1]+|[-+]?0o[0-7]+|[-+]?0x[0-9a-fA-F]+|[-+]?[0-9]+)$");function AN(t){let e=t,r=1;return(e[0]==="-"||e[0]==="+")&&(e[0]==="-"&&(r=-1),e=e.slice(1)),e.startsWith("0b")?r*parseInt(e.slice(2),2):e.startsWith("0o")?r*parseInt(e.slice(2),8):e.startsWith("0x")?r*parseInt(e.slice(2),16):r*parseInt(e,10)}function nN(t,e){if(e){if(!rN.test(t))return Rt}else if(!tN.test(t))return Rt;const r=AN(t);return Number.isFinite(r)?r:Rt}var Ab=LA("tag:yaml.org,2002:int",{implicit:!0,implicitFirstChars:["-","+",..."0123456789"],resolve:nN,identify:t=>Number.isInteger(t)&&!Object.is(t,-0)&&t.toString(10).indexOf("e")<0,represent:t=>t.toString(10)}),iN=new RegExp("^-?(?:0|[1-9][0-9]*)$"),aN=new RegExp("^(?:[-+]?0b[0-1]+|[-+]?0o[0-7]+|[-+]?0x[0-9a-fA-F]+|[-+]?[0-9]+)$");function sN(t){let e=t,r=1;return(e[0]==="-"||e[0]==="+")&&(e[0]==="-"&&(r=-1),e=e.slice(1)),e.startsWith("0b")?r*parseInt(e.slice(2),2):e.startsWith("0o")?r*parseInt(e.slice(2),8):e.startsWith("0x")?r*parseInt(e.slice(2),16):r*parseInt(e,10)}function oN(t,e){if(e){if(!aN.test(t))return Rt}else if(!iN.test(t))return Rt;const r=sN(t);return Number.isFinite(r)?r:Rt}var lN=LA("tag:yaml.org,2002:int",{implicit:!0,implicitFirstChars:["-",..."0123456789"],resolve:oN,identify:t=>Number.isInteger(t)&&!Object.is(t,-0)&&t.toString(10).indexOf("e")<0,represent:t=>t.toString(10)}),cN=new RegExp("^(?:[-+]?0b[0-1_]+|[-+]?0[0-7_]+|[-+]?0x[0-9a-fA-F_]+|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+|[-+]?(?:0|[1-9][0-9_]*))$");function uN(t){let e=t.replace(/_/g,""),r=1;if((e[0]==="-"||e[0]==="+")&&(e[0]==="-"&&(r=-1),e=e.slice(1)),e.startsWith("0b"))return r*parseInt(e.slice(2),2);if(e.startsWith("0x"))return r*parseInt(e.slice(2),16);if(e.includes(":")){let A=0;for(const n of e.split(":"))A=A*60+Number(n);return r*A}return e!=="0"&&e[0]==="0"?r*parseInt(e,8):r*parseInt(e,10)}function fN(t){if(!cN.test(t))return Rt;const e=uN(t);return Number.isFinite(e)?e:Rt}var Up=LA("tag:yaml.org,2002:int",{implicit:!0,implicitFirstChars:["-","+",..."0123456789"],resolve:fN,identify:t=>Number.isInteger(t)&&!Object.is(t,-0)&&t.toString(10).indexOf("e")<0,represent:t=>t.toString(10)}),hN=new RegExp("^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),dN=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function pN(t){if(!hN.test(t))return Rt;let e=t.toLowerCase();const r=e[0]==="-"?-1:1;if("+-".includes(e[0])&&(e=e.slice(1)),e===".inf")return r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;if(e===".nan")return NaN;const A=r*parseFloat(e);return Number.isFinite(A)||dN.test(t)?A:Rt}function gN(t){if(isNaN(t))return".nan";if(t===Number.POSITIVE_INFINITY)return".inf";if(t===Number.NEGATIVE_INFINITY)return"-.inf";if(Object.is(t,-0))return"-0.0";const e=t.toString(10);return/^[-+]?[0-9]+e/.test(e)?e.replace("e",".e"):e}var nb=LA("tag:yaml.org,2002:float",{implicit:!0,implicitFirstChars:["-","+",".",..."0123456789"],resolve:pN,identify:t=>typeof t=="number"&&(!Number.isInteger(t)||Object.is(t,-0)||t.toString(10).indexOf("e")>=0),represent:gN}),vN=new RegExp("^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$"),mN=new RegExp("^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function wN(t,e){if(e){if(!mN.test(t))return Rt;let A=t.toLowerCase();const n=A[0]==="-"?-1:1;if("+-".includes(A[0])&&(A=A.slice(1)),A===".inf")return n===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;if(A===".nan")return NaN;const i=n*parseFloat(A);return Number.isFinite(i)?i:Rt}if(!vN.test(t))return Rt;const r=Number(t);return Number.isFinite(r)?r:Rt}function yN(t){if(isNaN(t))return".nan";if(t===Number.POSITIVE_INFINITY)return".inf";if(t===Number.NEGATIVE_INFINITY)return"-.inf";if(Object.is(t,-0))return"-0.0";const e=t.toString(10);return/^[-+]?[0-9]+e/.test(e)?e.replace("e",".e"):e}var BN=LA("tag:yaml.org,2002:float",{implicit:!0,implicitFirstChars:["-",..."0123456789"],resolve:wN,identify:t=>typeof t=="number"&&(!Number.isInteger(t)||Object.is(t,-0)||t.toString(10).indexOf("e")>=0),represent:yN}),bN=new RegExp("^(?:[-+]?(?:(?:[0-9][0-9_]*)?\\.[0-9_]*)(?:[eE][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),CN=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function xN(t){if(!bN.test(t))return Rt;let e=t.toLowerCase().replace(/_/g,"");const r=e[0]==="-"?-1:1;if("+-".includes(e[0])&&(e=e.slice(1)),e===".inf")return r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;if(e===".nan")return NaN;let A=0;if(e.includes(":")){for(const n of e.split(":"))A=A*60+Number(n);A*=r}else A=r*parseFloat(e);return Number.isFinite(A)||CN.test(t)?A:Rt}function EN(t){if(isNaN(t))return".nan";if(t===Number.POSITIVE_INFINITY)return".inf";if(t===Number.NEGATIVE_INFINITY)return"-.inf";if(Object.is(t,-0))return"-0.0";const e=t.toString(10);return/^[-+]?[0-9]+e/.test(e)?e.replace("e",".e"):e}var _p=LA("tag:yaml.org,2002:float",{implicit:!0,implicitFirstChars:["-","+",".",..."0123456789"],resolve:xN,identify:t=>typeof t=="number"&&(!Number.isInteger(t)||Object.is(t,-0)||t.toString(10).indexOf("e")>=0),represent:EN}),SN=LA("tag:yaml.org,2002:merge",{implicit:!0,implicitFirstChars:["<"],resolve:(t,e)=>t==="<<"||e&&t===""?Fp:Rt}),FN=/^[A-Za-z0-9+/]*={0,2}$/;function IN(t){const e=t.replace(/\s/g,"");if(e.length%4!==0||!FN.test(e))return Rt;const r=atob(e),A=new Uint8Array(r.length);for(let n=0;n<r.length;n++)A[n]=r.charCodeAt(n);return A}function UN(t){let e="";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return btoa(e)}var _N=LA("tag:yaml.org,2002:binary",{resolve:IN,identify:t=>Object.prototype.toString.call(t)==="[object Uint8Array]",represent:UN}),QN=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),kN=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function LN(t){let e=QN.exec(t);if(e===null&&(e=kN.exec(t)),e===null)return Rt;const r=+e[1],A=+e[2]-1,n=+e[3];if(!e[4]){const c=new Date(Date.UTC(r,A,n));return c.getUTCFullYear()!==r||c.getUTCMonth()!==A||c.getUTCDate()!==n?Rt:c}const i=+e[4],s=+e[5],a=+e[6];let o=0;if(i>23||s>59||a>59)return Rt;if(e[7]){let c=e[7].slice(0,3);for(;c.length<3;)c+="0";o=+c}const l=new Date(Date.UTC(r,A,n,i,s,a,o));if(l.getUTCFullYear()!==r||l.getUTCMonth()!==A||l.getUTCDate()!==n)return Rt;if(e[9]){const c=+e[10],f=+(e[11]||0);if(c>23||f>59)return Rt;const h=(c*60+f)*6e4;l.setTime(l.getTime()-(e[9]==="-"?-h:h))}return l}var TN=LA("tag:yaml.org,2002:timestamp",{implicit:!0,implicitFirstChars:[..."0123456789"],resolve:LN,identify:t=>t instanceof Date,represent:t=>t.toISOString()}),NN=Ip("tag:yaml.org,2002:seq",{create:()=>[],addItem:(t,e)=>{t.push(e)},identify:Array.isArray});function Hu(t){if(t===null||typeof t!="object"||Array.isArray(t))return!1;const e=Object.getPrototypeOf(t);return e===null||e===Object.prototype}function Qp(t,e){const r={};for(const A of e)t[A]!==void 0&&(r[A]=t[A]);return r}var ON=Ip("tag:yaml.org,2002:omap",{create:()=>({list:[],seen:new Set}),addItem:(t,e)=>{let r;if(e instanceof Map){if(e.size!==1)return"cannot resolve an ordered map item";r=e.keys().next().value}else if(Hu(e)){const A=Object.keys(e);if(A.length!==1)return"cannot resolve an ordered map item";r=A[0]}else return"cannot resolve an ordered map item";return t.seen.has(r)?"duplicate key in ordered map":(t.seen.add(r),t.list.push(e),"")},finalize:t=>t.list}),PN=Ip("tag:yaml.org,2002:pairs",{create:()=>[],addItem:(t,e)=>{if(e instanceof Map)return e.size!==1?"cannot resolve a pairs item":(t.push(e.entries().next().value),"");if(Object.prototype.toString.call(e)!=="[object Object]")return"cannot resolve a pairs item";const r=e,A=Object.keys(r);return A.length!==1?"cannot resolve a pairs item":(t.push([A[0],r[A[0]]]),"")}}),MN=Du("tag:yaml.org,2002:map",{create:()=>({}),identify:Hu,represent:t=>{const e=new Map;for(const r of Object.keys(t))e.set(r,t[r]);return e},addPair:(t,e,r)=>{if(e!==null&&typeof e=="object")return"object-based map does not support complex keys";const A=String(e);return A==="__proto__"?Object.defineProperty(t,A,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[A]=r,""},has:(t,e)=>e!==null&&typeof e=="object"?!1:Object.prototype.hasOwnProperty.call(t,String(e)),keys:t=>Object.keys(t),get:(t,e)=>t[String(e)]}),DN=Du("tag:yaml.org,2002:set",{create:()=>new Set,identify:t=>t instanceof Set,represent:t=>{const e=new Map;for(const r of t)e.set(r,null);return e},addPair:(t,e,r)=>r!==null?"cannot resolve a set item":(t.add(e),""),has:(t,e)=>t.has(e),keys:t=>t.keys(),get:()=>null});function HN(){return{scalar:{},sequence:{},mapping:{}}}function RN(){return{scalar:[],sequence:[],mapping:[]}}function jN(t){const e=[];for(const r of t){let A=e.length;for(let n=0;n<e.length;n++){const i=e[n];if(i.nodeKind===r.nodeKind&&i.tagName===r.tagName&&i.matchByTagPrefix===r.matchByTagPrefix){A=n;break}}e[A]=r}return e}var Ru=class uI{tags;implicitScalarTags;implicitScalarByFirstChar;implicitScalarAnyFirstChar;defaultScalarTag;defaultSequenceTag;defaultMappingTag;exact;prefix;constructor(e){const r=jN(e),A=[],n=HN(),i=RN();for(const c of r){if(c.nodeKind==="scalar"&&c.implicit){if(c.matchByTagPrefix)throw new Error("Implicit scalar tags cannot match by tag prefix");A.push(c)}switch(c.nodeKind){case"scalar":c.matchByTagPrefix?i.scalar.push(c):n.scalar[c.tagName]=c;break;case"sequence":c.matchByTagPrefix?i.sequence.push(c):n.sequence[c.tagName]=c;break;case"mapping":c.matchByTagPrefix?i.mapping.push(c):n.mapping[c.tagName]=c;break}}const s=A.filter(c=>c.implicitFirstChars===null),a=new Set;for(const c of A)if(c.implicitFirstChars!==null)for(const f of c.implicitFirstChars)a.add(f);const o=new Map;for(const c of a)o.set(c,A.filter(f=>f.implicitFirstChars===null||f.implicitFirstChars.indexOf(c)!==-1));const l=n.scalar["tag:yaml.org,2002:str"];if(!l)throw new Error("schema does not define the default scalar tag (tag:yaml.org,2002:str)");this.tags=r,this.implicitScalarTags=A,this.implicitScalarByFirstChar=o,this.implicitScalarAnyFirstChar=s,this.defaultScalarTag=l,this.defaultSequenceTag=n.sequence["tag:yaml.org,2002:seq"],this.defaultMappingTag=n.mapping["tag:yaml.org,2002:map"],this.exact=n,this.prefix=i}withTags(...e){let r=[];for(const A of e)r=r.concat(A);return new uI([...this.tags,...r])}},kp=new Ru([HT,NN,MN]);new Ru([...kp.tags,KT,XT,lN,BN]);var KN=new Ru([...kp.tags,jT,WT,Ab,nb]),zN=new Ru([...kp.tags,GT,eN,Up,_p,TN,SN,_N,ON,PN,DN]);Du("tag:yaml.org,2002:map",{create:()=>new Map,addPair:(t,e,r)=>(t.set(e,r),""),has:(t,e)=>t.has(e),keys:t=>t.keys(),get:(t,e)=>t.get(e),identify:t=>t instanceof Map||Hu(t),represent:t=>{if(t instanceof Map)return t;const e=new Map,r=t;for(const A of Object.keys(r))e.set(A,r[A]);return e}});function ib(t){if(Array.isArray(t)){const e=Array.prototype.slice.call(t);for(let r=0;r<e.length;r++){if(Array.isArray(e[r]))return null;typeof e[r]=="object"&&Object.prototype.toString.call(e[r])==="[object Object]"&&(e[r]="[object Object]")}return String(e)}return typeof t=="object"&&Object.prototype.toString.call(t)==="[object Object]"?"[object Object]":String(t)}Du("tag:yaml.org,2002:map",{create:()=>({}),identify:Hu,represent:t=>{const e=new Map;for(const r of Object.keys(t))e.set(r,t[r]);return e},addPair:(t,e,r)=>{const A=ib(e);return A===null?"nested arrays are not supported inside keys":(A==="__proto__"?Object.defineProperty(t,A,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[A]=r,"")},has:(t,e)=>{const r=ib(e);return r!==null&&Object.prototype.hasOwnProperty.call(t,r)},keys:t=>Object.keys(t),get:(t,e)=>t[String(e)]});var GN={maxLength:79,indent:1,linesBefore:3,linesAfter:2};function Lp(t,e,r,A,n){let i="",s="";const a=Math.floor(n/2)-1;return A-e>a&&(i=" ... ",e=A-a+i.length),r-A>a&&(s=" ...",r=A+a-s.length),{str:i+t.slice(e,r).replace(/\t/g,"→")+s,pos:A-e+i.length}}function Tp(t,e){return" ".repeat(Math.max(e-t.length,0))+t}function VN(t,e){if(!t.buffer)return null;const r={...GN,...e},A=/\r?\n|\r|\0/g,n=[0],i=[];let s,a=-1;for(;s=A.exec(t.buffer);)i.push(s.index),n.push(s.index+s[0].length),t.position<=s.index&&a<0&&(a=n.length-2);a<0&&(a=n.length-1);let o="";const l=Math.min(t.line+r.linesAfter,i.length).toString().length,c=r.maxLength-(r.indent+l+3);for(let h=1;h<=r.linesBefore&&!(a-h<0);h++){const u=Lp(t.buffer,n[a-h],i[a-h],t.position-(n[a]-n[a-h]),c);o=`${" ".repeat(r.indent)}${Tp((t.line-h+1).toString(),l)} | ${u.str}
|
|
82
|
+
${o}`}const f=Lp(t.buffer,n[a],i[a],t.position,c);o+=`${" ".repeat(r.indent)}${Tp((t.line+1).toString(),l)} | ${f.str}
|
|
83
|
+
`,o+=`${"-".repeat(r.indent+l+3+f.pos)}^
|
|
84
|
+
`;for(let h=1;h<=r.linesAfter&&!(a+h>=i.length);h++){const u=Lp(t.buffer,n[a+h],i[a+h],t.position-(n[a]-n[a+h]),c);o+=`${" ".repeat(r.indent)}${Tp((t.line+h+1).toString(),l)} | ${u.str}
|
|
85
|
+
`}return o.replace(/\n$/,"")}function ab(t,e){let r="";return t.mark?(t.mark.name&&(r+=`in "${t.mark.name}" `),r+=`(${t.mark.line+1}:${t.mark.column+1})`,!e&&t.mark.snippet&&(r+=`
|
|
86
|
+
|
|
87
|
+
${t.mark.snippet}`),`${t.reason} ${r}`):t.reason}var Ol=class extends Error{reason;mark;constructor(t,e){super(),this.name="YAMLException",this.reason=t,this.mark=e,this.message=ab(this,!1),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}toString(t){return`${this.name}: ${ab(this,t)}`}};function ju(t,e,r,A=""){let n=0,i=0;for(let a=0;a<e;a++){const o=t.charCodeAt(a);o===10?(n++,i=a+1):o===13&&(n++,t.charCodeAt(a+1)===10&&a++,i=a+1)}const s={name:A,buffer:t,position:e,line:n,column:e-i};throw s.snippet=VN(s),new Ol(r,s)}var qN=-1;function sb(t){switch(t){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return`
|
|
88
|
+
`;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"
";case 95:return" ";case 76:return"\u2028";case 80:return"\u2029";default:return""}}var ob=new Array(256),lb=new Array(256);for(let t=0;t<256;t++)ob[t]=sb(t)?1:0,lb[t]=sb(t);function WN(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}function $N(t){return t>=48&&t<=57?t-48:(t|32)-97+10}function YN(t){return t===120?2:t===117?4:8}function Ku(t,e,r){let A=0;for(;e<r;){const n=t.charCodeAt(e);if(n===10)A++,e++;else if(n===13)A++,e++,t.charCodeAt(e)===10&&e++;else if(n===32||n===9)e++;else break}return{position:e,breaks:A}}function Np(t){return t===1?" ":`
|
|
89
|
+
`.repeat(t-1)}function XN(t,e,r){let A="",n=e,i=e,s=e;for(;n<r;){const a=t.charCodeAt(n);if(a===10||a===13){A+=t.slice(i,s);const o=Ku(t,n,r);A+=Np(o.breaks),n=i=s=o.position}else n++,a!==32&&a!==9&&(s=n)}return A+t.slice(i,s)}function JN(t,e,r){let A="",n=e,i=e,s=e;for(;n<r;){const a=t.charCodeAt(n);if(a===39)A+=t.slice(i,n)+"'",n+=2,i=s=n;else if(a===10||a===13){A+=t.slice(i,s);const o=Ku(t,n,r);A+=Np(o.breaks),n=i=s=o.position}else n++,a!==32&&a!==9&&(s=n)}return A+t.slice(i,r)}function ZN(t,e,r){let A="",n=e,i=e,s=e;for(;n<r;){const a=t.charCodeAt(n);if(a===92){A+=t.slice(i,n),n++;const o=t.charCodeAt(n);if(o===10||o===13)n=Ku(t,n,r).position;else if(o<256&&ob[o])A+=lb[o],n++;else{let l=YN(o),c=0;for(;l>0;l--){n++;const f=$N(t.charCodeAt(n));c=(c<<4)+f}A+=WN(c),n++}i=s=n}else if(a===10||a===13){A+=t.slice(i,s);const o=Ku(t,n,r);A+=Np(o.breaks),n=i=s=o.position}else n++,a!==32&&a!==9&&(s=n)}return A+t.slice(i,r)}function cb(t,e,r,A,n,i){const s=A<0?0:A,a=t.slice(e,r).replace(/\r\n?/g,`
|
|
90
|
+
`),o=a===""?[]:(a.endsWith(`
|
|
91
|
+
`)?a.slice(0,-1):a).split(`
|
|
92
|
+
`);let l="",c=!1,f=0,h=!1;for(const u of o){let g=0;for(;g<s&&u.charCodeAt(g)===32;)g++;if(A<0||g>=u.length){f++;continue}const p=u.slice(s),w=p.charCodeAt(0);i?w===32||w===9?(h=!0,l+=`
|
|
93
|
+
`.repeat(c?1+f:f)):h?(h=!1,l+=`
|
|
94
|
+
`.repeat(f+1)):f===0?c&&(l+=" "):l+=`
|
|
95
|
+
`.repeat(f):l+=`
|
|
96
|
+
`.repeat(c?1+f:f),l+=p,c=!0,f=0}return n===3?l+=`
|
|
97
|
+
`.repeat(c?1+f:f):n!==2&&c&&(l+=`
|
|
98
|
+
`),l}function e8(t,e){if(e.valueStart===qN)return"";const{valueStart:r,valueEnd:A}=e;if(e.fast)return t.slice(r,A);switch(e.style){case 2:return JN(t,r,A);case 3:return ZN(t,r,A);case 4:return cb(t,r,A,e.indent,e.chomping,!1);case 5:return cb(t,r,A,e.indent,e.chomping,!0);default:return XN(t,r,A)}}var t8={"!":"!","!!":"tag:yaml.org,2002:"};function Op(t){return encodeURI(t).replace(/!/g,"%21")}function ub(t,e){if(t.startsWith("!<")&&t.endsWith(">"))return decodeURIComponent(t.slice(2,-1));const r=t.indexOf("!",1),A=r===-1?"!":t.slice(0,r+1),n=e?.[A]??t8[A]??A;return decodeURIComponent(n)+decodeURIComponent(t.slice(A.length))}function fb(t){let e=t;return e.charCodeAt(0)===33?(e=e.slice(1),`!${Op(e)}`):e.slice(0,18)==="tag:yaml.org,2002:"?`!!${Op(e.slice(18))}`:`!<${Op(e)}>`}var Lo=-1,Pp={filename:"",schema:KN,json:!1,maxTotalMergeKeys:1e4,maxAliases:-1};function r8(t){return"tagStart"in t&&t.tagStart!==Lo?t.tagStart:"anchorStart"in t&&t.anchorStart!==Lo?t.anchorStart:"valueStart"in t&&t.valueStart!==Lo?t.valueStart:"start"in t?t.start:0}function nn(t,e){ju(t.source,t.position,e,t.filename)}function hb(t,e,r,A){try{return r.finalize(A)}catch(n){if(n instanceof Ol)throw n;ju(t.source,e,n instanceof Error?n.message:String(n),t.filename)}}function zu(t,e,r){const A=t[r];if(A)return A;for(const n of e)if(r.startsWith(n.tagName))return n}function A8(t,e,r,A,n){const i=zu(e,r,A);if(i)return i;nn(t,`unknown ${n} tag !<${A}>`)}function n8(t,e){const r=e8(t.source,e),A=e.tagStart===Lo?"":t.source.slice(e.tagStart,e.tagEnd),n=t.schema.defaultScalarTag;if(A!==""){if(A==="!")return{value:r,tag:n};const i=ub(A,t.tagHandlers),s=zu(t.schema.exact.scalar,t.schema.prefix.scalar,i);if(s){const o=s.resolve(r,!0,i);return o===Rt&&nn(t,`cannot resolve a node with !<${i}> explicit tag`),{value:o,tag:s}}const a=zu(t.schema.exact.mapping,t.schema.prefix.mapping,i)??zu(t.schema.exact.sequence,t.schema.prefix.sequence,i);if(a){r!==""&&nn(t,`cannot resolve a node with !<${i}> explicit tag`);const o=a.create(i);return{value:a.carrierIsResult?o:hb(t,t.position,a,o),tag:a}}nn(t,`unknown scalar tag !<${i}>`)}if(e.style===1){const i=t.schema.implicitScalarByFirstChar.get(r.charAt(0))??t.schema.implicitScalarAnyFirstChar;for(const s of i){const a=s.resolve(r,!1,s.tagName);if(a!==Rt)return{value:a,tag:s}}}return{value:n.resolve(r,!1,n.tagName),tag:n}}function db(t,e,r,A,n,i){const s=e.tagStart===Lo?"":t.source.slice(e.tagStart,e.tagEnd),a=s===""||s==="!"?n:ub(s,t.tagHandlers);return{tagName:a,tag:A8(t,r,A,a,i)}}function pb(t){return t.nodeKind==="mapping"}function gb(t,e,r,A){for(const n of A.keys(r)){if(t.maxTotalMergeKeys!==-1&&++t.totalMergeKeys>t.maxTotalMergeKeys&&nn(t,`merge keys exceeded maxTotalMergeKeys (${t.maxTotalMergeKeys})`),e.tag.has(e.value,n))continue;const i=e.tag.addPair(e.value,n,A.get(r,n));i&&nn(t,i),(e.overridable??=new Set).add(n)}}function i8(t,e,r,A){if(t.position=e.keyPosition,pb(A))gb(t,e,r,A);else if(A.nodeKind==="sequence"&&Array.isArray(r))for(const n of r)gb(t,e,n,e.tag);else nn(t,"cannot merge mappings; the provided source object is unacceptable")}function a8(t,e,r,A,n){if(t.position=e.keyPosition,r===Fp){i8(t,e,A,n);return}!t.json&&e.tag.has(e.value,r)&&!e.overridable?.has(r)&&nn(t,"duplicated mapping key");const i=e.tag.addPair(e.value,r,A);i&&nn(t,i),e.overridable?.delete(r)}function Mp(t,e,r){const A=t.frames[t.frames.length-1];if(A.kind==="document")A.value=e,A.hasValue=!0;else if(A.kind==="sequence"){A.merge&&(pb(r)||nn(t,"cannot merge mappings; the provided source object is unacceptable"));const n=A.tag.addItem(A.value,e,A.index++);n&&nn(t,n)}else if(A.hasKey){const n=A.key;A.key=void 0,A.hasKey=!1,a8(t,A,n,e,r)}else A.key=e,A.keyPosition=t.position,A.hasKey=!0}function Dp(t,e,r,A,n){if(e.anchorStart!==Lo){const i={value:r,tag:A,isValueFinal:n};return t.anchors.set(t.source.slice(e.anchorStart,e.anchorEnd),i),i}return null}function s8(t,e){const r={...Pp,...e,events:t,documents:[],eventIndex:0,position:0,frames:[],anchors:new Map,tagHandlers:Object.create(null),totalMergeKeys:0,aliasCount:0};for(;r.eventIndex<r.events.length;){const A=r.events[r.eventIndex++];switch(r.position=r8(A),A.type){case 1:r.anchors=new Map,r.aliasCount=0,r.tagHandlers=Object.create(null);for(const n of A.directives)n.kind==="tag"&&(r.tagHandlers[n.handle]=n.prefix);r.frames.push({kind:"document",position:r.position,value:void 0,hasValue:!1});break;case 4:{const{value:n,tag:i}=n8(r,A);Dp(r,A,n,i,!0),Mp(r,n,i);break}case 2:{const n=db(r,A,r.schema.exact.sequence,r.schema.prefix.sequence,"tag:yaml.org,2002:seq","sequence"),i=n.tag.create(n.tagName),s=Dp(r,A,i,n.tag,n.tag.carrierIsResult),a=r.frames[r.frames.length-1],o=a!==void 0&&a.kind==="mapping"&&a.hasKey&&a.key===Fp;r.frames.push({kind:"sequence",position:r.position,value:i,tag:n.tag,anchor:s,index:0,merge:o});break}case 3:{const n=db(r,A,r.schema.exact.mapping,r.schema.prefix.mapping,"tag:yaml.org,2002:map","mapping"),i=n.tag.create(n.tagName),s=Dp(r,A,i,n.tag,n.tag.carrierIsResult);r.frames.push({kind:"mapping",position:r.position,value:i,tag:n.tag,anchor:s,key:void 0,keyPosition:r.position,hasKey:!1,overridable:null});break}case 5:{r.maxAliases!==-1&&++r.aliasCount>r.maxAliases&&nn(r,`aliases exceeded maxAliases (${r.maxAliases})`);const n=r.source.slice(A.anchorStart,A.anchorEnd),i=r.anchors.get(n);i||nn(r,`unidentified alias "${n}"`),i.isValueFinal||nn(r,`recursive alias "${n}" is not supported for tag ${i.tag.tagName} because it uses finalize()`),Mp(r,i.value,i.tag);break}case 6:{const n=r.frames.pop();if(n.kind==="document")r.documents.push(n.value);else{const i=n.tag.carrierIsResult?n.value:hb(r,n.position,n.tag,n.value);n.anchor&&(n.anchor.value=i,n.anchor.isValueFinal=!0),Mp(r,i,n.tag)}break}}}return r.documents}var Mt=-1,vb=Object.prototype.hasOwnProperty,ba=1,Hp=2,mb=3,Gu=4,o8=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,l8=/[,\[\]{}]/,wb=/^(?:!|!!|![0-9A-Za-z-]+!)$/,Rp=String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\-#;/?:@&=+$,_.!~*'()\[\]])`,yb=String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\-#;/?:@&=+$.~*'()_])`,c8=new RegExp(`^(?:${Rp})*$`),u8=new RegExp(`^(?:${yb})+$`),f8=new RegExp(`^(?:!(?:${Rp})*|${yb}(?:${Rp})*)$`),jp={filename:"",maxDepth:100};function h8(t,e,r){t.events.push({type:1,explicitStart:e,explicitEnd:r,directives:t.directives})}function Bb(t,e,r,A,n,i,s){t.events.push({type:2,start:e,anchorStart:r,anchorEnd:A,tagStart:n,tagEnd:i,style:s})}function Pl(t,e,r,A,n,i,s){t.events.push({type:3,start:e,anchorStart:r,anchorEnd:A,tagStart:n,tagEnd:i,style:s})}function To(t,e,r,A,n,i,s,a,o=1,l=-1,c=!1){t.events.push({type:4,valueStart:e,valueEnd:r,anchorStart:A,anchorEnd:n,tagStart:i,tagEnd:s,style:a,chomping:o,indent:l,fast:c})}function d8(t,e,r){t.events.push({type:5,anchorStart:e,anchorEnd:r})}function No(t){t.events.push({type:6})}function an(t){To(t,Mt,Mt,Mt,Mt,Mt,Mt,1)}function bb(){return{anchorStart:Mt,anchorEnd:Mt,tagStart:Mt,tagEnd:Mt}}function Ml(t){return{position:t.position,line:t.line,lineStart:t.lineStart,lineIndent:t.lineIndent,firstTabInLine:t.firstTabInLine,eventsLength:t.events.length}}function Ca(t,e){t.position=e.position,t.line=e.line,t.lineStart=e.lineStart,t.lineIndent=e.lineIndent,t.firstTabInLine=e.firstTabInLine,t.events.length=e.eventsLength}function mt(t,e){ju(t.input.slice(0,t.length),t.position,e,t.filename)}function cA(t){return t===10||t===13}function Cs(t){return t===9||t===32}function Xn(t){return Cs(t)||cA(t)}function Ti(t){return t===0||Xn(t)}function xs(t){return t===44||t===91||t===93||t===123||t===125}function p8(t){return t>=48&&t<=57?t-48:-1}function g8(t){if(t>=48&&t<=57)return t-48;const e=t|32;return e>=97&&e<=102?e-97+10:-1}function v8(t){return t===120?2:t===117?4:t===85?8:0}function m8(t){return t===48||t===97||t===98||t===116||t===9||t===110||t===118||t===102||t===114||t===101||t===32||t===34||t===47||t===92||t===78||t===95||t===76||t===80}function Vu(t){t.input.charCodeAt(t.position)===10?t.position++:(t.position++,t.input.charCodeAt(t.position)===10&&t.position++),t.line++,t.lineStart=t.position,t.lineIndent=0,t.firstTabInLine=-1}function KA(t,e){let r=0,A=t.input.charCodeAt(t.position),n=t.position===t.lineStart||Xn(t.input.charCodeAt(t.position-1));for(;A!==0;){for(;Cs(A);)n=!0,A===9&&t.firstTabInLine===-1&&(t.firstTabInLine=t.position),A=t.input.charCodeAt(++t.position);if(e&&n&&A===35)do A=t.input.charCodeAt(++t.position);while(!cA(A)&&A!==0);if(!cA(A))break;for(Vu(t),r++,n=!0,A=t.input.charCodeAt(t.position);A===32;)t.lineIndent++,A=t.input.charCodeAt(++t.position)}return r}function xa(t,e=t.position){const r=t.input.charCodeAt(e);if((r===45||r===46)&&r===t.input.charCodeAt(e+1)&&r===t.input.charCodeAt(e+2)){const A=t.input.charCodeAt(e+3);return A===0||Xn(A)}return!1}function Cb(t){let e=t.input.charCodeAt(t.position);for(;e!==0&&!cA(e);)e=t.input.charCodeAt(++t.position)}function xb(t,e,r){o8.test(t.input.slice(e,r))&&mt(t,"the stream contains non-printable characters")}function w8(t,e,r){if(t.input.charCodeAt(t.position)!==33)return!1;e.tagStart!==Mt&&mt(t,"duplication of a tag property");const A=t.position;let n=!1,i=!1,s="!",a=t.input.charCodeAt(++t.position);a===60?(n=!0,a=t.input.charCodeAt(++t.position)):a===33&&(i=!0,s="!!",a=t.input.charCodeAt(++t.position));let o=t.position,l;if(n){for(;a!==0&&a!==62;)a=t.input.charCodeAt(++t.position);a!==62&&mt(t,"unexpected end of the stream within a verbatim tag"),l=t.input.slice(o,t.position),t.position++}else{for(;a!==0&&!Xn(a)&&!(r&&xs(a));)a===33&&(i?mt(t,"tag suffix cannot contain exclamation marks"):(s=t.input.slice(o-1,t.position+1),wb.test(s)||mt(t,"named tag handle cannot contain such characters"),i=!0,o=t.position+1)),a=t.input.charCodeAt(++t.position);l=t.input.slice(o,t.position),l8.test(l)&&mt(t,"tag suffix cannot contain flow indicator characters")}return l&&!(n?c8.test(l):u8.test(l))&&mt(t,`tag name cannot contain such characters: ${l}`),!n&&s!=="!"&&s!=="!!"&&!vb.call(t.tagHandlers,s)&&mt(t,`undeclared tag handle "${s}"`),e.tagStart=A,e.tagEnd=t.position,!0}function y8(t,e){if(t.input.charCodeAt(t.position)!==38)return!1;e.anchorStart!==Mt&&mt(t,"duplication of an anchor property"),t.position++;const r=t.position;for(;t.input.charCodeAt(t.position)!==0&&!Xn(t.input.charCodeAt(t.position))&&!xs(t.input.charCodeAt(t.position));)t.position++;return t.position===r&&mt(t,"name of an anchor node must contain at least one character"),e.anchorStart=r,e.anchorEnd=t.position,!0}function B8(t,e){if(t.input.charCodeAt(t.position)!==42)return!1;(e.anchorStart!==Mt||e.tagStart!==Mt)&&mt(t,"alias node should not have any properties"),t.position++;const r=t.position;for(;t.input.charCodeAt(t.position)!==0&&!Xn(t.input.charCodeAt(t.position))&&!xs(t.input.charCodeAt(t.position));)t.position++;return t.position===r&&mt(t,"name of an alias node must contain at least one character"),d8(t,r,t.position),!0}function Kp(t,e){KA(t,!1),t.lineIndent<e&&mt(t,"deficient indentation")}function b8(t,e,r){if(t.input.charCodeAt(t.position)!==39)return!1;t.position++;const A=t.position;let n=!0;for(;t.input.charCodeAt(t.position)!==0;){const i=t.input.charCodeAt(t.position);if(i===39){if(t.input.charCodeAt(t.position+1)===39){n=!1,t.position+=2;continue}const s=t.position;return t.position++,To(t,A,s,r.anchorStart,r.anchorEnd,r.tagStart,r.tagEnd,2,1,-1,n),!0}cA(i)?(n=!1,Kp(t,e)):t.position===t.lineStart&&xa(t)?mt(t,"unexpected end of the document within a single quoted scalar"):i!==9&&i<32?mt(t,"expected valid JSON character"):t.position++}mt(t,"unexpected end of the stream within a single quoted scalar")}function C8(t,e,r){if(t.input.charCodeAt(t.position)!==34)return!1;t.position++;const A=t.position;let n=!0;for(;t.input.charCodeAt(t.position)!==0;){const i=t.input.charCodeAt(t.position);if(i===34){const s=t.position;return t.position++,To(t,A,s,r.anchorStart,r.anchorEnd,r.tagStart,r.tagEnd,3,1,-1,n),!0}if(i===92){n=!1;const s=t.input.charCodeAt(++t.position);if(cA(s))Kp(t,e);else if(m8(s))t.position++;else{let a=v8(s);for(a===0&&mt(t,"unknown escape sequence");a-- >0;)t.position++,g8(t.input.charCodeAt(t.position))<0&&mt(t,"expected hexadecimal character");t.position++}}else cA(i)?(n=!1,Kp(t,e)):t.position===t.lineStart&&xa(t)?mt(t,"unexpected end of the document within a double quoted scalar"):i!==9&&i<32?mt(t,"expected valid JSON character"):t.position++}mt(t,"unexpected end of the stream within a double quoted scalar")}function x8(t,e,r){const A=t.input.charCodeAt(t.position);let n=1,i=-1,s=!1;if(A!==124&&A!==62)return!1;const a=A===124?4:5;for(t.position++;t.input.charCodeAt(t.position)!==0;){const u=t.input.charCodeAt(t.position),g=p8(u);if(u===43||u===45)n!==1&&mt(t,"repeat of a chomping mode identifier"),n=u===43?3:2,t.position++;else if(g>=0)g===0&&mt(t,"bad explicit indentation width of a block scalar; it cannot be less than one"),s&&mt(t,"repeat of an indentation width identifier"),i=e+g-1,s=!0,t.position++;else break}let o=!1;for(;Cs(t.input.charCodeAt(t.position));)o=!0,t.position++;o&&t.input.charCodeAt(t.position)===35&&Cb(t),cA(t.input.charCodeAt(t.position))?Vu(t):t.input.charCodeAt(t.position)!==0&&mt(t,"a line break is expected");let l=s?i:-1,c=0;const f=t.position;let h=t.position;for(;t.input.charCodeAt(t.position)!==0;){const u=t.position;let g=0;for(;t.input.charCodeAt(u+g)===32;)g++;const p=t.input.charCodeAt(u+g);if(p===0){l>=0?g>l&&(h=u+g):g>0&&(h=u+g);break}if(u===t.lineStart&&xa(t,u))break;if(!s&&l===-1&&cA(p)&&(c=Math.max(c,g)),!s&&l===-1&&!cA(p)&&(p===9&&g<e&&(t.position=u+g,mt(t,"tab characters must not be used in indentation")),g<c&&(t.position=u+g,mt(t,"bad indentation of a mapping entry"))),l===-1&&p!==0&&!cA(p)&&g<e){t.lineIndent=g,t.position=u+g;break}!s&&p!==0&&!cA(p)&&l===-1&&(l=g);const w=l===-1?e+1:l;if(p!==0&&!cA(p)&&g<w){t.lineIndent=g,t.position=u+g;break}Cb(t),h=t.position,cA(t.input.charCodeAt(t.position))&&(Vu(t),h=t.position)}return xb(t,f,h),To(t,f,h,r.anchorStart,r.anchorEnd,r.tagStart,r.tagEnd,a,n,l),!0}function E8(t,e){const r=t.input.charCodeAt(t.position),A=e===ba;if(r===0||Xn(r)||r===35||r===38||r===42||r===33||r===124||r===62||r===39||r===34||r===37||r===64||r===96||A&&xs(r))return!1;if(r===63||r===45){const n=t.input.charCodeAt(t.position+1);if(Ti(n)||A&&xs(n))return!1}return!0}function S8(t,e,r,A){if(!E8(t,r))return!1;const n=t.position;let i=t.position,s=t.input.charCodeAt(t.position);const a=r===ba;let o=!1;for(;s!==0&&!(t.position===t.lineStart&&xa(t));){if(s===58){const l=t.input.charCodeAt(t.position+1);if(Ti(l)||a&&xs(l))break}else if(s===35){if(Xn(t.input.charCodeAt(t.position-1)))break}else{if(a&&xs(s))break;if(cA(s)){const l=t.position,c=t.line,f=t.lineStart,h=t.lineIndent;if(KA(t,!1),t.lineIndent>=e){o=!0,s=t.input.charCodeAt(t.position);continue}t.position=l,t.line=c,t.lineStart=f,t.lineIndent=h;break}}Cs(s)||(i=t.position+1),s=t.input.charCodeAt(++t.position)}return i===n?!1:(xb(t,n,i),To(t,n,i,A.anchorStart,A.anchorEnd,A.tagStart,A.tagEnd,1,1,-1,!o),!0)}function Es(t,e){const r=t.line;KA(t,!0),(t.line>r&&t.lineIndent<e||t.firstTabInLine!==-1&&t.lineIndent<e)&&mt(t,"deficient indentation")}function F8(t,e,r){const A=t.input.charCodeAt(t.position),n=A===123,i=t.position;let s=!0;if(A!==91&&A!==123)return!1;const a=n?125:93;for(n?Pl(t,i,r.anchorStart,r.anchorEnd,r.tagStart,r.tagEnd,2):Bb(t,i,r.anchorStart,r.anchorEnd,r.tagStart,r.tagEnd,2),t.position++;t.input.charCodeAt(t.position)!==0;){Es(t,e);let o=t.input.charCodeAt(t.position);if(o===a)return t.position++,No(t),!0;s?o===44&&mt(t,"expected the node content, but found ','"):mt(t,"missed comma between flow collection entries");let l=!1,c=!1;o===63&&Xn(t.input.charCodeAt(t.position+1))&&(l=c=!0,t.position+=1,Es(t,e));const f=t.line,h=Ml(t),u=Ni(t,e,ba,!1,!0);Es(t,e),o=t.input.charCodeAt(t.position),(n||c||t.line===f)&&o===58?(l=!0,t.position++,Es(t,e),n?u||an(t):(Ca(t,h),Pl(t,h.position,Mt,Mt,Mt,Mt,2),Ni(t,e,ba,!1,!0)||an(t),Es(t,e),t.position++,Es(t,e)),Ni(t,e,ba,!1,!0)||an(t),Es(t,e),n||No(t)):n&&l?(u||an(t),an(t)):n?an(t):l&&(Ca(t,h),Pl(t,h.position,Mt,Mt,Mt,Mt,2),Ni(t,e,ba,!1,!0),an(t),No(t)),o=t.input.charCodeAt(t.position),o===44?(s=!0,t.position++):s=!1}mt(t,"unexpected end of the stream within a flow collection")}function Eb(t,e,r){if(t.firstTabInLine!==-1||t.input.charCodeAt(t.position)!==45||!Ti(t.input.charCodeAt(t.position+1)))return!1;for(Bb(t,t.position,r.anchorStart,r.anchorEnd,r.tagStart,r.tagEnd,1);t.input.charCodeAt(t.position)===45&&Ti(t.input.charCodeAt(t.position+1));){t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,mt(t,"tab characters must not be used in indentation"));const A=t.line;t.position++;const n=KA(t,!0)>0;if(t.firstTabInLine!==-1&&t.input.charCodeAt(t.position)===45&&Ti(t.input.charCodeAt(t.position+1))&&mt(t,"bad indentation of a sequence entry"),n&&t.lineIndent<=e?an(t):Ni(t,e,mb,!1,!0),KA(t,!0),t.lineIndent<e||t.position>=t.length)break;t.lineIndent>e&&mt(t,"bad indentation of a sequence entry"),t.line===A&&t.input.charCodeAt(t.position)===45&&Ti(t.input.charCodeAt(t.position+1))&&mt(t,"bad indentation of a sequence entry")}return No(t),!0}function zp(t,e,r,A){let n=!1,i=!1,s=!1,a=!1;if(t.firstTabInLine!==-1)return!1;let o=t.input.charCodeAt(t.position);for(;o!==0;){!n&&t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,mt(t,"tab characters must not be used in indentation"));const l=t.input.charCodeAt(t.position+1),c=t.line;if((o===63||o===58)&&Ti(l))s||(Pl(t,t.position,A.anchorStart,A.anchorEnd,A.tagStart,A.tagEnd,1),s=!0),o===63?(n&&an(t),i=!0,n=!0):(n||(an(t),i=!0),n=!1),t.position+=1,a=!0;else{n&&(an(t),n=!1);const f=Ml(t);if(!Ni(t,r,Hp,!1,!0))break;if(t.line===c){for(o=t.input.charCodeAt(t.position);Cs(o);)o=t.input.charCodeAt(++t.position);if(o===58){if(o=t.input.charCodeAt(++t.position),Ti(o)||mt(t,"a whitespace character is expected after the key-value separator within a block mapping"),!s){for(Ca(t,f),Pl(t,f.position,A.anchorStart,A.anchorEnd,A.tagStart,A.tagEnd,1),s=!0,Ni(t,r,Hp,!1,!0),o=t.input.charCodeAt(t.position);Cs(o);)o=t.input.charCodeAt(++t.position);t.position++}i=!0,n=!1,a=!1}else if(i)mt(t,"expected ':' after a mapping key");else return A.anchorStart!==Mt||A.tagStart!==Mt?(Ca(t,f),!1):!0}else if(i)mt(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return A.anchorStart!==Mt||A.tagStart!==Mt?(Ca(t,f),!1):!0}if(Ni(t,e,Gu,!0,a)&&(a=!1),n||a&&(an(t),a=!1),KA(t,!0),o=t.input.charCodeAt(t.position),(t.line===c||t.lineIndent>e)&&o!==0)mt(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return i?(n&&an(t),s&&No(t),!0):!1}function Ni(t,e,r,A,n,i=!0){t.depth>=t.maxDepth&&mt(t,`nesting exceeded maxDepth (${t.maxDepth})`),t.depth++;let s=1,a=!1,o=!1,l=null;const c=bb();let f=r===Gu||r===mb,h=f;const u=f;if(A&&KA(t,!0)&&(a=!0,t.lineIndent>e?s=1:t.lineIndent===e?s=0:s=-1),t.position===t.lineStart&&xa(t))return t.depth--,!1;if(s===1)for(;;){const g=t.input.charCodeAt(t.position),p=Ml(t);if(a&&s!==1&&(g===33||g===38))break;if(a&&u&&(c.tagStart!==Mt||c.anchorStart!==Mt)&&(g===33||g===38)){const w=Ml(t),m=e+1;if(zp(t,t.position-t.lineStart,m,c)&&t.events[w.eventsLength]?.type===3)return t.depth--,!0;Ca(t,w)}if(a&&(g===33&&c.tagStart!==Mt||g===38&&c.anchorStart!==Mt)||!w8(t,c,r===ba)&&!y8(t,c))break;l===null&&(l=p),KA(t,!0)?(a=!0,h=u,t.lineIndent>e?s=1:t.lineIndent===e?s=0:s=-1):h=!1}if(h&&(h=a||n),s===1||r===Gu){const g=r===ba||r===Hp?e:e+1,p=t.position-t.lineStart;if(s===1)if(h&&(Eb(t,p,c)||zp(t,p,g,c))||F8(t,g,c))o=!0;else{const w=t.input.charCodeAt(t.position);if(l!==null&&i&&u&&!h&&w!==124&&w!==62){const m=Ml(t),B=l.position-l.lineStart;Ca(t,l),zp(t,B,g,bb())&&t.events[m.eventsLength]?.type===3?o=!0:Ca(t,m)}!o&&(f&&x8(t,g,c)||b8(t,g,c)||C8(t,g,c)||B8(t,c)||S8(t,g,r,c))&&(o=!0)}else s===0&&(o=h&&Eb(t,p,c))}return f=f&&!o,!o&&(c.anchorStart!==Mt||c.tagStart!==Mt||f)&&(To(t,Mt,Mt,c.anchorStart,c.anchorEnd,c.tagStart,c.tagEnd,1),o=!0),t.depth--,o||c.anchorStart!==Mt||c.tagStart!==Mt}function I8(t){if(t.lineIndent>0||t.input.charCodeAt(t.position)!==37)return!1;t.position++;const e=t.position;for(;t.input.charCodeAt(t.position)!==0&&!Xn(t.input.charCodeAt(t.position));)t.position++;const r=t.input.slice(e,t.position),A=[];for(r.length===0&&mt(t,"directive name must not be less than one character in length");t.input.charCodeAt(t.position)!==0&&!cA(t.input.charCodeAt(t.position));){for(;Cs(t.input.charCodeAt(t.position));)t.position++;if(t.input.charCodeAt(t.position)===35||cA(t.input.charCodeAt(t.position))||t.input.charCodeAt(t.position)===0)break;const n=t.position;for(;t.input.charCodeAt(t.position)!==0&&!Xn(t.input.charCodeAt(t.position));)t.position++;A.push(t.input.slice(n,t.position))}if(cA(t.input.charCodeAt(t.position))&&Vu(t),r==="YAML"){t.directives.some(i=>i.kind==="yaml")&&mt(t,"duplication of %YAML directive"),A.length!==1&&mt(t,"YAML directive accepts exactly one argument");const n=/^([0-9]+)\.([0-9]+)$/.exec(A[0]);n===null&&mt(t,"ill-formed argument of the YAML directive"),parseInt(n[1],10)!==1&&mt(t,"unacceptable YAML version of the document"),t.directives.push({kind:"yaml",version:A[0]})}else if(r==="TAG"){A.length!==2&&mt(t,"TAG directive accepts exactly two arguments");const[n,i]=A;wb.test(n)||mt(t,"ill-formed tag handle (first argument) of the TAG directive"),vb.call(t.tagHandlers,n)&&mt(t,`there is a previously declared suffix for "${n}" tag handle`),f8.test(i)||mt(t,"ill-formed tag prefix (second argument) of the TAG directive"),t.tagHandlers[n]=i,t.directives.push({kind:"tag",handle:n,prefix:i})}return!0}function U8(t){t.directives=[],t.tagHandlers=Object.create(null);let e=!1;for(KA(t,!0);I8(t);)e=!0,KA(t,!0);let r=!1,A=!1,n=!0;if(t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45&&Ti(t.input.charCodeAt(t.position+3))){r=!0;const a=t.line;t.position+=3,KA(t,!0),n=t.line>a}else e&&mt(t,"directives end mark is expected");const i=t.events.length;if(!r&&t.position===t.lineStart&&t.input.charCodeAt(t.position)===46&&xa(t)){t.position+=3,KA(t,!0);return}if(h8(t,r,!1),Ni(t,t.lineIndent-1,Gu,!1,n,n)||an(t),KA(t,!0),t.position===t.lineStart&&xa(t)&&(A=t.input.charCodeAt(t.position)===46,A)){const a=t.line;t.position+=3,KA(t,!0),t.line===a&&t.position<t.length&&mt(t,"end of the stream or a document separator is expected")}const s=t.events[i];s?.type===1&&(s.explicitEnd=A),No(t),!A&&t.position<t.length&&!(t.position===t.lineStart&&xa(t))&&mt(t,"end of the stream or a document separator is expected")}function _8(t,e){const r=t.length,A={...jp,...e,input:`${t}\0`,length:r,position:0,line:0,lineStart:0,lineIndent:0,firstTabInLine:-1,depth:0,directives:[],tagHandlers:Object.create(null),events:[]},n=t.indexOf("\0");for(n!==-1&&ju(t,n,"null byte is not allowed in input",A.filename),A.input.charCodeAt(A.position)===65279&&A.position++;A.position<A.length&&(KA(A,!0),!(A.position>=A.length));){const i=A.position;U8(A),A.position===i&&mt(A,"can not read a document")}return A.events}var Q8={...jp,...Pp};function k8(t,e={}){const r={...Q8,...e},A=String(t),n=Object.keys(jp),i=Object.keys(Pp);return s8(_8(A,Qp(r,n)),{...Qp(r,i),source:A})}function L8(t,e){const r=k8(t,e);if(r.length===0)throw new Ol("expected a document, but the input is empty");if(r.length===1)return r[0];throw new Ol("expected a single document in the stream, but found more")}var qu=class{tagged=!1;flow=!1;singleQuoted=!1;doubleQuoted=!1;literal=!1;folded=!1},Ss=Symbol("INVALID");function T8(t){const e=new Set([t.defaultScalarTag,t.defaultSequenceTag,t.defaultMappingTag].filter(i=>i!==void 0)),r=t.implicitScalarTags,A=t.tags.filter(i=>!(i.nodeKind==="scalar"&&i.implicit)&&!e.has(i)),n=t.tags.filter(i=>e.has(i));return[...r.map(i=>({tag:i,implicitTag:!0})),...A.map(i=>({tag:i,implicitTag:!1})),...n.map(i=>({tag:i,implicitTag:!0}))]}function N8(t,e){for(let r=0,A=t.representTypes.length;r<A;r+=1){const{tag:n,implicitTag:i}=t.representTypes[r];if(n.identify&&n.identify(e)){let s;return n.matchByTagPrefix&&n.representTagName?s=n.representTagName(e):s=n.tagName,{tag:n,tagName:s,implicitTag:i}}}return null}function Dl(t,e){if(!t.noRefs&&e!==null&&typeof e=="object"){const c=t.refs.get(e);if(c)return c.anchor===void 0&&(c.anchor=`ref_${t.refCounter++}`),{kind:"alias",tag:"",style:new qu,anchor:c.anchor}}const r=N8(t,e);if(!r){if(e===void 0||t.skipInvalid)return Ss;throw new Ol(`unacceptable kind of an object to dump ${Object.prototype.toString.call(e)}`)}const{tag:A,tagName:n,implicitTag:i}=r,s=i?n:fb(n);if(A.nodeKind==="scalar"){const c=new qu;return c.tagged=!i,{kind:"scalar",tag:s,style:c,value:A.represent(e)}}if(A.nodeKind==="sequence"){const c=A.represent(e),f=new qu;f.tagged=!i;const h={kind:"sequence",tag:s,style:f,items:[]};t.noRefs||t.refs.set(e,h);for(let u=0,g=c.length;u<g;u+=1){let p=Dl(t,c[u]);p===Ss&&c[u]===void 0&&(p=Dl(t,null)),p!==Ss&&h.items.push(p)}return h}const a=A.represent(e),o=new qu;o.tagged=!i;const l={kind:"mapping",tag:s,style:o,items:[]};t.noRefs||t.refs.set(e,l);for(const[c,f]of a){const h=Dl(t,c);if(h===Ss)continue;const u=Dl(t,f);u!==Ss&&l.items.push({key:h,value:u})}return l}function O8(t,e,r={}){const A=Dl({representTypes:T8(e),noRefs:r.noRefs??!1,skipInvalid:r.skipInvalid??!1,refs:new Map,refCounter:0},t);return[{contents:A===Ss?null:A,directives:[]}]}var P8=Symbol("visit:break"),Sb=Symbol("visit:skip");function Wu(t,e,r){const A=e(t,r);if(A===P8)return!0;if(A===Sb)return!1;const n=r.depth+1;switch(t.kind){case"sequence":for(const i of t.items)if(Wu(i,e,{depth:n,parent:t,isKey:!1}))return!0;break;case"mapping":for(const{key:i,value:s}of t.items)if(Wu(i,e,{depth:n,parent:t,isKey:!0})||Wu(s,e,{depth:n,parent:t,isKey:!1}))return!0;break}return!1}function M8(t,e){for(const r of t)if(r.contents&&Wu(r.contents,e,{depth:0,parent:null,isKey:!1}))return}var Gp=65279,D8=9,Fs=10,Fb=13,H8=32,R8=33,Ib=34,Vp=35,j8=37,K8=38,Ub=39,z8=42,_b=44,qp=45,Hl=58,G8=61,V8=62,Qb=63,q8=64,kb=91,Lb=93,W8=96,Tb=123,$8=124,Nb=125,TA={};TA[0]="\\0",TA[7]="\\a",TA[8]="\\b",TA[9]="\\t",TA[10]="\\n",TA[11]="\\v",TA[12]="\\f",TA[13]="\\r",TA[27]="\\e",TA[34]='\\"',TA[92]="\\\\",TA[133]="\\N",TA[160]="\\_",TA[8232]="\\L",TA[8233]="\\P";var Wp={indent:2,seqNoIndent:!1,seqInlineFirst:!0,sortKeys:!1,lineWidth:80,flowBracketPadding:!1,flowSkipCommaSpace:!1,flowSkipColonSpace:!1,quoteFlowKeys:!1,quoteStyle:"single",forceQuotes:!1,tagBeforeAnchor:!1};function Y8(t){return t.style.tagged?t.tag:fb(t.tag)}function X8(t){const e={...Wp,...t};return{...e,defaultScalarTagName:e.schema.defaultScalarTag.tagName,implicitResolvers:e.schema.implicitScalarTags}}function J8(t){const e=t.toString(16).toUpperCase(),r=t<=255?"x":"u",A=t<=255?2:4;return`\\${r}${"0".repeat(A-e.length)}${e}`}function Ob(t,e){const r=" ".repeat(e);let A=0,n="";const i=t.length;for(;A<i;){let s;const a=t.indexOf(`
|
|
99
|
+
`,A);a===-1?(s=t.slice(A),A=i):(s=t.slice(A,a+1),A=a+1),s.length&&s!==`
|
|
100
|
+
`&&(n+=r),n+=s}return n}function $p(t,e){return`
|
|
101
|
+
${" ".repeat(t.indent*e)}`}function Z8(t,e){const r=t.indent*Math.max(1,e);return{indent:r,blockIndent:e===0?t.indent+1:t.indent,lineWidth:t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-r)}}function Pb(t,e){for(let r=0,A=t.implicitResolvers.length;r<A;r+=1){const n=t.implicitResolvers[r];if(n.resolve(e,!1,n.tagName)!==Rt)return n.tagName}return t.defaultScalarTagName}function Oo(t){return t===H8||t===D8}function eO(t){const e=t.charCodeAt(0);if(e!==qp&&e!==46||t.charCodeAt(1)!==e||t.charCodeAt(2)!==e)return!1;if(t.length===3)return!0;const r=t.charCodeAt(3);return Oo(r)||r===Fb||r===Fs}function Rl(t){return t>=32&&t<=126||t>=161&&t<=55295&&t!==8232&&t!==8233||t>=57344&&t<=65533&&t!==Gp||t>=65536&&t<=1114111}function Mb(t){return Rl(t)&&t!==Gp&&t!==Fb&&t!==Fs}function Yp(t,e,r){const A=Mb(t),n=A&&!Oo(t);return(r?A:A&&t!==_b&&t!==kb&&t!==Lb&&t!==Tb&&t!==Nb)&&t!==Vp&&!(e===Hl&&!n)||Mb(e)&&!Oo(e)&&t===Vp||e===Hl&&n}function tO(t){return Rl(t)&&t!==Gp&&!Oo(t)&&t!==qp&&t!==Qb&&t!==Hl&&t!==_b&&t!==kb&&t!==Lb&&t!==Tb&&t!==Nb&&t!==Vp&&t!==K8&&t!==z8&&t!==R8&&t!==$8&&t!==G8&&t!==V8&&t!==Ub&&t!==Ib&&t!==j8&&t!==q8&&t!==W8}function rO(t,e){const r=Po(t,0);if(tO(r))return!0;if(t.length>1&&(r===qp||r===Qb||r===Hl)){const A=Po(t,1);return!Oo(A)&&Yp(A,r,e)}return!1}function AO(t){return!Oo(t)&&t!==Hl}function Po(t,e){const r=t.charCodeAt(e);let A;return r>=55296&&r<=56319&&e+1<t.length&&(A=t.charCodeAt(e+1),A>=56320&&A<=57343)?(r-55296)*1024+A-56320+65536:r}function Db(t){return/^\n* /.test(t)}var jl=1,Kl=2,Xp=3,Jp=4,Ea=5;function nO(t,e,r,A,n,i){const{blockIndent:s,lineWidth:a}=r;let o,l=0,c=-1,f=!1,h=!1;const u=a!==-1;let g=-1,p=!eO(e)&&rO(e,i)&&AO(Po(e,e.length-1));if(A||n)for(o=0;o<e.length;l>=65536?o+=2:o++){if(l=Po(e,o),!Rl(l))return Ea;p=p&&Yp(l,c,i),c=l}else{for(o=0;o<e.length;l>=65536?o+=2:o++){if(l=Po(e,o),l===Fs)f=!0,u&&(h=h||o-g-1>a&&e[g+1]!==" ",g=o);else if(!Rl(l))return Ea;p=p&&Yp(l,c,i),c=l}h=h||u&&o-g-1>a&&e[g+1]!==" "}return!f&&!h?p&&!n?jl:t.quoteStyle==="double"?Ea:Kl:s>9&&Db(e)?Ea:h?Jp:Xp}function iO(t,e,r){const{indent:A,blockIndent:n,lineWidth:i}=r;switch(e){case jl:return Rb(t,A);case Kl:return`'${Rb(t,A).replace(/'/g,"''")}'`;case Xp:return"|"+Hb(t,n)+jb(Ob(t,A));case Jp:return">"+Hb(t,n)+jb(Ob(sO(t,i),A));case Ea:return`"${oO(t)}"`}}function aO(t,e,r,A,n){const i=A||!n;if(e.style.singleQuoted)return Kl;if(e.style.doubleQuoted)return Ea;if(!i){if(e.style.literal)return Xp;if(e.style.folded)return Jp}const s=e.value;if(s.length===0)return e.style.tagged||Pb(t,s)===e.tag?jl:t.quoteStyle==="double"?Ea:Kl;const a=nO(t,s,r,i,t.forceQuotes&&!A,n);return a===jl&&!e.style.tagged&&Pb(t,s)!==e.tag?t.quoteStyle==="double"?Ea:Kl:a}function Hb(t,e){const r=Db(t)?String(e):"",A=t[t.length-1]===`
|
|
102
|
+
`;return`${r}${A&&(t[t.length-2]===`
|
|
103
|
+
`||t===`
|
|
104
|
+
`)?"+":A?"":"-"}
|
|
105
|
+
`}function Rb(t,e){let r=t.indexOf(`
|
|
106
|
+
`);if(r===-1)return t;const A=" ".repeat(e);let n=t.slice(0,r);const i=/(\n+)([^\n]*)/g;i.lastIndex=r;let s;for(;s=i.exec(t);){const a=s[1].length,o=s[2];n+=`
|
|
107
|
+
`.repeat(a+1)+A+o}return n}function jb(t){return t[t.length-1]===`
|
|
108
|
+
`?t.slice(0,-1):t}function sO(t,e){const r=/(\n+)([^\n]*)/g;let A=t.indexOf(`
|
|
109
|
+
`);A===-1&&(A=t.length),r.lastIndex=A;let n=Kb(t.slice(0,A),e),i=t[0]===`
|
|
110
|
+
`||t[0]===" ",s,a;for(;a=r.exec(t);){const o=a[1],l=a[2];s=l[0]===" ",n+=o+(!i&&!s&&l!==""?`
|
|
111
|
+
`:"")+Kb(l,e),i=s}return n}function Kb(t,e){if(t===""||t[0]===" ")return t;const r=/ [^ ]/g;let A,n=0,i,s=0,a=0,o="";for(;A=r.exec(t);)a=A.index,a-n>e&&(i=s>n?s:a,o+=`
|
|
112
|
+
${t.slice(n,i)}`,n=i+1),s=a;return o+=`
|
|
113
|
+
`,t.length-n>e&&s>n?o+=`${t.slice(n,s)}
|
|
114
|
+
${t.slice(s+1)}`:o+=t.slice(n),o.slice(1)}function oO(t){let e="",r=0;for(let A=0;A<t.length;r>=65536?A+=2:A++){r=Po(t,A);const n=TA[r];if(n){e+=n;continue}if(Rl(r)){e+=t[A],r>=65536&&(e+=t[A+1]);continue}e+=J8(r)}return e}function lO(t,e,r){let A="";for(let i=0,s=r.items.length;i<s;i+=1){const a=Oi(t,e,r.items[i],{});A!==""&&(A+=`,${t.flowSkipCommaSpace?"":" "}`),A+=a}const n=t.flowBracketPadding&&A!==""?" ":"";return`[${n}${A}${n}]`}function zb(t,e,r,A){let n="";for(let i=0,s=r.items.length;i<s;i+=1){const a=Oi(t,e+1,r.items[i],{block:!0,compact:t.seqInlineFirst,isblockseq:!0});(!A||n!=="")&&(n+=$p(t,e)),a===""||Fs===a.charCodeAt(0)?n+="-":n+="- ",n+=a}return n}function cO(t,e,r){let A="";const n=Gb(t,r.items);for(const{key:s,value:a}of n){let o="";A!==""&&(o+=`,${t.flowSkipCommaSpace?"":" "}`);const l=Oi(t,e,s,{iskey:!0}),c=l.length>1024;c?o+="? ":t.quoteFlowKeys&&(o+='"');const f=Oi(t,e,a,{}),h=t.flowSkipColonSpace||f===""?"":" ";o+=`${l}${t.quoteFlowKeys&&!c?'"':""}:${h}${f}`,A+=o}const i=t.flowBracketPadding&&A!==""?" ":"";return`{${i}${A}${i}}`}function $u(t){return t.kind==="scalar"?t.value:t}function Gb(t,e){if(!t.sortKeys)return e;const r=e.slice();if(t.sortKeys===!0)r.sort((A,n)=>{const i=$u(A.key),s=$u(n.key);return i<s?-1:i>s?1:0});else{const A=t.sortKeys;r.sort((n,i)=>A($u(n.key),$u(i.key)))}return r}function uO(t,e,r,A){let n="";const i=Gb(t,r.items);for(let s=0,a=i.length;s<a;s+=1){let o="";(!A||n!=="")&&(o+=$p(t,e));const{key:l,value:c}=i[s],f=(l.kind==="mapping"||l.kind==="sequence")&&!l.style.flow&&l.items.length!==0||l.kind==="scalar"&&(l.style.literal||l.style.folded),h=f?Oi(t,e+1,l,{block:!0,compact:!0,isblockseq:!Zp(t,l,e+1)}):Oi(t,e+1,l,{block:!0,compact:!0,iskey:!0}),u=l.kind==="scalar"&&l.value.indexOf(`
|
|
115
|
+
`)!==-1,g=f||u||h.length>1024;g&&(h&&Fs===h.charCodeAt(0)?o+="?":o+="? "),o+=h,g&&(o+=$p(t,e));const p=Oi(t,e+1,c,{block:!0,compact:g,isblockseq:g&&!Zp(t,c,e+1)}),w=l.kind==="scalar"&&l.value===""&&h!==""&&h.charCodeAt(h.length-1)!==Ub&&h.charCodeAt(h.length-1)!==Ib,m=!g&&(l.kind==="alias"||w)?" ":"";p===""||Fs===p.charCodeAt(0)?o+=`${m}:`:o+=`${m}: `,o+=p,n+=o}return n}function Zp(t,e,r){return e.style.tagged||e.anchor!==void 0||t.indent<2&&r>0}function Oi(t,e,r,A){if(r.kind==="alias")return`*${r.anchor}`;const{block:n=!1,iskey:i=!1,isblockseq:s=!1}=A;let a=A.compact??!1;const o=r.anchor!==void 0;Zp(t,r,e)&&(a=!1);let l,c=r.style.tagged;const f=n&&(r.kind==="mapping"||r.kind==="sequence")&&!r.style.flow&&r.items.length!==0;if(r.kind==="mapping")f?l=uO(t,e,r,a):l=cO(t,e,r);else if(r.kind==="sequence")f?t.seqNoIndent&&!s&&e>0?l=zb(t,e-1,r,a):l=zb(t,e,r,a):l=lO(t,e,r);else{const h=Z8(t,e),u=aO(t,r,h,i,n);l=iO(r.value,u,h),c=r.style.tagged||u!==jl&&r.tag!==t.defaultScalarTagName}if(f&&a&&e>0&&t.indent>2&&(l=`${" ".repeat(t.indent-2)}${l}`),c||o){const h=[],u=c?Y8(r):null,g=o?`&${r.anchor}`:null;t.tagBeforeAnchor?(u!==null&&h.push(u),g!==null&&h.push(g)):(g!==null&&h.push(g),u!==null&&h.push(u));const p=l===""||l.charCodeAt(0)===Fs?"":" ";l=`${h.join(" ")}${p}${l}`}return l}function fO(t){return(t.kind==="sequence"||t.kind==="mapping")&&!t.style.flow&&t.items.length!==0&&!t.style.tagged&&t.anchor===void 0}function hO(t){let e=t;for(;(e.kind==="sequence"||e.kind==="mapping")&&!e.style.flow&&e.items.length!==0;)e=e.kind==="sequence"?e.items[e.items.length-1]:e.items[e.items.length-1].value;if(e.kind!=="scalar"||!(e.style.literal||e.style.folded))return!1;const{value:r}=e;return r.endsWith(`
|
|
116
|
+
|
|
117
|
+
`)||r===`
|
|
118
|
+
`}function dO(t){let e="";for(const r of t.directives){if(r.kind==="yaml"){e+=`%YAML ${r.version}
|
|
119
|
+
`;continue}const{handle:A,prefix:n}=r;e+=`%TAG ${A} ${n}
|
|
120
|
+
`}return e}function pO(t,e){const r=X8(e);let A="",n=!1;for(let i=0;i<t.length;i+=1){const s=t[i],a=dO(s),o=a!=="",l=s.explicitStart||o||i>0&&!n;if(A+=a,s.contents===null)l&&(A+=`---
|
|
121
|
+
`);else if(l){const c=Oi(r,0,s.contents,{block:!0,compact:!0}),f=c===""?"":o||fO(s.contents)?`
|
|
122
|
+
`:" ";A+=`---${f}${c}
|
|
123
|
+
`}else A+=Oi(r,0,s.contents,{block:!0,compact:!0})+`
|
|
124
|
+
`;n=s.explicitEnd||s.contents!==null&&hO(s.contents),n&&(A+=`...
|
|
125
|
+
`)}return A}var gO=zN.withTags({...Up,resolve:(t,e,r)=>{const A=Up.resolve(t,e,r);return A===Rt?Ab.resolve(t,e,r):A}},{..._p,resolve:(t,e,r)=>{const A=_p.resolve(t,e,r);return A===Rt?nb.resolve(t,e,r):A}}),vO={...Wp,schema:gO,skipInvalid:!1,noRefs:!1,flowLevel:-1,transform:()=>{}};function mO(t,e={}){const r={...vO,...e},A=O8(t,r.schema,{noRefs:r.noRefs,skipInvalid:r.skipInvalid});return r.flowLevel>=0&&M8(A,(n,i)=>{if(!(i.depth<r.flowLevel))return n.style.flow=!0,Sb}),r.transform(A),pO(A,{...Qp(r,Object.keys(Wp)),schema:r.schema})}function eg(t){return"n_"+t.replace(/[^a-zA-Z0-9_]/g,"")}function Vb(t,e){return(t||e).replace(/"/g,"'").replace(/\n/g," ").slice(0,60)}function qb(t){const e=["flowchart TD"];for(const r of Object.values(t.shapes))r.kind!=="group"&&e.push(` ${eg(r.id)}["${Vb(r.text,r.kind)}"]`);for(const r of Object.values(t.edges)){if(!r.source.shapeId||!r.target.shapeId)continue;const A=r.label?`-- "${Vb(r.label,"")}" -->`:"-->";e.push(` ${eg(r.source.shapeId)} ${A} ${eg(r.target.shapeId)}`)}return e.join(`
|
|
126
|
+
`)}function wO(){return qb(Qe.getState().activePage())}function Is(t){return t.replace(/^n_/,"").trim()}function yO(t){const e=t.match(/^\s*([A-Za-z0-9_]+)\s*\[\s*"([^"]*)"\s*\]/);if(e)return{id:Is(e[1]),label:e[2]};const r=t.match(/^\s*([A-Za-z0-9_]+)\s*\[([^\]]*)\]/);if(r)return{id:Is(r[1]),label:r[2].trim()};const A=t.match(/^\s*([A-Za-z0-9_]+)\s*$/);return A?{id:Is(A[1]),label:A[1]}:null}function BO(t){const e=t.match(/^\s*(\w+)\s*--\s*"([^"]*)"\s*-->\s*(\w+)/);if(e)return{from:Is(e[1]),to:Is(e[3]),label:e[2]};const r=t.match(/^\s*(\w+)\s*-->\s*(\w+)/);return r?{from:Is(r[1]),to:Is(r[2])}:null}function bO(t){const e=[],r=[],A=new Set;for(const n of t.split(`
|
|
127
|
+
`)){const i=n.trim();if(!i||i.startsWith("flowchart")||i.startsWith("graph"))continue;const s=BO(n);if(s){r.push(s),A.has(s.from)||(e.push({id:s.from,label:s.from}),A.add(s.from)),A.has(s.to)||(e.push({id:s.to,label:s.to}),A.add(s.to));continue}const a=yO(n);a&&!A.has(a.id)&&(e.push(a),A.add(a.id))}return{nodes:e,edges:r}}function CO(t,e,r){const{nodes:A,edges:n}=bO(t);if(A.length===0)throw new Error('No Mermaid nodes found. Use flowchart TD with A["Label"] or A --> B.');const i=new Map,s=A.map((c,f)=>{const h=vr({kind:"rounded-rectangle",x:0,y:0,width:160,height:64,text:c.label},r,f);return i.set(c.id,h.id),h}),a=n.map(c=>{const f=i.get(c.from),h=i.get(c.to);return!f||!h?null:Xr({source:{shapeId:f},target:{shapeId:h},router:"orthogonal",endArrow:"triangle",label:c.label??""},r)}).filter(c=>c!==null),o={...e,shapes:Object.fromEntries(s.map(c=>[c.id,c])),edges:Object.fromEntries(a.map(c=>[c.id,c])),order:[...s.map(c=>c.id),...a.map(c=>c.id)]},l=Wd(o);return{shapes:s.map(c=>({...c,...l[c.id]})),edges:a}}function Wb(t){try{const e=Qe.getState(),r=e.activePage(),A=r.layers[0].id,{shapes:n,edges:i}=CO(t,r,A),s=[...r.order];return Et.getState().run("Apply Mermaid",()=>{s.length>0&&e.removeElements(s),e.addShapes(n);for(const a of i)e.addEdge(a);_e.getState().select(n.map(a=>a.id))}),Xe.emit("zoom:fit",void 0),null}catch(e){return e instanceof Error?e.message:"Invalid Mermaid source."}}function $b(t="json",e){const r=e??Qe.getState().project;switch(t){case"yaml":{const A=JSON.parse(xo(r));return mO(A,{lineWidth:100,noRefs:!0})}case"mermaid":return wO();default:return xo(r)}}function Yb(t){try{const e=Bu(t);return Qe.getState().replaceProject(e),Et.getState().clear(),Xe.emit("zoom:fit",void 0),null}catch(e){return e instanceof Error?e.message:"Invalid diagram JSON."}}function xO(t){try{const e=L8(t);return e===null||typeof e!="object"?"YAML must describe a diagram object.":Yb(JSON.stringify(e))}catch(e){return e instanceof Error?e.message:"Invalid diagram YAML."}}function Xb(t,e="json"){switch(e){case"yaml":return xO(t);case"mermaid":return Wb(t);default:return Yb(t)}}const tg=[{id:"json",label:"JSON",hint:"Full project — all pages and settings"},{id:"yaml",label:"YAML",hint:"Same data as JSON, easier to read"},{id:"mermaid",label:"Mermaid",hint:"Simple flowchart DSL for the active page"}];function EO({embedded:t=!1}){const e=_e(p=>p.viewMode),r=_e(p=>p.sourceFormat),A=_e(p=>p.setSourceFormat),n=_e(p=>p.setViewMode),i=_e(p=>p.readOnly),[s,a]=ke.useState(""),[o,l]=ke.useState(null),c=e==="source"||e==="split",f=tg.find(p=>p.id===r)??tg[0],h=ke.useCallback(()=>{a($b(_e.getState().sourceFormat)),l(null)},[]);if(ke.useEffect(()=>{c&&h()},[c,r,h]),!c)return null;const u=()=>{const p=Xb(s,r);if(p){l(p),Xe.emit("toast",{message:p,kind:"error"});return}l(null),r==="mermaid"&&h(),Xe.emit("toast",{message:"Canvas updated.",kind:"success"})},g=t?"flex h-full min-h-0 flex-col surface":"absolute inset-0 z-20 flex flex-col surface";return _.jsxs("div",{className:g,children:[_.jsxs("div",{className:"flex flex-wrap items-center gap-2 border-b bordered px-3 py-2",style:{background:"var(--color-surface-alt)"},children:[_.jsx(im,{size:18,style:{color:"var(--color-accent)"}}),_.jsx("span",{className:"text-sm font-semibold",style:{color:"var(--color-text)"},children:"Source editor"}),_.jsx("div",{className:"flex rounded-md border bordered p-0.5 text-xs",children:tg.map(p=>_.jsx("button",{type:"button",onClick:()=>A(p.id),className:"rounded px-2 py-0.5 font-medium transition",style:{background:r===p.id?"var(--color-accent)":"transparent",color:r===p.id?"#fff":"var(--color-text-muted)"},children:p.label},p.id))}),_.jsx("span",{className:"hidden text-xs sm:inline",style:{color:"var(--color-text-muted)"},children:f.hint}),_.jsxs("div",{className:"ml-auto flex flex-wrap items-center gap-2",children:[!i&&_.jsxs(_.Fragment,{children:[_.jsxs("button",{type:"button",onClick:h,className:"df-focus-ring inline-flex items-center gap-1 rounded-md border bordered px-2.5 py-1 text-xs hover:brightness-110",children:[_.jsx(eU,{size:14})," Refresh"]}),_.jsxs("button",{type:"button",onClick:u,className:"df-focus-ring inline-flex items-center gap-1 rounded-md px-2.5 py-1 text-xs font-medium text-white",style:{background:"var(--color-accent)"},children:[_.jsx(BI,{size:14})," Apply to canvas"]})]}),!t&&_.jsx("button",{type:"button",onClick:()=>n("canvas"),className:"df-focus-ring rounded-md border bordered px-2.5 py-1 text-xs hover:brightness-110",children:"Canvas only"}),t&&_.jsx("button",{type:"button",onClick:()=>n("source"),className:"df-focus-ring rounded-md border bordered px-2.5 py-1 text-xs hover:brightness-110",children:"Full editor"})]})]}),o&&_.jsx("div",{className:"border-b px-3 py-2 text-xs",style:{background:"#fef2f2",color:"#b91c1c"},children:o}),r==="mermaid"&&_.jsxs("div",{className:"border-b px-3 py-1.5 text-[11px]",style:{color:"var(--color-text-muted)"},children:["Example:"," ",_.jsx("code",{className:"rounded bg-black/5 px-1",children:"flowchart TD"})," ",_.jsx("code",{className:"rounded bg-black/5 px-1",children:'A["Start"] --> B["End"]'})]}),_.jsx("textarea",{value:s,onChange:p=>{a(p.target.value),l(null)},readOnly:i,spellCheck:!1,className:"df-scroll min-h-0 flex-1 resize-none border-0 bg-transparent p-3 font-mono text-xs leading-relaxed outline-none",style:{color:"var(--color-text)"},"aria-label":`Diagram ${r} source`})]})}function SO(){const t=_e(r=>r.readOnly),e=_e(r=>r.setReadOnly);return t?_.jsxs("div",{className:"flex items-center gap-2 border-b px-3 py-1.5 text-sm",style:{background:"#fef3c7",color:"#92400e",borderColor:"#fcd34d"},role:"status",children:[_.jsx(Wc,{size:16}),_.jsx("span",{className:"flex-1",children:"View-only mode — editing is disabled. Pan and zoom still work."}),_.jsx("button",{type:"button",onClick:()=>e(!1),className:"rounded px-2 py-0.5 text-xs font-medium hover:brightness-95",style:{background:"#fde68a"},children:"Enable editing"}),_.jsx("button",{type:"button","aria-label":"Dismiss",onClick:()=>e(!1),className:"rounded p-1 hover:brightness-95",children:_.jsx(lo,{size:14})})]}):null}const FO=3e3;function IO(){const[t,e]=ke.useState("idle"),r=ke.useRef(!1),A=ke.useRef(null);return ke.useEffect(()=>{if(!Ba("persistence")){r.current=!0;return}if(window.location.hash.startsWith("#d=")||window.location.hash.startsWith("#dv=")){r.current=!0;return}let n=!1;return(async()=>{try{const i=await IT();!n&&i&&Qe.getState().replaceProject(i)}finally{r.current=!0}})(),()=>{n=!0}},[]),ke.useEffect(()=>{if(!Ba("persistence"))return;const n=Qe.subscribe((i,s)=>{_e.getState().readOnly||!r.current||i.project===s.project||(e("saving"),A.current&&clearTimeout(A.current),A.current=setTimeout(()=>{FT(Qe.getState().project).then(()=>e("saved"))},FO))});return()=>{n(),A.current&&clearTimeout(A.current)}},[]),t}function UO(t,e){const r=t.toLowerCase().split("+"),A=r.includes("mod"),n=r.includes("shift"),i=r.includes("alt"),s=r[r.length-1],a=e.metaKey||e.ctrlKey;return A===a&&n===e.shiftKey&&i===e.altKey&&e.key.toLowerCase()===s}const _O={v:"select",h:"pan",r:"rectangle",o:"ellipse",d:"diamond",t:"text",c:"connector",n:"sticky-note",p:"pen",e:"eraser"};function QO(t){if(!(t instanceof HTMLElement))return!1;const e=t.tagName;return e==="INPUT"||e==="TEXTAREA"||t.isContentEditable}function kO(){ke.useEffect(()=>{const t=e=>{const r=_e.getState();if(r.editingTextId||QO(e.target)||r.readOnly&&e.key!=="Escape"&&e.key!=="F5")return;const A=e.metaKey||e.ctrlKey,n=e.key.toLowerCase();for(const s of FA.shortcuts())if(UO(s.combo,e)){e.preventDefault(),FA.runCommand(s.command);return}if(A)switch(n){case"z":e.preventDefault(),e.shiftKey?Et.getState().redo():Et.getState().undo();return;case"y":e.preventDefault(),Et.getState().redo();return;case"a":e.preventDefault(),gB();return;case"c":dp();return;case"x":RB();return;case"v":jB();return;case"d":e.preventDefault(),hB();return;case"g":e.preventDefault(),e.shiftKey?np():Ap();return;case"s":e.preventDefault(),Xe.emit("export:request",{format:"json"});return;case"f":e.preventDefault(),r.setSearchOpen(!0);return;case"p":e.preventDefault(),Xe.emit("export:request",{format:"pdf"});return;case"j":if(e.shiftKey){e.preventDefault();const s=r.viewMode;r.setViewMode(s==="source"?"canvas":"source")}return;case"k":e.shiftKey&&(e.preventDefault(),r.setViewMode(r.viewMode==="split"?"canvas":"split"));return;default:return}switch(e.key){case"Delete":case"Backspace":e.preventDefault(),fB();return;case"Escape":if(r.activeGroupId){r.setActiveGroupId(null);return}r.searchOpen&&r.setSearchOpen(!1),r.shortcutsOpen&&r.setShortcutsOpen(!1),r.templatesOpen&&r.setTemplatesOpen(!1),r.welcomeOpen&&r.setWelcomeOpen(!1),r.presentationOpen&&r.setPresentationOpen(!1),r.formatPainterActive&&$d(),r.clearSelection(),r.setTool("select");return;case"ArrowUp":e.preventDefault(),Fu(0,e.shiftKey?-10:-1);return;case"ArrowDown":e.preventDefault(),Fu(0,e.shiftKey?10:1);return;case"ArrowLeft":e.preventDefault(),Fu(e.shiftKey?-10:-1,0);return;case"ArrowRight":e.preventDefault(),Fu(e.shiftKey?10:1,0);return}if(e.key==="1"&&e.shiftKey){Xe.emit("zoom:fit",void 0);return}if(e.key==="?"){e.preventDefault(),r.setShortcutsOpen(!0);return}if(e.key==="F5"){e.preventDefault(),!r.readOnly&&!r.presentationOpen&&sp();return}const i=_O[n];i&&!e.shiftKey&&r.setTool(i)};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[])}const LO=".json,.dgm.json,.svg,.drawio,.xml,image/*";function TO(){const t=document.createElement("input");t.type="file",t.accept=LO,t.onchange=()=>{const e=t.files?.[0];e&&FB(e)},t.click()}async function NO(t){const e=Qe.getState(),r=e.project,A=e.activePage();switch(t){case"svg":Hy(r,A);break;case"png":await Ry(r,A);break;case"pdf":await jy(r,A);break;case"json":Ky(r);break;case"zip":await zy(r);break}}function OO(){ke.useEffect(()=>{const t=Xe.on("export:request",({format:r})=>{NO(r).catch(A=>{const n=A instanceof Error?A.message:"Export failed";Xe.emit("toast",{message:n,kind:"error"})})}),e=Xe.on("import:request",()=>TO());return()=>{t(),e()}},[])}function PO(){const t=_e(A=>A.setTemplatesOpen),e=_e(A=>A.setShortcutsOpen),r=_e(A=>A.setWelcomeOpen);QT(),ke.useEffect(()=>{const A=Xe.on("templates:open",()=>t(!0)),n=Xe.on("shortcuts:open",()=>e(!0)),i=Xe.on("welcome:open",()=>r(!0));return()=>{A(),n(),i()}},[t,e,r])}const MO={idle:"",saving:"Saving...",saved:"All changes saved"};function DO(){const t=_e(o=>o.sidebarOpen),e=_e(o=>o.propertyPanelOpen),r=_e(o=>o.readOnly),A=_e(o=>o.viewMode),n=IO();kO(),OO(),PO();const i=A==="canvas"||A==="split",s=A==="source"||A==="split",a=A==="canvas";return _.jsxs("div",{className:"flex h-full w-full flex-col overflow-hidden",children:[_.jsx(SO,{}),!r&&_.jsx(Xk,{}),_.jsxs("div",{className:"flex min-h-0 flex-1",children:[t&&!r&&a&&_.jsx(bL,{}),_.jsxs("main",{className:`relative min-w-0 flex-1 ${A==="split"?"flex flex-row":""}`,children:[i&&_.jsxs("div",{className:A==="split"?"relative min-h-0 min-w-0 flex-1":"absolute inset-0",children:[_.jsx(QB,{}),!r&&i&&_.jsx(DL,{}),a&&!r&&Ba("minimap")&&_.jsx(CL,{}),a&&!r&&_.jsx(xL,{}),a&&!r&&_.jsx("span",{className:"pointer-events-none absolute bottom-2 right-3 text-[11px]",style:{color:"var(--color-text-muted)"},children:MO[n]})]}),s&&Ba("sourceEditor")&&_.jsx("div",{className:A==="split"?"min-h-0 min-w-0 flex-1 border-l bordered":"absolute inset-0 z-20",children:_.jsx(EO,{embedded:A==="split"})})]}),e&&!r&&a&&_.jsx(TL,{})]}),!r&&_.jsx(NL,{}),!r&&a&&_.jsx(ML,{}),!r&&a&&Ba("ai")&&_.jsx(lT,{}),Ba("welcome")&&_.jsx(_T,{}),!r&&a&&_.jsx(PT,{}),!r&&a&&_.jsx(DT,{}),Ba("presentation")&&_.jsx($k,{}),_.jsx(fT,{})]})}const HO={id:"builtin.diagram-stats",name:"Diagram Stats",version:"1.0.0",description:"Reports counts of shapes, connectors, layers, and pages.",activate(t){t.registerCommand({id:"diagram-stats.show",title:"Diagram statistics",icon:"BarChart3",run:()=>{const e=t.getActivePage(),r=t.getProject(),A=Object.values(e.shapes).filter(i=>i.kind!=="group").length,n=Object.keys(e.edges).length;t.notify(`${A} shapes · ${n} connectors · ${e.layers.length} layers · ${r.pages.length} pages`,"info")}}),t.registerToolbarItem({id:"diagram-stats.toolbar",title:"Diagram statistics",icon:"BarChart3",command:"diagram-stats.show"}),t.registerShortcut({combo:"mod+shift+i",command:"diagram-stats.show"})}},RO={id:"builtin.mermaid-export",name:"Mermaid Export",version:"1.0.0",description:"Export the active page as a Mermaid flowchart.",activate(t){t.registerExporter({id:"mermaid",title:"Export as Mermaid",extension:"mmd",mimeType:"text/vnd.mermaid",serialize:(e,r)=>qb(r)})}};function Jb(t){const e=Wb(t);if(e)throw new Error(e)}const Zb="mermaid.import";function jO(t){const e=window.prompt('Paste Mermaid flowchart source (flowchart TD with A["Label"] and A --> B):');if(e?.trim())try{Jb(e.trim()),t("Mermaid diagram imported.","success")}catch(r){const A=r instanceof Error?r.message:"Mermaid import failed.";t(A,"error")}}const KO={id:"builtin.mermaid-import",name:"Mermaid Import",version:"1.0.0",description:"Import Mermaid flowcharts onto the canvas.",activate(t){t.registerCommand({id:Zb,title:"Import Mermaid",run:()=>jO(t.notify)}),t.registerMenuItem({id:"mermaid-import",title:"Import Mermaid...",command:Zb}),t.registerImporter({id:"mermaid",title:"Import Mermaid",extensions:["mmd","mermaid"],handle:e=>{Jb(e),t.notify("Mermaid diagram imported.","success")}})}};let rg=0;function zO(t){return rg+=1,`p${rg}_${t.replace(/\W+/g,"_").slice(0,20)||"node"}`}function GO(t){rg=0;const e=[],r=[],A=new Map;let n=null;const i=(s,a="activity")=>{const o=a==="activity"?s:a,l=A.get(o);if(l)return l;const c=zO(o);return A.set(o,c),e.push({id:c,label:a==="activity"?s:a,kind:a}),c};for(const s of t.split(`
|
|
128
|
+
`)){const a=s.trim();if(!a||a.startsWith("@")||a.startsWith("skinparam")||a.startsWith("title"))continue;if(/^start$/i.test(a)){n=i("start","start");continue}if(/^stop$/i.test(a)||/^end$/i.test(a)){n=i("stop","stop");continue}const o=a.match(/^:(.+);$/);if(o){const f=o[1].trim(),h=i(f);n&&r.push({from:n,to:h}),n=h;continue}const l=a.match(/^(\w+)\s*[-=]+>\s*(\w+)(?:\s*:\s*(.+))?$/);if(l){const f=i(l[1]),h=i(l[2]);r.push({from:f,to:h}),n=h;continue}const c=a.match(/^(\w+)\s*-->\s*(\w+)/);if(c){const f=i(c[1]),h=i(c[2]);r.push({from:f,to:h}),n=h}}return{nodes:e,edges:r}}function VO(t){return t.kind==="start"||t.kind==="stop"?"ellipse":"rounded-rectangle"}function e5(t){const{nodes:e,edges:r}=GO(t);if(e.length===0)throw new Error("No PlantUML nodes found. Use activity syntax like :Step; or A -> B.");const A=Qe.getState(),n=A.activePage(),i=n.layers[0].id,s=new Map,a=e.map((f,h)=>{const u=vr({kind:VO(f),x:0,y:0,width:f.kind==="activity"?160:72,height:f.kind==="activity"?64:72,text:f.label},i,h);return s.set(f.id,u.id),u}),o=r.map(f=>{const h=s.get(f.from),u=s.get(f.to);return!h||!u?null:Xr({source:{shapeId:h},target:{shapeId:u},router:"orthogonal",endArrow:"triangle"},i)}).filter(f=>f!==null),l={...n,shapes:Object.fromEntries(a.map(f=>[f.id,f])),edges:Object.fromEntries(o.map(f=>[f.id,f])),order:[...a.map(f=>f.id),...o.map(f=>f.id)]},c=Wd(l);Et.getState().run("Import PlantUML",()=>{A.addShapes(a.map(f=>({...f,...c[f.id]})));for(const f of o)A.addEdge(f);_e.getState().select(a.map(f=>f.id))})}const t5="plantuml.import",qO={id:"builtin.plantuml-import",name:"PlantUML Import",version:"1.0.0",description:"Import PlantUML activity diagrams onto the canvas.",activate(t){t.registerCommand({id:t5,title:"Import PlantUML",run:()=>{const e=window.prompt("Paste PlantUML source (activity :Step; syntax or A -> B arrows):");if(e?.trim())try{e5(e.trim()),t.notify("PlantUML diagram imported.","success")}catch(r){const A=r instanceof Error?r.message:"PlantUML import failed.";t.notify(A,"error")}}}),t.registerMenuItem({id:"plantuml-import",title:"Import PlantUML...",command:t5}),t.registerImporter({id:"plantuml",title:"Import PlantUML",extensions:["puml","plantuml","uml"],handle:e=>{e5(e),t.notify("PlantUML diagram imported.","success")}})}};let r5=!1;function WO(){r5||(FA.register(HO),FA.register(RO),FA.register(KO),FA.register(qO),r5=!0)}function A5(t){return t==="system"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":t}let n5=!1;function $O(){n5||(vL(),WO(),n5=!0)}function YO({initialProject:t,onChange:e,readOnly:r=!1,apiBaseUrl:A,features:n,themeMode:i="system",height:s="100%",width:a="100%",style:o,className:l,standalone:c=!1}){$O();const f=ke.useRef(null),h=ke.useRef(e);h.current=e;const[u,g]=ke.useState(()=>A5(i));return ke.useEffect(()=>{qL({apiBaseUrl:A,features:n,onChange:e,standalone:c})},[A,n,e,c]),ke.useEffect(()=>{_e.getState().setThemeMode(i)},[i]),ke.useEffect(()=>{const p=()=>{const m=A5(i);g(m),f.current?.setAttribute("data-theme",m)};if(p(),i!=="system")return;const w=window.matchMedia("(prefers-color-scheme: dark)");return w.addEventListener("change",p),()=>w.removeEventListener("change",p)},[i]),ke.useEffect(()=>{const p=t??Gn();Qe.getState().replaceProject(p),Et.getState().clear()},[t]),ke.useEffect(()=>{_e.getState().setReadOnly(r)},[r]),ke.useEffect(()=>{c&&document.documentElement.setAttribute("data-theme",u)},[c,u]),ke.useEffect(()=>{if(e)return Qe.subscribe((p,w)=>{p.project!==w.project&&h.current?.(p.project)})},[e]),ke.useEffect(()=>()=>{WL(),Qe.getState().replaceProject(Gn()),Et.getState().clear(),_e.getState().setReadOnly(!1),_e.getState().clearSelection()},[]),_.jsx("div",{ref:f,className:l?`diagramforge-root ${l}`:"diagramforge-root","data-theme":u,style:{height:s,width:a,display:"flex",flexDirection:"column",overflow:"hidden",...o},children:_.jsx(DO,{})})}var Ag=function(t,e){return Ag=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,A){r.__proto__=A}||function(r,A){for(var n in A)Object.prototype.hasOwnProperty.call(A,n)&&(r[n]=A[n])},Ag(t,e)};function Jn(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Ag(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var ng=function(){return ng=Object.assign||function(e){for(var r,A=1,n=arguments.length;A<n;A++){r=arguments[A];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},ng.apply(this,arguments)};function zA(t,e,r,A){function n(i){return i instanceof r?i:new r(function(s){s(i)})}return new(r||(r=Promise))(function(i,s){function a(c){try{l(A.next(c))}catch(f){s(f)}}function o(c){try{l(A.throw(c))}catch(f){s(f)}}function l(c){c.done?i(c.value):n(c.value).then(a,o)}l((A=A.apply(t,[])).next())})}function NA(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},A,n,i,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(c){return o([l,c])}}function o(l){if(A)throw new TypeError("Generator is already executing.");for(;r;)try{if(A=1,n&&(i=l[0]&2?n.return:l[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,l[1])).done)return i;switch(n=0,i&&(l=[l[0]&2,i.value]),l[0]){case 0:case 1:i=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,n=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]<i[3])){r.label=l[1];break}if(l[0]===6&&r.label<i[1]){r.label=i[1],i=l;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(l);break}i[2]&&r.ops.pop(),r.trys.pop();continue}l=e.call(t,r)}catch(c){l=[6,c],n=0}finally{A=i=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function Yu(t,e,r){if(arguments.length===2)for(var A=0,n=e.length,i;A<n;A++)(i||!(A in e))&&(i||(i=Array.prototype.slice.call(e,0,A)),i[A]=e[A]);return t.concat(i||e)}for(var Pi=(function(){function t(e,r,A,n){this.left=e,this.top=r,this.width=A,this.height=n}return t.prototype.add=function(e,r,A,n){return new t(this.left+e,this.top+r,this.width+A,this.height+n)},t.fromClientRect=function(e,r){return new t(r.left+e.windowBounds.left,r.top+e.windowBounds.top,r.width,r.height)},t.fromDOMRectList=function(e,r){var A=Array.from(r).find(function(n){return n.width!==0});return A?new t(A.left+e.windowBounds.left,A.top+e.windowBounds.top,A.width,A.height):t.EMPTY},t.EMPTY=new t(0,0,0,0),t})(),Xu=function(t,e){return Pi.fromClientRect(t,e.getBoundingClientRect())},XO=function(t){var e=t.body,r=t.documentElement;if(!e||!r)throw new Error("Unable to get document size");var A=Math.max(Math.max(e.scrollWidth,r.scrollWidth),Math.max(e.offsetWidth,r.offsetWidth),Math.max(e.clientWidth,r.clientWidth)),n=Math.max(Math.max(e.scrollHeight,r.scrollHeight),Math.max(e.offsetHeight,r.offsetHeight),Math.max(e.clientHeight,r.clientHeight));return new Pi(0,0,A,n)},Ju=function(t){for(var e=[],r=0,A=t.length;r<A;){var n=t.charCodeAt(r++);if(n>=55296&&n<=56319&&r<A){var i=t.charCodeAt(r++);(i&64512)===56320?e.push(((n&1023)<<10)+(i&1023)+65536):(e.push(n),r--)}else e.push(n)}return e},Tr=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(String.fromCodePoint)return String.fromCodePoint.apply(String,t);var r=t.length;if(!r)return"";for(var A=[],n=-1,i="";++n<r;){var s=t[n];s<=65535?A.push(s):(s-=65536,A.push((s>>10)+55296,s%1024+56320)),(n+1===r||A.length>16384)&&(i+=String.fromCharCode.apply(String,A),A.length=0)}return i},i5="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",JO=typeof Uint8Array>"u"?[]:new Uint8Array(256),Zu=0;Zu<i5.length;Zu++)JO[i5.charCodeAt(Zu)]=Zu;for(var a5="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",zl=typeof Uint8Array>"u"?[]:new Uint8Array(256),ef=0;ef<a5.length;ef++)zl[a5.charCodeAt(ef)]=ef;for(var ZO=function(t){var e=t.length*.75,r=t.length,A,n=0,i,s,a,o;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);var l=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&typeof Uint8Array.prototype.slice<"u"?new ArrayBuffer(e):new Array(e),c=Array.isArray(l)?l:new Uint8Array(l);for(A=0;A<r;A+=4)i=zl[t.charCodeAt(A)],s=zl[t.charCodeAt(A+1)],a=zl[t.charCodeAt(A+2)],o=zl[t.charCodeAt(A+3)],c[n++]=i<<2|s>>4,c[n++]=(s&15)<<4|a>>2,c[n++]=(a&3)<<6|o&63;return l},eP=function(t){for(var e=t.length,r=[],A=0;A<e;A+=2)r.push(t[A+1]<<8|t[A]);return r},tP=function(t){for(var e=t.length,r=[],A=0;A<e;A+=4)r.push(t[A+3]<<24|t[A+2]<<16|t[A+1]<<8|t[A]);return r},Us=5,ig=11,ag=2,rP=ig-Us,s5=65536>>Us,AP=1<<Us,sg=AP-1,nP=1024>>Us,iP=s5+nP,aP=iP,sP=32,oP=aP+sP,lP=65536>>ig,cP=1<<rP,uP=cP-1,o5=function(t,e,r){return t.slice?t.slice(e,r):new Uint16Array(Array.prototype.slice.call(t,e,r))},fP=function(t,e,r){return t.slice?t.slice(e,r):new Uint32Array(Array.prototype.slice.call(t,e,r))},hP=function(t,e){var r=ZO(t),A=Array.isArray(r)?tP(r):new Uint32Array(r),n=Array.isArray(r)?eP(r):new Uint16Array(r),i=24,s=o5(n,i/2,A[4]/2),a=A[5]===2?o5(n,(i+A[4])/2):fP(A,Math.ceil((i+A[4])/4));return new dP(A[0],A[1],A[2],A[3],s,a)},dP=(function(){function t(e,r,A,n,i,s){this.initialValue=e,this.errorValue=r,this.highStart=A,this.highValueIndex=n,this.index=i,this.data=s}return t.prototype.get=function(e){var r;if(e>=0){if(e<55296||e>56319&&e<=65535)return r=this.index[e>>Us],r=(r<<ag)+(e&sg),this.data[r];if(e<=65535)return r=this.index[s5+(e-55296>>Us)],r=(r<<ag)+(e&sg),this.data[r];if(e<this.highStart)return r=oP-lP+(e>>ig),r=this.index[r],r+=e>>Us&uP,r=this.index[r],r=(r<<ag)+(e&sg),this.data[r];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},t})(),l5="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",pP=typeof Uint8Array>"u"?[]:new Uint8Array(256),tf=0;tf<l5.length;tf++)pP[l5.charCodeAt(tf)]=tf;var gP="KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF8AZwBgAGgAcQB5AHUAfQCFAI0AlQCdAKIAqgCyALoAYABoAGAAaABgAGgAwgDKAGAAaADGAM4A0wDbAOEA6QDxAPkAAQEJAQ8BFwF1AH0AHAEkASwBNAE6AUIBQQFJAVEBWQFhAWgBcAF4ATAAgAGGAY4BlQGXAZ8BpwGvAbUBvQHFAc0B0wHbAeMB6wHxAfkBAQIJAvEBEQIZAiECKQIxAjgCQAJGAk4CVgJeAmQCbAJ0AnwCgQKJApECmQKgAqgCsAK4ArwCxAIwAMwC0wLbAjAA4wLrAvMC+AIAAwcDDwMwABcDHQMlAy0DNQN1AD0DQQNJA0kDSQNRA1EDVwNZA1kDdQB1AGEDdQBpA20DdQN1AHsDdQCBA4kDkQN1AHUAmQOhA3UAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AKYDrgN1AHUAtgO+A8YDzgPWAxcD3gPjA+sD8wN1AHUA+wMDBAkEdQANBBUEHQQlBCoEFwMyBDgEYABABBcDSARQBFgEYARoBDAAcAQzAXgEgASIBJAEdQCXBHUAnwSnBK4EtgS6BMIEyAR1AHUAdQB1AHUAdQCVANAEYABgAGAAYABgAGAAYABgANgEYADcBOQEYADsBPQE/AQEBQwFFAUcBSQFLAU0BWQEPAVEBUsFUwVbBWAAYgVgAGoFcgV6BYIFigWRBWAAmQWfBaYFYABgAGAAYABgAKoFYACxBbAFuQW6BcEFwQXHBcEFwQXPBdMF2wXjBeoF8gX6BQIGCgYSBhoGIgYqBjIGOgZgAD4GRgZMBmAAUwZaBmAAYABgAGAAYABgAGAAYABgAGAAYABgAGIGYABpBnAGYABgAGAAYABgAGAAYABgAGAAYAB4Bn8GhQZgAGAAYAB1AHcDFQSLBmAAYABgAJMGdQA9A3UAmwajBqsGqwaVALMGuwbDBjAAywbSBtIG1QbSBtIG0gbSBtIG0gbdBuMG6wbzBvsGAwcLBxMHAwcbByMHJwcsBywHMQcsB9IGOAdAB0gHTgfSBkgHVgfSBtIG0gbSBtIG0gbSBtIG0gbSBiwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdbB2MHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB2kH0gZwB64EdQB1AHUAdQB1AHUAdQB1AHUHfQdgAIUHjQd1AHUAlQedB2AAYAClB6sHYACzB7YHvgfGB3UAzgfWBzMB3gfmB1EB7gf1B/0HlQENAQUIDQh1ABUIHQglCBcDLQg1CD0IRQhNCEEDUwh1AHUAdQBbCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIcAh3CHoIMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIgggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAALAcsBywHLAcsBywHLAcsBywHLAcsB4oILAcsB44I0gaWCJ4Ipgh1AHUAqgiyCHUAdQB1AHUAdQB1AHUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB9cPKwkyCToJMAB1AHUAdQBCCUoJTQl1AFUJXAljCWcJawkwADAAMAAwAHMJdQB2CX4JdQCECYoJjgmWCXUAngkwAGAAYABxAHUApgn3A64JtAl1ALkJdQDACTAAMAAwADAAdQB1AHUAdQB1AHUAdQB1AHUAowYNBMUIMAAwADAAMADICcsJ0wnZCRUE4QkwAOkJ8An4CTAAMAB1AAAKvwh1AAgKDwoXCh8KdQAwACcKLgp1ADYKqAmICT4KRgowADAAdQB1AE4KMAB1AFYKdQBeCnUAZQowADAAMAAwADAAMAAwADAAMAAVBHUAbQowADAAdQC5CXUKMAAwAHwBxAijBogEMgF9CoQKiASMCpQKmgqIBKIKqgquCogEDQG2Cr4KxgrLCjAAMADTCtsKCgHjCusK8Qr5CgELMAAwADAAMAB1AIsECQsRC3UANAEZCzAAMAAwADAAMAB1ACELKQswAHUANAExCzkLdQBBC0kLMABRC1kLMAAwADAAMAAwADAAdQBhCzAAMAAwAGAAYABpC3ELdwt/CzAAMACHC4sLkwubC58Lpwt1AK4Ltgt1APsDMAAwADAAMAAwADAAMAAwAL4LwwvLC9IL1wvdCzAAMADlC+kL8Qv5C/8LSQswADAAMAAwADAAMAAwADAAMAAHDDAAMAAwADAAMAAODBYMHgx1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1ACYMMAAwADAAdQB1AHUALgx1AHUAdQB1AHUAdQA2DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AD4MdQBGDHUAdQB1AHUAdQB1AEkMdQB1AHUAdQB1AFAMMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQBYDHUAdQB1AF8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUA+wMVBGcMMAAwAHwBbwx1AHcMfwyHDI8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAYABgAJcMMAAwADAAdQB1AJ8MlQClDDAAMACtDCwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB7UMLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AA0EMAC9DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAsBywHLAcsBywHLAcsBywHLQcwAMEMyAwsBywHLAcsBywHLAcsBywHLAcsBywHzAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1ANQM2QzhDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABgAGAAYABgAGAAYABgAOkMYADxDGAA+AwADQYNYABhCWAAYAAODTAAMAAwADAAFg1gAGAAHg37AzAAMAAwADAAYABgACYNYAAsDTQNPA1gAEMNPg1LDWAAYABgAGAAYABgAGAAYABgAGAAUg1aDYsGVglhDV0NcQBnDW0NdQ15DWAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAlQCBDZUAiA2PDZcNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAnw2nDTAAMAAwADAAMAAwAHUArw23DTAAMAAwADAAMAAwADAAMAAwADAAMAB1AL8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQDHDTAAYABgAM8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA1w11ANwNMAAwAD0B5A0wADAAMAAwADAAMADsDfQN/A0EDgwOFA4wABsOMAAwADAAMAAwADAAMAAwANIG0gbSBtIG0gbSBtIG0gYjDigOwQUuDsEFMw7SBjoO0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGQg5KDlIOVg7SBtIGXg5lDm0OdQ7SBtIGfQ6EDooOjQ6UDtIGmg6hDtIG0gaoDqwO0ga0DrwO0gZgAGAAYADEDmAAYAAkBtIGzA5gANIOYADaDokO0gbSBt8O5w7SBu8O0gb1DvwO0gZgAGAAxA7SBtIG0gbSBtIGYABgAGAAYAAED2AAsAUMD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHJA8sBywHLAcsBywHLAccDywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywPLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAc0D9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHPA/SBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gYUD0QPlQCVAJUAMAAwADAAMACVAJUAlQCVAJUAlQCVAEwPMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA//8EAAQABAAEAAQABAAEAAQABAANAAMAAQABAAIABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACgATABcAHgAbABoAHgAXABYAEgAeABsAGAAPABgAHABLAEsASwBLAEsASwBLAEsASwBLABgAGAAeAB4AHgATAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAGwASAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWAA0AEQAeAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAFAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJABYAGgAbABsAGwAeAB0AHQAeAE8AFwAeAA0AHgAeABoAGwBPAE8ADgBQAB0AHQAdAE8ATwAXAE8ATwBPABYAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAFAATwBAAE8ATwBPAEAATwBQAFAATwBQAB4AHgAeAB4AHgAeAB0AHQAdAB0AHgAdAB4ADgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgBQAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkACQAJAAkACQAJAAkABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAFAAHgAeAB4AKwArAFAAUABQAFAAGABQACsAKwArACsAHgAeAFAAHgBQAFAAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwBWAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUAAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAAQAUABQAFAAUABQAFAABABQAFAABAAEAAQAUAArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQACsAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQACsAKwAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQACsAHgAeAB4AHgAeAB4AHgAOAB4AKwANAA0ADQANAA0ADQANAAkADQANAA0ACAAEAAsABAAEAA0ACQANAA0ADAAdAB0AHgAXABcAFgAXABcAFwAWABcAHQAdAB4AHgAUABQAFAANAAEAAQAEAAQABAAEAAQACQAaABoAGgAaABoAGgAaABoAHgAXABcAHQAVABUAHgAeAB4AHgAeAB4AGAAWABEAFQAVABUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ADQAeAA0ADQANAA0AHgANAA0ADQAHAB4AHgAeAB4AKwAEAAQABAAEAAQABAAEAAQABAAEAFAAUAArACsATwBQAFAAUABQAFAAHgAeAB4AFgARAE8AUABPAE8ATwBPAFAAUABQAFAAUAAeAB4AHgAWABEAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArABsAGwAbABsAGwAbABsAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGgAbABsAGwAbABoAGwAbABoAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAHgAeAFAAGgAeAB0AHgBQAB4AGgAeAB4AHgAeAB4AHgAeAB4AHgBPAB4AUAAbAB4AHgBQAFAAUABQAFAAHgAeAB4AHQAdAB4AUAAeAFAAHgBQAB4AUABPAFAAUAAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgBQAFAAUABQAE8ATwBQAFAAUABQAFAATwBQAFAATwBQAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAUABQAFAATwBPAE8ATwBPAE8ATwBPAE8ATwBQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABPAB4AHgArACsAKwArAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHQAdAB4AHgAeAB0AHQAeAB4AHQAeAB4AHgAdAB4AHQAbABsAHgAdAB4AHgAeAB4AHQAeAB4AHQAdAB0AHQAeAB4AHQAeAB0AHgAdAB0AHQAdAB0AHQAeAB0AHgAeAB4AHgAeAB0AHQAdAB0AHgAeAB4AHgAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB0AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAdAB0AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAWABEAHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AHQAdAB0AHgAeAB0AHgAeAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlAB4AHQAdAB4AHgAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AJQAlAB0AHQAlAB4AJQAlACUAIAAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAdAB0AHQAeAB0AJQAdAB0AHgAdAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAdAB0AHQAdACUAHgAlACUAJQAdACUAJQAdAB0AHQAlACUAHQAdACUAHQAdACUAJQAlAB4AHQAeAB4AHgAeAB0AHQAlAB0AHQAdAB0AHQAdACUAJQAlACUAJQAdACUAJQAgACUAHQAdACUAJQAlACUAJQAlACUAJQAeAB4AHgAlACUAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AFwAXABcAFwAXABcAHgATABMAJQAeAB4AHgAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARABYAEQAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHAEcAVwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwAlACUAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACsAKwArACsAKwArACsAKwArACsAKwArAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBPAE8ATwBPAE8ATwBPAE8AJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADQATAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAeAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQAHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAKwArAFAAKwArAFAAUAArACsAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAHgAeAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeACsAKwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4ABAAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAHgAeAA0ADQANAA0AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAlAB4AJQAeACUAJQAlACUAJQAgACUAJQAlACUAHgAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACAAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABcAFwAXABUAFQAVAB4AHgAeAB4AJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAgACUAJQAgACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAIAAgACUAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACAAIAAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACAAIAAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA==",c5=50,vP=1,u5=2,f5=3,mP=4,wP=5,h5=7,d5=8,p5=9,Sa=10,og=11,g5=12,lg=13,yP=14,Gl=15,cg=16,rf=17,Vl=18,BP=19,v5=20,ug=21,ql=22,fg=23,Mo=24,wn=25,Wl=26,$l=27,Do=28,bP=29,_s=30,CP=31,Af=32,nf=33,hg=34,dg=35,pg=36,Yl=37,gg=38,af=39,sf=40,vg=41,m5=42,xP=43,EP=[9001,65288],w5="!",Dt="×",of="÷",mg=hP(gP),Mi=[_s,pg],wg=[vP,u5,f5,wP],y5=[Sa,d5],B5=[$l,Wl],SP=wg.concat(y5),b5=[gg,af,sf,hg,dg],FP=[Gl,lg],IP=function(t,e){e===void 0&&(e="strict");var r=[],A=[],n=[];return t.forEach(function(i,s){var a=mg.get(i);if(a>c5?(n.push(!0),a-=c5):n.push(!1),["normal","auto","loose"].indexOf(e)!==-1&&[8208,8211,12316,12448].indexOf(i)!==-1)return A.push(s),r.push(cg);if(a===mP||a===og){if(s===0)return A.push(s),r.push(_s);var o=r[s-1];return SP.indexOf(o)===-1?(A.push(A[s-1]),r.push(o)):(A.push(s),r.push(_s))}if(A.push(s),a===CP)return r.push(e==="strict"?ug:Yl);if(a===m5||a===bP)return r.push(_s);if(a===xP)return i>=131072&&i<=196605||i>=196608&&i<=262141?r.push(Yl):r.push(_s);r.push(a)}),[A,r,n]},yg=function(t,e,r,A){var n=A[r];if(Array.isArray(t)?t.indexOf(n)!==-1:t===n)for(var i=r;i<=A.length;){i++;var s=A[i];if(s===e)return!0;if(s!==Sa)break}if(n===Sa)for(var i=r;i>0;){i--;var a=A[i];if(Array.isArray(t)?t.indexOf(a)!==-1:t===a)for(var o=r;o<=A.length;){o++;var s=A[o];if(s===e)return!0;if(s!==Sa)break}if(a!==Sa)break}return!1},C5=function(t,e){for(var r=t;r>=0;){var A=e[r];if(A===Sa)r--;else return A}return 0},UP=function(t,e,r,A,n){if(r[A]===0)return Dt;var i=A-1;if(Array.isArray(n)&&n[i]===!0)return Dt;var s=i-1,a=i+1,o=e[i],l=s>=0?e[s]:0,c=e[a];if(o===u5&&c===f5)return Dt;if(wg.indexOf(o)!==-1)return w5;if(wg.indexOf(c)!==-1||y5.indexOf(c)!==-1)return Dt;if(C5(i,e)===d5)return of;if(mg.get(t[i])===og||(o===Af||o===nf)&&mg.get(t[a])===og||o===h5||c===h5||o===p5||[Sa,lg,Gl].indexOf(o)===-1&&c===p5||[rf,Vl,BP,Mo,Do].indexOf(c)!==-1||C5(i,e)===ql||yg(fg,ql,i,e)||yg([rf,Vl],ug,i,e)||yg(g5,g5,i,e))return Dt;if(o===Sa)return of;if(o===fg||c===fg)return Dt;if(c===cg||o===cg)return of;if([lg,Gl,ug].indexOf(c)!==-1||o===yP||l===pg&&FP.indexOf(o)!==-1||o===Do&&c===pg||c===v5||Mi.indexOf(c)!==-1&&o===wn||Mi.indexOf(o)!==-1&&c===wn||o===$l&&[Yl,Af,nf].indexOf(c)!==-1||[Yl,Af,nf].indexOf(o)!==-1&&c===Wl||Mi.indexOf(o)!==-1&&B5.indexOf(c)!==-1||B5.indexOf(o)!==-1&&Mi.indexOf(c)!==-1||[$l,Wl].indexOf(o)!==-1&&(c===wn||[ql,Gl].indexOf(c)!==-1&&e[a+1]===wn)||[ql,Gl].indexOf(o)!==-1&&c===wn||o===wn&&[wn,Do,Mo].indexOf(c)!==-1)return Dt;if([wn,Do,Mo,rf,Vl].indexOf(c)!==-1)for(var f=i;f>=0;){var h=e[f];if(h===wn)return Dt;if([Do,Mo].indexOf(h)!==-1)f--;else break}if([$l,Wl].indexOf(c)!==-1)for(var f=[rf,Vl].indexOf(o)!==-1?s:i;f>=0;){var h=e[f];if(h===wn)return Dt;if([Do,Mo].indexOf(h)!==-1)f--;else break}if(gg===o&&[gg,af,hg,dg].indexOf(c)!==-1||[af,hg].indexOf(o)!==-1&&[af,sf].indexOf(c)!==-1||[sf,dg].indexOf(o)!==-1&&c===sf||b5.indexOf(o)!==-1&&[v5,Wl].indexOf(c)!==-1||b5.indexOf(c)!==-1&&o===$l||Mi.indexOf(o)!==-1&&Mi.indexOf(c)!==-1||o===Mo&&Mi.indexOf(c)!==-1||Mi.concat(wn).indexOf(o)!==-1&&c===ql&&EP.indexOf(t[a])===-1||Mi.concat(wn).indexOf(c)!==-1&&o===Vl)return Dt;if(o===vg&&c===vg){for(var u=r[i],g=1;u>0&&(u--,e[u]===vg);)g++;if(g%2!==0)return Dt}return o===Af&&c===nf?Dt:of},_P=function(t,e){e||(e={lineBreak:"normal",wordBreak:"normal"});var r=IP(t,e.lineBreak),A=r[0],n=r[1],i=r[2];(e.wordBreak==="break-all"||e.wordBreak==="break-word")&&(n=n.map(function(a){return[wn,_s,m5].indexOf(a)!==-1?Yl:a}));var s=e.wordBreak==="keep-all"?i.map(function(a,o){return a&&t[o]>=19968&&t[o]<=40959}):void 0;return[A,n,s]},QP=(function(){function t(e,r,A,n){this.codePoints=e,this.required=r===w5,this.start=A,this.end=n}return t.prototype.slice=function(){return Tr.apply(void 0,this.codePoints.slice(this.start,this.end))},t})(),kP=function(t,e){var r=Ju(t),A=_P(r,e),n=A[0],i=A[1],s=A[2],a=r.length,o=0,l=0;return{next:function(){if(l>=a)return{done:!0,value:null};for(var c=Dt;l<a&&(c=UP(r,i,n,++l,s))===Dt;);if(c!==Dt||l===a){var f=new QP(r,c,o,l);return o=l,{value:f,done:!1}}return{done:!0,value:null}}}},LP=1,TP=2,Xl=4,x5=8,lf=10,E5=47,Jl=92,NP=9,OP=32,cf=34,Zl=61,PP=35,MP=36,DP=37,uf=39,ff=40,ec=41,HP=95,sn=45,RP=33,jP=60,KP=62,zP=64,GP=91,VP=93,qP=61,WP=123,hf=63,$P=125,S5=124,YP=126,XP=128,F5=65533,Bg=42,Qs=43,JP=44,ZP=58,eM=59,tc=46,tM=0,rM=8,AM=11,nM=14,iM=31,aM=127,wi=-1,I5=48,U5=97,_5=101,sM=102,oM=117,lM=122,Q5=65,k5=69,L5=70,cM=85,uM=90,OA=function(t){return t>=I5&&t<=57},fM=function(t){return t>=55296&&t<=57343},Ho=function(t){return OA(t)||t>=Q5&&t<=L5||t>=U5&&t<=sM},hM=function(t){return t>=U5&&t<=lM},dM=function(t){return t>=Q5&&t<=uM},pM=function(t){return hM(t)||dM(t)},gM=function(t){return t>=XP},df=function(t){return t===lf||t===NP||t===OP},pf=function(t){return pM(t)||gM(t)||t===HP},T5=function(t){return pf(t)||OA(t)||t===sn},vM=function(t){return t>=tM&&t<=rM||t===AM||t>=nM&&t<=iM||t===aM},Fa=function(t,e){return t!==Jl?!1:e!==lf},gf=function(t,e,r){return t===sn?pf(e)||Fa(e,r):pf(t)?!0:!!(t===Jl&&Fa(t,e))},bg=function(t,e,r){return t===Qs||t===sn?OA(e)?!0:e===tc&&OA(r):OA(t===tc?e:t)},mM=function(t){var e=0,r=1;(t[e]===Qs||t[e]===sn)&&(t[e]===sn&&(r=-1),e++);for(var A=[];OA(t[e]);)A.push(t[e++]);var n=A.length?parseInt(Tr.apply(void 0,A),10):0;t[e]===tc&&e++;for(var i=[];OA(t[e]);)i.push(t[e++]);var s=i.length,a=s?parseInt(Tr.apply(void 0,i),10):0;(t[e]===k5||t[e]===_5)&&e++;var o=1;(t[e]===Qs||t[e]===sn)&&(t[e]===sn&&(o=-1),e++);for(var l=[];OA(t[e]);)l.push(t[e++]);var c=l.length?parseInt(Tr.apply(void 0,l),10):0;return r*(n+a*Math.pow(10,-s))*Math.pow(10,o*c)},wM={type:2},yM={type:3},BM={type:4},bM={type:13},CM={type:8},xM={type:21},EM={type:9},SM={type:10},FM={type:11},IM={type:12},UM={type:14},vf={type:23},_M={type:1},QM={type:25},kM={type:24},LM={type:26},TM={type:27},NM={type:28},OM={type:29},PM={type:31},Cg={type:32},N5=(function(){function t(){this._value=[]}return t.prototype.write=function(e){this._value=this._value.concat(Ju(e))},t.prototype.read=function(){for(var e=[],r=this.consumeToken();r!==Cg;)e.push(r),r=this.consumeToken();return e},t.prototype.consumeToken=function(){var e=this.consumeCodePoint();switch(e){case cf:return this.consumeStringToken(cf);case PP:var r=this.peekCodePoint(0),A=this.peekCodePoint(1),n=this.peekCodePoint(2);if(T5(r)||Fa(A,n)){var i=gf(r,A,n)?TP:LP,s=this.consumeName();return{type:5,value:s,flags:i}}break;case MP:if(this.peekCodePoint(0)===Zl)return this.consumeCodePoint(),bM;break;case uf:return this.consumeStringToken(uf);case ff:return wM;case ec:return yM;case Bg:if(this.peekCodePoint(0)===Zl)return this.consumeCodePoint(),UM;break;case Qs:if(bg(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case JP:return BM;case sn:var a=e,o=this.peekCodePoint(0),l=this.peekCodePoint(1);if(bg(a,o,l))return this.reconsumeCodePoint(e),this.consumeNumericToken();if(gf(a,o,l))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();if(o===sn&&l===KP)return this.consumeCodePoint(),this.consumeCodePoint(),kM;break;case tc:if(bg(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case E5:if(this.peekCodePoint(0)===Bg)for(this.consumeCodePoint();;){var c=this.consumeCodePoint();if(c===Bg&&(c=this.consumeCodePoint(),c===E5))return this.consumeToken();if(c===wi)return this.consumeToken()}break;case ZP:return LM;case eM:return TM;case jP:if(this.peekCodePoint(0)===RP&&this.peekCodePoint(1)===sn&&this.peekCodePoint(2)===sn)return this.consumeCodePoint(),this.consumeCodePoint(),QM;break;case zP:var f=this.peekCodePoint(0),h=this.peekCodePoint(1),u=this.peekCodePoint(2);if(gf(f,h,u)){var s=this.consumeName();return{type:7,value:s}}break;case GP:return NM;case Jl:if(Fa(e,this.peekCodePoint(0)))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();break;case VP:return OM;case qP:if(this.peekCodePoint(0)===Zl)return this.consumeCodePoint(),CM;break;case WP:return FM;case $P:return IM;case oM:case cM:var g=this.peekCodePoint(0),p=this.peekCodePoint(1);return g===Qs&&(Ho(p)||p===hf)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(e),this.consumeIdentLikeToken();case S5:if(this.peekCodePoint(0)===Zl)return this.consumeCodePoint(),EM;if(this.peekCodePoint(0)===S5)return this.consumeCodePoint(),xM;break;case YP:if(this.peekCodePoint(0)===Zl)return this.consumeCodePoint(),SM;break;case wi:return Cg}return df(e)?(this.consumeWhiteSpace(),PM):OA(e)?(this.reconsumeCodePoint(e),this.consumeNumericToken()):pf(e)?(this.reconsumeCodePoint(e),this.consumeIdentLikeToken()):{type:6,value:Tr(e)}},t.prototype.consumeCodePoint=function(){var e=this._value.shift();return typeof e>"u"?-1:e},t.prototype.reconsumeCodePoint=function(e){this._value.unshift(e)},t.prototype.peekCodePoint=function(e){return e>=this._value.length?-1:this._value[e]},t.prototype.consumeUnicodeRangeToken=function(){for(var e=[],r=this.consumeCodePoint();Ho(r)&&e.length<6;)e.push(r),r=this.consumeCodePoint();for(var A=!1;r===hf&&e.length<6;)e.push(r),r=this.consumeCodePoint(),A=!0;if(A){var n=parseInt(Tr.apply(void 0,e.map(function(o){return o===hf?I5:o})),16),i=parseInt(Tr.apply(void 0,e.map(function(o){return o===hf?L5:o})),16);return{type:30,start:n,end:i}}var s=parseInt(Tr.apply(void 0,e),16);if(this.peekCodePoint(0)===sn&&Ho(this.peekCodePoint(1))){this.consumeCodePoint(),r=this.consumeCodePoint();for(var a=[];Ho(r)&&a.length<6;)a.push(r),r=this.consumeCodePoint();var i=parseInt(Tr.apply(void 0,a),16);return{type:30,start:s,end:i}}else return{type:30,start:s,end:s}},t.prototype.consumeIdentLikeToken=function(){var e=this.consumeName();return e.toLowerCase()==="url"&&this.peekCodePoint(0)===ff?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===ff?(this.consumeCodePoint(),{type:19,value:e}):{type:20,value:e}},t.prototype.consumeUrlToken=function(){var e=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===wi)return{type:22,value:""};var r=this.peekCodePoint(0);if(r===uf||r===cf){var A=this.consumeStringToken(this.consumeCodePoint());return A.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===wi||this.peekCodePoint(0)===ec)?(this.consumeCodePoint(),{type:22,value:A.value}):(this.consumeBadUrlRemnants(),vf)}for(;;){var n=this.consumeCodePoint();if(n===wi||n===ec)return{type:22,value:Tr.apply(void 0,e)};if(df(n))return this.consumeWhiteSpace(),this.peekCodePoint(0)===wi||this.peekCodePoint(0)===ec?(this.consumeCodePoint(),{type:22,value:Tr.apply(void 0,e)}):(this.consumeBadUrlRemnants(),vf);if(n===cf||n===uf||n===ff||vM(n))return this.consumeBadUrlRemnants(),vf;if(n===Jl)if(Fa(n,this.peekCodePoint(0)))e.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),vf;else e.push(n)}},t.prototype.consumeWhiteSpace=function(){for(;df(this.peekCodePoint(0));)this.consumeCodePoint()},t.prototype.consumeBadUrlRemnants=function(){for(;;){var e=this.consumeCodePoint();if(e===ec||e===wi)return;Fa(e,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},t.prototype.consumeStringSlice=function(e){for(var r=5e4,A="";e>0;){var n=Math.min(r,e);A+=Tr.apply(void 0,this._value.splice(0,n)),e-=n}return this._value.shift(),A},t.prototype.consumeStringToken=function(e){var r="",A=0;do{var n=this._value[A];if(n===wi||n===void 0||n===e)return r+=this.consumeStringSlice(A),{type:0,value:r};if(n===lf)return this._value.splice(0,A),_M;if(n===Jl){var i=this._value[A+1];i!==wi&&i!==void 0&&(i===lf?(r+=this.consumeStringSlice(A),A=-1,this._value.shift()):Fa(n,i)&&(r+=this.consumeStringSlice(A),r+=Tr(this.consumeEscapedCodePoint()),A=-1))}A++}while(!0)},t.prototype.consumeNumber=function(){var e=[],r=Xl,A=this.peekCodePoint(0);for((A===Qs||A===sn)&&e.push(this.consumeCodePoint());OA(this.peekCodePoint(0));)e.push(this.consumeCodePoint());A=this.peekCodePoint(0);var n=this.peekCodePoint(1);if(A===tc&&OA(n))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),r=x5;OA(this.peekCodePoint(0));)e.push(this.consumeCodePoint());A=this.peekCodePoint(0),n=this.peekCodePoint(1);var i=this.peekCodePoint(2);if((A===k5||A===_5)&&((n===Qs||n===sn)&&OA(i)||OA(n)))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),r=x5;OA(this.peekCodePoint(0));)e.push(this.consumeCodePoint());return[mM(e),r]},t.prototype.consumeNumericToken=function(){var e=this.consumeNumber(),r=e[0],A=e[1],n=this.peekCodePoint(0),i=this.peekCodePoint(1),s=this.peekCodePoint(2);if(gf(n,i,s)){var a=this.consumeName();return{type:15,number:r,flags:A,unit:a}}return n===DP?(this.consumeCodePoint(),{type:16,number:r,flags:A}):{type:17,number:r,flags:A}},t.prototype.consumeEscapedCodePoint=function(){var e=this.consumeCodePoint();if(Ho(e)){for(var r=Tr(e);Ho(this.peekCodePoint(0))&&r.length<6;)r+=Tr(this.consumeCodePoint());df(this.peekCodePoint(0))&&this.consumeCodePoint();var A=parseInt(r,16);return A===0||fM(A)||A>1114111?F5:A}return e===wi?F5:e},t.prototype.consumeName=function(){for(var e="";;){var r=this.consumeCodePoint();if(T5(r))e+=Tr(r);else if(Fa(r,this.peekCodePoint(0)))e+=Tr(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(r),e}},t})(),O5=(function(){function t(e){this._tokens=e}return t.create=function(e){var r=new N5;return r.write(e),new t(r.read())},t.parseValue=function(e){return t.create(e).parseComponentValue()},t.parseValues=function(e){return t.create(e).parseComponentValues()},t.prototype.parseComponentValue=function(){for(var e=this.consumeToken();e.type===31;)e=this.consumeToken();if(e.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(e);var r=this.consumeComponentValue();do e=this.consumeToken();while(e.type===31);if(e.type===32)return r;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},t.prototype.parseComponentValues=function(){for(var e=[];;){var r=this.consumeComponentValue();if(r.type===32)return e;e.push(r),e.push()}},t.prototype.consumeComponentValue=function(){var e=this.consumeToken();switch(e.type){case 11:case 28:case 2:return this.consumeSimpleBlock(e.type);case 19:return this.consumeFunction(e)}return e},t.prototype.consumeSimpleBlock=function(e){for(var r={type:e,values:[]},A=this.consumeToken();;){if(A.type===32||DM(A,e))return r;this.reconsumeToken(A),r.values.push(this.consumeComponentValue()),A=this.consumeToken()}},t.prototype.consumeFunction=function(e){for(var r={name:e.value,values:[],type:18};;){var A=this.consumeToken();if(A.type===32||A.type===3)return r;this.reconsumeToken(A),r.values.push(this.consumeComponentValue())}},t.prototype.consumeToken=function(){var e=this._tokens.shift();return typeof e>"u"?Cg:e},t.prototype.reconsumeToken=function(e){this._tokens.unshift(e)},t})(),rc=function(t){return t.type===15},Ro=function(t){return t.type===17},rr=function(t){return t.type===20},MM=function(t){return t.type===0},xg=function(t,e){return rr(t)&&t.value===e},P5=function(t){return t.type!==31},jo=function(t){return t.type!==31&&t.type!==4},yi=function(t){var e=[],r=[];return t.forEach(function(A){if(A.type===4){if(r.length===0)throw new Error("Error parsing function args, zero tokens for arg");e.push(r),r=[];return}A.type!==31&&r.push(A)}),r.length&&e.push(r),e},DM=function(t,e){return e===11&&t.type===12||e===28&&t.type===29?!0:e===2&&t.type===3},Ia=function(t){return t.type===17||t.type===15},Rr=function(t){return t.type===16||Ia(t)},M5=function(t){return t.length>1?[t[0],t[1]]:[t[0]]},mA={type:17,number:0,flags:Xl},Eg={type:16,number:50,flags:Xl},Ua={type:16,number:100,flags:Xl},Ac=function(t,e,r){var A=t[0],n=t[1];return[sr(A,e),sr(typeof n<"u"?n:A,r)]},sr=function(t,e){if(t.type===16)return t.number/100*e;if(rc(t))switch(t.unit){case"rem":case"em":return 16*t.number;default:return t.number}return t.number},D5="deg",H5="grad",R5="rad",j5="turn",mf={name:"angle",parse:function(t,e){if(e.type===15)switch(e.unit){case D5:return Math.PI*e.number/180;case H5:return Math.PI/200*e.number;case R5:return e.number;case j5:return Math.PI*2*e.number}throw new Error("Unsupported angle type")}},K5=function(t){return t.type===15&&(t.unit===D5||t.unit===H5||t.unit===R5||t.unit===j5)},z5=function(t){var e=t.filter(rr).map(function(r){return r.value}).join(" ");switch(e){case"to bottom right":case"to right bottom":case"left top":case"top left":return[mA,mA];case"to top":case"bottom":return Tn(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[mA,Ua];case"to right":case"left":return Tn(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[Ua,Ua];case"to bottom":case"top":return Tn(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[Ua,mA];case"to left":case"right":return Tn(270)}return 0},Tn=function(t){return Math.PI*t/180},_a={name:"color",parse:function(t,e){if(e.type===18){var r=HM[e.name];if(typeof r>"u")throw new Error('Attempting to parse an unsupported color function "'+e.name+'"');return r(t,e.values)}if(e.type===5){if(e.value.length===3){var A=e.value.substring(0,1),n=e.value.substring(1,2),i=e.value.substring(2,3);return ka(parseInt(A+A,16),parseInt(n+n,16),parseInt(i+i,16),1)}if(e.value.length===4){var A=e.value.substring(0,1),n=e.value.substring(1,2),i=e.value.substring(2,3),s=e.value.substring(3,4);return ka(parseInt(A+A,16),parseInt(n+n,16),parseInt(i+i,16),parseInt(s+s,16)/255)}if(e.value.length===6){var A=e.value.substring(0,2),n=e.value.substring(2,4),i=e.value.substring(4,6);return ka(parseInt(A,16),parseInt(n,16),parseInt(i,16),1)}if(e.value.length===8){var A=e.value.substring(0,2),n=e.value.substring(2,4),i=e.value.substring(4,6),s=e.value.substring(6,8);return ka(parseInt(A,16),parseInt(n,16),parseInt(i,16),parseInt(s,16)/255)}}if(e.type===20){var a=Di[e.value.toUpperCase()];if(typeof a<"u")return a}return Di.TRANSPARENT}},Qa=function(t){return(255&t)===0},uA=function(t){var e=255&t,r=255&t>>8,A=255&t>>16,n=255&t>>24;return e<255?"rgba("+n+","+A+","+r+","+e/255+")":"rgb("+n+","+A+","+r+")"},ka=function(t,e,r,A){return(t<<24|e<<16|r<<8|Math.round(A*255)<<0)>>>0},G5=function(t,e){if(t.type===17)return t.number;if(t.type===16){var r=e===3?1:255;return e===3?t.number/100*r:Math.round(t.number/100*r)}return 0},V5=function(t,e){var r=e.filter(jo);if(r.length===3){var A=r.map(G5),n=A[0],i=A[1],s=A[2];return ka(n,i,s,1)}if(r.length===4){var a=r.map(G5),n=a[0],i=a[1],s=a[2],o=a[3];return ka(n,i,s,o)}return 0};function Sg(t,e,r){return r<0&&(r+=1),r>=1&&(r-=1),r<1/6?(e-t)*r*6+t:r<1/2?e:r<2/3?(e-t)*6*(2/3-r)+t:t}var q5=function(t,e){var r=e.filter(jo),A=r[0],n=r[1],i=r[2],s=r[3],a=(A.type===17?Tn(A.number):mf.parse(t,A))/(Math.PI*2),o=Rr(n)?n.number/100:0,l=Rr(i)?i.number/100:0,c=typeof s<"u"&&Rr(s)?sr(s,1):1;if(o===0)return ka(l*255,l*255,l*255,1);var f=l<=.5?l*(o+1):l+o-l*o,h=l*2-f,u=Sg(h,f,a+1/3),g=Sg(h,f,a),p=Sg(h,f,a-1/3);return ka(u*255,g*255,p*255,c)},HM={hsl:q5,hsla:q5,rgb:V5,rgba:V5},nc=function(t,e){return _a.parse(t,O5.create(e).parseComponentValue())},Di={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},RM={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(t,e){return e.map(function(r){if(rr(r))switch(r.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},jM={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},wf=function(t,e){var r=_a.parse(t,e[0]),A=e[1];return A&&Rr(A)?{color:r,stop:A}:{color:r,stop:null}},W5=function(t,e){var r=t[0],A=t[t.length-1];r.stop===null&&(r.stop=mA),A.stop===null&&(A.stop=Ua);for(var n=[],i=0,s=0;s<t.length;s++){var a=t[s].stop;if(a!==null){var o=sr(a,e);o>i?n.push(o):n.push(i),i=o}else n.push(null)}for(var l=null,s=0;s<n.length;s++){var c=n[s];if(c===null)l===null&&(l=s);else if(l!==null){for(var f=s-l,h=n[l-1],u=(c-h)/(f+1),g=1;g<=f;g++)n[l+g-1]=u*g;l=null}}return t.map(function(p,w){var m=p.color;return{color:m,stop:Math.max(Math.min(1,n[w]/e),0)}})},KM=function(t,e,r){var A=e/2,n=r/2,i=sr(t[0],e)-A,s=n-sr(t[1],r);return(Math.atan2(s,i)+Math.PI*2)%(Math.PI*2)},zM=function(t,e,r){var A=typeof t=="number"?t:KM(t,e,r),n=Math.abs(e*Math.sin(A))+Math.abs(r*Math.cos(A)),i=e/2,s=r/2,a=n/2,o=Math.sin(A-Math.PI/2)*a,l=Math.cos(A-Math.PI/2)*a;return[n,i-l,i+l,s-o,s+o]},Zn=function(t,e){return Math.sqrt(t*t+e*e)},$5=function(t,e,r,A,n){var i=[[0,0],[0,e],[t,0],[t,e]];return i.reduce(function(s,a){var o=a[0],l=a[1],c=Zn(r-o,A-l);return(n?c<s.optimumDistance:c>s.optimumDistance)?{optimumCorner:a,optimumDistance:c}:s},{optimumDistance:n?1/0:-1/0,optimumCorner:null}).optimumCorner},GM=function(t,e,r,A,n){var i=0,s=0;switch(t.size){case 0:t.shape===0?i=s=Math.min(Math.abs(e),Math.abs(e-A),Math.abs(r),Math.abs(r-n)):t.shape===1&&(i=Math.min(Math.abs(e),Math.abs(e-A)),s=Math.min(Math.abs(r),Math.abs(r-n)));break;case 2:if(t.shape===0)i=s=Math.min(Zn(e,r),Zn(e,r-n),Zn(e-A,r),Zn(e-A,r-n));else if(t.shape===1){var a=Math.min(Math.abs(r),Math.abs(r-n))/Math.min(Math.abs(e),Math.abs(e-A)),o=$5(A,n,e,r,!0),l=o[0],c=o[1];i=Zn(l-e,(c-r)/a),s=a*i}break;case 1:t.shape===0?i=s=Math.max(Math.abs(e),Math.abs(e-A),Math.abs(r),Math.abs(r-n)):t.shape===1&&(i=Math.max(Math.abs(e),Math.abs(e-A)),s=Math.max(Math.abs(r),Math.abs(r-n)));break;case 3:if(t.shape===0)i=s=Math.max(Zn(e,r),Zn(e,r-n),Zn(e-A,r),Zn(e-A,r-n));else if(t.shape===1){var a=Math.max(Math.abs(r),Math.abs(r-n))/Math.max(Math.abs(e),Math.abs(e-A)),f=$5(A,n,e,r,!1),l=f[0],c=f[1];i=Zn(l-e,(c-r)/a),s=a*i}break}return Array.isArray(t.size)&&(i=sr(t.size[0],A),s=t.size.length===2?sr(t.size[1],n):i),[i,s]},VM=function(t,e){var r=Tn(180),A=[];return yi(e).forEach(function(n,i){if(i===0){var s=n[0];if(s.type===20&&s.value==="to"){r=z5(n);return}else if(K5(s)){r=mf.parse(t,s);return}}var a=wf(t,n);A.push(a)}),{angle:r,stops:A,type:1}},yf=function(t,e){var r=Tn(180),A=[];return yi(e).forEach(function(n,i){if(i===0){var s=n[0];if(s.type===20&&["top","left","right","bottom"].indexOf(s.value)!==-1){r=z5(n);return}else if(K5(s)){r=(mf.parse(t,s)+Tn(270))%Tn(360);return}}var a=wf(t,n);A.push(a)}),{angle:r,stops:A,type:1}},qM=function(t,e){var r=Tn(180),A=[],n=1,i=0,s=3,a=[];return yi(e).forEach(function(o,l){var c=o[0];if(l===0){if(rr(c)&&c.value==="linear"){n=1;return}else if(rr(c)&&c.value==="radial"){n=2;return}}if(c.type===18){if(c.name==="from"){var f=_a.parse(t,c.values[0]);A.push({stop:mA,color:f})}else if(c.name==="to"){var f=_a.parse(t,c.values[0]);A.push({stop:Ua,color:f})}else if(c.name==="color-stop"){var h=c.values.filter(jo);if(h.length===2){var f=_a.parse(t,h[1]),u=h[0];Ro(u)&&A.push({stop:{type:16,number:u.number*100,flags:u.flags},color:f})}}}}),n===1?{angle:(r+Tn(180))%Tn(360),stops:A,type:n}:{size:s,shape:i,stops:A,position:a,type:n}},Y5="closest-side",X5="farthest-side",J5="closest-corner",Z5="farthest-corner",eC="circle",tC="ellipse",rC="cover",AC="contain",WM=function(t,e){var r=0,A=3,n=[],i=[];return yi(e).forEach(function(s,a){var o=!0;if(a===0){var l=!1;o=s.reduce(function(f,h){if(l)if(rr(h))switch(h.value){case"center":return i.push(Eg),f;case"top":case"left":return i.push(mA),f;case"right":case"bottom":return i.push(Ua),f}else(Rr(h)||Ia(h))&&i.push(h);else if(rr(h))switch(h.value){case eC:return r=0,!1;case tC:return r=1,!1;case"at":return l=!0,!1;case Y5:return A=0,!1;case rC:case X5:return A=1,!1;case AC:case J5:return A=2,!1;case Z5:return A=3,!1}else if(Ia(h)||Rr(h))return Array.isArray(A)||(A=[]),A.push(h),!1;return f},o)}if(o){var c=wf(t,s);n.push(c)}}),{size:A,shape:r,stops:n,position:i,type:2}},Bf=function(t,e){var r=0,A=3,n=[],i=[];return yi(e).forEach(function(s,a){var o=!0;if(a===0?o=s.reduce(function(c,f){if(rr(f))switch(f.value){case"center":return i.push(Eg),!1;case"top":case"left":return i.push(mA),!1;case"right":case"bottom":return i.push(Ua),!1}else if(Rr(f)||Ia(f))return i.push(f),!1;return c},o):a===1&&(o=s.reduce(function(c,f){if(rr(f))switch(f.value){case eC:return r=0,!1;case tC:return r=1,!1;case AC:case Y5:return A=0,!1;case X5:return A=1,!1;case J5:return A=2,!1;case rC:case Z5:return A=3,!1}else if(Ia(f)||Rr(f))return Array.isArray(A)||(A=[]),A.push(f),!1;return c},o)),o){var l=wf(t,s);n.push(l)}}),{size:A,shape:r,stops:n,position:i,type:2}},$M=function(t){return t.type===1},YM=function(t){return t.type===2},Fg={name:"image",parse:function(t,e){if(e.type===22){var r={url:e.value,type:0};return t.cache.addImage(e.value),r}if(e.type===18){var A=nC[e.name];if(typeof A>"u")throw new Error('Attempting to parse an unsupported image function "'+e.name+'"');return A(t,e.values)}throw new Error("Unsupported image type "+e.type)}};function XM(t){return!(t.type===20&&t.value==="none")&&(t.type!==18||!!nC[t.name])}var nC={"linear-gradient":VM,"-moz-linear-gradient":yf,"-ms-linear-gradient":yf,"-o-linear-gradient":yf,"-webkit-linear-gradient":yf,"radial-gradient":WM,"-moz-radial-gradient":Bf,"-ms-radial-gradient":Bf,"-o-radial-gradient":Bf,"-webkit-radial-gradient":Bf,"-webkit-gradient":qM},JM={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(t,e){if(e.length===0)return[];var r=e[0];return r.type===20&&r.value==="none"?[]:e.filter(function(A){return jo(A)&&XM(A)}).map(function(A){return Fg.parse(t,A)})}},ZM={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(t,e){return e.map(function(r){if(rr(r))switch(r.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},eD={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(t,e){return yi(e).map(function(r){return r.filter(Rr)}).map(M5)}},tD={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(t,e){return yi(e).map(function(r){return r.filter(rr).map(function(A){return A.value}).join(" ")}).map(rD)}},rD=function(t){switch(t){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;default:return 0}},Ko;(function(t){t.AUTO="auto",t.CONTAIN="contain",t.COVER="cover"})(Ko||(Ko={}));var AD={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(t,e){return yi(e).map(function(r){return r.filter(nD)})}},nD=function(t){return rr(t)||Rr(t)},bf=function(t){return{name:"border-"+t+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},iD=bf("top"),aD=bf("right"),sD=bf("bottom"),oD=bf("left"),Cf=function(t){return{name:"border-radius-"+t,initialValue:"0 0",prefix:!1,type:1,parse:function(e,r){return M5(r.filter(Rr))}}},lD=Cf("top-left"),cD=Cf("top-right"),uD=Cf("bottom-right"),fD=Cf("bottom-left"),xf=function(t){return{name:"border-"+t+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(e,r){switch(r){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},hD=xf("top"),dD=xf("right"),pD=xf("bottom"),gD=xf("left"),Ef=function(t){return{name:"border-"+t+"-width",initialValue:"0",type:0,prefix:!1,parse:function(e,r){return rc(r)?r.number:0}}},vD=Ef("top"),mD=Ef("right"),wD=Ef("bottom"),yD=Ef("left"),BD={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},bD={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(t,e){return e==="rtl"?1:0}},CD={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(t,e){return e.filter(rr).reduce(function(r,A){return r|xD(A.value)},0)}},xD=function(t){switch(t){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},ED={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(t,e){switch(e){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},SD={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(t,e){return e.type===20&&e.value==="normal"?0:e.type===17||e.type===15?e.number:0}},Sf;(function(t){t.NORMAL="normal",t.STRICT="strict"})(Sf||(Sf={}));var FD={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(t,e){return e==="strict"?Sf.STRICT:Sf.NORMAL}},ID={name:"line-height",initialValue:"normal",prefix:!1,type:4},iC=function(t,e){return rr(t)&&t.value==="normal"?1.2*e:t.type===17?e*t.number:Rr(t)?sr(t,e):e},UD={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(t,e){return e.type===20&&e.value==="none"?null:Fg.parse(t,e)}},_D={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(t,e){return e==="inside"?0:1}},Ig={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(t,e){switch(e){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":return 22;case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;default:return-1}}},Ff=function(t){return{name:"margin-"+t,initialValue:"0",prefix:!1,type:4}},QD=Ff("top"),kD=Ff("right"),LD=Ff("bottom"),TD=Ff("left"),ND={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(t,e){return e.filter(rr).map(function(r){switch(r.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;default:return 0}})}},OD={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(t,e){return e==="break-word"?"break-word":"normal"}},If=function(t){return{name:"padding-"+t,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},PD=If("top"),MD=If("right"),DD=If("bottom"),HD=If("left"),RD={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(t,e){switch(e){case"right":return 2;case"center":case"justify":return 1;default:return 0}}},jD={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(t,e){switch(e){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},KD={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(t,e){return e.length===1&&xg(e[0],"none")?[]:yi(e).map(function(r){for(var A={color:Di.TRANSPARENT,offsetX:mA,offsetY:mA,blur:mA},n=0,i=0;i<r.length;i++){var s=r[i];Ia(s)?(n===0?A.offsetX=s:n===1?A.offsetY=s:A.blur=s,n++):A.color=_a.parse(t,s)}return A})}},zD={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(t,e){switch(e){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},GD={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(t,e){if(e.type===20&&e.value==="none")return null;if(e.type===18){var r=WD[e.name];if(typeof r>"u")throw new Error('Attempting to parse an unsupported transform function "'+e.name+'"');return r(e.values)}return null}},VD=function(t){var e=t.filter(function(r){return r.type===17}).map(function(r){return r.number});return e.length===6?e:null},qD=function(t){var e=t.filter(function(o){return o.type===17}).map(function(o){return o.number}),r=e[0],A=e[1];e[2],e[3];var n=e[4],i=e[5];e[6],e[7],e[8],e[9],e[10],e[11];var s=e[12],a=e[13];return e[14],e[15],e.length===16?[r,A,n,i,s,a]:null},WD={matrix:VD,matrix3d:qD},aC={type:16,number:50,flags:Xl},$D=[aC,aC],YD={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(t,e){var r=e.filter(Rr);return r.length!==2?$D:[r[0],r[1]]}},XD={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(t,e){switch(e){case"hidden":return 1;case"collapse":return 2;default:return 0}}},ic;(function(t){t.NORMAL="normal",t.BREAK_ALL="break-all",t.KEEP_ALL="keep-all"})(ic||(ic={}));for(var JD={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(t,e){switch(e){case"break-all":return ic.BREAK_ALL;case"keep-all":return ic.KEEP_ALL;default:return ic.NORMAL}}},ZD={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(t,e){if(e.type===20)return{auto:!0,order:0};if(Ro(e))return{auto:!1,order:e.number};throw new Error("Invalid z-index number parsed")}},sC={name:"time",parse:function(t,e){if(e.type===15)switch(e.unit.toLowerCase()){case"s":return 1e3*e.number;case"ms":return e.number}throw new Error("Unsupported time type")}},eH={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(t,e){return Ro(e)?e.number:1}},tH={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},rH={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(t,e){return e.filter(rr).map(function(r){switch(r.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(r){return r!==0})}},AH={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(t,e){var r=[],A=[];return e.forEach(function(n){switch(n.type){case 20:case 0:r.push(n.value);break;case 17:r.push(n.number.toString());break;case 4:A.push(r.join(" ")),r.length=0;break}}),r.length&&A.push(r.join(" ")),A.map(function(n){return n.indexOf(" ")===-1?n:"'"+n+"'"})}},nH={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},iH={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(t,e){return Ro(e)?e.number:rr(e)&&e.value==="bold"?700:400}},aH={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(t,e){return e.filter(rr).map(function(r){return r.value})}},sH={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(t,e){switch(e){case"oblique":return"oblique";case"italic":return"italic";default:return"normal"}}},Zr=function(t,e){return(t&e)!==0},oH={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(t,e){if(e.length===0)return[];var r=e[0];return r.type===20&&r.value==="none"?[]:e}},lH={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(t,e){if(e.length===0)return null;var r=e[0];if(r.type===20&&r.value==="none")return null;for(var A=[],n=e.filter(P5),i=0;i<n.length;i++){var s=n[i],a=n[i+1];if(s.type===20){var o=a&&Ro(a)?a.number:1;A.push({counter:s.value,increment:o})}}return A}},cH={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(t,e){if(e.length===0)return[];for(var r=[],A=e.filter(P5),n=0;n<A.length;n++){var i=A[n],s=A[n+1];if(rr(i)&&i.value!=="none"){var a=s&&Ro(s)?s.number:0;r.push({counter:i.value,reset:a})}}return r}},uH={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(t,e){return e.filter(rc).map(function(r){return sC.parse(t,r)})}},fH={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(t,e){if(e.length===0)return null;var r=e[0];if(r.type===20&&r.value==="none")return null;var A=[],n=e.filter(MM);if(n.length%2!==0)return null;for(var i=0;i<n.length;i+=2){var s=n[i].value,a=n[i+1].value;A.push({open:s,close:a})}return A}},oC=function(t,e,r){if(!t)return"";var A=t[Math.min(e,t.length-1)];return A?r?A.open:A.close:""},hH={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(t,e){return e.length===1&&xg(e[0],"none")?[]:yi(e).map(function(r){for(var A={color:255,offsetX:mA,offsetY:mA,blur:mA,spread:mA,inset:!1},n=0,i=0;i<r.length;i++){var s=r[i];xg(s,"inset")?A.inset=!0:Ia(s)?(n===0?A.offsetX=s:n===1?A.offsetY=s:n===2?A.blur=s:A.spread=s,n++):A.color=_a.parse(t,s)}return A})}},dH={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(t,e){var r=[0,1,2],A=[];return e.filter(rr).forEach(function(n){switch(n.value){case"stroke":A.push(1);break;case"fill":A.push(0);break;case"markers":A.push(2);break}}),r.forEach(function(n){A.indexOf(n)===-1&&A.push(n)}),A}},pH={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},gH={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(t,e){return rc(e)?e.number:0}},vH=(function(){function t(e,r){var A,n;this.animationDuration=Ze(e,uH,r.animationDuration),this.backgroundClip=Ze(e,RM,r.backgroundClip),this.backgroundColor=Ze(e,jM,r.backgroundColor),this.backgroundImage=Ze(e,JM,r.backgroundImage),this.backgroundOrigin=Ze(e,ZM,r.backgroundOrigin),this.backgroundPosition=Ze(e,eD,r.backgroundPosition),this.backgroundRepeat=Ze(e,tD,r.backgroundRepeat),this.backgroundSize=Ze(e,AD,r.backgroundSize),this.borderTopColor=Ze(e,iD,r.borderTopColor),this.borderRightColor=Ze(e,aD,r.borderRightColor),this.borderBottomColor=Ze(e,sD,r.borderBottomColor),this.borderLeftColor=Ze(e,oD,r.borderLeftColor),this.borderTopLeftRadius=Ze(e,lD,r.borderTopLeftRadius),this.borderTopRightRadius=Ze(e,cD,r.borderTopRightRadius),this.borderBottomRightRadius=Ze(e,uD,r.borderBottomRightRadius),this.borderBottomLeftRadius=Ze(e,fD,r.borderBottomLeftRadius),this.borderTopStyle=Ze(e,hD,r.borderTopStyle),this.borderRightStyle=Ze(e,dD,r.borderRightStyle),this.borderBottomStyle=Ze(e,pD,r.borderBottomStyle),this.borderLeftStyle=Ze(e,gD,r.borderLeftStyle),this.borderTopWidth=Ze(e,vD,r.borderTopWidth),this.borderRightWidth=Ze(e,mD,r.borderRightWidth),this.borderBottomWidth=Ze(e,wD,r.borderBottomWidth),this.borderLeftWidth=Ze(e,yD,r.borderLeftWidth),this.boxShadow=Ze(e,hH,r.boxShadow),this.color=Ze(e,BD,r.color),this.direction=Ze(e,bD,r.direction),this.display=Ze(e,CD,r.display),this.float=Ze(e,ED,r.cssFloat),this.fontFamily=Ze(e,AH,r.fontFamily),this.fontSize=Ze(e,nH,r.fontSize),this.fontStyle=Ze(e,sH,r.fontStyle),this.fontVariant=Ze(e,aH,r.fontVariant),this.fontWeight=Ze(e,iH,r.fontWeight),this.letterSpacing=Ze(e,SD,r.letterSpacing),this.lineBreak=Ze(e,FD,r.lineBreak),this.lineHeight=Ze(e,ID,r.lineHeight),this.listStyleImage=Ze(e,UD,r.listStyleImage),this.listStylePosition=Ze(e,_D,r.listStylePosition),this.listStyleType=Ze(e,Ig,r.listStyleType),this.marginTop=Ze(e,QD,r.marginTop),this.marginRight=Ze(e,kD,r.marginRight),this.marginBottom=Ze(e,LD,r.marginBottom),this.marginLeft=Ze(e,TD,r.marginLeft),this.opacity=Ze(e,eH,r.opacity);var i=Ze(e,ND,r.overflow);this.overflowX=i[0],this.overflowY=i[i.length>1?1:0],this.overflowWrap=Ze(e,OD,r.overflowWrap),this.paddingTop=Ze(e,PD,r.paddingTop),this.paddingRight=Ze(e,MD,r.paddingRight),this.paddingBottom=Ze(e,DD,r.paddingBottom),this.paddingLeft=Ze(e,HD,r.paddingLeft),this.paintOrder=Ze(e,dH,r.paintOrder),this.position=Ze(e,jD,r.position),this.textAlign=Ze(e,RD,r.textAlign),this.textDecorationColor=Ze(e,tH,(A=r.textDecorationColor)!==null&&A!==void 0?A:r.color),this.textDecorationLine=Ze(e,rH,(n=r.textDecorationLine)!==null&&n!==void 0?n:r.textDecoration),this.textShadow=Ze(e,KD,r.textShadow),this.textTransform=Ze(e,zD,r.textTransform),this.transform=Ze(e,GD,r.transform),this.transformOrigin=Ze(e,YD,r.transformOrigin),this.visibility=Ze(e,XD,r.visibility),this.webkitTextStrokeColor=Ze(e,pH,r.webkitTextStrokeColor),this.webkitTextStrokeWidth=Ze(e,gH,r.webkitTextStrokeWidth),this.wordBreak=Ze(e,JD,r.wordBreak),this.zIndex=Ze(e,ZD,r.zIndex)}return t.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},t.prototype.isTransparent=function(){return Qa(this.backgroundColor)},t.prototype.isTransformed=function(){return this.transform!==null},t.prototype.isPositioned=function(){return this.position!==0},t.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},t.prototype.isFloating=function(){return this.float!==0},t.prototype.isInlineLevel=function(){return Zr(this.display,4)||Zr(this.display,33554432)||Zr(this.display,268435456)||Zr(this.display,536870912)||Zr(this.display,67108864)||Zr(this.display,134217728)},t})(),mH=(function(){function t(e,r){this.content=Ze(e,oH,r.content),this.quotes=Ze(e,fH,r.quotes)}return t})(),lC=(function(){function t(e,r){this.counterIncrement=Ze(e,lH,r.counterIncrement),this.counterReset=Ze(e,cH,r.counterReset)}return t})(),Ze=function(t,e,r){var A=new N5,n=r!==null&&typeof r<"u"?r.toString():e.initialValue;A.write(n);var i=new O5(A.read());switch(e.type){case 2:var s=i.parseComponentValue();return e.parse(t,rr(s)?s.value:e.initialValue);case 0:return e.parse(t,i.parseComponentValue());case 1:return e.parse(t,i.parseComponentValues());case 4:return i.parseComponentValue();case 3:switch(e.format){case"angle":return mf.parse(t,i.parseComponentValue());case"color":return _a.parse(t,i.parseComponentValue());case"image":return Fg.parse(t,i.parseComponentValue());case"length":var a=i.parseComponentValue();return Ia(a)?a:mA;case"length-percentage":var o=i.parseComponentValue();return Rr(o)?o:mA;case"time":return sC.parse(t,i.parseComponentValue())}break}},wH="data-html2canvas-debug",yH=function(t){var e=t.getAttribute(wH);switch(e){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},Ug=function(t,e){var r=yH(t);return r===1||e===r},Bi=(function(){function t(e,r){if(this.context=e,this.textNodes=[],this.elements=[],this.flags=0,Ug(r,3))debugger;this.styles=new vH(e,window.getComputedStyle(r,null)),Kg(r)&&(this.styles.animationDuration.some(function(A){return A>0})&&(r.style.animationDuration="0s"),this.styles.transform!==null&&(r.style.transform="none")),this.bounds=Xu(this.context,r),Ug(r,4)&&(this.flags|=16)}return t})(),BH="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",cC="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ac=typeof Uint8Array>"u"?[]:new Uint8Array(256),Uf=0;Uf<cC.length;Uf++)ac[cC.charCodeAt(Uf)]=Uf;for(var bH=function(t){var e=t.length*.75,r=t.length,A,n=0,i,s,a,o;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);var l=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&typeof Uint8Array.prototype.slice<"u"?new ArrayBuffer(e):new Array(e),c=Array.isArray(l)?l:new Uint8Array(l);for(A=0;A<r;A+=4)i=ac[t.charCodeAt(A)],s=ac[t.charCodeAt(A+1)],a=ac[t.charCodeAt(A+2)],o=ac[t.charCodeAt(A+3)],c[n++]=i<<2|s>>4,c[n++]=(s&15)<<4|a>>2,c[n++]=(a&3)<<6|o&63;return l},CH=function(t){for(var e=t.length,r=[],A=0;A<e;A+=2)r.push(t[A+1]<<8|t[A]);return r},xH=function(t){for(var e=t.length,r=[],A=0;A<e;A+=4)r.push(t[A+3]<<24|t[A+2]<<16|t[A+1]<<8|t[A]);return r},ks=5,_g=11,Qg=2,EH=_g-ks,uC=65536>>ks,SH=1<<ks,kg=SH-1,FH=1024>>ks,IH=uC+FH,UH=IH,_H=32,QH=UH+_H,kH=65536>>_g,LH=1<<EH,TH=LH-1,fC=function(t,e,r){return t.slice?t.slice(e,r):new Uint16Array(Array.prototype.slice.call(t,e,r))},NH=function(t,e,r){return t.slice?t.slice(e,r):new Uint32Array(Array.prototype.slice.call(t,e,r))},OH=function(t,e){var r=bH(t),A=Array.isArray(r)?xH(r):new Uint32Array(r),n=Array.isArray(r)?CH(r):new Uint16Array(r),i=24,s=fC(n,i/2,A[4]/2),a=A[5]===2?fC(n,(i+A[4])/2):NH(A,Math.ceil((i+A[4])/4));return new PH(A[0],A[1],A[2],A[3],s,a)},PH=(function(){function t(e,r,A,n,i,s){this.initialValue=e,this.errorValue=r,this.highStart=A,this.highValueIndex=n,this.index=i,this.data=s}return t.prototype.get=function(e){var r;if(e>=0){if(e<55296||e>56319&&e<=65535)return r=this.index[e>>ks],r=(r<<Qg)+(e&kg),this.data[r];if(e<=65535)return r=this.index[uC+(e-55296>>ks)],r=(r<<Qg)+(e&kg),this.data[r];if(e<this.highStart)return r=QH-kH+(e>>_g),r=this.index[r],r+=e>>ks&TH,r=this.index[r],r=(r<<Qg)+(e&kg),this.data[r];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},t})(),hC="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",MH=typeof Uint8Array>"u"?[]:new Uint8Array(256),_f=0;_f<hC.length;_f++)MH[hC.charCodeAt(_f)]=_f;var DH=1,Lg=2,Tg=3,dC=4,pC=5,HH=7,gC=8,Ng=9,Og=10,vC=11,mC=12,wC=13,yC=14,Pg=15,RH=function(t){for(var e=[],r=0,A=t.length;r<A;){var n=t.charCodeAt(r++);if(n>=55296&&n<=56319&&r<A){var i=t.charCodeAt(r++);(i&64512)===56320?e.push(((n&1023)<<10)+(i&1023)+65536):(e.push(n),r--)}else e.push(n)}return e},jH=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(String.fromCodePoint)return String.fromCodePoint.apply(String,t);var r=t.length;if(!r)return"";for(var A=[],n=-1,i="";++n<r;){var s=t[n];s<=65535?A.push(s):(s-=65536,A.push((s>>10)+55296,s%1024+56320)),(n+1===r||A.length>16384)&&(i+=String.fromCharCode.apply(String,A),A.length=0)}return i},KH=OH(BH),Nn="×",Mg="÷",zH=function(t){return KH.get(t)},GH=function(t,e,r){var A=r-2,n=e[A],i=e[r-1],s=e[r];if(i===Lg&&s===Tg)return Nn;if(i===Lg||i===Tg||i===dC||s===Lg||s===Tg||s===dC)return Mg;if(i===gC&&[gC,Ng,vC,mC].indexOf(s)!==-1||(i===vC||i===Ng)&&(s===Ng||s===Og)||(i===mC||i===Og)&&s===Og||s===wC||s===pC||s===HH||i===DH)return Nn;if(i===wC&&s===yC){for(;n===pC;)n=e[--A];if(n===yC)return Nn}if(i===Pg&&s===Pg){for(var a=0;n===Pg;)a++,n=e[--A];if(a%2===0)return Nn}return Mg},VH=function(t){var e=RH(t),r=e.length,A=0,n=0,i=e.map(zH);return{next:function(){if(A>=r)return{done:!0,value:null};for(var s=Nn;A<r&&(s=GH(e,i,++A))===Nn;);if(s!==Nn||A===r){var a=jH.apply(null,e.slice(n,A));return n=A,{value:a,done:!1}}return{done:!0,value:null}}}},qH=function(t){for(var e=VH(t),r=[],A;!(A=e.next()).done;)A.value&&r.push(A.value.slice());return r},WH=function(t){var e=123;if(t.createRange){var r=t.createRange();if(r.getBoundingClientRect){var A=t.createElement("boundtest");A.style.height=e+"px",A.style.display="block",t.body.appendChild(A),r.selectNode(A);var n=r.getBoundingClientRect(),i=Math.round(n.height);if(t.body.removeChild(A),i===e)return!0}}return!1},$H=function(t){var e=t.createElement("boundtest");e.style.width="50px",e.style.display="block",e.style.fontSize="12px",e.style.letterSpacing="0px",e.style.wordSpacing="0px",t.body.appendChild(e);var r=t.createRange();e.innerHTML=typeof"".repeat=="function"?"👨".repeat(10):"";var A=e.firstChild,n=Ju(A.data).map(function(o){return Tr(o)}),i=0,s={},a=n.every(function(o,l){r.setStart(A,i),r.setEnd(A,i+o.length);var c=r.getBoundingClientRect();i+=o.length;var f=c.x>s.x||c.y>s.y;return s=c,l===0?!0:f});return t.body.removeChild(e),a},YH=function(){return typeof new Image().crossOrigin<"u"},XH=function(){return typeof new XMLHttpRequest().responseType=="string"},JH=function(t){var e=new Image,r=t.createElement("canvas"),A=r.getContext("2d");if(!A)return!1;e.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{A.drawImage(e,0,0),r.toDataURL()}catch{return!1}return!0},BC=function(t){return t[0]===0&&t[1]===255&&t[2]===0&&t[3]===255},ZH=function(t){var e=t.createElement("canvas"),r=100;e.width=r,e.height=r;var A=e.getContext("2d");if(!A)return Promise.reject(!1);A.fillStyle="rgb(0, 255, 0)",A.fillRect(0,0,r,r);var n=new Image,i=e.toDataURL();n.src=i;var s=Dg(r,r,0,0,n);return A.fillStyle="red",A.fillRect(0,0,r,r),bC(s).then(function(a){A.drawImage(a,0,0);var o=A.getImageData(0,0,r,r).data;A.fillStyle="red",A.fillRect(0,0,r,r);var l=t.createElement("div");return l.style.backgroundImage="url("+i+")",l.style.height=r+"px",BC(o)?bC(Dg(r,r,0,0,l)):Promise.reject(!1)}).then(function(a){return A.drawImage(a,0,0),BC(A.getImageData(0,0,r,r).data)}).catch(function(){return!1})},Dg=function(t,e,r,A,n){var i="http://www.w3.org/2000/svg",s=document.createElementNS(i,"svg"),a=document.createElementNS(i,"foreignObject");return s.setAttributeNS(null,"width",t.toString()),s.setAttributeNS(null,"height",e.toString()),a.setAttributeNS(null,"width","100%"),a.setAttributeNS(null,"height","100%"),a.setAttributeNS(null,"x",r.toString()),a.setAttributeNS(null,"y",A.toString()),a.setAttributeNS(null,"externalResourcesRequired","true"),s.appendChild(a),a.appendChild(n),s},bC=function(t){return new Promise(function(e,r){var A=new Image;A.onload=function(){return e(A)},A.onerror=r,A.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(t))})},wA={get SUPPORT_RANGE_BOUNDS(){var t=WH(document);return Object.defineProperty(wA,"SUPPORT_RANGE_BOUNDS",{value:t}),t},get SUPPORT_WORD_BREAKING(){var t=wA.SUPPORT_RANGE_BOUNDS&&$H(document);return Object.defineProperty(wA,"SUPPORT_WORD_BREAKING",{value:t}),t},get SUPPORT_SVG_DRAWING(){var t=JH(document);return Object.defineProperty(wA,"SUPPORT_SVG_DRAWING",{value:t}),t},get SUPPORT_FOREIGNOBJECT_DRAWING(){var t=typeof Array.from=="function"&&typeof window.fetch=="function"?ZH(document):Promise.resolve(!1);return Object.defineProperty(wA,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:t}),t},get SUPPORT_CORS_IMAGES(){var t=YH();return Object.defineProperty(wA,"SUPPORT_CORS_IMAGES",{value:t}),t},get SUPPORT_RESPONSE_TYPE(){var t=XH();return Object.defineProperty(wA,"SUPPORT_RESPONSE_TYPE",{value:t}),t},get SUPPORT_CORS_XHR(){var t="withCredentials"in new XMLHttpRequest;return Object.defineProperty(wA,"SUPPORT_CORS_XHR",{value:t}),t},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var t=!!(typeof Intl<"u"&&Intl.Segmenter);return Object.defineProperty(wA,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:t}),t}},sc=(function(){function t(e,r){this.text=e,this.bounds=r}return t})(),e7=function(t,e,r,A){var n=A7(e,r),i=[],s=0;return n.forEach(function(a){if(r.textDecorationLine.length||a.trim().length>0)if(wA.SUPPORT_RANGE_BOUNDS){var o=CC(A,s,a.length).getClientRects();if(o.length>1){var l=Hg(a),c=0;l.forEach(function(h){i.push(new sc(h,Pi.fromDOMRectList(t,CC(A,c+s,h.length).getClientRects()))),c+=h.length})}else i.push(new sc(a,Pi.fromDOMRectList(t,o)))}else{var f=A.splitText(a.length);i.push(new sc(a,t7(t,A))),A=f}else wA.SUPPORT_RANGE_BOUNDS||(A=A.splitText(a.length));s+=a.length}),i},t7=function(t,e){var r=e.ownerDocument;if(r){var A=r.createElement("html2canvaswrapper");A.appendChild(e.cloneNode(!0));var n=e.parentNode;if(n){n.replaceChild(A,e);var i=Xu(t,A);return A.firstChild&&n.replaceChild(A.firstChild,A),i}}return Pi.EMPTY},CC=function(t,e,r){var A=t.ownerDocument;if(!A)throw new Error("Node has no owner document");var n=A.createRange();return n.setStart(t,e),n.setEnd(t,e+r),n},Hg=function(t){if(wA.SUPPORT_NATIVE_TEXT_SEGMENTATION){var e=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(e.segment(t)).map(function(r){return r.segment})}return qH(t)},r7=function(t,e){if(wA.SUPPORT_NATIVE_TEXT_SEGMENTATION){var r=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(r.segment(t)).map(function(A){return A.segment})}return i7(t,e)},A7=function(t,e){return e.letterSpacing!==0?Hg(t):r7(t,e)},n7=[32,160,4961,65792,65793,4153,4241],i7=function(t,e){for(var r=kP(t,{lineBreak:e.lineBreak,wordBreak:e.overflowWrap==="break-word"?"break-word":e.wordBreak}),A=[],n,i=function(){if(n.value){var s=n.value.slice(),a=Ju(s),o="";a.forEach(function(l){n7.indexOf(l)===-1?o+=Tr(l):(o.length&&A.push(o),A.push(Tr(l)),o="")}),o.length&&A.push(o)}};!(n=r.next()).done;)i();return A},a7=(function(){function t(e,r,A){this.text=s7(r.data,A.textTransform),this.textBounds=e7(e,this.text,A,r)}return t})(),s7=function(t,e){switch(e){case 1:return t.toLowerCase();case 3:return t.replace(o7,l7);case 2:return t.toUpperCase();default:return t}},o7=/(^|\s|:|-|\(|\))([a-z])/g,l7=function(t,e,r){return t.length>0?e+r.toUpperCase():t},xC=(function(t){Jn(e,t);function e(r,A){var n=t.call(this,r,A)||this;return n.src=A.currentSrc||A.src,n.intrinsicWidth=A.naturalWidth,n.intrinsicHeight=A.naturalHeight,n.context.cache.addImage(n.src),n}return e})(Bi),EC=(function(t){Jn(e,t);function e(r,A){var n=t.call(this,r,A)||this;return n.canvas=A,n.intrinsicWidth=A.width,n.intrinsicHeight=A.height,n}return e})(Bi),SC=(function(t){Jn(e,t);function e(r,A){var n=t.call(this,r,A)||this,i=new XMLSerializer,s=Xu(r,A);return A.setAttribute("width",s.width+"px"),A.setAttribute("height",s.height+"px"),n.svg="data:image/svg+xml,"+encodeURIComponent(i.serializeToString(A)),n.intrinsicWidth=A.width.baseVal.value,n.intrinsicHeight=A.height.baseVal.value,n.context.cache.addImage(n.svg),n}return e})(Bi),FC=(function(t){Jn(e,t);function e(r,A){var n=t.call(this,r,A)||this;return n.value=A.value,n}return e})(Bi),Rg=(function(t){Jn(e,t);function e(r,A){var n=t.call(this,r,A)||this;return n.start=A.start,n.reversed=typeof A.reversed=="boolean"&&A.reversed===!0,n}return e})(Bi),c7=[{type:15,flags:0,unit:"px",number:3}],u7=[{type:16,flags:0,number:50}],f7=function(t){return t.width>t.height?new Pi(t.left+(t.width-t.height)/2,t.top,t.height,t.height):t.width<t.height?new Pi(t.left,t.top+(t.height-t.width)/2,t.width,t.width):t},h7=function(t){var e=t.type===d7?new Array(t.value.length+1).join("•"):t.value;return e.length===0?t.placeholder||"":e},Qf="checkbox",kf="radio",d7="password",IC=707406591,jg=(function(t){Jn(e,t);function e(r,A){var n=t.call(this,r,A)||this;switch(n.type=A.type.toLowerCase(),n.checked=A.checked,n.value=h7(A),(n.type===Qf||n.type===kf)&&(n.styles.backgroundColor=3739148031,n.styles.borderTopColor=n.styles.borderRightColor=n.styles.borderBottomColor=n.styles.borderLeftColor=2779096575,n.styles.borderTopWidth=n.styles.borderRightWidth=n.styles.borderBottomWidth=n.styles.borderLeftWidth=1,n.styles.borderTopStyle=n.styles.borderRightStyle=n.styles.borderBottomStyle=n.styles.borderLeftStyle=1,n.styles.backgroundClip=[0],n.styles.backgroundOrigin=[0],n.bounds=f7(n.bounds)),n.type){case Qf:n.styles.borderTopRightRadius=n.styles.borderTopLeftRadius=n.styles.borderBottomRightRadius=n.styles.borderBottomLeftRadius=c7;break;case kf:n.styles.borderTopRightRadius=n.styles.borderTopLeftRadius=n.styles.borderBottomRightRadius=n.styles.borderBottomLeftRadius=u7;break}return n}return e})(Bi),UC=(function(t){Jn(e,t);function e(r,A){var n=t.call(this,r,A)||this,i=A.options[A.selectedIndex||0];return n.value=i&&i.text||"",n}return e})(Bi),_C=(function(t){Jn(e,t);function e(r,A){var n=t.call(this,r,A)||this;return n.value=A.value,n}return e})(Bi),QC=(function(t){Jn(e,t);function e(r,A){var n=t.call(this,r,A)||this;n.src=A.src,n.width=parseInt(A.width,10)||0,n.height=parseInt(A.height,10)||0,n.backgroundColor=n.styles.backgroundColor;try{if(A.contentWindow&&A.contentWindow.document&&A.contentWindow.document.documentElement){n.tree=LC(r,A.contentWindow.document.documentElement);var i=A.contentWindow.document.documentElement?nc(r,getComputedStyle(A.contentWindow.document.documentElement).backgroundColor):Di.TRANSPARENT,s=A.contentWindow.document.body?nc(r,getComputedStyle(A.contentWindow.document.body).backgroundColor):Di.TRANSPARENT;n.backgroundColor=Qa(i)?Qa(s)?n.styles.backgroundColor:s:i}}catch{}return n}return e})(Bi),p7=["OL","UL","MENU"],Lf=function(t,e,r,A){for(var n=e.firstChild,i=void 0;n;n=i)if(i=n.nextSibling,TC(n)&&n.data.trim().length>0)r.textNodes.push(new a7(t,n,r.styles));else if(zo(n))if(HC(n)&&n.assignedNodes)n.assignedNodes().forEach(function(a){return Lf(t,a,r,A)});else{var s=kC(t,n);s.styles.isVisible()&&(g7(n,s,A)?s.flags|=4:v7(s.styles)&&(s.flags|=2),p7.indexOf(n.tagName)!==-1&&(s.flags|=8),r.elements.push(s),n.slot,n.shadowRoot?Lf(t,n.shadowRoot,s,A):!Nf(n)&&!NC(n)&&!Of(n)&&Lf(t,n,s,A))}},kC=function(t,e){return Gg(e)?new xC(t,e):OC(e)?new EC(t,e):NC(e)?new SC(t,e):m7(e)?new FC(t,e):w7(e)?new Rg(t,e):y7(e)?new jg(t,e):Of(e)?new UC(t,e):Nf(e)?new _C(t,e):MC(e)?new QC(t,e):new Bi(t,e)},LC=function(t,e){var r=kC(t,e);return r.flags|=4,Lf(t,e,r,r),r},g7=function(t,e,r){return e.styles.isPositionedWithZIndex()||e.styles.opacity<1||e.styles.isTransformed()||zg(t)&&r.styles.isTransparent()},v7=function(t){return t.isPositioned()||t.isFloating()},TC=function(t){return t.nodeType===Node.TEXT_NODE},zo=function(t){return t.nodeType===Node.ELEMENT_NODE},Kg=function(t){return zo(t)&&typeof t.style<"u"&&!Tf(t)},Tf=function(t){return typeof t.className=="object"},m7=function(t){return t.tagName==="LI"},w7=function(t){return t.tagName==="OL"},y7=function(t){return t.tagName==="INPUT"},B7=function(t){return t.tagName==="HTML"},NC=function(t){return t.tagName==="svg"},zg=function(t){return t.tagName==="BODY"},OC=function(t){return t.tagName==="CANVAS"},PC=function(t){return t.tagName==="VIDEO"},Gg=function(t){return t.tagName==="IMG"},MC=function(t){return t.tagName==="IFRAME"},DC=function(t){return t.tagName==="STYLE"},b7=function(t){return t.tagName==="SCRIPT"},Nf=function(t){return t.tagName==="TEXTAREA"},Of=function(t){return t.tagName==="SELECT"},HC=function(t){return t.tagName==="SLOT"},RC=function(t){return t.tagName.indexOf("-")>0},C7=(function(){function t(){this.counters={}}return t.prototype.getCounterValue=function(e){var r=this.counters[e];return r&&r.length?r[r.length-1]:1},t.prototype.getCounterValues=function(e){var r=this.counters[e];return r||[]},t.prototype.pop=function(e){var r=this;e.forEach(function(A){return r.counters[A].pop()})},t.prototype.parse=function(e){var r=this,A=e.counterIncrement,n=e.counterReset,i=!0;A!==null&&A.forEach(function(a){var o=r.counters[a.counter];o&&a.increment!==0&&(i=!1,o.length||o.push(1),o[Math.max(0,o.length-1)]+=a.increment)});var s=[];return i&&n.forEach(function(a){var o=r.counters[a.counter];s.push(a.counter),o||(o=r.counters[a.counter]=[]),o.push(a.reset)}),s},t})(),jC={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},KC={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},x7={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},E7={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},Go=function(t,e,r,A,n,i){return t<e||t>r?lc(t,n,i.length>0):A.integers.reduce(function(s,a,o){for(;t>=a;)t-=a,s+=A.values[o];return s},"")+i},zC=function(t,e,r,A){var n="";do r||t--,n=A(t)+n,t/=e;while(t*e>=e);return n},Nr=function(t,e,r,A,n){var i=r-e+1;return(t<0?"-":"")+(zC(Math.abs(t),i,A,function(s){return Tr(Math.floor(s%i)+e)})+n)},Ls=function(t,e,r){r===void 0&&(r=". ");var A=e.length;return zC(Math.abs(t),A,!1,function(n){return e[Math.floor(n%A)]})+r},Vo=1,La=2,Ta=4,oc=8,Hi=function(t,e,r,A,n,i){if(t<-9999||t>9999)return lc(t,4,n.length>0);var s=Math.abs(t),a=n;if(s===0)return e[0]+a;for(var o=0;s>0&&o<=4;o++){var l=s%10;l===0&&Zr(i,Vo)&&a!==""?a=e[l]+a:l>1||l===1&&o===0||l===1&&o===1&&Zr(i,La)||l===1&&o===1&&Zr(i,Ta)&&t>100||l===1&&o>1&&Zr(i,oc)?a=e[l]+(o>0?r[o-1]:"")+a:l===1&&o>0&&(a=r[o-1]+a),s=Math.floor(s/10)}return(t<0?A:"")+a},GC="十百千萬",VC="拾佰仟萬",qC="マイナス",Vg="마이너스",lc=function(t,e,r){var A=r?". ":"",n=r?"、":"",i=r?", ":"",s=r?" ":"";switch(e){case 0:return"•"+s;case 1:return"◦"+s;case 2:return"◾"+s;case 5:var a=Nr(t,48,57,!0,A);return a.length<4?"0"+a:a;case 4:return Ls(t,"〇一二三四五六七八九",n);case 6:return Go(t,1,3999,jC,3,A).toLowerCase();case 7:return Go(t,1,3999,jC,3,A);case 8:return Nr(t,945,969,!1,A);case 9:return Nr(t,97,122,!1,A);case 10:return Nr(t,65,90,!1,A);case 11:return Nr(t,1632,1641,!0,A);case 12:case 49:return Go(t,1,9999,KC,3,A);case 35:return Go(t,1,9999,KC,3,A).toLowerCase();case 13:return Nr(t,2534,2543,!0,A);case 14:case 30:return Nr(t,6112,6121,!0,A);case 15:return Ls(t,"子丑寅卯辰巳午未申酉戌亥",n);case 16:return Ls(t,"甲乙丙丁戊己庚辛壬癸",n);case 17:case 48:return Hi(t,"零一二三四五六七八九",GC,"負",n,La|Ta|oc);case 47:return Hi(t,"零壹貳參肆伍陸柒捌玖",VC,"負",n,Vo|La|Ta|oc);case 42:return Hi(t,"零一二三四五六七八九",GC,"负",n,La|Ta|oc);case 41:return Hi(t,"零壹贰叁肆伍陆柒捌玖",VC,"负",n,Vo|La|Ta|oc);case 26:return Hi(t,"〇一二三四五六七八九","十百千万",qC,n,0);case 25:return Hi(t,"零壱弐参四伍六七八九","拾百千万",qC,n,Vo|La|Ta);case 31:return Hi(t,"영일이삼사오육칠팔구","십백천만",Vg,i,Vo|La|Ta);case 33:return Hi(t,"零一二三四五六七八九","十百千萬",Vg,i,0);case 32:return Hi(t,"零壹貳參四五六七八九","拾百千",Vg,i,Vo|La|Ta);case 18:return Nr(t,2406,2415,!0,A);case 20:return Go(t,1,19999,E7,3,A);case 21:return Nr(t,2790,2799,!0,A);case 22:return Nr(t,2662,2671,!0,A);case 22:return Go(t,1,10999,x7,3,A);case 23:return Ls(t,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case 24:return Ls(t,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case 27:return Nr(t,3302,3311,!0,A);case 28:return Ls(t,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",n);case 29:return Ls(t,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",n);case 34:return Nr(t,3792,3801,!0,A);case 37:return Nr(t,6160,6169,!0,A);case 38:return Nr(t,4160,4169,!0,A);case 39:return Nr(t,2918,2927,!0,A);case 40:return Nr(t,1776,1785,!0,A);case 43:return Nr(t,3046,3055,!0,A);case 44:return Nr(t,3174,3183,!0,A);case 45:return Nr(t,3664,3673,!0,A);case 46:return Nr(t,3872,3881,!0,A);default:return Nr(t,48,57,!0,A)}},WC="data-html2canvas-ignore",$C=(function(){function t(e,r,A){if(this.context=e,this.options=A,this.scrolledElements=[],this.referenceElement=r,this.counters=new C7,this.quoteDepth=0,!r.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(r.ownerDocument.documentElement,!1)}return t.prototype.toIFrame=function(e,r){var A=this,n=S7(e,r);if(!n.contentWindow)return Promise.reject("Unable to find iframe window");var i=e.defaultView.pageXOffset,s=e.defaultView.pageYOffset,a=n.contentWindow,o=a.document,l=U7(n).then(function(){return zA(A,void 0,void 0,function(){var c,f;return NA(this,function(h){switch(h.label){case 0:return this.scrolledElements.forEach(L7),a&&(a.scrollTo(r.left,r.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(a.scrollY!==r.top||a.scrollX!==r.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(a.scrollX-r.left,a.scrollY-r.top,0,0))),c=this.options.onclone,f=this.clonedReferenceElement,typeof f>"u"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:o.fonts&&o.fonts.ready?[4,o.fonts.ready]:[3,2];case 1:h.sent(),h.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,I7(o)]:[3,4];case 3:h.sent(),h.label=4;case 4:return typeof c=="function"?[2,Promise.resolve().then(function(){return c(o,f)}).then(function(){return n})]:[2,n]}})})});return o.open(),o.write(Q7(document.doctype)+"<html></html>"),k7(this.referenceElement.ownerDocument,i,s),o.replaceChild(o.adoptNode(this.documentElement),o.documentElement),o.close(),l},t.prototype.createElementClone=function(e){if(Ug(e,2))debugger;if(OC(e))return this.createCanvasClone(e);if(PC(e))return this.createVideoClone(e);if(DC(e))return this.createStyleClone(e);var r=e.cloneNode(!1);return Gg(r)&&(Gg(e)&&e.currentSrc&&e.currentSrc!==e.src&&(r.src=e.currentSrc,r.srcset=""),r.loading==="lazy"&&(r.loading="eager")),RC(r)?this.createCustomElementClone(r):r},t.prototype.createCustomElementClone=function(e){var r=document.createElement("html2canvascustomelement");return qg(e.style,r),r},t.prototype.createStyleClone=function(e){try{var r=e.sheet;if(r&&r.cssRules){var A=[].slice.call(r.cssRules,0).reduce(function(i,s){return s&&typeof s.cssText=="string"?i+s.cssText:i},""),n=e.cloneNode(!1);return n.textContent=A,n}}catch(i){if(this.context.logger.error("Unable to access cssRules property",i),i.name!=="SecurityError")throw i}return e.cloneNode(!1)},t.prototype.createCanvasClone=function(e){var r;if(this.options.inlineImages&&e.ownerDocument){var A=e.ownerDocument.createElement("img");try{return A.src=e.toDataURL(),A}catch{this.context.logger.info("Unable to inline canvas contents, canvas is tainted",e)}}var n=e.cloneNode(!1);try{n.width=e.width,n.height=e.height;var i=e.getContext("2d"),s=n.getContext("2d");if(s)if(!this.options.allowTaint&&i)s.putImageData(i.getImageData(0,0,e.width,e.height),0,0);else{var a=(r=e.getContext("webgl2"))!==null&&r!==void 0?r:e.getContext("webgl");if(a){var o=a.getContextAttributes();o?.preserveDrawingBuffer===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",e)}s.drawImage(e,0,0)}return n}catch{this.context.logger.info("Unable to clone canvas as it is tainted",e)}return n},t.prototype.createVideoClone=function(e){var r=e.ownerDocument.createElement("canvas");r.width=e.offsetWidth,r.height=e.offsetHeight;var A=r.getContext("2d");try{return A&&(A.drawImage(e,0,0,r.width,r.height),this.options.allowTaint||A.getImageData(0,0,r.width,r.height)),r}catch{this.context.logger.info("Unable to clone video as it is tainted",e)}var n=e.ownerDocument.createElement("canvas");return n.width=e.offsetWidth,n.height=e.offsetHeight,n},t.prototype.appendChildNode=function(e,r,A){(!zo(r)||!b7(r)&&!r.hasAttribute(WC)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(r)))&&(!this.options.copyStyles||!zo(r)||!DC(r))&&e.appendChild(this.cloneNode(r,A))},t.prototype.cloneChildNodes=function(e,r,A){for(var n=this,i=e.shadowRoot?e.shadowRoot.firstChild:e.firstChild;i;i=i.nextSibling)if(zo(i)&&HC(i)&&typeof i.assignedNodes=="function"){var s=i.assignedNodes();s.length&&s.forEach(function(a){return n.appendChildNode(r,a,A)})}else this.appendChildNode(r,i,A)},t.prototype.cloneNode=function(e,r){if(TC(e))return document.createTextNode(e.data);if(!e.ownerDocument)return e.cloneNode(!1);var A=e.ownerDocument.defaultView;if(A&&zo(e)&&(Kg(e)||Tf(e))){var n=this.createElementClone(e);n.style.transitionProperty="none";var i=A.getComputedStyle(e),s=A.getComputedStyle(e,":before"),a=A.getComputedStyle(e,":after");this.referenceElement===e&&Kg(n)&&(this.clonedReferenceElement=n),zg(n)&&O7(n);var o=this.counters.parse(new lC(this.context,i)),l=this.resolvePseudoContent(e,n,s,cc.BEFORE);RC(e)&&(r=!0),PC(e)||this.cloneChildNodes(e,n,r),l&&n.insertBefore(l,n.firstChild);var c=this.resolvePseudoContent(e,n,a,cc.AFTER);return c&&n.appendChild(c),this.counters.pop(o),(i&&(this.options.copyStyles||Tf(e))&&!MC(e)||r)&&qg(i,n),(e.scrollTop!==0||e.scrollLeft!==0)&&this.scrolledElements.push([n,e.scrollLeft,e.scrollTop]),(Nf(e)||Of(e))&&(Nf(n)||Of(n))&&(n.value=e.value),n}return e.cloneNode(!1)},t.prototype.resolvePseudoContent=function(e,r,A,n){var i=this;if(A){var s=A.content,a=r.ownerDocument;if(!(!a||!s||s==="none"||s==="-moz-alt-content"||A.display==="none")){this.counters.parse(new lC(this.context,A));var o=new mH(this.context,A),l=a.createElement("html2canvaspseudoelement");qg(A,l),o.content.forEach(function(f){if(f.type===0)l.appendChild(a.createTextNode(f.value));else if(f.type===22){var h=a.createElement("img");h.src=f.value,h.style.opacity="1",l.appendChild(h)}else if(f.type===18){if(f.name==="attr"){var u=f.values.filter(rr);u.length&&l.appendChild(a.createTextNode(e.getAttribute(u[0].value)||""))}else if(f.name==="counter"){var g=f.values.filter(jo),p=g[0],w=g[1];if(p&&rr(p)){var m=i.counters.getCounterValue(p.value),B=w&&rr(w)?Ig.parse(i.context,w.value):3;l.appendChild(a.createTextNode(lc(m,B,!1)))}}else if(f.name==="counters"){var x=f.values.filter(jo),p=x[0],E=x[1],w=x[2];if(p&&rr(p)){var k=i.counters.getCounterValues(p.value),H=w&&rr(w)?Ig.parse(i.context,w.value):3,K=E&&E.type===0?E.value:"",R=k.map(function(L){return lc(L,H,!1)}).join(K);l.appendChild(a.createTextNode(R))}}}else if(f.type===20)switch(f.value){case"open-quote":l.appendChild(a.createTextNode(oC(o.quotes,i.quoteDepth++,!0)));break;case"close-quote":l.appendChild(a.createTextNode(oC(o.quotes,--i.quoteDepth,!1)));break;default:l.appendChild(a.createTextNode(f.value))}}),l.className=Wg+" "+$g;var c=n===cc.BEFORE?" "+Wg:" "+$g;return Tf(r)?r.className.baseValue+=c:r.className+=c,l}}},t.destroy=function(e){return e.parentNode?(e.parentNode.removeChild(e),!0):!1},t})(),cc;(function(t){t[t.BEFORE=0]="BEFORE",t[t.AFTER=1]="AFTER"})(cc||(cc={}));var S7=function(t,e){var r=t.createElement("iframe");return r.className="html2canvas-container",r.style.visibility="hidden",r.style.position="fixed",r.style.left="-10000px",r.style.top="0px",r.style.border="0",r.width=e.width.toString(),r.height=e.height.toString(),r.scrolling="no",r.setAttribute(WC,"true"),t.body.appendChild(r),r},F7=function(t){return new Promise(function(e){if(t.complete){e();return}if(!t.src){e();return}t.onload=e,t.onerror=e})},I7=function(t){return Promise.all([].slice.call(t.images,0).map(F7))},U7=function(t){return new Promise(function(e,r){var A=t.contentWindow;if(!A)return r("No window assigned for iframe");var n=A.document;A.onload=t.onload=function(){A.onload=t.onload=null;var i=setInterval(function(){n.body.childNodes.length>0&&n.readyState==="complete"&&(clearInterval(i),e(t))},50)}})},_7=["all","d","content"],qg=function(t,e){for(var r=t.length-1;r>=0;r--){var A=t.item(r);_7.indexOf(A)===-1&&e.style.setProperty(A,t.getPropertyValue(A))}return e},Q7=function(t){var e="";return t&&(e+="<!DOCTYPE ",t.name&&(e+=t.name),t.internalSubset&&(e+=t.internalSubset),t.publicId&&(e+='"'+t.publicId+'"'),t.systemId&&(e+='"'+t.systemId+'"'),e+=">"),e},k7=function(t,e,r){t&&t.defaultView&&(e!==t.defaultView.pageXOffset||r!==t.defaultView.pageYOffset)&&t.defaultView.scrollTo(e,r)},L7=function(t){var e=t[0],r=t[1],A=t[2];e.scrollLeft=r,e.scrollTop=A},T7=":before",N7=":after",Wg="___html2canvas___pseudoelement_before",$g="___html2canvas___pseudoelement_after",YC=`{
|
|
129
|
+
content: "" !important;
|
|
130
|
+
display: none !important;
|
|
131
|
+
}`,O7=function(t){P7(t,"."+Wg+T7+YC+`
|
|
132
|
+
.`+$g+N7+YC)},P7=function(t,e){var r=t.ownerDocument;if(r){var A=r.createElement("style");A.textContent=e,t.appendChild(A)}},XC=(function(){function t(){}return t.getOrigin=function(e){var r=t._link;return r?(r.href=e,r.href=r.href,r.protocol+r.hostname+r.port):"about:blank"},t.isSameOrigin=function(e){return t.getOrigin(e)===t._origin},t.setContext=function(e){t._link=e.document.createElement("a"),t._origin=t.getOrigin(e.location.href)},t._origin="about:blank",t})(),M7=(function(){function t(e,r){this.context=e,this._options=r,this._cache={}}return t.prototype.addImage=function(e){var r=Promise.resolve();return this.has(e)||(Xg(e)||j7(e))&&(this._cache[e]=this.loadImage(e)).catch(function(){}),r},t.prototype.match=function(e){return this._cache[e]},t.prototype.loadImage=function(e){return zA(this,void 0,void 0,function(){var r,A,n,i,s=this;return NA(this,function(a){switch(a.label){case 0:return r=XC.isSameOrigin(e),A=!Yg(e)&&this._options.useCORS===!0&&wA.SUPPORT_CORS_IMAGES&&!r,n=!Yg(e)&&!r&&!Xg(e)&&typeof this._options.proxy=="string"&&wA.SUPPORT_CORS_XHR&&!A,!r&&this._options.allowTaint===!1&&!Yg(e)&&!Xg(e)&&!n&&!A?[2]:(i=e,n?[4,this.proxy(i)]:[3,2]);case 1:i=a.sent(),a.label=2;case 2:return this.context.logger.debug("Added image "+e.substring(0,256)),[4,new Promise(function(o,l){var c=new Image;c.onload=function(){return o(c)},c.onerror=l,(K7(i)||A)&&(c.crossOrigin="anonymous"),c.src=i,c.complete===!0&&setTimeout(function(){return o(c)},500),s._options.imageTimeout>0&&setTimeout(function(){return l("Timed out ("+s._options.imageTimeout+"ms) loading image")},s._options.imageTimeout)})];case 3:return[2,a.sent()]}})})},t.prototype.has=function(e){return typeof this._cache[e]<"u"},t.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},t.prototype.proxy=function(e){var r=this,A=this._options.proxy;if(!A)throw new Error("No proxy defined");var n=e.substring(0,256);return new Promise(function(i,s){var a=wA.SUPPORT_RESPONSE_TYPE?"blob":"text",o=new XMLHttpRequest;o.onload=function(){if(o.status===200)if(a==="text")i(o.response);else{var f=new FileReader;f.addEventListener("load",function(){return i(f.result)},!1),f.addEventListener("error",function(h){return s(h)},!1),f.readAsDataURL(o.response)}else s("Failed to proxy resource "+n+" with status code "+o.status)},o.onerror=s;var l=A.indexOf("?")>-1?"&":"?";if(o.open("GET",""+A+l+"url="+encodeURIComponent(e)+"&responseType="+a),a!=="text"&&o instanceof XMLHttpRequest&&(o.responseType=a),r._options.imageTimeout){var c=r._options.imageTimeout;o.timeout=c,o.ontimeout=function(){return s("Timed out ("+c+"ms) proxying "+n)}}o.send()})},t})(),D7=/^data:image\/svg\+xml/i,H7=/^data:image\/.*;base64,/i,R7=/^data:image\/.*/i,j7=function(t){return wA.SUPPORT_SVG_DRAWING||!z7(t)},Yg=function(t){return R7.test(t)},K7=function(t){return H7.test(t)},Xg=function(t){return t.substr(0,4)==="blob"},z7=function(t){return t.substr(-3).toLowerCase()==="svg"||D7.test(t)},Je=(function(){function t(e,r){this.type=0,this.x=e,this.y=r}return t.prototype.add=function(e,r){return new t(this.x+e,this.y+r)},t})(),qo=function(t,e,r){return new Je(t.x+(e.x-t.x)*r,t.y+(e.y-t.y)*r)},Pf=(function(){function t(e,r,A,n){this.type=1,this.start=e,this.startControl=r,this.endControl=A,this.end=n}return t.prototype.subdivide=function(e,r){var A=qo(this.start,this.startControl,e),n=qo(this.startControl,this.endControl,e),i=qo(this.endControl,this.end,e),s=qo(A,n,e),a=qo(n,i,e),o=qo(s,a,e);return r?new t(this.start,A,s,o):new t(o,a,i,this.end)},t.prototype.add=function(e,r){return new t(this.start.add(e,r),this.startControl.add(e,r),this.endControl.add(e,r),this.end.add(e,r))},t.prototype.reverse=function(){return new t(this.end,this.endControl,this.startControl,this.start)},t})(),On=function(t){return t.type===1},G7=(function(){function t(e){var r=e.styles,A=e.bounds,n=Ac(r.borderTopLeftRadius,A.width,A.height),i=n[0],s=n[1],a=Ac(r.borderTopRightRadius,A.width,A.height),o=a[0],l=a[1],c=Ac(r.borderBottomRightRadius,A.width,A.height),f=c[0],h=c[1],u=Ac(r.borderBottomLeftRadius,A.width,A.height),g=u[0],p=u[1],w=[];w.push((i+o)/A.width),w.push((g+f)/A.width),w.push((s+p)/A.height),w.push((l+h)/A.height);var m=Math.max.apply(Math,w);m>1&&(i/=m,s/=m,o/=m,l/=m,f/=m,h/=m,g/=m,p/=m);var B=A.width-o,x=A.height-h,E=A.width-f,k=A.height-p,H=r.borderTopWidth,K=r.borderRightWidth,R=r.borderBottomWidth,I=r.borderLeftWidth,W=sr(r.paddingTop,e.bounds.width),L=sr(r.paddingRight,e.bounds.width),F=sr(r.paddingBottom,e.bounds.width),M=sr(r.paddingLeft,e.bounds.width);this.topLeftBorderDoubleOuterBox=i>0||s>0?wr(A.left+I/3,A.top+H/3,i-I/3,s-H/3,Xt.TOP_LEFT):new Je(A.left+I/3,A.top+H/3),this.topRightBorderDoubleOuterBox=i>0||s>0?wr(A.left+B,A.top+H/3,o-K/3,l-H/3,Xt.TOP_RIGHT):new Je(A.left+A.width-K/3,A.top+H/3),this.bottomRightBorderDoubleOuterBox=f>0||h>0?wr(A.left+E,A.top+x,f-K/3,h-R/3,Xt.BOTTOM_RIGHT):new Je(A.left+A.width-K/3,A.top+A.height-R/3),this.bottomLeftBorderDoubleOuterBox=g>0||p>0?wr(A.left+I/3,A.top+k,g-I/3,p-R/3,Xt.BOTTOM_LEFT):new Je(A.left+I/3,A.top+A.height-R/3),this.topLeftBorderDoubleInnerBox=i>0||s>0?wr(A.left+I*2/3,A.top+H*2/3,i-I*2/3,s-H*2/3,Xt.TOP_LEFT):new Je(A.left+I*2/3,A.top+H*2/3),this.topRightBorderDoubleInnerBox=i>0||s>0?wr(A.left+B,A.top+H*2/3,o-K*2/3,l-H*2/3,Xt.TOP_RIGHT):new Je(A.left+A.width-K*2/3,A.top+H*2/3),this.bottomRightBorderDoubleInnerBox=f>0||h>0?wr(A.left+E,A.top+x,f-K*2/3,h-R*2/3,Xt.BOTTOM_RIGHT):new Je(A.left+A.width-K*2/3,A.top+A.height-R*2/3),this.bottomLeftBorderDoubleInnerBox=g>0||p>0?wr(A.left+I*2/3,A.top+k,g-I*2/3,p-R*2/3,Xt.BOTTOM_LEFT):new Je(A.left+I*2/3,A.top+A.height-R*2/3),this.topLeftBorderStroke=i>0||s>0?wr(A.left+I/2,A.top+H/2,i-I/2,s-H/2,Xt.TOP_LEFT):new Je(A.left+I/2,A.top+H/2),this.topRightBorderStroke=i>0||s>0?wr(A.left+B,A.top+H/2,o-K/2,l-H/2,Xt.TOP_RIGHT):new Je(A.left+A.width-K/2,A.top+H/2),this.bottomRightBorderStroke=f>0||h>0?wr(A.left+E,A.top+x,f-K/2,h-R/2,Xt.BOTTOM_RIGHT):new Je(A.left+A.width-K/2,A.top+A.height-R/2),this.bottomLeftBorderStroke=g>0||p>0?wr(A.left+I/2,A.top+k,g-I/2,p-R/2,Xt.BOTTOM_LEFT):new Je(A.left+I/2,A.top+A.height-R/2),this.topLeftBorderBox=i>0||s>0?wr(A.left,A.top,i,s,Xt.TOP_LEFT):new Je(A.left,A.top),this.topRightBorderBox=o>0||l>0?wr(A.left+B,A.top,o,l,Xt.TOP_RIGHT):new Je(A.left+A.width,A.top),this.bottomRightBorderBox=f>0||h>0?wr(A.left+E,A.top+x,f,h,Xt.BOTTOM_RIGHT):new Je(A.left+A.width,A.top+A.height),this.bottomLeftBorderBox=g>0||p>0?wr(A.left,A.top+k,g,p,Xt.BOTTOM_LEFT):new Je(A.left,A.top+A.height),this.topLeftPaddingBox=i>0||s>0?wr(A.left+I,A.top+H,Math.max(0,i-I),Math.max(0,s-H),Xt.TOP_LEFT):new Je(A.left+I,A.top+H),this.topRightPaddingBox=o>0||l>0?wr(A.left+Math.min(B,A.width-K),A.top+H,B>A.width+K?0:Math.max(0,o-K),Math.max(0,l-H),Xt.TOP_RIGHT):new Je(A.left+A.width-K,A.top+H),this.bottomRightPaddingBox=f>0||h>0?wr(A.left+Math.min(E,A.width-I),A.top+Math.min(x,A.height-R),Math.max(0,f-K),Math.max(0,h-R),Xt.BOTTOM_RIGHT):new Je(A.left+A.width-K,A.top+A.height-R),this.bottomLeftPaddingBox=g>0||p>0?wr(A.left+I,A.top+Math.min(k,A.height-R),Math.max(0,g-I),Math.max(0,p-R),Xt.BOTTOM_LEFT):new Je(A.left+I,A.top+A.height-R),this.topLeftContentBox=i>0||s>0?wr(A.left+I+M,A.top+H+W,Math.max(0,i-(I+M)),Math.max(0,s-(H+W)),Xt.TOP_LEFT):new Je(A.left+I+M,A.top+H+W),this.topRightContentBox=o>0||l>0?wr(A.left+Math.min(B,A.width+I+M),A.top+H+W,B>A.width+I+M?0:o-I+M,l-(H+W),Xt.TOP_RIGHT):new Je(A.left+A.width-(K+L),A.top+H+W),this.bottomRightContentBox=f>0||h>0?wr(A.left+Math.min(E,A.width-(I+M)),A.top+Math.min(x,A.height+H+W),Math.max(0,f-(K+L)),h-(R+F),Xt.BOTTOM_RIGHT):new Je(A.left+A.width-(K+L),A.top+A.height-(R+F)),this.bottomLeftContentBox=g>0||p>0?wr(A.left+I+M,A.top+k,Math.max(0,g-(I+M)),p-(R+F),Xt.BOTTOM_LEFT):new Je(A.left+I+M,A.top+A.height-(R+F))}return t})(),Xt;(function(t){t[t.TOP_LEFT=0]="TOP_LEFT",t[t.TOP_RIGHT=1]="TOP_RIGHT",t[t.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",t[t.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(Xt||(Xt={}));var wr=function(t,e,r,A,n){var i=4*((Math.sqrt(2)-1)/3),s=r*i,a=A*i,o=t+r,l=e+A;switch(n){case Xt.TOP_LEFT:return new Pf(new Je(t,l),new Je(t,l-a),new Je(o-s,e),new Je(o,e));case Xt.TOP_RIGHT:return new Pf(new Je(t,e),new Je(t+s,e),new Je(o,l-a),new Je(o,l));case Xt.BOTTOM_RIGHT:return new Pf(new Je(o,e),new Je(o,e+a),new Je(t+s,l),new Je(t,l));case Xt.BOTTOM_LEFT:default:return new Pf(new Je(o,l),new Je(o-s,l),new Je(t,e+a),new Je(t,e))}},Mf=function(t){return[t.topLeftBorderBox,t.topRightBorderBox,t.bottomRightBorderBox,t.bottomLeftBorderBox]},V7=function(t){return[t.topLeftContentBox,t.topRightContentBox,t.bottomRightContentBox,t.bottomLeftContentBox]},Df=function(t){return[t.topLeftPaddingBox,t.topRightPaddingBox,t.bottomRightPaddingBox,t.bottomLeftPaddingBox]},q7=(function(){function t(e,r,A){this.offsetX=e,this.offsetY=r,this.matrix=A,this.type=0,this.target=6}return t})(),Hf=(function(){function t(e,r){this.path=e,this.target=r,this.type=1}return t})(),W7=(function(){function t(e){this.opacity=e,this.type=2,this.target=6}return t})(),$7=function(t){return t.type===0},JC=function(t){return t.type===1},Y7=function(t){return t.type===2},ZC=function(t,e){return t.length===e.length?t.some(function(r,A){return r===e[A]}):!1},X7=function(t,e,r,A,n){return t.map(function(i,s){switch(s){case 0:return i.add(e,r);case 1:return i.add(e+A,r);case 2:return i.add(e+A,r+n);case 3:return i.add(e,r+n)}return i})},ex=(function(){function t(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return t})(),tx=(function(){function t(e,r){if(this.container=e,this.parent=r,this.effects=[],this.curves=new G7(this.container),this.container.styles.opacity<1&&this.effects.push(new W7(this.container.styles.opacity)),this.container.styles.transform!==null){var A=this.container.bounds.left+this.container.styles.transformOrigin[0].number,n=this.container.bounds.top+this.container.styles.transformOrigin[1].number,i=this.container.styles.transform;this.effects.push(new q7(A,n,i))}if(this.container.styles.overflowX!==0){var s=Mf(this.curves),a=Df(this.curves);ZC(s,a)?this.effects.push(new Hf(s,6)):(this.effects.push(new Hf(s,2)),this.effects.push(new Hf(a,4)))}}return t.prototype.getEffects=function(e){for(var r=[2,3].indexOf(this.container.styles.position)===-1,A=this.parent,n=this.effects.slice(0);A;){var i=A.effects.filter(function(o){return!JC(o)});if(r||A.container.styles.position!==0||!A.parent){if(n.unshift.apply(n,i),r=[2,3].indexOf(A.container.styles.position)===-1,A.container.styles.overflowX!==0){var s=Mf(A.curves),a=Df(A.curves);ZC(s,a)||n.unshift(new Hf(a,6))}}else n.unshift.apply(n,i);A=A.parent}return n.filter(function(o){return Zr(o.target,e)})},t})(),Jg=function(t,e,r,A){t.container.elements.forEach(function(n){var i=Zr(n.flags,4),s=Zr(n.flags,2),a=new tx(n,t);Zr(n.styles.display,2048)&&A.push(a);var o=Zr(n.flags,8)?[]:A;if(i||s){var l=i||n.styles.isPositioned()?r:e,c=new ex(a);if(n.styles.isPositioned()||n.styles.opacity<1||n.styles.isTransformed()){var f=n.styles.zIndex.order;if(f<0){var h=0;l.negativeZIndex.some(function(g,p){return f>g.element.container.styles.zIndex.order?(h=p,!1):h>0}),l.negativeZIndex.splice(h,0,c)}else if(f>0){var u=0;l.positiveZIndex.some(function(g,p){return f>=g.element.container.styles.zIndex.order?(u=p+1,!1):u>0}),l.positiveZIndex.splice(u,0,c)}else l.zeroOrAutoZIndexOrTransformedOrOpacity.push(c)}else n.styles.isFloating()?l.nonPositionedFloats.push(c):l.nonPositionedInlineLevel.push(c);Jg(a,c,i?c:r,o)}else n.styles.isInlineLevel()?e.inlineLevel.push(a):e.nonInlineLevel.push(a),Jg(a,e,r,o);Zr(n.flags,8)&&rx(n,o)})},rx=function(t,e){for(var r=t instanceof Rg?t.start:1,A=t instanceof Rg?t.reversed:!1,n=0;n<e.length;n++){var i=e[n];i.container instanceof FC&&typeof i.container.value=="number"&&i.container.value!==0&&(r=i.container.value),i.listValue=lc(r,i.container.styles.listStyleType,!0),r+=A?-1:1}},J7=function(t){var e=new tx(t,null),r=new ex(e),A=[];return Jg(e,r,r,A),rx(e.container,A),r},Ax=function(t,e){switch(e){case 0:return Pn(t.topLeftBorderBox,t.topLeftPaddingBox,t.topRightBorderBox,t.topRightPaddingBox);case 1:return Pn(t.topRightBorderBox,t.topRightPaddingBox,t.bottomRightBorderBox,t.bottomRightPaddingBox);case 2:return Pn(t.bottomRightBorderBox,t.bottomRightPaddingBox,t.bottomLeftBorderBox,t.bottomLeftPaddingBox);default:return Pn(t.bottomLeftBorderBox,t.bottomLeftPaddingBox,t.topLeftBorderBox,t.topLeftPaddingBox)}},Z7=function(t,e){switch(e){case 0:return Pn(t.topLeftBorderBox,t.topLeftBorderDoubleOuterBox,t.topRightBorderBox,t.topRightBorderDoubleOuterBox);case 1:return Pn(t.topRightBorderBox,t.topRightBorderDoubleOuterBox,t.bottomRightBorderBox,t.bottomRightBorderDoubleOuterBox);case 2:return Pn(t.bottomRightBorderBox,t.bottomRightBorderDoubleOuterBox,t.bottomLeftBorderBox,t.bottomLeftBorderDoubleOuterBox);default:return Pn(t.bottomLeftBorderBox,t.bottomLeftBorderDoubleOuterBox,t.topLeftBorderBox,t.topLeftBorderDoubleOuterBox)}},eR=function(t,e){switch(e){case 0:return Pn(t.topLeftBorderDoubleInnerBox,t.topLeftPaddingBox,t.topRightBorderDoubleInnerBox,t.topRightPaddingBox);case 1:return Pn(t.topRightBorderDoubleInnerBox,t.topRightPaddingBox,t.bottomRightBorderDoubleInnerBox,t.bottomRightPaddingBox);case 2:return Pn(t.bottomRightBorderDoubleInnerBox,t.bottomRightPaddingBox,t.bottomLeftBorderDoubleInnerBox,t.bottomLeftPaddingBox);default:return Pn(t.bottomLeftBorderDoubleInnerBox,t.bottomLeftPaddingBox,t.topLeftBorderDoubleInnerBox,t.topLeftPaddingBox)}},tR=function(t,e){switch(e){case 0:return Rf(t.topLeftBorderStroke,t.topRightBorderStroke);case 1:return Rf(t.topRightBorderStroke,t.bottomRightBorderStroke);case 2:return Rf(t.bottomRightBorderStroke,t.bottomLeftBorderStroke);default:return Rf(t.bottomLeftBorderStroke,t.topLeftBorderStroke)}},Rf=function(t,e){var r=[];return On(t)?r.push(t.subdivide(.5,!1)):r.push(t),On(e)?r.push(e.subdivide(.5,!0)):r.push(e),r},Pn=function(t,e,r,A){var n=[];return On(t)?n.push(t.subdivide(.5,!1)):n.push(t),On(r)?n.push(r.subdivide(.5,!0)):n.push(r),On(A)?n.push(A.subdivide(.5,!0).reverse()):n.push(A),On(e)?n.push(e.subdivide(.5,!1).reverse()):n.push(e),n},nx=function(t){var e=t.bounds,r=t.styles;return e.add(r.borderLeftWidth,r.borderTopWidth,-(r.borderRightWidth+r.borderLeftWidth),-(r.borderTopWidth+r.borderBottomWidth))},jf=function(t){var e=t.styles,r=t.bounds,A=sr(e.paddingLeft,r.width),n=sr(e.paddingRight,r.width),i=sr(e.paddingTop,r.width),s=sr(e.paddingBottom,r.width);return r.add(A+e.borderLeftWidth,i+e.borderTopWidth,-(e.borderRightWidth+e.borderLeftWidth+A+n),-(e.borderTopWidth+e.borderBottomWidth+i+s))},rR=function(t,e){return t===0?e.bounds:t===2?jf(e):nx(e)},AR=function(t,e){return t===0?e.bounds:t===2?jf(e):nx(e)},Zg=function(t,e,r){var A=rR($o(t.styles.backgroundOrigin,e),t),n=AR($o(t.styles.backgroundClip,e),t),i=nR($o(t.styles.backgroundSize,e),r,A),s=i[0],a=i[1],o=Ac($o(t.styles.backgroundPosition,e),A.width-s,A.height-a),l=iR($o(t.styles.backgroundRepeat,e),o,i,A,n),c=Math.round(A.left+o[0]),f=Math.round(A.top+o[1]);return[l,c,f,s,a]},Wo=function(t){return rr(t)&&t.value===Ko.AUTO},Kf=function(t){return typeof t=="number"},nR=function(t,e,r){var A=e[0],n=e[1],i=e[2],s=t[0],a=t[1];if(!s)return[0,0];if(Rr(s)&&a&&Rr(a))return[sr(s,r.width),sr(a,r.height)];var o=Kf(i);if(rr(s)&&(s.value===Ko.CONTAIN||s.value===Ko.COVER)){if(Kf(i)){var l=r.width/r.height;return l<i!=(s.value===Ko.COVER)?[r.width,r.width/i]:[r.height*i,r.height]}return[r.width,r.height]}var c=Kf(A),f=Kf(n),h=c||f;if(Wo(s)&&(!a||Wo(a))){if(c&&f)return[A,n];if(!o&&!h)return[r.width,r.height];if(h&&o){var u=c?A:n*i,g=f?n:A/i;return[u,g]}var p=c?A:r.width,w=f?n:r.height;return[p,w]}if(o){var m=0,B=0;return Rr(s)?m=sr(s,r.width):Rr(a)&&(B=sr(a,r.height)),Wo(s)?m=B*i:(!a||Wo(a))&&(B=m/i),[m,B]}var x=null,E=null;if(Rr(s)?x=sr(s,r.width):a&&Rr(a)&&(E=sr(a,r.height)),x!==null&&(!a||Wo(a))&&(E=c&&f?x/A*n:r.height),E!==null&&Wo(s)&&(x=c&&f?E/n*A:r.width),x!==null&&E!==null)return[x,E];throw new Error("Unable to calculate background-size for element")},$o=function(t,e){var r=t[e];return typeof r>"u"?t[0]:r},iR=function(t,e,r,A,n){var i=e[0],s=e[1],a=r[0],o=r[1];switch(t){case 2:return[new Je(Math.round(A.left),Math.round(A.top+s)),new Je(Math.round(A.left+A.width),Math.round(A.top+s)),new Je(Math.round(A.left+A.width),Math.round(o+A.top+s)),new Je(Math.round(A.left),Math.round(o+A.top+s))];case 3:return[new Je(Math.round(A.left+i),Math.round(A.top)),new Je(Math.round(A.left+i+a),Math.round(A.top)),new Je(Math.round(A.left+i+a),Math.round(A.height+A.top)),new Je(Math.round(A.left+i),Math.round(A.height+A.top))];case 1:return[new Je(Math.round(A.left+i),Math.round(A.top+s)),new Je(Math.round(A.left+i+a),Math.round(A.top+s)),new Je(Math.round(A.left+i+a),Math.round(A.top+s+o)),new Je(Math.round(A.left+i),Math.round(A.top+s+o))];default:return[new Je(Math.round(n.left),Math.round(n.top)),new Je(Math.round(n.left+n.width),Math.round(n.top)),new Je(Math.round(n.left+n.width),Math.round(n.height+n.top)),new Je(Math.round(n.left),Math.round(n.height+n.top))]}},aR="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",ix="Hidden Text",sR=(function(){function t(e){this._data={},this._document=e}return t.prototype.parseMetrics=function(e,r){var A=this._document.createElement("div"),n=this._document.createElement("img"),i=this._document.createElement("span"),s=this._document.body;A.style.visibility="hidden",A.style.fontFamily=e,A.style.fontSize=r,A.style.margin="0",A.style.padding="0",A.style.whiteSpace="nowrap",s.appendChild(A),n.src=aR,n.width=1,n.height=1,n.style.margin="0",n.style.padding="0",n.style.verticalAlign="baseline",i.style.fontFamily=e,i.style.fontSize=r,i.style.margin="0",i.style.padding="0",i.appendChild(this._document.createTextNode(ix)),A.appendChild(i),A.appendChild(n);var a=n.offsetTop-i.offsetTop+2;A.removeChild(i),A.appendChild(this._document.createTextNode(ix)),A.style.lineHeight="normal",n.style.verticalAlign="super";var o=n.offsetTop-A.offsetTop+2;return s.removeChild(A),{baseline:a,middle:o}},t.prototype.getMetrics=function(e,r){var A=e+" "+r;return typeof this._data[A]>"u"&&(this._data[A]=this.parseMetrics(e,r)),this._data[A]},t})(),ax=(function(){function t(e,r){this.context=e,this.options=r}return t})(),oR=1e4,lR=(function(t){Jn(e,t);function e(r,A){var n=t.call(this,r,A)||this;return n._activeEffects=[],n.canvas=A.canvas?A.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),A.canvas||(n.canvas.width=Math.floor(A.width*A.scale),n.canvas.height=Math.floor(A.height*A.scale),n.canvas.style.width=A.width+"px",n.canvas.style.height=A.height+"px"),n.fontMetrics=new sR(document),n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-A.x,-A.y),n.ctx.textBaseline="bottom",n._activeEffects=[],n.context.logger.debug("Canvas renderer initialized ("+A.width+"x"+A.height+") with scale "+A.scale),n}return e.prototype.applyEffects=function(r){for(var A=this;this._activeEffects.length;)this.popEffect();r.forEach(function(n){return A.applyEffect(n)})},e.prototype.applyEffect=function(r){this.ctx.save(),Y7(r)&&(this.ctx.globalAlpha=r.opacity),$7(r)&&(this.ctx.translate(r.offsetX,r.offsetY),this.ctx.transform(r.matrix[0],r.matrix[1],r.matrix[2],r.matrix[3],r.matrix[4],r.matrix[5]),this.ctx.translate(-r.offsetX,-r.offsetY)),JC(r)&&(this.path(r.path),this.ctx.clip()),this._activeEffects.push(r)},e.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},e.prototype.renderStack=function(r){return zA(this,void 0,void 0,function(){var A;return NA(this,function(n){switch(n.label){case 0:return A=r.element.container.styles,A.isVisible()?[4,this.renderStackContent(r)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})})},e.prototype.renderNode=function(r){return zA(this,void 0,void 0,function(){return NA(this,function(A){switch(A.label){case 0:if(Zr(r.container.flags,16))debugger;return r.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(r)]:[3,3];case 1:return A.sent(),[4,this.renderNodeContent(r)];case 2:A.sent(),A.label=3;case 3:return[2]}})})},e.prototype.renderTextWithLetterSpacing=function(r,A,n){var i=this;if(A===0)this.ctx.fillText(r.text,r.bounds.left,r.bounds.top+n);else{var s=Hg(r.text);s.reduce(function(a,o){return i.ctx.fillText(o,a,r.bounds.top+n),a+i.ctx.measureText(o).width},r.bounds.left)}},e.prototype.createFontStyle=function(r){var A=r.fontVariant.filter(function(s){return s==="normal"||s==="small-caps"}).join(""),n=dR(r.fontFamily).join(", "),i=rc(r.fontSize)?""+r.fontSize.number+r.fontSize.unit:r.fontSize.number+"px";return[[r.fontStyle,A,r.fontWeight,i,n].join(" "),n,i]},e.prototype.renderTextNode=function(r,A){return zA(this,void 0,void 0,function(){var n,i,s,a,o,l,c,f,h=this;return NA(this,function(u){return n=this.createFontStyle(A),i=n[0],s=n[1],a=n[2],this.ctx.font=i,this.ctx.direction=A.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",o=this.fontMetrics.getMetrics(s,a),l=o.baseline,c=o.middle,f=A.paintOrder,r.textBounds.forEach(function(g){f.forEach(function(p){switch(p){case 0:h.ctx.fillStyle=uA(A.color),h.renderTextWithLetterSpacing(g,A.letterSpacing,l);var w=A.textShadow;w.length&&g.text.trim().length&&(w.slice(0).reverse().forEach(function(m){h.ctx.shadowColor=uA(m.color),h.ctx.shadowOffsetX=m.offsetX.number*h.options.scale,h.ctx.shadowOffsetY=m.offsetY.number*h.options.scale,h.ctx.shadowBlur=m.blur.number,h.renderTextWithLetterSpacing(g,A.letterSpacing,l)}),h.ctx.shadowColor="",h.ctx.shadowOffsetX=0,h.ctx.shadowOffsetY=0,h.ctx.shadowBlur=0),A.textDecorationLine.length&&(h.ctx.fillStyle=uA(A.textDecorationColor||A.color),A.textDecorationLine.forEach(function(m){switch(m){case 1:h.ctx.fillRect(g.bounds.left,Math.round(g.bounds.top+l),g.bounds.width,1);break;case 2:h.ctx.fillRect(g.bounds.left,Math.round(g.bounds.top),g.bounds.width,1);break;case 3:h.ctx.fillRect(g.bounds.left,Math.ceil(g.bounds.top+c),g.bounds.width,1);break}}));break;case 1:A.webkitTextStrokeWidth&&g.text.trim().length&&(h.ctx.strokeStyle=uA(A.webkitTextStrokeColor),h.ctx.lineWidth=A.webkitTextStrokeWidth,h.ctx.lineJoin=window.chrome?"miter":"round",h.ctx.strokeText(g.text,g.bounds.left,g.bounds.top+l)),h.ctx.strokeStyle="",h.ctx.lineWidth=0,h.ctx.lineJoin="miter";break}})}),[2]})})},e.prototype.renderReplacedElement=function(r,A,n){if(n&&r.intrinsicWidth>0&&r.intrinsicHeight>0){var i=jf(r),s=Df(A);this.path(s),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(n,0,0,r.intrinsicWidth,r.intrinsicHeight,i.left,i.top,i.width,i.height),this.ctx.restore()}},e.prototype.renderNodeContent=function(r){return zA(this,void 0,void 0,function(){var A,n,i,s,a,o,B,B,l,c,f,h,E,u,g,k,p,w,m,B,x,E,k;return NA(this,function(H){switch(H.label){case 0:this.applyEffects(r.getEffects(4)),A=r.container,n=r.curves,i=A.styles,s=0,a=A.textNodes,H.label=1;case 1:return s<a.length?(o=a[s],[4,this.renderTextNode(o,i)]):[3,4];case 2:H.sent(),H.label=3;case 3:return s++,[3,1];case 4:if(!(A instanceof xC))return[3,8];H.label=5;case 5:return H.trys.push([5,7,,8]),[4,this.context.cache.match(A.src)];case 6:return B=H.sent(),this.renderReplacedElement(A,n,B),[3,8];case 7:return H.sent(),this.context.logger.error("Error loading image "+A.src),[3,8];case 8:if(A instanceof EC&&this.renderReplacedElement(A,n,A.canvas),!(A instanceof SC))return[3,12];H.label=9;case 9:return H.trys.push([9,11,,12]),[4,this.context.cache.match(A.svg)];case 10:return B=H.sent(),this.renderReplacedElement(A,n,B),[3,12];case 11:return H.sent(),this.context.logger.error("Error loading svg "+A.svg.substring(0,255)),[3,12];case 12:return A instanceof QC&&A.tree?(l=new e(this.context,{scale:this.options.scale,backgroundColor:A.backgroundColor,x:0,y:0,width:A.width,height:A.height}),[4,l.render(A.tree)]):[3,14];case 13:c=H.sent(),A.width&&A.height&&this.ctx.drawImage(c,0,0,A.width,A.height,A.bounds.left,A.bounds.top,A.bounds.width,A.bounds.height),H.label=14;case 14:if(A instanceof jg&&(f=Math.min(A.bounds.width,A.bounds.height),A.type===Qf?A.checked&&(this.ctx.save(),this.path([new Je(A.bounds.left+f*.39363,A.bounds.top+f*.79),new Je(A.bounds.left+f*.16,A.bounds.top+f*.5549),new Je(A.bounds.left+f*.27347,A.bounds.top+f*.44071),new Je(A.bounds.left+f*.39694,A.bounds.top+f*.5649),new Je(A.bounds.left+f*.72983,A.bounds.top+f*.23),new Je(A.bounds.left+f*.84,A.bounds.top+f*.34085),new Je(A.bounds.left+f*.39363,A.bounds.top+f*.79)]),this.ctx.fillStyle=uA(IC),this.ctx.fill(),this.ctx.restore()):A.type===kf&&A.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(A.bounds.left+f/2,A.bounds.top+f/2,f/4,0,Math.PI*2,!0),this.ctx.fillStyle=uA(IC),this.ctx.fill(),this.ctx.restore())),cR(A)&&A.value.length){switch(h=this.createFontStyle(i),E=h[0],u=h[1],g=this.fontMetrics.getMetrics(E,u).baseline,this.ctx.font=E,this.ctx.fillStyle=uA(i.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=fR(A.styles.textAlign),k=jf(A),p=0,A.styles.textAlign){case 1:p+=k.width/2;break;case 2:p+=k.width;break}w=k.add(p,0,0,-k.height/2+1),this.ctx.save(),this.path([new Je(k.left,k.top),new Je(k.left+k.width,k.top),new Je(k.left+k.width,k.top+k.height),new Je(k.left,k.top+k.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new sc(A.value,w),i.letterSpacing,g),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!Zr(A.styles.display,2048))return[3,20];if(A.styles.listStyleImage===null)return[3,19];if(m=A.styles.listStyleImage,m.type!==0)return[3,18];B=void 0,x=m.url,H.label=15;case 15:return H.trys.push([15,17,,18]),[4,this.context.cache.match(x)];case 16:return B=H.sent(),this.ctx.drawImage(B,A.bounds.left-(B.width+10),A.bounds.top),[3,18];case 17:return H.sent(),this.context.logger.error("Error loading list-style-image "+x),[3,18];case 18:return[3,20];case 19:r.listValue&&A.styles.listStyleType!==-1&&(E=this.createFontStyle(i)[0],this.ctx.font=E,this.ctx.fillStyle=uA(i.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",k=new Pi(A.bounds.left,A.bounds.top+sr(A.styles.paddingTop,A.bounds.width),A.bounds.width,iC(i.lineHeight,i.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new sc(r.listValue,k),i.letterSpacing,iC(i.lineHeight,i.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),H.label=20;case 20:return[2]}})})},e.prototype.renderStackContent=function(r){return zA(this,void 0,void 0,function(){var A,n,m,i,s,m,a,o,m,l,c,m,f,h,m,u,g,m,p,w,m;return NA(this,function(B){switch(B.label){case 0:if(Zr(r.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(r.element)];case 1:B.sent(),A=0,n=r.negativeZIndex,B.label=2;case 2:return A<n.length?(m=n[A],[4,this.renderStack(m)]):[3,5];case 3:B.sent(),B.label=4;case 4:return A++,[3,2];case 5:return[4,this.renderNodeContent(r.element)];case 6:B.sent(),i=0,s=r.nonInlineLevel,B.label=7;case 7:return i<s.length?(m=s[i],[4,this.renderNode(m)]):[3,10];case 8:B.sent(),B.label=9;case 9:return i++,[3,7];case 10:a=0,o=r.nonPositionedFloats,B.label=11;case 11:return a<o.length?(m=o[a],[4,this.renderStack(m)]):[3,14];case 12:B.sent(),B.label=13;case 13:return a++,[3,11];case 14:l=0,c=r.nonPositionedInlineLevel,B.label=15;case 15:return l<c.length?(m=c[l],[4,this.renderStack(m)]):[3,18];case 16:B.sent(),B.label=17;case 17:return l++,[3,15];case 18:f=0,h=r.inlineLevel,B.label=19;case 19:return f<h.length?(m=h[f],[4,this.renderNode(m)]):[3,22];case 20:B.sent(),B.label=21;case 21:return f++,[3,19];case 22:u=0,g=r.zeroOrAutoZIndexOrTransformedOrOpacity,B.label=23;case 23:return u<g.length?(m=g[u],[4,this.renderStack(m)]):[3,26];case 24:B.sent(),B.label=25;case 25:return u++,[3,23];case 26:p=0,w=r.positiveZIndex,B.label=27;case 27:return p<w.length?(m=w[p],[4,this.renderStack(m)]):[3,30];case 28:B.sent(),B.label=29;case 29:return p++,[3,27];case 30:return[2]}})})},e.prototype.mask=function(r){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(r.slice(0).reverse()),this.ctx.closePath()},e.prototype.path=function(r){this.ctx.beginPath(),this.formatPath(r),this.ctx.closePath()},e.prototype.formatPath=function(r){var A=this;r.forEach(function(n,i){var s=On(n)?n.start:n;i===0?A.ctx.moveTo(s.x,s.y):A.ctx.lineTo(s.x,s.y),On(n)&&A.ctx.bezierCurveTo(n.startControl.x,n.startControl.y,n.endControl.x,n.endControl.y,n.end.x,n.end.y)})},e.prototype.renderRepeat=function(r,A,n,i){this.path(r),this.ctx.fillStyle=A,this.ctx.translate(n,i),this.ctx.fill(),this.ctx.translate(-n,-i)},e.prototype.resizeImage=function(r,A,n){var i;if(r.width===A&&r.height===n)return r;var s=(i=this.canvas.ownerDocument)!==null&&i!==void 0?i:document,a=s.createElement("canvas");a.width=Math.max(1,A),a.height=Math.max(1,n);var o=a.getContext("2d");return o.drawImage(r,0,0,r.width,r.height,0,0,A,n),a},e.prototype.renderBackgroundImage=function(r){return zA(this,void 0,void 0,function(){var A,n,i,s,a,o;return NA(this,function(l){switch(l.label){case 0:A=r.styles.backgroundImage.length-1,n=function(c){var f,h,u,W,ce,ee,M,b,R,g,W,ce,ee,M,b,p,w,m,B,x,E,k,H,K,R,I,W,L,F,M,b,Y,ce,ee,le,Ae,te,T,S,O,P,z;return NA(this,function(ie){switch(ie.label){case 0:if(c.type!==0)return[3,5];f=void 0,h=c.url,ie.label=1;case 1:return ie.trys.push([1,3,,4]),[4,i.context.cache.match(h)];case 2:return f=ie.sent(),[3,4];case 3:return ie.sent(),i.context.logger.error("Error loading background-image "+h),[3,4];case 4:return f&&(u=Zg(r,A,[f.width,f.height,f.width/f.height]),W=u[0],ce=u[1],ee=u[2],M=u[3],b=u[4],R=i.ctx.createPattern(i.resizeImage(f,M,b),"repeat"),i.renderRepeat(W,R,ce,ee)),[3,6];case 5:$M(c)?(g=Zg(r,A,[null,null,null]),W=g[0],ce=g[1],ee=g[2],M=g[3],b=g[4],p=zM(c.angle,M,b),w=p[0],m=p[1],B=p[2],x=p[3],E=p[4],k=document.createElement("canvas"),k.width=M,k.height=b,H=k.getContext("2d"),K=H.createLinearGradient(m,x,B,E),W5(c.stops,w).forEach(function(fe){return K.addColorStop(fe.stop,uA(fe.color))}),H.fillStyle=K,H.fillRect(0,0,M,b),M>0&&b>0&&(R=i.ctx.createPattern(k,"repeat"),i.renderRepeat(W,R,ce,ee))):YM(c)&&(I=Zg(r,A,[null,null,null]),W=I[0],L=I[1],F=I[2],M=I[3],b=I[4],Y=c.position.length===0?[Eg]:c.position,ce=sr(Y[0],M),ee=sr(Y[Y.length-1],b),le=GM(c,ce,ee,M,b),Ae=le[0],te=le[1],Ae>0&&te>0&&(T=i.ctx.createRadialGradient(L+ce,F+ee,0,L+ce,F+ee,Ae),W5(c.stops,Ae*2).forEach(function(fe){return T.addColorStop(fe.stop,uA(fe.color))}),i.path(W),i.ctx.fillStyle=T,Ae!==te?(S=r.bounds.left+.5*r.bounds.width,O=r.bounds.top+.5*r.bounds.height,P=te/Ae,z=1/P,i.ctx.save(),i.ctx.translate(S,O),i.ctx.transform(1,0,0,P,0,0),i.ctx.translate(-S,-O),i.ctx.fillRect(L,z*(F-O)+O,M,b*z),i.ctx.restore()):i.ctx.fill())),ie.label=6;case 6:return A--,[2]}})},i=this,s=0,a=r.styles.backgroundImage.slice(0).reverse(),l.label=1;case 1:return s<a.length?(o=a[s],[5,n(o)]):[3,4];case 2:l.sent(),l.label=3;case 3:return s++,[3,1];case 4:return[2]}})})},e.prototype.renderSolidBorder=function(r,A,n){return zA(this,void 0,void 0,function(){return NA(this,function(i){return this.path(Ax(n,A)),this.ctx.fillStyle=uA(r),this.ctx.fill(),[2]})})},e.prototype.renderDoubleBorder=function(r,A,n,i){return zA(this,void 0,void 0,function(){var s,a;return NA(this,function(o){switch(o.label){case 0:return A<3?[4,this.renderSolidBorder(r,n,i)]:[3,2];case 1:return o.sent(),[2];case 2:return s=Z7(i,n),this.path(s),this.ctx.fillStyle=uA(r),this.ctx.fill(),a=eR(i,n),this.path(a),this.ctx.fill(),[2]}})})},e.prototype.renderNodeBackgroundAndBorders=function(r){return zA(this,void 0,void 0,function(){var A,n,i,s,a,o,l,c,f=this;return NA(this,function(h){switch(h.label){case 0:return this.applyEffects(r.getEffects(2)),A=r.container.styles,n=!Qa(A.backgroundColor)||A.backgroundImage.length,i=[{style:A.borderTopStyle,color:A.borderTopColor,width:A.borderTopWidth},{style:A.borderRightStyle,color:A.borderRightColor,width:A.borderRightWidth},{style:A.borderBottomStyle,color:A.borderBottomColor,width:A.borderBottomWidth},{style:A.borderLeftStyle,color:A.borderLeftColor,width:A.borderLeftWidth}],s=uR($o(A.backgroundClip,0),r.curves),n||A.boxShadow.length?(this.ctx.save(),this.path(s),this.ctx.clip(),Qa(A.backgroundColor)||(this.ctx.fillStyle=uA(A.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(r.container)]):[3,2];case 1:h.sent(),this.ctx.restore(),A.boxShadow.slice(0).reverse().forEach(function(u){f.ctx.save();var g=Mf(r.curves),p=u.inset?0:oR,w=X7(g,-p+(u.inset?1:-1)*u.spread.number,(u.inset?1:-1)*u.spread.number,u.spread.number*(u.inset?-2:2),u.spread.number*(u.inset?-2:2));u.inset?(f.path(g),f.ctx.clip(),f.mask(w)):(f.mask(g),f.ctx.clip(),f.path(w)),f.ctx.shadowOffsetX=u.offsetX.number+p,f.ctx.shadowOffsetY=u.offsetY.number,f.ctx.shadowColor=uA(u.color),f.ctx.shadowBlur=u.blur.number,f.ctx.fillStyle=u.inset?uA(u.color):"rgba(0,0,0,1)",f.ctx.fill(),f.ctx.restore()}),h.label=2;case 2:a=0,o=0,l=i,h.label=3;case 3:return o<l.length?(c=l[o],c.style!==0&&!Qa(c.color)&&c.width>0?c.style!==2?[3,5]:[4,this.renderDashedDottedBorder(c.color,c.width,a,r.curves,2)]:[3,11]):[3,13];case 4:return h.sent(),[3,11];case 5:return c.style!==3?[3,7]:[4,this.renderDashedDottedBorder(c.color,c.width,a,r.curves,3)];case 6:return h.sent(),[3,11];case 7:return c.style!==4?[3,9]:[4,this.renderDoubleBorder(c.color,c.width,a,r.curves)];case 8:return h.sent(),[3,11];case 9:return[4,this.renderSolidBorder(c.color,a,r.curves)];case 10:h.sent(),h.label=11;case 11:a++,h.label=12;case 12:return o++,[3,3];case 13:return[2]}})})},e.prototype.renderDashedDottedBorder=function(r,A,n,i,s){return zA(this,void 0,void 0,function(){var a,o,l,c,f,h,u,g,p,w,m,B,x,E,k,H,k,H;return NA(this,function(K){return this.ctx.save(),a=tR(i,n),o=Ax(i,n),s===2&&(this.path(o),this.ctx.clip()),On(o[0])?(l=o[0].start.x,c=o[0].start.y):(l=o[0].x,c=o[0].y),On(o[1])?(f=o[1].end.x,h=o[1].end.y):(f=o[1].x,h=o[1].y),n===0||n===2?u=Math.abs(l-f):u=Math.abs(c-h),this.ctx.beginPath(),s===3?this.formatPath(a):this.formatPath(o.slice(0,2)),g=A<3?A*3:A*2,p=A<3?A*2:A,s===3&&(g=A,p=A),w=!0,u<=g*2?w=!1:u<=g*2+p?(m=u/(2*g+p),g*=m,p*=m):(B=Math.floor((u+p)/(g+p)),x=(u-B*g)/(B-1),E=(u-(B+1)*g)/B,p=E<=0||Math.abs(p-x)<Math.abs(p-E)?x:E),w&&(s===3?this.ctx.setLineDash([0,g+p]):this.ctx.setLineDash([g,p])),s===3?(this.ctx.lineCap="round",this.ctx.lineWidth=A):this.ctx.lineWidth=A*2+1.1,this.ctx.strokeStyle=uA(r),this.ctx.stroke(),this.ctx.setLineDash([]),s===2&&(On(o[0])&&(k=o[3],H=o[0],this.ctx.beginPath(),this.formatPath([new Je(k.end.x,k.end.y),new Je(H.start.x,H.start.y)]),this.ctx.stroke()),On(o[1])&&(k=o[1],H=o[2],this.ctx.beginPath(),this.formatPath([new Je(k.end.x,k.end.y),new Je(H.start.x,H.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},e.prototype.render=function(r){return zA(this,void 0,void 0,function(){var A;return NA(this,function(n){switch(n.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=uA(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),A=J7(r),[4,this.renderStack(A)];case 1:return n.sent(),this.applyEffects([]),[2,this.canvas]}})})},e})(ax),cR=function(t){return t instanceof _C||t instanceof UC?!0:t instanceof jg&&t.type!==kf&&t.type!==Qf},uR=function(t,e){switch(t){case 0:return Mf(e);case 2:return V7(e);default:return Df(e)}},fR=function(t){switch(t){case 1:return"center";case 2:return"right";default:return"left"}},hR=["-apple-system","system-ui"],dR=function(t){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?t.filter(function(e){return hR.indexOf(e)===-1}):t},pR=(function(t){Jn(e,t);function e(r,A){var n=t.call(this,r,A)||this;return n.canvas=A.canvas?A.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),n.options=A,n.canvas.width=Math.floor(A.width*A.scale),n.canvas.height=Math.floor(A.height*A.scale),n.canvas.style.width=A.width+"px",n.canvas.style.height=A.height+"px",n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-A.x,-A.y),n.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+A.width+"x"+A.height+" at "+A.x+","+A.y+") with scale "+A.scale),n}return e.prototype.render=function(r){return zA(this,void 0,void 0,function(){var A,n;return NA(this,function(i){switch(i.label){case 0:return A=Dg(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,r),[4,gR(A)];case 1:return n=i.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=uA(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(n,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},e})(ax),gR=function(t){return new Promise(function(e,r){var A=new Image;A.onload=function(){e(A)},A.onerror=r,A.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(t))})},vR=(function(){function t(e){var r=e.id,A=e.enabled;this.id=r,this.enabled=A,this.start=Date.now()}return t.prototype.debug=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];this.enabled&&(typeof window<"u"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,Yu([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},t.prototype.getTime=function(){return Date.now()-this.start},t.prototype.info=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];this.enabled&&typeof window<"u"&&window.console&&typeof console.info=="function"&&console.info.apply(console,Yu([this.id,this.getTime()+"ms"],e))},t.prototype.warn=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];this.enabled&&(typeof window<"u"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,Yu([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},t.prototype.error=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];this.enabled&&(typeof window<"u"&&window.console&&typeof console.error=="function"?console.error.apply(console,Yu([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},t.instances={},t})(),mR=(function(){function t(e,r){var A;this.windowBounds=r,this.instanceName="#"+t.instanceCount++,this.logger=new vR({id:this.instanceName,enabled:e.logging}),this.cache=(A=e.cache)!==null&&A!==void 0?A:new M7(this,e)}return t.instanceCount=1,t})(),wR=function(t,e){return e===void 0&&(e={}),yR(t,e)};typeof window<"u"&&XC.setContext(window);var yR=function(t,e){return zA(void 0,void 0,void 0,function(){var r,A,n,i,s,a,o,l,c,f,h,u,g,p,w,m,B,x,E,k,K,H,K,R,I,W,L,F,M,b,Y,ce,ee,le,Ae,te,T,S,O,P;return NA(this,function(z){switch(z.label){case 0:if(!t||typeof t!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(r=t.ownerDocument,!r)throw new Error("Element is not attached to a Document");if(A=r.defaultView,!A)throw new Error("Document is not attached to a Window");return n={allowTaint:(R=e.allowTaint)!==null&&R!==void 0?R:!1,imageTimeout:(I=e.imageTimeout)!==null&&I!==void 0?I:15e3,proxy:e.proxy,useCORS:(W=e.useCORS)!==null&&W!==void 0?W:!1},i=ng({logging:(L=e.logging)!==null&&L!==void 0?L:!0,cache:e.cache},n),s={windowWidth:(F=e.windowWidth)!==null&&F!==void 0?F:A.innerWidth,windowHeight:(M=e.windowHeight)!==null&&M!==void 0?M:A.innerHeight,scrollX:(b=e.scrollX)!==null&&b!==void 0?b:A.pageXOffset,scrollY:(Y=e.scrollY)!==null&&Y!==void 0?Y:A.pageYOffset},a=new Pi(s.scrollX,s.scrollY,s.windowWidth,s.windowHeight),o=new mR(i,a),l=(ce=e.foreignObjectRendering)!==null&&ce!==void 0?ce:!1,c={allowTaint:(ee=e.allowTaint)!==null&&ee!==void 0?ee:!1,onclone:e.onclone,ignoreElements:e.ignoreElements,inlineImages:l,copyStyles:l},o.logger.debug("Starting document clone with size "+a.width+"x"+a.height+" scrolled to "+-a.left+","+-a.top),f=new $C(o,t,c),h=f.clonedReferenceElement,h?[4,f.toIFrame(r,a)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return u=z.sent(),g=zg(h)||B7(h)?XO(h.ownerDocument):Xu(o,h),p=g.width,w=g.height,m=g.left,B=g.top,x=BR(o,h,e.backgroundColor),E={canvas:e.canvas,backgroundColor:x,scale:(Ae=(le=e.scale)!==null&&le!==void 0?le:A.devicePixelRatio)!==null&&Ae!==void 0?Ae:1,x:((te=e.x)!==null&&te!==void 0?te:0)+m,y:((T=e.y)!==null&&T!==void 0?T:0)+B,width:(S=e.width)!==null&&S!==void 0?S:Math.ceil(p),height:(O=e.height)!==null&&O!==void 0?O:Math.ceil(w)},l?(o.logger.debug("Document cloned, using foreign object rendering"),K=new pR(o,E),[4,K.render(h)]):[3,3];case 2:return k=z.sent(),[3,5];case 3:return o.logger.debug("Document cloned, element located at "+m+","+B+" with size "+p+"x"+w+" using computed rendering"),o.logger.debug("Starting DOM parsing"),H=LC(o,h),x===H.styles.backgroundColor&&(H.styles.backgroundColor=Di.TRANSPARENT),o.logger.debug("Starting renderer for element at "+E.x+","+E.y+" with size "+E.width+"x"+E.height),K=new lR(o,E),[4,K.render(H)];case 4:k=z.sent(),z.label=5;case 5:return(!((P=e.removeContainer)!==null&&P!==void 0)||P)&&($C.destroy(u)||o.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),o.logger.debug("Finished rendering"),[2,k]}})})},BR=function(t,e,r){var A=e.ownerDocument,n=A.documentElement?nc(t,getComputedStyle(A.documentElement).backgroundColor):Di.TRANSPARENT,i=A.body?nc(t,getComputedStyle(A.body).backgroundColor):Di.TRANSPARENT,s=typeof r=="string"?nc(t,r):r===null?Di.TRANSPARENT:4294967295;return e===A.documentElement?Qa(n)?Qa(i)?s:i:n:s};const bR=Object.freeze(Object.defineProperty({__proto__:null,default:wR},Symbol.toStringTag,{value:"Module"}));function sx(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,A=Array(e);r<e;r++)A[r]=t[r];return A}function CR(t){if(Array.isArray(t))return t}function xR(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var A,n,i,s,a=[],o=!0,l=!1;try{if(i=(r=r.call(t)).next,e!==0)for(;!(o=(A=i.call(r)).done)&&(a.push(A.value),a.length!==e);o=!0);}catch(c){l=!0,n=c}finally{try{if(!o&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(l)throw n}}return a}}function ER(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
133
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function SR(t,e){return CR(t)||xR(t,e)||FR(t,e)||ER()}function FR(t,e){if(t){if(typeof t=="string")return sx(t,e);var r={}.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?sx(t,e):void 0}}const ox=Object.entries,lx=Object.setPrototypeOf,IR=Object.isFrozen,UR=Object.getPrototypeOf,_R=Object.getOwnPropertyDescriptor;let yA=Object.freeze,BA=Object.seal,Yo=Object.create,cx=typeof Reflect<"u"&&Reflect,e0=cx.apply,t0=cx.construct;yA||(yA=function(e){return e}),BA||(BA=function(e){return e}),e0||(e0=function(e,r){for(var A=arguments.length,n=new Array(A>2?A-2:0),i=2;i<A;i++)n[i-2]=arguments[i];return e.apply(r,n)}),t0||(t0=function(e){for(var r=arguments.length,A=new Array(r>1?r-1:0),n=1;n<r;n++)A[n-1]=arguments[n];return new e(...A)});const Xo=jr(Array.prototype.forEach),QR=jr(Array.prototype.lastIndexOf),ux=jr(Array.prototype.pop),Jo=jr(Array.prototype.push),kR=jr(Array.prototype.splice),Na=Array.isArray,uc=jr(String.prototype.toLowerCase),r0=jr(String.prototype.toString),fx=jr(String.prototype.match),fc=jr(String.prototype.replace),hx=jr(String.prototype.indexOf),LR=jr(String.prototype.trim),TR=jr(Number.prototype.toString),NR=jr(Boolean.prototype.toString),dx=typeof BigInt>"u"?null:jr(BigInt.prototype.toString),px=typeof Symbol>"u"?null:jr(Symbol.prototype.toString),fA=jr(Object.prototype.hasOwnProperty),hc=jr(Object.prototype.toString),hA=jr(RegExp.prototype.test),Ts=OR(TypeError);function jr(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var r=arguments.length,A=new Array(r>1?r-1:0),n=1;n<r;n++)A[n-1]=arguments[n];return e0(t,e,A)}}function OR(t){return function(){for(var e=arguments.length,r=new Array(e),A=0;A<e;A++)r[A]=arguments[A];return t0(t,r)}}function jt(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:uc;if(lx&&lx(t,null),!Na(e))return t;let A=e.length;for(;A--;){let n=e[A];if(typeof n=="string"){const i=r(n);i!==n&&(IR(e)||(e[A]=i),n=i)}t[n]=!0}return t}function PR(t){for(let e=0;e<t.length;e++)fA(t,e)||(t[e]=null);return t}function GA(t){const e=Yo(null);for(const A of ox(t)){var r=SR(A,2);const n=r[0],i=r[1];fA(t,n)&&(Na(i)?e[n]=PR(i):i&&typeof i=="object"&&i.constructor===Object?e[n]=GA(i):e[n]=i)}return e}function MR(t){switch(typeof t){case"string":return t;case"number":return TR(t);case"boolean":return NR(t);case"bigint":return dx?dx(t):"0";case"symbol":return px?px(t):"Symbol()";case"undefined":return hc(t);case"function":case"object":{if(t===null)return hc(t);const e=t,r=bi(e,"toString");if(typeof r=="function"){const A=r(e);return typeof A=="string"?A:hc(A)}return hc(t)}default:return hc(t)}}function bi(t,e){for(;t!==null;){const A=_R(t,e);if(A){if(A.get)return jr(A.get);if(typeof A.value=="function")return jr(A.value)}t=UR(t)}function r(){return null}return r}function DR(t){try{return hA(t,""),!0}catch{return!1}}const gx=yA(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),A0=yA(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),n0=yA(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),HR=yA(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),i0=yA(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),RR=yA(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),vx=yA(["#text"]),mx=yA(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),a0=yA(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),wx=yA(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),zf=yA(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),jR=BA(/{{[\w\W]*|^[\w\W]*}}/g),KR=BA(/<%[\w\W]*|^[\w\W]*%>/g),zR=BA(/\${[\w\W]*/g),GR=BA(/^data-[\-\w.\u00B7-\uFFFF]+$/),VR=BA(/^aria-[\-\w]+$/),yx=BA(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),qR=BA(/^(?:\w+script|data):/i),WR=BA(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),$R=BA(/^html$/i),YR=BA(/^[a-z][.\w]*(-[.\w]+)+$/i),Bx=BA(/<[/\w!]/g),bx=BA(/<[/\w]/g),XR=BA(/<\/no(script|embed|frames)/i),JR=BA(/\/>/i),yn={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},ZR=function(){return typeof window>"u"?null:window},e9=function(e,r){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let A=null;const n="data-tt-policy-suffix";r&&r.hasAttribute(n)&&(A=r.getAttribute(n));const i="dompurify"+(A?"#"+A:"");try{return e.createPolicy(i,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}},Cx=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Oa=function(e,r,A,n){return fA(e,r)&&Na(e[r])?jt(n.base?GA(n.base):{},e[r],n.transform):A};function xx(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ZR();const e=qe=>xx(qe);if(e.version="3.4.12",e.removed=[],!t||!t.document||t.document.nodeType!==yn.document||!t.Element)return e.isSupported=!1,e;let r=t.document;const A=r,n=A.currentScript;t.DocumentFragment;const i=t.HTMLTemplateElement,s=t.Node,a=t.Element,o=t.NodeFilter,l=t.NamedNodeMap;l===void 0&&(t.NamedNodeMap||t.MozNamedAttrMap),t.HTMLFormElement;const c=t.DOMParser,f=t.trustedTypes,h=a.prototype,u=bi(h,"cloneNode"),g=bi(h,"remove"),p=bi(h,"nextSibling"),w=bi(h,"childNodes"),m=bi(h,"parentNode"),B=bi(h,"shadowRoot"),x=bi(h,"attributes"),E=s&&s.prototype?bi(s.prototype,"nodeType"):null,k=s&&s.prototype?bi(s.prototype,"nodeName"):null;if(typeof i=="function"){const qe=r.createElement("template");qe.content&&qe.content.ownerDocument&&(r=qe.content.ownerDocument)}let H,K="",R,I=!1,W=0;const L=function(){if(W>0)throw Ts('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},F=function(re){L(),W++;try{return H.createHTML(re)}finally{W--}},M=function(re){L(),W++;try{return H.createScriptURL(re)}finally{W--}},b=function(){return I||(R=e9(f,n),I=!0),R},Y=r,ce=Y.implementation,ee=Y.createNodeIterator,le=Y.createDocumentFragment,Ae=Y.getElementsByTagName,te=A.importNode;let T=Cx();e.isSupported=typeof ox=="function"&&typeof m=="function"&&ce&&ce.createHTMLDocument!==void 0;const S=jR,O=KR,P=zR,z=GR,ie=VR,fe=qR,Z=WR,pe=YR;let we=yx,be=null;const je=jt({},[...gx,...A0,...n0,...i0,...vx]);let Te=null;const Q=jt({},[...mx,...a0,...wx,...zf]);let N=Object.seal(Yo(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ue=null,J=null;const q=Object.seal(Yo(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ne=!0,xe=!0,ye=!1,he=!0,Se=!1,ve=!0,Ce=!1,Le=!1,Ge=null,Ke=null,We=!1,At=!1,$e=!1,_t=!1,at=!0,Bt=!1;const bt="user-content-";let Tt=!0,st=!1,Pt={},rt=null;const wt=jt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Kt=null;const lt=jt({},["audio","video","img","source","image","track"]);let ht=null;const qt=jt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Dn="http://www.w3.org/1998/Math/MathML",Pr="http://www.w3.org/2000/svg",Gr="http://www.w3.org/1999/xhtml";let CA=Gr,yt=!1,Bn=null;const ii=jt({},[Dn,Pr,Gr],r0),WA=yA(["mi","mo","mn","ms","mtext"]);let MA=jt({},WA);const dr=yA(["annotation-xml"]);let Ir=jt({},dr);const eA=jt({},["title","style","font","a","script"]);let bn=null;const Ei=["application/xhtml+xml","text/html"],Cn="text/html";let zt=null,pA=null;const xn=r.createElement("form"),$A=function(re){return re instanceof RegExp||re instanceof Function},ai=function(){let re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(pA&&pA===re)return;(!re||typeof re!="object")&&(re={}),re=GA(re),bn=Ei.indexOf(re.PARSER_MEDIA_TYPE)===-1?Cn:re.PARSER_MEDIA_TYPE,zt=bn==="application/xhtml+xml"?r0:uc,be=Oa(re,"ALLOWED_TAGS",je,{transform:zt}),Te=Oa(re,"ALLOWED_ATTR",Q,{transform:zt}),Bn=Oa(re,"ALLOWED_NAMESPACES",ii,{transform:r0}),ht=Oa(re,"ADD_URI_SAFE_ATTR",qt,{transform:zt,base:qt}),Kt=Oa(re,"ADD_DATA_URI_TAGS",lt,{transform:zt,base:lt}),rt=Oa(re,"FORBID_CONTENTS",wt,{transform:zt}),ue=Oa(re,"FORBID_TAGS",GA({}),{transform:zt}),J=Oa(re,"FORBID_ATTR",GA({}),{transform:zt}),Pt=fA(re,"USE_PROFILES")?re.USE_PROFILES&&typeof re.USE_PROFILES=="object"?GA(re.USE_PROFILES):re.USE_PROFILES:!1,ne=re.ALLOW_ARIA_ATTR!==!1,xe=re.ALLOW_DATA_ATTR!==!1,ye=re.ALLOW_UNKNOWN_PROTOCOLS||!1,he=re.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Se=re.SAFE_FOR_TEMPLATES||!1,ve=re.SAFE_FOR_XML!==!1,Ce=re.WHOLE_DOCUMENT||!1,At=re.RETURN_DOM||!1,$e=re.RETURN_DOM_FRAGMENT||!1,_t=re.RETURN_TRUSTED_TYPE||!1,We=re.FORCE_BODY||!1,at=re.SANITIZE_DOM!==!1,Bt=re.SANITIZE_NAMED_PROPS||!1,Tt=re.KEEP_CONTENT!==!1,st=re.IN_PLACE||!1,we=DR(re.ALLOWED_URI_REGEXP)?re.ALLOWED_URI_REGEXP:yx,CA=typeof re.NAMESPACE=="string"?re.NAMESPACE:Gr,MA=fA(re,"MATHML_TEXT_INTEGRATION_POINTS")&&re.MATHML_TEXT_INTEGRATION_POINTS&&typeof re.MATHML_TEXT_INTEGRATION_POINTS=="object"?GA(re.MATHML_TEXT_INTEGRATION_POINTS):jt({},WA),Ir=fA(re,"HTML_INTEGRATION_POINTS")&&re.HTML_INTEGRATION_POINTS&&typeof re.HTML_INTEGRATION_POINTS=="object"?GA(re.HTML_INTEGRATION_POINTS):jt({},dr);const Ie=fA(re,"CUSTOM_ELEMENT_HANDLING")&&re.CUSTOM_ELEMENT_HANDLING&&typeof re.CUSTOM_ELEMENT_HANDLING=="object"?GA(re.CUSTOM_ELEMENT_HANDLING):Yo(null);if(N=Yo(null),fA(Ie,"tagNameCheck")&&$A(Ie.tagNameCheck)&&(N.tagNameCheck=Ie.tagNameCheck),fA(Ie,"attributeNameCheck")&&$A(Ie.attributeNameCheck)&&(N.attributeNameCheck=Ie.attributeNameCheck),fA(Ie,"allowCustomizedBuiltInElements")&&typeof Ie.allowCustomizedBuiltInElements=="boolean"&&(N.allowCustomizedBuiltInElements=Ie.allowCustomizedBuiltInElements),BA(N),Se&&(xe=!1),$e&&(At=!0),Pt&&(be=jt({},vx),Te=Yo(null),Pt.html===!0&&(jt(be,gx),jt(Te,mx)),Pt.svg===!0&&(jt(be,A0),jt(Te,a0),jt(Te,zf)),Pt.svgFilters===!0&&(jt(be,n0),jt(Te,a0),jt(Te,zf)),Pt.mathMl===!0&&(jt(be,i0),jt(Te,wx),jt(Te,zf))),q.tagCheck=null,q.attributeCheck=null,fA(re,"ADD_TAGS")&&(typeof re.ADD_TAGS=="function"?q.tagCheck=re.ADD_TAGS:Na(re.ADD_TAGS)&&(be===je&&(be=GA(be)),jt(be,re.ADD_TAGS,zt))),fA(re,"ADD_ATTR")&&(typeof re.ADD_ATTR=="function"?q.attributeCheck=re.ADD_ATTR:Na(re.ADD_ATTR)&&(Te===Q&&(Te=GA(Te)),jt(Te,re.ADD_ATTR,zt))),fA(re,"ADD_URI_SAFE_ATTR")&&Na(re.ADD_URI_SAFE_ATTR)&&jt(ht,re.ADD_URI_SAFE_ATTR,zt),fA(re,"FORBID_CONTENTS")&&Na(re.FORBID_CONTENTS)&&(rt===wt&&(rt=GA(rt)),jt(rt,re.FORBID_CONTENTS,zt)),fA(re,"ADD_FORBID_CONTENTS")&&Na(re.ADD_FORBID_CONTENTS)&&(rt===wt&&(rt=GA(rt)),jt(rt,re.ADD_FORBID_CONTENTS,zt)),Tt&&(be["#text"]=!0),Ce&&jt(be,["html","head","body"]),be.table&&(jt(be,["tbody"]),delete ue.tbody),re.TRUSTED_TYPES_POLICY){if(typeof re.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ts('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof re.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ts('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const He=H;H=re.TRUSTED_TYPES_POLICY;try{K=F("")}catch(et){throw H=He,et}}else re.TRUSTED_TYPES_POLICY===null?(H=void 0,K=""):(H===void 0&&(H=b()),H&&typeof K=="string"&&(K=F("")));yA&&yA(re),pA=re},En=jt({},[...A0,...n0,...HR]),Si=jt({},[...i0,...RR]),Ra=function(re,Ie,He){return Ie.namespaceURI===Gr?re==="svg":Ie.namespaceURI===Dn?re==="svg"&&(He==="annotation-xml"||MA[He]):!!En[re]},ja=function(re,Ie,He){return Ie.namespaceURI===Gr?re==="math":Ie.namespaceURI===Pr?re==="math"&&Ir[He]:!!Si[re]},Ka=function(re,Ie,He){return Ie.namespaceURI===Pr&&!Ir[He]||Ie.namespaceURI===Dn&&!MA[He]?!1:!Si[re]&&(eA[re]||!En[re])},Fc=function(re){let Ie=m(re);(!Ie||!Ie.tagName)&&(Ie={namespaceURI:CA,tagName:"template"});const He=uc(re.tagName),et=uc(Ie.tagName);return Bn[re.namespaceURI]?re.namespaceURI===Pr?Ra(He,Ie,et):re.namespaceURI===Dn?ja(He,Ie,et):re.namespaceURI===Gr?Ka(He,Ie,et):!!(bn==="application/xhtml+xml"&&Bn[re.namespaceURI]):!1},cn=function(re){Jo(e.removed,{element:re});try{m(re).removeChild(re)}catch{if(g(re),!m(re))throw Ts("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},qi=function(re){Wi(re);const Ie=w(re);if(Ie){const et=[];Xo(Ie,vt=>{Jo(et,vt)}),Xo(et,vt=>{try{g(vt)}catch{}})}const He=x(re);if(He)for(let et=He.length-1;et>=0;--et){const vt=He[et],xt=vt&&vt.name;if(typeof xt=="string")try{re.removeAttribute(xt)}catch{}}},Hn=function(re,Ie){try{Jo(e.removed,{attribute:Ie.getAttributeNode(re),from:Ie})}catch{Jo(e.removed,{attribute:null,from:Ie})}if(Ie.removeAttribute(re),re==="is")if(At||$e)try{cn(Ie)}catch{}else try{Ie.setAttribute(re,"")}catch{}},un=function(re){const Ie=x(re);if(Ie)for(let He=Ie.length-1;He>=0;--He){const et=Ie[He],vt=et&&et.name;if(!(typeof vt!="string"||Te[zt(vt)]))try{re.removeAttribute(vt)}catch{}}},Wi=function(re){const Ie=[re];for(;Ie.length>0;){const He=Ie.pop();(E?E(He):He.nodeType)===yn.element&&un(He);const vt=w(He);if(vt)for(let xt=vt.length-1;xt>=0;--xt)Ie.push(vt[xt])}},rl=function(re){if(!ve)return;const Ie=[re];for(;Ie.length>0;){const He=Ie.pop(),et=E?E(He):He.nodeType;if(et===yn.processingInstruction||et===yn.comment&&hA(bx,He.data)){try{g(He)}catch{}continue}if(et===yn.element){const xt=He,lr=zt(k?k(He):He.nodeName);try{xt.hasAttribute&&xt.hasAttribute("patchsrc")&&xt.removeAttribute("patchsrc"),xt.hasAttribute&&xt.hasAttribute("for")&&lr!=="label"&&lr!=="output"&&xt.removeAttribute("for")}catch{}}const vt=w(He);if(vt)for(let xt=vt.length-1;xt>=0;--xt)Ie.push(vt[xt])}},za=function(re){let Ie=null,He=null;if(We)re="<remove></remove>"+re;else{const xt=fx(re,/^[\r\n\t ]+/);He=xt&&xt[0]}bn==="application/xhtml+xml"&&CA===Gr&&(re='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+re+"</body></html>");const et=H?F(re):re;if(CA===Gr)try{Ie=new c().parseFromString(et,bn)}catch{}if(!Ie||!Ie.documentElement){Ie=ce.createDocument(CA,"template",null);try{Ie.documentElement.innerHTML=yt?K:et}catch{}}const vt=Ie.body||Ie.documentElement;return re&&He&&vt.insertBefore(r.createTextNode(He),vt.childNodes[0]||null),CA===Gr?Ae.call(Ie,Ce?"html":"body")[0]:Ce?Ie.documentElement:vt},zs=function(re){return ee.call(re.ownerDocument||re,re,o.SHOW_ELEMENT|o.SHOW_COMMENT|o.SHOW_TEXT|o.SHOW_PROCESSING_INSTRUCTION|o.SHOW_CDATA_SECTION,null)},$i=function(re){return re=fc(re,S," "),re=fc(re,O," "),re=fc(re,P," "),re},Ga=function(re){var Ie;re.normalize();const He=ee.call(re.ownerDocument||re,re,o.SHOW_TEXT|o.SHOW_COMMENT|o.SHOW_CDATA_SECTION|o.SHOW_PROCESSING_INSTRUCTION,null);let et=He.nextNode();for(;et;)et.data=$i(et.data),et=He.nextNode();const vt=(Ie=re.querySelectorAll)===null||Ie===void 0?void 0:Ie.call(re,"template");vt&&Xo(vt,xt=>{Sn(xt.content)&&Ga(xt.content)})},YA=function(re){const Ie=k?k(re):null;return typeof Ie!="string"||zt(Ie)!=="form"?!1:typeof re.nodeName!="string"||typeof re.textContent!="string"||typeof re.removeChild!="function"||re.attributes!==x(re)||typeof re.removeAttribute!="function"||typeof re.setAttribute!="function"||typeof re.namespaceURI!="string"||typeof re.insertBefore!="function"||typeof re.hasChildNodes!="function"||re.nodeType!==E(re)||re.childNodes!==w(re)},Sn=function(re){if(!E||typeof re!="object"||re===null)return!1;try{return E(re)===yn.documentFragment}catch{return!1}},Yi=function(re){if(!E||typeof re!="object"||re===null)return!1;try{return typeof E(re)=="number"}catch{return!1}};function Yt(qe,re,Ie){qe.length!==0&&Xo(qe,He=>{He.call(e,re,Ie,pA)})}const Al=function(re,Ie){return!!(ve&&re.hasChildNodes()&&!Yi(re.firstElementChild)&&hA(Bx,re.textContent)&&hA(Bx,re.innerHTML)||ve&&re.namespaceURI===Gr&&Ie==="style"&&Yi(re.firstElementChild)||re.nodeType===yn.processingInstruction||ve&&re.nodeType===yn.comment&&hA(bx,re.data))},Rn=function(re,Ie){if(!ue[Ie]&&Ji(Ie)&&(N.tagNameCheck instanceof RegExp&&hA(N.tagNameCheck,Ie)||N.tagNameCheck instanceof Function&&N.tagNameCheck(Ie)))return!1;if(Tt&&!rt[Ie]){const He=m(re),et=w(re);if(et&&He){const vt=et.length;for(let xt=vt-1;xt>=0;--xt){const lr=st?et[xt]:u(et[xt],!0);He.insertBefore(lr,p(re))}}}return cn(re),!0},Xi=function(re,Ie){if(Yt(T.beforeSanitizeElements,re,null),re!==Ie&&m(re)===null)return!0;if(YA(re))return cn(re),!0;const He=zt(k?k(re):re.nodeName);if(Yt(T.uponSanitizeElement,re,{tagName:He,allowedTags:be}),re!==Ie&&m(re)===null)return!0;if(Al(re,He))return cn(re),!0;if(ue[He]||!(q.tagCheck instanceof Function&&q.tagCheck(He))&&!be[He]){const vt=Rn(re,He);return vt===!1&&Yt(T.afterSanitizeElements,re,null),vt}if((E?E(re):re.nodeType)===yn.element&&!Fc(re)||(He==="noscript"||He==="noembed"||He==="noframes")&&hA(XR,re.innerHTML))return cn(re),!0;if(Se&&re.nodeType===yn.text){const vt=$i(re.textContent);re.textContent!==vt&&(Jo(e.removed,{element:re.cloneNode()}),re.textContent=vt)}return Yt(T.afterSanitizeElements,re,null),!1},Va=function(re,Ie,He){if(J[Ie]||ve&&Ie==="patchsrc"||ve&&Ie==="for"&&re!=="label"&&re!=="output"||at&&(Ie==="id"||Ie==="name")&&(He in r||He in xn))return!1;const et=Te[Ie]||q.attributeCheck instanceof Function&&q.attributeCheck(Ie,re);if(!(xe&&hA(z,Ie))){if(!(ne&&hA(ie,Ie))){if(et){if(!ht[Ie]){if(!hA(we,fc(He,Z,""))){if(!((Ie==="src"||Ie==="xlink:href"||Ie==="href")&&re!=="script"&&hx(He,"data:")===0&&Kt[re])){if(!(ye&&!hA(fe,fc(He,Z,"")))){if(He)return!1}}}}}else if(!(Ji(re)&&(N.tagNameCheck instanceof RegExp&&hA(N.tagNameCheck,re)||N.tagNameCheck instanceof Function&&N.tagNameCheck(re))&&(N.attributeNameCheck instanceof RegExp&&hA(N.attributeNameCheck,Ie)||N.attributeNameCheck instanceof Function&&N.attributeNameCheck(Ie,re))||Ie==="is"&&N.allowCustomizedBuiltInElements&&(N.tagNameCheck instanceof RegExp&&hA(N.tagNameCheck,He)||N.tagNameCheck instanceof Function&&N.tagNameCheck(He))))return!1}}return!0},XA=jt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Ji=function(re){return!XA[uc(re)]&&hA(pe,re)},si=function(re,Ie,He,et){if(H&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!He)switch(f.getAttributeType(re,Ie)){case"TrustedHTML":return F(et);case"TrustedScriptURL":return M(et)}return et},tA=function(re,Ie,He,et){try{He?re.setAttributeNS(He,Ie,et):re.setAttribute(Ie,et),YA(re)?cn(re):ux(e.removed)}catch{Hn(Ie,re)}},Gs=function(re){Yt(T.beforeSanitizeAttributes,re,null);const Ie=re.attributes;if(!Ie||YA(re))return;const He={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Te,forceKeepAttr:void 0};let et=Ie.length;const vt=zt(re.nodeName);for(;et--;){const xt=Ie[et],lr=xt.name,Vr=xt.namespaceURI,qr=xt.value,rA=zt(lr),Wr=qr;let AA=lr==="value"?Wr:LR(Wr);if(He.attrName=rA,He.attrValue=AA,He.keepAttr=!0,He.forceKeepAttr=void 0,Yt(T.uponSanitizeAttribute,re,He),AA=He.attrValue,Bt&&(rA==="id"||rA==="name")&&hx(AA,bt)!==0&&(Hn(lr,re),AA=bt+AA),ve&&hA(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,AA)){Hn(lr,re);continue}if(rA==="attributename"&&fx(AA,"href")){Hn(lr,re);continue}if(!He.forceKeepAttr){if(!He.keepAttr){Hn(lr,re);continue}if(!he&&hA(JR,AA)){Hn(lr,re);continue}if(Se&&(AA=$i(AA)),!Va(vt,rA,AA)){Hn(lr,re);continue}AA=si(vt,rA,Vr,AA),AA!==Wr&&tA(re,lr,Vr,AA)}}Yt(T.afterSanitizeAttributes,re,null)},qa=function(re){let Ie=null;const He=zs(re);for(Yt(T.beforeSanitizeShadowDOM,re,null);Ie=He.nextNode();)if(Yt(T.uponSanitizeShadowNode,Ie,null),Xi(Ie,re),Gs(Ie),Sn(Ie.content)&&qa(Ie.content),(E?E(Ie):Ie.nodeType)===yn.element){const vt=B(Ie);Sn(vt)&&(Vs(vt),qa(vt))}Yt(T.afterSanitizeShadowDOM,re,null)},Vs=function(re){const Ie=[{node:re,shadow:null}];for(;Ie.length>0;){const He=Ie.pop();if(He.shadow){qa(He.shadow);continue}const et=He.node,xt=(E?E(et):et.nodeType)===yn.element,lr=w(et);if(lr)for(let Vr=lr.length-1;Vr>=0;--Vr)Ie.push({node:lr[Vr],shadow:null});if(xt){const Vr=k?k(et):null;if(typeof Vr=="string"&&zt(Vr)==="template"){const qr=et.content;Sn(qr)&&Ie.push({node:qr,shadow:null})}}if(xt){const Vr=B(et);Sn(Vr)&&Ie.push({node:null,shadow:Vr},{node:Vr,shadow:null})}}};return e.sanitize=function(qe){let re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ie=null,He=null,et=null,vt=null;if(yt=!qe,yt&&(qe="<!-->"),typeof qe!="string"&&!Yi(qe)&&(qe=MR(qe),typeof qe!="string"))throw Ts("dirty is not a string, aborting");if(!e.isSupported)return qe;Le?(be=Ge,Te=Ke):ai(re),(T.uponSanitizeElement.length>0||T.uponSanitizeAttribute.length>0)&&(be=GA(be)),T.uponSanitizeAttribute.length>0&&(Te=GA(Te)),e.removed=[];const xt=st&&typeof qe!="string"&&Yi(qe);if(xt){rl(qe);const rA=k?k(qe):qe.nodeName;if(typeof rA=="string"){const Wr=zt(rA);if(!be[Wr]||ue[Wr])throw qi(qe),Ts("root node is forbidden and cannot be sanitized in-place")}if(YA(qe))throw qi(qe),Ts("root node is clobbered and cannot be sanitized in-place");try{Vs(qe)}catch(Wr){throw qi(qe),Wr}}else if(Yi(qe))Ie=za("<!---->"),He=Ie.ownerDocument.importNode(qe,!0),He.nodeType===yn.element&&He.nodeName==="BODY"||He.nodeName==="HTML"?Ie=He:Ie.appendChild(He),Vs(He);else{if(!At&&!Se&&!Ce&&qe.indexOf("<")===-1)return H&&_t?F(qe):qe;if(Ie=za(qe),!Ie)return At?null:_t?K:""}Ie&&We&&cn(Ie.firstChild);const lr=xt?qe:Ie,Vr=zs(lr);try{for(;et=Vr.nextNode();)Xi(et,lr),Gs(et),Sn(et.content)&&qa(et.content)}catch(rA){throw xt&&(qi(qe),Xo(e.removed,Wr=>{Wr.element&&Wi(Wr.element)})),rA}if(xt)return Xo(e.removed,rA=>{rA.element&&Wi(rA.element)}),Se&&Ga(qe),qe;if(At){if(Se&&Ga(Ie),$e)for(vt=le.call(Ie.ownerDocument);Ie.firstChild;)vt.appendChild(Ie.firstChild);else vt=Ie;return(Te.shadowroot||Te.shadowrootmode)&&(vt=te.call(A,vt,!0)),vt}let qr=Ce?Ie.outerHTML:Ie.innerHTML;return Ce&&be["!doctype"]&&Ie.ownerDocument&&Ie.ownerDocument.doctype&&Ie.ownerDocument.doctype.name&&hA($R,Ie.ownerDocument.doctype.name)&&(qr="<!DOCTYPE "+Ie.ownerDocument.doctype.name+`>
|
|
134
|
+
`+qr),Se&&(qr=$i(qr)),H&&_t?F(qr):qr},e.setConfig=function(){let qe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ai(qe),Le=!0,Ge=be,Ke=Te},e.clearConfig=function(){pA=null,Le=!1,Ge=null,Ke=null,H=R,K=""},e.isValidAttribute=function(qe,re,Ie){pA||ai({});const He=zt(qe),et=zt(re);return Va(He,et,Ie)},e.addHook=function(qe,re){typeof re=="function"&&fA(T,qe)&&Jo(T[qe],re)},e.removeHook=function(qe,re){if(fA(T,qe)){if(re!==void 0){const Ie=QR(T[qe],re);return Ie===-1?void 0:kR(T[qe],Ie,1)[0]}return ux(T[qe])}},e.removeHooks=function(qe){fA(T,qe)&&(T[qe]=[])},e.removeAllHooks=function(){T=Cx()},e}var t9=xx();const r9=Object.freeze(Object.defineProperty({__proto__:null,default:t9},Symbol.toStringTag,{value:"Module"}));var Ex={},Sx={},dc,Fx;function yr(){if(Fx)return dc;Fx=1;var t=function(e){return e&&e.Math===Math&&e};return dc=t(typeof globalThis=="object"&&globalThis)||t(typeof window=="object"&&window)||t(typeof self=="object"&&self)||t(typeof ss=="object"&&ss)||t(typeof dc=="object"&&dc)||(function(){return this})()||Function("return this")(),dc}var s0={},o0,Ix;function Er(){return Ix||(Ix=1,o0=function(t){try{return!!t()}catch{return!0}}),o0}var l0,Ux;function ei(){if(Ux)return l0;Ux=1;var t=Er();return l0=!t(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),l0}var c0,_x;function Gf(){if(_x)return c0;_x=1;var t=Er();return c0=!t(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),c0}var u0,Qx;function bA(){if(Qx)return u0;Qx=1;var t=Gf(),e=Function.prototype.call;return u0=t?e.bind(e):function(){return e.apply(e,arguments)},u0}var f0={},kx;function A9(){if(kx)return f0;kx=1;var t={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,r=e&&!t.call({1:2},1);return f0.f=r?function(n){var i=e(this,n);return!!i&&i.enumerable}:t,f0}var h0,Lx;function d0(){return Lx||(Lx=1,h0=function(t,e){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:e}}),h0}var p0,Tx;function Sr(){if(Tx)return p0;Tx=1;var t=Gf(),e=Function.prototype,r=e.call,A=t&&e.bind.bind(r,r);return p0=t?A:function(n){return function(){return r.apply(n,arguments)}},p0}var g0,Nx;function Ns(){if(Nx)return g0;Nx=1;var t=Sr(),e=t({}.toString),r=t("".slice);return g0=function(A){return r(e(A),8,-1)},g0}var v0,Ox;function Px(){if(Ox)return v0;Ox=1;var t=Sr(),e=Er(),r=Ns(),A=Object,n=t("".split);return v0=e(function(){return!A("z").propertyIsEnumerable(0)})?function(i){return r(i)==="String"?n(i,""):A(i)}:A,v0}var m0,Mx;function Vf(){return Mx||(Mx=1,m0=function(t){return t==null}),m0}var w0,Dx;function ti(){if(Dx)return w0;Dx=1;var t=Vf(),e=TypeError;return w0=function(r){if(t(r))throw new e("Can't call method on "+r);return r},w0}var y0,Hx;function pc(){if(Hx)return y0;Hx=1;var t=Px(),e=ti();return y0=function(r){return t(e(r))},y0}var B0,Rx;function Or(){if(Rx)return B0;Rx=1;var t=typeof document=="object"&&document.all;return B0=typeof t>"u"&&t!==void 0?function(e){return typeof e=="function"||e===t}:function(e){return typeof e=="function"},B0}var b0,jx;function on(){if(jx)return b0;jx=1;var t=Or();return b0=function(e){return typeof e=="object"?e!==null:t(e)},b0}var C0,Kx;function Os(){if(Kx)return C0;Kx=1;var t=yr(),e=Or(),r=function(A){return e(A)?A:void 0};return C0=function(A,n){return arguments.length<2?r(t[A]):t[A]&&t[A][n]},C0}var x0,zx;function qf(){if(zx)return x0;zx=1;var t=Sr();return x0=t({}.isPrototypeOf),x0}var E0,Gx;function gc(){if(Gx)return E0;Gx=1;var t=yr(),e=t.navigator,r=e&&e.userAgent;return E0=r?String(r):"",E0}var S0,Vx;function F0(){if(Vx)return S0;Vx=1;var t=yr(),e=gc(),r=t.process,A=t.Deno,n=r&&r.versions||A&&A.version,i=n&&n.v8,s,a;return i&&(s=i.split("."),a=s[0]>0&&s[0]<4?1:+(s[0]+s[1])),!a&&e&&(s=e.match(/Edge\/(\d+)/),(!s||s[1]>=74)&&(s=e.match(/Chrome\/(\d+)/),s&&(a=+s[1]))),S0=a,S0}var I0,qx;function Wx(){if(qx)return I0;qx=1;var t=F0(),e=Er(),r=yr(),A=r.String;return I0=!!Object.getOwnPropertySymbols&&!e(function(){var n=Symbol("symbol detection");return!A(n)||!(Object(n)instanceof Symbol)||!Symbol.sham&&t&&t<41}),I0}var U0,$x;function Yx(){if($x)return U0;$x=1;var t=Wx();return U0=t&&!Symbol.sham&&typeof Symbol.iterator=="symbol",U0}var _0,Xx;function Jx(){if(Xx)return _0;Xx=1;var t=Os(),e=Or(),r=qf(),A=Yx(),n=Object;return _0=A?function(i){return typeof i=="symbol"}:function(i){var s=t("Symbol");return e(s)&&r(s.prototype,n(i))},_0}var Q0,Zx;function Wf(){if(Zx)return Q0;Zx=1;var t=String;return Q0=function(e){try{return t(e)}catch{return"Object"}},Q0}var k0,e4;function Ri(){if(e4)return k0;e4=1;var t=Or(),e=Wf(),r=TypeError;return k0=function(A){if(t(A))return A;throw new r(e(A)+" is not a function")},k0}var L0,t4;function Zo(){if(t4)return L0;t4=1;var t=Ri(),e=Vf();return L0=function(r,A){var n=r[A];return e(n)?void 0:t(n)},L0}var T0,r4;function n9(){if(r4)return T0;r4=1;var t=bA(),e=Or(),r=on(),A=TypeError;return T0=function(n,i){var s,a;if(i==="string"&&e(s=n.toString)&&!r(a=t(s,n))||e(s=n.valueOf)&&!r(a=t(s,n))||i!=="string"&&e(s=n.toString)&&!r(a=t(s,n)))return a;throw new A("Can't convert object to primitive value")},T0}var N0={exports:{}},O0,A4;function Ci(){return A4||(A4=1,O0=!1),O0}var P0,n4;function M0(){if(n4)return P0;n4=1;var t=yr(),e=Object.defineProperty;return P0=function(r,A){try{e(t,r,{value:A,configurable:!0,writable:!0})}catch{t[r]=A}return A},P0}var i4;function D0(){if(i4)return N0.exports;i4=1;var t=Ci(),e=yr(),r=M0(),A="__core-js_shared__",n=N0.exports=e[A]||r(A,{});return(n.versions||(n.versions=[])).push({version:"3.49.0",mode:t?"pure":"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE",source:"https://github.com/zloirock/core-js"}),N0.exports}var H0,a4;function R0(){if(a4)return H0;a4=1;var t=D0();return H0=function(e,r){return t[e]||(t[e]=r||{})},H0}var j0,s4;function $f(){if(s4)return j0;s4=1;var t=ti(),e=Object;return j0=function(r){return e(t(r))},j0}var K0,o4;function ri(){if(o4)return K0;o4=1;var t=Sr(),e=$f(),r=t({}.hasOwnProperty);return K0=Object.hasOwn||function(n,i){return r(e(n),i)},K0}var z0,l4;function c4(){if(l4)return z0;l4=1;var t=Sr(),e=0,r=Math.random(),A=t(1.1.toString);return z0=function(n){return"Symbol("+(n===void 0?"":n)+")_"+A(++e+r,36)},z0}var G0,u4;function dA(){if(u4)return G0;u4=1;var t=yr(),e=R0(),r=ri(),A=c4(),n=Wx(),i=Yx(),s=t.Symbol,a=e("wks"),o=i?s.for||s:s&&s.withoutSetter||A;return G0=function(l){return r(a,l)||(a[l]=n&&r(s,l)?s[l]:o("Symbol."+l)),a[l]},G0}var V0,f4;function i9(){if(f4)return V0;f4=1;var t=bA(),e=on(),r=Jx(),A=Zo(),n=n9(),i=dA(),s=TypeError,a=i("toPrimitive");return V0=function(o,l){if(!e(o)||r(o))return o;var c=A(o,a),f;if(c){if(l===void 0&&(l="default"),f=t(c,o,l),!e(f)||r(f))return f;throw new s("Can't convert object to primitive value")}return l===void 0&&(l="number"),n(o,l)},V0}var q0,h4;function d4(){if(h4)return q0;h4=1;var t=i9(),e=Jx();return q0=function(r){var A=t(r,"string");return e(A)?A:A+""},q0}var W0,p4;function Yf(){if(p4)return W0;p4=1;var t=yr(),e=on(),r=t.document,A=e(r)&&e(r.createElement);return W0=function(n){return A?r.createElement(n):{}},W0}var $0,g4;function v4(){if(g4)return $0;g4=1;var t=ei(),e=Er(),r=Yf();return $0=!t&&!e(function(){return Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a!==7}),$0}var m4;function Xf(){if(m4)return s0;m4=1;var t=ei(),e=bA(),r=A9(),A=d0(),n=pc(),i=d4(),s=ri(),a=v4(),o=Object.getOwnPropertyDescriptor;return s0.f=t?o:function(c,f){if(c=n(c),f=i(f),a)try{return o(c,f)}catch{}if(s(c,f))return A(!e(r.f,c,f),c[f])},s0}var Y0={},X0,w4;function y4(){if(w4)return X0;w4=1;var t=ei(),e=Er();return X0=t&&e(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),X0}var J0,B4;function VA(){if(B4)return J0;B4=1;var t=on(),e=String,r=TypeError;return J0=function(A){if(t(A))return A;throw new r(e(A)+" is not an object")},J0}var b4;function Pa(){if(b4)return Y0;b4=1;var t=ei(),e=v4(),r=y4(),A=VA(),n=d4(),i=TypeError,s=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o="enumerable",l="configurable",c="writable";return Y0.f=t?r?function(h,u,g){if(A(h),u=n(u),A(g),typeof h=="function"&&u==="prototype"&&"value"in g&&c in g&&!g[c]){var p=a(h,u);p&&p[c]&&(h[u]=g.value,g={configurable:l in g?g[l]:p[l],enumerable:o in g?g[o]:p[o],writable:!1})}return s(h,u,g)}:s:function(h,u,g){if(A(h),u=n(u),A(g),e)try{return s(h,u,g)}catch{}if("get"in g||"set"in g)throw new i("Accessors not supported");return"value"in g&&(h[u]=g.value),h},Y0}var Z0,C4;function vc(){if(C4)return Z0;C4=1;var t=ei(),e=Pa(),r=d0();return Z0=t?function(A,n,i){return e.f(A,n,r(1,i))}:function(A,n,i){return A[n]=i,A},Z0}var e1={exports:{}},t1,x4;function Jf(){if(x4)return t1;x4=1;var t=ei(),e=ri(),r=Function.prototype,A=t&&Object.getOwnPropertyDescriptor,n=e(r,"name"),i=n&&(function(){}).name==="something",s=n&&(!t||t&&A(r,"name").configurable);return t1={EXISTS:n,PROPER:i,CONFIGURABLE:s},t1}var r1,E4;function A1(){if(E4)return r1;E4=1;var t=Sr(),e=Or(),r=D0(),A=t(Function.toString);return e(r.inspectSource)||(r.inspectSource=function(n){return A(n)}),r1=r.inspectSource,r1}var n1,S4;function a9(){if(S4)return n1;S4=1;var t=yr(),e=Or(),r=t.WeakMap;return n1=e(r)&&/native code/.test(String(r)),n1}var i1,F4;function a1(){if(F4)return i1;F4=1;var t=R0(),e=c4(),r=t("keys");return i1=function(A){return r[A]||(r[A]=e(A))},i1}var s1,I4;function o1(){return I4||(I4=1,s1={}),s1}var l1,U4;function Zf(){if(U4)return l1;U4=1;var t=a9(),e=yr(),r=on(),A=vc(),n=ri(),i=D0(),s=a1(),a=o1(),o="Object already initialized",l=e.TypeError,c=e.WeakMap,f,h,u,g=function(B){return u(B)?h(B):f(B,{})},p=function(B){return function(x){var E;if(!r(x)||(E=h(x)).type!==B)throw new l("Incompatible receiver, "+B+" required");return E}};if(t||i.state){var w=i.state||(i.state=new c);w.get=w.get,w.has=w.has,w.set=w.set,f=function(B,x){if(w.has(B))throw new l(o);return x.facade=B,w.set(B,x),x},h=function(B){return w.get(B)||{}},u=function(B){return w.has(B)}}else{var m=s("state");a[m]=!0,f=function(B,x){if(n(B,m))throw new l(o);return x.facade=B,A(B,m,x),x},h=function(B){return n(B,m)?B[m]:{}},u=function(B){return n(B,m)}}return l1={set:f,get:h,has:u,enforce:g,getterFor:p},l1}var _4;function Q4(){if(_4)return e1.exports;_4=1;var t=Sr(),e=Er(),r=Or(),A=ri(),n=ei(),i=Jf().CONFIGURABLE,s=A1(),a=Zf(),o=a.enforce,l=a.get,c=String,f=Object.defineProperty,h=t("".slice),u=t("".replace),g=t([].join),p=n&&!e(function(){return f(function(){},"length",{value:8}).length!==8}),w=String(String).split("String"),m=e1.exports=function(B,x,E){h(c(x),0,7)==="Symbol("&&(x="["+u(c(x),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),E&&E.getter&&(x="get "+x),E&&E.setter&&(x="set "+x),(!A(B,"name")||i&&B.name!==x)&&(n?f(B,"name",{value:x,configurable:!0}):B.name=x),p&&E&&A(E,"arity")&&B.length!==E.arity&&f(B,"length",{value:E.arity});try{E&&A(E,"constructor")&&E.constructor?n&&f(B,"prototype",{writable:!1}):B.prototype&&(B.prototype=void 0)}catch{}var k=o(B);return A(k,"source")||(k.source=g(w,typeof x=="string"?x:"")),B};return Function.prototype.toString=m(function(){return r(this)&&l(this).source||s(this)},"toString"),e1.exports}var c1,k4;function Ps(){if(k4)return c1;k4=1;var t=Or(),e=Pa(),r=Q4(),A=M0();return c1=function(n,i,s,a){a||(a={});var o=a.enumerable,l=a.name!==void 0?a.name:i;if(t(s)&&r(s,l,a),a.global)o?n[i]=s:A(i,s);else{try{a.unsafe?n[i]&&(o=!0):delete n[i]}catch{}o?n[i]=s:e.f(n,i,{value:s,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return n},c1}var u1={},f1,L4;function s9(){if(L4)return f1;L4=1;var t=Math.ceil,e=Math.floor;return f1=Math.trunc||function(A){var n=+A;return(n>0?e:t)(n)},f1}var h1,T4;function eh(){if(T4)return h1;T4=1;var t=s9();return h1=function(e){var r=+e;return r!==r||r===0?0:t(r)},h1}var d1,N4;function o9(){if(N4)return d1;N4=1;var t=eh(),e=Math.max,r=Math.min;return d1=function(A,n){var i=t(A);return i<0?e(i+n,0):r(i,n)},d1}var p1,O4;function el(){if(O4)return p1;O4=1;var t=eh(),e=Math.min;return p1=function(r){var A=t(r);return A>0?e(A,9007199254740991):0},p1}var g1,P4;function v1(){if(P4)return g1;P4=1;var t=el();return g1=function(e){return t(e.length)},g1}var m1,M4;function D4(){if(M4)return m1;M4=1;var t=pc(),e=o9(),r=v1(),A=function(n){return function(i,s,a){var o=t(i),l=r(o);if(l===0)return!n&&-1;var c=e(a,l),f;if(n&&s!==s){for(;l>c;)if(f=o[c++],f!==f)return!0}else for(;l>c;c++)if((n||c in o)&&o[c]===s)return n||c||0;return!n&&-1}};return m1={includes:A(!0),indexOf:A(!1)},m1}var w1,H4;function R4(){if(H4)return w1;H4=1;var t=Sr(),e=ri(),r=pc(),A=D4().indexOf,n=o1(),i=t([].push);return w1=function(s,a){var o=r(s),l=0,c=[],f;for(f in o)!e(n,f)&&e(o,f)&&i(c,f);for(;a.length>l;)e(o,f=a[l++])&&(~A(c,f)||i(c,f));return c},w1}var y1,j4;function B1(){return j4||(j4=1,y1=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),y1}var K4;function l9(){if(K4)return u1;K4=1;var t=R4(),e=B1(),r=e.concat("length","prototype");return u1.f=Object.getOwnPropertyNames||function(n){return t(n,r)},u1}var b1={},z4;function c9(){return z4||(z4=1,b1.f=Object.getOwnPropertySymbols),b1}var C1,G4;function u9(){if(G4)return C1;G4=1;var t=Os(),e=Sr(),r=l9(),A=c9(),n=VA(),i=e([].concat);return C1=t("Reflect","ownKeys")||function(a){var o=r.f(n(a)),l=A.f;return l?i(o,l(a)):o},C1}var x1,V4;function f9(){if(V4)return x1;V4=1;var t=ri(),e=u9(),r=Xf(),A=Pa();return x1=function(n,i,s){for(var a=e(i),o=A.f,l=r.f,c=0;c<a.length;c++){var f=a[c];!t(n,f)&&!(s&&t(s,f))&&o(n,f,l(i,f))}},x1}var E1,q4;function W4(){if(q4)return E1;q4=1;var t=Er(),e=Or(),r=/#|\.prototype\./,A=function(o,l){var c=i[n(o)];return c===a?!0:c===s?!1:e(l)?t(l):!!l},n=A.normalize=function(o){return String(o).replace(r,".").toLowerCase()},i=A.data={},s=A.NATIVE="N",a=A.POLYFILL="P";return E1=A,E1}var S1,$4;function qA(){if($4)return S1;$4=1;var t=yr(),e=Xf().f,r=vc(),A=Ps(),n=M0(),i=f9(),s=W4();return S1=function(a,o){var l=a.target,c=a.global,f=a.stat,h,u,g,p,w,m;if(c?u=t:f?u=t[l]||n(l,{}):u=t[l]&&t[l].prototype,u)for(g in o){if(w=o[g],a.dontCallGetSet?(m=e(u,g),p=m&&m.value):p=u[g],h=s(c?g:l+(f?".":"#")+g,a.forced),!h&&p!==void 0){if(typeof w==typeof p)continue;i(w,p)}(a.sham||p&&p.sham)&&r(w,"sham",!0),A(u,g,w,a)}},S1}var F1,Y4;function X4(){if(Y4)return F1;Y4=1;var t=yr(),e=gc(),r=Ns(),A=function(n){return e.slice(0,n.length)===n};return F1=(function(){return A("Bun/")?"BUN":A("Cloudflare-Workers")?"CLOUDFLARE":A("Deno/")?"DENO":A("Node.js/")?"NODE":t.Bun&&typeof Bun.version=="string"?"BUN":t.Deno&&typeof Deno.version=="object"?"DENO":r(t.process)==="process"?"NODE":t.window&&t.document?"BROWSER":"REST"})(),F1}var I1,J4;function th(){if(J4)return I1;J4=1;var t=X4();return I1=t==="NODE",I1}var U1,Z4;function h9(){if(Z4)return U1;Z4=1;var t=yr();return U1=t,U1}var _1,eE;function d9(){if(eE)return _1;eE=1;var t=Sr(),e=Ri();return _1=function(r,A,n){try{return t(e(Object.getOwnPropertyDescriptor(r,A)[n]))}catch{}},_1}var Q1,tE;function p9(){if(tE)return Q1;tE=1;var t=on();return Q1=function(e){return t(e)||e===null},Q1}var k1,rE;function g9(){if(rE)return k1;rE=1;var t=p9(),e=String,r=TypeError;return k1=function(A){if(t(A))return A;throw new r("Can't set "+e(A)+" as a prototype")},k1}var L1,AE;function nE(){if(AE)return L1;AE=1;var t=d9(),e=on(),r=ti(),A=g9();return L1=Object.setPrototypeOf||("__proto__"in{}?(function(){var n=!1,i={},s;try{s=t(Object.prototype,"__proto__","set"),s(i,[]),n=i instanceof Array}catch{}return function(o,l){return r(o),A(l),e(o)&&(n?s(o,l):o.__proto__=l),o}})():void 0),L1}var T1,iE;function rh(){if(iE)return T1;iE=1;var t=Pa().f,e=ri(),r=dA(),A=r("toStringTag");return T1=function(n,i,s){n&&!s&&(n=n.prototype),n&&!e(n,A)&&t(n,A,{configurable:!0,value:i})},T1}var N1,aE;function v9(){if(aE)return N1;aE=1;var t=Q4(),e=Pa();return N1=function(r,A,n){return n.get&&t(n.get,A,{getter:!0}),n.set&&t(n.set,A,{setter:!0}),e.f(r,A,n)},N1}var O1,sE;function m9(){if(sE)return O1;sE=1;var t=Os(),e=v9(),r=dA(),A=ei(),n=r("species");return O1=function(i){var s=t(i);A&&s&&!s[n]&&e(s,n,{configurable:!0,get:function(){return this}})},O1}var P1,oE;function w9(){if(oE)return P1;oE=1;var t=qf(),e=TypeError;return P1=function(r,A){if(t(A,r))return r;throw new e("Incorrect invocation")},P1}var M1,lE;function y9(){if(lE)return M1;lE=1;var t=dA(),e=t("toStringTag"),r={};return r[e]="z",M1=String(r)==="[object z]",M1}var D1,cE;function H1(){if(cE)return D1;cE=1;var t=y9(),e=Or(),r=Ns(),A=dA(),n=A("toStringTag"),i=Object,s=r((function(){return arguments})())==="Arguments",a=function(o,l){try{return o[l]}catch{}};return D1=t?r:function(o){var l,c,f;return o===void 0?"Undefined":o===null?"Null":typeof(c=a(l=i(o),n))=="string"?c:s?r(l):(f=r(l))==="Object"&&e(l.callee)?"Arguments":f},D1}var R1,uE;function B9(){if(uE)return R1;uE=1;var t=Sr(),e=Er(),r=Or(),A=H1(),n=Os(),i=A1(),s=function(){},a=n("Reflect","construct"),o=/^\s*(?:class|function)\b/,l=t(o.exec),c=!o.test(s),f=function(g){if(!r(g))return!1;try{return a(s,[],g),!0}catch{return!1}},h=function(g){if(!r(g))return!1;switch(A(g)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return c||!!l(o,i(g))}catch{return!0}};return h.sham=!0,R1=!a||e(function(){var u;return f(f.call)||!f(Object)||!f(function(){u=!0})||u})?h:f,R1}var j1,fE;function b9(){if(fE)return j1;fE=1;var t=B9(),e=Wf(),r=TypeError;return j1=function(A){if(t(A))return A;throw new r(e(A)+" is not a constructor")},j1}var K1,hE;function dE(){if(hE)return K1;hE=1;var t=VA(),e=b9(),r=Vf(),A=dA(),n=A("species");return K1=function(i,s){var a=t(i).constructor,o;return a===void 0||r(o=t(a)[n])?s:e(o)},K1}var z1,pE;function gE(){if(pE)return z1;pE=1;var t=Gf(),e=Function.prototype,r=e.apply,A=e.call;return z1=typeof Reflect=="object"&&Reflect.apply||(t?A.bind(r):function(){return A.apply(r,arguments)}),z1}var G1,vE;function Ah(){if(vE)return G1;vE=1;var t=Ns(),e=Sr();return G1=function(r){if(t(r)==="Function")return e(r)},G1}var V1,mE;function q1(){if(mE)return V1;mE=1;var t=Ah(),e=Ri(),r=Gf(),A=t(t.bind);return V1=function(n,i){return e(n),i===void 0?n:r?A(n,i):function(){return n.apply(i,arguments)}},V1}var W1,wE;function yE(){if(wE)return W1;wE=1;var t=Os();return W1=t("document","documentElement"),W1}var $1,BE;function C9(){if(BE)return $1;BE=1;var t=Sr();return $1=t([].slice),$1}var Y1,bE;function x9(){if(bE)return Y1;bE=1;var t=TypeError;return Y1=function(e,r){if(e<r)throw new t("Not enough arguments");return e},Y1}var X1,CE;function xE(){if(CE)return X1;CE=1;var t=gc();return X1=/ipad|iphone|ipod/i.test(t)&&/applewebkit/i.test(t),X1}var J1,EE;function SE(){if(EE)return J1;EE=1;var t=yr(),e=gE(),r=q1(),A=Or(),n=ri(),i=Er(),s=yE(),a=C9(),o=Yf(),l=x9(),c=xE(),f=th(),h=t.setImmediate,u=t.clearImmediate,g=t.process,p=t.Dispatch,w=t.Function,m=t.MessageChannel,B=t.String,x=0,E={},k="onreadystatechange",H,K,R,I;i(function(){H=t.location});var W=function(b){if(n(E,b)){var Y=E[b];delete E[b],Y()}},L=function(b){return function(){W(b)}},F=function(b){W(b.data)},M=function(b){t.postMessage(B(b),H.protocol+"//"+H.host)};return(!h||!u)&&(h=function(Y){l(arguments.length,1);var ce=A(Y)?Y:w(Y),ee=a(arguments,1);return E[++x]=function(){e(ce,void 0,ee)},K(x),x},u=function(Y){delete E[Y]},f?K=function(b){g.nextTick(L(b))}:p&&p.now?K=function(b){p.now(L(b))}:m&&!c?(R=new m,I=R.port2,R.port1.onmessage=F,K=r(I.postMessage,I)):t.addEventListener&&A(t.postMessage)&&!t.importScripts&&H&&H.protocol!=="file:"&&!i(M)?(K=M,t.addEventListener("message",F,!1)):k in o("script")?K=function(b){s.appendChild(o("script"))[k]=function(){s.removeChild(this),W(b)}}:K=function(b){setTimeout(L(b),0)}),J1={set:h,clear:u},J1}var Z1,FE;function E9(){if(FE)return Z1;FE=1;var t=yr(),e=ei(),r=Object.getOwnPropertyDescriptor;return Z1=function(A){if(!e)return t[A];var n=r(t,A);return n&&n.value},Z1}var e2,IE;function UE(){if(IE)return e2;IE=1;var t=function(){this.head=null,this.tail=null};return t.prototype={add:function(e){var r={item:e,next:null},A=this.tail;A?A.next=r:this.head=r,this.tail=r},get:function(){var e=this.head;if(e){var r=this.head=e.next;return r===null&&(this.tail=null),e.item}}},e2=t,e2}var t2,_E;function S9(){if(_E)return t2;_E=1;var t=gc();return t2=/ipad|iphone|ipod/i.test(t)&&typeof Pebble<"u",t2}var r2,QE;function F9(){if(QE)return r2;QE=1;var t=gc();return r2=/web0s(?!.*chrome)/i.test(t),r2}var A2,kE;function I9(){if(kE)return A2;kE=1;var t=yr(),e=E9(),r=q1(),A=SE().set,n=UE(),i=xE(),s=S9(),a=F9(),o=th(),l=t.MutationObserver||t.WebKitMutationObserver,c=t.document,f=t.process,h=t.Promise,u=e("queueMicrotask"),g,p,w,m,B;if(!u){var x=new n,E=function(){var k,H;for(o&&(k=f.domain)&&k.exit();H=x.get();)try{H()}catch(K){throw x.head&&g(),K}k&&k.enter()};!i&&!o&&!a&&l&&c?(p=!0,w=c.createTextNode(""),new l(E).observe(w,{characterData:!0}),g=function(){w.data=p=!p}):!s&&h&&h.resolve?(m=h.resolve(void 0),m.constructor=h,B=r(m.then,m),g=function(){B(E)}):o?g=function(){f.nextTick(E)}:(A=r(A,t),g=function(){A(E)}),u=function(k){x.head||g(),x.add(k)}}return A2=u,A2}var n2,LE;function U9(){return LE||(LE=1,n2=function(t,e){try{arguments.length===1?console.error(t):console.error(t,e)}catch{}}),n2}var i2,TE;function a2(){return TE||(TE=1,i2=function(t){try{return{error:!1,value:t()}}catch(e){return{error:!0,value:e}}}),i2}var s2,NE;function mc(){if(NE)return s2;NE=1;var t=yr();return s2=t.Promise,s2}var o2,OE;function wc(){if(OE)return o2;OE=1;var t=yr(),e=mc(),r=Or(),A=W4(),n=A1(),i=dA(),s=X4(),a=Ci(),o=F0(),l=e&&e.prototype,c=i("species"),f=!1,h=r(t.PromiseRejectionEvent),u=A("Promise",function(){var g=n(e),p=g!==String(e);if(!p&&o===66||a&&!(l.catch&&l.finally))return!0;if(!o||o<51||!/native code/.test(g)){var w=new e(function(x){x(1)}),m=function(x){x(function(){},function(){})},B=w.constructor={};if(B[c]=m,f=w.then(function(){})instanceof m,!f)return!0}return!p&&(s==="BROWSER"||s==="DENO")&&!h});return o2={CONSTRUCTOR:u,REJECTION_EVENT:h,SUBCLASSING:f},o2}var l2={},PE;function yc(){if(PE)return l2;PE=1;var t=Ri(),e=TypeError,r=function(A){var n,i;this.promise=new A(function(s,a){if(n!==void 0||i!==void 0)throw new e("Bad Promise constructor");n=s,i=a}),this.resolve=t(n),this.reject=t(i)};return l2.f=function(A){return new r(A)},l2}var ME;function _9(){if(ME)return Sx;ME=1;var t=qA(),e=Ci(),r=th(),A=yr(),n=h9(),i=bA(),s=Ps(),a=nE(),o=rh(),l=m9(),c=Ri(),f=Or(),h=on(),u=w9(),g=dE(),p=SE().set,w=I9(),m=U9(),B=a2(),x=UE(),E=Zf(),k=mc(),H=wc(),K=yc(),R="Promise",I=H.CONSTRUCTOR,W=H.REJECTION_EVENT,L=H.SUBCLASSING,F=E.getterFor(R),M=E.set,b=k&&k.prototype,Y=k,ce=b,ee=A.TypeError,le=A.document,Ae=A.process,te=K.f,T=te,S=!!(le&&le.createEvent&&A.dispatchEvent),O="unhandledrejection",P="rejectionhandled",z=0,ie=1,fe=2,Z=1,pe=2,we,be,je,Te,Q=function(ve){var Ce;return h(ve)&&f(Ce=ve.then)?Ce:!1},N=function(ve,Ce){var Le=Ce.value,Ge=Ce.state===ie,Ke=Ge?ve.ok:ve.fail,We=ve.resolve,At=ve.reject,$e=ve.domain,_t,at,Bt;try{Ke?(Ge||(Ce.rejection===pe&&xe(Ce),Ce.rejection=Z),Ke===!0?_t=Le:($e&&$e.enter(),_t=Ke(Le),$e&&($e.exit(),Bt=!0)),_t===ve.promise?At(new ee("Promise-chain cycle")):(at=Q(_t))?i(at,_t,We,At):We(_t)):At(Le)}catch(bt){$e&&!Bt&&$e.exit(),At(bt)}},ue=function(ve,Ce){ve.notified||(ve.notified=!0,w(function(){for(var Le=ve.reactions,Ge;Ge=Le.get();)N(Ge,ve);ve.notified=!1,Ce&&!ve.rejection&&q(ve)}))},J=function(ve,Ce,Le){var Ge,Ke;S?(Ge=le.createEvent("Event"),Ge.promise=Ce,Ge.reason=Le,Ge.initEvent(ve,!1,!0),A.dispatchEvent(Ge)):Ge={promise:Ce,reason:Le},!W&&(Ke=A["on"+ve])?Ke(Ge):ve===O&&m("Unhandled promise rejection",Le)},q=function(ve){i(p,A,function(){var Ce=ve.facade,Le=ve.value,Ge=ne(ve),Ke;if(Ge&&(Ke=B(function(){r?Ae.emit("unhandledRejection",Le,Ce):J(O,Ce,Le)}),ve.rejection=r||ne(ve)?pe:Z,Ke.error))throw Ke.value})},ne=function(ve){return ve.rejection!==Z&&!ve.parent},xe=function(ve){i(p,A,function(){var Ce=ve.facade;r?Ae.emit("rejectionHandled",Ce):J(P,Ce,ve.value)})},ye=function(ve,Ce,Le){return function(Ge){ve(Ce,Ge,Le)}},he=function(ve,Ce,Le){ve.done||(ve.done=!0,Le&&(ve=Le),ve.value=Ce,ve.state=fe,ue(ve,!0))},Se=function(ve,Ce,Le){if(!ve.done){ve.done=!0,Le&&(ve=Le);try{if(ve.facade===Ce)throw new ee("Promise can't be resolved itself");var Ge=Q(Ce);Ge?w(function(){var Ke={done:!1};try{i(Ge,Ce,ye(Se,Ke,ve),ye(he,Ke,ve))}catch(We){he(Ke,We,ve)}}):(ve.value=Ce,ve.state=ie,ue(ve,!1))}catch(Ke){he({done:!1},Ke,ve)}}};if(I&&(Y=function(Ce){u(this,ce),c(Ce),i(we,this);var Le=F(this);try{Ce(ye(Se,Le),ye(he,Le))}catch(Ge){he(Le,Ge)}},ce=Y.prototype,we=function(Ce){M(this,{type:R,done:!1,notified:!1,parent:!1,reactions:new x,rejection:!1,state:z,value:null})},we.prototype=s(ce,"then",function(Ce,Le){var Ge=F(this),Ke=te(g(this,Y));return Ge.parent=!0,Ke.ok=f(Ce)?Ce:!0,Ke.fail=f(Le)&&Le,Ke.domain=r?Ae.domain:void 0,Ge.state===z?Ge.reactions.add(Ke):w(function(){N(Ke,Ge)}),Ke.promise}),be=function(){var ve=new we,Ce=F(ve);this.promise=ve,this.resolve=ye(Se,Ce),this.reject=ye(he,Ce)},K.f=te=function(ve){return ve===Y||ve===je?new be(ve):T(ve)},!e&&f(k)&&b!==Object.prototype)){Te=b.then,L||s(b,"then",function(Ce,Le){var Ge=this;return new Y(function(Ke,We){i(Te,Ge,Ke,We)}).then(Ce,Le)},{unsafe:!0});try{delete b.constructor}catch{}a&&a(b,ce)}return t({global:!0,constructor:!0,wrap:!0,forced:I},{Promise:Y}),je=n.Promise,o(Y,R,!1,!0),l(R),Sx}var DE={},c2,HE;function Bc(){return HE||(HE=1,c2={}),c2}var u2,RE;function Q9(){if(RE)return u2;RE=1;var t=dA(),e=Bc(),r=t("iterator"),A=Array.prototype;return u2=function(n){return n!==void 0&&(e.Array===n||A[r]===n)},u2}var f2,jE;function KE(){if(jE)return f2;jE=1;var t=H1(),e=Zo(),r=Vf(),A=Bc(),n=dA(),i=n("iterator");return f2=function(s){if(!r(s))return e(s,i)||e(s,"@@iterator")||A[t(s)]},f2}var h2,zE;function k9(){if(zE)return h2;zE=1;var t=bA(),e=Ri(),r=VA(),A=Wf(),n=KE(),i=TypeError;return h2=function(s,a){var o=arguments.length<2?n(s):a;if(e(o))return r(t(o,s));throw new i(A(s)+" is not iterable")},h2}var d2,GE;function L9(){if(GE)return d2;GE=1;var t=bA(),e=VA(),r=Zo();return d2=function(A,n,i){var s,a;e(A);try{if(s=r(A,"return"),!s){if(n==="throw")throw i;return i}s=t(s,A)}catch(o){a=!0,s=o}if(n==="throw")throw i;if(a)throw s;return e(s),i},d2}var p2,VE;function qE(){if(VE)return p2;VE=1;var t=q1(),e=bA(),r=VA(),A=Wf(),n=Q9(),i=v1(),s=qf(),a=k9(),o=KE(),l=L9(),c=TypeError,f=function(u,g){this.stopped=u,this.result=g},h=f.prototype;return p2=function(u,g,p){var w=p&&p.that,m=!!(p&&p.AS_ENTRIES),B=!!(p&&p.IS_RECORD),x=!!(p&&p.IS_ITERATOR),E=!!(p&&p.INTERRUPTED),k=t(g,w),H,K,R,I,W,L,F,M=function(ce){var ee=H;return H=void 0,ee&&l(ee,"normal"),new f(!0,ce)},b=function(ce){return m?(r(ce),E?k(ce[0],ce[1],M):k(ce[0],ce[1])):E?k(ce,M):k(ce)};if(B)H=u.iterator;else if(x)H=u;else{if(K=o(u),!K)throw new c(A(u)+" is not iterable");if(n(K)){for(R=0,I=i(u);I>R;R++)if(W=b(u[R]),W&&s(h,W))return W;return new f(!1)}H=a(u,K)}for(L=B?u.next:H.next;!(F=e(L,H)).done;){var Y=F.value;try{W=b(Y)}catch(ce){if(H)l(H,"throw",ce);else throw ce}if(typeof W=="object"&&W&&s(h,W))return W}return new f(!1)},p2}var g2,WE;function T9(){if(WE)return g2;WE=1;var t=dA(),e=t("iterator"),r=!1;try{var A=0,n={next:function(){return{done:!!A++}},return:function(){r=!0}};n[e]=function(){return this},Array.from(n,function(){throw 2})}catch{}return g2=function(i,s){try{if(!s&&!r)return!1}catch{return!1}var a=!1;try{var o={};o[e]=function(){return{next:function(){return{done:a=!0}}}},i(o)}catch{}return a},g2}var v2,$E;function YE(){if($E)return v2;$E=1;var t=mc(),e=T9(),r=wc().CONSTRUCTOR;return v2=r||!e(function(A){t.all(A).then(void 0,function(){})}),v2}var XE;function N9(){if(XE)return DE;XE=1;var t=qA(),e=bA(),r=Ri(),A=yc(),n=a2(),i=qE(),s=YE();return t({target:"Promise",stat:!0,forced:s},{all:function(o){var l=this,c=A.f(l),f=c.resolve,h=c.reject,u=n(function(){var g=r(l.resolve),p=[],w=0,m=1;i(o,function(B){var x=w++,E=!1;m++,e(g,l,B).then(function(k){E||(E=!0,p[x]=k,--m||f(p))},h)}),--m||f(p)});return u.error&&h(u.value),c.promise}}),DE}var JE={},ZE;function O9(){if(ZE)return JE;ZE=1;var t=qA(),e=Ci(),r=wc().CONSTRUCTOR,A=mc(),n=Os(),i=Or(),s=Ps(),a=A&&A.prototype;if(t({target:"Promise",proto:!0,forced:r,real:!0},{catch:function(l){return this.then(void 0,l)}}),!e&&i(A)){var o=n("Promise").prototype.catch;a.catch!==o&&s(a,"catch",o,{unsafe:!0})}return JE}var e3={},t3;function P9(){if(t3)return e3;t3=1;var t=qA(),e=bA(),r=Ri(),A=yc(),n=a2(),i=qE(),s=YE();return t({target:"Promise",stat:!0,forced:s},{race:function(o){var l=this,c=A.f(l),f=c.reject,h=n(function(){var u=r(l.resolve);i(o,function(g){e(u,l,g).then(c.resolve,f)})});return h.error&&f(h.value),c.promise}}),e3}var r3={},A3;function M9(){if(A3)return r3;A3=1;var t=qA(),e=yc(),r=wc().CONSTRUCTOR;return t({target:"Promise",stat:!0,forced:r},{reject:function(n){var i=e.f(this),s=i.reject;return s(n),i.promise}}),r3}var n3={},m2,i3;function D9(){if(i3)return m2;i3=1;var t=VA(),e=on(),r=yc();return m2=function(A,n){if(t(A),e(n)&&n.constructor===A)return n;var i=r.f(A),s=i.resolve;return s(n),i.promise},m2}var a3;function H9(){if(a3)return n3;a3=1;var t=qA(),e=Os(),r=Ci(),A=mc(),n=wc().CONSTRUCTOR,i=D9(),s=e("Promise"),a=r&&!n;return t({target:"Promise",stat:!0,forced:r||n},{resolve:function(l){return i(a&&this===s?A:this,l)}}),n3}var s3;function R9(){return s3||(s3=1,_9(),N9(),O9(),P9(),M9(),H9()),Ex}R9();function o3(t,e,r,A,n,i,s){try{var a=t[i](s),o=a.value}catch(l){return void r(l)}a.done?e(o):Promise.resolve(o).then(A,n)}function ji(t){return function(){var e=this,r=arguments;return new Promise(function(A,n){var i=t.apply(e,r);function s(o){o3(i,A,n,s,a,"next",o)}function a(o){o3(i,A,n,s,a,"throw",o)}s(void 0)})}}var l3={},c3={},w2,u3;function xi(){if(u3)return w2;u3=1;var t=H1(),e=String;return w2=function(r){if(t(r)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return e(r)},w2}var y2,f3;function h3(){if(f3)return y2;f3=1;var t=VA();return y2=function(){var e=t(this),r="";return e.hasIndices&&(r+="d"),e.global&&(r+="g"),e.ignoreCase&&(r+="i"),e.multiline&&(r+="m"),e.dotAll&&(r+="s"),e.unicode&&(r+="u"),e.unicodeSets&&(r+="v"),e.sticky&&(r+="y"),r},y2}var B2,d3;function p3(){if(d3)return B2;d3=1;var t=Er(),e=yr(),r=e.RegExp,A=t(function(){var s=r("a","y");return s.lastIndex=2,s.exec("abcd")!==null}),n=A||t(function(){return!r("a","y").sticky}),i=A||t(function(){var s=r("^r","gy");return s.lastIndex=2,s.exec("str")!==null});return B2={BROKEN_CARET:i,MISSED_STICKY:n,UNSUPPORTED_Y:A},B2}var b2={},C2,g3;function j9(){if(g3)return C2;g3=1;var t=R4(),e=B1();return C2=Object.keys||function(A){return t(A,e)},C2}var v3;function K9(){if(v3)return b2;v3=1;var t=ei(),e=y4(),r=Pa(),A=VA(),n=pc(),i=j9();return b2.f=t&&!e?Object.defineProperties:function(a,o){A(a);for(var l=n(o),c=i(o),f=c.length,h=0,u;f>h;)r.f(a,u=c[h++],l[u]);return a},b2}var x2,m3;function nh(){if(m3)return x2;m3=1;var t=VA(),e=K9(),r=B1(),A=o1(),n=yE(),i=Yf(),s=a1(),a=">",o="<",l="prototype",c="script",f=s("IE_PROTO"),h=function(){},u=function(B){return o+c+a+B+o+"/"+c+a},g=function(B){B.write(u("")),B.close();var x=B.parentWindow.Object;return B=null,x},p=function(){var B=i("iframe"),x="java"+c+":",E;return B.style.display="none",n.appendChild(B),B.src=String(x),E=B.contentWindow.document,E.open(),E.write(u("document.F=Object")),E.close(),E.F},w,m=function(){try{w=new ActiveXObject("htmlfile")}catch{}m=typeof document<"u"?document.domain&&w?g(w):p():g(w);for(var B=r.length;B--;)delete m[l][r[B]];return m()};return A[f]=!0,x2=Object.create||function(x,E){var k;return x!==null?(h[l]=t(x),k=new h,h[l]=null,k[f]=x):k=m(),E===void 0?k:e.f(k,E)},x2}var E2,w3;function z9(){if(w3)return E2;w3=1;var t=Er(),e=yr(),r=e.RegExp;return E2=t(function(){var A=r(".","s");return!(A.dotAll&&A.test(`
|
|
135
|
+
`)&&A.flags==="s")}),E2}var S2,y3;function G9(){if(y3)return S2;y3=1;var t=Er(),e=yr(),r=e.RegExp;return S2=t(function(){var A=r("(?<a>b)","g");return A.exec("b").groups.a!=="b"||"b".replace(A,"$<a>c")!=="bc"}),S2}var F2,B3;function I2(){if(B3)return F2;B3=1;var t=bA(),e=Sr(),r=xi(),A=h3(),n=p3(),i=R0(),s=nh(),a=Zf().get,o=z9(),l=G9(),c=i("native-string-replace",String.prototype.replace),f=RegExp.prototype.exec,h=f,u=e("".charAt),g=e("".indexOf),p=e("".replace),w=e("".slice),m=(function(){var H=/a/,K=/b*/g;return t(f,H,"a"),t(f,K,"a"),H.lastIndex!==0||K.lastIndex!==0})(),B=n.BROKEN_CARET,x=/()??/.exec("")[1]!==void 0,E=m||x||B||o||l,k=function(H,K){for(var R=H.groups=s(null),I=0;I<K.length;I++){var W=K[I];R[W[0]]=H[W[1]]}};return E&&(h=function(K){var R=this,I=a(R),W=r(K),L=I.raw,F,M,b;if(L)return L.lastIndex=R.lastIndex,F=t(h,L,W),R.lastIndex=L.lastIndex,F&&I.groups&&k(F,I.groups),F;var Y=I.groups,ce=B&&R.sticky,ee=t(A,R),le=R.source,Ae=0,te=W;if(ce){ee=p(ee,"y",""),g(ee,"g")===-1&&(ee+="g"),te=w(W,R.lastIndex);var T=R.lastIndex>0&&u(W,R.lastIndex-1);R.lastIndex>0&&(!R.multiline||R.multiline&&T!==`
|
|
136
|
+
`&&T!=="\r"&&T!=="\u2028"&&T!=="\u2029")&&(le="(?: (?:"+le+"))",te=" "+te,Ae++),M=new RegExp("^(?:"+le+")",ee)}x&&(M=new RegExp("^"+le+"$(?!\\s)",ee)),m&&(b=R.lastIndex);var S=t(f,ce?M:R,te);return ce?S?(S.input=W,S[0]=w(S[0],Ae),S.index=R.lastIndex,R.lastIndex+=S[0].length):R.lastIndex=0:m&&S&&(R.lastIndex=R.global?S.index+S[0].length:b),x&&S&&S.length>1&&t(c,S[0],M,function(){for(var O=1;O<arguments.length-2;O++)arguments[O]===void 0&&(S[O]=void 0)}),S&&Y&&k(S,Y),S}),F2=h,F2}var b3;function V9(){if(b3)return c3;b3=1;var t=qA(),e=I2();return t({target:"RegExp",proto:!0,forced:/./.exec!==e},{exec:e}),c3}var U2,C3;function _2(){if(C3)return U2;C3=1,V9();var t=bA(),e=Ps(),r=I2(),A=Er(),n=dA(),i=vc(),s=n("species"),a=RegExp.prototype;return U2=function(o,l,c,f){var h=n(o),u=!A(function(){var m={};return m[h]=function(){return 7},""[o](m)!==7}),g=u&&!A(function(){var m=!1,B=/a/;if(o==="split"){var x={};x[s]=function(){return B},B={constructor:x,flags:""},B[h]=/./[h]}return B.exec=function(){return m=!0,null},B[h](""),!m});if(!u||!g||c){var p=/./[h],w=l(h,""[o],function(m,B,x,E,k){var H=B.exec;return H===r||H===a.exec?u&&!k?{done:!0,value:t(p,B,x,E)}:{done:!0,value:t(m,x,B,E)}:{done:!1}});e(String.prototype,o,w[0]),e(a,h,w[1])}f&&i(a[h],"sham",!0)},U2}var Q2,x3;function q9(){if(x3)return Q2;x3=1;var t=Sr(),e=eh(),r=xi(),A=ti(),n=t("".charAt),i=t("".charCodeAt),s=t("".slice),a=function(o){return function(l,c){var f=r(A(l)),h=e(c),u=f.length,g,p;return h<0||h>=u?o?"":void 0:(g=i(f,h),g<55296||g>56319||h+1===u||(p=i(f,h+1))<56320||p>57343?o?n(f,h):g:o?s(f,h,h+2):(g-55296<<10)+(p-56320)+65536)}};return Q2={codeAt:a(!1),charAt:a(!0)},Q2}var k2,E3;function L2(){if(E3)return k2;E3=1;var t=q9().charAt;return k2=function(e,r,A){return r+(A&&t(e,r).length||1)},k2}var T2,S3;function W9(){if(S3)return T2;S3=1;var t=yr(),e=Er(),r=t.RegExp,A=!e(function(){var n=!0;try{r(".","d")}catch{n=!1}var i={},s="",a=n?"dgimsy":"gimsy",o=function(h,u){Object.defineProperty(i,h,{get:function(){return s+=u,!0}})},l={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};n&&(l.hasIndices="d");for(var c in l)o(c,l[c]);var f=Object.getOwnPropertyDescriptor(r.prototype,"flags").get.call(i);return f!==a||s!==a});return T2={correct:A},T2}var N2,F3;function ih(){if(F3)return N2;F3=1;var t=bA(),e=ri(),r=qf(),A=W9(),n=h3(),i=RegExp.prototype;return N2=A.correct?function(s){return s.flags}:function(s){return!A.correct&&r(i,s)&&!e(s,"flags")?t(n,s):s.flags},N2}var O2,I3;function P2(){if(I3)return O2;I3=1;var t=bA(),e=VA(),r=Or(),A=Ns(),n=I2(),i=TypeError;return O2=function(s,a){var o=s.exec;if(r(o)){var l=t(o,s,a);return l!==null&&e(l),l}if(A(s)==="RegExp")return t(n,s,a);throw new i("RegExp#exec called on incompatible receiver")},O2}var U3;function $9(){if(U3)return l3;U3=1;var t=bA(),e=Sr(),r=_2(),A=VA(),n=on(),i=el(),s=xi(),a=ti(),o=Zo(),l=L2(),c=ih(),f=P2(),h=e("".indexOf);return r("match",function(u,g,p){return[function(m){var B=a(this),x=n(m)?o(m,u):void 0;return x?t(x,m,B):new RegExp(m)[u](s(B))},function(w){var m=A(this),B=s(w),x=p(g,m,B);if(x.done)return x.value;var E=s(c(m));if(!~h(E,"g"))return f(m,B);var k=!!~h(E,"u")||!!~h(E,"v");m.lastIndex=0;for(var H=[],K=0,R;(R=f(m,B))!==null;){var I=s(R[0]);H[K]=I,I===""&&(m.lastIndex=l(B,i(m.lastIndex),k)),K++}return K===0?null:H}]}),l3}$9();var _3={},M2,Q3;function Y9(){if(Q3)return M2;Q3=1;var t=Sr(),e=$f(),r=Math.floor,A=t("".charAt),n=t("".replace),i=t("".slice),s=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,a=/\$([$&'`]|\d{1,2})/g;return M2=function(o,l,c,f,h,u){var g=c+o.length,p=f.length,w=a;return h!==void 0&&(h=e(h),w=s),n(u,w,function(m,B){var x;switch(A(B,0)){case"$":return"$";case"&":return o;case"`":return i(l,0,c);case"'":return i(l,g);case"<":x=h[i(B,1,-1)];break;default:var E=+B;if(E===0)return m;if(E>p){var k=r(E/10);return k===0?m:k<=p?f[k-1]===void 0?A(B,1):f[k-1]+A(B,1):m}x=f[E-1]}return x===void 0?"":x})},M2}var k3;function X9(){if(k3)return _3;k3=1;var t=gE(),e=bA(),r=Sr(),A=_2(),n=Er(),i=VA(),s=Or(),a=on(),o=eh(),l=el(),c=xi(),f=ti(),h=L2(),u=Zo(),g=Y9(),p=ih(),w=P2(),m=dA(),B=m("replace"),x=Math.max,E=Math.min,k=r([].concat),H=r([].push),K=r("".indexOf),R=r("".slice),I=function(M){return M===void 0?M:String(M)},W=(function(){return"a".replace(/./,"$0")==="$0"})(),L=(function(){return/./[B]?/./[B]("a","$0")==="":!1})(),F=!n(function(){var M=/./;return M.exec=function(){var b=[];return b.groups={a:"7"},b},"".replace(M,"$<a>")!=="7"});return A("replace",function(M,b,Y){var ce=L?"$":"$0";return[function(le,Ae){var te=f(this),T=a(le)?u(le,B):void 0;return T?e(T,le,te,Ae):e(b,c(te),le,Ae)},function(ee,le){var Ae=i(this),te=c(ee),T=s(le);T||(le=c(le));var S=c(p(Ae));if(typeof le=="string"&&!~K(le,ce)&&!~K(le,"$<")&&!~K(S,"y")){var O=Y(b,Ae,te,le);if(O.done)return O.value}var P=!!~K(S,"g"),z;P&&(z=!!~K(S,"u")||!!~K(S,"v"),Ae.lastIndex=0);for(var ie=[],fe;fe=w(Ae,te),!(fe===null||(H(ie,fe),!P));){var Z=c(fe[0]);Z===""&&(Ae.lastIndex=h(te,l(Ae.lastIndex),z))}for(var pe="",we=0,be=0;be<ie.length;be++){fe=ie[be];for(var je=c(fe[0]),Te=x(E(o(fe.index),te.length),0),Q=[],N,ue=1;ue<fe.length;ue++)H(Q,I(fe[ue]));var J=fe.groups;if(T){var q=k([je],Q,Te,te);J!==void 0&&H(q,J),N=c(t(le,void 0,q))}else N=g(je,te,Te,Q,J,le);Te>=we&&(pe+=R(te,we,Te)+N,we=Te+je.length)}return pe+R(te,we)}]},!F||!W||L),_3}X9();var L3={},D2,T3;function J9(){if(T3)return D2;T3=1;var t=on(),e=Ns(),r=dA(),A=r("match");return D2=function(n){var i;return t(n)&&((i=n[A])!==void 0?!!i:e(n)==="RegExp")},D2}var H2,N3;function R2(){if(N3)return H2;N3=1;var t=J9(),e=TypeError;return H2=function(r){if(t(r))throw new e("The method doesn't accept regular expressions");return r},H2}var j2,O3;function K2(){if(O3)return j2;O3=1;var t=dA(),e=t("match");return j2=function(r){var A=/./;try{"/./"[r](A)}catch{try{return A[e]=!1,"/./"[r](A)}catch{}}return!1},j2}var P3;function Z9(){if(P3)return L3;P3=1;var t=qA(),e=Ah(),r=Xf().f,A=el(),n=xi(),i=R2(),s=ti(),a=K2(),o=Ci(),l=e("".slice),c=Math.min,f=a("startsWith"),h=!o&&!f&&!!(function(){var u=r(String.prototype,"startsWith");return u&&!u.writable})();return t({target:"String",proto:!0,forced:!h&&!f},{startsWith:function(g){var p=n(s(this));i(g);var w=n(g),m=A(c(arguments.length>1?arguments[1]:void 0,p.length));return l(p,m,m+w.length)===w}}),L3}Z9();var z2,M3;function ej(){if(M3)return z2;M3=1;var t=dA(),e=nh(),r=Pa().f,A=t("unscopables"),n=Array.prototype;return n[A]===void 0&&r(n,A,{configurable:!0,value:e(null)}),z2=function(i){n[A][i]=!0},z2}var G2,D3;function tj(){if(D3)return G2;D3=1;var t=Er();return G2=!t(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),G2}var V2,H3;function R3(){if(H3)return V2;H3=1;var t=ri(),e=Or(),r=$f(),A=a1(),n=tj(),i=A("IE_PROTO"),s=Object,a=s.prototype;return V2=n?s.getPrototypeOf:function(o){var l=r(o);if(t(l,i))return l[i];var c=l.constructor;return e(c)&&l instanceof c?c.prototype:l instanceof s?a:null},V2}var q2,j3;function K3(){if(j3)return q2;j3=1;var t=Er(),e=Or(),r=on(),A=nh(),n=R3(),i=Ps(),s=dA(),a=Ci(),o=s("iterator"),l=!1,c,f,h;[].keys&&(h=[].keys(),"next"in h?(f=n(n(h)),f!==Object.prototype&&(c=f)):l=!0);var u=!r(c)||t(function(){var g={};return c[o].call(g)!==g});return u?c={}:a&&(c=A(c)),e(c[o])||i(c,o,function(){return this}),q2={IteratorPrototype:c,BUGGY_SAFARI_ITERATORS:l},q2}var W2,z3;function rj(){if(z3)return W2;z3=1;var t=K3().IteratorPrototype,e=nh(),r=d0(),A=rh(),n=Bc(),i=function(){return this};return W2=function(s,a,o,l){var c=a+" Iterator";return s.prototype=e(t,{next:r(+!l,o)}),A(s,c,!1,!0),n[c]=i,s},W2}var $2,G3;function Aj(){if(G3)return $2;G3=1;var t=qA(),e=bA(),r=Ci(),A=Jf(),n=Or(),i=rj(),s=R3(),a=nE(),o=rh(),l=vc(),c=Ps(),f=dA(),h=Bc(),u=K3(),g=A.PROPER,p=A.CONFIGURABLE,w=u.IteratorPrototype,m=u.BUGGY_SAFARI_ITERATORS,B=f("iterator"),x="keys",E="values",k="entries",H=function(){return this};return $2=function(K,R,I,W,L,F,M){i(I,R,W);var b=function(P){if(P===L&&Ae)return Ae;if(!m&&P&&P in ee)return ee[P];switch(P){case x:return function(){return new I(this,P)};case E:return function(){return new I(this,P)};case k:return function(){return new I(this,P)}}return function(){return new I(this)}},Y=R+" Iterator",ce=!1,ee=K.prototype,le=ee[B]||ee["@@iterator"]||L&&ee[L],Ae=!m&&le||b(L),te=R==="Array"&&ee.entries||le,T,S,O;if(te&&(T=s(te.call(new K)),T!==Object.prototype&&T.next&&(!r&&s(T)!==w&&(a?a(T,w):n(T[B])||c(T,B,H)),o(T,Y,!0,!0),r&&(h[Y]=H))),g&&L===E&&le&&le.name!==E&&(!r&&p?l(ee,"name",E):(ce=!0,Ae=function(){return e(le,this)})),L)if(S={values:b(E),keys:F?Ae:b(x),entries:b(k)},M)for(O in S)(m||ce||!(O in ee))&&c(ee,O,S[O]);else t({target:R,proto:!0,forced:m||ce},S);return(!r||M)&&ee[B]!==Ae&&c(ee,B,Ae,{name:L}),h[R]=Ae,S},$2}var Y2,V3;function nj(){return V3||(V3=1,Y2=function(t,e){return{value:t,done:e}}),Y2}var X2,q3;function W3(){if(q3)return X2;q3=1;var t=pc(),e=ej(),r=Bc(),A=Zf(),n=Pa().f,i=Aj(),s=nj(),a=Ci(),o=ei(),l="Array Iterator",c=A.set,f=A.getterFor(l);X2=i(Array,"Array",function(u,g){c(this,{type:l,target:t(u),index:0,kind:g})},function(){var u=f(this),g=u.target,p=u.index++;if(!g||p>=g.length)return u.target=null,s(void 0,!0);switch(u.kind){case"keys":return s(p,!1);case"values":return s(g[p],!1)}return s([p,g[p]],!1)},"values");var h=r.Arguments=r.Array;if(e("keys"),e("values"),e("entries"),!a&&o&&h.name!=="values")try{n(h,"name",{value:"values"})}catch{}return X2}W3();var $3={},J2,Y3;function ij(){return Y3||(Y3=1,J2={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}),J2}var Z2,X3;function aj(){if(X3)return Z2;X3=1;var t=Yf(),e=t("span").classList,r=e&&e.constructor&&e.constructor.prototype;return Z2=r===Object.prototype?void 0:r,Z2}var J3;function sj(){if(J3)return $3;J3=1;var t=yr(),e=ij(),r=aj(),A=W3(),n=vc(),i=rh(),s=dA(),a=s("iterator"),o=A.values,l=function(f,h){if(f){if(f[a]!==o)try{n(f,a,o)}catch{f[a]=o}if(i(f,h,!0),e[h]){for(var u in A)if(f[u]!==A[u])try{n(f,u,A[u])}catch{f[u]=A[u]}}}};for(var c in e)l(t[c]&&t[c].prototype,c);return l(r,"DOMTokenList"),$3}sj();function oj(t,e){if($t(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var A=r.call(t,e);if($t(A)!="object")return A;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function lj(t){var e=oj(t,"string");return $t(e)=="symbol"?e:e+""}function ev(t,e,r){return(e=lj(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Z3={},tv,eS;function cj(){if(eS)return tv;eS=1;var t=Ri(),e=$f(),r=Px(),A=v1(),n=TypeError,i="Reduce of empty array with no initial value",s=function(a){return function(o,l,c,f){var h=e(o),u=r(h),g=A(h);if(t(l),g===0&&c<2)throw new n(i);var p=a?g-1:0,w=a?-1:1;if(c<2)for(;;){if(p in u){f=u[p],p+=w;break}if(p+=w,a?p<0:g<=p)throw new n(i)}for(;a?p>=0:g>p;p+=w)p in u&&(f=l(f,u[p],p,h));return f}};return tv={left:s(!1),right:s(!0)},tv}var rv,tS;function rS(){if(tS)return rv;tS=1;var t=Er();return rv=function(e,r){var A=[][e];return!!A&&t(function(){A.call(null,r||function(){return 1},1)})},rv}var AS;function uj(){if(AS)return Z3;AS=1;var t=qA(),e=cj().left,r=rS(),A=F0(),n=th(),i=!n&&A>79&&A<83,s=i||!r("reduce");return t({target:"Array",proto:!0,forced:s},{reduce:function(o){var l=arguments.length;return e(this,o,l,l>1?arguments[1]:void 0)}}),Z3}uj();var nS={},iS;function fj(){if(iS)return nS;iS=1;var t=qA(),e=Ah(),r=Xf().f,A=el(),n=xi(),i=R2(),s=ti(),a=K2(),o=Ci(),l=e("".slice),c=Math.min,f=a("endsWith"),h=!o&&!f&&!!(function(){var u=r(String.prototype,"endsWith");return u&&!u.writable})();return t({target:"String",proto:!0,forced:!h&&!f},{endsWith:function(g){var p=n(s(this));i(g);var w=n(g),m=arguments.length>1?arguments[1]:void 0,B=p.length,x=m===void 0?B:c(A(m),B);return l(p,x-w.length,x)===w}}),nS}fj();var aS={},sS;function hj(){if(sS)return aS;sS=1;var t=bA(),e=Sr(),r=_2(),A=VA(),n=on(),i=ti(),s=dE(),a=L2(),o=el(),l=xi(),c=Zo(),f=ih(),h=P2(),u=p3(),g=Er(),p=u.UNSUPPORTED_Y,w=4294967295,m=Math.min,B=e([].push),x=e("".slice),E=e("".indexOf),k=!g(function(){var K=/(?:)/,R=K.exec;K.exec=function(){return R.apply(this,arguments)};var I="ab".split(K);return I.length!==2||I[0]!=="a"||I[1]!=="b"}),H="abbc".split(/(b)*/)[1]==="c"||"test".split(/(?:)/,-1).length!==4||"ab".split(/(?:ab)*/).length!==2||".".split(/(.?)(.?)/).length!==4||".".split(/()()/).length>1||"".split(/.?/).length;return r("split",function(K,R,I){var W="0".split(void 0,0).length?function(L,F){return L===void 0&&F===0?[]:t(R,this,L,F)}:R;return[function(F,M){var b=i(this),Y=n(F)?c(F,K):void 0;return Y?t(Y,F,b,M):t(W,l(b),F,M)},function(L,F){var M=A(this),b=l(L);if(!H){var Y=I(W,M,b,F,W!==R);if(Y.done)return Y.value}var ce=s(M,RegExp),ee=l(f(M)),le=!!~E(ee,"u")||!!~E(ee,"v");p?~E(ee,"g")||(ee+="g"):~E(ee,"y")||(ee+="y");var Ae=new ce(p?"^(?:"+M.source+")":M,ee),te=F===void 0?w:F>>>0;if(te===0)return[];if(b.length===0)return h(Ae,b)===null?[b]:[];for(var T=0,S=0,O=[];S<b.length;){Ae.lastIndex=p?0:S;var P=h(Ae,p?x(b,S):b),z;if(P===null||(z=m(o(Ae.lastIndex+(p?S:0)),b.length))===T)S=a(b,S,le);else{if(B(O,x(b,T,S)),O.length===te)return O;for(var ie=1;ie<=P.length-1;ie++)if(B(O,P[ie]),O.length===te)return O;S=T=z}}return B(O,x(b,T)),O}]},H||!k,p),aS}hj();var bc={exports:{}},Ms={exports:{}},dj=Ms.exports,oS;function pj(){return oS||(oS=1,(function(){var t,e,r,A,n,i;typeof performance<"u"&&performance!==null&&performance.now?Ms.exports=function(){return performance.now()}:typeof process<"u"&&process!==null&&process.hrtime?(Ms.exports=function(){return(t()-n)/1e6},e=process.hrtime,t=function(){var s;return s=e(),s[0]*1e9+s[1]},A=t(),i=process.uptime()*1e9,n=A-i):Date.now?(Ms.exports=function(){return Date.now()-r},r=Date.now()):(Ms.exports=function(){return new Date().getTime()-r},r=new Date().getTime())}).call(dj)),Ms.exports}var lS;function gj(){if(lS)return bc.exports;lS=1;for(var t=pj(),e=typeof window>"u"?ss:window,r=["moz","webkit"],A="AnimationFrame",n=e["request"+A],i=e["cancel"+A]||e["cancelRequest"+A],s=0;!n&&s<r.length;s++)n=e[r[s]+"Request"+A],i=e[r[s]+"Cancel"+A]||e[r[s]+"CancelRequest"+A];if(!n||!i){var a=0,o=0,l=[],c=1e3/60;n=function(f){if(l.length===0){var h=t(),u=Math.max(0,c-(h-a));a=u+h,setTimeout(function(){var g=l.slice(0);l.length=0;for(var p=0;p<g.length;p++)if(!g[p].cancelled)try{g[p].callback(a)}catch(w){setTimeout(function(){throw w},0)}},Math.round(u))}return l.push({handle:++o,callback:f,cancelled:!1}),o},i=function(f){for(var h=0;h<l.length;h++)l[h].handle===f&&(l[h].cancelled=!0)}}return bc.exports=function(f){return n.call(e,f)},bc.exports.cancel=function(){i.apply(e,arguments)},bc.exports.polyfill=function(f){f||(f=e),f.requestAnimationFrame=n,f.cancelAnimationFrame=i},bc.exports}var vj=gj();const Av=Zh(vj);var cS={},nv,uS;function fS(){return uS||(uS=1,nv=`
|
|
137
|
+
\v\f\r \u2028\u2029\uFEFF`),nv}var iv,hS;function mj(){if(hS)return iv;hS=1;var t=Sr(),e=ti(),r=xi(),A=fS(),n=t("".replace),i=RegExp("^["+A+"]+"),s=RegExp("(^|[^"+A+"])["+A+"]+$"),a=function(o){return function(l){var c=r(e(l));return o&1&&(c=n(c,i,"")),o&2&&(c=n(c,s,"$1")),c}};return iv={start:a(1),end:a(2),trim:a(3)},iv}var av,dS;function wj(){if(dS)return av;dS=1;var t=Jf().PROPER,e=Er(),r=fS(),A="
";return av=function(n){return e(function(){return!!r[n]()||A[n]()!==A||t&&r[n].name!==n})},av}var pS;function yj(){if(pS)return cS;pS=1;var t=qA(),e=mj().trim,r=wj();return t({target:"String",proto:!0,forced:r("trim")},{trim:function(){return e(this)}}),cS}yj();var sv,gS;function Bj(){return gS||(gS=1,sv=function(t){this.ok=!1,this.alpha=1,t.charAt(0)=="#"&&(t=t.substr(1,6)),t=t.replace(/ /g,""),t=t.toLowerCase();var e={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",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",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",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:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};t=e[t]||t;for(var r=[{re:/^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*((?:\d?\.)?\d)\)$/,example:["rgba(123, 234, 45, 0.8)","rgba(255,234,245,1.0)"],process:function(o){return[parseInt(o[1]),parseInt(o[2]),parseInt(o[3]),parseFloat(o[4])]}},{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(o){return[parseInt(o[1]),parseInt(o[2]),parseInt(o[3])]}},{re:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,example:["#00ff00","336699"],process:function(o){return[parseInt(o[1],16),parseInt(o[2],16),parseInt(o[3],16)]}},{re:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,example:["#fb0","f0f"],process:function(o){return[parseInt(o[1]+o[1],16),parseInt(o[2]+o[2],16),parseInt(o[3]+o[3],16)]}}],A=0;A<r.length;A++){var n=r[A].re,i=r[A].process,s=n.exec(t);if(s){var a=i(s);this.r=a[0],this.g=a[1],this.b=a[2],a.length>3&&(this.alpha=a[3]),this.ok=!0}}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.alpha=this.alpha<0?0:this.alpha>1||isNaN(this.alpha)?1:this.alpha,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toRGBA=function(){return"rgba("+this.r+", "+this.g+", "+this.b+", "+this.alpha+")"},this.toHex=function(){var o=this.r.toString(16),l=this.g.toString(16),c=this.b.toString(16);return o.length==1&&(o="0"+o),l.length==1&&(l="0"+l),c.length==1&&(c="0"+c),"#"+o+l+c},this.getHelpXML=function(){for(var o=new Array,l=0;l<r.length;l++)for(var c=r[l].example,f=0;f<c.length;f++)o[o.length]=c[f];for(var h in e)o[o.length]=h;var u=document.createElement("ul");u.setAttribute("id","rgbcolor-examples");for(var l=0;l<o.length;l++)try{var g=document.createElement("li"),p=new RGBColor(o[l]),w=document.createElement("div");w.style.cssText="margin: 3px; border: 1px solid black; background:"+p.toHex()+"; color:"+p.toHex(),w.appendChild(document.createTextNode("test"));var m=document.createTextNode(" "+o[l]+" -> "+p.toRGB()+" -> "+p.toHex());g.appendChild(w),g.appendChild(m),u.appendChild(g)}catch{}return u}}),sv}var bj=Bj();const ov=Zh(bj);var vS={},mS;function Cj(){if(mS)return vS;mS=1;var t=qA(),e=Ah(),r=D4().indexOf,A=rS(),n=e([].indexOf),i=!!n&&1/n([1],1,-0)<0,s=i||!A("indexOf");return t({target:"Array",proto:!0,forced:s},{indexOf:function(o){var l=arguments.length>1?arguments[1]:void 0;return i?n(this,o,l)||0:r(this,o,l)}}),vS}Cj();var wS={},yS;function xj(){if(yS)return wS;yS=1;var t=qA(),e=Sr(),r=R2(),A=ti(),n=xi(),i=K2(),s=e("".indexOf);return t({target:"String",proto:!0,forced:!i("includes")},{includes:function(o){return!!~s(n(A(this)),n(r(o)),arguments.length>1?arguments[1]:void 0)}}),wS}xj();var BS={},lv,bS;function Ej(){if(bS)return lv;bS=1;var t=Ns();return lv=Array.isArray||function(r){return t(r)==="Array"},lv}var CS;function Sj(){if(CS)return BS;CS=1;var t=qA(),e=Sr(),r=Ej(),A=e([].reverse),n=[1,2];return t({target:"Array",proto:!0,forced:String(n)===String(n.reverse())},{reverse:function(){return r(this)&&(this.length=this.length),A(this)}}),BS}Sj();var xS=function(t,e){return(xS=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,A){r.__proto__=A}||function(r,A){for(var n in A)Object.prototype.hasOwnProperty.call(A,n)&&(r[n]=A[n])})(t,e)};function ES(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}xS(t,e),t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}function Fj(t){var e="";Array.isArray(t)||(t=[t]);for(var r=0;r<t.length;r++){var A=t[r];if(A.type===ze.CLOSE_PATH)e+="z";else if(A.type===ze.HORIZ_LINE_TO)e+=(A.relative?"h":"H")+A.x;else if(A.type===ze.VERT_LINE_TO)e+=(A.relative?"v":"V")+A.y;else if(A.type===ze.MOVE_TO)e+=(A.relative?"m":"M")+A.x+" "+A.y;else if(A.type===ze.LINE_TO)e+=(A.relative?"l":"L")+A.x+" "+A.y;else if(A.type===ze.CURVE_TO)e+=(A.relative?"c":"C")+A.x1+" "+A.y1+" "+A.x2+" "+A.y2+" "+A.x+" "+A.y;else if(A.type===ze.SMOOTH_CURVE_TO)e+=(A.relative?"s":"S")+A.x2+" "+A.y2+" "+A.x+" "+A.y;else if(A.type===ze.QUAD_TO)e+=(A.relative?"q":"Q")+A.x1+" "+A.y1+" "+A.x+" "+A.y;else if(A.type===ze.SMOOTH_QUAD_TO)e+=(A.relative?"t":"T")+A.x+" "+A.y;else{if(A.type!==ze.ARC)throw new Error('Unexpected command type "'+A.type+'" at index '+r+".");e+=(A.relative?"a":"A")+A.rX+" "+A.rY+" "+A.xRot+" "+ +A.lArcFlag+" "+ +A.sweepFlag+" "+A.x+" "+A.y}}return e}function cv(t,e){var r=t[0],A=t[1];return[r*Math.cos(e)-A*Math.sin(e),r*Math.sin(e)+A*Math.cos(e)]}function Ai(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r=0;r<t.length;r++)if(typeof t[r]!="number")throw new Error("assertNumbers arguments["+r+"] is not a number. "+typeof t[r]+" == typeof "+t[r]);return!0}var Ma=Math.PI;function uv(t,e,r){t.lArcFlag=t.lArcFlag===0?0:1,t.sweepFlag=t.sweepFlag===0?0:1;var A=t.rX,n=t.rY,i=t.x,s=t.y;A=Math.abs(t.rX),n=Math.abs(t.rY);var a=cv([(e-i)/2,(r-s)/2],-t.xRot/180*Ma),o=a[0],l=a[1],c=Math.pow(o,2)/Math.pow(A,2)+Math.pow(l,2)/Math.pow(n,2);1<c&&(A*=Math.sqrt(c),n*=Math.sqrt(c)),t.rX=A,t.rY=n;var f=Math.pow(A,2)*Math.pow(l,2)+Math.pow(n,2)*Math.pow(o,2),h=(t.lArcFlag!==t.sweepFlag?1:-1)*Math.sqrt(Math.max(0,(Math.pow(A,2)*Math.pow(n,2)-f)/f)),u=A*l/n*h,g=-n*o/A*h,p=cv([u,g],t.xRot/180*Ma);t.cX=p[0]+(e+i)/2,t.cY=p[1]+(r+s)/2,t.phi1=Math.atan2((l-g)/n,(o-u)/A),t.phi2=Math.atan2((-l-g)/n,(-o-u)/A),t.sweepFlag===0&&t.phi2>t.phi1&&(t.phi2-=2*Ma),t.sweepFlag===1&&t.phi2<t.phi1&&(t.phi2+=2*Ma),t.phi1*=180/Ma,t.phi2*=180/Ma}function SS(t,e,r){Ai(t,e,r);var A=t*t+e*e-r*r;if(0>A)return[];if(A===0)return[[t*r/(t*t+e*e),e*r/(t*t+e*e)]];var n=Math.sqrt(A);return[[(t*r+e*n)/(t*t+e*e),(e*r-t*n)/(t*t+e*e)],[(t*r-e*n)/(t*t+e*e),(e*r+t*n)/(t*t+e*e)]]}var Kr,Ki=Math.PI/180;function FS(t,e,r){return(1-r)*t+r*e}function IS(t,e,r,A){return t+Math.cos(A/180*Ma)*e+Math.sin(A/180*Ma)*r}function US(t,e,r,A){var n=1e-6,i=e-t,s=r-e,a=3*i+3*(A-r)-6*s,o=6*(s-i),l=3*i;return Math.abs(a)<n?[-l/o]:(function(c,f,h){var u=c*c/4-f;if(u<-h)return[];if(u<=h)return[-c/2];var g=Math.sqrt(u);return[-c/2-g,-c/2+g]})(o/a,l/a,n)}function _S(t,e,r,A,n){var i=1-n;return t*(i*i*i)+e*(3*i*i*n)+r*(3*i*n*n)+A*(n*n*n)}(function(t){function e(){return n((function(a,o,l){return a.relative&&(a.x1!==void 0&&(a.x1+=o),a.y1!==void 0&&(a.y1+=l),a.x2!==void 0&&(a.x2+=o),a.y2!==void 0&&(a.y2+=l),a.x!==void 0&&(a.x+=o),a.y!==void 0&&(a.y+=l),a.relative=!1),a}))}function r(){var a=NaN,o=NaN,l=NaN,c=NaN;return n((function(f,h,u){return f.type&ze.SMOOTH_CURVE_TO&&(f.type=ze.CURVE_TO,a=isNaN(a)?h:a,o=isNaN(o)?u:o,f.x1=f.relative?h-a:2*h-a,f.y1=f.relative?u-o:2*u-o),f.type&ze.CURVE_TO?(a=f.relative?h+f.x2:f.x2,o=f.relative?u+f.y2:f.y2):(a=NaN,o=NaN),f.type&ze.SMOOTH_QUAD_TO&&(f.type=ze.QUAD_TO,l=isNaN(l)?h:l,c=isNaN(c)?u:c,f.x1=f.relative?h-l:2*h-l,f.y1=f.relative?u-c:2*u-c),f.type&ze.QUAD_TO?(l=f.relative?h+f.x1:f.x1,c=f.relative?u+f.y1:f.y1):(l=NaN,c=NaN),f}))}function A(){var a=NaN,o=NaN;return n((function(l,c,f){if(l.type&ze.SMOOTH_QUAD_TO&&(l.type=ze.QUAD_TO,a=isNaN(a)?c:a,o=isNaN(o)?f:o,l.x1=l.relative?c-a:2*c-a,l.y1=l.relative?f-o:2*f-o),l.type&ze.QUAD_TO){a=l.relative?c+l.x1:l.x1,o=l.relative?f+l.y1:l.y1;var h=l.x1,u=l.y1;l.type=ze.CURVE_TO,l.x1=((l.relative?0:c)+2*h)/3,l.y1=((l.relative?0:f)+2*u)/3,l.x2=(l.x+2*h)/3,l.y2=(l.y+2*u)/3}else a=NaN,o=NaN;return l}))}function n(a){var o=0,l=0,c=NaN,f=NaN;return function(h){if(isNaN(c)&&!(h.type&ze.MOVE_TO))throw new Error("path must start with moveto");var u=a(h,o,l,c,f);return h.type&ze.CLOSE_PATH&&(o=c,l=f),h.x!==void 0&&(o=h.relative?o+h.x:h.x),h.y!==void 0&&(l=h.relative?l+h.y:h.y),h.type&ze.MOVE_TO&&(c=o,f=l),u}}function i(a,o,l,c,f,h){return Ai(a,o,l,c,f,h),n((function(u,g,p,w){var m=u.x1,B=u.x2,x=u.relative&&!isNaN(w),E=u.x!==void 0?u.x:x?0:g,k=u.y!==void 0?u.y:x?0:p;function H(S){return S*S}u.type&ze.HORIZ_LINE_TO&&o!==0&&(u.type=ze.LINE_TO,u.y=u.relative?0:p),u.type&ze.VERT_LINE_TO&&l!==0&&(u.type=ze.LINE_TO,u.x=u.relative?0:g),u.x!==void 0&&(u.x=u.x*a+k*l+(x?0:f)),u.y!==void 0&&(u.y=E*o+u.y*c+(x?0:h)),u.x1!==void 0&&(u.x1=u.x1*a+u.y1*l+(x?0:f)),u.y1!==void 0&&(u.y1=m*o+u.y1*c+(x?0:h)),u.x2!==void 0&&(u.x2=u.x2*a+u.y2*l+(x?0:f)),u.y2!==void 0&&(u.y2=B*o+u.y2*c+(x?0:h));var K=a*c-o*l;if(u.xRot!==void 0&&(a!==1||o!==0||l!==0||c!==1))if(K===0)delete u.rX,delete u.rY,delete u.xRot,delete u.lArcFlag,delete u.sweepFlag,u.type=ze.LINE_TO;else{var R=u.xRot*Math.PI/180,I=Math.sin(R),W=Math.cos(R),L=1/H(u.rX),F=1/H(u.rY),M=H(W)*L+H(I)*F,b=2*I*W*(L-F),Y=H(I)*L+H(W)*F,ce=M*c*c-b*o*c+Y*o*o,ee=b*(a*c+o*l)-2*(M*l*c+Y*a*o),le=M*l*l-b*a*l+Y*a*a,Ae=(Math.atan2(ee,ce-le)+Math.PI)%Math.PI/2,te=Math.sin(Ae),T=Math.cos(Ae);u.rX=Math.abs(K)/Math.sqrt(ce*H(T)+ee*te*T+le*H(te)),u.rY=Math.abs(K)/Math.sqrt(ce*H(te)-ee*te*T+le*H(T)),u.xRot=180*Ae/Math.PI}return u.sweepFlag!==void 0&&0>K&&(u.sweepFlag=+!u.sweepFlag),u}))}function s(){return function(a){var o={};for(var l in a)o[l]=a[l];return o}}t.ROUND=function(a){function o(l){return Math.round(l*a)/a}return a===void 0&&(a=1e13),Ai(a),function(l){return l.x1!==void 0&&(l.x1=o(l.x1)),l.y1!==void 0&&(l.y1=o(l.y1)),l.x2!==void 0&&(l.x2=o(l.x2)),l.y2!==void 0&&(l.y2=o(l.y2)),l.x!==void 0&&(l.x=o(l.x)),l.y!==void 0&&(l.y=o(l.y)),l.rX!==void 0&&(l.rX=o(l.rX)),l.rY!==void 0&&(l.rY=o(l.rY)),l}},t.TO_ABS=e,t.TO_REL=function(){return n((function(a,o,l){return a.relative||(a.x1!==void 0&&(a.x1-=o),a.y1!==void 0&&(a.y1-=l),a.x2!==void 0&&(a.x2-=o),a.y2!==void 0&&(a.y2-=l),a.x!==void 0&&(a.x-=o),a.y!==void 0&&(a.y-=l),a.relative=!0),a}))},t.NORMALIZE_HVZ=function(a,o,l){return a===void 0&&(a=!0),o===void 0&&(o=!0),l===void 0&&(l=!0),n((function(c,f,h,u,g){if(isNaN(u)&&!(c.type&ze.MOVE_TO))throw new Error("path must start with moveto");return o&&c.type&ze.HORIZ_LINE_TO&&(c.type=ze.LINE_TO,c.y=c.relative?0:h),l&&c.type&ze.VERT_LINE_TO&&(c.type=ze.LINE_TO,c.x=c.relative?0:f),a&&c.type&ze.CLOSE_PATH&&(c.type=ze.LINE_TO,c.x=c.relative?u-f:u,c.y=c.relative?g-h:g),c.type&ze.ARC&&(c.rX===0||c.rY===0)&&(c.type=ze.LINE_TO,delete c.rX,delete c.rY,delete c.xRot,delete c.lArcFlag,delete c.sweepFlag),c}))},t.NORMALIZE_ST=r,t.QT_TO_C=A,t.INFO=n,t.SANITIZE=function(a){a===void 0&&(a=0),Ai(a);var o=NaN,l=NaN,c=NaN,f=NaN;return n((function(h,u,g,p,w){var m=Math.abs,B=!1,x=0,E=0;if(h.type&ze.SMOOTH_CURVE_TO&&(x=isNaN(o)?0:u-o,E=isNaN(l)?0:g-l),h.type&(ze.CURVE_TO|ze.SMOOTH_CURVE_TO)?(o=h.relative?u+h.x2:h.x2,l=h.relative?g+h.y2:h.y2):(o=NaN,l=NaN),h.type&ze.SMOOTH_QUAD_TO?(c=isNaN(c)?u:2*u-c,f=isNaN(f)?g:2*g-f):h.type&ze.QUAD_TO?(c=h.relative?u+h.x1:h.x1,f=h.relative?g+h.y1:h.y2):(c=NaN,f=NaN),h.type&ze.LINE_COMMANDS||h.type&ze.ARC&&(h.rX===0||h.rY===0||!h.lArcFlag)||h.type&ze.CURVE_TO||h.type&ze.SMOOTH_CURVE_TO||h.type&ze.QUAD_TO||h.type&ze.SMOOTH_QUAD_TO){var k=h.x===void 0?0:h.relative?h.x:h.x-u,H=h.y===void 0?0:h.relative?h.y:h.y-g;x=isNaN(c)?h.x1===void 0?x:h.relative?h.x:h.x1-u:c-u,E=isNaN(f)?h.y1===void 0?E:h.relative?h.y:h.y1-g:f-g;var K=h.x2===void 0?0:h.relative?h.x:h.x2-u,R=h.y2===void 0?0:h.relative?h.y:h.y2-g;m(k)<=a&&m(H)<=a&&m(x)<=a&&m(E)<=a&&m(K)<=a&&m(R)<=a&&(B=!0)}return h.type&ze.CLOSE_PATH&&m(u-p)<=a&&m(g-w)<=a&&(B=!0),B?[]:h}))},t.MATRIX=i,t.ROTATE=function(a,o,l){o===void 0&&(o=0),l===void 0&&(l=0),Ai(a,o,l);var c=Math.sin(a),f=Math.cos(a);return i(f,c,-c,f,o-o*f+l*c,l-o*c-l*f)},t.TRANSLATE=function(a,o){return o===void 0&&(o=0),Ai(a,o),i(1,0,0,1,a,o)},t.SCALE=function(a,o){return o===void 0&&(o=a),Ai(a,o),i(a,0,0,o,0,0)},t.SKEW_X=function(a){return Ai(a),i(1,0,Math.atan(a),1,0,0)},t.SKEW_Y=function(a){return Ai(a),i(1,Math.atan(a),0,1,0,0)},t.X_AXIS_SYMMETRY=function(a){return a===void 0&&(a=0),Ai(a),i(-1,0,0,1,a,0)},t.Y_AXIS_SYMMETRY=function(a){return a===void 0&&(a=0),Ai(a),i(1,0,0,-1,0,a)},t.A_TO_C=function(){return n((function(a,o,l){return ze.ARC===a.type?(function(c,f,h){var u,g,p,w;c.cX||uv(c,f,h);for(var m=Math.min(c.phi1,c.phi2),B=Math.max(c.phi1,c.phi2)-m,x=Math.ceil(B/90),E=new Array(x),k=f,H=h,K=0;K<x;K++){var R=FS(c.phi1,c.phi2,K/x),I=FS(c.phi1,c.phi2,(K+1)/x),W=I-R,L=4/3*Math.tan(W*Ki/4),F=[Math.cos(R*Ki)-L*Math.sin(R*Ki),Math.sin(R*Ki)+L*Math.cos(R*Ki)],M=F[0],b=F[1],Y=[Math.cos(I*Ki),Math.sin(I*Ki)],ce=Y[0],ee=Y[1],le=[ce+L*Math.sin(I*Ki),ee-L*Math.cos(I*Ki)],Ae=le[0],te=le[1];E[K]={relative:c.relative,type:ze.CURVE_TO};var T=function(S,O){var P=cv([S*c.rX,O*c.rY],c.xRot),z=P[0],ie=P[1];return[c.cX+z,c.cY+ie]};u=T(M,b),E[K].x1=u[0],E[K].y1=u[1],g=T(Ae,te),E[K].x2=g[0],E[K].y2=g[1],p=T(ce,ee),E[K].x=p[0],E[K].y=p[1],c.relative&&(E[K].x1-=k,E[K].y1-=H,E[K].x2-=k,E[K].y2-=H,E[K].x-=k,E[K].y-=H),k=(w=[E[K].x,E[K].y])[0],H=w[1]}return E})(a,a.relative?0:o,a.relative?0:l):a}))},t.ANNOTATE_ARCS=function(){return n((function(a,o,l){return a.relative&&(o=0,l=0),ze.ARC===a.type&&uv(a,o,l),a}))},t.CLONE=s,t.CALCULATE_BOUNDS=function(){var a=function(h){var u={};for(var g in h)u[g]=h[g];return u},o=e(),l=A(),c=r(),f=n((function(h,u,g){var p=c(l(o(a(h))));function w(te){te>f.maxX&&(f.maxX=te),te<f.minX&&(f.minX=te)}function m(te){te>f.maxY&&(f.maxY=te),te<f.minY&&(f.minY=te)}if(p.type&ze.DRAWING_COMMANDS&&(w(u),m(g)),p.type&ze.HORIZ_LINE_TO&&w(p.x),p.type&ze.VERT_LINE_TO&&m(p.y),p.type&ze.LINE_TO&&(w(p.x),m(p.y)),p.type&ze.CURVE_TO){w(p.x),m(p.y);for(var B=0,x=US(u,p.x1,p.x2,p.x);B<x.length;B++)0<(Ae=x[B])&&1>Ae&&w(_S(u,p.x1,p.x2,p.x,Ae));for(var E=0,k=US(g,p.y1,p.y2,p.y);E<k.length;E++)0<(Ae=k[E])&&1>Ae&&m(_S(g,p.y1,p.y2,p.y,Ae))}if(p.type&ze.ARC){w(p.x),m(p.y),uv(p,u,g);for(var H=p.xRot/180*Math.PI,K=Math.cos(H)*p.rX,R=Math.sin(H)*p.rX,I=-Math.sin(H)*p.rY,W=Math.cos(H)*p.rY,L=p.phi1<p.phi2?[p.phi1,p.phi2]:-180>p.phi2?[p.phi2+360,p.phi1+360]:[p.phi2,p.phi1],F=L[0],M=L[1],b=function(te){var T=te[0],S=te[1],O=180*Math.atan2(S,T)/Math.PI;return O<F?O+360:O},Y=0,ce=SS(I,-K,0).map(b);Y<ce.length;Y++)(Ae=ce[Y])>F&&Ae<M&&w(IS(p.cX,K,I,Ae));for(var ee=0,le=SS(W,-R,0).map(b);ee<le.length;ee++){var Ae;(Ae=le[ee])>F&&Ae<M&&m(IS(p.cY,R,W,Ae))}}return h}));return f.minX=1/0,f.maxX=-1/0,f.minY=1/0,f.maxY=-1/0,f}})(Kr||(Kr={}));var ni,QS=(function(){function t(){}return t.prototype.round=function(e){return this.transform(Kr.ROUND(e))},t.prototype.toAbs=function(){return this.transform(Kr.TO_ABS())},t.prototype.toRel=function(){return this.transform(Kr.TO_REL())},t.prototype.normalizeHVZ=function(e,r,A){return this.transform(Kr.NORMALIZE_HVZ(e,r,A))},t.prototype.normalizeST=function(){return this.transform(Kr.NORMALIZE_ST())},t.prototype.qtToC=function(){return this.transform(Kr.QT_TO_C())},t.prototype.aToC=function(){return this.transform(Kr.A_TO_C())},t.prototype.sanitize=function(e){return this.transform(Kr.SANITIZE(e))},t.prototype.translate=function(e,r){return this.transform(Kr.TRANSLATE(e,r))},t.prototype.scale=function(e,r){return this.transform(Kr.SCALE(e,r))},t.prototype.rotate=function(e,r,A){return this.transform(Kr.ROTATE(e,r,A))},t.prototype.matrix=function(e,r,A,n,i,s){return this.transform(Kr.MATRIX(e,r,A,n,i,s))},t.prototype.skewX=function(e){return this.transform(Kr.SKEW_X(e))},t.prototype.skewY=function(e){return this.transform(Kr.SKEW_Y(e))},t.prototype.xSymmetry=function(e){return this.transform(Kr.X_AXIS_SYMMETRY(e))},t.prototype.ySymmetry=function(e){return this.transform(Kr.Y_AXIS_SYMMETRY(e))},t.prototype.annotateArcs=function(){return this.transform(Kr.ANNOTATE_ARCS())},t})(),Ij=function(t){return t===" "||t===" "||t==="\r"||t===`
|
|
138
|
+
`},kS=function(t){return 48<=t.charCodeAt(0)&&t.charCodeAt(0)<=57},Uj=(function(t){function e(){var r=t.call(this)||this;return r.curNumber="",r.curCommandType=-1,r.curCommandRelative=!1,r.canParseCommandOrComma=!0,r.curNumberHasExp=!1,r.curNumberHasExpDigits=!1,r.curNumberHasDecimal=!1,r.curArgs=[],r}return ES(e,t),e.prototype.finish=function(r){if(r===void 0&&(r=[]),this.parse(" ",r),this.curArgs.length!==0||!this.canParseCommandOrComma)throw new SyntaxError("Unterminated command at the path end.");return r},e.prototype.parse=function(r,A){var n=this;A===void 0&&(A=[]);for(var i=function(f){A.push(f),n.curArgs.length=0,n.canParseCommandOrComma=!0},s=0;s<r.length;s++){var a=r[s],o=!(this.curCommandType!==ze.ARC||this.curArgs.length!==3&&this.curArgs.length!==4||this.curNumber.length!==1||this.curNumber!=="0"&&this.curNumber!=="1"),l=kS(a)&&(this.curNumber==="0"&&a==="0"||o);if(!kS(a)||l)if(a!=="e"&&a!=="E")if(a!=="-"&&a!=="+"||!this.curNumberHasExp||this.curNumberHasExpDigits)if(a!=="."||this.curNumberHasExp||this.curNumberHasDecimal||o){if(this.curNumber&&this.curCommandType!==-1){var c=Number(this.curNumber);if(isNaN(c))throw new SyntaxError("Invalid number ending at "+s);if(this.curCommandType===ze.ARC){if(this.curArgs.length===0||this.curArgs.length===1){if(0>c)throw new SyntaxError('Expected positive number, got "'+c+'" at index "'+s+'"')}else if((this.curArgs.length===3||this.curArgs.length===4)&&this.curNumber!=="0"&&this.curNumber!=="1")throw new SyntaxError('Expected a flag, got "'+this.curNumber+'" at index "'+s+'"')}this.curArgs.push(c),this.curArgs.length===_j[this.curCommandType]&&(ze.HORIZ_LINE_TO===this.curCommandType?i({type:ze.HORIZ_LINE_TO,relative:this.curCommandRelative,x:c}):ze.VERT_LINE_TO===this.curCommandType?i({type:ze.VERT_LINE_TO,relative:this.curCommandRelative,y:c}):this.curCommandType===ze.MOVE_TO||this.curCommandType===ze.LINE_TO||this.curCommandType===ze.SMOOTH_QUAD_TO?(i({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),ze.MOVE_TO===this.curCommandType&&(this.curCommandType=ze.LINE_TO)):this.curCommandType===ze.CURVE_TO?i({type:ze.CURVE_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x2:this.curArgs[2],y2:this.curArgs[3],x:this.curArgs[4],y:this.curArgs[5]}):this.curCommandType===ze.SMOOTH_CURVE_TO?i({type:ze.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===ze.QUAD_TO?i({type:ze.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===ze.ARC&&i({type:ze.ARC,relative:this.curCommandRelative,rX:this.curArgs[0],rY:this.curArgs[1],xRot:this.curArgs[2],lArcFlag:this.curArgs[3],sweepFlag:this.curArgs[4],x:this.curArgs[5],y:this.curArgs[6]})),this.curNumber="",this.curNumberHasExpDigits=!1,this.curNumberHasExp=!1,this.curNumberHasDecimal=!1,this.canParseCommandOrComma=!0}if(!Ij(a))if(a===","&&this.canParseCommandOrComma)this.canParseCommandOrComma=!1;else if(a!=="+"&&a!=="-"&&a!==".")if(l)this.curNumber=a,this.curNumberHasDecimal=!1;else{if(this.curArgs.length!==0)throw new SyntaxError("Unterminated command at index "+s+".");if(!this.canParseCommandOrComma)throw new SyntaxError('Unexpected character "'+a+'" at index '+s+". Command cannot follow comma");if(this.canParseCommandOrComma=!1,a!=="z"&&a!=="Z")if(a==="h"||a==="H")this.curCommandType=ze.HORIZ_LINE_TO,this.curCommandRelative=a==="h";else if(a==="v"||a==="V")this.curCommandType=ze.VERT_LINE_TO,this.curCommandRelative=a==="v";else if(a==="m"||a==="M")this.curCommandType=ze.MOVE_TO,this.curCommandRelative=a==="m";else if(a==="l"||a==="L")this.curCommandType=ze.LINE_TO,this.curCommandRelative=a==="l";else if(a==="c"||a==="C")this.curCommandType=ze.CURVE_TO,this.curCommandRelative=a==="c";else if(a==="s"||a==="S")this.curCommandType=ze.SMOOTH_CURVE_TO,this.curCommandRelative=a==="s";else if(a==="q"||a==="Q")this.curCommandType=ze.QUAD_TO,this.curCommandRelative=a==="q";else if(a==="t"||a==="T")this.curCommandType=ze.SMOOTH_QUAD_TO,this.curCommandRelative=a==="t";else{if(a!=="a"&&a!=="A")throw new SyntaxError('Unexpected character "'+a+'" at index '+s+".");this.curCommandType=ze.ARC,this.curCommandRelative=a==="a"}else A.push({type:ze.CLOSE_PATH}),this.canParseCommandOrComma=!0,this.curCommandType=-1}else this.curNumber=a,this.curNumberHasDecimal=a==="."}else this.curNumber+=a,this.curNumberHasDecimal=!0;else this.curNumber+=a;else this.curNumber+=a,this.curNumberHasExp=!0;else this.curNumber+=a,this.curNumberHasExpDigits=this.curNumberHasExp}return A},e.prototype.transform=function(r){return Object.create(this,{parse:{value:function(A,n){n===void 0&&(n=[]);for(var i=0,s=Object.getPrototypeOf(this).parse.call(this,A);i<s.length;i++){var a=s[i],o=r(a);Array.isArray(o)?n.push.apply(n,o):n.push(o)}return n}}})},e})(QS),ze=(function(t){function e(r){var A=t.call(this)||this;return A.commands=typeof r=="string"?e.parse(r):r,A}return ES(e,t),e.prototype.encode=function(){return e.encode(this.commands)},e.prototype.getBounds=function(){var r=Kr.CALCULATE_BOUNDS();return this.transform(r),r},e.prototype.transform=function(r){for(var A=[],n=0,i=this.commands;n<i.length;n++){var s=r(i[n]);Array.isArray(s)?A.push.apply(A,s):A.push(s)}return this.commands=A,this},e.encode=function(r){return Fj(r)},e.parse=function(r){var A=new Uj,n=[];return A.parse(r,n),A.finish(n),n},e.CLOSE_PATH=1,e.MOVE_TO=2,e.HORIZ_LINE_TO=4,e.VERT_LINE_TO=8,e.LINE_TO=16,e.CURVE_TO=32,e.SMOOTH_CURVE_TO=64,e.QUAD_TO=128,e.SMOOTH_QUAD_TO=256,e.ARC=512,e.LINE_COMMANDS=e.LINE_TO|e.HORIZ_LINE_TO|e.VERT_LINE_TO,e.DRAWING_COMMANDS=e.HORIZ_LINE_TO|e.VERT_LINE_TO|e.LINE_TO|e.CURVE_TO|e.SMOOTH_CURVE_TO|e.QUAD_TO|e.SMOOTH_QUAD_TO|e.ARC,e})(QS),_j=((ni={})[ze.MOVE_TO]=2,ni[ze.LINE_TO]=2,ni[ze.HORIZ_LINE_TO]=1,ni[ze.VERT_LINE_TO]=1,ni[ze.CLOSE_PATH]=0,ni[ze.QUAD_TO]=4,ni[ze.SMOOTH_QUAD_TO]=2,ni[ze.CURVE_TO]=6,ni[ze.SMOOTH_CURVE_TO]=4,ni[ze.ARC]=7,ni),LS={},TS;function Qj(){if(TS)return LS;TS=1;var t=Jf().PROPER,e=Ps(),r=VA(),A=xi(),n=Er(),i=ih(),s="toString",a=RegExp.prototype,o=a[s],l=n(function(){return o.call({source:"a",flags:"b"})!=="/a/b"}),c=t&&o.name!==s;return(l||c)&&e(a,s,function(){var h=r(this),u=A(h.source),g=A(i(h));return"/"+u+"/"+g},{unsafe:!0}),LS}Qj();function ah(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ah=function(e){return typeof e}:ah=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ah(t)}function kj(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var Lj=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],Tj=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function Nj(t,e,r,A,n){if(typeof t=="string"&&(t=document.getElementById(t)),!t||ah(t)!=="object"||!("getContext"in t))throw new TypeError("Expecting canvas with `getContext` method in processCanvasRGB(A) calls!");var i=t.getContext("2d");try{return i.getImageData(e,r,A,n)}catch(s){throw new Error("unable to access image data: "+s)}}function Oj(t,e,r,A,n,i){if(!(isNaN(i)||i<1)){i|=0;var s=Nj(t,e,r,A,n);s=Pj(s,e,r,A,n,i),t.getContext("2d").putImageData(s,e,r)}}function Pj(t,e,r,A,n,i){for(var s=t.data,a=2*i+1,o=A-1,l=n-1,c=i+1,f=c*(c+1)/2,h=new NS,u=h,g,p=1;p<a;p++)u=u.next=new NS,p===c&&(g=u);u.next=h;for(var w=null,m=null,B=0,x=0,E=Lj[i],k=Tj[i],H=0;H<n;H++){u=h;for(var K=s[x],R=s[x+1],I=s[x+2],W=s[x+3],L=0;L<c;L++)u.r=K,u.g=R,u.b=I,u.a=W,u=u.next;for(var F=0,M=0,b=0,Y=0,ce=c*K,ee=c*R,le=c*I,Ae=c*W,te=f*K,T=f*R,S=f*I,O=f*W,P=1;P<c;P++){var z=x+((o<P?o:P)<<2),ie=s[z],fe=s[z+1],Z=s[z+2],pe=s[z+3],we=c-P;te+=(u.r=ie)*we,T+=(u.g=fe)*we,S+=(u.b=Z)*we,O+=(u.a=pe)*we,F+=ie,M+=fe,b+=Z,Y+=pe,u=u.next}w=h,m=g;for(var be=0;be<A;be++){var je=O*E>>>k;if(s[x+3]=je,je!==0){var Te=255/je;s[x]=(te*E>>>k)*Te,s[x+1]=(T*E>>>k)*Te,s[x+2]=(S*E>>>k)*Te}else s[x]=s[x+1]=s[x+2]=0;te-=ce,T-=ee,S-=le,O-=Ae,ce-=w.r,ee-=w.g,le-=w.b,Ae-=w.a;var Q=be+i+1;Q=B+(Q<o?Q:o)<<2,F+=w.r=s[Q],M+=w.g=s[Q+1],b+=w.b=s[Q+2],Y+=w.a=s[Q+3],te+=F,T+=M,S+=b,O+=Y,w=w.next;var N=m,ue=N.r,J=N.g,q=N.b,ne=N.a;ce+=ue,ee+=J,le+=q,Ae+=ne,F-=ue,M-=J,b-=q,Y-=ne,m=m.next,x+=4}B+=A}for(var xe=0;xe<A;xe++){x=xe<<2;var ye=s[x],he=s[x+1],Se=s[x+2],ve=s[x+3],Ce=c*ye,Le=c*he,Ge=c*Se,Ke=c*ve,We=f*ye,At=f*he,$e=f*Se,_t=f*ve;u=h;for(var at=0;at<c;at++)u.r=ye,u.g=he,u.b=Se,u.a=ve,u=u.next;for(var Bt=A,bt=0,Tt=0,st=0,Pt=0,rt=1;rt<=i;rt++){x=Bt+xe<<2;var wt=c-rt;We+=(u.r=ye=s[x])*wt,At+=(u.g=he=s[x+1])*wt,$e+=(u.b=Se=s[x+2])*wt,_t+=(u.a=ve=s[x+3])*wt,Pt+=ye,bt+=he,Tt+=Se,st+=ve,u=u.next,rt<l&&(Bt+=A)}x=xe,w=h,m=g;for(var Kt=0;Kt<n;Kt++){var lt=x<<2;s[lt+3]=ve=_t*E>>>k,ve>0?(ve=255/ve,s[lt]=(We*E>>>k)*ve,s[lt+1]=(At*E>>>k)*ve,s[lt+2]=($e*E>>>k)*ve):s[lt]=s[lt+1]=s[lt+2]=0,We-=Ce,At-=Le,$e-=Ge,_t-=Ke,Ce-=w.r,Le-=w.g,Ge-=w.b,Ke-=w.a,lt=xe+((lt=Kt+c)<l?lt:l)*A<<2,We+=Pt+=w.r=s[lt],At+=bt+=w.g=s[lt+1],$e+=Tt+=w.b=s[lt+2],_t+=st+=w.a=s[lt+3],w=w.next,Ce+=ye=m.r,Le+=he=m.g,Ge+=Se=m.b,Ke+=ve=m.a,Pt-=ye,bt-=he,Tt-=Se,st-=ve,m=m.next,x+=A}}return t}var NS=function t(){kj(this,t),this.r=0,this.g=0,this.b=0,this.a=0,this.next=null};function Mj(){var{DOMParser:t}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e={window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:t,createCanvas(r,A){return new OffscreenCanvas(r,A)},createImage(r){return ji(function*(){var A=yield fetch(r),n=yield A.blob(),i=yield createImageBitmap(n);return i})()}};return(typeof DOMParser<"u"||typeof t>"u")&&Reflect.deleteProperty(e,"DOMParser"),e}function Dj(t){var{DOMParser:e,canvas:r,fetch:A}=t;return{window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:e,fetch:A,createCanvas:r.createCanvas,createImage:r.loadImage}}var Hj=Object.freeze({__proto__:null,offscreen:Mj,node:Dj});function Ds(t){return t.replace(/(?!\u3000)\s+/gm," ")}function OS(t){return t.replace(/^[\n \t]+/,"")}function PS(t){return t.replace(/[\n \t]+$/,"")}function ln(t){var e=(t||"").match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm)||[];return e.map(parseFloat)}var Rj=/^[A-Z-]+$/;function MS(t){return Rj.test(t)?t.toLowerCase():t}function fv(t){var e=/url\(('([^']+)'|"([^"]+)"|([^'")]+))\)/.exec(t)||[];return e[2]||e[3]||e[4]}function DS(t){if(!t.startsWith("rgb"))return t;var e=3,r=t.replace(/\d+(\.\d+)?/g,(A,n)=>e--&&n?String(Math.round(parseFloat(A))):A);return r}var jj=/(\[[^\]]+\])/g,Kj=/(#[^\s+>~.[:]+)/g,zj=/(\.[^\s+>~.[:]+)/g,Gj=/(::[^\s+>~.[:]+|:first-line|:first-letter|:before|:after)/gi,Vj=/(:[\w-]+\([^)]*\))/gi,qj=/(:[^\s+>~.[:]+)/g,Wj=/([^\s+>~.[:]+)/g;function Hs(t,e){var r=e.exec(t);return r?[t.replace(e," "),r.length]:[t,0]}function HS(t){var e=[0,0,0],r=t.replace(/:not\(([^)]*)\)/g," $1 ").replace(/{[\s\S]*/gm," "),A=0;return[r,A]=Hs(r,jj),e[1]+=A,[r,A]=Hs(r,Kj),e[0]+=A,[r,A]=Hs(r,zj),e[1]+=A,[r,A]=Hs(r,Gj),e[2]+=A,[r,A]=Hs(r,Vj),e[1]+=A,[r,A]=Hs(r,qj),e[1]+=A,r=r.replace(/[*\s+>~]/g," ").replace(/[#.]/g," "),[r,A]=Hs(r,Wj),e[2]+=A,e.join("")}var Rs=1e-8;function hv(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2))}function sh(t,e){return(t[0]*e[0]+t[1]*e[1])/(hv(t)*hv(e))}function dv(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(sh(t,e))}function pv(t){return t*t*t}function gv(t){return 3*t*t*(1-t)}function vv(t){return 3*t*(1-t)*(1-t)}function mv(t){return(1-t)*(1-t)*(1-t)}function wv(t){return t*t}function yv(t){return 2*t*(1-t)}function Bv(t){return(1-t)*(1-t)}class gt{constructor(e,r,A){this.document=e,this.name=r,this.value=A,this.isNormalizedColor=!1}static empty(e){return new gt(e,"EMPTY","")}split(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:" ",{document:r,name:A}=this;return Ds(this.getString()).trim().split(e).map(n=>new gt(r,A,n))}hasValue(e){var{value:r}=this;return r!==null&&r!==""&&(e||r!==0)&&typeof r<"u"}isString(e){var{value:r}=this,A=typeof r=="string";return!A||!e?A:e.test(r)}isUrlDefinition(){return this.isString(/^url\(/)}isPixels(){if(!this.hasValue())return!1;var e=this.getString();switch(!0){case e.endsWith("px"):case/^[0-9]+$/.test(e):return!0;default:return!1}}setValue(e){return this.value=e,this}getValue(e){return typeof e>"u"||this.hasValue()?this.value:e}getNumber(e){if(!this.hasValue())return typeof e>"u"?0:parseFloat(e);var{value:r}=this,A=parseFloat(r);return this.isString(/%$/)&&(A/=100),A}getString(e){return typeof e>"u"||this.hasValue()?typeof this.value>"u"?"":String(this.value):String(e)}getColor(e){var r=this.getString(e);return this.isNormalizedColor||(this.isNormalizedColor=!0,r=DS(r),this.value=r),r}getDpi(){return 96}getRem(){return this.document.rootEmSize}getEm(){return this.document.emSize}getUnits(){return this.getString().replace(/[0-9.-]/g,"")}getPixels(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!this.hasValue())return 0;var[A,n]=typeof e=="boolean"?[void 0,e]:[e],{viewPort:i}=this.document.screen;switch(!0){case this.isString(/vmin$/):return this.getNumber()/100*Math.min(i.computeSize("x"),i.computeSize("y"));case this.isString(/vmax$/):return this.getNumber()/100*Math.max(i.computeSize("x"),i.computeSize("y"));case this.isString(/vw$/):return this.getNumber()/100*i.computeSize("x");case this.isString(/vh$/):return this.getNumber()/100*i.computeSize("y");case this.isString(/rem$/):return this.getNumber()*this.getRem();case this.isString(/em$/):return this.getNumber()*this.getEm();case this.isString(/ex$/):return this.getNumber()*this.getEm()/2;case this.isString(/px$/):return this.getNumber();case this.isString(/pt$/):return this.getNumber()*this.getDpi()*(1/72);case this.isString(/pc$/):return this.getNumber()*15;case this.isString(/cm$/):return this.getNumber()*this.getDpi()/2.54;case this.isString(/mm$/):return this.getNumber()*this.getDpi()/25.4;case this.isString(/in$/):return this.getNumber()*this.getDpi();case(this.isString(/%$/)&&n):return this.getNumber()*this.getEm();case this.isString(/%$/):return this.getNumber()*i.computeSize(A);default:{var s=this.getNumber();return r&&s<1?s*i.computeSize(A):s}}}getMilliseconds(){return this.hasValue()?this.isString(/ms$/)?this.getNumber():this.getNumber()*1e3:0}getRadians(){if(!this.hasValue())return 0;switch(!0){case this.isString(/deg$/):return this.getNumber()*(Math.PI/180);case this.isString(/grad$/):return this.getNumber()*(Math.PI/200);case this.isString(/rad$/):return this.getNumber();default:return this.getNumber()*(Math.PI/180)}}getDefinition(){var e=this.getString(),r=/#([^)'"]+)/.exec(e);return r&&(r=r[1]),r||(r=e),this.document.definitions[r]}getFillStyleDefinition(e,r){var A=this.getDefinition();if(!A)return null;if(typeof A.createGradient=="function")return A.createGradient(this.document.ctx,e,r);if(typeof A.createPattern=="function"){if(A.getHrefAttribute().hasValue()){var n=A.getAttribute("patternTransform");A=A.getHrefAttribute().getDefinition(),n.hasValue()&&A.getAttribute("patternTransform",!0).setValue(n.value)}return A.createPattern(this.document.ctx,e,r)}return null}getTextBaseline(){return this.hasValue()?gt.textBaselineMapping[this.getString()]:null}addOpacity(e){for(var r=this.getColor(),A=r.length,n=0,i=0;i<A&&(r[i]===","&&n++,n!==3);i++);if(e.hasValue()&&this.isString()&&n!==3){var s=new ov(r);s.ok&&(s.alpha=e.getNumber(),r=s.toRGBA())}return new gt(this.document,this.name,r)}}gt.textBaselineMapping={baseline:"alphabetic","before-edge":"top","text-before-edge":"top",middle:"middle",central:"middle","after-edge":"bottom","text-after-edge":"bottom",ideographic:"ideographic",alphabetic:"alphabetic",hanging:"hanging",mathematical:"alphabetic"};class RS{constructor(){this.viewPorts=[]}clear(){this.viewPorts=[]}setCurrent(e,r){this.viewPorts.push({width:e,height:r})}removeCurrent(){this.viewPorts.pop()}getCurrent(){var{viewPorts:e}=this;return e[e.length-1]}get width(){return this.getCurrent().width}get height(){return this.getCurrent().height}computeSize(e){return typeof e=="number"?e:e==="x"?this.width:e==="y"?this.height:Math.sqrt(Math.pow(this.width,2)+Math.pow(this.height,2))/Math.sqrt(2)}}class Fr{constructor(e,r){this.x=e,this.y=r}static parse(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,[A=r,n=r]=ln(e);return new Fr(A,n)}static parseScale(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,[A=r,n=A]=ln(e);return new Fr(A,n)}static parsePath(e){for(var r=ln(e),A=r.length,n=[],i=0;i<A;i+=2)n.push(new Fr(r[i],r[i+1]));return n}angleTo(e){return Math.atan2(e.y-this.y,e.x-this.x)}applyTransform(e){var{x:r,y:A}=this,n=r*e[0]+A*e[2]+e[4],i=r*e[1]+A*e[3]+e[5];this.x=n,this.y=i}}class jS{constructor(e){this.screen=e,this.working=!1,this.events=[],this.eventElements=[],this.onClick=this.onClick.bind(this),this.onMouseMove=this.onMouseMove.bind(this)}isWorking(){return this.working}start(){if(!this.working){var{screen:e,onClick:r,onMouseMove:A}=this,n=e.ctx.canvas;n.onclick=r,n.onmousemove=A,this.working=!0}}stop(){if(this.working){var e=this.screen.ctx.canvas;this.working=!1,e.onclick=null,e.onmousemove=null}}hasEvents(){return this.working&&this.events.length>0}runEvents(){if(this.working){var{screen:e,events:r,eventElements:A}=this,{style:n}=e.ctx.canvas;n&&(n.cursor=""),r.forEach((i,s)=>{for(var{run:a}=i,o=A[s];o;)a(o),o=o.parent}),this.events=[],this.eventElements=[]}}checkPath(e,r){if(!(!this.working||!r)){var{events:A,eventElements:n}=this;A.forEach((i,s)=>{var{x:a,y:o}=i;!n[s]&&r.isPointInPath&&r.isPointInPath(a,o)&&(n[s]=e)})}}checkBoundingBox(e,r){if(!(!this.working||!r)){var{events:A,eventElements:n}=this;A.forEach((i,s)=>{var{x:a,y:o}=i;!n[s]&&r.isPointInBox(a,o)&&(n[s]=e)})}}mapXY(e,r){for(var{window:A,ctx:n}=this.screen,i=new Fr(e,r),s=n.canvas;s;)i.x-=s.offsetLeft,i.y-=s.offsetTop,s=s.offsetParent;return A.scrollX&&(i.x+=A.scrollX),A.scrollY&&(i.y+=A.scrollY),i}onClick(e){var{x:r,y:A}=this.mapXY(e.clientX,e.clientY);this.events.push({type:"onclick",x:r,y:A,run(n){n.onClick&&n.onClick()}})}onMouseMove(e){var{x:r,y:A}=this.mapXY(e.clientX,e.clientY);this.events.push({type:"onmousemove",x:r,y:A,run(n){n.onMouseMove&&n.onMouseMove()}})}}var KS=typeof window<"u"?window:null,zS=typeof fetch<"u"?fetch.bind(void 0):null;class Cc{constructor(e){var{fetch:r=zS,window:A=KS}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.ctx=e,this.FRAMERATE=30,this.MAX_VIRTUAL_PIXELS=3e4,this.CLIENT_WIDTH=800,this.CLIENT_HEIGHT=600,this.viewPort=new RS,this.mouse=new jS(this),this.animations=[],this.waits=[],this.frameDuration=0,this.isReadyLock=!1,this.isFirstRender=!0,this.intervalId=null,this.window=A,this.fetch=r}wait(e){this.waits.push(e)}ready(){return this.readyPromise?this.readyPromise:Promise.resolve()}isReady(){if(this.isReadyLock)return!0;var e=this.waits.every(r=>r());return e&&(this.waits=[],this.resolveReady&&this.resolveReady()),this.isReadyLock=e,e}setDefaults(e){e.strokeStyle="rgba(0,0,0,0)",e.lineCap="butt",e.lineJoin="miter",e.miterLimit=4}setViewBox(e){var{document:r,ctx:A,aspectRatio:n,width:i,desiredWidth:s,height:a,desiredHeight:o,minX:l=0,minY:c=0,refX:f,refY:h,clip:u=!1,clipX:g=0,clipY:p=0}=e,w=Ds(n).replace(/^defer\s/,""),[m,B]=w.split(" "),x=m||"xMidYMid",E=B||"meet",k=i/s,H=a/o,K=Math.min(k,H),R=Math.max(k,H),I=s,W=o;E==="meet"&&(I*=K,W*=K),E==="slice"&&(I*=R,W*=R);var L=new gt(r,"refX",f),F=new gt(r,"refY",h),M=L.hasValue()&&F.hasValue();if(M&&A.translate(-K*L.getPixels("x"),-K*F.getPixels("y")),u){var b=K*g,Y=K*p;A.beginPath(),A.moveTo(b,Y),A.lineTo(i,Y),A.lineTo(i,a),A.lineTo(b,a),A.closePath(),A.clip()}if(!M){var ce=E==="meet"&&K===H,ee=E==="slice"&&R===H,le=E==="meet"&&K===k,Ae=E==="slice"&&R===k;x.startsWith("xMid")&&(ce||ee)&&A.translate(i/2-I/2,0),x.endsWith("YMid")&&(le||Ae)&&A.translate(0,a/2-W/2),x.startsWith("xMax")&&(ce||ee)&&A.translate(i-I,0),x.endsWith("YMax")&&(le||Ae)&&A.translate(0,a-W)}switch(!0){case x==="none":A.scale(k,H);break;case E==="meet":A.scale(K,K);break;case E==="slice":A.scale(R,R);break}A.translate(-l,-c)}start(e){var{enableRedraw:r=!1,ignoreMouse:A=!1,ignoreAnimation:n=!1,ignoreDimensions:i=!1,ignoreClear:s=!1,forceRedraw:a,scaleWidth:o,scaleHeight:l,offsetX:c,offsetY:f}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{FRAMERATE:h,mouse:u}=this,g=1e3/h;if(this.frameDuration=g,this.readyPromise=new Promise(x=>{this.resolveReady=x}),this.isReady()&&this.render(e,i,s,o,l,c,f),!!r){var p=Date.now(),w=p,m=0,B=()=>{p=Date.now(),m=p-w,m>=g&&(w=p-m%g,this.shouldUpdate(n,a)&&(this.render(e,i,s,o,l,c,f),u.runEvents())),this.intervalId=Av(B)};A||u.start(),this.intervalId=Av(B)}}stop(){this.intervalId&&(Av.cancel(this.intervalId),this.intervalId=null),this.mouse.stop()}shouldUpdate(e,r){if(!e){var{frameDuration:A}=this,n=this.animations.reduce((i,s)=>s.update(A)||i,!1);if(n)return!0}return!!(typeof r=="function"&&r()||!this.isReadyLock&&this.isReady()||this.mouse.hasEvents())}render(e,r,A,n,i,s,a){var{CLIENT_WIDTH:o,CLIENT_HEIGHT:l,viewPort:c,ctx:f,isFirstRender:h}=this,u=f.canvas;c.clear(),u.width&&u.height?c.setCurrent(u.width,u.height):c.setCurrent(o,l);var g=e.getStyle("width"),p=e.getStyle("height");!r&&(h||typeof n!="number"&&typeof i!="number")&&(g.hasValue()&&(u.width=g.getPixels("x"),u.style&&(u.style.width="".concat(u.width,"px"))),p.hasValue()&&(u.height=p.getPixels("y"),u.style&&(u.style.height="".concat(u.height,"px"))));var w=u.clientWidth||u.width,m=u.clientHeight||u.height;if(r&&g.hasValue()&&p.hasValue()&&(w=g.getPixels("x"),m=p.getPixels("y")),c.setCurrent(w,m),typeof s=="number"&&e.getAttribute("x",!0).setValue(s),typeof a=="number"&&e.getAttribute("y",!0).setValue(a),typeof n=="number"||typeof i=="number"){var B=ln(e.getAttribute("viewBox").getString()),x=0,E=0;if(typeof n=="number"){var k=e.getStyle("width");k.hasValue()?x=k.getPixels("x")/n:isNaN(B[2])||(x=B[2]/n)}if(typeof i=="number"){var H=e.getStyle("height");H.hasValue()?E=H.getPixels("y")/i:isNaN(B[3])||(E=B[3]/i)}x||(x=E),E||(E=x),e.getAttribute("width",!0).setValue(n),e.getAttribute("height",!0).setValue(i);var K=e.getStyle("transform",!0,!0);K.setValue("".concat(K.getString()," scale(").concat(1/x,", ").concat(1/E,")"))}A||f.clearRect(0,0,w,m),e.render(f),h&&(this.isFirstRender=!1)}}Cc.defaultWindow=KS,Cc.defaultFetch=zS;var{defaultFetch:$j}=Cc,Yj=typeof DOMParser<"u"?DOMParser:null;class oh{constructor(){var{fetch:e=$j,DOMParser:r=Yj}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.fetch=e,this.DOMParser=r}parse(e){var r=this;return ji(function*(){return e.startsWith("<")?r.parseFromString(e):r.load(e)})()}parseFromString(e){var r=new this.DOMParser;try{return this.checkDocument(r.parseFromString(e,"image/svg+xml"))}catch{return this.checkDocument(r.parseFromString(e,"text/xml"))}}checkDocument(e){var r=e.getElementsByTagName("parsererror")[0];if(r)throw new Error(r.textContent);return e}load(e){var r=this;return ji(function*(){var A=yield r.fetch(e),n=yield A.text();return r.parseFromString(n)})()}}class GS{constructor(e,r){this.type="translate",this.point=null,this.point=Fr.parse(r)}apply(e){var{x:r,y:A}=this.point;e.translate(r||0,A||0)}unapply(e){var{x:r,y:A}=this.point;e.translate(-1*r||0,-1*A||0)}applyToPoint(e){var{x:r,y:A}=this.point;e.applyTransform([1,0,0,1,r||0,A||0])}}class VS{constructor(e,r,A){this.type="rotate",this.angle=null,this.originX=null,this.originY=null,this.cx=0,this.cy=0;var n=ln(r);this.angle=new gt(e,"angle",n[0]),this.originX=A[0],this.originY=A[1],this.cx=n[1]||0,this.cy=n[2]||0}apply(e){var{cx:r,cy:A,originX:n,originY:i,angle:s}=this,a=r+n.getPixels("x"),o=A+i.getPixels("y");e.translate(a,o),e.rotate(s.getRadians()),e.translate(-a,-o)}unapply(e){var{cx:r,cy:A,originX:n,originY:i,angle:s}=this,a=r+n.getPixels("x"),o=A+i.getPixels("y");e.translate(a,o),e.rotate(-1*s.getRadians()),e.translate(-a,-o)}applyToPoint(e){var{cx:r,cy:A,angle:n}=this,i=n.getRadians();e.applyTransform([1,0,0,1,r||0,A||0]),e.applyTransform([Math.cos(i),Math.sin(i),-Math.sin(i),Math.cos(i),0,0]),e.applyTransform([1,0,0,1,-r||0,-A||0])}}class qS{constructor(e,r,A){this.type="scale",this.scale=null,this.originX=null,this.originY=null;var n=Fr.parseScale(r);(n.x===0||n.y===0)&&(n.x=Rs,n.y=Rs),this.scale=n,this.originX=A[0],this.originY=A[1]}apply(e){var{scale:{x:r,y:A},originX:n,originY:i}=this,s=n.getPixels("x"),a=i.getPixels("y");e.translate(s,a),e.scale(r,A||r),e.translate(-s,-a)}unapply(e){var{scale:{x:r,y:A},originX:n,originY:i}=this,s=n.getPixels("x"),a=i.getPixels("y");e.translate(s,a),e.scale(1/r,1/A||r),e.translate(-s,-a)}applyToPoint(e){var{x:r,y:A}=this.scale;e.applyTransform([r||0,0,0,A||0,0,0])}}class bv{constructor(e,r,A){this.type="matrix",this.matrix=[],this.originX=null,this.originY=null,this.matrix=ln(r),this.originX=A[0],this.originY=A[1]}apply(e){var{originX:r,originY:A,matrix:n}=this,i=r.getPixels("x"),s=A.getPixels("y");e.translate(i,s),e.transform(n[0],n[1],n[2],n[3],n[4],n[5]),e.translate(-i,-s)}unapply(e){var{originX:r,originY:A,matrix:n}=this,i=n[0],s=n[2],a=n[4],o=n[1],l=n[3],c=n[5],f=0,h=0,u=1,g=1/(i*(l*u-c*h)-s*(o*u-c*f)+a*(o*h-l*f)),p=r.getPixels("x"),w=A.getPixels("y");e.translate(p,w),e.transform(g*(l*u-c*h),g*(c*f-o*u),g*(a*h-s*u),g*(i*u-a*f),g*(s*c-a*l),g*(a*o-i*c)),e.translate(-p,-w)}applyToPoint(e){e.applyTransform(this.matrix)}}class Cv extends bv{constructor(e,r,A){super(e,r,A),this.type="skew",this.angle=null,this.angle=new gt(e,"angle",r)}}class WS extends Cv{constructor(e,r,A){super(e,r,A),this.type="skewX",this.matrix=[1,0,Math.tan(this.angle.getRadians()),1,0,0]}}class $S extends Cv{constructor(e,r,A){super(e,r,A),this.type="skewY",this.matrix=[1,Math.tan(this.angle.getRadians()),0,1,0,0]}}function Xj(t){return Ds(t).trim().replace(/\)([a-zA-Z])/g,") $1").replace(/\)(\s?,\s?)/g,") ").split(/\s(?=[a-z])/)}function Jj(t){var[e,r]=t.split("(");return[e.trim(),r.trim().replace(")","")]}class Da{constructor(e,r,A){this.document=e,this.transforms=[];var n=Xj(r);n.forEach(i=>{if(i!=="none"){var[s,a]=Jj(i),o=Da.transformTypes[s];typeof o<"u"&&this.transforms.push(new o(this.document,a,A))}})}static fromElement(e,r){var A=r.getStyle("transform",!1,!0),[n,i=n]=r.getStyle("transform-origin",!1,!0).split(),s=[n,i];return A.hasValue()?new Da(e,A.getString(),s):null}apply(e){for(var{transforms:r}=this,A=r.length,n=0;n<A;n++)r[n].apply(e)}unapply(e){for(var{transforms:r}=this,A=r.length,n=A-1;n>=0;n--)r[n].unapply(e)}applyToPoint(e){for(var{transforms:r}=this,A=r.length,n=0;n<A;n++)r[n].applyToPoint(e)}}Da.transformTypes={translate:GS,rotate:VS,scale:qS,matrix:bv,skewX:WS,skewY:$S};class or{constructor(e,r){var A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(this.document=e,this.node=r,this.captureTextNodes=A,this.attributes=Object.create(null),this.styles=Object.create(null),this.stylesSpecificity=Object.create(null),this.animationFrozen=!1,this.animationFrozenValue="",this.parent=null,this.children=[],!(!r||r.nodeType!==1)){if(Array.from(r.attributes).forEach(a=>{var o=MS(a.nodeName);this.attributes[o]=new gt(e,o,a.value)}),this.addStylesFromStyleDefinition(),this.getAttribute("style").hasValue()){var n=this.getAttribute("style").getString().split(";").map(a=>a.trim());n.forEach(a=>{if(a){var[o,l]=a.split(":").map(c=>c.trim());this.styles[o]=new gt(e,o,l)}})}var{definitions:i}=e,s=this.getAttribute("id");s.hasValue()&&(i[s.getString()]||(i[s.getString()]=this)),Array.from(r.childNodes).forEach(a=>{if(a.nodeType===1)this.addChild(a);else if(A&&(a.nodeType===3||a.nodeType===4)){var o=e.createTextNode(a);o.getText().length>0&&this.addChild(o)}})}}getAttribute(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,A=this.attributes[e];if(!A&&r){var n=new gt(this.document,e,"");return this.attributes[e]=n,n}return A||gt.empty(this.document)}getHrefAttribute(){for(var e in this.attributes)if(e==="href"||e.endsWith(":href"))return this.attributes[e];return gt.empty(this.document)}getStyle(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=this.styles[e];if(n)return n;var i=this.getAttribute(e);if(i!=null&&i.hasValue())return this.styles[e]=i,i;if(!A){var{parent:s}=this;if(s){var a=s.getStyle(e);if(a!=null&&a.hasValue())return a}}if(r){var o=new gt(this.document,e,"");return this.styles[e]=o,o}return n||gt.empty(this.document)}render(e){if(!(this.getStyle("display").getString()==="none"||this.getStyle("visibility").getString()==="hidden")){if(e.save(),this.getStyle("mask").hasValue()){var r=this.getStyle("mask").getDefinition();r&&(this.applyEffects(e),r.apply(e,this))}else if(this.getStyle("filter").getValue("none")!=="none"){var A=this.getStyle("filter").getDefinition();A&&(this.applyEffects(e),A.apply(e,this))}else this.setContext(e),this.renderChildren(e),this.clearContext(e);e.restore()}}setContext(e){}applyEffects(e){var r=Da.fromElement(this.document,this);r&&r.apply(e);var A=this.getStyle("clip-path",!1,!0);if(A.hasValue()){var n=A.getDefinition();n&&n.apply(e)}}clearContext(e){}renderChildren(e){this.children.forEach(r=>{r.render(e)})}addChild(e){var r=e instanceof or?e:this.document.createElement(e);r.parent=this,or.ignoreChildTypes.includes(r.type)||this.children.push(r)}matchesSelector(e){var r,{node:A}=this;if(typeof A.matches=="function")return A.matches(e);var n=(r=A.getAttribute)===null||r===void 0?void 0:r.call(A,"class");return!n||n===""?!1:n.split(" ").some(i=>".".concat(i)===e)}addStylesFromStyleDefinition(){var{styles:e,stylesSpecificity:r}=this.document;for(var A in e)if(!A.startsWith("@")&&this.matchesSelector(A)){var n=e[A],i=r[A];if(n)for(var s in n){var a=this.stylesSpecificity[s];typeof a>"u"&&(a="000"),i>=a&&(this.styles[s]=n[s],this.stylesSpecificity[s]=i)}}}removeStyles(e,r){var A=r.reduce((n,i)=>{var s=e.getStyle(i);if(!s.hasValue())return n;var a=s.getString();return s.setValue(""),[...n,[i,a]]},[]);return A}restoreStyles(e,r){r.forEach(A=>{var[n,i]=A;e.getStyle(n,!0).setValue(i)})}isFirstChild(){var e;return((e=this.parent)===null||e===void 0?void 0:e.children.indexOf(this))===0}}or.ignoreChildTypes=["title"];class YS extends or{constructor(e,r,A){super(e,r,A)}}function Zj(t){var e=t.trim();return/^('|")/.test(e)?e:'"'.concat(e,'"')}function eK(t){return typeof process>"u"?t:t.trim().split(",").map(Zj).join(",")}function tK(t){if(!t)return"";var e=t.trim().toLowerCase();switch(e){case"normal":case"italic":case"oblique":case"inherit":case"initial":case"unset":return e;default:return/^oblique\s+(-|)\d+deg$/.test(e)?e:""}}function rK(t){if(!t)return"";var e=t.trim().toLowerCase();switch(e){case"normal":case"bold":case"lighter":case"bolder":case"inherit":case"initial":case"unset":return e;default:return/^[\d.]+$/.test(e)?e:""}}class PA{constructor(e,r,A,n,i,s){var a=s?typeof s=="string"?PA.parse(s):s:{};this.fontFamily=i||a.fontFamily,this.fontSize=n||a.fontSize,this.fontStyle=e||a.fontStyle,this.fontWeight=A||a.fontWeight,this.fontVariant=r||a.fontVariant}static parse(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",r=arguments.length>1?arguments[1]:void 0,A="",n="",i="",s="",a="",o=Ds(e).trim().split(" "),l={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1};return o.forEach(c=>{switch(!0){case(!l.fontStyle&&PA.styles.includes(c)):c!=="inherit"&&(A=c),l.fontStyle=!0;break;case(!l.fontVariant&&PA.variants.includes(c)):c!=="inherit"&&(n=c),l.fontStyle=!0,l.fontVariant=!0;break;case(!l.fontWeight&&PA.weights.includes(c)):c!=="inherit"&&(i=c),l.fontStyle=!0,l.fontVariant=!0,l.fontWeight=!0;break;case!l.fontSize:c!=="inherit"&&([s]=c.split("/")),l.fontStyle=!0,l.fontVariant=!0,l.fontWeight=!0,l.fontSize=!0;break;default:c!=="inherit"&&(a+=c)}}),new PA(A,n,i,s,a,r)}toString(){return[tK(this.fontStyle),this.fontVariant,rK(this.fontWeight),this.fontSize,eK(this.fontFamily)].join(" ").trim()}}PA.styles="normal|italic|oblique|inherit",PA.variants="normal|small-caps|inherit",PA.weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit";class Mn{constructor(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Number.NaN,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.NaN,A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Number.NaN,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Number.NaN;this.x1=e,this.y1=r,this.x2=A,this.y2=n,this.addPoint(e,r),this.addPoint(A,n)}get x(){return this.x1}get y(){return this.y1}get width(){return this.x2-this.x1}get height(){return this.y2-this.y1}addPoint(e,r){typeof e<"u"&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=e,this.x2=e),e<this.x1&&(this.x1=e),e>this.x2&&(this.x2=e)),typeof r<"u"&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=r,this.y2=r),r<this.y1&&(this.y1=r),r>this.y2&&(this.y2=r))}addX(e){this.addPoint(e,null)}addY(e){this.addPoint(null,e)}addBoundingBox(e){if(e){var{x1:r,y1:A,x2:n,y2:i}=e;this.addPoint(r,A),this.addPoint(n,i)}}sumCubic(e,r,A,n,i){return Math.pow(1-e,3)*r+3*Math.pow(1-e,2)*e*A+3*(1-e)*Math.pow(e,2)*n+Math.pow(e,3)*i}bezierCurveAdd(e,r,A,n,i){var s=6*r-12*A+6*n,a=-3*r+9*A-9*n+3*i,o=3*A-3*r;if(a===0){if(s===0)return;var l=-o/s;0<l&&l<1&&(e?this.addX(this.sumCubic(l,r,A,n,i)):this.addY(this.sumCubic(l,r,A,n,i)));return}var c=Math.pow(s,2)-4*o*a;if(!(c<0)){var f=(-s+Math.sqrt(c))/(2*a);0<f&&f<1&&(e?this.addX(this.sumCubic(f,r,A,n,i)):this.addY(this.sumCubic(f,r,A,n,i)));var h=(-s-Math.sqrt(c))/(2*a);0<h&&h<1&&(e?this.addX(this.sumCubic(h,r,A,n,i)):this.addY(this.sumCubic(h,r,A,n,i)))}}addBezierCurve(e,r,A,n,i,s,a,o){this.addPoint(e,r),this.addPoint(a,o),this.bezierCurveAdd(!0,e,A,i,a),this.bezierCurveAdd(!1,r,n,s,o)}addQuadraticCurve(e,r,A,n,i,s){var a=e+.6666666666666666*(A-e),o=r+2/3*(n-r),l=a+1/3*(i-e),c=o+1/3*(s-r);this.addBezierCurve(e,r,a,l,o,c,i,s)}isPointInBox(e,r){var{x1:A,y1:n,x2:i,y2:s}=this;return A<=e&&e<=i&&n<=r&&r<=s}}class Qt extends ze{constructor(e){super(e.replace(/([+\-.])\s+/gm,"$1").replace(/[^MmZzLlHhVvCcSsQqTtAae\d\s.,+-].*/g,"")),this.control=null,this.start=null,this.current=null,this.command=null,this.commands=this.commands,this.i=-1,this.previousCommand=null,this.points=[],this.angles=[]}reset(){this.i=-1,this.command=null,this.previousCommand=null,this.start=new Fr(0,0),this.control=new Fr(0,0),this.current=new Fr(0,0),this.points=[],this.angles=[]}isEnd(){var{i:e,commands:r}=this;return e>=r.length-1}next(){var e=this.commands[++this.i];return this.previousCommand=this.command,this.command=e,e}getPoint(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"x",r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"y",A=new Fr(this.command[e],this.command[r]);return this.makeAbsolute(A)}getAsControlPoint(e,r){var A=this.getPoint(e,r);return this.control=A,A}getAsCurrentPoint(e,r){var A=this.getPoint(e,r);return this.current=A,A}getReflectedControlPoint(){var e=this.previousCommand.type;if(e!==ze.CURVE_TO&&e!==ze.SMOOTH_CURVE_TO&&e!==ze.QUAD_TO&&e!==ze.SMOOTH_QUAD_TO)return this.current;var{current:{x:r,y:A},control:{x:n,y:i}}=this,s=new Fr(2*r-n,2*A-i);return s}makeAbsolute(e){if(this.command.relative){var{x:r,y:A}=this.current;e.x+=r,e.y+=A}return e}addMarker(e,r,A){var{points:n,angles:i}=this;A&&i.length>0&&!i[i.length-1]&&(i[i.length-1]=n[n.length-1].angleTo(A)),this.addMarkerAngle(e,r?r.angleTo(e):null)}addMarkerAngle(e,r){this.points.push(e),this.angles.push(r)}getMarkerPoints(){return this.points}getMarkerAngles(){for(var{angles:e}=this,r=e.length,A=0;A<r;A++)if(!e[A]){for(var n=A+1;n<r;n++)if(e[n]){e[A]=e[n];break}}return e}}class Ha extends or{constructor(){super(...arguments),this.modifiedEmSizeStack=!1}calculateOpacity(){for(var e=1,r=this;r;){var A=r.getStyle("opacity",!1,!0);A.hasValue(!0)&&(e*=A.getNumber()),r=r.parent}return e}setContext(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!r){var A=this.getStyle("fill"),n=this.getStyle("fill-opacity"),i=this.getStyle("stroke"),s=this.getStyle("stroke-opacity");if(A.isUrlDefinition()){var a=A.getFillStyleDefinition(this,n);a&&(e.fillStyle=a)}else if(A.hasValue()){A.getString()==="currentColor"&&A.setValue(this.getStyle("color").getColor());var o=A.getColor();o!=="inherit"&&(e.fillStyle=o==="none"?"rgba(0,0,0,0)":o)}if(n.hasValue()){var l=new gt(this.document,"fill",e.fillStyle).addOpacity(n).getColor();e.fillStyle=l}if(i.isUrlDefinition()){var c=i.getFillStyleDefinition(this,s);c&&(e.strokeStyle=c)}else if(i.hasValue()){i.getString()==="currentColor"&&i.setValue(this.getStyle("color").getColor());var f=i.getString();f!=="inherit"&&(e.strokeStyle=f==="none"?"rgba(0,0,0,0)":f)}if(s.hasValue()){var h=new gt(this.document,"stroke",e.strokeStyle).addOpacity(s).getString();e.strokeStyle=h}var u=this.getStyle("stroke-width");if(u.hasValue()){var g=u.getPixels();e.lineWidth=g||Rs}var p=this.getStyle("stroke-linecap"),w=this.getStyle("stroke-linejoin"),m=this.getStyle("stroke-miterlimit"),B=this.getStyle("stroke-dasharray"),x=this.getStyle("stroke-dashoffset");if(p.hasValue()&&(e.lineCap=p.getString()),w.hasValue()&&(e.lineJoin=w.getString()),m.hasValue()&&(e.miterLimit=m.getNumber()),B.hasValue()&&B.getString()!=="none"){var E=ln(B.getString());typeof e.setLineDash<"u"?e.setLineDash(E):typeof e.webkitLineDash<"u"?e.webkitLineDash=E:typeof e.mozDash<"u"&&!(E.length===1&&E[0]===0)&&(e.mozDash=E);var k=x.getPixels();typeof e.lineDashOffset<"u"?e.lineDashOffset=k:typeof e.webkitLineDashOffset<"u"?e.webkitLineDashOffset=k:typeof e.mozDashOffset<"u"&&(e.mozDashOffset=k)}}if(this.modifiedEmSizeStack=!1,typeof e.font<"u"){var H=this.getStyle("font"),K=this.getStyle("font-style"),R=this.getStyle("font-variant"),I=this.getStyle("font-weight"),W=this.getStyle("font-size"),L=this.getStyle("font-family"),F=new PA(K.getString(),R.getString(),I.getString(),W.hasValue()?"".concat(W.getPixels(!0),"px"):"",L.getString(),PA.parse(H.getString(),e.font));K.setValue(F.fontStyle),R.setValue(F.fontVariant),I.setValue(F.fontWeight),W.setValue(F.fontSize),L.setValue(F.fontFamily),e.font=F.toString(),W.isPixels()&&(this.document.emSize=W.getPixels(),this.modifiedEmSizeStack=!0)}r||(this.applyEffects(e),e.globalAlpha=this.calculateOpacity())}clearContext(e){super.clearContext(e),this.modifiedEmSizeStack&&this.document.popEmSize()}}class Jt extends Ha{constructor(e,r,A){super(e,r,A),this.type="path",this.pathParser=null,this.pathParser=new Qt(this.getAttribute("d").getString())}path(e){var{pathParser:r}=this,A=new Mn;for(r.reset(),e&&e.beginPath();!r.isEnd();)switch(r.next().type){case Qt.MOVE_TO:this.pathM(e,A);break;case Qt.LINE_TO:this.pathL(e,A);break;case Qt.HORIZ_LINE_TO:this.pathH(e,A);break;case Qt.VERT_LINE_TO:this.pathV(e,A);break;case Qt.CURVE_TO:this.pathC(e,A);break;case Qt.SMOOTH_CURVE_TO:this.pathS(e,A);break;case Qt.QUAD_TO:this.pathQ(e,A);break;case Qt.SMOOTH_QUAD_TO:this.pathT(e,A);break;case Qt.ARC:this.pathA(e,A);break;case Qt.CLOSE_PATH:this.pathZ(e,A);break}return A}getBoundingBox(e){return this.path()}getMarkers(){var{pathParser:e}=this,r=e.getMarkerPoints(),A=e.getMarkerAngles(),n=r.map((i,s)=>[i,A[s]]);return n}renderChildren(e){this.path(e),this.document.screen.mouse.checkPath(this,e);var r=this.getStyle("fill-rule");e.fillStyle!==""&&(r.getString("inherit")!=="inherit"?e.fill(r.getString()):e.fill()),e.strokeStyle!==""&&(this.getAttribute("vector-effect").getString()==="non-scaling-stroke"?(e.save(),e.setTransform(1,0,0,1,0,0),e.stroke(),e.restore()):e.stroke());var A=this.getMarkers();if(A){var n=A.length-1,i=this.getStyle("marker-start"),s=this.getStyle("marker-mid"),a=this.getStyle("marker-end");if(i.isUrlDefinition()){var o=i.getDefinition(),[l,c]=A[0];o.render(e,l,c)}if(s.isUrlDefinition())for(var f=s.getDefinition(),h=1;h<n;h++){var[u,g]=A[h];f.render(e,u,g)}if(a.isUrlDefinition()){var p=a.getDefinition(),[w,m]=A[n];p.render(e,w,m)}}}static pathM(e){var r=e.getAsCurrentPoint();return e.start=e.current,{point:r}}pathM(e,r){var{pathParser:A}=this,{point:n}=Jt.pathM(A),{x:i,y:s}=n;A.addMarker(n),r.addPoint(i,s),e&&e.moveTo(i,s)}static pathL(e){var{current:r}=e,A=e.getAsCurrentPoint();return{current:r,point:A}}pathL(e,r){var{pathParser:A}=this,{current:n,point:i}=Jt.pathL(A),{x:s,y:a}=i;A.addMarker(i,n),r.addPoint(s,a),e&&e.lineTo(s,a)}static pathH(e){var{current:r,command:A}=e,n=new Fr((A.relative?r.x:0)+A.x,r.y);return e.current=n,{current:r,point:n}}pathH(e,r){var{pathParser:A}=this,{current:n,point:i}=Jt.pathH(A),{x:s,y:a}=i;A.addMarker(i,n),r.addPoint(s,a),e&&e.lineTo(s,a)}static pathV(e){var{current:r,command:A}=e,n=new Fr(r.x,(A.relative?r.y:0)+A.y);return e.current=n,{current:r,point:n}}pathV(e,r){var{pathParser:A}=this,{current:n,point:i}=Jt.pathV(A),{x:s,y:a}=i;A.addMarker(i,n),r.addPoint(s,a),e&&e.lineTo(s,a)}static pathC(e){var{current:r}=e,A=e.getPoint("x1","y1"),n=e.getAsControlPoint("x2","y2"),i=e.getAsCurrentPoint();return{current:r,point:A,controlPoint:n,currentPoint:i}}pathC(e,r){var{pathParser:A}=this,{current:n,point:i,controlPoint:s,currentPoint:a}=Jt.pathC(A);A.addMarker(a,s,i),r.addBezierCurve(n.x,n.y,i.x,i.y,s.x,s.y,a.x,a.y),e&&e.bezierCurveTo(i.x,i.y,s.x,s.y,a.x,a.y)}static pathS(e){var{current:r}=e,A=e.getReflectedControlPoint(),n=e.getAsControlPoint("x2","y2"),i=e.getAsCurrentPoint();return{current:r,point:A,controlPoint:n,currentPoint:i}}pathS(e,r){var{pathParser:A}=this,{current:n,point:i,controlPoint:s,currentPoint:a}=Jt.pathS(A);A.addMarker(a,s,i),r.addBezierCurve(n.x,n.y,i.x,i.y,s.x,s.y,a.x,a.y),e&&e.bezierCurveTo(i.x,i.y,s.x,s.y,a.x,a.y)}static pathQ(e){var{current:r}=e,A=e.getAsControlPoint("x1","y1"),n=e.getAsCurrentPoint();return{current:r,controlPoint:A,currentPoint:n}}pathQ(e,r){var{pathParser:A}=this,{current:n,controlPoint:i,currentPoint:s}=Jt.pathQ(A);A.addMarker(s,i,i),r.addQuadraticCurve(n.x,n.y,i.x,i.y,s.x,s.y),e&&e.quadraticCurveTo(i.x,i.y,s.x,s.y)}static pathT(e){var{current:r}=e,A=e.getReflectedControlPoint();e.control=A;var n=e.getAsCurrentPoint();return{current:r,controlPoint:A,currentPoint:n}}pathT(e,r){var{pathParser:A}=this,{current:n,controlPoint:i,currentPoint:s}=Jt.pathT(A);A.addMarker(s,i,i),r.addQuadraticCurve(n.x,n.y,i.x,i.y,s.x,s.y),e&&e.quadraticCurveTo(i.x,i.y,s.x,s.y)}static pathA(e){var{current:r,command:A}=e,{rX:n,rY:i,xRot:s,lArcFlag:a,sweepFlag:o}=A,l=s*(Math.PI/180),c=e.getAsCurrentPoint(),f=new Fr(Math.cos(l)*(r.x-c.x)/2+Math.sin(l)*(r.y-c.y)/2,-Math.sin(l)*(r.x-c.x)/2+Math.cos(l)*(r.y-c.y)/2),h=Math.pow(f.x,2)/Math.pow(n,2)+Math.pow(f.y,2)/Math.pow(i,2);h>1&&(n*=Math.sqrt(h),i*=Math.sqrt(h));var u=(a===o?-1:1)*Math.sqrt((Math.pow(n,2)*Math.pow(i,2)-Math.pow(n,2)*Math.pow(f.y,2)-Math.pow(i,2)*Math.pow(f.x,2))/(Math.pow(n,2)*Math.pow(f.y,2)+Math.pow(i,2)*Math.pow(f.x,2)));isNaN(u)&&(u=0);var g=new Fr(u*n*f.y/i,u*-i*f.x/n),p=new Fr((r.x+c.x)/2+Math.cos(l)*g.x-Math.sin(l)*g.y,(r.y+c.y)/2+Math.sin(l)*g.x+Math.cos(l)*g.y),w=dv([1,0],[(f.x-g.x)/n,(f.y-g.y)/i]),m=[(f.x-g.x)/n,(f.y-g.y)/i],B=[(-f.x-g.x)/n,(-f.y-g.y)/i],x=dv(m,B);return sh(m,B)<=-1&&(x=Math.PI),sh(m,B)>=1&&(x=0),{currentPoint:c,rX:n,rY:i,sweepFlag:o,xAxisRotation:l,centp:p,a1:w,ad:x}}pathA(e,r){var{pathParser:A}=this,{currentPoint:n,rX:i,rY:s,sweepFlag:a,xAxisRotation:o,centp:l,a1:c,ad:f}=Jt.pathA(A),h=1-a?1:-1,u=c+h*(f/2),g=new Fr(l.x+i*Math.cos(u),l.y+s*Math.sin(u));if(A.addMarkerAngle(g,u-h*Math.PI/2),A.addMarkerAngle(n,u-h*Math.PI),r.addPoint(n.x,n.y),e&&!isNaN(c)&&!isNaN(f)){var p=i>s?i:s,w=i>s?1:i/s,m=i>s?s/i:1;e.translate(l.x,l.y),e.rotate(o),e.scale(w,m),e.arc(0,0,p,c,c+f,!!(1-a)),e.scale(1/w,1/m),e.rotate(-o),e.translate(-l.x,-l.y)}}static pathZ(e){e.current=e.start}pathZ(e,r){Jt.pathZ(this.pathParser),e&&r.x1!==r.x2&&r.y1!==r.y2&&e.closePath()}}class xv extends Jt{constructor(e,r,A){super(e,r,A),this.type="glyph",this.horizAdvX=this.getAttribute("horiz-adv-x").getNumber(),this.unicode=this.getAttribute("unicode").getString(),this.arabicForm=this.getAttribute("arabic-form").getString()}}class zi extends Ha{constructor(e,r,A){super(e,r,new.target===zi?!0:A),this.type="text",this.x=0,this.y=0,this.measureCache=-1}setContext(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;super.setContext(e,r);var A=this.getStyle("dominant-baseline").getTextBaseline()||this.getStyle("alignment-baseline").getTextBaseline();A&&(e.textBaseline=A)}initializeCoordinates(){this.x=0,this.y=0,this.leafTexts=[],this.textChunkStart=0,this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY}getBoundingBox(e){if(this.type!=="text")return this.getTElementBoundingBox(e);this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(e);var r=null;return this.children.forEach((A,n)=>{var i=this.getChildBoundingBox(e,this,this,n);r?r.addBoundingBox(i):r=i}),r}getFontSize(){var{document:e,parent:r}=this,A=PA.parse(e.ctx.font).fontSize,n=r.getStyle("font-size").getNumber(A);return n}getTElementBoundingBox(e){var r=this.getFontSize();return new Mn(this.x,this.y-r,this.x+this.measureText(e),this.y)}getGlyph(e,r,A){var n=r[A],i=null;if(e.isArabic){var s=r.length,a=r[A-1],o=r[A+1],l="isolated";if((A===0||a===" ")&&A<s-1&&o!==" "&&(l="terminal"),A>0&&a!==" "&&A<s-1&&o!==" "&&(l="medial"),A>0&&a!==" "&&(A===s-1||o===" ")&&(l="initial"),typeof e.glyphs[n]<"u"){var c=e.glyphs[n];i=c instanceof xv?c:c[l]}}else i=e.glyphs[n];return i||(i=e.missingGlyph),i}getText(){return""}getTextFromNode(e){var r=e||this.node,A=Array.from(r.parentNode.childNodes),n=A.indexOf(r),i=A.length-1,s=Ds(r.textContent||"");return n===0&&(s=OS(s)),n===i&&(s=PS(s)),s}renderChildren(e){if(this.type!=="text"){this.renderTElementChildren(e);return}this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(e),this.children.forEach((A,n)=>{this.renderChild(e,this,this,n)});var{mouse:r}=this.document.screen;r.isWorking()&&r.checkBoundingBox(this,this.getBoundingBox(e))}renderTElementChildren(e){var{document:r,parent:A}=this,n=this.getText(),i=A.getStyle("font-family").getDefinition();if(i){for(var{unitsPerEm:s}=i.fontFace,a=PA.parse(r.ctx.font),o=A.getStyle("font-size").getNumber(a.fontSize),l=A.getStyle("font-style").getString(a.fontStyle),c=o/s,f=i.isRTL?n.split("").reverse().join(""):n,h=ln(A.getAttribute("dx").getString()),u=f.length,g=0;g<u;g++){var p=this.getGlyph(i,f,g);e.translate(this.x,this.y),e.scale(c,-c);var w=e.lineWidth;e.lineWidth=e.lineWidth*s/o,l==="italic"&&e.transform(1,0,.4,1,0,0),p.render(e),l==="italic"&&e.transform(1,0,-.4,1,0,0),e.lineWidth=w,e.scale(1/c,-1/c),e.translate(-this.x,-this.y),this.x+=o*(p.horizAdvX||i.horizAdvX)/s,typeof h[g]<"u"&&!isNaN(h[g])&&(this.x+=h[g])}return}var{x:m,y:B}=this;e.fillStyle&&e.fillText(n,m,B),e.strokeStyle&&e.strokeText(n,m,B)}applyAnchoring(){if(!(this.textChunkStart>=this.leafTexts.length)){var e=this.leafTexts[this.textChunkStart],r=e.getStyle("text-anchor").getString("start"),A=!1,n=0;r==="start"&&!A||r==="end"&&A?n=e.x-this.minX:r==="end"&&!A||r==="start"&&A?n=e.x-this.maxX:n=e.x-(this.minX+this.maxX)/2;for(var i=this.textChunkStart;i<this.leafTexts.length;i++)this.leafTexts[i].x+=n;this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY,this.textChunkStart=this.leafTexts.length}}adjustChildCoordinatesRecursive(e){this.children.forEach((r,A)=>{this.adjustChildCoordinatesRecursiveCore(e,this,this,A)}),this.applyAnchoring()}adjustChildCoordinatesRecursiveCore(e,r,A,n){var i=A.children[n];i.children.length>0?i.children.forEach((s,a)=>{r.adjustChildCoordinatesRecursiveCore(e,r,i,a)}):this.adjustChildCoordinates(e,r,A,n)}adjustChildCoordinates(e,r,A,n){var i=A.children[n];if(typeof i.measureText!="function")return i;e.save(),i.setContext(e,!0);var s=i.getAttribute("x"),a=i.getAttribute("y"),o=i.getAttribute("dx"),l=i.getAttribute("dy"),c=i.getStyle("font-family").getDefinition(),f=!!c&&c.isRTL;n===0&&(s.hasValue()||s.setValue(i.getInheritedAttribute("x")),a.hasValue()||a.setValue(i.getInheritedAttribute("y")),o.hasValue()||o.setValue(i.getInheritedAttribute("dx")),l.hasValue()||l.setValue(i.getInheritedAttribute("dy")));var h=i.measureText(e);return f&&(r.x-=h),s.hasValue()?(r.applyAnchoring(),i.x=s.getPixels("x"),o.hasValue()&&(i.x+=o.getPixels("x"))):(o.hasValue()&&(r.x+=o.getPixels("x")),i.x=r.x),r.x=i.x,f||(r.x+=h),a.hasValue()?(i.y=a.getPixels("y"),l.hasValue()&&(i.y+=l.getPixels("y"))):(l.hasValue()&&(r.y+=l.getPixels("y")),i.y=r.y),r.y=i.y,r.leafTexts.push(i),r.minX=Math.min(r.minX,i.x,i.x+h),r.maxX=Math.max(r.maxX,i.x,i.x+h),i.clearContext(e),e.restore(),i}getChildBoundingBox(e,r,A,n){var i=A.children[n];if(typeof i.getBoundingBox!="function")return null;var s=i.getBoundingBox(e);return s?(i.children.forEach((a,o)=>{var l=r.getChildBoundingBox(e,r,i,o);s.addBoundingBox(l)}),s):null}renderChild(e,r,A,n){var i=A.children[n];i.render(e),i.children.forEach((s,a)=>{r.renderChild(e,r,i,a)})}measureText(e){var{measureCache:r}=this;if(~r)return r;var A=this.getText(),n=this.measureTargetText(e,A);return this.measureCache=n,n}measureTargetText(e,r){if(!r.length)return 0;var{parent:A}=this,n=A.getStyle("font-family").getDefinition();if(n){for(var i=this.getFontSize(),s=n.isRTL?r.split("").reverse().join(""):r,a=ln(A.getAttribute("dx").getString()),o=s.length,l=0,c=0;c<o;c++){var f=this.getGlyph(n,s,c);l+=(f.horizAdvX||n.horizAdvX)*i/n.fontFace.unitsPerEm,typeof a[c]<"u"&&!isNaN(a[c])&&(l+=a[c])}return l}if(!e.measureText)return r.length*10;e.save(),this.setContext(e,!0);var{width:h}=e.measureText(r);return this.clearContext(e),e.restore(),h}getInheritedAttribute(e){for(var r=this;r instanceof zi&&r.isFirstChild();){var A=r.parent.getAttribute(e);if(A.hasValue(!0))return A.getValue("0");r=r.parent}return null}}class xc extends zi{constructor(e,r,A){super(e,r,new.target===xc?!0:A),this.type="tspan",this.text=this.children.length>0?"":this.getTextFromNode()}getText(){return this.text}}class AK extends xc{constructor(){super(...arguments),this.type="textNode"}}class tl extends Ha{constructor(){super(...arguments),this.type="svg",this.root=!1}setContext(e){var r,{document:A}=this,{screen:n,window:i}=A,s=e.canvas;if(n.setDefaults(e),s.style&&typeof e.font<"u"&&i&&typeof i.getComputedStyle<"u"){e.font=i.getComputedStyle(s).getPropertyValue("font");var a=new gt(A,"fontSize",PA.parse(e.font).fontSize);a.hasValue()&&(A.rootEmSize=a.getPixels("y"),A.emSize=A.rootEmSize)}this.getAttribute("x").hasValue()||this.getAttribute("x",!0).setValue(0),this.getAttribute("y").hasValue()||this.getAttribute("y",!0).setValue(0);var{width:o,height:l}=n.viewPort;this.getStyle("width").hasValue()||this.getStyle("width",!0).setValue("100%"),this.getStyle("height").hasValue()||this.getStyle("height",!0).setValue("100%"),this.getStyle("color").hasValue()||this.getStyle("color",!0).setValue("black");var c=this.getAttribute("refX"),f=this.getAttribute("refY"),h=this.getAttribute("viewBox"),u=h.hasValue()?ln(h.getString()):null,g=!this.root&&this.getStyle("overflow").getValue("hidden")!=="visible",p=0,w=0,m=0,B=0;u&&(p=u[0],w=u[1]),this.root||(o=this.getStyle("width").getPixels("x"),l=this.getStyle("height").getPixels("y"),this.type==="marker"&&(m=p,B=w,p=0,w=0)),n.viewPort.setCurrent(o,l),this.node&&(!this.parent||((r=this.node.parentNode)===null||r===void 0?void 0:r.nodeName)==="foreignObject")&&this.getStyle("transform",!1,!0).hasValue()&&!this.getStyle("transform-origin",!1,!0).hasValue()&&this.getStyle("transform-origin",!0,!0).setValue("50% 50%"),super.setContext(e),e.translate(this.getAttribute("x").getPixels("x"),this.getAttribute("y").getPixels("y")),u&&(o=u[2],l=u[3]),A.setViewBox({ctx:e,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:n.viewPort.width,desiredWidth:o,height:n.viewPort.height,desiredHeight:l,minX:p,minY:w,refX:c.getValue(),refY:f.getValue(),clip:g,clipX:m,clipY:B}),u&&(n.viewPort.removeCurrent(),n.viewPort.setCurrent(o,l))}clearContext(e){super.clearContext(e),this.document.screen.viewPort.removeCurrent()}resize(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e,A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=this.getAttribute("width",!0),i=this.getAttribute("height",!0),s=this.getAttribute("viewBox"),a=this.getAttribute("style"),o=n.getNumber(0),l=i.getNumber(0);if(A)if(typeof A=="string")this.getAttribute("preserveAspectRatio",!0).setValue(A);else{var c=this.getAttribute("preserveAspectRatio");c.hasValue()&&c.setValue(c.getString().replace(/^\s*(\S.*\S)\s*$/,"$1"))}if(n.setValue(e),i.setValue(r),s.hasValue()||s.setValue("0 0 ".concat(o||e," ").concat(l||r)),a.hasValue()){var f=this.getStyle("width"),h=this.getStyle("height");f.hasValue()&&f.setValue("".concat(e,"px")),h.hasValue()&&h.setValue("".concat(r,"px"))}}}class Ev extends Jt{constructor(){super(...arguments),this.type="rect"}path(e){var r=this.getAttribute("x").getPixels("x"),A=this.getAttribute("y").getPixels("y"),n=this.getStyle("width",!1,!0).getPixels("x"),i=this.getStyle("height",!1,!0).getPixels("y"),s=this.getAttribute("rx"),a=this.getAttribute("ry"),o=s.getPixels("x"),l=a.getPixels("y");if(s.hasValue()&&!a.hasValue()&&(l=o),a.hasValue()&&!s.hasValue()&&(o=l),o=Math.min(o,n/2),l=Math.min(l,i/2),e){var c=4*((Math.sqrt(2)-1)/3);e.beginPath(),i>0&&n>0&&(e.moveTo(r+o,A),e.lineTo(r+n-o,A),e.bezierCurveTo(r+n-o+c*o,A,r+n,A+l-c*l,r+n,A+l),e.lineTo(r+n,A+i-l),e.bezierCurveTo(r+n,A+i-l+c*l,r+n-o+c*o,A+i,r+n-o,A+i),e.lineTo(r+o,A+i),e.bezierCurveTo(r+o-c*o,A+i,r,A+i-l+c*l,r,A+i-l),e.lineTo(r,A+l),e.bezierCurveTo(r,A+l-c*l,r+o-c*o,A,r+o,A),e.closePath())}return new Mn(r,A,r+n,A+i)}getMarkers(){return null}}class XS extends Jt{constructor(){super(...arguments),this.type="circle"}path(e){var r=this.getAttribute("cx").getPixels("x"),A=this.getAttribute("cy").getPixels("y"),n=this.getAttribute("r").getPixels();return e&&n>0&&(e.beginPath(),e.arc(r,A,n,0,Math.PI*2,!1),e.closePath()),new Mn(r-n,A-n,r+n,A+n)}getMarkers(){return null}}class JS extends Jt{constructor(){super(...arguments),this.type="ellipse"}path(e){var r=4*((Math.sqrt(2)-1)/3),A=this.getAttribute("rx").getPixels("x"),n=this.getAttribute("ry").getPixels("y"),i=this.getAttribute("cx").getPixels("x"),s=this.getAttribute("cy").getPixels("y");return e&&A>0&&n>0&&(e.beginPath(),e.moveTo(i+A,s),e.bezierCurveTo(i+A,s+r*n,i+r*A,s+n,i,s+n),e.bezierCurveTo(i-r*A,s+n,i-A,s+r*n,i-A,s),e.bezierCurveTo(i-A,s-r*n,i-r*A,s-n,i,s-n),e.bezierCurveTo(i+r*A,s-n,i+A,s-r*n,i+A,s),e.closePath()),new Mn(i-A,s-n,i+A,s+n)}getMarkers(){return null}}class ZS extends Jt{constructor(){super(...arguments),this.type="line"}getPoints(){return[new Fr(this.getAttribute("x1").getPixels("x"),this.getAttribute("y1").getPixels("y")),new Fr(this.getAttribute("x2").getPixels("x"),this.getAttribute("y2").getPixels("y"))]}path(e){var[{x:r,y:A},{x:n,y:i}]=this.getPoints();return e&&(e.beginPath(),e.moveTo(r,A),e.lineTo(n,i)),new Mn(r,A,n,i)}getMarkers(){var[e,r]=this.getPoints(),A=e.angleTo(r);return[[e,A],[r,A]]}}class Sv extends Jt{constructor(e,r,A){super(e,r,A),this.type="polyline",this.points=[],this.points=Fr.parsePath(this.getAttribute("points").getString())}path(e){var{points:r}=this,[{x:A,y:n}]=r,i=new Mn(A,n);return e&&(e.beginPath(),e.moveTo(A,n)),r.forEach(s=>{var{x:a,y:o}=s;i.addPoint(a,o),e&&e.lineTo(a,o)}),i}getMarkers(){var{points:e}=this,r=e.length-1,A=[];return e.forEach((n,i)=>{i!==r&&A.push([n,n.angleTo(e[i+1])])}),A.length>0&&A.push([e[e.length-1],A[A.length-1][1]]),A}}class eF extends Sv{constructor(){super(...arguments),this.type="polygon"}path(e){var r=super.path(e),[{x:A,y:n}]=this.points;return e&&(e.lineTo(A,n),e.closePath()),r}}class tF extends or{constructor(){super(...arguments),this.type="pattern"}createPattern(e,r,A){var n=this.getStyle("width").getPixels("x",!0),i=this.getStyle("height").getPixels("y",!0),s=new tl(this.document,null);s.attributes.viewBox=new gt(this.document,"viewBox",this.getAttribute("viewBox").getValue()),s.attributes.width=new gt(this.document,"width","".concat(n,"px")),s.attributes.height=new gt(this.document,"height","".concat(i,"px")),s.attributes.transform=new gt(this.document,"transform",this.getAttribute("patternTransform").getValue()),s.children=this.children;var a=this.document.createCanvas(n,i),o=a.getContext("2d"),l=this.getAttribute("x"),c=this.getAttribute("y");l.hasValue()&&c.hasValue()&&o.translate(l.getPixels("x",!0),c.getPixels("y",!0)),A.hasValue()?this.styles["fill-opacity"]=A:Reflect.deleteProperty(this.styles,"fill-opacity");for(var f=-1;f<=1;f++)for(var h=-1;h<=1;h++)o.save(),s.attributes.x=new gt(this.document,"x",f*a.width),s.attributes.y=new gt(this.document,"y",h*a.height),s.render(o),o.restore();var u=e.createPattern(a,"repeat");return u}}class rF extends or{constructor(){super(...arguments),this.type="marker"}render(e,r,A){if(r){var{x:n,y:i}=r,s=this.getAttribute("orient").getString("auto"),a=this.getAttribute("markerUnits").getString("strokeWidth");e.translate(n,i),s==="auto"&&e.rotate(A),a==="strokeWidth"&&e.scale(e.lineWidth,e.lineWidth),e.save();var o=new tl(this.document,null);o.type=this.type,o.attributes.viewBox=new gt(this.document,"viewBox",this.getAttribute("viewBox").getValue()),o.attributes.refX=new gt(this.document,"refX",this.getAttribute("refX").getValue()),o.attributes.refY=new gt(this.document,"refY",this.getAttribute("refY").getValue()),o.attributes.width=new gt(this.document,"width",this.getAttribute("markerWidth").getValue()),o.attributes.height=new gt(this.document,"height",this.getAttribute("markerHeight").getValue()),o.attributes.overflow=new gt(this.document,"overflow",this.getAttribute("overflow").getValue()),o.attributes.fill=new gt(this.document,"fill",this.getAttribute("fill").getColor("black")),o.attributes.stroke=new gt(this.document,"stroke",this.getAttribute("stroke").getValue("none")),o.children=this.children,o.render(e),e.restore(),a==="strokeWidth"&&e.scale(1/e.lineWidth,1/e.lineWidth),s==="auto"&&e.rotate(-A),e.translate(-n,-i)}}}class AF extends or{constructor(){super(...arguments),this.type="defs"}render(){}}class lh extends Ha{constructor(){super(...arguments),this.type="g"}getBoundingBox(e){var r=new Mn;return this.children.forEach(A=>{r.addBoundingBox(A.getBoundingBox(e))}),r}}class Fv extends or{constructor(e,r,A){super(e,r,A),this.attributesToInherit=["gradientUnits"],this.stops=[];var{stops:n,children:i}=this;i.forEach(s=>{s.type==="stop"&&n.push(s)})}getGradientUnits(){return this.getAttribute("gradientUnits").getString("objectBoundingBox")}createGradient(e,r,A){var n=this;this.getHrefAttribute().hasValue()&&(n=this.getHrefAttribute().getDefinition(),this.inheritStopContainer(n));var{stops:i}=n,s=this.getGradient(e,r);if(!s)return this.addParentOpacity(A,i[i.length-1].color);if(i.forEach(w=>{s.addColorStop(w.offset,this.addParentOpacity(A,w.color))}),this.getAttribute("gradientTransform").hasValue()){var{document:a}=this,{MAX_VIRTUAL_PIXELS:o,viewPort:l}=a.screen,[c]=l.viewPorts,f=new Ev(a,null);f.attributes.x=new gt(a,"x",-o/3),f.attributes.y=new gt(a,"y",-o/3),f.attributes.width=new gt(a,"width",o),f.attributes.height=new gt(a,"height",o);var h=new lh(a,null);h.attributes.transform=new gt(a,"transform",this.getAttribute("gradientTransform").getValue()),h.children=[f];var u=new tl(a,null);u.attributes.x=new gt(a,"x",0),u.attributes.y=new gt(a,"y",0),u.attributes.width=new gt(a,"width",c.width),u.attributes.height=new gt(a,"height",c.height),u.children=[h];var g=a.createCanvas(c.width,c.height),p=g.getContext("2d");return p.fillStyle=s,u.render(p),p.createPattern(g,"no-repeat")}return s}inheritStopContainer(e){this.attributesToInherit.forEach(r=>{!this.getAttribute(r).hasValue()&&e.getAttribute(r).hasValue()&&this.getAttribute(r,!0).setValue(e.getAttribute(r).getValue())})}addParentOpacity(e,r){if(e.hasValue()){var A=new gt(this.document,"color",r);return A.addOpacity(e).getColor()}return r}}class nF extends Fv{constructor(e,r,A){super(e,r,A),this.type="linearGradient",this.attributesToInherit.push("x1","y1","x2","y2")}getGradient(e,r){var A=this.getGradientUnits()==="objectBoundingBox",n=A?r.getBoundingBox(e):null;if(A&&!n)return null;!this.getAttribute("x1").hasValue()&&!this.getAttribute("y1").hasValue()&&!this.getAttribute("x2").hasValue()&&!this.getAttribute("y2").hasValue()&&(this.getAttribute("x1",!0).setValue(0),this.getAttribute("y1",!0).setValue(0),this.getAttribute("x2",!0).setValue(1),this.getAttribute("y2",!0).setValue(0));var i=A?n.x+n.width*this.getAttribute("x1").getNumber():this.getAttribute("x1").getPixels("x"),s=A?n.y+n.height*this.getAttribute("y1").getNumber():this.getAttribute("y1").getPixels("y"),a=A?n.x+n.width*this.getAttribute("x2").getNumber():this.getAttribute("x2").getPixels("x"),o=A?n.y+n.height*this.getAttribute("y2").getNumber():this.getAttribute("y2").getPixels("y");return i===a&&s===o?null:e.createLinearGradient(i,s,a,o)}}class iF extends Fv{constructor(e,r,A){super(e,r,A),this.type="radialGradient",this.attributesToInherit.push("cx","cy","r","fx","fy","fr")}getGradient(e,r){var A=this.getGradientUnits()==="objectBoundingBox",n=r.getBoundingBox(e);if(A&&!n)return null;this.getAttribute("cx").hasValue()||this.getAttribute("cx",!0).setValue("50%"),this.getAttribute("cy").hasValue()||this.getAttribute("cy",!0).setValue("50%"),this.getAttribute("r").hasValue()||this.getAttribute("r",!0).setValue("50%");var i=A?n.x+n.width*this.getAttribute("cx").getNumber():this.getAttribute("cx").getPixels("x"),s=A?n.y+n.height*this.getAttribute("cy").getNumber():this.getAttribute("cy").getPixels("y"),a=i,o=s;this.getAttribute("fx").hasValue()&&(a=A?n.x+n.width*this.getAttribute("fx").getNumber():this.getAttribute("fx").getPixels("x")),this.getAttribute("fy").hasValue()&&(o=A?n.y+n.height*this.getAttribute("fy").getNumber():this.getAttribute("fy").getPixels("y"));var l=A?(n.width+n.height)/2*this.getAttribute("r").getNumber():this.getAttribute("r").getPixels(),c=this.getAttribute("fr").getPixels();return e.createRadialGradient(a,o,c,i,s,l)}}class aF extends or{constructor(e,r,A){super(e,r,A),this.type="stop";var n=Math.max(0,Math.min(1,this.getAttribute("offset").getNumber())),i=this.getStyle("stop-opacity"),s=this.getStyle("stop-color",!0);s.getString()===""&&s.setValue("#000"),i.hasValue()&&(s=s.addOpacity(i)),this.offset=n,this.color=s.getColor()}}class ch extends or{constructor(e,r,A){super(e,r,A),this.type="animate",this.duration=0,this.initialValue=null,this.initialUnits="",this.removed=!1,this.frozen=!1,e.screen.animations.push(this),this.begin=this.getAttribute("begin").getMilliseconds(),this.maxDuration=this.begin+this.getAttribute("dur").getMilliseconds(),this.from=this.getAttribute("from"),this.to=this.getAttribute("to"),this.values=new gt(e,"values",null);var n=this.getAttribute("values");n.hasValue()&&this.values.setValue(n.getString().split(";"))}getProperty(){var e=this.getAttribute("attributeType").getString(),r=this.getAttribute("attributeName").getString();return e==="CSS"?this.parent.getStyle(r,!0):this.parent.getAttribute(r,!0)}calcValue(){var{initialUnits:e}=this,{progress:r,from:A,to:n}=this.getProgress(),i=A.getNumber()+(n.getNumber()-A.getNumber())*r;return e==="%"&&(i*=100),"".concat(i).concat(e)}update(e){var{parent:r}=this,A=this.getProperty();if(this.initialValue||(this.initialValue=A.getString(),this.initialUnits=A.getUnits()),this.duration>this.maxDuration){var n=this.getAttribute("fill").getString("remove");if(this.getAttribute("repeatCount").getString()==="indefinite"||this.getAttribute("repeatDur").getString()==="indefinite")this.duration=0;else if(n==="freeze"&&!this.frozen)this.frozen=!0,r.animationFrozen=!0,r.animationFrozenValue=A.getString();else if(n==="remove"&&!this.removed)return this.removed=!0,A.setValue(r.animationFrozen?r.animationFrozenValue:this.initialValue),!0;return!1}this.duration+=e;var i=!1;if(this.begin<this.duration){var s=this.calcValue(),a=this.getAttribute("type");if(a.hasValue()){var o=a.getString();s="".concat(o,"(").concat(s,")")}A.setValue(s),i=!0}return i}getProgress(){var{document:e,values:r}=this,A={progress:(this.duration-this.begin)/(this.maxDuration-this.begin)};if(r.hasValue()){var n=A.progress*(r.getValue().length-1),i=Math.floor(n),s=Math.ceil(n);A.from=new gt(e,"from",parseFloat(r.getValue()[i])),A.to=new gt(e,"to",parseFloat(r.getValue()[s])),A.progress=(n-i)/(s-i)}else A.from=this.from,A.to=this.to;return A}}class sF extends ch{constructor(){super(...arguments),this.type="animateColor"}calcValue(){var{progress:e,from:r,to:A}=this.getProgress(),n=new ov(r.getColor()),i=new ov(A.getColor());if(n.ok&&i.ok){var s=n.r+(i.r-n.r)*e,a=n.g+(i.g-n.g)*e,o=n.b+(i.b-n.b)*e;return"rgb(".concat(Math.floor(s),", ").concat(Math.floor(a),", ").concat(Math.floor(o),")")}return this.getAttribute("from").getColor()}}class oF extends ch{constructor(){super(...arguments),this.type="animateTransform"}calcValue(){var{progress:e,from:r,to:A}=this.getProgress(),n=ln(r.getString()),i=ln(A.getString()),s=n.map((a,o)=>{var l=i[o];return a+(l-a)*e}).join(" ");return s}}class lF extends or{constructor(e,r,A){super(e,r,A),this.type="font",this.glyphs=Object.create(null),this.horizAdvX=this.getAttribute("horiz-adv-x").getNumber();var{definitions:n}=e,{children:i}=this;for(var s of i)switch(s.type){case"font-face":{this.fontFace=s;var a=s.getStyle("font-family");a.hasValue()&&(n[a.getString()]=this);break}case"missing-glyph":this.missingGlyph=s;break;case"glyph":{var o=s;o.arabicForm?(this.isRTL=!0,this.isArabic=!0,typeof this.glyphs[o.unicode]>"u"&&(this.glyphs[o.unicode]=Object.create(null)),this.glyphs[o.unicode][o.arabicForm]=o):this.glyphs[o.unicode]=o;break}}}render(){}}class cF extends or{constructor(e,r,A){super(e,r,A),this.type="font-face",this.ascent=this.getAttribute("ascent").getNumber(),this.descent=this.getAttribute("descent").getNumber(),this.unitsPerEm=this.getAttribute("units-per-em").getNumber()}}class uF extends Jt{constructor(){super(...arguments),this.type="missing-glyph",this.horizAdvX=0}}class fF extends zi{constructor(){super(...arguments),this.type="tref"}getText(){var e=this.getHrefAttribute().getDefinition();if(e){var r=e.children[0];if(r)return r.getText()}return""}}class hF extends zi{constructor(e,r,A){super(e,r,A),this.type="a";var{childNodes:n}=r,i=n[0],s=n.length>0&&Array.from(n).every(a=>a.nodeType===3);this.hasText=s,this.text=s?this.getTextFromNode(i):""}getText(){return this.text}renderChildren(e){if(this.hasText){super.renderChildren(e);var{document:r,x:A,y:n}=this,{mouse:i}=r.screen,s=new gt(r,"fontSize",PA.parse(r.ctx.font).fontSize);i.isWorking()&&i.checkBoundingBox(this,new Mn(A,n-s.getPixels("y"),A+this.measureText(e),n))}else if(this.children.length>0){var a=new lh(this.document,null);a.children=this.children,a.parent=this,a.render(e)}}onClick(){var{window:e}=this.document;e&&e.open(this.getHrefAttribute().getString())}onMouseMove(){var e=this.document.ctx;e.canvas.style.cursor="pointer"}}function dF(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(t);e&&(A=A.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,A)}return r}function uh(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?dF(Object(r),!0).forEach(function(A){ev(t,A,r[A])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):dF(Object(r)).forEach(function(A){Object.defineProperty(t,A,Object.getOwnPropertyDescriptor(r,A))})}return t}class pF extends zi{constructor(e,r,A){super(e,r,A),this.type="textPath",this.textWidth=0,this.textHeight=0,this.pathLength=-1,this.glyphInfo=null,this.letterSpacingCache=[],this.measuresCache=new Map([["",0]]);var n=this.getHrefAttribute().getDefinition();this.text=this.getTextFromNode(),this.dataArray=this.parsePathData(n)}getText(){return this.text}path(e){var{dataArray:r}=this;e&&e.beginPath(),r.forEach(A=>{var{type:n,points:i}=A;switch(n){case Qt.LINE_TO:e&&e.lineTo(i[0],i[1]);break;case Qt.MOVE_TO:e&&e.moveTo(i[0],i[1]);break;case Qt.CURVE_TO:e&&e.bezierCurveTo(i[0],i[1],i[2],i[3],i[4],i[5]);break;case Qt.QUAD_TO:e&&e.quadraticCurveTo(i[0],i[1],i[2],i[3]);break;case Qt.ARC:{var[s,a,o,l,c,f,h,u]=i,g=o>l?o:l,p=o>l?1:o/l,w=o>l?l/o:1;e&&(e.translate(s,a),e.rotate(h),e.scale(p,w),e.arc(0,0,g,c,c+f,!!(1-u)),e.scale(1/p,1/w),e.rotate(-h),e.translate(-s,-a));break}case Qt.CLOSE_PATH:e&&e.closePath();break}})}renderChildren(e){this.setTextData(e),e.save();var r=this.parent.getStyle("text-decoration").getString(),A=this.getFontSize(),{glyphInfo:n}=this,i=e.fillStyle;r==="underline"&&e.beginPath(),n.forEach((s,a)=>{var{p0:o,p1:l,rotation:c,text:f}=s;e.save(),e.translate(o.x,o.y),e.rotate(c),e.fillStyle&&e.fillText(f,0,0),e.strokeStyle&&e.strokeText(f,0,0),e.restore(),r==="underline"&&(a===0&&e.moveTo(o.x,o.y+A/8),e.lineTo(l.x,l.y+A/5))}),r==="underline"&&(e.lineWidth=A/20,e.strokeStyle=i,e.stroke(),e.closePath()),e.restore()}getLetterSpacingAt(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return this.letterSpacingCache[e]||0}findSegmentToFitChar(e,r,A,n,i,s,a,o,l){var c=s,f=this.measureText(e,o);o===" "&&r==="justify"&&A<n&&(f+=(n-A)/i),l>-1&&(c+=this.getLetterSpacingAt(l));var h=this.textHeight/20,u=this.getEquidistantPointOnPath(c,h,0),g=this.getEquidistantPointOnPath(c+f,h,0),p={p0:u,p1:g},w=u&&g?Math.atan2(g.y-u.y,g.x-u.x):0;if(a){var m=Math.cos(Math.PI/2+w)*a,B=Math.cos(-w)*a;p.p0=uh(uh({},u),{},{x:u.x+m,y:u.y+B}),p.p1=uh(uh({},g),{},{x:g.x+m,y:g.y+B})}return c+=f,{offset:c,segment:p,rotation:w}}measureText(e,r){var{measuresCache:A}=this,n=r||this.getText();if(A.has(n))return A.get(n);var i=this.measureTargetText(e,n);return A.set(n,i),i}setTextData(e){if(!this.glyphInfo){var r=this.getText(),A=r.split(""),n=r.split(" ").length-1,i=this.parent.getAttribute("dx").split().map(E=>E.getPixels("x")),s=this.parent.getAttribute("dy").getPixels("y"),a=this.parent.getStyle("text-anchor").getString("start"),o=this.getStyle("letter-spacing"),l=this.parent.getStyle("letter-spacing"),c=0;!o.hasValue()||o.getValue()==="inherit"?c=l.getPixels():o.hasValue()&&o.getValue()!=="initial"&&o.getValue()!=="unset"&&(c=o.getPixels());var f=[],h=r.length;this.letterSpacingCache=f;for(var u=0;u<h;u++)f.push(typeof i[u]<"u"?i[u]:c);var g=f.reduce((E,k,H)=>H===0?0:E+k||0,0),p=this.measureText(e),w=Math.max(p+g,0);this.textWidth=p,this.textHeight=this.getFontSize(),this.glyphInfo=[];var m=this.getPathLength(),B=this.getStyle("startOffset").getNumber(0)*m,x=0;(a==="middle"||a==="center")&&(x=-w/2),(a==="end"||a==="right")&&(x=-w),x+=B,A.forEach((E,k)=>{var{offset:H,segment:K,rotation:R}=this.findSegmentToFitChar(e,a,w,m,n,x,s,E,k);x=H,!(!K.p0||!K.p1)&&this.glyphInfo.push({text:A[k],p0:K.p0,p1:K.p1,rotation:R})})}}parsePathData(e){if(this.pathLength=-1,!e)return[];var r=[],{pathParser:A}=e;for(A.reset();!A.isEnd();){var{current:n}=A,i=n?n.x:0,s=n?n.y:0,a=A.next(),o=a.type,l=[];switch(a.type){case Qt.MOVE_TO:this.pathM(A,l);break;case Qt.LINE_TO:o=this.pathL(A,l);break;case Qt.HORIZ_LINE_TO:o=this.pathH(A,l);break;case Qt.VERT_LINE_TO:o=this.pathV(A,l);break;case Qt.CURVE_TO:this.pathC(A,l);break;case Qt.SMOOTH_CURVE_TO:o=this.pathS(A,l);break;case Qt.QUAD_TO:this.pathQ(A,l);break;case Qt.SMOOTH_QUAD_TO:o=this.pathT(A,l);break;case Qt.ARC:l=this.pathA(A);break;case Qt.CLOSE_PATH:Jt.pathZ(A);break}a.type!==Qt.CLOSE_PATH?r.push({type:o,points:l,start:{x:i,y:s},pathLength:this.calcLength(i,s,o,l)}):r.push({type:Qt.CLOSE_PATH,points:[],pathLength:0})}return r}pathM(e,r){var{x:A,y:n}=Jt.pathM(e).point;r.push(A,n)}pathL(e,r){var{x:A,y:n}=Jt.pathL(e).point;return r.push(A,n),Qt.LINE_TO}pathH(e,r){var{x:A,y:n}=Jt.pathH(e).point;return r.push(A,n),Qt.LINE_TO}pathV(e,r){var{x:A,y:n}=Jt.pathV(e).point;return r.push(A,n),Qt.LINE_TO}pathC(e,r){var{point:A,controlPoint:n,currentPoint:i}=Jt.pathC(e);r.push(A.x,A.y,n.x,n.y,i.x,i.y)}pathS(e,r){var{point:A,controlPoint:n,currentPoint:i}=Jt.pathS(e);return r.push(A.x,A.y,n.x,n.y,i.x,i.y),Qt.CURVE_TO}pathQ(e,r){var{controlPoint:A,currentPoint:n}=Jt.pathQ(e);r.push(A.x,A.y,n.x,n.y)}pathT(e,r){var{controlPoint:A,currentPoint:n}=Jt.pathT(e);return r.push(A.x,A.y,n.x,n.y),Qt.QUAD_TO}pathA(e){var{rX:r,rY:A,sweepFlag:n,xAxisRotation:i,centp:s,a1:a,ad:o}=Jt.pathA(e);return n===0&&o>0&&(o-=2*Math.PI),n===1&&o<0&&(o+=2*Math.PI),[s.x,s.y,r,A,a,o,i,n]}calcLength(e,r,A,n){var i=0,s=null,a=null,o=0;switch(A){case Qt.LINE_TO:return this.getLineLength(e,r,n[0],n[1]);case Qt.CURVE_TO:for(i=0,s=this.getPointOnCubicBezier(0,e,r,n[0],n[1],n[2],n[3],n[4],n[5]),o=.01;o<=1;o+=.01)a=this.getPointOnCubicBezier(o,e,r,n[0],n[1],n[2],n[3],n[4],n[5]),i+=this.getLineLength(s.x,s.y,a.x,a.y),s=a;return i;case Qt.QUAD_TO:for(i=0,s=this.getPointOnQuadraticBezier(0,e,r,n[0],n[1],n[2],n[3]),o=.01;o<=1;o+=.01)a=this.getPointOnQuadraticBezier(o,e,r,n[0],n[1],n[2],n[3]),i+=this.getLineLength(s.x,s.y,a.x,a.y),s=a;return i;case Qt.ARC:{i=0;var l=n[4],c=n[5],f=n[4]+c,h=Math.PI/180;if(Math.abs(l-f)<h&&(h=Math.abs(l-f)),s=this.getPointOnEllipticalArc(n[0],n[1],n[2],n[3],l,0),c<0)for(o=l-h;o>f;o-=h)a=this.getPointOnEllipticalArc(n[0],n[1],n[2],n[3],o,0),i+=this.getLineLength(s.x,s.y,a.x,a.y),s=a;else for(o=l+h;o<f;o+=h)a=this.getPointOnEllipticalArc(n[0],n[1],n[2],n[3],o,0),i+=this.getLineLength(s.x,s.y,a.x,a.y),s=a;return a=this.getPointOnEllipticalArc(n[0],n[1],n[2],n[3],f,0),i+=this.getLineLength(s.x,s.y,a.x,a.y),i}}return 0}getPointOnLine(e,r,A,n,i){var s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:r,a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:A,o=(i-A)/(n-r+Rs),l=Math.sqrt(e*e/(1+o*o));n<r&&(l*=-1);var c=o*l,f=null;if(n===r)f={x:s,y:a+c};else if((a-A)/(s-r+Rs)===o)f={x:s+l,y:a+c};else{var h=0,u=0,g=this.getLineLength(r,A,n,i);if(g<Rs)return null;var p=(s-r)*(n-r)+(a-A)*(i-A);p/=g*g,h=r+p*(n-r),u=A+p*(i-A);var w=this.getLineLength(s,a,h,u),m=Math.sqrt(e*e-w*w);l=Math.sqrt(m*m/(1+o*o)),n<r&&(l*=-1),c=o*l,f={x:h+l,y:u+c}}return f}getPointOnPath(e){var r=this.getPathLength(),A=0,n=null;if(e<-5e-5||e-5e-5>r)return null;var{dataArray:i}=this;for(var s of i){if(s&&(s.pathLength<5e-5||A+s.pathLength+5e-5<e)){A+=s.pathLength;continue}var a=e-A,o=0;switch(s.type){case Qt.LINE_TO:n=this.getPointOnLine(a,s.start.x,s.start.y,s.points[0],s.points[1],s.start.x,s.start.y);break;case Qt.ARC:{var l=s.points[4],c=s.points[5],f=s.points[4]+c;if(o=l+a/s.pathLength*c,c<0&&o<f||c>=0&&o>f)break;n=this.getPointOnEllipticalArc(s.points[0],s.points[1],s.points[2],s.points[3],o,s.points[6]);break}case Qt.CURVE_TO:o=a/s.pathLength,o>1&&(o=1),n=this.getPointOnCubicBezier(o,s.start.x,s.start.y,s.points[0],s.points[1],s.points[2],s.points[3],s.points[4],s.points[5]);break;case Qt.QUAD_TO:o=a/s.pathLength,o>1&&(o=1),n=this.getPointOnQuadraticBezier(o,s.start.x,s.start.y,s.points[0],s.points[1],s.points[2],s.points[3]);break}if(n)return n;break}return null}getLineLength(e,r,A,n){return Math.sqrt((A-e)*(A-e)+(n-r)*(n-r))}getPathLength(){return this.pathLength===-1&&(this.pathLength=this.dataArray.reduce((e,r)=>r.pathLength>0?e+r.pathLength:e,0)),this.pathLength}getPointOnCubicBezier(e,r,A,n,i,s,a,o,l){var c=o*pv(e)+s*gv(e)+n*vv(e)+r*mv(e),f=l*pv(e)+a*gv(e)+i*vv(e)+A*mv(e);return{x:c,y:f}}getPointOnQuadraticBezier(e,r,A,n,i,s,a){var o=s*wv(e)+n*yv(e)+r*Bv(e),l=a*wv(e)+i*yv(e)+A*Bv(e);return{x:o,y:l}}getPointOnEllipticalArc(e,r,A,n,i,s){var a=Math.cos(s),o=Math.sin(s),l={x:A*Math.cos(i),y:n*Math.sin(i)};return{x:e+(l.x*a-l.y*o),y:r+(l.x*o+l.y*a)}}buildEquidistantCache(e,r){var A=this.getPathLength(),n=r||.25,i=e||A/100;if(!this.equidistantCache||this.equidistantCache.step!==i||this.equidistantCache.precision!==n){this.equidistantCache={step:i,precision:n,points:[]};for(var s=0,a=0;a<=A;a+=n){var o=this.getPointOnPath(a),l=this.getPointOnPath(a+n);!o||!l||(s+=this.getLineLength(o.x,o.y,l.x,l.y),s>=i&&(this.equidistantCache.points.push({x:o.x,y:o.y,distance:a}),s-=i))}}}getEquidistantPointOnPath(e,r,A){if(this.buildEquidistantCache(r,A),e<0||e-this.getPathLength()>5e-5)return null;var n=Math.round(e/this.getPathLength()*(this.equidistantCache.points.length-1));return this.equidistantCache.points[n]||null}}var nK=/^\s*data:(([^/,;]+\/[^/,;]+)(?:;([^,;=]+=[^,;=]+))?)?(?:;(base64))?,(.*)$/i;class gF extends Ha{constructor(e,r,A){super(e,r,A),this.type="image",this.loaded=!1;var n=this.getHrefAttribute().getString();if(n){var i=n.endsWith(".svg")||/^\s*data:image\/svg\+xml/i.test(n);e.images.push(this),i?this.loadSvg(n):this.loadImage(n),this.isSvg=i}}loadImage(e){var r=this;return ji(function*(){try{var A=yield r.document.createImage(e);r.image=A}catch(n){console.error('Error while loading image "'.concat(e,'":'),n)}r.loaded=!0})()}loadSvg(e){var r=this;return ji(function*(){var A=nK.exec(e);if(A){var n=A[5];A[4]==="base64"?r.image=atob(n):r.image=decodeURIComponent(n)}else try{var i=yield r.document.fetch(e),s=yield i.text();r.image=s}catch(a){console.error('Error while loading image "'.concat(e,'":'),a)}r.loaded=!0})()}renderChildren(e){var{document:r,image:A,loaded:n}=this,i=this.getAttribute("x").getPixels("x"),s=this.getAttribute("y").getPixels("y"),a=this.getStyle("width").getPixels("x"),o=this.getStyle("height").getPixels("y");if(!(!n||!A||!a||!o)){if(e.save(),e.translate(i,s),this.isSvg){var l=r.canvg.forkString(e,this.image,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:0,offsetY:0,scaleWidth:a,scaleHeight:o});l.document.documentElement.parent=this,l.render()}else{var c=this.image;r.setViewBox({ctx:e,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:a,desiredWidth:c.width,height:o,desiredHeight:c.height}),this.loaded&&(typeof c.complete>"u"||c.complete)&&e.drawImage(c,0,0)}e.restore()}}getBoundingBox(){var e=this.getAttribute("x").getPixels("x"),r=this.getAttribute("y").getPixels("y"),A=this.getStyle("width").getPixels("x"),n=this.getStyle("height").getPixels("y");return new Mn(e,r,e+A,r+n)}}class vF extends Ha{constructor(){super(...arguments),this.type="symbol"}render(e){}}class mF{constructor(e){this.document=e,this.loaded=!1,e.fonts.push(this)}load(e,r){var A=this;return ji(function*(){try{var{document:n}=A,i=yield n.canvg.parser.load(r),s=i.getElementsByTagName("font");Array.from(s).forEach(a=>{var o=n.createElement(a);n.definitions[e]=o})}catch(a){console.error('Error while loading font "'.concat(r,'":'),a)}A.loaded=!0})()}}class Iv extends or{constructor(e,r,A){super(e,r,A),this.type="style";var n=Ds(Array.from(r.childNodes).map(s=>s.textContent).join("").replace(/(\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm,"").replace(/@import.*;/g,"")),i=n.split("}");i.forEach(s=>{var a=s.trim();if(a){var o=a.split("{"),l=o[0].split(","),c=o[1].split(";");l.forEach(f=>{var h=f.trim();if(h){var u=e.styles[h]||{};if(c.forEach(w=>{var m=w.indexOf(":"),B=w.substr(0,m).trim(),x=w.substr(m+1,w.length-m).trim();B&&x&&(u[B]=new gt(e,B,x))}),e.styles[h]=u,e.stylesSpecificity[h]=HS(h),h==="@font-face"){var g=u["font-family"].getString().replace(/"|'/g,""),p=u.src.getString().split(",");p.forEach(w=>{if(w.indexOf('format("svg")')>0){var m=fv(w);m&&new mF(e).load(g,m)}})}}})}})}}Iv.parseExternalUrl=fv;class wF extends Ha{constructor(){super(...arguments),this.type="use"}setContext(e){super.setContext(e);var r=this.getAttribute("x"),A=this.getAttribute("y");r.hasValue()&&e.translate(r.getPixels("x"),0),A.hasValue()&&e.translate(0,A.getPixels("y"))}path(e){var{element:r}=this;r&&r.path(e)}renderChildren(e){var{document:r,element:A}=this;if(A){var n=A;if(A.type==="symbol"&&(n=new tl(r,null),n.attributes.viewBox=new gt(r,"viewBox",A.getAttribute("viewBox").getString()),n.attributes.preserveAspectRatio=new gt(r,"preserveAspectRatio",A.getAttribute("preserveAspectRatio").getString()),n.attributes.overflow=new gt(r,"overflow",A.getAttribute("overflow").getString()),n.children=A.children,A.styles.opacity=new gt(r,"opacity",this.calculateOpacity())),n.type==="svg"){var i=this.getStyle("width",!1,!0),s=this.getStyle("height",!1,!0);i.hasValue()&&(n.attributes.width=new gt(r,"width",i.getString())),s.hasValue()&&(n.attributes.height=new gt(r,"height",s.getString()))}var a=n.parent;n.parent=this,n.render(e),n.parent=a}}getBoundingBox(e){var{element:r}=this;return r?r.getBoundingBox(e):null}elementTransform(){var{document:e,element:r}=this;return Da.fromElement(e,r)}get element(){return this.cachedElement||(this.cachedElement=this.getHrefAttribute().getDefinition()),this.cachedElement}}function fh(t,e,r,A,n,i){return t[r*A*4+e*4+i]}function hh(t,e,r,A,n,i,s){t[r*A*4+e*4+i]=s}function zr(t,e,r){var A=t[e];return A*r}function Gi(t,e,r,A){return e+Math.cos(t)*r+Math.sin(t)*A}class Uv extends or{constructor(e,r,A){super(e,r,A),this.type="feColorMatrix";var n=ln(this.getAttribute("values").getString());switch(this.getAttribute("type").getString("matrix")){case"saturate":{var i=n[0];n=[.213+.787*i,.715-.715*i,.072-.072*i,0,0,.213-.213*i,.715+.285*i,.072-.072*i,0,0,.213-.213*i,.715-.715*i,.072+.928*i,0,0,0,0,0,1,0,0,0,0,0,1];break}case"hueRotate":{var s=n[0]*Math.PI/180;n=[Gi(s,.213,.787,-.213),Gi(s,.715,-.715,-.715),Gi(s,.072,-.072,.928),0,0,Gi(s,.213,-.213,.143),Gi(s,.715,.285,.14),Gi(s,.072,-.072,-.283),0,0,Gi(s,.213,-.213,-.787),Gi(s,.715,-.715,.715),Gi(s,.072,.928,.072),0,0,0,0,0,1,0,0,0,0,0,1];break}case"luminanceToAlpha":n=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.2125,.7154,.0721,0,0,0,0,0,0,1];break}this.matrix=n,this.includeOpacity=this.getAttribute("includeOpacity").hasValue()}apply(e,r,A,n,i){for(var{includeOpacity:s,matrix:a}=this,o=e.getImageData(0,0,n,i),l=0;l<i;l++)for(var c=0;c<n;c++){var f=fh(o.data,c,l,n,i,0),h=fh(o.data,c,l,n,i,1),u=fh(o.data,c,l,n,i,2),g=fh(o.data,c,l,n,i,3),p=zr(a,0,f)+zr(a,1,h)+zr(a,2,u)+zr(a,3,g)+zr(a,4,1),w=zr(a,5,f)+zr(a,6,h)+zr(a,7,u)+zr(a,8,g)+zr(a,9,1),m=zr(a,10,f)+zr(a,11,h)+zr(a,12,u)+zr(a,13,g)+zr(a,14,1),B=zr(a,15,f)+zr(a,16,h)+zr(a,17,u)+zr(a,18,g)+zr(a,19,1);s&&(p=0,w=0,m=0,B*=g/255),hh(o.data,c,l,n,i,0,p),hh(o.data,c,l,n,i,1,w),hh(o.data,c,l,n,i,2,m),hh(o.data,c,l,n,i,3,B)}e.clearRect(0,0,n,i),e.putImageData(o,0,0)}}class Ec extends or{constructor(){super(...arguments),this.type="mask"}apply(e,r){var{document:A}=this,n=this.getAttribute("x").getPixels("x"),i=this.getAttribute("y").getPixels("y"),s=this.getStyle("width").getPixels("x"),a=this.getStyle("height").getPixels("y");if(!s&&!a){var o=new Mn;this.children.forEach(g=>{o.addBoundingBox(g.getBoundingBox(e))}),n=Math.floor(o.x1),i=Math.floor(o.y1),s=Math.floor(o.width),a=Math.floor(o.height)}var l=this.removeStyles(r,Ec.ignoreStyles),c=A.createCanvas(n+s,i+a),f=c.getContext("2d");A.screen.setDefaults(f),this.renderChildren(f),new Uv(A,{nodeType:1,childNodes:[],attributes:[{nodeName:"type",value:"luminanceToAlpha"},{nodeName:"includeOpacity",value:"true"}]}).apply(f,0,0,n+s,i+a);var h=A.createCanvas(n+s,i+a),u=h.getContext("2d");A.screen.setDefaults(u),r.render(u),u.globalCompositeOperation="destination-in",u.fillStyle=f.createPattern(c,"no-repeat"),u.fillRect(0,0,n+s,i+a),e.fillStyle=u.createPattern(h,"no-repeat"),e.fillRect(0,0,n+s,i+a),this.restoreStyles(r,l)}render(e){}}Ec.ignoreStyles=["mask","transform","clip-path"];var yF=()=>{};class BF extends or{constructor(){super(...arguments),this.type="clipPath"}apply(e){var{document:r}=this,A=Reflect.getPrototypeOf(e),{beginPath:n,closePath:i}=e;A&&(A.beginPath=yF,A.closePath=yF),Reflect.apply(n,e,[]),this.children.forEach(s=>{if(!(typeof s.path>"u")){var a=typeof s.elementTransform<"u"?s.elementTransform():null;a||(a=Da.fromElement(r,s)),a&&a.apply(e),s.path(e),A&&(A.closePath=i),a&&a.unapply(e)}}),Reflect.apply(i,e,[]),e.clip(),A&&(A.beginPath=n,A.closePath=i)}render(e){}}class Sc extends or{constructor(){super(...arguments),this.type="filter"}apply(e,r){var{document:A,children:n}=this,i=r.getBoundingBox(e);if(i){var s=0,a=0;n.forEach(m=>{var B=m.extraFilterDistance||0;s=Math.max(s,B),a=Math.max(a,B)});var o=Math.floor(i.width),l=Math.floor(i.height),c=o+2*s,f=l+2*a;if(!(c<1||f<1)){var h=Math.floor(i.x),u=Math.floor(i.y),g=this.removeStyles(r,Sc.ignoreStyles),p=A.createCanvas(c,f),w=p.getContext("2d");A.screen.setDefaults(w),w.translate(-h+s,-u+a),r.render(w),n.forEach(m=>{typeof m.apply=="function"&&m.apply(w,0,0,c,f)}),e.drawImage(p,0,0,c,f,h-s,u-a,c,f),this.restoreStyles(r,g)}}}render(e){}}Sc.ignoreStyles=["filter","transform","clip-path"];class bF extends or{constructor(e,r,A){super(e,r,A),this.type="feDropShadow",this.addStylesFromStyleDefinition()}apply(e,r,A,n,i){}}class CF extends or{constructor(){super(...arguments),this.type="feMorphology"}apply(e,r,A,n,i){}}class xF extends or{constructor(){super(...arguments),this.type="feComposite"}apply(e,r,A,n,i){}}class EF extends or{constructor(e,r,A){super(e,r,A),this.type="feGaussianBlur",this.blurRadius=Math.floor(this.getAttribute("stdDeviation").getNumber()),this.extraFilterDistance=this.blurRadius}apply(e,r,A,n,i){var{document:s,blurRadius:a}=this,o=s.window?s.window.document.body:null,l=e.canvas;l.id=s.getUniqueId(),o&&(l.style.display="none",o.appendChild(l)),Oj(l,r,A,n,i,a),o&&o.removeChild(l)}}class SF extends or{constructor(){super(...arguments),this.type="title"}}class FF extends or{constructor(){super(...arguments),this.type="desc"}}var iK={svg:tl,rect:Ev,circle:XS,ellipse:JS,line:ZS,polyline:Sv,polygon:eF,path:Jt,pattern:tF,marker:rF,defs:AF,linearGradient:nF,radialGradient:iF,stop:aF,animate:ch,animateColor:sF,animateTransform:oF,font:lF,"font-face":cF,"missing-glyph":uF,glyph:xv,text:zi,tspan:xc,tref:fF,a:hF,textPath:pF,image:gF,g:lh,symbol:vF,style:Iv,use:wF,mask:Ec,clipPath:BF,filter:Sc,feDropShadow:bF,feMorphology:CF,feComposite:xF,feColorMatrix:Uv,feGaussianBlur:EF,title:SF,desc:FF};function IF(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(t);e&&(A=A.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,A)}return r}function aK(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?IF(Object(r),!0).forEach(function(A){ev(t,A,r[A])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):IF(Object(r)).forEach(function(A){Object.defineProperty(t,A,Object.getOwnPropertyDescriptor(r,A))})}return t}function sK(t,e){var r=document.createElement("canvas");return r.width=t,r.height=e,r}function oK(t){return _v.apply(this,arguments)}function _v(){return _v=ji(function*(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=document.createElement("img");return e&&(r.crossOrigin="Anonymous"),new Promise((A,n)=>{r.onload=()=>{A(r)},r.onerror=(i,s,a,o,l)=>{n(l)},r.src=t})}),_v.apply(this,arguments)}class Vi{constructor(e){var{rootEmSize:r=12,emSize:A=12,createCanvas:n=Vi.createCanvas,createImage:i=Vi.createImage,anonymousCrossOrigin:s}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.canvg=e,this.definitions=Object.create(null),this.styles=Object.create(null),this.stylesSpecificity=Object.create(null),this.images=[],this.fonts=[],this.emSizeStack=[],this.uniqueId=0,this.screen=e.screen,this.rootEmSize=r,this.emSize=A,this.createCanvas=n,this.createImage=this.bindCreateImage(i,s),this.screen.wait(this.isImagesLoaded.bind(this)),this.screen.wait(this.isFontsLoaded.bind(this))}bindCreateImage(e,r){return typeof r=="boolean"?(A,n)=>e(A,typeof n=="boolean"?n:r):e}get window(){return this.screen.window}get fetch(){return this.screen.fetch}get ctx(){return this.screen.ctx}get emSize(){var{emSizeStack:e}=this;return e[e.length-1]}set emSize(e){var{emSizeStack:r}=this;r.push(e)}popEmSize(){var{emSizeStack:e}=this;e.pop()}getUniqueId(){return"canvg".concat(++this.uniqueId)}isImagesLoaded(){return this.images.every(e=>e.loaded)}isFontsLoaded(){return this.fonts.every(e=>e.loaded)}createDocumentElement(e){var r=this.createElement(e.documentElement);return r.root=!0,r.addStylesFromStyleDefinition(),this.documentElement=r,r}createElement(e){var r=e.nodeName.replace(/^[^:]+:/,""),A=Vi.elementTypes[r];return typeof A<"u"?new A(this,e):new YS(this,e)}createTextNode(e){return new AK(this,e)}setViewBox(e){this.screen.setViewBox(aK({document:this},e))}}Vi.createCanvas=sK,Vi.createImage=oK,Vi.elementTypes=iK;function UF(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(t);e&&(A=A.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,A)}return r}function js(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?UF(Object(r),!0).forEach(function(A){ev(t,A,r[A])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):UF(Object(r)).forEach(function(A){Object.defineProperty(t,A,Object.getOwnPropertyDescriptor(r,A))})}return t}class Ks{constructor(e,r){var A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.parser=new oh(A),this.screen=new Cc(e,A),this.options=A;var n=new Vi(this,A),i=n.createDocumentElement(r);this.document=n,this.documentElement=i}static from(e,r){var A=arguments;return ji(function*(){var n=A.length>2&&A[2]!==void 0?A[2]:{},i=new oh(n),s=yield i.parse(r);return new Ks(e,s,n)})()}static fromString(e,r){var A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=new oh(A),i=n.parseFromString(r);return new Ks(e,i,A)}fork(e,r){var A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Ks.from(e,r,js(js({},this.options),A))}forkString(e,r){var A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Ks.fromString(e,r,js(js({},this.options),A))}ready(){return this.screen.ready()}isReady(){return this.screen.isReady()}render(){var e=arguments,r=this;return ji(function*(){var A=e.length>0&&e[0]!==void 0?e[0]:{};r.start(js({enableRedraw:!0,ignoreAnimation:!0,ignoreMouse:!0},A)),yield r.ready(),r.stop()})()}start(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{documentElement:r,screen:A,options:n}=this;A.start(r,js(js({enableRedraw:!0},n),e))}stop(){this.screen.stop()}resize(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e,A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.documentElement.resize(e,r,A)}}const lK=Object.freeze(Object.defineProperty({__proto__:null,AElement:hF,AnimateColorElement:sF,AnimateElement:ch,AnimateTransformElement:oF,BoundingBox:Mn,CB1:pv,CB2:gv,CB3:vv,CB4:mv,Canvg:Ks,CircleElement:XS,ClipPathElement:BF,DefsElement:AF,DescElement:FF,Document:Vi,Element:or,EllipseElement:JS,FeColorMatrixElement:Uv,FeCompositeElement:xF,FeDropShadowElement:bF,FeGaussianBlurElement:EF,FeMorphologyElement:CF,FilterElement:Sc,Font:PA,FontElement:lF,FontFaceElement:cF,GElement:lh,GlyphElement:xv,GradientElement:Fv,ImageElement:gF,LineElement:ZS,LinearGradientElement:nF,MarkerElement:rF,MaskElement:Ec,Matrix:bv,MissingGlyphElement:uF,Mouse:jS,PSEUDO_ZERO:Rs,Parser:oh,PathElement:Jt,PathParser:Qt,PatternElement:tF,Point:Fr,PolygonElement:eF,PolylineElement:Sv,Property:gt,QB1:wv,QB2:yv,QB3:Bv,RadialGradientElement:iF,RectElement:Ev,RenderedElement:Ha,Rotate:VS,SVGElement:tl,SVGFontLoader:mF,Scale:qS,Screen:Cc,Skew:Cv,SkewX:WS,SkewY:$S,StopElement:aF,StyleElement:Iv,SymbolElement:vF,TRefElement:fF,TSpanElement:xc,TextElement:zi,TextPathElement:pF,TitleElement:SF,Transform:Da,Translate:GS,UnknownElement:YS,UseElement:wF,ViewPort:RS,compressSpaces:Ds,default:Ks,getSelectorSpecificity:HS,normalizeAttributeName:MS,normalizeColor:DS,parseExternalUrl:fv,presets:Hj,toNumbers:ln,trimLeft:OS,trimRight:PS,vectorMagnitude:hv,vectorsAngle:dv,vectorsRatio:sh},Symbol.toStringTag,{value:"Module"}));Zt.DIAGRAM_TEMPLATES=Mu,Zt.DiagramEditor=YO,Zt.FILE_SIGNATURE=Md,Zt.applySourceToCanvas=Xb,Zt.buildShareUrl=Vd,Zt.createEdge=Xr,Zt.createLayer=Yh,Zt.createPage=ml,Zt.createProject=Gn,Zt.createShape=vr,Zt.decodeShareHash=M6,Zt.encodeShareHash=Gy,Zt.exportJson=Ky,Zt.exportPdf=jy,Zt.exportPng=Ry,Zt.exportSvg=Hy,Zt.exportZip=zy,Zt.loadTemplate=OT,Zt.parseProject=Bu,Zt.pluginManager=FA,Zt.projectToSourceText=$b,Zt.serializeProject=xo,Object.defineProperty(Zt,Symbol.toStringTag,{value:"Module"})}));
|
|
139
|
+
//# sourceMappingURL=diagramforge.umd.cjs.map
|