PageSourceSearch

https://crm.tedxconstanta.ro/assets/ProjectDetailPage-DXHAJVgW.js

js tedxconstanta.ro collected 2026-10-05 01:54:49 UTC 566,186 bytes, 94 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-D14oYjMA.js","assets/vendor-query-Bdf_E1Dh.js","assets/vendor-tamagui-CvWoaspE.js","assets/vendor-router-BF4rHHgO.js","assets/vendor-i18n-CIpi6y-q.js","assets/vendor-icons-9P8EiTGk.js","assets/index-Cv7VnglK.css","assets/index.es-B1-JPGR5.js"])))=>i.map(i=>d[i]);
2import{u as Tr,d as Er,j as m,e as wa,a as be,R as xe}from"./vendor-query-Bdf_E1Dh.js";import{P as ns}from"./PageStateShell-BgAcZ3AF.js";import{u as rs}from"./usePageState-Y1JuFHR7.js";import{bg as en,V as Gt,_ as Yt,a0 as _t,a6 as Bt,a7 as ni,ab as is,bp as p1,$ as Ct,an as g1,a3 as zo,ad as uh,aj as dh}from"./index-D14oYjMA.js";import{f as hh,b as m1}from"./vendor-router-BF4rHHgO.js";import{K as v1}from"./KpiSparkline-B_aWaW3B.js";import{u as Kt,i as or}from"./vendor-i18n-CIpi6y-q.js";import{X as xr,Y as wi,T as xi,y as Ut,m as fh}from"./vendor-tamagui-CvWoaspE.js";import{A as Us}from"./A73DrawerShellV2-BgVXIz7Z.js";import{d as Ui}from"./DrawerHeaderTitle.tsx.tamagui-B6Jp-Oi0.js";import{A as Vs}from"./A73EmptyState-XYHyI-nF.js";import{A as Ko}from"./A73Banner-Cdo7Z7vO.js";import{P as b1}from"./ProjectViewDrawer-liZ5fqGU.js";import"./useChromeCollapse-BAin5WzC.js";import{bT as y1,a as x1,aA as ph}from"./vendor-icons-9P8EiTGk.js";import{a as va}from"./asArray-A7Yz__bT.js";import{u as w1,T as _1}from"./TaskViewDrawer-Ba0t82wG.js";import"./purify.es-CovBOfck.js";import"./TaschiDrawer-BKf87ioY.js";import{P as S1}from"./PipelineView-BaqbnW5U.js";import{u as A1}from"./useViewportRegime-B1EP36Lk.js";import{_ as hu}from"./vendor-calendar-mZ863bjG.js";import{P as gh}from"./PageLoading-C2CrrsGU.js";import{A as Tl}from"./A73StatTile-BVobqkHL.js";import{P as k1}from"./EntityDrawer-DXB4wHZg.js";import{_ as Hi,o as xn,n as He,s as je,f as _r,b as ts,i as El,u as fu}from"./vendor-forms-CF6p83rw.js";import{A as mh}from"./A73Drawer-Ny6ryIQx.js";import{D as vh}from"./DrawerFooter-DhBaVkMp.js";import{D as bh}from"./DrawerIconBadge-Bc9Mctb2.js";import{u as L1}from"./useToast-Dp3cY5NA.js";import{A as j1}from"./A73Skeleton-DXOl4cHT.js";import{E as N1}from"./ExpenseDrawer-DzPS5K56.js";import"./AccessDenied-BS_p_VMe.js";import"./unwrapApi-D_HxL4cu.js";import"./phoneFormat-B7wzF-gw.js";import"./useStaff-GjSpY-ZI.js";import"./useClients-Gqs-Sn2I.js";import"./useConfirm-DQWAguuY.js";import"./DocumentAmount-C6FMSu1-.js";import"./ListingKpiCard-D7L2bRqR.js";import"./A73StatusPill-CI7AS7i0.js";import"./aduToatePaginile-BkniFV_6.js";import"./EmailComposeSheet-CfpuTEsy.js";import"./DrawerSlidePanel-CGtlU9Ae.js";import"./useEmailSettings-D8Xv8R_o.js";import"./useAnnouncements-Dh79EUzL.js";import"./MessageLogDrawer-ej8c5vH9.js";import"./useWhatsappTemplates-2HXSmmTv.js";import"./useTaxes-V0Xaim98.js";import"./ActivityTab-BzdlQrf2.js";import"./EmailJournalTab-BcDKgnwZ.js";import"./index-l81ZBswN.js";/* empty css                                     */import"./moduleActive-B5rLdpUd.js";import"./useProductsShop-BI2RmkWl.js";import"./useDirtyState-D7wtumfW.js";import"./sanitizeHtml-Bq12y6Mx.js";import"./useIsVatPayer-D5-LVC39.js";import"./useEfactura-DxJtFtYC.js";import"./useBnrRate-Ca72xBqV.js";import"./fxSource-sLSD9SMG.js";import"./ProductShopDrawer-CSf1SpSi.js";import"./CatalogAmount-BBEuYw7S.js";import"./useSettingsFinancial-BaUZYTx_.js";import"./productImageUrl-BgHuFeVB.js";import"./anafUomCodes-CS-rDZEu.js";import"./useClientBilling-BghALLhe.js";import"./ClientAppointmentsPanel-5BzGMist.js";import"./useAppointments-DYCEDOf0.js";import"./types-D9F16IVb.js";import"./ConsentStateBlock-Capg4u5J.js";import"./consentState-BzIyeP21.js";import"./A73ToggleRow-B1tXbr2c.js";const _c={project:{id:1,name:"Bloc rezidențial Cotroceni Park",status:2,address:"B-dul Eroilor 23, sector 5",city:"București",country:"România",clientid:7,client_name:"SC Cotroceni Development SRL",project_cost:32e4,start_date:"2026-02-10",deadline:"2026-09-05",progress:68},kpis:{progress_pct:68,budget_spent:217e3,budget_total:32e4,days_worked:47,days_total:180,hours_this_week:168,hours_prev_week:156,hours_weekly_series:[22,28,24,26,30,20,18],tasks_active:23,tasks_total:89,tasks_overdue:3,tasks_done:63,tasks_in_progress:7},members:[{staff_id:1,firstname:"Andrei",lastname:"Munteanu",initials:"AM",role:"sef_santier",presence_status:"pe_santier",avatar_color:"#E8DEC9"},{staff_id:2,firstname:"Cristina",lastname:"Popa",initials:"CP",role:"arhitect",presence_status:"birou",avatar_color:"#DDE4D0"},{staff_id:3,firstname:"Mihai",lastname:"Iordache",initials:"MI",role:"inginer",presence_status:"pe_santier",avatar_color:"#E8D4C9"},{staff_id:4,firstname:"Vasile",lastname:"Dumitrescu",initials:"VD",role:"electrician",presence_status:"disponibil",next_available_date:"2026-06-15",avatar_color:"#D9DEE8"},{staff_id:5,firstname:"Florin",lastname:"Niță",initials:"FN",role:"instalator",presence_status:"disponibil",next_available_date:"2026-06-15",avatar_color:"#E8D9D9"},{staff_id:6,firstname:"Marius",lastname:"Tofan",initials:"MT",role:"fierar_betonist",presence_status:"pe_santier",avatar_color:"#E2DCD0"},{staff_id:7,firstname:"Dan",lastname:"Grigore",initials:"DG",role:"zidar",presence_status:"pe_santier",avatar_color:"#E8DEC9"},{staff_id:8,firstname:"Paul",lastname:"Rotaru",initials:"PR",role:"zugrav",presence_status:"birou",avatar_color:"#DDE4D0"}
2],activity:[{id:1,type:"photo",actor_name:"Andrei Munteanu",actor_initials:"AM",description:"a încărcat 12 fotografii · cofraj parter",created_at:"2026-04-25T10:00:00Z"},{id:2,type:"task",actor_name:"Marius Tofan",actor_initials:"MT",description:'a marcat finalizat: „Turnare placă peste subsol"',created_at:"2026-04-25T08:00:00Z"},{id:3,type:"expense",actor_name:"System",actor_initials:"SY",description:"Cheltuială Beton C25/30, 18 m³ · de la SC Holcim",amount:3450,created_at:"2026-04-24T16:00:00Z"},{id:4,type:"file",actor_name:"Cristina Popa",actor_initials:"CP",description:'a actualizat planul „Structură etaj 1 — A02" · rev. 3',created_at:"2026-04-24T16:42:00Z"},{id:5,type:"photo",actor_name:"Andrei Munteanu",actor_initials:"AM",description:"a încărcat 27 fotografii · armare placă",created_at:"2026-04-22T22:00:00Z"},{id:6,type:"expense",actor_name:"System",actor_initials:"SY",description:"Comandă Plasă sudată Ø8, 240 m²",amount:1180,created_at:"2026-04-19T10:00:00Z"}],upcoming_milestones:[{id:1,name:"Finalizare cofraj parter",due_date:"2026-05-02",assignee_initials:"CP",assignee_name:"Cristina Popa",open_tasks:4,is_urgent:!1},{id:2,name:"Comandă armătură etaj 1",due_date:"2026-04-28",assignee_initials:"AM",assignee_name:"Andrei Munteanu",open_tasks:0,is_urgent:!0},{id:3,name:"Recepție structură subsol cu dirigintele",due_date:"2026-05-06",assignee_initials:"MI",assignee_name:"Mihai Iordache + ISC",open_tasks:1,is_urgent:!1}]}
2,ca=typeof window<"u"&&new URLSearchParams(window.location.search).get("mock")==="1";function C1(n){const e=Tr();return Er({queryKey:["project_screen",n,ca],queryFn:async()=>{if(ca)return await new Promise(a=>setTimeout(a,300)),_c;const{api:t}=await en(async()=>{const{api:a}=await import("./index-D14oYjMA.js").then(l=>l.c5);return{api:a}},__vite__mapDeps([0,1,2,3,4,5,6])),i=(await t.get(`/taschi_bridge/bridge_api/screen/project_detail?id=${n}`)).data??{};if(i.tasks!==void 0){const a=Array.isArray(i.tasks)?i.tasks:i.tasks?.tasks??[];e.setQueryData(["project_tasks",n,ca],{tasks:a})}return i.milestones!==void 0&&e.setQueryData(["project_milestones",n],i.milestones??[]),i.files!==void 0&&e.setQueryData(["project_files",n],i.files??[]),i.photos!==void 0&&e.setQueryData(["project_photos",n,ca],i.photos),i.timesheets!==void 0&&e.setQueryData(["project_timesheets",n,ca],i.timesheets),i.expenses!==void 0&&e.setQueryData(["project_expenses",n,ca],i.expenses),i.discussions!==void 0&&e.setQueryData(["project_discussions",n,ca],i.discussions),i.dashboard},staleTime:6e4,enabled:n>0})}function P1({value:n,color:e,trackColor:t,size:r=44,strokeWidth:i=3.5}){const{resolvedTheme:a}=Gt(),l=Yt[a],o=e??l.successText,u=t??l.border,d=r/2-i/2,h=2*Math.PI*d,b=h*(1-n/100),x=r/2,p=r/2;return m.jsxs("svg",{viewBox:`0 0 ${r} ${r}`,width:r,height:r,children:[m.jsx("circle",{cx:x,cy:p,r:d,fill:"none",stroke:u,strokeWidth:i}),m.jsx("circle",{cx:x,cy:p,r:d,fill:"none",stroke:o,strokeWidth:i,strokeDasharray:h,strokeDashoffset:b,strokeLinecap:"round",transform:`rotate(-90 ${x} ${p})`}),m.jsxs("text",{x,y:p+4,textAnchor:"middle",style:{fontSize:_t(11)},fontWeight:500,fill:l.text,children:[n,"%"]})]})}function T1({value:n,max:e,color:t,size:r=44}){const{resolvedTheme:i}=Gt(),a=Yt[i],l=t??a.successText,o=Math.min(n/e,1),d=Math.PI-o*Math.PI,h=r/2,b=r*32/44,x=r*16/44,p=r*4/44,L=V=>h+x*Math.cos(V),k=V=>b+x*Math.sin(V),C=h+(x-p/2)*Math.cos(d),y=b+(x-p/2)*Math.sin(d);return m.jsxs("svg",{viewBox:`0 0 ${r} ${r}`,width:r,height:r,children:[m.jsx("path",{d:`M ${L(Math.PI)} ${k(Math.PI)} A ${x} ${x} 0 0 1 ${L(0)} ${k(0)}`,fill:"none",stroke:a.border,strokeWidth:p,strokeLinecap:"round"}),o>0&&m.jsx("path",{d:`M ${L(Math.PI)} ${k(Math.PI)} A ${x} ${x} 0 ${o>.5?1:0} 1 ${L(d)} ${k(d)}`,fill:"none",stroke:l,strokeWidth:p,strokeLinecap:"round"}),m.jsx("line",{x1:h,y1:b,x2:C,y2:y,stroke:a.text,strokeWidth:1.4,strokeLinecap:"round"}),m.jsx("circle",{cx:h,cy:b,r:2,fill:a.text})]})}function E1({worked:n,total:e,color:t,size:r=44}){const{resolvedTheme:i}=Gt(),a=Yt[i],l=t??a.successText,o=r/44,u=Math.min(n/e,1),d=9*o,h=20*o,b=13*o,x=14*o,p=b*u;return m.jsxs("svg",{viewBox:`0 0 ${r} ${r}`,width:r,height:r,children:[m.jsx("rect",{x:6*o,y:10*o,width:32*o,height:28*o,rx:2*o,fill:"none",stroke:a.cardBorder,strokeWidth:1.2*o}),m.jsx("line",{x1:6*o,y1:17*o,x2:38*o,y2:17*o,stroke:a.cardBorder,strokeWidth:1.2*o}),m.jsx("rect",{x:11*o,y:6*o,width:2*o,height:6*o,fill:a.textMuted}),m.jsx("rect",{x:31*o,y:6*o,width:2*o,height:6*o,fill:a.textMuted}),m.jsx("rect",{x:d,y:h,width:b,height:x,fill:a.successBg}),p>0&&m.jsx("rect",{x:d,y:h,width:p,height:x,rx:1*o,fill:l}),m.jsx("text",{x:d+b/2,y:h+x*.65,textAnchor:"middle",style:{fontSize:_t(9*o)},fontWeight:500,fill:a.successText,children:n})]})}function D1({segments:n,barHeight:e=6,gap:t=9,width:r=34}){return n.length*e+(n.length-1)*t,m.jsxs("svg",{viewBox:"0 0 44 44",width:44,height:44,children:[n.map((i,a)=>{const l=8+a*(e+t),o=Math.max(0,Math.min(i.value/i.total,1))*r;return m.jsxs("g",{children:[m.jsx("rect",{x:5,y:l,width:r,height:e,rx:1,fill:i.trackColor}),o>0&&m.jsx("rect",{x:5,y:l,width:o,height:e,rx:1,fill:i.color})]},a)}),m.jsx("rect",{x:0,y:0,width:44,height:44,fill:"none"})]})}const M1="is_View _fd-row _ai-baseline _gap-4px ",I1="is_View _fd-column _gap-2px ";function F1(n,e){switch(n){case"success":return e.successText;case"info":return e.infoText;case"warning":return e.warningText;case"danger":return e.dangerText;case"special":return e.specialText;case"accent":return e.accent}}function O1({kpis:n}){const{t:e}=Kt(),{resolvedTheme:t}=Gt(),r=Yt[t],i=n.hours_this_week-n.hours_prev_week,a=n.budget_total>0?Math.round(n.budget_spent/n.budget_total*100):0,l=Math.max(0,n.days_total-n.days_worked),o=n.progress_pct>=75?"success":n.progress_pct>=40?"info":"warning";return m.jsxs(xr,{paddingHorizontal:Bt.space(4),paddingVertical:Bt.space(2),backgroundColor:"var(--theme-content-bg)",flexShrink:0,gap:Bt.space(2),style:{overflowX:"auto",scrollbarWidth:"none",WebkitOverflowScrolling:"touch"},children:[m.jsxs(Ls,{c:r,tone:o,label:e("projects_kpi_progress",{defaultValue:"Progres"}),visual:m.jsx(P1,{value:n.progress_pct}),children:[m.jsx(js,{c:r,value:n.progress_pct,unit:"%"}),m.jsxs(ua,{c:r,children:[n.tasks_done," / ",n.tasks_total," ",e("projects_kpi_tasks_done",{defaultValue:"finalizate"})]})]}),m.jsxs(Ls,{c:r,tone:"info",label:e("projects_buget_cheltuit",{defaultValue:"Buget cheltuit"}),visual:m.jsx(T1,{value:n.budget_spent,max:n.budget_total||1}),children:[m.jsx(js,{c:r,value:n.budget_total>0?Math.round(n.budget_spent/1e3):0,unit:"k €"}),n.budget_total>0?m.jsxs(ua,{c:r,children:[e("projects_kpi_budget_of",{defaultValue:"din"})," ",Math.round(n.budget_total/1e3),"k · ",a,"% ",e("projects_kpi_budget_used",{defaultValue:"utilizat"})]}):m.jsx(ua,{c:r,children:e("projects_kpi_budget_not_set",{defaultValue:"buget nesetat"})})]}),m.jsxs(Ls,{c:r,tone:"special",label:e("projects_zile_lucrate",{defaultValue:"Zile lucrate"}),visual:m.jsx(E1,{worked:n.days_worked,total:n.days_total}),children:[m.jsx(js,{c:r,value:n.days_worked,unit:` / ${n.days_total}`}),m.jsxs(ua,{c:r,children:[l," ",e("projects_kpi_days_left",{defaultValue:"zile rămase"})]})]}),m.jsxs(Ls,{c:r,tone:"accent",label:e("projects_ore_saptamana",{defaultValue:"Ore săptămână"}),visual:m.jsx(v1,{data:n.hours_weekly_series}),children:[m.jsx(js,{c:r,value:n.hours_this_week,unit:"h"}),m.jsxs(ua,{c:r,children:[i>=0?"↑":"↓"," ",Math.abs(i),"h vs ",e("projects_kpi_prev_week",{defaultValue:"săpt. trecută"})]})]}),m.jsxs(Ls,{c:r,tone:"warning",label:e("projects_sarcini_active",{defaultValue:"Sarcini active"}),visual:m.jsx(D1,{segments:[{value:n.tasks_done,total:n.tasks_total,color:r.successText,trackColor:r.successBg},{value:n.tasks_in_progress,total:n.tasks_total,color:r.warningText,trackColor:r.
2warningBg},{value:n.tasks_overdue,total:n.tasks_total,color:r.dangerText,trackColor:r.dangerBg}]}),children:[m.jsx(js,{c:r,value:n.tasks_active,unit:` / ${n.tasks_total}`}),n.tasks_overdue>0?m.jsxs(ua,{c:r,color:r.dangerText,weight:"600",children:[n.tasks_overdue," ",e("projects_kpi_overdue",{defaultValue:"întârziate"})]}):m.jsx(ua,{c:r,children:e("projects_kpi_on_track",{defaultValue:"la zi"})})]})]})}function Ls({c:n,tone:e,label:t,visual:r,children:i}){const a=F1(e,n);return m.jsxs(ni,{style:{width:"clamp(160px, 14vw, 200px)",minWidth:160,aspectRatio:`${1.618} / 1`,padding:Bt.space(2),display:"flex",flexDirection:"column",justifyContent:"space-between",flexShrink:0,position:"relative",overflow:"hidden"},children:[m.jsx(wi,{position:"absolute",top:Bt.space(2),right:Bt.space(2),opacity:.85,style:{pointerEvents:"none"},children:r}),m.jsx(xi,{fontSize:_t(10),color:a,textTransform:"uppercase",letterSpacing:.6,fontWeight:"700",lineHeight:12,children:t}),m.jsx("div",{className:I1,children:i})]})}function js({c:n,value:e,unit:t}){return m.jsxs("div",{className:M1,children:[m.jsx(xi,{fontWeight:"800",fontSize:_t(28),letterSpacing:-.4,lineHeight:28,color:n.text,style:{fontVariantNumeric:"tabular-nums"},children:e}),t&&m.jsx(xi,{fontSize:_t(12),color:n.textMuted,fontWeight:"500",children:t})]})}function ua({c:n,children:e,color:t,weight:r}){return m.jsx(xi,{fontSize:_t(11),color:t??n.textMuted,fontWeight:r??"500",opacity:.85,children:e})}function B1(n,e){return Er({queryKey:["project_invoice_data",n],queryFn:async()=>{const{api:t}=await en(async()=>{const{api:i}=await import("./index-D14oYjMA.js").then(a=>a.c5);return{api:i}},__vite__mapDeps([0,1,2,3,4,5,6])),r=await t.get(`/taschi_bridge/bridge_api/projects/${n}/invoice_data`);return r?.data??r},enabled:e&&n>0,staleTime:15e3})}function R1(n){const e=Tr();return wa({mutationFn:async t=>{const{api:r}=await en(async()=>{const{api:i}=await import("./index-D14oYjMA.js").then(a=>a.c5);return{api:i}},__vite__mapDeps([0,1,2,3,4,5,6]));return r.post(`/taschi_bridge/bridge_api/projects/${n}/invoice`,t)},onSuccess:()=>{e.invalidateQueries({queryKey:["project_invoice_data",n]}),e.invalidateQueries({queryKey:["project_expenses",n]}),e.invalidateQueries({queryKey:["project_timesheets",n]}),e.invalidateQueries({queryKey:["project_dashboard",n]})},onError:t=>is.error(t?.message||"Eroare la generarea facturii")})}const pu={1:"Facturare la preț fix — o singură linie cu valoarea proiectului.",2:"Facturare pe ore — tarif orar al proiectului × ore pontate.",3:"Facturare pe ore — tariful orar al fiecărei sarcini."};function z1({open:n,onClose:e,projectId:t,onInvoiced:r}){const{t:i}=Kt(),{resolvedTheme:a}=Gt(),l=Yt[a],{data:o,isLoading:u,isError:d,refetch:h}=B1(t,n),b=R1(t),[x,p]=be.useState(new Set),[L,k]=be.useState(new Set),[C,y]=be.useState("single_line"),[V,q]=be.useState(!1),E=o?.project.billing_type===1,K=o?.currency?.symbol||"";be.useEffect(()=>{n&&o&&(p(new Set(o.billable_tasks.map(S=>S.id))),k(new Set(o.billable_expenses.map(S=>S.id))),y((o.project.billing_type===1,"single_line")))},[n,o]);function ae(S,P){const B=new Set(S);return B.has(P)?B.delete(P):B.add(P),B}const J=be.useMemo(()=>{if(!o)return 0;const S=E?x.size>0?o.project.project_cost:0:o.billable_tasks.filter(B=>x.has(B.id)).reduce((B,U)=>B+U.amount,0),P=o.billable_expenses.filter(B=>L.has(B.id)).reduce((B,U)=>B+U.amount,0);return S+P},[o,x,L,E]),H=(x.size>0||L.size>0)&&!b.isPending;function D(){if(!H)return;const S={task_ids:Array.from(x),expense_ids:Array.from(L),layout:E?"single_line":C,status:V?"sent":"draft"};b.mutate(S,{onSuccess:P=>{is.success(`Factură ${P.invoice_number} generată`,{description:`${P.total.toLocaleString("ro-RO",{maximumFractionDigits:2})} ${K}`.trim(),action:{label:"Deschide",onClick:()=>window.open(`/admin/invoices?id=${P.invoice_id}`,"_blank")}}),r?.(P.invoice_id,P.invoice_number),e()}})}const G=!!o&&o.billable_tasks.length===0&&o.billable_expenses.length===0;return m.jsx(Us,{open:n,onOpenChange:S=>{S||e()},title:i("projects_invoice_project",{defaultValue:"Facturează proiectul"}),titleEyebrow:i("projects_invoice_eyebrow",{defaultValue:"Facturare proiect"}),width:560,tabs:[],activeTab:"",onTabChange:()=>{},children:m.jsxs(Ui.Body,{children:[u&&m.jsx("div",{style:{padding:24,color:l.textMuted,fontSize:_t(14)},children:i("loading",{defaultValue:"Se încarcă…"})}),d&&m.jsx("div",{style:{padding:24},children:m.jsx(Ko,{tone:"error",action:{label:i("projects_reincearca",{defaultValue:"Reîncearcă"}),onClick:()=>h()},children:i("projects_invoice_load_error",{defaultValue:"Nu am putut încărca datele de facturare."})})}),o&&G&&m.jsx(Vs,{icon:m.jsx("span",{style:{fontSize:_t(22)},children:"🧾"}),title:i("projects_invoice_nothing_title",{defaultValue:"Nimic de facturat încă"}),hint:i("projects_invoice_nothing_desc",{defaultValue:"Marchează pontaje sau cheltuieli ca facturabile, apoi generează factura din proiect."})}),o&&!G&&m.jsxs(m.Fragment,{children:[m.jsx("div",{style:{margin:"4px 0 14px"},children:m.jsx(ni,{style:{padding:"10px 12px",fontSize:_t(12.5),color:l.textMuted,lineHeight:1.5},children:pu[o.project.billing_type]??pu[2]})}),o.billable_tasks.length>0&&m.jsxs(Ui.Section,{title:i("projects_invoice_tasks",{defaultValue:"Sarcini facturabile (ore)"}),children:[m.jsx(gu,{c:l,count:o.billable_tasks.length,selected:x.size,onToggle:()=>p(x.size===o.billable_tasks.length?new Set:new Set(o.billable_tasks.map(S=>S.id)))}),o.billable_tasks.map(S=>m.jsx(mu,{c:l,checked:x.has(S.id),onToggle:()=>p(P=>
2ae(P,S.id)),title:S.name,sub:`${S.hours.toLocaleString("ro-RO",{maximumFractionDigits:2})} h${S.rate?` × ${p1(Number(S.rate))} ${K}`:""}`,amount:E?null:`${S.amount.toLocaleString("ro-RO",{maximumFractionDigits:2})} ${K}`},S.id))]}),o.billable_expenses.length>0&&m.jsxs(Ui.Section,{title:i("projects_invoice_expenses",{defaultValue:"Cheltuieli facturabile"}),children:[m.jsx(gu,{c:l,count:o.billable_expenses.length,selected:L.size,onToggle:()=>k(L.size===o.billable_expenses.length?new Set:new Set(o.billable_expenses.map(S=>S.id)))}),o.billable_expenses.map(S=>m.jsx(mu,{c:l,checked:L.has(S.id),onToggle:()=>k(P=>ae(P,S.id)),title:S.name,sub:S.category_name||"",amount:`${S.amount.toLocaleString("ro-RO",{maximumFractionDigits:2})} ${K}`},S.id))]}),!E&&x.size>0&&m.jsx(Ui.Section,{title:i("projects_invoice_layout",{defaultValue:"Format factură"}),children:m.jsxs("div",{style:{display:"flex",gap:8},children:[m.jsx(vu,{c:l,active:C==="single_line",onClick:()=>y("single_line"),label:i("projects_invoice_single_line",{defaultValue:"O singură linie"})}),m.jsx(vu,{c:l,active:C==="task_per_item",onClick:()=>y("task_per_item"),label:i("projects_invoice_per_task",{defaultValue:"Linie per sarcină"})})]})}),m.jsx(Ui.Section,{title:i("projects_invoice_options",{defaultValue:"Opțiuni"}),children:m.jsxs("label",{style:{display:"flex",alignItems:"center",gap:8,cursor:"pointer",fontSize:_t(13.5),color:l.text},children:[m.jsx("input",{type:"checkbox",checked:V,onChange:S=>q(S.target.checked)}),i("projects_invoice_mark_sent",{defaultValue:"Finalizează factura (nu ciornă)"})]})}),m.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:12,paddingTop:16,marginTop:8,borderTop:`1px solid ${l.border}`},children:[m.jsxs("div",{children:[m.jsx("div",{style:{fontSize:_t(11),color:l.textMuted,textTransform:"uppercase",letterSpacing:.4},children:i("projects_invoice_est_total",{defaultValue:"Total estimat (fără TVA)"})}),m.jsxs("div",{style:{fontSize:_t(20),fontWeight:700,color:l.text},children:[J.toLocaleString("ro-RO",{maximumFractionDigits:2})," ",K]})]}),m.jsx(Ct,{primary:!0,onClick:D,disabled:!H,children:b.isPending?i("projects_invoice_generating",{defaultValue:"Se generează…"}):i("projects_invoice_generate",{defaultValue:"Generează factura"})})]})]})]})})}function gu({c:n,count:e,selected:t,onToggle:r}){const{t:i}=Kt(),a=t===e&&e>0;return m.jsxs("label",{style:{display:"flex",alignItems:"center",gap:8,cursor:"pointer",fontSize:_t(12),color:n.textMuted,padding:"2px 0 8px"},children:[m.jsx("input",{type:"checkbox",checked:a,onChange:r}),a?i("projects_invoice_deselect_all",{defaultValue:"Deselectează tot"}):i("projects_invoice_select_all",{defaultValue:"Selectează tot"}),m.jsxs("span",{style:{marginLeft:"auto"},children:[t,"/",e]})]})}function mu({c:n,checked:e,onToggle:t,title:r,sub:i,amount:a}){return m.jsxs("label",{style:{display:"flex",alignItems:"center",gap:10,cursor:"pointer",padding:"8px 10px",borderRadius:8,background:e?n.accentLight:"transparent",borderWidth:1,borderStyle:"solid",borderColor:e?n.accent:"transparent",marginBottom:4},children:[m.jsx("input",{type:"checkbox",checked:e,onChange:t}),m.jsxs("div",{style:{minWidth:0,flex:1},children:[m.jsx("div",{style:{fontSize:_t(13.5),color:n.text,fontWeight:500,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:r}),i?m.jsx("div",{style:{fontSize:_t(11.5),color:n.textMuted},children:i}):null]}),a?m.jsx("div",{style:{fontSize:_t(13.5),fontWeight:600,color:n.text,whiteSpace:"nowrap"},children:a}):null]})}function vu({c:n,active:e,onClick:t,label:r}){return m.jsx(Ct,{primary:e,"aria-pressed":e,onClick:t,style:{flex:1,justifyContent:"center"},children:r})}const q1="is_View _fd-row _fs-0 _ai-center ";function U1({projectId:n,activeTab:e,onOpenSettings:t,onOpenInvoice:r}){const{t:i}=Kt(),a=hh(),{resolvedTheme:l}=Gt(),o=Yt[l],u=e==="planuri"||e==="photo-log"?"documente":e==="pontaj"||e==="activitate"?"timp":e,d=[{id:"sarcini",label:i("project_tab_tasks",{defaultValue:"Sarcini"})},{id:"depozit",label:i("project_tab_stock",{defaultValue:"Depozit"})},{id:"address",label:i("project_tab_address",{defaultValue:"Adresă"})},{id:"documente",label:i("project_tab_documents",{defaultValue:"Documente & foto"})},{id:"timp",label:i("project_tab_time",{defaultValue:"Timp & activitate"})},{id:"cheltuieli",label:i("project_tab_expenses",{defaultValue:"Cheltuieli & buget"})},{id:"discutii",label:i("project_tab_discussions",{defaultValue:"Discuții"})}];return m.jsxs(xr,{tag:"nav",paddingHorizontal:Bt.space(4),paddingVertical:Bt.space(1),alignItems:"center",backgroundColor:"var(--theme-content-bg)",flexShrink:0,position:"sticky",top:0,zIndex:10,gap:14,children:[m.jsxs(xr,{gap:4,alignItems:"center",backgroundColor:o.subtleBg,borderRadius:10,padding:2,flexShrink:1,flexWrap:"nowrap",minWidth:0,style:{overflowX:"auto",scrollbarWidth:"none",WebkitOverflowScrolling:"touch"},children:[d.map(h=>{const b=h.id===u;return m.jsxs(xr,{tag:"button",cursor:"pointer",onPress:()=>a(`/admin/projects/${n}/${h.id}`),paddingVertical:5,paddingHorizontal:10,borderRadius:8,flexShrink:0,backgroundColor:b?o.cardBg:"transparent",alignItems:"center",gap:5,hoverStyle:b?{}:{backgroundColor:o.softSurfaceBg},animation:"quick",style:{transition:"all 0.18s ease",boxShadow:b?"0 1px 3px rgba(0,0,0,0.1)":"none"},children:[m.jsx(xi,{fontSize:_t(12),color:b?o.text:o.textMuted,fontWeight:b?"600":"500",style:{whiteSpace:"nowrap"},children:h.label}),h.badge!=null&&m.jsx(xi,{fontSize:_t(9),paddingVertical:0,paddingHorizontal:4,borderRadius:99,backgroundColor:b?o.accent:o.accentLight,color:b?o.onAccent:o.accent,fontWeight:"800",minWidth:16,textAlign:"center",children:h.badge})]}
2,h.id)}),r&&m.jsxs(m.Fragment,{children:[m.jsx(xr,{width:1,height:16,flexShrink:0,marginHorizontal:2,backgroundColor:o.border,borderRadius:1}),m.jsxs(xr,{tag:"button",cursor:"pointer",onPress:r,paddingVertical:5,paddingHorizontal:10,borderRadius:8,flexShrink:0,backgroundColor:o.accentLight,alignItems:"center",gap:5,hoverStyle:{opacity:.85,y:-1},animation:"quick",style:{transition:"all 0.18s ease"},children:[m.jsx(y1,{size:13,color:o.accent}),m.jsx(xi,{fontSize:_t(12),color:o.accent,fontWeight:"700",style:{whiteSpace:"nowrap"},children:i("project_tab_invoice",{defaultValue:"Facturare"})})]})]})]}),t&&m.jsx("div",{className:q1,children:m.jsx(Ct,{onClick:t,title:i("project_settings_title",{defaultValue:"Setări proiect"}),style:{width:30,height:30,padding:0,justifyContent:"center",borderRadius:"calc(6px * var(--theme-radius-scale, 1))"},children:m.jsx(x1,{size:16})})})]})}const V1=[{id:1,name:"Comandă armătură Ø12 — 2,4t pentru etaj 1",status:"todo",tags:["Structură","Urgent"],milestone_id:5,milestone_name:"Structură etaje 1—4",assignee_initials:"AM",assignee_name:"Andrei Munteanu",due_date:"2026-04-28",is_overdue:!0},{id:2,name:"Programare recepție structură subsol cu ISC",status:"todo",tags:["Autorizație"],milestone_id:3,milestone_name:"Structură subsol",assignee_initials:"MI",assignee_name:"Mihai Iordache",due_date:"2026-05-06",is_overdue:!1},{id:3,name:"Verificare nivel cote ±0.00 înainte de turnare",status:"todo",tags:["Structură"],milestone_id:4,milestone_name:"Cofraj & turnare parter",assignee_initials:"MI",assignee_name:"Mihai Iordache",due_date:"2026-05-02",is_overdue:!1},{id:4,name:"Cofrare placă peste parter — tronson A",status:"in_progress",tags:["Structură"],milestone_id:4,milestone_name:"Cofraj & turnare parter",assignee_initials:"MT",assignee_name:"Marius Tofan",due_date:"2026-04-29",is_overdue:!1,progress:60},{id:5,name:"Armare grinzi & centuri etaj parter",status:"in_progress",tags:["Structură"],milestone_id:4,milestone_name:"Cofraj & turnare parter",assignee_initials:"MT",assignee_name:"Marius Tofan",due_date:"2026-05-03",is_overdue:!1,photo_count:12},{id:6,name:"Revizie 4 plan structură et. 1 — A02",status:"in_progress",tags:["Plan"],milestone_id:5,milestone_name:"Structură etaje 1—4",assignee_initials:"CP",assignee_name:"Cristina Popa",due_date:"2026-04-30",is_overdue:!1},{id:7,name:"Turnare placă subsol — verificare cote",status:"review",tags:["Structură"],milestone_id:3,milestone_name:"Structură subsol",assignee_initials:"MI",assignee_name:"Mihai Iordache",due_date:"2026-04-28",is_overdue:!1},{id:8,name:"Aprobare schemă electrică tablou T1 (beneficiar)",status:"review",tags:["Instalații"],milestone_id:6,milestone_name:"Instalații electrice & sanitare",assignee_initials:"VD",assignee_name:"Vasile Dumitrescu",due_date:"2026-05-02",is_overdue:!1},{id:9,name:"Decofrare pereți subsol — partea estică",status:"done",tags:["Structură"],milestone_id:3,milestone_name:"Structură subsol",assignee_initials:"MT",assignee_name:"Marius Tofan",due_date:"2026-04-21",is_overdue:!1},{id:10,name:"Devize beton — săptămâna 16",status:"done",tags:["Devize"],milestone_id:4,milestone_name:"Cofraj & turnare parter",assignee_initials:"CP",assignee_name:"Cristina Popa",due_date:"2026-04-22",is_overdue:!1},{id:11,name:"Curățare șantier & sortare deșeuri",status:"done",tags:["Pregătire"],milestone_id:2,milestone_name:"Săpătură & fundație",assignee_initials:"XX",assignee_name:"+3",due_date:"2026-04-23",is_overdue:!1}],qo=typeof window<"u"&&new URLSearchParams(window.location.search).get("mock")==="1";async function W1(n){if(qo)return await new Promise(a=>setTimeout(a,150)),{tasks:V1};const{api:e}=await en(async()=>{const{api:a}=await import("./index-D14oYjMA.js").then(l=>l.c5);return{api:a}},__vite__mapDeps([0,1,2,3,4,5,6])),t=await e.get(`/taschi_bridge/bridge_api/projects/${n}/tasks`),r=t.data?.data??t.data;return{tasks:Array.isArray(r)?r:r?.tasks??[]}}function H1(n){return Er({queryKey:["project_tasks",n,qo],queryFn:()=>W1(n),staleTime:3e4,enabled:n>0,select:e=>e.tasks})}function $1(n){const e=Tr();return wa({mutationFn:async({taskId:t,milestone:r})=>{if(qo)return;const{api:i}=await en(async()=>{const{api:a}=await import("./index-D14oYjMA.js").then(l=>l.c5);return{api:a}},__vite__mapDeps([0,1,2,3,4,5,6]));
2return i.post(`/taschi_bridge/bridge_api/projects/${n}/tasks/${t}/status`,{milestone:r})},onMutate:async({taskId:t,milestone:r})=>{await e.cancelQueries({queryKey:["project_tasks",n]});const i=["project_tasks",n,qo],a=e.getQueryData(i);return a?.tasks&&e.setQueryData(i,{tasks:a.tasks.map(l=>l.id===t?{...l,milestone_id:r}:l)}),{prev:a,key:i}},onError:(t,r,i)=>{i?.prev&&e.setQueryData(i.key,i.prev),is.error("Eroare la mutarea sarcinii în etapă")},onSettled:()=>{e.invalidateQueries({queryKey:["project_tasks",n]}),e.invalidateQueries({queryKey:["project_gantt",n]})}})}function zr(){return zr=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},zr.apply(this,arguments)}function G1(n,e){if(n){if(typeof n=="string")return bu(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);if(t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set")return Array.from(n);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return bu(n,e)}}function bu(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t<e;t++)r[t]=n[t];return r}function yh(n,e){var t=typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(t)return(t=t.call(n)).next.bind(t);if(Array.isArray(n)||(t=G1(n))||e){t&&(n=t);var r=0;return function(){return r>=n.length?{done:!0}:{done:!1,value:n[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
3In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Ot;(function(n){n.Hour="Hour",n.QuarterDay="Quarter Day",n.HalfDay="Half Day",n.Day="Day",n.Week="Week",n.Month="Month",n.Year="Year"})(Ot||(Ot={}));var yu={},Uo=function(e,t){t===void 0&&(t={});var r=JSON.stringify([e,t]),i=yu[r];return i||(i=new Intl.DateTimeFormat(e,t),yu[r]=i),i},dn=function(e,t,r){var i=new Date(e.getFullYear()+(r==="year"?t:0),e.getMonth()+(r==="month"?t:0),e.getDate()+(r==="day"?t:0),e.getHours()+(r==="hour"?t:0),e.getMinutes()+(r==="minute"?t:0),e.getSeconds()+(r==="second"?t:0),e.getMilliseconds()+(r==="millisecond"?t:0));return i},sr=function(e,t){var r=["millisecond","second","minute","hour","day","month","year"],i=function(o){var u=r.indexOf(t);return r.indexOf(o)<=u},a=new Date(e.getFullYear(),i("year")?0:e.getMonth(),i("month")?1:e.getDate(),i("day")?0:e.getHours(),i("hour")?0:e.getMinutes(),i("minute")?0:e.getSeconds(),i("second")?0:e.getMilliseconds());return a},xu=function(e,t,r){for(var i=e[0].start,a=e[0].start,l=yh(e),o;!(o=l()).done;){var u=o.value;u.start<i&&(i=u.start),u.end>a&&(a=u.end)}switch(t){case Ot.Year:i=dn(i,-1,"year"),i=sr(i,"year"),a=dn(a,1,"year"),a=sr(a,"year");break;case Ot.Month:i=dn(i,-1*r,"month"),i=sr(i,"month"),a=dn(a,1,"year"),a=sr(a,"year");break;case Ot.Week:i=sr(i,"day"),i=dn(Y1(i),-7*r,"day"),a=sr(a,"day"),a=dn(a,1.5,"month");break;case Ot.Day:i=sr(i,"day"),i=dn(i,-1*r,"day"),a=sr(a,"day"),a=dn(a,19,"day");break;case Ot.QuarterDay:i=sr(i,"day"),i=dn(i,-1*r,"day"),a=sr(a,"day"),a=dn(a,66,"hour");break;case Ot.HalfDay:i=sr(i,"day"),i=dn(i,-1*r,"day"),a=sr(a,"day"),a=dn(a,108,"hour");break;case Ot.Hour:i=sr(i,"hour"),i=dn(i,-1*r,"hour"),a=sr(a,"day"),a=dn(a,1,"day");break}return[i,a]},wu=function(e,t,r){for(var i=new Date(e),a=[i];i<t;){switch(r){case Ot.Year:i=dn(i,1,"year");break;case Ot.Month:i=dn(i,1,"month");break;case Ot.Week:i=dn(i,7,"day");break;case Ot.Day:i=dn(i,1,"day");break;case Ot.HalfDay:i=dn(i,12,"hour");break;case Ot.QuarterDay:i=dn(i,6,"hour");break;case Ot.Hour:i=dn(i,1,"hour");break}a.push(i)}return a},Ns=function(e,t){var r=Uo(t,{month:"long"}).format(e);return r=r.replace(r[0],r[0].toLocaleUpperCase()),r},Dl=function(e,t,r){var i=Uo(t,{weekday:r}).format(e);return i=i.replace(i[0],i[0].toLocaleUpperCase()),i},Y1=function(e){var t=e.getDay(),r=e.getDate()-t+(t===0?-6:1);return new Date(e.setDate(r))},K1=function(e){var t=new Date(e.valueOf()),r=(t.getDay()+6)%7;t.setDate(t.getDate()-r+3);var i=t.valueOf();t.setMonth(0,1),t.getDay()!==4&&t.setMonth(0,1+(4-t.getDay()+7)%7);var a=(1+Math.ceil((i-t.valueOf())/6048e5)).toString();return a.length===1?"0"+a:a},X1=function(e,t){return new Date(t,e+1,0).getDate()},da={ganttTable:"_3_ygE",ganttTable_Header:"_1nBOt",ganttTable_HeaderSeparator:"_2eZzQ",ganttTable_HeaderItem:"_WuQ0f"},Z1=function(e){var t=e.headerHeight,r=e.fontFamily,i=e.fontSize,a=e.rowWidth;return xe.createElement("div",{className:da.ganttTable,style:{fontFamily:r,fontSize:i}},xe.createElement("div",{className:da.ganttTable_Header,style:{height:t-2}},xe.createElement("div",{className:da.ganttTable_HeaderItem,style:{minWidth:a}}," Name"),xe.createElement("div",{className:da.ganttTable_HeaderSeparator,style:{height:t*.5,marginTop:t*.2}}),xe.createElement("div",{className:da.ganttTable_HeaderItem,style:{minWidth:a}}," From"),xe.createElement("div",{className:da.ganttTable_HeaderSeparator,style:{height:t*.5,marginTop:t*.25}}),xe.createElement("div",{className:da.ganttTable_HeaderItem,style:{minWidth:a}}," To")))},Bi={taskListWrapper:"_3ZbQT",taskListTableRow:"_34SS0",taskListCell:"_3lLk3",taskListNameWrapper:"_nI1Xw",taskListExpander:"_2QjE6",taskListEmptyExpander:"_2TfEi"},_u={},J1=function(e){return function(t,r){var i=t.toString(),a=_u[i];return a||(a=t.toLocaleDateString(e,r),_u[i]=a),a}},Su={weekday:"short",year:"numeric",month:"long",day:"numeric"},Q1=function(e){var t=e.rowHeight,r=e.rowWidth,i=e.tasks,a=e.fontFamily,l=e.fontSize,o=e.locale,u=e.onExpanderClick,d=be.useMemo(function(){return J1(o)},[o]);return xe.createElement("div",{className:Bi.taskListWrapper,style:{fontFamily:a,fontSize:l}},i.map(function(h){var b="";return h.hideChildren===!1?b="▼":h.hideChildren===!0&&(b="▶"),xe.createElement("div",{className:Bi.taskListTableRow,style:{height:t},key:h.id+"row"},xe.createElement("div",{className:Bi.taskListCell,style:{minWidth:r,maxWidth:r},title:h.name},xe.createElement("div",{className:Bi.taskListNameWrapper},xe.createElement("div",{className:b?Bi.taskListExpander:Bi.taskListEmptyExpander,onClick:function(){return u(h)}},b),xe.createElement("div",null,h.name))),xe.createElement("div",{className:Bi.taskListCell,style:{minWidth:r,maxWidth:r}}," ",d(h.start,Su)),xe.createElement("div",{className:Bi.taskListCell,style:{minWidth:r,maxWidth:r}}," ",d(h.end,Su)))}))},Is={tooltipDefaultContainer:"_3T42e",tooltipDefaultContainerParagraph:"_29NTg",tooltipDetailsContainer:"_25P-K",tooltipDetailsContainerHidden:"_3gVAq"},ep=function(e){var t=e.task,r=e.rowHeight,i=e.rtl,a=e.svgContainerHeight,l=e.svgContainerWidth,o=e.scrollX,u=e.scrollY,d=e.arrowIndent,h=e.fontSize,b=e.fontFamily,x=e.headerHeight,p=e.taskListWidth,L=e.TooltipContent,k=be.useRef(null),C=be.useState(0),y=C[0],V=C[1],q=be.useState(0),E=q[0],K=q[1];return be.useEffect(function(){if(k.current){var ae=k.current.offsetHeight*1.1,J=k.current.offsetWidth*1.
31,H=t.index*r-u+x,D;if(i){D=t.x1-d*1.5-J-o,D<0&&(D=t.x2+d*1.5-o);var G=J+D;G>l&&(D=l-J,H+=r)}else{D=t.x2+d*1.5+p-o;var S=J+D,P=p+l;S>P&&(D=t.x1+p-d*1.5-o-J),D<p&&(D=l+p-J,H+=r)}var B=ae+H-u;B>a-u&&(H=a-ae),V(H),K(D)}},[k,t,d,o,u,x,p,r,a,l,i]),xe.createElement("div",{ref:k,className:E?Is.tooltipDetailsContainer:Is.tooltipDetailsContainerHidden,style:{left:E,top:y}},xe.createElement(L,{task:t,fontSize:h,fontFamily:b}))},tp=function(e){var t=e.task,r=e.fontSize,i=e.fontFamily,a={fontSize:r,fontFamily:i};return xe.createElement("div",{className:Is.tooltipDefaultContainer,style:a},xe.createElement("b",{style:{fontSize:r+6}},t.name+": "+t.start.getDate()+"-"+(t.start.getMonth()+1)+"-"+t.start.getFullYear()+" - "+t.end.getDate()+"-"+(t.end.getMonth()+1)+"-"+t.end.getFullYear()),t.end.getTime()-t.start.getTime()!==0&&xe.createElement("p",{className:Is.tooltipDefaultContainerParagraph},"Duration: "+~~((t.end.getTime()-t.start.getTime())/(1e3*60*60*24))+" day(s)"),xe.createElement("p",{className:Is.tooltipDefaultContainerParagraph},!!t.progress&&"Progress: "+t.progress+" %"))},np={scroll:"_1eT-t"},rp=function(e){var t=e.scroll,r=e.ganttHeight,i=e.ganttFullHeight,a=e.headerHeight,l=e.rtl,o=e.onScroll,u=be.useRef(null);return be.useEffect(function(){u.current&&(u.current.scrollTop=t)},[t]),xe.createElement("div",{style:{height:r,marginTop:a,marginLeft:l?"":"-1rem"},className:np.scroll,onScroll:o,ref:u},xe.createElement("div",{style:{height:i,width:1}}))},ip=function(e){var t=e.headerHeight,r=e.fontFamily,i=e.fontSize,a=e.rowWidth,l=e.rowHeight,o=e.scrollY,u=e.tasks,d=e.selectedTask,h=e.setSelectedTask,b=e.onExpanderClick,x=e.locale,p=e.ganttHeight,L=e.taskListRef,k=e.horizontalContainerClass,C=e.TaskListHeader,y=e.TaskListTable,V=be.useRef(null);be.useEffect(function(){V.current&&(V.current.scrollTop=o)},[o]);var q={headerHeight:t,fontFamily:r,fontSize:i,rowWidth:a},E=d?d.id:"",K={rowHeight:l,rowWidth:a,fontFamily:r,fontSize:i,tasks:u,locale:x,selectedTaskId:E,setSelectedTask:h,onExpanderClick:b};return xe.createElement("div",{ref:L},xe.createElement(C,Object.assign({},q)),xe.createElement("div",{ref:V,className:k,style:p?{height:p}:{}},xe.createElement(y,Object.assign({},K))))},ko={gridRow:"_2dZTy",gridRowLine:"_3rUKi",gridTick:"_RuwuK"},ap=function(e){for(var t=e.tasks,r=e.dates,i=e.rowHeight,a=e.svgWidth,l=e.columnWidth,o=e.todayColor,u=e.rtl,d=0,h=[],b=[xe.createElement("line",{key:"RowLineFirst",x:"0",y1:0,x2:a,y2:0,className:ko.gridRowLine})],x=yh(t),p;!(p=x()).done;){var L=p.value;h.push(xe.createElement("rect",{key:"Row"+L.id,x:"0",y:d,width:a,height:i,className:ko.gridRow})),b.push(xe.createElement("line",{key:"RowLine"+L.id,x:"0",y1:d+i,x2:a,y2:d+i,className:ko.gridRowLine})),d+=i}for(var k=new Date,C=0,y=[],V=xe.createElement("rect",null),q=0;q<r.length;q++){var E=r[q];y.push(xe.createElement("line",{key:E.getTime(),x1:C,y1:0,x2:C,y2:d,className:ko.gridTick})),(q+1!==r.length&&E.getTime()<k.getTime()&&r[q+1].getTime()>=k.getTime()||q!==0&&q+1===r.length&&E.getTime()<k.getTime()&&dn(E,E.getTime()-r[q-1].getTime(),"millisecond").getTime()>=k.getTime())&&(V=xe.createElement("rect",{x:C,y:0,width:l,height:d,fill:o})),u&&q+1!==r.length&&E.getTime()>=k.getTime()&&r[q+1].getTime()<k.getTime()&&(V=xe.createElement("rect",{x:C+l,y:0,width:l,height:d,fill:o})),C+=l}return xe.createElement("g",{className:"gridBody"},xe.createElement("g",{className:"rows"},h),xe.createElement("g",{className:"rowLines"},b),xe.createElement("g",{className:"ticks"},y),xe.createElement("g",{className:"today"},V))},sp=function(e){return xe.createElement("g",{className:"grid"},xe.createElement(ap,Object.assign({},e)))},bi={calendarBottomText:"_9w8d5",calendarTopTick:"_1rLuZ",calendarTopText:"_2q1Kt",calendarHeader:"_35nLX"},Wa=function(e){var t=e.value,r=e.x1Line,i=e.y1Line,a=e.y2Line,l=e.xText,o=e.yText;return xe.createElement("g",{className:"calendarTop"},xe.createElement("line",{x1:r,y1:i,x2:r,y2:a,className:bi.calendarTopTick,key:t+"line"}),xe.createElement("text",{key:t+"text",y:o,x:l,className:bi.calendarTopText},t))}
3,op=function(e){var t=e.dateSetup,r=e.locale,i=e.viewMode,a=e.rtl,l=e.headerHeight,o=e.columnWidth,u=e.fontFamily,d=e.fontSize,h=function(){for(var D=[],G=[],S=l*.5,P=0;P<t.dates.length;P++){var B=t.dates[P],U=B.getFullYear();if(G.push(xe.createElement("text",{key:B.getFullYear(),y:l*.8,x:o*P+o*.5,className:bi.calendarBottomText},U)),P===0||B.getFullYear()!==t.dates[P-1].getFullYear()){var re=B.getFullYear().toString(),Q=void 0;a?Q=(6+P+B.getFullYear()+1)*o:Q=(6+P-B.getFullYear())*o,D.push(xe.createElement(Wa,{key:re,value:re,x1Line:o*P,y1Line:0,y2Line:l,xText:Q,yText:S*.9}))}}return[D,G]},b=function(){for(var D=[],G=[],S=l*.5,P=0;P<t.dates.length;P++){var B=t.dates[P],U=Ns(B,r);if(G.push(xe.createElement("text",{key:U+B.getFullYear(),y:l*.8,x:o*P+o*.5,className:bi.calendarBottomText},U)),P===0||B.getFullYear()!==t.dates[P-1].getFullYear()){var re=B.getFullYear().toString(),Q=void 0;a?Q=(6+P+B.getMonth()+1)*o:Q=(6+P-B.getMonth())*o,D.push(xe.createElement(Wa,{key:re,value:re,x1Line:o*P,y1Line:0,y2Line:S,xText:Q,yText:S*.9}))}}return[D,G]},x=function(){for(var D=[],G=[],S=1,P=l*.5,B=t.dates,U=B.length-1;U>=0;U--){var re=B[U],Q="";(U===0||re.getMonth()!==B[U-1].getMonth())&&(Q=Ns(re,r)+", "+re.getFullYear());var de="W"+K1(re);G.push(xe.createElement("text",{key:re.getTime(),y:l*.8,x:o*(U+ +a),className:bi.calendarBottomText},de)),Q&&(U!==B.length-1&&D.push(xe.createElement(Wa,{key:Q,value:Q,x1Line:o*U+S*o,y1Line:0,y2Line:P,xText:o*U+o*S*.5,yText:P*.9})),S=0),S++}return[D,G]},p=function(){for(var D=[],G=[],S=l*.5,P=t.dates,B=0;B<P.length;B++){var U=P[B],re=Dl(U,r,"short")+", "+U.getDate().toString();if(G.push(xe.createElement("text",{key:U.getTime(),y:l*.8,x:o*B+o*.5,className:bi.calendarBottomText},re)),B+1!==P.length&&U.getMonth()!==P[B+1].getMonth()){var Q=Ns(U,r);D.push(xe.createElement(Wa,{key:Q+U.getFullYear(),value:Q,x1Line:o*(B+1),y1Line:0,y2Line:S,xText:o*(B+1)-X1(U.getMonth(),U.getFullYear())*o*.5,yText:S*.9}))}}return[D,G]},L=function(){for(var D=[],G=[],S=i===Ot.HalfDay?2:4,P=l*.5,B=t.dates,U=0;U<B.length;U++){var re=B[U],Q=Uo(r,{hour:"numeric"}).format(re);if(G.push(xe.createElement("text",{key:re.getTime(),y:l*.8,x:o*(U+ +a),className:bi.calendarBottomText,fontFamily:u},Q)),U===0||re.getDate()!==B[U-1].getDate()){var de=Dl(re,r,"short")+", "+re.getDate()+" "+Ns(re,r);D.push(xe.createElement(Wa,{key:de+re.getFullYear(),value:de,x1Line:o*U+S*o,y1Line:0,y2Line:P,xText:o*U+S*o*.5,yText:P*.9}))}}return[D,G]},k=function(){for(var D=[],G=[],S=l*.5,P=t.dates,B=0;B<P.length;B++){var U=P[B],re=Uo(r,{hour:"numeric"}).format(U);if(G.push(xe.createElement("text",{key:U.getTime(),y:l*.8,x:o*(B+ +a),className:bi.calendarBottomText,fontFamily:u},re)),B!==0&&U.getDate()!==P[B-1].getDate()){var Q=P[B-1],de=Dl(Q,r,"long")+", "+Q.getDate()+" "+Ns(Q,r),se=(U.getHours()-24)/2;D.push(xe.createElement(Wa,{key:de+Q.getFullYear(),value:de,x1Line:o*B,y1Line:0,y2Line:S,xText:o*(B+se),yText:S*.9}))}}return[D,G]},C=[],y=[];switch(t.viewMode){case Ot.Year:var V=h();C=V[0],y=V[1];break;case Ot.Month:var q=b();C=q[0],y=q[1];break;case Ot.Week:var E=x();C=E[0],y=E[1];break;case Ot.Day:var K=p();C=K[0],y=K[1];break;case Ot.QuarterDay:case Ot.HalfDay:var ae=L();C=ae[0],y=ae[1];break;case Ot.Hour:var J=k();C=J[0],y=J[1]}return xe.createElement("g",{className:"calendar",fontSize:d,fontFamily:u},xe.createElement("rect",{x:0,y:0,width:o*t.dates.length,height:l,className:bi.calendarHeader}),y," ",C)};typeof Symbol<"u"&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")));typeof Symbol<"u"&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));function Ml(n,e){try{var t=n()}catch(r){return e(r)}return t&&t.then?t.then(void 0,e):t}var lp=function(e){var t=e.taskFrom,r=e.taskTo,i=e.rowHeight,a=e.taskHeight,l=e.arrowIndent,o=e.rtl,u,d;if(o){var h=up(t,r,i,a,l);u=h[0],d=h[1]}else{var b=cp(t,r,i,a,l);u=b[0],d=b[1]}return xe.createElement("g",{className:"arrow"},xe.createElement("path",{strokeWidth:"1.5",d:u,fill:"none"}),xe.createElement("polygon",{points:d}))},cp=function(e,t,r,i,a){var l=e.index>t.index?-1:1,o=t.y+i/2,u=e.x2+a*2,d=u<t.x1?"":"H "+(t.x1-a),h=u>t.x1?a:t.x1-e.x2-a,b="M "+e.x2+" "+(e.y+i/2)+` 
4  h `+a+` 
5  v `+l*r/2+` 
6  `+d+`
7  V `+o+` 
8  h `+h,x=t.x1+","+o+` 
9  `+(t.x1-5)+","+(o-5)+` 
10  `+(t.x1-5)+","+(o+5);return[b,x]},up=function(e,t,r,i,a){var l=e.index>t.index?-1:1,o=t.y+i/2,u=e.x1-a*2,d=u>t.x2?"":"H "+(t.x2+a),h=u<t.x2?-a:t.x2-e.x1+a,b="M "+e.x1+" "+(e.y+i/2)+` 
11  h `+-a+` 
12  v `+l*r/2+` 
13  `+d+`
14  V `+o+` 
15  h `+h,x=t.x2+","+o+` 
16  `+(t.x2+5)+","+(o+5)+` 
17  `+(t.x2+5)+","+(o-5);return[b,x]},dp=function(e,t,r,i,a,l,o,u,d,h,b,x,p,L,k,C,y,V){var q=e.map(function(E,K){return hp(E,K,t,r,i,a,l,o,u,d,h,b,x,p,L,k,C,y,V)});return q=q.map(function(E){for(var K=E.dependencies||[],ae=function(D){var G=q.findIndex(function(S){return S.id===K[D]});G!==-1&&q[G].barChildren.push(E)},J=0;J<K.length;J++)ae(J);return E}),q},hp=function(e,t,r,i,a,l,o,u,d,h,b,x,p,L,k,C,y,V,q){var E;switch(e.type){case"milestone":E=fp(e,t,r,i,a,l,o,u,V,q);break;case"project":E=Au(e,t,r,i,a,l,o,u,d,L,k,C,y);break;default:E=Au(e,t,r,i,a,l,o,u,d,h,b,x,p);break}return E}
17,Au=function(e,t,r,i,a,l,o,u,d,h,b,x,p){var L,k;d?(k=ku(e.start,r,i),L=ku(e.end,r,i)):(L=Vo(e.start,r,i),k=Vo(e.end,r,i));var C=e.type;C==="task"&&k-L<u*2&&(C="smalltask",k=L+u*2);var y=Ms(L,k,e.progress,d),V=y[0],q=y[1],E=xh(t,a,l),K=e.type==="project"?e.hideChildren:void 0,ae=zr({backgroundColor:x,backgroundSelectedColor:p,progressColor:h,progressSelectedColor:b},e.styles);return zr({},e,{typeInternal:C,x1:L,x2:k,y:E,index:t,progressX:q,progressWidth:V,barCornerRadius:o,handleWidth:u,hideChildren:K,height:l,barChildren:[],styles:ae})},fp=function(e,t,r,i,a,l,o,u,d,h){var b=Vo(e.start,r,i),x=xh(t,a,l),p=b-l*.5,L=b+l*.5,k=l/1.414,C=zr({backgroundColor:d,backgroundSelectedColor:h,progressColor:"",progressSelectedColor:""},e.styles);return zr({},e,{end:e.start,x1:p,x2:L,y:x,index:t,progressX:0,progressWidth:0,barCornerRadius:o,handleWidth:u,typeInternal:e.type,progress:0,height:k,hideChildren:void 0,barChildren:[],styles:C})},Vo=function(e,t,r){var i=t.findIndex(function(u){return u.getTime()>=e.getTime()})-1,a=e.getTime()-t[i].getTime(),l=a/(t[i+1].getTime()-t[i].getTime()),o=i*r+l*r;return o},ku=function(e,t,r){var i=Vo(e,t,r);return i+=r,i},xh=function(e,t,r){var i=e*t+(t-r)/2;return i},Ms=function(e,t,r,i){var a=(t-e)*r*.01,l;return i?l=t-a:l=e,[a,l]},pp=function(e,t){if(e>=t.x2)return 100;if(e<=t.x1)return 0;var r=t.x2-t.x1,i=Math.round((e-t.x1)*100/r);return i},gp=function(e,t){if(e>=t.x2)return 0;if(e<=t.x1)return 100;var r=t.x2-t.x1,i=Math.round((t.x2-e)*100/r);return i},wh=function(e,t,r){var i=[e-5,t+r,e+5,t+r,e,t+r-8.66];return i.join(",")},mp=function(e,t,r){e>=r.x2-r.handleWidth*2&&(e=r.x2-r.handleWidth*2);var i=Math.round((e-r.x1)/t),a=i*t,l=r.x1+a;return l},vp=function(e,t,r){e<=r.x1+r.handleWidth*2&&(e=r.x1+r.handleWidth*2);var i=Math.round((e-r.x2)/t),a=i*t,l=r.x2+a;return l},_h=function(e,t,r){var i=Math.round((e-r.x1)/t),a=i*t,l=r.x1+a,o=l+r.x2-r.x1;return[l,o]},fa=function(e,t,r,i,a){var l=new Date((e-t)/i*a+r.getTime());return l=new Date(l.getTime()+(l.getTimezoneOffset()-r.getTimezoneOffset())*6e4),l},Lu=function(e,t,r,i,a,l,o){var u;return r.type==="milestone"?u=yp(e,t,r,i,a,l):u=bp(e,t,r,i,a,l,o),u},bp=function(e,t,r,i,a,l,o){var u=zr({},r),d=!1;switch(t){case"progress":if(o?u.progress=gp(e,r):u.progress=pp(e,r),d=u.progress!==r.progress,d){var h=Ms(u.x1,u.x2,u.progress,o),b=h[0],x=h[1];u.progressWidth=b,u.progressX=x}break;case"start":{var p=mp(e,i,r);if(u.x1=p,d=u.x1!==r.x1,d){o?u.end=fa(p,r.x1,r.end,i,a):u.start=fa(p,r.x1,r.start,i,a);var L=Ms(u.x1,u.x2,u.progress,o),k=L[0],C=L[1];u.progressWidth=k,u.progressX=C}break}case"end":{var y=vp(e,i,r);if(u.x2=y,d=u.x2!==r.x2,d){o?u.start=fa(y,r.x2,r.start,i,a):u.end=fa(y,r.x2,r.end,i,a);var V=Ms(u.x1,u.x2,u.progress,o),q=V[0],E=V[1];u.progressWidth=q,u.progressX=E}break}case"move":{var K=_h(e-l,i,r),ae=K[0],J=K[1];if(d=ae!==r.x1,d){u.start=fa(ae,r.x1,r.start,i,a),u.end=fa(J,r.x2,r.end,i,a),u.x1=ae,u.x2=J;var H=Ms(u.x1,u.x2,u.progress,o),D=H[0],G=H[1];u.progressWidth=D,u.progressX=G}break}}return{isChanged:d,changedTask:u}},yp=function(e,t,r,i,a,l){var o=zr({},r),u=!1;if(t==="move"){var d=_h(e-l,i,r),h=d[0],b=d[1];u=h!==r.x1,u&&(o.start=fa(h,r.x1,r.start,i,a),o.end=o.start,o.x1=h,o.x2=b)}return{isChanged:u,changedTask:o}};function xp(n){return n.key!==void 0}function wp(n){var e=n.filter(function(i){return i.hideChildren&&i.type==="project"});if(e.length>0)for(var t=function(a){var l=e[a],o=Sh(n,l);n=n.filter(function(u){return o.indexOf(u)===-1})},r=0;e.length>r;r++)t(r);return n}function Sh(n,e){var t=[];e.type!=="project"?t=n.filter(function(i){return i.dependencies&&i.dependencies.indexOf(e.id)!==-1}):t=n.filter(function(i){return i.project&&i.project===e.id});var r=[];return t.forEach(function(i){r.push.apply(r,Sh(n,i))}),t=t.concat(t,r),t}var _p=function(e,t){var r=e.displayOrder||Number.MAX_VALUE,i=t.displayOrder||Number.MAX_VALUE;return r>i?1:r<i?-1:0},Ws={barWrapper:"_KxSXS",barHandle:"_3w_5u",barBackground:"_31ERP"},Ah=function(e){var t=e.x,r=e.y,i=e.width,a=e.height,l=e.isSelected,o=e.progressX,u=e.progressWidth,d=e.barCornerRadius,h=e.styles,b=e.onMouseDown,x=function(){return l?h.progressSelectedColor:h.progressColor},p=function(){return l?h.backgroundSelectedColor:h.backgroundColor};return xe.createElement("g",{onMouseDown:b},xe.createElement("rect",{x:t,width:i,y:r,height:a,ry:d,rx:d,fill:p(),className:Ws.barBackgroun
17d}),xe.createElement("rect",{x:o,width:u,y:r,height:a,ry:d,rx:d,fill:x()}))},ju=function(e){var t=e.x,r=e.y,i=e.width,a=e.height,l=e.barCornerRadius,o=e.onMouseDown;return xe.createElement("rect",{x:t,y:r,width:i,height:a,className:Ws.barHandle,ry:l,rx:l,onMouseDown:o})},kh=function(e){var t=e.progressPoint,r=e.onMouseDown;return xe.createElement("polygon",{className:Ws.barHandle,points:t,onMouseDown:r})},Sp=function(e){var t=e.task,r=e.isProgressChangeable,i=e.isDateChangeable,a=e.rtl,l=e.onEventStart,o=e.isSelected,u=wh(+!a*t.progressWidth+t.progressX,t.y,t.height),d=t.height-2;return xe.createElement("g",{className:Ws.barWrapper,tabIndex:0},xe.createElement(Ah,{x:t.x1,y:t.y,width:t.x2-t.x1,height:t.height,progressX:t.progressX,progressWidth:t.progressWidth,barCornerRadius:t.barCornerRadius,styles:t.styles,isSelected:o,onMouseDown:function(b){i&&l("move",t,b)}}),xe.createElement("g",{className:"handleGroup"},i&&xe.createElement("g",null,xe.createElement(ju,{x:t.x1+1,y:t.y+1,width:t.handleWidth,height:d,barCornerRadius:t.barCornerRadius,onMouseDown:function(b){l("start",t,b)}}),xe.createElement(ju,{x:t.x2-t.handleWidth-1,y:t.y+1,width:t.handleWidth,height:d,barCornerRadius:t.barCornerRadius,onMouseDown:function(b){l("end",t,b)}})),r&&xe.createElement(kh,{progressPoint:u,onMouseDown:function(b){l("progress",t,b)}})))},Ap=function(e){var t=e.task,r=e.isProgressChangeable,i=e.isDateChangeable,a=e.onEventStart,l=e.isSelected,o=wh(t.progressWidth+t.x1,t.y,t.height);return xe.createElement("g",{className:Ws.barWrapper,tabIndex:0},xe.createElement(Ah,{x:t.x1,y:t.y,width:t.x2-t.x1,height:t.height,progressX:t.progressX,progressWidth:t.progressWidth,barCornerRadius:t.barCornerRadius,styles:t.styles,isSelected:l,onMouseDown:function(d){i&&a("move",t,d)}}),xe.createElement("g",{className:"handleGroup"},r&&xe.createElement(kh,{progressPoint:o,onMouseDown:function(d){a("progress",t,d)}})))},Nu={milestoneWrapper:"_RRr13",milestoneBackground:"_2P2B1"},kp=function(e){var t=e.task,r=e.isDateChangeable,i=e.onEventStart,a=e.isSelected,l="rotate(45 "+(t.x1+t.height*.356)+` 
18    `+(t.y+t.height*.85)+")",o=function(){return a?t.styles.backgroundSelectedColor:t.styles.backgroundColor};return xe.createElement("g",{tabIndex:0,className:Nu.milestoneWrapper},xe.createElement("rect",{fill:o(),x:t.x1,width:t.height,y:t.y,height:t.height,rx:t.barCornerRadius,ry:t.barCornerRadius,transform:l,className:Nu.milestoneBackground,onMouseDown:function(d){r&&i("move",t,d)}}))},Cs={projectWrapper:"_1KJ6x",projectBackground:"_2RbVy",projectTop:"_2pZMF"},Lp=function(e){var t=e.task,r=e.isSelected,i=r?t.styles.backgroundSelectedColor:t.styles.backgroundColor,a=r?t.styles.progressSelectedColor:t.styles.progressColor,l=t.x2-t.x1,o=[t.x1,t.y+t.height/2-1,t.x1,t.y+t.height,t.x1+15,t.y+t.height/2-1].join(","),u=[t.x2,t.y+t.height/2-1,t.x2,t.y+t.height,t.x2-15,t.y+t.height/2-1].join(",");return xe.createElement("g",{tabIndex:0,className:Cs.projectWrapper},xe.createElement("rect",{fill:i,x:t.x1,width:l,y:t.y,height:t.height,rx:t.barCornerRadius,ry:t.barCornerRadius,className:Cs.projectBackground}),xe.createElement("rect",{x:t.progressX,width:t.progressWidth,y:t.y,height:t.height,ry:t.barCornerRadius,rx:t.barCornerRadius,fill:a}),xe.createElement("rect",{fill:i,x:t.x1,width:l,y:t.y,height:t.height/2,rx:t.barCornerRadius,ry:t.barCornerRadius,className:Cs.projectTop}),xe.createElement("polygon",{className:Cs.projectTop,points:o,fill:i}),xe.createElement("polygon",{className:Cs.projectTop,points:u,fill:i}))},Cu={barLabel:"_3zRJQ",barLabelOutside:"_3KcaM"},jp=function(e){var t=zr({},e),r=t.task,i=t.arrowIndent,a=t.isDelete,l=t.taskHeight,o=t.isSelected,u=t.rtl,d=t.onEventStart,h=be.useRef(null),b=be.useState(xe.createElement("div",null)),x=b[0],p=b[1],L=be.useState(!0),k=L[0],C=L[1];be.useEffect(function(){switch(r.typeInternal){case"milestone":p(xe.createElement(kp,Object.assign({},e)));break;case"project":p(xe.createElement(Lp,Object.assign({},e)));break;case"smalltask":p(xe.createElement(Ap,Object.assign({},e)));break;default:p(xe.createElement(Sp,Object.assign({},e)));break}},[r,o]),be.useEffect(function(){h.current&&C(h.current.getBBox().width<r.x2-r.x1)},[h,r]);var y=function(){var q=r.x2-r.x1,E=r.barChildren.length>0;return k?r.x1+q*.5:u&&h.current?r.x1-h.current.getBBox().width-i*+E-i*.2:r.x1+q+i*+E+i*.2};return xe.createElement("g",{onKeyDown:function(q){q.key==="Delete"&&a&&d("delete",r,q),q.stopPropagation()},onMouseEnter:function(q){d("mouseenter",r,q)},onMouseLeave:function(q){d("mouseleave",r,q)},onDoubleClick:function(q){d("dblclick",r,q)},onClick:function(q){d("click",r,q)},onFocus:function(){d("select",r)}},x,xe.createElement("text",{x:y(),y:r.y+l*.5,className:k?Cu.barLabel:Cu.barLabelOutside,ref:h},r.name))},Np=function(e){var t,r=e.tasks,i=e.dates,a=e.ganttEvent,l=e.selectedTask,o=e.rowHeight,u=e.columnWidth,d=e.timeStep,h=e.svg,b=e.taskHeight,x=e.arrowColor,p=e.arrowIndent,L=e.fontFamily,k=e.fontSize,C=e.rtl,y=e.setGanttEvent,V=e.setFailedTask,q=e.setSelectedTask,E=e.onDateChange,K=e.onProgressChange,ae=e.onDoubleClick,J=e.onClick,H=e.onDelete,D=h==null||(t=h.current)===null||t===void 0?void 0:t.createSVGPoint(),G=be.useState(0),S=G[0],P=G[1],B=be.useState(0),U=B[0],re=B[1],Q=be.useState(!1),de=Q[0],se=Q[1];be.useEffect(function(){var we=i[1].getTime()-i[0].getTime()-i[1].getTimezoneOffset()*60*1e3+i[0].getTimezoneOffset()*60*1e3,te=d*u/we;P(te)},[u,i,d]),be.useEffect(function(){var we=function(I){try{var W;if(!a.changedTask||!D||!(h!=null&&h.current))return Promise.resolve();I.preventDefault(),D.x=I.clientX;var $=D.matrixTransform(h==null||(W=h.current.getScreenCTM())===null||W===void 0?void 0:W.inverse()),X=Lu($.x,a.action,a.changedTask,S,d,U,C),ie=X.isChanged,ue=X.changedTask;return ie&&y({action:a.action,changedTask:ue}),Promise.resolve()}catch(he){return Promise.reject(he)}},te=function A(I){try{var W,$=function(){Ce||V(ie)},X=a.action,ie=a.originalSelectedTask,ue=a.changedTask;if(!ue||!D||!(h!=null&&h.current)||!ie)return Promise.resolve();I.preventDefault(),D.x=I.clientX;var he=D.matrixTransform(h==null||(W=h.current.getScreenCTM())===null||W===void 0?void 0:W.inverse()),me=Lu(he.x,X,ue,S,d,U,C),Se=me.changedTask,Te=ie.start!==Se.start||ie.end!==Se.end||ie.progress!==Se.progress;h.current.removeEventListener("mousemove",we),h.current.removeEventListener("mouseup",A),y({action:""}),se(!1);var Ce=!0,Fe=(function(){if((X==="move"||X==="end"||X==="start")&&E&&Te){var F=Ml(function(){return Promise.resolve(E(Se,Se.barChildren)).then(function(et){et!==void 0&&(Ce=et)})},function(){Ce=!1});if(F&&F.then)return F.then(function(){})}else{var Ne=(function(){if(K&&Te){var et=Ml(function(){return Promise.resolve(K(Se,Se.barChildren)).then(function(Ve){Ve!==void 0&&(Ce=Ve)})},function(){Ce=!1});if(et&&et.then)return et.then(function(){})}})();if(Ne&&Ne.then)return Ne.then(function(){})}})();return Promise.resolve(Fe&&Fe.then?Fe.then($):$(Fe))}catch(F){return Promise.reject(F)}};!de&&(a.action==="move"||a.action==="end"||a.action==="start"||a.action==="progress")&&h!==null&&h!==void 0&&h.current&&(h.current.addEventListener("mousemove",we),h.current.addEventListener("mouseup",te),se(!0))},[a,S,U,K,d,E,h,de,D,C,V,y]);var fe=function(te,A,I){try{return Promise.resolve((function(){if(!I)te==="select"&&q(A.id);else return(function(){if(xp(I)){var W=(function(){if(te==="delete"){var ie=(function(){if(H){var ue=Ml(function(){return Promise.resolve(H(A)).then(function(he){he!==void 0&&he&&y({action:te,changedTask:A})})},function(he){console.error("Error on Delete. "+he)});if(ue&&ue.then)return ue.then(function(){})}})();if(ie&&ie.then)return ie.then(function(){})}})();if(W&&W.then)return W.then(function(){})}else if(te==="mouseenter")a.action||y({action:te,changedTask:A,originalSelectedTask:A});else if(te==="mouseleave")a.action==="mouseenter"&&y({action:""});else if(te==="dblclick")ae&&ae(A);else if(te==="click")J&&J(A);else if(te==="move"){var $;if(!(h!=null&&h.current)||!D)return;D.x=I.clientX;var X=D.matrixTransform(($=h.current.getScreenCTM())===null||$===void 0?void 0:$.inverse());re(X.x-A.x1),y({action:te,changedTask:A,originalSelectedTask:A})}else y({action:te,changedTask:A,originalSelectedTask:A})})()})())}catch(W){return Promise.reject(W)}};return xe.createElement("g",{className:"content"},xe.createElement("g",{className:"arrows",fill:x,stroke:x},r.map(function(we){return we.barChildren.map(function(te){return xe.createElement(lp,{key:"Arrow from "+we.id+" to "+r[te.index].id,taskFrom:we,taskTo:r[te.index],rowHeight:o,taskHeight:b,arrowIndent:p,rtl:C})})})),xe.createElement("g",{className:"bar",fontFamily:L,fontSize:k},r.map(function(we){return xe.createElement(jp,{task:we,arrowIndent:p,taskHeight:b,isProgressChangeable:!!K&&!we.isDisabled,isDateChangeable:!!E&&!we.isDisabled,isDelete:!we.isDisabled,onEventStart:fe,key:we.id,isSelected:!!l&&we.id===l.id,rtl:C})})))},Wo={ganttVerticalContainer:"_CZjuD",horizontalContainer:"_2B2zv",wrapper:"_3eULf"},Cp=function(e){var t=e.gridProps,r=e.calendarProps,i=e.barProps,a=e.ganttHeight,l=e.scrollY,o=e.scrollX,u=be.useRef(null),d=be.useRef(null),h=be.useRef(null),b=zr({},i,{svg:u});return be.useEffect(function(){d.current&&(d.current.scrollTop=l)},[l]),be.useEffect(function(){h.current&&(h.current.scrollLeft=o)}
18,[o]),xe.createElement("div",{className:Wo.ganttVerticalContainer,ref:h,dir:"ltr"},xe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:t.svgWidth,height:r.headerHeight,fontFamily:i.fontFamily},xe.createElement(op,Object.assign({},r))),xe.createElement("div",{ref:d,className:Wo.horizontalContainer,style:a?{height:a,width:t.svgWidth}:{width:t.svgWidth}},xe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:t.svgWidth,height:i.rowHeight*i.tasks.length,fontFamily:i.fontFamily,ref:u},xe.createElement(sp,Object.assign({},t)),xe.createElement(Np,Object.assign({},b)))))},Pu={scrollWrapper:"_2k9Ys",scroll:"_19jgW"},Pp=function(e){var t=e.scroll,r=e.svgWidth,i=e.taskListWidth,a=e.rtl,l=e.onScroll,o=be.useRef(null);return be.useEffect(function(){o.current&&(o.current.scrollLeft=t)},[t]),xe.createElement("div",{dir:"ltr",style:{margin:a?"0px "+i+"px 0px 0px":"0px 0px 0px "+i+"px"},className:Pu.scrollWrapper,onScroll:l,ref:o},xe.createElement("div",{style:{width:r},className:Pu.scroll}))},Tp=function(e){var t=e.tasks,r=e.headerHeight,i=r===void 0?50:r,a=e.columnWidth,l=a===void 0?60:a,o=e.listCellWidth,u=o===void 0?"155px":o,d=e.rowHeight,h=d===void 0?50:d,b=e.ganttHeight,x=b===void 0?0:b,p=e.viewMode,L=p===void 0?Ot.Day:p,k=e.preStepsCount,C=k===void 0?1:k,y=e.locale,V=y===void 0?"en-GB":y,q=e.barFill,E=q===void 0?60:q,K=e.barCornerRadius,ae=K===void 0?3:K,J=e.barProgressColor,H=J===void 0?"#a3a3ff":J,D=e.barProgressSelectedColor,G=D===void 0?"#8282f5":D,S=e.barBackgroundColor,P=S===void 0?"#b8c2cc":S,B=e.barBackgroundSelectedColor,U=B===void 0?"#aeb8c2":B,re=e.projectProgressColor,Q=re===void 0?"#7db59a":re,de=e.projectProgressSelectedColor,se=de===void 0?"#59a985":de,fe=e.projectBackgroundColor,we=fe===void 0?"#fac465":fe,te=e.projectBackgroundSelectedColor,A=te===void 0?"#f7bb53":te,I=e.milestoneBackgroundColor,W=I===void 0?"#f1c453":I,$=e.milestoneBackgroundSelectedColor,X=$===void 0?"#f29e4c":$,ie=e.rtl,ue=ie===void 0?!1:ie,he=e.handleWidth,me=he===void 0?8:he,Se=e.timeStep,Te=Se===void 0?3e5:Se,Ce=e.arrowColor,Fe=Ce===void 0?"grey":Ce,F=e.fontFamily,Ne=F===void 0?"Arial, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue":F,et=e.fontSize,Ve=et===void 0?"14px":et,ke=e.arrowIndent,Ke=ke===void 0?20:ke,Ee=e.todayColor,Xe=Ee===void 0?"rgba(252, 248, 227, 0.5)":Ee,Oe=e.viewDate,kt=e.TooltipContent,vt=kt===void 0?tp:kt,rt=e.TaskListHeader,bt=rt===void 0?Z1:rt,mt=e.TaskListTable,Re=mt===void 0?Q1:mt,at=e.onDateChange,We=e.onProgressChange,nn=e.onDoubleClick,xt=e.onClick,ut=e.onDelete,ot=e.onSelect,Dt=e.onExpanderClick,ze=be.useRef(null),Tt=be.useRef(null),Ze=be.useState(function(){var ht=xu(t,L,C),yt=ht[0],ft=ht[1];return{viewMode:L,dates:wu(yt,ft,L)}}),Je=Ze[0],Vt=Ze[1],dt=be.useState(void 0),Ye=dt[0],Lt=dt[1],Wr=be.useState(0),fn=Wr[0],Sr=Wr[1],cr=be.useState(0),Qe=cr[0],Dr=cr[1],Ar=be.useState(x),Zn=Ar[0],Vn=Ar[1],Xt=be.useState([]),Et=Xt[0],on=Xt[1],Hr=be.useState({action:""}),Wn=Hr[0],Jn=Hr[1],Qn=be.useMemo(function(){return h*E/100},[h,E]),er=be.useState(),Dn=er[0],tr=er[1],$r=be.useState(null),Hn=$r[0],Gr=$r[1],Mn=Je.dates.length*l,ur=Et.length*h,ii=be.useState(0),dr=ii[0],ai=ii[1],$i=be.useState(-1),nr=$i[0],jn=$i[1],_i=be.useState(!1),Gi=_i[0],kr=_i[1];be.useEffect(function(){var ht;Dt?ht=wp(t):ht=t,ht=ht.sort(_p);var yt=xu(ht,L,C),ft=yt[0],jt=yt[1],Pt=wu(ft,jt,L);ue&&(Pt=Pt.reverse(),nr===-1&&jn(Pt.length*l)),Vt({dates:Pt,viewMode:L}),on(dp(ht,Pt,l,h,Qn,ae,me,ue,H,G,P,U,Q,se,we,A,W,X))},[t,L,C,h,ae,l,Qn,me,H,G,P,U,Q,se,we,A,W,X,ue,nr,Dt]),be.useEffect(function(){if(L===Je.viewMode&&(Oe&&!Ye||Oe&&Ye?.valueOf()!==Oe.valueOf())){var ht=Je.dates,yt=ht.findIndex(function(ft,jt){return Oe.valueOf()>=ft.valueOf()&&jt+1!==ht.length&&Oe.valueOf()<ht[jt+1].valueOf()});if(yt===-1)return;Lt(Oe),jn(l*yt)}},[Oe,l,Je.dates,Je.viewMode,L,Ye,Lt]),be.useEffect(function(){var ht=Wn.changedTask,yt=Wn.action;if(ht){if(yt==="delete")Jn({action:""}),on(Et.filter(function(Pt){return Pt.id!==ht.id}));else if(yt==="move"||yt==="end"||yt==="start"||yt==="progress"){var ft=Et.find(function(Pt){return Pt.id===ht.id});if(ft&&(ft.start.getTime()!==ht.start.getTime()||ft.end.getTime()!==ht.end.getTime()||ft.progress!==ht.progress)){var jt=Et.map(function(Pt){return Pt.id===ht.id?ht:Pt});on(jt)}}}},[Wn,Et]),be.useEffect(function(){Hn&&(on(Et.map(function(ht){return ht.id!==Hn.id?ht:Hn})),Gr(null))},[Hn,Et]),be.useEffect(function(){u||Sr(0),Tt.current&&Sr(Tt.current.offsetWidth)},[Tt,u]),be.useEffect(function(){ze.current&&Dr(ze.current.offsetWidth-fn)},[ze,fn]),be.useEffect(function(){Vn(x?x+i:t.length*h+i)},[x,t,i,h]),be.useEffect(function(){var ht,yt=function(jt){if(jt.shiftKey||jt.deltaX){var Pt=jt.deltaX?jt.deltaX:jt.deltaY,rn=nr+Pt;rn<0?rn=0:rn>Mn&&(rn=Mn),jn(rn),jt.preventDefault()}else if(x){var Mr=dr+jt.deltaY;Mr<0?Mr=0:Mr>ur-x&&(Mr=ur-x),Mr!==dr&&(ai(Mr),jt.preventDefault())}kr(!0)};
18return(ht=ze.current)===null||ht===void 0||ht.addEventListener("wheel",yt,{passive:!1}),function(){var ft;(ft=ze.current)===null||ft===void 0||ft.removeEventListener("wheel",yt)}},[ze,dr,nr,x,Mn,ue,ur]);var Aa=function(yt){dr!==yt.currentTarget.scrollTop&&!Gi?(ai(yt.currentTarget.scrollTop),kr(!0)):kr(!1)},ka=function(yt){nr!==yt.currentTarget.scrollLeft&&!Gi?(jn(yt.currentTarget.scrollLeft),kr(!0)):kr(!1)},La=function(yt){yt.preventDefault();var ft=dr,jt=nr,Pt=!0;switch(yt.key){case"Down":case"ArrowDown":ft+=h,Pt=!1;break;case"Up":case"ArrowUp":ft-=h,Pt=!1;break;case"Left":case"ArrowLeft":jt-=l;break;case"Right":case"ArrowRight":jt+=l;break}Pt?(jt<0?jt=0:jt>Mn&&(jt=Mn),jn(jt)):(ft<0?ft=0:ft>ur-x&&(ft=ur-x),ai(ft)),kr(!0)},hr=function(yt){var ft=Et.find(function(Pt){return Pt.id===yt}),jt=Et.find(function(Pt){return!!Dn&&Pt.id===Dn.id});ot&&(jt&&ot(jt,!1),ft&&ot(ft,!0)),tr(ft)},Si=function(yt){Dt&&yt.hideChildren!==void 0&&Dt(zr({},yt,{hideChildren:!yt.hideChildren}))},ss={columnWidth:l,svgWidth:Mn,tasks:t,rowHeight:h,dates:Je.dates,todayColor:Xe,rtl:ue},ln={dateSetup:Je,locale:V,viewMode:L,headerHeight:i,columnWidth:l,fontFamily:Ne,fontSize:Ve,rtl:ue},ja={tasks:Et,dates:Je.dates,ganttEvent:Wn,selectedTask:Dn,rowHeight:h,taskHeight:Qn,columnWidth:l,arrowColor:Fe,timeStep:Te,fontFamily:Ne,fontSize:Ve,arrowIndent:Ke,svgWidth:Mn,rtl:ue,setGanttEvent:Jn,setFailedTask:Gr,setSelectedTask:hr,onDateChange:at,onProgressChange:We,onDoubleClick:nn,onClick:xt,onDelete:ut},Lr={rowHeight:h,rowWidth:u,fontFamily:Ne,fontSize:Ve,tasks:Et,locale:V,headerHeight:i,scrollY:dr,ganttHeight:x,horizontalContainerClass:Wo.horizontalContainer,selectedTask:Dn,taskListRef:Tt,setSelectedTask:hr,onExpanderClick:Si,TaskListHeader:bt,TaskListTable:Re};return xe.createElement("div",null,xe.createElement("div",{className:Wo.wrapper,onKeyDown:La,tabIndex:0,ref:ze},u&&xe.createElement(ip,Object.assign({},Lr)),xe.createElement(Cp,{gridProps:ss,calendarProps:ln,barProps:ja,ganttHeight:x,scrollY:dr,scrollX:nr}),Wn.changedTask&&xe.createElement(ep,{arrowIndent:Ke,rowHeight:h,svgContainerHeight:Zn,svgContainerWidth:Qe,fontFamily:Ne,fontSize:Ve,scrollX:nr,scrollY:dr,task:Wn.changedTask,headerHeight:i,taskListWidth:fn,TooltipContent:vt,rtl:ue,svgWidth:Mn}),xe.createElement(rp,{ganttFullHeight:ur,ganttHeight:x,headerHeight:i,scroll:dr,onScroll:Aa,rtl:ue})),xe.createElement(Pp,{svgWidth:Mn,taskListWidth:fn,scroll:nr,rtl:ue,onScroll:ka}))};const Ep={tasks:[{id:"g1",name:"Predare amplasament",assignee_initials:"AM",assignee_name:"Andrei Munteanu",start:"2026-02-10",end:"2026-02-10",progress:100,status:"done",depen
18dencies:[]},{id:"g2",name:"Săpătură & fundație",assignee_initials:"MT",assignee_name:"Marius Tofan",start:"2026-02-14",end:"2026-03-22",progress:100,status:"done",dependencies:["g1"]},{id:"g3",name:"Structură subsol",assignee_initials:"MI",assignee_name:"Mihai Iordache",start:"2026-03-25",end:"2026-04-18",progress:100,status:"done",dependencies:["g2"]},{id:"g4",name:"Cofraj & turnare parter",assignee_initials:"CP",assignee_name:"Cristina Popa · arh.",start:"2026-04-18",end:"2026-06-07",progress:18,status:"in_progress",dependencies:["g3"]},{id:"g5",name:"Structură etaje 1—4",assignee_initials:"MI",assignee_name:"Mihai Iordache",start:"2026-04-23",end:"2026-06-28",progress:0,status:"planned",dependencies:["g3"]},{id:"g6",name:"Instalații electrice & sanitare",assignee_initials:"VD",assignee_name:"Vasile Dumitrescu · Florin Niță",start:"2026-06-15",end:"2026-08-12",progress:0,status:"planned",dependencies:[]},{id:"g7",name:"Închideri & ferestre",assignee_initials:"AM",assignee_name:"Andrei Munteanu",start:"2026-07-05",end:"2026-08-18",progress:0,status:"planned",dependencies:["g5"]},{id:"g8",name:"Finisaje & recepție",assignee_initials:"XX",assignee_name:"Echipă completă",start:"2026-08-05",end:"2026-09-05",progress:0,status:"planned",dependencies:[]}],photos:[{task_id:"g1",date:"2026-02-10",count:1},{task_id:"g2",date:"2026-03-28",count:28},{task_id:"g3",date:"2026-04-12",count:42}]},Lh=typeof window<"u"&&new URLSearchParams(window.location.search).get("mock")==="1";async function Dp(n,e){if(Lh)return await new Promise(a=>setTimeout(a,200)),Ep;const{api:t}=await en(async()=>{const{api:a}=await import("./index-D14oYjMA.js").then(l=>l.c5);return{api:a}},__vite__mapDeps([0,1,2,3,4,5,6])),r=e&&e!=="milestones"?`?group=${e}`:"";return(await t.get(`/taschi_bridge/bridge_api/projects/${n}/gantt${r}`)).data}function Mp(n,e="milestones"){return Er({queryKey:["project_gantt",n,e,Lh],queryFn:()=>Dp(n,e),staleTime:12e4,enabled:n>0})}function Ip(n,e){const t=e.endDate.getTime()-e.startDate.getTime(),r=new Date(n).getTime()-e.startDate.getTime(),i=e.width-e.leftOffset;return e.leftOffset+r/t*i}function Fp(n,e){return e.headerHeight+n*e.rowHeight+e.rowHeight/2}function Op({markers:n,taskOrder:e,bounds:t,style:r}){const{resolvedTheme:i}=Gt(),a=Yt[i];return n.length?m.jsx("svg",{style:{position:"absolute",top:0,left:0,pointerEvents:"none",overflow:"visible",...r},width:"100%",height:"100%",children:n.map((l,o)=>{const u=e.indexOf(l.task_id);if(u<0)return null;const d=Ip(new Date(l.date),t),h=Fp(u,t),b=new Date(l.date).toLocaleDateString("ro-RO",{day:"numeric",month:"short"});return m.jsxs("g",{transform:`translate(${d}, ${h-10})`,style:{pointerEvents:"auto",cursor:"pointer"},children:[m.jsx("title",{children:`${l.count} fotografi${l.count===1?"e":"i"} · ${b}`}),m.jsx("rect",{x:-9,y:-6,width:18,height:12,rx:2.5,fill:a.warningBg,stroke:a.warningText,strokeWidth:1.1}),m.jsx("rect",{x:-3.5,y:-8,width:7,height:3,rx:1,fill:a.warningBg,stroke:a.warningText,strokeWidth:1.1}),m.jsx("circle",{cx:0,cy:0,r:3,fill:"none",stroke:a.warningText,strokeWidth:1.2}),m.jsx("circle",{cx:0,cy:0,r:1.3,fill:a.warningText}),m.jsx("circle",{cx:5.5,cy:-3.2,r:.9,fill:a.warningText}),l.count>0&&m.jsxs("g",{transform:"translate(8, -7)",children:[m.jsx("circle",{r:6,fill:a.warningText,stroke:a.warningBg,strokeWidth:1.2}),m.jsx("text",{y:2.5,textAnchor:"middle",fontFamily:"Inter, sans-serif",style:{fontSize:_t(7.5)},fill:a.warningBg,fontWeight:700,children:l.count>99?"99+":l.count})]})]},o)})}):null}function Bp(n){return`hsl(${(n*47%360+360)%360} 45% 38%)`}const Rp=768,zp=38,qp=44,Il=50,Sc=200,Ac=160,Rs=80,uc=864e5;function Tu(n){const e=String(n.getDate()).padStart(2,"0"),t=String(n.getMonth()+1).padStart(2,"0");return`${e}.${t}.${n.getFullYear()}`}function Up(n){const e=new Date(n),t=e.getDay(),r=t===0?6:t-1;return e.setDate(e.getDate()-r),e}function Vp(n){const e=new Date(n),t=e.getDay();return t!==0&&e.setDate(e.getDate()+(7-t)),e}function jh(n,e){return Math.max(1,Math.round((Math.max(...e)-Math.min(...n))/uc))}function Wp(n,e){const t=jh(n,e),r=Math.max(7,Math.min(30,Math.ceil(t*.1))),i=Up(new Date(Math.min(...n)-r*uc)),a=Vp(new Date(Math.max(...e)+r*uc));return{ganttStart:i,ganttEnd:a,span:t,padDays:r}}function Hp(n){return n<14?"day":n<=90?"week":"month"}function Eu(n){return`taschi_gantt_viewMode_${n}`}function $p(n,e,t){const r=t?Ac:Sc;return({headerHeight:i,fontFamily:a,fontSize:l})=>m.jsxs("div",{style:{display:"flex",height:i,boxSizing:"border-box",alignItems:"center",borderBottom:`1px solid ${n.border}`,fontFamily:a,fontSize:l,fontWeight:500,color:n.textMuted,textTransform:"uppercase",letterSpacing:"0.05em"},children:[m.jsx("div",{style:{width:r,paddingLeft:12},children:e}),!t&&m.jsxs(m.Fragment,{children:[m.jsx("div",{style:{width:Rs,paddingLeft:8},children:or.t("projects_gantt_col_start",{defaultValue:"Start"})}),m.jsx("div",{style:{width:Rs,paddingLeft:8},children:or.t("projects_gantt_col_end",{defaultValue:"Final"})})]})]})}function Gp({assignees:n}){if(!n.length)return null;const e=n.slice(0,3),t=n.length-e.length;return m.jsxs("span",{style:{display:"inline-flex",alignItems:"center",marginLeft:"auto",flexShrink:0,paddingLeft:6},children:[e.map((r,i)=>m.jsx("span",{title:r.name,style:{width:18,height:18,borderRadius:"50%",background:Bp(r.id),color:zo.onAccent,fontSize:_t(9),fontWeight:700,display:"inline-flex",alignItems:"center",justifyContent:"center",border:"1.5px solid var(--theme-card-bg, #fff)",marginLeft:i===0?0:-6},children:r.initials},r.id)),t>0&&m.jsxs("span",{style:{fontSize:_t(10),fontWeight:600,color:"inherit",marginLeft:3,opacity:.7},children:["+",t]})]})}function Yp(n,e,t){const r=t?Ac:Sc;return({tasks:i,rowHeight:a,fontFamily:l,fontSize:o})=>m.jsx("div",{style:{fontFamily:l,fontSize:o},children:i.map(u=>{const d=u.type==="project"||String(u.id).startsWith("m"),h=!!u.project,b=u.styles?.backgroundColor||n.textMuted,x=e.get(String(u.id))?.assignees??[];return m.jsxs("div",{style:{display:"flex",height:a,boxSizing:"border-box",alignItems:"center",borderBottom:`1px solid ${n.border}`,background:d?n.subtleBg??"transparent":"transparent"},children:[m.jsxs("div",{style:{width:r,paddingLeft:h?t?22:30:12,paddingRight:8,color:n.text,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",fontWeight:d?700:500,display:"flex",alignItems:"center",gap:t?5:7},title:u.name,children:[d?m.jsx("span",{style:{width:8,height:8,borderRadius:"50%",background:b,flexShrink:0,outline:`3px solid ${b}22`}}):h?m.jsx("span",{style:{color:n.textSubtle,flexShrink:0},children:"└"}):null,m.jsx("span",{style:{minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:u.name}),!d&&!t&&m.jsx(Gp,{assignees:x})]}),!t&&m.jsxs(m.Fragment,{children:[m.jsx("div",{style:{width:Rs,paddingLeft:8,color:n.textMuted,fontVariantNumeric:"tabular-nums"},children:Tu(u.start)}),m.jsx("div",{style:{width:Rs,paddingLeft:8,color:n.textMuted,fontVariantNumeric:"tabular-nums"},children:Tu(u.end)})]})]},u.id)})})}const Fl=[{key:"month",label:or.t("projects_gantt_view_month",{defaultValue:"Lună"}),mode:Ot.Month,columnWidth:85},{key:"week",label:or.t("projects_gantt_view_week",{defaultValue:"Săptămână"}),mode:Ot.Week,columnWidth:70},{key:"day",label:or.t("projects_gantt_view_day",{defaultValue:"Zi"}),mode:Ot.Day,columnWidth:36}],Du=[{key:"milestones",label:or.t("projects_gantt_group_stages",{defaultValue:"Etape"}),colLabel:or.t("projects_gantt_col_stage",{defaultValue:"Etapă"})},{key:"members",label:or.t("projects_gantt_group_people",{defaultValue:"Oameni"}),colLabel:or.t("projects_gantt_col_person",{defaultValue:"Persoană"})},{key:"status",label:or.t("projects_gantt_group_status",{defaultValue:"Status"}),colLabel:or.t("projects_gantt_col_status",{defaultValue:"Status"})}];function Kp({projectId:n,onTaskClick:e}){const{t}=Kt(),{resolvedTheme:r}=Gt(),i=Yt[r],[a,l]=be.useState("milestones"),{data:o}=Mp(n,a),u=be.useRef(null),[d,h]=be.useState(820),[b,x]=be.useState(null),[p,L]=be.useState(!1),k=d<Rp,C=k?qp:zp,y=k?Ac:Sc+Rs*2,V=`${Math.round(y/(k?1:3))}px`,q={done:{bg:i.successText,progress:i.successText},in_progress:{bg:i.successBg,progress:i.successText},planned:{bg:i.subtleBg,progress:i.successText},blocked:{bg:i.dangerBg,progress:i.dangerText}};be.useEffect(()=>{if(!u.current)return;const te=new ResizeObserver(([A])=>h(A.contentRect.width));return te.observe(u.current),()=>te.disconnect()},[]),be.useEffect(()=>{const te=u.current;if(!te)return;const A=I=>{I.shiftKey||Math.abs(I.deltaX)>Math.abs(I.deltaY)||I.stopImmediatePropagation()};return te.addEventListener("wheel",A,{capture:!0}),()=>te.removeEventListener("wheel",A,{capture:!0})},[]),be.useEffect(()=>{if(!o?.tasks?.length||p)return;const te=localStorage.getItem(Eu(n));if(te&&["day","week","month"].includes(te))x(te);else{const A=o.tasks.map($=>new Date($.start).getTime()),I=o.tasks.map($=>new Date($.end).getTime()),W=jh(A,I);x(Hp(W))}L(!0)},[o,p,n]);const E=be.useCallback(te=>{x(te),localStorage.setItem(Eu(n),te)},[n]);if(be.useEffect(()=>{if(!u.current||!o?.tasks?.length)return;const te=setTimeout(()=>{const A=u.current;if(!A)return;const I=A.querySelector("[data-gantt-theme] .today")??A.querySelector(".today");if(I){const W=A.querySelector('[class*="scroll"]')??A.querySelector('div[style*="overflow"]');if(W){const $=I.getBoundingClientRect(),X=W.getBoundingClientRect(),ie=$.left-X.left-200;W.scrollLeft=Math.max(0,W.scrollLeft+ie)}}},300);return()=>clearTimeout(te)},[o,b]),!o)return m.jsx("div",{style:{flex:1,background:i.subtleBg,borderRadius:"calc(3px * var(--theme-radius-scale, 1))"}});if(!o.tasks||o.tasks.length===0)return m.jsx("div",{style:{flex:1,minHeight:120,display:"flex",alignItems:"center",justifyContent:"center"},children:m.jsx(Vs,{compact:!0,title:t("projects_gantt_empty",{defaultValue:"Gantt-ul apare după ce adaugi prima etapă."})})});if(!b)return m.jsx("div",{style:{flex:1,background:i.subtleBg,borderRadius:"calc(3px * var(--theme-radius-scale, 1))"}});const K=Fl.find(te=>te.key===b),ae=Du.find(te=>te.key===a),J=(te,A)=>{const I=new Date(te);return isNaN(I.getTime())?A:I},H=new Date,D=o.tasks.map((te,A)=>{const I=te,W=q[I.status]??q.planned,$=J(I.start,H),X=J(I.end,$),ie=I.type==="project",ue=ie||String(I.id).startsWith("m"),he=I.status==="done"||I.status==="blocked",me=ue&&I.color&&!he?I.color:W.bg,Se={id:I.id,name:I.name,start:$,end:X<$?$:X,progress:I.progress??0,displayOrder:A+1,dependencies:I.dependencies??[],styles:{backgroundColor:me,backgroundSelectedColor:me,progressColor:W.progress,progressSelectedColor:W.progress}};return ie?{...Se,type:"project",hideChildren:!1}:{...Se,type:"task",project:I.project??void 0}}),G=o.tasks.map(te=>te.id),S=D.map(te=>te.start.getTime()),P=D.map(te=>te.end.getTime()),{ganttStart:B,ganttEnd:U,span:re}=Wp(S,P),Q=re<14&&b==="month"?Fl.find(te=>te.key==="week"):K,de=parseInt(V,10),se={startDate:B,endDate:U,leftOffset:de,width:d,rowHeight:C,headerHeight:Il};a==="members"?o.tasks.filter(te=>String(te.id).startsWith("staff_")).length:a==="status"?o.tasks.filter(te=>String(te.id).startsWith("status_")).length:o.tasks.filter(te=>String(te.id).startsWith("m")).length,new Set(o.tasks.filter(te=>String(te.id).startsWith("t")).map(te=>te.task_id??te.id)).size;const fe=new Map;o.tasks.forEach(te=>{const A=String(te.id),I=te.task_id??(A.startsWith("t")?parseInt(A.slice(1),10):0);fe.set(A,{taskId:Number.isFinite(I)?I:0,assignees:te.assignees??[]})});const we=(te,A,I)=>m.jsx("div",{style:g1({isDark:r==="dark"}),children:te.map(W=>{const $=W.key===A;return m.jsx(Ct,{role:"tab","aria-selected":$,primary:$,onClick:()=>I(W.key),style:{padding:k?"4px 7px":"4px 10px",fontSize:_t(k?10:11)},children:W.label},W.key)})});return m.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:1},children:[m.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:k?6:10,gap:8,flexWrap:"nowrap"},children:[m.jsx("div",{style:{display:"flex",alignItems:"center",gap:8,flexShrink:0},children:we(Du.map(te=>({key:te.key,label:te.label})),a,l)}),m.jsx("div",{style:{display:"flex",alignItems:"center",gap:8,flexShrink:0},children:we(Fl.map(te=>({key:te.key,label:te.label})),b,E)})]}),m.jsxs("div",{ref:u,"data-gantt-theme":r,style:{flex:1,background:"var(--theme-card-bg)",borderWidth:1,borderStyle:"solid",borderColor:i.border,borderRadius:"calc(3px * var(--theme-radius-scale, 1))",overflow:"hidden",position:"relative",minHeight:0},children:[m.jsx(Tp,{tasks:D,viewMode:Q.mode,rowHeight:C,headerHeight:Il,columnWidth:Q.columnWidth,listCellWidth:V,ganttHe
18ight:C*D.length+Il+8,barFill:k?65:55,todayColor:"rgba(156,62,46,0.10)",arrowColor:i.cardBorder,fontFamily:"Inter, sans-serif",fontSize:k?"10px":"11px",barCornerRadius:2,locale:"ro",onClick:te=>{const A=fe.get(String(te.id));A&&A.taskId>0&&e?.(A.taskId)},TaskListHeader:$p(i,ae.colLabel,k),TaskListTable:Yp(i,fe,k)}),m.jsx(Op,{markers:o.photos??[],taskOrder:G,bounds:se})]})]})}const Xp={todo:{bg:"#f1f5f9",text:"#475569",label:"DE FĂCUT"},in_progress:{bg:"#dbeafe",text:"#1d4ed8",label:"ÎN LUCRU"},review:{bg:"#ede9fe",text:"#6d28d9",label:"VERIFICARE"},done:{bg:"#dcfce7",text:"#166534",label:"GATA"}};function Zp(n){if(!n||n==="0000-00-00")return"";const e=new Date(n);return Number.isNaN(e.getTime())?"":e.toLocaleDateString("ro-RO",{day:"numeric",month:"short"})}function Jp(n){return n.milestone_id!=null?String(n.milestone_id):"__none__"}function Qp(n){const e=(n.assignee_name||"").trim();return{...n,id:n.id,name:n.name,status:{id:Jp(n)},assigned_name:e,company:e||"—",lead_value:0,_hideKanbanHeaderPills:!0,_statusPill:Xp[n.status]??null,_metaLine
18:"",_dateRange:Zp(n.due_date),source_name:""}}const e2="is_View _fd-column ";function Mu(n){if(!n||n==="0000-00-00")return"—";const e=new Date(n);return isNaN(e.getTime())?"—":e.toLocaleDateString("ro-RO",{day:"numeric",month:"short"})}function t2({projectId:n,data:e}){const{resolvedTheme:t}=Gt(),r=Yt[t],{t:i}=Kt(),a=Tr(),l=H1(n),o=$1(n),{milestones:u,createMilestone:d,isCreating:h,reorderMilestones:b}=w1(n),[x,p]=be.useState(null),[L,k]=be.useState(!1),[C,y]=be.useState(""),[V,q]=be.useState(""),[E,K]=be.useState("");function ae(){k(!1),y(""),q(""),K("")}async function J(){const Q=C.trim();Q&&(await d({name:Q,start_date:V||void 0,due_date:E||void 0}),a.invalidateQueries({queryKey:["project_gantt",n]}),ae())}function H(){a.invalidateQueries({queryKey:["project_tasks",n]}),a.invalidateQueries({queryKey:["project_gantt",n]})}const D=be.useMemo(()=>{const Q=new Map;for(const de of l.data??[]){const se=de.milestone_id;if(se==null)continue;const fe=Q.get(se)??{total:0,done:0};fe.total+=1,de.status==="done"&&(fe.done+=1),Q.set(se,fe)}return Q},[l.data]),G=be.useMemo(()=>va(u).map(Q=>{const de=Q,se=de.start_date||de.due_date?`${Mu(de.start_date)} → ${Mu(de.due_date)}`:"",fe=D.get(Number(Q.id)),we=fe&&fe.total?`${fe.done}/${fe.total} gata`:"",te=[se,we].filter(Boolean).join("  ·  ");return{id:String(Q.id),name:Q.name,color:de.color&&String(de.color)||r.neutralText,subtitle:te||void 0}}),[u,D,r.neutralText]),S=be.useMemo(()=>va(l.data).map(Qp),[l.data]),P=t==="dark"?"rgba(255,255,255,0.03)":"rgba(0,0,0,0.03)",B=!1,U=A1(),re=U==="phone"?12:U==="foldTablet"?24:56;return m.jsxs("div",{className:e2,children:[m.jsxs(xr,{flexShrink:0,borderBottomWidth:1,borderBottomColor:r.border,children:[m.jsx(wi,{flex:1,minWidth:0,paddingHorizontal:re,paddingTop:22,paddingBottom:22,children:m.jsx(Kp,{projectId:n,onTaskClick:Q=>p({mode:"view",taskId:Q})})}),B]}),m.jsxs(wi,{paddingHorizontal:re,paddingVertical:18,gap:12,children:[m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,flexWrap:"wrap"},children:[m.jsx("span",{style:{fontSize:_t(12),fontWeight:700,letterSpacing:.5,textTransform:"uppercase",color:r.textMuted},children:"Etape & sarcini"}),L?m.jsxs(ni,{accentRing:!0,style:{display:"flex",alignItems:"center",gap:10,flexWrap:"wrap",padding:"12px 14px",flex:"1 1 320px"},children:[m.jsx("input",{autoFocus:!0,value:C,onChange:Q=>y(Q.target.value),onKeyDown:Q=>{Q.key==="Enter"&&J(),Q.key==="Escape"&&ae()},placeholder:i("projects_nume_etapa_placeholder",{defaultValue:"Nume etapă…"}),style:{padding:"8px 12px",borderRadius:8,fontSize:_t(13),flex:"1 1 200px",minWidth:160,border:"none",background:r.subtleBg,color:r.text,outline:"none"}}),m.jsxs("label",{style:{display:"inline-flex",alignItems:"center",gap:6,fontSize:_t(12),color:r.textMuted},children:["Început",m.jsx("input",{type:"date",value:V,onChange:Q=>q(Q.target.value),style:{padding:"7px 10px",borderRadius:8,fontSize:_t(12.5),border:"none",background:r.subtleBg,color:r.text,outline:"none",colorScheme:t}})]}),m.jsxs("label",{style:{display:"inline-flex",alignItems:"center",gap:6,fontSize:_t(12),color:r.textMuted},children:["Final",m.jsx("input",{type:"date",value:E,onChange:Q=>K(Q.target.value),style:{padding:"7px 10px",borderRadius:8,fontSize:_t(12.5),border:"none",background:r.subtleBg,color:r.text,outline:"none",colorScheme:t}})]}),m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginLeft:"auto"},children:[m.jsx(Ct,{onClick:ae,children:"Anulează"}),m.jsx(Ct,{primary:!0,onClick:J,disabled:!C.trim()||h,children:"Adaugă"})]})]}):m.jsx(Ct,{onClick:()=>{ae(),k(!0)},children:"+ Adaugă etapă"})]}),G.length>0?m.jsx(S1,{leads:S,statuses:G,onStatusChange:(Q,de)=>o.mutate({taskId:Number(Q),milestone:Number(de)}),onLeadClick:Q=>p({mode:"view",taskId:Number(Q.id)}),onAddEntityInColumn:Q=>p({mode:"create",milestoneId:Number(Q.id)}),addEntityInColumnLabel:"Sarcină nouă",showAddStatusColumn:!1,showColumnTotals:!1,entityCountLabels:{one:"sarcină",many:"sarcini"},onColumnOrderChange:Q=>b(Q),columnBackground:P,hideCardBorder:!0,t:i}):m.jsx("div",{style:{padding:"28px 8px",color:r.textMuted,fontSize:_t(13.5)},children:"Nicio etapă încă. Adaugă prima etapă ca să pornești planul proiectului — apare și în Gantt."})]}),x&&m.jsx(_1,{isOpen:!0,task:x.mode==="view"?{id:x.taskId}:null,initialRelType:x.mode==="create"?"project":void 0,initialRelId:x.mode==="create"?n:void 0,initialRelName:e?.project?.name,initialMilestone:x.mode==="create"?Str
18ing(x.milestoneId):void 0,onClose:()=>p(null),onCreated:()=>H()})]})}const n2=[{id:1,name:"Plan parter — revizie 3",category:"arhitectura",size_bytes:482e4,mime:"application/pdf",url:"/mock/plan-parter-rev3.pdf",uploaded_by:"Andrei Popescu",uploaded_at:"2026-03-12T10:22:00Z"},{id:2,name:"Plan etaj 1",category:"arhitectura",size_bytes:314e4,mime:"application/pdf",url:"/mock/plan-etaj1.pdf",uploaded_by:"Andrei Popescu",uploaded_at:"2026-03-12T10:25:00Z"},{id:3,name:"Plan fundație și structură beton",category:"structura",size_bytes:62e5,mime:"application/pdf",url:"/mock/plan-fundatie.pdf",uploaded_by:"Maria Ionescu",uploaded_at:"2026-03-15T09:00:00Z"},{id:4,name:"Schema instalații electrice",category:"instalatii",size_bytes:19e5,mime:"application/pdf",url:"/mock/schema-electric.pdf",uploaded_by:"Radu Gheorghe",uploaded_at:"2026-03-20T14:10:00Z"},{id:5,name:"Schema instalații sanitare",category:"instalatii",size_bytes:21e5,mime:"application/pdf",url:"/mock/schema-sanitar.pdf",uploaded_by:"Radu Gheorghe",uploaded_at:"2026-03-20T14:30:00Z"},{id:6,name:"Autorizație de construcție nr. 142/2026",category:"autorizari",size_bytes:98e4,mime:"application/pdf",url:"/mock/autorizatie-construire.pdf",uploaded_by:"Cornel Marcu",uploaded_at:"2026-03-05T16:00:00Z"},{id:7,name:"Contract antrepriză generală — Construct SRL",category:"contracte",size_bytes:145e4,mime:"application/pdf",url:"/mock/contract-antrepriza.pdf",uploaded_by:"Cornel Marcu",uploaded_at:"2026-02-28T12:00:00Z"},{id:8,name:"Certificat de urbanism",category:"autorizari",size_bytes:62e4,mime:"application/pdf",url:"/mock/certificat-urbanism.pdf",uploaded_by:"Cornel Marcu",uploaded_at:"2026-01-18T11:00:00Z"}],Nh=typeof window<"u"&&new URLSearchParams(window.location.search).get("mock")==="1";async function r2(n){if(Nh)return await new Promise(l=>setTimeout(l,150)),n2;const{api:e,getApiBaseUrl:t}=await en(async()=>{const{api:l,getApiBaseUrl:o}=await import("./index-D14oYjMA.js").then(u=>u.c5);return{api:l,getApiBaseUrl:o}},__vite__mapDeps([0,1,2,3,4,5,6])),r=await e.get(`/taschi_bridge/bridge_api/projects/${n}/files`),i=Array.isArray(r?.data)?r.data:Array.isArray(r)?r:[],a=t();return i.map(l=>{const o=!!l.external&&!!l.external_link;return{id:Number(l.id),name:l.file_name??"",category:"altele",size_bytes:Number(l.size??0),mime:l.filetype??"",url:o?l.external_link:`${a}/taschi_bridge/bridge_api/projects/${n}/files/${Number(l.id)}/download`,uploaded_by:l.uploaded_by??"",uploaded_at:l.dateadded??"",thumbnail_url:l.thumbnail_link??void 0}})}function i2(n){return Er({queryKey:["project_plans",n,Nh],queryFn:()=>r2(n),staleTime:3e4,enabled:n>0})}function Ch(n){return n>=1e6?`${(n/1e6).toFixed(1)} MB`:`${Math.round(n/1024)} KB`}function a2(n){return new Date(n).toLocaleDateString("ro-RO",{day:"numeric",month:"short",year:"numeric"})}function s2(n){return n.split(" ").map(e=>e[0]).join("").slice(0,2).toUpperCase()}function o2(n,e){switch(n){case"arhitectura":return{bg:e.successBg,color:e.successText};case"structura":return{bg:e.warningBg,color:e.warningText};case"instalatii":return{bg:e.warningBg,color:e.warningText};case"autorizari":return{bg:e.subtleBg,color:e.textMuted};case"contracte":return{bg:e.subtleBg,color:e.textMuted};case"altele":return{bg:e.subtleBg,color:e.textMuted}}}function l2({c:n}){return m.jsx("div",{style:{width:40,height:48,background:n.warningBg,borderWidth:1,borderStyle:"solid",borderColor:n.cardBorder,borderRadius:"calc(4px * var(--theme-radius-scale, 1))",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,fontSize:"calc(10px * var(--theme-font-scale, 1))",fontWeight:700,color:n.warningText,letterSpacing:"0.04em"},children:"PDF"})}function c2({doc:n,c:e,onDelete:t}){const{t:r}=Kt(),i=o2(n.category,e),[a,l]=be.useState(!1),o={arhitectura:r("projects_cat_arhitectura",{defaultValue:"Arhitectură"}),structura:r("projects_cat_structura",{defaultValue:"Structură"}),instalatii:r("projects_cat_instalatii",{defaultValue:"Instalații"}),autorizari:r("projects_cat_autorizari",{defaultValue:"Autorizări"}),contracte:r("projects_cat_contracte",{defaultValue:"Contracte"}),altele:r("projects_cat_altele",{defaultValue:"Altele"})};return m.jsxs(ni,{style:{padding:"14px 16px",display:"flex",alignItems:"flex-start",ga
18p:14},children:[m.jsx(l2,{c:e}),m.jsxs("div",{style:{flex:1,minWidth:0},children:[m.jsx("div",{style:{fontSize:"calc(13px * var(--theme-font-scale, 1))",fontWeight:500,color:e.text,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",marginBottom:5},children:n.name}),m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,flexWrap:"wrap"},children:[m.jsx("span",{style:{fontSize:"calc(10.5px * var(--theme-font-scale, 1))",padding:"2px 7px",borderRadius:"calc(3px * var(--theme-radius-scale, 1))",background:i.bg,color:i.color,fontWeight:500},children:o[n.category]}),m.jsx("span",{style:{fontSize:"calc(11.5px * var(--theme-font-scale, 1))",color:e.textSubtle},children:Ch(n.size_bytes)}),m.jsx("span",{style:{fontSize:"calc(11.5px * var(--theme-font-scale, 1))",color:e.textSubtle},children:"·"}),m.jsx("span",{style:{fontSize:"calc(11.5px * var(--theme-font-scale, 1))",color:e.textSubtle},children:a2(n.uploaded_at)}),m.jsx("span",{style:{fontSize:"calc(11.5px * var(--theme-font-scale, 1))",color:e.textSubtle},children:"·"}),m.jsx("span",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:20,height:20,borderRadius:"50%",background:e.successBg,color:e.successText,fontSize:"calc(9px * var(--theme-font-scale, 1))",fontWeight:700,flexShrink:0},children:s2(n.uploaded_by)}),m.jsx("span",{style:{fontSize:"calc(11.5px * var(--theme-font-scale, 1))",color:e.textSubtle},children:n.uploaded_by})]})]}),m.jsxs("div",{style:{display:"flex",gap:6,flexShrink:0},children:[m.jsx("a",{href:n.url,download:!0,style:{padding:"5px 12px",fontSize:"calc(11.5px * var(--theme-font-scale, 1))",borderWidth:1,borderStyle:"solid",borderColor:e.border,background:e.subtleBg,color:e.textMuted,borderRadius:"calc(3px * var(--theme-radius-scale, 1))",cursor:"pointer",textDecoration:"none",display:"inline-flex",alignItems:"center"},children:r("projects_download",{defaultValue:"↓ Descarcă"})}),m.jsx("span",{onBlur:()=>l(!1),children:m.jsx(Ct,{danger:a,onClick:()=>{if(!a){l(!0);return}t(n)},title:r("delete",{defaultValue:"Șterge"}),children:a?r("projects_confirm_delete",{defaultValue:"Confirmă"}):r("delete",{defaultValue:"Șterge"})})})]})]})}function u2({projectId:n,onClose:e,onUploaded:t,c:r}){const{t:i}=Kt(),{elev:a}=uh(),[l,o]=be.useState([]),[u,d]=be.useState(!1),[h,b]=be.useState(null),x=be.useRef(null);async function p(){if(!(!l.length||u)){d(!0),b(null);try{const{getApiBaseUrl:L}=await en(async()=>{const{getApiBaseUrl:y}=await import("./index-D14oYjMA.js").then(V=>V.c5);return{getApiBaseUrl:y}},__vite__mapDeps([0,1,2,3,4,5,6])),k=new FormData;l.forEach(y=>k.append("files[]",y));const C=await fetch(`${L()}/taschi_bridge/bridge_api/projects/${n}/files`,{method:"POST",body:k,credentials:"include"});if(!C.ok){const y=await C.json().catch(()=>({}));throw new Error(y.message||`Eroare ${C.status}`)}t(),e()}catch(L){b(L instanceof Error?L.message:i("projects_upload_failed",{defaultValue:"Încărcare eșuată"}))}finally{d(!1)}}}return m.jsx("div",{style:{position:"fixed",inset:0,background:"rgba(42,40,38,0.38)",zIndex:200,display:"flex",alignItems:"center",justifyContent:"flex-end"},onClick:e,children:m.jsxs("div",{style:{width:400,height:"100%",background:"var(--theme-card-bg)",boxShadow:a.raise,display:"flex",flexDirection:"column",padding:28,gap:20},onClick:L=>L.stopPropagation(),children:[m.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[m.jsx("span",{style:{fontSize:"calc(14px * var(--theme-font-scale, 1))",fontWeight:600,color:r.text},children:i("projects_upload_document",{defaultValue:"Încarcă document"})}),m.jsx(Ct,{onClick:e,"aria-label":i("close",{defaultValue:"Închide"}),children:"×"})]}),m.jsxs("div",{onClick:()=>x.current?.click(),style:{border:`2px dashed ${r.border}`,borderRadius:"calc(6px * var(--theme-radius-scale, 1))",padding:"36px 20px",textAlign:"center",color:r.textSubtle,fontSize:"calc(12.5px * var(--theme-font-scale, 1))",cursor:"pointer"},children:[m.jsx("div",{style:{fontSize:"calc(24px * var(--theme-font-scale, 1))",marginBottom:8},children:"📎"}),i("projects_drop_file",{defaultValue:"Trage fișierul aici sau click pentru selectare"}),m.jsx("input",{ref:x,type:"file",multiple:!0,style:{display:"none"},onChange:L=>o(Array.from(L.target.files??[]))})]}),l.length>0&&m.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6},children:l.map((L,k)=>m.jsxs("div",{style:{fontSize:"calc(12px * var(--theme-font-scale, 1))",color:r.text,padding:"6px 10px",background:r.subtleBg,borderRadius:"calc(4px * var(--theme-radius-scale, 1))",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[L.name," ",m.jsxs("span",{style:{color:r.textSubtle},children:["· ",Ch(L.size)]})]},k))}),h&&m.jsx("div",{style:{fontSize:"calc(12px * var(--theme-font-scale, 1))",color:r.dangerText,background:r.dangerBg,padding:"8px 10px",borderRadius:"calc(4px * var(--theme-radius-scale, 1))"},children:h}),m.jsx(Ct,{primary:!0,onClick:p,disabled:!l.length||u,style:{marginTop:"auto",justifyContent:"center"},children:u?i("projects_uploading",{defaultValue:"Se încarcă…"}):i("projects_upload_document",{defaultValue:"Încarcă document"})})]})})}function d2({projectId:n}){const{t:e}=Kt(),{resolvedTheme:t}=Gt(),r=Yt[t],i=Tr(),{data:a,isLoading:l,isError:o,error:u,refetch:d}=i2(n),[h,b]=be.useState("all"),[x,p]=be.useState(!1),L=[{id:"all",label:e("projects_filter_all",{defaultValue:"Toate"})},{id:"arhitectura",label:e("projects_cat_arhitectura",{defaultValue:"Arhitectură"})},{id:"structura",label:e("projects_cat_structura",{defaultValue:"Structură"})},{id:"instalatii",label:e("projects_cat_instalatii",{defaultValue:"Instalații"})},{id:"autorizari",label:e("projects_cat_autorizari",{defaultValue:"Autorizări"})},{id:"contracte",label:e("projects_cat_contracte",{defaultValue:"Contracte"})},{id:"altele",label:e("projects_cat_altele",{defaultValue:"Altele"})}],k=rs({query:{data:a,isLoading:l,isError:o,error:o?u:void 0}}),C=be.useMemo(()=>a?h==="all"?a:a.filter(E=>E.category===h):[],[a,h]),y=be.useMemo(()=>{const E={};
18return va(a).forEach(K=>{E[K.category]=(E[K.category]??0)+1}),E},[a]),V={title:e("projects_empty_title",{defaultValue:"Niciun document încă"}),description:e("projects_empty_description",{defaultValue:"Încarcă planuri, autorizări sau contracte pentru acest proiect."}),action:{key:"upload_doc",label:e("projects_upload_document",{defaultValue:"Încarcă document"}),onInvoke:()=>p(!0)}};async function q(E){try{const{getApiBaseUrl:K}=await en(async()=>{const{getApiBaseUrl:J}=await import("./index-D14oYjMA.js").then(H=>H.c5);return{getApiBaseUrl:J}},__vite__mapDeps([0,1,2,3,4,5,6]));(await fetch(`${K()}/taschi_bridge/bridge_api/projects/${n}/files/${E.id}`,{method:"DELETE",credentials:"include"})).ok&&i.invalidateQueries({queryKey:["project_plans",n]})}catch{}}return m.jsxs(ns,{state:k,errorRetry:d,emptyConfig:V,children:[m.jsxs("div",{style:{flex:1,padding:"18px 56px",overflow:"hidden",display:"flex",flexDirection:"column",gap:14,overflowY:"auto"},children:[m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[m.jsx("div",{style:{display:"flex",alignItems:"center",gap:6,flex:1,flexWrap:"wrap"},children:L.map(E=>{const K=h===E.id,ae=E.id==="all"?a?.length??0:y[E.id]??0;return m.jsxs(Ct,{primary:K,"aria-pressed":K,onClick:()=>b(E.id),children:[E.label,ae>0&&m.jsx("span",{style:{fontSize:_t(10.5),padding:"1px 5px",opacity:.8},children:ae})]},E.id)})}),m.jsx(Ct,{onClick:()=>p(!0),style:{flexShrink:0},children:e("projects_upload_document_btn",{defaultValue:"+ Încarcă document"})})]}),m.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:C.map(E=>m.jsx(c2,{doc:E,c:r,onDelete:q},E.id))})]}),x&&m.jsx(u2,{projectId:n,onClose:()=>p(!1),onUploaded:()=>i.invalidateQueries({queryKey:["project_plans",n]}),c:r})]})}const h2=[{date:"2026-04-25",day_label:"25 aprilie · joi",photo_count:12,uploader_count:1,photos:[{id:1,thumbnail_path:"",taken_at:"2026-04-25T08:30:00Z",uploader_initials:"AM",uploader_name:"Andrei Mihai",is_video:!1,is_featured:!0,tag:"Cofraj parter",milestone_id:11,milestone_name:"Etap
18a 2 — Structură parter",exif:{camera:"iPhone 15 Pro",lens:"Main 24mm f/1.78",iso:64,aperture:"f/1.8",shutter:"1/240",focal_length:"24mm",gps_lat:44.176,gps_lng:28.652,width:4032,height:3024,datetime_original:"2026-04-25T08:30:14Z"}},{id:2,thumbnail_path:"",taken_at:"2026-04-25T08:35:00Z",uploader_initials:"AM",is_video:!1,is_featured:!1,tag:"Cofraj parter"},{id:3,thumbnail_path:"",taken_at:"2026-04-25T08:40:00Z",uploader_initials:"AM",is_video:!0,is_featured:!1,tag:"Timelapse",video_path:""},{id:4,thumbnail_path:"",taken_at:"2026-04-25T09:00:00Z",uploader_initials:"AM",is_video:!1,is_featured:!1},{id:5,thumbnail_path:"",taken_at:"2026-04-25T09:05:00Z",uploader_initials:"AM",is_video:!1,is_featured:!1},{id:6,thumbnail_path:"",taken_at:"2026-04-25T09:10:00Z",uploader_initials:"AM",is_video:!1,is_featured:!1},{id:7,thumbnail_path:"",taken_at:"2026-04-25T09:15:00Z",uploader_initials:"AM",is_video:!1,is_featured:!1},{id:8,thumbnail_path:"",taken_at:"2026-04-25T09:20:00Z",uploader_initials:"AM",is_video:!1,is_featured:!1},{id:9,thumbnail_path:"",taken_at:"2026-04-25T09:25:00Z",uploader_initials:"AM",is_video:!1,is_featured:!1},{id:10,thumbnail_path:"",taken_at:"2026-04-25T09:30:00Z",uploader_initials:"AM",is_video:!1,is_featured:!1},{id:11,thumbnail_path:"",taken_at:"2026-04-25T09:35:00Z",uploader_initials:"AM",is_video:!1,is_featured:!1},{id:12,thumbnail_path:"",taken_at:"2026-04-25T09:40:00Z",uploader_initials:"AM",is_video:!1,is_featured:!1}]},{date:"2026-04-22",day_label:"22 aprilie · luni",photo_count:27,uploader_count:1,photos:Array.from({length:16},(n,e)=>({id:100+e,thumbnail_path:"",taken_at:"2026-04-22T10:00:00Z",uploader_initials:"AM",is_video:!1,is_featured:e===0,tag:"Armare placă"}))},{date:"2026-04-18",day_label:"18 aprilie · vineri",photo_count:8,uploader_count:2,photos:Array.from({length:8},(n,e)=>({id:200+e,thumbnail_path:"",taken_at:"2026-04-18T14:00:00Z",uploader_initials:e<5?"MT":"MI",is_video:!1,is_featured:e===0,tag:"Structură subsol"}))}],Ph=typeof window<"u"&&new URLSearchParams(window.location.search).get("mock")==="1";async function f2(n){if(Ph)return await new Promise(a=>setTimeout(a,200)),{days:h2};const{api:e}=await en(async()=>{const{api:a}=await import("./index-D14oYjMA.js").then(l=>l.c5);return{api:a}},__vite__mapDeps([0,1,2,3,4,5,6])),t=await e.get(`/taschi_bridge/bridge_api/projects/${n}/photos`),r=t?.data??t;return{days:Array.isArray(r)?r:r?.days??[]}}function p2(n){return Er({queryKey:["project_photos",n,Ph],queryFn:()=>f2(n),staleTime:6e4,enabled:n>0,select:e=>e.days})}const Th=typeof window<"u"&&new URLSearchParams(window.location.search).get("mock")==="1";async function g2(n){if(Th)return await new Promise(r=>setTimeout(r,300)),_c;const{api:e}=await en(async()=>{const{api:r}=await import("./index-D14oYjMA.js").then(i=>i.c5);return{api:r}},__vite__mapDeps([0,1,2,3,4,5,6]));return(await e.get(`/taschi_bridge/bridge_api/projects/${n}/dashboard`)).data}function Eh(n){return Er({queryKey:["project_dashboard",n,Th],queryFn:()=>g2(n),staleTime:6e4,enabled:n>0})}const m2=[{id:"all",label:"Toate"},{id:"week",label:"Săptămâna asta"},{id:"structura",label:"Structură"},{id:"instalatii",label:"Instalații"},{id:"documentare",label:"Documentare"},{id:"etapa",label:"Marcate la etape"}];function v2({activeFilter:n,onFilterChange:e,search:t,onSearchChange:r,onExportPdf:i,isExporting:a,onUpload:l,isUploading:o}){const{t:u}=Kt(),{resolvedTheme:d}=Gt(),h=Yt[d];return m.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",paddingBottom:6},children:[m.jsx("div",{style:{display:"flex",gap:6},children:m2.map(b=>m.jsx(Ct,{primary:n===b.id,"aria-pressed":n===b.id,onClick:()=>e(b.id),children:b.label},b.id))}),m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,fontSize:"calc(12px * var(--theme-font-scale, 1))",color:h.textMuted},children:[m.jsxs("svg",{viewBox:"0 0 16 16",width:13,height:13,fill:"none",stroke:"currentColor",strokeWidth:1.4,children:[m.jsx("circle",{cx:7,cy:7,r:4.5}),m.jsx("path",{d:"M10.5 10.5L13 13"})]}),m.jsx("input",{value:t,onChange:b=>r(b.target.value),placeholder:u("projects_cauta_etichete_sau_autor",{defaultValue:"caută etichete sau autor"}),style:{background:"var(--theme-card-bg)",borderWidth:1,borderStyle:"solid",borderColor:h.border,padding:"6px 10px",borderRadius:"calc(3px * var(--theme-radius-scale, 1))",fontSize:"calc(12px * var(--theme-font-scale, 1))",width:200,color:h.text,outline:"none"}}),m.jsx("span",{style:{cursor:"pointer"},children:"·"}),m.jsx("span",{style:{cursor:"pointer"},children:u("select",{defaultValue:"Selectează"})}),m.jsx(Ct,{onClick:i,disabled:a||!i,children:a?"Se generează…":"Export PDF"}),l&&m.jsx(Ct,{onClick:l,disabled:o,children:o?u("projects_uploading",{defaultValue:"Se încarcă…"}):u("projects_add_photo",{defaultValue:"+ Foto"})})]})]})}const Iu=["linear-gradient(135deg, #9C8B72 0%, #6E5F49 100%)","linear-gradient(180deg, #A8A18E 0%, #7E7666 100%)","linear-gradient(135deg, #7A6F5C 0%, #4F4639 100%)","linear-gradient(225deg, #B8A98F 0%, #8B7D65 100%)","linear-gradient(135deg, #665C4A 0%, #403729 100%)","linear-gradient(180deg, #9E927B 0%, #7C715D 100%)","linear-gradient(135deg, #827562 0%, #5A4F3D 100%)","linear-gradient(225deg, #A89B82 0%, #766A55 100%)"];function b2({photos:n,onPhotoClick:e}){const{c:t,elev:r}=uh();return m.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(8, 1fr)",gap:6},children:n.map((i,a)=>{const l=Iu[a%Iu.length],o=i.is_video,u=i.is_featured,d=i.taken_at?new Date(i.taken_at).toLocaleTimeString("ro-RO",{hour:"2-digit",minute:"2-digit"}):"";return m.jsxs("div",{onClick:()=>e?.(i),role:"button",tabIndex:0,onKeyDown:h=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),e?.(i))},style:{aspectRatio:u?"auto":"1/1",gridColumn:u?"span 2":void 0,gridRow:u?"span 2":void 0,borderRadius:"calc(2px * var(--theme-radius-scale, 1))",overflow:"hidden",position:"relative",curs
18or:"pointer",background:i.thumbnail_path?`url(${i.thumbnail_path}) center/cover`:l},children:[m.jsx("div",{style:{position:"absolute",inset:0,background:"linear-gradient(to bottom, transparent 50%, rgba(0,0,0,.35))"}}),o&&m.jsxs(m.Fragment,{children:[m.jsx("div",{style:{position:"absolute",top:"50%",left:"50%",width:32,height:32,borderRadius:"50%",background:"rgba(0,0,0,.4)",transform:"translate(-50%,-50%)",zIndex:2}}),m.jsx("div",{style:{position:"absolute",top:"50%",left:"calc(50% + 2px)",width:0,height:0,borderStyle:"solid",borderWidth:"6px 0 6px 9px",borderColor:"transparent transparent transparent #FAF8F5",transform:"translate(-50%,-50%)",zIndex:3}})]}),d&&m.jsx("div",{style:{position:"absolute",top:5,right:6,fontSize:"calc(9.5px * var(--theme-font-scale, 1))",color:zo.onAccent,background:"rgba(42,40,38,.55)",padding:"2px 5px",borderRadius:"calc(2px * var(--theme-radius-scale, 1))",letterSpacing:"0.02em",fontWeight:500,zIndex:4},children:d}),i.milestone_id!=null&&m.jsx("div",{style:{position:"absolute",top:5,left:6,width:6,height:6,borderRadius:"50%",background:t.warningText,boxShadow:r.raise,zIndex:4}}),i.tag&&m.jsxs("div",{style:{position:"absolute",bottom:5,left:6,right:6,fontSize:u?11:9.5,color:zo.onAccent,fontWeight:500,letterSpacing:"0.03em",zIndex:4,opacity:u?1:0},children:[i.tag," · ",i.uploader_initials]})]},i.id)})})}function y2({group:n,onPhotoClick:e}){const{t}=Kt(),{resolvedTheme:r}=Gt(),i=Yt[r],a=new Date(n.date),l=new Date().toDateString()===a.toDateString(),o=new Date(Date.now()-864e5).toDateString()===a.toDateString(),u=l?t("projects_today",{defaultValue:"Astăzi"}):o?t("projects_yesterday",{defaultValue:"Ieri"}):a.toLocaleDateString("ro-RO",{weekday:"long"}),d=a.toLocaleDateString("ro-RO",{day:"numeric",month:"long",weekday:"long"}),h=l||o?`· ${d}`:"";return m.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[m.jsxs("div",{style:{display:"flex",alignItems:"baseline",gap:10,padding:"0 0 4px",borderBottom:`1px solid ${i.border}`},children:[m.jsxs("div",{style:{fontWeight:400,fontSize:"calc(18px * var(--theme-font-scale, 1))",letterSpacing:"-0.2px",color:i.text},children:[u,h&&m.jsx("em",{style:{fontStyle:"italic",color:i.textMuted,fontWeight:300,fontSize:"calc(14px * var(--theme-font-scale, 1))",marginLeft:6},children:h})]}),m.jsxs("div",{style:{fontSize:"calc(11.5px * var(--theme-font-scale, 1))",color:i.textMuted,marginLeft:"auto",display:"flex",gap:12},children:[m.jsxs("span",{children:[m.jsx("strong",{style:{color:i.text,fontWeight:500},children:n.photo_count})," ",t("projects_photos",{defaultValue:"fotografii"})]}),n.uploader_count>1&&m.jsxs("span",{children:[m.jsx("strong",{style:{color:i.text,fontWeight:500},children:n.uploader_count})," ",t("projects_authors",{defaultValue:"autori"})]})]})]}),m.jsx(b2,{photos:n.photos,onPhotoClick:e})]})}function x2({photo:n,onClose:e,onTagMilestone:t}){const{t:r}=Kt(),{resolvedTheme:i}=Gt(),a=Yt[i];be.useEffect(()=>{const h=b=>{b.key==="Escape"&&e()};return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)},[e]);const l=n.exif,o=h=>h?new Date(h).toLocaleString("ro-RO",{day:"numeric",month:"long",year:"numeric",hour:"2-digit",minute:"2-digit"}):"—",u=n.is_video?n.video_path:n.full_path||n.thumbnail_path,d={display:"flex",justifyContent:"space-between",gap:16,padding:"6px 0",borderBottom:`1px solid ${a.border}`,fontSize:"calc(12px * var(--theme-font-scale, 1))"};return m.jsxs("div",{onClick:e,style:{position:"fixed",inset:0,zIndex:1e3,background:"rgba(20,18,16,0.88)",display:"flex",alignItems:"stretch"},children:[m.jsx("div",{onClick:h=>h.stopPropagation(),style:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",padding:24,minWidth:0},children:n.is_video?m.jsx("video",{src:u,controls:!0,style:{maxWidth:"100%",maxHeight:"100%",background:"black"}}):u?m.jsx("img",{src:u,alt:n.tag||"",style:{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}}):m.jsx("div",{style:{width:480,height:360,background:a.subtleBg,display:"flex",alignItems:"center",justifyContent:"center",color:a.textMuted,fontSize:"calc(12px * var(--theme-font-scale, 1))",letterSpacing:"0.05em"},children:"FĂRĂ PREVIZUALIZARE"})}),m.jsxs("aside",{onClick:h=>h.stopPropagation(),style:{width:320,background:"var(--theme-card-bg)",borderLeft:`1px solid ${a.border}`,padding:"20px 22px",overflowY:"auto",display:"flex",flexDirection:"column",gap:18},children:[m.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"baseline"},children:[m.jsxs("div",{children:[m.jsx("div",{style:{fontSize:"calc(16px * var(--theme-font-scale, 1))",color:a.text,fontWeight:400},children:n.tag||"Fotografie"}),m.jsxs("div",{style:{fontSize:"calc(11px * var(--theme-font-scale, 1))",color:a.textMuted,marginTop:2},children:[n.uploader_name||n.uploader_initials," · ",o(n.taken_at)]})]}),m.jsx(Ct,{onClick:e,"aria-label":r("close",{defaultValue:"Închide"}),children:"×"})]}),m.jsxs("section",{children:[m.jsx("div",{style:{fontSize:"calc(10.5px * var(--theme-font-scale, 1))",letterSpacing:"0.08em",color:a.textMuted,marginBottom:6},children:"ETAPĂ"}),m.jsx("div",{style:{fontSize:"calc(12px * var(--theme-font-scale, 1))",color:a.text,marginBottom:8},children:n.milestone_name||m.jsx("em",{style:{color:a.textMuted},children:r("projects_nemarcata",{defaultValue:"Nemarcată"})})}),t&&m.jsx(Ct,{onClick:()=>
18t(n),children:n.milestone_id?"Schimbă etapă":"Marchează la etapă"})]}),m.jsxs("section",{children:[m.jsx("div",{style:{fontSize:"calc(10.5px * var(--theme-font-scale, 1))",letterSpacing:"0.08em",color:a.textMuted,marginBottom:6},children:"EXIF"}),l?m.jsxs("div",{style:{fontSize:"calc(12px * var(--theme-font-scale, 1))",color:a.text},children:[l.camera&&m.jsxs("div",{style:d,children:[m.jsx("span",{style:{color:a.textMuted},children:r("projects_camera",{defaultValue:"Cameră"})}),m.jsx("span",{children:l.camera})]}),l.lens&&m.jsxs("div",{style:d,children:[m.jsx("span",{style:{color:a.textMuted},children:"Obiectiv"}),m.jsx("span",{children:l.lens})]}),l.focal_length&&m.jsxs("div",{style:d,children:[m.jsx("span",{style:{color:a.textMuted},children:r("projects_focala",{defaultValue:"Focală"})}),m.jsx("span",{children:l.focal_length})]}),l.aperture&&m.jsxs("div",{style:d,children:[m.jsx("span",{style:{color:a.textMuted},children:r("projects_diafragma",{defaultValue:"Diafragmă"})}),m.jsx("span",{children:l.aperture})]}),l.shutter&&m.jsxs("div",{style:d,children:[m.jsx("span",{style:{color:a.textMuted},children:r("projects_timp_expunere",{defaultValue:"Timp expunere"})}),m.jsx("span",{children:l.shutter})]}),l.iso!=null&&m.jsxs("div",{style:d,children:[m.jsx("span",{style:{color:a.textMuted},children:"ISO"}),m.jsx("span",{children:l.iso})]}),l.width&&l.height?m.jsxs("div",{style:d,children:[m.jsx("span",{style:{color:a.textMuted},children:r("projects_rezolutie",{defaultValue:"Rezoluție"})}),m.jsxs("span",{children:[l.width,"×",l.height]})]}):null,l.datetime_original&&m.jsxs("div",{style:d,children:[m.jsx("span",{style:{color:a.textMuted},children:r("projects_captura",{defaultValue:"Captură"})}),m.jsx("span",{children:o(l.datetime_original)})]}),l.gps_lat!=null&&l.gps_lng!=null&&m.jsxs("div",{style:d,children:[m.jsx("span",{style:{color:a.textMuted},children:"GPS"}),m.jsxs("a",{href:`https://maps.google.com/?q=${l.gps_lat},${l.gps_lng}`,target:"_blank",rel:"noreferrer",style:{color:a.text,textDecoration:"underline"},children:[l.gps_lat.toFixed(4),", ",l.gps_lng.toFixed(4)]})]})]}):m.jsx("div",{style:{fontSize:"calc(11.5px * var(--theme-font-scale, 1))",color:a.textMuted,fontStyle:"italic"},children:"Fără metadate EXIF disponibile"})]})]})]})}function w2(n){const e=Tr();return wa({mutationFn:async({photoId:t,milestoneId:r})=>{const{api:i}=await en(async()=>{const{api:a}=await import("./index-D14oYjMA.js").then(l=>l.c5);return{api:a}},__vite__mapDeps([0,1,2,3,4,5,6]));return i.patch(`/taschi_bridge/bridge_api/projects/${n}/photos/${t}`,{milestone_id:r})},onSuccess:()=>{e.invalidateQueries({queryKey:["project_photos",n]})},onError:()=>{dh("Eroare la salvare etapă","error")}})}const _2="is_View _fd-column _pt-22px24px32 _pr-22px24px32 _pb-22px24px32 _pl-22px24px32 ";function S2({projectId:n,photo:e,milestones:t,onClose:r}){const{t:i}=Kt(),{resolvedTheme:a}=Gt(),l=Yt[a],[o,u]=be.useState(e.milestone_id??null),d=w2(n),h=async()=>{try{await d.mutateAsync({photoId:e.id,milestoneId:o});const p=t.find(L=>L.id===o)?.name;dh(p?`Foto atașat la etapa ${p}`:"Fotografie atașată la etapă","success"),r()}catch{}},b=[{key:"info",label:i("projects_etapa",{defaultValue:"Etapă"})}],x=m.jsxs("div",{style:{display:"flex",gap:8,justifyContent:"flex-end",padding:"14px 24px",borderTopWidth:1,borderTopStyle:"solid",borderTopColor:l.border},children:[m.jsx(Ct,{onClick:r,disabled:d.isPending,children:i("cancel",{defaultValue:"Anulează"})}),m.jsx(Ct,{primary:!0,onClick:h,disabled:d.isPending,children:d.isPending?"Se salvează…":"Salvează"})]});return m.jsx(Us,{open:!0,onOpenChange:p=>{p||r()},title:i("projects_marcheaza_la_etapa",{defaultValue:"Marchează la etapă"}),description:i("projects_tag_photo_milestone_hint",{defaultValue:"Asociază această fotografie cu un milestone al proiectului."}),width:"380px",tabs:b,activeTab:"info",onTabChange:()=>{},slots:{footer:x},children:m.jsxs("div",{className:_2,children:[m.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[m.jsx(Ct,{primary:o===null,"aria-pressed":o===null,onClick:()=>u(null),style:{width:"100%",textAlign:"left"},children:m.jsx("em",{style:{fontStyle:"italic"},children:i("projects_fara_etapa",{defaultValue:"Fără etapă"})})}),t.length===0?m.jsx("div",{style:{fontSize:"calc(12px * var(--theme-font-scale, 1))",color:l.textMuted,padding:"12px 4px",fontStyle:"italic"},children:"Niciun milestone definit pentru acest proiect."}):t.map(p=>m.jsxs(Ct,{primary:o===p.id,"aria-pressed":o===p.id,onClick:()=>u(p.id),style:{width:"100%",textAlign:"left",justifyContent:"space-between"},children:[m.jsx("span",{children:p.name}),m.jsx("span",{style:{fontSize:_t(10.5),opacity:.75},children:p.due_date})]}
vendor: 12,945 bytes, line 18
18,p.id))]}),d.isError&&m.jsxs("div",{style:{fontSize:"calc(11.5px * var(--theme-font-scale, 1))",color:l.dangerText,marginTop:12},children:["Eroare salvare: ",d.error?.message??"necunoscută"]})]})})}var qr=Uint8Array,wr=Uint16Array,kc=Int32Array,Lc=new qr([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]),jc=new qr([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]),Fu=new qr([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Dh=function(n,e){for(var t=new wr(31),r=0;r<31;++r)t[r]=e+=1<<n[r-1];for(var i=new kc(t[30]),r=1;r<30;++r)for(var a=t[r];a<t[r+1];++a)i[a]=a-t[r]<<5|r;return{b:t,r:i}},Mh=Dh(Lc,2),A2=Mh.b,dc=Mh.r;A2[28]=258,dc[258]=28;var k2=Dh(jc,0),Ou=k2.r,hc=new wr(32768);for(var Qt=0;Qt<32768;++Qt){var Ri=(Qt&43690)>>1|(Qt&21845)<<1;Ri=(Ri&52428)>>2|(Ri&13107)<<2,Ri=(Ri&61680)>>4|(Ri&3855)<<4,hc[Qt]=((Ri&65280)>>8|(Ri&255)<<8)>>1}var Fs=(function(n,e,t){for(var r=n.length,i=0,a=new wr(e);i<r;++i)n[i]&&++a[n[i]-1];var l=new wr(e);for(i=1;i<e;++i)l[i]=l[i-1]+a[i-1]<<1;var o;if(t){o=new wr(1<<e);var u=15-e;for(i=0;i<r;++i)if(n[i])for(var d=i<<4|n[i],h=e-n[i],b=l[n[i]-1]++<<h,x=b|(1<<h)-1;b<=x;++b)o[hc[b]>>u]=d}else for(o=new wr(r),i=0;i<r;++i)n[i]&&(o[i]=hc[l[n[i]-1]++]>>15-n[i]);return o}),ba=new qr(288);for(var Qt=0;Qt<144;++Qt)ba[Qt]=8;for(var Qt=144;Qt<256;++Qt)ba[Qt]=9;for(var Qt=256;Qt<280;++Qt)ba[Qt]=7;for(var Qt=280;Qt<288;++Qt)ba[Qt]=8;var Ho=new qr(32);for(var Qt=0;Qt<32;++Qt)Ho[Qt]=5;var L2=Fs(ba,9,0),j2=Fs(Ho,5,0),Ih=function(n){return(n+7)/8|0},N2=function(n,e,t){return(t==null||t>n.length)&&(t=n.length),new qr(n.subarray(e,t))},mi=function(n,e,t){t<<=e&7;var r=e/8|0;n[r]|=t,n[r+1]|=t>>8},Ps=function(n,e,t){t<<=e&7;var r=e/8|0;n[r]|=t,n[r+1]|=t>>8,n[r+2]|=t>>16},Ol=function(n,e){for(var t=[],r=0;r<n.length;++r)n[r]&&t.push({s:r,f:n[r]});var i=t.length,a=t.slice();if(!i)return{t:Oh,l:0};if(i==1){var l=new qr(t[0].s+1);return l[t[0].s]=1,{t:l,l:1}}t.sort(function(K,ae){return K.f-ae.f}),t.push({s:-1,f:25001});var o=t[0],u=t[1],d=0,h=1,b=2;for(t[0]={s:-1,f:o.f+u.f,l:o,r:u};h!=i-1;)o=t[t[d].f<t[b].f?d++:b++],u=t[d!=h&&t[d].f<t[b].f?d++:b++],t[h++]={s:-1,f:o.f+u.f,l:o,r:u};for(var x=a[0].s,r=1;r<i;++r)a[r].s>x&&(x=a[r].s);var p=new wr(x+1),L=fc(t[h-1],p,0);if(L>e){var r=0,k=0,C=L-e,y=1<<C;for(a.sort(function(ae,J){return p[J.s]-p[ae.s]||ae.f-J.f});r<i;++r){var V=a[r].s;if(p[V]>e)k+=y-(1<<L-p[V]),p[V]=e;else break}for(k>>=C;k>0;){var q=a[r].s;p[q]<e?k-=1<<e-p[q]++-1:++r}for(;r>=0&&k;--r){var E=a[r].s;p[E]==e&&(--p[E],++k)}L=e}return{t:new qr(p),l:L}},fc=function(n,e,t){return n.s==-1?Math.max(fc(n.l,e,t+1),fc(n.r,e,t+1)):e[n.s]=t},Bu=function(n){for(var e=n.length;e&&!n[--e];);for(var t=new wr(++e),r=0,i=n[0],a=1,l=function(u){t[r++]=u},o=1;o<=e;++o)if(n[o]==i&&o!=e)++a;else{if(!i&&a>2){for(;a>138;a-=138)l(32754);a>2&&(l(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(l(i),--a;a>6;a-=6)l(8304);a>2&&(l(a-3<<5|8208),a=0)}for(;a--;)l(i);a=1,i=n[o]}return{c:t.subarray(0,r),n:e}},Ts=function(n,e){for(var t=0,r=0;r<e.length;++r)t+=n[r]*e[r];return t},Fh=function(n,e,t){var r=t.length,i=Ih(e+2);n[i]=r&255,n[i+1]=r>>8,n[i+2]=n[i]^255,n[i+3]=n[i+1]^255;for(var a=0;a<r;++a)n[i+a+4]=t[a];return(i+4+r)*8},Ru=function(n,e,t,r,i,a,l,o,u,d,h){mi(e,h++,t),++i[256];for(var b=Ol(i,15),x=b.t,p=b.l,L=Ol(a,15),k=L.t,C=L.l,y=Bu(x),V=y.c,q=y.n,E=Bu(k),K=E.c,ae=E.n,J=new wr(19),H=0;H<V.length;++H)++J[V[H]&31];for(var H=0;H<K.length;++H)++J[K[H]&31];for(var D=Ol(J,7),G=D.t,S=D.l,P=19;P>4&&!G[Fu[P-1]];--P);var B=d+5<<3,U=Ts(i,ba)+Ts(a,Ho)+l,re=Ts(i,x)+Ts(a,k)+l+14+3*P+Ts(J,G)+2*J[16]+3*J[17]+7*J[18];if(u>=0&&B<=U&&B<=re)return Fh(e,h,n.subarray(u,u+d));var Q,de,se,fe;if(mi(e,h,1+(re<U)),h+=2,re<U){Q=Fs(x,p,0),de=x,se=Fs(k,C,0),fe=k;var we=Fs(G,S,0);mi(e,h,q-257),mi(e,h+5,ae-1),mi(e,h+10,P-4),h+=14;for(var H=0;H<P;++H)mi(e,h+3*H,G[Fu[H]]);h+=3*P;for(var te=[V,K],A=0;A<2;++A)for(var I=te[A],H=0;H<I.length;++H){var W=I[H]&31;mi(e,h,we[W]),h+=G[W],W>15&&(mi(e,h,I[H]>>5&127),h+=I[H]>>12)}}else Q=L2,de=ba,se=j2,fe=Ho;for(var H=0;H<o;++H){var $=r[H];if($>255){var W=$>>18&31;Ps(e,h,Q[W+257]),h+=de[W+257],W>7&&(mi(e,h,$>>23&31),h+=Lc[W]);var X=$&31;Ps(e,h,se[X]),h+=fe[X],X>3&&(Ps(e,h,$>>5&8191),h+=jc[X])}else Ps(e,h,Q[$]),h+=de[$]}return Ps(e,h,Q[256]),h+de[256]},C2=new kc([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Oh=new qr(0),P2=function(n,e,t,r,i,a){var l=a.z||n.length,o=new qr(r+l+5*(1+Math.ceil(l/7e3))+i),u=o.subarray(r,o.length-i),d=a.l,h=(a.r||0)&7;if(e){h&&(u[0]=a.r>>3);for(var b=C2[e-1],x=b>>13,p=b&8191,L=(1<<t)-1,k=a.p||new wr(32768),C=a.h||new wr(L+1),y=Math.ceil(t/3),V=2*y,q=function(Fe){return(n[Fe]^n[Fe+1]<<y^n[Fe+2]<<V)&L},E=new kc(25e3),K=new wr(288),ae=new wr(32),J=0,H=0,D=a.i||0,G=0,S=a.w||0,P=0;D+2<l;++D){var B=q(D),U=D&32767,re=C[B];if(k[U]=re,C[B]=U,S<=D){var Q=l-D;if((J>7e3||G>24576)&&(Q>423||!d)){h=Ru(n,u,0,E,K,ae,H,G,P,D-P,h),G=J=H=0,P=D;for(var de=0;de<286;++de)K[de]=0;for(var de=0;de<30;++de)ae[de]=0}var se=2,fe=0,we=p,te=U-re&32767;if(Q>2&&B==q(D-te))for(var A=Math.min(x,Q)-1,I=Math.min(32767,D),W=Math.min(258,Q);te<=I&&--we&&U!=re;){if(n[D+se]==n[D+se-te]){for(var $=0;$<W&&n[D+$]==n[D+$-te];++$);if($>se){if(se=$,fe=te,$>A)break;for(var X=Math.min(te,$-2),ie=0,de=0;de<X;++de){var ue=D-te+de&32767,he=k[ue],me=ue-he&32767;me>ie&&(ie=me,re=ue)}}}U=re,re=k[U],te+=U-re&32767}if(fe){E[G++]=268435456|dc[se]<<18|Ou[fe];var Se=dc[se]&31,Te=Ou[fe]&31;H+=Lc[Se]+jc[Te],++K[257+Se],++ae[Te],S=D+se,++J}else E[G++]=n[D],++K[n[D]]}}for(D=Math.max(D,S);D<l;++D)E[G++]=n[D],++K[n[D]];h=Ru(n,u,d,E,K,ae,H,G,P,D-P,h),d||(a.r=h&7|u[h/8|0]<<3,h-=7,a.h=C,a.p=k,a.i=D,a.w=S)}else{for(var D=a.w||0;D<l+d;D+=65535){var Ce=D+65535;Ce>=l&&(u[h/8|0]=d,Ce=l),h=Fh(u,h+1,n.subarray(D,Ce))}a.i=l}return N2(o,0,r+Ih(h)+i)},Bh=function(){var n=1,e=0;return{p:function(t){for(var r=n,i=e,a=t.length|0,l=0;l!=a;){for(var o=Math.min(l+2655,a);l<o;++l)i+=r+=t[l];r=(r&65535)+15*(r>>16),i=(i&65535)+15*(i>>16)}n=r,e=i},d:function(){return n%=65521,e%=65521,(n&255)<<24|(n&65280)<<8|(e&255)<<8|e>>8}}},T2=function(n,e,t,r,i){if(!i&&(i={l:1},e.dictionary)){var a=e.dictionary.subarray(-32768),l=new qr(a.length+n.length);l.set(a),l.set(n,a.length),n=l,i.w=a.length}return P2(n,e.level==null?6:e.level,e.mem==null?i.l?Math.ceil(Math.max(8,Math.min(13,Math.log(n.length)))*1.5):20:12+e.mem,t,r,i)},Rh=function(n,e,t){for(;t;++e)n[e]=t,t>>>=8},E2=function(n,e){var t=e.level,r=t==0?0:t<6?1:t==9?3:2;if(n[0]=120,n[1]=r<<6|(e.dictionary&&32),n[1]|=31-(n[0]<<8|n[1])%31,e.dictionary){var i=Bh();i.p(e.dictionary),Rh(n,2,i.d())}};function pc(n,e){e||(e={});var t=Bh();t.p(n);var r=T2(n,e,e.dictionary?6:2,4);return E2(r,e),Rh(r,r.length-4,t.d()),r}var D2=typeof TextDecoder<"u"&&new TextDecoder,M2=0;try{D2.decode(Oh,{stream:!0}),M2=1}catch{}function zu(n,e="utf8"){return new TextDecoder(e).decode(n)}const I2=new TextEncoder;function F2(n){return I2.encode(n)}const O2=1024*8,B2=(()=>{const n=new Uint8Array(4),e=new Uint32Array(n.buffer);return!((e[0]=1)&n[0])})(),Bl={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 Nc{buffer;byteLength;byteOffset;length;offset;lastWrittenByte;littleEndian;_data;_mark;_marks;constructor(e=O2,t={}){let r=!1;typeof e=="number"?e=new ArrayBuffer(e):(r=!0,this.lastWrittenByte=e.byteLength);const i=t.offset?t.offset>>>0:0,a=e.byteLength-i;let l=i;(ArrayBuffer.isView(e)||e instanceof Nc)&&(e.byteLength!==e.buffer.byteLength&&(l=e.byteOffset+i),e=e.buffer),r?this.lastWrittenByte=a:this.lastWrittenByte=0,this.buffer=e,this.length=a,this.byteLength=a,this.byteOffset=l,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,l,a),this._mark=0,this._marks=[]}available(e=1){return this.offset+e<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){return this.littleEndian=!0,this}isBigEndian(){return!this.littleEndian}setBigEndian(){return this.littleEndian=!1,this}skip(e=1){return this.offset+=e,this}back(e=1){return this.offset-=e,this}seek(e){return this.offset=e,this}mark(){return this._mark=this.offset,this}reset(){return this.offset=this._mark,this}pushMark(){return this._marks.push(this.offset),this}popMark(){const e=this._marks.pop();if(e===void 0)throw new Error("Mark stack empty");return this.seek(e),this}rewind(){return this.offset=0,this}ensureAvailable(e=1){if(!this.available(e)){const r=(this.offset+e)*2,i=new Uint8Array(r);i.set(new Uint8Array(this.buffer)),this.buffer=i.buffer,this.length=r,this.byteLength=r,this._data=new DataView(this.buffer)}return this}readBoolean(){return this.readUint8()!==0}readInt8(){return this._data.getInt8(this.offset++)}readUint8(){return this._data.getUint8(this.offset++)}readByte(){return this.readUint8()}readBytes(e=1){return this.readArray(e,"uint8")}readArray(e,t){const r=Bl[t].BYTES_PER_ELEMENT*e,i=this.byteOffset+this.offset,a=this.buffer.slice(i,i+r);if(this.littleEndian===B2&&t!=="uint8"&&t!=="int8"){const o=new Uint8Array(this.buffer.slice(i,i+r));o.reverse();const u=new Bl[t](o.buffer);return this.offset+=r,u.reverse(),u}const l=new Bl[t](a);return this.offset+=r,l}readInt16(){const e=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,e}readUint16(){const e=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,e}readInt32(){const e=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,e}readUint32(){const e=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,e}readFloat32(){const e=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,e}readFloat64(){const e=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,e}readBigInt64(){const e=this._data.getBigInt64(this.offset,this.littleEndian);return this.offset+=8,e}readBigUint64(){const e=this._data.getBigUint64(this.offset,this.littleEndian);return this.offset+=8,e}readChar(){return String.fromCharCode(this.readInt8())}readChars(e=1){let t="";for(let r=0;r<e;r++)t+=this.readChar();return t}readUtf8(e=1){return zu(this.readBytes(e))}decodeText(e=1,t="utf8"){return zu(this.readBytes(e),t)}writeBoolean(e){return this.writeUint8(e?255:0),this}writeInt8(e){return this.ensureAvailable(1),this._data.setInt8(this.offset++,e),this._updateLastWrittenByte(),this}writeUint8(e){return this.ensureAvailable(1),this._data.setUint8(this.offset++,e),this._updateLastWrittenByte(),this}writeByte(e){return this.writeUint8(e)}writeBytes(e){this.ensureAvailable(e.length);for(let t=0;t<e.length;t++)this._data.setUint8(this.offset++,e[t]);return this._updateLastWrittenByte(),this}writeInt16(e){return this.ensureAvailable(2),this._data.setInt16(this.offset,e,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeUint16(e){return this.ensureAvailable(2),this._data.setUint16(this.offset,e,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeInt32(e){return this.ensureAvailable(4),this._data.setInt32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeUint32(e){return this.ensureAvailable(4),this._data.setUint32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat32(e){return this.ensureAvailable(4),this._data.setFloat32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat64(e){return this.ensureAvailable(8),this._data.setFloat64(this.offset,e,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigInt64(e){return this.ensureAvailable(8),this._data.setBigInt64(this.offset,e,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigUint64(e){return this.ensureAvailable(8),this._data.setBigUint64(this.offset,e,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeChar(e){return this.writeUint8(e.charCodeAt(0))}writeChars(e){for(let t=0;t<e.length;t++)this.writeUint8(e.charCodeAt(t));return this}writeUtf8(e){return this.writeBytes(F2(e))}toArray(){return new Uint8Array(this.buffer,this.byteOffset,this.lastWrittenByte)}getWrittenByteLength(){return this.lastWrittenByte-this.byteOffset}_updateLastWrittenByte(){this.offset>this.lastWrittenByte&&(this.lastWrittenByte=this.offset)}}function as(n){let e=n.length;for(;--e>=0;)n[e]=0}const R2=3,z2=258,zh=29,q2=256,U2=q2+1+zh,qh=30,V2=512,W2=new Array((U2+2)*2);as(W2);const H2=new Array(qh*2);as(H2);const $2=new Array(V2);as($2);const G2=new Array(z2-R2+1);as(G2);const Y2=new Array(zh);as(Y2);const K2=new Array(qh);as(K2);const X2=(n,e,t,r)=>{let i=n&65535|0,a=n>>>16&65535|0,l=0;for(;t!==0;){l=t>2e3?2e3:t,t-=l;do i=i+e[r++]|0,a=a+i|0;while(--l);i%=65521,a%=65521}return i|a<<16|0};var gc=X2;const Z2=()=>{let n,e=[];for(var t=0;t<256;t++){n=t;
vendor: 11,736 bytes, line 18
18for(var r=0;r<8;r++)n=n&1?3988292384^n>>>1:n>>>1;e[t]=n}return e},J2=new Uint32Array(Z2()),Q2=(n,e,t,r)=>{const i=J2,a=r+t;n^=-1;for(let l=r;l<a;l++)n=n>>>8^i[(n^e[l])&255];return n^-1};var Qr=Q2,mc={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"},Uh={Z_NO_FLUSH:0,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_DEFLATED:8};const e0=(n,e)=>Object.prototype.hasOwnProperty.call(n,e);var t0=function(n){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const t=e.shift();if(t){if(typeof t!="object")throw new TypeError(t+"must be non-object");for(const r in t)e0(t,r)&&(n[r]=t[r])}}return n},n0=n=>{let e=0;for(let r=0,i=n.length;r<i;r++)e+=n[r].length;const t=new Uint8Array(e);for(let r=0,i=0,a=n.length;r<a;r++){let l=n[r];t.set(l,i),i+=l.length}return t},Vh={assign:t0,flattenChunks:n0};let Wh=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{Wh=!1}const zs=new Uint8Array(256);for(let n=0;n<256;n++)zs[n]=n>=252?6:n>=248?5:n>=240?4:n>=224?3:n>=192?2:1;zs[254]=zs[254]=1;var r0=n=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(n);let e,t,r,i,a,l=n.length,o=0;for(i=0;i<l;i++)t=n.charCodeAt(i),(t&64512)===55296&&i+1<l&&(r=n.charCodeAt(i+1),(r&64512)===56320&&(t=65536+(t-55296<<10)+(r-56320),i++)),o+=t<128?1:t<2048?2:t<65536?3:4;for(e=new Uint8Array(o),a=0,i=0;a<o;i++)t=n.charCodeAt(i),(t&64512)===55296&&i+1<l&&(r=n.charCodeAt(i+1),(r&64512)===56320&&(t=65536+(t-55296<<10)+(r-56320),i++)),t<128?e[a++]=t:t<2048?(e[a++]=192|t>>>6,e[a++]=128|t&63):t<65536?(e[a++]=224|t>>>12,e[a++]=128|t>>>6&63,e[a++]=128|t&63):(e[a++]=240|t>>>18,e[a++]=128|t>>>12&63,e[a++]=128|t>>>6&63,e[a++]=128|t&63);return e};const i0=(n,e)=>{if(e<65534&&n.subarray&&Wh)return String.fromCharCode.apply(null,n.length===e?n:n.subarray(0,e));let t="";for(let r=0;r<e;r++)t+=String.fromCharCode(n[r]);return t};var a0=(n,e)=>{const t=e||n.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(n.subarray(0,e));let r,i;const a=new Array(t*2);for(i=0,r=0;r<t;){let l=n[r++];if(l<128){a[i++]=l;continue}let o=zs[l];if(o>4){a[i++]=65533,r+=o-1;continue}for(l&=o===2?31:o===3?15:7;o>1&&r<t;)l=l<<6|n[r++]&63,o--;if(o>1){a[i++]=65533;continue}l<65536?a[i++]=l:(l-=65536,a[i++]=55296|l>>10&1023,a[i++]=56320|l&1023)}return i0(a,i)},s0=(n,e)=>{e=e||n.length,e>n.length&&(e=n.length);let t=e-1;for(;t>=0&&(n[t]&192)===128;)t--;return t<0||t===0?e:t+zs[n[t]]>e?t:e},vc={string2buf:r0,buf2string:a0,utf8border:s0};function o0(){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 l0=o0;const Lo=16209,c0=16191;var u0=function(e,t){let r,i,a,l,o,u,d,h,b,x,p,L,k,C,y,V,q,E,K,ae,J,H,D,G;const S=e.state;r=e.next_in,D=e.input,i=r+(e.avail_in-5),a=e.next_out,G=e.output,l=a-(t-e.avail_out),o=a+(e.avail_out-257),u=S.dmax,d=S.wsize,h=S.whave,b=S.wnext,x=S.window,p=S.hold,L=S.bits,k=S.lencode,C=S.distcode,y=(1<<S.lenbits)-1,V=(1<<S.distbits)-1;e:do{L<15&&(p+=D[r++]<<L,L+=8,p+=D[r++]<<L,L+=8),q=k[p&y];t:for(;;){if(E=q>>>24,p>>>=E,L-=E,E=q>>>16&255,E===0)G[a++]=q&65535;else if(E&16){K=q&65535,E&=15,E&&(L<E&&(p+=D[r++]<<L,L+=8),K+=p&(1<<E)-1,p>>>=E,L-=E),L<15&&(p+=D[r++]<<L,L+=8,p+=D[r++]<<L,L+=8),q=C[p&V];n:for(;;){if(E=q>>>24,p>>>=E,L-=E,E=q>>>16&255,E&16){if(ae=q&65535,E&=15,L<E&&(p+=D[r++]<<L,L+=8,L<E&&(p+=D[r++]<<L,L+=8)),ae+=p&(1<<E)-1,ae>u){e.msg="invalid distance too far back",S.mode=Lo;break e}if(p>>>=E,L-=E,E=a-l,ae>E){if(E=ae-E,E>h&&S.sane){e.msg="invalid distance too far back",S.mode=Lo;break e}if(J=0,H=x,b===0){if(J+=d-E,E<K){K-=E;do G[a++]=x[J++];while(--E);J=a-ae,H=G}}else if(b<E){if(J+=d+b-E,E-=b,E<K){K-=E;do G[a++]=x[J++];while(--E);if(J=0,b<K){E=b,K-=E;do G[a++]=x[J++];while(--E);J=a-ae,H=G}}}else if(J+=b-E,E<K){K-=E;do G[a++]=x[J++];while(--E);J=a-ae,H=G}for(;K>2;)G[a++]=H[J++],G[a++]=H[J++],G[a++]=H[J++],K-=3;K&&(G[a++]=H[J++],K>1&&(G[a++]=H[J++]))}else{J=a-ae;do G[a++]=G[J++],G[a++]=G[J++],G[a++]=G[J++],K-=3;while(K>2);K&&(G[a++]=G[J++],K>1&&(G[a++]=G[J++]))}}else if((E&64)===0){q=C[(q&65535)+(p&(1<<E)-1)];continue n}else{e.msg="invalid distance code",S.mode=Lo;break e}break}}else if((E&64)===0){q=k[(q&65535)+(p&(1<<E)-1)];continue t}else if(E&32){S.mode=c0;break e}else{e.msg="invalid literal/length code",S.mode=Lo;break e}break}}while(r<i&&a<o);K=L>>3,r-=K,L-=K<<3,p&=(1<<L)-1,e.next_in=r,e.next_out=a,e.avail_in=r<i?5+(i-r):5-(r-i),e.avail_out=a<o?257+(o-a):257-(a-o),S.hold=p,S.bits=L};const Ha=15,qu=852,Uu=592,Vu=0,Rl=1,Wu=2,d0=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]),h0=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]),f0=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]),p0=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]),g0=(n,e,t,r,i,a,l,o)=>{const u=o.bits;let d=0,h=0,b=0,x=0,p=0,L=0,k=0,C=0,y=0,V=0,q,E,K,ae,J,H=null,D;const G=new Uint16Array(Ha+1),S=new Uint16Array(Ha+1);let P=null,B,U,re;for(d=0;d<=Ha;d++)G[d]=0;for(h=0;h<r;h++)G[e[t+h]]++;for(p=u,x=Ha;x>=1&&G[x]===0;x--);if(p>x&&(p=x),x===0)return i[a++]=1<<24|64<<16|0,i[a++]=1<<24|64<<16|0,o.bits=1,0;for(b=1;b<x&&G[b]===0;b++);for(p<b&&(p=b),C=1,d=1;d<=Ha;d++)if(C<<=1,C-=G[d],C<0)return-1;if(C>0&&(n===Vu||x!==1))return-1;for(S[1]=0,d=1;d<Ha;d++)S[d+1]=S[d]+G[d];for(h=0;h<r;h++)e[t+h]!==0&&(l[S[e[t+h]]++]=h);if(n===Vu?(H=P=l,D=20):n===Rl?(H=d0,P=h0,D=257):(H=f0,P=p0,D=0),V=0,h=0,d=b,J=a,L=p,k=0,K=-1,y=1<<p,ae=y-1,n===Rl&&y>qu||n===Wu&&y>Uu)return 1;for(;;){B=d-k,l[h]+1<D?(U=0,re=l[h]):l[h]>=D?(U=P[l[h]-D],re=H[l[h]-D]):(U=96,re=0),q=1<<d-k,E=1<<L,b=E;do E-=q,i[J+(V>>k)+E]=B<<24|U<<16|re|0;while(E!==0);for(q=1<<d-1;V&q;)q>>=1;if(q!==0?(V&=q-1,V+=q):V=0,h++,--G[d]===0){if(d===x)break;d=e[t+l[h]]}if(d>p&&(V&ae)!==K){for(k===0&&(k=p),J+=b,L=d-k,C=1<<L;L+k<x&&(C-=G[L+k],!(C<=0));)L++,C<<=1;if(y+=1<<L,n===Rl&&y>qu||n===Wu&&y>Uu)return 1;K=V&ae,i[K]=p<<24|L<<16|J-a|0}}return V!==0&&(i[J+V]=d-k<<24|64<<16|0),o.bits=p,0};var Os=g0;const m0=0,Hh=1,$h=2,{Z_FINISH:Hu,Z_BLOCK:v0,Z_TREES:jo,Z_OK:ya,Z_STREAM_END:b0,Z_NEED_DICT:y0,Z_STREAM_ERROR:Pr,Z_DATA_ERROR:Gh,Z_MEM_ERROR:Yh,Z_BUF_ERROR:x0,Z_DEFLATED:$u}=Uh,Xo=16180,Gu=16181,Yu=16182,Ku=16183,Xu=16184,Zu=16185,Ju=16186,Qu=16187,ed=16188,td=16189,$o=16190,vi=16191,zl=16192,nd=16193,ql=16194,rd=16195,id=16196,ad=16197,sd=16198,No=16199,Co=16200,od=16201,ld=16202,cd=16203,ud=16204,dd=16205,Ul=16206,hd=16207,fd=16208,tn=16209,Kh=16210,Xh=16211,w0=852,_0=592,S0=15,A0=S0,pd=n=>(n>>>24&255)+(n>>>8&65280)+((n&65280)<<8)+((n&255)<<24);function k0(){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 _a=n=>{if(!n)return 1;const e=n.state;return!e||e.strm!==n||e.mode<Xo||e.mode>Xh?1:0},Zh=n=>{if(_a(n))return Pr;const e=n.state;return n.total_in=n.total_out=e.total=0,n.msg="",e.wrap&&(n.adler=e.wrap&1),e.mode=Xo,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(w0),e.distcode=e.distdyn=new Int32Array(_0),e.sane=1,e.back=-1,ya},Jh=n=>{if(_a(n))return Pr;const e=n.state;return e.wsize=0,e.whave=0,e.wnext=0,Zh(n)},Qh=(n,e)=>{let t;if(_a(n))return Pr;const r=n.state;return e<0?(t=0,e=-e):(t=(e>>4)+5,e<48&&(e&=15)),e&&(e<8||e>15)?Pr:(r.window!==null&&r.wbits!==e&&(r.window=null),r.wrap=t,r.wbits=e,Jh(n))},ef=(n,e)=>{if(!n)return Pr;const t=new k0;n.state=t,t.strm=n,t.window=null,t.mode=Xo;const r=Qh(n,e);return r!==ya&&(n.state=null),r},L0=n=>ef(n,A0);let gd=!0,Vl,Wl;const j0=n=>{if(gd){Vl=new Int32Array(512),Wl=new Int32Array(32);let e=0;for(;e<144;)n.lens[e++]=8;for(;e<256;)n.lens[e++]=9;for(;e<280;)n.lens[e++]=7;for(;e<288;)n.lens[e++]=8;for(Os(Hh,n.lens,0,288,Vl,0,n.work,{bits:9}),e=0;e<32;)n.lens[e++]=5;Os($h,n.lens,0,32,Wl,0,n.work,{bits:5}),gd=!1}n.lencode=Vl,n.lenbits=9,n.distcode=Wl,n.distbits=5},tf=(n,e,t,r)=>{let i;const a=n.state;return a.window===null&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new Uint8Array(a.wsize)),r>=a.wsize?(a.window.set(e.subarray(t-a.wsize,t),0),a.wnext=0,a.whave=a.wsize):(i=a.wsize-a.wnext,i>r&&(i=r),a.window.set(e.subarray(t-r,t-r+i),a.wnext),r-=i,r?(a.window.set(e.subarray(t-r,t),0),a.wnext=r,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=i))),0},N0=(n,e)=>{let t,r,i,a,l,o,u,d,h,b,x,p,L,k,C=0,y,V,q,E,K,ae,J,H;const D=new Uint8Array(4);let G,S;const P=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(_a(n)||!n.output||!n.input&&n.avail_in!==0)return Pr;t=n.state,t.mode===vi&&(t.mode=zl),l=n.next_out,i=n.output,u=n.avail_out,a=n.next_in,r=n.input,o=n.avail_in,d=t.hold,h=t.bits,b=o,x=u,H=ya;e:for(;;)switch(t.mode){case Xo:if(t.wrap===0){t.mode=zl;break}for(;h<16;){if(o===0)break e;o--,d+=r[a++]<<h,h+=8}if(t.wrap&2&&d===35615){t.wbits===0&&(t.wbits=15),t.check=0,D[0]=d&255,D[1]=d>>>8&255,t.check=Qr(t.check,D,2,0),d=0,h=0,t.mode=Gu;break}if(t.head&&(t.head.done=!1),!(t.wrap&1)||(((d&255)<<8)+(d>>8))%31){n.msg="incorrect header check",t.mode=tn;break}if((d&15)!==$u){n.msg="unknown compression method",t.mode=tn;break}if(d>>>=4,h-=4,J=(d&15)+8,t.wbits===0&&(t.wbits=J),J>15||J>t.wbits){n.msg="invalid window size",t.mode=tn;break}t.dmax=1<<t.wbits,t.flags=0,n.adler=t.check=1,t.mode=d&512?td:vi,d=0,h=0;break;case Gu:for(;h<16;){if(o===0)break e;o--,d+=r[a++]<<h,h+=8}if(t.flags=d,(t.flags&255)!==$u){n.msg="unknown compression method",t.mode=tn;break}if(t.flags&57344){n.msg="unknown header flags set",t.mode=tn;break}t.head&&(t.head.text=d>>8&1),t.flags&512&&t.wrap&4&&(D[0]=d&255,D[1]=d>>>8&255,t.check=Qr(t.check,D,2,0)),d=0,h=0,t.mode=Yu;case Yu:for(;h<32;){if(o===0)break e;o--,d+=r[a++]<<h,h+=8}t.head&&(t.head.time=d),t.flags&512&&t.wrap&4&&(D[0]=d&255,D[1]=d>>>8&255,D[2]=d>>>16&255,D[3]=d>>>24&255,t.check=Qr(t.check,D,4,0)),d=0,h=0,t.mode=Ku;case Ku:for(;h<16;){if(o===0)break e;o--,d+=r[a++]<<h,h+=8}t.head&&(t.head.xflags=d&255,t.head.os=d>>8),t.flags&512&&t.wrap&4&&(D[0]=d&255,D[1]=d>>>8&255,t.check=Qr(t.check,D,2,0)),d=0,h=0,t.mode=Xu;case Xu:if(t.flags&1024){for(;h<16;){if(o===0)break e;o--,d+=r[a++]<<h,h+=8}t.length=d,t.head&&(t.head.extra_len=d),t.flags&512&&t.wrap&4&&(D[0]=d&255,D[1]=d>>>8&255,t.check=Qr(t.check,D,2,0)),d=0,h=0}else t.head&&(t.head.extra=null);t.mode=Zu;case Zu:if(t.flags&1024&&(p=t.length,p>o&&(p=o),p&&(t.head&&(J=t.head.extra_len-t.length,t.head.extra||(t.head.extra=new Uint8Array(t.head.extra_len)),t.head.extra.set(r.subarray(a,a+p),J)),t.flags&512&&t.wrap&4&&(t.check=Qr(t.check,r,p,a)),o-=p,a+=p,t.length-=p),t.length))break e;t.length=0,t.mode=Ju;case Ju:if(t.flags&2048){if(o===0)break e;p=0;do J=r[a+p++],t.head&&J&&t.length<65536&&(t.head.name+=String.fromCharCode(J));while(J&&p<o);if(t.flags&512&&t.wrap&4&&(t.check=Qr(t.check,r,p,a)),o-=p,a+=p,J)break e}else t.head&&(t.head.name=null);t.length=0,t.mode=Qu;
vendor: 5,353 bytes, line 18
18case Qu:if(t.flags&4096){if(o===0)break e;p=0;do J=r[a+p++],t.head&&J&&t.length<65536&&(t.head.comment+=String.fromCharCode(J));while(J&&p<o);if(t.flags&512&&t.wrap&4&&(t.check=Qr(t.check,r,p,a)),o-=p,a+=p,J)break e}else t.head&&(t.head.comment=null);t.mode=ed;case ed:if(t.flags&512){for(;h<16;){if(o===0)break e;o--,d+=r[a++]<<h,h+=8}if(t.wrap&4&&d!==(t.check&65535)){n.msg="header crc mismatch",t.mode=tn;break}d=0,h=0}t.head&&(t.head.hcrc=t.flags>>9&1,t.head.done=!0),n.adler=t.check=0,t.mode=vi;break;case td:for(;h<32;){if(o===0)break e;o--,d+=r[a++]<<h,h+=8}n.adler=t.check=pd(d),d=0,h=0,t.mode=$o;case $o:if(t.havedict===0)return n.next_out=l,n.avail_out=u,n.next_in=a,n.avail_in=o,t.hold=d,t.bits=h,y0;n.adler=t.check=1,t.mode=vi;case vi:if(e===v0||e===jo)break e;case zl:if(t.last){d>>>=h&7,h-=h&7,t.mode=Ul;break}for(;h<3;){if(o===0)break e;o--,d+=r[a++]<<h,h+=8}switch(t.last=d&1,d>>>=1,h-=1,d&3){case 0:t.mode=nd;break;case 1:if(j0(t),t.mode=No,e===jo){d>>>=2,h-=2;break e}break;case 2:t.mode=id;break;case 3:n.msg="invalid block type",t.mode=tn}d>>>=2,h-=2;break;case nd:for(d>>>=h&7,h-=h&7;h<32;){if(o===0)break e;o--,d+=r[a++]<<h,h+=8}if((d&65535)!==(d>>>16^65535)){n.msg="invalid stored block lengths",t.mode=tn;break}if(t.length=d&65535,d=0,h=0,t.mode=ql,e===jo)break e;case ql:t.mode=rd;case rd:if(p=t.length,p){if(p>o&&(p=o),p>u&&(p=u),p===0)break e;i.set(r.subarray(a,a+p),l),o-=p,a+=p,u-=p,l+=p,t.length-=p;break}t.mode=vi;break;case id:for(;h<14;){if(o===0)break e;o--,d+=r[a++]<<h,h+=8}if(t.nlen=(d&31)+257,d>>>=5,h-=5,t.ndist=(d&31)+1,d>>>=5,h-=5,t.ncode=(d&15)+4,d>>>=4,h-=4,t.nlen>286||t.ndist>30){n.msg="too many length or distance symbols",t.mode=tn;break}t.have=0,t.mode=ad;case ad:for(;t.have<t.ncode;){for(;h<3;){if(o===0)break e;o--,d+=r[a++]<<h,h+=8}t.lens[P[t.have++]]=d&7,d>>>=3,h-=3}for(;t.have<19;)t.lens[P[t.have++]]=0;if(t.lencode=t.lendyn,t.lenbits=7,G={bits:t.lenbits},H=Os(m0,t.lens,0,19,t.lencode,0,t.work,G),t.lenbits=G.bits,H){n.msg="invalid code lengths set",t.mode=tn;break}t.have=0,t.mode=sd;case sd:for(;t.have<t.nlen+t.ndist;){for(;C=t.lencode[d&(1<<t.lenbits)-1],y=C>>>24,V=C>>>16&255,q=C&65535,!(y<=h);){if(o===0)break e;o--,d+=r[a++]<<h,h+=8}if(q<16)d>>>=y,h-=y,t.lens[t.have++]=q;else{if(q===16){for(S=y+2;h<S;){if(o===0)break e;o--,d+=r[a++]<<h,h+=8}if(d>>>=y,h-=y,t.have===0){n.msg="invalid bit length repeat",t.mode=tn;break}J=t.lens[t.have-1],p=3+(d&3),d>>>=2,h-=2}else if(q===17){for(S=y+3;h<S;){if(o===0)break e;o--,d+=r[a++]<<h,h+=8}d>>>=y,h-=y,J=0,p=3+(d&7),d>>>=3,h-=3}else{for(S=y+7;h<S;){if(o===0)break e;o--,d+=r[a++]<<h,h+=8}d>>>=y,h-=y,J=0,p=11+(d&127),d>>>=7,h-=7}if(t.have+p>t.nlen+t.ndist){n.msg="invalid bit length repeat",t.mode=tn;break}for(;p--;)t.lens[t.have++]=J}}if(t.mode===tn)break;if(t.lens[256]===0){n.msg="invalid code -- missing end-of-block",t.mode=tn;break}if(t.lenbits=9,G={bits:t.lenbits},H=Os(Hh,t.lens,0,t.nlen,t.lencode,0,t.work,G),t.lenbits=G.bits,H){n.msg="invalid literal/lengths set",t.mode=tn;break}if(t.distbits=6,t.distcode=t.distdyn,G={bits:t.distbits},H=Os($h,t.lens,t.nlen,t.ndist,t.distcode,0,t.work,G),t.distbits=G.bits,H){n.msg="invalid distances set",t.mode=tn;break}if(t.mode=No,e===jo)break e;case No:t.mode=Co;case Co:if(o>=6&&u>=258){n.next_out=l,n.avail_out=u,n.next_in=a,n.avail_in=o,t.hold=d,t.bits=h,u0(n,x),l=n.next_out,i=n.output,u=n.avail_out,a=n.next_in,r=n.input,o=n.avail_in,d=t.hold,h=t.bits,t.mode===vi&&(t.back=-1);break}for(t.back=0;C=t.lencode[d&(1<<t.lenbits)-1],y=C>>>24,V=C>>>16&255,q=C&65535,!(y<=h);){if(o===0)break e;o--,d+=r[a++]<<h,h+=8}if(V&&(V&240)===0){for(E=y,K=V,ae=q;C=t.lencode[ae+((d&(1<<E+K)-1)>>E)],y=C>>>24,V=C>>>16&255,q=C&65535,!(E+y<=h);){if(o===0)break e;o--,d+=r[a++]<<h,h+=8}d>>>=E,h-=E,t.back+=E}if(d>>>=y,h-=y,t.back+=y,t.length=q,V===0){t.mode=dd;break}if(V&32){t.back=-1,t.mode=vi;break}if(V&64){n.msg="invalid literal/length code",t.mode=tn;break}t.extra=V&15,t.mode=od;case od:if(t.extra){for(S=t.extra;h<S;){if(o===0)break e;o--,d+=r[a++]<<h,h+=8}t.length+=d&(1<<t.extra)-1,d>>>=t.extra,h-=t.extra,t.back+=t.extra}t.was=t.length,t.mode=ld;case ld:for(;C=t.distcode[d&(1<<t.distbits)-1],y=C>>>24,V=C>>>16&255,q=C&65535,!(y<=h);){if(o===0)break e;o--,d+=r[a++]<<h,h+=8}if((V&240)===0){for(E=y,K=V,ae=q;C=t.distcode[ae+((d&(1<<E+K)-1)>>E)],y=C>>>24,V=C>>>16&255,q=C&65535,!(E+y<=h);){if(o===0)break e;o--,d+=r[a++]<<h,h+=8}d>>>=E,h-=E,t.back+=E}if(d>>>=y,h-=y,t.back+=y,V&64){n.msg="invalid distance code",t.mode=tn;break}t.offset=q,t.extra=V&15,t.mode=cd;case cd:if(t.extra){for(S=t.extra;h<S;){if(o===0)break e;o--,d+=r[a++]<<h,h+=8}t.offset+=d&(1<<t.extra)-1,d>>>=t.extra,h-=t.extra,t.back+=t.extra}if(t.offset>t.dmax){n.msg="invalid distance too far back",t.mode=tn;break}t.mode=ud;case ud:if(u===0)break e;if(p=x-u,t.offset>p){if(p=t.offset-p,p>t.whave&&t.sane){n.msg="invalid distance too far back",t.mode=tn;break}p>t.wnext?(p-=t.wnext,L=t.wsize-p):L=t.wnext-p,p>t.length&&(p=t.length),k=t.window}else k=i,L=l-t.offset,p=t.length;p>u&&(p=u),u-=p,t.length-=p;do i[l++]=k[L++];while(--p);t.length===0&&(t.mode=Co);break;case dd:if(u===0)break e;i[l++]=t.length,u--,t.mode=Co;break;case Ul:if(t.wrap){for(;h<32;){if(o===0)break e;o--,d|=r[a++]<<h,h+=8}if(x-=u,n.total_out+=x,t.total+=x,t.wrap&4&&x&&(n.adler=t.check=t.flags?Qr(t.check,i,x,l-x):gc(t.check,i,x,l-x)),x=u,t.wrap&4&&(t.flags?d:pd(d)
vendor: 12,606 bytes, line 18
18)!==t.check){n.msg="incorrect data check",t.mode=tn;break}d=0,h=0}t.mode=hd;case hd:if(t.wrap&&t.flags){for(;h<32;){if(o===0)break e;o--,d+=r[a++]<<h,h+=8}if(t.wrap&4&&d!==(t.total&4294967295)){n.msg="incorrect length check",t.mode=tn;break}d=0,h=0}t.mode=fd;case fd:H=b0;break e;case tn:H=Gh;break e;case Kh:return Yh;case Xh:default:return Pr}return n.next_out=l,n.avail_out=u,n.next_in=a,n.avail_in=o,t.hold=d,t.bits=h,(t.wsize||x!==n.avail_out&&t.mode<tn&&(t.mode<Ul||e!==Hu))&&tf(n,n.output,n.next_out,x-n.avail_out),b-=n.avail_in,x-=n.avail_out,n.total_in+=b,n.total_out+=x,t.total+=x,t.wrap&4&&x&&(n.adler=t.check=t.flags?Qr(t.check,i,x,n.next_out-x):gc(t.check,i,x,n.next_out-x)),n.data_type=t.bits+(t.last?64:0)+(t.mode===vi?128:0)+(t.mode===No||t.mode===ql?256:0),(b===0&&x===0||e===Hu)&&H===ya&&(H=x0),H},C0=n=>{if(_a(n))return Pr;let e=n.state;return e.window&&(e.window=null),n.state=null,ya},P0=(n,e)=>{if(_a(n))return Pr;const t=n.state;return(t.wrap&2)===0?Pr:(t.head=e,e.done=!1,ya)},T0=(n,e)=>{const t=e.length;let r,i,a;return _a(n)||(r=n.state,r.wrap!==0&&r.mode!==$o)?Pr:r.mode===$o&&(i=1,i=gc(i,e,t,0),i!==r.check)?Gh:(a=tf(n,e,t,t),a?(r.mode=Kh,Yh):(r.havedict=1,ya))};var E0=Jh,D0=Qh,M0=Zh,I0=L0,F0=ef,O0=N0,B0=C0,R0=P0,z0=T0,q0="pako inflate (from Nodeca project)",yi={inflateReset:E0,inflateReset2:D0,inflateResetKeep:M0,inflateInit:I0,inflateInit2:F0,inflate:O0,inflateEnd:B0,inflateGetHeader:R0,inflateSetDictionary:z0,inflateInfo:q0};function U0(){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 V0=U0;const nf=Object.prototype.toString,{Z_NO_FLUSH:W0,Z_FINISH:H0,Z_OK:qs,Z_STREAM_END:Hl,Z_NEED_DICT:$l,Z_STREAM_ERROR:$0,Z_DATA_ERROR:md,Z_MEM_ERROR:G0}=Uh;function Hs(n){this.options=Vh.assign({chunkSize:1024*64,windowBits:15,to:""},n||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,e.windowBits===0&&(e.windowBits=-15)),e.windowBits>=0&&e.windowBits<16&&!(n&&n.windowBits)&&(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&(e.windowBits&15)===0&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l0,this.strm.avail_out=0;let t=yi.inflateInit2(this.strm,e.windowBits);if(t!==qs)throw new Error(mc[t]);if(this.header=new V0,yi.inflateGetHeader(this.strm,this.header),e.dictionary&&(typeof e.dictionary=="string"?e.dictionary=vc.string2buf(e.dictionary):nf.call(e.dictionary)==="[object ArrayBuffer]"&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(t=yi.inflateSetDictionary(this.strm,e.dictionary),t!==qs)))throw new Error(mc[t])}Hs.prototype.push=function(n,e){const t=this.strm,r=this.options.chunkSize,i=this.options.dictionary;let a,l,o;if(this.ended)return!1;for(e===~~e?l=e:l=e===!0?H0:W0,nf.call(n)==="[object ArrayBuffer]"?t.input=new Uint8Array(n):t.input=n,t.next_in=0,t.avail_in=t.input.length;;){for(t.avail_out===0&&(t.output=new Uint8Array(r),t.next_out=0,t.avail_out=r),a=yi.inflate(t,l),a===$l&&i&&(a=yi.inflateSetDictionary(t,i),a===qs?a=yi.inflate(t,l):a===md&&(a=$l));t.avail_in>0&&a===Hl&&t.state.wrap>0&&n[t.next_in]!==0;)yi.inflateReset(t),a=yi.inflate(t,l);switch(a){case $0:case md:case $l:case G0:return this.onEnd(a),this.ended=!0,!1}if(o=t.avail_out,t.next_out&&(t.avail_out===0||a===Hl))if(this.options.to==="string"){let u=vc.utf8border(t.output,t.next_out),d=t.next_out-u,h=vc.buf2string(t.output,u);t.next_out=d,t.avail_out=r-d,d&&t.output.set(t.output.subarray(u,u+d),0),this.onData(h)}else this.onData(t.output.length===t.next_out?t.output:t.output.subarray(0,t.next_out));if(!(a===qs&&o===0)){if(a===Hl)return a=yi.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,!0;if(t.avail_in===0)break}}return!0};Hs.prototype.onData=function(n){this.chunks.push(n)};Hs.prototype.onEnd=function(n){n===qs&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Vh.flattenChunks(this.chunks)),this.chunks=[],this.err=n,this.msg=this.strm.msg};function Y0(n,e){const t=new Hs(e);if(t.push(n),t.err)throw t.msg||mc[t.err];return t.result}var K0=Hs,X0=Y0,Z0={Inflate:K0,inflate:X0};const{Inflate:J0,inflate:Q0}=Z0;var vd=J0,e5=Q0;const rf=[];for(let n=0;n<256;n++){let e=n;for(let t=0;t<8;t++)e&1?e=3988292384^e>>>1:e=e>>>1;rf[n]=e}const bd=4294967295;function t5(n,e,t){let r=n;for(let i=0;i<t;i++)r=rf[(r^e[i])&255]^r>>>8;return r}function n5(n,e){return(t5(bd,n,e)^bd)>>>0}function yd(n,e,t){const r=n.readUint32(),i=n5(new Uint8Array(n.buffer,n.byteOffset+n.offset-e-4,e),e);if(i!==r)throw new Error(`CRC mismatch for chunk ${t}. Expected ${r}, found ${i}`)}function af(n,e,t){for(let r=0;r<t;r++)e[r]=n[r]}function sf(n,e,t,r){let i=0;for(;i<r;i++)e[i]=n[i];for(;i<t;i++)e[i]=n[i]+e[i-r]&255}function of(n,e,t,r){let i=0;if(t.length===0)for(;i<r;i++)e[i]=n[i];else for(;i<r;i++)e[i]=n[i]+t[i]&255}function lf(n,e,t,r,i){let a=0;if(t.length===0){for(;a<i;a++)e[a]=n[a];for(;a<r;a++)e[a]=n[a]+(e[a-i]>>1)&255}else{for(;a<i;a++)e[a]=n[a]+(t[a]>>1)&255;for(;a<r;a++)e[a]=n[a]+(e[a-i]+t[a]>>1)&255}}function cf(n,e,t,r,i){let a=0;if(t.length===0){for(;a<i;a++)e[a]=n[a];for(;a<r;a++)e[a]=n[a]+e[a-i]&255}else{for(;a<i;a++)e[a]=n[a]+t[a]&255;for(;a<r;a++)e[a]=n[a]+r5(e[a-i],t[a],t[a-i])&255}}function r5(n,e,t){const r=n+e-t,i=Math.abs(r-n),a=Math.abs(r-e),l=Math.abs(r-t);return i<=a&&i<=l?n:a<=l?e:t}function i5(n,e,t,r,i,a){switch(n){case 0:af(e,t,i);break;case 1:sf(e,t,i,a);break;case 2:of(e,t,r,i);break;case 3:lf(e,t,r,i,a);break;case 4:cf(e,t,r,i,a);break;default:throw new Error(`Unsupported filter: ${n}`)}}const a5=new Uint16Array([255]),s5=new Uint8Array(a5.buffer),o5=s5[0]===255;function l5(n){const{data:e,width:t,height:r,channels:i,depth:a}=n,l=[{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}],o=Math.ceil(a/8)*i,u=new Uint8Array(r*t*o);let d=0;for(let h=0;h<7;h++){const b=l[h],x=Math.ceil((t-b.x)/b.xStep),p=Math.ceil((r-b.y)/b.yStep);if(x<=0||p<=0)continue;const L=x*o,k=new Uint8Array(L);for(let C=0;C<p;C++){const y=e[d++],V=e.subarray(d,d+L);d+=L;const q=new Uint8Array(L);i5(y,V,q,k,L,o),k.set(q);for(let E=0;E<x;E++){const K=b.x+E*b.xStep,ae=b.y+C*b.yStep;if(!(K>=t||ae>=r))for(let J=0;J<o;J++)u[(ae*t+K)*o+J]=q[E*o+J]}}}if(a===16){const h=new Uint16Array(u.buffer);if(o5)for(let b=0;b<h.length;b++)h[b]=c5(h[b]);return h}else return u}function c5(n){return(n&255)<<8|n>>8&255}const u5=new Uint16Array([255]),d5=new Uint8Array(u5.buffer),h5=d5[0]===255,f5=new Uint8Array(0);function xd(n){const{data:e,width:t,height:r,channels:i,depth:a}=n,l=Math.ceil(a/8)*i,o=Math.ceil(a/8*i*t),u=new Uint8Array(r*o);let d=f5,h=0,b,x;for(let p=0;p<r;p++){switch(b=e.subarray(h+1,h+1+o),x=u.subarray(p*o,(p+1)*o),e[h]){case 0:af(b,x,o);break;case 1:sf(b,x,o,l);break;case 2:of(b,x,d,o);break;case 3:lf(b,x,d,o,l);break;case 4:cf(b,x,d,o,l);break;default:throw new Error(`Unsupported filter: ${e[h]}`)}d=x,h+=o+1}if(a===16){const p=new Uint16Array(u.buffer);if(h5)for(let L=0;L<p.length;L++)p[L]=p5(p[L]);return p}else return u}function p5(n){return(n&255)<<8|n>>8&255}const Mo=Uint8Array.of(137,80,78,71,13,10,26,10);function wd(n){if(!g5(n.readBytes(Mo.length)))throw new Error("wrong PNG signature")}function g5(n){if(n.length<Mo.length)return!1;for(let e=0;e<Mo.length;e++)if(n[e]!==Mo[e])return!1;return!0}const m5="tEXt",v5=0,uf=new TextDecoder("latin1");function b5(n){if(x5(n),n.length===0||n.length>79)throw new Error("keyword length must be between 1 and 79")}const y5=/^[\u0000-\u00FF]*$/;function x5(n){if(!y5.test(n))throw new Error("invalid latin1 text")}function w5(n,e,t){const r=df(e);n[r]=_5(e,t-r.length-1)}function df(n){for(n.mark();n.readByte()!==v5;);const e=n.offset;n.reset();const t=uf.decode(n.readBytes(e-n.offset-1));return n.skip(1),b5(t),t}function _5(n,e){return uf.decode(n.readBytes(e))}const yr={UNKNOWN:-1,GREYSCALE:0,TRUECOLOUR:2,INDEXED_COLOUR:3,GREYSCALE_ALPHA:4,TRUECOLOUR_ALPHA:6},Gl={UNKNOWN:-1,DEFLATE:0},_d={UNKNOWN:-1,ADAPTIVE:0},Yl={UNKNOWN:-1,NO_INTERLACE:0,ADAM7:1},Po={NONE:0,BACKGROUND:1,PREVIOUS:2},Kl={SOURCE:0,OVER:1};class S5 extends Nc{_checkCrc;_inflator;_png;_apng;_end;_hasPalette;_palette;_hasTransparency;_transparency;_compressionMethod;_filterMethod;_interlaceMethod;_colorType;_isAnimated;_numberOfFrames;_numberOfPlays;_frames;_writingDataChunks;constructor(e,t={}){super(e);const{checkCrc:r=!1}=t;this._checkCrc=r,this._inflator=new vd,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=Gl.UNKNOWN,this._filterMethod=_d.UNKNOWN,this._interlaceMethod=Yl.UNKNOWN,this._colorType=yr.UNKNOWN,this._isAnimated=!1,this._numberOfFrames=1,this._numberOfPlays=0,this._frames=[],this._writingDataChunks=!1,this.setBigEndian()}decode(){for(wd(this);!this._end;){const e=this.readUint32(),t=this.readChars(4);this.decodeChunk(e,t)}return this.decodeImage(),this._png}decodeApng(){for(wd(this);!this._end;){const e=this.readUint32(),t=this.readChars(4);this.decodeApngChunk(e,t)}return this.decodeApngImage(),this._apng}decodeChunk(e,t){const r=this.offset;switch(t){case"IHDR":this.decodeIHDR();break;case"PLTE":this.decodePLTE(e);break;case"IDAT":this.decodeIDAT(e);break;case"IEND":this._end=!0;break;case"tRNS":this.decodetRNS(e);break;case"iCCP":this.decodeiCCP(e);break;case m5:w5(this._png.text,this,e);break;case"pHYs":this.decodepHYs();break;default:this.skip(e);break}if(this.offset-r!==e)throw new Error(`Length mismatch while decoding chunk ${t}`);this._checkCrc?yd(this,e+4,t):this.skip(4)}decodeApngChunk(e,t){const r=this.offset;switch(t!=="fdAT"&&t!=="IDAT"&&this._writingDataChunks&&this.pushDataToFrame(),t){case"acTL":this.decodeACTL();break;case"fcTL":this.decodeFCTL();break;case"fdAT":this.decodeFDAT(e);break;default:this.decodeChunk(e,t),this.offset=r+e;break}if(this.offset-r!==e)throw new Error(`Length mismatch while decoding chunk ${t}`);this._checkCrc?yd(this,e+4,t):this.skip(4)}decodeIHDR(){const e=this._png;e.width=this.readUint32(),e.height=this.readUint32(),e.depth=A5(this.readUint8());const t=this.readUint8();this._colorType=t;let r;switch(t){case yr.GREYSCALE:r=1;break;case yr.TRUECOLOUR:r=3;break;case yr.INDEXED_COLOUR:r=1;break;case yr.GREYSCALE_ALPHA:r=2;break;case yr.TRUECOLOUR_ALPHA:r=4;break;case yr.UNKNOWN:default:throw new Error(`Unknown color type: ${t}`)}if(this._png.channels=r,this._compressionMethod=this.readUint8(),this._compressionMethod!==Gl.DEFLATE)throw new Error(`Unsupported compression method: ${this._compressionMethod}`);this._filterMethod=this.readUint8(),this._interlaceMethod=this.readUint8()}decodeACTL(){this._numberOfFrames=this.readUint32(),this._numberOfPlays=this.readUint32(),this._isAnimated=!0}decodeFCTL(){const e={sequenceNumber:this.readUint32(),width:this.readUint32(),height:this.readUint32(),xOffset:this.readUint32(),yOffset:this.readUint32(),delayNumber:this.readUint16(),delayDenominator:this.readUint16(),disposeOp:this.readUint8(),blendOp:this.readUint8(),data:new Uint8Array(0)};this._frames.push(e)}decodePLTE(e){if(e%3!==0)throw new RangeError(`PLTE field length must be a multiple of 3. Got ${e}`);const t=e/3;this._hasPalette=!0;const r=[];this._palette=r;for(let i=0;i<t;i++)r.push([this.readUint8(),this.readUint8(),this.readUint8()])}decodeIDAT(e){this._writingDataChunks=!0;const t=e,r=this.offset+this.byteOffset;if(this._inflator.push(new Uint8Array(this.buffer,r,t)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(e)}decodeFDAT(e){this._writingDataChunks=!0;let t=e,r=this.offset+this.byteOffset;if(r+=4,t-=4,this._inflator.push(new Uint8Array(this.buffer,r,t)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(e)}decodetRNS(e){switch(this._colorType){case yr.GREYSCALE:case yr.TRUECOLOUR:{if(e%2!==0)throw new RangeError(`tRNS chunk length must be a multiple of 2. Got ${e}`);if(e/2>this._png.width*this._png.height)throw new Error(`tRNS chunk contains more alpha values than there are pixels (${e/2} vs ${this._png.width*this._png.height})`);this._hasTransparency=!0,this._transparency=new Uint16Array(e/2);for(let t=0;t<e/2;t++)this._transparency[t]=this.readUint16();break}case yr.INDEXED_COLOUR:{if(e>this._palette.length)throw new Error(`tRNS chunk contains more alph
18a values than there are palette colors (${e} vs ${this._palette.length})`);let t=0;for(;t<e;t++){const r=this.readByte();this._palette[t].push(r)}for(;t<this._palette.length;t++)this._palette[t].push(255);break}case yr.UNKNOWN:case yr.GREYSCALE_ALPHA:case yr.TRUECOLOUR_ALPHA:default:throw new Error(`tRNS chunk is not supported for color type ${this._colorType}`)}}decodeiCCP(e){const t=df(this),r=this.readUint8();if(r!==Gl.DEFLATE)throw new Error(`Unsupported iCCP compression method: ${r}`);const i=this.readBytes(e-t.length-2);this._png.iccEmbeddedProfile={name:t,profile:e5(i)}}decodepHYs(){const e=this.readUint32(),t=this.readUint32(),r=this.readByte();this._png.resolution={x:e,y:t,unit:r}}decodeApngImage(){this._apng.width=this._png.width,this._apng.height=this._png.height,this._apng.channels=this._png.channels,this._apng.depth=this._png.depth,this._apng.numberOfFrames=this._numberOfFrames,this._apng.numberOfPlays=this._numberOfPlays,this._apng.text=this._png.text,this._apng.resolution=this._png.resolution;for(let e=0;e<this._numberOfFrames;e++){const t={sequenceNumber:this._frames[e].sequenceNumber,delayNumber:this._frames[e].delayNumber,delayDenominator:this._frames[e].delayDenominator,data:this._apng.depth===8?new Uint8Array(this._apng.width*this._apng.height*this._apng.channels):new Uint16Array(this._apng.width*this._apng.height*this._apng.channels)},r=this._frames.at(e);if(r){if(r.data=xd({data:r.data,width:r.width,height:r.height,channels:this._apng.channels,depth:this._apng.depth}),this._hasPalette&&(this._apng.palette=this._palette),this._hasTransparency&&(this._apng.transparency=this._transparency),e===0||r.xOffset===0&&r.yOffset===0&&r.width===this._png.width&&r.height===this._png.height)t.data=r.data;else{const i=this._apng.frames.at(e-1);this.disposeFrame(r,i,t),this.addFrameDataToCanvas(t,r)}this._apng.frames.push(t)}}return this._apng}disposeFrame(e,t,r){switch(e.disposeOp){case Po.NONE:break;case Po.BACKGROUND:for(let i=0;i<this._png.height;i++)for(let a=0;a<this._png.width;a++){const l=(i*e.width+a)*this._png.channels;for(let o=0;o<this._png.channels;o++)r.data[l+o]=0}break;case Po.PREVIOUS:r.data.set(t.data);break;default:throw new Error("Unknown disposeOp")}}addFrameDataToCanvas(e,t){const r=1<<this._png.depth,i=(a,l)=>{const o=((a+t.yOffset)*this._png.width+t.xOffset+l)*this._png.channels,u=(a*t.width+l)*this._png.channels;return{index:o,frameIndex:u}};switch(t.blendOp){case Kl.SOURCE:for(let a=0;a<t.height;a++)for(let l=0;l<t.width;l++){const{index:o,frameIndex:u}=i(a,l);for(let d=0;d<this._png.channels;d++)e.data[o+d]=t.data[u+d]}break;case Kl.OVER:for(let a=0;a<t.height;a++)for(let l=0;l<t.width;l++){const{index:o,frameIndex:u}=i(a,l);for(let d=0;d<this._png.channels;d++){const h=t.data[u+this._png.channels-1]/r,b=d%(this._png.channels-1)===0?1:t.data[u+d],x=Math.floor(h*b+(1-h)*e.data[o+d]);e.data[o+d]+=x}}break;default:throw new Error("Unknown blendOp")}}decodeImage(){if(this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);const e=this._isAnimated?(this._frames?.at(0)).data:this._inflator.result;if(this._filterMethod!==_d.ADAPTIVE)throw new Error(`Filter method ${this._filterMethod} not supported`);if(this._interlaceMethod===Yl.NO_INTERLACE)this._png.data=xd({data:e,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else if(this._interlaceMethod===Yl.ADAM7)this._png.data=l5({data:e,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else throw new Error(`Interlace method ${this._interlaceMethod} not supported`);this._hasPalette&&(this._png.palette=this._palette),this._hasTransparency&&(this._png.transparency=this._transparency)}pushDataToFrame(){const e=this._inflator.result,t=this._frames.at(-1);t?t.data=e:this._frames.push({sequenceNumber:0,width:this._png.width,height:this._png.height,xOffset:0,yOffset:0,delayNumber:0,delayDenominator:0,disposeOp:Po.NONE,blendOp:Kl.SOURCE,data:e}),this._inflator=new vd,this._writingDataChunks=!1}}function A5(n){if(n!==1&&n!==2&&n!==4&&n!==8&&n!==16)throw new Error(`invalid bit depth: ${n}`);return n}var Sd;(function(n){n[n.UNKNOWN=0]="UNKNOWN",n[n.METRE=1]="METRE"})(Sd||(Sd={}));function k5(n,e){return new S5(n,e).decode()}var nt=(function(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this})();function Xl(){nt.console&&typeof nt.console.log=="function"&&nt.console.log.apply(nt.console,arguments)}var qt={log:Xl,warn:function(n){nt.console&&(typeof nt.console.warn=="function"?nt.console.warn.apply(nt.console,arguments):Xl.call(null,arguments))},error:function(n){nt.console&&(typeof nt.console.error=="function"?nt.console.error.apply(nt.console,arguments):Xl(n))}};function Zl(n,e,t){var r=new XMLHttpRequest;r.open("GET",n),r.responseType="blob",r.onload=function(){pa(r.response,e,t)},r.onerror=function(){qt.error("could not download file")},r.send()}function Ad(n){var e=new XMLHttpRequest;e.open("HEAD",n,!1);try{e.send()}catch{}return e.status>=200&&e.status<=299}function To(n){try{n.dispatchEvent(new MouseEvent("click"))}catch{var e=document.createEvent("MouseEvents");
vendor: 3,223 bytes, line 18
18e.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),n.dispatchEvent(e)}}var pa=nt.saveAs||((typeof window>"u"?"undefined":Ut(window))!=="object"||window!==nt?function(){}:typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype?function(n,e,t){var r=nt.URL||nt.webkitURL,i=document.createElement("a");e=e||n.name||"download",i.download=e,i.rel="noopener",typeof n=="string"?(i.href=n,i.origin!==location.origin?Ad(i.href)?Zl(n,e,t):To(i,i.target="_blank"):To(i)):(i.href=r.createObjectURL(n),setTimeout(function(){r.revokeObjectURL(i.href)},4e4),setTimeout(function(){To(i)},0))}:"msSaveOrOpenBlob"in navigator?function(n,e,t){if(e=e||n.name||"download",typeof n=="string")if(Ad(n))Zl(n,e,t);else{var r=document.createElement("a");r.href=n,r.target="_blank",setTimeout(function(){To(r)})}else navigator.msSaveOrOpenBlob((function(i,a){return a===void 0?a={autoBom:!1}:Ut(a)!=="object"&&(qt.warn("Deprecated: Expected third argument to be a object"),a={autoBom:!a}),a.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(i.type)?new Blob(["\uFEFF",i],{type:i.type}):i})(n,t),e)}:function(n,e,t,r){if((r=r||open("","_blank"))&&(r.document.title=r.document.body.innerText="downloading..."),typeof n=="string")return Zl(n,e,t);var i=n.type==="application/octet-stream",a=/constructor/i.test(nt.HTMLElement)||nt.safari,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||i&&a)&&(typeof FileReader>"u"?"undefined":Ut(FileReader))==="object"){var o=new FileReader;o.onloadend=function(){var h=o.result;h=l?h:h.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=h:location=h,r=null},o.readAsDataURL(n)}else{var u=nt.URL||nt.webkitURL,d=u.createObjectURL(n);r?r.location=d:location.href=d,r=null,setTimeout(function(){u.revokeObjectURL(d)},4e4)}});function hf(n){var e;n=n||"",this.ok=!1,n.charAt(0)=="#"&&(n=n.substr(1,6)),n={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:"90ee9
180",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"}[n=(n=n.replace(/ /g,"")).toLowerCase()]||n;for(var t=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(o){return[parseInt(o[1]),parseInt(o[2]),parseInt(o[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(o){return[parseInt(o[1],16),parseInt(o[2],16),parseInt(o[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(o){return[parseInt(o[1]+o[1],16),parseInt(o[2]+o[2],16),parseInt(o[3]+o[3],16)]}}],r=0;r<t.length;r++){var i=t[r].re,a=t[r].process,l=i.exec(n);l&&(e=a(l),this.r=e[0],this.g=e[1],this.b=e[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var o=this.r.toString(16),u=this.g.toString(16),d=this.b.toString(16);return o.length==1&&(o="0"+o),u.length==1&&(u="0"+u),d.length==1&&(d="0"+d),"#"+o+u+d}}var Io=nt.atob.bind(nt),kd=nt.btoa.bind(nt);function Jl(n,e){var t=n[0],r=n[1],i=n[2],a=n[3];t=Rn(t,r,i,a,e[0],7,-680876936),a=Rn(a,t,r,i,e[1],12,-389564586),i=Rn(i,a,t,r,e[2],17,606105819),r=Rn(r,i,a,t,e[3],22,-1044525330),t=Rn(t,r,i,a,e[4],7,-176418897),a=Rn(a,t,r,i,e[5],12,1200080426),i=Rn(i,a,t,r,e[6],17,-1473231341),r=Rn(r,i,a,t,e[7],22,-45705983),t=Rn(t,r,i,a,e[8],7,1770035416),a=Rn(a,t,r,i,e[9],12,-1958414417),i=Rn(i,a,t,r,e[10],17,-42063),r=Rn(r,i,a,t,e[11],22,-1990404162),t=Rn(t,r,i,a,e[12],7,1804603682),a=Rn(a,t,r,i,e[13],12,-40341101),i=Rn(i,a,t,r,e[14],17,-1502002290),t=zn(t,r=Rn(r,i,a,t,e[15],22,1236535329),i,a,e[1],5,-165796510),a=zn(a,t,r,i,e[6],9,-1069501632),i=zn(i,a,t,r,e[11],14,643717713),r=zn(r,i,a,t,e[0],20,-373897302),t=zn(t,r,i,a,e[5],5,-701558691),a=zn(a,t,r,i,e[10],9,38016083),i=zn(i,a,t,r,e[15],14,-660478335),r=zn(r,i,a,t,e[4],20,-405537848),t=zn(t,r,i,a,e[9],5,568446438),a=zn(a,t,r,i,e[14],9,-1019803690),i=zn(i,a,t,r,e[3],14,-187363961),r=zn(r,i,a,t,e[8],20,1163531501),t=zn(t,r,i,a,e[13],5,-1444681467),a=zn(a,t,r,i,e[2],9,-51403784),i=zn(i,a,t,r,e[7],14,1735328473),t=qn(t,r=zn(r,i,a,t,e[12],20,-1926607734),i,a,e[5],4,-378558),a=qn(a,t,r,i,e[8],11,-2022574463),i=qn(i,a,t,r,e[11],16,1839030562),r=qn(r,i,a,t,e[14],23,-35309556),t=qn(t,r,i,a,e[1],4,-1530992060),a=qn(a,t,r,i,e[4],11,1272893353),i=qn(i,a,t,r,e[7],16,-155497632),r=qn(r,i,a,t,e[10],23,-1094730640),t=qn(t,r,i,a,e[13],4,681279174),a=qn(a,t,r,i,e[0],11,-358537222),i=qn(i,a,t,r,e[3],16,-722521979),r=qn(r,i,a,t,e[6],23,76029189),t=qn(t,r,i,a,e[9],4,-640364487),a=qn(a,t,r,i,e[12],11,-421815835),i=qn(i,a,t,r,e[15],16,530742520),t=Un(t,r=qn(r,i,a,t,e[2],23,-995338651),i,a,e[0],6,-198630844),a=Un(a,t,r,i,e[7],10,1126891415),i=Un(i,a,t,r,e[14],15,-1416354905),r=Un(r,i,a,t,e[5],21,-57434055),t=Un(t,r,i,a,e[12],6,1700485571),a=Un(a,t,r,i,e[3],10,-1894986606),i=Un(i,a,t,r,e[10],15,-1051523),r=Un(r,i,a,t,e[1],21,-2054922799),t=Un(t,r,i,a,e[8],6,1873313359),a=Un(a,t,r,i,e[15],10,-30611744),i=Un(i,a,t,r,e[6],15,-1560198380),r=Un(r,i,a,t,e[13],21,1309151649),t=Un(t,r,i,a,e[4],6,-145523070),a=Un(a,t,r,i,e[11],10,-1120210379),i=Un(i,a,t,r,e[2],15,718787259),r=Un(r,i,a,t,e[9],21,-343485551),n[0]=Vi(t,n[0]),n[1]=Vi(r,n[1]),n[2]=Vi(i,n[2]),n[3]=Vi(a,n[3])}function Zo(n,e,t,r,i,a){return e=Vi(Vi(e,n),Vi(r,a)),Vi(e<<i|e>>>32-i,t)}function Rn(n,e,t,r,i,a,l){return Zo(e&t|~e&r,n,e,i,a,l)}function zn(n,e,t,r,i,a,l){return Zo(e&r|t&~r,n,e,i,a,l)}function qn(n,e,t,r,i,a,l){return Zo(e^t^r,n,e,i,a,l)}function Un(n,e,t,r,i,a,l){return Zo(t^(e|~r),n,e,i,a,l)}function ff(n){var e,t=n.length,r=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=n.length;
vendor: 8,833 bytes, line 18
18e+=64)Jl(r,L5(n.substring(e-64,e)));n=n.substring(e-64);var i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e<n.length;e++)i[e>>2]|=n.charCodeAt(e)<<(e%4<<3);if(i[e>>2]|=128<<(e%4<<3),e>55)for(Jl(r,i),e=0;e<16;e++)i[e]=0;return i[14]=8*t,Jl(r,i),r}function L5(n){var e,t=[];for(e=0;e<64;e+=4)t[e>>2]=n.charCodeAt(e)+(n.charCodeAt(e+1)<<8)+(n.charCodeAt(e+2)<<16)+(n.charCodeAt(e+3)<<24);return t}var Ld="0123456789abcdef".split("");function j5(n){for(var e="",t=0;t<4;t++)e+=Ld[n>>8*t+4&15]+Ld[n>>8*t&15];return e}function N5(n){return String.fromCharCode(255&n,(65280&n)>>8,(16711680&n)>>16,(4278190080&n)>>24)}function bc(n){return ff(n).map(N5).join("")}var C5=(function(n){for(var e=0;e<n.length;e++)n[e]=j5(n[e]);return n.join("")})(ff("hello"))!="5d41402abc4b2a76b9719d911017c592";function Vi(n,e){if(C5){var t=(65535&n)+(65535&e);return(n>>16)+(e>>16)+(t>>16)<<16|65535&t}return n+e&4294967295}function yc(n,e){var t,r,i,a;if(n!==t){for(var l=(i=n,a=1+(256/n.length|0),new Array(a+1).join(i)),o=[],u=0;u<256;u++)o[u]=u;var d=0;for(u=0;u<256;u++){var h=o[u];d=(d+h+l.charCodeAt(u))%256,o[u]=o[d],o[d]=h}t=n,r=o}else o=r;var b=e.length,x=0,p=0,L="";for(u=0;u<b;u++)p=(p+(h=o[x=(x+1)%256]))%256,o[x]=o[p],o[p]=h,l=o[(o[x]+o[p])%256],L+=String.fromCharCode(e.charCodeAt(u)^l);return L}var jd={print:4,modify:8,copy:16,"annot-forms":32};function Ya(n,e,t,r){this.v=1,this.r=2;var i=192;n.forEach(function(o){if(jd.perm!==void 0)throw new Error("Invalid permission: "+o);i+=jd[o]}),this.padding="(¿N^NuŠAd\0NVÿú�\b..\0¶Ðh>€/\f©þdSiz";var a=(e+this.padding).substr(0,32),l=(t+this.padding).substr(0,32);this.O=this.processOwnerPassword(a,l),this.P=-(1+(255^i)),this.encryptionKey=bc(a+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(r)).substr(0,5),this.U=yc(this.encryptionKey,this.padding)}function Ka(n){if(/[^\u0000-\u00ff]/.test(n))throw new Error("Invalid PDF Name Object: "+n+", Only accept ASCII characters.");for(var e="",t=n.length,r=0;r<t;r++){var i=n.charCodeAt(r);e+=i<33||i===35||i===37||i===40||i===41||i===47||i===60||i===62||i===91||i===93||i===123||i===125||i>126?"#"+("0"+i.toString(16)).slice(-2):n[r]}return e}function Nd(n){if(Ut(n)!=="object")throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var e={};this.subscribe=function(t,r,i){if(i=i||!1,typeof t!="string"||typeof r!="function"||typeof i!="boolean")throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");e.hasOwnProperty(t)||(e[t]={});var a=Math.random().toString(35);return e[t][a]=[r,!!i],a},this.unsubscribe=function(t){for(var r in e)if(e[r][t])return delete e[r][t],Object.keys(e[r]).length===0&&delete e[r],!0;return!1},this.publish=function(t){if(e.hasOwnProperty(t)){var r=Array.prototype.slice.call(arguments,1),i=[];for(var a in e[t]){var l=e[t][a];try{l[0].apply(n,r)}catch(o){nt.console&&qt.error("jsPDF PubSub Error",o.message,o)}l[1]&&i.push(a)}i.length&&i.forEach(this.unsubscribe)}},this.getTopics=function(){return e}}function Go(n){if(!(this instanceof Go))return new Go(n);var e="opacity,stroke-opacity".split(",");for(var t in n)n.hasOwnProperty(t)&&e.indexOf(t)>=0&&(this[t]=n[t]);this.id="",this.objectNumber=-1}function pf(n,e){this.gState=n,this.matrix=e,this.id="",this.objectNumber=-1}function ga(n,e,t,r,i){if(!(this instanceof ga))return new ga(n,e,t,r,i);this.type=n==="axial"?2:3,this.coords=e,this.colors=t,pf.call(this,r,i)}function Xa(n,e,t,r,i){if(!(this instanceof Xa))return new Xa(n,e,t,r,i);this.boundingBox=n,this.xStep=e,this.yStep=t,this.stream="",this.cloneIndex=0,pf.call(this,r,i)}function Ge(n){var e,t=typeof arguments[0]=="string"?arguments[0]:"p",r=arguments[1],i=arguments[2],a=arguments[3],l=[],o=1,u=16,d="S",h=null;Ut(n=n||{})==="object"&&(t=n.orientation,r=n.unit||r,i=n.format||i,a=n.compress||n.compressPdf||a,(h=n.encryption||null)!==null&&(h.userPassword=h.userPassword||"",h.ownerPassword=h.ownerPassword||"",h.userPermissions=h.userPermissions||[]),o=typeof n.userUnit=="number"?Math.abs(n.userUnit):1,n.precision!==void 0&&(e=n.precision),n.floatPrecision!==void 0&&(u=n.floatPrecision),d=n.defaultPathOperation||"S"),l=n.filters||(a===!0?["FlateEncode"]:l),r=r||"mm",t=(""+(t||"P")).toLowerCase();var b=n.putOnlyUsedFonts||!1,x={},p={internal:{},__private__:{}};p.__private__.PubSub=Nd;var L="1.3",k=p.__private__.getPdfVersion=function(){return L};p.__private__.setPdfVersion=function(f){L=f};var C={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]};p.__private__.getPageFormats=function(){return C};var y=p.__private__.getPageFormat=function(f){return C[f]};i=i||"a4";var V="compat",q="advanced",E=V;function K(){this.saveGraphicsState(),F(new Qe(at,0,0,-at,0,Xi()*at).toString()+" cm"),this.setFontSize(this.getFontSize()/at),d="n",E=q}function ae(){this.restoreGraphicsState(),d="S",E=V}var J=p.__private__.combineFontStyleAndFontWeight=function(f,w){if(f=="bold"&&w=="normal"||f=="bold"&&w==400||f=="normal"&&w=="italic"||f=="bold"&&w=="italic")throw new Error("Invalid Combination of fontweight and fontstyle");return w&&(f=w==400||w==="normal"?f==="italic"?"italic":"normal":w!=700&&w!=="bold"||f!=="normal"?(w==700?"bold":w)+""+f:"bold"),f};p.advancedAPI=function(f){var w=E===V;return w&&K.call(this),typeof f!="function"||(f(this),w&&ae.call(this)),this},p.compatAPI=function(f){var w=E===q;return w&&ae.call(this),typeof f!="function"||(f(this),w&&K.call(this)),this},p.isAdvancedAPI=function(){return E===q};var H,D=function(f){if(E!==q)throw new Error(f+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},G=p.roundToPrecision=p.__private__.roundToPrecision=function(f,w){var O=e||w;if(isNaN(f)||isNaN(O))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return f.toFixed(O).replace(/0+$/,"")};H=p.hpf=p.__private__.hpf=typeof u=="number"?function(f){if(isNaN(f))throw new Error("Invalid argument passed to jsPDF.hpf");return G(f,u)}:u==="smart"?function(f){if(isNaN(f))throw new Error("Invalid argument passed to jsPDF.hpf");return G(f,f>-1&&f<1?16:5)}:function(f){if(isNaN(f))throw new Error("Invalid argument passed to jsPDF.hpf");return G(f,16)};var S=p.f2=p.__private__.f2=function(f){if(isNaN(f))throw new Error("Invalid argument passed to jsPDF.f2");return G(f,2)},P=p.__private__.f3=function(f){if(isNaN(f))throw new Error("Invalid argument passed to jsPDF.f3");return G(f,3)},B=p.scale=p.__private__.scale=function(f){if(isNaN(f))throw new Error("Invalid argument passed to jsPDF.scale");return E===V?f*at:E===q?f:void 0},U=function(f){return B((function(w){return E===V?Xi()-w:E===q?w:void 0})(f))};p.__private__.setPrecision=p.setPrecision=function(f){typeof parseInt(f,10)=="number"&&(e=parseInt(f,10))};var re,Q="00000000000000000000000000000000",de=p.__private__.getFileId=function(){return Q},se=p.__private__.setFileId=function(f){return Q=f!==void 0&&/^[a-fA-F0-9]{32}$/.test(f)?f.toUpperCase():Q.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),h!==null&&(rn=new Ya(h.userPermissions,h.userPassword,h.ownerPassword,Q)),Q};p.setFileId=function(f){return se(f),this},p.getFileId=function(){return de()};var fe=p.__private__.convertDateToPDFDate=function(f){var w=f.getTimezoneOffset(),O=w<0?"+":"-",Y=Math.floor(Math.abs(w/60)),ne=Math.abs(w%60),pe=[O,W(Y),"'",W(ne),"'"].join("");return["D:",f.getFullYear(),W(f.getMonth()+1),W(f.getDate()),W(f.getHours()),W(f.getMinutes()),W(f.getSeconds()),pe].join("")},we=p.__private__.convertPDFDateToDate=function(f){var w=parseInt(f.substr(2,4),10),O=parseInt(f.substr(6,2),10)-1,Y=parseInt(f.substr(8,2),10),ne=parseInt(f.substr(10,2),10),pe=parseInt(f.substr(12,2),10),_e=parseInt(f.substr(14,2),10);return new Date(w,O,Y,ne,pe,_e,0)},te=p.__private__.setCreationDate=function(f){var w;if(f===void 0&&(f=new Date),f instanceof Date)w=fe(f);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(f))throw new Error("Invalid argument passed to 
18jsPDF.setCreationDate");w=f}return re=w},A=p.__private__.getCreationDate=function(f){var w=re;return f==="jsDate"&&(w=we(re)),w};p.setCreationDate=function(f){return te(f),this},p.getCreationDate=function(f){return A(f)};var I,W=p.__private__.padd2=function(f){return("0"+parseInt(f)).slice(-2)},$=p.__private__.padd2Hex=function(f){return("00"+(f=f.toString())).substr(f.length)},X=0,ie=[],ue=[],he=0,me=[],Se=[],Te=!1,Ce=ue;p.__private__.setCustomOutputDestination=function(f){Te=!0,Ce=f};var Fe=function(f){Te||(Ce=f)};p.__private__.resetCustomOutputDestination=function(){Te=!1,Ce=ue};var F=p.__private__.out=function(f){return f=f.toString(),he+=f.length+1,Ce.push(f),Ce},Ne=p.__private__.write=function(f){return F(arguments.length===1?f.toString():Array.prototype.join.call(arguments," "))},et=p.__private__.getArrayBuffer=function(f){for(var w=f.length,O=new ArrayBuffer(w),Y=new Uint8Array(O);w--;)Y[w]=f.charCodeAt(w);return O},Ve=[["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]];p.__private__.getStandardFonts=function(){return Ve};var ke=n.fontSize||16;p.__private__.setFontSize=p.setFontSize=function(f){return ke=E===q?f/at:f,this};var Ke,Ee=p.__private__.getFontSize=p.getFontSize=function(){return E===V?ke:ke*at},Xe=n.R2L||!1;p.__private__.setR2L=p.setR2L=function(f){return Xe=f,this},p.__private__.getR2L=p.getR2L=function(){return Xe};var Oe,kt=p.__private__.setZoomMode=function(f){if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(f))Ke=f;else if(isNaN(f)){if([void 0,null,"fullwidth","fullheight","fullpage","original"].indexOf(f)===-1)throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+f+'" is not recognized.');Ke=f}else Ke=parseInt(f,10)};p.__private__.getZoomMode=function(){return Ke};var vt,rt=p.__private__.setPageMode=function(f){if([void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(f)==-1)throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+f+'" is not recognized.');Oe=f};p.__private__.getPageMode=function(){return Oe};var bt=p.__private__.setLayoutMode=function(f){if([void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(f)==-1)throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+f+'" is not recognized.');vt=f};p.__private__.getLayoutMode=function(){return vt},p.__private__.setDisplayMode=p.setDisplayMode=function(f,w,O){return kt(f),bt(w),rt(O),this};var mt={title:"",subject:"",author:"",keywords:"",creator:""};p.__private__.getDocumentProperty=function(f){if(Object.keys(mt).indexOf(f)===-1)throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return mt[f]},p.__private__.getDocumentProperties=function(){return mt},p.__private__.setDocumentProperties=p.setProperties=p.setDocumentProperties=function(f){for(var w in mt)mt.hasOwnProperty(w)&&f[w]&&(mt[w]=f[w]);return this},p.__private__.setDocumentProperty=function(f,w){if(Object.keys(mt).indexOf(f)===-1)throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return mt[f]=w};var Re,at,We,nn,xt,ut={},ot={},Dt=[],ze={},Tt={},Ze={},Je={},Vt=null,dt=0,Ye=[],Lt=new Nd(p),Wr=n.hotfixes||[],fn={},Sr={},cr=[],Qe=function f(w,O,Y,ne,pe,_e){if(!(this instanceof f))return new f(w,O,Y,ne,pe,_e);isNaN(w)&&(w=1),isNaN(O)&&(O=0),isNaN(Y)&&(Y=0),isNaN(ne)&&(ne=1),isNaN(pe)&&(pe=0),isNaN(_e)&&(_e=0),this._matrix=[w,O,Y,ne,pe,_e]};Object.defineProperty(Qe.prototype,"sx",{get:function(){return this._matrix[0]},set:function(f){this._matrix[0]=f}}),Object.defineProperty(Qe.prototype,"shy",{get:function(){return this._matrix[
vendor: 15,390 bytes, lines 18-22
181]},set:function(f){this._matrix[1]=f}}),Object.defineProperty(Qe.prototype,"shx",{get:function(){return this._matrix[2]},set:function(f){this._matrix[2]=f}}),Object.defineProperty(Qe.prototype,"sy",{get:function(){return this._matrix[3]},set:function(f){this._matrix[3]=f}}),Object.defineProperty(Qe.prototype,"tx",{get:function(){return this._matrix[4]},set:function(f){this._matrix[4]=f}}),Object.defineProperty(Qe.prototype,"ty",{get:function(){return this._matrix[5]},set:function(f){this._matrix[5]=f}}),Object.defineProperty(Qe.prototype,"a",{get:function(){return this._matrix[0]},set:function(f){this._matrix[0]=f}}),Object.defineProperty(Qe.prototype,"b",{get:function(){return this._matrix[1]},set:function(f){this._matrix[1]=f}}),Object.defineProperty(Qe.prototype,"c",{get:function(){return this._matrix[2]},set:function(f){this._matrix[2]=f}}),Object.defineProperty(Qe.prototype,"d",{get:function(){return this._matrix[3]},set:function(f){this._matrix[3]=f}}),Object.defineProperty(Qe.prototype,"e",{get:function(){return this._matrix[4]},set:function(f){this._matrix[4]=f}}),Object.defineProperty(Qe.prototype,"f",{get:function(){return this._matrix[5]},set:function(f){this._matrix[5]=f}}),Object.defineProperty(Qe.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(Qe.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(Qe.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(Qe.prototype,"isIdentity",{get:function(){return this.sx===1&&this.shy===0&&this.shx===0&&this.sy===1&&this.tx===0&&this.ty===0}}),Qe.prototype.join=function(f){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(H).join(f)},Qe.prototype.multiply=function(f){var w=f.sx*this.sx+f.shy*this.shx,O=f.sx*this.shy+f.shy*this.sy,Y=f.shx*this.sx+f.sy*this.shx,ne=f.shx*this.shy+f.sy*this.sy,pe=f.tx*this.sx+f.ty*this.shx+this.tx,_e=f.tx*this.shy+f.ty*this.sy+this.ty;return new Qe(w,O,Y,ne,pe,_e)},Qe.prototype.decompose=function(){var f=this.sx,w=this.shy,O=this.shx,Y=this.sy,ne=this.tx,pe=this.ty,_e=Math.sqrt(f*f+w*w),Be=(f/=_e)*O+(w/=_e)*Y;O-=f*Be,Y-=w*Be;var Ie=Math.sqrt(O*O+Y*Y);return Be/=Ie,f*(Y/=Ie)<w*(O/=Ie)&&(f=-f,w=-w,Be=-Be,_e=-_e),{scale:new Qe(_e,0,0,Ie,0,0),translate:new Qe(1,0,0,1,ne,pe),rotate:new Qe(f,w,-w,f,0,0),skew:new Qe(1,0,Be,1,0,0)}},Qe.prototype.toString=function(f){return this.join(" ")},Qe.prototype.inversed=function(){var f=this.sx,w=this.shy,O=this.shx,Y=this.sy,ne=this.tx,pe=this.ty,_e=1/(f*Y-w*O),Be=Y*_e,Ie=-w*_e,it=-O*_e,lt=f*_e;return new Qe(Be,Ie,it,lt,-Be*ne-it*pe,-Ie*ne-lt*pe)},Qe.prototype.applyToPoint=function(f){var w=f.x*this.sx+f.y*this.shx+this.tx,O=f.x*this.shy+f.y*this.sy+this.ty;return new Ki(w,O)},Qe.prototype.applyToRectangle=function(f){var w=this.applyToPoint(f),O=this.applyToPoint(new Ki(f.x+f.w,f.y+f.h));return new ds(w.x,w.y,O.x-w.x,O.y-w.y)},Qe.prototype.clone=function(){var f=this.sx,w=this.shy,O=this.shx,Y=this.sy,ne=this.tx,pe=this.ty;return new Qe(f,w,O,Y,ne,pe)},p.Matrix=Qe;var Dr=p.matrixMult=function(f,w){return w.multiply(f)},Ar=new Qe(1,0,0,1,0,0);p.unitMatrix=p.identityMatrix=Ar;var Zn=function(f,w){if(!Tt[f]){var O=(w instanceof ga?"Sh":"P")+(Object.keys(ze).length+1).toString(10);w.id=O,Tt[f]=O,ze[O]=w,Lt.publish("addPattern",w)}};p.ShadingPattern=ga,p.TilingPattern=Xa,p.addShadingPattern=function(f,w){return D("addShadingPattern()"),Zn(f,w),this},p.beginTilingPattern=function(f){D("beginTilingPattern()"),hs(f.boundingBox[0],f.boundingBox[1],f.boundingBox[2]-f.boundingBox[0],f.boundingBox[3]-f.boundingBox[1],f.matrix)},p.endTilingPattern=function(f,w){D("endTilingPattern()"),w.stream=Se[I].join(`
19`),Zn(f,w),Lt.publish("endTilingPattern",w),cr.pop().restore()};var Vn,Xt=p.__private__.newObject=function(){var f=Et();return on(f,!0),f},Et=p.__private__.newObjectDeferred=function(){return X++,ie[X]=function(){return he},X},on=function(f,w){return w=typeof w=="boolean"&&w,ie[f]=he,w&&F(f+" 0 obj"),f},Hr=p.__private__.newAdditionalObject=function(){var f={objId:Et(),content:""};return me.push(f),f},Wn=Et(),Jn=Et(),Qn=p.__private__.decodeColorString=function(f){var w=f.split(" ");if(w.length!==2||w[1]!=="g"&&w[1]!=="G")w.length!==5||w[4]!=="k"&&w[4]!=="K"||(w=[(1-w[0])*(1-w[3]),(1-w[1])*(1-w[3]),(1-w[2])*(1-w[3]),"r"]);else{var O=parseFloat(w[0]);w=[O,O,O,"r"]}for(var Y="#",ne=0;ne<3;ne++)Y+=("0"+Math.floor(255*parseFloat(w[ne])).toString(16)).slice(-2);return Y},er=p.__private__.encodeColorString=function(f){var w;typeof f=="string"&&(f={ch1:f});var O=f.ch1,Y=f.ch2,ne=f.ch3,pe=f.ch4,_e=f.pdfColorType==="draw"?["G","RG","K"]:["g","rg","k"];if(typeof O=="string"&&O.charAt(0)!=="#"){var Be=new hf(O);if(Be.ok)O=Be.toHex();else if(!/^\d*\.?\d*$/.test(O))throw new Error('Invalid color "'+O+'" passed to jsPDF.encodeColorString.')}if(typeof O=="string"&&/^#[0-9A-Fa-f]{3}$/.test(O)&&(O="#"+O[1]+O[1]+O[2]+O[2]+O[3]+O[3]),typeof O=="string"&&/^#[0-9A-Fa-f]{6}$/.test(O)){var Ie=parseInt(O.substr(1),16);O=Ie>>16&255,Y=Ie>>8&255,ne=255&Ie}if(Y===void 0||pe===void 0&&O===Y&&Y===ne)w=typeof O=="string"?O+" "+_e[0]:f.precision===2?S(O/255)+" "+_e[0]:P(O/255)+" "+_e[0];else if(pe===void 0||Ut(pe)==="object"){if(pe&&!isNaN(pe.a)&&pe.a===0)return["1.","1.","1.",_e[1]].join(" ");w=typeof O=="string"?[O,Y,ne,_e[1]].join(" "):f.precision===2?[S(O/255),S(Y/255),S(ne/255),_e[1]].join(" "):[P(O/255),P(Y/255),P(ne/255),_e[1]].join(" ")}else w=typeof O=="string"?[O,Y,ne,pe,_e[2]].join(" "):f.precision===2?[S(O),S(Y),S(ne),S(pe),_e[2]].join(" "):[P(O),P(Y),P(ne),P(pe),_e[2]].join(" ");return w},Dn=p.__private__.getFilters=function(){return l},tr=p.__private__.putStream=function(f){var w=(f=f||{}).data||"",O=f.filters||Dn(),Y=f.alreadyAppliedFilters||[],ne=f.addLength1||!1,pe=w.length,_e=f.objectId,Be=function(Zt){return Zt};if(h!==null&&_e===void 0)throw new Error("ObjectId must be passed to putStream for file encryption");h!==null&&(Be=rn.encryptor(_e,0));var Ie={};O===!0&&(O=["FlateEncode"]);var it=f.additionalKeyValues||[],lt=(Ie=Ge.API.processDataByFilters!==void 0?Ge.API.processDataByFilters(w,O):{data:w,reverseChain:[]}).reverseChain+(Array.isArray(Y)?Y.join(" "):Y.toString());if(Ie.data.length!==0&&(it.push({key:"Length",value:Ie.data.length}),ne===!0&&it.push({key:"Length1",value:pe})),lt.length!=0)if(lt.split("/").length-1==1)it.push({key:"Filter",value:lt});else{it.push({key:"Filter",value:"["+lt+"]"});for(var St=0;St<it.length;St+=1)if(it[St].key==="DecodeParms"){for(var wn=[],Rt=0;Rt<Ie.reverseChain.split("/").length-1;Rt+=1)wn.push("null");wn.push(it[St].value),it[St].value="["+wn.join(" ")+"]"}}F("<<");for(var Ft=0;Ft<it.length;Ft++)F("/"+it[Ft].key+" "+it[Ft].value);F(">>"),Ie.data.length!==0&&(F("stream"),F(Be(Ie.data)),F("endstream"))},$r=p.__private__.putPage=function(f){var w=f.number,O=f.data,Y=f.objId,ne=f.contentsObjId;on(Y,!0),F("<</Type /Page"),F("/Parent "+f.rootDictionaryObjId+" 0 R"),F("/Resources "+f.resourceDictionaryObjId+" 0 R"),F("/MediaBox ["+parseFloat(H(f.mediaBox.bottomLeftX))+" "+parseFloat(H(f.mediaBox.bottomLeftY))+" "+H(f.mediaBox.topRightX)+" "+H(f.mediaBox.topRightY)+"]"),f.cropBox!==null&&F("/CropBox ["+H(f.cropBox.bottomLeftX)+" "+H(f.cropBox.bottomLeftY)+" "+H(f.cropBox.topRightX)+" "+H(f.cropBox.topRightY)+"]"),f.bleedBox!==null&&F("/BleedBox ["+H(f.bleedBox.bottomLeftX)+" "+H(f.bleedBox.bottomLeftY)+" "+H(f.bleedBox.topRightX)+" "+H(f.bleedBox.topRightY)+"]"),f.trimBox!==null&&F("/TrimBox ["+H(f.trimBox.bottomLeftX)+" "+H(f.trimBox.bottomLeftY)+" "+H(f.trimBox.topRightX)+" "+H(f.trimBox.topRightY)+"]"),f.artBox!==null&&F("/ArtBox ["+H(f.artBox.bottomLeftX)+" "+H(f.artBox.bottomLeftY)+" "+H(f.artBox.topRightX)+" "+H(f.artBox.topRightY)+"]"),typeof f.userUnit=="number"&&f.userUnit!==1&&F("/UserUnit "+f.userUnit),Lt.publish("putPage",{objId:Y,pageContext:Ye[w],pageNumber:w,page:O}),F("/Contents "+ne+" 0 R"),F(">>"),F("endobj");var pe=O.join(`
20`);return E===q&&(pe+=`
21Q`),on(ne,!0),tr({data:pe,filters:Dn(),objectId:ne}),F("endobj"),Y},Hn=p.__private__.putPages=function(){var f,w,O=[];for(f=1;f<=dt;f++)Ye[f].objId=Et(),Ye[f].contentsObjId=Et();for(f=1;f<=dt;f++)O.push($r({number:f,data:Se[f],objId:Ye[f].objId,contentsObjId:Ye[f].contentsObjId,mediaBox:Ye[f].mediaBox,cropBox:Ye[f].cropBox,bleedBox:Ye[f].bleedBox,trimBox:Ye[f].trimBox,artBox:Ye[f].artBox,userUnit:Ye[f].userUnit,rootDictionaryObjId:Wn,resourceDictionaryObjId:Jn}));on(Wn,!0),F("<</Type /Pages");var Y="/Kids [";for(w=0;w<dt;w++)Y+=O[w]+" 0 R ";F(Y+"]"),F("/Count "+dt),F(">>"),F("endobj"),Lt.publish("postPutPages")},Gr=function(f){Lt.publish("putFont",{font:f,out:F,newObject:Xt,putStream:tr}),f.isAlreadyPutted!==!0&&(f.objectNumber=Xt(),F("<<"),F("/Type /Font"),F("/BaseFont /"+Ka(f.postScriptName)),F("/Subtype /Type1"),typeof f.encoding=="string"&&F("/Encoding /"+f.encoding),F("/FirstChar 32"),F("/LastChar 255"),F(">>"),F("endobj"))},Mn=function(f){f.objectNumber=Xt();var w=[];w.push({key:"Type",value:"/XObject"}),w.push({key:"Subtype",value:"/Form"}),w.push({key:"BBox",value:"["+[H(f.x),H(f.y),H(f.x+f.width),H(f.y+f.height)].join(" ")+"]"}),w.push({key:"Matrix",value:"["+f.matrix.toString()+"]"});var O=f.pages[1].join(`
22`);tr({data:O,additionalKeyValues:w,objectId:f.objectNumber}),F("endobj")},ur=function(f,w){w||(w=21);var O=Xt(),Y=(function(_e,Be){var Ie,it=[],lt=1/(Be-1);for(Ie=0;Ie<1;Ie+=lt)it.push(Ie);if(it.push(1),_e[0].offset!=0){var St={offset:0,color:_e[0].color};_e.unshift(St)}if(_e[_e.length-1].offset!=1){var wn={offset:1,color:_e[_e.length-1].color};_e.push(wn)}for(var Rt="",Ft=0,Zt=0;Zt<it.length;Zt++){for(Ie=it[Zt];Ie>_e[Ft+1].offset;)Ft++;var an=_e[Ft].offset,sn=(Ie-an)/(_e[Ft+1].offset-an),In=_e[Ft].color,ui=_e[Ft+1].color;Rt+=$(Math.round((1-sn)*In[0]+sn*ui[0]).toString(16))+$(Math.round((1-sn)*In[1]+sn*ui[1]).toString(16))+$(Math.round((1-sn)*In[2]+sn*ui[2]).toString(16))}return Rt.trim()})(f.colors,w),ne=[];ne.push({key:"FunctionType",value:"0"}),ne.push({key:"Domain",value:"[0.0 1.0]"}),ne.push({key:"Size",value:"["+w+"]"}),ne.push({key:"BitsPerSample",value:"8"}),ne.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),ne.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),tr({data:Y,additionalKeyValues:ne,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:O}),F("endobj"),f.objectNumber=Xt(),F("<< /ShadingType "+f.type),F("/ColorSpace /DeviceRGB");var pe="/Coords ["+H(parseFloat(f.coords[0]))+" "+H(parseFloat(f.coords[1]))+" ";f.type===2?pe+=H(parseFloat(f.coords[2]))+" "+H(parseFloat(f.coords[3])):pe+=H(parseFloat(f.coords[2]))+" "+H(parseFloat(f.coords[3]))+" "+H(parseFloat(f.coords[4]))+" "+H(parseFloat(f.coords[5])),F(pe+="]"),f.matrix&&F("/Matrix ["+f.matrix.toString()+"]"),F("/Function "+O+" 0 R"),F("/Extend [true true]"),F(">>"),F("endobj")},ii=function(f,w){var O=Et(),Y=Xt();w.push({resourcesOid:O,objectOid:Y}),f.objectNumber=Y;var ne=[];ne.push({key:"Type",value:"/Pattern"}),ne.push({key:"PatternType",value:"1"}),ne.push({key:"PaintType",value:"1"}),ne.push({key:"TilingType",value:"1"}),ne.push({key:"BBox",value:"["+f.boundingBox.map(H).join(" ")+"]"}),ne.push({key:"XStep",value:H(f.xStep)}),ne.push({key:"YStep",value:H(f.yStep)}),ne.push({key:"Resources",value:O+" 0 R"}),f.matrix&&ne.push({key:"Matrix",value:"["+f.matrix.toString()+"]"}),tr({data:f.stream,additionalKeyValues:ne,objectId:f.objectNumber}),F("endobj")},dr=function(f){for(var w in f.objectNumber=Xt(),F("<<"),f)switch(w){case"opacity":F("/ca "+S(f[w]));break;case"stroke-opacity":F("/CA "+S(f[w]))}F(">>"),F("endobj")},ai=function(f){on(f.resourcesOid,!0),F("<<"),F("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),(function(){for(var w in F("/Font <<"),ut)ut.hasOwnProperty(w)&&(b===!1||b===!0&&x.hasOwnProperty(w))&&F("/"+w+" "+ut[w].objectNumber+" 0 R");F(">>")})(),(function(){if(Object.keys(ze).length>0){for(var w in F("/Shading <<"),ze)ze.hasOwnProperty(w)&&ze[w]instanceof ga&&ze[w].objectNumber>=0&&F("/"+w+" "+ze[w].objectNumber+" 0 R");Lt.publish("putShadingPatternDict"),F(">>")}})(),(function(w){if(Object.keys(ze).length>0){for(var O in F("/Pattern <<"),ze)ze.hasOwnProperty(O)&&ze[O]instanceof p.TilingPattern&&ze[O].objectNumber>=0&&ze[O].objectNumber<w&&F("/"+O+" "+ze[O].objectNumber+" 0 R");Lt.publish("putTilingPatternDict"),F(">>")}})(f.objectOid),(function(){if(Object.keys(Ze).length>0){var w;for(w in F("/ExtGState <<"),Ze)Ze.hasOwnProperty(w)&&Ze[w].objectNumber>=0&&F("/"+w+" "+Ze[w].objectNumber+" 0 R");Lt.publish("putGStateDict"),F(">>")}})(),(function(){for(var w in F("/XObject <<"),fn)fn.hasOwnProperty(w)&&fn[w].objectNumber>=0&&F("/"+w+" "+fn[w].objectNumber+" 0 R");Lt.publish("putXobjectDict"),F(">>")})(),F(">>"),F("endobj")},$i=function(f){ot[f.fontName]=ot[f.fontName]||{},ot[f.fontName][f.fontStyle]=f.id},nr=function(f,w,O,Y,ne){var pe={id:"F"+(Object.keys(ut).length+1).toString(10),postScriptName:f,fontName:w,fontStyle:O,encoding:Y,isStandardFont:ne||!1,metadata:{}};return Lt.publish("addFont",{font:pe,instance:this}),ut[pe.id]=pe,$i(pe),pe.id},jn=p.__private__.pdfEscape=p.pdfEscape=function(f,w){return(function(O,Y){var ne,pe,_e,Be,Ie,it,lt,St,wn;if(_e=(Y=Y||{}).sourceEncoding||"Unicode",Ie=Y.outputEncoding,(Y.autoencode||Ie)&&ut[Re].metadata&&ut[Re].metadata[_e]&&ut[Re].metadata[_e].encoding&&(Be=ut[Re].metadata[_e].encoding,!Ie&&ut[Re].encoding&&(Ie=ut[Re].encoding),!Ie&&Be.codePages&&(Ie=Be.codePages[0]),typeof Ie=="string"&&(Ie=Be[Ie]),Ie)){for(lt=!1,it=[],ne=0,pe=O.length;ne<pe;ne++)(St=Ie[O.charCodeAt(ne)])?it.push(String.fromCharCode(St)):it.push(O[ne]),it[ne].charCodeAt(0)>>8&&(lt=!0);O=it.join("")}for(ne=O.length;lt===void 0&&ne!==0;)O.charCodeAt(ne-1)>>8&&(lt=!0),ne--;if(!lt)return O;for(it=Y.noBOM?[]:[254,255],ne=0,pe=O.length;ne<pe;ne++){if((wn=(St=O.charCodeAt(ne))>>8)>>8)throw new Error("Character at position "+ne+" of string '"+O+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");it.push(wn),it.push(St-(wn<<8))}return String.fromCharCode.apply(void 0,it)})(f,w).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},_i=p.__private__.beginPage=function(f){Se[++dt]=[],Ye[dt]={objId:0,contentsObjId:0,userUnit:Number(o),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(f[0]),topRightY:Number(f[1])}},Aa(dt),Fe(Se[I])},Gi=function(f,w){var O,Y,ne;switch(t=w||t,typeof f=="string"&&(O=y(f.toLowerCase()),Array.isArray(O)&&(Y=O[0],ne=O[1])),Array.isArray(f)&&(Y=f[0]*at,ne=f[1]*at),isNaN(Y)&&(Y=i[0],ne=i[1]),(Y>14400||ne>14400)&&(qt.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),Y=Math.min(14400,Y),ne=Math.min(14400,ne)),i=[Y,ne],t.substr(0,1)){case"l":ne>Y&&(i=[ne,Y]);break;case"p":Y>ne&&(i=[ne,Y])}_i(i),sl(tt),F(Pa),cs!==0&&F(cs+" J"),Li!==0&&F(Li+" j"),Lt.publish("addPage",{pageNumber:dt})},kr=function(f){f>0&&f<=dt&&(Se.splice(f,1),Ye.splice(f,1),dt--,I>dt&&(I=dt),this.setPage(I))},Aa=function(f){f>0&&f<=dt&&(I=f)},ka=p.__private__.getNumberOfPages=p.getNumberOfPages=function(){return Se.length-1},La=function(f,w,O){var Y,ne=void 0;return O=O||{},f=f!==void 0?f:ut[Re].fontName,w=w!==void 0?w:ut[Re].fontStyle,Y=f.toLowerCase(),ot[Y]!==void 0&&ot[Y][w]!==void 0?ne=ot[Y][w]:ot[f]!==void 0&&ot[f][w]!==void 0?ne=ot[f][w]:O.disableWarning===!1&&qt.warn("Unable to look up font label for font '"+f+"', '"+w+"'. Refer to getFontList(
22) for available fonts."),ne||O.noFallback||(ne=ot.times[w])==null&&(ne=ot.times.normal),ne},hr=p.__private__.putInfo=function(){var f=Xt(),w=function(Y){return Y};for(var O in h!==null&&(w=rn.encryptor(f,0)),F("<<"),F("/Producer ("+jn(w("jsPDF "+Ge.version))+")"),mt)mt.hasOwnProperty(O)&&mt[O]&&F("/"+O.substr(0,1).toUpperCase()+O.substr(1)+" ("+jn(w(mt[O]))+")");F("/CreationDate ("+jn(w(re))+")"),F(">>"),F("endobj")},Si=p.__private__.putCatalog=function(f){var w=(f=f||{}).rootDictionaryObjId||Wn;switch(Xt(),F("<<"),F("/Type /Catalog"),F("/Pages "+w+" 0 R"),Ke||(Ke="fullwidth"),Ke){case"fullwidth":F("/OpenAction [3 0 R /FitH null]");break;case"fullheight":F("/OpenAction [3 0 R /FitV null]");break;case"fullpage":F("/OpenAction [3 0 R /Fit]");break;case"original":F("/OpenAction [3 0 R /XYZ null null 1]");break;default:var O=""+Ke;O.substr(O.length-1)==="%"&&(Ke=parseInt(Ke)/100),typeof Ke=="number"&&F("/OpenAction [3 0 R /XYZ null null "+S(Ke)+"]")}switch(vt||(vt="continuous"),vt){case"continuous":F("/PageLayout /OneColumn");break;case"single":F("/PageLayout /SinglePage");break;case"two":case"twoleft":F("/PageLayout /TwoColumnLeft");break;case"tworight":F("/PageLayout /TwoColumnRight")}Oe&&F("/PageMode /"+Oe),Lt.publish("putCatalog"),F(">>"),F("endobj")},ss=p.__private__.putTrailer=function(){F("trailer"),F("<<"),F("/Size "+(X+1)),F("/Root "+X+" 0 R"),F("/Info "+(X-1)+" 0 R"),h!==null&&F("/Encrypt "+rn.oid+" 0 R"),F("/ID [ <"+Q+"> <"+Q+"> ]"),F(">>")},ln=p.__private__.putHeader=function(){F("%PDF-"+L),F("%ºß¬à")},ja=p.__private__.putXRef=function(){var f="0000000000";F("xref"),F("0 "+(X+1)),F("0000000000 65535 f ");for(var w=1;w<=X;w++)typeof ie[w]=="function"?F((f+ie[w]()).slice(-10)+" 00000 n "):ie[w]!==void 0?F((f+ie[w]).slice(-10)+" 00000 n "):F("0000000000 00000 n ")},Lr=p.__private__.buildDocument=function(){var f;X=0,he=0,ue=[],ie=[],me=[],Wn=Et(),Jn=Et(),Fe(ue),Lt.publish("buildDocument"),ln(),Hn(),(function(){Lt.publish("putAdditionalObjects");for(var O=0;O<me.length;O++){var Y=me[O];on(Y.objId,!0),F(Y.content),F("endobj")}Lt.publish("postPutAdditionalObjects")})(),f=[],(function(){for(var O in ut)ut.hasOwnProperty(O)&&(b===!1||b===!0&&x.hasOwnProperty(O))&&Gr(ut[O])})(),(function(){var O;for(O in Ze)Ze.hasOwnProperty(O)&&dr(Ze[O])})(),(function(){for(var O in fn)fn.hasOwnProperty(O)&&Mn(fn[O])})(),(function(O){var Y;for(Y in ze)ze.hasOwnProperty(Y)&&(ze[Y]instanceof ga?ur(ze[Y]):ze[Y]instanceof Xa&&ii(ze[Y],O))})(f),Lt.publish("putResources"),f.forEach(ai),ai({resourcesOid:Jn,objectOid:Number.MAX_SAFE_INTEGER}),Lt.publish("postPutResources"),h!==null&&(rn.oid=Xt(),F("<<"),F("/Filter /Standard"),F("/V "+rn.v),F("/R "+rn.r),F("/U <"+rn.toHexString(rn.U)+">"),F("/O <"+rn.toHexString(rn.O)+">"),F("/P "+rn.P),F(">>"),F("endobj")),hr(),Si();var w=he;return ja(),ss(),F("startxref"),F(""+w),F("%%EOF"),Fe(Se[I]),ue.join(`
23`)},ht=p.__private__.getBlob=function(f){return new Blob([et(f)],{type:"application/pdf"})},yt=function(f){for(;f.firstChild;)f.removeChild(f.firstChild)},ft=function(f){var w,O=f.document,Y=O.documentElement,ne=O.head,pe=O.body;return ne||(ne=O.createElement("head"),Y.appendChild(ne)),pe||(pe=O.createElement("body"),Y.appendChild(pe)),yt(ne),yt(pe),(w=O.createElement("style")).appendChild(O.createTextNode("html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}")),ne.appendChild(w),{document:O,body:pe}},jt=p.output=p.__private__.output=(Vn=function(f,w){switch(typeof(w=w||{})=="string"?w={filename:w}:w.filename=w.filename||"generated.pdf",f){case void 0:return Lr();case"save":p.save(w.filename);break;case"arraybuffer":return et(Lr());case"blob":return ht(Lr());case"bloburi":case"bloburl":if(nt.URL!==void 0&&typeof nt.URL.createObjectURL=="function")return nt.URL&&nt.URL.createObjectURL(ht(Lr()))||void 0;qt.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var O="",Y=Lr();try{O=kd(Y)}catch{O=kd(unescape(encodeURIComponent(Y)))}return"data:application/pdf;filename="+encodeURIComponent(w.filename)+";base64,"+O;
23case"pdfobjectnewwindow":if(Object.prototype.toString.call(nt)==="[object Window]"){var ne="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",pe=!w.pdfObjectUrl;pe||(ne=w.pdfObjectUrl);var _e=nt.open();if(_e!==null){var Be=ft(_e),Ie=Be.document.createElement("script"),it=this;Ie.src=ne,pe&&(Ie.integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==",Ie.crossOrigin="anonymous"),Ie.onload=function(){_e.PDFObject.embed(it.output("dataurlstring"),w)},Be.body.appendChild(Ie)}return _e}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if(Object.prototype.toString.call(nt)==="[object Window]"){var lt=w.pdfJsUrl||"examples/PDF.js/web/viewer.html",St=nt.open();if(St!==null){var wn=ft(St),Rt=wn.document.createElement("iframe"),Ft=lt.indexOf("?")===-1?"?":"&";it=this,Rt.id="pdfViewer",Rt.width="500px",Rt.height="400px",Rt.src=lt+Ft+"file=&downloadName="+encodeURIComponent(w.filename),Rt.onload=function(){St.document.title=w.filename,Rt.contentWindow.PDFViewerApplication.open(it.output("bloburl"))},wn.body.appendChild(Rt)}return St}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if(Object.prototype.toString.call(nt)!=="[object Window]")throw new Error("The option dataurlnewwindow just works in a browser-environment.");var Zt=nt.open();if(Zt!==null){var an=ft(Zt),sn=an.document.createElement("iframe");sn.src=this.output("datauristring",w),an.body.appendChild(sn),Zt.document.title=w.filename}if(Zt||typeof safari>"u")return Zt;break;case"datauri":case"dataurl":return nt.document.location.href=this.output("datauristring",w);default:return null}},Vn.foo=function(){try{return Vn.apply(this,arguments)}catch(O){var f=O.stack||"";~f.indexOf(" at ")&&(f=f.split(" at ")[1]);var w="Error in function "+f.split(`
24`)[0].split("<")[0]+": "+O.message;if(!nt.console)throw new Error(w);nt.console.error(w,O),nt.alert&&alert(w)}},Vn.foo.bar=Vn,Vn.foo),Pt=function(f){return Array.isArray(Wr)===!0&&Wr.indexOf(f)>-1};switch(r){case"pt":at=1;break;case"mm":at=72/25.4;break;case"cm":at=72/2.54;break;case"in":at=72;break;case"px":at=Pt("px_scaling")==1?.75:96/72;break;case"pc":case"em":at=12;break;case"ex":at=6;break;default:if(typeof r!="number")throw new Error("Invalid unit: "+r);at=r}var rn=null;te(),se();var Mr=p.__private__.getPageInfo=p.getPageInfo=function(f){if(isNaN(f)||f%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:Ye[f].objId,pageNumber:f,pageContext:Ye[f]}},Jo=p.__private__.getPageInfoByObjId=function(f){if(isNaN(f)||f%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var w in Ye)if(Ye[w].objId===f)break;return Mr(w)},Qo=p.__private__.getCurrentPageInfo=p.getCurrentPageInfo=function(){return{objId:Ye[I].objId,pageNumber:I,pageContext:Ye[I]}};p.addPage=function(){return Gi.apply(this,arguments),this},p.setPage=function(){return Aa.apply(this,arguments),Fe.call(this,Se[I]),this},p.insertPage=function(f){return this.addPage(),this.movePage(I,f),this},p.movePage=function(f,w){var O,Y;if(f>w){O=Se[f],Y=Ye[f];for(var ne=f;ne>w;ne--)Se[ne]=Se[ne-1],Ye[ne]=Ye[ne-1];Se[w]=O,Ye[w]=Y,this.setPage(w)}else if(f<w){O=Se[f],Y=Ye[f];for(var pe=f;pe<w;pe++)Se[pe]=Se[pe+1],Ye[pe]=Ye[pe+1];Se[w]=O,Ye[w]=Y,this.setPage(w)}return this},p.deletePage=function(){return kr.apply(this,arguments),this},p.__private__.text=p.text=function(f,w,O,Y,ne){var pe,_e,Be,Ie,it,lt,St,wn,Rt,Ft=(Y=Y||{}).scope||this;if(typeof f=="number"&&typeof w=="number"&&(typeof O=="string"||Array.isArray(O))){var Zt=O;O=w,w=f,f=Zt}if(arguments[3]instanceof Qe==0?(Be=arguments[4],Ie=arguments[5],Ut(St=arguments[3])==="object"&&St!==null||(typeof Be=="string"&&(Ie=Be,Be=null),typeof St=="string"&&(Ie=St,St=null),typeof St=="number"&&(Be=St,St=null),Y={flags:St,angle:Be,align:Ie})):(D("The transform parameter of text() with a Matrix value"),Rt=ne),isNaN(w)||isNaN(O)||f==null)throw new Error("Invalid arguments passed to jsPDF.text");if(f.length===0)return Ft;var an,sn="",In=typeof Y.lineHeightFactor=="number"?Y.lineHeightFactor:Yi,ui=Ft.internal.scaleFactor;function fs(Wt){return Wt=Wt.split("	").join(Array(Y.TabLen||9).join(" ")),jn(Wt,St)}function Zi(Wt){for(var Ht,pn=Wt.concat(),Sn=[],hi=pn.length;hi--;)typeof(Ht=pn.shift())=="string"?Sn.push(Ht):Array.isArray(Wt)&&(Ht.length===1||Ht[1]===void 0&&Ht[2]===void 0)?Sn.push(Ht[0]):Sn.push([Ht[0],Ht[1],Ht[2]]);return Sn}function Ji(Wt,Ht){var pn;if(typeof Wt=="string")pn=Ht(Wt)[0];else if(Array.isArray(Wt)){for(var Sn,hi,ys=Wt.concat(),Ua=[],oo=ys.length;oo--;)typeof(Sn=ys.shift())=="string"?Ua.push(Ht(Sn)[0]):Array.isArray(Sn)&&typeof Sn[0]=="string"&&(hi=Ht(Sn[0],Sn[1],Sn[2]),Ua.push([hi[0],hi[1],hi[2]]));pn=Ua}return pn}var ji=!1,Qi=!0;if(typeof f=="string")ji=!0;else if(Array.isArray(f)){var Ma=f.concat();_e=[];for(var Ia,Fn=Ma.length;Fn--;)(typeof(Ia=Ma.shift())!="string"||Array.isArray(Ia)&&typeof Ia[0]!="str
24ing")&&(Qi=!1);ji=Qi}if(ji===!1)throw new Error('Type of text must be string or Array. "'+f+'" is not recognized.');typeof f=="string"&&(f=f.match(/[\r?\n]/)?f.split(/\r\n|\r|\n/g):[f]);var ea=ke/Ft.internal.scaleFactor,ta=ea*(In-1);switch(Y.baseline){case"bottom":O-=ta;break;case"top":O+=ea-ta;break;case"hanging":O+=ea-2*ta;break;case"middle":O+=ea/2-ta}if((lt=Y.maxWidth||0)>0&&(typeof f=="string"?f=Ft.splitTextToSize(f,lt):Object.prototype.toString.call(f)==="[object Array]"&&(f=f.reduce(function(Wt,Ht){return Wt.concat(Ft.splitTextToSize(Ht,lt))},[]))),pe={text:f,x:w,y:O,options:Y,mutex:{pdfEscape:jn,activeFontKey:Re,fonts:ut,activeFontSize:ke}},Lt.publish("preProcessText",pe),f=pe.text,Be=(Y=pe.options).angle,Rt instanceof Qe==0&&Be&&typeof Be=="number"){Be*=Math.PI/180,Y.rotationDirection===0&&(Be=-Be),E===q&&(Be=-Be);var ps=Math.cos(Be),Xr=Math.sin(Be);Rt=new Qe(ps,Xr,-Xr,ps,0,0)}else Be&&Be instanceof Qe&&(Rt=Be);E!==q||Rt||(Rt=Ar),(it=Y.charSpace||Ta)!==void 0&&(sn+=H(B(it))+` Tc
25`,this.setCharSpace(this.getCharSpace()||0)),(wn=Y.horizontalScale)!==void 0&&(sn+=H(100*wn)+` Tz
26`),Y.lang;var $n=-1,ao=Y.renderingMode!==void 0?Y.renderingMode:Y.stroke,Fa=Ft.internal.getCurrentPageInfo().pageContext;switch(ao){case 0:case!1:case"fill":$n=0;break;case 1:case!0:case"stroke":$n=1;break;case 2:case"fillThenStroke":$n=2;break;case 3:case"invisible":$n=3;break;case 4:case"fillAndAddForClipping":$n=4;break;case 5:case"strokeAndAddPathForClipping":$n=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":$n=6;break;case 7:case"addToPathForClipping":$n=7}var so=Fa.usedRenderingMode!==void 0?Fa.usedRenderingMode:-1;$n!==-1?sn+=$n+` Tr
27`:so!==-1&&(sn+=`0 Tr
28`),$n!==-1&&(Fa.usedRenderingMode=$n),Ie=Y.align||"left";var jr,na=ke*In,gs=Ft.internal.pageSize.getWidth(),Oa=ut[Re];it=Y.charSpace||Ta,lt=Y.maxWidth||0,St=Object.assign({autoencode:!0,noBOM:!0},Y.flags);var ra=[],ms=function(Wt){return Ft.getStringUnitWidth(Wt,{font:Oa,charSpace:it,fontSize:ke,doKerning:!1})*ke/ui};if(Object.prototype.toString.call(f)==="[object Array]"){var Gn;_e=Zi(f),Ie!=="left"&&(jr=_e.map(ms));var rr,Ba=0;if(Ie==="right"){w-=jr[0],f=[],Fn=_e.length;for(var Ni=0;Ni<Fn;Ni++)Ni===0?(rr=si(w),Gn=oi(O)):(rr=B(Ba-jr[Ni]),Gn=-na),f.push([_e[Ni],rr,Gn]),Ba=jr[Ni]}else if(Ie==="center"){w-=jr[0]/2,f=[],Fn=_e.length;for(var Ci=0;Ci<Fn;Ci++)Ci===0?(rr=si(w),Gn=oi(O)):(rr=B((Ba-jr[Ci])/2),Gn=-na),f.push([_e[Ci],rr,Gn]),Ba=jr[Ci]}else if(Ie==="left"){f=[],Fn=_e.length;for(var Ra=0;Ra<Fn;Ra++)f.push(_e[Ra])}else if(Ie==="justify"&&Oa.encoding==="Identity-H"){f=[],Fn=_e.length,lt=lt!==0?lt:gs;for(var ia=0,_n=0;_n<Fn;_n++)if(Gn=_n===0?oi(O):-na,rr=_n===0?si(w):ia,_n<Fn-1){var pl=B((lt-jr[_n])/(_e[_n].split(" ").length-1)),Zr=_e[_n].split(" ");f.push([Zr[0]+" ",rr,Gn]),ia=0;for(var Ir=1;Ir<Zr.length;Ir++){var aa=(ms(Zr[Ir-1]+" "+Zr[Ir])-ms(Zr[Ir]))*ui+pl;Ir==Zr.length-1?f.push([Zr[Ir],aa,0]):f.push([Zr[Ir]+" ",aa,0]),ia-=aa}}else f.push([_e[_n],rr,Gn]);f.push(["",ia,0])}else{if(Ie!=="justify")throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');for(f=[],Fn=_e.length,lt=lt!==0?lt:gs,_n=0;_n<Fn;_n++){Gn=_n===0?oi(O):-na,rr=_n===0?si(w):0;var vs=_e[_n].split(" ").length-1,bs=vs>0?(lt-jr[_n])/vs:0;_n<Fn-1?ra.push(H(B(bs))):ra.push(0),f.push([_e[_n],rr,Gn])}}}(typeof Y.R2L=="boolean"?Y.R2L:Xe)===!0&&(f=Ji(f,function(Wt,Ht,pn){return[Wt.split("").reverse().join(""),Ht,pn]})),pe={text:f,x:w,y:O,options:Y,mutex:{pdfEscape:jn,activeFontKey:Re,fonts:ut,activeFontSize:ke}},Lt.publish("postProcessText",pe),f=pe.text,an=pe.mutex.isHex||!1;var za=ut[Re].encoding;za!=="WinAnsiEncoding"&&za!=="StandardEncoding"||(f=Ji(f,function(Wt,Ht,pn){return[fs(Wt),Ht,pn]})),_e=Zi(f),f=[];for(var sa,oa,Pi,di=Array.isArray(_e[0])?1:0,Ti="",qa=function(Wt,Ht,pn){var Sn="";return pn instanceof Qe?(pn=typeof Y.angle=="number"?Dr(pn,new Qe(1,0,0,1,Wt,Ht)):Dr(new Qe(1,0,0,1,Wt,Ht),pn),E===q&&(pn=Dr(new Qe(1,0,0,-1,0,0),pn)),Sn=pn.join(" ")+` Tm
29`):Sn=H(Wt)+" "+H(Ht)+` Td
30`,Sn},On=0;On<_e.length;On++){switch(Ti="",di){case 1:Pi=(an?"<":"(")+_e[On][0]+(an?">":")"),sa=parseFloat(_e[On][1]),oa=parseFloat(_e[On][2]);break;case 0:Pi=(an?"<":"(")+_e[On]+(an?">":")"),sa=si(w),oa=oi(O)}ra!==void 0&&ra[On]!==void 0&&(Ti=ra[On]+` Tw
31`),On===0?f.push(Ti+qa(sa,oa,Rt)+Pi):di===0?f.push(Ti+Pi):di===1&&f.push(Ti+qa(sa,oa,Rt)+Pi)}f=di===0?f.join(` Tj
32T* `):f.join(` Tj
33`),f+=` Tj
34`;var Jr=`BT
35/`;return Jr+=Re+" "+ke+` Tf
36`,Jr+=H(ke*In)+` TL
37`,Jr+=Kr+`
38`,Jr+=sn,Jr+=f,F(Jr+="ET"),x[Re]=!0,Ft};var el=p.__private__.clip=p.clip=function(f){return F(f==="evenodd"?"W*":"W"),this};p.clipEvenOdd=function(){return el("evenodd")},p.__private__.discardPath=p.discardPath=function(){return F("n"),this};var Yr=p.__private__.isValidStyle=function(f){var w=!1;return[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(f)!==-1&&(w=!0),w};p.__private__.setDefaultPathOperation=p.setDefaultPathOperation=function(f){return Yr(f)&&(d=f),this};var Js=p.__private__.getStyle=p.getStyle=function(f){var w=d;switch(f){case"D":case"S":w="S";break;case"F":w="f";break;case"FD":case"DF":w="B";break;case"f":case"f*":case"B":case"B*":w=f}return w},Na=p.close=function(){return F("h"),this};p.stroke=function(){return F("S"),this},p.fill=function(f){return Ca("f",f),this},p.fillEvenOdd=function(f){return Ca("f*",f),this},p.fillStroke=function(f){return Ca("B",f),this},p.fillStrokeEvenOdd=function(f){return Ca("B*",f),this};var Ca=function(f,w){Ut(w)==="object"?nl(w,f):F(f)},os=function(f){f===null||E===q&&f===void 0||(f=Js(f),F(f))};function tl(f,w,O,Y,ne){var pe=new Xa(w||this.boundingBox,O||this.xStep,Y||this.yStep,this.gState,ne||this.matrix);pe.stream=this.stream;var _e=f+"$$"+this.cloneIndex+++"$$";return Zn(_e,pe),pe}var nl=function(f,w){var O=Tt[f.key],Y=ze[O];if(Y instanceof ga)F("q"),F(rl(w)),Y.gState&&p.setGState(Y.gState),F(f.matrix.toString()+" cm"),F("/"+O+" sh"),F("Q");else if(Y instanceof Xa){var ne=new Qe(1,0,0,-1,0,Xi());f.matrix&&(ne=ne.multiply(f.matrix||Ar),O=tl.call(Y,f.key,f.boundingBox,f.xStep,f.yStep,ne).id),F("q"),F("/Pattern cs"),F("/"+O+" scn"),Y.gState&&p.setGState(Y.gState),F(w),F("Q")}},rl=function(f){switch(f){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"}},Ai=p.moveTo=function(f,w){return F(H(B(f))+" "+H(U(w))+" m"),this},Qs=p.lineTo=function(f,w){return F(H(B(f))+" "+H(U(w))+" l"),this},ki=p.curveTo=function(f,w,O,Y,ne,pe){return F([H(B(f)),H(U(w)),H(B(O)),H(U(Y)),H(B(ne)),H(U(pe)),"c"].join(" ")),this};p.__private__.line=p.line=function(f,w,O,Y,ne){if(isNaN(f)||isNaN(w)||isNaN(O)||isNaN(Y)||!Yr(ne))throw new Error("Invalid arguments passed to jsPDF.line");return E===V?this.lines([[O-f,Y-w]],f,w,[1,1],ne||"S"):this.lines([[O-f,Y-w]],f,w,[1,1]).stroke()},p.__private__.lines=p.lines=function(f,w,O,Y,ne,pe){var _e,Be,Ie,it,lt,St,wn,Rt,Ft,Zt,an,sn;if(typeof f=="number"&&(sn=O,O=w,w=f,f=sn),Y=Y||[1,1],pe=pe||!1,isNaN(w)||isNaN(O)||!Array.isArray(f)||!Array.isArray(Y)||!Yr(ne)||typeof pe!="boolean")throw new Error("Invalid arguments passed to jsPDF.lines");for(Ai(w,O),_e=Y[0],Be=Y[1],it=f.length,Zt=w,an=O,Ie=0;Ie<it;Ie++)(lt=f[Ie]).length===2?(Zt=lt[0]*_e+Zt,an=lt[1]*Be+an,Qs(Zt,an)):(St=lt[0]*_e+Zt,wn=lt[1]*Be+an,Rt=lt[2]*_e+Zt,Ft=lt[3]*Be+an,Zt=lt[4]*_e+Zt,an=lt[5]*Be+an,ki(St,wn,Rt,Ft,Zt,an));return pe&&Na(),os(ne),this},p.path=function(f){for(var w=0;w<f.length;w++){var O=f[w],Y=O.c;switch(O.op){case"m":Ai(Y[0],Y[1]);break;case"l":Qs(Y[0],Y[1]);break;case"c":ki.apply(this,Y);break;case"h":Na()}}return this},p.__private__.rect=p.rect=function(f,w,O,Y,ne){if(isNaN(f)||isNaN(w)||isNaN(O)||isNaN(Y)||!Yr(ne))throw new Error("Invalid arguments passed to jsPDF.rect");return E===V&&(Y=-Y),F([H(B(f)),H(U(w)),H(B(O)),H(B(Y)),"re"].join(" ")),os(ne),this},p.__private__.triangle=p.triangle=function(f,w,O,Y,ne,pe,_e){if(isNaN(f)||isNaN(w)||isNaN(O)||isNaN(Y)||isNaN(ne)||isNaN(pe)||!Yr(_e))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[O-f,Y-w],[ne-O,pe-Y],[f-ne,w-pe]],f,w,[1,1],_e,!0),this},p.__private__.roundedRect=p.roundedRect=function(f,w,O,Y,ne,pe,_e){if(isNaN(f)||isNaN(w)||isNaN(O)||isNaN(Y)||isNaN(ne)||isNaN(pe)||!Yr(_e))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var Be=4/3*(Math.SQRT2-1);return ne=Math.min(ne,.5*O),pe=Math.min(pe,.5*Y),this.lines([[O-2*ne,0],[ne*Be,0,ne,pe-pe*Be,ne,pe],[0,Y-2*pe],[0,pe*Be,-ne*Be,pe,-ne,pe],[2*ne-O,0],[-ne*Be,0,-ne,-pe*Be,-ne,-pe],[0,2*
vendor: 4,205 bytes, line 38
38pe-Y],[0,-pe*Be,ne*Be,-pe,ne,-pe]],f+ne,w,[1,1],_e,!0),this},p.__private__.ellipse=p.ellipse=function(f,w,O,Y,ne){if(isNaN(f)||isNaN(w)||isNaN(O)||isNaN(Y)||!Yr(ne))throw new Error("Invalid arguments passed to jsPDF.ellipse");var pe=4/3*(Math.SQRT2-1)*O,_e=4/3*(Math.SQRT2-1)*Y;return Ai(f+O,w),ki(f+O,w-_e,f+pe,w-Y,f,w-Y),ki(f-pe,w-Y,f-O,w-_e,f-O,w),ki(f-O,w+_e,f-pe,w+Y,f,w+Y),ki(f+pe,w+Y,f+O,w+_e,f+O,w),os(ne),this},p.__private__.circle=p.circle=function(f,w,O,Y){if(isNaN(f)||isNaN(w)||isNaN(O)||!Yr(Y))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(f,w,O,O,Y)},p.setFont=function(f,w,O){return O&&(w=J(w,O)),Re=La(f,w,{disableWarning:!1}),this};var il=p.__private__.getFont=p.getFont=function(){return ut[La.apply(p,arguments)]};p.__private__.getFontList=p.getFontList=function(){var f,w,O={};for(f in ot)if(ot.hasOwnProperty(f))for(w in O[f]=[],ot[f])ot[f].hasOwnProperty(w)&&O[f].push(w);return O},p.addFont=function(f,w,O,Y,ne){var pe=["StandardEncoding","MacRomanEncoding","Identity-H","WinAnsiEncoding"];return arguments[3]&&pe.indexOf(arguments[3])!==-1?ne=arguments[3]:arguments[3]&&pe.indexOf(arguments[3])==-1&&(O=J(O,Y)),nr.call(this,f,w,O,ne=ne||"Identity-H")};var Yi,tt=n.lineWidth||.200025,al=p.__private__.getLineWidth=p.getLineWidth=function(){return tt},sl=p.__private__.setLineWidth=p.setLineWidth=function(f){return tt=f,F(H(B(f))+" w"),this};p.__private__.setLineDash=Ge.API.setLineDash=Ge.API.setLineDashPattern=function(f,w){if(f=f||[],w=w||0,isNaN(w)||!Array.isArray(f))throw new Error("Invalid arguments passed to jsPDF.setLineDash");return f=f.map(function(O){return H(B(O))}).join(" "),w=H(B(w)),F("["+f+"] "+w+" d"),this};var ol=p.__private__.getLineHeight=p.getLineHeight=function(){return ke*Yi};p.__private__.getLineHeight=p.getLineHeight=function(){return ke*Yi};var ll=p.__private__.setLineHeightFactor=p.setLineHeightFactor=function(f){return typeof(f=f||1.15)=="number"&&(Yi=f),this},cl=p.__private__.getLineHeightFactor=p.getLineHeightFactor=function(){return Yi};ll(n.lineHeight);var si=p.__private__.getHorizontalCoordinate=function(f){return B(f)},oi=p.__private__.getVerticalCoordinate=function(f){return E===q?f:Ye[I].mediaBox.topRightY-Ye[I].mediaBox.bottomLeftY-B(f)},ul=p.__private__.getHorizontalCoordinateString=p.getHorizontalCoordinateString=function(f){return H(si(f))},dl=p.__private__.getVerticalCoordinateString=p.getVerticalCoordinateString=function(f){return H(oi(f))},Pa=n.strokeColor||"0 G";p.__private__.getStrokeColor=p.getDrawColor=function(){return Qn(Pa)},p.__private__.setStrokeColor=p.setDrawColor=function(f,w,O,Y){return Pa=er({ch1:f,ch2:w,ch3:O,ch4:Y,pdfColorType:"draw",precision:2}),F(Pa),this};var ls=n.fillColor||"0 g";p.__private__.getFillColor=p.getFillColor=function(){return Qn(ls)},p.__private__.setFillColor=p.setFillColor=function(f,w,O,Y){return ls=er({ch1:f,ch2:w,ch3:O,ch4:Y,pdfColorType:"fill",precision:2}),F(ls),this};var Kr=n.textColor||"0 g",hl=p.__private__.getTextColor=p.getTextColor=function(){return Qn(Kr)};p.__private__.setTextColor=p.setTextColor=function(f,w,O,Y){return Kr=er({ch1:f,ch2:w,ch3:O,ch4:Y,pdfColorType:"text",precision:3}),this};var Ta=n.charSpace,fl=p.__private__.getCharSpace=p.getCharSpace=function(){return parseFloat(Ta||0)};p.__private__.setCharSpace=p.setCharSpace=function(f){if(isNaN(f))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return Ta=f,this};var cs=0;p.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},p.__private__.setLineCap=p.setLineCap=function(f){var w=p.CapJoinStyles[f];if(w===void 0)throw new Error("Line cap style of '"+f+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return cs=w,F(w+" J"),this};var Li=0;p.__private__.setLineJoin=p.setLineJoin=function(f){var w=p.CapJoinStyles[f];if(w===void 0)throw new Error("Line join style of '"+f+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Li=w,F(w+" j"),this},p.__private__.setLineMiterLimit=p.__private__.setMiterLimit=p.setLineMiterLimit=p.setMiterLimit=function(f){if(f=f||0,isNaN(f))throw new Error("Invalid argument passed to 
38jsPDF.setLineMiterLimit");return F(H(B(f))+" M"),this},p.GState=Go,p.setGState=function(f){(f=typeof f=="string"?Ze[Je[f]]:us(null,f)).equals(Vt)||(F("/"+f.id+" gs"),Vt=f)};var us=function(f,w){if(!f||!Je[f]){var O=!1;for(var Y in Ze)if(Ze.hasOwnProperty(Y)&&Ze[Y].equals(w)){O=!0;break}if(O)w=Ze[Y];else{var ne="GS"+(Object.keys(Ze).length+1).toString(10);Ze[ne]=w,w.id=ne}return f&&(Je[f]=w.id),Lt.publish("addGState",w),w}};p.addGState=function(f,w){return us(f,w),this},p.saveGraphicsState=function(){return F("q"),Dt.push({key:Re,size:ke,color:Kr}),this},p.restoreGraphicsState=function(){F("Q");var f=Dt.pop();return Re=f.key,ke=f.size,Kr=f.color,Vt=null,this},p.setCurrentTransformationMatrix=function(f){return F(f.toString()+" cm"),this},p.comment=function(f){return F("#"+f),this};var Ki=function(f,w){var O=f||0;Object.defineProperty(this,"x",{enumerable:!0,get:function(){return O},set:function(pe){isNaN(pe)||(O=parseFloat(pe))}});var Y=w||0;Object.defineProperty(this,"y",{enumerable:!0,get:function(){return Y},set:function(pe){isNaN(pe)||(Y=parseFloat(pe))}});var ne="pt";return Object.defineProperty(this,"type",{enumerable:!0,get:function(){return ne},set:function(pe){ne=pe.toString()}}),this},ds=function(f,w,O,Y){Ki.call(this,f,w),this.type="rect";var ne=O||0;Object.defineProperty(this,"w",{enumerable:!0,get:function(){return ne},set:function(_e){isNaN(_e)||(ne=parseFloat(_e))}});var pe=Y||0;return Object.defineProperty(this,"h",{enumerable:!0,get:function(){return pe},set:function(_e){isNaN(_e)||(pe=parseFloat(_e))}}),this},Ea=function(){this.page=dt,this.currentPage=I,this.pages=Se.slice(0),this.pagesContext=Ye.slice(0),this.x=We,this.y=nn,this.matrix=xt,this.width=eo(I),this.height=ci(I),this.outputDestination=Ce,this.id="",this.objectNumber=-1};Ea.prototype.restore=function(){dt=this.page,I=this.currentPage,Ye=this.pagesContext,Se=this.pages,We=this.x,nn=this.y,xt=this.matrix,li(I,this.width),to(I,this.height),Ce=this.outputDestination};var hs=function(f,w,O,Y,ne){cr.push(new Ea),dt=I=0,Se=[],We=f,nn=w,xt=ne,_i([O,Y])};for(var Da in p.beginFormObject=function(f,w,O,Y,ne){return hs(f,w,O,Y,ne),this},p.endFormObject=function(f){return(function(w){if(Sr[w])cr.pop().restore();else{var O=new Ea,Y="Xo"+(Object.keys(fn).length+1).toString(10);O.id=Y,Sr[w]=Y,fn[Y]=O,Lt.publish("addFormObject",O),cr.pop().restore()}})(f),this},p.doFormObject=function(f,w){var O=fn[Sr[f]];return F("q"),F(w.toString()+" cm"),F("/"+O.id+" Do"),F("Q"),this},p.getFormObject=function(f){var w=fn[Sr[f]];return{x:w.x,y:w.y,width:w.width,height:w.height,matrix:w.matrix}},p.save=function(f,w){return f=f||"generated.pdf",(w=w||{}).returnPromise=w.returnPromise||!1,w.returnPromise===!1?(pa(ht(Lr()),f),typeof pa.unload=="function"&&nt.setTimeout&&setTimeout(pa.unload,911),this):new Promise(function(O,Y){try{var ne=pa(ht(Lr()),f);typeof pa.unload=="function"&&nt.setTimeout&&setTimeout(pa.unload,911),O(ne)}catch(pe){Y(pe.message)}})},Ge.API)Ge.API.hasOwnProperty(Da)&&(Da==="events"&&Ge.API.events.length?(function(f,w){var O,Y,ne;for(ne=w.length-1;ne!==-1;ne--)O=w[ne][0],Y=w[ne][1],f.subscribe.apply(f,[O].concat(typeof Y=="function"?[Y]:Y))})(Lt,Ge.API.events):p[Da]=Ge.API[Da]);function eo(f){return Ye[f].mediaBox.topRightX-Ye[f].mediaBox.bottomLeftX}function li(f,w){Ye[f].mediaBox.topRightX=w+Ye[f].mediaBox.bottomLeftX}function ci(f){return Ye[f].mediaBox.topRightY-Ye[f].mediaBox.bottomLeftY}function to(f,w){Ye[f].mediaBox.topRightY=w+Ye[f].mediaBox.bottomLeftY}var no=p.getPageWidth=function(f){return eo(f=f||I)/at},ro=p.setPageWidth=function(f,w){li(f,w*at)},Xi=p.getPageHeight=function(f){return ci(f=f||I)/at},io=p.setPageHeight=function(f,w){to(f,w*at)};return p.internal={pdfEscape:jn,getStyle:Js,getFont:il,getFontSize:Ee,getCharSpace:fl,getTextColor:hl,getLineHeight:ol,getLineHeightFactor:cl,getLineWidth:al,write:Ne,getHorizontalCoordinate:si,getVerticalCoordinate:oi,getCoordinateString:ul,getVerticalCoordinateString:dl,collections:{},newObject:Xt,newAdditionalObject:Hr,newObjectDeferred:Et,newObjectDeferredBegin:on,getFilters:Dn,putStream:tr,events:Lt,scaleFactor:at,pageSize:{getWidth:function(){return no(I)},setWidth:function(f){ro(I,f)},getHeight:function(){return Xi(I)}
vendor: 18,537 bytes, lines 38-46
38,setHeight:function(f){io(I,f)}},encryptionOptions:h,encryption:rn,getEncryptor:function(f){return h!==null?rn.encryptor(f,0):function(w){return w}},output:jt,getNumberOfPages:ka,get pages(){return Se},out:F,f2:S,f3:P,getPageInfo:Mr,getPageInfoByObjId:Jo,getCurrentPageInfo:Qo,getPDFVersion:k,Point:Ki,Rectangle:ds,Matrix:Qe,hasHotfix:Pt},Object.defineProperty(p.internal.pageSize,"width",{get:function(){return no(I)},set:function(f){ro(I,f)},enumerable:!0,configurable:!0}),Object.defineProperty(p.internal.pageSize,"height",{get:function(){return Xi(I)},set:function(f){io(I,f)},enumerable:!0,configurable:!0}),(function(f){for(var w=0,O=Ve.length;w<O;w++){var Y=nr.call(this,f[w][0],f[w][1],f[w][2],Ve[w][3],!0);b===!1&&(x[Y]=!0);var ne=f[w][0].split("-");$i({id:Y,fontName:ne[0],fontStyle:ne[1]||""})}Lt.publish("addFonts",{fonts:ut,dictionary:ot})}).call(p,Ve),Re="F1",Gi(i,t),Lt.publish("initialized"),p}Ya.prototype.lsbFirstWord=function(n){return String.fromCharCode(255&n,n>>8&255,n>>16&255,n>>24&255)},Ya.prototype.toHexString=function(n){return n.split("").map(function(e){return("0"+(255&e.charCodeAt(0)).toString(16)).slice(-2)}).join("")},Ya.prototype.hexToBytes=function(n){for(var e=[],t=0;t<n.length;t+=2)e.push(String.fromCharCode(parseInt(n.substr(t,2),16)));return e.join("")},Ya.prototype.processOwnerPassword=function(n,e){return yc(bc(e).substr(0,5),n)},Ya.prototype.encryptor=function(n,e){var t=bc(this.encryptionKey+String.fromCharCode(255&n,n>>8&255,n>>16&255,255&e,e>>8&255)).substr(0,10);return function(r){return yc(t,r)}},Go.prototype.equals=function(n){var e,t="id,objectNumber,equals";if(!n||Ut(n)!==Ut(this))return!1;var r=0;for(e in this)if(!(t.indexOf(e)>=0)){if(this.hasOwnProperty(e)&&!n.hasOwnProperty(e)||this[e]!==n[e])return!1;r++}for(e in n)n.hasOwnProperty(e)&&t.indexOf(e)<0&&r--;return r===0},Ge.API={events:[]},Ge.version="4.2.1";var hn=Ge.API,Cc=1,Sa=function(n){return n.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},$a=function(n){return n.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},xa=function(n){return n.toString().replace(/#/g,"#23").replace(/[\s\n\r()<>[\]{}\/%]/g,function(e){var t=e.charCodeAt(0).toString(16).toUpperCase();return"#"+(t.length===1?"0"+t:t)})},st=function(n){return n.toFixed(2)},zi=function(n){return n.toFixed(5)};hn.__acroform__={};var lr=function(n,e){n.prototype=Object.create(e.prototype),n.prototype.constructor=n},Cd=function(n){return n*Cc},ei=function(n){var e=new mf,t=Me.internal.getHeight(n)||0,r=Me.internal.getWidth(n)||0;return e.BBox=[0,0,Number(st(r)),Number(st(t))],e},P5=hn.__acroform__.setBit=function(n,e){if(n=n||0,e=e||0,isNaN(n)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return n|1<<e},T5=hn.__acroform__.clearBit=function(n,e){if(n=n||0,e=e||0,isNaN(n)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");return n&~(1<<e)},E5=hn.__acroform__.getBit=function(n,e){if(isNaN(n)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return n&1<<e?1:0},vn=hn.__acroform__.getBitForPdf=function(n,e){if(isNaN(n)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return E5(n,e-1)},bn=hn.__acroform__.setBitForPdf=function(n,e){if(isNaN(n)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return P5(n,e-1)},yn=hn.__acroform__.clearBitForPdf=function(n,e){if(isNaN(n)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return T5(n,e-1)},D5=hn.__acroform__.calculateCoordinates=function(n,e){var t=e.internal.getHorizontalCoordinate,r=e.internal.getVerticalCoordinate,i=n[0],a=n[1],l=n[2],o=n[3],u={};return u.lowerLeft_X=t(i)||0,u.lowerLeft_Y=r(a+o)||0,u.upperRight_X=t(i+l)||0,u.upperRight_Y=r(a)||0,[Number(st(u.lowerLeft_X)),Number(st(u.lowerLeft_Y)),Number(st(u.upperRight_X)),Number(st(u.upperRight_Y))]},M5=function(n){if(n.appearanceStreamContent)return n.appearanceStreamContent;if(n.V||n.DV){var e=[],t=n._V||n.DV,r=xc(n,t),i=n.scope.internal.getFont(n.fontName,n.fontStyle).id;e.push("/Tx BMC"),e.push("q"),e.push("BT"),e.push(n.scope.__private__.encodeColorString(n.color)),e.push("/"+i+" "+st(r.fontSize)+" Tf"),e.push("1 0 0 1 0 0 Tm"),e.push(r.text),e.push("ET"),e.push("Q"),e.push("EMC");var a=ei(n);return a.scope=n.scope,a.stream=e.join(`
39`),a}},xc=function(n,e){var t=n.fontSize===0?n.maxFontSize:n.fontSize,r={text:"",fontSize:""},i=(e=(e=e.substr(0,1)=="("?e.substr(1):e).substr(e.length-1)==")"?e.substr(0,e.length-1):e).split(" ");i=n.multiline?i.map(function(S){return S.split(`
40`)}):i.map(function(S){return[S]});var a=t,l=Me.internal.getHeight(n)||0;l=l<0?-l:l;var o=Me.internal.getWidth(n)||0;o=o<0?-o:o;var u=function(S,P,B){if(S+1<i.length){var U=P+" "+i[S+1][0];return Eo(U,n,B).width<=o-4}return!1};a++;e:for(;a>0;){e="",a--;var d,h,b=Eo("3",n,a).height,x=n.multiline?l-a:(l-b)/2,p=x+=2,L=0,k=0,C=0;if(a<=0){e=`(...) Tj
41`,e+="% Width of Text: "+Eo(e,n,a=12).width+", FieldWidth:"+o+`
42`;break}for(var y="",V=0,q=0;q<i.length;q++)if(i.hasOwnProperty(q)){var E=!1;if(i[q].length!==1&&C!==i[q].length-1){if((b+2)*(V+2)+2>l)continue e;y+=i[q][C],E=!0,k=q,q--}else{y=(y+=i[q][C]+" ").substr(y.length-1)==" "?y.substr(0,y.length-1):y;var K=parseInt(q),ae=u(K,y,a),J=q>=i.length-1;if(ae&&!J){y+=" ",C=0;continue}if(ae||J){if(J)k=K;else if(n.multiline&&(b+2)*(V+2)+2>l)continue e}else{if(!n.multiline||(b+2)*(V+2)+2>l)continue e;k=K}}for(var H="",D=L;D<=k;D++){var G=i[D];if(n.multiline){if(D===k){H+=G[C]+" ",C=(C+1)%G.length;continue}if(D===L){H+=G[G.length-1]+" ";continue}}H+=G[0]+" "}switch(H=H.substr(H.length-1)==" "?H.substr(0,H.length-1):H,h=Eo(H,n,a).width,n.textAlign){case"right":d=o-h-2;break;case"center":d=(o-h)/2;break;default:d=2}e+=st(d)+" "+st(p)+` Td
43`,e+="("+Sa(H)+`) Tj
44`,e+=-st(d)+` 0 Td
45`,p=-(a+2),h=0,L=E?k:k+1,V++,y=""}break}return r.text=e,r.fontSize=a,r},Eo=function(n,e,t){var r=e.scope.internal.getFont(e.fontName,e.fontStyle),i=e.scope.getStringUnitWidth(n,{font:r,fontSize:parseFloat(t),charSpace:0})*parseFloat(t);return{height:e.scope.getStringUnitWidth("3",{font:r,fontSize:parseFloat(t),charSpace:0})*parseFloat(t)*1.5,width:i}},I5={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},F5=function(n,e){var t={type:"reference",object:n};e.internal.getPageInfo(n.page).pageContext.annotations.find(function(r){return r.type===t.type&&r.object===t.object})===void 0&&e.internal.getPageInfo(n.page).pageContext.annotations.push(t)},O5=function(n,e){if(e.scope=n,n.internal!==void 0&&(n.internal.acroformPlugin===void 0||n.internal.acroformPlugin.isInitialized===!1)){if(Ur.FieldNum=0,n.internal.acroformPlugin=JSON.parse(JSON.stringify(I5)),n.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");Cc=n.internal.scaleFactor,n.internal.acroformPlugin.acroFormDictionaryRoot=new vf,n.internal.acroformPlugin.acroFormDictionaryRoot.scope=n,n.internal.acroformPlugin.acroFormDictionaryRoot._eventID=n.internal.events.subscribe("postPutResources",function(){(function(t){t.internal.events.unsubscribe(t.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete t.internal.acroformPlugin.acroFormDictionaryRoot._eventID,t.internal.acroformPlugin.printedOut=!0})(n)}),n.internal.events.subscribe("buildDocument",function(){(function(t){t.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var r=t.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var i in r)if(r.hasOwnProperty(i)){var a=r[i];a.objId=void 0,a.hasAnnotation&&F5(a,t)}})(n)}),n.internal.events.subscribe("putCatalog",function(){(function(t){if(t.internal.acroformPlugin.acroFormDictionaryRoot===void 0)throw new Error("putCatalogCallback: Root missing.");t.internal.write("/AcroForm "+t.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")})(n)}),n.internal.events.subscribe("postPutPages",function(t){(function(r,i){var a=!r;for(var l in r||(i.internal.newObjectDeferredBegin(i.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),i.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),r=r||i.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(r.hasOwnProperty(l)){var o=r[l],u=[],d=o.Rect;if(o.Rect&&(o.Rect=D5(o.Rect,i)),i.internal.newObjectDeferredBegin(o.objId,!0),o.DA=Me.createDefaultAppearanceStream(o),Ut(o)==="object"&&typeof o.getKeyValueListForStream=="function"&&(u=o.getKeyValueListForStream()),o.Rect=d,o.hasAppearanceStream&&!o.appearanceStreamContent){var h=M5(o);u.push({key:"AP",value:"<</N "+h+">>"}),i.internal.acroformPlugin.xForms.push(h)}if(o.appearanceStreamContent){var b="";for(var x in o.appearanceStreamContent)if(o.appearanceStreamContent.hasOwnProperty(x)){var p=o.appearanceStreamContent[x];if(b+="/"+x+" ",b+="<<",Object.keys(p).length>=1||Array.isArray(p)){for(var l in p)if(p.hasOwnProperty(l)){var L=p[l];typeof L=="function"&&(L=L.call(i,o)),b+="/"+l+" "+L+" ",i.internal.acroformPlugin.xForms.indexOf(L)>=0||i.internal.acroformPlugin.xForms.push(L)}}else typeof(L=p)=="function"&&(L=L.call(i,o)),b+="/"+l+" "+L,i.internal.acroformPlugin.xForms.indexOf(L)>=0||i.internal.acroformPlugin.xForms.push(L);b+=">>"}u.push({key:"AP",value:`<<
46`+b+">>"})}i.internal.putStream({additionalKeyValues:u,objectId:o.objId}),i.internal.out("endobj")}a&&(function(k,C){for(var y in k)if(k.hasOwnProperty(y)){var V=y,q=k[y];C.internal.newObjectDeferredBegin(q.objId,!0),Ut(q)==="object"&&typeof q.putStream=="function"&&q.putStream(),delete k[V]}})(i.internal.acroformPlugin.xForms,i)})(t,n)}),n.internal.acroformPlugin.isInitialized=!0}},gf=hn.__acroform__.arrayToPdfArray=function(n,e,t){var r=function(l){return l};if(Array.isArray(n)){for(var i="[",a=0;a<n.length;a++)switch(a!==0&&(i+=" "),Ut(n[a])){case"boolean":case"number":case"object":i+=n[a].toString();break;case"string":n[a].substr(0,1)==="/"?i+="/"+xa(n[a].substr(1)):(e!==void 0&&t&&(r=t.internal.getEncryptor(e)),i+="("+Sa(r(n[a].toString()))+")")}return i+"]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},Ql=function(n,e,t){var r=function(i){return i};return e!==void 0&&t&&(r=t.internal.getEncryptor(e)),(n=n||"").toString(),"("+Sa(r(n))+")"},ti=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(n){this._objId=n}}),Object.defineProperty(this,"scope",{value:this._scope,writable:!0})};ti.prototype.toString=function(){return this.objId+" 0 R"},ti.prototype.putStream=function(){var n=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:n,objectId:this.objId}),this.scope.internal.out("endobj")},ti.prototype.getKeyValueListForStream=function(){var n=[],e=Object.getOwnPropertyNames(this).filter(function(a){return a!="content"&&a!="appearanceStreamContent"&&a!="scope"&&a!="objId"&&a.substring(0,1)!="_"});for(var t in e)if(Object.getOwnPropertyDescriptor(this,e[t]).configurable===!1){var r=e[t],i=this[r];i&&(Array.isArray(i)?n.push({key:r,value:gf(i,this.objId,this.scope)}):i instanceof ti?(i.scope=this.scope,n.push({key:r,value:i.objId+" 0 R"})):typeof i!="function"&&n.push({key:r,value:i}))}return n};var mf=function(){ti.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 n,e=[];Object.defineProperty(this,"BBox",{configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"Resources",{value:"2 0 R",configurable:!1,writable:!0}),Object.defineProperty(this,"stream",{enumerable:!1,configurable:!0,set:function(t){n=t.trim()},get:function(){return n||null}})};lr(mf,ti);var vf=function(){ti.call(this);var n,e=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){return e.length>0?e:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return e}}),Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){if(n){var t=function(r){return r};return this.scope&&(t=this.scope.internal.getEncryptor(this.objId)),"("+Sa(t(n))+")"}},set:function(t){n=t}})};lr(vf,ti);var Ur=function n(){ti.call(this);var e=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return e},set:function(y){if(isNaN(y))throw new Error('Invalid value "'+y+'" for attribute F supplied.');e=y}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return!!vn(e,3)},set:function(y){y?this.F=bn(e,3):this.F=yn(e,3)}});var t=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return t},set:function(y){if(isNaN(y))throw new Error('Invalid value "'+y+'" for attribute Ff supplied.');t=y}});var r=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(r.length!==0)return r},set:function(y){r=y!==void 0?y:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[0])?0:r[0]},set:function(y){r[0]=y}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[1])?0:r[1]},set:function(y){r[1]=y}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[2])?0:r[2]},set:function(y){r[2]=y}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[3])?0:r[3]},set:function(y){r[3]=y}});var i="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return i},set:function(y){switch(y){case"/Btn":case"/Tx":case"/Ch":case"/Sig":i=y;break;default:throw new Error('Invalid value "'+y+'" for attribute FT supplied.')}}});var a=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!a||a.length<1){if(this instanceof Yo)return;a="FieldObject"+n.FieldNum++}var y=function(V){return V};return this.scope&&(y=this.scope.internal.getEncryptor(this.objId)),"("+Sa(y(a))+")"},set:function(y){a=y.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return a},set:function(y){a=y}});var l="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return l},set:function(y){l=y}});var o="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return o},set:function(y){o=y}});var u=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return u},set:function(y){u=y}});var d=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return d===void 0?50/Cc:d},set:function(y){d=y}});var h="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return h},set:function(y){h=y}});var b="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!b||this instanceof Yo||this instanceof ma))return Ql(b,this.objId,this.scope)},set:function(y){y=y.toString(),b=y}});var x=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(x)return this instanceof Nn==0?Ql(x,this.objId,this.scope):x},set:function(y){y=y.toString(),x=this instanceof Nn==0?y.substr(0,1)==="("?$a(y.substr(1,y.length-2)):$a(y):y}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof Nn==1?$a(x.substr(1,x.length-1)):x},set:function(y){y=y.toString(),x=this instanceof Nn==1?"/"+xa(y):y}});var p=null;Object.defineProperty(this,"_V",{enumerable:!1,configurable:!1,get:function(){if(p)return p},set:function(y){this.V=y}}),Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(p)return this instanceof Nn==0?Ql(p,this.objId,this.scope):p},set:function(y){y=y.toString(),p=this instanceof Nn==0?y.substr(0,1)==="("?$a(y.substr(1,y.length-2)):$a(y):y}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof Nn==1?$a(p.substr(1,p.length-1)):p},set:function(y){y=y.toString(),p=this instanceof Nn==1?"/"+xa(y):y}}),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 L,k=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return k},set:function(y){y=!!y,k=y}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,get:function(){if(L)return L},set:function(y){L=y}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return!!vn(this.Ff,1)},set:function(y){y?this.Ff=bn(this.Ff,1):this.Ff=yn(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return!!vn(this.Ff,2)},set:function(y){y?this.Ff=bn(this.Ff,2):this.Ff=yn(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return!!vn(this.Ff,3)},set:function(y){y?this.Ff=bn(this.Ff,3):this.Ff=yn(this.Ff,3)}});var C=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(C!==null)return C},set:function(y){if([0,1,2].indexOf(y)===-1)throw new Error('Invalid value "'+y+'" for attribute Q supplied.');C=y}}),Object.defineProperty(this,"textAlign",{get:function(){var y;switch(C){case 0:default:y="left";break;case 1:y="center";break;case 2:y="right"}return y},configurable:!0,enumerable:!0,set:function(y){switch(y){case"right":case 2:C=2;break;case"center":case 1:C=1;break;default:C=0}}})};lr(Ur,ti);var Za=function(){Ur.call(this),this.FT="/Ch",this.V="()",this.fontName="zapfdingbats";var n=0;Object.defineProperty(this,"TI",{enumerable:!0,configurable:!1,get:function(){return n},set:function(t){n=t}}),Object.defineProperty(this,"topIndex",{enumerable:!0,configurable:!0,get:function(){return n},set:function(t){n=t}});var e=[];Object.defineProperty(this,"Opt",{enumerable:!0,configurable:!1,get:function(){return gf(e,this.objId,this.scope)}
46,set:function(t){var r,i;i=[],typeof(r=t)=="string"&&(i=(function(a,l,o){o||(o=1);for(var u,d=[];u=l.exec(a);)d.push(u[o]);return d})(r,/\((.*?)\)/g)),e=i}}),this.getOptions=function(){return e},this.setOptions=function(t){e=t,this.sort&&e.sort()},this.addOption=function(t){t=(t=t||"").toString(),e.push(t),this.sort&&e.sort()},this.removeOption=function(t,r){for(r=r||!1,t=(t=t||"").toString();e.indexOf(t)!==-1&&(e.splice(e.indexOf(t),1),r!==!1););},Object.defineProperty(this,"combo",{enumerable:!0,configurable:!0,get:function(){return!!vn(this.Ff,18)},set:function(t){t?this.Ff=bn(this.Ff,18):this.Ff=yn(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return!!vn(this.Ff,19)},set:function(t){this.combo===!0&&(t?this.Ff=bn(this.Ff,19):this.Ff=yn(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return!!vn(this.Ff,20)},set:function(t){t?(this.Ff=bn(this.Ff,20),e.sort()):this.Ff=yn(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return!!vn(this.Ff,22)},set:function(t){t?this.Ff=bn(this.Ff,22):this.Ff=yn(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!vn(this.Ff,23)},set:function(t){t?this.Ff=bn(this.Ff,23):this.Ff=yn(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return!!vn(this.Ff,27)},set:function(t){t?this.Ff=bn(this.Ff,27):this.Ff=yn(this.Ff,27)}}),this.hasAppearanceStream=!1};lr(Za,Ur);var Ja=function(){Za.call(this),this.fontName="helvetica",this.combo=!1};lr(Ja,Za);var Qa=function(){Ja.call(this),this.combo=!0};lr(Qa,Ja);var Fo=function(){Qa.call(this),this.edit=!0};lr(Fo,Qa);var Nn=function(){Ur.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return!!vn(this.Ff,15)},set:function(t){t?this.Ff=bn(this.Ff,15):this.Ff=yn(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return!!vn(this.Ff,16)},set:function(t){t?this.Ff=bn(this.Ff,16):this.Ff=yn(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return!!vn(this.Ff,17)},set:function(t){t?this.Ff=bn(this.Ff,17):this.Ff=yn(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return!!vn(this.Ff,26)},set:function(t){t?this.Ff=bn(this.Ff,26):this.Ff=yn(this.Ff,26)}});var n,e={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var t=function(a){return a};if(this.scope&&(t=this.scope.internal.getEncryptor(this.objId)),Object.keys(e).length!==0){var r,i=[];for(r in i.push("<<"),e)i.push("/"+r+" ("+Sa(t(e[r]))+")");return i.push(">>"),i.join(`
47`)}},set:function(t){Ut(t)==="object"&&(e=t)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return e.CA||""},set:function(t){typeof t=="string"&&(e.CA=t)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return n},set:function(t){var r=t==null?"":t.toString();r.substr(0,1)==="/"&&(r=r.substr(1)),n="/"+xa(r)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return n.substr(1,n.length-1)},set:function(t){n="/"+xa(t)}})};lr(Nn,Ur);var Oo=function(){Nn.call(this),this.pushButton=!0};lr(Oo,Nn);var es=function(){Nn.call(this),this.radio=!0,this.pushButton=!1;var n=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return n},set:function(e){n=e!==void 0?e:[]}})};lr(es,Nn);var Yo=function(){var n,e;Ur.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return n},set:function(i){n=i}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return e},set:function(i){e=i}});var t,r={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var i=function(o){return o};this.scope&&(i=this.scope.internal.getEncryptor(this.objId));var a,l=[];for(a in l.push("<<"),r)l.push("/"+a+" ("+Sa(i(r[a]))+")");return l.push(">>"),l.join(`
48`)}
vendor: 9,199 bytes, lines 48-57
48,set:function(i){Ut(i)==="object"&&(r=i)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return r.CA||""},set:function(i){typeof i=="string"&&(r.CA=i)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return t},set:function(i){var a=i==null?"":i.toString();a.substr(0,1)==="/"&&(a=a.substr(1)),t="/"+xa(a)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return t.substr(1,t.length-1)},set:function(i){var a=i==null?"":i.toString();a.substr(0,1)==="/"&&(a=a.substr(1)),t="/"+xa(a)}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=Me.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};lr(Yo,Ur),es.prototype.setAppearance=function(n){if(!("createAppearanceStream"in n)||!("getCA"in n))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var e in this.Kids)if(this.Kids.hasOwnProperty(e)){var t=this.Kids[e];t.appearanceStreamContent=n.createAppearanceStream(t.optionName),t.caption=n.getCA()}},es.prototype.createOption=function(n){var e=new Yo;return e.Parent=this,e.optionName=n,this.Kids.push(e),B5.call(this.scope,e),e};var Bo=function(){Nn.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=Me.CheckBox.createAppearanceStream()};lr(Bo,Nn);var ma=function(){Ur.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return!!vn(this.Ff,13)},set:function(e){e?this.Ff=bn(this.Ff,13):this.Ff=yn(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return!!vn(this.Ff,21)},set:function(e){e?this.Ff=bn(this.Ff,21):this.Ff=yn(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!vn(this.Ff,23)},set:function(e){e?this.Ff=bn(this.Ff,23):this.Ff=yn(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return!!vn(this.Ff,24)},set:function(e){e?this.Ff=bn(this.Ff,24):this.Ff=yn(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return!!vn(this.Ff,25)},set:function(e){e?this.Ff=bn(this.Ff,25):this.Ff=yn(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return!!vn(this.Ff,26)},set:function(e){e?this.Ff=bn(this.Ff,26):this.Ff=yn(this.Ff,26)}});var n=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return n},set:function(e){n=e}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return n},set:function(e){Number.isInteger(e)&&(n=e)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};lr(ma,Ur);var Ro=function(){ma.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return!!vn(this.Ff,14)},set:function(n){n?this.Ff=bn(this.Ff,14):this.Ff=yn(this.Ff,14)}}),this.password=!0};lr(Ro,ma);var Me={CheckBox:{createAppearanceStream:function(){return{N:{On:Me.CheckBox.YesNormal},D:{On:Me.CheckBox.YesPushDown,Off:Me.CheckBox.OffPushDown}}},YesPushDown:function(n){var e=ei(n);e.scope=n.scope;var t=[],r=n.scope.internal.getFont(n.fontName,n.fontStyle).id,i=n.scope.__private__.encodeColorString(n.color),a=xc(n,n.caption);return t.push("0.749023 g"),t.push("0 0 "+st(Me.internal.getWidth(n))+" "+st(Me.internal.getHeight(n))+" re"),t.push("f"),t.push("BMC"),t.push("q"),t.push("0 0 1 rg"),t.push("/"+r+" "+st(a.fontSize)+" Tf "+i),t.push("BT"),t.push(a.text),t.push("ET"),t.push("Q"),t.push("EMC"),e.stream=t.join(`
49`),e},YesNormal:function(n){var e=ei(n);e.scope=n.scope;var t=n.scope.internal.getFont(n.fontName,n.fontStyle).id,r=n.scope.__private__.encodeColorString(n.color),i=[],a=Me.internal.getHeight(n),l=Me.internal.getWidth(n),o=xc(n,n.caption);return i.push("1 g"),i.push("0 0 "+st(l)+" "+st(a)+" re"),i.push("f"),i.push("q"),i.push("0 0 1 rg"),i.push("0 0 "+st(l-1)+" "+st(a-1)+" re"),i.push("W"),i.push("n"),i.push("0 g"),i.push("BT"),i.push("/"+t+" "+st(o.fontSize)+" Tf "+r),i.push(o.text),i.push("ET"),i.push("Q"),e.stream=i.join(`
50`),e},OffPushDown:function(n){var e=ei(n);e.scope=n.scope;var t=[];return t.push("0.749023 g"),t.push("0 0 "+st(Me.internal.getWidth(n))+" "+st(Me.internal.getHeight(n))+" re"),t.push("f"),e.stream=t.join(`
51`),e}},RadioButton:{Circle:{createAppearanceStream:function(n){var e={D:{Off:Me.RadioButton.Circle.OffPushDown},N:{}};return e.N[n]=Me.RadioButton.Circle.YesNormal,e.D[n]=Me.RadioButton.Circle.YesPushDown,e},getCA:function(){return"l"},YesNormal:function(n){var e=ei(n);e.scope=n.scope;var t=[],r=Me.internal.getWidth(n)<=Me.internal.getHeight(n)?Me.internal.getWidth(n)/4:Me.internal.getHeight(n)/4;r=Number((.9*r).toFixed(5));var i=Me.internal.Bezier_C,a=Number((r*i).toFixed(5));return t.push("q"),t.push("1 0 0 1 "+zi(Me.internal.getWidth(n)/2)+" "+zi(Me.internal.getHeight(n)/2)+" cm"),t.push(r+" 0 m"),t.push(r+" "+a+" "+a+" "+r+" 0 "+r+" c"),t.push("-"+a+" "+r+" -"+r+" "+a+" -"+r+" 0 c"),t.push("-"+r+" -"+a+" -"+a+" -"+r+" 0 -"+r+" c"),t.push(a+" -"+r+" "+r+" -"+a+" "+r+" 0 c"),t.push("f"),t.push("Q"),e.stream=t.join(`
52`),e},YesPushDown:function(n){var e=ei(n);e.scope=n.scope;var t=[],r=Me.internal.getWidth(n)<=Me.internal.getHeight(n)?Me.internal.getWidth(n)/4:Me.internal.getHeight(n)/4;r=Number((.9*r).toFixed(5));var i=Number((2*r).toFixed(5)),a=Number((i*Me.internal.Bezier_C).toFixed(5)),l=Number((r*Me.internal.Bezier_C).toFixed(5));return t.push("0.749023 g"),t.push("q"),t.push("1 0 0 1 "+zi(Me.internal.getWidth(n)/2)+" "+zi(Me.internal.getHeight(n)/2)+" cm"),t.push(i+" 0 m"),t.push(i+" "+a+" "+a+" "+i+" 0 "+i+" c"),t.push("-"+a+" "+i+" -"+i+" "+a+" -"+i+" 0 c"),t.push("-"+i+" -"+a+" -"+a+" -"+i+" 0 -"+i+" c"),t.push(a+" -"+i+" "+i+" -"+a+" "+i+" 0 c"),t.push("f"),t.push("Q"),t.push("0 g"),t.push("q"),t.push("1 0 0 1 "+zi(Me.internal.getWidth(n)/2)+" "+zi(Me.internal.getHeight(n)/2)+" cm"),t.push(r+" 0 m"),t.push(r+" "+l+" "+l+" "+r+" 0 "+r+" c"),t.push("-"+l+" "+r+" -"+r+" "+l+" -"+r+" 0 c"),t.push("-"+r+" -"+l+" -"+l+" -"+r+" 0 -"+r+" c"),t.push(l+" -"+r+" "+r+" -"+l+" "+r+" 0 c"),t.push("f"),t.push("Q"),e.stream=t.join(`
53`),e},OffPushDown:function(n){var e=ei(n);e.scope=n.scope;var t=[],r=Me.internal.getWidth(n)<=Me.internal.getHeight(n)?Me.internal.getWidth(n)/4:Me.internal.getHeight(n)/4;r=Number((.9*r).toFixed(5));var i=Number((2*r).toFixed(5)),a=Number((i*Me.internal.Bezier_C).toFixed(5));return t.push("0.749023 g"),t.push("q"),t.push("1 0 0 1 "+zi(Me.internal.getWidth(n)/2)+" "+zi(Me.internal.getHeight(n)/2)+" cm"),t.push(i+" 0 m"),t.push(i+" "+a+" "+a+" "+i+" 0 "+i+" c"),t.push("-"+a+" "+i+" -"+i+" "+a+" -"+i+" 0 c"),t.push("-"+i+" -"+a+" -"+a+" -"+i+" 0 -"+i+" c"),t.push(a+" -"+i+" "+i+" -"+a+" "+i+" 0 c"),t.push("f"),t.push("Q"),e.stream=t.join(`
54`),e}},Cross:{createAppearanceStream:function(n){var e={D:{Off:Me.RadioButton.Cross.OffPushDown},N:{}};return e.N[n]=Me.RadioButton.Cross.YesNormal,e.D[n]=Me.RadioButton.Cross.YesPushDown,e},getCA:function(){return"8"},YesNormal:function(n){var e=ei(n);e.scope=n.scope;var t=[],r=Me.internal.calculateCross(n);return t.push("q"),t.push("1 1 "+st(Me.internal.getWidth(n)-2)+" "+st(Me.internal.getHeight(n)-2)+" re"),t.push("W"),t.push("n"),t.push(st(r.x1.x)+" "+st(r.x1.y)+" m"),t.push(st(r.x2.x)+" "+st(r.x2.y)+" l"),t.push(st(r.x4.x)+" "+st(r.x4.y)+" m"),t.push(st(r.x3.x)+" "+st(r.x3.y)+" l"),t.push("s"),t.push("Q"),e.stream=t.join(`
55`),e},YesPushDown:function(n){var e=ei(n);e.scope=n.scope;var t=Me.internal.calculateCross(n),r=[];return r.push("0.749023 g"),r.push("0 0 "+st(Me.internal.getWidth(n))+" "+st(Me.internal.getHeight(n))+" re"),r.push("f"),r.push("q"),r.push("1 1 "+st(Me.internal.getWidth(n)-2)+" "+st(Me.internal.getHeight(n)-2)+" re"),r.push("W"),r.push("n"),r.push(st(t.x1.x)+" "+st(t.x1.y)+" m"),r.push(st(t.x2.x)+" "+st(t.x2.y)+" l"),r.push(st(t.x4.x)+" "+st(t.x4.y)+" m"),r.push(st(t.x3.x)+" "+st(t.x3.y)+" l"),r.push("s"),r.push("Q"),e.stream=r.join(`
56`),e},OffPushDown:function(n){var e=ei(n);e.scope=n.scope;var t=[];return t.push("0.749023 g"),t.push("0 0 "+st(Me.internal.getWidth(n))+" "+st(Me.internal.getHeight(n))+" re"),t.push("f"),e.stream=t.join(`
57`),e}}},createDefaultAppearanceStream:function(n){var e=n.scope.internal.getFont(n.fontName,n.fontStyle).id,t=n.scope.__private__.encodeColorString(n.color);return"/"+e+" "+n.fontSize+" Tf "+t}};Me.internal={Bezier_C:.551915024494,calculateCross:function(n){var e=Me.internal.getWidth(n),t=Me.internal.getHeight(n),r=Math.min(e,t);return{x1:{x:(e-r)/2,y:(t-r)/2+r},x2:{x:(e-r)/2+r,y:(t-r)/2},x3:{x:(e-r)/2,y:(t-r)/2},x4:{x:(e-r)/2+r,y:(t-r)/2+r}}}},Me.internal.getWidth=function(n){var e=0;return Ut(n)==="object"&&(e=Cd(n.Rect[2])),e},Me.internal.getHeight=function(n){var e=0;return Ut(n)==="object"&&(e=Cd(n.Rect[3])),e};var B5=hn.addField=function(n){if(O5(this,n),!(n instanceof Ur))throw new Error("Invalid argument passed to 
57jsPDF.addField.");var e;return(e=n).scope.internal.acroformPlugin.printedOut&&(e.scope.internal.acroformPlugin.printedOut=!1,e.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),e.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(e),n.page=n.scope.internal.getCurrentPageInfo().pageNumber,this};hn.AcroFormChoiceField=Za,hn.AcroFormListBox=Ja,hn.AcroFormComboBox=Qa,hn.AcroFormEditBox=Fo,hn.AcroFormButton=Nn,hn.AcroFormPushButton=Oo,hn.AcroFormRadioButton=es,hn.AcroFormCheckBox=Bo,hn.AcroFormTextField=ma,hn.AcroFormPasswordField=Ro,hn.AcroFormAppearance=Me,hn.AcroForm={ChoiceField:Za,ListBox:Ja,ComboBox:Qa,EditBox:Fo,Button:Nn,PushButton:Oo,RadioButton:es,CheckBox:Bo,TextField:ma,PasswordField:Ro,Appearance:Me},Ge.AcroForm={ChoiceField:Za,ListBox:Ja,ComboBox:Qa,EditBox:Fo,Button:Nn,PushButton:Oo,RadioButton:es,CheckBox:Bo,TextField:ma,PasswordField:Ro,Appearance:Me};Ge.AcroForm;function bf(n){return n.reduce(function(e,t,r){return e[t]=r,e},{})}(function(n){var e="addImage_";n.__addimage__={};var t="UNKNOWN",r={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]]},i=n.__addimage__.getImageFileTypeByImageData=function(S,P){var B,U,re,Q,de,se=t;if((P=P||t)==="RGBA"||S.data!==void 0&&S.data instanceof Uint8ClampedArray&&"height"in S&&"width"in S)return"RGBA";if(ae(S))for(de in r)for(re=r[de],B=0;B<re.length;B+=1){for(Q=!0,U=0;U<re[B].length;U+=1)if(re[B][U]!==void 0&&re[B][U]!==S[U]){Q=!1;break}if(Q===!0){se=de;break}}else for(de in r)for(re=r[de],B=0;B<re.length;B+=1){for(Q=!0,U=0;U<re[B].length;U+=1)if(re[B][U]!==void 0&&re[B][U]!==S.charCodeAt(U)){Q=!1;break}if(Q===!0){se=de;break}}return se===t&&P!==t&&(se=P),se},a=function S(P){for(var B=this.internal.write,U=this.internal.putStream,re=(0,this.internal.getFilters)();re.indexOf("FlateEncode")!==-1;)re.splice(re.indexOf("FlateEncode"),1);P.objectId=this.internal.newObject();var Q=[];if(Q.push({key:"Type",value:"/XObject"}),Q.push({key:"Subtype",value:"/Image"}),Q.push({key:"Width",value:P.width}),Q.push({key:"Height",value:P.height}),P.colorSpace===y.INDEXED?Q.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(P.palette.length/3-1)+" "+("sMask"in P&&P.sMask!==void 0?P.objectId+2:P.objectId+1)+" 0 R]"}):(Q.push({key:"ColorSpace",value:"/"+P.colorSpace}),P.colorSpace===y.DEVICE_CMYK&&Q.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),Q.push({key:"BitsPerComponent",value:P.bitsPerComponent}),"decodeParameters"in P&&P.decodeParameters!==void 0&&Q.push({key:"DecodeParms",value:"<<"+P.decodeParameters+">>"}),"transparency"in P&&Array.isArray(P.transparency)&&P.transparency.length>0){for(var de="",se=0,fe=P.transparency.length;se<fe;se++)de+=P.transparency[se]+" "+P.transparency[se]+" ";Q.push({key:"Mask",value:"["+de+"]"})}P.sMask!==void 0&&Q.push({key:"SMask",value:P.objectId+1+" 0 R"});var we=P.filter!==void 0?["/"+P.filter]:void 0;if(U({data:P.data,additionalKeyValues:Q,alreadyAppliedFilters:we,objectId:P.objectId}),B("endobj"),"sMask"in P&&P.sMask!==void 0){var te,A=(te=P.sMaskBitsPerComponent)!==null&&te!==void 0?te:P.bitsPerComponent,I={width:P.width,height:P.height,colorSpace:"DeviceGray",bitsPerComponent:A,data:P.sMask};"filter"in P&&(I.decodeParameters="/Predictor ".concat(P.predictor," /Colors 1 /BitsPerComponent ").concat(A," /Columns ").concat(P.width),I.filter=P.filter),S.call(this,I)}if(P.colorSpace===y.INDEXED){var W=this.internal.newObject();U({data:H(new Uint8Array(P.palette)),objectId:W}),B("endobj")}},l=function(){var S=this.internal.collections[e+"images"];for(var P in S)a.call(this,S[P])},o=function(){var S,P=this.internal.collections[e+"images"],B=this.internal.write;for(var U in P)B("/I"+(S=P[U]).index,S.objectId,"0","R")},u=function(){this.internal.collections[e+"images"]||(this.internal.collections[e+"images"]={},this.internal.events.subscribe("putResources",l),this.internal.events.subscribe("putXobjectDict",o))},d=function(){var S=this.internal.collections[e+"images"];return u.call(this),S},h=function(){return Object.keys(this.internal.collections[e+"images"]).length},b=function(S){return typeof n["process"+S.toUpperCase()]=="function"},x=function(S){return Ut(S)==="object"&&S.nodeType===1},p=function(S,P){if(S.nodeName==="IMG"&&S.hasAttribute("src")){var B=""+S.getAttribute("src");if(B.indexOf("data:image/")===0)return Io(unescape(B).split("base64,").pop());var U=n.loadFile(B,!0);if(U!==void 0)return U}if(S.nodeName==="CANVAS"){if(S.width===0||S.height===0)throw new Error("Given canvas must have data. Canvas width: "+S.width+", height: "+S.height);var re;switch(P){case"PNG":re="image/png";break;case"WEBP":re="image/webp";break;default:re="image/jpeg"}return Io(S.toDataURL(re,1).split("base64,").pop())}},L=function(S){var P=this.internal.collections[e+"images"];if(P){for(var B in P)if(S===P[B].alias)return P[B]}},k=function(S,P,B){return S||P||(S=-96,P=-96),S<0&&(S=-1*B.width*72/S/this.internal.scaleFactor),P<0&&(P=-1*B.height*72/P/this.internal.scaleFactor),S===0&&(S=P*B.width/B.height),P===0&&(P=S*B.height/B.width),[S,P]},C=function(S,P,B,U,re,Q){var de=k.call(this,B,U,re),se=this.internal.getCoordinateString,fe=this.internal.getVerticalCoordinateString,we=d.call(this);if(B=de[0],U=de[1],we[re.index]=re,Q){Q*=Math.PI/180;var te=Math.cos(Q),A=Math.sin(Q),I=function($){return $.toFixed(4)},W=[I(te),I(A),I(-1*A),I(te),0,0,"cm"]}this.internal.write("q"),Q?(this.internal.write([1,"0","0",1,se(S),fe(P+U),"cm"].join(" ")),this.internal.write(W.join(" ")),this.internal.write([se(B),"0","0",se(U),"0","0","cm"].join(" "))):this.internal.write([se(B),"0","0",se(U),se(S),fe(P+U),"cm"].join(" ")),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,"cm"].join(" ")),this.internal.write("/I"+re.index+" Do"),this.internal.write("Q")},y=n.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"};n.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 V=n.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},q=n.__addimage__.sHashCode=function(S){var P,B,U=0;if(typeof S=="string")for(B=S.length,P=0;P<B;P++)U=(U<<5)-U+S.charCodeAt(P),U|=0;else if(ae(S))for(B=S.byteLength/2,P=0;P<B;P++)U=(U<<5)-U+S[P],U|=0;return U}
vendor: 57,763 bytes, line 57
57,E=n.__addimage__.validateStringAsBase64=function(S){(S=S||"").toString().trim();var P=!0;return S.length===0&&(P=!1),S.length%4!=0&&(P=!1),/^[A-Za-z0-9+/]+$/.test(S.substr(0,S.length-2))===!1&&(P=!1),/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(S.substr(-2))===!1&&(P=!1),P},K=n.__addimage__.extractImageFromDataUrl=function(S){if(S==null||!(S=S.trim()).startsWith("data:"))return null;var P=S.indexOf(",");return P<0?null:S.substring(0,P).trim().endsWith("base64")?S.substring(P+1):null};n.__addimage__.isArrayBuffer=function(S){return S instanceof ArrayBuffer};var ae=n.__addimage__.isArrayBufferView=function(S){return S instanceof Int8Array||S instanceof Uint8Array||S instanceof Uint8ClampedArray||S instanceof Int16Array||S instanceof Uint16Array||S instanceof Int32Array||S instanceof Uint32Array||S instanceof Float32Array||S instanceof Float64Array},J=n.__addimage__.binaryStringToUint8Array=function(S){for(var P=S.length,B=new Uint8Array(P),U=0;U<P;U++)B[U]=S.charCodeAt(U);return B},H=n.__addimage__.arrayBufferToBinaryString=function(S){for(var P="",B=ae(S)?S:new Uint8Array(S),U=0;U<B.length;U+=8192)P+=String.fromCharCode.apply(null,B.subarray(U,U+8192));return P};n.addImage=function(){var S,P,B,U,re,Q,de,se,fe;if(typeof arguments[1]=="number"?(P=t,B=arguments[1],U=arguments[2],re=arguments[3],Q=arguments[4],de=arguments[5],se=arguments[6],fe=arguments[7]):(P=arguments[1],B=arguments[2],U=arguments[3],re=arguments[4],Q=arguments[5],de=arguments[6],se=arguments[7],fe=arguments[8]),Ut(S=arguments[0])==="object"&&!x(S)&&"imageData"in S){var we=S;S=we.imageData,P=we.format||P||t,B=we.x||B||0,U=we.y||U||0,re=we.w||we.width||re,Q=we.h||we.height||Q,de=we.alias||de,se=we.compression||se,fe=we.rotation||we.angle||fe}var te=this.internal.getFilters();if(se===void 0&&te.indexOf("FlateEncode")!==-1&&(se="SLOW"),isNaN(B)||isNaN(U))throw new Error("Invalid coordinates passed to jsPDF.addImage");u.call(this);var A=D.call(this,S,P,de,se);return C.call(this,B,U,re,Q,A,fe),this};var D=function(S,P,B,U){var re,Q,de;if(typeof S=="string"&&i(S)===t){S=unescape(S);var se=G(S,!1);(se!==""||(se=n.loadFile(S,!0))!==void 0)&&(S=se)}if(x(S)&&(S=p(S,P)),P=i(S,P),!b(P))throw new Error("addImage does not support files of type '"+P+"', please ensure that a plugin for '"+P+"' support is added.");if(((de=B)==null||de.length===0)&&(B=(function(fe){return typeof fe=="string"||ae(fe)?q(fe):ae(fe.data)?q(fe.data):null})(S)),(re=L.call(this,B))||(S instanceof Uint8Array||P==="RGBA"||(Q=S,S=J(S)),re=this["process"+P.toUpperCase()](S,h.call(this),B,(function(fe){return fe&&typeof fe=="string"&&(fe=fe.toUpperCase()),fe in n.image_compression?fe:V.NONE})(U),Q)),!re)throw new Error("An unknown error occurred whilst processing the image.");return re},G=n.__addimage__.convertBase64ToBinaryString=function(S,P){P=typeof P!="boolean"||P;var B,U="";if(typeof S=="string"){var re;B=(re=K(S))!==null&&re!==void 0?re:S;try{U=Io(B)}catch(Q){if(P)throw E(B)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+Q.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return U};n.getImageProperties=function(S){var P,B,U="";if(x(S)&&(S=p(S)),typeof S=="string"&&i(S)===t&&((U=G(S,!1))===""&&(U=n.loadFile(S)||""),S=U),B=i(S),!b(B))throw new Error("addImage does not support files of type '"+B+"', please ensure that a plugin for '"+B+"' support is added.");if(S instanceof Uint8Array||(S=J(S)),!(P=this["process"+B.toUpperCase()](S)))throw new Error("An unknown error occurred whilst processing the image");return P.fileType=B,P}})(Ge.API),(function(n){var e=function(t){if(t!==void 0&&t!="")return!0};Ge.API.events.push(["addPage",function(t){this.internal.getPageInfo(t.pageNumber).pageContext.annotations=[]}]),n.events.push(["putPage",function(t){for(var r,i,a,l=this.internal.getCoordinateString,o=this.internal.getVerticalCoordinateString,u=this.internal.getPageInfoByObjId(t.objId),d=t.pageContext.annotations,h=!1,b=0;b<d.length&&!h;b++)switch((r=d[b]).type){case"link":(e(r.options.url)||e(r.options.pageNumber))&&(h=!0);break;case"reference":case"text":case"freetext":h=!0}if(h!=0){this.internal.write("/Annots [");for(var x=0;x<d.length;x++){r=d[x];var p=this.internal.pdfEscape,L=this.internal.getEncryptor(t.objId);switch(r.type){case"reference":this.internal.write(" "+r.object.objId+" 0 R ");break;case"text":var k=this.internal.newAdditionalObject(),C=this.internal.newAdditionalObject(),y=this.internal.getEncryptor(k.objId),V=r.title||"Note";a="<</Type /Annot /Subtype /Text "+(i="/Rect ["+l(r.bounds.x)+" "+o(r.bounds.y+r.bounds.h)+" "+l(r.bounds.x+r.bounds.w)+" "+o(r.bounds.y)+"] ")+"/Contents ("+p(y(r.contents))+")",a+=" /Popup "+C.objId+" 0 R",a+=" /P "+u.objId+" 0 R",a+=" /T ("+p(y(V))+") >>",k.content=a;var q=k.objId+" 0 R";a="<</Type /Annot /Subtype /Popup "+(i="/Rect ["+l(r.bounds.x+30)+" "+o(r.bounds.y+r.bounds.h)+" "+l(r.bounds.x+r.bounds.w+30)+" "+o(r.bounds.y)+"] ")+" /Parent "+q,r.open&&(a+=" /Open true"),a+=" >>",C.content=a,this.internal.write(k.objId,"0 R",C.objId,"0 R");break;case"freetext":i="/Rect ["+l(r.bounds.x)+" "+o(r.bounds.y)+" "+l(r.bounds.x+r.bounds.w)+" "+o(r.bounds.y+r.bounds.h)+"] ";var E="font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+(r.color||"#000000");a="<</Type /Annot /Subtype /FreeText "+i+"/Contents ("+p(L(r.contents))+")",a+=" /DS("+p(L(E))+")",a+=" /Border [0 0 0]",a+=" >>",this.internal.write(a);break;case"link":if(r.options.name){var K=this.annotations._nameMap[r.options.name];r.options.pageNumber=K.page,r.options.top=K.y}else r.options.top||(r.options.top=0);if(i="/Rect ["+r.finalBounds.x+" "+r.finalBounds.y+" "+r.finalBounds.w+" "+r.finalBounds.h+"] ",a="",r.options.url)a="<</Type /Annot /Subtype /Link "+i+"/Border [0 0 0] /A <</S /URI /URI ("+p(L(r.options.url))+") >>";else if(r.options.pageNumber)switch(a="<</Type /Annot /Subtype /Link "+i+"/Border [0 0 0] /Dest ["+this.internal.getPageInfo(r.options.pageNumber).objId+" 0 R",r.options.magFactor=r.options.magFactor||"XYZ",r.options.magFactor){case"Fit":a+=" /Fit]";break;case"FitH":a+=" /FitH "+r.options.top+"]";break;case"FitV":r.options.left=r.options.left||0,a+=" /FitV "+r.options.left+"]";break;default:var ae=o(r.options.top);r.options.left=r.options.left||0,r.options.zoom===void 0&&(r.options.zoom=0),a+=" /XYZ "+r.options.left+" "+ae+" "+r.options.zoom+"]"}a!=""&&(a+=" >>",this.internal.write(a))}}this.internal.write("]")}}]),n.createAnnotation=function(t){var r=this.internal.getCurrentPageInfo();switch(t.type){case"link":this.link(t.bounds.x,t.bounds.y,t.bounds.w,t.bounds.h,t);break;case"text":case"freetext":r.pageContext.annotations.push(t)}},n.link=function(t,r,i,a,l){var o=this.internal.getCurrentPageInfo(),u=this.internal.getCoordinateString,d=this.internal.getVerticalCoordinateString;o.pageContext.annotations.push({finalBounds:{x:u(t),y:d(r),w:u(t+i),h:d(r+a)},options:l,type:"link"})},n.textWithLink=function(t,r,i,a){var l,o,u=this.getTextWidth(t),d=this.internal.getLineHeight()/this.internal.scaleFactor;if(a.maxWidth!==void 0){o=a.maxWidth;var h=this.splitTextToSize(t,o).length;l=Math.ceil(d*h)}else o=u,l=d;return this.text(t,r,i,a),i+=.2*d,a.align==="center"&&(r-=u/2),a.align==="right"&&(r-=u),this.link(r,i-d,o,l,a),u},n.getTextWidth=function(t){var r=this.internal.getFontSize();return this.getStringUnitWidth(t)*r/this.internal.scaleFactor}})(Ge.API),(function(n){var e={1569:[65152],1570:[65153,65154],1571:[65155,65156],1572:[65157,65158],1573:[65159,65160],1574:[65161,65162,65163,65164],1575:[65165,65166],1576:[65167,65168,65169,65170],1577:[65171,65172],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194],1584:[65195,65196],1585:[65197,65198],1586:[65199,65200],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1649:[64336,64337],1655:[64477],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393],1676:[64388,64389],1677:[64386,64387],1678:[64390,64391],1681:[64396,64397],1688:[64394,64395],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421],1729:[64422,64423,64424,64425],1733:[64480,64481],1734:[64473,64474],1735:[64471,64472],1736:[64475,64476],1737:[64482,64483],1739:[64478,64479],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431],1747:[64432,64433]},t={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}},r={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},i=[1570,1571,1573,1575];n.__arabicParser__={};var a=n.__arabicParser__.isInArabicSubstitutionA=function(k){return e[k.charCodeAt(0)]!==void 0},l=n.__arabicParser__.isArabicLetter=function(k){return typeof k=="string"&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(k)},o=n.__arabicParser__.isArabicEndLetter=function(k){return l(k)&&a(k)&&e[k.charCodeAt(0)].length<=2},u=n.__arabicParser__.isArabicAlfLetter=function(k){return l(k)&&i.indexOf(k.charCodeAt(0))>=0};n.__arabicParser__.arabicLetterHasIsolatedForm=function(k){return l(k)&&a(k)&&e[k.charCodeAt(0)].length>=1};var d=n.__arabicParser__.arabicLetterHasFinalForm=function(k){return l(k)&&a(k)&&e[k.charCodeAt(0)].length>=2};n.__arabicParser__.arabicLetterHasInitialForm=function(k){return l(k)&&a(k)&&e[k.charCodeAt(0)].length>=3};var h=n.__arabicParser__.arabicLetterHasMedialForm=function(k){return l(k)&&a(k)&&e[k.charCodeAt(0)].length==4},b=n.__arabicParser__.resolveLigatures=function(k){var C=0,y=t,V="",q=0;for(C=0;C<k.length;C+=1)y[k.charCodeAt(C)]!==void 0?(q++,typeof(y=y[k.charCodeAt(C)])=="number"&&(V+=String.fromCharCode(y),y=t,q=0),C===k.length-1&&(y=t,V+=k.charAt(C-(q-1)),C-=q-1,q=0)):(y=t,V+=k.charAt(C-q),C-=q,q=0);return V};n.__arabicParser__.isArabicDiacritic=function(k){return k!==void 0&&r[k.charCodeAt(0)]!==void 0};var x=n.__arabicParser__.getCorrectForm=function(k,C,y){return l(k)?a(k)===!1?-1:!d(k)||!l(C)&&!l(y)||!l(y)&&o(C)||o(k)&&!l(C)||o(k)&&u(C)||o(k)&&o(C)?0:h(k)&&l(C)&&!o(C)&&l(y)&&d(y)?3:o(k)||!l(y)?1:2:-1},p=function(k){var C=0,y=0,V=0,q="",E="",K="",ae=(k=k||"").split("\\s+"),J=[];for(C=0;C<ae.length;C+=1){for(J.push(""),y=0;y<ae[C].length;y+=1)q=ae[C][y],E=ae[C][y-1],K=ae[C][y+1],l(q)?(V=x(q,E,K),J[C]+=V!==-1?String.fromCharCode(e[q.charCodeAt(0)][V]):q):J[C]+=q;J[C]=b(J[C])}return J.join(" ")},L=n.__arabicParser__.processArabic=n.processArabic=function(){var k,C=typeof arguments[0]=="string"?arguments[0]:arguments[0].text,y=[];if(Array.isArray(C)){var V=0;for(y=[],V=0;V<C.length;V+=1)Array.isArray(C[V])?y.push([p(C[V][0]),C[V][1],C[V][2]]):y.push([p(C[V])]);k=y}else k=p(C);return typeof arguments[0]=="string"?k:(arguments[0].text=k,arguments[0])};n.events.push(["preProcessText",L])})(Ge.API),Ge.API.autoPrint=function(n){var e;return(n=n||{}).variant=n.variant||"non-conform",n.variant==="javascript"?this.addJS("print({});"):(this.internal.events.subscribe("postPutResources",function(){e=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /Named"),this.internal.out("/Type /Action"),this.internal.out("/N /Print"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){this.internal.out("/OpenAction "+e+" 0 R")})),this},(function(n){var e=function(){var t=void 0;Object.defineProperty(this,"pdf",{get:function(){return t},set:function(o){t=o}});var r=150;Object.defineProperty(this,"width",{get:function(){return r},set:function(o){r=isNaN(o)||Number.isInteger(o)===!1||o<0?150:o,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=r+1)}});var i=300;Object.defineProperty(this,"height",{get:function(){return i},set:function(o){i=isNaN(o)||Number.isInteger(o)===!1||o<0?300:o,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=i+1)}});var a=[];Object.defineProperty(this,"childNodes",{get:function(){return a},set:function(o){a=o}});var l={};Object.defineProperty(this,"style",{get:function(){return l},set:function(o){l=o}}),Object.defineProperty(this,"parentNode",{})};e.prototype.getContext=function(t,r){var i;if((t=t||"2d")!=="2d")return null;for(i in r)this.pdf.context2d.hasOwnProperty(i)&&(this.pdf.context2d[i]=r[i]);return this.pdf.context2d._canvas=this,this.pdf.context2d},e.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},n.events.push(["initialized",function(){this.canvas=new e,this.canvas.pdf=this}])})(Ge.API),(function(n){var e={left:0,top:0,bottom:0,right:0},t=!1,r=function(){this.internal.__cell__===void 0&&(this.internal.__cell__={},this.internal.__cell__.padding=3,this.internal.__cell__.headerFunction=void 0,this.internal.__cell__.margins=Object.assign({},e),this.internal.__cell__.margins.width=this.getPageWidth(),i.call(this))},i=function(){this.internal.__cell__.lastCell=new a,this.internal.__cell__.pages=1},a=function(){var u=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return u},set:function(k){u=k}});var d=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return d},set:function(k){d=k}});var h=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return h},set:function(k){h=k}});var b=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return b},set:function(k){b=k}});var x=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return x},set:function(k){x=k}});var p=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return p},set:function(k){p=k}});var L=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return L},set:function(k){L=k}}),this};a.prototype.clone=function(){return new a(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},a.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},n.setHeaderFunction=function(u){return r.call(this),this.internal.__cell__.headerFunction=typeof u=="function"?u:void 0,this},n.getTextDimensions=function(u,d){r.call(this);var h=(d=d||{}).fontSize||this.getFontSize(),b=d.font||this.getFont(),x=d.scaleFactor||this.internal.scaleFactor,p=0,L=0,k=0,C=this;if(!Array.isArray(u)&&typeof u!="string"){if(typeof u!="number")throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");u=String(u)}var y=d.maxWidth;y>0?typeof u=="string"?u=this.splitTextToSize(u,y):Object.prototype.toString.call(u)==="[object Array]"&&(u=u.reduce(function(q,E){return q.concat(C.splitTextToSize(E,y))},[])):u=Array.isArray(u)?u:[u];for(var V=0;V<u.length;V++)p<(k=this.getStringUnitWidth(u[V],{font:b})*h)&&(p=k);return p!==0&&(L=u.length),{w:p/=x,h:Math.max((L*h*this.getLineHeightFactor()-h*(this.getLineHeightFactor()-1))/x,0)}},n.cellAddPage=function(){r.call(this),this.addPage();var u=this.internal.__cell__.margins||e;return this.internal.__cell__.lastCell=new a(u.left,u.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var l=n.cell=function(){var u;u=arguments[0]instanceof a?arguments[0]:new a(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6]),r.call(this);var d=this.internal.__cell__.lastCell,h=this.internal.__cell__.padding,b=this.internal.__cell__.margins||e,x=this.internal.__cell__.tableHeaderRow,p=this.internal.__cell__.printHeaders;return d.lineNumber!==void 0&&(d.lineNumber===u.lineNumber?(u.x=(d.x||0)+(d.width||0),u.y=d.y||0):d.y+d.height+u.height+b.bottom>this.getPageHeight()?(this.cellAddPage(),u.y=b.top,p&&x&&(this.printHeaderRow(u.lineNumber,!0),u.y+=x[0].height)):u.y=d.y+d.height||u.y),u.text[0]!==void 0&&(this.rect(u.x,u.y,u.width,u.height,t===!0?"FD":void 0),u.align==="right"?this.text(u.text,u.x+u.width-h,u.y+h,{align:"right",baseline:"top"}):u.align==="center"?this.text(u.text,u.x+u.width/2,u.y+h,{align:"center",baseline:"top",maxWidth:u.width-h-h}):this.text(u.text,u.x+h,u.y+h,{align:"left",baseline:"top",maxWidth:u.width-h-h})),this.internal.__cell__.lastCell=u,this};n.table=function(u,d,h,b,x){if(r.call(this),!h)throw new Error("No data for PDF table.");var p,L,k,C,y=[],V=[],q=[],E={},K={},ae=[],J=[],H=(x=x||{}).autoSize||!1,D=x.printHeaders!==!1,G=x.css&&x.css["font-size"]!==void 0?16*x.css["font-size"]:x.fontSize||12,S=x.margins||Object.assign({width:this.getPageWidth()},e),P=typeof x.padding=="number"?x.padding:3,B=x.headerBackgroundColor||"#c8c8c8",U=x.headerTextColor||"#000";if(i.call(this),this.internal.__cell__.printHeaders=D,this.internal.__cell__.margins=S,this.internal.__cell__.table_font_size=G,this.internal.__cell__.padding=P,this.internal.__cell__.headerBackgroundColor=B,this.internal.__cell__.headerTextColor=U,this.setFontSize(G),b==null)V=y=Object.keys(h[0]),q=y.map(function(){return"left"});else if(Array.isArray(b)&&Ut(b[0])==="object")for(y=b.map(function(we){return we.name}),V=b.map(function(we){return we.prompt||we.name||""}),q=b.map(function(we){return we.align||"left"}),p=0;p<b.length;p+=1)K[b[p].name]=.7499990551181103*b[p].width;else Array.isArray(b)&&typeof b[0]=="string"&&(V=y=b,q=y.map(function(){return"left"}));if(H||Array.isArray(b)&&typeof b[0]=="string")for(p=0;p<y.length;p+=1){for(E[C=y[p]]=h.map(function(we){return we[C]}),this.setFont(void 0,"bold"),ae.push(this.getTextDimensions(V[p],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),L=E[C],this.setFont(void 0,"normal"),k=0;k<L.length;k+=1)ae.push(this.getTextDimensions(L[k],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);K[C]=Math.max.apply(null,ae)+P+P,ae=[]}if(D){var re={};for(p=0;p<y.length;p+=1)re[y[p]]={},re[y[p]].text=V[p],re[y[p]].align=q[p];var Q=o.call(this,re,K);J=y.map(function(we){return new a(u,d,K[we],Q,re[we].text,void 0,re[we].align)}),this.setTableHeaderRow(J),this.printHeaderRow(1,!1)}var de=b.reduce(function(we,te){return we[te.name]=te.align,we},{});for(p=0;p<h.length;p+=1){"rowStart"in x&&x.rowStart instanceof Function&&x.rowStart({row:p,data:h[p]},this);var se=o.call(this,h[p],K);for(k=0;k<y.length;k+=1){var fe=h[p][y[k]];"cellStart"in x&&x.cellStart instanceof Function&&x.cellStart({row:p,col:k,data:fe},this),l.call(this,new a(u,d,K[y[k]],se,fe,p+2,de[y[k]]))}}return this.internal.__cell__.table_x=u,this.internal.__cell__.table_y=d,this};var o=function(u,d){var h=this.internal.__cell__.padding,b=this.internal.__cell__.table_font_size,x=this.internal.scaleFactor;return Object.keys(u).map(function(p){var L=u[p];return this.splitTextToSize(L.hasOwnProperty("text")?L.text:L,d[p]-h-h)},this).map(function(p){return this.getLineHeightFactor()*p.length*b/x+h+h},this).reduce(function(p,L){return Math.max(p,L)},0)};n.setTableHeaderRow=function(u){r.call(this),this.internal.__cell__.tableHeaderRow=u},n.printHeaderRow=function(u,d){if(r.call(this),!this.internal.__cell__.tableHeaderRow)throw new Error("Property tableHeaderRow does not exist.");var h;if(t=!0,typeof this.internal.__cell__.headerFunction=="function"){var b=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new a(b[0],b[1],b[2],b[3],void 0,-1)}this.setFont(void 0,"bold");for(var x=[],p=0;p<this.internal.__cell__.tableHeaderRow.length;p+=1){h=this.internal.__cell__.tableHeaderRow[p].clone(),d&&(h.y=this.internal.__cell__.margins.top||0,x.push(h)),h.lineNumber=u;var L=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),l.call(this,h),this.setTextColor(L)}x.length>0&&this.setTableHeaderRow(x),this.setFont(void 0,"normal"),t=!1}})(Ge.API);var yf={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},xf=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],wc=bf(xf),wf=[100,200,300,400,500,600,700,800,900],R5=bf(wf);function ec(n){var e=n.family.replace(/"|'/g,"").toLowerCase(),t=(function(a){return yf[a=a||"normal"]?a:"normal"})(n.style),r=(function(a){return a?typeof a=="number"?a>=100&&a<=900&&a%100==0?a:400:/^\d00$/.test(a)?parseInt(a):a==="bold"?700:400:400})(n.weight),i=(function(a){return typeof wc[a=a||"normal"]=="number"?a:"normal"})(n.stretch);return{family:e,style:t,weight:r,stretch:i,src:n.src||[],ref:n.ref||{name:e,style:[i,t,r].join(" ")}}}function Pd(n,e,t,r){var i;for(i=t;i>=0&&i<e.length;i+=r)if(n[e[i]])return n[e[i]];for(i=t;i>=0&&i<e.length;i-=r)if(n[e[i]])return n[e[i]]}var z5={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},Td={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function Ed(n){return[n.stretch,n.style,n.weight,n.family].join(" ")}function Dd(n){return n.trimLeft()}function q5(n,e){for(var t=0;t<n.length;){if(n.charAt(t)===e)return[n.substring(0,t),n.substring(t+1)];t+=1}return null}function U5(n){var e=n.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);return e===null?null:[e[0],n.substring(e[0].length)]}var Ga,Do,Md,Id,Fd,tc=["times"];function Od(n,e,t,r,i){var a=4,l=Rd;switch(i){case Ge.API.image_compression.FAST:a=1,l=Bd;break;case Ge.API.image_compression.MEDIUM:a=6,l=zd;break;case Ge.API.image_compression.SLOW:a=9,l=qd}n=(function(u,d,h,b){for(var x,p=u.length/d,L=new Uint8Array(u.length+p),k=[V5,Bd,Rd,zd,qd],C=0;C<p;C+=1){var y=C*d,V=u.subarray(y,y+d);if(b)L.set(b(V,h,x),y+C);else{for(var q=k.length,E=[],K=0;K<q;K+=1)E[K]=k[K](V,h,x);var ae=H5(E.concat());L.set(E[ae],y+C)}x=V}return L})(n,e,Math.ceil(t*r/8),l);var o=pc(n,{level:a});return Ge.API.__addimage__.arrayBufferToBinaryString(o)}function V5(n){var e=Array.apply([],n);return e.unshift(0),e}function Bd(n,e){var t=n.length,r=[];r[0]=1;for(var i=0;i<t;i+=1){var a=n[i-e]||0;r[i+1]=n[i]-a+256&255}return r}function Rd(n,e,t){var r=n.length,i=[];i[0]=2;for(var a=0;a<r;a+=1){var l=t&&t[a]||0;i[a+1]=n[a]-l+256&255}return i}function zd(n,e,t){var r=n.length,i=[];i[0]=3;for(var a=0;a<r;a+=1){var l=n[a-e]||0,o=t&&t[a]||0;i[a+1]=n[a]+256-(l+o>>>1)&255}return i}function qd(n,e,t){var r=n.length,i=[];i[0]=4;for(var a=0;a<r;a+=1){var l=W5(n[a-e]||0,t&&t[a]||0,t&&t[a-e]||0);i[a+1]=n[a]-l+256&255}return i}function W5(n,e,t){if(n===e&&e===t)return n;var r=Math.abs(e-t),i=Math.abs(n-t),a=Math.abs(n+e-t-t);return r<=i&&r<=a?n:i<=a?e:t}function H5(n){var e=n.map(function(t){return t.reduce(function(r,i){return r+Math.abs(i)},0)});return e.indexOf(Math.min.apply(null,e))}function nc(n,e,t){var r=e*t,i=Math.floor(r/8),a=16-(r-8*i+t),l=(1<<t)-1;return _f(n,i)>>a&l}function Ud(n,e,t,r){var i=t*r,a=Math.floor(i/8),l=16-(i-8*a+r),o=(1<<r)-1,u=(e&o)<<l;(function(d,h,b){if(h+1<d.byteLength)d.setUint16(h,b,!1);else{var x=b>>8&255;d.setUint8(h,x)}})(n,a,_f(n,a)&~(o<<l)&65535|u)}function _f(n,e){return e+1<n.byteLength?n.getUint16(e,!1):n.getUint8(e)<<8}function $5(n){var e=0;if(n[e++]!==71||n[e++]!==73||n[e++]!==70||n[e++]!==56||(n[e++]+1&253)!=56||n[e++]!==97)throw new Error("Invalid GIF 87a/89a header.");var t=n[e++]|n[e++]<<8,r=n[e++]|n[e++]<<8,i=n[e++],a=i>>7,l=1<<1+(7&i);n[e++],n[e++];var o=null,u=null;a&&(o=e,u=l,e+=3*l);var d=!0,h=[],b=0,x=null,p=0,L=null;for(this.width=t,this.height=r;d&&e<n.length;)switch(n[e++]){case 33:switch(n[e++]){case 255:if(n[e]!==11||n[e+1]==78&&n[e+2]==69&&n[e+3]==84&&n[e+4]==83&&n[e+5]==67&&n[e+6]==65&&n[e+7]==80&&n[e+8]==69&&n[e+9]==50&&n[e+10]==46&&n[e+11]==48&&n[e+12]==3&&n[e+13]==1&&n[e+16]==0)e+=14,L=n[e++]|n[e++]<<8,e++;else for(e+=12;;){if(!((S=n[e++])>=0))throw Error("Invalid block size");if(S===0)break;e+=S}break;case 249:if(n[e++]!==4||n[e+4]!==0)throw new Error("Invalid graphics extension block.");var k=n[e++];b=n[e++]|n[e++]<<8,x=n[e++],1&k||(x=null),p=k>>2&7,e++;break;case 254:for(;;){if(!((S=n[e++])>=0))throw Error("Invalid block size");if(S===0)break;e+=S}break;default:throw new Error("Unknown graphic control label: 0x"+n[e-1].toString(16))}break;case 44:var C=n[e++]|n[e++]<<8,y=n[e++]|n[e++]<<8,V=n[e++]|n[e++]<<8,q=n[e++]|n[e++]<<8,E=n[e++],K=E>>6&1,ae=1<<1+(7&E),J=o,H=u,D=!1;E>>7&&(D=!0,J=e,H=ae,e+=3*ae);var G=e;for(e++;;){var S;if(!((S=n[e++])>=0))throw Error("Invalid block size");if(S===0)break;e+=S}h.push({x:C,y,width:V,height:q,has_local_palette:D,palette_offset:J,palette_size:H,data_offset:G,data_length:e-G,transparent_index:x,interlaced:!!K,delay:b,disposal:p});break;case 59:d=!1;break;default:throw new Error("Unknown gif block: 0x"+n[e-1].toString(16))}this.numFrames=function(){return h.length},this.loopCount=function(){return L},this.frameInfo=function(P){if(P<0||P>=h.length)throw new Error("Frame index out of range.");return h[P]},this.decodeAndBlitFrameBGRA=function(P,B){var U=this.frameInfo(P),re=U.width*U.height;if(re>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");var Q=new Uint8Array(re);Vd(n,U.data_offset,Q,re);var de=U.palette_offset,se=U.transparent_index;se===null&&(se=256);var fe=U.width,we=t-fe,te=fe,A=4*(U.y*t+U.x),I=4*((U.y+U.height)*t+U.x),W=A,$=4*we;U.interlaced===!0&&($+=4*t*7);for(var X=8,ie=0,ue=Q.length;ie<ue;++ie){var he=Q[ie];if(te===0&&(te=fe,(W+=$)>=I&&($=4*we+4*t*(X-1),W=A+(fe+we)*(X<<1),X>>=1)),he===se)W+=4;else{var me=n[de+3*he],Se=n[de+3*he+1],Te=n[de+3*he+2];B[W++]=Te,B[W++]=Se,B[W++]=me,B[W++]=255}--te}},this.decodeAndBlitFrameRGBA=function(P,B){var U=this.frameInfo(P),re=U.width*U.height;if(re>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");var Q=new Uint8Array(re);Vd(n,U.data_offset,Q,re);var de=U.palette_offset,se=U.transparent_index;se===null&&(se=256);var fe=U.width,we=t-fe,te=fe,A=4*(U.y*t+U.x),I=4*((U.y+U.height)*t+U.x),W=A,$=4*we;U.interlaced===!0&&($+=4*t*7);for(var X=8,ie=0,ue=Q.length;ie<ue;++ie){var he=Q[ie];if(te===0&&(te=fe,(W+=$)>=I&&($=4*we+4*t*(X-1),W=A+(fe+we)*(X<<1),X>>=1)),he===se)W+=4;else{var me=n[de+3*he],Se=n[de+3*he+1],Te=n[de+3*he+2];B[W++]=me,B[W++]=Se,B[W++]=Te,B[W++]=255}--te}}}function Vd(n,e,t,r){for(var i=n[e++],a=1<<i,l=a+1,o=l+1,u=i+1,d=(1<<u)-1,h=0,b=0,x=0,p=n[e++],L=new Int32Array(4096),k=null;;){for(;h<16&&p!==0;)b|=n[e++]<<h,h+=8,p===1?p=n[e++]:--p;if(h<u)break;var C=b&d;if(b>>=u,h-=u,C!==a){if(C===l)break;for(var y=C<o?C:k,V=0,q=y;q>a;)q=L[q]>>8,++V;var E=q;if(x+V+(y!==C?1:0)>r)return void qt.log("Warning, gif stream longer than expected.");t[x++]=E;var K=x+=V;for(y!==C&&(t[x++]=E),q=y;V--;)q=L[q],t[--K]=255&q,q>>=8;k!==null&&o<4096&&(L[o++]=k<<8|E,o>=d+1&&u<12&&(++u,d=d<<1|1)),k=C}else o=l+1,d=(1<<(u=i+1))-1,k=null}return x!==r&&qt.log("Warning, gif stream shorter than expected."),t}function rc(n){var e,t,r,i,a,l=Math.floor,o=new Array(64),u=new Array(64),d=new Array(64),h=new Array(64),b=new Array(65535),x=new Array(65535),p=new Array(64),L=new Array(64),k=[],C=0,y=7,V=new Array(64),q=new Array(64),E=new Array(64),K=new Array(256),ae=new Array(2048),J=[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],H=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],D=[0,1,2,3,4,5,6,7,8,9,10,11],G=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],S=[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],P=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],B=[0,1,2,3,4,5,6,7,8,9,10,11],U=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],re=[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 Q(A,I){for(var W=0,$=0,X=new Array,ie=1;ie<=16;ie++){for(var ue=1;ue<=A[ie];ue++)X[I[$]]=[],X[I[$]][0]=W,X[I[$]][1]=ie,$++,W++;W*=2}return X}function de(A){for(var I=A[0],W=A[1]-1;W>=0;)I&1<<W&&(C|=1<<y),W--,--y<0&&(C==255?(se(255),se(0)):se(C),y=7,C=0)}function se(A){k.push(A)}function fe(A){se(A>>8&255),se(255&A)}function we(A,I,W,$,X){for(var ie,ue=X[0],he=X[240],me=(function(ke,Ke){var Ee,Xe,Oe,kt,vt,rt,bt,mt,Re,at,We=0;for(Re=0;Re<8;++Re){Ee=ke[We],Xe=ke[We+1],Oe=ke[We+2],kt=ke[We+3],vt=ke[We+4],rt=ke[We+5],bt=ke[We+6];var nn=Ee+(mt=ke[We+7]),xt=Ee-mt,ut=Xe+bt,ot=Xe-bt,Dt=Oe+rt,ze=Oe-rt,Tt=kt+vt,Ze=kt-vt,Je=nn+Tt,Vt=nn-Tt,dt=ut+Dt,Ye=ut-Dt;ke[We]=Je+dt,ke[We+4]=Je-dt;var Lt=.707106781*(Ye+Vt);ke[We+2]=Vt+Lt,ke[We+6]=Vt-Lt;var Wr=.382683433*((Je=Ze+ze)-(Ye=ot+xt)),fn=.5411961*Je+Wr,Sr=1.306562965*Ye+Wr,cr=.707106781*(dt=ze+ot),Qe=xt+cr,Dr=xt-cr;ke[We+5]=Dr+fn,ke[We+3]=Dr-fn,ke[We+1]=Qe+Sr,ke[We+7]=Qe-Sr,We+=8}for(We=0,Re=0;Re<8;++Re){Ee=ke[We],Xe=ke[We+8],Oe=ke[We+16],kt=ke[We+24],vt=ke[We+32],rt=ke[We+40],bt=ke[We+48];var Ar=Ee+(mt=ke[We+56]),Zn=Ee-mt,Vn=Xe+bt,Xt=Xe-bt,Et=Oe+rt,on=Oe-rt,Hr=kt+vt,Wn=kt-vt,Jn=Ar+Hr,Qn=Ar-Hr,er=Vn+Et,Dn=Vn-Et;ke[We]=Jn+er,ke[We+32]=Jn-er;var tr=.707106781*(Dn+Qn);ke[We+16]=Qn+tr,ke[We+48]=Qn-tr;var $r=.382683433*((Jn=Wn+on)-(Dn=Xt+Zn)),Hn=.5411961*Jn+$r,Gr=1.306562965*Dn+$r,Mn=.707106781*(er=on+Xt),ur=Zn+Mn,ii=Zn-Mn;ke[We+40]=ii+Hn,ke[We+24]=ii-Hn,ke[We+8]=ur+Gr,ke[We+56]=ur-Gr,We++}for(Re=0;Re<64;++Re)at=ke[Re]*Ke[Re],p[Re]=at>0?at+.5|0:at-.5|0;return p})(A,I),Se=0;Se<64;++Se)L[J[Se]]=me[Se];var Te=L[0]-W;W=L[0],Te==0?de($[0]):(de($[x[ie=32767+Te]]),de(b[ie]));for(var Ce=63;Ce>0&&L[Ce]==0;)Ce--;if(Ce==0)return de(ue),W;for(var Fe,F=1;F<=Ce;){for(var Ne=F;L[F]==0&&F<=Ce;)++F;var et=F-Ne;if(et>=16){Fe=et>>4;for(var Ve=1;Ve<=Fe;++Ve)de(he);et&=15}ie=32767+L[F],de(X[(et<<4)+x[ie]]),de(b[ie]),F++}return Ce!=63&&de(ue),W}function te(A){A=Math.min(Math.max(A,1),100),a!=A&&((function(I){for(var W=[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],$=0;$<64;$++){var X=l((W[$]*I+50)/100);X=Math.min(Math.max(X,1),255),o[J[$]]=X}for(var ie=[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],ue=0;ue<64;ue++){var he=l((ie[ue]*I+50)/100);he=Math.min(Math.max(he,1),255),u[J[ue]]=he}for(var me=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],Se=0,Te=0;Te<8;Te++)for(var Ce=0;Ce<8;Ce++)d[Se]=1/(o[J[Se]]*me[Te]*me[Ce]*8),h[Se]=1/(u[J[Se]]*me[Te]*me[Ce]*8),Se++})(A<50?Math.floor(5e3/A):Math.floor(200-2*A)),a=A)}this.encode=function(A,I){I&&te(I),k=new Array,C=0,y=7,fe(65496),fe(65504),fe(16),se(74),se(70),se(73),se(70),se(0),se(1),se(1),se(0),fe(1),fe(1),se(0),se(0),(function(){fe(65499),fe(132),se(0);for(var Xe=0;Xe<64;Xe++)se(o[Xe]);se(1);for(var Oe=0;Oe<64;Oe++)se(u[Oe])})(),(function(Xe,Oe){fe(65472),fe(17),se(8),fe(Oe),fe(Xe),se(3),se(1),se(17),se(0),se(2),se(17),se(1),se(3),se(17),se(1)})(A.width,A.height),(function(){fe(65476),fe(418),se(0);for(var Xe=0;Xe<16;Xe++)se(H[Xe+1]);for(var Oe=0;Oe<=11;Oe++)se(D[Oe]);se(16);for(var kt=0;kt<16;kt++)se(G[kt+1]);for(var vt=0;vt<=161;vt++)se(S[vt]);se(1);for(var rt=0;rt<16;rt++)se(P[rt+1]);for(var bt=0;bt<=11;bt++)se(B[bt]);se(17);for(var mt=0;mt<16;mt++)se(U[mt+1]);for(var Re=0;Re<=161;Re++)se(re[Re])})(),fe(65498),fe(12),se(3),se(1),se(0),se(2),se(17),se(3),se(17),se(0),se(63),se(0);var W=0,$=0,X=0;C=0,y=7,this.encode.displayName="_encode_";for(var ie,ue,he,me,Se,Te,Ce,Fe,F,Ne=A.data,et=A.width,Ve=A.height,ke=4*et,Ke=0;Ke<Ve;){for(ie=0;ie<ke;){for(Se=ke*Ke+ie,Ce=-1,Fe=0,F=0;F<64;F++)Te=Se+(Fe=F>>3)*ke+(Ce=4*(7&F)),Ke+Fe>=Ve&&(Te-=ke*(Ke+1+Fe-Ve)),ie+Ce>=ke&&(Te-=ie+Ce-ke+4),ue=Ne[Te++],he=Ne[Te++],me=Ne[Te++],V[F]=(ae[ue]+ae[he+256|0]+ae[me+512|0]>>16)-128,q[F]=(ae[ue+768|0]+ae[he+1024|0]+ae[me+1280|0]>>16)-128,E[F]=(ae[ue+1280|0]+ae[he+1536|0]+ae[me+1792|0]>>16)-128;W=we(V,d,W,e,r),$=we(q,h,$,t,i),X=we(E,h,X,t,i),ie+=32}Ke+=8}if(y>=0){var Ee=[];Ee[1]=y+1,Ee[0]=(1<<y+1)-1,de(Ee)}return fe(65497),new Uint8Array(k)},n=n||50,(function(){for(var A=String.fromCharCode,I=0;I<256;I++)K[I]=A(I)})(),e=Q(H,D),t=Q(P,B),r=Q(G,S),i=Q(U,re),(function(){for(var A=1,I=2,W=1;W<=15;W++){for(var $=A;$<I;$++)x[32767+$]=W,b[32767+$]=[],b[32767+$][1]=W,b[32767+$][0]=$;for(var X=-(I-1);X<=-A;X++)x[32767+X]=W,b[32767+X]=[],b[32767+X][1]=W,b[32767+X][0]=I-1+X;A<<=1,I<<=1}})(),(function(){for(var A=0;A<256;A++)ae[A]=19595*A,ae[A+256|0]=38470*A,ae[A+512|0]=7471*A+32768,ae[A+768|0]=-11059*A,ae[A+1024|0]=-21709*A,ae[A+1280|0]=32768*A+8421375,ae[A+1536|0]=-27439*A,ae[A+1792|0]=-5329*A})(),te(n)}function Rr(n,e){if(this.pos=0,this.buffer=n,this.datav=new DataView(n.buffer),this.is_with_alpha=!!e,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,["BM","BA","CI","CP","IC","PT"].indexOf(this.flag)===-1)throw new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function Wd(n){function e(D){if(!D)throw Error("assert :P")}function t(D,G,S){for(var P=0;4>P;P++)if(D[G+P]!=S.charCodeAt(P))return!0;return!1}function r(D,G,S,P,B){for(var U=0;U<B;U++)D[G+U]=S[P+U]}function i(D,G,S,P){for(var B=0;B<P;B++)D[G+B]=S}function a(D){return new Int32Array(D)}function l(D,G){for(var S=[],P=0;P<D;P++)S.push(new G);return S}function o(D,G){var S=[];return(function P(B,U,re){for(var Q=re[U],de=0;de<Q&&(B.push(re.length>U+1?[]:new G),!(re.length<U+1));de++)P(B[de],U+1,re)})(S,0,D),S}var u=function(){var D=this;function G(s,c){for(var g=1<<c-1>>>0;s&g;)g>>>=1;return g?(s&g-1)+g:s}function S(s,c,g,v,_){e(!(v%g));do s[c+(v-=g)]=_;while(0<v)}function P(s,c,g,v,_){if(e(2328>=_),512>=_)var j=a(512);else if((j=a(_))==null)return 0;return(function(N,T,M,R,Z,ce){var z,ee,oe=T,ge=1<<M,le=a(16),ve=a(16);for(e(Z!=0),e(R!=null),e(N!=null),e(0<M),ee=0;ee<Z;++ee){if(15<R[ee])return 0;++le[R[ee]]}if(le[0]==Z)return 0;for(ve[1]=0,z=1;15>z;++z){if(le[z]>1<<z)return 0;ve[z+1]=ve[z]+le[z]}for(ee=0;ee<Z;++ee)z=R[ee],0<R[ee]&&(ce[ve[z]++]=ee);if(ve[15]==1)return(R=new B).g=0,R.value=ce[0],S(N,oe,1,ge,R),ge;var ye,Le=-1,Ae=ge-1,$e=0,De=1,pt=1,qe=1<<M;for(ee=0,z=1,Z=2;z<=M;++z,Z<<=1){if(De+=pt<<=1,0>(pt-=le[z]))return 0;for(;0<le[z];--le[z])(R=new B).g=z,R.value=ce[ee++],S(N,oe+$e,Z,qe,R),$e=G($e,z)}for(z=M+1,Z=2;15>=z;++z,Z<<=1){if(De+=pt<<=1,0>(pt-=le[z]))return 0;for(;0<le[z];--le[z]){if(R=new B,($e&Ae)!=Le){for(oe+=qe,ye=1<<(Le=z)-M;15>Le&&!(0>=(ye-=le[Le]));)++Le,ye<<=1;ge+=qe=1<<(ye=Le-M),N[T+(Le=$e&Ae)].g=ye+M,N[T+Le].value=oe-T-Le}R.g=z-M,R.value=ce[ee++],S(N,oe+($e>>M),Z,qe,R),$e=G($e,z)}}return De!=2*ve[15]-1?0:ge})(s,c,g,v,_,j)}function B(){this.value=this.g=0}function U(){this.value=this.g=0}function re(){this.G=l(5,B),this.H=a(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=l(Oa,U)}function Q(s,c,g,v){e(s!=null),e(c!=null),e(2147483648>v),s.Ca=254,s.I=0,s.b=-8,s.Ka=0,s.oa=c,s.pa=g,s.Jd=c,s.Yc=g+v,s.Zc=4<=v?g+v-4+1:g,ue(s)}function de(s,c){for(var g=0;0<c--;)g|=me(s,128)<<c;return g}function se(s,c){var g=de(s,c);return he(s)?-g:g}function fe(s,c,g,v){var _,j=0;for(e(s!=null),e(c!=null),e(4294967288>v),s.Sb=v,s.Ra=0,s.u=0,s.h=0,4<v&&(v=4),_=0;_<v;++_)j+=c[g+_]<<8*_;s.Ra=j,s.bb=v,s.oa=c,s.pa=g}function we(s){for(;8<=s.u&&s.bb<s.Sb;)s.Ra>>>=8,s.Ra+=s.oa[s.pa+s.bb]<<Gn-8>>>0,++s.bb,s.u-=8;$(s)&&(s.h=1,s.u=0)}function te(s,c){if(e(0<=c),!s.h&&c<=ms){var g=W(s)&ra[c];return s.u+=c,we(s),g}return s.h=1,s.u=0}function A(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function I(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function W(s){return s.Ra>>>(s.u&Gn-1)>>>0}function $(s){return e(s.bb<=s.Sb),s.h||s.bb==s.Sb&&s.u>Gn}function X(s,c){s.u=c,s.h=$(s)}function ie(s){s.u>=rr&&(e(s.u>=rr),we(s))}function ue(s){e(s!=null&&s.oa!=null),s.pa<s.Zc?(s.I=(s.oa[s.pa++]|s.I<<8)>>>0,s.b+=8):(e(s!=null&&s.oa!=null),s.pa<s.Yc?(s.b+=8,s.I=s.oa[s.pa++]|s.I<<8):s.Ka?s.b=0:(s.I<<=8,s.b+=8,s.Ka=1))}function he(s){return de(s,1)}function me(s,c){var g=s.Ca;0>s.b&&ue(s);var v=s.b,_=g*c>>>8,j=(s.I>>>v>_)+0;for(j?(g-=_,s.I-=_+1<<v>>>0):g=_+1,v=g,_=0;256<=v;)_+=8,v>>=8;return v=7^_+Ba[v],s.b-=v,s.Ca=(g<<v)-1,j}function Se(s,c,g){s[c+0]=g>>24&255,s[c+1]=g>>16&255,s[c+2]=g>>8&255,s[c+3]=255&g}function Te(s,c){return s[c+0]|s[c+1]<<8}function Ce(s,c){return Te(s,c)|s[c+2]<<16}function Fe(s,c){return Te(s,c)|Te(s,c+2)<<16}function F(s,c){var g=1<<c;return e(s!=null),e(0<c),s.X=a(g),s.X==null?0:(s.Mb=32-c,s.Xa=c,1)}function Ne(s,c){e(s!=null),e(c!=null),e(s.Xa==c.Xa),r(c.X,0,s.X,0,1<<c.Xa)}function et(){this.X=[],this.Xa=this.Mb=0}function Ve(s,c,g,v){e(g!=null),e(v!=null);var _=g[0],j=v[0];return _==0&&(_=(s*j+c/2)/c),j==0&&(j=(c*_+s/2)/s),0>=_||0>=j?0:(g[0]=_,v[0]=j,1)}function ke(s,c){return s+(1<<c)-1>>>c}function Ke(s,c){return((4278255360&s)+(4278255360&c)>>>0&4278255360)+((16711935&s)+(16711935&c)>>>0&16711935)>>>0}function Ee(s,c){D[c]=function(g,v,_,j,N,T,M){var R;for(R=0;R<N;++R){var Z=D[s](T[M+R-1],_,j+R);T[M+R]=Ke(g[v+R],Z)}}}function Xe(){this.ud=this.hd=this.jd=0}function Oe(s,c){return((4278124286&(s^c))>>>1)+(s&c)>>>0}function kt(s){return 0<=s&&256>s?s:0>s?0:255<s?255:void 0}function vt(s,c){return kt(s+(s-c+.5>>1))}function rt(s,c,g){return Math.abs(c-g)-Math.abs(s-g)}function bt(s,c,g,v,_,j,N){for(v=j[N-1],g=0;g<_;++g)j[N+g]=v=Ke(s[c+g],v)}function mt(s,c,g,v,_){var j;for(j=0;j<g;++j){var N=s[c+j],T=N>>8&255,M=16711935&(M=(M=16711935&N)+((T<<16)+T));v[_+j]=(4278255360&N)+M>>>0}}function Re(s,c){c.jd=255&s,c.hd=s>>8&255,c.ud=s>>16&255}function at(s,c,g,v,_,j){var N;for(N=0;N<v;++N){var T=c[g+N],M=T>>>8,R=T,Z=255&(Z=(Z=T>>>16)+((s.jd<<24>>24)*(M<<24>>24)>>>5));R=255&(R=(R+=(s.hd<<24>>24)*(M<<24>>24)>>>5)+((s.ud<<24>>24)*(Z<<24>>24)>>>5)),_[j+N]=(4278255360&T)+(Z<<16)+R}}function We(s,c,g,v,_){D[c]=function(j,N,T,M,R,Z,ce,z,ee){for(M=ce;M<z;++M)for(ce=0;ce<ee;++ce)R[Z++]=_(T[v(j[N++])])},D[s]=function(j,N,T,M,R,Z,ce){var z=8>>j.b,ee=j.Ea,oe=j.K[0],ge=j.w;if(8>z)for(j=(1<<j.b)-1,ge=(1<<z)-1;N<T;++N){var le,ve=0;for(le=0;le<ee;++le)le&j||(ve=v(M[R++])),Z[ce++]=_(oe[ve&ge]),ve>>=z}else D["VP8LMapColor"+g](M,R,oe,ge,Z,ce,N,T,ee)}}function nn(s,c,g,v,_){for(g=c+g;c<g;){var j=s[c++];v[_++]=j>>16&255,v[_++]=j>>8&255,v[_++]=255&j}}function xt(s,c,g,v,_){for(g=c+g;c<g;){var j=s[c++];v[_++]=j>>16&255,v[_++]=j>>8&255,v[_++]=255&j,v[_++]=j>>24&255}}function ut(s,c,g,v,_){for(g=c+g;c<g;){var j=(N=s[c++])>>16&240|N>>12&15,N=240&N|N>>28&15;v[_++]=j,v[_++]=N}}function ot(s,c,g,v,_){for(g=c+g;c<g;){var j=(N=s[c++])>>16&248|N>>13&7,N=N>>5&224|N>>3&31;v[_++]=j,v[_++]=N}}function Dt(s,c,g,v,_){for(g=c+g;c<g;){var j=s[c++];v[_++]=255&j,v[_++]=j>>8&255,v[_++]=j>>16&255}}function ze(s,c,g,v,_,j){if(j==0)for(g=c+g;c<g;)Se(v,((j=s[c++])[0]>>24|j[1]>>8&65280|j[2]<<8&16711680|j[3]<<24)>>>0),_+=32;else r(v,_,s,c,g)}function Tt(s,c){D[c][0]=D[s+"0"],D[c][1]=D[s+"1"],D[c][2]=D[s+"2"],D[c][3]=D[s+"3"],D[c][4]=D[s+"4"],D[c][5]=D[s+"5"],D[c][6]=D[s+"6"],D[c][7]=D[s+"7"],D[c][8]=D[s+"8"],D[c][9]=D[s+"9"],D[c][10]=D[s+"10"],D[c][11]=D[s+"11"],D[c][12]=D[s+"12"],D[c][13]=D[s+"13"],D[c][14]=D[s+"0"],D[c][15]=D[s+"0"]}function Ze(s){return s==vl||s==bl||s==po||s==yl}function Je(){this.eb=[],this.size=this.A=this.fb=0}function Vt(){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 dt(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new Je,this.f.kb=new Vt,this.sd=null}function Ye(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function Lt(){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 Wr(s){return alert("todo:WebPSamplerProcessPlane"),s.T}function fn(s,c){var g=s.T,v=c.ba.f.RGBA,_=v.eb,j=v.fb+s.ka*v.A,N=Cr[c.ba.S],T=s.y,M=s.O,R=s.f,Z=s.N,ce=s.ea,z=s.W,ee=c.cc,oe=c.dc,ge=c.Mc,le=c.Nc,ve=s.ka,ye=s.ka+s.T,Le=s.U,Ae=Le+1>>1;for(ve==0?N(T,M,null,null,R,Z,ce,z,R,Z,ce,z,_,j,null,null,Le):(N(c.ec,c.fc,T,M,ee,oe,ge,le,R,Z,ce,z,_,j-v.A,_,j,Le),++g);ve+2<ye;ve+=2)ee=R,oe=Z,ge=ce,le=z,Z+=s.Rc,z+=s.Rc,j+=2*v.A,N(T,(M+=2*s.fa)-s.fa,T,M,ee,oe,ge,le,R,Z,ce,z,_,j-v.A,_,j,Le);return M+=s.fa,s.j+ye<s.o?(r(c.ec,c.fc,T,M,Le),r(c.cc,c.dc,R,Z,Ae),r(c.Mc,c.Nc,ce,z,Ae),g--):1&ye||N(T,M,null,null,R,Z,ce,z,R,Z,ce,z,_,j+v.A,null,null,Le),g}function Sr(s,c,g){var v=s.F,_=[s.J];if(v!=null){var j=s.U,N=c.ba.S,T=N==fo||N==po;c=c.ba.f.RGBA;var M=[0],R=s.ka;M[0]=s.T,s.Kb&&(R==0?--M[0]:(--R,_[0]-=s.width),s.j+s.ka+s.T==s.o&&(M[0]=s.o-s.j-R));var Z=c.eb;R=c.fb+R*c.A,s=Fc(v,_[0],s.width,j,M,Z,R+(T?0:3),c.A),e(g==M),s&&Ze(N)&&xs(Z,R,T,j,M,c.A)}return 0}function cr(s){var c=s.ma,g=c.ba.S,v=11>g,_=g==uo||g==ho||g==fo||g==ml||g==12||Ze(g);if(c.memory=null,c.Ib=null,c.Jb=null,c.Nd=null,!jr(c.Oa,s,_?11:12))return 0;if(_&&Ze(g)&&ui(),s.da)alert("todo:use_scaling");else{if(v){if(c.Ib=Wr,s.Kb){if(g=s.U+1>>1,c.memory=a(s.U+2*g),c.memory==null)return 0;c.ec=c.memory,c.fc=0,c.cc=c.ec,c.dc=c.fc+s.U,c.Mc=c.cc,c.Nc=c.dc+g,c.Ib=fn,ui()}}else alert("todo:EmitYUV");_&&(c.Jb=Sr,v&&sn())}if(v&&!Jc){for(s=0;256>s;++s)Kf[s]=89858*(s-128)+mo>>go,Jf[s]=-22014*(s-128)+mo,Zf[s]=-45773*(s-128),Xf[s]=113618*(s-128)+mo>>go;for(s=_s;s<_l;++s)c=76283*(s-16)+mo>>go,Qf[s-_s]=hr(c,255),e1[s-_s]=hr(c+8>>4,15);Jc=1}return 1}function Qe(s){var c=s.ma,g=s.U,v=s.T;return e(!(1&s.ka)),0>=g||0>=v?0:(g=c.Ib(s,c),c.Jb!=null&&c.Jb(s,c,g),c.Dc+=g,1)}function Dr(s){s.ma.memory=null}function Ar(s,c,g,v){return te(s,8)!=47?0:(c[0]=te(s,14)+1,g[0]=te(s,14)+1,v[0]=te(s,1),te(s,3)!=0?0:!s.h)}function Zn(s,c){if(4>s)return s+1;var g=s-2>>1;return(2+(1&s)<<g)+te(c,g)+1}function Vn(s,c){return 120<c?c-120:1<=(g=((g=If[c-1])>>4)*s+(8-(15&g)))?g:1;var g}function Xt(s,c,g){var v=W(g),_=s[c+=255&v].g-8;return 0<_&&(X(g,g.u+8),v=W(g),c+=s[c].value,c+=v&(1<<_)-1),X(g,g.u+s[c].g),s[c].value}function Et(s,c,g){return g.g+=s.g,g.value+=s.value<<c>>>0,e(8>=g.g),s.g}function on(s,c,g){var v=s.xc;return e((c=v==0?0:s.vc[s.md*(g>>v)+(c>>v)])<s.Wb),s.Ya[c]}function Hr(s,c,g,v){var _=s.ab,j=s.c*c,N=s.C;c=N+c;var T=g,M=v;for(v=s.Ta,g=s.Ua;0<_--;){var R=s.gc[_],Z=N,ce=c,z=T,ee=M,oe=(M=v,T=g,R.Ea);switch(e(Z<ce),e(ce<=R.nc),R.hc){case 2:Ra(z,ee,(ce-Z)*oe,M,T);break;case 0:var ge=Z,le=ce,ve=M,ye=T,Le=(qe=R).Ea;ge==0&&(Ni(z,ee,null,null,1,ve,ye),bt(z,ee+1,0,0,Le-1,ve,ye+1),ee+=Le,ye+=Le,++ge);for(var Ae=1<<qe.b,$e=Ae-1,De=ke(Le,qe.b),pt=qe.K,qe=qe.w+(ge>>qe.b)*De;ge<le;){var wt=pt,An=qe,gt=1;for(Ci(z,ee,ve,ye-Le,1,ve,ye);gt<Le;){var Ue=(gt&~$e)+Ae;Ue>Le&&(Ue=Le),(0,Ir[wt[An++]>>8&15])(z,ee+ +gt,ve,ye+gt-Le,Ue-gt,ve,ye+gt),gt=Ue}ee+=Le,ye+=Le,++ge&$e||(qe+=De)}ce!=R.nc&&r(M,T-oe,M,T+(ce-Z-1)*oe,oe);break;case 1:for(oe=z,le=ee,Le=(z=R.Ea)-(ye=z&~(ve=(ee=1<<R.b)-1)),ge=ke(z,R.b),Ae=R.K,R=R.w+(Z>>R.b)*ge;Z<ce;){for($e=Ae,De=R,pt=new Xe,qe=le+ye,wt=le+z;le<qe;)Re($e[De++],pt),aa(pt,oe,le,ee,M,T),le+=ee,T+=ee;le<wt&&(Re($e[De++],pt),aa(pt,oe,le,Le,M,T),le+=Le,T+=Le),++Z&ve||(R+=ge)}break;case 3:if(z==M&&ee==T&&0<R.b){for(le=M,z=oe=T+(ce-Z)*oe-(ye=(ce-Z)*ke(R.Ea,R.b)),ee=M,ve=T,ge=[],ye=(Le=ye)-1;0<=ye;--ye)ge[ye]=ee[ve+ye];for(ye=Le-1;0<=ye;--ye)le[z+ye]=ge[ye];ia(R,Z,ce,M,oe,M,T)}else ia(R,Z,ce,z,ee,M,T)}T=v,M=g}M!=g&&r(v,g,T,M,j)}function Wn(s,c){var g=s.V,v=s.Ba+s.c*s.C,_=c-s.C;if(e(c<=s.l.o),e(16>=_),0<_){var j=s.l,N=s.Ta,T=s.Ua,M=j.width;if(Hr(s,_,g,v),_=T=[T],e((g=s.C)<(v=c)),e(j.v<j.va),v>j.o&&(v=j.o),g<j.j){var R=j.j-g;g=j.j,_[0]+=R*M}if(g>=v?g=0:(_[0]+=4*j.v,j.ka=g-j.j,j.U=j.va-j.v,j.T=v-g,g=1),g){if(T=T[0],11>(g=s.ca).S){var Z=g.f.RGBA,ce=(v=g.S,_=j.U,j=j.T,R=Z.eb,Z.A),z=j;for(Z=Z.fb+s.Ma*Z.A;0<z--;){var ee=N,oe=T,ge=_,le=R,ve=Z;switch(v){case co:vs(ee,oe,ge,le,ve);break;case uo:bs(ee,oe,ge,le,ve);break;case vl:bs(ee,oe,ge,le,ve),xs(le,ve,0,ge,1,0);break;case Vc:oa(ee,oe,ge,le,ve);break;case ho:ze(ee,oe,ge,le,ve,1);break;case bl:ze(ee,oe,ge,le,ve,1),xs(le,ve,0,ge,1,0);break;case fo:ze(ee,oe,ge,le,ve,0);break;case po:ze(ee,oe,ge,le,ve,0),xs(le,ve,1,ge,1,0);break;case ml:za(ee,oe,ge,le,ve);break;case yl:za(ee,oe,ge,le,ve),Ic(le,ve,ge,1,0);break;case Wc:sa(ee,oe,ge,le,ve);break;default:e(0)}T+=M,Z+=ce}s.Ma+=j}else alert("todo:EmitRescaledRowsYUVA");e(s.Ma<=g.height)}}s.C=c,e(s.C<=s.i)}function Jn(s){var c;if(0<s.ua)return 0;for(c=0;c<s.Wb;++c){var g=s.Ya[c].G,v=s.Ya[c].H;if(0<g[1][v[1]+0].g||0<g[2][v[2]+0].g||0<g[3][v[3]+0].g)return 0}return 1}function Qn(s,c,g,v,_,j){if(s.Z!=0){var N=s.qd,T=s.rd;for(e(Di[s.Z]!=null);c<g;++c)Di[s.Z](N,T,v,_,v,_,j),N=v,T=_,_+=j;s.qd=N,s.rd=T}}function er(s,c){var g=s.l.ma,v=g.Z==0||g.Z==1?s.l.j:s.C;if(v=s.C<v?v:s.C,e(c<=s.l.o),c>v){var _=s.l.width,j=g.ca,N=g.tb+_*v,T=s.V,M=s.Ba+s.c*v,R=s.gc;e(s.ab==1),e(R[0].hc==3),pl(R[0],v,c,T,M,j,N),Qn(g,v,c,j,N,_)}s.C=s.Ma=c}function Dn(s,c,g,v,_,j,N){var T=s.$/v,M=s.$%v,R=s.m,Z=s.s,ce=g+s.$,z=ce;_=g+v*_;var ee=g+v*j,oe=280+Z.ua,ge=s.Pb?T:16777216,le=0<Z.ua?Z.Wa:null,ve=Z.wc,ye=ce<ee?on(Z,M,T):null;e(s.C<j),e(ee<=_);var Le=!1;e:for(;;){for(;Le||ce<ee;){var Ae=0;if(T>=ge){var $e=ce-g;e((ge=s).Pb),ge.wd=ge.m,ge.xd=$e,0<ge.s.ua&&Ne(ge.s.Wa,ge.s.vb),ge=T+Of}if(M&ve||(ye=on(Z,M,T)),e(ye!=null),ye.Qb&&(c[ce]=ye.qb,Le=!0),!Le)if(ie(R),ye.jc){Ae=R,$e=c;var De=ce,pt=ye.pd[W(Ae)&Oa-1];e(ye.jc),256>pt.g?(X(Ae,Ae.u+pt.g),$e[De]=pt.value,Ae=0):(X(Ae,Ae.u+pt.g-256),e(256<=pt.value),Ae=pt.value),Ae==0&&(Le=!0)}else Ae=Xt(ye.G[0],ye.H[0],R);if(R.h)break;if(Le||256>Ae){if(!Le)if(ye.nd)c[ce]=(ye.qb|Ae<<8)>>>0;else{if(ie(R),Le=Xt(ye.G[1],ye.H[1],R),ie(R),$e=Xt(ye.G[2],ye.H[2],R),De=Xt(ye.G[3],ye.H[3],R),R.h)break;c[ce]=(De<<24|Le<<16|Ae<<8|$e)>>>0}if(Le=!1,++ce,++M>=v&&(M=0,++T,N!=null&&T<=j&&!(T%16)&&N(s,T),le!=null))for(;z<ce;)Ae=c[z++],le.X[(506832829*Ae&4294967295)>>>le.Mb]=Ae}else if(280>Ae){if(Ae=Zn(Ae-256,R),$e=Xt(ye.G[4],ye.H[4],R),ie(R),$e=Vn(v,$e=Zn($e,R)),R.h)break;if(ce-g<$e||_-ce<Ae)break e;for(De=0;De<Ae;++De)c[ce+De]=c[ce+De-$e];for(ce+=Ae,M+=Ae;M>=v;)M-=v,++T,N!=null&&T<=j&&!(T%16)&&N(s,T);if(e(ce<=_),M&ve&&(ye=on(Z,M,T)),le!=null)for(;z<ce;)Ae=c[z++],le.X[(506832829*Ae&4294967295)>>>le.Mb]=Ae}else{if(!(Ae<oe))break e;for(Le=Ae-280,e(le!=null);z<ce;)Ae=c[z++],le.X[(506832829*Ae&4294967295)>>>le.Mb]=Ae;Ae=ce,e(!(Le>>>($e=le).Xa)),c[Ae]=$e.X[Le],Le=!0}Le||e(R.h==$(R))}if(s.Pb&&R.h&&ce<_)e(s.m.h),s.a=5,s.m=s.wd,s.$=s.xd,0<s.s.ua&&Ne(s.s.vb,s.s.Wa);else{if(R.h)break e;N?.(s,T>j?j:T),s.a=0,s.$=ce-g}return 1}return s.a=3,0}function tr(s){e(s!=null),s.vc=null,s.yc=null,s.Ya=null;var c=s.Wa;c!=null&&(c.X=null),s.vb=null,e(s!=null)}function $r(){var s=new Be;return s==null?null:(s.a=0,s.xb=Gc,Tt("Predictor","VP8LPredictors"),Tt("Predictor","VP8LPredictors_C"),Tt("PredictorAdd","VP8LPredictorsAdd"),Tt("PredictorAdd","VP8LPredictorsAdd_C"),Ra=mt,aa=at,vs=nn,bs=xt,za=ut,sa=ot,oa=Dt,D.VP8LMapColor32b=_n,D.VP8LMapColor8b=Zr,s)}function Hn(s,c,g,v,_){var j=1,N=[s],T=[c],M=v.m,R=v.s,Z=null,ce=0;e:for(;;){if(g)for(;j&&te(M,1);){var z=N,ee=T,oe=v,ge=1,le=oe.m,ve=oe.gc[oe.ab],ye=te(le,2);if(oe.Oc&1<<ye)j=0;else{switch(oe.Oc|=1<<ye,ve.hc=ye,ve.Ea=z[0],ve.nc=ee[0],ve.K=[null],++oe.ab,e(4>=oe.ab),ye){case 0:case 1:ve.b=te(le,3)+2,ge=Hn(ke(ve.Ea,ve.b),ke(ve.nc,ve.b),0,oe,ve.K),ve.K=ve.K[0];break;case 3:var Le,Ae=te(le,8)+1,$e=16<Ae?0:4<Ae?1:2<Ae?2:3;if(z[0]=ke(ve.Ea,$e),ve.b=$e,Le=ge=Hn(Ae,1,0,oe,ve.K)){var De,pt=Ae,qe=ve,wt=1<<(8>>qe.b),An=a(wt);if(An==null)Le=0;else{var gt=qe.K[0],Ue=qe.w;for(An[0]=qe.K[0][0],De=1;De<1*pt;++De)An[De]=Ke(gt[Ue+De],An[De-1]);for(;De<4*wt;++De)An[De]=0;qe.K[0]=null,qe.K[0]=An,Le=1}}ge=Le;break;case 2:break;default:e(0)}j=ge}}if(N=N[0],T=T[0],j&&te(M,1)&&!(j=1<=(ce=te(M,4))&&11>=ce)){v.a=3;break e}var Pe;if(Pe=j)t:{var gn,ct,At,Jt=v,Cn=N,Yn=T,cn=ce,Bn=g,Kn=Jt.m,kn=Jt.s,Nt=[null],Mt=1,un=0,It=Ff[cn];n:for(;;){if(Bn&&te(Kn,1)){var Pn=te(Kn,3)+2,Or=ke(Cn,Pn),mn=ke(Yn,Pn),ir=Or*mn;if(!Hn(Or,mn,0,Jt,Nt))break n;for(Nt=Nt[0],kn.xc=Pn,gn=0;gn<ir;++gn){var zt=Nt[gn]>>8&65535;Nt[gn]=zt,zt>=Mt&&(Mt=zt+1)}}if(Kn.h)break n;for(ct=0;5>ct;++ct){var Ln=Hc[ct];!ct&&0<cn&&(Ln+=1<<cn),un<Ln&&(un=Ln)}var pr=l(Mt*It,B),Xn=Mt,gr=l(Xn,re);if(gr==null)var mr=null;else e(65536>=Xn),mr=gr;var ar=a(un);if(mr==null||ar==null||pr==null){Jt.a=1;break n}var vr=pr;for(gn=At=0;gn<Mt;++gn){var $t=mr[gn],br=$t.G,Br=$t.H,la=0,pi=1,Tn=0;for(ct=0;5>ct;++ct){Ln=Hc[ct],br[ct]=vr,Br[ct]=At,!ct&&0<cn&&(Ln+=1<<cn);i:{var bo,Sl=Ln,yo=Jt,Ss=ar,r1=vr,i1=At,Al=0,Mi=yo.m,a1=te(Mi,1);if(i(Ss,0,0,Sl),a1){var s1=te(Mi,1)+1,o1=te(Mi,1),tu=te(Mi,o1==0?1:8);Ss[tu]=1,s1==2&&(Ss[tu=te(Mi,8)]=1);var xo=1}else{var nu=a(19),ru=te(Mi,4)+4;if(19<ru){yo.a=3;var wo=0;break i}for(bo=0;bo<ru;++bo)nu[Mf[bo]]=te(Mi,3);var kl=void 0,As=void 0,iu=yo,l1=nu,_o=Sl,au=Ss,Ll=0,Ii=iu.m,su=8,ou=l(128,B);r:for(;P(ou,0,7,l1,19);){if(te(Ii,1)){var c1=2+2*te(Ii,3);if((kl=2+te(Ii,c1))>_o)break r}else kl=_o;for(As=0;As<_o&&kl--;){ie(Ii);var lu=ou[0+(127&W(Ii))];X(Ii,Ii.u+lu.g);var Va=lu.value;if(16>Va)au[As++]=Va,Va!=0&&(su=Va);else{var u1=Va==16,cu=Va-16,d1=Ef[cu],uu=te(Ii,Tf[cu])+d1;if(As+uu>_o)break r;for(var h1=u1?su:0;0<uu--;)au[As++]=h1}}Ll=1;break r}Ll||(iu.a=3),xo=Ll}(xo=xo&&!Mi.h)&&(Al=P(r1,i1,8,Ss,Sl)),xo&&Al!=0?wo=Al:(yo.a=3,wo=0)}if(wo==0)break n;if(pi&&Df[ct]==1&&(pi=vr[At].g==0),la+=vr[At].g,At+=wo,3>=ct){var ks,jl=ar[0];for(ks=1;ks<Ln;++ks)ar[ks]>jl&&(jl=ar[ks]);Tn+=jl}}if($t.nd=pi,$t.Qb=0,pi&&($t.qb=(br[3][Br[3]+0].value<<24|br[1][Br[1]+0].value<<16|br[2][Br[2]+0].value)>>>0,la==0&&256>br[0][Br[0]+0].value&&($t.Qb=1,$t.qb+=br[0][Br[0]+0].value<<8)),$t.jc=!$t.Qb&&6>Tn,$t.jc){var So,gi=$t;for(So=0;So<Oa;++So){var Fi=So,Oi=gi.pd[Fi],Ao=gi.G[0][gi.H[0]+Fi];256<=Ao.value?(Oi.g=Ao.g+256,Oi.value=Ao.value):(Oi.g=0,Oi.value=0,Fi>>=Et(Ao,8,Oi),Fi>>=Et(gi.G[1][gi.H[1]+Fi],16,Oi),Fi>>=Et(gi.G[2][gi.H[2]+Fi],0,Oi),Et(gi.G[3][gi.H[3]+Fi],24,Oi))}}}kn.vc=Nt,kn.Wb=Mt,kn.Ya=mr,kn.yc=pr,Pe=1;break t}Pe=0}if(!(j=Pe)){v.a=3;break e}if(0<ce){if(R.ua=1<<ce,!F(R.Wa,ce)){v.a=1,j=0;break e}}else R.ua=0;var Nl=v,du=N,f1=T,Cl=Nl.s,Pl=Cl.xc;if(Nl.c=du,Nl.i=f1,Cl.md=ke(du,Pl),Cl.wc=Pl==0?-1:(1<<Pl)-1,g){v.xb=Wf;break e}if((Z=a(N*T))==null){v.a=1,j=0;break e}j=(j=Dn(v,Z,0,N,T,T,null))&&!M.h;break e}return j?(_!=null?_[0]=Z:(e(Z==null),e(g)),v.$=0,g||tr(R)):tr(R),j}function Gr(s,c){var g=s.c*s.i,v=g+c+16*c;return e(s.c<=c),s.V=a(v),s.V==null?(s.Ta=null,s.Ua=0,s.a=1,0):(s.Ta=s.V,s.Ua=s.Ba+g+c,1)}function Mn(s,c){var g=s.C,v=c-g,_=s.V,j=s.Ba+s.c*g;for(e(c<=s.l.o);0<v;){var N=16<v?16:v,T=s.l.ma,M=s.l.width,R=M*N,Z=T.ca,ce=T.tb+M*g,z=s.Ta,ee=s.Ua;Hr(s,N,_,j),Oc(z,ee,Z,ce,R),Qn(T,g,g+N,Z,ce,M),v-=N,_+=N*s.c,g+=N}e(g==c),s.C=s.Ma=c}function ur(){this.ub=this.yd=this.td=this.Rb=0}function ii(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function dr(){this.Fb=this.Bb=this.Cb=0,this.Zb=a(4),this.Lb=a(4)}function ai(){this.Yb=(function(){var s=[];return(function c(g,v,_){for(var j=_[v],N=0;N<j&&(g.push(_.length>v+1?[]:0),!(_.length<v+1));N++)c(g[N],v+1,_)})(s,0,[3,11]),s})()}function $i(){this.jb=a(3),this.Wc=o([4,8],ai),this.Xc=o([4,17],ai)}function nr(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new a(4),this.od=new a(4)}function jn(){this.ld=this.La=this.dd=this.tc=0}function _i(){this.Na=this.la=0}function Gi(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function kr(){this.ad=a(384),this.Za=0,this.Ob=a(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function Aa(){this.uc=this.M=this.Nb=0,this.wa=Array(new jn),this.Y=0,this.ya=Array(new kr),this.aa=0,this.l=new Si}function ka(){this.y=a(16),this.f=a(8),this.ea=a(8)}function La(){this.cb=this.a=0,this.sc="",this.m=new A,this.Od=new ur,this.Kc=new ii,this.ed=new nr,this.Qa=new dr,this.Ic=this.$c=this.Aa=0,this.D=new Aa,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=l(8,A),this.ia=0,this.pb=l(4,Gi),this.Pa=new $i,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new ka),this.Hd=0,this.rb=Array(new _i),this.sb=0,this.wa=Array(new jn),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 kr),this.L=this.aa=0,this.gd=o([4,2],jn),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 hr(s,c){return 0>s?0:s>c?c:s}function Si(){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 ss(){var s=new La;return s!=null&&(s.a=0,s.sc="OK",s.cb=0,s.Xb=0,ws||(ws=ht)),s}function ln(s,c,g){return s.a==0&&(s.a=c,s.sc=g,s.cb=0),0}function ja(s,c,g){return 3<=g&&s[c+0]==157&&s[c+1]==1&&s[c+2]==42}function Lr(s,c){if(s==null)return 0;if(s.a=0,s.sc="OK",c==null)return ln(s,2,"null VP8Io passed to VP8GetHeaders()");var g=c.data,v=c.w,_=c.ha;if(4>_)return ln(s,7,"Truncated header.");var j=g[v+0]|g[v+1]<<8|g[v+2]<<16,N=s.Od;if(N.Rb=!(1&j),N.td=j>>1&7,N.yd=j>>4&1,N.ub=j>>5,3<N.td)return ln(s,3,"Incorrect keyframe parameters.");if(!N.yd)return ln(s,4,"Frame not displayable.");v+=3,_-=3;var T=s.Kc;if(N.Rb){if(7>_)return ln(s,7,"cannot parse picture header");if(!ja(g,v,_))return ln(s,3,"Bad code word");T.c=16383&(g[v+4]<<8|g[v+3]),T.Td=g[v+4]>>6,T.i=16383&(g[v+6]<<8|g[v+5]),T.Ud=g[v+6]>>6,v+=7,_-=7,s.za=T.c+15>>4,s.Ub=T.i+15>>4,c.width=T.c,c.height=T.i,c.Da=0,c.j=0,c.v=0,c.va=c.width,c.o=c.height,c.da=0,c.ib=c.width,c.hb=c.height,c.U=c.width,c.T=c.height,i((j=s.Pa).jb,0,255,j.jb.length),e((j=s.Qa)!=null),j.Cb=0,j.Bb=0,j.Fb=1,i(j.Zb,0,0,j.Zb.length),i(j.Lb,0,0,j.Lb)}if(N.ub>_)return ln(s,7,"bad partition length");Q(j=s.m,g,v,N.ub),v+=N.ub,_-=N.ub,N.Rb&&(T.Ld=he(j),T.Kd=he(j)),T=s.Qa;var M,R=s.Pa;if(e(j!=null),e(T!=null),T.Cb=he(j),T.Cb){if(T.Bb=he(j),he(j)){for(T.Fb=he(j),M=0;4>M;++M)T.Zb[M]=he(j)?se(j,7):0;for(M=0;4>M;++M)T.Lb[M]=he(j)?se(j,6):0}if(T.Bb)for(M=0;3>M;++M)R.jb[M]=he(j)?de(j,8):255}else T.Bb=0;if(j.Ka)return ln(s,3,"cannot parse segment header");if((T=s.ed).zd=he(j),T.Tb=de(j,6),T.wb=de(j,3),T.Pc=he(j),T.Pc&&he(j)){for(R=0;4>R;++R)he(j)&&(T.vd[R]=se(j,6));for(R=0;4>R;++R)he(j)&&(T.od[R]=se(j,6))}if(s.L=T.Tb==0?0:T.zd?1:2,j.Ka)return ln(s,3,"cannot parse filter header");var Z=_;if(_=M=v,v=M+Z,T=Z,s.Xb=(1<<de(s.m,2))-1,Z<3*(R=s.Xb))g=7;else{for(M+=3*R,T-=3*R,Z=0;Z<R;++Z){var ce=g[_+0]|g[_+1]<<8|g[_+2]<<16;ce>T&&(ce=T),Q(s.Jc[+Z],g,M,ce),M+=ce,T-=ce,_+=3}Q(s.Jc[+R],g,M,T),g=M<v?0:5}if(g!=0)return ln(s,g,"cannot parse partitions");for(g=de(M=s.m,7),_=he(M)?se(M,4):0,v=he(M)?se(M,4):0,T=he(M)?se(M,4):0,R=he(M)?se(M,4):0,M=he(M)?se(M,4):0,Z=s.Qa,ce=0;4>ce;++ce){if(Z.Cb){var z=Z.Zb[ce];Z.Fb||(z+=g)}else{if(0<ce){s.pb[ce]=s.pb[0];continue}z=g}var ee=s.pb[ce];ee.Sc[0]=xl[hr(z+_,127)],ee.Sc[1]=wl[hr(z+0,127)],ee.Eb[0]=2*xl[hr(z+v,127)],ee.Eb[1]=101581*wl[hr(z+T,127)]>>16,8>ee.Eb[1]&&(ee.Eb[1]=8),ee.Qc[0]=xl[hr(z+R,117)],ee.Qc[1]=wl[hr(z+M,127)],ee.lc=z+M}if(!N.Rb)return ln(s,4,"Not a key frame.");for(he(j),N=s.Pa,g=0;4>g;++g){for(_=0;8>_;++_)for(v=0;3>v;++v)for(T=0;11>T;++T)R=me(j,Uf[g][_][v][T])?de(j,8):zf[g][_][v][T],N.Wc[g][_].Yb[v][T]=R;for(_=0;17>_;++_)N.Xc[g][_]=N.Wc[g][Vf[_]]}return s.kc=he(j),s.kc&&(s.Bd=de(j,8)),s.cb=1}function ht(s,c,g,v,_,j,N){var T=c[_].Yb[g];for(g=0;16>_;++_){if(!me(s,T[g+0]))return _;for(;!me(s,T[g+1]);)if(T=c[++_].Yb[0],g=0,_==16)return 16;var M=c[_+1].Yb;if(me(s,T[g+2])){var R=s,Z=0;if(me(R,(z=T)[(ce=g)+3]))if(me(R,z[ce+6])){for(T=0,ce=2*(Z=me(R,z[ce+8]))+(z=me(R,z[ce+9+Z])),Z=0,z=Bf[ce];z[T];++T)Z+=Z+me(R,z[T]);Z+=3+(8<<ce)}else me(R,z[ce+7])?(Z=7+2*me(R,165),Z+=me(R,145)):Z=5+me(R,159);else Z=me(R,z[ce+4])?3+me(R,z[ce+5]):2;T=M[2]}else Z=1,T=M[1];M=N+Rf[_],0>(R=s).b&&ue(R);var ce,z=R.b,ee=(ce=R.Ca>>1)-(R.I>>z)>>31;--R.b,R.Ca+=ee,R.Ca|=1,R.I-=(ce+1&ee)<<z,j[M]=((Z^ee)-ee)*v[(0<_)+0]}return 16}function yt(s){var c=s.rb[s.sb-1];c.la=0,c.Na=0,i(s.zc,0,0,s.zc.length),s.ja=0}
vendor: 4,842 bytes, line 57
57function ft(s,c,g,v,_){_=s[c+g+32*v]+(_>>3),s[c+g+32*v]=-256&_?0>_?0:255:_}function jt(s,c,g,v,_,j){ft(s,c,0,g,v+_),ft(s,c,1,g,v+j),ft(s,c,2,g,v-j),ft(s,c,3,g,v-_)}function Pt(s){return(20091*s>>16)+s}function rn(s,c,g,v){var _,j=0,N=a(16);for(_=0;4>_;++_){var T=s[c+0]+s[c+8],M=s[c+0]-s[c+8],R=(35468*s[c+4]>>16)-Pt(s[c+12]),Z=Pt(s[c+4])+(35468*s[c+12]>>16);N[j+0]=T+Z,N[j+1]=M+R,N[j+2]=M-R,N[j+3]=T-Z,j+=4,c++}for(_=j=0;4>_;++_)T=(s=N[j+0]+4)+N[j+8],M=s-N[j+8],R=(35468*N[j+4]>>16)-Pt(N[j+12]),ft(g,v,0,0,T+(Z=Pt(N[j+4])+(35468*N[j+12]>>16))),ft(g,v,1,0,M+R),ft(g,v,2,0,M-R),ft(g,v,3,0,T-Z),j++,v+=32}function Mr(s,c,g,v){var _=s[c+0]+4,j=35468*s[c+4]>>16,N=Pt(s[c+4]),T=35468*s[c+1]>>16;jt(g,v,0,_+N,s=Pt(s[c+1]),T),jt(g,v,1,_+j,s,T),jt(g,v,2,_-j,s,T),jt(g,v,3,_-N,s,T)}function Jo(s,c,g,v,_){rn(s,c,g,v),_&&rn(s,c+16,g,v+4)}function Qo(s,c,g,v){di(s,c+0,g,v,1),di(s,c+32,g,v+128,1)}function el(s,c,g,v){var _;for(s=s[c+0]+4,_=0;4>_;++_)for(c=0;4>c;++c)ft(g,v,c,_,s)}function Yr(s,c,g,v){s[c+0]&&On(s,c+0,g,v),s[c+16]&&On(s,c+16,g,v+4),s[c+32]&&On(s,c+32,g,v+128),s[c+48]&&On(s,c+48,g,v+128+4)}function Js(s,c,g,v){var _,j=a(16);for(_=0;4>_;++_){var N=s[c+0+_]+s[c+12+_],T=s[c+4+_]+s[c+8+_],M=s[c+4+_]-s[c+8+_],R=s[c+0+_]-s[c+12+_];j[0+_]=N+T,j[8+_]=N-T,j[4+_]=R+M,j[12+_]=R-M}for(_=0;4>_;++_)N=(s=j[0+4*_]+3)+j[3+4*_],T=j[1+4*_]+j[2+4*_],M=j[1+4*_]-j[2+4*_],R=s-j[3+4*_],g[v+0]=N+T>>3,g[v+16]=R+M>>3,g[v+32]=N-T>>3,g[v+48]=R-M>>3,v+=64}function Na(s,c,g){var v,_=c-32,j=fr,N=255-s[_-1];for(v=0;v<g;++v){var T,M=j,R=N+s[c-1];for(T=0;T<g;++T)s[c+T]=M[R+s[_+T]];c+=32}}function Ca(s,c){Na(s,c,4)}function os(s,c){Na(s,c,8)}function tl(s,c){Na(s,c,16)}function nl(s,c){var g;for(g=0;16>g;++g)r(s,c+32*g,s,c-32,16)}function rl(s,c){var g;for(g=16;0<g;--g)i(s,c,s[c-1],16),c+=32}function Ai(s,c,g){var v;for(v=0;16>v;++v)i(c,g+32*v,s,16)}function Qs(s,c){var g,v=16;for(g=0;16>g;++g)v+=s[c-1+32*g]+s[c+g-32];Ai(v>>5,s,c)}function ki(s,c){var g,v=8;for(g=0;16>g;++g)v+=s[c-1+32*g];Ai(v>>4,s,c)}function il(s,c){var g,v=8;for(g=0;16>g;++g)v+=s[c+g-32];Ai(v>>4,s,c)}function Yi(s,c){Ai(128,s,c)}function tt(s,c,g){return s+2*c+g+2>>2}function al(s,c){var g,v=c-32;for(v=new Uint8Array([tt(s[v-1],s[v+0],s[v+1]),tt(s[v+0],s[v+1],s[v+2]),tt(s[v+1],s[v+2],s[v+3]),tt(s[v+2],s[v+3],s[v+4])]),g=0;4>g;++g)r(s,c+32*g,v,0,v.length)}function sl(s,c){var g=s[c-1],v=s[c-1+32],_=s[c-1+64],j=s[c-1+96];Se(s,c+0,16843009*tt(s[c-1-32],g,v)),Se(s,c+32,16843009*tt(g,v,_)),Se(s,c+64,16843009*tt(v,_,j)),Se(s,c+96,16843009*tt(_,j,j))}function ol(s,c){var g,v=4;for(g=0;4>g;++g)v+=s[c+g-32]+s[c-1+32*g];for(v>>=3,g=0;4>g;++g)i(s,c+32*g,v,4)}function ll(s,c){var g=s[c-1+0],v=s[c-1+32],_=s[c-1+64],j=s[c-1-32],N=s[c+0-32],T=s[c+1-32],M=s[c+2-32],R=s[c+3-32];s[c+0+96]=tt(v,_,s[c-1+96]),s[c+1+96]=s[c+0+64]=tt(g,v,_),s[c+2+96]=s[c+1+64]=s[c+0+32]=tt(j,g,v),s[c+3+96]=s[c+2+64]=s[c+1+32]=s[c+0+0]=tt(N,j,g),s[c+3+64]=s[c+2+32]=s[c+1+0]=tt(T,N,j),s[c+3+32]=s[c+2+0]=tt(M,T,N),s[c+3+0]=tt(R,M,T)}function cl(s,c){var g=s[c+1-32],v=s[c+2-32],_=s[c+3-32],j=s[c+4-32],N=s[c+5-32],T=s[c+6-32],M=s[c+7-32];s[c+0+0]=tt(s[c+0-32],g,v),s[c+1+0]=s[c+0+32]=tt(g,v,_),s[c+2+0]=s[c+1+32]=s[c+0+64]=tt(v,_,j),s[c+3+0]=s[c+2+32]=s[c+1+64]=s[c+0+96]=tt(_,j,N),s[c+3+32]=s[c+2+64]=s[c+1+96]=tt(j,N,T),s[c+3+64]=s[c+2+96]=tt(N,T,M),s[c+3+96]=tt(T,M,M)}function si(s,c){var g=s[c-1+0],v=s[c-1+32],_=s[c-1+64],j=s[c-1-32],N=s[c+0-32],T=s[c+1-32],M=s[c+2-32],R=s[c+3-32];s[c+0+0]=s[c+1+64]=j+N+1>>1,s[c+1+0]=s[c+2+64]=N+T+1>>1,s[c+2+0]=s[c+3+64]=T+M+1>>1,s[c+3+0]=M+R+1>>1,s[c+0+96]=tt(_,v,g),s[c+0+64]=tt(v,g,j),s[c+0+32]=s[c+1+96]=tt(g,j,N),s[c+1+32]=s[c+2+96]=tt(j,N,T),s[c+2+32]=s[c+3+96]=tt(N,T,M),s[c+3+32]=tt(T,M,R)}function oi(s,c){var g=s[c+0-32],v=s[c+1-32],_=s[c+2-32],j=s[c+3-32],N=s[c+4-32],T=s[c+5-32],M=s[c+6-32],R=s[c+7-32];s[c+0+0]=g+v+1>>1,s[c+1+0]=s[c+0+64]=v+_+1>>1,s[c+2+0]=s[c+1+64]=_+j+1>>1,s[c+3+0]=s[c+2+64]=j+N+1>>1,s[c+0+32]=tt(g,v,_),s[c+1+32]=s[c+0+96]=tt(v,_,j),s[c+2+32]=s[c+1+96]=tt(_,j,N),s[c+3+32]=s[c+2+96]=tt(j,N,T),s[c+3+64]=tt(N,T,M),s[c+3+96]=tt(T,M,R)}function ul(s,c){var g=s[c-1+0],v=s[c-1+32],_=s[c-1+64],j=s[c-1+96];s[c+0+0]=g+v+1>>1,s[c+2+0]=s[c+0+32]=v+_+1>>1,s[c+2+32]=s[c+0+64]=_+j+1>>1,s[c+1+0]=tt(g,v,_),s[c+3+0]=s[c+1+32]=tt(v,_,j),s[c+3+32]=s[c+1+64]=tt(_,j,j),s[c+3+64]=s[c+2+64]=s[c+0+96]=s[c+1+96]=s[c+2+96]=s[c+3+96]=j}function dl(s,c){var g=s[c-1+0],v=s[c-1+32],_=s[c-1+64],j=s[c-1+96],N=s[c-1-32],T=s[c+0-32],M=s[c+1-32],R=s[c+2-32];s[c+0+0]=s[c+2+32]=g+N+1>>1,s[c+0+32]=s[c+2+64]=v+g+1>>1,s[c+0+64]=s[c+2+96]=_+v+1>>1,s[c+0+96]=j+_+1>>1,s[c+3+0]=tt(T,M,R),s[c+2+0]=tt(N,T,M),s[c+1+0]=s[c+3+32]=tt(g,N,T),s[c+1+32]=s[c+3+64]=tt(v,g,N),s[c+1+64]=s[c+3+96]=tt(_,v,g),s[c+1+96]=tt(j,_,v)}function Pa(s,c){var g;for(g=0;8>g;++g)r(s,c+32*g,s,c-32,8)}function ls(s,c){var g;for(g=0;8>g;++g)i(s,c,s[c-1],8),c+=32}function Kr(s,c,g){var v;
vendor: 14,919 bytes, line 57
57for(v=0;8>v;++v)i(c,g+32*v,s,8)}function hl(s,c){var g,v=8;for(g=0;8>g;++g)v+=s[c+g-32]+s[c-1+32*g];Kr(v>>4,s,c)}function Ta(s,c){var g,v=4;for(g=0;8>g;++g)v+=s[c+g-32];Kr(v>>3,s,c)}function fl(s,c){var g,v=4;for(g=0;8>g;++g)v+=s[c-1+32*g];Kr(v>>3,s,c)}function cs(s,c){Kr(128,s,c)}function Li(s,c,g){var v=s[c-g],_=s[c+0],j=3*(_-v)+gl[1020+s[c-2*g]-s[c+g]],N=lo[112+(j+4>>3)];s[c-g]=fr[255+v+lo[112+(j+3>>3)]],s[c+0]=fr[255+_-N]}function us(s,c,g,v){var _=s[c+0],j=s[c+g];return Nr[255+s[c-2*g]-s[c-g]]>v||Nr[255+j-_]>v}function Ki(s,c,g,v){return 4*Nr[255+s[c-g]-s[c+0]]+Nr[255+s[c-2*g]-s[c+g]]<=v}function ds(s,c,g,v,_){var j=s[c-3*g],N=s[c-2*g],T=s[c-g],M=s[c+0],R=s[c+g],Z=s[c+2*g],ce=s[c+3*g];return 4*Nr[255+T-M]+Nr[255+N-R]>v?0:Nr[255+s[c-4*g]-j]<=_&&Nr[255+j-N]<=_&&Nr[255+N-T]<=_&&Nr[255+ce-Z]<=_&&Nr[255+Z-R]<=_&&Nr[255+R-M]<=_}function Ea(s,c,g,v){var _=2*v+1;for(v=0;16>v;++v)Ki(s,c+v,g,_)&&Li(s,c+v,g)}function hs(s,c,g,v){var _=2*v+1;for(v=0;16>v;++v)Ki(s,c+v*g,1,_)&&Li(s,c+v*g,1)}function Da(s,c,g,v){var _;for(_=3;0<_;--_)Ea(s,c+=4*g,g,v)}function eo(s,c,g,v){var _;for(_=3;0<_;--_)hs(s,c+=4,g,v)}function li(s,c,g,v,_,j,N,T){for(j=2*j+1;0<_--;){if(ds(s,c,g,j,N))if(us(s,c,g,T))Li(s,c,g);else{var M=s,R=c,Z=g,ce=M[R-2*Z],z=M[R-Z],ee=M[R+0],oe=M[R+Z],ge=M[R+2*Z],le=27*(ye=gl[1020+3*(ee-z)+gl[1020+ce-oe]])+63>>7,ve=18*ye+63>>7,ye=9*ye+63>>7;M[R-3*Z]=fr[255+M[R-3*Z]+ye],M[R-2*Z]=fr[255+ce+ve],M[R-Z]=fr[255+z+le],M[R+0]=fr[255+ee-le],M[R+Z]=fr[255+oe-ve],M[R+2*Z]=fr[255+ge-ye]}c+=v}}function ci(s,c,g,v,_,j,N,T){for(j=2*j+1;0<_--;){if(ds(s,c,g,j,N))if(us(s,c,g,T))Li(s,c,g);else{var M=s,R=c,Z=g,ce=M[R-Z],z=M[R+0],ee=M[R+Z],oe=lo[112+(4+(ge=3*(z-ce))>>3)],ge=lo[112+(ge+3>>3)],le=oe+1>>1;M[R-2*Z]=fr[255+M[R-2*Z]+le],M[R-Z]=fr[255+ce+ge],M[R+0]=fr[255+z-oe],M[R+Z]=fr[255+ee-le]}c+=v}}function to(s,c,g,v,_,j){li(s,c,g,1,16,v,_,j)}function no(s,c,g,v,_,j){li(s,c,1,g,16,v,_,j)}function ro(s,c,g,v,_,j){var N;for(N=3;0<N;--N)ci(s,c+=4*g,g,1,16,v,_,j)}function Xi(s,c,g,v,_,j){var N;for(N=3;0<N;--N)ci(s,c+=4,1,g,16,v,_,j)}function io(s,c,g,v,_,j,N,T){li(s,c,_,1,8,j,N,T),li(g,v,_,1,8,j,N,T)}function f(s,c,g,v,_,j,N,T){li(s,c,1,_,8,j,N,T),li(g,v,1,_,8,j,N,T)}function w(s,c,g,v,_,j,N,T){ci(s,c+4*_,_,1,8,j,N,T),ci(g,v+4*_,_,1,8,j,N,T)}function O(s,c,g,v,_,j,N,T){ci(s,c+4,1,_,8,j,N,T),ci(g,v+4,1,_,8,j,N,T)}function Y(){this.ba=new dt,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new Lt,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function ne(){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 pe(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function _e(){this.ua=0,this.Wa=new et,this.vb=new et,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new re,this.yc=new B}function Be(){this.xb=this.a=0,this.l=new Si,this.ca=new dt,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new I,this.Pb=0,this.wd=new I,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new _e,this.ab=0,this.gc=l(4,pe),this.Oc=0}function Ie(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new Si,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function it(s,c,g,v,_,j,N){for(s=s==null?0:s[c+0],c=0;c<N;++c)_[j+c]=s+g[v+c]&255,s=_[j+c]}function lt(s,c,g,v,_,j,N){var T;if(s==null)it(null,null,g,v,_,j,N);else for(T=0;T<N;++T)_[j+T]=s[c+T]+g[v+T]&255}function St(s,c,g,v,_,j,N){if(s==null)it(null,null,g,v,_,j,N);else{var T,M=s[c+0],R=M,Z=M;for(T=0;T<N;++T)R=Z+(M=s[c+T])-R,Z=g[v+T]+(-256&R?0>R?0:255:R)&255,R=M,_[j+T]=Z}}function wn(s,c,g,v){var _=c.width,j=c.o;if(e(s!=null&&c!=null),0>g||0>=v||g+v>j)return null;if(!s.Cc){if(s.ga==null){var N;if(s.ga=new Ie,(N=s.ga==null)||(N=c.width*c.o,e(s.Gb.length==0),s.Gb=a(N),s.Uc=0,s.Gb==null?N=0:(s.mb=s.Gb,s.nb=s.Uc,s.rc=null,N=1),N=!N),!N){N=s.ga;var T=s.Fa,M=s.P,R=s.qc,Z=s.mb,ce=s.nb,z=M+1,ee=R-1,oe=N.l;if(e(T!=null&&Z!=null&&c!=null),Di[0]=null,Di[1]=it,Di[2]=lt,Di[3]=St,N.ca=Z,N.tb=ce,N.c=c.width,N.i=c.height,e(0<N.c&&0<N.i),1>=R)c=0;else if(N.$a=3&T[M+0],N.Z=T[M+0]>>2&3,N.Lc=T[M+0]>>4&3,M=T[M+0]>>6&3,0>N.$a||1<N.$a||4<=N.Z||1<N.Lc||M)c=0;else if(oe.put=Qe,oe.ac=cr,oe.bc=Dr,oe.ma=N,oe.width=c.width,oe.height=c.height,oe.Da=c.Da,oe.v=c.v,oe.va=c.va,oe.j=c.j,oe.o=c.o,N.$a)e:{e(N.$a==1),c=$r();t:for(;;){if(c==null){c=0;break e}if(e(N!=null),N.mc=c,c.c=N.c,c.i=N.i,c.l=N.l,c.l.ma=N,c.l.width=N.c,c.l.height=N.i,c.a=0,fe(c.m,T,z,ee),!Hn(N.c,N.i,1,c,null)||(c.ab==1&&c.gc[0].hc==3&&Jn(c.s)?(N.ic=1,T=c.c*c.i,c.Ta=null,c.Ua=0,c.V=a(T),c.Ba=0,c.V==null?(c.a=1,c=0):c=1):(N.ic=0,c=Gr(c,N.c)),!c))break t;c=1;break e}N.mc=null,c=0}else c=ee>=N.c*N.i;N=!c}if(N)return null;s.ga.Lc!=1?s.Ga=0:v=j-g}e(s.ga!=null),e(g+v<=j);e:{if(c=(T=s.ga).c,j=T.l.o,T.$a==0){if(z=s.rc,ee=s.Vc,oe=s.Fa,M=s.P+1+g*c,R=s.mb,Z=s.nb+g*c,e(M<=s.P+s.qc),T.Z!=0)for(e(Di[T.Z]!=null),N=0;N<v;++N)Di[T.Z](z,ee,oe,M,R,Z,c),z=R,ee=Z,Z+=c,M+=c;else for(N=0;N<v;++N)r(R,Z,oe,M,c),z=R,ee=Z,Z+=c,M+=c;s.rc=z,s.Vc=ee}else{if(e(T.mc!=null),c=g+v,e((N=T.mc)!=null),e(c<=N.i),N.C>=c)c=1;else if(T.ic||sn(),T.ic){T=N.V,z=N.Ba,ee=N.c;var ge=N.i,le=(oe=1,M=N.$/ee,R=N.$%ee,Z=N.m,ce=N.s,N.$),ve=ee*ge,ye=ee*c,Le=ce.wc,Ae=le<ye?on(ce,R,M):null;e(le<=ve),e(c<=ge),e(Jn(ce));t:for(;;){for(;!Z.h&&le<ye;){if(R&Le||(Ae=on(ce,R,M)),e(Ae!=null),ie(Z),256>(ge=Xt(Ae.G[0],Ae.H[0],Z)))T[z+le]=ge,++le,++R>=ee&&(R=0,++M<=c&&!(M%16)&&er(N,M));else{if(!(280>ge)){oe=0;break t}ge=Zn(ge-256,Z);var $e,De=Xt(Ae.G[4],Ae.H[4],Z);if(ie(Z),!(le>=(De=Vn(ee,De=Zn(De,Z)))&&ve-le>=ge)){oe=0;break t}for($e=0;$e<ge;++$e)T[z+le+$e]=T[z+le+$e-De];for(le+=ge,R+=ge;R>=ee;)R-=ee,++M<=c&&!(M%16)&&er(N,M);le<ye&&R&Le&&(Ae=on(ce,R,M))}e(Z.h==$(Z))}er(N,M>c?c:M);break t}!oe||Z.h&&le<ve?(oe=0,N.a=Z.h?5:3):N.$=le,c=oe}else c=Dn(N,N.V,N.Ba,N.c,N.i,c,Mn);if(!c){v=0;break e}}g+v>=j&&(s.Cc=1),v=1}if(!v)return null;if(s.Cc&&((v=s.ga)!=null&&(v.mc=null),s.ga=null,0<s.Ga))return alert("todo:WebPDequantizeLevels"),null}return s.nb+g*_}function Rt(s,c,g,v,_,j){for(;0<_--;){var N,T=s,M=c+(g?1:0),R=s,Z=c+(g?0:3);for(N=0;N<v;++N){var ce=R[Z+4*N];ce!=255&&(ce*=32897,T[M+4*N+0]=T[M+4*N+0]*ce>>23,T[M+4*N+1]=T[M+4*N+1]*ce>>23,T[M+4*N+2]=T[M+4*N+2]*ce>>23)}c+=j}}function Ft(s,c,g,v,_){for(;0<v--;){var j;for(j=0;j<g;++j){var N=s[c+2*j+0],T=15&(R=s[c+2*j+1]),M=4369*T,R=(240&R|R>>4)*M>>16;s[c+2*j+0]=(240&N|N>>4)*M>>16&240|(15&N|N<<4)*M>>16>>4&15,s[c+2*j+1]=240&R|T}c+=_}}function Zt(s,c,g,v,_,j,N,T){var M,R,Z=255;for(R=0;R<_;++R){for(M=0;M<v;++M){var ce=s[c+M];j[N+4*M]=ce,Z&=ce}c+=g,N+=T}return Z!=255}function an(s,c,g,v,_){var j;for(j=0;j<_;++j)g[v+j]=s[c+j]>>8}function sn(){xs=Rt,Ic=Ft,Fc=Zt,Oc=an}function In(s,c,g){D[s]=function(v,_,j,N,T,M,R,Z,ce,z,ee,oe,ge,le,ve,ye,Le){var Ae,$e=Le-1>>1,De=T[M+0]|R[Z+0]<<16,pt=ce[z+0]|ee[oe+0]<<16;e(v!=null);var qe=3*De+pt+131074>>2;for(c(v[_+0],255&qe,qe>>16,ge,le),j!=null&&(qe=3*pt+De+131074>>2,c(j[N+0],255&qe,qe>>16,ve,ye)),Ae=1;Ae<=$e;++Ae){var wt=T[M+Ae]|R[Z+Ae]<<16,An=ce[z+Ae]|ee[oe+Ae]<<16,gt=De+wt+pt+An+524296,Ue=gt+2*(wt+pt)>>3;qe=Ue+De>>1,De=(gt=gt+2*(De+An)>>3)+wt>>1,c(v[_+2*Ae-1],255&qe,qe>>16,ge,le+(2*Ae-1)*g),c(v[_+2*Ae-0],255&De,De>>16,ge,le+(2*Ae-0)*g),j!=null&&(qe=gt+pt>>1,De=Ue+An>>1,c(j[N+2*Ae-1],255&qe,qe>>16,ve,ye+(2*Ae-1)*g),c(j[N+2*Ae+0],255&De,De>>16,ve,ye+(2*Ae+0)*g)),De=wt,pt=An}1&Le||(qe=3*De+pt+131074>>2,c(v[_+Le-1],255&qe,qe>>16,ge,le+(Le-1)*g),j!=null&&(qe=3*pt+De+131074>>2,c(j[N+Le-1],255&qe,qe>>16,ve,ye+(Le-1)*g)))}}function ui(){Cr[co]=Hf,Cr[uo]=Yc,Cr[Vc]=$f,Cr[ho]=Kc,Cr[fo]=Xc,Cr[ml]=Zc,Cr[Wc]=Gf,Cr[vl]=Yc,Cr[bl]=Kc,Cr[po]=Xc,Cr[yl]=Zc}function fs(s){return s&-16384?0>s?0:255:s>>Yf}function Zi(s,c){return fs((19077*s>>8)+(26149*c>>8)-14234)}function Ji(s,c,g){return fs((19077*s>>8)-(6419*c>>8)-(13320*g>>8)+8708)}function ji(s,c){return fs((19077*s>>8)+(33050*c>>8)-17685)}function Qi(s,c,g,v,_){v[_+0]=Zi(s,g),v[_+1]=Ji(s,c,g),v[_+2]=ji(s,c)}function Ma(s,c,g,v,_){v[_+0]=ji(s,c),v[_+1]=Ji(s,c,g),v[_+2]=Zi(s,g)}function Ia(s,c,g,v,_){var j=Ji(s,c,g);c=j<<3&224|ji(s,c)>>3,v[_+0]=248&Zi(s,g)|j>>5,v[_+1]=c}function Fn(s,c,g,v,_){var j=240&ji(s,c)|15;v[_+0]=240&Zi(s,g)|Ji(s,c,g)>>4,v[_+1]=j}function ea(s,c,g,v,_){v[_+0]=255,Qi(s,c,g,v,_+1)}function ta(s,c,g,v,_){Ma(s,c,g,v,_),v[_+3]=255}function ps(s,c,g,v,_){Qi(s,c,g,v,_),v[_+3]=255}function Xr(s,c,g){D[s]=function(v,_,j,N,T,M,R,Z,ce){for(var z=Z+(-2&ce)*g;Z!=z;)c(v[_+0],j[N+0],T[M+0],R,Z),c(v[_+1],j[N+0],T[M+0],R,Z+g),_+=2,++N,++M,Z+=2*g;1&ce&&c(v[_+0],j[N+0],T[M+0],R,Z)}}function $n(s,c,g){return g==0?s==0?c==0?6:5:c==0?4:0:g}function ao(s,c,g,v,_){switch(s>>>30){case 3:di(c,g,v,_,0);break;case 2:Ti(c,g,v,_);break;case 1:On(c,g,v,_)}}function Fa(s,c){var g,v,_=c.M,j=c.Nb,N=s.oc,T=s.pc+40,M=s.oc,R=s.pc+584,Z=s.oc,ce=s.pc+600;for(g=0;16>g;++g)N[T+32*g-1]=129;for(g=0;8>g;++g)M[R+32*g-1]=129,Z[ce+32*g-1]=129;for(0<_?N[T-1-32]=M[R-1-32]=Z[ce-1-32]=129:(i(N,T-32-1,127,21),i(M,R-32-1,127,9),i(Z,ce-32-1,127,9)),v=0;v<s.za;++v){var z=c.ya[c.aa+v];if(0<v){for(g=-1;16>g;++g)r(N,T+32*g-4,N,T+32*g+12,4);for(g=-1;8>g;++g)r(M,R+32*g-4,M,R+32*g+4,4),r(Z,ce+32*g-4,Z,ce+32*g+4,4)}var ee=s.Gd,oe=s.Hd+v,ge=z.ad,le=z.Hc;if(0<_&&(r(N,T-32,ee[oe].y,0,16),r(M,R-32,ee[oe].f,0,8),r(Z,ce-32,ee[oe].ea,0,8)),z.Za){var ve=N,ye=T-32+16;for(0<_&&(v>=s.za-1?i(ve,ye,ee[oe].y[15],4):r(ve,ye,ee[oe+1].y,0,4)),g=0;4>g;g++)ve[ye+128+g]=ve[ye+256+g]=ve[ye+384+g]=ve[ye+0+g];for(g=0;16>g;++g,le<<=2)ve=N,ye=T+Qc[g],Fr[z.Ob[g]](ve,ye),ao(le,ge,16*+g,ve,ye)}else if(ve=$n(v,_,z.Ob[0]),Ei[ve](N,T),le!=0)for(g=0;16>g;++g,le<<=2)ao(le,ge,16*+g,N,T+Qc[g]);for(g=z.Gc,ve=$n(v,_,z.Dd),fi[ve](M,R),fi[ve](Z,ce),le=ge,ve=M,ye=R,255&(z=0|g)&&(170&z?qa(le,256,ve,ye):Jr(le,256,ve,ye)),z=Z,le=ce,255&(g>>=8)&&(170&g?qa(ge,320,z,le):Jr(ge,320,z,le)),_<s.Ub-1&&(r(ee[oe].y,0,N,T+480,16),r(ee[oe].f,0,M,R+224,8),r(ee[oe].ea,0,Z,ce+224,8)),g=8*j*s.B,ee=s.sa,oe=s.ta+16*v+16*j*s.R,ge=s.qa,z=s.ra+8*v+g,le=s.Ha,ve=s.Ia+8*v+g,g=0;16>g;++g)r(ee,oe+g*s.R,N,T+32*g,16);for(g=0;8>g;++g)r(ge,z+g*s.B,M,R+32*g,8),r(le,ve+g*s.B,Z,ce+32*g,8)}}function so(s,c,g,v,_,j,N,T,M){var R=[0],Z=[0],ce=0,z=M!=null?M.kd:0,ee=M??new ne;if(s==null||12>g)return 7;ee.data=s,ee.w=c,ee.ha=g,c=[c],g=[g],ee.gb=[ee.gb];e:{var oe=c,ge=g,le=ee.gb;if(e(s!=null),e(ge!=null),e(le!=null),le[0]=0,12<=ge[0]&&!t(s,oe[0],"RIFF")){if(t(s,oe[0]+8,"WEBP")){le=3;break e}var ve=Fe(s,oe[0]+4);if(12>ve||4294967286<ve){le=3;break e}if(z&&ve>ge[0]-8){le=7;break e}le[0]=ve,oe[0]+=12,ge[0]-=12}le=0}if(le!=0)return le;for(ve=0<ee.gb[0],g=g[0];;){e:{var ye=s;ge=c,le=g;var Le=R,Ae=Z,$e=oe=[0];if((qe=ce=[ce])[0]=0,8>le[0])le=7;else{if(!t(ye,ge[0],"VP8X")){if(Fe(ye,ge[0]+4)!=10){le=3;break e}if(18>le[0]){le=7;break e}var De=Fe(ye,ge[0]+8),pt=1+Ce(ye,ge[0]+12);if(2147483648<=pt*(ye=1+Ce(ye,ge[0]+15))){le=3;break e}$e!=null&&($e[0]=De),Le!=null&&(Le[0]=pt),Ae!=null&&(Ae[0]=ye),ge[0]+=18,le[0]-=18,qe[0]=1}le=0}}if(ce=ce[0],oe=oe[0],le!=0)return le;if(ge=!!(2&oe),!ve&&ce)return 3;if(j!=null&&(j[0]=!!(16&oe)),N!=null&&(N[0]=ge),T!=null&&(T[0]=0),N=R[0],oe=Z[0],ce&&ge&&M==null){le=0;break}if(4>g){le=7;break}if(ve&&ce||!ve&&!ce&&!t(s,c[0],"ALPH")){g=[g],ee.na=[ee.na],ee.P=[ee.P],ee.Sa=[ee.Sa];e:{De=s,le=c,ve=g;var qe=ee.gb;Le=ee.na,Ae=ee.P,$e=ee.Sa,pt=22,e(De!=null),e(ve!=null),ye=le[0];var wt=ve[0];for(e(Le!=null),e($e!=null),Le[0]=null,Ae[0]=null,$e[0]=0;;){if(le[0]=ye,ve[0]=wt,8>wt){le=7;break e}var An=Fe(De,ye+4);if(4294967286<An){le=3;break e}var gt=8+An+1&-2;if(pt+=gt,0<qe&&pt>qe){le=3;break e}if(!t(De,ye,"VP8 ")||!t(De,ye,"VP8L")){le=0;break e}if(wt[0]<gt){le=7;break e}t(De,ye,"ALPH")||(Le[0]=De,Ae[0]=ye+8,$e[0]=An),ye+=gt,wt-=gt}}if(g=g[0],ee.na=ee.na[0],ee.P=ee.P[0],ee.Sa=ee.Sa[0],le!=0)break}g=[g],ee.Ja=[ee.Ja],ee.xa=[ee.xa];e:if(qe=s,le=c,ve=g,Le=ee.gb[0],Ae=ee.Ja,$e=ee.xa,De=le[0],ye=!t(qe,De,"VP8 "),pt=!t(qe,De,"VP8L"),e(qe!=null),e(ve!=null),e(Ae!=null),e($e!=null),8>ve[0])le=7;else{if(ye||pt){if(qe=Fe(qe,De+4),12<=Le&&qe>Le-12){le=3;break e}if(z&&qe>ve[0]-8){le=7;break e}Ae[0]=qe,le[0]+=8,ve[0]-=8,$e[0]=pt}else $e[0]=5<=ve[0]&&qe[De+0]==47&&!(qe[De+4]>>5),Ae[0]=ve[0];le=0}if(g=g[0],ee.Ja=ee.Ja[0],ee.xa=ee.xa[0],c=c[0],le!=0)break;if(4294967286<ee.Ja)return 3;if(T==null||ge||(T[0]=ee.xa?2:1),N=[N],oe=[oe],ee.xa){if(5>g){le=7;break}T=N,z=oe,ge=j,s==null||5>g?s=0:5<=g&&s[c+0]==47&&!(s[c+4]>>5)?(ve=[0],qe=[0],Le=[0],fe(Ae=new I,s,c,g),Ar(Ae,ve,qe,Le)?(T!=null&&(T[0]=ve[0]),z!=null&&(z[0]=qe[0]),ge!=null&&(ge[0]=Le[0]),s=1):s=0):s=0}else{if(10>g){le=7;break}T=oe,s==null||10>g||!ja(s,c+3,g-3)?s=0:(z=s[c+0]|s[c+1]<<8|s[c+2]<<16,ge=16383&(s[c+7]<<8|s[c+6]),s=16383&(s[c+9]<<8|s[c+8]),1&z||3<(z>>1&7)||!(z>>4&1)||z>>5>=ee.Ja||!ge||!s?s=0:(N&&(N[0]=ge),T&&(T[0]=s),s=1))}if(!s||(N=N[0],oe=oe[0],ce&&(R[0]!=N||Z[0]!=oe)))return 3;M!=null&&(M[0]=ee,M.offset=c-M.w,e(4294967286>c-M.w),e(M.offset==M.ha-g));break}return le==0||le==7&&ce&&M==null?(j!=null&&(j[0]|=ee.na!=null&&0<ee.na.length),v!=null&&(v[0]=N),_!=null&&(_[0]=oe),0):le}function jr(s,c,g){var v=c.width,_=c.height,j=0,N=0,T=v,M=_;if(c.Da=s!=null&&0<s.Da,c.Da&&(T=s.cd,M=s.bd,j=s.v,N=s.j,11>g||(j&=-2,N&=-2),0>j||0>N||0>=T||0>=M||j+T>v||N+M>_))return 0;if(c.v=j,c.j=N,c.va=j+T,c.o=N+M,c.U=T,c.T=M,c.da=s!=null&&0<s.da,c.da){if(!Ve(T,M,g=[s.ib],j=[s.hb]))return 0;c.ib=g[0],c.hb=j[0]}return c.ob=s!=null&&s.ob,c.Kb=s==null||!s.Sd,c.da&&(c.ob=c.ib<3*v/4&&c.hb<3*_/4,c.Kb=0),1}function na(s){if(s==null)return 2;if(11>s.S){var c=s.f.RGBA;c.fb+=(s.height-1)*c.A,c.A=-c.A}else c=s.f.kb,s=s.height,c.O+=(s-1)*c.fa,c.fa=-c.fa,c.N+=(s-1>>1)*c.Ab,c.Ab=-c.Ab,c.W+=(s-1>>1)*c.Db,c.Db=-c.Db,c.F!=null&&(c.J+=(s-1)*c.lb,c.lb=-c.lb);return 0}function gs(s,c,g,v){if(v==null||0>=s||0>=c)return 2;if(g!=null){if(g.Da){var _=g.cd,j=g.bd,N=-2&g.v,T=-2&g.j;if(0>N||0>T||0>=_||0>=j||N+_>s||T+j>c)return 2;s=_,c=j}if(g.da){if(!Ve(s,c,_=[g.ib],j=[g.hb]))return 2;s=_[0],c=j[0]}}v.width=s,v.height=c;e:{var M=v.width,R=v.height;if(s=v.S,0>=M||0>=R||!(s>=co&&13>s))s=2;else{if(0>=v.Rd&&v.sd==null){N=j=_=c=0;var Z=(T=M*eu[s])*R;if(11>s||(j=(R+1)/2*(c=(M+1)/2),s==12&&(N=(_=M)*R)),(R=a(Z+2*j+N))==null){s=1;break e}v.sd=R,11>s?((M=v.f.RGBA).eb=R,M.fb=0,M.A=T,M.size=Z):((M=v.f.kb).y=R,M.O=0,M.fa=T,M.Fd=Z,M.f=R,M.N=0+Z,M.Ab=c,M.Cd=j,M.ea=R,M.W=0+Z+j,M.Db=c,M.Ed=j,s==12&&(M.F=R,M.J=0+Z+2*j),M.Tc=N,M.lb=_)}if(c=1,_=v.S,j=v.width,N=v.height,_>=co&&13>_)if(11>_)s=v.f.RGBA,c&=(T=Math.abs(s.A))*(N-1)+j<=s.size,c&=T>=j*eu[_],c&=s.eb!=null;else{s=v.f.kb,T=(j+1)/2,Z=(N+1)/2,M=Math.abs(s.fa),R=Math.abs(s.Ab);var ce=Math.abs(s.Db),z=Math.abs(s.lb),ee=z*(N-1)+j;c&=M*(N-1)+j<=s.Fd,c&=R*(Z-1)+T<=s.Cd,c=(c&=ce*(Z-1)+T<=s.Ed)&M>=j&R>=T&ce>=T,c&=s.y!=null,c&=s.f!=null,c&=s.ea!=null,_==12&&(c&=z>=j,c&=ee<=s.Tc,c&=s.F!=null)}else c=0;s=c?0:2}}return s!=0||g!=null&&g.fd&&(s=na(v)),s}var Oa=64,ra=[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],ms=24,Gn=32,rr=8,Ba=[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,
vendor: 4,755 bytes, line 57
576,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];Ee("Predictor0","PredictorAdd0"),D.Predictor0=function(){return 4278190080},D.Predictor1=function(s){return s},D.Predictor2=function(s,c,g){return c[g+0]},D.Predictor3=function(s,c,g){return c[g+1]},D.Predictor4=function(s,c,g){return c[g-1]},D.Predictor5=function(s,c,g){return Oe(Oe(s,c[g+1]),c[g+0])},D.Predictor6=function(s,c,g){return Oe(s,c[g-1])},D.Predictor7=function(s,c,g){return Oe(s,c[g+0])},D.Predictor8=function(s,c,g){return Oe(c[g-1],c[g+0])},D.Predictor9=function(s,c,g){return Oe(c[g+0],c[g+1])},D.Predictor10=function(s,c,g){return Oe(Oe(s,c[g-1]),Oe(c[g+0],c[g+1]))},D.Predictor11=function(s,c,g){var v=c[g+0];return 0>=rt(v>>24&255,s>>24&255,(c=c[g-1])>>24&255)+rt(v>>16&255,s>>16&255,c>>16&255)+rt(v>>8&255,s>>8&255,c>>8&255)+rt(255&v,255&s,255&c)?v:s},D.Predictor12=function(s,c,g){var v=c[g+0];return(kt((s>>24&255)+(v>>24&255)-((c=c[g-1])>>24&255))<<24|kt((s>>16&255)+(v>>16&255)-(c>>16&255))<<16|kt((s>>8&255)+(v>>8&255)-(c>>8&255))<<8|kt((255&s)+(255&v)-(255&c)))>>>0},D.Predictor13=function(s,c,g){var v=c[g-1];return(vt((s=Oe(s,c[g+0]))>>24&255,v>>24&255)<<24|vt(s>>16&255,v>>16&255)<<16|vt(s>>8&255,v>>8&255)<<8|vt(255&s,255&v))>>>0};var Ni=D.PredictorAdd0;D.PredictorAdd1=bt,Ee("Predictor2","PredictorAdd2"),Ee("Predictor3","PredictorAdd3"),Ee("Predictor4","PredictorAdd4"),Ee("Predictor5","PredictorAdd5"),Ee("Predictor6","PredictorAdd6"),Ee("Predictor7","PredictorAdd7"),Ee("Predictor8","PredictorAdd8"),Ee("Predictor9","PredictorAdd9"),Ee("Predictor10","PredictorAdd10"),Ee("Predictor11","PredictorAdd11"),Ee("Predictor12","PredictorAdd12"),Ee("Predictor13","PredictorAdd13");var Ci=D.PredictorAdd2;We("ColorIndexInverseTransform","MapARGB","32b",function(s){return s>>8&255},function(s){return s}),We("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(s){return s},function(s){return s>>8&255});var Ra,ia=D.ColorIndexInverseTransform,_n=D.MapARGB,pl=D.VP8LColorIndexInverseTransformAlpha,Zr=D.MapAlpha,Ir=D.VP8LPredictorsAdd=[];Ir.length=16,(D.VP8LPredictors=[]).length=16,(D.VP8LPredictorsAdd_C=[]).length=16,(D.VP8LPredictors_C=[]).length=16;var aa,vs,bs,za,sa,oa,Pi,di,Ti,qa,On,Jr,Wt,Ht,pn,Sn,hi,ys,Ua,oo,Tc,Ec,Dc,Mc,xs,Ic,Fc,Oc,Bc=a(511),Rc=a(2041),zc=a(225),qc=a(767),Uc=0,gl=Rc,lo=zc,fr=qc,Nr=Bc,co=0,uo=1,Vc=2,ho=3,fo=4,ml=5,Wc=6,vl=7,bl=8,po=9,yl=10,Tf=[2,3,7],Ef=[3,3,11],Hc=[280,256,256,256,40],Df=[0,1,1,1,0],Mf=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],If=[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],Ff=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],Of=8,xl=[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],wl=[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],ws=null,Bf=[[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]],Rf=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],$c=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],zf=[[[[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,25
575,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]]]],qf=[[[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,25
575,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]]],Uf=[[[[255,255,255,255,255,255,255,255,255,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,25
vendor: 14,598 bytes, line 57
575,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]]]],Vf=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],Ei=[],Fr=[],fi=[],Wf=1,Gc=2,Di=[],Cr=[];In("UpsampleRgbLinePair",Qi,3),In("UpsampleBgrLinePair",Ma,3),In("UpsampleRgbaLinePair",ps,4),In("UpsampleBgraLinePair",ta,4),In("UpsampleArgbLinePair",ea,4),In("UpsampleRgba4444LinePair",Fn,2),In("UpsampleRgb565LinePair",Ia,2);var Hf=D.UpsampleRgbLinePair,$f=D.UpsampleBgrLinePair,Yc=D.UpsampleRgbaLinePair,Kc=D.UpsampleBgraLinePair,Xc=D.UpsampleArgbLinePair,Zc=D.UpsampleRgba4444LinePair,Gf=D.UpsampleRgb565LinePair,go=16,mo=1<<go-1,_s=-227,_l=482,Yf=6,Jc=0,Kf=a(256),Xf=a(256),Zf=a(256),Jf=a(256),Qf=a(_l-_s),e1=a(_l-_s);Xr("YuvToRgbRow",Qi,3),Xr("YuvToBgrRow",Ma,3),Xr("YuvToRgbaRow",ps,4),Xr("YuvToBgraRow",ta,4),Xr("YuvToArgbRow",ea,4),Xr("YuvToRgba4444Row",Fn,2),Xr("YuvToRgb565Row",Ia,2);var Qc=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],vo=[0,2,8],t1=[8,7,6,4,4,2,2,2,1,1,1,1],n1=1;this.WebPDecodeRGBA=function(s,c,g,v,_){var j=uo,N=new Y,T=new dt;N.ba=T,T.S=j,T.width=[T.width],T.height=[T.height];var M=T.width,R=T.height,Z=new Ye;if(Z==null||s==null)var ce=2;else e(Z!=null),ce=so(s,c,g,Z.width,Z.height,Z.Pd,Z.Qd,Z.format,null);if(ce!=0?M=0:(M!=null&&(M[0]=Z.width[0]),R!=null&&(R[0]=Z.height[0]),M=1),M){T.width=T.width[0],T.height=T.height[0],v!=null&&(v[0]=T.width),_!=null&&(_[0]=T.height);e:{if(v=new Si,(_=new ne).data=s,_.w=c,_.ha=g,_.kd=1,c=[0],e(_!=null),((s=so(_.data,_.w,_.ha,null,null,null,c,null,_))==0||s==7)&&c[0]&&(s=4),(c=s)==0){if(e(N!=null),v.data=_.data,v.w=_.w+_.offset,v.ha=_.ha-_.offset,v.put=Qe,v.ac=cr,v.bc=Dr,v.ma=N,_.xa){if((s=$r())==null){N=1;break e}if((function(z,ee){var oe=[0],ge=[0],le=[0];t:for(;;){if(z==null)return 0;if(ee==null)return z.a=2,0;if(z.l=ee,z.a=0,fe(z.m,ee.data,ee.w,ee.ha),!Ar(z.m,oe,ge,le)){z.a=3;break t}if(z.xb=Gc,ee.width=oe[0],ee.height=ge[0],!Hn(oe[0],ge[0],1,z,null))break t;return 1}return e(z.a!=0),0})(s,v)){if(v=(c=gs(v.width,v.height,N.Oa,N.ba))==0){t:{v=s;n:for(;;){if(v==null){v=0;break t}if(e(v.s.yc!=null),e(v.s.Ya!=null),e(0<v.s.Wb),e((g=v.l)!=null),e((_=g.ma)!=null),v.xb!=0){if(v.ca=_.ba,v.tb=_.tb,e(v.ca!=null),!jr(_.Oa,g,ho)){v.a=2;break n}if(!Gr(v,g.width)||g.da)break n;if((g.da||Ze(v.ca.S))&&sn(),11>v.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),v.ca.f.kb.F!=null&&sn()),v.Pb&&0<v.s.ua&&v.s.vb.X==null&&!F(v.s.vb,v.s.Wa.Xa)){v.a=1;break n}v.xb=0}if(!Dn(v,v.V,v.Ba,v.c,v.i,g.o,Wn))break n;_.Dc=v.Ma,v=1;break t}e(v.a!=0),v=0}v=!v}v&&(c=s.a)}else c=s.a}else{if((s=new ss)==null){N=1;break e}if(s.Fa=_.na,s.P=_.P,s.qc=_.Sa,Lr(s,v)){if((c=gs(v.width,v.height,N.Oa,N.ba))==0){if(s.Aa=0,g=N.Oa,e((_=s)!=null),g!=null){if(0<(M=0>(M=g.Md)?0:100<M?255:255*M/100)){for(R=Z=0;4>R;++R)12>(ce=_.pb[R]).lc&&(ce.ia=M*t1[0>ce.lc?0:ce.lc]>>3),Z|=ce.ia;Z&&(alert("todo:VP8InitRandom"),_.ia=1)}_.Ga=g.Id,100<_.Ga?_.Ga=100:0>_.Ga&&(_.Ga=0)}(function(z,ee){if(z==null)return 0;if(ee==null)return ln(z,2,"NULL VP8Io parameter in VP8Decode().");if(!z.cb&&!Lr(z,ee))return 0;if(e(z.cb),ee.ac==null||ee.ac(ee)){ee.ob&&(z.L=0);var oe=vo[z.L];if(z.L==2?(z.yb=0,z.zb=0):(z.yb=ee.v-oe>>4,z.zb=ee.j-oe>>4,0>z.yb&&(z.yb=0),0>z.zb&&(z.zb=0)),z.Va=ee.o+15+oe>>4,z.Hb=ee.va+15+oe>>4,z.Hb>z.za&&(z.Hb=z.za),z.Va>z.Ub&&(z.Va=z.Ub),0<z.L){var ge=z.ed;for(oe=0;4>oe;++oe){var le;if(z.Qa.Cb){var ve=z.Qa.Lb[oe];z.Qa.Fb||(ve+=ge.Tb)}else ve=ge.Tb;for(le=0;1>=le;++le){var ye=z.gd[oe][le],Le=ve;if(ge.Pc&&(Le+=ge.vd[0],le&&(Le+=ge.od[0])),0<(Le=0>Le?0:63<Le?63:Le)){var Ae=Le;0<ge.wb&&(Ae=4<ge.wb?Ae>>2:Ae>>1)>9-ge.wb&&(Ae=9-ge.wb),1>Ae&&(Ae=1),ye.dd=Ae,ye.tc=2*Le+Ae,ye.ld=40<=Le?2:15<=Le?1:0}else ye.tc=0;ye.La=le}}}oe=0}else ln(z,6,"Frame setup failed"),oe=z.a;if(oe=oe==0){if(oe){z.$c=0,0<z.Aa||(z.Ic=n1);t:{oe=z.Ic,ge=4*(Ae=z.za);var $e=32*Ae,De=Ae+1,pt=0<z.L?Ae*(0<z.Aa?2:1):0,qe=(z.Aa==2?2:1)*Ae;if((ye=ge+832+(le=3*(16*oe+vo[z.L])/2*$e)+(ve=z.Fa!=null&&0<z.Fa.length?z.Kc.c*z.Kc.i:0))!=ye)oe=0;else{if(ye>z.Vb){if(z.Vb=0,z.Ec=a(ye),z.Fc=0,z.Ec==null){oe=ln(z,1,"no memory during frame initialization.");break t}z.Vb=ye}ye=z.Ec,Le=z.Fc,z.Ac=ye,z.Bc=Le,Le+=ge,z.Gd=l($e,ka),z.Hd=0,z.rb=l(De+1,_i),z.sb=1,z.wa=pt?l(pt,jn):null,z.Y=0,z.D.Nb=0,z.D.wa=z.wa,z.D.Y=z.Y,0<z.Aa&&(z.D.Y+=Ae),e(!0),z.oc=ye,z.pc=Le,Le+=832,z.ya=l(qe,kr),z.aa=0,z.D.ya=z.ya,z.D.aa=z.aa,z.Aa==2&&(z.D.aa+=Ae),z.R=16*Ae,z.B=8*Ae,Ae=($e=vo[z.L])*z.R,$e=$e/2*z.B,z.sa=ye,z.ta=Le+Ae,z.qa=z.sa,z.ra=z.ta+16*oe*z.R+$e,z.Ha=z.qa,z.Ia=z.ra+8*oe*z.B+$e,z.$c=0,Le+=le,z.mb=ve?ye:null,z.nb=ve?Le:null,e(Le+ve<=z.Fc+z.Vb),yt(z),i(z.Ac,z.Bc,0,ge),oe=1}}if(oe){if(ee.ka=0,ee.y=z.sa,ee.O=z.ta,ee.f=z.qa,ee.N=z.ra,ee.ea=z.Ha,ee.Vd=z.Ia,ee.fa=z.R,ee.Rc=z.B,ee.F=null,ee.J=0,!Uc){for(oe=-255;255>=oe;++oe)Bc[255+oe]=0>oe?-oe:oe;for(oe=-1020;1020>=oe;++oe)Rc[1020+oe]=-128>oe?-128:127<oe?127:oe;for(oe=-112;112>=oe;++oe)zc[112+oe]=-16>oe?-16:15<oe?15:oe;for(oe=-255;510>=oe;++oe)qc[255+oe]=0>oe?0:255<oe?255:oe;Uc=1}Pi=Js,di=Jo,qa=Qo,On=el,Jr=Yr,Ti=Mr,Wt=to,Ht=no,pn=io,Sn=f,hi=ro,ys=Xi,Ua=w,oo=O,Tc=Ea,Ec=hs,Dc=Da,Mc=eo,Fr[0]=ol,Fr[1]=Ca,Fr[2]=al,Fr[3]=sl,Fr[4]=ll,Fr[5]=si,Fr[6]=cl,Fr[7]=oi,Fr[8]=dl,Fr[9]=ul,Ei[0]=Qs,Ei[1]=tl,Ei[2]=nl,Ei[3]=rl,Ei[4]=ki,Ei[5]=il,Ei[6]=Yi,fi[0]=hl,fi[1]=os,fi[2]=Pa,fi[3]=ls,fi[4]=fl,fi[5]=Ta,fi[6]=cs,oe=1}else oe=0}oe&&(oe=(function(wt,An){for(wt.M=0;wt.M<wt.Va;++wt.M){var gt,Ue=wt.Jc[wt.M&wt.Xb],Pe=wt.m,gn=wt;for(gt=0;gt<gn.za;++gt){var ct=Pe,At=gn,Jt=At.Ac,Cn=At.Bc+4*gt,Yn=At.zc,cn=At.ya[At.aa+gt];if(At.Qa.Bb?cn.$b=me(ct,At.Pa.jb[0])?2+me(ct,At.Pa.jb[2]):me(ct,At.Pa.jb[1]):cn.$b=0,At.kc&&(cn.Ad=me(ct,At.Bd)),cn.Za=!me(ct,145)+0,cn.Za){var Bn=cn.Ob,Kn=0;for(At=0;4>At;++At){var kn,Nt=Yn[0+At];for(kn=0;4>kn;++kn){Nt=qf[Jt[Cn+kn]][Nt];for(var Mt=$c[me(ct,Nt[0])];0<Mt;)Mt=$c[2*Mt+me(ct,Nt[Mt])];Nt=-Mt,Jt[Cn+kn]=Nt}r(Bn,Kn,Jt,Cn,4),Kn+=4,Yn[0+At]=Nt}}else Nt=me(ct,156)?me(ct,128)?1:3:me(ct,163)?2:0,cn.Ob[0]=Nt,i(Jt,Cn,Nt,4),i(Yn,0,Nt,4);cn.Dd=me(ct,142)?me(ct,114)?me(ct,183)?1:3:2:0}if(gn.m.Ka)return ln(wt,7,"Premature end-of-partition0 encountered.");for(;wt.ja<wt.za;++wt.ja){if(gn=Ue,ct=(Pe=wt).rb[Pe.sb-1],Jt=Pe.rb[Pe.sb+Pe.ja],gt=Pe.ya[Pe.aa+Pe.ja],Cn=Pe.kc?gt.Ad:0)ct.la=Jt.la=0,gt.Za||(ct.Na=Jt.Na=0),gt.Hc=0,gt.Gc=0,gt.ia=0;else{var un,It;if(ct=Jt,Jt=gn,Cn=Pe.Pa.Xc,Yn=Pe.ya[Pe.aa+Pe.ja],cn=Pe.pb[Yn.$b],At=Yn.ad,Bn=0,Kn=Pe.rb[Pe.sb-1],Nt=kn=0,i(At,Bn,0,384),Yn.Za)var Pn=0,Or=Cn[3];else{Mt=a(16);var mn=ct.Na+Kn.Na;if(mn=ws(Jt,Cn[1],mn,cn.Eb,0,Mt,0),ct.Na=Kn.Na=(0<mn)+0,1<mn)Pi(Mt,0,At,Bn);else{var ir=Mt[0]+3>>3;for(Mt=0;256>Mt;Mt+=16)At[Bn+Mt]=ir}Pn=1,Or=Cn[0]}var zt=15&ct.la,Ln=15&Kn.la;for(Mt=0;4>Mt;++Mt){var pr=1&Ln;for(ir=It=0;4>ir;++ir)zt=zt>>1|(pr=(mn=ws(Jt,Or,mn=pr+(1&zt),cn.Sc,Pn,At,Bn))>Pn)<<7,It=It<<2|(3<mn?3:1<mn?2:At[Bn+0]!=0),Bn+=16;zt>>=4,Ln=Ln>>1|pr<<7,kn=(kn<<8|It)>>>0}for(Or=zt,Pn=Ln>>4,un=0;4>un;un+=2){for(It=0,zt=ct.la>>4+un,Ln=Kn.la>>4+un,Mt=0;2>Mt;++Mt){for(pr=1&Ln,ir=0;2>ir;++ir)mn=pr+(1&zt),zt=zt>>1|(pr=0<(mn=ws(Jt,Cn[2],mn,cn.Qc,0,At,Bn)))<<3,It=It<<2|(3<mn?3:1<mn?2:At[Bn+0]!=0),Bn+=16;zt>>=2,Ln=Ln>>1|pr<<5}Nt|=It<<4*un,Or|=zt<<4<<un,Pn|=(240&Ln)<<un}ct.la=Or,Kn.la=Pn,Yn.Hc=kn,Yn.Gc=Nt,Yn.ia=43690&Nt?0:cn.ia,Cn=!(kn|Nt)}if(0<Pe.L&&(Pe.wa[Pe.Y+Pe.ja]=Pe.gd[gt.$b][gt.Za],Pe.wa[Pe.Y+Pe.ja].La|=!Cn),gn.Ka)return ln(wt,7,"Premature end-of-file encountered.")}if(yt(wt),Pe=An,gn=1,gt=(Ue=wt).D,ct=0<Ue.L&&Ue.M>=Ue.zb&&Ue.M<=Ue.Va,Ue.Aa==0)t:{if(gt.M=Ue.M,gt.uc=ct,Fa(Ue,gt),gn=1,gt=(It=Ue.D).Nb,ct=(Nt=vo[Ue.L])*Ue.R,Jt=Nt/2*Ue.B,Mt=16*gt*Ue.R,ir=8*gt*Ue.B,Cn=Ue.sa,Yn=Ue.ta-ct+Mt,cn=Ue.qa,At=Ue.ra-Jt+ir,Bn=Ue.Ha,Kn=Ue.Ia-Jt+ir,Ln=(zt=It.M)==0,kn=zt>=Ue.Va-1,Ue.Aa==2&&Fa(Ue,It),It.uc)for(pr=(mn=Ue).D.M,e(mn.D.uc),It=mn.yb;It<mn.Hb;++It){Pn=It,Or=pr;var Xn=(gr=(Tn=mn).D).Nb;un=Tn.R;var gr=gr.wa[gr.Y+Pn],mr=Tn.sa,ar=Tn.ta+16*Xn*un+16*Pn,vr=gr.dd,$t=gr.tc;if($t!=0)if(e(3<=$t),Tn.L==1)0<Pn&&Ec(mr,ar,un,$t+4),gr.La&&Mc(mr,ar,un,$t),0<Or&&Tc(mr,ar,un,$t+4),gr.La&&Dc(mr,ar,un,$t);else{var br=Tn.B,Br=Tn.qa,la=Tn.ra+8*Xn*br+8*Pn,pi=Tn.Ha,Tn=Tn.Ia+8*Xn*br+8*Pn;Xn=gr.ld,0<Pn&&(Ht(mr,ar,un,$t+4,vr,Xn),Sn(Br,la,pi,Tn,br,$t+4,vr,Xn)),gr.La&&(ys(mr,ar,un,$t,vr,Xn),oo(Br,la,pi,Tn,br,$t,vr,Xn)),0<Or&&(Wt(mr,ar,un,$t+4,vr,Xn),pn(Br,la,pi,Tn,br,$t+4,vr,Xn)),gr.La&&(hi(mr,ar,un,$t,vr,Xn),Ua(Br,la,pi,Tn,br,$t,vr,Xn))}}if(Ue.ia&&alert("todo:DitherRow"),Pe.put!=null){if(It=16*zt,zt=16*(zt+1),Ln?(Pe.y=Ue.sa,Pe.O=Ue.ta+Mt,Pe.f=Ue.qa,Pe.N=Ue.ra+ir,Pe.ea=Ue.Ha,Pe.W=Ue.Ia+ir):(It-=Nt,Pe.y=Cn,Pe.O=Yn,Pe.f=cn,Pe.N=At,Pe.ea=Bn,Pe.W=Kn),kn||(zt-=Nt),zt>Pe.o&&(zt=Pe.o),Pe.F=null,Pe.J=null,Ue.Fa!=null&&0<Ue.Fa.length&&It<zt&&(Pe.J=wn(Ue,Pe,It,zt-It),Pe.F=Ue.mb,Pe.F==null&&Pe.F.length==0)){gn=ln(Ue,3,"Could not decode alpha data.");break t}It<Pe.j&&(Nt=Pe.j-It,It=Pe.j,e(!(1&Nt)),Pe.O+=Ue.R*Nt,Pe.N+=Ue.B*(Nt>>1),Pe.W+=Ue.B*(Nt>>1),Pe.F!=null&&(Pe.J+=Pe.width*Nt)),It<zt&&(Pe.O+=Pe.v,Pe.N+=Pe.v>>1,Pe.W+=Pe.v>>1,Pe.F!=null&&(Pe.J+=Pe.v),Pe.ka=It-Pe.j,Pe.U=Pe.va-Pe.v,Pe.T=zt-It,gn=Pe.put(Pe))}gt+1!=Ue.Ic||kn||(r(Ue.sa,Ue.ta-ct,Cn,Yn+16*Ue.R,ct),r(Ue.qa,Ue.ra-Jt,cn,At+8*Ue.B,Jt),r(Ue.Ha,Ue.Ia-Jt,Bn,Kn+8*Ue.B,Jt))}if(!gn)return ln(wt,6,"Output aborted.")}return 1})(z,ee)),ee.bc!=null&&ee.bc(ee),oe&=1}return oe?(z.cb=0,oe):0})(s,v)||(c=s.a)}}else c=s.a}c==0&&N.Oa!=null&&N.Oa.fd&&(c=na(N.ba))}N=c}j=N!=0?null:11>j?T.f.RGBA.eb:T.f.kb.y}else j=null;return j};var eu=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function d(D,G){for(var S="",P=0;P<4;P++)S+=String.fromCharCode(D[G++]);return S}function h(D,G){return D[G+0]|D[G+1]<<8}function b(D,G){return(D[G+0]|D[G+1]<<8|D[G+2]<<16)>>>0}function x(D,G){return(D[G+0]|D[G+1]<<8|D[G+2]<<16|D[G+3]<<24)>>>0}new u;var p=[0],L=[0],k=[],C=new u,y=n,V=(function(D,G){var S={},P=0,B=!1,U=0,re=0;if(S.frames=[],!(function(A,I){for(var W=0;W<4;W++)if(A[I+W]!="RIFF".charCodeAt(W))return!0;return!1})(D,G)){for(x(D,G+=4),G+=8;G<D.length;){var Q=d(D,G),de=x(D,G+=4);G+=4;var se=de+(1&de);switch(Q){case"VP8 ":case"VP8L":S.frames[P]===void 0&&(S.frames[P]={}),(te=S.frames[P]).src_off=B?re:G-8,te.src_size=U+de+8,P++,B&&(B=!1,U=0,re=0);break;case"VP8X":(te=S.header={}).feature_flags=D[G];var fe=G+4;te.canvas_width=1+b(D,fe),fe+=3,te.canvas_height=1+b(D,fe),fe+=3;break;case"ALPH":B=!0,U=se+8,re=G-8;break;case"ANIM":(te=S.header).bgcolor=x(D,G),fe=G+4,te.loop_count=h(D,fe),fe+=2;break;case"ANMF":var we,te;(te=S.frames[P]={}).offset_x=2*b(D,G),G+=3,te.offset_y=2*b(D,G),G+=3,te.width=1+b(D,G),G+=3,te.height=1+b(D,G),G+=3,te.duration=b(D,G),G+=3,we=D[G++],te.dispose=1&we,te.blend=we>>1&1}Q!="ANMF"&&(G+=se)}return S}})(y,0);V.response=y,V.rgbaoutput=!0,V.dataurl=!1;var q=V.header?V.header:null,E=V.frames?V.frames:null;if(q){q.loop_counter=q.loop_count,p=[q.canvas_height],L=[q.canvas_width];for(var K=0;K<E.length&&E[K].blend!=0;K++);}var ae=E[0],J=C.WebPDecodeRGBA(y,ae.src_off,ae.src_size,L,p);ae.rgba=J,ae.imgwidth=L[0],ae.imgheight=p[0];for(var H=0;H<L[0]*p[0]*4;H++)k[H]=J[H];return this.width=L,this.height=p,this.data=k,this}function G5(){var n,e=this.internal.__metadata__.metadata,t=unescape(encodeURIComponent(e));n=this.internal.__metadata__.rawXml?t:'<x:xmpmeta xmlns:x="adobe:ns:meta/"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:jspdf="'+this.internal.__metadata__.namespaceUri+'"><jspdf:metadata>'+t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")+"</jspdf:metadata></rdf:Description></rdf:RDF></x:xmpmeta>",this.internal.__metadata__.metadataObjectNumber=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+n.length+" >>"),this.internal.write("stream"),this.internal.write(n),this.internal.write("endstream"),this.internal.write("endobj")}function Y5(){this.internal.__metadata__.metadataObjectNumber&&this.internal.write("/Metadata "+this.internal.__metadata__.metadataObjectNumber+" 0 R")}(function(n){var e,t,r,i,a,l,o,u,d,h=function(A){return A=A||{},this.isStrokeTransparent=A.isStrokeTransparent||!1,this.strokeOpacity=A.strokeOpacity||1,this.strokeStyle=A.strokeStyle||"#000000",this.fillStyle=A.fillStyle||"#000000",this.isFillTransparent=A.isFillTransparent||!1,this.fillOpacity=A.fillOpacity||1,this.font=A.font||"10px sans-serif",this.textBaseline=A.textBaseline||"alphabetic",this.textAlign=A.textAlign||"left",this.lineWidth=A.lineWidth||1,this.lineJoin=A.lineJoin||"miter",this.lineCap=A.lineCap||"butt",this.path=A.path||[],this.transform=A.transform!==void 0?A.transform.clone():new u,this.globalCompositeOperation=A.globalCompositeOperation||"normal",this.globalAlpha=A.globalAlpha||1,this.clip_path=A.clip_path||[],this.currentPoint=A.currentPoint||new l,this.miterLimit=A.miterLimit||10,this.lastPoint=A.lastPoint||new l,this.lineDashOffset=A.lineDashOffset||0,this.lineDash=A.lineDash||[],this.margin=A.margin||[0,0,0,0],this.prevPageLastElemOffset=A.prevPageLastElemOffset||0,this.ignoreClearRect=typeof A.ignoreClearRect!="boolean"||A.ignoreClearRect,this};n.events.push(["initialized",function(){this.context2d=new b(this),e=this.internal.f2,t=this.internal.getCoordinateString,r=this.internal.getVerticalCoordinateString,i=this.internal.getHorizontalCoordinate,a=this.internal.getVerticalCoordinate,l=this.internal.Point,o=this.internal.Rectangle,u=this.internal.Matrix,d=new h}]);var b=function(A){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var I=A;Object.defineProperty(this,"pdf",{get:function(){return I}});var W=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return W},set:function(F){W=!!F}});var $=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return $},set:function(F){$=!!F}});var X=0;Object.defineProperty(this,"posX",{get:function(){return X},set:function(F){isNaN(F)||(X=F)}});var ie=0;Object.defineProperty(this,"posY",{get:function(){return ie},set:function(F){isNaN(F)||(ie=F)}}),Object.defineProperty(this,"margin",{get:function(){return d.margin},set:function(F){var Ne;
57typeof F=="number"?Ne=[F,F,F,F]:((Ne=new Array(4))[0]=F[0],Ne[1]=F.length>=2?F[1]:Ne[0],Ne[2]=F.length>=3?F[2]:Ne[0],Ne[3]=F.length>=4?F[3]:Ne[1]),d.margin=Ne}});var ue=!1;Object.defineProperty(this,"autoPaging",{get:function(){return ue},set:function(F){ue=F}});var he=0;Object.defineProperty(this,"lastBreak",{get:function(){return he},set:function(F){he=F}});var me=[];Object.defineProperty(this,"pageBreaks",{get:function(){return me},set:function(F){me=F}}),Object.defineProperty(this,"ctx",{get:function(){return d},set:function(F){F instanceof h&&(d=F)}}),Object.defineProperty(this,"path",{get:function(){return d.path},set:function(F){d.path=F}});var Se=[];Object.defineProperty(this,"ctxStack",{get:function(){return Se},set:function(F){Se=F}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(F){var Ne;Ne=x(F),this.ctx.fillStyle=Ne.style,this.ctx.isFillTransparent=Ne.a===0,this.ctx.fillOpacity=Ne.a,this.pdf.setFillColor(Ne.r,Ne.g,Ne.b,{a:Ne.a}),this.pdf.setTextColor(Ne.r,Ne.g,Ne.b,{a:Ne.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(F){var Ne=x(F);this.ctx.strokeStyle=Ne.style,this.ctx.isStrokeTransparent=Ne.a===0,this.ctx.strokeOpacity=Ne.a,Ne.a===0?this.pdf.setDrawColor(255,255,255):(Ne.a,this.pdf.setDrawColor(Ne.r,Ne.g,Ne.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(F){["butt","round","square"].indexOf(F)!==-1&&(this.ctx.lineCap=F,this.pdf.setLineCap(F))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(F){isNaN(F)||(this.ctx.lineWidth=F,this.pdf.setLineWidth(F))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(F){["bevel","round","miter"].indexOf(F)!==-1&&(this.ctx.lineJoin=F,this.pdf.setLineJoin(F))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(F){isNaN(F)||(this.ctx.miterLimit=F,this.pdf.setMiterLimit(F))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(F){this.ctx.textBaseline=F}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(F){["right","end","center","left","start"].indexOf(F)!==-1&&(this.ctx.textAlign=F)}});var Te=null,Ce=null,Fe=null;Object.defineProperty(this,"fontFaces",{get:function(){return Fe},set:function(F){Te=null,Ce=null,Fe=F}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(F){var Ne;if(this.ctx.font=F,(Ne=/^\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(F))!==null){var et=Ne[1];Ne[2];var Ve=Ne[3],ke=Ne[4];Ne[5];var Ke=Ne[6],Ee=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(ke)[2];ke=Math.floor(Ee==="px"?parseFloat(ke)*this.pdf.internal.scaleFactor:Ee==="em"?parseFloat(ke)*this.pdf.getFontSize():parseFloat(ke)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(ke);var Xe=(function(We){var nn,xt,ut=[],ot=We.trim();if(ot==="")return tc;if(ot in Td)return[Td[ot]];for(;ot!=="";){switch(xt=null,nn=(ot=Dd(ot)).charAt(0)){case'"':case"'":xt=q5(ot.substring(1),nn);break;default:xt=U5(ot)}if(xt===null||(ut.push(xt[0]),(ot=Dd(xt[1]))!==""&&ot.charAt(0)!==","))return tc;ot=ot.replace(/^,/,"")}return ut})(Ke);if(this.fontFaces){var Oe=(function(We,nn){var xt=We.getFontList(),ut=JSON.stringify(xt);if(Te===null||Ce!==ut){var ot=(function(Dt){var ze=[];return Object.keys(Dt).forEach(function(Tt){Dt[Tt].forEach(function(Ze){var Je=null;
vendor: 4,594 bytes, line 57
57switch(Ze){case"bold":Je={family:Tt,weight:"bold"};break;case"italic":Je={family:Tt,style:"italic"};break;case"bolditalic":Je={family:Tt,weight:"bold",style:"italic"};break;case"":case"normal":Je={family:Tt}}Je!==null&&(Je.ref={name:Tt,style:Ze},ze.push(Je))})}),ze})(xt);Te=(function(Dt){for(var ze={},Tt=0;Tt<Dt.length;++Tt){var Ze=ec(Dt[Tt]),Je=Ze.family,Vt=Ze.stretch,dt=Ze.style,Ye=Ze.weight;ze[Je]=ze[Je]||{},ze[Je][Vt]=ze[Je][Vt]||{},ze[Je][Vt][dt]=ze[Je][Vt][dt]||{},ze[Je][Vt][dt][Ye]=Ze}return ze})(ot.concat(nn)),Ce=ut}return Te})(this.pdf,this.fontFaces),kt=Xe.map(function(We){return{family:We,stretch:"normal",weight:Ve,style:et}}),vt=(function(We,nn,xt){for(var ut=(xt=xt||{}).defaultFontFamily||"times",ot=Object.assign({},z5,xt.genericFontFamilies||{}),Dt=null,ze=null,Tt=0;Tt<nn.length;++Tt)if(ot[(Dt=ec(nn[Tt])).family]&&(Dt.family=ot[Dt.family]),We.hasOwnProperty(Dt.family)){ze=We[Dt.family];break}if(!(ze=ze||We[ut]))throw new Error("Could not find a font-family for the rule '"+Ed(Dt)+"' and default family '"+ut+"'.");if(ze=(function(Ze,Je){if(Je[Ze])return Je[Ze];var Vt=wc[Ze],dt=Vt<=wc.normal?-1:1,Ye=Pd(Je,xf,Vt,dt);if(!Ye)throw new Error("Could not find a matching font-stretch value for "+Ze);return Ye})(Dt.stretch,ze),ze=(function(Ze,Je){if(Je[Ze])return Je[Ze];for(var Vt=yf[Ze],dt=0;dt<Vt.length;++dt)if(Je[Vt[dt]])return Je[Vt[dt]];throw new Error("Could not find a matching font-style for "+Ze)})(Dt.style,ze),!(ze=(function(Ze,Je){if(Je[Ze])return Je[Ze];if(Ze===400&&Je[500])return Je[500];if(Ze===500&&Je[400])return Je[400];var Vt=R5[Ze],dt=Pd(Je,wf,Vt,Ze<400?-1:1);if(!dt)throw new Error("Could not find a matching font-weight for value "+Ze);return dt})(Dt.weight,ze)))throw new Error("Failed to resolve a font for the rule '"+Ed(Dt)+"'.");return ze})(Oe,kt);this.pdf.setFont(vt.ref.name,vt.ref.style)}else{var rt="";(Ve==="bold"||parseInt(Ve,10)>=700||et==="bold")&&(rt="bold"),et==="italic"&&(rt+="italic"),rt.length===0&&(rt="normal");for(var bt="",mt={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"},Re=0;Re<Xe.length;Re++){if(this.pdf.internal.getFont(Xe[Re],rt,{noFallback:!0,disableWarning:!0})!==void 0){bt=Xe[Re];break}if(rt==="bolditalic"&&this.pdf.internal.getFont(Xe[Re],"bold",{noFallback:!0,disableWarning:!0})!==void 0)bt=Xe[Re],rt="bold";else if(this.pdf.internal.getFont(Xe[Re],"normal",{noFallback:!0,disableWarning:!0})!==void 0){bt=Xe[Re],rt="normal";break}}if(bt===""){for(var at=0;at<Xe.length;at++)if(mt[Xe[at]]){bt=mt[Xe[at]];break}}bt=bt===""?"Times":bt,this.pdf.setFont(bt,rt)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(F){this.ctx.globalCompositeOperation=F}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(F){this.ctx.globalAlpha=F}}),Object.defineProperty(this,"lineDashOffset",{get:function(){return this.ctx.lineDashOffset},set:function(F){this.ctx.lineDashOffset=F,te.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(F){this.ctx.lineDash=F,te.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(F){this.ctx.ignoreClearRect=!!F}})};b.prototype.setLineDash=function(A){this.lineDash=A},b.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},b.prototype.fill=function(){E.call(this,"fill",!1)},b.prototype.stroke=function(){E.call(this,"stroke",!1)},b.prototype.beginPath=function(){this.path=[{type:"begin"}]},b.prototype.moveTo=function(A,I){if(isNaN(A)||isNaN(I))throw qt.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.moveTo");var W=this.ctx.transform.applyToPoint(new l(A,I));this.path.push({type:"mt",x:W.x,y:W.y}),this.ctx.lastPoint=new l(A,I)},b.prototype.closePath=function(){var A=new l(0,0),I=0;for(I=this.path.length-1;I!==-1;I--)if(this.path[I].type==="begin"&&Ut(this.path[I+1])==="object"&&typeof this.path[I+1].x=="number"){A=new l(this.path[I+1].x,this.path[I+1].y);break}this.path.push({type:"close"}),this.ctx.lastPoint=new l(A.x,A.y)},b.prototype.lineTo=function(A,I){if(isNaN(A)||isNaN(I))throw qt.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to 
57jsPDF.context2d.lineTo");var W=this.ctx.transform.applyToPoint(new l(A,I));this.path.push({type:"lt",x:W.x,y:W.y}),this.ctx.lastPoint=new l(W.x,W.y)},b.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),E.call(this,null,!0)},b.prototype.quadraticCurveTo=function(A,I,W,$){if(isNaN(W)||isNaN($)||isNaN(A)||isNaN(I))throw qt.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var X=this.ctx.transform.applyToPoint(new l(W,$)),ie=this.ctx.transform.applyToPoint(new l(A,I));this.path.push({type:"qct",x1:ie.x,y1:ie.y,x:X.x,y:X.y}),this.ctx.lastPoint=new l(X.x,X.y)},b.prototype.bezierCurveTo=function(A,I,W,$,X,ie){if(isNaN(X)||isNaN(ie)||isNaN(A)||isNaN(I)||isNaN(W)||isNaN($))throw qt.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var ue=this.ctx.transform.applyToPoint(new l(X,ie)),he=this.ctx.transform.applyToPoint(new l(A,I)),me=this.ctx.transform.applyToPoint(new l(W,$));this.path.push({type:"bct",x1:he.x,y1:he.y,x2:me.x,y2:me.y,x:ue.x,y:ue.y}),this.ctx.lastPoint=new l(ue.x,ue.y)},b.prototype.arc=function(A,I,W,$,X,ie){if(isNaN(A)||isNaN(I)||isNaN(W)||isNaN($)||isNaN(X))throw qt.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");if(ie=!!ie,!this.ctx.transform.isIdentity){var ue=this.ctx.transform.applyToPoint(new l(A,I));A=ue.x,I=ue.y;var he=this.ctx.transform.applyToPoint(new l(0,W)),me=this.ctx.transform.applyToPoint(new l(0,0));W=Math.sqrt(Math.pow(he.x-me.x,2)+Math.pow(he.y-me.y,2))}Math.abs(X-$)>=2*Math.PI&&($=0,X=2*Math.PI),this.path.push({type:"arc",x:A,y:I,radius:W,startAngle:$,endAngle:X,counterclockwise:ie})},b.prototype.arcTo=function(A,I,W,$,X){throw new Error("arcTo not implemented.")},b.prototype.rect=function(A,I,W,$){if(isNaN(A)||isNaN(I)||isNaN(W)||isNaN($))throw qt.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(A,I),this.lineTo(A+W,I),this.lineTo(A+W,I+$),this.lineTo(A,I+$),this.lineTo(A,I),this.lineTo(A+W,I),this.lineTo(A,I)},b.prototype.fillRect=function(A,I,W,$){if(isNaN(A)||isNaN(I)||isNaN(W)||isNaN($))throw qt.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!p.call(this)){var X={};this.lineCap!=="butt"&&(X.lineCap=this.lineCap,this.lineCap="butt"),this.lineJoin!=="miter"&&(X.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(A,I,W,$),this.fill(),X.hasOwnProperty("lineCap")&&(this.lineCap=X.lineCap),X.hasOwnProperty("lineJoin")&&(this.lineJoin=X.lineJoin)}},b.prototype.strokeRect=function(A,I,W,$){if(isNaN(A)||isNaN(I)||isNaN(W)||isNaN($))throw qt.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");L.call(this)||(this.beginPath(),this.rect(A,I,W,$),this.stroke())},b.prototype.clearRect=function(A,I,W,$){if(isNaN(A)||isNaN(I)||isNaN(W)||isNaN($))throw qt.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(A,I,W,$))},b.prototype.save=function(A){A=typeof A!="boolean"||A;for(var I=this.pdf.internal.getCurrentPageInfo().pageNumber,W=0;W<this.pdf.internal.getNumberOfPages();W++)this.pdf.setPage(W+1),this.pdf.internal.out("q");if(this.pdf.setPage(I),A){this.ctx.fontSize=this.pdf.internal.getFontSize();var $=new h(this.ctx);this.ctxStack.push(this.ctx),this.ctx=$}},b.prototype.restore=function(A){A=typeof A!="boolean"||A;for(var I=this.pdf.internal.getCurrentPageInfo().pageNumber,W=0;W<this.pdf.internal.getNumberOfPages();W++)this.pdf.setPage(W+1),this.pdf.internal.out("Q");this.pdf.setPage(I),A&&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)},b.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.")};var x=function(A){var I,W,$,X;if(A.isCanvasGradient===!0&&(A=A.getColor()),!A)return{r:0,g:0,b:0,a:0,style:A};
vendor: 28,500 bytes, line 57
57if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(A))I=0,W=0,$=0,X=0;else{var ie=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(A);if(ie!==null)I=parseInt(ie[1]),W=parseInt(ie[2]),$=parseInt(ie[3]),X=1;else if((ie=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(A))!==null)I=parseInt(ie[1]),W=parseInt(ie[2]),$=parseInt(ie[3]),X=parseFloat(ie[4]);else{if(X=1,typeof A=="string"&&A.charAt(0)!=="#"){var ue=new hf(A);A=ue.ok?ue.toHex():"#000000"}A.length===4?(I=A.substring(1,2),I+=I,W=A.substring(2,3),W+=W,$=A.substring(3,4),$+=$):(I=A.substring(1,3),W=A.substring(3,5),$=A.substring(5,7)),I=parseInt(I,16),W=parseInt(W,16),$=parseInt($,16)}}return{r:I,g:W,b:$,a:X,style:A}},p=function(){return this.ctx.isFillTransparent||this.globalAlpha==0},L=function(){return!!(this.ctx.isStrokeTransparent||this.globalAlpha==0)};b.prototype.fillText=function(A,I,W,$){if(isNaN(I)||isNaN(W)||typeof A!="string")throw qt.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");if($=isNaN($)?void 0:$,!p.call(this)){var X=se(this.ctx.transform.rotation),ie=this.ctx.transform.scaleX;P.call(this,{text:A,x:I,y:W,scale:ie,angle:X,align:this.textAlign,maxWidth:$})}},b.prototype.strokeText=function(A,I,W,$){if(isNaN(I)||isNaN(W)||typeof A!="string")throw qt.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!L.call(this)){$=isNaN($)?void 0:$;var X=se(this.ctx.transform.rotation),ie=this.ctx.transform.scaleX;P.call(this,{text:A,x:I,y:W,scale:ie,renderingMode:"stroke",angle:X,align:this.textAlign,maxWidth:$})}},b.prototype.measureText=function(A){if(typeof A!="string")throw qt.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var I=this.pdf,W=this.pdf.internal.scaleFactor,$=I.internal.getFontSize(),X=I.getStringUnitWidth(A)*$/I.internal.scaleFactor;return new function(ie){var ue=(ie=ie||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return ue}}),this}({width:X*=Math.round(96*W/72*1e4)/1e4})},b.prototype.scale=function(A,I){if(isNaN(A)||isNaN(I))throw qt.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var W=new u(A,0,0,I,0,0);this.ctx.transform=this.ctx.transform.multiply(W)},b.prototype.rotate=function(A){if(isNaN(A))throw qt.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");var I=new u(Math.cos(A),Math.sin(A),-Math.sin(A),Math.cos(A),0,0);this.ctx.transform=this.ctx.transform.multiply(I)},b.prototype.translate=function(A,I){if(isNaN(A)||isNaN(I))throw qt.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var W=new u(1,0,0,1,A,I);this.ctx.transform=this.ctx.transform.multiply(W)},b.prototype.transform=function(A,I,W,$,X,ie){if(isNaN(A)||isNaN(I)||isNaN(W)||isNaN($)||isNaN(X)||isNaN(ie))throw qt.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var ue=new u(A,I,W,$,X,ie);this.ctx.transform=this.ctx.transform.multiply(ue)},b.prototype.setTransform=function(A,I,W,$,X,ie){A=isNaN(A)?1:A,I=isNaN(I)?0:I,W=isNaN(W)?0:W,$=isNaN($)?1:$,X=isNaN(X)?0:X,ie=isNaN(ie)?0:ie,this.ctx.transform=new u(A,I,W,$,X,ie)};var k=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};b.prototype.drawImage=function(A,I,W,$,X,ie,ue,he,me){var Se=this.pdf.getImageProperties(A),Te=1,Ce=1,Fe=1,F=1;$!==void 0&&he!==void 0&&(Fe=he/$,F=me/X,Te=Se.width/$*he/$,Ce=Se.height/X*me/X),ie===void 0&&(ie=I,ue=W,I=0,W=0),$!==void 0&&he===void 0&&(he=$,me=X),$===void 0&&he===void 0&&(he=Se.width,me=Se.height);var Ne=this.ctx.transform.decompose(),et=se(Ne.rotate.shx),Ve=new u,ke=(Ve=(Ve=(Ve=Ve.multiply(Ne.translate)).multiply(Ne.skew)).multiply(Ne.scale)).applyToRectangle(new o(ie-I*Fe,ue-W*F,$*Te,X*Ce));if(this.autoPaging){for(var Ke,Ee=C.call(this,ke),Xe=[],Oe=0;Oe<Ee.length;Oe+=1)Xe.indexOf(Ee[Oe])===-1&&Xe.push(Ee[Oe]);q(Xe);for(var kt=Xe[0],vt=Xe[Xe.length-1],rt=kt;rt<vt+1;rt++){this.pdf.setPage(rt);var bt=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],mt=rt===1?this.posY+this.margin[0]:this.margin[0],Re=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],at=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],We=rt===1?0:Re+(rt-2)*at;if(this.ctx.clip_path.length!==0){var nn=this.path;Ke=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=V(Ke,this.posX+this.margin[3],-We+mt+this.ctx.prevPageLastElemOffset),K.call(this,"fill",!0),this.path=nn}var xt=JSON.parse(JSON.stringify(ke));xt=V([xt],this.posX+this.margin[3],-We+mt+this.ctx.prevPageLastElemOffset)[0];var ut=(rt>kt||rt<vt)&&k.call(this);ut&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],bt,at,null).clip().discardPath()),this.pdf.addImage(A,"JPEG",xt.x,xt.y,xt.w,xt.h,null,null,et),ut&&this.pdf.restoreGraphicsState()}}else this.pdf.addImage(A,"JPEG",ke.x,ke.y,ke.w,ke.h,null,null,et)};var C=function(A,I,W){var $=[];I=I||this.pdf.internal.pageSize.width,W=W||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var X=this.posY+this.ctx.prevPageLastElemOffset;switch(A.type){default:case"mt":case"lt":$.push(Math.floor((A.y+X)/W)+1);break;case"arc":$.push(Math.floor((A.y+X-A.radius)/W)+1),$.push(Math.floor((A.y+X+A.radius)/W)+1);break;case"qct":var ie=fe(this.ctx.lastPoint.x,this.ctx.lastPoint.y,A.x1,A.y1,A.x,A.y);$.push(Math.floor((ie.y+X)/W)+1),$.push(Math.floor((ie.y+ie.h+X)/W)+1);break;case"bct":var ue=we(this.ctx.lastPoint.x,this.ctx.lastPoint.y,A.x1,A.y1,A.x2,A.y2,A.x,A.y);$.push(Math.floor((ue.y+X)/W)+1),$.push(Math.floor((ue.y+ue.h+X)/W)+1);break;case"rect":$.push(Math.floor((A.y+X)/W)+1),$.push(Math.floor((A.y+A.h+X)/W)+1)}for(var he=0;he<$.length;he+=1)for(;this.pdf.internal.getNumberOfPages()<$[he];)y.call(this);return $},y=function(){var A=this.fillStyle,I=this.strokeStyle,W=this.font,$=this.lineCap,X=this.lineWidth,ie=this.lineJoin;this.pdf.addPage(),this.fillStyle=A,this.strokeStyle=I,this.font=W,this.lineCap=$,this.lineWidth=X,this.lineJoin=ie},V=function(A,I,W){for(var $=0;$<A.length;$++)switch(A[$].type){case"bct":A[$].x2+=I,A[$].y2+=W;case"qct":A[$].x1+=I,A[$].y1+=W;default:A[$].x+=I,A[$].y+=W}return A},q=function(A){return A.sort(function(I,W){return I-W})},E=function(A,I){var W=this.fillStyle,$=this.strokeStyle,X=this.lineCap,ie=this.lineWidth,ue=Math.abs(ie*this.ctx.transform.scaleX),he=this.lineJoin;if(this.autoPaging){for(var me,Se,Te=JSON.parse(JSON.stringify(this.path)),Ce=JSON.parse(JSON.stringify(this.path)),Fe=[],F=0;F<Ce.length;F++)if(Ce[F].x!==void 0)for(var Ne=C.call(this,Ce[F]),et=0;et<Ne.length;et+=1)Fe.indexOf(Ne[et])===-1&&Fe.push(Ne[et]);for(var Ve=0;Ve<Fe.length;Ve++)for(;this.pdf.internal.getNumberOfPages()<Fe[Ve];)y.call(this);q(Fe);for(var ke=Fe[0],Ke=Fe[Fe.length-1],Ee=ke;Ee<Ke+1;Ee++){this.pdf.setPage(Ee),this.fillStyle=W,this.strokeStyle=$,this.lineCap=X,this.lineWidth=ue,this.lineJoin=he;var Xe=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],Oe=Ee===1?this.posY+this.margin[0]:this.margin[0],kt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],vt=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],rt=Ee===1?0:kt+(Ee-2)*vt;if(this.ctx.clip_path.length!==0){var bt=this.path;me=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=V(me,this.posX+this.margin[3],-rt+Oe+this.ctx.prevPageLastElemOffset),K.call(this,A,!0),this.path=bt}if(Se=JSON.parse(JSON.stringify(Te)),this.path=V(Se,this.posX+this.margin[3],-rt+Oe+this.ctx.prevPageLastElemOffset),I===!1||Ee===0){var mt=(Ee>ke||Ee<Ke)&&k.call(this);mt&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],Xe,vt,null).clip().discardPath()),K.call(this,A,I),mt&&this.pdf.restoreGraphicsState()}this.lineWidth=ie}this.path=Te}else this.lineWidth=ue,K.call(this,A,I),this.lineWidth=ie},K=function(A,I){if((A!=="stroke"||I||!L.call(this))&&(A==="stroke"||I||!p.call(this))){for(var W,$,X=[],ie=this.path,ue=0;ue<ie.length;ue++){var he=ie[ue];switch(he.type){case"begin":X.push({begin:!0});break;case"close":X.push({close:!0});break;case"mt":X.push({start:he,deltas:[],abs:[]});break;case"lt":var me=X.length;if(ie[ue-1]&&!isNaN(ie[ue-1].x)&&(W=[he.x-ie[ue-1].x,he.y-ie[ue-1].y],me>0)){for(;me>=0;me--)if(X[me-1].close!==!0&&X[me-1].begin!==!0){X[me-1].deltas.push(W),X[me-1].abs.push(he);break}}break;case"bct":W=[he.x1-ie[ue-1].x,he.y1-ie[ue-1].y,he.x2-ie[ue-1].x,he.y2-ie[ue-1].y,he.x-ie[ue-1].x,he.y-ie[ue-1].y],X[X.length-1].deltas.push(W);break;case"qct":var Se=ie[ue-1].x+2/3*(he.x1-ie[ue-1].x),Te=ie[ue-1].y+2/3*(he.y1-ie[ue-1].y),Ce=he.x+2/3*(he.x1-he.x),Fe=he.y+2/3*(he.y1-he.y),F=he.x,Ne=he.y;W=[Se-ie[ue-1].x,Te-ie[ue-1].y,Ce-ie[ue-1].x,Fe-ie[ue-1].y,F-ie[ue-1].x,Ne-ie[ue-1].y],X[X.length-1].deltas.push(W);break;case"arc":X.push({deltas:[],abs:[],arc:!0}),Array.isArray(X[X.length-1].abs)&&X[X.length-1].abs.push(he)}}$=I?null:A==="stroke"?"stroke":"fill";for(var et=!1,Ve=0;Ve<X.length;Ve++)if(X[Ve].arc)for(var ke=X[Ve].abs,Ke=0;Ke<ke.length;Ke++){var Ee=ke[Ke];Ee.type==="arc"?H.call(this,Ee.x,Ee.y,Ee.radius,Ee.startAngle,Ee.endAngle,Ee.counterclockwise,void 0,I,!et):B.call(this,Ee.x,Ee.y),et=!0}else if(X[Ve].close===!0)this.pdf.internal.out("h"),et=!1;else if(X[Ve].begin!==!0){var Xe=X[Ve].start.x,Oe=X[Ve].start.y;U.call(this,X[Ve].deltas,Xe,Oe),et=!0}$&&D.call(this,$),I&&G.call(this)}},ae=function(A){var I=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,W=I*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return A-W;case"top":return A+I-W;case"hanging":return A+I-2*W;case"middle":return A+I/2-W;default:return A}},J=function(A){return A+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};b.prototype.createLinearGradient=function(){var A=function(){};return A.colorStops=[],A.addColorStop=function(I,W){this.colorStops.push([I,W])},A.getColor=function(){return this.colorStops.length===0?"#000000":this.colorStops[0][1]},A.isCanvasGradient=!0,A},b.prototype.createPattern=function(){return this.createLinearGradient()},b.prototype.createRadialGradient=function(){return this.createLinearGradient()};var H=function(A,I,W,$,X,ie,ue,he,me){for(var Se=Q.call(this,W,$,X,ie),Te=0;Te<Se.length;Te++){var Ce=Se[Te];Te===0&&(me?S.call(this,Ce.x1+A,Ce.y1+I):B.call(this,Ce.x1+A,Ce.y1+I)),re.call(this,A,I,Ce.x2,Ce.y2,Ce.x3,Ce.y3,Ce.x4,Ce.y4)}he?G.call(this):D.call(this,ue)},D=function(A){switch(A){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},G=function(){this.pdf.clip(),this.pdf.discardPath()},S=function(A,I){this.pdf.internal.out(t(A)+" "+r(I)+" m")},P=function(A){var I;switch(A.align){case"right":case"end":I="right";break;case"center":I="center";break;default:I="left"}var W,$,X,ie=this.pdf.getTextDimensions(A.text),ue=ae.call(this,A.y),he=J.call(this,ue)-ie.h,me=this.ctx.transform.applyToPoint(new l(A.x,ue));if(this.autoPaging){var Se=this.ctx.transform.decompose(),Te=new u;Te=(Te=(Te=Te.multiply(Se.translate)).multiply(Se.skew)).multiply(Se.scale);for(var Ce=this.ctx.transform.applyToRectangle(new o(A.x,ue,ie.w,ie.h)),Fe=Te.applyToRectangle(new o(A.x,he,ie.w,ie.h)),F=C.call(this,Fe),Ne=[],et=0;et<F.length;et+=1)Ne.indexOf(F[et])===-1&&Ne.push(F[et]);q(Ne);for(var Ve=Ne[0],ke=Ne[Ne.length-1],Ke=Ve;Ke<ke+1;Ke++){this.pdf.setPage(Ke);var Ee=Ke===1?this.posY+this.margin[0]:this.margin[0],Xe=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],Oe=this.pdf.internal.pageSize.height-this.margin[2],kt=Oe-this.margin[0],vt=this.pdf.internal.pageSize.width-this.margin[1],rt=vt-this.margin[3],bt=Ke===1?0:Xe+(Ke-2)*kt;if(this.ctx.clip_path.length!==0){var mt=this.path;W=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=V(W,this.posX+this.margin[3],-1*bt+Ee),K.call(this,"fill",!0),this.path=mt}var Re=V([JSON.parse(JSON.stringify(Fe))],this.posX+this.margin[3],-bt+Ee+this.ctx.prevPageLastElemOffset)[0];A.scale>=.01&&($=this.pdf.internal.getFontSize(),this.pdf.setFontSize($*A.scale),X=this.lineWidth,this.lineWidth=X*A.scale);var at=this.autoPaging!=="text";if(at||Re.y+Re.h<=Oe){if(at||Re.y>=Ee&&Re.x<=vt){var We=at?A.text:this.pdf.splitTextToSize(A.text,A.maxWidth||vt-Re.x)[0],nn=V([JSON.parse(JSON.stringify(Ce))],this.posX+this.margin[3],-bt+Ee+this.ctx.prevPageLastElemOffset)[0],xt=at&&(Ke>Ve||Ke<ke)&&k.call(this);xt&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],rt,kt,null).clip().discardPath()),this.pdf.text(We,nn.x,nn.y,{angle:A.angle,align:I,renderingMode:A.renderingMode}),xt&&this.pdf.restoreGraphicsState()}}else Re.y<Oe&&(this.ctx.prevPageLastElemOffset+=Oe-Re.y);A.scale>=.01&&(this.pdf.setFontSize($),this.lineWidth=X)}}else A.scale>=.01&&($=this.pdf.internal.getFontSize(),this.pdf.setFontSize($*A.scale),X=this.lineWidth,this.lineWidth=X*A.scale),this.pdf.text(A.text,me.x+this.posX,me.y+this.posY,{angle:A.angle,align:I,renderingMode:A.renderingMode,maxWidth:A.maxWidth}),A.scale>=.01&&(this.pdf.setFontSize($),this.lineWidth=X)},B=function(A,I,W,$){W=W||0,$=$||0,this.pdf.internal.out(t(A+W)+" "+r(I+$)+" l")},U=function(A,I,W){return this.pdf.lines(A,I,W,null,null)},re=function(A,I,W,$,X,ie,ue,he){this.pdf.internal.out([e(i(W+A)),e(a($+I)),e(i(X+A)),e(a(ie+I)),e(i(ue+A)),e(a(he+I)),"c"].join(" "))},Q=function(A,I,W,$){for(var X=2*Math.PI,ie=Math.PI/2;I>W;)I-=X;var ue=Math.abs(W-I);ue<X&&$&&(ue=X-ue);for(var he=[],me=$?-1:1,Se=I;ue>1e-5;){var Te=Se+me*Math.min(ue,ie);he.push(de.call(this,A,Se,Te)),ue-=Math.abs(Te-Se),Se=Te}return he},de=function(A,I,W){var $=(W-I)/2,X=A*Math.cos($),ie=A*Math.sin($),ue=X,he=-ie,me=ue*ue+he*he,Se=me+ue*X+he*ie,Te=4/3*(Math.sqrt(2*me*Se)-Se)/(ue*ie-he*X),Ce=ue-Te*he,Fe=he+Te*ue,F=Ce,Ne=-Fe,et=$+I,Ve=Math.cos(et),ke=Math.sin(et);return{x1:A*Math.cos(I),y1:A*Math.sin(I),x2:Ce*Ve-Fe*ke,y2:Ce*ke+Fe*Ve,x3:F*Ve-Ne*ke,y3:F*ke+Ne*Ve,x4:A*Math.cos(W),y4:A*Math.sin(W)}},se=function(A){return 180*A/Math.PI},fe=function(A,I,W,$,X,ie){var ue=A+.5*(W-A),he=I+.5*($-I),me=X+.5*(W-X),Se=ie+.5*($-ie),Te=Math.min(A,X,ue,me),Ce=Math.max(A,X,ue,me),Fe=Math.min(I,ie,he,Se),F=Math.max(I,ie,he,Se);return new o(Te,Fe,Ce-Te,F-Fe)},we=function(A,I,W,$,X,ie,ue,he){var me,Se,Te,Ce,Fe,F,Ne,et,Ve,ke,Ke,Ee,Xe,Oe,kt=W-A,vt=$-I,rt=X-W,bt=ie-$,mt=ue-X,Re=he-ie;for(Se=0;Se<41;Se++)Ve=(Ne=(Te=A+(me=Se/40)*kt)+me*((Fe=W+me*rt)-Te))+me*(Fe+me*(X+me*mt-Fe)-Ne),ke=(et=(Ce=I+me*vt)+me*((F=$+me*bt)-Ce))+me*(F+me*(ie+me*Re-F)-et),Se==0?(Ke=Ve,Ee=ke,Xe=Ve,Oe=ke):(Ke=Math.min(Ke,Ve),Ee=Math.min(Ee,ke),Xe=Math.max(Xe,Ve),Oe=Math.max(Oe,ke));return new o(Math.round(Ke),Math.round(Ee),Math.round(Xe-Ke),Math.round(Oe-Ee))},te=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var A,I,W=(A=this.ctx.lineDash,I=this.ctx.lineDashOffset,JSON.stringify({lineDash:A,lineDashOffset:I}));this.prevLineDash!==W&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=W)}}})(Ge.API),(function(n){var e=function(l){var o,u,d,h,b,x,p,L,k,C;for(u=[],d=0,h=(l+=o="\0\0\0\0".slice(l.length%4||4)).length;h>d;d+=4)(b=(l.charCodeAt(d)<<24)+(l.charCodeAt(d+1)<<16)+(l.charCodeAt(d+2)<<8)+l.charCodeAt(d+3))!==0?(x=(b=((b=((b=((b=(b-(C=b%85))/85)-(k=b%85))/85)-(L=b%85))/85)-(p=b%85))/85)%85,u.push(x+33,p+33,L+33,k+33,C+33)):u.push(122);return(function(y,V){for(var q=V;q>0;q--)y.pop()})(u,o.length),String.fromCharCode.apply(String,u)+"~>"},t=function(l){var o,u,d,h,b,x=String,p="length",L=255,k="charCodeAt",C="slice",y="replace";for(l[C](-2),l=l[C](0,-2)[y](/\s/g,"")[y]("z","!!!!!"),d=[],h=0,b=(l+=o="uuuuu"[C](l[p]%5||5))[p];b>h;h+=5)u=52200625*(l[k](h)-33)+614125*(l[k](h+1)-33)+7225*(l[k](h+2)-33)+85*(l[k](h+3)-33)+(l[k](h+4)-33),d.push(L&u>>24,L&u>>16,L&u>>8,L&u);return(function(V,q){for(var E=q;E>0;E--)V.pop()})(d,o[p]),x.fromCharCode.apply(x,d)},r=function(l){return l.split("").map(function(o){return("0"+o.charCodeAt().toString(16)).slice(-2)}).join("")+">"},i=function(l){var o=new RegExp(/^([0-9A-Fa-f]{2})+$/);if((l=l.replace(/\s/g,"")).indexOf(">")!==-1&&(l=l.substr(0,l.indexOf(">"))),l.length%2&&(l+="0"),o.test(l)===!1)return"";for(var u="",d=0;d<l.length;d+=2)u+=String.fromCharCode("0x"+(l[d]+l[d+1]));return u},a=function(l){for(var o=new Uint8Array(l.length),u=l.length;u--;)o[u]=l.charCodeAt(u);return(o=pc(o)).reduce(function(d,h){return d+String.fromCharCode(h)},"")};n.processDataByFilters=function(l,o){var u=0,d=l||"",h=[];for(typeof(o=o||[])=="string"&&(o=[o]),u=0;u<o.length;u+=1)switch(o[u]){case"ASCII85Decode":case"/ASCII85Decode":d=t(d),h.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":d=e(d),h.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":d=i(d),h.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":d=r(d),h.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":d=a(d),h.push("/FlateDecode");break;default:throw new Error('The filter: "'+o[u]+'" is not implemented')}return{data:d,reverseChain:h.reverse().join(" ")}}})(Ge.API),(function(n){n.loadFile=function(e,t,r){return(function(i,a,l){a=a!==!1,l=typeof l=="function"?l:function(){};var o=void 0;try{o=(function(u,d,h){var b=new XMLHttpRequest,x=0,p=function(L){var k=L.length,C=[],y=String.fromCharCode;for(x=0;x<k;x+=1)C.push(y(255&L.charCodeAt(x)));return C.join("")};if(b.open("GET",u,!d),b.overrideMimeType("text/plain; charset=x-user-defined"),d===!1&&(b.onload=function(){b.status===200?h(p(this.responseText)):h(void 0)}),b.send(null),d&&b.status===200)return p(b.responseText)})(i,a,l)}catch{}return o})(e,t,r)},n.allowFsRead=void 0,n.loadImageFile=n.loadFile})(Ge.API),(function(n){function e(){return(nt.html2canvas?Promise.resolve(nt.html2canvas):en(()=>import("./html2canvas.esm-DXEQVQnt.js"),[])).catch(function(o){return Promise.reject(new Error("Could not load html2canvas: "+o))}).then(function(o){return o.default?o.default:o})}function t(){return(nt.DOMPurify?Promise.resolve(nt.DOMPurify):en(()=>import("./purify.es-CovBOfck.js"),[])).catch(function(o){return Promise.reject(new Error("Could not load dompurify: "+o))}).then(function(o){return o.default?o.default:o})}var r=function(o){var u=Ut(o);return u==="undefined"?"undefined":u==="string"||o instanceof String?"string":u==="number"||o instanceof Number?"number":u==="function"||o instanceof Function?"function":o&&o.constructor===Array?"array":o&&o.nodeType===1?"element":u==="object"?"object":"unknown"},i=function(o,u){var d=document.createElement(o);for(var h in u.className&&(d.className=u.className),u.innerHTML&&u.dompurify&&(d.innerHTML=u.dompurify.sanitize(u.innerHTML)),u.style)d.style[h]=u.style[h];return d},a=function o(u,d){for(var h=u.nodeType===3?document.createTextNode(u.nodeValue):u.cloneNode(!1),b=u.firstChild;b;b=b.nextSibling)d!==!0&&b.nodeType===1&&b.nodeName==="SCRIPT"||h.appendChild(o(b,d));return u.nodeType===1&&(u.nodeName==="CANVAS"?(h.width=u.width,h.height=u.height,h.getContext("2d").drawImage(u,0,0)):u.nodeName!=="TEXTAREA"&&u.nodeName!=="SELECT"||(h.value=u.value),h.addEventListener("load",function(){h.scrollTop=u.scrollTop,h.scrollLeft=u.scrollLeft},!0)),h},l=function o(u){var d=Object.assign(o.convert(Promise.resolve()),JSON.parse(JSON.stringify(o.template))),h=o.convert(Promise.resolve(),d);return(h=h.setProgress(1,o,1,[o])).set(u)};(l.prototype=Object.create(Promise.prototype)).constructor=l,l.convert=function(o,u){return o.__proto__=u||l.prototype,o},l.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"}},l.prototype.from=function(o,u){return this.then(function(){switch(u=u||(function(d){switch(r(d)){case"string":return"string";case"element":return d.nodeName.toLowerCase()==="canvas"?"canvas":"element";default:return"unknown"}})(o),u){case"string":return this.then(t).then(function(d){return this.set({src:i("div",{innerHTML:o,dompurify:d})})});case"element":return this.set({src:o});case"canvas":return this.set({canvas:o});case"img":return this.set({img:o});default:return this.error("Unknown source type.")}})},l.prototype.to=function(o){switch(o){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.")}},l.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 o={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},u=a(this.prop.src,this.opt.html2canvas.javascriptEnabled);u.tagName==="BODY"&&(o.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=i("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=i("div",{className:"html2pdf__container",style:o}),this.prop.container.appendChild(u),this.prop.container.firstChild.appendChild(i("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"})},l.prototype.toCanvas=function(){var o=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(o).then(e).then(function(u){var d=Object.assign({},this.opt.html2canvas);return delete d.onrendered,u(this.prop.container,d)}).then(function(u){(this.opt.html2canvas.onrendered||function(){})(u),this.prop.canvas=u,document.body.removeChild(this.prop.overlay)})},l.prototype.toContext2d=function(){var o=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(o).then(e).then(function(u){var d=this.opt.jsPDF,h=this.opt.fontFaces,b=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,x=Object.assign({async:!0,allowTaint:!0,scale:b,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 x.onrendered,d.context2d.autoPaging=this.opt.autoPaging===void 0||this.opt.autoPaging,d.context2d.posX=this.opt.x,d.context2d.posY=this.opt.y,d.context2d.margin=this.opt.margin,d.context2d.fontFaces=h,h)for(var p=0;p<h.length;++p){var L=h[p],k=L.src.find(function(C){return C.format==="truetype"});k&&d.addFont(k.url,L.ref.name,L.ref.style)}return x.windowHeight=x.windowHeight||0,x.windowHeight=x.windowHeight==0?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):x.windowHeight,d.context2d.save(!0),u(this.prop.container,x)}).then(function(u){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(u),this.prop.canvas=u,document.body.removeChild(this.prop.overlay)})},l.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var o=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=o})},l.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF})},l.prototype.output=function(o,u,d){return(d=d||"pdf").toLowerCase()==="img"||d.toLowerCase()==="image"?this.outputImg(o,u):this.outputPdf(o,u)},l.prototype.outputPdf=function(o,u){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(o,u)})},l.prototype.outputImg=function(o){return this.thenList([function(){return this.prop.img||this.toImg()}]).then(function(){switch(o){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 "'+o+'" is not supported.'}})},l.prototype.save=function(o){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(o?{filename:o}:null).then(function(){this.prop.pdf.save(this.opt.filename)})},l.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf)})},l.prototype.set=function(o){if(r(o)!=="object")return this;var u=Object.keys(o||{}).map(function(d){if(d in l.template.prop)return function(){this.prop[d]=o[d]};switch(d){case"margin":return this.setMargin.bind(this,o.margin);case"jsPDF":return function(){return this.opt.jsPDF=o.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,o.pageSize);default:return function(){this.opt[d]=o[d]}}},this);return this.then(function(){return this.thenList(u)})},l.prototype.get=function(o,u){return this.then(function(){var d=o in l.template.prop?this.prop[o]:this.opt[o];return u?u(d):d})},l.prototype.setMargin=function(o){return this.then(function(){switch(r(o)){case"number":o=[o,o,o,o];case"array":if(o.length===2&&(o=[o[0],o[1],o[0],o[1]]),o.length===4)break;default:return this.error("Invalid margin array.")}this.opt.margin=o}).then(this.setPageSize)},l.prototype.setPageSize=function(o){function u(d,h){return Math.floor(d*h/72*96)}return this.then(function(){(o=o||Ge.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(o.inner={width:o.width-this.opt.margin[1]-this.opt.margin[3],height:o.height-this.opt.margin[0]-this.opt.margin[2]},o.inner.px={width:u(o.inner.width,o.k),height:u(o.inner.height,o.k)},o.inner.ratio=o.inner.height/o.inner.width),this.prop.pageSize=o})},l.prototype.setProgress=function(o,u,d,h){return o!=null&&(this.progress.val=o),u!=null&&(this.progress.state=u),d!=null&&(this.progress.n=d),h!=null&&(this.progress.stack=h),this.progress.ratio=this.progress.val/this.progress.state,this},l.prototype.updateProgress=function(o,u,d,h){return this.setProgress(o?this.progress.val+o:null,u||null,d?this.progress.n+d:null,h?this.progress.stack.concat(h):null)},l.prototype.then=function(o,u){var d=this;return this.thenCore(o,u,function(h,b){return d.updateProgress(null,null,1,[h]),Promise.prototype.then.call(this,function(x){return d.updateProgress(null,h),x}).then(h,b).then(function(x){return d.updateProgress(1),x})})},l.prototype.thenCore=function(o,u,d){d=d||Promise.prototype.then;var h=this;o&&(o=o.bind(h)),u&&(u=u.bind(h));var b=Promise.toString().indexOf("[native code]")!==-1&&Promise.name==="Promise"?h:l.convert(Object.assign({},h),Promise.prototype),x=d.call(b,o,u);return l.convert(x,h.__proto__)},l.prototype.thenExternal=function(o,u){return Promise.prototype.then.call(this,o,u)},l.prototype.thenList=function(o){var u=this;return o.forEach(function(d){u=u.thenCore(d)}),u},l.prototype.catch=function(o){o&&(o=o.bind(this));var u=Promise.prototype.catch.call(this,o);return l.convert(u,this)},l.prototype.catchExternal=function(o){return Promise.prototype.catch.call(this,o)},l.prototype.error=function(o){return this.then(function(){throw new Error(o)})},l.prototype.using=l.prototype.set,l.prototype.saveAs=l.prototype.save,l.prototype.exp
57ort=l.prototype.output,l.prototype.run=l.prototype.then,Ge.getPageSize=function(o,u,d){if(Ut(o)==="object"){var h=o;o=h.orientation,u=h.unit||u,d=h.format||d}u=u||"mm",d=d||"a4",o=(""+(o||"P")).toLowerCase();var b,x=(""+d).toLowerCase(),p={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(u){case"pt":b=1;break;case"mm":b=72/25.4;break;case"cm":b=72/2.54;break;case"in":b=72;break;case"px":b=.75;break;case"pc":case"em":b=12;break;case"ex":b=6;break;default:throw"Invalid unit: "+u}var L,k=0,C=0;if(p.hasOwnProperty(x))k=p[x][1]/b,C=p[x][0]/b;else try{k=d[1],C=d[0]}catch{throw new Error("Invalid format: "+d)}if(o==="p"||o==="portrait")o="p",C>k&&(L=C,C=k,k=L);else{if(o!=="l"&&o!=="landscape")throw"Invalid orientation: "+o;o="l",k>C&&(L=C,C=k,k=L)}return{width:C,height:k,unit:u,k:b,orientation:o}},n.html=function(o,u){(u=u||{}).callback=u.callback||function(){},u.html2canvas=u.html2canvas||{},u.html2canvas.canvas=u.html2canvas.canvas||this.canvas,u.jsPDF=u.jsPDF||this,u.fontFaces=u.fontFaces?u.fontFaces.map(ec):null;var d=new l(u);return u.worker?d:d.from(o).doCallback()}})(Ge.API),Ge.API.addJS=function(n){var e,t,r=(function(i){for(var a="",l=0;l<i.length;l++){var o=i[l];if(o==="("||o===")"){for(var u=0,d=l-1;d>=0&&i[d]==="\\";d--)u++;a+=u%2==0?"\\"+o:o}else a+=o}return a})(n);return this.internal.events.subscribe("postPutResources",function(){e=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(e+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),t=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+r+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){e!==void 0&&t!==void 0&&this.internal.out("/Names <</JavaScript "+e+" 0 R>>")}),this},(function(n){var e;n.events.push(["postPutResources",function(){var t=this,r=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var i=t.outline.render().split(/\r\n/),a=0;a<i.length;a++){var l=i[a],o=r.exec(l);
vendor: 15,118 bytes, lines 57-63
57if(o!=null){var u=o[1];t.internal.newObjectDeferredBegin(u,!1)}t.internal.write(l)}if(this.outline.createNamedDestinations){var d=this.internal.pages.length,h=[];for(a=0;a<d;a++){var b=t.internal.newObject();h.push(b);var x=t.internal.getPageInfo(a+1);t.internal.write("<< /D["+x.objId+" 0 R /XYZ null null null]>> endobj")}var p=t.internal.newObject();for(t.internal.write("<< /Names [ "),a=0;a<h.length;a++)t.internal.write("(page_"+(a+1)+")"+h[a]+" 0 R");t.internal.write(" ] >>","endobj"),e=t.internal.newObject(),t.internal.write("<< /Dests "+p+" 0 R"),t.internal.write(">>","endobj")}}]),n.events.push(["putCatalog",function(){var t=this;t.outline.root.children.length>0&&(t.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&t.internal.write("/Names "+e+" 0 R"))}]),n.events.push(["initialized",function(){var t=this;t.outline={createNamedDestinations:!1,root:{children:[]}},t.outline.add=function(r,i,a){var l={title:i,options:a,children:[]};return r==null&&(r=this.root),r.children.push(l),l},t.outline.render=function(){return this.ctx={},this.ctx.val="",this.ctx.pdf=t,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},t.outline.genIds_r=function(r){r.id=t.internal.newObjectDeferred();for(var i=0;i<r.children.length;i++)this.genIds_r(r.children[i])},t.outline.renderRoot=function(r){this.objStart(r),this.line("/Type /Outlines"),r.children.length>0&&(this.line("/First "+this.makeRef(r.children[0])),this.line("/Last "+this.makeRef(r.children[r.children.length-1]))),this.line("/Count "+this.count_r({count:0},r)),this.objEnd()},t.outline.renderItems=function(r){for(var i=this.ctx.pdf.internal.getVerticalCoordinateString,a=0;a<r.children.length;a++){var l=r.children[a];this.objStart(l),this.line("/Title "+this.makeString(l.title)),this.line("/Parent "+this.makeRef(r)),a>0&&this.line("/Prev "+this.makeRef(r.children[a-1])),a<r.children.length-1&&this.line("/Next "+this.makeRef(r.children[a+1])),l.children.length>0&&(this.line("/First "+this.makeRef(l.children[0])),this.line("/Last "+this.makeRef(l.children[l.children.length-1])));var o=this.count=this.count_r({count:0},l);if(o>0&&this.line("/Count "+o),l.options&&l.options.pageNumber){var u=t.internal.getPageInfo(l.options.pageNumber);this.line("/Dest ["+u.objId+" 0 R /XYZ 0 "+i(0)+" 0]")}this.objEnd()}for(var d=0;d<r.children.length;d++)this.renderItems(r.children[d])},t.outline.line=function(r){this.ctx.val+=r+`\r
58`},t.outline.makeRef=function(r){return r.id+" 0 R"},t.outline.makeString=function(r){return"("+t.internal.pdfEscape(r)+")"},t.outline.objStart=function(r){this.ctx.val+=`\r
59`+r.id+` 0 obj\r
60<<\r
61`},t.outline.objEnd=function(){this.ctx.val+=`>> \r
62endobj\r
63`},t.outline.count_r=function(r,i){for(var a=0;a<i.children.length;a++)r.count++,this.count_r(r,i.children[a]);return r.count}}])})(Ge.API),(function(n){var e=[192,193,194,195,196,197,198,199];n.processJPEG=function(t,r,i,a,l,o){var u,d=this.decode.DCT_DECODE,h=null;if(typeof t=="string"||this.__addimage__.isArrayBuffer(t)||this.__addimage__.isArrayBufferView(t)){switch(t=l||t,t=this.__addimage__.isArrayBuffer(t)?new Uint8Array(t):t,u=(function(b){for(var x,p=256*b.charCodeAt(4)+b.charCodeAt(5),L=b.length,k={width:0,height:0,numcomponents:1},C=4;C<L;C+=2){if(C+=p,e.indexOf(b.charCodeAt(C+1))!==-1){x=256*b.charCodeAt(C+5)+b.charCodeAt(C+6),k={width:256*b.charCodeAt(C+7)+b.charCodeAt(C+8),height:x,numcomponents:b.charCodeAt(C+9)};break}p=256*b.charCodeAt(C+2)+b.charCodeAt(C+3)}return k})(t=this.__addimage__.isArrayBufferView(t)?this.__addimage__.arrayBufferToBinaryString(t):t),u.numcomponents){case 1:o=this.color_spaces.DEVICE_GRAY;break;case 4:o=this.color_spaces.DEVICE_CMYK;break;case 3:o=this.color_spaces.DEVICE_RGB}h={data:t,width:u.width,height:u.height,colorSpace:o,bitsPerComponent:8,filter:d,index:r,alias:i}}return h}})(Ge.API),Ge.API.processPNG=function(n,e,t,r){if(this.__addimage__.isArrayBuffer(n)&&(n=new Uint8Array(n)),this.__addimage__.isArrayBufferView(n)){var i,a=k5(n,{checkCrc:!0}),l=a.width,o=a.height,u=a.channels,d=a.palette,h=a.depth;i=d&&u===1?(function(H){for(var D=H.width,G=H.height,S=H.data,P=H.palette,B=H.depth,U=!1,re=[],Q=[],de=void 0,se=!1,fe=0,we=0;we<P.length;we++){var te=hu(P[we],4),A=te[0],I=te[1],W=te[2],$=te[3];re.push(A,I,W),$!=null&&($===0?(fe++,Q.length<1&&Q.push(we)):$<255&&(se=!0))}if(se||fe>1){U=!0,Q=void 0;var X=D*G;de=new Uint8Array(X);for(var ie=new DataView(S.buffer),ue=0;ue<X;ue++){var he=nc(ie,ue,B),me=hu(P[he],4)[3];de[ue]=me}}else fe===0&&(Q=void 0);return{colorSpace:"Indexed",colorsPerPixel:1,sMaskBitsPerComponent:U?8:void 0,colorBytes:S,alphaBytes:de,needSMask:U,palette:re,mask:Q}})(a):u===2||u===4?(function(H){for(var D=H.data,G=H.width,S=H.height,P=H.channels,B=H.depth,U=P===2?"DeviceGray":"DeviceRGB",re=P-1,Q=G*S,de=re,se=Q*de,fe=1*Q,we=Math.ceil(se*B/8),te=Math.ceil(fe*B/8),A=new Uint8Array(we),I=new Uint8Array(te),W=new DataView(D.buffer),$=new DataView(A.buffer),X=new DataView(I.buffer),ie=!1,ue=0;ue<Q;ue++){for(var he=ue*P,me=0;me<de;me++)Ud($,nc(W,he+me,B),ue*de+me,B);var Se=nc(W,he+de,B);Se<(1<<B)-1&&(ie=!0),Ud(X,Se,1*ue,B)}return{colorSpace:U,colorsPerPixel:re,sMaskBitsPerComponent:ie?B:void 0,colorBytes:A,alphaBytes:I,needSMask:ie}})(a):(function(H){var D=H.data,G=H.channels===1?"DeviceGray":"DeviceRGB";return{colorSpace:G,colorsPerPixel:G==="DeviceGray"?1:3,colorBytes:D instanceof Uint16Array?(function(S){for(var P=S.length,B=new Uint8Array(2*P),U=new DataView(B.buffer,B.byteOffset,B.byteLength),re=0;re<P;re++)U.setUint16(2*re,S[re],!1);return B})(D):D,needSMask:!1}})(a);var b,x,p,L=i,k=L.colorSpace,C=L.colorsPerPixel,y=L.sMaskBitsPerComponent,V=L.colorBytes,q=L.alphaBytes,E=L.needSMask,K=L.palette,ae=L.mask,J=null;return r!==Ge.API.image_compression.NONE&&typeof pc=="function"?(J=(function(H){var D;switch(H){case Ge.API.image_compression.FAST:D=11;break;case Ge.API.image_compression.MEDIUM:D=13;break;case Ge.API.image_compression.SLOW:D=14;break;default:D=12}return D})(r),b=this.decode.FLATE_DECODE,x="/Predictor ".concat(J," /Colors ").concat(C," /BitsPerComponent ").concat(h," /Columns ").concat(l),n=Od(V,Math.ceil(l*C*h/8),C,h,r),E&&(p=Od(q,Math.ceil(l*y/8),1,y,r))):(b=void 0,x=void 0,n=V,E&&(p=q)),(this.__addimage__.isArrayBuffer(n)||this.__addimage__.isArrayBufferView(n))&&(n=this.__addimage__.arrayBufferToBinaryString(n)),(p&&this.__addimage__.isArrayBuffer(p)||this.__addimage__.isArrayBufferView(p))&&(p=this.__addimage__.arrayBufferToBinaryString(p)),{alias:t,data:n,index:e,filter:b,decodeParameters:x,transparency:ae,palette:K,sMask:p,predictor:J,width:l,height:o,bitsPerComponent:h,sMaskBitsPerComponent:y,colorSpace:k}}},(function(n){n.processGIF89A=function(e,t,r,i){var a=new $5(e),l=a.width,o=a.height,u=[];a.decodeAndBlitFrameRGBA(0,u);var d={data:u,width:l,height:o},h=new rc(100).encode(d,100);return n.processJPEG.call(this,h,t,r,i)},n.processGIF87A=n.processGIF89A})(Ge.API),Rr.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 n=this.colors===0?1<<this.bitPP:this.colors;this.palette=new Array(n);for(var e=0;e<n;e++){var t=this.datav.getUint8(this.pos++,!0),r=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0);this.palette[e]={red:i,green:r,blue:t,quad:a}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},Rr.prototype.parseBGR=function(){this.pos=this.offset;var n="bit"+this.bitPP,e=this.width*this.height*4;if(e>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");this.data=new Uint8Array(e);try{this[n]()}catch(t){qt.log("bit decode error:"+t)}},Rr.prototype.bit1=function(){var n,e=Math.ceil(this.width/8),t=e%4;for(n=this.height-1;n>=0;n--){for(var r=this.bottom_up?n:this.height-1-n,i=0;i<e;i++)for(var a=this.datav.getUint8(this.pos++,!0),l=r*this.width*4+8*i*4,o=0;o<8&&8*i+o<this.width;o++){var u=this.palette[a>>7-o&1];this.data[l+4*o]=u.blue,this.data[l+4*o+1]=u.green,this.data[l+4*o+2]=u.red,this.data[l+4*o+3]=255}t!==0&&(this.pos+=4-t)}},Rr.prototype.bit4=function(){for(var n=Math.ceil(this.width/2),e=n%4,t=this.height-1;t>=0;t--){for(var r=this.bottom_up?t:this.height-1-t,i=0;i<n;i++){var a=this.datav.getUint8(this.pos++,!0),l=r*this.width*4+2*i*4,o=a>>4,u=15&a,d=this.palette[o];if(this.data[l]=d.blue,this.data[l+1]=d.green,this.data[l+2]=d.red,this.data[l+3]=255,2*i+1>=this.width)break;d=this.palette[u],this.data[l+4]=d.blue,this.data[l+4+1]=d.green,this.data[l+4+2]=d.red,this.data[l+4+3]=255}e!==0&&(this.pos+=4-e)}},Rr.prototype.bit8=function(){for(var n=this.width%4,e=this.height-1;e>=0;e--){for(var t=this.bottom_up?e:this.height-1-e,r=0;r<this.width;r++){var i=this.datav.getUint8(this.pos++,!0),a=t*this.width*4+4*r;if(i<this.palette.length){var l=this.palette[i];this.data[a]=l.red,this.data[a+1]=l.green,this.data[a+2]=l.blue,this.data[a+3]=255}else this.data[a]=255,this.data[a+1]=255,this.data[a+2]=255,this.data[a+3]=255}n!==0&&(this.pos+=4-n)}},Rr.prototype.bit15=function(){for(var n=this.width%3,e=parseInt("11111",2),t=this.height-1;t>=0;t--){for(var r=this.bottom_up?t:this.height-1-t,i=0;i<this.width;i++){var a=this.datav.getUint16(this.pos,!0);this.pos+=2;var l=(a&e)/e*255|0,o=(a>>5&e)/e*255|0,u=(a>>10&e)/e*255|0,d=a>>15?255:0,h=r*this.width*4+4*i;this.data[h]=u,this.data[h+1]=o,this.data[h+2]=l,this.data[h+3]=d}this.pos+=n}},Rr.prototype.bit16=function(){for(var n=this.width%3,e=parseInt("11111",2),t=parseInt("111111",2),r=this.height-1;r>=0;r--){for(var i=this.bottom_up?r:this.height-1-r,a=0;a<this.width;a++){var l=this.datav.getUint16(this.pos,!0);this.pos+=2;var o=(l&e)/e*255|0,u=(l>>5&t)/t*255|0,d=(l>>11)/e*255|0,h=i*this.width*4+4*a;this.data[h]=d,this.data[h+1]=u,this.data[h+2]=o,this.data[h+3]=255}this.pos+=n}},Rr.prototype.bit24=function(){for(var n=this.height-1;n>=0;n--){for(var e=this.bottom_up?n:this.height-1-n,t=0;t<this.width;t++){var r=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),l=e*this.width*4+4*t;this.data[l]=a,this.data[l+1]=i,this.data[l+2]=r,this.data[l+3]=255}this.pos+=this.width%4}},Rr.prototype.bit32=function(){for(var n=this.height-1;n>=0;n--)for(var e=this.bottom_up?n:this.height-1-n,t=0;t<this.width;t++){var r=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),l=this.datav.getUint8(this.pos++,!0),o=e*this.width*4+4*t;this.data[o]=a,this.data[o+1]=i,this.data[o+2]=r,this.data[o+3]=l}},Rr.prototype.getData=function(){return this.data},(function(n){n.processBMP=function(e,t,r,i){var a=new Rr(e,!1),l=a.width,o=a.height,u={data:a.getData(),width:l,height:o},d=new rc(100).encode(u,100);return n.processJPEG.call(this,d,t,r,i)}})(Ge.API),Wd.prototype.getData=function(){return this.data},(function(n){n.processWEBP=function(e,t,r,i){var a=new Wd(e),l=a.width,o=a.height,u={data:a.getData(),width:l,height:o},d=new rc(100).encode(u,100);return n.processJPEG.call(this,d,t,r,i)}})(Ge.API),Ge.API.processRGBA=function(n,e,t){for(var r=n.data,i=r.length,a=new Uint8Array(i/4*3),l=new Uint8Array(i/4),o=0,u=0,d=0;d<i;d+=4){var h=r[d],b=r[d+1],x=r[d+2],p=r[d+3];a[o++]=h,a[o++]=b,a[o++]=x,l[u++]=p}var L=this.__addimage__.arrayBufferToBinaryString(a);return{alpha:this.__addimage__.arrayBufferToBinaryString(l),data:L,index:e,alias:t,colorSpace:"DeviceRGB",bitsPerComponent:8,width:n.width,height:n.height}},Ge.API.setLanguage=function(n){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:"Rh
63aeto-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"}[n]!==void 0&&(this.internal.languageSettings.languageCode=n,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},Ga=Ge.API,Do=Ga.getCharWidthsArray=function(n,e){var t,r,i=(e=e||{}).font||this.internal.getFont(),a=e.fontSize||this.internal.getFontSize(),l=e.charSpace||this.internal.getCharSpace(),o=e.widths?e.widths:i.metadata.Unicode.widths,u=o.fof?o.fof:1,d=e.kerning?e.kerning:i.metadata.Unicode.kerning,h=d.fof?d.fof:1,b=e.doKerning!==!1,x=0,p=n.length,L=0,k=o[0]||u,C=[];for(t=0;t<p;t++)r=n.charCodeAt(t),typeof i.metadata.widthOfString=="function"?C.push((i.metadata.widthOfGlyph(i.metadata.characterToGlyph(r))+l*(1e3/a)||0)/1e3):(x=b&&Ut(d[r])==="object"&&!isNaN(parseInt(d[r][L],10))?d[r][L]/h:0,C.push((o[r]||k)/u+x)),L=r;return C},Md=Ga.getStringUnitWidth=function(n,e){var t=(e=e||{}).fontSize||this.internal.getFontSize(),r=e.font||this.internal.getFont(),i=e.charSpace||this.internal.getCharSpace();return Ga.processArabic&&(n=Ga.processArabic(n)),typeof r.metadata.widthOfString=="function"?r.metadata.widthOfString(n,t,i)/t:Do.apply(this,arguments).reduce(function(a,l){return a+l},0)},Id=function(n,e,t,r){for(var i=[],a=0,l=n.length,o=0;a!==l&&o+e[a]<t;)o+=e[a],a++;i.push(n.slice(0,a));var u=a;for(o=0;a!==l;)o+e[a]>r&&(i.push(n.slice(u,a)),o=0,u=a),o+=e[a],a++;return u!==a&&i.push(n.slice(u,a)),i},Fd=function(n,e,t){t||(t={});var r,i,a,l,o,u,d,h=[],b=[h],x=t.textIndent||0,p=0,L=0,k=n.split(" "),C=Do.apply(this,[" ",t])[0];if(u=t.lineIndent===-1?k[0].length+2:t.lineIndent||0){var y=Array(u).join(" "),V=[];k.map(function(E){(E=E.split(/\s*\n/)).length>1?V=V.concat(E.map(function(K,ae){return(ae&&K.length?`
64`:"")+K})):V.push(E[0])}),k=V,u=Md.apply(this,[y,t])}for(a=0,l=k.length;a<l;a++){var q=0;if(r=k[a],u&&r[0]==`
65`&&(r=r.substr(1),q=1),x+p+(L=(i=Do.apply(this,[r,t])).reduce(function(E,K){return E+K},0))>e||q){if(L>e){for(o=Id.apply(this,[r,i,e-(x+p),e]),h.push(o.shift()),h=[o.pop()];o.length;)b.push([o.shift()]);L=i.slice(r.length-(h[0]?h[0].length:0)).reduce(function(E,K){return E+K},0)}else h=[r];b.push(h),x=L+u,p=C}else h.push(r),x+=p+L,p=C}return d=u?function(E,K){return(K?y:"")+E.join(" ")}:function(E){return E.join(" ")},b.map(d)},Ga.splitTextToSize=function(n,e,t){var r,i=(t=t||{}).fontSize||this.internal.getFontSize(),a=(function(h){if(h.widths&&h.kerning)return{widths:h.widths,kerning:h.kerning};var b=this.internal.getFont(h.fontName,h.fontStyle),x="Unicode";return b.metadata[x]?{widths:b.metadata[x].widths||{0:1},kerning:b.metadata[x].kerning||{}}:{font:b.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,t);r=Array.isArray(n)?n:String(n).split(/\r?\n/);var l=1*this.internal.scaleFactor*e/i;a.textIndent=t.textIndent?1*t.textIndent*this.internal.scaleFactor/i:0,a.lineIndent=t.lineIndent;var o,u,d=[];for(o=0,u=r.length;o<u;o++)d=d.concat(Fd.apply(this,[r[o],l,a]));return d},(function(n){n.__fontmetrics__=n.__fontmetrics__||{};for(var e="0123456789abcdef",t="klmnopqrstuvwxyz",r={},i={},a=0;a<16;a++)r[t[a]]=e[a],i[e[a]]=t[a];var l=function(x){return"0x"+parseInt(x,10).toString(16)},o=n.__fontmetrics__.compress=function(x){var p,L,k,C,y=["{"];for(var V in x){if(p=x[V],isNaN(parseInt(V,10))?L="'"+V+"'":(V=parseInt(V,10),L=(L=l(V).slice(2)).slice(0,-1)+i[L.slice(-1)]),typeof p=="number")p<0?(k=l(p).slice(3),C="-"):(k=l(p).slice(2),C=""),k=C+k.slice(0,-1)+i[k.slice(-1)];
vendor: 1,098 bytes, line 65
65else{if(Ut(p)!=="object")throw new Error("Don't know what to do with value type "+Ut(p)+".");k=o(p)}y.push(L+k)}return y.push("}"),y.join("")},u=n.__fontmetrics__.uncompress=function(x){if(typeof x!="string")throw new Error("Invalid argument passed to uncompress.");for(var p,L,k,C,y={},V=1,q=y,E=[],K="",ae="",J=x.length-1,H=1;H<J;H+=1)(C=x[H])=="'"?p?(k=p.join(""),p=void 0):p=[]:p?p.push(C):C=="{"?(E.push([q,k]),q={},k=void 0):C=="}"?((L=E.pop())[0][L[1]]=q,k=void 0,q=L[0]):C=="-"?V=-1:k===void 0?r.hasOwnProperty(C)?(K+=r[C],k=parseInt(K,16)*V,V=1,K=""):K+=C:r.hasOwnProperty(C)?(ae+=r[C],q[k]=parseInt(ae,16)*V,V=1,k=void 0,ae=""):ae+=C;return y},d={codePages:["WinAnsiEncoding"],WinAnsiEncoding:u("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},h={Unicode:{Courier:d,"Courier-Bold":d,"Courier-BoldOblique":d,"Courier-Oblique":d,Helvetica:d,"Helvetica-Bold":d,"Helvetica-BoldOblique":d,"Helvetica-Oblique":d,"Times-Roman":d,"Times-Bold":d,"Times-BoldItalic":d,"Times-Italic":d}},b
vendor: 14,693 bytes, line 65
65={Unicode:{"Courier-Oblique":u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":u("{'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":u("{'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:u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":u("{'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:u("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:u("{'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":u("{'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:u("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":u("{'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":u("{'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":u("{'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}}}")}};
vendor: 8,489 bytes, lines 65-93
65n.events.push(["addFont",function(x){var p=x.font,L=b.Unicode[p.postScriptName];L&&(p.metadata.Unicode={},p.metadata.Unicode.widths=L.widths,p.metadata.Unicode.kerning=L.kerning);var k=h.Unicode[p.postScriptName];k&&(p.metadata.Unicode.encoding=k,p.encoding=k.codePages[0])}])})(Ge.API),(function(n){var e=function(t){for(var r=t.length,i=new Uint8Array(r),a=0;a<r;a++)i[a]=t.charCodeAt(a);return i};n.API.events.push(["addFont",function(t){var r=void 0,i=t.font,a=t.instance;if(!i.isStandardFont){if(a===void 0)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+i.postScriptName+"').");if(typeof(r=a.existsFileInVFS(i.postScriptName)===!1?a.loadFile(i.postScriptName):a.getFileFromVFS(i.postScriptName))!="string")throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+i.postScriptName+"').");(function(l,o){o=/^\x00\x01\x00\x00/.test(o)?e(o):e(Io(o)),l.metadata=n.API.TTFFont.open(o),l.metadata.Unicode=l.metadata.Unicode||{encoding:{},kerning:{},widths:[]},l.metadata.glyIdsUsed=[0]})(i,r)}}])})(Ge),Ge.API.addSvgAsImage=function(n,e,t,r,i,a,l,o){if(isNaN(e)||isNaN(t))throw qt.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(r)||isNaN(i))throw qt.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var u=document.createElement("canvas");u.width=r,u.height=i;var d=u.getContext("2d");d.fillStyle="#fff",d.fillRect(0,0,u.width,u.height);var h={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},b=this;return(nt.canvg?Promise.resolve(nt.canvg):en(()=>import("./index.es-B1-JPGR5.js"),__vite__mapDeps([7,1,2,3]))).catch(function(x){return Promise.reject(new Error("Could not load canvg: "+x))}).then(function(x){return x.default?x.default:x}).then(function(x){return x.fromString(d,n,h)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(x){return x.render(h)}).then(function(){b.addImage(u.toDataURL("image/jpeg",1),e,t,r,i,l,o)})},Ge.API.putTotalPages=function(n){var e,t=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(e=new RegExp(n,"g"),t=this.internal.getNumberOfPages()):(e=new RegExp(this.pdfEscape16(n,this.internal.getFont()),"g"),t=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var r=1;r<=this.internal.getNumberOfPages();r++)for(var i=0;i<this.internal.pages[r].length;i++)this.internal.pages[r][i]=this.internal.pages[r][i].replace(e,t);return this},Ge.API.viewerPreferences=function(n,e){var t;n=n||{},e=e||!1;var r,i,a,l={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}},o=Object.keys(l),u=[],d=0,h=0,b=0;function x(L,k){var C,y=!1;for(C=0;C<L.length;C+=1)L[C]===k&&(y=!0);return y}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(l)),this.internal.viewerpreferences.isSubscribed=!1),t=this.internal.viewerpreferences.configuration,n==="reset"||e===!0){var p=o.length;for(b=0;b<p;b+=1)t[o[b]].value=t[o[b]].defaultValue,t[o[b]].explicitSet=!1}if(Ut(n)==="object"){for(i in n)if(a=n[i],x(o,i)&&a!==void 0){if(t[i].type==="boolean"&&typeof a=="boolean")t[i].value=a;else if(t[i].type==="name"&&x(t[i].valueSet,a))t[i].value=a;else if(t[i].type==="integer"&&Number.isInteger(a))t[i].value=a;else if(t[i].type==="array"){for(d=0;d<a.length;d+=1)if(r=!0,a[d].length===1&&typeof a[d][0]=="number")u.push(String(a[d]-1));else if(a[d].length>1){for(h=0;h<a[d].length;h+=1)typeof a[d][h]!="number"&&(r=!1);r===!0&&u.push([a[d][0]-1,a[d][1]-1].join(" "))}t[i].value="["+u.join(" ")+"]"}else t[i].value=t[i].defaultValue;t[i].explicitSet=!0}}return this.internal.viewerpreferences.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){var L,k=[];for(L in t)t[L].explicitSet===!0&&(t[L].type==="name"?k.push("/"+L+" /"+t[L].value):k.push("/"+L+" "+t[L].value));k.length!==0&&this.internal.write(`/ViewerPreferences
66<<
67`+k.join(`
68`)+`
69>>`)}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=t,this},Ge.API.addMetadata=function(n,e){return this.internal.__metadata__===void 0&&(this.internal.__metadata__={metadata:n,namespaceUri:e??"http://jspdf.default.namespaceuri/",rawXml:typeof e=="boolean"&&e},this.internal.events.subscribe("putCatalog",Y5),this.internal.events.subscribe("postPutResources",G5)),this},(function(n){var e=n.API,t=e.pdfEscape16=function(a,l){for(var o,u=l.metadata.Unicode.widths,d=["","0","00","000","0000"],h=[""],b=0,x=a.length;b<x;++b){if(o=l.metadata.characterToGlyph(a.charCodeAt(b)),l.metadata.glyIdsUsed.push(o),l.metadata.toUnicode[o]=a.charCodeAt(b),u.indexOf(o)==-1&&(u.push(o),u.push([parseInt(l.metadata.widthOfGlyph(o),10)])),o=="0")return h.join("");o=o.toString(16),h.push(d[4-o.length],o)}return h.join("")},r=function(a){var l,o,u,d,h,b,x;for(h=`/CIDInit /ProcSet findresource begin
7012 dict begin
71begincmap
72/CIDSystemInfo <<
73  /Registry (Adobe)
74  /Ordering (UCS)
75  /Supplement 0
76>> def
77/CMapName /Adobe-Identity-UCS def
78/CMapType 2 def
791 begincodespacerange
80<0000><ffff>
81endcodespacerange`,u=[],b=0,x=(o=Object.keys(a).sort(function(p,L){return p-L})).length;b<x;b++)l=o[b],u.length>=100&&(h+=`
82`+u.length+` beginbfchar
83`+u.join(`
84`)+`
85endbfchar`,u=[]),a[l]!==void 0&&a[l]!==null&&typeof a[l].toString=="function"&&(d=("0000"+a[l].toString(16)).slice(-4),l=("0000"+(+l).toString(16)).slice(-4),u.push("<"+l+"><"+d+">"));return u.length&&(h+=`
86`+u.length+` beginbfchar
87`+u.join(`
88`)+`
89endbfchar
90`),h+`endcmap
91CMapName currentdict /CMap defineresource pop
92end
93end`};e.events.push(["putFont",function(a){(function(l){var o=l.font,u=l.out,d=l.newObject,h=l.putStream;if(o.metadata instanceof n.API.TTFFont&&o.encoding==="Identity-H"){for(var b=o.metadata.Unicode.widths,x=o.metadata.subset.encode(o.metadata.glyIdsUsed,1),p="",L=0;L<x.length;L++)p+=String.fromCharCode(x[L]);var k=d();h({data:p,addLength1:!0,objectId:k}),u("endobj");var C=d();h({data:r(o.metadata.toUnicode),addLength1:!0,objectId:C}),u("endobj");var y=d();u("<<"),u("/Type /FontDescriptor"),u("/FontName /"+Ka(o.fontName)),u("/FontFile2 "+k+" 0 R"),u("/FontBBox "+n.API.PDFObject.convert(o.metadata.bbox)),u("/Flags "+o.metadata.flags),u("/StemV "+o.metadata.stemV),u("/ItalicAngle "+o.metadata.italicAngle),u("/Asce
93nt "+o.metadata.ascender),u("/Descent "+o.metadata.decender),u("/CapHeight "+o.metadata.capHeight),u(">>"),u("endobj");var V=d();u("<<"),u("/Type /Font"),u("/BaseFont /"+Ka(o.fontName)),u("/FontDescriptor "+y+" 0 R"),u("/W "+n.API.PDFObject.convert(b)),u("/CIDToGIDMap /Identity"),u("/DW 1000"),u("/Subtype /CIDFontType2"),u("/CIDSystemInfo"),u("<<"),u("/Supplement 0"),u("/Registry (Adobe)"),u("/Ordering ("+o.encoding+")"),u(">>"),u(">>"),u("endobj"),o.objectNumber=d(),u("<<"),u("/Type /Font"),u("/Subtype /Type0"),u("/ToUnicode "+C+" 0 R"),u("/BaseFont /"+Ka(o.fontName)),u("/Encoding /"+o.encoding),u("/DescendantFonts ["+V+" 0 R]"),u(">>"),u("endobj"),o.isAlreadyPutted=!0}})(a)}]),e.events.push(["putFont",function(a){(function(l){var o=l.font,u=l.out,d=l.newObject,h=l.putStream;if(o.metadata instanceof n.API.TTFFont&&o.encoding==="WinAnsiEncoding"){for(var b=o.metadata.rawData,x="",p=0;p<b.length;p++)x+=String.fromCharCode(b[p]);var L=d();h({data:x,addLength1:!0,objectId:L}),u("endobj");var k=d();h({data:r(o.metadata.toUnicode),addLength1:!0,objectId:k}),u("endobj");var C=d();u("<<"),u("/Descent "+o.metadata.decender),u("/CapHeight "+o.metadata.capHeight),u("/StemV "+o.metadata.stemV),u("/Type /FontDescriptor"),u("/FontFile2 "+L+" 0 R"),u("/Flags 96"),u("/FontBBox "+n.API.PDFObject.convert(o.metadata.bbox)),u("/FontName /"+Ka(o.fontName)),u("/ItalicAngle "+o.metadata.italicAngle),u("/Asce
93nt "+o.metadata.ascender),u(">>"),u("endobj"),o.objectNumber=d();for(var y=0;y<o.metadata.hmtx.widths.length;y++)o.metadata.hmtx.widths[y]=parseInt(o.metadata.hmtx.widths[y]*(1e3/o.metadata.head.unitsPerEm));u("<</Subtype/TrueType/Type/Font/ToUnicode "+k+" 0 R/BaseFont/"+Ka(o.fontName)+"/FontDescriptor "+C+" 0 R/Encoding/"+o.encoding+" /FirstChar 29 /LastChar 255 /Widths "+n.API.PDFObject.convert(o.metadata.hmtx.widths)+">>"),u("endobj"),o.isAlreadyPutted=!0}})(a)}]);var i=function(a){var l,o=a.text||"",u=a.x,d=a.y,h=a.options||{},b=a.mutex||{},x=b.pdfEscape,p=b.activeFontKey,L=b.fonts,k=p,C="",y=0,V="",q=L[k].encoding;if(L[k].encoding!=="Identity-H")return{text:o,x:u,y:d,options:h,mutex:b};for(V=o,k=p,Array.isArray(o)&&(V=o[0]),y=0;y<V.length;y+=1)L[k].metadata.hasOwnProperty("cmap")&&(l=L[k].metadata.cmap.unicode.codeMap[V[y].charCodeAt(0)]),l||V[y].charCodeAt(0)<256&&L[k].metadata.hasOwnProperty("Unicode")?C+=V[y]:C+="";var E="";return parseInt(k.slice(1))<14||q==="WinAnsiEncoding"?E=x(C,k).split("").map(function(K){return K.charCodeAt(0).toString(16)}).join(""):q==="Identity-H"&&(E=t(C,L[k])),b.isHex=!0,{text:E,x:u,y:d,options:h,mutex:b}};e.events.push(["postProcessText",function(a){var l=a.text||"",o=[],u={text:l,x:a.x,y:a.y,options:a.options,mutex:a.mutex};if(Array.isArray(l)){var d=0;for(d=0;d<l.length;d+=1)Array.isArray(l[d])&&l[d].length===3?o.push([i(Object.assign({},u,{text:l[d][0]})).text,l[d][1],l[d][2]]):o.push(i(Object.assign({},u,{text:l[d]})).text);a.text=o}else a.text=i(Object.assign({},u,{text:l})).text}])})(Ge),(function(n){var e=function(){return this.internal.vFS===void 0&&(this.internal.vFS={}),!0};n.existsFileInVFS=function(t){return e.call(this),this.internal.vFS[t]!==void 0},n.addFileToVFS=function(t,r){return e.call(this),this.internal.vFS[t]=r,this},n.getFileFromVFS=function(t){return e.call(this),this.internal.vFS[t]!==void 0?this.internal.vFS[t]:null}})(Ge.API),(function(n){n.__bidiEngine__=n.prototype.__bidiEngine__=function(r){var i,a,l,o,u,d,h,b=e,x=[[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]],p=[[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]],L={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},k={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},C=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","‹","›","‹","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],y=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)$/),V=!1,q=0;this.__bidiEngine__={};var E=function(S){var P=S.charCodeAt(),B=P>>8,U=k[B];return U!==void 0?b[256*U+(255&P)]:B===252||B===253?"AL":y.test(B)?"L":B===8?"R":"N"},K=function(S){for(var P,B=0;B<S.length;B++){if((P=E(S.charAt(B)))==="L")return!1;if(P==="R")return!0}return!1},ae=function(S,P,B,U){var re,Q,de,se,fe=P[U];switch(fe){case"L":case"R":case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":V=!1;break;case"N":case"AN":break;case"EN":V&&(fe="AN");break;case"AL":V=!0,fe="R";break;case"WS":case"BN":fe="N";break;case"CS":U<1||U+1>=P.length||(re=B[U-1])!=="EN"&&re!=="AN"||(Q=P[U+1])!=="EN"&&Q!=="AN"?fe="N":V&&(Q="AN"),fe=Q===re?Q:"N";break;case"ES":fe=(re=U>0?B[U-1]:"B")==="EN"&&U+1<P.length&&P[U+1]==="EN"?"EN":"N";break;case"ET":if(U>0&&B[U-1]==="EN"){fe="EN";break}if(V){fe="N";break}for(de=U+1,se=P.length;de<se&&P[de]==="ET";)de++;fe=de<se&&P[de]==="EN"?"EN":"N";break;case"NSM":if(l&&!o){for(se=P.length,de=U+1;de<se&&P[de]==="NSM";)de++;if(de<se){var we=S[U],te=we>=1425&&we<=2303||we===64286;if(re=P[de],te&&(re==="R"||re==="AL")){fe="R";break}}}fe=U<1||(re=P[U-1])==="B"?"N":B[U-1];break;case"B":V=!1,i=!0,fe=q;break;case"S":a=!0,fe="N"}return fe},J=function(S,P,B){var U=S.split("");return B&&H(U,B,{hiLevel:q}),U.reverse(),P&&P.reverse(),U.join("")},H=function(S,P,B){var U,re,Q,de,se,fe=-1,we=S.length,te=0,A=[],I=q?p:x,W=[];for(V=!1,i=!1,a=!1,re=0;re<we;re++)W[re]=E(S[re]);for(Q=0;Q<we;Q++){if(se=te,A[Q]=ae(S,W,A,Q),U=240&(te=I[se][L[A[Q]]]),te&=15,P[Q]=de=I[te][5],U>0)if(U===16){for(re=fe;re<Q;re++)P[re]=1;fe=-1}else fe=-1;if(I[te][6])fe===-1&&(fe=Q);else if(fe>-1){for(re=fe;re<Q;re++)P[re]=de;fe=-1}W[Q]==="B"&&(P[Q]=0),B.hiLevel|=de}a&&(function($,X,ie){for(var ue=0;ue<ie;ue++)if($[ue]==="S"){X[ue]=q;for(var he=ue-1;he>=0&&$[he]==="WS";he--)X[he]=q}})(W,P,we)},D=function(S,P,B,U,re){if(!(re.hiLevel<S)){if(S===1&&q===1&&!i)return P.reverse(),void(B&&B.reverse());for(var Q,de,se,fe,we=P.length,te=0;te<we;){if(U[te]>=S){for(se=te+1;se<we&&U[se]>=S;)se++;for(fe=te,de=se-1;fe<de;fe++,de--)Q=P[fe],P[fe]=P[de],P[de]=Q,B&&(Q=B[fe],B[fe]=B[de],B[de]=Q);te=se}te++}}},G=function(S,P,B){var U=S.split(""),re={hiLevel:q};return B||(B=[]),H(U,B,re),(function(Q,de,se){if(se.hiLevel!==0&&h)for(var fe,we=0;we<Q.length;we++)de[we]===1&&(fe=C.indexOf(Q[we]))>=0&&(Q[we]=C[fe+1])})(U,B,re),D(2,U,P,B,re),D(1,U,P,B,re),U.join("")};
vendor: 16,522 bytes, line 93
93return this.__bidiEngine__.doBidiReorder=function(S,P,B){if((function(re,Q){if(Q)for(var de=0;de<re.length;de++)Q[de]=de;o===void 0&&(o=K(re)),d===void 0&&(d=K(re))})(S,P),l||!u||d)if(l&&u&&o^d)q=o?1:0,S=J(S,P,B);else if(!l&&u&&d)q=o?1:0,S=G(S,P,B),S=J(S,P);else if(!l||o||u||d){if(l&&!u&&o^d)S=J(S,P),o?(q=0,S=G(S,P,B)):(q=1,S=G(S,P,B),S=J(S,P));else if(l&&o&&!u&&d)q=1,S=G(S,P,B),S=J(S,P);else if(!l&&!u&&o^d){var U=h;o?(q=1,S=G(S,P,B),q=0,h=!1,S=G(S,P,B),h=U):(q=0,S=G(S,P,B),S=J(S,P),q=1,h=!1,S=G(S,P,B),h=U,S=J(S,P))}}else q=0,S=G(S,P,B);else q=o?1:0,S=G(S,P,B);return S},this.__bidiEngine__.setOptions=function(S){S&&(l=S.isInputVisual,u=S.isOutputVisual,o=S.isInputRtl,d=S.isOutputRtl,h=S.isSymmetricSwapping)},this.__bidiEngine__.setOptions(r),this.__bidiEngine__};var e=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","N","ET","ET","ET","ET","N","N","N","N","L","N","N","BN","N","N","ET","ET","EN","EN","N","L","N","N","N","EN","L","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","N","N","N","N","N","ET","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","NSM","R","NSM","NSM","R","NSM","NSM","R","NSM","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","N","N","N","N","N","R","R","R","R","R","N","N","N","N","N","N","N","N","N","N","N","AN","AN","AN","AN","AN","AN","N","N","AL","ET","ET","AL","CS","AL","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","N","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","NSM","NSM","N","NSM","NSM","NSM","NSM","AL","AL","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","R","N","N","N","N","R","N","N","N","N","N","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","BN","BN","BN","L","R","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","B","LRE","RLE","PDF","LRO","RLO","CS","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","BN","BN","BN","BN","BN","N","LRI","RLI","FSI","PDI","BN","BN","BN","BN","BN","BN","EN","L","N","N","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","L","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","N","N","N","N","N","R","NSM","R","R","R","R","R","R","R","R","R","R","ES","R","R","R","R","R","R","R","R","R","R","R","R","R","N","R","R","R","R","R","N","R","N","R","R","N","R","R","N","R","R","R","R","R","R","R","R","R","R","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","CS","N","N","CS","N","N","N","N","N","N","N","N","N","ET","N","N","ES","ES","N","N","N","N","N","ET","ET","N","N","N","N","N","AL","AL","AL","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","BN","N","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","N","N","N","ET","ET","N","N","N","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N"],t=new n.__bidiEngine__({isInputVisual:!0});n.API.events.push(["postProcessText",function(r){var i=r.text;r.x,r.y;var a=r.options||{};r.mutex,a.lang;var l=[];if(a.isInputVisual=typeof a.isInputVisual!="boolean"||a.isInputVisual,t.setOptions(a),Object.prototype.toString.call(i)==="[object Array]"){var o=0;for(l=[],o=0;o<i.length;o+=1)Object.prototype.toString.call(i[o])==="[object Array]"?l.push([t.doBidiReorder(i[o][0]),i[o][1],i[o][2]]):l.push([t.doBidiReorder(i[o])]);r.text=l}else r.text=t.doBidiReorder(i);t.setOptions({isInputVisual:!0})}])})(Ge),Ge.API.TTFFont=(function(){function n(e){var t;if(this.rawData=e,t=this.contents=new Wi(e),this.contents.pos=4,t.readString(4)==="ttcf")throw new Error("TTCF not supported.");t.pos=0,this.parse(),this.subset=new cg(this),this.registerTTF()}return n.open=function(e){return new n(e)},n.prototype.parse=function(){return this.directory=new K5(this.contents),this.head=new Z5(this),this.name=new ng(this),this.cmap=new Sf(this),this.toUnicode={},this.hhea=new J5(this),this.maxp=new rg(this),this.hmtx=new ig(this),this.post=new eg(this),this.os2=new Q5(this),this.loca=new lg(this),this.glyf=new ag(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]},n.prototype.registerTTF=function(){var e,t,r,i,a;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=(function(){var l,o,u,d;for(d=[],l=0,o=(u=this.bbox).length;l<o;l++)e=u[l],d.push(Math.round(e*this.scaleFactor));return d}).call(this),this.stemV=0,this.post.exists?(r=255&(i=this.post.italic_angle),32768&(t=i>>16)&&(t=-(1+(65535^t))),this.italicAngle=+(t+"."+r)):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=(a=this.familyClass)===1||a===2||a===3||a===4||a===5||a===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")},n.prototype.characterToGlyph=function(e){var t;return((t=this.cmap.unicode)!=null?t.codeMap[e]:void 0)||0},n.prototype.widthOfGlyph=function(e){var t;return t=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(e).advance*t},n.prototype.widthOfString=function(e,t,r){var i,a,l,o;for(l=0,a=0,o=(e=""+e).length;0<=o?a<o:a>o;a=0<=o?++a:--a)i=e.charCodeAt(a),l+=this.widthOfGlyph(this.characterToGlyph(i))+r*(1e3/t)||0;return l*(t/1e3)},n.prototype.lineHeight=function(e,t){var r;return t==null&&(t=!1),r=t?this.lineGap:0,(this.ascender+r-this.decender)/1e3*e},n})();var Vr,Wi=(function(){function n(e){this.data=e??[],this.pos=0,this.length=this.data.length}return n.prototype.readByte=function(){return this.data[this.pos++]},n.prototype.writeByte=function(e){return this.data[this.pos++]=e},n.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},n.prototype.writeUInt32=function(e){return this.writeByte(e>>>24&255),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e)},n.prototype.readInt32=function(){var e;return(e=this.readUInt32())>=2147483648?e-4294967296:e},n.prototype.writeInt32=function(e){return e<0&&(e+=4294967296),this.writeUInt32(e)},n.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},n.prototype.writeUInt16=function(e){return this.writeByte(e>>8&255),this.writeByte(255&e)},n.prototype.readInt16=function(){var e;return(e=this.readUInt16())>=32768?e-65536:e},n.prototype.writeInt16=function(e){return e<0&&(e+=65536),this.writeUInt16(e)},n.prototype.readString=function(e){var t,r;for(r=[],t=0;0<=e?t<e:t>e;t=0<=e?++t:--t)r[t]=String.fromCharCode(this.readByte());return r.join("")},n.prototype.writeString=function(e){var t,r,i;for(i=[],t=0,r=e.length;0<=r?t<r:t>r;t=0<=r?++t:--t)i.push(this.writeByte(e.charCodeAt(t)));return i},n.prototype.readShort=function(){return this.readInt16()},n.prototype.writeShort=function(e){return this.writeInt16(e)},n.prototype.readLongLong=function(){var e,t,r,i,a,l,o,u;return e=this.readByte(),t=this.readByte(),r=this.readByte(),i=this.readByte(),a=this.readByte(),l=this.readByte(),o=this.readByte(),u=this.readByte(),128&e?-1*(72057594037927940*(255^e)+281474976710656*(255^t)+1099511627776*(255^r)+4294967296*(255^i)+16777216*(255^a)+65536*(255^l)+256*(255^o)+(255^u)+1):72057594037927940*e+281474976710656*t+1099511627776*r+4294967296*i+16777216*a+65536*l+256*o+u},n.prototype.writeLongLong=function(e){var t,r;return t=Math.floor(e/4294967296),r=4294967295&e,this.writeByte(t>>24&255),this.writeByte(t>>16&255),this.writeByte(t>>8&255),this.writeByte(255&t),this.writeByte(r>>24&255),this.writeByte(r>>16&255),this.writeByte(r>>8&255),this.writeByte(255&r)},n.prototype.readInt=function(){return this.readInt32()},n.prototype.writeInt=function(e){return this.writeInt32(e)},n.prototype.read=function(e){var t,r;for(t=[],r=0;0<=e?r<e:r>e;r=0<=e?++r:--r)t.push(this.readByte());return t},n.prototype.write=function(e){var t,r,i,a;for(a=[],r=0,i=e.length;r<i;r++)t=e[r],a.push(this.writeByte(t));return a},n})(),K5=(function(){var n;function e(t){var r,i,a;for(this.scalarType=t.readInt(),this.tableCount=t.readShort(),this.searchRange=t.readShort(),this.entrySelector=t.readShort(),this.rangeShift=t.readShort(),this.tables={},i=0,a=this.tableCount;0<=a?i<a:i>a;i=0<=a?++i:--i)r={tag:t.readString(4),checksum:t.readInt(),offset:t.readInt(),length:t.readInt()},this.tables[r.tag]=r}return e.prototype.encode=function(t){var r,i,a,l,o,u,d,h,b,x,p,L,k;for(k in p=Object.keys(t).length,u=Math.log(2),b=16*Math.floor(Math.log(p)/u),l=Math.floor(b/u),h=16*p-b,(i=new Wi).writeInt(this.scalarType),i.writeShort(p),i.writeShort(b),i.writeShort(l),i.writeShort(h),a=16*p,d=i.pos+a,o=null,
93L=[],t)for(x=t[k],i.writeString(k),i.writeInt(n(x)),i.writeInt(d),i.writeInt(x.length),L=L.concat(x),k==="head"&&(o=d),d+=x.length;d%4;)L.push(0),d++;return i.write(L),r=2981146554-n(i.data),i.pos=o+8,i.writeUInt32(r),i.data},n=function(t){var r,i,a,l;for(t=Af.call(t);t.length%4;)t.push(0);for(a=new Wi(t),i=0,r=0,l=t.length;r<l;r=r+=4)i+=a.readUInt32();return 4294967295&i},e})(),X5={}.hasOwnProperty,ri=function(n,e){for(var t in e)X5.call(e,t)&&(n[t]=e[t]);function r(){this.constructor=n}return r.prototype=e.prototype,n.prototype=new r,n.__super__=e.prototype,n};Vr=(function(){function n(e){var t;this.file=e,t=this.file.directory.tables[this.tag],this.exists=!!t,t&&(this.offset=t.offset,this.length=t.length,this.parse(this.file.contents))}return n.prototype.parse=function(){},n.prototype.encode=function(){},n.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},n})();var Z5=(function(){function n(){return n.__super__.constructor.apply(this,arguments)}return ri(n,Vr),n.prototype.tag="head",n.prototype.parse=function(e){return e.pos=this.offset,this.version=e.readInt(),this.revision=e.readInt(),this.checkSumAdjustment=e.readInt(),this.magicNumber=e.readInt(),this.flags=e.readShort(),this.unitsPerEm=e.readShort(),this.created=e.readLongLong(),this.modified=e.readLongLong(),this.xMin=e.readShort(),this.yMin=e.readShort(),this.xMax=e.readShort(),this.yMax=e.readShort(),this.macStyle=e.readShort(),this.lowestRecPPEM=e.readShort(),this.fontDirectionHint=e.readShort(),this.indexToLocFormat=e.readShort(),this.glyphDataFormat=e.readShort()},n.prototype.encode=function(e){var t;return(t=new Wi).writeInt(this.version),t.writeInt(this.revision),t.writeInt(this.checkSumAdjustment),t.writeInt(this.magicNumber),t.writeShort(this.flags),t.writeShort(this.unitsPerEm),t.writeLongLong(this.created),t.writeLongLong(this.modified),t.writeShort(this.xMin),t.writeShort(this.yMin),t.writeShort(this.xMax),t.writeShort(this.yMax),t.writeShort(this.macStyle),t.writeShort(this.lowestRecPPEM),t.writeShort(this.fontDirectionHint),t.writeShort(e),t.writeShort(this.glyphDataFormat),t.data},n})(),Hd=(function(){function n(e,t){var r,i,a,l,o,u,d,h,b,x,p,L,k,C,y,V,q;switch(this.platformID=e.readUInt16(),this.encodingID=e.readShort(),this.offset=t+e.readInt(),b=e.pos,e.pos=this.offset,this.format=e.readUInt16(),this.length=e.readUInt16(),this.language=e.readUInt16(),this.isUnicode=this.platformID===3&&this.encodingID===1&&this.format===4||this.platformID===0&&this.format===4,this.codeMap={},this.format){case 0:for(u=0;u<256;++u)this.codeMap[u]=e.readByte();break;case 4:for(p=e.readUInt16(),x=p/2,e.pos+=6,a=(function(){var E,K;for(K=[],u=E=0;0<=x?E<x:E>x;u=0<=x?++E:--E)K.push(e.readUInt16());return K})(),e.pos+=2,k=(function(){var E,K;for(K=[],u=E=0;0<=x?E<x:E>x;u=0<=x?++E:--E)K.push(e.readUInt16());return K})(),d=(function(){var E,K;for(K=[],u=E=0;0<=x?E<x:E>x;u=0<=x?++E:--E)K.push(e.readUInt16());return K})(),h=(function(){var E,K;for(K=[],u=E=0;0<=x?E<x:E>x;u=0<=x?++E:--E)K.push(e.readUInt16());return K})(),i=(this.length-e.pos+this.offset)/2,o=(function(){var E,K;for(K=[],u=E=0;0<=i?E<i:E>i;u=0<=i?++E:--E)K.push(e.readUInt16());return K})(),u=y=0,q=a.length;y<q;u=++y)for(C=a[u],r=V=L=k[u];L<=C?V<=C:V>=C;r=L<=C?++V:--V)h[u]===0?l=r+d[u]:(l=o[h[u]/2+(r-L)-(x-u)]||0)!==0&&(l+=d[u]),this.codeMap[r]=65535&l}e.pos=b}return n.encode=function(e,t){var r,i,a,l,o,u,d,h,b,x,p,L,k,C,y,V,q,E,K,ae,J,H,D,G,S,P,B,U,re,Q,de,se,fe,we,te,A,I,W,$,X,ie,ue,he,me,Se,Te;switch(U=new Wi,l=Object.keys(e).sort(function(Ce,Fe){return Ce-Fe}),t){case"macroman":for(k=0,C=(function(){var Ce=[];for(L=0;L<256;++L)Ce.push(0);return Ce})(),V={0:0},a={},re=0,fe=l.length;re<fe;re++)V[he=e[i=l[re]]]==null&&(V[he]=++k),a[i]={old:e[i],new:V[e[i]]},C[i]=V[e[i]];return U.writeUInt16(1),U.writeUInt16(0),U.writeUInt32(12),U.writeUInt16(0),U.writeUInt16(262),U.writeUInt16(0),U.write(C),{charMap:a,subtable:U.data,maxGlyphID:k+1};case"unicode":for(P=[],b=[],q=0,V={},r={},y=d=null,Q=0,we=l.length;Q<we;Q++)V[K=e[i=l[Q]]]==null&&(V[K]=++q),r[i]={old:K,new:V[K]},o=V[K]-i,y!=null&&o===d||(y&&b.push(y),P.push(i),d=o),y=i;for(y&&b.push(y),b.push(65535),P.push(65535),G=2*(D=P.length),H=2*Math.pow(Math.log(D)/Math.LN2,2),x=Math.log(H/2)/Math.LN2,J=2*D-H,u=[],ae=[],p=[],L=de=0,te=P.length;de<te;L=++de){if(S=P[L],h=b[L],S===65535){u.push(0),ae.push(0);break}if(S-(B=r[S].new)>
93=32768)for(u.push(0),ae.push(2*(p.length+D-L)),i=se=S;S<=h?se<=h:se>=h;i=S<=h?++se:--se)p.push(r[i].new);else u.push(B-S),ae.push(0)}for(U.writeUInt16(3),U.writeUInt16(1),U.writeUInt32(12),U.writeUInt16(4),U.writeUInt16(16+8*D+2*p.length),U.writeUInt16(0),U.writeUInt16(G),U.writeUInt16(H),U.writeUInt16(x),U.writeUInt16(J),ie=0,A=b.length;ie<A;ie++)i=b[ie],U.writeUInt16(i);for(U.writeUInt16(0),ue=0,I=P.length;ue<I;ue++)i=P[ue],U.writeUInt16(i);for(me=0,W=u.length;me<W;me++)o=u[me],U.writeUInt16(o);for(Se=0,$=ae.length;Se<$;Se++)E=ae[Se],U.writeUInt16(E);for(Te=0,X=p.length;Te<X;Te++)k=p[Te],U.writeUInt16(k);return{charMap:r,subtable:U.data,maxGlyphID:q+1}}},n})(),Sf=(function(){function n(){return n.__super__.constructor.apply(this,arguments)}return ri(n,Vr),n.prototype.tag="cmap",n.prototype.parse=function(e){var t,r,i;for(e.pos=this.offset,this.version=e.readUInt16(),i=e.readUInt16(),this.tables=[],this.unicode=null,r=0;0<=i?r<i:r>i;r=0<=i?++r:--r)t=new Hd(e,this.offset),this.tables.push(t),t.isUnicode&&this.unicode==null&&(this.unicode=t);return!0},n.encode=function(e,t){var r,i;return t==null&&(t="macroman"),r=Hd.encode(e,t),(i=new Wi).writeUInt16(0),i.writeUInt16(1),r.table=i.data.concat(r.subtable),r},n})(),J5=(function(){function n(){return n.__super__.constructor.apply(this,arguments)}return ri(n,Vr),n.prototype.tag="hhea",n.prototype.parse=function(e){return e.pos=this.offset,this.version=e.readInt(),this.ascender=e.readShort(),this.decender=e.readShort(),this.lineGap=e.readShort(),this.advanceWidthMax=e.readShort(),this.minLeftSideBearing=e.readShort(),this.minRightSideBearing=e.readShort(),this.xMaxExtent=e.readShort(),this.caretSlopeRise=e.readShort(),this.caretSlopeRun=e.readShort(),this.caretOffset=e.readShort(),e.pos+=8,this.metricDataFormat=e.readShort(),this.numberOfMetrics=e.readUInt16()},n})(),Q5=(function(){function n(){return n.__super__.constructor.apply(this,arguments)}return ri(n,Vr),n.prototype.tag="OS/2",n.prototype.parse=function(e){if(e.pos=this.offset,this.version=e.readUInt16(),this.averageCharWidth=e.readShort(),this.weightClass=e.readUInt16(),this.widthClass=e.readUInt16(),this.type=e.readShort(),this.ySubscriptXSize=e.readShort(),this.ySubscriptYSize=e.readShort(),this.ySubscriptXOffset=e.readShort(),this.ySubscriptYOffset=e.readShort(),this.ySuperscriptXSize=e.readShort(),this.ySuperscriptYSize=e.readShort(),this.ySuperscriptXOffset=e.readShort(),this.ySuperscriptYOffset=e.readShort(),this.yStrikeoutSize=e.readShort(),this.yStrikeoutPosition=e.readShort(),this.familyClass=e.readShort(),this.panose=(function(){var t,r;for(r=[],t=0;t<10;++t)r.push(e.readByte());return r})(),this.charRange=(function(){var t,r;for(r=[],t=0;t<4;++t)r.push(e.readInt());return r})(),this.vendorID=e.readString(4),this.selection=e.readShort(),this.firstCharIndex=e.readShort(),this.lastCharIndex=e.readShort(),this.version>0&&(this.ascent=e.readShort(),this.descent=e.readShort(),this.lineGap=e.readShort(),this.winAscent=e.readShort(),this.winDescent=e.readShort(),this.codePageRange=(function(){var t,r;for(r=[],t=0;t<2;t=++t)r.push(e.readInt());return r})(),this.version>1))return this.xHeight=e.readShort(),this.capHeight=e.readShort(),this.defaultChar=e.readShort(),this.breakChar=e.readShort(),this.maxContext=e.readShort()},n})(),eg=(function(){function n(){return n.__super__.constructor.apply(this,arguments)}return ri(n,Vr),n.prototype.tag="post",n.prototype.parse=function(e){var t,r,i;switch(e.pos=this.offset,this.format=e.readInt(),this.italicAngle=e.readInt(),this.underlinePosition=e.readShort(),this.underlineThickness=e.readShort(),this.isFixedPitch=e.readInt(),this.minMemType42=e.readInt(),this.maxMemType42=e.readInt(),this.minMemType1=e.readInt(),this.maxMemType1=e.readInt(),this.format){case 65536:case 196608:break;case 131072:var a;for(r=e.readUInt16(),this.glyphNameIndex=[],a=0;0<=r?a<r:a>r;a=0<=r?++a:--a)this.glyphNameIndex.push(e.readUInt16());for(this.names=[],i=[];e.pos<this.offset+this.length;)t=e.readByte(),i.push(this.names.push(e.readString(t)));return i;case 151552:return r=e.readUInt16(),this.offsets=e.read(r);case 262144:return this.map=(function(){var l,o,u;
93for(u=[],a=l=0,o=this.file.maxp.numGlyphs;0<=o?l<o:l>o;a=0<=o?++l:--l)u.push(e.readUInt32());return u}).call(this)}},n})(),tg=function(n,e){this.raw=n,this.length=n.length,this.platformID=e.platformID,this.encodingID=e.encodingID,this.languageID=e.languageID},ng=(function(){function n(){return n.__super__.constructor.apply(this,arguments)}return ri(n,Vr),n.prototype.tag="name",n.prototype.parse=function(e){var t,r,i,a,l,o,u,d,h,b,x;for(e.pos=this.offset,e.readShort(),t=e.readShort(),o=e.readShort(),r=[],a=0;0<=t?a<t:a>t;a=0<=t?++a:--a)r.push({platformID:e.readShort(),encodingID:e.readShort(),languageID:e.readShort(),nameID:e.readShort(),length:e.readShort(),offset:this.offset+o+e.readShort()});for(u={},a=h=0,b=r.length;h<b;a=++h)i=r[a],e.pos=i.offset,d=e.readString(i.length),l=new tg(d,i),u[x=i.nameID]==null&&(u[x]=[]),u[i.nameID].push(l);this.strings=u,this.copyright=u[0],this.fontFamily=u[1],this.fontSubfamily=u[2],this.uniqueSubfamily=u[3],this.fontName=u[4],this.version=u[5];try{this.postscriptName=u[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}catch{this.postscriptName=u[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}return this.trademark=u[7],this.manufacturer=u[8],this.designer=u[9],this.description=u[10],this.vendorUrl=u[11],this.designerUrl=u[12],this.license=u[13],this.licenseUrl=u[14],this.preferredFamily=u[15],this.preferredSubfamily=u[17],this.compatibleFull=u[18],this.sampleText=u[19]},n})(),rg=(function(){function n(){return n.__super__.constructor.apply(this,arguments)}return ri(n,Vr),n.prototype.tag="maxp",n.prototype.parse=function(e){return e.pos=this.offset,this.version=e.readInt(),this.numGlyphs=e.readUInt16(),this.maxPoints=e.readUInt16(),this.maxContours=e.readUInt16(),this.maxCompositePoints=e.readUInt16(),this.maxComponentContours=e.readUInt16(),this.maxZones=e.readUInt16(),this.maxTwilightPoints=e.readUInt16(),this.maxStorage=e.readUInt16(),this.maxFunctionDefs=e.readUInt16(),this.maxInstructionDefs=e.readUInt16(),this.maxStackElements=e.readUInt16(),this.maxSizeOfInstructions=e.readUInt16(),this.maxComponentElements=e.readUInt16(),this.maxComponentDepth=e.readUInt16()},n})(),ig=(function(){function n(){return n.__super__.constructor.apply(this,arguments)}return ri(n,Vr),n.prototype.tag="hmtx",n.prototype.parse=function(e){var t,r,i,a,l,o,u;for(e.pos=this.offset,this.metrics=[],t=0,o=this.file.hhea.numberOfMetrics;0<=o?t<o:t>o;t=0<=o?++t:--t)this.metrics.push({advance:e.readUInt16(),lsb:e.readInt16()});for(i=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=(function(){var d,h;for(h=[],t=d=0;0<=i?d<i:d>i;t=0<=i?++d:--d)h.push(e.readInt16());return h})(),this.widths=(function(){var d,h,b,x;for(x=[],d=0,h=(b=this.metrics).length;d<h;d++)a=b[d],x.push(a.advance);return x}).call(this),r=this.widths[this.widths.length-1],u=[],t=l=0;0<=i?l<i:l>i;t=0<=i?++l:--l)u.push(this.widths.push(r));return u},n.prototype.forGlyph=function(e){return e in this.metrics?this.metrics[e]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[e-this.metrics.length]}},n})(),Af=[].slice,ag=(function(){function n(){return n.__super__.constructor.apply(this,arguments)}return ri(n,Vr),n.prototype.tag="glyf",n.prototype.parse=function(){return this.cache={}},n.prototype.glyphFor=function(e){var t,r,i,a,l,o,u,d,h,b;return e in this.cache?this.cache[e]:(a=this.file.loca,t=this.file.contents,r=a.indexOf(e),(i=a.lengthOf(e))===0?this.cache[e]=null:(t.pos=this.offset+r,l=(o=new Wi(t.read(i))).readShort(),d=o.readShort(),b=o.readShort(),u=o.readShort(),h=o.readShort(),this.cache[e]=l===-1?new og(o,d,b,u,h):new sg(o,l,d,b,u,h),this.cache[e]))},n.prototype.encode=function(e,t,r){var i,a,l,o,u;for(l=[],a=[],o=0,u=t.length;o<u;o++)i=e[t[o]],a.push(l.length),i&&(l=l.concat(i.encode(r)));return a.push(l.length),{table:l,offsets:a}},n})(),sg=(function(){function n(e,t,r,i,a,l){this.raw=e,this.numberOfContours=t,this.xMin=r,this.yMin=i,this.xMax=a,this.yMax=l,this.compound=!1}return n.prototype.encode=function(){return this.raw.data},n})(),og=(function(){function n(e,t,r,i,a){var l,o;for(this.raw=e,this.xMin=t,this.yMin=r,this.xMax=i,this.yMax=a,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],l=this.raw;o=l.readShort(),this.glyphOffsets.push(l.pos),this.glyphIDs.push(l.readUInt16()),32&o;)l.pos+=1&o?4:2,128&o?l.pos+=8:64&o?l.pos+=4:8&o&&(l.pos+=2)}return n.prototype.encode=function(){var e,t,r;for(t=new Wi(Af.call(this.raw.data)),e=0,r=this.glyphIDs.length;e<r;++e)t.pos=this.glyphOffsets[e];return t.data},n})(),lg=(function(){function n(){return n.__super__.constructor.apply(this,arguments)}return ri(n,Vr),n.prototype.tag="loca",n.prototype.parse=function(e){var t,r;return e.pos=this.offset,t=this.file.head.indexToLocFormat,this.offsets=t===0?(function(){var i,a;for(a=[],r=0,i=this.length;r<i;r+=2)a.push(2*e.readUInt16());return a}).call(this):(function(){var i,a;for(a=[],r=0,i=this.length;r<i;r+=4)a.push(e.readUInt32());return a}).call(this)},n.prototype.indexOf=function(e){return this.offsets[e]},n.prototype.lengthOf=function(e){return this.offsets[e+1]-this.offsets[e]}
93,n.prototype.encode=function(e,t){for(var r=new Uint32Array(this.offsets.length),i=0,a=0,l=0;l<r.length;++l)if(r[l]=i,a<t.length&&t[a]==l){++a,r[l]=i;var o=this.offsets[l],u=this.offsets[l+1]-o;u>0&&(i+=u)}for(var d=new Array(4*r.length),h=0;h<r.length;++h)d[4*h+3]=255&r[h],d[4*h+2]=(65280&r[h])>>8,d[4*h+1]=(16711680&r[h])>>16,d[4*h]=(4278190080&r[h])>>24;return d},n})(),cg=(function(){function n(e){this.font=e,this.subset={},this.unicodes={},this.next=33}return n.prototype.generateCmap=function(){var e,t,r,i,a;for(t in i=this.font.cmap.tables[0].codeMap,e={},a=this.subset)r=a[t],e[t]=i[r];return e},n.prototype.glyphsFor=function(e){var t,r,i,a,l,o,u;for(i={},l=0,o=e.length;l<o;l++)i[a=e[l]]=this.font.glyf.glyphFor(a);for(a in t=[],i)(r=i[a])!=null&&r.compound&&t.push.apply(t,r.glyphIDs);if(t.length>0)for(a in u=this.glyphsFor(t))r=u[a],i[a]=r;return i},n.prototype.encode=function(e,t){var r,i,a,l,o,u,d,h,b,x,p,L,k,C,y;for(i in r=Sf.encode(this.generateCmap(),"unicode"),l=this.glyphsFor(e),p={0:0},y=r.charMap)p[(u=y[i]).old]=u.new;for(L in x=r.maxGlyphID,l)L in p||(p[L]=x++);return h=(function(V){var q,E;for(q in E={},V)E[V[q]]=q;return E})(p),b=Object.keys(h).sort(function(V,q){return V-q}),k=(function(){var V,q,E;for(E=[],V=0,q=b.length;V<q;V++)o=b[V],E.push(h[o]);return E})(),a=this.font.glyf.encode(l,k,p),d=this.font.loca.encode(a.offsets,k),C={cmap:this.font.cmap.raw(),glyf:a.table,loca:d,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(t)},this.font.os2.exists&&(C["OS/2"]=this.font.os2.raw()),this.font.directory.encode(C)},n})();Ge.API.PDFObject=(function(){var n;function e(){}return n=function(t,r){return(Array(r+1).join("0")+t).slice(-r)},e.convert=function(t){var r,i,a,l;if(Array.isArray(t))return"["+(function(){var o,u,d;for(d=[],o=0,u=t.length;o<u;o++)r=t[o],d.push(e.convert(r));return d})().join(" ")+"]";if(typeof t=="string")return"/"+t;if(t?.isString)return"("+t+")";if(t instanceof Date)return"(D:"+n(t.getUTCFullYear(),4)+n(t.getUTCMonth(),2)+n(t.getUTCDate(),2)+n(t.getUTCHours(),2)+n(t.getUTCMinutes(),2)+n(t.getUTCSeconds(),2)+"Z)";if({}.toString.call(t)==="[object Object]"){for(i in a=["<<"],t)l=t[i],a.push("/"+i+" "+e.convert(l));return a.push(">>"),a.join(`
94`)}return""+t},e})();const $d=210,ug=297,En=14;async function dg(n){return new Promise(e=>{const t=new Image;t.crossOrigin="anonymous",t.onload=()=>e(t),t.onerror=()=>e(null),t.src=n})}function hg(n){try{const e=document.createElement("canvas");e.width=n.naturalWidth,e.height=n.naturalHeight;const t=e.getContext("2d");return t?(t.drawImage(n,0,0),e.toDataURL("image/jpeg",.82)):null}catch{return null}}function ic(n){return new Date(n).toLocaleDateString("ro-RO",{day:"numeric",month:"long",year:"numeric"})}async function fg({projectName:n,days:e}){const t=new Ge({unit:"mm",format:"a4"}),r=e.flatMap(u=>u.photos.filter(d=>!d.is_video).map(d=>({...d,dayLabel:u.day_label||ic(u.date)})));if(t.setFont("helvetica","normal"),t.setFontSize(22),t.text(n,En,50),t.setFontSize(11),t.setTextColor(110),t.text("Jurnal foto",En,60),e.length>0){const u=e[e.length-1].date,d=e[0].date;t.text(`Perioadă: ${ic(u)} — ${ic(d)}`,En,70)}t.text(`Total fotografii: ${r.length}`,En,77),t.text(`Generat: ${new Date().toLocaleDateString("ro-RO")}`,En,84),t.setDrawColor(180),t.line(En,92,$d-En,92);const i=($d-En*2-8)/2,a=(ug-En*2-16)/2,l=[{x:En,y:En},{x:En+i+8,y:En},{x:En,y:En+a+8},{x:En+i+8,y:En+a+8}];for(let u=0;u<r.length;u+=4){t.addPage();const d=r.slice(u,u+4);for(let h=0;h<d.length;h++){const b=d[h],x=l[h],p=a-12,L=b.full_path||b.thumbnail_path;let k=!1;if(L){const q=await dg(L);if(q){const E=hg(q);if(E)try{t.addImage(E,"JPEG",x.x,x.y,i,p),k=!0}catch{}}}k||(t.setFillColor(235,230,222),t.rect(x.x,x.y,i,p,"F"),t.setTextColor(140),t.setFontSize(9),t.text("fără previzualizare",x.x+i/2,x.y+p/2,{align:"center"})),t.setTextColor(40),t.setFontSize(9);const C=new Date(b.taken_at).toLocaleTimeString("ro-RO",{hour:"2-digit",minute:"2-digit"}),y=`${b.dayLabel} · ${C}
94`,V=[b.tag,b.milestone_name,b.uploader_initials].filter(Boolean);t.text(y,x.x,x.y+p+5),V.length&&(t.setTextColor(110),t.text(V.join(" · "),x.x,x.y+p+10))}}const o=`${n.replace(/[^a-zA-Z0-9-_]+/g,"_")}_jurnal_foto.pdf`;t.save(o)}function pg({projectId:n}){const e=Tr(),{data:t,isLoading:r,isError:i,error:a,refetch:l}=p2(n),o=Eh(n),[u,d]=be.useState("all"),[h,b]=be.useState(""),[x,p]=be.useState(null),[L,k]=be.useState(null),[C,y]=be.useState(!1),[V,q]=be.useState(!1),E=be.useRef(null);async function K(D){const G=Array.from(D??[]);if(!(!G.length||V)){q(!0);try{const{getApiBaseUrl:S}=await en(async()=>{const{getApiBaseUrl:U}=await import("./index-D14oYjMA.js").then(re=>re.c5);return{getApiBaseUrl:U}},__vite__mapDeps([0,1,2,3,4,5,6])),P=new FormData;G.forEach(U=>P.append("files[]",U)),(await fetch(`${S()}/taschi_bridge/bridge_api/projects/${n}/photos`,{method:"POST",body:P,credentials:"include"})).ok&&e.invalidateQueries({queryKey:["project_photos",n]})}finally{q(!1),E.current&&(E.current.value="")}}}const ae=rs({query:{data:t,isLoading:r,isError:i,error:i?a:void 0}}),J=be.useMemo(()=>({title:"Nicio fotografie încă",description:"Adaugă fotografii pentru a documenta progresul șantierului.",action:{key:"add_photos",label:"Adaugă fotografii",onInvoke:()=>E.current?.click()}}),[]),H=async()=>{if(!(!t||t.length===0)){y(!0);try{await fg({projectName:o.data?.project?.name??`Proiect ${n}`,days:t})}finally{y(!1)}}};return m.jsxs(m.Fragment,{children:[m.jsx("input",{ref:E,type:"file",multiple:!0,accept:"image/*,video/*",style:{display:"none"},onChange:D=>{K(D.target.files)}}),m.jsx(ns,{state:ae,errorRetry:l,emptyConfig:J,children:m.jsxs("div",{style:{flex:1,padding:"18px 56px",overflow:"hidden",display:"flex",flexDirection:"column",gap:12,overflowY:"auto"},children:[m.jsx(v2,{activeFilter:u,onFilterChange:d,search:h,onSearchChange:b,onExportPdf:H,isExporting:C,onUpload:()=>E.current?.click(),isUploading:V}),va(t).map(D=>m.jsx(y2,{group:D,onPhotoClick:p},D.date))]})}),x&&m.jsx(x2,{photo:x,onClose:()=>p(null),onTagMilestone:D=>k(D)}),L&&m.jsx(S2,{projectId:n,photo:L,milestones:o.data?.upcoming_milestones??[],onClose:()=>k(null)})]})}const gg="is_View _fd-column _fg-1 _fs-1 _fb-0px _mih-0px ",mg="is_View _fd-column _fg-1 _fs-1 _fb-0px _mih-0px ";function vg({projectId:n,initialSegment:e="documente"}){const{t}=Kt(),{resolvedTheme:r}=Gt(),i=Yt[r],[a,l]=be.useState(e),o=[{key:"documente",label:t("projects_seg_documente",{defaultValue:"Documente"})},{key:"foto",label:t("projects_seg_foto",{defaultValue:"Foto"})}];return m.jsxs("div",{className:mg,children:[m.jsx(xr,{paddingHorizontal:Bt.space(7),paddingTop:Bt.space(3),paddingBottom:Bt.space(1),children:m.jsx(xr,{gap:4,alignItems:"center",backgroundColor:i.subtleBg,borderRadius:10,padding:2,children:o.map(u=>{const d=u.key===a;return m.jsx(xr,{tag:"button",cursor:"pointer",onPress:()=>l(u.key),paddingVertical:5,paddingHorizontal:12,borderRadius:8,backgroundColor:d?i.cardBg:"transparent",hoverStyle:d?{}:{backgroundColor:i.softSurfaceBg},animation:"quick",style:{transition:"all 0.18s ease",boxShadow:d?"0 1px 3px rgba(0,0,0,0.1)":"none"},children:m.jsx(xi,{fontSize:_t(12),color:d?i.text:i.textMuted,fontWeight:d?"600":"500",style:{whiteSpace:"nowrap"},children:u.label})},u.key)})})}),m.jsx("div",{className:gg,children:a==="documente"?m.jsx(d2,{projectId:n}):m.jsx(pg,{projectId:n})})]})}const bg=[{id:1,name:"Andrei Munteanu",initials:"AM"},{id:3,name:"Mihai Iordache",initials:"MI"},{id:6,name:"Marius Tofan",initials:"MT"},{id:7,name:"Dan Grigore",initials:"DG"},{id:8,name:"Paul Rotaru",initials:"PR"}];function kf(n){const e=new Date("2026-04-26T00:00:00Z");return e.setUTCDate(e.getUTCDate()-n),e.toISOString().slice(0,10)}const Lf=[];let yg=1;for(let n=0;n<28;n++){const e=kf(n),t=new Date(e+"T00:00:00Z").getUTCDay();if(!(t===0||t===6))for(const r of bg){if((r.id+n)%5===0)continue;const i=r.id<=3?8:9,a=n*r.id%3-1,l=Math.max(2,i+a);Lf.push({id:yg++,staff_id:r.id,staff_name:r.name,staff_initials:r.initials,date:e,hours:l,task_name:n<7?"Cofrare placă peste parter":"Lucrări structură",note:""})}}const xg={entries:Lf,week_start:kf(0-(new Date("2026-04-26T00:00:00Z").getUTCDay()+6)%7)},jf=typeof window<"u"&&new URLSearchParams(window.location.search).get("mock")==="1";async function wg(n){if(jf)return await new Promise(r=>setTimeout(r,150)),xg;const{api:e}=await en(async()=>{const{api:r}=await import("./index-D14oYjMA.js").then(i=>i.c5);return{api:r}},__vite__mapDeps([0,1,2,3,4,5,6]));
94return(await e.get(`/taschi_bridge/bridge_api/projects/${n}/timesheets`)).data}function _g(n){return Er({queryKey:["project_timesheets",n,jf],queryFn:()=>wg(n),staleTime:3e4,enabled:n>0})}const Sg=["L","Ma","Mi","J","V","S","D"];function ha(n){return n.toISOString().slice(0,10)}function Ag(n){return(n.getUTCDay()+6)%7}function Gd(n){const e=new Date(n);return e.setUTCDate(e.getUTCDate()-Ag(e)),e.setUTCHours(0,0,0,0),e}function kg(n){const e=new Date(n);return e.setUTCDate(e.getUTCDate()+6),`${n.getUTCDate()} ${n.toLocaleDateString("ro-RO",{month:"short",timeZone:"UTC"})} – ${e.getUTCDate()} ${e.toLocaleDateString("ro-RO",{month:"short",timeZone:"UTC"})}`}function Lg({projectId:n}){const{t:e}=Kt(),{resolvedTheme:t}=Gt(),r=Yt[t],{data:i,isLoading:a,isError:l,error:o,refetch:u}=_g(n),d=be.useMemo(()=>{if(!i)return null;const h=i.entries,b=new Date,x=new Date(Date.UTC(b.getFullYear(),b.getMonth(),b.getDate())),p=Gd(x),L=[];for(let J=3;J>=0;J--){const H=new Date(p);H.setUTCDate(H.getUTCDate()-J*7),L.push(H)}const k=new Map;for(const J of h){const H=k.get(J.staff_id)??{id:J.staff_id,name:J.staff_name,initials:J.staff_initials,total:0};H.total+=J.hours,k.set(J.staff_id,H)}const C=Array.from(k.values()).sort((J,H)=>H.total-J.total),y=new Map,V=new Map;for(const J of h){const H=Gd(new Date(J.date+"T00:00:00Z")),D=ha(H);y.set(`${J.staff_id}:${D}`,(y.get(`${J.staff_id}:${D}`)??0)+J.hours),V.set(D,(V.get(D)??0)+J.hours)}const q=new Map;for(const J of h)q.set(J.date,(q.get(J.date)??0)+J.hours);const E=[];for(let J=0;J<L.length;J++)for(let H=0;H<7;H++){const D=new Date(L[J]);D.setUTCDate(D.getUTCDate()+H);const G=ha(D);E.push({date:G,hours:q.get(G)??0,weekIdx:J,dow:H})}const K=Math.max(1,...E.map(J=>J.hours)),ae=h.reduce((J,H)=>J+H.hours,0);return{staff:C,weeks:L,staffWeek:y,weekTotals:V,heatDays:E,maxDay:K,grandTotal:ae,entries:h}},[i]);return a?m.jsx(gh,{}):l?m.jsx("div",{style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"48px 56px",gap:12},children:m.jsx("div",{style:{maxWidth:480,width:"100%"},children:m.jsxs(Ko,{tone:"error",action:{label:e("projects_reincearca",{defaultValue:"Reîncearcă"}),onClick:()=>{u()}},children:["Nu am putut încărca pontajul (cod: ",o?.message??"necunoscut",")"]})})}):i&&i.entries.length===0?m.jsx("div",{style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"48px 56px",gap:10},children:m.jsx(Vs,{title:e("projects_nicio_inregistrare_de_pontaj",{defaultValue:"Nicio înregistrare de pontaj"}),action:{label:e("projects_adauga_pontaj",{defaultValue:"Adaugă pontaj"}),onClick:()=>window.open("/admin/timesheets/create","_self")}})}):m.jsx("div",{style:{flex:1,padding:"18px 56px",overflowY:"auto"},children:d&&m.jsxs(m.Fragment,{children:[m.jsxs("section",{style:{display:"grid",gridTemplateColumns:"1fr 1fr 1fr",gap:10,marginBottom:24},children:[m.jsx(Tl,{id:"total-hours",label:e("projects_total_ore_proiect",{defaultValue:"Total ore proiect"}),value:`${d.grandTotal.toFixed(0)} h`}),m.jsx(Tl,{id:"current-week",label:e("projects_saptamana_curenta",{defaultValue:"Săptămâna curentă"}),value:`${(d.weekTotals.get(ha(d.weeks[3]))??0).toFixed(0)} h`}),m.jsx(Tl,{id:"active-members",label:e("projects_membri_activi",{defaultValue:"Membri activi"}),value:String(d.staff.length)})]}),m.jsxs("section",{style:{marginBottom:28},children:[m.jsx("div",{style:{fontSize:"calc(11px * var(--theme-font-scale, 1))",color:r.textMuted,letterSpacing:"0.04em",textTransform:"uppercase",marginBottom:10},children:"Heatmap activitate · ultimele 4 săptămâni"}),m.jsxs("div",{style:{display:"grid",gridTemplateColumns:"60px repeat(7, 1fr)",gap:4,fontSize:"calc(11px * var(--theme-font-scale, 1))"},children:[m.jsx("div",{}),Sg.map(h=>m.jsx("div",{style:{textAlign:"center",color:r.textSubtle},children:h},h)),d.weeks.map((h,b)=>m.jsxs(xe.Fragment,{children:[m.jsxs("div",{style:{color:r.textMuted,fontSize:"calc(11px * var(--theme-font-scale, 1))",paddingTop:8},children:["S",b+1]}),Array.from({length:7}).map((x,p)=>{const L=d.heatDays.find(y=>y.weekIdx===b&&y.dow===p),k=L?L.hours/d.maxDay:0,C=L&&L.hours>0?`rgba(123, 143, 78, ${.15+k*.85})`:r.subtleBg;return m.jsx("div",{title:L?`${L.date}: ${L.hours}h`:"",style:{height:32,background:C,borderWidth:1,borderStyle:"solid",borderColor:r.border,borderRadius:"calc(3px * var(--theme-radius-scale, 1))",display:"flex",alignItems:"center",justifyContent:"center",color:k>.55?zo.onAccent:r.textMuted,fontSize:"calc(10.5px * var(--theme-font-scale, 1))",fontWeight:500},children:L&&L.hours>0?L.hours:""},p)})]},ha(h)))]})]}),m.jsxs("section",{children:[m.jsx("div",{style:{fontSize:"calc(11px * var(--theme-font-scale, 1))",color:r.textMuted,letterSpacing:"0.04em",textTransform:"uppercase",marginBottom:10},children:"Ore per membru × săptămână"}),m.jsxs(ni,{style:{overflow:"hidden"},children:[m.jsxs("div",{style:{display:"grid",gridTemplateColumns:`1.4fr repeat(${d.weeks.length}, 1fr) 90px`,background:r.sectionBg,padding:"10px 14px",fontSize:"calc(11px * var(--theme-font-scale, 1))",color:r.textMuted,letterSpacing:"0.04em",textTransform:"uppercase",borderBottom:`1px solid ${r.border}`},children:[m.jsx("div",{children:"Membru"}),d.weeks.map(h=>m.jsx("div",{style:{textAlign:"center"},children:kg(h)},ha(h))),m.jsx("div",{style:{textAlign:"right"},children:e("total",{defaultValue:"Total"})})]}),d.staff.map((h,b)=>m.jsxs("div",{style:{display:"grid",gridTemplateColumns:`1.4fr repeat(${d.weeks.length}, 1fr) 90px`,padding:"11px 14px",borderBottom:b===d.staff.length-1?"none":`1px solid ${r.border}`,fontSize:"calc(12.5px * var(--theme-font-scale, 1))",alignItems:"center"},children:[m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:9},children:[m.jsx("span",{style:{width:26,height:26,borderRadius:"50%",background:r.subtleBg,color:r.text,display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:"calc(11px * var(--theme-font-scale, 1))",fontWeight:500},children:h.initials}),m.jsx("span",{children:h.name})]}),d.weeks.map(x=>{const p=d.staffWeek.get(`${h.id}:${ha(x)}`)??0;return m.jsx("div",{style:{textAlign:"center",color:p===0?r.textSubtle:r.text,fontVariantNumeric:"tabular-nums"},children:p===0?"—":`${p}h`},ha(x))}),m.jsxs("div",{style:{textAlign:"right",fontWeight:500,fontVariantNumeric:"tabular-nums"},children:[h.total,"h"]})]}
94,h.id))]})]})]})})}const Nf=typeof window<"u"&&new URLSearchParams(window.location.search).get("mock")==="1";async function jg(n){if(Nf)return await new Promise(a=>setTimeout(a,150)),{items:_c.activity};const{api:e}=await en(async()=>{const{api:a}=await import("./index-D14oYjMA.js").then(l=>l.c5);return{api:a}},__vite__mapDeps([0,1,2,3,4,5,6])),t=await e.get(`/taschi_bridge/bridge_api/projects/${n}/activity`),r=t?.data??t;return{items:Array.isArray(r)?r:r?.items??[]}}function Ng(n){return Er({queryKey:["project_activity",n,Nf],queryFn:()=>jg(n),staleTime:3e4,enabled:n>0,select:e=>e.items})}const Cg={photo:"Fotografii",task:"Sarcini",expense:"Cheltuieli",file:"Fișiere",member:"Echipă",comment:"Comentarii"};function Pg(n){return{photo:n.accent,task:n.successText,expense:n.warningText,file:n.textMuted,member:n.textMuted,comment:n.textMuted}}const Tg=[{id:"all",label:"Tot"},{id:"photo",label:"Fotografii"},{id:"task",label:"Sarcini"},{id:"expense",label:"Cheltuieli"},{id:"file",label:"Fișiere"}];function Eg(n){const t=(Date.now()-new Date(n).getTime())/36e5;return t<1?"acum câteva minute":t<24?`acum ${Math.round(t)} ore`:Math.round(t/24)===1?"ieri":new Date(n).toLocaleDateString("ro-RO",{weekday:"long",day:"numeric",month:"long"})}function Dg({projectId:n}){const{resolvedTheme:e}=Gt(),t=Yt[e],[r,i]=xe.useState("all"),{data:a,isLoading:l,isError:o,error:u,refetch:d}=Ng(n),h=rs({query:{data:a,isLoading:l,isError:o,error:o?u:void 0},hasActiveFilters:r!=="all"}),b=Pg(t),x=va(a).filter(p=>r==="all"||p.type===r);return m.jsx(ns,{state:h,errorRetry:d,children:m.jsxs("div",{style:{flex:1,padding:"18px 56px",overflowY:"auto"},children:[m.jsx("div",{style:{display:"flex",gap:6,marginBottom:20},children:Tg.map(p=>m.jsx(Ct,{primary:r===p.id,"aria-pressed":r===p.id,onClick:()=>i(p.id),children:p.label},p.id))}),m.jsx("div",{children:x.map((p,L)=>{const k=b[p.type]??t.textMuted,C=L===x.length-1;return m.jsxs("div",{style:{display:"flex",gap:14,padding:"10px 0",position:"relative"},children:[!C&&m.jsx("div",{style:{position:"absolute",left:7,top:26,bottom:0,width:1,background:t.border}}),m.jsx("div",{style:{width:14,height:14,flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",marginTop:4,position:"relative",zIndex:1},children:m.jsx("div",{style:{width:7,height:7,borderRadius:"50%",background:k,border:`1.5px solid ${k}`}})}),m.jsxs("div",{style:{flex:1,minWidth:0},children:[m.jsxs("div",{style:{fontSize:"calc(13px * var(--theme-font-scale, 1))",lineHeight:1.45,color:t.text},children:[m.jsx("strong",{style:{fontWeight:500},children:p.actor_name})," ",p.description,p.amount&&m.jsxs("span",{style:{marginLeft:6,fontSize:"calc(12px * var(--theme-font-scale, 1))",background:t.warningBg,color:t.warningText,padding:"1px 6px",borderRadius:"calc(3px * var(--theme-radius-scale, 1))",fontWeight:500},children:[p.amount.toLocaleString("ro-RO")," €"]})]}),m.jsxs("div",{style:{fontSize:"calc(11.5px * var(--theme-font-scale, 1))",color:t.textSubtle,marginTop:2},children:[Eg(p.created_at)," · ",Cg[p.type]]})]})]},p.id)})})]})})}const Mg="is_View _fd-column _fg-1 _fs-1 _fb-0px _mih-0px ",Ig="is_View _fd-column _fg-1 _fs-1 _fb-0px _mih-0px ";function Fg({projectId:n,initialSegment:e="pontaj"}){const{t}=Kt(),{resolvedTheme:r}=Gt(),i=Yt[r],[a,l]=be.useState(e),o=[{key:"pontaj",label:t("projects_seg_pontaj",{defaultValue:"Ore & pontaj"})},{key:"activitate",label:t("projects_seg_activitate",{defaultValue:"Activitate"})}];return m.jsxs("div",{className:Ig,children:[m.jsx(xr,{paddingHorizontal:Bt.space(7),paddingTop:Bt.space(3),paddingBottom:Bt.space(1),children:m.jsx(xr,{gap:4,alignItems:"center",backgroundColor:i.subtleBg,borderRadius:10,padding:2,children:o.map(u=>{const d=u.key===a;return m.jsx(xr,{tag:"button",cursor:"pointer",onPress:()=>l(u.key),paddingVertical:5,paddingHorizontal:12,borderRadius:8,backgroundColor:d?i.cardBg:"transparent",hoverStyle:d?{}:{backgroundColor:i.softSurfaceBg},animation:"quick",style:{transition:"all 0.18s ease",boxShadow:d?"0 1px 3px rgba(0,0,0,0.1)":"none"},children:m.jsx(xi,{fontSize:_t(12),color:d?i.text:i.textMuted,fontWeight:d?"600":"500",style:{whiteSpace:"nowrap"},children:u.label})},u.key)})})}),m.jsx("div",{className:Mg,children:a==="pontaj"?m.jsx(Lg,{projectId:n}):m.jsx(Dg,{projectId:n})})]})}
94const Og=Hi(["sef_santier","arhitect","inginer","electrician","instalator","fierar_betonist","zugrav","dulger","zidar","muncitor"]),Bg=Hi(["pe_santier","birou","disponibil"]),Rg=Hi(["done","in_progress","planned","blocked"]),zg=Hi(["todo","in_progress","review","done"]),qg=Hi(["photo","task","expense","file","member","comment"]),Ug=xn({id:He(),name:je(),status:He(),address:je().optional().default(""),city:je().optional().default(""),country:je().optional().default(""),lat:He().optional(),lng:He().optional(),clientid:He(),client_name:je(),project_cost:He(),start_date:je(),deadline:je(),progress:He(),project_type:k1.optional()}),Vg=xn({progress_pct:He(),budget_spent:He(),budget_total:He(),days_worked:He(),days_total:He(),hours_this_week:He(),hours_prev_week:He(),hours_weekly_series:_r(He()),tasks_active:He(),tasks_total:He(),tasks_overdue:He(),tasks_done:He(),tasks_in_progress:He()}),Wg=xn({staff_id:He(),firstname:je(),lastname:je(),initials:je(),role:Og,presence_status:Bg,next_available_date:je().optional(),avatar_color:je().optional()}),Hg=xn({id:He(),type:qg,actor_name:je(),actor_initials:je(),description:je(),amount:He().optional(),created_at:je()}),$g=xn({id:He(),name:je(),start_date:je().nullable().optional(),due_date:je(),assignee_initials:je(),assignee_name:je(),description_visible_to_customer:He().optional(),open_tasks:He().optional(),is_urgent:ts().optional()}),Gg=xn({id:He(),name:je(),initials:je()}),Yg=xn({id:je(),name:je(),assignee_initials:je(),assignee_name:je(),start:je(),end:je(),progress:He(),status:Rg,dependencies:_r(je()).optional(),type:Hi(["task","project"]).optional(),project:je().nullable().optional(),color:je().optional(),task_id:He().optional(),perfex_status:He().optional(),assignees:_r(Gg).optional()}),Kg=xn({task_id:je(),date:je(),count:He()});xn({tasks:_r(Yg),photos:_r(Kg)});xn({id:He(),name:je(),status:zg,tags:_r(je()),assignee_initials:je(),assignee_name:je(),due_date:je(),is_overdue:ts(),progress:He().optional(),photo_count:He().optional(),milestone_id:He().nullable().optional(),milestone_name:je().optional()});const Xg=xn({camera:je().optional(),lens:je().optional(),iso:He().optional(),aperture:je().optional(),shutter:je().optional(),focal_length:je().optional(),gps_lat:He().optional(),gps_lng:He().optional(),width:He().optional(),height:He().optional(),datetime_original:je().optional()}),Zg=xn({id:He(),thumbnail_path:je(),full_path:je().optional(),video_path:je().optional(),taken_at:je(),uploader_initials:je(),uploader_name:je().optional(),is_video:ts(),is_featured:ts(),tag:je().optional(),milestone_id:He().nullable().optional(),milestone_name:je().optional(),exif:Xg.optional()});xn({date:je(),day_label:je(),photo_count:He(),uploader_count:He(),photos:_r(Zg)});const Jg=Hi(["needed","ordered","delivered","installed","returned"]),Qg=xn({id:El(),project_id:El().optional(),name:je(),category:je().nullish(),qty:fu([He(),je()]).transform(n=>Number(n)),unit:je().default("buc"),supplier:je().nullish(),status:Jg,eta:je().nullish(),unit_price:fu([He(),je()]).nullish().transform(n=>n!=null?Number(n):null),notes:je().nullish(),addedfrom:El().optional(),dateadded:je().optional()}),em=xn({id:He(),name:je(),category_name:je(),amount:He(),currency_symbol:je().default("€"),date:je(),note:je().optional().default(""),billable:ts().optional().default(!1),invoiced:ts().optional().default(!1),vendor:je().optional().default("")});xn({items:_r(em),budget_total:He(),spent_total:He()});const tm=xn({id:He(),staff_id:He(),staff_name:je(),staff_initials:je(),date:je(),hours:He(),note:je().optional().default(""),task_name:je().optional().default("")});xn({entries:_r(tm),week_start:je()});const nm=Hi(["arhitectura","structura","instalatii","autorizari","contracte","altele"]);xn({id:He(),name:je(),category:nm,size_bytes:He(),mime:je(),url:je(),uploaded_by:je(),uploaded_at:je(),thumbnail_url:je().optional()});xn({id:He(),author_id:He(),author_name:je(),author_avatar:je().optional(),content:je(),created_at:je(),parent_id:He().nullable().optional(),reply_count:He().optional().default(0)});xn({project:Ug,kpis:Vg,members:_r(Wg),activity:_r(Hg),upcoming_milestones:_r($g)});const rm=[{id:1,name:"Ciment Portland CEM II 42.5R",qty:120,unit:"sac",category:"Beton",status:"installed",supplier:"HeidelbergCement",eta:"2026-04-05",unit_price:32,notes:null},{id:2,name:"Fier-beton Ø12 PC52",qty:2400,unit:"kg",category:"Metal",status:"installed",supplier:"Mechel",eta:"2026-04-04",unit_price:null,notes:null},{id:3,name:"Cărămidă Porotherm 25 N+F",qty:3800,unit:"buc",category:"Cărămidă",status:"delivered",supplier:"Wienerberger",eta:"2026-04-22",unit_price:null,notes:null},{id:4,name:"Tâmplărie PVC Salamander 76mm",qty:14,unit:"buc",category:"Altele",status:"ordered",supplier:"Salamander RO",eta:"2026-05-08",unit_price:null,notes:"Livrare estimată 2026-05-08"},{id:5,name:"Vată minerală Knauf 10cm",qty:320,unit:"m²",category:"Altele",status:"needed",supplier:null,eta:null,unit_price:null,notes:null}],Cf=typeof window<"u"&&new URLSearchParams(window.location.search).get("mock")==="1";async function im(n){if(Cf)return await new Promise(r=>setTimeout(r,200)),rm;const{api:e}=await en(async()=>{const{api:r}=await import("./index-D14oYjMA.js").then(i=>i.c5);return{api:r}},__vite__mapDeps([0,1,2,3,4,5,6])),t=await e.get(`/taschi_bridge/bri
94dge_api/projects/${n}/materials`);return _r(Qg).parse(t.data)}function am(n){return Er({queryKey:["project_depozit",n,Cf],queryFn:()=>im(n),staleTime:6e4,enabled:n>0})}const Pc=typeof window<"u"&&new URLSearchParams(window.location.search).get("mock")==="1";function sm(n){const e=Tr();return wa({mutationFn:async t=>{if(Pc)return{id:Date.now()};const{api:r}=await en(async()=>{const{api:i}=await import("./index-D14oYjMA.js").then(a=>a.c5);return{api:i}},__vite__mapDeps([0,1,2,3,4,5,6]));return r.post(`/taschi_bridge/bridge_api/projects/${n}/materials`,t)},onSuccess:()=>{e.invalidateQueries({queryKey:["project_depozit",n]})},onError:()=>is.error("Eroare la adăugarea materialului")})}function om(n){const e=Tr();return wa({mutationFn:async({mid:t,body:r})=>{if(Pc)return;const{api:i}=await en(async()=>{const{api:a}=await import("./index-D14oYjMA.js").then(l=>l.c5);return{api:a}},__vite__mapDeps([0,1,2,3,4,5,6]));return i.put(`/taschi_bridge/bridge_api/projects/${n}/materials/${t}`,r)},onSuccess:()=>{e.invalidateQueries({queryKey:["project_depozit",n]})},onError:()=>is.error("Eroare la actualizarea materialului")})}function lm(n){const e=Tr();return wa({mutationFn:async t=>{if(Pc)return;const{api:r}=await en(async()=>{const{api:i}=await import("./index-D14oYjMA.js").then(a=>a.c5);return{api:i}},__vite__mapDeps([0,1,2,3,4,5,6]));return r.delete(`/taschi_bridge/bridge_api/projects/${n}/materials/${t}`)},onSuccess:()=>{e.invalidateQueries({queryKey:["project_depozit",n]})},onError:()=>is.error("Eroare la ștergerea materialului")})}const Yd=["Beton","Cărămidă","Lemn","Metal","Instalații","Altele"],Kd=["buc","sac","kg","m","m²","m³","l"],Xd=[{value:"needed",label:"Necesar"},{value:"ordered",label:"Comandat"},{value:"delivered",label:"Livrat"},{value:"installed",label:"Instalat"},{value:"returned",label:"Returnat"}],Zd={name:"",category:"",qty:0,unit:"buc",supplier:"",status:"needed",eta:"",unit_price:void 0,notes:""};function Jd({open:n,onClose:e,onSave:t,isSaving:r}){const{t:i}=Kt(),{resolvedTheme:a}=Gt(),l=Yt[a],o=fh(),u=!!o.sm,d=!!o.md&&!o.sm,[h,b]=be.useState(Zd);function x(y,V){b(q=>({...q,[y]:V}))}function p(){b(Zd),e()}function L(){!h.name.trim()||h.qty<=0||t({name:h.name.trim(),category:h.category||void 0,qty:Number(h.qty),unit:h.unit,supplier:h.supplier||void 0,status:h.status,eta:h.eta||void 0,unit_price:h.unit_price!=null&&h.unit_price>0?Number(h.unit_price):void 0,notes:h.notes||void 0})}const k=h.name.trim().length>0&&h.qty>0,C=[{label:r?i("saving","Se salvează…"):i("save","Salvează"),onClick:L,variant:"primary",disabled:!k||r},{label:i("close","Închide"),onClick:p,variant:"ghost"}];return m.jsx(Us,{open:n,onOpenChange:y=>{y||p()},title:i("projects_adauga_material",{defaultValue:"Adaugă material"}),titleEyebrow:i("projects_depozit_proiect",{defaultValue:"Depozit proiect"}),titleEyebrowAccent:!0,width:u?"100%":480,fluidTokens:Bt,tabs:[],activeTab:"",onTabChange:()=>{},slots:{headerLeft:m.jsx(bh,{icon:m.jsx(ph,{size:18}),color:l.accent}),footer:m.jsx(vh,{actions:C})},children:m.jsx(mh,{a73Tokens:Bt,c:l,isMobile:u,isTablet:d,children:m.jsxs(wi,{gap:Bt.space(4),children:[m.jsxs(ac,{title:i("projects_identificare",{defaultValue:"Identificare"}),children:[m.jsx(Qd,{label:i("projects_nume_material",{defaultValue:"Nume material"}),required:!0,placeholder:i("projects_ex_ciment_portland_cem_ii",{defaultValue:"ex: Ciment Portland CEM II"}),value:h.name,onChange:y=>x("name",y),c:l}),m.jsx(sc,{label:i("category",{defaultValue:"Categorie"}),value:h.category??"",options:["",...Yd],labels:[i("select_placeholder",{defaultValue:"— selectează —"}),...Yd],onChange:y=>x("category",y),c:l})]}),m.jsxs(ac,{title:i("projects_cantitate",{defaultValue:"Cantitate"}),children:[m.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1.6fr 1fr",gap:Bt.space(2)},children:[m.jsx(eh,{label:i("projects_cantitate",{defaultValue:"Cantitate"}),required:!0,placeholder:i("projects_ex_120",{defaultValue:"ex: 120"}),value:h.qty===0?"":String(h.qty),onChange:y=>x("qty",Number(y)||0),c:l}),m.jsx(sc,{label:i("unit",{defaultValue:"Unitate"}),value:h.unit,options:Kd,labels:Kd,onChange:y=>x("unit",y),c:l})]}),m.jsx(eh,{label:i("projects_pret_unitar_optional",{defaultValue:"Preț unitar (opțional)"}),placeholder:i("projects_ex_3250",{defaultValue:"ex: 32.50"}
94),value:h.unit_price!=null?String(h.unit_price):"",onChange:y=>x("unit_price",y?Number(y):void 0),c:l})]}),m.jsxs(ac,{title:i("projects_aprovizionare",{defaultValue:"Aprovizionare"}),children:[m.jsx(Qd,{label:i("projects_furnizor",{defaultValue:"Furnizor"}),placeholder:i("projects_ex_ambient",{defaultValue:"ex: Ambient"}),value:h.supplier??"",onChange:y=>x("supplier",y),c:l}),m.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:Bt.space(2)},children:[m.jsx(sc,{label:i("status",{defaultValue:"Status"}),value:h.status,options:Xd.map(y=>y.value),labels:Xd.map(y=>y.label),onChange:y=>x("status",y),c:l}),m.jsx(cm,{label:i("projects_eta_estimare_livrare",{defaultValue:"ETA (estimare livrare)"}),value:h.eta??"",onChange:y=>x("eta",y),c:l})]}),m.jsx(um,{label:i("notes",{defaultValue:"Note"}),placeholder:i("projects_observatii",{defaultValue:"Observații..."}),value:h.notes??"",onChange:y=>x("notes",y),c:l})]})]})})})}function ac({title:n,children:e}){return m.jsxs(wi,{gap:Bt.space(2),children:[m.jsx("span",{style:dm(),children:n}),e]})}function Qd({label:n,value:e,onChange:t,placeholder:r,required:i,c:a}){return m.jsxs("label",{style:$s(),children:[m.jsxs("span",{style:Gs(a),children:[n,i?" *":""]}),m.jsx("input",{type:"text",value:e,onChange:l=>t(l.target.value),placeholder:r,"data-drawer-field-input":"1",style:Ys(a)})]})}function eh({label:n,value:e,onChange:t,placeholder:r,required:i,c:a}){return m.jsxs("label",{style:$s(),children:[m.jsxs("span",{style:Gs(a),children:[n,i?" *":""]}),m.jsx("input",{type:"number",min:0,step:"any",value:e,onChange:l=>t(l.target.value),placeholder:r,"data-drawer-field-input":"1",style:Ys(a)})]})}function sc({label:n,value:e,options:t,labels:r,onChange:i,c:a}){return m.jsxs("label",{style:$s(),children:[m.jsx("span",{style:Gs(a),children:n}),m.jsx("select",{value:e,onChange:l=>i(l.target.value),"data-drawer-field-input":"1",style:{...Ys(a),cursor:"pointer"},children:t.map((l,o)=>m.jsx("option",{value:l,children:r[o]},l||`opt-${o}`))})]})}function cm({label:n,value:e,onChange:t,c:r}){return m.jsxs("label",{style:$s(),children:[m.jsx("span",{style:Gs(r),children:n}),m.jsx("input",{type:"date",value:e,onChange:i=>t(i.target.value),"data-drawer-field-input":"1",style:Ys(r)})]})}function um({label:n,value:e,onChange:t,placeholder:r,c:i}){return m.jsxs("label",{style:$s(),children:[m.jsx("span",{style:Gs(i),children:n}),m.jsx("textarea",{value:e,onChange:a=>t(a.target.value),placeholder:r,rows:3,"data-drawer-field-input":"1",style:{...Ys(i),resize:"vertical",minHeight:72}})]})}function $s(){return{display:"flex",flexDirection:"column",gap:5}}function dm(){return{fontSize:"calc(11px * var(--theme-font-scale, 1))",color:"var(--theme-text-subtle, #94a3b8)",fontWeight:700,letterSpacing:"0.08em",textTransform:"uppercase"}}function Gs(n){return{fontSize:"calc(11px * var(--theme-font-scale, 1))",color:n.textMuted,fontWeight:600,letterSpacing:"0.05em",textTransform:"uppercase"}}function Ys(n){return{width:"100%",padding:"8px 12px",fontSize:"calc(13px * var(--theme-font-scale, 1))",color:n.text,background:n.fieldBg,borderWidth:1,borderStyle:"solid",borderColor:n.border,borderRadius:`calc(${Bt.radius(2)}px * var(--theme-radius-scale, 1))`,fontFamily:"inherit",outline:"none",boxSizing:"border-box"}}const th=["Beton","Cărămidă","Lemn","Metal","Instalații","Altele"],nh=["buc","sac","kg","m","m²","m³","l"],rh=[{value:"needed",label:"Necesar"},{value:"ordered",label:"Comandat"},{value:"delivered",label:"Livrat"},{value:"installed",label:"Instalat"},{value:"returned",label:"Returnat"}];function hm(n){return{name:n.name,category:n.category??"",qty:String(n.qty),unit:n.unit,supplier:n.supplier??"",status:n.status,eta:n.eta??"",unit_price:n.unit_price!=null?String(n.unit_price):"",notes:n.notes??""}}function fm({open:n,material:e,onClose:t,onSave:r,isSaving:i}){const{t:a}=Kt(),{resolvedTheme:l}=Gt(),o=Yt[l],u=fh(),d=!!u.sm,h=!!u.md&&!u.sm,[b,x]=be.useState({name:"",category:"",qty:"",unit:"buc",supplier:"",status:"needed",eta:"",unit_price:"",notes:""});be.useEffect(()=>{e&&x(hm(e))},[e]);function p(y,V){x(q=>({...q,[y]:V}))}function L(){if(!e||!b.name.trim()||!b.qty)return;const y={};b.name.trim()!==e.name&&(y.name=b.name.trim()),b.category!==(e.category??"")&&(y.category=b.category||void 0),Number(b.qty)!==e.qty&&(y.qty=Number(b.qty)),b.unit!==e.unit&&(y.unit=b.unit),b.supplier!==(e.supplier??"")&&(y.supplier=b.supplier||void 0),b.status!==e.status&&(y.status=b.status),b.eta!==(e.eta??"")&&(y.eta=b.eta||void 0);const V=b.unit_price?Number(b.unit_price):void 0;V!==(e.unit_price??void 0)&&(y.unit_price=V),b.notes!==(e.notes??"")&&(y.notes=b.notes||void 0),r(e.id,y)}const k=b.name.trim().length>0&&Number(b.qty)>0,C=[{label:i?a("saving","Se salvează…"):a("save","Salvează"),onClick:L,variant:"primary",disabled:!k||i},{label:a("close","Închide"),onClick:t,variant:"ghost"}];return m.jsx(Us,{open:n,onOpenChange:y=>{y||t()},title:a("projects_editeaza_material",{defaultValue:"Editează material"}),titleEyebrow:e?.name??a("projects_depozit_proiect",{defaultValue:"Depozit proiect"}),titleEyebrowAccent:!0,width:d?"100%":480,fluidTokens:Bt,tabs:[],activeTab:"",onTabChange:()=>{},slots:{headerLeft:m.jsx(bh,{icon:m.jsx(ph,{size:18}),color:o.accent}),footer:m.jsx(vh,{actions:C})},children:m.jsx(mh,{a73Tokens:Bt,c:o,isMobile:d,isTablet:h,children:m.jsxs(wi,{gap:Bt.space(4),children:[m.jsxs(oc,{title:a("projects_identificare",{defaultValue:"Identificare"}),children:[m.jsx(ih,{label:a("projects_nume_material",{defaultValue:"Nume material"}),required:!0,value:b.name,onChange:y=>p("name",y),c:o}),m.jsx(lc,{label:a("category",{defaultValue:"Categorie"}),value:b.category,options:["",...th],labels:[a("select_placeholder",{defaultValue:"— selectează —"}),...th],onChange:y=>p("category",y),c:o})]}),m.jsxs(oc,{title:a("projects_cantitate",{defaultValue:"Cantitate"}),children:[m.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1.6fr 1fr",gap:Bt.space(2)},children:[m.jsx(ah,{label:a("projects_cantitate",{defaultValue:"Cantitate"}),required:!0,value:b.qty,onChange:y=>p("qty",y),c:o}),m.jsx(lc,{label:a("unit",{defaultValue:"Unitate"}),value:b.unit,options:nh,labels:nh,onChange:y=>p("unit",y),c:o})]}),m.jsx(ah,{label:a("projects_pret_unitar",{defaultValue:"Preț unitar"}),value:b.unit_price,onChange:y=>p("unit_price",y),c:o})]}),m.jsxs(oc,{title:a("projects_aprovizionare",{defaultValue:"Aprovizionare"}),children:[m.jsx(ih,{label:a("projects_furnizor",{defaultValue:"Furnizor"}
94),value:b.supplier,onChange:y=>p("supplier",y),c:o}),m.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:Bt.space(2)},children:[m.jsx(lc,{label:a("status",{defaultValue:"Status"}),value:b.status,options:rh.map(y=>y.value),labels:rh.map(y=>y.label),onChange:y=>p("status",y),c:o}),m.jsx(pm,{label:a("projects_eta_estimare_livrare",{defaultValue:"ETA (estimare livrare)"}),value:b.eta,onChange:y=>p("eta",y),c:o})]}),m.jsx(gm,{label:a("notes",{defaultValue:"Note"}),value:b.notes,onChange:y=>p("notes",y),c:o})]})]})})})}function oc({title:n,children:e}){return m.jsxs(wi,{gap:Bt.space(2),children:[m.jsx("span",{style:mm(),children:n}),e]})}function ih({label:n,value:e,onChange:t,placeholder:r,required:i,c:a}){return m.jsxs("label",{style:Ks(),children:[m.jsxs("span",{style:Xs(a),children:[n,i?" *":""]}),m.jsx("input",{type:"text",value:e,onChange:l=>t(l.target.value),placeholder:r,"data-drawer-field-input":"1",style:Zs(a)})]})}function ah({label:n,value:e,onChange:t,placeholder:r,required:i,c:a}){return m.jsxs("label",{style:Ks(),children:[m.jsxs("span",{style:Xs(a),children:[n,i?" *":""]}),m.jsx("input",{type:"number",min:0,step:"any",value:e,onChange:l=>t(l.target.value),placeholder:r,"data-drawer-field-input":"1",style:Zs(a)})]})}function lc({label:n,value:e,options:t,labels:r,onChange:i,c:a}){return m.jsxs("label",{style:Ks(),children:[m.jsx("span",{style:Xs(a),children:n}),m.jsx("select",{value:e,onChange:l=>i(l.target.value),"data-drawer-field-input":"1",style:{...Zs(a),cursor:"pointer"},children:t.map((l,o)=>m.jsx("option",{value:l,children:r[o]},l||`opt-${o}`))})]})}function pm({label:n,value:e,onChange:t,c:r}){return m.jsxs("label",{style:Ks(),children:[m.jsx("span",{style:Xs(r),children:n}),m.jsx("input",{type:"date",value:e,onChange:i=>t(i.target.value),"data-drawer-field-input":"1",style:Zs(r)})]})}function gm({label:n,value:e,onChange:t,placeholder:r,c:i}){return m.jsxs("label",{style:Ks(),children:[m.jsx("span",{style:Xs(i),children:n}),m.jsx("textarea",{value:e,onChange:a=>t(a.target.value),placeholder:r,rows:3,"data-drawer-field-input":"1",style:{...Zs(i),resize:"vertical",minHeight:72}})]})}function Ks(){return{display:"flex",flexDirection:"column",gap:5}}function mm(){return{fontSize:"calc(11px * var(--theme-font-scale, 1))",color:"var(--theme-text-subtle, #94a3b8)",fontWeight:700,letterSpacing:"0.08em",textTransform:"uppercase"}}function Xs(n){return{fontSize:"calc(11px * var(--theme-font-scale, 1))",color:n.textMuted,fontWeight:600,letterSpacing:"0.05em",textTransform:"uppercase"}}function Zs(n){return{width:"100%",padding:"8px 12px",fontSize:"calc(13px * var(--theme-font-scale, 1))",color:n.text,background:n.fieldBg,borderWidth:1,borderStyle:"solid",borderColor:n.border,borderRadius:`calc(${Bt.radius(2)}px * var(--theme-radius-scale, 1))`,fontFamily:"inherit",outline:"none",boxSizing:"border-box"}}const vm={needed:"Necesar",ordered:"Comandat",delivered:"Livrat",installed:"Instalat",returned:"Returnat"},bm=[{id:"all",label:"Toate"},{id:"needed",label:"Necesar"},{id:"ordered",label:"Comandat"},{id:"delivered",label:"Livrat"},{id:"installed",label:"Instalat"}];function ym(n){return n?new Date(n).toLocaleDateString("ro-RO",{day:"numeric",month:"short"}):"—"}function xm(n,e){switch(n){case"needed":return{bg:e.subtleBg,color:e.textMuted};case"ordered":return{bg:e.warningBg,color:e.warningText};case"delivered":return{bg:e.warningBg,color:e.warningText};case"installed":return{bg:e.successBg,color:e.successText};case"returned":return{bg:e.dangerBg,color:e.dangerText}}}function wm({projectId:n}){const{resolvedTheme:e}=Gt(),t=Yt[e],{data:r,isLoading:i,isError:a,error:l,refetch:o}=am(n),[u,d]=be.useState("all"),[h,b]=be.useState(!1),[x,p]=be.useState(null),[L,k]=be.useState(null),{t:C}=Kt(),y=L1(),V=sm(n),q=om(n),E=lm(n),K=be.useMemo(()=>r?u==="all"?r:r.filter(G=>G.status===u):[],[r,u]),ae=be.useMemo(()=>{const G={needed:0,ordered:0,delivered:0,installed:0,returned:0};return va(r).forEach(S=>{G[S.status]=(G[S.status]??0)+1}),G},[r]);async function J(G){try{await V.mutateAsync(G),y.success(C("depozit.material_added","Material adăugat")),b(!1)}catch{y.error(C("depozit.add_error","Eroare la adăugare material"))}}async function H(G,S){try{await q.mutateAsync({mid:G,body:S}),y.success(C("depozit.material_updated","Material actualizat")),p(null)}catch{y.error(C("depozit.update_error","Eroare la actualizare material"))}}function D(G){y.confirm(C("depozit.confirm_delete","Ștergi materialul definitiv?"),async()=>{try{await E.mutateAsync(G),y.success(C("depozit.material_deleted","Material șters")),k(null)}catch{y.error(C("depozit.delete_error","Eroare la ștergere"))}})}return i?m.jsx("div",{style:{flex:1,padding:"18px 56px",display:"flex",flexDirection:"column",gap:14},children:m.jsx(j1,{lines:4,height:40,lastWidth:"100%"})}):a?m.jsx("div",{style:{flex:1,padding:"18px 56px",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:12},children:m.jsx("div",{style:{maxWidth:420},children:m.jsxs(Ko,{tone:"error",action:{label:"Reîncearcă",onClick:()=>o()},children:[m.jsx("div",{children:"Nu am putut încărca materialele"}),m.jsx("div",{style:{fontWeight:400},children:l?.message??"Eroare necunoscută"})]})})}):!r||r.length===0?m.jsxs(m.Fragment,{children:[m.jsx("div",{style:{flex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:m.jsx(Vs,{title:"Niciun material înregistrat încă",action:{label:"Adaugă primul material",onClick:()=>b(!0)}})}),m.jsx(Jd,{open:h,onClose:()=>b(!1),onSave:J,isSaving:V.isPending})]}):m.jsxs(m.Fragment,{children:[m.jsxs("div",{style:{flex:1,padding:"18px 56px",overflow:"hidden",display:"flex",flexDirection:"column",gap:14,overflowY:"auto"},children:[m.jsx(_m,{filter:u,onFilterChange:d,counts:ae,total:r.length,onAdd:()=>b(!0),c:t}),m.jsx(Sm,{items:K,onEdit:G=>p(G),onDelete:G=>D(G),deletingId:L,c:t})]}),m.jsx(Jd,{open:h,onClose:()=>b(!1),onSave:J,isSaving:V.isPending}),m.jsx(fm,{open:x!==null,material:x,onClose:()=>p(null),onSave:H,isSaving:q.isPending})]})}function _m({filter:n,onFilterChange:e,counts:t,total:r,onAdd:i,c:a}){return m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,flexShrink:0},children:[bm.map(l=>{const o=n===l.id,u=l.id==="all"?r:t[l.id]??0;return m.jsxs(Ct,{primary:o,"aria-pressed":o,onClick:()=>e(l.id),children:[l.label,m.jsx("span",{style:{fontSize:_t(10.5),padding:"1px 5px",opacity:.8},children:u})]},l.id)}),m.jsx("div",{style:{flex:1}}),m.jsx(Ct,{primary:!0,onClick:i,style:{flexShrink:0},children:"+ Adaugă material"})]})}function Sm({items:n,onEdit:e,onDelete:t,deletingId:r,c:i}){return m.jsxs(ni,{style:{overflow:"hidden"},children:[m.jsxs("div",{style:{display:"grid",gridTemplateColumns:"minmax(0, 2.4fr) 90px 70px minmax(0, 1.2fr) 80px 110px 36px",padding:"10px 16px",background:i.sectionBg,borderBottom:`1px solid ${i.border}`,fontSize:"calc(11px * var(--theme-font-scale, 1))",color:i.textMuted,fontWeight:500,textTransform:"uppercase",letterSpacing:"0.04em",gap:12},children:[m.jsx("div",{children:"Material"}),m.jsx("div",{style:{textAlign:"right"},children:"Cantitate"}),m.jsx("div",{children:"Unitate"}),m.jsx("div",{children:"Furnizor"}),m.jsx("div",{children:"ETA"}),m.jsx("div",{children:"Status"}),m.jsx("div",{})]}),n.map(a=>{const l=xm(a.status,i);return m.jsx(Am,{material:a,tone:l,onEdit:e,onDelete:t,isDeleting:r===a.id,c:i},a.id)})]})}function Am({material:n,tone:e,onEdit:t,onDelete:r,isDeleting:i,c:a}){const{t:l}=Kt(),[o,u]=be.useState(!1);return m.jsxs("div",{onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),onClick:()=>t(n),style:{display:"grid",gridTemplateColumns:"minmax(0, 2.4fr) 90px 70px minmax(0, 1.2fr) 80px 110px 36px",padding:"12px 16px",borderBottom:`1px solid ${a.border}`,fontSize:"calc(12.5px * var(--theme-font-scale, 1))",color:a.text,alignItems:"center",gap:12,cursor:"pointer",background:o?a.subtleBg:"transparent",transition:"background 120ms"},children:[m.jsxs("div",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[n.name,n.notes&&m.jsx("div",{style:{fontSize:"calc(11px * var(--theme-font-scale, 1))",color:a.textSubtle,marginTop:2},children:n.notes})]}),m.jsx("div",{style:{textAlign:"right",fontVariantNumeric:"tabular-nums"}
94,children:Number(n.qty).toLocaleString("ro-RO")}),m.jsx("div",{style:{color:a.textMuted},children:n.unit}),m.jsx("div",{style:{color:a.textMuted,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:n.supplier??"—"}),m.jsx("div",{style:{color:a.textMuted,fontVariantNumeric:"tabular-nums"},children:ym(n.eta)}),m.jsx("div",{children:m.jsx("span",{style:{padding:"3px 8px",borderRadius:"calc(3px * var(--theme-radius-scale, 1))",fontSize:"calc(11px * var(--theme-font-scale, 1))",fontWeight:500,background:e.bg,color:e.color,whiteSpace:"nowrap"},children:vm[n.status]})}),m.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:o&&m.jsx("span",{onClick:d=>d.stopPropagation(),children:m.jsx(Ct,{onClick:()=>r(n.id),disabled:i,title:l("depozit.delete_material_title",{defaultValue:"Șterge material"}),"aria-label":l("depozit.delete_material_title",{defaultValue:"Șterge material"}),style:{width:28,height:28,padding:0,justifyContent:"center"},children:"✕"})})})]})}function km({project:n,open:e,onClose:t,onSave:r}){const{t:i}=Kt(),{resolvedTheme:a}=Gt(),l=Yt[a],[o,u]=be.useState(n.address??""),[d,h]=be.useState(n.city??""),[b,x]=be.useState(n.country??""),[p,L]=be.useState(n.lat!=null?String(n.lat):""),[k,C]=be.useState(n.lng!=null?String(n.lng):""),[y,V]=be.useState(!1);function q(){!o&&!d||(V(!1),L(""),C(""))}function E(){r?.({address:o,city:d,country:b,lat:p?Number(p):void 0,lng:k?Number(k):void 0}),t()}return m.jsx(Us,{open:e,onOpenChange:K=>{K||t()},title:i("projects_editeaza_adresa",{defaultValue:"Editează adresa"}),titleEyebrow:"Adresă șantier",description:n.name,width:520,tabs:[],activeTab:"",onTabChange:()=>{},children:m.jsxs(Ui.Body,{children:[m.jsx(Ui.Section,{title:i("projects_locatie",{defaultValue:"Locație"}),children:m.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:12,padding:"4px 0"},children:[m.jsx(Es,{label:i("projects_strada_numar",{defaultValue:"Stradă & număr"}),value:o,onChange:u,placeholder:"Str. Exemplu nr. 12",c:l}),m.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1.4fr 1fr",gap:10},children:[m.jsx(Es,{label:i("projects_oras",{defaultValue:"Oraș"}),value:d,onChange:h,placeholder:"București",c:l}),m.jsx(Es,{label:i("projects_tara",{defaultValue:"Țară"}),value:b,onChange:x,placeholder:i("projects_tara_placeholder",{defaultValue:"România"}),c:l})]})]})}),m.jsx(Ui.Section,{title:i("projects_coordonate_gps",{defaultValue:"Coordonate GPS"}),children:m.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:12,padding:"4px 0"},children:[m.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:10},children:[m.jsx(Es,{label:"Latitudine",value:p,onChange:L,placeholder:"44.4268",c:l}),m.jsx(Es,{label:"Longitudine",value:k,onChange:C,placeholder:"26.1025",c:l})]}),m.jsx(Ct,{onClick:q,disabled:y||!o&&!d,style:{alignSelf:"flex-start"},children:y?"Se geocodează…":"📍 Harta după adresă (golește coordonatele)"})]})}),m.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:8,paddingTop:16,marginTop:8,borderTopWidth:1,borderTopStyle:"solid",borderTopColor:l.border},children:[m.jsx(Ct,{onClick:t,children:i("cancel",{defaultValue:"Anulează"})}),m.jsx(Ct,{primary:!0,onClick:E,children:i("save",{defaultValue:"Salvează"})})]})]})})}function Es({label:n,value:e,onChange:t,placeholder:r,c:i}){return m.jsxs("label",{style:{display:"flex",flexDirection:"column",gap:4},children:[m.jsx("span",{style:{fontSize:"calc(11px * var(--theme-font-scale, 1))",color:i.textMuted,fontWeight:500,letterSpacing:"0.04em",textTransform:"uppercase"},children:n}),m.jsx("input",{type:"text",value:e,onChange:a=>t(a.target.value),placeholder:r,"data-drawer-field-input":"1",style:{padding:"8px 10px",fontSize:"calc(13px * var(--theme-font-scale, 1))",color:i.text,background:"var(--theme-card-bg)",borderWidth:1,borderStyle:"solid",borderColor:i.border,borderRadius:"calc(3px * var(--theme-radius-scale, 1))",fontFamily:"inherit",outline:"none"}})]})}function Lm({projectId:n}){const{resolvedTheme:e}=Gt(),t=Yt[e],{data:r,isLoading:i,isError:a,error:l,refetch:o}=Eh(n),[u,d]=be.useState(!1),h=rs({query:{data:r,isLoading:i,isError:a,error:a?l:void 0}});return m.jsx(ns,{state:h,errorRetry:o,children:r&&m.jsxs("div",{style:{flex:1,padding:"22px 56px",overflow:"hidden",display:"grid",gridTemplateColumns:"38fr 62fr",ga
94p:24,overflowY:"auto",minHeight:0},children:[m.jsx(jm,{project:r.project,clientName:r.project.client_name,onEdit:()=>d(!0),c:t}),m.jsx(Nm,{project:r.project,c:t}),m.jsx(km,{project:r.project,open:u,onClose:()=>d(!1),onSave:b=>{}})]})})}function jm({project:n,clientName:e,onEdit:t,c:r}){const{t:i}=Kt(),a=[n.address,n.city,n.country].filter(Boolean).join(", ")||"—",l=n.lat!=null&&n.lng!=null;return m.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:18},children:[m.jsxs(cc,{title:i("projects_address_site",{defaultValue:"Adresă șantier"}),action:m.jsx(Ct,{onClick:t,children:i("edit",{defaultValue:"Editează"})}),c:r,children:[m.jsx(qi,{label:i("projects_street",{defaultValue:"Stradă"}),value:n.address||"—",c:r}),m.jsx(qi,{label:i("projects_city",{defaultValue:"Oraș"}),value:n.city||"—",c:r}),m.jsx(qi,{label:i("projects_country",{defaultValue:"Țară"}),value:n.country||"—",c:r}),m.jsx(qi,{label:i("projects_full_address",{defaultValue:"Adresă completă"}),value:a,c:r})]}),m.jsx(cc,{title:i("projects_gps_coords",{defaultValue:"Coordonate GPS"}),c:r,children:l?m.jsxs(m.Fragment,{children:[m.jsx(qi,{label:i("projects_latitude",{defaultValue:"Latitudine"}),value:String(n.lat),mono:!0,c:r}),m.jsx(qi,{label:i("projects_longitude",{defaultValue:"Longitudine"}),value:String(n.lng),mono:!0,c:r})]}):m.jsxs("div",{style:{fontSize:"calc(12.5px * var(--theme-font-scale, 1))",color:r.textSubtle,padding:"6px 0"},children:[i("projects_no_geocode",{defaultValue:"Coordonate negeocodate. Apasă"})," ",m.jsx("em",{children:i("edit",{defaultValue:"Editează"})})," ",i("projects_no_geocode_suffix",{defaultValue:"pentru a le adăuga."})]})}),m.jsxs(cc,{title:i("projects_beneficiary",{defaultValue:"Beneficiar"}),c:r,children:[m.jsx(qi,{label:i("projects_client",{defaultValue:"Client"}),value:e,c:r}),m.jsx(qi,{label:i("projects_beneficiary_address",{defaultValue:"Adresă beneficiar"}),value:"—",c:r}),m.jsx("div",{style:{fontSize:"calc(11px * var(--theme-font-scale, 1))",color:r.textSubtle,marginTop:4},children:i("projects_beneficiary_address_note",{defaultValue:"Adresa beneficiarului se preia din profilul clientului."})})]})]})}function Nm({project:n,c:e}){const{t}=Kt(),r=encodeURIComponent([n.address,n.city,n.country].filter(Boolean).join(", ")||n.name),l=!!!(n.address||n.city)&&n.lat!=null&&n.lng!=null?`https://www.google.com/maps?q=${n.lat},${n.lng}&z=15&output=embed`:`https://www.google.com/maps?q=${r}&z=14&output=embed`;return m.jsxs(ni,{style:{overflow:"hidden",display:"flex",flexDirection:"column",minHeight:420},children:[m.jsx("div",{style:{padding:"10px 14px",borderBottom:`1px solid ${e.border}`,fontSize:"calc(11px * var(--theme-font-scale, 1))",color:e.textMuted,fontWeight:500,textTransform:"uppercase",letterSpacing:"0.04em"},children:t("projects_map_site",{defaultValue:"Hartă șantier"})}),m.jsx("iframe",{title:`${t("projects_map_label",{defaultValue:"Hartă"})} ${n.name}`,src:l,style:{flex:1,border:"none",minHeight:380},loading:"lazy",referrerPolicy:"no-referrer-when-downgrade"})]})}function cc({title:n,action:e,children:t,c:r}){return m.jsxs("div",{children:[m.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",paddingBottom:8,marginBottom:10,borderBottom:`1px solid ${r.border}`},children:[m.jsx("span",{style:{fontSize:"calc(11px * var(--theme-font-scale, 1))",color:r.textMuted,fontWeight:500,letterSpacing:"0.04em",textTransform:"uppercase"},children:n}),e]}),m.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:t})]})}function qi({label:n,value:e,mono:t,c:r}){return m.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"baseline",gap:12},children:[m.jsx("span",{style:{fontSize:"calc(12px * var(--theme-font-scale, 1))",color:r.textMuted},children:n}),m.jsx("span",{style:{fontSize:"calc(13px * var(--theme-font-scale, 1))",color:r.text,fontWeight:500,textAlign:"right",fontVariantNumeric:t?"tabular-nums":void 0},children:e})]})}const Cm={budget_total:32e4,spent_total:217e3,items:[{id:1,name:"Beton C25/30 — 18 m³",category_name:"Materiale structură",amount:3450,currency_symbol:"€",date:"2026-04-24",note:"Livrare directă șantier",billable:!1,invoiced:!1,vendor:"SC Holcim"},{id:2,name:"Plasă sudată Ø8, 240 m²",category_name:"Materiale structură",amount:1180,currency_symbol:"€",date:"2026-04-19",note:"",billable:!1,invoiced:!1,vendor:"Arcelor"},{id:3,name:"Armătură Ø12 — 2.4t",category_name:"Materiale structură",amount:2680,currency_symbol:"€",date:"2026-04-15",note:"",billable:!0,invoiced:!0,vendor:"Arcelor"},{id:4,name:"Diriginte șantier — luna aprilie",category_name:"Servicii",amount:4200,currency_symbol:"€",date:"2026-04-10",note:"Conform contract",billable:!1,invoiced:!1,vendor:"ISC Partner"},{id:5,name:"Cofraje peri up — închiriere 2 săpt.",category_name:"Echipamente",amount:5600,currency_symbol:"€",date:"2026-04-08",note:"",billable:!1,invoiced:!1,vendor:"Peri România"},{id:6,name:"Carburant excavator",category_name:"Echipamente",amount:720,currency_symbol:"€",date:"2026-04-22",note:"",billable:!1,invoiced:!1,vendor:"OMV"},{id:7,name:"Audit DALI structură subsol",category_name:"Servicii",amount:1800,currency_symbol:"€",date:"2026-04-05",note:"Predat 06.04",billable:!1,invoiced:!1,vendor:"TopCons"},{id:8,name:"Materiale instalații electrice — etaj 1",category_name:"Materiale instalații",amount:4900,currency_symbol:"€",date:"2026-04-18",note:"",billable:!1,invoiced:!1,vendor:"Electrofarad"},{id:9,name:"Țeavă PEXAL — 320 m",category_name:"Materiale instalații",amount:1450,currency_symbol:"€",date:"2026-04-20",note:"",billable:!1,invoiced:!1,vendor:"Romstal"},{id:10,name:"Macara turn — închiriere săptămânală",category_name:"Echipamente",amount:3200,currency_symbol:"€",date:"2026-04-21",note:"",billable:!1,invoiced:!1,vendor:"Liebherr Rent"}]},Pf=typeof window<"u"&&new URLSearchParams(window.location.search).get("mock")==="1";async function Pm(n){if(Pf)return await new Promise(r=>setTimeout(r,150)),Cm;const{api:e}=await en(async()=>{const{api:r}=await import("./index-D14oYjMA.js").then(i=>i.c5);return{api:r}},__vite__mapDeps([0,1,2,3,4,5,6]));
94return(await e.get(`/taschi_bridge/bridge_api/projects/${n}/expenses`)).data}function Tm(n){return Er({queryKey:["project_expenses",n,Pf],queryFn:()=>Pm(n),staleTime:3e4,enabled:n>0})}function Em(n){return{"Materiale structură":n.successText,"Materiale instalații":n.infoText,Echipamente:n.warningText,Servicii:n.dangerText,Altele:n.textMuted}}function Ds(n){return n.toLocaleString("ro-RO",{maximumFractionDigits:0})+" €"}function Dm(n){return new Date(n).toLocaleDateString("ro-RO",{day:"numeric",month:"short"})}function Mm({projectId:n,clientId:e}){const{t}=Kt(),{resolvedTheme:r}=Gt(),i=Yt[r],a=Tr(),{data:l,isLoading:o,isError:u,error:d,refetch:h}=Tm(n),[b,x]=be.useState(!1),p=m.jsx(N1,{isOpen:b,onClose:()=>x(!1),initialMode:"create",defaultProjectId:n,defaultClientId:e??void 0});xe.useEffect(()=>{b||a.invalidateQueries({queryKey:["project_expenses",n]})},[b,a,n]);const L=be.useMemo(()=>{if(!l)return[];const E=new Map;for(const K of l.items){const ae=K.category_name||"Altele",J=E.get(ae)??{items:[],total:0};J.items.push(K),J.total+=K.amount,E.set(ae,J)}return Array.from(E.entries()).map(([K,ae])=>({category:K,...ae})).sort((K,ae)=>ae.total-K.total)},[l]),k=l?.budget_total??0,C=l?.spent_total??0,y=k>0?Math.min(100,C/k*100):0,V=C>k,q=Em(i);return o?m.jsx(gh,{}):u?m.jsx("div",{style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"48px 56px",gap:12},children:m.jsx("div",{style:{maxWidth:480,width:"100%"},children:m.jsxs(Ko,{tone:"error",action:{label:t("projects_reincearca",{defaultValue:"Reîncearcă"}),onClick:()=>{h()}},children:["Nu am putut încărca cheltuielile (cod: ",d?.message??"necunoscut",")"]})})}):l&&l.items.length===0?m.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"48px 56px",gap:10},children:[m.jsx(Vs,{title:t("projects_niciun_cost_inregistrat_inca",{defaultValue:"Niciun cost înregistrat încă"}),action:{label:`+ ${t("projects_adauga_cheltuiala",{defaultValue:"Adaugă cheltuială"})}`,onClick:()=>x(!0)}}),p]}):m.jsxs("div",{style:{flex:1,padding:"18px 56px",overflowY:"auto"},children:[m.jsx("div",{style:{display:"flex",justifyContent:"flex-end",marginBottom:12},children:m.jsxs(Ct,{primary:!0,onClick:()=>x(!0),children:["+ ",t("projects_adauga_cheltuiala",{defaultValue:"Adaugă cheltuială"})]})}),m.jsx("section",{style:{marginBottom:24},children:m.jsxs(ni,{style:{padding:"16px 20px"},children:[m.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"baseline",marginBottom:10},children:[m.jsxs("div",{children:[m.jsx("div",{style:{fontSize:"calc(11px * var(--theme-font-scale, 1))",color:i.textMuted,letterSpacing:"0.04em",textTransform:"uppercase"},children:"Buget proiect"}),m.jsxs("div",{style:{fontSize:"calc(22px * var(--theme-font-scale, 1))",color:i.text,marginTop:2},children:[Ds(C)," ",m.jsxs("span",{style:{fontSize:"calc(14px * var(--theme-font-scale, 1))",color:i.textMuted},children:["/ ",Ds(k)]})]})]}),m.jsxs("div",{style:{textAlign:"right"},children:[m.jsxs("div",{style:{fontSize:"calc(12.5px * var(--theme-font-scale, 1))",fontWeight:500,color:V?i.dangerText:y>80?i.warningText:i.successText},children:[y.toFixed(1),"% consumat"]}),m.jsxs("div",{style:{fontSize:"calc(11px * var(--theme-font-scale, 1))",color:i.textSubtle,marginTop:2},children:["Disponibil: ",Ds(Math.max(0,k-C))]})]})]}),m.jsx("div",{style:{height:8,borderRadius:"calc(999px * var(--theme-radius-scale, 1))",background:i.subtleBg,overflow:"hidden",position:"relative"},children:m.jsx("div",{style:{width:`${y}%`,height:"100%",background:V?i.dangerText:y>80?i.warningText:i.successText,transition:"width .4s"}})})]})}),m.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(min(220px, 100%), 1fr))",gap:10,marginBottom:24},children:L.map(E=>{const K=q[E.category]??i.textMuted,ae=C>0?E.total/C*100:0;return m.jsxs(ni,{style:{padding:"12px 14px"},children:[m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,fontSize:"calc(12px * var(--theme-font-scale, 1))",color:i.textMuted,marginBottom:6},children:[m.jsx("span",{style:{width:8,height:8,borderRadius:"calc(2px * var(--theme-radius-scale, 1))",background:K,flexShrink:0}}),E.category]}),m.jsx("div",{style:{fontSize:"calc(18px * var(--theme-font-scale, 1))",color:i.text},children:Ds(E.total)}),m.jsxs("div",{style:{fontSize:"calc(11px * var(--theme-font-scale, 1))",color:i.textSubtle,marginTop:2},children:[E.items.length," înregistrări · ",ae.toFixed(0),"%"]})]},E.category)})}),m.jsxs(ni,{style:{overflow:"hidden"},children:[m.jsxs("div",{style:{display:"grid",gridTemplateColumns:"90px 1fr 180px 130px 90px",padding:"10px 16px",borderBottom:`1px solid ${i.border}`,fontSize:"calc(11px * var(--theme-font-scale, 1))",color:i.textMuted,letterSpacing:"0.04em",textTransform:"uppercase",background:i.sectionBg},children:[m.jsx("div",{children:"Data"}),m.jsx("div",{children:"Descriere"}),m.jsx("div",{children:"Categorie"}),m.jsx("div",{children:"Furnizor"}),m.jsx("div",{style:{textAlign:"right"},children:t("projects_suma",{defaultValue:"Sumă"})})]}),va(l?.items).map((E,K)=>m.jsxs("div",{style:{display:"grid",gridTemplateColumns:"90px 1fr 180px 130px 90px",padding:"11px 16px",borderBottom:K===(l?.items.length??0)-1?"none":`1px solid ${i.border}`,fontSize:"calc(12.5px * var(--theme-font-scale, 1))",color:i.text,alignItems:"center"},children:[m.jsx("div",{style:{color:i.textMuted},children:Dm(E.date)}),m.jsx("div",{children:E.name}),m.jsx("div",{style:{color:i.textMuted},children:E.category_name}),m.jsx("div",{style:{color:i.textMuted},children:E.vendor||"—"}),m.jsx("div",{style:{textAlign:"right",fontWeight:500},children:Ds(E.amount)})]},E.id))]}),p]})}const sh=[{id:1,author_id:10,author_name:"Cornel Marcu",content:"Am primit avizul ISC pentru structura. Putem continua cu cofrarea coloanelor din zona B.",created_at:"2026-04-27T09:14:00Z",parent_id:null,reply_count:2},{id:2,author_id:12,author_name:"Maria Ionescu",content:"Bun venit! @Cornel Marcu — câte zile estimăm pentru cofrare?",created_at:"2026-04-27T09:22:00Z",parent_id:1,reply_count:0},{id:3,author_id:10,author_name:"Cornel Marcu",content:"3 zile dacă echipa e completă. @Radu Gheorghe confirmă disponibilitatea echipei.",created_at:"2026-04-27T09:35:00Z",parent_id:1,reply_count:0},{id:4,author_id:14,author_name:"Radu Gheorghe",content:"Furnizorul de polistiren a confirmat livrarea marți dimineață. Avem stoc suficient pentru izolarea planșeului.",created_at:"2026-04-26T16:45:00Z",parent_id:null,reply_count:1},{id:5,author_id:10,author_name:"Cornel Marcu",content:"Ok, asigurați-vă că materialele sunt depozitate ferit de ploaie.",created_at:"2026-04-26T17:02:00Z",parent_id:4,reply_count:0},{id:6,author_id:15,author_name:"Andrei Popescu",content:"Planul de etaj a fost revizuit — am actualizat cotele ferestrei din dormitor per cererea clientului. Fișier nou încărcat în Planuri.",created_at:"2026-04-25T11:30:00Z",parent_id:null,reply_count:0},{id:7,author_id:12,author_name:"Maria Ionescu",content:"Atenție: inspecția ISU este programată vineri 02.05 la ora 10:00. Asigurați accesul la tabloul electric și extinctoarele din șantier.",created_at:"2026-04-24T14:15:00Z",parent_id:null,reply_count:2},{id:8,author_id:14,author_name:"Radu Gheorghe",content:"Confirmat, tabloul e accesibil. Extinctoarele verificate ieri.",created_at:"2026-04-24T15:10:00Z",parent_id:7,reply_count:0},{id:9,author_id:10,author_name:"Cornel Marcu",content:"Mulțumesc. Voi fi prezent vineri pentru inspecție.",created_at:"2026-04-24T15:45:00Z",parent_id:7,reply_count:0},{id:10,author_id:15,author_name:"Andrei Popescu",content:"Clientul a solicitat adăugarea unui pergol în zona terasei. Am trimis schița preliminară pe email pentru aprobare.",created_at:"2026-04-23T10:00:00Z",parent_id:null,reply_count:0},{id:11,author_id:12,author_name:"Maria Ionescu",content:"Betonul turnat ieri (zona A — fundație) a fost eșantionat. Laborator confirmă rezistența conform proiect.",created_at:"2026-04-22T13:20:00Z",parent_id:null,reply_count:1},{id:12,author_id:10,author_name:"Cornel Marcu",content:"Excelent. Înregistrați buletinul de analiză în dosar.",created_at:"2026-04-22T14:00:00Z",parent_id:11,reply_count:0}],Bs=typeof window<"u"&&new URLSearchParams(window.location.search).get("mock")==="1";async function Im(n){if(Bs)return await new Promise(e=>setTimeout(e,150)),sh;try{const{api:e}=await en(async()=>{const{api:r}=await import("./index-D14oYjMA.js").then(i=>i.c5);return{api:r}},__vite__mapDeps([0,1,2,3,4,5,6]));
94return(await e.get(`/taschi_bridge/bridge_api/projects/${n}/discussions`)).data}catch{return sh}}function Fm(n){return Er({queryKey:["project_discussions",n,Bs],queryFn:()=>Im(n),staleTime:3e4,enabled:n>0})}function Om(n){const e=Tr();return wa({mutationFn:async t=>{if(Bs)return await new Promise(a=>setTimeout(a,200)),{id:Date.now(),author_id:10,author_name:"Tu",content:t.content,created_at:new Date().toISOString(),parent_id:t.parent_id??null,reply_count:0};const{api:r}=await en(async()=>{const{api:a}=await import("./index-D14oYjMA.js").then(l=>l.c5);return{api:a}},__vite__mapDeps([0,1,2,3,4,5,6]));return(await r.post(`/taschi_bridge/bridge_api/projects/${n}/discussions`,t)).data},onMutate:async t=>{const r=["project_discussions",n,Bs];await e.cancelQueries({queryKey:r});const i=e.getQueryData(r),a={id:-Date.now(),author_id:10,author_name:"Tu",content:t.content,created_at:new Date().toISOString(),parent_id:t.parent_id??null,reply_count:0};return e.setQueryData(r,l=>[a,...l??[]]),{previous:i}},onError:(t,r,i)=>{i?.previous!==void 0&&e.setQueryData(["project_discussions",n,Bs],i.previous)},onSettled:()=>{e.invalidateQueries({queryKey:["project_discussions",n]})}})}function oh(n){const e=new Date(n),r=new Date().getTime()-e.getTime(),i=Math.floor(r/6e4);if(i<1)return or.t("projects_time_now",{defaultValue:"acum"});if(i<60)return`${or.t("projects_time_now",{defaultValue:"acum"})} ${i} min`;const a=Math.floor(i/60);return a<24?`${or.t("projects_time_now",{defaultValue:"acum"})} ${a}h`:e.toLocaleDateString("ro-RO",{day:"numeric",month:"short",hour:"2-digit",minute:"2-digit"})}function Bm(n){return n.split(" ").map(e=>e[0]).join("").slice(0,2).toUpperCase()}function lh({name:n,authorId:e,c:t}){const r=[t.successBg,t.warningBg,t.warningBg,t.subtleBg,t.subtleBg],i=[t.successText,t.warningText,t.warningText,t.textMuted,t.textMuted],a=e%r.length;return m.jsx("div",{style:{width:32,height:32,borderRadius:"50%",background:r[a],color:i[a],display:"flex",alignItems:"center",justifyContent:"center",fontSize:"calc(11px * var(--theme-font-scale, 1))",fontWeight:700,flexShrink:0},children:Bm(n)})}function ch(n,e){return n.split(/(@[A-ZÀ-Ž][a-zà-ž]+ [A-ZÀ-Ž][a-zà-ž]+)/g).map((r,i)=>r.startsWith("@")?m.jsx("span",{style:{color:e.successText,fontWeight:500},children:r},i):r)}function Rm({msg:n,replies:e,onReply:t,replyingTo:r,c:i}){const{t:a}=Kt(),l=r===n.id;return m.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:0,borderBottom:`1px solid ${i.border}`,paddingBottom:14,marginBottom:4},children:[m.jsxs("div",{style:{display:"flex",gap:12,alignItems:"flex-start"},children:[m.jsx(lh,{name:n.author_name,authorId:n.author_id,c:i}),m.jsxs("div",{style:{flex:1,minWidth:0},children:[m.jsxs("div",{style:{display:"flex",alignItems:"baseline",gap:8,marginBottom:4},children:[m.jsx("span",{style:{fontSize:"calc(12.5px * var(--theme-font-scale, 1))",fontWeight:600,color:i.text},children:n.author_name}),m.jsx("span",{style:{fontSize:"calc(11px * var(--theme-font-scale, 1))",color:i.textSubtle},children:oh(n.created_at)})]}),m.jsx("div",{style:{fontSize:"calc(13px * var(--theme-font-scale, 1))",color:i.text,lineHeight:1.55},children:ch(n.content,i)}),m.jsx("div",{style:{marginTop:6},children:m.jsx(Ct,{onClick:()=>t(l?-1:n.id),"aria-pressed":l,children:e.length>0?`↩ ${e.length} ${e.length===1?a("projects_reply_singular",{defaultValue:"răspuns"}):a("projects_reply_plural",{defaultValue:"răspunsuri"})}`:`↩ ${a("projects_reply_action",{defaultValue:"Răspunde"})}`})})]})]}),e.length>0&&m.jsx("div",{style:{marginLeft:44,marginTop:10,display:"flex",flexDirection:"column",gap:10},children:e.map(o=>m.jsxs("div",{style:{display:"flex",gap:10,alignItems:"flex-start"},children:[m.jsx(lh,{name:o.author_name,authorId:o.author_id,c:i}),m.jsxs("div",{style:{flex:1},children:[m.jsxs("div",{style:{display:"flex",alignItems:"baseline",gap:8,marginBottom:3},children:[m.jsx("span",{style:{fontSize:"calc(12px * var(--theme-font-scale, 1))",fontWeight:600,color:i.text},children:o.author_name}),m.jsx("span",{style:{fontSize:"calc(10.5px * var(--theme-font-scale, 1))",color:i.textSubtle},children:oh(o.created_at)})]}),m.jsx("div",{style:{fontSize:"calc(12.5px * var(--theme-font-scale, 1))",color:i.text,lineHeight:1.5},children:ch(o.content,i)})]})]},o.id))})]})}function zm({projectId:n}){const{t:e}=Kt(),{resolvedTheme:t}=Gt(),r=Yt[t],{data:i,isLoading:a,isError:l,error:o,refetch:u}=Fm(n),d=Om(n),[h,b]=be.useState(""),[x,p]=be.useState(null),L=be.useRef(null),k=rs({query:{data:i,isLoading:a,isError:l,error:l?o:void 0}}),{roots:C,repliesMap:y}=be.useMemo(()=>{const ae=i??[],J=ae.filter(D=>!D.parent_id).sort((D,G)=>new Date(G.created_at).getTime()-new Date(D.created_at).getTime()),H={};return ae.filter(D=>
94D.parent_id).forEach(D=>{const G=D.parent_id;H[G]||(H[G]=[]),H[G].push(D)}),{roots:J,repliesMap:H}},[i]),V=ae=>{p(ae===x?null:ae),setTimeout(()=>L.current?.focus(),50)},q=()=>{const ae=h.trim();ae&&(d.mutate({content:ae,parent_id:x??null}),b(""),p(null))},E=ae=>{ae.key==="Enter"&&(ae.ctrlKey||ae.metaKey)&&(ae.preventDefault(),q())},K={title:e("projects_no_discussions",{defaultValue:"Nicio discuție încă"}),description:e("projects_no_discussions_desc",{defaultValue:"Inițiază primul mesaj pentru echipa acestui proiect."})};return m.jsx(ns,{state:k,errorRetry:u,emptyConfig:K,children:m.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden",minHeight:0},children:[m.jsx("div",{style:{flex:1,overflowY:"auto",padding:"18px 56px 12px",display:"flex",flexDirection:"column",gap:4},children:C.map(ae=>m.jsx(Rm,{msg:ae,replies:y[ae.id]??[],onReply:V,replyingTo:x,c:r},ae.id))}),m.jsxs("div",{style:{borderTopWidth:1,borderTopStyle:"solid",borderTopColor:r.border,padding:"14px 56px 18px",background:"var(--theme-content-bg)",flexShrink:0},children:[x!==null&&m.jsxs("div",{style:{fontSize:"calc(11.5px * var(--theme-font-scale, 1))",color:r.successText,marginBottom:8,display:"flex",alignItems:"center",gap:8},children:[m.jsxs("span",{children:["↩ ",e("projects_replying_to",{defaultValue:"Răspuns la mesajul"})," #",x]}),m.jsxs(Ct,{onClick:()=>p(null),children:["✕ ",e("cancel",{defaultValue:"Anulează"})]})]}),m.jsxs("div",{style:{display:"flex",gap:10,alignItems:"flex-end"},children:[m.jsx("textarea",{ref:L,value:h,onChange:ae=>b(ae.target.value),onKeyDown:E,placeholder:x?e("projects_write_reply",{defaultValue:"Scrie un răspuns..."}):e("projects_write_message",{defaultValue:"Scrie un mesaj pentru echipă... (Ctrl+Enter trimite)"}),rows:3,style:{flex:1,padding:"10px 12px",borderWidth:1,borderStyle:"solid",borderColor:r.border,borderRadius:"calc(4px * var(--theme-radius-scale, 1))",background:"var(--theme-card-bg)",color:r.text,fontSize:"calc(13px * var(--theme-font-scale, 1))",resize:"none",outline:"none",lineHeight:1.5}}),m.jsx(Ct,{primary:!0,onClick:q,disabled:!h.trim()||d.isPending,style:{flexShrink:0},children:d.isPending?"...":e("send",{defaultValue:"Trimite"})})]})]})]})})}const qm=["sarcini","depozit","address","documente","planuri","photo-log","timp","pontaj","activitate","cheltuieli","discutii"];function Um(n){return qm.includes(n)}function lb(){const{id:n,tab:e}=m1(),t=hh(),r=Number(n),{resolvedTheme:i}=Gt(),a=Yt[i],[l,o]=be.useState(!1),[u,d]=be.useState(!1);be.useEffect(()=>{(!e||!Um(e))&&t(`/admin/projects/${n}/sarcini${window.location.search}`,{replace:!0})},[n,e,t]);const{data:h,isLoading:b,isError:x,error:p,refetch:L}=C1(r),k=rs({query:{data:h,isLoading:b,isError:x,error:x?p:void 0}});return m.jsx(wi,{flex:1,minHeight:0,backgroundColor:"var(--theme-content-bg)",style:{color:a.text},children:m.jsx(ns,{state:k,errorRetry:L,children:h&&m.jsxs(m.Fragment,{children:[m.jsx(O1,{kpis:h.kpis}),m.jsx(U1,{projectId:r,activeTab:e??"sarcini",onOpenSettings:()=>d(!0),onOpenInvoice:()=>o(!0)}),m.jsxs(wi,{flex:1,minHeight:0,style:{overflowY:"auto"},children:[e==="sarcini"&&m.jsx(t2,{projectId:r,data:h}),e==="depozit"&&m.jsx(wm,{projectId:r}),e==="address"&&m.jsx(Lm,{projectId:r}),(e==="documente"||e==="planuri"||e==="photo-log")&&m.jsx(vg,{projectId:r,initialSegment:e==="photo-log"?"foto":"documente"}),(e==="timp"||e==="pontaj"||e==="activitate")&&m.jsx(Fg,{projectId:r,initialSegment:e==="activitate"?"activitate":"pontaj"}),e==="cheltuieli"&&m.jsx(Mm,{projectId:r,clientId:h.project?.clientid}),e==="discutii"&&m.jsx(zm,{projectId:r})]}),m.jsx(z1,{open:l,onClose:()=>o(!1),projectId:r}),m.jsx(b1,{open:u,onOpenChange:C=>d(C),projectId:r,onSaved:()=>L()})]})})})}export{lb 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.