PageSourceSearch

https://golt.ai/assets/AdminDashboard-CDlgWk4P.js

js golt.ai collected 2026-10-05 12:02:10 UTC 1,339,405 bytes, 381 lines download raw bytes

1var hg=Object.defineProperty;var fg=(r,d,s)=>d in r?hg(r,d,{enumerable:!0,configurable:!0,writable:!0,value:s}):r[d]=s;var vn=(r,d,s)=>fg(r,typeof d!="symbol"?d+"":d,s);import{K as bn,a1 as Cc,a2 as Sl,r as ne,a3 as mg,a4 as pg,a5 as td,d as Yn,j as e,C as ds,e as Rs,R as Bi,g as fa,B as We,h as us,f as Ds,a6 as gg,a7 as An,x as tr,a8 as vg,l as jm,D as Un,o as zn,p as $n,q as Vn,s as ha,E as bo,a9 as Pf,aa as Tf,ab as xg,$ as ka,G as ei,z as pd,X as fn,U as nl,w as Di,y as yg,ac as bm,ad as wm,ae as Nm,af as Tl,ag as gh,ah as sl,m as Ui,ai as Lf,H as ou,A as Of,aj as vh,ak as xh,M as gd,J as jg,a as bg,u as wg,b as Ng,I as Sg,al as Cg,am as Ag}from"./index-Cc22E_SZ.js";import{g as Ea}from"./na-B-DmmZRc.js";import{L as pt}from"./label-BzIo4Sxj.js";import{T as Sm,a as Cm,b as la,c as na}from"./tabs-DcPSkeS6.js";import{S as wo,a as No,b as So,c as Co,d as Ys}from"./select-BrejtzdR.js";import{T as Rn,a as Mn,b as Gr,c as Lt,d as Fn,e as St}from"./table-Cfn3PkQh.js";import{h as Eg}from"./html2canvas.esm-Cnhys_gi.js";import{D as jo}from"./download-BGnpleKL.js";import{g as kg,i as yh,G as _g,a as Xu,m as Pg,b as nu,T as Tg,s as Zu,f as rd,c as If,d as Rf,e as Lg,L as Og,u as Am,h as Em,j as Ig,k as km,l as Rg,n as Mg,B as Nc,o as Fg,R as sd,p as nd,C as ad,S as iu}from"./generateCategoricalChart-Bq69Mj12.js";import{C as rc}from"./chart-column-CzXINVS3.js";import{U as vu}from"./users-CHmsEKBL.js";import{P as Th,B as Sc,S as ac,C as Dg,L as Bg}from"./square-pen-0_ZRouTt.js";import{I as pr}from"./input-DgPuEPGg.js";import{U as Bo,F as xu,a as ca,b as da,c as ja,d as ua,e as za,g as Mf,v as _m,u as Pm,t as Tm,o as yu,s as hr,f as Lm,h as Om,i as Im,l as Rm,Z as Mm}from"./v4-CXndXmHC.js";import{F as fd}from"./file-spreadsheet-DLN47pgb.js";import{L as Vs}from"./loader-circle-Cl7UrnHV.js";import{C as $i}from"./clock-BGHFxmED.js";import{C as Ug}from"./circle-alert-D9qzgnZe.js";import{C as oc}from"./circle-x-BNdmGVAD.js";import{C as Ll}from"./circle-check-big-BHNZZLZ5.js";import{A as vd,a as xd,b as yd,c as jd,d as bd,e as wd,f as Nd,g as Sd}from"./alert-dialog-BgbqlVK0.js";import{I as md}from"./image-Dfxu3pao.js";import{R as Ai}from"./refresh-cw-BzcHJryv.js";import{E as Wi}from"./eye-BQAKljRo.js";import{Z as Ff}from"./zoom-in-DEOIJ91E.js";import{C as Lh}from"./chevron-left-DNlSJjHV.js";import{E as kc}from"./external-link-DsIdWHuq.js";import{S as zg}from"./sparkles-cjtM71xh.js";import{C as Fm}from"./circle-check-JLC-OZ6g.js";import{C as od}from"./checkbox-Bi8Yhg8U.js";import{P as Ro,a as Mo,b as Fo}from"./popover-DPO91zR4.js";import{B as Ol}from"./building-2-DabrsLHI.js";import{P as Dm}from"./progress-DpaX0wdK.js";import{T as Ma}from"./textarea-C1EAiW1k.js";import{C as Il,a as Rl,e as Ml,c as Fl,d as al}from"./command-D83Z6mlP.js";import{S as Ec}from"./scroll-area-BVqBjvMi.js";import{P as aa}from"./plus-DrReRWhX.js";import{T as ti}from"./trash-2-BCyW5pHe.js";import{S as Bm}from"./shield-BzvEVWp-.js";import{T as jh}from"./triangle-alert-BwqOz83b.js";import{S as Fi}from"./switch-C-Er1ijQ.js";import{L as bh}from"./layers-Dk-G0aYX.js";import{R as wh}from"./rotate-ccw-BwuAp97s.js";import{C as Um}from"./coins-CjVArs7x.js";import{C as Ju,a as Qu,b as qu}from"./collapsible-Bn6hjeBm.js";import{t as $g}from"./taxonomy-BwhRfrb9.js";import{T as eh}from"./target-ChPlaCDm.js";import{C as Vg}from"./chevrons-up-down-BuUK1g3b.js";import{g as Df,a as Bf,f as Wg,u as Hg,c as Gg,d as Yg,r as Kg}from"./tomTimeApi-viJnpCO4.js";import{g as Xg}from"./clickLogger-D7goqYfB.js";import{E as zm}from"./eye-off-BryVECbg.js";import{L as Zg}from"./lock-D_hxLXs9.js";import{H as Jg}from"./house-_QIhyoXc.js";import{S as th}from"./settings-_Edfw7bV.js";import"./index-BdQq_4o_.js";import"./index-Bd8z6f4h.js";import"./index-DSEWlE8I.js";import"./index-D6zeUAk0.js";/**
2 * @license lucide-react v0.462.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const lu=bn("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
7 * @license lucide-react v0.462.0 - ISC
8 *
9 * This source code is licensed under the ISC license.
10 * See the LICENSE file in the root directory of this source tree.
11 */const Qg=bn("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
12 * @license lucide-react v0.462.0 - ISC
13 *
14 * This source code is licensed under the ISC license.
15 * See the LICENSE file in the root directory of this source tree.
16 */const qg=bn("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
17 * @license lucide-react v0.462.0 - ISC
18 *
19 * This source code is licensed under the ISC license.
20 * See the LICENSE file in the root directory of this source tree.
21 */const rh=bn("Boxes",[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]);/**
22 * @license lucide-react v0.462.0 - ISC
23 *
24 * This source code is licensed under the ISC license.
25 * See the LICENSE file in the root directory of this source tree.
26 */const ev=bn("CalendarCheck",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"m9 16 2 2 4-4",key:"19s6y9"}]]);/**
27 * @license lucide-react v0.462.0 - ISC
28 *
29 * This source code is licensed under the ISC license.
30 * See the LICENSE file in the root directory of this source tree.
31 */const $m=bn("ChartNoAxesColumn",[["line",{x1:"18",x2:"18",y1:"20",y2:"10",key:"1xfpm4"}],["line",{x1:"12",x2:"12",y1:"20",y2:"4",key:"be30l9"}],["line",{x1:"6",x2:"6",y1:"20",y2:"14",key:"1r4le6"}]]);/**
32 * @license lucide-react v0.462.0 - ISC
33 *
34 * This source code is licensed under the ISC license.
35 * See the LICENSE file in the root directory of this source tree.
36 */const tv=bn("ChevronsDownUp",[["path",{d:"m7 20 5-5 5 5",key:"13a0gw"}],["path",{d:"m7 4 5 5 5-5",key:"1kwcof"}]]);/**
37 * @license lucide-react v0.462.0 - ISC
38 *
39 * This source code is licensed under the ISC license.
40 * See the LICENSE file in the root directory of this source tree.
41 */const Uf=bn("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
42 * @license lucide-react v0.462.0 - ISC
43 *
44 * This source code is licensed under the ISC license.
45 * See the LICENSE file in the root directory of this source tree.
46 */const Vm=bn("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"}]]);/**
47 * @license lucide-react v0.462.0 - ISC
48 *
49 * This source code is licensed under the ISC license.
50 * See the LICENSE file in the root directory of this source tree.
51 */const cu=bn("FileArchive",[["path",{d:"M10 12v-1",key:"v7bkov"}],["path",{d:"M10 18v-2",key:"1cjy8d"}],["path",{d:"M10 7V6",key:"dljcrl"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v16a2 2 0 0 0 .274 1.01",key:"gkbcor"}],["circle",{cx:"10",cy:"20",r:"2",key:"1xzdoj"}]]);/**
52 * @license lucide-react v0.462.0 - ISC
53 *
54 * This source code is licensed under the ISC license.
55 * See the LICENSE file in the root directory of this source tree.
56 */const sh=bn("FolderTree",[["path",{d:"M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"hod4my"}],["path",{d:"M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"w4yl2u"}],["path",{d:"M3 5a2 2 0 0 0 2 2h3",key:"f2jnh7"}],["path",{d:"M3 3v13a2 2 0 0 0 2 2h3",key:"k8epm1"}]]);/**
57 * @license lucide-react v0.462.0 - ISC
58 *
59 * This source code is licensed under the ISC license.
60 * See the LICENSE file in the root directory of this source tree.
61 */const Wm=bn("Gift",[["rect",{x:"3",y:"8",width:"18",height:"4",rx:"1",key:"bkv52"}],["path",{d:"M12 8v13",key:"1c76mn"}],["path",{d:"M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7",key:"6wjy6b"}],["path",{d:"M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5",key:"1ihvrl"}]]);/**
62 * @license lucide-react v0.462.0 - ISC
63 *
64 * This source code is licensed under the ISC license.
65 * See the LICENSE file in the root directory of this source tree.
66 */const zf=bn("Grid3x3",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);/**
67 * @license lucide-react v0.462.0 - ISC
68 *
69 * This source code is licensed under the ISC license.
70 * See the LICENSE file in the root directory of this source tree.
71 */const Zd=bn("Hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);/**
72 * @license lucide-react v0.462.0 - ISC
73 *
74 * This source code is licensed under the ISC license.
75 * See the LICENSE file in the root directory of this source tree.
76 */const Jd=bn("ImageOff",[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M10.41 10.41a2 2 0 1 1-2.83-2.83",key:"1bzlo9"}],["line",{x1:"13.5",x2:"6",y1:"13.5",y2:"21",key:"1q0aeu"}],["line",{x1:"18",x2:"21",y1:"12",y2:"15",key:"5mozeu"}],["path",{d:"M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59",key:"mmje98"}],["path",{d:"M21 15V5a2 2 0 0 0-2-2H9",key:"43el77"}]]);/**
77 * @license lucide-react v0.462.0 - ISC
78 *
79 * This source code is licensed under the ISC license.
80 * See the LICENSE file in the root directory of this source tree.
81 */const rv=bn("Key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);/**
82 * @license lucide-react v0.462.0 - ISC
83 *
84 * This source code is licensed under the ISC license.
85 * See the LICENSE file in the root directory of this source tree.
86 */const Hm=bn("MousePointerClick",[["path",{d:"M14 4.1 12 6",key:"ita8i4"}],["path",{d:"m5.1 8-2.9-.8",key:"1go3kf"}],["path",{d:"m6 12-1.9 2",key:"mnht97"}],["path",{d:"M7.2 2.2 8 5.1",key:"1cfko1"}],["path",{d:"M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.
86074z",key:"s0h3yz"}]]);/**
87 * @license lucide-react v0.462.0 - ISC
88 *
89 * This source code is licensed under the ISC license.
90 * See the LICENSE file in the root directory of this source tree.
91 */const sv=bn("PackagePlus",[["path",{d:"M16 16h6",key:"100bgy"}],["path",{d:"M19 13v6",key:"85cyf1"}],["path",{d:"M21 10V8a2 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 0l2-1.14",key:"e7tb2h"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["line",{x1:"12",x2:"12",y1:"22",y2:"12",key:"a4e8g8"}]]);/**
92 * @license lucide-react v0.462.0 - ISC
93 *
94 * This source code is licensed under the ISC license.
95 * See the LICENSE file in the root directory of this source tree.
96 */const Gm=bn("Paperclip",[["path",{d:"m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48",key:"1u3ebp"}]]);/**
97 * @license lucide-react v0.462.0 - ISC
98 *
99 * This source code is licensed under the ISC license.
100 * See the LICENSE file in the root directory of this source tree.
101 */const nv=bn("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]]);/**
102 * @license lucide-react v0.462.0 - ISC
103 *
104 * This source code is licensed under the ISC license.
105 * See the LICENSE file in the root directory of this source tree.
106 */const Nh=bn("Pen",[["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"}]]);/**
107 * @license lucide-react v0.462.0 - ISC
108 *
109 * This source code is licensed under the ISC license.
110 * See the LICENSE file in the root directory of this source tree.
111 */const ju=bn("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"}]]);/**
112 * @license lucide-react v0.462.0 - ISC
113 *
114 * This source code is licensed under the ISC license.
115 * See the LICENSE file in the root directory of this source tree.
116 */const av=bn("Percent",[["line",{x1:"19",x2:"5",y1:"5",y2:"19",key:"1x9vlm"}],["circle",{cx:"6.5",cy:"6.5",r:"2.5",key:"4mh3h7"}],["circle",{cx:"17.5",cy:"17.5",r:"2.5",key:"1mdrzq"}]]);/**
117 * @license lucide-react v0.462.0 - ISC
118 *
119 * This source code is licensed under the ISC license.
120 * See the LICENSE file in the root directory of this source tree.
121 */const $f=bn("Power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]);/**
122 * @license lucide-react v0.462.0 - ISC
123 *
124 * This source code is licensed under the ISC license.
125 * See the LICENSE file in the root directory of this source tree.
126 */const ov=bn("Printer",[["path",{d:"M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2",key:"143wyd"}],["path",{d:"M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6",key:"1itne7"}],["rect",{x:"6",y:"14",width:"12",height:"8",rx:"1",key:"1ue0tg"}]]);/**
127 * @license lucide-react v0.462.0 - ISC
128 *
129 * This source code is licensed under the ISC license.
130 * See the LICENSE file in the root directory of this source tree.
131 */const sc=bn("QrCode",[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]]);/**
132 * @license lucide-react v0.462.0 - ISC
133 *
134 * This source code is licensed under the ISC license.
135 * See the LICENSE file in the root directory of this source tree.
136 */const iv=bn("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
137 * @license lucide-react v0.462.0 - ISC
138 *
139 * This source code is licensed under the ISC license.
140 * See the LICENSE file in the root directory of this source tree.
141 */const Ym=bn("ShoppingBag",[["path",{d:"M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z",key:"hou9p0"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}]]);/**
142 * @license lucide-react v0.462.0 - ISC
143 *
144 * This source code is licensed under the ISC license.
145 * See the LICENSE file in the root directory of this source tree.
vendor: 17,349 bytes, lines 146-161
146 */const nc=bn("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);/**
147 * @license lucide-react v0.462.0 - ISC
148 *
149 * This source code is licensed under the ISC license.
150 * See the LICENSE file in the root directory of this source tree.
151 */const id=bn("Trash",[["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"}]]);/**
152 * @license lucide-react v0.462.0 - ISC
153 *
154 * This source code is licensed under the ISC license.
155 * See the LICENSE file in the root directory of this source tree.
156 */const xo=bn("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"}]]);/**
157 * @license lucide-react v0.462.0 - ISC
158 *
159 * This source code is licensed under the ISC license.
160 * See the LICENSE file in the root directory of this source tree.
161 */const lv=bn("UserPlus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);function Km(r,d,s){if(d<1)return[];if(d===1&&s===void 0)return r;for(var _=[],z=0;z<r.length;z+=d)_.push(r[z]);return _}function cv(r,d,s){var _={width:r.width+d.width,height:r.height+d.height};return kg(_,s)}function dv(r,d,s){var _=s==="width",z=r.x,te=r.y,ue=r.width,w=r.height;return d===1?{start:_?z:te,end:_?z+ue:te+w}:{start:_?z+ue:te+w,end:_?z:te}}function du(r,d,s,_,z){if(r*d<r*_||r*d>r*z)return!1;var te=s();return r*(d-r*te/2-_)>=0&&r*(d+r*te/2-z)<=0}function uv(r,d){return Km(r,d+1)}function hv(r,d,s,_,z){for(var te=(_||[]).slice(),ue=d.start,w=d.end,O=0,t=1,f=ue,v=function(){var C=_==null?void 0:_[O];if(C===void 0)return{v:Km(_,t)};var S=O,g,j=function(){return g===void 0&&(g=s(C,S)),g},A=C.coordinate,I=O===0||du(r,A,j,f,w);I||(O=0,f=ue,t+=1),I&&(f=A+r*(j()/2+z),O+=t)},m;t<=te.length;)if(m=v(),m)return m.v;return[]}function Cd(r){"@babel/helpers - typeof";return Cd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},Cd(r)}function Vf(r,d){var s=Object.keys(r);if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(r);d&&(_=_.filter(function(z){return Object.getOwnPropertyDescriptor(r,z).enumerable})),s.push.apply(s,_)}return s}function co(r){for(var d=1;d<arguments.length;d++){var s=arguments[d]!=null?arguments[d]:{};d%2?Vf(Object(s),!0).forEach(function(_){fv(r,_,s[_])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(s)):Vf(Object(s)).forEach(function(_){Object.defineProperty(r,_,Object.getOwnPropertyDescriptor(s,_))})}return r}function fv(r,d,s){return d=mv(d),d in r?Object.defineProperty(r,d,{value:s,enumerable:!0,configurable:!0,writable:!0}):r[d]=s,r}function mv(r){var d=pv(r,"string");return Cd(d)=="symbol"?d:d+""}function pv(r,d){if(Cd(r)!="object"||!r)return r;var s=r[Symbol.toPrimitive];if(s!==void 0){var _=s.call(r,d);if(Cd(_)!="object")return _;throw new TypeError("@@toPrimitive must return a primitive value.")}return(d==="string"?String:Number)(r)}function gv(r,d,s,_,z){for(var te=(_||[]).slice(),ue=te.length,w=d.start,O=d.end,t=function(m){var y=te[m],C,S=function(){return C===void 0&&(C=s(y,m)),C};if(m===ue-1){var g=r*(y.coordinate+r*S()/2-O);te[m]=y=co(co({},y),{},{tickCoord:g>0?y.coordinate-g*r:y.coordinate})}else te[m]=y=co(co({},y),{},{tickCoord:y.coordinate});var j=du(r,y.tickCoord,S,w,O);j&&(O=y.tickCoord-r*(S()/2+z),te[m]=co(co({},y),{},{isShow:!0}))},f=ue-1;f>=0;f--)t(f);return te}function vv(r,d,s,_,z,te){var ue=(_||[]).slice(),w=ue.length,O=d.start,t=d.end;if(te){var f=_[w-1],v=s(f,w-1),m=r*(f.coordinate+r*v/2-t);ue[w-1]=f=co(co({},f),{},{tickCoord:m>0?f.coordinate-m*r:f.coordinate});var y=du(r,f.tickCoord,function(){return v},O,t);y&&(t=f.tickCoord-r*(v/2+z),ue[w-1]=co(co({},f),{},{isShow:!0}))}for(var C=te?w-1:w,S=function(A){var I=ue[A],M,B=function(){return M===void 0&&(M=s(I,A)),M};if(A===0){var W=r*(I.coordinate-r*B()/2-O);ue[A]=I=co(co({},I),{},{tickCoord:W<0?I.coordinate-W*r:I.coordinate})}else ue[A]=I=co(co({},I),{},{tickCoord:I.coordinate});var Y=du(r,I.tickCoord,B,O,t);Y&&(O=I.tickCoord+r*(B()/2+z),ue[A]=co(co({},I),{},{isShow:!0}))},g=0;g<C;g++)S(g);return ue}function xv(r,d,s){var _=r.tick,z=r.ticks,te=r.viewBox,ue=r.minTickGap,w=r.orientation,O=r.interval,t=r.tickFormatter,f=r.unit,v=r.angle;if(!z||!z.length||!_)return[];if(yh(O)||_g.isSsr)return uv(z,typeof O=="number"&&yh(O)?O:0);var m=[],y=w==="top"||w==="bottom"?"width":"height",C=f&&y==="width"?Xu(f,{fontSize:d,letterSpacing:s}):{width:0,height:0},S=function(I,M){var B=nu(t)?t(I.value,M):I.value;return y==="width"?cv(Xu(B,{fontSize:d,letterSpacing:s}),C,v):Xu(B,{fontSize:d,letterSpacing:s})[y]},g=z.length>=2?Pg(z[1].coordinate-z[0].coordinate):1,j=dv(te,g,y);return O==="equidistantPreserveStart"?hv(g,j,S,z,ue):(O==="preserveStart"||O==="preserveStartEnd"?m=vv(g,j,S,z,ue,O==="preserveStartEnd"):m=gv(g,j,S,z,ue),m.filter(function(A){return A.isShow}))}var yv=["viewBox"],jv=["viewBox"],bv=["ticks"];function _c(r){"@babel/helpers - typeof";return _c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},_c(r)}function Ac(){return Ac=Object.assign?Object.assign.bind():function(r){for(var d=1;d<arguments.length;d++){var s=arguments[d];for(var _ in s)Object.prototype.hasOwnProperty.call(s,_)&&(r[_]=s[_])}return r},Ac.apply(this,arguments)}function Wf(r,d){var s=Object.keys(r);if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(r);d&&(_=_.filter(function(z){return Object.getOwnPropertyDescriptor(r,z).enumerable})),s.push.apply(s,_)}return s}function Xa(r){for(var d=1;d<arguments.length;d++){var s=arguments[d]!=null?arguments[d]:{};d%2?Wf(Object(s),!0).forEach(function(_){Oh(r,_,s[_])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(s)):Wf(Object(s)).forEach(function(_){Object.defineProperty(r,_,Object.getOwnPropertyDescriptor(s,_))})}return r}function nh(r,d){if(r==null)return{};var s=wv(r,d),_,z;if(Object.getOwnPropertySymbols){var te=Object.getOwnPropertySymbols(r);for(z=0;z<te.length;z++)_=te[z],!(d.indexOf(_)>=0)&&Object.prototype.propertyIsEnumerable.call(r,_)&&(s[_]=r[_])}return s}function wv(r,d){if(r==null)return{};var s={};for(var _ in r)if(Object.prototype.hasOwnProperty.call(r,_)){if(d.indexOf(_)>=0)continue;s[_]=r[_]}return s}function Nv(r,d){if(!(r instanceof d))throw new TypeError("Cannot call a class as a function")}function Hf(r,d){for(var s=0;s<d.length;s++){var _=d[s];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(r,Zm(_.key),_)}}function Sv(r,d,s){return d&&Hf(r.prototype,d),s&&Hf(r,s),Object.defineProperty(r,"prototype",{writable:!1}),r}function Cv(r,d,s){return d=uu(d),Av(r,Xm()?Reflect.construct(d,s||[],uu(r).constructor):d.apply(r,s))}function Av(r,d){if(d&&(_c(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ev(r)}function Ev(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function Xm(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Xm=function(){return!!r})()}function uu(r){return uu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(s){return s.__proto__||Object.getPrototypeOf(s)},uu(r)}function kv(r,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(d&&d.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),d&&Sh(r,d)}function Sh(r,d){return Sh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(_,z){return _.__proto__=z,_},Sh(r,d)}function Oh(r,d,s){return d=Zm(d),d in r?Object.defineProperty(r,d,{value:s,enumerable:!0,configurable:!0,writable:!0}):r[d]=s,r}function Zm(r){var d=_v(r,"string");return _c(d)=="symbol"?d:d+""}function _v(r,d){if(_c(r)!="object"||!r)return r;var s=r[Symbol.toPrimitive];if(s!==void 0){var _=s.call(r,d);if(_c(_)!="object")return _;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}var bu=function(r){function d(s){var _;return Nv(this,d),_=Cv(this,d,[s]),_.state={fontSize:"",letterSpacing:""},_}return kv(d,r),Sv(d,[{key:"shouldComponentUpdate",value:function(_,z){var te=_.viewBox,ue=nh(_,yv),w=this.props,O=w.viewBox,t=nh(w,jv);return!Zu(te,O)||!Zu(ue,t)||!Zu(z,this.state)}},{key:"componentDidMount",value:function(){var _=this.layerReference;if(_){var z=_.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];z&&this.setState({fontSize:window.getComputedStyle(z).fontSize,letterSpacing:window.getComputedStyle(z).letterSpacing})}}},{key:"getTickLineCoord",value:function(_){var z=this.props,te=z.x,ue=z.y,w=z.width,O=z.height,t=z.orientation,f=z.tickSize,v=z.mirror,m=z.tickMargin,y,C,S,g,j,A,I=v?-1:1,M=_.tickSize||f,B=yh(_.tickCoord)?_.tickCoord:_.coordinate;switch(t){case"top":y=C=_.coordinate,g=ue+ +!v*O,S=g-I*M,A=S-I*m,j=B;break;case"left":S=g=_.coordinate,C=te+ +!v*w,y=C-I*M,j=y-I*m,A=B;break;case"right":S=g=_.coordinate,C=te+ +v*w,y=C+I*M,j=y+I*m,A=B;break;default:y=C=_.coordinate,g=ue+ +v*O,S=g+I*M,A=S+I*m,j=B;break}return{line:{x1:y,y1:S,x2:C,y2:g},tick:{x:j,y:A}}}},{key:"getTickTextAnchor",value:function(){var _=this.props,z=_.orientation,te=_.mirror,ue;switch(z){case"left":ue=te?"start":"end";break;case"right":ue=te?"end":"start";break;default:ue="middle";break}return ue}},{key:"getTickVerticalAnchor",value:function(){var _=this.props,z=_.orientation,te=_.mirror,ue="end";switch(z){case"left":case"right":ue="middle";break;case"top":ue=te?"start":"end";break;default:ue=te?"end":"start";break}return ue}},{key:"renderAxisLine",value:function(){var _=this.props,z=_.x,te=_.y,ue=_.width,w=_.height,O=_.orientation,t=_.mirror,f=_.axisLine,v=Xa(Xa(Xa({},rd(this.props,!1)),rd(f,!1)),{},{fill:"none"});if(O==="top"||O==="bottom"){var m=+(O==="top"&&!t||O==="bottom"&&t);v=Xa(Xa({},v),{},{x1:z,y1:te+m*w,x2:z+ue,y2:te+m*w})}else{var y=+(O==="left"&&!t||O==="right"&&t);v=Xa(Xa({},v),{},{x1:z+y*ue,y1:te,x2:z+y*ue,y2:te+w})}return Sl.createElement("line",Ac({},v,{className:Cc("recharts-cartesian-axis-line",If(f,"className"))}))}},{key:"renderTicks",value:function(_,z,te){var ue=this,w=this.props,O=w.tickLine,t=w.stroke,f=w.tick,v=w.tickFormatter,m=w.unit,y=xv(Xa(Xa({},this.props),{},{ticks:_}),z,te),C=this.getTickTextAnchor(),S=this.getTickVerticalAnchor(),g=rd(this.props,!1),j=rd(f,!1),A=Xa(Xa({},g),{},{fill:"none"},rd(O,!1)),I=y.map(function(M,B){var W=ue.getTickLineCoord(M),Y=W.line,J=W.tick,le=Xa(Xa(Xa(Xa({textAnchor:C,verticalAnchor:S},g),{},{stroke:"none",fill:t},j),J),{},{index:B,payload:M,visibleTicksCount:y.length,tickFormatter:v});return Sl.createElement(Rf,Ac({className:"recharts-cartesian-axis-tick",key:"tick-".concat(M.value,"-").concat(M.coordinate,"-").concat(M.tickCoord)},Lg(ue.props,M,B)),O&&Sl.createElement("line",Ac({},A,Y,{className:Cc("recharts-cartesian-axis-tick-line",If(O,"className"))})),f&&d.renderTickItem(f,le,"".concat(nu(v)?v(M.value,B):M.value).concat(m||"")))});return Sl.createElement("g",{className:"recharts-cartesian-axis-ticks"},I)}},{key:"render",value:function(){var _=this,z=this.props,te=z.axisLine,ue=z.width,w=z.height,O=z.ticksGenerator,t=z.className,f=z.hide;if(f)return null;var v=this.props,m=v.ticks,y=nh(v,bv),C=m;return nu(O)&&(C=m&&m.length>0?O(this.props):O(y)),ue<=0||w<=0||!C||!C.length?null:Sl.createElement(Rf,{className:Cc("recharts-cartesian-axis",t),ref:function(g){_.layerReference=g}},te&&this.renderAxisLine(),this.renderTicks(C,this.state.fontSize,this.state.letterSpacing),Og.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(_,z,te){var ue,w=Cc(z.className,"recharts-cartesian-axis-tick-value");return Sl.isValidElement(_)?ue=Sl.cloneElement(_,Xa(Xa({},z),{},{className:w})):nu(_)?ue=_(Xa(Xa({},z),{},{className:w})):ue=Sl.createElement(Tg,Ac({},z,{className:"recharts-cartesian-axis-tick-value"}),te),ue}}])}(ne.Component);Oh(bu,"displayName","CartesianAxis");Oh(bu,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});function Pc(r){"@babel/helpers - typeof";return Pc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},Pc(r)}function Pv(r,d){if(!(r instanceof d))throw new TypeError("Cannot call a class as a function")}function Tv(r,d){for(var s=0;s<d.length;s++){var _=d[s];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(r,qm(_.key),_)}}function Lv(r,d,s){return d&&Tv(r.prototype,d),Object.defineProperty(r,"prototype",{writable:!1}),r}function Ov(r,d,s){return d=hu(d),Iv(r,Jm()?Reflect.construct(d,s||[],hu(r).constructor):d.apply(r,s))}function Iv(r,d){if(d&&(Pc(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Rv(r)}function Rv(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function Jm(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Jm=function(){return!!r})()}function hu(r){return hu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(s){return s.__proto__||Object.getPrototypeOf(s)},hu(r)}function Mv(r,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(d&&d.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),d&&Ch(r,d)}function Ch(r,d){return Ch=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(_,z){return _.__proto__=z,_},Ch(r,d)}function Qm(r,d,s){return d=qm(d),d in r?Object.defineProperty(r,d,{value:s,enumerable:!0,configurable:!0,writable:!0}):r[d]=s,r}function qm(r){var d=Fv(r,"string");return Pc(d)=="symbol"?d:d+""}function Fv(r,d){if(Pc(r)!="object"||!r)return r;var s=r[Symbol.toPrimitive];if(s!==void 0){var _=s.call(r,d);if(Pc(_)!="object")return _;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}function Ah(){return Ah=Object.assign?Object.assign.bind():function(r){for(var d=1;d<arguments.length;d++){var s=arguments[d];for(var _ in s)Object.prototype.hasOwnProperty.call(s,_)&&(r[_]=s[_])}return r},Ah.apply(this,arguments)}function Dv(r){var d=r.xAxisId,s=Am(),_=Em(),z=Ig(d);return z==null?null:ne.createElement(bu,Ah({},z,{className:Cc("recharts-".concat(z.axisType," ").concat(z.axisType),z.className),viewBox:{x:0,y:0,width:s,height:_},ticksGenerator:function(ue){return km(ue,!0)}}))}var _l=function(r){function d(){return Pv(this,d),Ov(this,d,arguments)}return Mv(d,r),Lv(d,[{key:"render",value:function(){return ne.createElement(Dv,this.props)}}])}(ne.Component);Qm(_l,"displayName","XAxis");Qm(_l,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});function Tc(r){"@babel/helpers - typeof";return Tc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},Tc(r)}function Bv(r,d){if(!(r instanceof d))throw new TypeError("Cannot call a class as a function")}function Uv(r,d){for(var s=0;s<d.length;s++){var _=d[s];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(r,rp(_.key),_)}}function zv(r,d,s){return d&&Uv(r.prototype,d),Object.defineProperty(r,"prototype",{writable:!1}),r}function $v(r,d,s){return d=fu(d),Vv(r,ep()?Reflect.construct(d,s||[],fu(r).constructor):d.apply(r,s))}function Vv(r,d){if(d&&(Tc(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Wv(r)}function Wv(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function ep(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ep=function(){return!!r})()}function fu(r){return fu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(s){return s.__proto__||Object.getPrototypeOf(s)},fu(r)}
161function Hv(r,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(d&&d.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),d&&Eh(r,d)}function Eh(r,d){return Eh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(_,z){return _.__proto__=z,_},Eh(r,d)}function tp(r,d,s){return d=rp(d),d in r?Object.defineProperty(r,d,{value:s,enumerable:!0,configurable:!0,writable:!0}):r[d]=s,r}function rp(r){var d=Gv(r,"string");return Tc(d)=="symbol"?d:d+""}function Gv(r,d){if(Tc(r)!="object"||!r)return r;var s=r[Symbol.toPrimitive];if(s!==void 0){var _=s.call(r,d);if(Tc(_)!="object")return _;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}function kh(){return kh=Object.assign?Object.assign.bind():function(r){for(var d=1;d<arguments.length;d++){var s=arguments[d];for(var _ in s)Object.prototype.hasOwnProperty.call(s,_)&&(r[_]=s[_])}return r},kh.apply(this,arguments)}var Yv=function(d){var s=d.yAxisId,_=Am(),z=Em(),te=Rg(s);return te==null?null:ne.createElement(bu,kh({},te,{className:Cc("recharts-".concat(te.axisType," ").concat(te.axisType),te.className),viewBox:{x:0,y:0,width:_,height:z},ticksGenerator:function(w){return km(w,!0)}}))},Pl=function(r){function d(){return Bv(this,d),$v(this,d,arguments)}return Hv(d,r),zv(d,[{key:"render",value:function(){return ne.createElement(Yv,this.props)}}])}(ne.Component);tp(Pl,"displayName","YAxis");tp(Pl,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});var ld=Mg({chartName:"BarChart",GraphicalChild:Nc,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:_l},{axisType:"yAxis",AxisComp:Pl}],formatAxisMap:Fg}),sp={exports:{}};const Kv=mg(Eg);/*!
162 * html2pdf.js v0.14.0
163 * Copyright (c) 2026 Erik Koopmans
164 * Released under the MIT License.
165 */(function(r,d){(function(_,z){r.exports=z(Kv)})(self,function(s){return function(){var _={
vendor: 229 bytes, line 165
165"./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js":function(w,O,t){t.r(O),t.d(O,{default:function(){return f}});function f(v,m){(m==null||m>v.length)&&(m=v.length);for(var y=0,C=Array(m);y<m;y++)C[y]=v[y];return C}},
vendor: 168 bytes, line 165
165"./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js":function(w,O,t){t.r(O),t.d(O,{default:function(){return f}});function f(v){if(Array.isArray(v))return v}},
vendor: 441 bytes, line 165
165"./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js":function(w,O,t){t.r(O),t.d(O,{default:function(){return v}});function f(m,y,C,S,g,j,A){try{var I=m[j](A),M=I.value}catch(B){return void C(B)}I.done?y(M):Promise.resolve(M).then(S,g)}function v(m){return function(){var y=this,C=arguments;return new Promise(function(S,g){var j=m.apply(y,C);function A(M){f(j,S,g,A,I,"next",M)}function I(M){f(j,S,g,A,I,"throw",M)}A(void 0)})}}},
vendor: 332 bytes, line 165
165"./node_modules/@babel/runtime/helpers/esm/defineProperty.js":function(w,O,t){t.r(O),t.d(O,{default:function(){return v}});var f=t("./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js");function v(m,y,C){return(y=(0,f.default)(y))in m?Object.defineProperty(m,y,{value:C,enumerable:!0,configurable:!0,writable:!0}):m[y]=C,m}},
vendor: 518 bytes, line 165
165"./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js":function(w,O,t){t.r(O),t.d(O,{default:function(){return f}});function f(v,m){var y=v==null?null:typeof Symbol<"u"&&v[Symbol.iterator]||v["@@iterator"];if(y!=null){var C,S,g,j,A=[],I=!0,M=!1;try{if(g=(y=y.call(v)).next,m===0){if(Object(y)!==y)return;I=!1}else for(;!(I=(C=g.call(y)).done)&&(A.push(C.value),A.length!==m);I=!0);}catch(B){M=!0,S=B}finally{try{if(!I&&y.return!=null&&(j=y.return(),Object(j)!==j))return}finally{if(M)throw S}}return A}}},
vendor: 299 bytes, lines 165-166
165"./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js":function(w,O,t){t.r(O),t.d(O,{default:function(){return f}});function f(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
166In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}},
vendor: 511 bytes, line 166
166"./node_modules/@babel/runtime/helpers/esm/slicedToArray.js":function(w,O,t){t.r(O),t.d(O,{default:function(){return C}});var f=t("./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js"),v=t("./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js"),m=t("./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js"),y=t("./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js");function C(S,g){return(0,f.default)(S)||(0,v.default)(S,g)||(0,m.default)(S,g)||(0,y.default)()}},
vendor: 461 bytes, line 166
166"./node_modules/@babel/runtime/helpers/esm/toPrimitive.js":function(w,O,t){t.r(O),t.d(O,{default:function(){return v}});var f=t("./node_modules/@babel/runtime/helpers/esm/typeof.js");function v(m,y){if((0,f.default)(m)!="object"||!m)return m;var C=m[Symbol.toPrimitive];if(C!==void 0){var S=C.call(m,y||"default");if((0,f.default)(S)!="object")return S;throw new TypeError("@@toPrimitive must return a primitive value.")}return(y==="string"?String:Number)(m)}},
vendor: 337 bytes, line 166
166"./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js":function(w,O,t){t.r(O),t.d(O,{default:function(){return m}});var f=t("./node_modules/@babel/runtime/helpers/esm/typeof.js"),v=t("./node_modules/@babel/runtime/helpers/esm/toPrimitive.js");function m(y){var C=(0,v.default)(y,"string");return(0,f.default)(C)=="symbol"?C:C+""}},
vendor: 373 bytes, line 166
166"./node_modules/@babel/runtime/helpers/esm/typeof.js":function(w,O,t){t.r(O),t.d(O,{default:function(){return f}});function f(v){"@babel/helpers - typeof";return f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(m){return typeof m}:function(m){return m&&typeof Symbol=="function"&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m},f(v)}},
vendor: 506 bytes, line 166
166"./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js":function(w,O,t){t.r(O),t.d(O,{default:function(){return v}});var f=t("./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js");function v(m,y){if(m){if(typeof m=="string")return(0,f.default)(m,y);var C={}.toString.call(m).slice(8,-1);return C==="Object"&&m.constructor&&(C=m.constructor.name),C==="Map"||C==="Set"?Array.from(m):C==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(C)?(0,f.default)(m,y):void 0}}},
vendor: 85,423 bytes, line 166
166"./node_modules/canvg/lib/index.es.js":function(w,O,t){t.r(O),t.d(O,{AElement:function(){return ao},AnimateColorElement:function(){return ea},AnimateElement:function(){return is},AnimateTransformElement:function(){return Ts},BoundingBox:function(){return Ir},CB1:function(){return ye},CB2:function(){return Se},CB3:function(){return Le},CB4:function(){return st},Canvg:function(){return Ja},CircleElement:function(){return vt},ClipPathElement:function(){return ma},DefsElement:function(){return mn},DescElement:function(){return Fa},Document:function(){return ta},Element:function(){return _t},EllipseElement:function(){return Lr},FeColorMatrixElement:function(){return ba},FeCompositeElement:function(){return zo},FeDropShadowElement:function(){return Na},FeGaussianBlurElement:function(){return Va},FeMorphologyElement:function(){return pa},FilterElement:function(){return ps},Font:function(){return Wt},FontElement:function(){return Za},FontFaceElement:function(){return qs},GElement:function(){return wn},GlyphElement:function(){return Vt},GradientElement:function(){return zt},ImageElement:function(){return Yr},LineElement:function(){return Er},LinearGradientElement:function(){return Mr},MarkerElement:function(){return Ms},MaskElement:function(){return wa},Matrix:function(){return je},MissingGlyphElement:function(){return $a},Mouse:function(){return Jt},PSEUDO_ZERO:function(){return Ee},Parser:function(){return jr},PathElement:function(){return Ye},PathParser:function(){return Yt},PatternElement:function(){return Ws},Point:function(){return Kt},PolygonElement:function(){return as},PolylineElement:function(){return or},Property:function(){return He},QB1:function(){return Ke},QB2:function(){return rt},QB3:function(){return xt},RadialGradientElement:function(){return Rr},RectElement:function(){return yn},RenderedElement:function(){return zr},Rotate:function(){return et},SVGElement:function(){return Ur},SVGFontLoader:function(){return Sn},Scale:function(){return ft},Screen:function(){return yr},Skew:function(){return $e},SkewX:function(){return ht},SkewY:function(){return tt},StopElement:function(){return ws},StyleElement:function(){return En},SymbolElement:function(){return Wr},TRefElement:function(){return Ao},TSpanElement:function(){return xr},TextElement:function(){return lr},TextPathElement:function(){return Tr},TitleElement:function(){return _n},Transform:function(){return lt},Translate:function(){return Xr},UnknownElement:function(){return dr},UseElement:function(){return Nn},ViewPort:function(){return Tt},compressSpaces:function(){return I},default:function(){return Ja},getSelectorSpecificity:function(){return ge},normalizeAttributeName:function(){return J},normalizeColor:function(){return ae},parseExternalUrl:function(){return le},presets:function(){return A},toNumbers:function(){return W},trimLeft:function(){return M},trimRight:function(){return B},vectorMagnitude:function(){return Xe},vectorsAngle:function(){return Pe},vectorsRatio:function(){return re}}),t("./node_modules/core-js/modules/es.promise.js");var f=t("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js");t("./node_modules/core-js/modules/es.string.match.js"),t("./node_modules/core-js/modules/es.string.replace.js"),t("./node_modules/core-js/modules/es.string.starts-with.js"),t("./node_modules/core-js/modules/es.array.iterator.js"),t("./node_modules/core-js/modules/web.dom-collections.iterator.js");var v=t("./node_modules/@babel/runtime/helpers/esm/defineProperty.js");t("./node_modules/core-js/modules/es.array.reduce.js"),t("./node_modules/core-js/modules/es.string.ends-with.js"),t("./node_modules/core-js/modules/es.string.split.js");var m=t("./node_modules/raf/index.js");t("./node_modules/core-js/modules/es.string.trim.js");var y=t("./node_modules/rgbcolor/index.js");t("./node_modules/core-js/modules/es.array.index-of.js"),t("./node_modules/core-js/modules/es.string.includes.js"),t("./node_modules/core-js/modules/es.array.reverse.js");var C=t("./node_modules/svg-pathdata/lib/SVGPathData.module.js");t("./node_modules/core-js/modules/es.regexp.to-string.js");var S=t("./node_modules/stackblur-canvas/dist/stackblur-es.js");function g(){var{DOMParser:gt}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},u={window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:gt,createCanvas(P,T){return new OffscreenCanvas(P,T)},createImage(P){return(0,f.default)(function*(){var T=yield fetch(P),c=yield T.blob(),h=yield createImageBitmap(c);return h})()}};return(typeof DOMParser<"u"||typeof gt>"u")&&Reflect.deleteProperty(u,"DOMParser"),u}function j(gt){var{DOMParser:u,canvas:P,fetch:T}=gt;return{window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:u,fetch:T,createCanvas:P.createCanvas,createImage:P.loadImage}}var A=Object.freeze({__proto__:null,offscreen:g,node:j});function I(gt){return gt.replace(/(?!\u3000)\s+/gm," ")}function M(gt){return gt.replace(/^[\n \t]+/,"")}function B(gt){return gt.replace(/[\n \t]+$/,"")}function W(gt){var u=(gt||"").match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm)||[];return u.map(parseFloat)}var Y=/^[A-Z-]+$/;function J(gt){return Y.test(gt)?gt.toLowerCase():gt}function le(gt){var u=/url\(('([^']+)'|"([^"]+)"|([^'")]+))\)/.exec(gt)||[];return u[2]||u[3]||u[4]}function ae(gt){if(!gt.startsWith("rgb"))return gt;var u=3,P=gt.replace(/\d+(\.\d+)?/g,(T,c)=>u--&&c?String(Math.round(parseFloat(T))):T);return P}var Z=/(\[[^\]]+\])/g,oe=/(#[^\s+>~.[:]+)/g,H=/(\.[^\s+>~.[:]+)/g,fe=/(::[^\s+>~.[:]+|:first-line|:first-letter|:before|:after)/gi,se=/(:[\w-]+\([^)]*\))/gi,de=/(:[^\s+>~.[:]+)/g,q=/([^\s+>~.[:]+)/g;function U(gt,u){var P=u.exec(gt);return P?[gt.replace(u," "),P.length]:[gt,0]}function ge(gt){var u=[0,0,0],P=gt.replace(/:not\(([^)]*)\)/g,"     $1 ").replace(/{[\s\S]*/gm," "),T=0;return[P,T]=U(P,Z),u[1]+=T,[P,T]=U(P,oe),u[0]+=T,[P,T]=U(P,H),u[1]+=T,[P,T]=U(P,fe),u[2]+=T,[P,T]=U(P,se),u[1]+=T,[P,T]=U(P,de),u[1]+=T,P=P.replace(/[*\s+>~]/g," ").replace(/[#.]/g," "),[P,T]=U(P,q),u[2]+=T,u.join("")}var Ee=1e-8;function Xe(gt){return Math.sqrt(Math.pow(gt[0],2)+Math.pow(gt[1],2))}function re(gt,u){return(gt[0]*u[0]+gt[1]*u[1])/(Xe(gt)*Xe(u))}function Pe(gt,u){return(gt[0]*u[1]<gt[1]*u[0]?-1:1)*Math.acos(re(gt,u))}function ye(gt){return gt*gt*gt}function Se(gt){return 3*gt*gt*(1-gt)}function Le(gt){return 3*gt*(1-gt)*(1-gt)}function st(gt){return(1-gt)*(1-gt)*(1-gt)}function Ke(gt){return gt*gt}function rt(gt){return 2*gt*(1-gt)}function xt(gt){return(1-gt)*(1-gt)}class He{constructor(u,P,T){this.document=u,this.name=P,this.value=T,this.isNormalizedColor=!1}static empty(u){return new He(u,"EMPTY","")}split(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:" ",{document:P,name:T}=this;return I(this.getString()).trim().split(u).map(c=>new He(P,T,c))}hasValue(u){var{value:P}=this;return P!==null&&P!==""&&(u||P!==0)&&typeof P<"u"}isString(u){var{value:P}=this,T=typeof P=="string";return!T||!u?T:u.test(P)}isUrlDefinition(){return this.isString(/^url\(/)}isPixels(){if(!this.hasValue())return!1;var u=this.getString();switch(!0){case u.endsWith("px"):case/^[0-9]+$/.test(u):return!0;default:return!1}}setValue(u){return this.value=u,this}getValue(u){return typeof u>"u"||this.hasValue()?this.value:u}getNumber(u){if(!this.hasValue())return typeof u>"u"?0:parseFloat(u);var{value:P}=this,T=parseFloat(P);return this.isString(/%$/)&&(T/=100),T}getString(u){return typeof u>"u"||this.hasValue()?typeof this.value>"u"?"":String(this.value):String(u)}getColor(u){var P=this.getString(u);return this.isNormalizedColor||(this.isNormalizedColor=!0,P=ae(P),this.value=P),P}getDpi(){return 96}getRem(){return this.document.rootEmSize}getEm(){return this.document.emSize}getUnits(){return this.getString().replace(/[0-9.-]/g,"")}getPixels(u){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!this.hasValue())return 0;var[T,c]=typeof u=="boolean"?[void 0,u]:[u],{viewPort:h}=this.document.screen;switch(!0){case this.isString(/vmin$/):return this.getNumber()/100*Math.min(h.computeSize("x"),h.computeSize("y"));case this.isString(/vmax$/):return this.getNumber()/100*Math.max(h.computeSize("x"),h.computeSize("y"));case this.isString(/vw$/):return this.getNumber()/100*h.computeSize("x");case this.isString(/vh$/):return this.getNumber()/100*h.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()*.013888888888888888;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(/%$/)&&c):return this.getNumber()*this.getEm();case this.isString(/%$/):return this.getNumber()*h.computeSize(T);default:{var k=this.getNumber();return P&&k<1?k*h.computeSize(T):k}}}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 u=this.getString(),P=/#([^)'"]+)/.exec(u);return P&&(P=P[1]),P||(P=u),this.document.definitions[P]}getFillStyleDefinition(u,P){var T=this.getDefinition();if(!T)return null;if(typeof T.createGradient=="function")return T.createGradient(this.document.ctx,u,P);if(typeof T.createPattern=="function"){if(T.getHrefAttribute().hasValue()){var c=T.getAttribute("patternTransform");T=T.getHrefAttribute().getDefinition(),c.hasValue()&&T.getAttribute("patternTransform",!0).setValue(c.value)}return T.createPattern(this.document.ctx,u,P)}return null}getTextBaseline(){return this.hasValue()?He.textBaselineMapping[this.getString()]:null}addOpacity(u){for(var P=this.getColor(),T=P.length,c=0,h=0;h<T&&(P[h]===","&&c++,c!==3);h++);if(u.hasValue()&&this.isString()&&c!==3){var k=new y(P);k.ok&&(k.alpha=u.getNumber(),P=k.toRGBA())}return new He(this.document,this.name,P)}}He.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 Tt{constructor(){this.viewPorts=[]}clear(){this.viewPorts=[]}setCurrent(u,P){this.viewPorts.push({width:u,height:P})}removeCurrent(){this.viewPorts.pop()}getCurrent(){var{viewPorts:u}=this;return u[u.length-1]}get width(){return this.getCurrent().width}get height(){return this.getCurrent().height}computeSize(u){return typeof u=="number"?u:u==="x"?this.width:u==="y"?this.height:Math.sqrt(Math.pow(this.width,2)+Math.pow(this.height,2))/Math.sqrt(2)}}class Kt{constructor(u,P){this.x=u,this.y=P}static parse(u){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,[T=P,c=P]=W(u);return new Kt(T,c)}static parseScale(u){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,[T=P,c=T]=W(u);return new Kt(T,c)}static parsePath(u){for(var P=W(u),T=P.length,c=[],h=0;h<T;h+=2)c.push(new Kt(P[h],P[h+1]));return c}angleTo(u){return Math.atan2(u.y-this.y,u.x-this.x)}applyTransform(u){var{x:P,y:T}=this,c=P*u[0]+T*u[2]+u[4],h=P*u[1]+T*u[3]+u[5];this.x=c,this.y=h}}class Jt{constructor(u){this.screen=u,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:u,onClick:P,onMouseMove:T}=this,c=u.ctx.canvas;c.onclick=P,c.onmousemove=T,this.working=!0}}stop(){if(this.working){var u=this.screen.ctx.canvas;this.working=!1,u.onclick=null,u.onmousemove=null}}hasEvents(){return this.working&&this.events.length>0}runEvents(){if(this.working){var{screen:u,events:P,eventElements:T}=this,{style:c}=u.ctx.canvas;c&&(c.cursor=""),P.forEach((h,k)=>{for(var{run:$}=h,X=T[k];X;)$(X),X=X.parent}),this.events=[],this.eventElements=[]}}checkPath(u,P){if(!(!this.working||!P)){var{events:T,eventElements:c}=this;T.forEach((h,k)=>{var{x:$,y:X}=h;!c[k]&&P.isPointInPath&&P.isPointInPath($,X)&&(c[k]=u)})}}checkBoundingBox(u,P){if(!(!this.working||!P)){var{events:T,eventElements:c}=this;T.forEach((h,k)=>{var{x:$,y:X}=h;!c[k]&&P.isPointInBox($,X)&&(c[k]=u)})}}mapXY(u,P){for(var{window:T,ctx:c}=this.screen,h=new Kt(u,P),k=c.canvas;k;)h.x-=k.offsetLeft,h.y-=k.offsetTop,k=k.offsetParent;return T.scrollX&&(h.x+=T.scrollX),T.scrollY&&(h.y+=T.scrollY),h}onClick(u){var{x:P,y:T}=this.mapXY(u.clientX,u.clientY);this.events.push({type:"onclick",x:P,y:T,run(c){c.onClick&&c.onClick()}})}onMouseMove(u){var{x:P,y:T}=this.mapXY(u.clientX,u.clientY);this.events.push({type:"onmousemove",x:P,y:T,run(c){c.onMouseMove&&c.onMouseMove()}})}}var rr=typeof window<"u"?window:null,Ht=typeof fetch<"u"?fetch.bind(void 0):null;class yr{constructor(u){var{fetch:P=Ht,window:T=rr}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.ctx=u,this.FRAMERATE=30,this.MAX_VIRTUAL_PIXELS=3e4,this.CLIENT_WIDTH=800,this.CLIENT_HEIGHT=600,this.viewPort=new Tt,this.mouse=new Jt(this),this.animations=[],this.waits=[],this.frameDuration=0,this.isReadyLock=!1,this.isFirstRender=!0,this.intervalId=null,this.window=T,this.fetch=P}wait(u){this.waits.push(u)}ready(){return this.readyPromise?this.readyPromise:Promise.resolve()}isReady(){if(this.isReadyLock)return!0;var u=this.waits.every(P=>P());return u&&(this.waits=[],this.resolveReady&&this.resolveReady()),this.isReadyLock=u,u}setDefaults(u){u.strokeStyle="rgba(0,0,0,0)",u.lineCap="butt",u.lineJoin="miter",u.miterLimit=4}setViewBox(u){var{document:P,ctx:T,aspectRatio:c,width:h,desiredWidth:k,height:$,desiredHeight:X,minX:pe=0,minY:Te=0,refX:a,refY:n,clip:l=!1,clipX:p=0,clipY:b=0}=u,E=I(c).replace(/^defer\s/,""),[V,R]=E.split(" "),F=V||"xMidYMid",Q=R||"meet",he=h/k,we=$/X,Oe=Math.min(he,we),K=Math.max(he,we),Je=k,Fe=X;Q==="meet"&&(Je*=Oe,Fe*=Oe),Q==="slice"&&(Je*=K,Fe*=K);var Qe=new He(P,"refX",a),Ae=new He(P,"refY",n),ct=Qe.hasValue()&&Ae.hasValue();if(ct&&T.translate(-Oe*Qe.getPixels("x"),-Oe*Ae.getPixels("y")),l){var Ct=Oe*p,nt=Oe*b;T.beginPath(),T.moveTo(Ct,nt),T.lineTo(h,nt),T.lineTo(h,$),T.lineTo(Ct,$),T.closePath(),T.clip()}if(!ct){var Ce=Q==="meet"&&Oe===we,bt=Q==="slice"&&K===we,Gt=Q==="meet"&&Oe===he,Et=Q==="slice"&&K===he;F.startsWith("xMid")&&(Ce||bt)&&T.translate(h/2-Je/2,0),F.endsWith("YMid")&&(Gt||Et)&&T.translate(0,$/2-Fe/2),F.startsWith("xMax")&&(Ce||bt)&&T.translate(h-Je,0),F.endsWith("YMax")&&(Gt||Et)&&T.translate(0,$-Fe)}switch(!0){case F==="none":T.scale(he,we);break;case Q==="meet":T.scale(Oe,Oe);break;case Q==="slice":T.scale(K,K);break}T.translate(-pe,-Te)}start(u){var{enableRedraw:P=!1,ignoreMouse:T=!1,ignoreAnimation:c=!1,ignoreDimensions:h=!1,ignoreClear:k=!1,forceRedraw:$,scaleWidth:X,scaleHeight:pe,offsetX:Te,offsetY:a}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{FRAMERATE:n,mouse:l}=this,p=1e3/n;if(this.frameDuration=p,this.readyPromise=new Promise(F=>{this.resolveReady=F}),this.isReady()&&this.render(u,h,k,X,pe,Te,a),!!P){var b=Date.now(),E=b,V=0,R=()=>{b=Date.now(),V=b-E,V>=p&&(E=b-V%p,this.shouldUpdate(c,$)&&(this.render(u,h,k,X,pe,Te,a),l.runEvents())),this.intervalId=m(R)};T||l.start(),this.intervalId=m(R)}}stop(){this.intervalId&&(m.cancel(this.intervalId),this.intervalId=null),this.mouse.stop()}shouldUpdate(u,P){if(!u){var{frameDuration:T}=this,c=this.animations.reduce((h,k)=>k.update(T)||h,!1);if(c)return!0}return!!(typeof P=="function"&&P()||!this.isReadyLock&&this.isReady()||this.mouse.hasEvents())}render(u,P,T,c,h,k,$){var{CLIENT_WIDTH:X,CLIENT_HEIGHT:pe,viewPort:Te,ctx:a,isFirstRender:n}=this,l=a.canvas;Te.clear(),l.width&&l.height?Te.setCurrent(l.width,l.height):Te.setCurrent(X,pe);var p=u.getStyle("width"),b=u.getStyle("height");!P&&(n||typeof c!="number"&&typeof h!="number")&&(p.hasValue()&&(l.width=p.getPixels("x"),l.style&&(l.style.width="".concat(l.width,"px"))),b.hasValue()&&(l.height=b.getPixels("y"),l.style&&(l.style.height="".concat(l.height,"px"))));var E=l.clientWidth||l.width,V=l.clientHeight||l.height;if(P&&p.hasValue()&&b.hasValue()&&(E=p.getPixels("x"),V=b.getPixels("y")),Te.setCurrent(E,V),typeof k=="number"&&u.getAttribute("x",!0).setValue(k),typeof $=="number"&&u.getAttribute("y",!0).setValue($),typeof c=="number"||typeof h=="number"){var R=W(u.getAttribute("viewBox").getString()),F=0,Q=0;if(typeof c=="number"){var he=u.getStyle("width");he.hasValue()?F=he.getPixels("x")/c:isNaN(R[2])||(F=R[2]/c)}if(typeof h=="number"){var we=u.getStyle("height");we.hasValue()?Q=we.getPixels("y")/h:isNaN(R[3])||(Q=R[3]/h)}F||(F=Q),Q||(Q=F),u.getAttribute("width",!0).setValue(c),u.getAttribute("height",!0).setValue(h);var Oe=u.getStyle("transform",!0,!0);Oe.setValue("".concat(Oe.getString()," scale(").concat(1/F,", ").concat(1/Q,")"))}T||a.clearRect(0,0,E,V),u.render(a),n&&(this.isFirstRender=!1)}}yr.defaultWindow=rr,yr.defaultFetch=Ht;var{defaultFetch:gr}=yr,Vr=typeof DOMParser<"u"?DOMParser:null;class jr{constructor(){var{fetch:u=gr,DOMParser:P=Vr}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.fetch=u,this.DOMParser=P}parse(u){var P=this;return(0,f.default)(function*(){return u.startsWith("<")?P.parseFromString(u):P.load(u)})()}parseFromString(u){var P=new this.DOMParser;try{return this.checkDocument(P.parseFromString(u,"image/svg+xml"))}catch{return this.checkDocument(P.parseFromString(u,"text/xml"))}}checkDocument(u){var P=u.getElementsByTagName("parsererror")[0];if(P)throw new Error(P.textContent);return u}load(u){var P=this;return(0,f.default)(function*(){var T=yield P.fetch(u),c=yield T.text();return P.parseFromString(c)})()}}class Xr{constructor(u,P){this.type="translate",this.point=null,this.point=Kt.parse(P)}apply(u){var{x:P,y:T}=this.point;u.translate(P||0,T||0)}unapply(u){var{x:P,y:T}=this.point;u.translate(-1*P||0,-1*T||0)}applyToPoint(u){var{x:P,y:T}=this.point;u.applyTransform([1,0,0,1,P||0,T||0])}}class et{constructor(u,P,T){this.type="rotate",this.angle=null,this.originX=null,this.originY=null,this.cx=0,this.cy=0;var c=W(P);this.angle=new He(u,"angle",c[0]),this.originX=T[0],this.originY=T[1],this.cx=c[1]||0,this.cy=c[2]||0}apply(u){var{cx:P,cy:T,originX:c,originY:h,angle:k}=this,$=P+c.getPixels("x"),X=T+h.getPixels("y");u.translate($,X),u.rotate(k.getRadians()),u.translate(-$,-X)}unapply(u){var{cx:P,cy:T,originX:c,originY:h,angle:k}=this,$=P+c.getPixels("x"),X=T+h.getPixels("y");u.translate($,X),u.rotate(-1*k.getRadians()),u.translate(-$,-X)}applyToPoint(u){var{cx:P,cy:T,angle:c}=this,h=c.getRadians();u.applyTransform([1,0,0,1,P||0,T||0]),u.applyTransform([Math.cos(h),Math.sin(h),-Math.sin(h),Math.cos(h),0,0]),u.applyTransform([1,0,0,1,-P||0,-T||0])}}class ft{constructor(u,P,T){this.type="scale",this.scale=null,this.originX=null,this.originY=null;var c=Kt.parseScale(P);(c.x===0||c.y===0)&&(c.x=Ee,c.y=Ee),this.scale=c,this.originX=T[0],this.originY=T[1]}apply(u){var{scale:{x:P,y:T},originX:c,originY:h}=this,k=c.getPixels("x"),$=h.getPixels("y");u.translate(k,$),u.scale(P,T||P),u.translate(-k,-$)}unapply(u){var{scale:{x:P,y:T},originX:c,originY:h}=this,k=c.getPixels("x"),$=h.getPixels("y");u.translate(k,$),u.scale(1/P,1/T||P),u.translate(-k,-$)}applyToPoint(u){var{x:P,y:T}=this.scale;u.applyTransform([P||0,0,0,T||0,0,0])}}class je{constructor(u,P,T){this.type="matrix",this.matrix=[],this.originX=null,this.originY=null,this.matrix=W(P),this.originX=T[0],this.originY=T[1]}apply(u){var{originX:P,originY:T,matrix:c}=this,h=P.getPixels("x"),k=T.getPixels("y");u.translate(h,k),u.transform(c[0],c[1],c[2],c[3],c[4],c[5]),u.translate(-h,-k)}unapply(u){var{originX:P,originY:T,matrix:c}=this,h=c[0],k=c[2],$=c[4],X=c[1],pe=c[3],Te=c[5],a=0,n=0,l=1,p=1/(h*(pe*l-Te*n)-k*(X*l-Te*a)+$*(X*n-pe*a)),b=P.getPixels("x"),E=T.getPixels("y");u.translate(b,E),u.transform(p*(pe*l-Te*n),p*(Te*a-X*l),p*($*n-k*l),p*(h*l-$*a),p*(k*Te-$*pe),p*($*X-h*Te)),u.translate(-b,-E)}applyToPoint(u){u.applyTransform(this.matrix)}}class $e extends je{constructor(u,P,T){super(u,P,T),this.type="skew",this.angle=null,this.angle=new He(u,"angle",P)}}class ht extends $e{constructor(u,P,T){super(u,P,T),this.type="skewX",this.matrix=[1,0,Math.tan(this.angle.getRadians()),1,0,0]}}class tt extends $e{constructor(u,P,T){super(u,P,T),this.type="skewY",this.matrix=[1,Math.tan(this.angle.getRadians()),0,1,0,0]}}function Ze(gt){return I(gt).trim().replace(/\)([a-zA-Z])/g,") $1").replace(/\)(\s?,\s?)/g,") ").split(/\s(?=[a-z])/)}function Ft(gt){var[u,P]=gt.split("(");return[u.trim(),P.trim().replace(")","")]}class lt{constructor(u,P,T){this.document=u,this.transforms=[];var c=Ze(P);c.forEach(h=>{if(h!=="none"){var[k,$]=Ft(h),X=lt.transformTypes[k];typeof X<"u"&&this.transforms.push(new X(this.document,$,T))}})}static fromElement(u,P){var T=P.getStyle("transform",!1,!0),[c,h=c]=P.getStyle("transform-origin",!1,!0).split(),k=[c,h];return T.hasValue()?new lt(u,T.getString(),k):null}apply(u){for(var{transforms:P}=this,T=P.length,c=0;c<T;c++)P[c].apply(u)}unapply(u){for(var{transforms:P}=this,T=P.length,c=T-1;c>=0;c--)P[c].unapply(u)}applyToPoint(u){for(var{transforms:P}=this,T=P.length,c=0;c<T;c++)P[c].applyToPoint(u)}}lt.transformTypes={translate:Xr,rotate:et,scale:ft,matrix:je,skewX:ht,skewY:tt};class _t{constructor(u,P){var T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(this.document=u,this.node=P,this.captureTextNodes=T,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=[],!(!P||P.nodeType!==1)){if(Array.from(P.attributes).forEach($=>{var X=J($.nodeName);this.attributes[X]=new He(u,X,$.value)}),this.addStylesFromStyleDefinition(),this.getAttribute("style").hasValue()){var c=this.getAttribute("style").getString().split(";").map($=>$.trim());c.forEach($=>{if($){var[X,pe]=$.split(":").map(Te=>Te.trim());this.styles[X]=new He(u,X,pe)}})}var{definitions:h}=u,k=this.getAttribute("id");k.hasValue()&&(h[k.getString()]||(h[k.getString()]=this)),Array.from(P.childNodes).forEach($=>{if($.nodeType===1)this.addChild($);else if(T&&($.nodeType===3||$.nodeType===4)){var X=u.createTextNode($);X.getText().length>0&&this.addChild(X)}})}}getAttribute(u){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,T=this.attributes[u];if(!T&&P){var c=new He(this.document,u,"");return this.attributes[u]=c,c}return T||He.empty(this.document)}getHrefAttribute(){for(var u in this.attributes)if(u==="href"||u.endsWith(":href"))return this.attributes[u];return He.empty(this.document)}getStyle(u){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,c=this.styles[u];if(c)return c;var h=this.getAttribute(u);if(h!=null&&h.hasValue())return this.styles[u]=h,h;if(!T){var{parent:k}=this;if(k){var $=k.getStyle(u);if($!=null&&$.hasValue())return $}}if(P){var X=new He(this.document,u,"");return this.styles[u]=X,X}return c||He.empty(this.document)}render(u){if(!(this.getStyle("display").getString()==="none"||this.getStyle("visibility").getString()==="hidden")){if(u.save(),this.getStyle("mask").hasValue()){var P=this.getStyle("mask").getDefinition();P&&(this.applyEffects(u),P.apply(u,this))}else if(this.getStyle("filter").getValue("none")!=="none"){var T=this.getStyle("filter").getDefinition();T&&(this.applyEffects(u),T.apply(u,this))}else this.setContext(u),this.renderChildren(u),this.clearContext(u);u.restore()}}setContext(u){}applyEffects(u){var P=lt.fromElement(this.document,this);P&&P.apply(u);var T=this.getStyle("clip-path",!1,!0);if(T.hasValue()){var c=T.getDefinition();c&&c.apply(u)}}clearContext(u){}renderChildren(u){this.children.forEach(P=>{P.render(u)})}addChild(u){var P=u instanceof _t?u:this.document.createElement(u);P.parent=this,_t.ignoreChildTypes.includes(P.type)||this.children.push(P)}matchesSelector(u){var P,{node:T}=this;if(typeof T.matches=="function")return T.matches(u);var c=(P=T.getAttribute)===null||P===void 0?void 0:P.call(T,"class");return!c||c===""?!1:c.split(" ").some(h=>".".concat(h)===u)}addStylesFromStyleDefinition(){var{styles:u,stylesSpecificity:P}=this.document;for(var T in u)if(!T.startsWith("@")&&this.matchesSelector(T)){var c=u[T],h=P[T];if(c)for(var k in c){var $=this.stylesSpecificity[k];typeof $>"u"&&($="000"),h>=$&&(this.styles[k]=c[k],this.stylesSpecificity[k]=h)}}}removeStyles(u,P){var T=P.reduce((c,h)=>{var k=u.getStyle(h);if(!k.hasValue())return c;var $=k.getString();return k.setValue(""),[...c,[h,$]]},[]);return T}restoreStyles(u,P){P.forEach(T=>{var[c,h]=T;u.getStyle(c,!0).setValue(h)})}isFirstChild(){var u;return((u=this.parent)===null||u===void 0?void 0:u.children.indexOf(this))===0}}_t.ignoreChildTypes=["title"];class dr extends _t{constructor(u,P,T){super(u,P,T)}}function fr(gt){var u=gt.trim();return/^('|")/.test(u)?u:'"'.concat(u,'"')}function It(gt){return typeof process>"u"?gt:gt.trim().split(",").map(fr).join(",")}function nr(gt){if(!gt)return"";var u=gt.trim().toLowerCase();switch(u){case"normal":case"italic":case"oblique":case"inherit":case"initial":case"unset":return u;default:return/^oblique\s+(-|)\d+deg$/.test(u)?u:""}}function Cr(gt){if(!gt)return"";var u=gt.trim().toLowerCase();switch(u){case"normal":case"bold":case"lighter":case"bolder":case"inherit":case"initial":case"unset":return u;default:return/^[\d.]+$/.test(u)?u:""}}class Wt{constructor(u,P,T,c,h,k){var $=k?typeof k=="string"?Wt.parse(k):k:{};this.fontFamily=h||$.fontFamily,this.fontSize=c||$.fontSize,this.fontStyle=u||$.fontStyle,this.fontWeight=T||$.fontWeight,this.fontVariant=P||$.fontVariant}static parse(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",P=arguments.length>1?arguments[1]:void 0,T="",c="",h="",k="",$="",X=I(u).trim().split(" "),pe={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1};return X.forEach(Te=>{switch(!0){case(!pe.fontStyle&&Wt.styles.includes(Te)):Te!=="inherit"&&(T=Te),pe.fontStyle=!0;break;case(!pe.fontVariant&&Wt.variants.includes(Te)):Te!=="inherit"&&(c=Te),pe.fontStyle=!0,pe.fontVariant=!0;break;case(!pe.fontWeight&&Wt.weights.includes(Te)):Te!=="inherit"&&(h=Te),pe.fontStyle=!0,pe.fontVariant=!0,pe.fontWeight=!0;break;case!pe.fontSize:Te!=="inherit"&&([k]=Te.split("/")),pe.fontStyle=!0,pe.fontVariant=!0,pe.fontWeight=!0,pe.fontSize=!0;break;default:Te!=="inherit"&&($+=Te)}}),new Wt(T,c,h,k,$,P)}toString(){return[nr(this.fontStyle),this.fontVariant,Cr(this.fontWeight),this.fontSize,It(this.fontFamily)].join(" ").trim()}}Wt.styles="normal|italic|oblique|inherit",Wt.variants="normal|small-caps|inherit",Wt.weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit";class Ir{constructor(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Number.NaN,P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.NaN,T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Number.NaN,c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Number.NaN;this.x1=u,this.y1=P,this.x2=T,this.y2=c,this.addPoint(u,P),this.addPoint(T,c)}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(u,P){typeof u<"u"&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=u,this.x2=u),u<this.x1&&(this.x1=u),u>this.x2&&(this.x2=u)),typeof P<"u"&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=P,this.y2=P),P<this.y1&&(this.y1=P),P>this.y2&&(this.y2=P))}addX(u){this.addPoint(u,null)}addY(u){this.addPoint(null,u)}addBoundingBox(u){if(u){var{x1:P,y1:T,x2:c,y2:h}=u;this.addPoint(P,T),this.addPoint(c,h)}}sumCubic(u,P,T,c,h){return Math.pow(1-u,3)*P+3*Math.pow(1-u,2)*u*T+3*(1-u)*Math.pow(u,2)*c+Math.pow(u,3)*h}bezierCurveAdd(u,P,T,c,h){var k=6*P-12*T+6*c,$=-3*P+9*T-9*c+3*h,X=3*T-3*P;if($===0){if(k===0)return;var pe=-X/k;0<pe&&pe<1&&(u?this.addX(this.sumCubic(pe,P,T,c,h)):this.addY(this.sumCubic(pe,P,T,c,h)));return}var Te=Math.pow(k,2)-4*X*$;if(!(Te<0)){var a=(-k+Math.sqrt(Te))/(2*$);0<a&&a<1&&(u?this.addX(this.sumCubic(a,P,T,c,h)):this.addY(this.sumCubic(a,P,T,c,h)));var n=(-k-Math.sqrt(Te))/(2*$);0<n&&n<1&&(u?this.addX(this.sumCubic(n,P,T,c,h)):this.addY(this.sumCubic(n,P,T,c,h)))}}addBezierCurve(u,P,T,c,h,k,$,X){this.addPoint(u,P),this.addPoint($,X),this.bezierCurveAdd(!0,u,T,h,$),this.bezierCurveAdd(!1,P,c,k,X)}addQuadraticCurve(u,P,T,c,h,k){var $=u+.6666666666666666*(T-u),X=P+2/3*(c-P),pe=$+1/3*(h-u),Te=X+1/3*(k-P);this.addBezierCurve(u,P,$,pe,X,Te,h,k)}isPointInBox(u,P){var{x1:T,y1:c,x2:h,y2:k}=this;return T<=u&&u<=h&&c<=P&&P<=k}}class Yt extends C.SVGPathData{constructor(u){super(u.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 Kt(0,0),this.control=new Kt(0,0),this.current=new Kt(0,0),this.points=[],this.angles=[]}isEnd(){var{i:u,commands:P}=this;return u>=P.length-1}next(){var u=this.commands[++this.i];return this.previousCommand=this.command,this.command=u,u}getPoint(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"x",P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"y",T=new Kt(this.command[u],this.command[P]);return this.makeAbsolute(T)}getAsControlPoint(u,P){var T=this.getPoint(u,P);return this.control=T,T}getAsCurrentPoint(u,P){var T=this.getPoint(u,P);return this.current=T,T}getReflectedControlPoint(){var u=this.previousCommand.type;if(u!==C.SVGPathData.CURVE_TO&&u!==C.SVGPathData.SMOOTH_CURVE_TO&&u!==C.SVGPathData.QUAD_TO&&u!==C.SVGPathData.SMOOTH_QUAD_TO)return this.current;var{current:{x:P,y:T},control:{x:c,y:h}}=this,k=new Kt(2*P-c,2*T-h);return k}makeAbsolute(u){if(this.command.relative){var{x:P,y:T}=this.current;u.x+=P,u.y+=T}return u}addMarker(u,P,T){var{points:c,angles:h}=this;T&&h.length>0&&!h[h.length-1]&&(h[h.length-1]=c[c.length-1].angleTo(T)),this.addMarkerAngle(u,P?P.angleTo(u):null)}addMarkerAngle(u,P){this.points.push(u),this.angles.push(P)}getMarkerPoints(){return this.points}getMarkerAngles(){for(var{angles:u}=this,P=u.length,T=0;T<P;T++)if(!u[T]){for(var c=T+1;c<P;c++)if(u[c]){u[T]=u[c];break}}return u}}class zr extends _t{constructor(){super(...arguments),this.modifiedEmSizeStack=!1}calculateOpacity(){for(var u=1,P=this;P;){var T=P.getStyle("opacity",!1,!0);T.hasValue(!0)&&(u*=T.getNumber()),P=P.parent}return u}setContext(u){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!P){var T=this.getStyle("fill"),c=this.getStyle("fill-opacity"),h=this.getStyle("stroke"),k=this.getStyle("stroke-opacity");if(T.isUrlDefinition()){var $=T.getFillStyleDefinition(this,c);$&&(u.fillStyle=$)}else if(T.hasValue()){T.getString()==="currentColor"&&T.setValue(this.getStyle("color").getColor());var X=T.getColor();X!=="inherit"&&(u.fillStyle=X==="none"?"rgba(0,0,0,0)":X)}if(c.hasValue()){var pe=new He(this.document,"fill",u.fillStyle).addOpacity(c).getColor();u.fillStyle=pe}if(h.isUrlDefinition()){var Te=h.getFillStyleDefinition(this,k);Te&&(u.strokeStyle=Te)}else if(h.hasValue()){h.getString()==="currentColor"&&h.setValue(this.getStyle("color").getColor());var a=h.getString();a!=="inherit"&&(u.strokeStyle=a==="none"?"rgba(0,0,0,0)":a)}if(k.hasValue()){var n=new He(this.document,"stroke",u.strokeStyle).addOpacity(k).getString();u.strokeStyle=n}var l=this.getStyle("stroke-width");if(l.hasValue()){var p=l.getPixels();u.lineWidth=p||Ee}var b=this.getStyle("stroke-linecap"),E=this.getStyle("stroke-linejoin"),V=this.getStyle("stroke-miterlimit"),R=this.getStyle("stroke-dasharray"),F=this.getStyle("stroke-dashoffset");if(b.hasValue()&&(u.lineCap=b.getString()),E.hasValue()&&(u.lineJoin=E.getString()),V.hasValue()&&(u.miterLimit=V.getNumber()),R.hasValue()&&R.getString()!=="none"){var Q=W(R.getString());typeof u.setLineDash<"u"?u.setLineDash(Q):typeof u.webkitLineDash<"u"?u.webkitLineDash=Q:typeof u.mozDash<"u"&&!(Q.length===1&&Q[0]===0)&&(u.mozDash=Q);var he=F.getPixels();typeof u.lineDashOffset<"u"?u.lineDashOffset=he:typeof u.webkitLineDashOffset<"u"?u.webkitLineDashOffset=he:typeof u.mozDashOffset<"u"&&(u.mozDashOffset=he)}}if(this.modifiedEmSizeStack=!1,typeof u.font<"u"){var we=this.getStyle("font"),Oe=this.getStyle("font-style"),K=this.getStyle("font-variant"),Je=this.getStyle("font-weight"),Fe=this.getStyle("font-size"),Qe=this.getStyle("font-family"),Ae=new Wt(Oe.getString(),K.getString(),Je.getString(),Fe.hasValue()?"".concat(Fe.getPixels(!0),"px"):"",Qe.getString(),Wt.parse(we.getString(),u.font));Oe.setValue(Ae.fontStyle),K.setValue(Ae.fontVariant),Je.setValue(Ae.fontWeight),Fe.setValue(Ae.fontSize),Qe.setValue(Ae.fontFamily),u.font=Ae.toString(),Fe.isPixels()&&(this.document.emSize=Fe.getPixels(),this.modifiedEmSizeStack=!0)}P||(this.applyEffects(u),u.globalAlpha=this.calculateOpacity())}clearContext(u){super.clearContext(u),this.modifiedEmSizeStack&&this.document.popEmSize()}}class Ye extends zr{constructor(u,P,T){super(u,P,T),this.type="path",this.pathParser=null,this.pathParser=new Yt(this.getAttribute("d").getString())}path(u){var{pathParser:P}=this,T=new Ir;for(P.reset(),u&&u.beginPath();!P.isEnd();)switch(P.next().type){case Yt.MOVE_TO:this.pathM(u,T);break;case Yt.LINE_TO:this.pathL(u,T);break;case Yt.HORIZ_LINE_TO:this.pathH(u,T);break;case Yt.VERT_LINE_TO:this.pathV(u,T);break;case Yt.CURVE_TO:this.pathC(u,T);break;case Yt.SMOOTH_CURVE_TO:this.pathS(u,T);break;case Yt.QUAD_TO:this.pathQ(u,T);break;case Yt.SMOOTH_QUAD_TO:this.pathT(u,T);break;case Yt.ARC:this.pathA(u,T);break;case Yt.CLOSE_PATH:this.pathZ(u,T);break}return T}getBoundingBox(u){return this.path()}getMarkers(){var{pathParser:u}=this,P=u.getMarkerPoints(),T=u.getMarkerAngles(),c=P.map((h,k)=>[h,T[k]]);return c}renderChildren(u){this.path(u),this.document.screen.mouse.checkPath(this,u);var P=this.getStyle("fill-rule");u.fillStyle!==""&&(P.getString("inherit")!=="inherit"?u.fill(P.getString()):u.fill()),u.strokeStyle!==""&&(this.getAttribute("vector-effect").getString()==="non-scaling-stroke"?(u.save(),u.setTransform(1,0,0,1,0,0),u.stroke(),u.restore()):u.stroke());var T=this.getMarkers();if(T){var c=T.length-1,h=this.getStyle("marker-start"),k=this.getStyle("marker-mid"),$=this.getStyle("marker-end");if(h.isUrlDefinition()){var X=h.getDefinition(),[pe,Te]=T[0];X.render(u,pe,Te)}if(k.isUrlDefinition())for(var a=k.getDefinition(),n=1;n<c;n++){var[l,p]=T[n];a.render(u,l,p)}if($.isUrlDefinition()){var b=$.getDefinition(),[E,V]=T[c];b.render(u,E,V)}}}static pathM(u){var P=u.getAsCurrentPoint();return u.start=u.current,{point:P}}pathM(u,P){var{pathParser:T}=this,{point:c}=Ye.pathM(T),{x:h,y:k}=c;T.addMarker(c),P.addPoint(h,k),u&&u.moveTo(h,k)}static pathL(u){var{current:P}=u,T=u.getAsCurrentPoint();return{current:P,point:T}}pathL(u,P){var{pathParser:T}=this,{current:c,point:h}=Ye.pathL(T),{x:k,y:$}=h;T.addMarker(h,c),P.addPoint(k,$),u&&u.lineTo(k,$)}static pathH(u){var{current:P,command:T}=u,c=new Kt((T.relative?P.x:0)+T.x,P.y);return u.current=c,{current:P,point:c}}pathH(u,P){var{pathParser:T}=this,{current:c,point:h}=Ye.pathH(T),{x:k,y:$}=h;T.addMarker(h,c),P.addPoint(k,$),u&&u.lineTo(k,$)}static pathV(u){var{current:P,command:T}=u,c=new Kt(P.x,(T.relative?P.y:0)+T.y);return u.current=c,{current:P,point:c}}pathV(u,P){var{pathParser:T}=this,{current:c,point:h}=Ye.pathV(T),{x:k,y:$}=h;T.addMarker(h,c),P.addPoint(k,$),u&&u.lineTo(k,$)}static pathC(u){var{current:P}=u,T=u.getPoint("x1","y1"),c=u.getAsControlPoint("x2","y2"),h=u.getAsCurrentPoint();return{current:P,point:T,controlPoint:c,currentPoint:h}}pathC(u,P){var{pathParser:T}=this,{current:c,point:h,controlPoint:k,currentPoint:$}=Ye.pathC(T);T.addMarker($,k,h),P.addBezierCurve(c.x,c.y,h.x,h.y,k.x,k.y,$.x,$.y),u&&u.bezierCurveTo(h.x,h.y,k.x,k.y,$.x,$.y)}static pathS(u){var{current:P}=u,T=u.getReflectedControlPoint(),c=u.getAsControlPoint("x2","y2"),h=u.getAsCurrentPoint();return{current:P,point:T,controlPoint:c,currentPoint:h}}pathS(u,P){var{pathParser:T}=this,{current:c,point:h,controlPoint:k,currentPoint:$}=Ye.pathS(T);T.addMarker($,k,h),P.addBezierCurve(c.x,c.y,h.x,h.y,k.x,k.y,$.x,$.y),u&&u.bezierCurveTo(h.x,h.y,k.x,k.y,$.x,$.y)}static pathQ(u){var{current:P}=u,T=u.getAsControlPoint("x1","y1"),c=u.getAsCurrentPoint();return{current:P,controlPoint:T,currentPoint:c}}pathQ(u,P){var{pathParser:T}=this,{current:c,controlPoint:h,currentPoint:k}=Ye.pathQ(T);T.addMarker(k,h,h),P.addQuadraticCurve(c.x,c.y,h.x,h.y,k.x,k.y),u&&u.quadraticCurveTo(h.x,h.y,k.x,k.y)}static pathT(u){var{current:P}=u,T=u.getReflectedControlPoint();u.control=T;var c=u.getAsCurrentPoint();return{current:P,controlPoint:T,currentPoint:c}}pathT(u,P){var{pathParser:T}=this,{current:c,controlPoint:h,currentPoint:k}=Ye.pathT(T);T.addMarker(k,h,h),P.addQuadraticCurve(c.x,c.y,h.x,h.y,k.x,k.y),u&&u.quadraticCurveTo(h.x,h.y,k.x,k.y)}static pathA(u){var{current:P,command:T}=u,{rX:c,rY:h,xRot:k,lArcFlag:$,sweepFlag:X}=T,pe=k*(Math.PI/180),Te=u.getAsCurrentPoint(),a=new Kt(Math.cos(pe)*(P.x-Te.x)/2+Math.sin(pe)*(P.y-Te.y)/2,-Math.sin(pe)*(P.x-Te.x)/2+Math.cos(pe)*(P.y-Te.y)/2),n=Math.pow(a.x,2)/Math.pow(c,2)+Math.pow(a.y,2)/Math.pow(h,2);n>1&&(c*=Math.sqrt(n),h*=Math.sqrt(n));var l=($===X?-1:1)*Math.sqrt((Math.pow(c,2)*Math.pow(h,2)-Math.pow(c,2)*Math.pow(a.y,2)-Math.pow(h,2)*Math.pow(a.x,2))/(Math.pow(c,2)*Math.pow(a.y,2)+Math.pow(h,2)*Math.pow(a.x,2)));isNaN(l)&&(l=0);var p=new Kt(l*c*a.y/h,l*-h*a.x/c),b=new Kt((P.x+Te.x)/2+Math.cos(pe)*p.x-Math.sin(pe)*p.y,(P.y+Te.y)/2+Math.sin(pe)*p.x+Math.cos(pe)*p.y),E=Pe([1,0],[(a.x-p.x)/c,(a.y-p.y)/h]),V=[(a.x-p.x)/c,(a.y-p.y)/h],R=[(-a.x-p.x)/c,(-a.y-p.y)/h],F=Pe(V,R);return re(V,R)<=-1&&(F=Math.PI),re(V,R)>=1&&(F=0),{currentPoint:Te,rX:c,rY:h,sweepFlag:X,xAxisRotation:pe,centp:b,a1:E,ad:F}}pathA(u,P){var{pathParser:T}=this,{currentPoint:c,rX:h,rY:k,sweepFlag:$,xAxisRotation:X,centp:pe,a1:Te,ad:a}=Ye.pathA(T),n=1-$?1:-1,l=Te+n*(a/2),p=new Kt(pe.x+h*Math.cos(l),pe.y+k*Math.sin(l));if(T.addMarkerAngle(p,l-n*Math.PI/2),T.addMarkerAngle(c,l-n*Math.PI),P.addPoint(c.x,c.y),u&&!isNaN(Te)&&!isNaN(a)){var b=h>k?h:k,E=h>k?1:h/k,V=h>k?k/h:1;u.translate(pe.x,pe.y),u.rotate(X),u.scale(E,V),u.arc(0,0,b,Te,Te+a,!!(1-$)),u.scale(1/E,1/V),u.rotate(-X),u.translate(-pe.x,-pe.y)}}static pathZ(u){u.current=u.start}pathZ(u,P){Ye.pathZ(this.pathParser),u&&P.x1!==P.x2&&P.y1!==P.y2&&u.closePath()}}class Vt extends Ye{constructor(u,P,T){super(u,P,T),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 lr extends zr{constructor(u,P,T){super(u,P,new.target===lr?!0:T),this.type="text",this.x=0,this.y=0,this.measureCache=-1}setContext(u){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;super.setContext(u,P);var T=this.getStyle("dominant-baseline").getTextBaseline()||this.getStyle("alignment-baseline").getTextBaseline();T&&(u.textBaseline=T)}initializeCoordinates(){this.x=0,this.y=0,this.leafTexts=[],this.textChunkStart=0,this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY}getBoundingBox(u){if(this.type!=="text")return this.getTElementBoundingBox(u);this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(u);var P=null;return this.children.forEach((T,c)=>{var h=this.getChildBoundingBox(u,this,this,c);P?P.addBoundingBox(h):P=h}),P}getFontSize(){var{document:u,parent:P}=this,T=Wt.parse(u.ctx.font).fontSize,c=P.getStyle("font-size").getNumber(T);return c}getTElementBoundingBox(u){var P=this.getFontSize();return new Ir(this.x,this.y-P,this.x+this.measureText(u),this.y)}getGlyph(u,P,T){var c=P[T],h=null;if(u.isArabic){var k=P.length,$=P[T-1],X=P[T+1],pe="isolated";if((T===0||$===" ")&&T<k-1&&X!==" "&&(pe="terminal"),T>0&&$!==" "&&T<k-1&&X!==" "&&(pe="medial"),T>0&&$!==" "&&(T===k-1||X===" ")&&(pe="initial"),typeof u.glyphs[c]<"u"){var Te=u.glyphs[c];h=Te instanceof Vt?Te:Te[pe]}}else h=u.glyphs[c];return h||(h=u.missingGlyph),h}getText(){return""}getTextFromNode(u){var P=u||this.node,T=Array.from(P.parentNode.childNodes),c=T.indexOf(P),h=T.length-1,k=I(P.textContent||"");return c===0&&(k=M(k)),c===h&&(k=B(k)),k}renderChildren(u){if(this.type!=="text"){this.renderTElementChildren(u);return}this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(u),this.children.forEach((T,c)=>{this.renderChild(u,this,this,c)});var{mouse:P}=this.document.screen;P.isWorking()&&P.checkBoundingBox(this,this.getBoundingBox(u))}renderTElementChildren(u){var{document:P,parent:T}=this,c=this.getText(),h=T.getStyle("font-family").getDefinition();if(h){for(var{unitsPerEm:k}=h.fontFace,$=Wt.parse(P.ctx.font),X=T.getStyle("font-size").getNumber($.fontSize),pe=T.getStyle("font-style").getString($.fontStyle),Te=X/k,a=h.isRTL?c.split("").reverse().join(""):c,n=W(T.getAttribute("dx").getString()),l=a.length,p=0;p<l;p++){var b=this.getGlyph(h,a,p);u.translate(this.x,this.y),u.scale(Te,-Te);var E=u.lineWidth;u.lineWidth=u.lineWidth*k/X,pe==="italic"&&u.transform(1,0,.4,1,0,0),b.render(u),pe==="italic"&&u.transform(1,0,-.4,1,0,0),u.lineWidth=E,u.scale(1/Te,-1/Te),u.translate(-this.x,-this.y),this.x+=X*(b.horizAdvX||h.horizAdvX)/k,typeof n[p]<"u"&&!isNaN(n[p])&&(this.x+=n[p])}return}var{x:V,y:R}=this;u.fillStyle&&u.fillText(c,V,R),u.strokeStyle&&u.strokeText(c,V,R)}applyAnchoring(){if(!(this.textChunkStart>=this.leafTexts.length)){var u=this.leafTexts[this.textChunkStart],P=u.getStyle("text-anchor").getString("start"),T=!1,c=0;P==="start"&&!T||P==="end"&&T?c=u.x-this.minX:P==="end"&&!T||P==="start"&&T?c=u.x-this.maxX:c=u.x-(this.minX+this.maxX)/2;for(var h=this.textChunkStart;h<this.leafTexts.length;h++)this.leafTexts[h].x+=c;this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY,this.textChunkStart=this.leafTexts.length}}adjustChildCoordinatesRecursive(u){this.children.forEach((P,T)=>{this.adjustChildCoordinatesRecursiveCore(u,this,this,T)}),this.applyAnchoring()}adjustChildCoordinatesRecursiveCore(u,P,T,c){var h=T.children[c];h.children.length>0?h.children.forEach((k,$)=>{P.adjustChildCoordinatesRecursiveCore(u,P,h,$)}):this.adjustChildCoordinates(u,P,T,c)}adjustChildCoordinates(u,P,T,c){var h=T.children[c];if(typeof h.measureText!="function")return h;u.save(),h.setContext(u,!0);var k=h.getAttribute("x"),$=h.getAttribute("y"),X=h.getAttribute("dx"),pe=h.getAttribute("dy"),Te=h.getStyle("font-family").getDefinition(),a=!!Te&&Te.isRTL;c===0&&(k.hasValue()||k.setValue(h.getInheritedAttribute("x")),$.hasValue()||$.setValue(h.getInheritedAttribute("y")),X.hasValue()||X.setValue(h.getInheritedAttribute("dx")),pe.hasValue()||pe.setValue(h.getInheritedAttribute("dy")));var n=h.measureText(u);return a&&(P.x-=n),k.hasValue()?(P.applyAnchoring(),h.x=k.getPixels("x"),X.hasValue()&&(h.x+=X.getPixels("x"))):(X.hasValue()&&(P.x+=X.getPixels("x")),h.x=P.x),P.x=h.x,a||(P.x+=n),$.hasValue()?(h.y=$.getPixels("y"),pe.hasValue()&&(h.y+=pe.getPixels("y"))):(pe.hasValue()&&(P.y+=pe.getPixels("y")),h.y=P.y),P.y=h.y,P.leafTexts.push(h),P.minX=Math.min(P.minX,h.x,h.x+n),P.maxX=Math.max(P.maxX,h.x,h.x+n),h.clearContext(u),u.restore(),h}getChildBoundingBox(u,P,T,c){var h=T.children[c];if(typeof h.getBoundingBox!="function")return null;var k=h.getBoundingBox(u);return k?(h.children.forEach(($,X)=>{var pe=P.getChildBoundingBox(u,P,h,X);k.addBoundingBox(pe)}),k):null}renderChild(u,P,T,c){var h=T.children[c];h.render(u),h.children.forEach((k,$)=>{P.renderChild(u,P,h,$)})}measureText(u){var{measureCache:P}=this;if(~P)return P;var T=this.getText(),c=this.measureTargetText(u,T);return this.measureCache=c,c}measureTargetText(u,P){if(!P.length)return 0;var{parent:T}=this,c=T.getStyle("font-family").getDefinition();if(c){for(var h=this.getFontSize(),k=c.isRTL?P.split("").reverse().join(""):P,$=W(T.getAttribute("dx").getString()),X=k.length,pe=0,Te=0;Te<X;Te++){var a=this.getGlyph(c,k,Te);pe+=(a.horizAdvX||c.horizAdvX)*h/c.fontFace.unitsPerEm,typeof $[Te]<"u"&&!isNaN($[Te])&&(pe+=$[Te])}return pe}if(!u.measureText)return P.length*10;u.save(),this.setContext(u,!0);var{width:n}=u.measureText(P);return this.clearContext(u),u.restore(),n}getInheritedAttribute(u){for(var P=this;P instanceof lr&&P.isFirstChild();){var T=P.parent.getAttribute(u);if(T.hasValue(!0))return T.getValue("0");P=P.parent}return null}}class xr extends lr{constructor(u,P,T){super(u,P,new.target===xr?!0:T),this.type="tspan",this.text=this.children.length>0?"":this.getTextFromNode()}getText(){return this.text}}class Pr extends xr{constructor(){super(...arguments),this.type="textNode"}}class Ur extends zr{constructor(){super(...arguments),this.type="svg",this.root=!1}setContext(u){var P,{document:T}=this,{screen:c,window:h}=T,k=u.canvas;if(c.setDefaults(u),k.style&&typeof u.font<"u"&&h&&typeof h.getComputedStyle<"u"){u.font=h.getComputedStyle(k).getPropertyValue("font");var $=new He(T,"fontSize",Wt.parse(u.font).fontSize);$.hasValue()&&(T.rootEmSize=$.getPixels("y"),T.emSize=T.rootEmSize)}this.getAttribute("x").hasValue()||this.getAttribute("x",!0).setValue(0),this.getAttribute("y").hasValue()||this.getAttribute("y",!0).setValue(0);var{width:X,height:pe}=c.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 Te=this.getAttribute("refX"),a=this.getAttribute("refY"),n=this.getAttribute("viewBox"),l=n.hasValue()?W(n.getString()):null,p=!this.root&&this.getStyle("overflow").getValue("hidden")!=="visible",b=0,E=0,V=0,R=0;l&&(b=l[0],E=l[1]),this.root||(X=this.getStyle("width").getPixels("x"),pe=this.getStyle("height").getPixels("y"),this.type==="marker"&&(V=b,R=E,b=0,E=0)),c.viewPort.setCurrent(X,pe),this.node&&(!this.parent||((P=this.node.parentNode)===null||P===void 0?void 0:P.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(u),u.translate(this.getAttribute("x").getPixels("x"),this.getAttribute("y").getPixels("y")),l&&(X=l[2],pe=l[3]),T.setViewBox({ctx:u,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:c.viewPort.width,desiredWidth:X,height:c.viewPort.height,desiredHeight:pe,minX:b,minY:E,refX:Te.getValue(),refY:a.getValue(),clip:p,clipX:V,clipY:R}),l&&(c.viewPort.removeCurrent(),c.viewPort.setCurrent(X,pe))}clearContext(u){super.clearContext(u),this.document.screen.viewPort.removeCurrent()}resize(u){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u,T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,c=this.getAttribute("width",!0),h=this.getAttribute("height",!0),k=this.getAttribute("viewBox"),$=this.getAttribute("style"),X=c.getNumber(0),pe=h.getNumber(0);if(T)if(typeof T=="string")this.getAttribute("preserveAspectRatio",!0).setValue(T);else{var Te=this.getAttribute("preserveAspectRatio");Te.hasValue()&&Te.setValue(Te.getString().replace(/^\s*(\S.*\S)\s*$/,"$1"))}if(c.setValue(u),h.setValue(P),k.hasValue()||k.setValue("0 0 ".concat(X||u," ").concat(pe||P)),$.hasValue()){var a=this.getStyle("width"),n=this.getStyle("height");a.hasValue()&&a.setValue("".concat(u,"px")),n.hasValue()&&n.setValue("".concat(P,"px"))}}}class yn extends Ye{constructor(){super(...arguments),this.type="rect"}path(u){var P=this.getAttribute("x").getPixels("x"),T=this.getAttribute("y").getPixels("y"),c=this.getStyle("width",!1,!0).getPixels("x"),h=this.getStyle("height",!1,!0).getPixels("y"),k=this.getAttribute("rx"),$=this.getAttribute("ry"),X=k.getPixels("x"),pe=$.getPixels("y");if(k.hasValue()&&!$.hasValue()&&(pe=X),$.hasValue()&&!k.hasValue()&&(X=pe),X=Math.min(X,c/2),pe=Math.min(pe,h/2),u){var Te=4*((Math.sqrt(2)-1)/3);u.beginPath(),h>0&&c>0&&(u.moveTo(P+X,T),u.lineTo(P+c-X,T),u.bezierCurveTo(P+c-X+Te*X,T,P+c,T+pe-Te*pe,P+c,T+pe),u.lineTo(P+c,T+h-pe),u.bezierCurveTo(P+c,T+h-pe+Te*pe,P+c-X+Te*X,T+h,P+c-X,T+h),u.lineTo(P+X,T+h),u.bezierCurveTo(P+X-Te*X,T+h,P,T+h-pe+Te*pe,P,T+h-pe),u.lineTo(P,T+pe),u.bezierCurveTo(P,T+pe-Te*pe,P+X-Te*X,T,P+X,T),u.closePath())}return new Ir(P,T,P+c,T+h)}getMarkers(){return null}}class vt extends Ye{constructor(){super(...arguments),this.type="circle"}path(u){var P=this.getAttribute("cx").getPixels("x"),T=this.getAttribute("cy").getPixels("y"),c=this.getAttribute("r").getPixels();return u&&c>0&&(u.beginPath(),u.arc(P,T,c,0,Math.PI*2,!1),u.closePath()),new Ir(P-c,T-c,P+c,T+c)}getMarkers(){return null}}class Lr extends Ye{constructor(){super(...arguments),this.type="ellipse"}path(u){var P=4*((Math.sqrt(2)-1)/3),T=this.getAttribute("rx").getPixels("x"),c=this.getAttribute("ry").getPixels("y"),h=this.getAttribute("cx").getPixels("x"),k=this.getAttribute("cy").getPixels("y");return u&&T>0&&c>0&&(u.beginPath(),u.moveTo(h+T,k),u.bezierCurveTo(h+T,k+P*c,h+P*T,k+c,h,k+c),u.bezierCurveTo(h-P*T,k+c,h-T,k+P*c,h-T,k),u.bezierCurveTo(h-T,k-P*c,h-P*T,k-c,h,k-c),u.bezierCurveTo(h+P*T,k-c,h+T,k-P*c,h+T,k),u.closePath()),new Ir(h-T,k-c,h+T,k+c)}getMarkers(){return null}}class Er extends Ye{constructor(){super(...arguments),this.type="line"}getPoints(){return[new Kt(this.getAttribute("x1").getPixels("x"),this.getAttribute("y1").getPixels("y")),new Kt(this.getAttribute("x2").getPixels("x"),this.getAttribute("y2").getPixels("y"))]}path(u){var[{x:P,y:T},{x:c,y:h}]=this.getPoints();return u&&(u.beginPath(),u.moveTo(P,T),u.lineTo(c,h)),new Ir(P,T,c,h)}getMarkers(){var[u,P]=this.getPoints(),T=u.angleTo(P);return[[u,T],[P,T]]}}class or extends Ye{constructor(u,P,T){super(u,P,T),this.type="polyline",this.points=[],this.points=Kt.parsePath(this.getAttribute("points").getString())}path(u){var{points:P}=this,[{x:T,y:c}]=P,h=new Ir(T,c);return u&&(u.beginPath(),u.moveTo(T,c)),P.forEach(k=>{var{x:$,y:X}=k;h.addPoint($,X),u&&u.lineTo($,X)}),h}getMarkers(){var{points:u}=this,P=u.length-1,T=[];return u.forEach((c,h)=>{h!==P&&T.push([c,c.angleTo(u[h+1])])}),T.length>0&&T.push([u[u.length-1],T[T.length-1][1]]),T}}class as extends or{constructor(){super(...arguments),this.type="polygon"}path(u){var P=super.path(u),[{x:T,y:c}]=this.points;return u&&(u.lineTo(T,c),u.closePath()),P}}class Ws extends _t{constructor(){super(...arguments),this.type="pattern"}createPattern(u,P,T){var c=this.getStyle("width").getPixels("x",!0),h=this.getStyle("height").getPixels("y",!0),k=new Ur(this.document,null);k.attributes.viewBox=new He(this.document,"viewBox",this.getAttribute("viewBox").getValue()),k.attributes.width=new He(this.document,"width","".concat(c,"px")),k.attributes.height=new He(this.document,"height","".concat(h,"px")),k.attributes.transform=new He(this.document,"transform",this.getAttribute("patternTransform").getValue()),k.children=this.children;var $=this.document.createCanvas(c,h),X=$.getContext("2d"),pe=this.getAttribute("x"),Te=this.getAttribute("y");pe.hasValue()&&Te.hasValue()&&X.translate(pe.getPixels("x",!0),Te.getPixels("y",!0)),T.hasValue()?this.styles["fill-opacity"]=T:Reflect.deleteProperty(this.styles,"fill-opacity");for(var a=-1;a<=1;a++)for(var n=-1;n<=1;n++)X.save(),k.attributes.x=new He(this.document,"x",a*$.width),k.attributes.y=new He(this.document,"y",n*$.height),k.render(X),X.restore();var l=u.createPattern($,"repeat");return l}}class Ms extends _t{constructor(){super(...arguments),this.type="marker"}render(u,P,T){if(P){var{x:c,y:h}=P,k=this.getAttribute("orient").getString("auto"),$=this.getAttribute("markerUnits").getString("strokeWidth");u.translate(c,h),k==="auto"&&u.rotate(T),$==="strokeWidth"&&u.scale(u.lineWidth,u.lineWidth),u.save();var X=new Ur(this.document,null);X.type=this.type,X.attributes.viewBox=new He(this.document,"viewBox",this.getAttribute("viewBox").getValue()),X.attributes.refX=new He(this.document,"refX",this.getAttribute("refX").getValue()),X.attributes.refY=new He(this.document,"refY",this.getAttribute("refY").getValue()),X.attributes.width=new He(this.document,"width",this.getAttribute("markerWidth").getValue()),X.attributes.height=new He(this.document,"height",this.getAttribute("markerHeight").getValue()),X.attributes.overflow=new He(this.document,"overflow",this.getAttribute("overflow").getValue()),X.attributes.fill=new He(this.document,"fill",this.getAttribute("fill").getColor("black")),X.attributes.stroke=new He(this.document,"stroke",this.getAttribute("stroke").getValue("none")),X.children=this.children,X.render(u),u.restore(),$==="strokeWidth"&&u.scale(1/u.lineWidth,1/u.lineWidth),k==="auto"&&u.rotate(-T),u.translate(-c,-h)}}}class mn extends _t{constructor(){super(...arguments),this.type="defs"}render(){}}class wn extends zr{constructor(){super(...arguments),this.type="g"}getBoundingBox(u){var P=new Ir;return this.children.forEach(T=>{P.addBoundingBox(T.getBoundingBox(u))}),P}}class zt extends _t{constructor(u,P,T){super(u,P,T),this.attributesToInherit=["gradientUnits"],this.stops=[];var{stops:c,children:h}=this;h.forEach(k=>{k.type==="stop"&&c.push(k)})}getGradientUnits(){return this.getAttribute("gradientUnits").getString("objectBoundingBox")}createGradient(u,P,T){var c=this;this.getHrefAttribute().hasValue()&&(c=this.getHrefAttribute().getDefinition(),this.inheritStopContainer(c));var{stops:h}=c,k=this.getGradient(u,P);if(!k)return this.addParentOpacity(T,h[h.length-1].color);if(h.forEach(E=>{k.addColorStop(E.offset,this.addParentOpacity(T,E.color))}),this.getAttribute("gradientTransform").hasValue()){var{document:$}=this,{MAX_VIRTUAL_PIXELS:X,viewPort:pe}=$.screen,[Te]=pe.viewPorts,a=new yn($,null);a.attributes.x=new He($,"x",-X/3),a.attributes.y=new He($,"y",-X/3),a.attributes.width=new He($,"width",X),a.attributes.height=new He($,"height",X);var n=new wn($,null);n.attributes.transform=new He($,"transform",this.getAttribute("gradientTransform").getValue()),n.children=[a];var l=new Ur($,null);l.attributes.x=new He($,"x",0),l.attributes.y=new He($,"y",0),l.attributes.width=new He($,"width",Te.width),l.attributes.height=new He($,"height",Te.height),l.children=[n];var p=$.createCanvas(Te.width,Te.height),b=p.getContext("2d");return b.fillStyle=k,l.render(b),b.createPattern(p,"no-repeat")}return k}inheritStopContainer(u){this.attributesToInherit.forEach(P=>{!this.getAttribute(P).hasValue()&&u.getAttribute(P).hasValue()&&this.getAttribute(P,!0).setValue(u.getAttribute(P).getValue())})}addParentOpacity(u,P){if(u.hasValue()){var T=new He(this.document,"color",P);return T.addOpacity(u).getColor()}return P}}class Mr extends zt{constructor(u,P,T){super(u,P,T),this.type="linearGradient",this.attributesToInherit.push("x1","y1","x2","y2")}getGradient(u,P){var T=this.getGradientUnits()==="objectBoundingBox",c=T?P.getBoundingBox(u):null;if(T&&!c)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 h=T?c.x+c.width*this.getAttribute("x1").getNumber():this.getAttribute("x1").getPixels("x"),k=T?c.y+c.height*this.getAttribute("y1").getNumber():this.getAttribute("y1").getPixels("y"),$=T?c.x+c.width*this.getAttribute("x2").getNumber():this.getAttribute("x2").getPixels("x"),X=T?c.y+c.height*this.getAttribute("y2").getNumber():this.getAttribute("y2").getPixels("y");return h===$&&k===X?null:u.createLinearGradient(h,k,$,X)}}class Rr extends zt{constructor(u,P,T){super(u,P,T),this.type="radialGradient",this.attributesToInherit.push("cx","cy","r","fx","fy","fr")}getGradient(u,P){var T=this.getGradientUnits()==="objectBoundingBox",c=P.getBoundingBox(u);if(T&&!c)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 h=T?c.x+c.width*this.getAttribute("cx").getNumber():this.getAttribute("cx").getPixels("x"),k=T?c.y+c.height*this.getAttribute("cy").getNumber():this.getAttribute("cy").getPixels("y"),$=h,X=k;this.getAttribute("fx").hasValue()&&($=T?c.x+c.width*this.getAttribute("fx").getNumber():this.getAttribute("fx").getPixels("x")),this.getAttribute("fy").hasValue()&&(X=T?c.y+c.height*this.getAttribute("fy").getNumber():this.getAttribute("fy").getPixels("y"));var pe=T?(c.width+c.height)/2*this.getAttribute("r").getNumber():this.getAttribute("r").getPixels(),Te=this.getAttribute("fr").getPixels();return u.createRadialGradient($,X,Te,h,k,pe)}}class ws extends _t{constructor(u,P,T){super(u,P,T),this.type="stop";var c=Math.max(0,Math.min(1,this.getAttribute("offset").getNumber())),h=this.getStyle("stop-opacity"),k=this.getStyle("stop-color",!0);k.getString()===""&&k.setValue("#000"),h.hasValue()&&(k=k.addOpacity(h)),this.offset=c,this.color=k.getColor()}}class is extends _t{constructor(u,P,T){super(u,P,T),this.type="animate",this.duration=0,this.initialValue=null,this.initialUnits="",this.removed=!1,this.frozen=!1,u.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 He(u,"values",null);var c=this.getAttribute("values");c.hasValue()&&this.values.setValue(c.getString().split(";"))}getProperty(){var u=this.getAttribute("attributeType").getString(),P=this.getAttribute("attributeName").getString();return u==="CSS"?this.parent.getStyle(P,!0):this.parent.getAttribute(P,!0)}calcValue(){var{initialUnits:u}=this,{progress:P,from:T,to:c}=this.getProgress(),h=T.getNumber()+(c.getNumber()-T.getNumber())*P;return u==="%"&&(h*=100),"".concat(h).concat(u)}update(u){var{parent:P}=this,T=this.getProperty();if(this.initialValue||(this.initialValue=T.getString(),this.initialUnits=T.getUnits()),this.duration>this.maxDuration){var c=this.getAttribute("fill").getString("remove");if(this.getAttribute("repeatCount").getString()==="indefinite"||this.getAttribute("repeatDur").getString()==="indefinite")this.duration=0;else if(c==="freeze"&&!this.frozen)this.frozen=!0,P.animationFrozen=!0,P.animationFrozenValue=T.getString();else if(c==="remove"&&!this.removed)return this.removed=!0,T.setValue(P.animationFrozen?P.animationFrozenValue:this.initialValue),!0;return!1}this.duration+=u;var h=!1;if(this.begin<this.duration){var k=this.calcValue(),$=this.getAttribute("type");if($.hasValue()){var X=$.getString();k="".concat(X,"(").concat(k,")")}T.setValue(k),h=!0}return h}getProgress(){var{document:u,values:P}=this,T={progress:(this.duration-this.begin)/(this.maxDuration-this.begin)};if(P.hasValue()){var c=T.progress*(P.getValue().length-1),h=Math.floor(c),k=Math.ceil(c);T.from=new He(u,"from",parseFloat(P.getValue()[h])),T.to=new He(u,"to",parseFloat(P.getValue()[k])),T.progress=(c-h)/(k-h)}else T.from=this.from,T.to=this.to;return T}}class ea extends is{constructor(){super(...arguments),this.type="animateColor"}calcValue(){var{progress:u,from:P,to:T}=this.getProgress(),c=new y(P.getColor()),h=new y(T.getColor());if(c.ok&&h.ok){var k=c.r+(h.r-c.r)*u,$=c.g+(h.g-c.g)*u,X=c.b+(h.b-c.b)*u;return"rgb(".concat(Math.floor(k),", ").concat(Math.floor($),", ").concat(Math.floor(X),")")}return this.getAttribute("from").getColor()}}class Ts extends is{constructor(){super(...arguments),this.type="animateTransform"}calcValue(){var{progress:u,from:P,to:T}=this.getProgress(),c=W(P.getString()),h=W(T.getString()),k=c.map(($,X)=>{var pe=h[X];return $+(pe-$)*u}).join(" ");return k}}class Za extends _t{constructor(u,P,T){super(u,P,T),this.type="font",this.glyphs=Object.create(null),this.horizAdvX=this.getAttribute("horiz-adv-x").getNumber();var{definitions:c}=u,{children:h}=this;for(var k of h)switch(k.type){case"font-face":{this.fontFace=k;var $=k.getStyle("font-family");$.hasValue()&&(c[$.getString()]=this);break}case"missing-glyph":this.missingGlyph=k;break;case"glyph":{var X=k;X.arabicForm?(this.isRTL=!0,this.isArabic=!0,typeof this.glyphs[X.unicode]>"u"&&(this.glyphs[X.unicode]=Object.create(null)),this.glyphs[X.unicode][X.arabicForm]=X):this.glyphs[X.unicode]=X;break}}}render(){}}class qs extends _t{constructor(u,P,T){super(u,P,T),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 $a extends Ye{constructor(){super(...arguments),this.type="missing-glyph",this.horizAdvX=0}}class Ao extends lr{constructor(){super(...arguments),this.type="tref"}getText(){var u=this.getHrefAttribute().getDefinition();if(u){var P=u.children[0];if(P)return P.getText()}return""}}class ao extends lr{constructor(u,P,T){super(u,P,T),this.type="a";var{childNodes:c}=P,h=c[0],k=c.length>0&&Array.from(c).every($=>$.nodeType===3);this.hasText=k,this.text=k?this.getTextFromNode(h):""}getText(){return this.text}renderChildren(u){if(this.hasText){super.renderChildren(u);var{document:P,x:T,y:c}=this,{mouse:h}=P.screen,k=new He(P,"fontSize",Wt.parse(P.ctx.font).fontSize);h.isWorking()&&h.checkBoundingBox(this,new Ir(T,c-k.getPixels("y"),T+this.measureText(u),c))}else if(this.children.length>0){var $=new wn(this.document,null);$.children=this.children,$.parent=this,$.render(u)}}onClick(){var{window:u}=this.document;u&&u.open(this.getHrefAttribute().getString())}onMouseMove(){var u=this.document.ctx;u.canvas.style.cursor="pointer"}}function Ge(gt,u){var P=Object.keys(gt);if(Object.getOwnPropertySymbols){var T=Object.getOwnPropertySymbols(gt);u&&(T=T.filter(function(c){return Object.getOwnPropertyDescriptor(gt,c).enumerable})),P.push.apply(P,T)}return P}function ur(gt){for(var u=1;u<arguments.length;u++){var P=arguments[u]!=null?arguments[u]:{};u%2?Ge(Object(P),!0).forEach(function(T){(0,v.default)(gt,T,P[T])}):Object.getOwnPropertyDescriptors?Object.defineProperties(gt,Object.getOwnPropertyDescriptors(P)):Ge(Object(P)).forEach(function(T){Object.defineProperty(gt,T,Object.getOwnPropertyDescriptor(P,T))})}return gt}class Tr extends lr{constructor(u,P,T){super(u,P,T),this.type="textPath",this.textWidth=0,this.textHeight=0,this.pathLength=-1,this.glyphInfo=null,this.letterSpacingCache=[],this.measuresCache=new Map([["",0]]);var c=this.getHrefAttribute().getDefinition();this.text=this.getTextFromNode(),this.dataArray=this.parsePathData(c)}getText(){return this.text}path(u){var{dataArray:P}=this;u&&u.beginPath(),P.forEach(T=>{var{type:c,points:h}=T;switch(c){case Yt.LINE_TO:u&&u.lineTo(h[0],h[1]);break;case Yt.MOVE_TO:u&&u.moveTo(h[0],h[1]);break;case Yt.CURVE_TO:u&&u.bezierCurveTo(h[0],h[1],h[2],h[3],h[4],h[5]);break;case Yt.QUAD_TO:u&&u.quadraticCurveTo(h[0],h[1],h[2],h[3]);break;case Yt.ARC:{var[k,$,X,pe,Te,a,n,l]=h,p=X>pe?X:pe,b=X>pe?1:X/pe,E=X>pe?pe/X:1;u&&(u.translate(k,$),u.rotate(n),u.scale(b,E),u.arc(0,0,p,Te,Te+a,!!(1-l)),u.scale(1/b,1/E),u.rotate(-n),u.translate(-k,-$));break}case Yt.CLOSE_PATH:u&&u.closePath();break}})}renderChildren(u){this.setTextData(u),u.save();var P=this.parent.getStyle("text-decoration").getString(),T=this.getFontSize(),{glyphInfo:c}=this,h=u.fillStyle;P==="underline"&&u.beginPath(),c.forEach((k,$)=>{var{p0:X,p1:pe,rotation:Te,text:a}=k;u.save(),u.translate(X.x,X.y),u.rotate(Te),u.fillStyle&&u.fillText(a,0,0),u.strokeStyle&&u.strokeText(a,0,0),u.restore(),P==="underline"&&($===0&&u.moveTo(X.x,X.y+T/8),u.lineTo(pe.x,pe.y+T/5))}),P==="underline"&&(u.lineWidth=T/20,u.strokeStyle=h,u.stroke(),u.closePath()),u.restore()}getLetterSpacingAt(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return this.letterSpacingCache[u]||0}findSegmentToFitChar(u,P,T,c,h,k,$,X,pe){var Te=k,a=this.measureText(u,X);X===" "&&P==="justify"&&T<c&&(a+=(c-T)/h),pe>-1&&(Te+=this.getLetterSpacingAt(pe));var n=this.textHeight/20,l=this.getEquidistantPointOnPath(Te,n,0),p=this.getEquidistantPointOnPath(Te+a,n,0),b={p0:l,p1:p},E=l&&p?Math.atan2(p.y-l.y,p.x-l.x):0;if($){var V=Math.cos(Math.PI/2+E)*$,R=Math.cos(-E)*$;b.p0=ur(ur({},l),{},{x:l.x+V,y:l.y+R}),b.p1=ur(ur({},p),{},{x:p.x+V,y:p.y+R})}return Te+=a,{offset:Te,segment:b,rotation:E}}measureText(u,P){var{measuresCache:T}=this,c=P||this.getText();if(T.has(c))return T.get(c);var h=this.measureTargetText(u,c);return T.set(c,h),h}setTextData(u){if(!this.glyphInfo){var P=this.getText(),T=P.split(""),c=P.split(" ").length-1,h=this.parent.getAttribute("dx").split().map(Q=>Q.getPixels("x")),k=this.parent.getAttribute("dy").getPixels("y"),$=this.parent.getStyle("text-anchor").getString("start"),X=this.getStyle("letter-spacing"),pe=this.parent.getStyle("letter-spacing"),Te=0;!X.hasValue()||X.getValue()==="inherit"?Te=pe.getPixels():X.hasValue()&&X.getValue()!=="initial"&&X.getValue()!=="unset"&&(Te=X.getPixels());var a=[],n=P.length;this.letterSpacingCache=a;for(var l=0;l<n;l++)a.push(typeof h[l]<"u"?h[l]:Te);var p=a.reduce((Q,he,we)=>we===0?0:Q+he||0,0),b=this.measureText(u),E=Math.max(b+p,0);this.textWidth=b,this.textHeight=this.getFontSize(),this.glyphInfo=[];var V=this.getPathLength(),R=this.getStyle("startOffset").getNumber(0)*V,F=0;($==="middle"||$==="center")&&(F=-E/2),($==="end"||$==="right")&&(F=-E),F+=R,T.forEach((Q,he)=>{var{offset:we,segment:Oe,rotation:K}=this.findSegmentToFitChar(u,$,E,V,c,F,k,Q,he);F=we,!(!Oe.p0||!Oe.p1)&&this.glyphInfo.push({text:T[he],p0:Oe.p0,p1:Oe.p1,rotation:K})})}}parsePathData(u){if(this.pathLength=-1,!u)return[];var P=[],{pathParser:T}=u;for(T.reset();!T.isEnd();){var{current:c}=T,h=c?c.x:0,k=c?c.y:0,$=T.next(),X=$.type,pe=[];switch($.type){case Yt.MOVE_TO:this.pathM(T,pe);break;case Yt.LINE_TO:X=this.pathL(T,pe);break;case Yt.HORIZ_LINE_TO:X=this.pathH(T,pe);break;case Yt.VERT_LINE_TO:X=this.pathV(T,pe);break;case Yt.CURVE_TO:this.pathC(T,pe);break;case Yt.SMOOTH_CURVE_TO:X=this.pathS(T,pe);break;case Yt.QUAD_TO:this.pathQ(T,pe);break;case Yt.SMOOTH_QUAD_TO:X=this.pathT(T,pe);break;case Yt.ARC:pe=this.pathA(T);break;case Yt.CLOSE_PATH:Ye.pathZ(T);break}$.type!==Yt.CLOSE_PATH?P.push({type:X,points:pe,start:{x:h,y:k},pathLength:this.calcLength(h,k,X,pe)}):P.push({type:Yt.CLOSE_PATH,points:[],pathLength:0})}return P}pathM(u,P){var{x:T,y:c}=Ye.pathM(u).point;P.push(T,c)}pathL(u,P){var{x:T,y:c}=Ye.pathL(u).point;return P.push(T,c),Yt.LINE_TO}pathH(u,P){var{x:T,y:c}=Ye.pathH(u).point;return P.push(T,c),Yt.LINE_TO}pathV(u,P){var{x:T,y:c}=Ye.pathV(u).point;return P.push(T,c),Yt.LINE_TO}pathC(u,P){var{point:T,controlPoint:c,currentPoint:h}=Ye.pathC(u);P.push(T.x,T.y,c.x,c.y,h.x,h.y)}pathS(u,P){var{point:T,controlPoint:c,currentPoint:h}=Ye.pathS(u);return P.push(T.x,T.y,c.x,c.y,h.x,h.y),Yt.CURVE_TO}pathQ(u,P){var{controlPoint:T,currentPoint:c}=Ye.pathQ(u);P.push(T.x,T.y,c.x,c.y)}pathT(u,P){var{controlPoint:T,currentPoint:c}=Ye.pathT(u);return P.push(T.x,T.y,c.x,c.y),Yt.QUAD_TO}pathA(u){var{rX:P,rY:T,sweepFlag:c,xAxisRotation:h,centp:k,a1:$,ad:X}=Ye.pathA(u);return c===0&&X>0&&(X-=2*Math.PI),c===1&&X<0&&(X+=2*Math.PI),[k.x,k.y,P,T,$,X,h,c]}calcLength(u,P,T,c){var h=0,k=null,$=null,X=0;switch(T){case Yt.LINE_TO:return this.getLineLength(u,P,c[0],c[1]);case Yt.CURVE_TO:for(h=0,k=this.getPointOnCubicBezier(0,u,P,c[0],c[1],c[2],c[3],c[4],c[5]),X=.01;X<=1;X+=.01)$=this.getPointOnCubicBezier(X,u,P,c[0],c[1],c[2],c[3],c[4],c[5]),h+=this.getLineLength(k.x,k.y,$.x,$.y),k=$;return h;case Yt.QUAD_TO:for(h=0,k=this.getPointOnQuadraticBezier(0,u,P,c[0],c[1],c[2],c[3]),X=.01;X<=1;X+=.01)$=this.getPointOnQuadraticBezier(X,u,P,c[0],c[1],c[2],c[3]),h+=this.getLineLength(k.x,k.y,$.x,$.y),k=$;return h;case Yt.ARC:{h=0;var pe=c[4],Te=c[5],a=c[4]+Te,n=Math.PI/180;if(Math.abs(pe-a)<n&&(n=Math.abs(pe-a)),k=this.getPointOnEllipticalArc(c[0],c[1],c[2],c[3],pe,0),Te<0)for(X=pe-n;X>a;X-=n)$=this.getPointOnEllipticalArc(c[0],c[1],c[2],c[3],X,0),h+=this.getLineLength(k.x,k.y,$.x,$.y),k=$;else for(X=pe+n;X<a;X+=n)$=this.getPointOnEllipticalArc(c[0],c[1],c[2],c[3],X,0),h+=this.getLineLength(k.x,k.y,$.x,$.y),k=$;return $=this.getPointOnEllipticalArc(c[0],c[1],c[2],c[3],a,0),h+=this.getLineLength(k.x,k.y,$.x,$.y),h}}return 0}getPointOnLine(u,P,T,c,h){var k=arguments.length>5&&arguments[5]!==void 0?arguments[5]:P,$=arguments.length>6&&arguments[6]!==void 0?arguments[6]:T,X=(h-T)/(c-P+Ee),pe=Math.sqrt(u*u/(1+X*X));c<P&&(pe*=-1);var Te=X*pe,a=null;if(c===P)a={x:k,y:$+Te};else if(($-T)/(k-P+Ee)===X)a={x:k+pe,y:$+Te};else{var n=0,l=0,p=this.getLineLength(P,T,c,h);if(p<Ee)return null;var b=(k-P)*(c-P)+($-T)*(h-T);b/=p*p,n=P+b*(c-P),l=T+b*(h-T);var E=this.getLineLength(k,$,n,l),V=Math.sqrt(u*u-E*E);pe=Math.sqrt(V*V/(1+X*X)),c<P&&(pe*=-1),Te=X*pe,a={x:n+pe,y:l+Te}}return a}getPointOnPath(u){var P=this.getPathLength(),T=0,c=null;if(u<-5e-5||u-5e-5>P)return null;var{dataArray:h}=this;for(var k of h){if(k&&(k.pathLength<5e-5||T+k.pathLength+5e-5<u)){T+=k.pathLength;continue}var $=u-T,X=0;switch(k.type){case Yt.LINE_TO:c=this.getPointOnLine($,k.start.x,k.start.y,k.points[0],k.points[1],k.start.x,k.start.y);break;case Yt.ARC:{var pe=k.points[4],Te=k.points[5],a=k.points[4]+Te;if(X=pe+$/k.pathLength*Te,Te<0&&X<a||Te>=0&&X>a)break;c=this.getPointOnEllipticalArc(k.points[0],k.points[1],k.points[2],k.points[3],X,k.points[6]);break}case Yt.CURVE_TO:X=$/k.pathLength,X>1&&(X=1),c=this.getPointOnCubicBezier(X,k.start.x,k.start.y,k.points[0],k.points[1],k.points[2],k.points[3],k.points[4],k.points[5]);break;case Yt.QUAD_TO:X=$/k.pathLength,X>1&&(X=1),c=this.getPointOnQuadraticBezier(X,k.start.x,k.start.y,k.points[0],k.points[1],k.points[2],k.points[3]);break}if(c)return c;break}return null}getLineLength(u,P,T,c){return Math.sqrt((T-u)*(T-u)+(c-P)*(c-P))}getPathLength(){return this.pathLength===-1&&(this.pathLength=this.dataArray.reduce((u,P)=>P.pathLength>0?u+P.pathLength:u,0)),this.pathLength}getPointOnCubicBezier(u,P,T,c,h,k,$,X,pe){var Te=X*ye(u)+k*Se(u)+c*Le(u)+P*st(u),a=pe*ye(u)+$*Se(u)+h*Le(u)+T*st(u);return{x:Te,y:a}}getPointOnQuadraticBezier(u,P,T,c,h,k,$){var X=k*Ke(u)+c*rt(u)+P*xt(u),pe=$*Ke(u)+h*rt(u)+T*xt(u);return{x:X,y:pe}}getPointOnEllipticalArc(u,P,T,c,h,k){var $=Math.cos(k),X=Math.sin(k),pe={x:T*Math.cos(h),y:c*Math.sin(h)};return{x:u+(pe.x*$-pe.y*X),y:P+(pe.x*X+pe.y*$)}}buildEquidistantCache(u,P){var T=this.getPathLength(),c=P||.25,h=u||T/100;if(!this.equidistantCache||this.equidistantCache.step!==h||this.equidistantCache.precision!==c){this.equidistantCache={step:h,precision:c,points:[]};for(var k=0,$=0;$<=T;$+=c){var X=this.getPointOnPath($),pe=this.getPointOnPath($+c);!X||!pe||(k+=this.getLineLength(X.x,X.y,pe.x,pe.y),k>=h&&(this.equidistantCache.points.push({x:X.x,y:X.y,distance:$}),k-=h))}}}getEquidistantPointOnPath(u,P,T){if(this.buildEquidistantCache(P,T),u<0||u-this.getPathLength()>5e-5)return null;var c=Math.round(u/this.getPathLength()*(this.equidistantCache.points.length-1));return this.equidistantCache.points[c]||null}}var ts=/^\s*data:(([^/,;]+\/[^/,;]+)(?:;([^,;=]+=[^,;=]+))?)?(?:;(base64))?,(.*)$/i;class Yr extends zr{constructor(u,P,T){super(u,P,T),this.type="image",this.loaded=!1;var c=this.getHrefAttribute().getString();if(c){var h=c.endsWith(".svg")||/^\s*data:image\/svg\+xml/i.test(c);u.images.push(this),h?this.loadSvg(c):this.loadImage(c),this.isSvg=h}}loadImage(u){var P=this;return(0,f.default)(function*(){try{var T=yield P.document.createImage(u);P.image=T}catch(c){console.error('Error while loading image "'.concat(u,'":'),c)}P.loaded=!0})()}loadSvg(u){var P=this;return(0,f.default)(function*(){var T=ts.exec(u);if(T){var c=T[5];T[4]==="base64"?P.image=atob(c):P.image=decodeURIComponent(c)}else try{var h=yield P.document.fetch(u),k=yield h.text();P.image=k}catch($){console.error('Error while loading image "'.concat(u,'":'),$)}P.loaded=!0})()}renderChildren(u){var{document:P,image:T,loaded:c}=this,h=this.getAttribute("x").getPixels("x"),k=this.getAttribute("y").getPixels("y"),$=this.getStyle("width").getPixels("x"),X=this.getStyle("height").getPixels("y");if(!(!c||!T||!$||!X)){if(u.save(),u.translate(h,k),this.isSvg){var pe=P.canvg.forkString(u,this.image,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:0,offsetY:0,scaleWidth:$,scaleHeight:X});pe.document.documentElement.parent=this,pe.render()}else{var Te=this.image;P.setViewBox({ctx:u,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:$,desiredWidth:Te.width,height:X,desiredHeight:Te.height}),this.loaded&&(typeof Te.complete>"u"||Te.complete)&&u.drawImage(Te,0,0)}u.restore()}}getBoundingBox(){var u=this.getAttribute("x").getPixels("x"),P=this.getAttribute("y").getPixels("y"),T=this.getStyle("width").getPixels("x"),c=this.getStyle("height").getPixels("y");return new Ir(u,P,u+T,P+c)}}class Wr extends zr{constructor(){super(...arguments),this.type="symbol"}render(u){}}class Sn{constructor(u){this.document=u,this.loaded=!1,u.fonts.push(this)}load(u,P){var T=this;return(0,f.default)(function*(){try{var{document:c}=T,h=yield c.canvg.parser.load(P),k=h.getElementsByTagName("font");Array.from(k).forEach($=>{var X=c.createElement($);c.definitions[u]=X})}catch($){console.error('Error while loading font "'.concat(P,'":'),$)}T.loaded=!0})()}}class En extends _t{constructor(u,P,T){super(u,P,T),this.type="style";var c=I(Array.from(P.childNodes).map(k=>k.textContent).join("").replace(/(\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm,"").replace(/@import.*;/g,"")),h=c.split("}");h.forEach(k=>{var $=k.trim();if($){var X=$.split("{"),pe=X[0].split(","),Te=X[1].split(";");pe.forEach(a=>{var n=a.trim();if(n){var l=u.styles[n]||{};if(Te.forEach(E=>{var V=E.indexOf(":"),R=E.substr(0,V).trim(),F=E.substr(V+1,E.length-V).trim();R&&F&&(l[R]=new He(u,R,F))}),u.styles[n]=l,u.stylesSpecificity[n]=ge(n),n==="@font-face"){var p=l["font-family"].getString().replace(/"|'/g,""),b=l.src.getString().split(",");b.forEach(E=>{if(E.indexOf('format("svg")')>0){var V=le(E);V&&new Sn(u).load(p,V)}})}}})}})}}En.parseExternalUrl=le;class Nn extends zr{constructor(){super(...arguments),this.type="use"}setContext(u){super.setContext(u);var P=this.getAttribute("x"),T=this.getAttribute("y");P.hasValue()&&u.translate(P.getPixels("x"),0),T.hasValue()&&u.translate(0,T.getPixels("y"))}path(u){var{element:P}=this;P&&P.path(u)}renderChildren(u){var{document:P,element:T}=this;if(T){var c=T;if(T.type==="symbol"&&(c=new Ur(P,null),c.attributes.viewBox=new He(P,"viewBox",T.getAttribute("viewBox").getString()),c.attributes.preserveAspectRatio=new He(P,"preserveAspectRatio",T.getAttribute("preserveAspectRatio").getString()),c.attributes.overflow=new He(P,"overflow",T.getAttribute("overflow").getString()),c.children=T.children,T.styles.opacity=new He(P,"opacity",this.calculateOpacity())),c.type==="svg"){var h=this.getStyle("width",!1,!0),k=this.getStyle("height",!1,!0);h.hasValue()&&(c.attributes.width=new He(P,"width",h.getString())),k.hasValue()&&(c.attributes.height=new He(P,"height",k.getString()))}var $=c.parent;c.parent=this,c.render(u),c.parent=$}}getBoundingBox(u){var{element:P}=this;return P?P.getBoundingBox(u):null}elementTransform(){var{document:u,element:P}=this;return lt.fromElement(u,P)}get element(){return this.cachedElement||(this.cachedElement=this.getHrefAttribute().getDefinition()),this.cachedElement}}function kn(gt,u,P,T,c,h){return gt[P*T*4+u*4+h]}function dn(gt,u,P,T,c,h,k){gt[P*T*4+u*4+h]=k}function qr(gt,u,P){var T=gt[u];return T*P}function un(gt,u,P,T){return u+Math.cos(gt)*P+Math.sin(gt)*T}class ba extends _t{constructor(u,P,T){super(u,P,T),this.type="feColorMatrix";var c=W(this.getAttribute("values").getString());switch(this.getAttribute("type").getString("matrix")){case"saturate":{var h=c[0];c=[.213+.787*h,.715-.715*h,.072-.072*h,0,0,.213-.213*h,.715+.285*h,.072-.072*h,0,0,.213-.213*h,.715-.715*h,.072+.928*h,0,0,0,0,0,1,0,0,0,0,0,1];break}case"hueRotate":{var k=c[0]*Math.PI/180;c=[un(k,.213,.787,-.213),un(k,.715,-.715,-.715),un(k,.072,-.072,.928),0,0,un(k,.213,-.213,.143),un(k,.715,.285,.14),un(k,.072,-.072,-.283),0,0,un(k,.213,-.213,-.787),un(k,.715,-.715,.715),un(k,.072,.928,.072),0,0,0,0,0,1,0,0,0,0,0,1];break}case"luminanceToAlpha":c=[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=c,this.includeOpacity=this.getAttribute("includeOpacity").hasValue()}apply(u,P,T,c,h){for(var{includeOpacity:k,matrix:$}=this,X=u.getImageData(0,0,c,h),pe=0;pe<h;pe++)for(var Te=0;Te<c;Te++){var a=kn(X.data,Te,pe,c,h,0),n=kn(X.data,Te,pe,c,h,1),l=kn(X.data,Te,pe,c,h,2),p=kn(X.data,Te,pe,c,h,3),b=qr($,0,a)+qr($,1,n)+qr($,2,l)+qr($,3,p)+qr($,4,1),E=qr($,5,a)+qr($,6,n)+qr($,7,l)+qr($,8,p)+qr($,9,1),V=qr($,10,a)+qr($,11,n)+qr($,12,l)+qr($,13,p)+qr($,14,1),R=qr($,15,a)+qr($,16,n)+qr($,17,l)+qr($,18,p)+qr($,19,1);k&&(b=0,E=0,V=0,R*=p/255),dn(X.data,Te,pe,c,h,0,b),dn(X.data,Te,pe,c,h,1,E),dn(X.data,Te,pe,c,h,2,V),dn(X.data,Te,pe,c,h,3,R)}u.clearRect(0,0,c,h),u.putImageData(X,0,0)}}class wa extends _t{constructor(){super(...arguments),this.type="mask"}apply(u,P){var{document:T}=this,c=this.getAttribute("x").getPixels("x"),h=this.getAttribute("y").getPixels("y"),k=this.getStyle("width").getPixels("x"),$=this.getStyle("height").getPixels("y");if(!k&&!$){var X=new Ir;this.children.forEach(p=>{X.addBoundingBox(p.getBoundingBox(u))}),c=Math.floor(X.x1),h=Math.floor(X.y1),k=Math.floor(X.width),$=Math.floor(X.height)}var pe=this.removeStyles(P,wa.ignoreStyles),Te=T.createCanvas(c+k,h+$),a=Te.getContext("2d");T.screen.setDefaults(a),this.renderChildren(a),new ba(T,{nodeType:1,childNodes:[],attributes:[{nodeName:"type",value:"luminanceToAlpha"},{nodeName:"includeOpacity",value:"true"}]}).apply(a,0,0,c+k,h+$);var n=T.createCanvas(c+k,h+$),l=n.getContext("2d");T.screen.setDefaults(l),P.render(l),l.globalCompositeOperation="destination-in",l.fillStyle=a.createPattern(Te,"no-repeat"),l.fillRect(0,0,c+k,h+$),u.fillStyle=l.createPattern(n,"no-repeat"),u.fillRect(0,0,c+k,h+$),this.restoreStyles(P,pe)}render(u){}}wa.ignoreStyles=["mask","transform","clip-path"];var Eo=()=>{};class ma extends _t{constructor(){super(...arguments),this.type="clipPath"}apply(u){var{document:P}=this,T=Reflect.getPrototypeOf(u),{beginPath:c,closePath:h}=u;T&&(T.beginPath=Eo,T.closePath=Eo),Reflect.apply(c,u,[]),this.children.forEach(k=>{if(!(typeof k.path>"u")){var $=typeof k.elementTransform<"u"?k.elementTransform():null;$||($=lt.fromElement(P,k)),$&&$.apply(u),k.path(u),T&&(T.closePath=h),$&&$.unapply(u)}}),Reflect.apply(h,u,[]),u.clip(),T&&(T.beginPath=c,T.closePath=h)}render(u){}}class ps extends _t{constructor(){super(...arguments),this.type="filter"}apply(u,P){var{document:T,children:c}=this,h=P.getBoundingBox(u);if(h){var k=0,$=0;c.forEach(V=>{var R=V.extraFilterDistance||0;k=Math.max(k,R),$=Math.max($,R)});var X=Math.floor(h.width),pe=Math.floor(h.height),Te=X+2*k,a=pe+2*$;if(!(Te<1||a<1)){var n=Math.floor(h.x),l=Math.floor(h.y),p=this.removeStyles(P,ps.ignoreStyles),b=T.createCanvas(Te,a),E=b.getContext("2d");T.screen.setDefaults(E),E.translate(-n+k,-l+$),P.render(E),c.forEach(V=>{typeof V.apply=="function"&&V.apply(E,0,0,Te,a)}),u.drawImage(b,0,0,Te,a,n-k,l-$,Te,a),this.restoreStyles(P,p)}}}render(u){}}ps.ignoreStyles=["filter","transform","clip-path"];class Na extends _t{constructor(u,P,T){super(u,P,T),this.type="feDropShadow",this.addStylesFromStyleDefinition()}apply(u,P,T,c,h){}}class pa extends _t{constructor(){super(...arguments),this.type="feMorphology"}apply(u,P,T,c,h){}}class zo extends _t{constructor(){super(...arguments),this.type="feComposite"}apply(u,P,T,c,h){}}class Va extends _t{constructor(u,P,T){super(u,P,T),this.type="feGaussianBlur",this.blurRadius=Math.floor(this.getAttribute("stdDeviation").getNumber()),this.extraFilterDistance=this.blurRadius}apply(u,P,T,c,h){var{document:k,blurRadius:$}=this,X=k.window?k.window.document.body:null,pe=u.canvas;pe.id=k.getUniqueId(),X&&(pe.style.display="none",X.appendChild(pe)),(0,S.canvasRGBA)(pe,P,T,c,h,$),X&&X.removeChild(pe)}}class _n extends _t{constructor(){super(...arguments),this.type="title"}}class Fa extends _t{constructor(){super(...arguments),this.type="desc"}}var Wn={svg:Ur,rect:yn,circle:vt,ellipse:Lr,line:Er,polyline:or,polygon:as,path:Ye,pattern:Ws,marker:Ms,defs:mn,linearGradient:Mr,radialGradient:Rr,stop:ws,animate:is,animateColor:ea,animateTransform:Ts,font:Za,"font-face":qs,"missing-glyph":$a,glyph:Vt,text:lr,tspan:xr,tref:Ao,a:ao,textPath:Tr,image:Yr,g:wn,symbol:Wr,style:En,use:Nn,mask:wa,clipPath:ma,filter:ps,feDropShadow:Na,feMorphology:pa,feComposite:zo,feColorMatrix:ba,feGaussianBlur:Va,title:_n,desc:Fa};function Dn(gt,u){var P=Object.keys(gt);if(Object.getOwnPropertySymbols){var T=Object.getOwnPropertySymbols(gt);u&&(T=T.filter(function(c){return Object.getOwnPropertyDescriptor(gt,c).enumerable})),P.push.apply(P,T)}return P}function Da(gt){for(var u=1;u<arguments.length;u++){var P=arguments[u]!=null?arguments[u]:{};u%2?Dn(Object(P),!0).forEach(function(T){(0,v.default)(gt,T,P[T])}):Object.getOwnPropertyDescriptors?Object.defineProperties(gt,Object.getOwnPropertyDescriptors(P)):Dn(Object(P)).forEach(function(T){Object.defineProperty(gt,T,Object.getOwnPropertyDescriptor(P,T))})}return gt}function Qa(gt,u){var P=document.createElement("canvas");return P.width=gt,P.height=u,P}function ga(gt){return Kn.apply(this,arguments)}function Kn(){return Kn=(0,f.default)(function*(gt){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,P=document.createElement("img");return u&&(P.crossOrigin="Anonymous"),new Promise((T,c)=>{P.onload=()=>{T(P)},P.onerror=(h,k,$,X,pe)=>{c(pe)},P.src=gt})}),Kn.apply(this,arguments)}class ta{constructor(u){var{rootEmSize:P=12,emSize:T=12,createCanvas:c=ta.createCanvas,createImage:h=ta.createImage,anonymousCrossOrigin:k}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.canvg=u,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=u.screen,this.rootEmSize=P,this.emSize=T,this.createCanvas=c,this.createImage=this.bindCreateImage(h,k),this.screen.wait(this.isImagesLoaded.bind(this)),this.screen.wait(this.isFontsLoaded.bind(this))}bindCreateImage(u,P){return typeof P=="boolean"?(T,c)=>u(T,typeof c=="boolean"?c:P):u}get window(){return this.screen.window}get fetch(){return this.screen.fetch}get ctx(){return this.screen.ctx}get emSize(){var{emSizeStack:u}=this;return u[u.length-1]}set emSize(u){var{emSizeStack:P}=this;P.push(u)}popEmSize(){var{emSizeStack:u}=this;u.pop()}getUniqueId(){return"canvg".concat(++this.uniqueId)}isImagesLoaded(){return this.images.every(u=>u.loaded)}isFontsLoaded(){return this.fonts.every(u=>u.loaded)}createDocumentElement(u){var P=this.createElement(u.documentElement);return P.root=!0,P.addStylesFromStyleDefinition(),this.documentElement=P,P}createElement(u){var P=u.nodeName.replace(/^[^:]+:/,""),T=ta.elementTypes[P];return typeof T<"u"?new T(this,u):new dr(this,u)}createTextNode(u){return new Pr(this,u)}setViewBox(u){this.screen.setViewBox(Da({document:this},u))}}ta.createCanvas=Qa,ta.createImage=ga,ta.elementTypes=Wn;function Wa(gt,u){var P=Object.keys(gt);if(Object.getOwnPropertySymbols){var T=Object.getOwnPropertySymbols(gt);u&&(T=T.filter(function(c){return Object.getOwnPropertyDescriptor(gt,c).enumerable})),P.push.apply(P,T)}return P}function va(gt){for(var u=1;u<arguments.length;u++){var P=arguments[u]!=null?arguments[u]:{};u%2?Wa(Object(P),!0).forEach(function(T){(0,v.default)(gt,T,P[T])}):Object.getOwnPropertyDescriptors?Object.defineProperties(gt,Object.getOwnPropertyDescriptors(P)):Wa(Object(P)).forEach(function(T){Object.defineProperty(gt,T,Object.getOwnPropertyDescriptor(P,T))})}return gt}class Ja{constructor(u,P){var T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.parser=new jr(T),this.screen=new yr(u,T),this.options=T;var c=new ta(this,T),h=c.createDocumentElement(P);this.document=c,this.documentElement=h}static from(u,P){var T=arguments;return(0,f.default)(function*(){var c=T.length>2&&T[2]!==void 0?T[2]:{},h=new jr(c),k=yield h.parse(P);return new Ja(u,k,c)})()}static fromString(u,P){var T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},c=new jr(T),h=c.parseFromString(P);return new Ja(u,h,T)}fork(u,P){var T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Ja.from(u,P,va(va({},this.options),T))}forkString(u,P){var T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Ja.fromString(u,P,va(va({},this.options),T))}ready(){return this.screen.ready()}isReady(){return this.screen.isReady()}render(){var u=arguments,P=this;return(0,f.default)(function*(){var T=u.length>0&&u[0]!==void 0?u[0]:{};P.start(va({enableRedraw:!0,ignoreAnimation:!0,ignoreMouse:!0},T)),yield P.ready(),P.stop()})()}start(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{documentElement:P,screen:T,options:c}=this;T.start(P,va(va({enableRedraw:!0},c),u))}stop(){this.screen.stop()}resize(u){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u,T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.documentElement.resize(u,P,T)}}},
vendor: 273 bytes, line 166
166"./node_modules/core-js/internals/a-callable.js":function(w,O,t){var f=t("./node_modules/core-js/internals/is-callable.js"),v=t("./node_modules/core-js/internals/try-to-string.js"),m=TypeError;w.exports=function(y){if(f(y))return y;throw new m(v(y)+" is not a function")}},
vendor: 282 bytes, line 166
166"./node_modules/core-js/internals/a-constructor.js":function(w,O,t){var f=t("./node_modules/core-js/internals/is-constructor.js"),v=t("./node_modules/core-js/internals/try-to-string.js"),m=TypeError;w.exports=function(y){if(f(y))return y;throw new m(v(y)+" is not a constructor")}},
vendor: 255 bytes, line 166
166"./node_modules/core-js/internals/a-possible-prototype.js":function(w,O,t){var f=t("./node_modules/core-js/internals/is-possible-prototype.js"),v=String,m=TypeError;w.exports=function(y){if(f(y))return y;throw new m("Can't set "+v(y)+" as a prototype")}},
vendor: 161 bytes, line 166
166"./node_modules/core-js/internals/a-set.js":function(w,O,t){var f=t("./node_modules/core-js/internals/set-helpers.js").has;w.exports=function(v){return f(v),v}},
vendor: 389 bytes, line 166
166"./node_modules/core-js/internals/add-to-unscopables.js":function(w,O,t){var f=t("./node_modules/core-js/internals/well-known-symbol.js"),v=t("./node_modules/core-js/internals/object-create.js"),m=t("./node_modules/core-js/internals/object-define-property.js").f,y=f("unscopables"),C=Array.prototype;C[y]===void 0&&m(C,y,{configurable:!0,value:v(null)}),w.exports=function(S){C[y][S]=!0}},
vendor: 203 bytes, line 166
166"./node_modules/core-js/internals/advance-string-index.js":function(w,O,t){var f=t("./node_modules/core-js/internals/string-multibyte.js").charAt;w.exports=function(v,m,y){return m+(y?f(v,m).length:1)}},
vendor: 229 bytes, line 166
166"./node_modules/core-js/internals/an-instance.js":function(w,O,t){var f=t("./node_modules/core-js/internals/object-is-prototype-of.js"),v=TypeError;w.exports=function(m,y){if(f(y,m))return m;throw new v("Incorrect invocation")}},
vendor: 221 bytes, line 166
166"./node_modules/core-js/internals/an-object.js":function(w,O,t){var f=t("./node_modules/core-js/internals/is-object.js"),v=String,m=TypeError;w.exports=function(y){if(f(y))return y;throw new m(v(y)+" is not an object")}},
vendor: 285 bytes, line 166
166"./node_modules/core-js/internals/array-buffer-non-extensible.js":function(w,O,t){var f=t("./node_modules/core-js/internals/fails.js");w.exports=f(function(){if(typeof ArrayBuffer=="function"){var v=new ArrayBuffer(8);Object.isExtensible(v)&&Object.defineProperty(v,"a",{value:8})}})},
vendor: 314 bytes, line 166
166"./node_modules/core-js/internals/array-for-each.js":function(w,O,t){var f=t("./node_modules/core-js/internals/array-iteration.js").forEach,v=t("./node_modules/core-js/internals/array-method-is-strict.js"),m=v("forEach");w.exports=m?[].forEach:function(C){return f(this,C,arguments.length>1?arguments[1]:void 0)}},
vendor: 1,115 bytes, line 166
166"./node_modules/core-js/internals/array-from.js":function(w,O,t){var f=t("./node_modules/core-js/internals/function-bind-context.js"),v=t("./node_modules/core-js/internals/function-call.js"),m=t("./node_modules/core-js/internals/to-object.js"),y=t("./node_modules/core-js/internals/call-with-safe-iteration-closing.js"),C=t("./node_modules/core-js/internals/is-array-iterator-method.js"),S=t("./node_modules/core-js/internals/is-constructor.js"),g=t("./node_modules/core-js/internals/length-of-array-like.js"),j=t("./node_modules/core-js/internals/create-property.js"),A=t("./node_modules/core-js/internals/get-iterator.js"),I=t("./node_modules/core-js/internals/get-iterator-method.js"),M=Array;w.exports=function(W){var Y=m(W),J=S(this),le=arguments.length,ae=le>1?arguments[1]:void 0,Z=ae!==void 0;Z&&(ae=f(ae,le>2?arguments[2]:void 0));var oe=I(Y),H=0,fe,se,de,q,U,ge;if(oe&&!(this===M&&C(oe)))for(se=J?new this:[],q=A(Y,oe),U=q.next;!(de=v(U,q)).done;H++)ge=Z?y(q,ae,[de.value,H],!0):de.value,j(se,H,ge);else for(fe=g(Y),se=J?new this(fe):M(fe);fe>H;H++)ge=Z?ae(Y[H],H):Y[H],j(se,H,ge);return se.length=H,se}},
vendor: 516 bytes, line 166
166"./node_modules/core-js/internals/array-includes.js":function(w,O,t){var f=t("./node_modules/core-js/internals/to-indexed-object.js"),v=t("./node_modules/core-js/internals/to-absolute-index.js"),m=t("./node_modules/core-js/internals/length-of-array-like.js"),y=function(C){return function(S,g,j){var A=f(S),I=m(A);if(I===0)return!C&&-1;var M=v(j,I),B;if(C&&g!==g){for(;I>M;)if(B=A[M++],B!==B)return!0}else for(;I>M;M++)if((C||M in A)&&A[M]===g)return C||M||0;return!C&&-1}};w.exports={includes:y(!0),indexOf:y(!1)}},
vendor: 996 bytes, line 166
166"./node_modules/core-js/internals/array-iteration.js":function(w,O,t){var f=t("./node_modules/core-js/internals/function-bind-context.js"),v=t("./node_modules/core-js/internals/function-uncurry-this.js"),m=t("./node_modules/core-js/internals/indexed-object.js"),y=t("./node_modules/core-js/internals/to-object.js"),C=t("./node_modules/core-js/internals/length-of-array-like.js"),S=t("./node_modules/core-js/internals/array-species-create.js"),g=v([].push),j=function(A){var I=A===1,M=A===2,B=A===3,W=A===4,Y=A===6,J=A===7,le=A===5||Y;return function(ae,Z,oe,H){for(var fe=y(ae),se=m(fe),de=C(se),q=f(Z,oe),U=0,ge=H||S,Ee=I?ge(ae,de):M||J?ge(ae,0):void 0,Xe,re;de>U;U++)if((le||U in se)&&(Xe=se[U],re=q(Xe,U,fe),A))if(I)Ee[U]=re;else if(re)switch(A){case 3:return!0;case 5:return Xe;case 6:return U;case 2:g(Ee,Xe)}else switch(A){case 4:return!1;case 7:g(Ee,Xe)}return Y?-1:B||W?W:Ee}};w.exports={forEach:j(0),map:j(1),filter:j(2),some:j(3),every:j(4),find:j(5),findIndex:j(6),filterReject:j(7)}},
vendor: 424 bytes, line 166
166"./node_modules/core-js/internals/array-method-has-species-support.js":function(w,O,t){var f=t("./node_modules/core-js/internals/fails.js"),v=t("./node_modules/core-js/internals/well-known-symbol.js"),m=t("./node_modules/core-js/internals/environment-v8-version.js"),y=v("species");w.exports=function(C){return m>=51||!f(function(){var S=[],g=S.constructor={};return g[y]=function(){return{foo:1}},S[C](Boolean).foo!==1})}},
vendor: 233 bytes, line 166
166"./node_modules/core-js/internals/array-method-is-strict.js":function(w,O,t){var f=t("./node_modules/core-js/internals/fails.js");w.exports=function(v,m){var y=[][v];return!!y&&f(function(){y.call(null,m||function(){return 1},1)})}},
vendor: 670 bytes, line 166
166"./node_modules/core-js/internals/array-reduce.js":function(w,O,t){var f=t("./node_modules/core-js/internals/a-callable.js"),v=t("./node_modules/core-js/internals/to-object.js"),m=t("./node_modules/core-js/internals/indexed-object.js"),y=t("./node_modules/core-js/internals/length-of-array-like.js"),C=TypeError,S="Reduce of empty array with no initial value",g=function(j){return function(A,I,M,B){var W=v(A),Y=m(W),J=y(W);if(f(I),J===0&&M<2)throw new C(S);var le=j?J-1:0,ae=j?-1:1;if(M<2)for(;;){if(le in Y){B=Y[le],le+=ae;break}if(le+=ae,j?le<0:J<=le)throw new C(S)}for(;j?le>=0:J>le;le+=ae)le in Y&&(B=I(B,Y[le],le,W));return B}};w.exports={left:g(!1),right:g(!0)}},
vendor: 158 bytes, line 166
166"./node_modules/core-js/internals/array-slice.js":function(w,O,t){var f=t("./node_modules/core-js/internals/function-uncurry-this.js");w.exports=f([].slice)},
vendor: 482 bytes, line 166
166"./node_modules/core-js/internals/array-species-constructor.js":function(w,O,t){var f=t("./node_modules/core-js/internals/is-array.js"),v=t("./node_modules/core-js/internals/is-constructor.js"),m=t("./node_modules/core-js/internals/is-object.js"),y=t("./node_modules/core-js/internals/well-known-symbol.js"),C=y("species"),S=Array;w.exports=function(g){var j;return f(g)&&(j=g.constructor,v(j)&&(j===S||f(j.prototype))?j=void 0:m(j)&&(j=j[C],j===null&&(j=void 0))),j===void 0?S:j}},
vendor: 202 bytes, line 166
166"./node_modules/core-js/internals/array-species-create.js":function(w,O,t){var f=t("./node_modules/core-js/internals/array-species-constructor.js");w.exports=function(v,m){return new(f(v))(m===0?0:m)}},
vendor: 291 bytes, line 166
166"./node_modules/core-js/internals/call-with-safe-iteration-closing.js":function(w,O,t){var f=t("./node_modules/core-js/internals/an-object.js"),v=t("./node_modules/core-js/internals/iterator-close.js");w.exports=function(m,y,C,S){try{return S?y(f(C)[0],C[1]):y(C)}catch(g){v(m,"throw",g)}}},
vendor: 484 bytes, line 166
166"./node_modules/core-js/internals/check-correctness-of-iteration.js":function(w,O,t){var f=t("./node_modules/core-js/internals/well-known-symbol.js"),v=f("iterator"),m=!1;try{var y=0,C={next:function(){return{done:!!y++}},return:function(){m=!0}};C[v]=function(){return this},Array.from(C,function(){throw 2})}catch{}w.exports=function(S,g){try{if(!g&&!m)return!1}catch{return!1}var j=!1;try{var A={};A[v]=function(){return{next:function(){return{done:j=!0}}}},S(A)}catch{}return j}},
vendor: 210 bytes, line 166
166"./node_modules/core-js/internals/classof-raw.js":function(w,O,t){var f=t("./node_modules/core-js/internals/function-uncurry-this.js"),v=f({}.toString),m=f("".slice);w.exports=function(y){return m(v(y),8,-1)}},
vendor: 593 bytes, line 166
166"./node_modules/core-js/internals/classof.js":function(w,O,t){var f=t("./node_modules/core-js/internals/to-string-tag-support.js"),v=t("./node_modules/core-js/internals/is-callable.js"),m=t("./node_modules/core-js/internals/classof-raw.js"),y=t("./node_modules/core-js/internals/well-known-symbol.js"),C=y("toStringTag"),S=Object,g=m(function(){return arguments}())==="Arguments",j=function(A,I){try{return A[I]}catch{}};w.exports=f?m:function(A){var I,M,B;return A===void 0?"Undefined":A===null?"Null":typeof(M=j(I=S(A),C))=="string"?M:g?m(I):(B=m(I))==="Object"&&v(I.callee)?"Arguments":B}},
vendor: 2,827 bytes, line 166
166"./node_modules/core-js/internals/collection-strong.js":function(w,O,t){var f=t("./node_modules/core-js/internals/object-create.js"),v=t("./node_modules/core-js/internals/define-built-in-accessor.js"),m=t("./node_modules/core-js/internals/define-built-ins.js"),y=t("./node_modules/core-js/internals/function-bind-context.js"),C=t("./node_modules/core-js/internals/an-instance.js"),S=t("./node_modules/core-js/internals/is-null-or-undefined.js"),g=t("./node_modules/core-js/internals/iterate.js"),j=t("./node_modules/core-js/internals/iterator-define.js"),A=t("./node_modules/core-js/internals/create-iter-result-object.js"),I=t("./node_modules/core-js/internals/set-species.js"),M=t("./node_modules/core-js/internals/descriptors.js"),B=t("./node_modules/core-js/internals/internal-metadata.js").fastKey,W=t("./node_modules/core-js/internals/internal-state.js"),Y=W.set,J=W.getterFor;w.exports={getConstructor:function(le,ae,Z,oe){var H=le(function(U,ge){C(U,fe),Y(U,{type:ae,index:f(null),first:null,last:null,size:0}),M||(U.size=0),S(ge)||g(ge,U[oe],{that:U,AS_ENTRIES:Z})}),fe=H.prototype,se=J(ae),de=function(U,ge,Ee){var Xe=se(U),re=q(U,ge),Pe,ye;return re?re.value=Ee:(Xe.last=re={index:ye=B(ge,!0),key:ge,value:Ee,previous:Pe=Xe.last,next:null,removed:!1},Xe.first||(Xe.first=re),Pe&&(Pe.next=re),M?Xe.size++:U.size++,ye!=="F"&&(Xe.index[ye]=re)),U},q=function(U,ge){var Ee=se(U),Xe=B(ge),re;if(Xe!=="F")return Ee.index[Xe];for(re=Ee.first;re;re=re.next)if(re.key===ge)return re};return m(fe,{clear:function(){for(var ge=this,Ee=se(ge),Xe=Ee.first;Xe;)Xe.removed=!0,Xe.previous&&(Xe.previous=Xe.previous.next=null),Xe=Xe.next;Ee.first=Ee.last=null,Ee.index=f(null),M?Ee.size=0:ge.size=0},delete:function(U){var ge=this,Ee=se(ge),Xe=q(ge,U);if(Xe){var re=Xe.next,Pe=Xe.previous;delete Ee.index[Xe.index],Xe.removed=!0,Pe&&(Pe.next=re),re&&(re.previous=Pe),Ee.first===Xe&&(Ee.first=re),Ee.last===Xe&&(Ee.last=Pe),M?Ee.size--:ge.size--}return!!Xe},forEach:function(ge){for(var Ee=se(this),Xe=y(ge,arguments.length>1?arguments[1]:void 0),re;re=re?re.next:Ee.first;)for(Xe(re.value,re.key,this);re&&re.removed;)re=re.previous},has:function(ge){return!!q(this,ge)}}),m(fe,Z?{get:function(ge){var Ee=q(this,ge);return Ee&&Ee.value},set:function(ge,Ee){return de(this,ge===0?0:ge,Ee)}}:{add:function(ge){return de(this,ge=ge===0?0:ge,ge)}}),M&&v(fe,"size",{configurable:!0,get:function(){return se(this).size}}),H},setStrong:function(le,ae,Z){var oe=ae+" Iterator",H=J(ae),fe=J(oe);j(le,ae,function(se,de){Y(this,{type:oe,target:se,state:H(se),kind:de,last:null})},function(){for(var se=fe(this),de=se.kind,q=se.last;q&&q.removed;)q=q.previous;return!se.target||!(se.last=q=q?q.next:se.state.first)?(se.target=null,A(void 0,!0)):A(de==="keys"?q.key:de==="values"?q.value:[q.key,q.value],!1)},Z?"entries":"values",!Z,!0),I(ae)}}},
vendor: 2,100 bytes, line 166
166"./node_modules/core-js/internals/collection.js":function(w,O,t){var f=t("./node_modules/core-js/internals/export.js"),v=t("./node_modules/core-js/internals/global-this.js"),m=t("./node_modules/core-js/internals/function-uncurry-this.js"),y=t("./node_modules/core-js/internals/is-forced.js"),C=t("./node_modules/core-js/internals/define-built-in.js"),S=t("./node_modules/core-js/internals/internal-metadata.js"),g=t("./node_modules/core-js/internals/iterate.js"),j=t("./node_modules/core-js/internals/an-instance.js"),A=t("./node_modules/core-js/internals/is-callable.js"),I=t("./node_modules/core-js/internals/is-null-or-undefined.js"),M=t("./node_modules/core-js/internals/is-object.js"),B=t("./node_modules/core-js/internals/fails.js"),W=t("./node_modules/core-js/internals/check-correctness-of-iteration.js"),Y=t("./node_modules/core-js/internals/set-to-string-tag.js"),J=t("./node_modules/core-js/internals/inherit-if-required.js");w.exports=function(le,ae,Z){var oe=le.indexOf("Map")!==-1,H=le.indexOf("Weak")!==-1,fe=oe?"set":"add",se=v[le],de=se&&se.prototype,q=se,U={},ge=function(Le){var st=m(de[Le]);C(de,Le,Le==="add"?function(rt){return st(this,rt===0?0:rt),this}:Le==="delete"?function(Ke){return H&&!M(Ke)?!1:st(this,Ke===0?0:Ke)}:Le==="get"?function(rt){return H&&!M(rt)?void 0:st(this,rt===0?0:rt)}:Le==="has"?function(rt){return H&&!M(rt)?!1:st(this,rt===0?0:rt)}:function(rt,xt){return st(this,rt===0?0:rt,xt),this})},Ee=y(le,!A(se)||!(H||de.forEach&&!B(function(){new se().entries().next()})));if(Ee)q=Z.getConstructor(ae,le,oe,fe),S.enable();else if(y(le,!0)){var Xe=new q,re=Xe[fe](H?{}:-0,1)!==Xe,Pe=B(function(){Xe.has(1)}),ye=W(function(Le){new se(Le)}),Se=!H&&B(function(){for(var Le=new se,st=5;st--;)Le[fe](st,st);return!Le.has(-0)});ye||(q=ae(function(Le,st){j(Le,de);var Ke=J(new se,Le,q);return I(st)||g(st,Ke[fe],{that:Ke,AS_ENTRIES:oe}),Ke}),q.prototype=de,de.constructor=q),(Pe||Se)&&(ge("delete"),ge("has"),oe&&ge("get")),(Se||re)&&ge(fe),H&&de.clear&&delete de.clear}return U[le]=q,f({global:!0,constructor:!0,forced:q!==se},U),Y(q,le),H||Z.setStrong(q,le,oe),q}},
vendor: 466 bytes, line 166
166"./node_modules/core-js/internals/copy-constructor-properties.js":function(w,O,t){var f=t("./node_modules/core-js/internals/has-own-property.js"),v=t("./node_modules/core-js/internals/own-keys.js"),m=t("./node_modules/core-js/internals/object-get-own-property-descriptor.js"),y=t("./node_modules/core-js/internals/object-define-property.js");w.exports=function(C,S,g){for(var j=v(S),A=y.f,I=m.f,M=0;M<j.length;M++){var B=j[M];!f(C,B)&&!(g&&f(g,B))&&A(C,B,I(S,B))}}},
vendor: 260 bytes, line 166
166"./node_modules/core-js/internals/correct-is-regexp-logic.js":function(w,O,t){var f=t("./node_modules/core-js/internals/well-known-symbol.js"),v=f("match");w.exports=function(m){var y=/./;try{"/./"[m](y)}catch{try{return y[v]=!1,"/./"[m](y)}catch{}}return!1}},
vendor: 252 bytes, line 166
166"./node_modules/core-js/internals/correct-prototype-getter.js":function(w,O,t){var f=t("./node_modules/core-js/internals/fails.js");w.exports=!f(function(){function v(){}return v.prototype.constructor=null,Object.getPrototypeOf(new v)!==v.prototype})},
vendor: 404 bytes, line 166
166"./node_modules/core-js/internals/create-html.js":function(w,O,t){var f=t("./node_modules/core-js/internals/function-uncurry-this.js"),v=t("./node_modules/core-js/internals/require-object-coercible.js"),m=t("./node_modules/core-js/internals/to-string.js"),y=/"/g,C=f("".replace);w.exports=function(S,g,j,A){var I=m(v(S)),M="<"+g;return j!==""&&(M+=" "+j+'="'+C(m(A),y,"&quot;")+'"'),M+">"+I+"</"+g+">"}},
vendor: 125 bytes, line 166
166"./node_modules/core-js/internals/create-iter-result-object.js":function(w){w.exports=function(O,t){return{value:O,done:t}}},
vendor: 366 bytes, line 166
166"./node_modules/core-js/internals/create-non-enumerable-property.js":function(w,O,t){var f=t("./node_modules/core-js/internals/descriptors.js"),v=t("./node_modules/core-js/internals/object-define-property.js"),m=t("./node_modules/core-js/internals/create-property-descriptor.js");w.exports=f?function(y,C,S){return v.f(y,C,m(1,S))}:function(y,C,S){return y[C]=S,y}},
vendor: 173 bytes, line 166
166"./node_modules/core-js/internals/create-property-descriptor.js":function(w){w.exports=function(O,t){return{enumerable:!(O&1),configurable:!(O&2),writable:!(O&4),value:t}}},
vendor: 318 bytes, line 166
166"./node_modules/core-js/internals/create-property.js":function(w,O,t){var f=t("./node_modules/core-js/internals/descriptors.js"),v=t("./node_modules/core-js/internals/object-define-property.js"),m=t("./node_modules/core-js/internals/create-property-descriptor.js");w.exports=function(y,C,S){f?v.f(y,C,m(0,S)):y[C]=S}},
vendor: 312 bytes, line 166
166"./node_modules/core-js/internals/define-built-in-accessor.js":function(w,O,t){var f=t("./node_modules/core-js/internals/make-built-in.js"),v=t("./node_modules/core-js/internals/object-define-property.js");w.exports=function(m,y,C){return C.get&&f(C.get,y,{getter:!0}),C.set&&f(C.set,y,{setter:!0}),v.f(m,y,C)}},
vendor: 604 bytes, line 166
166"./node_modules/core-js/internals/define-built-in.js":function(w,O,t){var f=t("./node_modules/core-js/internals/is-callable.js"),v=t("./node_modules/core-js/internals/object-define-property.js"),m=t("./node_modules/core-js/internals/make-built-in.js"),y=t("./node_modules/core-js/internals/define-global-property.js");w.exports=function(C,S,g,j){j||(j={});var A=j.enumerable,I=j.name!==void 0?j.name:S;if(f(g)&&m(g,I,j),j.global)A?C[S]=g:y(S,g);else{try{j.unsafe?C[S]&&(A=!0):delete C[S]}catch{}A?C[S]=g:v.f(C,S,{value:g,enumerable:!1,configurable:!j.nonConfigurable,writable:!j.nonWritable})}return C}},
vendor: 200 bytes, line 166
166"./node_modules/core-js/internals/define-built-ins.js":function(w,O,t){var f=t("./node_modules/core-js/internals/define-built-in.js");w.exports=function(v,m,y){for(var C in m)f(v,C,m[C],y);return v}},
vendor: 257 bytes, line 166
166"./node_modules/core-js/internals/define-global-property.js":function(w,O,t){var f=t("./node_modules/core-js/internals/global-this.js"),v=Object.defineProperty;w.exports=function(m,y){try{v(f,m,{value:y,configurable:!0,writable:!0})}catch{f[m]=y}return y}},
vendor: 215 bytes, line 166
166"./node_modules/core-js/internals/descriptors.js":function(w,O,t){var f=t("./node_modules/core-js/internals/fails.js");w.exports=!f(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})},
vendor: 285 bytes, line 166
166"./node_modules/core-js/internals/document-create-element.js":function(w,O,t){var f=t("./node_modules/core-js/internals/global-this.js"),v=t("./node_modules/core-js/internals/is-object.js"),m=f.document,y=v(m)&&v(m.createElement);w.exports=function(C){return y?m.createElement(C):{}}},
vendor: 196 bytes, line 166
166"./node_modules/core-js/internals/does-not-exceed-safe-integer.js":function(w){var O=TypeError,t=9007199254740991;w.exports=function(f){if(f>t)throw O("Maximum allowed index exceeded");return f}},
vendor: 577 bytes, line 166
166"./node_modules/core-js/internals/dom-iterables.js":function(w){w.exports={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}},
vendor: 257 bytes, line 166
166"./node_modules/core-js/internals/dom-token-list-prototype.js":function(w,O,t){var f=t("./node_modules/core-js/internals/document-create-element.js"),v=f("span").classList,m=v&&v.constructor&&v.constructor.prototype;w.exports=m===Object.prototype?void 0:m},
vendor: 185 bytes, line 166
166"./node_modules/core-js/internals/enum-bug-keys.js":function(w){w.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},
vendor: 208 bytes, line 166
166"./node_modules/core-js/internals/environment-is-ios-pebble.js":function(w,O,t){var f=t("./node_modules/core-js/internals/environment-user-agent.js");w.exports=/ipad|iphone|ipod/i.test(f)&&typeof Pebble<"u"},
vendor: 199 bytes, line 166
166"./node_modules/core-js/internals/environment-is-ios.js":function(w,O,t){var f=t("./node_modules/core-js/internals/environment-user-agent.js");w.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(f)},
vendor: 155 bytes, line 166
166"./node_modules/core-js/internals/environment-is-node.js":function(w,O,t){var f=t("./node_modules/core-js/internals/environment.js");w.exports=f==="NODE"},
vendor: 192 bytes, line 166
166"./node_modules/core-js/internals/environment-is-webos-webkit.js":function(w,O,t){var f=t("./node_modules/core-js/internals/environment-user-agent.js");w.exports=/web0s(?!.*chrome)/i.test(f)},
vendor: 193 bytes, line 166
166"./node_modules/core-js/internals/environment-user-agent.js":function(w,O,t){var f=t("./node_modules/core-js/internals/global-this.js"),v=f.navigator,m=v&&v.userAgent;w.exports=m?String(m):""},
vendor: 424 bytes, line 166
166"./node_modules/core-js/internals/environment-v8-version.js":function(w,O,t){var f=t("./node_modules/core-js/internals/global-this.js"),v=t("./node_modules/core-js/internals/environment-user-agent.js"),m=f.process,y=f.Deno,C=m&&m.versions||y&&y.version,S=C&&C.v8,g,j;S&&(g=S.split("."),j=g[0]>0&&g[0]<4?1:+(g[0]+g[1])),!j&&v&&(g=v.match(/Edge\/(\d+)/),(!g||g[1]>=74)&&(g=v.match(/Chrome\/(\d+)/),g&&(j=+g[1]))),w.exports=j},
vendor: 573 bytes, line 166
166"./node_modules/core-js/internals/environment.js":function(w,O,t){var f=t("./node_modules/core-js/internals/global-this.js"),v=t("./node_modules/core-js/internals/environment-user-agent.js"),m=t("./node_modules/core-js/internals/classof-raw.js"),y=function(C){return v.slice(0,C.length)===C};w.exports=function(){return y("Bun/")?"BUN":y("Cloudflare-Workers")?"CLOUDFLARE":y("Deno/")?"DENO":y("Node.js/")?"NODE":f.Bun&&typeof Bun.version=="string"?"BUN":f.Deno&&typeof Deno.version=="object"?"DENO":m(f.process)==="process"?"NODE":f.window&&f.document?"BROWSER":"REST"}()},
vendor: 868 bytes, line 166
166"./node_modules/core-js/internals/export.js":function(w,O,t){var f=t("./node_modules/core-js/internals/global-this.js"),v=t("./node_modules/core-js/internals/object-get-own-property-descriptor.js").f,m=t("./node_modules/core-js/internals/create-non-enumerable-property.js"),y=t("./node_modules/core-js/internals/define-built-in.js"),C=t("./node_modules/core-js/internals/define-global-property.js"),S=t("./node_modules/core-js/internals/copy-constructor-properties.js"),g=t("./node_modules/core-js/internals/is-forced.js");w.exports=function(j,A){var I=j.target,M=j.global,B=j.stat,W,Y,J,le,ae,Z;if(M?Y=f:B?Y=f[I]||C(I,{}):Y=f[I]&&f[I].prototype,Y)for(J in A){if(ae=A[J],j.dontCallGetSet?(Z=v(Y,J),le=Z&&Z.value):le=Y[J],W=g(M?J:I+(B?".":"#")+J,j.forced),!W&&le!==void 0){if(typeof ae==typeof le)continue;S(ae,le)}(j.sham||le&&le.sham)&&m(ae,"sham",!0),y(Y,J,ae,j)}}},
vendor: 112 bytes, line 166
166"./node_modules/core-js/internals/fails.js":function(w){w.exports=function(O){try{return!!O()}catch{return!0}}},
vendor: 1,083 bytes, line 166
166"./node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js":function(w,O,t){t("./node_modules/core-js/modules/es.regexp.exec.js");var f=t("./node_modules/core-js/internals/function-call.js"),v=t("./node_modules/core-js/internals/define-built-in.js"),m=t("./node_modules/core-js/internals/regexp-exec.js"),y=t("./node_modules/core-js/internals/fails.js"),C=t("./node_modules/core-js/internals/well-known-symbol.js"),S=t("./node_modules/core-js/internals/create-non-enumerable-property.js"),g=C("species"),j=RegExp.prototype;w.exports=function(A,I,M,B){var W=C(A),Y=!y(function(){var Z={};return Z[W]=function(){return 7},""[A](Z)!==7}),J=Y&&!y(function(){var Z=!1,oe=/a/;if(A==="split"){var H={};H[g]=function(){return oe},oe={constructor:H,flags:""},oe[W]=/./[W]}return oe.exec=function(){return Z=!0,null},oe[W](""),!Z});if(!Y||!J||M){var le=/./[W],ae=I(W,""[A],function(Z,oe,H,fe,se){var de=oe.exec;return de===m||de===j.exec?Y&&!se?{done:!0,value:f(le,oe,H,fe)}:{done:!0,value:f(Z,H,oe,fe)}:{done:!1}});v(String.prototype,A,ae[0]),v(j,W,ae[1])}B&&S(j[W],"sham",!0)}},
vendor: 200 bytes, line 166
166"./node_modules/core-js/internals/freezing.js":function(w,O,t){var f=t("./node_modules/core-js/internals/fails.js");w.exports=!f(function(){return Object.isExtensible(Object.preventExtensions({}))})},
vendor: 283 bytes, line 166
166"./node_modules/core-js/internals/function-apply.js":function(w,O,t){var f=t("./node_modules/core-js/internals/function-bind-native.js"),v=Function.prototype,m=v.apply,y=v.call;w.exports=typeof Reflect=="object"&&Reflect.apply||(f?y.bind(m):function(){return y.apply(m,arguments)})},
vendor: 382 bytes, line 166
166"./node_modules/core-js/internals/function-bind-context.js":function(w,O,t){var f=t("./node_modules/core-js/internals/function-uncurry-this-clause.js"),v=t("./node_modules/core-js/internals/a-callable.js"),m=t("./node_modules/core-js/internals/function-bind-native.js"),y=f(f.bind);w.exports=function(C,S){return v(C),S===void 0?C:m?y(C,S):function(){return C.apply(S,arguments)}}},
vendor: 242 bytes, line 166
166"./node_modules/core-js/internals/function-bind-native.js":function(w,O,t){var f=t("./node_modules/core-js/internals/fails.js");w.exports=!f(function(){var v=(function(){}).bind();return typeof v!="function"||v.hasOwnProperty("prototype")})},
vendor: 225 bytes, line 166
166"./node_modules/core-js/internals/function-call.js":function(w,O,t){var f=t("./node_modules/core-js/internals/function-bind-native.js"),v=Function.prototype.call;w.exports=f?v.bind(v):function(){return v.apply(v,arguments)}},
vendor: 383 bytes, line 166
166"./node_modules/core-js/internals/function-name.js":function(w,O,t){var f=t("./node_modules/core-js/internals/descriptors.js"),v=t("./node_modules/core-js/internals/has-own-property.js"),m=Function.prototype,y=f&&Object.getOwnPropertyDescriptor,C=v(m,"name"),S=C&&(function(){}).name==="something",g=C&&(!f||f&&y(m,"name").configurable);w.exports={EXISTS:C,PROPER:S,CONFIGURABLE:g}},
vendor: 301 bytes, line 166
166"./node_modules/core-js/internals/function-uncurry-this-accessor.js":function(w,O,t){var f=t("./node_modules/core-js/internals/function-uncurry-this.js"),v=t("./node_modules/core-js/internals/a-callable.js");w.exports=function(m,y,C){try{return f(v(Object.getOwnPropertyDescriptor(m,y)[C]))}catch{}}},
vendor: 264 bytes, line 166
166"./node_modules/core-js/internals/function-uncurry-this-clause.js":function(w,O,t){var f=t("./node_modules/core-js/internals/classof-raw.js"),v=t("./node_modules/core-js/internals/function-uncurry-this.js");w.exports=function(m){if(f(m)==="Function")return v(m)}},
vendor: 271 bytes, line 166
166"./node_modules/core-js/internals/function-uncurry-this.js":function(w,O,t){var f=t("./node_modules/core-js/internals/function-bind-native.js"),v=Function.prototype,m=v.call,y=f&&v.bind.bind(m,m);w.exports=f?y:function(C){return function(){return m.apply(C,arguments)}}},
vendor: 291 bytes, line 166
166"./node_modules/core-js/internals/get-built-in.js":function(w,O,t){var f=t("./node_modules/core-js/internals/global-this.js"),v=t("./node_modules/core-js/internals/is-callable.js"),m=function(y){return v(y)?y:void 0};w.exports=function(y,C){return arguments.length<2?m(f[y]):f[y]&&f[y][C]}},
vendor: 133 bytes, line 166
166"./node_modules/core-js/internals/get-iterator-direct.js":function(w){w.exports=function(O){return{iterator:O,next:O.next,done:!1}}},
vendor: 452 bytes, line 166
166"./node_modules/core-js/internals/get-iterator-method.js":function(w,O,t){var f=t("./node_modules/core-js/internals/classof.js"),v=t("./node_modules/core-js/internals/get-method.js"),m=t("./node_modules/core-js/internals/is-null-or-undefined.js"),y=t("./node_modules/core-js/internals/iterators.js"),C=t("./node_modules/core-js/internals/well-known-symbol.js"),S=C("iterator");w.exports=function(g){if(!m(g))return v(g,S)||v(g,"@@iterator")||y[f(g)]}},
vendor: 487 bytes, line 166
166"./node_modules/core-js/internals/get-iterator.js":function(w,O,t){var f=t("./node_modules/core-js/internals/function-call.js"),v=t("./node_modules/core-js/internals/a-callable.js"),m=t("./node_modules/core-js/internals/an-object.js"),y=t("./node_modules/core-js/internals/try-to-string.js"),C=t("./node_modules/core-js/internals/get-iterator-method.js"),S=TypeError;w.exports=function(g,j){var A=arguments.length<2?C(g):j;if(v(A))return m(f(A,g));throw new S(y(g)+" is not iterable")}},
vendor: 248 bytes, line 166
166"./node_modules/core-js/internals/get-method.js":function(w,O,t){var f=t("./node_modules/core-js/internals/a-callable.js"),v=t("./node_modules/core-js/internals/is-null-or-undefined.js");w.exports=function(m,y){var C=m[y];return v(C)?void 0:f(C)}},
vendor: 745 bytes, line 166
166"./node_modules/core-js/internals/get-set-record.js":function(w,O,t){var f=t("./node_modules/core-js/internals/a-callable.js"),v=t("./node_modules/core-js/internals/an-object.js"),m=t("./node_modules/core-js/internals/function-call.js"),y=t("./node_modules/core-js/internals/to-integer-or-infinity.js"),C=t("./node_modules/core-js/internals/get-iterator-direct.js"),S="Invalid size",g=RangeError,j=TypeError,A=Math.max,I=function(M,B){this.set=M,this.size=A(B,0),this.has=f(M.has),this.keys=f(M.keys)};I.prototype={getIterator:function(){return C(v(m(this.keys,this.set)))},includes:function(M){return m(this.has,this.set,M)}},w.exports=function(M){v(M);var B=+M.size;if(B!==B)throw new j(S);var W=y(B);if(W<0)throw new g(S);return new I(M,W)}},
vendor: 728 bytes, line 166
166"./node_modules/core-js/internals/get-substitution.js":function(w,O,t){var f=t("./node_modules/core-js/internals/function-uncurry-this.js"),v=t("./node_modules/core-js/internals/to-object.js"),m=Math.floor,y=f("".charAt),C=f("".replace),S=f("".slice),g=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,j=/\$([$&'`]|\d{1,2})/g;w.exports=function(A,I,M,B,W,Y){var J=M+A.length,le=B.length,ae=j;return W!==void 0&&(W=v(W),ae=g),C(Y,ae,function(Z,oe){var H;switch(y(oe,0)){case"$":return"$";case"&":return A;case"`":return S(I,0,M);case"'":return S(I,J);case"<":H=W[S(oe,1,-1)];break;default:var fe=+oe;if(fe===0)return Z;if(fe>le){var se=m(fe/10);return se===0?Z:se<=le?B[se-1]===void 0?y(oe,1):B[se-1]+y(oe,1):Z}H=B[fe-1]}return H===void 0?"":H})}},
vendor: 344 bytes, line 166
166"./node_modules/core-js/internals/global-this.js":function(w){var O=function(t){return t&&t.Math===Math&&t};w.exports=O(typeof globalThis=="object"&&globalThis)||O(typeof window=="object"&&window)||O(typeof self=="object"&&self)||O(typeof td=="object"&&td)||O(typeof this=="object"&&this)||function(){return this}()||Function("return this")()},
vendor: 274 bytes, line 166
166"./node_modules/core-js/internals/has-own-property.js":function(w,O,t){var f=t("./node_modules/core-js/internals/function-uncurry-this.js"),v=t("./node_modules/core-js/internals/to-object.js"),m=f({}.hasOwnProperty);w.exports=Object.hasOwn||function(C,S){return m(v(C),S)}},
vendor: 76 bytes, line 166
166"./node_modules/core-js/internals/hidden-keys.js":function(w){w.exports={}},
vendor: 164 bytes, line 166
166"./node_modules/core-js/internals/host-report-errors.js":function(w){w.exports=function(O,t){try{arguments.length===1?console.error(O):console.error(O,t)}catch{}}},
vendor: 162 bytes, line 166
166"./node_modules/core-js/internals/html.js":function(w,O,t){var f=t("./node_modules/core-js/internals/get-built-in.js");w.exports=f("document","documentElement")},
vendor: 351 bytes, line 166
166"./node_modules/core-js/internals/ie8-dom-define.js":function(w,O,t){var f=t("./node_modules/core-js/internals/descriptors.js"),v=t("./node_modules/core-js/internals/fails.js"),m=t("./node_modules/core-js/internals/document-create-element.js");w.exports=!f&&!v(function(){return Object.defineProperty(m("div"),"a",{get:function(){return 7}}).a!==7})},
vendor: 380 bytes, line 166
166"./node_modules/core-js/internals/indexed-object.js":function(w,O,t){var f=t("./node_modules/core-js/internals/function-uncurry-this.js"),v=t("./node_modules/core-js/internals/fails.js"),m=t("./node_modules/core-js/internals/classof-raw.js"),y=Object,C=f("".split);w.exports=v(function(){return!y("z").propertyIsEnumerable(0)})?function(S){return m(S)==="String"?C(S,""):y(S)}:y},
vendor: 370 bytes, line 166
166"./node_modules/core-js/internals/inherit-if-required.js":function(w,O,t){var f=t("./node_modules/core-js/internals/is-callable.js"),v=t("./node_modules/core-js/internals/is-object.js"),m=t("./node_modules/core-js/internals/object-set-prototype-of.js");w.exports=function(y,C,S){var g,j;return m&&f(g=C.constructor)&&g!==S&&v(j=g.prototype)&&j!==S.prototype&&m(y,j),y}},
vendor: 362 bytes, line 166
166"./node_modules/core-js/internals/inspect-source.js":function(w,O,t){var f=t("./node_modules/core-js/internals/function-uncurry-this.js"),v=t("./node_modules/core-js/internals/is-callable.js"),m=t("./node_modules/core-js/internals/shared-store.js"),y=f(Function.toString);v(m.inspectSource)||(m.inspectSource=function(C){return y(C)}),w.exports=m.inspectSource},
vendor: 1,487 bytes, line 166
166"./node_modules/core-js/internals/internal-metadata.js":function(w,O,t){var f=t("./node_modules/core-js/internals/export.js"),v=t("./node_modules/core-js/internals/function-uncurry-this.js"),m=t("./node_modules/core-js/internals/hidden-keys.js"),y=t("./node_modules/core-js/internals/is-object.js"),C=t("./node_modules/core-js/internals/has-own-property.js"),S=t("./node_modules/core-js/internals/object-define-property.js").f,g=t("./node_modules/core-js/internals/object-get-own-property-names.js"),j=t("./node_modules/core-js/internals/object-get-own-property-names-external.js"),A=t("./node_modules/core-js/internals/object-is-extensible.js"),I=t("./node_modules/core-js/internals/uid.js"),M=t("./node_modules/core-js/internals/freezing.js"),B=!1,W=I("meta"),Y=0,J=function(fe){S(fe,W,{value:{objectID:"O"+Y++,weakData:{}}})},le=function(fe,se){if(!y(fe))return typeof fe=="symbol"?fe:(typeof fe=="string"?"S":"P")+fe;if(!C(fe,W)){if(!A(fe))return"F";if(!se)return"E";J(fe)}return fe[W].objectID},ae=function(fe,se){if(!C(fe,W)){if(!A(fe))return!0;if(!se)return!1;J(fe)}return fe[W].weakData},Z=function(fe){return M&&B&&A(fe)&&!C(fe,W)&&J(fe),fe},oe=function(){H.enable=function(){},B=!0;var fe=g.f,se=v([].splice),de={};de[W]=1,fe(de).length&&(g.f=function(q){for(var U=fe(q),ge=0,Ee=U.length;ge<Ee;ge++)if(U[ge]===W){se(U,ge,1);break}return U},f({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:j.f}))},H=w.exports={enable:oe,fastKey:le,getWeakData:ae,onFreeze:Z};m[W]=!0},
vendor: 1,265 bytes, line 166
166"./node_modules/core-js/internals/internal-state.js":function(w,O,t){var f=t("./node_modules/core-js/internals/weak-map-basic-detection.js"),v=t("./node_modules/core-js/internals/global-this.js"),m=t("./node_modules/core-js/internals/is-object.js"),y=t("./node_modules/core-js/internals/create-non-enumerable-property.js"),C=t("./node_modules/core-js/internals/has-own-property.js"),S=t("./node_modules/core-js/internals/shared-store.js"),g=t("./node_modules/core-js/internals/shared-key.js"),j=t("./node_modules/core-js/internals/hidden-keys.js"),A="Object already initialized",I=v.TypeError,M=v.WeakMap,B,W,Y,J=function(oe){return Y(oe)?W(oe):B(oe,{})},le=function(oe){return function(H){var fe;if(!m(H)||(fe=W(H)).type!==oe)throw new I("Incompatible receiver, "+oe+" required");return fe}};if(f||S.state){var ae=S.state||(S.state=new M);ae.get=ae.get,ae.has=ae.has,ae.set=ae.set,B=function(oe,H){if(ae.has(oe))throw new I(A);return H.facade=oe,ae.set(oe,H),H},W=function(oe){return ae.get(oe)||{}},Y=function(oe){return ae.has(oe)}}else{var Z=g("state");j[Z]=!0,B=function(oe,H){if(C(oe,Z))throw new I(A);return H.facade=oe,y(oe,Z,H),H},W=function(oe){return C(oe,Z)?oe[Z]:{}},Y=function(oe){return C(oe,Z)}}w.exports={set:B,get:W,has:Y,enforce:J,getterFor:le}},
vendor: 298 bytes, line 166
166"./node_modules/core-js/internals/is-array-iterator-method.js":function(w,O,t){var f=t("./node_modules/core-js/internals/well-known-symbol.js"),v=t("./node_modules/core-js/internals/iterators.js"),m=f("iterator"),y=Array.prototype;w.exports=function(C){return C!==void 0&&(v.Array===C||y[m]===C)}},
vendor: 183 bytes, line 166
166"./node_modules/core-js/internals/is-array.js":function(w,O,t){var f=t("./node_modules/core-js/internals/classof-raw.js");w.exports=Array.isArray||function(m){return f(m)==="Array"}},
vendor: 233 bytes, line 166
166"./node_modules/core-js/internals/is-callable.js":function(w){var O=typeof document=="object"&&document.all;w.exports=typeof O>"u"&&O!==void 0?function(t){return typeof t=="function"||t===O}:function(t){return typeof t=="function"}},
vendor: 850 bytes, line 166
166"./node_modules/core-js/internals/is-constructor.js":function(w,O,t){var f=t("./node_modules/core-js/internals/function-uncurry-this.js"),v=t("./node_modules/core-js/internals/fails.js"),m=t("./node_modules/core-js/internals/is-callable.js"),y=t("./node_modules/core-js/internals/classof.js"),C=t("./node_modules/core-js/internals/get-built-in.js"),S=t("./node_modules/core-js/internals/inspect-source.js"),g=function(){},j=C("Reflect","construct"),A=/^\s*(?:class|function)\b/,I=f(A.exec),M=!A.test(g),B=function(J){if(!m(J))return!1;try{return j(g,[],J),!0}catch{return!1}},W=function(J){if(!m(J))return!1;switch(y(J)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return M||!!I(A,S(J))}catch{return!0}};W.sham=!0,w.exports=!j||v(function(){var Y;return B(B.call)||!B(Object)||!B(function(){Y=!0})||Y})?W:B},
vendor: 392 bytes, line 166
166"./node_modules/core-js/internals/is-forced.js":function(w,O,t){var f=t("./node_modules/core-js/internals/fails.js"),v=t("./node_modules/core-js/internals/is-callable.js"),m=/#|\.prototype\./,y=function(A,I){var M=S[C(A)];return M===j?!0:M===g?!1:v(I)?f(I):!!I},C=y.normalize=function(A){return String(A).replace(m,".").toLowerCase()},S=y.data={},g=y.NATIVE="N",j=y.POLYFILL="P";w.exports=y},
vendor: 486 bytes, line 166
166"./node_modules/core-js/internals/is-iterable.js":function(w,O,t){var f=t("./node_modules/core-js/internals/classof.js"),v=t("./node_modules/core-js/internals/has-own-property.js"),m=t("./node_modules/core-js/internals/is-null-or-undefined.js"),y=t("./node_modules/core-js/internals/well-known-symbol.js"),C=t("./node_modules/core-js/internals/iterators.js"),S=y("iterator"),g=Object;w.exports=function(j){if(m(j))return!1;var A=g(j);return A[S]!==void 0||"@@iterator"in A||v(C,f(A))}},
vendor: 110 bytes, line 166
166"./node_modules/core-js/internals/is-null-or-undefined.js":function(w){w.exports=function(O){return O==null}},
vendor: 187 bytes, line 166
166"./node_modules/core-js/internals/is-object.js":function(w,O,t){var f=t("./node_modules/core-js/internals/is-callable.js");w.exports=function(v){return typeof v=="object"?v!==null:f(v)}},
vendor: 179 bytes, line 166
166"./node_modules/core-js/internals/is-possible-prototype.js":function(w,O,t){var f=t("./node_modules/core-js/internals/is-object.js");w.exports=function(v){return f(v)||v===null}},
vendor: 72 bytes, line 166
166"./node_modules/core-js/internals/is-pure.js":function(w){w.exports=!1},
vendor: 268 bytes, line 166
166"./node_modules/core-js/internals/is-raw-json.js":function(w,O,t){var f=t("./node_modules/core-js/internals/is-object.js"),v=t("./node_modules/core-js/internals/internal-state.js").get;w.exports=function(y){if(!f(y))return!1;var C=v(y);return!!C&&C.type==="RawJSON"}},
vendor: 333 bytes, line 166
166"./node_modules/core-js/internals/is-regexp.js":function(w,O,t){var f=t("./node_modules/core-js/internals/is-object.js"),v=t("./node_modules/core-js/internals/classof-raw.js"),m=t("./node_modules/core-js/internals/well-known-symbol.js"),y=m("match");w.exports=function(C){var S;return f(C)&&((S=C[y])!==void 0?!!S:v(C)==="RegExp")}},
vendor: 431 bytes, line 166
166"./node_modules/core-js/internals/is-symbol.js":function(w,O,t){var f=t("./node_modules/core-js/internals/get-built-in.js"),v=t("./node_modules/core-js/internals/is-callable.js"),m=t("./node_modules/core-js/internals/object-is-prototype-of.js"),y=t("./node_modules/core-js/internals/use-symbol-as-uid.js"),C=Object;w.exports=y?function(S){return typeof S=="symbol"}:function(S){var g=f("Symbol");return v(g)&&m(g.prototype,C(S))}},
vendor: 250 bytes, line 166
166"./node_modules/core-js/internals/iterate-simple.js":function(w,O,t){var f=t("./node_modules/core-js/internals/function-call.js");w.exports=function(v,m,y){for(var C=y?v:v.iterator,S=v.next,g,j;!(g=f(S,C)).done;)if(j=m(g.value),j!==void 0)return j}},
vendor: 1,415 bytes, line 166
166"./node_modules/core-js/internals/iterate.js":function(w,O,t){var f=t("./node_modules/core-js/internals/function-bind-context.js"),v=t("./node_modules/core-js/internals/function-call.js"),m=t("./node_modules/core-js/internals/an-object.js"),y=t("./node_modules/core-js/internals/try-to-string.js"),C=t("./node_modules/core-js/internals/is-array-iterator-method.js"),S=t("./node_modules/core-js/internals/length-of-array-like.js"),g=t("./node_modules/core-js/internals/object-is-prototype-of.js"),j=t("./node_modules/core-js/internals/get-iterator.js"),A=t("./node_modules/core-js/internals/get-iterator-method.js"),I=t("./node_modules/core-js/internals/iterator-close.js"),M=TypeError,B=function(Y,J){this.stopped=Y,this.result=J},W=B.prototype;w.exports=function(Y,J,le){var ae=le&&le.that,Z=!!(le&&le.AS_ENTRIES),oe=!!(le&&le.IS_RECORD),H=!!(le&&le.IS_ITERATOR),fe=!!(le&&le.INTERRUPTED),se=f(J,ae),de,q,U,ge,Ee,Xe,re,Pe=function(Se){return de&&I(de,"normal"),new B(!0,Se)},ye=function(Se){return Z?(m(Se),fe?se(Se[0],Se[1],Pe):se(Se[0],Se[1])):fe?se(Se,Pe):se(Se)};if(oe)de=Y.iterator;else if(H)de=Y;else{if(q=A(Y),!q)throw new M(y(Y)+" is not iterable");if(C(q)){for(U=0,ge=S(Y);ge>U;U++)if(Ee=ye(Y[U]),Ee&&g(W,Ee))return Ee;return new B(!1)}de=j(Y,q)}for(Xe=oe?Y.next:de.next;!(re=v(Xe,de)).done;){try{Ee=ye(re.value)}catch(Se){I(de,"throw",Se)}if(typeof Ee=="object"&&Ee&&g(W,Ee))return Ee}return new B(!1)}},
vendor: 292 bytes, line 166
166"./node_modules/core-js/internals/iterator-close-all.js":function(w,O,t){var f=t("./node_modules/core-js/internals/iterator-close.js");w.exports=function(v,m,y){for(var C=v.length-1;C>=0;C--)if(v[C]!==void 0)try{y=f(v[C].iterator,m,y)}catch(S){m="throw",y=S}if(m==="throw")throw y;return y}},
vendor: 414 bytes, line 166
166"./node_modules/core-js/internals/iterator-close.js":function(w,O,t){var f=t("./node_modules/core-js/internals/function-call.js"),v=t("./node_modules/core-js/internals/an-object.js"),m=t("./node_modules/core-js/internals/get-method.js");w.exports=function(y,C,S){var g,j;v(y);try{if(g=m(y,"return"),!g){if(C==="throw")throw S;return S}g=f(g,y)}catch(A){j=!0,g=A}if(C==="throw")throw S;if(j)throw g;return v(g),S}},
vendor: 541 bytes, line 166
166"./node_modules/core-js/internals/iterator-create-constructor.js":function(w,O,t){var f=t("./node_modules/core-js/internals/iterators-core.js").IteratorPrototype,v=t("./node_modules/core-js/internals/object-create.js"),m=t("./node_modules/core-js/internals/create-property-descriptor.js"),y=t("./node_modules/core-js/internals/set-to-string-tag.js"),C=t("./node_modules/core-js/internals/iterators.js"),S=function(){return this};w.exports=function(g,j,A,I){var M=j+" Iterator";return g.prototype=v(f,{next:m(+!I,A)}),y(g,M,!1,!0),C[M]=S,g}},
vendor: 1,662 bytes, line 166
166"./node_modules/core-js/internals/iterator-create-proxy.js":function(w,O,t){var f=t("./node_modules/core-js/internals/function-call.js"),v=t("./node_modules/core-js/internals/object-create.js"),m=t("./node_modules/core-js/internals/create-non-enumerable-property.js"),y=t("./node_modules/core-js/internals/define-built-ins.js"),C=t("./node_modules/core-js/internals/well-known-symbol.js"),S=t("./node_modules/core-js/internals/internal-state.js"),g=t("./node_modules/core-js/internals/get-method.js"),j=t("./node_modules/core-js/internals/iterators-core.js").IteratorPrototype,A=t("./node_modules/core-js/internals/create-iter-result-object.js"),I=t("./node_modules/core-js/internals/iterator-close.js"),M=t("./node_modules/core-js/internals/iterator-close-all.js"),B=C("toStringTag"),W="IteratorHelper",Y="WrapForValidIterator",J="normal",le="throw",ae=S.set,Z=function(fe){var se=S.getterFor(fe?Y:W);return y(v(j),{next:function(){var q=se(this);if(fe)return q.nextHandler();if(q.done)return A(void 0,!0);try{var U=q.nextHandler();return q.returnHandlerResult?U:A(U,q.done)}catch(ge){throw q.done=!0,ge}},return:function(){var de=se(this),q=de.iterator;if(de.done=!0,fe){var U=g(q,"return");return U?f(U,q):A(void 0,!0)}if(de.inner)try{I(de.inner.iterator,J)}catch(ge){return I(q,le,ge)}if(de.openIters)try{M(de.openIters,J)}catch(ge){return I(q,le,ge)}return q&&I(q,J),A(void 0,!0)}})},oe=Z(!0),H=Z(!1);m(H,B,"Iterator Helper"),w.exports=function(fe,se,de){var q=function(ge,Ee){Ee?(Ee.iterator=ge.iterator,Ee.next=ge.next):Ee=ge,Ee.type=se?Y:W,Ee.returnHandlerResult=!!de,Ee.nextHandler=fe,Ee.counter=0,Ee.done=!1,ae(this,Ee)};return q.prototype=se?oe:H,q}},
vendor: 1,997 bytes, line 166
166"./node_modules/core-js/internals/iterator-define.js":function(w,O,t){var f=t("./node_modules/core-js/internals/export.js"),v=t("./node_modules/core-js/internals/function-call.js"),m=t("./node_modules/core-js/internals/is-pure.js"),y=t("./node_modules/core-js/internals/function-name.js"),C=t("./node_modules/core-js/internals/is-callable.js"),S=t("./node_modules/core-js/internals/iterator-create-constructor.js"),g=t("./node_modules/core-js/internals/object-get-prototype-of.js"),j=t("./node_modules/core-js/internals/object-set-prototype-of.js"),A=t("./node_modules/core-js/internals/set-to-string-tag.js"),I=t("./node_modules/core-js/internals/create-non-enumerable-property.js"),M=t("./node_modules/core-js/internals/define-built-in.js"),B=t("./node_modules/core-js/internals/well-known-symbol.js"),W=t("./node_modules/core-js/internals/iterators.js"),Y=t("./node_modules/core-js/internals/iterators-core.js"),J=y.PROPER,le=y.CONFIGURABLE,ae=Y.IteratorPrototype,Z=Y.BUGGY_SAFARI_ITERATORS,oe=B("iterator"),H="keys",fe="values",se="entries",de=function(){return this};w.exports=function(q,U,ge,Ee,Xe,re,Pe){S(ge,U,Ee);var ye=function(Jt){if(Jt===Xe&&rt)return rt;if(!Z&&Jt&&Jt in st)return st[Jt];switch(Jt){case H:return function(){return new ge(this,Jt)};case fe:return function(){return new ge(this,Jt)};case se:return function(){return new ge(this,Jt)}}return function(){return new ge(this)}},Se=U+" Iterator",Le=!1,st=q.prototype,Ke=st[oe]||st["@@iterator"]||Xe&&st[Xe],rt=!Z&&Ke||ye(Xe),xt=U==="Array"&&st.entries||Ke,He,Tt,Kt;if(xt&&(He=g(xt.call(new q)),He!==Object.prototype&&He.next&&(!m&&g(He)!==ae&&(j?j(He,ae):C(He[oe])||M(He,oe,de)),A(He,Se,!0,!0),m&&(W[Se]=de))),J&&Xe===fe&&Ke&&Ke.name!==fe&&(!m&&le?I(st,"name",fe):(Le=!0,rt=function(){return v(Ke,this)})),Xe)if(Tt={values:ye(fe),keys:re?rt:ye(H),entries:ye(se)},Pe)for(Kt in Tt)(Z||Le||!(Kt in st))&&M(st,Kt,Tt[Kt]);else f({target:U,proto:!0,forced:Z||Le},Tt);return(!m||Pe)&&st[oe]!==rt&&M(st,oe,rt,{name:Xe}),W[U]=rt,Tt}},
vendor: 230 bytes, line 166
166"./node_modules/core-js/internals/iterator-helper-throws-on-invalid-iterator.js":function(w){w.exports=function(O,t){var f=typeof Iterator=="function"&&Iterator.prototype[O];if(f)try{f.call({next:null},t).next()}catch{return!0}}},
vendor: 361 bytes, line 166
166"./node_modules/core-js/internals/iterator-helper-without-closing-on-early-error.js":function(w,O,t){var f=t("./node_modules/core-js/internals/global-this.js");w.exports=function(v,m){var y=f.Iterator,C=y&&y.prototype,S=C&&C[v],g=!1;if(S)try{S.call({next:function(){return{done:!0}},return:function(){g=!0}},-1)}catch(j){j instanceof m||(g=!1)}if(!g)return S}},
vendor: 809 bytes, line 166
166"./node_modules/core-js/internals/iterators-core.js":function(w,O,t){var f=t("./node_modules/core-js/internals/fails.js"),v=t("./node_modules/core-js/internals/is-callable.js"),m=t("./node_modules/core-js/internals/is-object.js"),y=t("./node_modules/core-js/internals/object-create.js"),C=t("./node_modules/core-js/internals/object-get-prototype-of.js"),S=t("./node_modules/core-js/internals/define-built-in.js"),g=t("./node_modules/core-js/internals/well-known-symbol.js"),j=t("./node_modules/core-js/internals/is-pure.js"),A=g("iterator"),I=!1,M,B,W;[].keys&&(W=[].keys(),"next"in W?(B=C(C(W)),B!==Object.prototype&&(M=B)):I=!0);var Y=!m(M)||f(function(){var J={};return M[A].call(J)!==J});Y?M={}:j&&(M=y(M)),v(M[A])||S(M,A,function(){return this}),w.exports={IteratorPrototype:M,BUGGY_SAFARI_ITERATORS:I}},
vendor: 74 bytes, line 166
166"./node_modules/core-js/internals/iterators.js":function(w){w.exports={}},
vendor: 175 bytes, line 166
166"./node_modules/core-js/internals/length-of-array-like.js":function(w,O,t){var f=t("./node_modules/core-js/internals/to-length.js");w.exports=function(v){return f(v.length)}},
vendor: 1,369 bytes, line 166
166"./node_modules/core-js/internals/make-built-in.js":function(w,O,t){var f=t("./node_modules/core-js/internals/function-uncurry-this.js"),v=t("./node_modules/core-js/internals/fails.js"),m=t("./node_modules/core-js/internals/is-callable.js"),y=t("./node_modules/core-js/internals/has-own-property.js"),C=t("./node_modules/core-js/internals/descriptors.js"),S=t("./node_modules/core-js/internals/function-name.js").CONFIGURABLE,g=t("./node_modules/core-js/internals/inspect-source.js"),j=t("./node_modules/core-js/internals/internal-state.js"),A=j.enforce,I=j.get,M=String,B=Object.defineProperty,W=f("".slice),Y=f("".replace),J=f([].join),le=C&&!v(function(){return B(function(){},"length",{value:8}).length!==8}),ae=String(String).split("String"),Z=w.exports=function(oe,H,fe){W(M(H),0,7)==="Symbol("&&(H="["+Y(M(H),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),fe&&fe.getter&&(H="get "+H),fe&&fe.setter&&(H="set "+H),(!y(oe,"name")||S&&oe.name!==H)&&(C?B(oe,"name",{value:H,configurable:!0}):oe.name=H),le&&fe&&y(fe,"arity")&&oe.length!==fe.arity&&B(oe,"length",{value:fe.arity});try{fe&&y(fe,"constructor")&&fe.constructor?C&&B(oe,"prototype",{writable:!1}):oe.prototype&&(oe.prototype=void 0)}catch{}var se=A(oe);return y(se,"source")||(se.source=J(ae,typeof H=="string"?H:"")),oe};Function.prototype.toString=Z(function(){return m(this)&&I(this).source||g(this)},"toString")},
vendor: 154 bytes, line 166
166"./node_modules/core-js/internals/math-trunc.js":function(w){var O=Math.ceil,t=Math.floor;w.exports=Math.trunc||function(v){var m=+v;return(m>0?t:O)(m)}},
vendor: 1,198 bytes, line 166
166"./node_modules/core-js/internals/microtask.js":function(w,O,t){var f=t("./node_modules/core-js/internals/global-this.js"),v=t("./node_modules/core-js/internals/safe-get-built-in.js"),m=t("./node_modules/core-js/internals/function-bind-context.js"),y=t("./node_modules/core-js/internals/task.js").set,C=t("./node_modules/core-js/internals/queue.js"),S=t("./node_modules/core-js/internals/environment-is-ios.js"),g=t("./node_modules/core-js/internals/environment-is-ios-pebble.js"),j=t("./node_modules/core-js/internals/environment-is-webos-webkit.js"),A=t("./node_modules/core-js/internals/environment-is-node.js"),I=f.MutationObserver||f.WebKitMutationObserver,M=f.document,B=f.process,W=f.Promise,Y=v("queueMicrotask"),J,le,ae,Z,oe;if(!Y){var H=new C,fe=function(){var se,de;for(A&&(se=B.domain)&&se.exit();de=H.get();)try{de()}catch(q){throw H.head&&J(),q}se&&se.enter()};!S&&!A&&!j&&I&&M?(le=!0,ae=M.createTextNode(""),new I(fe).observe(ae,{characterData:!0}),J=function(){ae.data=le=!le}):!g&&W&&W.resolve?(Z=W.resolve(void 0),Z.constructor=W,oe=m(Z.then,Z),J=function(){oe(fe)}):A?J=function(){B.nextTick(fe)}:(y=m(y,f),J=function(){y(fe)}),Y=function(se){H.head||J(),H.add(se)}}w.exports=Y},
vendor: 241 bytes, line 166
166"./node_modules/core-js/internals/native-raw-json.js":function(w,O,t){var f=t("./node_modules/core-js/internals/fails.js");w.exports=!f(function(){var v="9007199254740993",m=JSON.rawJSON(v);return!JSON.isRawJSON(m)||JSON.stringify(m)!==v})},
vendor: 355 bytes, line 166
166"./node_modules/core-js/internals/new-promise-capability.js":function(w,O,t){var f=t("./node_modules/core-js/internals/a-callable.js"),v=TypeError,m=function(y){var C,S;this.promise=new y(function(g,j){if(C!==void 0||S!==void 0)throw new v("Bad Promise constructor");C=g,S=j}),this.resolve=f(C),this.reject=f(S)};w.exports.f=function(y){return new m(y)}},
vendor: 238 bytes, line 166
166"./node_modules/core-js/internals/not-a-regexp.js":function(w,O,t){var f=t("./node_modules/core-js/internals/is-regexp.js"),v=TypeError;w.exports=function(m){if(f(m))throw new v("The method doesn't accept regular expressions");return m}},
vendor: 1,192 bytes, line 166
166"./node_modules/core-js/internals/object-assign.js":function(w,O,t){var f=t("./node_modules/core-js/internals/descriptors.js"),v=t("./node_modules/core-js/internals/function-uncurry-this.js"),m=t("./node_modules/core-js/internals/function-call.js"),y=t("./node_modules/core-js/internals/fails.js"),C=t("./node_modules/core-js/internals/object-keys.js"),S=t("./node_modules/core-js/internals/object-get-own-property-symbols.js"),g=t("./node_modules/core-js/internals/object-property-is-enumerable.js"),j=t("./node_modules/core-js/internals/to-object.js"),A=t("./node_modules/core-js/internals/indexed-object.js"),I=Object.assign,M=Object.defineProperty,B=v([].concat);w.exports=!I||y(function(){if(f&&I({b:1},I(M({},"a",{enumerable:!0,get:function(){M(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var W={},Y={},J=Symbol("assign detection"),le="abcdefghijklmnopqrst";return W[J]=7,le.split("").forEach(function(ae){Y[ae]=ae}),I({},W)[J]!==7||C(I({},Y)).join("")!==le})?function(Y,J){for(var le=j(Y),ae=arguments.length,Z=1,oe=S.f,H=g.f;ae>Z;)for(var fe=A(arguments[Z++]),se=oe?B(C(fe),oe(fe)):C(fe),de=se.length,q=0,U;de>q;)U=se[q++],(!f||m(H,fe,U))&&(le[U]=fe[U]);return le}:I},
vendor: 1,200 bytes, line 166
166"./node_modules/core-js/internals/object-create.js":function(w,O,t){var f=t("./node_modules/core-js/internals/an-object.js"),v=t("./node_modules/core-js/internals/object-define-properties.js"),m=t("./node_modules/core-js/internals/enum-bug-keys.js"),y=t("./node_modules/core-js/internals/hidden-keys.js"),C=t("./node_modules/core-js/internals/html.js"),S=t("./node_modules/core-js/internals/document-create-element.js"),g=t("./node_modules/core-js/internals/shared-key.js"),j=">",A="<",I="prototype",M="script",B=g("IE_PROTO"),W=function(){},Y=function(oe){return A+M+j+oe+A+"/"+M+j},J=function(oe){oe.write(Y("")),oe.close();var H=oe.parentWindow.Object;return oe=null,H},le=function(){var oe=S("iframe"),H="java"+M+":",fe;return oe.style.display="none",C.appendChild(oe),oe.src=String(H),fe=oe.contentWindow.document,fe.open(),fe.write(Y("document.F=Object")),fe.close(),fe.F},ae,Z=function(){try{ae=new ActiveXObject("htmlfile")}catch{}Z=typeof document<"u"?document.domain&&ae?J(ae):le():J(ae);for(var oe=m.length;oe--;)delete Z[I][m[oe]];return Z()};y[B]=!0,w.exports=Object.create||function(H,fe){var se;return H!==null?(W[I]=f(H),se=new W,W[I]=null,se[B]=H):se=Z(),fe===void 0?se:v.f(se,fe)}},
vendor: 569 bytes, line 166
166"./node_modules/core-js/internals/object-define-properties.js":function(w,O,t){var f=t("./node_modules/core-js/internals/descriptors.js"),v=t("./node_modules/core-js/internals/v8-prototype-define-bug.js"),m=t("./node_modules/core-js/internals/object-define-property.js"),y=t("./node_modules/core-js/internals/an-object.js"),C=t("./node_modules/core-js/internals/to-indexed-object.js"),S=t("./node_modules/core-js/internals/object-keys.js");O.f=f&&!v?Object.defineProperties:function(j,A){y(j);for(var I=C(A),M=S(A),B=M.length,W=0,Y;B>W;)m.f(j,Y=M[W++],I[Y]);return j}},
vendor: 900 bytes, line 166
166"./node_modules/core-js/internals/object-define-property.js":function(w,O,t){var f=t("./node_modules/core-js/internals/descriptors.js"),v=t("./node_modules/core-js/internals/ie8-dom-define.js"),m=t("./node_modules/core-js/internals/v8-prototype-define-bug.js"),y=t("./node_modules/core-js/internals/an-object.js"),C=t("./node_modules/core-js/internals/to-property-key.js"),S=TypeError,g=Object.defineProperty,j=Object.getOwnPropertyDescriptor,A="enumerable",I="configurable",M="writable";O.f=f?m?function(W,Y,J){if(y(W),Y=C(Y),y(J),typeof W=="function"&&Y==="prototype"&&"value"in J&&M in J&&!J[M]){var le=j(W,Y);le&&le[M]&&(W[Y]=J.value,J={configurable:I in J?J[I]:le[I],enumerable:A in J?J[A]:le[A],writable:!1})}return g(W,Y,J)}:g:function(W,Y,J){if(y(W),Y=C(Y),y(J),v)try{return g(W,Y,J)}catch{}if("get"in J||"set"in J)throw new S("Accessors not supported");return"value"in J&&(W[Y]=J.value),W}},
vendor: 725 bytes, line 166
166"./node_modules/core-js/internals/object-get-own-property-descriptor.js":function(w,O,t){var f=t("./node_modules/core-js/internals/descriptors.js"),v=t("./node_modules/core-js/internals/function-call.js"),m=t("./node_modules/core-js/internals/object-property-is-enumerable.js"),y=t("./node_modules/core-js/internals/create-property-descriptor.js"),C=t("./node_modules/core-js/internals/to-indexed-object.js"),S=t("./node_modules/core-js/internals/to-property-key.js"),g=t("./node_modules/core-js/internals/has-own-property.js"),j=t("./node_modules/core-js/internals/ie8-dom-define.js"),A=Object.getOwnPropertyDescriptor;O.f=f?A:function(M,B){if(M=C(M),B=S(B),j)try{return A(M,B)}catch{}if(g(M,B))return y(!v(m.f,M,B),M[B])}},
vendor: 558 bytes, line 166
166"./node_modules/core-js/internals/object-get-own-property-names-external.js":function(w,O,t){var f=t("./node_modules/core-js/internals/classof-raw.js"),v=t("./node_modules/core-js/internals/to-indexed-object.js"),m=t("./node_modules/core-js/internals/object-get-own-property-names.js").f,y=t("./node_modules/core-js/internals/array-slice.js"),C=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],S=function(g){try{return m(g)}catch{return y(C)}};w.exports.f=function(j){return C&&f(j)==="Window"?S(j):m(v(j))}},
vendor: 302 bytes, line 166
166"./node_modules/core-js/internals/object-get-own-property-names.js":function(w,O,t){var f=t("./node_modules/core-js/internals/object-keys-internal.js"),v=t("./node_modules/core-js/internals/enum-bug-keys.js"),m=v.concat("length","prototype");O.f=Object.getOwnPropertyNames||function(C){return f(C,m)}},
vendor: 118 bytes, line 166
166"./node_modules/core-js/internals/object-get-own-property-symbols.js":function(w,O){O.f=Object.getOwnPropertySymbols},
vendor: 569 bytes, line 166
166"./node_modules/core-js/internals/object-get-prototype-of.js":function(w,O,t){var f=t("./node_modules/core-js/internals/has-own-property.js"),v=t("./node_modules/core-js/internals/is-callable.js"),m=t("./node_modules/core-js/internals/to-object.js"),y=t("./node_modules/core-js/internals/shared-key.js"),C=t("./node_modules/core-js/internals/correct-prototype-getter.js"),S=y("IE_PROTO"),g=Object,j=g.prototype;w.exports=C?g.getPrototypeOf:function(A){var I=m(A);if(f(I,S))return I[S];var M=I.constructor;return v(M)&&I instanceof M?M.prototype:I instanceof g?j:null}},
vendor: 428 bytes, line 166
166"./node_modules/core-js/internals/object-is-extensible.js":function(w,O,t){var f=t("./node_modules/core-js/internals/fails.js"),v=t("./node_modules/core-js/internals/is-object.js"),m=t("./node_modules/core-js/internals/classof-raw.js"),y=t("./node_modules/core-js/internals/array-buffer-non-extensible.js"),C=Object.isExtensible,S=f(function(){});w.exports=S||y?function(j){return!v(j)||y&&m(j)==="ArrayBuffer"?!1:C?C(j):!0}:C},
vendor: 177 bytes, line 166
166"./node_modules/core-js/internals/object-is-prototype-of.js":function(w,O,t){var f=t("./node_modules/core-js/internals/function-uncurry-this.js");w.exports=f({}.isPrototypeOf)},
vendor: 541 bytes, line 166
166"./node_modules/core-js/internals/object-keys-internal.js":function(w,O,t){var f=t("./node_modules/core-js/internals/function-uncurry-this.js"),v=t("./node_modules/core-js/internals/has-own-property.js"),m=t("./node_modules/core-js/internals/to-indexed-object.js"),y=t("./node_modules/core-js/internals/array-includes.js").indexOf,C=t("./node_modules/core-js/internals/hidden-keys.js"),S=f([].push);w.exports=function(g,j){var A=m(g),I=0,M=[],B;for(B in A)!v(C,B)&&v(A,B)&&S(M,B);for(;j.length>I;)v(A,B=j[I++])&&(~y(M,B)||S(M,B));return M}},
vendor: 242 bytes, line 166
166"./node_modules/core-js/internals/object-keys.js":function(w,O,t){var f=t("./node_modules/core-js/internals/object-keys-internal.js"),v=t("./node_modules/core-js/internals/enum-bug-keys.js");w.exports=Object.keys||function(y){return f(y,v)}},
vendor: 230 bytes, line 166
166"./node_modules/core-js/internals/object-property-is-enumerable.js":function(w,O){var t={}.propertyIsEnumerable,f=Object.getOwnPropertyDescriptor,v=f&&!t.call({1:2},1);O.f=v?function(y){var C=f(this,y);return!!C&&C.enumerable}:t},
vendor: 582 bytes, line 166
166"./node_modules/core-js/internals/object-set-prototype-of.js":function(w,O,t){var f=t("./node_modules/core-js/internals/function-uncurry-this-accessor.js"),v=t("./node_modules/core-js/internals/is-object.js"),m=t("./node_modules/core-js/internals/require-object-coercible.js"),y=t("./node_modules/core-js/internals/a-possible-prototype.js");w.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var C=!1,S={},g;try{g=f(Object.prototype,"__proto__","set"),g(S,[]),C=S instanceof Array}catch{}return function(A,I){return m(A),y(I),v(A)&&(C?g(A,I):A.__proto__=I),A}}():void 0)},
vendor: 257 bytes, line 166
166"./node_modules/core-js/internals/object-to-string.js":function(w,O,t){var f=t("./node_modules/core-js/internals/to-string-tag-support.js"),v=t("./node_modules/core-js/internals/classof.js");w.exports=f?{}.toString:function(){return"[object "+v(this)+"]"}},
vendor: 477 bytes, line 166
166"./node_modules/core-js/internals/ordinary-to-primitive.js":function(w,O,t){var f=t("./node_modules/core-js/internals/function-call.js"),v=t("./node_modules/core-js/internals/is-callable.js"),m=t("./node_modules/core-js/internals/is-object.js"),y=TypeError;w.exports=function(C,S){var g,j;if(S==="string"&&v(g=C.toString)&&!m(j=f(g,C))||v(g=C.valueOf)&&!m(j=f(g,C))||S!=="string"&&v(g=C.toString)&&!m(j=f(g,C)))return j;throw new y("Can't convert object to primitive value")}},
vendor: 495 bytes, line 166
166"./node_modules/core-js/internals/own-keys.js":function(w,O,t){var f=t("./node_modules/core-js/internals/get-built-in.js"),v=t("./node_modules/core-js/internals/function-uncurry-this.js"),m=t("./node_modules/core-js/internals/object-get-own-property-names.js"),y=t("./node_modules/core-js/internals/object-get-own-property-symbols.js"),C=t("./node_modules/core-js/internals/an-object.js"),S=v([].concat);w.exports=f("Reflect","ownKeys")||function(j){var A=m.f(C(j)),I=y.f;return I?S(A,I(j)):A}},
vendor: 906 bytes, lines 166-167
166"./node_modules/core-js/internals/parse-json-string.js":function(w,O,t){var f=t("./node_modules/core-js/internals/function-uncurry-this.js"),v=t("./node_modules/core-js/internals/has-own-property.js"),m=SyntaxError,y=parseInt,C=String.fromCharCode,S=f("".charAt),g=f("".slice),j=f(/./.exec),A={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":`
167`,"\\r":"\r","\\t":"	"},I=/^[\da-f]{4}$/i,M=/^[\u0000-\u001F]$/;w.exports=function(B,W){for(var Y=!0,J="";W<B.length;){var le=S(B,W);if(le==="\\"){var ae=g(B,W,W+2);if(v(A,ae))J+=A[ae],W+=2;else if(ae==="\\u"){W+=2;var Z=g(B,W,W+4);if(!j(I,Z))throw new m("Bad Unicode escape at: "+W);J+=C(y(Z,16)),W+=4}else throw new m('Unknown escape sequence: "'+ae+'"')}else if(le==='"'){Y=!1,W++;break}else{if(j(M,le))throw new m("Bad control character in string literal at: "+W);J+=le,W++}}if(Y)throw new m("Unterminated string at: "+W);return{value:J,end:W}}},
vendor: 131 bytes, line 167
167"./node_modules/core-js/internals/path.js":function(w,O,t){var f=t("./node_modules/core-js/internals/global-this.js");w.exports=f},
vendor: 148 bytes, line 167
167"./node_modules/core-js/internals/perform.js":function(w){w.exports=function(O){try{return{error:!1,value:O()}}catch(t){return{error:!0,value:t}}}},
vendor: 1,078 bytes, line 167
167"./node_modules/core-js/internals/promise-constructor-detection.js":function(w,O,t){var f=t("./node_modules/core-js/internals/global-this.js"),v=t("./node_modules/core-js/internals/promise-native-constructor.js"),m=t("./node_modules/core-js/internals/is-callable.js"),y=t("./node_modules/core-js/internals/is-forced.js"),C=t("./node_modules/core-js/internals/inspect-source.js"),S=t("./node_modules/core-js/internals/well-known-symbol.js"),g=t("./node_modules/core-js/internals/environment.js"),j=t("./node_modules/core-js/internals/is-pure.js"),A=t("./node_modules/core-js/internals/environment-v8-version.js"),I=v&&v.prototype,M=S("species"),B=!1,W=m(f.PromiseRejectionEvent),Y=y("Promise",function(){var J=C(v),le=J!==String(v);if(!le&&A===66||j&&!(I.catch&&I.finally))return!0;if(!A||A<51||!/native code/.test(J)){var ae=new v(function(H){H(1)}),Z=function(H){H(function(){},function(){})},oe=ae.constructor={};if(oe[M]=Z,B=ae.then(function(){})instanceof Z,!B)return!0}return!le&&(g==="BROWSER"||g==="DENO")&&!W});w.exports={CONSTRUCTOR:Y,REJECTION_EVENT:W,SUBCLASSING:B}},
vendor: 161 bytes, line 167
167"./node_modules/core-js/internals/promise-native-constructor.js":function(w,O,t){var f=t("./node_modules/core-js/internals/global-this.js");w.exports=f.Promise},
vendor: 360 bytes, line 167
167"./node_modules/core-js/internals/promise-resolve.js":function(w,O,t){var f=t("./node_modules/core-js/internals/an-object.js"),v=t("./node_modules/core-js/internals/is-object.js"),m=t("./node_modules/core-js/internals/new-promise-capability.js");w.exports=function(y,C){if(f(y),v(C)&&C.constructor===y)return C;var S=m.f(y),g=S.resolve;return g(C),S.promise}},
vendor: 389 bytes, line 167
167"./node_modules/core-js/internals/promise-statics-incorrect-iteration.js":function(w,O,t){var f=t("./node_modules/core-js/internals/promise-native-constructor.js"),v=t("./node_modules/core-js/internals/check-correctness-of-iteration.js"),m=t("./node_modules/core-js/internals/promise-constructor-detection.js").CONSTRUCTOR;w.exports=m||!v(function(y){f.all(y).then(void 0,function(){})})},
vendor: 323 bytes, line 167
167"./node_modules/core-js/internals/queue.js":function(w){var O=function(){this.head=null,this.tail=null};O.prototype={add:function(t){var f={item:t,next:null},v=this.tail;v?v.next=f:this.head=f,this.tail=f},get:function(){var t=this.head;if(t){var f=this.head=t.next;return f===null&&(this.tail=null),t.item}}},w.exports=O},
vendor: 547 bytes, line 167
167"./node_modules/core-js/internals/regexp-exec-abstract.js":function(w,O,t){var f=t("./node_modules/core-js/internals/function-call.js"),v=t("./node_modules/core-js/internals/an-object.js"),m=t("./node_modules/core-js/internals/is-callable.js"),y=t("./node_modules/core-js/internals/classof-raw.js"),C=t("./node_modules/core-js/internals/regexp-exec.js"),S=TypeError;w.exports=function(g,j){var A=g.exec;if(m(A)){var I=f(A,g,j);return I!==null&&v(I),I}if(y(g)==="RegExp")return f(C,g,j);throw new S("RegExp#exec called on incompatible receiver")}},
vendor: 1,897 bytes, lines 167-168
167"./node_modules/core-js/internals/regexp-exec.js":function(w,O,t){var f=t("./node_modules/core-js/internals/function-call.js"),v=t("./node_modules/core-js/internals/function-uncurry-this.js"),m=t("./node_modules/core-js/internals/to-string.js"),y=t("./node_modules/core-js/internals/regexp-flags.js"),C=t("./node_modules/core-js/internals/regexp-sticky-helpers.js"),S=t("./node_modules/core-js/internals/shared.js"),g=t("./node_modules/core-js/internals/object-create.js"),j=t("./node_modules/core-js/internals/internal-state.js").get,A=t("./node_modules/core-js/internals/regexp-unsupported-dot-all.js"),I=t("./node_modules/core-js/internals/regexp-unsupported-ncg.js"),M=S("native-string-replace",String.prototype.replace),B=RegExp.prototype.exec,W=B,Y=v("".charAt),J=v("".indexOf),le=v("".replace),ae=v("".slice),Z=function(){var se=/a/,de=/b*/g;return f(B,se,"a"),f(B,de,"a"),se.lastIndex!==0||de.lastIndex!==0}(),oe=C.BROKEN_CARET,H=/()??/.exec("")[1]!==void 0,fe=Z||H||oe||A||I;fe&&(W=function(de){var q=this,U=j(q),ge=m(de),Ee=U.raw,Xe,re,Pe,ye,Se,Le,st;if(Ee)return Ee.lastIndex=q.lastIndex,Xe=f(W,Ee,ge),q.lastIndex=Ee.lastIndex,Xe;var Ke=U.groups,rt=oe&&q.sticky,xt=f(y,q),He=q.source,Tt=0,Kt=ge;if(rt&&(xt=le(xt,"y",""),J(xt,"g")===-1&&(xt+="g"),Kt=ae(ge,q.lastIndex),q.lastIndex>0&&(!q.multiline||q.multiline&&Y(ge,q.lastIndex-1)!==`
168`)&&(He="(?: "+He+")",Kt=" "+Kt,Tt++),re=new RegExp("^(?:"+He+")",xt)),H&&(re=new RegExp("^"+He+"$(?!\\s)",xt)),Z&&(Pe=q.lastIndex),ye=f(B,rt?re:q,Kt),rt?ye?(ye.input=ae(ye.input,Tt),ye[0]=ae(ye[0],Tt),ye.index=q.lastIndex,q.lastIndex+=ye[0].length):q.lastIndex=0:Z&&ye&&(q.lastIndex=q.global?ye.index+ye[0].length:Pe),H&&ye&&ye.length>1&&f(M,ye[0],re,function(){for(Se=1;Se<arguments.length-2;Se++)arguments[Se]===void 0&&(ye[Se]=void 0)}),ye&&Ke)for(ye.groups=Le=g(null),Se=0;Se<Ke.length;Se++)st=Ke[Se],Le[st[0]]=ye[st[1]];return ye}),w.exports=W},
vendor: 588 bytes, line 168
168"./node_modules/core-js/internals/regexp-flags-detection.js":function(w,O,t){var f=t("./node_modules/core-js/internals/global-this.js"),v=t("./node_modules/core-js/internals/fails.js"),m=f.RegExp,y=!v(function(){var C=!0;try{m(".","d")}catch{C=!1}var S={},g="",j=C?"dgimsy":"gimsy",A=function(W,Y){Object.defineProperty(S,W,{get:function(){return g+=Y,!0}})},I={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};C&&(I.hasIndices="d");for(var M in I)A(M,I[M]);var B=Object.getOwnPropertyDescriptor(m.prototype,"flags").get.call(S);return B!==j||g!==j});w.exports={correct:y}},
vendor: 344 bytes, line 168
168"./node_modules/core-js/internals/regexp-flags.js":function(w,O,t){var f=t("./node_modules/core-js/internals/an-object.js");w.exports=function(){var v=f(this),m="";return v.hasIndices&&(m+="d"),v.global&&(m+="g"),v.ignoreCase&&(m+="i"),v.multiline&&(m+="m"),v.dotAll&&(m+="s"),v.unicode&&(m+="u"),v.unicodeSets&&(m+="v"),v.sticky&&(m+="y"),m}},
vendor: 516 bytes, line 168
168"./node_modules/core-js/internals/regexp-get-flags.js":function(w,O,t){var f=t("./node_modules/core-js/internals/function-call.js"),v=t("./node_modules/core-js/internals/has-own-property.js"),m=t("./node_modules/core-js/internals/object-is-prototype-of.js"),y=t("./node_modules/core-js/internals/regexp-flags-detection.js"),C=t("./node_modules/core-js/internals/regexp-flags.js"),S=RegExp.prototype;w.exports=y.correct?function(g){return g.flags}:function(g){return!y.correct&&m(S,g)&&!v(g,"flags")?f(C,g):g.flags}},
vendor: 458 bytes, line 168
168"./node_modules/core-js/internals/regexp-sticky-helpers.js":function(w,O,t){var f=t("./node_modules/core-js/internals/fails.js"),v=t("./node_modules/core-js/internals/global-this.js"),m=v.RegExp,y=f(function(){var g=m("a","y");return g.lastIndex=2,g.exec("abcd")!==null}),C=y||f(function(){return!m("a","y").sticky}),S=y||f(function(){var g=m("^r","gy");return g.lastIndex=2,g.exec("str")!==null});w.exports={BROKEN_CARET:S,MISSED_STICKY:C,UNSUPPORTED_Y:y}},
vendor: 289 bytes, lines 168-169
168"./node_modules/core-js/internals/regexp-unsupported-dot-all.js":function(w,O,t){var f=t("./node_modules/core-js/internals/fails.js"),v=t("./node_modules/core-js/internals/global-this.js"),m=v.RegExp;w.exports=f(function(){var y=m(".","s");return!(y.dotAll&&y.test(`
169`)&&y.flags==="s")})},
vendor: 310 bytes, line 169
169"./node_modules/core-js/internals/regexp-unsupported-ncg.js":function(w,O,t){var f=t("./node_modules/core-js/internals/fails.js"),v=t("./node_modules/core-js/internals/global-this.js"),m=v.RegExp;w.exports=f(function(){var y=m("(?<a>b)","g");return y.exec("b").groups.a!=="b"||"b".replace(y,"$<a>c")!=="bc"})},
vendor: 239 bytes, line 169
169"./node_modules/core-js/internals/require-object-coercible.js":function(w,O,t){var f=t("./node_modules/core-js/internals/is-null-or-undefined.js"),v=TypeError;w.exports=function(m){if(f(m))throw new v("Can't call method on "+m);return m}},
vendor: 293 bytes, line 169
169"./node_modules/core-js/internals/safe-get-built-in.js":function(w,O,t){var f=t("./node_modules/core-js/internals/global-this.js"),v=t("./node_modules/core-js/internals/descriptors.js"),m=Object.getOwnPropertyDescriptor;w.exports=function(y){if(!v)return f[y];var C=m(f,y);return C&&C.value}},
vendor: 827 bytes, line 169
169"./node_modules/core-js/internals/schedulers-fix.js":function(w,O,t){var f=t("./node_modules/core-js/internals/global-this.js"),v=t("./node_modules/core-js/internals/function-apply.js"),m=t("./node_modules/core-js/internals/is-callable.js"),y=t("./node_modules/core-js/internals/environment.js"),C=t("./node_modules/core-js/internals/environment-user-agent.js"),S=t("./node_modules/core-js/internals/array-slice.js"),g=t("./node_modules/core-js/internals/validate-arguments-length.js"),j=f.Function,A=/MSIE .\./.test(C)||y==="BUN"&&function(){var I=f.Bun.version.split(".");return I.length<3||I[0]==="0"&&(I[1]<3||I[1]==="3"&&I[2]==="0")}();w.exports=function(I,M){var B=M?2:1;return A?function(W,Y){var J=g(arguments.length,1)>B,le=m(W)?W:j(W),ae=J?S(arguments,B):[],Z=J?function(){v(le,this,ae)}:le;return M?I(Z,Y):I(Z)}:I}},
vendor: 264 bytes, line 169
169"./node_modules/core-js/internals/set-clone.js":function(w,O,t){var f=t("./node_modules/core-js/internals/set-helpers.js"),v=t("./node_modules/core-js/internals/set-iterate.js"),m=f.Set,y=f.add;w.exports=function(C){var S=new m;return v(C,function(g){y(S,g)}),S}},
vendor: 633 bytes, line 169
169"./node_modules/core-js/internals/set-difference.js":function(w,O,t){var f=t("./node_modules/core-js/internals/a-set.js"),v=t("./node_modules/core-js/internals/set-helpers.js"),m=t("./node_modules/core-js/internals/set-clone.js"),y=t("./node_modules/core-js/internals/set-size.js"),C=t("./node_modules/core-js/internals/get-set-record.js"),S=t("./node_modules/core-js/internals/set-iterate.js"),g=t("./node_modules/core-js/internals/iterate-simple.js"),j=v.has,A=v.remove;w.exports=function(M){var B=f(this),W=C(M),Y=m(B);return y(B)<=W.size?S(B,function(J){W.includes(J)&&A(Y,J)}):g(W.getIterator(),function(J){j(Y,J)&&A(Y,J)}),Y}},
vendor: 221 bytes, line 169
169"./node_modules/core-js/internals/set-helpers.js":function(w,O,t){var f=t("./node_modules/core-js/internals/function-uncurry-this.js"),v=Set.prototype;w.exports={Set,add:f(v.add),has:f(v.has),remove:f(v.delete),proto:v}},
vendor: 587 bytes, line 169
169"./node_modules/core-js/internals/set-intersection.js":function(w,O,t){var f=t("./node_modules/core-js/internals/a-set.js"),v=t("./node_modules/core-js/internals/set-helpers.js"),m=t("./node_modules/core-js/internals/set-size.js"),y=t("./node_modules/core-js/internals/get-set-record.js"),C=t("./node_modules/core-js/internals/set-iterate.js"),S=t("./node_modules/core-js/internals/iterate-simple.js"),g=v.Set,j=v.add,A=v.has;w.exports=function(M){var B=f(this),W=y(M),Y=new g;return m(B)>W.size?S(W.getIterator(),function(J){A(B,J)&&j(Y,J)}):C(B,function(J){W.includes(J)&&j(Y,J)}),Y}},
vendor: 674 bytes, line 169
169"./node_modules/core-js/internals/set-is-disjoint-from.js":function(w,O,t){var f=t("./node_modules/core-js/internals/a-set.js"),v=t("./node_modules/core-js/internals/set-helpers.js").has,m=t("./node_modules/core-js/internals/set-size.js"),y=t("./node_modules/core-js/internals/get-set-record.js"),C=t("./node_modules/core-js/internals/set-iterate.js"),S=t("./node_modules/core-js/internals/iterate-simple.js"),g=t("./node_modules/core-js/internals/iterator-close.js");w.exports=function(A){var I=f(this),M=y(A);if(m(I)<=M.size)return C(I,function(W){if(M.includes(W))return!1},!0)!==!1;var B=M.getIterator();return S(B,function(W){if(v(I,W))return g(B,"normal",!1)})!==!1}},
vendor: 409 bytes, line 169
169"./node_modules/core-js/internals/set-is-subset-of.js":function(w,O,t){var f=t("./node_modules/core-js/internals/a-set.js"),v=t("./node_modules/core-js/internals/set-size.js"),m=t("./node_modules/core-js/internals/set-iterate.js"),y=t("./node_modules/core-js/internals/get-set-record.js");w.exports=function(S){var g=f(this),j=y(S);return v(g)>j.size?!1:m(g,function(A){if(!j.includes(A))return!1},!0)!==!1}},
vendor: 567 bytes, line 169
169"./node_modules/core-js/internals/set-is-superset-of.js":function(w,O,t){var f=t("./node_modules/core-js/internals/a-set.js"),v=t("./node_modules/core-js/internals/set-helpers.js").has,m=t("./node_modules/core-js/internals/set-size.js"),y=t("./node_modules/core-js/internals/get-set-record.js"),C=t("./node_modules/core-js/internals/iterate-simple.js"),S=t("./node_modules/core-js/internals/iterator-close.js");w.exports=function(j){var A=f(this),I=y(j);if(m(A)<I.size)return!1;var M=I.getIterator();return C(M,function(B){if(!v(A,B))return S(M,"normal",!1)})!==!1}},
vendor: 381 bytes, line 169
169"./node_modules/core-js/internals/set-iterate.js":function(w,O,t){var f=t("./node_modules/core-js/internals/function-uncurry-this.js"),v=t("./node_modules/core-js/internals/iterate-simple.js"),m=t("./node_modules/core-js/internals/set-helpers.js"),y=m.Set,C=m.proto,S=f(C.forEach),g=f(C.keys),j=g(new y).next;w.exports=function(A,I,M){return M?v({iterator:g(A),next:j},I):S(A,I)}},
vendor: 259 bytes, line 169
169"./node_modules/core-js/internals/set-size.js":function(w,O,t){var f=t("./node_modules/core-js/internals/function-uncurry-this-accessor.js"),v=t("./node_modules/core-js/internals/set-helpers.js");w.exports=f(v.proto,"size","get")||function(m){return m.size}},
vendor: 426 bytes, line 169
169"./node_modules/core-js/internals/set-species.js":function(w,O,t){var f=t("./node_modules/core-js/internals/get-built-in.js"),v=t("./node_modules/core-js/internals/define-built-in-accessor.js"),m=t("./node_modules/core-js/internals/well-known-symbol.js"),y=t("./node_modules/core-js/internals/descriptors.js"),C=m("species");w.exports=function(S){var g=f(S);y&&g&&!g[C]&&v(g,C,{configurable:!0,get:function(){return this}})}},
vendor: 497 bytes, line 169
169"./node_modules/core-js/internals/set-symmetric-difference.js":function(w,O,t){var f=t("./node_modules/core-js/internals/a-set.js"),v=t("./node_modules/core-js/internals/set-helpers.js"),m=t("./node_modules/core-js/internals/set-clone.js"),y=t("./node_modules/core-js/internals/get-set-record.js"),C=t("./node_modules/core-js/internals/iterate-simple.js"),S=v.add,g=v.has,j=v.remove;w.exports=function(I){var M=f(this),B=y(I).getIterator(),W=m(M);return C(B,function(Y){g(M,Y)?j(W,Y):S(W,Y)}),W}},
vendor: 380 bytes, line 169
169"./node_modules/core-js/internals/set-to-string-tag.js":function(w,O,t){var f=t("./node_modules/core-js/internals/object-define-property.js").f,v=t("./node_modules/core-js/internals/has-own-property.js"),m=t("./node_modules/core-js/internals/well-known-symbol.js"),y=m("toStringTag");w.exports=function(C,S,g){C&&!g&&(C=C.prototype),C&&!v(C,y)&&f(C,y,{configurable:!0,value:S})}},
vendor: 445 bytes, line 169
169"./node_modules/core-js/internals/set-union.js":function(w,O,t){var f=t("./node_modules/core-js/internals/a-set.js"),v=t("./node_modules/core-js/internals/set-helpers.js").add,m=t("./node_modules/core-js/internals/set-clone.js"),y=t("./node_modules/core-js/internals/get-set-record.js"),C=t("./node_modules/core-js/internals/iterate-simple.js");w.exports=function(g){var j=f(this),A=y(g).getIterator(),I=m(j);return C(A,function(M){v(I,M)}),I}},
vendor: 227 bytes, line 169
169"./node_modules/core-js/internals/shared-key.js":function(w,O,t){var f=t("./node_modules/core-js/internals/shared.js"),v=t("./node_modules/core-js/internals/uid.js"),m=f("keys");w.exports=function(y){return m[y]||(m[y]=v(y))}},
vendor: 572 bytes, line 169
169"./node_modules/core-js/internals/shared-store.js":function(w,O,t){var f=t("./node_modules/core-js/internals/is-pure.js"),v=t("./node_modules/core-js/internals/global-this.js"),m=t("./node_modules/core-js/internals/define-global-property.js"),y="__core-js_shared__",C=w.exports=v[y]||m(y,{});(C.versions||(C.versions=[])).push({version:"3.47.0",mode:f?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru), 2025 CoreJS Company (core-js.io)",license:"https://github.com/zloirock/core-js/blob/v3.47.0/LICENSE",source:"https://github.com/zloirock/core-js"})},
vendor: 173 bytes, line 169
169"./node_modules/core-js/internals/shared.js":function(w,O,t){var f=t("./node_modules/core-js/internals/shared-store.js");w.exports=function(v,m){return f[v]||(f[v]=m||{})}},
vendor: 418 bytes, line 169
169"./node_modules/core-js/internals/species-constructor.js":function(w,O,t){var f=t("./node_modules/core-js/internals/an-object.js"),v=t("./node_modules/core-js/internals/a-constructor.js"),m=t("./node_modules/core-js/internals/is-null-or-undefined.js"),y=t("./node_modules/core-js/internals/well-known-symbol.js"),C=y("species");w.exports=function(S,g){var j=f(S).constructor,A;return j===void 0||m(A=f(j)[C])?g:v(A)}},
vendor: 239 bytes, line 169
169"./node_modules/core-js/internals/string-html-forced.js":function(w,O,t){var f=t("./node_modules/core-js/internals/fails.js");w.exports=function(v){return f(function(){var m=""[v]('"');return m!==m.toLowerCase()||m.split('"').length>3})}},
vendor: 640 bytes, line 169
169"./node_modules/core-js/internals/string-multibyte.js":function(w,O,t){var f=t("./node_modules/core-js/internals/function-uncurry-this.js"),v=t("./node_modules/core-js/internals/to-integer-or-infinity.js"),m=t("./node_modules/core-js/internals/to-string.js"),y=t("./node_modules/core-js/internals/require-object-coercible.js"),C=f("".charAt),S=f("".charCodeAt),g=f("".slice),j=function(A){return function(I,M){var B=m(y(I)),W=v(M),Y=B.length,J,le;return W<0||W>=Y?A?"":void 0:(J=S(B,W),J<55296||J>56319||W+1===Y||(le=S(B,W+1))<56320||le>57343?A?C(B,W):J:A?g(B,W,W+2):(J-55296<<10)+(le-56320)+65536)}};w.exports={codeAt:j(!1),charAt:j(!0)}},
vendor: 349 bytes, line 169
169"./node_modules/core-js/internals/string-trim-forced.js":function(w,O,t){var f=t("./node_modules/core-js/internals/function-name.js").PROPER,v=t("./node_modules/core-js/internals/fails.js"),m=t("./node_modules/core-js/internals/whitespaces.js"),y="​…᠎";w.exports=function(C){return v(function(){return!!m[C]()||y[C]()!==y||f&&m[C].name!==C})}},
vendor: 524 bytes, line 169
169"./node_modules/core-js/internals/string-trim.js":function(w,O,t){var f=t("./node_modules/core-js/internals/function-uncurry-this.js"),v=t("./node_modules/core-js/internals/require-object-coercible.js"),m=t("./node_modules/core-js/internals/to-string.js"),y=t("./node_modules/core-js/internals/whitespaces.js"),C=f("".replace),S=RegExp("^["+y+"]+"),g=RegExp("(^|[^"+y+"])["+y+"]+$"),j=function(A){return function(I){var M=m(v(I));return A&1&&(M=C(M,S,"")),A&2&&(M=C(M,g,"$1")),M}};w.exports={start:j(1),end:j(2),trim:j(3)}},
vendor: 426 bytes, line 169
169"./node_modules/core-js/internals/symbol-constructor-detection.js":function(w,O,t){var f=t("./node_modules/core-js/internals/environment-v8-version.js"),v=t("./node_modules/core-js/internals/fails.js"),m=t("./node_modules/core-js/internals/global-this.js"),y=m.String;w.exports=!!Object.getOwnPropertySymbols&&!v(function(){var C=Symbol("symbol detection");return!y(C)||!(Object(C)instanceof Symbol)||!Symbol.sham&&f&&f<41})},
vendor: 467 bytes, line 169
169"./node_modules/core-js/internals/symbol-define-to-primitive.js":function(w,O,t){var f=t("./node_modules/core-js/internals/function-call.js"),v=t("./node_modules/core-js/internals/get-built-in.js"),m=t("./node_modules/core-js/internals/well-known-symbol.js"),y=t("./node_modules/core-js/internals/define-built-in.js");w.exports=function(){var C=v("Symbol"),S=C&&C.prototype,g=S&&S.valueOf,j=m("toPrimitive");S&&!S[j]&&y(S,j,function(A){return f(g,this)},{arity:1})}},
vendor: 200 bytes, line 169
169"./node_modules/core-js/internals/symbol-registry-detection.js":function(w,O,t){var f=t("./node_modules/core-js/internals/symbol-constructor-detection.js");w.exports=f&&!!Symbol.for&&!!Symbol.keyFor},
vendor: 1,775 bytes, line 169
169"./node_modules/core-js/internals/task.js":function(w,O,t){var f=t("./node_modules/core-js/internals/global-this.js"),v=t("./node_modules/core-js/internals/function-apply.js"),m=t("./node_modules/core-js/internals/function-bind-context.js"),y=t("./node_modules/core-js/internals/is-callable.js"),C=t("./node_modules/core-js/internals/has-own-property.js"),S=t("./node_modules/core-js/internals/fails.js"),g=t("./node_modules/core-js/internals/html.js"),j=t("./node_modules/core-js/internals/array-slice.js"),A=t("./node_modules/core-js/internals/document-create-element.js"),I=t("./node_modules/core-js/internals/validate-arguments-length.js"),M=t("./node_modules/core-js/internals/environment-is-ios.js"),B=t("./node_modules/core-js/internals/environment-is-node.js"),W=f.setImmediate,Y=f.clearImmediate,J=f.process,le=f.Dispatch,ae=f.Function,Z=f.MessageChannel,oe=f.String,H=0,fe={},se="onreadystatechange",de,q,U,ge;S(function(){de=f.location});var Ee=function(ye){if(C(fe,ye)){var Se=fe[ye];delete fe[ye],Se()}},Xe=function(ye){return function(){Ee(ye)}},re=function(ye){Ee(ye.data)},Pe=function(ye){f.postMessage(oe(ye),de.protocol+"//"+de.host)};(!W||!Y)&&(W=function(Se){I(arguments.length,1);var Le=y(Se)?Se:ae(Se),st=j(arguments,1);return fe[++H]=function(){v(Le,void 0,st)},q(H),H},Y=function(Se){delete fe[Se]},B?q=function(ye){J.nextTick(Xe(ye))}:le&&le.now?q=function(ye){le.now(Xe(ye))}:Z&&!M?(U=new Z,ge=U.port2,U.port1.onmessage=re,q=m(ge.postMessage,ge)):f.addEventListener&&y(f.postMessage)&&!f.importScripts&&de&&de.protocol!=="file:"&&!S(Pe)?(q=Pe,f.addEventListener("message",re,!1)):se in A("script")?q=function(ye){g.appendChild(A("script"))[se]=function(){g.removeChild(this),Ee(ye)}}:q=function(ye){setTimeout(Xe(ye),0)}),w.exports={set:W,clear:Y}},
vendor: 167 bytes, line 169
169"./node_modules/core-js/internals/this-number-value.js":function(w,O,t){var f=t("./node_modules/core-js/internals/function-uncurry-this.js");w.exports=f(1.1.valueOf)},
vendor: 228 bytes, line 169
169"./node_modules/core-js/internals/to-absolute-index.js":function(w,O,t){var f=t("./node_modules/core-js/internals/to-integer-or-infinity.js"),v=Math.max,m=Math.min;w.exports=function(y,C){var S=f(y);return S<0?v(S+C,0):m(S,C)}},
vendor: 241 bytes, line 169
169"./node_modules/core-js/internals/to-indexed-object.js":function(w,O,t){var f=t("./node_modules/core-js/internals/indexed-object.js"),v=t("./node_modules/core-js/internals/require-object-coercible.js");w.exports=function(m){return f(v(m))}},
vendor: 195 bytes, line 169
169"./node_modules/core-js/internals/to-integer-or-infinity.js":function(w,O,t){var f=t("./node_modules/core-js/internals/math-trunc.js");w.exports=function(v){var m=+v;return m!==m||m===0?0:f(m)}},
vendor: 215 bytes, line 169
169"./node_modules/core-js/internals/to-length.js":function(w,O,t){var f=t("./node_modules/core-js/internals/to-integer-or-infinity.js"),v=Math.min;w.exports=function(m){var y=f(m);return y>0?v(y,9007199254740991):0}},
vendor: 184 bytes, line 169
169"./node_modules/core-js/internals/to-object.js":function(w,O,t){var f=t("./node_modules/core-js/internals/require-object-coercible.js"),v=Object;w.exports=function(m){return v(f(m))}},
vendor: 671 bytes, line 169
169"./node_modules/core-js/internals/to-primitive.js":function(w,O,t){var f=t("./node_modules/core-js/internals/function-call.js"),v=t("./node_modules/core-js/internals/is-object.js"),m=t("./node_modules/core-js/internals/is-symbol.js"),y=t("./node_modules/core-js/internals/get-method.js"),C=t("./node_modules/core-js/internals/ordinary-to-primitive.js"),S=t("./node_modules/core-js/internals/well-known-symbol.js"),g=TypeError,j=S("toPrimitive");w.exports=function(A,I){if(!v(A)||m(A))return A;var M=y(A,j),B;if(M){if(I===void 0&&(I="default"),B=f(M,A,I),!v(B)||m(B))return B;throw new g("Can't convert object to primitive value")}return I===void 0&&(I="number"),C(A,I)}},
vendor: 246 bytes, line 169
169"./node_modules/core-js/internals/to-property-key.js":function(w,O,t){var f=t("./node_modules/core-js/internals/to-primitive.js"),v=t("./node_modules/core-js/internals/is-symbol.js");w.exports=function(m){var y=f(m,"string");return v(y)?y:y+""}},
vendor: 427 bytes, line 169
169"./node_modules/core-js/internals/to-set-like.js":function(w,O,t){var f=t("./node_modules/core-js/internals/get-built-in.js"),v=t("./node_modules/core-js/internals/is-callable.js"),m=t("./node_modules/core-js/internals/is-iterable.js"),y=t("./node_modules/core-js/internals/is-object.js"),C=f("Set"),S=function(g){return y(g)&&typeof g.size=="number"&&v(g.has)&&v(g.keys)};w.exports=function(g){return S(g)?g:m(g)?new C(g):g}},
vendor: 210 bytes, line 169
169"./node_modules/core-js/internals/to-string-tag-support.js":function(w,O,t){var f=t("./node_modules/core-js/internals/well-known-symbol.js"),v=f("toStringTag"),m={};m[v]="z",w.exports=String(m)==="[object z]"},
vendor: 248 bytes, line 169
169"./node_modules/core-js/internals/to-string.js":function(w,O,t){var f=t("./node_modules/core-js/internals/classof.js"),v=String;w.exports=function(m){if(f(m)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return v(m)}},
vendor: 139 bytes, line 169
169"./node_modules/core-js/internals/try-to-string.js":function(w){var O=String;w.exports=function(t){try{return O(t)}catch{return"Object"}}},
vendor: 240 bytes, line 169
169"./node_modules/core-js/internals/uid.js":function(w,O,t){var f=t("./node_modules/core-js/internals/function-uncurry-this.js"),v=0,m=Math.random(),y=f(1.1.toString);w.exports=function(C){return"Symbol("+(C===void 0?"":C)+")_"+y(++v+m,36)}},
vendor: 209 bytes, line 169
169"./node_modules/core-js/internals/use-symbol-as-uid.js":function(w,O,t){var f=t("./node_modules/core-js/internals/symbol-constructor-detection.js");w.exports=f&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},
vendor: 308 bytes, line 169
169"./node_modules/core-js/internals/v8-prototype-define-bug.js":function(w,O,t){var f=t("./node_modules/core-js/internals/descriptors.js"),v=t("./node_modules/core-js/internals/fails.js");w.exports=f&&v(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})},
vendor: 170 bytes, line 169
169"./node_modules/core-js/internals/validate-arguments-length.js":function(w){var O=TypeError;w.exports=function(t,f){if(t<f)throw new O("Not enough arguments");return t}},
vendor: 252 bytes, line 169
169"./node_modules/core-js/internals/weak-map-basic-detection.js":function(w,O,t){var f=t("./node_modules/core-js/internals/global-this.js"),v=t("./node_modules/core-js/internals/is-callable.js"),m=f.WeakMap;w.exports=v(m)&&/native code/.test(String(m))},
vendor: 412 bytes, line 169
169"./node_modules/core-js/internals/well-known-symbol-define.js":function(w,O,t){var f=t("./node_modules/core-js/internals/path.js"),v=t("./node_modules/core-js/internals/has-own-property.js"),m=t("./node_modules/core-js/internals/well-known-symbol-wrapped.js"),y=t("./node_modules/core-js/internals/object-define-property.js").f;w.exports=function(C){var S=f.Symbol||(f.Symbol={});v(S,C)||y(S,C,{value:m.f(C)})}},
vendor: 152 bytes, line 169
169"./node_modules/core-js/internals/well-known-symbol-wrapped.js":function(w,O,t){var f=t("./node_modules/core-js/internals/well-known-symbol.js");O.f=f},
vendor: 559 bytes, line 169
169"./node_modules/core-js/internals/well-known-symbol.js":function(w,O,t){var f=t("./node_modules/core-js/internals/global-this.js"),v=t("./node_modules/core-js/internals/shared.js"),m=t("./node_modules/core-js/internals/has-own-property.js"),y=t("./node_modules/core-js/internals/uid.js"),C=t("./node_modules/core-js/internals/symbol-constructor-detection.js"),S=t("./node_modules/core-js/internals/use-symbol-as-uid.js"),g=f.Symbol,j=v("wks"),A=S?g.for||g:g&&g.withoutSetter||y;w.exports=function(I){return m(j,I)||(j[I]=C&&m(g,I)?g[I]:A("Symbol."+I)),j[I]}},
vendor: 150 bytes, lines 169-170
169"./node_modules/core-js/internals/whitespaces.js":function(w){w.exports=`	
170\v\f\r                 \u2028\u2029\uFEFF`},
vendor: 1,284 bytes, line 170
170"./node_modules/core-js/modules/es.array.concat.js":function(w,O,t){var f=t("./node_modules/core-js/internals/export.js"),v=t("./node_modules/core-js/internals/fails.js"),m=t("./node_modules/core-js/internals/is-array.js"),y=t("./node_modules/core-js/internals/is-object.js"),C=t("./node_modules/core-js/internals/to-object.js"),S=t("./node_modules/core-js/internals/length-of-array-like.js"),g=t("./node_modules/core-js/internals/does-not-exceed-safe-integer.js"),j=t("./node_modules/core-js/internals/create-property.js"),A=t("./node_modules/core-js/internals/array-species-create.js"),I=t("./node_modules/core-js/internals/array-method-has-species-support.js"),M=t("./node_modules/core-js/internals/well-known-symbol.js"),B=t("./node_modules/core-js/internals/environment-v8-version.js"),W=M("isConcatSpreadable"),Y=B>=51||!v(function(){var ae=[];return ae[W]=!1,ae.concat()[0]!==ae}),J=function(ae){if(!y(ae))return!1;var Z=ae[W];return Z!==void 0?!!Z:m(ae)},le=!Y||!I("concat");f({target:"Array",proto:!0,arity:1,forced:le},{concat:function(Z){var oe=C(this),H=A(oe,0),fe=0,se,de,q,U,ge;for(se=-1,q=arguments.length;se<q;se++)if(ge=se===-1?oe:arguments[se],J(ge))for(U=S(ge),g(fe+U),de=0;de<U;de++,fe++)de in ge&&j(H,fe,ge[de]);else g(fe+1),j(H,fe++,ge);return H.length=fe,H}})},
vendor: 328 bytes, line 170
170"./node_modules/core-js/modules/es.array.from.js":function(w,O,t){var f=t("./node_modules/core-js/internals/export.js"),v=t("./node_modules/core-js/internals/array-from.js"),m=t("./node_modules/core-js/internals/check-correctness-of-iteration.js"),y=!m(function(C){Array.from(C)});f({target:"Array",stat:!0,forced:y},{from:v})},
vendor: 529 bytes, line 170
170"./node_modules/core-js/modules/es.array.index-of.js":function(w,O,t){var f=t("./node_modules/core-js/internals/export.js"),v=t("./node_modules/core-js/internals/function-uncurry-this-clause.js"),m=t("./node_modules/core-js/internals/array-includes.js").indexOf,y=t("./node_modules/core-js/internals/array-method-is-strict.js"),C=v([].indexOf),S=!!C&&1/C([1],1,-0)<0,g=S||!y("indexOf");f({target:"Array",proto:!0,forced:g},{indexOf:function(A){var I=arguments.length>1?arguments[1]:void 0;return S?C(this,A,I)||0:m(this,A,I)}})},
vendor: 1,082 bytes, line 170
170"./node_modules/core-js/modules/es.array.iterator.js":function(w,O,t){var f=t("./node_modules/core-js/internals/to-indexed-object.js"),v=t("./node_modules/core-js/internals/add-to-unscopables.js"),m=t("./node_modules/core-js/internals/iterators.js"),y=t("./node_modules/core-js/internals/internal-state.js"),C=t("./node_modules/core-js/internals/object-define-property.js").f,S=t("./node_modules/core-js/internals/iterator-define.js"),g=t("./node_modules/core-js/internals/create-iter-result-object.js"),j=t("./node_modules/core-js/internals/is-pure.js"),A=t("./node_modules/core-js/internals/descriptors.js"),I="Array Iterator",M=y.set,B=y.getterFor(I);w.exports=S(Array,"Array",function(Y,J){M(this,{type:I,target:f(Y),index:0,kind:J})},function(){var Y=B(this),J=Y.target,le=Y.index++;if(!J||le>=J.length)return Y.target=null,g(void 0,!0);switch(Y.kind){case"keys":return g(le,!1);case"values":return g(J[le],!1)}return g([le,J[le]],!1)},"values");var W=m.Arguments=m.Array;if(v("keys"),v("values"),v("entries"),!j&&A&&W.name!=="values")try{C(W,"name",{value:"values"})}catch{}},
vendor: 510 bytes, line 170
170"./node_modules/core-js/modules/es.array.join.js":function(w,O,t){var f=t("./node_modules/core-js/internals/export.js"),v=t("./node_modules/core-js/internals/function-uncurry-this.js"),m=t("./node_modules/core-js/internals/indexed-object.js"),y=t("./node_modules/core-js/internals/to-indexed-object.js"),C=t("./node_modules/core-js/internals/array-method-is-strict.js"),S=v([].join),g=m!==Object,j=g||!C("join",",");f({target:"Array",proto:!0,forced:j},{join:function(I){return S(y(this),I===void 0?",":I)}})},
vendor: 384 bytes, line 170
170"./node_modules/core-js/modules/es.array.map.js":function(w,O,t){var f=t("./node_modules/core-js/internals/export.js"),v=t("./node_modules/core-js/internals/array-iteration.js").map,m=t("./node_modules/core-js/internals/array-method-has-species-support.js"),y=m("map");f({target:"Array",proto:!0,forced:!y},{map:function(S){return v(this,S,arguments.length>1?arguments[1]:void 0)}})},
vendor: 540 bytes, line 170
170"./node_modules/core-js/modules/es.array.reduce.js":function(w,O,t){var f=t("./node_modules/core-js/internals/export.js"),v=t("./node_modules/core-js/internals/array-reduce.js").left,m=t("./node_modules/core-js/internals/array-method-is-strict.js"),y=t("./node_modules/core-js/internals/environment-v8-version.js"),C=t("./node_modules/core-js/internals/environment-is-node.js"),S=!C&&y>79&&y<83,g=S||!m("reduce");f({target:"Array",proto:!0,forced:g},{reduce:function(A){var I=arguments.length;return v(this,A,I,I>1?arguments[1]:void 0)}})},
vendor: 405 bytes, line 170
170"./node_modules/core-js/modules/es.array.reverse.js":function(w,O,t){var f=t("./node_modules/core-js/internals/export.js"),v=t("./node_modules/core-js/internals/function-uncurry-this.js"),m=t("./node_modules/core-js/internals/is-array.js"),y=v([].reverse),C=[1,2];f({target:"Array",proto:!0,forced:String(C)===String(C.reverse())},{reverse:function(){return m(this)&&(this.length=this.length),y(this)}})},
vendor: 1,152 bytes, line 170
170"./node_modules/core-js/modules/es.array.slice.js":function(w,O,t){var f=t("./node_modules/core-js/internals/export.js"),v=t("./node_modules/core-js/internals/is-array.js"),m=t("./node_modules/core-js/internals/is-constructor.js"),y=t("./node_modules/core-js/internals/is-object.js"),C=t("./node_modules/core-js/internals/to-absolute-index.js"),S=t("./node_modules/core-js/internals/length-of-array-like.js"),g=t("./node_modules/core-js/internals/to-indexed-object.js"),j=t("./node_modules/core-js/internals/create-property.js"),A=t("./node_modules/core-js/internals/well-known-symbol.js"),I=t("./node_modules/core-js/internals/array-method-has-species-support.js"),M=t("./node_modules/core-js/internals/array-slice.js"),B=I("slice"),W=A("species"),Y=Array,J=Math.max;f({target:"Array",proto:!0,forced:!B},{slice:function(ae,Z){var oe=g(this),H=S(oe),fe=C(ae,H),se=C(Z===void 0?H:Z,H),de,q,U;if(v(oe)&&(de=oe.constructor,m(de)&&(de===Y||v(de.prototype))?de=void 0:y(de)&&(de=de[W],de===null&&(de=void 0)),de===Y||de===void 0))return M(oe,fe,se);for(q=new(de===void 0?Y:de)(J(se-fe,0)),U=0;fe<se;fe++,U++)fe in oe&&j(q,U,oe[fe]);return q.length=U,q}})},
vendor: 544 bytes, line 170
170"./node_modules/core-js/modules/es.function.name.js":function(w,O,t){var f=t("./node_modules/core-js/internals/descriptors.js"),v=t("./node_modules/core-js/internals/function-name.js").EXISTS,m=t("./node_modules/core-js/internals/function-uncurry-this.js"),y=t("./node_modules/core-js/internals/define-built-in-accessor.js"),C=Function.prototype,S=m(C.toString),g=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,j=m(g.exec),A="name";f&&!v&&y(C,A,{configurable:!0,get:function(){try{return j(g,S(this))[1]}catch{return""}}})},
vendor: 1,451 bytes, line 170
170"./node_modules/core-js/modules/es.iterator.constructor.js":function(w,O,t){var f=t("./node_modules/core-js/internals/export.js"),v=t("./node_modules/core-js/internals/global-this.js"),m=t("./node_modules/core-js/internals/an-instance.js"),y=t("./node_modules/core-js/internals/an-object.js"),C=t("./node_modules/core-js/internals/is-callable.js"),S=t("./node_modules/core-js/internals/object-get-prototype-of.js"),g=t("./node_modules/core-js/internals/define-built-in-accessor.js"),j=t("./node_modules/core-js/internals/create-property.js"),A=t("./node_modules/core-js/internals/fails.js"),I=t("./node_modules/core-js/internals/has-own-property.js"),M=t("./node_modules/core-js/internals/well-known-symbol.js"),B=t("./node_modules/core-js/internals/iterators-core.js").IteratorPrototype,W=t("./node_modules/core-js/internals/descriptors.js"),Y=t("./node_modules/core-js/internals/is-pure.js"),J="constructor",le="Iterator",ae=M("toStringTag"),Z=TypeError,oe=v[le],H=Y||!C(oe)||oe.prototype!==B||!A(function(){oe({})}),fe=function(){if(m(this,B),S(this)===B)throw new Z("Abstract class Iterator not directly constructable")},se=function(de,q){W?g(B,de,{configurable:!0,get:function(){return q},set:function(U){if(y(this),this===B)throw new Z("You can't redefine this property");I(this,de)?this[de]=U:j(this,de,U)}}):B[de]=q};I(B,ae)||se(ae,le),(H||!I(B,J)||B[J]===Object)&&se(J,fe),fe.prototype=B,f({global:!0,constructor:!0,forced:H},{Iterator:fe})},
vendor: 779 bytes, line 170
170"./node_modules/core-js/modules/es.iterator.for-each.js":function(w,O,t){var f=t("./node_modules/core-js/internals/export.js"),v=t("./node_modules/core-js/internals/function-call.js"),m=t("./node_modules/core-js/internals/iterate.js"),y=t("./node_modules/core-js/internals/a-callable.js"),C=t("./node_modules/core-js/internals/an-object.js"),S=t("./node_modules/core-js/internals/get-iterator-direct.js"),g=t("./node_modules/core-js/internals/iterator-close.js"),j=t("./node_modules/core-js/internals/iterator-helper-without-closing-on-early-error.js"),A=j("forEach",TypeError);f({target:"Iterator",proto:!0,real:!0,forced:A},{forEach:function(M){C(this);try{y(M)}catch(Y){g(this,"throw",Y)}if(A)return v(A,this,M);var B=S(this),W=0;m(B,function(Y){M(Y,W++)},{IS_RECORD:!0})}})},
vendor: 1,149 bytes, line 170
170"./node_modules/core-js/modules/es.iterator.map.js":function(w,O,t){var f=t("./node_modules/core-js/internals/export.js"),v=t("./node_modules/core-js/internals/function-call.js"),m=t("./node_modules/core-js/internals/a-callable.js"),y=t("./node_modules/core-js/internals/an-object.js"),C=t("./node_modules/core-js/internals/get-iterator-direct.js"),S=t("./node_modules/core-js/internals/iterator-create-proxy.js"),g=t("./node_modules/core-js/internals/call-with-safe-iteration-closing.js"),j=t("./node_modules/core-js/internals/iterator-close.js"),A=t("./node_modules/core-js/internals/iterator-helper-throws-on-invalid-iterator.js"),I=t("./node_modules/core-js/internals/iterator-helper-without-closing-on-early-error.js"),M=t("./node_modules/core-js/internals/is-pure.js"),B=!M&&!A("map",function(){}),W=!M&&!B&&I("map",TypeError),Y=M||B||W,J=S(function(){var le=this.iterator,ae=y(v(this.next,le)),Z=this.done=!!ae.done;if(!Z)return g(le,this.mapper,[ae.value,this.counter++],!0)});f({target:"Iterator",proto:!0,real:!0,forced:Y},{map:function(ae){y(this);try{m(ae)}catch(Z){j(this,"throw",Z)}return W?v(W,this,ae):new J(C(this),{mapper:ae})}})},
vendor: 2,618 bytes, line 170
170"./node_modules/core-js/modules/es.json.stringify.js":function(w,O,t){var f=t("./node_modules/core-js/internals/export.js"),v=t("./node_modules/core-js/internals/get-built-in.js"),m=t("./node_modules/core-js/internals/function-apply.js"),y=t("./node_modules/core-js/internals/function-call.js"),C=t("./node_modules/core-js/internals/function-uncurry-this.js"),S=t("./node_modules/core-js/internals/fails.js"),g=t("./node_modules/core-js/internals/is-array.js"),j=t("./node_modules/core-js/internals/is-callable.js"),A=t("./node_modules/core-js/internals/is-raw-json.js"),I=t("./node_modules/core-js/internals/is-symbol.js"),M=t("./node_modules/core-js/internals/classof-raw.js"),B=t("./node_modules/core-js/internals/to-string.js"),W=t("./node_modules/core-js/internals/array-slice.js"),Y=t("./node_modules/core-js/internals/parse-json-string.js"),J=t("./node_modules/core-js/internals/uid.js"),le=t("./node_modules/core-js/internals/symbol-constructor-detection.js"),ae=t("./node_modules/core-js/internals/native-raw-json.js"),Z=String,oe=v("JSON","stringify"),H=C(/./.exec),fe=C("".charAt),se=C("".charCodeAt),de=C("".replace),q=C("".slice),U=C([].push),ge=C(1.1.toString),Ee=/[\uD800-\uDFFF]/g,Xe=/^[\uD800-\uDBFF]$/,re=/^[\uDC00-\uDFFF]$/,Pe=J(),ye=Pe.length,Se=!le||S(function(){var xt=v("Symbol")("stringify detection");return oe([xt])!=="[null]"||oe({a:xt})!=="{}"||oe(Object(xt))!=="{}"}),Le=S(function(){return oe("\uDF06\uD834")!=='"\\udf06\\ud834"'||oe("\uDEAD")!=='"\\udead"'}),st=Se?function(xt,He){var Tt=W(arguments),Kt=rt(He);if(!(!j(Kt)&&(xt===void 0||I(xt))))return Tt[1]=function(Jt,rr){if(j(Kt)&&(rr=y(Kt,this,Z(Jt),rr)),!I(rr))return rr},m(oe,null,Tt)}:oe,Ke=function(xt,He,Tt){var Kt=fe(Tt,He-1),Jt=fe(Tt,He+1);return H(Xe,xt)&&!H(re,Jt)||H(re,xt)&&!H(Xe,Kt)?"\\u"+ge(se(xt,0),16):xt},rt=function(xt){if(j(xt))return xt;if(g(xt)){for(var He=xt.length,Tt=[],Kt=0;Kt<He;Kt++){var Jt=xt[Kt];typeof Jt=="string"?U(Tt,Jt):(typeof Jt=="number"||M(Jt)==="Number"||M(Jt)==="String")&&U(Tt,B(Jt))}var rr=Tt.length,Ht=!0;return function(yr,gr){if(Ht)return Ht=!1,gr;if(g(this))return gr;for(var Vr=0;Vr<rr;Vr++)if(Tt[Vr]===yr)return gr}}};oe&&f({target:"JSON",stat:!0,arity:3,forced:Se||Le||!ae},{stringify:function(He,Tt,Kt){var Jt=rt(Tt),rr=[],Ht=st(He,function(ft,je){var $e=j(Jt)?y(Jt,this,Z(ft),je):je;return!ae&&A($e)?Pe+(U(rr,$e.rawJSON)-1):$e},Kt);if(typeof Ht!="string"||(Le&&(Ht=de(Ht,Ee,Ke)),ae))return Ht;for(var yr="",gr=Ht.length,Vr=0;Vr<gr;Vr++){var jr=fe(Ht,Vr);if(jr==='"'){var Xr=Y(Ht,++Vr).end-1,et=q(Ht,Vr,Xr);yr+=q(et,0,ye)===Pe?rr[q(et,ye)]:'"'+et+'"',Vr=Xr}else yr+=jr}return yr}})},
vendor: 2,449 bytes, line 170
170"./node_modules/core-js/modules/es.number.constructor.js":function(w,O,t){var f=t("./node_modules/core-js/internals/export.js"),v=t("./node_modules/core-js/internals/is-pure.js"),m=t("./node_modules/core-js/internals/descriptors.js"),y=t("./node_modules/core-js/internals/global-this.js"),C=t("./node_modules/core-js/internals/path.js"),S=t("./node_modules/core-js/internals/function-uncurry-this.js"),g=t("./node_modules/core-js/internals/is-forced.js"),j=t("./node_modules/core-js/internals/has-own-property.js"),A=t("./node_modules/core-js/internals/inherit-if-required.js"),I=t("./node_modules/core-js/internals/object-is-prototype-of.js"),M=t("./node_modules/core-js/internals/is-symbol.js"),B=t("./node_modules/core-js/internals/to-primitive.js"),W=t("./node_modules/core-js/internals/fails.js"),Y=t("./node_modules/core-js/internals/object-get-own-property-names.js").f,J=t("./node_modules/core-js/internals/object-get-own-property-descriptor.js").f,le=t("./node_modules/core-js/internals/object-define-property.js").f,ae=t("./node_modules/core-js/internals/this-number-value.js"),Z=t("./node_modules/core-js/internals/string-trim.js").trim,oe="Number",H=y[oe],fe=C[oe],se=H.prototype,de=y.TypeError,q=S("".slice),U=S("".charCodeAt),ge=function(Se){var Le=B(Se,"number");return typeof Le=="bigint"?Le:Ee(Le)},Ee=function(Se){var Le=B(Se,"number"),st,Ke,rt,xt,He,Tt,Kt,Jt;if(M(Le))throw new de("Cannot convert a Symbol value to a number");if(typeof Le=="string"&&Le.length>2){if(Le=Z(Le),st=U(Le,0),st===43||st===45){if(Ke=U(Le,2),Ke===88||Ke===120)return NaN}else if(st===48){switch(U(Le,1)){case 66:case 98:rt=2,xt=49;break;case 79:case 111:rt=8,xt=55;break;default:return+Le}for(He=q(Le,2),Tt=He.length,Kt=0;Kt<Tt;Kt++)if(Jt=U(He,Kt),Jt<48||Jt>xt)return NaN;return parseInt(He,rt)}}return+Le},Xe=g(oe,!H(" 0o1")||!H("0b1")||H("+0x1")),re=function(Se){return I(se,Se)&&W(function(){ae(Se)})},Pe=function(Le){var st=arguments.length<1?0:H(ge(Le));return re(this)?A(Object(st),this,Pe):st};Pe.prototype=se,Xe&&!v&&(se.constructor=Pe),f({global:!0,constructor:!0,wrap:!0,forced:Xe},{Number:Pe});var ye=function(Se,Le){for(var st=m?Y(Le):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),Ke=0,rt;st.length>Ke;Ke++)j(Le,rt=st[Ke])&&!j(Se,rt)&&le(Se,rt,J(Le,rt))};v&&fe&&ye(C[oe],fe),(Xe||v)&&ye(C[oe],H)},
vendor: 254 bytes, line 170
170"./node_modules/core-js/modules/es.object.assign.js":function(w,O,t){var f=t("./node_modules/core-js/internals/export.js"),v=t("./node_modules/core-js/internals/object-assign.js");f({target:"Object",stat:!0,arity:2,forced:Object.assign!==v},{assign:v})},
vendor: 524 bytes, line 170
170"./node_modules/core-js/modules/es.object.get-own-property-symbols.js":function(w,O,t){var f=t("./node_modules/core-js/internals/export.js"),v=t("./node_modules/core-js/internals/symbol-constructor-detection.js"),m=t("./node_modules/core-js/internals/fails.js"),y=t("./node_modules/core-js/internals/object-get-own-property-symbols.js"),C=t("./node_modules/core-js/internals/to-object.js"),S=!v||m(function(){y.f(1)});f({target:"Object",stat:!0,forced:S},{getOwnPropertySymbols:function(j){var A=y.f;return A?A(C(j)):[]}})},
vendor: 374 bytes, line 170
170"./node_modules/core-js/modules/es.object.keys.js":function(w,O,t){var f=t("./node_modules/core-js/internals/export.js"),v=t("./node_modules/core-js/internals/to-object.js"),m=t("./node_modules/core-js/internals/object-keys.js"),y=t("./node_modules/core-js/internals/fails.js"),C=y(function(){m(1)});f({target:"Object",stat:!0,forced:C},{keys:function(g){return m(v(g))}})},
vendor: 309 bytes, line 170
170"./node_modules/core-js/modules/es.object.to-string.js":function(w,O,t){var f=t("./node_modules/core-js/internals/to-string-tag-support.js"),v=t("./node_modules/core-js/internals/define-built-in.js"),m=t("./node_modules/core-js/internals/object-to-string.js");f||v(Object.prototype,"toString",m,{unsafe:!0})},
vendor: 784 bytes, line 170
170"./node_modules/core-js/modules/es.promise.all.js":function(w,O,t){var f=t("./node_modules/core-js/internals/export.js"),v=t("./node_modules/core-js/internals/function-call.js"),m=t("./node_modules/core-js/internals/a-callable.js"),y=t("./node_modules/core-js/internals/new-promise-capability.js"),C=t("./node_modules/core-js/internals/perform.js"),S=t("./node_modules/core-js/internals/iterate.js"),g=t("./node_modules/core-js/internals/promise-statics-incorrect-iteration.js");f({target:"Promise",stat:!0,forced:g},{all:function(A){var I=this,M=y.f(I),B=M.resolve,W=M.reject,Y=C(function(){var J=m(I.resolve),le=[],ae=0,Z=1;S(A,function(oe){var H=ae++,fe=!1;Z++,v(J,I,oe).then(function(se){fe||(fe=!0,le[H]=se,--Z||B(le))},W)}),--Z||B(le)});return Y.error&&W(Y.value),M.promise}})},
vendor: 702 bytes, line 170
170"./node_modules/core-js/modules/es.promise.catch.js":function(w,O,t){var f=t("./node_modules/core-js/internals/export.js"),v=t("./node_modules/core-js/internals/is-pure.js"),m=t("./node_modules/core-js/internals/promise-constructor-detection.js").CONSTRUCTOR,y=t("./node_modules/core-js/internals/promise-native-constructor.js"),C=t("./node_modules/core-js/internals/get-built-in.js"),S=t("./node_modules/core-js/internals/is-callable.js"),g=t("./node_modules/core-js/internals/define-built-in.js"),j=y&&y.prototype;if(f({target:"Promise",proto:!0,forced:m,real:!0},{catch:function(I){return this.then(void 0,I)}}),!v&&S(y)){var A=C("Promise").prototype.catch;j.catch!==A&&g(j,"catch",A,{unsafe:!0})}},
vendor: 4,373 bytes, line 170
170"./node_modules/core-js/modules/es.promise.constructor.js":function(w,O,t){var f=t("./node_modules/core-js/internals/export.js"),v=t("./node_modules/core-js/internals/is-pure.js"),m=t("./node_modules/core-js/internals/environment-is-node.js"),y=t("./node_modules/core-js/internals/global-this.js"),C=t("./node_modules/core-js/internals/path.js"),S=t("./node_modules/core-js/internals/function-call.js"),g=t("./node_modules/core-js/internals/define-built-in.js"),j=t("./node_modules/core-js/internals/object-set-prototype-of.js"),A=t("./node_modules/core-js/internals/set-to-string-tag.js"),I=t("./node_modules/core-js/internals/set-species.js"),M=t("./node_modules/core-js/internals/a-callable.js"),B=t("./node_modules/core-js/internals/is-callable.js"),W=t("./node_modules/core-js/internals/is-object.js"),Y=t("./node_modules/core-js/internals/an-instance.js"),J=t("./node_modules/core-js/internals/species-constructor.js"),le=t("./node_modules/core-js/internals/task.js").set,ae=t("./node_modules/core-js/internals/microtask.js"),Z=t("./node_modules/core-js/internals/host-report-errors.js"),oe=t("./node_modules/core-js/internals/perform.js"),H=t("./node_modules/core-js/internals/queue.js"),fe=t("./node_modules/core-js/internals/internal-state.js"),se=t("./node_modules/core-js/internals/promise-native-constructor.js"),de=t("./node_modules/core-js/internals/promise-constructor-detection.js"),q=t("./node_modules/core-js/internals/new-promise-capability.js"),U="Promise",ge=de.CONSTRUCTOR,Ee=de.REJECTION_EVENT,Xe=de.SUBCLASSING,re=fe.getterFor(U),Pe=fe.set,ye=se&&se.prototype,Se=se,Le=ye,st=y.TypeError,Ke=y.document,rt=y.process,xt=q.f,He=xt,Tt=!!(Ke&&Ke.createEvent&&y.dispatchEvent),Kt="unhandledrejection",Jt="rejectionhandled",rr=0,Ht=1,yr=2,gr=1,Vr=2,jr,Xr,et,ft,je=function(It){var nr;return W(It)&&B(nr=It.then)?nr:!1},$e=function(It,nr){var Cr=nr.value,Wt=nr.state===Ht,Ir=Wt?It.ok:It.fail,Yt=It.resolve,zr=It.reject,Ye=It.domain,Vt,lr,xr;try{Ir?(Wt||(nr.rejection===Vr&&lt(nr),nr.rejection=gr),Ir===!0?Vt=Cr:(Ye&&Ye.enter(),Vt=Ir(Cr),Ye&&(Ye.exit(),xr=!0)),Vt===It.promise?zr(new st("Promise-chain cycle")):(lr=je(Vt))?S(lr,Vt,Yt,zr):Yt(Vt)):zr(Cr)}catch(Pr){Ye&&!xr&&Ye.exit(),zr(Pr)}},ht=function(It,nr){It.notified||(It.notified=!0,ae(function(){for(var Cr=It.reactions,Wt;Wt=Cr.get();)$e(Wt,It);It.notified=!1,nr&&!It.rejection&&Ze(It)}))},tt=function(It,nr,Cr){var Wt,Ir;Tt?(Wt=Ke.createEvent("Event"),Wt.promise=nr,Wt.reason=Cr,Wt.initEvent(It,!1,!0),y.dispatchEvent(Wt)):Wt={promise:nr,reason:Cr},!Ee&&(Ir=y["on"+It])?Ir(Wt):It===Kt&&Z("Unhandled promise rejection",Cr)},Ze=function(It){S(le,y,function(){var nr=It.facade,Cr=It.value,Wt=Ft(It),Ir;if(Wt&&(Ir=oe(function(){m?rt.emit("unhandledRejection",Cr,nr):tt(Kt,nr,Cr)}),It.rejection=m||Ft(It)?Vr:gr,Ir.error))throw Ir.value})},Ft=function(It){return It.rejection!==gr&&!It.parent},lt=function(It){S(le,y,function(){var nr=It.facade;m?rt.emit("rejectionHandled",nr):tt(Jt,nr,It.value)})},_t=function(It,nr,Cr){return function(Wt){It(nr,Wt,Cr)}},dr=function(It,nr,Cr){It.done||(It.done=!0,Cr&&(It=Cr),It.value=nr,It.state=yr,ht(It,!0))},fr=function(It,nr,Cr){if(!It.done){It.done=!0,Cr&&(It=Cr);try{if(It.facade===nr)throw new st("Promise can't be resolved itself");var Wt=je(nr);Wt?ae(function(){var Ir={done:!1};try{S(Wt,nr,_t(fr,Ir,It),_t(dr,Ir,It))}catch(Yt){dr(Ir,Yt,It)}}):(It.value=nr,It.state=Ht,ht(It,!1))}catch(Ir){dr({done:!1},Ir,It)}}};if(ge&&(Se=function(nr){Y(this,Le),M(nr),S(jr,this);var Cr=re(this);try{nr(_t(fr,Cr),_t(dr,Cr))}catch(Wt){dr(Cr,Wt)}},Le=Se.prototype,jr=function(nr){Pe(this,{type:U,done:!1,notified:!1,parent:!1,reactions:new H,rejection:!1,state:rr,value:null})},jr.prototype=g(Le,"then",function(nr,Cr){var Wt=re(this),Ir=xt(J(this,Se));return Wt.parent=!0,Ir.ok=B(nr)?nr:!0,Ir.fail=B(Cr)&&Cr,Ir.domain=m?rt.domain:void 0,Wt.state===rr?Wt.reactions.add(Ir):ae(function(){$e(Ir,Wt)}),Ir.promise}),Xr=function(){var It=new jr,nr=re(It);this.promise=It,this.resolve=_t(fr,nr),this.reject=_t(dr,nr)},q.f=xt=function(It){return It===Se||It===et?new Xr(It):He(It)},!v&&B(se)&&ye!==Object.prototype)){ft=ye.then,Xe||g(ye,"then",function(nr,Cr){var Wt=this;return new Se(function(Ir,Yt){S(ft,Wt,Ir,Yt)}).then(nr,Cr)},{unsafe:!0});try{delete ye.constructor}catch{}j&&j(ye,Le)}f({global:!0,constructor:!0,wrap:!0,forced:ge},{Promise:Se}),et=C.Promise,A(Se,U,!1,!0),I(U)},
vendor: 406 bytes, line 170
170"./node_modules/core-js/modules/es.promise.js":function(w,O,t){t("./node_modules/core-js/modules/es.promise.constructor.js"),t("./node_modules/core-js/modules/es.promise.all.js"),t("./node_modules/core-js/modules/es.promise.catch.js"),t("./node_modules/core-js/modules/es.promise.race.js"),t("./node_modules/core-js/modules/es.promise.reject.js"),t("./node_modules/core-js/modules/es.promise.resolve.js")},
vendor: 689 bytes, line 170
170"./node_modules/core-js/modules/es.promise.race.js":function(w,O,t){var f=t("./node_modules/core-js/internals/export.js"),v=t("./node_modules/core-js/internals/function-call.js"),m=t("./node_modules/core-js/internals/a-callable.js"),y=t("./node_modules/core-js/internals/new-promise-capability.js"),C=t("./node_modules/core-js/internals/perform.js"),S=t("./node_modules/core-js/internals/iterate.js"),g=t("./node_modules/core-js/internals/promise-statics-incorrect-iteration.js");f({target:"Promise",stat:!0,forced:g},{race:function(A){var I=this,M=y.f(I),B=M.reject,W=C(function(){var Y=m(I.resolve);S(A,function(J){v(Y,I,J).then(M.resolve,B)})});return W.error&&B(W.value),M.promise}})},
vendor: 386 bytes, line 170
170"./node_modules/core-js/modules/es.promise.reject.js":function(w,O,t){var f=t("./node_modules/core-js/internals/export.js"),v=t("./node_modules/core-js/internals/new-promise-capability.js"),m=t("./node_modules/core-js/internals/promise-constructor-detection.js").CONSTRUCTOR;f({target:"Promise",stat:!0,forced:m},{reject:function(C){var S=v.f(this),g=S.reject;return g(C),S.promise}})},
vendor: 566 bytes, line 170
170"./node_modules/core-js/modules/es.promise.resolve.js":function(w,O,t){var f=t("./node_modules/core-js/internals/export.js"),v=t("./node_modules/core-js/internals/get-built-in.js"),m=t("./node_modules/core-js/internals/is-pure.js"),y=t("./node_modules/core-js/internals/promise-native-constructor.js"),C=t("./node_modules/core-js/internals/promise-constructor-detection.js").CONSTRUCTOR,S=t("./node_modules/core-js/internals/promise-resolve.js"),g=v("Promise"),j=m&&!C;f({target:"Promise",stat:!0,forced:m||C},{resolve:function(I){return S(j&&this===g?y:this,I)}})},
vendor: 236 bytes, line 170
170"./node_modules/core-js/modules/es.regexp.exec.js":function(w,O,t){var f=t("./node_modules/core-js/internals/export.js"),v=t("./node_modules/core-js/internals/regexp-exec.js");f({target:"RegExp",proto:!0,forced:/./.exec!==v},{exec:v})},
vendor: 689 bytes, line 170
170"./node_modules/core-js/modules/es.regexp.test.js":function(w,O,t){t("./node_modules/core-js/modules/es.regexp.exec.js");var f=t("./node_modules/core-js/internals/export.js"),v=t("./node_modules/core-js/internals/function-call.js"),m=t("./node_modules/core-js/internals/is-callable.js"),y=t("./node_modules/core-js/internals/an-object.js"),C=t("./node_modules/core-js/internals/to-string.js"),S=function(){var j=!1,A=/[ac]/;return A.exec=function(){return j=!0,/./.exec.apply(this,arguments)},A.test("abc")===!0&&j}(),g=/./.test;f({target:"RegExp",proto:!0,forced:!S},{test:function(j){var A=y(this),I=C(j),M=A.exec;if(!m(M))return v(g,A,I);var B=v(M,A,I);return B===null?!1:(y(B),!0)}})},
vendor: 629 bytes, line 170
170"./node_modules/core-js/modules/es.regexp.to-string.js":function(w,O,t){var f=t("./node_modules/core-js/internals/function-name.js").PROPER,v=t("./node_modules/core-js/internals/define-built-in.js"),m=t("./node_modules/core-js/internals/an-object.js"),y=t("./node_modules/core-js/internals/to-string.js"),C=t("./node_modules/core-js/internals/fails.js"),S=t("./node_modules/core-js/internals/regexp-get-flags.js"),g="toString",j=RegExp.prototype,A=j[g],I=C(function(){return A.call({source:"a",flags:"b"})!=="/a/b"}),M=f&&A.name!==g;(I||M)&&v(j,g,function(){var W=m(this),Y=y(W.source),J=y(S(W));return"/"+Y+"/"+J},{unsafe:!0})},
vendor: 286 bytes, line 170
170"./node_modules/core-js/modules/es.set.constructor.js":function(w,O,t){var f=t("./node_modules/core-js/internals/collection.js"),v=t("./node_modules/core-js/internals/collection-strong.js");f("Set",function(m){return function(){return m(this,arguments.length?arguments[0]:void 0)}},v)},
vendor: 118 bytes, line 170
170"./node_modules/core-js/modules/es.set.js":function(w,O,t){t("./node_modules/core-js/modules/es.set.constructor.js")},
vendor: 969 bytes, line 170
170"./node_modules/core-js/modules/es.string.ends-with.js":function(w,O,t){var f=t("./node_modules/core-js/internals/export.js"),v=t("./node_modules/core-js/internals/function-uncurry-this-clause.js"),m=t("./node_modules/core-js/internals/object-get-own-property-descriptor.js").f,y=t("./node_modules/core-js/internals/to-length.js"),C=t("./node_modules/core-js/internals/to-string.js"),S=t("./node_modules/core-js/internals/not-a-regexp.js"),g=t("./node_modules/core-js/internals/require-object-coercible.js"),j=t("./node_modules/core-js/internals/correct-is-regexp-logic.js"),A=t("./node_modules/core-js/internals/is-pure.js"),I=v("".slice),M=Math.min,B=j("endsWith"),W=!A&&!B&&!!function(){var Y=m(String.prototype,"endsWith");return Y&&!Y.writable}();f({target:"String",proto:!0,forced:!W&&!B},{endsWith:function(J){var le=C(g(this));S(J);var ae=arguments.length>1?arguments[1]:void 0,Z=le.length,oe=ae===void 0?Z:M(y(ae),Z),H=C(J);return I(le,oe-H.length,oe)===H}})},
vendor: 597 bytes, line 170
170"./node_modules/core-js/modules/es.string.includes.js":function(w,O,t){var f=t("./node_modules/core-js/internals/export.js"),v=t("./node_modules/core-js/internals/function-uncurry-this.js"),m=t("./node_modules/core-js/internals/not-a-regexp.js"),y=t("./node_modules/core-js/internals/require-object-coercible.js"),C=t("./node_modules/core-js/internals/to-string.js"),S=t("./node_modules/core-js/internals/correct-is-regexp-logic.js"),g=v("".indexOf);f({target:"String",proto:!0,forced:!S("includes")},{includes:function(A){return!!~g(C(y(this)),C(m(A)),arguments.length>1?arguments[1]:void 0)}})},
vendor: 614 bytes, line 170
170"./node_modules/core-js/modules/es.string.iterator.js":function(w,O,t){var f=t("./node_modules/core-js/internals/string-multibyte.js").charAt,v=t("./node_modules/core-js/internals/to-string.js"),m=t("./node_modules/core-js/internals/internal-state.js"),y=t("./node_modules/core-js/internals/iterator-define.js"),C=t("./node_modules/core-js/internals/create-iter-result-object.js"),S="String Iterator",g=m.set,j=m.getterFor(S);y(String,"String",function(A){g(this,{type:S,string:v(A),index:0})},function(){var I=j(this),M=I.string,B=I.index,W;return B>=M.length?C(void 0,!0):(W=f(M,B),I.index+=W.length,C(W,!1))})},
vendor: 334 bytes, line 170
170"./node_modules/core-js/modules/es.string.link.js":function(w,O,t){var f=t("./node_modules/core-js/internals/export.js"),v=t("./node_modules/core-js/internals/create-html.js"),m=t("./node_modules/core-js/internals/string-html-forced.js");f({target:"String",proto:!0,forced:m("link")},{link:function(C){return v(this,"a","href",C)}})},
vendor: 1,236 bytes, line 170
170"./node_modules/core-js/modules/es.string.match.js":function(w,O,t){var f=t("./node_modules/core-js/internals/function-call.js"),v=t("./node_modules/core-js/internals/function-uncurry-this.js"),m=t("./node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js"),y=t("./node_modules/core-js/internals/an-object.js"),C=t("./node_modules/core-js/internals/is-object.js"),S=t("./node_modules/core-js/internals/to-length.js"),g=t("./node_modules/core-js/internals/to-string.js"),j=t("./node_modules/core-js/internals/require-object-coercible.js"),A=t("./node_modules/core-js/internals/get-method.js"),I=t("./node_modules/core-js/internals/advance-string-index.js"),M=t("./node_modules/core-js/internals/regexp-get-flags.js"),B=t("./node_modules/core-js/internals/regexp-exec-abstract.js"),W=v("".indexOf);m("match",function(Y,J,le){return[function(Z){var oe=j(this),H=C(Z)?A(Z,Y):void 0;return H?f(H,Z,oe):new RegExp(Z)[Y](g(oe))},function(ae){var Z=y(this),oe=g(ae),H=le(J,Z,oe);if(H.done)return H.value;var fe=g(M(Z));if(W(fe,"g")===-1)return B(Z,oe);var se=W(fe,"u")!==-1;Z.lastIndex=0;for(var de=[],q=0,U;(U=B(Z,oe))!==null;){var ge=g(U[0]);de[q]=ge,ge===""&&(Z.lastIndex=I(oe,S(Z.lastIndex),se)),q++}return q===0?null:de}]})},
vendor: 2,425 bytes, line 170
170"./node_modules/core-js/modules/es.string.replace.js":function(w,O,t){var f=t("./node_modules/core-js/internals/function-apply.js"),v=t("./node_modules/core-js/internals/function-call.js"),m=t("./node_modules/core-js/internals/function-uncurry-this.js"),y=t("./node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js"),C=t("./node_modules/core-js/internals/fails.js"),S=t("./node_modules/core-js/internals/an-object.js"),g=t("./node_modules/core-js/internals/is-callable.js"),j=t("./node_modules/core-js/internals/is-object.js"),A=t("./node_modules/core-js/internals/to-integer-or-infinity.js"),I=t("./node_modules/core-js/internals/to-length.js"),M=t("./node_modules/core-js/internals/to-string.js"),B=t("./node_modules/core-js/internals/require-object-coercible.js"),W=t("./node_modules/core-js/internals/advance-string-index.js"),Y=t("./node_modules/core-js/internals/get-method.js"),J=t("./node_modules/core-js/internals/get-substitution.js"),le=t("./node_modules/core-js/internals/regexp-get-flags.js"),ae=t("./node_modules/core-js/internals/regexp-exec-abstract.js"),Z=t("./node_modules/core-js/internals/well-known-symbol.js"),oe=Z("replace"),H=Math.max,fe=Math.min,se=m([].concat),de=m([].push),q=m("".indexOf),U=m("".slice),ge=function(Pe){return Pe===void 0?Pe:String(Pe)},Ee=function(){return"a".replace(/./,"$0")==="$0"}(),Xe=function(){return/./[oe]?/./[oe]("a","$0")==="":!1}(),re=!C(function(){var Pe=/./;return Pe.exec=function(){var ye=[];return ye.groups={a:"7"},ye},"".replace(Pe,"$<a>")!=="7"});y("replace",function(Pe,ye,Se){var Le=Xe?"$":"$0";return[function(Ke,rt){var xt=B(this),He=j(Ke)?Y(Ke,oe):void 0;return He?v(He,Ke,xt,rt):v(ye,M(xt),Ke,rt)},function(st,Ke){var rt=S(this),xt=M(st);if(typeof Ke=="string"&&q(Ke,Le)===-1&&q(Ke,"$<")===-1){var He=Se(ye,rt,xt,Ke);if(He.done)return He.value}var Tt=g(Ke);Tt||(Ke=M(Ke));var Kt=M(le(rt)),Jt=q(Kt,"g")!==-1,rr;Jt&&(rr=q(Kt,"u")!==-1,rt.lastIndex=0);for(var Ht=[],yr;yr=ae(rt,xt),!(yr===null||(de(Ht,yr),!Jt));){var gr=M(yr[0]);gr===""&&(rt.lastIndex=W(xt,I(rt.lastIndex),rr))}for(var Vr="",jr=0,Xr=0;Xr<Ht.length;Xr++){yr=Ht[Xr];for(var et=M(yr[0]),ft=H(fe(A(yr.index),xt.length),0),je=[],$e,ht=1;ht<yr.length;ht++)de(je,ge(yr[ht]));var tt=yr.groups;if(Tt){var Ze=se([et],je,ft,xt);tt!==void 0&&de(Ze,tt),$e=M(f(Ke,void 0,Ze))}else $e=J(et,xt,ft,je,tt,Ke);ft>=jr&&(Vr+=U(xt,jr,ft)+$e,jr=ft+et.length)}return Vr+U(xt,jr)}]},!re||!Ee||Xe)},
vendor: 2,259 bytes, line 170
170"./node_modules/core-js/modules/es.string.split.js":function(w,O,t){var f=t("./node_modules/core-js/internals/function-call.js"),v=t("./node_modules/core-js/internals/function-uncurry-this.js"),m=t("./node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js"),y=t("./node_modules/core-js/internals/an-object.js"),C=t("./node_modules/core-js/internals/is-object.js"),S=t("./node_modules/core-js/internals/require-object-coercible.js"),g=t("./node_modules/core-js/internals/species-constructor.js"),j=t("./node_modules/core-js/internals/advance-string-index.js"),A=t("./node_modules/core-js/internals/to-length.js"),I=t("./node_modules/core-js/internals/to-string.js"),M=t("./node_modules/core-js/internals/get-method.js"),B=t("./node_modules/core-js/internals/regexp-exec-abstract.js"),W=t("./node_modules/core-js/internals/regexp-sticky-helpers.js"),Y=t("./node_modules/core-js/internals/fails.js"),J=W.UNSUPPORTED_Y,le=4294967295,ae=Math.min,Z=v([].push),oe=v("".slice),H=!Y(function(){var se=/(?:)/,de=se.exec;se.exec=function(){return de.apply(this,arguments)};var q="ab".split(se);return q.length!==2||q[0]!=="a"||q[1]!=="b"}),fe="abbc".split(/(b)*/)[1]==="c"||"test".split(/(?:)/,-1).length!==4||"ab".split(/(?:ab)*/).length!==2||".".split(/(.?)(.?)/).length!==4||".".split(/()()/).length>1||"".split(/.?/).length;m("split",function(se,de,q){var U="0".split(void 0,0).length?function(ge,Ee){return ge===void 0&&Ee===0?[]:f(de,this,ge,Ee)}:de;return[function(Ee,Xe){var re=S(this),Pe=C(Ee)?M(Ee,se):void 0;return Pe?f(Pe,Ee,re,Xe):f(U,I(re),Ee,Xe)},function(ge,Ee){var Xe=y(this),re=I(ge);if(!fe){var Pe=q(U,Xe,re,Ee,U!==de);if(Pe.done)return Pe.value}var ye=g(Xe,RegExp),Se=Xe.unicode,Le=(Xe.ignoreCase?"i":"")+(Xe.multiline?"m":"")+(Xe.unicode?"u":"")+(J?"g":"y"),st=new ye(J?"^(?:"+Xe.source+")":Xe,Le),Ke=Ee===void 0?le:Ee>>>0;if(Ke===0)return[];if(re.length===0)return B(st,re)===null?[re]:[];for(var rt=0,xt=0,He=[];xt<re.length;){st.lastIndex=J?0:xt;var Tt=B(st,J?oe(re,xt):re),Kt;if(Tt===null||(Kt=ae(A(st.lastIndex+(J?xt:0)),re.length))===rt)xt=j(re,xt,Se);else{if(Z(He,oe(re,rt,xt)),He.length===Ke)return He;for(var Jt=1;Jt<=Tt.length-1;Jt++)if(Z(He,Tt[Jt]),He.length===Ke)return He;xt=rt=Kt}}return Z(He,oe(re,rt)),He}]},fe||!H,J)},
vendor: 953 bytes, line 170
170"./node_modules/core-js/modules/es.string.starts-with.js":function(w,O,t){var f=t("./node_modules/core-js/internals/export.js"),v=t("./node_modules/core-js/internals/function-uncurry-this-clause.js"),m=t("./node_modules/core-js/internals/object-get-own-property-descriptor.js").f,y=t("./node_modules/core-js/internals/to-length.js"),C=t("./node_modules/core-js/internals/to-string.js"),S=t("./node_modules/core-js/internals/not-a-regexp.js"),g=t("./node_modules/core-js/internals/require-object-coercible.js"),j=t("./node_modules/core-js/internals/correct-is-regexp-logic.js"),A=t("./node_modules/core-js/internals/is-pure.js"),I=v("".slice),M=Math.min,B=j("startsWith"),W=!A&&!B&&!!function(){var Y=m(String.prototype,"startsWith");return Y&&!Y.writable}();f({target:"String",proto:!0,forced:!W&&!B},{startsWith:function(J){var le=C(g(this));S(J);var ae=y(M(arguments.length>1?arguments[1]:void 0,le.length)),Z=C(J);return I(le,ae,ae+Z.length)===Z}})},
vendor: 325 bytes, line 170
170"./node_modules/core-js/modules/es.string.trim.js":function(w,O,t){var f=t("./node_modules/core-js/internals/export.js"),v=t("./node_modules/core-js/internals/string-trim.js").trim,m=t("./node_modules/core-js/internals/string-trim-forced.js");f({target:"String",proto:!0,forced:m("trim")},{trim:function(){return v(this)}})},
vendor: 5,130 bytes, line 170
170"./node_modules/core-js/modules/es.symbol.constructor.js":function(w,O,t){var f=t("./node_modules/core-js/internals/export.js"),v=t("./node_modules/core-js/internals/global-this.js"),m=t("./node_modules/core-js/internals/function-call.js"),y=t("./node_modules/core-js/internals/function-uncurry-this.js"),C=t("./node_modules/core-js/internals/is-pure.js"),S=t("./node_modules/core-js/internals/descriptors.js"),g=t("./node_modules/core-js/internals/symbol-constructor-detection.js"),j=t("./node_modules/core-js/internals/fails.js"),A=t("./node_modules/core-js/internals/has-own-property.js"),I=t("./node_modules/core-js/internals/object-is-prototype-of.js"),M=t("./node_modules/core-js/internals/an-object.js"),B=t("./node_modules/core-js/internals/to-indexed-object.js"),W=t("./node_modules/core-js/internals/to-property-key.js"),Y=t("./node_modules/core-js/internals/to-string.js"),J=t("./node_modules/core-js/internals/create-property-descriptor.js"),le=t("./node_modules/core-js/internals/object-create.js"),ae=t("./node_modules/core-js/internals/object-keys.js"),Z=t("./node_modules/core-js/internals/object-get-own-property-names.js"),oe=t("./node_modules/core-js/internals/object-get-own-property-names-external.js"),H=t("./node_modules/core-js/internals/object-get-own-property-symbols.js"),fe=t("./node_modules/core-js/internals/object-get-own-property-descriptor.js"),se=t("./node_modules/core-js/internals/object-define-property.js"),de=t("./node_modules/core-js/internals/object-define-properties.js"),q=t("./node_modules/core-js/internals/object-property-is-enumerable.js"),U=t("./node_modules/core-js/internals/define-built-in.js"),ge=t("./node_modules/core-js/internals/define-built-in-accessor.js"),Ee=t("./node_modules/core-js/internals/shared.js"),Xe=t("./node_modules/core-js/internals/shared-key.js"),re=t("./node_modules/core-js/internals/hidden-keys.js"),Pe=t("./node_modules/core-js/internals/uid.js"),ye=t("./node_modules/core-js/internals/well-known-symbol.js"),Se=t("./node_modules/core-js/internals/well-known-symbol-wrapped.js"),Le=t("./node_modules/core-js/internals/well-known-symbol-define.js"),st=t("./node_modules/core-js/internals/symbol-define-to-primitive.js"),Ke=t("./node_modules/core-js/internals/set-to-string-tag.js"),rt=t("./node_modules/core-js/internals/internal-state.js"),xt=t("./node_modules/core-js/internals/array-iteration.js").forEach,He=Xe("hidden"),Tt="Symbol",Kt="prototype",Jt=rt.set,rr=rt.getterFor(Tt),Ht=Object[Kt],yr=v.Symbol,gr=yr&&yr[Kt],Vr=v.RangeError,jr=v.TypeError,Xr=v.QObject,et=fe.f,ft=se.f,je=oe.f,$e=q.f,ht=y([].push),tt=Ee("symbols"),Ze=Ee("op-symbols"),Ft=Ee("wks"),lt=!Xr||!Xr[Kt]||!Xr[Kt].findChild,_t=function(Ye,Vt,lr){var xr=et(Ht,Vt);xr&&delete Ht[Vt],ft(Ye,Vt,lr),xr&&Ye!==Ht&&ft(Ht,Vt,xr)},dr=S&&j(function(){return le(ft({},"a",{get:function(){return ft(this,"a",{value:7}).a}})).a!==7})?_t:ft,fr=function(Ye,Vt){var lr=tt[Ye]=le(gr);return Jt(lr,{type:Tt,tag:Ye,description:Vt}),S||(lr.description=Vt),lr},It=function(Vt,lr,xr){Vt===Ht&&It(Ze,lr,xr),M(Vt);var Pr=W(lr);return M(xr),A(tt,Pr)?(xr.enumerable?(A(Vt,He)&&Vt[He][Pr]&&(Vt[He][Pr]=!1),xr=le(xr,{enumerable:J(0,!1)})):(A(Vt,He)||ft(Vt,He,J(1,le(null))),Vt[He][Pr]=!0),dr(Vt,Pr,xr)):ft(Vt,Pr,xr)},nr=function(Vt,lr){M(Vt);var xr=B(lr),Pr=ae(xr).concat(zr(xr));return xt(Pr,function(Ur){(!S||m(Wt,xr,Ur))&&It(Vt,Ur,xr[Ur])}),Vt},Cr=function(Vt,lr){return lr===void 0?le(Vt):nr(le(Vt),lr)},Wt=function(Vt){var lr=W(Vt),xr=m($e,this,lr);return this===Ht&&A(tt,lr)&&!A(Ze,lr)?!1:xr||!A(this,lr)||!A(tt,lr)||A(this,He)&&this[He][lr]?xr:!0},Ir=function(Vt,lr){var xr=B(Vt),Pr=W(lr);if(!(xr===Ht&&A(tt,Pr)&&!A(Ze,Pr))){var Ur=et(xr,Pr);return Ur&&A(tt,Pr)&&!(A(xr,He)&&xr[He][Pr])&&(Ur.enumerable=!0),Ur}},Yt=function(Vt){var lr=je(B(Vt)),xr=[];return xt(lr,function(Pr){!A(tt,Pr)&&!A(re,Pr)&&ht(xr,Pr)}),xr},zr=function(Ye){var Vt=Ye===Ht,lr=je(Vt?Ze:B(Ye)),xr=[];return xt(lr,function(Pr){A(tt,Pr)&&(!Vt||A(Ht,Pr))&&ht(xr,tt[Pr])}),xr};g||(yr=function(){if(I(gr,this))throw new jr("Symbol is not a constructor");var Vt=!arguments.length||arguments[0]===void 0?void 0:Y(arguments[0]),lr=Pe(Vt),xr=function(Pr){var Ur=this===void 0?v:this;Ur===Ht&&m(xr,Ze,Pr),A(Ur,He)&&A(Ur[He],lr)&&(Ur[He][lr]=!1);var yn=J(1,Pr);try{dr(Ur,lr,yn)}catch(vt){if(!(vt instanceof Vr))throw vt;_t(Ur,lr,yn)}};return S&&lt&&dr(Ht,lr,{configurable:!0,set:xr}),fr(lr,Vt)},gr=yr[Kt],U(gr,"toString",function(){return rr(this).tag}),U(yr,"withoutSetter",function(Ye){return fr(Pe(Ye),Ye)}),q.f=Wt,se.f=It,de.f=nr,fe.f=Ir,Z.f=oe.f=Yt,H.f=zr,Se.f=function(Ye){return fr(ye(Ye),Ye)},S&&(ge(gr,"description",{configurable:!0,get:function(){return rr(this).description}}),C||U(Ht,"propertyIsEnumerable",Wt,{unsafe:!0}))),f({global:!0,constructor:!0,wrap:!0,forced:!g,sham:!g},{Symbol:yr}),xt(ae(Ft),function(Ye){Le(Ye)}),f({target:Tt,stat:!0,forced:!g},{useSetter:function(){lt=!0},useSimple:function(){lt=!1}}),f({target:"Object",stat:!0,forced:!g,sham:!S},{create:Cr,defineProperty:It,defineProperties:nr,getOwnPropertyDescriptor:Ir}),f({target:"Object",stat:!0,forced:!g},{getOwnPropertyNames:Yt}),st(),Ke(yr,Tt),re[He]=!0},
vendor: 1,346 bytes, line 170
170"./node_modules/core-js/modules/es.symbol.description.js":function(w,O,t){var f=t("./node_modules/core-js/internals/export.js"),v=t("./node_modules/core-js/internals/descriptors.js"),m=t("./node_modules/core-js/internals/global-this.js"),y=t("./node_modules/core-js/internals/function-uncurry-this.js"),C=t("./node_modules/core-js/internals/has-own-property.js"),S=t("./node_modules/core-js/internals/is-callable.js"),g=t("./node_modules/core-js/internals/object-is-prototype-of.js"),j=t("./node_modules/core-js/internals/to-string.js"),A=t("./node_modules/core-js/internals/define-built-in-accessor.js"),I=t("./node_modules/core-js/internals/copy-constructor-properties.js"),M=m.Symbol,B=M&&M.prototype;if(v&&S(M)&&(!("description"in B)||M().description!==void 0)){var W={},Y=function(){var se=arguments.length<1||arguments[0]===void 0?void 0:j(arguments[0]),de=g(B,this)?new M(se):se===void 0?M():M(se);return se===""&&(W[de]=!0),de};I(Y,M),Y.prototype=B,B.constructor=Y;var J=String(M("description detection"))==="Symbol(description detection)",le=y(B.valueOf),ae=y(B.toString),Z=/^Symbol\((.*)\)[^)]+$/,oe=y("".replace),H=y("".slice);A(B,"description",{configurable:!0,get:function(){var se=le(this);if(C(W,se))return"";var de=ae(se),q=J?H(de,7,-1):oe(de,Z,"$1");return q===""?void 0:q}}),f({global:!0,constructor:!0,forced:!0},{Symbol:Y})}},
vendor: 610 bytes, line 170
170"./node_modules/core-js/modules/es.symbol.for.js":function(w,O,t){var f=t("./node_modules/core-js/internals/export.js"),v=t("./node_modules/core-js/internals/get-built-in.js"),m=t("./node_modules/core-js/internals/has-own-property.js"),y=t("./node_modules/core-js/internals/to-string.js"),C=t("./node_modules/core-js/internals/shared.js"),S=t("./node_modules/core-js/internals/symbol-registry-detection.js"),g=C("string-to-symbol-registry"),j=C("symbol-to-string-registry");f({target:"Symbol",stat:!0,forced:!S},{for:function(A){var I=y(A);if(m(g,I))return g[I];var M=v("Symbol")(I);return g[I]=M,j[M]=I,M}})},
vendor: 158 bytes, line 170
170"./node_modules/core-js/modules/es.symbol.iterator.js":function(w,O,t){var f=t("./node_modules/core-js/internals/well-known-symbol-define.js");f("iterator")},
vendor: 365 bytes, line 170
170"./node_modules/core-js/modules/es.symbol.js":function(w,O,t){t("./node_modules/core-js/modules/es.symbol.constructor.js"),t("./node_modules/core-js/modules/es.symbol.for.js"),t("./node_modules/core-js/modules/es.symbol.key-for.js"),t("./node_modules/core-js/modules/es.json.stringify.js"),t("./node_modules/core-js/modules/es.object.get-own-property-symbols.js")},
vendor: 584 bytes, line 170
170"./node_modules/core-js/modules/es.symbol.key-for.js":function(w,O,t){var f=t("./node_modules/core-js/internals/export.js"),v=t("./node_modules/core-js/internals/has-own-property.js"),m=t("./node_modules/core-js/internals/is-symbol.js"),y=t("./node_modules/core-js/internals/try-to-string.js"),C=t("./node_modules/core-js/internals/shared.js"),S=t("./node_modules/core-js/internals/symbol-registry-detection.js"),g=C("symbol-to-string-registry");f({target:"Symbol",stat:!0,forced:!S},{keyFor:function(A){if(!m(A))throw new TypeError(y(A)+" is not a symbol");if(v(g,A))return g[A]}})},
vendor: 144 bytes, line 170
170"./node_modules/core-js/modules/esnext.iterator.constructor.js":function(w,O,t){t("./node_modules/core-js/modules/es.iterator.constructor.js")},
vendor: 138 bytes, line 170
170"./node_modules/core-js/modules/esnext.iterator.for-each.js":function(w,O,t){t("./node_modules/core-js/modules/es.iterator.for-each.js")},
vendor: 128 bytes, line 170
170"./node_modules/core-js/modules/esnext.iterator.map.js":function(w,O,t){t("./node_modules/core-js/modules/es.iterator.map.js")},
vendor: 376 bytes, line 170
170"./node_modules/core-js/modules/esnext.set.add-all.js":function(w,O,t){var f=t("./node_modules/core-js/internals/export.js"),v=t("./node_modules/core-js/internals/a-set.js"),m=t("./node_modules/core-js/internals/set-helpers.js").add;f({target:"Set",proto:!0,real:!0,forced:!0},{addAll:function(){for(var C=v(this),S=0,g=arguments.length;S<g;S++)m(C,arguments[S]);return C}})},
vendor: 402 bytes, line 170
170"./node_modules/core-js/modules/esnext.set.delete-all.js":function(w,O,t){var f=t("./node_modules/core-js/internals/export.js"),v=t("./node_modules/core-js/internals/a-set.js"),m=t("./node_modules/core-js/internals/set-helpers.js").remove;f({target:"Set",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var C=v(this),S=!0,g,j=0,A=arguments.length;j<A;j++)g=m(C,arguments[j]),S=S&&g;return!!S}})},
vendor: 392 bytes, line 170
170"./node_modules/core-js/modules/esnext.set.difference.js":function(w,O,t){var f=t("./node_modules/core-js/internals/export.js"),v=t("./node_modules/core-js/internals/function-call.js"),m=t("./node_modules/core-js/internals/to-set-like.js"),y=t("./node_modules/core-js/internals/set-difference.js");f({target:"Set",proto:!0,real:!0,forced:!0},{difference:function(S){return v(y,this,m(S))}})},
vendor: 474 bytes, line 170
170"./node_modules/core-js/modules/esnext.set.every.js":function(w,O,t){var f=t("./node_modules/core-js/internals/export.js"),v=t("./node_modules/core-js/internals/function-bind-context.js"),m=t("./node_modules/core-js/internals/a-set.js"),y=t("./node_modules/core-js/internals/set-iterate.js");f({target:"Set",proto:!0,real:!0,forced:!0},{every:function(S){var g=m(this),j=v(S,arguments.length>1?arguments[1]:void 0);return y(g,function(A){if(!j(A,A,g))return!1},!0)!==!1}})},
vendor: 544 bytes, line 170
170"./node_modules/core-js/modules/esnext.set.filter.js":function(w,O,t){var f=t("./node_modules/core-js/internals/export.js"),v=t("./node_modules/core-js/internals/function-bind-context.js"),m=t("./node_modules/core-js/internals/a-set.js"),y=t("./node_modules/core-js/internals/set-helpers.js"),C=t("./node_modules/core-js/internals/set-iterate.js"),S=y.Set,g=y.add;f({target:"Set",proto:!0,real:!0,forced:!0},{filter:function(A){var I=m(this),M=v(A,arguments.length>1?arguments[1]:void 0),B=new S;return C(I,function(W){M(W,W,I)&&g(B,W)}),B}})},
vendor: 486 bytes, line 170
170"./node_modules/core-js/modules/esnext.set.find.js":function(w,O,t){var f=t("./node_modules/core-js/internals/export.js"),v=t("./node_modules/core-js/internals/function-bind-context.js"),m=t("./node_modules/core-js/internals/a-set.js"),y=t("./node_modules/core-js/internals/set-iterate.js");f({target:"Set",proto:!0,real:!0,forced:!0},{find:function(S){var g=m(this),j=v(S,arguments.length>1?arguments[1]:void 0),A=y(g,function(I){if(j(I,I,g))return{value:I}},!0);return A&&A.value}})},
vendor: 398 bytes, line 170
170"./node_modules/core-js/modules/esnext.set.intersection.js":function(w,O,t){var f=t("./node_modules/core-js/internals/export.js"),v=t("./node_modules/core-js/internals/function-call.js"),m=t("./node_modules/core-js/internals/to-set-like.js"),y=t("./node_modules/core-js/internals/set-intersection.js");f({target:"Set",proto:!0,real:!0,forced:!0},{intersection:function(S){return v(y,this,m(S))}})},
vendor: 408 bytes, line 170
170"./node_modules/core-js/modules/esnext.set.is-disjoint-from.js":function(w,O,t){var f=t("./node_modules/core-js/internals/export.js"),v=t("./node_modules/core-js/internals/function-call.js"),m=t("./node_modules/core-js/internals/to-set-like.js"),y=t("./node_modules/core-js/internals/set-is-disjoint-from.js");f({target:"Set",proto:!0,real:!0,forced:!0},{isDisjointFrom:function(S){return v(y,this,m(S))}})},
vendor: 396 bytes, line 170
170"./node_modules/core-js/modules/esnext.set.is-subset-of.js":function(w,O,t){var f=t("./node_modules/core-js/internals/export.js"),v=t("./node_modules/core-js/internals/function-call.js"),m=t("./node_modules/core-js/internals/to-set-like.js"),y=t("./node_modules/core-js/internals/set-is-subset-of.js");f({target:"Set",proto:!0,real:!0,forced:!0},{isSubsetOf:function(S){return v(y,this,m(S))}})},
vendor: 402 bytes, line 170
170"./node_modules/core-js/modules/esnext.set.is-superset-of.js":function(w,O,t){var f=t("./node_modules/core-js/internals/export.js"),v=t("./node_modules/core-js/internals/function-call.js"),m=t("./node_modules/core-js/internals/to-set-like.js"),y=t("./node_modules/core-js/internals/set-is-superset-of.js");f({target:"Set",proto:!0,real:!0,forced:!0},{isSupersetOf:function(S){return v(y,this,m(S))}})},
vendor: 516 bytes, line 170
170"./node_modules/core-js/modules/esnext.set.join.js":function(w,O,t){var f=t("./node_modules/core-js/internals/export.js"),v=t("./node_modules/core-js/internals/function-uncurry-this.js"),m=t("./node_modules/core-js/internals/a-set.js"),y=t("./node_modules/core-js/internals/set-iterate.js"),C=t("./node_modules/core-js/internals/to-string.js"),S=v([].join),g=v([].push);f({target:"Set",proto:!0,real:!0,forced:!0},{join:function(A){var I=m(this),M=A===void 0?",":C(A),B=[];return y(I,function(W){g(B,W)}),S(B,M)}})},
vendor: 535 bytes, line 170
170"./node_modules/core-js/modules/esnext.set.map.js":function(w,O,t){var f=t("./node_modules/core-js/internals/export.js"),v=t("./node_modules/core-js/internals/function-bind-context.js"),m=t("./node_modules/core-js/internals/a-set.js"),y=t("./node_modules/core-js/internals/set-helpers.js"),C=t("./node_modules/core-js/internals/set-iterate.js"),S=y.Set,g=y.add;f({target:"Set",proto:!0,real:!0,forced:!0},{map:function(A){var I=m(this),M=v(A,arguments.length>1?arguments[1]:void 0),B=new S;return C(I,function(W){g(B,M(W,W,I))}),B}})},
vendor: 541 bytes, line 170
170"./node_modules/core-js/modules/esnext.set.reduce.js":function(w,O,t){var f=t("./node_modules/core-js/internals/export.js"),v=t("./node_modules/core-js/internals/a-callable.js"),m=t("./node_modules/core-js/internals/a-set.js"),y=t("./node_modules/core-js/internals/set-iterate.js"),C=TypeError;f({target:"Set",proto:!0,real:!0,forced:!0},{reduce:function(g){var j=m(this),A=arguments.length<2,I=A?void 0:arguments[1];if(v(g),y(j,function(M){A?(A=!1,I=M):I=g(I,M,M,j)}),A)throw new C("Reduce of empty set with no initial value");return I}})},
vendor: 471 bytes, line 170
170"./node_modules/core-js/modules/esnext.set.some.js":function(w,O,t){var f=t("./node_modules/core-js/internals/export.js"),v=t("./node_modules/core-js/internals/function-bind-context.js"),m=t("./node_modules/core-js/internals/a-set.js"),y=t("./node_modules/core-js/internals/set-iterate.js");f({target:"Set",proto:!0,real:!0,forced:!0},{some:function(S){var g=m(this),j=v(S,arguments.length>1?arguments[1]:void 0);return y(g,function(A){if(j(A,A,g))return!0},!0)===!0}})},
vendor: 421 bytes, line 170
170"./node_modules/core-js/modules/esnext.set.symmetric-difference.js":function(w,O,t){var f=t("./node_modules/core-js/internals/export.js"),v=t("./node_modules/core-js/internals/function-call.js"),m=t("./node_modules/core-js/internals/to-set-like.js"),y=t("./node_modules/core-js/internals/set-symmetric-difference.js");f({target:"Set",proto:!0,real:!0,forced:!0},{symmetricDifference:function(S){return v(y,this,m(S))}})},
vendor: 377 bytes, line 170
170"./node_modules/core-js/modules/esnext.set.union.js":function(w,O,t){var f=t("./node_modules/core-js/internals/export.js"),v=t("./node_modules/core-js/internals/function-call.js"),m=t("./node_modules/core-js/internals/to-set-like.js"),y=t("./node_modules/core-js/internals/set-union.js");f({target:"Set",proto:!0,real:!0,forced:!0},{union:function(S){return v(y,this,m(S))}})},
vendor: 523 bytes, line 170
170"./node_modules/core-js/modules/web.dom-collections.for-each.js":function(w,O,t){var f=t("./node_modules/core-js/internals/global-this.js"),v=t("./node_modules/core-js/internals/dom-iterables.js"),m=t("./node_modules/core-js/internals/dom-token-list-prototype.js"),y=t("./node_modules/core-js/internals/array-for-each.js"),C=t("./node_modules/core-js/internals/create-non-enumerable-property.js"),S=function(j){if(j&&j.forEach!==y)try{C(j,"forEach",y)}catch{j.forEach=y}};for(var g in v)v[g]&&S(f[g]&&f[g].prototype);S(m)},
vendor: 754 bytes, line 170
170"./node_modules/core-js/modules/web.dom-collections.iterator.js":function(w,O,t){var f=t("./node_modules/core-js/internals/global-this.js"),v=t("./node_modules/core-js/internals/dom-iterables.js"),m=t("./node_modules/core-js/internals/dom-token-list-prototype.js"),y=t("./node_modules/core-js/modules/es.array.iterator.js"),C=t("./node_modules/core-js/internals/create-non-enumerable-property.js"),S=t("./node_modules/core-js/internals/set-to-string-tag.js"),g=t("./node_modules/core-js/internals/well-known-symbol.js"),j=g("iterator"),A=y.values,I=function(B,W){if(B){if(B[j]!==A)try{C(B,j,A)}catch{B[j]=A}if(S(B,W,!0),v[W]){for(var Y in y)if(B[Y]!==y[Y])try{C(B,Y,y[Y])}catch{B[Y]=y[Y]}}}};for(var M in v)I(f[M]&&f[M].prototype,M);I(m,"DOMTokenList")},
vendor: 323 bytes, line 170
170"./node_modules/core-js/modules/web.set-interval.js":function(w,O,t){var f=t("./node_modules/core-js/internals/export.js"),v=t("./node_modules/core-js/internals/global-this.js"),m=t("./node_modules/core-js/internals/schedulers-fix.js"),y=m(v.setInterval,!0);f({global:!0,bind:!0,forced:v.setInterval!==y},{setInterval:y})},
vendor: 319 bytes, line 170
170"./node_modules/core-js/modules/web.set-timeout.js":function(w,O,t){var f=t("./node_modules/core-js/internals/export.js"),v=t("./node_modules/core-js/internals/global-this.js"),m=t("./node_modules/core-js/internals/schedulers-fix.js"),y=m(v.setTimeout,!0);f({global:!0,bind:!0,forced:v.setTimeout!==y},{setTimeout:y})},
vendor: 175 bytes, line 170
170"./node_modules/core-js/modules/web.timers.js":function(w,O,t){t("./node_modules/core-js/modules/web.set-interval.js"),t("./node_modules/core-js/modules/web.set-timeout.js")},
vendor: 23,631 bytes, lines 170-171
170"./node_modules/dompurify/dist/purify.es.mjs":function(w,O,t){t.r(O),t.d(O,{default:function(){return _t}});/*! @license DOMPurify 3.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.1/LICENSE */const{entries:f,setPrototypeOf:v,isFrozen:m,getPrototypeOf:y,getOwnPropertyDescriptor:C}=Object;let{freeze:S,seal:g,create:j}=Object,{apply:A,construct:I}=typeof Reflect<"u"&&Reflect;S||(S=function(fr){return fr}),g||(g=function(fr){return fr}),A||(A=function(fr,It){for(var nr=arguments.length,Cr=new Array(nr>2?nr-2:0),Wt=2;Wt<nr;Wt++)Cr[Wt-2]=arguments[Wt];return fr.apply(It,Cr)}),I||(I=function(fr){for(var It=arguments.length,nr=new Array(It>1?It-1:0),Cr=1;Cr<It;Cr++)nr[Cr-1]=arguments[Cr];return new fr(...nr)});const M=U(Array.prototype.forEach),B=U(Array.prototype.lastIndexOf),W=U(Array.prototype.pop),Y=U(Array.prototype.push),J=U(Array.prototype.splice),le=U(String.prototype.toLowerCase),ae=U(String.prototype.toString),Z=U(String.prototype.match),oe=U(String.prototype.replace),H=U(String.prototype.indexOf),fe=U(String.prototype.trim),se=U(Object.prototype.hasOwnProperty),de=U(RegExp.prototype.test),q=ge(TypeError);function U(dr){return function(fr){fr instanceof RegExp&&(fr.lastIndex=0);for(var It=arguments.length,nr=new Array(It>1?It-1:0),Cr=1;Cr<It;Cr++)nr[Cr-1]=arguments[Cr];return A(dr,fr,nr)}}function ge(dr){return function(){for(var fr=arguments.length,It=new Array(fr),nr=0;nr<fr;nr++)It[nr]=arguments[nr];return I(dr,It)}}function Ee(dr,fr){let It=arguments.length>2&&arguments[2]!==void 0?arguments[2]:le;v&&v(dr,null);let nr=fr.length;for(;nr--;){let Cr=fr[nr];if(typeof Cr=="string"){const Wt=It(Cr);Wt!==Cr&&(m(fr)||(fr[nr]=Wt),Cr=Wt)}dr[Cr]=!0}return dr}function Xe(dr){for(let fr=0;fr<dr.length;fr++)se(dr,fr)||(dr[fr]=null);return dr}function re(dr){const fr=j(null);for(const[It,nr]of f(dr))se(dr,It)&&(Array.isArray(nr)?fr[It]=Xe(nr):nr&&typeof nr=="object"&&nr.constructor===Object?fr[It]=re(nr):fr[It]=nr);return fr}function Pe(dr,fr){for(;dr!==null;){const nr=C(dr,fr);if(nr){if(nr.get)return U(nr.get);if(typeof nr.value=="function")return U(nr.value)}dr=y(dr)}function It(){return null}return It}const ye=S(["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"]),Se=S(["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"]),Le=S(["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"]),st=S(["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"]),Ke=S(["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"]),rt=S(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),xt=S(["#text"]),He=S(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","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","slot"]),Tt=S(["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","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-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"]),Kt=S(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","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"]),Jt=S(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),rr=g(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Ht=g(/<%[\w\W]*|[\w\W]*%>/gm),yr=g(/\$\{[\w\W]*/gm),gr=g(/^data-[\-\w.\u00B7-\uFFFF]+$/),Vr=g(/^aria-[\-\w]+$/),jr=g(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Xr=g(/^(?:\w+script|data):/i),et=g(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ft=g(/^html$/i),je=g(/^[a-z][.\w]*(-[.\w]+)+$/i);var $e=Object.freeze({__proto__:null,ARIA_ATTR:Vr,ATTR_WHITESPACE:et,CUSTOM_ELEMENT:je,DATA_ATTR:gr,DOCTYPE_NAME:ft,ERB_EXPR:Ht,IS_ALLOWED_URI:jr,IS_SCRIPT_OR_DATA:Xr,MUSTACHE_EXPR:rr,TMPLIT_EXPR:yr});const ht={element:1,text:3,progressingInstruction:7,comment:8,document:9},tt=function(){return typeof window>"u"?null:window},Ze=function(fr,It){if(typeof fr!="object"||typeof fr.createPolicy!="function")return null;let nr=null;const Cr="data-tt-policy-suffix";It&&It.hasAttribute(Cr)&&(nr=It.getAttribute(Cr));const Wt="dompurify"+(nr?"#"+nr:"");try{return fr.createPolicy(Wt,{createHTML(Ir){return Ir},createScriptURL(Ir){return Ir}})}catch{return console.warn("TrustedTypes policy "+Wt+" could not be created."),null}},Ft=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function lt(){let dr=arguments.length>0&&arguments[0]!==void 0?arguments[0]:tt();const fr=nt=>lt(nt);if(fr.version="3.3.1",fr.removed=[],!dr||!dr.document||dr.document.nodeType!==ht.document||!dr.Element)return fr.isSupported=!1,fr;let{document:It}=dr;const nr=It,Cr=nr.currentScript,{DocumentFragment:Wt,HTMLTemplateElement:Ir,Node:Yt,Element:zr,NodeFilter:Ye,NamedNodeMap:Vt=dr.NamedNodeMap||dr.MozNamedAttrMap,HTMLFormElement:lr,DOMParser:xr,trustedTypes:Pr}=dr,Ur=zr.prototype,yn=Pe(Ur,"cloneNode"),vt=Pe(Ur,"remove"),Lr=Pe(Ur,"nextSibling"),Er=Pe(Ur,"childNodes"),or=Pe(Ur,"parentNode");if(typeof Ir=="function"){const nt=It.createElement("template");nt.content&&nt.content.ownerDocument&&(It=nt.content.ownerDocument)}let as,Ws="";const{implementation:Ms,createNodeIterator:mn,createDocumentFragment:wn,getElementsByTagName:zt}=It,{importNode:Mr}=nr;let Rr=Ft();fr.isSupported=typeof f=="function"&&typeof or=="function"&&Ms&&Ms.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:ws,ERB_EXPR:is,TMPLIT_EXPR:ea,DATA_ATTR:Ts,ARIA_ATTR:Za,IS_SCRIPT_OR_DATA:qs,ATTR_WHITESPACE:$a,CUSTOM_ELEMENT:Ao}=$e;let{IS_ALLOWED_URI:ao}=$e,Ge=null;const ur=Ee({},[...ye,...Se,...Le,...Ke,...xt]);let Tr=null;const ts=Ee({},[...He,...Tt,...Kt,...Jt]);let Yr=Object.seal(j(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}})),Wr=null,Sn=null;const En=Object.seal(j(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Nn=!0,kn=!0,dn=!1,qr=!0,un=!1,ba=!0,wa=!1,Eo=!1,ma=!1,ps=!1,Na=!1,pa=!1,zo=!0,Va=!1;const _n="user-content-";let Fa=!0,Wn=!1,Dn={},Da=null;const Qa=Ee({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ga=null;const Kn=Ee({},["audio","video","img","source","image","track"]);let ta=null;const Wa=Ee({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),va="http://www.w3.org/1998/Math/MathML",Ja="http://www.w3.org/2000/svg",gt="http://www.w3.org/1999/xhtml";let u=gt,P=!1,T=null;const c=Ee({},[va,Ja,gt],ae);let h=Ee({},["mi","mo","mn","ms","mtext"]),k=Ee({},["annotation-xml"]);const $=Ee({},["title","style","font","a","script"]);let X=null;const pe=["application/xhtml+xml","text/html"],Te="text/html";let a=null,n=null;const l=It.createElement("form"),p=function(Ce){return Ce instanceof RegExp||Ce instanceof Function},b=function(){let Ce=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(n&&n===Ce)){if((!Ce||typeof Ce!="object")&&(Ce={}),Ce=re(Ce),X=pe.indexOf(Ce.PARSER_MEDIA_TYPE)===-1?Te:Ce.PARSER_MEDIA_TYPE,a=X==="application/xhtml+xml"?ae:le,Ge=se(Ce,"ALLOWED_TAGS")?Ee({},Ce.ALLOWED_TAGS,a):ur,Tr=se(Ce,"ALLOWED_ATTR")?Ee({},Ce.ALLOWED_ATTR,a):ts,T=se(Ce,"ALLOWED_NAMESPACES")?Ee({},Ce.ALLOWED_NAMESPACES,ae):c,ta=se(Ce,"ADD_URI_SAFE_ATTR")?Ee(re(Wa),Ce.ADD_URI_SAFE_ATTR,a):Wa,ga=se(Ce,"ADD_DATA_URI_TAGS")?Ee(re(Kn),Ce.ADD_DATA_URI_TAGS,a):Kn,Da=se(Ce,"FORBID_CONTENTS")?Ee({},Ce.FORBID_CONTENTS,a):Qa,Wr=se(Ce,"FORBID_TAGS")?Ee({},Ce.FORBID_TAGS,a):re({}),Sn=se(Ce,"FORBID_ATTR")?Ee({},Ce.FORBID_ATTR,a):re({}),Dn=se(Ce,"USE_PROFILES")?Ce.USE_PROFILES:!1,Nn=Ce.ALLOW_ARIA_ATTR!==!1,kn=Ce.ALLOW_DATA_ATTR!==!1,dn=Ce.ALLOW_UNKNOWN_PROTOCOLS||!1,qr=Ce.ALLOW_SELF_CLOSE_IN_ATTR!==!1,un=Ce.SAFE_FOR_TEMPLATES||!1,ba=Ce.SAFE_FOR_XML!==!1,wa=Ce.WHOLE_DOCUMENT||!1,ps=Ce.RETURN_DOM||!1,Na=Ce.RETURN_DOM_FRAGMENT||!1,pa=Ce.RETURN_TRUSTED_TYPE||!1,ma=Ce.FORCE_BODY||!1,zo=Ce.SANITIZE_DOM!==!1,Va=Ce.SANITIZE_NAMED_PROPS||!1,Fa=Ce.KEEP_CONTENT!==!1,Wn=Ce.IN_PLACE||!1,ao=Ce.ALLOWED_URI_REGEXP||jr,u=Ce.NAMESPACE||gt,h=Ce.MATHML_TEXT_INTEGRATION_POINTS||h,k=Ce.HTML_INTEGRATION_POINTS||k,Yr=Ce.CUSTOM_ELEMENT_HANDLING||{},Ce.CUSTOM_ELEMENT_HANDLING&&p(Ce.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Yr.tagNameCheck=Ce.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Ce.CUSTOM_ELEMENT_HANDLING&&p(Ce.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Yr.attributeNameCheck=Ce.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Ce.CUSTOM_ELEMENT_HANDLING&&typeof Ce.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Yr.allowCustomizedBuiltInElements=Ce.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),un&&(kn=!1),Na&&(ps=!0),Dn&&(Ge=Ee({},xt),Tr=[],Dn.html===!0&&(Ee(Ge,ye),Ee(Tr,He)),Dn.svg===!0&&(Ee(Ge,Se),Ee(Tr,Tt),Ee(Tr,Jt)),Dn.svgFilters===!0&&(Ee(Ge,Le),Ee(Tr,Tt),Ee(Tr,Jt)),Dn.mathMl===!0&&(Ee(Ge,Ke),Ee(Tr,Kt),Ee(Tr,Jt))),Ce.ADD_TAGS&&(typeof Ce.ADD_TAGS=="function"?En.tagCheck=Ce.ADD_TAGS:(Ge===ur&&(Ge=re(Ge)),Ee(Ge,Ce.ADD_TAGS,a))),Ce.ADD_ATTR&&(typeof Ce.ADD_ATTR=="function"?En.attributeCheck=Ce.ADD_ATTR:(Tr===ts&&(Tr=re(Tr)),Ee(Tr,Ce.ADD_ATTR,a))),Ce.ADD_URI_SAFE_ATTR&&Ee(ta,Ce.ADD_URI_SAFE_ATTR,a),Ce.FORBID_CONTENTS&&(Da===Qa&&(Da=re(Da)),Ee(Da,Ce.FORBID_CONTENTS,a)),Ce.ADD_FORBID_CONTENTS&&(Da===Qa&&(Da=re(Da)),Ee(Da,Ce.ADD_FORBID_CONTENTS,a)),Fa&&(Ge["#text"]=!0),wa&&Ee(Ge,["html","head","body"]),Ge.table&&(Ee(Ge,["tbody"]),delete Wr.tbody),Ce.TRUSTED_TYPES_POLICY){if(typeof Ce.TRUSTED_TYPES_POLICY.createHTML!="function")throw q('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Ce.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw q('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');as=Ce.TRUSTED_TYPES_POLICY,Ws=as.createHTML("")}else as===void 0&&(as=Ze(Pr,Cr)),as!==null&&typeof Ws=="string"&&(Ws=as.createHTML(""));S&&S(Ce),n=Ce}},E=Ee({},[...Se,...Le,...st]),V=Ee({},[...Ke,...rt]),R=function(Ce){let bt=or(Ce);(!bt||!bt.tagName)&&(bt={namespaceURI:u,tagName:"template"});const Gt=le(Ce.tagName),Et=le(bt.tagName);return T[Ce.namespaceURI]?Ce.namespaceURI===Ja?bt.namespaceURI===gt?Gt==="svg":bt.namespaceURI===va?Gt==="svg"&&(Et==="annotation-xml"||h[Et]):!!E[Gt]:Ce.namespaceURI===va?bt.namespaceURI===gt?Gt==="math":bt.namespaceURI===Ja?Gt==="math"&&k[Et]:!!V[Gt]:Ce.namespaceURI===gt?bt.namespaceURI===Ja&&!k[Et]||bt.namespaceURI===va&&!h[Et]?!1:!V[Gt]&&($[Gt]||!E[Gt]):!!(X==="application/xhtml+xml"&&T[Ce.namespaceURI]):!1},F=function(Ce){Y(fr.removed,{element:Ce});try{or(Ce).removeChild(Ce)}catch{vt(Ce)}},Q=function(Ce,bt){try{Y(fr.removed,{attribute:bt.getAttributeNode(Ce),from:bt})}catch{Y(fr.removed,{attribute:null,from:bt})}if(bt.removeAttribute(Ce),Ce==="is")if(ps||Na)try{F(bt)}catch{}else try{bt.setAttribute(Ce,"")}catch{}},he=function(Ce){let bt=null,Gt=null;if(ma)Ce="<remove></remove>"+Ce;else{const $t=Z(Ce,/^[\r\n\t ]+/);Gt=$t&&$t[0]}X==="application/xhtml+xml"&&u===gt&&(Ce='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+Ce+"</body></html>");const Et=as?as.createHTML(Ce):Ce;if(u===gt)try{bt=new xr().parseFromString(Et,X)}catch{}if(!bt||!bt.documentElement){bt=Ms.createDocument(u,"template",null);try{bt.documentElement.innerHTML=P?Ws:Et}catch{}}const dt=bt.body||bt.documentElement;return Ce&&Gt&&dt.insertBefore(It.createTextNode(Gt),dt.childNodes[0]||null),u===gt?zt.call(bt,wa?"html":"body")[0]:wa?bt.documentElement:dt},we=function(Ce){return mn.call(Ce.ownerDocument||Ce,Ce,Ye.SHOW_ELEMENT|Ye.SHOW_COMMENT|Ye.SHOW_TEXT|Ye.SHOW_PROCESSING_INSTRUCTION|Ye.SHOW_CDATA_SECTION,null)},Oe=function(Ce){return Ce instanceof lr&&(typeof Ce.nodeName!="string"||typeof Ce.textContent!="string"||typeof Ce.removeChild!="function"||!(Ce.attributes instanceof Vt)||typeof Ce.removeAttribute!="function"||typeof Ce.setAttribute!="function"||typeof Ce.namespaceURI!="string"||typeof Ce.insertBefore!="function"||typeof Ce.hasChildNodes!="function")},K=function(Ce){return typeof Yt=="function"&&Ce instanceof Yt};function Je(nt,Ce,bt){M(nt,Gt=>{Gt.call(fr,Ce,bt,n)})}const Fe=function(Ce){let bt=null;if(Je(Rr.beforeSanitizeElements,Ce,null),Oe(Ce))return F(Ce),!0;const Gt=a(Ce.nodeName);if(Je(Rr.uponSanitizeElement,Ce,{tagName:Gt,allowedTags:Ge}),ba&&Ce.hasChildNodes()&&!K(Ce.firstElementChild)&&de(/<[/\w!]/g,Ce.innerHTML)&&de(/<[/\w!]/g,Ce.textContent)||Ce.nodeType===ht.progressingInstruction||ba&&Ce.nodeType===ht.comment&&de(/<[/\w]/g,Ce.data))return F(Ce),!0;if(!(En.tagCheck instanceof Function&&En.tagCheck(Gt))&&(!Ge[Gt]||Wr[Gt])){if(!Wr[Gt]&&Ae(Gt)&&(Yr.tagNameCheck instanceof RegExp&&de(Yr.tagNameCheck,Gt)||Yr.tagNameCheck instanceof Function&&Yr.tagNameCheck(Gt)))return!1;if(Fa&&!Da[Gt]){const Et=or(Ce)||Ce.parentNode,dt=Er(Ce)||Ce.childNodes;if(dt&&Et){const $t=dt.length;for(let ke=$t-1;ke>=0;--ke){const Re=yn(dt[ke],!0);Re.__removalCount=(Ce.__removalCount||0)+1,Et.insertBefore(Re,Lr(Ce))}}}return F(Ce),!0}return Ce instanceof zr&&!R(Ce)||(Gt==="noscript"||Gt==="noembed"||Gt==="noframes")&&de(/<\/no(script|embed|frames)/i,Ce.innerHTML)?(F(Ce),!0):(un&&Ce.nodeType===ht.text&&(bt=Ce.textContent,M([ws,is,ea],Et=>{bt=oe(bt,Et," ")}),Ce.textContent!==bt&&(Y(fr.removed,{element:Ce.cloneNode()}),Ce.textContent=bt)),Je(Rr.afterSanitizeElements,Ce,null),!1)},Qe=function(Ce,bt,Gt){if(zo&&(bt==="id"||bt==="name")&&(Gt in It||Gt in l))return!1;if(!(kn&&!Sn[bt]&&de(Ts,bt))){if(!(Nn&&de(Za,bt))){if(!(En.attributeCheck instanceof Function&&En.attributeCheck(bt,Ce))){if(!Tr[bt]||Sn[bt]){if(!(Ae(Ce)&&(Yr.tagNameCheck instanceof RegExp&&de(Yr.tagNameCheck,Ce)||Yr.tagNameCheck instanceof Function&&Yr.tagNameCheck(Ce))&&(Yr.attributeNameCheck instanceof RegExp&&de(Yr.attributeNameCheck,bt)||Yr.attributeNameCheck instanceof Function&&Yr.attributeNameCheck(bt,Ce))||bt==="is"&&Yr.allowCustomizedBuiltInElements&&(Yr.tagNameCheck instanceof RegExp&&de(Yr.tagNameCheck,Gt)||Yr.tagNameCheck instanceof Function&&Yr.tagNameCheck(Gt))))return!1}else if(!ta[bt]){if(!de(ao,oe(Gt,$a,""))){if(!((bt==="src"||bt==="xlink:href"||bt==="href")&&Ce!=="script"&&H(Gt,"data:")===0&&ga[Ce])){if(!(dn&&!de(qs,oe(Gt,$a,"")))){if(Gt)return!1}}}}}}}return!0},Ae=function(Ce){return Ce!=="annotation-xml"&&Z(Ce,Ao)},ct=function(Ce){Je(Rr.beforeSanitizeAttributes,Ce,null);const{attributes:bt}=Ce;if(!bt||Oe(Ce))return;const Gt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Tr,forceKeepAttr:void 0};let Et=bt.length;for(;Et--;){const dt=bt[Et],{name:$t,namespaceURI:ke,value:Re}=dt,at=a($t),ot=Re;let Ut=$t==="value"?ot:fe(ot);if(Gt.attrName=at,Gt.attrValue=Ut,Gt.keepAttr=!0,Gt.forceKeepAttr=void 0,Je(Rr.uponSanitizeAttribute,Ce,Gt),Ut=Gt.attrValue,Va&&(at==="id"||at==="name")&&(Q($t,Ce),Ut=_n+Ut),ba&&de(/((--!?|])>)|<\/(style|title|textarea)/i,Ut)){Q($t,Ce);continue}if(at==="attributename"&&Z(Ut,"href")){Q($t,Ce);continue}if(Gt.forceKeepAttr)continue;if(!Gt.keepAttr){Q($t,Ce);continue}if(!qr&&de(/\/>/i,Ut)){Q($t,Ce);continue}un&&M([ws,is,ea],er=>{Ut=oe(Ut,er," ")});const Xt=a(Ce.nodeName);if(!Qe(Xt,at,Ut)){Q($t,Ce);continue}if(as&&typeof Pr=="object"&&typeof Pr.getAttributeType=="function"&&!ke)switch(Pr.getAttributeType(Xt,at)){case"TrustedHTML":{Ut=as.createHTML(Ut);break}case"TrustedScriptURL":{Ut=as.createScriptURL(Ut);break}}if(Ut!==ot)try{ke?Ce.setAttributeNS(ke,$t,Ut):Ce.setAttribute($t,Ut),Oe(Ce)?F(Ce):W(fr.removed)}catch{Q($t,Ce)}}Je(Rr.afterSanitizeAttributes,Ce,null)},Ct=function nt(Ce){let bt=null;const Gt=we(Ce);for(Je(Rr.beforeSanitizeShadowDOM,Ce,null);bt=Gt.nextNode();)Je(Rr.uponSanitizeShadowNode,bt,null),Fe(bt),ct(bt),bt.content instanceof Wt&&nt(bt.content);Je(Rr.afterSanitizeShadowDOM,Ce,null)};return fr.sanitize=function(nt){let Ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},bt=null,Gt=null,Et=null,dt=null;if(P=!nt,P&&(nt="<!-->"),typeof nt!="string"&&!K(nt))if(typeof nt.toString=="function"){if(nt=nt.toString(),typeof nt!="string")throw q("dirty is not a string, aborting")}else throw q("toString is not a function");if(!fr.isSupported)return nt;if(Eo||b(Ce),fr.removed=[],typeof nt=="string"&&(Wn=!1),Wn){if(nt.nodeName){const Re=a(nt.nodeName);if(!Ge[Re]||Wr[Re])throw q("root node is forbidden and cannot be sanitized in-place")}}else if(nt instanceof Yt)bt=he("<!---->"),Gt=bt.ownerDocument.importNode(nt,!0),Gt.nodeType===ht.element&&Gt.nodeName==="BODY"||Gt.nodeName==="HTML"?bt=Gt:bt.appendChild(Gt);else{if(!ps&&!un&&!wa&&nt.indexOf("<")===-1)return as&&pa?as.createHTML(nt):nt;if(bt=he(nt),!bt)return ps?null:pa?Ws:""}bt&&ma&&F(bt.firstChild);const $t=we(Wn?nt:bt);for(;Et=$t.nextNode();)Fe(Et),ct(Et),Et.content instanceof Wt&&Ct(Et.content);if(Wn)return nt;if(ps){if(Na)for(dt=wn.call(bt.ownerDocument);bt.firstChild;)dt.appendChild(bt.firstChild);else dt=bt;return(Tr.shadowroot||Tr.shadowrootmode)&&(dt=Mr.call(nr,dt,!0)),dt}let ke=wa?bt.outerHTML:bt.innerHTML;return wa&&Ge["!doctype"]&&bt.ownerDocument&&bt.ownerDocument.doctype&&bt.ownerDocument.doctype.name&&de(ft,bt.ownerDocument.doctype.name)&&(ke="<!DOCTYPE "+bt.ownerDocument.doctype.name+`>
171`+ke),un&&M([ws,is,ea],Re=>{ke=oe(ke,Re," ")}),as&&pa?as.createHTML(ke):ke},fr.setConfig=function(){let nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};b(nt),Eo=!0},fr.clearConfig=function(){n=null,Eo=!1},fr.isValidAttribute=function(nt,Ce,bt){n||b({});const Gt=a(nt),Et=a(Ce);return Qe(Gt,Et,bt)},fr.addHook=function(nt,Ce){typeof Ce=="function"&&Y(Rr[nt],Ce)},fr.removeHook=function(nt,Ce){if(Ce!==void 0){const bt=B(Rr[nt],Ce);return bt===-1?void 0:J(Rr[nt],bt,1)[0]}return W(Rr[nt])},fr.removeHooks=function(nt){Rr[nt]=[]},fr.removeAllHooks=function(){Rr=Ft()},fr}var _t=lt()},
vendor: 9,994 bytes, line 171
171"./node_modules/fast-png/lib-esm/PngDecoder.js":function(w,O,t){t.r(O),t.d(O,{default:function(){return A}});var f=t("./node_modules/iobuffer/lib-esm/IOBuffer.js"),v=t("./node_modules/pako/dist/pako.esm.mjs"),m=t("./node_modules/fast-png/lib-esm/helpers/crc.js"),y=t("./node_modules/fast-png/lib-esm/helpers/decodeInterlaceAdam7.js"),C=t("./node_modules/fast-png/lib-esm/helpers/decodeInterlaceNull.js"),S=t("./node_modules/fast-png/lib-esm/helpers/signature.js"),g=t("./node_modules/fast-png/lib-esm/helpers/text.js"),j=t("./node_modules/fast-png/lib-esm/internalTypes.js");class A extends f.IOBuffer{constructor(W,Y={}){super(W);vn(this,"_checkCrc");vn(this,"_inflator");vn(this,"_png");vn(this,"_apng");vn(this,"_end");vn(this,"_hasPalette");vn(this,"_palette");vn(this,"_hasTransparency");vn(this,"_transparency");vn(this,"_compressionMethod");vn(this,"_filterMethod");vn(this,"_interlaceMethod");vn(this,"_colorType");vn(this,"_isAnimated");vn(this,"_numberOfFrames");vn(this,"_numberOfPlays");vn(this,"_frames");vn(this,"_writingDataChunks");const{checkCrc:J=!1}=Y;this._checkCrc=J,this._inflator=new v.Inflate,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=j.CompressionMethod.UNKNOWN,this._filterMethod=j.FilterMethod.UNKNOWN,this._interlaceMethod=j.InterlaceMethod.UNKNOWN,this._colorType=j.ColorType.UNKNOWN,this._isAnimated=!1,this._numberOfFrames=1,this._numberOfPlays=0,this._frames=[],this._writingDataChunks=!1,this.setBigEndian()}decode(){for((0,S.checkSignature)(this);!this._end;){const W=this.readUint32(),Y=this.readChars(4);this.decodeChunk(W,Y)}return this.decodeImage(),this._png}decodeApng(){for((0,S.checkSignature)(this);!this._end;){const W=this.readUint32(),Y=this.readChars(4);this.decodeApngChunk(W,Y)}return this.decodeApngImage(),this._apng}decodeChunk(W,Y){const J=this.offset;switch(Y){case"IHDR":this.decodeIHDR();break;case"PLTE":this.decodePLTE(W);break;case"IDAT":this.decodeIDAT(W);break;case"IEND":this._end=!0;break;case"tRNS":this.decodetRNS(W);break;case"iCCP":this.decodeiCCP(W);break;case g.textChunkName:(0,g.decodetEXt)(this._png.text,this,W);break;case"pHYs":this.decodepHYs();break;default:this.skip(W);break}if(this.offset-J!==W)throw new Error(`Length mismatch while decoding chunk ${Y}`);this._checkCrc?(0,m.checkCrc)(this,W+4,Y):this.skip(4)}decodeApngChunk(W,Y){const J=this.offset;switch(Y!=="fdAT"&&Y!=="IDAT"&&this._writingDataChunks&&this.pushDataToFrame(),Y){case"acTL":this.decodeACTL();break;case"fcTL":this.decodeFCTL();break;case"fdAT":this.decodeFDAT(W);break;default:this.decodeChunk(W,Y),this.offset=J+W;break}if(this.offset-J!==W)throw new Error(`Length mismatch while decoding chunk ${Y}`);this._checkCrc?(0,m.checkCrc)(this,W+4,Y):this.skip(4)}decodeIHDR(){const W=this._png;W.width=this.readUint32(),W.height=this.readUint32(),W.depth=I(this.readUint8());const Y=this.readUint8();this._colorType=Y;let J;switch(Y){case j.ColorType.GREYSCALE:J=1;break;case j.ColorType.TRUECOLOUR:J=3;break;case j.ColorType.INDEXED_COLOUR:J=1;break;case j.ColorType.GREYSCALE_ALPHA:J=2;break;case j.ColorType.TRUECOLOUR_ALPHA:J=4;break;case j.ColorType.UNKNOWN:default:throw new Error(`Unknown color type: ${Y}`)}if(this._png.channels=J,this._compressionMethod=this.readUint8(),this._compressionMethod!==j.CompressionMethod.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 W={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(W)}decodePLTE(W){if(W%3!==0)throw new RangeError(`PLTE field length must be a multiple of 3. Got ${W}`);const Y=W/3;this._hasPalette=!0;const J=[];this._palette=J;for(let le=0;le<Y;le++)J.push([this.readUint8(),this.readUint8(),this.readUint8()])}decodeIDAT(W){this._writingDataChunks=!0;const Y=W,J=this.offset+this.byteOffset;if(this._inflator.push(new Uint8Array(this.buffer,J,Y)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(W)}decodeFDAT(W){this._writingDataChunks=!0;let Y=W,J=this.offset+this.byteOffset;if(J+=4,Y-=4,this._inflator.push(new Uint8Array(this.buffer,J,Y)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(W)}decodetRNS(W){switch(this._colorType){case j.ColorType.GREYSCALE:case j.ColorType.TRUECOLOUR:{if(W%2!==0)throw new RangeError(`tRNS chunk length must be a multiple of 2. Got ${W}`);if(W/2>this._png.width*this._png.height)throw new Error(`tRNS chunk contains more alpha values than there are pixels (${W/2} vs ${this._png.width*this._png.height})`);this._hasTransparency=!0,this._transparency=new Uint16Array(W/2);for(let Y=0;Y<W/2;Y++)this._transparency[Y]=this.readUint16();break}case j.ColorType.INDEXED_COLOUR:{if(W>this._palette.length)throw new Error(`tRNS chunk contains more alpha values than there are palette colors (${W} vs ${this._palette.length})`);let Y=0;for(;Y<W;Y++){const J=this.readByte();this._palette[Y].push(J)}for(;Y<this._palette.length;Y++)this._palette[Y].push(255);break}case j.ColorType.UNKNOWN:case j.ColorType.GREYSCALE_ALPHA:case j.ColorType.TRUECOLOUR_ALPHA:default:throw new Error(`tRNS chunk is not supported for color type ${this._colorType}`)}}decodeiCCP(W){const Y=(0,g.readKeyword)(this),J=this.readUint8();if(J!==j.CompressionMethod.DEFLATE)throw new Error(`Unsupported iCCP compression method: ${J}`);const le=this.readBytes(W-Y.length-2);this._png.iccEmbeddedProfile={name:Y,profile:(0,v.inflate)(le)}}decodepHYs(){const W=this.readUint32(),Y=this.readUint32(),J=this.readByte();this._png.resolution={x:W,y:Y,unit:J}}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 W=0;W<this._numberOfFrames;W++){const Y={sequenceNumber:this._frames[W].sequenceNumber,delayNumber:this._frames[W].delayNumber,delayDenominator:this._frames[W].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)},J=this._frames.at(W);if(J){if(J.data=(0,C.decodeInterlaceNull)({data:J.data,width:J.width,height:J.height,channels:this._apng.channels,depth:this._apng.depth}),this._hasPalette&&(this._apng.palette=this._palette),this._hasTransparency&&(this._apng.transparency=this._transparency),W===0||J.xOffset===0&&J.yOffset===0&&J.width===this._png.width&&J.height===this._png.height)Y.data=J.data;else{const le=this._apng.frames.at(W-1);this.disposeFrame(J,le,Y),this.addFrameDataToCanvas(Y,J)}this._apng.frames.push(Y)}}return this._apng}disposeFrame(W,Y,J){switch(W.disposeOp){case j.DisposeOpType.NONE:break;case j.DisposeOpType.BACKGROUND:for(let le=0;le<this._png.height;le++)for(let ae=0;ae<this._png.width;ae++){const Z=(le*W.width+ae)*this._png.channels;for(let oe=0;oe<this._png.channels;oe++)J.data[Z+oe]=0}break;case j.DisposeOpType.PREVIOUS:J.data.set(Y.data);break;default:throw new Error("Unknown disposeOp")}}addFrameDataToCanvas(W,Y){const J=1<<this._png.depth,le=(ae,Z)=>{const oe=((ae+Y.yOffset)*this._png.width+Y.xOffset+Z)*this._png.channels,H=(ae*Y.width+Z)*this._png.channels;return{index:oe,frameIndex:H}};switch(Y.blendOp){case j.BlendOpType.SOURCE:for(let ae=0;ae<Y.height;ae++)for(let Z=0;Z<Y.width;Z++){const{index:oe,frameIndex:H}=le(ae,Z);for(let fe=0;fe<this._png.channels;fe++)W.data[oe+fe]=Y.data[H+fe]}break;case j.BlendOpType.OVER:for(let ae=0;ae<Y.height;ae++)for(let Z=0;Z<Y.width;Z++){const{index:oe,frameIndex:H}=le(ae,Z);for(let fe=0;fe<this._png.channels;fe++){const se=Y.data[H+this._png.channels-1]/J,de=fe%(this._png.channels-1)===0?1:Y.data[H+fe],q=Math.floor(se*de+(1-se)*W.data[oe+fe]);W.data[oe+fe]+=q}}break;default:throw new Error("Unknown blendOp")}}decodeImage(){var Y;if(this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);const W=this._isAnimated?((Y=this._frames)==null?void 0:Y.at(0)).data:this._inflator.result;if(this._filterMethod!==j.FilterMethod.ADAPTIVE)throw new Error(`Filter method ${this._filterMethod} not supported`);if(this._interlaceMethod===j.InterlaceMethod.NO_INTERLACE)this._png.data=(0,C.decodeInterlaceNull)({data:W,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else if(this._interlaceMethod===j.InterlaceMethod.ADAM7)this._png.data=(0,y.decodeInterlaceAdam7)({data:W,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 W=this._inflator.result,Y=this._frames.at(-1);Y?Y.data=W:this._frames.push({sequenceNumber:0,width:this._png.width,height:this._png.height,xOffset:0,yOffset:0,delayNumber:0,delayDenominator:0,disposeOp:j.DisposeOpType.NONE,blendOp:j.BlendOpType.SOURCE,data:W}),this._inflator=new v.Inflate,this._writingDataChunks=!1}}function I(M){if(M!==1&&M!==2&&M!==4&&M!==8&&M!==16)throw new Error(`invalid bit depth: ${M}`);return M}},
vendor: 4,615 bytes, line 171
171"./node_modules/fast-png/lib-esm/PngEncoder.js":function(w,O,t){t.r(O),t.d(O,{default:function(){return j}});var f=t("./node_modules/iobuffer/lib-esm/IOBuffer.js"),v=t("./node_modules/pako/dist/pako.esm.mjs"),m=t("./node_modules/fast-png/lib-esm/helpers/crc.js"),y=t("./node_modules/fast-png/lib-esm/helpers/signature.js"),C=t("./node_modules/fast-png/lib-esm/helpers/text.js"),S=t("./node_modules/fast-png/lib-esm/internalTypes.js");const g={level:3};class j extends f.IOBuffer{constructor(le,ae={}){super();vn(this,"_png");vn(this,"_zlibOptions");vn(this,"_colorType");vn(this,"_interlaceMethod");this._colorType=S.ColorType.UNKNOWN,this._zlibOptions={...g,...ae.zlib},this._png=this._checkData(le),this._interlaceMethod=(ae.interlace==="Adam7"?S.InterlaceMethod.ADAM7:S.InterlaceMethod.NO_INTERLACE)??S.InterlaceMethod.NO_INTERLACE,this.setBigEndian()}encode(){if((0,y.writeSignature)(this),this.encodeIHDR(),this._png.palette&&(this.encodePLTE(),this._png.palette[0].length===4&&this.encodeTRNS()),this.encodeData(),this._png.text)for(const[le,ae]of Object.entries(this._png.text))(0,C.encodetEXt)(this,le,ae);return this.encodeIEND(),this.toArray()}encodeIHDR(){this.writeUint32(13),this.writeChars("IHDR"),this.writeUint32(this._png.width),this.writeUint32(this._png.height),this.writeByte(this._png.depth),this.writeByte(this._colorType),this.writeByte(S.CompressionMethod.DEFLATE),this.writeByte(S.FilterMethod.ADAPTIVE),this.writeByte(this._interlaceMethod),(0,m.writeCrc)(this,17)}encodeIEND(){this.writeUint32(0),this.writeChars("IEND"),(0,m.writeCrc)(this,4)}encodePLTE(){var ae;const le=((ae=this._png.palette)==null?void 0:ae.length)*3;this.writeUint32(le),this.writeChars("PLTE");for(const Z of this._png.palette)this.writeByte(Z[0]),this.writeByte(Z[1]),this.writeByte(Z[2]);(0,m.writeCrc)(this,4+le)}encodeTRNS(){const le=this._png.palette.filter(ae=>ae.at(-1)!==255);this.writeUint32(le.length),this.writeChars("tRNS");for(const ae of le)this.writeByte(ae.at(-1));(0,m.writeCrc)(this,4+le.length)}encodeIDAT(le){this.writeUint32(le.length),this.writeChars("IDAT"),this.writeBytes(le),(0,m.writeCrc)(this,le.length+4)}encodeData(){const{width:le,height:ae,channels:Z,depth:oe,data:H}=this._png,fe=oe<=8?Math.ceil(le*oe/8)*Z:Math.ceil(le*oe/8*Z/2),se=new f.IOBuffer().setBigEndian();let de=0;if(this._interlaceMethod===S.InterlaceMethod.NO_INTERLACE)for(let ge=0;ge<ae;ge++)se.writeByte(0),oe===16?de=W(H,se,fe,de):de=M(H,se,fe,de);else this._interlaceMethod===S.InterlaceMethod.ADAM7&&(de=B(this._png,H,se,de));const q=se.toArray(),U=(0,v.deflate)(q,this._zlibOptions);this.encodeIDAT(U)}_checkData(le){const{colorType:ae,channels:Z,depth:oe}=I(le,le.palette),H={width:A(le.width,"width"),height:A(le.height,"height"),channels:Z,data:le.data,depth:oe,text:le.text,palette:le.palette};this._colorType=ae;const fe=oe<8?Math.ceil(H.width*oe/8)*H.height*Z:H.width*H.height*Z;if(H.data.length!==fe)throw new RangeError(`wrong data size. Found ${H.data.length}, expected ${fe}`);return H}}function A(Y,J){if(Number.isInteger(Y)&&Y>0)return Y;throw new TypeError(`${J} must be a positive integer`)}function I(Y,J){const{channels:le=4,depth:ae=8}=Y;if(le!==4&&le!==3&&le!==2&&le!==1)throw new RangeError(`unsupported number of channels: ${le}`);const Z={channels:le,depth:ae,colorType:S.ColorType.UNKNOWN};switch(le){case 4:Z.colorType=S.ColorType.TRUECOLOUR_ALPHA;break;case 3:Z.colorType=S.ColorType.TRUECOLOUR;break;case 1:J?Z.colorType=S.ColorType.INDEXED_COLOUR:Z.colorType=S.ColorType.GREYSCALE;break;case 2:Z.colorType=S.ColorType.GREYSCALE_ALPHA;break;default:throw new Error("unsupported number of channels")}return Z}function M(Y,J,le,ae){for(let Z=0;Z<le;Z++)J.writeByte(Y[ae++]);return ae}function B(Y,J,le,ae){const Z=[{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}],{width:oe,height:H,channels:fe,depth:se}=Y;let de=0;se===16?de=fe*se/8/2:de=fe*se/8;for(let q=0;q<7;q++){const U=Z[q],ge=Math.floor((oe-U.x+U.xStep-1)/U.xStep),Ee=Math.floor((H-U.y+U.yStep-1)/U.yStep);if(ge<=0||Ee<=0)continue;const Xe=ge*de;for(let re=0;re<Ee;re++){const Pe=U.y+re*U.yStep,ye=se<=8?new Uint8Array(Xe):new Uint16Array(Xe);let Se=0;for(let Le=0;Le<ge;Le++){const st=U.x+Le*U.xStep;if(st<oe&&Pe<H){const Ke=(Pe*oe+st)*de;for(let rt=0;rt<de;rt++)ye[Se++]=J[Ke+rt]}}if(le.writeByte(0),se===8)le.writeBytes(ye);else if(se===16)for(const Le of ye)le.writeByte(Le>>8&255),le.writeByte(Le&255)}}return ae}function W(Y,J,le,ae){for(let Z=0;Z<le;Z++)J.writeUint16(Y[ae++]);return ae}},
vendor: 920 bytes, line 171
171"./node_modules/fast-png/lib-esm/convertIndexedToRgb.js":function(w,O,t){t.r(O),t.d(O,{convertIndexedToRgb:function(){return f}});function f(m){const y=m.palette,C=m.depth;if(!y)throw new Error("Color palette is undefined.");v(m);const S=m.width*m.height,g=S*y[0].length,j=new Uint8Array(g);let A=0,I=0;const M=new Uint8Array(S);let B=255;switch(C){case 1:B=128;break;case 2:B=192;break;case 4:B=240;break;case 8:B=255;break;default:throw new Error("Incorrect depth value")}for(const W of m.data){let Y=B,J=8;for(;Y&&(J-=C,M[A++]=(W&Y)>>J,Y=Y>>C,A%m.width!==0););}if(m.palette)for(const W of M){const Y=m.palette.at(W);if(!Y)throw new Error("Incorrect index of palette color");j.set(Y,I),I+=Y.length}return j}function v(m){const y=m.depth<8?Math.ceil(m.width*m.depth/8)*m.height*m.channels:m.width*m.height*m.channels;if(m.data.length!==y)throw new RangeError(`wrong data size. Found ${m.data.length}, expected ${y}`)}},
vendor: 486 bytes, line 171
171"./node_modules/fast-png/lib-esm/helpers/applyUnfilter.js":function(w,O,t){t.r(O),t.d(O,{applyUnfilter:function(){return v}});var f=t("./node_modules/fast-png/lib-esm/helpers/unfilter.js");function v(m,y,C,S,g,j){switch(m){case 0:(0,f.unfilterNone)(y,C,g);break;case 1:(0,f.unfilterSub)(y,C,g,j);break;case 2:(0,f.unfilterUp)(y,C,S,g);break;case 3:(0,f.unfilterAverage)(y,C,S,g,j);break;case 4:(0,f.unfilterPaeth)(y,C,S,g,j);break;default:throw new Error(`Unsupported filter: ${m}`)}}},
vendor: 651 bytes, line 171
171"./node_modules/fast-png/lib-esm/helpers/crc.js":function(w,O,t){t.r(O),t.d(O,{checkCrc:function(){return C},writeCrc:function(){return S}});const f=[];for(let g=0;g<256;g++){let j=g;for(let A=0;A<8;A++)j&1?j=3988292384^j>>>1:j=j>>>1;f[g]=j}const v=4294967295;function m(g,j,A){let I=g;for(let M=0;M<A;M++)I=f[(I^j[M])&255]^I>>>8;return I}function y(g,j){return(m(v,g,j)^v)>>>0}function C(g,j,A){const I=g.readUint32(),M=y(new Uint8Array(g.buffer,g.byteOffset+g.offset-j-4,j),j);if(M!==I)throw new Error(`CRC mismatch for chunk ${A}. Expected ${I}, found ${M}`)}function S(g,j){g.writeUint32(y(new Uint8Array(g.buffer,g.byteOffset+g.offset-j,j),j))}},
vendor: 1,182 bytes, line 171
171"./node_modules/fast-png/lib-esm/helpers/decodeInterlaceAdam7.js":function(w,O,t){t.r(O),t.d(O,{decodeInterlaceAdam7:function(){return C}});var f=t("./node_modules/fast-png/lib-esm/helpers/applyUnfilter.js");const v=new Uint16Array([255]),y=new Uint8Array(v.buffer)[0]===255;function C(g){const{data:j,width:A,height:I,channels:M,depth:B}=g,W=[{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}],Y=Math.ceil(B/8)*M,J=new Uint8Array(I*A*Y);let le=0;for(let ae=0;ae<7;ae++){const Z=W[ae],oe=Math.ceil((A-Z.x)/Z.xStep),H=Math.ceil((I-Z.y)/Z.yStep);if(oe<=0||H<=0)continue;const fe=oe*Y,se=new Uint8Array(fe);for(let de=0;de<H;de++){const q=j[le++],U=j.subarray(le,le+fe);le+=fe;const ge=new Uint8Array(fe);(0,f.applyUnfilter)(q,U,ge,se,fe,Y),se.set(ge);for(let Ee=0;Ee<oe;Ee++){const Xe=Z.x+Ee*Z.xStep,re=Z.y+de*Z.yStep;if(!(Xe>=A||re>=I))for(let Pe=0;Pe<Y;Pe++)J[(re*A+Xe)*Y+Pe]=ge[Ee*Y+Pe]}}}if(B===16){const ae=new Uint16Array(J.buffer);if(y)for(let Z=0;Z<ae.length;Z++)ae[Z]=S(ae[Z]);return ae}else return J}function S(g){return(g&255)<<8|g>>8&255}},
vendor: 976 bytes, line 171
171"./node_modules/fast-png/lib-esm/helpers/decodeInterlaceNull.js":function(w,O,t){t.r(O),t.d(O,{decodeInterlaceNull:function(){return S}});var f=t("./node_modules/fast-png/lib-esm/helpers/unfilter.js");const v=new Uint16Array([255]),y=new Uint8Array(v.buffer)[0]===255,C=new Uint8Array(0);function S(j){const{data:A,width:I,height:M,channels:B,depth:W}=j,Y=Math.ceil(W/8)*B,J=Math.ceil(W/8*B*I),le=new Uint8Array(M*J);let ae=C,Z=0,oe,H;for(let fe=0;fe<M;fe++){switch(oe=A.subarray(Z+1,Z+1+J),H=le.subarray(fe*J,(fe+1)*J),A[Z]){case 0:(0,f.unfilterNone)(oe,H,J);break;case 1:(0,f.unfilterSub)(oe,H,J,Y);break;case 2:(0,f.unfilterUp)(oe,H,ae,J);break;case 3:(0,f.unfilterAverage)(oe,H,ae,J,Y);break;case 4:(0,f.unfilterPaeth)(oe,H,ae,J,Y);break;default:throw new Error(`Unsupported filter: ${A[Z]}`)}ae=H,Z+=J+1}if(W===16){const fe=new Uint16Array(le.buffer);if(y)for(let se=0;se<fe.length;se++)fe[se]=g(fe[se]);return fe}else return le}function g(j){return(j&255)<<8|j>>8&255}},
vendor: 462 bytes, line 171
171"./node_modules/fast-png/lib-esm/helpers/signature.js":function(w,O,t){t.r(O),t.d(O,{checkSignature:function(){return m},hasPngSignature:function(){return y},writeSignature:function(){return v}});const f=Uint8Array.of(137,80,78,71,13,10,26,10);function v(C){C.writeBytes(f)}function m(C){if(!y(C.readBytes(f.length)))throw new Error("wrong PNG signature")}function y(C){if(C.length<f.length)return!1;for(let S=0;S<f.length;S++)if(C[S]!==f[S])return!1;return!0}},
vendor: 957 bytes, line 171
171"./node_modules/fast-png/lib-esm/helpers/text.js":function(w,O,t){t.r(O),t.d(O,{decodetEXt:function(){return j},encodetEXt:function(){return A},readKeyword:function(){return I},readLatin1:function(){return M},textChunkName:function(){return v}});var f=t("./node_modules/fast-png/lib-esm/helpers/crc.js");const v="tEXt",m=0,y=new TextDecoder("latin1");function C(B){if(g(B),B.length===0||B.length>79)throw new Error("keyword length must be between 1 and 79")}const S=/^[\u0000-\u00FF]*$/;function g(B){if(!S.test(B))throw new Error("invalid latin1 text")}function j(B,W,Y){const J=I(W);B[J]=M(W,Y-J.length-1)}function A(B,W,Y){C(W),g(Y);const J=W.length+1+Y.length;B.writeUint32(J),B.writeChars(v),B.writeChars(W),B.writeByte(m),B.writeChars(Y),(0,f.writeCrc)(B,J+4)}function I(B){for(B.mark();B.readByte()!==m;);const W=B.offset;B.reset();const Y=y.decode(B.readBytes(W-B.offset-1));return B.skip(1),C(Y),Y}function M(B,W){return y.decode(B.readBytes(W))}},
vendor: 992 bytes, line 171
171"./node_modules/fast-png/lib-esm/helpers/unfilter.js":function(w,O,t){t.r(O),t.d(O,{unfilterAverage:function(){return y},unfilterNone:function(){return f},unfilterPaeth:function(){return C},unfilterSub:function(){return v},unfilterUp:function(){return m}});function f(g,j,A){for(let I=0;I<A;I++)j[I]=g[I]}function v(g,j,A,I){let M=0;for(;M<I;M++)j[M]=g[M];for(;M<A;M++)j[M]=g[M]+j[M-I]&255}function m(g,j,A,I){let M=0;if(A.length===0)for(;M<I;M++)j[M]=g[M];else for(;M<I;M++)j[M]=g[M]+A[M]&255}function y(g,j,A,I,M){let B=0;if(A.length===0){for(;B<M;B++)j[B]=g[B];for(;B<I;B++)j[B]=g[B]+(j[B-M]>>1)&255}else{for(;B<M;B++)j[B]=g[B]+(A[B]>>1)&255;for(;B<I;B++)j[B]=g[B]+(j[B-M]+A[B]>>1)&255}}function C(g,j,A,I,M){let B=0;if(A.length===0){for(;B<M;B++)j[B]=g[B];for(;B<I;B++)j[B]=g[B]+j[B-M]&255}else{for(;B<M;B++)j[B]=g[B]+A[B]&255;for(;B<I;B++)j[B]=g[B]+S(j[B-M],A[B],A[B-M])&255}}function S(g,j,A){const I=g+j-A,M=Math.abs(I-g),B=Math.abs(I-j),W=Math.abs(I-A);return M<=B&&M<=W?g:B<=W?j:A}},
vendor: 785 bytes, line 171
171"./node_modules/fast-png/lib-esm/index.js":function(w,O,t){t.r(O),t.d(O,{ResolutionUnitSpecifier:function(){return y.ResolutionUnitSpecifier},convertIndexedToRgb:function(){return C.convertIndexedToRgb},decode:function(){return S},decodeApng:function(){return j},encode:function(){return g},hasPngSignature:function(){return m.hasPngSignature}});var f=t("./node_modules/fast-png/lib-esm/PngDecoder.js"),v=t("./node_modules/fast-png/lib-esm/PngEncoder.js"),m=t("./node_modules/fast-png/lib-esm/helpers/signature.js"),y=t("./node_modules/fast-png/lib-esm/types.js"),C=t("./node_modules/fast-png/lib-esm/convertIndexedToRgb.js");function S(A,I){return new f.default(A,I).decode()}function g(A,I){return new v.default(A,I).encode()}function j(A,I){return new f.default(A,I).decodeApng()}},
vendor: 537 bytes, line 171
171"./node_modules/fast-png/lib-esm/internalTypes.js":function(w,O,t){t.r(O),t.d(O,{BlendOpType:function(){return S},ColorType:function(){return f},CompressionMethod:function(){return v},DisposeOpType:function(){return C},FilterMethod:function(){return m},InterlaceMethod:function(){return y}});const f={UNKNOWN:-1,GREYSCALE:0,TRUECOLOUR:2,INDEXED_COLOUR:3,GREYSCALE_ALPHA:4,TRUECOLOUR_ALPHA:6},v={UNKNOWN:-1,DEFLATE:0},m={UNKNOWN:-1,ADAPTIVE:0},y={UNKNOWN:-1,NO_INTERLACE:0,ADAM7:1},C={NONE:0,BACKGROUND:1,PREVIOUS:2},S={SOURCE:0,OVER:1}},
vendor: 199 bytes, line 171
171"./node_modules/fast-png/lib-esm/types.js":function(w,O,t){t.r(O),t.d(O,{ResolutionUnitSpecifier:function(){return f}});var f;(function(v){v[v.UNKNOWN=0]="UNKNOWN",v[v.METRE=1]="METRE"})(f||(f={}))},
vendor: 33,681 bytes, line 171
171"./node_modules/fflate/esm/browser.js":function(w,O,t){t.r(O),t.d(O,{AsyncCompress:function(){return Rr},AsyncDecompress:function(){return Sn},AsyncDeflate:function(){return or},AsyncGunzip:function(){return Ts},AsyncGzip:function(){return Rr},AsyncInflate:function(){return mn},AsyncUnzipInflate:function(){return Ja},AsyncUnzlib:function(){return Tr},AsyncZipDeflate:function(){return Qa},AsyncZlib:function(){return Ao},Compress:function(){return Mr},DecodeUTF8:function(){return wa},Decompress:function(){return Wr},Deflate:function(){return Er},EncodeUTF8:function(){return Eo},FlateErrorCode:function(){return ye},Gunzip:function(){return ea},Gzip:function(){return Mr},Inflate:function(){return Ms},Unzip:function(){return gt},UnzipInflate:function(){return va},UnzipPassThrough:function(){return Wa},Unzlib:function(){return ur},Zip:function(){return ga},ZipDeflate:function(){return Da},ZipPassThrough:function(){return Dn},Zlib:function(){return $a},compress:function(){return ws},compressSync:function(){return is},decompress:function(){return En},decompressSync:function(){return Nn},deflate:function(){return as},deflateSync:function(){return Ws},gunzip:function(){return Za},gunzipSync:function(){return qs},gzip:function(){return ws},gzipSync:function(){return is},inflate:function(){return wn},inflateSync:function(){return zt},strFromU8:function(){return ps},strToU8:function(){return ma},unzip:function(){return P},unzipSync:function(){return T},unzlib:function(){return ts},unzlibSync:function(){return Yr},zip:function(){return Kn},zipSync:function(){return ta},zlib:function(){return ao},zlibSync:function(){return Ge}});var f={},v=function(c,h,k,$,X){var pe=new Worker(f[h]||(f[h]=URL.createObjectURL(new Blob([c+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return pe.onmessage=function(Te){var a=Te.data,n=a.$e$;if(n){var l=new Error(n[0]);l.code=n[1],l.stack=n[2],X(l,null)}else X(null,a)},pe.postMessage(k,$),pe},m=Uint8Array,y=Uint16Array,C=Int32Array,S=new m([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]),g=new m([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]),j=new m([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),A=function(c,h){for(var k=new y(31),$=0;$<31;++$)k[$]=h+=1<<c[$-1];for(var X=new C(k[30]),$=1;$<30;++$)for(var pe=k[$];pe<k[$+1];++pe)X[pe]=pe-k[$]<<5|$;return{b:k,r:X}},I=A(S,2),M=I.b,B=I.r;M[28]=258,B[258]=28;for(var W=A(g,0),Y=W.b,J=W.r,le=new y(32768),ae=0;ae<32768;++ae){var Z=(ae&43690)>>1|(ae&21845)<<1;Z=(Z&52428)>>2|(Z&13107)<<2,Z=(Z&61680)>>4|(Z&3855)<<4,le[ae]=((Z&65280)>>8|(Z&255)<<8)>>1}for(var oe=function(c,h,k){for(var $=c.length,X=0,pe=new y(h);X<$;++X)c[X]&&++pe[c[X]-1];var Te=new y(h);for(X=1;X<h;++X)Te[X]=Te[X-1]+pe[X-1]<<1;var a;if(k){a=new y(1<<h);var n=15-h;for(X=0;X<$;++X)if(c[X])for(var l=X<<4|c[X],p=h-c[X],b=Te[c[X]-1]++<<p,E=b|(1<<p)-1;b<=E;++b)a[le[b]>>n]=l}else for(a=new y($),X=0;X<$;++X)c[X]&&(a[X]=le[Te[c[X]-1]++]>>15-c[X]);return a},H=new m(288),ae=0;ae<144;++ae)H[ae]=8;for(var ae=144;ae<256;++ae)H[ae]=9;for(var ae=256;ae<280;++ae)H[ae]=7;for(var ae=280;ae<288;++ae)H[ae]=8;for(var fe=new m(32),ae=0;ae<32;++ae)fe[ae]=5;var se=oe(H,9,0),de=oe(H,9,1),q=oe(fe,5,0),U=oe(fe,5,1),ge=function(c){for(var h=c[0],k=1;k<c.length;++k)c[k]>h&&(h=c[k]);return h},Ee=function(c,h,k){var $=h/8|0;return(c[$]|c[$+1]<<8)>>(h&7)&k},Xe=function(c,h){var k=h/8|0;return(c[k]|c[k+1]<<8|c[k+2]<<16)>>(h&7)},re=function(c){return(c+7)/8|0},Pe=function(c,h,k){return(h==null||h<0)&&(h=0),(k==null||k>c.length)&&(k=c.length),new m(c.subarray(h,k))},ye={UnexpectedEOF:0,InvalidBlockType:1,InvalidLengthLiteral:2,InvalidDistance:3,StreamFinished:4,NoStreamHandler:5,InvalidHeader:6,NoCallback:7,InvalidUTF8:8,ExtraFieldTooLong:9,InvalidDate:10,FilenameTooLong:11,StreamFinishing:12,InvalidZipData:13,UnknownCompressionMethod:14},Se=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Le=function(c,h,k){var $=new Error(h||Se[c]);if($.code=c,Error.captureStackTrace&&Error.captureStackTrace($,Le),!k)throw $;return $},st=function(c,h,k,$){var X=c.length,pe=$?$.length:0;if(!X||h.f&&!h.l)return k||new m(0);var Te=!k,a=Te||h.i!=2,n=h.i;Te&&(k=new m(X*3));var l=function(qe){var yt=k.length;if(qe>yt){var Nt=new m(Math.max(yt*2,qe));Nt.set(k),k=Nt}},p=h.f||0,b=h.p||0,E=h.b||0,V=h.l,R=h.d,F=h.m,Q=h.n,he=X*8;do{if(!V){p=Ee(c,b,1);var we=Ee(c,b+1,3);if(b+=3,we)if(we==1)V=de,R=U,F=9,Q=5;else if(we==2){var Fe=Ee(c,b,31)+257,Qe=Ee(c,b+10,15)+4,Ae=Fe+Ee(c,b+5,31)+1;b+=14;for(var ct=new m(Ae),Ct=new m(19),nt=0;nt<Qe;++nt)Ct[j[nt]]=Ee(c,b+nt*3,7);b+=Qe*3;for(var Ce=ge(Ct),bt=(1<<Ce)-1,Gt=oe(Ct,Ce,1),nt=0;nt<Ae;){var Et=Gt[Ee(c,b,bt)];b+=Et&15;var Oe=Et>>4;if(Oe<16)ct[nt++]=Oe;else{var dt=0,$t=0;for(Oe==16?($t=3+Ee(c,b,3),b+=2,dt=ct[nt-1]):Oe==17?($t=3+Ee(c,b,7),b+=3):Oe==18&&($t=11+Ee(c,b,127),b+=7);$t--;)ct[nt++]=dt}}var ke=ct.subarray(0,Fe),Re=ct.subarray(Fe);F=ge(ke),Q=ge(Re),V=oe(ke,F,1),R=oe(Re,Q,1)}else Le(1);else{var Oe=re(b)+4,K=c[Oe-4]|c[Oe-3]<<8,Je=Oe+K;if(Je>X){n&&Le(0);break}a&&l(E+K),k.set(c.subarray(Oe,Je),E),h.b=E+=K,h.p=b=Je*8,h.f=p;continue}if(b>he){n&&Le(0);break}}a&&l(E+131072);for(var at=(1<<F)-1,ot=(1<<Q)-1,Ut=b;;Ut=b){var dt=V[Xe(c,b)&at],Xt=dt>>4;if(b+=dt&15,b>he){n&&Le(0);break}if(dt||Le(2),Xt<256)k[E++]=Xt;else if(Xt==256){Ut=b,V=null;break}else{var er=Xt-254;if(Xt>264){var nt=Xt-257,Pt=S[nt];er=Ee(c,b,(1<<Pt)-1)+M[nt],b+=Pt}var Qt=R[Xe(c,b)&ot],kr=Qt>>4;Qt||Le(3),b+=Qt&15;var Re=Y[kr];if(kr>3){var Pt=g[kr];Re+=Xe(c,b)&(1<<Pt)-1,b+=Pt}if(b>he){n&&Le(0);break}a&&l(E+131072);var Nr=E+er;if(E<Re){var xe=pe-Re,Ve=Math.min(Re,Nr);for(xe+E<0&&Le(3);E<Ve;++E)k[E]=$[xe+E]}for(;E<Nr;++E)k[E]=k[E-Re]}}h.l=V,h.p=Ut,h.b=E,h.f=p,V&&(p=1,h.m=F,h.d=R,h.n=Q)}while(!p);return E!=k.length&&Te?Pe(k,0,E):k.subarray(0,E)},Ke=function(c,h,k){k<<=h&7;var $=h/8|0;c[$]|=k,c[$+1]|=k>>8},rt=function(c,h,k){k<<=h&7;var $=h/8|0;c[$]|=k,c[$+1]|=k>>8,c[$+2]|=k>>16},xt=function(c,h){for(var k=[],$=0;$<c.length;++$)c[$]&&k.push({s:$,f:c[$]});var X=k.length,pe=k.slice();if(!X)return{t:yr,l:0};if(X==1){var Te=new m(k[0].s+1);return Te[k[0].s]=1,{t:Te,l:1}}k.sort(function(Je,Fe){return Je.f-Fe.f}),k.push({s:-1,f:25001});var a=k[0],n=k[1],l=0,p=1,b=2;for(k[0]={s:-1,f:a.f+n.f,l:a,r:n};p!=X-1;)a=k[k[l].f<k[b].f?l++:b++],n=k[l!=p&&k[l].f<k[b].f?l++:b++],k[p++]={s:-1,f:a.f+n.f,l:a,r:n};for(var E=pe[0].s,$=1;$<X;++$)pe[$].s>E&&(E=pe[$].s);var V=new y(E+1),R=He(k[p-1],V,0);if(R>h){var $=0,F=0,Q=R-h,he=1<<Q;for(pe.sort(function(Fe,Qe){return V[Qe.s]-V[Fe.s]||Fe.f-Qe.f});$<X;++$){var we=pe[$].s;if(V[we]>h)F+=he-(1<<R-V[we]),V[we]=h;else break}for(F>>=Q;F>0;){var Oe=pe[$].s;V[Oe]<h?F-=1<<h-V[Oe]++-1:++$}for(;$>=0&&F;--$){var K=pe[$].s;V[K]==h&&(--V[K],++F)}R=h}return{t:new m(V),l:R}},He=function(c,h,k){return c.s==-1?Math.max(He(c.l,h,k+1),He(c.r,h,k+1)):h[c.s]=k},Tt=function(c){for(var h=c.length;h&&!c[--h];);for(var k=new y(++h),$=0,X=c[0],pe=1,Te=function(n){k[$++]=n},a=1;a<=h;++a)if(c[a]==X&&a!=h)++pe;else{if(!X&&pe>2){for(;pe>138;pe-=138)Te(32754);pe>2&&(Te(pe>10?pe-11<<5|28690:pe-3<<5|12305),pe=0)}else if(pe>3){for(Te(X),--pe;pe>6;pe-=6)Te(8304);pe>2&&(Te(pe-3<<5|8208),pe=0)}for(;pe--;)Te(X);pe=1,X=c[a]}return{c:k.subarray(0,$),n:h}},Kt=function(c,h){for(var k=0,$=0;$<h.length;++$)k+=c[$]*h[$];return k},Jt=function(c,h,k){var $=k.length,X=re(h+2);c[X]=$&255,c[X+1]=$>>8,c[X+2]=c[X]^255,c[X+3]=c[X+1]^255;for(var pe=0;pe<$;++pe)c[X+pe+4]=k[pe];return(X+4+$)*8},rr=function(c,h,k,$,X,pe,Te,a,n,l,p){Ke(h,p++,k),++X[256];for(var b=xt(X,15),E=b.t,V=b.l,R=xt(pe,15),F=R.t,Q=R.l,he=Tt(E),we=he.c,Oe=he.n,K=Tt(F),Je=K.c,Fe=K.n,Qe=new y(19),Ae=0;Ae<we.length;++Ae)++Qe[we[Ae]&31];for(var Ae=0;Ae<Je.length;++Ae)++Qe[Je[Ae]&31];for(var ct=xt(Qe,7),Ct=ct.t,nt=ct.l,Ce=19;Ce>4&&!Ct[j[Ce-1]];--Ce);var bt=l+5<<3,Gt=Kt(X,H)+Kt(pe,fe)+Te,Et=Kt(X,E)+Kt(pe,F)+Te+14+3*Ce+Kt(Qe,Ct)+2*Qe[16]+3*Qe[17]+7*Qe[18];if(n>=0&&bt<=Gt&&bt<=Et)return Jt(h,p,c.subarray(n,n+l));var dt,$t,ke,Re;if(Ke(h,p,1+(Et<Gt)),p+=2,Et<Gt){dt=oe(E,V,0),$t=E,ke=oe(F,Q,0),Re=F;var at=oe(Ct,nt,0);Ke(h,p,Oe-257),Ke(h,p+5,Fe-1),Ke(h,p+10,Ce-4),p+=14;for(var Ae=0;Ae<Ce;++Ae)Ke(h,p+3*Ae,Ct[j[Ae]]);p+=3*Ce;for(var ot=[we,Je],Ut=0;Ut<2;++Ut)for(var Xt=ot[Ut],Ae=0;Ae<Xt.length;++Ae){var er=Xt[Ae]&31;Ke(h,p,at[er]),p+=Ct[er],er>15&&(Ke(h,p,Xt[Ae]>>5&127),p+=Xt[Ae]>>12)}}else dt=se,$t=H,ke=q,Re=fe;for(var Ae=0;Ae<a;++Ae){var Pt=$[Ae];if(Pt>255){var er=Pt>>18&31;rt(h,p,dt[er+257]),p+=$t[er+257],er>7&&(Ke(h,p,Pt>>23&31),p+=S[er]);var Qt=Pt&31;rt(h,p,ke[Qt]),p+=Re[Qt],Qt>3&&(rt(h,p,Pt>>5&8191),p+=g[Qt])}else rt(h,p,dt[Pt]),p+=$t[Pt]}return rt(h,p,dt[256]),p+$t[256]},Ht=new C([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),yr=new m(0),gr=function(c,h,k,$,X,pe){var Te=pe.z||c.length,a=new m($+Te+5*(1+Math.ceil(Te/7e3))+X),n=a.subarray($,a.length-X),l=pe.l,p=(pe.r||0)&7;if(h){p&&(n[0]=pe.r>>3);for(var b=Ht[h-1],E=b>>13,V=b&8191,R=(1<<k)-1,F=pe.p||new y(32768),Q=pe.h||new y(R+1),he=Math.ceil(k/3),we=2*he,Oe=function(Ot){return(c[Ot]^c[Ot+1]<<he^c[Ot+2]<<we)&R},K=new C(25e3),Je=new y(288),Fe=new y(32),Qe=0,Ae=0,ct=pe.i||0,Ct=0,nt=pe.w||0,Ce=0;ct+2<Te;++ct){var bt=Oe(ct),Gt=ct&32767,Et=Q[bt];if(F[Gt]=Et,Q[bt]=Gt,nt<=ct){var dt=Te-ct;if((Qe>7e3||Ct>24576)&&(dt>423||!l)){p=rr(c,n,0,K,Je,Fe,Ae,Ct,Ce,ct-Ce,p),Ct=Qe=Ae=0,Ce=ct;for(var $t=0;$t<286;++$t)Je[$t]=0;for(var $t=0;$t<30;++$t)Fe[$t]=0}var ke=2,Re=0,at=V,ot=Gt-Et&32767;if(dt>2&&bt==Oe(ct-ot))for(var Ut=Math.min(E,dt)-1,Xt=Math.min(32767,ct),er=Math.min(258,dt);ot<=Xt&&--at&&Gt!=Et;){if(c[ct+ke]==c[ct+ke-ot]){for(var Pt=0;Pt<er&&c[ct+Pt]==c[ct+Pt-ot];++Pt);if(Pt>ke){if(ke=Pt,Re=ot,Pt>Ut)break;for(var Qt=Math.min(ot,Pt-2),kr=0,$t=0;$t<Qt;++$t){var Nr=ct-ot+$t&32767,xe=F[Nr],Ve=Nr-xe&32767;Ve>kr&&(kr=Ve,Et=Nr)}}}Gt=Et,Et=F[Gt],ot+=Gt-Et&32767}if(Re){K[Ct++]=268435456|B[ke]<<18|J[Re];var qe=B[ke]&31,yt=J[Re]&31;Ae+=S[qe]+g[yt],++Je[257+qe],++Fe[yt],nt=ct+ke,++Qe}else K[Ct++]=c[ct],++Je[c[ct]]}}for(ct=Math.max(ct,nt);ct<Te;++ct)K[Ct++]=c[ct],++Je[c[ct]];p=rr(c,n,l,K,Je,Fe,Ae,Ct,Ce,ct-Ce,p),l||(pe.r=p&7|n[p/8|0]<<3,p-=7,pe.h=Q,pe.p=F,pe.i=ct,pe.w=nt)}else{for(var ct=pe.w||0;ct<Te+l;ct+=65535){var Nt=ct+65535;Nt>=Te&&(n[p/8|0]=l,Nt=Te),p=Jt(n,p+1,c.subarray(ct,Nt))}pe.i=Te}return Pe(a,0,$+re(p)+X)},Vr=function(){for(var c=new Int32Array(256),h=0;h<256;++h){for(var k=h,$=9;--$;)k=(k&1&&-306674912)^k>>>1;c[h]=k}return c}(),jr=function(){var c=-1;return{p:function(h){for(var k=c,$=0;$<h.length;++$)k=Vr[k&255^h[$]]^k>>>8;c=k},d:function(){return~c}}},Xr=function(){var c=1,h=0;return{p:function(k){for(var $=c,X=h,pe=k.length|0,Te=0;Te!=pe;){for(var a=Math.min(Te+2655,pe);Te<a;++Te)X+=$+=k[Te];$=($&65535)+15*($>>16),X=(X&65535)+15*(X>>16)}c=$,h=X},d:function(){return c%=65521,h%=65521,(c&255)<<24|(c&65280)<<8|(h&255)<<8|h>>8}}},et=function(c,h,k,$,X){if(!X&&(X={l:1},h.dictionary)){var pe=h.dictionary.subarray(-32768),Te=new m(pe.length+c.length);Te.set(pe),Te.set(c,pe.length),c=Te,X.w=pe.length}return gr(c,h.level==null?6:h.level,h.mem==null?X.l?Math.ceil(Math.max(8,Math.min(13,Math.log(c.length)))*1.5):20:12+h.mem,k,$,X)},ft=function(c,h){var k={};for(var $ in c)k[$]=c[$];for(var $ in h)k[$]=h[$];return k},je=function(c,h,k){for(var $=c(),X=c.toString(),pe=X.slice(X.indexOf("[")+1,X.lastIndexOf("]")).replace(/\s+/g,"").split(","),Te=0;Te<$.length;++Te){var a=$[Te],n=pe[Te];if(typeof a=="function"){h+=";"+n+"=";var l=a.toString();if(a.prototype)if(l.indexOf("[native code]")!=-1){var p=l.indexOf(" ",8)+1;h+=l.slice(p,l.indexOf("(",p))}else{h+=l;for(var b in a.prototype)h+=";"+n+".prototype."+b+"="+a.prototype[b].toString()}else h+=l}else k[n]=a}return h},$e=[],ht=function(c){var h=[];for(var k in c)c[k].buffer&&h.push((c[k]=new c[k].constructor(c[k])).buffer);return h},tt=function(c,h,k,$){if(!$e[k]){for(var X="",pe={},Te=c.length-1,a=0;a<Te;++a)X=je(c[a],X,pe);$e[k]={c:je(c[Te],X,pe),e:pe}}var n=ft({},$e[k].e);return v($e[k].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+h.toString()+"}",k,n,ht(n),$)},Ze=function(){return[m,y,C,S,g,j,M,Y,de,U,le,Se,oe,ge,Ee,Xe,re,Pe,Le,st,zt,It,nr]},Ft=function(){return[m,y,C,S,g,j,B,J,se,H,q,fe,le,Ht,yr,oe,Ke,rt,xt,He,Tt,Kt,Jt,rr,re,Pe,gr,et,Ws,It]},lt=function(){return[lr,Ur,Vt,jr,Vr]},_t=function(){return[xr,Pr]},dr=function(){return[yn,Vt,Xr]},fr=function(){return[vt]},It=function(c){return postMessage(c,[c.buffer])},nr=function(c){return c&&{out:c.size&&new m(c.size),dictionary:c.dictionary}},Cr=function(c,h,k,$,X,pe){var Te=tt(k,$,X,function(a,n){Te.terminate(),pe(a,n)});return Te.postMessage([c,h],h.consume?[c.buffer]:[]),function(){Te.terminate()}},Wt=function(c){return c.ondata=function(h,k){return postMessage([h,k],[h.buffer])},function(h){h.data.length?(c.push(h.data[0],h.data[1]),postMessage([h.data[0].length])):c.flush()}},Ir=function(c,h,k,$,X,pe,Te){var a,n=tt(c,$,X,function(l,p){l?(n.terminate(),h.ondata.call(h,l)):Array.isArray(p)?p.length==1?(h.queuedSize-=p[0],h.ondrain&&h.ondrain(p[0])):(p[1]&&n.terminate(),h.ondata.call(h,l,p[0],p[1])):Te(p)});n.postMessage(k),h.queuedSize=0,h.push=function(l,p){h.ondata||Le(5),a&&h.ondata(Le(4,0,1),null,!!p),h.queuedSize+=l.length,n.postMessage([l,a=p],[l.buffer])},h.terminate=function(){n.terminate()},pe&&(h.flush=function(){n.postMessage([])})},Yt=function(c,h){return c[h]|c[h+1]<<8},zr=function(c,h){return(c[h]|c[h+1]<<8|c[h+2]<<16|c[h+3]<<24)>>>0},Ye=function(c,h){return zr(c,h)+zr(c,h+4)*4294967296},Vt=function(c,h,k){for(;k;++h)c[h]=k,k>>>=8},lr=function(c,h){var k=h.filename;if(c[0]=31,c[1]=139,c[2]=8,c[8]=h.level<2?4:h.level==9?2:0,c[9]=3,h.mtime!=0&&Vt(c,4,Math.floor(new Date(h.mtime||Date.now())/1e3)),k){c[3]=8;for(var $=0;$<=k.length;++$)c[$+10]=k.charCodeAt($)}},xr=function(c){(c[0]!=31||c[1]!=139||c[2]!=8)&&Le(6,"invalid gzip data");var h=c[3],k=10;h&4&&(k+=(c[10]|c[11]<<8)+2);for(var $=(h>>3&1)+(h>>4&1);$>0;$-=!c[k++]);return k+(h&2)},Pr=function(c){var h=c.length;return(c[h-4]|c[h-3]<<8|c[h-2]<<16|c[h-1]<<24)>>>0},Ur=function(c){return 10+(c.filename?c.filename.length+1:0)},yn=function(c,h){var k=h.level,$=k==0?0:k<6?1:k==9?3:2;if(c[0]=120,c[1]=$<<6|(h.dictionary&&32),c[1]|=31-(c[0]<<8|c[1])%31,h.dictionary){var X=Xr();X.p(h.dictionary),Vt(c,2,X.d())}},vt=function(c,h){return((c[0]&15)!=8||c[0]>>4>7||(c[0]<<8|c[1])%31)&&Le(6,"invalid zlib data"),(c[1]>>5&1)==+!h&&Le(6,"invalid zlib data: "+(c[1]&32?"need":"unexpected")+" dictionary"),(c[1]>>3&4)+2};function Lr(c,h){return typeof c=="function"&&(h=c,c={}),this.ondata=h,c}var Er=function(){function c(h,k){if(typeof h=="function"&&(k=h,h={}),this.ondata=k,this.o=h||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new m(98304),this.o.dictionary){var $=this.o.dictionary.subarray(-32768);this.b.set($,32768-$.length),this.s.i=32768-$.length}}return c.prototype.p=function(h,k){this.ondata(et(h,this.o,0,0,this.s),k)},c.prototype.push=function(h,k){this.ondata||Le(5),this.s.l&&Le(4);var $=h.length+this.s.z;if($>this.b.length){if($>2*this.b.length-32768){var X=new m($&-32768);X.set(this.b.subarray(0,this.s.z)),this.b=X}var pe=this.b.length-this.s.z;this.b.set(h.subarray(0,pe),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(h.subarray(pe),32768),this.s.z=h.length-pe+32768,this.s.i=32766,this.s.w=32768}else this.b.set(h,this.s.z),this.s.z+=h.length;this.s.l=k&1,(this.s.z>this.s.w+8191||k)&&(this.p(this.b,k||!1),this.s.w=this.s.i,this.s.i-=2)},c.prototype.flush=function(){this.ondata||Le(5),this.s.l&&Le(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2},c}(),or=function(){function c(h,k){Ir([Ft,function(){return[Wt,Er]}],this,Lr.call(this,h,k),function($){var X=new Er($.data);onmessage=Wt(X)},6,1)}return c}();function as(c,h,k){return k||(k=h,h={}),typeof k!="function"&&Le(7),Cr(c,h,[Ft],function($){return It(Ws($.data[0],$.data[1]))},0,k)}function Ws(c,h){return et(c,h||{},0,0)}var Ms=function(){function c(h,k){typeof h=="function"&&(k=h,h={}),this.ondata=k;var $=h&&h.dictionary&&h.dictionary.subarray(-32768);this.s={i:0,b:$?$.length:0},this.o=new m(32768),this.p=new m(0),$&&this.o.set($)}return c.prototype.e=function(h){if(this.ondata||Le(5),this.d&&Le(4),!this.p.length)this.p=h;else if(h.length){var k=new m(this.p.length+h.length);k.set(this.p),k.set(h,this.p.length),this.p=k}},c.prototype.c=function(h){this.s.i=+(this.d=h||!1);var k=this.s.b,$=st(this.p,this.s,this.o);this.ondata(Pe($,k,this.s.b),this.d),this.o=Pe($,this.s.b-32768),this.s.b=this.o.length,this.p=Pe(this.p,this.s.p/8|0),this.s.p&=7},c.prototype.push=function(h,k){this.e(h),this.c(k)},c}(),mn=function(){function c(h,k){Ir([Ze,function(){return[Wt,Ms]}],this,Lr.call(this,h,k),function($){var X=new Ms($.data);onmessage=Wt(X)},7,0)}return c}();function wn(c,h,k){return k||(k=h,h={}),typeof k!="function"&&Le(7),Cr(c,h,[Ze],function($){return It(zt($.data[0],nr($.data[1])))},1,k)}function zt(c,h){return st(c,{i:2},h&&h.out,h&&h.dictionary)}var Mr=function(){function c(h,k){this.c=jr(),this.l=0,this.v=1,Er.call(this,h,k)}return c.prototype.push=function(h,k){this.c.p(h),this.l+=h.length,Er.prototype.push.call(this,h,k)},c.prototype.p=function(h,k){var $=et(h,this.o,this.v&&Ur(this.o),k&&8,this.s);this.v&&(lr($,this.o),this.v=0),k&&(Vt($,$.length-8,this.c.d()),Vt($,$.length-4,this.l)),this.ondata($,k)},c.prototype.flush=function(){Er.prototype.flush.call(this)},c}(),Rr=function(){function c(h,k){Ir([Ft,lt,function(){return[Wt,Er,Mr]}],this,Lr.call(this,h,k),function($){var X=new Mr($.data);onmessage=Wt(X)},8,1)}return c}();function ws(c,h,k){return k||(k=h,h={}),typeof k!="function"&&Le(7),Cr(c,h,[Ft,lt,function(){return[is]}],function($){return It(is($.data[0],$.data[1]))},2,k)}function is(c,h){h||(h={});var k=jr(),$=c.length;k.p(c);var X=et(c,h,Ur(h),8),pe=X.length;return lr(X,h),Vt(X,pe-8,k.d()),Vt(X,pe-4,$),X}var ea=function(){function c(h,k){this.v=1,this.r=0,Ms.call(this,h,k)}return c.prototype.push=function(h,k){if(Ms.prototype.e.call(this,h),this.r+=h.length,this.v){var $=this.p.subarray(this.v-1),X=$.length>3?xr($):4;if(X>$.length){if(!k)return}else this.v>1&&this.onmember&&this.onmember(this.r-$.length);this.p=$.subarray(X),this.v=0}Ms.prototype.c.call(this,k),this.s.f&&!this.s.l&&!k&&(this.v=re(this.s.p)+9,this.s={i:0},this.o=new m(0),this.push(new m(0),k))},c}(),Ts=function(){function c(h,k){var $=this;Ir([Ze,_t,function(){return[Wt,Ms,ea]}],this,Lr.call(this,h,k),function(X){var pe=new ea(X.data);pe.onmember=function(Te){return postMessage(Te)},onmessage=Wt(pe)},9,0,function(X){return $.onmember&&$.onmember(X)})}return c}();function Za(c,h,k){return k||(k=h,h={}),typeof k!="function"&&Le(7),Cr(c,h,[Ze,_t,function(){return[qs]}],function($){return It(qs($.data[0],$.data[1]))},3,k)}function qs(c,h){var k=xr(c);return k+8>c.length&&Le(6,"invalid gzip data"),st(c.subarray(k,-8),{i:2},h&&h.out||new m(Pr(c)),h&&h.dictionary)}var $a=function(){function c(h,k){this.c=Xr(),this.v=1,Er.call(this,h,k)}return c.prototype.push=function(h,k){this.c.p(h),Er.prototype.push.call(this,h,k)},c.prototype.p=function(h,k){var $=et(h,this.o,this.v&&(this.o.dictionary?6:2),k&&4,this.s);this.v&&(yn($,this.o),this.v=0),k&&Vt($,$.length-4,this.c.d()),this.ondata($,k)},c.prototype.flush=function(){Er.prototype.flush.call(this)},c}(),Ao=function(){function c(h,k){Ir([Ft,dr,function(){return[Wt,Er,$a]}],this,Lr.call(this,h,k),function($){var X=new $a($.data);onmessage=Wt(X)},10,1)}return c}();function ao(c,h,k){return k||(k=h,h={}),typeof k!="function"&&Le(7),Cr(c,h,[Ft,dr,function(){return[Ge]}],function($){return It(Ge($.data[0],$.data[1]))},4,k)}function Ge(c,h){h||(h={});var k=Xr();k.p(c);var $=et(c,h,h.dictionary?6:2,4);return yn($,h),Vt($,$.length-4,k.d()),$}var ur=function(){function c(h,k){Ms.call(this,h,k),this.v=h&&h.dictionary?2:1}return c.prototype.push=function(h,k){if(Ms.prototype.e.call(this,h),this.v){if(this.p.length<6&&!k)return;this.p=this.p.subarray(vt(this.p,this.v-1)),this.v=0}k&&(this.p.length<4&&Le(6,"invalid zlib data"),this.p=this.p.subarray(0,-4)),Ms.prototype.c.call(this,k)},c}(),Tr=function(){function c(h,k){Ir([Ze,fr,function(){return[Wt,Ms,ur]}],this,Lr.call(this,h,k),function($){var X=new ur($.data);onmessage=Wt(X)},11,0)}return c}();function ts(c,h,k){return k||(k=h,h={}),typeof k!="function"&&Le(7),Cr(c,h,[Ze,fr,function(){return[Yr]}],function($){return It(Yr($.data[0],nr($.data[1])))},5,k)}function Yr(c,h){return st(c.subarray(vt(c,h&&h.dictionary),-4),{i:2},h&&h.out,h&&h.dictionary)}var Wr=function(){function c(h,k){this.o=Lr.call(this,h,k)||{},this.G=ea,this.I=Ms,this.Z=ur}return c.prototype.i=function(){var h=this;this.s.ondata=function(k,$){h.ondata(k,$)}},c.prototype.push=function(h,k){if(this.ondata||Le(5),this.s)this.s.push(h,k);else{if(this.p&&this.p.length){var $=new m(this.p.length+h.length);$.set(this.p),$.set(h,this.p.length)}else this.p=h;this.p.length>2&&(this.s=this.p[0]==31&&this.p[1]==139&&this.p[2]==8?new this.G(this.o):(this.p[0]&15)!=8||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(this.o):new this.Z(this.o),this.i(),this.s.push(this.p,k),this.p=null)}},c}(),Sn=function(){function c(h,k){Wr.call(this,h,k),this.queuedSize=0,this.G=Ts,this.I=mn,this.Z=Tr}return c.prototype.i=function(){var h=this;this.s.ondata=function(k,$,X){h.ondata(k,$,X)},this.s.ondrain=function(k){h.queuedSize-=k,h.ondrain&&h.ondrain(k)}},c.prototype.push=function(h,k){this.queuedSize+=h.length,Wr.prototype.push.call(this,h,k)},c}();function En(c,h,k){return k||(k=h,h={}),typeof k!="function"&&Le(7),c[0]==31&&c[1]==139&&c[2]==8?Za(c,h,k):(c[0]&15)!=8||c[0]>>4>7||(c[0]<<8|c[1])%31?wn(c,h,k):ts(c,h,k)}function Nn(c,h){return c[0]==31&&c[1]==139&&c[2]==8?qs(c,h):(c[0]&15)!=8||c[0]>>4>7||(c[0]<<8|c[1])%31?zt(c,h):Yr(c,h)}var kn=function(c,h,k,$){for(var X in c){var pe=c[X],Te=h+X,a=$;Array.isArray(pe)&&(a=ft($,pe[1]),pe=pe[0]),pe instanceof m?k[Te]=[pe,a]:(k[Te+="/"]=[new m(0),a],kn(pe,Te,k,$))}},dn=typeof TextEncoder<"u"&&new TextEncoder,qr=typeof TextDecoder<"u"&&new TextDecoder,un=0;try{qr.decode(yr,{stream:!0}),un=1}catch{}var ba=function(c){for(var h="",k=0;;){var $=c[k++],X=($>127)+($>223)+($>239);if(k+X>c.length)return{s:h,r:Pe(c,k-1)};X?X==3?($=(($&15)<<18|(c[k++]&63)<<12|(c[k++]&63)<<6|c[k++]&63)-65536,h+=String.fromCharCode(55296|$>>10,56320|$&1023)):X&1?h+=String.fromCharCode(($&31)<<6|c[k++]&63):h+=String.fromCharCode(($&15)<<12|(c[k++]&63)<<6|c[k++]&63):h+=String.fromCharCode($)}},wa=function(){function c(h){this.ondata=h,un?this.t=new TextDecoder:this.p=yr}return c.prototype.push=function(h,k){if(this.ondata||Le(5),k=!!k,this.t){this.ondata(this.t.decode(h,{stream:!0}),k),k&&(this.t.decode().length&&Le(8),this.t=null);return}this.p||Le(4);var $=new m(this.p.length+h.length);$.set(this.p),$.set(h,this.p.length);var X=ba($),pe=X.s,Te=X.r;k?(Te.length&&Le(8),this.p=null):this.p=Te,this.ondata(pe,k)},c}(),Eo=function(){function c(h){this.ondata=h}return c.prototype.push=function(h,k){this.ondata||Le(5),this.d&&Le(4),this.ondata(ma(h),this.d=k||!1)},c}();function ma(c,h){if(h){for(var k=new m(c.length),$=0;$<c.length;++$)k[$]=c.charCodeAt($);return k}if(dn)return dn.encode(c);for(var X=c.length,pe=new m(c.length+(c.length>>1)),Te=0,a=function(p){pe[Te++]=p},$=0;$<X;++$){if(Te+5>pe.length){var n=new m(Te+8+(X-$<<1));n.set(pe),pe=n}var l=c.charCodeAt($);l<128||h?a(l):l<2048?(a(192|l>>6),a(128|l&63)):l>55295&&l<57344?(l=65536+(l&1047552)|c.charCodeAt(++$)&1023,a(240|l>>18),a(128|l>>12&63),a(128|l>>6&63),a(128|l&63)):(a(224|l>>12),a(128|l>>6&63),a(128|l&63))}return Pe(pe,0,Te)}function ps(c,h){if(h){for(var k="",$=0;$<c.length;$+=16384)k+=String.fromCharCode.apply(null,c.subarray($,$+16384));return k}else{if(qr)return qr.decode(c);var X=ba(c),pe=X.s,k=X.r;return k.length&&Le(8),pe}}var Na=function(c){return c==1?3:c<6?2:c==9?1:0},pa=function(c,h){return h+30+Yt(c,h+26)+Yt(c,h+28)},zo=function(c,h,k){var $=Yt(c,h+28),X=ps(c.subarray(h+46,h+46+$),!(Yt(c,h+8)&2048)),pe=h+46+$,Te=zr(c,h+20),a=k&&Te==4294967295?Va(c,pe):[Te,zr(c,h+24),zr(c,h+42)],n=a[0],l=a[1],p=a[2];return[Yt(c,h+10),n,l,X,pe+Yt(c,h+30)+Yt(c,h+32),p]},Va=function(c,h){for(;Yt(c,h)!=1;h+=4+Yt(c,h+2));return[Ye(c,h+12),Ye(c,h+4),Ye(c,h+20)]},_n=function(c){var h=0;if(c)for(var k in c){var $=c[k].length;$>65535&&Le(9),h+=$+4}return h},Fa=function(c,h,k,$,X,pe,Te,a){var n=$.length,l=k.extra,p=a&&a.length,b=_n(l);Vt(c,h,Te!=null?33639248:67324752),h+=4,Te!=null&&(c[h++]=20,c[h++]=k.os),c[h]=20,h+=2,c[h++]=k.flag<<1|(pe<0&&8),c[h++]=X&&8,c[h++]=k.compression&255,c[h++]=k.compression>>8;var E=new Date(k.mtime==null?Date.now():k.mtime),V=E.getFullYear()-1980;if((V<0||V>119)&&Le(10),Vt(c,h,V<<25|E.getMonth()+1<<21|E.getDate()<<16|E.getHours()<<11|E.getMinutes()<<5|E.getSeconds()>>1),h+=4,pe!=-1&&(Vt(c,h,k.crc),Vt(c,h+4,pe<0?-pe-2:pe),Vt(c,h+8,k.size)),Vt(c,h+12,n),Vt(c,h+14,b),h+=16,Te!=null&&(Vt(c,h,p),Vt(c,h+6,k.attrs),Vt(c,h+10,Te),h+=14),c.set($,h),h+=n,b)for(var R in l){var F=l[R],Q=F.length;Vt(c,h,+R),Vt(c,h+2,Q),c.set(F,h+4),h+=4+Q}return p&&(c.set(a,h),h+=p),h},Wn=function(c,h,k,$,X){Vt(c,h,101010256),Vt(c,h+8,k),Vt(c,h+10,k),Vt(c,h+12,$),Vt(c,h+16,X)},Dn=function(){function c(h){this.filename=h,this.c=jr(),this.size=0,this.compression=0}return c.prototype.process=function(h,k){this.ondata(null,h,k)},c.prototype.push=function(h,k){this.ondata||Le(5),this.c.p(h),this.size+=h.length,k&&(this.crc=this.c.d()),this.process(h,k||!1)},c}(),Da=function(){function c(h,k){var $=this;k||(k={}),Dn.call(this,h),this.d=new Er(k,function(X,pe){$.ondata(null,X,pe)}),this.compression=8,this.flag=Na(k.level)}return c.prototype.process=function(h,k){try{this.d.push(h,k)}catch($){this.ondata($,null,k)}},c.prototype.push=function(h,k){Dn.prototype.push.call(this,h,k)},c}(),Qa=function(){function c(h,k){var $=this;k||(k={}),Dn.call(this,h),this.d=new or(k,function(X,pe,Te){$.ondata(X,pe,Te)}),this.compression=8,this.flag=Na(k.level),this.terminate=this.d.terminate}return c.prototype.process=function(h,k){this.d.push(h,k)},c.prototype.push=function(h,k){Dn.prototype.push.call(this,h,k)},c}(),ga=function(){function c(h){this.ondata=h,this.u=[],this.d=1}return c.prototype.add=function(h){var k=this;if(this.ondata||Le(5),this.d&2)this.ondata(Le(4+(this.d&1)*8,0,1),null,!1);else{var $=ma(h.filename),X=$.length,pe=h.comment,Te=pe&&ma(pe),a=X!=h.filename.length||Te&&pe.length!=Te.length,n=X+_n(h.extra)+30;X>65535&&this.ondata(Le(11,0,1),null,!1);var l=new m(n);Fa(l,0,h,$,a,-1);var p=[l],b=function(){for(var Q=0,he=p;Q<he.length;Q++){var we=he[Q];k.ondata(null,we,!1)}p=[]},E=this.d;this.d=0;var V=this.u.length,R=ft(h,{f:$,u:a,o:Te,t:function(){h.terminate&&h.terminate()},r:function(){if(b(),E){var Q=k.u[V+1];Q?Q.r():k.d=1}E=1}}),F=0;h.ondata=function(Q,he,we){if(Q)k.ondata(Q,he,we),k.terminate();else if(F+=he.length,p.push(he),we){var Oe=new m(16);Vt(Oe,0,134695760),Vt(Oe,4,h.crc),Vt(Oe,8,F),Vt(Oe,12,h.size),p.push(Oe),R.c=F,R.b=n+F+16,R.crc=h.crc,R.size=h.size,E&&R.r(),E=1}else E&&b()},this.u.push(R)}},c.prototype.end=function(){var h=this;if(this.d&2){this.ondata(Le(4+(this.d&1)*8,0,1),null,!0);return}this.d?this.e():this.u.push({r:function(){h.d&1&&(h.u.splice(-1,1),h.e())},t:function(){}}),this.d=3},c.prototype.e=function(){for(var h=0,k=0,$=0,X=0,pe=this.u;X<pe.length;X++){var Te=pe[X];$+=46+Te.f.length+_n(Te.extra)+(Te.o?Te.o.length:0)}for(var a=new m($+22),n=0,l=this.u;n<l.length;n++){var Te=l[n];Fa(a,h,Te,Te.f,Te.u,-Te.c-2,k,Te.o),h+=46+Te.f.length+_n(Te.extra)+(Te.o?Te.o.length:0),k+=Te.b}Wn(a,h,this.u.length,$,k),this.ondata(null,a,!0),this.d=2},c.prototype.terminate=function(){for(var h=0,k=this.u;h<k.length;h++){var $=k[h];$.t()}this.d=2},c}();function Kn(c,h,k){k||(k=h,h={}),typeof k!="function"&&Le(7);var $={};kn(c,"",$,h);var X=Object.keys($),pe=X.length,Te=0,a=0,n=pe,l=new Array(pe),p=[],b=function(){for(var Q=0;Q<p.length;++Q)p[Q]()},E=function(Q,he){u(function(){k(Q,he)})};u(function(){E=k});var V=function(){var Q=new m(a+22),he=Te,we=a-Te;a=0;for(var Oe=0;Oe<n;++Oe){var K=l[Oe];try{var Je=K.c.length;Fa(Q,a,K,K.f,K.u,Je);var Fe=30+K.f.length+_n(K.extra),Qe=a+Fe;Q.set(K.c,Qe),Fa(Q,Te,K,K.f,K.u,Je,a,K.m),Te+=16+Fe+(K.m?K.m.length:0),a=Qe+Je}catch(Ae){return E(Ae,null)}}Wn(Q,Te,l.length,we,he),E(null,Q)};pe||V();for(var R=function(Q){var he=X[Q],we=$[he],Oe=we[0],K=we[1],Je=jr(),Fe=Oe.length;Je.p(Oe);var Qe=ma(he),Ae=Qe.length,ct=K.comment,Ct=ct&&ma(ct),nt=Ct&&Ct.length,Ce=_n(K.extra),bt=K.level==0?0:8,Gt=function(Et,dt){if(Et)b(),E(Et,null);else{var $t=dt.length;l[Q]=ft(K,{size:Fe,crc:Je.d(),c:dt,f:Qe,m:Ct,u:Ae!=he.length||Ct&&ct.length!=nt,compression:bt}),Te+=30+Ae+Ce+$t,a+=76+2*(Ae+Ce)+(nt||0)+$t,--pe||V()}};if(Ae>65535&&Gt(Le(11,0,1),null),!bt)Gt(null,Oe);else if(Fe<16e4)try{Gt(null,Ws(Oe,K))}catch(Et){Gt(Et,null)}else p.push(as(Oe,K,Gt))},F=0;F<n;++F)R(F);return b}function ta(c,h){h||(h={});var k={},$=[];kn(c,"",k,h);var X=0,pe=0;for(var Te in k){var a=k[Te],n=a[0],l=a[1],p=l.level==0?0:8,b=ma(Te),E=b.length,V=l.comment,R=V&&ma(V),F=R&&R.length,Q=_n(l.extra);E>65535&&Le(11);var he=p?Ws(n,l):n,we=he.length,Oe=jr();Oe.p(n),$.push(ft(l,{size:n.length,crc:Oe.d(),c:he,f:b,m:R,u:E!=Te.length||R&&V.length!=F,o:X,compression:p})),X+=30+E+Q+we,pe+=76+2*(E+Q)+(F||0)+we}for(var K=new m(pe+22),Je=X,Fe=pe-X,Qe=0;Qe<$.length;++Qe){var b=$[Qe];Fa(K,b.o,b,b.f,b.u,b.c.length);var Ae=30+b.f.length+_n(b.extra);K.set(b.c,b.o+Ae),Fa(K,X,b,b.f,b.u,b.c.length,b.o,b.m),X+=16+Ae+(b.m?b.m.length:0)}return Wn(K,X,$.length,Fe,Je),K}var Wa=function(){function c(){}return c.prototype.push=function(h,k){this.ondata(null,h,k)},c.compression=0,c}(),va=function(){function c(){var h=this;this.i=new Ms(function(k,$){h.ondata(null,k,$)})}return c.prototype.push=function(h,k){try{this.i.push(h,k)}catch($){this.ondata($,null,k)}},c.compression=8,c}(),Ja=function(){function c(h,k){var $=this;k<32e4?this.i=new Ms(function(X,pe){$.ondata(null,X,pe)}):(this.i=new mn(function(X,pe,Te){$.ondata(X,pe,Te)}),this.terminate=this.i.terminate)}return c.prototype.push=function(h,k){this.i.terminate&&(h=Pe(h,0)),this.i.push(h,k)},c.compression=8,c}(),gt=function(){function c(h){this.onfile=h,this.k=[],this.o={0:Wa},this.p=yr}return c.prototype.push=function(h,k){var $=this;if(this.onfile||Le(5),this.p||Le(4),this.c>0){var X=Math.min(this.c,h.length),pe=h.subarray(0,X);if(this.c-=X,this.d?this.d.push(pe,!this.c):this.k[0].push(pe),h=h.subarray(X),h.length)return this.push(h,k)}else{var Te=0,a=0,n=void 0,l=void 0;this.p.length?h.length?(l=new m(this.p.length+h.length),l.set(this.p),l.set(h,this.p.length)):l=this.p:l=h;for(var p=l.length,b=this.c,E=b&&this.d,V=function(){var he,we=zr(l,a);if(we==67324752){Te=1,n=a,R.d=null,R.c=0;var Oe=Yt(l,a+6),K=Yt(l,a+8),Je=Oe&2048,Fe=Oe&8,Qe=Yt(l,a+26),Ae=Yt(l,a+28);if(p>a+30+Qe+Ae){var ct=[];R.k.unshift(ct),Te=2;var Ct=zr(l,a+18),nt=zr(l,a+22),Ce=ps(l.subarray(a+30,a+=30+Qe),!Je);Ct==4294967295?(he=Fe?[-2]:Va(l,a),Ct=he[0],nt=he[1]):Fe&&(Ct=-1),a+=Ae,R.c=Ct;var bt,Gt={name:Ce,compression:K,start:function(){if(Gt.ondata||Le(5),!Ct)Gt.ondata(null,yr,!0);else{var Et=$.o[K];Et||Gt.ondata(Le(14,"unknown compression type "+K,1),null,!1),bt=Ct<0?new Et(Ce):new Et(Ce,Ct,nt),bt.ondata=function(Re,at,ot){Gt.ondata(Re,at,ot)};for(var dt=0,$t=ct;dt<$t.length;dt++){var ke=$t[dt];bt.push(ke,!1)}$.k[0]==ct&&$.c?$.d=bt:bt.push(yr,!0)}},terminate:function(){bt&&bt.terminate&&bt.terminate()}};Ct>=0&&(Gt.size=Ct,Gt.originalSize=nt),R.onfile(Gt)}return"break"}else if(b){if(we==134695760)return n=a+=12+(b==-2&&8),Te=3,R.c=0,"break";if(we==33639248)return n=a-=4,Te=3,R.c=0,"break"}},R=this;a<p-4;++a){var F=V();if(F==="break")break}if(this.p=yr,b<0){var Q=Te?l.subarray(0,n-12-(b==-2&&8)-(zr(l,n-16)==134695760&&4)):l.subarray(0,a);E?E.push(Q,!!Te):this.k[+(Te==2)].push(Q)}if(Te&2)return this.push(l.subarray(a),k);this.p=l.subarray(a)}k&&(this.c&&Le(13),this.p=null)},c.prototype.register=function(h){this.o[h.compression]=h},c}(),u=typeof queueMicrotask=="function"?queueMicrotask:typeof setTimeout=="function"?setTimeout:function(c){c()};function P(c,h,k){k||(k=h,h={}),typeof k!="function"&&Le(7);var $=[],X=function(){for(var Q=0;Q<$.length;++Q)$[Q]()},pe={},Te=function(Q,he){u(function(){k(Q,he)})};u(function(){Te=k});for(var a=c.length-22;zr(c,a)!=101010256;--a)if(!a||c.length-a>65558)return Te(Le(13,0,1),null),X;var n=Yt(c,a+8);if(n){var l=n,p=zr(c,a+16),b=p==4294967295||l==65535;if(b){var E=zr(c,a-12);b=zr(c,E)==101075792,b&&(l=n=zr(c,E+32),p=zr(c,E+48))}for(var V=h&&h.filter,R=function(Q){var he=zo(c,p,b),we=he[0],Oe=he[1],K=he[2],Je=he[3],Fe=he[4],Qe=he[5],Ae=pa(c,Qe);p=Fe;var ct=function(nt,Ce){nt?(X(),Te(nt,null)):(Ce&&(pe[Je]=Ce),--n||Te(null,pe))};if(!V||V({name:Je,size:Oe,originalSize:K,compression:we}))if(!we)ct(null,Pe(c,Ae,Ae+Oe));else if(we==8){var Ct=c.subarray(Ae,Ae+Oe);if(K<524288||Oe>.8*K)try{ct(null,zt(Ct,{out:new m(K)}))}catch(nt){ct(nt,null)}else $.push(wn(Ct,{size:K},ct))}else ct(Le(14,"unknown compression type "+we,1),null);else ct(null,null)},F=0;F<l;++F)R(F)}else Te(null,{});return X}function T(c,h){for(var k={},$=c.length-22;zr(c,$)!=101010256;--$)(!$||c.length-$>65558)&&Le(13);var X=Yt(c,$+8);if(!X)return{};var pe=zr(c,$+16),Te=pe==4294967295||X==65535;if(Te){var a=zr(c,$-12);Te=zr(c,a)==101075792,Te&&(X=zr(c,a+32),pe=zr(c,a+48))}for(var n=h&&h.filter,l=0;l<X;++l){var p=zo(c,pe,Te),b=p[0],E=p[1],V=p[2],R=p[3],F=p[4],Q=p[5],he=pa(c,Q);pe=F,(!n||n({name:R,size:E,originalSize:V,compression:b}))&&(b?b==8?k[R]=zt(c.subarray(he,he+E),{out:new m(V)}):Le(14,"unknown compression type "+b):k[R]=Pe(c,he,he+E))}return k}},
vendor: 5,827 bytes, line 171
171"./node_modules/iobuffer/lib-esm/IOBuffer.js":function(w,O,t){t.r(O),t.d(O,{IOBuffer:function(){return C}});var f=t("./node_modules/iobuffer/lib-esm/text.js");const v=1024*8,m=(()=>{const S=new Uint8Array(4),g=new Uint32Array(S.buffer);return!((g[0]=1)&S[0])})(),y={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 C{constructor(g=v,j={}){vn(this,"buffer");vn(this,"byteLength");vn(this,"byteOffset");vn(this,"length");vn(this,"offset");vn(this,"lastWrittenByte");vn(this,"littleEndian");vn(this,"_data");vn(this,"_mark");vn(this,"_marks");let A=!1;typeof g=="number"?g=new ArrayBuffer(g):(A=!0,this.lastWrittenByte=g.byteLength);const I=j.offset?j.offset>>>0:0,M=g.byteLength-I;let B=I;(ArrayBuffer.isView(g)||g instanceof C)&&(g.byteLength!==g.buffer.byteLength&&(B=g.byteOffset+I),g=g.buffer),A?this.lastWrittenByte=M:this.lastWrittenByte=0,this.buffer=g,this.length=M,this.byteLength=M,this.byteOffset=B,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,B,M),this._mark=0,this._marks=[]}available(g=1){return this.offset+g<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){return this.littleEndian=!0,this}isBigEndian(){return!this.littleEndian}setBigEndian(){return this.littleEndian=!1,this}skip(g=1){return this.offset+=g,this}back(g=1){return this.offset-=g,this}seek(g){return this.offset=g,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 g=this._marks.pop();if(g===void 0)throw new Error("Mark stack empty");return this.seek(g),this}rewind(){return this.offset=0,this}ensureAvailable(g=1){if(!this.available(g)){const A=(this.offset+g)*2,I=new Uint8Array(A);I.set(new Uint8Array(this.buffer)),this.buffer=I.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(g=1){return this.readArray(g,"uint8")}readArray(g,j){const A=y[j].BYTES_PER_ELEMENT*g,I=this.byteOffset+this.offset,M=this.buffer.slice(I,I+A);if(this.littleEndian===m&&j!=="uint8"&&j!=="int8"){const W=new Uint8Array(this.buffer.slice(I,I+A));W.reverse();const Y=new y[j](W.buffer);return this.offset+=A,Y.reverse(),Y}const B=new y[j](M);return this.offset+=A,B}readInt16(){const g=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,g}readUint16(){const g=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,g}readInt32(){const g=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,g}readUint32(){const g=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,g}readFloat32(){const g=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,g}readFloat64(){const g=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,g}readBigInt64(){const g=this._data.getBigInt64(this.offset,this.littleEndian);return this.offset+=8,g}readBigUint64(){const g=this._data.getBigUint64(this.offset,this.littleEndian);return this.offset+=8,g}readChar(){return String.fromCharCode(this.readInt8())}readChars(g=1){let j="";for(let A=0;A<g;A++)j+=this.readChar();return j}readUtf8(g=1){return(0,f.decode)(this.readBytes(g))}decodeText(g=1,j="utf8"){return(0,f.decode)(this.readBytes(g),j)}writeBoolean(g){return this.writeUint8(g?255:0),this}writeInt8(g){return this.ensureAvailable(1),this._data.setInt8(this.offset++,g),this._updateLastWrittenByte(),this}writeUint8(g){return this.ensureAvailable(1),this._data.setUint8(this.offset++,g),this._updateLastWrittenByte(),this}writeByte(g){return this.writeUint8(g)}writeBytes(g){this.ensureAvailable(g.length);for(let j=0;j<g.length;j++)this._data.setUint8(this.offset++,g[j]);return this._updateLastWrittenByte(),this}writeInt16(g){return this.ensureAvailable(2),this._data.setInt16(this.offset,g,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeUint16(g){return this.ensureAvailable(2),this._data.setUint16(this.offset,g,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeInt32(g){return this.ensureAvailable(4),this._data.setInt32(this.offset,g,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeUint32(g){return this.ensureAvailable(4),this._data.setUint32(this.offset,g,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat32(g){return this.ensureAvailable(4),this._data.setFloat32(this.offset,g,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat64(g){return this.ensureAvailable(8),this._data.setFloat64(this.offset,g,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigInt64(g){return this.ensureAvailable(8),this._data.setBigInt64(this.offset,g,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigUint64(g){return this.ensureAvailable(8),this._data.setBigUint64(this.offset,g,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeChar(g){return this.writeUint8(g.charCodeAt(0))}writeChars(g){for(let j=0;j<g.length;j++)this.writeUint8(g.charCodeAt(j));return this}writeUtf8(g){return this.writeBytes((0,f.encode)(g))}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)}}},
vendor: 248 bytes, line 171
171"./node_modules/iobuffer/lib-esm/text.js":function(w,O,t){t.r(O),t.d(O,{decode:function(){return f},encode:function(){return m}});function f(y,C="utf8"){return new TextDecoder(C).decode(y)}const v=new TextEncoder;function m(y){return v.encode(y)}},
vendor: 351,736 bytes, lines 171-362
171"./node_modules/jspdf/dist/jspdf.es.min.js":function(w,O,t){t.r(O),t.d(O,{AcroForm:function(){return Ws},AcroFormAppearance:function(){return or},AcroFormButton:function(){return xr},AcroFormCheckBox:function(){return vt},AcroFormChoiceField:function(){return zr},AcroFormComboBox:function(){return Vt},AcroFormEditBox:function(){return lr},AcroFormListBox:function(){return Ye},AcroFormPasswordField:function(){return Er},AcroFormPushButton:function(){return Pr},AcroFormRadioButton:function(){return Ur},AcroFormTextField:function(){return Lr},GState:function(){return st},ShadingPattern:function(){return rt},TilingPattern:function(){return xt},default:function(){return He},jsPDF:function(){return He}});var f=t("./node_modules/@babel/runtime/helpers/esm/typeof.js"),v=t("./node_modules/fflate/esm/browser.js"),m=t("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),y=t("./node_modules/fast-png/lib-esm/index.js");/** @license
172 *
173 * jsPDF - PDF Document creation from JavaScript
174 * Version 4.0.0 Built on 2025-12-18T10:27:09.425Z
175 *                      CommitID 00000000
176 *
177 * Copyright (c) 2010-2025 James Hall <[email protected]>, https://github.com/MrRio/jsPDF
178 *               2015-2025 yWorks GmbH, http://www.yworks.com
179 *               2015-2025 Lukas Holländer <[email protected]>, https://github.com/HackbrettXXX
180 *               2016-2018 Aras Abbasi <[email protected]>
181 *               2010 Aaron Spike, https://github.com/acspike
182 *               2012 Willow Systems Corporation, https://github.com/willowsystems
183 *               2012 Pablo Hess, https://github.com/pablohess
184 *               2012 Florian Jenett, https://github.com/fjenett
185 *               2013 Warren Weckesser, https://github.com/warrenweckesser
186 *               2013 Youssef Beddad, https://github.com/lifof
187 *               2013 Lee Driscoll, https://github.com/lsdriscoll
188 *               2013 Stefan Slonevskiy, https://github.com/stefslon
189 *               2013 Jeremy Morel, https://github.com/jmorel
190 *               2013 Christoph Hartmann, https://github.com/chris-rock
191 *               2014 Juan Pablo Gaviria, https://github.com/juanpgaviria
192 *               2014 James Makes, https://github.com/dollaruw
193 *               2014 Diego Casorran, https://github.com/diegocr
194 *               2014 Steven Spungin, https://github.com/Flamenco
195 *               2014 Kenneth Glassey, https://github.com/Gavvers
196 *
197 * Permission is hereby granted, free of charge, to any person obtaining
198 * a copy of this software and associated documentation files (the
199 * "Software"), to deal in the Software without restriction, including
200 * without limitation the rights to use, copy, modify, merge, publish,
201 * distribute, sublicense, and/or sell copies of the Software, and to
202 * permit persons to whom the Software is furnished to do so, subject to
203 * the following conditions:
204 *
205 * The above copyright notice and this permission notice shall be
206 * included in all copies or substantial portions of the Software.
207 *
208 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
209 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
210 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
211 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
212 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
213 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
214 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
215 *
216 * Contributor(s):
217 *    siefkenj, ahwolf, rickygu, Midnith, saintclair, eaparango,
218 *    kim3er, mfo, alnorth, Flamenco
219 */var C=function(){return typeof window<"u"?window:typeof td<"u"?td:typeof self<"u"?self:this}();function S(){C.console&&typeof C.console.log=="function"&&C.console.log.apply(C.console,arguments)}var g={log:S,warn:function(a){C.console&&(typeof C.console.warn=="function"?C.console.warn.apply(C.console,arguments):S.call(null,arguments))},error:function(a){C.console&&(typeof C.console.error=="function"?C.console.error.apply(C.console,arguments):S(a))}};function j(a,n,l){var p=new XMLHttpRequest;p.open("GET",a),p.responseType="blob",p.onload=function(){M(p.response,n,l)},p.onerror=function(){g.error("could not download file")},p.send()}function A(a){var n=new XMLHttpRequest;n.open("HEAD",a,!1);try{n.send()}catch{}return n.status>=200&&n.status<=299}function I(a){try{a.dispatchEvent(new MouseEvent("click"))}catch{var n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),a.dispatchEvent(n)}}var M=C.saveAs||((typeof window>"u"?"undefined":(0,f.default)(window))!=="object"||window!==C?function(){}:typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype?function(a,n,l){var p=C.URL||C.webkitURL,b=document.createElement("a");n=n||a.name||"download",b.download=n,b.rel="noopener",typeof a=="string"?(b.href=a,b.origin!==location.origin?A(b.href)?j(a,n,l):I(b,b.target="_blank"):I(b)):(b.href=p.createObjectURL(a),setTimeout(function(){p.revokeObjectURL(b.href)},4e4),setTimeout(function(){I(b)},0))}:"msSaveOrOpenBlob"in navigator?function(a,n,l){if(n=n||a.name||"download",typeof a=="string")if(A(a))j(a,n,l);else{var p=document.createElement("a");p.href=a,p.target="_blank",setTimeout(function(){I(p)})}else navigator.msSaveOrOpenBlob(function(b,E){return E===void 0?E={autoBom:!1}:(0,f.default)(E)!=="object"&&(g.warn("Deprecated: Expected third argument to be a object"),E={autoBom:!E}),E.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(b.type)?new Blob(["\uFEFF",b],{type:b.type}):b}(a,l),n)}:function(a,n,l,p){if((p=p||open("","_blank"))&&(p.document.title=p.document.body.innerText="downloading..."),typeof a=="string")return j(a,n,l);var b=a.type==="application/octet-stream",E=/constructor/i.test(C.HTMLElement)||C.safari,V=/CriOS\/[\d]+/.test(navigator.userAgent);if((V||b&&E)&&(typeof FileReader>"u"?"undefined":(0,f.default)(FileReader))==="object"){var R=new FileReader;R.onloadend=function(){var he=R.result;he=V?he:he.replace(/^data:[^;]*;/,"data:attachment/file;"),p?p.location.href=he:location=he,p=null},R.readAsDataURL(a)}else{var F=C.URL||C.webkitURL,Q=F.createObjectURL(a);p?p.location=Q:location.href=Q,p=null,setTimeout(function(){F.revokeObjectURL(Q)},4e4)}});/**
220 * A class to parse color values
221 * @author Stoyan Stefanov <[email protected]>
222 * {@link   http://www.phpied.com/rgb-color-parser-in-javascript/}
223 * @license Use it if you like it
224 */function B(a){var n;a=a||"",this.ok=!1,a.charAt(0)=="#"&&(a=a.substr(1,6)),a={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"}[a=(a=a.replace(/ /g,"")).toLowerCase()]||a;for(var l=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(R){return[parseInt(R[1]),parseInt(R[2]),parseInt(R[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(R){return[parseInt(R[1],16),parseInt(R[2],16),parseInt(R[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(R){return[parseInt(R[1]+R[1],16),parseInt(R[2]+R[2],16),parseInt(R[3]+R[3],16)]}}],p=0;p<l.length;p++){var b=l[p].re,E=l[p].process,V=b.exec(a);V&&(n=E(V),this.r=n[0],this.g=n[1],this.b=n[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 R=this.r.toString(16),F=this.g.toString(16),Q=this.b.toString(16);return R.length==1&&(R="0"+R),F.length==1&&(F="0"+F),Q.length==1&&(Q="0"+Q),"#"+R+F+Q}}var W=C.atob.bind(C),Y=C.btoa.bind(C);/**
225 * @license
226 * Joseph Myers does not specify a particular license for his work.
227 *
228 * Author: Joseph Myers
229 * Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js
230 *
231 * Modified by: Owen Leong
232 */function J(a,n){var l=a[0],p=a[1],b=a[2],E=a[3];l=ae(l,p,b,E,n[0],7,-680876936),E=ae(E,l,p,b,n[1],12,-389564586),b=ae(b,E,l,p,n[2],17,606105819),p=ae(p,b,E,l,n[3],22,-1044525330),l=ae(l,p,b,E,n[4],7,-176418897),E=ae(E,l,p,b,n[5],12,1200080426),b=ae(b,E,l,p,n[6],17,-1473231341),p=ae(p,b,E,l,n[7],22,-45705983),l=ae(l,p,b,E,n[8],7,1770035416),E=ae(E,l,p,b,n[9],12,-1958414417),b=ae(b,E,l,p,n[10],17,-42063),p=ae(p,b,E,l,n[11],22,-1990404162),l=ae(l,p,b,E,n[12],7,1804603682),E=ae(E,l,p,b,n[13],12,-40341101),b=ae(b,E,l,p,n[14],17,-1502002290),l=Z(l,p=ae(p,b,E,l,n[15],22,1236535329),b,E,n[1],5,-165796510),E=Z(E,l,p,b,n[6],9,-1069501632),b=Z(b,E,l,p,n[11],14,643717713),p=Z(p,b,E,l,n[0],20,-373897302),l=Z(l,p,b,E,n[5],5,-701558691),E=Z(E,l,p,b,n[10],9,38016083),b=Z(b,E,l,p,n[15],14,-660478335),p=Z(p,b,E,l,n[4],20,-405537848),l=Z(l,p,b,E,n[9],5,568446438),E=Z(E,l,p,b,n[14],9,-1019803690),b=Z(b,E,l,p,n[3],14,-187363961),p=Z(p,b,E,l,n[8],20,1163531501),l=Z(l,p,b,E,n[13],5,-1444681467),E=Z(E,l,p,b,n[2],9,-51403784),b=Z(b,E,l,p,n[7],14,1735328473),l=oe(l,p=Z(p,b,E,l,n[12],20,-1926607734),b,E,n[5],4,-378558),E=oe(E,l,p,b,n[8],11,-2022574463),b=oe(b,E,l,p,n[11],16,1839030562),p=oe(p,b,E,l,n[14],23,-35309556),l=oe(l,p,b,E,n[1],4,-1530992060),E=oe(E,l,p,b,n[4],11,1272893353),b=oe(b,E,l,p,n[7],16,-155497632),p=oe(p,b,E,l,n[10],23,-1094730640),l=oe(l,p,b,E,n[13],4,681279174),E=oe(E,l,p,b,n[0],11,-358537222),b=oe(b,E,l,p,n[3],16,-722521979),p=oe(p,b,E,l,n[6],23,76029189),l=oe(l,p,b,E,n[9],4,-640364487),E=oe(E,l,p,b,n[12],11,-421815835),b=oe(b,E,l,p,n[15],16,530742520),l=H(l,p=oe(p,b,E,l,n[2],23,-995338651),b,E,n[0],6,-198630844),E=H(E,l,p,b,n[7],10,1126891415),b=H(b,E,l,p,n[14],15,-1416354905),p=H(p,b,E,l,n[5],21,-57434055),l=H(l,p,b,E,n[12],6,1700485571),E=H(E,l,p,b,n[3],10,-1894986606),b=H(b,E,l,p,n[10],15,-1051523),p=H(p,b,E,l,n[1],21,-2054922799),l=H(l,p,b,E,n[8],6,1873313359),E=H(E,l,p,b,n[15],10,-30611744),b=H(b,E,l,p,n[6],15,-1560198380),p=H(p,b,E,l,n[13],21,1309151649),l=H(l,p,b,E,n[4],6,-145523070),E=H(E,l,p,b,n[11],10,-1120210379),b=H(b,E,l,p,n[2],15,718787259),p=H(p,b,E,l,n[9],21,-343485551),a[0]=Xe(l,a[0]),a[1]=Xe(p,a[1]),a[2]=Xe(b,a[2]),a[3]=Xe(E,a[3])}function le(a,n,l,p,b,E){return n=Xe(Xe(n,a),Xe(p,E)),Xe(n<<b|n>>>32-b,l)}function ae(a,n,l,p,b,E,V){return le(n&l|~n&p,a,n,b,E,V)}function Z(a,n,l,p,b,E,V){return le(n&p|l&~p,a,n,b,E,V)}function oe(a,n,l,p,b,E,V){return le(n^l^p,a,n,b,E,V)}function H(a,n,l,p,b,E,V){return le(l^(n|~p),a,n,b,E,V)}function fe(a){var n,l=a.length,p=[1732584193,-271733879,-1732584194,271733878];for(n=64;n<=a.length;n+=64)J(p,se(a.substring(n-64,n)));a=a.substring(n-64);var b=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(n=0;n<a.length;n++)b[n>>2]|=a.charCodeAt(n)<<(n%4<<3);if(b[n>>2]|=128<<(n%4<<3),n>55)for(J(p,b),n=0;n<16;n++)b[n]=0;return b[14]=8*l,J(p,b),p}function se(a){var n,l=[];for(n=0;n<64;n+=4)l[n>>2]=a.charCodeAt(n)+(a.charCodeAt(n+1)<<8)+(a.charCodeAt(n+2)<<16)+(a.charCodeAt(n+3)<<24);return l}var de="0123456789abcdef".split("");function q(a){for(var n="",l=0;l<4;l++)n+=de[a>>8*l+4&15]+de[a>>8*l&15];return n}function U(a){return String.fromCharCode(255&a,(65280&a)>>8,(16711680&a)>>16,(4278190080&a)>>24)}function ge(a){return fe(a).map(U).join("")}var Ee=function(a){for(var n=0;n<a.length;n++)a[n]=q(a[n]);return a.join("")}(fe("hello"))!="5d41402abc4b2a76b9719d911017c592";function Xe(a,n){if(Ee){var l=(65535&a)+(65535&n);return(a>>16)+(n>>16)+(l>>16)<<16|65535&l}return a+n&4294967295}/**
233 * @license
234 * FPDF is released under a permissive license: there is no usage restriction.
235 * You may embed it freely in your application (commercial or not), with or
236 * without modifications.
237 *
238 * Reference: http://www.fpdf.org/en/script/script37.php
239 */function re(a,n){var l,p,b,E;if(a!==l){for(var V=(b=a,E=1+(256/a.length|0),new Array(E+1).join(b)),R=[],F=0;F<256;F++)R[F]=F;var Q=0;for(F=0;F<256;F++){var he=R[F];Q=(Q+he+V.charCodeAt(F))%256,R[F]=R[Q],R[Q]=he}l=a,p=R}else R=p;var we=n.length,Oe=0,K=0,Je="";for(F=0;F<we;F++)K=(K+(he=R[Oe=(Oe+1)%256]))%256,R[Oe]=R[K],R[K]=he,V=R[(R[Oe]+R[K])%256],Je+=String.fromCharCode(n.charCodeAt(F)^V);return Je}/**
240 * @license
241 * Licensed under the MIT License.
242 * http://opensource.org/licenses/mit-license
243 * Author: Owen Leong (@owenl131)
244 * Date: 15 Oct 2020
245 * References:
246 * https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt
247 * https://github.com/foliojs/pdfkit/blob/master/lib/security.js
248 * http://www.fpdf.org/en/script/script37.php
249 */var Pe={print:4,modify:8,copy:16,"annot-forms":32};function ye(a,n,l,p){this.v=1,this.r=2;var b=192;a.forEach(function(R){if(Pe.perm!==void 0)throw new Error("Invalid permission: "+R);b+=Pe[R]}),this.padding="(¿N^NuŠAd\0NVÿú�\b..\0¶Ðh>€/\f©þdSiz";var E=(n+this.padding).substr(0,32),V=(l+this.padding).substr(0,32);this.O=this.processOwnerPassword(E,V),this.P=-(1+(255^b)),this.encryptionKey=ge(E+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(p)).substr(0,5),this.U=re(this.encryptionKey,this.padding)}function Se(a){if(/[^\u0000-\u00ff]/.test(a))throw new Error("Invalid PDF Name Object: "+a+", Only accept ASCII characters.");for(var n="",l=a.length,p=0;p<l;p++){var b=a.charCodeAt(p);n+=b<33||b===35||b===37||b===40||b===41||b===47||b===60||b===62||b===91||b===93||b===123||b===125||b>126?"#"+("0"+b.toString(16)).slice(-2):a[p]}return n}function Le(a){if((0,f.default)(a)!=="object")throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var n={};this.subscribe=function(l,p,b){if(b=b||!1,typeof l!="string"||typeof p!="function"||typeof b!="boolean")throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");n.hasOwnProperty(l)||(n[l]={});var E=Math.random().toString(35);return n[l][E]=[p,!!b],E},this.unsubscribe=function(l){for(var p in n)if(n[p][l])return delete n[p][l],Object.keys(n[p]).length===0&&delete n[p],!0;return!1},this.publish=function(l){if(n.hasOwnProperty(l)){var p=Array.prototype.slice.call(arguments,1),b=[];for(var E in n[l]){var V=n[l][E];try{V[0].apply(a,p)}catch(R){C.console&&g.error("jsPDF PubSub Error",R.message,R)}V[1]&&b.push(E)}b.length&&b.forEach(this.unsubscribe)}},this.getTopics=function(){return n}}function st(a){if(!(this instanceof st))return new st(a);var n="opacity,stroke-opacity".split(",");for(var l in a)a.hasOwnProperty(l)&&n.indexOf(l)>=0&&(this[l]=a[l]);this.id="",this.objectNumber=-1}function Ke(a,n){this.gState=a,this.matrix=n,this.id="",this.objectNumber=-1}function rt(a,n,l,p,b){if(!(this instanceof rt))return new rt(a,n,l,p,b);this.type=a==="axial"?2:3,this.coords=n,this.colors=l,Ke.call(this,p,b)}function xt(a,n,l,p,b){if(!(this instanceof xt))return new xt(a,n,l,p,b);this.boundingBox=a,this.xStep=n,this.yStep=l,this.stream="",this.cloneIndex=0,Ke.call(this,p,b)}function He(a){var n,l=typeof arguments[0]=="string"?arguments[0]:"p",p=arguments[1],b=arguments[2],E=arguments[3],V=[],R=1,F=16,Q="S",he=null;(0,f.default)(a=a||{})==="object"&&(l=a.orientation,p=a.unit||p,b=a.format||b,E=a.compress||a.compressPdf||E,(he=a.encryption||null)!==null&&(he.userPassword=he.userPassword||"",he.ownerPassword=he.ownerPassword||"",he.userPermissions=he.userPermissions||[]),R=typeof a.userUnit=="number"?Math.abs(a.userUnit):1,a.precision!==void 0&&(n=a.precision),a.floatPrecision!==void 0&&(F=a.floatPrecision),Q=a.defaultPathOperation||"S"),V=a.filters||(E===!0?["FlateEncode"]:V),p=p||"mm",l=(""+(l||"P")).toLowerCase();var we=a.putOnlyUsedFonts||!1,Oe={},K={internal:{},__private__:{}};K.__private__.PubSub=Le;var Je="1.3",Fe=K.__private__.getPdfVersion=function(){return Je};K.__private__.setPdfVersion=function(L){Je=L};var Qe={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]};K.__private__.getPageFormats=function(){return Qe};var Ae=K.__private__.getPageFormat=function(L){return Qe[L]};b=b||"a4";var ct="compat",Ct="advanced",nt=ct;function Ce(){this.saveGraphicsState(),Ie(new Ns(Bs,0,0,-Bs,0,Ji()*Bs).toString()+" cm"),this.setFontSize(this.getFontSize()/Bs),Q="n",nt=Ct}function bt(){this.restoreGraphicsState(),Q="S",nt=ct}var Gt=K.__private__.combineFontStyleAndFontWeight=function(L,ie){if(L=="bold"&&ie=="normal"||L=="bold"&&ie==400||L=="normal"&&ie=="italic"||L=="bold"&&ie=="italic")throw new Error("Invalid Combination of fontweight and fontstyle");return ie&&(L=ie==400||ie==="normal"?L==="italic"?"italic":"normal":ie!=700&&ie!=="bold"||L!=="normal"?(ie==700?"bold":ie)+""+L:"bold"),L};K.advancedAPI=function(L){var ie=nt===ct;return ie&&Ce.call(this),typeof L!="function"||(L(this),ie&&bt.call(this)),this},K.compatAPI=function(L){var ie=nt===Ct;return ie&&bt.call(this),typeof L!="function"||(L(this),ie&&Ce.call(this)),this},K.isAdvancedAPI=function(){return nt===Ct};var Et,dt=function(L){if(nt!==Ct)throw new Error(L+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},$t=K.roundToPrecision=K.__private__.roundToPrecision=function(L,ie){var De=n||ie;if(isNaN(L)||isNaN(De))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return L.toFixed(De).replace(/0+$/,"")};Et=K.hpf=K.__private__.hpf=typeof F=="number"?function(L){if(isNaN(L))throw new Error("Invalid argument passed to jsPDF.hpf");return $t(L,F)}:F==="smart"?function(L){if(isNaN(L))throw new Error("Invalid argument passed to jsPDF.hpf");return $t(L,L>-1&&L<1?16:5)}:function(L){if(isNaN(L))throw new Error("Invalid argument passed to jsPDF.hpf");return $t(L,16)};var ke=K.f2=K.__private__.f2=function(L){if(isNaN(L))throw new Error("Invalid argument passed to jsPDF.f2");return $t(L,2)},Re=K.__private__.f3=function(L){if(isNaN(L))throw new Error("Invalid argument passed to jsPDF.f3");return $t(L,3)},at=K.scale=K.__private__.scale=function(L){if(isNaN(L))throw new Error("Invalid argument passed to jsPDF.scale");return nt===ct?L*Bs:nt===Ct?L:void 0},ot=function(L){return at(function(ie){return nt===ct?Ji()-ie:nt===Ct?ie:void 0}(L))};K.__private__.setPrecision=K.setPrecision=function(L){typeof parseInt(L,10)=="number"&&(n=parseInt(L,10))};var Ut,Xt="00000000000000000000000000000000",er=K.__private__.getFileId=function(){return Xt},Pt=K.__private__.setFileId=function(L){return Xt=L!==void 0&&/^[a-fA-F0-9]{32}$/.test(L)?L.toUpperCase():Xt.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),he!==null&&(Pa=new ye(he.userPermissions,he.userPassword,he.ownerPassword,Xt)),Xt};K.setFileId=function(L){return Pt(L),this},K.getFileId=function(){return er()};var Qt=K.__private__.convertDateToPDFDate=function(L){var ie=L.getTimezoneOffset(),De=ie<0?"+":"-",it=Math.floor(Math.abs(ie/60)),At=Math.abs(ie%60),ir=[De,qe(it),"'",qe(At),"'"].join("");return["D:",L.getFullYear(),qe(L.getMonth()+1),qe(L.getDate()),qe(L.getHours()),qe(L.getMinutes()),qe(L.getSeconds()),ir].join("")},kr=K.__private__.convertPDFDateToDate=function(L){var ie=parseInt(L.substr(2,4),10),De=parseInt(L.substr(6,2),10)-1,it=parseInt(L.substr(8,2),10),At=parseInt(L.substr(10,2),10),ir=parseInt(L.substr(12,2),10),vr=parseInt(L.substr(14,2),10);return new Date(ie,De,it,At,ir,vr,0)},Nr=K.__private__.setCreationDate=function(L){var ie;if(L===void 0&&(L=new Date),L instanceof Date)ie=Qt(L);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(L))throw new Error("Invalid argument passed to jsPDF.setCreationDate");ie=L}return Ut=ie},xe=K.__private__.getCreationDate=function(L){var ie=Ut;return L==="jsDate"&&(ie=kr(Ut)),ie};K.setCreationDate=function(L){return Nr(L),this},K.getCreationDate=function(L){return xe(L)};var Ve,qe=K.__private__.padd2=function(L){return("0"+parseInt(L)).slice(-2)},yt=K.__private__.padd2Hex=function(L){return("00"+(L=L.toString())).substr(L.length)},Nt=0,Ot=[],Zt=[],qt=0,mr=[],_r=[],$r=!1,Kr=Zt;K.__private__.setCustomOutputDestination=function(L){$r=!0,Kr=L};var ys=function(L){$r||(Kr=L)};K.__private__.resetCustomOutputDestination=function(){$r=!1,Kr=Zt};var Ie=K.__private__.out=function(L){return L=L.toString(),qt+=L.length+1,Kr.push(L),Kr},Br=K.__private__.write=function(L){return Ie(arguments.length===1?L.toString():Array.prototype.join.call(arguments," "))},Fs=K.__private__.getArrayBuffer=function(L){for(var ie=L.length,De=new ArrayBuffer(ie),it=new Uint8Array(De);ie--;)it[ie]=L.charCodeAt(ie);return De},gs=[["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]];K.__private__.getStandardFonts=function(){return gs};var Sr=a.fontSize||16;K.__private__.setFontSize=K.setFontSize=function(L){return Sr=nt===Ct?L/Bs:L,this};var js,Zr=K.__private__.getFontSize=K.getFontSize=function(){return nt===ct?Sr:Sr*Bs},xs=a.R2L||!1;K.__private__.setR2L=K.setR2L=function(L){return xs=L,this},K.__private__.getR2L=K.getR2L=function(){return xs};var hs,jn=K.__private__.setZoomMode=function(L){if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(L))js=L;else if(isNaN(L)){if([void 0,null,"fullwidth","fullheight","fullpage","original"].indexOf(L)===-1)throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+L+'" is not recognized.');js=L}else js=parseInt(L,10)};K.__private__.getZoomMode=function(){return js};var tn,Ls=K.__private__.setPageMode=function(L){if([void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(L)==-1)throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+L+'" is not recognized.');hs=L};K.__private__.getPageMode=function(){return hs};var sn=K.__private__.setLayoutMode=function(L){if([void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(L)==-1)throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+L+'" is not recognized.');tn=L};K.__private__.getLayoutMode=function(){return tn},K.__private__.setDisplayMode=K.setDisplayMode=function(L,ie,De){return jn(L),sn(ie),Ls(De),this};var rn={title:"",subject:"",author:"",keywords:"",creator:""};K.__private__.getDocumentProperty=function(L){if(Object.keys(rn).indexOf(L)===-1)throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return rn[L]},K.__private__.getDocumentProperties=function(){return rn},K.__private__.setDocumentProperties=K.setProperties=K.setDocumentProperties=function(L){for(var ie in rn)rn.hasOwnProperty(ie)&&L[ie]&&(rn[ie]=L[ie]);return this},K.__private__.setDocumentProperty=function(L,ie){if(Object.keys(rn).indexOf(L)===-1)throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return rn[L]=ie};var Jr,Bs,os,oa,nn,Hs={},Ks={},Xn=[],vs={},Bn={},Ss={},ks={},Zn=null,Xs=0,bs=[],pn=new Le(K),Hi=a.hotfixes||[],_a={},qa={},si=[],Ns=function L(ie,De,it,At,ir,vr){if(!(this instanceof L))return new L(ie,De,it,At,ir,vr);isNaN(ie)&&(ie=1),isNaN(De)&&(De=0),isNaN(it)&&(it=0),isNaN(At)&&(At=1),isNaN(ir)&&(ir=0),isNaN(vr)&&(vr=0),this._matrix=[ie,De,it,At,ir,vr]};Object.defineProperty(Ns.prototype,"sx",{get:function(){return this._matrix[0]},set:function(L){this._matrix[0]=L}}),Object.defineProperty(Ns.prototype,"shy",{get:function(){return this._matrix[1]},set:function(L){this._matrix[1]=L}}),Object.defineProperty(Ns.prototype,"shx",{get:function(){return this._matrix[2]},set:function(L){this._matrix[2]=L}}),Object.defineProperty(Ns.prototype,"sy",{get:function(){return this._matrix[3]},set:function(L){this._matrix[3]=L}}),Object.defineProperty(Ns.prototype,"tx",{get:function(){return this._matrix[4]},set:function(L){this._matrix[4]=L}}),Object.defineProperty(Ns.prototype,"ty",{get:function(){return this._matrix[5]},set:function(L){this._matrix[5]=L}}),Object.defineProperty(Ns.prototype,"a",{get:function(){return this._matrix[0]},set:function(L){this._matrix[0]=L}}),Object.defineProperty(Ns.prototype,"b",{get:function(){return this._matrix[1]},set:function(L){this._matrix[1]=L}}),Object.defineProperty(Ns.prototype,"c",{get:function(){return this._matrix[2]},set:function(L){this._matrix[2]=L}}),Object.defineProperty(Ns.prototype,"d",{get:function(){return this._matrix[3]},set:function(L){this._matrix[3]=L}}),Object.defineProperty(Ns.prototype,"e",{get:function(){return this._matrix[4]},set:function(L){this._matrix[4]=L}}),Object.defineProperty(Ns.prototype,"f",{get:function(){return this._matrix[5]},set:function(L){this._matrix[5]=L}}),Object.defineProperty(Ns.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(Ns.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(Ns.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(Ns.prototype,"isIdentity",{get:function(){return this.sx===1&&this.shy===0&&this.shx===0&&this.sy===1&&this.tx===0&&this.ty===0}}),Ns.prototype.join=function(L){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(Et).join(L)},Ns.prototype.multiply=function(L){var ie=L.sx*this.sx+L.shy*this.shx,De=L.sx*this.shy+L.shy*this.sy,it=L.shx*this.sx+L.sy*this.shx,At=L.shx*this.shy+L.sy*this.sy,ir=L.tx*this.sx+L.ty*this.shx+this.tx,vr=L.tx*this.shy+L.ty*this.sy+this.ty;return new Ns(ie,De,it,At,ir,vr)},Ns.prototype.decompose=function(){var L=this.sx,ie=this.shy,De=this.shx,it=this.sy,At=this.tx,ir=this.ty,vr=Math.sqrt(L*L+ie*ie),Qr=(L/=vr)*De+(ie/=vr)*it;De-=L*Qr,it-=ie*Qr;var rs=Math.sqrt(De*De+it*it);return Qr/=rs,L*(it/=rs)<ie*(De/=rs)&&(L=-L,ie=-ie,Qr=-Qr,vr=-vr),{scale:new Ns(vr,0,0,rs,0,0),translate:new Ns(1,0,0,1,At,ir),rotate:new Ns(L,ie,-ie,L,0,0),skew:new Ns(1,0,Qr,1,0,0)}},Ns.prototype.toString=function(L){return this.join(" ")},Ns.prototype.inversed=function(){var L=this.sx,ie=this.shy,De=this.shx,it=this.sy,At=this.tx,ir=this.ty,vr=1/(L*it-ie*De),Qr=it*vr,rs=-ie*vr,_s=-De*vr,zs=L*vr;return new Ns(Qr,rs,_s,zs,-Qr*At-_s*ir,-rs*At-zs*ir)},Ns.prototype.applyToPoint=function(L){var ie=L.x*this.sx+L.y*this.shx+this.tx,De=L.x*this.shy+L.y*this.sy+this.ty;return new gi(ie,De)},Ns.prototype.applyToRectangle=function(L){var ie=this.applyToPoint(L),De=this.applyToPoint(new gi(L.x+L.w,L.y+L.h));return new hl(ie.x,ie.y,De.x-ie.x,De.y-ie.y)},Ns.prototype.clone=function(){var L=this.sx,ie=this.shy,De=this.shx,it=this.sy,At=this.tx,ir=this.ty;return new Ns(L,ie,De,it,At,ir)},K.Matrix=Ns;var Sa=K.matrixMult=function(L,ie){return ie.multiply(L)},ni=new Ns(1,0,0,1,0,0);K.unitMatrix=K.identityMatrix=ni;var ho=function(L,ie){if(!Bn[L]){var De=(ie instanceof rt?"Sh":"P")+(Object.keys(vs).length+1).toString(10);ie.id=De,Bn[L]=De,vs[De]=ie,pn.publish("addPattern",ie)}};K.ShadingPattern=rt,K.TilingPattern=xt,K.addShadingPattern=function(L,ie){return dt("addShadingPattern()"),ho(L,ie),this},K.beginTilingPattern=function(L){dt("beginTilingPattern()"),vi(L.boundingBox[0],L.boundingBox[1],L.boundingBox[2]-L.boundingBox[0],L.boundingBox[3]-L.boundingBox[1],L.matrix)},K.endTilingPattern=function(L,ie){dt("endTilingPattern()"),ie.stream=_r[Ve].join(`
250`),ho(L,ie),pn.publish("endTilingPattern",ie),si.pop().restore()};var ko,ra=K.__private__.newObject=function(){var L=xa();return Ba(L,!0),L},xa=K.__private__.newObjectDeferred=function(){return Nt++,Ot[Nt]=function(){return qt},Nt},Ba=function(L,ie){return ie=typeof ie=="boolean"&&ie,Ot[L]=qt,ie&&Ie(L+" 0 obj"),L},Ei=K.__private__.newAdditionalObject=function(){var L={objId:xa(),content:""};return mr.push(L),L},di=xa(),_o=xa(),$o=K.__private__.decodeColorString=function(L){var ie=L.split(" ");if(ie.length!==2||ie[1]!=="g"&&ie[1]!=="G")ie.length!==5||ie[4]!=="k"&&ie[4]!=="K"||(ie=[(1-ie[0])*(1-ie[3]),(1-ie[1])*(1-ie[3]),(1-ie[2])*(1-ie[3]),"r"]);else{var De=parseFloat(ie[0]);ie=[De,De,De,"r"]}for(var it="#",At=0;At<3;At++)it+=("0"+Math.floor(255*parseFloat(ie[At])).toString(16)).slice(-2);return it},Po=K.__private__.encodeColorString=function(L){var ie;typeof L=="string"&&(L={ch1:L});var De=L.ch1,it=L.ch2,At=L.ch3,ir=L.ch4,vr=L.pdfColorType==="draw"?["G","RG","K"]:["g","rg","k"];if(typeof De=="string"&&De.charAt(0)!=="#"){var Qr=new B(De);if(Qr.ok)De=Qr.toHex();else if(!/^\d*\.?\d*$/.test(De))throw new Error('Invalid color "'+De+'" passed to jsPDF.encodeColorString.')}if(typeof De=="string"&&/^#[0-9A-Fa-f]{3}$/.test(De)&&(De="#"+De[1]+De[1]+De[2]+De[2]+De[3]+De[3]),typeof De=="string"&&/^#[0-9A-Fa-f]{6}$/.test(De)){var rs=parseInt(De.substr(1),16);De=rs>>16&255,it=rs>>8&255,At=255&rs}if(it===void 0||ir===void 0&&De===it&&it===At)ie=typeof De=="string"?De+" "+vr[0]:L.precision===2?ke(De/255)+" "+vr[0]:Re(De/255)+" "+vr[0];else if(ir===void 0||(0,f.default)(ir)==="object"){if(ir&&!isNaN(ir.a)&&ir.a===0)return["1.","1.","1.",vr[1]].join(" ");ie=typeof De=="string"?[De,it,At,vr[1]].join(" "):L.precision===2?[ke(De/255),ke(it/255),ke(At/255),vr[1]].join(" "):[Re(De/255),Re(it/255),Re(At/255),vr[1]].join(" ")}else ie=typeof De=="string"?[De,it,At,ir,vr[2]].join(" "):L.precision===2?[ke(De),ke(it),ke(At),ke(ir),vr[2]].join(" "):[Re(De),Re(it),Re(At),Re(ir),vr[2]].join(" ");return ie},To=K.__private__.getFilters=function(){return V},fo=K.__private__.putStream=function(L){var ie=(L=L||{}).data||"",De=L.filters||To(),it=L.alreadyAppliedFilters||[],At=L.addLength1||!1,ir=ie.length,vr=L.objectId,Qr=function(Ta){return Ta};if(he!==null&&vr===void 0)throw new Error("ObjectId must be passed to putStream for file encryption");he!==null&&(Qr=Pa.encryptor(vr,0));var rs={};De===!0&&(De=["FlateEncode"]);var _s=L.additionalKeyValues||[],zs=(rs=He.API.processDataByFilters!==void 0?He.API.processDataByFilters(ie,De):{data:ie,reverseChain:[]}).reverseChain+(Array.isArray(it)?it.join(" "):it.toString());if(rs.data.length!==0&&(_s.push({key:"Length",value:rs.data.length}),At===!0&&_s.push({key:"Length1",value:ir})),zs.length!=0)if(zs.split("/").length-1==1)_s.push({key:"Filter",value:zs});else{_s.push({key:"Filter",value:"["+zs+"]"});for(var on=0;on<_s.length;on+=1)if(_s[on].key==="DecodeParms"){for(var Jn=[],ya=0;ya<rs.reverseChain.split("/").length-1;ya+=1)Jn.push("null");Jn.push(_s[on].value),_s[on].value="["+Jn.join(" ")+"]"}}Ie("<<");for(var Pn=0;Pn<_s.length;Pn++)Ie("/"+_s[Pn].key+" "+_s[Pn].value);Ie(">>"),rs.data.length!==0&&(Ie("stream"),Ie(Qr(rs.data)),Ie("endstream"))},ki=K.__private__.putPage=function(L){var ie=L.number,De=L.data,it=L.objId,At=L.contentsObjId;Ba(it,!0),Ie("<</Type /Page"),Ie("/Parent "+L.rootDictionaryObjId+" 0 R"),Ie("/Resources "+L.resourceDictionaryObjId+" 0 R"),Ie("/MediaBox ["+parseFloat(Et(L.mediaBox.bottomLeftX))+" "+parseFloat(Et(L.mediaBox.bottomLeftY))+" "+Et(L.mediaBox.topRightX)+" "+Et(L.mediaBox.topRightY)+"]"),L.cropBox!==null&&Ie("/CropBox ["+Et(L.cropBox.bottomLeftX)+" "+Et(L.cropBox.bottomLeftY)+" "+Et(L.cropBox.topRightX)+" "+Et(L.cropBox.topRightY)+"]"),L.bleedBox!==null&&Ie("/BleedBox ["+Et(L.bleedBox.bottomLeftX)+" "+Et(L.bleedBox.bottomLeftY)+" "+Et(L.bleedBox.topRightX)+" "+Et(L.bleedBox.topRightY)+"]"),L.trimBox!==null&&Ie("/TrimBox ["+Et(L.trimBox.bottomLeftX)+" "+Et(L.trimBox.bottomLeftY)+" "+Et(L.trimBox.topRightX)+" "+Et(L.trimBox.topRightY)+"]"),L.artBox!==null&&Ie("/ArtBox ["+Et(L.artBox.bottomLeftX)+" "+Et(L.artBox.bottomLeftY)+" "+Et(L.artBox.topRightX)+" "+Et(L.artBox.topRightY)+"]"),typeof L.userUnit=="number"&&L.userUnit!==1&&Ie("/UserUnit "+L.userUnit),pn.publish("putPage",{objId:it,pageContext:bs[ie],pageNumber:ie,page:De}),Ie("/Contents "+At+" 0 R"),Ie(">>"),Ie("endobj");var ir=De.join(`
251`);return nt===Ct&&(ir+=`
252Q`),Ba(At,!0),fo({data:ir,filters:To(),objectId:At}),Ie("endobj"),it},mo=K.__private__.putPages=function(){var L,ie,De=[];for(L=1;L<=Xs;L++)bs[L].objId=xa(),bs[L].contentsObjId=xa();for(L=1;L<=Xs;L++)De.push(ki({number:L,data:_r[L],objId:bs[L].objId,contentsObjId:bs[L].contentsObjId,mediaBox:bs[L].mediaBox,cropBox:bs[L].cropBox,bleedBox:bs[L].bleedBox,trimBox:bs[L].trimBox,artBox:bs[L].artBox,userUnit:bs[L].userUnit,rootDictionaryObjId:di,resourceDictionaryObjId:_o}));Ba(di,!0),Ie("<</Type /Pages");var it="/Kids [";for(ie=0;ie<Xs;ie++)it+=De[ie]+" 0 R ";Ie(it+"]"),Ie("/Count "+Xs),Ie(">>"),Ie("endobj"),pn.publish("postPutPages")},eo=function(L){pn.publish("putFont",{font:L,out:Ie,newObject:ra,putStream:fo}),L.isAlreadyPutted!==!0&&(L.objectNumber=ra(),Ie("<<"),Ie("/Type /Font"),Ie("/BaseFont /"+Se(L.postScriptName)),Ie("/Subtype /Type1"),typeof L.encoding=="string"&&Ie("/Encoding /"+L.encoding),Ie("/FirstChar 32"),Ie("/LastChar 255"),Ie(">>"),Ie("endobj"))},_i=function(L){L.objectNumber=ra();var ie=[];ie.push({key:"Type",value:"/XObject"}),ie.push({key:"Subtype",value:"/Form"}),ie.push({key:"BBox",value:"["+[Et(L.x),Et(L.y),Et(L.x+L.width),Et(L.y+L.height)].join(" ")+"]"}),ie.push({key:"Matrix",value:"["+L.matrix.toString()+"]"});var De=L.pages[1].join(`
253`);fo({data:De,additionalKeyValues:ie,objectId:L.objectNumber}),Ie("endobj")},Gi=function(L,ie){ie||(ie=21);var De=ra(),it=function(vr,Qr){var rs,_s=[],zs=1/(Qr-1);for(rs=0;rs<1;rs+=zs)_s.push(rs);if(_s.push(1),vr[0].offset!=0){var on={offset:0,color:vr[0].color};vr.unshift(on)}if(vr[vr.length-1].offset!=1){var Jn={offset:1,color:vr[vr.length-1].color};vr.push(Jn)}for(var ya="",Pn=0,Ta=0;Ta<_s.length;Ta++){for(rs=_s[Ta];rs>vr[Pn+1].offset;)Pn++;var o=vr[Pn].offset,ee=(rs-o)/(vr[Pn+1].offset-o),N=vr[Pn].color,be=vr[Pn+1].color;ya+=yt(Math.round((1-ee)*N[0]+ee*be[0]).toString(16))+yt(Math.round((1-ee)*N[1]+ee*be[1]).toString(16))+yt(Math.round((1-ee)*N[2]+ee*be[2]).toString(16))}return ya.trim()}(L.colors,ie),At=[];At.push({key:"FunctionType",value:"0"}),At.push({key:"Domain",value:"[0.0 1.0]"}),At.push({key:"Size",value:"["+ie+"]"}),At.push({key:"BitsPerSample",value:"8"}),At.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),At.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),fo({data:it,additionalKeyValues:At,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:De}),Ie("endobj"),L.objectNumber=ra(),Ie("<< /ShadingType "+L.type),Ie("/ColorSpace /DeviceRGB");var ir="/Coords ["+Et(parseFloat(L.coords[0]))+" "+Et(parseFloat(L.coords[1]))+" ";L.type===2?ir+=Et(parseFloat(L.coords[2]))+" "+Et(parseFloat(L.coords[3])):ir+=Et(parseFloat(L.coords[2]))+" "+Et(parseFloat(L.coords[3]))+" "+Et(parseFloat(L.coords[4]))+" "+Et(parseFloat(L.coords[5])),Ie(ir+="]"),L.matrix&&Ie("/Matrix ["+L.matrix.toString()+"]"),Ie("/Function "+De+" 0 R"),Ie("/Extend [true true]"),Ie(">>"),Ie("endobj")},Pi=function(L,ie){var De=xa(),it=ra();ie.push({resourcesOid:De,objectOid:it}),L.objectNumber=it;var At=[];At.push({key:"Type",value:"/Pattern"}),At.push({key:"PatternType",value:"1"}),At.push({key:"PaintType",value:"1"}),At.push({key:"TilingType",value:"1"}),At.push({key:"BBox",value:"["+L.boundingBox.map(Et).join(" ")+"]"}),At.push({key:"XStep",value:Et(L.xStep)}),At.push({key:"YStep",value:Et(L.yStep)}),At.push({key:"Resources",value:De+" 0 R"}),L.matrix&&At.push({key:"Matrix",value:"["+L.matrix.toString()+"]"}),fo({data:L.stream,additionalKeyValues:At,objectId:L.objectNumber}),Ie("endobj")},lc=function(L){for(var ie in L.objectNumber=ra(),Ie("<<"),L)switch(ie){case"opacity":Ie("/ca "+ke(L[ie]));break;case"stroke-opacity":Ie("/CA "+ke(L[ie]))}Ie(">>"),Ie("endobj")},ol=function(L){Ba(L.resourcesOid,!0),Ie("<<"),Ie("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),function(){for(var ie in Ie("/Font <<"),Hs)Hs.hasOwnProperty(ie)&&(we===!1||we===!0&&Oe.hasOwnProperty(ie))&&Ie("/"+ie+" "+Hs[ie].objectNumber+" 0 R");Ie(">>")}(),function(){if(Object.keys(vs).length>0){for(var ie in Ie("/Shading <<"),vs)vs.hasOwnProperty(ie)&&vs[ie]instanceof rt&&vs[ie].objectNumber>=0&&Ie("/"+ie+" "+vs[ie].objectNumber+" 0 R");pn.publish("putShadingPatternDict"),Ie(">>")}}(),function(ie){if(Object.keys(vs).length>0){for(var De in Ie("/Pattern <<"),vs)vs.hasOwnProperty(De)&&vs[De]instanceof K.TilingPattern&&vs[De].objectNumber>=0&&vs[De].objectNumber<ie&&Ie("/"+De+" "+vs[De].objectNumber+" 0 R");pn.publish("putTilingPatternDict"),Ie(">>")}}(L.objectOid),function(){if(Object.keys(Ss).length>0){var ie;for(ie in Ie("/ExtGState <<"),Ss)Ss.hasOwnProperty(ie)&&Ss[ie].objectNumber>=0&&Ie("/"+ie+" "+Ss[ie].objectNumber+" 0 R");pn.publish("putGStateDict"),Ie(">>")}}(),function(){for(var ie in Ie("/XObject <<"),_a)_a.hasOwnProperty(ie)&&_a[ie].objectNumber>=0&&Ie("/"+ie+" "+_a[ie].objectNumber+" 0 R");pn.publish("putXobjectDict"),Ie(">>")}(),Ie(">>"),Ie("endobj")},Dl=function(L){Ks[L.fontName]=Ks[L.fontName]||{},Ks[L.fontName][L.fontStyle]=L.id},Bl=function(L,ie,De,it,At){var ir={id:"F"+(Object.keys(Hs).length+1).toString(10),postScriptName:L,fontName:ie,fontStyle:De,encoding:it,isStandardFont:At||!1,metadata:{}};return pn.publish("addFont",{font:ir,instance:this}),Hs[ir.id]=ir,Dl(ir),ir.id},to=K.__private__.pdfEscape=K.pdfEscape=function(L,ie){return function(De,it){var At,ir,vr,Qr,rs,_s,zs,on,Jn;if(vr=(it=it||{}).sourceEncoding||"Unicode",rs=it.outputEncoding,(it.autoencode||rs)&&Hs[Jr].metadata&&Hs[Jr].metadata[vr]&&Hs[Jr].metadata[vr].encoding&&(Qr=Hs[Jr].metadata[vr].encoding,!rs&&Hs[Jr].encoding&&(rs=Hs[Jr].encoding),!rs&&Qr.codePages&&(rs=Qr.codePages[0]),typeof rs=="string"&&(rs=Qr[rs]),rs)){for(zs=!1,_s=[],At=0,ir=De.length;At<ir;At++)(on=rs[De.charCodeAt(At)])?_s.push(String.fromCharCode(on)):_s.push(De[At]),_s[At].charCodeAt(0)>>8&&(zs=!0);De=_s.join("")}for(At=De.length;zs===void 0&&At!==0;)De.charCodeAt(At-1)>>8&&(zs=!0),At--;if(!zs)return De;for(_s=it.noBOM?[]:[254,255],At=0,ir=De.length;At<ir;At++){if((Jn=(on=De.charCodeAt(At))>>8)>>8)throw new Error("Character at position "+At+" of string '"+De+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");_s.push(Jn),_s.push(on-(Jn<<8))}return String.fromCharCode.apply(void 0,_s)}(L,ie).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Ti=K.__private__.beginPage=function(L){_r[++Xs]=[],bs[Xs]={objId:0,contentsObjId:0,userUnit:Number(R),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(L[0]),topRightY:Number(L[1])}},zl(Xs),ys(_r[Ve])},Ul=function(L,ie){var De,it,At;switch(l=ie||l,typeof L=="string"&&(De=Ae(L.toLowerCase()),Array.isArray(De)&&(it=De[0],At=De[1])),Array.isArray(L)&&(it=L[0]*Bs,At=L[1]*Bs),isNaN(it)&&(it=b[0],At=b[1]),(it>14400||At>14400)&&(g.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),it=Math.min(14400,it),At=Math.min(14400,At)),b=[it,At],l.substr(0,1)){case"l":At>it&&(b=[At,it]);break;case"p":it>At&&(b=[At,it])}Ti(b),Is(Xl),Ie(oo),pi!==0&&Ie(pi+" J"),Zi!==0&&Ie(Zi+" j"),pn.publish("addPage",{pageNumber:Xs})},il=function(L){L>0&&L<=Xs&&(_r.splice(L,1),bs.splice(L,1),Xs--,Ve>Xs&&(Ve=Xs),this.setPage(Ve))},zl=function(L){L>0&&L<=Xs&&(Ve=L)},$l=K.__private__.getNumberOfPages=K.getNumberOfPages=function(){return _r.length-1},Vl=function(L,ie,De){var it,At=void 0;return De=De||{},L=L!==void 0?L:Hs[Jr].fontName,ie=ie!==void 0?ie:Hs[Jr].fontStyle,it=L.toLowerCase(),Ks[it]!==void 0&&Ks[it][ie]!==void 0?At=Ks[it][ie]:Ks[L]!==void 0&&Ks[L][ie]!==void 0?At=Ks[L][ie]:De.disableWarning===!1&&g.warn("Unable to look up font label for font '"+L+"', '"+ie+"'. Refer to getFontList() for available fonts."),At||De.noFallback||(At=Ks.times[ie])==null&&(At=Ks.times.normal),At},Lo=K.__private__.putInfo=function(){var L=ra(),ie=function(it){return it};for(var De in he!==null&&(ie=Pa.encryptor(L,0)),Ie("<<"),Ie("/Producer ("+to(ie("jsPDF "+He.version))+")"),rn)rn.hasOwnProperty(De)&&rn[De]&&Ie("/"+De.substr(0,1).toUpperCase()+De.substr(1)+" ("+to(ie(rn[De]))+")");Ie("/CreationDate ("+to(ie(Ut))+")"),Ie(">>"),Ie("endobj")},Yi=K.__private__.putCatalog=function(L){var ie=(L=L||{}).rootDictionaryObjId||di;switch(ra(),Ie("<<"),Ie("/Type /Catalog"),Ie("/Pages "+ie+" 0 R"),js||(js="fullwidth"),js){case"fullwidth":Ie("/OpenAction [3 0 R /FitH null]");break;case"fullheight":Ie("/OpenAction [3 0 R /FitV null]");break;case"fullpage":Ie("/OpenAction [3 0 R /Fit]");break;case"original":Ie("/OpenAction [3 0 R /XYZ null null 1]");break;default:var De=""+js;De.substr(De.length-1)==="%"&&(js=parseInt(js)/100),typeof js=="number"&&Ie("/OpenAction [3 0 R /XYZ null null "+ke(js)+"]")}switch(tn||(tn="continuous"),tn){case"continuous":Ie("/PageLayout /OneColumn");break;case"single":Ie("/PageLayout /SinglePage");break;case"two":case"twoleft":Ie("/PageLayout /TwoColumnLeft");break;case"tworight":Ie("/PageLayout /TwoColumnRight")}hs&&Ie("/PageMode /"+hs),pn.publish("putCatalog"),Ie(">>"),Ie("endobj")},cc=K.__private__.putTrailer=function(){Ie("trailer"),Ie("<<"),Ie("/Size "+(Nt+1)),Ie("/Root "+Nt+" 0 R"),Ie("/Info "+(Nt-1)+" 0 R"),he!==null&&Ie("/Encrypt "+Pa.oid+" 0 R"),Ie("/ID [ <"+Xt+"> <"+Xt+"> ]"),Ie(">>")},Us=K.__private__.putHeader=function(){Ie("%PDF-"+Je),Ie("%ºß¬à")},Wl=K.__private__.putXRef=function(){var L="0000000000";Ie("xref"),Ie("0 "+(Nt+1)),Ie("0000000000 65535 f ");for(var ie=1;ie<=Nt;ie++)typeof Ot[ie]=="function"?Ie((L+Ot[ie]()).slice(-10)+" 00000 n "):Ot[ie]!==void 0?Ie((L+Ot[ie]).slice(-10)+" 00000 n "):Ie("0000000000 00000 n ")},Vo=K.__private__.buildDocument=function(){var L;Nt=0,qt=0,Zt=[],Ot=[],mr=[],di=xa(),_o=xa(),ys(Zt),pn.publish("buildDocument"),Us(),mo(),function(){pn.publish("putAdditionalObjects");for(var De=0;De<mr.length;De++){var it=mr[De];Ba(it.objId,!0),Ie(it.content),Ie("endobj")}pn.publish("postPutAdditionalObjects")}(),L=[],function(){for(var De in Hs)Hs.hasOwnProperty(De)&&(we===!1||we===!0&&Oe.hasOwnProperty(De))&&eo(Hs[De])}(),function(){var De;for(De in Ss)Ss.hasOwnProperty(De)&&lc(Ss[De])}(),function(){for(var De in _a)_a.hasOwnProperty(De)&&_i(_a[De])}(),function(De){var it;for(it in vs)vs.hasOwnProperty(it)&&(vs[it]instanceof rt?Gi(vs[it]):vs[it]instanceof xt&&Pi(vs[it],De))}(L),pn.publish("putResources"),L.forEach(ol),ol({resourcesOid:_o,objectOid:Number.MAX_SAFE_INTEGER}),pn.publish("postPutResources"),he!==null&&(Pa.oid=ra(),Ie("<<"),Ie("/Filter /Standard"),Ie("/V "+Pa.v),Ie("/R "+Pa.r),Ie("/U <"+Pa.toHexString(Pa.U)+">"),Ie("/O <"+Pa.toHexString(Pa.O)+">"),Ie("/P "+Pa.P),Ie(">>"),Ie("endobj")),Lo(),Yi();var ie=qt;return Wl(),cc(),Ie("startxref"),Ie(""+ie),Ie("%%EOF"),ys(_r[Ve]),Zt.join(`
254`)},ll=K.__private__.getBlob=function(L){return new Blob([Fs(L)],{type:"application/pdf"})},dc=K.output=K.__private__.output=(ko=function(L,ie){switch(typeof(ie=ie||{})=="string"?ie={filename:ie}:ie.filename=ie.filename||"generated.pdf",L){case void 0:return Vo();case"save":K.save(ie.filename);break;case"arraybuffer":return Fs(Vo());case"blob":return ll(Vo());case"bloburi":case"bloburl":if(C.URL!==void 0&&typeof C.URL.createObjectURL=="function")return C.URL&&C.URL.createObjectURL(ll(Vo()))||void 0;g.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var De="",it=Vo();try{De=Y(it)}catch{De=Y(unescape(encodeURIComponent(it)))}return"data:application/pdf;filename="+ie.filename+";base64,"+De;case"pdfobjectnewwindow":if(Object.prototype.toString.call(C)==="[object Window]"){var At="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",ir=' integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==" crossorigin="anonymous"';ie.pdfObjectUrl&&(At=ie.pdfObjectUrl,ir="");var vr='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style><body><script src="'+At+'"'+ir+'><\/script><script >PDFObject.embed("'+this.output("dataurlstring")+'", '+JSON.stringify(ie)+");<\/script></body></html>",Qr=C.open();return Qr!==null&&Qr.document.write(vr),Qr}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if(Object.prototype.toString.call(C)==="[object Window]"){var rs='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style><body><iframe id="pdfViewer" src="'+(ie.pdfJsUrl||"examples/PDF.js/web/viewer.html")+"?file=&downloadName="+ie.filename+'" width="500px" height="400px" /></body></html>',_s=C.open();if(_s!==null){_s.document.write(rs);var zs=this;_s.document.documentElement.querySelector("#pdfViewer").onload=function(){_s.document.title=ie.filename,_s.document.documentElement.querySelector("#pdfViewer").contentWindow.PDFViewerApplication.open(zs.output("bloburl"))}}return _s}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if(Object.prototype.toString.call(C)!=="[object Window]")throw new Error("The option dataurlnewwindow just works in a browser-environment.");var on='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style><body><iframe src="'+this.output("datauristring",ie)+'"></iframe></body></html>',Jn=C.open();if(Jn!==null&&(Jn.document.write(on),Jn.document.title=ie.filename),Jn||typeof safari>"u")return Jn;break;case"datauri":case"dataurl":return C.document.location.href=this.output("datauristring",ie);default:return null}},ko.foo=function(){try{return ko.apply(this,arguments)}catch(De){var L=De.stack||"";~L.indexOf(" at ")&&(L=L.split(" at ")[1]);var ie="Error in function "+L.split(`
255`)[0].split("<")[0]+": "+De.message;if(!C.console)throw new Error(ie);C.console.error(ie,De),C.alert&&alert(ie)}},ko.foo.bar=ko,ko.foo),Wo=function(L){return Array.isArray(Hi)===!0&&Hi.indexOf(L)>-1};switch(p){case"pt":Bs=1;break;case"mm":Bs=2.834645669291339;break;case"cm":Bs=28.346456692913385;break;case"in":Bs=72;break;case"px":Bs=Wo("px_scaling")==1?.75:1.3333333333333333;break;case"pc":case"em":Bs=12;break;case"ex":Bs=6;break;default:if(typeof p!="number")throw new Error("Invalid unit: "+p);Bs=p}var Pa=null;Nr(),Pt();var ai=K.__private__.getPageInfo=K.getPageInfo=function(L){if(isNaN(L)||L%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:bs[L].objId,pageNumber:L,pageContext:bs[L]}},uc=K.__private__.getPageInfoByObjId=function(L){if(isNaN(L)||L%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var ie in bs)if(bs[ie].objId===L)break;return ai(ie)},ui=K.__private__.getCurrentPageInfo=K.getCurrentPageInfo=function(){return{objId:bs[Ve].objId,pageNumber:Ve,pageContext:bs[Ve]}};K.addPage=function(){return Ul.apply(this,arguments),this},K.setPage=function(){return zl.apply(this,arguments),ys.call(this,_r[Ve]),this},K.insertPage=function(L){return this.addPage(),this.movePage(Ve,L),this},K.movePage=function(L,ie){var De,it;if(L>ie){De=_r[L],it=bs[L];for(var At=L;At>ie;At--)_r[At]=_r[At-1],bs[At]=bs[At-1];_r[ie]=De,bs[ie]=it,this.setPage(ie)}else if(L<ie){De=_r[L],it=bs[L];for(var ir=L;ir<ie;ir++)_r[ir]=_r[ir+1],bs[ir]=bs[ir+1];_r[ie]=De,bs[ie]=it,this.setPage(ie)}return this},K.deletePage=function(){return il.apply(this,arguments),this},K.__private__.text=K.text=function(L,ie,De,it,At){var ir,vr,Qr,rs,_s,zs,on,Jn,ya,Pn=(it=it||{}).scope||this;if(typeof L=="number"&&typeof ie=="number"&&(typeof De=="string"||Array.isArray(De))){var Ta=De;De=ie,ie=L,L=Ta}if(arguments[3]instanceof Ns==0?(Qr=arguments[4],rs=arguments[5],(0,f.default)(on=arguments[3])==="object"&&on!==null||(typeof Qr=="string"&&(rs=Qr,Qr=null),typeof on=="string"&&(rs=on,on=null),typeof on=="number"&&(Qr=on,on=null),it={flags:on,angle:Qr,align:rs})):(dt("The transform parameter of text() with a Matrix value"),ya=At),isNaN(ie)||isNaN(De)||L==null)throw new Error("Invalid arguments passed to jsPDF.text");if(L.length===0)return Pn;var o,ee="",N=typeof it.lineHeightFactor=="number"?it.lineHeightFactor:Ki,be=Pn.internal.scaleFactor;function ze(Cn){return Cn=Cn.split("	").join(Array(it.TabLen||9).join(" ")),to(Cn,on)}function Me(Cn){for(var Hn,Oa=Cn.concat(),Ha=[],Qi=Oa.length;Qi--;)typeof(Hn=Oa.shift())=="string"?Ha.push(Hn):Array.isArray(Cn)&&(Hn.length===1||Hn[1]===void 0&&Hn[2]===void 0)?Ha.push(Hn[0]):Ha.push([Hn[0],Hn[1],Hn[2]]);return Ha}function Dt(Cn,Hn){var Oa;if(typeof Cn=="string")Oa=Hn(Cn)[0];else if(Array.isArray(Cn)){for(var Ha,Qi,Kc=Cn.concat(),jc=[],Od=Kc.length;Od--;)typeof(Ha=Kc.shift())=="string"?jc.push(Hn(Ha)[0]):Array.isArray(Ha)&&typeof Ha[0]=="string"&&(Qi=Hn(Ha[0],Ha[1],Ha[2]),jc.push([Qi[0],Qi[1],Qi[2]]));Oa=jc}return Oa}var jt=!1,Hr=!0;if(typeof L=="string")jt=!0;else if(Array.isArray(L)){var ut=L.concat();vr=[];for(var Rt,Cs=ut.length;Cs--;)(typeof(Rt=ut.shift())!="string"||Array.isArray(Rt)&&typeof Rt[0]!="string")&&(Hr=!1);jt=Hr}if(jt===!1)throw new Error('Type of text must be string or Array. "'+L+'" is not recognized.');typeof L=="string"&&(L=L.match(/[\r?\n]/)?L.split(/\r\n|\r|\n/g):[L]);var Dr=Sr/Pn.internal.scaleFactor,wr=Dr*(N-1);switch(it.baseline){case"bottom":De-=wr;break;case"top":De+=Dr-wr;break;case"hanging":De+=Dr-2*wr;break;case"middle":De+=Dr/2-wr}if((zs=it.maxWidth||0)>0&&(typeof L=="string"?L=Pn.splitTextToSize(L,zs):Object.prototype.toString.call(L)==="[object Array]"&&(L=L.reduce(function(Cn,Hn){return Cn.concat(Pn.splitTextToSize(Hn,zs))},[]))),ir={text:L,x:ie,y:De,options:it,mutex:{pdfEscape:to,activeFontKey:Jr,fonts:Hs,activeFontSize:Sr}},pn.publish("preProcessText",ir),L=ir.text,Qr=(it=ir.options).angle,ya instanceof Ns==0&&Qr&&typeof Qr=="number"){Qr*=Math.PI/180,it.rotationDirection===0&&(Qr=-Qr),nt===Ct&&(Qr=-Qr);var fs=Math.cos(Qr),Tn=Math.sin(Qr);ya=new Ns(fs,Tn,-Tn,fs,0,0)}else Qr&&Qr instanceof Ns&&(ya=Qr);nt!==Ct||ya||(ya=ni),(_s=it.charSpace||mi)!==void 0&&(ee+=Et(at(_s))+` Tc
256`,this.setCharSpace(this.getCharSpace()||0)),(Jn=it.horizontalScale)!==void 0&&(ee+=Et(100*Jn)+` Tz
257`),it.lang;var As=-1,Es=it.renderingMode!==void 0?it.renderingMode:it.stroke,an=Pn.internal.getCurrentPageInfo().pageContext;switch(Es){case 0:case!1:case"fill":As=0;break;case 1:case!0:case"stroke":As=1;break;case 2:case"fillThenStroke":As=2;break;case 3:case"invisible":As=3;break;case 4:case"fillAndAddForClipping":As=4;break;case 5:case"strokeAndAddPathForClipping":As=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":As=6;break;case 7:case"addToPathForClipping":As=7}var Zs=an.usedRenderingMode!==void 0?an.usedRenderingMode:-1;As!==-1?ee+=As+` Tr
258`:Zs!==-1&&(ee+=`0 Tr
259`),As!==-1&&(an.usedRenderingMode=As),rs=it.align||"left";var Or,en=Sr*N,ia=Pn.internal.pageSize.getWidth(),ms=Hs[Jr];_s=it.charSpace||mi,zs=it.maxWidth||0,on=Object.assign({autoencode:!0,noBOM:!0},it.flags);var ln=[],Gs=function(Cn){return Pn.getStringUnitWidth(Cn,{font:ms,charSpace:_s,fontSize:Sr,doKerning:!1})*Sr/be};if(Object.prototype.toString.call(L)==="[object Array]"){var cs;vr=Me(L),rs!=="left"&&(Or=vr.map(Gs));var Ps,io=0;if(rs==="right"){ie-=Or[0],L=[],Cs=vr.length;for(var oi=0;oi<Cs;oi++)oi===0?(Ps=hi(ie),cs=fi(De)):(Ps=at(io-Or[oi]),cs=-en),L.push([vr[oi],Ps,cs]),io=Or[oi]}else if(rs==="center"){ie-=Or[0]/2,L=[],Cs=vr.length;for(var Yo=0;Yo<Cs;Yo++)Yo===0?(Ps=hi(ie),cs=fi(De)):(Ps=at((io-Or[Yo])/2),cs=-en),L.push([vr[Yo],Ps,cs]),io=Or[Yo]}else if(rs==="left"){L=[],Cs=vr.length;for(var Oi=0;Oi<Cs;Oi++)L.push(vr[Oi])}else if(rs==="justify"&&ms.encoding==="Identity-H"){L=[],Cs=vr.length,zs=zs!==0?zs:ia;for(var yc=0,La=0;La<Cs;La++)if(cs=La===0?fi(De):-en,Ps=La===0?hi(ie):yc,La<Cs-1){var Ld=at((zs-Or[La])/(vr[La].split(" ").length-1)),Ii=vr[La].split(" ");L.push([Ii[0]+" ",Ps,cs]),yc=0;for(var Ri=1;Ri<Ii.length;Ri++){var Wc=(Gs(Ii[Ri-1]+" "+Ii[Ri])-Gs(Ii[Ri]))*be+Ld;Ri==Ii.length-1?L.push([Ii[Ri],Wc,0]):L.push([Ii[Ri]+" ",Wc,0]),yc-=Wc}}else L.push([vr[La],Ps,cs]);L.push(["",yc,0])}else{if(rs!=="justify")throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');for(L=[],Cs=vr.length,zs=zs!==0?zs:ia,La=0;La<Cs;La++){cs=La===0?fi(De):-en,Ps=La===0?hi(ie):0;var Hc=vr[La].split(" ").length-1,Gc=Hc>0?(zs-Or[La])/Hc:0;La<Cs-1?ln.push(Et(at(Gc))):ln.push(0),L.push([vr[La],Ps,cs])}}}(typeof it.R2L=="boolean"?it.R2L:xs)===!0&&(L=Dt(L,function(Cn,Hn,Oa){return[Cn.split("").reverse().join(""),Hn,Oa]})),ir={text:L,x:ie,y:De,options:it,mutex:{pdfEscape:to,activeFontKey:Jr,fonts:Hs,activeFontSize:Sr}},pn.publish("postProcessText",ir),L=ir.text,o=ir.mutex.isHex||!1;var Yc=Hs[Jr].encoding;Yc!=="WinAnsiEncoding"&&Yc!=="StandardEncoding"||(L=Dt(L,function(Cn,Hn,Oa){return[ze(Cn),Hn,Oa]})),vr=Me(L),L=[];for(var ml,pl,gl,Ql=Array.isArray(vr[0])?1:0,vl="",ql=function(Cn,Hn,Oa){var Ha="";return Oa instanceof Ns?(Oa=typeof it.angle=="number"?Sa(Oa,new Ns(1,0,0,1,Cn,Hn)):Sa(new Ns(1,0,0,1,Cn,Hn),Oa),nt===Ct&&(Oa=Sa(new Ns(1,0,0,-1,0,0),Oa)),Ha=Oa.join(" ")+` Tm
260`):Ha=Et(Cn)+" "+Et(Hn)+` Td
261`,Ha},ii=0;ii<vr.length;ii++){switch(vl="",Ql){case 1:gl=(o?"<":"(")+vr[ii][0]+(o?">":")"),ml=parseFloat(vr[ii][1]),pl=parseFloat(vr[ii][2]);break;case 0:gl=(o?"<":"(")+vr[ii]+(o?">":")"),ml=hi(ie),pl=fi(De)}ln!==void 0&&ln[ii]!==void 0&&(vl=ln[ii]+` Tw
262`),ii===0?L.push(vl+ql(ml,pl,ya)+gl):Ql===0?L.push(vl+gl):Ql===1&&L.push(vl+ql(ml,pl,ya)+gl)}L=Ql===0?L.join(` Tj
263T* `):L.join(` Tj
264`),L+=` Tj
265`;var Mi=`BT
266/`;return Mi+=Jr+" "+Sr+` Tf
267`,Mi+=Et(Sr*N)+` TL
268`,Mi+=Xi+`
269`,Mi+=ee,Mi+=L,Ie(Mi+="ET"),Oe[Jr]=!0,Pn};var hc=K.__private__.clip=K.clip=function(L){return Ie(L==="evenodd"?"W*":"W"),this};K.clipEvenOdd=function(){return hc("evenodd")},K.__private__.discardPath=K.discardPath=function(){return Ie("n"),this};var Ho=K.__private__.isValidStyle=function(L){var ie=!1;return[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(L)!==-1&&(ie=!0),ie};K.__private__.setDefaultPathOperation=K.setDefaultPathOperation=function(L){return Ho(L)&&(Q=L),this};var Hl=K.__private__.getStyle=K.getStyle=function(L){var ie=Q;switch(L){case"D":case"S":ie="S";break;case"F":ie="f";break;case"FD":case"DF":ie="B";break;case"f":case"f*":case"B":case"B*":ie=L}return ie},Gl=K.close=function(){return Ie("h"),this};K.stroke=function(){return Ie("S"),this},K.fill=function(L){return cl("f",L),this},K.fillEvenOdd=function(L){return cl("f*",L),this},K.fillStroke=function(L){return cl("B",L),this},K.fillStrokeEvenOdd=function(L){return cl("B*",L),this};var cl=function(L,ie){(0,f.default)(ie)==="object"?Kl(ie,L):Ie(L)},Li=function(L){L===null||nt===Ct&&L===void 0||(L=Hl(L),Ie(L))};function Yl(L,ie,De,it,At){var ir=new xt(ie||this.boundingBox,De||this.xStep,it||this.yStep,this.gState,At||this.matrix);ir.stream=this.stream;var vr=L+"$$"+this.cloneIndex+++"$$";return ho(vr,ir),ir}var Kl=function(L,ie){var De=Bn[L.key],it=vs[De];if(it instanceof rt)Ie("q"),Ie(Rc(ie)),it.gState&&K.setGState(it.gState),Ie(L.matrix.toString()+" cm"),Ie("/"+De+" sh"),Ie("Q");else if(it instanceof xt){var At=new Ns(1,0,0,-1,0,Ji());L.matrix&&(At=At.multiply(L.matrix||ni),De=Yl.call(it,L.key,L.boundingBox,L.xStep,L.yStep,At).id),Ie("q"),Ie("/Pattern cs"),Ie("/"+De+" scn"),it.gState&&K.setGState(it.gState),Ie(ie),Ie("Q")}},Rc=function(L){switch(L){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"}},dl=K.moveTo=function(L,ie){return Ie(Et(at(L))+" "+Et(ot(ie))+" m"),this},fc=K.lineTo=function(L,ie){return Ie(Et(at(L))+" "+Et(ot(ie))+" l"),this},Go=K.curveTo=function(L,ie,De,it,At,ir){return Ie([Et(at(L)),Et(ot(ie)),Et(at(De)),Et(ot(it)),Et(at(At)),Et(ot(ir)),"c"].join(" ")),this};K.__private__.line=K.line=function(L,ie,De,it,At){if(isNaN(L)||isNaN(ie)||isNaN(De)||isNaN(it)||!Ho(At))throw new Error("Invalid arguments passed to jsPDF.line");return nt===ct?this.lines([[De-L,it-ie]],L,ie,[1,1],At||"S"):this.lines([[De-L,it-ie]],L,ie,[1,1]).stroke()},K.__private__.lines=K.lines=function(L,ie,De,it,At,ir){var vr,Qr,rs,_s,zs,on,Jn,ya,Pn,Ta,o,ee;if(typeof L=="number"&&(ee=De,De=ie,ie=L,L=ee),it=it||[1,1],ir=ir||!1,isNaN(ie)||isNaN(De)||!Array.isArray(L)||!Array.isArray(it)||!Ho(At)||typeof ir!="boolean")throw new Error("Invalid arguments passed to jsPDF.lines");for(dl(ie,De),vr=it[0],Qr=it[1],_s=L.length,Ta=ie,o=De,rs=0;rs<_s;rs++)(zs=L[rs]).length===2?(Ta=zs[0]*vr+Ta,o=zs[1]*Qr+o,fc(Ta,o)):(on=zs[0]*vr+Ta,Jn=zs[1]*Qr+o,ya=zs[2]*vr+Ta,Pn=zs[3]*Qr+o,Ta=zs[4]*vr+Ta,o=zs[5]*Qr+o,Go(on,Jn,ya,Pn,Ta,o));return ir&&Gl(),Li(At),this},K.path=function(L){for(var ie=0;ie<L.length;ie++){var De=L[ie],it=De.c;switch(De.op){case"m":dl(it[0],it[1]);break;case"l":fc(it[0],it[1]);break;case"c":Go.apply(this,it);break;case"h":Gl()}}return this},K.__private__.rect=K.rect=function(L,ie,De,it,At){if(isNaN(L)||isNaN(ie)||isNaN(De)||isNaN(it)||!Ho(At))throw new Error("Invalid arguments passed to jsPDF.rect");return nt===ct&&(it=-it),Ie([Et(at(L)),Et(ot(ie)),Et(at(De)),Et(at(it)),"re"].join(" ")),Li(At),this},K.__private__.triangle=K.triangle=function(L,ie,De,it,At,ir,vr){if(isNaN(L)||isNaN(ie)||isNaN(De)||isNaN(it)||isNaN(At)||isNaN(ir)||!Ho(vr))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[De-L,it-ie],[At-De,ir-it],[L-At,ie-ir]],L,ie,[1,1],vr,!0),this},K.__private__.roundedRect=K.roundedRect=function(L,ie,De,it,At,ir,vr){if(isNaN(L)||isNaN(ie)||isNaN(De)||isNaN(it)||isNaN(At)||isNaN(ir)||!Ho(vr))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var Qr=4/3*(Math.SQRT2-1);return At=Math.min(At,.5*De),ir=Math.min(ir,.5*it),this.lines([[De-2*At,0],[At*Qr,0,At,ir-ir*Qr,At,ir],[0,it-2*ir],[0,ir*Qr,-At*Qr,ir,-At,ir],[2*At-De,0],[-At*Qr,0,-At,-ir*Qr,-At,-ir],[0,2*ir-it],[0,-ir*Qr,At*Qr,-ir,At,-ir]],L+At,ie,[1,1],vr,!0),this},K.__private__.ellipse=K.ellipse=function(L,ie,De,it,At){if(isNaN(L)||isNaN(ie)||isNaN(De)||isNaN(it)||!Ho(At))throw new Error("Invalid arguments passed to jsPDF.ellipse");var ir=4/3*(Math.SQRT2-1)*De,vr=4/3*(Math.SQRT2-1)*it;return dl(L+De,ie),Go(L+De,ie-vr,L+ir,ie-it,L,ie-it),Go(L-ir,ie-it,L-De,ie-vr,L-De,ie),Go(L-De,ie+vr,L-ir,ie+it,L,ie+it),Go(L+ir,ie+it,L+De,ie+vr,L+De,ie),Li(At),this},K.__private__.circle=K.circle=function(L,ie,De,it){if(isNaN(L)||isNaN(ie)||isNaN(De)||!Ho(it))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(L,ie,De,De,it)},K.setFont=function(L,ie,De){return De&&(ie=Gt(ie,De)),Jr=Vl(L,ie,{disableWarning:!1}),this};var Mc=K.__private__.getFont=K.getFont=function(){return Hs[Vl.apply(K,arguments)]};K.__private__.getFontList=K.getFontList=function(){var L,ie,De={};for(L in Ks)if(Ks.hasOwnProperty(L))for(ie in De[L]=[],Ks[L])Ks[L].hasOwnProperty(ie)&&De[L].push(ie);return De},K.addFont=function(L,ie,De,it,At){var ir=["StandardEncoding","MacRomanEncoding","Identity-H","WinAnsiEncoding"];return arguments[3]&&ir.indexOf(arguments[3])!==-1?At=arguments[3]:arguments[3]&&ir.indexOf(arguments[3])==-1&&(De=Gt(De,it)),Bl.call(this,L,ie,De,At=At||"Identity-H")};var Ki,Xl=a.lineWidth||.200025,Fc=K.__private__.getLineWidth=K.getLineWidth=function(){return Xl},Is=K.__private__.setLineWidth=K.setLineWidth=function(L){return Xl=L,Ie(Et(at(L))+" w"),this};K.__private__.setLineDash=He.API.setLineDash=He.API.setLineDashPattern=function(L,ie){if(L=L||[],ie=ie||0,isNaN(ie)||!Array.isArray(L))throw new Error("Invalid arguments passed to jsPDF.setLineDash");return L=L.map(function(De){return Et(at(De))}).join(" "),ie=Et(at(ie)),Ie("["+L+"] "+ie+" d"),this};var Dc=K.__private__.getLineHeight=K.getLineHeight=function(){return Sr*Ki};K.__private__.getLineHeight=K.getLineHeight=function(){return Sr*Ki};var Bc=K.__private__.setLineHeightFactor=K.setLineHeightFactor=function(L){return typeof(L=L||1.15)=="number"&&(Ki=L),this},Uc=K.__private__.getLineHeightFactor=K.getLineHeightFactor=function(){return Ki};Bc(a.lineHeight);var hi=K.__private__.getHorizontalCoordinate=function(L){return at(L)},fi=K.__private__.getVerticalCoordinate=function(L){return nt===Ct?L:bs[Ve].mediaBox.topRightY-bs[Ve].mediaBox.bottomLeftY-at(L)},zc=K.__private__.getHorizontalCoordinateString=K.getHorizontalCoordinateString=function(L){return Et(hi(L))},$c=K.__private__.getVerticalCoordinateString=K.getVerticalCoordinateString=function(L){return Et(fi(L))},oo=a.strokeColor||"0 G";K.__private__.getStrokeColor=K.getDrawColor=function(){return $o(oo)},K.__private__.setStrokeColor=K.setDrawColor=function(L,ie,De,it){return oo=Po({ch1:L,ch2:ie,ch3:De,ch4:it,pdfColorType:"draw",precision:2}),Ie(oo),this};var Zl=a.fillColor||"0 g";K.__private__.getFillColor=K.getFillColor=function(){return $o(Zl)},K.__private__.setFillColor=K.setFillColor=function(L,ie,De,it){return Zl=Po({ch1:L,ch2:ie,ch3:De,ch4:it,pdfColorType:"fill",precision:2}),Ie(Zl),this};var Xi=a.textColor||"0 g",mc=K.__private__.getTextColor=K.getTextColor=function(){return $o(Xi)};K.__private__.setTextColor=K.setTextColor=function(L,ie,De,it){return Xi=Po({ch1:L,ch2:ie,ch3:De,ch4:it,pdfColorType:"text",precision:3}),this};var mi=a.charSpace,Vc=K.__private__.getCharSpace=K.getCharSpace=function(){return parseFloat(mi||0)};K.__private__.setCharSpace=K.setCharSpace=function(L){if(isNaN(L))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return mi=L,this};var pi=0;K.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},K.__private__.setLineCap=K.setLineCap=function(L){var ie=K.CapJoinStyles[L];if(ie===void 0)throw new Error("Line cap style of '"+L+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return pi=ie,Ie(ie+" J"),this};var Zi=0;K.__private__.setLineJoin=K.setLineJoin=function(L){var ie=K.CapJoinStyles[L];if(ie===void 0)throw new Error("Line join style of '"+L+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Zi=ie,Ie(ie+" j"),this},K.__private__.setLineMiterLimit=K.__private__.setMiterLimit=K.setLineMiterLimit=K.setMiterLimit=function(L){if(L=L||0,isNaN(L))throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");return Ie(Et(at(L))+" M"),this},K.GState=st,K.setGState=function(L){(L=typeof L=="string"?Ss[ks[L]]:ul(null,L)).equals(Zn)||(Ie("/"+L.id+" gs"),Zn=L)};var ul=function(L,ie){if(!L||!ks[L]){var De=!1;for(var it in Ss)if(Ss.hasOwnProperty(it)&&Ss[it].equals(ie)){De=!0;break}if(De)ie=Ss[it];else{var At="GS"+(Object.keys(Ss).length+1).toString(10);Ss[At]=ie,ie.id=At}return L&&(ks[L]=ie.id),pn.publish("addGState",ie),ie}};K.addGState=function(L,ie){return ul(L,ie),this},K.saveGraphicsState=function(){return Ie("q"),Xn.push({key:Jr,size:Sr,color:Xi}),this},K.restoreGraphicsState=function(){Ie("Q");var L=Xn.pop();return Jr=L.key,Sr=L.size,Xi=L.color,Zn=null,this},K.setCurrentTransformationMatrix=function(L){return Ie(L.toString()+" cm"),this},K.comment=function(L){return Ie("#"+L),this};var gi=function(L,ie){var De=L||0;Object.defineProperty(this,"x",{enumerable:!0,get:function(){return De},set:function(ir){isNaN(ir)||(De=parseFloat(ir))}});var it=ie||0;Object.defineProperty(this,"y",{enumerable:!0,get:function(){return it},set:function(ir){isNaN(ir)||(it=parseFloat(ir))}});var At="pt";return Object.defineProperty(this,"type",{enumerable:!0,get:function(){return At},set:function(ir){At=ir.toString()}}),this},hl=function(L,ie,De,it){gi.call(this,L,ie),this.type="rect";var At=De||0;Object.defineProperty(this,"w",{enumerable:!0,get:function(){return At},set:function(vr){isNaN(vr)||(At=parseFloat(vr))}});var ir=it||0;return Object.defineProperty(this,"h",{enumerable:!0,get:function(){return ir},set:function(vr){isNaN(vr)||(ir=parseFloat(vr))}}),this},fl=function(){this.page=Xs,this.currentPage=Ve,this.pages=_r.slice(0),this.pagesContext=bs.slice(0),this.x=os,this.y=oa,this.matrix=nn,this.width=Jl(Ve),this.height=gc(Ve),this.outputDestination=Kr,this.id="",this.objectNumber=-1};fl.prototype.restore=function(){Xs=this.page,Ve=this.currentPage,bs=this.pagesContext,_r=this.pages,os=this.x,oa=this.y,nn=this.matrix,pc(Ve,this.width),yi(Ve,this.height),Kr=this.outputDestination};var vi=function(L,ie,De,it,At){si.push(new fl),Xs=Ve=0,_r=[],os=L,oa=ie,nn=At,Ti([De,it])};for(var xi in K.beginFormObject=function(L,ie,De,it,At){return vi(L,ie,De,it,At),this},K.endFormObject=function(L){return function(ie){if(qa[ie])si.pop().restore();else{var De=new fl,it="Xo"+(Object.keys(_a).length+1).toString(10);De.id=it,qa[ie]=it,_a[it]=De,pn.publish("addFormObject",De),si.pop().restore()}}(L),this},K.doFormObject=function(L,ie){var De=_a[qa[L]];return Ie("q"),Ie(ie.toString()+" cm"),Ie("/"+De.id+" Do"),Ie("Q"),this},K.getFormObject=function(L){var ie=_a[qa[L]];return{x:ie.x,y:ie.y,width:ie.width,height:ie.height,matrix:ie.matrix}},K.save=function(L,ie){return L=L||"generated.pdf",(ie=ie||{}).returnPromise=ie.returnPromise||!1,ie.returnPromise===!1?(M(ll(Vo()),L),typeof M.unload=="function"&&C.setTimeout&&setTimeout(M.unload,911),this):new Promise(function(De,it){try{var At=M(ll(Vo()),L);typeof M.unload=="function"&&C.setTimeout&&setTimeout(M.unload,911),De(At)}catch(ir){it(ir.message)}})},He.API)He.API.hasOwnProperty(xi)&&(xi==="events"&&He.API.events.length?function(L,ie){var De,it,At;for(At=ie.length-1;At!==-1;At--)De=ie[At][0],it=ie[At][1],L.subscribe.apply(L,[De].concat(typeof it=="function"?[it]:it))}(pn,He.API.events):K[xi]=He.API[xi]);function Jl(L){return bs[L].mediaBox.topRightX-bs[L].mediaBox.bottomLeftX}function pc(L,ie){bs[L].mediaBox.topRightX=ie+bs[L].mediaBox.bottomLeftX}function gc(L){return bs[L].mediaBox.topRightY-bs[L].mediaBox.bottomLeftY}function yi(L,ie){bs[L].mediaBox.topRightY=ie+bs[L].mediaBox.bottomLeftY}var ji=K.getPageWidth=function(L){return Jl(L=L||Ve)/Bs},vc=K.setPageWidth=function(L,ie){pc(L,ie*Bs)},Ji=K.getPageHeight=function(L){return gc(L=L||Ve)/Bs},xc=K.setPageHeight=function(L,ie){yi(L,ie*Bs)};return K.internal={pdfEscape:to,getStyle:Hl,getFont:Mc,getFontSize:Zr,getCharSpace:Vc,getTextColor:mc,getLineHeight:Dc,getLineHeightFactor:Uc,getLineWidth:Fc,write:Br,getHorizontalCoordinate:hi,getVerticalCoordinate:fi,getCoordinateString:zc,getVerticalCoordinateString:$c,collections:{},newObject:ra,newAdditionalObject:Ei,newObjectDeferred:xa,newObjectDeferredBegin:Ba,getFilters:To,putStream:fo,events:pn,scaleFactor:Bs,pageSize:{getWidth:function(){return ji(Ve)},setWidth:function(L){vc(Ve,L)},getHeight:function(){return Ji(Ve)},setHeight:function(L){xc(Ve,L)}},encryptionOptions:he,encryption:Pa,getEncryptor:function(L){return he!==null?Pa.encryptor(L,0):function(ie){return ie}},output:dc,getNumberOfPages:$l,get pages(){return _r},out:Ie,f2:ke,f3:Re,getPageInfo:ai,getPageInfoByObjId:uc,getCurrentPageInfo:ui,getPDFVersion:Fe,Point:gi,Rectangle:hl,Matrix:Ns,hasHotfix:Wo},Object.defineProperty(K.internal.pageSize,"width",{get:function(){return ji(Ve)},set:function(L){vc(Ve,L)},enumerable:!0,configurable:!0}),Object.defineProperty(K.internal.pageSize,"height",{get:function(){return Ji(Ve)},set:function(L){xc(Ve,L)},enumerable:!0,configurable:!0}),(function(L){for(var ie=0,De=gs.length;ie<De;ie++){var it=Bl.call(this,L[ie][0],L[ie][1],L[ie][2],gs[ie][3],!0);we===!1&&(Oe[it]=!0);var At=L[ie][0].split("-");Dl({id:it,fontName:At[0],fontStyle:At[1]||""})}pn.publish("addFonts",{fonts:Hs,dictionary:Ks})}).call(K,gs),Jr="F1",Ul(b,l),pn.publish("initialized"),K}ye.prototype.lsbFirstWord=function(a){return String.fromCharCode(255&a,a>>8&255,a>>16&255,a>>24&255)},ye.prototype.toHexString=function(a){return a.split("").map(function(n){return("0"+(255&n.charCodeAt(0)).toString(16)).slice(-2)}).join("")},ye.prototype.hexToBytes=function(a){for(var n=[],l=0;l<a.length;l+=2)n.push(String.fromCharCode(parseInt(a.substr(l,2),16)));return n.join("")},ye.prototype.processOwnerPassword=function(a,n){return re(ge(n).substr(0,5),a)},ye.prototype.encryptor=function(a,n){var l=ge(this.encryptionKey+String.fromCharCode(255&a,a>>8&255,a>>16&255,255&n,n>>8&255)).substr(0,10);return function(p){return re(l,p)}},st.prototype.equals=function(a){var n,l="id,objectNumber,equals";if(!a||(0,f.default)(a)!==(0,f.default)(this))return!1;var p=0;for(n in this)if(!(l.indexOf(n)>=0)){if(this.hasOwnProperty(n)&&!a.hasOwnProperty(n)||this[n]!==a[n])return!1;p++}for(n in a)a.hasOwnProperty(n)&&l.indexOf(n)<0&&p--;return p===0},He.API={events:[]},He.version="4.0.0";var Tt=He.API,Kt=1,Jt=function(a){return a.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},rr=function(a){return a.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},Ht=function(a){return a.toFixed(2)},yr=function(a){return a.toFixed(5)};Tt.__acroform__={};var gr=function(a,n){a.prototype=Object.create(n.prototype),a.prototype.constructor=a},Vr=function(a){return a*Kt},jr=function(a){var n=new Wt,l=or.internal.getHeight(a)||0,p=or.internal.getWidth(a)||0;return n.BBox=[0,0,Number(Ht(p)),Number(Ht(l))],n},Xr=Tt.__acroform__.setBit=function(a,n){if(a=a||0,n=n||0,isNaN(a)||isNaN(n))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return a|1<<n},et=Tt.__acroform__.clearBit=function(a,n){if(a=a||0,n=n||0,isNaN(a)||isNaN(n))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");return a&~(1<<n)},ft=Tt.__acroform__.getBit=function(a,n){if(isNaN(a)||isNaN(n))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return a&1<<n?1:0},je=Tt.__acroform__.getBitForPdf=function(a,n){if(isNaN(a)||isNaN(n))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return ft(a,n-1)},$e=Tt.__acroform__.setBitForPdf=function(a,n){if(isNaN(a)||isNaN(n))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return Xr(a,n-1)},ht=Tt.__acroform__.clearBitForPdf=function(a,n){if(isNaN(a)||isNaN(n))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return et(a,n-1)},tt=Tt.__acroform__.calculateCoordinates=function(a,n){var l=n.internal.getHorizontalCoordinate,p=n.internal.getVerticalCoordinate,b=a[0],E=a[1],V=a[2],R=a[3],F={};return F.lowerLeft_X=l(b)||0,F.lowerLeft_Y=p(E+R)||0,F.upperRight_X=l(b+V)||0,F.upperRight_Y=p(E)||0,[Number(Ht(F.lowerLeft_X)),Number(Ht(F.lowerLeft_Y)),Number(Ht(F.upperRight_X)),Number(Ht(F.upperRight_Y))]},Ze=function(a){if(a.appearanceStreamContent)return a.appearanceStreamContent;if(a.V||a.DV){var n=[],l=a._V||a.DV,p=Ft(a,l),b=a.scope.internal.getFont(a.fontName,a.fontStyle).id;n.push("/Tx BMC"),n.push("q"),n.push("BT"),n.push(a.scope.__private__.encodeColorString(a.color)),n.push("/"+b+" "+Ht(p.fontSize)+" Tf"),n.push("1 0 0 1 0 0 Tm"),n.push(p.text),n.push("ET"),n.push("Q"),n.push("EMC");var E=jr(a);return E.scope=a.scope,E.stream=n.join(`
270`),E}},Ft=function(a,n){var l=a.fontSize===0?a.maxFontSize:a.fontSize,p={text:"",fontSize:""},b=(n=(n=n.substr(0,1)=="("?n.substr(1):n).substr(n.length-1)==")"?n.substr(0,n.length-1):n).split(" ");b=a.multiline?b.map(function(ke){return ke.split(`
271`)}):b.map(function(ke){return[ke]});var E=l,V=or.internal.getHeight(a)||0;V=V<0?-V:V;var R=or.internal.getWidth(a)||0;R=R<0?-R:R;var F=function(ke,Re,at){if(ke+1<b.length){var ot=Re+" "+b[ke+1][0];return lt(ot,a,at).width<=R-4}return!1};E++;e:for(;E>0;){n="",E--;var Q,he,we=lt("3",a,E).height,Oe=a.multiline?V-E:(V-we)/2,K=Oe+=2,Je=0,Fe=0,Qe=0;if(E<=0){n=`(...) Tj
272`,n+="% Width of Text: "+lt(n,a,E=12).width+", FieldWidth:"+R+`
273`;break}for(var Ae="",ct=0,Ct=0;Ct<b.length;Ct++)if(b.hasOwnProperty(Ct)){var nt=!1;if(b[Ct].length!==1&&Qe!==b[Ct].length-1){if((we+2)*(ct+2)+2>V)continue e;Ae+=b[Ct][Qe],nt=!0,Fe=Ct,Ct--}else{Ae=(Ae+=b[Ct][Qe]+" ").substr(Ae.length-1)==" "?Ae.substr(0,Ae.length-1):Ae;var Ce=parseInt(Ct),bt=F(Ce,Ae,E),Gt=Ct>=b.length-1;if(bt&&!Gt){Ae+=" ",Qe=0;continue}if(bt||Gt){if(Gt)Fe=Ce;else if(a.multiline&&(we+2)*(ct+2)+2>V)continue e}else{if(!a.multiline||(we+2)*(ct+2)+2>V)continue e;Fe=Ce}}for(var Et="",dt=Je;dt<=Fe;dt++){var $t=b[dt];if(a.multiline){if(dt===Fe){Et+=$t[Qe]+" ",Qe=(Qe+1)%$t.length;continue}if(dt===Je){Et+=$t[$t.length-1]+" ";continue}}Et+=$t[0]+" "}switch(Et=Et.substr(Et.length-1)==" "?Et.substr(0,Et.length-1):Et,he=lt(Et,a,E).width,a.textAlign){case"right":Q=R-he-2;break;case"center":Q=(R-he)/2;break;default:Q=2}n+=Ht(Q)+" "+Ht(K)+` Td
274`,n+="("+Jt(Et)+`) Tj
275`,n+=-Ht(Q)+` 0 Td
276`,K=-(E+2),he=0,Je=nt?Fe:Fe+1,ct++,Ae=""}break}return p.text=n,p.fontSize=E,p},lt=function(a,n,l){var p=n.scope.internal.getFont(n.fontName,n.fontStyle),b=n.scope.getStringUnitWidth(a,{font:p,fontSize:parseFloat(l),charSpace:0})*parseFloat(l);return{height:n.scope.getStringUnitWidth("3",{font:p,fontSize:parseFloat(l),charSpace:0})*parseFloat(l)*1.5,width:b}},_t={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},dr=function(a,n){var l={type:"reference",object:a};n.internal.getPageInfo(a.page).pageContext.annotations.find(function(p){return p.type===l.type&&p.object===l.object})===void 0&&n.internal.getPageInfo(a.page).pageContext.annotations.push(l)},fr=function(a,n){if(n.scope=a,a.internal!==void 0&&(a.internal.acroformPlugin===void 0||a.internal.acroformPlugin.isInitialized===!1)){if(Yt.FieldNum=0,a.internal.acroformPlugin=JSON.parse(JSON.stringify(_t)),a.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");Kt=a.internal.scaleFactor,a.internal.acroformPlugin.acroFormDictionaryRoot=new Ir,a.internal.acroformPlugin.acroFormDictionaryRoot.scope=a,a.internal.acroformPlugin.acroFormDictionaryRoot._eventID=a.internal.events.subscribe("postPutResources",function(){(function(l){l.internal.events.unsubscribe(l.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete l.internal.acroformPlugin.acroFormDictionaryRoot._eventID,l.internal.acroformPlugin.printedOut=!0})(a)}),a.internal.events.subscribe("buildDocument",function(){(function(l){l.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var p=l.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var b in p)if(p.hasOwnProperty(b)){var E=p[b];E.objId=void 0,E.hasAnnotation&&dr(E,l)}})(a)}),a.internal.events.subscribe("putCatalog",function(){(function(l){if(l.internal.acroformPlugin.acroFormDictionaryRoot===void 0)throw new Error("putCatalogCallback: Root missing.");l.internal.write("/AcroForm "+l.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")})(a)}),a.internal.events.subscribe("postPutPages",function(l){(function(p,b){var E=!p;for(var V in p||(b.internal.newObjectDeferredBegin(b.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),b.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),p=p||b.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(p.hasOwnProperty(V)){var R=p[V],F=[],Q=R.Rect;if(R.Rect&&(R.Rect=tt(R.Rect,b)),b.internal.newObjectDeferredBegin(R.objId,!0),R.DA=or.createDefaultAppearanceStream(R),(0,f.default)(R)==="object"&&typeof R.getKeyValueListForStream=="function"&&(F=R.getKeyValueListForStream()),R.Rect=Q,R.hasAppearanceStream&&!R.appearanceStreamContent){var he=Ze(R);F.push({key:"AP",value:"<</N "+he+">>"}),b.internal.acroformPlugin.xForms.push(he)}if(R.appearanceStreamContent){var we="";for(var Oe in R.appearanceStreamContent)if(R.appearanceStreamContent.hasOwnProperty(Oe)){var K=R.appearanceStreamContent[Oe];if(we+="/"+Oe+" ",we+="<<",Object.keys(K).length>=1||Array.isArray(K)){for(var V in K)if(K.hasOwnProperty(V)){var Je=K[V];typeof Je=="function"&&(Je=Je.call(b,R)),we+="/"+V+" "+Je+" ",b.internal.acroformPlugin.xForms.indexOf(Je)>=0||b.internal.acroformPlugin.xForms.push(Je)}}else typeof(Je=K)=="function"&&(Je=Je.call(b,R)),we+="/"+V+" "+Je,b.internal.acroformPlugin.xForms.indexOf(Je)>=0||b.internal.acroformPlugin.xForms.push(Je);we+=">>"}F.push({key:"AP",value:`<<
277`+we+">>"})}b.internal.putStream({additionalKeyValues:F,objectId:R.objId}),b.internal.out("endobj")}E&&function(Fe,Qe){for(var Ae in Fe)if(Fe.hasOwnProperty(Ae)){var ct=Ae,Ct=Fe[Ae];Qe.internal.newObjectDeferredBegin(Ct.objId,!0),(0,f.default)(Ct)==="object"&&typeof Ct.putStream=="function"&&Ct.putStream(),delete Fe[ct]}}(b.internal.acroformPlugin.xForms,b)})(l,a)}),a.internal.acroformPlugin.isInitialized=!0}},It=Tt.__acroform__.arrayToPdfArray=function(a,n,l){var p=function(V){return V};if(Array.isArray(a)){for(var b="[",E=0;E<a.length;E++)switch(E!==0&&(b+=" "),(0,f.default)(a[E])){case"boolean":case"number":case"object":b+=a[E].toString();break;case"string":a[E].substr(0,1)!=="/"?(n!==void 0&&l&&(p=l.internal.getEncryptor(n)),b+="("+Jt(p(a[E].toString()))+")"):b+=a[E].toString()}return b+"]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},nr=function(a,n,l){var p=function(b){return b};return n!==void 0&&l&&(p=l.internal.getEncryptor(n)),(a=a||"").toString(),"("+Jt(p(a))+")"},Cr=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(a){this._objId=a}}),Object.defineProperty(this,"scope",{value:this._scope,writable:!0})};Cr.prototype.toString=function(){return this.objId+" 0 R"},Cr.prototype.putStream=function(){var a=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:a,objectId:this.objId}),this.scope.internal.out("endobj")},Cr.prototype.getKeyValueListForStream=function(){var a=[],n=Object.getOwnPropertyNames(this).filter(function(E){return E!="content"&&E!="appearanceStreamContent"&&E!="scope"&&E!="objId"&&E.substring(0,1)!="_"});for(var l in n)if(Object.getOwnPropertyDescriptor(this,n[l]).configurable===!1){var p=n[l],b=this[p];b&&(Array.isArray(b)?a.push({key:p,value:It(b,this.objId,this.scope)}):b instanceof Cr?(b.scope=this.scope,a.push({key:p,value:b.objId+" 0 R"})):typeof b!="function"&&a.push({key:p,value:b}))}return a};var Wt=function(){Cr.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 a,n=[];Object.defineProperty(this,"BBox",{configurable:!1,get:function(){return n},set:function(l){n=l}}),Object.defineProperty(this,"Resources",{value:"2 0 R",configurable:!1,writable:!0}),Object.defineProperty(this,"stream",{enumerable:!1,configurable:!0,set:function(l){a=l.trim()},get:function(){return a||null}})};gr(Wt,Cr);var Ir=function(){Cr.call(this);var a,n=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){return n.length>0?n:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return n}}),Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){if(a){var l=function(p){return p};return this.scope&&(l=this.scope.internal.getEncryptor(this.objId)),"("+Jt(l(a))+")"}},set:function(l){a=l}})};gr(Ir,Cr);var Yt=function a(){Cr.call(this);var n=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return n},set:function(Ae){if(isNaN(Ae))throw new Error('Invalid value "'+Ae+'" for attribute F supplied.');n=Ae}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return!!je(n,3)},set:function(Ae){Ae?this.F=$e(n,3):this.F=ht(n,3)}});var l=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return l},set:function(Ae){if(isNaN(Ae))throw new Error('Invalid value "'+Ae+'" for attribute Ff supplied.');l=Ae}});var p=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(p.length!==0)return p},set:function(Ae){p=Ae!==void 0?Ae:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!p||isNaN(p[0])?0:p[0]},set:function(Ae){p[0]=Ae}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!p||isNaN(p[1])?0:p[1]},set:function(Ae){p[1]=Ae}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!p||isNaN(p[2])?0:p[2]},set:function(Ae){p[2]=Ae}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!p||isNaN(p[3])?0:p[3]},set:function(Ae){p[3]=Ae}});var b="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return b},set:function(Ae){switch(Ae){case"/Btn":case"/Tx":case"/Ch":case"/Sig":b=Ae;break;default:throw new Error('Invalid value "'+Ae+'" for attribute FT supplied.')}}});var E=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!E||E.length<1){if(this instanceof yn)return;E="FieldObject"+a.FieldNum++}var Ae=function(ct){return ct};return this.scope&&(Ae=this.scope.internal.getEncryptor(this.objId)),"("+Jt(Ae(E))+")"},set:function(Ae){E=Ae.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return E},set:function(Ae){E=Ae}});var V="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return V},set:function(Ae){V=Ae}});var R="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return R},set:function(Ae){R=Ae}});var F=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return F},set:function(Ae){F=Ae}});var Q=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return Q===void 0?50/Kt:Q},set:function(Ae){Q=Ae}});var he="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return he},set:function(Ae){he=Ae}});var we="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!we||this instanceof yn||this instanceof Lr))return nr(we,this.objId,this.scope)},set:function(Ae){Ae=Ae.toString(),we=Ae}});var Oe=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(Oe)return this instanceof xr==0?nr(Oe,this.objId,this.scope):Oe},set:function(Ae){Ae=Ae.toString(),Oe=this instanceof xr==0?Ae.substr(0,1)==="("?rr(Ae.substr(1,Ae.length-2)):rr(Ae):Ae}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof xr==1?rr(Oe.substr(1,Oe.length-1)):Oe},set:function(Ae){Ae=Ae.toString(),Oe=this instanceof xr==1?"/"+Ae:Ae}});var K=null;Object.defineProperty(this,"_V",{enumerable:!1,configurable:!1,get:function(){if(K)return K},set:function(Ae){this.V=Ae}}),Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(K)return this instanceof xr==0?nr(K,this.objId,this.scope):K},set:function(Ae){Ae=Ae.toString(),K=this instanceof xr==0?Ae.substr(0,1)==="("?rr(Ae.substr(1,Ae.length-2)):rr(Ae):Ae}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof xr==1?rr(K.substr(1,K.length-1)):K},set:function(Ae){Ae=Ae.toString(),K=this instanceof xr==1?"/"+Ae:Ae}}),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 Je,Fe=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return Fe},set:function(Ae){Ae=!!Ae,Fe=Ae}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,get:function(){if(Je)return Je},set:function(Ae){Je=Ae}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return!!je(this.Ff,1)},set:function(Ae){Ae?this.Ff=$e(this.Ff,1):this.Ff=ht(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return!!je(this.Ff,2)},set:function(Ae){Ae?this.Ff=$e(this.Ff,2):this.Ff=ht(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return!!je(this.Ff,3)},set:function(Ae){Ae?this.Ff=$e(this.Ff,3):this.Ff=ht(this.Ff,3)}});var Qe=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(Qe!==null)return Qe},set:function(Ae){if([0,1,2].indexOf(Ae)===-1)throw new Error('Invalid value "'+Ae+'" for attribute Q supplied.');Qe=Ae}}),Object.defineProperty(this,"textAlign",{get:function(){var Ae;switch(Qe){case 0:default:Ae="left";break;case 1:Ae="center";break;case 2:Ae="right"}return Ae},configurable:!0,enumerable:!0,set:function(Ae){switch(Ae){case"right":case 2:Qe=2;break;case"center":case 1:Qe=1;break;default:Qe=0}}})};gr(Yt,Cr);var zr=function(){Yt.call(this),this.FT="/Ch",this.V="()",this.fontName="zapfdingbats";var a=0;Object.defineProperty(this,"TI",{enumerable:!0,configurable:!1,get:function(){return a},set:function(l){a=l}}),Object.defineProperty(this,"topIndex",{enumerable:!0,configurable:!0,get:function(){return a},set:function(l){a=l}});var n=[];Object.defineProperty(this,"Opt",{enumerable:!0,configurable:!1,get:function(){return It(n,this.objId,this.scope)},set:function(l){var p,b;b=[],typeof(p=l)=="string"&&(b=function(E,V,R){R||(R=1);for(var F,Q=[];F=V.exec(E);)Q.push(F[R]);return Q}(p,/\((.*?)\)/g)),n=b}}),this.getOptions=function(){return n},this.setOptions=function(l){n=l,this.sort&&n.sort()},this.addOption=function(l){l=(l=l||"").toString(),n.push(l),this.sort&&n.sort()},this.removeOption=function(l,p){for(p=p||!1,l=(l=l||"").toString();n.indexOf(l)!==-1&&(n.splice(n.indexOf(l),1),p!==!1););},Object.defineProperty(this,"combo",{enumerable:!0,configurable:!0,get:function(){return!!je(this.Ff,18)},set:function(l){l?this.Ff=$e(this.Ff,18):this.Ff=ht(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return!!je(this.Ff,19)},set:function(l){this.combo===!0&&(l?this.Ff=$e(this.Ff,19):this.Ff=ht(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return!!je(this.Ff,20)},set:function(l){l?(this.Ff=$e(this.Ff,20),n.sort()):this.Ff=ht(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return!!je(this.Ff,22)},set:function(l){l?this.Ff=$e(this.Ff,22):this.Ff=ht(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!je(this.Ff,23)},set:function(l){l?this.Ff=$e(this.Ff,23):this.Ff=ht(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return!!je(this.Ff,27)},set:function(l){l?this.Ff=$e(this.Ff,27):this.Ff=ht(this.Ff,27)}}),this.hasAppearanceStream=!1};gr(zr,Yt);var Ye=function(){zr.call(this),this.fontName="helvetica",this.combo=!1};gr(Ye,zr);var Vt=function(){Ye.call(this),this.combo=!0};gr(Vt,Ye);var lr=function(){Vt.call(this),this.edit=!0};gr(lr,Vt);var xr=function(){Yt.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return!!je(this.Ff,15)},set:function(l){l?this.Ff=$e(this.Ff,15):this.Ff=ht(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return!!je(this.Ff,16)},set:function(l){l?this.Ff=$e(this.Ff,16):this.Ff=ht(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return!!je(this.Ff,17)},set:function(l){l?this.Ff=$e(this.Ff,17):this.Ff=ht(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return!!je(this.Ff,26)},set:function(l){l?this.Ff=$e(this.Ff,26):this.Ff=ht(this.Ff,26)}});var a,n={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var l=function(E){return E};if(this.scope&&(l=this.scope.internal.getEncryptor(this.objId)),Object.keys(n).length!==0){var p,b=[];for(p in b.push("<<"),n)b.push("/"+p+" ("+Jt(l(n[p]))+")");return b.push(">>"),b.join(`
278`)}},set:function(l){(0,f.default)(l)==="object"&&(n=l)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return n.CA||""},set:function(l){typeof l=="string"&&(n.CA=l)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return a},set:function(l){a=l}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return a.substr(1,a.length-1)},set:function(l){a="/"+l}})};gr(xr,Yt);var Pr=function(){xr.call(this),this.pushButton=!0};gr(Pr,xr);var Ur=function(){xr.call(this),this.radio=!0,this.pushButton=!1;var a=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return a},set:function(n){a=n!==void 0?n:[]}})};gr(Ur,xr);var yn=function(){var a,n;Yt.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return a},set:function(b){a=b}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return n},set:function(b){n=b}});var l,p={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var b=function(R){return R};this.scope&&(b=this.scope.internal.getEncryptor(this.objId));var E,V=[];for(E in V.push("<<"),p)V.push("/"+E+" ("+Jt(b(p[E]))+")");return V.push(">>"),V.join(`
279`)},set:function(b){(0,f.default)(b)==="object"&&(p=b)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return p.CA||""},set:function(b){typeof b=="string"&&(p.CA=b)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return l},set:function(b){l=b}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return l.substr(1,l.length-1)},set:function(b){l="/"+b}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=or.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};gr(yn,Yt),Ur.prototype.setAppearance=function(a){if(!("createAppearanceStream"in a)||!("getCA"in a))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var n in this.Kids)if(this.Kids.hasOwnProperty(n)){var l=this.Kids[n];l.appearanceStreamContent=a.createAppearanceStream(l.optionName),l.caption=a.getCA()}},Ur.prototype.createOption=function(a){var n=new yn;return n.Parent=this,n.optionName=a,this.Kids.push(n),as.call(this.scope,n),n};var vt=function(){xr.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=or.CheckBox.createAppearanceStream()};gr(vt,xr);var Lr=function(){Yt.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return!!je(this.Ff,13)},set:function(n){n?this.Ff=$e(this.Ff,13):this.Ff=ht(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return!!je(this.Ff,21)},set:function(n){n?this.Ff=$e(this.Ff,21):this.Ff=ht(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!je(this.Ff,23)},set:function(n){n?this.Ff=$e(this.Ff,23):this.Ff=ht(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return!!je(this.Ff,24)},set:function(n){n?this.Ff=$e(this.Ff,24):this.Ff=ht(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return!!je(this.Ff,25)},set:function(n){n?this.Ff=$e(this.Ff,25):this.Ff=ht(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return!!je(this.Ff,26)},set:function(n){n?this.Ff=$e(this.Ff,26):this.Ff=ht(this.Ff,26)}});var a=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return a},set:function(n){a=n}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return a},set:function(n){Number.isInteger(n)&&(a=n)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};gr(Lr,Yt);var Er=function(){Lr.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return!!je(this.Ff,14)},set:function(a){a?this.Ff=$e(this.Ff,14):this.Ff=ht(this.Ff,14)}}),this.password=!0};gr(Er,Lr);var or={CheckBox:{createAppearanceStream:function(){return{N:{On:or.CheckBox.YesNormal},D:{On:or.CheckBox.YesPushDown,Off:or.CheckBox.OffPushDown}}},YesPushDown:function(a){var n=jr(a);n.scope=a.scope;var l=[],p=a.scope.internal.getFont(a.fontName,a.fontStyle).id,b=a.scope.__private__.encodeColorString(a.color),E=Ft(a,a.caption);return l.push("0.749023 g"),l.push("0 0 "+Ht(or.internal.getWidth(a))+" "+Ht(or.internal.getHeight(a))+" re"),l.push("f"),l.push("BMC"),l.push("q"),l.push("0 0 1 rg"),l.push("/"+p+" "+Ht(E.fontSize)+" Tf "+b),l.push("BT"),l.push(E.text),l.push("ET"),l.push("Q"),l.push("EMC"),n.stream=l.join(`
280`),n},YesNormal:function(a){var n=jr(a);n.scope=a.scope;var l=a.scope.internal.getFont(a.fontName,a.fontStyle).id,p=a.scope.__private__.encodeColorString(a.color),b=[],E=or.internal.getHeight(a),V=or.internal.getWidth(a),R=Ft(a,a.caption);return b.push("1 g"),b.push("0 0 "+Ht(V)+" "+Ht(E)+" re"),b.push("f"),b.push("q"),b.push("0 0 1 rg"),b.push("0 0 "+Ht(V-1)+" "+Ht(E-1)+" re"),b.push("W"),b.push("n"),b.push("0 g"),b.push("BT"),b.push("/"+l+" "+Ht(R.fontSize)+" Tf "+p),b.push(R.text),b.push("ET"),b.push("Q"),n.stream=b.join(`
281`),n},OffPushDown:function(a){var n=jr(a);n.scope=a.scope;var l=[];return l.push("0.749023 g"),l.push("0 0 "+Ht(or.internal.getWidth(a))+" "+Ht(or.internal.getHeight(a))+" re"),l.push("f"),n.stream=l.join(`
282`),n}},RadioButton:{Circle:{createAppearanceStream:function(a){var n={D:{Off:or.RadioButton.Circle.OffPushDown},N:{}};return n.N[a]=or.RadioButton.Circle.YesNormal,n.D[a]=or.RadioButton.Circle.YesPushDown,n},getCA:function(){return"l"},YesNormal:function(a){var n=jr(a);n.scope=a.scope;var l=[],p=or.internal.getWidth(a)<=or.internal.getHeight(a)?or.internal.getWidth(a)/4:or.internal.getHeight(a)/4;p=Number((.9*p).toFixed(5));var b=or.internal.Bezier_C,E=Number((p*b).toFixed(5));return l.push("q"),l.push("1 0 0 1 "+yr(or.internal.getWidth(a)/2)+" "+yr(or.internal.getHeight(a)/2)+" cm"),l.push(p+" 0 m"),l.push(p+" "+E+" "+E+" "+p+" 0 "+p+" c"),l.push("-"+E+" "+p+" -"+p+" "+E+" -"+p+" 0 c"),l.push("-"+p+" -"+E+" -"+E+" -"+p+" 0 -"+p+" c"),l.push(E+" -"+p+" "+p+" -"+E+" "+p+" 0 c"),l.push("f"),l.push("Q"),n.stream=l.join(`
283`),n},YesPushDown:function(a){var n=jr(a);n.scope=a.scope;var l=[],p=or.internal.getWidth(a)<=or.internal.getHeight(a)?or.internal.getWidth(a)/4:or.internal.getHeight(a)/4;p=Number((.9*p).toFixed(5));var b=Number((2*p).toFixed(5)),E=Number((b*or.internal.Bezier_C).toFixed(5)),V=Number((p*or.internal.Bezier_C).toFixed(5));return l.push("0.749023 g"),l.push("q"),l.push("1 0 0 1 "+yr(or.internal.getWidth(a)/2)+" "+yr(or.internal.getHeight(a)/2)+" cm"),l.push(b+" 0 m"),l.push(b+" "+E+" "+E+" "+b+" 0 "+b+" c"),l.push("-"+E+" "+b+" -"+b+" "+E+" -"+b+" 0 c"),l.push("-"+b+" -"+E+" -"+E+" -"+b+" 0 -"+b+" c"),l.push(E+" -"+b+" "+b+" -"+E+" "+b+" 0 c"),l.push("f"),l.push("Q"),l.push("0 g"),l.push("q"),l.push("1 0 0 1 "+yr(or.internal.getWidth(a)/2)+" "+yr(or.internal.getHeight(a)/2)+" cm"),l.push(p+" 0 m"),l.push(p+" "+V+" "+V+" "+p+" 0 "+p+" c"),l.push("-"+V+" "+p+" -"+p+" "+V+" -"+p+" 0 c"),l.push("-"+p+" -"+V+" -"+V+" -"+p+" 0 -"+p+" c"),l.push(V+" -"+p+" "+p+" -"+V+" "+p+" 0 c"),l.push("f"),l.push("Q"),n.stream=l.join(`
284`),n},OffPushDown:function(a){var n=jr(a);n.scope=a.scope;var l=[],p=or.internal.getWidth(a)<=or.internal.getHeight(a)?or.internal.getWidth(a)/4:or.internal.getHeight(a)/4;p=Number((.9*p).toFixed(5));var b=Number((2*p).toFixed(5)),E=Number((b*or.internal.Bezier_C).toFixed(5));return l.push("0.749023 g"),l.push("q"),l.push("1 0 0 1 "+yr(or.internal.getWidth(a)/2)+" "+yr(or.internal.getHeight(a)/2)+" cm"),l.push(b+" 0 m"),l.push(b+" "+E+" "+E+" "+b+" 0 "+b+" c"),l.push("-"+E+" "+b+" -"+b+" "+E+" -"+b+" 0 c"),l.push("-"+b+" -"+E+" -"+E+" -"+b+" 0 -"+b+" c"),l.push(E+" -"+b+" "+b+" -"+E+" "+b+" 0 c"),l.push("f"),l.push("Q"),n.stream=l.join(`
285`),n}},Cross:{createAppearanceStream:function(a){var n={D:{Off:or.RadioButton.Cross.OffPushDown},N:{}};return n.N[a]=or.RadioButton.Cross.YesNormal,n.D[a]=or.RadioButton.Cross.YesPushDown,n},getCA:function(){return"8"},YesNormal:function(a){var n=jr(a);n.scope=a.scope;var l=[],p=or.internal.calculateCross(a);return l.push("q"),l.push("1 1 "+Ht(or.internal.getWidth(a)-2)+" "+Ht(or.internal.getHeight(a)-2)+" re"),l.push("W"),l.push("n"),l.push(Ht(p.x1.x)+" "+Ht(p.x1.y)+" m"),l.push(Ht(p.x2.x)+" "+Ht(p.x2.y)+" l"),l.push(Ht(p.x4.x)+" "+Ht(p.x4.y)+" m"),l.push(Ht(p.x3.x)+" "+Ht(p.x3.y)+" l"),l.push("s"),l.push("Q"),n.stream=l.join(`
286`),n},YesPushDown:function(a){var n=jr(a);n.scope=a.scope;var l=or.internal.calculateCross(a),p=[];return p.push("0.749023 g"),p.push("0 0 "+Ht(or.internal.getWidth(a))+" "+Ht(or.internal.getHeight(a))+" re"),p.push("f"),p.push("q"),p.push("1 1 "+Ht(or.internal.getWidth(a)-2)+" "+Ht(or.internal.getHeight(a)-2)+" re"),p.push("W"),p.push("n"),p.push(Ht(l.x1.x)+" "+Ht(l.x1.y)+" m"),p.push(Ht(l.x2.x)+" "+Ht(l.x2.y)+" l"),p.push(Ht(l.x4.x)+" "+Ht(l.x4.y)+" m"),p.push(Ht(l.x3.x)+" "+Ht(l.x3.y)+" l"),p.push("s"),p.push("Q"),n.stream=p.join(`
287`),n},OffPushDown:function(a){var n=jr(a);n.scope=a.scope;var l=[];return l.push("0.749023 g"),l.push("0 0 "+Ht(or.internal.getWidth(a))+" "+Ht(or.internal.getHeight(a))+" re"),l.push("f"),n.stream=l.join(`
288`),n}}},createDefaultAppearanceStream:function(a){var n=a.scope.internal.getFont(a.fontName,a.fontStyle).id,l=a.scope.__private__.encodeColorString(a.color);return"/"+n+" "+a.fontSize+" Tf "+l}};or.internal={Bezier_C:.551915024494,calculateCross:function(a){var n=or.internal.getWidth(a),l=or.internal.getHeight(a),p=Math.min(n,l);return{x1:{x:(n-p)/2,y:(l-p)/2+p},x2:{x:(n-p)/2+p,y:(l-p)/2},x3:{x:(n-p)/2,y:(l-p)/2},x4:{x:(n-p)/2+p,y:(l-p)/2+p}}}},or.internal.getWidth=function(a){var n=0;return(0,f.default)(a)==="object"&&(n=Vr(a.Rect[2])),n},or.internal.getHeight=function(a){var n=0;return(0,f.default)(a)==="object"&&(n=Vr(a.Rect[3])),n};var as=Tt.addField=function(a){if(fr(this,a),!(a instanceof Yt))throw new Error("Invalid argument passed to jsPDF.addField.");var n;return(n=a).scope.internal.acroformPlugin.printedOut&&(n.scope.internal.acroformPlugin.printedOut=!1,n.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),n.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(n),a.page=a.scope.internal.getCurrentPageInfo().pageNumber,this};Tt.AcroFormChoiceField=zr,Tt.AcroFormListBox=Ye,Tt.AcroFormComboBox=Vt,Tt.AcroFormEditBox=lr,Tt.AcroFormButton=xr,Tt.AcroFormPushButton=Pr,Tt.AcroFormRadioButton=Ur,Tt.AcroFormCheckBox=vt,Tt.AcroFormTextField=Lr,Tt.AcroFormPasswordField=Er,Tt.AcroFormAppearance=or,Tt.AcroForm={ChoiceField:zr,ListBox:Ye,ComboBox:Vt,EditBox:lr,Button:xr,PushButton:Pr,RadioButton:Ur,CheckBox:vt,TextField:Lr,PasswordField:Er,Appearance:or},He.AcroForm={ChoiceField:zr,ListBox:Ye,ComboBox:Vt,EditBox:lr,Button:xr,PushButton:Pr,RadioButton:Ur,CheckBox:vt,TextField:Lr,PasswordField:Er,Appearance:or};var Ws=He.AcroForm;function Ms(a){return a.reduce(function(n,l,p){return n[l]=p,n},{})}(function(a){var n="addImage_";a.__addimage__={};var l="UNKNOWN",p={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]]},b=a.__addimage__.getImageFileTypeByImageData=function(ke,Re){var at,ot,Ut,Xt,er,Pt=l;if((Re=Re||l)==="RGBA"||ke.data!==void 0&&ke.data instanceof Uint8ClampedArray&&"height"in ke&&"width"in ke)return"RGBA";if(bt(ke))for(er in p)for(Ut=p[er],at=0;at<Ut.length;at+=1){for(Xt=!0,ot=0;ot<Ut[at].length;ot+=1)if(Ut[at][ot]!==void 0&&Ut[at][ot]!==ke[ot]){Xt=!1;break}if(Xt===!0){Pt=er;break}}else for(er in p)for(Ut=p[er],at=0;at<Ut.length;at+=1){for(Xt=!0,ot=0;ot<Ut[at].length;ot+=1)if(Ut[at][ot]!==void 0&&Ut[at][ot]!==ke.charCodeAt(ot)){Xt=!1;break}if(Xt===!0){Pt=er;break}}return Pt===l&&Re!==l&&(Pt=Re),Pt},E=function ke(Re){for(var at=this.internal.write,ot=this.internal.putStream,Ut=(0,this.internal.getFilters)();Ut.indexOf("FlateEncode")!==-1;)Ut.splice(Ut.indexOf("FlateEncode"),1);Re.objectId=this.internal.newObject();var Xt=[];if(Xt.push({key:"Type",value:"/XObject"}),Xt.push({key:"Subtype",value:"/Image"}),Xt.push({key:"Width",value:Re.width}),Xt.push({key:"Height",value:Re.height}),Re.colorSpace===Ae.INDEXED?Xt.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(Re.palette.length/3-1)+" "+("sMask"in Re&&Re.sMask!==void 0?Re.objectId+2:Re.objectId+1)+" 0 R]"}):(Xt.push({key:"ColorSpace",value:"/"+Re.colorSpace}),Re.colorSpace===Ae.DEVICE_CMYK&&Xt.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),Xt.push({key:"BitsPerComponent",value:Re.bitsPerComponent}),"decodeParameters"in Re&&Re.decodeParameters!==void 0&&Xt.push({key:"DecodeParms",value:"<<"+Re.decodeParameters+">>"}),"transparency"in Re&&Array.isArray(Re.transparency)&&Re.transparency.length>0){for(var er="",Pt=0,Qt=Re.transparency.length;Pt<Qt;Pt++)er+=Re.transparency[Pt]+" "+Re.transparency[Pt]+" ";Xt.push({key:"Mask",value:"["+er+"]"})}Re.sMask!==void 0&&Xt.push({key:"SMask",value:Re.objectId+1+" 0 R"});var kr=Re.filter!==void 0?["/"+Re.filter]:void 0;if(ot({data:Re.data,additionalKeyValues:Xt,alreadyAppliedFilters:kr,objectId:Re.objectId}),at("endobj"),"sMask"in Re&&Re.sMask!==void 0){var Nr,xe=(Nr=Re.sMaskBitsPerComponent)!==null&&Nr!==void 0?Nr:Re.bitsPerComponent,Ve={width:Re.width,height:Re.height,colorSpace:"DeviceGray",bitsPerComponent:xe,data:Re.sMask};"filter"in Re&&(Ve.decodeParameters="/Predictor ".concat(Re.predictor," /Colors 1 /BitsPerComponent ").concat(xe," /Columns ").concat(Re.width),Ve.filter=Re.filter),ke.call(this,Ve)}if(Re.colorSpace===Ae.INDEXED){var qe=this.internal.newObject();ot({data:Et(new Uint8Array(Re.palette)),objectId:qe}),at("endobj")}},V=function(){var ke=this.internal.collections[n+"images"];for(var Re in ke)E.call(this,ke[Re])},R=function(){var ke,Re=this.internal.collections[n+"images"],at=this.internal.write;for(var ot in Re)at("/I"+(ke=Re[ot]).index,ke.objectId,"0","R")},F=function(){this.internal.collections[n+"images"]||(this.internal.collections[n+"images"]={},this.internal.events.subscribe("putResources",V),this.internal.events.subscribe("putXobjectDict",R))},Q=function(){var ke=this.internal.collections[n+"images"];return F.call(this),ke},he=function(){return Object.keys(this.internal.collections[n+"images"]).length},we=function(ke){return typeof a["process"+ke.toUpperCase()]=="function"},Oe=function(ke){return(0,f.default)(ke)==="object"&&ke.nodeType===1},K=function(ke,Re){if(ke.nodeName==="IMG"&&ke.hasAttribute("src")){var at=""+ke.getAttribute("src");if(at.indexOf("data:image/")===0)return W(unescape(at).split("base64,").pop());var ot=a.loadFile(at,!0);if(ot!==void 0)return ot}if(ke.nodeName==="CANVAS"){if(ke.width===0||ke.height===0)throw new Error("Given canvas must have data. Canvas width: "+ke.width+", height: "+ke.height);var Ut;switch(Re){case"PNG":Ut="image/png";break;case"WEBP":Ut="image/webp";break;default:Ut="image/jpeg"}return W(ke.toDataURL(Ut,1).split("base64,").pop())}},Je=function(ke){var Re=this.internal.collections[n+"images"];if(Re){for(var at in Re)if(ke===Re[at].alias)return Re[at]}},Fe=function(ke,Re,at){return ke||Re||(ke=-96,Re=-96),ke<0&&(ke=-1*at.width*72/ke/this.internal.scaleFactor),Re<0&&(Re=-1*at.height*72/Re/this.internal.scaleFactor),ke===0&&(ke=Re*at.width/at.height),Re===0&&(Re=ke*at.height/at.width),[ke,Re]},Qe=function(ke,Re,at,ot,Ut,Xt){var er=Fe.call(this,at,ot,Ut),Pt=this.internal.getCoordinateString,Qt=this.internal.getVerticalCoordinateString,kr=Q.call(this);if(at=er[0],ot=er[1],kr[Ut.index]=Ut,Xt){Xt*=Math.PI/180;var Nr=Math.cos(Xt),xe=Math.sin(Xt),Ve=function(yt){return yt.toFixed(4)},qe=[Ve(Nr),Ve(xe),Ve(-1*xe),Ve(Nr),0,0,"cm"]}this.internal.write("q"),Xt?(this.internal.write([1,"0","0",1,Pt(ke),Qt(Re+ot),"cm"].join(" ")),this.internal.write(qe.join(" ")),this.internal.write([Pt(at),"0","0",Pt(ot),"0","0","cm"].join(" "))):this.internal.write([Pt(at),"0","0",Pt(ot),Pt(ke),Qt(Re+ot),"cm"].join(" ")),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,"cm"].join(" ")),this.internal.write("/I"+Ut.index+" Do"),this.internal.write("Q")},Ae=a.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"};a.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 ct=a.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},Ct=a.__addimage__.sHashCode=function(ke){var Re,at,ot=0;if(typeof ke=="string")for(at=ke.length,Re=0;Re<at;Re++)ot=(ot<<5)-ot+ke.charCodeAt(Re),ot|=0;else if(bt(ke))for(at=ke.byteLength/2,Re=0;Re<at;Re++)ot=(ot<<5)-ot+ke[Re],ot|=0;return ot},nt=a.__addimage__.validateStringAsBase64=function(ke){(ke=ke||"").toString().trim();var Re=!0;return ke.length===0&&(Re=!1),ke.length%4!=0&&(Re=!1),/^[A-Za-z0-9+/]+$/.test(ke.substr(0,ke.length-2))===!1&&(Re=!1),/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(ke.substr(-2))===!1&&(Re=!1),Re},Ce=a.__addimage__.extractImageFromDataUrl=function(ke){if(ke==null||!(ke=ke.trim()).startsWith("data:"))return null;var Re=ke.indexOf(",");return Re<0?null:ke.substring(0,Re).trim().endsWith("base64")?ke.substring(Re+1):null};a.__addimage__.isArrayBuffer=function(ke){return ke instanceof ArrayBuffer};var bt=a.__addimage__.isArrayBufferView=function(ke){return ke instanceof Int8Array||ke instanceof Uint8Array||ke instanceof Uint8ClampedArray||ke instanceof Int16Array||ke instanceof Uint16Array||ke instanceof Int32Array||ke instanceof Uint32Array||ke instanceof Float32Array||ke instanceof Float64Array},Gt=a.__addimage__.binaryStringToUint8Array=function(ke){for(var Re=ke.length,at=new Uint8Array(Re),ot=0;ot<Re;ot++)at[ot]=ke.charCodeAt(ot);return at},Et=a.__addimage__.arrayBufferToBinaryString=function(ke){for(var Re="",at=bt(ke)?ke:new Uint8Array(ke),ot=0;ot<at.length;ot+=8192)Re+=String.fromCharCode.apply(null,at.subarray(ot,ot+8192));return Re};a.addImage=function(){var ke,Re,at,ot,Ut,Xt,er,Pt,Qt;if(typeof arguments[1]=="number"?(Re=l,at=arguments[1],ot=arguments[2],Ut=arguments[3],Xt=arguments[4],er=arguments[5],Pt=arguments[6],Qt=arguments[7]):(Re=arguments[1],at=arguments[2],ot=arguments[3],Ut=arguments[4],Xt=arguments[5],er=arguments[6],Pt=arguments[7],Qt=arguments[8]),(0,f.default)(ke=arguments[0])==="object"&&!Oe(ke)&&"imageData"in ke){var kr=ke;ke=kr.imageData,Re=kr.format||Re||l,at=kr.x||at||0,ot=kr.y||ot||0,Ut=kr.w||kr.width||Ut,Xt=kr.h||kr.height||Xt,er=kr.alias||er,Pt=kr.compression||Pt,Qt=kr.rotation||kr.angle||Qt}var Nr=this.internal.getFilters();if(Pt===void 0&&Nr.indexOf("FlateEncode")!==-1&&(Pt="SLOW"),isNaN(at)||isNaN(ot))throw new Error("Invalid coordinates passed to jsPDF.addImage");F.call(this);var xe=dt.call(this,ke,Re,er,Pt);return Qe.call(this,at,ot,Ut,Xt,xe,Qt),this};var dt=function(ke,Re,at,ot){var Ut,Xt,er;if(typeof ke=="string"&&b(ke)===l){ke=unescape(ke);var Pt=$t(ke,!1);(Pt!==""||(Pt=a.loadFile(ke,!0))!==void 0)&&(ke=Pt)}if(Oe(ke)&&(ke=K(ke,Re)),Re=b(ke,Re),!we(Re))throw new Error("addImage does not support files of type '"+Re+"', please ensure that a plugin for '"+Re+"' support is added.");if(((er=at)==null||er.length===0)&&(at=function(Qt){return typeof Qt=="string"||bt(Qt)?Ct(Qt):bt(Qt.data)?Ct(Qt.data):null}(ke)),(Ut=Je.call(this,at))||(ke instanceof Uint8Array||Re==="RGBA"||(Xt=ke,ke=Gt(ke)),Ut=this["process"+Re.toUpperCase()](ke,he.call(this),at,function(Qt){return Qt&&typeof Qt=="string"&&(Qt=Qt.toUpperCase()),Qt in a.image_compression?Qt:ct.NONE}(ot),Xt)),!Ut)throw new Error("An unknown error occurred whilst processing the image.");return Ut},$t=a.__addimage__.convertBase64ToBinaryString=function(ke,Re){Re=typeof Re!="boolean"||Re;var at,ot="";if(typeof ke=="string"){var Ut;at=(Ut=Ce(ke))!==null&&Ut!==void 0?Ut:ke;try{ot=W(at)}catch(Xt){if(Re)throw nt(at)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+Xt.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return ot};a.getImageProperties=function(ke){var Re,at,ot="";if(Oe(ke)&&(ke=K(ke)),typeof ke=="string"&&b(ke)===l&&((ot=$t(ke,!1))===""&&(ot=a.loadFile(ke)||""),ke=ot),at=b(ke),!we(at))throw new Error("addImage does not support files of type '"+at+"', please ensure that a plugin for '"+at+"' support is added.");if(ke instanceof Uint8Array||(ke=Gt(ke)),!(Re=this["process"+at.toUpperCase()](ke)))throw new Error("An unknown error occurred whilst processing the image");return Re.fileType=at,Re}})(He.API),function(a){var n=function(l){if(l!==void 0&&l!="")return!0};He.API.events.push(["addPage",function(l){this.internal.getPageInfo(l.pageNumber).pageContext.annotations=[]}]),a.events.push(["putPage",function(l){for(var p,b,E,V=this.internal.getCoordinateString,R=this.internal.getVerticalCoordinateString,F=this.internal.getPageInfoByObjId(l.objId),Q=l.pageContext.annotations,he=!1,we=0;we<Q.length&&!he;we++)switch((p=Q[we]).type){case"link":(n(p.options.url)||n(p.options.pageNumber))&&(he=!0);break;case"reference":case"text":case"freetext":he=!0}if(he!=0){this.internal.write("/Annots [");for(var Oe=0;Oe<Q.length;Oe++){p=Q[Oe];var K=this.internal.pdfEscape,Je=this.internal.getEncryptor(l.objId);switch(p.type){case"reference":this.internal.write(" "+p.object.objId+" 0 R ");break;case"text":var Fe=this.internal.newAdditionalObject(),Qe=this.internal.newAdditionalObject(),Ae=this.internal.getEncryptor(Fe.objId),ct=p.title||"Note";E="<</Type /Annot /Subtype /Text "+(b="/Rect ["+V(p.bounds.x)+" "+R(p.bounds.y+p.bounds.h)+" "+V(p.bounds.x+p.bounds.w)+" "+R(p.bounds.y)+"] ")+"/Contents ("+K(Ae(p.contents))+")",E+=" /Popup "+Qe.objId+" 0 R",E+=" /P "+F.objId+" 0 R",E+=" /T ("+K(Ae(ct))+") >>",Fe.content=E;var Ct=Fe.objId+" 0 R";E="<</Type /Annot /Subtype /Popup "+(b="/Rect ["+V(p.bounds.x+30)+" "+R(p.bounds.y+p.bounds.h)+" "+V(p.bounds.x+p.bounds.w+30)+" "+R(p.bounds.y)+"] ")+" /Parent "+Ct,p.open&&(E+=" /Open true"),E+=" >>",Qe.content=E,this.internal.write(Fe.objId,"0 R",Qe.objId,"0 R");break;case"freetext":b="/Rect ["+V(p.bounds.x)+" "+R(p.bounds.y)+" "+V(p.bounds.x+p.bounds.w)+" "+R(p.bounds.y+p.bounds.h)+"] ";var nt=p.color||"#000000";E="<</Type /Annot /Subtype /FreeText "+b+"/Contents ("+K(Je(p.contents))+")",E+=" /DS(font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+nt+")",E+=" /Border [0 0 0]",E+=" >>",this.internal.write(E);break;case"link":if(p.options.name){var Ce=this.annotations._nameMap[p.options.name];p.options.pageNumber=Ce.page,p.options.top=Ce.y}else p.options.top||(p.options.top=0);if(b="/Rect ["+p.finalBounds.x+" "+p.finalBounds.y+" "+p.finalBounds.w+" "+p.finalBounds.h+"] ",E="",p.options.url)E="<</Type /Annot /Subtype /Link "+b+"/Border [0 0 0] /A <</S /URI /URI ("+K(Je(p.options.url))+") >>";else if(p.options.pageNumber)switch(E="<</Type /Annot /Subtype /Link "+b+"/Border [0 0 0] /Dest ["+this.internal.getPageInfo(p.options.pageNumber).objId+" 0 R",p.options.magFactor=p.options.magFactor||"XYZ",p.options.magFactor){case"Fit":E+=" /Fit]";break;case"FitH":E+=" /FitH "+p.options.top+"]";break;case"FitV":p.options.left=p.options.left||0,E+=" /FitV "+p.options.left+"]";break;default:var bt=R(p.options.top);p.options.left=p.options.left||0,p.options.zoom===void 0&&(p.options.zoom=0),E+=" /XYZ "+p.options.left+" "+bt+" "+p.options.zoom+"]"}E!=""&&(E+=" >>",this.internal.write(E))}}this.internal.write("]")}}]),a.createAnnotation=function(l){var p=this.internal.getCurrentPageInfo();switch(l.type){case"link":this.link(l.bounds.x,l.bounds.y,l.bounds.w,l.bounds.h,l);break;case"text":case"freetext":p.pageContext.annotations.push(l)}},a.link=function(l,p,b,E,V){var R=this.internal.getCurrentPageInfo(),F=this.internal.getCoordinateString,Q=this.internal.getVerticalCoordinateString;R.pageContext.annotations.push({finalBounds:{x:F(l),y:Q(p),w:F(l+b),h:Q(p+E)},options:V,type:"link"})},a.textWithLink=function(l,p,b,E){var V,R,F=this.getTextWidth(l),Q=this.internal.getLineHeight()/this.internal.scaleFactor;if(E.maxWidth!==void 0){R=E.maxWidth;var he=this.splitTextToSize(l,R).length;V=Math.ceil(Q*he)}else R=F,V=Q;return this.text(l,p,b,E),b+=.2*Q,E.align==="center"&&(p-=F/2),E.align==="right"&&(p-=F),this.link(p,b-Q,R,V,E),F},a.getTextWidth=function(l){var p=this.internal.getFontSize();return this.getStringUnitWidth(l)*p/this.internal.scaleFactor}}(He.API),function(a){var n={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]},l={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}},p={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},b=[1570,1571,1573,1575];a.__arabicParser__={};var E=a.__arabicParser__.isInArabicSubstitutionA=function(Fe){return n[Fe.charCodeAt(0)]!==void 0},V=a.__arabicParser__.isArabicLetter=function(Fe){return typeof Fe=="string"&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(Fe)},R=a.__arabicParser__.isArabicEndLetter=function(Fe){return V(Fe)&&E(Fe)&&n[Fe.charCodeAt(0)].length<=2},F=a.__arabicParser__.isArabicAlfLetter=function(Fe){return V(Fe)&&b.indexOf(Fe.charCodeAt(0))>=0};a.__arabicParser__.arabicLetterHasIsolatedForm=function(Fe){return V(Fe)&&E(Fe)&&n[Fe.charCodeAt(0)].length>=1};var Q=a.__arabicParser__.arabicLetterHasFinalForm=function(Fe){return V(Fe)&&E(Fe)&&n[Fe.charCodeAt(0)].length>=2};a.__arabicParser__.arabicLetterHasInitialForm=function(Fe){return V(Fe)&&E(Fe)&&n[Fe.charCodeAt(0)].length>=3};var he=a.__arabicParser__.arabicLetterHasMedialForm=function(Fe){return V(Fe)&&E(Fe)&&n[Fe.charCodeAt(0)].length==4},we=a.__arabicParser__.resolveLigatures=function(Fe){var Qe=0,Ae=l,ct="",Ct=0;for(Qe=0;Qe<Fe.length;Qe+=1)Ae[Fe.charCodeAt(Qe)]!==void 0?(Ct++,typeof(Ae=Ae[Fe.charCodeAt(Qe)])=="number"&&(ct+=String.fromCharCode(Ae),Ae=l,Ct=0),Qe===Fe.length-1&&(Ae=l,ct+=Fe.charAt(Qe-(Ct-1)),Qe-=Ct-1,Ct=0)):(Ae=l,ct+=Fe.charAt(Qe-Ct),Qe-=Ct,Ct=0);return ct};a.__arabicParser__.isArabicDiacritic=function(Fe){return Fe!==void 0&&p[Fe.charCodeAt(0)]!==void 0};var Oe=a.__arabicParser__.getCorrectForm=function(Fe,Qe,Ae){return V(Fe)?E(Fe)===!1?-1:!Q(Fe)||!V(Qe)&&!V(Ae)||!V(Ae)&&R(Qe)||R(Fe)&&!V(Qe)||R(Fe)&&F(Qe)||R(Fe)&&R(Qe)?0:he(Fe)&&V(Qe)&&!R(Qe)&&V(Ae)&&Q(Ae)?3:R(Fe)||!V(Ae)?1:2:-1},K=function(Fe){var Qe=0,Ae=0,ct=0,Ct="",nt="",Ce="",bt=(Fe=Fe||"").split("\\s+"),Gt=[];for(Qe=0;Qe<bt.length;Qe+=1){for(Gt.push(""),Ae=0;Ae<bt[Qe].length;Ae+=1)Ct=bt[Qe][Ae],nt=bt[Qe][Ae-1],Ce=bt[Qe][Ae+1],V(Ct)?(ct=Oe(Ct,nt,Ce),Gt[Qe]+=ct!==-1?String.fromCharCode(n[Ct.charCodeAt(0)][ct]):Ct):Gt[Qe]+=Ct;Gt[Qe]=we(Gt[Qe])}return Gt.join(" ")},Je=a.__arabicParser__.processArabic=a.processArabic=function(){var Fe,Qe=typeof arguments[0]=="string"?arguments[0]:arguments[0].text,Ae=[];if(Array.isArray(Qe)){var ct=0;for(Ae=[],ct=0;ct<Qe.length;ct+=1)Array.isArray(Qe[ct])?Ae.push([K(Qe[ct][0]),Qe[ct][1],Qe[ct][2]]):Ae.push([K(Qe[ct])]);Fe=Ae}else Fe=K(Qe);return typeof arguments[0]=="string"?Fe:(arguments[0].text=Fe,arguments[0])};a.events.push(["preProcessText",Je])}(He.API),He.API.autoPrint=function(a){var n;return(a=a||{}).variant=a.variant||"non-conform",a.variant==="javascript"?this.addJS("print({});"):(this.internal.events.subscribe("postPutResources",function(){n=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 "+n+" 0 R")})),this},function(a){var n=function(){var l=void 0;Object.defineProperty(this,"pdf",{get:function(){return l},set:function(R){l=R}});var p=150;Object.defineProperty(this,"width",{get:function(){return p},set:function(R){p=isNaN(R)||Number.isInteger(R)===!1||R<0?150:R,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=p+1)}});var b=300;Object.defineProperty(this,"height",{get:function(){return b},set:function(R){b=isNaN(R)||Number.isInteger(R)===!1||R<0?300:R,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=b+1)}});var E=[];Object.defineProperty(this,"childNodes",{get:function(){return E},set:function(R){E=R}});var V={};Object.defineProperty(this,"style",{get:function(){return V},set:function(R){V=R}}),Object.defineProperty(this,"parentNode",{})};n.prototype.getContext=function(l,p){var b;if((l=l||"2d")!=="2d")return null;for(b in p)this.pdf.context2d.hasOwnProperty(b)&&(this.pdf.context2d[b]=p[b]);return this.pdf.context2d._canvas=this,this.pdf.context2d},n.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},a.events.push(["initialized",function(){this.canvas=new n,this.canvas.pdf=this}])}(He.API),function(a){var n={left:0,top:0,bottom:0,right:0},l=!1,p=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({},n),this.internal.__cell__.margins.width=this.getPageWidth(),b.call(this))},b=function(){this.internal.__cell__.lastCell=new E,this.internal.__cell__.pages=1},E=function(){var F=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return F},set:function(Fe){F=Fe}});var Q=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return Q},set:function(Fe){Q=Fe}});var he=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return he},set:function(Fe){he=Fe}});var we=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return we},set:function(Fe){we=Fe}});var Oe=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return Oe},set:function(Fe){Oe=Fe}});var K=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return K},set:function(Fe){K=Fe}});var Je=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return Je},set:function(Fe){Je=Fe}}),this};E.prototype.clone=function(){return new E(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},E.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},a.setHeaderFunction=function(F){return p.call(this),this.internal.__cell__.headerFunction=typeof F=="function"?F:void 0,this},a.getTextDimensions=function(F,Q){p.call(this);var he=(Q=Q||{}).fontSize||this.getFontSize(),we=Q.font||this.getFont(),Oe=Q.scaleFactor||this.internal.scaleFactor,K=0,Je=0,Fe=0,Qe=this;if(!Array.isArray(F)&&typeof F!="string"){if(typeof F!="number")throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");F=String(F)}var Ae=Q.maxWidth;Ae>0?typeof F=="string"?F=this.splitTextToSize(F,Ae):Object.prototype.toString.call(F)==="[object Array]"&&(F=F.reduce(function(Ct,nt){return Ct.concat(Qe.splitTextToSize(nt,Ae))},[])):F=Array.isArray(F)?F:[F];for(var ct=0;ct<F.length;ct++)K<(Fe=this.getStringUnitWidth(F[ct],{font:we})*he)&&(K=Fe);return K!==0&&(Je=F.length),{w:K/=Oe,h:Math.max((Je*he*this.getLineHeightFactor()-he*(this.getLineHeightFactor()-1))/Oe,0)}},a.cellAddPage=function(){p.call(this),this.addPage();var F=this.internal.__cell__.margins||n;return this.internal.__cell__.lastCell=new E(F.left,F.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var V=a.cell=function(){var F;F=arguments[0]instanceof E?arguments[0]:new E(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6]),p.call(this);var Q=this.internal.__cell__.lastCell,he=this.internal.__cell__.padding,we=this.internal.__cell__.margins||n,Oe=this.internal.__cell__.tableHeaderRow,K=this.internal.__cell__.printHeaders;return Q.lineNumber!==void 0&&(Q.lineNumber===F.lineNumber?(F.x=(Q.x||0)+(Q.width||0),F.y=Q.y||0):Q.y+Q.height+F.height+we.bottom>this.getPageHeight()?(this.cellAddPage(),F.y=we.top,K&&Oe&&(this.printHeaderRow(F.lineNumber,!0),F.y+=Oe[0].height)):F.y=Q.y+Q.height||F.y),F.text[0]!==void 0&&(this.rect(F.x,F.y,F.width,F.height,l===!0?"FD":void 0),F.align==="right"?this.text(F.text,F.x+F.width-he,F.y+he,{align:"right",baseline:"top"}):F.align==="center"?this.text(F.text,F.x+F.width/2,F.y+he,{align:"center",baseline:"top",maxWidth:F.width-he-he}):this.text(F.text,F.x+he,F.y+he,{align:"left",baseline:"top",maxWidth:F.width-he-he})),this.internal.__cell__.lastCell=F,this};a.table=function(F,Q,he,we,Oe){if(p.call(this),!he)throw new Error("No data for PDF table.");var K,Je,Fe,Qe,Ae=[],ct=[],Ct=[],nt={},Ce={},bt=[],Gt=[],Et=(Oe=Oe||{}).autoSize||!1,dt=Oe.printHeaders!==!1,$t=Oe.css&&Oe.css["font-size"]!==void 0?16*Oe.css["font-size"]:Oe.fontSize||12,ke=Oe.margins||Object.assign({width:this.getPageWidth()},n),Re=typeof Oe.padding=="number"?Oe.padding:3,at=Oe.headerBackgroundColor||"#c8c8c8",ot=Oe.headerTextColor||"#000";if(b.call(this),this.internal.__cell__.printHeaders=dt,this.internal.__cell__.margins=ke,this.internal.__cell__.table_font_size=$t,this.internal.__cell__.padding=Re,this.internal.__cell__.headerBackgroundColor=at,this.internal.__cell__.headerTextColor=ot,this.setFontSize($t),we==null)ct=Ae=Object.keys(he[0]),Ct=Ae.map(function(){return"left"});else if(Array.isArray(we)&&(0,f.default)(we[0])==="object")for(Ae=we.map(function(kr){return kr.name}),ct=we.map(function(kr){return kr.prompt||kr.name||""}),Ct=we.map(function(kr){return kr.align||"left"}),K=0;K<we.length;K+=1)Ce[we[K].name]=.7499990551181103*we[K].width;else Array.isArray(we)&&typeof we[0]=="string"&&(ct=Ae=we,Ct=Ae.map(function(){return"left"}));if(Et||Array.isArray(we)&&typeof we[0]=="string")for(K=0;K<Ae.length;K+=1){for(nt[Qe=Ae[K]]=he.map(function(kr){return kr[Qe]}),this.setFont(void 0,"bold"),bt.push(this.getTextDimensions(ct[K],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),Je=nt[Qe],this.setFont(void 0,"normal"),Fe=0;Fe<Je.length;Fe+=1)bt.push(this.getTextDimensions(Je[Fe],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);Ce[Qe]=Math.max.apply(null,bt)+Re+Re,bt=[]}if(dt){var Ut={};for(K=0;K<Ae.length;K+=1)Ut[Ae[K]]={},Ut[Ae[K]].text=ct[K],Ut[Ae[K]].align=Ct[K];var Xt=R.call(this,Ut,Ce);Gt=Ae.map(function(kr){return new E(F,Q,Ce[kr],Xt,Ut[kr].text,void 0,Ut[kr].align)}),this.setTableHeaderRow(Gt),this.printHeaderRow(1,!1)}var er=we.reduce(function(kr,Nr){return kr[Nr.name]=Nr.align,kr},{});for(K=0;K<he.length;K+=1){"rowStart"in Oe&&Oe.rowStart instanceof Function&&Oe.rowStart({row:K,data:he[K]},this);var Pt=R.call(this,he[K],Ce);for(Fe=0;Fe<Ae.length;Fe+=1){var Qt=he[K][Ae[Fe]];"cellStart"in Oe&&Oe.cellStart instanceof Function&&Oe.cellStart({row:K,col:Fe,data:Qt},this),V.call(this,new E(F,Q,Ce[Ae[Fe]],Pt,Qt,K+2,er[Ae[Fe]]))}}return this.internal.__cell__.table_x=F,this.internal.__cell__.table_y=Q,this};var R=function(F,Q){var he=this.internal.__cell__.padding,we=this.internal.__cell__.table_font_size,Oe=this.internal.scaleFactor;return Object.keys(F).map(function(K){var Je=F[K];return this.splitTextToSize(Je.hasOwnProperty("text")?Je.text:Je,Q[K]-he-he)},this).map(function(K){return this.getLineHeightFactor()*K.length*we/Oe+he+he},this).reduce(function(K,Je){return Math.max(K,Je)},0)};a.setTableHeaderRow=function(F){p.call(this),this.internal.__cell__.tableHeaderRow=F},a.printHeaderRow=function(F,Q){if(p.call(this),!this.internal.__cell__.tableHeaderRow)throw new Error("Property tableHeaderRow does not exist.");var he;if(l=!0,typeof this.internal.__cell__.headerFunction=="function"){var we=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new E(we[0],we[1],we[2],we[3],void 0,-1)}this.setFont(void 0,"bold");for(var Oe=[],K=0;K<this.internal.__cell__.tableHeaderRow.length;K+=1){he=this.internal.__cell__.tableHeaderRow[K].clone(),Q&&(he.y=this.internal.__cell__.margins.top||0,Oe.push(he)),he.lineNumber=F;var Je=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),V.call(this,he),this.setTextColor(Je)}Oe.length>0&&this.setTableHeaderRow(Oe),this.setFont(void 0,"normal"),l=!1}}(He.API);var mn={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},wn=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],zt=Ms(wn),Mr=[100,200,300,400,500,600,700,800,900],Rr=Ms(Mr);function ws(a){var n=a.family.replace(/"|'/g,"").toLowerCase(),l=function(E){return mn[E=E||"normal"]?E:"normal"}(a.style),p=function(E){return E?typeof E=="number"?E>=100&&E<=900&&E%100==0?E:400:/^\d00$/.test(E)?parseInt(E):E==="bold"?700:400:400}(a.weight),b=function(E){return typeof zt[E=E||"normal"]=="number"?E:"normal"}(a.stretch);return{family:n,style:l,weight:p,stretch:b,src:a.src||[],ref:a.ref||{name:n,style:[b,l,p].join(" ")}}}function is(a,n,l,p){var b;for(b=l;b>=0&&b<n.length;b+=p)if(a[n[b]])return a[n[b]];for(b=l;b>=0&&b<n.length;b-=p)if(a[n[b]])return a[n[b]]}var ea={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},Ts={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function Za(a){return[a.stretch,a.style,a.weight,a.family].join(" ")}function qs(a){return a.trimLeft()}function $a(a,n){for(var l=0;l<a.length;){if(a.charAt(l)===n)return[a.substring(0,l),a.substring(l+1)];l+=1}return null}function Ao(a){var n=a.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);return n===null?null:[n[0],a.substring(n[0].length)]}var ao,Ge,ur,Tr,ts,Yr,Wr,Sn,En=["times"];function Nn(a,n,l,p,b){var E=4,V=qr;switch(b){case He.API.image_compression.FAST:E=1,V=dn;break;case He.API.image_compression.MEDIUM:E=6,V=un;break;case He.API.image_compression.SLOW:E=9,V=ba}a=function(F,Q,he,we){for(var Oe,K=F.length/Q,Je=new Uint8Array(F.length+K),Fe=[kn,dn,qr,un,ba],Qe=0;Qe<K;Qe+=1){var Ae=Qe*Q,ct=F.subarray(Ae,Ae+Q);if(we)Je.set(we(ct,he,Oe),Ae+Qe);else{for(var Ct=Fe.length,nt=[],Ce=0;Ce<Ct;Ce+=1)nt[Ce]=Fe[Ce](ct,he,Oe);var bt=Eo(nt.concat());Je.set(nt[bt],Ae+Qe)}Oe=ct}return Je}(a,n,Math.ceil(l*p/8),V);var R=(0,v.zlibSync)(a,{level:E});return He.API.__addimage__.arrayBufferToBinaryString(R)}function kn(a){var n=Array.apply([],a);return n.unshift(0),n}function dn(a,n){var l=a.length,p=[];p[0]=1;for(var b=0;b<l;b+=1){var E=a[b-n]||0;p[b+1]=a[b]-E+256&255}return p}function qr(a,n,l){var p=a.length,b=[];b[0]=2;for(var E=0;E<p;E+=1){var V=l&&l[E]||0;b[E+1]=a[E]-V+256&255}return b}function un(a,n,l){var p=a.length,b=[];b[0]=3;for(var E=0;E<p;E+=1){var V=a[E-n]||0,R=l&&l[E]||0;b[E+1]=a[E]+256-(V+R>>>1)&255}return b}function ba(a,n,l){var p=a.length,b=[];b[0]=4;for(var E=0;E<p;E+=1){var V=wa(a[E-n]||0,l&&l[E]||0,l&&l[E-n]||0);b[E+1]=a[E]-V+256&255}return b}function wa(a,n,l){if(a===n&&n===l)return a;var p=Math.abs(n-l),b=Math.abs(a-l),E=Math.abs(a+n-l-l);return p<=b&&p<=E?a:b<=E?n:l}function Eo(a){var n=a.map(function(l){return l.reduce(function(p,b){return p+Math.abs(b)},0)});return n.indexOf(Math.min.apply(null,n))}function ma(a,n,l){var p=n*l,b=Math.floor(p/8),E=16-(p-8*b+l),V=(1<<l)-1;return Na(a,b)>>E&V}function ps(a,n,l,p){var b=l*p,E=Math.floor(b/8),V=16-(b-8*E+p),R=(1<<p)-1,F=(n&R)<<V;(function(Q,he,we){if(he+1<Q.byteLength)Q.setUint16(he,we,!1);else{var Oe=we>>8&255;Q.setUint8(he,Oe)}})(a,E,Na(a,E)&~(R<<V)&65535|F)}function Na(a,n){return n+1<a.byteLength?a.getUint16(n,!1):a.getUint8(n)<<8}function pa(a){var n=0;if(a[n++]!==71||a[n++]!==73||a[n++]!==70||a[n++]!==56||(a[n++]+1&253)!=56||a[n++]!==97)throw new Error("Invalid GIF 87a/89a header.");var l=a[n++]|a[n++]<<8,p=a[n++]|a[n++]<<8,b=a[n++],E=b>>7,V=1<<1+(7&b);a[n++],a[n++];var R=null,F=null;E&&(R=n,F=V,n+=3*V);var Q=!0,he=[],we=0,Oe=null,K=0,Je=null;for(this.width=l,this.height=p;Q&&n<a.length;)switch(a[n++]){case 33:switch(a[n++]){case 255:if(a[n]!==11||a[n+1]==78&&a[n+2]==69&&a[n+3]==84&&a[n+4]==83&&a[n+5]==67&&a[n+6]==65&&a[n+7]==80&&a[n+8]==69&&a[n+9]==50&&a[n+10]==46&&a[n+11]==48&&a[n+12]==3&&a[n+13]==1&&a[n+16]==0)n+=14,Je=a[n++]|a[n++]<<8,n++;else for(n+=12;;){if(!((ke=a[n++])>=0))throw Error("Invalid block size");if(ke===0)break;n+=ke}break;case 249:if(a[n++]!==4||a[n+4]!==0)throw new Error("Invalid graphics extension block.");var Fe=a[n++];we=a[n++]|a[n++]<<8,Oe=a[n++],1&Fe||(Oe=null),K=Fe>>2&7,n++;break;case 254:for(;;){if(!((ke=a[n++])>=0))throw Error("Invalid block size");if(ke===0)break;n+=ke}break;default:throw new Error("Unknown graphic control label: 0x"+a[n-1].toString(16))}break;case 44:var Qe=a[n++]|a[n++]<<8,Ae=a[n++]|a[n++]<<8,ct=a[n++]|a[n++]<<8,Ct=a[n++]|a[n++]<<8,nt=a[n++],Ce=nt>>6&1,bt=1<<1+(7&nt),Gt=R,Et=F,dt=!1;nt>>7&&(dt=!0,Gt=n,Et=bt,n+=3*bt);var $t=n;for(n++;;){var ke;if(!((ke=a[n++])>=0))throw Error("Invalid block size");if(ke===0)break;n+=ke}he.push({x:Qe,y:Ae,width:ct,height:Ct,has_local_palette:dt,palette_offset:Gt,palette_size:Et,data_offset:$t,data_length:n-$t,transparent_index:Oe,interlaced:!!Ce,delay:we,disposal:K});break;case 59:Q=!1;break;default:throw new Error("Unknown gif block: 0x"+a[n-1].toString(16))}this.numFrames=function(){return he.length},this.loopCount=function(){return Je},this.frameInfo=function(Re){if(Re<0||Re>=he.length)throw new Error("Frame index out of range.");return he[Re]},this.decodeAndBlitFrameBGRA=function(Re,at){var ot=this.frameInfo(Re),Ut=ot.width*ot.height,Xt=new Uint8Array(Ut);zo(a,ot.data_offset,Xt,Ut);var er=ot.palette_offset,Pt=ot.transparent_index;Pt===null&&(Pt=256);var Qt=ot.width,kr=l-Qt,Nr=Qt,xe=4*(ot.y*l+ot.x),Ve=4*((ot.y+ot.height)*l+ot.x),qe=xe,yt=4*kr;ot.interlaced===!0&&(yt+=4*l*7);for(var Nt=8,Ot=0,Zt=Xt.length;Ot<Zt;++Ot){var qt=Xt[Ot];if(Nr===0&&(Nr=Qt,(qe+=yt)>=Ve&&(yt=4*kr+4*l*(Nt-1),qe=xe+(Qt+kr)*(Nt<<1),Nt>>=1)),qt===Pt)qe+=4;else{var mr=a[er+3*qt],_r=a[er+3*qt+1],$r=a[er+3*qt+2];at[qe++]=$r,at[qe++]=_r,at[qe++]=mr,at[qe++]=255}--Nr}},this.decodeAndBlitFrameRGBA=function(Re,at){var ot=this.frameInfo(Re),Ut=ot.width*ot.height,Xt=new Uint8Array(Ut);zo(a,ot.data_offset,Xt,Ut);var er=ot.palette_offset,Pt=ot.transparent_index;Pt===null&&(Pt=256);var Qt=ot.width,kr=l-Qt,Nr=Qt,xe=4*(ot.y*l+ot.x),Ve=4*((ot.y+ot.height)*l+ot.x),qe=xe,yt=4*kr;ot.interlaced===!0&&(yt+=4*l*7);for(var Nt=8,Ot=0,Zt=Xt.length;Ot<Zt;++Ot){var qt=Xt[Ot];if(Nr===0&&(Nr=Qt,(qe+=yt)>=Ve&&(yt=4*kr+4*l*(Nt-1),qe=xe+(Qt+kr)*(Nt<<1),Nt>>=1)),qt===Pt)qe+=4;else{var mr=a[er+3*qt],_r=a[er+3*qt+1],$r=a[er+3*qt+2];at[qe++]=mr,at[qe++]=_r,at[qe++]=$r,at[qe++]=255}--Nr}}}function zo(a,n,l,p){for(var b=a[n++],E=1<<b,V=E+1,R=V+1,F=b+1,Q=(1<<F)-1,he=0,we=0,Oe=0,K=a[n++],Je=new Int32Array(4096),Fe=null;;){for(;he<16&&K!==0;)we|=a[n++]<<he,he+=8,K===1?K=a[n++]:--K;if(he<F)break;var Qe=we&Q;if(we>>=F,he-=F,Qe!==E){if(Qe===V)break;for(var Ae=Qe<R?Qe:Fe,ct=0,Ct=Ae;Ct>E;)Ct=Je[Ct]>>8,++ct;var nt=Ct;if(Oe+ct+(Ae!==Qe?1:0)>p)return void g.log("Warning, gif stream longer than expected.");l[Oe++]=nt;var Ce=Oe+=ct;for(Ae!==Qe&&(l[Oe++]=nt),Ct=Ae;ct--;)Ct=Je[Ct],l[--Ce]=255&Ct,Ct>>=8;Fe!==null&&R<4096&&(Je[R++]=Fe<<8|nt,R>=Q+1&&F<12&&(++F,Q=Q<<1|1)),Fe=Qe}else R=V+1,Q=(1<<(F=b+1))-1,Fe=null}return Oe!==p&&g.log("Warning, gif stream shorter than expected."),l}/**
289	 * @license
290	  Copyright (c) 2008, Adobe Systems Incorporated
291	  All rights reserved.
292
293	  Redistribution and use in source and binary forms, with or without 
294	  modification, are permitted provided that the following conditions are
295	  met:
296
297	  * Redistributions of source code must retain the above copyright notice, 
298	    this list of conditions and the following disclaimer.
299	  
300	  * Redistributions in binary form must reproduce the above copyright
301	    notice, this list of conditions and the following disclaimer in the 
302	    documentation and/or other materials provided with the distribution.
303	  
304	  * Neither the name of Adobe Systems Incorporated nor the names of its 
305	    contributors may be used to endorse or promote products derived from 
306	    this software without specific prior written permission.
307
308	  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
309	  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
310	  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
311	  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 
312	  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
313	  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
314	  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
315	  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
316	  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
317	  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
318	  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
319	*/function Va(a){var n,l,p,b,E,V=Math.floor,R=new Array(64),F=new Array(64),Q=new Array(64),he=new Array(64),we=new Array(65535),Oe=new Array(65535),K=new Array(64),Je=new Array(64),Fe=[],Qe=0,Ae=7,ct=new Array(64),Ct=new Array(64),nt=new Array(64),Ce=new Array(256),bt=new Array(2048),Gt=[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],Et=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],dt=[0,1,2,3,4,5,6,7,8,9,10,11],$t=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],ke=[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],Re=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],at=[0,1,2,3,4,5,6,7,8,9,10,11],ot=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],Ut=[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 Xt(xe,Ve){for(var qe=0,yt=0,Nt=new Array,Ot=1;Ot<=16;Ot++){for(var Zt=1;Zt<=xe[Ot];Zt++)Nt[Ve[yt]]=[],Nt[Ve[yt]][0]=qe,Nt[Ve[yt]][1]=Ot,yt++,qe++;qe*=2}return Nt}function er(xe){for(var Ve=xe[0],qe=xe[1]-1;qe>=0;)Ve&1<<qe&&(Qe|=1<<Ae),qe--,--Ae<0&&(Qe==255?(Pt(255),Pt(0)):Pt(Qe),Ae=7,Qe=0)}function Pt(xe){Fe.push(xe)}function Qt(xe){Pt(xe>>8&255),Pt(255&xe)}function kr(xe,Ve,qe,yt,Nt){for(var Ot,Zt=Nt[0],qt=Nt[240],mr=function(Sr,js){var Zr,xs,hs,jn,tn,Ls,sn,rn,Jr,Bs,os=0;for(Jr=0;Jr<8;++Jr){Zr=Sr[os],xs=Sr[os+1],hs=Sr[os+2],jn=Sr[os+3],tn=Sr[os+4],Ls=Sr[os+5],sn=Sr[os+6];var oa=Zr+(rn=Sr[os+7]),nn=Zr-rn,Hs=xs+sn,Ks=xs-sn,Xn=hs+Ls,vs=hs-Ls,Bn=jn+tn,Ss=jn-tn,ks=oa+Bn,Zn=oa-Bn,Xs=Hs+Xn,bs=Hs-Xn;Sr[os]=ks+Xs,Sr[os+4]=ks-Xs;var pn=.707106781*(bs+Zn);Sr[os+2]=Zn+pn,Sr[os+6]=Zn-pn;var Hi=.382683433*((ks=Ss+vs)-(bs=Ks+nn)),_a=.5411961*ks+Hi,qa=1.306562965*bs+Hi,si=.707106781*(Xs=vs+Ks),Ns=nn+si,Sa=nn-si;Sr[os+5]=Sa+_a,Sr[os+3]=Sa-_a,Sr[os+1]=Ns+qa,Sr[os+7]=Ns-qa,os+=8}for(os=0,Jr=0;Jr<8;++Jr){Zr=Sr[os],xs=Sr[os+8],hs=Sr[os+16],jn=Sr[os+24],tn=Sr[os+32],Ls=Sr[os+40],sn=Sr[os+48];var ni=Zr+(rn=Sr[os+56]),ho=Zr-rn,ko=xs+sn,ra=xs-sn,xa=hs+Ls,Ba=hs-Ls,Ei=jn+tn,di=jn-tn,_o=ni+Ei,$o=ni-Ei,Po=ko+xa,To=ko-xa;Sr[os]=_o+Po,Sr[os+32]=_o-Po;var fo=.707106781*(To+$o);Sr[os+16]=$o+fo,Sr[os+48]=$o-fo;var ki=.382683433*((_o=di+Ba)-(To=ra+ho)),mo=.5411961*_o+ki,eo=1.306562965*To+ki,_i=.707106781*(Po=Ba+ra),Gi=ho+_i,Pi=ho-_i;Sr[os+40]=Pi+mo,Sr[os+24]=Pi-mo,Sr[os+8]=Gi+eo,Sr[os+56]=Gi-eo,os++}for(Jr=0;Jr<64;++Jr)Bs=Sr[Jr]*js[Jr],K[Jr]=Bs>0?Bs+.5|0:Bs-.5|0;return K}(xe,Ve),_r=0;_r<64;++_r)Je[Gt[_r]]=mr[_r];var $r=Je[0]-qe;qe=Je[0],$r==0?er(yt[0]):(er(yt[Oe[Ot=32767+$r]]),er(we[Ot]));for(var Kr=63;Kr>0&&Je[Kr]==0;)Kr--;if(Kr==0)return er(Zt),qe;for(var ys,Ie=1;Ie<=Kr;){for(var Br=Ie;Je[Ie]==0&&Ie<=Kr;)++Ie;var Fs=Ie-Br;if(Fs>=16){ys=Fs>>4;for(var gs=1;gs<=ys;++gs)er(qt);Fs&=15}Ot=32767+Je[Ie],er(Nt[(Fs<<4)+Oe[Ot]]),er(we[Ot]),Ie++}return Kr!=63&&er(Zt),qe}function Nr(xe){xe=Math.min(Math.max(xe,1),100),E!=xe&&(function(Ve){for(var qe=[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],yt=0;yt<64;yt++){var Nt=V((qe[yt]*Ve+50)/100);Nt=Math.min(Math.max(Nt,1),255),R[Gt[yt]]=Nt}for(var Ot=[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],Zt=0;Zt<64;Zt++){var qt=V((Ot[Zt]*Ve+50)/100);qt=Math.min(Math.max(qt,1),255),F[Gt[Zt]]=qt}for(var mr=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],_r=0,$r=0;$r<8;$r++)for(var Kr=0;Kr<8;Kr++)Q[_r]=1/(R[Gt[_r]]*mr[$r]*mr[Kr]*8),he[_r]=1/(F[Gt[_r]]*mr[$r]*mr[Kr]*8),_r++}(xe<50?Math.floor(5e3/xe):Math.floor(200-2*xe)),E=xe)}this.encode=function(xe,Ve){Ve&&Nr(Ve),Fe=new Array,Qe=0,Ae=7,Qt(65496),Qt(65504),Qt(16),Pt(74),Pt(70),Pt(73),Pt(70),Pt(0),Pt(1),Pt(1),Pt(0),Qt(1),Qt(1),Pt(0),Pt(0),function(){Qt(65499),Qt(132),Pt(0);for(var xs=0;xs<64;xs++)Pt(R[xs]);Pt(1);for(var hs=0;hs<64;hs++)Pt(F[hs])}(),function(xs,hs){Qt(65472),Qt(17),Pt(8),Qt(hs),Qt(xs),Pt(3),Pt(1),Pt(17),Pt(0),Pt(2),Pt(17),Pt(1),Pt(3),Pt(17),Pt(1)}(xe.width,xe.height),function(){Qt(65476),Qt(418),Pt(0);for(var xs=0;xs<16;xs++)Pt(Et[xs+1]);for(var hs=0;hs<=11;hs++)Pt(dt[hs]);Pt(16);for(var jn=0;jn<16;jn++)Pt($t[jn+1]);for(var tn=0;tn<=161;tn++)Pt(ke[tn]);Pt(1);for(var Ls=0;Ls<16;Ls++)Pt(Re[Ls+1]);for(var sn=0;sn<=11;sn++)Pt(at[sn]);Pt(17);for(var rn=0;rn<16;rn++)Pt(ot[rn+1]);for(var Jr=0;Jr<=161;Jr++)Pt(Ut[Jr])}(),Qt(65498),Qt(12),Pt(3),Pt(1),Pt(0),Pt(2),Pt(17),Pt(3),Pt(17),Pt(0),Pt(63),Pt(0);var qe=0,yt=0,Nt=0;Qe=0,Ae=7,this.encode.displayName="_encode_";for(var Ot,Zt,qt,mr,_r,$r,Kr,ys,Ie,Br=xe.data,Fs=xe.width,gs=xe.height,Sr=4*Fs,js=0;js<gs;){for(Ot=0;Ot<Sr;){for(_r=Sr*js+Ot,Kr=-1,ys=0,Ie=0;Ie<64;Ie++)$r=_r+(ys=Ie>>3)*Sr+(Kr=4*(7&Ie)),js+ys>=gs&&($r-=Sr*(js+1+ys-gs)),Ot+Kr>=Sr&&($r-=Ot+Kr-Sr+4),Zt=Br[$r++],qt=Br[$r++],mr=Br[$r++],ct[Ie]=(bt[Zt]+bt[qt+256|0]+bt[mr+512|0]>>16)-128,Ct[Ie]=(bt[Zt+768|0]+bt[qt+1024|0]+bt[mr+1280|0]>>16)-128,nt[Ie]=(bt[Zt+1280|0]+bt[qt+1536|0]+bt[mr+1792|0]>>16)-128;qe=kr(ct,Q,qe,n,p),yt=kr(Ct,he,yt,l,b),Nt=kr(nt,he,Nt,l,b),Ot+=32}js+=8}if(Ae>=0){var Zr=[];Zr[1]=Ae+1,Zr[0]=(1<<Ae+1)-1,er(Zr)}return Qt(65497),new Uint8Array(Fe)},a=a||50,function(){for(var xe=String.fromCharCode,Ve=0;Ve<256;Ve++)Ce[Ve]=xe(Ve)}(),n=Xt(Et,dt),l=Xt(Re,at),p=Xt($t,ke),b=Xt(ot,Ut),function(){for(var xe=1,Ve=2,qe=1;qe<=15;qe++){for(var yt=xe;yt<Ve;yt++)Oe[32767+yt]=qe,we[32767+yt]=[],we[32767+yt][1]=qe,we[32767+yt][0]=yt;for(var Nt=-(Ve-1);Nt<=-xe;Nt++)Oe[32767+Nt]=qe,we[32767+Nt]=[],we[32767+Nt][1]=qe,we[32767+Nt][0]=Ve-1+Nt;xe<<=1,Ve<<=1}}(),function(){for(var xe=0;xe<256;xe++)bt[xe]=19595*xe,bt[xe+256|0]=38470*xe,bt[xe+512|0]=7471*xe+32768,bt[xe+768|0]=-11059*xe,bt[xe+1024|0]=-21709*xe,bt[xe+1280|0]=32768*xe+8421375,bt[xe+1536|0]=-27439*xe,bt[xe+1792|0]=-5329*xe}(),Nr(a)}/**
320 * @license
321 * Copyright (c) 2017 Aras Abbasi
322 *
323 * Licensed under the MIT License.
324 * http://opensource.org/licenses/mit-license
325 */function _n(a,n){if(this.pos=0,this.buffer=a,this.datav=new DataView(a.buffer),this.is_with_alpha=!!n,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 Fa(a){function n(dt){if(!dt)throw Error("assert :P")}function l(dt,$t,ke){for(var Re=0;4>Re;Re++)if(dt[$t+Re]!=ke.charCodeAt(Re))return!0;return!1}function p(dt,$t,ke,Re,at){for(var ot=0;ot<at;ot++)dt[$t+ot]=ke[Re+ot]}function b(dt,$t,ke,Re){for(var at=0;at<Re;at++)dt[$t+at]=ke}function E(dt){return new Int32Array(dt)}function V(dt,$t){for(var ke=[],Re=0;Re<dt;Re++)ke.push(new $t);return ke}function R(dt,$t){var ke=[];return function Re(at,ot,Ut){for(var Xt=Ut[ot],er=0;er<Xt&&(at.push(Ut.length>ot+1?[]:new $t),!(Ut.length<ot+1));er++)Re(at[er],ot+1,Ut)}(ke,0,dt),ke}var F=function(){var dt=this;function $t(i,x){for(var D=1<<x-1>>>0;i&D;)D>>>=1;return D?(i&D-1)+D:i}function ke(i,x,D,G,ce){n(!(G%D));do i[x+(G-=D)]=ce;while(0<G)}function Re(i,x,D,G,ce){if(n(2328>=ce),512>=ce)var me=E(512);else if((me=E(ce))==null)return 0;return function(ve,Ne,_e,Be,mt,Bt){var Ue,wt,kt=Ne,sr=1<<_e,Mt=E(16),ar=E(16);for(n(mt!=0),n(Be!=null),n(ve!=null),n(0<_e),wt=0;wt<mt;++wt){if(15<Be[wt])return 0;++Mt[Be[wt]]}if(Mt[0]==mt)return 0;for(ar[1]=0,Ue=1;15>Ue;++Ue){if(Mt[Ue]>1<<Ue)return 0;ar[Ue+1]=ar[Ue]+Mt[Ue]}for(wt=0;wt<mt;++wt)Ue=Be[wt],0<Be[wt]&&(Bt[ar[Ue]++]=wt);if(ar[15]==1)return(Be=new at).g=0,Be.value=Bt[0],ke(ve,kt,1,sr,Be),sr;var cr,Ar=-1,br=sr-1,ls=0,es=1,Js=1,ss=1<<_e;for(wt=0,Ue=1,mt=2;Ue<=_e;++Ue,mt<<=1){if(es+=Js<<=1,0>(Js-=Mt[Ue]))return 0;for(;0<Mt[Ue];--Mt[Ue])(Be=new at).g=Ue,Be.value=Bt[wt++],ke(ve,kt+ls,mt,ss,Be),ls=$t(ls,Ue)}for(Ue=_e+1,mt=2;15>=Ue;++Ue,mt<<=1){if(es+=Js<<=1,0>(Js-=Mt[Ue]))return 0;for(;0<Mt[Ue];--Mt[Ue]){if(Be=new at,(ls&br)!=Ar){for(kt+=ss,cr=1<<(Ar=Ue)-_e;15>Ar&&!(0>=(cr-=Mt[Ar]));)++Ar,cr<<=1;sr+=ss=1<<(cr=Ar-_e),ve[Ne+(Ar=ls&br)].g=cr+_e,ve[Ne+Ar].value=kt-Ne-Ar}Be.g=Ue-_e,Be.value=Bt[wt++],ke(ve,kt+(ls>>_e),mt,ss,Be),ls=$t(ls,Ue)}}return es!=2*ar[15]-1?0:sr}(i,x,D,G,ce,me)}function at(){this.value=this.g=0}function ot(){this.value=this.g=0}function Ut(){this.G=V(5,at),this.H=E(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=V(Gs,ot)}function Xt(i,x,D,G){n(i!=null),n(x!=null),n(2147483648>G),i.Ca=254,i.I=0,i.b=-8,i.Ka=0,i.oa=x,i.pa=D,i.Jd=x,i.Yc=D+G,i.Zc=4<=G?D+G-4+1:D,Zt(i)}function er(i,x){for(var D=0;0<x--;)D|=mr(i,128)<<x;return D}function Pt(i,x){var D=er(i,x);return qt(i)?-D:D}function Qt(i,x,D,G){var ce,me=0;for(n(i!=null),n(x!=null),n(4294967288>G),i.Sb=G,i.Ra=0,i.u=0,i.h=0,4<G&&(G=4),ce=0;ce<G;++ce)me+=x[D+ce]<<8*ce;i.Ra=me,i.bb=G,i.oa=x,i.pa=D}function kr(i){for(;8<=i.u&&i.bb<i.Sb;)i.Ra>>>=8,i.Ra+=i.oa[i.pa+i.bb]<<io-8>>>0,++i.bb,i.u-=8;yt(i)&&(i.h=1,i.u=0)}function Nr(i,x){if(n(0<=x),!i.h&&x<=Ps){var D=qe(i)&cs[x];return i.u+=x,kr(i),D}return i.h=1,i.u=0}function xe(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function Ve(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function qe(i){return i.Ra>>>(i.u&io-1)>>>0}function yt(i){return n(i.bb<=i.Sb),i.h||i.bb==i.Sb&&i.u>io}function Nt(i,x){i.u=x,i.h=yt(i)}function Ot(i){i.u>=oi&&(n(i.u>=oi),kr(i))}function Zt(i){n(i!=null&&i.oa!=null),i.pa<i.Zc?(i.I=(i.oa[i.pa++]|i.I<<8)>>>0,i.b+=8):(n(i!=null&&i.oa!=null),i.pa<i.Yc?(i.b+=8,i.I=i.oa[i.pa++]|i.I<<8):i.Ka?i.b=0:(i.I<<=8,i.b+=8,i.Ka=1))}function qt(i){return er(i,1)}function mr(i,x){var D=i.Ca;0>i.b&&Zt(i);var G=i.b,ce=D*x>>>8,me=(i.I>>>G>ce)+0;for(me?(D-=ce,i.I-=ce+1<<G>>>0):D=ce+1,G=D,ce=0;256<=G;)ce+=8,G>>=8;return G=7^ce+Yo[G],i.b-=G,i.Ca=(D<<G)-1,me}function _r(i,x,D){i[x+0]=D>>24&255,i[x+1]=D>>16&255,i[x+2]=D>>8&255,i[x+3]=255&D}function $r(i,x){return i[x+0]|i[x+1]<<8}function Kr(i,x){return $r(i,x)|i[x+2]<<16}function ys(i,x){return $r(i,x)|$r(i,x+2)<<16}function Ie(i,x){var D=1<<x;return n(i!=null),n(0<x),i.X=E(D),i.X==null?0:(i.Mb=32-x,i.Xa=x,1)}function Br(i,x){n(i!=null),n(x!=null),n(i.Xa==x.Xa),p(x.X,0,i.X,0,1<<x.Xa)}function Fs(){this.X=[],this.Xa=this.Mb=0}function gs(i,x,D,G){n(D!=null),n(G!=null);var ce=D[0],me=G[0];return ce==0&&(ce=(i*me+x/2)/x),me==0&&(me=(x*ce+i/2)/i),0>=ce||0>=me?0:(D[0]=ce,G[0]=me,1)}function Sr(i,x){return i+(1<<x)-1>>>x}function js(i,x){return((4278255360&i)+(4278255360&x)>>>0&4278255360)+((16711935&i)+(16711935&x)>>>0&16711935)>>>0}function Zr(i,x){dt[x]=function(D,G,ce,me,ve,Ne,_e){var Be;for(Be=0;Be<ve;++Be){var mt=dt[i](Ne[_e+Be-1],ce,me+Be);Ne[_e+Be]=js(D[G+Be],mt)}}}function xs(){this.ud=this.hd=this.jd=0}function hs(i,x){return((4278124286&(i^x))>>>1)+(i&x)>>>0}function jn(i){return 0<=i&&256>i?i:0>i?0:255<i?255:void 0}function tn(i,x){return jn(i+(i-x+.5>>1))}function Ls(i,x,D){return Math.abs(x-D)-Math.abs(i-D)}function sn(i,x,D,G,ce,me,ve){for(G=me[ve-1],D=0;D<ce;++D)me[ve+D]=G=js(i[x+D],G)}function rn(i,x,D,G,ce){var me;for(me=0;me<D;++me){var ve=i[x+me],Ne=ve>>8&255,_e=16711935&(_e=(_e=16711935&ve)+((Ne<<16)+Ne));G[ce+me]=(4278255360&ve)+_e>>>0}}function Jr(i,x){x.jd=255&i,x.hd=i>>8&255,x.ud=i>>16&255}function Bs(i,x,D,G,ce,me){var ve;for(ve=0;ve<G;++ve){var Ne=x[D+ve],_e=Ne>>>8,Be=Ne,mt=255&(mt=(mt=Ne>>>16)+((i.jd<<24>>24)*(_e<<24>>24)>>>5));Be=255&(Be=(Be+=(i.hd<<24>>24)*(_e<<24>>24)>>>5)+((i.ud<<24>>24)*(mt<<24>>24)>>>5)),ce[me+ve]=(4278255360&Ne)+(mt<<16)+Be}}function os(i,x,D,G,ce){dt[x]=function(me,ve,Ne,_e,Be,mt,Bt,Ue,wt){for(_e=Bt;_e<Ue;++_e)for(Bt=0;Bt<wt;++Bt)Be[mt++]=ce(Ne[G(me[ve++])])},dt[i]=function(me,ve,Ne,_e,Be,mt,Bt){var Ue=8>>me.b,wt=me.Ea,kt=me.K[0],sr=me.w;if(8>Ue)for(me=(1<<me.b)-1,sr=(1<<Ue)-1;ve<Ne;++ve){var Mt,ar=0;for(Mt=0;Mt<wt;++Mt)Mt&me||(ar=G(_e[Be++])),mt[Bt++]=ce(kt[ar&sr]),ar>>=Ue}else dt["VP8LMapColor"+D](_e,Be,kt,sr,mt,Bt,ve,Ne,wt)}}function oa(i,x,D,G,ce){for(D=x+D;x<D;){var me=i[x++];G[ce++]=me>>16&255,G[ce++]=me>>8&255,G[ce++]=255&me}}function nn(i,x,D,G,ce){for(D=x+D;x<D;){var me=i[x++];G[ce++]=me>>16&255,G[ce++]=me>>8&255,G[ce++]=255&me,G[ce++]=me>>24&255}}function Hs(i,x,D,G,ce){for(D=x+D;x<D;){var me=(ve=i[x++])>>16&240|ve>>12&15,ve=240&ve|ve>>28&15;G[ce++]=me,G[ce++]=ve}}function Ks(i,x,D,G,ce){for(D=x+D;x<D;){var me=(ve=i[x++])>>16&248|ve>>13&7,ve=ve>>5&224|ve>>3&31;G[ce++]=me,G[ce++]=ve}}function Xn(i,x,D,G,ce){for(D=x+D;x<D;){var me=i[x++];G[ce++]=255&me,G[ce++]=me>>8&255,G[ce++]=me>>16&255}}function vs(i,x,D,G,ce,me){if(me==0)for(D=x+D;x<D;)_r(G,((me=i[x++])[0]>>24|me[1]>>8&65280|me[2]<<8&16711680|me[3]<<24)>>>0),ce+=32;else p(G,ce,i,x,D)}function Bn(i,x){dt[x][0]=dt[i+"0"],dt[x][1]=dt[i+"1"],dt[x][2]=dt[i+"2"],dt[x][3]=dt[i+"3"],dt[x][4]=dt[i+"4"],dt[x][5]=dt[i+"5"],dt[x][6]=dt[i+"6"],dt[x][7]=dt[i+"7"],dt[x][8]=dt[i+"8"],dt[x][9]=dt[i+"9"],dt[x][10]=dt[i+"10"],dt[x][11]=dt[i+"11"],dt[x][12]=dt[i+"12"],dt[x][13]=dt[i+"13"],dt[x][14]=dt[i+"0"],dt[x][15]=dt[i+"0"]}function Ss(i){return i==Ru||i==Mu||i==Bd||i==Fu}function ks(){this.eb=[],this.size=this.A=this.fb=0}function Zn(){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 Xs(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new ks,this.f.kb=new Zn,this.sd=null}function bs(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function pn(){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 Hi(i){return alert("todo:WebPSamplerProcessPlane"),i.T}function _a(i,x){var D=i.T,G=x.ba.f.RGBA,ce=G.eb,me=G.fb+i.ka*G.A,ve=ci[x.ba.S],Ne=i.y,_e=i.O,Be=i.f,mt=i.N,Bt=i.ea,Ue=i.W,wt=x.cc,kt=x.dc,sr=x.Mc,Mt=x.Nc,ar=i.ka,cr=i.ka+i.T,Ar=i.U,br=Ar+1>>1;for(ar==0?ve(Ne,_e,null,null,Be,mt,Bt,Ue,Be,mt,Bt,Ue,ce,me,null,null,Ar):(ve(x.ec,x.fc,Ne,_e,wt,kt,sr,Mt,Be,mt,Bt,Ue,ce,me-G.A,ce,me,Ar),++D);ar+2<cr;ar+=2)wt=Be,kt=mt,sr=Bt,Mt=Ue,mt+=i.Rc,Ue+=i.Rc,me+=2*G.A,ve(Ne,(_e+=2*i.fa)-i.fa,Ne,_e,wt,kt,sr,Mt,Be,mt,Bt,Ue,ce,me-G.A,ce,me,Ar);return _e+=i.fa,i.j+cr<i.o?(p(x.ec,x.fc,Ne,_e,Ar),p(x.cc,x.dc,Be,mt,br),p(x.Mc,x.Nc,Bt,Ue,br),D--):1&cr||ve(Ne,_e,null,null,Be,mt,Bt,Ue,Be,mt,Bt,Ue,ce,me+G.A,null,null,Ar),D}function qa(i,x,D){var G=i.F,ce=[i.J];if(G!=null){var me=i.U,ve=x.ba.S,Ne=ve==Dd||ve==Bd;x=x.ba.f.RGBA;var _e=[0],Be=i.ka;_e[0]=i.T,i.Kb&&(Be==0?--_e[0]:(--Be,ce[0]-=i.width),i.j+i.ka+i.T==i.o&&(_e[0]=i.o-i.j-Be));var mt=x.eb;Be=x.fb+Be*x.A,i=qh(G,ce[0],i.width,me,_e,mt,Be+(Ne?0:3),x.A),n(D==_e),i&&Ss(ve)&&Xc(mt,Be,Ne,me,_e,x.A)}return 0}function si(i){var x=i.ma,D=x.ba.S,G=11>D,ce=D==Md||D==Fd||D==Dd||D==Iu||D==12||Ss(D);if(x.memory=null,x.Ib=null,x.Jb=null,x.Nd=null,!ia(x.Oa,i,ce?11:12))return 0;if(ce&&Ss(D)&&Me(),i.da)alert("todo:use_scaling");else{if(G){if(x.Ib=Hi,i.Kb){if(D=i.U+1>>1,x.memory=E(i.U+2*D),x.memory==null)return 0;x.ec=x.memory,x.fc=0,x.cc=x.ec,x.dc=x.fc+i.U,x.Mc=x.cc,x.Nc=x.dc+D,x.Ib=_a,Me()}}else alert("todo:EmitYUV");ce&&(x.Jb=qa,G&&be())}if(G&&!gf){for(i=0;256>i;++i)Yp[i]=89858*(i-128)+zd>>Ud,Zp[i]=-22014*(i-128)+zd,Xp[i]=-45773*(i-128),Kp[i]=113618*(i-128)+zd>>Ud;for(i=Jc;i<Uu;++i)x=76283*(i-16)+zd>>Ud,Jp[i-Jc]=Lo(x,255),Qp[i-Jc]=Lo(x+8>>4,15);gf=1}return 1}function Ns(i){var x=i.ma,D=i.U,G=i.T;return n(!(1&i.ka)),0>=D||0>=G?0:(D=x.Ib(i,x),x.Jb!=null&&x.Jb(i,x,D),x.Dc+=D,1)}function Sa(i){i.ma.memory=null}function ni(i,x,D,G){return Nr(i,8)!=47?0:(x[0]=Nr(i,14)+1,D[0]=Nr(i,14)+1,G[0]=Nr(i,1),Nr(i,3)!=0?0:!i.h)}function ho(i,x){if(4>i)return i+1;var D=i-2>>1;return(2+(1&i)<<D)+Nr(x,D)+1}function ko(i,x){return 120<x?x-120:1<=(D=((D=Op[x-1])>>4)*i+(8-(15&D)))?D:1;var D}function ra(i,x,D){var G=qe(D),ce=i[x+=255&G].g-8;return 0<ce&&(Nt(D,D.u+8),G=qe(D),x+=i[x].value,x+=G&(1<<ce)-1),Nt(D,D.u+i[x].g),i[x].value}function xa(i,x,D){return D.g+=i.g,D.value+=i.value<<x>>>0,n(8>=D.g),i.g}function Ba(i,x,D){var G=i.xc;return n((x=G==0?0:i.vc[i.md*(D>>G)+(x>>G)])<i.Wb),i.Ya[x]}function Ei(i,x,D,G){var ce=i.ab,me=i.c*x,ve=i.C;x=ve+x;var Ne=D,_e=G;for(G=i.Ta,D=i.Ua;0<ce--;){var Be=i.gc[ce],mt=ve,Bt=x,Ue=Ne,wt=_e,kt=(_e=G,Ne=D,Be.Ea);switch(n(mt<Bt),n(Bt<=Be.nc),Be.hc){case 2:La(Ue,wt,(Bt-mt)*kt,_e,Ne);break;case 0:var sr=mt,Mt=Bt,ar=_e,cr=Ne,Ar=(ss=Be).Ea;sr==0&&(Oi(Ue,wt,null,null,1,ar,cr),sn(Ue,wt+1,0,0,Ar-1,ar,cr+1),wt+=Ar,cr+=Ar,++sr);for(var br=1<<ss.b,ls=br-1,es=Sr(Ar,ss.b),Js=ss.K,ss=ss.w+(sr>>ss.b)*es;sr<Mt;){var cn=Js,Ga=ss,Qs=1;for(yc(Ue,wt,ar,cr-Ar,1,ar,cr);Qs<Ar;){var ns=(Qs&~ls)+br;ns>Ar&&(ns=Ar),(0,Hc[cn[Ga++]>>8&15])(Ue,wt+ +Qs,ar,cr+Qs-Ar,ns-Qs,ar,cr+Qs),Qs=ns}wt+=Ar,cr+=Ar,++sr&ls||(ss+=es)}Bt!=Be.nc&&p(_e,Ne-kt,_e,Ne+(Bt-mt-1)*kt,kt);break;case 1:for(kt=Ue,Mt=wt,Ar=(Ue=Be.Ea)-(cr=Ue&~(ar=(wt=1<<Be.b)-1)),sr=Sr(Ue,Be.b),br=Be.K,Be=Be.w+(mt>>Be.b)*sr;mt<Bt;){for(ls=br,es=Be,Js=new xs,ss=Mt+cr,cn=Mt+Ue;Mt<ss;)Jr(ls[es++],Js),Gc(Js,kt,Mt,wt,_e,Ne),Mt+=wt,Ne+=wt;Mt<cn&&(Jr(ls[es++],Js),Gc(Js,kt,Mt,Ar,_e,Ne),Mt+=Ar,Ne+=Ar),++mt&ar||(Be+=sr)}break;case 3:if(Ue==_e&&wt==Ne&&0<Be.b){for(Mt=_e,Ue=kt=Ne+(Bt-mt)*kt-(cr=(Bt-mt)*Sr(Be.Ea,Be.b)),wt=_e,ar=Ne,sr=[],cr=(Ar=cr)-1;0<=cr;--cr)sr[cr]=wt[ar+cr];for(cr=Ar-1;0<=cr;--cr)Mt[Ue+cr]=sr[cr];Ld(Be,mt,Bt,_e,kt,_e,Ne)}else Ld(Be,mt,Bt,Ue,wt,_e,Ne)}Ne=G,_e=D}_e!=D&&p(G,D,Ne,_e,me)}function di(i,x){var D=i.V,G=i.Ba+i.c*i.C,ce=x-i.C;if(n(x<=i.l.o),n(16>=ce),0<ce){var me=i.l,ve=i.Ta,Ne=i.Ua,_e=me.width;if(Ei(i,ce,D,G),ce=Ne=[Ne],n((D=i.C)<(G=x)),n(me.v<me.va),G>me.o&&(G=me.o),D<me.j){var Be=me.j-D;D=me.j,ce[0]+=Be*_e}if(D>=G?D=0:(ce[0]+=4*me.v,me.ka=D-me.j,me.U=me.va-me.v,me.T=G-D,D=1),D){if(Ne=Ne[0],11>(D=i.ca).S){var mt=D.f.RGBA,Bt=(G=D.S,ce=me.U,me=me.T,Be=mt.eb,mt.A),Ue=me;for(mt=mt.fb+i.Ma*mt.A;0<Ue--;){var wt=ve,kt=Ne,sr=ce,Mt=Be,ar=mt;switch(G){case Rd:Yc(wt,kt,sr,Mt,ar);break;case Md:ml(wt,kt,sr,Mt,ar);break;case Ru:ml(wt,kt,sr,Mt,ar),Xc(Mt,ar,0,sr,1,0);break;case of:Ql(wt,kt,sr,Mt,ar);break;case Fd:vs(wt,kt,sr,Mt,ar,1);break;case Mu:vs(wt,kt,sr,Mt,ar,1),Xc(Mt,ar,0,sr,1,0);break;case Dd:vs(wt,kt,sr,Mt,ar,0);break;case Bd:vs(wt,kt,sr,Mt,ar,0),Xc(Mt,ar,1,sr,1,0);break;case Iu:pl(wt,kt,sr,Mt,ar);break;case Fu:pl(wt,kt,sr,Mt,ar),Qh(Mt,ar,sr,1,0);break;case lf:gl(wt,kt,sr,Mt,ar);break;default:n(0)}Ne+=_e,mt+=Bt}i.Ma+=me}else alert("todo:EmitRescaledRowsYUVA");n(i.Ma<=D.height)}}i.C=x,n(i.C<=i.i)}function _o(i){var x;if(0<i.ua)return 0;for(x=0;x<i.Wb;++x){var D=i.Ya[x].G,G=i.Ya[x].H;if(0<D[1][G[1]+0].g||0<D[2][G[2]+0].g||0<D[3][G[3]+0].g)return 0}return 1}function $o(i,x,D,G,ce,me){if(i.Z!=0){var ve=i.qd,Ne=i.rd;for(n(yl[i.Z]!=null);x<D;++x)yl[i.Z](ve,Ne,G,ce,G,ce,me),ve=G,Ne=ce,ce+=me;i.qd=ve,i.rd=Ne}}function Po(i,x){var D=i.l.ma,G=D.Z==0||D.Z==1?i.l.j:i.C;if(G=i.C<G?G:i.C,n(x<=i.l.o),x>G){var ce=i.l.width,me=D.ca,ve=D.tb+ce*G,Ne=i.V,_e=i.Ba+i.c*G,Be=i.gc;n(i.ab==1),n(Be[0].hc==3),Ri(Be[0],G,x,Ne,_e,me,ve),$o(D,G,x,me,ve,ce)}i.C=i.Ma=x}function To(i,x,D,G,ce,me,ve){var Ne=i.$/G,_e=i.$%G,Be=i.m,mt=i.s,Bt=D+i.$,Ue=Bt;ce=D+G*ce;var wt=D+G*me,kt=280+mt.ua,sr=i.Pb?Ne:16777216,Mt=0<mt.ua?mt.Wa:null,ar=mt.wc,cr=Bt<wt?Ba(mt,_e,Ne):null;n(i.C<me),n(wt<=ce);var Ar=!1;e:for(;;){for(;Ar||Bt<wt;){var br=0;if(Ne>=sr){var ls=Bt-D;n((sr=i).Pb),sr.wd=sr.m,sr.xd=ls,0<sr.s.ua&&Br(sr.s.Wa,sr.s.vb),sr=Ne+Rp}if(_e&ar||(cr=Ba(mt,_e,Ne)),n(cr!=null),cr.Qb&&(x[Bt]=cr.qb,Ar=!0),!Ar)if(Ot(Be),cr.jc){br=Be,ls=x;var es=Bt,Js=cr.pd[qe(br)&Gs-1];n(cr.jc),256>Js.g?(Nt(br,br.u+Js.g),ls[es]=Js.value,br=0):(Nt(br,br.u+Js.g-256),n(256<=Js.value),br=Js.value),br==0&&(Ar=!0)}else br=ra(cr.G[0],cr.H[0],Be);if(Be.h)break;if(Ar||256>br){if(!Ar)if(cr.nd)x[Bt]=(cr.qb|br<<8)>>>0;else{if(Ot(Be),Ar=ra(cr.G[1],cr.H[1],Be),Ot(Be),ls=ra(cr.G[2],cr.H[2],Be),es=ra(cr.G[3],cr.H[3],Be),Be.h)break;x[Bt]=(es<<24|Ar<<16|br<<8|ls)>>>0}if(Ar=!1,++Bt,++_e>=G&&(_e=0,++Ne,ve!=null&&Ne<=me&&!(Ne%16)&&ve(i,Ne),Mt!=null))for(;Ue<Bt;)br=x[Ue++],Mt.X[(506832829*br&4294967295)>>>Mt.Mb]=br}else if(280>br){if(br=ho(br-256,Be),ls=ra(cr.G[4],cr.H[4],Be),Ot(Be),ls=ko(G,ls=ho(ls,Be)),Be.h)break;if(Bt-D<ls||ce-Bt<br)break e;for(es=0;es<br;++es)x[Bt+es]=x[Bt+es-ls];for(Bt+=br,_e+=br;_e>=G;)_e-=G,++Ne,ve!=null&&Ne<=me&&!(Ne%16)&&ve(i,Ne);if(n(Bt<=ce),_e&ar&&(cr=Ba(mt,_e,Ne)),Mt!=null)for(;Ue<Bt;)br=x[Ue++],Mt.X[(506832829*br&4294967295)>>>Mt.Mb]=br}else{if(!(br<kt))break e;for(Ar=br-280,n(Mt!=null);Ue<Bt;)br=x[Ue++],Mt.X[(506832829*br&4294967295)>>>Mt.Mb]=br;br=Bt,n(!(Ar>>>(ls=Mt).Xa)),x[br]=ls.X[Ar],Ar=!0}Ar||n(Be.h==yt(Be))}if(i.Pb&&Be.h&&Bt<ce)n(i.m.h),i.a=5,i.m=i.wd,i.$=i.xd,0<i.s.ua&&Br(i.s.vb,i.s.Wa);else{if(Be.h)break e;ve!=null&&ve(i,Ne>me?me:Ne),i.a=0,i.$=Bt-D}return 1}return i.a=3,0}function fo(i){n(i!=null),i.vc=null,i.yc=null,i.Ya=null;var x=i.Wa;x!=null&&(x.X=null),i.vb=null,n(i!=null)}function ki(){var i=new _s;return i==null?null:(i.a=0,i.xb=uf,Bn("Predictor","VP8LPredictors"),Bn("Predictor","VP8LPredictors_C"),Bn("PredictorAdd","VP8LPredictorsAdd"),Bn("PredictorAdd","VP8LPredictorsAdd_C"),La=rn,Gc=Bs,Yc=oa,ml=nn,pl=Hs,gl=Ks,Ql=Xn,dt.VP8LMapColor32b=Ii,dt.VP8LMapColor8b=Wc,i)}function mo(i,x,D,G,ce){var me=1,ve=[i],Ne=[x],_e=G.m,Be=G.s,mt=null,Bt=0;e:for(;;){if(D)for(;me&&Nr(_e,1);){var Ue=ve,wt=Ne,kt=G,sr=1,Mt=kt.m,ar=kt.gc[kt.ab],cr=Nr(Mt,2);if(kt.Oc&1<<cr)me=0;else{switch(kt.Oc|=1<<cr,ar.hc=cr,ar.Ea=Ue[0],ar.nc=wt[0],ar.K=[null],++kt.ab,n(4>=kt.ab),cr){case 0:case 1:ar.b=Nr(Mt,3)+2,sr=mo(Sr(ar.Ea,ar.b),Sr(ar.nc,ar.b),0,kt,ar.K),ar.K=ar.K[0];break;case 3:var Ar,br=Nr(Mt,8)+1,ls=16<br?0:4<br?1:2<br?2:3;if(Ue[0]=Sr(ar.Ea,ls),ar.b=ls,Ar=sr=mo(br,1,0,kt,ar.K)){var es,Js=br,ss=ar,cn=1<<(8>>ss.b),Ga=E(cn);if(Ga==null)Ar=0;else{var Qs=ss.K[0],ns=ss.w;for(Ga[0]=ss.K[0][0],es=1;es<1*Js;++es)Ga[es]=js(Qs[ns+es],Ga[es-1]);for(;es<4*cn;++es)Ga[es]=0;ss.K[0]=null,ss.K[0]=Ga,Ar=1}}sr=Ar;break;case 2:break;default:n(0)}me=sr}}if(ve=ve[0],Ne=Ne[0],me&&Nr(_e,1)&&!(me=1<=(Bt=Nr(_e,4))&&11>=Bt)){G.a=3;break e}var Fr;if(Fr=me)t:{var Ia,$s,hn,sa=G,ro=ve,po=Ne,Ca=Bt,lo=D,go=sa.m,Ya=sa.s,gn=[null],Ln=1,Aa=0,On=Ip[Ca];r:for(;;){if(lo&&Nr(go,1)){var so=Nr(go,3)+2,wi=Sr(ro,so),Ra=Sr(po,so),Oo=wi*Ra;if(!mo(wi,Ra,0,sa,gn))break r;for(gn=gn[0],Ya.xc=so,Ia=0;Ia<Oo;++Ia){var Gn=gn[Ia]>>8&65535;gn[Ia]=Gn,Gn>=Ln&&(Ln=Gn+1)}}if(go.h)break r;for($s=0;5>$s;++$s){var Ka=cf[$s];!$s&&0<Ca&&(Ka+=1<<Ca),Aa<Ka&&(Aa=Ka)}var Xo=V(Ln*On,at),vo=Ln,Zo=V(vo,Ut);if(Zo==null)var Jo=null;else n(65536>=vo),Jo=Zo;var Io=E(Aa);if(Jo==null||Io==null||Xo==null){sa.a=1;break r}var Qo=Xo;for(Ia=hn=0;Ia<Ln;++Ia){var Qn=Jo[Ia],qo=Qn.G,Ni=Qn.H,ec=0,el=1,no=0;for($s=0;5>$s;++$s){Ka=cf[$s],qo[$s]=Qo,Ni[$s]=hn,!$s&&0<Ca&&(Ka+=1<<Ca);n:{var Vd,zu=Ka,Wd=sa,Qc=Io,tg=Qo,rg=hn,$u=0,jl=Wd.m,sg=Nr(jl,1);if(b(Qc,0,0,zu),sg){var ng=Nr(jl,1)+1,ag=Nr(jl,1),yf=Nr(jl,ag==0?1:8);Qc[yf]=1,ng==2&&(Qc[yf=Nr(jl,8)]=1);var Hd=1}else{var jf=E(19),bf=Nr(jl,4)+4;if(19<bf){Wd.a=3;var Gd=0;break n}for(Vd=0;Vd<bf;++Vd)jf[Lp[Vd]]=Nr(jl,3);var Vu=void 0,qc=void 0,wf=Wd,og=jf,Yd=zu,Nf=Qc,Wu=0,bl=wf.m,Sf=8,Cf=V(128,at);s:for(;Re(Cf,0,7,og,19);){if(Nr(bl,1)){var ig=2+2*Nr(bl,3);if((Vu=2+Nr(bl,ig))>Yd)break s}else Vu=Yd;for(qc=0;qc<Yd&&Vu--;){Ot(bl);var Af=Cf[0+(127&qe(bl))];Nt(bl,bl.u+Af.g);var bc=Af.value;if(16>bc)Nf[qc++]=bc,bc!=0&&(Sf=bc);else{var lg=bc==16,Ef=bc-16,cg=Pp[Ef],kf=Nr(bl,_p[Ef])+cg;if(qc+kf>Yd)break s;for(var dg=lg?Sf:0;0<kf--;)Nf[qc++]=dg}}Wu=1;break s}Wu||(wf.a=3),Hd=Wu}(Hd=Hd&&!jl.h)&&($u=Re(tg,rg,8,Qc,zu)),Hd&&$u!=0?Gd=$u:(Wd.a=3,Gd=0)}if(Gd==0)break r;if(el&&Tp[$s]==1&&(el=Qo[hn].g==0),ec+=Qo[hn].g,hn+=Gd,3>=$s){var ed,Hu=Io[0];for(ed=1;ed<Ka;++ed)Io[ed]>Hu&&(Hu=Io[ed]);no+=Hu}}if(Qn.nd=el,Qn.Qb=0,el&&(Qn.qb=(qo[3][Ni[3]+0].value<<24|qo[1][Ni[1]+0].value<<16|qo[2][Ni[2]+0].value)>>>0,ec==0&&256>qo[0][Ni[0]+0].value&&(Qn.Qb=1,Qn.qb+=qo[0][Ni[0]+0].value<<8)),Qn.jc=!Qn.Qb&&6>no,Qn.jc){var Kd,tl=Qn;for(Kd=0;Kd<Gs;++Kd){var wl=Kd,Nl=tl.pd[wl],Xd=tl.G[0][tl.H[0]+wl];256<=Xd.value?(Nl.g=Xd.g+256,Nl.value=Xd.value):(Nl.g=0,Nl.value=0,wl>>=xa(Xd,8,Nl),wl>>=xa(tl.G[1][tl.H[1]+wl],16,Nl),wl>>=xa(tl.G[2][tl.H[2]+wl],0,Nl),xa(tl.G[3][tl.H[3]+wl],24,Nl))}}}Ya.vc=gn,Ya.Wb=Ln,Ya.Ya=Jo,Ya.yc=Xo,Fr=1;break t}Fr=0}if(!(me=Fr)){G.a=3;break e}if(0<Bt){if(Be.ua=1<<Bt,!Ie(Be.Wa,Bt)){G.a=1,me=0;break e}}else Be.ua=0;var Gu=G,_f=ve,ug=Ne,Yu=Gu.s,Ku=Yu.xc;if(Gu.c=_f,Gu.i=ug,Yu.md=Sr(_f,Ku),Yu.wc=Ku==0?-1:(1<<Ku)-1,D){G.xb=$p;break e}if((mt=E(ve*Ne))==null){G.a=1,me=0;break e}me=(me=To(G,mt,0,ve,Ne,Ne,null))&&!_e.h;break e}return me?(ce!=null?ce[0]=mt:(n(mt==null),n(D)),G.$=0,D||fo(Be)):fo(Be),me}function eo(i,x){var D=i.c*i.i,G=D+x+16*x;return n(i.c<=x),i.V=E(G),i.V==null?(i.Ta=null,i.Ua=0,i.a=1,0):(i.Ta=i.V,i.Ua=i.Ba+D+x,1)}function _i(i,x){var D=i.C,G=x-D,ce=i.V,me=i.Ba+i.c*D;for(n(x<=i.l.o);0<G;){var ve=16<G?16:G,Ne=i.l.ma,_e=i.l.width,Be=_e*ve,mt=Ne.ca,Bt=Ne.tb+_e*D,Ue=i.Ta,wt=i.Ua;Ei(i,ve,ce,me),ef(Ue,wt,mt,Bt,Be),$o(Ne,D,D+ve,mt,Bt,_e),G-=ve,ce+=ve*i.c,D+=ve}n(D==x),i.C=i.Ma=x}function Gi(){this.ub=this.yd=this.td=this.Rb=0}function Pi(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function lc(){this.Fb=this.Bb=this.Cb=0,this.Zb=E(4),this.Lb=E(4)}function ol(){this.Yb=function(){var i=[];return function x(D,G,ce){for(var me=ce[G],ve=0;ve<me&&(D.push(ce.length>G+1?[]:0),!(ce.length<G+1));ve++)x(D[ve],G+1,ce)}(i,0,[3,11]),i}()}function Dl(){this.jb=E(3),this.Wc=R([4,8],ol),this.Xc=R([4,17],ol)}function Bl(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new E(4),this.od=new E(4)}function to(){this.ld=this.La=this.dd=this.tc=0}function Ti(){this.Na=this.la=0}function Ul(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function il(){this.ad=E(384),this.Za=0,this.Ob=E(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function zl(){this.uc=this.M=this.Nb=0,this.wa=Array(new to),this.Y=0,this.ya=Array(new il),this.aa=0,this.l=new Yi}function $l(){this.y=E(16),this.f=E(8),this.ea=E(8)}function Vl(){this.cb=this.a=0,this.sc="",this.m=new xe,this.Od=new Gi,this.Kc=new Pi,this.ed=new Bl,this.Qa=new lc,this.Ic=this.$c=this.Aa=0,this.D=new zl,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=V(8,xe),this.ia=0,this.pb=V(4,Ul),this.Pa=new Dl,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new $l),this.Hd=0,this.rb=Array(new Ti),this.sb=0,this.wa=Array(new to),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 il),this.L=this.aa=0,this.gd=R([4,2],to),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 Lo(i,x){return 0>i?0:i>x?x:i}function Yi(){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 cc(){var i=new Vl;return i!=null&&(i.a=0,i.sc="OK",i.cb=0,i.Xb=0,Zc||(Zc=ll)),i}function Us(i,x,D){return i.a==0&&(i.a=x,i.sc=D,i.cb=0),0}function Wl(i,x,D){return 3<=D&&i[x+0]==157&&i[x+1]==1&&i[x+2]==42}function Vo(i,x){if(i==null)return 0;if(i.a=0,i.sc="OK",x==null)return Us(i,2,"null VP8Io passed to VP8GetHeaders()");var D=x.data,G=x.w,ce=x.ha;if(4>ce)return Us(i,7,"Truncated header.");var me=D[G+0]|D[G+1]<<8|D[G+2]<<16,ve=i.Od;if(ve.Rb=!(1&me),ve.td=me>>1&7,ve.yd=me>>4&1,ve.ub=me>>5,3<ve.td)return Us(i,3,"Incorrect keyframe parameters.");if(!ve.yd)return Us(i,4,"Frame not displayable.");G+=3,ce-=3;var Ne=i.Kc;if(ve.Rb){if(7>ce)return Us(i,7,"cannot parse picture header");if(!Wl(D,G,ce))return Us(i,3,"Bad code word");Ne.c=16383&(D[G+4]<<8|D[G+3]),Ne.Td=D[G+4]>>6,Ne.i=16383&(D[G+6]<<8|D[G+5]),Ne.Ud=D[G+6]>>6,G+=7,ce-=7,i.za=Ne.c+15>>4,i.Ub=Ne.i+15>>4,x.width=Ne.c,x.height=Ne.i,x.Da=0,x.j=0,x.v=0,x.va=x.width,x.o=x.height,x.da=0,x.ib=x.width,x.hb=x.height,x.U=x.width,x.T=x.height,b((me=i.Pa).jb,0,255,me.jb.length),n((me=i.Qa)!=null),me.Cb=0,me.Bb=0,me.Fb=1,b(me.Zb,0,0,me.Zb.length),b(me.Lb,0,0,me.Lb)}if(ve.ub>ce)return Us(i,7,"bad partition length");Xt(me=i.m,D,G,ve.ub),G+=ve.ub,ce-=ve.ub,ve.Rb&&(Ne.Ld=qt(me),Ne.Kd=qt(me)),Ne=i.Qa;var _e,Be=i.Pa;if(n(me!=null),n(Ne!=null),Ne.Cb=qt(me),Ne.Cb){if(Ne.Bb=qt(me),qt(me)){for(Ne.Fb=qt(me),_e=0;4>_e;++_e)Ne.Zb[_e]=qt(me)?Pt(me,7):0;for(_e=0;4>_e;++_e)Ne.Lb[_e]=qt(me)?Pt(me,6):0}if(Ne.Bb)for(_e=0;3>_e;++_e)Be.jb[_e]=qt(me)?er(me,8):255}else Ne.Bb=0;if(me.Ka)return Us(i,3,"cannot parse segment header");if((Ne=i.ed).zd=qt(me),Ne.Tb=er(me,6),Ne.wb=er(me,3),Ne.Pc=qt(me),Ne.Pc&&qt(me)){for(Be=0;4>Be;++Be)qt(me)&&(Ne.vd[Be]=Pt(me,6));for(Be=0;4>Be;++Be)qt(me)&&(Ne.od[Be]=Pt(me,6))}if(i.L=Ne.Tb==0?0:Ne.zd?1:2,me.Ka)return Us(i,3,"cannot parse filter header");var mt=ce;if(ce=_e=G,G=_e+mt,Ne=mt,i.Xb=(1<<er(i.m,2))-1,mt<3*(Be=i.Xb))D=7;else{for(_e+=3*Be,Ne-=3*Be,mt=0;mt<Be;++mt){var Bt=D[ce+0]|D[ce+1]<<8|D[ce+2]<<16;Bt>Ne&&(Bt=Ne),Xt(i.Jc[+mt],D,_e,Bt),_e+=Bt,Ne-=Bt,ce+=3}Xt(i.Jc[+Be],D,_e,Ne),D=_e<G?0:5}if(D!=0)return Us(i,D,"cannot parse partitions");for(D=er(_e=i.m,7),ce=qt(_e)?Pt(_e,4):0,G=qt(_e)?Pt(_e,4):0,Ne=qt(_e)?Pt(_e,4):0,Be=qt(_e)?Pt(_e,4):0,_e=qt(_e)?Pt(_e,4):0,mt=i.Qa,Bt=0;4>Bt;++Bt){if(mt.Cb){var Ue=mt.Zb[Bt];mt.Fb||(Ue+=D)}else{if(0<Bt){i.pb[Bt]=i.pb[0];continue}Ue=D}var wt=i.pb[Bt];wt.Sc[0]=Du[Lo(Ue+ce,127)],wt.Sc[1]=Bu[Lo(Ue+0,127)],wt.Eb[0]=2*Du[Lo(Ue+G,127)],wt.Eb[1]=101581*Bu[Lo(Ue+Ne,127)]>>16,8>wt.Eb[1]&&(wt.Eb[1]=8),wt.Qc[0]=Du[Lo(Ue+Be,117)],wt.Qc[1]=Bu[Lo(Ue+_e,127)],wt.lc=Ue+_e}if(!ve.Rb)return Us(i,4,"Not a key frame.");for(qt(me),ve=i.Pa,D=0;4>D;++D){for(ce=0;8>ce;++ce)for(G=0;3>G;++G)for(Ne=0;11>Ne;++Ne)Be=mr(me,Up[D][ce][G][Ne])?er(me,8):Dp[D][ce][G][Ne],ve.Wc[D][ce].Yb[G][Ne]=Be;for(ce=0;17>ce;++ce)ve.Xc[D][ce]=ve.Wc[D][zp[ce]]}return i.kc=qt(me),i.kc&&(i.Bd=er(me,8)),i.cb=1}function ll(i,x,D,G,ce,me,ve){var Ne=x[ce].Yb[D];for(D=0;16>ce;++ce){if(!mr(i,Ne[D+0]))return ce;for(;!mr(i,Ne[D+1]);)if(Ne=x[++ce].Yb[0],D=0,ce==16)return 16;var _e=x[ce+1].Yb;if(mr(i,Ne[D+2])){var Be=i,mt=0;if(mr(Be,(Ue=Ne)[(Bt=D)+3]))if(mr(Be,Ue[Bt+6])){for(Ne=0,Bt=2*(mt=mr(Be,Ue[Bt+8]))+(Ue=mr(Be,Ue[Bt+9+mt])),mt=0,Ue=Mp[Bt];Ue[Ne];++Ne)mt+=mt+mr(Be,Ue[Ne]);mt+=3+(8<<Bt)}else mr(Be,Ue[Bt+7])?(mt=7+2*mr(Be,165),mt+=mr(Be,145)):mt=5+mr(Be,159);else mt=mr(Be,Ue[Bt+4])?3+mr(Be,Ue[Bt+5]):2;Ne=_e[2]}else mt=1,Ne=_e[1];_e=ve+Fp[ce],0>(Be=i).b&&Zt(Be);var Bt,Ue=Be.b,wt=(Bt=Be.Ca>>1)-(Be.I>>Ue)>>31;--Be.b,Be.Ca+=wt,Be.Ca|=1,Be.I-=(Bt+1&wt)<<Ue,me[_e]=((mt^wt)-wt)*G[(0<ce)+0]}return 16}function dc(i){var x=i.rb[i.sb-1];x.la=0,x.Na=0,b(i.zc,0,0,i.zc.length),i.ja=0}function Wo(i,x,D,G,ce){ce=i[x+D+32*G]+(ce>>3),i[x+D+32*G]=-256&ce?0>ce?0:255:ce}function Pa(i,x,D,G,ce,me){Wo(i,x,0,D,G+ce),Wo(i,x,1,D,G+me),Wo(i,x,2,D,G-me),Wo(i,x,3,D,G-ce)}function ai(i){return(20091*i>>16)+i}function uc(i,x,D,G){var ce,me=0,ve=E(16);for(ce=0;4>ce;++ce){var Ne=i[x+0]+i[x+8],_e=i[x+0]-i[x+8],Be=(35468*i[x+4]>>16)-ai(i[x+12]),mt=ai(i[x+4])+(35468*i[x+12]>>16);ve[me+0]=Ne+mt,ve[me+1]=_e+Be,ve[me+2]=_e-Be,ve[me+3]=Ne-mt,me+=4,x++}for(ce=me=0;4>ce;++ce)Ne=(i=ve[me+0]+4)+ve[me+8],_e=i-ve[me+8],Be=(35468*ve[me+4]>>16)-ai(ve[me+12]),Wo(D,G,0,0,Ne+(mt=ai(ve[me+4])+(35468*ve[me+12]>>16))),Wo(D,G,1,0,_e+Be),Wo(D,G,2,0,_e-Be),Wo(D,G,3,0,Ne-mt),me++,G+=32}function ui(i,x,D,G){var ce=i[x+0]+4,me=35468*i[x+4]>>16,ve=ai(i[x+4]),Ne=35468*i[x+1]>>16;Pa(D,G,0,ce+ve,i=ai(i[x+1]),Ne),Pa(D,G,1,ce+me,i,Ne),Pa(D,G,2,ce-me,i,Ne),Pa(D,G,3,ce-ve,i,Ne)}function hc(i,x,D,G,ce){uc(i,x,D,G),ce&&uc(i,x+16,D,G+4)}function Ho(i,x,D,G){ql(i,x+0,D,G,1),ql(i,x+32,D,G+128,1)}function Hl(i,x,D,G){var ce;for(i=i[x+0]+4,ce=0;4>ce;++ce)for(x=0;4>x;++x)Wo(D,G,x,ce,i)}function Gl(i,x,D,G){i[x+0]&&Cn(i,x+0,D,G),i[x+16]&&Cn(i,x+16,D,G+4),i[x+32]&&Cn(i,x+32,D,G+128),i[x+48]&&Cn(i,x+48,D,G+128+4)}function cl(i,x,D,G){var ce,me=E(16);for(ce=0;4>ce;++ce){var ve=i[x+0+ce]+i[x+12+ce],Ne=i[x+4+ce]+i[x+8+ce],_e=i[x+4+ce]-i[x+8+ce],Be=i[x+0+ce]-i[x+12+ce];me[0+ce]=ve+Ne,me[8+ce]=ve-Ne,me[4+ce]=Be+_e,me[12+ce]=Be-_e}for(ce=0;4>ce;++ce)ve=(i=me[0+4*ce]+3)+me[3+4*ce],Ne=me[1+4*ce]+me[2+4*ce],_e=me[1+4*ce]-me[2+4*ce],Be=i-me[3+4*ce],D[G+0]=ve+Ne>>3,D[G+16]=Be+_e>>3,D[G+32]=ve-Ne>>3,D[G+48]=Be-_e>>3,G+=64}function Li(i,x,D){var G,ce=x-32,me=Ko,ve=255-i[ce-1];for(G=0;G<D;++G){var Ne,_e=me,Be=ve+i[x-1];for(Ne=0;Ne<D;++Ne)i[x+Ne]=_e[Be+i[ce+Ne]];x+=32}}function Yl(i,x){Li(i,x,4)}function Kl(i,x){Li(i,x,8)}function Rc(i,x){Li(i,x,16)}function dl(i,x){var D;for(D=0;16>D;++D)p(i,x+32*D,i,x-32,16)}function fc(i,x){var D;for(D=16;0<D;--D)b(i,x,i[x-1],16),x+=32}function Go(i,x,D){var G;for(G=0;16>G;++G)b(x,D+32*G,i,16)}function Mc(i,x){var D,G=16;for(D=0;16>D;++D)G+=i[x-1+32*D]+i[x+D-32];Go(G>>5,i,x)}function Ki(i,x){var D,G=8;for(D=0;16>D;++D)G+=i[x-1+32*D];Go(G>>4,i,x)}function Xl(i,x){var D,G=8;for(D=0;16>D;++D)G+=i[x+D-32];Go(G>>4,i,x)}function Fc(i,x){Go(128,i,x)}function Is(i,x,D){return i+2*x+D+2>>2}function Dc(i,x){var D,G=x-32;for(G=new Uint8Array([Is(i[G-1],i[G+0],i[G+1]),Is(i[G+0],i[G+1],i[G+2]),Is(i[G+1],i[G+2],i[G+3]),Is(i[G+2],i[G+3],i[G+4])]),D=0;4>D;++D)p(i,x+32*D,G,0,G.length)}function Bc(i,x){var D=i[x-1],G=i[x-1+32],ce=i[x-1+64],me=i[x-1+96];_r(i,x+0,16843009*Is(i[x-1-32],D,G)),_r(i,x+32,16843009*Is(D,G,ce)),_r(i,x+64,16843009*Is(G,ce,me)),_r(i,x+96,16843009*Is(ce,me,me))}function Uc(i,x){var D,G=4;for(D=0;4>D;++D)G+=i[x+D-32]+i[x-1+32*D];for(G>>=3,D=0;4>D;++D)b(i,x+32*D,G,4)}function hi(i,x){var D=i[x-1+0],G=i[x-1+32],ce=i[x-1+64],me=i[x-1-32],ve=i[x+0-32],Ne=i[x+1-32],_e=i[x+2-32],Be=i[x+3-32];i[x+0+96]=Is(G,ce,i[x-1+96]),i[x+1+96]=i[x+0+64]=Is(D,G,ce),i[x+2+96]=i[x+1+64]=i[x+0+32]=Is(me,D,G),i[x+3+96]=i[x+2+64]=i[x+1+32]=i[x+0+0]=Is(ve,me,D),i[x+3+64]=i[x+2+32]=i[x+1+0]=Is(Ne,ve,me),i[x+3+32]=i[x+2+0]=Is(_e,Ne,ve),i[x+3+0]=Is(Be,_e,Ne)}function fi(i,x){var D=i[x+1-32],G=i[x+2-32],ce=i[x+3-32],me=i[x+4-32],ve=i[x+5-32],Ne=i[x+6-32],_e=i[x+7-32];i[x+0+0]=Is(i[x+0-32],D,G),i[x+1+0]=i[x+0+32]=Is(D,G,ce),i[x+2+0]=i[x+1+32]=i[x+0+64]=Is(G,ce,me),i[x+3+0]=i[x+2+32]=i[x+1+64]=i[x+0+96]=Is(ce,me,ve),i[x+3+32]=i[x+2+64]=i[x+1+96]=Is(me,ve,Ne),i[x+3+64]=i[x+2+96]=Is(ve,Ne,_e),i[x+3+96]=Is(Ne,_e,_e)}function zc(i,x){var D=i[x-1+0],G=i[x-1+32],ce=i[x-1+64],me=i[x-1-32],ve=i[x+0-32],Ne=i[x+1-32],_e=i[x+2-32],Be=i[x+3-32];i[x+0+0]=i[x+1+64]=me+ve+1>>1,i[x+1+0]=i[x+2+64]=ve+Ne+1>>1,i[x+2+0]=i[x+3+64]=Ne+_e+1>>1,i[x+3+0]=_e+Be+1>>1,i[x+0+96]=Is(ce,G,D),i[x+0+64]=Is(G,D,me),i[x+0+32]=i[x+1+96]=Is(D,me,ve),i[x+1+32]=i[x+2+96]=Is(me,ve,Ne),i[x+2+32]=i[x+3+96]=Is(ve,Ne,_e),i[x+3+32]=Is(Ne,_e,Be)}function $c(i,x){var D=i[x+0-32],G=i[x+1-32],ce=i[x+2-32],me=i[x+3-32],ve=i[x+4-32],Ne=i[x+5-32],_e=i[x+6-32],Be=i[x+7-32];i[x+0+0]=D+G+1>>1,i[x+1+0]=i[x+0+64]=G+ce+1>>1,i[x+2+0]=i[x+1+64]=ce+me+1>>1,i[x+3+0]=i[x+2+64]=me+ve+1>>1,i[x+0+32]=Is(D,G,ce),i[x+1+32]=i[x+0+96]=Is(G,ce,me),i[x+2+32]=i[x+1+96]=Is(ce,me,ve),i[x+3+32]=i[x+2+96]=Is(me,ve,Ne),i[x+3+64]=Is(ve,Ne,_e),i[x+3+96]=Is(Ne,_e,Be)}function oo(i,x){var D=i[x-1+0],G=i[x-1+32],ce=i[x-1+64],me=i[x-1+96];i[x+0+0]=D+G+1>>1,i[x+2+0]=i[x+0+32]=G+ce+1>>1,i[x+2+32]=i[x+0+64]=ce+me+1>>1,i[x+1+0]=Is(D,G,ce),i[x+3+0]=i[x+1+32]=Is(G,ce,me),i[x+3+32]=i[x+1+64]=Is(ce,me,me),i[x+3+64]=i[x+2+64]=i[x+0+96]=i[x+1+96]=i[x+2+96]=i[x+3+96]=me}function Zl(i,x){var D=i[x-1+0],G=i[x-1+32],ce=i[x-1+64],me=i[x-1+96],ve=i[x-1-32],Ne=i[x+0-32],_e=i[x+1-32],Be=i[x+2-32];i[x+0+0]=i[x+2+32]=D+ve+1>>1,i[x+0+32]=i[x+2+64]=G+D+1>>1,i[x+0+64]=i[x+2+96]=ce+G+1>>1,i[x+0+96]=me+ce+1>>1,i[x+3+0]=Is(Ne,_e,Be),i[x+2+0]=Is(ve,Ne,_e),i[x+1+0]=i[x+3+32]=Is(D,ve,Ne),i[x+1+32]=i[x+3+64]=Is(G,D,ve),i[x+1+64]=i[x+3+96]=Is(ce,G,D),i[x+1+96]=Is(me,ce,G)}function Xi(i,x){var D;for(D=0;8>D;++D)p(i,x+32*D,i,x-32,8)}function mc(i,x){var D;for(D=0;8>D;++D)b(i,x,i[x-1],8),x+=32}function mi(i,x,D){var G;for(G=0;8>G;++G)b(x,D+32*G,i,8)}function Vc(i,x){var D,G=8;for(D=0;8>D;++D)G+=i[x+D-32]+i[x-1+32*D];mi(G>>4,i,x)}function pi(i,x){var D,G=4;for(D=0;8>D;++D)G+=i[x+D-32];mi(G>>3,i,x)}function Zi(i,x){var D,G=4;for(D=0;8>D;++D)G+=i[x-1+32*D];mi(G>>3,i,x)}function ul(i,x){mi(128,i,x)}function gi(i,x,D){var G=i[x-D],ce=i[x+0],me=3*(ce-G)+Ou[1020+i[x-2*D]-i[x+D]],ve=Id[112+(me+4>>3)];i[x-D]=Ko[255+G+Id[112+(me+3>>3)]],i[x+0]=Ko[255+ce-ve]}function hl(i,x,D,G){var ce=i[x+0],me=i[x+D];return li[255+i[x-2*D]-i[x-D]]>G||li[255+me-ce]>G}function fl(i,x,D,G){return 4*li[255+i[x-D]-i[x+0]]+li[255+i[x-2*D]-i[x+D]]<=G}function vi(i,x,D,G,ce){var me=i[x-3*D],ve=i[x-2*D],Ne=i[x-D],_e=i[x+0],Be=i[x+D],mt=i[x+2*D],Bt=i[x+3*D];return 4*li[255+Ne-_e]+li[255+ve-Be]>G?0:li[255+i[x-4*D]-me]<=ce&&li[255+me-ve]<=ce&&li[255+ve-Ne]<=ce&&li[255+Bt-mt]<=ce&&li[255+mt-Be]<=ce&&li[255+Be-_e]<=ce}function xi(i,x,D,G){var ce=2*G+1;for(G=0;16>G;++G)fl(i,x+G,D,ce)&&gi(i,x+G,D)}function Jl(i,x,D,G){var ce=2*G+1;for(G=0;16>G;++G)fl(i,x+G*D,1,ce)&&gi(i,x+G*D,1)}function pc(i,x,D,G){var ce;for(ce=3;0<ce;--ce)xi(i,x+=4*D,D,G)}function gc(i,x,D,G){var ce;for(ce=3;0<ce;--ce)Jl(i,x+=4,D,G)}function yi(i,x,D,G,ce,me,ve,Ne){for(me=2*me+1;0<ce--;){if(vi(i,x,D,me,ve))if(hl(i,x,D,Ne))gi(i,x,D);else{var _e=i,Be=x,mt=D,Bt=_e[Be-2*mt],Ue=_e[Be-mt],wt=_e[Be+0],kt=_e[Be+mt],sr=_e[Be+2*mt],Mt=27*(cr=Ou[1020+3*(wt-Ue)+Ou[1020+Bt-kt]])+63>>7,ar=18*cr+63>>7,cr=9*cr+63>>7;_e[Be-3*mt]=Ko[255+_e[Be-3*mt]+cr],_e[Be-2*mt]=Ko[255+Bt+ar],_e[Be-mt]=Ko[255+Ue+Mt],_e[Be+0]=Ko[255+wt-Mt],_e[Be+mt]=Ko[255+kt-ar],_e[Be+2*mt]=Ko[255+sr-cr]}x+=G}}function ji(i,x,D,G,ce,me,ve,Ne){for(me=2*me+1;0<ce--;){if(vi(i,x,D,me,ve))if(hl(i,x,D,Ne))gi(i,x,D);else{var _e=i,Be=x,mt=D,Bt=_e[Be-mt],Ue=_e[Be+0],wt=_e[Be+mt],kt=Id[112+(4+(sr=3*(Ue-Bt))>>3)],sr=Id[112+(sr+3>>3)],Mt=kt+1>>1;_e[Be-2*mt]=Ko[255+_e[Be-2*mt]+Mt],_e[Be-mt]=Ko[255+Bt+sr],_e[Be+0]=Ko[255+Ue-kt],_e[Be+mt]=Ko[255+wt-Mt]}x+=G}}function vc(i,x,D,G,ce,me){yi(i,x,D,1,16,G,ce,me)}function Ji(i,x,D,G,ce,me){yi(i,x,1,D,16,G,ce,me)}function xc(i,x,D,G,ce,me){var ve;for(ve=3;0<ve;--ve)ji(i,x+=4*D,D,1,16,G,ce,me)}function L(i,x,D,G,ce,me){var ve;for(ve=3;0<ve;--ve)ji(i,x+=4,1,D,16,G,ce,me)}function ie(i,x,D,G,ce,me,ve,Ne){yi(i,x,ce,1,8,me,ve,Ne),yi(D,G,ce,1,8,me,ve,Ne)}function De(i,x,D,G,ce,me,ve,Ne){yi(i,x,1,ce,8,me,ve,Ne),yi(D,G,1,ce,8,me,ve,Ne)}function it(i,x,D,G,ce,me,ve,Ne){ji(i,x+4*ce,ce,1,8,me,ve,Ne),ji(D,G+4*ce,ce,1,8,me,ve,Ne)}function At(i,x,D,G,ce,me,ve,Ne){ji(i,x+4,1,ce,8,me,ve,Ne),ji(D,G+4,1,ce,8,me,ve,Ne)}function ir(){this.ba=new Xs,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new pn,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function vr(){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 Qr(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function rs(){this.ua=0,this.Wa=new Fs,this.vb=new Fs,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new Ut,this.yc=new at}function _s(){this.xb=this.a=0,this.l=new Yi,this.ca=new Xs,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new Ve,this.Pb=0,this.wd=new Ve,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new rs,this.ab=0,this.gc=V(4,Qr),this.Oc=0}function zs(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new Yi,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function on(i,x,D,G,ce,me,ve){for(i=i==null?0:i[x+0],x=0;x<ve;++x)ce[me+x]=i+D[G+x]&255,i=ce[me+x]}function Jn(i,x,D,G,ce,me,ve){var Ne;if(i==null)on(null,null,D,G,ce,me,ve);else for(Ne=0;Ne<ve;++Ne)ce[me+Ne]=i[x+Ne]+D[G+Ne]&255}function ya(i,x,D,G,ce,me,ve){if(i==null)on(null,null,D,G,ce,me,ve);else{var Ne,_e=i[x+0],Be=_e,mt=_e;for(Ne=0;Ne<ve;++Ne)Be=mt+(_e=i[x+Ne])-Be,mt=D[G+Ne]+(-256&Be?0>Be?0:255:Be)&255,Be=_e,ce[me+Ne]=mt}}function Pn(i,x,D,G){var ce=x.width,me=x.o;if(n(i!=null&&x!=null),0>D||0>=G||D+G>me)return null;if(!i.Cc){if(i.ga==null){var ve;if(i.ga=new zs,(ve=i.ga==null)||(ve=x.width*x.o,n(i.Gb.length==0),i.Gb=E(ve),i.Uc=0,i.Gb==null?ve=0:(i.mb=i.Gb,i.nb=i.Uc,i.rc=null,ve=1),ve=!ve),!ve){ve=i.ga;var Ne=i.Fa,_e=i.P,Be=i.qc,mt=i.mb,Bt=i.nb,Ue=_e+1,wt=Be-1,kt=ve.l;if(n(Ne!=null&&mt!=null&&x!=null),yl[0]=null,yl[1]=on,yl[2]=Jn,yl[3]=ya,ve.ca=mt,ve.tb=Bt,ve.c=x.width,ve.i=x.height,n(0<ve.c&&0<ve.i),1>=Be)x=0;else if(ve.$a=3&Ne[_e+0],ve.Z=Ne[_e+0]>>2&3,ve.Lc=Ne[_e+0]>>4&3,_e=Ne[_e+0]>>6&3,0>ve.$a||1<ve.$a||4<=ve.Z||1<ve.Lc||_e)x=0;else if(kt.put=Ns,kt.ac=si,kt.bc=Sa,kt.ma=ve,kt.width=x.width,kt.height=x.height,kt.Da=x.Da,kt.v=x.v,kt.va=x.va,kt.j=x.j,kt.o=x.o,ve.$a)e:{n(ve.$a==1),x=ki();t:for(;;){if(x==null){x=0;break e}if(n(ve!=null),ve.mc=x,x.c=ve.c,x.i=ve.i,x.l=ve.l,x.l.ma=ve,x.l.width=ve.c,x.l.height=ve.i,x.a=0,Qt(x.m,Ne,Ue,wt),!mo(ve.c,ve.i,1,x,null)||(x.ab==1&&x.gc[0].hc==3&&_o(x.s)?(ve.ic=1,Ne=x.c*x.i,x.Ta=null,x.Ua=0,x.V=E(Ne),x.Ba=0,x.V==null?(x.a=1,x=0):x=1):(ve.ic=0,x=eo(x,ve.c)),!x))break t;x=1;break e}ve.mc=null,x=0}else x=wt>=ve.c*ve.i;ve=!x}if(ve)return null;i.ga.Lc!=1?i.Ga=0:G=me-D}n(i.ga!=null),n(D+G<=me);e:{if(x=(Ne=i.ga).c,me=Ne.l.o,Ne.$a==0){if(Ue=i.rc,wt=i.Vc,kt=i.Fa,_e=i.P+1+D*x,Be=i.mb,mt=i.nb+D*x,n(_e<=i.P+i.qc),Ne.Z!=0)for(n(yl[Ne.Z]!=null),ve=0;ve<G;++ve)yl[Ne.Z](Ue,wt,kt,_e,Be,mt,x),Ue=Be,wt=mt,mt+=x,_e+=x;else for(ve=0;ve<G;++ve)p(Be,mt,kt,_e,x),Ue=Be,wt=mt,mt+=x,_e+=x;i.rc=Ue,i.Vc=wt}else{if(n(Ne.mc!=null),x=D+G,n((ve=Ne.mc)!=null),n(x<=ve.i),ve.C>=x)x=1;else if(Ne.ic||be(),Ne.ic){Ne=ve.V,Ue=ve.Ba,wt=ve.c;var sr=ve.i,Mt=(kt=1,_e=ve.$/wt,Be=ve.$%wt,mt=ve.m,Bt=ve.s,ve.$),ar=wt*sr,cr=wt*x,Ar=Bt.wc,br=Mt<cr?Ba(Bt,Be,_e):null;n(Mt<=ar),n(x<=sr),n(_o(Bt));t:for(;;){for(;!mt.h&&Mt<cr;){if(Be&Ar||(br=Ba(Bt,Be,_e)),n(br!=null),Ot(mt),256>(sr=ra(br.G[0],br.H[0],mt)))Ne[Ue+Mt]=sr,++Mt,++Be>=wt&&(Be=0,++_e<=x&&!(_e%16)&&Po(ve,_e));else{if(!(280>sr)){kt=0;break t}sr=ho(sr-256,mt);var ls,es=ra(br.G[4],br.H[4],mt);if(Ot(mt),!(Mt>=(es=ko(wt,es=ho(es,mt)))&&ar-Mt>=sr)){kt=0;break t}for(ls=0;ls<sr;++ls)Ne[Ue+Mt+ls]=Ne[Ue+Mt+ls-es];for(Mt+=sr,Be+=sr;Be>=wt;)Be-=wt,++_e<=x&&!(_e%16)&&Po(ve,_e);Mt<cr&&Be&Ar&&(br=Ba(Bt,Be,_e))}n(mt.h==yt(mt))}Po(ve,_e>x?x:_e);break t}!kt||mt.h&&Mt<ar?(kt=0,ve.a=mt.h?5:3):ve.$=Mt,x=kt}else x=To(ve,ve.V,ve.Ba,ve.c,ve.i,x,_i);if(!x){G=0;break e}}D+G>=me&&(i.Cc=1),G=1}if(!G)return null;if(i.Cc&&((G=i.ga)!=null&&(G.mc=null),i.ga=null,0<i.Ga))return alert("todo:WebPDequantizeLevels"),null}return i.nb+D*ce}function Ta(i,x,D,G,ce,me){for(;0<ce--;){var ve,Ne=i,_e=x+(D?1:0),Be=i,mt=x+(D?0:3);for(ve=0;ve<G;++ve){var Bt=Be[mt+4*ve];Bt!=255&&(Bt*=32897,Ne[_e+4*ve+0]=Ne[_e+4*ve+0]*Bt>>23,Ne[_e+4*ve+1]=Ne[_e+4*ve+1]*Bt>>23,Ne[_e+4*ve+2]=Ne[_e+4*ve+2]*Bt>>23)}x+=me}}function o(i,x,D,G,ce){for(;0<G--;){var me;for(me=0;me<D;++me){var ve=i[x+2*me+0],Ne=15&(Be=i[x+2*me+1]),_e=4369*Ne,Be=(240&Be|Be>>4)*_e>>16;i[x+2*me+0]=(240&ve|ve>>4)*_e>>16&240|(15&ve|ve<<4)*_e>>16>>4&15,i[x+2*me+1]=240&Be|Ne}x+=ce}}function ee(i,x,D,G,ce,me,ve,Ne){var _e,Be,mt=255;for(Be=0;Be<ce;++Be){for(_e=0;_e<G;++_e){var Bt=i[x+_e];me[ve+4*_e]=Bt,mt&=Bt}x+=D,ve+=Ne}return mt!=255}function N(i,x,D,G,ce){var me;for(me=0;me<ce;++me)D[G+me]=i[x+me]>>8}function be(){Xc=Ta,Qh=o,qh=ee,ef=N}function ze(i,x,D){dt[i]=function(G,ce,me,ve,Ne,_e,Be,mt,Bt,Ue,wt,kt,sr,Mt,ar,cr,Ar){var br,ls=Ar-1>>1,es=Ne[_e+0]|Be[mt+0]<<16,Js=Bt[Ue+0]|wt[kt+0]<<16;n(G!=null);var ss=3*es+Js+131074>>2;for(x(G[ce+0],255&ss,ss>>16,sr,Mt),me!=null&&(ss=3*Js+es+131074>>2,x(me[ve+0],255&ss,ss>>16,ar,cr)),br=1;br<=ls;++br){var cn=Ne[_e+br]|Be[mt+br]<<16,Ga=Bt[Ue+br]|wt[kt+br]<<16,Qs=es+cn+Js+Ga+524296,ns=Qs+2*(cn+Js)>>3;ss=ns+es>>1,es=(Qs=Qs+2*(es+Ga)>>3)+cn>>1,x(G[ce+2*br-1],255&ss,ss>>16,sr,Mt+(2*br-1)*D),x(G[ce+2*br-0],255&es,es>>16,sr,Mt+(2*br-0)*D),me!=null&&(ss=Qs+Js>>1,es=ns+Ga>>1,x(me[ve+2*br-1],255&ss,ss>>16,ar,cr+(2*br-1)*D),x(me[ve+2*br+0],255&es,es>>16,ar,cr+(2*br+0)*D)),es=cn,Js=Ga}1&Ar||(ss=3*es+Js+131074>>2,x(G[ce+Ar-1],255&ss,ss>>16,sr,Mt+(Ar-1)*D),me!=null&&(ss=3*Js+es+131074>>2,x(me[ve+Ar-1],255&ss,ss>>16,ar,cr+(Ar-1)*D)))}}function Me(){ci[Rd]=Vp,ci[Md]=hf,ci[of]=Wp,ci[Fd]=ff,ci[Dd]=mf,ci[Iu]=pf,ci[lf]=Hp,ci[Ru]=hf,ci[Mu]=ff,ci[Bd]=mf,ci[Fu]=pf}function Dt(i){return i&-16384?0>i?0:255:i>>Gp}function jt(i,x){return Dt((19077*i>>8)+(26149*x>>8)-14234)}function Hr(i,x,D){return Dt((19077*i>>8)-(6419*x>>8)-(13320*D>>8)+8708)}function ut(i,x){return Dt((19077*i>>8)+(33050*x>>8)-17685)}function Rt(i,x,D,G,ce){G[ce+0]=jt(i,D),G[ce+1]=Hr(i,x,D),G[ce+2]=ut(i,x)}function Cs(i,x,D,G,ce){G[ce+0]=ut(i,x),G[ce+1]=Hr(i,x,D),G[ce+2]=jt(i,D)}function Dr(i,x,D,G,ce){var me=Hr(i,x,D);x=me<<3&224|ut(i,x)>>3,G[ce+0]=248&jt(i,D)|me>>5,G[ce+1]=x}function wr(i,x,D,G,ce){var me=240&ut(i,x)|15;G[ce+0]=240&jt(i,D)|Hr(i,x,D)>>4,G[ce+1]=me}function fs(i,x,D,G,ce){G[ce+0]=255,Rt(i,x,D,G,ce+1)}function Tn(i,x,D,G,ce){Cs(i,x,D,G,ce),G[ce+3]=255}function As(i,x,D,G,ce){Rt(i,x,D,G,ce),G[ce+3]=255}function Es(i,x,D){dt[i]=function(G,ce,me,ve,Ne,_e,Be,mt,Bt){for(var Ue=mt+(-2&Bt)*D;mt!=Ue;)x(G[ce+0],me[ve+0],Ne[_e+0],Be,mt),x(G[ce+1],me[ve+0],Ne[_e+0],Be,mt+D),ce+=2,++ve,++_e,mt+=2*D;1&Bt&&x(G[ce+0],me[ve+0],Ne[_e+0],Be,mt)}}function an(i,x,D){return D==0?i==0?x==0?6:5:x==0?4:0:D}function Zs(i,x,D,G,ce){switch(i>>>30){case 3:ql(x,D,G,ce,0);break;case 2:ii(x,D,G,ce);break;case 1:Cn(x,D,G,ce)}}function Or(i,x){var D,G,ce=x.M,me=x.Nb,ve=i.oc,Ne=i.pc+40,_e=i.oc,Be=i.pc+584,mt=i.oc,Bt=i.pc+600;for(D=0;16>D;++D)ve[Ne+32*D-1]=129;for(D=0;8>D;++D)_e[Be+32*D-1]=129,mt[Bt+32*D-1]=129;for(0<ce?ve[Ne-1-32]=_e[Be-1-32]=mt[Bt-1-32]=129:(b(ve,Ne-32-1,127,21),b(_e,Be-32-1,127,9),b(mt,Bt-32-1,127,9)),G=0;G<i.za;++G){var Ue=x.ya[x.aa+G];if(0<G){for(D=-1;16>D;++D)p(ve,Ne+32*D-4,ve,Ne+32*D+12,4);for(D=-1;8>D;++D)p(_e,Be+32*D-4,_e,Be+32*D+4,4),p(mt,Bt+32*D-4,mt,Bt+32*D+4,4)}var wt=i.Gd,kt=i.Hd+G,sr=Ue.ad,Mt=Ue.Hc;if(0<ce&&(p(ve,Ne-32,wt[kt].y,0,16),p(_e,Be-32,wt[kt].f,0,8),p(mt,Bt-32,wt[kt].ea,0,8)),Ue.Za){var ar=ve,cr=Ne-32+16;for(0<ce&&(G>=i.za-1?b(ar,cr,wt[kt].y[15],4):p(ar,cr,wt[kt+1].y,0,4)),D=0;4>D;D++)ar[cr+128+D]=ar[cr+256+D]=ar[cr+384+D]=ar[cr+0+D];for(D=0;16>D;++D,Mt<<=2)ar=ve,cr=Ne+vf[D],bi[Ue.Ob[D]](ar,cr),Zs(Mt,sr,16*+D,ar,cr)}else if(ar=an(G,ce,Ue.Ob[0]),xl[ar](ve,Ne),Mt!=0)for(D=0;16>D;++D,Mt<<=2)Zs(Mt,sr,16*+D,ve,Ne+vf[D]);for(D=Ue.Gc,ar=an(G,ce,Ue.Dd),qi[ar](_e,Be),qi[ar](mt,Bt),Mt=sr,ar=_e,cr=Be,255&(Ue=0|D)&&(170&Ue?Mi(Mt,256,ar,cr):Hn(Mt,256,ar,cr)),Ue=mt,Mt=Bt,255&(D>>=8)&&(170&D?Mi(sr,320,Ue,Mt):Hn(sr,320,Ue,Mt)),ce<i.Ub-1&&(p(wt[kt].y,0,ve,Ne+480,16),p(wt[kt].f,0,_e,Be+224,8),p(wt[kt].ea,0,mt,Bt+224,8)),D=8*me*i.B,wt=i.sa,kt=i.ta+16*G+16*me*i.R,sr=i.qa,Ue=i.ra+8*G+D,Mt=i.Ha,ar=i.Ia+8*G+D,D=0;16>D;++D)p(wt,kt+D*i.R,ve,Ne+32*D,16);for(D=0;8>D;++D)p(sr,Ue+D*i.B,_e,Be+32*D,8),p(Mt,ar+D*i.B,mt,Bt+32*D,8)}}function en(i,x,D,G,ce,me,ve,Ne,_e){var Be=[0],mt=[0],Bt=0,Ue=_e!=null?_e.kd:0,wt=_e??new vr;if(i==null||12>D)return 7;wt.data=i,wt.w=x,wt.ha=D,x=[x],D=[D],wt.gb=[wt.gb];e:{var kt=x,sr=D,Mt=wt.gb;if(n(i!=null),n(sr!=null),n(Mt!=null),Mt[0]=0,12<=sr[0]&&!l(i,kt[0],"RIFF")){if(l(i,kt[0]+8,"WEBP")){Mt=3;break e}var ar=ys(i,kt[0]+4);if(12>ar||4294967286<ar){Mt=3;break e}if(Ue&&ar>sr[0]-8){Mt=7;break e}Mt[0]=ar,kt[0]+=12,sr[0]-=12}Mt=0}if(Mt!=0)return Mt;for(ar=0<wt.gb[0],D=D[0];;){e:{var cr=i;sr=x,Mt=D;var Ar=Be,br=mt,ls=kt=[0];if((ss=Bt=[Bt])[0]=0,8>Mt[0])Mt=7;else{if(!l(cr,sr[0],"VP8X")){if(ys(cr,sr[0]+4)!=10){Mt=3;break e}if(18>Mt[0]){Mt=7;break e}var es=ys(cr,sr[0]+8),Js=1+Kr(cr,sr[0]+12);if(2147483648<=Js*(cr=1+Kr(cr,sr[0]+15))){Mt=3;break e}ls!=null&&(ls[0]=es),Ar!=null&&(Ar[0]=Js),br!=null&&(br[0]=cr),sr[0]+=18,Mt[0]-=18,ss[0]=1}Mt=0}}if(Bt=Bt[0],kt=kt[0],Mt!=0)return Mt;if(sr=!!(2&kt),!ar&&Bt)return 3;if(me!=null&&(me[0]=!!(16&kt)),ve!=null&&(ve[0]=sr),Ne!=null&&(Ne[0]=0),ve=Be[0],kt=mt[0],Bt&&sr&&_e==null){Mt=0;break}if(4>D){Mt=7;break}if(ar&&Bt||!ar&&!Bt&&!l(i,x[0],"ALPH")){D=[D],wt.na=[wt.na],wt.P=[wt.P],wt.Sa=[wt.Sa];e:{es=i,Mt=x,ar=D;var ss=wt.gb;Ar=wt.na,br=wt.P,ls=wt.Sa,Js=22,n(es!=null),n(ar!=null),cr=Mt[0];var cn=ar[0];for(n(Ar!=null),n(ls!=null),Ar[0]=null,br[0]=null,ls[0]=0;;){if(Mt[0]=cr,ar[0]=cn,8>cn){Mt=7;break e}var Ga=ys(es,cr+4);if(4294967286<Ga){Mt=3;break e}var Qs=8+Ga+1&-2;if(Js+=Qs,0<ss&&Js>ss){Mt=3;break e}if(!l(es,cr,"VP8 ")||!l(es,cr,"VP8L")){Mt=0;break e}if(cn[0]<Qs){Mt=7;break e}l(es,cr,"ALPH")||(Ar[0]=es,br[0]=cr+8,ls[0]=Ga),cr+=Qs,cn-=Qs}}if(D=D[0],wt.na=wt.na[0],wt.P=wt.P[0],wt.Sa=wt.Sa[0],Mt!=0)break}D=[D],wt.Ja=[wt.Ja],wt.xa=[wt.xa];e:if(ss=i,Mt=x,ar=D,Ar=wt.gb[0],br=wt.Ja,ls=wt.xa,es=Mt[0],cr=!l(ss,es,"VP8 "),Js=!l(ss,es,"VP8L"),n(ss!=null),n(ar!=null),n(br!=null),n(ls!=null),8>ar[0])Mt=7;else{if(cr||Js){if(ss=ys(ss,es+4),12<=Ar&&ss>Ar-12){Mt=3;break e}if(Ue&&ss>ar[0]-8){Mt=7;break e}br[0]=ss,Mt[0]+=8,ar[0]-=8,ls[0]=Js}else ls[0]=5<=ar[0]&&ss[es+0]==47&&!(ss[es+4]>>5),br[0]=ar[0];Mt=0}if(D=D[0],wt.Ja=wt.Ja[0],wt.xa=wt.xa[0],x=x[0],Mt!=0)break;if(4294967286<wt.Ja)return 3;if(Ne==null||sr||(Ne[0]=wt.xa?2:1),ve=[ve],kt=[kt],wt.xa){if(5>D){Mt=7;break}Ne=ve,Ue=kt,sr=me,i==null||5>D?i=0:5<=D&&i[x+0]==47&&!(i[x+4]>>5)?(ar=[0],ss=[0],Ar=[0],Qt(br=new Ve,i,x,D),ni(br,ar,ss,Ar)?(Ne!=null&&(Ne[0]=ar[0]),Ue!=null&&(Ue[0]=ss[0]),sr!=null&&(sr[0]=Ar[0]),i=1):i=0):i=0}else{if(10>D){Mt=7;break}Ne=kt,i==null||10>D||!Wl(i,x+3,D-3)?i=0:(Ue=i[x+0]|i[x+1]<<8|i[x+2]<<16,sr=16383&(i[x+7]<<8|i[x+6]),i=16383&(i[x+9]<<8|i[x+8]),1&Ue||3<(Ue>>1&7)||!(Ue>>4&1)||Ue>>5>=wt.Ja||!sr||!i?i=0:(ve&&(ve[0]=sr),Ne&&(Ne[0]=i),i=1))}if(!i||(ve=ve[0],kt=kt[0],Bt&&(Be[0]!=ve||mt[0]!=kt)))return 3;_e!=null&&(_e[0]=wt,_e.offset=x-_e.w,n(4294967286>x-_e.w),n(_e.offset==_e.ha-D));break}return Mt==0||Mt==7&&Bt&&_e==null?(me!=null&&(me[0]|=wt.na!=null&&0<wt.na.length),G!=null&&(G[0]=ve),ce!=null&&(ce[0]=kt),0):Mt}function ia(i,x,D){var G=x.width,ce=x.height,me=0,ve=0,Ne=G,_e=ce;if(x.Da=i!=null&&0<i.Da,x.Da&&(Ne=i.cd,_e=i.bd,me=i.v,ve=i.j,11>D||(me&=-2,ve&=-2),0>me||0>ve||0>=Ne||0>=_e||me+Ne>G||ve+_e>ce))return 0;if(x.v=me,x.j=ve,x.va=me+Ne,x.o=ve+_e,x.U=Ne,x.T=_e,x.da=i!=null&&0<i.da,x.da){if(!gs(Ne,_e,D=[i.ib],me=[i.hb]))return 0;x.ib=D[0],x.hb=me[0]}return x.ob=i!=null&&i.ob,x.Kb=i==null||!i.Sd,x.da&&(x.ob=x.ib<3*G/4&&x.hb<3*ce/4,x.Kb=0),1}function ms(i){if(i==null)return 2;if(11>i.S){var x=i.f.RGBA;x.fb+=(i.height-1)*x.A,x.A=-x.A}else x=i.f.kb,i=i.height,x.O+=(i-1)*x.fa,x.fa=-x.fa,x.N+=(i-1>>1)*x.Ab,x.Ab=-x.Ab,x.W+=(i-1>>1)*x.Db,x.Db=-x.Db,x.F!=null&&(x.J+=(i-1)*x.lb,x.lb=-x.lb);return 0}function ln(i,x,D,G){if(G==null||0>=i||0>=x)return 2;if(D!=null){if(D.Da){var ce=D.cd,me=D.bd,ve=-2&D.v,Ne=-2&D.j;if(0>ve||0>Ne||0>=ce||0>=me||ve+ce>i||Ne+me>x)return 2;i=ce,x=me}if(D.da){if(!gs(i,x,ce=[D.ib],me=[D.hb]))return 2;i=ce[0],x=me[0]}}G.width=i,G.height=x;e:{var _e=G.width,Be=G.height;if(i=G.S,0>=_e||0>=Be||!(i>=Rd&&13>i))i=2;else{if(0>=G.Rd&&G.sd==null){ve=me=ce=x=0;var mt=(Ne=_e*xf[i])*Be;if(11>i||(me=(Be+1)/2*(x=(_e+1)/2),i==12&&(ve=(ce=_e)*Be)),(Be=E(mt+2*me+ve))==null){i=1;break e}G.sd=Be,11>i?((_e=G.f.RGBA).eb=Be,_e.fb=0,_e.A=Ne,_e.size=mt):((_e=G.f.kb).y=Be,_e.O=0,_e.fa=Ne,_e.Fd=mt,_e.f=Be,_e.N=0+mt,_e.Ab=x,_e.Cd=me,_e.ea=Be,_e.W=0+mt+me,_e.Db=x,_e.Ed=me,i==12&&(_e.F=Be,_e.J=0+mt+2*me),_e.Tc=ve,_e.lb=ce)}if(x=1,ce=G.S,me=G.width,ve=G.height,ce>=Rd&&13>ce)if(11>ce)i=G.f.RGBA,x&=(Ne=Math.abs(i.A))*(ve-1)+me<=i.size,x&=Ne>=me*xf[ce],x&=i.eb!=null;else{i=G.f.kb,Ne=(me+1)/2,mt=(ve+1)/2,_e=Math.abs(i.fa),Be=Math.abs(i.Ab);var Bt=Math.abs(i.Db),Ue=Math.abs(i.lb),wt=Ue*(ve-1)+me;x&=_e*(ve-1)+me<=i.Fd,x&=Be*(mt-1)+Ne<=i.Cd,x=(x&=Bt*(mt-1)+Ne<=i.Ed)&_e>=me&Be>=Ne&Bt>=Ne,x&=i.y!=null,x&=i.f!=null,x&=i.ea!=null,ce==12&&(x&=Ue>=me,x&=wt<=i.Tc,x&=i.F!=null)}else x=0;i=x?0:2}}return i!=0||D!=null&&D.fd&&(i=ms(G)),i}var Gs=64,cs=[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],Ps=24,io=32,oi=8,Yo=[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];Zr("Predictor0","PredictorAdd0"),dt.Predictor0=function(){return 4278190080},dt.Predictor1=function(i){return i},dt.Predictor2=function(i,x,D){return x[D+0]},dt.Predictor3=function(i,x,D){return x[D+1]},dt.Predictor4=function(i,x,D){return x[D-1]},dt.Predictor5=function(i,x,D){return hs(hs(i,x[D+1]),x[D+0])},dt.Predictor6=function(i,x,D){return hs(i,x[D-1])},dt.Predictor7=function(i,x,D){return hs(i,x[D+0])},dt.Predictor8=function(i,x,D){return hs(x[D-1],x[D+0])},dt.Predictor9=function(i,x,D){return hs(x[D+0],x[D+1])},dt.Predictor10=function(i,x,D){return hs(hs(i,x[D-1]),hs(x[D+0],x[D+1]))},dt.Predictor11=function(i,x,D){var G=x[D+0];return 0>=Ls(G>>24&255,i>>24&255,(x=x[D-1])>>24&255)+Ls(G>>16&255,i>>16&255,x>>16&255)+Ls(G>>8&255,i>>8&255,x>>8&255)+Ls(255&G,255&i,255&x)?G:i},dt.Predictor12=function(i,x,D){var G=x[D+0];return(jn((i>>24&255)+(G>>24&255)-((x=x[D-1])>>24&255))<<24|jn((i>>16&255)+(G>>16&255)-(x>>16&255))<<16|jn((i>>8&255)+(G>>8&255)-(x>>8&255))<<8|jn((255&i)+(255&G)-(255&x)))>>>0},dt.Predictor13=function(i,x,D){var G=x[D-1];return(tn((i=hs(i,x[D+0]))>>24&255,G>>24&255)<<24|tn(i>>16&255,G>>16&255)<<16|tn(i>>8&255,G>>8&255)<<8|tn(255&i,255&G))>>>0};var Oi=dt.PredictorAdd0;dt.PredictorAdd1=sn,Zr("Predictor2","PredictorAdd2"),Zr("Predictor3","PredictorAdd3"),Zr("Predictor4","PredictorAdd4"),Zr("Predictor5","PredictorAdd5"),Zr("Predictor6","PredictorAdd6"),Zr("Predictor7","PredictorAdd7"),Zr("Predictor8","PredictorAdd8"),Zr("Predictor9","PredictorAdd9"),Zr("Predictor10","PredictorAdd10"),Zr("Predictor11","PredictorAdd11"),Zr("Predictor12","PredictorAdd12"),Zr("Predictor13","PredictorAdd13");var yc=dt.PredictorAdd2;os("ColorIndexInverseTransform","MapARGB","32b",function(i){return i>>8&255},function(i){return i}),os("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(i){return i},function(i){return i>>8&255});var La,Ld=dt.ColorIndexInverseTransform,Ii=dt.MapARGB,Ri=dt.VP8LColorIndexInverseTransformAlpha,Wc=dt.MapAlpha,Hc=dt.VP8LPredictorsAdd=[];Hc.length=16,(dt.VP8LPredictors=[]).length=16,(dt.VP8LPredictorsAdd_C=[]).length=16,(dt.VP8LPredictors_C=[]).length=16;var Gc,Yc,ml,pl,gl,Ql,vl,ql,ii,Mi,Cn,Hn,Oa,Ha,Qi,Kc,jc,Od,Gh,Yh,Kh,Xh,Zh,Jh,Xc,Qh,qh,ef,tf=E(511),rf=E(2041),sf=E(225),nf=E(767),af=0,Ou=rf,Id=sf,Ko=nf,li=tf,Rd=0,Md=1,of=2,Fd=3,Dd=4,Iu=5,lf=6,Ru=7,Mu=8,Bd=9,Fu=10,_p=[2,3,7],Pp=[3,3,11],cf=[280,256,256,256,40],Tp=[0,1,1,1,0],Lp=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],Op=[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],Ip=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],Rp=8,Du=[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],Bu=[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],Zc=null,Mp=[[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]],Fp=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],df=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],Dp=[[[[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]]]],Bp=[[[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]]],Up=[[[[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]]]],zp=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],xl=[],bi=[],qi=[],$p=1,uf=2,yl=[],ci=[];ze("UpsampleRgbLinePair",Rt,3),ze("UpsampleBgrLinePair",Cs,3),ze("UpsampleRgbaLinePair",As,4),ze("UpsampleBgraLinePair",Tn,4),ze("UpsampleArgbLinePair",fs,4),ze("UpsampleRgba4444LinePair",wr,2),ze("UpsampleRgb565LinePair",Dr,2);var Vp=dt.UpsampleRgbLinePair,Wp=dt.UpsampleBgrLinePair,hf=dt.UpsampleRgbaLinePair,ff=dt.UpsampleBgraLinePair,mf=dt.UpsampleArgbLinePair,pf=dt.UpsampleRgba4444LinePair,Hp=dt.UpsampleRgb565LinePair,Ud=16,zd=1<<Ud-1,Jc=-227,Uu=482,Gp=6,gf=0,Yp=E(256),Kp=E(256),Xp=E(256),Zp=E(256),Jp=E(Uu-Jc),Qp=E(Uu-Jc);Es("YuvToRgbRow",Rt,3),Es("YuvToBgrRow",Cs,3),Es("YuvToRgbaRow",As,4),Es("YuvToBgraRow",Tn,4),Es("YuvToArgbRow",fs,4),Es("YuvToRgba4444Row",wr,2),Es("YuvToRgb565Row",Dr,2);var vf=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],$d=[0,2,8],qp=[8,7,6,4,4,2,2,2,1,1,1,1],eg=1;this.WebPDecodeRGBA=function(i,x,D,G,ce){var me=Md,ve=new ir,Ne=new Xs;ve.ba=Ne,Ne.S=me,Ne.width=[Ne.width],Ne.height=[Ne.height];var _e=Ne.width,Be=Ne.height,mt=new bs;if(mt==null||i==null)var Bt=2;else n(mt!=null),Bt=en(i,x,D,mt.width,mt.height,mt.Pd,mt.Qd,mt.format,null);if(Bt!=0?_e=0:(_e!=null&&(_e[0]=mt.width[0]),Be!=null&&(Be[0]=mt.height[0]),_e=1),_e){Ne.width=Ne.width[0],Ne.height=Ne.height[0],G!=null&&(G[0]=Ne.width),ce!=null&&(ce[0]=Ne.height);e:{if(G=new Yi,(ce=new vr).data=i,ce.w=x,ce.ha=D,ce.kd=1,x=[0],n(ce!=null),((i=en(ce.data,ce.w,ce.ha,null,null,null,x,null,ce))==0||i==7)&&x[0]&&(i=4),(x=i)==0){if(n(ve!=null),G.data=ce.data,G.w=ce.w+ce.offset,G.ha=ce.ha-ce.offset,G.put=Ns,G.ac=si,G.bc=Sa,G.ma=ve,ce.xa){if((i=ki())==null){ve=1;break e}if(function(Ue,wt){var kt=[0],sr=[0],Mt=[0];t:for(;;){if(Ue==null)return 0;if(wt==null)return Ue.a=2,0;if(Ue.l=wt,Ue.a=0,Qt(Ue.m,wt.data,wt.w,wt.ha),!ni(Ue.m,kt,sr,Mt)){Ue.a=3;break t}if(Ue.xb=uf,wt.width=kt[0],wt.height=sr[0],!mo(kt[0],sr[0],1,Ue,null))break t;return 1}return n(Ue.a!=0),0}(i,G)){if(G=(x=ln(G.width,G.height,ve.Oa,ve.ba))==0){t:{G=i;r:for(;;){if(G==null){G=0;break t}if(n(G.s.yc!=null),n(G.s.Ya!=null),n(0<G.s.Wb),n((D=G.l)!=null),n((ce=D.ma)!=null),G.xb!=0){if(G.ca=ce.ba,G.tb=ce.tb,n(G.ca!=null),!ia(ce.Oa,D,Fd)){G.a=2;break r}if(!eo(G,D.width)||D.da)break r;if((D.da||Ss(G.ca.S))&&be(),11>G.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),G.ca.f.kb.F!=null&&be()),G.Pb&&0<G.s.ua&&G.s.vb.X==null&&!Ie(G.s.vb,G.s.Wa.Xa)){G.a=1;break r}G.xb=0}if(!To(G,G.V,G.Ba,G.c,G.i,D.o,di))break r;ce.Dc=G.Ma,G=1;break t}n(G.a!=0),G=0}G=!G}G&&(x=i.a)}else x=i.a}else{if((i=new cc)==null){ve=1;break e}if(i.Fa=ce.na,i.P=ce.P,i.qc=ce.Sa,Vo(i,G)){if((x=ln(G.width,G.height,ve.Oa,ve.ba))==0){if(i.Aa=0,D=ve.Oa,n((ce=i)!=null),D!=null){if(0<(_e=0>(_e=D.Md)?0:100<_e?255:255*_e/100)){for(Be=mt=0;4>Be;++Be)12>(Bt=ce.pb[Be]).lc&&(Bt.ia=_e*qp[0>Bt.lc?0:Bt.lc]>>3),mt|=Bt.ia;mt&&(alert("todo:VP8InitRandom"),ce.ia=1)}ce.Ga=D.Id,100<ce.Ga?ce.Ga=100:0>ce.Ga&&(ce.Ga=0)}(function(Ue,wt){if(Ue==null)return 0;if(wt==null)return Us(Ue,2,"NULL VP8Io parameter in VP8Decode().");if(!Ue.cb&&!Vo(Ue,wt))return 0;if(n(Ue.cb),wt.ac==null||wt.ac(wt)){wt.ob&&(Ue.L=0);var kt=$d[Ue.L];if(Ue.L==2?(Ue.yb=0,Ue.zb=0):(Ue.yb=wt.v-kt>>4,Ue.zb=wt.j-kt>>4,0>Ue.yb&&(Ue.yb=0),0>Ue.zb&&(Ue.zb=0)),Ue.Va=wt.o+15+kt>>4,Ue.Hb=wt.va+15+kt>>4,Ue.Hb>Ue.za&&(Ue.Hb=Ue.za),Ue.Va>Ue.Ub&&(Ue.Va=Ue.Ub),0<Ue.L){var sr=Ue.ed;for(kt=0;4>kt;++kt){var Mt;if(Ue.Qa.Cb){var ar=Ue.Qa.Lb[kt];Ue.Qa.Fb||(ar+=sr.Tb)}else ar=sr.Tb;for(Mt=0;1>=Mt;++Mt){var cr=Ue.gd[kt][Mt],Ar=ar;if(sr.Pc&&(Ar+=sr.vd[0],Mt&&(Ar+=sr.od[0])),0<(Ar=0>Ar?0:63<Ar?63:Ar)){var br=Ar;0<sr.wb&&(br=4<sr.wb?br>>2:br>>1)>9-sr.wb&&(br=9-sr.wb),1>br&&(br=1),cr.dd=br,cr.tc=2*Ar+br,cr.ld=40<=Ar?2:15<=Ar?1:0}else cr.tc=0;cr.La=Mt}}}kt=0}else Us(Ue,6,"Frame setup failed"),kt=Ue.a;if(kt=kt==0){if(kt){Ue.$c=0,0<Ue.Aa||(Ue.Ic=eg);t:{kt=Ue.Ic,sr=4*(br=Ue.za);var ls=32*br,es=br+1,Js=0<Ue.L?br*(0<Ue.Aa?2:1):0,ss=(Ue.Aa==2?2:1)*br;if((cr=sr+832+(Mt=3*(16*kt+$d[Ue.L])/2*ls)+(ar=Ue.Fa!=null&&0<Ue.Fa.length?Ue.Kc.c*Ue.Kc.i:0))!=cr)kt=0;else{if(cr>Ue.Vb){if(Ue.Vb=0,Ue.Ec=E(cr),Ue.Fc=0,Ue.Ec==null){kt=Us(Ue,1,"no memory during frame initialization.");break t}Ue.Vb=cr}cr=Ue.Ec,Ar=Ue.Fc,Ue.Ac=cr,Ue.Bc=Ar,Ar+=sr,Ue.Gd=V(ls,$l),Ue.Hd=0,Ue.rb=V(es+1,Ti),Ue.sb=1,Ue.wa=Js?V(Js,to):null,Ue.Y=0,Ue.D.Nb=0,Ue.D.wa=Ue.wa,Ue.D.Y=Ue.Y,0<Ue.Aa&&(Ue.D.Y+=br),n(!0),Ue.oc=cr,Ue.pc=Ar,Ar+=832,Ue.ya=V(ss,il),Ue.aa=0,Ue.D.ya=Ue.ya,Ue.D.aa=Ue.aa,Ue.Aa==2&&(Ue.D.aa+=br),Ue.R=16*br,Ue.B=8*br,br=(ls=$d[Ue.L])*Ue.R,ls=ls/2*Ue.B,Ue.sa=cr,Ue.ta=Ar+br,Ue.qa=Ue.sa,Ue.ra=Ue.ta+16*kt*Ue.R+ls,Ue.Ha=Ue.qa,Ue.Ia=Ue.ra+8*kt*Ue.B+ls,Ue.$c=0,Ar+=Mt,Ue.mb=ar?cr:null,Ue.nb=ar?Ar:null,n(Ar+ar<=Ue.Fc+Ue.Vb),dc(Ue),b(Ue.Ac,Ue.Bc,0,sr),kt=1}}if(kt){if(wt.ka=0,wt.y=Ue.sa,wt.O=Ue.ta,wt.f=Ue.qa,wt.N=Ue.ra,wt.ea=Ue.Ha,wt.Vd=Ue.Ia,wt.fa=Ue.R,wt.Rc=Ue.B,wt.F=null,wt.J=0,!af){for(kt=-255;255>=kt;++kt)tf[255+kt]=0>kt?-kt:kt;for(kt=-1020;1020>=kt;++kt)rf[1020+kt]=-128>kt?-128:127<kt?127:kt;for(kt=-112;112>=kt;++kt)sf[112+kt]=-16>kt?-16:15<kt?15:kt;for(kt=-255;510>=kt;++kt)nf[255+kt]=0>kt?0:255<kt?255:kt;af=1}vl=cl,ql=hc,Mi=Ho,Cn=Hl,Hn=Gl,ii=ui,Oa=vc,Ha=Ji,Qi=ie,Kc=De,jc=xc,Od=L,Gh=it,Yh=At,Kh=xi,Xh=Jl,Zh=pc,Jh=gc,bi[0]=Uc,bi[1]=Yl,bi[2]=Dc,bi[3]=Bc,bi[4]=hi,bi[5]=zc,bi[6]=fi,bi[7]=$c,bi[8]=Zl,bi[9]=oo,xl[0]=Mc,xl[1]=Rc,xl[2]=dl,xl[3]=fc,xl[4]=Ki,xl[5]=Xl,xl[6]=Fc,qi[0]=Vc,qi[1]=Kl,qi[2]=Xi,qi[3]=mc,qi[4]=Zi,qi[5]=pi,qi[6]=ul,kt=1}else kt=0}kt&&(kt=function(cn,Ga){for(cn.M=0;cn.M<cn.Va;++cn.M){var Qs,ns=cn.Jc[cn.M&cn.Xb],Fr=cn.m,Ia=cn;for(Qs=0;Qs<Ia.za;++Qs){var $s=Fr,hn=Ia,sa=hn.Ac,ro=hn.Bc+4*Qs,po=hn.zc,Ca=hn.ya[hn.aa+Qs];if(hn.Qa.Bb?Ca.$b=mr($s,hn.Pa.jb[0])?2+mr($s,hn.Pa.jb[2]):mr($s,hn.Pa.jb[1]):Ca.$b=0,hn.kc&&(Ca.Ad=mr($s,hn.Bd)),Ca.Za=!mr($s,145)+0,Ca.Za){var lo=Ca.Ob,go=0;for(hn=0;4>hn;++hn){var Ya,gn=po[0+hn];for(Ya=0;4>Ya;++Ya){gn=Bp[sa[ro+Ya]][gn];for(var Ln=df[mr($s,gn[0])];0<Ln;)Ln=df[2*Ln+mr($s,gn[Ln])];gn=-Ln,sa[ro+Ya]=gn}p(lo,go,sa,ro,4),go+=4,po[0+hn]=gn}}else gn=mr($s,156)?mr($s,128)?1:3:mr($s,163)?2:0,Ca.Ob[0]=gn,b(sa,ro,gn,4),b(po,0,gn,4);Ca.Dd=mr($s,142)?mr($s,114)?mr($s,183)?1:3:2:0}if(Ia.m.Ka)return Us(cn,7,"Premature end-of-partition0 encountered.");for(;cn.ja<cn.za;++cn.ja){if(Ia=ns,$s=(Fr=cn).rb[Fr.sb-1],sa=Fr.rb[Fr.sb+Fr.ja],Qs=Fr.ya[Fr.aa+Fr.ja],ro=Fr.kc?Qs.Ad:0)$s.la=sa.la=0,Qs.Za||($s.Na=sa.Na=0),Qs.Hc=0,Qs.Gc=0,Qs.ia=0;else{var Aa,On;if($s=sa,sa=Ia,ro=Fr.Pa.Xc,po=Fr.ya[Fr.aa+Fr.ja],Ca=Fr.pb[po.$b],hn=po.ad,lo=0,go=Fr.rb[Fr.sb-1],gn=Ya=0,b(hn,lo,0,384),po.Za)var so=0,wi=ro[3];else{Ln=E(16);var Ra=$s.Na+go.Na;if(Ra=Zc(sa,ro[1],Ra,Ca.Eb,0,Ln,0),$s.Na=go.Na=(0<Ra)+0,1<Ra)vl(Ln,0,hn,lo);else{var Oo=Ln[0]+3>>3;for(Ln=0;256>Ln;Ln+=16)hn[lo+Ln]=Oo}so=1,wi=ro[0]}var Gn=15&$s.la,Ka=15&go.la;for(Ln=0;4>Ln;++Ln){var Xo=1&Ka;for(Oo=On=0;4>Oo;++Oo)Gn=Gn>>1|(Xo=(Ra=Zc(sa,wi,Ra=Xo+(1&Gn),Ca.Sc,so,hn,lo))>so)<<7,On=On<<2|(3<Ra?3:1<Ra?2:hn[lo+0]!=0),lo+=16;Gn>>=4,Ka=Ka>>1|Xo<<7,Ya=(Ya<<8|On)>>>0}for(wi=Gn,so=Ka>>4,Aa=0;4>Aa;Aa+=2){for(On=0,Gn=$s.la>>4+Aa,Ka=go.la>>4+Aa,Ln=0;2>Ln;++Ln){for(Xo=1&Ka,Oo=0;2>Oo;++Oo)Ra=Xo+(1&Gn),Gn=Gn>>1|(Xo=0<(Ra=Zc(sa,ro[2],Ra,Ca.Qc,0,hn,lo)))<<3,On=On<<2|(3<Ra?3:1<Ra?2:hn[lo+0]!=0),lo+=16;Gn>>=2,Ka=Ka>>1|Xo<<5}gn|=On<<4*Aa,wi|=Gn<<4<<Aa,so|=(240&Ka)<<Aa}$s.la=wi,go.la=so,po.Hc=Ya,po.Gc=gn,po.ia=43690&gn?0:Ca.ia,ro=!(Ya|gn)}if(0<Fr.L&&(Fr.wa[Fr.Y+Fr.ja]=Fr.gd[Qs.$b][Qs.Za],Fr.wa[Fr.Y+Fr.ja].La|=!ro),Ia.Ka)return Us(cn,7,"Premature end-of-file encountered.")}if(dc(cn),Fr=Ga,Ia=1,Qs=(ns=cn).D,$s=0<ns.L&&ns.M>=ns.zb&&ns.M<=ns.Va,ns.Aa==0)t:{if(Qs.M=ns.M,Qs.uc=$s,Or(ns,Qs),Ia=1,Qs=(On=ns.D).Nb,$s=(gn=$d[ns.L])*ns.R,sa=gn/2*ns.B,Ln=16*Qs*ns.R,Oo=8*Qs*ns.B,ro=ns.sa,po=ns.ta-$s+Ln,Ca=ns.qa,hn=ns.ra-sa+Oo,lo=ns.Ha,go=ns.Ia-sa+Oo,Ka=(Gn=On.M)==0,Ya=Gn>=ns.Va-1,ns.Aa==2&&Or(ns,On),On.uc)for(Xo=(Ra=ns).D.M,n(Ra.D.uc),On=Ra.yb;On<Ra.Hb;++On){so=On,wi=Xo;var vo=(Zo=(no=Ra).D).Nb;Aa=no.R;var Zo=Zo.wa[Zo.Y+so],Jo=no.sa,Io=no.ta+16*vo*Aa+16*so,Qo=Zo.dd,Qn=Zo.tc;if(Qn!=0)if(n(3<=Qn),no.L==1)0<so&&Xh(Jo,Io,Aa,Qn+4),Zo.La&&Jh(Jo,Io,Aa,Qn),0<wi&&Kh(Jo,Io,Aa,Qn+4),Zo.La&&Zh(Jo,Io,Aa,Qn);else{var qo=no.B,Ni=no.qa,ec=no.ra+8*vo*qo+8*so,el=no.Ha,no=no.Ia+8*vo*qo+8*so;vo=Zo.ld,0<so&&(Ha(Jo,Io,Aa,Qn+4,Qo,vo),Kc(Ni,ec,el,no,qo,Qn+4,Qo,vo)),Zo.La&&(Od(Jo,Io,Aa,Qn,Qo,vo),Yh(Ni,ec,el,no,qo,Qn,Qo,vo)),0<wi&&(Oa(Jo,Io,Aa,Qn+4,Qo,vo),Qi(Ni,ec,el,no,qo,Qn+4,Qo,vo)),Zo.La&&(jc(Jo,Io,Aa,Qn,Qo,vo),Gh(Ni,ec,el,no,qo,Qn,Qo,vo))}}if(ns.ia&&alert("todo:DitherRow"),Fr.put!=null){if(On=16*Gn,Gn=16*(Gn+1),Ka?(Fr.y=ns.sa,Fr.O=ns.ta+Ln,Fr.f=ns.qa,Fr.N=ns.ra+Oo,Fr.ea=ns.Ha,Fr.W=ns.Ia+Oo):(On-=gn,Fr.y=ro,Fr.O=po,Fr.f=Ca,Fr.N=hn,Fr.ea=lo,Fr.W=go),Ya||(Gn-=gn),Gn>Fr.o&&(Gn=Fr.o),Fr.F=null,Fr.J=null,ns.Fa!=null&&0<ns.Fa.length&&On<Gn&&(Fr.J=Pn(ns,Fr,On,Gn-On),Fr.F=ns.mb,Fr.F==null&&Fr.F.length==0)){Ia=Us(ns,3,"Could not decode alpha data.");break t}On<Fr.j&&(gn=Fr.j-On,On=Fr.j,n(!(1&gn)),Fr.O+=ns.R*gn,Fr.N+=ns.B*(gn>>1),Fr.W+=ns.B*(gn>>1),Fr.F!=null&&(Fr.J+=Fr.width*gn)),On<Gn&&(Fr.O+=Fr.v,Fr.N+=Fr.v>>1,Fr.W+=Fr.v>>1,Fr.F!=null&&(Fr.J+=Fr.v),Fr.ka=On-Fr.j,Fr.U=Fr.va-Fr.v,Fr.T=Gn-On,Ia=Fr.put(Fr))}Qs+1!=ns.Ic||Ya||(p(ns.sa,ns.ta-$s,ro,po+16*ns.R,$s),p(ns.qa,ns.ra-sa,Ca,hn+8*ns.B,sa),p(ns.Ha,ns.Ia-sa,lo,go+8*ns.B,sa))}if(!Ia)return Us(cn,6,"Output aborted.")}return 1}(Ue,wt)),wt.bc!=null&&wt.bc(wt),kt&=1}return kt?(Ue.cb=0,kt):0})(i,G)||(x=i.a)}}else x=i.a}x==0&&ve.Oa!=null&&ve.Oa.fd&&(x=ms(ve.ba))}ve=x}me=ve!=0?null:11>me?Ne.f.RGBA.eb:Ne.f.kb.y}else me=null;return me};var xf=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function Q(dt,$t){for(var ke="",Re=0;Re<4;Re++)ke+=String.fromCharCode(dt[$t++]);return ke}function he(dt,$t){return dt[$t+0]|dt[$t+1]<<8}function we(dt,$t){return(dt[$t+0]|dt[$t+1]<<8|dt[$t+2]<<16)>>>0}function Oe(dt,$t){return(dt[$t+0]|dt[$t+1]<<8|dt[$t+2]<<16|dt[$t+3]<<24)>>>0}new F;var K=[0],Je=[0],Fe=[],Qe=new F,Ae=a,ct=function(dt,$t){var ke={},Re=0,at=!1,ot=0,Ut=0;if(ke.frames=[],!function(xe,Ve){for(var qe=0;qe<4;qe++)if(xe[Ve+qe]!="RIFF".charCodeAt(qe))return!0;return!1}(dt,$t)){for(Oe(dt,$t+=4),$t+=8;$t<dt.length;){var Xt=Q(dt,$t),er=Oe(dt,$t+=4);$t+=4;var Pt=er+(1&er);switch(Xt){case"VP8 ":case"VP8L":ke.frames[Re]===void 0&&(ke.frames[Re]={}),(Nr=ke.frames[Re]).src_off=at?Ut:$t-8,Nr.src_size=ot+er+8,Re++,at&&(at=!1,ot=0,Ut=0);break;case"VP8X":(Nr=ke.header={}).feature_flags=dt[$t];var Qt=$t+4;Nr.canvas_width=1+we(dt,Qt),Qt+=3,Nr.canvas_height=1+we(dt,Qt),Qt+=3;break;case"ALPH":at=!0,ot=Pt+8,Ut=$t-8;break;case"ANIM":(Nr=ke.header).bgcolor=Oe(dt,$t),Qt=$t+4,Nr.loop_count=he(dt,Qt),Qt+=2;break;case"ANMF":var kr,Nr;(Nr=ke.frames[Re]={}).offset_x=2*we(dt,$t),$t+=3,Nr.offset_y=2*we(dt,$t),$t+=3,Nr.width=1+we(dt,$t),$t+=3,Nr.height=1+we(dt,$t),$t+=3,Nr.duration=we(dt,$t),$t+=3,kr=dt[$t++],Nr.dispose=1&kr,Nr.blend=kr>>1&1}Xt!="ANMF"&&($t+=Pt)}return ke}}(Ae,0);ct.response=Ae,ct.rgbaoutput=!0,ct.dataurl=!1;var Ct=ct.header?ct.header:null,nt=ct.frames?ct.frames:null;if(Ct){Ct.loop_counter=Ct.loop_count,K=[Ct.canvas_height],Je=[Ct.canvas_width];for(var Ce=0;Ce<nt.length&&nt[Ce].blend!=0;Ce++);}var bt=nt[0],Gt=Qe.WebPDecodeRGBA(Ae,bt.src_off,bt.src_size,Je,K);bt.rgba=Gt,bt.imgwidth=Je[0],bt.imgheight=K[0];for(var Et=0;Et<Je[0]*K[0]*4;Et++)Fe[Et]=Gt[Et];return this.width=Je,this.height=K,this.data=Fe,this}(function(a){var n,l,p,b,E,V,R,F,Q,he=function(xe){return xe=xe||{},this.isStrokeTransparent=xe.isStrokeTransparent||!1,this.strokeOpacity=xe.strokeOpacity||1,this.strokeStyle=xe.strokeStyle||"#000000",this.fillStyle=xe.fillStyle||"#000000",this.isFillTransparent=xe.isFillTransparent||!1,this.fillOpacity=xe.fillOpacity||1,this.font=xe.font||"10px sans-serif",this.textBaseline=xe.textBaseline||"alphabetic",this.textAlign=xe.textAlign||"left",this.lineWidth=xe.lineWidth||1,this.lineJoin=xe.lineJoin||"miter",this.lineCap=xe.lineCap||"butt",this.path=xe.path||[],this.transform=xe.transform!==void 0?xe.transform.clone():new F,this.globalCompositeOperation=xe.globalCompositeOperation||"normal",this.globalAlpha=xe.globalAlpha||1,this.clip_path=xe.clip_path||[],this.currentPoint=xe.currentPoint||new V,this.miterLimit=xe.miterLimit||10,this.lastPoint=xe.lastPoint||new V,this.lineDashOffset=xe.lineDashOffset||0,this.lineDash=xe.lineDash||[],this.margin=xe.margin||[0,0,0,0],this.prevPageLastElemOffset=xe.prevPageLastElemOffset||0,this.ignoreClearRect=typeof xe.ignoreClearRect!="boolean"||xe.ignoreClearRect,this};a.events.push(["initialized",function(){this.context2d=new we(this),n=this.internal.f2,l=this.internal.getCoordinateString,p=this.internal.getVerticalCoordinateString,b=this.internal.getHorizontalCoordinate,E=this.internal.getVerticalCoordinate,V=this.internal.Point,R=this.internal.Rectangle,F=this.internal.Matrix,Q=new he}]);var we=function(xe){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var Ve=xe;Object.defineProperty(this,"pdf",{get:function(){return Ve}});var qe=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return qe},set:function(Ie){qe=!!Ie}});var yt=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return yt},set:function(Ie){yt=!!Ie}});var Nt=0;Object.defineProperty(this,"posX",{get:function(){return Nt},set:function(Ie){isNaN(Ie)||(Nt=Ie)}});var Ot=0;Object.defineProperty(this,"posY",{get:function(){return Ot},set:function(Ie){isNaN(Ie)||(Ot=Ie)}}),Object.defineProperty(this,"margin",{get:function(){return Q.margin},set:function(Ie){var Br;typeof Ie=="number"?Br=[Ie,Ie,Ie,Ie]:((Br=new Array(4))[0]=Ie[0],Br[1]=Ie.length>=2?Ie[1]:Br[0],Br[2]=Ie.length>=3?Ie[2]:Br[0],Br[3]=Ie.length>=4?Ie[3]:Br[1]),Q.margin=Br}});var Zt=!1;Object.defineProperty(this,"autoPaging",{get:function(){return Zt},set:function(Ie){Zt=Ie}});var qt=0;Object.defineProperty(this,"lastBreak",{get:function(){return qt},set:function(Ie){qt=Ie}});var mr=[];Object.defineProperty(this,"pageBreaks",{get:function(){return mr},set:function(Ie){mr=Ie}}),Object.defineProperty(this,"ctx",{get:function(){return Q},set:function(Ie){Ie instanceof he&&(Q=Ie)}}),Object.defineProperty(this,"path",{get:function(){return Q.path},set:function(Ie){Q.path=Ie}});var _r=[];Object.defineProperty(this,"ctxStack",{get:function(){return _r},set:function(Ie){_r=Ie}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(Ie){var Br;Br=Oe(Ie),this.ctx.fillStyle=Br.style,this.ctx.isFillTransparent=Br.a===0,this.ctx.fillOpacity=Br.a,this.pdf.setFillColor(Br.r,Br.g,Br.b,{a:Br.a}),this.pdf.setTextColor(Br.r,Br.g,Br.b,{a:Br.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(Ie){var Br=Oe(Ie);this.ctx.strokeStyle=Br.style,this.ctx.isStrokeTransparent=Br.a===0,this.ctx.strokeOpacity=Br.a,Br.a===0?this.pdf.setDrawColor(255,255,255):(Br.a,this.pdf.setDrawColor(Br.r,Br.g,Br.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(Ie){["butt","round","square"].indexOf(Ie)!==-1&&(this.ctx.lineCap=Ie,this.pdf.setLineCap(Ie))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(Ie){isNaN(Ie)||(this.ctx.lineWidth=Ie,this.pdf.setLineWidth(Ie))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(Ie){["bevel","round","miter"].indexOf(Ie)!==-1&&(this.ctx.lineJoin=Ie,this.pdf.setLineJoin(Ie))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(Ie){isNaN(Ie)||(this.ctx.miterLimit=Ie,this.pdf.setMiterLimit(Ie))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(Ie){this.ctx.textBaseline=Ie}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(Ie){["right","end","center","left","start"].indexOf(Ie)!==-1&&(this.ctx.textAlign=Ie)}});var $r=null,Kr=null,ys=null;Object.defineProperty(this,"fontFaces",{get:function(){return ys},set:function(Ie){$r=null,Kr=null,ys=Ie}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(Ie){var Br;if(this.ctx.font=Ie,(Br=/^\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(Ie))!==null){var Fs=Br[1];Br[2];var gs=Br[3],Sr=Br[4];Br[5];var js=Br[6],Zr=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(Sr)[2];Sr=Math.floor(Zr==="px"?parseFloat(Sr)*this.pdf.internal.scaleFactor:Zr==="em"?parseFloat(Sr)*this.pdf.getFontSize():parseFloat(Sr)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(Sr);var xs=function(os){var oa,nn,Hs=[],Ks=os.trim();if(Ks==="")return En;if(Ks in Ts)return[Ts[Ks]];for(;Ks!=="";){switch(nn=null,oa=(Ks=qs(Ks)).charAt(0)){case'"':case"'":nn=$a(Ks.substring(1),oa);break;default:nn=Ao(Ks)}if(nn===null||(Hs.push(nn[0]),(Ks=qs(nn[1]))!==""&&Ks.charAt(0)!==","))return En;Ks=Ks.replace(/^,/,"")}return Hs}(js);if(this.fontFaces){var hs=function(os,oa){var nn=os.getFontList(),Hs=JSON.stringify(nn);if($r===null||Kr!==Hs){var Ks=function(Xn){var vs=[];return Object.keys(Xn).forEach(function(Bn){Xn[Bn].forEach(function(Ss){var ks=null;switch(Ss){case"bold":ks={family:Bn,weight:"bold"};break;case"italic":ks={family:Bn,style:"italic"};break;case"bolditalic":ks={family:Bn,weight:"bold",style:"italic"};break;case"":case"normal":ks={family:Bn}}ks!==null&&(ks.ref={name:Bn,style:Ss},vs.push(ks))})}),vs}(nn);$r=function(Xn){for(var vs={},Bn=0;Bn<Xn.length;++Bn){var Ss=ws(Xn[Bn]),ks=Ss.family,Zn=Ss.stretch,Xs=Ss.style,bs=Ss.weight;vs[ks]=vs[ks]||{},vs[ks][Zn]=vs[ks][Zn]||{},vs[ks][Zn][Xs]=vs[ks][Zn][Xs]||{},vs[ks][Zn][Xs][bs]=Ss}return vs}(Ks.concat(oa)),Kr=Hs}return $r}(this.pdf,this.fontFaces),jn=xs.map(function(os){return{family:os,stretch:"normal",weight:gs,style:Fs}}),tn=function(os,oa,nn){for(var Hs=(nn=nn||{}).defaultFontFamily||"times",Ks=Object.assign({},ea,nn.genericFontFamilies||{}),Xn=null,vs=null,Bn=0;Bn<oa.length;++Bn)if(Ks[(Xn=ws(oa[Bn])).family]&&(Xn.family=Ks[Xn.family]),os.hasOwnProperty(Xn.family)){vs=os[Xn.family];break}if(!(vs=vs||os[Hs]))throw new Error("Could not find a font-family for the rule '"+Za(Xn)+"' and default family '"+Hs+"'.");if(vs=function(Ss,ks){if(ks[Ss])return ks[Ss];var Zn=zt[Ss],Xs=Zn<=zt.normal?-1:1,bs=is(ks,wn,Zn,Xs);if(!bs)throw new Error("Could not find a matching font-stretch value for "+Ss);return bs}(Xn.stretch,vs),vs=function(Ss,ks){if(ks[Ss])return ks[Ss];for(var Zn=mn[Ss],Xs=0;Xs<Zn.length;++Xs)if(ks[Zn[Xs]])return ks[Zn[Xs]];throw new Error("Could not find a matching font-style for "+Ss)}(Xn.style,vs),!(vs=function(Ss,ks){if(ks[Ss])return ks[Ss];if(Ss===400&&ks[500])return ks[500];if(Ss===500&&ks[400])return ks[400];var Zn=Rr[Ss],Xs=is(ks,Mr,Zn,Ss<400?-1:1);if(!Xs)throw new Error("Could not find a matching font-weight for value "+Ss);return Xs}(Xn.weight,vs)))throw new Error("Failed to resolve a font for the rule '"+Za(Xn)+"'.");return vs}(hs,jn);this.pdf.setFont(tn.ref.name,tn.ref.style)}else{var Ls="";(gs==="bold"||parseInt(gs,10)>=700||Fs==="bold")&&(Ls="bold"),Fs==="italic"&&(Ls+="italic"),Ls.length===0&&(Ls="normal");for(var sn="",rn={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"},Jr=0;Jr<xs.length;Jr++){if(this.pdf.internal.getFont(xs[Jr],Ls,{noFallback:!0,disableWarning:!0})!==void 0){sn=xs[Jr];break}if(Ls==="bolditalic"&&this.pdf.internal.getFont(xs[Jr],"bold",{noFallback:!0,disableWarning:!0})!==void 0)sn=xs[Jr],Ls="bold";else if(this.pdf.internal.getFont(xs[Jr],"normal",{noFallback:!0,disableWarning:!0})!==void 0){sn=xs[Jr],Ls="normal";break}}if(sn===""){for(var Bs=0;Bs<xs.length;Bs++)if(rn[xs[Bs]]){sn=rn[xs[Bs]];break}}sn=sn===""?"Times":sn,this.pdf.setFont(sn,Ls)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(Ie){this.ctx.globalCompositeOperation=Ie}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(Ie){this.ctx.globalAlpha=Ie}}),Object.defineProperty(this,"lineDashOffset",{get:function(){return this.ctx.lineDashOffset},set:function(Ie){this.ctx.lineDashOffset=Ie,Nr.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(Ie){this.ctx.lineDash=Ie,Nr.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(Ie){this.ctx.ignoreClearRect=!!Ie}})};we.prototype.setLineDash=function(xe){this.lineDash=xe},we.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},we.prototype.fill=function(){nt.call(this,"fill",!1)},we.prototype.stroke=function(){nt.call(this,"stroke",!1)},we.prototype.beginPath=function(){this.path=[{type:"begin"}]},we.prototype.moveTo=function(xe,Ve){if(isNaN(xe)||isNaN(Ve))throw g.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.moveTo");var qe=this.ctx.transform.applyToPoint(new V(xe,Ve));this.path.push({type:"mt",x:qe.x,y:qe.y}),this.ctx.lastPoint=new V(xe,Ve)},we.prototype.closePath=function(){var xe=new V(0,0),Ve=0;for(Ve=this.path.length-1;Ve!==-1;Ve--)if(this.path[Ve].type==="begin"&&(0,f.default)(this.path[Ve+1])==="object"&&typeof this.path[Ve+1].x=="number"){xe=new V(this.path[Ve+1].x,this.path[Ve+1].y);break}this.path.push({type:"close"}),this.ctx.lastPoint=new V(xe.x,xe.y)},we.prototype.lineTo=function(xe,Ve){if(isNaN(xe)||isNaN(Ve))throw g.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.lineTo");var qe=this.ctx.transform.applyToPoint(new V(xe,Ve));this.path.push({type:"lt",x:qe.x,y:qe.y}),this.ctx.lastPoint=new V(qe.x,qe.y)},we.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),nt.call(this,null,!0)},we.prototype.quadraticCurveTo=function(xe,Ve,qe,yt){if(isNaN(qe)||isNaN(yt)||isNaN(xe)||isNaN(Ve))throw g.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var Nt=this.ctx.transform.applyToPoint(new V(qe,yt)),Ot=this.ctx.transform.applyToPoint(new V(xe,Ve));this.path.push({type:"qct",x1:Ot.x,y1:Ot.y,x:Nt.x,y:Nt.y}),this.ctx.lastPoint=new V(Nt.x,Nt.y)},we.prototype.bezierCurveTo=function(xe,Ve,qe,yt,Nt,Ot){if(isNaN(Nt)||isNaN(Ot)||isNaN(xe)||isNaN(Ve)||isNaN(qe)||isNaN(yt))throw g.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var Zt=this.ctx.transform.applyToPoint(new V(Nt,Ot)),qt=this.ctx.transform.applyToPoint(new V(xe,Ve)),mr=this.ctx.transform.applyToPoint(new V(qe,yt));this.path.push({type:"bct",x1:qt.x,y1:qt.y,x2:mr.x,y2:mr.y,x:Zt.x,y:Zt.y}),this.ctx.lastPoint=new V(Zt.x,Zt.y)},we.prototype.arc=function(xe,Ve,qe,yt,Nt,Ot){if(isNaN(xe)||isNaN(Ve)||isNaN(qe)||isNaN(yt)||isNaN(Nt))throw g.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");if(Ot=!!Ot,!this.ctx.transform.isIdentity){var Zt=this.ctx.transform.applyToPoint(new V(xe,Ve));xe=Zt.x,Ve=Zt.y;var qt=this.ctx.transform.applyToPoint(new V(0,qe)),mr=this.ctx.transform.applyToPoint(new V(0,0));qe=Math.sqrt(Math.pow(qt.x-mr.x,2)+Math.pow(qt.y-mr.y,2))}Math.abs(Nt-yt)>=2*Math.PI&&(yt=0,Nt=2*Math.PI),this.path.push({type:"arc",x:xe,y:Ve,radius:qe,startAngle:yt,endAngle:Nt,counterclockwise:Ot})},we.prototype.arcTo=function(xe,Ve,qe,yt,Nt){throw new Error("arcTo not implemented.")},we.prototype.rect=function(xe,Ve,qe,yt){if(isNaN(xe)||isNaN(Ve)||isNaN(qe)||isNaN(yt))throw g.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(xe,Ve),this.lineTo(xe+qe,Ve),this.lineTo(xe+qe,Ve+yt),this.lineTo(xe,Ve+yt),this.lineTo(xe,Ve),this.lineTo(xe+qe,Ve),this.lineTo(xe,Ve)},we.prototype.fillRect=function(xe,Ve,qe,yt){if(isNaN(xe)||isNaN(Ve)||isNaN(qe)||isNaN(yt))throw g.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!K.call(this)){var Nt={};this.lineCap!=="butt"&&(Nt.lineCap=this.lineCap,this.lineCap="butt"),this.lineJoin!=="miter"&&(Nt.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(xe,Ve,qe,yt),this.fill(),Nt.hasOwnProperty("lineCap")&&(this.lineCap=Nt.lineCap),Nt.hasOwnProperty("lineJoin")&&(this.lineJoin=Nt.lineJoin)}},we.prototype.strokeRect=function(xe,Ve,qe,yt){if(isNaN(xe)||isNaN(Ve)||isNaN(qe)||isNaN(yt))throw g.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");Je.call(this)||(this.beginPath(),this.rect(xe,Ve,qe,yt),this.stroke())},we.prototype.clearRect=function(xe,Ve,qe,yt){if(isNaN(xe)||isNaN(Ve)||isNaN(qe)||isNaN(yt))throw g.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(xe,Ve,qe,yt))},we.prototype.save=function(xe){xe=typeof xe!="boolean"||xe;for(var Ve=this.pdf.internal.getCurrentPageInfo().pageNumber,qe=0;qe<this.pdf.internal.getNumberOfPages();qe++)this.pdf.setPage(qe+1),this.pdf.internal.out("q");if(this.pdf.setPage(Ve),xe){this.ctx.fontSize=this.pdf.internal.getFontSize();var yt=new he(this.ctx);this.ctxStack.push(this.ctx),this.ctx=yt}},we.prototype.restore=function(xe){xe=typeof xe!="boolean"||xe;for(var Ve=this.pdf.internal.getCurrentPageInfo().pageNumber,qe=0;qe<this.pdf.internal.getNumberOfPages();qe++)this.pdf.setPage(qe+1),this.pdf.internal.out("Q");this.pdf.setPage(Ve),xe&&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)},we.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.")};var Oe=function(xe){var Ve,qe,yt,Nt;if(xe.isCanvasGradient===!0&&(xe=xe.getColor()),!xe)return{r:0,g:0,b:0,a:0,style:xe};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(xe))Ve=0,qe=0,yt=0,Nt=0;else{var Ot=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(xe);if(Ot!==null)Ve=parseInt(Ot[1]),qe=parseInt(Ot[2]),yt=parseInt(Ot[3]),Nt=1;else if((Ot=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(xe))!==null)Ve=parseInt(Ot[1]),qe=parseInt(Ot[2]),yt=parseInt(Ot[3]),Nt=parseFloat(Ot[4]);else{if(Nt=1,typeof xe=="string"&&xe.charAt(0)!=="#"){var Zt=new B(xe);xe=Zt.ok?Zt.toHex():"#000000"}xe.length===4?(Ve=xe.substring(1,2),Ve+=Ve,qe=xe.substring(2,3),qe+=qe,yt=xe.substring(3,4),yt+=yt):(Ve=xe.substring(1,3),qe=xe.substring(3,5),yt=xe.substring(5,7)),Ve=parseInt(Ve,16),qe=parseInt(qe,16),yt=parseInt(yt,16)}}return{r:Ve,g:qe,b:yt,a:Nt,style:xe}},K=function(){return this.ctx.isFillTransparent||this.globalAlpha==0},Je=function(){return!!(this.ctx.isStrokeTransparent||this.globalAlpha==0)};we.prototype.fillText=function(xe,Ve,qe,yt){if(isNaN(Ve)||isNaN(qe)||typeof xe!="string")throw g.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");if(yt=isNaN(yt)?void 0:yt,!K.call(this)){var Nt=Pt(this.ctx.transform.rotation),Ot=this.ctx.transform.scaleX;Re.call(this,{text:xe,x:Ve,y:qe,scale:Ot,angle:Nt,align:this.textAlign,maxWidth:yt})}},we.prototype.strokeText=function(xe,Ve,qe,yt){if(isNaN(Ve)||isNaN(qe)||typeof xe!="string")throw g.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!Je.call(this)){yt=isNaN(yt)?void 0:yt;var Nt=Pt(this.ctx.transform.rotation),Ot=this.ctx.transform.scaleX;Re.call(this,{text:xe,x:Ve,y:qe,scale:Ot,renderingMode:"stroke",angle:Nt,align:this.textAlign,maxWidth:yt})}},we.prototype.measureText=function(xe){if(typeof xe!="string")throw g.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var Ve=this.pdf,qe=this.pdf.internal.scaleFactor,yt=Ve.internal.getFontSize(),Nt=Ve.getStringUnitWidth(xe)*yt/Ve.internal.scaleFactor;return new function(Ot){var Zt=(Ot=Ot||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return Zt}}),this}({width:Nt*=Math.round(96*qe/72*1e4)/1e4})},we.prototype.scale=function(xe,Ve){if(isNaN(xe)||isNaN(Ve))throw g.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var qe=new F(xe,0,0,Ve,0,0);this.ctx.transform=this.ctx.transform.multiply(qe)},we.prototype.rotate=function(xe){if(isNaN(xe))throw g.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");var Ve=new F(Math.cos(xe),Math.sin(xe),-Math.sin(xe),Math.cos(xe),0,0);this.ctx.transform=this.ctx.transform.multiply(Ve)},we.prototype.translate=function(xe,Ve){if(isNaN(xe)||isNaN(Ve))throw g.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var qe=new F(1,0,0,1,xe,Ve);this.ctx.transform=this.ctx.transform.multiply(qe)},we.prototype.transform=function(xe,Ve,qe,yt,Nt,Ot){if(isNaN(xe)||isNaN(Ve)||isNaN(qe)||isNaN(yt)||isNaN(Nt)||isNaN(Ot))throw g.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var Zt=new F(xe,Ve,qe,yt,Nt,Ot);this.ctx.transform=this.ctx.transform.multiply(Zt)},we.prototype.setTransform=function(xe,Ve,qe,yt,Nt,Ot){xe=isNaN(xe)?1:xe,Ve=isNaN(Ve)?0:Ve,qe=isNaN(qe)?0:qe,yt=isNaN(yt)?1:yt,Nt=isNaN(Nt)?0:Nt,Ot=isNaN(Ot)?0:Ot,this.ctx.transform=new F(xe,Ve,qe,yt,Nt,Ot)};var Fe=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};we.prototype.drawImage=function(xe,Ve,qe,yt,Nt,Ot,Zt,qt,mr){var _r=this.pdf.getImageProperties(xe),$r=1,Kr=1,ys=1,Ie=1;yt!==void 0&&qt!==void 0&&(ys=qt/yt,Ie=mr/Nt,$r=_r.width/yt*qt/yt,Kr=_r.height/Nt*mr/Nt),Ot===void 0&&(Ot=Ve,Zt=qe,Ve=0,qe=0),yt!==void 0&&qt===void 0&&(qt=yt,mr=Nt),yt===void 0&&qt===void 0&&(qt=_r.width,mr=_r.height);var Br=this.ctx.transform.decompose(),Fs=Pt(Br.rotate.shx),gs=new F,Sr=(gs=(gs=(gs=gs.multiply(Br.translate)).multiply(Br.skew)).multiply(Br.scale)).applyToRectangle(new R(Ot-Ve*ys,Zt-qe*Ie,yt*$r,Nt*Kr));if(this.autoPaging){for(var js,Zr=Qe.call(this,Sr),xs=[],hs=0;hs<Zr.length;hs+=1)xs.indexOf(Zr[hs])===-1&&xs.push(Zr[hs]);Ct(xs);for(var jn=xs[0],tn=xs[xs.length-1],Ls=jn;Ls<tn+1;Ls++){this.pdf.setPage(Ls);var sn=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],rn=Ls===1?this.posY+this.margin[0]:this.margin[0],Jr=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],Bs=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],os=Ls===1?0:Jr+(Ls-2)*Bs;if(this.ctx.clip_path.length!==0){var oa=this.path;js=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=ct(js,this.posX+this.margin[3],-os+rn+this.ctx.prevPageLastElemOffset),Ce.call(this,"fill",!0),this.path=oa}var nn=JSON.parse(JSON.stringify(Sr));nn=ct([nn],this.posX+this.margin[3],-os+rn+this.ctx.prevPageLastElemOffset)[0];var Hs=(Ls>jn||Ls<tn)&&Fe.call(this);Hs&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],sn,Bs,null).clip().discardPath()),this.pdf.addImage(xe,"JPEG",nn.x,nn.y,nn.w,nn.h,null,null,Fs),Hs&&this.pdf.restoreGraphicsState()}}else this.pdf.addImage(xe,"JPEG",Sr.x,Sr.y,Sr.w,Sr.h,null,null,Fs)};var Qe=function(xe,Ve,qe){var yt=[];Ve=Ve||this.pdf.internal.pageSize.width,qe=qe||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var Nt=this.posY+this.ctx.prevPageLastElemOffset;switch(xe.type){default:case"mt":case"lt":yt.push(Math.floor((xe.y+Nt)/qe)+1);break;case"arc":yt.push(Math.floor((xe.y+Nt-xe.radius)/qe)+1),yt.push(Math.floor((xe.y+Nt+xe.radius)/qe)+1);break;case"qct":var Ot=Qt(this.ctx.lastPoint.x,this.ctx.lastPoint.y,xe.x1,xe.y1,xe.x,xe.y);yt.push(Math.floor((Ot.y+Nt)/qe)+1),yt.push(Math.floor((Ot.y+Ot.h+Nt)/qe)+1);break;case"bct":var Zt=kr(this.ctx.lastPoint.x,this.ctx.lastPoint.y,xe.x1,xe.y1,xe.x2,xe.y2,xe.x,xe.y);yt.push(Math.floor((Zt.y+Nt)/qe)+1),yt.push(Math.floor((Zt.y+Zt.h+Nt)/qe)+1);break;case"rect":yt.push(Math.floor((xe.y+Nt)/qe)+1),yt.push(Math.floor((xe.y+xe.h+Nt)/qe)+1)}for(var qt=0;qt<yt.length;qt+=1)for(;this.pdf.internal.getNumberOfPages()<yt[qt];)Ae.call(this);return yt},Ae=function(){var xe=this.fillStyle,Ve=this.strokeStyle,qe=this.font,yt=this.lineCap,Nt=this.lineWidth,Ot=this.lineJoin;this.pdf.addPage(),this.fillStyle=xe,this.strokeStyle=Ve,this.font=qe,this.lineCap=yt,this.lineWidth=Nt,this.lineJoin=Ot},ct=function(xe,Ve,qe){for(var yt=0;yt<xe.length;yt++)switch(xe[yt].type){case"bct":xe[yt].x2+=Ve,xe[yt].y2+=qe;case"qct":xe[yt].x1+=Ve,xe[yt].y1+=qe;default:xe[yt].x+=Ve,xe[yt].y+=qe}return xe},Ct=function(xe){return xe.sort(function(Ve,qe){return Ve-qe})},nt=function(xe,Ve){var qe=this.fillStyle,yt=this.strokeStyle,Nt=this.lineCap,Ot=this.lineWidth,Zt=Math.abs(Ot*this.ctx.transform.scaleX),qt=this.lineJoin;if(this.autoPaging){for(var mr,_r,$r=JSON.parse(JSON.stringify(this.path)),Kr=JSON.parse(JSON.stringify(this.path)),ys=[],Ie=0;Ie<Kr.length;Ie++)if(Kr[Ie].x!==void 0)for(var Br=Qe.call(this,Kr[Ie]),Fs=0;Fs<Br.length;Fs+=1)ys.indexOf(Br[Fs])===-1&&ys.push(Br[Fs]);for(var gs=0;gs<ys.length;gs++)for(;this.pdf.internal.getNumberOfPages()<ys[gs];)Ae.call(this);Ct(ys);for(var Sr=ys[0],js=ys[ys.length-1],Zr=Sr;Zr<js+1;Zr++){this.pdf.setPage(Zr),this.fillStyle=qe,this.strokeStyle=yt,this.lineCap=Nt,this.lineWidth=Zt,this.lineJoin=qt;var xs=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],hs=Zr===1?this.posY+this.margin[0]:this.margin[0],jn=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],tn=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],Ls=Zr===1?0:jn+(Zr-2)*tn;if(this.ctx.clip_path.length!==0){var sn=this.path;mr=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=ct(mr,this.posX+this.margin[3],-Ls+hs+this.ctx.prevPageLastElemOffset),Ce.call(this,xe,!0),this.path=sn}if(_r=JSON.parse(JSON.stringify($r)),this.path=ct(_r,this.posX+this.margin[3],-Ls+hs+this.ctx.prevPageLastElemOffset),Ve===!1||Zr===0){var rn=(Zr>Sr||Zr<js)&&Fe.call(this);rn&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],xs,tn,null).clip().discardPath()),Ce.call(this,xe,Ve),rn&&this.pdf.restoreGraphicsState()}this.lineWidth=Ot}this.path=$r}else this.lineWidth=Zt,Ce.call(this,xe,Ve),this.lineWidth=Ot},Ce=function(xe,Ve){if((xe!=="stroke"||Ve||!Je.call(this))&&(xe==="stroke"||Ve||!K.call(this))){for(var qe,yt,Nt=[],Ot=this.path,Zt=0;Zt<Ot.length;Zt++){var qt=Ot[Zt];switch(qt.type){case"begin":Nt.push({begin:!0});break;case"close":Nt.push({close:!0});break;case"mt":Nt.push({start:qt,deltas:[],abs:[]});break;case"lt":var mr=Nt.length;if(Ot[Zt-1]&&!isNaN(Ot[Zt-1].x)&&(qe=[qt.x-Ot[Zt-1].x,qt.y-Ot[Zt-1].y],mr>0)){for(;mr>=0;mr--)if(Nt[mr-1].close!==!0&&Nt[mr-1].begin!==!0){Nt[mr-1].deltas.push(qe),Nt[mr-1].abs.push(qt);break}}break;case"bct":qe=[qt.x1-Ot[Zt-1].x,qt.y1-Ot[Zt-1].y,qt.x2-Ot[Zt-1].x,qt.y2-Ot[Zt-1].y,qt.x-Ot[Zt-1].x,qt.y-Ot[Zt-1].y],Nt[Nt.length-1].deltas.push(qe);break;case"qct":var _r=Ot[Zt-1].x+2/3*(qt.x1-Ot[Zt-1].x),$r=Ot[Zt-1].y+2/3*(qt.y1-Ot[Zt-1].y),Kr=qt.x+2/3*(qt.x1-qt.x),ys=qt.y+2/3*(qt.y1-qt.y),Ie=qt.x,Br=qt.y;qe=[_r-Ot[Zt-1].x,$r-Ot[Zt-1].y,Kr-Ot[Zt-1].x,ys-Ot[Zt-1].y,Ie-Ot[Zt-1].x,Br-Ot[Zt-1].y],Nt[Nt.length-1].deltas.push(qe);break;case"arc":Nt.push({deltas:[],abs:[],arc:!0}),Array.isArray(Nt[Nt.length-1].abs)&&Nt[Nt.length-1].abs.push(qt)}}yt=Ve?null:xe==="stroke"?"stroke":"fill";for(var Fs=!1,gs=0;gs<Nt.length;gs++)if(Nt[gs].arc)for(var Sr=Nt[gs].abs,js=0;js<Sr.length;js++){var Zr=Sr[js];Zr.type==="arc"?Et.call(this,Zr.x,Zr.y,Zr.radius,Zr.startAngle,Zr.endAngle,Zr.counterclockwise,void 0,Ve,!Fs):at.call(this,Zr.x,Zr.y),Fs=!0}else if(Nt[gs].close===!0)this.pdf.internal.out("h"),Fs=!1;else if(Nt[gs].begin!==!0){var xs=Nt[gs].start.x,hs=Nt[gs].start.y;ot.call(this,Nt[gs].deltas,xs,hs),Fs=!0}yt&&dt.call(this,yt),Ve&&$t.call(this)}},bt=function(xe){var Ve=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,qe=Ve*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return xe-qe;case"top":return xe+Ve-qe;case"hanging":return xe+Ve-2*qe;case"middle":return xe+Ve/2-qe;default:return xe}},Gt=function(xe){return xe+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};we.prototype.createLinearGradient=function(){var xe=function(){};return xe.colorStops=[],xe.addColorStop=function(Ve,qe){this.colorStops.push([Ve,qe])},xe.getColor=function(){return this.colorStops.length===0?"#000000":this.colorStops[0][1]},xe.isCanvasGradient=!0,xe},we.prototype.createPattern=function(){return this.createLinearGradient()},we.prototype.createRadialGradient=function(){return this.createLinearGradient()};var Et=function(xe,Ve,qe,yt,Nt,Ot,Zt,qt,mr){for(var _r=Xt.call(this,qe,yt,Nt,Ot),$r=0;$r<_r.length;$r++){var Kr=_r[$r];$r===0&&(mr?ke.call(this,Kr.x1+xe,Kr.y1+Ve):at.call(this,Kr.x1+xe,Kr.y1+Ve)),Ut.call(this,xe,Ve,Kr.x2,Kr.y2,Kr.x3,Kr.y3,Kr.x4,Kr.y4)}qt?$t.call(this):dt.call(this,Zt)},dt=function(xe){switch(xe){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},$t=function(){this.pdf.clip(),this.pdf.discardPath()},ke=function(xe,Ve){this.pdf.internal.out(l(xe)+" "+p(Ve)+" m")},Re=function(xe){var Ve;switch(xe.align){case"right":case"end":Ve="right";break;case"center":Ve="center";break;default:Ve="left"}var qe,yt,Nt,Ot=this.pdf.getTextDimensions(xe.text),Zt=bt.call(this,xe.y),qt=Gt.call(this,Zt)-Ot.h,mr=this.ctx.transform.applyToPoint(new V(xe.x,Zt));if(this.autoPaging){var _r=this.ctx.transform.decompose(),$r=new F;$r=($r=($r=$r.multiply(_r.translate)).multiply(_r.skew)).multiply(_r.scale);for(var Kr=this.ctx.transform.applyToRectangle(new R(xe.x,Zt,Ot.w,Ot.h)),ys=$r.applyToRectangle(new R(xe.x,qt,Ot.w,Ot.h)),Ie=Qe.call(this,ys),Br=[],Fs=0;Fs<Ie.length;Fs+=1)Br.indexOf(Ie[Fs])===-1&&Br.push(Ie[Fs]);Ct(Br);for(var gs=Br[0],Sr=Br[Br.length-1],js=gs;js<Sr+1;js++){this.pdf.setPage(js);var Zr=js===1?this.posY+this.margin[0]:this.margin[0],xs=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],hs=this.pdf.internal.pageSize.height-this.margin[2],jn=hs-this.margin[0],tn=this.pdf.internal.pageSize.width-this.margin[1],Ls=tn-this.margin[3],sn=js===1?0:xs+(js-2)*jn;if(this.ctx.clip_path.length!==0){var rn=this.path;qe=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=ct(qe,this.posX+this.margin[3],-1*sn+Zr),Ce.call(this,"fill",!0),this.path=rn}var Jr=ct([JSON.parse(JSON.stringify(ys))],this.posX+this.margin[3],-sn+Zr+this.ctx.prevPageLastElemOffset)[0];xe.scale>=.01&&(yt=this.pdf.internal.getFontSize(),this.pdf.setFontSize(yt*xe.scale),Nt=this.lineWidth,this.lineWidth=Nt*xe.scale);var Bs=this.autoPaging!=="text";if(Bs||Jr.y+Jr.h<=hs){if(Bs||Jr.y>=Zr&&Jr.x<=tn){var os=Bs?xe.text:this.pdf.splitTextToSize(xe.text,xe.maxWidth||tn-Jr.x)[0],oa=ct([JSON.parse(JSON.stringify(Kr))],this.posX+this.margin[3],-sn+Zr+this.ctx.prevPageLastElemOffset)[0],nn=Bs&&(js>gs||js<Sr)&&Fe.call(this);nn&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],Ls,jn,null).clip().discardPath()),this.pdf.text(os,oa.x,oa.y,{angle:xe.angle,align:Ve,renderingMode:xe.renderingMode}),nn&&this.pdf.restoreGraphicsState()}}else Jr.y<hs&&(this.ctx.prevPageLastElemOffset+=hs-Jr.y);xe.scale>=.01&&(this.pdf.setFontSize(yt),this.lineWidth=Nt)}}else xe.scale>=.01&&(yt=this.pdf.internal.getFontSize(),this.pdf.setFontSize(yt*xe.scale),Nt=this.lineWidth,this.lineWidth=Nt*xe.scale),this.pdf.text(xe.text,mr.x+this.posX,mr.y+this.posY,{angle:xe.angle,align:Ve,renderingMode:xe.renderingMode,maxWidth:xe.maxWidth}),xe.scale>=.01&&(this.pdf.setFontSize(yt),this.lineWidth=Nt)},at=function(xe,Ve,qe,yt){qe=qe||0,yt=yt||0,this.pdf.internal.out(l(xe+qe)+" "+p(Ve+yt)+" l")},ot=function(xe,Ve,qe){return this.pdf.lines(xe,Ve,qe,null,null)},Ut=function(xe,Ve,qe,yt,Nt,Ot,Zt,qt){this.pdf.internal.out([n(b(qe+xe)),n(E(yt+Ve)),n(b(Nt+xe)),n(E(Ot+Ve)),n(b(Zt+xe)),n(E(qt+Ve)),"c"].join(" "))},Xt=function(xe,Ve,qe,yt){for(var Nt=2*Math.PI,Ot=Math.PI/2;Ve>qe;)Ve-=Nt;var Zt=Math.abs(qe-Ve);Zt<Nt&&yt&&(Zt=Nt-Zt);for(var qt=[],mr=yt?-1:1,_r=Ve;Zt>1e-5;){var $r=_r+mr*Math.min(Zt,Ot);qt.push(er.call(this,xe,_r,$r)),Zt-=Math.abs($r-_r),_r=$r}return qt},er=function(xe,Ve,qe){var yt=(qe-Ve)/2,Nt=xe*Math.cos(yt),Ot=xe*Math.sin(yt),Zt=Nt,qt=-Ot,mr=Zt*Zt+qt*qt,_r=mr+Zt*Nt+qt*Ot,$r=4/3*(Math.sqrt(2*mr*_r)-_r)/(Zt*Ot-qt*Nt),Kr=Zt-$r*qt,ys=qt+$r*Zt,Ie=Kr,Br=-ys,Fs=yt+Ve,gs=Math.cos(Fs),Sr=Math.sin(Fs);return{x1:xe*Math.cos(Ve),y1:xe*Math.sin(Ve),x2:Kr*gs-ys*Sr,y2:Kr*Sr+ys*gs,x3:Ie*gs-Br*Sr,y3:Ie*Sr+Br*gs,x4:xe*Math.cos(qe),y4:xe*Math.sin(qe)}},Pt=function(xe){return 180*xe/Math.PI},Qt=function(xe,Ve,qe,yt,Nt,Ot){var Zt=xe+.5*(qe-xe),qt=Ve+.5*(yt-Ve),mr=Nt+.5*(qe-Nt),_r=Ot+.5*(yt-Ot),$r=Math.min(xe,Nt,Zt,mr),Kr=Math.max(xe,Nt,Zt,mr),ys=Math.min(Ve,Ot,qt,_r),Ie=Math.max(Ve,Ot,qt,_r);return new R($r,ys,Kr-$r,Ie-ys)},kr=function(xe,Ve,qe,yt,Nt,Ot,Zt,qt){var mr,_r,$r,Kr,ys,Ie,Br,Fs,gs,Sr,js,Zr,xs,hs,jn=qe-xe,tn=yt-Ve,Ls=Nt-qe,sn=Ot-yt,rn=Zt-Nt,Jr=qt-Ot;for(_r=0;_r<41;_r++)gs=(Br=($r=xe+(mr=_r/40)*jn)+mr*((ys=qe+mr*Ls)-$r))+mr*(ys+mr*(Nt+mr*rn-ys)-Br),Sr=(Fs=(Kr=Ve+mr*tn)+mr*((Ie=yt+mr*sn)-Kr))+mr*(Ie+mr*(Ot+mr*Jr-Ie)-Fs),_r==0?(js=gs,Zr=Sr,xs=gs,hs=Sr):(js=Math.min(js,gs),Zr=Math.min(Zr,Sr),xs=Math.max(xs,gs),hs=Math.max(hs,Sr));return new R(Math.round(js),Math.round(Zr),Math.round(xs-js),Math.round(hs-Zr))},Nr=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var xe,Ve,qe=(xe=this.ctx.lineDash,Ve=this.ctx.lineDashOffset,JSON.stringify({lineDash:xe,lineDashOffset:Ve}));this.prevLineDash!==qe&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=qe)}}})(He.API),function(a){var n=function(V){var R,F,Q,he,we,Oe,K,Je,Fe,Qe;for(F=[],Q=0,he=(V+=R="\0\0\0\0".slice(V.length%4||4)).length;he>Q;Q+=4)(we=(V.charCodeAt(Q)<<24)+(V.charCodeAt(Q+1)<<16)+(V.charCodeAt(Q+2)<<8)+V.charCodeAt(Q+3))!==0?(Oe=(we=((we=((we=((we=(we-(Qe=we%85))/85)-(Fe=we%85))/85)-(Je=we%85))/85)-(K=we%85))/85)%85,F.push(Oe+33,K+33,Je+33,Fe+33,Qe+33)):F.push(122);return function(Ae,ct){for(var Ct=ct;Ct>0;Ct--)Ae.pop()}(F,R.length),String.fromCharCode.apply(String,F)+"~>"},l=function(V){var R,F,Q,he,we,Oe=String,K="length",Je=255,Fe="charCodeAt",Qe="slice",Ae="replace";for(V[Qe](-2),V=V[Qe](0,-2)[Ae](/\s/g,"")[Ae]("z","!!!!!"),Q=[],he=0,we=(V+=R="uuuuu"[Qe](V[K]%5||5))[K];we>he;he+=5)F=52200625*(V[Fe](he)-33)+614125*(V[Fe](he+1)-33)+7225*(V[Fe](he+2)-33)+85*(V[Fe](he+3)-33)+(V[Fe](he+4)-33),Q.push(Je&F>>24,Je&F>>16,Je&F>>8,Je&F);return function(ct,Ct){for(var nt=Ct;nt>0;nt--)ct.pop()}(Q,R[K]),Oe.fromCharCode.apply(Oe,Q)},p=function(V){return V.split("").map(function(R){return("0"+R.charCodeAt().toString(16)).slice(-2)}).join("")+">"},b=function(V){var R=new RegExp(/^([0-9A-Fa-f]{2})+$/);if((V=V.replace(/\s/g,"")).indexOf(">")!==-1&&(V=V.substr(0,V.indexOf(">"))),V.length%2&&(V+="0"),R.test(V)===!1)return"";for(var F="",Q=0;Q<V.length;Q+=2)F+=String.fromCharCode("0x"+(V[Q]+V[Q+1]));return F},E=function(V){for(var R=new Uint8Array(V.length),F=V.length;F--;)R[F]=V.charCodeAt(F);return(R=(0,v.zlibSync)(R)).reduce(function(Q,he){return Q+String.fromCharCode(he)},"")};a.processDataByFilters=function(V,R){var F=0,Q=V||"",he=[];for(typeof(R=R||[])=="string"&&(R=[R]),F=0;F<R.length;F+=1)switch(R[F]){case"ASCII85Decode":case"/ASCII85Decode":Q=l(Q),he.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":Q=n(Q),he.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":Q=b(Q),he.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":Q=p(Q),he.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":Q=E(Q),he.push("/FlateDecode");break;default:throw new Error('The filter: "'+R[F]+'" is not implemented')}return{data:Q,reverseChain:he.reverse().join(" ")}}}(He.API),function(a){a.loadFile=function(n,l,p){return function(b,E,V){E=E!==!1,V=typeof V=="function"?V:function(){};var R=void 0;try{R=function(F,Q,he){var we=new XMLHttpRequest,Oe=0,K=function(Je){var Fe=Je.length,Qe=[],Ae=String.fromCharCode;for(Oe=0;Oe<Fe;Oe+=1)Qe.push(Ae(255&Je.charCodeAt(Oe)));return Qe.join("")};if(we.open("GET",F,!Q),we.overrideMimeType("text/plain; charset=x-user-defined"),Q===!1&&(we.onload=function(){we.status===200?he(K(this.responseText)):he(void 0)}),we.send(null),Q&&we.status===200)return K(we.responseText)}(b,E,V)}catch{}return R}(n,l,p)},a.allowFsRead=void 0,a.loadImageFile=a.loadFile}(He.API),function(a){function n(){return(C.html2canvas?Promise.resolve(C.html2canvas):Promise.resolve().then(t.t.bind(t,"html2canvas",23))).catch(function(R){return Promise.reject(new Error("Could not load html2canvas: "+R))}).then(function(R){return R.default?R.default:R})}function l(){return(C.DOMPurify?Promise.resolve(C.DOMPurify):Promise.resolve().then(t.bind(t,"./node_modules/dompurify/dist/purify.es.mjs"))).catch(function(R){return Promise.reject(new Error("Could not load dompurify: "+R))}).then(function(R){return R.default?R.default:R})}var p=function(R){var F=(0,f.default)(R);return F==="undefined"?"undefined":F==="string"||R instanceof String?"string":F==="number"||R instanceof Number?"number":F==="function"||R instanceof Function?"function":R&&R.constructor===Array?"array":R&&R.nodeType===1?"element":F==="object"?"object":"unknown"},b=function(R,F){var Q=document.createElement(R);for(var he in F.className&&(Q.className=F.className),F.innerHTML&&F.dompurify&&(Q.innerHTML=F.dompurify.sanitize(F.innerHTML)),F.style)Q.style[he]=F.style[he];return Q},E=function R(F,Q){for(var he=F.nodeType===3?document.createTextNode(F.nodeValue):F.cloneNode(!1),we=F.firstChild;we;we=we.nextSibling)Q!==!0&&we.nodeType===1&&we.nodeName==="SCRIPT"||he.appendChild(R(we,Q));return F.nodeType===1&&(F.nodeName==="CANVAS"?(he.width=F.width,he.height=F.height,he.getContext("2d").drawImage(F,0,0)):F.nodeName!=="TEXTAREA"&&F.nodeName!=="SELECT"||(he.value=F.value),he.addEventListener("load",function(){he.scrollTop=F.scrollTop,he.scrollLeft=F.scrollLeft},!0)),he},V=function R(F){var Q=Object.assign(R.convert(Promise.resolve()),JSON.parse(JSON.stringify(R.template))),he=R.convert(Promise.resolve(),Q);return(he=he.setProgress(1,R,1,[R])).set(F)};(V.prototype=Object.create(Promise.prototype)).constructor=V,V.convert=function(R,F){return R.__proto__=F||V.prototype,R},V.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"}},V.prototype.from=function(R,F){return this.then(function(){switch(F=F||function(Q){switch(p(Q)){case"string":return"string";case"element":return Q.nodeName.toLowerCase()==="canvas"?"canvas":"element";default:return"unknown"}}(R),F){case"string":return this.then(l).then(function(Q){return this.set({src:b("div",{innerHTML:R,dompurify:Q})})});case"element":return this.set({src:R});case"canvas":return this.set({canvas:R});case"img":return this.set({img:R});default:return this.error("Unknown source type.")}})},V.prototype.to=function(R){switch(R){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.")}},V.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 R={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},F=E(this.prop.src,this.opt.html2canvas.javascriptEnabled);F.tagName==="BODY"&&(R.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=b("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=b("div",{className:"html2pdf__container",style:R}),this.prop.container.appendChild(F),this.prop.container.firstChild.appendChild(b("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"})},V.prototype.toCanvas=function(){var R=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(R).then(n).then(function(F){var Q=Object.assign({},this.opt.html2canvas);return delete Q.onrendered,F(this.prop.container,Q)}).then(function(F){(this.opt.html2canvas.onrendered||function(){})(F),this.prop.canvas=F,document.body.removeChild(this.prop.overlay)})},V.prototype.toContext2d=function(){var R=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(R).then(n).then(function(F){var Q=this.opt.jsPDF,he=this.opt.fontFaces,we=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,Oe=Object.assign({async:!0,allowTaint:!0,scale:we,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 Oe.onrendered,Q.context2d.autoPaging=this.opt.autoPaging===void 0||this.opt.autoPaging,Q.context2d.posX=this.opt.x,Q.context2d.posY=this.opt.y,Q.context2d.margin=this.opt.margin,Q.context2d.fontFaces=he,he)for(var K=0;K<he.length;++K){var Je=he[K],Fe=Je.src.find(function(Qe){return Qe.format==="truetype"});Fe&&Q.addFont(Fe.url,Je.ref.name,Je.ref.style)}return Oe.windowHeight=Oe.windowHeight||0,Oe.windowHeight=Oe.windowHeight==0?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):Oe.windowHeight,Q.context2d.save(!0),F(this.prop.container,Oe)}).then(function(F){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(F),this.prop.canvas=F,document.body.removeChild(this.prop.overlay)})},V.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var R=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=R})},V.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF})},V.prototype.output=function(R,F,Q){return(Q=Q||"pdf").toLowerCase()==="img"||Q.toLowerCase()==="image"?this.outputImg(R,F):this.outputPdf(R,F)},V.prototype.outputPdf=function(R,F){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(R,F)})},V.prototype.outputImg=function(R){return this.thenList([function(){return this.prop.img||this.toImg()}]).then(function(){switch(R){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 "'+R+'" is not supported.'}})},V.prototype.save=function(R){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(R?{filename:R}:null).then(function(){this.prop.pdf.save(this.opt.filename)})},V.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf)})},V.prototype.set=function(R){if(p(R)!=="object")return this;var F=Object.keys(R||{}).map(function(Q){if(Q in V.template.prop)return function(){this.prop[Q]=R[Q]};switch(Q){case"margin":return this.setMargin.bind(this,R.margin);case"jsPDF":return function(){return this.opt.jsPDF=R.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,R.pageSize);default:return function(){this.opt[Q]=R[Q]}}},this);return this.then(function(){return this.thenList(F)})},V.prototype.get=function(R,F){return this.then(function(){var Q=R in V.template.prop?this.prop[R]:this.opt[R];return F?F(Q):Q})},V.prototype.setMargin=function(R){return this.then(function(){switch(p(R)){case"number":R=[R,R,R,R];case"array":if(R.length===2&&(R=[R[0],R[1],R[0],R[1]]),R.length===4)break;default:return this.error("Invalid margin array.")}this.opt.margin=R}).then(this.setPageSize)},V.prototype.setPageSize=function(R){function F(Q,he){return Math.floor(Q*he/72*96)}return this.then(function(){(R=R||He.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(R.inner={width:R.width-this.opt.margin[1]-this.opt.margin[3],height:R.height-this.opt.margin[0]-this.opt.margin[2]},R.inner.px={width:F(R.inner.width,R.k),height:F(R.inner.height,R.k)},R.inner.ratio=R.inner.height/R.inner.width),this.prop.pageSize=R})},V.prototype.setProgress=function(R,F,Q,he){return R!=null&&(this.progress.val=R),F!=null&&(this.progress.state=F),Q!=null&&(this.progress.n=Q),he!=null&&(this.progress.stack=he),this.progress.ratio=this.progress.val/this.progress.state,this},V.prototype.updateProgress=function(R,F,Q,he){return this.setProgress(R?this.progress.val+R:null,F||null,Q?this.progress.n+Q:null,he?this.progress.stack.concat(he):null)},V.prototype.then=function(R,F){var Q=this;return this.thenCore(R,F,function(he,we){return Q.updateProgress(null,null,1,[he]),Promise.prototype.then.call(this,function(Oe){return Q.updateProgress(null,he),Oe}).then(he,we).then(function(Oe){return Q.updateProgress(1),Oe})})},V.prototype.thenCore=function(R,F,Q){Q=Q||Promise.prototype.then;var he=this;R&&(R=R.bind(he)),F&&(F=F.bind(he));var we=Promise.toString().indexOf("[native code]")!==-1&&Promise.name==="Promise"?he:V.convert(Object.assign({},he),Promise.prototype),Oe=Q.call(we,R,F);return V.convert(Oe,he.__proto__)},V.prototype.thenExternal=function(R,F){return Promise.prototype.then.call(this,R,F)},V.prototype.thenList=function(R){var F=this;return R.forEach(function(Q){F=F.thenCore(Q)}),F},V.prototype.catch=function(R){R&&(R=R.bind(this));var F=Promise.prototype.catch.call(this,R);return V.convert(F,this)},V.prototype.catchExternal=function(R){return Promise.prototype.catch.call(this,R)},V.prototype.error=function(R){return this.then(function(){throw new Error(R)})},V.prototype.using=V.prototype.set,V.prototype.saveAs=V.prototype.save,V.prototype.export=V.prototype.output,V.prototype.run=V.prototype.then,He.getPageSize=function(R,F,Q){if((0,f.default)(R)==="object"){var he=R;R=he.orientation,F=he.unit||F,Q=he.format||Q}F=F||"mm",Q=Q||"a4",R=(""+(R||"P")).toLowerCase();var we,Oe=(""+Q).toLowerCase(),K={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(F){case"pt":we=1;break;case"mm":we=2.834645669291339;break;case"cm":we=28.346456692913385;break;case"in":we=72;break;case"px":we=.75;break;case"pc":case"em":we=12;break;case"ex":we=6;break;default:throw"Invalid unit: "+F}var Je,Fe=0,Qe=0;if(K.hasOwnProperty(Oe))Fe=K[Oe][1]/we,Qe=K[Oe][0]/we;else try{Fe=Q[1],Qe=Q[0]}catch{throw new Error("Invalid format: "+Q)}if(R==="p"||R==="portrait")R="p",Qe>Fe&&(Je=Qe,Qe=Fe,Fe=Je);else{if(R!=="l"&&R!=="landscape")throw"Invalid orientation: "+R;R="l",Fe>Qe&&(Je=Qe,Qe=Fe,Fe=Je)}return{width:Qe,height:Fe,unit:F,k:we,orientation:R}},a.html=function(R,F){(F=F||{}).callback=F.callback||function(){},F.html2canvas=F.html2canvas||{},F.html2canvas.canvas=F.html2canvas.canvas||this.canvas,F.jsPDF=F.jsPDF||this,F.fontFaces=F.fontFaces?F.fontFaces.map(ws):null;var Q=new V(F);return F.worker?Q:Q.from(R).doCallback()}}(He.API),He.API.addJS=function(a){return ur=a,this.internal.events.subscribe("postPutResources",function(){ao=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(ao+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),Ge=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+ur+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){ao!==void 0&&Ge!==void 0&&this.internal.out("/Names <</JavaScript "+ao+" 0 R>>")}),this},function(a){var n;a.events.push(["postPutResources",function(){var l=this,p=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var b=l.outline.render().split(/\r\n/),E=0;E<b.length;E++){var V=b[E],R=p.exec(V);if(R!=null){var F=R[1];l.internal.newObjectDeferredBegin(F,!1)}l.internal.write(V)}if(this.outline.createNamedDestinations){var Q=this.internal.pages.length,he=[];for(E=0;E<Q;E++){var we=l.internal.newObject();he.push(we);var Oe=l.internal.getPageInfo(E+1);l.internal.write("<< /D["+Oe.objId+" 0 R /XYZ null null null]>> endobj")}var K=l.internal.newObject();for(l.internal.write("<< /Names [ "),E=0;E<he.length;E++)l.internal.write("(page_"+(E+1)+")"+he[E]+" 0 R");l.internal.write(" ] >>","endobj"),n=l.internal.newObject(),l.internal.write("<< /Dests "+K+" 0 R"),l.internal.write(">>","endobj")}}]),a.events.push(["putCatalog",function(){var l=this;l.outline.root.children.length>0&&(l.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&l.internal.write("/Names "+n+" 0 R"))}]),a.events.push(["initialized",function(){var l=this;l.outline={createNamedDestinations:!1,root:{children:[]}},l.outline.add=function(p,b,E){var V={title:b,options:E,children:[]};return p==null&&(p=this.root),p.children.push(V),V},l.outline.render=function(){return this.ctx={},this.ctx.val="",this.ctx.pdf=l,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},l.outline.genIds_r=function(p){p.id=l.internal.newObjectDeferred();for(var b=0;b<p.children.length;b++)this.genIds_r(p.children[b])},l.outline.renderRoot=function(p){this.objStart(p),this.line("/Type /Outlines"),p.children.length>0&&(this.line("/First "+this.makeRef(p.children[0])),this.line("/Last "+this.makeRef(p.children[p.children.length-1]))),this.line("/Count "+this.count_r({count:0},p)),this.objEnd()},l.outline.renderItems=function(p){for(var b=this.ctx.pdf.internal.getVerticalCoordinateString,E=0;E<p.children.length;E++){var V=p.children[E];this.objStart(V),this.line("/Title "+this.makeString(V.title)),this.line("/Parent "+this.makeRef(p)),E>0&&this.line("/Prev "+this.makeRef(p.children[E-1])),E<p.children.length-1&&this.line("/Next "+this.makeRef(p.children[E+1])),V.children.length>0&&(this.line("/First "+this.makeRef(V.children[0])),this.line("/Last "+this.makeRef(V.children[V.children.length-1])));var R=this.count=this.count_r({count:0},V);if(R>0&&this.line("/Count "+R),V.options&&V.options.pageNumber){var F=l.internal.getPageInfo(V.options.pageNumber);this.line("/Dest ["+F.objId+" 0 R /XYZ 0 "+b(0)+" 0]")}this.objEnd()}for(var Q=0;Q<p.children.length;Q++)this.renderItems(p.children[Q])},l.outline.line=function(p){this.ctx.val+=p+`\r
326`},l.outline.makeRef=function(p){return p.id+" 0 R"},l.outline.makeString=function(p){return"("+l.internal.pdfEscape(p)+")"},l.outline.objStart=function(p){this.ctx.val+=`\r
327`+p.id+` 0 obj\r
328<<\r
329`},l.outline.objEnd=function(){this.ctx.val+=`>> \r
330endobj\r
331`},l.outline.count_r=function(p,b){for(var E=0;E<b.children.length;E++)p.count++,this.count_r(p,b.children[E]);return p.count}}])}(He.API),function(a){var n=[192,193,194,195,196,197,198,199];a.processJPEG=function(l,p,b,E,V,R){var F,Q=this.decode.DCT_DECODE,he=null;if(typeof l=="string"||this.__addimage__.isArrayBuffer(l)||this.__addimage__.isArrayBufferView(l)){switch(l=V||l,l=this.__addimage__.isArrayBuffer(l)?new Uint8Array(l):l,F=function(we){for(var Oe,K=256*we.charCodeAt(4)+we.charCodeAt(5),Je=we.length,Fe={width:0,height:0,numcomponents:1},Qe=4;Qe<Je;Qe+=2){if(Qe+=K,n.indexOf(we.charCodeAt(Qe+1))!==-1){Oe=256*we.charCodeAt(Qe+5)+we.charCodeAt(Qe+6),Fe={width:256*we.charCodeAt(Qe+7)+we.charCodeAt(Qe+8),height:Oe,numcomponents:we.charCodeAt(Qe+9)};break}K=256*we.charCodeAt(Qe+2)+we.charCodeAt(Qe+3)}return Fe}(l=this.__addimage__.isArrayBufferView(l)?this.__addimage__.arrayBufferToBinaryString(l):l),F.numcomponents){case 1:R=this.color_spaces.DEVICE_GRAY;break;case 4:R=this.color_spaces.DEVICE_CMYK;break;case 3:R=this.color_spaces.DEVICE_RGB}he={data:l,width:F.width,height:F.height,colorSpace:R,bitsPerComponent:8,filter:Q,index:p,alias:b}}return he}}(He.API),He.API.processPNG=function(a,n,l,p){if(this.__addimage__.isArrayBuffer(a)&&(a=new Uint8Array(a)),this.__addimage__.isArrayBufferView(a)){var b,E=(0,y.decode)(a,{checkCrc:!0}),V=E.width,R=E.height,F=E.channels,Q=E.palette,he=E.depth;b=Q&&F===1?function(Et){for(var dt=Et.width,$t=Et.height,ke=Et.data,Re=Et.palette,at=Et.depth,ot=!1,Ut=[],Xt=[],er=void 0,Pt=!1,Qt=0,kr=0;kr<Re.length;kr++){var Nr=(0,m.default)(Re[kr],4),xe=Nr[0],Ve=Nr[1],qe=Nr[2],yt=Nr[3];Ut.push(xe,Ve,qe),yt!=null&&(yt===0?(Qt++,Xt.length<1&&Xt.push(kr)):yt<255&&(Pt=!0))}if(Pt||Qt>1){ot=!0,Xt=void 0;var Nt=dt*$t;er=new Uint8Array(Nt);for(var Ot=new DataView(ke.buffer),Zt=0;Zt<Nt;Zt++){var qt=ma(Ot,Zt,at),mr=(0,m.default)(Re[qt],4)[3];er[Zt]=mr}}else Qt===0&&(Xt=void 0);return{colorSpace:"Indexed",colorsPerPixel:1,sMaskBitsPerComponent:ot?8:void 0,colorBytes:ke,alphaBytes:er,needSMask:ot,palette:Ut,mask:Xt}}(E):F===2||F===4?function(Et){for(var dt=Et.data,$t=Et.width,ke=Et.height,Re=Et.channels,at=Et.depth,ot=Re===2?"DeviceGray":"DeviceRGB",Ut=Re-1,Xt=$t*ke,er=Ut,Pt=Xt*er,Qt=1*Xt,kr=Math.ceil(Pt*at/8),Nr=Math.ceil(Qt*at/8),xe=new Uint8Array(kr),Ve=new Uint8Array(Nr),qe=new DataView(dt.buffer),yt=new DataView(xe.buffer),Nt=new DataView(Ve.buffer),Ot=!1,Zt=0;Zt<Xt;Zt++){for(var qt=Zt*Re,mr=0;mr<er;mr++)ps(yt,ma(qe,qt+mr,at),Zt*er+mr,at);var _r=ma(qe,qt+er,at);_r<(1<<at)-1&&(Ot=!0),ps(Nt,_r,1*Zt,at)}return{colorSpace:ot,colorsPerPixel:Ut,sMaskBitsPerComponent:Ot?at:void 0,colorBytes:xe,alphaBytes:Ve,needSMask:Ot}}(E):function(Et){var dt=Et.data,$t=Et.channels===1?"DeviceGray":"DeviceRGB";return{colorSpace:$t,colorsPerPixel:$t==="DeviceGray"?1:3,colorBytes:dt instanceof Uint16Array?function(ke){for(var Re=ke.length,at=new Uint8Array(2*Re),ot=new DataView(at.buffer,at.byteOffset,at.byteLength),Ut=0;Ut<Re;Ut++)ot.setUint16(2*Ut,ke[Ut],!1);return at}(dt):dt,needSMask:!1}}(E);var we,Oe,K,Je=b,Fe=Je.colorSpace,Qe=Je.colorsPerPixel,Ae=Je.sMaskBitsPerComponent,ct=Je.colorBytes,Ct=Je.alphaBytes,nt=Je.needSMask,Ce=Je.palette,bt=Je.mask,Gt=null;return p!==He.API.image_compression.NONE&&typeof v.zlibSync=="function"?(Gt=function(Et){var dt;switch(Et){case He.API.image_compression.FAST:dt=11;break;case He.API.image_compression.MEDIUM:dt=13;break;case He.API.image_compression.SLOW:dt=14;break;default:dt=12}return dt}(p),we=this.decode.FLATE_DECODE,Oe="/Predictor ".concat(Gt," /Colors ").concat(Qe," /BitsPerComponent ").concat(he," /Columns ").concat(V),a=Nn(ct,Math.ceil(V*Qe*he/8),Qe,he,p),nt&&(K=Nn(Ct,Math.ceil(V*Ae/8),1,Ae,p))):(we=void 0,Oe=void 0,a=ct,nt&&(K=Ct)),(this.__addimage__.isArrayBuffer(a)||this.__addimage__.isArrayBufferView(a))&&(a=this.__addimage__.arrayBufferToBinaryString(a)),(K&&this.__addimage__.isArrayBuffer(K)||this.__addimage__.isArrayBufferView(K))&&(K=this.__addimage__.arrayBufferToBinaryString(K)),{alias:l,data:a,index:n,filter:we,decodeParameters:Oe,transparency:bt,palette:Ce,sMask:K,predictor:Gt,width:V,height:R,bitsPerComponent:he,sMaskBitsPerComponent:Ae,colorSpace:Fe}}},function(a){a.processGIF89A=function(n,l,p,b){var E=new pa(n),V=E.width,R=E.height,F=[];E.decodeAndBlitFrameRGBA(0,F);var Q={data:F,width:V,height:R},he=new Va(100).encode(Q,100);return a.processJPEG.call(this,he,l,p,b)},a.processGIF87A=a.processGIF89A}(He.API),_n.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 a=this.colors===0?1<<this.bitPP:this.colors;this.palette=new Array(a);for(var n=0;n<a;n++){var l=this.datav.getUint8(this.pos++,!0),p=this.datav.getUint8(this.pos++,!0),b=this.datav.getUint8(this.pos++,!0),E=this.datav.getUint8(this.pos++,!0);this.palette[n]={red:b,green:p,blue:l,quad:E}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},_n.prototype.parseBGR=function(){this.pos=this.offset;try{var a="bit"+this.bitPP,n=this.width*this.height*4;this.data=new Uint8Array(n),this[a]()}catch(l){g.log("bit decode error:"+l)}},_n.prototype.bit1=function(){var a,n=Math.ceil(this.width/8),l=n%4;for(a=this.height-1;a>=0;a--){for(var p=this.bottom_up?a:this.height-1-a,b=0;b<n;b++)for(var E=this.datav.getUint8(this.pos++,!0),V=p*this.width*4+8*b*4,R=0;R<8&&8*b+R<this.width;R++){var F=this.palette[E>>7-R&1];this.data[V+4*R]=F.blue,this.data[V+4*R+1]=F.green,this.data[V+4*R+2]=F.red,this.data[V+4*R+3]=255}l!==0&&(this.pos+=4-l)}},_n.prototype.bit4=function(){for(var a=Math.ceil(this.width/2),n=a%4,l=this.height-1;l>=0;l--){for(var p=this.bottom_up?l:this.height-1-l,b=0;b<a;b++){var E=this.datav.getUint8(this.pos++,!0),V=p*this.width*4+2*b*4,R=E>>4,F=15&E,Q=this.palette[R];if(this.data[V]=Q.blue,this.data[V+1]=Q.green,this.data[V+2]=Q.red,this.data[V+3]=255,2*b+1>=this.width)break;Q=this.palette[F],this.data[V+4]=Q.blue,this.data[V+4+1]=Q.green,this.data[V+4+2]=Q.red,this.data[V+4+3]=255}n!==0&&(this.pos+=4-n)}},_n.prototype.bit8=function(){for(var a=this.width%4,n=this.height-1;n>=0;n--){for(var l=this.bottom_up?n:this.height-1-n,p=0;p<this.width;p++){var b=this.datav.getUint8(this.pos++,!0),E=l*this.width*4+4*p;if(b<this.palette.length){var V=this.palette[b];this.data[E]=V.red,this.data[E+1]=V.green,this.data[E+2]=V.blue,this.data[E+3]=255}else this.data[E]=255,this.data[E+1]=255,this.data[E+2]=255,this.data[E+3]=255}a!==0&&(this.pos+=4-a)}},_n.prototype.bit15=function(){for(var a=this.width%3,n=parseInt("11111",2),l=this.height-1;l>=0;l--){for(var p=this.bottom_up?l:this.height-1-l,b=0;b<this.width;b++){var E=this.datav.getUint16(this.pos,!0);this.pos+=2;var V=(E&n)/n*255|0,R=(E>>5&n)/n*255|0,F=(E>>10&n)/n*255|0,Q=E>>15?255:0,he=p*this.width*4+4*b;this.data[he]=F,this.data[he+1]=R,this.data[he+2]=V,this.data[he+3]=Q}this.pos+=a}},_n.prototype.bit16=function(){for(var a=this.width%3,n=parseInt("11111",2),l=parseInt("111111",2),p=this.height-1;p>=0;p--){for(var b=this.bottom_up?p:this.height-1-p,E=0;E<this.width;E++){var V=this.datav.getUint16(this.pos,!0);this.pos+=2;var R=(V&n)/n*255|0,F=(V>>5&l)/l*255|0,Q=(V>>11)/n*255|0,he=b*this.width*4+4*E;this.data[he]=Q,this.data[he+1]=F,this.data[he+2]=R,this.data[he+3]=255}this.pos+=a}},_n.prototype.bit24=function(){for(var a=this.height-1;a>=0;a--){for(var n=this.bottom_up?a:this.height-1-a,l=0;l<this.width;l++){var p=this.datav.getUint8(this.pos++,!0),b=this.datav.getUint8(this.pos++,!0),E=this.datav.getUint8(this.pos++,!0),V=n*this.width*4+4*l;this.data[V]=E,this.data[V+1]=b,this.data[V+2]=p,this.data[V+3]=255}this.pos+=this.width%4}},_n.prototype.bit32=function(){for(var a=this.height-1;a>=0;a--)for(var n=this.bottom_up?a:this.height-1-a,l=0;l<this.width;l++){var p=this.datav.getUint8(this.pos++,!0),b=this.datav.getUint8(this.pos++,!0),E=this.datav.getUint8(this.pos++,!0),V=this.datav.getUint8(this.pos++,!0),R=n*this.width*4+4*l;this.data[R]=E,this.data[R+1]=b,this.data[R+2]=p,this.data[R+3]=V}},_n.prototype.getData=function(){return this.data},function(a){a.processBMP=function(n,l,p,b){var E=new _n(n,!1),V=E.width,R=E.height,F={data:E.getData(),width:V,height:R},Q=new Va(100).encode(F,100);return a.processJPEG.call(this,Q,l,p,b)}}(He.API),Fa.prototype.getData=function(){return this.data},function(a){a.processWEBP=function(n,l,p,b){var E=new Fa(n),V=E.width,R=E.height,F={data:E.getData(),width:V,height:R},Q=new Va(100).encode(F,100);return a.processJPEG.call(this,Q,l,p,b)}}(He.API),He.API.processRGBA=function(a,n,l){for(var p=a.data,b=p.length,E=new Uint8Array(b/4*3),V=new Uint8Array(b/4),R=0,F=0,Q=0;Q<b;Q+=4){var he=p[Q],we=p[Q+1],Oe=p[Q+2],K=p[Q+3];E[R++]=he,E[R++]=we,E[R++]=Oe,V[F++]=K}var Je=this.__addimage__.arrayBufferToBinaryString(E);return{alpha:this.__addimage__.arrayBufferToBinaryString(V),data:Je,index:n,alias:l,colorSpace:"DeviceRGB",bitsPerComponent:8,width:a.width,height:a.height}},He.API.setLanguage=function(a){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"}[a]!==void 0&&(this.internal.languageSettings.languageCode=a,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},Tr=He.API,ts=Tr.getCharWidthsArray=function(a,n){var l,p,b=(n=n||{}).font||this.internal.getFont(),E=n.fontSize||this.internal.getFontSize(),V=n.charSpace||this.internal.getCharSpace(),R=n.widths?n.widths:b.metadata.Unicode.widths,F=R.fof?R.fof:1,Q=n.kerning?n.kerning:b.metadata.Unicode.kerning,he=Q.fof?Q.fof:1,we=n.doKerning!==!1,Oe=0,K=a.length,Je=0,Fe=R[0]||F,Qe=[];for(l=0;l<K;l++)p=a.charCodeAt(l),typeof b.metadata.widthOfString=="function"?Qe.push((b.metadata.widthOfGlyph(b.metadata.characterToGlyph(p))+V*(1e3/E)||0)/1e3):(Oe=we&&(0,f.default)(Q[p])==="object"&&!isNaN(parseInt(Q[p][Je],10))?Q[p][Je]/he:0,Qe.push((R[p]||Fe)/F+Oe)),Je=p;return Qe},Yr=Tr.getStringUnitWidth=function(a,n){var l=(n=n||{}).fontSize||this.internal.getFontSize(),p=n.font||this.internal.getFont(),b=n.charSpace||this.internal.getCharSpace();return Tr.processArabic&&(a=Tr.processArabic(a)),typeof p.metadata.widthOfString=="function"?p.metadata.widthOfString(a,l,b)/l:ts.apply(this,arguments).reduce(function(E,V){return E+V},0)},Wr=function(a,n,l,p){for(var b=[],E=0,V=a.length,R=0;E!==V&&R+n[E]<l;)R+=n[E],E++;b.push(a.slice(0,E));var F=E;for(R=0;E!==V;)R+n[E]>p&&(b.push(a.slice(F,E)),R=0,F=E),R+=n[E],E++;return F!==E&&b.push(a.slice(F,E)),b},Sn=function(a,n,l){l||(l={});var p,b,E,V,R,F,Q,he=[],we=[he],Oe=l.textIndent||0,K=0,Je=0,Fe=a.split(" "),Qe=ts.apply(this,[" ",l])[0];if(F=l.lineIndent===-1?Fe[0].length+2:l.lineIndent||0){var Ae=Array(F).join(" "),ct=[];Fe.map(function(nt){(nt=nt.split(/\s*\n/)).length>1?ct=ct.concat(nt.map(function(Ce,bt){return(bt&&Ce.length?`
332`:"")+Ce})):ct.push(nt[0])}),Fe=ct,F=Yr.apply(this,[Ae,l])}for(E=0,V=Fe.length;E<V;E++){var Ct=0;if(p=Fe[E],F&&p[0]==`
333`&&(p=p.substr(1),Ct=1),Oe+K+(Je=(b=ts.apply(this,[p,l])).reduce(function(nt,Ce){return nt+Ce},0))>n||Ct){if(Je>n){for(R=Wr.apply(this,[p,b,n-(Oe+K),n]),he.push(R.shift()),he=[R.pop()];R.length;)we.push([R.shift()]);Je=b.slice(p.length-(he[0]?he[0].length:0)).reduce(function(nt,Ce){return nt+Ce},0)}else he=[p];we.push(he),Oe=Je+F,K=Qe}else he.push(p),Oe+=K+Je,K=Qe}return Q=F?function(nt,Ce){return(Ce?Ae:"")+nt.join(" ")}:function(nt){return nt.join(" ")},we.map(Q)},Tr.splitTextToSize=function(a,n,l){var p,b=(l=l||{}).fontSize||this.internal.getFontSize(),E=(function(he){if(he.widths&&he.kerning)return{widths:he.widths,kerning:he.kerning};var we=this.internal.getFont(he.fontName,he.fontStyle),Oe="Unicode";return we.metadata[Oe]?{widths:we.metadata[Oe].widths||{0:1},kerning:we.metadata[Oe].kerning||{}}:{font:we.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,l);p=Array.isArray(a)?a:String(a).split(/\r?\n/);var V=1*this.internal.scaleFactor*n/b;E.textIndent=l.textIndent?1*l.textIndent*this.internal.scaleFactor/b:0,E.lineIndent=l.lineIndent;var R,F,Q=[];for(R=0,F=p.length;R<F;R++)Q=Q.concat(Sn.apply(this,[p[R],V,E]));return Q},function(a){a.__fontmetrics__=a.__fontmetrics__||{};for(var n="0123456789abcdef",l="klmnopqrstuvwxyz",p={},b={},E=0;E<16;E++)p[l[E]]=n[E],b[n[E]]=l[E];var V=function(Oe){return"0x"+parseInt(Oe,10).toString(16)},R=a.__fontmetrics__.compress=function(Oe){var K,Je,Fe,Qe,Ae=["{"];for(var ct in Oe){if(K=Oe[ct],isNaN(parseInt(ct,10))?Je="'"+ct+"'":(ct=parseInt(ct,10),Je=(Je=V(ct).slice(2)).slice(0,-1)+b[Je.slice(-1)]),typeof K=="number")K<0?(Fe=V(K).slice(3),Qe="-"):(Fe=V(K).slice(2),Qe=""),Fe=Qe+Fe.slice(0,-1)+b[Fe.slice(-1)];else{if((0,f.default)(K)!=="object")throw new Error("Don't know what to do with value type "+(0,f.default)(K)+".");Fe=R(K)}Ae.push(Je+Fe)}return Ae.push("}"),Ae.join("")},F=a.__fontmetrics__.uncompress=function(Oe){if(typeof Oe!="string")throw new Error("Invalid argument passed to uncompress.");for(var K,Je,Fe,Qe,Ae={},ct=1,Ct=Ae,nt=[],Ce="",bt="",Gt=Oe.length-1,Et=1;Et<Gt;Et+=1)(Qe=Oe[Et])=="'"?K?(Fe=K.join(""),K=void 0):K=[]:K?K.push(Qe):Qe=="{"?(nt.push([Ct,Fe]),Ct={},Fe=void 0):Qe=="}"?((Je=nt.pop())[0][Je[1]]=Ct,Fe=void 0,Ct=Je[0]):Qe=="-"?ct=-1:Fe===void 0?p.hasOwnProperty(Qe)?(Ce+=p[Qe],Fe=parseInt(Ce,16)*ct,ct=1,Ce=""):Ce+=Qe:p.hasOwnProperty(Qe)?(bt+=p[Qe],Ct[Fe]=parseInt(bt,16)*ct,ct=1,Fe=void 0,bt=""):bt+=Qe;return Ae},Q={codePages:["WinAnsiEncoding"],WinAnsiEncoding:F("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},he={Unicode:{Courier:Q,"Courier-Bold":Q,"Courier-BoldOblique":Q,"Courier-Oblique":Q,Helvetica:Q,"Helvetica-Bold":Q,"Helvetica-BoldOblique":Q,"Helvetica-Oblique":Q,"Times-Roman":Q,"Times-Bold":Q,"Times-BoldItalic":Q,"Times-Italic":Q}},we={Unicode:{"Courier-Oblique":F("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":F("{'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":F("{'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:F("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":F("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":F("{'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:F("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:F("{'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":F("{'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:F("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":F("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":F("{'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":F("{'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":F("{'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}}}")}};a.events.push(["addFont",function(Oe){var K=Oe.font,Je=we.Unicode[K.postScriptName];Je&&(K.metadata.Unicode={},K.metadata.Unicode.widths=Je.widths,K.metadata.Unicode.kerning=Je.kerning);var Fe=he.Unicode[K.postScriptName];Fe&&(K.metadata.Unicode.encoding=Fe,K.encoding=Fe.codePages[0])}])}(He.API),function(a){var n=function(l){for(var p=l.length,b=new Uint8Array(p),E=0;E<p;E++)b[E]=l.charCodeAt(E);return b};a.API.events.push(["addFont",function(l){var p=void 0,b=l.font,E=l.instance;if(!b.isStandardFont){if(E===void 0)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+b.postScriptName+"').");if(typeof(p=E.existsFileInVFS(b.postScriptName)===!1?E.loadFile(b.postScriptName):E.getFileFromVFS(b.postScriptName))!="string")throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+b.postScriptName+"').");(function(V,R){R=/^\x00\x01\x00\x00/.test(R)?n(R):n(W(R)),V.metadata=a.API.TTFFont.open(R),V.metadata.Unicode=V.metadata.Unicode||{encoding:{},kerning:{},widths:[]},V.metadata.glyIdsUsed=[0]})(b,p)}}])}(He),He.API.addSvgAsImage=function(a,n,l,p,b,E,V,R){if(isNaN(n)||isNaN(l))throw g.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(p)||isNaN(b))throw g.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var F=document.createElement("canvas");F.width=p,F.height=b;var Q=F.getContext("2d");Q.fillStyle="#fff",Q.fillRect(0,0,F.width,F.height);var he={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},we=this;return(C.canvg?Promise.resolve(C.canvg):Promise.resolve().then(t.bind(t,"./node_modules/canvg/lib/index.es.js"))).catch(function(Oe){return Promise.reject(new Error("Could not load canvg: "+Oe))}).then(function(Oe){return Oe.default?Oe.default:Oe}).then(function(Oe){return Oe.fromString(Q,a,he)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(Oe){return Oe.render(he)}).then(function(){we.addImage(F.toDataURL("image/jpeg",1),n,l,p,b,V,R)})},He.API.putTotalPages=function(a){var n,l=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(n=new RegExp(a,"g"),l=this.internal.getNumberOfPages()):(n=new RegExp(this.pdfEscape16(a,this.internal.getFont()),"g"),l=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var p=1;p<=this.internal.getNumberOfPages();p++)for(var b=0;b<this.internal.pages[p].length;b++)this.internal.pages[p][b]=this.internal.pages[p][b].replace(n,l);return this},He.API.viewerPreferences=function(a,n){var l;a=a||{},n=n||!1;var p,b,E,V={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}},R=Object.keys(V),F=[],Q=0,he=0,we=0;function Oe(Je,Fe){var Qe,Ae=!1;for(Qe=0;Qe<Je.length;Qe+=1)Je[Qe]===Fe&&(Ae=!0);return Ae}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(V)),this.internal.viewerpreferences.isSubscribed=!1),l=this.internal.viewerpreferences.configuration,a==="reset"||n===!0){var K=R.length;for(we=0;we<K;we+=1)l[R[we]].value=l[R[we]].defaultValue,l[R[we]].explicitSet=!1}if((0,f.default)(a)==="object"){for(b in a)if(E=a[b],Oe(R,b)&&E!==void 0){if(l[b].type==="boolean"&&typeof E=="boolean")l[b].value=E;else if(l[b].type==="name"&&Oe(l[b].valueSet,E))l[b].value=E;else if(l[b].type==="integer"&&Number.isInteger(E))l[b].value=E;else if(l[b].type==="array"){for(Q=0;Q<E.length;Q+=1)if(p=!0,E[Q].length===1&&typeof E[Q][0]=="number")F.push(String(E[Q]-1));else if(E[Q].length>1){for(he=0;he<E[Q].length;he+=1)typeof E[Q][he]!="number"&&(p=!1);p===!0&&F.push([E[Q][0]-1,E[Q][1]-1].join(" "))}l[b].value="["+F.join(" ")+"]"}else l[b].value=l[b].defaultValue;l[b].explicitSet=!0}}return this.internal.viewerpreferences.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){var Je,Fe=[];for(Je in l)l[Je].explicitSet===!0&&(l[Je].type==="name"?Fe.push("/"+Je+" /"+l[Je].value):Fe.push("/"+Je+" "+l[Je].value));Fe.length!==0&&this.internal.write(`/ViewerPreferences
334<<
335`+Fe.join(`
336`)+`
337>>`)}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=l,this},function(a){var n=function(){var p='<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>',b=unescape(encodeURIComponent('<x:xmpmeta xmlns:x="adobe:ns:meta/">')),E=unescape(encodeURIComponent(p)),V=unescape(encodeURIComponent(this.internal.__metadata__.metadata)),R=unescape(encodeURIComponent("</jspdf:metadata></rdf:Description></rdf:RDF>")),F=unescape(encodeURIComponent("</x:xmpmeta>")),Q=E.length+V.length+R.length+b.length+F.length;this.internal.__metadata__.metadata_object_number=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+Q+" >>"),this.internal.write("stream"),this.internal.write(b+E+V+R+F),this.internal.write("endstream"),this.internal.write("endobj")},l=function(){this.internal.__metadata__.metadata_object_number&&this.internal.write("/Metadata "+this.internal.__metadata__.metadata_object_number+" 0 R")};a.addMetadata=function(p,b){return this.internal.__metadata__===void 0&&(this.internal.__metadata__={metadata:p,namespaceuri:b||"http://jspdf.default.namespaceuri/"},this.internal.events.subscribe("putCatalog",l),this.internal.events.subscribe("postPutResources",n)),this}}(He.API),function(a){var n=a.API,l=n.pdfEscape16=function(E,V){for(var R,F=V.metadata.Unicode.widths,Q=["","0","00","000","0000"],he=[""],we=0,Oe=E.length;we<Oe;++we){if(R=V.metadata.characterToGlyph(E.charCodeAt(we)),V.metadata.glyIdsUsed.push(R),V.metadata.toUnicode[R]=E.charCodeAt(we),F.indexOf(R)==-1&&(F.push(R),F.push([parseInt(V.metadata.widthOfGlyph(R),10)])),R=="0")return he.join("");R=R.toString(16),he.push(Q[4-R.length],R)}return he.join("")},p=function(E){var V,R,F,Q,he,we,Oe;for(he=`/CIDInit /ProcSet findresource begin
33812 dict begin
339begincmap
340/CIDSystemInfo <<
341  /Registry (Adobe)
342  /Ordering (UCS)
343  /Supplement 0
344>> def
345/CMapName /Adobe-Identity-UCS def
346/CMapType 2 def
3471 begincodespacerange
348<0000><ffff>
349endcodespacerange`,F=[],we=0,Oe=(R=Object.keys(E).sort(function(K,Je){return K-Je})).length;we<Oe;we++)V=R[we],F.length>=100&&(he+=`
350`+F.length+` beginbfchar
351`+F.join(`
352`)+`
353endbfchar`,F=[]),E[V]!==void 0&&E[V]!==null&&typeof E[V].toString=="function"&&(Q=("0000"+E[V].toString(16)).slice(-4),V=("0000"+(+V).toString(16)).slice(-4),F.push("<"+V+"><"+Q+">"));return F.length&&(he+=`
354`+F.length+` beginbfchar
355`+F.join(`
356`)+`
357endbfchar
358`),he+`endcmap
359CMapName currentdict /CMap defineresource pop
360end
361end`};n.events.push(["putFont",function(E){(function(V){var R=V.font,F=V.out,Q=V.newObject,he=V.putStream;if(R.metadata instanceof a.API.TTFFont&&R.encoding==="Identity-H"){for(var we=R.metadata.Unicode.widths,Oe=R.metadata.subset.encode(R.metadata.glyIdsUsed,1),K="",Je=0;Je<Oe.length;Je++)K+=String.fromCharCode(Oe[Je]);var Fe=Q();he({data:K,addLength1:!0,objectId:Fe}),F("endobj");var Qe=Q();he({data:p(R.metadata.toUnicode),addLength1:!0,objectId:Qe}),F("endobj");var Ae=Q();F("<<"),F("/Type /FontDescriptor"),F("/FontName /"+Se(R.fontName)),F("/FontFile2 "+Fe+" 0 R"),F("/FontBBox "+a.API.PDFObject.convert(R.metadata.bbox)),F("/Flags "+R.metadata.flags),F("/StemV "+R.metadata.stemV),F("/ItalicAngle "+R.metadata.italicAngle),F("/Ascent "+R.metadata.ascender),F("/Descent "+R.metadata.decender),F("/CapHeight "+R.metadata.capHeight),F(">>"),F("endobj");var ct=Q();F("<<"),F("/Type /Font"),F("/BaseFont /"+Se(R.fontName)),F("/FontDescriptor "+Ae+" 0 R"),F("/W "+a.API.PDFObject.convert(we)),F("/CIDToGIDMap /Identity"),F("/DW 1000"),F("/Subtype /CIDFontType2"),F("/CIDSystemInfo"),F("<<"),F("/Supplement 0"),F("/Registry (Adobe)"),F("/Ordering ("+R.encoding+")"),F(">>"),F(">>"),F("endobj"),R.objectNumber=Q(),F("<<"),F("/Type /Font"),F("/Subtype /Type0"),F("/ToUnicode "+Qe+" 0 R"),F("/BaseFont /"+Se(R.fontName)),F("/Encoding /"+R.encoding),F("/DescendantFonts ["+ct+" 0 R]"),F(">>"),F("endobj"),R.isAlreadyPutted=!0}})(E)}]),n.events.push(["putFont",function(E){(function(V){var R=V.font,F=V.out,Q=V.newObject,he=V.putStream;if(R.metadata instanceof a.API.TTFFont&&R.encoding==="WinAnsiEncoding"){for(var we=R.metadata.rawData,Oe="",K=0;K<we.length;K++)Oe+=String.fromCharCode(we[K]);var Je=Q();he({data:Oe,addLength1:!0,objectId:Je}),F("endobj");var Fe=Q();he({data:p(R.metadata.toUnicode),addLength1:!0,objectId:Fe}),F("endobj");var Qe=Q();F("<<"),F("/Descent "+R.metadata.decender),F("/CapHeight "+R.metadata.capHeight),F("/StemV "+R.metadata.stemV),F("/Type /FontDescriptor"),F("/FontFile2 "+Je+" 0 R"),F("/Flags 96"),F("/FontBBox "+a.API.PDFObject.convert(R.metadata.bbox)),F("/FontName /"+Se(R.fontName)),F("/ItalicAngle "+R.metadata.italicAngle),F("/Ascent "+R.metadata.ascender),F(">>"),F("endobj"),R.objectNumber=Q();for(var Ae=0;Ae<R.metadata.hmtx.widths.length;Ae++)R.metadata.hmtx.widths[Ae]=parseInt(R.metadata.hmtx.widths[Ae]*(1e3/R.metadata.head.unitsPerEm));F("<</Subtype/TrueType/Type/Font/ToUnicode "+Fe+" 0 R/BaseFont/"+Se(R.fontName)+"/FontDescriptor "+Qe+" 0 R/Encoding/"+R.encoding+" /FirstChar 29 /LastChar 255 /Widths "+a.API.PDFObject.convert(R.metadata.hmtx.widths)+">>"),F("endobj"),R.isAlreadyPutted=!0}})(E)}]);var b=function(E){var V,R=E.text||"",F=E.x,Q=E.y,he=E.options||{},we=E.mutex||{},Oe=we.pdfEscape,K=we.activeFontKey,Je=we.fonts,Fe=K,Qe="",Ae=0,ct="",Ct=Je[Fe].encoding;if(Je[Fe].encoding!=="Identity-H")return{text:R,x:F,y:Q,options:he,mutex:we};for(ct=R,Fe=K,Array.isArray(R)&&(ct=R[0]),Ae=0;Ae<ct.length;Ae+=1)Je[Fe].metadata.hasOwnProperty("cmap")&&(V=Je[Fe].metadata.cmap.unicode.codeMap[ct[Ae].charCodeAt(0)]),V||ct[Ae].charCodeAt(0)<256&&Je[Fe].metadata.hasOwnProperty("Unicode")?Qe+=ct[Ae]:Qe+="";var nt="";return parseInt(Fe.slice(1))<14||Ct==="WinAnsiEncoding"?nt=Oe(Qe,Fe).split("").map(function(Ce){return Ce.charCodeAt(0).toString(16)}).join(""):Ct==="Identity-H"&&(nt=l(Qe,Je[Fe])),we.isHex=!0,{text:nt,x:F,y:Q,options:he,mutex:we}};n.events.push(["postProcessText",function(E){var V=E.text||"",R=[],F={text:V,x:E.x,y:E.y,options:E.options,mutex:E.mutex};if(Array.isArray(V)){var Q=0;for(Q=0;Q<V.length;Q+=1)Array.isArray(V[Q])&&V[Q].length===3?R.push([b(Object.assign({},F,{text:V[Q][0]})).text,V[Q][1],V[Q][2]]):R.push(b(Object.assign({},F,{text:V[Q]})).text);E.text=R}else E.text=b(Object.assign({},F,{text:V})).text}])}(He),function(a){var n=function(){return this.internal.vFS===void 0&&(this.internal.vFS={}),!0};a.existsFileInVFS=function(l){return n.call(this),this.internal.vFS[l]!==void 0},a.addFileToVFS=function(l,p){return n.call(this),this.internal.vFS[l]=p,this},a.getFileFromVFS=function(l){return n.call(this),this.internal.vFS[l]!==void 0?this.internal.vFS[l]:null}}(He.API),function(a){a.__bidiEngine__=a.prototype.__bidiEngine__=function(p){var b,E,V,R,F,Q,he,we=n,Oe=[[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]],K=[[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]],Je={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},Fe={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},Qe=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","‹","›","‹","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],Ae=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)$/),ct=!1,Ct=0;this.__bidiEngine__={};var nt=function(ke){var Re=ke.charCodeAt(),at=Re>>8,ot=Fe[at];return ot!==void 0?we[256*ot+(255&Re)]:at===252||at===253?"AL":Ae.test(at)?"L":at===8?"R":"N"},Ce=function(ke){for(var Re,at=0;at<ke.length;at++){if((Re=nt(ke.charAt(at)))==="L")return!1;if(Re==="R")return!0}return!1},bt=function(ke,Re,at,ot){var Ut,Xt,er,Pt,Qt=Re[ot];switch(Qt){case"L":case"R":case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":ct=!1;break;case"N":case"AN":break;case"EN":ct&&(Qt="AN");break;case"AL":ct=!0,Qt="R";break;case"WS":case"BN":Qt="N";break;case"CS":ot<1||ot+1>=Re.length||(Ut=at[ot-1])!=="EN"&&Ut!=="AN"||(Xt=Re[ot+1])!=="EN"&&Xt!=="AN"?Qt="N":ct&&(Xt="AN"),Qt=Xt===Ut?Xt:"N";break;case"ES":Qt=(Ut=ot>0?at[ot-1]:"B")==="EN"&&ot+1<Re.length&&Re[ot+1]==="EN"?"EN":"N";break;case"ET":if(ot>0&&at[ot-1]==="EN"){Qt="EN";break}if(ct){Qt="N";break}for(er=ot+1,Pt=Re.length;er<Pt&&Re[er]==="ET";)er++;Qt=er<Pt&&Re[er]==="EN"?"EN":"N";break;case"NSM":if(V&&!R){for(Pt=Re.length,er=ot+1;er<Pt&&Re[er]==="NSM";)er++;if(er<Pt){var kr=ke[ot],Nr=kr>=1425&&kr<=2303||kr===64286;if(Ut=Re[er],Nr&&(Ut==="R"||Ut==="AL")){Qt="R";break}}}Qt=ot<1||(Ut=Re[ot-1])==="B"?"N":at[ot-1];break;case"B":ct=!1,b=!0,Qt=Ct;break;case"S":E=!0,Qt="N"}return Qt},Gt=function(ke,Re,at){var ot=ke.split("");return at&&Et(ot,at,{hiLevel:Ct}),ot.reverse(),Re&&Re.reverse(),ot.join("")},Et=function(ke,Re,at){var ot,Ut,Xt,er,Pt,Qt=-1,kr=ke.length,Nr=0,xe=[],Ve=Ct?K:Oe,qe=[];for(ct=!1,b=!1,E=!1,Ut=0;Ut<kr;Ut++)qe[Ut]=nt(ke[Ut]);for(Xt=0;Xt<kr;Xt++){if(Pt=Nr,xe[Xt]=bt(ke,qe,xe,Xt),ot=240&(Nr=Ve[Pt][Je[xe[Xt]]]),Nr&=15,Re[Xt]=er=Ve[Nr][5],ot>0)if(ot===16){for(Ut=Qt;Ut<Xt;Ut++)Re[Ut]=1;Qt=-1}else Qt=-1;if(Ve[Nr][6])Qt===-1&&(Qt=Xt);else if(Qt>-1){for(Ut=Qt;Ut<Xt;Ut++)Re[Ut]=er;Qt=-1}qe[Xt]==="B"&&(Re[Xt]=0),at.hiLevel|=er}E&&function(yt,Nt,Ot){for(var Zt=0;Zt<Ot;Zt++)if(yt[Zt]==="S"){Nt[Zt]=Ct;for(var qt=Zt-1;qt>=0&&yt[qt]==="WS";qt--)Nt[qt]=Ct}}(qe,Re,kr)},dt=function(ke,Re,at,ot,Ut){if(!(Ut.hiLevel<ke)){if(ke===1&&Ct===1&&!b)return Re.reverse(),void(at&&at.reverse());for(var Xt,er,Pt,Qt,kr=Re.length,Nr=0;Nr<kr;){if(ot[Nr]>=ke){for(Pt=Nr+1;Pt<kr&&ot[Pt]>=ke;)Pt++;for(Qt=Nr,er=Pt-1;Qt<er;Qt++,er--)Xt=Re[Qt],Re[Qt]=Re[er],Re[er]=Xt,at&&(Xt=at[Qt],at[Qt]=at[er],at[er]=Xt);Nr=Pt}Nr++}}},$t=function(ke,Re,at){var ot=ke.split(""),Ut={hiLevel:Ct};return at||(at=[]),Et(ot,at,Ut),function(Xt,er,Pt){if(Pt.hiLevel!==0&&he)for(var Qt,kr=0;kr<Xt.length;kr++)er[kr]===1&&(Qt=Qe.indexOf(Xt[kr]))>=0&&(Xt[kr]=Qe[Qt+1])}(ot,at,Ut),dt(2,ot,Re,at,Ut),dt(1,ot,Re,at,Ut),ot.join("")};return this.__bidiEngine__.doBidiReorder=function(ke,Re,at){if(function(Ut,Xt){if(Xt)for(var er=0;er<Ut.length;er++)Xt[er]=er;R===void 0&&(R=Ce(Ut)),Q===void 0&&(Q=Ce(Ut))}(ke,Re),V||!F||Q)if(V&&F&&R^Q)Ct=R?1:0,ke=Gt(ke,Re,at);else if(!V&&F&&Q)Ct=R?1:0,ke=$t(ke,Re,at),ke=Gt(ke,Re);else if(!V||R||F||Q){if(V&&!F&&R^Q)ke=Gt(ke,Re),R?(Ct=0,ke=$t(ke,Re,at)):(Ct=1,ke=$t(ke,Re,at),ke=Gt(ke,Re));else if(V&&R&&!F&&Q)Ct=1,ke=$t(ke,Re,at),ke=Gt(ke,Re);else if(!V&&!F&&R^Q){var ot=he;R?(Ct=1,ke=$t(ke,Re,at),Ct=0,he=!1,ke=$t(ke,Re,at),he=ot):(Ct=0,ke=$t(ke,Re,at),ke=Gt(ke,Re),Ct=1,he=!1,ke=$t(ke,Re,at),he=ot,ke=Gt(ke,Re))}}else Ct=0,ke=$t(ke,Re,at);else Ct=R?1:0,ke=$t(ke,Re,at);return ke},this.__bidiEngine__.setOptions=function(ke){ke&&(V=ke.isInputVisual,F=ke.isOutputVisual,R=ke.isInputRtl,Q=ke.isOutputRtl,he=ke.isSymmetricSwapping)},this.__bidiEngine__.setOptions(p),this.__bidiEngine__};var n=["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"],l=new a.__bidiEngine__({isInputVisual:!0});a.API.events.push(["postProcessText",function(p){var b=p.text;p.x,p.y;var E=p.options||{};p.mutex,E.lang;var V=[];if(E.isInputVisual=typeof E.isInputVisual!="boolean"||E.isInputVisual,l.setOptions(E),Object.prototype.toString.call(b)==="[object Array]"){var R=0;for(V=[],R=0;R<b.length;R+=1)Object.prototype.toString.call(b[R])==="[object Array]"?V.push([l.doBidiReorder(b[R][0]),b[R][1],b[R][2]]):V.push([l.doBidiReorder(b[R])]);p.text=V}else p.text=l.doBidiReorder(b);l.setOptions({isInputVisual:!0})}])}(He),He.API.TTFFont=function(){function a(n){var l;if(this.rawData=n,l=this.contents=new Dn(n),this.contents.pos=4,l.readString(4)==="ttcf")throw new Error("TTCF not supported.");l.pos=0,this.parse(),this.subset=new Te(this),this.registerTTF()}return a.open=function(n){return new a(n)},a.prototype.parse=function(){return this.directory=new Da(this.contents),this.head=new Kn(this),this.name=new P(this),this.cmap=new Wa(this),this.toUnicode={},this.hhea=new va(this),this.maxp=new T(this),this.hmtx=new c(this),this.post=new gt(this),this.os2=new Ja(this),this.loca=new pe(this),this.glyf=new k(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]},a.prototype.registerTTF=function(){var n,l,p,b,E;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=(function(){var V,R,F,Q;for(Q=[],V=0,R=(F=this.bbox).length;V<R;V++)n=F[V],Q.push(Math.round(n*this.scaleFactor));return Q}).call(this),this.stemV=0,this.post.exists?(p=255&(b=this.post.italic_angle),32768&(l=b>>16)&&(l=-(1+(65535^l))),this.italicAngle=+(l+"."+p)):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=(E=this.familyClass)===1||E===2||E===3||E===4||E===5||E===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")},a.prototype.characterToGlyph=function(n){var l;return((l=this.cmap.unicode)!=null?l.codeMap[n]:void 0)||0},a.prototype.widthOfGlyph=function(n){var l;return l=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(n).advance*l},a.prototype.widthOfString=function(n,l,p){var b,E,V,R;for(V=0,E=0,R=(n=""+n).length;0<=R?E<R:E>R;E=0<=R?++E:--E)b=n.charCodeAt(E),V+=this.widthOfGlyph(this.characterToGlyph(b))+p*(1e3/l)||0;return V*(l/1e3)},a.prototype.lineHeight=function(n,l){var p;return l==null&&(l=!1),p=l?this.lineGap:0,(this.ascender+p-this.decender)/1e3*n},a}();var Wn,Dn=function(){function a(n){this.data=n??[],this.pos=0,this.length=this.data.length}return a.prototype.readByte=function(){return this.data[this.pos++]},a.prototype.writeByte=function(n){return this.data[this.pos++]=n},a.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},a.prototype.writeUInt32=function(n){return this.writeByte(n>>>24&255),this.writeByte(n>>16&255),this.writeByte(n>>8&255),this.writeByte(255&n)},a.prototype.readInt32=function(){var n;return(n=this.readUInt32())>=2147483648?n-4294967296:n},a.prototype.writeInt32=function(n){return n<0&&(n+=4294967296),this.writeUInt32(n)},a.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},a.prototype.writeUInt16=function(n){return this.writeByte(n>>8&255),this.writeByte(255&n)},a.prototype.readInt16=function(){var n;return(n=this.readUInt16())>=32768?n-65536:n},a.prototype.writeInt16=function(n){return n<0&&(n+=65536),this.writeUInt16(n)},a.prototype.readString=function(n){var l,p;for(p=[],l=0;0<=n?l<n:l>n;l=0<=n?++l:--l)p[l]=String.fromCharCode(this.readByte());return p.join("")},a.prototype.writeString=function(n){var l,p,b;for(b=[],l=0,p=n.length;0<=p?l<p:l>p;l=0<=p?++l:--l)b.push(this.writeByte(n.charCodeAt(l)));return b},a.prototype.readShort=function(){return this.readInt16()},a.prototype.writeShort=function(n){return this.writeInt16(n)},a.prototype.readLongLong=function(){var n,l,p,b,E,V,R,F;return n=this.readByte(),l=this.readByte(),p=this.readByte(),b=this.readByte(),E=this.readByte(),V=this.readByte(),R=this.readByte(),F=this.readByte(),128&n?-1*(72057594037927940*(255^n)+281474976710656*(255^l)+1099511627776*(255^p)+4294967296*(255^b)+16777216*(255^E)+65536*(255^V)+256*(255^R)+(255^F)+1):72057594037927940*n+281474976710656*l+1099511627776*p+4294967296*b+16777216*E+65536*V+256*R+F},a.prototype.writeLongLong=function(n){var l,p;return l=Math.floor(n/4294967296),p=4294967295&n,this.writeByte(l>>24&255),this.writeByte(l>>16&255),this.writeByte(l>>8&255),this.writeByte(255&l),this.writeByte(p>>24&255),this.writeByte(p>>16&255),this.writeByte(p>>8&255),this.writeByte(255&p)},a.prototype.readInt=function(){return this.readInt32()},a.prototype.writeInt=function(n){return this.writeInt32(n)},a.prototype.read=function(n){var l,p;for(l=[],p=0;0<=n?p<n:p>n;p=0<=n?++p:--p)l.push(this.readByte());return l},a.prototype.write=function(n){var l,p,b,E;for(E=[],p=0,b=n.length;p<b;p++)l=n[p],E.push(this.writeByte(l));return E},a}(),Da=function(){var a;function n(l){var p,b,E;for(this.scalarType=l.readInt(),this.tableCount=l.readShort(),this.searchRange=l.readShort(),this.entrySelector=l.readShort(),this.rangeShift=l.readShort(),this.tables={},b=0,E=this.tableCount;0<=E?b<E:b>E;b=0<=E?++b:--b)p={tag:l.readString(4),checksum:l.readInt(),offset:l.readInt(),length:l.readInt()},this.tables[p.tag]=p}return n.prototype.encode=function(l){var p,b,E,V,R,F,Q,he,we,Oe,K,Je,Fe;for(Fe in K=Object.keys(l).length,F=Math.log(2),we=16*Math.floor(Math.log(K)/F),V=Math.floor(we/F),he=16*K-we,(b=new Dn).writeInt(this.scalarType),b.writeShort(K),b.writeShort(we),b.writeShort(V),b.writeShort(he),E=16*K,Q=b.pos+E,R=null,Je=[],l)for(Oe=l[Fe],b.writeString(Fe),b.writeInt(a(Oe)),b.writeInt(Q),b.writeInt(Oe.length),Je=Je.concat(Oe),Fe==="head"&&(R=Q),Q+=Oe.length;Q%4;)Je.push(0),Q++;return b.write(Je),p=2981146554-a(b.data),b.pos=R+8,b.writeUInt32(p),b.data},a=function(l){var p,b,E,V;for(l=h.call(l);l.length%4;)l.push(0);for(E=new Dn(l),b=0,p=0,V=l.length;p<V;p=p+=4)b+=E.readUInt32();return 4294967295&b},n}(),Qa={}.hasOwnProperty,ga=function(a,n){for(var l in n)Qa.call(n,l)&&(a[l]=n[l]);function p(){this.constructor=a}return p.prototype=n.prototype,a.prototype=new p,a.__super__=n.prototype,a};Wn=function(){function a(n){var l;this.file=n,l=this.file.directory.tables[this.tag],this.exists=!!l,l&&(this.offset=l.offset,this.length=l.length,this.parse(this.file.contents))}return a.prototype.parse=function(){},a.prototype.encode=function(){},a.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},a}();var Kn=function(){function a(){return a.__super__.constructor.apply(this,arguments)}return ga(a,Wn),a.prototype.tag="head",a.prototype.parse=function(n){return n.pos=this.offset,this.version=n.readInt(),this.revision=n.readInt(),this.checkSumAdjustment=n.readInt(),this.magicNumber=n.readInt(),this.flags=n.readShort(),this.unitsPerEm=n.readShort(),this.created=n.readLongLong(),this.modified=n.readLongLong(),this.xMin=n.readShort(),this.yMin=n.readShort(),this.xMax=n.readShort(),this.yMax=n.readShort(),this.macStyle=n.readShort(),this.lowestRecPPEM=n.readShort(),this.fontDirectionHint=n.readShort(),this.indexToLocFormat=n.readShort(),this.glyphDataFormat=n.readShort()},a.prototype.encode=function(n){var l;return(l=new Dn).writeInt(this.version),l.writeInt(this.revision),l.writeInt(this.checkSumAdjustment),l.writeInt(this.magicNumber),l.writeShort(this.flags),l.writeShort(this.unitsPerEm),l.writeLongLong(this.created),l.writeLongLong(this.modified),l.writeShort(this.xMin),l.writeShort(this.yMin),l.writeShort(this.xMax),l.writeShort(this.yMax),l.writeShort(this.macStyle),l.writeShort(this.lowestRecPPEM),l.writeShort(this.fontDirectionHint),l.writeShort(n),l.writeShort(this.glyphDataFormat),l.data},a}(),ta=function(){function a(n,l){var p,b,E,V,R,F,Q,he,we,Oe,K,Je,Fe,Qe,Ae,ct,Ct;switch(this.platformID=n.readUInt16(),this.encodingID=n.readShort(),this.offset=l+n.readInt(),we=n.pos,n.pos=this.offset,this.format=n.readUInt16(),this.length=n.readUInt16(),this.language=n.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(F=0;F<256;++F)this.codeMap[F]=n.readByte();break;case 4:for(K=n.readUInt16(),Oe=K/2,n.pos+=6,E=function(){var nt,Ce;for(Ce=[],F=nt=0;0<=Oe?nt<Oe:nt>Oe;F=0<=Oe?++nt:--nt)Ce.push(n.readUInt16());return Ce}(),n.pos+=2,Fe=function(){var nt,Ce;for(Ce=[],F=nt=0;0<=Oe?nt<Oe:nt>Oe;F=0<=Oe?++nt:--nt)Ce.push(n.readUInt16());return Ce}(),Q=function(){var nt,Ce;for(Ce=[],F=nt=0;0<=Oe?nt<Oe:nt>Oe;F=0<=Oe?++nt:--nt)Ce.push(n.readUInt16());return Ce}(),he=function(){var nt,Ce;for(Ce=[],F=nt=0;0<=Oe?nt<Oe:nt>Oe;F=0<=Oe?++nt:--nt)Ce.push(n.readUInt16());return Ce}(),b=(this.length-n.pos+this.offset)/2,R=function(){var nt,Ce;for(Ce=[],F=nt=0;0<=b?nt<b:nt>b;F=0<=b?++nt:--nt)Ce.push(n.readUInt16());return Ce}(),F=Ae=0,Ct=E.length;Ae<Ct;F=++Ae)for(Qe=E[F],p=ct=Je=Fe[F];Je<=Qe?ct<=Qe:ct>=Qe;p=Je<=Qe?++ct:--ct)he[F]===0?V=p+Q[F]:(V=R[he[F]/2+(p-Je)-(Oe-F)]||0)!==0&&(V+=Q[F]),this.codeMap[p]=65535&V}n.pos=we}return a.encode=function(n,l){var p,b,E,V,R,F,Q,he,we,Oe,K,Je,Fe,Qe,Ae,ct,Ct,nt,Ce,bt,Gt,Et,dt,$t,ke,Re,at,ot,Ut,Xt,er,Pt,Qt,kr,Nr,xe,Ve,qe,yt,Nt,Ot,Zt,qt,mr,_r,$r;switch(ot=new Dn,V=Object.keys(n).sort(function(Kr,ys){return Kr-ys}),l){case"macroman":for(Fe=0,Qe=function(){var Kr=[];for(Je=0;Je<256;++Je)Kr.push(0);return Kr}(),ct={0:0},E={},Ut=0,Qt=V.length;Ut<Qt;Ut++)ct[qt=n[b=V[Ut]]]==null&&(ct[qt]=++Fe),E[b]={old:n[b],new:ct[n[b]]},Qe[b]=ct[n[b]];return ot.writeUInt16(1),ot.writeUInt16(0),ot.writeUInt32(12),ot.writeUInt16(0),ot.writeUInt16(262),ot.writeUInt16(0),ot.write(Qe),{charMap:E,subtable:ot.data,maxGlyphID:Fe+1};case"unicode":for(Re=[],we=[],Ct=0,ct={},p={},Ae=Q=null,Xt=0,kr=V.length;Xt<kr;Xt++)ct[Ce=n[b=V[Xt]]]==null&&(ct[Ce]=++Ct),p[b]={old:Ce,new:ct[Ce]},R=ct[Ce]-b,Ae!=null&&R===Q||(Ae&&we.push(Ae),Re.push(b),Q=R),Ae=b;for(Ae&&we.push(Ae),we.push(65535),Re.push(65535),$t=2*(dt=Re.length),Et=2*Math.pow(Math.log(dt)/Math.LN2,2),Oe=Math.log(Et/2)/Math.LN2,Gt=2*dt-Et,F=[],bt=[],K=[],Je=er=0,Nr=Re.length;er<Nr;Je=++er){if(ke=Re[Je],he=we[Je],ke===65535){F.push(0),bt.push(0);break}if(ke-(at=p[ke].new)>=32768)for(F.push(0),bt.push(2*(K.length+dt-Je)),b=Pt=ke;ke<=he?Pt<=he:Pt>=he;b=ke<=he?++Pt:--Pt)K.push(p[b].new);else F.push(at-ke),bt.push(0)}for(ot.writeUInt16(3),ot.writeUInt16(1),ot.writeUInt32(12),ot.writeUInt16(4),ot.writeUInt16(16+8*dt+2*K.length),ot.writeUInt16(0),ot.writeUInt16($t),ot.writeUInt16(Et),ot.writeUInt16(Oe),ot.writeUInt16(Gt),Ot=0,xe=we.length;Ot<xe;Ot++)b=we[Ot],ot.writeUInt16(b);for(ot.writeUInt16(0),Zt=0,Ve=Re.length;Zt<Ve;Zt++)b=Re[Zt],ot.writeUInt16(b);for(mr=0,qe=F.length;mr<qe;mr++)R=F[mr],ot.writeUInt16(R);for(_r=0,yt=bt.length;_r<yt;_r++)nt=bt[_r],ot.writeUInt16(nt);for($r=0,Nt=K.length;$r<Nt;$r++)Fe=K[$r],ot.writeUInt16(Fe);return{charMap:p,subtable:ot.data,maxGlyphID:Ct+1}}},a}(),Wa=function(){function a(){return a.__super__.constructor.apply(this,arguments)}return ga(a,Wn),a.prototype.tag="cmap",a.prototype.parse=function(n){var l,p,b;for(n.pos=this.offset,this.version=n.readUInt16(),b=n.readUInt16(),this.tables=[],this.unicode=null,p=0;0<=b?p<b:p>b;p=0<=b?++p:--p)l=new ta(n,this.offset),this.tables.push(l),l.isUnicode&&this.unicode==null&&(this.unicode=l);return!0},a.encode=function(n,l){var p,b;return l==null&&(l="macroman"),p=ta.encode(n,l),(b=new Dn).writeUInt16(0),b.writeUInt16(1),p.table=b.data.concat(p.subtable),p},a}(),va=function(){function a(){return a.__super__.constructor.apply(this,arguments)}return ga(a,Wn),a.prototype.tag="hhea",a.prototype.parse=function(n){return n.pos=this.offset,this.version=n.readInt(),this.ascender=n.readShort(),this.decender=n.readShort(),this.lineGap=n.readShort(),this.advanceWidthMax=n.readShort(),this.minLeftSideBearing=n.readShort(),this.minRightSideBearing=n.readShort(),this.xMaxExtent=n.readShort(),this.caretSlopeRise=n.readShort(),this.caretSlopeRun=n.readShort(),this.caretOffset=n.readShort(),n.pos+=8,this.metricDataFormat=n.readShort(),this.numberOfMetrics=n.readUInt16()},a}(),Ja=function(){function a(){return a.__super__.constructor.apply(this,arguments)}return ga(a,Wn),a.prototype.tag="OS/2",a.prototype.parse=function(n){if(n.pos=this.offset,this.version=n.readUInt16(),this.averageCharWidth=n.readShort(),this.weightClass=n.readUInt16(),this.widthClass=n.readUInt16(),this.type=n.readShort(),this.ySubscriptXSize=n.readShort(),this.ySubscriptYSize=n.readShort(),this.ySubscriptXOffset=n.readShort(),this.ySubscriptYOffset=n.readShort(),this.ySuperscriptXSize=n.readShort(),this.ySuperscriptYSize=n.readShort(),this.ySuperscriptXOffset=n.readShort(),this.ySuperscriptYOffset=n.readShort(),this.yStrikeoutSize=n.readShort(),this.yStrikeoutPosition=n.readShort(),this.familyClass=n.readShort(),this.panose=function(){var l,p;for(p=[],l=0;l<10;++l)p.push(n.readByte());return p}(),this.charRange=function(){var l,p;for(p=[],l=0;l<4;++l)p.push(n.readInt());return p}(),this.vendorID=n.readString(4),this.selection=n.readShort(),this.firstCharIndex=n.readShort(),this.lastCharIndex=n.readShort(),this.version>0&&(this.ascent=n.readShort(),this.descent=n.readShort(),this.lineGap=n.readShort(),this.winAscent=n.readShort(),this.winDescent=n.readShort(),this.codePageRange=function(){var l,p;for(p=[],l=0;l<2;l=++l)p.push(n.readInt());return p}(),this.version>1))return this.xHeight=n.readShort(),this.capHeight=n.readShort(),this.defaultChar=n.readShort(),this.breakChar=n.readShort(),this.maxContext=n.readShort()},a}(),gt=function(){function a(){return a.__super__.constructor.apply(this,arguments)}return ga(a,Wn),a.prototype.tag="post",a.prototype.parse=function(n){var l,p,b;switch(n.pos=this.offset,this.format=n.readInt(),this.italicAngle=n.readInt(),this.underlinePosition=n.readShort(),this.underlineThickness=n.readShort(),this.isFixedPitch=n.readInt(),this.minMemType42=n.readInt(),this.maxMemType42=n.readInt(),this.minMemType1=n.readInt(),this.maxMemType1=n.readInt(),this.format){case 65536:case 196608:break;case 131072:var E;for(p=n.readUInt16(),this.glyphNameIndex=[],E=0;0<=p?E<p:E>p;E=0<=p?++E:--E)this.glyphNameIndex.push(n.readUInt16());for(this.names=[],b=[];n.pos<this.offset+this.length;)l=n.readByte(),b.push(this.names.push(n.readString(l)));return b;case 151552:return p=n.readUInt16(),this.offsets=n.read(p);case 262144:return this.map=(function(){var V,R,F;for(F=[],E=V=0,R=this.file.maxp.numGlyphs;0<=R?V<R:V>R;E=0<=R?++V:--V)F.push(n.readUInt32());return F}).call(this)}},a}(),u=function(a,n){this.raw=a,this.length=a.length,this.platformID=n.platformID,this.encodingID=n.encodingID,this.languageID=n.languageID},P=function(){function a(){return a.__super__.constructor.apply(this,arguments)}return ga(a,Wn),a.prototype.tag="name",a.prototype.parse=function(n){var l,p,b,E,V,R,F,Q,he,we,Oe;for(n.pos=this.offset,n.readShort(),l=n.readShort(),R=n.readShort(),p=[],E=0;0<=l?E<l:E>l;E=0<=l?++E:--E)p.push({platformID:n.readShort(),encodingID:n.readShort(),languageID:n.readShort(),nameID:n.readShort(),length:n.readShort(),offset:this.offset+R+n.readShort()});for(F={},E=he=0,we=p.length;he<we;E=++he)b=p[E],n.pos=b.offset,Q=n.readString(b.length),V=new u(Q,b),F[Oe=b.nameID]==null&&(F[Oe]=[]),F[b.nameID].push(V);this.strings=F,this.copyright=F[0],this.fontFamily=F[1],this.fontSubfamily=F[2],this.uniqueSubfamily=F[3],this.fontName=F[4],this.version=F[5];try{this.postscriptName=F[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}catch{this.postscriptName=F[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}return this.trademark=F[7],this.manufacturer=F[8],this.designer=F[9],this.description=F[10],this.vendorUrl=F[11],this.designerUrl=F[12],this.license=F[13],this.licenseUrl=F[14],this.preferredFamily=F[15],this.preferredSubfamily=F[17],this.compatibleFull=F[18],this.sampleText=F[19]},a}(),T=function(){function a(){return a.__super__.constructor.apply(this,arguments)}return ga(a,Wn),a.prototype.tag="maxp",a.prototype.parse=function(n){return n.pos=this.offset,this.version=n.readInt(),this.numGlyphs=n.readUInt16(),this.maxPoints=n.readUInt16(),this.maxContours=n.readUInt16(),this.maxCompositePoints=n.readUInt16(),this.maxComponentContours=n.readUInt16(),this.maxZones=n.readUInt16(),this.maxTwilightPoints=n.readUInt16(),this.maxStorage=n.readUInt16(),this.maxFunctionDefs=n.readUInt16(),this.maxInstructionDefs=n.readUInt16(),this.maxStackElements=n.readUInt16(),this.maxSizeOfInstructions=n.readUInt16(),this.maxComponentElements=n.readUInt16(),this.maxComponentDepth=n.readUInt16()},a}(),c=function(){function a(){return a.__super__.constructor.apply(this,arguments)}return ga(a,Wn),a.prototype.tag="hmtx",a.prototype.parse=function(n){var l,p,b,E,V,R,F;for(n.pos=this.offset,this.metrics=[],l=0,R=this.file.hhea.numberOfMetrics;0<=R?l<R:l>R;l=0<=R?++l:--l)this.metrics.push({advance:n.readUInt16(),lsb:n.readInt16()});for(b=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=function(){var Q,he;for(he=[],l=Q=0;0<=b?Q<b:Q>b;l=0<=b?++Q:--Q)he.push(n.readInt16());return he}(),this.widths=(function(){var Q,he,we,Oe;for(Oe=[],Q=0,he=(we=this.metrics).length;Q<he;Q++)E=we[Q],Oe.push(E.advance);return Oe}).call(this),p=this.widths[this.widths.length-1],F=[],l=V=0;0<=b?V<b:V>b;l=0<=b?++V:--V)F.push(this.widths.push(p));return F},a.prototype.forGlyph=function(n){return n in this.metrics?this.metrics[n]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[n-this.metrics.length]}},a}(),h=[].slice,k=function(){function a(){return a.__super__.constructor.apply(this,arguments)}return ga(a,Wn),a.prototype.tag="glyf",a.prototype.parse=function(){return this.cache={}},a.prototype.glyphFor=function(n){var l,p,b,E,V,R,F,Q,he,we;return n in this.cache?this.cache[n]:(E=this.file.loca,l=this.file.contents,p=E.indexOf(n),(b=E.lengthOf(n))===0?this.cache[n]=null:(l.pos=this.offset+p,V=(R=new Dn(l.read(b))).readShort(),Q=R.readShort(),we=R.readShort(),F=R.readShort(),he=R.readShort(),this.cache[n]=V===-1?new X(R,Q,we,F,he):new $(R,V,Q,we,F,he),this.cache[n]))},a.prototype.encode=function(n,l,p){var b,E,V,R,F;for(V=[],E=[],R=0,F=l.length;R<F;R++)b=n[l[R]],E.push(V.length),b&&(V=V.concat(b.encode(p)));return E.push(V.length),{table:V,offsets:E}},a}(),$=function(){function a(n,l,p,b,E,V){this.raw=n,this.numberOfContours=l,this.xMin=p,this.yMin=b,this.xMax=E,this.yMax=V,this.compound=!1}return a.prototype.encode=function(){return this.raw.data},a}(),X=function(){function a(n,l,p,b,E){var V,R;for(this.raw=n,this.xMin=l,this.yMin=p,this.xMax=b,this.yMax=E,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],V=this.raw;R=V.readShort(),this.glyphOffsets.push(V.pos),this.glyphIDs.push(V.readUInt16()),32&R;)V.pos+=1&R?4:2,128&R?V.pos+=8:64&R?V.pos+=4:8&R&&(V.pos+=2)}return a.prototype.encode=function(){var n,l,p;for(l=new Dn(h.call(this.raw.data)),n=0,p=this.glyphIDs.length;n<p;++n)l.pos=this.glyphOffsets[n];return l.data},a}(),pe=function(){function a(){return a.__super__.constructor.apply(this,arguments)}return ga(a,Wn),a.prototype.tag="loca",a.prototype.parse=function(n){var l,p;return n.pos=this.offset,l=this.file.head.indexToLocFormat,this.offsets=l===0?(function(){var b,E;for(E=[],p=0,b=this.length;p<b;p+=2)E.push(2*n.readUInt16());return E}).call(this):(function(){var b,E;for(E=[],p=0,b=this.length;p<b;p+=4)E.push(n.readUInt32());return E}).call(this)},a.prototype.indexOf=function(n){return this.offsets[n]},a.prototype.lengthOf=function(n){return this.offsets[n+1]-this.offsets[n]},a.prototype.encode=function(n,l){for(var p=new Uint32Array(this.offsets.length),b=0,E=0,V=0;V<p.length;++V)if(p[V]=b,E<l.length&&l[E]==V){++E,p[V]=b;var R=this.offsets[V],F=this.offsets[V+1]-R;F>0&&(b+=F)}for(var Q=new Array(4*p.length),he=0;he<p.length;++he)Q[4*he+3]=255&p[he],Q[4*he+2]=(65280&p[he])>>8,Q[4*he+1]=(16711680&p[he])>>16,Q[4*he]=(4278190080&p[he])>>24;return Q},a}(),Te=function(){function a(n){this.font=n,this.subset={},this.unicodes={},this.next=33}return a.prototype.generateCmap=function(){var n,l,p,b,E;for(l in b=this.font.cmap.tables[0].codeMap,n={},E=this.subset)p=E[l],n[l]=b[p];return n},a.prototype.glyphsFor=function(n){var l,p,b,E,V,R,F;for(b={},V=0,R=n.length;V<R;V++)b[E=n[V]]=this.font.glyf.glyphFor(E);for(E in l=[],b)(p=b[E])!=null&&p.compound&&l.push.apply(l,p.glyphIDs);if(l.length>0)for(E in F=this.glyphsFor(l))p=F[E],b[E]=p;return b},a.prototype.encode=function(n,l){var p,b,E,V,R,F,Q,he,we,Oe,K,Je,Fe,Qe,Ae;for(b in p=Wa.encode(this.generateCmap(),"unicode"),V=this.glyphsFor(n),K={0:0},Ae=p.charMap)K[(F=Ae[b]).old]=F.new;for(Je in Oe=p.maxGlyphID,V)Je in K||(K[Je]=Oe++);return he=function(ct){var Ct,nt;for(Ct in nt={},ct)nt[ct[Ct]]=Ct;return nt}(K),we=Object.keys(he).sort(function(ct,Ct){return ct-Ct}),Fe=function(){var ct,Ct,nt;for(nt=[],ct=0,Ct=we.length;ct<Ct;ct++)R=we[ct],nt.push(he[R]);return nt}(),E=this.font.glyf.encode(V,Fe,K),Q=this.font.loca.encode(E.offsets,Fe),Qe={cmap:this.font.cmap.raw(),glyf:E.table,loca:Q,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(l)},this.font.os2.exists&&(Qe["OS/2"]=this.font.os2.raw()),this.font.directory.encode(Qe)},a}();He.API.PDFObject=function(){var a;function n(){}return a=function(l,p){return(Array(p+1).join("0")+l).slice(-p)},n.convert=function(l){var p,b,E,V;if(Array.isArray(l))return"["+function(){var R,F,Q;for(Q=[],R=0,F=l.length;R<F;R++)p=l[R],Q.push(n.convert(p));return Q}().join(" ")+"]";if(typeof l=="string")return"/"+l;if(l!=null&&l.isString)return"("+l+")";if(l instanceof Date)return"(D:"+a(l.getUTCFullYear(),4)+a(l.getUTCMonth(),2)+a(l.getUTCDate(),2)+a(l.getUTCHours(),2)+a(l.getUTCMinutes(),2)+a(l.getUTCSeconds(),2)+"Z)";if({}.toString.call(l)==="[object Object]"){for(b in E=["<<"],l)V=l[b],E.push("/"+b+" "+n.convert(V));return E.push(">>"),E.join(`
362`)}return""+l},n}()},
vendor: 50,863 bytes, line 362
362"./node_modules/pako/dist/pako.esm.mjs":function(w,O,t){t.r(O),t.d(O,{Deflate:function(){return vr},Inflate:function(){return zs},constants:function(){return Pn},default:function(){return Ta},deflate:function(){return Qr},deflateRaw:function(){return rs},gzip:function(){return _s},inflate:function(){return on},inflateRaw:function(){return Jn},ungzip:function(){return ya}});/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */const f=4,v=0,m=1,y=2;function C(o){let ee=o.length;for(;--ee>=0;)o[ee]=0}const S=0,g=1,j=2,A=3,I=258,M=29,B=256,W=B+1+M,Y=30,J=19,le=2*W+1,ae=15,Z=16,oe=7,H=256,fe=16,se=17,de=18,q=new Uint8Array([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]),U=new Uint8Array([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]),ge=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),Ee=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Xe=512,re=new Array((W+2)*2);C(re);const Pe=new Array(Y*2);C(Pe);const ye=new Array(Xe);C(ye);const Se=new Array(I-A+1);C(Se);const Le=new Array(M);C(Le);const st=new Array(Y);C(st);function Ke(o,ee,N,be,ze){this.static_tree=o,this.extra_bits=ee,this.extra_base=N,this.elems=be,this.max_length=ze,this.has_stree=o&&o.length}let rt,xt,He;function Tt(o,ee){this.dyn_tree=o,this.max_code=0,this.stat_desc=ee}const Kt=o=>o<256?ye[o]:ye[256+(o>>>7)],Jt=(o,ee)=>{o.pending_buf[o.pending++]=ee&255,o.pending_buf[o.pending++]=ee>>>8&255},rr=(o,ee,N)=>{o.bi_valid>Z-N?(o.bi_buf|=ee<<o.bi_valid&65535,Jt(o,o.bi_buf),o.bi_buf=ee>>Z-o.bi_valid,o.bi_valid+=N-Z):(o.bi_buf|=ee<<o.bi_valid&65535,o.bi_valid+=N)},Ht=(o,ee,N)=>{rr(o,N[ee*2],N[ee*2+1])},yr=(o,ee)=>{let N=0;do N|=o&1,o>>>=1,N<<=1;while(--ee>0);return N>>>1},gr=o=>{o.bi_valid===16?(Jt(o,o.bi_buf),o.bi_buf=0,o.bi_valid=0):o.bi_valid>=8&&(o.pending_buf[o.pending++]=o.bi_buf&255,o.bi_buf>>=8,o.bi_valid-=8)},Vr=(o,ee)=>{const N=ee.dyn_tree,be=ee.max_code,ze=ee.stat_desc.static_tree,Me=ee.stat_desc.has_stree,Dt=ee.stat_desc.extra_bits,jt=ee.stat_desc.extra_base,Hr=ee.stat_desc.max_length;let ut,Rt,Cs,Dr,wr,fs,Tn=0;for(Dr=0;Dr<=ae;Dr++)o.bl_count[Dr]=0;for(N[o.heap[o.heap_max]*2+1]=0,ut=o.heap_max+1;ut<le;ut++)Rt=o.heap[ut],Dr=N[N[Rt*2+1]*2+1]+1,Dr>Hr&&(Dr=Hr,Tn++),N[Rt*2+1]=Dr,!(Rt>be)&&(o.bl_count[Dr]++,wr=0,Rt>=jt&&(wr=Dt[Rt-jt]),fs=N[Rt*2],o.opt_len+=fs*(Dr+wr),Me&&(o.static_len+=fs*(ze[Rt*2+1]+wr)));if(Tn!==0){do{for(Dr=Hr-1;o.bl_count[Dr]===0;)Dr--;o.bl_count[Dr]--,o.bl_count[Dr+1]+=2,o.bl_count[Hr]--,Tn-=2}while(Tn>0);for(Dr=Hr;Dr!==0;Dr--)for(Rt=o.bl_count[Dr];Rt!==0;)Cs=o.heap[--ut],!(Cs>be)&&(N[Cs*2+1]!==Dr&&(o.opt_len+=(Dr-N[Cs*2+1])*N[Cs*2],N[Cs*2+1]=Dr),Rt--)}},jr=(o,ee,N)=>{const be=new Array(ae+1);let ze=0,Me,Dt;for(Me=1;Me<=ae;Me++)ze=ze+N[Me-1]<<1,be[Me]=ze;for(Dt=0;Dt<=ee;Dt++){let jt=o[Dt*2+1];jt!==0&&(o[Dt*2]=yr(be[jt]++,jt))}},Xr=()=>{let o,ee,N,be,ze;const Me=new Array(ae+1);for(N=0,be=0;be<M-1;be++)for(Le[be]=N,o=0;o<1<<q[be];o++)Se[N++]=be;for(Se[N-1]=be,ze=0,be=0;be<16;be++)for(st[be]=ze,o=0;o<1<<U[be];o++)ye[ze++]=be;for(ze>>=7;be<Y;be++)for(st[be]=ze<<7,o=0;o<1<<U[be]-7;o++)ye[256+ze++]=be;for(ee=0;ee<=ae;ee++)Me[ee]=0;for(o=0;o<=143;)re[o*2+1]=8,o++,Me[8]++;for(;o<=255;)re[o*2+1]=9,o++,Me[9]++;for(;o<=279;)re[o*2+1]=7,o++,Me[7]++;for(;o<=287;)re[o*2+1]=8,o++,Me[8]++;for(jr(re,W+1,Me),o=0;o<Y;o++)Pe[o*2+1]=5,Pe[o*2]=yr(o,5);rt=new Ke(re,q,B+1,W,ae),xt=new Ke(Pe,U,0,Y,ae),He=new Ke(new Array(0),ge,0,J,oe)},et=o=>{let ee;for(ee=0;ee<W;ee++)o.dyn_ltree[ee*2]=0;for(ee=0;ee<Y;ee++)o.dyn_dtree[ee*2]=0;for(ee=0;ee<J;ee++)o.bl_tree[ee*2]=0;o.dyn_ltree[H*2]=1,o.opt_len=o.static_len=0,o.sym_next=o.matches=0},ft=o=>{o.bi_valid>8?Jt(o,o.bi_buf):o.bi_valid>0&&(o.pending_buf[o.pending++]=o.bi_buf),o.bi_buf=0,o.bi_valid=0},je=(o,ee,N,be)=>{const ze=ee*2,Me=N*2;return o[ze]<o[Me]||o[ze]===o[Me]&&be[ee]<=be[N]},$e=(o,ee,N)=>{const be=o.heap[N];let ze=N<<1;for(;ze<=o.heap_len&&(ze<o.heap_len&&je(ee,o.heap[ze+1],o.heap[ze],o.depth)&&ze++,!je(ee,be,o.heap[ze],o.depth));)o.heap[N]=o.heap[ze],N=ze,ze<<=1;o.heap[N]=be},ht=(o,ee,N)=>{let be,ze,Me=0,Dt,jt;if(o.sym_next!==0)do be=o.pending_buf[o.sym_buf+Me++]&255,be+=(o.pending_buf[o.sym_buf+Me++]&255)<<8,ze=o.pending_buf[o.sym_buf+Me++],be===0?Ht(o,ze,ee):(Dt=Se[ze],Ht(o,Dt+B+1,ee),jt=q[Dt],jt!==0&&(ze-=Le[Dt],rr(o,ze,jt)),be--,Dt=Kt(be),Ht(o,Dt,N),jt=U[Dt],jt!==0&&(be-=st[Dt],rr(o,be,jt)));while(Me<o.sym_next);Ht(o,H,ee)},tt=(o,ee)=>{const N=ee.dyn_tree,be=ee.stat_desc.static_tree,ze=ee.stat_desc.has_stree,Me=ee.stat_desc.elems;let Dt,jt,Hr=-1,ut;for(o.heap_len=0,o.heap_max=le,Dt=0;Dt<Me;Dt++)N[Dt*2]!==0?(o.heap[++o.heap_len]=Hr=Dt,o.depth[Dt]=0):N[Dt*2+1]=0;for(;o.heap_len<2;)ut=o.heap[++o.heap_len]=Hr<2?++Hr:0,N[ut*2]=1,o.depth[ut]=0,o.opt_len--,ze&&(o.static_len-=be[ut*2+1]);for(ee.max_code=Hr,Dt=o.heap_len>>1;Dt>=1;Dt--)$e(o,N,Dt);ut=Me;do Dt=o.heap[1],o.heap[1]=o.heap[o.heap_len--],$e(o,N,1),jt=o.heap[1],o.heap[--o.heap_max]=Dt,o.heap[--o.heap_max]=jt,N[ut*2]=N[Dt*2]+N[jt*2],o.depth[ut]=(o.depth[Dt]>=o.depth[jt]?o.depth[Dt]:o.depth[jt])+1,N[Dt*2+1]=N[jt*2+1]=ut,o.heap[1]=ut++,$e(o,N,1);while(o.heap_len>=2);o.heap[--o.heap_max]=o.heap[1],Vr(o,ee),jr(N,Hr,o.bl_count)},Ze=(o,ee,N)=>{let be,ze=-1,Me,Dt=ee[0*2+1],jt=0,Hr=7,ut=4;for(Dt===0&&(Hr=138,ut=3),ee[(N+1)*2+1]=65535,be=0;be<=N;be++)Me=Dt,Dt=ee[(be+1)*2+1],!(++jt<Hr&&Me===Dt)&&(jt<ut?o.bl_tree[Me*2]+=jt:Me!==0?(Me!==ze&&o.bl_tree[Me*2]++,o.bl_tree[fe*2]++):jt<=10?o.bl_tree[se*2]++:o.bl_tree[de*2]++,jt=0,ze=Me,Dt===0?(Hr=138,ut=3):Me===Dt?(Hr=6,ut=3):(Hr=7,ut=4))},Ft=(o,ee,N)=>{let be,ze=-1,Me,Dt=ee[0*2+1],jt=0,Hr=7,ut=4;for(Dt===0&&(Hr=138,ut=3),be=0;be<=N;be++)if(Me=Dt,Dt=ee[(be+1)*2+1],!(++jt<Hr&&Me===Dt)){if(jt<ut)do Ht(o,Me,o.bl_tree);while(--jt!==0);else Me!==0?(Me!==ze&&(Ht(o,Me,o.bl_tree),jt--),Ht(o,fe,o.bl_tree),rr(o,jt-3,2)):jt<=10?(Ht(o,se,o.bl_tree),rr(o,jt-3,3)):(Ht(o,de,o.bl_tree),rr(o,jt-11,7));jt=0,ze=Me,Dt===0?(Hr=138,ut=3):Me===Dt?(Hr=6,ut=3):(Hr=7,ut=4)}},lt=o=>{let ee;for(Ze(o,o.dyn_ltree,o.l_desc.max_code),Ze(o,o.dyn_dtree,o.d_desc.max_code),tt(o,o.bl_desc),ee=J-1;ee>=3&&o.bl_tree[Ee[ee]*2+1]===0;ee--);return o.opt_len+=3*(ee+1)+5+5+4,ee},_t=(o,ee,N,be)=>{let ze;for(rr(o,ee-257,5),rr(o,N-1,5),rr(o,be-4,4),ze=0;ze<be;ze++)rr(o,o.bl_tree[Ee[ze]*2+1],3);Ft(o,o.dyn_ltree,ee-1),Ft(o,o.dyn_dtree,N-1)},dr=o=>{let ee=4093624447,N;for(N=0;N<=31;N++,ee>>>=1)if(ee&1&&o.dyn_ltree[N*2]!==0)return v;if(o.dyn_ltree[9*2]!==0||o.dyn_ltree[10*2]!==0||o.dyn_ltree[13*2]!==0)return m;for(N=32;N<B;N++)if(o.dyn_ltree[N*2]!==0)return m;return v};let fr=!1;const It=o=>{fr||(Xr(),fr=!0),o.l_desc=new Tt(o.dyn_ltree,rt),o.d_desc=new Tt(o.dyn_dtree,xt),o.bl_desc=new Tt(o.bl_tree,He),o.bi_buf=0,o.bi_valid=0,et(o)},nr=(o,ee,N,be)=>{rr(o,(S<<1)+(be?1:0),3),ft(o),Jt(o,N),Jt(o,~N),N&&o.pending_buf.set(o.window.subarray(ee,ee+N),o.pending),o.pending+=N},Cr=o=>{rr(o,g<<1,3),Ht(o,H,re),gr(o)},Wt=(o,ee,N,be)=>{let ze,Me,Dt=0;o.level>0?(o.strm.data_type===y&&(o.strm.data_type=dr(o)),tt(o,o.l_desc),tt(o,o.d_desc),Dt=lt(o),ze=o.opt_len+3+7>>>3,Me=o.static_len+3+7>>>3,Me<=ze&&(ze=Me)):ze=Me=N+5,N+4<=ze&&ee!==-1?nr(o,ee,N,be):o.strategy===f||Me===ze?(rr(o,(g<<1)+(be?1:0),3),ht(o,re,Pe)):(rr(o,(j<<1)+(be?1:0),3),_t(o,o.l_desc.max_code+1,o.d_desc.max_code+1,Dt+1),ht(o,o.dyn_ltree,o.dyn_dtree)),et(o),be&&ft(o)},Ir=(o,ee,N)=>(o.pending_buf[o.sym_buf+o.sym_next++]=ee,o.pending_buf[o.sym_buf+o.sym_next++]=ee>>8,o.pending_buf[o.sym_buf+o.sym_next++]=N,ee===0?o.dyn_ltree[N*2]++:(o.matches++,ee--,o.dyn_ltree[(Se[N]+B+1)*2]++,o.dyn_dtree[Kt(ee)*2]++),o.sym_next===o.sym_end);var Yt=It,zr=nr,Ye=Wt,Vt=Ir,lr=Cr,xr={_tr_init:Yt,_tr_stored_block:zr,_tr_flush_block:Ye,_tr_tally:Vt,_tr_align:lr},Ur=(o,ee,N,be)=>{let ze=o&65535|0,Me=o>>>16&65535|0,Dt=0;for(;N!==0;){Dt=N>2e3?2e3:N,N-=Dt;do ze=ze+ee[be++]|0,Me=Me+ze|0;while(--Dt);ze%=65521,Me%=65521}return ze|Me<<16|0};const yn=()=>{let o,ee=[];for(var N=0;N<256;N++){o=N;for(var be=0;be<8;be++)o=o&1?3988292384^o>>>1:o>>>1;ee[N]=o}return ee},vt=new Uint32Array(yn());var Er=(o,ee,N,be)=>{const ze=vt,Me=be+N;o^=-1;for(let Dt=be;Dt<Me;Dt++)o=o>>>8^ze[(o^ee[Dt])&255];return o^-1},or={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"},as={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_MEM_ERROR:-4,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};const{_tr_init:Ws,_tr_stored_block:Ms,_tr_flush_block:mn,_tr_tally:wn,_tr_align:zt}=xr,{Z_NO_FLUSH:Mr,Z_PARTIAL_FLUSH:Rr,Z_FULL_FLUSH:ws,Z_FINISH:is,Z_BLOCK:ea,Z_OK:Ts,Z_STREAM_END:Za,Z_STREAM_ERROR:qs,Z_DATA_ERROR:$a,Z_BUF_ERROR:Ao,Z_DEFAULT_COMPRESSION:ao,Z_FILTERED:Ge,Z_HUFFMAN_ONLY:ur,Z_RLE:Tr,Z_FIXED:ts,Z_DEFAULT_STRATEGY:Yr,Z_UNKNOWN:Wr,Z_DEFLATED:Sn}=as,En=9,Nn=15,kn=8,un=256+1+29,ba=30,wa=19,Eo=2*un+1,ma=15,ps=3,Na=258,pa=Na+ps+1,zo=32,Va=42,_n=57,Fa=69,Wn=73,Dn=91,Da=103,Qa=113,ga=666,Kn=1,ta=2,Wa=3,va=4,Ja=3,gt=(o,ee)=>(o.msg=or[ee],ee),u=o=>o*2-(o>4?9:0),P=o=>{let ee=o.length;for(;--ee>=0;)o[ee]=0},T=o=>{let ee,N,be,ze=o.w_size;ee=o.hash_size,be=ee;do N=o.head[--be],o.head[be]=N>=ze?N-ze:0;while(--ee);ee=ze,be=ee;do N=o.prev[--be],o.prev[be]=N>=ze?N-ze:0;while(--ee)};let h=(o,ee,N)=>(ee<<o.hash_shift^N)&o.hash_mask;const k=o=>{const ee=o.state;let N=ee.pending;N>o.avail_out&&(N=o.avail_out),N!==0&&(o.output.set(ee.pending_buf.subarray(ee.pending_out,ee.pending_out+N),o.next_out),o.next_out+=N,ee.pending_out+=N,o.total_out+=N,o.avail_out-=N,ee.pending-=N,ee.pending===0&&(ee.pending_out=0))},$=(o,ee)=>{mn(o,o.block_start>=0?o.block_start:-1,o.strstart-o.block_start,ee),o.block_start=o.strstart,k(o.strm)},X=(o,ee)=>{o.pending_buf[o.pending++]=ee},pe=(o,ee)=>{o.pending_buf[o.pending++]=ee>>>8&255,o.pending_buf[o.pending++]=ee&255},Te=(o,ee,N,be)=>{let ze=o.avail_in;return ze>be&&(ze=be),ze===0?0:(o.avail_in-=ze,ee.set(o.input.subarray(o.next_in,o.next_in+ze),N),o.state.wrap===1?o.adler=Ur(o.adler,ee,ze,N):o.state.wrap===2&&(o.adler=Er(o.adler,ee,ze,N)),o.next_in+=ze,o.total_in+=ze,ze)},a=(o,ee)=>{let N=o.max_chain_length,be=o.strstart,ze,Me,Dt=o.prev_length,jt=o.nice_match;const Hr=o.strstart>o.w_size-pa?o.strstart-(o.w_size-pa):0,ut=o.window,Rt=o.w_mask,Cs=o.prev,Dr=o.strstart+Na;let wr=ut[be+Dt-1],fs=ut[be+Dt];o.prev_length>=o.good_match&&(N>>=2),jt>o.lookahead&&(jt=o.lookahead);do if(ze=ee,!(ut[ze+Dt]!==fs||ut[ze+Dt-1]!==wr||ut[ze]!==ut[be]||ut[++ze]!==ut[be+1])){be+=2,ze++;do;while(ut[++be]===ut[++ze]&&ut[++be]===ut[++ze]&&ut[++be]===ut[++ze]&&ut[++be]===ut[++ze]&&ut[++be]===ut[++ze]&&ut[++be]===ut[++ze]&&ut[++be]===ut[++ze]&&ut[++be]===ut[++ze]&&be<Dr);if(Me=Na-(Dr-be),be=Dr-Na,Me>Dt){if(o.match_start=ee,Dt=Me,Me>=jt)break;wr=ut[be+Dt-1],fs=ut[be+Dt]}}while((ee=Cs[ee&Rt])>Hr&&--N!==0);return Dt<=o.lookahead?Dt:o.lookahead},n=o=>{const ee=o.w_size;let N,be,ze;do{if(be=o.window_size-o.lookahead-o.strstart,o.strstart>=ee+(ee-pa)&&(o.window.set(o.window.subarray(ee,ee+ee-be),0),o.match_start-=ee,o.strstart-=ee,o.block_start-=ee,o.insert>o.strstart&&(o.insert=o.strstart),T(o),be+=ee),o.strm.avail_in===0)break;if(N=Te(o.strm,o.window,o.strstart+o.lookahead,be),o.lookahead+=N,o.lookahead+o.insert>=ps)for(ze=o.strstart-o.insert,o.ins_h=o.window[ze],o.ins_h=h(o,o.ins_h,o.window[ze+1]);o.insert&&(o.ins_h=h(o,o.ins_h,o.window[ze+ps-1]),o.prev[ze&o.w_mask]=o.head[o.ins_h],o.head[o.ins_h]=ze,ze++,o.insert--,!(o.lookahead+o.insert<ps)););}while(o.lookahead<pa&&o.strm.avail_in!==0)},l=(o,ee)=>{let N=o.pending_buf_size-5>o.w_size?o.w_size:o.pending_buf_size-5,be,ze,Me,Dt=0,jt=o.strm.avail_in;do{if(be=65535,Me=o.bi_valid+42>>3,o.strm.avail_out<Me||(Me=o.strm.avail_out-Me,ze=o.strstart-o.block_start,be>ze+o.strm.avail_in&&(be=ze+o.strm.avail_in),be>Me&&(be=Me),be<N&&(be===0&&ee!==is||ee===Mr||be!==ze+o.strm.avail_in)))break;Dt=ee===is&&be===ze+o.strm.avail_in?1:0,Ms(o,0,0,Dt),o.pending_buf[o.pending-4]=be,o.pending_buf[o.pending-3]=be>>8,o.pending_buf[o.pending-2]=~be,o.pending_buf[o.pending-1]=~be>>8,k(o.strm),ze&&(ze>be&&(ze=be),o.strm.output.set(o.window.subarray(o.block_start,o.block_start+ze),o.strm.next_out),o.strm.next_out+=ze,o.strm.avail_out-=ze,o.strm.total_out+=ze,o.block_start+=ze,be-=ze),be&&(Te(o.strm,o.strm.output,o.strm.next_out,be),o.strm.next_out+=be,o.strm.avail_out-=be,o.strm.total_out+=be)}while(Dt===0);return jt-=o.strm.avail_in,jt&&(jt>=o.w_size?(o.matches=2,o.window.set(o.strm.input.subarray(o.strm.next_in-o.w_size,o.strm.next_in),0),o.strstart=o.w_size,o.insert=o.strstart):(o.window_size-o.strstart<=jt&&(o.strstart-=o.w_size,o.window.set(o.window.subarray(o.w_size,o.w_size+o.strstart),0),o.matches<2&&o.matches++,o.insert>o.strstart&&(o.insert=o.strstart)),o.window.set(o.strm.input.subarray(o.strm.next_in-jt,o.strm.next_in),o.strstart),o.strstart+=jt,o.insert+=jt>o.w_size-o.insert?o.w_size-o.insert:jt),o.block_start=o.strstart),o.high_water<o.strstart&&(o.high_water=o.strstart),Dt?va:ee!==Mr&&ee!==is&&o.strm.avail_in===0&&o.strstart===o.block_start?ta:(Me=o.window_size-o.strstart,o.strm.avail_in>Me&&o.block_start>=o.w_size&&(o.block_start-=o.w_size,o.strstart-=o.w_size,o.window.set(o.window.subarray(o.w_size,o.w_size+o.strstart),0),o.matches<2&&o.matches++,Me+=o.w_size,o.insert>o.strstart&&(o.insert=o.strstart)),Me>o.strm.avail_in&&(Me=o.strm.avail_in),Me&&(Te(o.strm,o.window,o.strstart,Me),o.strstart+=Me,o.insert+=Me>o.w_size-o.insert?o.w_size-o.insert:Me),o.high_water<o.strstart&&(o.high_water=o.strstart),Me=o.bi_valid+42>>3,Me=o.pending_buf_size-Me>65535?65535:o.pending_buf_size-Me,N=Me>o.w_size?o.w_size:Me,ze=o.strstart-o.block_start,(ze>=N||(ze||ee===is)&&ee!==Mr&&o.strm.avail_in===0&&ze<=Me)&&(be=ze>Me?Me:ze,Dt=ee===is&&o.strm.avail_in===0&&be===ze?1:0,Ms(o,o.block_start,be,Dt),o.block_start+=be,k(o.strm)),Dt?Wa:Kn)},p=(o,ee)=>{let N,be;for(;;){if(o.lookahead<pa){if(n(o),o.lookahead<pa&&ee===Mr)return Kn;if(o.lookahead===0)break}if(N=0,o.lookahead>=ps&&(o.ins_h=h(o,o.ins_h,o.window[o.strstart+ps-1]),N=o.prev[o.strstart&o.w_mask]=o.head[o.ins_h],o.head[o.ins_h]=o.strstart),N!==0&&o.strstart-N<=o.w_size-pa&&(o.match_length=a(o,N)),o.match_length>=ps)if(be=wn(o,o.strstart-o.match_start,o.match_length-ps),o.lookahead-=o.match_length,o.match_length<=o.max_lazy_match&&o.lookahead>=ps){o.match_length--;do o.strstart++,o.ins_h=h(o,o.ins_h,o.window[o.strstart+ps-1]),N=o.prev[o.strstart&o.w_mask]=o.head[o.ins_h],o.head[o.ins_h]=o.strstart;while(--o.match_length!==0);o.strstart++}else o.strstart+=o.match_length,o.match_length=0,o.ins_h=o.window[o.strstart],o.ins_h=h(o,o.ins_h,o.window[o.strstart+1]);else be=wn(o,0,o.window[o.strstart]),o.lookahead--,o.strstart++;if(be&&($(o,!1),o.strm.avail_out===0))return Kn}return o.insert=o.strstart<ps-1?o.strstart:ps-1,ee===is?($(o,!0),o.strm.avail_out===0?Wa:va):o.sym_next&&($(o,!1),o.strm.avail_out===0)?Kn:ta},b=(o,ee)=>{let N,be,ze;for(;;){if(o.lookahead<pa){if(n(o),o.lookahead<pa&&ee===Mr)return Kn;if(o.lookahead===0)break}if(N=0,o.lookahead>=ps&&(o.ins_h=h(o,o.ins_h,o.window[o.strstart+ps-1]),N=o.prev[o.strstart&o.w_mask]=o.head[o.ins_h],o.head[o.ins_h]=o.strstart),o.prev_length=o.match_length,o.prev_match=o.match_start,o.match_length=ps-1,N!==0&&o.prev_length<o.max_lazy_match&&o.strstart-N<=o.w_size-pa&&(o.match_length=a(o,N),o.match_length<=5&&(o.strategy===Ge||o.match_length===ps&&o.strstart-o.match_start>4096)&&(o.match_length=ps-1)),o.prev_length>=ps&&o.match_length<=o.prev_length){ze=o.strstart+o.lookahead-ps,be=wn(o,o.strstart-1-o.prev_match,o.prev_length-ps),o.lookahead-=o.prev_length-1,o.prev_length-=2;do++o.strstart<=ze&&(o.ins_h=h(o,o.ins_h,o.window[o.strstart+ps-1]),N=o.prev[o.strstart&o.w_mask]=o.head[o.ins_h],o.head[o.ins_h]=o.strstart);while(--o.prev_length!==0);if(o.match_available=0,o.match_length=ps-1,o.strstart++,be&&($(o,!1),o.strm.avail_out===0))return Kn}else if(o.match_available){if(be=wn(o,0,o.window[o.strstart-1]),be&&$(o,!1),o.strstart++,o.lookahead--,o.strm.avail_out===0)return Kn}else o.match_available=1,o.strstart++,o.lookahead--}return o.match_available&&(be=wn(o,0,o.window[o.strstart-1]),o.match_available=0),o.insert=o.strstart<ps-1?o.strstart:ps-1,ee===is?($(o,!0),o.strm.avail_out===0?Wa:va):o.sym_next&&($(o,!1),o.strm.avail_out===0)?Kn:ta},E=(o,ee)=>{let N,be,ze,Me;const Dt=o.window;for(;;){if(o.lookahead<=Na){if(n(o),o.lookahead<=Na&&ee===Mr)return Kn;if(o.lookahead===0)break}if(o.match_length=0,o.lookahead>=ps&&o.strstart>0&&(ze=o.strstart-1,be=Dt[ze],be===Dt[++ze]&&be===Dt[++ze]&&be===Dt[++ze])){Me=o.strstart+Na;do;while(be===Dt[++ze]&&be===Dt[++ze]&&be===Dt[++ze]&&be===Dt[++ze]&&be===Dt[++ze]&&be===Dt[++ze]&&be===Dt[++ze]&&be===Dt[++ze]&&ze<Me);o.match_length=Na-(Me-ze),o.match_length>o.lookahead&&(o.match_length=o.lookahead)}if(o.match_length>=ps?(N=wn(o,1,o.match_length-ps),o.lookahead-=o.match_length,o.strstart+=o.match_length,o.match_length=0):(N=wn(o,0,o.window[o.strstart]),o.lookahead--,o.strstart++),N&&($(o,!1),o.strm.avail_out===0))return Kn}return o.insert=0,ee===is?($(o,!0),o.strm.avail_out===0?Wa:va):o.sym_next&&($(o,!1),o.strm.avail_out===0)?Kn:ta},V=(o,ee)=>{let N;for(;;){if(o.lookahead===0&&(n(o),o.lookahead===0)){if(ee===Mr)return Kn;break}if(o.match_length=0,N=wn(o,0,o.window[o.strstart]),o.lookahead--,o.strstart++,N&&($(o,!1),o.strm.avail_out===0))return Kn}return o.insert=0,ee===is?($(o,!0),o.strm.avail_out===0?Wa:va):o.sym_next&&($(o,!1),o.strm.avail_out===0)?Kn:ta};function R(o,ee,N,be,ze){this.good_length=o,this.max_lazy=ee,this.nice_length=N,this.max_chain=be,this.func=ze}const F=[new R(0,0,0,0,l),new R(4,4,8,4,p),new R(4,5,16,8,p),new R(4,6,32,32,p),new R(4,4,16,16,b),new R(8,16,32,32,b),new R(8,16,128,128,b),new R(8,32,128,256,b),new R(32,128,258,1024,b),new R(32,258,258,4096,b)],Q=o=>{o.window_size=2*o.w_size,P(o.head),o.max_lazy_match=F[o.level].max_lazy,o.good_match=F[o.level].good_length,o.nice_match=F[o.level].nice_length,o.max_chain_length=F[o.level].max_chain,o.strstart=0,o.block_start=0,o.lookahead=0,o.insert=0,o.match_length=o.prev_length=ps-1,o.match_available=0,o.ins_h=0};function he(){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=Sn,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 Uint16Array(Eo*2),this.dyn_dtree=new Uint16Array((2*ba+1)*2),this.bl_tree=new Uint16Array((2*wa+1)*2),P(this.dyn_ltree),P(this.dyn_dtree),P(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(ma+1),this.heap=new Uint16Array(2*un+1),P(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*un+1),P(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const we=o=>{if(!o)return 1;const ee=o.state;return!ee||ee.strm!==o||ee.status!==Va&&ee.status!==_n&&ee.status!==Fa&&ee.status!==Wn&&ee.status!==Dn&&ee.status!==Da&&ee.status!==Qa&&ee.status!==ga?1:0},Oe=o=>{if(we(o))return gt(o,qs);o.total_in=o.total_out=0,o.data_type=Wr;const ee=o.state;return ee.pending=0,ee.pending_out=0,ee.wrap<0&&(ee.wrap=-ee.wrap),ee.status=ee.wrap===2?_n:ee.wrap?Va:Qa,o.adler=ee.wrap===2?0:1,ee.last_flush=-2,Ws(ee),Ts},K=o=>{const ee=Oe(o);return ee===Ts&&Q(o.state),ee},Je=(o,ee)=>we(o)||o.state.wrap!==2?qs:(o.state.gzhead=ee,Ts),Fe=(o,ee,N,be,ze,Me)=>{if(!o)return qs;let Dt=1;if(ee===ao&&(ee=6),be<0?(Dt=0,be=-be):be>15&&(Dt=2,be-=16),ze<1||ze>En||N!==Sn||be<8||be>15||ee<0||ee>9||Me<0||Me>ts||be===8&&Dt!==1)return gt(o,qs);be===8&&(be=9);const jt=new he;return o.state=jt,jt.strm=o,jt.status=Va,jt.wrap=Dt,jt.gzhead=null,jt.w_bits=be,jt.w_size=1<<jt.w_bits,jt.w_mask=jt.w_size-1,jt.hash_bits=ze+7,jt.hash_size=1<<jt.hash_bits,jt.hash_mask=jt.hash_size-1,jt.hash_shift=~~((jt.hash_bits+ps-1)/ps),jt.window=new Uint8Array(jt.w_size*2),jt.head=new Uint16Array(jt.hash_size),jt.prev=new Uint16Array(jt.w_size),jt.lit_bufsize=1<<ze+6,jt.pending_buf_size=jt.lit_bufsize*4,jt.pending_buf=new Uint8Array(jt.pending_buf_size),jt.sym_buf=jt.lit_bufsize,jt.sym_end=(jt.lit_bufsize-1)*3,jt.level=ee,jt.strategy=Me,jt.method=N,K(o)},Qe=(o,ee)=>Fe(o,ee,Sn,Nn,kn,Yr),Ae=(o,ee)=>{if(we(o)||ee>ea||ee<0)return o?gt(o,qs):qs;const N=o.state;if(!o.output||o.avail_in!==0&&!o.input||N.status===ga&&ee!==is)return gt(o,o.avail_out===0?Ao:qs);const be=N.last_flush;if(N.last_flush=ee,N.pending!==0){if(k(o),o.avail_out===0)return N.last_flush=-1,Ts}else if(o.avail_in===0&&u(ee)<=u(be)&&ee!==is)return gt(o,Ao);if(N.status===ga&&o.avail_in!==0)return gt(o,Ao);if(N.status===Va&&N.wrap===0&&(N.status=Qa),N.status===Va){let ze=Sn+(N.w_bits-8<<4)<<8,Me=-1;if(N.strategy>=ur||N.level<2?Me=0:N.level<6?Me=1:N.level===6?Me=2:Me=3,ze|=Me<<6,N.strstart!==0&&(ze|=zo),ze+=31-ze%31,pe(N,ze),N.strstart!==0&&(pe(N,o.adler>>>16),pe(N,o.adler&65535)),o.adler=1,N.status=Qa,k(o),N.pending!==0)return N.last_flush=-1,Ts}if(N.status===_n){if(o.adler=0,X(N,31),X(N,139),X(N,8),N.gzhead)X(N,(N.gzhead.text?1:0)+(N.gzhead.hcrc?2:0)+(N.gzhead.extra?4:0)+(N.gzhead.name?8:0)+(N.gzhead.comment?16:0)),X(N,N.gzhead.time&255),X(N,N.gzhead.time>>8&255),X(N,N.gzhead.time>>16&255),X(N,N.gzhead.time>>24&255),X(N,N.level===9?2:N.strategy>=ur||N.level<2?4:0),X(N,N.gzhead.os&255),N.gzhead.extra&&N.gzhead.extra.length&&(X(N,N.gzhead.extra.length&255),X(N,N.gzhead.extra.length>>8&255)),N.gzhead.hcrc&&(o.adler=Er(o.adler,N.pending_buf,N.pending,0)),N.gzindex=0,N.status=Fa;else if(X(N,0),X(N,0),X(N,0),X(N,0),X(N,0),X(N,N.level===9?2:N.strategy>=ur||N.level<2?4:0),X(N,Ja),N.status=Qa,k(o),N.pending!==0)return N.last_flush=-1,Ts}if(N.status===Fa){if(N.gzhead.extra){let ze=N.pending,Me=(N.gzhead.extra.length&65535)-N.gzindex;for(;N.pending+Me>N.pending_buf_size;){let jt=N.pending_buf_size-N.pending;if(N.pending_buf.set(N.gzhead.extra.subarray(N.gzindex,N.gzindex+jt),N.pending),N.pending=N.pending_buf_size,N.gzhead.hcrc&&N.pending>ze&&(o.adler=Er(o.adler,N.pending_buf,N.pending-ze,ze)),N.gzindex+=jt,k(o),N.pending!==0)return N.last_flush=-1,Ts;ze=0,Me-=jt}let Dt=new Uint8Array(N.gzhead.extra);N.pending_buf.set(Dt.subarray(N.gzindex,N.gzindex+Me),N.pending),N.pending+=Me,N.gzhead.hcrc&&N.pending>ze&&(o.adler=Er(o.adler,N.pending_buf,N.pending-ze,ze)),N.gzindex=0}N.status=Wn}if(N.status===Wn){if(N.gzhead.name){let ze=N.pending,Me;do{if(N.pending===N.pending_buf_size){if(N.gzhead.hcrc&&N.pending>ze&&(o.adler=Er(o.adler,N.pending_buf,N.pending-ze,ze)),k(o),N.pending!==0)return N.last_flush=-1,Ts;ze=0}N.gzindex<N.gzhead.name.length?Me=N.gzhead.name.charCodeAt(N.gzindex++)&255:Me=0,X(N,Me)}while(Me!==0);N.gzhead.hcrc&&N.pending>ze&&(o.adler=Er(o.adler,N.pending_buf,N.pending-ze,ze)),N.gzindex=0}N.status=Dn}if(N.status===Dn){if(N.gzhead.comment){let ze=N.pending,Me;do{if(N.pending===N.pending_buf_size){if(N.gzhead.hcrc&&N.pending>ze&&(o.adler=Er(o.adler,N.pending_buf,N.pending-ze,ze)),k(o),N.pending!==0)return N.last_flush=-1,Ts;ze=0}N.gzindex<N.gzhead.comment.length?Me=N.gzhead.comment.charCodeAt(N.gzindex++)&255:Me=0,X(N,Me)}while(Me!==0);N.gzhead.hcrc&&N.pending>ze&&(o.adler=Er(o.adler,N.pending_buf,N.pending-ze,ze))}N.status=Da}if(N.status===Da){if(N.gzhead.hcrc){if(N.pending+2>N.pending_buf_size&&(k(o),N.pending!==0))return N.last_flush=-1,Ts;X(N,o.adler&255),X(N,o.adler>>8&255),o.adler=0}if(N.status=Qa,k(o),N.pending!==0)return N.last_flush=-1,Ts}if(o.avail_in!==0||N.lookahead!==0||ee!==Mr&&N.status!==ga){let ze=N.level===0?l(N,ee):N.strategy===ur?V(N,ee):N.strategy===Tr?E(N,ee):F[N.level].func(N,ee);if((ze===Wa||ze===va)&&(N.status=ga),ze===Kn||ze===Wa)return o.avail_out===0&&(N.last_flush=-1),Ts;if(ze===ta&&(ee===Rr?zt(N):ee!==ea&&(Ms(N,0,0,!1),ee===ws&&(P(N.head),N.lookahead===0&&(N.strstart=0,N.block_start=0,N.insert=0))),k(o),o.avail_out===0))return N.last_flush=-1,Ts}return ee!==is?Ts:N.wrap<=0?Za:(N.wrap===2?(X(N,o.adler&255),X(N,o.adler>>8&255),X(N,o.adler>>16&255),X(N,o.adler>>24&255),X(N,o.total_in&255),X(N,o.total_in>>8&255),X(N,o.total_in>>16&255),X(N,o.total_in>>24&255)):(pe(N,o.adler>>>16),pe(N,o.adler&65535)),k(o),N.wrap>0&&(N.wrap=-N.wrap),N.pending!==0?Ts:Za)},ct=o=>{if(we(o))return qs;const ee=o.state.status;return o.state=null,ee===Qa?gt(o,$a):Ts},Ct=(o,ee)=>{let N=ee.length;if(we(o))return qs;const be=o.state,ze=be.wrap;if(ze===2||ze===1&&be.status!==Va||be.lookahead)return qs;if(ze===1&&(o.adler=Ur(o.adler,ee,N,0)),be.wrap=0,N>=be.w_size){ze===0&&(P(be.head),be.strstart=0,be.block_start=0,be.insert=0);let Hr=new Uint8Array(be.w_size);Hr.set(ee.subarray(N-be.w_size,N),0),ee=Hr,N=be.w_size}const Me=o.avail_in,Dt=o.next_in,jt=o.input;for(o.avail_in=N,o.next_in=0,o.input=ee,n(be);be.lookahead>=ps;){let Hr=be.strstart,ut=be.lookahead-(ps-1);do be.ins_h=h(be,be.ins_h,be.window[Hr+ps-1]),be.prev[Hr&be.w_mask]=be.head[be.ins_h],be.head[be.ins_h]=Hr,Hr++;while(--ut);be.strstart=Hr,be.lookahead=ps-1,n(be)}return be.strstart+=be.lookahead,be.block_start=be.strstart,be.insert=be.lookahead,be.lookahead=0,be.match_length=be.prev_length=ps-1,be.match_available=0,o.next_in=Dt,o.input=jt,o.avail_in=Me,be.wrap=ze,Ts};var nt=Qe,Ce=Fe,bt=K,Gt=Oe,Et=Je,dt=Ae,$t=ct,ke=Ct,Re="pako deflate (from Nodeca project)",at={deflateInit:nt,deflateInit2:Ce,deflateReset:bt,deflateResetKeep:Gt,deflateSetHeader:Et,deflate:dt,deflateEnd:$t,deflateSetDictionary:ke,deflateInfo:Re};const ot=(o,ee)=>Object.prototype.hasOwnProperty.call(o,ee);var Ut=function(o){const ee=Array.prototype.slice.call(arguments,1);for(;ee.length;){const N=ee.shift();if(N){if(typeof N!="object")throw new TypeError(N+"must be non-object");for(const be in N)ot(N,be)&&(o[be]=N[be])}}return o},Xt=o=>{let ee=0;for(let be=0,ze=o.length;be<ze;be++)ee+=o[be].length;const N=new Uint8Array(ee);for(let be=0,ze=0,Me=o.length;be<Me;be++){let Dt=o[be];N.set(Dt,ze),ze+=Dt.length}return N},er={assign:Ut,flattenChunks:Xt};let Pt=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{Pt=!1}const Qt=new Uint8Array(256);for(let o=0;o<256;o++)Qt[o]=o>=252?6:o>=248?5:o>=240?4:o>=224?3:o>=192?2:1;Qt[254]=Qt[254]=1;var kr=o=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(o);let ee,N,be,ze,Me,Dt=o.length,jt=0;for(ze=0;ze<Dt;ze++)N=o.charCodeAt(ze),(N&64512)===55296&&ze+1<Dt&&(be=o.charCodeAt(ze+1),(be&64512)===56320&&(N=65536+(N-55296<<10)+(be-56320),ze++)),jt+=N<128?1:N<2048?2:N<65536?3:4;for(ee=new Uint8Array(jt),Me=0,ze=0;Me<jt;ze++)N=o.charCodeAt(ze),(N&64512)===55296&&ze+1<Dt&&(be=o.charCodeAt(ze+1),(be&64512)===56320&&(N=65536+(N-55296<<10)+(be-56320),ze++)),N<128?ee[Me++]=N:N<2048?(ee[Me++]=192|N>>>6,ee[Me++]=128|N&63):N<65536?(ee[Me++]=224|N>>>12,ee[Me++]=128|N>>>6&63,ee[Me++]=128|N&63):(ee[Me++]=240|N>>>18,ee[Me++]=128|N>>>12&63,ee[Me++]=128|N>>>6&63,ee[Me++]=128|N&63);return ee};const Nr=(o,ee)=>{if(ee<65534&&o.subarray&&Pt)return String.fromCharCode.apply(null,o.length===ee?o:o.subarray(0,ee));let N="";for(let be=0;be<ee;be++)N+=String.fromCharCode(o[be]);return N};var xe=(o,ee)=>{const N=ee||o.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(o.subarray(0,ee));let be,ze;const Me=new Array(N*2);for(ze=0,be=0;be<N;){let Dt=o[be++];if(Dt<128){Me[ze++]=Dt;continue}let jt=Qt[Dt];if(jt>4){Me[ze++]=65533,be+=jt-1;continue}for(Dt&=jt===2?31:jt===3?15:7;jt>1&&be<N;)Dt=Dt<<6|o[be++]&63,jt--;if(jt>1){Me[ze++]=65533;continue}Dt<65536?Me[ze++]=Dt:(Dt-=65536,Me[ze++]=55296|Dt>>10&1023,Me[ze++]=56320|Dt&1023)}return Nr(Me,ze)},Ve=(o,ee)=>{ee=ee||o.length,ee>o.length&&(ee=o.length);let N=ee-1;for(;N>=0&&(o[N]&192)===128;)N--;return N<0||N===0?ee:N+Qt[o[N]]>ee?N:ee},qe={string2buf:kr,buf2string:xe,utf8border:Ve};function yt(){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 Nt=yt;const Ot=Object.prototype.toString,{Z_NO_FLUSH:Zt,Z_SYNC_FLUSH:qt,Z_FULL_FLUSH:mr,Z_FINISH:_r,Z_OK:$r,Z_STREAM_END:Kr,Z_DEFAULT_COMPRESSION:ys,Z_DEFAULT_STRATEGY:Ie,Z_DEFLATED:Br}=as;function Fs(o){this.options=er.assign({level:ys,method:Br,chunkSize:16384,windowBits:15,memLevel:8,strategy:Ie},o||{});let ee=this.options;ee.raw&&ee.windowBits>0?ee.windowBits=-ee.windowBits:ee.gzip&&ee.windowBits>0&&ee.windowBits<16&&(ee.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Nt,this.strm.avail_out=0;let N=at.deflateInit2(this.strm,ee.level,ee.method,ee.windowBits,ee.memLevel,ee.strategy);if(N!==$r)throw new Error(or[N]);if(ee.header&&at.deflateSetHeader(this.strm,ee.header),ee.dictionary){let be;if(typeof ee.dictionary=="string"?be=qe.string2buf(ee.dictionary):Ot.call(ee.dictionary)==="[object ArrayBuffer]"?be=new Uint8Array(ee.dictionary):be=ee.dictionary,N=at.deflateSetDictionary(this.strm,be),N!==$r)throw new Error(or[N]);this._dict_set=!0}}Fs.prototype.push=function(o,ee){const N=this.strm,be=this.options.chunkSize;let ze,Me;if(this.ended)return!1;for(ee===~~ee?Me=ee:Me=ee===!0?_r:Zt,typeof o=="string"?N.input=qe.string2buf(o):Ot.call(o)==="[object ArrayBuffer]"?N.input=new Uint8Array(o):N.input=o,N.next_in=0,N.avail_in=N.input.length;;){if(N.avail_out===0&&(N.output=new Uint8Array(be),N.next_out=0,N.avail_out=be),(Me===qt||Me===mr)&&N.avail_out<=6){this.onData(N.output.subarray(0,N.next_out)),N.avail_out=0;continue}if(ze=at.deflate(N,Me),ze===Kr)return N.next_out>0&&this.onData(N.output.subarray(0,N.next_out)),ze=at.deflateEnd(this.strm),this.onEnd(ze),this.ended=!0,ze===$r;if(N.avail_out===0){this.onData(N.output);continue}if(Me>0&&N.next_out>0){this.onData(N.output.subarray(0,N.next_out)),N.avail_out=0;continue}if(N.avail_in===0)break}return!0},Fs.prototype.onData=function(o){this.chunks.push(o)},Fs.prototype.onEnd=function(o){o===$r&&(this.result=er.flattenChunks(this.chunks)),this.chunks=[],this.err=o,this.msg=this.strm.msg};function gs(o,ee){const N=new Fs(ee);if(N.push(o,!0),N.err)throw N.msg||or[N.err];return N.result}function Sr(o,ee){return ee=ee||{},ee.raw=!0,gs(o,ee)}function js(o,ee){return ee=ee||{},ee.gzip=!0,gs(o,ee)}var Zr=Fs,xs=gs,hs=Sr,jn=js,tn={Deflate:Zr,deflate:xs,deflateRaw:hs,gzip:jn};const Ls=16209,sn=16191;var rn=function(ee,N){let be,ze,Me,Dt,jt,Hr,ut,Rt,Cs,Dr,wr,fs,Tn,As,Es,an,Zs,Or,en,ia,ms,ln,Gs,cs;const Ps=ee.state;be=ee.next_in,Gs=ee.input,ze=be+(ee.avail_in-5),Me=ee.next_out,cs=ee.output,Dt=Me-(N-ee.avail_out),jt=Me+(ee.avail_out-257),Hr=Ps.dmax,ut=Ps.wsize,Rt=Ps.whave,Cs=Ps.wnext,Dr=Ps.window,wr=Ps.hold,fs=Ps.bits,Tn=Ps.lencode,As=Ps.distcode,Es=(1<<Ps.lenbits)-1,an=(1<<Ps.distbits)-1;e:do{fs<15&&(wr+=Gs[be++]<<fs,fs+=8,wr+=Gs[be++]<<fs,fs+=8),Zs=Tn[wr&Es];t:for(;;){if(Or=Zs>>>24,wr>>>=Or,fs-=Or,Or=Zs>>>16&255,Or===0)cs[Me++]=Zs&65535;else if(Or&16){en=Zs&65535,Or&=15,Or&&(fs<Or&&(wr+=Gs[be++]<<fs,fs+=8),en+=wr&(1<<Or)-1,wr>>>=Or,fs-=Or),fs<15&&(wr+=Gs[be++]<<fs,fs+=8,wr+=Gs[be++]<<fs,fs+=8),Zs=As[wr&an];r:for(;;){if(Or=Zs>>>24,wr>>>=Or,fs-=Or,Or=Zs>>>16&255,Or&16){if(ia=Zs&65535,Or&=15,fs<Or&&(wr+=Gs[be++]<<fs,fs+=8,fs<Or&&(wr+=Gs[be++]<<fs,fs+=8)),ia+=wr&(1<<Or)-1,ia>Hr){ee.msg="invalid distance too far back",Ps.mode=Ls;break e}if(wr>>>=Or,fs-=Or,Or=Me-Dt,ia>Or){if(Or=ia-Or,Or>Rt&&Ps.sane){ee.msg="invalid distance too far back",Ps.mode=Ls;break e}if(ms=0,ln=Dr,Cs===0){if(ms+=ut-Or,Or<en){en-=Or;do cs[Me++]=Dr[ms++];while(--Or);ms=Me-ia,ln=cs}}else if(Cs<Or){if(ms+=ut+Cs-Or,Or-=Cs,Or<en){en-=Or;do cs[Me++]=Dr[ms++];while(--Or);if(ms=0,Cs<en){Or=Cs,en-=Or;do cs[Me++]=Dr[ms++];while(--Or);ms=Me-ia,ln=cs}}}else if(ms+=Cs-Or,Or<en){en-=Or;do cs[Me++]=Dr[ms++];while(--Or);ms=Me-ia,ln=cs}for(;en>2;)cs[Me++]=ln[ms++],cs[Me++]=ln[ms++],cs[Me++]=ln[ms++],en-=3;en&&(cs[Me++]=ln[ms++],en>1&&(cs[Me++]=ln[ms++]))}else{ms=Me-ia;do cs[Me++]=cs[ms++],cs[Me++]=cs[ms++],cs[Me++]=cs[ms++],en-=3;while(en>2);en&&(cs[Me++]=cs[ms++],en>1&&(cs[Me++]=cs[ms++]))}}else if(Or&64){ee.msg="invalid distance code",Ps.mode=Ls;break e}else{Zs=As[(Zs&65535)+(wr&(1<<Or)-1)];continue r}break}}else if(Or&64)if(Or&32){Ps.mode=sn;break e}else{ee.msg="invalid literal/length code",Ps.mode=Ls;break e}else{Zs=Tn[(Zs&65535)+(wr&(1<<Or)-1)];continue t}break}}while(be<ze&&Me<jt);en=fs>>3,be-=en,fs-=en<<3,wr&=(1<<fs)-1,ee.next_in=be,ee.next_out=Me,ee.avail_in=be<ze?5+(ze-be):5-(be-ze),ee.avail_out=Me<jt?257+(jt-Me):257-(Me-jt),Ps.hold=wr,Ps.bits=fs};const Jr=15,Bs=852,os=592,oa=0,nn=1,Hs=2,Ks=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]),Xn=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,72,78]),vs=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]),Bn=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 ks=(o,ee,N,be,ze,Me,Dt,jt)=>{const Hr=jt.bits;let ut=0,Rt=0,Cs=0,Dr=0,wr=0,fs=0,Tn=0,As=0,Es=0,an=0,Zs,Or,en,ia,ms,ln=null,Gs;const cs=new Uint16Array(Jr+1),Ps=new Uint16Array(Jr+1);let io=null,oi,Yo,Oi;for(ut=0;ut<=Jr;ut++)cs[ut]=0;for(Rt=0;Rt<be;Rt++)cs[ee[N+Rt]]++;for(wr=Hr,Dr=Jr;Dr>=1&&cs[Dr]===0;Dr--);if(wr>Dr&&(wr=Dr),Dr===0)return ze[Me++]=1<<24|64<<16|0,ze[Me++]=1<<24|64<<16|0,jt.bits=1,0;for(Cs=1;Cs<Dr&&cs[Cs]===0;Cs++);for(wr<Cs&&(wr=Cs),As=1,ut=1;ut<=Jr;ut++)if(As<<=1,As-=cs[ut],As<0)return-1;if(As>0&&(o===oa||Dr!==1))return-1;for(Ps[1]=0,ut=1;ut<Jr;ut++)Ps[ut+1]=Ps[ut]+cs[ut];for(Rt=0;Rt<be;Rt++)ee[N+Rt]!==0&&(Dt[Ps[ee[N+Rt]]++]=Rt);if(o===oa?(ln=io=Dt,Gs=20):o===nn?(ln=Ks,io=Xn,Gs=257):(ln=vs,io=Bn,Gs=0),an=0,Rt=0,ut=Cs,ms=Me,fs=wr,Tn=0,en=-1,Es=1<<wr,ia=Es-1,o===nn&&Es>Bs||o===Hs&&Es>os)return 1;for(;;){oi=ut-Tn,Dt[Rt]+1<Gs?(Yo=0,Oi=Dt[Rt]):Dt[Rt]>=Gs?(Yo=io[Dt[Rt]-Gs],Oi=ln[Dt[Rt]-Gs]):(Yo=96,Oi=0),Zs=1<<ut-Tn,Or=1<<fs,Cs=Or;do Or-=Zs,ze[ms+(an>>Tn)+Or]=oi<<24|Yo<<16|Oi|0;while(Or!==0);for(Zs=1<<ut-1;an&Zs;)Zs>>=1;if(Zs!==0?(an&=Zs-1,an+=Zs):an=0,Rt++,--cs[ut]===0){if(ut===Dr)break;ut=ee[N+Dt[Rt]]}if(ut>wr&&(an&ia)!==en){for(Tn===0&&(Tn=wr),ms+=Cs,fs=ut-Tn,As=1<<fs;fs+Tn<Dr&&(As-=cs[fs+Tn],!(As<=0));)fs++,As<<=1;if(Es+=1<<fs,o===nn&&Es>Bs||o===Hs&&Es>os)return 1;en=an&ia,ze[en]=wr<<24|fs<<16|ms-Me|0}}return an!==0&&(ze[ms+an]=ut-Tn<<24|64<<16|0),jt.bits=wr,0};const Zn=0,Xs=1,bs=2,{Z_FINISH:pn,Z_BLOCK:Hi,Z_TREES:_a,Z_OK:qa,Z_STREAM_END:si,Z_NEED_DICT:Ns,Z_STREAM_ERROR:Sa,Z_DATA_ERROR:ni,Z_MEM_ERROR:ho,Z_BUF_ERROR:ko,Z_DEFLATED:ra}=as,xa=16180,Ba=16181,Ei=16182,di=16183,_o=16184,$o=16185,Po=16186,To=16187,fo=16188,ki=16189,mo=16190,eo=16191,_i=16192,Gi=16193,Pi=16194,lc=16195,ol=16196,Dl=16197,Bl=16198,to=16199,Ti=16200,Ul=16201,il=16202,zl=16203,$l=16204,Vl=16205,Lo=16206,Yi=16207,cc=16208,Us=16209,Wl=16210,Vo=16211,ll=852,dc=592,Pa=15,ai=o=>(o>>>24&255)+(o>>>8&65280)+((o&65280)<<8)+((o&255)<<24);function uc(){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 ui=o=>{if(!o)return 1;const ee=o.state;return!ee||ee.strm!==o||ee.mode<xa||ee.mode>Vo?1:0},hc=o=>{if(ui(o))return Sa;const ee=o.state;return o.total_in=o.total_out=ee.total=0,o.msg="",ee.wrap&&(o.adler=ee.wrap&1),ee.mode=xa,ee.last=0,ee.havedict=0,ee.flags=-1,ee.dmax=32768,ee.head=null,ee.hold=0,ee.bits=0,ee.lencode=ee.lendyn=new Int32Array(ll),ee.distcode=ee.distdyn=new Int32Array(dc),ee.sane=1,ee.back=-1,qa},Ho=o=>{if(ui(o))return Sa;const ee=o.state;return ee.wsize=0,ee.whave=0,ee.wnext=0,hc(o)},Hl=(o,ee)=>{let N;if(ui(o))return Sa;const be=o.state;return ee<0?(N=0,ee=-ee):(N=(ee>>4)+5,ee<48&&(ee&=15)),ee&&(ee<8||ee>15)?Sa:(be.window!==null&&be.wbits!==ee&&(be.window=null),be.wrap=N,be.wbits=ee,Ho(o))},Gl=(o,ee)=>{if(!o)return Sa;const N=new uc;o.state=N,N.strm=o,N.window=null,N.mode=xa;const be=Hl(o,ee);return be!==qa&&(o.state=null),be},cl=o=>Gl(o,Pa);let Li=!0,Yl,Kl;const Rc=o=>{if(Li){Yl=new Int32Array(512),Kl=new Int32Array(32);let ee=0;for(;ee<144;)o.lens[ee++]=8;for(;ee<256;)o.lens[ee++]=9;for(;ee<280;)o.lens[ee++]=7;for(;ee<288;)o.lens[ee++]=8;for(ks(Xs,o.lens,0,288,Yl,0,o.work,{bits:9}),ee=0;ee<32;)o.lens[ee++]=5;ks(bs,o.lens,0,32,Kl,0,o.work,{bits:5}),Li=!1}o.lencode=Yl,o.lenbits=9,o.distcode=Kl,o.distbits=5},dl=(o,ee,N,be)=>{let ze;const Me=o.state;return Me.window===null&&(Me.wsize=1<<Me.wbits,Me.wnext=0,Me.whave=0,Me.window=new Uint8Array(Me.wsize)),be>=Me.wsize?(Me.window.set(ee.subarray(N-Me.wsize,N),0),Me.wnext=0,Me.whave=Me.wsize):(ze=Me.wsize-Me.wnext,ze>be&&(ze=be),Me.window.set(ee.subarray(N-be,N-be+ze),Me.wnext),be-=ze,be?(Me.window.set(ee.subarray(N-be,N),0),Me.wnext=be,Me.whave=Me.wsize):(Me.wnext+=ze,Me.wnext===Me.wsize&&(Me.wnext=0),Me.whave<Me.wsize&&(Me.whave+=ze))),0},fc=(o,ee)=>{let N,be,ze,Me,Dt,jt,Hr,ut,Rt,Cs,Dr,wr,fs,Tn,As=0,Es,an,Zs,Or,en,ia,ms,ln;const Gs=new Uint8Array(4);let cs,Ps;const io=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(ui(o)||!o.output||!o.input&&o.avail_in!==0)return Sa;N=o.state,N.mode===eo&&(N.mode=_i),Dt=o.next_out,ze=o.output,Hr=o.avail_out,Me=o.next_in,be=o.input,jt=o.avail_in,ut=N.hold,Rt=N.bits,Cs=jt,Dr=Hr,ln=qa;e:for(;;)switch(N.mode){case xa:if(N.wrap===0){N.mode=_i;break}for(;Rt<16;){if(jt===0)break e;jt--,ut+=be[Me++]<<Rt,Rt+=8}if(N.wrap&2&&ut===35615){N.wbits===0&&(N.wbits=15),N.check=0,Gs[0]=ut&255,Gs[1]=ut>>>8&255,N.check=Er(N.check,Gs,2,0),ut=0,Rt=0,N.mode=Ba;break}if(N.head&&(N.head.done=!1),!(N.wrap&1)||(((ut&255)<<8)+(ut>>8))%31){o.msg="incorrect header check",N.mode=Us;break}if((ut&15)!==ra){o.msg="unknown compression method",N.mode=Us;break}if(ut>>>=4,Rt-=4,ms=(ut&15)+8,N.wbits===0&&(N.wbits=ms),ms>15||ms>N.wbits){o.msg="invalid window size",N.mode=Us;break}N.dmax=1<<N.wbits,N.flags=0,o.adler=N.check=1,N.mode=ut&512?ki:eo,ut=0,Rt=0;break;case Ba:for(;Rt<16;){if(jt===0)break e;jt--,ut+=be[Me++]<<Rt,Rt+=8}if(N.flags=ut,(N.flags&255)!==ra){o.msg="unknown compression method",N.mode=Us;break}if(N.flags&57344){o.msg="unknown header flags set",N.mode=Us;break}N.head&&(N.head.text=ut>>8&1),N.flags&512&&N.wrap&4&&(Gs[0]=ut&255,Gs[1]=ut>>>8&255,N.check=Er(N.check,Gs,2,0)),ut=0,Rt=0,N.mode=Ei;case Ei:for(;Rt<32;){if(jt===0)break e;jt--,ut+=be[Me++]<<Rt,Rt+=8}N.head&&(N.head.time=ut),N.flags&512&&N.wrap&4&&(Gs[0]=ut&255,Gs[1]=ut>>>8&255,Gs[2]=ut>>>16&255,Gs[3]=ut>>>24&255,N.check=Er(N.check,Gs,4,0)),ut=0,Rt=0,N.mode=di;case di:for(;Rt<16;){if(jt===0)break e;jt--,ut+=be[Me++]<<Rt,Rt+=8}N.head&&(N.head.xflags=ut&255,N.head.os=ut>>8),N.flags&512&&N.wrap&4&&(Gs[0]=ut&255,Gs[1]=ut>>>8&255,N.check=Er(N.check,Gs,2,0)),ut=0,Rt=0,N.mode=_o;case _o:if(N.flags&1024){for(;Rt<16;){if(jt===0)break e;jt--,ut+=be[Me++]<<Rt,Rt+=8}N.length=ut,N.head&&(N.head.extra_len=ut),N.flags&512&&N.wrap&4&&(Gs[0]=ut&255,Gs[1]=ut>>>8&255,N.check=Er(N.check,Gs,2,0)),ut=0,Rt=0}else N.head&&(N.head.extra=null);N.mode=$o;case $o:if(N.flags&1024&&(wr=N.length,wr>jt&&(wr=jt),wr&&(N.head&&(ms=N.head.extra_len-N.length,N.head.extra||(N.head.extra=new Uint8Array(N.head.extra_len)),N.head.extra.set(be.subarray(Me,Me+wr),ms)),N.flags&512&&N.wrap&4&&(N.check=Er(N.check,be,wr,Me)),jt-=wr,Me+=wr,N.length-=wr),N.length))break e;N.length=0,N.mode=Po;case Po:if(N.flags&2048){if(jt===0)break e;wr=0;do ms=be[Me+wr++],N.head&&ms&&N.length<65536&&(N.head.name+=String.fromCharCode(ms));while(ms&&wr<jt);if(N.flags&512&&N.wrap&4&&(N.check=Er(N.check,be,wr,Me)),jt-=wr,Me+=wr,ms)break e}else N.head&&(N.head.name=null);N.length=0,N.mode=To;case To:if(N.flags&4096){if(jt===0)break e;wr=0;do ms=be[Me+wr++],N.head&&ms&&N.length<65536&&(N.head.comment+=String.fromCharCode(ms));while(ms&&wr<jt);if(N.flags&512&&N.wrap&4&&(N.check=Er(N.check,be,wr,Me)),jt-=wr,Me+=wr,ms)break e}else N.head&&(N.head.comment=null);N.mode=fo;case fo:if(N.flags&512){for(;Rt<16;){if(jt===0)break e;jt--,ut+=be[Me++]<<Rt,Rt+=8}if(N.wrap&4&&ut!==(N.check&65535)){o.msg="header crc mismatch",N.mode=Us;break}ut=0,Rt=0}N.head&&(N.head.hcrc=N.flags>>9&1,N.head.done=!0),o.adler=N.check=0,N.mode=eo;break;case ki:for(;Rt<32;){if(jt===0)break e;jt--,ut+=be[Me++]<<Rt,Rt+=8}o.adler=N.check=ai(ut),ut=0,Rt=0,N.mode=mo;case mo:if(N.havedict===0)return o.next_out=Dt,o.avail_out=Hr,o.next_in=Me,o.avail_in=jt,N.hold=ut,N.bits=Rt,Ns;o.adler=N.check=1,N.mode=eo;case eo:if(ee===Hi||ee===_a)break e;case _i:if(N.last){ut>>>=Rt&7,Rt-=Rt&7,N.mode=Lo;break}for(;Rt<3;){if(jt===0)break e;jt--,ut+=be[Me++]<<Rt,Rt+=8}switch(N.last=ut&1,ut>>>=1,Rt-=1,ut&3){case 0:N.mode=Gi;break;case 1:if(Rc(N),N.mode=to,ee===_a){ut>>>=2,Rt-=2;break e}break;case 2:N.mode=ol;break;case 3:o.msg="invalid block type",N.mode=Us}ut>>>=2,Rt-=2;break;case Gi:for(ut>>>=Rt&7,Rt-=Rt&7;Rt<32;){if(jt===0)break e;jt--,ut+=be[Me++]<<Rt,Rt+=8}if((ut&65535)!==(ut>>>16^65535)){o.msg="invalid stored block lengths",N.mode=Us;break}if(N.length=ut&65535,ut=0,Rt=0,N.mode=Pi,ee===_a)break e;case Pi:N.mode=lc;case lc:if(wr=N.length,wr){if(wr>jt&&(wr=jt),wr>Hr&&(wr=Hr),wr===0)break e;ze.set(be.subarray(Me,Me+wr),Dt),jt-=wr,Me+=wr,Hr-=wr,Dt+=wr,N.length-=wr;break}N.mode=eo;break;case ol:for(;Rt<14;){if(jt===0)break e;jt--,ut+=be[Me++]<<Rt,Rt+=8}if(N.nlen=(ut&31)+257,ut>>>=5,Rt-=5,N.ndist=(ut&31)+1,ut>>>=5,Rt-=5,N.ncode=(ut&15)+4,ut>>>=4,Rt-=4,N.nlen>286||N.ndist>30){o.msg="too many length or distance symbols",N.mode=Us;break}N.have=0,N.mode=Dl;case Dl:for(;N.have<N.ncode;){for(;Rt<3;){if(jt===0)break e;jt--,ut+=be[Me++]<<Rt,Rt+=8}N.lens[io[N.have++]]=ut&7,ut>>>=3,Rt-=3}for(;N.have<19;)N.lens[io[N.have++]]=0;if(N.lencode=N.lendyn,N.lenbits=7,cs={bits:N.lenbits},ln=ks(Zn,N.lens,0,19,N.lencode,0,N.work,cs),N.lenbits=cs.bits,ln){o.msg="invalid code lengths set",N.mode=Us;break}N.have=0,N.mode=Bl;case Bl:for(;N.have<N.nlen+N.ndist;){for(;As=N.lencode[ut&(1<<N.lenbits)-1],Es=As>>>24,an=As>>>16&255,Zs=As&65535,!(Es<=Rt);){if(jt===0)break e;jt--,ut+=be[Me++]<<Rt,Rt+=8}if(Zs<16)ut>>>=Es,Rt-=Es,N.lens[N.have++]=Zs;else{if(Zs===16){for(Ps=Es+2;Rt<Ps;){if(jt===0)break e;jt--,ut+=be[Me++]<<Rt,Rt+=8}if(ut>>>=Es,Rt-=Es,N.have===0){o.msg="invalid bit length repeat",N.mode=Us;break}ms=N.lens[N.have-1],wr=3+(ut&3),ut>>>=2,Rt-=2}else if(Zs===17){for(Ps=Es+3;Rt<Ps;){if(jt===0)break e;jt--,ut+=be[Me++]<<Rt,Rt+=8}ut>>>=Es,Rt-=Es,ms=0,wr=3+(ut&7),ut>>>=3,Rt-=3}else{for(Ps=Es+7;Rt<Ps;){if(jt===0)break e;jt--,ut+=be[Me++]<<Rt,Rt+=8}ut>>>=Es,Rt-=Es,ms=0,wr=11+(ut&127),ut>>>=7,Rt-=7}if(N.have+wr>N.nlen+N.ndist){o.msg="invalid bit length repeat",N.mode=Us;break}for(;wr--;)N.lens[N.have++]=ms}}if(N.mode===Us)break;if(N.lens[256]===0){o.msg="invalid code -- missing end-of-block",N.mode=Us;break}if(N.lenbits=9,cs={bits:N.lenbits},ln=ks(Xs,N.lens,0,N.nlen,N.lencode,0,N.work,cs),N.lenbits=cs.bits,ln){o.msg="invalid literal/lengths set",N.mode=Us;break}if(N.distbits=6,N.distcode=N.distdyn,cs={bits:N.distbits},ln=ks(bs,N.lens,N.nlen,N.ndist,N.distcode,0,N.work,cs),N.distbits=cs.bits,ln){o.msg="invalid distances set",N.mode=Us;break}if(N.mode=to,ee===_a)break e;case to:N.mode=Ti;case Ti:if(jt>=6&&Hr>=258){o.next_out=Dt,o.avail_out=Hr,o.next_in=Me,o.avail_in=jt,N.hold=ut,N.bits=Rt,rn(o,Dr),Dt=o.next_out,ze=o.output,Hr=o.avail_out,Me=o.next_in,be=o.input,jt=o.avail_in,ut=N.hold,Rt=N.bits,N.mode===eo&&(N.back=-1);break}for(N.back=0;As=N.lencode[ut&(1<<N.lenbits)-1],Es=As>>>24,an=As>>>16&255,Zs=As&65535,!(Es<=Rt);){if(jt===0)break e;jt--,ut+=be[Me++]<<Rt,Rt+=8}if(an&&!(an&240)){for(Or=Es,en=an,ia=Zs;As=N.lencode[ia+((ut&(1<<Or+en)-1)>>Or)],Es=As>>>24,an=As>>>16&255,Zs=As&65535,!(Or+Es<=Rt);){if(jt===0)break e;jt--,ut+=be[Me++]<<Rt,Rt+=8}ut>>>=Or,Rt-=Or,N.back+=Or}if(ut>>>=Es,Rt-=Es,N.back+=Es,N.length=Zs,an===0){N.mode=Vl;break}if(an&32){N.back=-1,N.mode=eo;break}if(an&64){o.msg="invalid literal/length code",N.mode=Us;break}N.extra=an&15,N.mode=Ul;case Ul:if(N.extra){for(Ps=N.extra;Rt<Ps;){if(jt===0)break e;jt--,ut+=be[Me++]<<Rt,Rt+=8}N.length+=ut&(1<<N.extra)-1,ut>>>=N.extra,Rt-=N.extra,N.back+=N.extra}N.was=N.length,N.mode=il;case il:for(;As=N.distcode[ut&(1<<N.distbits)-1],Es=As>>>24,an=As>>>16&255,Zs=As&65535,!(Es<=Rt);){if(jt===0)break e;jt--,ut+=be[Me++]<<Rt,Rt+=8}if(!(an&240)){for(Or=Es,en=an,ia=Zs;As=N.distcode[ia+((ut&(1<<Or+en)-1)>>Or)],Es=As>>>24,an=As>>>16&255,Zs=As&65535,!(Or+Es<=Rt);){if(jt===0)break e;jt--,ut+=be[Me++]<<Rt,Rt+=8}ut>>>=Or,Rt-=Or,N.back+=Or}if(ut>>>=Es,Rt-=Es,N.back+=Es,an&64){o.msg="invalid distance code",N.mode=Us;break}N.offset=Zs,N.extra=an&15,N.mode=zl;case zl:if(N.extra){for(Ps=N.extra;Rt<Ps;){if(jt===0)break e;jt--,ut+=be[Me++]<<Rt,Rt+=8}N.offset+=ut&(1<<N.extra)-1,ut>>>=N.extra,Rt-=N.extra,N.back+=N.extra}if(N.offset>N.dmax){o.msg="invalid distance too far back",N.mode=Us;break}N.mode=$l;case $l:if(Hr===0)break e;if(wr=Dr-Hr,N.offset>wr){if(wr=N.offset-wr,wr>N.whave&&N.sane){o.msg="invalid distance too far back",N.mode=Us;break}wr>N.wnext?(wr-=N.wnext,fs=N.wsize-wr):fs=N.wnext-wr,wr>N.length&&(wr=N.length),Tn=N.window}else Tn=ze,fs=Dt-N.offset,wr=N.length;wr>Hr&&(wr=Hr),Hr-=wr,N.length-=wr;do ze[Dt++]=Tn[fs++];while(--wr);N.length===0&&(N.mode=Ti);break;case Vl:if(Hr===0)break e;ze[Dt++]=N.length,Hr--,N.mode=Ti;break;case Lo:if(N.wrap){for(;Rt<32;){if(jt===0)break e;jt--,ut|=be[Me++]<<Rt,Rt+=8}if(Dr-=Hr,o.total_out+=Dr,N.total+=Dr,N.wrap&4&&Dr&&(o.adler=N.check=N.flags?Er(N.check,ze,Dr,Dt-Dr):Ur(N.check,ze,Dr,Dt-Dr)),Dr=Hr,N.wrap&4&&(N.flags?ut:ai(ut))!==N.check){o.msg="incorrect data check",N.mode=Us;break}ut=0,Rt=0}N.mode=Yi;case Yi:if(N.wrap&&N.flags){for(;Rt<32;){if(jt===0)break e;jt--,ut+=be[Me++]<<Rt,Rt+=8}if(N.wrap&4&&ut!==(N.total&4294967295)){o.msg="incorrect length check",N.mode=Us;break}ut=0,Rt=0}N.mode=cc;case cc:ln=si;break e;case Us:ln=ni;break e;case Wl:return ho;case Vo:default:return Sa}return o.next_out=Dt,o.avail_out=Hr,o.next_in=Me,o.avail_in=jt,N.hold=ut,N.bits=Rt,(N.wsize||Dr!==o.avail_out&&N.mode<Us&&(N.mode<Lo||ee!==pn))&&dl(o,o.output,o.next_out,Dr-o.avail_out),Cs-=o.avail_in,Dr-=o.avail_out,o.total_in+=Cs,o.total_out+=Dr,N.total+=Dr,N.wrap&4&&Dr&&(o.adler=N.check=N.flags?Er(N.check,ze,Dr,o.next_out-Dr):Ur(N.check,ze,Dr,o.next_out-Dr)),o.data_type=N.bits+(N.last?64:0)+(N.mode===eo?128:0)+(N.mode===to||N.mode===Pi?256:0),(Cs===0&&Dr===0||ee===pn)&&ln===qa&&(ln=ko),ln},Go=o=>{if(ui(o))return Sa;let ee=o.state;return ee.window&&(ee.window=null),o.state=null,qa},Mc=(o,ee)=>{if(ui(o))return Sa;const N=o.state;return N.wrap&2?(N.head=ee,ee.done=!1,qa):Sa},Ki=(o,ee)=>{const N=ee.length;let be,ze,Me;return ui(o)||(be=o.state,be.wrap!==0&&be.mode!==mo)?Sa:be.mode===mo&&(ze=1,ze=Ur(ze,ee,N,0),ze!==be.check)?ni:(Me=dl(o,ee,N,N),Me?(be.mode=Wl,ho):(be.havedict=1,qa))};var Xl=Ho,Fc=Hl,Is=hc,Dc=cl,Bc=Gl,Uc=fc,hi=Go,fi=Mc,zc=Ki,$c="pako inflate (from Nodeca project)",oo={inflateReset:Xl,inflateReset2:Fc,inflateResetKeep:Is,inflateInit:Dc,inflateInit2:Bc,inflate:Uc,inflateEnd:hi,inflateGetHeader:fi,inflateSetDictionary:zc,inflateInfo:$c};function Zl(){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 Xi=Zl;const mc=Object.prototype.toString,{Z_NO_FLUSH:mi,Z_FINISH:Vc,Z_OK:pi,Z_STREAM_END:Zi,Z_NEED_DICT:ul,Z_STREAM_ERROR:gi,Z_DATA_ERROR:hl,Z_MEM_ERROR:fl}=as;function vi(o){this.options=er.assign({chunkSize:65536,windowBits:15,to:""},o||{});const ee=this.options;ee.raw&&ee.windowBits>=0&&ee.windowBits<16&&(ee.windowBits=-ee.windowBits,ee.windowBits===0&&(ee.windowBits=-15)),ee.windowBits>=0&&ee.windowBits<16&&!(o&&o.windowBits)&&(ee.windowBits+=32),ee.windowBits>15&&ee.windowBits<48&&(ee.windowBits&15||(ee.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Nt,this.strm.avail_out=0;let N=oo.inflateInit2(this.strm,ee.windowBits);if(N!==pi)throw new Error(or[N]);if(this.header=new Xi,oo.inflateGetHeader(this.strm,this.header),ee.dictionary&&(typeof ee.dictionary=="string"?ee.dictionary=qe.string2buf(ee.dictionary):mc.call(ee.dictionary)==="[object ArrayBuffer]"&&(ee.dictionary=new Uint8Array(ee.dictionary)),ee.raw&&(N=oo.inflateSetDictionary(this.strm,ee.dictionary),N!==pi)))throw new Error(or[N])}vi.prototype.push=function(o,ee){const N=this.strm,be=this.options.chunkSize,ze=this.options.dictionary;let Me,Dt,jt;if(this.ended)return!1;for(ee===~~ee?Dt=ee:Dt=ee===!0?Vc:mi,mc.call(o)==="[object ArrayBuffer]"?N.input=new Uint8Array(o):N.input=o,N.next_in=0,N.avail_in=N.input.length;;){for(N.avail_out===0&&(N.output=new Uint8Array(be),N.next_out=0,N.avail_out=be),Me=oo.inflate(N,Dt),Me===ul&&ze&&(Me=oo.inflateSetDictionary(N,ze),Me===pi?Me=oo.inflate(N,Dt):Me===hl&&(Me=ul));N.avail_in>0&&Me===Zi&&N.state.wrap>0&&o[N.next_in]!==0;)oo.inflateReset(N),Me=oo.inflate(N,Dt);switch(Me){case gi:case hl:case ul:case fl:return this.onEnd(Me),this.ended=!0,!1}if(jt=N.avail_out,N.next_out&&(N.avail_out===0||Me===Zi))if(this.options.to==="string"){let Hr=qe.utf8border(N.output,N.next_out),ut=N.next_out-Hr,Rt=qe.buf2string(N.output,Hr);N.next_out=ut,N.avail_out=be-ut,ut&&N.output.set(N.output.subarray(Hr,Hr+ut),0),this.onData(Rt)}else this.onData(N.output.length===N.next_out?N.output:N.output.subarray(0,N.next_out));if(!(Me===pi&&jt===0)){if(Me===Zi)return Me=oo.inflateEnd(this.strm),this.onEnd(Me),this.ended=!0,!0;if(N.avail_in===0)break}}return!0},vi.prototype.onData=function(o){this.chunks.push(o)},vi.prototype.onEnd=function(o){o===pi&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=er.flattenChunks(this.chunks)),this.chunks=[],this.err=o,this.msg=this.strm.msg};function xi(o,ee){const N=new vi(ee);if(N.push(o),N.err)throw N.msg||or[N.err];return N.result}function Jl(o,ee){return ee=ee||{},ee.raw=!0,xi(o,ee)}var pc=vi,gc=xi,yi=Jl,ji=xi,vc={Inflate:pc,inflate:gc,inflateRaw:yi,ungzip:ji};const{Deflate:Ji,deflate:xc,deflateRaw:L,gzip:ie}=tn,{Inflate:De,inflate:it,inflateRaw:At,ungzip:ir}=vc;var vr=Ji,Qr=xc,rs=L,_s=ie,zs=De,on=it,Jn=At,ya=ir,Pn=as,Ta={Deflate:vr,deflate:Qr,deflateRaw:rs,gzip:_s,Inflate:zs,inflate:on,inflateRaw:Jn,ungzip:ya,constants:Pn}},
vendor: 552 bytes, line 362
362"./node_modules/performance-now/lib/performance-now.js":function(w){(function(){var O,t,f,v,m,y;typeof performance<"u"&&performance!==null&&performance.now?w.exports=function(){return performance.now()}:typeof process<"u"&&process!==null&&process.hrtime?(w.exports=function(){return(O()-m)/1e6},t=process.hrtime,O=function(){var C;return C=t(),C[0]*1e9+C[1]},v=O(),y=process.uptime()*1e9,m=v-y):Date.now?(w.exports=function(){return Date.now()-f},f=Date.now()):(w.exports=function(){return new Date().getTime()-f},f=new Date().getTime())}).call(this)},
vendor: 940 bytes, line 362
362"./node_modules/raf/index.js":function(w,O,t){for(var f=t("./node_modules/performance-now/lib/performance-now.js"),v=typeof window>"u"?td:window,m=["moz","webkit"],y="AnimationFrame",C=v["request"+y],S=v["cancel"+y]||v["cancelRequest"+y],g=0;!C&&g<m.length;g++)C=v[m[g]+"Request"+y],S=v[m[g]+"Cancel"+y]||v[m[g]+"CancelRequest"+y];if(!C||!S){var j=0,A=0,I=[],M=1e3/60;C=function(B){if(I.length===0){var W=f(),Y=Math.max(0,M-(W-j));j=Y+W,setTimeout(function(){var J=I.slice(0);I.length=0;for(var le=0;le<J.length;le++)if(!J[le].cancelled)try{J[le].callback(j)}catch(ae){setTimeout(function(){throw ae},0)}},Math.round(Y))}return I.push({handle:++A,callback:B,cancelled:!1}),A},S=function(B){for(var W=0;W<I.length;W++)I[W].handle===B&&(I[W].cancelled=!0)}}w.exports=function(B){return C.call(v,B)},w.exports.cancel=function(){S.apply(v,arguments)},w.exports.polyfill=function(B){B||(B=v),B.requestAnimationFrame=C,B.cancelAnimationFrame=S}},
vendor: 5,045 bytes, line 362
362"./node_modules/rgbcolor/index.js":function(w){w.exports=function(O){this.ok=!1,this.alpha=1,O.charAt(0)=="#"&&(O=O.substr(1,6)),O=O.replace(/ /g,""),O=O.toLowerCase();var 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",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"};O=t[O]||O;for(var f=[{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(g){return[parseInt(g[1]),parseInt(g[2]),parseInt(g[3]),parseFloat(g[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(g){return[parseInt(g[1]),parseInt(g[2]),parseInt(g[3])]}},{re:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,example:["#00ff00","336699"],process:function(g){return[parseInt(g[1],16),parseInt(g[2],16),parseInt(g[3],16)]}},{re:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,example:["#fb0","f0f"],process:function(g){return[parseInt(g[1]+g[1],16),parseInt(g[2]+g[2],16),parseInt(g[3]+g[3],16)]}}],v=0;v<f.length;v++){var m=f[v].re,y=f[v].process,C=m.exec(O);if(C){var S=y(C);this.r=S[0],this.g=S[1],this.b=S[2],S.length>3&&(this.alpha=S[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 g=this.r.toString(16),j=this.g.toString(16),A=this.b.toString(16);return g.length==1&&(g="0"+g),j.length==1&&(j="0"+j),A.length==1&&(A="0"+A),"#"+g+j+A},this.getHelpXML=function(){for(var g=new Array,j=0;j<f.length;j++)for(var A=f[j].example,I=0;I<A.length;I++)g[g.length]=A[I];for(var M in t)g[g.length]=M;var B=document.createElement("ul");B.setAttribute("id","rgbcolor-examples");for(var j=0;j<g.length;j++)try{var W=document.createElement("li"),Y=new RGBColor(g[j]),J=document.createElement("div");J.style.cssText="margin: 3px; border: 1px solid black; background:"+Y.toHex()+"; color:"+Y.toHex(),J.appendChild(document.createTextNode("test"));var le=document.createTextNode(" "+g[j]+" -> "+Y.toRGB()+" -> "+Y.toHex());W.appendChild(J),W.appendChild(le),B.appendChild(W)}catch{}return B}}},
vendor: 7,405 bytes, line 362
362"./node_modules/stackblur-canvas/dist/stackblur-es.js":function(w,O,t){t.r(O),t.d(O,{BlurStack:function(){return M},canvasRGB:function(){return A},canvasRGBA:function(){return g},image:function(){return C},imageDataRGB:function(){return I},imageDataRGBA:function(){return j}});function f(B){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function(W){return typeof W}:f=function(W){return W&&typeof Symbol=="function"&&W.constructor===Symbol&&W!==Symbol.prototype?"symbol":typeof W},f(B)}function v(B,W){if(!(B instanceof W))throw new TypeError("Cannot call a class as a function")}var m=[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],y=[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 C(B,W,Y,J,le,ae){if(typeof B=="string"&&(B=document.getElementById(B)),!(!B||Object.prototype.toString.call(B).slice(8,-1)==="HTMLImageElement"&&!("naturalWidth"in B))){var Z=le?"offset":"natural",oe=B[Z+"Width"],H=B[Z+"Height"];if(Object.prototype.toString.call(B).slice(8,-1)==="ImageBitmap"&&(oe=B.width,H=B.height),typeof W=="string"&&(W=document.getElementById(W)),!(!W||!("getContext"in W))){ae||(W.style.width=oe+"px",W.style.height=H+"px"),W.width=oe,W.height=H;var fe=W.getContext("2d");fe.clearRect(0,0,oe,H),fe.drawImage(B,0,0,B.naturalWidth,B.naturalHeight,0,0,oe,H),!(isNaN(Y)||Y<1)&&(J?g(W,0,0,oe,H,Y):A(W,0,0,oe,H,Y))}}}function S(B,W,Y,J,le){if(typeof B=="string"&&(B=document.getElementById(B)),!B||f(B)!=="object"||!("getContext"in B))throw new TypeError("Expecting canvas with `getContext` method in processCanvasRGB(A) calls!");var ae=B.getContext("2d");try{return ae.getImageData(W,Y,J,le)}catch(Z){throw new Error("unable to access image data: "+Z)}}function g(B,W,Y,J,le,ae){if(!(isNaN(ae)||ae<1)){ae|=0;var Z=S(B,W,Y,J,le);Z=j(Z,W,Y,J,le,ae),B.getContext("2d").putImageData(Z,W,Y)}}function j(B,W,Y,J,le,ae){for(var Z=B.data,oe=2*ae+1,H=J-1,fe=le-1,se=ae+1,de=se*(se+1)/2,q=new M,U=q,ge,Ee=1;Ee<oe;Ee++)U=U.next=new M,Ee===se&&(ge=U);U.next=q;for(var Xe=null,re=null,Pe=0,ye=0,Se=m[ae],Le=y[ae],st=0;st<le;st++){U=q;for(var Ke=Z[ye],rt=Z[ye+1],xt=Z[ye+2],He=Z[ye+3],Tt=0;Tt<se;Tt++)U.r=Ke,U.g=rt,U.b=xt,U.a=He,U=U.next;for(var Kt=0,Jt=0,rr=0,Ht=0,yr=se*Ke,gr=se*rt,Vr=se*xt,jr=se*He,Xr=de*Ke,et=de*rt,ft=de*xt,je=de*He,$e=1;$e<se;$e++){var ht=ye+((H<$e?H:$e)<<2),tt=Z[ht],Ze=Z[ht+1],Ft=Z[ht+2],lt=Z[ht+3],_t=se-$e;Xr+=(U.r=tt)*_t,et+=(U.g=Ze)*_t,ft+=(U.b=Ft)*_t,je+=(U.a=lt)*_t,Kt+=tt,Jt+=Ze,rr+=Ft,Ht+=lt,U=U.next}Xe=q,re=ge;for(var dr=0;dr<J;dr++){var fr=je*Se>>>Le;if(Z[ye+3]=fr,fr!==0){var It=255/fr;Z[ye]=(Xr*Se>>>Le)*It,Z[ye+1]=(et*Se>>>Le)*It,Z[ye+2]=(ft*Se>>>Le)*It}else Z[ye]=Z[ye+1]=Z[ye+2]=0;Xr-=yr,et-=gr,ft-=Vr,je-=jr,yr-=Xe.r,gr-=Xe.g,Vr-=Xe.b,jr-=Xe.a;var nr=dr+ae+1;nr=Pe+(nr<H?nr:H)<<2,Kt+=Xe.r=Z[nr],Jt+=Xe.g=Z[nr+1],rr+=Xe.b=Z[nr+2],Ht+=Xe.a=Z[nr+3],Xr+=Kt,et+=Jt,ft+=rr,je+=Ht,Xe=Xe.next;var Cr=re,Wt=Cr.r,Ir=Cr.g,Yt=Cr.b,zr=Cr.a;yr+=Wt,gr+=Ir,Vr+=Yt,jr+=zr,Kt-=Wt,Jt-=Ir,rr-=Yt,Ht-=zr,re=re.next,ye+=4}Pe+=J}for(var Ye=0;Ye<J;Ye++){ye=Ye<<2;var Vt=Z[ye],lr=Z[ye+1],xr=Z[ye+2],Pr=Z[ye+3],Ur=se*Vt,yn=se*lr,vt=se*xr,Lr=se*Pr,Er=de*Vt,or=de*lr,as=de*xr,Ws=de*Pr;U=q;for(var Ms=0;Ms<se;Ms++)U.r=Vt,U.g=lr,U.b=xr,U.a=Pr,U=U.next;for(var mn=J,wn=0,zt=0,Mr=0,Rr=0,ws=1;ws<=ae;ws++){ye=mn+Ye<<2;var is=se-ws;Er+=(U.r=Vt=Z[ye])*is,or+=(U.g=lr=Z[ye+1])*is,as+=(U.b=xr=Z[ye+2])*is,Ws+=(U.a=Pr=Z[ye+3])*is,Rr+=Vt,wn+=lr,zt+=xr,Mr+=Pr,U=U.next,ws<fe&&(mn+=J)}ye=Ye,Xe=q,re=ge;for(var ea=0;ea<le;ea++){var Ts=ye<<2;Z[Ts+3]=Pr=Ws*Se>>>Le,Pr>0?(Pr=255/Pr,Z[Ts]=(Er*Se>>>Le)*Pr,Z[Ts+1]=(or*Se>>>Le)*Pr,Z[Ts+2]=(as*Se>>>Le)*Pr):Z[Ts]=Z[Ts+1]=Z[Ts+2]=0,Er-=Ur,or-=yn,as-=vt,Ws-=Lr,Ur-=Xe.r,yn-=Xe.g,vt-=Xe.b,Lr-=Xe.a,Ts=Ye+((Ts=ea+se)<fe?Ts:fe)*J<<2,Er+=Rr+=Xe.r=Z[Ts],or+=wn+=Xe.g=Z[Ts+1],as+=zt+=Xe.b=Z[Ts+2],Ws+=Mr+=Xe.a=Z[Ts+3],Xe=Xe.next,Ur+=Vt=re.r,yn+=lr=re.g,vt+=xr=re.b,Lr+=Pr=re.a,Rr-=Vt,wn-=lr,zt-=xr,Mr-=Pr,re=re.next,ye+=J}}return B}function A(B,W,Y,J,le,ae){if(!(isNaN(ae)||ae<1)){ae|=0;var Z=S(B,W,Y,J,le);Z=I(Z,W,Y,J,le,ae),B.getContext("2d").putImageData(Z,W,Y)}}function I(B,W,Y,J,le,ae){for(var Z=B.data,oe=2*ae+1,H=J-1,fe=le-1,se=ae+1,de=se*(se+1)/2,q=new M,U=q,ge,Ee=1;Ee<oe;Ee++)U=U.next=new M,Ee===se&&(ge=U);U.next=q;for(var Xe=null,re=null,Pe=m[ae],ye=y[ae],Se,Le,st=0,Ke=0,rt=0;rt<le;rt++){var xt=Z[Ke],He=Z[Ke+1],Tt=Z[Ke+2],Kt=se*xt,Jt=se*He,rr=se*Tt,Ht=de*xt,yr=de*He,gr=de*Tt;U=q;for(var Vr=0;Vr<se;Vr++)U.r=xt,U.g=He,U.b=Tt,U=U.next;for(var jr=0,Xr=0,et=0,ft=1;ft<se;ft++)Se=Ke+((H<ft?H:ft)<<2),Ht+=(U.r=xt=Z[Se])*(Le=se-ft),yr+=(U.g=He=Z[Se+1])*Le,gr+=(U.b=Tt=Z[Se+2])*Le,jr+=xt,Xr+=He,et+=Tt,U=U.next;Xe=q,re=ge;for(var je=0;je<J;je++)Z[Ke]=Ht*Pe>>>ye,Z[Ke+1]=yr*Pe>>>ye,Z[Ke+2]=gr*Pe>>>ye,Ht-=Kt,yr-=Jt,gr-=rr,Kt-=Xe.r,Jt-=Xe.g,rr-=Xe.b,Se=st+((Se=je+ae+1)<H?Se:H)<<2,jr+=Xe.r=Z[Se],Xr+=Xe.g=Z[Se+1],et+=Xe.b=Z[Se+2],Ht+=jr,yr+=Xr,gr+=et,Xe=Xe.next,Kt+=xt=re.r,Jt+=He=re.g,rr+=Tt=re.b,jr-=xt,Xr-=He,et-=Tt,re=re.next,Ke+=4;st+=J}for(var $e=0;$e<J;$e++){Ke=$e<<2;var ht=Z[Ke],tt=Z[Ke+1],Ze=Z[Ke+2],Ft=se*ht,lt=se*tt,_t=se*Ze,dr=de*ht,fr=de*tt,It=de*Ze;U=q;for(var nr=0;nr<se;nr++)U.r=ht,U.g=tt,U.b=Ze,U=U.next;for(var Cr=0,Wt=0,Ir=0,Yt=1,zr=J;Yt<=ae;Yt++)Ke=zr+$e<<2,dr+=(U.r=ht=Z[Ke])*(Le=se-Yt),fr+=(U.g=tt=Z[Ke+1])*Le,It+=(U.b=Ze=Z[Ke+2])*Le,Cr+=ht,Wt+=tt,Ir+=Ze,U=U.next,Yt<fe&&(zr+=J);Ke=$e,Xe=q,re=ge;for(var Ye=0;Ye<le;Ye++)Se=Ke<<2,Z[Se]=dr*Pe>>>ye,Z[Se+1]=fr*Pe>>>ye,Z[Se+2]=It*Pe>>>ye,dr-=Ft,fr-=lt,It-=_t,Ft-=Xe.r,lt-=Xe.g,_t-=Xe.b,Se=$e+((Se=Ye+se)<fe?Se:fe)*J<<2,dr+=Cr+=Xe.r=Z[Se],fr+=Wt+=Xe.g=Z[Se+1],It+=Ir+=Xe.b=Z[Se+2],Xe=Xe.next,Ft+=ht=re.r,lt+=tt=re.g,_t+=Ze=re.b,Cr-=ht,Wt-=tt,Ir-=Ze,re=re.next,Ke+=J}return B}var M=function B(){v(this,B),this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}},
vendor: 20,790 bytes, lines 362-376
362"./node_modules/svg-pathdata/lib/SVGPathData.module.js":function(w,O,t){t.r(O),t.d(O,{COMMAND_ARG_COUNTS:function(){return fe},SVGPathData:function(){return H},SVGPathDataParser:function(){return oe},SVGPathDataTransformer:function(){return A},encodeSVGPath:function(){return m}});/*! *****************************************************************************
363	Copyright (c) Microsoft Corporation.
364
365	Permission to use, copy, modify, and/or distribute this software for any
366	purpose with or without fee is hereby granted.
367
368	THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
369	REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
370	AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
371	INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
372	LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
373	OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
374	PERFORMANCE OF THIS SOFTWARE.
375	***************************************************************************** */var f=function(se,de){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(q,U){q.__proto__=U}||function(q,U){for(var ge in U)Object.prototype.hasOwnProperty.call(U,ge)&&(q[ge]=U[ge])})(se,de)};function v(se,de){if(typeof de!="function"&&de!==null)throw new TypeError("Class extends value "+String(de)+" is not a constructor or null");function q(){this.constructor=se}f(se,de),se.prototype=de===null?Object.create(de):(q.prototype=de.prototype,new q)}function m(se){var de="";Array.isArray(se)||(se=[se]);for(var q=0;q<se.length;q++){var U=se[q];if(U.type===H.CLOSE_PATH)de+="z";else if(U.type===H.HORIZ_LINE_TO)de+=(U.relative?"h":"H")+U.x;else if(U.type===H.VERT_LINE_TO)de+=(U.relative?"v":"V")+U.y;else if(U.type===H.MOVE_TO)de+=(U.relative?"m":"M")+U.x+" "+U.y;else if(U.type===H.LINE_TO)de+=(U.relative?"l":"L")+U.x+" "+U.y;else if(U.type===H.CURVE_TO)de+=(U.relative?"c":"C")+U.x1+" "+U.y1+" "+U.x2+" "+U.y2+" "+U.x+" "+U.y;else if(U.type===H.SMOOTH_CURVE_TO)de+=(U.relative?"s":"S")+U.x2+" "+U.y2+" "+U.x+" "+U.y;else if(U.type===H.QUAD_TO)de+=(U.relative?"q":"Q")+U.x1+" "+U.y1+" "+U.x+" "+U.y;else if(U.type===H.SMOOTH_QUAD_TO)de+=(U.relative?"t":"T")+U.x+" "+U.y;else{if(U.type!==H.ARC)throw new Error('Unexpected command type "'+U.type+'" at index '+q+".");de+=(U.relative?"a":"A")+U.rX+" "+U.rY+" "+U.xRot+" "+ +U.lArcFlag+" "+ +U.sweepFlag+" "+U.x+" "+U.y}}return de}function y(se,de){var q=se[0],U=se[1];return[q*Math.cos(de)-U*Math.sin(de),q*Math.sin(de)+U*Math.cos(de)]}function C(){for(var se=[],de=0;de<arguments.length;de++)se[de]=arguments[de];for(var q=0;q<se.length;q++)if(typeof se[q]!="number")throw new Error("assertNumbers arguments["+q+"] is not a number. "+typeof se[q]+" == typeof "+se[q]);return!0}var S=Math.PI;function g(se,de,q){se.lArcFlag=se.lArcFlag===0?0:1,se.sweepFlag=se.sweepFlag===0?0:1;var U=se.rX,ge=se.rY,Ee=se.x,Xe=se.y;U=Math.abs(se.rX),ge=Math.abs(se.rY);var re=y([(de-Ee)/2,(q-Xe)/2],-se.xRot/180*S),Pe=re[0],ye=re[1],Se=Math.pow(Pe,2)/Math.pow(U,2)+Math.pow(ye,2)/Math.pow(ge,2);1<Se&&(U*=Math.sqrt(Se),ge*=Math.sqrt(Se)),se.rX=U,se.rY=ge;var Le=Math.pow(U,2)*Math.pow(ye,2)+Math.pow(ge,2)*Math.pow(Pe,2),st=(se.lArcFlag!==se.sweepFlag?1:-1)*Math.sqrt(Math.max(0,(Math.pow(U,2)*Math.pow(ge,2)-Le)/Le)),Ke=U*ye/ge*st,rt=-ge*Pe/U*st,xt=y([Ke,rt],se.xRot/180*S);se.cX=xt[0]+(de+Ee)/2,se.cY=xt[1]+(q+Xe)/2,se.phi1=Math.atan2((ye-rt)/ge,(Pe-Ke)/U),se.phi2=Math.atan2((-ye-rt)/ge,(-Pe-Ke)/U),se.sweepFlag===0&&se.phi2>se.phi1&&(se.phi2-=2*S),se.sweepFlag===1&&se.phi2<se.phi1&&(se.phi2+=2*S),se.phi1*=180/S,se.phi2*=180/S}function j(se,de,q){C(se,de,q);var U=se*se+de*de-q*q;if(0>U)return[];if(U===0)return[[se*q/(se*se+de*de),de*q/(se*se+de*de)]];var ge=Math.sqrt(U);return[[(se*q+de*ge)/(se*se+de*de),(de*q-se*ge)/(se*se+de*de)],[(se*q-de*ge)/(se*se+de*de),(de*q+se*ge)/(se*se+de*de)]]}var A,I=Math.PI/180;function M(se,de,q){return(1-q)*se+q*de}function B(se,de,q,U){return se+Math.cos(U/180*S)*de+Math.sin(U/180*S)*q}function W(se,de,q,U){var ge=1e-6,Ee=de-se,Xe=q-de,re=3*Ee+3*(U-q)-6*Xe,Pe=6*(Xe-Ee),ye=3*Ee;return Math.abs(re)<ge?[-ye/Pe]:function(Se,Le,st){var Ke=Se*Se/4-Le;if(Ke<-st)return[];if(Ke<=st)return[-Se/2];var rt=Math.sqrt(Ke);return[-Se/2-rt,-Se/2+rt]}(Pe/re,ye/re,ge)}function Y(se,de,q,U,ge){var Ee=1-ge;return se*(Ee*Ee*Ee)+de*(3*Ee*Ee*ge)+q*(3*Ee*ge*ge)+U*(ge*ge*ge)}(function(se){function de(){return ge(function(re,Pe,ye){return re.relative&&(re.x1!==void 0&&(re.x1+=Pe),re.y1!==void 0&&(re.y1+=ye),re.x2!==void 0&&(re.x2+=Pe),re.y2!==void 0&&(re.y2+=ye),re.x!==void 0&&(re.x+=Pe),re.y!==void 0&&(re.y+=ye),re.relative=!1),re})}function q(){var re=NaN,Pe=NaN,ye=NaN,Se=NaN;return ge(function(Le,st,Ke){return Le.type&H.SMOOTH_CURVE_TO&&(Le.type=H.CURVE_TO,re=isNaN(re)?st:re,Pe=isNaN(Pe)?Ke:Pe,Le.x1=Le.relative?st-re:2*st-re,Le.y1=Le.relative?Ke-Pe:2*Ke-Pe),Le.type&H.CURVE_TO?(re=Le.relative?st+Le.x2:Le.x2,Pe=Le.relative?Ke+Le.y2:Le.y2):(re=NaN,Pe=NaN),Le.type&H.SMOOTH_QUAD_TO&&(Le.type=H.QUAD_TO,ye=isNaN(ye)?st:ye,Se=isNaN(Se)?Ke:Se,Le.x1=Le.relative?st-ye:2*st-ye,Le.y1=Le.relative?Ke-Se:2*Ke-Se),Le.type&H.QUAD_TO?(ye=Le.relative?st+Le.x1:Le.x1,Se=Le.relative?Ke+Le.y1:Le.y1):(ye=NaN,Se=NaN),Le})}function U(){var re=NaN,Pe=NaN;return ge(function(ye,Se,Le){if(ye.type&H.SMOOTH_QUAD_TO&&(ye.type=H.QUAD_TO,re=isNaN(re)?Se:re,Pe=isNaN(Pe)?Le:Pe,ye.x1=ye.relative?Se-re:2*Se-re,ye.y1=ye.relative?Le-Pe:2*Le-Pe),ye.type&H.QUAD_TO){re=ye.relative?Se+ye.x1:ye.x1,Pe=ye.relative?Le+ye.y1:ye.y1;var st=ye.x1,Ke=ye.y1;ye.type=H.CURVE_TO,ye.x1=((ye.relative?0:Se)+2*st)/3,ye.y1=((ye.relative?0:Le)+2*Ke)/3,ye.x2=(ye.x+2*st)/3,ye.y2=(ye.y+2*Ke)/3}else re=NaN,Pe=NaN;return ye})}function ge(re){var Pe=0,ye=0,Se=NaN,Le=NaN;return function(st){if(isNaN(Se)&&!(st.type&H.MOVE_TO))throw new Error("path must start with moveto");var Ke=re(st,Pe,ye,Se,Le);return st.type&H.CLOSE_PATH&&(Pe=Se,ye=Le),st.x!==void 0&&(Pe=st.relative?Pe+st.x:st.x),st.y!==void 0&&(ye=st.relative?ye+st.y:st.y),st.type&H.MOVE_TO&&(Se=Pe,Le=ye),Ke}}function Ee(re,Pe,ye,Se,Le,st){return C(re,Pe,ye,Se,Le,st),ge(function(Ke,rt,xt,He){var Tt=Ke.x1,Kt=Ke.x2,Jt=Ke.relative&&!isNaN(He),rr=Ke.x!==void 0?Ke.x:Jt?0:rt,Ht=Ke.y!==void 0?Ke.y:Jt?0:xt;function yr(fr){return fr*fr}Ke.type&H.HORIZ_LINE_TO&&Pe!==0&&(Ke.type=H.LINE_TO,Ke.y=Ke.relative?0:xt),Ke.type&H.VERT_LINE_TO&&ye!==0&&(Ke.type=H.LINE_TO,Ke.x=Ke.relative?0:rt),Ke.x!==void 0&&(Ke.x=Ke.x*re+Ht*ye+(Jt?0:Le)),Ke.y!==void 0&&(Ke.y=rr*Pe+Ke.y*Se+(Jt?0:st)),Ke.x1!==void 0&&(Ke.x1=Ke.x1*re+Ke.y1*ye+(Jt?0:Le)),Ke.y1!==void 0&&(Ke.y1=Tt*Pe+Ke.y1*Se+(Jt?0:st)),Ke.x2!==void 0&&(Ke.x2=Ke.x2*re+Ke.y2*ye+(Jt?0:Le)),Ke.y2!==void 0&&(Ke.y2=Kt*Pe+Ke.y2*Se+(Jt?0:st));var gr=re*Se-Pe*ye;if(Ke.xRot!==void 0&&(re!==1||Pe!==0||ye!==0||Se!==1))if(gr===0)delete Ke.rX,delete Ke.rY,delete Ke.xRot,delete Ke.lArcFlag,delete Ke.sweepFlag,Ke.type=H.LINE_TO;else{var Vr=Ke.xRot*Math.PI/180,jr=Math.sin(Vr),Xr=Math.cos(Vr),et=1/yr(Ke.rX),ft=1/yr(Ke.rY),je=yr(Xr)*et+yr(jr)*ft,$e=2*jr*Xr*(et-ft),ht=yr(jr)*et+yr(Xr)*ft,tt=je*Se*Se-$e*Pe*Se+ht*Pe*Pe,Ze=$e*(re*Se+Pe*ye)-2*(je*ye*Se+ht*re*Pe),Ft=je*ye*ye-$e*re*ye+ht*re*re,lt=(Math.atan2(Ze,tt-Ft)+Math.PI)%Math.PI/2,_t=Math.sin(lt),dr=Math.cos(lt);Ke.rX=Math.abs(gr)/Math.sqrt(tt*yr(dr)+Ze*_t*dr+Ft*yr(_t)),Ke.rY=Math.abs(gr)/Math.sqrt(tt*yr(_t)-Ze*_t*dr+Ft*yr(dr)),Ke.xRot=180*lt/Math.PI}return Ke.sweepFlag!==void 0&&0>gr&&(Ke.sweepFlag=+!Ke.sweepFlag),Ke})}function Xe(){return function(re){var Pe={};for(var ye in re)Pe[ye]=re[ye];return Pe}}se.ROUND=function(re){function Pe(ye){return Math.round(ye*re)/re}return re===void 0&&(re=1e13),C(re),function(ye){return ye.x1!==void 0&&(ye.x1=Pe(ye.x1)),ye.y1!==void 0&&(ye.y1=Pe(ye.y1)),ye.x2!==void 0&&(ye.x2=Pe(ye.x2)),ye.y2!==void 0&&(ye.y2=Pe(ye.y2)),ye.x!==void 0&&(ye.x=Pe(ye.x)),ye.y!==void 0&&(ye.y=Pe(ye.y)),ye.rX!==void 0&&(ye.rX=Pe(ye.rX)),ye.rY!==void 0&&(ye.rY=Pe(ye.rY)),ye}},se.TO_ABS=de,se.TO_REL=function(){return ge(function(re,Pe,ye){return re.relative||(re.x1!==void 0&&(re.x1-=Pe),re.y1!==void 0&&(re.y1-=ye),re.x2!==void 0&&(re.x2-=Pe),re.y2!==void 0&&(re.y2-=ye),re.x!==void 0&&(re.x-=Pe),re.y!==void 0&&(re.y-=ye),re.relative=!0),re})},se.NORMALIZE_HVZ=function(re,Pe,ye){return re===void 0&&(re=!0),Pe===void 0&&(Pe=!0),ye===void 0&&(ye=!0),ge(function(Se,Le,st,Ke,rt){if(isNaN(Ke)&&!(Se.type&H.MOVE_TO))throw new Error("path must start with moveto");return Pe&&Se.type&H.HORIZ_LINE_TO&&(Se.type=H.LINE_TO,Se.y=Se.relative?0:st),ye&&Se.type&H.VERT_LINE_TO&&(Se.type=H.LINE_TO,Se.x=Se.relative?0:Le),re&&Se.type&H.CLOSE_PATH&&(Se.type=H.LINE_TO,Se.x=Se.relative?Ke-Le:Ke,Se.y=Se.relative?rt-st:rt),Se.type&H.ARC&&(Se.rX===0||Se.rY===0)&&(Se.type=H.LINE_TO,delete Se.rX,delete Se.rY,delete Se.xRot,delete Se.lArcFlag,delete Se.sweepFlag),Se})},se.NORMALIZE_ST=q,se.QT_TO_C=U,se.INFO=ge,se.SANITIZE=function(re){re===void 0&&(re=0),C(re);var Pe=NaN,ye=NaN,Se=NaN,Le=NaN;return ge(function(st,Ke,rt,xt,He){var Tt=Math.abs,Kt=!1,Jt=0,rr=0;if(st.type&H.SMOOTH_CURVE_TO&&(Jt=isNaN(Pe)?0:Ke-Pe,rr=isNaN(ye)?0:rt-ye),st.type&(H.CURVE_TO|H.SMOOTH_CURVE_TO)?(Pe=st.relative?Ke+st.x2:st.x2,ye=st.relative?rt+st.y2:st.y2):(Pe=NaN,ye=NaN),st.type&H.SMOOTH_QUAD_TO?(Se=isNaN(Se)?Ke:2*Ke-Se,Le=isNaN(Le)?rt:2*rt-Le):st.type&H.QUAD_TO?(Se=st.relative?Ke+st.x1:st.x1,Le=st.relative?rt+st.y1:st.y2):(Se=NaN,Le=NaN),st.type&H.LINE_COMMANDS||st.type&H.ARC&&(st.rX===0||st.rY===0||!st.lArcFlag)||st.type&H.CURVE_TO||st.type&H.SMOOTH_CURVE_TO||st.type&H.QUAD_TO||st.type&H.SMOOTH_QUAD_TO){var Ht=st.x===void 0?0:st.relative?st.x:st.x-Ke,yr=st.y===void 0?0:st.relative?st.y:st.y-rt;Jt=isNaN(Se)?st.x1===void 0?Jt:st.relative?st.x:st.x1-Ke:Se-Ke,rr=isNaN(Le)?st.y1===void 0?rr:st.relative?st.y:st.y1-rt:Le-rt;var gr=st.x2===void 0?0:st.relative?st.x:st.x2-Ke,Vr=st.y2===void 0?0:st.relative?st.y:st.y2-rt;Tt(Ht)<=re&&Tt(yr)<=re&&Tt(Jt)<=re&&Tt(rr)<=re&&Tt(gr)<=re&&Tt(Vr)<=re&&(Kt=!0)}return st.type&H.CLOSE_PATH&&Tt(Ke-xt)<=re&&Tt(rt-He)<=re&&(Kt=!0),Kt?[]:st})},se.MATRIX=Ee,se.ROTATE=function(re,Pe,ye){Pe===void 0&&(Pe=0),ye===void 0&&(ye=0),C(re,Pe,ye);var Se=Math.sin(re),Le=Math.cos(re);return Ee(Le,Se,-Se,Le,Pe-Pe*Le+ye*Se,ye-Pe*Se-ye*Le)},se.TRANSLATE=function(re,Pe){return Pe===void 0&&(Pe=0),C(re,Pe),Ee(1,0,0,1,re,Pe)},se.SCALE=function(re,Pe){return Pe===void 0&&(Pe=re),C(re,Pe),Ee(re,0,0,Pe,0,0)},se.SKEW_X=function(re){return C(re),Ee(1,0,Math.atan(re),1,0,0)},se.SKEW_Y=function(re){return C(re),Ee(1,Math.atan(re),0,1,0,0)},se.X_AXIS_SYMMETRY=function(re){return re===void 0&&(re=0),C(re),Ee(-1,0,0,1,re,0)},se.Y_AXIS_SYMMETRY=function(re){return re===void 0&&(re=0),C(re),Ee(1,0,0,-1,0,re)},se.A_TO_C=function(){return ge(function(re,Pe,ye){return H.ARC===re.type?function(Se,Le,st){var Ke,rt,xt,He;Se.cX||g(Se,Le,st);for(var Tt=Math.min(Se.phi1,Se.phi2),Kt=Math.max(Se.phi1,Se.phi2)-Tt,Jt=Math.ceil(Kt/90),rr=new Array(Jt),Ht=Le,yr=st,gr=0;gr<Jt;gr++){var Vr=M(Se.phi1,Se.phi2,gr/Jt),jr=M(Se.phi1,Se.phi2,(gr+1)/Jt),Xr=jr-Vr,et=4/3*Math.tan(Xr*I/4),ft=[Math.cos(Vr*I)-et*Math.sin(Vr*I),Math.sin(Vr*I)+et*Math.cos(Vr*I)],je=ft[0],$e=ft[1],ht=[Math.cos(jr*I),Math.sin(jr*I)],tt=ht[0],Ze=ht[1],Ft=[tt+et*Math.sin(jr*I),Ze-et*Math.cos(jr*I)],lt=Ft[0],_t=Ft[1];rr[gr]={relative:Se.relative,type:H.CURVE_TO};var dr=function(fr,It){var nr=y([fr*Se.rX,It*Se.rY],Se.xRot),Cr=nr[0],Wt=nr[1];return[Se.cX+Cr,Se.cY+Wt]};Ke=dr(je,$e),rr[gr].x1=Ke[0],rr[gr].y1=Ke[1],rt=dr(lt,_t),rr[gr].x2=rt[0],rr[gr].y2=rt[1],xt=dr(tt,Ze),rr[gr].x=xt[0],rr[gr].y=xt[1],Se.relative&&(rr[gr].x1-=Ht,rr[gr].y1-=yr,rr[gr].x2-=Ht,rr[gr].y2-=yr,rr[gr].x-=Ht,rr[gr].y-=yr),Ht=(He=[rr[gr].x,rr[gr].y])[0],yr=He[1]}return rr}(re,re.relative?0:Pe,re.relative?0:ye):re})},se.ANNOTATE_ARCS=function(){return ge(function(re,Pe,ye){return re.relative&&(Pe=0,ye=0),H.ARC===re.type&&g(re,Pe,ye),re})},se.CLONE=Xe,se.CALCULATE_BOUNDS=function(){var re=function(st){var Ke={};for(var rt in st)Ke[rt]=st[rt];return Ke},Pe=de(),ye=U(),Se=q(),Le=ge(function(st,Ke,rt){var xt=Se(ye(Pe(re(st))));function He(_t){_t>Le.maxX&&(Le.maxX=_t),_t<Le.minX&&(Le.minX=_t)}function Tt(_t){_t>Le.maxY&&(Le.maxY=_t),_t<Le.minY&&(Le.minY=_t)}if(xt.type&H.DRAWING_COMMANDS&&(He(Ke),Tt(rt)),xt.type&H.HORIZ_LINE_TO&&He(xt.x),xt.type&H.VERT_LINE_TO&&Tt(xt.y),xt.type&H.LINE_TO&&(He(xt.x),Tt(xt.y)),xt.type&H.CURVE_TO){He(xt.x),Tt(xt.y);for(var Kt=0,Jt=W(Ke,xt.x1,xt.x2,xt.x);Kt<Jt.length;Kt++)0<(lt=Jt[Kt])&&1>lt&&He(Y(Ke,xt.x1,xt.x2,xt.x,lt));for(var rr=0,Ht=W(rt,xt.y1,xt.y2,xt.y);rr<Ht.length;rr++)0<(lt=Ht[rr])&&1>lt&&Tt(Y(rt,xt.y1,xt.y2,xt.y,lt))}if(xt.type&H.ARC){He(xt.x),Tt(xt.y),g(xt,Ke,rt);for(var yr=xt.xRot/180*Math.PI,gr=Math.cos(yr)*xt.rX,Vr=Math.sin(yr)*xt.rX,jr=-Math.sin(yr)*xt.rY,Xr=Math.cos(yr)*xt.rY,et=xt.phi1<xt.phi2?[xt.phi1,xt.phi2]:-180>xt.phi2?[xt.phi2+360,xt.phi1+360]:[xt.phi2,xt.phi1],ft=et[0],je=et[1],$e=function(_t){var dr=_t[0],fr=_t[1],It=180*Math.atan2(fr,dr)/Math.PI;return It<ft?It+360:It},ht=0,tt=j(jr,-gr,0).map($e);ht<tt.length;ht++)(lt=tt[ht])>ft&&lt<je&&He(B(xt.cX,gr,jr,lt));for(var Ze=0,Ft=j(Xr,-Vr,0).map($e);Ze<Ft.length;Ze++){var lt;(lt=Ft[Ze])>ft&&lt<je&&Tt(B(xt.cY,Vr,Xr,lt))}}return st});return Le.minX=1/0,Le.maxX=-1/0,Le.minY=1/0,Le.maxY=-1/0,Le}})(A||(A={}));var J,le=function(){function se(){}return se.prototype.round=function(de){return this.transform(A.ROUND(de))},se.prototype.toAbs=function(){return this.transform(A.TO_ABS())},se.prototype.toRel=function(){return this.transform(A.TO_REL())},se.prototype.normalizeHVZ=function(de,q,U){return this.transform(A.NORMALIZE_HVZ(de,q,U))},se.prototype.normalizeST=function(){return this.transform(A.NORMALIZE_ST())},se.prototype.qtToC=function(){return this.transform(A.QT_TO_C())},se.prototype.aToC=function(){return this.transform(A.A_TO_C())},se.prototype.sanitize=function(de){return this.transform(A.SANITIZE(de))},se.prototype.translate=function(de,q){return this.transform(A.TRANSLATE(de,q))},se.prototype.scale=function(de,q){return this.transform(A.SCALE(de,q))},se.prototype.rotate=function(de,q,U){return this.transform(A.ROTATE(de,q,U))},se.prototype.matrix=function(de,q,U,ge,Ee,Xe){return this.transform(A.MATRIX(de,q,U,ge,Ee,Xe))},se.prototype.skewX=function(de){return this.transform(A.SKEW_X(de))},se.prototype.skewY=function(de){return this.transform(A.SKEW_Y(de))},se.prototype.xSymmetry=function(de){return this.transform(A.X_AXIS_SYMMETRY(de))},se.prototype.ySymmetry=function(de){return this.transform(A.Y_AXIS_SYMMETRY(de))},se.prototype.annotateArcs=function(){return this.transform(A.ANNOTATE_ARCS())},se}(),ae=function(se){return se===" "||se==="	"||se==="\r"||se===`
376`},Z=function(se){return 48<=se.charCodeAt(0)&&se.charCodeAt(0)<=57},oe=function(se){function de(){var q=se.call(this)||this;return q.curNumber="",q.curCommandType=-1,q.curCommandRelative=!1,q.canParseCommandOrComma=!0,q.curNumberHasExp=!1,q.curNumberHasExpDigits=!1,q.curNumberHasDecimal=!1,q.curArgs=[],q}return v(de,se),de.prototype.finish=function(q){if(q===void 0&&(q=[]),this.parse(" ",q),this.curArgs.length!==0||!this.canParseCommandOrComma)throw new SyntaxError("Unterminated command at the path end.");return q},de.prototype.parse=function(q,U){var ge=this;U===void 0&&(U=[]);for(var Ee=function(Le){U.push(Le),ge.curArgs.length=0,ge.canParseCommandOrComma=!0},Xe=0;Xe<q.length;Xe++){var re=q[Xe],Pe=!(this.curCommandType!==H.ARC||this.curArgs.length!==3&&this.curArgs.length!==4||this.curNumber.length!==1||this.curNumber!=="0"&&this.curNumber!=="1"),ye=Z(re)&&(this.curNumber==="0"&&re==="0"||Pe);if(!Z(re)||ye)if(re!=="e"&&re!=="E")if(re!=="-"&&re!=="+"||!this.curNumberHasExp||this.curNumberHasExpDigits)if(re!=="."||this.curNumberHasExp||this.curNumberHasDecimal||Pe){if(this.curNumber&&this.curCommandType!==-1){var Se=Number(this.curNumber);if(isNaN(Se))throw new SyntaxError("Invalid number ending at "+Xe);if(this.curCommandType===H.ARC){if(this.curArgs.length===0||this.curArgs.length===1){if(0>Se)throw new SyntaxError('Expected positive number, got "'+Se+'" at index "'+Xe+'"')}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 "'+Xe+'"')}this.curArgs.push(Se),this.curArgs.length===fe[this.curCommandType]&&(H.HORIZ_LINE_TO===this.curCommandType?Ee({type:H.HORIZ_LINE_TO,relative:this.curCommandRelative,x:Se}):H.VERT_LINE_TO===this.curCommandType?Ee({type:H.VERT_LINE_TO,relative:this.curCommandRelative,y:Se}):this.curCommandType===H.MOVE_TO||this.curCommandType===H.LINE_TO||this.curCommandType===H.SMOOTH_QUAD_TO?(Ee({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),H.MOVE_TO===this.curCommandType&&(this.curCommandType=H.LINE_TO)):this.curCommandType===H.CURVE_TO?Ee({type:H.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===H.SMOOTH_CURVE_TO?Ee({type:H.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===H.QUAD_TO?Ee({type:H.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===H.ARC&&Ee({type:H.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(!ae(re))if(re===","&&this.canParseCommandOrComma)this.canParseCommandOrComma=!1;else if(re!=="+"&&re!=="-"&&re!==".")if(ye)this.curNumber=re,this.curNumberHasDecimal=!1;else{if(this.curArgs.length!==0)throw new SyntaxError("Unterminated command at index "+Xe+".");if(!this.canParseCommandOrComma)throw new SyntaxError('Unexpected character "'+re+'" at index '+Xe+". Command cannot follow comma");if(this.canParseCommandOrComma=!1,re!=="z"&&re!=="Z")if(re==="h"||re==="H")this.curCommandType=H.HORIZ_LINE_TO,this.curCommandRelative=re==="h";else if(re==="v"||re==="V")this.curCommandType=H.VERT_LINE_TO,this.curCommandRelative=re==="v";else if(re==="m"||re==="M")this.curCommandType=H.MOVE_TO,this.curCommandRelative=re==="m";else if(re==="l"||re==="L")this.curCommandType=H.LINE_TO,this.curCommandRelative=re==="l";else if(re==="c"||re==="C")this.curCommandType=H.CURVE_TO,this.curCommandRelative=re==="c";else if(re==="s"||re==="S")this.curCommandType=H.SMOOTH_CURVE_TO,this.curCommandRelative=re==="s";else if(re==="q"||re==="Q")this.curCommandType=H.QUAD_TO,this.curCommandRelative=re==="q";else if(re==="t"||re==="T")this.curCommandType=H.SMOOTH_QUAD_TO,this.curCommandRelative=re==="t";else{if(re!=="a"&&re!=="A")throw new SyntaxError('Unexpected character "'+re+'" at index '+Xe+".");this.curCommandType=H.ARC,this.curCommandRelative=re==="a"}else U.push({type:H.CLOSE_PATH}),this.canParseCommandOrComma=!0,this.curCommandType=-1}else this.curNumber=re,this.curNumberHasDecimal=re==="."}else this.curNumber+=re,this.curNumberHasDecimal=!0;else this.curNumber+=re;else this.curNumber+=re,this.curNumberHasExp=!0;else this.curNumber+=re,this.curNumberHasExpDigits=this.curNumberHasExp}return U},de.prototype.transform=function(q){return Object.create(this,{parse:{value:function(U,ge){ge===void 0&&(ge=[]);for(var Ee=0,Xe=Object.getPrototypeOf(this).parse.call(this,U);Ee<Xe.length;Ee++){var re=Xe[Ee],Pe=q(re);Array.isArray(Pe)?ge.push.apply(ge,Pe):ge.push(Pe)}return ge}}})},de}(le),H=function(se){function de(q){var U=se.call(this)||this;return U.commands=typeof q=="string"?de.parse(q):q,U}return v(de,se),de.prototype.encode=function(){return de.encode(this.commands)},de.prototype.getBounds=function(){var q=A.CALCULATE_BOUNDS();return this.transform(q),q},de.prototype.transform=function(q){for(var U=[],ge=0,Ee=this.commands;ge<Ee.length;ge++){var Xe=q(Ee[ge]);Array.isArray(Xe)?U.push.apply(U,Xe):U.push(Xe)}return this.commands=U,this},de.encode=function(q){return m(q)},de.parse=function(q){var U=new oe,ge=[];return U.parse(q,ge),U.finish(ge),ge},de.CLOSE_PATH=1,de.MOVE_TO=2,de.HORIZ_LINE_TO=4,de.VERT_LINE_TO=8,de.LINE_TO=16,de.CURVE_TO=32,de.SMOOTH_CURVE_TO=64,de.QUAD_TO=128,de.SMOOTH_QUAD_TO=256,de.ARC=512,de.LINE_COMMANDS=de.LINE_TO|de.HORIZ_LINE_TO|de.VERT_LINE_TO,de.DRAWING_COMMANDS=de.HORIZ_LINE_TO|de.VERT_LINE_TO|de.LINE_TO|de.CURVE_TO|de.SMOOTH_CURVE_TO|de.QUAD_TO|de.SMOOTH_QUAD_TO|de.ARC,de}(le),fe=((J={})[H.MOVE_TO]=2,J[H.LINE_TO]=2,J[H.HORIZ_LINE_TO]=1,J[H.VERT_LINE_TO]=1,J[H.CLOSE_PATH]=0,J[H.QUAD_TO]=4,J[H.SMOOTH_QUAD_TO]=2,J[H.CURVE_TO]=6,J[H.SMOOTH_CURVE_TO]=4,J[H.ARC]=7,J)},
vendor: 1,450 bytes, line 376
376"./src/plugin/hyperlinks.js":function(w,O,t){t.r(O),t("./node_modules/core-js/modules/es.object.to-string.js"),t("./node_modules/core-js/modules/es.string.link.js"),t("./node_modules/core-js/modules/esnext.iterator.constructor.js"),t("./node_modules/core-js/modules/esnext.iterator.for-each.js"),t("./node_modules/core-js/modules/web.dom-collections.for-each.js");var f=t("./src/worker.js"),v=t("./src/utils.js"),m=[],y={toContainer:f.default.prototype.toContainer,toPdf:f.default.prototype.toPdf};f.default.prototype.toContainer=function(){return y.toContainer.call(this).then(function(){if(this.opt.enableLinks){var g=this.prop.container,j=g.querySelectorAll("a"),A=(0,v.unitConvert)(g.getBoundingClientRect(),this.prop.pageSize.k);m=[],Array.prototype.forEach.call(j,function(I){for(var M=I.getClientRects(),B=0;B<M.length;B++){var W=(0,v.unitConvert)(M[B],this.prop.pageSize.k);W.left-=A.left,W.top-=A.top;var Y=Math.floor(W.top/this.prop.pageSize.inner.height)+1,J=this.opt.margin[0]+W.top%this.prop.pageSize.inner.height,le=this.opt.margin[1]+W.left;m.push({page:Y,top:J,left:le,clientRect:W,link:I})}},this)}})},f.default.prototype.toPdf=function(){return y.toPdf.call(this).then(function(){if(this.opt.enableLinks){m.forEach(function(j){this.prop.pdf.setPage(j.page),this.prop.pdf.link(j.left,j.top,j.clientRect.width,j.clientRect.height,{url:j.link.href})},this);var g=this.prop.pdf.internal.getNumberOfPages();this.prop.pdf.setPage(g)}})}},
376"./src/plugin/jspdf-plugin.js":function(w,O,t){t.r(O),t("./node_modules/core-js/modules/es.symbol.js"),t("./node_modules/core-js/modules/es.symbol.description.js"),t("./node_modules/core-js/modules/es.symbol.iterator.js"),t("./node_modules/core-js/modules/es.array.iterator.js"),t("./node_modules/core-js/modules/es.object.to-string.js"),t("./node_modules/core-js/modules/es.string.iterator.js"),t("./node_modules/core-js/modules/web.dom-collections.iterator.js");var f=t("./node_modules/jspdf/dist/jspdf.es.min.js");function v(m){"@babel/helpers - typeof";return v=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},v(m)}f.jsPDF.getPageSize=function(m,y,C){if(v(m)==="object"){var S=m;m=S.orientation,y=S.unit||y,C=S.format||C}y=y||"mm",C=C||"a4",m=(""+(m||"P")).toLowerCase();var g=(""+C).toLowerCase(),j={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(y){case"pt":var A=1;break;case"mm":var A=72/25.4;break;case"cm":var A=72/2.54;break;case"in":var A=72;break;case"px":var A=72/96;break;case"pc":var A=12;break;case"em":var A=12;break;case"ex":var A=6;break;default:throw"Invalid unit: "+y}if(j.hasOwnProperty(g))var I=j[g][1]/A,M=j[g][0]/A;else try{var I=C[1],M=C[0]}catch{throw new Error("Invalid format: "+C)}if(m==="p"||m==="portrait"){if(m="p",M>I){var B=M;M=I,I=B}}else if(m==="l"||m==="landscape"){if(m="l",I>M){var B=M;M=I,I=B}}else throw"Invalid orientation: "+m;var W={width:M,height:I,unit:y,k:A};return W},O.default=f.jsPDF},
vendor: 2,272 bytes, line 376
376"./src/plugin/pagebreaks.js":function(w,O,t){t.r(O),t("./node_modules/core-js/modules/es.array.concat.js"),t("./node_modules/core-js/modules/es.array.join.js"),t("./node_modules/core-js/modules/es.array.slice.js"),t("./node_modules/core-js/modules/es.object.keys.js"),t("./node_modules/core-js/modules/es.object.to-string.js"),t("./node_modules/core-js/modules/esnext.iterator.constructor.js"),t("./node_modules/core-js/modules/esnext.iterator.for-each.js"),t("./node_modules/core-js/modules/web.dom-collections.for-each.js");var f=t("./src/worker.js"),v=t("./src/utils.js"),m={toContainer:f.default.prototype.toContainer};f.default.template.opt.pagebreak={mode:["css","legacy"],before:[],after:[],avoid:[]},f.default.prototype.toContainer=function(){return m.toContainer.call(this).then(function(){var S=this.prop.container,g=this.prop.pageSize.inner.px.height,j=[].concat(this.opt.pagebreak.mode),A={avoidAll:j.indexOf("avoid-all")!==-1,css:j.indexOf("css")!==-1,legacy:j.indexOf("legacy")!==-1},I={},M=this;["before","after","avoid"].forEach(function(Y){var J=A.avoidAll&&Y==="avoid";I[Y]=J?[]:[].concat(M.opt.pagebreak[Y]||[]),I[Y].length>0&&(I[Y]=Array.prototype.slice.call(S.querySelectorAll(I[Y].join(", "))))});var B=S.querySelectorAll(".html2pdf__page-break");B=Array.prototype.slice.call(B);var W=S.querySelectorAll("*");Array.prototype.forEach.call(W,function(J){var le={before:!1,after:A.legacy&&B.indexOf(J)!==-1,avoid:A.avoidAll};if(A.css){var ae=window.getComputedStyle(J),Z=["always","page","left","right"],oe=["avoid","avoid-page"];le={before:le.before||Z.indexOf(ae.breakBefore||ae.pageBreakBefore)!==-1,after:le.after||Z.indexOf(ae.breakAfter||ae.pageBreakAfter)!==-1,avoid:le.avoid||oe.indexOf(ae.breakInside||ae.pageBreakInside)!==-1}}Object.keys(le).forEach(function(U){le[U]=le[U]||I[U].indexOf(J)!==-1});var H=J.getBoundingClientRect();if(le.avoid&&!le.before){var fe=Math.floor(H.top/g),se=Math.floor(H.bottom/g),de=Math.abs(H.bottom-H.top)/g;se!==fe&&de<=1&&(le.before=!0)}if(le.before){var q=(0,v.createElement)("div",{style:{display:"block",height:g-H.top%g+"px"}});J.parentNode.insertBefore(q,J)}if(le.after){var q=(0,v.createElement)("div",{style:{display:"block",height:g-H.bottom%g+"px"}});J.parentNode.insertBefore(q,J.nextSibling)}})})}},
376"./src/snapdom/clone.js":function(w,O,t){t.r(O),t.d(O,{deepCloneBasic:function(){return C}}),t("./node_modules/core-js/modules/es.symbol.js"),t("./node_modules/core-js/modules/es.symbol.description.js"),t("./node_modules/core-js/modules/es.symbol.iterator.js"),t("./node_modules/core-js/modules/es.array.concat.js"),t("./node_modules/core-js/modules/es.array.from.js"),t("./node_modules/core-js/modules/es.array.iterator.js"),t("./node_modules/core-js/modules/es.array.slice.js"),t("./node_modules/core-js/modules/es.function.name.js"),t("./node_modules/core-js/modules/es.object.to-string.js"),t("./node_modules/core-js/modules/es.regexp.exec.js"),t("./node_modules/core-js/modules/es.regexp.test.js"),t("./node_modules/core-js/modules/es.regexp.to-string.js"),t("./node_modules/core-js/modules/es.set.js"),t("./node_modules/core-js/modules/es.string.iterator.js"),t("./node_modules/core-js/modules/esnext.set.add-all.js"),t("./node_modules/core-js/modules/esnext.set.delete-all.js"),t("./node_modules/core-js/modules/esnext.set.difference.js"),t("./node_modules/core-js/modules/esnext.set.every.js"),t("./node_modules/core-js/modules/esnext.set.filter.js"),t("./node_modules/core-js/modules/esnext.set.find.js"),t("./node_modules/core-js/modules/esnext.set.intersection.js"),t("./node_modules/core-js/modules/esnext.set.is-disjoint-from.js"),t("./node_modules/core-js/modules/esnext.set.is-subset-of.js"),t("./node_modules/core-js/modules/esnext.set.is-superset-of.js"),t("./node_modules/core-js/modules/esnext.set.join.js"),t("./node_modules/core-js/modules/esnext.set.map.js"),t("./node_modules/core-js/modules/esnext.set.reduce.js"),t("./node_modules/core-js/modules/esnext.set.some.js"),t("./node_modules/core-js/modules/esnext.set.symmetric-difference.js"),t("./node_modules/core-js/modules/esnext.set.union.js"),t("./node_modules/core-js/modules/web.dom-collections.iterator.js");function f(S,g){var j=typeof Symbol<"u"&&S[Symbol.iterator]||S["@@iterator"];if(!j){if(Array.isArray(S)||(j=v(S))||g){j&&(S=j);var A=0,I=function(){};return{s:I,n:function(){return A>=S.length?{done:!0}:{done:!1,value:S[A++]}},e:function(J){throw J},f:I}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
377In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var M,B=!0,W=!1;return{s:function(){j=j.call(S)},n:function(){var J=j.next();return B=J.done,J},e:function(J){W=!0,M=J},f:function(){try{B||j.return==null||j.return()}finally{if(W)throw M}}}}function v(S,g){if(S){if(typeof S=="string")return m(S,g);var j={}.toString.call(S).slice(8,-1);return j==="Object"&&S.constructor&&(j=S.constructor.name),j==="Map"||j==="Set"?Array.from(S):j==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(j)?m(S,g):void 0}}function m(S,g){(g==null||g>S.length)&&(g=S.length);for(var j=0,A=Array(g);j<g;j++)A[j]=S[j];return A}function y(S,g){try{var j=S.currentSrc||S.src||"";if(!j)return;g.setAttribute("src",j),g.removeAttribute("srcset"),g.removeAttribute("sizes"),g.loading="eager",g.decoding="sync"}catch{}}function C(S){if(!S)throw new Error("Invalid node");var g=new Set,j=null;if(S.nodeType===Node.TEXT_NODE||S.nodeType!==Node.ELEMENT_NODE)return S.cloneNode(!0);if(S.tagName==="IFRAME"){var A=document.createElement("div");return A.style.cssText="width:".concat(S.offsetWidth,"px;height:").concat(S.offsetHeight,"px;background-image:repeating-linear-gradient(45deg,#ddd,#ddd 5px,#f9f9f9 5px,#f9f9f9 10px);display:flex;align-items:center;justify-content:center;font-size:12px;color:#555;border:1px solid #aaa;"),A}if(S.tagName==="CANVAS"){var I=S.toDataURL(),M=document.createElement("img");return M.src=I,M.width=S.width,M.height=S.height,M}var B;try{B=S.cloneNode(!1),S.tagName==="IMG"&&y(S,B)}catch(Tt){throw console.error("[Snapdom] Failed to clone node:",S,Tt),Tt}if(S instanceof HTMLTextAreaElement){B.textContent=S.value,B.value=S.value;var W=S.getBoundingClientRect();return B.style.boxSizing="border-box",B.style.width="".concat(W.width,"px"),B.style.height="".concat(W.height,"px"),B}if(S instanceof HTMLInputElement&&(S.hasAttribute("value")&&(B.value=S.value,B.setAttribute("value",S.value)),S.checked!==void 0&&(B.checked=S.checked,S.checked&&B.setAttribute("checked",""),S.indeterminate&&(B.indeterminate=S.indeterminate))),S instanceof HTMLSelectElement&&(j=S.value),S.shadowRoot){var Y=Array.from(S.shadowRoot.querySelectorAll("slot")).length>0;if(!Y){var J=document.createDocumentFragment(),le=f(S.shadowRoot.childNodes),ae;try{for(le.s();!(ae=le.n()).done;){var Z=ae.value;if(!(Z.nodeType===Node.ELEMENT_NODE&&Z.tagName==="STYLE")){var oe=C(Z);oe&&J.appendChild(oe)}}}catch(Tt){le.e(Tt)}finally{le.f()}B.appendChild(J)}}if(S.tagName==="SLOT"){var H,fe=((H=S.assignedNodes)===null||H===void 0?void 0:H.call(S,{flatten:!0}))||[],se=fe.length>0?fe:Array.from(S.childNodes),de=document.createDocumentFragment(),q=f(se),U;try{for(q.s();!(U=q.n()).done;){var ge=U.value,Ee=C(ge);Ee&&de.appendChild(Ee)}}catch(Tt){q.e(Tt)}finally{q.f()}return de}var Xe=f(S.childNodes),re;try{for(Xe.s();!(re=Xe.n()).done;){var Pe=re.value;if(!g.has(Pe)){var ye=C(Pe);ye&&B.appendChild(ye)}}}catch(Tt){Xe.e(Tt)}finally{Xe.f()}if(j!==null&&B instanceof HTMLSelectElement){B.value=j;var Se=f(B.options),Le;try{for(Se.s();!(Le=Se.n()).done;){var st=Le.value;st.value===j?st.setAttribute("selected",""):st.removeAttribute("selected")}}catch(Tt){Se.e(Tt)}finally{Se.f()}}
377var Ke=S.scrollLeft,rt=S.scrollTop,xt=Ke||rt;if(xt&&B instanceof HTMLElement){B.style.overflow="hidden",B.style.scrollbarWidth="none",B.style.msOverflowStyle="none";var He=document.createElement("div");for(He.style.transform="translate(".concat(-Ke,"px, ").concat(-rt,"px)"),He.style.willChange="transform",He.style.display="inline-block",He.style.width="100%";B.firstChild;)He.appendChild(B.firstChild);B.appendChild(He)}return B}},
377"./src/utils.js":function(w,O,t){t.r(O),t.d(O,{createElement:function(){return y},objType:function(){return m},toPx:function(){return S},unitConvert:function(){return C}}),t("./node_modules/core-js/modules/es.symbol.js"),t("./node_modules/core-js/modules/es.symbol.description.js"),t("./node_modules/core-js/modules/es.symbol.iterator.js"),t("./node_modules/core-js/modules/es.array.iterator.js"),t("./node_modules/core-js/modules/es.number.constructor.js"),t("./node_modules/core-js/modules/es.object.to-string.js"),t("./node_modules/core-js/modules/es.string.iterator.js"),t("./node_modules/core-js/modules/web.dom-collections.iterator.js");var f=t("./node_modules/dompurify/dist/purify.es.mjs");function v(g){"@babel/helpers - typeof";return v=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(j){return typeof j}:function(j){return j&&typeof Symbol=="function"&&j.constructor===Symbol&&j!==Symbol.prototype?"symbol":typeof j},v(g)}var m=function(j){var A=v(j);return A==="undefined"?"undefined":A==="string"||j instanceof String?"string":A==="number"||j instanceof Number?"number":A==="function"||j instanceof Function?"function":j&&j.constructor===Array?"array":j&&j.nodeType===1?"element":A==="object"?"object":"unknown"},y=function(j,A){var I=document.createElement(j);A.className&&(I.className=A.className),A.innerHTML&&(I.innerHTML=f.default.sanitize(A.innerHTML));for(var M in A.style)I.style[M]=A.style[M];return I},C=function(j,A){if(m(j)==="number")return j*72/96/A;var I={};for(var M in j)I[M]=j[M]*72/96/A;return I},S=function(j,A){return Math.floor(j*A/72*96)}},
377"./src/worker.js":function(w,O,t){t.r(O),t("./node_modules/core-js/modules/es.array.concat.js"),t("./node_modules/core-js/modules/es.array.map.js"),t("./node_modules/core-js/modules/es.function.name.js"),t("./node_modules/core-js/modules/es.json.stringify.js"),t("./node_modules/core-js/modules/es.object.assign.js"),t("./node_modules/core-js/modules/es.object.keys.js"),t("./node_modules/core-js/modules/es.object.to-string.js"),t("./node_modules/core-js/modules/es.promise.js"),t("./node_modules/core-js/modules/es.regexp.to-string.js"),t("./node_modules/core-js/modules/esnext.iterator.constructor.js"),t("./node_modules/core-js/modules/esnext.iterator.for-each.js"),t("./node_modules/core-js/modules/esnext.iterator.map.js"),t("./node_modules/core-js/modules/web.dom-collections.for-each.js"),t("./node_modules/core-js/modules/web.timers.js");var f=t("./node_modules/jspdf/dist/jspdf.es.min.js"),v=t("html2canvas"),m=t.n(v),y=t("./src/snapdom/clone.js"),C=t("./src/utils.js"),S=function g(j){var A=Object.assign(g.convert(Promise.resolve()),JSON.parse(JSON.stringify(g.template))),I=g.convert(Promise.resolve(),A);return I=I.setProgress(1,g,1,[g]),I=I.set(j),I};S.prototype=Object.create(Promise.prototype),S.prototype.constructor=S,S.convert=function(j,A){return j.__proto__=A||S.prototype,j},S.template={prop:{src:null,container:null,overlay:null,canvas:null,img:null,pdf:null,pageSize:null},progress:{val:0,state:null,n:0,stack:[]},opt:{filename:"file.pdf",margin:[0,0,0,0],image:{type:"jpeg",quality:.95},enableLinks:!0,html2canvas:{},jsPDF:{}}},S.prototype.from=function(j,A){function I(M){switch((0,C.objType)(M)){case"string":return"string";case"element":return M.nodeName.toLowerCase&&M.nodeName.toLowerCase()==="canvas"?"canvas":"element";default:return"unknown"}}return this.then(function(){switch(A=A||I(j),A){case"string":return this.set({src:(0,C.createElement)("div",{innerHTML:j})});case"element":return this.set({src:j});case"canvas":return this.set({canvas:j});case"img":return this.set({img:j});default:return this.error("Unknown source type.")}})},S.prototype.to=function(j){switch(j){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(){var j=[function(){return this.prop.src||this.error("Cannot duplicate - no source HTML.")},function(){return this.prop.pageSize||this.setPageSize()}];return this.thenList(j).then(function(){var I={position:"fixed",overflow:"hidden",zIndex:1e3,left:0,right:0,bottom:0,top:0,backgroundColor:"rgba(0,0,0,0.8)"},M={position:"absolute",width:this.prop.pageSize.inner.width+this.prop.pageSize.unit,left:0,right:0,top:0,height:"auto",margin:"auto",backgroundColor:"white"};I.opacity=0;var B=(0,y.deepCloneBasic)(this.prop.src);return this.prop.overlay=(0,C.createElement)("div",{className:"html2pdf__overlay",style:I}),this.prop.container=(0,C.createElement)("div",{className:"html2pdf__container",style:M}),this.prop.container.appendChild(B),this.prop.overlay.appendChild(this.prop.container),document.body.appendChild(this.prop.overlay),new Promise(function(W){return setTimeout(W,10)})})},S.prototype.toCanvas=function(){var j=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(j).then(function(){var I=Object.assign({},this.opt.html2canvas);return delete I.onrendered,m()(this.prop.container,I)}).then(function(I){var M=this.opt.html2canvas.onrendered||function(){};M(I),this.prop.canvas=I,document.body.removeChild(this.prop.overlay)})},S.prototype.toImg=function(){var j=[function(){return this.prop.canvas||this.toCanvas()}];return this.thenList(j).then(function(){var I=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=I})},S.prototype.toPdf=function(){var j=[function(){return this.prop.canvas||this.toCanvas()},function(){return this.prop.pageSize||this.setPageSize()}];return this.thenList(j).then(function(){var I=this.prop.canvas,M=this.opt,B=I.height,W=Math.floor(I.width*this.prop.pageSize.inner.ratio),Y=Math.ceil(B/W),J=this.prop.pageSize.inner.height,le=document.createElement("canvas"),ae=le.getContext("2d");le.width=I.width,le.height=W,this.prop.pdf=this.prop.pdf||new f.jsPDF(M.jsPDF);for(var Z=0;Z<Y;Z++){Z===Y-1&&B%W!==0&&(le.height=B%W,J=le.height*this.prop.pageSize.inner.width/le.width);var oe=le.width,H=le.height;ae.fillStyle="white",ae.fillRect(0,0,oe,H),ae.drawImage(I,0,Z*W,oe,H,0,0,oe,H),Z&&this.prop.pdf.addPage();var fe=le.toDataURL("image/"+M.image.type,M.image.quality);this.prop.pdf.addImage(fe,M.image.type,M.margin[1],M.margin[0],this.prop.pageSize.inner.width,J)}})},S.prototype.output=function(j,A,I){return I=I||"pdf",I.toLowerCase()==="img"||I.toLowerCase()==="image"?this.outputImg(j,A):this.outputPdf(j,A)},S.prototype.outputPdf=function(j,A){var I=[function(){return this.prop.pdf||this.toPdf(
vendor: 3,528 bytes, line 377
377)}];return this.thenList(I).then(function(){return this.prop.pdf.output(j,A)})},S.prototype.outputImg=function(j,A){var I=[function(){return this.prop.img||this.toImg()}];return this.thenList(I).then(function(){switch(j){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 "'+j+'" is not supported.'}})},S.prototype.save=function(j){var A=[function(){return this.prop.pdf||this.toPdf()}];return this.thenList(A).set(j?{filename:j}:null).then(function(){this.prop.pdf.save(this.opt.filename)})},S.prototype.set=function(j){if((0,C.objType)(j)!=="object")return this;var A=Object.keys(j||{}).map(function(I){switch(I){case"margin":return this.setMargin.bind(this,j.margin);case"jsPDF":return function(){return this.opt.jsPDF=j.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,j.pageSize);default:return I in S.template.prop?function(){this.prop[I]=j[I]}:function(){this.opt[I]=j[I]}}},this);return this.then(function(){return this.thenList(A)})},S.prototype.get=function(j,A){return this.then(function(){var M=j in S.template.prop?this.prop[j]:this.opt[j];return A?A(M):M})},S.prototype.setMargin=function(j){return this.then(function(){switch((0,C.objType)(j)){case"number":j=[j,j,j,j];case"array":if(j.length===2&&(j=[j[0],j[1],j[0],j[1]]),j.length===4)break;default:return this.error("Invalid margin array.")}this.opt.margin=j}).then(this.setPageSize)},S.prototype.setPageSize=function(j){return this.then(function(){j=j||f.jsPDF.getPageSize(this.opt.jsPDF),j.hasOwnProperty("inner")||(j.inner={width:j.width-this.opt.margin[1]-this.opt.margin[3],height:j.height-this.opt.margin[0]-this.opt.margin[2]},j.inner.px={width:(0,C.toPx)(j.inner.width,j.k),height:(0,C.toPx)(j.inner.height,j.k)},j.inner.ratio=j.inner.height/j.inner.width),this.prop.pageSize=j})},S.prototype.setProgress=function(j,A,I,M){return j!=null&&(this.progress.val=j),A!=null&&(this.progress.state=A),I!=null&&(this.progress.n=I),M!=null&&(this.progress.stack=M),this.progress.ratio=this.progress.val/this.progress.state,this},S.prototype.updateProgress=function(j,A,I,M){return this.setProgress(j?this.progress.val+j:null,A||null,I?this.progress.n+I:null,M?this.progress.stack.concat(M):null)},S.prototype.then=function(j,A){var I=this;return this.thenCore(j,A,function(B,W){return I.updateProgress(null,null,1,[B]),Promise.prototype.then.call(this,function(J){return I.updateProgress(null,B),J}).then(B,W).then(function(J){return I.updateProgress(1),J})})},S.prototype.thenCore=function(j,A,I){I=I||Promise.prototype.then;var M=this;j&&(j=j.bind(M)),A&&(A=A.bind(M));var B=Promise.toString().indexOf("[native code]")!==-1&&Promise.name==="Promise",W=B?M:S.convert(Object.assign({},M),Promise.prototype),Y=I.call(W,j,A);return S.convert(Y,M.__proto__)},S.prototype.thenExternal=function(j,A){return Promise.prototype.then.call(this,j,A)},S.prototype.thenList=function(j){var A=this;return j.forEach(function(M){A=A.thenCore(M)}),A},S.prototype.catch=function(g){g&&(g=g.bind(this));var j=Promise.prototype.catch.call(this,g);return S.convert(j,this)},S.prototype.catchExternal=function(j){return Promise.prototype.catch.call(this,j)},S.prototype.error=function(j){return this.then(function(){throw new Error(j)})},S.prototype.using=S.prototype.set,S.prototype.saveAs=S.prototype.save,S.prototype.export=S.prototype.output,S.prototype.run=S.prototype.then,O.default=S}
377,html2canvas:function(w){w.exports=s}},z={};function te(w){var O=z[w];if(O!==void 0)return O.exports;if(_[w]===void 0){var t=new Error("Cannot find module '"+w+"'");throw t.code="MODULE_NOT_FOUND",t}var f=z[w]={exports:{}};return _[w].call(f.exports,f,f.exports,te),f.exports}(function(){te.n=function(w){var O=w&&w.__esModule?function(){return w.default}:function(){return w};return te.d(O,{a:O}),O}})(),function(){var w=Object.getPrototypeOf?function(t){return Object.getPrototypeOf(t)}:function(t){return t.__proto__},O;te.t=function(t,f){if(f&1&&(t=this(t)),f&8||typeof t=="object"&&t&&(f&4&&t.__esModule||f&16&&typeof t.then=="function"))return t;var v=Object.create(null);te.r(v);var m={};O=O||[null,w({}),w([]),w(w)];for(var y=f&2&&t;(typeof y=="object"||typeof y=="function")&&!~O.indexOf(y);y=w(y))Object.getOwnPropertyNames(y).forEach(function(C){m[C]=function(){return t[C]}});return m.default=function(){return t},te.d(v,m),v}}(),function(){te.d=function(w,O){for(var t in O)te.o(O,t)&&!te.o(w,t)&&Object.defineProperty(w,t,{enumerable:!0,get:O[t]})}}(),function(){te.o=function(w,O){return Object.prototype.hasOwnProperty.call(w,O)}}(),function(){te.r=function(w){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(w,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(w,"__esModule",{value:!0})}}();var ue={};return function(){/*!**********************!*\
378  !*** ./src/index.js ***!
379  \**********************/te.r(ue);var w=te("./src/worker.js");te("./src/plugin/jspdf-plugin.js"),te("./src/plugin/pagebreaks.js"),te("./src/plugin/hyperlinks.js");var O=function t(f,v){var m=new t.Worker(v);return f?m.from(f).save():m};O.Worker=w.default,ue.default=O}(),ue=ue.default,ue}()})})(sp);var Xv=sp.exports;const Zv=pg(Xv),Ua=["#0088FE","#00C49F","#FFBB28","#FF8042","#8884D8"];function Jv({reportType:r,monthlyData:d,yearlyData:s,selectedMonth:_,selectedYear:z}){const{toast:te}=Yn(),ue=ne.useRef(null),w=void 0,O=async()=>{if(console.log("handleDownloadPDF invoked",{logoPath:w,reportRefExists:!!ue.current}),!ue.current){console.warn("reportRef is missing - cannot generate PDF");return}te({title:"Generating PDF",description:"Please wait while the PDF is being generated..."});try{const v=ue.current;await new Promise(g=>setTimeout(g,1500)),v.querySelectorAll(".recharts-wrapper, .recharts-responsive-container").forEach(g=>{const j=g,A=j.getBoundingClientRect();j.offsetHeight,(A.width===0||A.height===0)&&console.warn("Chart not fully rendered:",g,A),j.style.visibility="visible",j.style.display="block",j.style.opacity="1"}),v.querySelectorAll("svg").forEach(g=>{const j=g;j.style.visibility="visible",j.style.display="block"});const C={margin:0,filename:`data-signalling-report-${r==="monthly"?`${_}-${z}`:z}.pdf`,image:{type:"png",quality:1},html2canvas:{scale:2,useCORS:!0,logging:!1,backgroundColor:"#000",scrollX:0,scrollY:0,onclone:g=>{g.documentElement.style.backgroundColor="#000",g.body.style.backgroundColor="#000";const j=g.querySelector(".pdf-root");j&&(console.log("Setting PDF root styles for dark mode and full height"),j.style.backgroundColor="#000",j.style.minHeight="100vh"),g.querySelectorAll(".recharts-wrapper, .recharts-responsive-container, svg").forEach(A=>{const I=A;I.style.visibility="visible",I.style.display="block",I.style.opacity="1"})}},jsPDF:{unit:"mm",format:"a4",orientation:"portrait"},pagebreak:{mode:["css"],avoid:[".avoid-break"]}},S=Zv().set(C).from(v).toPdf().get("pdf").then(async g=>{var W,Y;const j=g.internal.getNumberOfPages(),A=g.internal.pageSize.getWidth(),I=g.internal.pageSize.getHeight();try{const J=((W=g==null?void 0:g.internal)==null?void 0:W.scaleFactor)??1,le=A*J,ae=I*J;for(let Z=1;Z<=j;Z++){const oe=(Y=g.internal.pages)==null?void 0:Y[Z];Array.isArray(oe)&&oe.unshift("q","1 0 0 1 0 0 cm","0 0 0 rg","0 0 0 RG",`0 0 ${le} ${ae} re`,"f","Q")}}catch(J){console.warn("Failed to prepend black background to PDF pages:",J)}let M=null;try{const J="/GOLT_LOGO.png";console.log("Attempting to fetch local favicon for PDF stamping from:",J);const le=await fetch(J);if(!le.ok)throw new Error(`Failed to fetch local favicon: ${le.status}`);const ae=await le.blob(),Z=URL.createObjectURL(ae);try{const oe=await new Promise((re,Pe)=>{const ye=new Image;ye.onload=()=>
379{URL.revokeObjectURL(Z),re(ye)},ye.onerror=Se=>{URL.revokeObjectURL(Z),Pe(Se)},ye.src=Z}),H=document.createElement("canvas"),fe=oe.naturalWidth||80,se=oe.naturalHeight||80,de=24,q=300,U=Math.round(de*q/25.4),ge=se/fe,Ee=Math.round(U*ge);H.width=U,H.height=Ee;const Xe=H.getContext("2d");Xe&&(Xe.imageSmoothingEnabled=!0,Xe.imageSmoothingQuality="high",Xe.drawImage(oe,0,0,H.width,H.height),M=H.toDataURL("image/png"),console.log("Converted favicon blob to PNG data URL for PDF at high DPI",{origW:fe,origH:se,targetPxW:U,targetPxH:Ee,imgDisplayMm:de,DPI:q}))}catch(oe){console.warn("Failed to convert favicon blob to PNG via canvas, falling back to data URL read:",oe),M=await new Promise((H,fe)=>{const se=new FileReader;se.onload=()=>H(se.result),se.onerror=fe,se.readAsDataURL(ae)})}console.log("Using local favicon for PDF logo"),te({title:"Using local logo",description:"Using public/favicon.ico as PDF logo"})}catch(J){console.warn("Local favicon fetch failed:",J)}const B=(J,le)=>{const ae=le/2,Z=15;J.setFont("helvetica","bold"),J.setFontSize(18),J.setTextColor(255,204,128),J.textWithLink("G.O.L.T.ai",ae,Z,{align:"center",url:"https://golt.ai/"}),J.setFont("helvetica","bold"),J.setFontSize(15),J.setTextColor(191,140,64),J.text("Data Signalling Report",ae,Z+8,{align:"center"}),J.setFont("helvetica","normal"),J.setFontSize(11),J.setTextColor(191,140,64);const oe=r==="monthly"?`${_} ${z}`:`Annual Report - ${z}`;J.text(oe,ae,Z+14,{align:"center"}),J.setFontSize(9),J.setTextColor(191,140,64);const H=`Generated on: ${new Date().toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"})}`;J.text(H,ae,Z+19,{align:"center"});const fe=Z+23,se=6,de=.5;J.setDrawColor(120,120,120),J.setLineWidth(.3),J.line(se+de/2,fe,le-se-de/2,fe)};for(let J=1;J<=j;J++){if(g.setPage(J),J>1&&B(g,A),g.setFontSize(10),g.setTextColor(212,175,55),g.setDrawColor(230,170,77),g.setLineWidth(.5),g.rect(6,6,A-12,I-12),M)try{let ae="PNG";(M.startsWith("data:image/jpeg")||M.startsWith("data:image/jpg"))&&(ae="JPEG");const Z=12,oe=14,H=30,fe=24,se=24,de=4,q=Z,U=oe+(H-se)/2-de;try{console.log("Adding logo to PDF ON FIRST PAGE from data URL",{imgFormat:ae,imgW:fe,imgH:se,imgX:q,imgY:U}),g.addImage(M,ae,q,U,fe,se)}catch(ge){console.warn("Failed to add logo to PDF page:",ge)}}catch(ae){console.warn("Failed to add logo to PDF page:",ae)}const le=I-8;g.text(`Page ${J} of ${j}`,10,le,{align:"left"}),g.text("Confidential",A-10,le,{align:"right"})}g.save(`data-signalling-report-${r==="monthly"?`${_}-${z}`:z}.pdf`)});te({title:"PDF Downloaded",description:"Your report has been downloaded successfully."})}catch(v){console.error("PDF generation error:",v),te({title:"Error",description:"Failed to generate PDF. Please try again.",variant:"destructive"})}},t=r==="monthly"?d:s;if(!t)return null;const f=({x:v=0,y:m=0,payload:y})=>{if(!(y!=null&&y.value))return null;const C=String(y.value),S=16,g=3,j=C.split(" "),A=[];let I="";for(const W of j){if(W.length>S){I&&(A.push(I),I=""),A.push(W.slice(0,S));continue}const Y=I?`${I} ${W}`:W;Y.length<=S?I=Y:(A.push(I),I=W)}I&&A.push(I),A.length>g&&(A.length=g,A[g-1]+="…");const M=22,B=14;return e.jsx("text",{x:v,y:m+M,textAnchor:"middle",fontSize:11,fill:"#666",children:A.map((W,Y)=>e.jsx("tspan",{x:v,dy:Y===0?0:B,children:W},Y))})};return e.jsxs(ds,{children:[e.jsxs(Rs,{className:"flex flex-row items-center justify-between",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsx(Bi,{className:"w-5 h-5"}),r==="monthly"?"Monthly":"Yearly"," Report Preview"]}),e.jsx(fa,{children:r==="monthly"?`Data Signalling Report for ${_} ${z}`:`Data Signalling Report for Year ${z}`})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs(We,{variant:"outline",onClick:()=>window.print(),className:"gap-2",children:[e.jsx(ov,{className:"w-4 h-4"}),"Print"]}),e.jsxs(We,{onClick:O,className:"gap-2",children:[e.jsx(jo,{className:"w-4 h-4"}),"Download PDF"]})]})]}),e.jsx(us,{children:e.jsxs("div",{ref:ue,className:"space-y-1 bg-background p-6 pdf-root pdf-content",children:[e.jsxs("div",{className:"text-center border-b pb-2 report-header",style:{pageBreakAfter:"avoid"},children:[e.jsxs("h1",{className:"text-2xl font-bold text-foreground",children:["    ",e.jsx("a",{href:"https://golt.ai/",target:"_blank",rel:"noopener noreferrer",className:"hover:underline",children:"G.O.L.T.ai"})]}),e.jsx("h2",{className:"text-xl font-semibold text-muted-foreground mt-1",children:"Data Signalling Report"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:r==="monthly"?`${_} ${z}`:`Annual Report - ${z}`}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Generated on: ",new Date().toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"})]})]}),e.jsxs("div",{className:"space-y-0.5",style:{pageBreakAfter:"auto",paddingTop:"0px"},children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold mb-0",children:"Top 10 Products"}),e.jsx("div",{className:"h-[250px] w-full max-w-[250mm] mx-auto",style:{minHeight:"250px"},children:e.jsx(sd,{width:"100%",height:"100%",children:e.jsxs(ld,{data:t.to
379p_20_products,margin:{top:20,right:20,left:20,bottom:80},children:[e.jsx(_l,{dataKey:"product_name",tick:e.jsx(f,{}),interval:0}),e.jsx(Pl,{}),e.jsx(nd,{}),e.jsx(Nc,{dataKey:"total_occurrences",radius:[6,6,0,0],children:t.top_20_products.map((v,m)=>e.jsx(ad,{fill:Ua[m%Ua.length]},`cell-${m}`))})]})})})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold ",children:"Product"}),e.jsxs(Rn,{children:[e.jsx(Mn,{children:e.jsxs(Gr,{children:[e.jsx(Lt,{children:"Product"}),e.jsx(Lt,{className:"text-right",children:"Count"})]})}),e.jsx(Fn,{children:t.top_20_products.map((v,m)=>e.jsxs(Gr,{children:[e.jsxs(St,{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:Ua[m%Ua.length]}}),v.product_name]}),e.jsx(St,{className:"text-right",children:v.total_occurrences})]},m))})]})]})]}),e.jsxs("div",{className:"space-y-6",style:{pageBreakBefore:"always",paddingTop:"105px"},children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold mt-7 mb-4",children:"Top 5 Category"}),e.jsx("div",{className:"h-[250px] w-full max-w-[180mm] mx-auto",style:{minHeight:"250px"},children:e.jsx(sd,{width:"100%",height:"100%",children:e.jsxs(ld,{data:t.to
379p_5_categories,margin:{top:20,right:20,left:20,bottom:80},children:[e.jsx(_l,{dataKey:"category",tick:e.jsx(f,{}),interval:0,angle:-20,textAnchor:"end"}),e.jsx(Pl,{}),e.jsx(nd,{}),e.jsx(Nc,{dataKey:"occurrences",radius:[6,6,0,0],children:t.top_5_categories.map((v,m)=>e.jsx(ad,{fill:Ua[m%Ua.length]},`cell-${m}`))})]})})})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold mb-4",children:"Category Breakdown"}),e.jsxs(Rn,{children:[e.jsx(Mn,{children:e.jsxs(Gr,{children:[e.jsx(Lt,{children:"Category"}),e.jsx(Lt,{className:"text-right",children:"Count"})]})}),e.jsx(Fn,{children:t.top_5_categories.map((v,m)=>e.jsxs(Gr,{children:[e.jsxs(St,{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:Ua[m%Ua.length]}}),v.category]}),e.jsx(St,{className:"text-right",children:v.occurrences})]},m))})]})]})]}),e.jsxs("div",{className:"space-y-6",style:{pageBreakBefore:"always",paddingTop:"105px"},children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold mb-4 mt-7 ",children:"Top 5 Capability"}),e.jsx("div",{className:"h-[250px] w-full max-w-[180mm] mx-auto",style:{minHeight:"250px"},children:e.jsx(sd,{width:"100%",height:"100%",children:e.jsxs(ld,{data:t.to
379p_5_capabilities,margin:{top:20,right:20,left:20,bottom:80},children:[e.jsx(_l,{dataKey:"capability",tick:e.jsx(f,{}),interval:0,angle:-20,textAnchor:"end"}),e.jsx(Pl,{}),e.jsx(nd,{}),e.jsx(Nc,{dataKey:"occurrences",radius:[6,6,0,0],children:t.top_5_capabilities.map((v,m)=>e.jsx(ad,{fill:Ua[m%Ua.length]},`cell-${m}`))})]})})})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold mb-4",children:"Capability Breakdown"}),e.jsxs(Rn,{children:[e.jsx(Mn,{children:e.jsxs(Gr,{children:[e.jsx(Lt,{children:"Capability"}),e.jsx(Lt,{className:"text-right",children:"Count"})]})}),e.jsx(Fn,{children:t.top_5_capabilities.map((v,m)=>e.jsxs(Gr,{children:[e.jsxs(St,{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:Ua[m%Ua.length]}}),v.capability]}),e.jsx(St,{className:"text-right",children:v.occurrences})]},m))})]})]})]}),e.jsxs("div",{className:"space-y-6",style:{pageBreakBefore:"always",paddingTop:"105px"},children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold mb-4 mt-7 ",children:"Top 5 Functional Focus"}),e.jsx("div",{className:"h-[320px] w-full max-w-[180mm] mx-auto",style:{minHeight:"320px"},children:e.jsx(sd,{width:"100%",height:"100%",children:e.jsxs(ld,{data:t.to
379p_5_functional_focus,margin:{top:20,right:20,left:20,bottom:110},barCategoryGap:"20%",children:[e.jsx(_l,{dataKey:"functional_focus",tick:e.jsx(f,{}),interval:0}),e.jsx(Pl,{}),e.jsx(nd,{}),e.jsx(Nc,{dataKey:"occurrences",radius:[6,6,0,0],children:t.top_5_functional_focus.map((v,m)=>e.jsx(ad,{fill:Ua[m%Ua.length]},`cell-${m}`))})]})})})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold mb-4",children:"Functional Focus Breakdown"}),e.jsxs(Rn,{children:[e.jsx(Mn,{children:e.jsxs(Gr,{children:[e.jsx(Lt,{children:"Functional Focus"}),e.jsx(Lt,{className:"text-right",children:"Count"})]})}),e.jsx(Fn,{children:t.top_5_functional_focus.map((v,m)=>e.jsxs(Gr,{children:[e.jsxs(St,{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:Ua[m%Ua.length]}}),v.functional_focus]}),e.jsx(St,{className:"text-right",children:v.occurrences})]},m))})]})]})]}),e.jsxs("div",{className:"space-y-0",style:{pageBreakBefore:"always",paddingTop:"105px"},children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold mb-4 mt-7 ",children:"Top 5 Locations"}),e.jsx("div",{className:"h-[250px] w-full max-w-[180mm] mx-auto",style:{minHeight:"250px"},children:e.jsx(sd,{width:"100%",height:"100%",children:e.jsxs(ld,{data:t.location_data,margin:{top:20,right:20,left:20,bottom:80},children:[e.jsx(_l,{dataKey:"country",tick:e.jsx(f,{}),interval:0,angle:-20,textAnchor:"end"}),e.jsx(Pl,{}),e.jsx(nd,{}),e.jsx(Nc,{dataKey:"occurrences",radius:[6,6,0,0],children:t.location_data.map((v,m)=>e.jsx(ad,{fill:Ua[m%Ua.length]},`cell-${m}`))})]})})})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold mb-4",children:"Location Breakdown"}),e.jsxs(Rn,{children:[e.jsx(Mn,{children:e.jsxs(Gr,{children:[e.jsx(Lt,{children:"Location"}),e.jsx(Lt,{className:"text-right",children:"Count"})]})}),e.jsx(Fn,{children:t.location_data.map((v,m)=>e.jsxs(Gr,{children:[e.jsxs(St,{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:Ua[m%Ua.length]}}),v.country]}),e.jsx(St,{className:"text-right",children:v.occurrences})]},m))})]})]})]}),e.jsxs("div",{className:"text-center text-xs text-muted-foreground border-t pt-4 report-footer",children:[e.jsxs("p",{children:["This report is auto-generated by ",e.jsx("a",{href:"https://golt.ai/",target:"_blank",rel:"noopener noreferrer",className:"hover:underline",children:"G.O.L.T.ai"})," Admin Portal"]}),e.jsxs("p",{children:["© ",new Date().getFullYear(),"     ",e.jsx("a",{href:"https://golt.ai/",target:"_blank",rel:"noopener noreferrer",className:"hover:underline",children:"G.O.L.T.ai"})," All rights reserved."]})]})]})})]})}const Gf=["January","February","March","April","May","June","July","August","September","October","November","December"],np=new Date().getFullYear(),Yf=Array.from({length:5},(r,d)=>(np-d).toString());function Qv(){const{toast:r}=Yn(),[d,s]=ne.useState("monthly"),[_,z]=ne.useState(Gf[new Date().getMonth()]),[te,ue]=ne.useState(np.toString()),[w,O]=ne.useState(!1),[t,f]=ne.useState(null),[v,m]=ne.useState(null),[y,C]=ne.useState(!1),[S,g]=ne.useState(null),[j,A]=ne.useState(!0);ne.useEffect(()=>{(async()=>{try{const B=localStorage.getItem("authToken"),W=await fetch("https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net/admin/users/statistics",{headers:{Authorization:`Bearer ${B}`}});if(W.status===401){r({title:"Session expired",description:"Please log in again.",variant:"destructive"}),An(),window.location.href="/login";return}const Y=await W.json();g(Y.data)}catch(B){console.error("Failed to fetch stats",B)}finally{A(!1)}})()},[]);const I=async()=>{O(!0);try{const M=localStorage.getItem("authToken"),B=await fetch(`https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net/admin/data_signalling_report/generate?report_type=${d}&month=${_}&year=${te}`,{headers:{Authorization:`Bearer ${M}`}});if(B.status===401){r({title:"Session expired",description:"Please log in again.",variant:"destructive"}),An(),window.location.href="/login";return}const W=await B.json();W.report_type==="monthly"?(f(W),m(null)):(m(W),f(null)),C(!0),r({title:"Report Generated",description:`${d==="monthly"?"Monthly":"Yearly"} report data loaded successfully.`})}catch{r({title:"Error",description:"Failed to fetch report data. Please try again.",variant:"destructive"})}finally{O(!1)}};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs(ds,{children:[e.jsxs(Rs,{children:[e.jsxs(Ds,{className:"flex items-center gap-2",children:[e.jsx(rc,{className:"w-5 h-5"}),"Data Signalling Reports"]}),e.jsx(fa,{children:"Generate and download monthly or yearly data signalling reports with analytics and insights."})]}),e.jsx(us,{children:e.jsxs("div",{className:"space-y-6",children:[e.jsxs(Sm,{value:d,onValueChange:M=>s(M),children:[e.jsxs(Cm,{className:"grid w-full max-w-md grid-cols-2",children:[e.jsxs(la,{value:"monthly",className:"gap-2",children:[e.jsx(Bi,{className:"w-4 h-4"}),"Monthly Report"]}),e.jsxs(la,{value:"yearly",className:"gap-2",children:[e.jsx(gg,{className:"w-4 h-4"}),"Yearly Report"]})]}),e.jsx(na,{value:"monthly",className:"mt-6",children:e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 items-end",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(pt,{htmlFor:"month-select",children:"Select Month"}),e.jsxs(wo,{value:_,onValueChange:z,children:[e.jsx(No,{id:"month-select",children:e.jsx(So,{placeholder:"Select month"})}),e.jsx(Co,{children:Gf.map(M=>e.jsx(Ys,{value:M,children:M},M))})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(pt,{htmlFor:"year-select-monthly",children:"Select Year"}),e.jsxs(wo,{value:te,onValueChange:ue,children:[e.jsx(No,{id:"year-select-monthly",children:e.jsx(So,{placeholder:"Select year"})}),e.jsx(Co,{children:Yf.map(M=>e.jsx(Ys,{value:M,children:M},M))})]})]}),e.jsx(We,{onClick:I,disabled:w,className:"gap-2",children:w?e.jsxs(e.Fragment,{children:[e.jsx(lu,{className:"w-4 h-4 animate-spin"}),"Generating..."]}):e.jsxs(e.Fragment,{children:[e.jsx(rc,{className:"w-4 h-4"}),"Generate Report"]})})]})}),e.jsx(na,{value:"yearly",className:"mt-6",children:e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 items-end",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(pt,{htmlFor:"year-select-yearly",children:"Select Year"}),e.jsxs(wo,{value:te,onValueChange:ue,children:[e.jsx(No,{id:"year-select-yearly",children:e.jsx(So,{placeholder:"Select year"})}),e.jsx(Co,{children:Yf.map(M=>e.jsx(Ys,{value:M,children:M},M))})]})]}),e.jsx(We,{onClick:I,disabled:w,className:"gap-2",children:w?e.jsxs(e.Fragment,{children:[e.jsx(lu,{className:"w-4 h-4 animate-spin"}),"Generating..."]}):e.jsxs(e.Fragment,{children:[e.jsx(rc,{className:"w-4 h-4"}),"Generate Report"]})})]})})]}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4 pt-4 border-t",children:[e.jsxs("div",{className:"text-center p-4 bg-muted/50 rounded-lg",children:[e.jsx(vu,{className:"w-6 h-6 mx-auto mb-2 text-primary"}),e.jsx("p",{className:"text-2xl font-bold",children:S==null?void 0:S.total_users.toLocaleStr
379ing()}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Total Users"})]}),e.jsxs("div",{className:"text-center p-4 bg-muted/50 rounded-lg",children:[e.jsx(Th,{className:"w-6 h-6 mx-auto mb-2 text-primary"}),e.jsxs("p",{className:"text-2xl font-bold",children:[" ",S==null?void 0:S.total_products.toLocaleString()]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Total Products"})]}),e.jsxs("div",{className:"text-center p-4 bg-muted/50 rounded-lg",children:[e.jsx(rc,{className:"w-6 h-6 mx-auto mb-2 text-primary"}),e.jsx("p",{className:"text-2xl font-bold",children:S==null?void 0:S.total_searches.toLocaleString()}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Total Searches"})]})]})]})})]}),y&&(t||v)&&e.jsx(Jv,{reportType:d,monthlyData:t,yearlyData:v,selectedMonth:_,selectedYear:te})]})}const qv=[],Kf=()=>{const{toast:r}=Yn(),[d,s]=ne.useState(null),[_,z]=ne.useState(null),[te,ue]=ne.useState(!1),[w,O]=ne.useState(qv),[t,f]=ne.useState(!1),[v,m]=ne.useState(null),[y,C]=ne.useState(!1),S=ne.useRef(null),g=ne.useRef(null),j=ne.useRef(null);ne.useRef(null);const A=U=>{var Ee;const ge=(Ee=U.target.files)==null?void 0:Ee[0];if(ge){if(!["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.ms-excel",".xlsx",".xls"].some(Pe=>ge.type===Pe||ge.name.endsWith(".xlsx")||ge.name.endsWith(".xls"))){r({title:"Invalid file type",description:"Please upload an Excel file (.xlsx or .xls)",variant:"destructive"});return}s(ge)}},I=U=>{var Ee;const ge=(Ee=U.target.files)==null?void 0:Ee[0];if(ge){if(ge.type!=="application/zip"&&!ge.name.toLowerCase().endsWith(".zip")){r({title:"Invalid file type",description:"Please upload a ZIP file",variant:"destructive"});return}z(ge)}},M=U=>{var Ee;const ge=(Ee=U.target.files)==null?void 0:Ee[0];if(ge){if(!["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.ms-excel",".xlsx",".xls"].some(Pe=>ge.type===Pe||ge.name.endsWith(".xlsx")||ge.name.endsWith(".xls"))){r({title:"Invalid file type",description:"Please upload an Excel file (.xlsx or .xls)",variant:"destructive"});return}m(ge)}},B=U=>{var Ee;const ge=(Ee=U.target.files)==null?void 0:Ee[0];if(ge){if(ge.type!=="application/zip"&&!ge.name.toLowerCase().endsWith(".zip")){r({title:"Invalid file type",description:"Please upload a ZIP file",variant:"destructive"});return}J(ge)}},W=ne.useRef(null),[Y,J]=ne.useState(null),le=async()=>{if(!v){r({title:"Missing Excel file",description:"Please select an Excel file to upload",variant:"destructive"});return}C(!0);try{const U=new FormData;U.append("file",v),Y&&U.append("logos_zip",Y);const ge=localStorage.getItem("authToken"),Ee=await fetch("https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net/admin/bulk_update/",{method:"POST",headers:{Authorization:`Bearer ${ge}`},body:U});if(Ee.status===401){An(),localStorage.removeItem("golt_compare_products"),window.location.href="/login";return}const Xe=await Ee.json();Ee.ok?(r({title:"Upload successful",description:"Edit files have been uploaded successfully. Processing will begin shortly."}),m(null),J(null),j.current&&(j.current.value=""),W.current&&(W.current.value=""),oe()):r({title:"Upload failed",description:Xe.detail||"Failed to upload files",variant:"destructive"})}catch(U){console.error("Upload error:",U),r({title:"Upload error",description:"An error occurred while uploading files",variant:"destructive"})}finally{C(!1)}},ae=async()=>{try{const U=localStorage.getItem("authToken"),ge=await fetch("https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net/admin/bulk_update/download/template",{headers:{Authorization:`Bearer ${U}`}});if(ge.status===401){An(),localStorage.removeItem("golt_compare_products"),window.location.href="/login";return}if(ge.ok){const Ee=await ge.blob(),Xe=window.URL.createObjectURL(Ee),re=document.createElement("a");re.href=Xe,re.download="product_edit_template.xlsx",document.body.appendChild(re),re.click(),window.URL.revokeObjectURL(Xe),document.body.removeChild(re)}else r({title:"Download failed",description:"Failed to download template file",variant:"destructive"})}
379catch(U){console.error("Download error:",U),r({title:"Download error",description:"An error occurred while downloading the template",variant:"destructive"})}},Z=async()=>{if(!d){r({title:"Missing Excel file",description:"Please select an Excel file to upload",variant:"destructive"});return}ue(!0);try{const U=new FormData;U.append("file",d),U.append("logos_zip",_);const ge=localStorage.getItem("access_token"),Ee=await fetch("https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net/admin/bulk_upload_api/",{method:"POST",headers:{Authorization:`Bearer ${ge}`},body:U});if(Ee.status===401){An(),localStorage.removeItem("golt_compare_products"),window.location.href="/login";return}const Xe=await Ee.json();Ee.ok?(r({title:"Upload successful",description:"Files have been uploaded successfully. Processing will begin shortly."}),s(null),z(null),S.current&&(S.current.value=""),g.current&&(g.current.value=""),oe()):r({title:"Upload failed",description:Xe.message||"Failed to upload files",variant:"destructive"})}catch(U){console.error("Upload error:",U),r({title:"Upload error",description:"An error occurred while uploading files",variant:"destructive"})}finally{ue(!1)}},oe=async()=>{f(!0);try{const U=localStorage.getItem("authToken"),ge=await fetch("https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net/admin/bulk_update/status",{headers:{Authorization:`Bearer ${U}`,"Content-Type":"application/json"}});if(ge.status===401){An(),localStorage.removeItem("golt_compare_products"),window.location.href="/login";return}const Ee=await ge.json();Ee.success&&Ee.data&&O(Ee.data)}catch(U){console.error("Failed to fetch upload history:",U)}finally{f(!1)}},H=async()=>{try{const U=localStorage.getItem("authToken"),ge=await fetch("https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net/admin/bulk_upload_api/download/template",{headers:{Authorization:`Bearer ${U}`}});if(ge.status===401){An(),localStorage.removeItem("golt_compare_products"),window.location.href="/login";return}if(ge.ok){const Ee=await ge.blob(),Xe=window.URL.createObjectURL(Ee),re=document.createElement("a");re.href=Xe,re.download="product_upload_template.xlsx",document.body.appendChild(re),re.click(),window.URL.revokeObjectURL(Xe),document.body.removeChild(re)}else r({title:"Download failed",description:"Failed to download template file",variant:"destructive"})}catch(U){console.error("Download error:",U),r({title:"Download error",description:"An error occurred while downloading the template",variant:"destructive"})}},fe=async U=>{try{const ge=localStorage.getItem("access_token"),Ee=await fetch(`https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net/admin/bulk_update/${U}/errors`,{headers:{Authorization:`Bearer ${ge}`}});if(Ee.status===401){An(),localStorage.removeItem("golt_compare_products"),window.location.href="/login";return}if(Ee.ok){const Xe=await Ee.blob(),re=window.URL.createObjectURL(Xe),Pe=document.createElement("a");Pe.href=re,Pe.download=`error_report_${U}.xlsx`,document.body.appendChild(Pe),Pe.click(),window.URL.revokeObjectURL(re),document.body.removeChild(Pe)}else r({title:"Download failed",description:"Failed to download error file",variant:"destructive"})}catch(ge){console.error("Download error:",ge),r({title:"Download error",description:"An error occurred while downloading the error file",variant:"destructive"})}},se=async U=>{try{const ge=localStorage.getItem("access_token"),Ee=await fetch(`https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net/admin/bulk_update/${U}/download`,{headers:{Authorization:`Bearer ${ge}`}});if(Ee.status===401){An(),localStorage.removeItem("golt_compare_products"),window.location.href="/login";return}if(Ee.ok){const Xe=await Ee.blob(),re=window.URL.createObjectURL(Xe),Pe=document.createElement("a");Pe.href=re,Pe.download=`bulk_upload_${U}.zip`,document.body.appendChild(Pe),Pe.click(),window.URL.revokeObjectURL(re),document.body.removeChild(Pe)}else r({title:"Download failed",description:"Failed to download bulk input files",variant:"destructive"})}catch(ge){console.error("Download error:",ge),r({title:"Download error",description:"An error occurred while downloading the bulk files",variant:"destructive"})}},de=U=>{switch(U==null?void 0:U.toLowerCase()){case"completed":return e.jsxs(tr,{className:"bg-green-500 hover:bg-green-600",children:[e.jsx(Ll,{className:"w-3 h-3 mr-1"})," Completed"]});case"processing":return e.jsxs(tr,{className:"bg-blue-500 hover:bg-blue-600",children:[e.jsx(Vs,{className:"w-3 h-3 mr-1 animate-spin"})," Processing"]});case"failed":return e.jsxs(tr,{variant:"destructive",children:[e.jsx(oc,{className:"w-3 h-3 mr-1"})," Failed"]});
379case"pending":default:return e.jsxs(tr,{variant:"secondary",children:[e.jsx($i,{className:"w-3 h-3 mr-1"})," Pending"]})}},q=async U=>{try{const ge=localStorage.getItem("access_token"),Ee=await fetch(`https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net/admin/bulk_update/${U}/product-history`,{headers:{Authorization:`Bearer ${ge}`}});if(Ee.status===401){An(),localStorage.removeItem("golt_compare_products"),window.location.href="/login";return}if(Ee.ok){const Xe=await Ee.blob(),re=window.URL.createObjectURL(Xe),Pe=document.createElement("a");Pe.href=re,Pe.download=`product_history_${U}.xlsx`,document.body.appendChild(Pe),Pe.click(),window.URL.revokeObjectURL(re),document.body.removeChild(Pe)}else r({title:"Download failed",description:"Failed to download product history file",variant:"destructive"})}catch(ge){console.error("Download error:",ge),r({title:"Download error",description:"An error occurred while downloading the product history file",variant:"destructive"})}};return ne.useState(()=>{oe()}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs(ds,{children:[e.jsxs(Rs,{children:[e.jsxs(Ds,{className:"flex items-center gap-2",children:[e.jsx(Bo,{className:"w-5 h-5"}),"Add New Products"]}),e.jsx(fa,{children:"Upload Excel file with new product data and optional logo files (PNG format)"})]}),e.jsxs(us,{className:"space-y-6",children:[e.jsx("div",{className:"flex justify-end",children:e.jsxs(We,{variant:"outline",onClick:H,children:[e.jsx(jo,{className:"w-4 h-4 mr-2"}),"Download Template"]})}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs(pt,{htmlFor:"excel-file",className:"flex items-center gap-2",children:[e.jsx(fd,{className:"w-4 h-4 text-green-600"}),"Excel File (.xlsx, .xls) *"]}),e.jsx(pr,{id:"excel-file",type:"file",accept:".xlsx,.xls,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel",onChange:A,ref:S,className:"cursor-pointer"}),d&&e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Selected: ",d.name]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(pt,{htmlFor:"edit-zip-file",className:"flex items-center gap-2",children:[e.jsx(cu,{className:"w-4 h-4 text-blue-600"}),"ZIP File (.zip)"]}),e.jsx(pr,{id:"edit-zip-file",type:"file",accept:".zip,application/zip",onChange:I,ref:g,className:"cursor-pointer"}),_&&e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Selected: ",_.name]})]})]}),e.jsx("div",{className:"flex justify-end",children:e.jsx(We,{onClick:Z,disabled:te||!d,children:te?e.jsxs(e.Fragment,{children:[e.jsx(Vs,{className:"w-4 h-4 mr-2 animate-spin"}),"Uploading..."]}):e.jsxs(e.Fragment,{children:[e.jsx(Bo,{className:"w-4 h-4 mr-2"}),"Upload Files"]})})})]})]}),e.jsxs(ds,{children:[e.jsxs(Rs,{children:[e.jsxs(Ds,{className:"flex items-center gap-2",children:[e.jsx(fd,{className:"w-5 h-5"}),"Edit Product"]}),e.jsx(fa,{children:"Upload Excel file with edited product data and optional logo files (PNG format)"})]}),e.jsxs(us,{className:"space-y-6",children:[e.jsx("div",{className:"flex justify-end",children:e.jsxs(We,{variant:"outline",onClick:ae,children:[e.jsx(jo,{className:"w-4 h-4 mr-2"}),"Download Edit Template"]})}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs(pt,{htmlFor:"edit-excel-file",className:"flex items-center gap-2",children:[e.jsx(fd,{className:"w-4 h-4 text-green-600"}),"Excel File (.xlsx, .xls) *"]}),e.jsx(pr,{id:"edit-excel-file",type:"file",accept:".xlsx,.xls,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel",onChange:M,ref:j,className:"cursor-pointer"}),v&&e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Selected: ",v.name]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(pt,{htmlFor:"edit-zip-file",className:"flex items-center gap-2",children:[e.jsx(cu,{className:"w-4 h-4 text-blue-600"}),"ZIP File (.zip) - Optional"]}),e.jsx(pr,{id:"edit-zip-file",type:"file",accept:".zip,application/zip",onChange:B,ref:W,className:"cursor-pointer"}),Y&&e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Selected: ",Y.name]})]})]}),e.jsx("div",{className:"flex justify-end",children:e.jsx(We,{onClick:le,disabled:y||!v,children:y?e.jsxs(e.Fragment,{children:[e.jsx(Vs,{className:"w-4 h-4 mr-2 animate-spin"}),"Uploading..."]}):e.jsxs(e.Fragment,{children:[e.jsx(Bo,{className:"w-4 h-4 mr-2"}),"Upload Edit Files"]})})})]})]}),e.jsxs(ds,{children:[e.jsxs(Rs,{className:"flex flex-row items-center justify-between",children:[e.jsxs("div",{children:[e.jsxs(Ds,{className:"flex items-center gap-2",children:[e.jsx($i,{className:"w-5 h-5"}),"Upload History"]}),e.jsx(fa,{children:"Track the status of your bulk uploads"})]}),e.jsx(We,{variant:"outline",size:"sm",onClick:oe,disabled:t,children:t?e.jsx(Vs,{className:"w-4 h-4 animate-spin"}):"Refresh"})]}),e.jsx(us,{children:t?e.jsx("div",{className:"flex items-center justify-center py-8",children:e.jsx(Vs,{className:"w-8 h-8 animate-spin text-muted-foreground"})}):w.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-muted-foreground",children:[e.jsx(Ug,{className:"w-12 h-12 mb-2"}),e.jsx("p",{children:"No upload history found"})]}):e.jsxs(Rn,{children:[e.jsx(Mn,{children:e.jsxs(Gr,{children:[e.jsx(Lt,{children:"Upload ID"}),e.jsx(Lt,{children:"Status"}),e.jsx(Lt,{children:"Total Rows"}),e.jsx(Lt,{children:"Success"}),e.jsx(Lt,{children:"Failed"}),e.jsx(Lt,{children:"Created At"}),e.jsx(Lt,{children:"Error"}),e.jsx(Lt,{children:"Actions"}),e.jsx(Lt,{children:"Download Files"}),e.jsx(Lt,{children:"Product Prevous version"})]})}),e.jsx(Fn,{children:w.map(U=>e.jsxs(Gr,{children:[e.jsxs(St,{className:"font-mono text-xs",children:[U.upload_id.slice(0,8),"..."]}),e.jsx(St,{children:de(U.status)}),e.jsx(St,{children:U.total_rows}),e.jsx(St,{className:"text-green-600 font-medium",children:U.success_rows}),e.jsx(St,{className:"text-red-600 font-medium",children:U.failed_rows}),e.jsx(St,{className:"text-sm",children:new Date(U.created_at).toISOString().split("T")[0]}),e.jsx(St,{className:"text-sm",children:U.error_message||Ea()}),e.jsx(St,{children:U.failed_rows>0&&e.jsxs(We,{variant:"outline",size:"sm",onClick:()=>fe(U.upload_id),children:[e.jsx(jo,{className:"w-4 h-4 mr-1"}),"Errors"]})}),e.jsx(St,{children:e.jsxs(We,{variant:"outline",size:"sm",onClick:()=>se(U.upload_id),children:[e.jsx(jo,{className:"w-4 h-4 mr-1"}),"Download"]})}),e.jsx(St,{children:U.success_rows>0&&U.action==="update"&&e.jsxs(We,{variant:"outline",size:"sm",onClick:()=>q(U.upload_id),children:[e.jsx(jo,{className:"w-4 h-4 mr-1"}),"Download previous Data"]})})]},U.upload_id))})]})})]})]})};function ex(){const{toast:r}=Yn(),d=ne.useRef(null),[s,_]=ne.useState(null),[z,te]=ne.useState(!1),[ue,w]=ne.useState([]),[O,t]=ne.useState(!1),[f,v]=ne.useState(0),[m,y]=ne.useState(1),C=15,[S,g]=ne.useState("ALL"),[j,A]=ne.useState(null),[I,M]=ne.useState(null),[B,W]=ne.useState(!1),[Y,J]=ne.useState(!1),[le,ae]=ne.useState(""),[Z,oe]=ne.useState("ALL"),[H,fe]=ne.useState(1),[se,de]=ne.useState(25),[q,U]=ne.useState(null),[ge,Ee]=ne.useState(null),[Xe,re]=ne.useState(!1),[Pe,ye]=ne.useState(!1),[Se,Le]=ne.useState(null),[st,Ke]=ne.useState("light"),[rt,xt]=ne.useState(null),[He,Tt]=ne.useState("light"),Kt="https://goltaiqa.blob.core.windows.net/prodgoltai",Jt=()=>localStorage.getItem("access_token")||localStorage.getItem("authToken"),rr=()=>{r({title:"Session Expired",description:"Please log in again.",variant:"destructive"}),An(),window.location.href="/login"},Ht=Ye=>{if(!Ye||Ye.trim()==="")return null;if(Ye.startsWith("http://")||Ye.startsWith("https://")||Ye.startsWith("blob:")||Ye.startsWith("data:"))return Ye;const Vt=Kt.replace(/\/+$/,""),lr=Ye.replace(/^\/+/,"");return`${Vt}/${lr}`},yr=Ye=>Ye?Ye.toLowerCase().includes("question-mark.png"):!0,gr=Ye=>{switch(Ye){case"light":return"bg-white text-zinc-900 border-slate-200/90 shadow-xs";case"checker":return"bg-[linear-gradient(45deg,#e2e8f0_25%,transparent_25%),linear-gradient(-45deg,#e2e8f0_25%,transparent_25%),linear-gradient(45deg,transparent_75%,#e2e8f0_75%),linear-gradient(-45deg,transparent_75%,#e2e8f0_75%)] bg-[size:10px_10px] bg-[position:0_0,0_5px,5px_-5px,-5px_0px] bg-slate-100 border-slate-300 text-zinc-900";case"dark":return"bg-zinc-900 border-zinc-700 text-zinc-100"}},Vr=(Ye,Vt)=>{navigator.clipboard.writeText(Ye),r({title:"Copied",description:Vt})},jr=ne.useCallback(async(Ye=!1)=>{Ye||t(!0);try{const Vt=Jt();let lr=`https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net/admin/bulk_upload/logoupload/batches?page=${m}&limit=${C}`;S!=="ALL"&&(lr+=`&status=${S}`);const xr=await fetch(lr,{headers:{Authorization:`Bearer ${Vt}`,"Content-Type":"application/json"}});if(xr.status===401){rr();return}if(xr.ok){const Pr=await xr.json();w(Pr.batches||[]),v(Pr.total||0)}else{const Pr=await xr.json().catch(()=>({}));
379Ye||r({title:"Error fetching batches",description:Pr.detail||"Failed to load bulk logo upload jobs",variant:"destructive"})}}catch(Vt){console.error("Error fetching batches:",Vt),Ye||r({title:"Network Error",description:"Could not connect to the bulk logo upload service.",variant:"destructive"})}finally{Ye||t(!1)}},[m,S]);ne.useEffect(()=>{jr()},[jr]),ne.useEffect(()=>{if(!ue.some(lr=>lr.status==="PROCESSING"))return;const Vt=setInterval(()=>{jr(!0),Y&&j&&ft(j,!0)},4e3);return()=>clearInterval(Vt)},[ue,Y,j]);const Xr=Ye=>{var lr;const Vt=(lr=Ye.target.files)==null?void 0:lr[0];if(Vt){if(!Vt.name.toLowerCase().endsWith(".zip")){r({title:"Invalid file type",description:"Please select a valid .ZIP archive containing product logo images.",variant:"destructive"});return}_(Vt)}},et=async()=>{if(!s){r({title:"No file selected",description:"Please choose a .ZIP archive to upload.",variant:"destructive"});return}te(!0);try{const Ye=new FormData;Ye.append("file",s),Ye.append("mode","upsert");const Vt=Jt(),lr=await fetch("https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net/admin/bulk_upload/logoupload/upload?background=true",{method:"POST",headers:{Authorization:`Bearer ${Vt}`},body:Ye});if(lr.status===401){rr();return}const xr=await lr.json();lr.ok?(r({title:"Upload submitted successfully",description:`Batch ${xr.upload_id.slice(0,8)} is now processing in the background. Logos will be matched against product names.`}),_(null),d.current&&(d.current.value=""),jr()):r({title:"Upload failed",description:xr.detail||xr.message||"Failed to process logo ZIP file.",variant:"destructive"})}catch(Ye){console.error("Upload error:",Ye),r({title:"Upload Error",description:"An unexpected network error occurred while uploading.",variant:"destructive"})}finally{te(!1)}},ft=async(Ye,Vt=!1)=>{Vt||W(!0);try{const lr=Jt(),xr=await fetch(`https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net/admin/bulk_upload/logoupload/batches/${Ye}`,{headers:{Authorization:`Bearer ${lr}`}});if(xr.status===401){rr();return}if(xr.ok){const Pr=await xr.json();M(Pr)}else{const Pr=await xr.json().catch(()=>({}));Vt||r({title:"Failed to load details",description:Pr.detail||"Could not retrieve batch items.",variant:"destructive"})}}catch(lr){console.error("Fetch detail error:",lr)}finally{Vt||W(!1)}},je=Ye=>{A(Ye.upload_id),J(!0),ae(""),oe("ALL"),fe(1),ft(Ye.upload_id)},$e=async()=>{if(q){re(!0);try{const Ye=Jt(),Vt=await fetch(`https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net/admin/bulk_upload/logoupload/batches/${q.upload_id}/revert?force=${Pe}`,{method:"POST",headers:{Authorization:`Bearer ${Ye}`}});if(Vt.status===401){rr();return}const lr=await Vt.json();Vt.ok&&lr.success?(r({title:"Batch Reverted",description:`Successfully restored ${lr.reverted_count} logos from backup.`}),U(null),jr(),Y&&j===q.upload_id&&ft(q.upload_id)):r({title:"Revert Failed",description:lr.detail||lr.message||"Failed to revert batch changes.",variant:"destructive"})}catch(Ye){console.error("Revert error:",Ye),r({title:"Revert Error",description:"An unexpected error occurred while reverting.",variant:"destructive"})}finally{re(!1)}}},ht=async()=>{if(ge){re(!0);try{const Ye=Jt(),Vt=await fetch(`https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net/admin/bulk_upload/logoupload/items/${ge.id}/revert?force=${Pe}`,{method:"POST",headers:{Authorization:`Bearer ${Ye}`}});if(Vt.status===401){rr();return}const lr=await Vt.json();Vt.ok&&lr.success?(r({title:"Logo Restored",description:`Logo for ${ge.product_name} restored successfully.`}),Ee(null),j&&ft(j),jr(!0)):r({title:"Revert Failed",description:lr.detail||lr.message||"Could not revert this logo.",variant:"destructive"})}catch(Ye){console.error("Single revert error:",Ye),r({title:"Revert Error",description:"An unexpected error occurred while reverting item.",variant:"destructive"})}finally{re(!1)}}},tt=async Ye=>{Le(Ye);try{const Vt=Jt(),lr=await fetch(`https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net/admin/bulk_upload/logoupload/batches/${Ye}/export`,{headers:{Authorization:`Bearer ${Vt}`}});if(lr.status===401){rr();return}if(lr.ok){const xr=await lr.blob(),Pr=window.URL.createObjectURL(xr),Ur=document.createElement("a");Ur.href=Pr,Ur.download=`logo_upload_report_${Ye.slice(0,8)}.xlsx`,document.body.appendChild(Ur),Ur.click(),window.URL.revokeObjectURL(Pr),document.body.removeChild(Ur),r({title:"Report Downloaded",description:"Excel report for logo upload batch has been generated."})}else r({title:"Export Failed",description:"Could not generate report for this batch.",variant:"destructive"})}catch(Vt){console.error("Export error:",Vt),r({title:"Export Error",description:"Failed to download batch report.",variant:"destructive"})}finally{Le(null)}},Ze=Ye=>{switch(Ye==null?void 0:Ye.toUpperCase()){case"COMPLETED":return e.jsxs(tr,{className:"bg-emerald-500/15 text-emerald-700 hover:bg-emerald-500/25 border-emerald-500/30 dark:text-emerald-400",children:[e.jsx(Fm,{className:"w-3 h-3 mr-1"})," Completed"]});case"PROCESSING":return e.jsxs(tr,{className:"bg-blue-500/15 text-blue-700 hover:bg-blue-500/25 border-blue-500/30 dark:text-blue-400",children:[e.jsx(Vs,{className:"w-3 h-3 mr-1 animate-spin"})," Processing"]});case"FAILED":return e.jsxs(tr,{variant:"destructive",children:[e.jsx(oc,{className:"w-3 h-3 mr-1"})," Failed"]});case"REVERTED":return e.jsxs(tr,{className:"bg-purple-500/15 text-purple-700 hover:bg-purple-500/25 border-purple-500/30 dark:text-purple-400",children:[e.jsx(xo,{className:"w-3 h-3 mr-1"})," Reverted"]});case"PARTIALLY_REVERTED":return e.jsxs(tr,{className:"bg-amber-500/15 text-amber-700 hover:bg-amber-500/25 border-amber-500/30 dark:text-amber-400",children:[e.jsx(xo,{className:"w-3 h-3 mr-1"})," Partially Reverted"]});default:return e.jsxs(tr,{variant:"secondary",children:[e.jsx($i,{className:"w-3 h-3 mr-1"})," ",Ye]})}},Ft=Ye=>{switch(Ye==null?void 0:Ye.toUpperCase()){case"ADDED":return e.jsx(tr,{className:"bg-emerald-500/15 text-emerald-700 border-emerald-500/30 dark:text-emerald-400",children:"Added"});case"REPLACED":return e.jsx(tr,{className:"bg-blue-500/15 text-blue-700 border-blue-500/30 dark:text-blue-400",children:"Replaced"});case"SKIPPED":return e.jsx(tr,{variant:"outline",className:"text-amber-600 border-amber-400 dark:text-amber-400",children:"Skipped"});case"FAILED":return e.jsx(tr,{variant:"destructive",children:"Failed"});default:return e.jsx(tr,{variant:"secondary",children:Ye})}},lt=((I==null?void 0:I.items)||[]).filter(Ye=>{const Vt=Ye.product_name.toLowerCase().includes(le.toLowerCase())||Ye.file_name_in_zip.toLowerCase().includes(le.toLowerCase())||Ye.product_id&&Ye.product_id.toLowerCase().includes(le.toLowerCase()),lr=Z==="ALL"||Ye.action.toUpperCase()===Z.toUpperCase();return Vt&&lr}),_t=lt.length,dr=Math.max(1,Math.ceil(_t/se)),fr=lt.slice((H-1)*se,H*se),It=rt?lt.findIndex(Ye=>Ye.id===rt.id):-1,nr=()=>{It>0&&xt(lt[It-1])},Cr=()=>{It>=0&&It<lt.length-1&&xt(lt[It+1])},Wt=rt?Ht(rt.old_image_url):null,Ir=rt?Ht(rt.new_image_url):null,Yt=rt?yr(rt.old_image_url):!0,zr=rt?rt.status==="REVERTED"||!!rt.reverted_at:!1;return e.jsxs("div",{className:"space-y-6",children:[e.jsxs(ds,{className:"border-border/80 shadow-sm",children:[e.jsx(Rs,{children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"p-2.5 rounded-xl bg-primary/10 text-primary",children:e.jsx(md,{className:"w-6 h-6"})}),e.jsxs("div",{children:[e.jsx(Ds,{className:"text-xl",children:"Bulk Product Logo Upload"}),e.jsx(fa,{children:"Upload a ZIP archive of product logos. Images will be matched to products by filename and uploaded securely to Azure Storage with automatic backups."})]})]})}),e.jsxs(us,{className:"space-y-6",children:[e.jsxs("div",{className:"rounded-lg bg-muted/60 border border-border/60 p-4 text-sm space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2 font-medium text-foreground",children:[e.jsx(vg,{className:"w-4 h-4 text-primary"}),"Naming & Archive Guidelines"]}),e.jsxs("ul",{className:"list-disc list-inside space-y-1 text-muted-foreground text-xs leading-relaxed",children:[e.jsxs("li",{children:["Each logo in the ",e.jsx("span",{className:"font-semibold text-foreground",children:".zip"})," must be named after the Product Name (e.g., ",e.jsx("code",{className:"bg-background px-1 py-0.5 rounded text-foreground font-mono",children:"Slack.png"}),", ",e.jsx("code",{className:"bg-background px-1 py-0.5 rounded text-foreground font-mono",children:"Salesforce.jpg"}),", ",e.jsx("code",{className:"bg-background px-1 py-0.5 rounded text-foreground font-mono",children:"HubSpot.svg"}),")."]}),e.jsxs("li",{children:["Supported image extensions: ",e.jsx("span",{className:"font-medium text-foreground",children:".png, .jpg, .jpeg, .webp, .svg"}),"."]}),e.jsx("li",{children:"Matching is case-insensitive and trims extra whitespace. Existing logos that are replaced will have automated historical backups created for instant rollbacks."})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2 max-w-xl",children:[e.jsxs(pt,{htmlFor:"logo-zip-upload",className:"text-sm font-medium flex items-center gap-2",children:[e.jsx(cu,{className:"w-4 h-4 text-primary"}),"Select Logos ZIP Archive (.zip) *"]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(pr,{id:"logo-zip-upload",type:"file",accept:".zip,application/zip",onChange:Xr,ref:d,className:"cursor-pointer file:cursor-pointer"}),s?e.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground bg-primary/5 p-2 rounded border border-primary/20",children:[e.jsx(jm,{className:"w-3.5 h-3.5 text-emerald-600"}),e.jsxs("span",{children:["Selected: ",e.jsx("strong",{className:"text-foreground",children:s.name})," (",(s.size/(1024*1024)).toFixed(2)," MB)"]})]}):e.jsx("p",{className:"text-xs text-muted-foreground",children:"Upload a .zip containing product logos. Logos will be matched to products by filename."})]})]}),e.jsx("div",{className:"flex items-center justify-end gap-3 pt-2 border-t",children:e.jsx(We,{onClick:et,disabled:z||!s,className:"gap-2 px-6",children:z?e.jsxs(e.Fragment,{children:[e.jsx(Vs,{className:"w-4 h-4 animate-spin"}),"Uploading Archive..."]}):e.jsxs(e.Fragment,{children:[e.jsx(Bo,{className:"w-4 h-4"}),"Upload & Process Logos"]})})})]})]})]}),e.jsxs(ds,{className:"border-border/80 shadow-sm",children:[e.jsxs(Rs,{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[e.jsxs("div",{children:[e.jsxs(Ds,{className:"text-xl flex items-center gap-2",children:[e.jsx($i,{className:"w-5 h-5 text-primary"}
379),"Logo Upload History & Batches"]}),e.jsx(fa,{children:"Monitor processing status, audit matched logos, download reports, or revert modifications."})]}),e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("div",{className:"flex items-center gap-1.5 bg-muted p-1 rounded-lg",children:["ALL","COMPLETED","PROCESSING","FAILED","REVERTED"].map(Ye=>e.jsx(We,{variant:S===Ye?"default":"ghost",size:"sm",onClick:()=>{g(Ye),y(1)},className:"text-xs h-7 px-2.5",children:Ye==="ALL"?"All":Ye.charAt(0)+Ye.slice(1).toLowerCase()},Ye))}),e.jsxs(We,{variant:"outline",size:"sm",onClick:()=>jr(),disabled:O,className:"h-8 gap-1.5",children:[e.jsx(Ai,{className:`w-3.5 h-3.5 ${O?"animate-spin":""}`}),"Refresh"]})]})]}),e.jsxs(us,{children:[O?e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-muted-foreground gap-3",children:[e.jsx(Vs,{className:"w-8 h-8 animate-spin text-primary"}),e.jsx("p",{className:"text-sm",children:"Loading logo upload batches..."})]}):ue.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-muted-foreground border rounded-lg border-dashed",children:[e.jsx(cu,{className:"w-12 h-12 mb-3 text-muted-foreground/40"}),e.jsx("p",{className:"font-medium text-foreground",children:"No logo upload batches found"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Upload a .zip file above to start bulk updating product logos."})]}):e.jsx("div",{className:"overflow-x-auto rounded-lg border",children:e.jsxs(Rn,{children:[e.jsx(Mn,{children:e.jsxs(Gr,{className:"bg-muted/40",children:[e.jsx(Lt,{className:"font-semibold text-xs",children:"Batch ID"}),e.jsx(Lt,{className:"font-semibold text-xs",children:"Archive Name"}),e.jsx(Lt,{className:"font-semibold text-xs",children:"Status"}),e.jsx(Lt,{className:"font-semibold text-xs text-center",children:"Files"}),e.jsx(Lt,{className:"font-semibold text-xs text-center",children:"Matched"}),e.jsx(Lt,{className:"font-semibold text-xs text-center",children:"Added / Replaced"}),e.jsx(Lt,{className:"font-semibold text-xs text-center",children:"Skipped / Failed"}),e.jsx(Lt,{className:"font-semibold text-xs",children:"Created At"}),e.jsx(Lt,{className:"font-semibold text-xs text-right",children:"Actions"})]})}),e.jsx(Fn,{children:ue.map(Ye=>
379{const Vt=Ye.status==="PROCESSING",lr=Ye.status==="REVERTED";return e.jsxs(Gr,{className:"hover:bg-muted/30",children:[e.jsxs(St,{className:"font-mono text-xs font-semibold",children:[Ye.upload_id.slice(0,8),"..."]}),e.jsx(St,{className:"text-sm max-w-[180px] truncate",title:Ye.original_zip_name||"",children:Ye.original_zip_name||"logos.zip"}),e.jsx(St,{children:Ze(Ye.status)}),e.jsx(St,{className:"text-center font-medium",children:Ye.total_files}),e.jsx(St,{className:"text-center font-medium text-primary",children:Ye.matched_count}),e.jsxs(St,{className:"text-center",children:[e.jsx("span",{className:"text-emerald-600 font-semibold",children:Ye.added_count}),e.jsx("span",{className:"text-muted-foreground mx-1",children:"/"}),e.jsx("span",{className:"text-blue-600 font-semibold",children:Ye.replaced_count})]}),e.jsxs(St,{className:"text-center",children:[e.jsx("span",{className:"text-amber-600 font-semibold",children:Ye.skipped_count}),e.jsx("span",{className:"text-muted-foreground mx-1",children:"/"}),e.jsx("span",{className:`font-semibold ${Ye.failed_count>0?"text-destructive":"text-muted-foreground"}`,children:Ye.failed_count})]}),e.jsx(St,{className:"text-xs text-muted-foreground whitespace-nowrap",children:Ye.created_at?new Date(Ye.created_at).toLocaleString():"N/A"}),e.jsx(St,{className:"text-right",children:e.jsxs("div",{className:"flex items-center justify-end gap-1.5",children:[e.jsxs(We,{variant:"outline",size:"sm",onClick:()=>je(Ye),className:"h-8 gap-1 text-xs",title:"View itemized results",children:[e.jsx(Wi,{className:"w-3.5 h-3.5"}),"Details"]}),e.jsxs(We,{variant:"outline",size:"sm",onClick:()=>tt(Ye.upload_id),disabled:Se===Ye.upload_id||Vt,className:"h-8 gap-1 text-xs",title:"Export report to Excel",children:[Se===Ye.upload_id?e.jsx(Vs,{className:"w-3.5 h-3.5 animate-spin"}):e.jsx(jo,{className:"w-3.5 h-3.5"}),"Report"]}),!lr&&e.jsxs(We,{variant:"ghost",size:"sm",onClick:()=>{U(Ye),ye(!1)},disabled:Vt||Xe,className:"h-8 gap-1 text-xs text-destructive hover:bg-destructive/10 hover:text-destructive",title:"Revert all logos in this batch",children:[e.jsx(xo,{className:"w-3.5 h-3.5"}),"Revert"]})]})})]},Ye.upload_id)})})]})}),f>C&&e.jsxs("div",{className:"flex items-center justify-between pt-4",children:[e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Showing ",(m-1)*C+1," to ",Math.min(m*C,f)," of ",f," batches"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(We,{variant:"outline",size:"sm",disabled:m<=1,onClick:()=>y(Ye=>Ye-1),className:"h-8 text-xs",children:"Previous"}),e.jsxs("span",{className:"text-xs font-medium px-2",children:["Page ",m]}),e.jsx(We,{variant:"outline",size:"sm",disabled:m*C>=f,onClick:()=>y(Ye=>Ye+1),className:"h-8 text-xs",children:"Next"})]})]})]})]}),e.jsx(Un,{open:Y,onOpenChange:J,children:e.jsxs(zn,{className:"max-w-6xl max-h-[92vh] flex flex-col p-6 w-[96vw]",children:[e.jsx($n,{children:e.jsxs("div",{className:"flex items-center justify-between pr-6",children:[e.jsxs("div",{children:[e.jsxs(Vn,{className:"text-lg flex items-center gap-2",children:[e.jsx(md,{className:"w-5 h-5 text-primary"}),"Batch Details: ",I==null?void 0:I.upload_id.slice(0,8),"..."]}),e.jsxs(ha,{children:["Archive: ",(I==null?void 0:I.original_zip_name)||"logos.zip"]})]}),I&&Ze(I.status)]})}),B?e.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-muted-foreground gap-3",children:[e.jsx(Vs,{className:"w-8 h-8 animate-spin text-primary"}),e.jsx("p",{className:"text-sm",children:"Loading batch items and logo changes..."})]}):I?e.jsxs("div",{className:"flex flex-col gap-4 flex-1 overflow-hidden",children:[e.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-5 gap-3",children:[e.jsxs("div",{className:"bg-muted/40 p-3 rounded-lg border text-center",children:[e.jsx("div",{className:"text-xs text-muted-foreground",children:"Total Files"}),e.jsx("div",{className:"text-xl font-bold",children:I.total_files})]}),e.jsxs("div",{className:"bg-emerald-500/10 p-3 rounded-lg border border-emerald-500/20 text-center",children:[e.jsx("div",{className:"text-xs text-emerald-700 dark:text-emerald-400",children:"Added Logos"}),e.jsx("div",{className:"text-xl font-bold text-emerald-700 dark:text-emerald-400",children:I.added_count})]}),e.jsxs("div",{className:"bg-blue-500/10 p-3 rounded-lg border border-blue-500/20 text-center",children:[e.jsx("div",{className:"text-xs text-blue-700 dark:text-blue-400",children:"Replaced Logos"}),e.jsx("div",{className:"text-xl font-bold text-blue-700 dark:text-blue-400",children:I.replaced_count})]}),e.jsxs("div",{className:"bg-amber-500/10 p-3 rounded-lg border border-amber-500/20 text-center",children:[e.jsx("div",{className:"text-xs text-amber-700 dark:text-amber-400",children:"Skipped"}),e.jsx("div",{className:"text-xl font-bold text-amber-700 dark:text-amber-400",children:I.skipped_count})]}),e.jsxs("div",{className:"bg-destructive/10 p-3 rounded-lg border border-destructive/20 text-center",children:[e.jsx("div",{className:"text-xs text-destructive",children:"Failed"}),e.jsx("div",{className:"text-xl font-bold text-destructive",children:I.failed_count})]})]}),e.jsxs("div",{className:"flex flex-col lg:flex-row items-stretch lg:items-center justify-between gap-3",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row items-center gap-3",children:[e.jsxs("div",{className:"relative w-full sm:w-64",children:[e.jsx(bo,{className:"w-4 h-4 absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"}),e.jsx(pr,{placeholder:"Search product or file...",value:le,onChange:Ye=>{ae(Ye.target.value),fe(1)},className:"pl-9 h-9 text-xs"})]}),e.jsxs("div",{className:"flex items-center gap-1 bg-muted/80 p-0.5 rounded-lg border border-border/70 text-xs w-full sm:w-auto justify-between sm:justify-start",children:[e.jsx("span",{className:"px-2 text-[11px] text-muted-foreground font-medium",children:"Canvas:"}),e.jsxs("button",{type:"button",onClick:()=>Ke("light"),className:`flex items-center gap-1 px-2.5 py-1 rounded text-xs transition ${st==="light"?"bg-background text-foreground shadow-xs font-semibold":"text-muted-foreground hover:text-foreground"}
379`,title:"Light Background (High Contrast for Dark Logos)",children:[e.jsx(Pf,{className:"w-3.5 h-3.5 text-amber-500"}),e.jsx("span",{children:"Light"})]}),e.jsxs("button",{type:"button",onClick:()=>Ke("checker"),className:`flex items-center gap-1 px-2.5 py-1 rounded text-xs transition ${st==="checker"?"bg-background text-foreground shadow-xs font-semibold":"text-muted-foreground hover:text-foreground"}`,title:"Checkerboard Grid (Transparency Check)",children:[e.jsx(zf,{className:"w-3.5 h-3.5 text-blue-500"}),e.jsx("span",{children:"Grid"})]}),e.jsxs("button",{type:"button",onClick:()=>Ke("dark"),className:`flex items-center gap-1 px-2.5 py-1 rounded text-xs transition ${st==="dark"?"bg-background text-foreground shadow-xs font-semibold":"text-muted-foreground hover:text-foreground"}`,title:"Dark Background (For Light/White Logos)",children:[e.jsx(Tf,{className:"w-3.5 h-3.5 text-indigo-400"}),e.jsx("span",{children:"Dark"})]})]})]}),e.jsx("div",{className:"flex items-center gap-1.5 overflow-x-auto pb-1 lg:pb-0",children:[{id:"ALL",label:`All Actions (${I.items.length})`},{id:"ADDED",label:`Added (${I.added_count})`},{id:"REPLACED",label:`Replaced (${I.replaced_count})`},{id:"SKIPPED",label:`Skipped (${I.skipped_count})`},{id:"FAILED",label:`Failed (${I.failed_count})`}].map(Ye=>e.jsx(We,{variant:Z===Ye.id?"default":"outline",size:"sm",onClick:()=>{oe(Ye.id),fe(1)},className:"text-xs h-8 px-2.5 whitespace-nowrap",children:Ye.label},Ye.id))})]}),e.jsx("div",{className:"flex-1 overflow-auto border rounded-lg max-h-[460px] min-h-[250px] relative",children:e.jsxs(Rn,{className:"relative w-full",children:[e.jsx(Mn,{className:"sticky top-0 bg-background z-20 shadow-sm border-b",children:e.jsxs(Gr,{className:"bg-muted/40",children:[e.jsx(Lt,{className:"text-xs font-semibold",children:"Product Name"}),e.jsx(Lt,{className:"text-xs font-semibold",children:"File in ZIP"}),e.jsx(Lt,{className:"text-xs font-semibold",children:"Action"}),e.jsx(Lt,{className:"text-xs font-semibold w-[130px]",children:"Previous Logo"}),e.jsx(Lt,{className:"text-xs font-semibold text-center w-[30px]"}),e.jsx(Lt,{className:"text-xs font-semibold w-[130px]",children:"New Logo"}),e.jsx(Lt,{className:"text-xs font-semibold",children:"Status / Details"}),e.jsx(Lt,{className:"text-xs font-semibold text-right",children:"Action"})]})}),e.jsx(Fn,{children:fr.length===0?e.jsx(Gr,{children:e.jsx(St,{colSpan:8,className:"text-center py-8 text-muted-foreground text-xs",children:"No logo history items match the filters."})}):fr.map(Ye=>{const Vt=Ht(Ye.old_image_url),lr=Ht(Ye.new_image_url),xr=Ye.status==="REVERTED"||!!Ye.reverted_at,Pr=yr(Ye.old_image_url);return e.jsxs(Gr,{className:"hover:bg-muted/30",children:[e.jsxs(St,{className:"font-medium text-xs",children:[e.jsx("div",{children:Ye.product_name}),Ye.product_id&&e.jsx("div",{className:"text-[10px] text-muted-foreground font-mono",children:Ye.product_id})]}),e.jsx(St,{className:"text-xs text-muted-foreground font-mono",children:Ye.file_name_in_zip}),e.jsx(St,{children:Ft(Ye.action)}),e.jsx(St,{className:"w-[130px]",children:Pr||!Vt?e.jsxs("div",{className:"w-28 h-12 rounded-md border border-dashed border-border/80 bg-muted/40 p-1 flex flex-col items-center justify-center text-center text-muted-foreground select-none",title:"No custom previous logo on file (Default placeholder)",children:[e.jsx(Jd,{className:"w-3.5 h-3.5 mb-0.5 text-muted-foreground/60"}),e.jsx("span",{className:"text-[10px] font-medium text-muted-foreground/80 leading-tight",children:"No Previous"})]}):e.jsxs("div",{onClick:()=>xt(Ye),className:`w-28 h-12 rounded-md border p-1 flex items-center justify-center overflow-hidden cursor-pointer relative group transition-all duration-150 hover:ring-2 hover:ring-primary/40 hover:shadow-md ${gr(st)}`,title:"Click to inspect enlarged logo",children:[e.jsx("img",{src:Vt,alt:"Previous logo",className:"max-h-full max-w-full object-contain transition-transform duration-150 group-hover:scale-105",onError:Ur=>{Ur.currentTarget.style.display="none"}}),e.jsxs("div",{className:"absolute inset-0 bg-black/40 opacity-0 group-hover:opacity-100 flex items-center justify-center gap-1 transition-opacity rounded-md",children:[e.jsx(Ff,{className:"w-3.5 h-3.5 text-white drop-shadow"}),e.jsx("span",{className:"text-[10px] font-medium text-white drop-shadow",children:"View"})]})]})}
379),e.jsx(St,{className:"text-center p-1 w-[30px]",children:e.jsx(xg,{className:"w-4 h-4 text-muted-foreground inline"})}),e.jsx(St,{className:"w-[130px]",children:lr?e.jsxs("div",{onClick:()=>xt(Ye),className:`w-28 h-12 rounded-md border p-1 flex items-center justify-center overflow-hidden cursor-pointer relative group transition-all duration-150 hover:ring-2 hover:ring-primary/40 hover:shadow-md ${gr(st)}`,title:"Click to inspect enlarged logo",children:[e.jsx("img",{src:lr,alt:"New logo",className:"max-h-full max-w-full object-contain transition-transform duration-150 group-hover:scale-105",onError:Ur=>{Ur.currentTarget.style.display="none"}}),e.jsxs("div",{className:"absolute inset-0 bg-black/40 opacity-0 group-hover:opacity-100 flex items-center justify-center gap-1 transition-opacity rounded-md",children:[e.jsx(Ff,{className:"w-3.5 h-3.5 text-white drop-shadow"}),e.jsx("span",{className:"text-[10px] font-medium text-white drop-shadow",children:"View"})]})]}):e.jsx("span",{className:"text-[11px] text-muted-foreground italic",children:"—"})}),e.jsx(St,{className:"text-xs",children:xr?e.jsx(tr,{variant:"outline",className:"text-purple-600 border-purple-400 text-[10px]",children:"Reverted"}):Ye.error_message?e.jsx("span",{className:"text-destructive font-medium text-[11px]",title:Ye.error_message,children:Ye.error_message}):e.jsx("span",{className:"text-muted-foreground",children:Ye.status})}),e.jsx(St,{className:"text-right",children:!xr&&(Ye.action==="ADDED"||Ye.action==="REPLACED")&&e.jsxs(We,{variant:"ghost",size:"sm",onClick:()=>{Ee(Ye),ye(!1)},disabled:Xe,className:"h-7 text-xs text-destructive hover:bg-destructive/10",title:"Revert this single logo",children:[e.jsx(xo,{className:"w-3 h-3 mr-1"}),"Revert"]})})]},Ye.id)})})]})}),_t>0&&e.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-3 pt-2 text-xs text-muted-foreground",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("span",{children:["Showing ",e.jsx("strong",{className:"text-foreground font-semibold",children:(H-1)*se+1})," to"," ",e.jsx("strong",{className:"text-foreground font-semibold",children:Math.min(H*se,_t)})," of"," ",e.jsx("strong",{className:"text-foreground font-semibold",children:_t})," items"]}),e.jsx("span",{className:"text-muted-foreground/40",children:"•"}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{children:"Rows:"}),e.jsxs("select",{value:se,onChange:Ye=>{de(Number(Ye.target.value)),fe(1)},className:"h-7 text-xs rounded border border-border bg-background px-1.5 py-0.5 text-foreground cursor-pointer",children:[e.jsx("option",{value:10,children:"10"}),e.jsx("option",{value:25,children:"25"}),e.jsx("option",{value:50,children:"50"}),e.jsx("option",{value:100,children:"100"})]})]})]}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(We,{variant:"outline",size:"sm",disabled:H<=1,onClick:()=>fe(Ye=>Ye-1),className:"h-7 px-2.5 text-xs",children:"Previous"}),e.jsxs("span",{className:"text-xs font-medium px-2",children:["Page ",H," of ",dr]}),e.jsx(We,{variant:"outline",size:"sm",disabled:H>=dr,onClick:()=>fe(Ye=>Ye+1),className:"h-7 px-2.5 text-xs",children:"Next"})]})]})]}):null,e.jsxs(ka,{className:"flex items-center justify-between sm:justify-between pt-3 border-t",children:[e.jsxs("div",{className:"text-xs text-muted-foreground",children:["Total items: ",(I==null?void 0:I.items.length)||0]}),e.jsxs("div",{className:"flex items-center gap-2",children:[I&&e.jsxs(We,{variant:"outline",size:"sm",onClick:()=>tt(I.upload_id),className:"gap-1.5 text-xs",children:[e.jsx(jo,{className:"w-3.5 h-3.5"}),"Download Full Excel"]}),e.jsx(We,{variant:"default",size:"sm",onClick:()=>J(!1),children:"Close"})]})]})]})}),e.jsx(Un,{open:!!rt,onOpenChange:Ye=>!Ye&&xt(null),children:e.jsxs(zn,{className:"max-w-3xl flex flex-col p-6 w-[95vw]",children:[e.jsx($n,{children:e.jsxs("div",{className:"flex items-start justify-between pr-6 gap-3",children:[e.jsxs("div",{children:[e.jsxs(Vn,{className:"text-lg flex items-center gap-2",children:[e.jsx(md,{className:"w-5 h-5 text-primary"}),e.jsxs("span",{children:["Logo Inspector: ",rt==null?void 0:rt.product_name]})]}),e.jsxs(ha,{className:"font-mono text-xs mt-1",children:["File in ZIP: ",rt==null?void 0:rt.file_name_in_zip," ",(rt==null?void 0:rt.product_id)&&`• ID: ${rt.product_id}`]})]}),e.jsx("div",{className:"flex items-center gap-2",children:rt&&Ft(rt.action)})]})}),e.jsxs("div",{className:"flex flex-col sm:flex-row items-stretch sm:items-center justify-between bg-muted/50 p-2.5 rounded-lg border border-border/70 gap-2.5 text-xs",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-muted-foreground font-medium",children:"Test on canvas:"}),e.jsxs("div",{className:"inline-flex rounded-md border bg-background p-0.5 gap-0.5 shadow-2xs",children:[e.jsxs(We,{type:"button",variant:He==="light"?"default":"ghost",size:"sm",onClick:()=>Tt("light"),className:"h-7 px-2.5 text-xs gap-1.5",children:[e.jsx(Pf,{className:"w-3.5 h-3.5 text-amber-500"}),"Light"]}),e.jsxs(We,{type:"button",variant:He==="checker"?"default":"ghost",size:"sm",onClick:()=>Tt("checker"),className:"h-7 px-2.5 text-xs gap-1.5",children:[e.jsx(zf,{className:"w-3.5 h-3.5 text-blue-500"}),"Grid"]}),e.jsxs(We,{type:"button",variant:He==="dark"?"default":"ghost",size:"sm",onClick:()=>Tt("dark"),className:"h-7 px-2.5 text-xs gap-1.5",children:[e.jsx(Tf,{className:"w-3.5 h-3.5 text-indigo-400"}),"Dark"]}
379)]})]}),e.jsxs("div",{className:"flex items-center justify-end gap-1.5",children:[e.jsx("span",{className:"text-xs text-muted-foreground mr-1",children:It>=0?`${It+1} of ${lt.length}`:""}),e.jsx(We,{variant:"outline",size:"sm",onClick:nr,disabled:It<=0,className:"h-7 w-7 p-0",title:"Previous item",children:e.jsx(Lh,{className:"w-4 h-4"})}),e.jsx(We,{variant:"outline",size:"sm",onClick:Cr,disabled:It>=lt.length-1,className:"h-7 w-7 p-0",title:"Next item",children:e.jsx(ei,{className:"w-4 h-4"})})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 my-2",children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("div",{className:"flex items-center justify-between text-xs font-semibold text-muted-foreground",children:[e.jsx("span",{children:"Previous Logo"}),Wt&&!Yt&&e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsxs(We,{variant:"ghost",size:"sm",className:"h-6 px-1.5 text-[11px] gap-1 text-muted-foreground hover:text-foreground",onClick:()=>Vr(Wt,"Previous logo URL copied"),children:[e.jsx(Uf,{className:"w-3 h-3"}),"Copy URL"]}),e.jsx("a",{href:Wt,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 text-[11px] text-primary hover:underline ml-1",title:"Open full image in new tab",children:e.jsx(kc,{className:"w-3 h-3"})})]})]}),e.jsx("div",{className:`h-52 rounded-lg border flex items-center justify-center p-4 overflow-hidden relative shadow-inner ${gr(He)}`,children:Yt?e.jsxs("div",{className:"flex flex-col items-center justify-center text-center p-4",children:[e.jsx(Jd,{className:"w-8 h-8 text-muted-foreground/50 mb-2"}),e.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"No custom previous logo"}),e.jsx("p",{className:"text-[11px] text-muted-foreground/60 mt-0.5",children:"Used default placeholder"})]}):Wt?e.jsx("img",{src:Wt,alt:"Previous logo",className:"max-h-full max-w-full object-contain"}):e.jsxs("div",{className:"flex flex-col items-center justify-center text-center p-4",children:[e.jsx(Jd,{className:"w-8 h-8 text-muted-foreground/50 mb-2"}),e.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"None"})]})})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("div",{className:"flex items-center justify-between text-xs font-semibold text-foreground",children:[e.jsxs("span",{className:"flex items-center gap-1.5 text-primary font-bold",children:[e.jsx(zg,{className:"w-3.5 h-3.5"})," New Uploaded Logo"]}),Ir&&e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsxs(We,{variant:"ghost",size:"sm",className:"h-6 px-1.5 text-[11px] gap-1 text-muted-foreground hover:text-foreground",onClick:()=>Vr(Ir,"New logo URL copied"),children:[e.jsx(Uf,{className:"w-3 h-3"}),"Copy URL"]}),e.jsx("a",{href:Ir,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 text-[11px] text-primary hover:underline ml-1",title:"Open full image in new tab",children:e.jsx(kc,{className:"w-3 h-3"})})]})]}),e.jsx("div",{className:`h-52 rounded-lg border flex items-center justify-center p-4 overflow-hidden relative ring-1 ring-primary/30 shadow-inner ${gr(He)}`,children:Ir?e.jsx("img",{src:Ir,alt:"New logo",className:"max-h-full max-w-full object-contain"}):e.jsxs("div",{className:"flex flex-col items-center justify-center text-center p-4",children:[e.jsx(Jd,{className:"w-8 h-8 text-muted-foreground/50 mb-2"}),e.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"No new image available"})]})})]})]}),e.jsxs(ka,{className:"flex items-center justify-between sm:justify-between pt-3 border-t",children:[e.jsx("div",{children:!zr&&((rt==null?void 0:rt.action)==="ADDED"||(rt==null?void 0:rt.action)==="REPLACED")&&e.jsxs(We,{variant:"outline",size:"sm",onClick:()=>{const Ye=rt;xt(null),Ee(Ye),ye(!1)},className:"text-destructive hover:bg-destructive/10 border-destructive/30 text-xs h-8 gap-1.5",children:[e.jsx(xo,{className:"w-3.5 h-3.5"}),"Revert this logo"]})}),e.jsx(We,{variant:"default",size:"sm",onClick:()=>xt(null),className:"text-xs h-8",children:"Close Inspector"})]})]})}),e.jsx(vd,{open:!!q,onOpenChange:Ye=>!Ye&&U(null),children:e.jsxs(xd,{children:[e.jsxs(yd,{children:[e.jsxs("div",{className:"flex items-center gap-2 text-destructive",children:[e.jsx(iu,{className:"w-5 h-5"}),e.jsx(jd,{children:"Revert Entire Logo Upload Batch?"})]}),e.jsxs(bd,{className:"space-y-3 pt-2 text-sm",children:[e.jsxs("p",{children:["You are about to revert all logos modified in batch"," ",e.jsx("strong",{className:"text-foreground font-mono",children:q==null?void 0:q.upload_id.slice(0,8)})," (",q==null?void 0:q.original_zip_name,")."]}),e.jsxs("div",{className:"rounded-lg bg-amber-500/10 border border-amber-500/20 p-3 text-xs text-amber-800 dark:text-amber-300",children:[e.jsx("strong",{children:"What will happen:"}),e.jsxs("ul",{className:"list-disc list-inside mt-1 space-y-0.5",children:[e.jsx("li",{children:"Previous logos will be restored from backup storage."}),e.jsx("li",{children:"Newly added logos will be removed."}),e.jsx("li",{children:"Products updated by another operation will be skipped unless force revert is checked."})]})]}),e.jsxs("label",{className:"flex items-center gap-2 text-xs font-medium cursor-pointer pt-1",children:[e.jsx("input",{type:"checkbox",checked:Pe,onChange:Ye=>ye(Ye.target.checked),className:"rounded border-gray-300 text-primary focus:ring-primary h-4 w-4"}),"Force revert (overwrite even if product logo changed subsequently)"]})]})]}),e.jsxs(wd,{children:[e.jsx(Nd,{disabled:Xe,children:"Cancel"}),e.jsxs(Sd,{onClick:Ye=>{Ye.preventDefault(),$e()},disabled:Xe,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90 gap-1.5",children:[Xe?e.jsx(Vs,{className:"w-4 h-4 animate-spin"}):e.jsx(xo,{className:"w-4 h-4"}),"Yes, Revert All"]})]})]})}),e.jsx(vd,{open:!!ge,onOpenChange:Ye=>!Ye&&Ee(null),children:e.jsxs(xd,{children:[e.jsxs(yd,{children:[e.jsxs("div",{className:"flex items-center gap-2 text-destructive",children:[e.jsx(xo,{className:"w-5 h-5"}),e.jsx(jd,{children:"Revert Product Logo?"})]}),e.jsxs(bd,{className:"space-y-2 pt-2 text-sm",children:[e.jsxs("p",{children:["Are you sure you want to revert the logo change for"," ",e.jsx("strong",{className:"text-foreground",children:ge==null?void 0:ge.product_name}),"?"]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:(ge==null?void 0:ge.action)==="REPLACED"?"The previous logo will be restored from backup storage.":"The logo added during this upload will be removed."})]})]}),e.jsxs(wd,{children:[e.jsx(Nd,{disabled:Xe,children:"Cancel"}),e.jsxs(Sd,{onClick:Ye=>{Ye.preventDefault(),ht()},disabled:Xe,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90 gap-1.5",children:[Xe?e.jsx(Vs,{className:"w-4 h-4 animate-spin"}):e.jsx(xo,{className:"w-4 h-4"}),"Revert Logo"]})]})]})})]})}function tx(){const{toast:r}=Yn(),d=ne.useRef(null),[s,_]=ne.useState([]),[z,te]=ne.useState(null),[ue,w]=ne.useState(!1),[O,t]=ne.useState([]),[f,v]=ne.useState(!1),[m,y]=ne.useState(""),C=vt=>{t(Lr=>Lr.includes(vt)?Lr.filter(Er=>Er!==vt):[...Lr,vt])},[S,g]=ne.useState(["domain","Website","Headquarter","CompanySize"]),[j,A]=ne.useState(!0),[I,M]=ne.useState(!1),[B,W]=ne.useState(""),Y=()=>{g(s.map(vt=>vt.db_name))},J=()=>{g(["domain","Website","Headquarter","CompanySize"])},le=()=>{g([])},ae=vt=>{g(Lr=>Lr.includes(vt)?Lr.filter(Er=>Er!==vt):[...Lr,vt])},[Z,oe]=ne.useState([]),[H,fe]=ne.useState(!1),[se,de]=ne.useState(0),[q,U]=ne.useState(1),ge=15,[Ee,Xe]=ne.useState("ALL"),[re,Pe]=ne.useState(null),[ye,Se]=ne.useState(null),[Le,st]=ne.useState(!1),[Ke,rt]=ne.useState(!1),[xt,He]=ne.useState(""),[Tt,Kt]=ne.useState("ALL"),[Jt,rr]=ne.useState(1),[Ht,yr]=ne.useState(25),[gr,Vr]=ne.useState(null),[jr,Xr]=ne.useState(null),[et,ft]=ne.useState(!1),[je,$e]=ne.useState(!1),[ht,tt]=ne.useState(null),Ze=()=>localStorage.getItem("access_token")||localStorage.getItem("authToken"),Ft=()=>{r({title:"Session Expired",description:"Please log in again.",variant:"destructive"}),An(),window.location.href="/login"},lt=ne.useCallback(async()=>{try{const vt=Ze(),Lr=await fetch("https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net/admin/bulk_upload/companies/columns",{headers:{Authorization:`Bearer ${vt}`,"Content-Type":"application/json"}});if(Lr.status===401){Ft();return}if(Lr.ok){const Er=await Lr.json();_(Er||[])}}catch(vt){console.error("Failed to load columns:",vt)}},[]),_t=ne.useCallback(async(vt=!1)=>{vt||fe(!0);try{const Lr=Ze();let Er=`https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net/admin/bulk_upload/companies/batches?page=${q}&limit=${ge}`;Ee!=="ALL"&&(Er+=`&status=${Ee}`);const or=await fetch(Er,{headers:{Authorization:`Bearer ${Lr}`,"Content-Type":"application/json"}});if(or.status===401){Ft();return}if(or.ok){const as=await or.json();oe(as.batches||[]),de(as.total||0)}else{const as=await or.json().catch(()=>({}));vt||r({title:"Error fetching batches",description:as.detail||"Failed to load company bulk update jobs",variant:"destructive"})}}catch(Lr){console.error("Error fetching batches:",Lr),vt||r({title:"Network Error",description:"Could not connect to the company bulk update service.",variant:"destructive"})}finally{vt||fe(!1)}},[q,Ee]);ne.useEffect(()=>{lt()},[lt]),ne.useEffect(()=>{_t()},[_t]),ne.useEffect(()=>{if(!Z.some(Er=>Er.status==="PROCESSING"))return;const Lr=setInterval(()=>{_t(!0),Ke&&re&&Wt(re,!0)},4e3);return()=>clearInterval(Lr)},[Z,Ke,re]);const dr=vt=>{var Er;const Lr=(Er=vt.target.files)==null?void 0:Er[0];if(Lr){const or=Lr.name.toLowerCase();if(!or.endsWith(".xlsx")&&!or.endsWith(".xls")&&!or.endsWith(".csv")){r({title:"Invalid file type",description:"Please upload an Excel (.xlsx, .xls) or CSV spreadsheet.",variant:"destructive"});return}te(Lr)}},[fr,It]=ne.useState(!1),nr=async()=>
379{if(S.length===0){r({title:"No columns selected",description:"Please select at least one column to include in the template.",variant:"destructive"});return}It(!0);try{const vt=Ze(),Lr=S.join(","),Er=`https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net/admin/bulk_upload/companies/template?column=${encodeURIComponent(Lr)}&include_data=${j?"true":"false"}`,or=await fetch(Er,{headers:{Authorization:`Bearer ${vt}`}});if(or.status===401){Ft();return}if(or.ok){const as=await or.blob(),Ws=window.URL.createObjectURL(as),Ms=document.createElement("a");Ms.href=Ws;const mn=S.length===1?S[0].toLowerCase():`${S.length}_columns`;Ms.download=`companies_${j?"all_data":"template"}_${mn}.xlsx`,document.body.appendChild(Ms),Ms.click(),window.URL.revokeObjectURL(Ws),document.body.removeChild(Ms),r({title:j?"Company Data Downloaded":"Template Downloaded",description:j?`Excel file containing all existing company records with ${S.length} column(s) downloaded.`:`Blank Excel template with ${S.length} column(s) downloaded successfully.`})}else r({title:"Download Failed",description:"Unable to generate Excel template.",variant:"destructive"})}catch(vt){console.error("Template download error:",vt),r({title:"Download Error",description:"Network error occurred while downloading template.",variant:"destructive"})}finally{It(!1)}},Cr=async()=>{if(!z){r({title:"No file selected",description:"Please select an Excel or CSV file to upload.",variant:"destructive"});return}w(!0);try{const vt=new FormData;vt.append("file",z),O.length>0&&vt.append("column",O.join(",")),vt.append("mode","upsert"),vt.append("ignore_empty_cells","true");const Lr=Ze(),Er=await fetch("https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net/admin/bulk_upload/companies/upload?background=true",{method:"POST",headers:{Authorization:`Bearer ${Lr}`},body:vt});if(Er.status===401){Ft();return}const or=await Er.json();Er.ok?(r({title:"Upload submitted successfully",description:`Batch ${or.upload_id.slice(0,8)} is now processing in the background.`}),te(null),d.current&&(d.current.value=""),_t()):r({title:"Upload failed",description:or.detail||or.message||"Failed to process company bulk update spreadsheet.",variant:"destructive"})}catch(vt){console.error("Upload error:",vt),r({title:"Upload Error",description:"An unexpected network error occurred while uploading.",variant:"destructive"})}finally{w(!1)}},Wt=async(vt,Lr=!1)=>{Lr||st(!0);try{const Er=Ze(),or=await fetch(`https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net/admin/bulk_upload/companies/batches/${vt}`,{headers:{Authorization:`Bearer ${Er}`,"Content-Type":"application/json"}});if(or.status===401){Ft();return}if(or.ok){const as=await or.json();Se(as)}else{const as=await or.json().catch(()=>({}));Lr||r({title:"Failed to load batch detail",description:as.detail||"Could not retrieve details for this batch.",variant:"destructive"})}}catch(Er){console.error("Batch detail error:",Er),Lr||r({title:"Network Error",description:"Failed to load batch details.",variant:"destructive"})}finally{Lr||st(!1)}},Ir=vt=>{Pe(vt),rt(!0),He(""),Kt("ALL"),rr(1),Wt(vt)},Yt=async()=>{if(gr){ft(!0);try{const vt=Ze(),Lr=await fetch(`https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net/admin/bulk_upload/companies/batches/${gr.upload_id}/revert?force=${je}`,{method:"POST",headers:{Authorization:`Bearer ${vt}`,"Content-Type":"application/json"}});if(Lr.status===401){Ft();return}const Er=await Lr.json();Lr.ok?(r({title:"Batch Reverted Successfully",description:Er.message||`Reverted ${Er.reverted_count} company column updates.`}),Vr(null),$e(!1),_t(),re===gr.upload_id&&Wt(gr.upload_id)):r({title:"Revert Failed",description:Er.detail||"Failed to revert batch.",variant:"destructive"})}catch(vt){console.error("Revert error:",vt),r({title:"Revert Error",description:"An error occurred while reverting the batch.",variant:"destructive"})}finally{ft(!1)}}},zr=async()=>{if(jr){ft(!0);try{const vt=Ze(),Lr=await fetch(`https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net/admin/bulk_upload/companies/items/${jr.id}/revert?force=${je}`,{method:"POST",headers:{Authorization:`Bearer ${vt}`,"Content-Type":"application/json"}});if(Lr.status===401){Ft();return}const Er=await Lr.json();Lr.ok?(r({title:"Update Reverted",description:Er.message||`Reverted ${jr.column_name} for ${jr.company_name}.`}),Xr(null),$e(!1),re&&Wt(re,!0),_t(!0)):r({title:"Revert Failed",description:Er.detail||"Failed to revert this item.",variant:"destructive"})}catch(vt){console.error("Item revert error:",vt),r({title:"Revert Error",description:"An error occurred while reverting the item.",variant:"destructive"})}finally{ft(!1)}}},Ye=async vt=>{tt(vt);try{const Lr=Ze(),Er=await fetch(`https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net/admin/bulk_upload/companies/batches/${vt}/export`,{headers:{Authorization:`Bearer ${Lr}`}});if(Er.status===401){Ft();return}if(Er.ok){const or=await Er.blob(),as=window.URL.createObjectURL(or),Ws=document.createElement("a");Ws.href=as,Ws.download=`company_update_report_${vt.slice(0,8)}.xlsx`,document.body.appendChild(Ws),Ws.click(),window.URL.revokeObjectURL(as),document.body.removeChild(Ws),r({title:"Report Exported",description:"Excel report downloaded successfully."})}else r({title:"Export Failed",description:"Could not export batch report.",variant:"destructive"})}catch(Lr){console.error("Export error:",Lr),r({title:"Export Error",description:"An error occurred while exporting the report.",variant:"destructive"})}finally{tt(null)}},Vt=vt=>{switch(vt==null?void 0:vt.toUpperCase()){case"COMPLETED":return e.jsxs(tr,{className:"bg-emerald-500/15 text-emerald-700 hover:bg-emerald-500/25 border-emerald-500/30 dark:text-emerald-400",children:[e.jsx(Fm,{className:"w-3 h-3 mr-1"})," Completed"]});case"PROCESSING":return e.jsxs(tr,{className:"bg-blue-500/15 text-blue-700 hover:bg-blue-500/25 border-blue-500/30 dark:text-blue-400",children:[e.jsx(Vs,{className:"w-3 h-3 mr-1 animate-spin"})," Processing"]});case"FAILED":return e.jsxs(tr,{variant:"destructive",children:[e.jsx(oc,{className:"w-3 h-3 mr-1"})," Failed"]});case"REVERTED":return e.jsxs(tr,{className:"bg-purple-500/15 text-purple-700 hover:bg-purple-500/25 border-purple-500/30 dark:text-purple-400",children:[e.jsx(xo,{className:"w-3 h-3 mr-1"})," Reverted"]});case"PARTIALLY_REVERTED":return e.jsxs(tr,{className:"bg-amber-500/15 text-amber-700 hover:bg-amber-500/25 border-amber-500/30 dark:text-amber-400",children:[e.jsx(xo,{className:"w-3 h-3 mr-1"})," Partially Reverted"]});default:return e.jsxs(tr,{variant:"secondary",children:[e.jsx($i,{className:"w-3 h-3 mr-1"})," ",vt]})}},lr=vt=>{switch(vt==null?void 0:vt.toUpperCase()){case"APPLIED":case"COMPLETED":return e.jsx(tr,{className:"bg-emerald-500/15 text-emerald-700 border-emerald-500/30 dark:text-emerald-400",children:"Applied"});case"REVERTED":return e.jsx(tr,{className:"bg-purple-500/15 text-purple-700 border-purple-500/30 dark:text-purple-400",children:"Reverted"});case"SKIPPED":return e.jsx(tr,{variant:"outline",className:"text-amber-600 border-amber-400 dark:text-amber-400",children:"Skipped"});case"FAILED":return e.jsx(tr,{variant:"destructive",children:"Failed"});default:return e.jsx(tr,{variant:"secondary",children:vt})}}
379,xr=((ye==null?void 0:ye.items)||[]).filter(vt=>{var Ms,mn;const Lr=xt.toLowerCase().trim(),Er=!Lr||((Ms=vt.company_name)==null?void 0:Ms.toLowerCase().includes(Lr))||((mn=vt.column_name)==null?void 0:mn.toLowerCase().includes(Lr))||vt.new_value&&vt.new_value.toLowerCase().includes(Lr)||vt.old_value&&vt.old_value.toLowerCase().includes(Lr)||vt.error_message&&vt.error_message.toLowerCase().includes(Lr),or=(vt.status||"").toUpperCase(),as=(vt.action||"").toUpperCase();let Ws=!0;return Tt==="FAILED"?Ws=or==="FAILED"||as==="FAILED"||as==="NOT_FOUND":Tt==="UPDATED"||Tt==="APPLIED"?Ws=as==="UPDATED"||or==="APPLIED":Tt==="SKIPPED"?Ws=as==="SKIPPED"||or==="SKIPPED":Tt==="REVERTED"&&(Ws=or==="REVERTED"||as==="REVERTED"),Er&&Ws}),Pr=xr.length,Ur=Math.max(1,Math.ceil(Pr/Ht)),yn=xr.slice((Jt-1)*Ht,Jt*Ht);return e.jsxs("div",{className:"space-y-6",children:[e.jsxs(ds,{className:"border-border/80 shadow-sm",children:[e.jsx(Rs,{children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"p-2.5 rounded-xl bg-primary/10 text-primary",children:e.jsx(Ol,{className:"w-6 h-6"})}),e.jsxs("div",{children:[e.jsx(Ds,{className:"text-xl",children:"Bulk Company Update"}),e.jsx(fa,{children:"Update company attributes (e.g. domain, website, headquarter, company size) in bulk via Excel or CSV spreadsheet. Matches companies by name or ID with full audit history and one-click rollback."})]})]})}),e.jsxs(us,{className:"space-y-6",children:[e.jsxs("div",{className:"flex flex-col gap-3 p-4 rounded-xl bg-muted/40 border border-border/60",children:[e.jsxs("div",{className:"flex flex-col lg:flex-row items-start lg:items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"p-2 rounded-lg bg-primary/10 text-primary shrink-0",children:e.jsx(fd,{className:"w-5 h-5"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium",children:"Download Pre-filled Companies Excel"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Download a spreadsheet with all existing companies and selected columns pre-populated from the database. Edit values directly and re-upload."})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-3 w-full lg:w-auto",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(od,{id:"include-existing-data",checked:j,onCheckedChange:vt=>A(!!vt)}),e.jsx("label",{htmlFor:"include-existing-data",className:"text-xs font-medium text-foreground cursor-pointer select-none whitespace-nowrap",children:"Include all existing company data"})]}),e.jsxs(Ro,{open:I,onOpenChange:M,children:[e.jsx(Mo,{asChild:!0,children:e.jsxs(We,{variant:"outline",size:"sm",className:"w-full sm:w-[240px] h-9 text-xs justify-between font-normal bg-background hover:bg-muted",children:[e.jsx("span",{className:"truncate",children:S.length===0?"Select columns...":S.length===s.length&&s.length>0?`All Columns (${S.length})`:`${S.length} column${S.length>1?"s":""} selected`}),e.jsx(pd,{className:"w-3.5 h-3.5 opacity-50 shrink-0 ml-1.5"})]})}),e.jsxs(Fo,{className:"w-[320px] p-3 space-y-2.5",align:"end",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-xs font-semibold text-foreground",children:"Select Columns"}),e.jsxs("span",{className:"text-[11px] text-muted-foreground",children:[S.length," of ",s.length]})]}),e.jsxs("div",{className:"relative",children:[e.jsx(bo,{className:"w-3.5 h-3.5 absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground"}),e.jsx(pr,{placeholder:"Search column...",value:B,onChange:vt=>W(vt.target.value),className:"pl-8 h-8 text-xs"})]})]}),e.jsxs("div",{className:"flex items-center gap-1.5 pt-1 border-t border-border/60",children:[e.jsx(We,{type:"button",variant:"ghost",size:"sm",onClick:J,className:"h-6 px-2 text-[11px]",children:"Common (4)"}),e.jsx(We,{type:"button",variant:"ghost",size:"sm",onClick:Y,className:"h-6 px-2 text-[11px]",children:"All"}),e.jsx(We,{type:"button",variant:"ghost",size:"sm",onClick:le,className:"h-6 px-2 text-[11px] text-muted-foreground hover:text-foreground",children:"Clear"})]}),e.jsx("div",{className:"max-h-[220px] overflow-y-auto space-y-0.5 pr-1 border border-border/50 rounded-md p-1",children:s.filter(vt
379=>vt.db_name.toLowerCase().includes(B.toLowerCase())).map(vt=>{const Lr=S.includes(vt.db_name);return e.jsxs("div",{onClick:()=>ae(vt.db_name),className:"flex items-center gap-2.5 p-1.5 rounded hover:bg-muted/70 cursor-pointer transition-colors",children:[e.jsx(od,{checked:Lr,onCheckedChange:()=>ae(vt.db_name),onClick:Er=>Er.stopPropagation(),className:"h-3.5 w-3.5"}),e.jsx("span",{className:"text-xs font-medium text-foreground truncate",children:vt.db_name})]},vt.db_name)})}),e.jsx("div",{className:"flex items-center justify-end pt-1",children:e.jsx(We,{size:"sm",onClick:()=>M(!1),className:"h-7 px-3 text-xs",children:"Done"})})]})]}),e.jsxs(We,{variant:"outline",size:"sm",onClick:nr,disabled:fr||S.length===0,className:"gap-1.5 shrink-0 font-medium",children:[fr?e.jsx(Vs,{className:"w-4 h-4 animate-spin"}):e.jsx(jo,{className:"w-4 h-4"}),j?"Download with All Data":"Download Blank Template"]})]})]}),S.length>0&&e.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 pt-2 border-t border-border/40",children:[e.jsx("span",{className:"text-[11px] text-muted-foreground font-medium mr-1",children:"Columns in template:"}),e.jsx(tr,{variant:"outline",className:"text-[11px] bg-background/50 border-primary/30 text-primary font-mono",children:"Name (Identifier • Cannot be modified)"}),S.map(vt=>e.jsxs(tr,{variant:"secondary",className:"text-[11px] gap-1 pl-2 pr-1 py-0.5 font-mono",children:[e.jsx("span",{children:vt}),e.jsx("button",{type:"button",onClick:()=>ae(vt),className:"hover:text-destructive hover:bg-muted rounded-full p-0.5",title:`Remove ${vt}`,children:e.jsx(fn,{className:"w-2.5 h-2.5"})})]},vt)),S.length>0&&e.jsx("button",{type:"button",onClick:le,className:"text-[11px] text-muted-foreground hover:text-destructive underline ml-1 cursor-pointer",children:"Clear all"})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"p-3.5 rounded-lg bg-muted/40 border border-border/60 flex items-start gap-3",children:[e.jsx(Ol,{className:"w-4 h-4 text-primary shrink-0 mt-0.5"}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("p",{className:"text-xs font-medium text-foreground",children:"Direct Company Column Update"}),e.jsxs("p",{className:"text-[11px] text-muted-foreground leading-relaxed",children:["Upload your spreadsheet. Non-empty column cells will update matching company records in the database (",e.jsx("strong",{children:"Company Name is strictly used as the lookup identifier and cannot be modified"}),"). If a cell or row is empty, it is directly skipped without modifying existing data. You can revert any changes anytime from the Batch History below."]})]})]}),e.jsxs("div",{className:"p-3.5 rounded-lg border border-border/70 bg-card/60 space-y-2.5",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-2",children:[e.jsxs("div",{children:[e.jsx(pt,{className:"text-xs font-semibold text-foreground flex items-center gap-1.5",children:e.jsx("span",{children:"Columns to Update"})}),e.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Select specific columns to update from your file, or keep Auto to update all matching columns."})]}),e.jsx("div",{className:"flex items-center gap-2",children:e.jsxs(Ro,{open:f,onOpenChange:v,children:[e.jsx(Mo,{asChild:!0,children:e.jsxs(We,{variant:"outline",size:"sm",className:"h-8 justify-between text-xs gap-2 min-w-[210px]",children:[e.jsx("span",{className:"truncate",children:O.length===0?"All Columns in File (Auto)":O.length===1?`1 Column: ${O[0]}`:`${O.length} Columns Selected`}),e.jsx(pd,{className:"w-3.5 h-3.5 text-muted-foreground shrink-0"})]})}),e.jsxs(Fo,{className:"w-[300px] p-3 space-y-2.5",align:"end",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-xs font-semibold text-foreground",children:"Target Columns to Update"}),e.jsx(We,{variant:"ghost",size:"sm",onClick:()=>t([]),className:"h-6 px-2 text-[11px] text-muted-foreground hover:text-foreground",children:"Auto (All)"})]}),e.jsxs("div",{className:"relative",children:[e.jsx(bo,{className:"w-3.5 h-3.5 absolute left-2.5 top-2.5 text-muted-foreground"}),e.jsx(pr,{placeholder:"Search company columns...",value:m,onChange:vt=>y(vt.target.value),className:"h-8 pl-8 text-xs"})]}),e.jsx("div",{className:"max-h-[200px] overflow-y-auto space-y-0.5 pr-1 border border-border/50 rounded-md p-1",children:s.filter(vt
379=>vt.db_name.toLowerCase().includes(m.toLowerCase())).map(vt=>{const Lr=O.includes(vt.db_name);return e.jsxs("div",{onClick:()=>C(vt.db_name),className:"flex items-center gap-2.5 p-1.5 rounded hover:bg-muted/70 cursor-pointer transition-colors",children:[e.jsx(od,{checked:Lr,onCheckedChange:()=>C(vt.db_name),onClick:Er=>Er.stopPropagation(),className:"h-3.5 w-3.5"}),e.jsx("span",{className:"text-xs font-medium text-foreground truncate",children:vt.db_name})]},vt.db_name)})}),e.jsxs("div",{className:"flex items-center justify-between pt-1",children:[e.jsx("span",{className:"text-[11px] text-muted-foreground",children:O.length===0?"Auto: all matching columns":`${O.length} selected`}),e.jsx(We,{size:"sm",onClick:()=>v(!1),className:"h-7 px-3 text-xs",children:"Done"})]})]})]})})]}),O.length>0?e.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 pt-1 border-t border-border/40",children:[e.jsx("span",{className:"text-[11px] text-muted-foreground font-medium mr-1",children:"Will update only:"}),O.map(vt=>e.jsxs(tr,{variant:"secondary",className:"text-[11px] gap-1 pl-2 pr-1 py-0.5 font-mono",children:[e.jsx("span",{children:vt}),e.jsx("button",{type:"button",onClick:()=>C(vt),className:"hover:text-destructive hover:bg-muted rounded-full p-0.5",title:`Remove ${vt}`,children:e.jsx(fn,{className:"w-2.5 h-2.5"})})]},vt)),e.jsx("button",{type:"button",onClick:()=>t([]),className:"text-[11px] text-muted-foreground hover:text-destructive underline ml-1 cursor-pointer",children:"Reset to Auto"})]}):e.jsxs("div",{className:"flex items-center gap-1.5 pt-1 text-[11px] text-muted-foreground",children:[e.jsx("span",{children:"Selected mode:"}),e.jsx(tr,{variant:"outline",className:"text-[11px] bg-background/50 border-primary/30 text-primary font-mono",children:"Auto — All matching columns in spreadsheet will be updated"})]})]}),e.jsxs("div",{className:`border-2 border-dashed rounded-xl p-6 text-center transition-all cursor-pointer ${z?"border-primary/50 bg-primary/5":"border-border hover:border-primary/40 hover:bg-muted/30"}`,onClick:()=>{var vt;return(vt=d.current)==null?void 0:vt.click()},children:[e.jsx("input",{ref:d,type:"file",accept:".xlsx,.xls,.csv",className:"hidden",onChange:dr}),e.jsxs("div",{className:"flex flex-col items-center justify-center gap-2",children:[e.jsx("div",{className:"p-3 rounded-full bg-primary/10 text-primary",children:e.jsx(Bo,{className:"w-6 h-6"})}),z?e.jsxs("div",{children:[e.jsx("p",{className:"font-medium text-sm text-foreground",children:z.name}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[(z.size/1024).toFixed(1)," KB • Ready to upload"]})]}):e.jsxs("div",{children:[e.jsx("p",{className:"font-medium text-sm text-foreground",children:"Click to browse or drag and drop your spreadsheet"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Supports Excel (.xlsx, .xls) and CSV (.csv) files"})]})]})]}),e.jsxs("div",{className:"flex items-center justify-between pt-2",children:[z?e.jsx(We,{variant:"ghost",size:"sm",onClick:()=>{te(null),d.current&&(d.current.value="")},className:"text-xs text-muted-foreground hover:text-foreground",children:"Clear Selection"}):e.jsx("div",{}),e.jsx(We,{onClick:Cr,disabled:!z||ue,className:"gap-2 px-6",children:ue?e.jsxs(e.Fragment,{children:[e.jsx(Vs,{className:"w-4 h-4 animate-spin"}),"Uploading..."]}):e.jsxs(e.Fragment,{children:[e.jsx(Bo,{className:"w-4 h-4"}),"Upload & Process"]})})]})]})]})]}),e.jsxs(ds,{className:"border-border/80 shadow-sm",children:[e.jsx(Rs,{children:e.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsxs(Ds,{className:"text-lg flex items-center gap-2",children:["Company Update Batches",e.jsxs(tr,{variant:"secondary",className:"text-xs font-normal",children:[se," total"]})]}),e.jsx(fa,{children:"Audit history of bulk company update jobs with row counts, statuses, and rollback actions."})]}),e.jsxs("div",{className:"flex items-center gap-2 w-full sm:w-auto",children:[e.jsxs(wo,{value:Ee,onValueChange:Xe,children:[e.jsx(No,{className:"w-[140px] h-9 text-xs",children:e.jsx(So,{placeholder:"Filter status"})}),e.jsxs(Co,{children:[e.jsx(Ys,{value:"ALL",children:"All Statuses"}),e.jsx(Ys,{value:"PROCESSING",children:"Processing"}),e.jsx(Ys,{value:"COMPLETED",children:"Completed"}),e.jsx(Ys,{value:"FAILED",children:"Failed"}),e.jsx(Ys,{value:"REVERTED",children:"Reverted"}),e.jsx(Ys,{value:"PARTIALLY_REVERTED",children:"Partially Reverted"})]})]}),e.jsxs(We,{variant:"outline",size:"sm",onClick:()=>_t(),disabled:H,className:"gap-1.5 h-9",children:[e.jsx(Ai,{className:`w-3.5 h-3.5 ${H?"animate-spin":""}`}),"Refresh"]})]})]})}),e.jsx(us,{children:H&&Z.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-muted-foreground gap-2",children:[e.jsx(Vs,{className:"w-8 h-8 animate-spin text-primary"}),e.jsx("p",{className:"text-sm",children:"Loading company update batches..."})]}):Z.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-muted-foreground gap-2",children:[e.jsx(Ol,{className:"w-10 h-10 stroke-1 text-muted-foreground
379/50"}),e.jsx("p",{className:"text-sm font-medium",children:"No company bulk update jobs found"}),e.jsx("p",{className:"text-xs",children:"Upload an Excel or CSV file to start your first batch update."})]}):e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"rounded-lg border border-border/80 overflow-hidden",children:e.jsxs(Rn,{children:[e.jsx(Mn,{className:"bg-muted/40",children:e.jsxs(Gr,{children:[e.jsx(Lt,{className:"w-[180px]",children:"Date & ID"}),e.jsx(Lt,{children:"File & Target"}),e.jsx(Lt,{children:"Mode"}),e.jsx(Lt,{className:"text-center",children:"Matched"}),e.jsx(Lt,{className:"text-center",children:"Updated"}),e.jsx(Lt,{className:"text-center",children:"Skipped"}),e.jsx(Lt,{className:"text-center",children:"Failed"}),e.jsx(Lt,{children:"Status"}),e.jsx(Lt,{className:"text-right",children:"Actions"})]})}),e.jsx(Fn,{children:Z.map(vt=>e.jsxs(Gr,{className:"hover:bg-muted/20",children:[e.jsx(St,{children:e.jsxs("div",{className:"flex flex-col",children:[e.jsx("span",{className:"text-xs font-medium text-foreground",children:vt.created_at?new Date(vt.created_at).toLocaleDateString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}):"—"}),e.jsxs("span",{className:"text-[11px] font-mono text-muted-foreground",children:[vt.upload_id.slice(0,8),"..."]})]})}),e.jsx(St,{children:e.jsxs("div",{className:"flex flex-col max-w-[200px]",children:[e.jsx("span",{className:"text-xs font-medium text-foreground truncate",title:vt.original_file_name||"",children:vt.original_file_name||"Spreadsheet"}),e.jsxs("span",{className:"text-[11px] text-muted-foreground",children:["Col: ",e.jsx("strong",{className:"text-foreground",children:vt.target_column||"DYNAMIC"})]})]})}),e.jsx(St,{children:e.jsx(tr,{variant:"outline",className:"text-[11px] uppercase tracking-wider font-normal",children:vt.mode||"upsert"})}),e.jsxs(St,{className:"text-center text-xs font-medium",children:[vt.matched_count," / ",vt.total_rows]}),e.jsx(St,{className:"text-center text-xs font-semibold text-emerald-600 dark:text-emerald-400",children:vt.updated_count}),e.jsx(St,{className:"text-center text-xs text-amber-600 dark:text-amber-400",children:vt.skipped_count}
379),e.jsx(St,{className:"text-center text-xs text-rose-600 dark:text-rose-400",children:vt.failed_count}),e.jsx(St,{children:Vt(vt.status)}),e.jsx(St,{className:"text-right",children:e.jsxs("div",{className:"flex items-center justify-end gap-1.5",children:[e.jsxs(We,{variant:"ghost",size:"sm",onClick:()=>Ir(vt.upload_id),className:"h-8 px-2.5 text-xs gap-1",title:"View Details",children:[e.jsx(Wi,{className:"w-3.5 h-3.5"}),"Details"]}),e.jsx(We,{variant:"ghost",size:"sm",onClick:()=>Ye(vt.upload_id),disabled:ht===vt.upload_id,className:"h-8 px-2 text-xs",title:"Export Excel Report",children:ht===vt.upload_id?e.jsx(Vs,{className:"w-3.5 h-3.5 animate-spin"}):e.jsx(jo,{className:"w-3.5 h-3.5"})}),vt.status!=="REVERTED"&&vt.status!=="FAILED"&&vt.status!=="PROCESSING"&&e.jsx(We,{variant:"ghost",size:"sm",onClick:()=>{Vr(vt),$e(!1)},className:"h-8 px-2 text-xs text-rose-600 hover:text-rose-700 hover:bg-rose-50 dark:hover:bg-rose-950/30",title:"Revert Batch",children:e.jsx(xo,{className:"w-3.5 h-3.5"})})]})})]},vt.upload_id))})]})}),se>ge&&e.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground pt-2",children:[e.jsxs("span",{children:["Showing ",(q-1)*ge+1," to ",Math.min(q*ge,se)," of ",se," batches"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(We,{variant:"outline",size:"sm",onClick:()=>U(vt=>Math.max(1,vt-1)),disabled:q<=1,className:"h-8 px-3 text-xs",children:"Previous"}),e.jsxs("span",{className:"text-xs font-medium",children:["Page ",q]}),e.jsx(We,{variant:"outline",size:"sm",onClick:()=>U(vt=>vt+1),disabled:q*ge>=se,className:"h-8 px-3 text-xs",children:"Next"})]})]})]})})]}),e.jsx(Un,{open:Ke,onOpenChange:rt,children:e.jsxs(zn,{className:"max-w-5xl max-h-[90vh] flex flex-col p-6",children:[e.jsx($n,{className:"pb-3 border-b border-border/60",children:e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs(Vn,{className:"text-lg flex items-center gap-2",children:[e.jsx(Ol,{className:"w-5 h-5 text-primary"}),"Batch Details & Audit Trail"]}),e.jsx(ha,{className:"text-xs",children:"Review itemized company column updates, previous vs. new values, and status."})]}),ye&&Vt(ye.status)]})}),Le?e.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-muted-foreground gap-2",children:[e.jsx(Vs,{className:"w-8 h-8 animate-spin text-primary"}),e.jsx("p",{className:"text-sm",children:"Loading batch details..."})]}):ye?e.jsxs("div",{className:"flex-1 flex flex-col space-y-4 overflow-hidden pt-2",children:[e.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-5 gap-3 shrink-0",children:[e.jsxs("button",{type:"button",onClick:()=>{Kt("ALL"),rr(1)},className:`p-3 rounded-lg border text-left transition-all cursor-pointer ${Tt==="ALL"?"bg-muted/80 border-primary ring-1 ring-primary/40 shadow-sm":"bg-muted/40 border-border/60 hover:bg-muted/60"}`,title:"Click to view all items",children:[e.jsx("p",{className:"text-[11px] text-muted-foreground font-medium",children:"Total Rows"}),e.jsx("p",{className:"text-lg font-bold text-foreground",children:ye.total_rows})]}),e.jsxs("div",{className:"p-3 rounded-lg bg-muted/40 border border-border/60",children:[e.jsx("p",{className:"text-[11px] text-muted-foreground font-medium",children:"Matched"}),e.jsx("p",{className:"text-lg font-bold text-foreground",children:ye.matched_count})]}),e.jsxs("button",{type:"button",onClick:()=>{Kt("UPDATED"),rr(1)},className:`p-3 rounded-lg border text-left transition-all cursor-pointer ${Tt==="UPDATED"?"bg-emerald-500/20 border-emerald-500 ring-1 ring-emerald-500 shadow-sm":"bg-emerald-500/10 border-emerald-500/20 hover:bg-emerald-500/15"}`,title:"Click to filter by Updated items",children:[e.jsx("p",{className:"text-[11px] text-emerald-700 dark:text-emerald-400 font-medium",children:"Updated"}),e.jsx("p",{className:"text-lg font-bold text-emerald-700 dark:text-emerald-400",children:ye.updated_count})]}),e.jsxs("button",{type:"button",onClick:()=>{Kt("SKIPPED"),rr(1)},className:`p-3 rounded-lg border text-left transition-all cursor-pointer ${Tt==="SKIPPED"?"bg-amber-500/20 border-amber-500 ring-1 ring-amber-500 shadow-sm":"bg-amber-500/10 border-amber-500/20 hover:bg-amber-500/15"}`,title:"Click to filter by Skipped items",children:[e.jsx("p",{className:"text-[11px] text-amber-700 dark:text-amber-400 font-medium",children:"Skipped"}),e.jsx("p",{className:"text-lg font-bold text-amber-700 dark:text-amber-400",children:ye.skipped_count})]}),e.jsxs("button",{type:"button",onClick:()=>{Kt("FAILED"),rr(1)},className:`p-3 rounded-lg border text-left transition-all cursor-pointer ${Tt==="FAILED"?"bg-rose-500/20 border-rose-500 ring-2 ring-rose-500 shadow-sm":"bg-rose-500/10 border-rose-500/20 hover:bg-rose-500/15"}`,title:"Click to filter by Failed items",children:[e.jsxs("p",{className:"text-[11px] text-rose-700 dark:text-rose-400 font-medium flex items-center justify-between",children:[e.jsx("span",{children:"Failed"}),ye.failed_count>0&&e.jsx("span",{className:"w-2 h-2 rounded-full bg-rose-500 animate-pulse"})]}),e.jsx("p",{className:"text-lg font-bold text-rose-700 dark:text-rose-400",children:ye.failed_count})]})]}),e.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-3 shrink-0",children:[e.jsxs("div",{className:"relative w-full sm:w-64",children:[e.jsx(bo,{className:"w-3.5 h-3.5 absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"}
379),e.jsx(pr,{placeholder:"Search company or column...",value:xt,onChange:vt=>{He(vt.target.value),rr(1)},className:"pl-9 h-9 text-xs"})]}),e.jsxs("div",{className:"flex items-center gap-2 w-full sm:w-auto",children:[e.jsxs(wo,{value:Tt,onValueChange:vt=>{Kt(vt),rr(1)},children:[e.jsx(No,{className:"w-[180px] h-9 text-xs",children:e.jsx(So,{placeholder:"Filter items"})}),e.jsxs(Co,{children:[e.jsx(Ys,{value:"ALL",children:"All Items"}),e.jsxs(Ys,{value:"FAILED",children:["Failed / Not Found (",ye.failed_count,")"]}),e.jsxs(Ys,{value:"UPDATED",children:["Updated / Applied (",ye.updated_count,")"]}),e.jsxs(Ys,{value:"SKIPPED",children:["Skipped (",ye.skipped_count,")"]}),e.jsx(Ys,{value:"REVERTED",children:"Reverted"})]})]}),e.jsxs(wo,{value:String(Ht),onValueChange:vt=>{yr(Number(vt)),rr(1)},children:[e.jsx(No,{className:"w-[100px] h-9 text-xs",children:e.jsx(So,{placeholder:"Page size"})}),e.jsxs(Co,{children:[e.jsx(Ys,{value:"10",children:"10 / page"}),e.jsx(Ys,{value:"25",children:"25 / page"}),e.jsx(Ys,{value:"50",children:"50 / page"}),e.jsx(Ys,{value:"100",children:"100 / page"})]})]})]})]}),e.jsx("div",{className:"flex-1 overflow-auto max-h-[48vh] rounded-lg border border-border/80",children:e.jsxs(Rn,{children:[e.jsx(Mn,{className:"bg-muted/40 sticky top-0 z-10",children:e.jsxs(Gr,{children:[e.jsx(Lt,{className:"w-[180px]",children:"Company Name"}),e.jsx(Lt,{className:"w-[120px]",children:"Column"}),e.jsx(Lt,{children:"Previous Value"}),e.jsx(Lt,{children:"New Value"}),e.jsx(Lt,{className:"w-[90px]",children:"Status"}),e.jsx(Lt,{children:"Notes / Error"}),e.jsx(Lt,{className:"text-right w-[90px]",children:"Action"})]})}),e.jsx(Fn,{children:yn.length===0?e.jsx(Gr,{children:e.jsx(St,{colSpan:7,className:"text-center py-8 text-muted-foreground text-xs",children:"No company update records match your search or filter."})}):yn.map(vt=>e.jsxs(Gr,{className:"hover:bg-muted/20",children:[e.jsx(St,{className:"font-medium text-xs text-foreground",children:vt.company_name}),e.jsx(St,{children:e.jsx(tr,{variant:"outline",className:"text-[11px] font-mono",children:vt.column_name})}),e.jsx(St,{className:"text-xs text-muted-foreground max-w-[160px] truncate",title:vt.old_value||"(empty)",children:vt.old_value?vt.old_value:e.jsx("span",{className:"italic opacity-60",children:"(empty)"})}),e.jsx(St,{className:"text-xs font-semibold text-emerald-600 dark:text-emerald-400 max-w-[160px] truncate",title:vt.new_value||"",children:vt.new_value||"—"}),e.jsx(St,{children:lr(vt.status)}),e.jsx(St,{className:"text-xs text-muted-foreground max-w-[200px] truncate",title:vt.error_message||"",children:vt.error_message||"—"}),e.jsx(St,{className:"text-right",children:vt.status!=="REVERTED"&&vt.status!=="FAILED"&&vt.status!=="SKIPPED"&&e.jsxs(We,{variant:"ghost",size:"sm",onClick:()=>{Xr(vt),$e(!1)},className:"h-7 px-2 text-xs text-rose-600 hover:text-rose-700 hover:bg-rose-50 dark:hover:bg-rose-950/30 gap-1",title:"Revert single column update",children:[e.jsx(xo,{className:"w-3 h-3"}),"Revert"]})})]},vt.id))})]})}),e.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground pt-1 shrink-0",children:[e.jsxs("span",{children:["Showing ",Pr===0?0:(Jt-1)*Ht+1," to"," ",Math.min(Jt*Ht,Pr)," of ",Pr," items"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(We,{variant:"outline",size:"sm",onClick:()=>rr(vt=>Math.max(1,vt-1)),disabled:Jt<=1,className:"h-8 px-3 text-xs",children:"Previous"}),e.jsxs("span",{className:"text-xs font-medium",children:["Page ",Jt," of ",Ur]}),e.jsx(We,{variant:"outline",size:"sm",onClick:()=>rr(vt=>Math.min(Ur,vt+1)),disabled:Jt>=Ur,className:"h-8 px-3 text-xs",children:"Next"})]})]})]}):null,e.jsxs(ka,{className:"pt-4 border-t border-border/60 flex items-center justify-between sm:justify-between",children:[e.jsx("div",{className:"flex items-center gap-2",children:ye&&e.jsxs(We,{variant:"outline",size:"sm",onClick:()=>Ye(ye.upload_id),disabled:ht===(ye==null?void 0:ye.upload_id),className:"gap-1.5 text-xs h-9",children:[e.jsx(jo,{className:"w-3.5 h-3.5"}),"Export Excel Report"]})}),e.jsxs("div",{className:"flex items-center gap-2",children:[ye&&ye.status!=="REVERTED"&&ye.status!=="FAILED"&&e.jsxs(We,{variant:"destructive",size:"sm",onClick:()=>{Vr(ye),$e(!1)},className:"gap-1.5 text-xs h-9",children:[e.jsx(xo,{className:"w-3.5 h-3.5"}),"Revert Entire Batch"]}),e.jsx(We,{variant:"outline",size:"sm",onClick:()=>rt(!1),className:"text-xs h-9",children:"Close"})]})]})]})}),e.jsx(vd,{open:!!gr,onOpenChange:vt=>!vt&&Vr(null),children:e.jsxs(xd,{children:[e.jsxs(yd,{children:[e.jsxs("div",{className:"flex items-center gap-2 text-rose-600",children:[e.jsx(iu,{className:"w-5 h-5"}),e.jsx(jd,{children:"Revert Entire Batch"})]}),e.jsxs(bd,{className:"space-y-3 pt-2",children:[e.jsxs("p",{children:["Are you sure you want to revert all changes made by batch"," ",e.jsx("strong",{className:"text-foreground font-mono",children:gr==null?void 0:gr.upload_id.slice(0,8)}),"?"]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"This will restore the previous values for all updated companies in this batch."}),e.jsxs("div",{className:"flex items-center space-x-2 pt-2",children:[e.jsx(od,{id:"force-revert-batch",checked:je,onCheckedChange:vt=>$e(!!vt)}),e.jsx("label",{htmlFor:"force-revert-batch",className:"text-xs text-foreground font-medium cursor-pointer",children:"Force revert even if values were changed after this batch"})]})]})]}),e.jsxs(wd,{children:[e.jsx(Nd,{disabled:et,children:"Cancel"}),e.jsx(Sd,{onClick:Yt,disabled:et,className:"bg-rose-600 hover:bg-rose-700 text-white gap-1.5",children:et?e.jsxs(e.Fragment,{children:[e.jsx(Vs,{className:"w-3.5 h-3.5 animate-spin"}),"Reverting..."]}):e.jsxs(e.Fragment,{children:[e.jsx(xo,{className:"w-3.5 h-3.5"}),"Confirm Revert"]})})]})]})}),e.jsx(vd,{open:!!jr,onOpenChange:vt=>!vt&&Xr(null),children:e.jsxs(xd,{children:[e.jsxs(yd,{children:[e.jsxs("div",{className:"flex items-center gap-2 text-rose-600",children:[e.jsx(iu,{className:"w-5 h-5"}),e.jsx(jd,{children:"Revert Column Update"})]}),e.jsxs(bd,{className:"space-y-3 pt-2",children:[e.jsxs("p",{children:["Revert column ",e.jsx("strong",{className:"text-foreground",children:jr==null?void 0:jr.column_name})," for company"," ",e.jsx("strong",{className:"text-foreground",children:jr==null?void 0:jr.company_name}),"?"]}),e.jsxs("div",{className:"text-xs p-3 rounded-lg bg-muted/50 border border-border/60 space-y-1",children:[e.jsxs("p",{children:["Current Value: ",e.jsx("span",{className:"font-semibold text-foreground",children:(jr==null?void 0:jr.new_value)||"(none)"})]}),e.jsxs("p",{children:["Will Restore To: ",e.jsx("span",{className:"font-semibold text-foreground",children:(jr==null?void 0:jr.old_value)||"(empty)"})]})]}),e.jsxs("div",{className:"flex items-center space-x-2 pt-2",children:[e.jsx(od,{id:"force-revert-item",checked:je,onCheckedChange:vt=>$e(!!vt)}),e.jsx("label",{htmlFor:"force-revert-item",className:"text-xs text-foreground font-medium cursor-pointer",children:"Force revert even if value was changed after this batch"})]})]})]}),e.jsxs(wd,{children:[e.jsx(Nd,{disabled:et,children:"Cancel"}),e.jsx(Sd,{onClick:zr,disabled:et,className:"bg-rose-600 hover:bg-rose-700 text-white gap-1.5",children:et?e.jsxs(e.Fragment,{children:[e.jsx(Vs,{className:"w-3.5 h-3.5 animate-spin"}),"Reverting..."]}):e.jsxs(e.Fragment,{children:[e.jsx(xo,{className:"w-3.5 h-3.5"}),"Confirm Revert"]})})]})]})})]})}function ap({data:r,lists:d,onEdit:s,onApprove:_,isSubmitting:z}){const te=v=>v?v.split(",").map(m=>{const y=d.categories.find(C=>C.Id===m);return(y==null?void 0:y.Name)||m}):[],ue=v=>v?v.split(",").map(m=>{const y=d.capabilities.find(C=>C.Id===m);return(y==null?void 0:y.Name)||m}):[],w=v=>v?v.split(/[;,]/).map(m=>
379m.trim()).filter(Boolean).map(m=>{const y=d.integrations.find(C=>C.Id===m);return(y==null?void 0:y.Name)||m}):[],O=v=>v?v.split(",").map(m=>{const y=d.functionalFocus.find(C=>C.Id===m);return(y==null?void 0:y.Name)||m}):[],t=v=>v?v.split(",").map(m=>{const y=d.languages.find(C=>C.Id===m);return(y==null?void 0:y.Name)||m}):[],f=v=>v?(Array.isArray(v)?v:v.split(",").map(y=>y.trim())).map(y=>{const C=d.countries.find(S=>S.id===y||S.Id===y);return(C==null?void 0:C.name)||(C==null?void 0:C.Name)||y}):[];return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h2",{className:"text-2xl font-bold",children:"Product Preview"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(We,{variant:"outline",onClick:s,disabled:z,children:"Edit"}),e.jsx(We,{onClick:_,disabled:z,children:z?"Submitting...":"Submit Product"})]})]}),e.jsxs(ds,{children:[e.jsx(Rs,{children:e.jsx(Ds,{children:"Company Information"})}),e.jsxs(us,{className:"grid md:grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Company Name"}),e.jsx("p",{className:"font-medium",children:r.companyName||Ea()})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Company Website"}),e.jsx("p",{className:"font-medium",children:r.CompanyWebsite||Ea()})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Company Address"}),e.jsx("p",{className:"font-medium",children:r.companyAddress||Ea()})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Headquarter Country"}),e.jsx("p",{className:"font-medium",children:r.headquarterCountry||Ea()})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Year Founded"}),e.jsx("p",{className:"font-medium",children:r.yearFounded||Ea()})]})]})]}),e.jsxs(ds,{children:[e.jsx(Rs,{children:e.jsx(Ds,{children:"Product Details"})}),e.jsx(us,{className:"space-y-4",children:e.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Product Name"}),e.jsx("p",{className:"font-medium",children:r.productName||Ea()})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Website"}),e.jsx("p",{className:"font-medium",children:r.website||Ea()})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Description"}),e.jsx("p",{className:"font-medium",children:r.description||Ea()})]}),e.jsxs("div",{className:"overflow-hidden",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Use Cases"}),e.jsx("p",{className:"font-medium break-words whitespace-normal overflow-wrap-anywhere",children:r.use_case||Ea()})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:"Categories"}),e.jsx("div",{className:"flex flex-wrap gap-1",children:te(r.categories).map((v,m)=>e.jsx(tr,{variant:"secondary",children:v},m))})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:"Capabilities"}),e.jsx("div",{className:"flex flex-wrap gap-1",children:ue(r.capabilities).map((v,m)=>e.jsx(tr,{variant:"secondary",children:v},m))})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:"Functional Focus"}),e.jsx("div",{className:"flex flex-wrap gap-1",children:O(r.functionalFocus).map((v,m)=>e.jsx(tr,{variant:"secondary",children:v},m))})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:"Languages"}),e.jsx("div",{className:"flex flex-wrap gap-1",children:t(r.languages).map((v,m)=>e.jsx(tr,{variant:"secondary",children:v},m))})]})]})})]}),e.jsxs(ds,{children:[e.jsx(Rs,{children:e.jsx(Ds,{children:"Contact & Business"})}),e.jsxs(us,{className:"grid md:grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Industries Served"}),e.jsx("p",{className:"font-medium",children:r.industriesServed||Ea()})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Geographical Scope"}),e.jsx("p",{className:"font-medium",children:r.geographicalScope||Ea()})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Countries Served"}),e.jsx("div",{className:"flex flex-wrap gap-1",children:f(r.countriesServed||Ea()).map((v,m)=>e.jsx(tr,{variant:"outline",children:v},m))})]})]})]}),e.jsxs(ds,{children:[e.jsx(Rs,{children:e.jsx(Ds,{children:"Technical Details"})}),e.jsxs(us,{className:"grid md:grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Automation Capabilities"}),e.jsx("p",{className:"font-medium break-all whitespace-normal",children:r.automationCapabilities||Ea()})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"AI Capabilities"}),e.jsx("p",{className:"font-medium break-all whitespace-normal",children:r.aiCapabilities||Ea()})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Other Integrations"}),e.jsx("p",{className:"font-medium break-all whitespace-normal",children:r.otherIntegrations||Ea()})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Integrates with"}),e.jsx("div",{className:"flex flex-wrap gap-1",children:w(r.integratesWith||Ea()).map((v,m)=>e.jsx(tr,{variant:"outline",children:v},m))})]})]})]}),e.jsxs(ds,{children:[e.jsx(Rs,{children:e.jsx(Ds,{children:"Security & Compliance"})}),e.jsx(us,{className:"grid md:grid-cols-2 gap-4",children:e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Security Certifications"}),e.jsx("p",{className:"font-medium",children:r.securityCertifications||Ea()})]})})]}),r.logo&&e.jsxs(ds,{children:[e.jsx(Rs,{children:e.jsx(Ds,{children:"Product Logo"})}),e.jsxs(us,{className:"flex flex-col items-center gap-3",children:[e.jsx("img",{width:1200,height:675,src:r.logo instanceof File?URL.createObjectURL(r.logo):r.logo,alt:"Product Logo",className:"max-h-40 object-contain rounded-md border p-2",loading:"lazy",decoding:"async"}),e.jsx("p",{className:"text-sm text-muted-foreground break-all",children:r.logo instanceof File?r.logo.name:r.logo})]})]}),e.jsxs("div",{className:"flex justify-end gap-2 pt-4",children:[e.jsx(We,{variant:"outline",onClick:s,disabled:z,children:"Edit"}
379),e.jsx(We,{onClick:_,disabled:z,children:z?"Submitting...":"Submit Product"})]})]})}const rx=async r=>{try{const d=localStorage.getItem("access_token"),s=await fetch("https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net/admin/company/check-name",{method:"POST",headers:{Authorization:`Bearer ${d}`,"Content-Type":"application/json"},body:JSON.stringify({name:r})});if(s.status===401)return An(),window.location.href="/login",null;const _=await s.json();return!_||_.success===!1?null:_.data}catch(d){return console.error("Company name check failed:",d),null}},sx=async(r,d)=>{try{const s=localStorage.getItem("access_token"),_=await fetch("https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net/admin/company/check-website",{method:"POST",headers:{Authorization:`Bearer ${s}`,"Content-Type":"application/json"},body:JSON.stringify({website:r,company_id:d??null})});if(_.status===401)return An(),window.location.href="/login",null;const z=await _.json();return z!=null&&z.success?z.data:null}catch(s){return console.error("Website check failed:",s),null}},nx=async({email:r,website:d})=>{try{const s=localStorage.getItem("access_token"),_=await fetch("https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net/admin/company/check-email-domain",{method:"POST",headers:{Authorization:`Bearer ${s}`,"Content-Type":"application/json"},body:JSON.stringify({email:r,website:d})});if(_.status===401)return An(),window.location.href="/login",null;const z=await _.json();return z!=null&&z.success?z.data:null}catch(s){return console.error("Email domain check failed:",s),null}};function wu({form:r,onNext:d,onCancel:s,productId:_,setCategories:z,setCapabilities:te,setFunctionalFocus:ue,setLanguages:w,initialData:O,isActive:t}){const f="https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net",v=()=>localStorage.getItem("access_token")||localStorage.getItem("authToken")||"",[m,y]=ne.useState([]),[C,S]=ne.useState([]),[g,j]=ne.useState([]),[A,I]=ne.useState([]),{toast:M}=Yn(),[B,W]=ne.useState([]),[Y,J]=ne.useState(!0),[le,ae]=ne.useState([]),[Z,oe]=ne.useState(""),[H,fe]=ne.useState(!1),[se,de]=ne.useState(""),[q,U]=ne.useState(""),[ge,Ee]=ne.useState(""),[Xe,re]=ne.useState([]),[Pe,ye]=ne.useState([]),[Se,Le]=ne.useState([]),[st,Ke]=ne.useState(!1),[rt,xt]=ne.useState(!1),[He,Tt]=ne.useState(!1),[Kt,Jt]=ne.useState(!1),[rr,Ht]=ne.useState(!1),yr=ne.useRef(!1);ne.useRef(!1);const gr=ne.useMemo(()=>m.find(tt=>tt.Id===Z),[m,Z]),Vr=H||!(gr!=null&&gr.Website),jr=async tt=>{if(!tt||tt.length<2){J(!0);return}try{const Ze=v(),Ft=new URL(`${f}/admin/add_product/check-product-name`);Ft.searchParams.append("name",tt.trim()),_&&Ft.searchParams.append("product_id",_.toString());const lt=await fetch(Ft.toString(),{headers:{Authorization:`Bearer ${Ze}`,"Content-Type":"application/json"}});if(!lt.ok)return;(await lt.json()).exists?(r.setError("productName",{type:"manual",message:"This product name is already taken"}),J(!1)):(r.clearErrors("productName"),J(!0))}catch(Ze){console.error("Name check failed:",Ze)}};ne.useEffect(()=>{async function tt(){try{const Ze=v(),Ft=await fetch(`${f}/admin/add_product/countries-served`,{headers:{Authorization:`Bearer ${Ze}`}});if(!Ft.ok)return;const lt=await Ft.json();j(lt)}catch(Ze){console.error("Failed to load countries:",Ze)}}tt()},[]),ne.useEffect(()=>{async function tt(){try{const Ze=v(),Ft=await fetch(`${f}/admin/add_product/languages`,{headers:{Authorization:`Bearer ${Ze}`}});if(!Ft.ok)return;const lt=await Ft.json();ae(lt),w(lt)}catch(Ze){console.error("Failed to load languages:",Ze)}}tt()},[f]),ne.useEffect(()=>{(async()=>{try{const Ze=v(),Ft=await fetch(`${f}/admin/company/`,{headers:{Authorization:`Bearer ${Ze}`}});if(Ft.status===401){M({title:"Session expired",description:"Please log in again.",variant:"destructive"}),An(),window.location.href="/login";return}const lt=await Ft.json();y((lt==null?void 0:lt.data)??[])}catch(Ze){console.error("Failed to fetch companies",Ze)}finally{}})()},[t]);const Xr=r.watch("companyId");ne.useEffect(()=>{const tt=r.watch("CompanyWebsite");if(!tt||tt.trim().length<3){Tt(!1);return}const Ze=r.getValues("companyId"),Ft=setTimeout(async()=>{const lt=await sx(tt.trim(),Ze);Tt(!!(lt!=null&&lt.exists))},500);return()=>clearTimeout(Ft)},[r.watch("CompanyWebsite"),H,Xr]),ne.useEffect(()=>{if(!H||!se||se.trim().length<2)return;const tt=setTimeout(async()=>{try{Ke(!0);const Ze=await rx(se.trim());xt(!!(Ze!=null&&Ze.exists))}catch(Ze){console.error(Ze)}finally{Ke(!1)}},500);return()=>clearTimeout(tt)},[se,H]),ne.useEffect(()=>{const tt=r.getValues("companyId");if(tt){oe(tt);return}O!=null&&O.companyId&&m.length>0&&oe(O.companyId)},[m,O]),ne.useEffect(()=>{if(!O)return;const tt=r.getValues("categories"),Ze=r.getValues("capabilities"),Ft=r.getValues("functionalFocus");if(!(tt||Ze||Ft)){if(console.log("applying initialData ONCE"),O.categories){const lt=Array.isArray(O.categories)?O.categories.map(_t=>
379_t.id??_t.Id):O.categories.split(",").filter(Boolean);ye(lt),U(lt[0]||""),r.setValue("categories",lt.join(","))}if(O.capabilities){console.log("setting capabilt");const lt=Array.isArray(O.capabilities)?O.capabilities.map(_t=>_t.id??_t.Id):O.capabilities.split(",").filter(Boolean);re(lt),r.setValue("capabilities",lt.join(","))}if(O.functionalFocus){console.log("setting functional focux");const lt=Array.isArray(O.functionalFocus)?O.functionalFocus.map(_t=>_t.id??_t.Id):O.functionalFocus.split(",").filter(Boolean);Le(lt),r.setValue("functionalFocus",lt.join(","))}yr.current=!0}},[O]),ne.useEffect(()=>{console.log("categories");async function tt(){if(!t)return;const Ze=v(),lt=await(await fetch(`${f}/admin/add_product/categories`,{headers:{Authorization:`Bearer ${Ze}`}})).json();S(lt),z(lt)}tt()},[f,t,Kt]),ne.useEffect(()=>{if(!t||!rr||!Kt)return;const tt=r.getValues("capabilities");if(!tt)return;const Ze=tt.split(",").filter(Ft=>A.some(lt=>String(lt.Id??lt.id)===Ft));Ze.length&&(re(Ze),r.setValue("capabilities",Ze.join(",")))},[rr,Kt]),ne.useEffect(()=>{if(!t||!Kt||!B.length)return;const tt=r.getValues("functionalFocus");if(!tt)return;const Ze=tt.split(",").filter(Ft=>B.some(lt=>String(lt.Id??lt.id)===Ft));Ze.length&&(Le(Ze),r.setValue("functionalFocus",Ze.join(",")))},[B,Kt]),ne.useEffect(()=>{if(!t||!C||C.length===0)return;const tt=r.getValues("categories");if(!tt)return;const Ze=tt.split(",").filter(Ft=>C.some(lt=>String(lt.Id??lt.id)===Ft));Ze.length&&(ye(Ze),r.setValue("categories",Ze.join(","))),Jt(!0)},[C,t]),ne.useEffect(()=>{if(!t)return;if(Pe.length===0)return re([]),Le([]),void 0;Ht(!1);async function tt(){try{const Ze=v(),Ft=await fetch(`${f}/admin/add_product/capabilities`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${Ze}`},body:JSON.stringify(Pe)});if(!Ft.ok)return;const lt=await Ft.json();I(Array.isArray(lt)?lt:[]),te(lt),Ht(!0)}catch(Ze){console.error("Failed to load capabilities:",Ze)}}tt()},[f,t,Pe]),ne.useEffect(()=>{if(!rr)return;async function tt(){if(Xe.length===0){if(Kt)return;W([]),Le([]);return}try{const Ze=v(),Ft=await fetch(`${f}/admin/add_product/functional-focus`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${Ze}`},body:JSON.stringify(Xe)});if(!Ft.ok)return;const lt=await Ft.json();W(lt),ue(lt),r.getValues().capabilities!==ge&&r.setValue("functionalFocus","")}catch(Ze){console.error("Failed to load functional focus:",Ze)}}tt()},[f,Xe,t,Kt,rr]),ne.useEffect(()=>{if(!t||!rr)return;if(!A||A.length===0){if(Kt)return;re([]),Le([]),r.setValue("capabilities",""),W([]);return}const tt=A.map(Ft=>Ft.Id??Ft.id),Ze=Xe.filter(Ft=>tt.includes(Ft));Ze.length!==Xe.length&&(re(Ze),r.setValue("capabilities",Ze.join(",")))},[t,A]),ne.useEffect(()=>{if(!t||!rr)return;if(Xe.length===0){W([]),Le([]),r.setValue("functionalFocus","");return}if(!B||B.length===0){if(console.log("not run for functional"),Kt)return;Le([]),r.setValue("functionalFocus","");return}console.log("naming functional focus");const tt=B.map(Ft=>Ft.Id??Ft.id),Ze=Se.filter(Ft=>tt.includes(Ft));Ze&&(console.log("cleaning functional focus"),Le(Ze),r.setValue("functionalFocus",Ze.join(",")))},[B,t]);const et=()=>{const tt=r.getValues();return!String(tt.companyName||"").trim()||!String(tt.productName||"").trim()||!String(tt.description||"").trim()||!String(tt.categories||"").trim()||!String(tt.capabilities||"").trim()||!String(tt.functionalFocus||"").trim()||!String(tt.languages||"").trim()||!String(tt.CompanyWebsite||"").trim()||!Y},ft=r.getValues(),je={missingCompanyName:!String(ft.companyName||"").trim(),missingProductName:!String(ft.productName||"").trim(),missingDescription:!String(ft.description||"").trim(),missingCategories:!String(ft.categories||"").trim(),missingCapabilities:!String(ft.capabilities||"").trim(),missingFunctionalFocus:!String(ft.functionalFocus||"").trim(),missingLanguages:!String(ft.languages||"").trim(),missingCompanyWebsite:!String(ft.CompanyWebsite||"").trim(),invalidName:!Y};console.log("Form validation state:",je),console.log("isFormIncomplete:",et());const $e=async()=>{const tt=["companyName","productName","description","categories","capabilities","functionalFocus","languages","website"],Ze=await r.trigger(tt);r.formState.errors.productName||Ze&&d()},ht=ne.useRef(!0);return ne.useEffect(()=>{const tt=r.getValues();tt.categories&&(console.log(tt.categories,"hgcgf"),U(tt.categories)),tt.capabilities&&Ee(tt.capabilities),tt.functionalFocus&&Le(tt.functionalFocus.split(",")),ht.current=!1},[]),e.jsx(xu,{...r,children:e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"p-4 bg-muted/50 rounded-lg border space-y-4",children:[e.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[e.jsx(ca,{control:r.control,name:"companyName",render:({field:tt})=>e.jsxs(da,{children:[e.jsx(ja,{children:"Company Name*"}),e.jsxs(wo,{onValueChange:Ze=>{if(Ze==="new")fe(!0),oe(""),tt.onChange(""),r.setValue("companyId",""),r.setValue("companyAddress",""),r.setValue("headquarterCountry",""),r.setValue("yearFounded","");else{fe(!1),oe(Ze);const Ft=m.find(lt=>lt.Id===Ze);
379if(Ft){const lt=_t=>_t??"";tt.onChange(lt(Ft.Name)),r.setValue("companyName",lt(Ft.Name)),r.setValue("companyId",lt(Ft.Id)),r.setValue("companyAddress",lt(Ft.Address)),r.setValue("CompanyWebsite",lt(Ft.Website)),r.setValue("headquarterCountry",lt(Ft.Headquarter)),r.setValue("yearFounded",lt(Ft.YearFounded)),r.setValue("companyEmail",lt(Ft.CompanyEmail)),r.setValue("companyPhone",lt(Ft.ContactNumber))}}},value:Z||(H?"new":""),children:[e.jsx(ua,{children:e.jsx(No,{className:"w-full bg-background",children:e.jsx(So,{placeholder:"Select a company"})})}),e.jsxs(Co,{className:"max-h-[250px] overflow-y-auto bg-background z-50",children:[e.jsx(Ys,{value:"new",className:"text-primary font-medium",children:"+ New Company"}),m.map(Ze=>e.jsx(Ys,{value:Ze.Id,children:Ze.Name??Ze.name},Ze.Id))]})]}),e.jsx(za,{})]})}),H&&e.jsx(ca,{control:r.control,name:"companyName",render:({field:tt})=>e.jsxs(da,{children:[e.jsx(ja,{children:"New Company Name*"}),e.jsx(ua,{children:e.jsx(pr,{value:se,onChange:Ze=>{de(Ze.target.value),tt.onChange(Ze.target.value)},placeholder:"Enter new company name",className:"bg-background"})}),rt&&e.jsx("p",{className:"text-sm text-red-500",children:"Company already exists. Please select it from the list."}),st&&e.jsx("p",{className:"text-xs text-muted-foreground",children:"Checking company name..."}),e.jsx(za,{})]})}),e.jsx(ca,{control:r.control,name:"companyAddress",render:({field:tt})=>e.jsxs(da,{children:[e.jsx(ja,{children:"Company Address"}),e.jsx(ua,{children:e.jsx(pr,{...tt,className:"bg-background",placeholder:"Enter company address"})})]})}),e.jsx(ca,{control:r.control,name:"CompanyWebsite",render:({field:tt})=>e.jsxs(da,{children:[e.jsx(ja,{children:"Company Website *"}),e.jsx(ua,{children:e.jsx(pr,{...tt,className:"bg-background",placeholder:"Enter company Domain",readOnly:!Vr})}),!Vr&&e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Website is already set for this company and cannot be edited."}),He&&e.jsx("p",{className:"text-sm text-red-500",children:"Website already exists for another company"})]})}),e.jsx(ca,{control:r.control,name:"headquarterCountry",render:({field:tt})=>e.jsxs(da,{children:[e.jsx(ja,{children:"Headquarter Country"}),e.jsxs(wo,{onValueChange:Ze=>tt.onChange(Ze),value:tt.value,children:[e.jsx(ua,{children:e.jsx(No,{className:"w-full",children:e.jsx(So,{placeholder:"Select a country"})})}),e.jsx(Co,{className:"max-h-[250px] overflow-y-auto bg-background z-50",children:g.map(Ze=>e.jsx(Ys,{value:Ze.Name,children:Ze.Name},Ze.Id))})]}),e.jsx(za,{})]})}),e.jsx(ca,{control:r.control,name:"yearFounded",render:({field:tt})=>e.jsxs(da,{children:[e.jsx(ja,{children:"Year Founded"}),e.jsx(ua,{children:e.jsx(pr,{...tt,placeholder:"YYYY",maxLength:4,inputMode:"numeric",onChange:Ze=>{const Ft=Ze.target.value.replace(/\D/g,"");tt.onChange(Ft)}})})]})})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Select an existing company or add a new one."})]}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[e.jsx(ca,{control:r.control,name:"productName",render:({field:tt})=>e.jsxs(da,{children:[e.jsx(ja,{children:"Product Name*"}),e.jsx(ua,{children:e.jsx(pr,{...tt,onChange:Ze=>{const Ft=Ze.target.value;tt.onChange(Ft),jr(Ft)}})}),e.jsx(za,{})]})}),e.jsx(ca,{control:r.control,name:"website",render:({field:tt})=>e.jsxs(da,{children:[e.jsx(ja,{children:"Product Website*"}),e.jsx(ua,{children:e.jsx(pr,{...tt})}),e.jsx(za,{})]})}),e.jsx(ca,{control:r.control,name:"categories",render:({field:tt})=>{const Ze=tt.value?tt.value.split(",").filter(Boolean):[],Ft=C.filter(lt=>!Ze.includes(lt.Id));return e.jsxs(da,{children:[e.jsx(ja,{children:"Categories*"}),e.jsxs(Ro,{children:[e.jsx(Mo,{asChild:!0,children:e.jsx(ua,{children:e.jsx(We,{variant:"outline",className:"w-full justify-between",children:Ze.length>0?`${Ze.length} selected`:"Select categories"})})}),e.jsx(Fo,{className:"w-full p-0 max-h-[250px] overflow-y-auto bg-background z-50",children:e.jsxs(Il,{children:[e.jsx(Rl,{placeholder:"Search categories..."}),e.jsx(Ml,{children:"No category found."}),e.jsx(Fl,{children:Ft.map(lt=>e.jsx(al,{value:lt.Name??lt.name,onSelect:()=>{const _t=[...Ze,lt.Id];
379ye(_t),tt.onChange(_t.join(",")),(_t.length===1||!q)&&U(lt.Id)},children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-4 h-4 border rounded"}),lt.Name??lt.name]})},lt.Id))})]})})]}),Ze.length>0&&e.jsx("div",{className:"flex flex-wrap gap-1 mt-2",children:Ze.map(lt=>{const _t=C.find(dr=>dr.Id===lt);return e.jsxs(tr,{variant:"secondary",className:"flex items-center gap-1",children:[(_t==null?void 0:_t.Name)||lt,e.jsx(fn,{className:"w-3 h-3 cursor-pointer",onClick:()=>{const dr=Ze.filter(fr=>fr!==lt);ye(dr),tt.onChange(dr.join(",")),lt===q&&U(dr[0]||""),dr.length===0&&(I([]),W([]),re([]),Le([]),r.setValue("capabilities",""),r.setValue("functionalFocus",""))}})]},lt)})}),e.jsx(za,{})]})}}),e.jsx(ca,{control:r.control,name:"capabilities",render:({field:tt})=>{const Ze=tt.value?tt.value.split(",").filter(Boolean):[],Ft=A.filter(lt=>!Ze.includes(lt.Id??lt.id));return e.jsxs(da,{children:[e.jsx(ja,{children:"Capabilities*"}),e.jsxs(Ro,{children:[e.jsx(Mo,{asChild:!0,children:e.jsx(ua,{children:e.jsx(We,{variant:"outline",className:"w-full justify-between",disabled:A.length===0,children:Ze.length>0?`${Ze.length} selected`:"Select capabilities"})})}),e.jsx(Fo,{className:"w-full p-0 max-h-[250px] overflow-y-auto bg-background z-50",children:e.jsxs(Il,{children:[e.jsx(Rl,{placeholder:"Search capabilities..."}),e.jsx(Ml,{children:"No capability found."}),e.jsx(Fl,{children:Ft.map(lt=>e.jsx(al,{value:lt.Name??lt.name,onSelect:()=>{const _t=[...Ze,lt.Id];re(_t),tt.onChange(_t.join(",")),(_t.length===1||!ge)&&Ee(lt.Id),_t.length===0&&(W([]),Le([]),r.setValue("functionalFocus",""))},children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-4 h-4 border rounded"}),lt.Name??lt.name]})},lt.Id))})]})})]}),Ze.length>0&&e.jsx("div",{className:"flex flex-wrap gap-1 mt-2",children:Ze.map(lt=>{const _t=A.find(dr=>dr.Id===lt);return e.jsxs(tr,{variant:"secondary",className:"flex items-center gap-1",children:[(_t==null?void 0:_t.Name)||lt,e.jsx(fn,{className:"w-3 h-3 cursor-pointer",onClick:()=>{const dr=Ze.filter(fr=>fr!==lt);re(dr),tt.onChange(dr.join(",")),lt===ge&&Ee(dr[0]||""),dr.length===0&&(W([]),Le([]),r.setValue("functionalFocus",""))}})]},lt)})}),e.jsx(za,{})]})}}),e.jsx(ca,{control:r.control,name:"functionalFocus",render:({field:tt})=>{const Ze=Se,Ft=B.filter(lt=>!Ze.includes(lt.Id));return e.jsxs(da,{children:[e.jsx(ja,{children:"Functional Focus*"}),e.jsxs(Ro,{children:[e.jsx(Mo,{asChild:!0,children:e.jsx(ua,{children:e.jsx(We,{variant:"outline",className:"w-full justify-between",disabled:B.length===0,children:Ze.length>0?`${Ze.length} selected`:"Select functional focus"})})}),e.jsx(Fo,{className:"w-full p-0 max-h-[250px] overflow-y-auto bg-background z-50",children:e.jsxs(Il,{children:[e.jsx(Rl,{placeholder:"Search functional focus..."}),e.jsx(Ml,{children:"No functional focus found."}),e.jsx(Fl,{children:Ft.map(lt=>e.jsx(al,{value:lt.Name??lt.name,onSelect:()=>{const _t=[...Se,lt.Id??lt.id];Le(_t),tt.onChange(_t.join(","))},children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-4 h-4 border rounded"}),lt.Name??lt.name]})},lt.Id??lt.id))})]})})]}),Ze.length>0&&e.jsx("div",{className:"flex flex-wrap gap-1 mt-2",children:Ze.map(lt=>{const _t=B.find(dr=>dr.Id===lt||dr.id===lt);return e.jsxs(tr,{variant:"secondary",className:"flex items-center gap-1",children:[(_t==null?void 0:_t.Name)??(_t==null?void 0:_t.name)??lt,e.jsx(fn,{className:"w-3 h-3 cursor-pointer",onClick:()=>{const dr=Ze.filter(fr=>fr!==lt);Le(dr),tt.onChange(dr.join(","))}})]},lt)})}),e.jsx(za,{})]})}}),e.jsx(ca,{control:r.control,name:"languages",render:({field:tt})=>{const Ze=tt.value?tt.value.split(",").filter(Boolean):[],Ft=le.filter(lt=>!Ze.includes(lt.Id));return e.jsxs(da,{children:[e.jsx(ja,{children:"Languages*"}),e.jsxs(Ro,{children:[e.jsx(Mo,{asChild:!0,children:e.jsx(ua,{children:e.jsx(We,{variant:"outline",className:"w-full justify-between",children:Ze.length>0?`${Ze.length} selected`:"Select languages"})})}),e.jsx(Fo,{className:"w-full p-0 max-h-[250px] overflow-y-auto bg-background z-50",children:e.jsxs(Il,{children:[e.jsx(Rl,{placeholder:"Search languages..."}),e.jsx(Ml,{children:"No language found."}),e.jsx(Fl,{children:Ft.map(lt=>e.jsx(al,{value:lt.Name,onSelect:()=>{const _t=[...Ze,lt.Id];
379tt.onChange(_t.join(","))},children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-4 h-4 border rounded"}),lt.Name]})},lt.Id))})]})})]}),Ze.length>0&&e.jsx("div",{className:"flex flex-wrap gap-1 mt-2",children:Ze.map(lt=>{const _t=le.find(dr=>dr.Id===lt);return e.jsxs(tr,{variant:"secondary",className:"flex items-center gap-1",children:[(_t==null?void 0:_t.Name)||lt,e.jsx(fn,{className:"w-3 h-3 cursor-pointer",onClick:()=>{const dr=Ze.filter(fr=>fr!==lt);tt.onChange(dr.join(","))}})]},lt)})}),e.jsx(za,{})]})}})]}),e.jsx(ca,{control:r.control,name:"description",render:({field:tt})=>e.jsxs(da,{children:[e.jsx(ja,{children:"Description*"}),e.jsx(ua,{children:e.jsx(Ma,{...tt,rows:4,placeholder:"Describe the product...",onChange:Ze=>{const Ft=Ze.target.value,lt=Ft.split(/\s+/);lt[lt.length-1].length>65||tt.onChange(Ft)}})}),e.jsx(za,{})]})}),e.jsx(ca,{control:r.control,name:"use_case",render:({field:tt})=>e.jsxs(da,{children:[e.jsx(ja,{children:"Use Case"}),e.jsx(ua,{children:e.jsx(Ma,{...tt,rows:4,placeholder:"Describe the product use cases (separate multiple entries with commas or ; )",onChange:Ze=>{const Ft=Ze.target.value,lt=Ft.split(/\s+/);lt[lt.length-1].length>65||tt.onChange(Ft)}})}),e.jsx(za,{})]})}),e.jsx(ca,{control:r.control,name:"competitorModels",render:({field:tt})=>{const Ze=String(r.watch("productName")||"").trim().toLowerCase(),Ft=String(tt.value||"").split(";").map(_t=>_t.trim()).filter(Boolean),lt=!!Ze&&Ft.some(_t=>_t.toLowerCase()===Ze);return e.jsxs(da,{children:[e.jsx(ja,{children:"Competitor Models"}),e.jsx(ua,{children:e.jsx(Ma,{...tt,rows:3,placeholder:"e.g. Harvey; Luminance; Spellbook"})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Separate multiple competitors with a semicolon (;). Do not include this product's own name."}),lt&&e.jsx("p",{className:"text-sm font-medium text-destructive",children:"Competitor models cannot include this product's own name."}),e.jsx(za,{})]})}}),e.jsxs("div",{className:"flex justify-between pt-4",children:[e.jsx(We,{type:"button",variant:"outline",onClick:s,children:"Cancel"}),e.jsx(We,{type:"button",onClick:$e,disabled:et()||H&&(rt||He)||He,children:"Next"})]})]})})}function Nu({form:r,onNext:d,onBack:s,productId:_,setCountries:z,initialCountries:te}){const ue="https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net",[w,O]=ne.useState([]),[t,f]=ne.useState(!1),{toast:v}=Yn();ne.useEffect(()=>{async function j(){try{const A=localStorage.getItem("access_token"),I=await fetch(`${ue}/admin/add_product/countries-served`,{headers:{Authorization:`Bearer ${A}`}});if(I.status===401){v({title:"Session expired",description:"Please log in again.",variant:"destructive"}),An(),window.location.href="/login";return}if(!I.ok)return;const M=await I.json();O(M),z(M)}catch(A){console.error("Failed to load countries:",A)}}j()},[ue]),ne.useEffect(()=>{if(!(te!=null&&te.length)||!w.length)return;const j=I=>I.id??I.Id,A=te.map(I=>j(I));r.setValue("countriesServed",A.join(",")),z(te)},[te,w]);const{errors:m}=r.formState,y=async()=>{const j=["companyEmail","countriesServed"];await r.trigger(j)&&d()},C=Mf({control:r.control,name:"CompanyWebsite"}),S=Mf({control:r.control,name:"companyEmail"});ne.useEffect(()=>{const A=setTimeout(async()=>{if(!S||!C){r.clearErrors("companyEmail"),f(!1);return}f(!0);const I=await nx({email:S,website:C});f(!1),I&&(I.matches?r.clearErrors("companyEmail"):r.setError("companyEmail",{type:"manual",message:"Email domain must match the company website domain"}))},500);return()=>clearTimeout(A)},[S,C]);const g=[{Id:"North America",Name:"North America"},{Id:"Latin America",Name:"Latin America"},{Id:"Western Europe",Name:"Western Europe"},{Id:"Eastern Europe",Name:"Eastern Europe"},{Id:"Northern Europe",Name:"Northern Europe"},{Id:"Southern Europe",Name:"Southern Europe"},{Id:"Middle East",Name:"Middle East"},{Id:"Gulf Cooperation Council (GCC)",Name:"Gulf Cooperation Council (GCC)"}
379,{Id:"North Africa",Name:"North Africa"},{Id:"Sub-Saharan Africa",Name:"Sub-Saharan Africa"},{Id:"Central Asia",Name:"Central Asia"},{Id:"South Asia",Name:"South Asia"},{Id:"Southeast Asia",Name:"Southeast Asia"},{Id:"East Asia",Name:"East Asia"},{Id:"Oceania",Name:"Oceania"},{Id:"Australia & New Zealand (ANZ)",Name:"Australia & New Zealand (ANZ)"},{Id:"Pacific Islands",Name:"Pacific Islands"},{Id:"Caribbean",Name:"Caribbean"},{Id:"Central America",Name:"Central America"},{Id:"Arctic Region",Name:"Arctic Region"}];return e.jsx(xu,{...r,children:e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[e.jsx(ca,{control:r.control,name:"industriesServed",render:({field:j})=>e.jsxs(da,{children:[e.jsx(ja,{children:"Industries Served"}),e.jsx(ua,{children:e.jsx(pr,{placeholder:"Target industries/departments",...j})}),e.jsx(za,{})]})}),e.jsx(ca,{control:r.control,name:"geographicalScope",render:({field:j})=>{const A=j.value?j.value.split(",").map(M=>M.trim()).filter(Boolean):[],I=g.filter(M=>!A.includes(M.Id));return e.jsxs(da,{children:[e.jsx(ja,{children:"Geographical Scope & Focus"}),e.jsxs(Ro,{children:[e.jsx(Mo,{asChild:!0,children:e.jsx(ua,{children:e.jsx(We,{variant:"outline",className:"w-full justify-between",children:A.length>0?`${A.length} selected`:"Select geographical scope"})})}),e.jsx(Fo,{className:"w-full p-0 max-h-[250px] overflow-y-auto",children:e.jsxs(Il,{children:[e.jsx(Rl,{placeholder:"Search scope..."}),e.jsx(Ml,{children:"No scope found."}),e.jsx(Fl,{children:I.map(M=>e.jsxs(al,{value:M.Name,onSelect:()=>{j.onChange([...A,M.Id].join(","))},children:[e.jsx("div",{className:"w-4 h-4 border rounded"}),e.jsx("span",{children:M.Name})]},M.Id))})]})})]}),A.length>0&&e.jsx("div",{className:"flex flex-wrap gap-1 mt-2",children:A.map(M=>{const B=g.find(W=>W.Id===M);return e.jsxs(tr,{variant:"secondary",className:"gap-1",children:[(B==null?void 0:B.Name)??M,e.jsx(fn,{className:"h-3 w-3 cursor-pointer",onClick:()=>{j.onChange(A.filter(W=>W!==M).join(","))}})]},M)})}),e.jsx(za,{})]})}}),e.jsx(ca,{control:r.control,name:"countriesServed",render:({field:j})=>{const A=j.value?j.value.split(","):[],I=w.filter(M=>!A.includes(M.Id??M.id));return e.jsxs(da,{children:[e.jsx(ja,{children:"Countries Served *"}),e.jsxs(Ro,{children:[e.jsx(Mo,{asChild:!0,children:e.jsx(ua,{children:e.jsx(We,{variant:"outline",className:"w-full justify-between",children:A.length>0?`${A.length} selected`:"Select countries"})})}),e.jsx(Fo,{className:"w-full p-0 max-h-[250px] overflow-y-auto",children:e.jsxs(Il,{children:[e.jsx(Rl,{placeholder:"Search countries..."}),e.jsx(Ml,{children:"No country found."}),e.jsx(Fl,{children:I.slice(0,200).map(M=>e.jsxs(al,{value:M.name??M.Name,onSelect:()=>{const B=[...A,M.Id??M.id];j.onChange(B.join(",")),r.trigger("countriesServed")},className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-4 h-4 border rounded"}),e.jsx("span",{children:M.Name??M.name})]},M.id??M.Id))})]})})]}),A.length>0&&e.jsx("div",{className:"flex flex-wrap gap-1 mt-2",children:A.map(M=>{const B=w.find(W=>String(W.Id??W.id)===String(M));return e.jsxs(tr,{variant:"secondary",className:"gap-1",children:[(B==null?void 0:B.Name)??(B==null?void 0:B.name),e.jsx(fn,{className:"h-3 w-3 cursor-pointer",onClick:()=>{const W=A.filter(Y=>Y!==M);j.onChange(W.join(",")),r.trigger("countriesServed")}})]},M)})}),e.jsx(za,{})]})}})]}),e.jsxs("div",{className:"flex justify-between pt-4",children:[e.jsx(We,{type:"button",variant:"outline",onClick:s,children:"Back"}),e.jsx(We,{type:"button",onClick:y,disabled:t||!!m.companyEmail||!!m.countriesServed,children:"Next"})]})]})})}function Su({form:r,onNext:d,onBack:s,productId:_,setIntegrations:z,initialintegrations:te,initial_other_intigartions:ue}){const[w,O]=ne.useState([]);ne.useEffect(()=>{async function f(){try{const v=localStorage.getItem("access_token"),y=await fetch("https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net/admin/add_product/integrations",{headers:{Authorization:`Bearer ${v}`}});if(!y.ok)return;const C=await y.json();O(C),z(C)}catch(v){console.error("Failed to load integrations:",v)}}f()},[]),ne.useEffect(()=>{if(!w.length)return;const f=m=>m.id??m.Id;let v=[];
379te!=null&&te.length&&(v=te.map(m=>f(m))),ue&&(v.includes("others")||v.push("others"),r.setValue("otherIntegrations",ue)),v.length&&r.setValue("integratesWith",v.join(","))},[te,ue,w]);const t=async()=>{const f=[];await r.trigger(f)&&d()};return e.jsx(xu,{...r,children:e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[e.jsx(ca,{control:r.control,name:"integratesWith",render:({field:f})=>{const v=f.value??"",m=v.length>0?v.split(",").filter(Boolean):[],y=A=>A.Id??A.id,C={Id:"others",Name:"Others"},S=[...w,C],g=S.filter(A=>!m.includes(y(A))),j=m.includes("others");return e.jsxs(da,{children:[e.jsx(ja,{children:"Integrates With"}),e.jsxs(Ro,{children:[e.jsx(Mo,{asChild:!0,children:e.jsx(ua,{children:e.jsx(We,{variant:"outline",className:"w-full justify-between",children:m.length>0?`${m.length} selected`:"Select integrations"})})}),e.jsx(Fo,{className:"w-full p-0 max-h-[250px] overflow-y-auto",children:e.jsxs(Il,{children:[e.jsx(Rl,{placeholder:"Search integrations..."}),e.jsx(Ml,{children:"No integration found."}),e.jsx(Fl,{children:g.slice(0,200).map(A=>e.jsx(al,{value:A.Name??A.name,onSelect:()=>{const I=[...m,A.Id];f.onChange(I.join(","))},children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-4 h-4 border rounded"}),A.Name??A.name]})},A.Id??A.id))})]})})]}),m.length>0&&e.jsx("div",{className:"flex flex-wrap gap-1 mt-2",children:m.map(A=>{const I=S.find(M=>M.Id===A);return e.jsxs(tr,{variant:"secondary",className:"gap-1",children:[(I==null?void 0:I.Name)||A,e.jsx(fn,{className:"h-3 w-3 cursor-pointer",onClick:()=>
379{const M=m.filter(B=>B!==A);f.onChange(M.join(","))}})]},A)})}),j&&e.jsx(ca,{control:r.control,name:"otherIntegrations",render:({field:A})=>e.jsx(da,{className:"mt-2",children:e.jsx(ua,{children:e.jsx(pr,{placeholder:"Specify other integrations",...A})})})}),e.jsx(za,{})]})}}),e.jsx(ca,{control:r.control,name:"automationCapabilities",render:({field:f})=>e.jsxs(da,{children:[e.jsx(ja,{children:"Automation Capabilities"}),e.jsx(ua,{children:e.jsx(pr,{placeholder:"e.g. Automated workflow",...f})}),e.jsx(za,{})]})}),e.jsx(ca,{control:r.control,name:"aiCapabilities",render:({field:f})=>e.jsxs(da,{children:[e.jsx(ja,{children:"AI Capabilities"}),e.jsx(ua,{children:e.jsx(pr,{placeholder:"e.g. AI drafting",...f})}),e.jsx(za,{})]})})]}),e.jsxs("div",{className:"flex justify-between pt-4",children:[e.jsx(We,{type:"button",variant:"outline",onClick:s,children:"Back"}),e.jsx(We,{type:"button",onClick:t,children:"Next"})]})]})})}const Xf=["ISO 27001","SOC 2 Type II","ISO 27701","GDPR Compliance","HIPAA Compliance","PCI DSS","ISO 22301","ISO 27017","ISO 27018","CSA STAR","FedRAMP","NIST Cybersecurity Framework (CSF) Alignment","HITRUST","ISO 42001","Cyber Essentials","Cyber Essentials Plus"];function Cu({form:r,onBack:d,onSubmit:s,isLastStep:_,productId:z}){const{toast:te}=Yn(),[ue,w]=ne.useState(""),O=async()=>{const m=r.getValues(),y=["companyName","companyAddress","headquarterCountry"];Object.keys(m).filter(g=>!y.includes(g));const C=["logo"];if(await r.trigger(C))s();else{const g=r.formState.errors,j=Object.keys(g).filter(A=>!y.includes(A)).map(A=>A.replace(/([A-Z])/g," $1").trim().toLowerCase());te({title:"Validation Error",description:j.length>0?`Missing required fields: ${j.join(", ")}`:"Please fill in all required fields before previewing.",variant:"destructive"})}},t=r.watch("logo"),f=t instanceof File?URL.createObjectURL(t):typeof t=="string"?t:null,v=()=>{r.setValue("logo",void 0,{shouldValidate:!0})};return e.jsx(xu,{...r,children:e.jsxs("div",{className:"space-y-6",children:[e.jsx("div",{className:"grid md:grid-cols-2 gap-6",children:e.jsx(ca,{control:r.control,name:"securityCertifications",render:({field:m})=>{const y=m.value?m.value.split(";").map(S=>S.trim()).filter(Boolean):[],C=Xf.filter(S=>!y.includes(S));return e.jsxs(da,{className:"flex flex-col",children:[e.jsx(ja,{children:"Security Certifications"}),e.jsxs(Ro,{children:[e.jsx(Mo,{asChild:!0,children:e.jsx(ua,{children:e.jsx(We,{variant:"outline",className:"w-full justify-between text-left font-normal bg-background",children:y.length>0?`${y.length} selected`:"Select certifications"})})}),e.jsx(Fo,{className:"w-full min-w-[var(--radix-popover-trigger-width)] p-0 max-h-[300px] overflow-y-auto bg-background z-50",children:e.jsxs(Il,{children:[e.jsx(Rl,{placeholder:"Search certifications...",value:ue,onValueChange:w}),e.jsx(Ml,{className:"p-2",children:ue.trim()?e.jsxs(We,{type:"button",variant:"ghost",size:"sm",className:"w-full justify-start text-xs text-primary",onClick:()=>{if(!y.includes(ue.trim())){const S=[...y,ue.trim()];m.onChange(S.join("; ")),w("")}},children:['+ Add "',ue,'"']}):"No certifications found."}),e.jsxs(Fl,{className:"max-h-[200px] overflow-y-auto",children:[ue.trim()&&!Xf.some(S=>S.toLowerCase()===ue.trim().toLowerCase())&&!y.includes(ue.trim())&&e.jsx(al,{value:ue,onSelect:()=>{const S=[...y,ue.trim()];m.onChange(S.join("; ")),w("")},className:"text-primary font-medium",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-4 h-4 border rounded border-primary flex items-center justify-center text-primary text-[10px]",children:"+"}),'Add "',ue,'"']})}),C.map(S=>e.jsx(al,{value:S,onSelect:()=>{const g=[...y,S];m.onChange(g.join("; ")),w("")},children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-4 h-4 border rounded"}),S]})},S))]})]})})]}),y.length>0&&e.jsx("div",{className:"flex flex-wrap gap-1 mt-2",children:y.map(S=>e.jsxs(tr,{variant:"secondary",className:"gap-1",children:[S,e.jsx(fn,{className:"h-3 w-3 cursor-pointer hover:text-destructive",onClick:()=>{const g=y.filter(j=>j!==S);m.onChange(g.join("; "))}})]},S))}),e.jsx(za,{})]})}})}),e.jsx(ca,{control:r.control,name:"logo",render:({field:m})=>e.jsxs(da,{children:[e.jsx(ja,{children:"Logo Upload*"}),e.jsx(ua,{children:e.jsxs("div",{className:"border-2 border-dashed rounded-lg p-6 text-center space-y-3",children:[f?e.jsxs("div",{className:"flex flex-col items-center gap-2",children:[e.jsx("img",{width:1200,height:675,src:f,alt:"Product Logo",className:"max-h-32 object-contain rounded border p-2",loading:"lazy",decoding:"async"}),e.jsx("p",{className:"text-xs text-muted-foreground break-all",children:m.value instanceof File?m.value.name:m.value}),e.jsx("div",{className:"flex gap-2",children:e.jsx(We,{type:"button",size:"sm",variant:"outline",onClick:v,children:"Remove"})})]}):e.jsxs(e.Fragment,{children:[e.jsx(Bo,{className:"h-8 w-8 mx-auto text-muted-foreground"}),e.jsxs("label",{htmlFor:"admin-logo-upload",className:"cursor-pointer",children:[e.jsx("p",{className:"text-sm font-medium",children:"Click to upload logo"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"PNG, JPG up to 5MB"})]})]}),e.jsx(pr,{type:"file",accept:"image/png,image/jpeg",className:"hidden",id:"admin-logo-upload",onChange:y=>{var I;const C=(I=y.target.files)==null?void 0:I[0];if(!C)return;const S=["image/png","image/jpeg"],g=5*1024*1024;if(!S.includes(C.type)){r.setError("logo",{type:"manual",message:"Only PNG or JPG images are allowed"});return}if(C.size>g){r.setError("logo",{type:"manual",message:"Logo must be 5MB or smaller"});return}r.clearErrors("logo");const j=C.name.split(".").pop(),A=new File([C],`${z}_logo.${j}`,{type:C.type});m.onChange(A)}})]})}),e.jsx(za,{})]})}),e.jsxs("div",{className:"flex justify-between pt-4",children:[e.jsx(We,{type:"button",variant:"outline",onClick:d,children:"Back"}),e.jsx(We,{type:"button",onClick:O,children:"Preview Product"})]})]})})}const ax=yu({companyId:hr().min(1,"Company name is required"),CompanyWebsite:hr().min(1,"Company website is required"),
379companyName:hr().min(1,"Company name is required"),companyAddress:hr().min(1,"Company address is required"),headquarterCountry:hr().min(1,"Headquarter country is required"),productName:hr().min(1,"Product name is required"),productVersion:hr().min(1,"Product version is required"),yearFounded:hr().min(4,"Year founded must be at least 4 characters"),website:hr().min(1,"Website is required").refine(r=>/^(https?:\/\/)?([\w-]+\.)+[\w-]{2,}(\/.*)?$/.test(r),{message:"Must be a valid URL"}),description:hr().min(10,"Description must be at least 10 characters"),categories:hr().min(1,"Category is required"),capabilities:hr().min(1,"Capabilities are required"),functionalFocus:hr().min(1,"Functional focus is required"),technologyUsed:hr().optional(),languages:hr().min(1,"At least one language is required"),companyEmail:hr().email("Must be a valid email").optional().or(Rm("")),companyPhone:hr().min(1,"Phone number is required"),industriesServed:hr().min(1,"Industries Served is required"),customers:hr().optional(),engineAndDataModels:hr().optional(),databaseIntegration:hr().optional(),integratesWith:hr().min(1,"Integrations are required"),integrations:hr().min(1,"Integrations are required"),sso:hr().optional(),addinFunctionality:hr().optional(),openDataFormat:hr().optional(),automationCapabilities:hr().min(1,"Automation capabilities selection is required"),aiCapabilities:hr().min(1,"AI capabilities selection is required"),developmentLifecycle:hr().optional(),userReception:hr().optional(),priceRange:hr().optional(),pricingModelsLicensing:hr().min(1,"Pricing model is required"),additionalImplementationCost:hr().optional(),additionalSupportCost:hr().min(1,"Support cost selection is required"),freeTrialOrPaidPoc:hr().min(1,"Free trial/paid POC selection is required"),itDeploymentModels:hr().optional(),gdprCompliant:hr().min(1,"GDPR compliance selection is required"),thirdPartyProvidersOutsideEea:hr().min(1,"Third party providers selection is required"),hostingLocation:hr().optional(),securityCertifications:hr().optional(),requestDemoButton:hr().min(1,"Demo button selection is required"),idealNumberOfUsers:hr().optional(),geographicalScope:hr().min(1,"Geographical scope is required"),countriesServed:hr().min(1,"Countries served is required"),strategicPartners:hr().optional(),additionalNotes:hr().optional(),competitorModels:hr().optional(),domain:hr().optional(),logo:Om([Im(File),hr().url()],{required_error:"Logo is required"}),imagesVideos:Lm().optional(),additionalCategories:hr().optional(),otherIntegrations:hr().optional(),otherDatabaseIntegration:hr().optional(),use_case:hr().optional().refine(r=>!r||!r.split(/\s+/).some(d=>d.length>65),{message:"A single word cannot exceed 65 characters"})}).superRefine((r,d)=>{const s=String(r.productName||"").trim().toLowerCase(),_=String(r.competitorModels||"").split(";").map(z=>z.trim()).filter(Boolean);s&&_.some(z=>z.toLowerCase()===s)&&d.addIssue({code:Mm.custom,path:["competitorModels"],message:"Competitor models cannot include this product's own name."})}),Qd=[{title:"Product Info",component:wu},{title:"Contact & Business",component:Nu},{title:"Technical Details",component:Su},{title:"Security & Files",component:Cu}];function ox({onSubmit:r,onCancel:d,initialData:s,selected_product_id:_,onProductAdded:z}){var ae,Z,oe;const{toast:te}=Yn(),[ue]=ne.useState(()=>_||_m()),[w,O]=ne.useState(0),[t,f]=ne.useState(!1),[v,m]=ne.useState(!1),[y,C]=ne.useState(null),[S,g]=ne.useState({categories:[],capabilities:[],functionalFocus:[],languages:[],countries:[],integrations:[]}),j=(H,fe)=>{g(se=>({...se,[H]:fe}))},A=Pm({resolver:Tm(ax),defaultValues:{companyId:(s==null?void 0:s.companyId)||"",companyName:(s==null?void 0:s.companyName)||"",companyAddress:(s==null?void 0:s.companyAddress)||"",headquarterCountry:(s==null?void 0:s.headquarterCountry)||"",productName:(s==null?void 0:s.productName)||"",productVersion:(s==null?void 0:s.productVersion)||"",yearFounded:(s==null?void 0:s.yearFounded)||"",website:(s==null?void 0:s.website)||"",description:(s==null?void 0:s.description)||"",CompanyWebsite:(s==null?void 0:s.CompanyWebsite)||"",categories:Array.isArray(s==null?void 0:s.categories)?s.categories.map(H=>H.id??H.Id).join(","):"",capabilities:Array.isArray(s==null?void 0:s.capabilities)?s.capabilities.map(H=>H.id??H.Id).join(","):"",functionalFocus:Array.isArray(s==null?void 0:s.functionalFocus)?s.functionalFocus.map(H=>H.id??H.Id).join(","):"",technologyUsed:(s==null?void 0:s.technologyUsed)||"",languages:Array.isArray(s==null?void 0:s.languages)?s.languages.map(H=>H.id??H.Id).join(","):"",companyEmail:(s==null?void 0:s.companyEmail)||"",companyPhone:(s==null?void 0:s.companyPhone)||"",industriesServed:(s==null?void 0:s.industriesServed)||"",customers:(s==null?void 0:s.customers)||"",engineAndDataModels:(s==null?void 0:s.engineAndDataModels)||"",databaseIntegration:(s==null?void 0:s.databaseIntegration)||"",integratesWith:Array.isArray(s==null?void 0:s.integrations)?s.integrations.map(H=>H.Id).join(","):"",sso:(s==null?void 0:s.sso)||"",addinFunctionality:(s==null?void 0:s.addinFunctionality)||"",openDataFormat:(s==null?void 0:s.openDataFormat)||"",automationCapabilities:(s==null?void 0:s.automationCapabilities)||"",aiCapabilities:(s==null?void 0:s.aiCapabilities)||"",developmentLifecycle:(s==null?void 0:s.developmentLifecycle)||"",userReception:(s==null?void 0:s.userReception)||"",priceRange:(s==null?void 0:s.priceRange)||"",pricingModelsLicensing:(s==null?void 0:s.pricingModelsLicensing)||"",additionalImplementationCost:(s==null?void 0:s.additionalImplementationCost)||"",additionalSupp
379ortCost:((ae=s==null?void 0:s.additionalSupportCost)==null?void 0:ae.toLowerCase())||"",freeTrialOrPaidPoc:(s==null?void 0:s.freeTrialOrPaidPoc)||"",itDeploymentModels:(s==null?void 0:s.itDeploymentModels)||"",gdprCompliant:((Z=s==null?void 0:s.gdprCompliant)==null?void 0:Z.toLowerCase())||"",thirdPartyProvidersOutsideEea:((oe=s==null?void 0:s.thirdPartyProvidersOutsideEea)==null?void 0:oe.toLowerCase())||"",hostingLocation:(s==null?void 0:s.hostingLocation)||"",securityCertifications:(s==null?void 0:s.securityCertifications)||"",requestDemoButton:(s==null?void 0:s.requestDemoButton)||"",idealNumberOfUsers:(s==null?void 0:s.idealNumberOfUsers)||"",geographicalScope:(s==null?void 0:s.geographicalScope)||"",countriesServed:Array.isArray(s==null?void 0:s.countriesServed)?s.countriesServed.map(H=>H.id??H.Id).join(","):"",integrations:Array.isArray(s==null?void 0:s.integrations)?s.integrations.map(H=>H.Id).join(","):"",strategicPartners:(s==null?void 0:s.strategicPartners)||"",additionalNotes:(s==null?void 0:s.additionalNotes)||"",competitorModels:(s==null?void 0:s.competitorModels)||"",domain:(s==null?void 0:s.domain)||"",additionalCategories:(s==null?void 0:s.additionalCategories)||"",otherIntegrations:(s==null?void 0:s.otherIntegrations)||"",otherDatabaseIntegration:(s==null?void 0:s.otherDatabaseIntegration)||"",logo:(s==null?void 0:s.logo)||void 0,use_case:(s==null?void 0:s.use_case)||""},shouldUnregister:!1}),I=(w+1)/Qd.length*100,M=()=>{w<Qd.length-1&&O(w+1)},B=()=>{w>0&&O(w-1)},W=()=>{const H=A.getValues();C(H),m(!0)},Y=()=>{m(!1)},J=async()=>{if(!y)return;f(!0);const fe=(q=>({ProductName:q.productName,ProductId:ue,ProductVersion:q.productVersion,Description:q.description,ProductWebpage:q.website,CompaniesId:q.companyId,CompanyWebsite:q.CompanyWebsite,IndustriesServed:q.industriesServed,Existing_Customers:q.customers,Engine_Data_Models:q.engineAndDataModels,Databaseintegration:q.databaseIntegration,Integrateswith:"Not specified",IntegrationSSO:q.sso,AdditionalFunctionality:q.addinFunctionality,interchangeable_Data_Format:q.openDataFormat,Automation_Capabilities:q.automationCapabilities,AI_Capabilities:q.aiCapabilities,Development_Lifecycle:q.developmentLifecycle,User_Reception:q.userReception,Licensing_Model:q.pricingModelsLicensing,Additional_Implementation_Cost:q.additionalImplementationCost,AdditionalCost_Support:q.additionalSupportCost,ISFreeTrial:q.freeTrialOrPaidPoc,IT_Deployment_Models:q.itDeploymentModels,GDPR_Compliant:q.gdprCompliant,DataProtection_outside:q.thirdPartyProvidersOutsideEea,Hosting_Location:q.hostingLocation,SecurityCertifications:q.securityCertifications,RequestDemoBtn:q.requestDemoButton,NoofUsers:q.idealNumberOfUsers,Comments:q.additionalNotes,CompetitorModels:q.competitorModels||"",GeographicalscopeandFocus:q.geographicalScope,StrategicPartners:q.strategicPartners,TestLabResults:"",UsageReports:"",TechnologyUsed:q.technologyUsed,PriceRange:q.priceRange,CategoryIds:[q.categories],CapabilityIds:[q.capabilities],CountriesServedIds:q.countriesServed?q.countriesServed.split(","):[],FunctionalFocusIds:q.functionalFocus?[q.functionalFocus]:[],IntegrationIds:q.integratesWith?q.integratesWith.split(","):[],LanguageIds:q.languages?q.languages.split(","):[],ProductVersions:[],CompanyAddress:q.companyAddress,HeadquarterCountry:q.headquarterCountry,CompanyEmail:q.companyEmail,CompanyPhone:q.companyPhone,CompanyName:q.companyName,YearFounded:q.yearFounded?new Date(q.yearFounded).getFullYear():null,otherDatabaseIntegration:q.otherDatabaseIntegration,use_case:q.use_case}))(y),se=localStorage.getItem("access_token"),de="https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net";try{const q=await fetch(`${de}/admin/edit_product/edit`,{method:"PUT",headers:{"Content-Type":"application/json",Authorization:`Bearer ${se}`},body:JSON.stringify(fe)});if(q.status===401){te({title:"Session expired",description:"Please log in again.",variant:"destructive"}),An(),window.location.href="/login";return}if(!q.ok){let ge="Product is under review.";try{ge=(await q.json()).detail||ge}catch{ge=await q.text()}te({variant:"destructive",title:"Product Submission Failed",description:ge}),f(!1);return}const U=await q.json();if(y.logo instanceof File){const ge=new FormData;ge.append("file",y.logo),await fetch(`${de}/admin/edit_product/${ue}/logo`,{method:"POST",headers:{Authorization:`Bearer ${se}`},body:ge})}z&&await z(),te({title:"Success",description:"Product edit succesfully"}),d()}catch(q){console.error("Network error:",q),te({variant:"destructive",title:"Network Error",description:"There was a problem connecting to the server."})}},le=()=>{const H={form:A,productId:ue,onNext:M,onBack:B};switch(w){case 0:return e.jsx(wu,{...H,onCancel:d,isFirstStep:!0,setCategories:fe=>j("categories",fe),setCapabilities:fe=>j("capabilities",fe),setFunctionalFocus:fe=>j("functionalFocus",fe),setLanguages:fe=>j("languages",fe),initialData:s,productId:ue,isActive:w===0});case 1:return e.jsx(Nu,{...H,setCountries:fe=>j("countries",fe),initialCountries:Array.isArray(s==null?void 0:s.countriesServed)?s.countriesServed:[]});case 2:return e.jsx(Su,{...H,setIntegrations:fe=>j("integrations",fe),initialintegrations:Array.isArray(s==null?void 0:s.integratesWith)?s.integratesWith:[],initial_other_intigartions:(s==null?void 0:s.otherIntegrations)??""});case 3:return e.jsx(Cu,{...H,onSubmit:W,isLastStep:!0});default:return null}};return v&&y?e.jsx(ap,{data:y,lists:S,onEdit:Y,onApprove:J,isSubmitting:t}):e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between text-sm",children:[e.jsxs("span",{className:"font-medium",children:["Step ",w+1," of ",Qd.length,": ",Qd[w].title]}),e.jsxs("span",{className:"text-muted-foreground",children:[Math.round(I),"%"]})]}),e.jsx(Dm,{value:I,className:"h-2"})]}),le()]})}
379const ix=yu({companyId:hr().min(1,"Company name is required"),companyName:hr().min(1,"Company name is required"),CompanyWebsite:hr().min(1,"Company domain is required"),companyAddress:hr().min(1,"Company address is required"),headquarterCountry:hr().min(1,"Headquarter country is required"),productName:hr().min(1,"Product name is required"),productVersion:hr().min(1,"Product version is required"),yearFounded:hr().min(4,"Year founded must be at least 4 characters"),website:hr().min(1,"Website is required").refine(r=>/^(https?:\/\/)?([\w-]+\.)+[\w-]{2,}(\/.*)?$/.test(r),{message:"Must be a valid website"}),description:hr().min(10,"Description must be at least 10 characters"),categories:hr().min(1,"Category is required"),capabilities:hr().min(1,"Capabilities are required"),functionalFocus:hr().min(1,"Functional focus is required"),technologyUsed:hr().optional(),languages:hr().min(1,"At least one language is required"),companyEmail:hr().email("Must be a valid email").optional().or(Rm("")),companyPhone:hr().min(1,"Phone number is required"),industriesServed:hr().min(1,"Industries Served is required"),customers:hr().optional(),engineAndDataModels:hr().optional(),databaseIntegration:hr().optional(),integratesWith:hr().min(1,"Integrations are required"),sso:hr().optional(),addinFunctionality:hr().optional(),openDataFormat:hr().optional(),automationCapabilities:hr().min(1,"Automation capabilities selection is required"),aiCapabilities:hr().min(1,"AI capabilities selection is required"),developmentLifecycle:hr().optional(),userReception:hr().optional(),priceRange:hr().optional(),pricingModelsLicensing:hr().min(1,"Pricing model is required"),additionalImplementationCost:hr().optional(),additionalSupportCost:hr().min(1,"Support cost selection is required"),freeTrialOrPaidPoc:hr().min(1,"Free trial/paid POC selection is required"),itDeploymentModels:hr().optional(),gdprCompliant:hr().min(1,"GDPR compliance selection is required"),thirdPartyProvidersOutsideEea:hr().min(1,"Third party providers selection is required"),hostingLocation:hr().optional(),securityCertifications:hr().optional(),requestDemoButton:hr().min(1,"Demo button selection is required"),idealNumberOfUsers:hr().optional(),geographicalScope:hr().min(1,"Geographical scope is required"),countriesServed:hr().min(1,"Countries served is required"),strategicPartners:hr().optional(),additionalNotes:hr().optional(),competitorModels:hr().optional(),domain:hr().optional(),logo:Om([Im(File),hr().url()],{required_error:"Logo is required"}),imagesVideos:Lm().optional(),additionalCategories:hr().optional(),otherIntegrations:hr().optional(),otherDatabaseIntegration:hr().optional(),use_case:hr().optional().refine(r=>!r||!r.split(/\s+/).some(d=>d.length>65),{message:"A single word cannot exceed 65 characters"})}).superRefine((r,d)=>{const s=String(r.productName||"").trim().toLowerCase(),_=String(r.competitorModels||"").split(";").map(z=>z.trim()).filter(Boolean);s&&_.some(z=>z.toLowerCase()===s)&&d.addIssue({code:Mm.custom,path:["competitorModels"],message:"Competitor models cannot include this product's own name."})}),qd=[{title:"Product Info",component:wu},{title:"Contact & Business",component:Nu},{title:"Technical Details",component:Su},{title:"Security & Files",component:Cu}];function lx({onSubmit:r,onCancel:d,initialData:s,onProductAdded:_}){const{toast:z}=Yn(),[te]=ne.useState(_m()),[ue,w]=ne.useState(0),[O,t]=ne.useState(!1),[f,v]=ne.useState(!1),[m,y]=ne.useState(null),[C,S]=ne.useState({categories:[],capabilities:[],functionalFocus:[],languages:[],countries:[],integrations:[]}),g=(le,ae)=>{S(Z=>({...Z,[le]:ae}))},j=Pm({resolver:Tm(ix),defaultValues:{companyName:(s==null?void 0:s.companyName)||"",CompanyWebsite:(s==null?void 0:s.CompanyWebsite)||"",companyAddress:(s==null?void 0:s.companyAddress)||"",companyId:(s==null?void 0:s.companyId)||"",headquarterCountry:(s==null?void 0:s.headquarterCountry)||"",productName:(s==null?void 0:s.productName)||"",productVersion:(s==null?void 0:s.productVersion)||"",yearFounded:(s==null?void 0:s.yearFounded)||"",website:(s==null?void 0:s.website)||"",description:(s==null?void 0:s.description)||"",categories:(s==null?void 0:s.categories)||"",capabilities:(s==null?void 0:s.capabilities)||"",functionalFocus:(s==null?void 0:s.functionalFocus)||"",technologyUsed:(s==null?void 0:s.technologyUsed)||"",languages:(s==null?void 0:s.languages)||"",companyEmail:(s==null?void 0:s.companyEmail)||"",companyPhone:(s==null?void 0:s.companyPhone)||"",industriesServed:(s==null?void 0:s.industriesServed)||"",customers:(s==null?void 0:s.customers)||"",engineAndDataModels:(s==null?void 0:s.engineAndDataModels)||"",databaseIntegration:(s==null?void 0:s.databaseIntegration)||"",integratesWith:(s==null?void 0:s.integratesWith)||"",sso:(s==null?void 0:s.sso)||"",addinFunctionality:(s==null?void 0:s.addinFunctionality)||"",openDataFormat:(s==null?void 0:s.openDataFormat)||"",automationCapabilities:(s==null?void 0:s.automationCapabilities)||"",aiCapabilities:(s==null?void 0:s.aiCapabilities)||"",developmentLifecycle:(s==null?void 0:s.developmentLifecycle)||"",userReception:(s==null?void 0:s.userReception)||"",priceRange:(s==null?void 0:s.priceRange)||"",pricingModelsLicensing:(s==null?void 0:s.pricingModelsLicensing)||"",additionalImplementationCost:(s==null?void 0:s.additionalImplementationCost)||"",additionalSupp
379ortCost:(s==null?void 0:s.additionalSupportCost)||"",freeTrialOrPaidPoc:(s==null?void 0:s.freeTrialOrPaidPoc)||"",itDeploymentModels:(s==null?void 0:s.itDeploymentModels)||"",gdprCompliant:(s==null?void 0:s.gdprCompliant)||"",thirdPartyProvidersOutsideEea:(s==null?void 0:s.thirdPartyProvidersOutsideEea)||"",hostingLocation:(s==null?void 0:s.hostingLocation)||"",securityCertifications:(s==null?void 0:s.securityCertifications)||"",requestDemoButton:(s==null?void 0:s.requestDemoButton)||"",idealNumberOfUsers:(s==null?void 0:s.idealNumberOfUsers)||"",geographicalScope:(s==null?void 0:s.geographicalScope)||"",countriesServed:(s==null?void 0:s.countriesServed)||"",strategicPartners:(s==null?void 0:s.strategicPartners)||"",additionalNotes:(s==null?void 0:s.additionalNotes)||"",competitorModels:(s==null?void 0:s.competitorModels)||(s==null?void 0:s.CompetitorModels)||"",domain:(s==null?void 0:s.domain)||"",additionalCategories:(s==null?void 0:s.additionalCategories)||"",otherIntegrations:(s==null?void 0:s.otherIntegrations)||"",otherDatabaseIntegration:(s==null?void 0:s.otherDatabaseIntegration)||"",use_case:(s==null?void 0:s.use_case)||""}}),A=(ue+1)/qd.length*100,I=()=>{ue<qd.length-1&&w(ue+1)},M=()=>{ue>0&&w(ue-1)},B=()=>{const le=j.getValues();y(le),v(!0)},W=()=>{v(!1)},Y=async()=>{if(!m)return;t(!0);const ae=(H=>({ProductName:H.productName,ProductId:te,ProductVersion:H.productVersion,Description:H.description,ProductWebpage:H.website,IndustriesServed:H.industriesServed,Existing_Customers:H.customers,Engine_Data_Models:H.engineAndDataModels,Databaseintegration:H.databaseIntegration,Integrateswith:"Not specified",IntegrationSSO:H.sso,AdditionalFunctionality:H.addinFunctionality,interchangeable_Data_Format:H.openDataFormat,Automation_Capabilities:H.automationCapabilities,AI_Capabilities:H.aiCapabilities,Development_Lifecycle:H.developmentLifecycle,User_Reception:H.userReception,Licensing_Model:H.pricingModelsLicensing,Additional_Implementation_Cost:H.additionalImplementationCost,AdditionalCost_Support:H.additionalSupportCost,ISFreeTrial:H.freeTrialOrPaidPoc,IT_Deployment_Models:H.itDeploymentModels,GDPR_Compliant:H.gdprCompliant,DataProtection_outside:H.thirdPartyProvidersOutsideEea,Hosting_Location:H.hostingLocation,SecurityCertifications:H.securityCertifications,RequestDemoBtn:H.requestDemoButton,NoofUsers:H.idealNumberOfUsers,Comments:H.additionalNotes,CompetitorModels:H.competitorModels||"",GeographicalscopeandFocus:H.geographicalScope,StrategicPartners:H.strategicPartners,TestLabResults:"",UsageReports:"",TechnologyUsed:H.technologyUsed,PriceRange:H.priceRange,CategoryIds:H.categories?H.categories.split(","):[],CapabilityIds:H.capabilities?H.capabilities.split(","):[],CountriesServedIds:H.countriesServed?H.countriesServed.split(","):[],FunctionalFocusIds:H.functionalFocus?H.functionalFocus.split(","):[],IntegrationIds:H.integratesWith?H.integratesWith.split(","):[],LanguageIds:H.languages?H.languages.split(","):[],otherDatabaseIntegration:H.otherDatabaseIntegration,otherIntegrations:H.otherIntegrations,ProductVersions:[],CompanyWebsite:H.CompanyWebsite,CompaniesId:H.companyId,CompanyName:H.companyName,CompanyAddress:H.companyAddress,HeadquarterCountry:H.headquarterCountry,CompanyEmail:H.companyEmail,CompanyPhone:H.companyPhone,YearFounded:H.yearFounded?new Date(H.yearFounded).getFullYear():null,additionalCategories:H.additionalCategories,use_case:H.use_case}))(m),Z=localStorage.getItem("access_token"),oe="https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net";try{const H=await fetch(`${oe}/admin/add_product/add`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${Z}`},body:JSON.stringify(ae)});if(H.status===401){z({title:"Session expired",description:"Please log in again.",variant:"destructive"}),localStorage.removeItem("golt_compare_products"),An(),window.location.href="/login";return}if(!H.ok){let se="Failed to add product.";try{se=(await H.json()).detail||se}catch{se=await H.text()}z({variant:"destructive",title:"Product Addition Failed",description:se}),t(!1);return}const fe=await H.json();if(m.logo){const se=new FormData;se.append("file",m.logo),await fetch(`${oe}/admin/add_product/${fe.new_product_id}/logo`,{method:"POST",headers:{Authorization:`Bearer ${Z}`},body:se})}_&&await _(),z({title:"Success",description:"Product added successfully!"}),d()}catch(H){console.error("Network error:",H),z({variant:"destructive",title:"Network Error",description:"There was a problem connecting to the server."})}t(!1)},J=()=>{const le={form:j,productId:te,onNext:I,onBack:M};switch(ue){case 0:return e.jsx(wu,{...le,onCancel:d,isFirstStep:!0,setCategories:ae=>g("categories",ae),setCapabilities:ae=>g("capabilities",ae),setFunctionalFocus:ae=>g("functionalFocus",ae),setLanguages:ae=>g("languages",ae),isActive:ue===0});case 1:return e.jsx(Nu,{...le,setCountries:ae=>g("countries",ae)});case 2:return e.jsx(Su,{...le,setIntegrations:ae=>g("integrations",ae)});case 3:return e.jsx(Cu,{...le,onSubmit:B,isLastStep:!0});default:return null}};return f&&m?e.jsx(ap,{data:m,lists:C,onEdit:W,onApprove:Y,isSubmitting:O}):e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between text-sm",children:[e.jsxs("span",{className:"font-medium",children:["Step ",ue+1," of ",qd.length,": ",qd[ue].title]}),e.jsxs("span",{className:"text-muted-foreground",children:[Math.round(A),"%"]})]}),e.jsx(Dm,{value:A,className:"h-2"})]}),J()]})}const cx=({stats:r})=>e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"grid md:grid-cols-3 gap-6",children:[e.jsxs(ds,{children:[e.jsx(Rs,{children:e.jsx(Ds,{className:"text-lg",children:"Products"})}),e.jsxs(us,{className:"space-y-2",children:[e.jsx("div",{className:"text-3xl font-bold",children:r.totalProducts}),e.jsxs("div",{className:"flex gap-4 text-sm",children:[e.jsxs("span",{className:"text-muted-foreground",children:["Active: ",r.activeProducts]}),e.jsxs("span",{className:"text-muted-foreground",children:["Pending: ",r.pendingApprovals]})]})]})]}),e.jsxs(ds,{children:[e.jsx(Rs,{children:e.jsx(Ds,{className:"text-lg",children:"Users & Companies"})}),e.jsxs(us,{className:"space-y-2",children:[e.jsx("div",{className:"text-3xl font-bold",children:r.totalUsers+r.totalCompanies}),e.jsxs("div",{className:"flex gap-4 text-sm",children:[e.jsxs("span",{className:"text-muted-foreground",children:["Users: ",r.totalUsers]}),e.jsxs("span",{className:"text-muted-foreground",children:["Companies: ",r.totalCompanies]})]})]})]}),e.jsxs(ds,{children:[e.jsx(Rs,{children:e.jsx(Ds,{className:"text-lg",children:"Admin Team"})}),e.jsxs(us,{className:"space-y-2",children:[e.jsx("div",{className:"text-3xl font-bold",children:r.totalAdmins}),e.jsx("div",{className:"text-sm text-muted-foreground",children:"Active administrators"})]})]})]}),e.jsxs(ds,{children:[e.jsxs(Rs,{children:[e.jsx(Ds,{children:"Recent Activity"}),e.jsx(fa,{children:"Latest actions across the platform"})]}),e.jsx(us,{children:e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between py-2 border-b",children:[e.jsxs("div",{children:[e.jsx("p",{className:"font-medium",children:"New product submission"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Discovery Suite by Legal Solutions Inc"})]}),e.jsx(tr,{variant:"outline",children:"Pending"})]}),e.jsxs("div",{className:"flex items-center justify-between py-2 border-b",children:[e.jsxs("div",{children:[e.jsx("p",{className:"font-medium",children:"Company registration"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Regulatory Tech joined the platform"})]}),e.jsx(tr,{children:"Approved"})]}),e.jsxs("div",{className:"flex items-center justify-between py-2",children:[e.jsxs("div",{children:[e.jsx("p",{className:"font-medium",children:"Product updated"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"ContractAI Pro - Version 2.1 released"})]}),e.jsx(tr,{variant:"secondary",children:"Active"})]})]})})]})]}),dx=({notifications:r,userRegistrations:d,userLogs:s})=>e.jsxs("div",{className:"space-y-6",children:[e.jsxs(ds,{children:[e.jsxs(Rs,{children:[e.jsxs(Ds,{className:"flex items-center gap-2",children:[e.jsx(Sc,{className:"w-5 h-5"}),"Registration Alerts"]}),e.jsx(fa,{children:"Real-time notifications for new user and company registrations"})]}),e.jsx(us,{children:e.jsx("div",{className:"space-y-3",children:r.map(_=>e.jsxs("div",{className:`flex items-center justify-between p-3 rounded-lg border ${_.read?"bg-muted/20":"bg-primary/5 border-primary/20"}`,children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:`w-2 h-2 rounded-full ${_.read?"bg-muted-foreground":"bg-primary"}`}),e.jsxs("div",{children:[e.jsx("p",{className:`font-medium ${_.read?"text-muted-foreground":""}`,children:_.message}),e.jsx("p",{className:"text-sm text-muted-foreground",children:_.timestamp})]})]}),!_.read&&e.jsx(tr,{variant:"default",children:"New"})]},_.id))})})]}),e.jsxs(ds,{children:[e.jsxs(Rs,{children:[e.jsxs(Ds,{className:"flex items-center gap-2",children:[e.jsx(vu,{className:"w-5 h-5"}),"Recent User Registrations"]}),e.jsx(fa,{children:"Latest users and companies who joined the platform"})]}),e.jsx(us,{children:e.jsxs(Rn,{children:[e.jsx(Mn,{children:e.jsxs(Gr,{children:[e.jsx(Lt,{children:"ID"}),e.jsx(Lt,{children:"Name"}),e.jsx(Lt,{children:"Email"}),e.jsx(Lt,{children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(nl,{className:"w-4 h-4"}),"Country"]})}),e.jsx(Lt,{children:"Type"}),e.jsx(Lt,{children:"Registered At"})]})}),e.jsx(Fn,{children:d.map(_=>e.jsxs(Gr,{children:[e.jsx(St,{className:"font-mono text-sm",children:_.id}),e.jsx(St,{className:"font-medium",children:_.name}),e.jsx(St,{className:"text-muted-foreground",children:_.email}),e.jsx(St,{children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(nl,{className:"w-4 h-4 text-muted-foreground"}),_.country]})}),e.jsx(St,{children:e.jsx(tr,{variant:_.type==="Company"?"default":"secondary",children:_.type})}),e.jsx(St,{className:"text-sm text-muted-foreground",children:_.registeredAt})]},_.id))})]})})]}),e.jsxs(ds,{children:[e.jsxs(Rs,{children:[e.jsxs(Ds,{className:"flex items-center gap-2",children:[e.jsx(lu,{className:"w-5 h-5"}
379),"User Activity Logs"]}),e.jsx(fa,{children:"Detailed log of user actions and activities"})]}),e.jsx(us,{children:e.jsxs(Rn,{children:[e.jsx(Mn,{children:e.jsxs(Gr,{children:[e.jsx(Lt,{children:"User ID"}),e.jsx(Lt,{children:"User Name"}),e.jsx(Lt,{children:"Action"}),e.jsx(Lt,{children:"Details"}),e.jsx(Lt,{children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(nl,{className:"w-4 h-4"}),"Country"]})}),e.jsx(Lt,{children:"Timestamp"})]})}),e.jsx(Fn,{children:s.map(_=>e.jsxs(Gr,{children:[e.jsx(St,{className:"font-mono text-sm",children:_.userId}),e.jsx(St,{className:"font-medium",children:_.userName}),e.jsx(St,{children:e.jsx(tr,{variant:"outline",children:_.action})}),e.jsx(St,{className:"text-sm text-muted-foreground",children:_.details}),e.jsx(St,{children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(nl,{className:"w-4 h-4 text-muted-foreground"}),_.country]})}),e.jsx(St,{className:"text-sm text-muted-foreground",children:_.timestamp})]},_.id))})]})})]})]}),Cl="https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net";function cd(){return{Authorization:`Bearer ${localStorage.getItem("authToken")||localStorage.getItem("access_token")}`,"Content-Type":"application/json"}}const eu={overview:{summary:"",keyPoints:"",modules:[]},certifiedSolutions:[],certificates:[],downloadResources:[],listenLinks:{youtube:"",spotify:"",x:""},testimonials:[],trustedBy:[],logoUrl:"",videoUrl:"",podcast:{videoUrl:"",description:""},deploymentOptions:"",scalability:""};function ux({triggerProductId:r,triggerProductName:d,onTriggerConsumed:s,onEntriesChange:_}={}){var Ht,yr,gr,Vr,jr,Xr,et,ft;const{toast:z}=Yn(),te=ne.useRef(_);ne.useEffect(()=>{te.current=_},[_]);const[ue,w]=ne.useState([]),[O,t]=ne.useState(!1),[f,v]=ne.useState(!1),[m,y]=ne.useState(""),[C,S]=ne.useState([]),[g,j]=ne.useState(!1),[A,I]=ne.useState(!1),[M,B]=ne.useState(null),[W,Y]=ne.useState(""),[J,le]=ne.useState(""),[ae,Z]=ne.useState(eu),[oe,H]=ne.useState(!1),[fe,se]=ne.useState(null),[de,q]=ne.useState(null),[U,ge]=ne.useState(null),[Ee,Xe]=ne.useState(!1),[re,Pe]=ne.useState(null),ye=ne.useCallback(async()=>{var je;t(!0);try{const $e=await fetch(`${Cl}/admin/golt_star_product/`,{headers:cd()});if($e.status===401){window.location.href="/login";return}const tt=(await $e.json()).data??[];w(tt),(je=te.current)==null||je.call(te,tt)}catch{z({title:"Error",description:"Failed to load Golt Star products.",variant:"destructive"})}t(!1)},[z]);ne.useEffect(()=>{ye()},[ye]),ne.useEffect(()=>{if(!r||!d)return;const je=ue.find($e=>$e.product_id===r);je?Le(je):(B(null),Y(r),le(d),y(d),S([]),Z({...eu}),q(null),v(!0),I(!0)),s==null||s()},[r,d,ue,s]),ne.useEffect(()=>{if(!m.trim()){S([]);return}const je=setTimeout(async()=>{j(!0);try{const ht=await(await fetch(`${Cl}/product/list-products?search=${encodeURIComponent(m)}`,{headers:cd()})).json();S(Array.isArray(ht)?ht.map(tt=>({id:tt.Id,name:tt.ProductName})):[])}catch{S([])}j(!1)},350);return()=>clearTimeout(je)},[m]);function Se(){B(null),Y(""),le(""),Z({...eu}),q(null),y(""),S([]),I(!0)}function Le(je){B(je),Y(je.product_id),le(je.product_name),q(je.display_order??null);const $e={...eu,...je.golt_star_detail??{}};Z($e),I(!0)}async function st(){if(!M&&!W){z({title:"Select a product first",variant:"destructive"});return}H(!0);try{let je;if(M?je=await fetch(`${Cl}/admin/golt_star_product/${M.id}`,{method:"PUT",headers:cd(),body:JSON.stringify({golt_star_detail:ae,display_order:de})}):je=await fetch(`${Cl}/admin/golt_star_product/`,{method:"POST",headers:cd(),body:JSON.stringify({product_id:W,golt_star_detail:ae,display_order:de})}),je.status===409){z({title:"Already exists",description:"Use Edit to update this product.",variant:"destructive"}),H(!1);return}if(!je.ok){const $e=await je.json();throw new Error($e.detail??"Save failed")}z({title:M?"Updated!":"Created!",description:"Golt Star product saved."}),I(!1),ye()}catch(je){z({title:"Error",description:je.message,variant:"destructive"})}H(!1)}async function Ke(){if(U){Xe(!0);try{if(!(await fetch(`${Cl}/admin/golt_star_product/${U.id}`,{method:"DELETE",headers:cd()})).ok)throw new Error("Delete failed");z({title:"Deleted",description:`${U.product_name} removed from Golt Star.`}),ge(null),ye()}catch(je){z({title:"Error",description:je.message,variant:"destructive"})}Xe(!1)}}const rt=(je,$e)=>
379{$e===""&&typeof ae[je]=="string"&&rr(ae[je]),Z(ht=>({...ht,[je]:$e}))},xt=(je,$e,ht)=>{Z(tt=>{const Ze=tt[je];return ht===""&&Ze&&typeof Ze[$e]=="string"&&rr(Ze[$e]),{...tt,[je]:{...Ze,[$e]:ht}}})},He=(je,$e)=>{Z(ht=>({...ht,[je]:[...ht[je]||[],$e]}))},Tt=(je,$e,ht)=>{Z(tt=>{const Ze=[...tt[je]||[]];return Ze[$e]=ht,{...tt,[je]:Ze}})},Kt=(je,$e)=>{Z(ht=>{const tt=[...ht[je]],Ze=tt[$e],Ft=(Ze==null?void 0:Ze.image)||(Ze==null?void 0:Ze.url)||(Ze==null?void 0:Ze.videoUrl);return Ft&&rr(Ft),tt.splice($e,1),{...ht,[je]:tt}})},Jt=async(je,$e,ht,tt)=>{var lt;const Ze=(lt=je.target.files)==null?void 0:lt[0];if(!Ze)return;const Ft=(M==null?void 0:M.product_name)||J;if(!Ft){z({title:"Select a Product",description:"Select a product first to create the folder.",variant:"destructive"});return}se(tt);try{const _t=new FormData;_t.append("file",Ze),_t.append("product_name",Ft),_t.append("folder_type",$e);const dr=localStorage.getItem("authToken")||localStorage.getItem("access_token"),fr=await fetch(`${Cl}/admin/golt_star_product/upload_media`,{method:"POST",headers:{Authorization:`Bearer ${dr}`},body:_t});if(!fr.ok)throw new Error("Upload failed");const It=await fr.json();ht(It.url),z({title:"Uploaded Successfully",description:`Saved to GOLT_STAR/${Ft}/${$e}`})}catch(_t){z({title:"Upload Error",description:_t.message,variant:"destructive"})}se(null),je.target.value=""},rr=async je=>{if(!(!je||!je.includes(".blob.core.windows.net/")))try{const $e=localStorage.getItem("authToken")||localStorage.getItem("access_token");if(!(await fetch(`${Cl}/admin/golt_star_product/delete_media`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${$e}`},body:JSON.stringify({file_url:je})})).ok)throw new Error("Failed to delete file from storage.");console.log(`Successfully deleted ${je} from Azure.`)}catch($e){console.error("Azure Deletion Error:",$e)}};return e.jsxs("div",{className:"mt-6",children:[e.jsxs(ds,{children:[e.jsx(Rs,{children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"p-2 rounded-lg bg-muted",children:e.jsx(Di,{className:"w-5 h-5 text-foreground"})}),e.jsxs("div",{children:[e.jsxs(Ds,{className:"flex items-center gap-2 text-base",children:["G.O.L.T.® STAR Products",ue.length>0&&e.jsx(tr,{variant:"secondary",className:"text-xs",children:ue.length})]}),e.jsx(fa,{children:"Manage featured Golt Star product detail pages"})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(We,{variant:"ghost",size:"sm",onClick:ye,disabled:O,children:e.jsx(Ai,{className:`w-4 h-4 ${O?"animate-spin":""}`})}),e.jsxs(We,{size:"sm",className:"gap-2",onClick:Se,children:[e.jsx(aa,{className:"w-4 h-4"})," Add Golt Star Product"]}),e.jsx(We,{variant:"ghost",size:"sm",onClick:()=>v(je=>!je),children:f?e.jsx(yg,{className:"w-4 h-4"}):e.jsx(pd,{className:"w-4 h-4"})})]})]})}),f&&e.jsx(us,{children:O?e.jsxs("div",{className:"flex items-center justify-center py-8",children:[e.jsx(Vs,{className:"w-5 h-5 animate-spin text-muted-foreground"}),e.jsx("span",{className:"ml-2 text-muted-foreground text-sm",children:"Loading…"})]}):ue.length===0?e.jsx("div",{className:"text-center py-8 text-muted-foreground text-sm",children:'No Golt Star products yet. Click "Add Golt Star Product" to get started.'}):e.jsxs(Rn,{children:[e.jsx(Mn,{children:e.jsxs(Gr,{children:[e.jsx(Lt,{children:"Product Name"}),e.jsx(Lt,{children:"Display Order"}),e.jsx(Lt,{children:"Updated"}),e.jsx(Lt,{className:"text-right",children:"Actions"})]})}),e.jsx(Fn,{children:ue.map(je=>e.jsxs(Gr,{children:[e.jsx(St,{className:"font-medium",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Di,{className:"w-4 h-4 text-amber-500 flex-shrink-0 fill-amber-400"}),je.product_name]})}),e.jsx(St,{className:"text-sm font-medium",children:je.display_order??"—"}),e.jsx(St,{className:"text-sm text-muted-foreground",children:je.updated_at?new Date(je.updated_at).toLocaleDateString():"—"}),e.jsx(St,{className:"text-right",children:e.jsxs("div",{className:"flex items-center justify-end gap-1",children:[e.jsx(We,{variant:"ghost",size:"sm",onClick:()=>Pe(je),children:e.jsx(Wi,{className:"w-4 h-4"})}),e.jsx(We,{variant:"ghost",size:"sm",onClick:()=>Le(je),children:e.jsx(ac,{className:"w-4 h-4"})}),e.jsx(We,{variant:"ghost",size:"sm",className:"text-destructive hover:text-destructive hover:bg-destructive/10",onClick:()=>ge(je),children:e.jsx(ti,{className:"w-4 h-4"})})]})})]},je.id))})]})})]}),e.jsx(Un,{open:A,onOpenChange:je=>!oe&&I(je),children:e.jsxs(zn,{className:"max-w-5xl max-h-[92vh] flex flex-col p-0 overflow-hidden bg-background",children:[e.jsxs($n,{className:"px-6 py-4 border-b border-border bg-card",children:[e.jsxs(Vn,{className:"flex items-center gap-2 text-xl",children:[e.jsx(Di,{className:"w-5 h-5 text-amber-500 fill-amber-400"}),M?`Edit G.O.L.T.® STAR Details: ${M.product_name}`:"Add G.O.L.T.® STAR Details"]}
379),e.jsx(ha,{children:"Configure the rich media, resources, and specific highlights for this featured product."})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto px-6 py-6 space-y-8 bg-muted/10",children:[!M&&e.jsxs("div",{className:"space-y-2 bg-card p-5 border border-border rounded-xl shadow-sm",children:[e.jsxs(pt,{className:"text-sm font-semibold",children:["Select Product ",e.jsx("span",{className:"text-destructive",children:"*"})]}),e.jsxs("div",{className:"relative",children:[e.jsx(bo,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),e.jsx(pr,{className:"pl-10 h-10",placeholder:"Search product by name…",value:m,onChange:je=>y(je.target.value)})]}),g&&e.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground mt-2",children:[e.jsx(Vs,{className:"w-4 h-4 animate-spin"})," Searching database…"]}),C.length>0&&e.jsx("div",{className:"border border-border rounded-lg mt-2 max-h-48 overflow-y-auto bg-background shadow-md",children:C.map(je=>{const $e=ue.some(ht=>ht.product_id===je.id);return e.jsxs("button",{type:"button",disabled:$e,className:`w-full text-left px-4 py-3 text-sm transition-colors border-b border-border last:border-0 flex items-center justify-between ${$e?"opacity-50 cursor-not-allowed bg-muted/30":W===je.id?"bg-muted font-medium":"hover:bg-muted"}`,onClick:()=>{$e||(Y(je.id),le(je.name),y(je.name),S([]))},children:[e.jsxs("div",{className:"flex flex-col",children:[e.jsx("span",{children:je.name}),e.jsxs("span",{className:"text-xs text-muted-foreground font-mono",children:["ID: ",je.id.slice(0,8),"…"]})]}),$e&&e.jsxs(tr,{variant:"outline",className:"text-amber-600 border-amber-500/30 bg-amber-500/10 gap-1 text-[11px] font-semibold py-0.5",children:[e.jsx(Di,{className:"w-3 h-3 fill-amber-500 text-amber-500"}),"Already Star Product"]})]},je.id)})}),W&&e.jsxs("div",{className:"flex items-center gap-2 text-sm text-amber-600 bg-amber-500/10 border border-amber-500/20 rounded-lg px-4 py-3 mt-3",children:[e.jsx(jm,{className:"w-4 h-4"}),"Selected: ",e.jsx("strong",{className:"font-semibold",children:J})]})]}),e.jsxs("div",{className:"space-y-4 bg-card p-6 border border-border rounded-xl shadow-md border-l-4 border-l-primary relative overflow-hidden",children:[e.jsx("div",{className:"absolute top-0 right-0 p-4 opacity-5 pointer-events-none",children:e.jsx(Di,{className:"w-24 h-24"})}),e.jsx("h3",{className:"text-sm font-bold uppercase tracking-wider text-foreground",children:"Main Grid Listing"}),e.jsxs("div",{className:"space-y-2 relative z-10",children:[e.jsx(pt,{className:"text-sm font-semibold text-primary",children:"Landing Page Short Description"}),e.jsx(Ma,{value:ae.shortDescription??"",onChange:je=>rt("shortDescription",je.target.value),rows:2,className:"resize-none border-primary/30 text-base shadow-inner focus-visible:ring-primary",placeholder:"A brief, catchy 1-2 sentence hook for the Star Products grid..."}),e.jsx("p",{className:"text-xs text-muted-foreground font-medium",children:"This is the elevator pitch. It only appears on the main G.O.L.T.® STAR landing page grid."})]}),e.jsxs("div",{className:"space-y-2 relative z-10 pt-2",children:[e.jsx(pt,{className:"text-sm font-semibold text-primary",children:"Display Order"}),e.jsx(pr,{type:"number",value:de!==null?de:"",onChange:je=>q(je.target.value===""?null:Number(je.target.value)),placeholder:"e.g. 1, 2, 3...",className:"h-9 border-primary/30 shadow-inner focus-visible:ring-primary"}),e.jsx("p",{className:"text-xs text-muted-foreground font-medium",children:"Controls the sorting position on the landing page grid (ascending order, e.g. 1 will be first)."})]}),e.jsxs("div",{className:"space-y-2 relative z-10 pt-2",children:[e.jsx(pt,{className:"text-xs font-semibold",children:"Custom Logo or URL (For Different Logo on G.O.L.T.® STAR Landing Page)"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(pr,{value:ae.logoUrl??"",onChange:je=>rt("logoUrl",je.target.value),placeholder:"URL or Upload...",className:"h-9"}),ae.logoUrl&&e.jsx(We,{type:"button",variant:"ghost",size:"icon",className:"h-9 w-9 text-destructive flex-shrink-0 bg-destructive/10 hover:bg-destructive hover:text-white",onClick:()=>rt("logoUrl",""),children:e.jsx(fn,{className:"w-4 h-4"})}),e.jsxs("div",{className:"relative",children:[e.jsx(We,{type:"button",variant:"secondary",disabled:fe==="logo",className:"h-9 whitespace-nowrap",children:fe==="logo"?e.jsx(Vs,{className:"w-4 h-4 animate-spin"}):"Upload"}),e.jsx("input",{type:"file",accept:"image/*",className:"absolute inset-0 opacity-0 cursor-pointer",onChange:je=>Jt(je,"logos",$e=>rt("logoUrl",$e),"logo")})]})]})]})]}),e.jsxs("div",{className:"space-y-5 bg-card p-6 border border-border rounded-xl shadow-sm",children:[e.jsx("h3",{className:"text-sm font-bold uppercase tracking-wider text-muted-foreground",children:"General Media"}),e.jsx("div",{className:"grid grid-cols-1 gap-6",children:e.jsxs("div",{className:"space-y-2",children:[e.jsx(pt,{className:"text-xs font-semibold",children:"Demo Video or URL"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(pr,{value:ae.videoUrl??"",onChange:je=>rt("videoUrl",je.target.value),placeholder:"YouTube/Vimeo URL or Upload...",className:"h-9"}),ae.videoUrl&&e.jsx(We,{type:"button",variant:"ghost",size:"icon",className:"h-9 w-9 text-destructive flex-shrink-0 bg-destructive/10 hover:bg-destructive hover:text-white",onClick:()=>rt("videoUrl",""),children:e.jsx(fn,{className:"w-4 h-4"})}),e.jsxs("div",{className:"relative",children:[e.jsx(We,{type:"button",variant:"secondary",disabled:fe==="hero_video",className:"h-9 whitespace-nowrap",children:fe==="hero_video"?e.jsx(Vs,{className:"w-4 h-4 animate-spin"}):"Upload"}),e.jsx("input",{type:"file",accept:"video/*",className:"absolute inset-0 opacity-0 cursor-pointer",onChange:je=>Jt(je,"videos",$e=>rt("videoUrl",$e),"hero_video")})]})]})]})})]}),e.jsxs("div",{className:"space-y-5 bg-card p-6 border border-border rounded-xl shadow-sm",children:[e.jsx("h3",{className:"text-sm font-bold uppercase tracking-wider text-muted-foreground",children:"G.O.L.T.® Talk Podcast & Socials"}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(pt,{className:"text-xs font-semibold",children:"Podcast Video or URL"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(pr,{value:((Ht=ae.podcast)==null?void 0:Ht.videoUrl)??"",onChange:je=>xt("podcast","videoUrl",je.target.value),placeholder:"YouTube URL or Upload...",className:"h-9"}),((yr=ae.podcast)==null?void 0:yr.videoUrl)&&e.jsx(We,{type:"button",variant:"ghost",size:"icon",className:"h-9 w-9 text-destructive flex-shrink-0 bg-destructive/10 hover:bg-destructive hover:text-white",onClick:()=>xt("podcast","videoUrl",""),children:e.jsx(fn,{className:"w-4 h-4"})}),e.jsxs("div",{className:"relative",children:[e.jsx(We,{type:"button",variant:"secondary",disabled:fe==="podcast_video",className:"h-9 whitespace-nowrap",children:fe==="podcast_video"?e.jsx(Vs,{className:"w-4 h-4 animate-spin"}):"Upload"}),e.jsx("input",{type:"file",accept:"video/*",className:"absolute inset-0 opacity-0 cursor-pointer",onChange:je=>Jt(je,"podcasts",$e=>xt("podcast","videoUrl",$e),"podcast_video")})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(pt,{className:"text-xs font-semibold",children:"Podcast Description"}),e.jsx(Ma,{value:((gr=ae.podcast)==null?void 0:gr.description)??"",onChange:je=>xt("podcast","description",je.target.value),rows:3,className:"resize-none",placeholder:"Describe the podcast episode..."})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 pt-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(pt,{className:"text-xs font-semibold",children:"YouTube Listen Link"}),e.jsx(pr,{value:((Vr=ae.listenLinks)==null?void 0:Vr.youtube)??"",onChange:je=>xt("listenLinks","youtube",je.target.value),className:"h-9",placeholder:"https://youtube.com/..."})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(pt,{className:"text-xs font-semibold",children:"Spotify Listen Link"}),e.jsx(pr,{value:((jr=ae.listenLinks)==null?void 0:jr.spotify)??"",onChange:je=>xt("listenLinks","spotify",je.target.value),className:"h-9",placeholder:"https://open.spotify.com/..."})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(pt,{className:"text-xs font-semibold",children:"X (Twitter) Link"}),e.jsx(pr,{value:((Xr=ae.listenLinks)==null?void 0:Xr.x)??"",onChange:je=>xt("listenLinks","x",je.target.value),className:"h-9",placeholder:"https://x.com/..."})]})]})]}),e.jsxs("div",{className:"space-y-5 bg-card p-6 border border-border rounded-xl shadow-sm mt-8",children:[e.jsx("h3",{className:"text-sm font-bold uppercase tracking-wider text-muted-foreground",children:"Product Overview"}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-1 pb-2",children:[e.jsx(pt,{className:"text-xs font-semibold text-muted-foreground",children:"Main Product Description"}),e.jsxs("div",{className:"text-sm text-muted-foreground bg-muted/30 p-3 rounded-md border border-dashed border-border/50 flex items-center gap-2",children:[e.jsx(Bm,{className:"w-4 h-4 opacity-50"}),"Locked: The main product description is automatically synced from the core database."]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(pt,{className:"text-xs font-semibold",children:"Key Highlights (Short)"}),e.jsx(pr,{value:((et=ae.overview)==null?void 0:et.keyPoints)??"",onChange:je=>xt("overview","keyPoints",je.target.value),className:"h-9",placeholder:"e.g., AI-driven, SOC2 Certified, Enterprise-ready"})]})]}),e.jsxs("div",{className:"pt-4 border-t border-border mt-6",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsx(pt,{className:"text-sm font-semibold",children:"Overview Modules"}),e.jsxs(We,{type:"button",size:"sm",variant:"outline",onClick:()=>Z(je=>{var $e;return{...je,overview:{...je.overview||{},modules:[...(($e=je.overview)==null?void 0:$e.modules)||[],{name:"",description:""}]}}}),children:[e.jsx(aa,{className:"w-4 h-4 mr-1"})," Add Module"]})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:(((ft=ae.overview)==null?void 0:ft.modules)||[]).map((je,$e)=>e.jsxs("div",{className:"flex gap-3 items-start border border-border p-4 rounded-lg bg-background relative group hover:border-primary/50 transition-colors",children:[e.jsxs("div",{className:"flex-1 space-y-3",children:[e.jsx(pr,{placeholder:"Module Name",value:je.name,onChange:ht=>{var Ze;const tt=[...((Ze=ae.overview)==null?void 0:Ze.modules)||[]];tt[$e]={...je,name:ht.target.value},xt("overview","modules",tt)},className:"h-9 font-medium"}),e.jsx(Ma,{placeholder:"Module Description",value:je.description,onChange:ht=>{var Ze;const tt=[...((Ze=ae.overview)==null?void 0:Ze.modules)||[]];tt[$e]={...je,description:ht.target.value},xt("overview","modules",tt)},rows:2,className:"resize-none"})]}),e.jsx(We,{type:"button",variant:"ghost",size:"icon",className:"h-8 w-8 text-destructive opacity-0 group-hover:opacity-100 transition-opacity",onClick:()=>{var tt;const ht=[...((tt=ae.overview)==null?void 0:tt.modules)||[]];ht.splice($e,1),xt("overview","modules",ht)},children:e.jsx(fn,{className:"w-4 h-4"})})]},$e))})]})]}),e.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-6",children:[e.jsxs("div",{className:"space-y-4 bg-card p-6 border border-border rounded-xl shadow-sm",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h3",{className:"text-sm font-bold uppercase tracking-wider text-muted-foreground",children:"G.O.L.T.® Certificates"}),e.jsxs(We,{type:"button",size:"sm",variant:"outline",onClick:()=>He("certificates",{name:"",description:"",image:""}),children:[e.jsx(aa,{className:"w-4 h-4 mr-1"})," Add"]})]}),e.jsx("div",{className:"space-y-3",children:(ae.certificates||[]).map((je,$e)=>e.jsxs("div",{className:"flex gap-3 items-start border border-border p-4 rounded-lg bg-background relative group hover:border-primary/50 transition-colors",children:[e.jsxs("div",{className:"flex-1 space-y-3 pr-6",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsx(pr,{placeholder:"Name (e.g., SOC 2)",value:je.name,onChange:ht=>Tt("certificates",$e,{...je,name:ht.target.value}),className:"h-9"}),e.jsx(pr,{placeholder:"Description",value:je.description,onChange:ht=>Tt("certificates",$e,{...je,description:ht.target.value}),className:"h-9"})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(pr,{placeholder:"Image URL",value:je.image||"",onChange:ht=>Tt("certificates",$e,{...je,image:ht.target.value}),className:"h-9 flex-1"}),je.image&&e.jsx(We,{type:"button",variant:"ghost",size:"icon",className:"h-9 w-9 text-destructive bg-destructive/10 hover:bg-destructive hover:text-white flex-shrink-0",onClick:()=>Tt("certificates",$e,{...je,image:""}),children:e.jsx(fn,{className:"w-4 h-4"})}),e.jsxs("div",{className:"relative",children:[e.jsx(We,{type:"button",size:"sm",variant:"secondary",disabled:fe===`cert_${$e}`,className:"h-9",children:fe===`cert_${$e}`?e.jsx(Vs,{className:"w-4 h-4 animate-spin"}):"Upload"}),e.jsx("input",{type:"file",accept:"image/*",className:"absolute inset-0 opacity-0 cursor-pointer",onChange:ht=>Jt(ht,"certificates",tt=>Tt("certificates",$e,{...je,image:tt}),`cert_${$e}`)})]})]})]}),e.jsx(We,{type:"button",variant:"ghost",size:"icon",className:"absolute right-2 top-2 h-8 w-8 text-destructive opacity-0 group-hover:opacity-100 transition-opacity",onClick:()=>Kt("certificates",$e),children:e.jsx(fn,{className:"w-4 h-4"})})]},$e))})]}),e.jsxs("div",{className:"space-y-4 bg-card p-6 border border-border rounded-xl shadow-sm",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h3",{className:"text-sm font-bold uppercase tracking-wider text-muted-foreground",children:"Resources and Downloads"}),e.jsxs(We,{type:"button",size:"sm",variant:"outline",onClick:()=>He("downloadResources",{name:"",url:"",type:"PDF"}),children:[e.jsx(aa,{className:"w-4 h-4 mr-1"})," Add"]})]}),e.jsx("div",{className:"space-y-3",children:(ae.downloadResources||[]).map((je,$e)=>e.jsxs("div",{className:"flex gap-3 items-start border border-border p-4 rounded-lg bg-background relative group hover:border-primary/50 transition-colors",children:[e.jsxs("div",{className:"flex-1 space-y-3 pr-6",children:[e.jsxs("div",{className:"flex gap-3",children:[e.jsx(pr,{placeholder:"Name",value:je.name,onChange:ht=>Tt("downloadResources",$e,{...je,name:ht.target.value}),className:"h-9 flex-1"}
379),e.jsx(pr,{placeholder:"Type (PDF)",value:je.type,onChange:ht=>Tt("downloadResources",$e,{...je,type:ht.target.value}),className:"h-9 w-24"})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(pr,{placeholder:"File URL",value:je.url||"",onChange:ht=>Tt("downloadResources",$e,{...je,url:ht.target.value}),className:"h-9 flex-1"}),je.url&&e.jsx(We,{type:"button",variant:"ghost",size:"icon",className:"h-9 w-9 text-destructive bg-destructive/10 hover:bg-destructive hover:text-white flex-shrink-0",onClick:()=>Tt("downloadResources",$e,{...je,url:""}),children:e.jsx(fn,{className:"w-4 h-4"})}),e.jsxs("div",{className:"relative",children:[e.jsx(We,{type:"button",size:"sm",variant:"secondary",disabled:fe===`res_${$e}`,className:"h-9",children:fe===`res_${$e}`?e.jsx(Vs,{className:"w-4 h-4 animate-spin"}):"Upload"}),e.jsx("input",{type:"file",className:"absolute inset-0 opacity-0 cursor-pointer",onChange:ht=>Jt(ht,"resources",tt=>Tt("downloadResources",$e,{...je,url:tt}),`res_${$e}`)})]})]})]}),e.jsx(We,{type:"button",variant:"ghost",size:"icon",className:"absolute right-2 top-2 h-8 w-8 text-destructive opacity-0 group-hover:opacity-100 transition-opacity",onClick:()=>Kt("downloadResources",$e),children:e.jsx(fn,{className:"w-4 h-4"})})]},$e))})]})]}),e.jsxs("div",{className:"space-y-5 bg-card p-6 border border-border rounded-xl shadow-sm",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h3",{className:"text-sm font-bold uppercase tracking-wider text-muted-foreground",children:"Client Testimonials"}),e.jsxs(We,{type:"button",size:"sm",variant:"outline",onClick:()=>He("testimonials",{company:"",author:"",title:"",quote:"",videoUrl:"",linkUrl:""}),children:[e.jsx(aa,{className:"w-4 h-4 mr-1"})," Add Testimonial"]})]}),e.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-5",children:(ae.testimonials||[]).map((je,$e)=>e.jsxs("div",{className:"border border-border p-5 rounded-lg bg-background space-y-4 relative group hover:border-primary/50 transition-colors",children:[e.jsx(We,{type:"button",variant:"ghost",size:"icon",className:"absolute right-2 top-2 h-8 w-8 text-destructive opacity-0 group-hover:opacity-100 transition-opacity",onClick:()=>Kt("testimonials",$e),children:e.jsx(fn,{className:"w-4 h-4"})}),e.jsxs("div",{className:"grid grid-cols-2 gap-3 pr-8",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx(pt,{className:"text-xs",children:"Company"}),e.jsx(pr,{value:je.company,onChange:ht=>Tt("testimonials",$e,{...je,company:ht.target.value}),className:"h-9"})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx(pt,{className:"text-xs",children:"Author"}),e.jsx(pr,{value:je.author,onChange:ht=>Tt("testimonials",$e,{...je,author:ht.target.value}),className:"h-9"})]}),e.jsxs("div",{className:"space-y-1 col-span-2",children:[e.jsx(pt,{className:"text-xs",children:"Author Title / Position"}),e.jsx(pr,{value:je.title,onChange:ht=>Tt("testimonials",$e,{...je,title:ht.target.value}),className:"h-9"})]})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx(pt,{className:"text-xs",children:"Testimonial Video or URL"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(pr,{placeholder:"Video URL",value:je.videoUrl||"",onChange:ht=>Tt("testimonials",$e,{...je,videoUrl:ht.target.value}),className:"h-9 flex-1"}),je.videoUrl&&e.jsx(We,{type:"button",variant:"ghost",size:"icon",className:"h-9 w-9 text-destructive bg-destructive/10 hover:bg-destructive hover:text-white flex-shrink-0",onClick:()=>Tt("testimonials",$e,{...je,videoUrl:""}),children:e.jsx(fn,{className:"w-4 h-4"})}),e.jsxs("div",{className:"relative",children:[e.jsx(We,{type:"button",size:"sm",variant:"secondary",disabled:fe===`test_${$e}`,className:"h-9",children:fe===`test_${$e}`?e.jsx(Vs,{className:"w-4 h-4 animate-spin"}):"Upload"}),e.jsx("input",{type:"file",accept:"video/*",className:"absolute inset-0 opacity-0 cursor-pointer",onChange:ht=>Jt(ht,"testimonials",tt=>Tt("testimonials",$e,{...je,videoUrl:tt}),`test_${$e}`)})]})]})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx(pt,{className:"text-xs",children:"Quote / Text / Story Description"}),e.jsx(Ma,{placeholder:"Client quote or success story description...",value:je.quote,onChange:ht=>Tt("testimonials",$e,{...je,quote:ht.target.value}),rows:3,className:"resize-none"})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx(pt,{className:"text-xs",children:"Redirect Link (e.g. Case Study URL)"}),e.jsx(pr,{placeholder:"https://...",value:je.linkUrl||"",onChange:ht=>Tt("testimonials",$e,{...je,linkUrl:ht.target.value}),className:"h-9"})]})]},$e))})]}),e.jsxs("div",{className:"space-y-5 bg-card p-6 border border-border rounded-xl shadow-sm",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-bold uppercase tracking-wider text-muted-foreground",children:"Trusted By Companies"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:'Logos and names of companies that trust this product. Shown in the "Trusted By" tab on the Golt Star product page.'})]}),e.jsxs(We,{type:"button",size:"sm",variant:"outline",onClick:()=>He("trustedBy",{name:"",logo:""}),children:[e.jsx(aa,{className:"w-4 h-4 mr-1"})," Add Company"]})]}),(ae.trustedBy||[]).length===0?e.jsx("div",{className:"text-center py-6 text-sm text-muted-foreground border border-dashed border-border rounded-lg",children:'No trusted-by companies yet. Click "Add Company" to add one.'}):e.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:(ae.trustedBy||[]).map((je,$e)=>e.jsxs("div",{className:"border border-border p-4 rounded-lg bg-background space-y-3 relative group hover:border-primary/50 transition-colors",children:[e.jsx(We,{type:"button",variant:"ghost",size:"icon",className:"absolute right-2 top-2 h-8 w-8 text-destructive opacity-0 group-hover:opacity-100 transition-opacity",onClick:()=>Kt("trustedBy",$e),children:e.jsx(fn,{className:"w-4 h-4"})}),e.jsxs("div",{className:"space-y-1 pr-8",children:[e.jsxs(pt,{className:"text-xs font-semibold",children:["Company Name ",e.jsx("span",{className:"text-destructive",children:"*"})]}),e.jsx(pr,{placeholder:"e.g., Dentons",value:je.name||"",onChange:ht=>Tt("trustedBy",$e,{...je,name:ht.target.value}),className:"h-9"})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx(pt,{className:"text-xs font-semibold",children:"Logo"}),e.jsxs("div",{className:"flex gap-2 items-center",children:[e.jsx(pr,{placeholder:"Logo URL",value:je.logo||"",onChange:ht=>Tt("trustedBy",$e,{...je,logo:ht.target.value}),className:"h-9 flex-1"}),je.logo&&e.jsx(We,{type:"button",variant:"ghost",size:"icon",className:"h-9 w-9 text-destructive bg-destructive/10 hover:bg-destructive hover:text-white flex-shrink-0",onClick:()=>Tt("trustedBy",$e,{...je,logo:""}),children:e.jsx(fn,{className:"w-4 h-4"})}),e.jsxs("div",{className:"relative",children:[e.jsx(We,{type:"button",size:"sm",variant:"secondary",disabled:fe===`trustedby_${$e}`,className:"h-9",children:fe===`trustedby_${$e}`?e.jsx(Vs,{className:"w-4 h-4 animate-spin"}):"Upload"}),e.jsx("input",{type:"file",accept:"image/*",className:"absolute inset-0 opacity-0 cursor-pointer",onChange:async ht=>{var Ze;const tt=(Ze=ht.target.files)==null?void 0:Ze[0];if(tt){se(`trustedby_${$e}`);try{const Ft=(M==null?void 0:M.product_name)||J;if(!Ft)throw new Error("Select or save a product first before uploading a logo.");const lt=new FormData;lt.append("file",tt),lt.append("product_name",Ft),lt.append("folder_type","trusted_by");const _t=localStorage.getItem("authToken")||localStorage.getItem("access_token"),dr=await fetch(`${Cl}/admin/golt_star_product/upload_media`,{method:"POST",headers:{Authorization:`Bearer ${_t}`},body:lt});if(!dr.ok)throw new Error("Upload failed");const It=(await dr.json()).url;Tt("trustedBy",$e,{...je,logo:It}),z({title:"Logo uploaded",description:"Trusted-by logo attached."})}catch(Ft){z({title:"Upload failed",description:Ft.message,variant:"destructive"})}se(null),ht.target.value=""}}})]})]}),je.logo&&e.jsxs("div",{className:"mt-2 flex items-center gap-3 p-2 border border-border rounded-md bg-muted/30",children:[e.jsx("img",{width:80,height:40,src:je.logo,alt:`${je.name||"Company"} logo preview`,className:"h-10 w-20 object-contain",onError:ht=>{ht.currentTarget.style.opacity="0.3"},loading:"lazy",decoding:"async"}),e.jsx("span",{className:"text-xs text-muted-foreground truncate",children:je.name||"(no name)"})]})]})]},$e))})]}),e.jsxs("div",{className:"space-y-5 bg-card p-6 border border-border rounded-xl shadow-sm",children:[e.jsx("h3",{className:"text-sm font-bold uppercase tracking-wider text-muted-foreground",children:"Deployment & Infrastru
379cture"}),e.jsx("p",{className:"text-xs text-muted-foreground -mt-2",children:"Provide the deployment and scalability details for this product. These appear on the product detail page."}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(pt,{className:"text-xs font-semibold",children:"Deployment Options"}),e.jsx(Ma,{value:ae.deploymentOptions??"",onChange:je=>rt("deploymentOptions",je.target.value),rows:5,className:"resize-none",placeholder:"e.g. Delivered as a SaaS platform on AWS. Supports cloud, on-premise, and hybrid deployments..."})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(pt,{className:"text-xs font-semibold",children:"Scalability"}),e.jsx(Ma,{value:ae.scalability??"",onChange:je=>rt("scalability",je.target.value),rows:5,className:"resize-none",placeholder:"e.g. Enterprise-grade scalability. Scales horizontally to support global organizations..."})]})]})]})]}),e.jsxs(ka,{className:"px-6 py-4 border-t border-border bg-card gap-2 sm:justify-end",children:[e.jsx(We,{variant:"ghost",onClick:()=>I(!1),disabled:oe,children:"Cancel"}),e.jsxs(We,{onClick:st,disabled:oe||!M&&!W,className:"min-w-[140px]",children:[oe?e.jsx(Vs,{className:"w-4 h-4 mr-2 animate-spin"}):e.jsx(Di,{className:"w-4 h-4 mr-2"}),M?"Save Changes":"Create G.O.L.T.® STAR"]})]})]})}),e.jsx(Un,{open:!!re,onOpenChange:je=>!je&&Pe(null),children:e.jsxs(zn,{className:"max-w-2xl max-h-[85vh]",children:[e.jsx($n,{children:e.jsxs(Vn,{className:"flex items-center gap-2",children:[e.jsx(Di,{className:"w-5 h-5 text-amber-500 fill-amber-400"}),re==null?void 0:re.product_name]})}),e.jsx(Ec,{className:"max-h-[60vh] pr-4",children:e.jsx("pre",{className:"text-xs bg-muted rounded-md p-4 whitespace-pre-wrap break-all",children:JSON.stringify(re==null?void 0:re.golt_star_detail,null,2)})}),e.jsxs(ka,{children:[e.jsx(We,{variant:"outline",onClick:()=>Pe(null),children:"Close"}),e.jsxs(We,{onClick:()=>{re&&(Pe(null),Le(re))},children:[e.jsx(ac,{className:"w-4 h-4 mr-2"})," Edit"]})]})]})}),e.jsx(Un,{open:!!U,onOpenChange:je=>!je&&ge(null),children:e.jsxs(zn,{className:"max-w-md",children:[e.jsxs($n,{children:[e.jsxs(Vn,{className:"flex items-center gap-2 text-destructive",children:[e.jsx(jh,{className:"w-5 h-5"})," Remove G.O.L.T.® STAR Status"]}),e.jsxs(ha,{children:["This will delete the G.O.L.T.® STAR details for ",e.jsx("strong",{children:U==null?void 0:U.product_name})," and set IsGoltStarProduct = FALSE. This cannot be undone."]})]}),e.jsxs(ka,{children:[e.jsx(We,{variant:"outline",onClick:()=>ge(null),disabled:Ee,children:"Cancel"}),e.jsxs(We,{variant:"destructive",onClick:Ke,disabled:Ee,children:[Ee&&e.jsx(Vs,{className:"w-4 h-4 mr-2 animate-spin"}),"Yes, Remove"]})]})]})})]})}const hx=({products:r,searchQuery:d,setSearchQuery:s,productsPage:_,setProductsPage:z,product_totalPages:te,producttotalItems:ue,pages:w,start:O,end:t,onAddProduct:f,onEditProduct:v,onDeleteProduct:m,onActivateProduct:y})=>{const[C,S]=ne.useState(null),[g,j]=ne.useState([]),[A,I]=ne.useState(!1),M=r.map(B=>({...B,is_golt_star_product:A?g.includes(B.id):!!B.is_golt_star_product}));return e.jsxs("div",{className:"space-y-6",children:[e.jsx(ux,{triggerProductId:C==null?void 0:C.id,triggerProductName:C==null?void 0:C.name,onTriggerConsumed:()=>S(null),onEntriesChange:B=>{j(B.map(W=>W.product_id)),I(!0)}}),e.jsxs(ds,{children:[e.jsx(Rs,{children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(Ds,{children:"Product Management"}),e.jsx(fa,{children:"Add, edit, or remove products from the platform"})]}),e.jsxs(We,{onClick:f,className:"gap-2",children:[e.jsx(aa,{className:"w-4 h-4"}),"Add Product"]})]})}),e.jsxs(us,{children:[e.jsx("div",{className:"mb-4",children:e.jsxs("div",{className:"relative",children:[e.jsx(bo,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),e.jsx(pr,{placeholder:"Search products...",value:d,onChange:B=>s(B.target.value),className:"pl-10"})]})}),e.jsxs(Rn,{children:[e.jsx(Mn,{children:e.jsxs(Gr,{children:[e.jsx(Lt,{children:"Product ID"}),e.jsx(Lt,{children:"Name"}),e.jsx(Lt,{children:"Company"}),e.jsx(Lt,{children:"Category"}),e.jsx(Lt,{children:"Status"}),e.jsx(Lt,{children:"Users"}),e.jsx(Lt,{className:"text-right",children:"Actions"})]})}),e.jsx(Fn,{children:M.map(B=>e.jsxs(Gr,{className:B.hidden?"opacity-60":"",children:[e.jsx(St,{className:"font-mono text-sm",children:B.id}),e.jsx(St,{className:"font-medium",children:e.jsxs("div",{className:"flex items-center gap-1.5",children:[B.is_golt_star_product&&e.jsx(Di,{className:"w-3.5 h-3.5 text-amber-500 fill-amber-400 flex-shrink-0","aria-label":"Golt Star Product"}),B.name]})}),e.jsx(St,{children:B.company}),e.jsx(St,{children:B.category}),e.jsx(St,{children:e.jsx(tr,{variant:B.status==="Active"?"default":"secondary",children:B.status})}),e.jsx(St,{children:B.users}),e.jsx(St,{className:"text-right",children:e.jsxs(bm,{children:[e.jsx(wm,{asChild:!0,children:e.jsx(We,{variant:"ghost",size:"sm",children:e.jsx(Vm,{className:"w-4 h-4"})})}),e.jsxs(Nm,{align:"end",className:"bg-background",children:[B.status==="active"&&e.jsxs(Tl,{onClick:()=>v(B.id),children:[e.jsx(ac,{className:"w-4 h-4 mr-2"}),"Edit"]}),e.jsx(gh,{}),e.jsx(Tl,{onClick:()=>S({id:B.id,name:B.name}),children:B.is_golt_star_product?"Edit Golt Star Detail":"Mark as Golt Star"}),B.status==="active"&&e.jsxs(e.Fragment,{children:[e.jsx(gh,{}),e.jsxs(Tl,{onClick:()=>m(B.id),className:"text-destructive",children:[e.jsx($f,{className:"w-4 h-4 mr-2"}),"Deactivate"]})]}),B.status!=="active"&&e.jsxs(Tl,{className:"text-green-600",onClick:()=>y(B.id),children:[e.jsx($f,{className:"w-4 h-4 mr-2 rotate-180"}),"Activate"]})]})]})})]},B.id))})]}),ue>0&&e.jsxs("div",{className:"flex items-center gap-1 mt-4",children:[O>1&&e.jsxs(e.Fragment,{children:[e.jsx(We,{variant:"outline",size:"sm",onClick:()=>z(1),children:"1"}),O>2&&e.jsx("span",{className:"px-1",children:"..."})]}),w.map(B=>e.jsx(We,{variant:B===_?"default":"outline",size:"sm",onClick:()=>z(B),className:"w-8 h-8 p-0",children:B},B)),t<te&&e.jsxs(e.Fragment,{children:[t<te-1&&e.jsx("span",{className:"px-1",children:"..."}),e.jsx(We,{variant:"outline",size:"sm",onClick:()=>z(te),children:te})]})]})]})]})]})},fx=()=>{const{toast:r}=Yn(),[d,s]=ne.useState([]),[_,z]=ne.useState(""),[te,ue]=ne.useState(1),[w,O]=ne.useState(1),[t,f]=ne.useState(!1),[v,m]=ne.useState(!1),[y,C]=ne.useState(null),[S,g]=ne.useState(""),[j,A]=ne.useState(""),[I,M]=ne.useState(""),[B,W]=ne.useState("0"),[Y,J]=ne.useState("30"),[le,ae]=ne.useState("0"),[Z,oe]=ne.useState("90"),[H,fe]=ne.useState("0"),[se,de]=ne.useState(!1),[q,U]=ne.useState(!1),[ge,Ee]=ne.useState(null),[Xe,re]=ne.useState(null),[Pe,ye]=ne.useState(null),[Se,Le]=ne.useState([]),[st,Ke]=ne.useState(!1),[rt,xt]=ne.useState(null),[He,Tt]=ne.useState({}),[Kt,Jt]=ne.useState("video"),[rr,Ht]=ne.useState(""),[yr,gr]=ne.useState(""),[Vr,jr]=ne.useState("0"),[Xr,et]=ne.useState("1"),[ft,je]=ne.useState(!1),[$e,ht]=ne.useState(!0),[tt,Ze]=ne.useState(!1),[Ft,lt]=ne.useState([]),[_t,dr]=ne.useState(null),[fr,It]=ne.useState(null),[nr,Cr]=ne.useState(null),[Wt,Ir]=ne.useState(!1),[Yt,zr]=ne.useState({}),[Ye,Vt]=ne.useState(!1),[lr,xr]=ne.useState(!1),Pr=async()=>{f(!0);try{const Ge=localStorage.getItem("authToken")||localStorage.getItem("access_token"),ur=await fetch(`https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net/admin/course/?page=${te}&page_size=10${_?`&author_name=${_}`:""}${Ye?"&is_deleted=true":""}`,{headers:{Authorization:`Bearer ${Ge}`}});if(ur.ok){const Tr=await ur.json();s(Tr.data),O(Tr.pagination.total_pages)}}catch(Ge){console.error("Error fetching courses",Ge)}f(!1)};ne.useEffect(()=>{Pr()},[te,_,Ye]);const Ur=async(Ge,ur,Tr,ts)=>{const Yr=localStorage.getItem("authToken")||localStorage.getItem("access_token"),Wr=await fetch(`https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net/admin/course/generate-sas?upload_type=${ur}&course_name=${encodeURIComponent(Tr)}&filename=${encodeURIComponent(Ge.name)}`,{method:"GET",headers:{Authorization:`Bearer ${Yr}`}});if(!Wr.ok){const kn=await Wr.text();throw console.error("SAS Error:",kn),new Error(`Failed to generate secure upload URL for ${ur}`)}const Sn=await Wr.json(),{upload_url:En,url:Nn}=Sn;return new Promise((kn,dn)=>{const qr=new XMLHttpRequest;qr.upload.addEventListener("progress",un=>
379{if(un.lengthComputable){const ba=un.loaded/un.total*100;ts&&ts(ba)}}),qr.addEventListener("load",()=>{qr.status===201||qr.status===200?(ts&&ts(100),kn(Nn)):dn(new Error(`Failed to upload ${ur} to storage: ${qr.statusText}`))}),qr.addEventListener("error",()=>{dn(new Error(`Upload error for ${ur}`))}),qr.addEventListener("abort",()=>{dn(new Error(`Upload aborted for ${ur}`))}),qr.open("PUT",En),qr.setRequestHeader("x-ms-blob-type","BlockBlob"),qr.setRequestHeader("Content-Type",Ge.type||"application/octet-stream"),qr.send(Ge)})},yn=async Ge=>{if(Ge)try{const ur=localStorage.getItem("authToken")||localStorage.getItem("access_token");await fetch("https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net/admin/course/delete-media",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${ur}`},body:JSON.stringify({url:Ge})})}catch(ur){console.error("Failed to delete media from blob:",ur)}},vt=async()=>{if(!S||!I){r({title:"Validation Error",description:"Title and Author are required",variant:"destructive"});return}Ir(!0),zr({});try{let Ge="",ur="";ge&&(Ge=await Ur(ge,"thumbnail",S,En=>zr(Nn=>({...Nn,thumbnail:En})))),Xe&&(ur=await Ur(Xe,"trailer",S,En=>zr(Nn=>({...Nn,trailer:En}))));const Tr={title:S,description:j,author_name:I,price_tokens_limited:parseInt(B)||0,limited_access_days:parseInt(Y)||30,price_tokens_limited_2:parseInt(le)||0,limited_access_days_2:parseInt(Z)||90,price_tokens_lifetime:parseInt(H)||0,is_published:se,is_free:q,thumbnail_url:Ge||(y!=null&&y.thumbnail_url?y.thumbnail_url:null),trailer_url:ur||(y!=null&&y.trailer_url?y.trailer_url:null)},ts=localStorage.getItem("authToken")||localStorage.getItem("access_token"),Yr=y?`https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net/admin/course/${y.id}`:"https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net/admin/course/";if(!(await fetch(Yr,{method:y?"PATCH":"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${ts}`},body:JSON.stringify(Tr)})).ok)throw new Error("Failed to save course");r({title:"Success",description:`Course ${y?"updated":"created"} successfully`}),m(!1),Lr(),Pr()}catch(Ge){r({title:"Error",description:Ge instanceof Error?Ge.message:"Failed to save course",variant:"destructive"})}Ir(!1),zr({})},Lr=()=>{C(null),g(""),A(""),M(""),W("0"),J("30"),ae("0"),oe("90"),fe("0"),de(!1),U(!1),Ee(null),re(null)},Er=()=>{Lr(),m(!0)},or=Ge=>{var ur,Tr,ts,Yr;Lr(),C(Ge),g(Ge.title),M(Ge.author_name),W(((ur=Ge.price_tokens_limited)==null?void 0:ur.toString())||"0"),ae(((Tr=Ge.price_tokens_limited_2)==null?void 0:Tr.toString())||"0"),oe(((ts=Ge.limited_access_days_2)==null?void 0:ts.toString())||"90"),fe(((Yr=Ge.price_tokens_lifetime)==null?void 0:Yr.toString())||"0"),de(Ge.is_published),U(!!Ge.is_free),as(Ge.id),m(!0)},as=async Ge=>{var ts,Yr,Wr,Sn,En;const ur=localStorage.getItem("authToken")||localStorage.getItem("access_token"),Tr=await fetch(`https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net/admin/course/${Ge}`,{headers:{Authorization:`Bearer ${ur}`}});if(Tr.ok){const Nn=await Tr.json();A(Nn.description||""),J(((ts=Nn.limited_access_days)==null?void 0:ts.toString())||"30"),W(((Yr=Nn.price_tokens_limited)==null?void 0:Yr.toString())||"0"),oe(((Wr=Nn.limited_access_days_2)==null?void 0:Wr.toString())||"90"),ae(((Sn=Nn.price_tokens_limited_2)==null?void 0:Sn.toString())||"0"),fe(((En=Nn.price_tokens_lifetime)==null?void 0:En.toString())||"0"),U(!!Nn.is_free),Nn.thumbnail_url&&C(kn=>kn?{...kn,thumbnail_url:Nn.thumbnail_url}:null),Nn.trailer_url&&C(kn=>kn?{...kn,trailer_url:Nn.trailer_url}:null)}},Ws=async Ge=>{if(!confirm("Are you sure you want to delete this course?"))return;const ur=localStorage.getItem("authToken")||localStorage.getItem("access_token");(await fetch(`https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net/admin/course/${Ge}`,{method:"DELETE",headers:{Authorization:`Bearer ${ur}`}})).ok?(r({title:"Success",description:"Course deleted successfully"}),Pr()):r({title:"Error",description:"Failed to delete course",variant:"destructive"})},Ms=async Ge=>{if(!confirm("Are you sure you want to restore this course?"))return;const ur=localStorage.getItem("authToken")||localStorage.getItem("access_token");(await fetch(`https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net/admin/course/${Ge}/restore`,{method:"POST",headers:{Authorization:`Bearer ${ur}`}})).ok?(r({title:"Success",description:"Course restored successfully"}),Pr()):r({title:"Error",description:"Failed to restore course",variant:"destructive"})},mn=async Ge=>{const ur=localStorage.getItem("authToken")||localStorage.getItem("access_token"),Tr=await fetch(`https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net/admin/course/${Ge}/videos${lr?"?is_deleted=true":""}`,{headers:{Authorization:`Bearer ${ur}`}});if(Tr.ok){const ts=await Tr.json();Le(ts)}},wn=Ge=>{ye(Ge),mn(Ge.id)};ne.useEffect(()=>
379{Pe&&mn(Pe.id)},[lr]);const zt=()=>{xt(null),Jt("video"),Ht(""),gr(""),jr("0"),et((Se.length+1).toString()),je(!1),ht(!0),dr(null),It(null),Cr(null),Ze(!1),lt([])},Mr=Ge=>{var Tr;const ur=((Tr=Ge.target.files)==null?void 0:Tr[0])||null;if(dr(ur),ur){const ts=document.createElement("video");ts.preload="metadata",ts.onloadedmetadata=()=>{window.URL.revokeObjectURL(ts.src),jr(Math.round(ts.duration).toString())},ts.src=URL.createObjectURL(ur)}},Rr=()=>{lt(Ge=>[...Ge,{title:`Subpart ${Ge.length+1}`,description:"",type:"video",file:null,duration_seconds:0,is_preview:!1,order_index:Ge.length+1}])},ws=Ge=>{lt(ur=>ur.filter((Tr,ts)=>ts!==Ge))},is=(Ge,ur,Tr)=>{lt(ts=>{const Yr=[...ts];return Yr[Ge]={...Yr[Ge],[ur]:Tr},Yr})},ea=(Ge,ur)=>{lt(Tr=>{const ts=[...Tr];if(ts[Ge]={...ts[Ge],file:ur},ur&&ts[Ge].type==="video"){const Yr=document.createElement("video");Yr.preload="metadata",Yr.onloadedmetadata=()=>{window.URL.revokeObjectURL(Yr.src),ts[Ge].duration_seconds=Math.round(Yr.duration),lt([...ts])},Yr.src=URL.createObjectURL(ur)}return ts})},Ts=()=>{zt(),Ke(!0)},Za=async(Ge,ur)=>{const Tr=localStorage.getItem("authToken")||localStorage.getItem("access_token"),ts=await fetch(`https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net/admin/course/${Ge}/videos/${ur}`,{headers:{Authorization:`Bearer ${Tr}`}});if(ts.ok){const Yr=await ts.json();gr(Yr.description||""),Yr.thumbnail_url&&xt(Wr=>Wr?{...Wr,thumbnail_url:Yr.thumbnail_url}:null),Yr.video_url&&xt(Wr=>Wr?{...Wr,video_url:Yr.video_url}:null),Yr.doc_url&&xt(Wr=>Wr?{...Wr,doc_url:Yr.doc_url}:null),Yr.subparts&&Yr.subparts.length>0&&(Ze(!0),lt(Yr.subparts.map((Wr,Sn)=>({id:Wr.id,title:Wr.title||`Part ${Sn+1}`,description:Wr.description||"",type:Wr.doc_url||Wr.is_doc||!Wr.video_url?"document":"video",existing_video_url:Wr.video_url,existing_doc_url:Wr.doc_url,duration_seconds:Wr.duration_seconds||0,is_preview:!!Wr.is_preview,order_index:Wr.order_index||Sn+1,file:null}))))}},qs=Ge=>{zt(),xt(Ge);const ur=!!Ge.doc_url||!!Ge.is_doc||!Ge.video_url;Jt(ur?"document":"video"),Ht(Ge.title),jr(Ge.duration_seconds.toString()),et(Ge.order_index.toString()),je(Ge.is_preview),ht(Ge.is_published),gr(Ge.description||""),Ge.subparts&&Ge.subparts.length>0&&(Ze(!0),lt(Ge.subparts.map((Tr,ts)=>({id:Tr.id,title:Tr.title||`Part ${ts+1}`,description:Tr.description||"",type:Tr.doc_url||Tr.is_doc||!Tr.video_url?"document":"video",existing_video_url:Tr.video_url,existing_doc_url:Tr.doc_url,duration_seconds:Tr.duration_seconds||0,is_preview:!!Tr.is_preview,order_index:Tr.order_index||ts+1,file:null})))),Pe&&Za(Pe.id,Ge.id),Ke(!0)},$a=async()=>{if(Pe){if(!rr){r({title:"Validation Error",description:"Title is required",variant:"destructive"});return}if(tt){if(Ft.length===0){r({title:"Validation Error",description:"Please add at least one subpart or switch off Subparts",variant:"destructive"});return}for(let Ge=0;Ge<Ft.length;Ge++){const ur=Ft[Ge];if(!ur.title.trim()){r({title:"Validation Error",description:`Subpart #${Ge+1} must have a title`,variant:"destructive"});return}if(!ur.file&&!ur.existing_video_url&&!ur.existing_doc_url){r({title:"Validation Error",description:`Please select a file for Subpart #${Ge+1} (${ur.title})`,variant:"destructive"});return}}}else if(!rt){if(Kt==="video"&&!_t){r({title:"Validation Error",description:"Please select a video file to upload",variant:"destructive"});return}if(Kt==="document"&&!fr){r({title:"Validation Error",description:"Please select a PDF or document file to upload",variant:"destructive"});return}}Ir(!0),zr({});try{let Ge="",ur="",Tr="";tt||(Kt==="video"&&_t&&(Ge=await Ur(_t,"video",Pe.title,dn=>zr(qr=>({...qr,video:dn})))),Kt==="document"&&fr&&(Tr=await Ur(fr,"document",Pe.title,dn=>zr(qr=>({...qr,videoDocument:dn}))))),nr&&(ur=await Ur(nr,"thumbnail",Pe.title,dn=>zr(qr=>({...qr,videoThumbnail:dn}))));let ts=[];if(tt)for(let dn=0;dn<Ft.length;dn++){const qr=Ft[dn];let un=qr.existing_video_url||"",ba=qr.existing_doc_url||"";if(qr.file){const wa=await Ur(qr.file,qr.type==="video"?"video":"document",Pe.title,Eo=>zr(ma=>({...ma,[`subpart_${dn}`]:Eo})));qr.type==="video"?(un=wa,ba=""):(ba=wa,un="")}
379ts.push({title:qr.title,description:qr.description||"",order_index:dn+1,duration_seconds:qr.type==="video"&&qr.duration_seconds||0,is_preview:qr.is_preview,video_url:qr.type==="video"?un:null,doc_url:qr.type==="document"?ba:null})}const Yr=tt?ts.reduce((dn,qr)=>dn+(qr.duration_seconds||0),0):Kt==="document"?0:parseInt(Vr)||0,Wr={course_id:Pe.id,title:rr,description:yr,duration_seconds:Yr,order_index:parseInt(Xr)||1,is_preview:ft,is_published:$e};tt?(Wr.subparts=ts,Wr.video_url=null,Wr.doc_url=null):(Kt==="video"?(Ge&&(Wr.video_url=Ge),rt&&rt.doc_url&&(Wr.doc_url=null)):(Tr&&(Wr.doc_url=Tr),rt&&rt.video_url&&(Wr.video_url=null)),rt&&(Wr.subparts=[])),Wr.thumbnail_url=ur||(rt!=null&&rt.thumbnail_url?rt.thumbnail_url:null);const Sn=localStorage.getItem("authToken")||localStorage.getItem("access_token"),En=rt?`https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net/admin/course/${Pe.id}/videos/${rt.id}`:`https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net/admin/course/${Pe.id}/videos`,kn=await fetch(En,{method:rt?"PATCH":"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${Sn}`},body:JSON.stringify(Wr)});if(!kn.ok){const dn=await kn.json();throw new Error(dn.detail||"Failed to save lesson")}r({title:"Success",description:`Lesson ${rt?"updated":"created"} successfully`}),Ke(!1),zt(),mn(Pe.id)}catch(Ge){r({title:"Error",description:Ge instanceof Error?Ge.message:"Failed to save lesson",variant:"destructive"})}Ir(!1),zr({})}},Ao=async Ge=>{if(!Pe||!confirm("Are you sure you want to delete this video?"))return;const ur=localStorage.getItem("authToken")||localStorage.getItem("access_token");(await fetch(`https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net/admin/course/${Pe.id}/videos/${Ge}`,{method:"DELETE",headers:{Authorization:`Bearer ${ur}`}})).ok?(r({title:"Success",description:"Video deleted successfully"}),mn(Pe.id)):r({title:"Error",description:"Failed to delete video",variant:"destructive"})},ao=async Ge=>{if(!Pe||!confirm("Are you sure you want to restore this video?"))return;const ur=localStorage.getItem("authToken")||localStorage.getItem("access_token");(await fetch(`https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net/admin/course/${Pe.id}/videos/${Ge}/restore`,{method:"POST",headers:{Authorization:`Bearer ${ur}`}})).ok?(r({title:"Success",description:"Video restored successfully"}),mn(Pe.id)):r({title:"Error",description:"Failed to restore video",variant:"destructive"})};return Pe?e.jsxs("div",{className:"space-y-6",children:[e.jsxs(ds,{children:[e.jsx(Rs,{children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsxs(Ds,{children:["Manage Lessons: ",Pe.title]}),e.jsx(fa,{children:"Add, edit, or order lessons and subparts for this course"})]}),e.jsxs("div",{className:"flex gap-4 items-center",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Fi,{checked:lr,onCheckedChange:xr}),e.jsx(pt,{children:"Show Deleted"})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(We,{variant:"outline",onClick:()=>ye(null),children:"Back to Courses"}),e.jsxs(We,{onClick:Ts,className:"gap-2",children:[e.jsx(aa,{className:"w-4 h-4"}),"Add Lesson"]})]})]})]})}),e.jsx(us,{children:e.jsxs(Rn,{children:[e.jsx(Mn,{children:e.jsxs(Gr,{children:[e.jsx(Lt,{className:"w-12"}),e.jsx(Lt,{children:"Order"}),e.jsx(Lt,{children:"Title"}),e.jsx(Lt,{children:"Type / Subparts"}),e.jsx(Lt,{children:"Duration"}),e.jsx(Lt,{children:"Status"}),e.jsx(Lt,{children:"Preview"}),e.jsx(Lt,{className:"text-right",children:"Actions"})]})}),e.jsxs(Fn,{children:[Se.map(Ge=>{var ts,Yr;const ur=Ge.subparts&&Ge.subparts.length>0,Tr=!!He[Ge.id];return e.jsxs(e.Fragment,{children:[e.jsxs(Gr,{className:ur?"cursor-pointer hover:bg-muted/30":"",children:[e.jsx(St,{children:ur?e.jsx(We,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:()=>Tt(Wr=>({...Wr,[Ge.id]:!Wr[Ge.id]})),children:Tr?e.jsx(pd,{className:"w-4 h-4"}):e.jsx(ei,{className:"w-4 h-4"})}):null}),e.jsx(St,{children:Ge.order_index}),e.jsx(St,{className:"font-medium",children:e.jsxs("div",{className:"flex items-center gap-2.5",children:[Ge.thumbnail_url?e.jsx("img",{width:36,height:24,src:Ge.thumbnail_url,alt:"",className:"w-9 h-6 rounded object-cover border bg-muted/40 shrink-0",loading:"lazy",decoding:"async"}):null,e.jsx("span",{children:Ge.title})]})}),e.jsx(St,{children:ur?e.jsxs(tr,{variant:"outline",className:"gap-1 border-purple-500/30 text-purple-600 bg-purple-500/10 font-semibold",children:[e.jsx(bh,{className:"w-3 h-3"}),(ts=Ge.subparts)==null?void 0:ts.length," Subparts"]}):Ge.doc_url||Ge.is_doc?e.jsxs(tr,{variant:"outline",className:"gap-1 border-blue-500/30 text-blue-600 bg-blue-500/10",children:[e.jsx(Bi,{className:"w-3 h-3"}),"Document"]}):e.jsxs(tr,{variant:"outline",className:"gap-1 border-primary/30 text-primary bg-primary/10",children:[e.jsx(sl,{className:"w-3 h-3"}),"Video"]})}),e.jsx(St,{children:Ge.duration_seconds>0?`${Ge.duration_seconds}s`:"—"}),e.jsx(St,{children:e.jsx(tr,{variant:Ge.is_published?"default":"secondary",children:Ge.is_published?"Published":"Draft"})}),e.jsx(St,{children:e.jsx(tr,{variant:Ge.is_preview?"outline":"secondary",children:Ge.is_preview?"Yes":"No"})}),e.jsxs(St,{className:"text-right",children:[e.jsx(We,{variant:"ghost",size:"sm",onClick:()=>qs(Ge),children:e.jsx(ac,{className:"w-4 h-4"})}),Ge.is_deleted?e.jsx(We,{variant:"ghost",size:"sm",onClick:()=>
379ao(Ge.id),className:"text-primary",children:e.jsx(wh,{className:"w-4 h-4"})}):e.jsx(We,{variant:"ghost",size:"sm",onClick:()=>Ao(Ge.id),className:"text-destructive",children:e.jsx(id,{className:"w-4 h-4"})})]})]},Ge.id),ur&&Tr&&((Yr=Ge.subparts)==null?void 0:Yr.map((Wr,Sn)=>e.jsxs(Gr,{className:"bg-muted/20 text-xs border-l-4 border-l-purple-500",children:[e.jsx(St,{}),e.jsxs(St,{className:"text-muted-foreground pl-6",children:["Part ",Wr.order_index||Sn+1]}),e.jsxs(St,{className:"font-medium text-foreground",children:[e.jsx("div",{children:Wr.title}),Wr.description&&e.jsx("div",{className:"text-[11px] text-muted-foreground font-normal line-clamp-1 mt-0.5 max-w-xs",children:Wr.description})]}),e.jsx(St,{children:Wr.doc_url||Wr.is_doc?e.jsxs("span",{className:"flex items-center gap-1 text-blue-600 dark:text-blue-400",children:[e.jsx(Bi,{className:"w-3 h-3"})," Document"]}):e.jsxs("span",{className:"flex items-center gap-1 text-primary",children:[e.jsx(sl,{className:"w-3 h-3"})," Video"]})}),e.jsx(St,{className:"text-muted-foreground",children:Wr.duration_seconds?`${Wr.duration_seconds}s`:"—"}),e.jsx(St,{children:e.jsx("span",{className:"text-[10px] text-muted-foreground",children:Wr.is_published!==!1?"Active":"Hidden"})}),e.jsx(St,{children:Wr.is_preview?e.jsx(tr,{variant:"outline",className:"text-[10px] py-0 px-1",children:"Preview"}):"—"}),e.jsx(St,{})]},Wr.id||Sn)))]})}),Se.length===0&&e.jsx(Gr,{children:e.jsx(St,{colSpan:8,className:"text-center py-4 text-muted-foreground",children:"No lessons added yet."})})]})]})})]}),e.jsx(Un,{open:st,onOpenChange:Ke,children:e.jsxs(zn,{className:"max-w-3xl",children:[e.jsxs($n,{children:[e.jsx(Vn,{children:rt?"Edit Lesson":"Add New Lesson"}),e.jsx(ha,{children:"Fill in the lesson details below. You can create a single video/document or a multi-part lesson with subparts."})]}),e.jsxs("form",{onSubmit:Ge=>{Ge.preventDefault()},className:"grid gap-4 py-4 max-h-[70vh] overflow-y-auto pr-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(pt,{children:"Lesson Title *"}),e.jsx(pr,{value:rr,onChange:Ge=>Ht(Ge.target.value),placeholder:"e.g. Module 1: Introduction to LegalTech",disabled:Wt,onKeyPress:Ge=>Ge.key==="Enter"&&Ge.preventDefault()})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(pt,{children:"Description"}),e.jsx(Ma,{value:yr,onChange:Ge=>gr(Ge.target.value),placeholder:"Lesson overview and description",disabled:Wt})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(pt,{children:"Order Index"}),e.jsx(pr,{type:"number",value:Xr,onChange:Ge=>et(Ge.target.value),disabled:Wt,onKeyPress:Ge=>Ge.key==="Enter"&&Ge.preventDefault()})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsxs(pt,{className:"flex items-center justify-between text-xs font-semibold",children:[e.jsx("span",{children:"Thumbnail Image (Optional)"}),(nr||(rt==null?void 0:rt.thumbnail_url))&&e.jsx("span",{className:"text-[10px] text-green-600 dark:text-green-400 font-medium",children:"✓ Thumbnail active"})]}),nr||rt!=null&&rt.thumbnail_url?e.jsxs("div",{className:"relative group w-full h-36 rounded-lg overflow-hidden border border-border bg-muted/20 flex items-center justify-center",children:[e.jsx("img",{width:1200,height:675,src:nr?URL.createObjectURL(nr):rt.thumbnail_url,alt:"Lesson Thumbnail",className:"w-full h-full object-cover",loading:"lazy",decoding:"async"}),e.jsxs("div",{className:"absolute inset-0 bg-black/60 opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center gap-2",children:[e.jsxs("label",{className:"cursor-pointer text-xs font-semibold px-3 py-1.5 rounded-md bg-primary text-primary-foreground hover:bg-primary/90 transition shadow",children:["Change Image",e.jsx("input",{type:"file",accept:"image/*",className:"hidden",onChange:Ge=>{var ur;return Cr(((ur=Ge.target.files)==null?void 0:ur[0])||null)},disabled:Wt})]}),e.jsxs(We,{type:"button",variant:"destructive",size:"sm",className:"h-8 text-xs px-3 gap-1 shadow",onClick:async()=>{if(rt!=null&&rt.thumbnail_url){const Ge=rt.thumbnail_url;if(await yn(Ge),rt!=null&&rt.id&&Pe){const ur=localStorage.getItem("authToken")||localStorage.getItem("access_token");await fetch(`https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net/admin/course/${Pe.id}/videos/${rt.id}`,{method:"PATCH",headers:{"Content-Type":"application/json",Authorization:`Bearer ${ur}`},body:JSON.stringify({thumbnail_url:null})}
379),mn(Pe.id)}xt({...rt,thumbnail_url:void 0})}Cr(null),r({title:"Thumbnail Removed",description:"Deleted from storage and database"})},disabled:Wt,children:[e.jsx(id,{className:"w-3.5 h-3.5"})," Remove"]})]})]}):e.jsx(pr,{type:"file",accept:"image/*",onChange:Ge=>{var ur;return Cr(((ur=Ge.target.files)==null?void 0:ur[0])||null)},disabled:Wt}),Yt.videoThumbnail!==void 0&&Yt.videoThumbnail>0&&Yt.videoThumbnail<100&&e.jsx("div",{className:"w-full bg-muted rounded-full h-2 mt-1",children:e.jsx("div",{className:"bg-primary h-2 rounded-full transition-all duration-300",style:{width:`${Yt.videoThumbnail}%`}})}),Yt.videoThumbnail!==void 0&&Yt.videoThumbnail>0&&e.jsxs("p",{className:"text-xs text-muted-foreground mt-0.5",children:["Thumbnail: ",Math.round(Yt.videoThumbnail),"%"]})]})]}),e.jsxs("div",{className:"p-3 bg-muted/30 rounded-lg border border-border flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsxs(pt,{className:"font-bold flex items-center gap-1.5 text-foreground",children:[e.jsx(bh,{className:"w-4 h-4 text-purple-600"}),"Multi-Part Lesson (Has Subparts)"]}),e.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Enable this if this lesson has multiple videos, exercises, or PDF documents."})]}),e.jsx(Fi,{checked:tt,onCheckedChange:Ge=>{Ze(Ge),Ge&&Ft.length===0&&Rr()},disabled:Wt})]}),tt?e.jsxs("div",{className:"space-y-4 p-4 border rounded-lg bg-card",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsxs("h4",{className:"text-sm font-bold text-foreground",children:["Lesson Subparts (",Ft.length,")"]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Add videos, PDFs, and documents included in this lesson"})]}),e.jsxs(We,{type:"button",size:"sm",onClick:Rr,className:"gap-1.5",disabled:Wt,children:[e.jsx(aa,{className:"w-3.5 h-3.5"}),"Add Subpart"]})]}),e.jsx("div",{className:"space-y-3",children:Ft.map((Ge,ur)=>e.jsxs("div",{className:"p-3 rounded-lg border bg-muted/20 space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("span",{className:"text-xs font-bold text-purple-600 dark:text-purple-400",children:["Subpart #",ur+1]}),e.jsx(We,{type:"button",variant:"ghost",size:"sm",className:"h-6 w-6 p-0 text-destructive hover:text-destructive",onClick:()=>ws(ur),disabled:Wt||Ft.length<=1,children:e.jsx(id,{className:"w-3.5 h-3.5"})})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[e.jsxs("div",{className:"grid gap-1",children:[e.jsx(pt,{className:"text-xs",children:"Subpart Title *"}),e.jsx(pr,{value:Ge.title,onChange:Tr=>is(ur,"title",Tr.target.value),placeholder:`e.g. Part ${ur+1}: Overview`,className:"h-8 text-xs",disabled:Wt})]}),e.jsxs("div",{className:"grid gap-1",children:[e.jsx(pt,{className:"text-xs",children:"Type"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs(We,{type:"button",size:"sm",variant:Ge.type==="video"?"default":"outline",className:"h-8 text-xs flex-1 gap-1",onClick:()=>is(ur,"type","video"),disabled:Wt,children:[e.jsx(sl,{className:"w-3 h-3"})," Video"]}),e.jsxs(We,{type:"button",size:"sm",variant:Ge.type==="document"?"default":"outline",className:"h-8 text-xs flex-1 gap-1",onClick:()=>is(ur,"type","document"),disabled:Wt,children:[e.jsx(Bi,{className:"w-3 h-3"})," Document"]})]})]})]}),e.jsxs("div",{className:"grid gap-1",children:[e.jsx(pt,{className:"text-xs",children:"Subpart Description (Optional)"}),e.jsx(Ma,{value:Ge.description||"",onChange:Tr=>is(ur,"description",Tr.target.value),placeholder:`Overview / notes for ${Ge.title||`Part ${ur+1}`}`,className:"min-h-[50px] text-xs",disabled:Wt})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3 items-end",children:[e.jsxs("div",{className:"grid gap-1",children:[e.jsxs(pt,{className:"text-xs",children:[Ge.type==="video"?"Upload Video File":"Upload Document / PDF File",(Ge.existing_video_url||Ge.existing_doc_url)&&!Ge.file&&e.jsx("span",{className:"text-[10px] text-green-600 ml-1.5 font-normal",children:"(File already attached)"})]}),e.jsx(pr,{type:"file",accept:Ge.type==="video"?"video/mp4,video/webm":".pdf,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,text/plain",onChange:Tr=>{var ts;return ea(ur,((ts=Tr.target.files)==null?void 0:ts[0])||null)},className:"h-8 text-xs",disabled:Wt}),Yt[`subpart_${ur}`]!==void 0&&Yt[`subpart_${ur}`]>0&&Yt[`subpart_${ur}`]<100&&e.jsx("div",{className:"w-full bg-muted rounded-full h-1.5 mt-1",children:e.jsx("div",{className:"bg-purple-600 h-1.5 rounded-full transition-all duration-300",style:{width:`${Yt[`subpart_${ur}`]}%`}})})]}),e.jsxs("div",{className:"flex items-center justify-between gap-4 pb-1",children:[Ge.type==="video"?e.jsxs("div",{className:"text-xs text-muted-foreground",children:["Duration: ",e.jsxs("strong",{children:[Ge.duration_seconds||0,"s"]})]}):e.jsx("div",{}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Fi,{checked:Ge.is_preview,onCheckedChange:Tr=>
379is(ur,"is_preview",Tr),disabled:Wt}),e.jsx(pt,{className:"text-xs",children:"Preview"})]})]})]})]},ur))})]}):e.jsxs("div",{className:"space-y-4 p-4 border rounded-lg bg-card",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(pt,{className:"font-semibold",children:"Content Type *"}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs(We,{type:"button",variant:Kt==="video"?"default":"outline",className:"flex items-center justify-center gap-2 h-10",onClick:()=>{Jt("video"),It(null)},disabled:Wt,children:[e.jsx(sl,{className:"w-4 h-4"}),e.jsx("span",{children:"Video Lesson"})]}),e.jsxs(We,{type:"button",variant:Kt==="document"?"default":"outline",className:"flex items-center justify-center gap-2 h-10",onClick:()=>{Jt("document"),dr(null),jr("0")},disabled:Wt,children:[e.jsx(Bi,{className:"w-4 h-4"}),e.jsx("span",{children:"Document / PDF"})]})]})]}),Kt==="video"?e.jsxs("div",{className:"grid gap-2",children:[e.jsxs(pt,{className:"font-semibold flex items-center gap-1.5 text-primary",children:[e.jsx(sl,{className:"w-4 h-4"}),rt&&rt.video_url?"Replace Video File (Optional)":"Upload Video File *",(rt==null?void 0:rt.video_url)&&!_t&&e.jsx("span",{className:"text-[10px] text-green-600 dark:text-green-400 font-normal ml-auto",children:"(Video file already attached)"})]}),e.jsx(pr,{type:"file",accept:"video/mp4,video/webm",onChange:Mr,disabled:Wt}),Yt.video!==void 0&&Yt.video>0&&Yt.video<100&&e.jsx("div",{className:"w-full bg-muted rounded-full h-2 mt-2",children:e.jsx("div",{className:"bg-primary h-2 rounded-full transition-all duration-300",style:{width:`${Yt.video}%`}})}),Yt.video!==void 0&&Yt.video>0&&e.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Video: ",Math.round(Yt.video),"%"]}),e.jsx("div",{className:"flex items-center gap-2 mt-1",children:e.jsxs("span",{className:"text-xs text-muted-foreground",children:["Duration: ",Vr,"s"]}
379)})]}):e.jsxs("div",{className:"grid gap-2",children:[e.jsxs(pt,{className:"font-semibold flex items-center gap-1.5 text-primary",children:[e.jsx(Bi,{className:"w-4 h-4"}),rt&&rt.doc_url?"Replace Document / PDF File (Optional)":"Upload Document / PDF File *",(rt==null?void 0:rt.doc_url)&&!fr&&e.jsx("span",{className:"text-[10px] text-green-600 dark:text-green-400 font-normal ml-auto",children:"(Document file already attached)"})]}),e.jsx(pr,{type:"file",accept:".pdf,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,text/plain",onChange:Ge=>{var ur;return It(((ur=Ge.target.files)==null?void 0:ur[0])||null)},disabled:Wt}),Yt.videoDocument!==void 0&&Yt.videoDocument>0&&Yt.videoDocument<100&&e.jsx("div",{className:"w-full bg-muted rounded-full h-2 mt-2",children:e.jsx("div",{className:"bg-primary h-2 rounded-full transition-all duration-300",style:{width:`${Yt.videoDocument}%`}})}),Yt.videoDocument!==void 0&&Yt.videoDocument>0&&e.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Document: ",Math.round(Yt.videoDocument),"%"]})]}),e.jsxs("div",{className:"flex items-center space-x-2 pt-2 border-t",children:[e.jsx(Fi,{checked:ft,onCheckedChange:je,disabled:Wt}),e.jsx(pt,{children:"Free Preview (Accessible to unsubscribed users)"})]})]}),e.jsxs("div",{className:"flex items-center space-x-2 pt-2",children:[e.jsx(Fi,{checked:$e,onCheckedChange:ht,disabled:Wt}),e.jsx(pt,{children:"Published (Visible in course)"})]})]}),e.jsxs(ka,{children:[e.jsx(We,{variant:"outline",onClick:()=>Ke(!1),disabled:Wt,type:"button",children:"Cancel"}),e.jsx(We,{onClick:$a,disabled:Wt,type:"button",children:Wt?"Uploading & Saving...":"Save Lesson"})]})]})})]}):e.jsxs("div",{className:"space-y-6",children:[e.jsxs(ds,{children:[e.jsx(Rs,{children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(Ds,{children:"Course Management"}),e.jsx(fa,{children:"Manage courses, pricing, and content"})]}),e.jsxs(We,{onClick:Er,className:"gap-2",children:[e.jsx(aa,{className:"w-4 h-4"}),"Create Course"]})]})}),e.jsxs(us,{children:[e.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[e.jsxs("div",{className:"relative w-full max-w-sm",children:[e.jsx(bo,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),e.jsx(pr,{placeholder:"Search courses by author...",value:_,onChange:Ge=>z(Ge.target.value),className:"pl-10"})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Fi,{checked:Ye,onCheckedChange:Vt}),e.jsx(pt,{children:"Show Deleted Courses"})]})]}),e.jsxs(Rn,{children:[e.jsx(Mn,{children:e.jsxs(Gr,{children:[e.jsx(Lt,{children:"Title"}),e.jsx(Lt,{children:"Author"}),e.jsx(Lt,{children:"Tokens (Ltd/Life)"}),e.jsx(Lt,{children:"Status"}),e.jsx(Lt,{className:"text-right",children:"Actions"})]})}),e.jsx(Fn,{children:t?e.jsx(Gr,{children:e.jsx(St,{colSpan:5,className:"text-center",children:"Loading..."})}):d.map(Ge=>e.jsxs(Gr,{children:[e.jsx(St,{className:"font-medium",children:e.jsxs("div",{className:"flex items-center gap-3",children:[Ge.thumbnail_url?e.jsx("img",{width:40,height:28,src:Ge.thumbnail_url,alt:"",className:"w-10 h-7 rounded object-cover border bg-muted/40 shrink-0",loading:"lazy",decoding:"async"}):e.jsx("div",{className:"w-10 h-7 rounded bg-muted/50 border flex items-center justify-center text-[9px] text-muted-foreground shrink-0",children:"No img"}),e.jsx("span",{children:Ge.title})]})}),e.jsx(St,{children:Ge.author_name}),e.jsx(St,{children:Ge.is_free?e.jsx(tr,{variant:"outline",className:"border-green-500 text-green-700 bg-green-500/10",children:"Free"}):`${Ge.price_tokens_limited} / ${Ge.price_tokens_lifetime}`}),e.jsx(St,{children:e.jsx(tr,{variant:Ge.is_published?"default":"secondary",children:Ge.is_published?"Published":"Draft"})}),e.jsx(St,{className:"text-right",children:e.jsxs(bm,{children:[e.jsx(wm,{asChild:!0,children:e.jsx(We,{variant:"ghost",size:"sm",children:e.jsx(Vm,{className:"w-4 h-4"})})}),e.jsxs(Nm,{align:"end",children:[e.jsxs(Tl,{onClick:()=>wn(Ge),children:[e.jsx(sl,{className:"w-4 h-4 mr-2"}),"Manage Videos"]}),e.jsxs(Tl,{onClick:()=>
379or(Ge),children:[e.jsx(ac,{className:"w-4 h-4 mr-2"}),"Edit Course"]}),e.jsx(gh,{}),Ge.is_deleted?e.jsxs(Tl,{onClick:()=>Ms(Ge.id),className:"text-primary",children:[e.jsx(wh,{className:"w-4 h-4 mr-2"}),"Restore"]}):e.jsxs(Tl,{onClick:()=>Ws(Ge.id),className:"text-destructive",children:[e.jsx(id,{className:"w-4 h-4 mr-2"}),"Delete"]})]})]})})]},Ge.id))})]}),w>1&&e.jsxs("div",{className:"flex gap-2 justify-center mt-4",children:[e.jsx(We,{variant:"outline",disabled:te===1,onClick:()=>ue(Ge=>Ge-1),children:"Prev"}),e.jsx(We,{variant:"outline",disabled:te===w,onClick:()=>ue(Ge=>Ge+1),children:"Next"})]})]})]}),e.jsx(Un,{open:v,onOpenChange:m,children:e.jsxs(zn,{className:"max-w-2xl",children:[e.jsxs($n,{children:[e.jsx(Vn,{children:y?"Edit Course":"Create New Course"}),e.jsx(ha,{children:"Enter the course details below. Media can be uploaded now or later."})]}),e.jsxs("form",{onSubmit:Ge=>{Ge.preventDefault()},className:"grid gap-4 py-4 max-h-[60vh] overflow-y-auto pr-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(pt,{children:"Title *"}),e.jsx(pr,{value:S,onChange:Ge=>g(Ge.target.value),placeholder:"Course Title",disabled:Wt,onKeyPress:Ge=>Ge.key==="Enter"&&Ge.preventDefault()})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(pt,{children:"Author Name *"}),e.jsx(pr,{value:I,onChange:Ge=>M(Ge.target.value),placeholder:"Author",disabled:Wt,onKeyPress:Ge=>Ge.key==="Enter"&&Ge.preventDefault()})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(pt,{children:"Description"}),e.jsx(Ma,{value:j,onChange:Ge=>A(Ge.target.value),placeholder:"Course Description",disabled:Wt})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsxs(pt,{className:"flex items-center justify-between text-xs font-semibold",children:[e.jsx("span",{children:"Thumbnail Image (Optional)"}),(ge||(y==null?void 0:y.thumbnail_url))&&e.jsx("span",{className:"text-[10px] text-green-600 dark:text-green-400 font-medium",children:"✓ Thumbnail active"})]}),ge||y!=null&&y.thumbnail_url?e.jsxs("div",{className:"relative group w-full h-36 rounded-lg overflow-hidden border border-border bg-muted/20 flex items-center justify-center",children:[e.jsx("img",{width:1200,height:675,src:ge?URL.createObjectURL(ge):y.thumbnail_url,alt:"Course Thumbnail",className:"w-full h-full object-cover",loading:"lazy",decoding:"async"}),e.jsxs("div",{className:"absolute inset-0 bg-black/60 opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center gap-2",children:[e.jsxs("label",{className:"cursor-pointer text-xs font-semibold px-3 py-1.5 rounded-md bg-primary text-primary-foreground hover:bg-primary/90 transition shadow",children:["Change Image",e.jsx("input",{type:"file",accept:"image/*",className:"hidden",onChange:Ge=>{var ur;return Ee(((ur=Ge.target.files)==null?void 0:ur[0])||null)},disabled:Wt})]}),e.jsxs(We,{type:"button",variant:"destructive",size:"sm",className:"h-8 text-xs px-3 gap-1 shadow",onClick:async()=>{if(y!=null&&y.thumbnail_url){const Ge=y.thumbnail_url;if(await yn(Ge),y!=null&&y.id){const ur=localStorage.getItem("authToken")||localStorage.getItem("access_token");await fetch(`https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net/admin/course/${y.id}`,{method:"PATCH",headers:{"Content-Type":"application/json",Authorization:`Bearer ${ur}`},body:JSON.stringify({thumbnail_url:null})}),Pr()}C({...y,thumbnail_url:void 0})}Ee(null),r({title:"Thumbnail Removed",description:"Deleted from storage and database"})},disabled:Wt,children:[e.jsx(id,{className:"w-3.5 h-3.5"})," Remove"]})]})]}):e.jsx(pr,{type:"file",accept:"image/*",onChange:Ge=>{var ur;return Ee(((ur=Ge.target.files)==null?void 0:ur[0])||null)},disabled:Wt}),Yt.thumbnail!==void 0&&Yt.thumbnail>0&&Yt.thumbnail<100&&e.jsx("div",{className:"w-full bg-muted rounded-full h-2",children:e.jsx("div",{className:"bg-primary h-2 rounded-full transition-all duration-300",style:{width:`${Yt.thumbnail}%`}})}),Yt.thumbnail!==void 0&&Yt.thumbnail>0&&e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Thumbnail: ",Math.round(Yt.thumbnail),"%"]})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsxs(pt,{className:"flex items-center justify-between text-xs font-semibold",children:[e.jsx("span",{children:"Trailer Video (Optional)"}),(y==null?void 0:y.trailer_url)&&!Xe&&e.jsx("span",{className:"text-[10px] text-green-600 dark:text-green-400 font-normal",children:"(Trailer already attached)"})]}),e.jsx(pr,{type:"file",accept:"video/mp4,video/webm",onChange:Ge=>{var ur;return re(((ur=Ge.target.files)==null?void 0:ur[0])||null)},disabled:Wt}),Yt.trailer!==void 0&&Yt.trailer>0&&Yt.trailer<100&&e.jsx("div",{className:"w-full bg-muted rounded-full h-2",children:e.jsx("div",{className:"bg-primary h-2 rounded-full transition-all duration-300",style:{width:`${Yt.trailer}%`}})}),Yt.trailer!==void 0&&Yt.trailer>0&&e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Trailer: ",Math.round(Yt.trailer),"%"]})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"grid gap-2 border-r pr-4",children:[e.jsx(pt,{className:"text-primary font-bold",children:"Limited Access (Tier 1)"}),e.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[e.jsxs("div",{className:"grid gap-1",children:[e.jsx(pt,{className:"text-[10px]",children:"Tokens"}),e.jsx(pr,{type:"number",value:B,onChange:Ge=>W(Ge.target.value),disabled:Wt,onKeyPress:Ge=>Ge.key==="Enter"&&Ge.preventDefault()})]}),e.jsxs("div",{className:"grid gap-1",children:[e.jsx(pt,{className:"text-[10px]",children:"Days"}),e.jsx(pr,{type:"number",value:Y,onChange:Ge=>J(Ge.target.value),disabled:Wt,onKeyPress:Ge=>Ge.key==="Enter"&&Ge.preventDefault()})]})]})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(pt,{className:"text-primary font-bold",children:"Extended Access (Tier 2)"}),e.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[e.jsxs("div",{className:"grid gap-1",children:[e.jsx(pt,{className:"text-[10px]",children:"Tokens"}),e.jsx(pr,{type:"number",value:le,onChange:Ge=>ae(Ge.target.value),disabled:Wt,onKeyPress:Ge=>Ge.key==="Enter"&&Ge.preventDefault()})]}),e.jsxs("div",{className:"grid gap-1",children:[e.jsx(pt,{className:"text-[10px]",children:"Days"}),e.jsx(pr,{type:"number",value:Z,onChange:Ge=>oe(Ge.target.value),disabled:Wt,onKeyPress:Ge=>Ge.key==="Enter"&&Ge.preventDefault()})]})]})]})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(pt,{className:"text-primary font-bold",children:"Lifetime Access"}),e.jsx("div",{className:"grid grid-cols-3 gap-4",children:e.jsxs("div",{className:"grid gap-1",children:[e.jsx(pt,{className:"text-[10px]",children:"Tokens"}),e.jsx(pr,{type:"number",value:H,onChange:Ge=>fe(Ge.target.value),disabled:Wt,onKeyPress:Ge=>Ge.key==="Enter"&&Ge.preventDefault()})]})})]}),e.jsxs("div",{className:"flex items-center space-x-6 mt-2",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Fi,{checked:se,onCheckedChange:de,disabled:Wt}),e.jsx(pt,{children:"Published (Visible to users)"})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Fi,{checked:q,onCheckedChange:U,disabled:Wt}),e.jsx(pt,{className:"text-green-700 dark:text-green-400 font-bold",children:"Free Access"})]})]})]}),e.jsxs(ka,{children:[e.jsx(We,{variant:"outline",onClick:()=>m(!1),disabled:Wt,type:"button",children:"Cancel"}),e.jsx(We,{onClick:vt,disabled:Wt,type:"button",children:Wt?"Uploading & Saving...":"Save Course"})]})]})})]})},mx=({validationRequests:r,onViewValidation:d})=>e.jsx("div",{className:"space-y-6",children:e.jsxs(ds,{children:[e.jsxs(Rs,{children:[e.jsx(Ds,{children:"Software Validation Requests"}),e.jsx(fa,{children:"Review and manage software validation requests from vendors and waitlist submissions"})]}),e.jsxs(us,{children:[e.jsxs("div",{className:"mb-6 grid md:grid-cols-4 gap-4",children:[e.jsx(ds,{children:e.jsx(us,{className:"pt-6",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx($i,{className:"w-5 h-5 text-yellow-500"}),e.jsxs("div",{children:[e.jsx("div",{className:"text-2xl font-bold",children:r.filter(s=>s.status==="pending").length}),e.jsx("div",{className:"text-sm text-muted-foreground",children:"Pending Review"})]})]})})}),e.jsx(ds,{children:e.jsx(us,{className:"pt-6",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ll,{className:"w-5 h-5 text-green-500"}),e.jsxs("div",{children:[e.jsx("div",{className:"text-2xl font-bold",children:r.filter(s=>s.status==="approved").length}),e.jsx("div",{className:"text-sm text-muted-foreground",children:"Approved"})]})]})})}),e.jsx(ds,{children:e.jsx(us,{className:"pt-6",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(oc,{className:"w-5 h-5 text-red-500"}),e.jsxs("div",{children:[e.jsx("div",{className:"text-2xl font-bold",children:r.filter(s=>s.status==="rejected").length}),e.jsx("div",{className:"text-sm text-muted-foreground",children:"Rejected"})]})]})})}),e.jsx(ds,{children:e.jsx(us,{className:"pt-6",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Th,{className:"w-5 h-5 text-blue-500"}),e.jsxs("div",{children:[e.jsx("div",{className:"text-2xl font-bold",children:r.length}),e.jsx("div",{className:"text-sm text-muted-foreground",children:"Total Requests"})]})]})})})]}),e.jsxs("div",{className:"mb-4 flex gap-2 flex-wrap",children:[e.jsxs(tr,{variant:"outline",className:"cursor-pointer hover:bg-muted",children:["All Requests (",r.length,")"]}),e.jsxs(tr,{variant:"outline",className:"cursor-pointer hover:bg-muted",children:["Vendor Requests (",r.filter(s=>s.requestType==="vendor").length,")"]}),e.jsxs(tr,{variant:"outline",className:"cursor-pointer hover:bg-muted",children:["Waitlist (",r.filter(s=>s.requestType==="waitlist").length,")"]})]}),e.jsx("div",{className:"rounded-md border overflow-x-auto",children:e.jsxs(Rn,{children:[e.jsx(Mn,{children:e.jsxs(Gr,{children:[e.jsx(Lt,{children:"Request ID"}),e.jsx(Lt,{children:"Type"}),e.jsx(Lt,{children:"Software Name"}),e.jsx(Lt,{children:"Company"}),e.jsx(Lt,{children:"Category"}),e.jsx(Lt,{children:"Submitted"}),e.jsx(Lt,{children:"Status"}),e.jsx(Lt,{className:"text-right",children:"Actions"})]})}),e.jsx(Fn,{children:r.map(s=>e.jsxs(Gr,{children:[e.jsx(St,{className:"font-mono text-sm",children:s.id}),e.jsx(St,{children:e.jsx(tr,{variant:s.requestType==="vendor"?"default":"secondary",children:s.requestType==="vendor"?"Vendor":"Waitlist"})}),e.jsx(St,{className:"font-medium",children:s.softwareName}),e.jsx(St,{children:e.jsxs("div",{children:[e.jsx("div",{className:"font-medium",children:s.companyName}),e.jsx("div",{className:"text-sm text-muted-foreground",children:s.contactEmail})]})}),e.jsx(St,{children:e.jsx(tr,{variant:"outline",children:s.category})}),e.jsx(St,{className:"text-sm",children:s.submittedAt}),e.jsxs(St,{children:[s.status==="pending"&&e.jsxs(tr,{variant:"outline",className:"gap-1",children:[e.jsx($i,{className:"w-3 h-3"}),"Pending"]}),s.status==="approved"&&e.jsxs(tr,{className:"gap-1 bg-green-500",children:[e.jsx(Ll,{className:"w-3 h-3"}),"Approved"]}),s.status==="rejected"&&e.jsxs(tr,{variant:"destructive",className:"gap-1",children:[e.jsx(oc,{className:"w-3 h-3"}),"Rejected"]})]}),e.jsx(St,{className:"text-right",children:e.jsxs(We,{variant:"ghost",size:"sm",onClick:()=>d(s),children:[e.jsx(Wi,{className:"w-4 h-4 mr-1"}),"View"]}
379)})]},s.id))})]})})]})]})}),Zf=10,px=({addProductRequests:r,editProductRequests:d,ownershipRequests:s,ownershipsPage:_,setOwnershipsPage:z,totalPages_request:te,startPage:ue,endPage:w,isLoading:O,onViewOwnership:t,totalRequests:f})=>{const v=[...r.map(m=>({...m,type:"add"})),...d.map(m=>({...m,type:"edit"})),...s.map(m=>({...m,type:"own"}))];return v.sort((m,y)=>new Date(y.submittedAt).getTime()-new Date(m.submittedAt).getTime()),e.jsx("div",{className:"space-y-6",children:e.jsxs(ds,{children:[e.jsx(Rs,{children:e.jsx(Ds,{children:"Product Add/Edit/Own Activity"})}),e.jsxs(us,{children:[e.jsx("div",{className:"rounded-md border overflow-x-auto",children:e.jsxs(Rn,{children:[e.jsx(Mn,{children:e.jsxs(Gr,{children:[e.jsx(Lt,{children:"Request ID"}),e.jsx(Lt,{children:"Product Name"}),e.jsx(Lt,{children:"Company"}),e.jsx(Lt,{children:"Vendor"}),e.jsx(Lt,{children:"Submitted"}),e.jsx(Lt,{children:"Type"}),e.jsx(Lt,{className:"text-right",children:"Actions"})]})}),e.jsx(Fn,{children:v.length===0?e.jsx(Gr,{children:e.jsx(St,{colSpan:8,className:"text-center py-8 text-muted-foreground",children:"No requests found"})}):v.map(m=>e.jsxs(Gr,{children:[e.jsx(St,{className:"font-mono text-sm",children:m.id}),e.jsx(St,{className:"font-medium",children:m.productName}),e.jsx(St,{children:m.companyName}),e.jsx(St,{children:e.jsxs("div",{children:[e.jsx("div",{className:"font-medium",children:m.vendorName}),e.jsx("div",{className:"text-sm text-muted-foreground",children:m.vendorEmail})]})}),e.jsx(St,{className:"text-sm",children:new Date(m.submittedAt).toLocaleDateString()}),e.jsx(St,{children:e.jsx(tr,{variant:"secondary",children:m.type==="add"?"Add Product":m.type==="edit"?"Edit":"Own"})}),e.jsx(St,{className:"text-right",children:e.jsxs(We,{variant:"ghost",size:"sm",onClick:()=>t({...m}),children:[e.jsx(Wi,{className:"w-4 h-4 mr-1"}),"View"]}
379)})]},m.id))})]})}),te>1&&e.jsxs("div",{className:"flex items-center justify-between mt-4",children:[e.jsxs("div",{className:"text-sm text-muted-foreground",children:["Showing ",(_-1)*Zf+1," to ",Math.min(_*Zf,f)," of ",f," requests"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(We,{variant:"outline",size:"sm",onClick:()=>z(Math.max(1,_-1)),disabled:_===1||O,children:"Previous"}),e.jsx("div",{className:"flex items-center gap-1",children:Array.from({length:w-ue+1},(m,y)=>ue+y).map(m=>e.jsx(We,{variant:m===_?"default":"outline",size:"sm",onClick:()=>z(m),disabled:O,className:"w-8 h-8 p-0",children:m},m))}),e.jsx(We,{variant:"outline",size:"sm",onClick:()=>z(Math.min(te,_+1)),disabled:_===te||O,children:"Next"})]})]})]})]})})};function xn(r){const d=Object.prototype.toString.call(r);return r instanceof Date||typeof r=="object"&&d==="[object Date]"?new r.constructor(+r):typeof r=="number"||d==="[object Number]"||typeof r=="string"||d==="[object String]"?new Date(r):new Date(NaN)}function ri(r,d){return r instanceof Date?new r.constructor(d):new Date(d)}function yo(r,d){const s=xn(r);return isNaN(d)?ri(r,NaN):(d&&s.setDate(s.getDate()+d),s)}function Si(r,d){const s=xn(r);if(isNaN(d))return ri(r,NaN);if(!d)return s;const _=s.getDate(),z=ri(r,s.getTime());z.setMonth(s.getMonth()+d+1,0);const te=z.getDate();return _>=te?z:(s.setFullYear(z.getFullYear(),z.getMonth(),_),s)}const Ih=6048e5,gx=864e5;let vx={};function Ed(){return vx}function Vi(r,d){var w,O,t,f;const s=Ed(),_=(d==null?void 0:d.weekStartsOn)??((O=(w=d==null?void 0:d.locale)==null?void 0:w.options)==null?void 0:O.weekStartsOn)??s.weekStartsOn??((f=(t=s.locale)==null?void 0:t.options)==null?void 0:f.weekStartsOn)??0,z=xn(r),te=z.getDay(),ue=(te<_?7:0)+te-_;return z.setDate(z.getDate()-ue),z.setHours(0,0,0,0),z}function ic(r){return Vi(r,{weekStartsOn:1})}function op(r){const d=xn(r),s=d.getFullYear(),_=ri(r,0);_.setFullYear(s+1,0,4),_.setHours(0,0,0,0);const z=ic(_),te=ri(r,0);te.setFullYear(s,0,4),te.setHours(0,0,0,0);const ue=ic(te);return d.getTime()>=z.getTime()?s+1:d.getTime()>=ue.getTime()?s:s-1}function Lc(r){const d=xn(r);return d.setHours(0,0,0,0),d}function mu(r){const d=xn(r),s=new Date(Date.UTC(d.getFullYear(),d.getMonth(),d.getDate(),d.getHours(),d.getMinutes(),d.getSeconds(),d.getMilliseconds()));return s.setUTCFullYear(d.getFullYear()),+r-+s}function zi(r,d){const s=Lc(r),_=Lc(d),z=+s-mu(s),te=+_-mu(_);return Math.round((z-te)/gx)}function xx(r){const d=op(r),s=ri(r,0);return s.setFullYear(d,0,4),s.setHours(0,0,0,0),ic(s)}function _h(r,d){const s=d*7;return yo(r,s)}function yx(r,d){return Si(r,d*12)}function jx(r){let d;return r.forEach(function(s){const _=xn(s);(d===void 0||d<_||isNaN(Number(_)))&&(d=_)}),d||new Date(NaN)}function bx(r){let d;return r.forEach(s=>{const _=xn(s);(!d||d>_||isNaN(+_))&&(d=_)}),d||new Date(NaN)}function Do(r,d){const s=Lc(r),_=Lc(d);return+s==+_}function Rh(r){return r instanceof Date||typeof r=="object"&&Object.prototype.toString.call(r)==="[object Date]"}function wx(r){if(!Rh(r)&&typeof r!="number")return!1;const d=xn(r);return!isNaN(Number(d))}function Ad(r,d){const s=xn(r),_=xn(d),z=s.getFullYear()-_.getFullYear(),te=s.getMonth()-_.getMonth();return z*12+te}function Nx(r,d,s){const _=Vi(r,s),z=Vi(d,s),te=+_-mu(_),ue=+z-mu(z);return Math.round((te-ue)/Ih)}function Mh(r){const d=xn(r),s=d.getMonth();return d.setFullYear(d.getFullYear(),s+1,0),d.setHours(23,59,59,999),d}function Uo(r){const d=xn(r);return d.setDate(1),d.setHours(0,0,0,0),d}function ip(r){const d=xn(r),s=ri(r,0);return s.setFullYear(d.getFullYear(),0,1),s.setHours(0,0,0,0),s}function Fh(r,d){var w,O,t,f;const s=Ed(),_=(d==null?void 0:d.weekStartsOn)??((O=(w=d==null?void 0:d.locale)==null?void 0:w.options)==null?void 0:O.weekStartsOn)??s.weekStartsOn??((f=(t=s.locale)==null?void 0:t.options)==null?void 0:f.weekStartsOn)??0,z=xn(r),te=z.getDay(),ue=(te<_?-7:0)+6-(te-_);return z.setDate(z.getDate()+ue),z.setHours(23,59,59,999),z}function lp(r){return Fh(r,{weekStartsOn:1})}const Sx={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Cx=(r,d,s)=>{let _;const z=Sx[r];
vendor: 4,711 bytes, line 379
379return typeof z=="string"?_=z:d===1?_=z.one:_=z.other.replace("{{count}}",d.toString()),s!=null&&s.addSuffix?s.comparison&&s.comparison>0?"in "+_:_+" ago":_};function ah(r){return(d={})=>{const s=d.width?String(d.width):r.defaultWidth;return r.formats[s]||r.formats[r.defaultWidth]}}const Ax={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Ex={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},kx={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},_x={date:ah({formats:Ax,defaultWidth:"full"}),time:ah({formats:Ex,defaultWidth:"full"}),dateTime:ah({formats:kx,defaultWidth:"full"})},Px={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Tx=(r,d,s,_)=>Px[r];function dd(r){return(d,s)=>{const _=s!=null&&s.context?String(s.context):"standalone";let z;if(_==="formatting"&&r.formattingValues){const ue=r.defaultFormattingWidth||r.defaultWidth,w=s!=null&&s.width?String(s.width):ue;z=r.formattingValues[w]||r.formattingValues[ue]}else{const ue=r.defaultWidth,w=s!=null&&s.width?String(s.width):r.defaultWidth;z=r.values[w]||r.values[ue]}const te=r.argumentCallback?r.argumentCallback(d):d;return z[te]}}const Lx={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Ox={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Ix={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Rx={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Mx={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Fx={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Dx=(r,d)=>{const s=Number(r),_=s%100;if(_>20||_<10)switch(_%10){case 1:return s+"st";case 2:return s+"nd";case 3:return s+"rd"}return s+"th"},Bx={ordinalNumber:Dx,era:dd({values:Lx,defaultWidth:"wide"}),quarter:dd({values:Ox,defaultWidth:"wide",argumentCallback:r=>r-1}),month:dd({values:Ix,defaultWidth:"wide"}),day:dd({values:Rx,defaultWidth:"wide"}),dayPeriod:dd({values:Mx,defaultWidth:"wide",formattingValues:Fx,defaultFormattingWidth:"wide"})};function ud(r){return(d,s={})=>{const _=s.width,z=_&&r.matchPatterns[_]||r.matchPatterns[r.defaultMatchWidth],te=d.match(z);if(!te)return null;const ue=te[0],w=_&&r.parsePatterns[_]||r.parsePatterns[r.defaultParseWidth],O=Array.isArray(w)?zx(w,v=>v.test(ue)):Ux(w,v=>v.test(ue));let t;t=r.valueCallback?r.valueCallback(O):O,t=s.valueCallback?s.valueCallback(t):t;const f=d.slice(ue.length);return{value:t,rest:f}}}function Ux(r,d){for(const s in r)if(Object.prototype.hasOwnProperty.call(r,s)&&d(r[s]))return s}function zx(r,d){for(let s=0;s<r.length;s++)if(d(r[s]))return s}function $x(r){return(d,s={})=>{const _=d.match(r.matchPattern);if(!_)return null;const z=_[0],te=d.match(r.parsePattern);if(!te)return null;let ue=r.valueCallback?r.valueCallback(te[0]):te[0];ue=s.valueCallback?s.valueCallback(ue):ue;const w=d.slice(z.length);return{value:ue,rest:w}}}const Vx=/^(\d+)(th|st|nd|rd)?/i,Wx=/\d+/i,Hx={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Gx={any:[/^b/i,/^(a|c)/i]},Yx={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Kx={any:[/1/i,/2/i,/3/i,/4/i]},Xx={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i}
vendor: 8,094 bytes, line 379
379,Zx={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Jx={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Qx={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},qx={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},e0={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},t0={ordinalNumber:$x({matchPattern:Vx,parsePattern:Wx,valueCallback:r=>parseInt(r,10)}),era:ud({matchPatterns:Hx,defaultMatchWidth:"wide",parsePatterns:Gx,defaultParseWidth:"any"}),quarter:ud({matchPatterns:Yx,defaultMatchWidth:"wide",parsePatterns:Kx,defaultParseWidth:"any",valueCallback:r=>r+1}),month:ud({matchPatterns:Xx,defaultMatchWidth:"wide",parsePatterns:Zx,defaultParseWidth:"any"}),day:ud({matchPatterns:Jx,defaultMatchWidth:"wide",parsePatterns:Qx,defaultParseWidth:"any"}),dayPeriod:ud({matchPatterns:qx,defaultMatchWidth:"any",parsePatterns:e0,defaultParseWidth:"any"})},cp={code:"en-US",formatDistance:Cx,formatLong:_x,formatRelative:Tx,localize:Bx,match:t0,options:{weekStartsOn:0,firstWeekContainsDate:1}};function r0(r){const d=xn(r);return zi(d,ip(d))+1}function dp(r){const d=xn(r),s=+ic(d)-+xx(d);return Math.round(s/Ih)+1}function up(r,d){var f,v,m,y;const s=xn(r),_=s.getFullYear(),z=Ed(),te=(d==null?void 0:d.firstWeekContainsDate)??((v=(f=d==null?void 0:d.locale)==null?void 0:f.options)==null?void 0:v.firstWeekContainsDate)??z.firstWeekContainsDate??((y=(m=z.locale)==null?void 0:m.options)==null?void 0:y.firstWeekContainsDate)??1,ue=ri(r,0);ue.setFullYear(_+1,0,te),ue.setHours(0,0,0,0);const w=Vi(ue,d),O=ri(r,0);O.setFullYear(_,0,te),O.setHours(0,0,0,0);const t=Vi(O,d);return s.getTime()>=w.getTime()?_+1:s.getTime()>=t.getTime()?_:_-1}function s0(r,d){var w,O,t,f;const s=Ed(),_=(d==null?void 0:d.firstWeekContainsDate)??((O=(w=d==null?void 0:d.locale)==null?void 0:w.options)==null?void 0:O.firstWeekContainsDate)??s.firstWeekContainsDate??((f=(t=s.locale)==null?void 0:t.options)==null?void 0:f.firstWeekContainsDate)??1,z=up(r,d),te=ri(r,0);return te.setFullYear(z,0,_),te.setHours(0,0,0,0),Vi(te,d)}function hp(r,d){const s=xn(r),_=+Vi(s,d)-+s0(s,d);return Math.round(_/Ih)+1}function In(r,d){const s=r<0?"-":"",_=Math.abs(r).toString().padStart(d,"0");return s+_}const Al={y(r,d){const s=r.getFullYear(),_=s>0?s:1-s;return In(d==="yy"?_%100:_,d.length)},M(r,d){const s=r.getMonth();return d==="M"?String(s+1):In(s+1,2)},d(r,d){return In(r.getDate(),d.length)},a(r,d){const s=r.getHours()/12>=1?"pm":"am";switch(d){case"a":case"aa":return s.toUpperCase();case"aaa":return s;case"aaaaa":return s[0];case"aaaa":default:return s==="am"?"a.m.":"p.m."}},h(r,d){return In(r.getHours()%12||12,d.length)},H(r,d){return In(r.getHours(),d.length)},m(r,d){return In(r.getMinutes(),d.length)},s(r,d){return In(r.getSeconds(),d.length)},S(r,d){const s=d.length,_=r.getMilliseconds(),z=Math.trunc(_*Math.pow(10,s-3));return In(z,d.length)}},wc={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Jf={G:function(r,d,s){const _=r.getFullYear()>0?1:0;switch(d){case"G":case"GG":case"GGG":return s.era(_,{width:"abbreviated"});case"GGGGG":return s.era(_,{width:"narrow"});case"GGGG":default:return s.era(_,{width:"wide"})}},y:function(r,d,s){if(d==="yo"){const _=r.getFullYear(),z=_>0?_:1-_;return s.ordinalNumber(z,{unit:"year"})}return Al.y(r,d)},Y:function(r,d,s,_){const z=up(r,_),te=z>0?z:1-z;if(d==="YY"){const ue=te%100;return In(ue,2)}return d==="Yo"?s.ordinalNumber(te,{unit:"year"}):In(te,d.length)},R:function(r,d){const s=op(r);return In(s,d.length)},u:function(r,d){const s=r.getFullYear();return In(s,d.length)},Q:function(r,d,s){const _=Math.ceil((r.getMonth()+1)/3);switch(d){case"Q":return String(_);case"QQ":return In(_,2);case"Qo":return s.ordinalNumber(_,{unit:"quarter"});case"QQQ":return s.quarter(_,{width:"abbreviated",context:"formatting"});case"QQQQQ":return s.quarter(_,{width:"narrow",context:"formatting"});case"QQQQ":default:return s.quarter(_,{width:"wide",context:"formatting"})}},q:function(r,d,s){const _=Math.ceil((r.getMonth()+1)/3);switch(d){case"q":return String(_);case"qq":return In(_,2);case"qo":return s.ordinalNumber(_,{unit:"quarter"});case"qqq":return s.quarter(_,{width:"abbreviated",context:"standalone"});case"qqqqq":return s.quarter(_,{width:"narrow",context:"standalone"});case"qqqq":default:return s.quarter(_,{width:"wide",context:"standalone"})}},M:function(r,d,s){const _=r.getMonth();switch(d){case"M":case"MM":return Al.M(r,d);case"Mo":return s.ordinalNumber(_+1,{unit:"month"});case"MMM":return s.month(_,{width:"abbreviated",context:"formatting"});case"MMMMM":return s.month(_,{width:"narrow",context:"formatting"});case"MMMM":default:return s.month(_,{width:"wide",context:"formatting"})}},L:function(r,d,s){const _=r.getMonth();switch(d){case"L":return String(_+1);case"LL":return In(_+1,2);case"Lo":return s.ordinalNumber(_+1,{unit:"month"});case"LLL":return s.month(_,{width:"abbreviated",context:"standalone"});case"LLLLL":return s.month(_,{width:"narrow",context:"standalone"});case"LLLL":default:return s.month(_,{width:"wide",context:"standalone"})}},w:function(r,d,s,_){const z=hp(r,_);return d==="wo"?s.ordinalNumber(z,{unit:"week"}):In(z,d.length)},I:function(r,d,s){const _=dp(r);return d==="Io"?s.ordinalNumber(_,{unit:"week"}):In(_,d.length)},d:function(r,d,s){return d==="do"?s.ordinalNumber(r.getDate(),{unit:"date"}):Al.d(r,d)},D:function(r,d,s){const _=r0(r);return d==="Do"?s.ordinalNumber(_,{unit:"dayOfYear"}):In(_,d.length)},E:function(r,d,s){const _=r.getDay();switch(d){case"E":case"EE":case"EEE":return s.day(_,{width:"abbreviated",context:"formatting"});case"EEEEE":return s.day(_,{width:"narrow",context:"formatting"});case"EEEEEE":return s.day(_,{width:"short",context:"formatting"});case"EEEE":default:return s.day(_,{width:"wide",context:"formatting"})}},e:function(r,d,s,_){const z=r.getDay(),te=(z-_.weekStartsOn+8)%7||7;switch(d){case"e":return String(te);case"ee":return In(te,2);case"eo":return s.ordinalNumber(te,{unit:"day"});case"eee":return s.day(z,{width:"abbreviated",context:"formatting"});case"eeeee":return s.day(z,{width:"narrow",context:"formatting"});case"eeeeee":return s.day(z,{width:"short",context:"formatting"});case"eeee":default:return s.day(z,{width:"wide",context:"formatting"})}},c:function(r,d,s,_){const z=r.getDay(),te=(z-_.weekStartsOn+8)%7||7;switch(d){case"c":return String(te);case"cc":return In(te,d.length);case"co":return s.ordinalNumber(te,{unit:"day"});case"ccc":return s.day(z,{width:"abbreviated",context:"standalone"});case"ccccc":return s.day(z,{width:"narrow",context:"standalone"});case"cccccc":return s.day(z,{width:"short",context:"standalone"});case"cccc":default:return s.day(z,{width:"wide",context:"standalone"})}},i:function(r,d,s){const _=r.getDay(),z=_===0?7:_;switch(d){case"i":return String(z);case"ii":return In(z,d.length);case"io":return s.ordinalNumber(z,{unit:"day"});case"iii":return s.day(_,{width:"abbreviated",context:"formatting"});case"iiiii":return s.day(_,{width:"narrow",context:"formatting"});case"iiiiii":return s.day(_,{width:"short",context:"formatting"});case"iiii":default:return s.day(_,{width:"wide",context:"formatting"})}},a:function(r,d,s){const z=r.getHours()/12>=1?"pm":"am";switch(d){case"a":case"aa":return s.dayPeriod(z,{width:"abbreviated",context:"formatting"});case"aaa":return s.dayPeriod(z,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return s.dayPeriod(z,{width:"narrow",context:"formatting"});case"aaaa":default:return s.dayPeriod(z,{width:"wide",context:"formatting"})}},b:function(r,d,s){const _=r.getHours();let z;switch(_===12?z=wc.noon:_===0?z=wc.midnight:z=_/12>
vendor: 4,706 bytes, line 379
379=1?"pm":"am",d){case"b":case"bb":return s.dayPeriod(z,{width:"abbreviated",context:"formatting"});case"bbb":return s.dayPeriod(z,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return s.dayPeriod(z,{width:"narrow",context:"formatting"});case"bbbb":default:return s.dayPeriod(z,{width:"wide",context:"formatting"})}},B:function(r,d,s){const _=r.getHours();let z;switch(_>=17?z=wc.evening:_>=12?z=wc.afternoon:_>=4?z=wc.morning:z=wc.night,d){case"B":case"BB":case"BBB":return s.dayPeriod(z,{width:"abbreviated",context:"formatting"});case"BBBBB":return s.dayPeriod(z,{width:"narrow",context:"formatting"});case"BBBB":default:return s.dayPeriod(z,{width:"wide",context:"formatting"})}},h:function(r,d,s){if(d==="ho"){let _=r.getHours()%12;return _===0&&(_=12),s.ordinalNumber(_,{unit:"hour"})}return Al.h(r,d)},H:function(r,d,s){return d==="Ho"?s.ordinalNumber(r.getHours(),{unit:"hour"}):Al.H(r,d)},K:function(r,d,s){const _=r.getHours()%12;return d==="Ko"?s.ordinalNumber(_,{unit:"hour"}):In(_,d.length)},k:function(r,d,s){let _=r.getHours();return _===0&&(_=24),d==="ko"?s.ordinalNumber(_,{unit:"hour"}):In(_,d.length)},m:function(r,d,s){return d==="mo"?s.ordinalNumber(r.getMinutes(),{unit:"minute"}):Al.m(r,d)},s:function(r,d,s){return d==="so"?s.ordinalNumber(r.getSeconds(),{unit:"second"}):Al.s(r,d)},S:function(r,d){return Al.S(r,d)},X:function(r,d,s){const _=r.getTimezoneOffset();if(_===0)return"Z";switch(d){case"X":return qf(_);case"XXXX":case"XX":return tc(_);case"XXXXX":case"XXX":default:return tc(_,":")}},x:function(r,d,s){const _=r.getTimezoneOffset();switch(d){case"x":return qf(_);case"xxxx":case"xx":return tc(_);case"xxxxx":case"xxx":default:return tc(_,":")}},O:function(r,d,s){const _=r.getTimezoneOffset();switch(d){case"O":case"OO":case"OOO":return"GMT"+Qf(_,":");case"OOOO":default:return"GMT"+tc(_,":")}},z:function(r,d,s){const _=r.getTimezoneOffset();switch(d){case"z":case"zz":case"zzz":return"GMT"+Qf(_,":");case"zzzz":default:return"GMT"+tc(_,":")}},t:function(r,d,s){const _=Math.trunc(r.getTime()/1e3);return In(_,d.length)},T:function(r,d,s){const _=r.getTime();return In(_,d.length)}};function Qf(r,d=""){const s=r>0?"-":"+",_=Math.abs(r),z=Math.trunc(_/60),te=_%60;return te===0?s+String(z):s+String(z)+d+In(te,2)}function qf(r,d){return r%60===0?(r>0?"-":"+")+In(Math.abs(r)/60,2):tc(r,d)}function tc(r,d=""){const s=r>0?"-":"+",_=Math.abs(r),z=In(Math.trunc(_/60),2),te=In(_%60,2);return s+z+d+te}const em=(r,d)=>{switch(r){case"P":return d.date({width:"short"});case"PP":return d.date({width:"medium"});case"PPP":return d.date({width:"long"});case"PPPP":default:return d.date({width:"full"})}},fp=(r,d)=>{switch(r){case"p":return d.time({width:"short"});case"pp":return d.time({width:"medium"});case"ppp":return d.time({width:"long"});case"pppp":default:return d.time({width:"full"})}},n0=(r,d)=>{const s=r.match(/(P+)(p+)?/)||[],_=s[1],z=s[2];if(!z)return em(r,d);let te;switch(_){case"P":te=d.dateTime({width:"short"});break;case"PP":te=d.dateTime({width:"medium"});break;case"PPP":te=d.dateTime({width:"long"});break;case"PPPP":default:te=d.dateTime({width:"full"});break}return te.replace("{{date}}",em(_,d)).replace("{{time}}",fp(z,d))},a0={p:fp,P:n0},o0=/^D+$/,i0=/^Y+$/,l0=["D","DD","YY","YYYY"];function c0(r){return o0.test(r)}function d0(r){return i0.test(r)}function u0(r,d,s){const _=h0(r,d,s);if(console.warn(_),l0.includes(r))throw new RangeError(_)}function h0(r,d,s){const _=r[0]==="Y"?"years":"days of the month";return`Use \`${r.toLowerCase()}\` instead of \`${r}\` (in \`${d}\`) for formatting ${_} to the input \`${s}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const f0=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,m0=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,p0=/^'([^]*?)'?$/,g0=/''/g,v0=/[a-zA-Z]/;function uo(r,d,s){var f,v,m,y,C,S,g,j;const _=Ed(),z=(s==null?void 0:s.locale)??_.locale??cp,te=(s==null?void 0:s.firstWeekContainsDate)??((v=(f=s==null?void 0:s.locale)==null?void 0:f.options)==null?void 0:v.firstWeekContainsDate)??_.firstWeekContainsDate??((y=(m=_.locale)==null?void 0:m.options)==null?void 0:y.firstWeekContainsDate)??1,ue=(s==null?void 0:s.weekStartsOn)??((S=(C=s==null?void 0:s.locale)==null?void 0:C.options)==null?void 0:S.weekStartsOn)??_.weekStartsOn??((j=(g=_.locale)==null?void 0:g.options)==null?void 0:j.weekStartsOn)??0,w=xn(r);if(!wx(w))throw new RangeError("Invalid time value");let O=d.match(m0).map(A=>{const I=A[0];if(I==="p"||I==="P"){const M=a0[I];return M(A,z.formatLong)}return A}).join("").match(f0).map(A=>{if(A==="''")return{isToken:!1,value:"'"};const I=A[0];if(I==="'")return{isToken:!1,value:x0(A)};if(Jf[I])return{isToken:!0,value:A};
379if(I.match(v0))throw new RangeError("Format string contains an unescaped latin alphabet character `"+I+"`");return{isToken:!1,value:A}});z.localize.preprocessor&&(O=z.localize.preprocessor(w,O));const t={firstWeekContainsDate:te,weekStartsOn:ue,locale:z};return O.map(A=>{if(!A.isToken)return A.value;const I=A.value;(!(s!=null&&s.useAdditionalWeekYearTokens)&&d0(I)||!(s!=null&&s.useAdditionalDayOfYearTokens)&&c0(I))&&u0(I,d,String(r));const M=Jf[I[0]];return M(w,I,z.localize,t)}).join("")}function x0(r){const d=r.match(p0);return d?d[1].replace(g0,"'"):r}function y0(r){const d=xn(r),s=d.getFullYear(),_=d.getMonth(),z=ri(r,0);return z.setFullYear(s,_+1,0),z.setHours(0,0,0,0),z.getDate()}function j0(r){return Math.trunc(+xn(r)/1e3)}function b0(r){const d=xn(r),s=d.getMonth();return d.setFullYear(d.getFullYear(),s+1,0),d.setHours(0,0,0,0),d}function w0(r,d){return Nx(b0(r),Uo(r),d)+1}function Ph(r,d){const s=xn(r),_=xn(d);return s.getTime()>_.getTime()}function mp(r,d){const s=xn(r),_=xn(d);return+s<+_}function Dh(r,d){const s=xn(r),_=xn(d);return s.getFullYear()===_.getFullYear()&&s.getMonth()===_.getMonth()}function N0(r,d){const s=xn(r),_=xn(d);return s.getFullYear()===_.getFullYear()}function oh(r,d){return yo(r,-d)}function ih(r,d){const s=xn(r),_=s.getFullYear(),z=s.getDate(),te=ri(r,0);te.setFullYear(_,d,15),te.setHours(0,0,0,0);const ue=y0(te);return s.setMonth(d,Math.min(z,ue)),s}function tm(r,d){const s=xn(r);return isNaN(+s)?ri(r,NaN):(s.setFullYear(d),s)}var Os=function(){return Os=Object.assign||function(d){for(var s,_=1,z=arguments.length;_<z;_++){s=arguments[_];for(var te in s)Object.prototype.hasOwnProperty.call(s,te)&&(d[te]=s[te])}return d},Os.apply(this,arguments)};function S0(r,d){var s={};for(var _ in r)Object.prototype.hasOwnProperty.call(r,_)&&d.indexOf(_)<0&&(s[_]=r[_]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var z=0,_=Object.getOwnPropertySymbols(r);z<_.length;z++)d.indexOf(_[z])<0&&Object.prototype.propertyIsEnumerable.call(r,_[z])&&(s[_[z]]=r[_[z]]);return s}function pp(r,d,s){for(var _=0,z=d.length,te;_<z;_++)(te||!(_ in d))&&(te||(te=Array.prototype.slice.call(d,0,_)),te[_]=d[_]);return r.concat(te||Array.prototype.slice.call(d))}function kd(r){return r.mode==="multiple"}function _d(r){return r.mode==="range"}function Au(r){return r.mode==="single"}var C0={root:"rdp",multiple_months:"rdp-multiple_months",with_weeknumber:"rdp-with_weeknumber",vhidden:"rdp-vhidden",button_reset:"rdp-button_reset",button:"rdp-button",caption:"rdp-caption",caption_start:"rdp-caption_start",caption_end:"rdp-caption_end",caption_between:"rdp-caption_between",caption_label:"rdp-caption_label",caption_dropdowns:"rdp-caption_dropdowns",dropdown:"rdp-dropdown",dropdown_month:"rdp-dropdown_month",dropdown_year:"rdp-dropdown_year",dropdown_icon:"rdp-dropdown_icon",months:"rdp-months",month:"rdp-month",table:"rdp-table",tbody:"rdp-tbody",tfoot:"rdp-tfoot",head:"rdp-head",head_row:"rdp-head_row",head_cell:"rdp-head_cell",nav:"rdp-nav",nav_button:"rdp-nav_button",nav_button_previous:"rdp-nav_button_previous",nav_button_next:"rdp-nav_button_next",nav_icon:"rdp-nav_icon",row:"rdp-row",weeknumber:"rdp-weeknumber",cell:"rdp-cell",day:"rdp-day",day_today:"rdp-day_today",day_outside:"rdp-day_outside",day_selected:"rdp-day_selected",day_disabled:"rdp-day_disabled",day_hidden:"rdp-day_hidden",day_range_start:"rdp-day_range_start",day_range_end:"rdp-day_range_end",day_range_middle:"rdp-day_range_middle"};function A0(r,d){return uo(r,"LLLL y",d)}function E0(r,d){return uo(r,"d",d)}function k0(r,d){return uo(r,"LLLL",d)}function _0(r){return"".concat(r)}function P0(r,d){return uo(r,"cccccc",d)}function T0(r,d){return uo(r,"yyyy",d)}var L0=Object.freeze({__proto__:null,formatCaption:A0,formatDay:E0,formatMonthCaption:k0,formatWeekNumber:_0,formatWeekdayName:P0,formatYearCaption:T0}),O0=function(r,d,s){return uo(r,"do MMMM (EEEE)",s)},I0=function(){return"Month: "},R0=function(){return"Go to next month"},M0=function(){return"Go to previous month"},F0=function(r,d){return uo(r,"cccc",d)},D0=function(r){return"Week n. ".concat(r)},B0=function(){return"Year: "},U0=Object.freeze({__proto__:null,labelDay:O0,labelMonthDropdown:I0,labelNext:R0,labelPrevious:M0,labelWeekNumber:D0,labelWeekday:F0,labelYearDropdown:B0});function z0(){var r="buttons",d=C0,s=cp,_={},z={},te=1,ue={},w=new Date;return{captionLayout:r,classNames:d,formatters:L0,labels:U0,locale:s,modifiersClassNames:_,modifiers:z,numberOfMonths:te,styles:ue,today:w,mode:"default"}}function $0(r){var d=r.fromYear,s=r.toYear,_=r.fromMonth,z=r.toMonth,te=r.fromDate,ue=r.toDate;return _?te=Uo(_):d&&(te=new Date(d,0,1)),z?ue=Mh(z):s&&(ue=new Date(s,11,31)),{fromDate:te?Lc(te):void 0,toDate:ue?Lc(ue):void 0}}var gp=ne.createContext(void 0);function V0(r){var d,s=r.initialProps,_=z0(),z=$0(s),te=z.fromDate,ue=z.toDate,w=(d=s.captionLayout)!==null&&d!==void 0?d:_.captionLayout;w!=="buttons"&&(!te||!ue)&&(w="buttons");var O;(Au(s)||kd(s)||_d(s))&&(O=s.onSelect);var t=Os(Os(Os({},_),s),{captionLayout:w,classNames:Os(Os({},_.classNames),s.classNames),components:Os({},s.components),formatters:Os(Os({},_.formatters),s.formatters),fromDate:te,labels:Os(Os({},_.labels),s.labels),mode:s.mode||_.mode,modifiers:Os(Os({},_.modifiers),s.modifiers),modifiersClassNames:Os(Os({},_.modifiersClassNames),s.modifiersClassNames),onSelect:O,styles:Os(Os({},_.styles),s.styles),toDate:ue});return e.jsx(gp.Provider,{value:t,children:r.children})}function qn(){var r=ne.useContext(gp);if(!r)throw new Error("useDayPicker must be used within a DayPickerProvider.");return r}function vp(r){var d=qn(),s=d.locale,_=d.classNames,z=d.styles,te=d.formatters.formatCaption;return e.jsx("div",{className:_.caption_label,style:z.caption_label,"aria-live":"polite",role:"presentation",id:r.id,children:te(r.displayMonth,{locale:s})})}function W0(r){return e.jsx("svg",Os({width:"8px",height:"8px",viewBox:"0 0 120 120","data-testid":"iconDropdown"},r,{children:e.jsx("path",{d:"M4.22182541,48.2218254 C8.44222828,44.0014225 15.2388494,43.9273804 19.5496459,47.9996989 L19.7781746,48.2218254 L60,88.443 L100.221825,48.2218254 C104.442228,44.0014225 111.238849,43.9273804 115.549646,47.9996989 L115.7
37978175,48.2218254 C119.998577,52.4422283 120.07262,59.2388494 116.000301,63.5496459 L115.778175,63.7781746 L67.7781746,111.778175 C63.5577717,115.998577 56.7611506,116.07262 52.4503541,112.000301 L52.2218254,111.778175 L4.22182541,63.7781746 C-0.0739418023,59.4824074 -0.0739418023,52.5175926 4.22182541,48.2218254 Z",fill:"currentColor",fillRule:"nonzero"})}))}function xp(r){var d,s,_=r.onChange,z=r.value,te=r.children,ue=r.caption,w=r.className,O=r.style,t=qn(),f=(s=(d=t.components)===null||d===void 0?void 0:d.IconDropdown)!==null&&s!==void 0?s:W0;return e.jsxs("div",{className:w,style:O,children:[e.jsx("span",{className:t.classNames.vhidden,children:r["aria-label"]}),e.jsx("select",{name:r.name,"aria-label":r["aria-label"],className:t.classNames.dropdown,style:t.styles.dropdown,value:z,onChange:_,children:te}),e.jsxs("div",{className:t.classNames.caption_label,style:t.styles.caption_label,"aria-hidden":"true",children:[ue,e.jsx(f,{className:t.classNames.dropdown_icon,style:t.styles.dropdown_icon})]})]})}function H0(r){var d,s=qn(),_=s.fromDate,z=s.toDate,te=s.styles,ue=s.locale,w=s.formatters.formatMonthCaption,O=s.classNames,t=s.components,f=s.labels.labelMonthDropdown;if(!_)return e.jsx(e.Fragment,{});if(!z)return e.jsx(e.Fragment,{});var v=[];if(N0(_,z))for(var m=Uo(_),y=_.getMonth();y<=z.getMonth();y++)v.push(ih(m,y));else for(var m=Uo(new Date),y=0;y<=11;y++)v.push(ih(m,y));var C=function(g){var j=Number(g.target.value),A=ih(Uo(r.displayMonth),j);r.onChange(A)},S=(d=t==null?void 0:t.Dropdown)!==null&&d!==void 0?d:xp;return e.jsx(S,{name:"months","aria-label":f(),className:O.dropdown_month,style:te.dropdown_month,onChange:C,value:r.displayMonth.getMonth(),caption:w(r.displayMonth,{locale:ue}),children:v.map(function(g){return e.jsx("option",{value:g.getMonth(),children:w(g,{locale:ue})},g.getMonth())})})}function G0(r){var d,s=r.displayMonth,_=qn(),z=_.fromDate,te=_.toDate,ue=_.locale,w=_.styles,O=_.classNames,t=_.components,f=_.formatters.formatYearCaption,v=_.labels.labelYearDropdown,m=[];if(!z)return e.jsx(e.Fragment,{});if(!te)return e.jsx(e.Fragment,{});for(var y=z.getFullYear(),C=te.getFullYear(),S=y;S<=C;S++)m.push(tm(ip(new Date),S));var g=function(A){var I=tm(Uo(s),Number(A.target.value));r.onChange(I)},j=(d=t==null?void 0:t.Dropdown)!==null&&d!==void 0?d:xp;return e.jsx(j,{name:"years","aria-label":v(),className:O.dropdown_year,style:w.dropdown_year,onChange:g,value:s.getFullYear(),caption:f(s,{locale:ue}),children:m.map(function(A){return e.jsx("option",{value:A.getFullYear(),children:f(A,{locale:ue})},A.getFullYear())})})}function Y0(r,d){var s=ne.useState(r),_=s[0],z=s[1],te=d===void 0?_:d;return[te,z]}function K0(r){var d=r.month,s=r.defaultMonth,_=r.today,z=d||s||_||new Date,te=r.toDate,ue=r.fromDate,w=r.numberOfMonths,O=w===void 0?1:w;if(te&&Ad(te,z)<0){var t=-1*(O-1);z=Si(te,t)}return ue&&Ad(z,ue)<0&&(z=ue),Uo(z)}function X0(){var r=qn(),d=K0(r),s=Y0(d,r.month),_=s[0],z=s[1],te=function(ue){var w;if(!r.disableNavigation){var O=Uo(ue);z(O),(w=r.onMonthChange)===null||w===void 0||w.call(r,O)}};return[_,te]}function Z0(r,d){for(var s=d.reverseMonths,_=d.numberOfMonths,z=Uo(r),te=Uo(Si(z,_)),ue=Ad(te,z),w=[],O=0;O<ue;O++){var t=Si(z,O);w.push(t)}return s&&(w=w.reverse()),w}function J0(r,d){if(!d.disableNavigation){var s=d.toDate,_=d.pagedNavigation,z=d.numberOfMonths,te=z===void 0?1:z,ue=_?te:1,w=Uo(r);if(!s)return Si(w,ue);var O=Ad(s,r);if(!(O<te))return Si(w,ue)}}function Q0(r,d){if(!d.disableNavigation){var s=d.fromDate,_=d.pagedNavigation,z=d.numberOfMonths,te=z===void 0?1:z,ue=_?te:1,w=Uo(r);if(!s)return Si(w,-ue);var O=Ad(w,s);if(!(O<=0))return Si(w,-ue)}}var yp=ne.createContext(void 0);function q0(r){var d=qn(),s=X0(),_=s[0],z=s[1],te=Z0(_,d),ue=J0(_,d),w=Q0(_,d),O=function(v){return te.some(function(m){return Dh(v,m)})},t=function(v,m){O(v)||(m&&mp(v,m)?z(Si(v,1+d.numberOfMonths*-1)):z(v))},f={currentMonth:_,displayMonths:te,goToMonth:z,goToDate:t,previousMonth:w,nextMonth:ue,isDateDisplayed:O};return e.jsx(yp.Provider,{value:f,children:r.children})}function Pd(){var r=ne.useContext(yp);if(!r)throw new Error("useNavigation must be used within a NavigationProvider");return r}function rm(r){var d,s=qn(),_=s.classNames,z=s.styles,te=s.components,ue=Pd().goToMonth,w=function(f){ue(Si(f,r.dis
379playIndex?-r.displayIndex:0))},O=(d=te==null?void 0:te.CaptionLabel)!==null&&d!==void 0?d:vp,t=e.jsx(O,{id:r.id,displayMonth:r.displayMonth});return e.jsxs("div",{className:_.caption_dropdowns,style:z.caption_dropdowns,children:[e.jsx("div",{className:_.vhidden,children:t}),e.jsx(H0,{onChange:w,displayMonth:r.displayMonth}),e.jsx(G0,{onChange:w,displayMonth:r.displayMonth})]})}function e1(r){return e.jsx("svg",Os({width:"16px",height:"16px",viewBox:"0 0 120 120"},r,{children:e.jsx("path",{d:"M69.490332,3.34314575 C72.6145263,0.218951416 77.6798462,0.218951416 80.8040405,3.34314575 C83.8617626,6.40086786 83.9268205,11.3179931 80.9992143,14.4548388 L80.8040405,14.6568542 L35.461,60 L80.8040405,105.343146 C83.8617626,108.400868 83.9268205,113.317993 80.9992143,116.454839 L80.8040405,116.656854 C77.7463184,119.714576 72.8291931,119.779634 69.6923475,116.852028 L69.490332,116.656854 L18.490332,65.6568542 C15.4326099,62.5991321 15.367552,57.6820069 18.2951583,54.5451612 L18.490332,54.3431458 L69.490332,3.34314575 Z",fill:"currentColor",fillRule:"nonzero"})}))}function t1(r){return e.jsx("svg",Os({width:"16px",height:"16px",viewBox:"0 0 120 120"},r,{children:e.jsx("path",{d:"M49.8040405,3.34314575 C46.6798462,0.218951416 41.6145263,0.218951416 38.490332,3.34314575 C35.4326099,6.40086786 35.367552,11.3179931 38.2951583,14.4548388 L38.490332,14.6568542 L83.8333725,60 L38.490332,105.343146 C35.4326099,108.400868 35.367552,113.317993 38.2951583,116.454839 L38.490332,116.656854 C41.5480541,119.714576 46.4651794,119.779634 49.602025,116.852028 L49.8040405,116.656854 L100.804041,65.6568542 C103.861763,62.5991321 103.926821,57.6820069 100.999214,54.5451612 L100.804041,54.3431458 L49.8040405,3.34314575 Z",fill:"currentColor"})}))}var pu=ne.forwardRef(function(r,d){var s=qn(),_=s.classNames,z=s.styles,te=[_.button_reset,_.button];r.className&&te.push(r.className);var ue=te.join(" "),w=Os(Os({},z.button_reset),z.button);return r.style&&Object.assign(w,r.style),e.jsx("button",Os({},r,{ref:d,type:"button",className:ue,style:w}))});function r1(r){var d,s,_=qn(),z=_.dir,te=_.locale,ue=_.classNames,w=_.styles,O=_.labels,t=O.labelPrevious,f=O.labelNext,v=_.components;if(!r.nextMonth&&!r.previousMonth)return e.jsx(e.Fragment,{});var m=t(r.previousMonth,{locale:te}),y=[ue.nav_button,ue.nav_button_previous].join(" "),C=f(r.nextMonth,{locale:te}),S=[ue.nav_button,ue.nav_button_next].join(" "),g=(d=v==null?void 0:v.IconRight)!==null&&d!==void 0?d:t1,j=(s=v==null?void 0:v.IconLeft)!==null&&s!==void 0?s:e1;return e.jsxs("div",{className:ue.nav,style:w.nav,children:[!r.hidePrevious&&e.jsx(pu,{name:"previous-month","aria-label":m,className:y,style:w.nav_button_previous,disabled:!r.previousMonth,onClick:r.onPreviousClick,children:z==="rtl"?e.jsx(g,{className:ue.nav_icon,style:w.nav_icon}):e.jsx(j,{className:ue.nav_icon,style:w.nav_icon})}),!r.hideNext&&e.jsx(pu,{name:"next-month","aria-label":C,className:S,style:w.nav_button_next,disabled:!r.nextMonth,onClick:r.onNextClick,children:z==="rtl"?e.jsx(j,{className:ue.nav_icon,style:w.nav_icon}):e.jsx(g,{className:ue.nav_icon,style:w.nav_icon})})]})}function sm(r){var d=qn().numberOfMonths,s=Pd(),_=s.previousMonth,z=s.nextMonth,te=s.goToMonth,ue=s.displayMonths,w=ue.findIndex(function(C){return Dh(r.displayMonth,C)}),O=w===0,t=w===ue.length-1,f=d>1&&(O||!t),v=d>1&&(t||!O),m=function(){_&&te(_)},y=function(){z&&te(z)};return e.jsx(r1,{displayMonth:r.displayMonth,hideNext:f,hidePrevious:v,nextMonth:z,previousMonth:_,onPreviousClick:m,onNextClick:y})}function s1(r){var d,s=qn(),_=s.classNames,z=s.disableNavigation,te=s.styles,ue=s.captionLayout,w=s.components,O=(d=w==null?void 0:w.CaptionLabel)!==null&&d!==void 0?d:vp,t;return z?t=e.jsx(O,{id:r.id,displayMonth:r.displayMonth}):ue==="dropdown"?t=e.jsx(rm,{displayMonth:r.displayMonth,id:r.id}):ue==="dropdown-buttons"?t=e.jsxs(e.Fragment,{children:[e.jsx(rm,{displayMonth:r.displayMonth,displayIndex:r.displayIndex,id:r.id}),e.jsx(sm,{displayMonth:r.displayMonth,displayIndex:r.displayIndex,id:r.id})]}):t=e.jsxs(e.Fragment,{children:[e.jsx(O,{id:r.id,displayMonth:r.displayMonth,displayIndex:r.displayIndex}),e.jsx(sm,{displayMonth:r.displayMonth,id:r.id})]}),e.jsx("div",{className:_.caption,style:te.caption,children:t})}function n1(r){var d=qn(),s=d.footer,_=d.styles,z=d.classNames.tfoot;return s?e.jsx("tfoot",{className:z,style:_.tfoot,children:e.jsx("tr",{children:e.jsx("td",{colSpan:8,children:s})})}):e.jsx(e.Fragment,{})}function a1(r,d,s){for(var _=s?ic(new Date):Vi(new Date,{locale:r,weekStartsOn:d}),z=[],te=0;te<7;te++){var ue=yo(_,te);z.push(ue)}return z}function o1(){var r=qn(),d=r.classNames,s=r.styles,_=r.showWeekNumber,z=r.locale,te=r.weekStartsOn,ue=r.ISOWeek,w=r.formatters.formatWeekdayName,O=r.labels.labelWeekday,t=a1(z,te,ue);return e.jsxs("tr",{style:s.head_row,className:d.head_row,children:[_&&e.jsx("td",{style:s.head_cell,className:d.head_cell}),t.map(function(f,v){return e.jsx("th",{scope:"col",className:d.head_cell,style:s.head_cell,"aria-label":O(f,{locale:z}),children:w(f,{locale:z})},v)})]})}function i1(){var r,d=qn(),s=d.classNames,_=d.styles,z=d.components,te=(r=z==null?void 0:z.HeadRow)!==null&&r!==void 0?r:o1;return e.jsx("thead",{style:_.head,className:s.head,children:e.jsx(te,{})})}function l1(r){var d=qn(),s=d.locale,_=d.formatters.formatDay;return e.jsx(e.Fragment,{children:_(r.date,{locale:s})})}var Bh=ne.createContext(void 0);function c1(r){if(!kd(r.initialProps)){var d={selected:void 0,modifiers:{disabled:[]}};return e.jsx(Bh.Provider,{value:d,children:r.children})}return e.jsx(d1,{initialProps:r.initialProps,children:r.children})}function d1(r){var d=r.initialProps,s=r.children,_=d.selected,z=d.min,te=d.max,ue=function(t,f,v){var m,y;
379(m=d.onDayClick)===null||m===void 0||m.call(d,t,f,v);var C=!!(f.selected&&z&&(_==null?void 0:_.length)===z);if(!C){var S=!!(!f.selected&&te&&(_==null?void 0:_.length)===te);if(!S){var g=_?pp([],_):[];if(f.selected){var j=g.findIndex(function(A){return Do(t,A)});g.splice(j,1)}else g.push(t);(y=d.onSelect)===null||y===void 0||y.call(d,g,t,f,v)}}},w={disabled:[]};_&&w.disabled.push(function(t){var f=te&&_.length>te-1,v=_.some(function(m){return Do(m,t)});return!!(f&&!v)});var O={selected:_,onDayClick:ue,modifiers:w};return e.jsx(Bh.Provider,{value:O,children:s})}function Uh(){var r=ne.useContext(Bh);if(!r)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return r}function u1(r,d){var s=d||{},_=s.from,z=s.to;return _&&z?Do(z,r)&&Do(_,r)?void 0:Do(z,r)?{from:z,to:void 0}:Do(_,r)?void 0:Ph(_,r)?{from:r,to:z}:{from:_,to:r}:z?Ph(r,z)?{from:z,to:r}:{from:r,to:z}:_?mp(r,_)?{from:r,to:_}:{from:_,to:r}:{from:r,to:void 0}}var zh=ne.createContext(void 0);function h1(r){if(!_d(r.initialProps)){var d={selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}};return e.jsx(zh.Provider,{value:d,children:r.children})}return e.jsx(f1,{initialProps:r.initialProps,children:r.children})}function f1(r){var d=r.initialProps,s=r.children,_=d.selected,z=_||{},te=z.from,ue=z.to,w=d.min,O=d.max,t=function(y,C,S){var g,j;(g=d.onDayClick)===null||g===void 0||g.call(d,y,C,S);var A=u1(y,_);(j=d.onSelect)===null||j===void 0||j.call(d,A,y,C,S)},f={range_start:[],range_end:[],range_middle:[],disabled:[]};if(te?(f.range_start=[te],ue?(f.range_end=[ue],Do(te,ue)||(f.range_middle=[{after:te,before:ue}])):f.range_end=[te]):ue&&(f.range_start=[ue],f.range_end=[ue]),w&&(te&&!ue&&f.disabled.push({after:oh(te,w-1),before:yo(te,w-1)}),te&&ue&&f.disabled.push({after:te,before:yo(te,w-1)}),!te&&ue&&f.disabled.push({after:oh(ue,w-1),before:yo(ue,w-1)})),O){if(te&&!ue&&(f.disabled.push({before:yo(te,-O+1)}),f.disabled.push({after:yo(te,O-1)})),te&&ue){var v=zi(ue,te)+1,m=O-v;f.disabled.push({before:oh(te,m)}),f.disabled.push({after:yo(ue,m)})}!te&&ue&&(f.disabled.push({before:yo(ue,-O+1)}),f.disabled.push({after:yo(ue,O-1)}))}return e.jsx(zh.Provider,{value:{selected:_,onDayClick:t,modifiers:f},children:s})}function $h(){var r=ne.useContext(zh);if(!r)throw new Error("useSelectRange must be used within a SelectRangeProvider");return r}function au(r){return Array.isArray(r)?pp([],r):r!==void 0?[r]:[]}function m1(r){var d={};return Object.entries(r).forEach(function(s){var _=s[0],z=s[1];d[_]=au(z)}),d}var Ci;(function(r){r.Outside="outside",r.Disabled="disabled",r.Selected="selected",r.Hidden="hidden",r.Today="today",r.RangeStart="range_start",r.RangeEnd="range_end",r.RangeMiddle="range_middle"})(Ci||(Ci={}));var p1=Ci.Selected,rl=Ci.Disabled,g1=Ci.Hidden,v1=Ci.Today,lh=Ci.RangeEnd,ch=Ci.RangeMiddle,dh=Ci.RangeStart,x1=Ci.Outside;function y1(r,d,s){var _,z=(_={},_[p1]=au(r.selected),_[rl]=au(r.disabled),_[g1]=au(r.hidden),_[v1]=[r.today],_[lh]=[],_[ch]=[],_[dh]=[],_[x1]=[],_);return r.fromDate&&z[rl].push({before:r.fromDate}),r.toDate&&z[rl].push({after:r.toDate}),kd(r)?z[rl]=z[rl].concat(d.modifiers[rl]):_d(r)&&(z[rl]=z[rl].concat(s.modifiers[rl]),z[dh]=s.modifiers[dh],z[ch]=s.modifiers[ch],z[lh]=s.modifiers[lh]),z}var jp=ne.createContext(void 0);function j1(r){var d=qn(),s=Uh(),_=$h(),z=y1(d,s,_),te=m1(d.modifiers),ue=Os(Os({},z),te);return e.jsx(jp.Provider,{value:ue,children:r.children})}function bp(){var r=ne.useContext(jp);if(!r)throw new Error("useModifiers must be used within a ModifiersProvider");return r}function b1(r){return!!(r&&typeof r=="object"&&"before"in r&&"after"in r)}function w1(r){return!!(r&&typeof r=="object"&&"from"in r)}function N1(r){return!!(r&&typeof r=="object"&&"after"in r)}function S1(r){return!!(r&&typeof r=="object"&&"before"in r)}function C1(r){return!!(r&&typeof r=="object"&&"dayOfWeek"in r)}function A1(r,d){var s,_=d.from,z=d.to;if(_&&z){var te=zi(z,_)<0;te&&(s=[z,_],_=s[0],z=s[1]);var ue=zi(r,_)>=0&&zi(z,r)>=0;return ue}return z?Do(z,r):_?Do(_,r):!1}function E1(r){return Rh(r)}function k1(r){return Array.isArray(r)&&r.every(Rh)}function _1(r,d){return d.some(function(s){if(typeof s=="boolean")return s;if(E1(s))return Do(r,s);if(k1(s))return s.includes(r);if(w1(s))return A1(r,s);if(C1(s))return s.dayOfWeek.includes(r.getDay());if(b1(s)){var _=zi(s.before,r),z=zi(s.after,r),te=_>
3790,ue=z<0,w=Ph(s.before,s.after);return w?ue&&te:te||ue}return N1(s)?zi(r,s.after)>0:S1(s)?zi(s.before,r)>0:typeof s=="function"?s(r):!1})}function Vh(r,d,s){var _=Object.keys(d).reduce(function(te,ue){var w=d[ue];return _1(r,w)&&te.push(ue),te},[]),z={};return _.forEach(function(te){return z[te]=!0}),s&&!Dh(r,s)&&(z.outside=!0),z}function P1(r,d){for(var s=Uo(r[0]),_=Mh(r[r.length-1]),z,te,ue=s;ue<=_;){var w=Vh(ue,d),O=!w.disabled&&!w.hidden;if(!O){ue=yo(ue,1);continue}if(w.selected)return ue;w.today&&!te&&(te=ue),z||(z=ue),ue=yo(ue,1)}return te||z}var T1=365;function wp(r,d){var s=d.moveBy,_=d.direction,z=d.context,te=d.modifiers,ue=d.retry,w=ue===void 0?{count:0,lastFocused:r}:ue,O=z.weekStartsOn,t=z.fromDate,f=z.toDate,v=z.locale,m={day:yo,week:_h,month:Si,year:yx,startOfWeek:function(g){return z.ISOWeek?ic(g):Vi(g,{locale:v,weekStartsOn:O})},endOfWeek:function(g){return z.ISOWeek?lp(g):Fh(g,{locale:v,weekStartsOn:O})}},y=m[s](r,_==="after"?1:-1);_==="before"&&t?y=jx([t,y]):_==="after"&&f&&(y=bx([f,y]));var C=!0;if(te){var S=Vh(y,te);C=!S.disabled&&!S.hidden}return C?y:w.count>T1?w.lastFocused:wp(y,{moveBy:s,direction:_,context:z,modifiers:te,retry:Os(Os({},w),{count:w.count+1})})}var Np=ne.createContext(void 0);function L1(r){var d=Pd(),s=bp(),_=ne.useState(),z=_[0],te=_[1],ue=ne.useState(),w=ue[0],O=ue[1],t=P1(d.displayMonths,s),f=z??(w&&d.isDateDisplayed(w))?w:t,v=function(){O(z),te(void 0)},m=function(g){te(g)},y=qn(),C=function(g,j){if(z){var A=wp(z,{moveBy:g,direction:j,context:y,modifiers:s});Do(z,A)||(d.goToDate(A,z),m(A))}},S={focusedDay:z,focusTarget:f,blur:v,focus:m,focusDayAfter:function(){return C("day","after")},focusDayBefore:function(){return C("day","before")},focusWeekAfter:function(){return C("week","after")},focusWeekBefore:function(){return C("week","before")},focusMonthBefore:function(){return C("month","before")},focusMonthAfter:function(){return C("month","after")},focusYearBefore:function(){return C("year","before")},focusYearAfter:function(){return C("year","after")},focusStartOfWeek:function(){return C("startOfWeek","before")},focusEndOfWeek:function(){return C("endOfWeek","after")}};return e.jsx(Np.Provider,{value:S,children:r.children})}function Wh(){var r=ne.useContext(Np);if(!r)throw new Error("useFocusContext must be used within a FocusProvider");return r}function O1(r,d){var s=bp(),_=Vh(r,s,d);return _}var Hh=ne.createContext(void 0);function I1(r){if(!Au(r.initialProps)){var d={selected:void 0};return e.jsx(Hh.Provider,{value:d,children:r.children})}return e.jsx(R1,{initialProps:r.initialProps,children:r.children})}function R1(r){var d=r.initialProps,s=r.children,_=function(te,ue,w){var O,t,f;if((O=d.onDayClick)===null||O===void 0||O.call(d,te,ue,w),ue.selected&&!d.required){(t=d.onSelect)===null||t===void 0||t.call(d,void 0,te,ue,w);return}(f=d.onSelect)===null||f===void 0||f.call(d,te,te,ue,w)},z={selected:d.selected,onDayClick:_};return e.jsx(Hh.Provider,{value:z,children:s})}function Sp(){var r=ne.useContext(Hh);if(!r)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return r}function M1(r,d){var s=qn(),_=Sp(),z=Uh(),te=$h(),ue=Wh(),w=ue.focusDayAfter,O=ue.focusDayBefore,t=ue.focusWeekAfter,f=ue.focusWeekBefore,v=ue.blur,m=ue.focus,y=ue.focusMonthBefore,C=ue.focusMonthAfter,S=ue.focusYearBefore,g=ue.focusYearAfter,j=ue.focusStartOfWeek,A=ue.focusEndOfWeek,I=function(q){var U,ge,Ee,Xe;Au(s)?(U=_.onDayClick)===null||U===void 0||U.call(_,r,d,q):kd(s)?(ge=z.onDayClick)===null||ge===void 0||ge.call(z,r,d,q):_d(s)?(Ee=te.onDayClick)===null||Ee===void 0||Ee.call(te,r,d,q):(Xe=s.onDayClick)===null||Xe===void 0||Xe.call(s,r,d,q)},M=function(q){var U;m(r),(U=s.onDayFocus)===null||U===void 0||U.call(s,r,d,q)},B=function(q){var U;v(),(U=s.onDayBlur)===null||U===void 0||U.call(s,r,d,q)},W=function(q){var U;(U=s.onDayMouseEnter)===null||U===void 0||U.call(s,r,d,q)},Y=function(q){var U;(U=s.onDayMouseLeave)===null||U===void 0||U.call(s,r,d,q)},J=function(q){var U;(U=s.onDayPointerEnter)===null||U===void 0||U.call(s,r,d,q)},le=function(q){var U;(U=s.onDayPointerLeave)===null||U===void 0||U.call(s,r,d,q)},ae=function(q){var U;(U=s.onDayTouchCancel)===null||U===void 0||U.call(s,r,d,q)},Z=function(q){var U;(U=s.onDayTouchEnd)===null||U===void 0||U.call(s,r,d,q)},oe=function(q){var U;(U=s.onDayTouchMove)===null||U===void 0||U.call(s,r,d,q)},H=function(q){var U;(U=s.onDayTouchStart)===null||U===void 0||U.call(s,r,d,q)},fe=function(q){var U;(U=s.onDayKeyUp)===null||U===void 0||U.call(s,r,d,q)},se=function(q){var U;switch(q.key){case"ArrowLeft":q.preventDefault(),q.stopPropagation(),s.dir==="rtl"?w():O();break;case"ArrowRight":q.preventDefault(),q.stopPropagation(),s.dir==="rtl"?O():w();break;case"ArrowDown":q.preventDefault(),q.stopPropagation(),t();break;case"ArrowUp":q.preventDefault(),q.stopPropagation(),f();break;case"PageUp":q.preventDefault(),q.stopPropagation(),q.shiftKey?S():y();break;case"PageDown":q.preventDefault(),q.stopPropagation(),q.shiftKey?g():C();break;case"Home":q.preventDefault(),q.stopPropagation(),j();break;case"End":q.preventDefault(),q.stopPropagation(),A();break}(U=s.onDayKeyDown)===null||U===void 0||U.call(s,r,d,q)},de={onClick:I,onFocus:M,onBlur:B,onKeyDown:se,onKeyUp:fe,onMouseEnter:W,onMouseLeave:Y,onPointerEnter:J,onPointerLeave:le,onTouchCancel:ae,onTouchEnd:Z,onTouchMove:oe,onTouchStart:H};return de}function F1(){var r=qn(),d=Sp(),s=Uh(),_=$h(),z=Au(r)?d.selected:kd(r)?s.selected:_d(r)?_.selected:void 0;return z}function D1(r){return Object.values(Ci).includes(r)}function B1(r,d){var s=[r.classNames.day];
379return Object.keys(d).forEach(function(_){var z=r.modifiersClassNames[_];if(z)s.push(z);else if(D1(_)){var te=r.classNames["day_".concat(_)];te&&s.push(te)}}),s}function U1(r,d){var s=Os({},r.styles.day);return Object.keys(d).forEach(function(_){var z;s=Os(Os({},s),(z=r.modifiersStyles)===null||z===void 0?void 0:z[_])}),s}function z1(r,d,s){var _,z,te,ue=qn(),w=Wh(),O=O1(r,d),t=M1(r,O),f=F1(),v=!!(ue.onDayClick||ue.mode!=="default");ne.useEffect(function(){var W;O.outside||w.focusedDay&&v&&Do(w.focusedDay,r)&&((W=s.current)===null||W===void 0||W.focus())},[w.focusedDay,r,s,v,O.outside]);var m=B1(ue,O).join(" "),y=U1(ue,O),C=!!(O.outside&&!ue.showOutsideDays||O.hidden),S=(te=(z=ue.components)===null||z===void 0?void 0:z.DayContent)!==null&&te!==void 0?te:l1,g=e.jsx(S,{date:r,displayMonth:d,activeModifiers:O}),j={style:y,className:m,children:g,role:"gridcell"},A=w.focusTarget&&Do(w.focusTarget,r)&&!O.outside,I=w.focusedDay&&Do(w.focusedDay,r),M=Os(Os(Os({},j),(_={disabled:O.disabled,role:"gridcell"},_["aria-selected"]=O.selected,_.tabIndex=I||A?0:-1,_)),t),B={isButton:v,isHidden:C,activeModifiers:O,selectedDays:f,buttonProps:M,divProps:j};return B}function $1(r){var d=ne.useRef(null),s=z1(r.date,r.displayMonth,d);return s.isHidden?e.jsx("div",{role:"gridcell"}):s.isButton?e.jsx(pu,Os({name:"day",ref:d},s.buttonProps)):e.jsx("div",Os({},s.divProps))}function V1(r){var d=r.number,s=r.dates,_=qn(),z=_.onWeekNumberClick,te=_.styles,ue=_.classNames,w=_.locale,O=_.labels.labelWeekNumber,t=_.formatters.formatWeekNumber,f=t(Number(d),{locale:w});if(!z)return e.jsx("span",{className:ue.weeknumber,style:te.weeknumber,children:f});var v=O(Number(d),{locale:w}),m=function(y){z(d,s,y)};return e.jsx(pu,{name:"week-number","aria-label":v,className:ue.weeknumber,style:te.weeknumber,onClick:m,children:f})}function W1(r){var d,s,_=qn(),z=_.styles,te=_.classNames,ue=_.showWeekNumber,w=_.components,O=(d=w==null?void 0:w.Day)!==null&&d!==void 0?d:$1,t=(s=w==null?void 0:w.WeekNumber)!==null&&s!==void 0?s:V1,f;return ue&&(f=e.jsx("td",{className:te.cell,style:z.cell,children:e.jsx(t,{number:r.weekNumber,dates:r.dates})})),e.jsxs("tr",{className:te.row,style:z.row,children:[f,r.dates.map(function(v){return e.jsx("td",{className:te.cell,style:z.cell,role:"presentation",children:e.jsx(O,{displayMonth:r.displayMonth,date:v})},j0(v))})]})}function nm(r,d,s){for(var _=s!=null&&s.ISOWeek?lp(d):Fh(d,s),z=s!=null&&s.ISOWeek?ic(r):Vi(r,s),te=zi(_,z),ue=[],w=0;w<=te;w++)ue.push(yo(z,w));var O=ue.reduce(function(t,f){var v=s!=null&&s.ISOWeek?dp(f):hp(f,s),m=t.find(function(y){return y.weekNumber===v});return m?(m.dates.push(f),t):(t.push({weekNumber:v,dates:[f]}),t)},[]);return O}function H1(r,d){var s=nm(Uo(r),Mh(r),d);if(d!=null&&d.useFixedWeeks){var _=w0(r,d);if(_<6){var z=s[s.length-1],te=z.dates[z.dates.length-1],ue=_h(te,6-_),w=nm(_h(te,1),ue,d);s.push.apply(s,w)}}return s}function G1(r){var d,s,_,z=qn(),te=z.locale,ue=z.classNames,w=z.styles,O=z.hideHead,t=z.fixedWeeks,f=z.components,v=z.weekStartsOn,m=z.firstWeekContainsDate,y=z.ISOWeek,C=H1(r.displayMonth,{useFixedWeeks:!!t,ISOWeek:y,locale:te,weekStartsOn:v,firstWeekContainsDate:m}),S=(d=f==null?void 0:f.Head)!==null&&d!==void 0?d:i1,g=(s=f==null?void 0:f.Row)!==null&&s!==void 0?s:W1,j=(_=f==null?void 0:f.Footer)!==null&&_!==void 0?_:n1;return e.jsxs("table",{id:r.id,className:ue.table,style:w.table,role:"grid","aria-labelledby":r["aria-labelledby"],children:[!O&&e.jsx(S,{}),e.jsx("tbody",{className:ue.tbody,style:w.tbody,children:C.map(function(A){return e.jsx(g,{displayMonth:r.displayMonth,dates:A.dates,weekNumber:A.weekNumber},A.weekNumber)})}),e.jsx(j,{displayMonth:r.displayMonth})]})}function Y1(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var K1=Y1()?ne.useLayoutEffect:ne.useEffect,uh=!1,X1=0;function am(){return"react-day-picker-".concat(++X1)}function Z1(r){var d,s=r??(uh?am():null),_=ne.useState(s),z=_[0],te=_[1];return K1(function(){z===null&&te(am())},[]),ne.useEffect(function(){uh===!1&&(uh=!0)},[]),(d=r??z)!==null&&d!==void 0?d:void 0}function J1(r){var d,s,_=qn(),z=_.dir,te=_.classNames,ue=_.styles,w=_.components,O=Pd().displayMonths,t=Z1(_.id?"".concat(_.id,"-").concat(r.displayIndex):void 0),f=_.id?"".concat(_.id,"-grid-").concat(r.displayIndex):void 0,v=[te.month],m=ue.month,y=r.displayIndex===0,C=r.displayIndex===O.length-1,S=!y&&!C;z==="rtl"&&(d=[y,C],C=d[0],y=d[1]),y&&(v.push(te.caption_start),m=Os(Os({}
379,m),ue.caption_start)),C&&(v.push(te.caption_end),m=Os(Os({},m),ue.caption_end)),S&&(v.push(te.caption_between),m=Os(Os({},m),ue.caption_between));var g=(s=w==null?void 0:w.Caption)!==null&&s!==void 0?s:s1;return e.jsxs("div",{className:v.join(" "),style:m,children:[e.jsx(g,{id:t,displayMonth:r.displayMonth,displayIndex:r.displayIndex}),e.jsx(G1,{id:f,"aria-labelledby":t,displayMonth:r.displayMonth})]},r.displayIndex)}function Q1(r){var d=qn(),s=d.classNames,_=d.styles;return e.jsx("div",{className:s.months,style:_.months,children:r.children})}function q1(r){var d,s,_=r.initialProps,z=qn(),te=Wh(),ue=Pd(),w=ne.useState(!1),O=w[0],t=w[1];ne.useEffect(function(){z.initialFocus&&te.focusTarget&&(O||(te.focus(te.focusTarget),t(!0)))},[z.initialFocus,O,te.focus,te.focusTarget,te]);var f=[z.classNames.root,z.className];z.numberOfMonths>1&&f.push(z.classNames.multiple_months),z.showWeekNumber&&f.push(z.classNames.with_weeknumber);var v=Os(Os({},z.styles.root),z.style),m=Object.keys(_).filter(function(C){return C.startsWith("data-")}).reduce(function(C,S){var g;return Os(Os({},C),(g={},g[S]=_[S],g))},{}),y=(s=(d=_.components)===null||d===void 0?void 0:d.Months)!==null&&s!==void 0?s:Q1;return e.jsx("div",Os({className:f.join(" "),style:v,dir:z.dir,id:z.id,nonce:_.nonce,title:_.title,lang:_.lang},m,{children:e.jsx(y,{children:ue.displayMonths.map(function(C,S){return e.jsx(J1,{displayIndex:S,displayMonth:C},S)})})}))}function ey(r){var d=r.children,s=S0(r,["children"]);return e.jsx(V0,{initialProps:s,children:e.jsx(q0,{children:e.jsx(I1,{initialProps:s,children:e.jsx(c1,{initialProps:s,children:e.jsx(h1,{initialProps:s,children:e.jsx(j1,{children:e.jsx(L1,{children:d})})})})})})})}function ty(r){return e.jsx(ey,Os({},r,{children:e.jsx(q1,{initialProps:r})}))}function gu({className:r,classNames:d,showOutsideDays:s=!0,..._}){return e.jsx(ty,{showOutsideDays:s,className:Ui("p-3",r),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:Ui(Lf({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:"h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20",day:Ui(Lf({variant:"ghost"}),"h-9 w-9 p-0 font-normal aria-selected:opacity-100"),day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...d},components:{IconLeft:({...z})=>e.jsx(Lh,{className:"h-4 w-4"}),IconRight:({...z})=>e.jsx(ei,{className:"h-4 w-4"})},..._})}gu.displayName="Calendar";const om="https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net";function ry(){return{Authorization:`Bearer ${localStorage.getItem("authToken")||localStorage.getItem("access_token")}`,"Content-Type":"application/json"}}const sy={"from web":{label:"Pending",variant:"outline"},edited:{label:"Edited",variant:"secondary"},approved:{label:"Approved",variant:"default"}},im={company_name:"Company Name",description:"Description",category:"Category",capabilities:"Capabilities",functional_focus:"Functional Focus",keywords:"Keywords",languages:"Languages",avg_rating:"Average Rating",data_format:"Data Format",integration:"Integration",no_of_users:"No. of Users",sso_support:"SSO Support",headquarters:"Headquarters",request_demo:"Request Demo",support_cost:"Support Cost",year_founded:"Year Founded",contact_email:"Contact Email",is_free_trial:"Free Trial",contact_number:"Contact Number",gdpr_compliant:"GDPR Compliant",data_protection:"Data Protection",integrates_with:"Integrates With",licensing_model:"Licensing Model",countries_served:"Countries Served",deployment_model:"Deployment Model",hosting_location:"Hosting Location",implementation_cost:"Implementation Cost",database_integration:"Database Integration",security_certifications:"Security Certifications",additional_functionality:"Additional Functionality"},ny=()=>{const{toast:r}=Yn(),[d,s]=ne.useState([]),[_,z]=ne.useState(!1),[te,ue]=ne.useState(1),[w,O]=ne.useState(""),t=10,[f,v]=ne.useState(null),[m,y]=ne.useState(!1),[C,S]=ne.useState(!1),[g,j]=ne.useState(null),[A,I]=ne.useState({}),[M,B]=ne.useState(""),[W,Y]=ne.useState(""),[J,le]=ne.useState(!1),[ae,Z]=ne.useState(void 0),[oe,H]=ne.useState(void 0),[fe,se]=ne.useState(!1),de=async()=>{z(!0);try{const re=(te-1)*t,Pe=await fetch(`${om}/admin/web_search_product/web_products?limit=${t}&offset=${re}`,{headers:ry()});if(Pe.status===401){r({title:"Session expired",description:"Please log in again.",variant:"destructive"}),window.location.href="/login";return}if(!Pe.ok)throw new Error("Failed to fetch");const ye=await Pe.json();s(Array.isArray(ye)?ye:ye.data??ye.items??[])}catch(re){console.error("Fetch web products failed:",re),r({title:"Error",description:"Failed to load web search products.",variant:"destructive"})}z(!1)};ne.useEffect(()=>{de()},[te]);const q=re=>{v(re),y(!0)},U=w?d.filter(re=>{var Pe;return re.product_name.toLowerCase().includes(w.toLowerCase())||(((Pe=re.meta_data)==null?void 0:Pe.company_name)??"").toLowerCase().includes(w.toLowerCase())}):d,ge=re=>re==null?"—":Array.isArray(re)?re.join(", "):String(re),Ee=(re,Pe)=>{I(ye=>({...ye,[re]:Pe}))},Xe=async()=>
379{if(!ae||!oe){r({title:"Select date range",description:"Please select both start and end dates.",variant:"destructive"});return}se(!0);try{const re=localStorage.getItem("authToken")||localStorage.getItem("access_token"),Pe=uo(ae,"yyyy-MM-dd"),ye=uo(oe,"yyyy-MM-dd"),Se=await fetch(`${om}/admin/web_search_product/download?start_date=${Pe}&end_date=${ye}`,{headers:{Authorization:`Bearer ${re}`}});if(!Se.ok)throw new Error("Download failed");const Le=await Se.blob(),st=window.URL.createObjectURL(Le),Ke=document.createElement("a");Ke.href=st,Ke.download=`web_products_${Pe}_to_${ye}.csv`,document.body.appendChild(Ke),Ke.click(),Ke.remove(),window.URL.revokeObjectURL(st),r({title:"Download Complete",description:"Excel file downloaded successfully."})}catch{r({title:"Error",description:"Failed to download Excel file.",variant:"destructive"})}se(!1)};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs(ds,{children:[e.jsx(Rs,{children:e.jsx("div",{className:"flex items-center justify-between",children:e.jsxs("div",{children:[e.jsxs(Ds,{className:"flex items-center gap-2",children:[e.jsx(nl,{className:"w-5 h-5"}),"Web Search Product Review"]}),e.jsx(fa,{children:"Review, edit and approve products discovered via LLM web search"})]})})}),e.jsxs(us,{children:[e.jsxs("div",{className:"mb-4 flex flex-col gap-3",children:[e.jsxs("div",{className:"relative",children:[e.jsx(bo,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),e.jsx(pr,{placeholder:"Search by product or company name...",value:w,onChange:re=>O(re.target.value),className:"pl-10"})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsxs(Ro,{children:[e.jsx(Mo,{asChild:!0,children:e.jsxs(We,{variant:"outline",size:"sm",className:Ui("w-[150px] justify-start text-left font-normal",!ae&&"text-muted-foreground"),children:[e.jsx(ou,{className:"mr-2 h-4 w-4"}),ae?uo(ae,"dd MMM yyyy"):"Start date"]})}),e.jsx(Fo,{className:"w-auto p-0",align:"start",children:e.jsx(gu,{mode:"single",selected:ae,onSelect:Z,initialFocus:!0,className:Ui("p-3 pointer-events-auto")})})]}),e.jsx("span",{className:"text-sm text-muted-foreground",children:"to"}),e.jsxs(Ro,{children:[e.jsx(Mo,{asChild:!0,children:e.jsxs(We,{variant:"outline",size:"sm",className:Ui("w-[150px] justify-start text-left font-normal",!oe&&"text-muted-foreground"),children:[e.jsx(ou,{className:"mr-2 h-4 w-4"}),oe?uo(oe,"dd MMM yyyy"):"End date"]})}),e.jsx(Fo,{className:"w-auto p-0",align:"start",children:e.jsx(gu,{mode:"single",selected:oe,onSelect:H,initialFocus:!0,className:Ui("p-3 pointer-events-auto")})})]}),e.jsxs(We,{size:"sm",onClick:Xe,disabled:fe||!ae||!oe,className:"gap-2",children:[fe?e.jsx(Vs,{className:"w-4 h-4 animate-spin"}):e.jsx(jo,{className:"w-4 h-4"}),"Download Excel"]})]})]}),_?e.jsxs("div",{className:"flex items-center justify-center py-12",children:[e.jsx(Vs,{className:"w-6 h-6 animate-spin text-muted-foreground"}),e.jsx("span",{className:"ml-2 text-muted-foreground",children:"Loading products..."})]}):U.length===0?e.jsx("div",{className:"text-center py-12 text-muted-foreground",children:"No web search products found."}):e.jsxs(Rn,{children:[e.jsx(Mn,{children:e.jsxs(Gr,{children:[e.jsx(Lt,{children:"Product Name"}),e.jsx(Lt,{children:"Company"}),e.jsx(Lt,{children:"Category"}),e.jsx(Lt,{children:"Website"}),e.jsx(Lt,{className:"text-right",children:"Actions"})]})}),e.jsx(Fn,{children:U.map((re,Pe)=>{var ye,Se,Le;return sy[re.status]??re.status,e.jsxs(Gr,{children:[e.jsx(St,{className:"font-medium",children:re.product_name}),e.jsx(St,{children:((ye=re.meta_data)==null?void 0:ye.company_name)??"—"}),e.jsx(St,{children:e.jsx("div",{className:"flex flex-wrap gap-1",children:(Array.isArray((Se=re.meta_data)==null?void 0:Se.category)?re.meta_data.category.slice(0,2):[(Le=re.meta_data)==null?void 0:Le.category].filter(Boolean).slice(0,2)).map((st,Ke)=>e.jsx(tr,{variant:"secondary",className:"text-xs",children:st},Ke))})}),e.jsx(St,{children:re.company_website?e.jsxs("a",{href:re.company_website,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline inline-flex items-center gap-1 text-sm",children:[e.jsx(kc,{className:"w-3 h-3"}),"Visit"]}):"—"}),e.jsx(St,{className:"text-right",children:e.jsx("div",{className:"flex items-center justify-end gap-1",children:e.jsx(We,{variant:"ghost",size:"sm",onClick:()=>q(re),title:"View Details",children:e.jsx(Wi,{className:"w-4 h-4"})})})})]},`${re.product_name}-${Pe}`)})})]}),e.jsxs("div",{className:"flex items-center justify-between mt-4",children:[e.jsx(We,{variant:"outline",size:"sm",disabled:te<=1,onClick:()=>ue(re=>re-1),children:"Previous"}),e.jsxs("span",{className:"text-sm text-muted-foreground",children:["Page ",te]}),e.jsx(We,{variant:"outline",size:"sm",disabled:U.length<t,onClick:()=>ue(re=>re+1),children:"Next"})]})]})]}),e.jsx(Un,{open:m,onOpenChange:y,children:e.jsxs(zn,{className:"max-w-2xl max-h-[85vh]",children:[e.jsxs($n,{children:[e.jsxs(Vn,{className:"flex items-center gap-2",children:[e.jsx(nl,{className:"w-5 h-5"}),f==null?void 0:f.product_name]}),e.jsx(ha,{children:(f==null?void 0:f.company_website)&&e.jsxs("a",{href:f.company_website,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline inline-flex items-center gap-1",children:[f.company_website,e.jsx(kc,{className:"w-3 h-3"})]})})]}),e.jsx(Ec,{className:"max-h-[60vh] pr-4",children:(f==null?void 0:f.meta_data)&&e.jsx("div",{className:"space-y-3",children:Object.entries(f.meta_data).map(([re,Pe])=>Pe==null||typeof Pe=="string"&&Pe.trim()===""?null:e.jsxs("div",{className:"grid grid-cols-3 gap-2 py-2 border-b border-border/50",children:[e.jsx("span",{className:"text-sm font-medium text-muted-foreground col-span-1",children:im[re]??re.replace(/_/g," ").replace(/\b\w/g,ye=>ye.toUpperCase())}),e.jsx("span",{className:"text-sm col-span-2",children:Array.isArray(Pe)?e.jsx("div",{className:"flex flex-wrap gap-1",children:Pe.map((ye,Se)=>e.jsx(tr,{variant:"secondary",className:"text-xs",children:ye},Se))}):ge(Pe)})]},re))})}),e.jsx(ka,{className:"gap-2",children:(f==null?void 0:f.status)!=="approved"&&e.jsx(e.Fragment,{})})]})}),e.jsx(Un,{open:C,onOpenChange:S,children:e.jsxs(zn,{className:"max-w-2xl max-h-[85vh]",children:[e.jsxs($n,{children:[e.jsx(Vn,{children:"Edit Product"}),e.jsx(ha,{children:"Modify product details before approval"})]}),e.jsx(Ec,{className:"max-h-[60vh] pr-4",children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(pt,{children:"Product Name"}),e.jsx(pr,{value:M,onChange:re=>B(re.target.value)})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(pt,{children:"Company Website"}),e.jsx(pr,{value:W,onChange:re=>Y(re.target.value)})]}),e.jsxs("div",{className:"border-t border-border pt-4",children:[e.jsx("h4",{className:"font-medium mb-3",children:"Metadata Fields"}),e.jsx("div",{className:"space-y-3",children:Object.entries(A).map(([re,Pe])=>e.jsxs("div",{className:"space-y-1",children:[e.jsx(pt,{className:"text-xs text-muted-foreground",children:im[re]??re.replace(/_/g," ").replace(/\b\w/g,ye=>ye.toUpperCase())}),typeof Pe=="string"&&Pe.length>80?e.jsx(Ma,{value:ge(Pe),onChange:ye=>Ee(re,ye.target.value),rows:3}):e.jsx(pr,{value:ge(Pe),onChange:ye=>Ee(re,ye.target.value)})]},re))})]})]})}),e.jsx(ka,{children:e.jsx(We,{variant:"outline",onClick:()=>S(!1),children:"Cancel"})})]})})]})};function ay(){const[r,d]=ne.useState([]),[s,_]=ne.useState(!0);return ne.useEffect(()=>{(async()=>{try{const te=localStorage.getItem("access_token"),w=await fetch("https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net/admin/payment_history/history",{method:"GET",headers:{accept:"application/json",Authorization:`Bearer ${te}`},cache:"no-store"});if(!w.ok)throw new Error("Failed to fetch payment history");const t=(await w.json()).data.map((f,v)=>({id:`payment-${v+1}`,name:f.name??Ea(),email:f.email,role:f.role??"User",plan:f.plan??Ea(),amount:f.amount,paymentType:f.payment_type??Ea(),purchaseDate:f.date,topUp:{purchased:f.payment_type==="one_time",details:f.payment_type==="one_time"?"One-time purchase":void 0}}));d(t)}catch(te){console.error("Failed to fetch payment history:",te)}finally{_(!1)}})()},[]),e.jsxs(ds,{children:[e.jsxs(Rs,{children:[e.jsxs(Ds,{className:"flex items-center gap-2",children:[e.jsx(Ym,{className:"w-5 h-5 text-primary"}),"Purchases"]}),e.jsx(fa,{children:"All plan purchases and top-ups across vendors and users."})]}),e.jsx(us,{children:e.jsx("div",{className:"rounded-md border overflow-x-auto",children:e.jsxs(Rn,{children:[e.jsx(Mn,{children:e.jsxs(Gr,{children:[e.jsx(Lt,{children:"Vendor / User Name"}),e.jsx(Lt,{children:"Email ID"}),e.jsx(Lt,{children:"Plan Purchased"}),e.jsx(Lt,{children:"Purchase Date"}),e.jsx(Lt,{children:"Top-up Purchased"}),e.jsx(Lt,{children:"Amount"})]})}),e.jsx(Fn,{children:r.map(z=>e.jsxs(Gr,{children:[e.jsx(St,{children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-medium",children:z.name}),e.jsx(tr,{variant:"outline",className:"text-[10px]",children:z.role})]})}),e.jsx(St,{className:"text-sm text-muted-foreground",children:z.email}),e.jsx(St,{children:e.jsx(tr,{variant:"secondary",children:z.plan})}),e.jsx(St,{className:"text-sm whitespace-nowrap",children:new Date(z.purchaseDate).toLocaleDateString()}
379),e.jsx(St,{children:z.topUp.purchased?e.jsxs("div",{className:"flex flex-col",children:[e.jsx(tr,{className:"w-fit bg-primary/15 text-primary border-primary/30 hover:bg-primary/20",children:"Yes"}),e.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:z.topUp.details})]}):e.jsx(tr,{variant:"outline",className:"text-muted-foreground",children:"No"})}),e.jsx(St,{className:"text-sm text-muted-foreground",children:z.amount})]},z.id))})]})})})]})}const Cp=(r,d)=>new Intl.NumberFormat("en-US",{style:"currency",currency:d,maximumFractionDigits:0}).format(r),oy=r=>({id:r.id,name:r.name,type:"Autopay Subscription",price:Cp(r.price_amount,r.currency),priceSuffix:"/month",per:"auto-renews monthly",coins:String(r.tokens_per_month),coinsLabel:"GOLT Coins/mo",badgeLabel:"Subscription",badgeVariant:"sub",features:["Validity: monthly","Use on any feature","Instant wallet credit",`${r.tokens_per_month} coins every month`,"Interactive prompts","Comparison access"],cta:"Subscribe"}),iy=r=>{const d=r.tokens+r.bonus_tokens;return{id:r.id,name:r.name,type:"Wallet Recharge",price:Cp(r.price_amount,r.currency),per:"one time",coins:String(d),coinsLabel:"GOLT Coins",best:r.bonus_tokens>0,badgeLabel:r.bonus_tokens>0?"Best Value":void 0,badgeVariant:r.bonus_tokens>0?"primary":void 0,features:[`Validity: ${r.validity_days} days`,"Use on any feature","Instant wallet credit",`${r.tokens} base coins`,r.bonus_tokens>0?`${r.bonus_tokens} bonus coins`:"No bonus coins","Comparison access"],cta:"Buy Coins"}};async function hh(){const r="https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net",s={"Content-Type":"application/json",Authorization:`Bearer ${localStorage.getItem("access_token")}`},[_,z]=await Promise.all([fetch(`${r}/admin/token_product/subcription`,{method:"GET",headers:s}),fetch(`${r}/admin/token_product/token-products`,{method:"GET",headers:s})]);if(!_.ok||!z.ok)throw new Error("Failed to fetch pricing plans");const te=await _.json(),ue=await z.json();console.log(ue,"gvgc"),console.log(te,"gvgc");const w=(te.data||[]).filter(t=>t.is_active).map(oy),O=(ue||[]).filter(t=>t.is_active).map(iy);return console.log(O,"KKKKKKKKKk"),console.log(w,"ddddddddddd"),[...O,...w]}async function ly(r){const d="https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net",_={"Content-Type":"application/json",Authorization:`Bearer ${localStorage.getItem("access_token")}`},z=await fetch(`${d}/admin/token_product/token-products`,{method:"POST",headers:_,body:JSON.stringify(r)});if(!z.ok)throw new Error("Failed to create token product");return z.json()}async function cy(r){const d="https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net",_={"Content-Type":"application/json",Authorization:`Bearer ${localStorage.getItem("access_token")}`},z=await fetch(`${d}/admin/token_product/subscriptions`,{method:"POST",headers:_,body:JSON.stringify(r)});if(!z.ok)throw new Error("Failed to create subscription");return z.json()}async function dy(r,d){const s="https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net",z={"Content-Type":"application/json",Authorization:`Bearer ${localStorage.getItem("access_token")}`},te=await fetch(`${s}/admin/token_product/token-products/${r}`,{method:"PATCH",headers:z,body:JSON.stringify(d)});if(!te.ok)throw new Error("Failed to update token product");return te.json()}function uy(){const{toast:r}=Yn(),[d,s]=ne.useState([]),[_,z]=ne.useState(null),[te,ue]=ne.useState(!1),[w,O]=ne.useState(!0),[t,f]=ne.useState(""),[v,m]=ne.useState(!1),[y,C]=ne.useState(!1),S={name:"",type:"Wallet Recharge",price_amount:0,coins:0,bonus_tokens:0,validity_days:30},g=(Y,J)=>{z(le=>le&&{...le,[Y]:J})};if(ne.useEffect(()=>{(async()=>{try{O(!0);const J=await hh();s(J)}catch(J){console.error(J),f("Failed to load pricing plans")}finally{O(!1)}})()},[]),w)return e.jsx("div",{children:"Loading pricing plans..."});if(t)return e.jsx("div",{children:t});async function j(Y,J){const le="https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net",Z={"Content-Type":"application/json",Authorization:`Bearer ${localStorage.getItem("access_token")}`},oe=await fetch(`${le}/admin/token_product/subscriptions/${Y}`,{method:"PUT",headers:Z,body:JSON.stringify(J)}),H=await oe.json();if(!oe.ok)throw new Error((H==null?void 0:H.detail)||(H==null?void 0:H.message)||"Failed to update subscription plan");return H}const A=async()=>
379{if(_)try{let Y;if(_.type==="Wallet Recharge"){const le={name:_.name,price_amount:_.price_amount,tokens:_.coins,bonus_tokens:_.bonus_tokens,validity_days:_.validity_days};Y=te?await ly(le):await dy(_.id,le)}else{const le={name:_.name,price_amount:_.price_amount,tokens_per_month:_.coins};Y=te?await cy(le):await j(_.id,le)}r({title:"Success",description:Y.message});const J=await hh();s(J),m(!1),z(null)}catch(Y){console.error(Y)}},I=Y=>{z({id:Y.id,name:Y.name,type:Y.type,price_amount:Number(Y.price.replace(/[^0-9.]/g,"")),coins:Number(Y.coins),bonus_tokens:0,validity_days:30}),ue(!1),m(!0)},M=async Y=>{try{const J="https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net",le=localStorage.getItem("access_token"),ae=Y.type==="Wallet Recharge"?`${J}/admin/token_product/token-products/${Y.id}/deactivate`:`${J}/admin/token_product/subscriptions/${Y.id}/deactivate`,Z=await fetch(ae,{method:"PATCH",headers:{"Content-Type":"application/json",Authorization:`Bearer ${le}`}});if(!Z.ok){const H=await Z.json().catch(()=>null);throw new Error((H==null?void 0:H.detail)||"Failed to deactivate plan")}r({title:"successfull",description:`${Y.name} deactivated successfully`});const oe=await hh();s(oe)}catch{r({title:"failed",description:"Failed to deactivate plan"})}},B=()=>{z({...S}),ue(!0),m(!0)},W=async()=>{try{C(!0),await A()}finally{C(!1)}};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs(ds,{children:[e.jsxs(Rs,{className:"flex flex-row items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsxs(Ds,{className:"flex items-center gap-2",children:[e.jsx(Di,{className:"h-5 w-5 text-primary"})," Pricing Plans"]}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Manage GOLT Coins wallet recharge & subscription plans displayed on the Payment Plans page."})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs(We,{variant:"outline",className:"gap-2",children:[e.jsx(Ai,{className:"h-4 w-4"})," Reset"]}),e.jsxs(We,{onClick:B,className:"gap-2",children:[e.jsx(aa,{className:"h-4 w-4"})," Add Plan"]})]})]}),e.jsxs(us,{children:[e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:d.map(Y=>e.jsx(ds,{className:`relative ${Y.best?"border-primary border-2":""}`,children:e.jsxs(us,{className:"p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"text-xs uppercase tracking-wide text-muted-foreground flex items-center gap-1",children:[Y.type==="Autopay Subscription"?e.jsx(wh,{className:"h-3 w-3"}):e.jsx(Di,{className:"h-3 w-3"}),Y.type]}),Y.badgeLabel&&e.jsx(tr,{variant:Y.badgeVariant==="primary"?"default":"secondary",children:Y.badgeLabel})]}),e.jsx("div",{className:"font-semibold text-lg text-foreground",children:Y.name}),e.jsxs("div",{className:"flex items-baseline gap-1",children:[e.jsx("span",{className:"text-2xl font-bold text-primary",children:Y.price}),Y.priceSuffix&&e.jsx("span",{className:"text-sm text-muted-foreground",children:Y.priceSuffix})]}),e.jsx("div",{className:"text-xs text-muted-foreground",children:Y.per}),e.jsxs("div",{className:"text-sm",children:[e.jsx("strong",{className:"text-primary",children:Y.coins})," ",e.jsx("span",{className:"text-muted-foreground",children:Y.coinsLabel})]}),e.jsxs("ul",{className:"text-xs text-muted-foreground space-y-1 list-disc pl-4",children:[Y.features.slice(0,4).map((J,le)=>e.jsx("li",{children:J},le)),Y.features.length>4&&e.jsxs("li",{className:"list-none italic",children:["+",Y.features.length-4," more"]})]}),Y.lifetime&&e.jsx("div",{className:"text-xs bg-primary/10 border border-primary/30 rounded-md p-2 text-foreground/80",children:Y.lifetime}),e.jsxs("div",{className:"flex gap-2 pt-2",children:[e.jsxs(We,{size:"sm",variant:"outline",className:"flex-1 gap-1",onClick:()=>I(Y),children:[e.jsx(ju,{className:"h-3.5 w-3.5"})," Edit"]}),e.jsx(We,{size:"sm",variant:"destructive",className:"gap-1",onClick:()=>M(Y),children:e.jsx(ti,{className:"h-3.5 w-3.5"})})]})]})},Y.id))}),d.length===0&&e.jsx("div",{className:"text-center text-muted-foreground py-12",children:'No plans yet. Click "Add Plan" to create one.'})]})]}),e.jsx(Un,{open:v,onOpenChange:m,children:e.jsxs(zn,{className:"max-w-2xl max-h-[90vh] overflow-y-auto",children:[e.jsx($n,{children:e.jsx(Vn,{children:te?"Add Pricing Plan":"Edit Pricing Plan"})}),_&&e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 py-2",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(pt,{children:"Plan Name *"}),e.jsx(pr,{value:_.name,onChange:Y=>g("name",Y.target.value)})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(pt,{children:"Type"}),e.jsxs(wo,{value:_.type,disabled:!te,onValueChange:Y=>g("type",Y),children:[e.jsx(No,{children:e.jsx(So,{})}),e.jsxs(Co,{children:[e.jsx(Ys,{value:"Wallet Recharge",children:"Wallet Recharge"}),e.jsx(Ys,{value:"Autopay Subscription",children:"Autopay Subscription"})]})]})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(pt,{children:"Price *"}),e.jsx(pr,{value:_.price_amount,onChange:Y=>g("price_amount",Number(Y.target.value)),placeholder:"$10"})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(pt,{children:_.type==="Autopay Subscription"?"Tokens / Month":"Tokens"}),e.jsx(pr,{type:"number",value:_.coins,onChange:Y=>g("coins",Number(Y.target.value))})]}),_.type==="Wallet Recharge"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(pt,{children:"Bonus Tokens"}),e.jsx(pr,{type:"number",value:_.bonus_tokens,onChange:Y=>g("bonus_tokens",Number(Y.target.value))})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(pt,{children:"Validity (Days)"}),e.jsx(pr,{type:"number",value:_.validity_days,onChange:Y=>g("validity_days",Number(Y.target.value))})]})]})]}),e.jsxs(ka,{children:[e.jsx(We,{variant:"outline",onClick:()=>m(!1),children:"Cancel"}),e.jsx(We,{onClick:W,disabled:y,className:"gap-2",children:y?e.jsxs(e.Fragment,{children:[e.jsx(Vs,{className:"h-4 w-4 animate-spin"}),"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(iv,{className:"h-4 w-4"}),"Save Plan"]})})]})]})})]})}const Oc="https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net";function Ic(){return{Authorization:`Bearer ${localStorage.getItem("access_token")||localStorage.getItem("authToken")}`,"Content-Type":"application/json"}}function Ap({status:r}){const d={active:"bg-emerald-500/15 text-emerald-600 border-emerald-500/30",inactive:"bg-slate-500/15 text-slate-500 border-slate-500/30",exhausted:"bg-rose-500/15 text-rose-600 border-rose-500/30"};return e.jsx("span",{className:`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-semibold border ${d[r]??d.inactive}`,children:r.charAt(0).toUpperCase()+r.slice(1)})}function Ep({type:r,value:d}){const s={coins:e.jsx(Um,{className:"w-3 h-3 mr-1"}),percent_discount:e.jsx(av,{className:"w-3 h-3 mr-1"}),flat_discount:e.jsx(nc,{className:"w-3 h-3 mr-1"}),free_days:e.jsx(ou,{className:"w-3 h-3 mr-1"})},_={coins:`${d} Coins`,percent_discount:`${d}% Off`,flat_discount:`$${d} Off`,free_days:`${d} Free Days`};return e.jsxs("span",{className:"inline-flex items-center px-2 py-0.5 rounded-md text-xs font-medium bg-primary/10 text-primary border border-primary/20",children:[s[r]??e.jsx(Wm,{className:"w-3 h-3 mr-1"}),_[r]??`${d}`]})}function hy({onAdd:r}){return e.jsxs("div",{className:"flex flex-col items-center justify-center py-20 space-y-4 text-center",children:[e.jsx("div",{className:"w-20 h-20 rounded-full bg-primary/10 flex items-center justify-center",children:e.jsx(sc,{className:"w-10 h-10 text-primary/60"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-lg font-semibold",children:"No promo codes yet"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Create your first promo code and generate a QR for marketing campaigns."})]}),e.jsxs(We,{onClick:r,className:"gap-2 mt-2",children:[e.jsx(aa,{className:"w-4 h-4"})," Create Promo Code"]})]})}function fy({promo:r,onClose:d,onRegenerate:s}){const[_,z]=ne.useState(!1);if(!r)return null;const te=()=>{if(!r.qr_image_url)return;const w=document.createElement("a");
379w.href=r.qr_image_url,w.download=`${r.code}_qr.png`,w.target="_blank",w.click()},ue=async()=>{z(!0),await s(r.id),z(!1)};return e.jsx(Un,{open:!0,onOpenChange:d,children:e.jsxs(zn,{className:"max-w-md",children:[e.jsxs($n,{children:[e.jsxs(Vn,{className:"flex items-center gap-2",children:[e.jsx(sc,{className:"w-5 h-5 text-primary"}),"QR Code — ",r.code]}),e.jsx(ha,{children:r.campaign_name?`Campaign: ${r.campaign_name}`:"Scan to register and redeem this promo code"})]}),e.jsxs("div",{className:"flex flex-col items-center gap-4 py-4",children:[r.qr_image_url?e.jsx("div",{className:"p-4 rounded-2xl bg-white shadow-lg border border-border/60",children:e.jsx("img",{width:224,height:224,src:r.qr_image_url,alt:`QR Code for ${r.code}`,className:"w-56 h-56 object-contain",onError:w=>{w.target.src=""},loading:"lazy",decoding:"async"})}):e.jsxs("div",{className:"w-56 h-56 rounded-2xl bg-muted flex flex-col items-center justify-center gap-2 border-2 border-dashed border-border",children:[e.jsx(sc,{className:"w-12 h-12 text-muted-foreground/40"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"No QR image available"})]}),e.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 bg-muted rounded-xl",children:[e.jsx(nc,{className:"w-4 h-4 text-muted-foreground"}),e.jsx("span",{className:"font-mono font-bold tracking-wider text-lg",children:r.code})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3 w-full text-sm",children:[e.jsxs("div",{className:"bg-muted/60 rounded-lg p-3 text-center",children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Reward"}),e.jsx(Ep,{type:r.reward_type,value:r.reward_value})]}),e.jsxs("div",{className:"bg-muted/60 rounded-lg p-3 text-center",children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Status"}),e.jsx(Ap,{status:r.status})]}),e.jsxs("div",{className:"bg-muted/60 rounded-lg p-3 text-center",children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Redeemed"}),e.jsx("p",{className:"font-semibold text-base",children:r.redemption_count})]}),e.jsxs("div",{className:"bg-muted/60 rounded-lg p-3 text-center",children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Max"}),e.jsx("p",{className:"font-semibold text-base",children:r.max_total_redemptions??"∞"})]})]})]}),e.jsxs(ka,{className:"flex-col sm:flex-row gap-2",children:[e.jsxs(We,{variant:"outline",onClick:ue,disabled:_,className:"gap-2 flex-1",children:[e.jsx(Ai,{className:`w-4 h-4 ${_?"animate-spin":""}`}),_?"Regenerating…":"Regenerate QR"]}),e.jsxs(We,{onClick:te,disabled:!r.qr_image_url,className:"gap-2 flex-1",children:[e.jsx(jo,{className:"w-4 h-4"}),"Download PNG"]})]})]})})}const my={code:"",campaign_name:"",reward_type:"coins",reward_value:10,expires_at:"",status:"active",redeem_limit_per_user:1,max_total_redemptions:null};function lm({initial:r,mode:d,onClose:s,onSaved:_}){const{toast:z}=Yn(),[te,ue]=ne.useState({...my,...r}),[w,O]=ne.useState(!1),t=(v,m)=>ue(y=>({...y,[v]:m})),f=async v=>{if(v.preventDefault(),!te.reward_value||te.reward_value<=0){z({title:"Validation error",description:"Reward value must be > 0",variant:"destructive"});return}O(!0);try{const m={campaign_name:te.campaign_name||null,reward_type:te.reward_type,reward_value:te.reward_value,expires_at:te.expires_at||null,status:te.status,redeem_limit_per_user:te.redeem_limit_per_user,max_total_redemptions:te.max_total_redemptions};let y;if(d==="create"?(m.code=te.code||void 0,y=await fetch(`${Oc}/admin/promo_codes/`,{method:"POST",headers:Ic(),body:JSON.stringify(m)})):y=await fetch(`${Oc}/admin/promo_codes/${r.id}`,{method:"PUT",headers:Ic(),body:JSON.stringify(m)}),!y.ok){const C=await y.json().catch(()=>({}));throw new Error(C.detail||"Request failed")}z({title:d==="create"?"Promo code created!":"Promo code updated!",description:d==="create"?"QR code has been generated and uploaded to Azure.":"Changes saved successfully."}),_(),s()}catch(m){z({title:"Error",description:m.message,variant:"destructive"})}finally{O(!1)}};return e.jsx(Un,{open:!0,onOpenChange:s,children:e.jsxs(zn,{className:"max-w-lg",children:[e.jsxs($n,{children:[e.jsx(Vn,{className:"flex items-center gap-2",children:d==="create"?e.jsxs(e.Fragment,{children:[e.jsx(aa,{className:"w-5 h-5 text-primary"})," Create Promo Code"]}):e.jsxs(e.Fragment,{children:[e.jsx(Nh,{className:"w-5 h-5 text-primary"})," Edit Promo Code"]})}),e.jsx(ha,{children:d==="create"?"A QR code will be auto-generated and uploaded to Azure Blob Storage.":"Update the fields you want to change."})]}),e.jsxs("form",{onSubmit:f,className:"space-y-4 pt-2",children:[d==="create"&&e.jsxs("div",{className:"space-y-1",children:[e.jsxs(pt,{htmlFor:"pc-code",children:["Promo Code ",e.jsx("span",{className:"text-muted-foreground text-xs",children:"(leave blank to auto-generate)"})]}),e.jsx(pr,{id:"pc-code",placeholder:"e.g. CHOCO2026",value:te.code,onChange:v=>t("code",v.target.value.toUpperCase()),className:"font-mono uppercase tracking-wider"})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx(pt,{htmlFor:"pc-campaign",children:"Campaign Name"}),e.jsx(pr,{id:"pc-campaign",placeholder:"e.g. Winter Sale",value:te.campaign_name,onChange:v=>t("campaign_name",v.target.value)})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx(pt,{children:"Reward Type"}),e.jsxs(wo,{value:te.reward_type,onValueChange:v=>t("reward_type",v),children:[e.jsx(No,{id:"pc-reward-type",children:e.jsx(So,{})}),e.jsxs(Co,{children:[e.jsx(Ys,{value:"coins",children:"🪙 Coins"}),e.jsx(Ys,{value:"percent_discount",children:"% Percent Discount"}),e.jsx(Ys,{value:"flat_discount",children:"$ Flat Discount"}),e.jsx(Ys,{value:"free_days",children:"📅 Free Days"})]})]})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx(pt,{htmlFor:"pc-reward-value",children:"Reward Value"}),e.jsx(pr,{id:"pc-reward-value",type:"number",min:.01,step:"any",value:te.reward_value,onChange:v=>t("reward_value",parseFloat(v.target.value)||0)})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx(pt,{htmlFor:"pc-per-user",children:"Redemptions Per User"}),e.jsx(pr,{id:"pc-per-user",type:"number",min:1,value:te.redeem_limit_per_user,onCh
379ange:v=>t("redeem_limit_per_user",parseInt(v.target.value)||1)})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsxs(pt,{htmlFor:"pc-max-total",children:["Max Total Redemptions ",e.jsx("span",{className:"text-muted-foreground text-xs",children:"(blank = unlimited)"})]}),e.jsx(pr,{id:"pc-max-total",type:"number",min:1,placeholder:"Unlimited",value:te.max_total_redemptions??"",onChange:v=>t("max_total_redemptions",v.target.value?parseInt(v.target.value):null)})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx(pt,{children:"Status"}),e.jsxs(wo,{value:te.status,onValueChange:v=>t("status",v),children:[e.jsx(No,{id:"pc-status",children:e.jsx(So,{})}),e.jsxs(Co,{children:[e.jsx(Ys,{value:"active",children:"✅ Active"}),e.jsx(Ys,{value:"inactive",children:"⏸ Inactive"}),e.jsx(Ys,{value:"exhausted",children:"🚫 Exhausted"})]})]})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsxs(pt,{htmlFor:"pc-expires",children:["Expires At ",e.jsx("span",{className:"text-muted-foreground text-xs",children:"(optional)"})]}),e.jsx(pr,{id:"pc-expires",type:"datetime-local",value:te.expires_at,onChange:v=>t("expires_at",v.target.value)})]})]}),e.jsxs(ka,{className:"pt-2",children:[e.jsx(We,{type:"button",variant:"outline",onClick:s,disabled:w,children:"Cancel"}),e.jsx(We,{type:"submit",disabled:w,className:"gap-2 min-w-[120px]",children:w?e.jsxs(e.Fragment,{children:[e.jsx(Ai,{className:"w-4 h-4 animate-spin"})," Saving…"]}):d==="create"?e.jsxs(e.Fragment,{children:[e.jsx(aa,{className:"w-4 h-4"})," Create & Generate QR"]}):e.jsxs(e.Fragment,{children:[e.jsx(Nh,{className:"w-4 h-4"})," Save Changes"]})})]})]})]})})}function py({promo:r,onClose:d,onDeleted:s}){const{toast:_}=Yn(),[z,te]=ne.useState(!1);if(!r)return null;const ue=async()=>{te(!0);try{if(!(await fetch(`${Oc}/admin/promo_codes/${r.id}`,{method:"DELETE",headers:Ic()})).ok)throw new Error("Delete failed");_({title:"Deleted",description:`Promo code "${r.code}" was removed.`}),s(),d()}catch(w){_({title:"Error",description:w.message,variant:"destructive"})}finally{te(!1)}};return e.jsx(Un,{open:!0,onOpenChange:d,children:e.jsxs(zn,{className:"max-w-sm",children:[e.jsxs($n,{children:[e.jsxs(Vn,{className:"flex items-center gap-2 text-destructive",children:[e.jsx(ti,{className:"w-5 h-5"})," Delete Promo Code"]}),e.jsxs(ha,{children:["Are you sure you want to permanently delete"," ",e.jsx("span",{className:"font-mono font-semibold",children:r.code}),"? This action cannot be undone and will also remove all ",r.redemption_count," redemption records."]})]}),e.jsxs(ka,{className:"gap-2 flex-col sm:flex-row",children:[e.jsx(We,{variant:"outline",onClick:d,disabled:z,className:"flex-1",children:"Cancel"}),e.jsxs(We,{variant:"destructive",onClick:ue,disabled:z,className:"gap-2 flex-1",children:[z?e.jsx(Ai,{className:"w-4 h-4 animate-spin"}):e.jsx(ti,{className:"w-4 h-4"}),z?"Deleting…":"Delete"]})]})]})})}function gy({promo:r,onClose:d}){const[s,_]=ne.useState([]),[z,te]=ne.useState(!1);return ne.useEffect(()=>{r&&(te(!0),fetch(`${Oc}/admin/promo_codes/${r.id}/redemptions`,{headers:Ic()}).then(ue=>ue.json()).then(ue=>_(ue.data??[])).catch(()=>_([])).finally(()=>te(!1)))},[r]),r?e.jsx(Un,{open:!0,onOpenChange:d,children:e.jsxs(zn,{className:"max-w-2xl max-h-[80vh] overflow-y-auto",children:[e.jsxs($n,{children:[e.jsxs(Vn,{className:"flex items-center gap-2",children:[e.jsx($m,{className:"w-5 h-5 text-primary"}),"Redemptions — ",e.jsx("span",{className:"font-mono",children:r.code})]}),e.jsxs(ha,{children:[r.redemption_count," total redemption",r.redemption_count!==1?"s":""]})]}),z?e.jsx("div",{className:"flex items-center justify-center py-12",children:e.jsx(Ai,{className:"w-6 h-6 animate-spin text-muted-foreground"})}):s.length===0?e.jsx("div",{className:"py-12 text-center text-muted-foreground text-sm",children:"No redemptions yet for this code."}):e.jsx("div",{className:"rounded-md border overflow-x-auto",children:e.jsxs(Rn,{children:[e.jsx(Mn,{children:e.jsxs(Gr,{children:[e.jsx(Lt,{children:"User ID"}),e.jsx(Lt,{children:"Source IP"}),e.jsx(Lt,{children:"Redeemed At"})]})}),e.jsx(Fn,{children:s.map(ue=>e.jsxs(Gr,{children:[e.jsx(St,{className:"font-mono text-xs",children:ue.user_id}),e.jsx(St,{children:ue.source_ip??"—"}),e.jsx(St,{className:"whitespace-nowrap text-sm",children:new Date(ue.redeemed_at).toLocaleStr
379ing()})]},ue.id))})]})})]})}):null}function vy(){const{toast:r}=Yn(),[d,s]=ne.useState([]),[_,z]=ne.useState(!0),[te,ue]=ne.useState(""),[w,O]=ne.useState("all"),[t,f]=ne.useState(1),[v,m]=ne.useState(1),[y,C]=ne.useState(0),[S,g]=ne.useState(!1),[j,A]=ne.useState(null),[I,M]=ne.useState(null),[B,W]=ne.useState(null),[Y,J]=ne.useState(null),le=async(H=t)=>{z(!0);try{const fe=new URLSearchParams({page:String(H),page_size:"15"});te&&fe.set("search",te),w!=="all"&&fe.set("status",w);const se=await fetch(`${Oc}/admin/promo_codes/?${fe}`,{headers:Ic()});if(se.status===401){An(),window.location.href="/login";return}if(!se.ok)throw new Error("Failed to load promo codes");const de=await se.json();s(de.data??[]),m(de.total_pages??1),C(de.total??0)}catch(fe){r({title:"Error",description:fe.message,variant:"destructive"})}finally{z(!1)}};ne.useEffect(()=>{le(1),f(1)},[te,w]),ne.useEffect(()=>{le(t)},[t]);const ae=async H=>{try{const fe=await fetch(`${Oc}/admin/promo_codes/${H}/regenerate-qr`,{method:"POST",headers:Ic()});if(!fe.ok)throw new Error("Regeneration failed");const se=await fe.json();s(de=>de.map(q=>q.id===H?{...q,qr_image_url:se.qr_image_url}:q)),(B==null?void 0:B.id)===H&&W(de=>de&&{...de,qr_image_url:se.qr_image_url}),r({title:"QR regenerated",description:"New QR code uploaded to Azure."})}catch(fe){r({title:"Error",description:fe.message,variant:"destructive"})}},Z=d.filter(H=>H.status==="active").length,oe=d.reduce((H,fe)=>H+fe.redemption_count,0);return e.jsxs("div",{className:"space-y-6",children:[e.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-4",children:[{icon:e.jsx(nc,{className:"w-5 h-5"}),label:"Total Codes",value:y,color:"text-primary"},{icon:e.jsx(Wm,{className:"w-5 h-5"}),label:"Active Codes",value:Z,color:"text-emerald-500"},{icon:e.jsx($m,{className:"w-5 h-5"}),label:"Redemptions (page)",value:oe,color:"text-amber-500"},{icon:e.jsx(sc,{className:"w-5 h-5"}),label:"QR Codes",value:d.filter(H=>H.qr_image_url).length,color:"text-violet-500"}].map(({icon:H,label:fe,value:se,color:de})=>e.jsx(ds,{className:"border-border/60",children:e.jsxs(us,{className:"pt-5 pb-4 flex items-center gap-3",children:[e.jsx("div",{className:`p-2.5 rounded-xl bg-muted ${de}`,children:H}),e.jsxs("div",{children:[e.jsx("p",{className:"text-2xl font-bold",children:se}),e.jsx("p",{className:"text-xs text-muted-foreground",children:fe})]})]})},fe))}),e.jsxs(ds,{className:"border-border/60",children:[e.jsxs(Rs,{className:"pb-3",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3",children:[e.jsxs("div",{children:[e.jsxs(Ds,{className:"flex items-center gap-2 text-lg",children:[e.jsx(sc,{className:"w-5 h-5 text-primary"}),"Promo Codes"]}),e.jsx(fa,{children:"Create and manage promotional codes with auto-generated QR codes."})]}),e.jsxs(We,{onClick:()=>g(!0),className:"gap-2 shrink-0",id:"create-promo-btn",children:[e.jsx(aa,{className:"w-4 h-4"}),"New Promo Code"]})]}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-2 mt-3",children:[e.jsxs("div",{className:"relative flex-1",children:[e.jsx(bo,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),e.jsx(pr,{id:"promo-search",placeholder:"Search code or campaign…",className:"pl-9",value:te,onChange:H=>ue(H.target.value)}),te&&e.jsx("button",{onClick:()=>ue(""),className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:e.jsx(fn,{className:"w-3.5 h-3.5"})})]}),e.jsxs(wo,{value:w,onValueChange:O,children:[e.jsx(No,{className:"w-full sm:w-40",id:"promo-status-filter",children:e.jsx(So,{placeholder:"All statuses"})}),e.jsxs(Co,{children:[e.jsx(Ys,{value:"all",children:"All Statuses"}),e.jsx(Ys,{value:"active",children:"Active"}),e.jsx(Ys,{value:"inactive",children:"Inactive"}),e.jsx(Ys,{value:"exhausted",children:"Exhausted"})]})]})]})]}),e.jsx(us,{children:_?e.jsx("div",{className:"flex items-center justify-center py-16",children:e.jsxs("div",{className:"flex flex-col items-center gap-3",children:[e.jsx(Ai,{className:"w-8 h-8 animate-spin text-primary/60"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading promo codes…"})]})}):d.length===0?e.jsx(hy,{onAdd:()=>g(!0)}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"rounded-md border border-border/60 overflow-x-auto",children:e.jsxs(Rn,{children:[e.jsx(Mn,{children:e.jsxs(Gr,{className:"bg-muted/40",children:[e.jsx(Lt,{className:"font-semibold",children:"Code"}),e.jsx(Lt,{className:"font-semibold",children:"Campaign"}),e.jsx(Lt,{className:"font-semibold",children:"Reward"}),e.jsx(Lt,{className:"font-semibold",children:"Status"}),e.jsx(Lt,{className:"font-semibold text-center",children:e.jsxs("div",{className:"flex items-center justify-center gap-1",children:[e.jsx(vu,{className:"w-3.5 h-3.5"})," Redeemed"]})}),e.jsx(Lt,{className:"font-semibold",children:"Max"}),e.jsx(Lt,{className:"font-semibold",children:"Expires"}),e.jsx(Lt,{className:"font-semibold text-right",children:"Actions"})]})}),e.jsx(Fn,{children:d.map(H=>e.jsxs(Gr,{className:"hover:bg-muted/30 transition-colors",children:[e.jsx(St,{children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-mono font-bold tracking-wide text-sm",children:H.code}),H.qr_image_url&&e.jsx(sc,{className:"w-3.5 h-3.5 text-muted-foreground","aria-label":"QR available"})]})}),e.jsx(St,{className:"text-sm text-muted-foreground max-w-[160px] truncate",children:H.campaign_name??e.jsx("span",{className:"italic opacity-50",children:"—"})}),e.jsx(St,{children:e.jsx(Ep,{type:H.reward_type,value:H.reward_value})}),e.jsx(St,{children:e.jsx(Ap,{status:H.status})}),e.jsx(St,{className:"text-center",children:e.jsx("button",{onClick:()=>J(H),className:"inline-flex items-center gap-1 font-semibold text-primary hover:underline transition-colors",title:"View redemptions",children:H.redemption_count})}),e.jsx(St,{className:"text-sm text-muted-foreground",children:H.max_total_redemptions??e.jsx("span",{className:"opacity-50",children:"∞"})}),e.jsx(St,{className:"text-sm text-muted-foreground whitespace-nowrap",children:H.expires_at?new Date(H.expires_at).toLocaleDateString():e.jsx("span",{className:"opacity-50",children:"Never"})}),e.jsx(St,{className:"text-right",children:e.jsxs("div",{className:"flex items-center justify-end gap-1",children:[e.jsx(We,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 text-violet-500 hover:text-violet-600 hover:bg-violet-50 dark:hover:bg-violet-950/30",onClick:()=>W(H),title:"View QR Code",children:e.jsx(sc,{className:"w-4 h-4"})}),e.jsx(We,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 text-amber-500 hover:text-amber-600 hover:bg-amber-50 dark:hover:bg-amber-950/30",onClick:()=>J(H),title:"View Redemptions",children:e.jsx(Wi,{className:"w-4 h-4"})}),e.jsx(We,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 text-blue-500 hover:text-blue-600 hover:bg-blue-50 dark:hover:bg-blue-950/30",onClick:()=>A(H),title:"Edit",children:e.jsx(Nh,{className:"w-4 h-4"})}),e.jsx(We,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 text-rose-500 hover:text-rose-600 hover:bg-rose-50 dark:hover:bg-rose-950/30",onClick:()=>M(H),title:"Delete",children:e.jsx(ti,{className:"w-4 h-4"})})]})})]},H.id))})]})}),v>1&&e.jsxs("div",{className:"flex items-center justify-between mt-4",children:[e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Page ",t," of ",v," · ",y," total codes"]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(We,{variant:"outline",size:"sm",disabled:t<=1,onClick:()=>f(H=>H-1),children:"Previous"}),e.jsx(We,{variant:"outline",size:"sm",disabled:t>=v,onClick:()=>f(H=>H+1),children:"Next"})]})]})]})})]}),S&&e.jsx(lm,{mode:"create",onClose:()=>g(!1),onSaved:()=>le(1)}),j&&e.jsx(lm,{mode:"edit",initial:{id:j.id,code:j.code,campaign_name:j.campaign_name??"",reward_type:j.reward_type,reward_value:j.reward_value,expires_at:j.expires_at?new Date(j.expires_at).toISOString().slice(0,16):"",status:j.status,redeem_limit_per_user:j.redeem_limit_per_user,max_total_redemptions:j.max_total_redemptions},onClose:()=>A(null),onSaved:()=>le(t)}),I&&e.jsx(py,{promo:I,onClose:()=>M(null),onDeleted:()=>le(t)}),B&&e.jsx(fy,{promo:B,onClose:()=>W(null),onRegenerate:ae}),Y&&e.jsx(gy,{promo:Y,onClose:()=>J(null)})]})}const tu="https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net",Eu={list:`${tu}/admin/taxonomy/`,create:`${tu}/admin/taxonomy/add`,addCapability:`${tu}/admin/taxonomy/capability/add`,addFunctionalFocus:`${tu}/admin/taxonomy/functional-focus/add`},ku=()=>{An(),window.location.href="/login"},_u=()=>{const r=localStorage.getItem("authToken")||localStorage.getItem("access_token");return{"Content-Type":"application/json",...r?{Authorization:`Bearer ${r}`}:{}}},xy=async()=>{const r=await fetch(Eu.list,{method:"GET",headers:_u()});if(r.status===401)throw ku(),new Error("Unauthorized");if(!r.ok)throw new Error(`Failed to fetch taxonomy (${r.status})`);const d=await r.json();return Array.isArray(d)?d:Array.isArray(d==null?void 0:d.data)?d.data:[]},yy=async r=>{const d=await fetch(Eu.create,{method:"POST",headers:_u(),body:JSON.stringify(r)});if(d.status===401)throw ku(),new Error("Unauthorized");const s=await d.json().catch(()=>({}));if(!d.ok)throw new Error((s==null?void 0:s.detail)||(s==null?void 0:s.message)||"Failed to create taxonomy");return s},jy=async r=>{const d=await fetch(Eu.addCapability,{method:"POST",headers:_u(),body:JSON.stringify(r)});if(d.status===401)throw ku(),new Error("Unauthorized");const s=await d.json().catch(()=>({}));if(!d.ok)throw new Error((s==null?void 0:s.detail)||(s==null?void 0:s.message)||"Failed to add capability");return s},by=async r=>{const d=await fetch(Eu.addFunctionalFocus,{method:"POST",headers:_u(),body:JSON.stringify(r)});if(d.status===401)throw ku(),new Error("Unauthorized");const s=await d.json().catch(()=>({}));if(!d.ok)throw new Error((s==null?void 0:s.detail)||(s==null?void 0:s.message)||"Failed to add functional focus");return s},cm=()=>{const r=new Map;return $g.forEach((d,s)=>{let _=r.get(d.category);_||(_={id:`sample-cat-${r.size}`,name:d.category,capabilities:[]},r.set(d.category,_));let z=_.capabilities.find(te=>te.name===d.capability);z||(z={id:`sample-cap-${_.id}-${_.capabilities.length}`,name:d.capability,functional_focuses:[]},_.capabilities.push(z)),z.functional_focuses.find(te=>te.name===d.functionalFocus)||z.functional_focuses.push({id:`sample-ff-${s}`,name:d.functionalFocus,capabilities:[{id:`sample-ffc-${s}-1`,name:"Automation"},{id:`sample-ffc-${s}-2`,name:"Analytics"}],keywords:[{id:`sample-ffk-${s}-1`,name:"legal"},{id:`sample-ffk-${s}-2`,name:"tech"}]})}),Array.from(r.values())},kl=()=>({name:"",capInput:"",keyInput:"",capabilities:[],keywords:[]}),El=()=>({name:"",functional_focuses:[kl()]}),ru=r=>{r({title:"Session expired",description:"Please log in again.",variant:"destructive"}),An(),setTimeout(()=>{window.location.href="/login"},600)};function wy(){const{toast:r}=Yn(),[d,s]=ne.useState([]),[_,z]=ne.useState(!1),[te,ue]=ne.useState(""),[w,O]=ne.useState(!1),[t,f]=ne.useState(!1),[v,m]=ne.useState({}),[y,C]=ne.useState(""),[S,g]=ne.useState([El()]),[j,A]=ne.useState(!1),[I,M]=ne.useState(null),[B,W]=ne.useState(El()),[Y,J]=ne.useState(!1),[le,ae]=ne.useState(null),[Z,oe]=ne.useState(kl()),[H,fe]=ne.useState(!1),se=async()=>{z(!0);try{const et=await xy();s(et.length?et:cm())}catch(et){if((et==null?void 0:et.message)==="Unauthorized"){ru(r);return}console.error(et),r({title:"Showing sample taxonomy",description:"Could not reach API."}),s(cm())}finally{z(!1)}};ne.useEffect(()=>{se()},[]);const de=et=>m(ft=>({...ft,[et]:!ft[et]})),q=ne.useMemo(()=>
379{if(!te.trim())return d;const et=te.toLowerCase(),ft=je=>je.toLowerCase().includes(et);return d.map(je=>{const $e=je.capabilities.map(ht=>{const tt=ht.functional_focuses.filter(Ze=>ft(Ze.name)||Ze.capabilities.some(Ft=>ft(Ft.name))||Ze.keywords.some(Ft=>ft(Ft.name)));return ft(ht.name)||tt.length?{...ht,functional_focuses:ft(ht.name)?ht.functional_focuses:tt}:null}).filter(Boolean);return ft(je.name)||$e.length?{...je,capabilities:ft(je.name)?je.capabilities:$e}:null}).filter(Boolean)},[d,te]),U=()=>{C(""),g([El()]),A(!1)},ge=(et,ft)=>{g(je=>je.map(($e,ht)=>ht===et?{...$e,...ft}:$e))},Ee=(et,ft,je)=>{g($e=>$e.map((ht,tt)=>tt!==et?ht:{...ht,functional_focuses:ht.functional_focuses.map((Ze,Ft)=>Ft===ft?{...Ze,...je}:Ze)}))},Xe=()=>g(et=>[...et,El()]),re=et=>g(ft=>ft.length===1?ft:ft.filter((je,$e)=>$e!==et)),Pe=et=>g(ft=>ft.map((je,$e)=>$e===et?{...je,functional_focuses:[...je.functional_focuses,kl()]}:je)),ye=(et,ft)=>g(je=>je.map(($e,ht)=>ht!==et||$e.functional_focuses.length===1?$e:{...$e,functional_focuses:$e.functional_focuses.filter((tt,Ze)=>Ze!==ft)})),Se=(et,ft,je)=>{const $e=S[et].functional_focuses[ft],ht=(je==="capabilities"?$e.capInput:$e.keyInput).trim();if(!ht)return;const tt=$e[je];if(tt.includes(ht)){Ee(et,ft,je==="capabilities"?{capInput:""}:{keyInput:""});return}Ee(et,ft,{[je]:[...tt,ht],...je==="capabilities"?{capInput:""}:{keyInput:""}})},Le=(et,ft,je,$e)=>{const ht=S[et].functional_focuses[ft][je];Ee(et,ft,{[je]:ht.filter(tt=>tt!==$e)})},st=()=>({category:{name:y.trim(),capabilities:S.map(et=>({name:et.name.trim(),functional_focuses:et.functional_focuses.map(ft=>({name:ft.name.trim(),capabilities:ft.capabilities.map(je=>({name:je})),keywords:ft.keywords.map(je=>({name:je}))}))}))}}),Ke=()=>{if(!y.trim())return r({title:"Category is required",variant:"destructive"}),!1;for(const et of S){if(!et.name.trim())return r({title:"Each Capability needs a name",variant:"destructive"}),!1;for(const ft of et.functional_focuses){if(!ft.name.trim())return r({title:"Each Functional Focus needs a name",variant:"destructive"}),!1;if(ft.keywords.length===0)return r({title:"Each Functional Focus needs at least one keyword",variant:"destructive"}),!1}}return!0},rt=()=>{Ke()&&A(!0)},xt=async()=>{f(!0);try{const et=st(),ft=await yy(et);r({title:"Taxonomy created",description:ft.message||"Taxonomy created successfully."}),O(!1),U(),se()}catch(et){if((et==null?void 0:et.message)==="Unauthorized"){ru(r);return}r({title:"Error",description:et.message||"Could not create taxonomy",variant:"destructive"})}finally{f(!1)}},He=(et,ft)=>{W(je=>({...je,functional_focuses:je.functional_focuses.map(($e,ht)=>ht===et?{...$e,...ft}:$e)}))},Tt=()=>W(et=>({...et,functional_focuses:[...et.functional_focuses,kl()]})),Kt=et=>W(ft=>ft.functional_focuses.length===1?ft:{...ft,functional_focuses:ft.functional_focuses.filter((je,$e)=>$e!==et)}),Jt=(et,ft)=>{const je=B.functional_focuses[et],$e=(ft==="capabilities"?je.capInput:je.keyInput).trim();if($e){if(je[ft].includes($e)){He(et,ft==="capabilities"?{capInput:""}:{keyInput:""});return}He(et,{[ft]:[...je[ft],$e],...ft==="capabilities"?{capInput:""}:{keyInput:""}})}},rr=(et,ft,je)=>{const $e=B.functional_focuses[et][ft];He(et,{[ft]:$e.filter(ht=>ht!==je)})},Ht=async()=>{if(I){if(!B.name.trim()){r({title:"Capability name is required",variant:"destructive"});return}for(const et of B.functional_focuses){if(!et.name.trim()){r({title:"Each Functional Focus needs a name",variant:"destructive"});return}if(et.keywords.length===0){r({title:"Each Functional Focus needs at least one keyword",variant:"destructive"});return}}J(!0);try{const et=await jy({category_id:I.categoryId,name:B.name.trim(),functional_focuses:B.functional_focuses.map(ft=>({name:ft.name.trim(),capabilities:ft.capabilities.map(je=>({name:je})),keywords:ft.keywords.map(je=>({name:je}))}))});r({title:"Capability added",description:et.message||"Created successfully."}),M(null),W(El()),se()}catch(et){if((et==null?void 0:et.message)==="Unauthorized"){ru(r);return}r({title:"Error",description:et.message||"Could not add capability",variant:"destructive"})}finally{J(!1)}}},yr=et=>
379{const ft=(et==="capabilities"?Z.capInput:Z.keyInput).trim();if(ft){if(Z[et].includes(ft)){oe(je=>({...je,...et==="capabilities"?{capInput:""}:{keyInput:""}}));return}oe(je=>({...je,[et]:[...je[et],ft],...et==="capabilities"?{capInput:""}:{keyInput:""}}))}},gr=(et,ft)=>{oe(je=>({...je,[et]:je[et].filter($e=>$e!==ft)}))},Vr=async()=>{if(le){if(!Z.name.trim()){r({title:"Functional Focus name is required",variant:"destructive"});return}if(Z.keywords.length===0){r({title:"At least one keyword is required",variant:"destructive"});return}fe(!0);try{const et=await by({capability_id:le.capabilityId,name:Z.name.trim(),capabilities:Z.capabilities.map(ft=>({name:ft})),keywords:Z.keywords.map(ft=>({name:ft}))});r({title:"Functional Focus added",description:et.message||"Created successfully."}),ae(null),oe(kl()),se()}catch(et){if((et==null?void 0:et.message)==="Unauthorized"){ru(r);return}r({title:"Error",description:et.message||"Could not add functional focus",variant:"destructive"})}finally{fe(!1)}}},jr=et=>{const ft={};q.forEach(je=>{ft[`c-${je.id}`]=et,je.capabilities.forEach($e=>{ft[`p-${$e.id}`]=et,$e.functional_focuses.forEach(ht=>{ft[`f-${ht.id}`]=et})})}),m(ft)},Xr=ne.useMemo(()=>{let et=0,ft=0,je=0;return d.forEach($e=>$e.capabilities.forEach(ht=>{et++,ht.functional_focuses.forEach(tt=>{ft++,je+=tt.keywords.length})})),{categories:d.length,caps:et,ffs:ft,kws:je}},[d]);return e.jsxs(ds,{children:[e.jsxs(Rs,{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("div",{children:[e.jsxs(Ds,{className:"flex items-center gap-2",children:[e.jsx(bh,{className:"w-5 h-5"})," Taxonomy"]}),e.jsx(fa,{children:"Category → Capability → Functional Focus → key capabilities & keywords"})]}),e.jsxs(We,{onClick:()=>O(!0),className:"gap-2 w-full sm:w-auto",children:[e.jsx(aa,{className:"w-4 h-4"})," Add Taxonomy"]})]}),e.jsxs(us,{children:[e.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-2 mb-4",children:[{icon:sh,label:"Categories",value:Xr.categories,color:"text-primary"},{icon:rh,label:"Capabilities",value:Xr.caps,color:"text-blue-500"},{icon:eh,label:"Functional Focuses",value:Xr.ffs,color:"text-emerald-500"},{icon:Zd,label:"Keywords",value:Xr.kws,color:"text-amber-500"}].map(et=>e.jsxs("div",{className:"flex items-center gap-3 rounded-lg border bg-muted/20 px-3 py-2",children:[e.jsx(et.icon,{className:`w-4 h-4 ${et.color}`}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"text-xs text-muted-foreground truncate",children:et.label}),e.jsx("div",{className:"text-lg font-semibold leading-none",children:et.value})]})]},et.label))}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-2 mb-4",children:[e.jsxs("div",{className:"relative flex-1",children:[e.jsx(bo,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),e.jsx(pr,{placeholder:"Search categories, capabilities, focuses, keywords…",value:te,onChange:et=>ue(et.target.value),className:"pl-9"})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs(We,{variant:"outline",size:"sm",className:"gap-1.5",onClick:()=>jr(!0),children:[e.jsx(Vg,{className:"w-4 h-4"})," Expand all"]}),e.jsxs(We,{variant:"outline",size:"sm",className:"gap-1.5",onClick:()=>jr(!1),children:[e.jsx(tv,{className:"w-4 h-4"})," Collapse all"]})]})]}),_?e.jsx("div",{className:"flex items-center justify-center py-12",children:e.jsx(Vs,{className:"w-6 h-6 animate-spin text-muted-foreground"})}):q.length===0?e.jsx("div",{className:"text-center py-12 text-muted-foreground",children:"No taxonomy entries found."}):e.jsx("div",{className:"space-y-3",children:q.map(et=>{const ft=`c-${et.id}`,je=v[ft]??!0;return e.jsxs(Ju,{open:je,onOpenChange:()=>de(ft),className:"rounded-xl border bg-card overflow-hidden shadow-sm",children:[e.jsxs(Qu,{className:"group flex items-center gap-3 w-full px-4 py-3 hover:bg-muted/40 transition-colors text-left",children:[e.jsx(ei,{className:`w-4 h-4 shrink-0 text-muted-foreground transition-transform ${je?"rotate-90":""}`}),e.jsx("div",{className:"flex items-center justify-center w-8 h-8 rounded-lg bg-primary/10 text-primary shrink-0",children:e.jsx(sh,{className:"w-4 h-4"})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("div",{className:"font-semibold truncate",children:et.name}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:[et.capabilities.length," capabilit",et.capabilities.length===1?"y":"ies"]})]}),e.jsx(tr,{variant:"secondary",className:"shrink-0",children:et.capabilities.length}),e.jsxs("span",{role:"button",tabIndex:0,title:"Add capability to this category",onClick:$e=>{$e.preventDefault(),$e.stopPropagation(),W(El()),M({categoryId:et.id,categoryName:et.name})},onKeyDown:$e=>{($e.key==="Enter"||$e.key===" ")&&($e.preventDefault(),$e.stopPropagation(),W(El()),M({categoryId:et.id,categoryName:et.name}))},className:"ml-1 inline-flex items-center gap-1 rounded-md border border-primary/30 bg-primary/10 text-primary text-xs px-2 py-1 hover:bg-primary/20 shrink-0",children:[e.jsx(aa,{className:"w-3.5 h-3.5"})," Capability"]})]}),e.jsx(qu,{className:"border-t bg-muted/10",children:e.jsx("div",{className:"p-2 sm:p-3 space-y-2",children:et.capabilities.map($e=>{const ht=`p-${$e.id}`,tt=v[ht]??!1;return e.jsxs(Ju,{open:tt,onOpenChange:()=>de(ht),className:"rounded-lg border bg-background overflow-hidden",children:[e.jsxs(Qu,{className:"group flex items-center gap-3 w-full px-3 py-2.5 hover:bg-muted/40 transition-colors text-left",children:[e.jsx(ei,{className:`w-4 h-4 shrink-0 text-muted-foreground transition-transform ${tt?"rotate-90":""}`}),e.jsx("div",{className:"flex items-center justify-center w-7 h-7 rounded-md bg-blue-500/10 text-blue-500 shrink-0",children:e.jsx(rh,{className:"w-3.5 h-3.5"})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("div",{className:"font-medium text-sm truncate",children:$e.name}),e.jsxs("div",{className:"text-[11px] text-muted-foreground",children:[$e.functional_focuses.length," functional focus",$e.functional_focuses.length===1?"":"es"]})]}),e.jsx(tr,{variant:"outline",className:"shrink-0 text-xs",children:$e.functional_focuses.length}),e.jsxs("span",{role:"button",tabIndex:0,title:"Add functional focus to this capability",onClick:Ze=>{Ze.preventDefault(),Ze.stopPropagation(),oe(kl()),ae({capabilityId:$e.id,capabilityName:$e.name,categoryName:et.name})},onKeyDown:Ze=>
379{(Ze.key==="Enter"||Ze.key===" ")&&(Ze.preventDefault(),Ze.stopPropagation(),oe(kl()),ae({capabilityId:$e.id,capabilityName:$e.name,categoryName:et.name}))},className:"ml-1 inline-flex items-center gap-1 rounded-md border border-emerald-500/30 bg-emerald-500/10 text-emerald-600 dark:text-emerald-400 text-[11px] px-2 py-1 hover:bg-emerald-500/20 shrink-0",children:[e.jsx(aa,{className:"w-3 h-3"})," Focus"]})]}),e.jsx(qu,{className:"border-t",children:e.jsx("div",{className:"p-2 space-y-2",children:$e.functional_focuses.map(Ze=>{const Ft=`f-${Ze.id}`,lt=v[Ft]??!1;return e.jsxs(Ju,{open:lt,onOpenChange:()=>de(Ft),className:"rounded-md border bg-muted/20 overflow-hidden",children:[e.jsxs(Qu,{className:"group flex items-center gap-3 w-full px-3 py-2 hover:bg-muted/50 transition-colors text-left",children:[e.jsx(ei,{className:`w-3.5 h-3.5 shrink-0 text-muted-foreground transition-transform ${lt?"rotate-90":""}`}),e.jsx(eh,{className:"w-3.5 h-3.5 text-emerald-500 shrink-0"}),e.jsx("span",{className:"text-sm flex-1 truncate",children:Ze.name}),e.jsxs("div",{className:"flex items-center gap-1.5 text-[11px] text-muted-foreground shrink-0",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(nc,{className:"w-3 h-3"}),Ze.capabilities.length]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Zd,{className:"w-3 h-3"}),Ze.keywords.length]})]})]}),e.jsx(qu,{className:"border-t bg-background/60",children:e.jsxs("div",{className:"p-3 grid sm:grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1.5 text-[11px] uppercase tracking-wide text-muted-foreground mb-2",children:[e.jsx(nc,{className:"w-3 h-3"})," Key Capabilities (",Ze.capabilities.length,")"]}),e.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[Ze.capabilities.length===0&&e.jsx("span",{className:"text-xs text-muted-foreground italic",children:"No capabilities"}),Ze.capabilities.map(_t=>e.jsx(tr,{variant:"secondary",className:"font-normal",children:_t.name},_t.id))]})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1.5 text-[11px] uppercase tracking-wide text-muted-foreground mb-2",children:[e.jsx(Zd,{className:"w-3 h-3"})," Keywords (",Ze.keywords.length,")"]}),e.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[Ze.keywords.length===0&&e.jsx("span",{className:"text-xs text-muted-foreground italic",children:"No keywords"}
379),Ze.keywords.map(_t=>e.jsx(tr,{variant:"outline",className:"font-normal",children:_t.name},_t.id))]})]})]})})]},Ze.id)})})})]},$e.id)})})})]},et.id)})})]}),e.jsx(Un,{open:w,onOpenChange:et=>{O(et),et||U()},children:e.jsxs(zn,{className:"max-w-3xl max-h-[90vh] overflow-y-auto",children:[e.jsxs($n,{children:[e.jsx(Vn,{children:"Add Taxonomy"}),e.jsx(ha,{children:"One Category can have multiple Capabilities; each Capability can have multiple Functional Focuses."})]}),!j&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx(pt,{children:"Category *"}),e.jsx(pr,{value:y,onChange:et=>C(et.target.value),placeholder:"e.g. Compliance & Risk Management Tools"})]}),S.map((et,ft)=>e.jsxs("div",{className:"rounded-lg border p-3 sm:p-4 space-y-3 bg-muted/20",children:[e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsxs("div",{className:"flex-1",children:[e.jsxs(pt,{children:["Capability * ",e.jsxs("span",{className:"text-xs text-muted-foreground",children:["#",ft+1]})]}),e.jsx(pr,{value:et.name,onChange:je=>ge(ft,{name:je.target.value}),placeholder:"e.g. AI Governance"})]}),S.length>1&&e.jsx(We,{type:"button",variant:"ghost",size:"icon",className:"mt-6 text-destructive",onClick:()=>re(ft),title:"Remove capability",children:e.jsx(ti,{className:"w-4 h-4"})})]}),e.jsxs("div",{className:"space-y-3 pl-2 sm:pl-3 border-l-2 border-primary/30",children:[et.functional_focuses.map((je,$e)=>e.jsxs("div",{className:"rounded-md border bg-background p-3 space-y-3",children:[e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsxs("div",{className:"flex-1",children:[e.jsxs(pt,{children:["Functional Focus * ",e.jsxs("span",{className:"text-xs text-muted-foreground",children:["#",$e+1]})]}),e.jsx(pr,{value:je.name,onChange:ht=>Ee(ft,$e,{name:ht.target.value}),placeholder:"e.g. Policy & Ethical Oversight"})]}),et.functional_focuses.length>1&&e.jsx(We,{type:"button",variant:"ghost",size:"icon",className:"mt-6 text-destructive",onClick:()=>ye(ft,$e),title:"Remove functional focus",children:e.jsx(ti,{className:"w-4 h-4"})})]}),e.jsxs("div",{children:[e.jsx(pt,{children:"Key Capabilities"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(pr,{value:je.capInput,onChange:ht=>Ee(ft,$e,{capInput:ht.target.value}),placeholder:"Add a capability and press Enter",onKeyDown:ht=>{ht.key==="Enter"&&(ht.preventDefault(),Se(ft,$e,"capabilities"))}}),e.jsx(We,{type:"button",variant:"secondary",onClick:()=>Se(ft,$e,"capabilities"),children:"Add"})]}),e.jsx("div",{className:"flex flex-wrap gap-1.5 mt-2",children:je.capabilities.map(ht=>e.jsxs(tr,{variant:"secondary",className:"gap-1",children:[ht,e.jsx("button",{onClick:()=>Le(ft,$e,"capabilities",ht),className:"hover:text-destructive",children:e.jsx(fn,{className:"w-3 h-3"})})]},ht))})]}),e.jsxs("div",{children:[e.jsx(pt,{children:"Keywords *"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(pr,{value:je.keyInput,onChange:ht=>Ee(ft,$e,{keyInput:ht.target.value}),placeholder:"Add a keyword and press Enter",onKeyDown:ht=>{ht.key==="Enter"&&(ht.preventDefault(),Se(ft,$e,"keywords"))}}),e.jsx(We,{type:"button",variant:"secondary",onClick:()=>Se(ft,$e,"keywords"),children:"Add"})]}),e.jsx("div",{className:"flex flex-wrap gap-1.5 mt-2",children:je.keywords.map(ht=>e.jsxs(tr,{variant:"outline",className:"gap-1",children:[ht,e.jsx("button",{onClick:()=>Le(ft,$e,"keywords",ht),className:"hover:text-destructive",children:e.jsx(fn,{className:"w-3 h-3"})})]},ht))})]})]},$e)),e.jsxs(We,{type:"button",variant:"outline",size:"sm",className:"gap-2",onClick:()=>Pe(ft),children:[e.jsx(aa,{className:"w-3.5 h-3.5"})," Add Functional Focus"]})]})]},ft)),e.jsxs(We,{type:"button",variant:"outline",className:"gap-2 w-full",onClick:Xe,children:[e.jsx(aa,{className:"w-4 h-4"})," Add Capability"]})]}),j&&e.jsx("div",{className:"space-y-4",children:e.jsxs("div",{className:"rounded-xl border bg-card overflow-hidden shadow-sm",children:[e.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 bg-primary/10",children:[e.jsx(sh,{className:"w-5 h-5 text-primary"}),e.jsx("div",{className:"font-semibold",children:y.trim()})]}),e.jsx("div",{className:"p-3 space-y-2",children:S.map((et,ft)=>e.jsxs("div",{className:"rounded-lg border bg-muted/20 overflow-hidden",children:[e.jsxs("div",{className:"flex items-center gap-3 px-3 py-2.5 bg-blue-500/10",children:[e.jsx(rh,{className:"w-4 h-4 text-blue-500"}),e.jsx("div",{className:"font-medium text-sm",children:et.name.trim()})]}),e.jsx("div",{className:"p-2 space-y-2",children:et.functional_focuses.map((je,$e)=>e.jsxs("div",{className:"rounded-md border bg-background/60 overflow-hidden",children:[e.jsxs("div",{className:"flex items-center gap-3 px-3 py-2 bg-emerald-500/10",children:[e.jsx(eh,{className:"w-3.5 h-3.5 text-emerald-500"}),e.jsx("span",{className:"text-sm font-medium",children:je.name.trim()})]}),e.jsxs("div",{className:"p-3 grid sm:grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1.5 text-[11px] uppercase tracking-wide text-muted-foreground mb-2",children:[e.jsx(nc,{className:"w-3 h-3"})," key Capabilities (",je.capabilities.length,")"]}),e.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[je.capabilities.length===0&&e.jsx("span",{className:"text-xs text-muted-foreground italic",children:"No key capabilities"}),je.capabilities.map((ht,tt)=>e.jsx(tr,{variant:"secondary",className:"font-normal",children:ht},tt))]})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1.5 text-[11px] uppercase tracking-wide text-muted-foreground mb-2",children:[e.jsx(Zd,{className:"w-3 h-3"})," Keywords (",je.keywords.length,")"]}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:je.keywords.map((ht,tt)=>e.jsx(tr,{variant:"outline",className:"font-normal",children:ht},tt))})]})]})]},$e))})]},ft))})]})}),e.jsx(ka,{className:"sticky bottom-0 bg-background pt-3",children:j?e.jsxs(e.Fragment,{children:[e.jsx(We,{variant:"outline",onClick:()=>A(!1),disabled:t,children:"Back"}),e.jsxs(We,{onClick:xt,disabled:t,className:"gap-2",children:[t&&e.jsx(Vs,{className:"w-4 h-4 animate-spin"}),"Confirm Create"]})]}):e.jsxs(e.Fragment,{children:[e.jsx(We,{variant:"outline",onClick:()=>O(!1),disabled:t,children:"Cancel"}),e.jsx(We,{onClick:rt,disabled:t,className:"gap-2",children:"Preview"})]})})]})}),e.jsx(Un,{open:!!I,onOpenChange:et=>{et||(M(null),W(El()))},children:e.jsxs(zn,{className:"max-w-2xl max-h-[90vh] overflow-y-auto",children:[e.jsxs($n,{children:[e.jsx(Vn,{children:"Add Capability"}),e.jsxs(ha,{children:["Under category: ",e.jsx("span",{className:"font-medium text-foreground",children:I==null?void 0:I.categoryName})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx(pt,{children:"Capability Name *"}),e.jsx(pr,{value:B.name,onChange:et=>W(ft=>({...ft,name:et.target.value})),placeholder:"e.g. Contract Management"})]}),e.jsxs("div",{className:"space-y-3 pl-2 sm:pl-3 border-l-2 border-primary/30",children:[B.functional_focuses.map((et,ft)=>e.jsxs("div",{className:"rounded-md border bg-background p-3 space-y-3",children:[e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsxs("div",{className:"flex-1",children:[e.jsxs(pt,{children:["Functional Focus * ",e.jsxs("span",{className:"text-xs text-muted-foreground",children:["#",ft+1]})]}),e.jsx(pr,{value:et.name,onChange:je=>He(ft,{name:je.target.value}),placeholder:"e.g. Contract Drafting"})]}),B.functional_focuses.length>1&&e.jsx(We,{type:"button",variant:"ghost",size:"icon",className:"mt-6 text-destructive",onClick:()=>Kt(ft),children:e.jsx(ti,{className:"w-4 h-4"})})]}),e.jsxs("div",{children:[e.jsx(pt,{children:"Key Capabilities"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(pr,{value:et.capInput,onChange:je=>He(ft,{capInput:je.target.value}),placeholder:"Add a capability and press Enter",onKeyDown:je=>{je.key==="Enter"&&(je.preventDefault(),Jt(ft,"capabilities"))}}),e.jsx(We,{type:"button",variant:"secondary",onClick:()=>Jt(ft,"capabilities"),children:"Add"})]}),e.jsx("div",{className:"flex flex-wrap gap-1.5 mt-2",children:et.capabilities.map(je=>e.jsxs(tr,{variant:"secondary",className:"gap-1",children:[je,e.jsx("button",{onClick:()=>rr(ft,"capabilities",je),className:"hover:text-destructive",children:e.jsx(fn,{className:"w-3 h-3"})})]},je))})]}),e.jsxs("div",{children:[e.jsx(pt,{children:"Keywords *"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(pr,{value:et.ke
379yInput,onChange:je=>He(ft,{keyInput:je.target.value}),placeholder:"Add a keyword and press Enter",onKeyDown:je=>{je.key==="Enter"&&(je.preventDefault(),Jt(ft,"keywords"))}}),e.jsx(We,{type:"button",variant:"secondary",onClick:()=>Jt(ft,"keywords"),children:"Add"})]}),e.jsx("div",{className:"flex flex-wrap gap-1.5 mt-2",children:et.keywords.map(je=>e.jsxs(tr,{variant:"outline",className:"gap-1",children:[je,e.jsx("button",{onClick:()=>rr(ft,"keywords",je),className:"hover:text-destructive",children:e.jsx(fn,{className:"w-3 h-3"})})]},je))})]})]},ft)),e.jsxs(We,{type:"button",variant:"outline",size:"sm",className:"gap-2",onClick:Tt,children:[e.jsx(aa,{className:"w-3.5 h-3.5"})," Add Functional Focus"]})]})]}),e.jsxs(ka,{className:"sticky bottom-0 bg-background pt-3",children:[e.jsx(We,{variant:"outline",onClick:()=>M(null),disabled:Y,children:"Cancel"}),e.jsxs(We,{onClick:Ht,disabled:Y,className:"gap-2",children:[Y&&e.jsx(Vs,{className:"w-4 h-4 animate-spin"})," Create Capability"]})]})]})}),e.jsx(Un,{open:!!le,onOpenChange:et=>{et||(ae(null),oe(kl()))},children:e.jsxs(zn,{className:"max-w-xl max-h-[90vh] overflow-y-auto",children:[e.jsxs($n,{children:[e.jsx(Vn,{children:"Add Functional Focus"}),e.jsxs(ha,{children:["Under capability: ",e.jsx("span",{className:"font-medium text-foreground",children:le==null?void 0:le.capabilityName}),(le==null?void 0:le.categoryName)&&e.jsxs(e.Fragment,{children:[" · ",e.jsx("span",{className:"text-muted-foreground",children:le.categoryName})]})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx(pt,{children:"Functional Focus Name *"}),e.jsx(pr,{value:Z.name,onChange:et=>oe(ft=>({...ft,name:et.target.value})),placeholder:"e.g. Contract Drafting"})]}),e.jsxs("div",{children:[e.jsx(pt,{children:"Key Capabilities"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(pr,{value:Z.capInput,onChange:et=>oe(ft=>({...ft,capInput:et.target.value})),placeholder:"Add a capability and press Enter",onKeyDown:et=>{et.key==="Enter"&&(et.preventDefault(),yr("capabilities"))}}),e.jsx(We,{type:"button",variant:"secondary",onClick:()=>yr("capabilities"),children:"Add"})]}),e.jsx("div",{className:"flex flex-wrap gap-1.5 mt-2",children:Z.capabilities.map(et=>e.jsxs(tr,{variant:"secondary",className:"gap-1",children:[et,e.jsx("button",{onClick:()=>gr("capabilities",et),className:"hover:text-destructive",children:e.jsx(fn,{className:"w-3 h-3"})})]},et))})]}),e.jsxs("div",{children:[e.jsx(pt,{children:"Keywords *"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(pr,{value:Z.keyInput,onChange:et=>oe(ft=>({...ft,keyInput:et.target.value})),placeholder:"Add a keyword and press Enter",onKeyDown:et=>{et.key==="Enter"&&(et.preventDefault(),yr("keywords"))}}),e.jsx(We,{type:"button",variant:"secondary",onClick:()=>yr("keywords"),children:"Add"})]}),e.jsx("div",{className:"flex flex-wrap gap-1.5 mt-2",children:Z.keywords.map(et=>e.jsxs(tr,{variant:"outline",className:"gap-1",children:[et,e.jsx("button",{onClick:()=>gr("keywords",et),className:"hover:text-destructive",children:e.jsx(fn,{className:"w-3 h-3"})})]},et))})]})]}),e.jsxs(ka,{className:"sticky bottom-0 bg-background pt-3",children:[e.jsx(We,{variant:"outline",onClick:()=>ae(null),disabled:H,children:"Cancel"}),e.jsxs(We,{onClick:Vr,disabled:H,className:"gap-2",children:[H&&e.jsx(Vs,{className:"w-4 h-4 animate-spin"})," Create Focus"]})]})]})})]})}const dm={title:"",description:"",url:""};function Ny(){const{toast:r}=Yn(),[d,s]=ne.useState([]),[_,z]=ne.useState(!0),[te,ue]=ne.useState(!1),[w,O]=ne.useState(null),[t,f]=ne.useState(dm),[v,m]=ne.useState(!1),y=async()=>{z(!0);const I=await Wg();s(I),z(!1)};ne.useEffect(()=>{y()},[]);const C=()=>{O(null),f(dm),ue(!0)},S=I=>
379{O(I),f({title:I.title,description:I.description,url:I.url}),ue(!0)},g=async()=>{if(!t.title.trim()||!t.url.trim()){r({title:"Title and YouTube URL are required",variant:"destructive"});return}if(!Bf(t.url)){r({title:"Invalid YouTube URL",description:"Paste a full youtube.com or youtu.be link.",variant:"destructive"});return}m(!0);try{w?(await Hg(w.id,t),r({title:"Video updated"})):(await Gg(t),r({title:"Video added"})),ue(!1),await y()}finally{m(!1)}},j=async I=>{confirm(`Delete "${I.title}"?`)&&(await Yg(I.id),r({title:"Video deleted"}),y())},A=async(I,M)=>{await Kg(I.id,M),y()};return e.jsxs(ds,{children:[e.jsxs(Rs,{className:"flex flex-row items-center justify-between gap-4 flex-wrap",children:[e.jsxs("div",{children:[e.jsxs(Ds,{className:"flex items-center gap-2",children:[e.jsx(sl,{className:"w-5 h-5 text-primary"})," Tom Time Videos"]}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Paste a YouTube URL, add a title and description. Videos appear on the landing page in the order below."})]}),e.jsxs(We,{onClick:C,className:"gap-2",children:[e.jsx(aa,{className:"w-4 h-4"})," Add Video"]})]}),e.jsx(us,{children:_?e.jsx("div",{className:"text-sm text-muted-foreground py-8 text-center",children:"Loading…"}):d.length===0?e.jsxs("div",{className:"text-sm text-muted-foreground py-12 text-center border border-dashed rounded-lg",children:["No videos yet. Click ",e.jsx("strong",{children:"Add Video"})," to publish one."]}):e.jsx("div",{className:"space-y-3",children:d.map((I,M)=>e.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 p-3 border border-border rounded-lg hover:border-primary/40 transition-colors",children:[e.jsx("div",{className:"w-full sm:w-48 aspect-video rounded-md overflow-hidden bg-muted shrink-0",children:e.jsx("img",{width:1200,height:675,src:Df(I.url),alt:I.title,className:"w-full h-full object-cover",loading:"lazy",decoding:"async"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("h4",{className:"font-semibold truncate",children:I.title}),e.jsx("a",{href:I.url,target:"_blank",rel:"noreferrer",className:"text-xs text-primary hover:underline truncate block",children:I.url})]}),e.jsxs("span",{className:"text-xs px-2 py-0.5 rounded-full bg-muted text-muted-foreground shrink-0",children:["#",M+1]})]}),e.jsx("p",{className:"text-sm text-muted-foreground mt-2 line-clamp-2",children:I.description})]}),e.jsxs("div",{className:"flex sm:flex-col gap-2 justify-end shrink-0",children:[e.jsx(We,{size:"icon",variant:"outline",onClick:()=>A(I,"up"),disabled:M===0,"aria-label":"Move up",children:e.jsx(qg,{className:"w-4 h-4"})}),e.jsx(We,{size:"icon",variant:"outline",onClick:()=>A(I,"down"),disabled:M===d.length-1,"aria-label":"Move down",children:e.jsx(Qg,{className:"w-4 h-4"})}),e.jsx(We,{size:"icon",variant:"outline",onClick:()=>S(I),"aria-label":"Edit",children:e.jsx(ju,{className:"w-4 h-4"})}),e.jsx(We,{size:"icon",variant:"outline",onClick:()=>j(I),"aria-label":"Delete",className:"text-destructive hover:text-destructive",children:e.jsx(ti,{className:"w-4 h-4"})})]})]},I.id))})}),e.jsx(Un,{open:te,onOpenChange:ue,children:e.jsxs(zn,{children:[e.jsxs($n,{children:[e.jsx(Vn,{children:w?"Edit video":"Add video"}),e.jsx(ha,{children:"Paste a YouTube link. The thumbnail and player are generated automatically."})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx(pt,{htmlFor:"tt-url",children:"YouTube URL *"}),e.jsx(pr,{id:"tt-url",placeholder:"https://youtu.be/…",value:t.url,onChange:I=>f({...t,url:I.target.value})})]}),e.jsxs("div",{children:[e.jsx(pt,{htmlFor:"tt-title",children:"Title *"}),e.jsx(pr,{id:"tt-title",placeholder:"Episode title",value:t.title,onChange:I=>f({...t,title:I.target.value})})]}),e.jsxs("div",{children:[e.jsx(pt,{htmlFor:"tt-desc",children:"Description"}),e.jsx(Ma,{id:"tt-desc",rows:4,placeholder:"Short description shown under the thumbnail",value:t.description,onChange:I=>f({...t,description:I.target.value})})]}),Bf(t.url)&&e.jsx("div",{className:"aspect-video w-full rounded-md overflow-hidden bg-muted",children:e.jsx("img",{width:1200,height:675,src:Df(t.url),alt:"Preview",className:"w-full h-full object-cover",loading:"lazy",decoding:"async"})})]}),e.jsxs(ka,{children:[e.jsx(We,{variant:"outline",onClick:()=>ue(!1),disabled:v,children:"Cancel"}),e.jsx(We,{onClick:g,disabled:v,children:v?"Saving…":w?"Save changes":"Add video"})]})]})})]})}const Sy=()=>{const[r,d]=ne.useState([]),[s,_]=ne.useState([]),[z,te]=ne.useState(!0),[ue,w]=ne.useState(1),[O,t]=ne.useState(null),[f,v]=ne.useState(null),[m,y]=ne.useState(null),[C,S]=ne.useState("all"),[g,j]=ne.useState(null),A=async()=>{try{te(!0);const U=await Xg();d(U.logs||[]),_(U.summary||[])}catch(U){console.error("Error fetching click logs:",U)}finally{te(!1)}};ne.useEffect(()=>{A()},[]);const I=r.filter(U=>U.type==="case-study").length,M=r.filter(U=>U.type==="vendor-spotlight").length,B=r.filter(U=>U.type==="news").length,W=r.filter(U=>U.type==="tom-time").length,Y=s.filter(U=>U.type===O),J=r.filter(U=>U.type===O&&U.item_id===f),ae=r.filter(U=>C==="all"?!0:U.type===C).reduce((U,ge)=>{if(!ge.country||ge.country==="Unknown")return U;const Ee=ge.city&&ge.city!=="Unknown"?`${ge.city}, ${ge.country}`:ge.country;return U[Ee]=(U[Ee]||0)+1,U},{}),Z=Object.entries(ae).map(([U,ge])=>({location:U,count:ge})).sort((U,ge)=>ge.count-U.count),oe=r.filter(U=>(U.city&&U.city!=="Unknown"?`${U.city}, ${U.country}`:U.country)===g),H=oe.filter(U=>U.type==="case-study").length,fe=oe.filter(U=>U.type==="vendor-spotlight").length,se=oe.filter(U=>U.type==="news").length,de=oe.filter(U=>U.type==="tom-time").length,q=oe.length;return e.jsx("div",{className:"space-y-6",children:e.jsxs(ds,{children:[e.jsxs(Rs,{className:"flex flex-row items-center justify-between space-y-0",children:[e.jsxs("div",{children:[e.jsxs(Ds,{className:"flex items-center gap-2 text-lg",children:[e.jsx(Hm,{className:"w-5 h-5 text-primary"}),"Insights Click Analytics"]}),e.jsxs(fa,{children:[ue===1&&"Select an insight category to view statistics",ue===2&&`Browsing ${O==="case-study"?"Case Studies":O==="vendor-spotlight"?"Vendor Spotlights":O==="news"?"Global News":O==="tom-time"?"Tom Time Videos":""}`,ue===3&&`Click details for "${m}"`]})]}),ue>1&&e.jsxs(We,{variant:"outline",size:"sm",className:"gap-1 h-8",onClick:()=>{ue===3?(w(2),v(null),y(null)):ue===2&&(w(1),t(null))},children:[e.jsx(Of,{className:"w-4 h-4"}),"Back"]})]}),e.jsx(us,{children:z?e.jsx("div",{className:"text-center py-12 text-muted-foreground text-sm",children:"Loading click analytics data..."}):e.jsxs(e.Fragment,{children:[ue===1&&e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{onClick:()=>{t("case-study"),w(2)},className:"flex items-center justify-between p-6 rounded-lg border bg-card cursor-pointer hover:bg-muted/30 hover:border-muted-foreground
379/20 transition-colors",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"p-3 rounded-lg bg-primary/10 text-primary",children:e.jsx(Bi,{className:"w-6 h-6"})}),e.jsxs("div",{children:[e.jsx("h4",{className:"font-bold text-base",children:"Case Studies"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Product implementations & reviews"})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(tr,{variant:"secondary",className:"font-bold text-sm px-2.5",children:[I," clicks"]}),e.jsx(ei,{className:"w-5 h-5 text-muted-foreground"})]})]}),e.jsxs("div",{onClick:()=>{t("vendor-spotlight"),w(2)},className:"flex items-center justify-between p-6 rounded-lg border bg-card cursor-pointer hover:bg-muted/30 hover:border-muted-foreground/20 transition-colors",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"p-3 rounded-lg bg-primary/10 text-primary",children:e.jsx(rc,{className:"w-6 h-6"})}),e.jsxs("div",{children:[e.jsx("h4",{className:"font-bold text-base",children:"Vendor Spotlights"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Deep dives & technology overviews"})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(tr,{variant:"secondary",className:"font-bold text-sm px-2.5",children:[M," clicks"]}),e.jsx(ei,{className:"w-5 h-5 text-muted-foreground"})]})]}),e.jsxs("div",{onClick:()=>{t("news"),w(2)},className:"flex items-center justify-between p-6 rounded-lg border bg-card cursor-pointer hover:bg-muted/30 hover:border-muted-foreground/20 transition-colors",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"p-3 rounded-lg bg-primary/10 text-primary",children:e.jsx(vh,{className:"w-6 h-6"})}),e.jsxs("div",{children:[e.jsx("h4",{className:"font-bold text-base",children:"Global News"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Latest legaltech innovations & market updates"})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(tr,{variant:"secondary",className:"font-bold text-sm px-2.5",children:[B," clicks"]}),e.jsx(ei,{className:"w-5 h-5 text-muted-foreground"})]})]}),e.jsxs("div",{onClick:()=>{t("tom-time"),w(2)},className:"flex items-center justify-between p-6 rounded-lg border bg-card cursor-pointer hover:bg-muted/30 hover:border-muted-foreground/20 transition-colors",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"p-3 rounded-lg bg-primary/10 text-primary",children:e.jsx(sl,{className:"w-6 h-6"})}),e.jsxs("div",{children:[e.jsx("h4",{className:"font-bold text-base",children:"Tom Time"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Bite-sized industry video conversations"})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(tr,{variant:"secondary",className:"font-bold text-sm px-2.5",children:[W," clicks"]}),e.jsx(ei,{className:"w-5 h-5 text-muted-foreground"})]})]})]}),e.jsxs(ds,{className:"border border-border bg-card/60 backdrop-blur-sm shadow-md mt-6",children:[e.jsxs(Rs,{className:"pb-3 flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsxs(Ds,{className:"text-sm font-semibold uppercase tracking-wider flex items-center gap-2 text-foreground/80",children:[e.jsx(nl,{className:"w-4 h-4 text-primary"}),"Geographic Click Breakdown"]}),e.jsx(fa,{children:g?`Location drill-down for ${g}`:C==="all"?"Top countries and cities by overall click activity":`Top locations for ${C==="case-study"?"Case Studies":C==="vendor-spotlight"?"Vendor Spotlights":C==="news"?"Global News":"Tom Time"}`})]}),g?e.jsxs(We,{variant:"outline",size:"sm",className:"h-8 gap-1 self-start sm:self-auto",onClick:()=>j(null),children:[e.jsx(Of,{className:"w-3.5 h-3.5"}),"Back to Locations"]}):e.jsx("div",{className:"flex flex-wrap gap-1 bg-muted p-1 rounded-lg border border-border max-w-full",children:["all","case-study","vendor-spotlight","news","tom-time"].map(U=>e.jsx("button",{onClick:()=>S(U),className:`px-2.5 py-1 text-xs font-medium rounded-md transition-all whitespace-nowrap ${C===U?"bg-primary text-primary-foreground shadow":"text-muted-foreground hover:bg-muted-foreground
379/10 hover:text-foreground"}`,children:U==="all"?"All":U==="case-study"?"Case Studies":U==="vendor-spotlight"?"Spotlights":U==="news"?"News":"Tom Time"},U))})]}),e.jsx(us,{children:g?e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 pb-2",children:[e.jsxs("div",{className:"space-y-4",children:[e.jsx("h4",{className:"font-semibold text-sm text-foreground/80",children:"Category Distribution"}),e.jsxs("div",{className:"space-y-3 bg-muted/10 p-4 rounded-xl border border-border/40",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex justify-between text-xs font-medium",children:[e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(Bi,{className:"w-3.5 h-3.5 text-primary"})," Case Studies"]}),e.jsxs("span",{className:"text-muted-foreground",children:[H," (",q>0?Math.round(H/q*100):0,"%)"]})]}),e.jsx("div",{className:"h-2 w-full bg-muted rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full bg-primary transition-all duration-500",style:{width:`${q>0?H/q*100:0}%`}})})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex justify-between text-xs font-medium",children:[e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(rc,{className:"w-3.5 h-3.5 text-violet-500"})," Vendor Spotlights"]}),e.jsxs("span",{className:"text-muted-foreground",children:[fe," (",q>0?Math.round(fe/q*100):0,"%)"]})]}),e.jsx("div",{className:"h-2 w-full bg-muted rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full bg-violet-500 transition-all duration-500",style:{width:`${q>0?fe/q*100:0}%`}})})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex justify-between text-xs font-medium",children:[e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(vh,{className:"w-3.5 h-3.5 text-emerald-500"})," Global News"]}),e.jsxs("span",{className:"text-muted-foreground",children:[se," (",q>0?Math.round(se/q*100):0,"%)"]})]}),e.jsx("div",{className:"h-2 w-full bg-muted rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full bg-emerald-500 transition-all duration-500",style:{width:`${q>0?se/q*100:0}%`}})})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex justify-between text-xs font-medium",children:[e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(sl,{className:"w-3.5 h-3.5 text-amber-500"})," Tom Time"]}),e.jsxs("span",{className:"text-muted-foreground",children:[de," (",q>0?Math.round(de/q*100):0,"%)"]})]}),e.jsx("div",{className:"h-2 w-full bg-muted rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full bg-amber-500 transition-all duration-500",style:{width:`${q>0?de/q*100:0}%`}})})]})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h4",{className:"font-semibold text-sm text-foreground/80",children:"Location Insights"}),e.jsxs("div",{className:"grid grid-cols-2 gap-3 h-[calc(100%-2rem)]",children:[e.jsxs("div",{className:"p-4 rounded-xl border border-border/40 bg-muted/5 flex flex-col justify-center",children:[e.jsx("span",{className:"text-xs text-muted-foreground uppercase font-semibold",children:"Unique Users"}),e.jsx("span",{className:"text-2xl font-bold mt-1 text-foreground",children:new Set(oe.map(U=>U.user_email)).size})]}),e.jsxs("div",{className:"p-4 rounded-xl border border-border/40 bg-muted/5 flex flex-col justify-center",children:[e.jsx("span",{className:"text-xs text-muted-foreground uppercase font-semibold",children:"Unique IPs"}),e.jsx("span",{className:"text-2xl font-bold mt-1 text-foreground",children:new Set(oe.map(U=>U.ip_address).filter(Boolean)).size})]}),e.jsxs("div",{className:"p-4 rounded-xl border border-border/40 bg-muted/5 flex flex-col justify-center col-span-2",children:[e.jsx("span",{className:"text-xs text-muted-foreground uppercase font-semibold",children:"Most Visited Insight"}),e.jsx("span",{className:"text-lg font-bold mt-1 text-primary",children:(()=>{const ge=Object.entries({"Case Studies":H,"Vendor Spotlights":fe,"Global News":se,"Tom Time":de}).reduce((Ee,Xe)=>Ee[1]>Xe[1]?Ee:Xe);return ge[1]>0?`${ge[0]} (${ge[1]} clicks)`:"None"})()})]})]})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h4",{className:"font-semibold text-sm text-foreground
379/80",children:"Recent Click Logs"}),e.jsx("div",{className:"max-h-[300px] overflow-y-auto border rounded-lg",children:e.jsxs(Rn,{children:[e.jsx(Mn,{className:"bg-muted/50 sticky top-0 z-10",children:e.jsxs(Gr,{children:[e.jsx(Lt,{className:"w-[140px]",children:"Timestamp"}),e.jsx(Lt,{children:"User Email"}),e.jsx(Lt,{children:"Category"}),e.jsx(Lt,{children:"Insight Item Name"}),e.jsx(Lt,{className:"text-right w-[120px]",children:"IP Address"})]})}),e.jsx(Fn,{children:oe.map(U=>e.jsxs(Gr,{className:"hover:bg-muted/10",children:[e.jsx(St,{className:"text-xs text-muted-foreground whitespace-nowrap",children:new Date(U.timestamp).toLocaleString("en-GB",{day:"2-digit",month:"short",hour:"2-digit",minute:"2-digit",second:"2-digit"})}),e.jsx(St,{className:"font-medium text-xs truncate max-w-[150px]",title:U.user_email,children:U.user_email}),e.jsxs(St,{className:"text-xs",children:[U.type==="case-study"&&e.jsx(tr,{variant:"outline",className:"bg-primary/5 text-primary border-primary/20 text-[10px]",children:"Case Study"}),U.type==="vendor-spotlight"&&e.jsx(tr,{variant:"outline",className:"bg-violet-500/5 text-violet-500 border-violet-500/20 text-[10px]",children:"Spotlight"}),U.type==="news"&&e.jsx(tr,{variant:"outline",className:"bg-emerald-500/5 text-emerald-500 border-emerald-500/20 text-[10px]",children:"News"}),U.type==="tom-time"&&e.jsx(tr,{variant:"outline",className:"bg-amber-500/5 text-amber-500 border-amber-500/20 text-[10px]",children:"Tom Time"})]}),e.jsx(St,{className:"text-xs text-foreground font-medium truncate max-w-[220px]",title:U.item_name,children:U.item_name}),e.jsx(St,{className:"text-xs text-muted-foreground text-right font-mono",children:U.ip_address||"-"})]},U.id))})]})})]})]}):Z.length>0?e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4",children:Z.slice(0,12).map((U,ge)=>e.jsxs("div",{onClick:()=>j(U.location),className:"group flex items-center justify-between p-4 rounded-lg bg-muted/20 border border-border/30 cursor-pointer hover:bg-muted/30 hover:border-primary/20 hover:shadow-sm transition-all duration-200 hover:-translate-y-0.5",children:[e.jsxs("div",{className:"flex flex-col min-w-0",children:[e.jsx("span",{className:"font-semibold text-sm truncate text-foreground group-hover:text-primary transition-colors",children:U.location}),e.jsxs("span",{className:"text-xs text-muted-foreground",children:["Rank #",ge+1," • Click to expand"]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(tr,{className:"font-bold text-sm bg-primary/10 text-primary border-none group-hover:bg-primary group-hover:text-primary-foreground transition-all duration-200",children:[U.count," ",U.count===1?"click":"clicks"]}),e.jsx(ei,{className:"w-4 h-4 text-muted-foreground/50 group-hover:text-primary transition-colors"})]})]},ge))}):e.jsx("div",{className:"text-center py-8 text-xs text-muted-foreground",children:"No geographic click activity recorded yet."})})]})]}),ue===2&&e.jsx("div",{children:Y.length>0?e.jsxs(Rn,{children:[e.jsx(Mn,{children:e.jsxs(Gr,{children:[e.jsx(Lt,{children:"Product / Resource Name"}),e.jsx(Lt,{children:"Resource ID"}),e.jsx(Lt,{className:"text-right",children:"Total Clicks"}),e.jsx(Lt,{className:"w-[100px]"})]})}),e.jsx(Fn,{children:Y.map(U=>e.jsxs(Gr,{className:"cursor-pointer hover:bg-muted/20 transition-colors",onClick:()=>{v(U.item_id),y(U.item_name),w(3)},children:[e.jsx(St,{className:"font-semibold text-sm",children:U.item_name}),e.jsx(St,{className:"text-xs text-muted-foreground",children:U.item_id}),e.jsx(St,{className:"text-right font-bold text-sm",children:e.jsx(tr,{variant:"outline",className:"font-bold",children:U.count})}),e.jsx(St,{className:"text-right",children:e.jsx(ei,{className:"w-4 h-4 text-muted-foreground inline"})})]},`${U.type}-${U.item_id}`))})]}):e.jsx("div",{className:"text-center py-8 text-muted-foreground text-sm",children:"No clicks recorded for this category yet."})}),ue===3&&e.jsx("div",{children:J.length>0?e.jsx("div",{className:"max-h-[400px] overflow-y-auto",children:e.jsxs(Rn,{children:[e.jsx(Mn,{children:e.jsxs(Gr,{children:[e.jsx(Lt,{children:"Timestamp"}),e.jsx(Lt,{children:"User Email"}),e.jsx(Lt,{children:"User ID"}),e.jsx(Lt,{children:"IP Address"}),e.jsx(Lt,{children:"Country"}),e.jsx(Lt,{children:"City"})]})}),e.jsx(Fn,{children:J.map(U=>e.jsxs(Gr,{children:[e.jsx(St,{className:"text-xs text-muted-foreground whitespace-nowrap",children:new Date(U.timestamp).toLocaleStr
379ing("en-GB",{day:"2-digit",month:"short",hour:"2-digit",minute:"2-digit",second:"2-digit"})}),e.jsx(St,{className:"font-medium text-xs",children:U.user_email}),e.jsx(St,{className:"text-xs text-muted-foreground",children:U.user_id||"Anonymous"}),e.jsx(St,{className:"text-xs text-muted-foreground",children:U.ip_address||"-"}),e.jsx(St,{className:"text-xs font-semibold text-foreground",children:U.country||"Unknown"}),e.jsx(St,{className:"text-xs text-muted-foreground",children:U.city||"-"})]},U.id))})]})}):e.jsx("div",{className:"text-center py-8 text-muted-foreground text-sm",children:"No detailed click logs found for this item."})})]})})]})})},um="https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net";function hm(r){if(!r)return"";const d=new Date(r);if(isNaN(d.getTime()))return"";const s=_=>String(_).padStart(2,"0");return`${d.getFullYear()}-${s(d.getMonth()+1)}-${s(d.getDate())}T${s(d.getHours())}:${s(d.getMinutes())}`}function Cy(r){return r.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Ay=yu({title:hr().trim().min(1,"Title is required").max(200),slug:hr().trim().min(1,"Slug is required").max(120).regex(/^[a-z0-9-]+$/,"Lowercase letters, numbers and hyphens only"),excerpt:hr().max(500).optional(),content:hr().optional(),seo_title:hr().max(200).optional(),seo_description:hr().max(300).optional(),seo_keywords:hr().max(300).optional()});function Ey({open:r,onOpenChange:d,newsletter:s,onSaved:_}){const{toast:z}=Yn(),[te,ue]=ne.useState(!1),[w,O]=ne.useState(null),[t,f]=ne.useState(null),[v,m]=ne.useState(!1),[y,C]=ne.useState(!1),[S,g]=ne.useState(""),[j,A]=ne.useState({title:"",slug:"",excerpt:"",content:"",featured_image_url:"",attachment_url:"",seo_title:"",seo_description:"",seo_keywords:"",published:!1,published_at:"",updated_at:""});ne.useEffect(()=>{r&&(O(null),f(null),g(""),m(!1),C(!1),A(s?{title:s.title||"",slug:s.slug||"",excerpt:s.excerpt||"",content:s.content||"",featured_image_url:s.featured_image_url||"",attachment_url:s.attachment_url||(typeof s.attachments=="string"?s.attachments:""),seo_title:s.seo_title||"",seo_description:s.seo_description||"",seo_keywords:s.seo_keywords||"",published:s.published??s.is_active??!1,published_at:hm(s.published_at),updated_at:hm(s.updated_at)}:{title:"",slug:"",excerpt:"",content:"",featured_image_url:"",attachment_url:"",seo_title:"",seo_description:"",seo_keywords:"",published:!1,published_at:"",updated_at:""}))},[r,s]);const I=Z=>{O(Z),m(!1);const oe=URL.createObjectURL(Z);g(oe)},M=()=>{O(null),g(""),m(!0),A(Z=>({...Z,featured_image_url:""}))},B=Z=>{f(Z),C(!1)},W=()=>{f(null),C(!0),A(Z=>({...Z,attachment_url:""}))},Y=Z=>{A(oe=>({...oe,title:Z,slug:s?oe.slug:Cy(Z)}))},J=async()=>{const Z=Ay.safeParse(j);if(!Z.success){z({title:"Validation error",description:Z.error.errors[0].message,variant:"destructive"});return}ue(!0);const oe=j.published_at?new Date(j.published_at).toISOString():j.published&&!(s!=null&&s.published_at)?new Date().toISOString():(s==null?void 0:s.published_at)??null,H=j.updated_at?new Date(j.updated_at).toISOString():new Date().toISOString();try{const fe=new FormData;fe.append("title",j.title.trim()),fe.append("slug",j.slug.trim()),j.excerpt&&fe.append("excerpt",j.excerpt),j.content&&fe.append("content",j.content),j.seo_title&&fe.append("seo_title",j.seo_title),j.seo_description&&fe.append("seo_de
379scription",j.seo_description),j.seo_keywords&&fe.append("seo_keywords",j.seo_keywords),fe.append("published",String(j.published)),oe&&fe.append("published_at",oe),fe.append("updated_at",H),v&&fe.append("remove_featured_image","true"),y&&fe.append("remove_attachment","true"),w&&fe.append("featured_image",w),t&&fe.append("attachment",t);const se=localStorage.getItem("authToken")||localStorage.getItem("access_token"),de={};if(se&&(de.Authorization=`Bearer ${se}`),s){const q=await fetch(`${um}/admin/newsletter/${s.id}`,{method:"PUT",headers:de,body:fe});if(!q.ok){const U=await q.json().catch(()=>({detail:"Save failed"}));throw new Error(U.detail||"Save failed")}}else{const q=await fetch(`${um}/admin/newsletter/`,{method:"POST",headers:de,body:fe});if(!q.ok){const U=await q.json().catch(()=>({detail:"Save failed"}));throw new Error(U.detail||"Save failed")}}z({title:s?"Newsletter updated":"Newsletter created"}),_(),d(!1)}catch(fe){z({title:"Save failed",description:fe.message,variant:"destructive"})}finally{ue(!1)}},le=S||j.featured_image_url,ae=(t==null?void 0:t.name)||(j.attachment_url?j.attachment_url.split("/").pop():"");return e.jsx(Un,{open:r,onOpenChange:d,children:e.jsxs(zn,{className:"max-w-3xl max-h-[90vh] overflow-y-auto",children:[e.jsx($n,{children:e.jsx(Vn,{children:s?"Edit Newsletter":"Create Newsletter"})}),e.jsxs("div",{className:"space-y-5 py-2",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(pt,{htmlFor:"nl-title",children:"Title *"}),e.jsx(pr,{id:"nl-title",value:j.title,onChange:Z=>Y(Z.target.value),maxLength:200})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(pt,{htmlFor:"nl-slug",children:"Slug *"}),e.jsx(pr,{id:"nl-slug",value:j.slug,onChange:Z=>A(oe=>({...oe,slug:Z.target.value})),maxLength:120}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["URL: /insights/newsletter/",j.slug||"your-slug"]})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(pt,{children:"Featured image"}),e.jsxs("div",{className:"flex items-center gap-3",children:[le?e.jsx("div",{className:"relative w-32 h-20 rounded overflow-hidden border border-border",children:e.jsx("img",{width:1200,height:675,src:le,alt:"preview",className:"w-full h-full object-cover",loading:"lazy",decoding:"async"})}):e.jsx("div",{className:"w-32 h-20 rounded border border-dashed border-border flex items-center justify-center text-muted-foreground",children:e.jsx(md,{className:"w-5 h-5"})}),e.jsxs("label",{className:"cursor-pointer",children:[e.jsx("input",{type:"file",accept:"image/*",className:"hidden",onChange:Z=>{var oe;return((oe=Z.target.files)==null?void 0:oe[0])&&I(Z.target.files[0])}}),e.jsx(We,{type:"button",variant:"outline",size:"sm",asChild:!0,disabled:te,children:e.jsxs("span",{children:[e.jsx(Bo,{className:"w-4 h-4 mr-1.5"}),le?"Replace":"Upload"]})})]}),le&&e.jsx(We,{type:"button",variant:"ghost",size:"sm",onClick:M,children:e.jsx(fn,{className:"w-4 h-4"})})]})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(pt,{htmlFor:"nl-excerpt",children:"Short preview / Excerpt"}),e.jsx(Ma,{id:"nl-excerpt",value:j.excerpt,onChange:Z=>A(oe=>({...oe,excerpt:Z.target.value})),rows:3,maxLength:500,placeholder:"Shown on the newsletter listing card."})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(pt,{htmlFor:"nl-content",children:"Content (HTML supported)"}),e.jsx(Ma,{id:"nl-content",value:j.content,onChange:Z=>A(oe=>({...oe,content:Z.target.value})),rows:14,placeholder:`<h2>Section</h2>
380<p>Write your newsletter here.</p>`,className:"font-mono text-sm"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"You can paste rich HTML. Content is sanitized before rendering."})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(pt,{children:"Attachments"}),ae&&e.jsx("div",{className:"flex items-center gap-2 mb-1",children:e.jsxs(tr,{variant:"secondary",className:"gap-1.5",children:[e.jsx(Gm,{className:"w-3 h-3"})," ",ae,e.jsx("button",{type:"button",className:"ml-1 hover:text-destructive",onClick:W,children:e.jsx(fn,{className:"w-3 h-3"})})]})}),e.jsxs("label",{className:"cursor-pointer",children:[e.jsx("input",{type:"file",className:"hidden",onChange:Z=>{var oe;return((oe=Z.target.files)==null?void 0:oe[0])&&B(Z.target.files[0])}}),e.jsx(We,{type:"button",variant:"outline",size:"sm",asChild:!0,disabled:te,children:e.jsxs("span",{children:[e.jsx(Bo,{className:"w-4 h-4 mr-1.5"}),ae?"Replace attachment":"Add attachment"]})})]})]}),e.jsxs("div",{className:"border-t border-border pt-4 space-y-3",children:[e.jsx("h4",{className:"text-sm font-semibold",children:"SEO metadata"}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(pt,{htmlFor:"nl-seo-title",children:"SEO title"}),e.jsx(pr,{id:"nl-seo-title",value:j.seo_title,onChange:Z=>A(oe=>({...oe,seo_title:Z.target.value})),maxLength:200})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(pt,{htmlFor:"nl-seo-desc",children:"SEO description"}),e.jsx(Ma,{id:"nl-seo-desc",value:j.seo_description,onChange:Z=>A(oe=>({...oe,seo_description:Z.target.value})),rows:2,maxLength:300})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(pt,{htmlFor:"nl-seo-kw",children:"SEO keywords (comma separated)"}),e.jsx(pr,{id:"nl-seo-kw",value:j.seo_keywords,onChange:Z=>A(oe=>({...oe,seo_keywords:Z.target.value})),maxLength:300})]})]}),e.jsxs("div",{className:"flex items-center justify-between border-t border-border pt-4",children:[e.jsxs("div",{children:[e.jsx(pt,{htmlFor:"nl-pub",className:"text-sm font-semibold",children:"Published"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Turn on to make this newsletter visible on the public site."})]}),e.jsx(Fi,{id:"nl-pub",checked:j.published,onCheckedChange:Z=>A(oe=>({...oe,published:Z}))})]}),e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 border-t border-border pt-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(pt,{htmlFor:"nl-pub-at",children:"Publication date"}),e.jsx(pr,{id:"nl-pub-at",type:"datetime-local",value:j.published_at,onChange:Z=>A(oe=>({...oe,published_at:Z.target.value}))}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Leave blank to auto-set when publishing."})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(pt,{htmlFor:"nl-upd-at",children:"Updated date"}),e.jsx(pr,{id:"nl-upd-at",type:"datetime-local",value:j.updated_at,onChange:Z=>A(oe=>({...oe,updated_at:Z.target.value}))}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Leave blank to use the current time on save."})]})]})]}),e.jsxs(ka,{children:[e.jsx(We,{variant:"outline",onClick:()=>d(!1),disabled:te,children:"Cancel"}),e.jsxs(We,{onClick:J,disabled:te,children:[te&&e.jsx(Vs,{className:"w-4 h-4 mr-1.5 animate-spin"}),s?"Save changes":"Create newsletter"]})]})]})})}const fh="https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net";function ky(){const{toast:r}=Yn(),[d,s]=ne.useState([]),[_,z]=ne.useState(!0),[te,ue]=ne.useState(!1),[w,O]=ne.useState(null),[t,f]=ne.useState(""),v=async()=>{z(!0);try{const S=localStorage.getItem("authToken")||localStorage.getItem("access_token"),g=await fetch(`${fh}/admin/newsletter/`,{headers:S?{Authorization:`Bearer ${S}`}:{}});if(g.ok){const j=await g.json();s(j??[])}else r({title:"Failed to load newsletters",description:"Could not fetch newsletters from the server.",variant:"destructive"}),s([])}catch(S){r({title:"Failed to load newsletters",description:S.message||"An error occurred while fetching data.",variant:"destructive"}),s([])}finally{z(!1)}};ne.useEffect(()=>
380{v()},[]);const m=ne.useMemo(()=>{const S=t.trim().toLowerCase();return S?d.filter(g=>(g.title||"").toLowerCase().includes(S)||(g.slug||"").toLowerCase().includes(S)||(g.excerpt||"").toLowerCase().includes(S)):d},[d,t]),y=async S=>{const g=!S.published,j={title:S.title,slug:S.slug,excerpt:S.excerpt??null,content:S.content??null,featured_image_url:S.featured_image_url??null,attachment_url:S.attachment_url??null,seo_title:S.seo_title??null,seo_description:S.seo_description??null,seo_keywords:S.seo_keywords??null,published:g,published_at:g?S.published_at??new Date().toISOString():S.published_at??null,updated_at:new Date().toISOString()};try{const A=localStorage.getItem("authToken")||localStorage.getItem("access_token"),I=await fetch(`${fh}/admin/newsletter/${S.id}`,{method:"PUT",headers:{"Content-Type":"application/json",...A?{Authorization:`Bearer ${A}`}:{}},body:JSON.stringify(j)});if(!I.ok){const M=await I.json().catch(()=>({detail:"Failed to update status"}));throw new Error(M.detail||"Failed to update status")}r({title:g?"Newsletter published":"Newsletter unpublished"}),v()}catch(A){r({title:"Update failed",description:A.message,variant:"destructive"})}},C=async S=>{if(confirm(`Delete "${S.title}"? This cannot be undone.`))try{const g=localStorage.getItem("authToken")||localStorage.getItem("access_token"),j=await fetch(`${fh}/admin/newsletter/${S.id}`,{method:"DELETE",headers:g?{Authorization:`Bearer ${g}`}:{}});if(!j.ok){const A=await j.json().catch(()=>({detail:"Failed to delete newsletter"}));throw new Error(A.detail||"Failed to delete newsletter")}r({title:"Newsletter deleted"}),v()}catch(g){r({title:"Delete failed",description:g.message,variant:"destructive"})}};return e.jsxs(ds,{children:[e.jsxs(us,{className:"p-6",children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 mb-4",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl font-semibold",children:"Newsletters"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Create, edit, publish and delete newsletters shown under Insights."})]}),e.jsxs(We,{onClick:()=>{O(null),ue(!0)},children:[e.jsx(aa,{className:"w-4 h-4 mr-1.5"})," New newsletter"]})]}),e.jsxs("div",{className:"relative max-w-sm mb-4",children:[e.jsx(bo,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),e.jsx(pr,{placeholder:"Search newsletters…",value:t,onChange:S=>f(S.target.value),className:"pl-9"})]}),e.jsx("div",{className:"rounded-md border border-border overflow-x-auto",children:e.jsxs(Rn,{children:[e.jsx(Mn,{children:e.jsxs(Gr,{children:[e.jsx(Lt,{children:"Title"}),e.jsx(Lt,{children:"Status"}),e.jsx(Lt,{children:"Published"}),e.jsx(Lt,{children:"Updated"}),e.jsx(Lt,{className:"text-right",children:"Actions"})]})}),e.jsx(Fn,{children:_?e.jsx(Gr,{children:e.jsx(St,{colSpan:5,className:"text-center py-8 text-muted-foreground",children:"Loading…"})}):m.length===0?e.jsx(Gr,{children:e.jsxs(St,{colSpan:5,className:"text-center py-8 text-muted-foreground",children:["No newsletters yet. Click ",e.jsx("b",{children:"New newsletter"})," to create one."]})}):m.map(S=>{const g=S.published??!1,j=S.slug||String(S.id);return e.jsxs(Gr,{children:[e.jsxs(St,{children:[e.jsx("div",{className:"font-medium",children:S.title}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:["/",j]})]}),e.jsx(St,{children:g?e.jsx(tr,{className:"bg-green-500/15 text-green-500 hover:bg-green-500/20",children:"Published"}):e.jsx(tr,{variant:"secondary",children:"Draft"})}),e.jsx(St,{className:"text-sm text-muted-foreground",children:xh(S.published_at||S.updated_at||"")}),e.jsx(St,{className:"text-sm text-muted-foreground",children:xh(S.updated_at||"")}),e.jsx(St,{className:"text-right",children:e.jsxs("div",{className:"flex justify-end gap-1",children:[g&&e.jsx(We,{variant:"ghost",size:"icon",title:"Open public page",onClick:()=>window.open(`/insights/newsletter/${j}`,"_blank"),children:e.jsx(kc,{className:"w-4 h-4"})}),e.jsx(We,{variant:"ghost",size:"icon",title:g?"Unpublish":"Publish",onClick:()=>y(S),children:g?e.jsx(zm,{className:"w-4 h-4"}):e.jsx(Wi,{className:"w-4 h-4"})}),e.jsx(We,{variant:"ghost",size:"icon",title:"Edit",onClick:()=>{O(S),ue(!0)},children:e.jsx(ac,{className:"w-4 h-4"})}),e.jsx(We,{variant:"ghost",size:"icon",title:"Delete",onClick:()=>C(S),children:e.jsx(ti,{className:"w-4 h-4 text-destructive"})})]})})]},S.id)})})]})})]}),e.jsx(Ey,{open:te,onOpenChange:ue,newsletter:w,onSaved:v})]})}const fm="https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net";function mm(r){if(!r)return"";const d=new Date(r);if(isNaN(d.getTime()))return"";const s=_=>String(_).padStart(2,"0");return`${d.getFullYear()}-${s(d.getMonth()+1)}-${s(d.getDate())}T${s(d.getHours())}:${s(d.getMinutes())}`}function pm(r){return r.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const _y=yu({title:hr().trim().min(1,"Title is required").max(300),slug:hr().trim().min(1,"Slug is required").max(200).regex(/^[a-z0-9-]+$/,"Lowercase letters, numbers and hyphens only"),excerpt:hr().max(800).optional(),content:hr().optional(),seo_title:hr().max(300).optional(),seo_de
380scription:hr().max(500).optional(),seo_keywords:hr().max(500).optional()});function Py({open:r,onOpenChange:d,post:s,onSaved:_}){const{toast:z}=Yn(),[te,ue]=ne.useState(!1),[w,O]=ne.useState(null),[t,f]=ne.useState(null),[v,m]=ne.useState(!1),[y,C]=ne.useState(!1),[S,g]=ne.useState(""),[j,A]=ne.useState({title:"",slug:"",excerpt:"",content:"",featured_image_url:"",attachment_url:"",seo_title:"",seo_description:"",seo_keywords:"",published:!1,published_at:"",updated_at:""});ne.useEffect(()=>{r&&(O(null),f(null),g(""),m(!1),C(!1),A(s?{title:s.title||"",slug:s.slug||"",excerpt:s.excerpt||"",content:s.content||"",featured_image_url:s.featured_image_url||"",attachment_url:s.attachment_url||"",seo_title:s.seo_title||"",seo_description:s.seo_description||"",seo_keywords:s.seo_keywords||"",published:!!s.published,published_at:mm(s.published_at),updated_at:mm(s.updated_at)}:{title:"",slug:"",excerpt:"",content:"",featured_image_url:"",attachment_url:"",seo_title:"",seo_description:"",seo_keywords:"",published:!1,published_at:"",updated_at:""}))},[r,s]);const I=Z=>{O(Z),m(!1);const oe=URL.createObjectURL(Z);g(oe)},M=()=>{O(null),g(""),m(!0),A(Z=>({...Z,featured_image_url:""}))},B=Z=>{f(Z),C(!1)},W=()=>{f(null),C(!0),A(Z=>({...Z,attachment_url:""}))},Y=Z=>{A(oe=>({...oe,title:Z,slug:s?oe.slug:pm(Z)}))},J=async()=>{const Z=_y.safeParse(j);if(!Z.success){z({title:"Validation error",description:Z.error.errors[0].message,variant:"destructive"});return}ue(!0);const oe=j.published_at?new Date(j.published_at).toISOString():j.published&&!(s!=null&&s.published_at)?new Date().toISOString():(s==null?void 0:s.published_at)??null,H=j.updated_at?new Date(j.updated_at).toISOString():new Date().toISOString();try{const fe=new FormData;fe.append("title",j.title.trim()),fe.append("slug",j.slug.trim()),j.excerpt&&fe.append("excerpt",j.excerpt),j.content&&fe.append("content",j.content),j.seo_title&&fe.append("seo_title",j.seo_title),j.seo_description&&fe.append("seo_de
380scription",j.seo_description),j.seo_keywords&&fe.append("seo_keywords",j.seo_keywords),fe.append("published",String(j.published)),oe&&fe.append("published_at",oe),fe.append("updated_at",H),v&&fe.append("remove_featured_image","true"),y&&fe.append("remove_attachment","true"),w&&fe.append("featured_image",w),t&&fe.append("attachment",t);const se=localStorage.getItem("authToken")||localStorage.getItem("access_token"),de={};if(se&&(de.Authorization=`Bearer ${se}`),s){const q=await fetch(`${fm}/admin/yuna-blog/${s.id}`,{method:"PUT",headers:de,body:fe});if(!q.ok){const U=await q.json().catch(()=>({detail:"Update failed"}));throw new Error(U.detail||"Update failed")}}else{const q=await fetch(`${fm}/admin/yuna-blog/`,{method:"POST",headers:de,body:fe});if(!q.ok){const U=await q.json().catch(()=>({detail:"Save failed"}));throw new Error(U.detail||"Save failed")}}z({title:s?"Article updated":"Article created",description:`"${j.title}" has been saved.`}),_(),d(!1)}catch(fe){z({title:"Save failed",description:fe.message||"An unexpected error occurred.",variant:"destructive"})}finally{ue(!1)}},le=S||j.featured_image_url,ae=(t==null?void 0:t.name)||(j.attachment_url?j.attachment_url.split("/").pop():"");return e.jsx(Un,{open:r,onOpenChange:d,children:e.jsxs(zn,{className:"max-w-3xl max-h-[90vh] overflow-y-auto",children:[e.jsx($n,{children:e.jsx(Vn,{children:s?"Edit Yunna Unfiltered Article":"Create Yunna Unfiltered Article"})}),e.jsxs("div",{className:"space-y-6 py-4",children:[e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(pt,{htmlFor:"title",children:"Title *"}),e.jsx(pr,{id:"title",value:j.title,onChange:Z=>Y(Z.target.value),placeholder:"e.g. Navigating AI Redlining in Corporate Practice"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(pt,{htmlFor:"slug",children:"Slug (URL identifier) *"}),e.jsx(pr,{id:"slug",value:j.slug,onChange:Z=>A(oe=>({...oe,slug:pm(Z.target.value)})),placeholder:"navigating-ai-redlining"}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Public URL: /yunna-unfiltered/",j.slug||"your-slug"]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(pt,{htmlFor:"excerpt",children:"Excerpt / Summary"}),e.jsx(Ma,{id:"excerpt",rows:2,value:j.excerpt,onChange:Z=>A(oe=>({...oe,excerpt:Z.target.value})),placeholder:"A short hook or summary for card previews..."})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(pt,{htmlFor:"content",children:"Content (HTML or plain text)"}),e.jsx(Ma,{id:"content",rows:8,value:j.content,onChange:Z=>A(oe=>({...oe,content:Z.target.value})),placeholder:"Write or paste your article content here (HTML formatting is supported)...",className:"font-mono text-xs leading-relaxed"})]})]}),e.jsxs("div",{className:"rounded-lg border border-border p-4 space-y-4 bg-muted/20",children:[e.jsx("h4",{className:"text-sm font-semibold",children:"Media & Attachments"}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(pt,{children:"Featured Image"}),le?e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"relative w-32 h-20 rounded-md overflow-hidden border border-border bg-background",children:e.jsx("img",{src:le,alt:"Preview",className:"w-full h-full object-cover"})}),e.jsxs(We,{type:"button",variant:"destructive",size:"sm",onClick:M,children:[e.jsx(fn,{className:"w-4 h-4 mr-1"})," Remove Image"]})]}):e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("label",{className:"cursor-pointer inline-flex items-center gap-2 px-3 py-2 border border-input rounded-md text-sm font-medium hover:bg-accent transition-colors",children:[e.jsx(Bo,{className:"w-4 h-4"}),e.jsx("span",{children:"Upload Image"}),e.jsx("input",{type:"file",accept:"image/*",className:"hidden",onChange:Z=>{var H;const oe=(H=Z.target.files)==null?void 0:H[0];oe&&I(oe)}})]}),e.jsx("span",{className:"text-xs text-muted-foreground",children:"PNG, JPG, WebP supported"})]})]}),e.jsxs("div",{className:"space-y-2 pt-2 border-t border-border/50",children:[e.jsx(pt,{children:"Attachment (PDF, Guide, Presentation)"}),ae?e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs(tr,{variant:"secondary",className:"px-3 py-1 text-xs",children:[e.jsx(Gm,{className:"w-3 h-3 mr-1.5"}),ae]}),e.jsx(We,{type:"button",variant:"ghost",size:"sm",onClick:W,children:e.jsx(fn,{className:"w-4 h-4"})})]}):e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("label",{className:"cursor-pointer inline-flex items-center gap-2 px-3 py-2 border border-input rounded-md text-sm font-medium hover:bg-accent transition-colors",children:[e.jsx(Bo,{className:"w-4 h-4"}),e.jsx("span",{children:"Upload Attachment"}),e.jsx("input",{type:"file",accept:".pdf,.doc,.docx,.xlsx,.ppt,.pptx",className:"hidden",onChange:Z=>{var H;const oe=(H=Z.target.files)==null?void 0:H[0];oe&&B(oe)}})]}),e.jsx("span",{className:"text-xs text-muted-foreground",children:"PDF or Office docs"})]})]})]}),e.jsxs("div",{className:"rounded-lg border border-border p-4 space-y-4 bg-muted/20",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(pt,{htmlFor:"published",children:"Publish Status"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Make article visible to the public on Yunna Unfiltered"})]}),e.jsx(Fi,{id:"published",checked:j.published,onCheckedChange:Z=>A(oe=>({...oe,published:Z}))})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(pt,{htmlFor:"published_at",children:"Publication Date / Time"}),e.jsx(pr,{id:"published_at",type:"datetime-local",value:j.published_at,onChange:Z=>A(oe=>({...oe,published_at:Z.target.value}))}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Leave blank when publishing to automatically use the current timestamp."})]})]}),e.jsxs("div",{className:"space-y-3 pt-2",children:[e.jsx("h4",{className:"text-sm font-semibold",children:"Search Engine Optimization (Optional)"}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx(pt,{htmlFor:"seo_title",className:"text-xs",children:"Meta Title"}),e.jsx(pr,{id:"seo_title",value:j.seo_title,onChange:Z=>A(oe=>({...oe,seo_title:Z.target.value})),placeholder:"Defaults to article title if empty"})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx(pt,{htmlFor:"seo_description",className:"text-xs",children:"Meta Description"}
380),e.jsx(Ma,{id:"seo_description",rows:2,value:j.seo_description,onChange:Z=>A(oe=>({...oe,seo_description:Z.target.value})),placeholder:"Defaults to excerpt if empty"})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx(pt,{htmlFor:"seo_keywords",className:"text-xs",children:"Keywords"}),e.jsx(pr,{id:"seo_keywords",value:j.seo_keywords,onChange:Z=>A(oe=>({...oe,seo_keywords:Z.target.value})),placeholder:"comma, separated, tags"})]})]})]})]}),e.jsxs(ka,{children:[e.jsx(We,{variant:"outline",onClick:()=>d(!1),disabled:te,children:"Cancel"}),e.jsxs(We,{onClick:J,disabled:te,children:[te&&e.jsx(Vs,{className:"w-4 h-4 mr-2 animate-spin"}),s?"Update Article":"Create Article"]})]})]})})}const mh="https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net";function Ty(){const{toast:r}=Yn(),[d,s]=ne.useState([]),[_,z]=ne.useState(!0),[te,ue]=ne.useState(!1),[w,O]=ne.useState(null),[t,f]=ne.useState(""),v=async()=>{z(!0);try{const A=localStorage.getItem("authToken")||localStorage.getItem("access_token"),I=await fetch(`${mh}/admin/yuna-blog/`,{headers:A?{Authorization:`Bearer ${A}`}:{}});if(I.ok){const M=await I.json();s(Array.isArray(M)?M:[])}else r({title:"Failed to load articles",description:"Could not fetch Yunna Unfiltered articles from the server.",variant:"destructive"}),s([])}catch(A){r({title:"Failed to load articles",description:A.message||"An error occurred while fetching data.",variant:"destructive"}),s([])}finally{z(!1)}};ne.useEffect(()=>{v()},[]);const m=ne.useMemo(()=>{const A=t.trim().toLowerCase();return A?d.filter(I=>(I.title||"").toLowerCase().includes(A)||(I.slug||"").toLowerCase().includes(A)||(I.excerpt||"").toLowerCase().includes(A)):d},[d,t]),y=async A=>{const I=!A.published,M={title:A.title,slug:A.slug,excerpt:A.excerpt??null,content:A.content??null,featured_image_url:A.featured_image_url??null,attachment_url:A.attachment_url??null,seo_title:A.seo_title??null,seo_description:A.seo_description??null,seo_keywords:A.seo_keywords??null,published:I,published_at:I?A.published_at??new Date().toISOString():A.published_at??null,updated_at:new Date().toISOString()};try{const B=localStorage.getItem("authToken")||localStorage.getItem("access_token"),W=await fetch(`${mh}/admin/yuna-blog/${A.id}`,{method:"PUT",headers:{"Content-Type":"application/json",...B?{Authorization:`Bearer ${B}`}:{}},body:JSON.stringify(M)});if(!W.ok){const Y=await W.json().catch(()=>({detail:"Failed to update status"}));throw new Error(Y.detail||"Failed to update status")}r({title:I?"Article published":"Article unpublished"}),v()}catch(B){r({title:"Update failed",description:B.message,variant:"destructive"})}},C=async A=>{if(confirm(`Delete "${A.title}"? This cannot be undone.`))try{const I=localStorage.getItem("authToken")||localStorage.getItem("access_token"),M=await fetch(`${mh}/admin/yuna-blog/${A.id}`,{method:"DELETE",headers:I?{Authorization:`Bearer ${I}`}:{}});if(!M.ok){const B=await M.json().catch(()=>({detail:"Failed to delete article"}));throw new Error(B.detail||"Failed to delete article")}r({title:"Article deleted"}),v()}catch(I){r({title:"Delete failed",description:I.message,variant:"destructive"})}},S=d.length,g=d.filter(A=>A.published).length,j=S-g;return e.jsx(ds,{children:e.jsxs(us,{className:"p-6",children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 mb-6",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl font-semibold",children:"Yunna Unfiltered"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Create, edit, publish and manage Yunna Unfiltered articles shown to the public."})]}),e.jsxs(We,{onClick:()=>{O(null),ue(!0)},children:[e.jsx(aa,{className:"w-4 h-4 mr-1.5"})," New article"]})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3 mb-6",children:[e.jsxs("div",{className:"rounded-lg border border-border/70 p-3 bg-card/50",children:[e.jsx("div",{className:"text-xs text-muted-foreground",children:"Total Articles"}),e.jsx("div",{className:"text-2xl font-bold mt-1",children:S})]}),e.jsxs("div",{className:"rounded-lg border border-border/70 p-3 bg-card/50",children:[e.jsx("div",{className:"text-xs text-muted-foreground",children:"Published"}),e.jsx("div",{className:"text-2xl font-bold mt-1 text-primary",children:g})]}),e.jsxs("div",{className:"rounded-lg border border-border/70 p-3 bg-card/50",children:[e.jsx("div",{className:"text-xs text-muted-foreground",children:"Drafts"}),e.jsx("div",{className:"text-2xl font-bold mt-1 text-muted-foreground",children:j})]})]}),e.jsxs("div",{className:"relative mb-4 max-w-sm",children:[e.jsx(bo,{className:"absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground"}),e.jsx(pr,{placeholder:"Search articles…",value:t,onChange:A=>f(A.target.value),className:"pl-8"})]}),e.jsx("div",{className:"rounded-md border border-border overflow-hidden",children:e.jsxs(Rn,{children:[e.jsx(Mn,{children:e.jsxs(Gr,{children:[e.jsx(Lt,{children:"Title"}),e.jsx(Lt,{children:"Slug"}),e.jsx(Lt,{children:"Status"}),e.jsx(Lt,{children:"Published Date"}),e.jsx(Lt,{className:"text-right",children:"Actions"})]})}),e.jsx(Fn,{children:_?e.jsx(Gr,{children:e.jsx(St,{colSpan:5,className:"text-center py-8 text-muted-foreground",children:"Loading articles..."})}):m.length===0?e.jsx(Gr,{children:e.jsx(St,{colSpan:5,className:"text-center py-8 text-muted-foreground",children:t?"No articles match your search.":"No articles yet. Create the first one above."})}):m.map(A=>e.jsxs(Gr,{children:[e.jsx(St,{className:"font-medium max-w-xs truncate",children:A.title}),e.jsx(St,{className:"text-xs text-muted-foreground font-mono",children:A.slug}),e.jsx(St,{children:A.published?e.jsx(tr,{variant:"default",className:"bg-emerald-600/90 hover:bg-emerald-600 text-white",children:"Published"}):e.jsx(tr,{variant:"secondary",children:"Draft"})}),e.jsx(St,{className:"text-xs text-muted-foreground",children:A.published_at?xh(A.published_at):"—"}),e.jsx(St,{className:"text-right",children:e.jsxs("div",{className:"flex items-center justify-end gap-1",children:[e.jsx(We,{variant:"ghost",size:"icon",title:A.published?"Unpublish article":"Publish article",onClick:()=>y(A),children:A.published?e.jsx(zm,{className:"w-4 h-4 text-muted-foreground hover:text-foreground"}):e.jsx(Wi,{className:"w-4 h-4 text-muted-foreground hover:text-foreground"})}),e.jsx(We,{variant:"ghost",size:"icon",title:"Edit article",onClick:()=>{O(A),ue(!0)},children:e.jsx(ac,{className:"w-4 h-4"})}),e.jsx(We,{variant:"ghost",size:"icon",title:"Preview on site",asChild:!0,children:e.jsx("a",{href:`/yunna-unfiltered/${A.slug}`,target:"_blank",rel:"noopener noreferrer",children:e.jsx(kc,{className:"w-4 h-4"})})}),e.jsx(We,{variant:"ghost",size:"icon",title:"Delete article",onClick:()=>C(A),className:"text-destructive hover:text-destructive",children:e.jsx(ti,{className:"w-4 h-4"})})]})})]},A.id))})]})}),e.jsx(Py,{open:te,onOpenChange:A=>{ue(A),A||O(null)},post:w,onSaved:v})]})})}const Pu="https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net",Tu=()=>{const r=localStorage.getItem("access_token")||localStorage.getItem("token")||sessionStorage.getItem("access_token")||sessionStorage.getItem("token"),d={"Content-Type":"application/json"};return r&&(d.Authorization=`Bearer ${r}`),d};async function Ly(r){const d=new URL(`${Pu}/admin/subscribers`,window.location.origin),s=await fetch(d.toString(),{method:"GET",headers:Tu()});if(s.status===401)throw new Error("401 Unauthorized: Session expired or invalid token. Please log in again.");if(s.status===403)throw new Error("403 Forbidden: Superadmin permissions required.");
380if(!s.ok){const _=await s.json().catch(()=>({}));throw new Error(_.detail||"Failed to fetch subscribers")}return s.json()}async function Oy(r){const d=await fetch(`${Pu}/admin/subscribers`,{method:"POST",headers:Tu(),body:JSON.stringify(r)});if(d.status===401)throw new Error("401 Unauthorized: Please log in again.");if(!d.ok){const s=await d.json().catch(()=>({}));throw new Error(s.detail||"Failed to create subscriber")}return d.json()}async function Iy(r,d){const s=await fetch(`${Pu}/admin/subscribers/${r}`,{method:"PUT",headers:Tu(),body:JSON.stringify(d)});if(s.status===401)throw new Error("401 Unauthorized: Please log in again.");if(!s.ok){const _=await s.json().catch(()=>({}));throw new Error(_.detail||"Failed to update subscriber")}return s.json()}async function Ry(r){const d=await fetch(`${Pu}/admin/subscribers/${r}`,{method:"DELETE",headers:Tu()});if(d.status===401)throw new Error("401 Unauthorized: Please log in again.");if(!d.ok){const s=await d.json().catch(()=>({}));throw new Error(s.detail||"Failed to delete subscriber")}}const gm={email:"",status:"active"};function My(){const{toast:r}=Yn(),[d,s]=ne.useState([]),[_,z]=ne.useState(!0),[te,ue]=ne.useState(""),[w,O]=ne.useState(!1),[t,f]=ne.useState(null),[v,m]=ne.useState(gm),[y,C]=ne.useState(!1),S=async()=>{z(!0);try{const W=await Ly();s(W)}catch(W){r({title:"Authentication / Request Error",description:W.message,variant:"destructive"})}finally{z(!1)}};ne.useEffect(()=>{S()},[]);const g=()=>{f(null),m(gm),O(!0)},j=W=>{f(W),m({email:W.email,status:W.status}),O(!0)},A=async()=>{if(!v.email.trim()){r({title:"Email is required",variant:"destructive"});return}if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(v.email.trim())){r({title:"Invalid email address",variant:"destructive"});return}C(!0);try{const Y={email:v.email.trim().toLowerCase(),status:v.status};t?(await Iy(t.id,Y),r({title:"Subscriber updated successfully"})):(await Oy(Y),r({title:"Subscriber created successfully"})),O(!1),await S()}catch(Y){r({title:"Error saving subscriber",description:Y.message,variant:"destructive"})}finally{C(!1)}},I=async W=>{if(confirm(`Delete subscriber "${W.email}"?`))try{await Ry(W.id),r({title:"Subscriber deleted successfully"}),S()}catch(Y){r({title:"Failed to delete subscriber",description:Y.message,variant:"destructive"})}},M=()=>{if(d.length===0){r({title:"No subscribers to export",variant:"destructive"});return}const W=["ID (UUID)","Email","Status","Subscribed At","Created By"],Y=d.map(Z=>[`"${Z.id}"`,`"${Z.email}"`,`"${Z.status}"`,`"${new Date(Z.subscribedAt).toLocaleString()}"`,`"${Z.createdBy||"System"}"`]),J="data:text/csv;charset=utf-8,"+[W.join(","),...Y.map(Z=>Z.join(","))].join(`
381`),le=encodeURI(J),ae=document.createElement("a");ae.setAttribute("href",le),ae.setAttribute("download",`subscribers_${new Date().toISOString().slice(0,10)}.csv`),document.body.appendChild(ae),ae.click(),document.body.removeChild(ae)},B=d.filter(W=>W.email.toLowerCase().includes(te.toLowerCase()));return e.jsxs(ds,{children:[e.jsxs(Rs,{className:"flex flex-row items-center justify-between gap-4 flex-wrap",children:[e.jsxs("div",{children:[e.jsxs(Ds,{className:"flex items-center gap-2",children:[e.jsx(vu,{className:"w-5 h-5 text-primary"})," Subscribers"]}
381),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Manage newsletter subscriptions, view creators, or export subscriber data."})]}),e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsxs(We,{variant:"outline",onClick:M,className:"gap-2",children:[e.jsx(jo,{className:"w-4 h-4"})," Export CSV"]}),e.jsxs(We,{onClick:g,className:"gap-2",children:[e.jsx(aa,{className:"w-4 h-4"})," Add Subscriber"]})]})]}),e.jsxs(us,{className:"space-y-4",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-3",children:[e.jsxs("div",{className:"relative w-full sm:w-72",children:[e.jsx(bo,{className:"w-4 h-4 absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"}),e.jsx(pr,{placeholder:"Search by email…",value:te,onChange:W=>ue(W.target.value),className:"pl-9"})]}),e.jsxs("div",{className:"text-xs text-muted-foreground self-end sm:self-center",children:["Total: ",e.jsx("span",{className:"font-semibold text-foreground",children:d.length})," | Active:"," ",e.jsx("span",{className:"font-semibold text-emerald-600",children:d.filter(W=>W.status==="active").length})]})]}),_?e.jsx("div",{className:"text-sm text-muted-foreground py-8 text-center",children:"Loading subscribers…"}):B.length===0?e.jsx("div",{className:"text-sm text-muted-foreground py-12 text-center border border-dashed rounded-lg",children:te?"No subscribers match your search.":"No subscribers found. Click Add Subscriber to create one."}):e.jsx("div",{className:"space-y-3",children:B.map(W=>e.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4 p-3 border border-border rounded-lg hover:border-primary/40 transition-colors",children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[e.jsx("div",{className:"w-10 h-10 rounded-full bg-primary/10 flex items-center justify-center text-primary shrink-0",children:e.jsx(gd,{className:"w-5 h-5"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h4",{className:"font-semibold truncate",children:W.email}),e.jsx("span",{className:`text-[10px] uppercase font-bold px-2 py-0.5 rounded-full ${W.status==="active"?"bg-emerald-100 text-emerald-700 dark:bg-emerald-950 dark:text-emerald-400":"bg-muted text-muted-foreground"}`,children:W.status})]}),e.jsxs("p",{className:"text-[11px] text-muted-foreground/70 mt-0.5",children:["Subscribed ",new Date(W.subscribedAt).toLocaleDateString(),W.createdBy?` • Created by ${W.createdBy}`:""]})]})]}),e.jsxs("div",{className:"flex items-center gap-2 self-end sm:self-center shrink-0",children:[e.jsx(We,{size:"icon",variant:"outline",onClick:()=>j(W),"aria-label":"Edit subscriber",children:e.jsx(ju,{className:"w-4 h-4"})}),e.jsx(We,{size:"icon",variant:"outline",onClick:()=>I(W),"aria-label":"Delete subscriber",className:"text-destructive hover:text-destructive",children:e.jsx(ti,{className:"w-4 h-4"})})]})]},W.id))})]}),e.jsx(Un,{open:w,onOpenChange:O,children:e.jsxs(zn,{children:[e.jsxs($n,{children:[e.jsx(Vn,{children:t?"Edit Subscriber":"Add Subscriber"}),e.jsx(ha,{children:t?"Update subscriber details.":"Add a new subscriber. Your admin account email will be saved as the creator."})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx(pt,{htmlFor:"sub-email",children:"Email Address *"}),e.jsx(pr,{id:"sub-email",type:"email",placeholder:"[email protected]",value:v.email,onChange:W=>m({...v,email:W.target.value})})]}),e.jsxs("div",{children:[e.jsx(pt,{htmlFor:"sub-status",children:"Status"}),e.jsxs(wo,{value:v.status,onValueChange:W=>m({...v,status:W}),children:[e.jsx(No,{id:"sub-status",children:e.jsx(So,{placeholder:"Select status"})}),e.jsxs(Co,{children:[e.jsx(Ys,{value:"active",children:"Active"}),e.jsx(Ys,{value:"unsubscribed",children:"Unsubscribed"})]})]})]})]}),e.jsxs(ka,{children:[e.jsx(We,{variant:"outline",onClick:()=>O(!1),disabled:y,children:"Cancel"}),e.jsx(We,{onClick:A,disabled:y,children:y?"Saving…":t?"Save changes":"Add subscriber"})]})]})})]})}const Fy="https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net",su=15;function ph(r){if(!r)return"-";const d=new Date(r);
381return isNaN(d.getTime())?"-":d.toLocaleString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"})}function vm({type:r}){const d=r||"GENERAL",s=d.toUpperCase();return s.includes("CERTIFICATE")?e.jsxs(tr,{className:"gap-1 border-emerald-500/30 bg-emerald-500/10 text-emerald-500 hover:bg-emerald-500/10",children:[e.jsx(jg,{className:"h-3 w-3"})," ",d]}):s.includes("PASSWORD")?e.jsxs(tr,{className:"gap-1 border-amber-500/30 bg-amber-500/10 text-amber-500 hover:bg-amber-500/10",children:[e.jsx(rv,{className:"h-3 w-3"})," ",d]}):s.includes("WALLET")||s.includes("COIN")?e.jsxs(tr,{className:"gap-1 border-yellow-500/30 bg-yellow-500/10 text-yellow-500 hover:bg-yellow-500/10",children:[e.jsx(Um,{className:"h-3 w-3"})," ",d]}):s.includes("SUBSCRIPTION")?e.jsxs(tr,{className:"gap-1 border-purple-500/30 bg-purple-500/10 text-purple-500 hover:bg-purple-500/10",children:[e.jsx(Dg,{className:"h-3 w-3"})," ",d]}):s.includes("DEMO_REQUEST")?e.jsxs(tr,{className:"gap-1 border-cyan-500/30 bg-cyan-500/10 text-cyan-500 hover:bg-cyan-500/10",children:[e.jsx(ev,{className:"h-3 w-3"})," ",d]}):s.includes("NEWSLETTER")?e.jsxs(tr,{className:"gap-1 border-blue-500/30 bg-blue-500/10 text-blue-500 hover:bg-blue-500/10",children:[e.jsx(vh,{className:"h-3 w-3"})," ",d]}):s.includes("REGISTER")||s.includes("WELCOME")||s.includes("VERIFY")||s.includes("OTP")?e.jsxs(tr,{className:"gap-1 border-primary/30 bg-primary/10 text-primary hover:bg-primary/10",children:[e.jsx(lv,{className:"h-3 w-3"})," ",d]}):e.jsxs(tr,{variant:"outline",className:"gap-1",children:[e.jsx(gd,{className:"h-3 w-3"})," ",d]})}function kp(){return localStorage.getItem("token")||localStorage.getItem("access_token")||localStorage.getItem("accessToken")}async function xm(r){const d=kp();if(!d)throw new Error("UNAUTHORIZED: No access token found. Please log in as Admin.");const s=r.includes("?")?"&":"?",_=r.startsWith("http")?`${r}${s}_t=${Date.now()}`:`${Fy}${r}${s}_t=${Date.now()}`,z=await fetch(_,{method:"GET",headers:{"Content-Type":"application/json","Cache-Control":"no-cache, no-store, must-revalidate",Pragma:"no-cache",Authorization:`Bearer ${d}`}});if(z.status===401||z.status===403)throw new Error("UNAUTHORIZED: You do not have superadmin privileges to access this resource.");const te=z.headers.get("content-type");if(!te||!te.includes("application/json"))throw new Error(`Server returned invalid format (Status: ${z.status}). Please verify backend endpoint.`);const ue=await z.json();if(!z.ok)throw new Error(ue.detail||`Request failed with status ${z.status}`);return ue}function Dy(){const{toast:r}=Yn(),[d,s]=ne.useState(null),[_,z]=ne.useState([]),[te,ue]=ne.useState(0),[w,O]=ne.useState(null),[t,f]=ne.useState(!0),[v,m]=ne.useState(!0),[y,C]=ne.useState(null),[S,g]=ne.useState(""),[j,A]=ne.useState("all"),[I,M]=ne.useState("all"),[B,W]=ne.useState(void 0),[Y,J]=ne.useState(1);ne.useEffect(()=>{kp()?s(!0):(s(!1),f(!1),m(!1))},[]);const le=async()=>{var U;if(d!==!1){m(!0);try{const ge=await xm("/api/admin/email/stats");O(ge),s(!0)}catch(ge){(U=ge==null?void 0:ge.message)!=null&&U.includes("UNAUTHORIZED")&&s(!1),r({title:"Failed to load statistics",description:(ge==null?void 0:ge.message)??"Please try again.",variant:"destructive"})}finally{m(!1)}}},ae=ne.useCallback(async()=>{var U;if(d!==!1){f(!0);try{const ge=new URLSearchParams({page:Y.toString(),limit:su.toString()});S.trim()&&ge.append("search",S.trim()),j!=="all"&&ge.append("email_type",j),I!=="all"&&ge.append("status",I),B!=null&&B.from&&ge.append("from_date",uo(B.from,"yyyy-MM-dd")),B!=null&&B.to&&ge.append("to_date",uo(B.to,"yyyy-MM-dd"));const Ee=await xm(`/api/admin/email/logs?${ge.toString()}`);z(Ee.data),ue(Ee.total_count),s(!0)}catch(ge){(U=ge==null?void 0:ge.message)!=null&&U.includes("UNAUTHORIZED")&&s(!1),r({title:"Failed to load email logs",description:(ge==null?void 0:ge.message)??"Please try again.",variant:"destructive"})}finally{f(!1)}}},[Y,S,j,I,B,r,d]);ne.useEffect(()=>{d&&le()},[d]),ne.useEffect(()=>{d&&ae()},[ae,d]);const Z=U=>{g(U),J(1)},oe=U=>{A(U),J(1)},H=U=>{M(U),J(1)},fe=U=>{W(U),J(1)},se=()=>{g(""),A("all"),M("all"),W(void 0),J(1)},de=()=>{le(),ae()},q=Math.max(1,Math.ceil(te/su));return d===!1?e.jsx(ds,{className:"border-red-500/20 bg-red-500/5",children:e.jsxs(us,{className:"flex flex-col items-center justify-center p-12 text-center space-y-4",children:[e.jsx("div",{className:"rounded-full bg-red-500/10 p-4 text-red-500",children:e.jsx(iu,{className:"h-10 w-10"})}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("h3",{className:"text-lg font-semibold text-foreground",children:"Admin Authorization Required"}),e.jsx("p",{className:"text-sm text-muted-foreground max-w-md",children:"You do not have administrative permissions to view system email logs. Please ensure you are logged in with an account that has superadmin privileges."})]}),e.jsxs(We,{variant:"outline",className:"gap-2 mt-2",onClick:()=>window.location.reload(),children:[e.jsx(Zg,{className:"h-4 w-4"})," Refresh Session"]})]})}):e.jsx(ds,{children:e.jsxs(us,{className:"p-6 space-y-6",children:[e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl font-semibold",children:"Email Activity L
381ogs"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Monitor, track, and troubleshoot system emails sent across the application."})]}),e.jsxs(We,{variant:"outline",size:"sm",onClick:de,disabled:t||v,className:"gap-2",children:[e.jsx(Ai,{className:`h-4 w-4 ${t||v?"animate-spin":""}`}),"Refresh Data"]})]}),e.jsx("div",{className:"grid grid-cols-2 gap-3 md:grid-cols-4",children:[{label:"Total Tracked",value:(w==null?void 0:w.total_emails)??"-",icon:gd},{label:"Sent Successfully",value:(w==null?void 0:w.sent_count)??"-",icon:Ll},{label:"Failed Deliveries",value:(w==null?void 0:w.failed_count)??"-",icon:jh},{label:"Pending Processing",value:(w==null?void 0:w.pending_count)??"-",icon:$i}].map(U=>e.jsxs("div",{className:"rounded-lg border bg-card/50 p-3 flex flex-col justify-between",children:[e.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground",children:[e.jsx("span",{children:U.label}),e.jsx(U.icon,{className:"h-4 w-4 text-muted-foreground/70"})]}),e.jsx("div",{className:"text-2xl font-semibold mt-2",children:v?"...":U.value})]},U.label))}),e.jsxs("div",{className:"grid gap-3 md:grid-cols-2 lg:grid-cols-6",children:[e.jsxs("div",{className:"relative lg:col-span-2",children:[e.jsx(bo,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),e.jsx(pr,{value:S,onChange:U=>Z(U.target.value),placeholder:"Search recipient email or subject...",className:"pl-9"})]}),e.jsxs(wo,{value:j,onValueChange:oe,children:[e.jsx(No,{children:e.jsx(So,{placeholder:"Email type"})}),e.jsxs(Co,{children:[e.jsx(Ys,{value:"all",children:"All Email Types"}),(w==null?void 0:w.by_type)&&Object.keys(w.by_type).map(U=>e.jsx(Ys,{value:U,children:U},U))]})]}),e.jsxs(wo,{value:I,onValueChange:H,children:[e.jsx(No,{children:e.jsx(So,{placeholder:"Status"})}),e.jsxs(Co,{children:[e.jsx(Ys,{value:"all",children:"All Statuses"}),e.jsx(Ys,{value:"SENT",children:"Sent"}),e.jsx(Ys,{value:"FAILED",children:"Failed"}),e.jsx(Ys,{value:"PENDING",children:"Pending"})]})]}),e.jsx("div",{className:"lg:col-span-2",children:e.jsxs(Ro,{children:[e.jsx(Mo,{asChild:!0,children:e.jsxs(We,{id:"date",variant:"outline",className:Ui("w-full justify-start text-left font-normal text-xs",!B&&"text-muted-foreground"),children:[e.jsx(ou,{className:"mr-2 h-4 w-4"}),B!=null&&B.from?B.to?e.jsxs(e.Fragment,{children:[uo(B.from,"LLL dd, yyyy")," -"," ",uo(B.to,"LLL dd, yyyy")]}):uo(B.from,"LLL dd, yyyy"):e.jsx("span",{children:"Pick a date range"})]})}),e.jsx(Fo,{className:"w-auto p-0",align:"end",children:e.jsx(gu,{initialFocus:!0,mode:"range",defaultMonth:B==null?void 0:B.from,selected:B,onSelect:fe,numberOfMonths:2})})]})})]}),(S||j!=="all"||I!=="all"||(B==null?void 0:B.from)||(B==null?void 0:B.to))&&e.jsx("div",{className:"flex justify-end",children:e.jsxs(We,{variant:"ghost",size:"sm",onClick:se,className:"gap-2",children:[e.jsx(fn,{className:"h-4 w-4"})," Clear filters"]})}),e.jsx("div",{className:"rounded-lg border",children:e.jsxs(Rn,{children:[e.jsx(Mn,{children:e.jsxs(Gr,{children:[e.jsx(Lt,{children:"Created At"}),e.jsx(Lt,{children:"Recipient"}),e.jsx(Lt,{children:"Type"}),e.jsx(Lt,{children:"Status"}),e.jsx(Lt,{children:"Subject / Error"}),e.jsx(Lt,{className:"text-right",children:"Action"})]})}),e.jsx(Fn,{children:t?e.jsx(Gr,{children:e.jsx(St,{colSpan:6,className:"py-10 text-center text-muted-foreground",children:"Fetching email logs..."})}):_.length===0?e.jsx(Gr,{children:e.jsx(St,{colSpan:6,className:"py-10 text-center text-muted-foreground",children:"No email logs match your active filters."})}):_.map(U=>e.jsxs(Gr,{className:"hover:bg-muted/50 cursor-pointer",onClick:()=>C(U),children:[e.jsx(St,{className:"whitespace-nowrap font-mono text-xs",children:ph(U.created_at)}),e.jsx(St,{className:"font-medium",children:U.recipient}),e.jsx(St,{children:e.jsx(vm,{type:U.email_type})}),e.jsx(St,{children:e.jsxs(tr,{className:U.status==="SENT"?"border-emerald-500/30 bg-emerald-500/10 text-emerald-500 hover:bg-emerald-500/10":U.status==="FAILED"?"border-destructive/30 bg-destructive/10 text-destructive hover:bg-destructive/10":"border-amber-500/30 bg-amber-500/10 text-amber-500 hover:bg-amber-500/10",children:[U.status==="SENT"&&"Sent",U.status==="FAILED"&&"Failed",U.status==="PENDING"&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx($i,{className:"h-3 w-3 animate-pulse"})," Pending"]})]})}),e.jsx(St,{className:"max-w-[280px] truncate text-sm text-muted-foreground",children:U.status==="FAILED"&&U.error_message?e.jsxs("span",{className:"text-destructive flex items-center gap-1",children:[e.jsx(jh,{className:"h-3 w-3 shrink-0"})," ",U.error_message]}):U.subject||"-"}),e.jsx(St,{className:"text-right",children:e.jsx(We,{variant:"ghost",size:"icon",onClick:ge=>{ge.stopPropagation(),C(U)},children:e.jsx(Wi,{className:"h-4 w-4 text-muted-foreground"})})})]},U.id))})]})}),te>0&&e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Showing ",(Y-1)*su+1,"-",Math.min(Y*su,te)," of"," ",te," logs"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(We,{variant:"outline",size:"sm",disabled:Y<=1||t,onClick:()=>J(U=>U-1),children:"Previous"}),e.jsxs("span",{className:"text-sm text-muted-foreground",children:["Page ",Y," of ",q]}),e.jsx(We,{variant:"outline",size:"sm",disabled:Y>=q||t,onClick:()=>J(U=>U+1),children:"Next"})]})]}),e.jsx(Un,{open:!!y,onOpenChange:U=>!U&&C(null),children:e.jsxs(zn,{className:"max-w-xl",children:[e.jsxs($n,{children:[e.jsxs(Vn,{className:"flex items-center gap-2",children:[e.jsx(gd,{className:"h-5 w-5 text-primary"})," Email Log Details #",y==null?void 0:y.id]}),e.jsx(ha,{children:"Full technical dispatch record for this email activity."})]}),y&&e.jsxs("div",{className:"space-y-4 text-sm mt-2",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-3 rounded-lg border bg-muted/30 p-3",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-xs text-muted-foreground block",children:"Recipient"}),e.jsx("span",{className:"font-medium break-all",children:y.recipient})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-xs text-muted-foreground block",children:"Email Type"}),e.jsx(vm,{type:y.email_type})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-xs text-muted-foreground block",children:"Created At"}),e.jsx("span",{className:"font-mono text-xs",children:ph(y.created_at)})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-xs text-muted-foreground block",children:"Sent At"}),e.jsx("span",{className:"font-mono text-xs",children:ph(y.sent_at)})]})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-xs text-muted-foreground block mb-1",children:"Subject"}),e.jsx("div",{className:"p-2.5 rounded-md border bg-background font-medium",children:y.subject||"(No Subject)"})]}),y.status==="FAILED"&&y.error_message&&e.jsxs("div",{children:[e.jsx("span",{className:"text-xs text-destructive font-medium block mb-1",children:"Failure Error Stack Trace"}),e.jsx("pre",{className:"p-3 rounded-md border border-destructive/20 bg-destructive/10 text-destructive text-xs font-mono overflow-x-auto whitespace-pre-wrap",children:y.error_message})]})]})]})})]})})}const Td="https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net";function Lu(){const r=localStorage.getItem("authToken")||localStorage.getItem("access_token");return r?{Authorization:`Bearer ${r}`}:{}}async function By(r,d){const s=new FormData;s.append("file",r),d&&d.trim()&&s.append("resource_link",d.trim());const _=await fetch(`${Td}/admin/data_injection/upload`,{method:"POST",headers:{accept:"application/json",...Lu()},body:s});if(!_.ok){const z=await _.text().catch(()=>"");throw new Error(z||`Upload failed (${_.status})`)}return await _.json()}async function Uy(r={}){const d=r.limit??10,s=r.offset??0,_=await fetch(`${Td}/admin/data_injection/documents?limit=${d}&offset=${s}`,{headers:{accept:"application/json",...Lu()}});if(!_.ok)throw new Error(`Failed to load documents (${_.status})`);const z=await _.json();return{total:Number((z==null?void 0:z.total)??0),limit:Number((z==null?void 0:z.limit)??d),offset:Number((z==null?void 0:z.offset)??s),documents:Array.isArray(z==null?void 0:z.documents)?z.documents:[]}}function zy(r){return`${Td}/admin/data_injection/documents/${r}/download`}async function $y(r,d={}){const s=new FormData;d.file&&s.append("file",d.file),d.resourceLink&&d.resourceLink.trim()&&s.append("resource_link",d.resourceLink.trim());const _=await fetch(`${Td}/admin/data_injection/documents/${r}`,{method:"PUT",headers:{accept:"application/json",...Lu()},body:s});if(!_.ok){const z=await _.text().catch(()=>"");throw new Error(z||`Update failed (${_.status})`)}return await _.json()}async function Vy(r){const d=await fetch(`${Td}/admin/data_injection/documents/${r}`,{method:"DELETE",headers:{accept:"application/json",...Lu()}});if(!d.ok){const s=await d.text().catch(()=>"");throw new Error(s||`Delete failed (${d.status})`)}}function Wy(r){return r.name.toLowerCase().endsWith(".docx")||r.type==="application/vnd.openxmlformats-officedocument.wordprocessingml.document"}const hd=10;function Hy(r){return!r&&r!==0?"-":r<1024?`${r} B`:r<1024*1024?`${(r/1024).toFixed(1)} KB`:`${(r/(1024*1024)).toFixed(1)} MB`}function ym(r){if(!r)return"-";const d=new Date(r);
381return isNaN(d.getTime())?"-":d.toLocaleString("en-GB",{day:"2-digit",month:"short",year:"numeric",hour:"2-digit",minute:"2-digit"})}function Gy({doc:r}){const d=(r.status||"").toLowerCase();return d==="processing"||d==="pending"||d==="queued"?e.jsxs(tr,{variant:"outline",className:"gap-1 border-primary/50 text-primary",children:[e.jsx(Vs,{className:"w-3 h-3 animate-spin"}),"Processing"]}):d==="failed"||d==="error"?e.jsx(tr,{variant:"destructive",title:r.error_message??void 0,children:"Failed"}):e.jsx(tr,{variant:"outline",className:"border-primary/50 text-primary",children:d?d.charAt(0).toUpperCase()+d.slice(1):"Unknown"})}const Yy=()=>{const{toast:r}=Yn(),[d,s]=ne.useState([]),[_,z]=ne.useState(!1),[te,ue]=ne.useState(""),[w,O]=ne.useState(1),[t,f]=ne.useState(null),[v,m]=ne.useState(""),[y,C]=ne.useState(!1),S=ne.useRef(null),[g,j]=ne.useState(null),[A,I]=ne.useState(null),[M,B]=ne.useState(""),[W,Y]=ne.useState(!1),[J,le]=ne.useState(null),[ae,Z]=ne.useState(!1),[oe,H]=ne.useState(0),fe=ne.useCallback(async(Se=w,Le=!1)=>{Le||z(!0);try{const st=await Uy({limit:hd,offset:(Se-1)*hd});s(st.documents),H(st.total)}catch(st){Le||r({title:"Failed to load documents",description:st instanceof Error?st.message:"Please try again.",variant:"destructive"})}finally{Le||z(!1)}},[w,r]);ne.useEffect(()=>{fe(w)},[w]),ne.useEffect(()=>{if(!d.some(st=>["processing","pending","queued"].includes((st.status||"").toLowerCase())))return;const Le=setInterval(()=>fe(w,!0),5e3);return()=>clearInterval(Le)},[d,fe,w]);const se=ne.useMemo(()=>{const Se=te.trim().toLowerCase();return Se?d.filter(Le=>{var st;return((st=Le.filename)==null?void 0:st.toLowerCase().includes(Se))||(Le.resource_link||"").toLowerCase().includes(Se)}):d},[d,te]),de=Math.max(1,Math.ceil(oe/hd)),q=Math.min(w,de),U=se,ge=Se=>{const Le=zy(Se.doc_id)||Se.blob_link||"";window.open(Le,"_blank","noopener,noreferrer")},Ee=(Se,Le)=>{if(!Se){Le(null);return}if(!Wy(Se)){r({title:"Unsupported file",description:"Only .docx files can be added to the knowledge base.",variant:"destructive"});return}Le(Se)},Xe=async()=>{if(!t){r({title:"Select a file",description:"Please choose a .docx file to upload.",variant:"destructive"});return}C(!0);try{const Se=await By(t,v.trim());O(1),await fe(1,!0),f(null),m(""),S.current&&(S.current.value=""),r({title:"Document uploaded",description:`${Se.filename} is being processed.`})}catch(Se){r({title:"Upload failed",description:Se instanceof Error?Se.message:"Please try again.",variant:"destructive"})}finally{C(!1)}},re=Se=>{j(Se),I(null),B(Se.resource_link||"")},Pe=async()=>{if(g){Y(!0);try{const Se=await $y(g.doc_id,{file:A,resourceLink:M.trim()});await fe(q,!0),j(null),I(null);const Le=Se.filename||g.filename;r({title:"Document updated",description:A?`${Le} is being processed.`:Se.message||"Resource link updated."})}catch(Se){r({title:"Update failed",description:Se instanceof Error?Se.message:"Please try again.",variant:"destructive"})}finally{Y(!1)}}},ye=async()=>{if(J){Z(!0);try{await Vy(J.doc_id),await fe(q,!0),r({title:"Document deleted"}),le(null)}catch(Se){r({title:"Delete failed",description:Se instanceof Error?Se.message:"Please try again.",variant:"destructive"})}finally{Z(!1)}}};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs(ds,{children:[e.jsx(Rs,{children:e.jsxs(Ds,{className:"flex items-center gap-2 text-lg",children:[e.jsx(Bo,{className:"w-5 h-5 text-primary"}),"Add content to knowledge base"]})}),e.jsxs(us,{className:"space-y-4",children:[e.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[e.jsxs("div",{className:"space-y-2 min-w-0",children:[e.jsx(pt,{htmlFor:"kb-file",children:"Document (.docx only)"}),e.jsx(pr,{id:"kb-file",ref:S,type:"file",accept:".docx,application/vnd.openxmlformats-officedocument.wordprocessingml.document",onChange:Se=>{var Le;return Ee(((Le=Se.target.files)==null?void 0:Le[0])||null,f)}}),t&&e.jsxs("p",{className:"text-xs text-muted-foreground break-all",children:["Selected: ",t.name]})]}),e.jsxs("div",{className:"space-y-2 min-w-0",children:[e.jsx(pt,{htmlFor:"kb-link",children:"Resource link (optional)"}),e.jsx(pr,{id:"kb-link",placeholder:"https://golt.ai/resource",value:v,onCh
381ange:Se=>m(Se.target.value)})]})]}),e.jsx("div",{className:"flex justify-end",children:e.jsxs(We,{onClick:Xe,disabled:y,className:"gap-2",children:[y?e.jsx(Vs,{className:"w-4 h-4 animate-spin"}):e.jsx(Bo,{className:"w-4 h-4"}),"Upload document"]})})]})]}),e.jsxs(ds,{children:[e.jsxs(Rs,{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs(Ds,{className:"flex items-center gap-2 text-lg",children:[e.jsx(Bi,{className:"w-5 h-5 text-primary"}),"Knowledge base documents"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("div",{className:"relative",children:[e.jsx(bo,{className:"absolute left-2 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),e.jsx(pr,{value:te,onChange:Se=>{ue(Se.target.value),O(1)},placeholder:"Search filename or link",className:"pl-8 w-full sm:w-64"})]}),e.jsx(We,{variant:"outline",size:"icon",onClick:()=>fe(q),disabled:_,"aria-label":"Refresh",children:e.jsx(Ai,{className:`w-4 h-4 ${_?"animate-spin":""}`})})]})]}),e.jsxs(us,{children:[e.jsx("div",{className:"overflow-x-auto",children:e.jsxs(Rn,{children:[e.jsx(Mn,{children:e.jsxs(Gr,{children:[e.jsx(Lt,{children:"Filename"}),e.jsx(Lt,{children:"Resource link"}),e.jsx(Lt,{children:"Type"}),e.jsx(Lt,{className:"text-right",children:"Size"}),e.jsx(Lt,{children:"Status"}),e.jsx(Lt,{className:"text-right",children:"Chunks"}),e.jsx(Lt,{children:"Created"}),e.jsx(Lt,{children:"Updated"}),e.jsx(Lt,{className:"text-right",children:"Actions"})]})}),e.jsx(Fn,{children:U.length===0?e.jsx(Gr,{children:e.jsx(St,{colSpan:9,className:"text-center text-muted-foreground py-10",children:_?"Loading documents...":"No documents yet."})}):U.map(Se=>e.jsxs(Gr,{children:[e.jsxs(St,{className:"font-medium break-all max-w-[220px]",children:[Se.filename,Se.error_message&&e.jsx("p",{className:"text-xs text-destructive mt-1 break-words",children:Se.error_message})]}),e.jsx(St,{className:"break-all max-w-[200px] text-muted-foreground",children:Se.resource_link||"-"}),e.jsx(St,{className:"whitespace-nowrap text-muted-foreground",children:Se.file_type||"-"}),e.jsx(St,{className:"text-right whitespace-nowrap text-muted-foreground",children:Hy(Se.file_size_bytes)}),e.jsx(St,{children:e.jsx(Gy,{doc:Se})}),e.jsx(St,{className:"text-right",children:Se.chunks_indexed??0}),e.jsx(St,{className:"whitespace-nowrap text-muted-foreground",children:ym(Se.created_at)}),e.jsx(St,{className:"whitespace-nowrap text-muted-foreground",children:ym(Se.updated_at)}),e.jsx(St,{children:e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx(We,{variant:"outline",size:"icon",onClick:()=>ge(Se),"aria-label":"Download document",children:e.jsx(jo,{className:"w-4 h-4"})}),e.jsx(We,{variant:"outline",size:"icon",onClick:()=>re(Se),"aria-label":"Edit document",children:e.jsx(ju,{className:"w-4 h-4"})}),e.jsx(We,{variant:"outline",size:"icon",onClick:()=>le(Se),"aria-label":"Delete document",children:e.jsx(ti,{className:"w-4 h-4 text-destructive"})})]})})]},Se.doc_id))})]})}),oe>0&&e.jsxs("div",{className:"flex items-center justify-between mt-4 gap-2 flex-wrap",children:[e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Showing ",(q-1)*hd+1,"-",Math.min(q*hd,oe)," of ",oe]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(We,{variant:"outline",size:"sm",disabled:q<=1,onClick:()=>O(Se=>Math.max(1,Se-1)),children:[e.jsx(Lh,{className:"w-4 h-4"}),"Previous"]}),e.jsxs("span",{className:"text-sm text-muted-foreground",children:["Page ",q," of ",de]}),e.jsxs(We,{variant:"outline",size:"sm",disabled:q>=de,onClick:()=>O(Se=>Math.min(de,Se+1)),children:["Next",e.jsx(ei,{className:"w-4 h-4"})]})]})]})]})]}),e.jsx(Un,{open:!!g,onOpenChange:Se=>!Se&&j(null),children:e.jsxs(zn,{className:"max-w-lg",children:[e.jsxs($n,{children:[e.jsx(Vn,{children:"Update document"}),e.jsxs(ha,{children:["Update ",e.jsx("span",{className:"font-medium",children:g==null?void 0:g.filename}),". Choose a new .docx file to replace it, change the resource link, or both."]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(pt,{htmlFor:"kb-edit-file",children:"New document (.docx, optional)"}),e.jsx(pr,{id:"kb-edit-file",type:"file",accept:".docx,application/vnd.openxmlformats-officedocument.wordprocessingml.document",onChange:Se=>{var Le;return Ee(((Le=Se.target.files)==null?void 0:Le[0])||null,I)}}),!A&&g&&e.jsxs("p",{className:"text-xs text-muted-foreground break-all",children:["Keeping current file: ",g.filename]}),A&&e.jsxs("p",{className:"text-xs text-muted-foreground break-all",children:["Selected: ",A.name]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(pt,{htmlFor:"kb-edit-link",children:"Resource link (optional)"}),e.jsx(pr,{id:"kb-edit-link",value:M,onChange:Se=>B(Se.target.value)})]})]}),e.jsxs(ka,{children:[e.jsx(We,{variant:"outline",onClick:()=>j(null),children:"Cancel"}),e.jsxs(We,{onClick:Pe,disabled:W,className:"gap-2",children:[W&&e.jsx(Vs,{className:"w-4 h-4 animate-spin"}),"Save changes"]})]})]})}),e.jsx(vd,{open:!!J,onOpenChange:Se=>!Se&&le(null),children:e.jsxs(xd,{children:[e.jsxs(yd,{children:[e.jsx(jd,{children:"Delete document?"}),e.jsxs(bd,{children:[J==null?void 0:J.filename," will be removed from the knowledge base. This cannot be undone."]})]}),e.jsxs(wd,{children:[e.jsx(Nd,{disabled:ae,children:"Cancel"}),e.jsx(Sd,{onClick:ye,disabled:ae,children:ae?"Deleting...":"Delete"})]})]})})]})};function qj(){var wn;const{t:r}=bg("dashboard"),d=wg(),{toast:s}=Yn(),{logout:_}=Ng(),[z,te]=ne.useState("overview"),[ue,w]=ne.useState(!1);ne.useEffect(()=>{(z==="bulk-product-upload"||z==="bulk-logo-update"||z==="bulk-company-update"||z==="upload-products")&&w(!0)},[z]);const[O,t]=ne.useState(!1),[f,v]=ne.useState(!1),[m,y]=ne.useState(!1),[C,S]=ne.useState(null),[g,j]=ne.useState(null),[A,I]=ne.useState(""),[M,B]=ne.useState(null),[W,Y]=ne.useState(!1),[J,le]=ne.useState(null),[ae,Z]=ne.useState(!1),[oe,H]=ne.useState(0),fe=10,[se,de]=ne.useState(1),q=10,[U,ge]=ne.useState(1),[Ee,Xe]=ne.useState(10),[re,Pe]=ne.useState(1),[ye,Se]=ne.useState(0),[Le,st]=ne.useState(0),[Ke,rt]=ne.useState(1),[xt,He]=ne.useState(!1),[Tt,Kt]=ne.useState(!0),Jt="https://goltaiqa.blob.core.windows.net/prodgoltai",[rr,Ht]=ne.useState([]),[yr,gr]=ne.useState([]),[Vr,jr]=ne.useState([]),[Xr,et]=ne.useState([]),[ft,je]=ne.useState([]),$e=async()=>
381{if(xt)return;const zt=(se-1)*fe;He(!0);try{const Mr=localStorage.getItem("authToken"),Rr=await fetch(`https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net/admin/request/?limit=${fe}&offset=${zt}`,{headers:{Authorization:`Bearer ${Mr}`,"Content-Type":"application/json"}});if(Rr.status===401){s({title:"Session expired",description:"Please log in again.",variant:"destructive"}),An(),window.location.href="/login";return}const ws=await Rr.json();if(!ws.success){He(!1);return}const is=ws.data;st(ws.total),rt(Math.ceil(ws.total/q));const ea=[],Ts=[],Za=[];is.forEach(qs=>{const $a={id:qs.id,productId:qs.productId,productName:qs.productName,companyId:qs.companyId,companyName:qs.companyName,vendorId:qs.vendorId,status:qs.status,submittedAt:qs.submittedAt,requestType:qs.requestType,vendorName:qs.vendorName,vendorEmail:qs.vendorEmail,isLoaded:!1,details:null};qs.requestType==="add"?ea.push($a):qs.requestType==="edit"?Ts.push($a):qs.requestType==="own"&&Za.push($a)}),jr(ea),et(Ts),je(Za)}catch(Mr){console.error("Error loading requests:",Mr)}He(!1)};ne.useEffect(()=>{$e()},[se]);const ht=async zt=>{try{const Mr=localStorage.getItem("access_token"),Rr=await fetch(`https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net/admin/request/requests/${zt}`,{headers:{Authorization:`Bearer ${Mr}`,"Content-Type":"application/json"}});if(Rr.status===401)return An(),window.location.href="/login",null;const ws=await Rr.json();return ws.success?ws.data:null}catch(Mr){return console.error("Detail fetch failed:",Mr),null}},[tt,Ze]=ne.useState([]),[Ft]=ne.useState([]),[lt]=ne.useState([]),[_t,dr]=ne.useState([]),fr={registration:Ol,product_add:sv,product_edit:nv,product_own:Ol,company_add:Ol},It=async()=>{try{const zt=localStorage.getItem("authToken"),Mr=await fetch("https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net/admin/users/notifications",{headers:{Authorization:`Bearer ${zt}`,"Content-Type":"application/json"}});if(Mr.status===401){s({title:"Session expired",description:"Please log in again.",variant:"destructive"}),An(),window.location.href="/login";return}const ws=(await Mr.json()).map(is=>({id:is.id,title:is.title,type:is.type,message:is.message,timestamp:new Date(is.created_at).toLocaleString("en-GB",{year:"numeric",month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZone:"UTC"})+" UTC",read:is.is_read,icon:fr[is.type]||Sc}));dr(ws)}catch(zt){console.error("Failed to fetch notifications:",zt)}};ne.useEffect(()=>{It()},[]);const nr={totalProducts:156,activeProducts:142,pendingApprovals:8,totalUsers:1245,totalCompanies:45,totalAdmins:2},Cr=()=>{_(),s({title:"Logged Out",description:"You have been logged out successfully"}),d("/login")},Wt=async zt=>{const Mr=localStorage.getItem("authToken")||localStorage.getItem("access_token");if(!Mr){s({title:"Unauthorized",description:"Token missing. Please log in again.",variant:"destructive"});return}if(confirm("Are you sure you want to delete this product?"))try{const Rr=await fetch(`https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net/admin/delete_product/delete/${zt}`,{method:"DELETE",headers:{Authorization:`Bearer ${Mr}`,"Content-Type":"application/json"}});if(Rr.status===401){s({title:"Session expired",description:"Please log in again.",variant:"destructive"}),An(),window.location.href="/login";return}if(!Rr.ok){const ws=await Rr.json();throw new Error(ws.detail||"Failed to delete product")}s({title:"Product deleted",description:"Product has been deleted successfully."}),lr(U)}catch(Rr){s({title:"Error deleting product",description:Rr.message,variant:"destructive"})}},Ir=async zt=>{const Mr=localStorage.getItem("authToken")||localStorage.getItem("access_token");if(!Mr){s({title:"Unauthorized",description:"Token missing. Please log in again.",variant:"destructive"});return}if(confirm("Are you sure you want to activate this product?"))try{const Rr=await fetch(`https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net/admin/activate_product/activate/${zt}`,{method:"PUT",headers:{Authorization:`Bearer ${Mr}`,"Content-Type":"application/json"}});if(Rr.status===401){s({title:"Session expired",description:"Please log in again.",variant:"destructive"}),An(),window.location.href="/login";return}if(!Rr.ok){const ws=await Rr.json();throw new Error(ws.detail||"Failed to activate product")}s({title:"Product activated",description:"Product has been activated successfully."}),lr(U)}catch(Rr){s({title:"Error activating product",description:Rr.message,variant:"destructive"})}},Yt=async zt=>{if(B(zt),Y(!0),zt.isLoaded)return;const Mr=await ht(zt.id);Mr&&(je(Rr=>Rr.map(ws=>ws.id===zt.id?{...ws,...Mr,isLoaded:!0}:ws)),B(Rr=>({...Rr,...Mr,isLoaded:!0})))},zr=zt=>{le(zt),Z(!0)},Ye=(zt,Mr)=>{Ze(tt.map(Rr=>Rr.id===zt?{...Rr,status:"approved",reviewedAt:new Date().toISOString().split("T")[0],reviewNote:Mr}:Rr)),s({title:"Validation Approved",description:"Request has been approved and company notified"}),Z(!1),le(null)},Vt=(zt,Mr)=>{Ze(tt.map(Rr=>Rr.id===zt?{...Rr,status:"rejected",reviewedAt:new Date().toISOString().split("T")[0],reviewNote:Mr}:Rr)),s({title:"Validation Rejected",description:"Request has been rejected and company notified"}),Z(!1),le(null)},lr=async(zt=1,Mr=10)=>{try{const Rr=localStorage.getItem("access_token"),ws=await fetch(`https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net/admin/product_admin/products/?page=${zt}&page_size=${Mr}`,{headers:{"Content-Type":"application/json",Authorization:`Bearer ${Rr}`}});if(ws.status===401){s({title:"Session expired",description:"Please log in again.",variant:"destructive"}),An(),window.location.href="/login";return}if(!ws.ok)throw new Error("Failed to fetch products");const is=await ws.json();Ht(is.items),Pe(is.total_pages),ge(is.page),Se(is.total)}catch(Rr){console.error("Error fetching products:",Rr)}};ne.useEffect(()=>{lr(U,Ee)},[U,Ee]);const xr=7;let Pr=Math.max(1,U-Math.floor(xr/2)),Ur=Math.min(re,Pr+xr-1);Ur-Pr+1<xr&&(Pr=Math.max(1,Ur-xr+1));const yn=[];for(let zt=Pr;zt<=Ur;zt++)yn.push(zt);const vt=async zt=>{try{const Mr=localStorage.getItem("access_token"),Rr=await fetch(`https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net/admin/product_admin/products/products/search?search=${encodeURIComponent(zt)}`,{headers:{Authorization:`Bearer ${Mr}`}});if(Rr.status===401){s({title:"Session expired",description:"Please log in again.",variant:"destructive"}),An(),window.location.href="/login";return}const ws=await Rr.json();Ht(Array.isArray(ws.data)?ws.data:[])}catch(Mr){console.error("Search failed:",Mr),Ht([])}};function Lr(zt){const Mr=(zt??"").toLowerCase().trim();return Mr==="free trial"||Mr==="free-trial"?"free-trial":Mr==="paid poc"||Mr==="paid-poc"?"paid-poc":Mr}function Er(zt){return{companyName:zt.companyName??"",companyAddress:zt.companyAddress??"",headquarterCountry:zt.headquarterCountry??"",companyId:zt.companyId??"",productName:zt.productName??"",productVersion:zt.productVersion??"",yearFounded:zt.yearFounded??"",website:zt.website??"",description:zt.description??"",use_case:zt.use_case??"",CompanyWebsite:zt.CompanyWebsite??"",categories:zt.categories,capabilities:zt.capabilities,functionalFocus:zt.functionalFocus,languages:zt.languages,countriesServed:zt.countriesServed,technologyUsed:zt.technologyUsed??"",industriesServed:zt.industriesServed??"",customers:zt.customers??"",engineAndDataModels:zt.engineAndDataModels??"",databaseIntegration:zt.databaseIntegration??"",integratesWith:zt.integrations??"",sso:zt.sso??"",addinFunctionality:zt.addinFunctionality??"",aiCapabilities:zt.aiCapabilities??"",automationCapabilities:zt.automationCapabilities??"",developmentLifecycle:zt.developmentLifecycle??"",userReception:zt.userReception??"",priceRange:zt.priceRange??"",pricingModelsLicensing:zt.pricingModelsLicensing??"",additionalImplementationCost:(zt.additionalImplementationCost??"").toLowerCase(),additionalSupp
381ortCost:zt.additionalSupportCost??"",freeTrialOrPaidPoc:Lr(zt.freeTrialOrPaidPoc),itDeploymentModels:zt.itDeploymentModels??"",gdprCompliant:zt.gdprCompliant??"",thirdPartyProvidersOutsideEea:zt.thirdPartyProvidersOutsideEea??"",hostingLocation:zt.hostingLocation??"",securityCertifications:zt.securityCertifications??"",requestDemoButton:zt.requestDemoButton?"yes":"no",idealNumberOfUsers:zt.idealNumberOfUsers??"",geographicalScope:zt.geographicalScope??"",strategicPartners:zt.strategicPartners??"",additionalNotes:zt.additionalNotes??"",domain:zt.domain??"",additionalCategories:zt.additionalCategories??"",otherIntegrations:zt.otherIntegrations??"",openDataFormat:zt.openDataFormat??"",logo:zt.ImageUrl?`${Jt}/${zt.ImageUrl}`:"",companyEmail:zt.companyEmail??"",companyPhone:zt.companyPhone??"",competitorModels:zt.CompetitorModels??""}}async function or(zt){try{const Mr=localStorage.getItem("access_token"),Rr=await fetch(`https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net/admin/product_admin/products/${zt}`,{headers:{Authorization:`Bearer ${Mr}`}});if(Rr.status===401){s({title:"Session expired",description:"Please log in again.",variant:"destructive"}),An(),window.location.href="/login";return}if(Rr.status===403){s({title:"Product deactivated",description:"This product is deactivated and cannot be edited.",variant:"destructive"});return}if(!Rr.ok)throw new Error("Failed to fetch product");const ws=await Rr.json(),is=Er(ws);j(ws.id),S(is),y(!0)}catch{s({title:"Error",description:"Unable to load product details",variant:"destructive"})}}ne.useEffect(()=>{const zt=setTimeout(()=>{A.trim()&&vt(A)},400);return()=>clearTimeout(zt)},[A]);const as=5,Ws=Math.floor(as/2);let Ms=Math.max(1,se-Ws),mn=Ms+as-1;return mn>Ke&&(mn=Ke,Ms=Math.max(1,mn-as+1)),e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx("header",{className:"border-b bg-card",children:e.jsx("div",{className:"container mx-auto px-4 py-4",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs(We,{variant:"ghost",size:"sm",onClick:()=>d("/"),className:"gap-2",children:[e.jsx(Jg,{className:"w-4 h-4"}),r("admin.home")]}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold",children:r("admin.title")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:r("admin.subtitle")})]})]}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs(tr,{variant:"outline",className:"gap-2",children:[e.jsx(Bm,{className:"w-4 h-4"}),r("admin.superAdmin")]}),e.jsxs(Ro,{children:[e.jsx(Mo,{asChild:!0,children:e.jsxs(We,{variant:"ghost",size:"icon",className:"relative",title:r("common.notifications"),children:[e.jsx(Sc,{className:"w-4 h-4"}),_t.filter(zt=>!zt.read).length>0&&e.jsx("span",{className:"absolute -top-1 -right-1 w-5 h-5 bg-destructive text-destructive-foreground text-xs rounded-full flex items-center justify-center",children:_t.filter(zt=>!zt.read).length})]})}),e.jsxs(Fo,{className:"w-80 p-0",align:"end",children:[e.jsxs("div",{className:"border-b px-4 py-3",children:[e.jsx("h4",{className:"font-semibold text-sm",children:r("common.notifications")}),e.jsx("p",{className:"text-xs text-muted-foreground",children:r("common.unreadCount",{count:_t.filter(zt=>!zt.read).length})})]}),e.jsx(Ec,{className:"h-[400px]",children:e.jsx("div",{className:"p-2",children:_t.length===0?e.jsx("div",{className:"text-center py-8 text-muted-foreground text-sm",children:r("common.noNotifications")}):_t.map(zt=>{const Mr=zt.icon;return e.jsx("div",{className:`p-3 rounded-lg mb-2 cursor-pointer hover:bg-accent transition-colors ${zt.read?"":"bg-accent/50"}`,onClick:()=>{dr(_t.map(Rr=>Rr.id===zt.id?{...Rr,read:!0}:Rr))},children:e.jsxs("div",{className:"flex gap-3",children:[e.jsx("div",{className:`p-2 rounded-full h-fit ${zt.read?"bg-muted":"bg-primary/10"}`,children:e.jsx(Mr,{className:`w-4 h-4 ${zt.read?"text-muted-foreground":"text-primary"}`})}),e.jsxs("div",{className:"flex-1 space-y-1",children:[e.jsx("p",{className:"text-sm leading-tight",children:zt.message}),e.jsx("p",{className:"text-xs text-muted-foreground",children:zt.timestamp})]}),!zt.read&&e.jsx("div",{className:"w-2 h-2 rounded-full bg-primary mt-1 break-words overflow-hidden"})]})},zt.id)})})}),_t.length>0&&e.jsx("div",{className:"border-t p-2",children:e.jsx(We,{variant:"ghost",size:"sm",className:"w-full text-xs",onClick:async()=>
381{const zt=localStorage.getItem("authToken");await fetch("https://goltprodapi-ehecb3h9h5ebbkam.northeurope-01.azurewebsites.net/admin/users/notifications/mark-all-read",{method:"PUT",headers:{Authorization:`Bearer ${zt}`}}),dr(_t.map(Mr=>({...Mr,read:!0})))},children:r("common.markAllRead")})})]})]}),e.jsx(We,{variant:"ghost",size:"icon",onClick:()=>te("validation"),title:r("common.settings"),children:e.jsx(th,{className:"w-4 h-4"})}),e.jsxs(We,{variant:"outline",size:"sm",onClick:Cr,className:"gap-2",children:[e.jsx(Bg,{className:"w-4 h-4"}),r("common.logout")]})]})]})})}),e.jsx("div",{className:"w-full max-w-[1600px] mx-auto px-4 sm:px-6 lg:px-8 py-6",children:e.jsxs(Sm,{value:z,onValueChange:te,orientation:"vertical",className:"flex flex-col lg:flex-row gap-6 items-start w-full",children:[e.jsx("aside",{className:"w-full lg:w-64 xl:w-72 shrink-0 lg:sticky lg:top-6 lg:self-start h-fit z-20",children:e.jsxs("div",{className:"bg-card border border-border/80 rounded-xl p-2.5 shadow-sm flex flex-col max-h-[50vh] lg:max-h-[calc(100vh-3rem)]",children:[e.jsx("div",{className:"px-3 py-2 text-[11px] font-semibold tracking-wider text-muted-foreground uppercase border-b border-border/50 mb-1 shrink-0",children:"Admin Menu"}),e.jsx("div",{className:"admin-menu-scrollbar flex-1 overflow-y-auto overflow-x-hidden pr-1.5 space-y-1",children:e.jsxs(Cm,{className:"flex flex-col h-auto w-full gap-1 bg-transparent p-0 justify-start",children:[e.jsxs(la,{value:"overview",className:"w-full justify-start gap-2.5 px-3 py-2 text-sm font-medium rounded-lg transition-colors data-[state=active]:bg-primary data-[state=active]:text-primary-foreground hover:bg-muted",children:[e.jsx(lu,{className:"w-4 h-4 shrink-0"}),e.jsx("span",{className:"truncate",children:r("admin.tabs.overview")})]}),e.jsxs(la,{value:"user-activity",className:"w-full justify-between px-3 py-2 text-sm font-medium rounded-lg transition-colors data-[state=active]:bg-primary data-[state=active]:text-primary-foreground hover:bg-muted",children:[e.jsxs("div",{className:"flex items-center gap-2.5 truncate",children:[e.jsx(nl,{className:"w-4 h-4 shrink-0"}),e.jsx("span",{className:"truncate",children:r("admin.tabs.userActivity")})]}),_t.filter(zt=>!zt.read).length>0&&e.jsx(tr,{variant:"destructive",className:"h-5 w-5 rounded-full p-0 text-xs flex items-center justify-center shrink-0",children:_t.filter(zt=>!zt.read).length})]}),e.jsxs(la,{value:"insights-clicks",className:"w-full justify-start gap-2.5 px-3 py-2 text-sm font-medium rounded-lg transition-colors data-[state=active]:bg-primary data-[state=active]:text-primary-foreground hover:bg-muted",children:[e.jsx(Hm,{className:"w-4 h-4 shrink-0"}),e.jsx("span",{className:"truncate",children:"Insights Clicks"})]}),e.jsxs(la,{value:"products",onClick:()=>lr(U,Ee),className:"w-full justify-start gap-2.5 px-3 py-2 text-sm font-medium rounded-lg transition-colors data-[state=active]:bg-primary data-[state=active]:text-primary-foreground hover:bg-muted",children:[e.jsx(Th,{className:"w-4 h-4 shrink-0"}),e.jsx("span",{className:"truncate",children:r("admin.tabs.products")})]}),e.jsx(la,{value:"ownerships",className:"w-full justify-between px-3 py-2 text-sm font-medium rounded-lg transition-colors data-[state=active]:bg-primary data-[state=active]:text-primary-foreground hover:bg-muted",children:e.jsxs("div",{className:"flex items-center gap-2.5 truncate",children:[e.jsx(Ll,{className:"w-4 h-4 shrink-0"}),e.jsx("span",{className:"truncate",children:r("admin.tabs.ownerships")})]})}),e.jsxs(la,{value:"course",className:"w-full justify-start gap-2.5 px-3 py-2 text-sm font-medium rounded-lg transition-colors data-[state=active]:bg-primary data-[state=active]:text-primary-foreground hover:bg-muted",children:[e.jsx(Sg,{className:"w-4 h-4 shrink-0"}),e.jsx("span",{className:"truncate",children:r("admin.tabs.course")})]}),e.jsxs(la,{value:"validation",className:"w-full justify-start gap-2.5 px-3 py-2 text-sm font-medium rounded-lg transition-colors data-[state=active]:bg-primary data-[state=active]:text-primary-foreground hover:bg-muted",children:[e.jsx(Ll,{className:"w-4 h-4 shrink-0"}),e.jsx("span",{className:"truncate",children:r("admin.tabs.validation")})]}),e.jsxs(la,{value:"data-signalling",className:"w-full justify-start gap-2.5 px-3 py-2 text-sm font-medium rounded-lg transition-colors data-[state=active]:bg-primary data-[state=active]:text-primary-foreground hover:bg-muted",children:[e.jsx(rc,{className:"w-4 h-4 shrink-0"}),e.jsx("span",{className:"truncate",children:r("admin.tabs.dataSignalling")})]}),e.jsxs(la,{value:"web-search-products",className:"w-full justify-start gap-2.5 px-3 py-2 text-sm font-medium rounded-lg transition-colors data-[state=active]:bg-primary data-[state=active]:text-primary-foreground hover:bg-muted",children:[e.jsx(nl,{className:"w-4 h-4 shrink-0"}),e.jsx("span",{className:"truncate",children:r("admin.tabs.webSearch")})]}),e.jsxs("div",{className:"w-full flex flex-col gap-1",children:[e.jsxs("button",{type:"button",onClick:()=>{w(!ue),!ue&&z!=="bulk-product-upload"&&z!=="bulk-logo-update"&&z!=="bulk-company-update"&&te("bulk-product-upload")},className:Ui("w-full flex items-center justify-between px-3 py-2 text-sm font-medium rounded-lg transition-colors hover:bg-muted text-foreground",(z==="bulk-product-upload"||z==="bulk-logo-update"||z==="bulk-company-update"||z==="upload-products")&&"font-semibold"),children:[e.jsxs("div",{className:"flex items-center gap-2.5 truncate",children:[e.jsx(Bo,{className:"w-4 h-4 shrink-0"}),e.jsx("span",{className:"truncate",children:"Bulk Upload"})]}),e.jsx(pd,{className:Ui("w-4 h-4 shrink-0 text-muted-foreground transition-transform duration-200",ue&&"rotate-180")}
381)]}),ue&&e.jsxs("div",{className:"flex flex-col gap-1 pl-4 ml-3 border-l border-border/60",children:[e.jsxs(la,{value:"bulk-product-upload",className:"w-full justify-start gap-2.5 px-3 py-2 text-sm font-medium rounded-lg transition-colors data-[state=active]:bg-primary data-[state=active]:text-primary-foreground hover:bg-muted",children:[e.jsx(fd,{className:"w-4 h-4 shrink-0"}),e.jsx("span",{className:"truncate",children:"Bulk Product Upload"})]}),e.jsxs(la,{value:"bulk-logo-update",className:"w-full justify-start gap-2.5 px-3 py-2 text-sm font-medium rounded-lg transition-colors data-[state=active]:bg-primary data-[state=active]:text-primary-foreground hover:bg-muted",children:[e.jsx(md,{className:"w-4 h-4 shrink-0"}),e.jsx("span",{className:"truncate",children:"Bulk Logo Update"})]}),e.jsxs(la,{value:"bulk-company-update",className:"w-full justify-start gap-2.5 px-3 py-2 text-sm font-medium rounded-lg transition-colors data-[state=active]:bg-primary data-[state=active]:text-primary-foreground hover:bg-muted",children:[e.jsx(Ol,{className:"w-4 h-4 shrink-0"}),e.jsx("span",{className:"truncate",children:"Company Bulk Update"})]})]})]}),e.jsxs(la,{value:"purchases",className:"w-full justify-start gap-2.5 px-3 py-2 text-sm font-medium rounded-lg transition-colors data-[state=active]:bg-primary data-[state=active]:text-primary-foreground hover:bg-muted",children:[e.jsx(Ym,{className:"w-4 h-4 shrink-0"}),e.jsx("span",{className:"truncate",children:r("admin.tabs.purchases")})]}),e.jsxs(la,{value:"pricing-plans",className:"w-full justify-start gap-2.5 px-3 py-2 text-sm font-medium rounded-lg transition-colors data-[state=active]:bg-primary data-[state=active]:text-primary-foreground hover:bg-muted",children:[e.jsx(th,{className:"w-4 h-4 shrink-0"}),e.jsx("span",{className:"truncate",children:r("admin.tabs.pricingPlans")})]}),e.jsxs(la,{value:"promo-codes",className:"w-full justify-start gap-2.5 px-3 py-2 text-sm font-medium rounded-lg transition-colors data-[state=active]:bg-primary data-[state=active]:text-primary-foreground hover:bg-muted",children:[e.jsx(nc,{className:"w-4 h-4 shrink-0"}),e.jsx("span",{className:"truncate",children:r("admin.tabs.promoCodes")})]}),e.jsxs(la,{value:"taxonomy",className:"w-full justify-start gap-2.5 px-3 py-2 text-sm font-medium rounded-lg transition-colors data-[state=active]:bg-primary data-[state=active]:text-primary-foreground hover:bg-muted",children:[e.jsx(th,{className:"w-4 h-4 shrink-0"}),e.jsx("span",{className:"truncate",children:"Taxonomy"})]}),e.jsxs(la,{value:"tom-time",className:"w-full justify-start gap-2.5 px-3 py-2 text-sm font-medium rounded-lg transition-colors data-[state=active]:bg-primary data-[state=active]:text-primary-foreground hover:bg-muted",children:[e.jsx(Sc,{className:"w-4 h-4 shrink-0"}),e.jsx("span",{className:"truncate",children:"Tom Time"})]}),e.jsxs(la,{value:"news-letter",className:"w-full justify-start gap-2.5 px-3 py-2 text-sm font-medium rounded-lg transition-colors data-[state=active]:bg-primary data-[state=active]:text-primary-foreground hover:bg-muted",children:[e.jsx(Sc,{className:"w-4 h-4 shrink-0"}),e.jsx("span",{className:"truncate",children:"Newsletter"})]}),e.jsxs(la,{value:"yuna-blog",className:"w-full justify-start gap-2.5 px-3 py-2 text-sm font-medium rounded-lg transition-colors data-[state=active]:bg-primary data-[state=active]:text-primary-foreground hover:bg-muted",children:[e.jsx(Cg,{className:"w-4 h-4 shrink-0"}),e.jsx("span",{className:"truncate",children:"Yunna Unfiltered"})]}),e.jsxs(la,{value:"subscribers",className:"w-full justify-start gap-2.5 px-3 py-2 text-sm font-medium rounded-lg transition-colors data-[state=active]:bg-primary data-[state=active]:text-primary-foreground hover:bg-muted",children:[e.jsx(Sc,{className:"w-4 h-4 shrink-0"}),e.jsx("span",{className:"truncate",children:"Subscribers"})]}),e.jsxs(la,{value:"email-logs",className:"w-full justify-start gap-2.5 px-3 py-2 text-sm font-medium rounded-lg transition-colors data-[state=active]:bg-primary data-[state=active]:text-primary-foreground hover:bg-muted",children:[e.jsx(gd,{className:"w-4 h-4 shrink-0"}),e.jsx("span",{className:"truncate",children:"Email Logs"})]}),e.jsxs(la,{value:"knowledge-base",className:"w-full justify-start gap-2.5 px-3 py-2 text-sm font-medium rounded-lg transition-colors data-[state=active]:bg-primary data-[state=active]:text-primary-foreground hover:bg-muted",children:[e.jsx(Ag,{className:"w-4 h-4 shrink-0"}),e.jsx("span",{className:"truncate",children:"Knowledge Base"})]})]})})]})}),e.jsxs("div",{className:"flex-1 w-full min-w-0",children:[e.jsx(na,{value:"overview",className:"mt-0",children:e.jsx(cx,{stats:nr})}),e.jsx(na,{value:"user-activity",className:"mt-0",children:e.jsx(dx,{notifications:_t,userRegistrations:Ft,userLogs:lt})}),e.jsx(na,{value:"insights-clicks",className:"mt-0",children:e.jsx(Sy,{})}),e.jsx(na,{value:"products",className:"mt-0",children:e.jsx(hx,{products:rr,searchQuery:A,setSearchQuery:I,productsPage:U,setProductsPage:ge,product_totalPages:re,producttotalItems:ye,pages:yn,start:Pr,end:Ur,onAddProduct:()=>t(!0),onEditProduct:or,onDeleteProduct:Wt,onActivateProduct:Ir})}),e.jsx(na,{value:"ownerships",className:"mt-0",children:e.jsx(px,{addProductRequests:Vr,editProductRequests:Xr,ownershipRequests:ft,ownershipsPage:se,setOwnershipsPage:de,totalPages_request:Ke,startPage:Ms,endPage:mn,isLoading:xt,onViewOwnership:Yt,totalRequests:Le})}),e.jsx(na,{value:"course",className:"mt-0",children:e.jsx(fx,{})}),e.jsx(na,{value:"validation",className:"mt-0",children:e.jsx(mx,{validationRequests:tt,onViewValidation:zr})}),e.jsx(na,{value:"data-signalling",className:"mt-0",children:e.jsx(Qv,{})}),e.jsx(na,{value:"web-search-products",className:"mt-0",children:e.jsx(ny,{})}),e.jsx(na,{value:"bulk-product-upload",className:"mt-0",children:e.jsx(Kf,{})}),e.jsx(na,{value:"bulk-logo-update",className:"mt-0",children:e.jsx(ex,{})}),e.jsx(na,{value:"bulk-company-update",className:"mt-0",children:e.jsx(tx,{})}),e.jsx(na,{value:"upload-products",className:"mt-0",children:e.jsx(Kf,{})}),e.jsx(na,{value:"purchases",className:"mt-0",children:e.jsx(ay,{})}),e.jsx(na,{value:"pricing-plans",className:"mt-0",children:e.jsx(uy,{})}),e.jsx(na,{value:"promo-codes",className:"mt-0",children:e.jsx(vy,{})}),e.jsx(na,{value:"taxonomy",className:"mt-0",children:e.jsx(wy,{})}),e.jsx(na,{value:"tom-time",className:"mt-0",children:e.jsx(Ny,{})}),e.jsx(na,{value:"news-letter",className:"mt-0",children:e.jsx(ky,{})}),e.jsx(na,{value:"yuna-blog",className:"mt-0",children:e.jsx(Ty,{})}),e.jsx(na,{value:"subscribers",className:"mt-0",children:e.jsx(My,{})}),e.jsx(na,{value:"email-logs",className:"mt-0",children:e.jsx(Dy,{})}),e.jsx(na,{value:"knowledge-base",className:"mt-0",children:e.jsx(Yy,{})})]})]})}),e.jsx(Un,{open:O,onOpenChange:t,children:e.jsxs(zn,{className:"max-w-[95vw] w-full max-h-[95vh] overflow-y-auto",children:[e.jsxs($n,{children:[e.jsx(Vn,{children:"Add New Product"}),e.jsx(ha,{children:"Fill in the details below to add a new product to the marketplace"})]}),e.jsx(lx,{onSubmit:()=>{},onCancel:()=>t(!1),onProductAdded:async()=>
381{s({title:"Product Added",description:"New product has been added successfully"}),t(!1),lr(U,Ee)}})]})}),e.jsx(Un,{open:m,onOpenChange:zt=>{y(zt),zt||S(null)},children:e.jsxs(zn,{className:"max-w-5xl max-h-[90vh] overflow-y-auto",children:[e.jsxs($n,{children:[e.jsx(Vn,{children:"Edit Product"}),e.jsx(ha,{children:"Update product details"})]}),e.jsx("div",{className:"mt-4",children:e.jsx(ox,{initialData:C,selected_product_id:g,onProductAdded:lr,onSubmit:zt=>{console.log("Product updated:",zt),s({title:"Product Updated",description:"Product has been updated successfully"}),y(!1),S(null),lr()},onCancel:()=>{y(!1),S(null)}})})]})}),e.jsx(Un,{open:W,onOpenChange:Y,children:e.jsxs(zn,{className:"max-w-4xl max-h-[90vh]",children:[e.jsxs($n,{children:[e.jsx(Vn,{children:"Review Product"}),e.jsx(ha,{children:"Review the details and approve or reject this product add/edit/own request"})]}),M&&e.jsx(Ec,{className:"h-[calc(90vh-320px)] pr-4",children:e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Request ID"}),e.jsx("p",{className:"font-mono mt-1 break-words overflow-hidden",children:M.id})]}),e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Product"}),e.jsx("p",{className:"font-medium mt-1 break-words overflow-hidden",children:M.productName}),M.productId&&e.jsx("p",{className:"text-sm text-muted-foreground",children:M.productId})]}),e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Vendor name"}),e.jsx("p",{className:"font-medium mt-1 break-words overflow-hidden",children:M.vendorName}),e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Vendor email"}),e.jsx("p",{className:"font-medium mt-1 break-words overflow-hidden",children:M.vendorEmail})]}),e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Company Information"}),e.jsx("p",{className:"font-medium mt-1 break-words overflow-hidden",children:M.companyName}),e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Company Email"}),e.jsx("p",{className:"font-medium mt-1 break-words overflow-hidden",children:M.companyEmail})]}),M.reason&&e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Request Reason"}),e.jsx("p",{className:"mt-1 break-words overflow-hidden p-3 bg-muted rounded-md",children:M.reason})]})]}),M.type==="add"&&e.jsxs("div",{className:"space-y-6 border-t pt-6",children:[e.jsx("h3",{className:"font-semibold text-lg",children:"Product Form Details"}),e.jsxs(ds,{children:[e.jsx(Rs,{children:e.jsx(Ds,{className:"text-base",children:"Company Details"})}),e.jsxs(us,{className:"space-y-3",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Company Name"}),e.jsx("p",{className:"mt-1 break-words overflow-hidden",children:M.companyName})]}),e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Company Email"}),e.jsx("p",{className:"mt-1 break-words overflow-hidden",children:M.companyEmail})]}),e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Phone"}),e.jsx("p",{className:"mt-1 break-words overflow-hidden",children:M.companyPhone||"N/A"})]}),e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Year Founded"}),e.jsx("p",{className:"mt-1 break-words overflow-hidden",children:M.yearFounded||"N/A"})]})]}),e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Address"}),e.jsx("p",{className:"mt-1 break-words overflow-hidden",children:M.companyAddress||"N/A"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Headquarter Country"}),e.jsx("p",{className:"mt-1 break-words overflow-hidden",children:M.headquarterCountry||"N/A"})]}),e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Website"}),e.jsx("p",{className:"mt-1 break-words overflow-hidden",children:M.website||"N/A"})]})]})]})]}),e.jsxs(ds,{children:[e.jsx(Rs,{children:e.jsx(Ds,{className:"text-base",children:"Product Information"})}),e.jsxs(us,{className:"space-y-3",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Product Name"}),e.jsx("p",{className:"mt-1 break-words overflow-hidden",children:M.productName})]}),e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Product Version"}),e.jsx("p",{className:"mt-1 break-words overflow-hidden",children:M.productVersion||"N/A"})]}),e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Category"}),e.jsx("p",{className:"mt-1 break-words overflow-hidden",children:M.category||"N/A"})]}),e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Capabilities"}),e.jsx("p",{className:"mt-1 break-words overflow-hidden",children:M.capabilities||"N/A"})]})]}),e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Description"}),e.jsx("p",{className:"mt-1 break-words overflow-hidden p-3 bg-muted rounded-md",children:M.description})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Functional Focus"}),e.jsx("p",{className:"mt-1 break-words overflow-hidden",children:M.functionalFocus||"N/A"})]}),e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Technology Used"}),e.jsx("p",{className:"mt-1 break-words overflow-hidden",children:M.technologyUsed||"N/A"})]}),e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Languages"}),e.jsx("p",{className:"mt-1 break-words overflow-hidden",children:M.languages||"N/A"})]}),e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Product Website"}),e.jsx("p",{className:"mt-1 break-words overflow-hidden",children:M.domain||"N/A"})]}),e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Additional Categories"}),e.jsx("p",{className:"mt-1 break-words overflow-hidden",children:M.additionalCategories||"N/A"})]}),e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Integrations"}),e.jsx("p",{className:"mt-1 break-words overflow-hidden",children:M.integrations||"N/A"})]}),e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Other Integrations"}),e.jsx("p",{className:"mt-1 break-words overflow-hidden",children:M.integratesWith||"N/A"})]})]})]})]}),e.jsxs(ds,{children:[e.jsx(Rs,{children:e.jsx(Ds,{className:"text-base",children:"Business Information"})}),e.jsxs(us,{className:"space-y-3",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Industries Served"}),e.jsx("p",{className:"mt-1 break-words overflow-hidden",children:M.industriesServed||"
381N/A"})]}),e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Existing customers"}),e.jsx("p",{className:"mt-1 break-words overflow-hidden",children:M.customers||"N/A"})]}),e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Ideal Number of Users"}),e.jsx("p",{className:"mt-1 break-words overflow-hidden",children:M.idealNumberOfUsers||"N/A"})]}),e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Geographical Scope"}),e.jsx("p",{className:"mt-1 break-words overflow-hidden",children:M.geographicalScope||"N/A"})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Countries Served"}),e.jsx("p",{className:"mt-1 break-words overflow-hidden",children:M.countriesServed||"N/A"})]}),e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Strategic Partners"}),e.jsx("p",{className:"mt-1 break-words overflow-hidden",children:M.strategicPartners||"N/A"})]})]})]})]}),e.jsxs(ds,{children:[e.jsx(Rs,{children:e.jsx(Ds,{className:"text-base",children:"Technical Details"})}),e.jsxs(us,{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Engine and Data Models"}),e.jsx("p",{className:"mt-1 break-words overflow-hidden",children:M.engineAndDataModels||"N/A"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4 min-w-0",children:[e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Database Integration"}),e.jsx("p",{className:"mt-1 break-words overflow-hidden break-words whitespace-normal",children:((wn=M.databaseIntegration)==null?void 0:wn.replaceAll(";",", "))||Ea()})]}),e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"SSO"}),e.jsx("p",{className:"mt-1 break-words overflow-hidden",children:M.sso||"N/A"})]}),e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Add-in Functionality"}),e.jsx("p",{className:"mt-1 break-words overflow-hidden",children:M.addinFunctionality||"N/A"})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Open/Interchangeable Data Format"}),e.jsx("p",{className:"mt-1 break-words overflow-hidden",children:M.openDataFormat||"N/A"})]}),e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Automation Capabilities"}),e.jsx("p",{className:"mt-1 break-words overflow-hidden",children:M.automationCapabilities||"N/A"})]}),e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"AI Capabilities"}),e.jsx("p",{className:"mt-1 break-words overflow-hidden break-words overflow-hidden",children:M.aiCapabilities||"N/A"})]}),e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Development Lifecycle"}),e.jsx("p",{className:"mt-1 break-words overflow-hidden",children:M.developmentLifecycle||"N/A"})]})]}),e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"User Reception"}),e.jsx("p",{className:"mt-1 break-words overflow-hidden",children:M.userReception||"N/A"})]})]})]}),e.jsxs(ds,{children:[e.jsx(Rs,{children:e.jsx(Ds,{className:"text-base",children:"Pricing & Deployment"})}),e.jsxs(us,{className:"space-y-3",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Price Range"}),e.jsx("p",{className:"mt-1 break-words overflow-hidden",children:M.priceRange||"N/A"})]}),e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Pricing Model"}),e.jsx("p",{className:"mt-1 break-words overflow-hidden",children:M.pricingModelsLicensing||"N/A"})]}),e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Additional Implementation Cost"}),e.jsx("p",{className:"mt-1 break-words overflow-hidden",children:M.additionalImplementationCost||"N/A"})]}),e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Additional Support Cost"}),e.jsx("p",{className:"mt-1 break-words overflow-hidden",children:M.additionalSupp
381ortCost||"N/A"})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Free Trial/POC"}),e.jsx("p",{className:"mt-1 break-words overflow-hidden",children:M.freeTrialOrPaidPoc||"N/A"})]}),e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"IT Deployment Models"}),e.jsx("p",{className:"mt-1 break-words overflow-hidden",children:M.itDeploymentModels||"N/A"})]}),e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Request Demo Button"}),e.jsx("p",{className:"mt-1 break-words overflow-hidden",children:M.requestDemoButton||"N/A"})]})]})]})]}),e.jsxs(ds,{children:[e.jsx(Rs,{children:e.jsx(Ds,{className:"text-base",children:"Security & Compliance"})}),e.jsx(us,{className:"space-y-3",children:e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"GDPR Compliant"}),e.jsx("p",{className:"mt-1 break-words overflow-hidden",children:M.gdprCompliant||"N/A"})]}),e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Third Party Providers Outside EEA"}),e.jsx("p",{className:"mt-1 break-words overflow-hidden",children:M.thirdPartyProvidersOutsideEea||"N/A"})]}),e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Hosting Location"}),e.jsx("p",{className:"mt-1 break-words overflow-hidden",children:M.hostingLocation||"N/A"})]}),e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Security Certifications"}),e.jsx("p",{className:"mt-1 break-words overflow-hidden",children:M.securityCertifications||"N/A"})]})]})})]}),M.additionalNotes&&e.jsxs(ds,{children:[e.jsx(Rs,{children:e.jsx(Ds,{className:"text-base",children:"Additional Notes"})}),e.jsx(us,{children:e.jsx("p",{className:"p-3 bg-muted rounded-md",children:M.additionalNotes})})]})]}),M.type==="edit"&&M.oldData&&M.newData&&e.jsxs("div",{className:"space-y-6 border-t pt-6",children:[e.jsx("h3",{className:"font-semibold text-lg",children:"Product Changes"}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Fields highlighted in ",e.jsx("span",{className:"text-yellow-600 font-semibold",children:"golden color"})," show the updated information"]}),e.jsxs(ds,{children:[e.jsx(Rs,{children:e.jsx(Ds,{className:"text-base",children:"Updated Fields"})}),e.jsx(us,{className:"space-y-6",children:Object.keys(M.newData).map(zt=>{const Mr=M.oldData[zt],Rr=M.newData[zt],ws=zt.replace(/([A-Z])/g," $1").replace(/^./,is=>is.toUpperCase());return e.jsxs("div",{className:"space-y-2 pb-4 border-b last:border-b-0",children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:ws}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"p-3 bg-muted rounded-md",children:[e.jsx("p",{className:"text-xs font-medium text-muted-foreground mb-1",children:"Current Value:"}),e.jsx("p",{className:"text-sm",children:Mr||"N/A"})]}),e.jsxs("div",{className:"p-3 rounded-md border-2 border-yellow-600/50 bg-yellow-50 dark:bg-yellow-950/20",children:[e.jsx("p",{className:"text-xs font-medium text-yellow-700 dark:text-yellow-600 mb-1",children:"Updated Value:"}),e.jsx("p",{className:"text-sm text-yellow-900 dark:text-yellow-400 font-medium",children:Rr||"N/A"})]})]})]},zt)})})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Submitted On"}),e.jsx("p",{className:"mt-1 break-words overflow-hidden",children:M.submittedAt})]}),M.reviewedAt&&e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Reviewed On"}),e.jsx("p",{className:"mt-1 break-words overflow-hidden",children:M.reviewedAt})]})]}),M.reviewNote&&e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Review Note"}),e.jsx("p",{className:"mt-1 break-words overflow-hidden p-3 bg-muted rounded-md",children:M.reviewNote})]})]})})]})}),e.jsx(Un,{open:ae,onOpenChange:Z,children:e.jsxs(zn,{className:"max-w-3xl max-h-[90vh]",children:[e.jsxs($n,{children:[e.jsx(Vn,{children:"Review Validation Request"}
381),e.jsx(ha,{children:"Review the software validation request details and approve or reject"})]}),J&&e.jsx(Ec,{className:"max-h-[calc(90vh-180px)] pr-4",children:e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Request ID"}),e.jsx("p",{className:"font-mono mt-1 break-words overflow-hidden",children:J.id})]}),e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Request Type"}),e.jsx("div",{className:"mt-1 break-words overflow-hidden",children:e.jsx(tr,{variant:J.requestType==="vendor"?"default":"secondary",children:J.requestType==="vendor"?"Vendor Request":"Waitlist"})})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Status"}),e.jsxs("div",{className:"mt-1 break-words overflow-hidden",children:[J.status==="pending"&&e.jsxs(tr,{variant:"outline",className:"gap-1",children:[e.jsx($i,{className:"w-3 h-3"}),"Pending Review"]}),J.status==="approved"&&e.jsxs(tr,{className:"gap-1 bg-green-500",children:[e.jsx(Ll,{className:"w-3 h-3"}),"Approved"]}),J.status==="rejected"&&e.jsxs(tr,{variant:"destructive",className:"gap-1",children:[e.jsx(oc,{className:"w-3 h-3"}),"Rejected"]})]})]}),e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Category"}),e.jsx("div",{className:"mt-1 break-words overflow-hidden",children:e.jsx(tr,{variant:"outline",children:J.category})})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Software Name"}),e.jsx("p",{className:"font-medium text-lg",children:J.softwareName})]}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Company Name"}),e.jsx("p",{className:"font-medium mt-1 break-words overflow-hidden",children:J.companyName})]}),e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Website"}),e.jsx("p",{className:"mt-1 break-words overflow-hidden",children:e.jsx("a",{href:J.website,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:J.website})})]})]}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Contact Person"}),e.jsx("p",{className:"font-medium mt-1 break-words overflow-hidden",children:J.contactPerson})]}),e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Contact Email"}),e.jsx("p",{className:"mt-1 break-words overflow-hidden",children:J.contactEmail})]})]}),e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Phone Number"}),e.jsx("p",{className:"mt-1 break-words overflow-hidden",children:J.phoneNumber})]}),e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Description"}),e.jsx("p",{className:"mt-1 break-words overflow-hidden p-3 bg-muted rounded-md",children:J.description})]}),e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Use Cases"}),e.jsx("p",{className:"mt-1 break-words overflow-hidden p-3 bg-muted rounded-md",children:J.useCases})]}),e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Target Users"}),e.jsx("p",{className:"mt-1 break-words overflow-hidden p-3 bg-muted rounded-md",children:J.targetUsers})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Submitted On"}),e.jsx("p",{className:"mt-1 break-words overflow-hidden",children:J.submittedAt})]}),J.reviewedAt&&e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Reviewed On"}),e.jsx("p",{className:"mt-1 break-words overflow-hidden",children:J.reviewedAt})]})]}),J.reviewNote&&e.jsxs("div",{children:[e.jsx(pt,{className:"text-sm font-medium text-muted-foreground",children:"Review Note"}),e.jsx("p",{className:"mt-1 break-words overflow-hidden p-3 bg-muted rounded-md",children:J.reviewNote})]}),J.status==="pending"&&e.jsxs("div",{className:"space-y-4 pt-4 border-t",children:[e.jsxs("div",{children:[e.jsx(pt,{htmlFor:"validationReviewNote",children:"Review Note (Optional)"}),e.jsx(Ma,{id:"validationReviewNote",placeholder:"Add any notes or feedback for the company...",className:"mt-1 break-words overflow-hidden",rows:4})]}),e.jsxs("div",{className:"flex gap-2 justify-end",children:[e.jsxs(We,{variant:"outline",onClick:()=>{var Mr;
381const zt=((Mr=document.getElementById("validationReviewNote"))==null?void 0:Mr.value)||"";Vt(J.id,zt)},children:[e.jsx(oc,{className:"w-4 h-4 mr-2"}),"Reject"]}),e.jsxs(We,{onClick:()=>{var Mr;const zt=((Mr=document.getElementById("validationReviewNote"))==null?void 0:Mr.value)||"";Ye(J.id,zt),$e()},children:[e.jsx(Ll,{className:"w-4 h-4 mr-2"}),"Approve"]})]})]})]})})]})})]})}export{qj as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.