corisco 1.3.1-hml → 1.3.2-hml

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,21 +1,21 @@
1
- (function(Qt,Xt){typeof exports=="object"&&typeof module<"u"?module.exports=Xt():typeof define=="function"&&define.amd?define(Xt):(Qt=typeof globalThis<"u"?globalThis:Qt||self,Qt.Corisco=Xt())})(this,function(){"use strict";var Zw=Qt=>{throw TypeError(Qt)};var Hy=(Qt,Xt,gt)=>Xt.has(Qt)||Zw("Cannot "+gt);var me=(Qt,Xt,gt)=>(Hy(Qt,Xt,"read from private field"),gt?gt.call(Qt):Xt.get(Qt)),Wi=(Qt,Xt,gt)=>Xt.has(Qt)?Zw("Cannot add the same private member more than once"):Xt instanceof WeakSet?Xt.add(Qt):Xt.set(Qt,gt),Nn=(Qt,Xt,gt,Kt)=>(Hy(Qt,Xt,"write to private field"),Kt?Kt.call(Qt,gt):Xt.set(Qt,gt),gt),Qi=(Qt,Xt,gt)=>(Hy(Qt,Xt,"access private method"),gt);var Jw=(Qt,Xt,gt,Kt)=>({set _(Ki){Nn(Qt,Xt,Ki,gt)},get _(){return me(Qt,Xt,Kt)}});var zs,pi,ns,xa,Nu,Ra,Da,fn,Mh,t1,e1,zc,Or,Oh;var Qt=typeof document<"u"?document.currentScript:null;const Xt={app:{name:"Corisco ChatJT",version:"1.3.0",iframe_url:"https://poc-ia.jt.jus.br/chat/"},env:"hml",ui:{panel:{min_width:420,max_width_ratio:.9}},max_pdf_size:10,action_map:[{tool:"pje",allowed_hosts:["https://*^[git|sso]pje*.jus.br/*"],actions:[{name:"Anexar selecionados",description:"Anexa os processos selecionados da timeline do PJe",job:"pje-docs-selecionados",loading_message:"Anexando documentos selecionados...",icon_menu:"SQUARE_MOUSE_POINTER",message:"EXTRACT_SELECTED_DOCUMENTS",auto_capture:!1,priority:1},{name:"Processo completo",description:"Extrai o processo completo do PJe",job:"pje-processo-completo",loading_message:"Capturando processo completo...",icon_menu:"BOOK_UP",message:"EXTRACT_FULL_PROCESS",auto_capture:!1,priority:2},{name:"Capturar documento visualizado",description:"Faz a captura automática do documento visualizado no PJe",job:"pje-doc-visualizado",loading_message:null,icon_menu:null,message:"EXTRACT_VISIBLE_DOCUMENT",auto_capture:!0,priority:1}],mapping:{"/pjekz/processo/{{d+}}/detalhe":["pje-processo-completo","pje-docs-selecionados","pje-doc-visualizado"],"/pjekz/processo/{{+d}}/detalhe/peticao/{{+d}}":["pje-processo-completo","pje-docs-selecionados","pje-doc-visualizado"],"/pjekz/processo/{{d+}}/documento/{{d+}}/conteudo":["pje-doc-visualizado"],"/pjekz/processo/{{d+}}/tarefa/{{d+}}/minutar":["pje-processo-completo"]}},{tool:"pje",allowed_hosts:["http://localhost:*/*"],actions:[{name:"Anexar selecionados",description:"Anexa os processos selecionados da timeline do PJe",job:"pje-docs-selecionados",loading_message:"Anexando documentos selecionados...",icon_menu:"SQUARE_MOUSE_POINTER",message:"EXTRACT_SELECTED_DOCUMENTS",auto_capture:!1,priority:1},{name:"Processo completo",description:"Extrai o processo completo do PJe",job:"pje-processo-completo",loading_message:"Capturando processo completo...",icon_menu:"BOOK_UP",message:"EXTRACT_FULL_PROCESS",auto_capture:!1,priority:2},{name:"Capturar documento visualizado",description:"Faz a captura automática do documento visualizado no PJe",job:"pje-doc-visualizado",loading_message:null,icon_menu:null,message:"EXTRACT_VISIBLE_DOCUMENT",auto_capture:!0,priority:1}],mapping:{"/processo/{{d+}}/detalhe":["pje-processo-completo","pje-docs-selecionados","pje-doc-visualizado"],"/processo/{{+d}}/detalhe/peticao/{{+d}}":["pje-processo-completo","pje-docs-selecionados","pje-doc-visualizado"],"/processo/{{d+}}/documento/{{d+}}/conteudo":["pje-doc-visualizado"],"/processo/{{d+}}/tarefa/{{d+}}/minutar":["pje-processo-completo"]}}]},gt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Kt=globalThis,Ki="10.8.0";function Hc(){return Bc(Kt),Kt}function Bc(l){const t=l.__SENTRY__=l.__SENTRY__||{};return t.version=t.version||Ki,t[Ki]=t[Ki]||{}}function Po(l,t,i=Kt){const a=i.__SENTRY__=i.__SENTRY__||{},r=a[Ki]=a[Ki]||{};return r[l]||(r[l]=t())}const n1=["debug","info","warn","error","log","assert","trace"],i1="Sentry Logger ",Fc={};function pr(l){if(!("console"in Kt))return l();const t=Kt.console,i={},a=Object.keys(Fc);a.forEach(r=>{const c=Fc[r];i[r]=t[r],t[r]=c});try{return l()}finally{a.forEach(r=>{t[r]=i[r]})}}function s1(){Nh().enabled=!0}function a1(){Nh().enabled=!1}function By(){return Nh().enabled}function r1(...l){kh("log",...l)}function o1(...l){kh("warn",...l)}function l1(...l){kh("error",...l)}function kh(l,...t){gt&&By()&&pr(()=>{Kt.console[l](`${i1}[${l}]:`,...t)})}function Nh(){return gt?Po("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const Tt={enable:s1,disable:a1,isEnabled:By,log:r1,warn:o1,error:l1},Fy=50,ba="?",jy=/\(error: (.*)\)/,$y=/captureMessage|captureException/;function Gy(...l){const t=l.sort((i,a)=>i[0]-a[0]).map(i=>i[1]);return(i,a=0,r=0)=>{const c=[],u=i.split(`
2
- `);for(let h=a;h<u.length;h++){let p=u[h];p.length>1024&&(p=p.slice(0,1024));const m=jy.test(p)?p.replace(jy,"$1"):p;if(!m.match(/\S*Error: /)){for(const g of t){const y=g(m);if(y){c.push(y);break}}if(c.length>=Fy+r)break}}return u1(c.slice(r))}}function c1(l){return Array.isArray(l)?Gy(...l):l}function u1(l){if(!l.length)return[];const t=Array.from(l);return/sentryWrapped/.test(jc(t).function||"")&&t.pop(),t.reverse(),$y.test(jc(t).function||"")&&(t.pop(),$y.test(jc(t).function||"")&&t.pop()),t.slice(0,Fy).map(i=>({...i,filename:i.filename||jc(t).filename,function:i.function||ba}))}function jc(l){return l[l.length-1]||{}}const Lh="<anonymous>";function Ms(l){try{return!l||typeof l!="function"?Lh:l.name||Lh}catch{return Lh}}function Vy(l){const t=l.exception;if(t){const i=[];try{return t.values.forEach(a=>{a.stacktrace.frames&&i.push(...a.stacktrace.frames)}),i}catch{return}}}const $c={},qy={};function Gc(l,t){$c[l]=$c[l]||[],$c[l].push(t)}function Vc(l,t){if(!qy[l]){qy[l]=!0;try{t()}catch(i){gt&&Tt.error(`Error while instrumenting ${l}`,i)}}}function mr(l,t){const i=l&&$c[l];if(i)for(const a of i)try{a(t)}catch(r){gt&&Tt.error(`Error while triggering instrumentation handler.
1
+ (function(Qt,Yt){typeof exports=="object"&&typeof module<"u"?module.exports=Yt():typeof define=="function"&&define.amd?define(Yt):(Qt=typeof globalThis<"u"?globalThis:Qt||self,Qt.Corisco=Yt())})(this,function(){"use strict";var Kw=Qt=>{throw TypeError(Qt)};var zy=(Qt,Yt,gt)=>Yt.has(Qt)||Kw("Cannot "+gt);var ge=(Qt,Yt,gt)=>(zy(Qt,Yt,"read from private field"),gt?gt.call(Qt):Yt.get(Qt)),Wi=(Qt,Yt,gt)=>Yt.has(Qt)?Kw("Cannot add the same private member more than once"):Yt instanceof WeakSet?Yt.add(Qt):Yt.set(Qt,gt),Nn=(Qt,Yt,gt,Kt)=>(zy(Qt,Yt,"write to private field"),Kt?Kt.call(Qt,gt):Yt.set(Qt,gt),gt),Qi=(Qt,Yt,gt)=>(zy(Qt,Yt,"access private method"),gt);var Zw=(Qt,Yt,gt,Kt)=>({set _(Ki){Nn(Qt,Yt,Ki,gt)},get _(){return ge(Qt,Yt,Kt)}});var zs,pi,ns,Ca,Lu,Ra,Da,fn,Oh,Jw,t1,zc,Or,kh;var Qt=typeof document<"u"?document.currentScript:null;const Yt={app:{name:"Corisco ChatJT",version:"1.3.0",iframe_url:"https://poc-ia.jt.jus.br/chat/"},env:"hml",ui:{panel:{min_width:420,max_width_ratio:.9}},max_pdf_size:10,action_map:[{tool:"pje",allowed_hosts:["/^.*pje.*\\.jus\\.br\\/pjekz\\/.*$/","/^localhost:.*?\\/.*$/"],actions:[{name:"Anexar selecionados",description:"Anexa os processos selecionados da timeline do PJe",job:"pje-docs-selecionados",loading_message:"Anexando documentos selecionados...",icon_menu:"SQUARE_MOUSE_POINTER",message:"EXTRACT_SELECTED_DOCUMENTS",auto_capture:!1},{name:"Processo completo",description:"Extrai o processo completo do PJe",job:"pje-processo-completo",loading_message:"Capturando processo completo...",icon_menu:"BOOK_UP",message:"EXTRACT_FULL_PROCESS",auto_capture:!1},{name:"Capturar documento visualizado",description:"Faz a captura automática do documento visualizado no PJe",job:"pje-doc-visualizado",loading_message:null,icon_menu:null,message:"EXTRACT_VISIBLE_DOCUMENT",auto_capture:!0},{name:"Capturar metadados da página",description:"Faz a captura automática dos metadados da página no PJe",job:"pje-metadados",loading_message:null,icon_menu:null,message:"EXTRACT_METADATA",auto_capture:!0}],mapping:{"/processo/\\d+/detalhe":["pje-processo-completo","pje-docs-selecionados","pje-doc-visualizado","pje-metadados"],"/processo/\\d+/detalhe/peticao/\\d+":["pje-processo-completo","pje-docs-selecionados","pje-doc-visualizado","pje-metadados"],"/processo/\\d+/documento/\\d+/conteudo":["pje-doc-visualizado","pje-metadados"],"/processo/\\d+/tarefa/\\d+/minutar":["pje-processo-completo","pje-metadados"],"/painel/global/\\d+/lista-processos":["pje-metadados"]}}]},gt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Kt=globalThis,Ki="10.8.0";function Hc(){return Bc(Kt),Kt}function Bc(l){const t=l.__SENTRY__=l.__SENTRY__||{};return t.version=t.version||Ki,t[Ki]=t[Ki]||{}}function Po(l,t,i=Kt){const a=i.__SENTRY__=i.__SENTRY__||{},r=a[Ki]=a[Ki]||{};return r[l]||(r[l]=t())}const e1=["debug","info","warn","error","log","assert","trace"],n1="Sentry Logger ",Fc={};function pr(l){if(!("console"in Kt))return l();const t=Kt.console,i={},a=Object.keys(Fc);a.forEach(r=>{const c=Fc[r];i[r]=t[r],t[r]=c});try{return l()}finally{a.forEach(r=>{t[r]=i[r]})}}function i1(){Lh().enabled=!0}function s1(){Lh().enabled=!1}function Hy(){return Lh().enabled}function a1(...l){Nh("log",...l)}function r1(...l){Nh("warn",...l)}function o1(...l){Nh("error",...l)}function Nh(l,...t){gt&&Hy()&&pr(()=>{Kt.console[l](`${n1}[${l}]:`,...t)})}function Lh(){return gt?Po("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const Tt={enable:i1,disable:s1,isEnabled:Hy,log:a1,warn:r1,error:o1},By=50,ba="?",Fy=/\(error: (.*)\)/,jy=/captureMessage|captureException/;function $y(...l){const t=l.sort((i,a)=>i[0]-a[0]).map(i=>i[1]);return(i,a=0,r=0)=>{const c=[],u=i.split(`
2
+ `);for(let h=a;h<u.length;h++){let p=u[h];p.length>1024&&(p=p.slice(0,1024));const m=Fy.test(p)?p.replace(Fy,"$1"):p;if(!m.match(/\S*Error: /)){for(const g of t){const y=g(m);if(y){c.push(y);break}}if(c.length>=By+r)break}}return c1(c.slice(r))}}function l1(l){return Array.isArray(l)?$y(...l):l}function c1(l){if(!l.length)return[];const t=Array.from(l);return/sentryWrapped/.test(jc(t).function||"")&&t.pop(),t.reverse(),jy.test(jc(t).function||"")&&(t.pop(),jy.test(jc(t).function||"")&&t.pop()),t.slice(0,By).map(i=>({...i,filename:i.filename||jc(t).filename,function:i.function||ba}))}function jc(l){return l[l.length-1]||{}}const Ih="<anonymous>";function Ms(l){try{return!l||typeof l!="function"?Ih:l.name||Ih}catch{return Ih}}function Gy(l){const t=l.exception;if(t){const i=[];try{return t.values.forEach(a=>{a.stacktrace.frames&&i.push(...a.stacktrace.frames)}),i}catch{return}}}const $c={},Vy={};function Gc(l,t){$c[l]=$c[l]||[],$c[l].push(t)}function Vc(l,t){if(!Vy[l]){Vy[l]=!0;try{t()}catch(i){gt&&Tt.error(`Error while instrumenting ${l}`,i)}}}function mr(l,t){const i=l&&$c[l];if(i)for(const a of i)try{a(t)}catch(r){gt&&Tt.error(`Error while triggering instrumentation handler.
3
3
  Type: ${l}
4
4
  Name: ${Ms(a)}
5
- Error:`,r)}}let Ih=null;function d1(l){const t="error";Gc(t,l),Vc(t,h1)}function h1(){Ih=Kt.onerror,Kt.onerror=function(l,t,i,a,r){return mr("error",{column:a,error:r,line:i,msg:l,url:t}),Ih?Ih.apply(this,arguments):!1},Kt.onerror.__SENTRY_INSTRUMENTED__=!0}let Ph=null;function f1(l){const t="unhandledrejection";Gc(t,l),Vc(t,p1)}function p1(){Ph=Kt.onunhandledrejection,Kt.onunhandledrejection=function(l){return mr("unhandledrejection",l),Ph?Ph.apply(this,arguments):!0},Kt.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const Yy=Object.prototype.toString;function Uh(l){switch(Yy.call(l)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Os(l,Error)}}function gr(l,t){return Yy.call(l)===`[object ${t}]`}function Xy(l){return gr(l,"ErrorEvent")}function Wy(l){return gr(l,"DOMError")}function m1(l){return gr(l,"DOMException")}function Uo(l){return gr(l,"String")}function zh(l){return typeof l=="object"&&l!==null&&"__sentry_template_string__"in l&&"__sentry_template_values__"in l}function Hh(l){return l===null||zh(l)||typeof l!="object"&&typeof l!="function"}function zo(l){return gr(l,"Object")}function qc(l){return typeof Event<"u"&&Os(l,Event)}function g1(l){return typeof Element<"u"&&Os(l,Element)}function y1(l){return gr(l,"RegExp")}function Yc(l){return!!(l?.then&&typeof l.then=="function")}function b1(l){return zo(l)&&"nativeEvent"in l&&"preventDefault"in l&&"stopPropagation"in l}function Os(l,t){try{return l instanceof t}catch{return!1}}function Qy(l){return!!(typeof l=="object"&&l!==null&&(l.__isVue||l._isVue))}function v1(l){return typeof Request<"u"&&Os(l,Request)}const Bh=Kt,S1=80;function Ky(l,t={}){if(!l)return"<unknown>";try{let i=l;const a=5,r=[];let c=0,u=0;const h=" > ",p=h.length;let m;const g=Array.isArray(t)?t:t.keyAttrs,y=!Array.isArray(t)&&t.maxStringLength||S1;for(;i&&c++<a&&(m=E1(i,g),!(m==="html"||c>1&&u+r.length*p+m.length>=y));)r.push(m),u+=m.length,i=i.parentNode;return r.reverse().join(h)}catch{return"<unknown>"}}function E1(l,t){const i=l,a=[];if(!i?.tagName)return"";if(Bh.HTMLElement&&i instanceof HTMLElement&&i.dataset){if(i.dataset.sentryComponent)return i.dataset.sentryComponent;if(i.dataset.sentryElement)return i.dataset.sentryElement}a.push(i.tagName.toLowerCase());const r=t?.length?t.filter(u=>i.getAttribute(u)).map(u=>[u,i.getAttribute(u)]):null;if(r?.length)r.forEach(u=>{a.push(`[${u[0]}="${u[1]}"]`)});else{i.id&&a.push(`#${i.id}`);const u=i.className;if(u&&Uo(u)){const h=u.split(/\s+/);for(const p of h)a.push(`.${p}`)}}const c=["aria-label","type","name","title","alt"];for(const u of c){const h=i.getAttribute(u);h&&a.push(`[${u}="${h}"]`)}return a.join("")}function Fh(){try{return Bh.document.location.href}catch{return""}}function A1(l){if(!Bh.HTMLElement)return null;let t=l;const i=5;for(let a=0;a<i;a++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}function Xc(l,t=0){return typeof l!="string"||t===0||l.length<=t?l:`${l.slice(0,t)}...`}function Zy(l,t){if(!Array.isArray(l))return"";const i=[];for(let a=0;a<l.length;a++){const r=l[a];try{Qy(r)?i.push("[VueViewModel]"):i.push(String(r))}catch{i.push("[value cannot be serialized]")}}return i.join(t)}function Wc(l,t,i=!1){return Uo(l)?y1(t)?t.test(l):Uo(t)?i?l===t:l.includes(t):!1:!1}function Qc(l,t=[],i=!1){return t.some(a=>Wc(l,a,i))}function Zi(l,t,i){if(!(t in l))return;const a=l[t];if(typeof a!="function")return;const r=i(a);typeof r=="function"&&Jy(r,a);try{l[t]=r}catch{gt&&Tt.log(`Failed to replace method "${t}" in object`,l)}}function Ho(l,t,i){try{Object.defineProperty(l,t,{value:i,writable:!0,configurable:!0})}catch{gt&&Tt.log(`Failed to add non-enumerable property "${t}" to object`,l)}}function Jy(l,t){try{const i=t.prototype||{};l.prototype=t.prototype=i,Ho(l,"__sentry_original__",t)}catch{}}function jh(l){return l.__sentry_original__}function tb(l){if(Uh(l))return{message:l.message,name:l.name,stack:l.stack,...nb(l)};if(qc(l)){const t={type:l.type,target:eb(l.target),currentTarget:eb(l.currentTarget),...nb(l)};return typeof CustomEvent<"u"&&Os(l,CustomEvent)&&(t.detail=l.detail),t}else return l}function eb(l){try{return g1(l)?Ky(l):Object.prototype.toString.call(l)}catch{return"<unknown>"}}function nb(l){if(typeof l=="object"&&l!==null){const t={};for(const i in l)Object.prototype.hasOwnProperty.call(l,i)&&(t[i]=l[i]);return t}else return{}}function _1(l,t=40){const i=Object.keys(tb(l));i.sort();const a=i[0];if(!a)return"[object has no keys]";if(a.length>=t)return Xc(a,t);for(let r=i.length;r>0;r--){const c=i.slice(0,r).join(", ");if(!(c.length>t))return r===i.length?c:Xc(c,t)}return""}function T1(){const l=Kt;return l.crypto||l.msCrypto}function fi(l=T1()){let t=()=>Math.random()*16;try{if(l?.randomUUID)return l.randomUUID().replace(/-/g,"");l?.getRandomValues&&(t=()=>{const i=new Uint8Array(1);return l.getRandomValues(i),i[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,i=>(i^(t()&15)>>i/4).toString(16))}function ib(l){return l.exception?.values?.[0]}function va(l){const{message:t,event_id:i}=l;if(t)return t;const a=ib(l);return a?a.type&&a.value?`${a.type}: ${a.value}`:a.type||a.value||i||"<unknown>":i||"<unknown>"}function $h(l,t,i){const a=l.exception=l.exception||{},r=a.values=a.values||[],c=r[0]=r[0]||{};c.value||(c.value=t||""),c.type||(c.type="Error")}function yr(l,t){const i=ib(l);if(!i)return;const a={type:"generic",handled:!0},r=i.mechanism;if(i.mechanism={...a,...r,...t},t&&"data"in t){const c={...r?.data,...t.data};i.mechanism.data=c}}function sb(l){if(w1(l))return!0;try{Ho(l,"__sentry_captured__",!0)}catch{}return!1}function w1(l){try{return l.__sentry_captured__}catch{}}const ab=1e3;function Bo(){return Date.now()/ab}function C1(){const{performance:l}=Kt;if(!l?.now||!l.timeOrigin)return Bo;const t=l.timeOrigin;return()=>(t+l.now())/ab}let rb;function br(){return(rb??(rb=C1()))()}function x1(l){const t=br(),i={sid:fi(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>D1(i)};return l&&vr(i,l),i}function vr(l,t={}){if(t.user&&(!l.ipAddress&&t.user.ip_address&&(l.ipAddress=t.user.ip_address),!l.did&&!t.did&&(l.did=t.user.id||t.user.email||t.user.username)),l.timestamp=t.timestamp||br(),t.abnormal_mechanism&&(l.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(l.ignoreDuration=t.ignoreDuration),t.sid&&(l.sid=t.sid.length===32?t.sid:fi()),t.init!==void 0&&(l.init=t.init),!l.did&&t.did&&(l.did=`${t.did}`),typeof t.started=="number"&&(l.started=t.started),l.ignoreDuration)l.duration=void 0;else if(typeof t.duration=="number")l.duration=t.duration;else{const i=l.timestamp-l.started;l.duration=i>=0?i:0}t.release&&(l.release=t.release),t.environment&&(l.environment=t.environment),!l.ipAddress&&t.ipAddress&&(l.ipAddress=t.ipAddress),!l.userAgent&&t.userAgent&&(l.userAgent=t.userAgent),typeof t.errors=="number"&&(l.errors=t.errors),t.status&&(l.status=t.status)}function R1(l,t){let i={};l.status==="ok"&&(i={status:"exited"}),vr(l,i)}function D1(l){return{sid:`${l.sid}`,init:l.init,started:new Date(l.started*1e3).toISOString(),timestamp:new Date(l.timestamp*1e3).toISOString(),status:l.status,errors:l.errors,did:typeof l.did=="number"||typeof l.did=="string"?`${l.did}`:void 0,duration:l.duration,abnormal_mechanism:l.abnormal_mechanism,attrs:{release:l.release,environment:l.environment,ip_address:l.ipAddress,user_agent:l.userAgent}}}function Fo(l,t,i=2){if(!t||typeof t!="object"||i<=0)return t;if(l&&Object.keys(t).length===0)return l;const a={...l};for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(a[r]=Fo(a[r],t[r],i-1));return a}function ob(){return fi()}function lb(){return fi().substring(16)}const Gh="_sentrySpan";function cb(l,t){t?Ho(l,Gh,t):delete l[Gh]}function ub(l){return l[Gh]}const M1=100;class Ci{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:ob(),sampleRand:Math.random()}}clone(){const t=new Ci;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,cb(t,ub(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&vr(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,i){return this._tags={...this._tags,[t]:i},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,i){return this._extra={...this._extra,[t]:i},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,i){return i===null?delete this._contexts[t]:this._contexts[t]=i,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const i=typeof t=="function"?t(this):t,a=i instanceof Ci?i.getScopeData():zo(i)?t:void 0,{tags:r,extra:c,user:u,contexts:h,level:p,fingerprint:m=[],propagationContext:g}=a||{};return this._tags={...this._tags,...r},this._extra={...this._extra,...c},this._contexts={...this._contexts,...h},u&&Object.keys(u).length&&(this._user=u),p&&(this._level=p),m.length&&(this._fingerprint=m),g&&(this._propagationContext=g),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,cb(this,void 0),this._attachments=[],this.setPropagationContext({traceId:ob(),sampleRand:Math.random()}),this._notifyScopeListeners(),this}addBreadcrumb(t,i){const a=typeof i=="number"?i:M1;if(a<=0)return this;const r={timestamp:Bo(),...t,message:t.message?Xc(t.message,2048):t.message};return this._breadcrumbs.push(r),this._breadcrumbs.length>a&&(this._breadcrumbs=this._breadcrumbs.slice(-a),this._client?.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:ub(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=Fo(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,i){const a=i?.event_id||fi();if(!this._client)return gt&&Tt.warn("No client configured on scope - will not capture exception!"),a;const r=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:r,...i,event_id:a},this),a}captureMessage(t,i,a){const r=a?.event_id||fi();if(!this._client)return gt&&Tt.warn("No client configured on scope - will not capture message!"),r;const c=new Error(t);return this._client.captureMessage(t,i,{originalException:t,syntheticException:c,...a,event_id:r},this),r}captureEvent(t,i){const a=i?.event_id||fi();return this._client?(this._client.captureEvent(t,{...i,event_id:a},this),a):(gt&&Tt.warn("No client configured on scope - will not capture event!"),a)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}function O1(){return Po("defaultCurrentScope",()=>new Ci)}function k1(){return Po("defaultIsolationScope",()=>new Ci)}class N1{constructor(t,i){let a;t?a=t:a=new Ci;let r;i?r=i:r=new Ci,this._stack=[{scope:a}],this._isolationScope=r}withScope(t){const i=this._pushScope();let a;try{a=t(i)}catch(r){throw this._popScope(),r}return Yc(a)?a.then(r=>(this._popScope(),r),r=>{throw this._popScope(),r}):(this._popScope(),a)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}}function Sr(){const l=Hc(),t=Bc(l);return t.stack=t.stack||new N1(O1(),k1())}function L1(l){return Sr().withScope(l)}function I1(l,t){const i=Sr();return i.withScope(()=>(i.getStackTop().scope=l,t(l)))}function db(l){return Sr().withScope(()=>l(Sr().getIsolationScope()))}function P1(){return{withIsolationScope:db,withScope:L1,withSetScope:I1,withSetIsolationScope:(l,t)=>db(t),getCurrentScope:()=>Sr().getScope(),getIsolationScope:()=>Sr().getIsolationScope()}}function Vh(l){const t=Bc(l);return t.acs?t.acs:P1()}function ks(){const l=Hc();return Vh(l).getCurrentScope()}function jo(){const l=Hc();return Vh(l).getIsolationScope()}function U1(){return Po("globalScope",()=>new Ci)}function z1(...l){const t=Hc(),i=Vh(t);if(l.length===2){const[a,r]=l;return a?i.withSetScope(a,r):i.withScope(r)}return i.withScope(l[0])}function ln(){return ks().getClient()}function H1(l){const t=l.getPropagationContext(),{traceId:i,parentSpanId:a,propagationSpanId:r}=t,c={trace_id:i,span_id:r||lb()};return a&&(c.parent_span_id=a),c}const B1="sentry.source",F1="sentry.sample_rate",j1="sentry.previous_trace_sample_rate",$1="sentry.op",G1="sentry.origin",hb="sentry.profile_id",fb="sentry.exclusive_time",V1=0,q1=1,Y1="_sentryScope",X1="_sentryIsolationScope";function pb(l){return{scope:l[Y1],isolationScope:l[X1]}}const W1="sentry-",Q1=/^sentry-/;function K1(l){const t=Z1(l);if(!t)return;const i=Object.entries(t).reduce((a,[r,c])=>{if(r.match(Q1)){const u=r.slice(W1.length);a[u]=c}return a},{});if(Object.keys(i).length>0)return i}function Z1(l){if(!(!l||!Uo(l)&&!Array.isArray(l)))return Array.isArray(l)?l.reduce((t,i)=>{const a=mb(i);return Object.entries(a).forEach(([r,c])=>{t[r]=c}),t},{}):mb(l)}function mb(l){return l.split(",").map(t=>t.split("=").map(i=>{try{return decodeURIComponent(i.trim())}catch{return}})).reduce((t,[i,a])=>(i&&a&&(t[i]=a),t),{})}const J1=/^o(\d+)\./,tC=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function eC(l){return l==="http"||l==="https"}function Kc(l,t=!1){const{host:i,path:a,pass:r,port:c,projectId:u,protocol:h,publicKey:p}=l;return`${h}://${p}${t&&r?`:${r}`:""}@${i}${c?`:${c}`:""}/${a&&`${a}/`}${u}`}function nC(l){const t=tC.exec(l);if(!t){pr(()=>{console.error(`Invalid Sentry Dsn: ${l}`)});return}const[i,a,r="",c="",u="",h=""]=t.slice(1);let p="",m=h;const g=m.split("/");if(g.length>1&&(p=g.slice(0,-1).join("/"),m=g.pop()),m){const y=m.match(/^\d+/);y&&(m=y[0])}return gb({host:c,pass:r,path:p,projectId:m,port:u,protocol:i,publicKey:a})}function gb(l){return{protocol:l.protocol,publicKey:l.publicKey||"",pass:l.pass||"",host:l.host,port:l.port||"",path:l.path||"",projectId:l.projectId}}function iC(l){if(!gt)return!0;const{port:t,projectId:i,protocol:a}=l;return["protocol","publicKey","host","projectId"].find(u=>l[u]?!1:(Tt.error(`Invalid Sentry Dsn: ${u} missing`),!0))?!1:i.match(/^\d+$/)?eC(a)?t&&isNaN(parseInt(t,10))?(Tt.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(Tt.error(`Invalid Sentry Dsn: Invalid protocol ${a}`),!1):(Tt.error(`Invalid Sentry Dsn: Invalid projectId ${i}`),!1)}function sC(l){return l.match(J1)?.[1]}function aC(l){const t=l.getOptions(),{host:i}=l.getDsn()||{};let a;return t.orgId?a=String(t.orgId):i&&(a=sC(i)),a}function rC(l){const t=typeof l=="string"?nC(l):gb(l);if(!(!t||!iC(t)))return t}function oC(l){if(typeof l=="boolean")return Number(l);const t=typeof l=="string"?parseFloat(l):l;if(!(typeof t!="number"||isNaN(t)||t<0||t>1))return t}const yb=1;let bb=!1;function lC(l){const{spanId:t,traceId:i,isRemote:a}=l.spanContext(),r=a?t:qh(l).parent_span_id,c=pb(l).scope,u=a?c?.getPropagationContext().propagationSpanId||lb():t;return{parent_span_id:r,span_id:u,trace_id:i}}function cC(l){if(l&&l.length>0)return l.map(({context:{spanId:t,traceId:i,traceFlags:a,...r},attributes:c})=>({span_id:t,trace_id:i,sampled:a===yb,attributes:c,...r}))}function vb(l){return typeof l=="number"?Sb(l):Array.isArray(l)?l[0]+l[1]/1e9:l instanceof Date?Sb(l.getTime()):br()}function Sb(l){return l>9999999999?l/1e3:l}function qh(l){if(dC(l))return l.getSpanJSON();const{spanId:t,traceId:i}=l.spanContext();if(uC(l)){const{attributes:a,startTime:r,name:c,endTime:u,status:h,links:p}=l,m="parentSpanId"in l?l.parentSpanId:"parentSpanContext"in l?l.parentSpanContext?.spanId:void 0;return{span_id:t,trace_id:i,data:a,description:c,parent_span_id:m,start_timestamp:vb(r),timestamp:vb(u)||void 0,status:fC(h),op:a[$1],origin:a[G1],links:cC(p)}}return{span_id:t,trace_id:i,start_timestamp:0,data:{}}}function uC(l){const t=l;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function dC(l){return typeof l.getSpanJSON=="function"}function hC(l){const{traceFlags:t}=l.spanContext();return t===yb}function fC(l){if(!(!l||l.code===V1))return l.code===q1?"ok":l.message||"unknown_error"}const pC="_sentryRootSpan";function Eb(l){return l[pC]||l}function Ab(){bb||(pr(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly.")}),bb=!0)}function mC(l){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=ln()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}const Yh="production",gC="_frozenDsc";function _b(l,t){const i=t.getOptions(),{publicKey:a}=t.getDsn()||{},r={environment:i.environment||Yh,release:i.release,public_key:a,trace_id:l,org_id:aC(t)};return t.emit("createDsc",r),r}function yC(l,t){const i=t.getPropagationContext();return i.dsc||_b(i.traceId,l)}function bC(l){const t=ln();if(!t)return{};const i=Eb(l),a=qh(i),r=a.data,c=i.spanContext().traceState,u=c?.get("sentry.sample_rate")??r[F1]??r[j1];function h(A){return(typeof u=="number"||typeof u=="string")&&(A.sample_rate=`${u}`),A}const p=i[gC];if(p)return h(p);const m=c?.get("sentry.dsc"),g=m&&K1(m);if(g)return h(g);const y=_b(l.spanContext().traceId,t),b=r[B1],S=a.description;return b!=="url"&&S&&(y.transaction=S),mC()&&(y.sampled=String(hC(i)),y.sample_rand=c?.get("sentry.sample_rand")??pb(i).scope?.getPropagationContext().sampleRand.toString()),h(y),t.emit("createDsc",y,i),y}function Ji(l,t=100,i=1/0){try{return Xh("",l,t,i)}catch(a){return{ERROR:`**non-serializable** (${a})`}}}function Tb(l,t=3,i=100*1024){const a=Ji(l,t);return AC(a)>i?Tb(l,t-1,i):a}function Xh(l,t,i=1/0,a=1/0,r=_C()){const[c,u]=r;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const h=vC(l,t);if(!h.startsWith("[object "))return h;if(t.__sentry_skip_normalization__)return t;const p=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:i;if(p===0)return h.replace("object ","");if(c(t))return"[Circular ~]";const m=t;if(m&&typeof m.toJSON=="function")try{const S=m.toJSON();return Xh("",S,p-1,a,r)}catch{}const g=Array.isArray(t)?[]:{};let y=0;const b=tb(t);for(const S in b){if(!Object.prototype.hasOwnProperty.call(b,S))continue;if(y>=a){g[S]="[MaxProperties ~]";break}const A=b[S];g[S]=Xh(S,A,p-1,a,r),y++}return u(t),g}function vC(l,t){try{if(l==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(l==="domainEmitter")return"[DomainEmitter]";if(typeof globalThis<"u"&&t===globalThis)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(Qy(t))return"[VueViewModel]";if(b1(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${Ms(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const i=SC(t);return/^HTML(\w*)Element$/.test(i)?`[HTMLElement: ${i}]`:`[object ${i}]`}catch(i){return`**non-serializable** (${i})`}}function SC(l){const t=Object.getPrototypeOf(l);return t?.constructor?t.constructor.name:"null prototype"}function EC(l){return~-encodeURI(l).split(/%..|./).length}function AC(l){return EC(JSON.stringify(l))}function _C(){const l=new WeakSet;function t(a){return l.has(a)?!0:(l.add(a),!1)}function i(a){l.delete(a)}return[t,i]}function $o(l,t=[]){return[l,t]}function TC(l,t){const[i,a]=l;return[i,[...a,t]]}function wb(l,t){const i=l[1];for(const a of i){const r=a[0].type;if(t(a,r))return!0}return!1}function Wh(l){const t=Bc(Kt);return t.encodePolyfill?t.encodePolyfill(l):new TextEncoder().encode(l)}function wC(l){const[t,i]=l;let a=JSON.stringify(t);function r(c){typeof a=="string"?a=typeof c=="string"?a+c:[Wh(a),c]:a.push(typeof c=="string"?Wh(c):c)}for(const c of i){const[u,h]=c;if(r(`
5
+ Error:`,r)}}let Ph=null;function u1(l){const t="error";Gc(t,l),Vc(t,d1)}function d1(){Ph=Kt.onerror,Kt.onerror=function(l,t,i,a,r){return mr("error",{column:a,error:r,line:i,msg:l,url:t}),Ph?Ph.apply(this,arguments):!1},Kt.onerror.__SENTRY_INSTRUMENTED__=!0}let Uh=null;function h1(l){const t="unhandledrejection";Gc(t,l),Vc(t,f1)}function f1(){Uh=Kt.onunhandledrejection,Kt.onunhandledrejection=function(l){return mr("unhandledrejection",l),Uh?Uh.apply(this,arguments):!0},Kt.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const qy=Object.prototype.toString;function zh(l){switch(qy.call(l)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Os(l,Error)}}function gr(l,t){return qy.call(l)===`[object ${t}]`}function Xy(l){return gr(l,"ErrorEvent")}function Yy(l){return gr(l,"DOMError")}function p1(l){return gr(l,"DOMException")}function Uo(l){return gr(l,"String")}function Hh(l){return typeof l=="object"&&l!==null&&"__sentry_template_string__"in l&&"__sentry_template_values__"in l}function Bh(l){return l===null||Hh(l)||typeof l!="object"&&typeof l!="function"}function zo(l){return gr(l,"Object")}function qc(l){return typeof Event<"u"&&Os(l,Event)}function m1(l){return typeof Element<"u"&&Os(l,Element)}function g1(l){return gr(l,"RegExp")}function Xc(l){return!!(l?.then&&typeof l.then=="function")}function y1(l){return zo(l)&&"nativeEvent"in l&&"preventDefault"in l&&"stopPropagation"in l}function Os(l,t){try{return l instanceof t}catch{return!1}}function Wy(l){return!!(typeof l=="object"&&l!==null&&(l.__isVue||l._isVue))}function b1(l){return typeof Request<"u"&&Os(l,Request)}const Fh=Kt,v1=80;function Qy(l,t={}){if(!l)return"<unknown>";try{let i=l;const a=5,r=[];let c=0,u=0;const h=" > ",p=h.length;let m;const g=Array.isArray(t)?t:t.keyAttrs,y=!Array.isArray(t)&&t.maxStringLength||v1;for(;i&&c++<a&&(m=S1(i,g),!(m==="html"||c>1&&u+r.length*p+m.length>=y));)r.push(m),u+=m.length,i=i.parentNode;return r.reverse().join(h)}catch{return"<unknown>"}}function S1(l,t){const i=l,a=[];if(!i?.tagName)return"";if(Fh.HTMLElement&&i instanceof HTMLElement&&i.dataset){if(i.dataset.sentryComponent)return i.dataset.sentryComponent;if(i.dataset.sentryElement)return i.dataset.sentryElement}a.push(i.tagName.toLowerCase());const r=t?.length?t.filter(u=>i.getAttribute(u)).map(u=>[u,i.getAttribute(u)]):null;if(r?.length)r.forEach(u=>{a.push(`[${u[0]}="${u[1]}"]`)});else{i.id&&a.push(`#${i.id}`);const u=i.className;if(u&&Uo(u)){const h=u.split(/\s+/);for(const p of h)a.push(`.${p}`)}}const c=["aria-label","type","name","title","alt"];for(const u of c){const h=i.getAttribute(u);h&&a.push(`[${u}="${h}"]`)}return a.join("")}function jh(){try{return Fh.document.location.href}catch{return""}}function E1(l){if(!Fh.HTMLElement)return null;let t=l;const i=5;for(let a=0;a<i;a++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}function Yc(l,t=0){return typeof l!="string"||t===0||l.length<=t?l:`${l.slice(0,t)}...`}function Ky(l,t){if(!Array.isArray(l))return"";const i=[];for(let a=0;a<l.length;a++){const r=l[a];try{Wy(r)?i.push("[VueViewModel]"):i.push(String(r))}catch{i.push("[value cannot be serialized]")}}return i.join(t)}function Wc(l,t,i=!1){return Uo(l)?g1(t)?t.test(l):Uo(t)?i?l===t:l.includes(t):!1:!1}function Qc(l,t=[],i=!1){return t.some(a=>Wc(l,a,i))}function Zi(l,t,i){if(!(t in l))return;const a=l[t];if(typeof a!="function")return;const r=i(a);typeof r=="function"&&Zy(r,a);try{l[t]=r}catch{gt&&Tt.log(`Failed to replace method "${t}" in object`,l)}}function Ho(l,t,i){try{Object.defineProperty(l,t,{value:i,writable:!0,configurable:!0})}catch{gt&&Tt.log(`Failed to add non-enumerable property "${t}" to object`,l)}}function Zy(l,t){try{const i=t.prototype||{};l.prototype=t.prototype=i,Ho(l,"__sentry_original__",t)}catch{}}function $h(l){return l.__sentry_original__}function Jy(l){if(zh(l))return{message:l.message,name:l.name,stack:l.stack,...eb(l)};if(qc(l)){const t={type:l.type,target:tb(l.target),currentTarget:tb(l.currentTarget),...eb(l)};return typeof CustomEvent<"u"&&Os(l,CustomEvent)&&(t.detail=l.detail),t}else return l}function tb(l){try{return m1(l)?Qy(l):Object.prototype.toString.call(l)}catch{return"<unknown>"}}function eb(l){if(typeof l=="object"&&l!==null){const t={};for(const i in l)Object.prototype.hasOwnProperty.call(l,i)&&(t[i]=l[i]);return t}else return{}}function A1(l,t=40){const i=Object.keys(Jy(l));i.sort();const a=i[0];if(!a)return"[object has no keys]";if(a.length>=t)return Yc(a,t);for(let r=i.length;r>0;r--){const c=i.slice(0,r).join(", ");if(!(c.length>t))return r===i.length?c:Yc(c,t)}return""}function _1(){const l=Kt;return l.crypto||l.msCrypto}function fi(l=_1()){let t=()=>Math.random()*16;try{if(l?.randomUUID)return l.randomUUID().replace(/-/g,"");l?.getRandomValues&&(t=()=>{const i=new Uint8Array(1);return l.getRandomValues(i),i[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,i=>(i^(t()&15)>>i/4).toString(16))}function nb(l){return l.exception?.values?.[0]}function va(l){const{message:t,event_id:i}=l;if(t)return t;const a=nb(l);return a?a.type&&a.value?`${a.type}: ${a.value}`:a.type||a.value||i||"<unknown>":i||"<unknown>"}function Gh(l,t,i){const a=l.exception=l.exception||{},r=a.values=a.values||[],c=r[0]=r[0]||{};c.value||(c.value=t||""),c.type||(c.type="Error")}function yr(l,t){const i=nb(l);if(!i)return;const a={type:"generic",handled:!0},r=i.mechanism;if(i.mechanism={...a,...r,...t},t&&"data"in t){const c={...r?.data,...t.data};i.mechanism.data=c}}function ib(l){if(T1(l))return!0;try{Ho(l,"__sentry_captured__",!0)}catch{}return!1}function T1(l){try{return l.__sentry_captured__}catch{}}const sb=1e3;function Bo(){return Date.now()/sb}function w1(){const{performance:l}=Kt;if(!l?.now||!l.timeOrigin)return Bo;const t=l.timeOrigin;return()=>(t+l.now())/sb}let ab;function br(){return(ab??(ab=w1()))()}function x1(l){const t=br(),i={sid:fi(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>R1(i)};return l&&vr(i,l),i}function vr(l,t={}){if(t.user&&(!l.ipAddress&&t.user.ip_address&&(l.ipAddress=t.user.ip_address),!l.did&&!t.did&&(l.did=t.user.id||t.user.email||t.user.username)),l.timestamp=t.timestamp||br(),t.abnormal_mechanism&&(l.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(l.ignoreDuration=t.ignoreDuration),t.sid&&(l.sid=t.sid.length===32?t.sid:fi()),t.init!==void 0&&(l.init=t.init),!l.did&&t.did&&(l.did=`${t.did}`),typeof t.started=="number"&&(l.started=t.started),l.ignoreDuration)l.duration=void 0;else if(typeof t.duration=="number")l.duration=t.duration;else{const i=l.timestamp-l.started;l.duration=i>=0?i:0}t.release&&(l.release=t.release),t.environment&&(l.environment=t.environment),!l.ipAddress&&t.ipAddress&&(l.ipAddress=t.ipAddress),!l.userAgent&&t.userAgent&&(l.userAgent=t.userAgent),typeof t.errors=="number"&&(l.errors=t.errors),t.status&&(l.status=t.status)}function C1(l,t){let i={};l.status==="ok"&&(i={status:"exited"}),vr(l,i)}function R1(l){return{sid:`${l.sid}`,init:l.init,started:new Date(l.started*1e3).toISOString(),timestamp:new Date(l.timestamp*1e3).toISOString(),status:l.status,errors:l.errors,did:typeof l.did=="number"||typeof l.did=="string"?`${l.did}`:void 0,duration:l.duration,abnormal_mechanism:l.abnormal_mechanism,attrs:{release:l.release,environment:l.environment,ip_address:l.ipAddress,user_agent:l.userAgent}}}function Fo(l,t,i=2){if(!t||typeof t!="object"||i<=0)return t;if(l&&Object.keys(t).length===0)return l;const a={...l};for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(a[r]=Fo(a[r],t[r],i-1));return a}function rb(){return fi()}function ob(){return fi().substring(16)}const Vh="_sentrySpan";function lb(l,t){t?Ho(l,Vh,t):delete l[Vh]}function cb(l){return l[Vh]}const D1=100;class xi{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:rb(),sampleRand:Math.random()}}clone(){const t=new xi;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,lb(t,cb(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&vr(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,i){return this._tags={...this._tags,[t]:i},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,i){return this._extra={...this._extra,[t]:i},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,i){return i===null?delete this._contexts[t]:this._contexts[t]=i,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const i=typeof t=="function"?t(this):t,a=i instanceof xi?i.getScopeData():zo(i)?t:void 0,{tags:r,extra:c,user:u,contexts:h,level:p,fingerprint:m=[],propagationContext:g}=a||{};return this._tags={...this._tags,...r},this._extra={...this._extra,...c},this._contexts={...this._contexts,...h},u&&Object.keys(u).length&&(this._user=u),p&&(this._level=p),m.length&&(this._fingerprint=m),g&&(this._propagationContext=g),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,lb(this,void 0),this._attachments=[],this.setPropagationContext({traceId:rb(),sampleRand:Math.random()}),this._notifyScopeListeners(),this}addBreadcrumb(t,i){const a=typeof i=="number"?i:D1;if(a<=0)return this;const r={timestamp:Bo(),...t,message:t.message?Yc(t.message,2048):t.message};return this._breadcrumbs.push(r),this._breadcrumbs.length>a&&(this._breadcrumbs=this._breadcrumbs.slice(-a),this._client?.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:cb(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=Fo(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,i){const a=i?.event_id||fi();if(!this._client)return gt&&Tt.warn("No client configured on scope - will not capture exception!"),a;const r=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:r,...i,event_id:a},this),a}captureMessage(t,i,a){const r=a?.event_id||fi();if(!this._client)return gt&&Tt.warn("No client configured on scope - will not capture message!"),r;const c=new Error(t);return this._client.captureMessage(t,i,{originalException:t,syntheticException:c,...a,event_id:r},this),r}captureEvent(t,i){const a=i?.event_id||fi();return this._client?(this._client.captureEvent(t,{...i,event_id:a},this),a):(gt&&Tt.warn("No client configured on scope - will not capture event!"),a)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}function M1(){return Po("defaultCurrentScope",()=>new xi)}function O1(){return Po("defaultIsolationScope",()=>new xi)}class k1{constructor(t,i){let a;t?a=t:a=new xi;let r;i?r=i:r=new xi,this._stack=[{scope:a}],this._isolationScope=r}withScope(t){const i=this._pushScope();let a;try{a=t(i)}catch(r){throw this._popScope(),r}return Xc(a)?a.then(r=>(this._popScope(),r),r=>{throw this._popScope(),r}):(this._popScope(),a)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}}function Sr(){const l=Hc(),t=Bc(l);return t.stack=t.stack||new k1(M1(),O1())}function N1(l){return Sr().withScope(l)}function L1(l,t){const i=Sr();return i.withScope(()=>(i.getStackTop().scope=l,t(l)))}function ub(l){return Sr().withScope(()=>l(Sr().getIsolationScope()))}function I1(){return{withIsolationScope:ub,withScope:N1,withSetScope:L1,withSetIsolationScope:(l,t)=>ub(t),getCurrentScope:()=>Sr().getScope(),getIsolationScope:()=>Sr().getIsolationScope()}}function qh(l){const t=Bc(l);return t.acs?t.acs:I1()}function ks(){const l=Hc();return qh(l).getCurrentScope()}function jo(){const l=Hc();return qh(l).getIsolationScope()}function P1(){return Po("globalScope",()=>new xi)}function U1(...l){const t=Hc(),i=qh(t);if(l.length===2){const[a,r]=l;return a?i.withSetScope(a,r):i.withScope(r)}return i.withScope(l[0])}function ln(){return ks().getClient()}function z1(l){const t=l.getPropagationContext(),{traceId:i,parentSpanId:a,propagationSpanId:r}=t,c={trace_id:i,span_id:r||ob()};return a&&(c.parent_span_id=a),c}const H1="sentry.source",B1="sentry.sample_rate",F1="sentry.previous_trace_sample_rate",j1="sentry.op",$1="sentry.origin",db="sentry.profile_id",hb="sentry.exclusive_time",G1=0,V1=1,q1="_sentryScope",X1="_sentryIsolationScope";function fb(l){return{scope:l[q1],isolationScope:l[X1]}}const Y1="sentry-",W1=/^sentry-/;function Q1(l){const t=K1(l);if(!t)return;const i=Object.entries(t).reduce((a,[r,c])=>{if(r.match(W1)){const u=r.slice(Y1.length);a[u]=c}return a},{});if(Object.keys(i).length>0)return i}function K1(l){if(!(!l||!Uo(l)&&!Array.isArray(l)))return Array.isArray(l)?l.reduce((t,i)=>{const a=pb(i);return Object.entries(a).forEach(([r,c])=>{t[r]=c}),t},{}):pb(l)}function pb(l){return l.split(",").map(t=>t.split("=").map(i=>{try{return decodeURIComponent(i.trim())}catch{return}})).reduce((t,[i,a])=>(i&&a&&(t[i]=a),t),{})}const Z1=/^o(\d+)\./,J1=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function tx(l){return l==="http"||l==="https"}function Kc(l,t=!1){const{host:i,path:a,pass:r,port:c,projectId:u,protocol:h,publicKey:p}=l;return`${h}://${p}${t&&r?`:${r}`:""}@${i}${c?`:${c}`:""}/${a&&`${a}/`}${u}`}function ex(l){const t=J1.exec(l);if(!t){pr(()=>{console.error(`Invalid Sentry Dsn: ${l}`)});return}const[i,a,r="",c="",u="",h=""]=t.slice(1);let p="",m=h;const g=m.split("/");if(g.length>1&&(p=g.slice(0,-1).join("/"),m=g.pop()),m){const y=m.match(/^\d+/);y&&(m=y[0])}return mb({host:c,pass:r,path:p,projectId:m,port:u,protocol:i,publicKey:a})}function mb(l){return{protocol:l.protocol,publicKey:l.publicKey||"",pass:l.pass||"",host:l.host,port:l.port||"",path:l.path||"",projectId:l.projectId}}function nx(l){if(!gt)return!0;const{port:t,projectId:i,protocol:a}=l;return["protocol","publicKey","host","projectId"].find(u=>l[u]?!1:(Tt.error(`Invalid Sentry Dsn: ${u} missing`),!0))?!1:i.match(/^\d+$/)?tx(a)?t&&isNaN(parseInt(t,10))?(Tt.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(Tt.error(`Invalid Sentry Dsn: Invalid protocol ${a}`),!1):(Tt.error(`Invalid Sentry Dsn: Invalid projectId ${i}`),!1)}function ix(l){return l.match(Z1)?.[1]}function sx(l){const t=l.getOptions(),{host:i}=l.getDsn()||{};let a;return t.orgId?a=String(t.orgId):i&&(a=ix(i)),a}function ax(l){const t=typeof l=="string"?ex(l):mb(l);if(!(!t||!nx(t)))return t}function rx(l){if(typeof l=="boolean")return Number(l);const t=typeof l=="string"?parseFloat(l):l;if(!(typeof t!="number"||isNaN(t)||t<0||t>1))return t}const gb=1;let yb=!1;function ox(l){const{spanId:t,traceId:i,isRemote:a}=l.spanContext(),r=a?t:Xh(l).parent_span_id,c=fb(l).scope,u=a?c?.getPropagationContext().propagationSpanId||ob():t;return{parent_span_id:r,span_id:u,trace_id:i}}function lx(l){if(l&&l.length>0)return l.map(({context:{spanId:t,traceId:i,traceFlags:a,...r},attributes:c})=>({span_id:t,trace_id:i,sampled:a===gb,attributes:c,...r}))}function bb(l){return typeof l=="number"?vb(l):Array.isArray(l)?l[0]+l[1]/1e9:l instanceof Date?vb(l.getTime()):br()}function vb(l){return l>9999999999?l/1e3:l}function Xh(l){if(ux(l))return l.getSpanJSON();const{spanId:t,traceId:i}=l.spanContext();if(cx(l)){const{attributes:a,startTime:r,name:c,endTime:u,status:h,links:p}=l,m="parentSpanId"in l?l.parentSpanId:"parentSpanContext"in l?l.parentSpanContext?.spanId:void 0;return{span_id:t,trace_id:i,data:a,description:c,parent_span_id:m,start_timestamp:bb(r),timestamp:bb(u)||void 0,status:hx(h),op:a[j1],origin:a[$1],links:lx(p)}}return{span_id:t,trace_id:i,start_timestamp:0,data:{}}}function cx(l){const t=l;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function ux(l){return typeof l.getSpanJSON=="function"}function dx(l){const{traceFlags:t}=l.spanContext();return t===gb}function hx(l){if(!(!l||l.code===G1))return l.code===V1?"ok":l.message||"unknown_error"}const fx="_sentryRootSpan";function Sb(l){return l[fx]||l}function Eb(){yb||(pr(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly.")}),yb=!0)}function px(l){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=ln()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}const Yh="production",mx="_frozenDsc";function Ab(l,t){const i=t.getOptions(),{publicKey:a}=t.getDsn()||{},r={environment:i.environment||Yh,release:i.release,public_key:a,trace_id:l,org_id:sx(t)};return t.emit("createDsc",r),r}function gx(l,t){const i=t.getPropagationContext();return i.dsc||Ab(i.traceId,l)}function yx(l){const t=ln();if(!t)return{};const i=Sb(l),a=Xh(i),r=a.data,c=i.spanContext().traceState,u=c?.get("sentry.sample_rate")??r[B1]??r[F1];function h(A){return(typeof u=="number"||typeof u=="string")&&(A.sample_rate=`${u}`),A}const p=i[mx];if(p)return h(p);const m=c?.get("sentry.dsc"),g=m&&Q1(m);if(g)return h(g);const y=Ab(l.spanContext().traceId,t),b=r[H1],S=a.description;return b!=="url"&&S&&(y.transaction=S),px()&&(y.sampled=String(dx(i)),y.sample_rand=c?.get("sentry.sample_rand")??fb(i).scope?.getPropagationContext().sampleRand.toString()),h(y),t.emit("createDsc",y,i),y}function Ji(l,t=100,i=1/0){try{return Wh("",l,t,i)}catch(a){return{ERROR:`**non-serializable** (${a})`}}}function _b(l,t=3,i=100*1024){const a=Ji(l,t);return Ex(a)>i?_b(l,t-1,i):a}function Wh(l,t,i=1/0,a=1/0,r=Ax()){const[c,u]=r;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const h=bx(l,t);if(!h.startsWith("[object "))return h;if(t.__sentry_skip_normalization__)return t;const p=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:i;if(p===0)return h.replace("object ","");if(c(t))return"[Circular ~]";const m=t;if(m&&typeof m.toJSON=="function")try{const S=m.toJSON();return Wh("",S,p-1,a,r)}catch{}const g=Array.isArray(t)?[]:{};let y=0;const b=Jy(t);for(const S in b){if(!Object.prototype.hasOwnProperty.call(b,S))continue;if(y>=a){g[S]="[MaxProperties ~]";break}const A=b[S];g[S]=Wh(S,A,p-1,a,r),y++}return u(t),g}function bx(l,t){try{if(l==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(l==="domainEmitter")return"[DomainEmitter]";if(typeof globalThis<"u"&&t===globalThis)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(Wy(t))return"[VueViewModel]";if(y1(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${Ms(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const i=vx(t);return/^HTML(\w*)Element$/.test(i)?`[HTMLElement: ${i}]`:`[object ${i}]`}catch(i){return`**non-serializable** (${i})`}}function vx(l){const t=Object.getPrototypeOf(l);return t?.constructor?t.constructor.name:"null prototype"}function Sx(l){return~-encodeURI(l).split(/%..|./).length}function Ex(l){return Sx(JSON.stringify(l))}function Ax(){const l=new WeakSet;function t(a){return l.has(a)?!0:(l.add(a),!1)}function i(a){l.delete(a)}return[t,i]}function $o(l,t=[]){return[l,t]}function _x(l,t){const[i,a]=l;return[i,[...a,t]]}function Tb(l,t){const i=l[1];for(const a of i){const r=a[0].type;if(t(a,r))return!0}return!1}function Qh(l){const t=Bc(Kt);return t.encodePolyfill?t.encodePolyfill(l):new TextEncoder().encode(l)}function Tx(l){const[t,i]=l;let a=JSON.stringify(t);function r(c){typeof a=="string"?a=typeof c=="string"?a+c:[Qh(a),c]:a.push(typeof c=="string"?Qh(c):c)}for(const c of i){const[u,h]=c;if(r(`
6
6
  ${JSON.stringify(u)}
7
- `),typeof h=="string"||h instanceof Uint8Array)r(h);else{let p;try{p=JSON.stringify(h)}catch{p=JSON.stringify(Ji(h))}r(p)}}return typeof a=="string"?a:CC(a)}function CC(l){const t=l.reduce((r,c)=>r+c.length,0),i=new Uint8Array(t);let a=0;for(const r of l)i.set(r,a),a+=r.length;return i}function xC(l){const t=typeof l.data=="string"?Wh(l.data):l.data;return[{type:"attachment",length:t.length,filename:l.filename,content_type:l.contentType,attachment_type:l.attachmentType},t]}const RC={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",raw_security:"security",log:"log_item"};function Cb(l){return RC[l]}function xb(l){if(!l?.sdk)return;const{name:t,version:i}=l.sdk;return{name:t,version:i}}function DC(l,t,i,a){const r=l.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:l.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!i&&a&&{dsn:Kc(a)},...r&&{trace:r}}}function Rb(l,t){if(!t?.length||!l.description)return!1;for(const i of t){if(OC(i)){if(Wc(l.description,i))return!0;continue}if(!i.name&&!i.op)continue;const a=i.name?Wc(l.description,i.name):!0,r=i.op?l.op&&Wc(l.op,i.op):!0;if(a&&r)return!0}return!1}function MC(l,t){const i=t.parent_span_id,a=t.span_id;if(i)for(const r of l)r.parent_span_id===a&&(r.parent_span_id=i)}function OC(l){return typeof l=="string"||l instanceof RegExp}function kC(l,t){if(!t)return l;const i=l.sdk||{};return l.sdk={...i,name:i.name||t.name,version:i.version||t.version,integrations:[...l.sdk?.integrations||[],...t.integrations||[]],packages:[...l.sdk?.packages||[],...t.packages||[]],settings:l.sdk?.settings||t.settings?{...l.sdk?.settings,...t.settings}:void 0},l}function NC(l,t,i,a){const r=xb(i),c={sent_at:new Date().toISOString(),...r&&{sdk:r},...!!a&&t&&{dsn:Kc(t)}},u="aggregates"in l?[{type:"sessions"},l]:[{type:"session"},l.toJSON()];return $o(c,[u])}function LC(l,t,i,a){const r=xb(i),c=l.type&&l.type!=="replay_event"?l.type:"event";kC(l,i?.sdk);const u=DC(l,r,a,t);return delete l.sdkProcessingMetadata,$o(u,[[{type:c},l]])}const Qh=0,Db=1,Mb=2;function Sa(l){return new Ns(t=>{t(l)})}function Zc(l){return new Ns((t,i)=>{i(l)})}class Ns{constructor(t){this._state=Qh,this._handlers=[],this._runExecutor(t)}then(t,i){return new Ns((a,r)=>{this._handlers.push([!1,c=>{if(!t)a(c);else try{a(t(c))}catch(u){r(u)}},c=>{if(!i)r(c);else try{a(i(c))}catch(u){r(u)}}]),this._executeHandlers()})}catch(t){return this.then(i=>i,t)}finally(t){return new Ns((i,a)=>{let r,c;return this.then(u=>{c=!1,r=u,t&&t()},u=>{c=!0,r=u,t&&t()}).then(()=>{if(c){a(r);return}i(r)})})}_executeHandlers(){if(this._state===Qh)return;const t=this._handlers.slice();this._handlers=[],t.forEach(i=>{i[0]||(this._state===Db&&i[1](this._value),this._state===Mb&&i[2](this._value),i[0]=!0)})}_runExecutor(t){const i=(c,u)=>{if(this._state===Qh){if(Yc(u)){u.then(a,r);return}this._state=c,this._value=u,this._executeHandlers()}},a=c=>{i(Db,c)},r=c=>{i(Mb,c)};try{t(a,r)}catch(c){r(c)}}}function Kh(l,t,i,a=0){return new Ns((r,c)=>{const u=l[a];if(t===null||typeof u!="function")r(t);else{const h=u({...t},i);gt&&u.id&&h===null&&Tt.log(`Event processor "${u.id}" dropped event`),Yc(h)?h.then(p=>Kh(l,p,i,a+1).then(r)).then(null,c):Kh(l,h,i,a+1).then(r).then(null,c)}})}function IC(l,t){const{fingerprint:i,span:a,breadcrumbs:r,sdkProcessingMetadata:c}=t;PC(l,t),a&&HC(l,a),BC(l,i),UC(l,r),zC(l,c)}function Ob(l,t){const{extra:i,tags:a,user:r,contexts:c,level:u,sdkProcessingMetadata:h,breadcrumbs:p,fingerprint:m,eventProcessors:g,attachments:y,propagationContext:b,transactionName:S,span:A}=t;Jc(l,"extra",i),Jc(l,"tags",a),Jc(l,"user",r),Jc(l,"contexts",c),l.sdkProcessingMetadata=Fo(l.sdkProcessingMetadata,h,2),u&&(l.level=u),S&&(l.transactionName=S),A&&(l.span=A),p.length&&(l.breadcrumbs=[...l.breadcrumbs,...p]),m.length&&(l.fingerprint=[...l.fingerprint,...m]),g.length&&(l.eventProcessors=[...l.eventProcessors,...g]),y.length&&(l.attachments=[...l.attachments,...y]),l.propagationContext={...l.propagationContext,...b}}function Jc(l,t,i){l[t]=Fo(l[t],i,1)}function PC(l,t){const{extra:i,tags:a,user:r,contexts:c,level:u,transactionName:h}=t;Object.keys(i).length&&(l.extra={...i,...l.extra}),Object.keys(a).length&&(l.tags={...a,...l.tags}),Object.keys(r).length&&(l.user={...r,...l.user}),Object.keys(c).length&&(l.contexts={...c,...l.contexts}),u&&(l.level=u),h&&l.type!=="transaction"&&(l.transaction=h)}function UC(l,t){const i=[...l.breadcrumbs||[],...t];l.breadcrumbs=i.length?i:void 0}function zC(l,t){l.sdkProcessingMetadata={...l.sdkProcessingMetadata,...t}}function HC(l,t){l.contexts={trace:lC(t),...l.contexts},l.sdkProcessingMetadata={dynamicSamplingContext:bC(t),...l.sdkProcessingMetadata};const i=Eb(t),a=qh(i).description;a&&!l.transaction&&l.type==="transaction"&&(l.transaction=a)}function BC(l,t){l.fingerprint=l.fingerprint?Array.isArray(l.fingerprint)?l.fingerprint:[l.fingerprint]:[],t&&(l.fingerprint=l.fingerprint.concat(t)),l.fingerprint.length||delete l.fingerprint}let tu,kb,eu;function FC(l){const t=Kt._sentryDebugIds;if(!t)return{};const i=Object.keys(t);return eu&&i.length===kb||(kb=i.length,eu=i.reduce((a,r)=>{tu||(tu={});const c=tu[r];if(c)a[c[0]]=c[1];else{const u=l(r);for(let h=u.length-1;h>=0;h--){const m=u[h]?.filename,g=t[r];if(m&&g){a[m]=g,tu[r]=[m,g];break}}}return a},{})),eu}function jC(l,t,i,a,r,c){const{normalizeDepth:u=3,normalizeMaxBreadth:h=1e3}=l,p={...t,event_id:t.event_id||i.event_id||fi(),timestamp:t.timestamp||Bo()},m=i.integrations||l.integrations.map(R=>R.name);$C(p,l),qC(p,m),r&&r.emit("applyFrameMetadata",t),t.type===void 0&&GC(p,l.stackParser);const g=XC(a,i.captureContext);i.mechanism&&yr(p,i.mechanism);const y=r?r.getEventProcessors():[],b=U1().getScopeData();if(c){const R=c.getScopeData();Ob(b,R)}if(g){const R=g.getScopeData();Ob(b,R)}const S=[...i.attachments||[],...b.attachments];S.length&&(i.attachments=S),IC(p,b);const A=[...y,...b.eventProcessors];return Kh(A,p,i).then(R=>(R&&VC(R),typeof u=="number"&&u>0?YC(R,u,h):R))}function $C(l,t){const{environment:i,release:a,dist:r,maxValueLength:c=250}=t;l.environment=l.environment||i||Yh,!l.release&&a&&(l.release=a),!l.dist&&r&&(l.dist=r);const u=l.request;u?.url&&(u.url=Xc(u.url,c))}function GC(l,t){const i=FC(t);l.exception?.values?.forEach(a=>{a.stacktrace?.frames?.forEach(r=>{r.filename&&(r.debug_id=i[r.filename])})})}function VC(l){const t={};if(l.exception?.values?.forEach(a=>{a.stacktrace?.frames?.forEach(r=>{r.debug_id&&(r.abs_path?t[r.abs_path]=r.debug_id:r.filename&&(t[r.filename]=r.debug_id),delete r.debug_id)})}),Object.keys(t).length===0)return;l.debug_meta=l.debug_meta||{},l.debug_meta.images=l.debug_meta.images||[];const i=l.debug_meta.images;Object.entries(t).forEach(([a,r])=>{i.push({type:"sourcemap",code_file:a,debug_id:r})})}function qC(l,t){t.length>0&&(l.sdk=l.sdk||{},l.sdk.integrations=[...l.sdk.integrations||[],...t])}function YC(l,t,i){if(!l)return null;const a={...l,...l.breadcrumbs&&{breadcrumbs:l.breadcrumbs.map(r=>({...r,...r.data&&{data:Ji(r.data,t,i)}}))},...l.user&&{user:Ji(l.user,t,i)},...l.contexts&&{contexts:Ji(l.contexts,t,i)},...l.extra&&{extra:Ji(l.extra,t,i)}};return l.contexts?.trace&&a.contexts&&(a.contexts.trace=l.contexts.trace,l.contexts.trace.data&&(a.contexts.trace.data=Ji(l.contexts.trace.data,t,i))),l.spans&&(a.spans=l.spans.map(r=>({...r,...r.data&&{data:Ji(r.data,t,i)}}))),l.contexts?.flags&&a.contexts&&(a.contexts.flags=Ji(l.contexts.flags,3,i)),a}function XC(l,t){if(!t)return l;const i=l?l.clone():new Ci;return i.update(t),i}function WC(l){if(l)return QC(l)?{captureContext:l}:ZC(l)?{captureContext:l}:l}function QC(l){return l instanceof Ci||typeof l=="function"}const KC=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function ZC(l){return Object.keys(l).some(t=>KC.includes(t))}function Nb(l,t){return ks().captureException(l,WC(t))}function Lb(l,t){return ks().captureEvent(l,t)}function Ib(l){const t=jo(),i=ks(),{userAgent:a}=Kt.navigator||{},r=x1({user:i.getUser()||t.getUser(),...a&&{userAgent:a},...l}),c=t.getSession();return c?.status==="ok"&&vr(c,{status:"exited"}),Pb(),t.setSession(r),r}function Pb(){const l=jo(),i=ks().getSession()||l.getSession();i&&R1(i),Ub(),l.setSession()}function Ub(){const l=jo(),t=ln(),i=l.getSession();i&&t&&t.captureSession(i)}function zb(l=!1){if(l){Pb();return}Ub()}const JC="7";function tx(l){const t=l.protocol?`${l.protocol}:`:"",i=l.port?`:${l.port}`:"";return`${t}//${l.host}${i}${l.path?`/${l.path}`:""}/api/`}function ex(l){return`${tx(l)}${l.projectId}/envelope/`}function nx(l,t){const i={sentry_version:JC};return l.publicKey&&(i.sentry_key=l.publicKey),t&&(i.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(i).toString()}function ix(l,t,i){return t||`${ex(l)}?${nx(l,i)}`}const Hb=[];function sx(l){const t={};return l.forEach(i=>{const{name:a}=i,r=t[a];r&&!r.isDefaultInstance&&i.isDefaultInstance||(t[a]=i)}),Object.values(t)}function ax(l){const t=l.defaultIntegrations||[],i=l.integrations;t.forEach(r=>{r.isDefaultInstance=!0});let a;if(Array.isArray(i))a=[...t,...i];else if(typeof i=="function"){const r=i(t);a=Array.isArray(r)?r:[r]}else a=t;return sx(a)}function rx(l,t){const i={};return t.forEach(a=>{a&&Fb(l,a,i)}),i}function Bb(l,t){for(const i of t)i?.afterAllSetup&&i.afterAllSetup(l)}function Fb(l,t,i){if(i[t.name]){gt&&Tt.log(`Integration skipped because it was already installed: ${t.name}`);return}if(i[t.name]=t,Hb.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),Hb.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(l),typeof t.preprocessEvent=="function"){const a=t.preprocessEvent.bind(t);l.on("preprocessEvent",(r,c)=>a(r,c,l))}if(typeof t.processEvent=="function"){const a=t.processEvent.bind(t),r=Object.assign((c,u)=>a(c,u,l),{id:t.name});l.addEventProcessor(r)}gt&&Tt.log(`Integration installed: ${t.name}`)}function DI(l){return l}function ox(l,t,i){const a=[{type:"client_report"},{timestamp:Bo(),discarded_events:l}];return $o(t?{dsn:t}:{},[a])}function jb(l){const t=[];l.message&&t.push(l.message);try{const i=l.exception.values[l.exception.values.length-1];i?.value&&(t.push(i.value),i.type&&t.push(`${i.type}: ${i.value}`))}catch{}return t}function lx(l){const{trace_id:t,parent_span_id:i,span_id:a,status:r,origin:c,data:u,op:h}=l.contexts?.trace??{};return{data:u??{},description:l.transaction,op:h,parent_span_id:i,span_id:a??"",start_timestamp:l.start_timestamp??0,status:r,timestamp:l.timestamp,trace_id:t??"",origin:c,profile_id:u?.[hb],exclusive_time:u?.[fb],measurements:l.measurements,is_segment:!0}}function cx(l){return{type:"transaction",timestamp:l.timestamp,start_timestamp:l.start_timestamp,transaction:l.description,contexts:{trace:{trace_id:l.trace_id,span_id:l.span_id,parent_span_id:l.parent_span_id,op:l.op,status:l.status,origin:l.origin,data:{...l.data,...l.profile_id&&{[hb]:l.profile_id},...l.exclusive_time&&{[fb]:l.exclusive_time}}}},measurements:l.measurements}}const $b="Not capturing exception because it's already been captured.",Gb="Discarded session because of missing or non-string release",Vb=Symbol.for("SentryInternalError"),qb=Symbol.for("SentryDoNotSendEventError");function nu(l){return{message:l,[Vb]:!0}}function Zh(l){return{message:l,[qb]:!0}}function Yb(l){return!!l&&typeof l=="object"&&Vb in l}function Xb(l){return!!l&&typeof l=="object"&&qb in l}class ux{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=rC(t.dsn):gt&&Tt.warn("No DSN provided, client will not send events."),this._dsn){const i=ix(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:i})}}captureException(t,i,a){const r=fi();if(sb(t))return gt&&Tt.log($b),r;const c={event_id:r,...i};return this._process(this.eventFromException(t,c).then(u=>this._captureEvent(u,c,a))),c.event_id}captureMessage(t,i,a,r){const c={event_id:fi(),...a},u=zh(t)?t:String(t),h=Hh(t)?this.eventFromMessage(u,i,c):this.eventFromException(t,c);return this._process(h.then(p=>this._captureEvent(p,c,r))),c.event_id}captureEvent(t,i,a){const r=fi();if(i?.originalException&&sb(i.originalException))return gt&&Tt.log($b),r;const c={event_id:r,...i},u=t.sdkProcessingMetadata||{},h=u.capturedSpanScope,p=u.capturedSpanIsolationScope;return this._process(this._captureEvent(t,c,h||a,p)),c.event_id}captureSession(t){this.sendSession(t),vr(t,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const i=this._transport;return i?(this.emit("flush"),this._isClientDoneProcessing(t).then(a=>i.flush(t).then(r=>a&&r))):Sa(!0)}close(t){return this.flush(t).then(i=>(this.getOptions().enabled=!1,this.emit("close"),i))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){const i=this._integrations[t.name];Fb(this,t,this._integrations),i||Bb(this,[t])}sendEvent(t,i={}){this.emit("beforeSendEvent",t,i);let a=LC(t,this._dsn,this._options._metadata,this._options.tunnel);for(const c of i.attachments||[])a=TC(a,xC(c));const r=this.sendEnvelope(a);r&&r.then(c=>this.emit("afterSendEvent",t,c),null)}sendSession(t){const{release:i,environment:a=Yh}=this._options;if("aggregates"in t){const c=t.attrs||{};if(!c.release&&!i){gt&&Tt.warn(Gb);return}c.release=c.release||i,c.environment=c.environment||a,t.attrs=c}else{if(!t.release&&!i){gt&&Tt.warn(Gb);return}t.release=t.release||i,t.environment=t.environment||a}this.emit("beforeSendSession",t);const r=NC(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(r)}recordDroppedEvent(t,i,a=1){if(this._options.sendClientReports){const r=`${t}:${i}`;gt&&Tt.log(`Recording outcome: "${r}"${a>1?` (${a} times)`:""}`),this._outcomes[r]=(this._outcomes[r]||0)+a}}on(t,i){const a=this._hooks[t]=this._hooks[t]||[];return a.push(i),()=>{const r=a.indexOf(i);r>-1&&a.splice(r,1)}}emit(t,...i){const a=this._hooks[t];a&&a.forEach(r=>r(...i))}sendEnvelope(t){return this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport?this._transport.send(t).then(null,i=>(gt&&Tt.error("Error while sending envelope:",i),i)):(gt&&Tt.error("Transport disabled"),Sa({}))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=rx(this,t),Bb(this,t)}_updateSessionFromEvent(t,i){let a=i.level==="fatal",r=!1;const c=i.exception?.values;if(c){r=!0;for(const p of c)if(p.mechanism?.handled===!1){a=!0;break}}const u=t.status==="ok";(u&&t.errors===0||u&&a)&&(vr(t,{...a&&{status:"crashed"},errors:t.errors||Number(r||a)}),this.captureSession(t))}_isClientDoneProcessing(t){return new Ns(i=>{let a=0;const r=1,c=setInterval(()=>{this._numProcessing==0?(clearInterval(c),i(!0)):(a+=r,t&&a>=t&&(clearInterval(c),i(!1)))},r)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,i,a,r){const c=this.getOptions(),u=Object.keys(this._integrations);return!i.integrations&&u?.length&&(i.integrations=u),this.emit("preprocessEvent",t,i),t.type||r.setLastEventId(t.event_id||i.event_id),jC(c,t,i,a,this,r).then(h=>{if(h===null)return h;this.emit("postprocessEvent",h,i),h.contexts={trace:H1(a),...h.contexts};const p=yC(this,a);return h.sdkProcessingMetadata={dynamicSamplingContext:p,...h.sdkProcessingMetadata},h})}_captureEvent(t,i={},a=ks(),r=jo()){return gt&&Jh(t)&&Tt.log(`Captured error event \`${jb(t)[0]||"<unknown>"}\``),this._processEvent(t,i,a,r).then(c=>c.event_id,c=>{gt&&(Xb(c)?Tt.log(c.message):Yb(c)?Tt.warn(c.message):Tt.warn(c))})}_processEvent(t,i,a,r){const c=this.getOptions(),{sampleRate:u}=c,h=Wb(t),p=Jh(t),m=t.type||"error",g=`before send for type \`${m}\``,y=typeof u>"u"?void 0:oC(u);if(p&&typeof y=="number"&&Math.random()>y)return this.recordDroppedEvent("sample_rate","error"),Zc(Zh(`Discarding event because it's not included in the random sample (sampling rate = ${u})`));const b=m==="replay_event"?"replay":m;return this._prepareEvent(t,i,a,r).then(S=>{if(S===null)throw this.recordDroppedEvent("event_processor",b),Zh("An event processor returned `null`, will not send event.");if(i.data&&i.data.__sentry__===!0)return S;const _=hx(this,c,S,i);return dx(_,g)}).then(S=>{if(S===null){if(this.recordDroppedEvent("before_send",b),h){const C=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",C)}throw Zh(`${g} returned \`null\`, will not send event.`)}const A=a.getSession()||r.getSession();if(p&&A&&this._updateSessionFromEvent(A,S),h){const R=S.sdkProcessingMetadata?.spanCountBeforeProcessing||0,C=S.spans?S.spans.length:0,N=R-C;N>0&&this.recordDroppedEvent("before_send","span",N)}const _=S.transaction_info;if(h&&_&&S.transaction!==t.transaction){const R="custom";S.transaction_info={..._,source:R}}return this.sendEvent(S,i),S}).then(null,S=>{throw Xb(S)||Yb(S)?S:(this.captureException(S,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:S}),nu(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
8
- Reason: ${S}`))})}_process(t){this._numProcessing++,t.then(i=>(this._numProcessing--,i),i=>(this._numProcessing--,i))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map(([i,a])=>{const[r,c]=i.split(":");return{reason:r,category:c,quantity:a}})}_flushOutcomes(){gt&&Tt.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){gt&&Tt.log("No outcomes to send");return}if(!this._dsn){gt&&Tt.log("No dsn provided, will not send outcomes");return}gt&&Tt.log("Sending outcomes:",t);const i=ox(t,this._options.tunnel&&Kc(this._dsn));this.sendEnvelope(i)}}function dx(l,t){const i=`${t} must return \`null\` or a valid event.`;if(Yc(l))return l.then(a=>{if(!zo(a)&&a!==null)throw nu(i);return a},a=>{throw nu(`${t} rejected with ${a}`)});if(!zo(l)&&l!==null)throw nu(i);return l}function hx(l,t,i,a){const{beforeSend:r,beforeSendTransaction:c,beforeSendSpan:u,ignoreSpans:h}=t;let p=i;if(Jh(p)&&r)return r(p,a);if(Wb(p)){if(u||h){const m=lx(p);if(h?.length&&Rb(m,h))return null;if(u){const g=u(m);g?p=Fo(i,cx(g)):Ab()}if(p.spans){const g=[],y=p.spans;for(const S of y){if(h?.length&&Rb(S,h)){MC(y,S);continue}if(u){const A=u(S);A?g.push(A):(Ab(),g.push(S))}else g.push(S)}const b=p.spans.length-g.length;b&&l.recordDroppedEvent("before_send","span",b),p.spans=g}}if(c){if(p.spans){const m=p.spans.length;p.sdkProcessingMetadata={...i.sdkProcessingMetadata,spanCountBeforeProcessing:m}}return c(p,a)}}return p}function Jh(l){return l.type===void 0}function Wb(l){return l.type==="transaction"}function fx(l){return[{type:"log",item_count:l.length,content_type:"application/vnd.sentry.items.log+json"},{items:l}]}function px(l,t,i,a){const r={};return t?.sdk&&(r.sdk={name:t.sdk.name,version:t.sdk.version}),i&&a&&(r.dsn=Kc(a)),$o(r,[fx(l)])}function tf(l,t){const i=mx(l)??[];if(i.length===0)return;const a=l.getOptions(),r=px(i,a._metadata,a.tunnel,l.getDsn());Qb().set(l,[]),l.emit("flushLogs"),l.sendEnvelope(r)}function mx(l){return Qb().get(l)}function Qb(){return Po("clientToLogBufferMap",()=>new WeakMap)}function gx(l,t){t.debug===!0&&(gt?Tt.enable():pr(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),ks().update(t.initialScope);const a=new l(t);return yx(a),a.init(),a}function yx(l){ks().setClient(l)}const Kb=Symbol.for("SentryBufferFullError");function bx(l){const t=[];function i(){return l===void 0||t.length<l}function a(u){return t.splice(t.indexOf(u),1)[0]||Promise.resolve(void 0)}function r(u){if(!i())return Zc(Kb);const h=u();return t.indexOf(h)===-1&&t.push(h),h.then(()=>a(h)).then(null,()=>a(h).then(null,()=>{})),h}function c(u){return new Ns((h,p)=>{let m=t.length;if(!m)return h(!0);const g=setTimeout(()=>{u&&u>0&&h(!1)},u);t.forEach(y=>{Sa(y).then(()=>{--m||(clearTimeout(g),h(!0))},p)})})}return{$:t,add:r,drain:c}}const vx=60*1e3;function Sx(l,t=Date.now()){const i=parseInt(`${l}`,10);if(!isNaN(i))return i*1e3;const a=Date.parse(`${l}`);return isNaN(a)?vx:a-t}function Ex(l,t){return l[t]||l.all||0}function Ax(l,t,i=Date.now()){return Ex(l,t)>i}function _x(l,{statusCode:t,headers:i},a=Date.now()){const r={...l},c=i?.["x-sentry-rate-limits"],u=i?.["retry-after"];if(c)for(const h of c.trim().split(",")){const[p,m,,,g]=h.split(":",5),y=parseInt(p,10),b=(isNaN(y)?60:y)*1e3;if(!m)r.all=a+b;else for(const S of m.split(";"))S==="metric_bucket"?(!g||g.split(";").includes("custom"))&&(r[S]=a+b):r[S]=a+b}else u?r.all=a+Sx(u,a):t===429&&(r.all=a+60*1e3);return r}const Tx=64;function wx(l,t,i=bx(l.bufferSize||Tx)){let a={};const r=u=>i.drain(u);function c(u){const h=[];if(wb(u,(y,b)=>{const S=Cb(b);Ax(a,S)?l.recordDroppedEvent("ratelimit_backoff",S):h.push(y)}),h.length===0)return Sa({});const p=$o(u[0],h),m=y=>{wb(p,(b,S)=>{l.recordDroppedEvent(y,Cb(S))})},g=()=>t({body:wC(p)}).then(y=>(y.statusCode!==void 0&&(y.statusCode<200||y.statusCode>=300)&&gt&&Tt.warn(`Sentry responded with status code ${y.statusCode} to sent event.`),a=_x(a,y),y),y=>{throw m("network_error"),gt&&Tt.error("Encountered error running transport request:",y),y});return i.add(g).then(y=>y,y=>{if(y===Kb)return gt&&Tt.error("Skipped sending event because buffer is full."),m("queue_overflow"),Sa({});throw y})}return{send:c,flush:r}}function ef(l){if(!l)return{};const t=l.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const i=t[6]||"",a=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:i,hash:a,relative:t[5]+i+a}}function Cx(l){"aggregates"in l?l.attrs?.ip_address===void 0&&(l.attrs={...l.attrs,ip_address:"{{auto}}"}):l.ipAddress===void 0&&(l.ipAddress="{{auto}}")}function xx(l,t,i=[t],a="npm"){const r=l._metadata||{};r.sdk||(r.sdk={name:`sentry.javascript.${t}`,packages:i.map(c=>({name:`${a}:@sentry/${c}`,version:Ki})),version:Ki}),l._metadata=r}const Rx=100;function Ea(l,t){const i=ln(),a=jo();if(!i)return;const{beforeBreadcrumb:r=null,maxBreadcrumbs:c=Rx}=i.getOptions();if(c<=0)return;const h={timestamp:Bo(),...l},p=r?pr(()=>r(h,t)):h;p!==null&&(i.emit&&i.emit("beforeAddBreadcrumb",p,t),a.addBreadcrumb(p,c))}let Zb;const Dx="FunctionToString",Jb=new WeakMap,Mx=()=>({name:Dx,setupOnce(){Zb=Function.prototype.toString;try{Function.prototype.toString=function(...l){const t=jh(this),i=Jb.has(ln())&&t!==void 0?t:this;return Zb.apply(i,l)}}catch{}},setup(l){Jb.set(l,!0)}}),Ox=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/],kx="EventFilters",Nx=(l={})=>{let t;return{name:kx,setup(i){const a=i.getOptions();t=tv(l,a)},processEvent(i,a,r){if(!t){const c=r.getOptions();t=tv(l,c)}return Ix(i,t)?null:i}}},Lx=(l={})=>({...Nx(l),name:"InboundFilters"});function tv(l={},t={}){return{allowUrls:[...l.allowUrls||[],...t.allowUrls||[]],denyUrls:[...l.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...l.ignoreErrors||[],...t.ignoreErrors||[],...l.disableErrorDefaults?[]:Ox],ignoreTransactions:[...l.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function Ix(l,t){if(l.type){if(l.type==="transaction"&&Ux(l,t.ignoreTransactions))return gt&&Tt.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
9
- Event: ${va(l)}`),!0}else{if(Px(l,t.ignoreErrors))return gt&&Tt.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
10
- Event: ${va(l)}`),!0;if(Fx(l))return gt&&Tt.warn(`Event dropped due to not having an error message, error type or stacktrace.
11
- Event: ${va(l)}`),!0;if(zx(l,t.denyUrls))return gt&&Tt.warn(`Event dropped due to being matched by \`denyUrls\` option.
7
+ `),typeof h=="string"||h instanceof Uint8Array)r(h);else{let p;try{p=JSON.stringify(h)}catch{p=JSON.stringify(Ji(h))}r(p)}}return typeof a=="string"?a:wx(a)}function wx(l){const t=l.reduce((r,c)=>r+c.length,0),i=new Uint8Array(t);let a=0;for(const r of l)i.set(r,a),a+=r.length;return i}function xx(l){const t=typeof l.data=="string"?Qh(l.data):l.data;return[{type:"attachment",length:t.length,filename:l.filename,content_type:l.contentType,attachment_type:l.attachmentType},t]}const Cx={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",raw_security:"security",log:"log_item"};function wb(l){return Cx[l]}function xb(l){if(!l?.sdk)return;const{name:t,version:i}=l.sdk;return{name:t,version:i}}function Rx(l,t,i,a){const r=l.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:l.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!i&&a&&{dsn:Kc(a)},...r&&{trace:r}}}function Cb(l,t){if(!t?.length||!l.description)return!1;for(const i of t){if(Mx(i)){if(Wc(l.description,i))return!0;continue}if(!i.name&&!i.op)continue;const a=i.name?Wc(l.description,i.name):!0,r=i.op?l.op&&Wc(l.op,i.op):!0;if(a&&r)return!0}return!1}function Dx(l,t){const i=t.parent_span_id,a=t.span_id;if(i)for(const r of l)r.parent_span_id===a&&(r.parent_span_id=i)}function Mx(l){return typeof l=="string"||l instanceof RegExp}function Ox(l,t){if(!t)return l;const i=l.sdk||{};return l.sdk={...i,name:i.name||t.name,version:i.version||t.version,integrations:[...l.sdk?.integrations||[],...t.integrations||[]],packages:[...l.sdk?.packages||[],...t.packages||[]],settings:l.sdk?.settings||t.settings?{...l.sdk?.settings,...t.settings}:void 0},l}function kx(l,t,i,a){const r=xb(i),c={sent_at:new Date().toISOString(),...r&&{sdk:r},...!!a&&t&&{dsn:Kc(t)}},u="aggregates"in l?[{type:"sessions"},l]:[{type:"session"},l.toJSON()];return $o(c,[u])}function Nx(l,t,i,a){const r=xb(i),c=l.type&&l.type!=="replay_event"?l.type:"event";Ox(l,i?.sdk);const u=Rx(l,r,a,t);return delete l.sdkProcessingMetadata,$o(u,[[{type:c},l]])}const Kh=0,Rb=1,Db=2;function Sa(l){return new Ns(t=>{t(l)})}function Zc(l){return new Ns((t,i)=>{i(l)})}class Ns{constructor(t){this._state=Kh,this._handlers=[],this._runExecutor(t)}then(t,i){return new Ns((a,r)=>{this._handlers.push([!1,c=>{if(!t)a(c);else try{a(t(c))}catch(u){r(u)}},c=>{if(!i)r(c);else try{a(i(c))}catch(u){r(u)}}]),this._executeHandlers()})}catch(t){return this.then(i=>i,t)}finally(t){return new Ns((i,a)=>{let r,c;return this.then(u=>{c=!1,r=u,t&&t()},u=>{c=!0,r=u,t&&t()}).then(()=>{if(c){a(r);return}i(r)})})}_executeHandlers(){if(this._state===Kh)return;const t=this._handlers.slice();this._handlers=[],t.forEach(i=>{i[0]||(this._state===Rb&&i[1](this._value),this._state===Db&&i[2](this._value),i[0]=!0)})}_runExecutor(t){const i=(c,u)=>{if(this._state===Kh){if(Xc(u)){u.then(a,r);return}this._state=c,this._value=u,this._executeHandlers()}},a=c=>{i(Rb,c)},r=c=>{i(Db,c)};try{t(a,r)}catch(c){r(c)}}}function Zh(l,t,i,a=0){return new Ns((r,c)=>{const u=l[a];if(t===null||typeof u!="function")r(t);else{const h=u({...t},i);gt&&u.id&&h===null&&Tt.log(`Event processor "${u.id}" dropped event`),Xc(h)?h.then(p=>Zh(l,p,i,a+1).then(r)).then(null,c):Zh(l,h,i,a+1).then(r).then(null,c)}})}function Lx(l,t){const{fingerprint:i,span:a,breadcrumbs:r,sdkProcessingMetadata:c}=t;Ix(l,t),a&&zx(l,a),Hx(l,i),Px(l,r),Ux(l,c)}function Mb(l,t){const{extra:i,tags:a,user:r,contexts:c,level:u,sdkProcessingMetadata:h,breadcrumbs:p,fingerprint:m,eventProcessors:g,attachments:y,propagationContext:b,transactionName:S,span:A}=t;Jc(l,"extra",i),Jc(l,"tags",a),Jc(l,"user",r),Jc(l,"contexts",c),l.sdkProcessingMetadata=Fo(l.sdkProcessingMetadata,h,2),u&&(l.level=u),S&&(l.transactionName=S),A&&(l.span=A),p.length&&(l.breadcrumbs=[...l.breadcrumbs,...p]),m.length&&(l.fingerprint=[...l.fingerprint,...m]),g.length&&(l.eventProcessors=[...l.eventProcessors,...g]),y.length&&(l.attachments=[...l.attachments,...y]),l.propagationContext={...l.propagationContext,...b}}function Jc(l,t,i){l[t]=Fo(l[t],i,1)}function Ix(l,t){const{extra:i,tags:a,user:r,contexts:c,level:u,transactionName:h}=t;Object.keys(i).length&&(l.extra={...i,...l.extra}),Object.keys(a).length&&(l.tags={...a,...l.tags}),Object.keys(r).length&&(l.user={...r,...l.user}),Object.keys(c).length&&(l.contexts={...c,...l.contexts}),u&&(l.level=u),h&&l.type!=="transaction"&&(l.transaction=h)}function Px(l,t){const i=[...l.breadcrumbs||[],...t];l.breadcrumbs=i.length?i:void 0}function Ux(l,t){l.sdkProcessingMetadata={...l.sdkProcessingMetadata,...t}}function zx(l,t){l.contexts={trace:ox(t),...l.contexts},l.sdkProcessingMetadata={dynamicSamplingContext:yx(t),...l.sdkProcessingMetadata};const i=Sb(t),a=Xh(i).description;a&&!l.transaction&&l.type==="transaction"&&(l.transaction=a)}function Hx(l,t){l.fingerprint=l.fingerprint?Array.isArray(l.fingerprint)?l.fingerprint:[l.fingerprint]:[],t&&(l.fingerprint=l.fingerprint.concat(t)),l.fingerprint.length||delete l.fingerprint}let tu,Ob,eu;function Bx(l){const t=Kt._sentryDebugIds;if(!t)return{};const i=Object.keys(t);return eu&&i.length===Ob||(Ob=i.length,eu=i.reduce((a,r)=>{tu||(tu={});const c=tu[r];if(c)a[c[0]]=c[1];else{const u=l(r);for(let h=u.length-1;h>=0;h--){const m=u[h]?.filename,g=t[r];if(m&&g){a[m]=g,tu[r]=[m,g];break}}}return a},{})),eu}function Fx(l,t,i,a,r,c){const{normalizeDepth:u=3,normalizeMaxBreadth:h=1e3}=l,p={...t,event_id:t.event_id||i.event_id||fi(),timestamp:t.timestamp||Bo()},m=i.integrations||l.integrations.map(R=>R.name);jx(p,l),Vx(p,m),r&&r.emit("applyFrameMetadata",t),t.type===void 0&&$x(p,l.stackParser);const g=Xx(a,i.captureContext);i.mechanism&&yr(p,i.mechanism);const y=r?r.getEventProcessors():[],b=P1().getScopeData();if(c){const R=c.getScopeData();Mb(b,R)}if(g){const R=g.getScopeData();Mb(b,R)}const S=[...i.attachments||[],...b.attachments];S.length&&(i.attachments=S),Lx(p,b);const A=[...y,...b.eventProcessors];return Zh(A,p,i).then(R=>(R&&Gx(R),typeof u=="number"&&u>0?qx(R,u,h):R))}function jx(l,t){const{environment:i,release:a,dist:r,maxValueLength:c=250}=t;l.environment=l.environment||i||Yh,!l.release&&a&&(l.release=a),!l.dist&&r&&(l.dist=r);const u=l.request;u?.url&&(u.url=Yc(u.url,c))}function $x(l,t){const i=Bx(t);l.exception?.values?.forEach(a=>{a.stacktrace?.frames?.forEach(r=>{r.filename&&(r.debug_id=i[r.filename])})})}function Gx(l){const t={};if(l.exception?.values?.forEach(a=>{a.stacktrace?.frames?.forEach(r=>{r.debug_id&&(r.abs_path?t[r.abs_path]=r.debug_id:r.filename&&(t[r.filename]=r.debug_id),delete r.debug_id)})}),Object.keys(t).length===0)return;l.debug_meta=l.debug_meta||{},l.debug_meta.images=l.debug_meta.images||[];const i=l.debug_meta.images;Object.entries(t).forEach(([a,r])=>{i.push({type:"sourcemap",code_file:a,debug_id:r})})}function Vx(l,t){t.length>0&&(l.sdk=l.sdk||{},l.sdk.integrations=[...l.sdk.integrations||[],...t])}function qx(l,t,i){if(!l)return null;const a={...l,...l.breadcrumbs&&{breadcrumbs:l.breadcrumbs.map(r=>({...r,...r.data&&{data:Ji(r.data,t,i)}}))},...l.user&&{user:Ji(l.user,t,i)},...l.contexts&&{contexts:Ji(l.contexts,t,i)},...l.extra&&{extra:Ji(l.extra,t,i)}};return l.contexts?.trace&&a.contexts&&(a.contexts.trace=l.contexts.trace,l.contexts.trace.data&&(a.contexts.trace.data=Ji(l.contexts.trace.data,t,i))),l.spans&&(a.spans=l.spans.map(r=>({...r,...r.data&&{data:Ji(r.data,t,i)}}))),l.contexts?.flags&&a.contexts&&(a.contexts.flags=Ji(l.contexts.flags,3,i)),a}function Xx(l,t){if(!t)return l;const i=l?l.clone():new xi;return i.update(t),i}function Yx(l){if(l)return Wx(l)?{captureContext:l}:Kx(l)?{captureContext:l}:l}function Wx(l){return l instanceof xi||typeof l=="function"}const Qx=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function Kx(l){return Object.keys(l).some(t=>Qx.includes(t))}function kb(l,t){return ks().captureException(l,Yx(t))}function Nb(l,t){return ks().captureEvent(l,t)}function Lb(l){const t=jo(),i=ks(),{userAgent:a}=Kt.navigator||{},r=x1({user:i.getUser()||t.getUser(),...a&&{userAgent:a},...l}),c=t.getSession();return c?.status==="ok"&&vr(c,{status:"exited"}),Ib(),t.setSession(r),r}function Ib(){const l=jo(),i=ks().getSession()||l.getSession();i&&C1(i),Pb(),l.setSession()}function Pb(){const l=jo(),t=ln(),i=l.getSession();i&&t&&t.captureSession(i)}function Ub(l=!1){if(l){Ib();return}Pb()}const Zx="7";function Jx(l){const t=l.protocol?`${l.protocol}:`:"",i=l.port?`:${l.port}`:"";return`${t}//${l.host}${i}${l.path?`/${l.path}`:""}/api/`}function tC(l){return`${Jx(l)}${l.projectId}/envelope/`}function eC(l,t){const i={sentry_version:Zx};return l.publicKey&&(i.sentry_key=l.publicKey),t&&(i.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(i).toString()}function nC(l,t,i){return t||`${tC(l)}?${eC(l,i)}`}const zb=[];function iC(l){const t={};return l.forEach(i=>{const{name:a}=i,r=t[a];r&&!r.isDefaultInstance&&i.isDefaultInstance||(t[a]=i)}),Object.values(t)}function sC(l){const t=l.defaultIntegrations||[],i=l.integrations;t.forEach(r=>{r.isDefaultInstance=!0});let a;if(Array.isArray(i))a=[...t,...i];else if(typeof i=="function"){const r=i(t);a=Array.isArray(r)?r:[r]}else a=t;return iC(a)}function aC(l,t){const i={};return t.forEach(a=>{a&&Bb(l,a,i)}),i}function Hb(l,t){for(const i of t)i?.afterAllSetup&&i.afterAllSetup(l)}function Bb(l,t,i){if(i[t.name]){gt&&Tt.log(`Integration skipped because it was already installed: ${t.name}`);return}if(i[t.name]=t,zb.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),zb.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(l),typeof t.preprocessEvent=="function"){const a=t.preprocessEvent.bind(t);l.on("preprocessEvent",(r,c)=>a(r,c,l))}if(typeof t.processEvent=="function"){const a=t.processEvent.bind(t),r=Object.assign((c,u)=>a(c,u,l),{id:t.name});l.addEventProcessor(r)}gt&&Tt.log(`Integration installed: ${t.name}`)}function RI(l){return l}function rC(l,t,i){const a=[{type:"client_report"},{timestamp:Bo(),discarded_events:l}];return $o(t?{dsn:t}:{},[a])}function Fb(l){const t=[];l.message&&t.push(l.message);try{const i=l.exception.values[l.exception.values.length-1];i?.value&&(t.push(i.value),i.type&&t.push(`${i.type}: ${i.value}`))}catch{}return t}function oC(l){const{trace_id:t,parent_span_id:i,span_id:a,status:r,origin:c,data:u,op:h}=l.contexts?.trace??{};return{data:u??{},description:l.transaction,op:h,parent_span_id:i,span_id:a??"",start_timestamp:l.start_timestamp??0,status:r,timestamp:l.timestamp,trace_id:t??"",origin:c,profile_id:u?.[db],exclusive_time:u?.[hb],measurements:l.measurements,is_segment:!0}}function lC(l){return{type:"transaction",timestamp:l.timestamp,start_timestamp:l.start_timestamp,transaction:l.description,contexts:{trace:{trace_id:l.trace_id,span_id:l.span_id,parent_span_id:l.parent_span_id,op:l.op,status:l.status,origin:l.origin,data:{...l.data,...l.profile_id&&{[db]:l.profile_id},...l.exclusive_time&&{[hb]:l.exclusive_time}}}},measurements:l.measurements}}const jb="Not capturing exception because it's already been captured.",$b="Discarded session because of missing or non-string release",Gb=Symbol.for("SentryInternalError"),Vb=Symbol.for("SentryDoNotSendEventError");function nu(l){return{message:l,[Gb]:!0}}function Jh(l){return{message:l,[Vb]:!0}}function qb(l){return!!l&&typeof l=="object"&&Gb in l}function Xb(l){return!!l&&typeof l=="object"&&Vb in l}class cC{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=ax(t.dsn):gt&&Tt.warn("No DSN provided, client will not send events."),this._dsn){const i=nC(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:i})}}captureException(t,i,a){const r=fi();if(ib(t))return gt&&Tt.log(jb),r;const c={event_id:r,...i};return this._process(this.eventFromException(t,c).then(u=>this._captureEvent(u,c,a))),c.event_id}captureMessage(t,i,a,r){const c={event_id:fi(),...a},u=Hh(t)?t:String(t),h=Bh(t)?this.eventFromMessage(u,i,c):this.eventFromException(t,c);return this._process(h.then(p=>this._captureEvent(p,c,r))),c.event_id}captureEvent(t,i,a){const r=fi();if(i?.originalException&&ib(i.originalException))return gt&&Tt.log(jb),r;const c={event_id:r,...i},u=t.sdkProcessingMetadata||{},h=u.capturedSpanScope,p=u.capturedSpanIsolationScope;return this._process(this._captureEvent(t,c,h||a,p)),c.event_id}captureSession(t){this.sendSession(t),vr(t,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const i=this._transport;return i?(this.emit("flush"),this._isClientDoneProcessing(t).then(a=>i.flush(t).then(r=>a&&r))):Sa(!0)}close(t){return this.flush(t).then(i=>(this.getOptions().enabled=!1,this.emit("close"),i))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){const i=this._integrations[t.name];Bb(this,t,this._integrations),i||Hb(this,[t])}sendEvent(t,i={}){this.emit("beforeSendEvent",t,i);let a=Nx(t,this._dsn,this._options._metadata,this._options.tunnel);for(const c of i.attachments||[])a=_x(a,xx(c));const r=this.sendEnvelope(a);r&&r.then(c=>this.emit("afterSendEvent",t,c),null)}sendSession(t){const{release:i,environment:a=Yh}=this._options;if("aggregates"in t){const c=t.attrs||{};if(!c.release&&!i){gt&&Tt.warn($b);return}c.release=c.release||i,c.environment=c.environment||a,t.attrs=c}else{if(!t.release&&!i){gt&&Tt.warn($b);return}t.release=t.release||i,t.environment=t.environment||a}this.emit("beforeSendSession",t);const r=kx(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(r)}recordDroppedEvent(t,i,a=1){if(this._options.sendClientReports){const r=`${t}:${i}`;gt&&Tt.log(`Recording outcome: "${r}"${a>1?` (${a} times)`:""}`),this._outcomes[r]=(this._outcomes[r]||0)+a}}on(t,i){const a=this._hooks[t]=this._hooks[t]||[];return a.push(i),()=>{const r=a.indexOf(i);r>-1&&a.splice(r,1)}}emit(t,...i){const a=this._hooks[t];a&&a.forEach(r=>r(...i))}sendEnvelope(t){return this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport?this._transport.send(t).then(null,i=>(gt&&Tt.error("Error while sending envelope:",i),i)):(gt&&Tt.error("Transport disabled"),Sa({}))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=aC(this,t),Hb(this,t)}_updateSessionFromEvent(t,i){let a=i.level==="fatal",r=!1;const c=i.exception?.values;if(c){r=!0;for(const p of c)if(p.mechanism?.handled===!1){a=!0;break}}const u=t.status==="ok";(u&&t.errors===0||u&&a)&&(vr(t,{...a&&{status:"crashed"},errors:t.errors||Number(r||a)}),this.captureSession(t))}_isClientDoneProcessing(t){return new Ns(i=>{let a=0;const r=1,c=setInterval(()=>{this._numProcessing==0?(clearInterval(c),i(!0)):(a+=r,t&&a>=t&&(clearInterval(c),i(!1)))},r)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,i,a,r){const c=this.getOptions(),u=Object.keys(this._integrations);return!i.integrations&&u?.length&&(i.integrations=u),this.emit("preprocessEvent",t,i),t.type||r.setLastEventId(t.event_id||i.event_id),Fx(c,t,i,a,this,r).then(h=>{if(h===null)return h;this.emit("postprocessEvent",h,i),h.contexts={trace:z1(a),...h.contexts};const p=gx(this,a);return h.sdkProcessingMetadata={dynamicSamplingContext:p,...h.sdkProcessingMetadata},h})}_captureEvent(t,i={},a=ks(),r=jo()){return gt&&tf(t)&&Tt.log(`Captured error event \`${Fb(t)[0]||"<unknown>"}\``),this._processEvent(t,i,a,r).then(c=>c.event_id,c=>{gt&&(Xb(c)?Tt.log(c.message):qb(c)?Tt.warn(c.message):Tt.warn(c))})}_processEvent(t,i,a,r){const c=this.getOptions(),{sampleRate:u}=c,h=Yb(t),p=tf(t),m=t.type||"error",g=`before send for type \`${m}\``,y=typeof u>"u"?void 0:rx(u);if(p&&typeof y=="number"&&Math.random()>y)return this.recordDroppedEvent("sample_rate","error"),Zc(Jh(`Discarding event because it's not included in the random sample (sampling rate = ${u})`));const b=m==="replay_event"?"replay":m;return this._prepareEvent(t,i,a,r).then(S=>{if(S===null)throw this.recordDroppedEvent("event_processor",b),Jh("An event processor returned `null`, will not send event.");if(i.data&&i.data.__sentry__===!0)return S;const _=dC(this,c,S,i);return uC(_,g)}).then(S=>{if(S===null){if(this.recordDroppedEvent("before_send",b),h){const x=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",x)}throw Jh(`${g} returned \`null\`, will not send event.`)}const A=a.getSession()||r.getSession();if(p&&A&&this._updateSessionFromEvent(A,S),h){const R=S.sdkProcessingMetadata?.spanCountBeforeProcessing||0,x=S.spans?S.spans.length:0,L=R-x;L>0&&this.recordDroppedEvent("before_send","span",L)}const _=S.transaction_info;if(h&&_&&S.transaction!==t.transaction){const R="custom";S.transaction_info={..._,source:R}}return this.sendEvent(S,i),S}).then(null,S=>{throw Xb(S)||qb(S)?S:(this.captureException(S,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:S}),nu(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
8
+ Reason: ${S}`))})}_process(t){this._numProcessing++,t.then(i=>(this._numProcessing--,i),i=>(this._numProcessing--,i))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map(([i,a])=>{const[r,c]=i.split(":");return{reason:r,category:c,quantity:a}})}_flushOutcomes(){gt&&Tt.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){gt&&Tt.log("No outcomes to send");return}if(!this._dsn){gt&&Tt.log("No dsn provided, will not send outcomes");return}gt&&Tt.log("Sending outcomes:",t);const i=rC(t,this._options.tunnel&&Kc(this._dsn));this.sendEnvelope(i)}}function uC(l,t){const i=`${t} must return \`null\` or a valid event.`;if(Xc(l))return l.then(a=>{if(!zo(a)&&a!==null)throw nu(i);return a},a=>{throw nu(`${t} rejected with ${a}`)});if(!zo(l)&&l!==null)throw nu(i);return l}function dC(l,t,i,a){const{beforeSend:r,beforeSendTransaction:c,beforeSendSpan:u,ignoreSpans:h}=t;let p=i;if(tf(p)&&r)return r(p,a);if(Yb(p)){if(u||h){const m=oC(p);if(h?.length&&Cb(m,h))return null;if(u){const g=u(m);g?p=Fo(i,lC(g)):Eb()}if(p.spans){const g=[],y=p.spans;for(const S of y){if(h?.length&&Cb(S,h)){Dx(y,S);continue}if(u){const A=u(S);A?g.push(A):(Eb(),g.push(S))}else g.push(S)}const b=p.spans.length-g.length;b&&l.recordDroppedEvent("before_send","span",b),p.spans=g}}if(c){if(p.spans){const m=p.spans.length;p.sdkProcessingMetadata={...i.sdkProcessingMetadata,spanCountBeforeProcessing:m}}return c(p,a)}}return p}function tf(l){return l.type===void 0}function Yb(l){return l.type==="transaction"}function hC(l){return[{type:"log",item_count:l.length,content_type:"application/vnd.sentry.items.log+json"},{items:l}]}function fC(l,t,i,a){const r={};return t?.sdk&&(r.sdk={name:t.sdk.name,version:t.sdk.version}),i&&a&&(r.dsn=Kc(a)),$o(r,[hC(l)])}function ef(l,t){const i=pC(l)??[];if(i.length===0)return;const a=l.getOptions(),r=fC(i,a._metadata,a.tunnel,l.getDsn());Wb().set(l,[]),l.emit("flushLogs"),l.sendEnvelope(r)}function pC(l){return Wb().get(l)}function Wb(){return Po("clientToLogBufferMap",()=>new WeakMap)}function mC(l,t){t.debug===!0&&(gt?Tt.enable():pr(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),ks().update(t.initialScope);const a=new l(t);return gC(a),a.init(),a}function gC(l){ks().setClient(l)}const Qb=Symbol.for("SentryBufferFullError");function yC(l){const t=[];function i(){return l===void 0||t.length<l}function a(u){return t.splice(t.indexOf(u),1)[0]||Promise.resolve(void 0)}function r(u){if(!i())return Zc(Qb);const h=u();return t.indexOf(h)===-1&&t.push(h),h.then(()=>a(h)).then(null,()=>a(h).then(null,()=>{})),h}function c(u){return new Ns((h,p)=>{let m=t.length;if(!m)return h(!0);const g=setTimeout(()=>{u&&u>0&&h(!1)},u);t.forEach(y=>{Sa(y).then(()=>{--m||(clearTimeout(g),h(!0))},p)})})}return{$:t,add:r,drain:c}}const bC=60*1e3;function vC(l,t=Date.now()){const i=parseInt(`${l}`,10);if(!isNaN(i))return i*1e3;const a=Date.parse(`${l}`);return isNaN(a)?bC:a-t}function SC(l,t){return l[t]||l.all||0}function EC(l,t,i=Date.now()){return SC(l,t)>i}function AC(l,{statusCode:t,headers:i},a=Date.now()){const r={...l},c=i?.["x-sentry-rate-limits"],u=i?.["retry-after"];if(c)for(const h of c.trim().split(",")){const[p,m,,,g]=h.split(":",5),y=parseInt(p,10),b=(isNaN(y)?60:y)*1e3;if(!m)r.all=a+b;else for(const S of m.split(";"))S==="metric_bucket"?(!g||g.split(";").includes("custom"))&&(r[S]=a+b):r[S]=a+b}else u?r.all=a+vC(u,a):t===429&&(r.all=a+60*1e3);return r}const _C=64;function TC(l,t,i=yC(l.bufferSize||_C)){let a={};const r=u=>i.drain(u);function c(u){const h=[];if(Tb(u,(y,b)=>{const S=wb(b);EC(a,S)?l.recordDroppedEvent("ratelimit_backoff",S):h.push(y)}),h.length===0)return Sa({});const p=$o(u[0],h),m=y=>{Tb(p,(b,S)=>{l.recordDroppedEvent(y,wb(S))})},g=()=>t({body:Tx(p)}).then(y=>(y.statusCode!==void 0&&(y.statusCode<200||y.statusCode>=300)&&gt&&Tt.warn(`Sentry responded with status code ${y.statusCode} to sent event.`),a=AC(a,y),y),y=>{throw m("network_error"),gt&&Tt.error("Encountered error running transport request:",y),y});return i.add(g).then(y=>y,y=>{if(y===Qb)return gt&&Tt.error("Skipped sending event because buffer is full."),m("queue_overflow"),Sa({});throw y})}return{send:c,flush:r}}function nf(l){if(!l)return{};const t=l.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const i=t[6]||"",a=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:i,hash:a,relative:t[5]+i+a}}function wC(l){"aggregates"in l?l.attrs?.ip_address===void 0&&(l.attrs={...l.attrs,ip_address:"{{auto}}"}):l.ipAddress===void 0&&(l.ipAddress="{{auto}}")}function xC(l,t,i=[t],a="npm"){const r=l._metadata||{};r.sdk||(r.sdk={name:`sentry.javascript.${t}`,packages:i.map(c=>({name:`${a}:@sentry/${c}`,version:Ki})),version:Ki}),l._metadata=r}const CC=100;function Ea(l,t){const i=ln(),a=jo();if(!i)return;const{beforeBreadcrumb:r=null,maxBreadcrumbs:c=CC}=i.getOptions();if(c<=0)return;const h={timestamp:Bo(),...l},p=r?pr(()=>r(h,t)):h;p!==null&&(i.emit&&i.emit("beforeAddBreadcrumb",p,t),a.addBreadcrumb(p,c))}let Kb;const RC="FunctionToString",Zb=new WeakMap,DC=()=>({name:RC,setupOnce(){Kb=Function.prototype.toString;try{Function.prototype.toString=function(...l){const t=$h(this),i=Zb.has(ln())&&t!==void 0?t:this;return Kb.apply(i,l)}}catch{}},setup(l){Zb.set(l,!0)}}),MC=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/],OC="EventFilters",kC=(l={})=>{let t;return{name:OC,setup(i){const a=i.getOptions();t=Jb(l,a)},processEvent(i,a,r){if(!t){const c=r.getOptions();t=Jb(l,c)}return LC(i,t)?null:i}}},NC=(l={})=>({...kC(l),name:"InboundFilters"});function Jb(l={},t={}){return{allowUrls:[...l.allowUrls||[],...t.allowUrls||[]],denyUrls:[...l.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...l.ignoreErrors||[],...t.ignoreErrors||[],...l.disableErrorDefaults?[]:MC],ignoreTransactions:[...l.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function LC(l,t){if(l.type){if(l.type==="transaction"&&PC(l,t.ignoreTransactions))return gt&&Tt.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
9
+ Event: ${va(l)}`),!0}else{if(IC(l,t.ignoreErrors))return gt&&Tt.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
10
+ Event: ${va(l)}`),!0;if(BC(l))return gt&&Tt.warn(`Event dropped due to not having an error message, error type or stacktrace.
11
+ Event: ${va(l)}`),!0;if(UC(l,t.denyUrls))return gt&&Tt.warn(`Event dropped due to being matched by \`denyUrls\` option.
12
12
  Event: ${va(l)}.
13
- Url: ${iu(l)}`),!0;if(!Hx(l,t.allowUrls))return gt&&Tt.warn(`Event dropped due to not being matched by \`allowUrls\` option.
13
+ Url: ${iu(l)}`),!0;if(!zC(l,t.allowUrls))return gt&&Tt.warn(`Event dropped due to not being matched by \`allowUrls\` option.
14
14
  Event: ${va(l)}.
15
- Url: ${iu(l)}`),!0}return!1}function Px(l,t){return t?.length?jb(l).some(i=>Qc(i,t)):!1}function Ux(l,t){if(!t?.length)return!1;const i=l.transaction;return i?Qc(i,t):!1}function zx(l,t){if(!t?.length)return!1;const i=iu(l);return i?Qc(i,t):!1}function Hx(l,t){if(!t?.length)return!0;const i=iu(l);return i?Qc(i,t):!0}function Bx(l=[]){for(let t=l.length-1;t>=0;t--){const i=l[t];if(i&&i.filename!=="<anonymous>"&&i.filename!=="[native code]")return i.filename||null}return null}function iu(l){try{const i=[...l.exception?.values??[]].reverse().find(a=>a.mechanism?.parent_id===void 0&&a.stacktrace?.frames?.length)?.stacktrace?.frames;return i?Bx(i):null}catch{return gt&&Tt.error(`Cannot extract url for event ${va(l)}`),null}}function Fx(l){return l.exception?.values?.length?!l.message&&!l.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value):!1}function jx(l,t,i,a,r,c){if(!r.exception?.values||!c||!Os(c.originalException,Error))return;const u=r.exception.values.length>0?r.exception.values[r.exception.values.length-1]:void 0;u&&(r.exception.values=nf(l,t,a,c.originalException,i,r.exception.values,u,0))}function nf(l,t,i,a,r,c,u,h){if(c.length>=i+1)return c;let p=[...c];if(Os(a[r],Error)){ev(u,h);const m=l(t,a[r]),g=p.length;nv(m,r,g,h),p=nf(l,t,i,a[r],r,[m,...p],m,g)}return Array.isArray(a.errors)&&a.errors.forEach((m,g)=>{if(Os(m,Error)){ev(u,h);const y=l(t,m),b=p.length;nv(y,`errors[${g}]`,b,h),p=nf(l,t,i,m,r,[y,...p],y,b)}}),p}function ev(l,t){l.mechanism=l.mechanism||{type:"generic",handled:!0},l.mechanism={...l.mechanism,...l.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function nv(l,t,i,a){l.mechanism=l.mechanism||{type:"generic",handled:!0},l.mechanism={...l.mechanism,type:"chained",source:t,exception_id:i,parent_id:a}}function $x(l){const t="console";Gc(t,l),Vc(t,Gx)}function Gx(){"console"in Kt&&n1.forEach(function(l){l in Kt.console&&Zi(Kt.console,l,function(t){return Fc[l]=t,function(...i){mr("console",{args:i,level:l}),Fc[l]?.apply(Kt.console,i)}})})}function Vx(l){return l==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(l)?l:"log"}const qx="Dedupe",Yx=()=>{let l;return{name:qx,processEvent(t){if(t.type)return t;try{if(Xx(t,l))return gt&&Tt.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return l=t}}};function Xx(l,t){return t?!!(Wx(l,t)||Qx(l,t)):!1}function Wx(l,t){const i=l.message,a=t.message;return!(!i&&!a||i&&!a||!i&&a||i!==a||!sv(l,t)||!iv(l,t))}function Qx(l,t){const i=av(t),a=av(l);return!(!i||!a||i.type!==a.type||i.value!==a.value||!sv(l,t)||!iv(l,t))}function iv(l,t){let i=Vy(l),a=Vy(t);if(!i&&!a)return!0;if(i&&!a||!i&&a||(i=i,a=a,a.length!==i.length))return!1;for(let r=0;r<a.length;r++){const c=a[r],u=i[r];if(c.filename!==u.filename||c.lineno!==u.lineno||c.colno!==u.colno||c.function!==u.function)return!1}return!0}function sv(l,t){let i=l.fingerprint,a=t.fingerprint;if(!i&&!a)return!0;if(i&&!a||!i&&a)return!1;i=i,a=a;try{return i.join("")===a.join("")}catch{return!1}}function av(l){return l.exception?.values?.[0]}function rv(l){if(l!==void 0)return l>=400&&l<500?"warning":l>=500?"error":void 0}const sf=Kt;function Kx(){if(!("fetch"in sf))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function ov(l){return l&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(l.toString())}function Zx(){if(typeof EdgeRuntime=="string")return!0;if(!Kx())return!1;if(ov(sf.fetch))return!0;let l=!1;const t=sf.document;if(t&&typeof t.createElement=="function")try{const i=t.createElement("iframe");i.hidden=!0,t.head.appendChild(i),i.contentWindow?.fetch&&(l=ov(i.contentWindow.fetch)),t.head.removeChild(i)}catch(i){gt&&Tt.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",i)}return l}function Jx(l,t){const i="fetch";Gc(i,l),Vc(i,()=>tR(void 0,t))}function tR(l,t=!1){t&&!Zx()||Zi(Kt,"fetch",function(i){return function(...a){const r=new Error,{method:c,url:u}=eR(a),h={args:a,fetchData:{method:c,url:u},startTimestamp:br()*1e3,virtualError:r,headers:nR(a)};return mr("fetch",{...h}),i.apply(Kt,a).then(async p=>(mr("fetch",{...h,endTimestamp:br()*1e3,response:p}),p),p=>{if(mr("fetch",{...h,endTimestamp:br()*1e3,error:p}),Uh(p)&&p.stack===void 0&&(p.stack=r.stack,Ho(p,"framesToPop",1)),p instanceof TypeError&&(p.message==="Failed to fetch"||p.message==="Load failed"||p.message==="NetworkError when attempting to fetch resource."))try{const m=new URL(h.fetchData.url);p.message=`${p.message} (${m.host})`}catch{}throw p})}})}function af(l,t){return!!l&&typeof l=="object"&&!!l[t]}function lv(l){return typeof l=="string"?l:l?af(l,"url")?l.url:l.toString?l.toString():"":""}function eR(l){if(l.length===0)return{method:"GET",url:""};if(l.length===2){const[i,a]=l;return{url:lv(i),method:af(a,"method")?String(a.method).toUpperCase():"GET"}}const t=l[0];return{url:lv(t),method:af(t,"method")?String(t.method).toUpperCase():"GET"}}function nR(l){const[t,i]=l;try{if(typeof i=="object"&&i!==null&&"headers"in i&&i.headers)return new Headers(i.headers);if(v1(t))return new Headers(t.headers)}catch{}}function iR(){return"npm"}const Ee=Kt;let rf=0;function cv(){return rf>0}function sR(){rf++,setTimeout(()=>{rf--})}function Er(l,t={}){function i(r){return typeof r=="function"}if(!i(l))return l;try{const r=l.__sentry_wrapped__;if(r)return typeof r=="function"?r:l;if(jh(l))return l}catch{return l}const a=function(...r){try{const c=r.map(u=>Er(u,t));return l.apply(this,c)}catch(c){throw sR(),z1(u=>{u.addEventProcessor(h=>(t.mechanism&&($h(h,void 0),yr(h,t.mechanism)),h.extra={...h.extra,arguments:r},h)),Nb(c)}),c}};try{for(const r in l)Object.prototype.hasOwnProperty.call(l,r)&&(a[r]=l[r])}catch{}Jy(a,l),Ho(l,"__sentry_wrapped__",a);try{Object.getOwnPropertyDescriptor(a,"name").configurable&&Object.defineProperty(a,"name",{get(){return l.name}})}catch{}return a}function aR(){const l=Fh(),{referrer:t}=Ee.document||{},{userAgent:i}=Ee.navigator||{},a={...t&&{Referer:t},...i&&{"User-Agent":i}};return{url:l,headers:a}}function of(l,t){const i=cf(l,t),a={type:uR(t),value:dR(t)};return i.length&&(a.stacktrace={frames:i}),a.type===void 0&&a.value===""&&(a.value="Unrecoverable error caught"),a}function rR(l,t,i,a){const c=ln()?.getOptions().normalizeDepth,u=gR(t),h={__serialized__:Tb(t,c)};if(u)return{exception:{values:[of(l,u)]},extra:h};const p={exception:{values:[{type:qc(t)?t.constructor.name:a?"UnhandledRejection":"Error",value:pR(t,{isUnhandledRejection:a})}]},extra:h};if(i){const m=cf(l,i);m.length&&(p.exception.values[0].stacktrace={frames:m})}return p}function lf(l,t){return{exception:{values:[of(l,t)]}}}function cf(l,t){const i=t.stacktrace||t.stack||"",a=lR(t),r=cR(t);try{return l(i,a,r)}catch{}return[]}const oR=/Minified React error #\d+;/i;function lR(l){return l&&oR.test(l.message)?1:0}function cR(l){return typeof l.framesToPop=="number"?l.framesToPop:0}function uv(l){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?l instanceof WebAssembly.Exception:!1}function uR(l){const t=l?.name;return!t&&uv(l)?l.message&&Array.isArray(l.message)&&l.message.length==2?l.message[0]:"WebAssembly.Exception":t}function dR(l){const t=l?.message;return uv(l)?Array.isArray(l.message)&&l.message.length==2?l.message[1]:"wasm exception":t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function hR(l,t,i,a){const r=i?.syntheticException||void 0,c=uf(l,t,r,a);return yr(c),c.level="error",i?.event_id&&(c.event_id=i.event_id),Sa(c)}function fR(l,t,i="info",a,r){const c=a?.syntheticException||void 0,u=df(l,t,c,r);return u.level=i,a?.event_id&&(u.event_id=a.event_id),Sa(u)}function uf(l,t,i,a,r){let c;if(Xy(t)&&t.error)return lf(l,t.error);if(Wy(t)||m1(t)){const u=t;if("stack"in t)c=lf(l,t);else{const h=u.name||(Wy(u)?"DOMError":"DOMException"),p=u.message?`${h}: ${u.message}`:h;c=df(l,p,i,a),$h(c,p)}return"code"in u&&(c.tags={...c.tags,"DOMException.code":`${u.code}`}),c}return Uh(t)?lf(l,t):zo(t)||qc(t)?(c=rR(l,t,i,r),yr(c,{synthetic:!0}),c):(c=df(l,t,i,a),$h(c,`${t}`),yr(c,{synthetic:!0}),c)}function df(l,t,i,a){const r={};if(a&&i){const c=cf(l,i);c.length&&(r.exception={values:[{value:t,stacktrace:{frames:c}}]}),yr(r,{synthetic:!0})}if(zh(t)){const{__sentry_template_string__:c,__sentry_template_values__:u}=t;return r.logentry={message:c,params:u},r}return r.message=t,r}function pR(l,{isUnhandledRejection:t}){const i=_1(l),a=t?"promise rejection":"exception";return Xy(l)?`Event \`ErrorEvent\` captured as ${a} with message \`${l.message}\``:qc(l)?`Event \`${mR(l)}\` (type=${l.type}) captured as ${a}`:`Object captured as ${a} with keys: ${i}`}function mR(l){try{const t=Object.getPrototypeOf(l);return t?t.constructor.name:void 0}catch{}}function gR(l){for(const t in l)if(Object.prototype.hasOwnProperty.call(l,t)){const i=l[t];if(i instanceof Error)return i}}const yR=5e3;class bR extends ux{constructor(t){const i=vR(t),a=Ee.SENTRY_SDK_SOURCE||iR();xx(i,"browser",["browser"],a),i._metadata?.sdk&&(i._metadata.sdk.settings={infer_ip:i.sendDefaultPii?"auto":"never",...i._metadata.sdk.settings}),super(i);const{sendDefaultPii:r,sendClientReports:c,enableLogs:u}=this._options;Ee.document&&(c||u)&&Ee.document.addEventListener("visibilitychange",()=>{Ee.document.visibilityState==="hidden"&&(c&&this._flushOutcomes(),u&&tf(this))}),u&&(this.on("flush",()=>{tf(this)}),this.on("afterCaptureLog",()=>{this._logFlushIdleTimeout&&clearTimeout(this._logFlushIdleTimeout),this._logFlushIdleTimeout=setTimeout(()=>{tf(this)},yR)})),r&&this.on("beforeSendSession",Cx)}eventFromException(t,i){return hR(this._options.stackParser,t,i,this._options.attachStacktrace)}eventFromMessage(t,i="info",a){return fR(this._options.stackParser,t,i,a,this._options.attachStacktrace)}_prepareEvent(t,i,a,r){return t.platform=t.platform||"javascript",super._prepareEvent(t,i,a,r)}}function vR(l){return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:Ee.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...l}}const Ar=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Ls=globalThis,dv="10.8.0";function SR(l,t,i=Ls){const a=i.__SENTRY__=i.__SENTRY__||{},r=a[dv]=a[dv]||{};return r[l]||(r[l]=t())}const ER="Sentry Logger ",hv={};function AR(l){if(!("console"in Ls))return l();const t=Ls.console,i={},a=Object.keys(hv);a.forEach(r=>{const c=hv[r];i[r]=t[r],t[r]=c});try{return l()}finally{a.forEach(r=>{t[r]=i[r]})}}function _R(){ff().enabled=!0}function TR(){ff().enabled=!1}function fv(){return ff().enabled}function wR(...l){hf("log",...l)}function CR(...l){hf("warn",...l)}function xR(...l){hf("error",...l)}function hf(l,...t){Ar&&fv()&&AR(()=>{Ls.console[l](`${ER}[${l}]:`,...t)})}function ff(){return Ar?SR("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const Go={enable:_R,disable:TR,isEnabled:fv,log:wR,warn:CR,error:xR},pf="<anonymous>";function RR(l){try{return!l||typeof l!="function"?pf:l.name||pf}catch{return pf}}const su={},pv={};function mf(l,t){su[l]=su[l]||[],su[l].push(t)}function gf(l,t){if(!pv[l]){pv[l]=!0;try{t()}catch(i){Ar&&Go.error(`Error while instrumenting ${l}`,i)}}}function Vo(l,t){const i=l&&su[l];if(i)for(const a of i)try{a(t)}catch(r){Ar&&Go.error(`Error while triggering instrumentation handler.
15
+ Url: ${iu(l)}`),!0}return!1}function IC(l,t){return t?.length?Fb(l).some(i=>Qc(i,t)):!1}function PC(l,t){if(!t?.length)return!1;const i=l.transaction;return i?Qc(i,t):!1}function UC(l,t){if(!t?.length)return!1;const i=iu(l);return i?Qc(i,t):!1}function zC(l,t){if(!t?.length)return!0;const i=iu(l);return i?Qc(i,t):!0}function HC(l=[]){for(let t=l.length-1;t>=0;t--){const i=l[t];if(i&&i.filename!=="<anonymous>"&&i.filename!=="[native code]")return i.filename||null}return null}function iu(l){try{const i=[...l.exception?.values??[]].reverse().find(a=>a.mechanism?.parent_id===void 0&&a.stacktrace?.frames?.length)?.stacktrace?.frames;return i?HC(i):null}catch{return gt&&Tt.error(`Cannot extract url for event ${va(l)}`),null}}function BC(l){return l.exception?.values?.length?!l.message&&!l.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value):!1}function FC(l,t,i,a,r,c){if(!r.exception?.values||!c||!Os(c.originalException,Error))return;const u=r.exception.values.length>0?r.exception.values[r.exception.values.length-1]:void 0;u&&(r.exception.values=sf(l,t,a,c.originalException,i,r.exception.values,u,0))}function sf(l,t,i,a,r,c,u,h){if(c.length>=i+1)return c;let p=[...c];if(Os(a[r],Error)){tv(u,h);const m=l(t,a[r]),g=p.length;ev(m,r,g,h),p=sf(l,t,i,a[r],r,[m,...p],m,g)}return Array.isArray(a.errors)&&a.errors.forEach((m,g)=>{if(Os(m,Error)){tv(u,h);const y=l(t,m),b=p.length;ev(y,`errors[${g}]`,b,h),p=sf(l,t,i,m,r,[y,...p],y,b)}}),p}function tv(l,t){l.mechanism=l.mechanism||{type:"generic",handled:!0},l.mechanism={...l.mechanism,...l.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function ev(l,t,i,a){l.mechanism=l.mechanism||{type:"generic",handled:!0},l.mechanism={...l.mechanism,type:"chained",source:t,exception_id:i,parent_id:a}}function jC(l){const t="console";Gc(t,l),Vc(t,$C)}function $C(){"console"in Kt&&e1.forEach(function(l){l in Kt.console&&Zi(Kt.console,l,function(t){return Fc[l]=t,function(...i){mr("console",{args:i,level:l}),Fc[l]?.apply(Kt.console,i)}})})}function GC(l){return l==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(l)?l:"log"}const VC="Dedupe",qC=()=>{let l;return{name:VC,processEvent(t){if(t.type)return t;try{if(XC(t,l))return gt&&Tt.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return l=t}}};function XC(l,t){return t?!!(YC(l,t)||WC(l,t)):!1}function YC(l,t){const i=l.message,a=t.message;return!(!i&&!a||i&&!a||!i&&a||i!==a||!iv(l,t)||!nv(l,t))}function WC(l,t){const i=sv(t),a=sv(l);return!(!i||!a||i.type!==a.type||i.value!==a.value||!iv(l,t)||!nv(l,t))}function nv(l,t){let i=Gy(l),a=Gy(t);if(!i&&!a)return!0;if(i&&!a||!i&&a||(i=i,a=a,a.length!==i.length))return!1;for(let r=0;r<a.length;r++){const c=a[r],u=i[r];if(c.filename!==u.filename||c.lineno!==u.lineno||c.colno!==u.colno||c.function!==u.function)return!1}return!0}function iv(l,t){let i=l.fingerprint,a=t.fingerprint;if(!i&&!a)return!0;if(i&&!a||!i&&a)return!1;i=i,a=a;try{return i.join("")===a.join("")}catch{return!1}}function sv(l){return l.exception?.values?.[0]}function av(l){if(l!==void 0)return l>=400&&l<500?"warning":l>=500?"error":void 0}const af=Kt;function QC(){if(!("fetch"in af))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function rv(l){return l&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(l.toString())}function KC(){if(typeof EdgeRuntime=="string")return!0;if(!QC())return!1;if(rv(af.fetch))return!0;let l=!1;const t=af.document;if(t&&typeof t.createElement=="function")try{const i=t.createElement("iframe");i.hidden=!0,t.head.appendChild(i),i.contentWindow?.fetch&&(l=rv(i.contentWindow.fetch)),t.head.removeChild(i)}catch(i){gt&&Tt.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",i)}return l}function ZC(l,t){const i="fetch";Gc(i,l),Vc(i,()=>JC(void 0,t))}function JC(l,t=!1){t&&!KC()||Zi(Kt,"fetch",function(i){return function(...a){const r=new Error,{method:c,url:u}=tR(a),h={args:a,fetchData:{method:c,url:u},startTimestamp:br()*1e3,virtualError:r,headers:eR(a)};return mr("fetch",{...h}),i.apply(Kt,a).then(async p=>(mr("fetch",{...h,endTimestamp:br()*1e3,response:p}),p),p=>{if(mr("fetch",{...h,endTimestamp:br()*1e3,error:p}),zh(p)&&p.stack===void 0&&(p.stack=r.stack,Ho(p,"framesToPop",1)),p instanceof TypeError&&(p.message==="Failed to fetch"||p.message==="Load failed"||p.message==="NetworkError when attempting to fetch resource."))try{const m=new URL(h.fetchData.url);p.message=`${p.message} (${m.host})`}catch{}throw p})}})}function rf(l,t){return!!l&&typeof l=="object"&&!!l[t]}function ov(l){return typeof l=="string"?l:l?rf(l,"url")?l.url:l.toString?l.toString():"":""}function tR(l){if(l.length===0)return{method:"GET",url:""};if(l.length===2){const[i,a]=l;return{url:ov(i),method:rf(a,"method")?String(a.method).toUpperCase():"GET"}}const t=l[0];return{url:ov(t),method:rf(t,"method")?String(t.method).toUpperCase():"GET"}}function eR(l){const[t,i]=l;try{if(typeof i=="object"&&i!==null&&"headers"in i&&i.headers)return new Headers(i.headers);if(b1(t))return new Headers(t.headers)}catch{}}function nR(){return"npm"}const Ae=Kt;let of=0;function lv(){return of>0}function iR(){of++,setTimeout(()=>{of--})}function Er(l,t={}){function i(r){return typeof r=="function"}if(!i(l))return l;try{const r=l.__sentry_wrapped__;if(r)return typeof r=="function"?r:l;if($h(l))return l}catch{return l}const a=function(...r){try{const c=r.map(u=>Er(u,t));return l.apply(this,c)}catch(c){throw iR(),U1(u=>{u.addEventProcessor(h=>(t.mechanism&&(Gh(h,void 0),yr(h,t.mechanism)),h.extra={...h.extra,arguments:r},h)),kb(c)}),c}};try{for(const r in l)Object.prototype.hasOwnProperty.call(l,r)&&(a[r]=l[r])}catch{}Zy(a,l),Ho(l,"__sentry_wrapped__",a);try{Object.getOwnPropertyDescriptor(a,"name").configurable&&Object.defineProperty(a,"name",{get(){return l.name}})}catch{}return a}function sR(){const l=jh(),{referrer:t}=Ae.document||{},{userAgent:i}=Ae.navigator||{},a={...t&&{Referer:t},...i&&{"User-Agent":i}};return{url:l,headers:a}}function lf(l,t){const i=uf(l,t),a={type:cR(t),value:uR(t)};return i.length&&(a.stacktrace={frames:i}),a.type===void 0&&a.value===""&&(a.value="Unrecoverable error caught"),a}function aR(l,t,i,a){const c=ln()?.getOptions().normalizeDepth,u=mR(t),h={__serialized__:_b(t,c)};if(u)return{exception:{values:[lf(l,u)]},extra:h};const p={exception:{values:[{type:qc(t)?t.constructor.name:a?"UnhandledRejection":"Error",value:fR(t,{isUnhandledRejection:a})}]},extra:h};if(i){const m=uf(l,i);m.length&&(p.exception.values[0].stacktrace={frames:m})}return p}function cf(l,t){return{exception:{values:[lf(l,t)]}}}function uf(l,t){const i=t.stacktrace||t.stack||"",a=oR(t),r=lR(t);try{return l(i,a,r)}catch{}return[]}const rR=/Minified React error #\d+;/i;function oR(l){return l&&rR.test(l.message)?1:0}function lR(l){return typeof l.framesToPop=="number"?l.framesToPop:0}function cv(l){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?l instanceof WebAssembly.Exception:!1}function cR(l){const t=l?.name;return!t&&cv(l)?l.message&&Array.isArray(l.message)&&l.message.length==2?l.message[0]:"WebAssembly.Exception":t}function uR(l){const t=l?.message;return cv(l)?Array.isArray(l.message)&&l.message.length==2?l.message[1]:"wasm exception":t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function dR(l,t,i,a){const r=i?.syntheticException||void 0,c=df(l,t,r,a);return yr(c),c.level="error",i?.event_id&&(c.event_id=i.event_id),Sa(c)}function hR(l,t,i="info",a,r){const c=a?.syntheticException||void 0,u=hf(l,t,c,r);return u.level=i,a?.event_id&&(u.event_id=a.event_id),Sa(u)}function df(l,t,i,a,r){let c;if(Xy(t)&&t.error)return cf(l,t.error);if(Yy(t)||p1(t)){const u=t;if("stack"in t)c=cf(l,t);else{const h=u.name||(Yy(u)?"DOMError":"DOMException"),p=u.message?`${h}: ${u.message}`:h;c=hf(l,p,i,a),Gh(c,p)}return"code"in u&&(c.tags={...c.tags,"DOMException.code":`${u.code}`}),c}return zh(t)?cf(l,t):zo(t)||qc(t)?(c=aR(l,t,i,r),yr(c,{synthetic:!0}),c):(c=hf(l,t,i,a),Gh(c,`${t}`),yr(c,{synthetic:!0}),c)}function hf(l,t,i,a){const r={};if(a&&i){const c=uf(l,i);c.length&&(r.exception={values:[{value:t,stacktrace:{frames:c}}]}),yr(r,{synthetic:!0})}if(Hh(t)){const{__sentry_template_string__:c,__sentry_template_values__:u}=t;return r.logentry={message:c,params:u},r}return r.message=t,r}function fR(l,{isUnhandledRejection:t}){const i=A1(l),a=t?"promise rejection":"exception";return Xy(l)?`Event \`ErrorEvent\` captured as ${a} with message \`${l.message}\``:qc(l)?`Event \`${pR(l)}\` (type=${l.type}) captured as ${a}`:`Object captured as ${a} with keys: ${i}`}function pR(l){try{const t=Object.getPrototypeOf(l);return t?t.constructor.name:void 0}catch{}}function mR(l){for(const t in l)if(Object.prototype.hasOwnProperty.call(l,t)){const i=l[t];if(i instanceof Error)return i}}const gR=5e3;class yR extends cC{constructor(t){const i=bR(t),a=Ae.SENTRY_SDK_SOURCE||nR();xC(i,"browser",["browser"],a),i._metadata?.sdk&&(i._metadata.sdk.settings={infer_ip:i.sendDefaultPii?"auto":"never",...i._metadata.sdk.settings}),super(i);const{sendDefaultPii:r,sendClientReports:c,enableLogs:u}=this._options;Ae.document&&(c||u)&&Ae.document.addEventListener("visibilitychange",()=>{Ae.document.visibilityState==="hidden"&&(c&&this._flushOutcomes(),u&&ef(this))}),u&&(this.on("flush",()=>{ef(this)}),this.on("afterCaptureLog",()=>{this._logFlushIdleTimeout&&clearTimeout(this._logFlushIdleTimeout),this._logFlushIdleTimeout=setTimeout(()=>{ef(this)},gR)})),r&&this.on("beforeSendSession",wC)}eventFromException(t,i){return dR(this._options.stackParser,t,i,this._options.attachStacktrace)}eventFromMessage(t,i="info",a){return hR(this._options.stackParser,t,i,a,this._options.attachStacktrace)}_prepareEvent(t,i,a,r){return t.platform=t.platform||"javascript",super._prepareEvent(t,i,a,r)}}function bR(l){return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:Ae.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...l}}const Ar=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Ls=globalThis,uv="10.8.0";function vR(l,t,i=Ls){const a=i.__SENTRY__=i.__SENTRY__||{},r=a[uv]=a[uv]||{};return r[l]||(r[l]=t())}const SR="Sentry Logger ",dv={};function ER(l){if(!("console"in Ls))return l();const t=Ls.console,i={},a=Object.keys(dv);a.forEach(r=>{const c=dv[r];i[r]=t[r],t[r]=c});try{return l()}finally{a.forEach(r=>{t[r]=i[r]})}}function AR(){pf().enabled=!0}function _R(){pf().enabled=!1}function hv(){return pf().enabled}function TR(...l){ff("log",...l)}function wR(...l){ff("warn",...l)}function xR(...l){ff("error",...l)}function ff(l,...t){Ar&&hv()&&ER(()=>{Ls.console[l](`${SR}[${l}]:`,...t)})}function pf(){return Ar?vR("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const Go={enable:AR,disable:_R,isEnabled:hv,log:TR,warn:wR,error:xR},mf="<anonymous>";function CR(l){try{return!l||typeof l!="function"?mf:l.name||mf}catch{return mf}}const su={},fv={};function gf(l,t){su[l]=su[l]||[],su[l].push(t)}function yf(l,t){if(!fv[l]){fv[l]=!0;try{t()}catch(i){Ar&&Go.error(`Error while instrumenting ${l}`,i)}}}function Vo(l,t){const i=l&&su[l];if(i)for(const a of i)try{a(t)}catch(r){Ar&&Go.error(`Error while triggering instrumentation handler.
16
16
  Type: ${l}
17
- Name: ${RR(a)}
18
- Error:`,r)}}const DR=Object.prototype.toString;function MR(l,t){return DR.call(l)===`[object ${t}]`}function au(l){return MR(l,"String")}function ru(l,t,i){if(!(t in l))return;const a=l[t];if(typeof a!="function")return;const r=i(a);typeof r=="function"&&OR(r,a);try{l[t]=r}catch{Ar&&Go.log(`Failed to replace method "${t}" in object`,l)}}function yf(l,t,i){try{Object.defineProperty(l,t,{value:i,writable:!0,configurable:!0})}catch{Ar&&Go.log(`Failed to add non-enumerable property "${t}" to object`,l)}}function OR(l,t){try{const i=t.prototype||{};l.prototype=t.prototype=i,yf(l,"__sentry_original__",t)}catch{}}function kR(){const l=Ls;return l.crypto||l.msCrypto}function NR(l=kR()){let t=()=>Math.random()*16;try{if(l?.randomUUID)return l.randomUUID().replace(/-/g,"");l?.getRandomValues&&(t=()=>{const i=new Uint8Array(1);return l.getRandomValues(i),i[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,i=>(i^(t()&15)>>i/4).toString(16))}const mv=1e3;function LR(){return Date.now()/mv}function IR(){const{performance:l}=Ls;if(!l?.now||!l.timeOrigin)return LR;const t=l.timeOrigin;return()=>(t+l.now())/mv}let gv;function bf(){return(gv??(gv=IR()))()}const yv=Ls;function PR(){return"history"in yv&&!!yv.history}function UR(l){return l&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(l.toString())}const zR=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,cn=Ls,HR=1e3;let bv,vf,Sf;function BR(l){mf("dom",l),gf("dom",FR)}function FR(){if(!cn.document)return;const l=Vo.bind(null,"dom"),t=vv(l,!0);cn.document.addEventListener("click",t,!1),cn.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(i=>{const r=cn[i]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(ru(r,"addEventListener",function(c){return function(u,h,p){if(u==="click"||u=="keypress")try{const m=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},g=m[u]=m[u]||{refCount:0};if(!g.handler){const y=vv(l);g.handler=y,c.call(this,u,y,p)}g.refCount++}catch{}return c.call(this,u,h,p)}}),ru(r,"removeEventListener",function(c){return function(u,h,p){if(u==="click"||u=="keypress")try{const m=this.__sentry_instrumentation_handlers__||{},g=m[u];g&&(g.refCount--,g.refCount<=0&&(c.call(this,u,g.handler,p),g.handler=void 0,delete m[u]),Object.keys(m).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return c.call(this,u,h,p)}}))})}function jR(l){if(l.type!==vf)return!1;try{if(!l.target||l.target._sentryId!==Sf)return!1}catch{}return!0}function $R(l,t){return l!=="keypress"?!1:t?.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}function vv(l,t=!1){return i=>{if(!i||i._sentryCaptured)return;const a=GR(i);if($R(i.type,a))return;yf(i,"_sentryCaptured",!0),a&&!a._sentryId&&yf(a,"_sentryId",NR());const r=i.type==="keypress"?"input":i.type;jR(i)||(l({event:i,name:r,global:t}),vf=i.type,Sf=a?a._sentryId:void 0),clearTimeout(bv),bv=cn.setTimeout(()=>{Sf=void 0,vf=void 0},HR)}}function GR(l){try{return l.target}catch{return null}}let ou;function Sv(l){const t="history";mf(t,l),gf(t,VR)}function VR(){if(cn.addEventListener("popstate",()=>{const t=cn.location.href,i=ou;if(ou=t,i===t)return;Vo("history",{from:i,to:t})}),!PR())return;function l(t){return function(...i){const a=i.length>2?i[2]:void 0;if(a){const r=ou,c=qR(String(a));if(ou=c,r===c)return t.apply(this,i);Vo("history",{from:r,to:c})}return t.apply(this,i)}}ru(cn.history,"pushState",l),ru(cn.history,"replaceState",l)}function qR(l){try{return new URL(l,cn.location.origin).toString()}catch{return l}}const lu={};function YR(l){const t=lu[l];if(t)return t;let i=cn[l];if(UR(i))return lu[l]=i.bind(cn);const a=cn.document;if(a&&typeof a.createElement=="function")try{const r=a.createElement("iframe");r.hidden=!0,a.head.appendChild(r);const c=r.contentWindow;c?.[l]&&(i=c[l]),a.head.removeChild(r)}catch(r){zR&&Go.warn(`Could not create sandbox iframe for ${l} check, bailing to window.${l}: `,r)}return i&&(lu[l]=i.bind(cn))}function Ev(l){lu[l]=void 0}const qo="__sentry_xhr_v3__";function XR(l){mf("xhr",l),gf("xhr",WR)}function WR(){if(!cn.XMLHttpRequest)return;const l=XMLHttpRequest.prototype;l.open=new Proxy(l.open,{apply(t,i,a){const r=new Error,c=bf()*1e3,u=au(a[0])?a[0].toUpperCase():void 0,h=QR(a[1]);if(!u||!h)return t.apply(i,a);i[qo]={method:u,url:h,request_headers:{}},u==="POST"&&h.match(/sentry_key/)&&(i.__sentry_own_request__=!0);const p=()=>{const m=i[qo];if(m&&i.readyState===4){try{m.status_code=i.status}catch{}const g={endTimestamp:bf()*1e3,startTimestamp:c,xhr:i,virtualError:r};Vo("xhr",g)}};return"onreadystatechange"in i&&typeof i.onreadystatechange=="function"?i.onreadystatechange=new Proxy(i.onreadystatechange,{apply(m,g,y){return p(),m.apply(g,y)}}):i.addEventListener("readystatechange",p),i.setRequestHeader=new Proxy(i.setRequestHeader,{apply(m,g,y){const[b,S]=y,A=g[qo];return A&&au(b)&&au(S)&&(A.request_headers[b.toLowerCase()]=S),m.apply(g,y)}}),t.apply(i,a)}}),l.send=new Proxy(l.send,{apply(t,i,a){const r=i[qo];if(!r)return t.apply(i,a);a[0]!==void 0&&(r.body=a[0]);const c={startTimestamp:bf()*1e3,xhr:i};return Vo("xhr",c),t.apply(i,a)}})}function QR(l){if(au(l))return l;try{return l.toString()}catch{}}function KR(l,t=YR("fetch")){let i=0,a=0;function r(c){const u=c.body.length;i+=u,a++;const h={body:c.body,method:"POST",referrerPolicy:"strict-origin",headers:l.headers,keepalive:i<=6e4&&a<15,...l.fetchOptions};if(!t)return Ev("fetch"),Zc("No fetch implementation available");try{return t(l.url,h).then(p=>(i-=u,a--,{statusCode:p.status,headers:{"x-sentry-rate-limits":p.headers.get("X-Sentry-Rate-Limits"),"retry-after":p.headers.get("Retry-After")}}))}catch(p){return Ev("fetch"),i-=u,a--,Zc(p)}}return wx(l,r)}const ZR=30,JR=50;function Ef(l,t,i,a){const r={filename:l,function:t==="<anonymous>"?ba:t,in_app:!0};return i!==void 0&&(r.lineno=i),a!==void 0&&(r.colno=a),r}const tD=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,eD=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,nD=/\((\S*)(?::(\d+))(?::(\d+))\)/,iD=/at (.+?) ?\(data:(.+?),/,sD=[ZR,l=>{const t=l.match(iD);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};const i=tD.exec(l);if(i){const[,r,c,u]=i;return Ef(r,ba,+c,+u)}const a=eD.exec(l);if(a){if(a[2]&&a[2].indexOf("eval")===0){const h=nD.exec(a[2]);h&&(a[2]=h[1],a[3]=h[2],a[4]=h[3])}const[c,u]=Av(a[1]||ba,a[2]);return Ef(u,c,a[3]?+a[3]:void 0,a[4]?+a[4]:void 0)}}],aD=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,rD=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,oD=Gy(...[sD,[JR,l=>{const t=aD.exec(l);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const c=rD.exec(t[3]);c&&(t[1]=t[1]||"eval",t[3]=c[1],t[4]=c[2],t[5]="")}let a=t[3],r=t[1]||ba;return[r,a]=Av(r,a),Ef(a,r,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]]),Av=(l,t)=>{const i=l.indexOf("safari-extension")!==-1,a=l.indexOf("safari-web-extension")!==-1;return i||a?[l.indexOf("@")!==-1?l.split("@")[0]:ba,i?`safari-extension:${t}`:`safari-web-extension:${t}`]:[l,t]},cu=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,uu=1024,lD="Breadcrumbs",cD=(l={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...l};return{name:lD,setup(i){t.console&&$x(hD(i)),t.dom&&BR(dD(i,t.dom)),t.xhr&&XR(fD(i)),t.fetch&&Jx(pD(i)),t.history&&Sv(mD(i)),t.sentry&&i.on("beforeSendEvent",uD(i))}}};function uD(l){return function(i){ln()===l&&Ea({category:`sentry.${i.type==="transaction"?"transaction":"event"}`,event_id:i.event_id,level:i.level,message:va(i)},{event:i})}}function dD(l,t){return function(a){if(ln()!==l)return;let r,c,u=typeof t=="object"?t.serializeAttribute:void 0,h=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;h&&h>uu&&(cu&&Tt.warn(`\`dom.maxStringLength\` cannot exceed ${uu}, but a value of ${h} was configured. Sentry will use ${uu} instead.`),h=uu),typeof u=="string"&&(u=[u]);try{const m=a.event,g=gD(m)?m.target:m;r=Ky(g,{keyAttrs:u,maxStringLength:h}),c=A1(g)}catch{r="<unknown>"}if(r.length===0)return;const p={category:`ui.${a.name}`,message:r};c&&(p.data={"ui.component_name":c}),Ea(p,{event:a.event,name:a.name,global:a.global})}}function hD(l){return function(i){if(ln()!==l)return;const a={category:"console",data:{arguments:i.args,logger:"console"},level:Vx(i.level),message:Zy(i.args," ")};if(i.level==="assert")if(i.args[0]===!1)a.message=`Assertion failed: ${Zy(i.args.slice(1)," ")||"console.assert"}`,a.data.arguments=i.args.slice(1);else return;Ea(a,{input:i.args,level:i.level})}}function fD(l){return function(i){if(ln()!==l)return;const{startTimestamp:a,endTimestamp:r}=i,c=i.xhr[qo];if(!a||!r||!c)return;const{method:u,url:h,status_code:p,body:m}=c,g={method:u,url:h,status_code:p},y={xhr:i.xhr,input:m,startTimestamp:a,endTimestamp:r},b={category:"xhr",data:g,type:"http",level:rv(p)};l.emit("beforeOutgoingRequestBreadcrumb",b,y),Ea(b,y)}}function pD(l){return function(i){if(ln()!==l)return;const{startTimestamp:a,endTimestamp:r}=i;if(r&&!(i.fetchData.url.match(/sentry_key/)&&i.fetchData.method==="POST"))if(i.fetchData.method,i.fetchData.url,i.error){const c=i.fetchData,u={data:i.error,input:i.args,startTimestamp:a,endTimestamp:r},h={category:"fetch",data:c,level:"error",type:"http"};l.emit("beforeOutgoingRequestBreadcrumb",h,u),Ea(h,u)}else{const c=i.response,u={...i.fetchData,status_code:c?.status};i.fetchData.request_body_size,i.fetchData.response_body_size,c?.status;const h={input:i.args,response:c,startTimestamp:a,endTimestamp:r},p={category:"fetch",data:u,type:"http",level:rv(u.status_code)};l.emit("beforeOutgoingRequestBreadcrumb",p,h),Ea(p,h)}}}function mD(l){return function(i){if(ln()!==l)return;let a=i.from,r=i.to;const c=ef(Ee.location.href);let u=a?ef(a):void 0;const h=ef(r);u?.path||(u=c),c.protocol===h.protocol&&c.host===h.host&&(r=h.relative),c.protocol===u.protocol&&c.host===u.host&&(a=u.relative),Ea({category:"navigation",data:{from:a,to:r}})}}function gD(l){return!!l&&!!l.target}const yD=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],bD="BrowserApiErrors",vD=(l={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...l};return{name:bD,setupOnce(){t.setTimeout&&Zi(Ee,"setTimeout",_v),t.setInterval&&Zi(Ee,"setInterval",_v),t.requestAnimationFrame&&Zi(Ee,"requestAnimationFrame",SD),t.XMLHttpRequest&&"XMLHttpRequest"in Ee&&Zi(XMLHttpRequest.prototype,"send",ED);const i=t.eventTarget;i&&(Array.isArray(i)?i:yD).forEach(r=>AD(r,t))}}};function _v(l){return function(...t){const i=t[0];return t[0]=Er(i,{mechanism:{data:{function:Ms(l)},handled:!1,type:"instrument"}}),l.apply(this,t)}}function SD(l){return function(t){return l.apply(this,[Er(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Ms(l)},handled:!1,type:"instrument"}})])}}function ED(l){return function(...t){const i=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(r=>{r in i&&typeof i[r]=="function"&&Zi(i,r,function(c){const u={mechanism:{data:{function:r,handler:Ms(c)},handled:!1,type:"instrument"}},h=jh(c);return h&&(u.mechanism.data.handler=Ms(h)),Er(c,u)})}),l.apply(this,t)}}function AD(l,t){const a=Ee[l]?.prototype;a?.hasOwnProperty?.("addEventListener")&&(Zi(a,"addEventListener",function(r){return function(c,u,h){try{_D(u)&&(u.handleEvent=Er(u.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Ms(u),target:l},handled:!1,type:"instrument"}}))}catch{}return t.unregisterOriginalCallbacks&&TD(this,c,u),r.apply(this,[c,Er(u,{mechanism:{data:{function:"addEventListener",handler:Ms(u),target:l},handled:!1,type:"instrument"}}),h])}}),Zi(a,"removeEventListener",function(r){return function(c,u,h){try{const p=u.__sentry_wrapped__;p&&r.call(this,c,p,h)}catch{}return r.call(this,c,u,h)}}))}function _D(l){return typeof l.handleEvent=="function"}function TD(l,t,i){l&&typeof l=="object"&&"removeEventListener"in l&&typeof l.removeEventListener=="function"&&l.removeEventListener(t,i)}const wD=()=>({name:"BrowserSession",setupOnce(){if(typeof Ee.document>"u"){cu&&Tt.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}Ib({ignoreDuration:!0}),zb(),Sv(({from:l,to:t})=>{l!==void 0&&l!==t&&(Ib({ignoreDuration:!0}),zb())})}}),CD="GlobalHandlers",xD=(l={})=>{const t={onerror:!0,onunhandledrejection:!0,...l};return{name:CD,setupOnce(){Error.stackTraceLimit=50},setup(i){t.onerror&&(RD(i),Tv("onerror")),t.onunhandledrejection&&(DD(i),Tv("onunhandledrejection"))}}};function RD(l){d1(t=>{const{stackParser:i,attachStacktrace:a}=wv();if(ln()!==l||cv())return;const{msg:r,url:c,line:u,column:h,error:p}=t,m=kD(uf(i,p||r,void 0,a,!1),c,u,h);m.level="error",Lb(m,{originalException:p,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}function DD(l){f1(t=>{const{stackParser:i,attachStacktrace:a}=wv();if(ln()!==l||cv())return;const r=MD(t),c=Hh(r)?OD(r):uf(i,r,void 0,a,!0);c.level="error",Lb(c,{originalException:r,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}function MD(l){if(Hh(l))return l;try{if("reason"in l)return l.reason;if("detail"in l&&"reason"in l.detail)return l.detail.reason}catch{}return l}function OD(l){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(l)}`}]}}}function kD(l,t,i,a){const r=l.exception=l.exception||{},c=r.values=r.values||[],u=c[0]=c[0]||{},h=u.stacktrace=u.stacktrace||{},p=h.frames=h.frames||[],m=a,g=i,y=ND(t)??Fh();return p.length===0&&p.push({colno:m,filename:y,function:ba,in_app:!0,lineno:g}),l}function Tv(l){cu&&Tt.log(`Global Handler attached: ${l}`)}function wv(){return ln()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function ND(l){if(!(!Uo(l)||l.length===0)){if(l.startsWith("data:")){const t=l.match(/^data:([^;]+)/),i=t?t[1]:"text/javascript",a=l.includes("base64,");return`<data:${i}${a?",base64":""}>`}return l.slice(0,1024)}}const LD=()=>({name:"HttpContext",preprocessEvent(l){if(!Ee.navigator&&!Ee.location&&!Ee.document)return;const t=aR(),i={...t.headers,...l.request?.headers};l.request={...t,...l.request,headers:i}}}),ID="cause",PD=5,UD="LinkedErrors",zD=(l={})=>{const t=l.limit||PD,i=l.key||ID;return{name:UD,preprocessEvent(a,r,c){const u=c.getOptions();jx(of,u.stackParser,i,t,a,r)}}};function HD(){return BD()?(cu&&pr(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0):!1}function BD(){if(typeof Ee.window>"u")return!1;const l=Ee;if(l.nw||!(l.chrome||l.browser)?.runtime?.id)return!1;const i=Fh(),a=["chrome-extension","moz-extension","ms-browser-extension","safari-web-extension"];return!(Ee===Ee.top&&a.some(c=>i.startsWith(`${c}://`)))}function FD(l){return[Lx(),Mx(),vD(),cD(),xD(),zD(),Yx(),LD(),wD()]}function jD(l={}){const t=!l.skipBrowserExtensionCheck&&HD(),i={...l,enabled:t?!1:l.enabled,stackParser:c1(l.stackParser||oD),integrations:ax({integrations:l.integrations,defaultIntegrations:l.defaultIntegrations==null?FD():l.defaultIntegrations}),transport:l.transport||KR};return gx(bR,i)}class $D{config;debug;logLevel;constructor(){this.config=Xt,this.debug=this.config.env!=="prd",this.logLevel=this.config.env==="hml"?1:2}getTimestamp(){return new Date().toLocaleString("pt-BR",{timeZone:"America/Sao_Paulo"}).replace(",","")}BASE="[⚡Corisco";info(t,...i){this.debug&&this.logLevel>=1&&console.log(`[${this.getTimestamp()}] ${this.BASE}] ${t}`,...i)}detail(t,...i){this.debug&&this.logLevel>=2&&console.log(`[${this.getTimestamp()}] ${this.BASE} Detail] ${t}`,...i)}warn(t,...i){this.debug&&console.warn(`[${this.getTimestamp()}] ${this.BASE} Warning] ${t}`,...i)}error(t,...i){this.debug&&console.error(`[${this.getTimestamp()}] ${this.BASE} Error] ${t}`,...i),Nb(new Error(t),{extra:{args:i}})}}const L=new $D;function Cv(l){l=l.replace(/^\*:\/\//,"").replace(/https?:\/\//,"").replace(/http?:\/\//,"").replace(/\/\*$/,"");const t=l.match(/\*\^(\[([^\]]+)\])/);let i=[];if(t&&(i=t[2].split("|").map(c=>c.trim()),l=l.replace(t[0],"*")),l=l.replace(/\./g,"\\.").replace(/\*/g,".*"),i.length>0){const r=i.map(u=>`(?!.*${u})`).join("");return new RegExp("^"+r+l+"$")}const a=new RegExp("^"+l+"$");return L.info(`Converted wildcard pattern "${l}" to regex: ${a}`),a}function GD(){const l=Xt.action_map?.flatMap(t=>t.allowed_hosts||[]).filter(Boolean);return Array.from(new Set(l))}function xv(l){const t=GD();if(!l)return!1;let i;try{i=new URL(l).host}catch{i=l.replace(/https?:\/\//,"").replace(/http?:\/\//,"").split("/")[0]}return L.info(`Checking if host "${i}" is allowed against patterns:`,t),t.some(r=>Cv(r).test(i))}function VD(){const l=[];return Xt.action_map?.forEach(t=>{Object.keys(t.mapping).forEach(i=>{l.push({url:i,allowedHosts:t.allowed_hosts||[]})})}),l}function Rv(l){try{const t=new URL(l),i=t.hostname,a=t.pathname;return VD().some(c=>{if(!c.allowedHosts.some(m=>Cv(m).test(i)))return!1;const h=c.url.replace(/\{\{d\+\}\}/g,"\\d+").replace(/\{\{.*?\}\}/g,"[^/]+");return new RegExp("^"+h+"$").test(a)})}catch(t){return console.error("Erro ao verificar URL mapeada:",t),!1}}function qD(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var Af={exports:{}},Yo={exports:{}};Yo.exports;var Dv;function YD(){return Dv||(Dv=1,function(l,t){/**
17
+ Name: ${CR(a)}
18
+ Error:`,r)}}const RR=Object.prototype.toString;function DR(l,t){return RR.call(l)===`[object ${t}]`}function au(l){return DR(l,"String")}function ru(l,t,i){if(!(t in l))return;const a=l[t];if(typeof a!="function")return;const r=i(a);typeof r=="function"&&MR(r,a);try{l[t]=r}catch{Ar&&Go.log(`Failed to replace method "${t}" in object`,l)}}function bf(l,t,i){try{Object.defineProperty(l,t,{value:i,writable:!0,configurable:!0})}catch{Ar&&Go.log(`Failed to add non-enumerable property "${t}" to object`,l)}}function MR(l,t){try{const i=t.prototype||{};l.prototype=t.prototype=i,bf(l,"__sentry_original__",t)}catch{}}function OR(){const l=Ls;return l.crypto||l.msCrypto}function kR(l=OR()){let t=()=>Math.random()*16;try{if(l?.randomUUID)return l.randomUUID().replace(/-/g,"");l?.getRandomValues&&(t=()=>{const i=new Uint8Array(1);return l.getRandomValues(i),i[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,i=>(i^(t()&15)>>i/4).toString(16))}const pv=1e3;function NR(){return Date.now()/pv}function LR(){const{performance:l}=Ls;if(!l?.now||!l.timeOrigin)return NR;const t=l.timeOrigin;return()=>(t+l.now())/pv}let mv;function vf(){return(mv??(mv=LR()))()}const gv=Ls;function IR(){return"history"in gv&&!!gv.history}function PR(l){return l&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(l.toString())}const UR=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,cn=Ls,zR=1e3;let yv,Sf,Ef;function HR(l){gf("dom",l),yf("dom",BR)}function BR(){if(!cn.document)return;const l=Vo.bind(null,"dom"),t=bv(l,!0);cn.document.addEventListener("click",t,!1),cn.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(i=>{const r=cn[i]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(ru(r,"addEventListener",function(c){return function(u,h,p){if(u==="click"||u=="keypress")try{const m=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},g=m[u]=m[u]||{refCount:0};if(!g.handler){const y=bv(l);g.handler=y,c.call(this,u,y,p)}g.refCount++}catch{}return c.call(this,u,h,p)}}),ru(r,"removeEventListener",function(c){return function(u,h,p){if(u==="click"||u=="keypress")try{const m=this.__sentry_instrumentation_handlers__||{},g=m[u];g&&(g.refCount--,g.refCount<=0&&(c.call(this,u,g.handler,p),g.handler=void 0,delete m[u]),Object.keys(m).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return c.call(this,u,h,p)}}))})}function FR(l){if(l.type!==Sf)return!1;try{if(!l.target||l.target._sentryId!==Ef)return!1}catch{}return!0}function jR(l,t){return l!=="keypress"?!1:t?.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}function bv(l,t=!1){return i=>{if(!i||i._sentryCaptured)return;const a=$R(i);if(jR(i.type,a))return;bf(i,"_sentryCaptured",!0),a&&!a._sentryId&&bf(a,"_sentryId",kR());const r=i.type==="keypress"?"input":i.type;FR(i)||(l({event:i,name:r,global:t}),Sf=i.type,Ef=a?a._sentryId:void 0),clearTimeout(yv),yv=cn.setTimeout(()=>{Ef=void 0,Sf=void 0},zR)}}function $R(l){try{return l.target}catch{return null}}let ou;function vv(l){const t="history";gf(t,l),yf(t,GR)}function GR(){if(cn.addEventListener("popstate",()=>{const t=cn.location.href,i=ou;if(ou=t,i===t)return;Vo("history",{from:i,to:t})}),!IR())return;function l(t){return function(...i){const a=i.length>2?i[2]:void 0;if(a){const r=ou,c=VR(String(a));if(ou=c,r===c)return t.apply(this,i);Vo("history",{from:r,to:c})}return t.apply(this,i)}}ru(cn.history,"pushState",l),ru(cn.history,"replaceState",l)}function VR(l){try{return new URL(l,cn.location.origin).toString()}catch{return l}}const lu={};function qR(l){const t=lu[l];if(t)return t;let i=cn[l];if(PR(i))return lu[l]=i.bind(cn);const a=cn.document;if(a&&typeof a.createElement=="function")try{const r=a.createElement("iframe");r.hidden=!0,a.head.appendChild(r);const c=r.contentWindow;c?.[l]&&(i=c[l]),a.head.removeChild(r)}catch(r){UR&&Go.warn(`Could not create sandbox iframe for ${l} check, bailing to window.${l}: `,r)}return i&&(lu[l]=i.bind(cn))}function Sv(l){lu[l]=void 0}const qo="__sentry_xhr_v3__";function XR(l){gf("xhr",l),yf("xhr",YR)}function YR(){if(!cn.XMLHttpRequest)return;const l=XMLHttpRequest.prototype;l.open=new Proxy(l.open,{apply(t,i,a){const r=new Error,c=vf()*1e3,u=au(a[0])?a[0].toUpperCase():void 0,h=WR(a[1]);if(!u||!h)return t.apply(i,a);i[qo]={method:u,url:h,request_headers:{}},u==="POST"&&h.match(/sentry_key/)&&(i.__sentry_own_request__=!0);const p=()=>{const m=i[qo];if(m&&i.readyState===4){try{m.status_code=i.status}catch{}const g={endTimestamp:vf()*1e3,startTimestamp:c,xhr:i,virtualError:r};Vo("xhr",g)}};return"onreadystatechange"in i&&typeof i.onreadystatechange=="function"?i.onreadystatechange=new Proxy(i.onreadystatechange,{apply(m,g,y){return p(),m.apply(g,y)}}):i.addEventListener("readystatechange",p),i.setRequestHeader=new Proxy(i.setRequestHeader,{apply(m,g,y){const[b,S]=y,A=g[qo];return A&&au(b)&&au(S)&&(A.request_headers[b.toLowerCase()]=S),m.apply(g,y)}}),t.apply(i,a)}}),l.send=new Proxy(l.send,{apply(t,i,a){const r=i[qo];if(!r)return t.apply(i,a);a[0]!==void 0&&(r.body=a[0]);const c={startTimestamp:vf()*1e3,xhr:i};return Vo("xhr",c),t.apply(i,a)}})}function WR(l){if(au(l))return l;try{return l.toString()}catch{}}function QR(l,t=qR("fetch")){let i=0,a=0;function r(c){const u=c.body.length;i+=u,a++;const h={body:c.body,method:"POST",referrerPolicy:"strict-origin",headers:l.headers,keepalive:i<=6e4&&a<15,...l.fetchOptions};if(!t)return Sv("fetch"),Zc("No fetch implementation available");try{return t(l.url,h).then(p=>(i-=u,a--,{statusCode:p.status,headers:{"x-sentry-rate-limits":p.headers.get("X-Sentry-Rate-Limits"),"retry-after":p.headers.get("Retry-After")}}))}catch(p){return Sv("fetch"),i-=u,a--,Zc(p)}}return TC(l,r)}const KR=30,ZR=50;function Af(l,t,i,a){const r={filename:l,function:t==="<anonymous>"?ba:t,in_app:!0};return i!==void 0&&(r.lineno=i),a!==void 0&&(r.colno=a),r}const JR=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,tD=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,eD=/\((\S*)(?::(\d+))(?::(\d+))\)/,nD=/at (.+?) ?\(data:(.+?),/,iD=[KR,l=>{const t=l.match(nD);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};const i=JR.exec(l);if(i){const[,r,c,u]=i;return Af(r,ba,+c,+u)}const a=tD.exec(l);if(a){if(a[2]&&a[2].indexOf("eval")===0){const h=eD.exec(a[2]);h&&(a[2]=h[1],a[3]=h[2],a[4]=h[3])}const[c,u]=Ev(a[1]||ba,a[2]);return Af(u,c,a[3]?+a[3]:void 0,a[4]?+a[4]:void 0)}}],sD=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,aD=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,rD=$y(...[iD,[ZR,l=>{const t=sD.exec(l);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const c=aD.exec(t[3]);c&&(t[1]=t[1]||"eval",t[3]=c[1],t[4]=c[2],t[5]="")}let a=t[3],r=t[1]||ba;return[r,a]=Ev(r,a),Af(a,r,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]]),Ev=(l,t)=>{const i=l.indexOf("safari-extension")!==-1,a=l.indexOf("safari-web-extension")!==-1;return i||a?[l.indexOf("@")!==-1?l.split("@")[0]:ba,i?`safari-extension:${t}`:`safari-web-extension:${t}`]:[l,t]},cu=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,uu=1024,oD="Breadcrumbs",lD=(l={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...l};return{name:oD,setup(i){t.console&&jC(dD(i)),t.dom&&HR(uD(i,t.dom)),t.xhr&&XR(hD(i)),t.fetch&&ZC(fD(i)),t.history&&vv(pD(i)),t.sentry&&i.on("beforeSendEvent",cD(i))}}};function cD(l){return function(i){ln()===l&&Ea({category:`sentry.${i.type==="transaction"?"transaction":"event"}`,event_id:i.event_id,level:i.level,message:va(i)},{event:i})}}function uD(l,t){return function(a){if(ln()!==l)return;let r,c,u=typeof t=="object"?t.serializeAttribute:void 0,h=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;h&&h>uu&&(cu&&Tt.warn(`\`dom.maxStringLength\` cannot exceed ${uu}, but a value of ${h} was configured. Sentry will use ${uu} instead.`),h=uu),typeof u=="string"&&(u=[u]);try{const m=a.event,g=mD(m)?m.target:m;r=Qy(g,{keyAttrs:u,maxStringLength:h}),c=E1(g)}catch{r="<unknown>"}if(r.length===0)return;const p={category:`ui.${a.name}`,message:r};c&&(p.data={"ui.component_name":c}),Ea(p,{event:a.event,name:a.name,global:a.global})}}function dD(l){return function(i){if(ln()!==l)return;const a={category:"console",data:{arguments:i.args,logger:"console"},level:GC(i.level),message:Ky(i.args," ")};if(i.level==="assert")if(i.args[0]===!1)a.message=`Assertion failed: ${Ky(i.args.slice(1)," ")||"console.assert"}`,a.data.arguments=i.args.slice(1);else return;Ea(a,{input:i.args,level:i.level})}}function hD(l){return function(i){if(ln()!==l)return;const{startTimestamp:a,endTimestamp:r}=i,c=i.xhr[qo];if(!a||!r||!c)return;const{method:u,url:h,status_code:p,body:m}=c,g={method:u,url:h,status_code:p},y={xhr:i.xhr,input:m,startTimestamp:a,endTimestamp:r},b={category:"xhr",data:g,type:"http",level:av(p)};l.emit("beforeOutgoingRequestBreadcrumb",b,y),Ea(b,y)}}function fD(l){return function(i){if(ln()!==l)return;const{startTimestamp:a,endTimestamp:r}=i;if(r&&!(i.fetchData.url.match(/sentry_key/)&&i.fetchData.method==="POST"))if(i.fetchData.method,i.fetchData.url,i.error){const c=i.fetchData,u={data:i.error,input:i.args,startTimestamp:a,endTimestamp:r},h={category:"fetch",data:c,level:"error",type:"http"};l.emit("beforeOutgoingRequestBreadcrumb",h,u),Ea(h,u)}else{const c=i.response,u={...i.fetchData,status_code:c?.status};i.fetchData.request_body_size,i.fetchData.response_body_size,c?.status;const h={input:i.args,response:c,startTimestamp:a,endTimestamp:r},p={category:"fetch",data:u,type:"http",level:av(u.status_code)};l.emit("beforeOutgoingRequestBreadcrumb",p,h),Ea(p,h)}}}function pD(l){return function(i){if(ln()!==l)return;let a=i.from,r=i.to;const c=nf(Ae.location.href);let u=a?nf(a):void 0;const h=nf(r);u?.path||(u=c),c.protocol===h.protocol&&c.host===h.host&&(r=h.relative),c.protocol===u.protocol&&c.host===u.host&&(a=u.relative),Ea({category:"navigation",data:{from:a,to:r}})}}function mD(l){return!!l&&!!l.target}const gD=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],yD="BrowserApiErrors",bD=(l={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...l};return{name:yD,setupOnce(){t.setTimeout&&Zi(Ae,"setTimeout",Av),t.setInterval&&Zi(Ae,"setInterval",Av),t.requestAnimationFrame&&Zi(Ae,"requestAnimationFrame",vD),t.XMLHttpRequest&&"XMLHttpRequest"in Ae&&Zi(XMLHttpRequest.prototype,"send",SD);const i=t.eventTarget;i&&(Array.isArray(i)?i:gD).forEach(r=>ED(r,t))}}};function Av(l){return function(...t){const i=t[0];return t[0]=Er(i,{mechanism:{data:{function:Ms(l)},handled:!1,type:"instrument"}}),l.apply(this,t)}}function vD(l){return function(t){return l.apply(this,[Er(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Ms(l)},handled:!1,type:"instrument"}})])}}function SD(l){return function(...t){const i=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(r=>{r in i&&typeof i[r]=="function"&&Zi(i,r,function(c){const u={mechanism:{data:{function:r,handler:Ms(c)},handled:!1,type:"instrument"}},h=$h(c);return h&&(u.mechanism.data.handler=Ms(h)),Er(c,u)})}),l.apply(this,t)}}function ED(l,t){const a=Ae[l]?.prototype;a?.hasOwnProperty?.("addEventListener")&&(Zi(a,"addEventListener",function(r){return function(c,u,h){try{AD(u)&&(u.handleEvent=Er(u.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Ms(u),target:l},handled:!1,type:"instrument"}}))}catch{}return t.unregisterOriginalCallbacks&&_D(this,c,u),r.apply(this,[c,Er(u,{mechanism:{data:{function:"addEventListener",handler:Ms(u),target:l},handled:!1,type:"instrument"}}),h])}}),Zi(a,"removeEventListener",function(r){return function(c,u,h){try{const p=u.__sentry_wrapped__;p&&r.call(this,c,p,h)}catch{}return r.call(this,c,u,h)}}))}function AD(l){return typeof l.handleEvent=="function"}function _D(l,t,i){l&&typeof l=="object"&&"removeEventListener"in l&&typeof l.removeEventListener=="function"&&l.removeEventListener(t,i)}const TD=()=>({name:"BrowserSession",setupOnce(){if(typeof Ae.document>"u"){cu&&Tt.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}Lb({ignoreDuration:!0}),Ub(),vv(({from:l,to:t})=>{l!==void 0&&l!==t&&(Lb({ignoreDuration:!0}),Ub())})}}),wD="GlobalHandlers",xD=(l={})=>{const t={onerror:!0,onunhandledrejection:!0,...l};return{name:wD,setupOnce(){Error.stackTraceLimit=50},setup(i){t.onerror&&(CD(i),_v("onerror")),t.onunhandledrejection&&(RD(i),_v("onunhandledrejection"))}}};function CD(l){u1(t=>{const{stackParser:i,attachStacktrace:a}=Tv();if(ln()!==l||lv())return;const{msg:r,url:c,line:u,column:h,error:p}=t,m=OD(df(i,p||r,void 0,a,!1),c,u,h);m.level="error",Nb(m,{originalException:p,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}function RD(l){h1(t=>{const{stackParser:i,attachStacktrace:a}=Tv();if(ln()!==l||lv())return;const r=DD(t),c=Bh(r)?MD(r):df(i,r,void 0,a,!0);c.level="error",Nb(c,{originalException:r,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}function DD(l){if(Bh(l))return l;try{if("reason"in l)return l.reason;if("detail"in l&&"reason"in l.detail)return l.detail.reason}catch{}return l}function MD(l){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(l)}`}]}}}function OD(l,t,i,a){const r=l.exception=l.exception||{},c=r.values=r.values||[],u=c[0]=c[0]||{},h=u.stacktrace=u.stacktrace||{},p=h.frames=h.frames||[],m=a,g=i,y=kD(t)??jh();return p.length===0&&p.push({colno:m,filename:y,function:ba,in_app:!0,lineno:g}),l}function _v(l){cu&&Tt.log(`Global Handler attached: ${l}`)}function Tv(){return ln()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function kD(l){if(!(!Uo(l)||l.length===0)){if(l.startsWith("data:")){const t=l.match(/^data:([^;]+)/),i=t?t[1]:"text/javascript",a=l.includes("base64,");return`<data:${i}${a?",base64":""}>`}return l.slice(0,1024)}}const ND=()=>({name:"HttpContext",preprocessEvent(l){if(!Ae.navigator&&!Ae.location&&!Ae.document)return;const t=sR(),i={...t.headers,...l.request?.headers};l.request={...t,...l.request,headers:i}}}),LD="cause",ID=5,PD="LinkedErrors",UD=(l={})=>{const t=l.limit||ID,i=l.key||LD;return{name:PD,preprocessEvent(a,r,c){const u=c.getOptions();FC(lf,u.stackParser,i,t,a,r)}}};function zD(){return HD()?(cu&&pr(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0):!1}function HD(){if(typeof Ae.window>"u")return!1;const l=Ae;if(l.nw||!(l.chrome||l.browser)?.runtime?.id)return!1;const i=jh(),a=["chrome-extension","moz-extension","ms-browser-extension","safari-web-extension"];return!(Ae===Ae.top&&a.some(c=>i.startsWith(`${c}://`)))}function BD(l){return[NC(),DC(),bD(),lD(),xD(),UD(),qC(),ND(),TD()]}function FD(l={}){const t=!l.skipBrowserExtensionCheck&&zD(),i={...l,enabled:t?!1:l.enabled,stackParser:l1(l.stackParser||rD),integrations:sC({integrations:l.integrations,defaultIntegrations:l.defaultIntegrations==null?BD():l.defaultIntegrations}),transport:l.transport||QR};return mC(yR,i)}class jD{config;debug;logLevel;constructor(){this.config=Yt,this.debug=this.config.env!=="prd",this.logLevel=this.config.env==="hml"?1:2}getTimestamp(){return new Date().toLocaleString("pt-BR",{timeZone:"America/Sao_Paulo"}).replace(",","")}BASE="[⚡Corisco";info(t,...i){this.debug&&this.logLevel>=1&&console.log(`[${this.getTimestamp()}] ${this.BASE}] ${t}`,...i)}detail(t,...i){this.debug&&this.logLevel>=2&&console.log(`[${this.getTimestamp()}] ${this.BASE} Detail] ${t}`,...i)}warn(t,...i){this.debug&&console.warn(`[${this.getTimestamp()}] ${this.BASE} Warning] ${t}`,...i)}error(t,...i){this.debug&&console.error(`[${this.getTimestamp()}] ${this.BASE} Error] ${t}`,...i),kb(new Error(t),{extra:{args:i}})}}const O=new jD;function $D(){const l=Yt.action_map?.flatMap(t=>t.allowed_hosts||[]).filter(Boolean);return Array.from(new Set(l))}function wv(l){const t=$D();if(!l)return!1;O.info(`Verificando se a url "${l}" é permitida contra os padrões:`,t);for(const i of t){O.info(`Comparando com o padrão permitido: "${i}"`);try{if(new RegExp(i.slice(1,-1)).test(l))return O.info(`URL "${l}" é permitida pelo padrão: "${i}"`),!0}catch(a){O.error(`Padrão de host inválido: ${i}`,a)}}return O.info(`URL "${l}" não é permitida por nenhum padrão.`),!1}function GD(){const l=[];return Yt.action_map?.forEach(t=>{Object.keys(t.mapping).forEach(i=>{l.push({url:i,allowedHosts:t.allowed_hosts||[]})})}),l}function xv(l){try{const t=GD();O.info(`Verificando se a URL "${l}" está mapeada...`);for(const i of t)if(new RegExp(i.url.slice(1,-1)).test(l))for(const r of i.allowedHosts)try{if(new RegExp(r.slice(1,-1)).test(l))return O.info(`URL "${l}" está mapeada com o padrão: "${i.url}" e host permitido: "${r}"`),!0}catch(c){O.error(`Erro ao verificar host permitido: ${r}`,c)}return O.info(`URL "${l}" não está mapeada.`),!1}catch(t){return console.error("Erro ao verificar URL mapeada:",t),!1}}function VD(l){try{for(const t of Yt.action_map)if(t.allowed_hosts.some(()=>wv(l)))for(const[i,a]of Object.entries(t.mapping)){if(i==="/*"&&a===null)continue;if(new RegExp(i.slice(1,-1)).test(l))return t.actions.filter(u=>a.includes(u.job))}}catch(t){O.error("Erro ao obter actions para URL:",t)}return[]}function qD(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var _f={exports:{}},Xo={exports:{}};Xo.exports;var Cv;function XD(){return Cv||(Cv=1,function(l,t){/**
19
19
  * @license React
20
20
  * react.development.js
21
21
  *
@@ -23,7 +23,7 @@ Error:`,r)}}const DR=Object.prototype.toString;function MR(l,t){return DR.call(l
23
23
  *
24
24
  * This source code is licensed under the MIT license found in the
25
25
  * LICENSE file in the root directory of this source tree.
26
- */(function(){function i(T,P){Object.defineProperty(c.prototype,T,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",P[0],P[1])}})}function a(T){return T===null||typeof T!="object"?null:(T=Tn&&T[Tn]||T["@@iterator"],typeof T=="function"?T:null)}function r(T,P){T=(T=T.constructor)&&(T.displayName||T.name)||"ReactClass";var et=T+"."+P;mi[et]||(console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",P,T),mi[et]=!0)}function c(T,P,et){this.props=T,this.context=P,this.refs=Ma,this.updater=et||Pn}function u(){}function h(T,P,et){this.props=T,this.context=P,this.refs=Ma,this.updater=et||Pn}function p(T){return""+T}function m(T){try{p(T);var P=!1}catch{P=!0}if(P){P=console;var et=P.error,it=typeof Symbol=="function"&&Symbol.toStringTag&&T[Symbol.toStringTag]||T.constructor.name||"Object";return et.call(P,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",it),p(T)}}function g(T){if(T==null)return null;if(typeof T=="function")return T.$$typeof===fp?null:T.displayName||T.name||null;if(typeof T=="string")return T;switch(T){case W:return"Fragment";case st:return"Profiler";case ht:return"StrictMode";case tt:return"Suspense";case Wt:return"SuspenseList";case Xe:return"Activity"}if(typeof T=="object")switch(typeof T.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),T.$$typeof){case xt:return"Portal";case Zt:return(T.displayName||"Context")+".Provider";case vt:return(T._context.displayName||"Context")+".Consumer";case oe:var P=T.render;return T=T.displayName,T||(T=P.displayName||P.name||"",T=T!==""?"ForwardRef("+T+")":"ForwardRef"),T;case Vt:return P=T.displayName||null,P!==null?P:g(T.type)||"Memo";case be:P=T._payload,T=T._init;try{return g(T(P))}catch{}}return null}function y(T){if(T===W)return"<>";if(typeof T=="object"&&T!==null&&T.$$typeof===be)return"<...>";try{var P=g(T);return P?"<"+P+">":"<...>"}catch{return"<...>"}}function b(){var T=Pt.A;return T===null?null:T.getOwner()}function S(){return Error("react-stack-top-frame")}function A(T){if(Oa.call(T,"key")){var P=Object.getOwnPropertyDescriptor(T,"key").get;if(P&&P.isReactWarning)return!1}return T.key!==void 0}function _(T,P){function et(){Bs||(Bs=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",P))}et.isReactWarning=!0,Object.defineProperty(T,"key",{get:et,configurable:!0})}function R(){var T=g(this.type);return dl[T]||(dl[T]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),T=this.props.ref,T!==void 0?T:null}function C(T,P,et,it,ft,Lt,Ot,qt){return et=Lt.ref,T={$$typeof:dt,type:T,key:P,props:Lt,_owner:ft},(et!==void 0?et:null)!==null?Object.defineProperty(T,"ref",{enumerable:!1,get:R}):Object.defineProperty(T,"ref",{enumerable:!1,value:null}),T._store={},Object.defineProperty(T._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(T,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(T,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Ot}),Object.defineProperty(T,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:qt}),Object.freeze&&(Object.freeze(T.props),Object.freeze(T)),T}function N(T,P){return P=C(T.type,P,void 0,void 0,T._owner,T.props,T._debugStack,T._debugTask),T._store&&(P._store.validated=T._store.validated),P}function O(T){return typeof T=="object"&&T!==null&&T.$$typeof===dt}function U(T){var P={"=":"=0",":":"=2"};return"$"+T.replace(/[=:]/g,function(et){return P[et]})}function I(T,P){return typeof T=="object"&&T!==null&&T.key!=null?(m(T.key),U(""+T.key)):P.toString(36)}function j(){}function F(T){switch(T.status){case"fulfilled":return T.value;case"rejected":throw T.reason;default:switch(typeof T.status=="string"?T.then(j,j):(T.status="pending",T.then(function(P){T.status==="pending"&&(T.status="fulfilled",T.value=P)},function(P){T.status==="pending"&&(T.status="rejected",T.reason=P)})),T.status){case"fulfilled":return T.value;case"rejected":throw T.reason}}throw T}function J(T,P,et,it,ft){var Lt=typeof T;(Lt==="undefined"||Lt==="boolean")&&(T=null);var Ot=!1;if(T===null)Ot=!0;else switch(Lt){case"bigint":case"string":case"number":Ot=!0;break;case"object":switch(T.$$typeof){case dt:case xt:Ot=!0;break;case be:return Ot=T._init,J(Ot(T._payload),P,et,it,ft)}}if(Ot){Ot=T,ft=ft(Ot);var qt=it===""?"."+I(Ot,0):it;return Hs(ft)?(et="",qt!=null&&(et=qt.replace(pl,"$&/")+"/"),J(ft,P,et,"",function(Fe){return Fe})):ft!=null&&(O(ft)&&(ft.key!=null&&(Ot&&Ot.key===ft.key||m(ft.key)),et=N(ft,et+(ft.key==null||Ot&&Ot.key===ft.key?"":(""+ft.key).replace(pl,"$&/")+"/")+qt),it!==""&&Ot!=null&&O(Ot)&&Ot.key==null&&Ot._store&&!Ot._store.validated&&(et._store.validated=2),ft=et),P.push(ft)),1}if(Ot=0,qt=it===""?".":it+":",Hs(T))for(var kt=0;kt<T.length;kt++)it=T[kt],Lt=qt+I(it,kt),Ot+=J(it,P,et,Lt,ft);else if(kt=a(T),typeof kt=="function")for(kt===T.entries&&(fl||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),fl=!0),T=kt.call(T),kt=0;!(it=T.next()).done;)it=it.value,Lt=qt+I(it,kt++),Ot+=J(it,P,et,Lt,ft);else if(Lt==="object"){if(typeof T.then=="function")return J(F(T),P,et,it,ft);throw P=String(T),Error("Objects are not valid as a React child (found: "+(P==="[object Object]"?"object with keys {"+Object.keys(T).join(", ")+"}":P)+"). If you meant to render a collection of children, use an array instead.")}return Ot}function X(T,P,et){if(T==null)return T;var it=[],ft=0;return J(T,it,"","",function(Lt){return P.call(et,Lt,ft++)}),it}function at(T){if(T._status===-1){var P=T._result;P=P(),P.then(function(et){(T._status===0||T._status===-1)&&(T._status=1,T._result=et)},function(et){(T._status===0||T._status===-1)&&(T._status=2,T._result=et)}),T._status===-1&&(T._status=0,T._result=P)}if(T._status===1)return P=T._result,P===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
26
+ */(function(){function i(T,P){Object.defineProperty(c.prototype,T,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",P[0],P[1])}})}function a(T){return T===null||typeof T!="object"?null:(T=Tn&&T[Tn]||T["@@iterator"],typeof T=="function"?T:null)}function r(T,P){T=(T=T.constructor)&&(T.displayName||T.name)||"ReactClass";var et=T+"."+P;mi[et]||(console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",P,T),mi[et]=!0)}function c(T,P,et){this.props=T,this.context=P,this.refs=Ma,this.updater=et||Pn}function u(){}function h(T,P,et){this.props=T,this.context=P,this.refs=Ma,this.updater=et||Pn}function p(T){return""+T}function m(T){try{p(T);var P=!1}catch{P=!0}if(P){P=console;var et=P.error,it=typeof Symbol=="function"&&Symbol.toStringTag&&T[Symbol.toStringTag]||T.constructor.name||"Object";return et.call(P,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",it),p(T)}}function g(T){if(T==null)return null;if(typeof T=="function")return T.$$typeof===hp?null:T.displayName||T.name||null;if(typeof T=="string")return T;switch(T){case W:return"Fragment";case st:return"Profiler";case ht:return"StrictMode";case tt:return"Suspense";case Wt:return"SuspenseList";case Ye:return"Activity"}if(typeof T=="object")switch(typeof T.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),T.$$typeof){case Ct:return"Portal";case Zt:return(T.displayName||"Context")+".Provider";case vt:return(T._context.displayName||"Context")+".Consumer";case le:var P=T.render;return T=T.displayName,T||(T=P.displayName||P.name||"",T=T!==""?"ForwardRef("+T+")":"ForwardRef"),T;case Vt:return P=T.displayName||null,P!==null?P:g(T.type)||"Memo";case ve:P=T._payload,T=T._init;try{return g(T(P))}catch{}}return null}function y(T){if(T===W)return"<>";if(typeof T=="object"&&T!==null&&T.$$typeof===ve)return"<...>";try{var P=g(T);return P?"<"+P+">":"<...>"}catch{return"<...>"}}function b(){var T=Pt.A;return T===null?null:T.getOwner()}function S(){return Error("react-stack-top-frame")}function A(T){if(Oa.call(T,"key")){var P=Object.getOwnPropertyDescriptor(T,"key").get;if(P&&P.isReactWarning)return!1}return T.key!==void 0}function _(T,P){function et(){Bs||(Bs=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",P))}et.isReactWarning=!0,Object.defineProperty(T,"key",{get:et,configurable:!0})}function R(){var T=g(this.type);return dl[T]||(dl[T]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),T=this.props.ref,T!==void 0?T:null}function x(T,P,et,it,ft,Lt,Ot,qt){return et=Lt.ref,T={$$typeof:dt,type:T,key:P,props:Lt,_owner:ft},(et!==void 0?et:null)!==null?Object.defineProperty(T,"ref",{enumerable:!1,get:R}):Object.defineProperty(T,"ref",{enumerable:!1,value:null}),T._store={},Object.defineProperty(T._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(T,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(T,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Ot}),Object.defineProperty(T,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:qt}),Object.freeze&&(Object.freeze(T.props),Object.freeze(T)),T}function L(T,P){return P=x(T.type,P,void 0,void 0,T._owner,T.props,T._debugStack,T._debugTask),T._store&&(P._store.validated=T._store.validated),P}function k(T){return typeof T=="object"&&T!==null&&T.$$typeof===dt}function U(T){var P={"=":"=0",":":"=2"};return"$"+T.replace(/[=:]/g,function(et){return P[et]})}function I(T,P){return typeof T=="object"&&T!==null&&T.key!=null?(m(T.key),U(""+T.key)):P.toString(36)}function j(){}function F(T){switch(T.status){case"fulfilled":return T.value;case"rejected":throw T.reason;default:switch(typeof T.status=="string"?T.then(j,j):(T.status="pending",T.then(function(P){T.status==="pending"&&(T.status="fulfilled",T.value=P)},function(P){T.status==="pending"&&(T.status="rejected",T.reason=P)})),T.status){case"fulfilled":return T.value;case"rejected":throw T.reason}}throw T}function J(T,P,et,it,ft){var Lt=typeof T;(Lt==="undefined"||Lt==="boolean")&&(T=null);var Ot=!1;if(T===null)Ot=!0;else switch(Lt){case"bigint":case"string":case"number":Ot=!0;break;case"object":switch(T.$$typeof){case dt:case Ct:Ot=!0;break;case ve:return Ot=T._init,J(Ot(T._payload),P,et,it,ft)}}if(Ot){Ot=T,ft=ft(Ot);var qt=it===""?"."+I(Ot,0):it;return Hs(ft)?(et="",qt!=null&&(et=qt.replace(pl,"$&/")+"/"),J(ft,P,et,"",function(Fe){return Fe})):ft!=null&&(k(ft)&&(ft.key!=null&&(Ot&&Ot.key===ft.key||m(ft.key)),et=L(ft,et+(ft.key==null||Ot&&Ot.key===ft.key?"":(""+ft.key).replace(pl,"$&/")+"/")+qt),it!==""&&Ot!=null&&k(Ot)&&Ot.key==null&&Ot._store&&!Ot._store.validated&&(et._store.validated=2),ft=et),P.push(ft)),1}if(Ot=0,qt=it===""?".":it+":",Hs(T))for(var kt=0;kt<T.length;kt++)it=T[kt],Lt=qt+I(it,kt),Ot+=J(it,P,et,Lt,ft);else if(kt=a(T),typeof kt=="function")for(kt===T.entries&&(fl||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),fl=!0),T=kt.call(T),kt=0;!(it=T.next()).done;)it=it.value,Lt=qt+I(it,kt++),Ot+=J(it,P,et,Lt,ft);else if(Lt==="object"){if(typeof T.then=="function")return J(F(T),P,et,it,ft);throw P=String(T),Error("Objects are not valid as a React child (found: "+(P==="[object Object]"?"object with keys {"+Object.keys(T).join(", ")+"}":P)+"). If you meant to render a collection of children, use an array instead.")}return Ot}function Y(T,P,et){if(T==null)return T;var it=[],ft=0;return J(T,it,"","",function(Lt){return P.call(et,Lt,ft++)}),it}function at(T){if(T._status===-1){var P=T._result;P=P(),P.then(function(et){(T._status===0||T._status===-1)&&(T._status=1,T._result=et)},function(et){(T._status===0||T._status===-1)&&(T._status=2,T._result=et)}),T._status===-1&&(T._status=0,T._result=P)}if(T._status===1)return P=T._result,P===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
27
27
 
28
28
  Your code should look like:
29
29
  const MyComponent = lazy(() => import('./MyComponent'))
@@ -35,7 +35,7 @@ Your code should look like:
35
35
  1. You might have mismatching versions of React and the renderer (such as React DOM)
36
36
  2. You might be breaking the Rules of Hooks
37
37
  3. You might have more than one copy of React in the same app
38
- See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),T}function lt(){}function Et(T){if(Lr===null)try{var P=("require"+Math.random()).slice(0,7);Lr=(l&&l[P]).call(l,"timers").setImmediate}catch{Lr=function(it){ml===!1&&(ml=!0,typeof MessageChannel>"u"&&console.error("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var ft=new MessageChannel;ft.port1.onmessage=it,ft.port2.postMessage(void 0)}}return Lr(T)}function bt(T){return 1<T.length&&typeof AggregateError=="function"?new AggregateError(T):T[0]}function Gt(T,P){P!==Fs-1&&console.error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),Fs=P}function B(T,P,et){var it=Pt.actQueue;if(it!==null)if(it.length!==0)try{Q(it),Et(function(){return B(T,P,et)});return}catch(ft){Pt.thrownErrors.push(ft)}else Pt.actQueue=null;0<Pt.thrownErrors.length?(it=bt(Pt.thrownErrors),Pt.thrownErrors.length=0,et(it)):P(T)}function Q(T){if(!yi){yi=!0;var P=0;try{for(;P<T.length;P++){var et=T[P];do{Pt.didUsePromise=!1;var it=et(!1);if(it!==null){if(Pt.didUsePromise){T[P]=et,T.splice(0,P);return}et=it}else break}while(!0)}T.length=0}catch(ft){T.splice(0,P+1),Pt.thrownErrors.push(ft)}finally{yi=!1}}}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var dt=Symbol.for("react.transitional.element"),xt=Symbol.for("react.portal"),W=Symbol.for("react.fragment"),ht=Symbol.for("react.strict_mode"),st=Symbol.for("react.profiler"),vt=Symbol.for("react.consumer"),Zt=Symbol.for("react.context"),oe=Symbol.for("react.forward_ref"),tt=Symbol.for("react.suspense"),Wt=Symbol.for("react.suspense_list"),Vt=Symbol.for("react.memo"),be=Symbol.for("react.lazy"),Xe=Symbol.for("react.activity"),Tn=Symbol.iterator,mi={},Pn={isMounted:function(){return!1},enqueueForceUpdate:function(T){r(T,"forceUpdate")},enqueueReplaceState:function(T){r(T,"replaceState")},enqueueSetState:function(T){r(T,"setState")}},is=Object.assign,Ma={};Object.freeze(Ma),c.prototype.isReactComponent={},c.prototype.setState=function(T,P){if(typeof T!="object"&&typeof T!="function"&&T!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,T,P,"setState")},c.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,"forceUpdate")};var Ne={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},ss;for(ss in Ne)Ne.hasOwnProperty(ss)&&i(ss,Ne[ss]);u.prototype=c.prototype,Ne=h.prototype=new u,Ne.constructor=h,is(Ne,c.prototype),Ne.isPureReactComponent=!0;var Hs=Array.isArray,fp=Symbol.for("react.client.reference"),Pt={H:null,A:null,T:null,S:null,V:null,actQueue:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1,didUsePromise:!1,thrownErrors:[],getCurrentStack:null,recentlyCreatedOwnerStacks:0},Oa=Object.prototype.hasOwnProperty,kr=console.createTask?console.createTask:function(){return null};Ne={"react-stack-bottom-frame":function(T){return T()}};var Bs,Lu,dl={},Iu=Ne["react-stack-bottom-frame"].bind(Ne,S)(),hl=kr(y(S)),fl=!1,pl=/\/+/g,Nr=typeof reportError=="function"?reportError:function(T){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var P=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof T=="object"&&T!==null&&typeof T.message=="string"?String(T.message):String(T),error:T});if(!window.dispatchEvent(P))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",T);return}console.error(T)},ml=!1,Lr=null,Fs=0,gi=!1,yi=!1,js=typeof queueMicrotask=="function"?function(T){queueMicrotask(function(){return queueMicrotask(T)})}:Et;Ne=Object.freeze({__proto__:null,c:function(T){return K().useMemoCache(T)}}),t.Children={map:X,forEach:function(T,P,et){X(T,function(){P.apply(this,arguments)},et)},count:function(T){var P=0;return X(T,function(){P++}),P},toArray:function(T){return X(T,function(P){return P})||[]},only:function(T){if(!O(T))throw Error("React.Children.only expected to receive a single React element child.");return T}},t.Component=c,t.Fragment=W,t.Profiler=st,t.PureComponent=h,t.StrictMode=ht,t.Suspense=tt,t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Pt,t.__COMPILER_RUNTIME=Ne,t.act=function(T){var P=Pt.actQueue,et=Fs;Fs++;var it=Pt.actQueue=P!==null?P:[],ft=!1;try{var Lt=T()}catch(kt){Pt.thrownErrors.push(kt)}if(0<Pt.thrownErrors.length)throw Gt(P,et),T=bt(Pt.thrownErrors),Pt.thrownErrors.length=0,T;if(Lt!==null&&typeof Lt=="object"&&typeof Lt.then=="function"){var Ot=Lt;return js(function(){ft||gi||(gi=!0,console.error("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),{then:function(kt,Fe){ft=!0,Ot.then(function(as){if(Gt(P,et),et===0){try{Q(it),Et(function(){return B(as,kt,Fe)})}catch(mp){Pt.thrownErrors.push(mp)}if(0<Pt.thrownErrors.length){var pp=bt(Pt.thrownErrors);Pt.thrownErrors.length=0,Fe(pp)}}else kt(as)},function(as){Gt(P,et),0<Pt.thrownErrors.length&&(as=bt(Pt.thrownErrors),Pt.thrownErrors.length=0),Fe(as)})}}}var qt=Lt;if(Gt(P,et),et===0&&(Q(it),it.length!==0&&js(function(){ft||gi||(gi=!0,console.error("A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"))}),Pt.actQueue=null),0<Pt.thrownErrors.length)throw T=bt(Pt.thrownErrors),Pt.thrownErrors.length=0,T;return{then:function(kt,Fe){ft=!0,et===0?(Pt.actQueue=it,Et(function(){return B(qt,kt,Fe)})):kt(qt)}}},t.cache=function(T){return function(){return T.apply(null,arguments)}},t.captureOwnerStack=function(){var T=Pt.getCurrentStack;return T===null?null:T()},t.cloneElement=function(T,P,et){if(T==null)throw Error("The argument must be a React element, but you passed "+T+".");var it=is({},T.props),ft=T.key,Lt=T._owner;if(P!=null){var Ot;t:{if(Oa.call(P,"ref")&&(Ot=Object.getOwnPropertyDescriptor(P,"ref").get)&&Ot.isReactWarning){Ot=!1;break t}Ot=P.ref!==void 0}Ot&&(Lt=b()),A(P)&&(m(P.key),ft=""+P.key);for(qt in P)!Oa.call(P,qt)||qt==="key"||qt==="__self"||qt==="__source"||qt==="ref"&&P.ref===void 0||(it[qt]=P[qt])}var qt=arguments.length-2;if(qt===1)it.children=et;else if(1<qt){Ot=Array(qt);for(var kt=0;kt<qt;kt++)Ot[kt]=arguments[kt+2];it.children=Ot}for(it=C(T.type,ft,void 0,void 0,Lt,it,T._debugStack,T._debugTask),ft=2;ft<arguments.length;ft++)Lt=arguments[ft],O(Lt)&&Lt._store&&(Lt._store.validated=1);return it},t.createContext=function(T){return T={$$typeof:Zt,_currentValue:T,_currentValue2:T,_threadCount:0,Provider:null,Consumer:null},T.Provider=T,T.Consumer={$$typeof:vt,_context:T},T._currentRenderer=null,T._currentRenderer2=null,T},t.createElement=function(T,P,et){for(var it=2;it<arguments.length;it++){var ft=arguments[it];O(ft)&&ft._store&&(ft._store.validated=1)}if(it={},ft=null,P!=null)for(kt in Lu||!("__self"in P)||"key"in P||(Lu=!0,console.warn("Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform")),A(P)&&(m(P.key),ft=""+P.key),P)Oa.call(P,kt)&&kt!=="key"&&kt!=="__self"&&kt!=="__source"&&(it[kt]=P[kt]);var Lt=arguments.length-2;if(Lt===1)it.children=et;else if(1<Lt){for(var Ot=Array(Lt),qt=0;qt<Lt;qt++)Ot[qt]=arguments[qt+2];Object.freeze&&Object.freeze(Ot),it.children=Ot}if(T&&T.defaultProps)for(kt in Lt=T.defaultProps,Lt)it[kt]===void 0&&(it[kt]=Lt[kt]);ft&&_(it,typeof T=="function"?T.displayName||T.name||"Unknown":T);var kt=1e4>Pt.recentlyCreatedOwnerStacks++;return C(T,ft,void 0,void 0,b(),it,kt?Error("react-stack-top-frame"):Iu,kt?kr(y(T)):hl)},t.createRef=function(){var T={current:null};return Object.seal(T),T},t.forwardRef=function(T){T!=null&&T.$$typeof===Vt?console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof T!="function"?console.error("forwardRef requires a render function but was given %s.",T===null?"null":typeof T):T.length!==0&&T.length!==2&&console.error("forwardRef render functions accept exactly two parameters: props and ref. %s",T.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),T!=null&&T.defaultProps!=null&&console.error("forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?");var P={$$typeof:oe,render:T},et;return Object.defineProperty(P,"displayName",{enumerable:!1,configurable:!0,get:function(){return et},set:function(it){et=it,T.name||T.displayName||(Object.defineProperty(T,"name",{value:it}),T.displayName=it)}}),P},t.isValidElement=O,t.lazy=function(T){return{$$typeof:be,_payload:{_status:-1,_result:T},_init:at}},t.memo=function(T,P){T==null&&console.error("memo: The first argument must be a component. Instead received: %s",T===null?"null":typeof T),P={$$typeof:Vt,type:T,compare:P===void 0?null:P};var et;return Object.defineProperty(P,"displayName",{enumerable:!1,configurable:!0,get:function(){return et},set:function(it){et=it,T.name||T.displayName||(Object.defineProperty(T,"name",{value:it}),T.displayName=it)}}),P},t.startTransition=function(T){var P=Pt.T,et={};Pt.T=et,et._updatedFibers=new Set;try{var it=T(),ft=Pt.S;ft!==null&&ft(et,it),typeof it=="object"&&it!==null&&typeof it.then=="function"&&it.then(lt,Nr)}catch(Lt){Nr(Lt)}finally{P===null&&et._updatedFibers&&(T=et._updatedFibers.size,et._updatedFibers.clear(),10<T&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.")),Pt.T=P}},t.unstable_useCacheRefresh=function(){return K().useCacheRefresh()},t.use=function(T){return K().use(T)},t.useActionState=function(T,P,et){return K().useActionState(T,P,et)},t.useCallback=function(T,P){return K().useCallback(T,P)},t.useContext=function(T){var P=K();return T.$$typeof===vt&&console.error("Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"),P.useContext(T)},t.useDebugValue=function(T,P){return K().useDebugValue(T,P)},t.useDeferredValue=function(T,P){return K().useDeferredValue(T,P)},t.useEffect=function(T,P,et){T==null&&console.warn("React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?");var it=K();if(typeof et=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return it.useEffect(T,P)},t.useId=function(){return K().useId()},t.useImperativeHandle=function(T,P,et){return K().useImperativeHandle(T,P,et)},t.useInsertionEffect=function(T,P){return T==null&&console.warn("React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"),K().useInsertionEffect(T,P)},t.useLayoutEffect=function(T,P){return T==null&&console.warn("React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"),K().useLayoutEffect(T,P)},t.useMemo=function(T,P){return K().useMemo(T,P)},t.useOptimistic=function(T,P){return K().useOptimistic(T,P)},t.useReducer=function(T,P,et){return K().useReducer(T,P,et)},t.useRef=function(T){return K().useRef(T)},t.useState=function(T){return K().useState(T)},t.useSyncExternalStore=function(T,P,et){return K().useSyncExternalStore(T,P,et)},t.useTransition=function(){return K().useTransition()},t.version="19.1.0",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()}(Yo,Yo.exports)),Yo.exports}var Mv;function du(){return Mv||(Mv=1,Af.exports=YD()),Af.exports}var En=du();const XD=qD(En);var _f={exports:{}},Xo={},Tf={exports:{}},wf={},Ov;function WD(){return Ov||(Ov=1,function(l){/**
38
+ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),T}function lt(){}function Et(T){if(Lr===null)try{var P=("require"+Math.random()).slice(0,7);Lr=(l&&l[P]).call(l,"timers").setImmediate}catch{Lr=function(it){ml===!1&&(ml=!0,typeof MessageChannel>"u"&&console.error("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var ft=new MessageChannel;ft.port1.onmessage=it,ft.port2.postMessage(void 0)}}return Lr(T)}function bt(T){return 1<T.length&&typeof AggregateError=="function"?new AggregateError(T):T[0]}function Gt(T,P){P!==Fs-1&&console.error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),Fs=P}function B(T,P,et){var it=Pt.actQueue;if(it!==null)if(it.length!==0)try{Q(it),Et(function(){return B(T,P,et)});return}catch(ft){Pt.thrownErrors.push(ft)}else Pt.actQueue=null;0<Pt.thrownErrors.length?(it=bt(Pt.thrownErrors),Pt.thrownErrors.length=0,et(it)):P(T)}function Q(T){if(!yi){yi=!0;var P=0;try{for(;P<T.length;P++){var et=T[P];do{Pt.didUsePromise=!1;var it=et(!1);if(it!==null){if(Pt.didUsePromise){T[P]=et,T.splice(0,P);return}et=it}else break}while(!0)}T.length=0}catch(ft){T.splice(0,P+1),Pt.thrownErrors.push(ft)}finally{yi=!1}}}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var dt=Symbol.for("react.transitional.element"),Ct=Symbol.for("react.portal"),W=Symbol.for("react.fragment"),ht=Symbol.for("react.strict_mode"),st=Symbol.for("react.profiler"),vt=Symbol.for("react.consumer"),Zt=Symbol.for("react.context"),le=Symbol.for("react.forward_ref"),tt=Symbol.for("react.suspense"),Wt=Symbol.for("react.suspense_list"),Vt=Symbol.for("react.memo"),ve=Symbol.for("react.lazy"),Ye=Symbol.for("react.activity"),Tn=Symbol.iterator,mi={},Pn={isMounted:function(){return!1},enqueueForceUpdate:function(T){r(T,"forceUpdate")},enqueueReplaceState:function(T){r(T,"replaceState")},enqueueSetState:function(T){r(T,"setState")}},is=Object.assign,Ma={};Object.freeze(Ma),c.prototype.isReactComponent={},c.prototype.setState=function(T,P){if(typeof T!="object"&&typeof T!="function"&&T!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,T,P,"setState")},c.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,"forceUpdate")};var Ne={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},ss;for(ss in Ne)Ne.hasOwnProperty(ss)&&i(ss,Ne[ss]);u.prototype=c.prototype,Ne=h.prototype=new u,Ne.constructor=h,is(Ne,c.prototype),Ne.isPureReactComponent=!0;var Hs=Array.isArray,hp=Symbol.for("react.client.reference"),Pt={H:null,A:null,T:null,S:null,V:null,actQueue:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1,didUsePromise:!1,thrownErrors:[],getCurrentStack:null,recentlyCreatedOwnerStacks:0},Oa=Object.prototype.hasOwnProperty,kr=console.createTask?console.createTask:function(){return null};Ne={"react-stack-bottom-frame":function(T){return T()}};var Bs,Iu,dl={},Pu=Ne["react-stack-bottom-frame"].bind(Ne,S)(),hl=kr(y(S)),fl=!1,pl=/\/+/g,Nr=typeof reportError=="function"?reportError:function(T){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var P=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof T=="object"&&T!==null&&typeof T.message=="string"?String(T.message):String(T),error:T});if(!window.dispatchEvent(P))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",T);return}console.error(T)},ml=!1,Lr=null,Fs=0,gi=!1,yi=!1,js=typeof queueMicrotask=="function"?function(T){queueMicrotask(function(){return queueMicrotask(T)})}:Et;Ne=Object.freeze({__proto__:null,c:function(T){return K().useMemoCache(T)}}),t.Children={map:Y,forEach:function(T,P,et){Y(T,function(){P.apply(this,arguments)},et)},count:function(T){var P=0;return Y(T,function(){P++}),P},toArray:function(T){return Y(T,function(P){return P})||[]},only:function(T){if(!k(T))throw Error("React.Children.only expected to receive a single React element child.");return T}},t.Component=c,t.Fragment=W,t.Profiler=st,t.PureComponent=h,t.StrictMode=ht,t.Suspense=tt,t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Pt,t.__COMPILER_RUNTIME=Ne,t.act=function(T){var P=Pt.actQueue,et=Fs;Fs++;var it=Pt.actQueue=P!==null?P:[],ft=!1;try{var Lt=T()}catch(kt){Pt.thrownErrors.push(kt)}if(0<Pt.thrownErrors.length)throw Gt(P,et),T=bt(Pt.thrownErrors),Pt.thrownErrors.length=0,T;if(Lt!==null&&typeof Lt=="object"&&typeof Lt.then=="function"){var Ot=Lt;return js(function(){ft||gi||(gi=!0,console.error("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),{then:function(kt,Fe){ft=!0,Ot.then(function(as){if(Gt(P,et),et===0){try{Q(it),Et(function(){return B(as,kt,Fe)})}catch(pp){Pt.thrownErrors.push(pp)}if(0<Pt.thrownErrors.length){var fp=bt(Pt.thrownErrors);Pt.thrownErrors.length=0,Fe(fp)}}else kt(as)},function(as){Gt(P,et),0<Pt.thrownErrors.length&&(as=bt(Pt.thrownErrors),Pt.thrownErrors.length=0),Fe(as)})}}}var qt=Lt;if(Gt(P,et),et===0&&(Q(it),it.length!==0&&js(function(){ft||gi||(gi=!0,console.error("A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"))}),Pt.actQueue=null),0<Pt.thrownErrors.length)throw T=bt(Pt.thrownErrors),Pt.thrownErrors.length=0,T;return{then:function(kt,Fe){ft=!0,et===0?(Pt.actQueue=it,Et(function(){return B(qt,kt,Fe)})):kt(qt)}}},t.cache=function(T){return function(){return T.apply(null,arguments)}},t.captureOwnerStack=function(){var T=Pt.getCurrentStack;return T===null?null:T()},t.cloneElement=function(T,P,et){if(T==null)throw Error("The argument must be a React element, but you passed "+T+".");var it=is({},T.props),ft=T.key,Lt=T._owner;if(P!=null){var Ot;t:{if(Oa.call(P,"ref")&&(Ot=Object.getOwnPropertyDescriptor(P,"ref").get)&&Ot.isReactWarning){Ot=!1;break t}Ot=P.ref!==void 0}Ot&&(Lt=b()),A(P)&&(m(P.key),ft=""+P.key);for(qt in P)!Oa.call(P,qt)||qt==="key"||qt==="__self"||qt==="__source"||qt==="ref"&&P.ref===void 0||(it[qt]=P[qt])}var qt=arguments.length-2;if(qt===1)it.children=et;else if(1<qt){Ot=Array(qt);for(var kt=0;kt<qt;kt++)Ot[kt]=arguments[kt+2];it.children=Ot}for(it=x(T.type,ft,void 0,void 0,Lt,it,T._debugStack,T._debugTask),ft=2;ft<arguments.length;ft++)Lt=arguments[ft],k(Lt)&&Lt._store&&(Lt._store.validated=1);return it},t.createContext=function(T){return T={$$typeof:Zt,_currentValue:T,_currentValue2:T,_threadCount:0,Provider:null,Consumer:null},T.Provider=T,T.Consumer={$$typeof:vt,_context:T},T._currentRenderer=null,T._currentRenderer2=null,T},t.createElement=function(T,P,et){for(var it=2;it<arguments.length;it++){var ft=arguments[it];k(ft)&&ft._store&&(ft._store.validated=1)}if(it={},ft=null,P!=null)for(kt in Iu||!("__self"in P)||"key"in P||(Iu=!0,console.warn("Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform")),A(P)&&(m(P.key),ft=""+P.key),P)Oa.call(P,kt)&&kt!=="key"&&kt!=="__self"&&kt!=="__source"&&(it[kt]=P[kt]);var Lt=arguments.length-2;if(Lt===1)it.children=et;else if(1<Lt){for(var Ot=Array(Lt),qt=0;qt<Lt;qt++)Ot[qt]=arguments[qt+2];Object.freeze&&Object.freeze(Ot),it.children=Ot}if(T&&T.defaultProps)for(kt in Lt=T.defaultProps,Lt)it[kt]===void 0&&(it[kt]=Lt[kt]);ft&&_(it,typeof T=="function"?T.displayName||T.name||"Unknown":T);var kt=1e4>Pt.recentlyCreatedOwnerStacks++;return x(T,ft,void 0,void 0,b(),it,kt?Error("react-stack-top-frame"):Pu,kt?kr(y(T)):hl)},t.createRef=function(){var T={current:null};return Object.seal(T),T},t.forwardRef=function(T){T!=null&&T.$$typeof===Vt?console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof T!="function"?console.error("forwardRef requires a render function but was given %s.",T===null?"null":typeof T):T.length!==0&&T.length!==2&&console.error("forwardRef render functions accept exactly two parameters: props and ref. %s",T.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),T!=null&&T.defaultProps!=null&&console.error("forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?");var P={$$typeof:le,render:T},et;return Object.defineProperty(P,"displayName",{enumerable:!1,configurable:!0,get:function(){return et},set:function(it){et=it,T.name||T.displayName||(Object.defineProperty(T,"name",{value:it}),T.displayName=it)}}),P},t.isValidElement=k,t.lazy=function(T){return{$$typeof:ve,_payload:{_status:-1,_result:T},_init:at}},t.memo=function(T,P){T==null&&console.error("memo: The first argument must be a component. Instead received: %s",T===null?"null":typeof T),P={$$typeof:Vt,type:T,compare:P===void 0?null:P};var et;return Object.defineProperty(P,"displayName",{enumerable:!1,configurable:!0,get:function(){return et},set:function(it){et=it,T.name||T.displayName||(Object.defineProperty(T,"name",{value:it}),T.displayName=it)}}),P},t.startTransition=function(T){var P=Pt.T,et={};Pt.T=et,et._updatedFibers=new Set;try{var it=T(),ft=Pt.S;ft!==null&&ft(et,it),typeof it=="object"&&it!==null&&typeof it.then=="function"&&it.then(lt,Nr)}catch(Lt){Nr(Lt)}finally{P===null&&et._updatedFibers&&(T=et._updatedFibers.size,et._updatedFibers.clear(),10<T&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.")),Pt.T=P}},t.unstable_useCacheRefresh=function(){return K().useCacheRefresh()},t.use=function(T){return K().use(T)},t.useActionState=function(T,P,et){return K().useActionState(T,P,et)},t.useCallback=function(T,P){return K().useCallback(T,P)},t.useContext=function(T){var P=K();return T.$$typeof===vt&&console.error("Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"),P.useContext(T)},t.useDebugValue=function(T,P){return K().useDebugValue(T,P)},t.useDeferredValue=function(T,P){return K().useDeferredValue(T,P)},t.useEffect=function(T,P,et){T==null&&console.warn("React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?");var it=K();if(typeof et=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return it.useEffect(T,P)},t.useId=function(){return K().useId()},t.useImperativeHandle=function(T,P,et){return K().useImperativeHandle(T,P,et)},t.useInsertionEffect=function(T,P){return T==null&&console.warn("React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"),K().useInsertionEffect(T,P)},t.useLayoutEffect=function(T,P){return T==null&&console.warn("React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"),K().useLayoutEffect(T,P)},t.useMemo=function(T,P){return K().useMemo(T,P)},t.useOptimistic=function(T,P){return K().useOptimistic(T,P)},t.useReducer=function(T,P,et){return K().useReducer(T,P,et)},t.useRef=function(T){return K().useRef(T)},t.useState=function(T){return K().useState(T)},t.useSyncExternalStore=function(T,P,et){return K().useSyncExternalStore(T,P,et)},t.useTransition=function(){return K().useTransition()},t.version="19.1.0",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()}(Xo,Xo.exports)),Xo.exports}var Rv;function du(){return Rv||(Rv=1,_f.exports=XD()),_f.exports}var En=du();const YD=qD(En);var Tf={exports:{}},Yo={},wf={exports:{}},xf={},Dv;function WD(){return Dv||(Dv=1,function(l){/**
39
39
  * @license React
40
40
  * scheduler.development.js
41
41
  *
@@ -43,7 +43,7 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
43
43
  *
44
44
  * This source code is licensed under the MIT license found in the
45
45
  * LICENSE file in the root directory of this source tree.
46
- */(function(){function t(){if(I=!1,X){var B=l.unstable_now();lt=B;var Q=!0;try{t:{O=!1,U&&(U=!1,F(at),at=-1),N=!0;var dt=C;try{e:{for(u(B),R=a(S);R!==null&&!(R.expirationTime>B&&p());){var xt=R.callback;if(typeof xt=="function"){R.callback=null,C=R.priorityLevel;var W=xt(R.expirationTime<=B);if(B=l.unstable_now(),typeof W=="function"){R.callback=W,u(B),Q=!0;break e}R===a(S)&&r(S),u(B)}else r(S);R=a(S)}if(R!==null)Q=!0;else{var ht=a(A);ht!==null&&m(h,ht.startTime-B),Q=!1}}break t}finally{R=null,C=dt,N=!1}Q=void 0}}finally{Q?Et():X=!1}}}function i(B,Q){var dt=B.length;B.push(Q);t:for(;0<dt;){var xt=dt-1>>>1,W=B[xt];if(0<c(W,Q))B[xt]=Q,B[dt]=W,dt=xt;else break t}}function a(B){return B.length===0?null:B[0]}function r(B){if(B.length===0)return null;var Q=B[0],dt=B.pop();if(dt!==Q){B[0]=dt;t:for(var xt=0,W=B.length,ht=W>>>1;xt<ht;){var st=2*(xt+1)-1,vt=B[st],Zt=st+1,oe=B[Zt];if(0>c(vt,dt))Zt<W&&0>c(oe,vt)?(B[xt]=oe,B[Zt]=dt,xt=Zt):(B[xt]=vt,B[st]=dt,xt=st);else if(Zt<W&&0>c(oe,dt))B[xt]=oe,B[Zt]=dt,xt=Zt;else break t}}return Q}function c(B,Q){var dt=B.sortIndex-Q.sortIndex;return dt!==0?dt:B.id-Q.id}function u(B){for(var Q=a(A);Q!==null;){if(Q.callback===null)r(A);else if(Q.startTime<=B)r(A),Q.sortIndex=Q.expirationTime,i(S,Q);else break;Q=a(A)}}function h(B){if(U=!1,u(B),!O)if(a(S)!==null)O=!0,X||(X=!0,Et());else{var Q=a(A);Q!==null&&m(h,Q.startTime-B)}}function p(){return I?!0:!(l.unstable_now()-lt<K)}function m(B,Q){at=j(function(){B(l.unstable_now())},Q)}if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()),l.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var g=performance;l.unstable_now=function(){return g.now()}}else{var y=Date,b=y.now();l.unstable_now=function(){return y.now()-b}}var S=[],A=[],_=1,R=null,C=3,N=!1,O=!1,U=!1,I=!1,j=typeof setTimeout=="function"?setTimeout:null,F=typeof clearTimeout=="function"?clearTimeout:null,J=typeof setImmediate<"u"?setImmediate:null,X=!1,at=-1,K=5,lt=-1;if(typeof J=="function")var Et=function(){J(t)};else if(typeof MessageChannel<"u"){var bt=new MessageChannel,Gt=bt.port2;bt.port1.onmessage=t,Et=function(){Gt.postMessage(null)}}else Et=function(){j(t,0)};l.unstable_IdlePriority=5,l.unstable_ImmediatePriority=1,l.unstable_LowPriority=4,l.unstable_NormalPriority=3,l.unstable_Profiling=null,l.unstable_UserBlockingPriority=2,l.unstable_cancelCallback=function(B){B.callback=null},l.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):K=0<B?Math.floor(1e3/B):5},l.unstable_getCurrentPriorityLevel=function(){return C},l.unstable_next=function(B){switch(C){case 1:case 2:case 3:var Q=3;break;default:Q=C}var dt=C;C=Q;try{return B()}finally{C=dt}},l.unstable_requestPaint=function(){I=!0},l.unstable_runWithPriority=function(B,Q){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var dt=C;C=B;try{return Q()}finally{C=dt}},l.unstable_scheduleCallback=function(B,Q,dt){var xt=l.unstable_now();switch(typeof dt=="object"&&dt!==null?(dt=dt.delay,dt=typeof dt=="number"&&0<dt?xt+dt:xt):dt=xt,B){case 1:var W=-1;break;case 2:W=250;break;case 5:W=1073741823;break;case 4:W=1e4;break;default:W=5e3}return W=dt+W,B={id:_++,callback:Q,priorityLevel:B,startTime:dt,expirationTime:W,sortIndex:-1},dt>xt?(B.sortIndex=dt,i(A,B),a(S)===null&&B===a(A)&&(U?(F(at),at=-1):U=!0,m(h,dt-xt))):(B.sortIndex=W,i(S,B),O||N||(O=!0,X||(X=!0,Et()))),B},l.unstable_shouldYield=p,l.unstable_wrapCallback=function(B){var Q=C;return function(){var dt=C;C=Q;try{return B.apply(this,arguments)}finally{C=dt}}},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()}(wf)),wf}var kv;function QD(){return kv||(kv=1,Tf.exports=WD()),Tf.exports}var Cf={exports:{}},nn={},Nv;function KD(){if(Nv)return nn;Nv=1;/**
46
+ */(function(){function t(){if(I=!1,Y){var B=l.unstable_now();lt=B;var Q=!0;try{t:{k=!1,U&&(U=!1,F(at),at=-1),L=!0;var dt=x;try{e:{for(u(B),R=a(S);R!==null&&!(R.expirationTime>B&&p());){var Ct=R.callback;if(typeof Ct=="function"){R.callback=null,x=R.priorityLevel;var W=Ct(R.expirationTime<=B);if(B=l.unstable_now(),typeof W=="function"){R.callback=W,u(B),Q=!0;break e}R===a(S)&&r(S),u(B)}else r(S);R=a(S)}if(R!==null)Q=!0;else{var ht=a(A);ht!==null&&m(h,ht.startTime-B),Q=!1}}break t}finally{R=null,x=dt,L=!1}Q=void 0}}finally{Q?Et():Y=!1}}}function i(B,Q){var dt=B.length;B.push(Q);t:for(;0<dt;){var Ct=dt-1>>>1,W=B[Ct];if(0<c(W,Q))B[Ct]=Q,B[dt]=W,dt=Ct;else break t}}function a(B){return B.length===0?null:B[0]}function r(B){if(B.length===0)return null;var Q=B[0],dt=B.pop();if(dt!==Q){B[0]=dt;t:for(var Ct=0,W=B.length,ht=W>>>1;Ct<ht;){var st=2*(Ct+1)-1,vt=B[st],Zt=st+1,le=B[Zt];if(0>c(vt,dt))Zt<W&&0>c(le,vt)?(B[Ct]=le,B[Zt]=dt,Ct=Zt):(B[Ct]=vt,B[st]=dt,Ct=st);else if(Zt<W&&0>c(le,dt))B[Ct]=le,B[Zt]=dt,Ct=Zt;else break t}}return Q}function c(B,Q){var dt=B.sortIndex-Q.sortIndex;return dt!==0?dt:B.id-Q.id}function u(B){for(var Q=a(A);Q!==null;){if(Q.callback===null)r(A);else if(Q.startTime<=B)r(A),Q.sortIndex=Q.expirationTime,i(S,Q);else break;Q=a(A)}}function h(B){if(U=!1,u(B),!k)if(a(S)!==null)k=!0,Y||(Y=!0,Et());else{var Q=a(A);Q!==null&&m(h,Q.startTime-B)}}function p(){return I?!0:!(l.unstable_now()-lt<K)}function m(B,Q){at=j(function(){B(l.unstable_now())},Q)}if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()),l.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var g=performance;l.unstable_now=function(){return g.now()}}else{var y=Date,b=y.now();l.unstable_now=function(){return y.now()-b}}var S=[],A=[],_=1,R=null,x=3,L=!1,k=!1,U=!1,I=!1,j=typeof setTimeout=="function"?setTimeout:null,F=typeof clearTimeout=="function"?clearTimeout:null,J=typeof setImmediate<"u"?setImmediate:null,Y=!1,at=-1,K=5,lt=-1;if(typeof J=="function")var Et=function(){J(t)};else if(typeof MessageChannel<"u"){var bt=new MessageChannel,Gt=bt.port2;bt.port1.onmessage=t,Et=function(){Gt.postMessage(null)}}else Et=function(){j(t,0)};l.unstable_IdlePriority=5,l.unstable_ImmediatePriority=1,l.unstable_LowPriority=4,l.unstable_NormalPriority=3,l.unstable_Profiling=null,l.unstable_UserBlockingPriority=2,l.unstable_cancelCallback=function(B){B.callback=null},l.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):K=0<B?Math.floor(1e3/B):5},l.unstable_getCurrentPriorityLevel=function(){return x},l.unstable_next=function(B){switch(x){case 1:case 2:case 3:var Q=3;break;default:Q=x}var dt=x;x=Q;try{return B()}finally{x=dt}},l.unstable_requestPaint=function(){I=!0},l.unstable_runWithPriority=function(B,Q){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var dt=x;x=B;try{return Q()}finally{x=dt}},l.unstable_scheduleCallback=function(B,Q,dt){var Ct=l.unstable_now();switch(typeof dt=="object"&&dt!==null?(dt=dt.delay,dt=typeof dt=="number"&&0<dt?Ct+dt:Ct):dt=Ct,B){case 1:var W=-1;break;case 2:W=250;break;case 5:W=1073741823;break;case 4:W=1e4;break;default:W=5e3}return W=dt+W,B={id:_++,callback:Q,priorityLevel:B,startTime:dt,expirationTime:W,sortIndex:-1},dt>Ct?(B.sortIndex=dt,i(A,B),a(S)===null&&B===a(A)&&(U?(F(at),at=-1):U=!0,m(h,dt-Ct))):(B.sortIndex=W,i(S,B),k||L||(k=!0,Y||(Y=!0,Et()))),B},l.unstable_shouldYield=p,l.unstable_wrapCallback=function(B){var Q=x;return function(){var dt=x;x=Q;try{return B.apply(this,arguments)}finally{x=dt}}},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()}(xf)),xf}var Mv;function QD(){return Mv||(Mv=1,wf.exports=WD()),wf.exports}var Cf={exports:{}},nn={},Ov;function KD(){if(Ov)return nn;Ov=1;/**
47
47
  * @license React
48
48
  * react-dom.development.js
49
49
  *
@@ -55,7 +55,7 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
55
55
  1. You might have mismatching versions of React and the renderer (such as React DOM)
56
56
  2. You might be breaking the Rules of Hooks
57
57
  3. You might have more than one copy of React in the same app
58
- See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),y}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var h=du(),p={d:{f:l,r:function(){throw Error("Invalid form element. requestFormReset must be passed a form that was rendered by React.")},D:l,C:l,L:l,m:l,X:l,S:l,M:l},p:0,findDOMNode:null},m=Symbol.for("react.portal"),g=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;typeof Map=="function"&&Map.prototype!=null&&typeof Map.prototype.forEach=="function"&&typeof Set=="function"&&Set.prototype!=null&&typeof Set.prototype.clear=="function"&&typeof Set.prototype.forEach=="function"||console.error("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),nn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=p,nn.createPortal=function(y,b){var S=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!b||b.nodeType!==1&&b.nodeType!==9&&b.nodeType!==11)throw Error("Target container is not a DOM element.");return i(y,b,null,S)},nn.flushSync=function(y){var b=g.T,S=p.p;try{if(g.T=null,p.p=2,y)return y()}finally{g.T=b,p.p=S,p.d.f()&&console.error("flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task.")}},nn.preconnect=function(y,b){typeof y=="string"&&y?b!=null&&typeof b!="object"?console.error("ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.",c(b)):b!=null&&typeof b.crossOrigin!="string"&&console.error("ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.",r(b.crossOrigin)):console.error("ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",r(y)),typeof y=="string"&&(b?(b=b.crossOrigin,b=typeof b=="string"?b==="use-credentials"?b:"":void 0):b=null,p.d.C(y,b))},nn.prefetchDNS=function(y){if(typeof y!="string"||!y)console.error("ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",r(y));else if(1<arguments.length){var b=arguments[1];typeof b=="object"&&b.hasOwnProperty("crossOrigin")?console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",c(b)):console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",c(b))}typeof y=="string"&&p.d.D(y)},nn.preinit=function(y,b){if(typeof y=="string"&&y?b==null||typeof b!="object"?console.error("ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.",c(b)):b.as!=="style"&&b.as!=="script"&&console.error('ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".',c(b.as)):console.error("ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",r(y)),typeof y=="string"&&b&&typeof b.as=="string"){var S=b.as,A=a(S,b.crossOrigin),_=typeof b.integrity=="string"?b.integrity:void 0,R=typeof b.fetchPriority=="string"?b.fetchPriority:void 0;S==="style"?p.d.S(y,typeof b.precedence=="string"?b.precedence:void 0,{crossOrigin:A,integrity:_,fetchPriority:R}):S==="script"&&p.d.X(y,{crossOrigin:A,integrity:_,fetchPriority:R,nonce:typeof b.nonce=="string"?b.nonce:void 0})}},nn.preinitModule=function(y,b){var S="";if(typeof y=="string"&&y||(S+=" The `href` argument encountered was "+r(y)+"."),b!==void 0&&typeof b!="object"?S+=" The `options` argument encountered was "+r(b)+".":b&&"as"in b&&b.as!=="script"&&(S+=" The `as` option encountered was "+c(b.as)+"."),S)console.error("ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s",S);else switch(S=b&&typeof b.as=="string"?b.as:"script",S){case"script":break;default:S=c(S),console.error('ReactDOM.preinitModule(): Currently the only supported "as" type for this function is "script" but received "%s" instead. This warning was generated for `href` "%s". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)',S,y)}typeof y=="string"&&(typeof b=="object"&&b!==null?(b.as==null||b.as==="script")&&(S=a(b.as,b.crossOrigin),p.d.M(y,{crossOrigin:S,integrity:typeof b.integrity=="string"?b.integrity:void 0,nonce:typeof b.nonce=="string"?b.nonce:void 0})):b==null&&p.d.M(y))},nn.preload=function(y,b){var S="";if(typeof y=="string"&&y||(S+=" The `href` argument encountered was "+r(y)+"."),b==null||typeof b!="object"?S+=" The `options` argument encountered was "+r(b)+".":typeof b.as=="string"&&b.as||(S+=" The `as` option encountered was "+r(b.as)+"."),S&&console.error('ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel="preload" as="..." />` tag.%s',S),typeof y=="string"&&typeof b=="object"&&b!==null&&typeof b.as=="string"){S=b.as;var A=a(S,b.crossOrigin);p.d.L(y,S,{crossOrigin:A,integrity:typeof b.integrity=="string"?b.integrity:void 0,nonce:typeof b.nonce=="string"?b.nonce:void 0,type:typeof b.type=="string"?b.type:void 0,fetchPriority:typeof b.fetchPriority=="string"?b.fetchPriority:void 0,referrerPolicy:typeof b.referrerPolicy=="string"?b.referrerPolicy:void 0,imageSrcSet:typeof b.imageSrcSet=="string"?b.imageSrcSet:void 0,imageSizes:typeof b.imageSizes=="string"?b.imageSizes:void 0,media:typeof b.media=="string"?b.media:void 0})}},nn.preloadModule=function(y,b){var S="";typeof y=="string"&&y||(S+=" The `href` argument encountered was "+r(y)+"."),b!==void 0&&typeof b!="object"?S+=" The `options` argument encountered was "+r(b)+".":b&&"as"in b&&typeof b.as!="string"&&(S+=" The `as` option encountered was "+r(b.as)+"."),S&&console.error('ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel="modulepreload" as="..." />` tag.%s',S),typeof y=="string"&&(b?(S=a(b.as,b.crossOrigin),p.d.m(y,{as:typeof b.as=="string"&&b.as!=="script"?b.as:void 0,crossOrigin:S,integrity:typeof b.integrity=="string"?b.integrity:void 0})):p.d.m(y))},nn.requestFormReset=function(y){p.d.r(y)},nn.unstable_batchedUpdates=function(y,b){return y(b)},nn.useFormState=function(y,b,S){return u().useFormState(y,b,S)},nn.useFormStatus=function(){return u().useHostTransitionStatus()},nn.version="19.1.0",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}(),nn}var Lv;function ZD(){return Lv||(Lv=1,Cf.exports=KD()),Cf.exports}var Iv;function JD(){if(Iv)return Xo;Iv=1;/**
58
+ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),y}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var h=du(),p={d:{f:l,r:function(){throw Error("Invalid form element. requestFormReset must be passed a form that was rendered by React.")},D:l,C:l,L:l,m:l,X:l,S:l,M:l},p:0,findDOMNode:null},m=Symbol.for("react.portal"),g=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;typeof Map=="function"&&Map.prototype!=null&&typeof Map.prototype.forEach=="function"&&typeof Set=="function"&&Set.prototype!=null&&typeof Set.prototype.clear=="function"&&typeof Set.prototype.forEach=="function"||console.error("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),nn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=p,nn.createPortal=function(y,b){var S=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!b||b.nodeType!==1&&b.nodeType!==9&&b.nodeType!==11)throw Error("Target container is not a DOM element.");return i(y,b,null,S)},nn.flushSync=function(y){var b=g.T,S=p.p;try{if(g.T=null,p.p=2,y)return y()}finally{g.T=b,p.p=S,p.d.f()&&console.error("flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task.")}},nn.preconnect=function(y,b){typeof y=="string"&&y?b!=null&&typeof b!="object"?console.error("ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.",c(b)):b!=null&&typeof b.crossOrigin!="string"&&console.error("ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.",r(b.crossOrigin)):console.error("ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",r(y)),typeof y=="string"&&(b?(b=b.crossOrigin,b=typeof b=="string"?b==="use-credentials"?b:"":void 0):b=null,p.d.C(y,b))},nn.prefetchDNS=function(y){if(typeof y!="string"||!y)console.error("ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",r(y));else if(1<arguments.length){var b=arguments[1];typeof b=="object"&&b.hasOwnProperty("crossOrigin")?console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",c(b)):console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",c(b))}typeof y=="string"&&p.d.D(y)},nn.preinit=function(y,b){if(typeof y=="string"&&y?b==null||typeof b!="object"?console.error("ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.",c(b)):b.as!=="style"&&b.as!=="script"&&console.error('ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".',c(b.as)):console.error("ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",r(y)),typeof y=="string"&&b&&typeof b.as=="string"){var S=b.as,A=a(S,b.crossOrigin),_=typeof b.integrity=="string"?b.integrity:void 0,R=typeof b.fetchPriority=="string"?b.fetchPriority:void 0;S==="style"?p.d.S(y,typeof b.precedence=="string"?b.precedence:void 0,{crossOrigin:A,integrity:_,fetchPriority:R}):S==="script"&&p.d.X(y,{crossOrigin:A,integrity:_,fetchPriority:R,nonce:typeof b.nonce=="string"?b.nonce:void 0})}},nn.preinitModule=function(y,b){var S="";if(typeof y=="string"&&y||(S+=" The `href` argument encountered was "+r(y)+"."),b!==void 0&&typeof b!="object"?S+=" The `options` argument encountered was "+r(b)+".":b&&"as"in b&&b.as!=="script"&&(S+=" The `as` option encountered was "+c(b.as)+"."),S)console.error("ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s",S);else switch(S=b&&typeof b.as=="string"?b.as:"script",S){case"script":break;default:S=c(S),console.error('ReactDOM.preinitModule(): Currently the only supported "as" type for this function is "script" but received "%s" instead. This warning was generated for `href` "%s". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)',S,y)}typeof y=="string"&&(typeof b=="object"&&b!==null?(b.as==null||b.as==="script")&&(S=a(b.as,b.crossOrigin),p.d.M(y,{crossOrigin:S,integrity:typeof b.integrity=="string"?b.integrity:void 0,nonce:typeof b.nonce=="string"?b.nonce:void 0})):b==null&&p.d.M(y))},nn.preload=function(y,b){var S="";if(typeof y=="string"&&y||(S+=" The `href` argument encountered was "+r(y)+"."),b==null||typeof b!="object"?S+=" The `options` argument encountered was "+r(b)+".":typeof b.as=="string"&&b.as||(S+=" The `as` option encountered was "+r(b.as)+"."),S&&console.error('ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel="preload" as="..." />` tag.%s',S),typeof y=="string"&&typeof b=="object"&&b!==null&&typeof b.as=="string"){S=b.as;var A=a(S,b.crossOrigin);p.d.L(y,S,{crossOrigin:A,integrity:typeof b.integrity=="string"?b.integrity:void 0,nonce:typeof b.nonce=="string"?b.nonce:void 0,type:typeof b.type=="string"?b.type:void 0,fetchPriority:typeof b.fetchPriority=="string"?b.fetchPriority:void 0,referrerPolicy:typeof b.referrerPolicy=="string"?b.referrerPolicy:void 0,imageSrcSet:typeof b.imageSrcSet=="string"?b.imageSrcSet:void 0,imageSizes:typeof b.imageSizes=="string"?b.imageSizes:void 0,media:typeof b.media=="string"?b.media:void 0})}},nn.preloadModule=function(y,b){var S="";typeof y=="string"&&y||(S+=" The `href` argument encountered was "+r(y)+"."),b!==void 0&&typeof b!="object"?S+=" The `options` argument encountered was "+r(b)+".":b&&"as"in b&&typeof b.as!="string"&&(S+=" The `as` option encountered was "+r(b.as)+"."),S&&console.error('ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel="modulepreload" as="..." />` tag.%s',S),typeof y=="string"&&(b?(S=a(b.as,b.crossOrigin),p.d.m(y,{as:typeof b.as=="string"&&b.as!=="script"?b.as:void 0,crossOrigin:S,integrity:typeof b.integrity=="string"?b.integrity:void 0})):p.d.m(y))},nn.requestFormReset=function(y){p.d.r(y)},nn.unstable_batchedUpdates=function(y,b){return y(b)},nn.useFormState=function(y,b,S){return u().useFormState(y,b,S)},nn.useFormStatus=function(){return u().useHostTransitionStatus()},nn.version="19.1.0",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}(),nn}var kv;function ZD(){return kv||(kv=1,Cf.exports=KD()),Cf.exports}var Nv;function JD(){if(Nv)return Yo;Nv=1;/**
59
59
  * @license React
60
60
  * react-dom-client.development.js
61
61
  *
@@ -63,38 +63,38 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
63
63
  *
64
64
  * This source code is licensed under the MIT license found in the
65
65
  * LICENSE file in the root directory of this source tree.
66
- */return function(){function l(e,n){for(e=e.memoizedState;e!==null&&0<n;)e=e.next,n--;return e}function t(e,n,s,o){if(s>=n.length)return o;var d=n[s],f=Ze(e)?e.slice():It({},e);return f[d]=t(e[d],n,s+1,o),f}function i(e,n,s){if(n.length!==s.length)console.warn("copyWithRename() expects paths of the same length");else{for(var o=0;o<s.length-1;o++)if(n[o]!==s[o]){console.warn("copyWithRename() expects paths to be the same except for the deepest key");return}return a(e,n,s,0)}}function a(e,n,s,o){var d=n[o],f=Ze(e)?e.slice():It({},e);return o+1===n.length?(f[s[o]]=f[d],Ze(f)?f.splice(d,1):delete f[d]):f[d]=a(e[d],n,s,o+1),f}function r(e,n,s){var o=n[s],d=Ze(e)?e.slice():It({},e);return s+1===n.length?(Ze(d)?d.splice(o,1):delete d[o],d):(d[o]=r(e[o],n,s+1),d)}function c(){return!1}function u(){return null}function h(){}function p(){console.error("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://react.dev/link/rules-of-hooks")}function m(){console.error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().")}function g(){}function y(e){var n=[];return e.forEach(function(s){n.push(s)}),n.sort().join(", ")}function b(e,n,s,o){return new xk(e,n,s,o)}function S(e,n){e.context===sa&&(dg(e.current,2,n,e,null,null),Vr())}function A(e,n){if(ii!==null){var s=n.staleFamilies;n=n.updatedFamilies,Fl(),Mp(e.current,n,s),Vr()}}function _(e){ii=e}function R(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function C(e){var n=e,s=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(s=n.return),e=n.return;while(e)}return n.tag===3?s:null}function N(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function O(e){if(C(e)!==e)throw Error("Unable to find node on an unmounted component.")}function U(e){var n=e.alternate;if(!n){if(n=C(e),n===null)throw Error("Unable to find node on an unmounted component.");return n!==e?null:e}for(var s=e,o=n;;){var d=s.return;if(d===null)break;var f=d.alternate;if(f===null){if(o=d.return,o!==null){s=o;continue}break}if(d.child===f.child){for(f=d.child;f;){if(f===s)return O(d),e;if(f===o)return O(d),n;f=f.sibling}throw Error("Unable to find node on an unmounted component.")}if(s.return!==o.return)s=d,o=f;else{for(var v=!1,E=d.child;E;){if(E===s){v=!0,s=d,o=f;break}if(E===o){v=!0,o=d,s=f;break}E=E.sibling}if(!v){for(E=f.child;E;){if(E===s){v=!0,s=f,o=d;break}if(E===o){v=!0,o=f,s=d;break}E=E.sibling}if(!v)throw Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.")}}if(s.alternate!==o)throw Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.")}if(s.tag!==3)throw Error("Unable to find node on an unmounted component.");return s.stateNode.current===s?e:n}function I(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=I(e),n!==null)return n;e=e.sibling}return null}function j(e){return e===null||typeof e!="object"?null:(e=S_&&e[S_]||e["@@iterator"],typeof e=="function"?e:null)}function F(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===$N?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Zr:return"Fragment";case bg:return"Profiler";case Pd:return"StrictMode";case Sg:return"Suspense";case Eg:return"SuspenseList";case Ag:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case Kr:return"Portal";case Hi:return(e.displayName||"Context")+".Provider";case vg:return(e._context.displayName||"Context")+".Consumer";case Ql:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ud:return n=e.displayName||null,n!==null?n:F(e.type)||"Memo";case jn:n=e._payload,e=e._init;try{return F(e(n))}catch{}}return null}function J(e){return typeof e.tag=="number"?X(e):typeof e.name=="string"?e.name:null}function X(e){var n=e.type;switch(e.tag){case 31:return"Activity";case 24:return"Cache";case 9:return(n._context.displayName||"Context")+".Consumer";case 10:return(n.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=n.render,e=e.displayName||e.name||"",n.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 26:case 27:case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return F(n);case 8:return n===Pd?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 14:case 15:if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n;break;case 29:if(n=e._debugInfo,n!=null){for(var s=n.length-1;0<=s;s--)if(typeof n[s].name=="string")return n[s].name}if(e.return!==null)return X(e.return)}return null}function at(e){return{current:e}}function K(e,n){0>ms?console.error("Unexpected pop."):(n!==Tg[ms]&&console.error("Unexpected Fiber popped."),e.current=_g[ms],_g[ms]=null,Tg[ms]=null,ms--)}function lt(e,n,s){ms++,_g[ms]=e.current,Tg[ms]=s,e.current=n}function Et(e){return e===null&&console.error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue."),e}function bt(e,n){lt(ta,n,e),lt(Kl,e,e),lt(Js,null,e);var s=n.nodeType;switch(s){case 9:case 11:s=s===9?"#document":"#fragment",n=(n=n.documentElement)&&(n=n.namespaceURI)?XA(n):xs;break;default:if(s=n.tagName,n=n.namespaceURI)n=XA(n),n=WA(n,s);else switch(s){case"svg":n=Lo;break;case"math":n=_h;break;default:n=xs}}s=s.toLowerCase(),s=sS(null,s),s={context:n,ancestorInfo:s},K(Js,e),lt(Js,s,e)}function Gt(e){K(Js,e),K(Kl,e),K(ta,e)}function B(){return Et(Js.current)}function Q(e){e.memoizedState!==null&&lt(zd,e,e);var n=Et(Js.current),s=e.type,o=WA(n.context,s);s=sS(n.ancestorInfo,s),o={context:o,ancestorInfo:s},n!==o&&(lt(Kl,e,e),lt(Js,o,e))}function dt(e){Kl.current===e&&(K(Js,e),K(Kl,e)),zd.current===e&&(K(zd,e),Ic._currentValue=fr)}function xt(e){return typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}function W(e){try{return ht(e),!1}catch{return!0}}function ht(e){return""+e}function st(e,n){if(W(e))return console.error("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here.",n,xt(e)),ht(e)}function vt(e,n){if(W(e))return console.error("The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before using it here.",n,xt(e)),ht(e)}function Zt(e){if(W(e))return console.error("Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before using it here.",xt(e)),ht(e)}function oe(e){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")return!1;var n=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(n.isDisabled)return!0;if(!n.supportsFiber)return console.error("The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://react.dev/link/react-devtools"),!0;try{to=n.inject(e),an=n}catch(s){console.error("React instrumentation encountered an error: %s.",s)}return!!n.checkDCE}function tt(e){if(typeof QN=="function"&&KN(e),an&&typeof an.setStrictMode=="function")try{an.setStrictMode(to,e)}catch(n){Fi||(Fi=!0,console.error("React instrumentation encountered an error: %s",n))}}function Wt(e){rt=e}function Vt(){rt!==null&&typeof rt.markCommitStopped=="function"&&rt.markCommitStopped()}function be(e){rt!==null&&typeof rt.markComponentRenderStarted=="function"&&rt.markComponentRenderStarted(e)}function Xe(){rt!==null&&typeof rt.markComponentRenderStopped=="function"&&rt.markComponentRenderStopped()}function Tn(e){rt!==null&&typeof rt.markRenderStarted=="function"&&rt.markRenderStarted(e)}function mi(){rt!==null&&typeof rt.markRenderStopped=="function"&&rt.markRenderStopped()}function Pn(e,n){rt!==null&&typeof rt.markStateUpdateScheduled=="function"&&rt.markStateUpdateScheduled(e,n)}function is(e){return e>>>=0,e===0?32:31-(ZN(e)/JN|0)|0}function Ma(e){if(e&1)return"SyncHydrationLane";if(e&2)return"Sync";if(e&4)return"InputContinuousHydration";if(e&8)return"InputContinuous";if(e&16)return"DefaultHydration";if(e&32)return"Default";if(e&128)return"TransitionHydration";if(e&4194048)return"Transition";if(e&62914560)return"Retry";if(e&67108864)return"SelectiveHydration";if(e&134217728)return"IdleHydration";if(e&268435456)return"Idle";if(e&536870912)return"Offscreen";if(e&1073741824)return"Deferred"}function Ne(e){var n=e&42;if(n!==0)return n;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return console.error("Should have found matching lanes. This is a bug in React."),e}}function ss(e,n,s){var o=e.pendingLanes;if(o===0)return 0;var d=0,f=e.suspendedLanes,v=e.pingedLanes;e=e.warmLanes;var E=o&134217727;return E!==0?(o=E&~f,o!==0?d=Ne(o):(v&=E,v!==0?d=Ne(v):s||(s=E&~e,s!==0&&(d=Ne(s))))):(E=o&~f,E!==0?d=Ne(E):v!==0?d=Ne(v):s||(s=o&~e,s!==0&&(d=Ne(s)))),d===0?0:n!==0&&n!==d&&(n&f)===0&&(f=d&-d,s=n&-n,f>=s||f===32&&(s&4194048)!==0)?n:d}function Hs(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function fp(e,n){switch(e){case 1:case 2:case 4:case 8:case 64:return n+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return console.error("Should have found matching lanes. This is a bug in React."),-1}}function Pt(){var e=Hd;return Hd<<=1,(Hd&4194048)===0&&(Hd=256),e}function Oa(){var e=Bd;return Bd<<=1,(Bd&62914560)===0&&(Bd=4194304),e}function kr(e){for(var n=[],s=0;31>s;s++)n.push(e);return n}function Bs(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Lu(e,n,s,o,d,f){var v=e.pendingLanes;e.pendingLanes=s,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=s,e.entangledLanes&=s,e.errorRecoveryDisabledLanes&=s,e.shellSuspendCounter=0;var E=e.entanglements,w=e.expirationTimes,x=e.hiddenUpdates;for(s=v&~s;0<s;){var H=31-pn(s),V=1<<H;E[H]=0,w[H]=-1;var z=x[H];if(z!==null)for(x[H]=null,H=0;H<z.length;H++){var q=z[H];q!==null&&(q.lane&=-536870913)}s&=~V}o!==0&&dl(e,o,0),f!==0&&d===0&&e.tag!==0&&(e.suspendedLanes|=f&~(v&~n))}function dl(e,n,s){e.pendingLanes|=n,e.suspendedLanes&=~n;var o=31-pn(n);e.entangledLanes|=n,e.entanglements[o]=e.entanglements[o]|1073741824|s&4194090}function Iu(e,n){var s=e.entangledLanes|=n;for(e=e.entanglements;s;){var o=31-pn(s),d=1<<o;d&n|e[o]&n&&(e[o]|=n),s&=~d}}function hl(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function fl(e,n,s){if(Si)for(e=e.pendingUpdatersLaneMap;0<s;){var o=31-pn(s),d=1<<o;e[o].add(n),s&=~d}}function pl(e,n){if(Si)for(var s=e.pendingUpdatersLaneMap,o=e.memoizedUpdaters;0<n;){var d=31-pn(n);e=1<<d,d=s[d],0<d.size&&(d.forEach(function(f){var v=f.alternate;v!==null&&o.has(v)||o.add(f)}),d.clear()),n&=~e}}function Nr(e){return e&=-e,ei<e?ji<e?(e&134217727)!==0?ys:Fd:ji:ei}function ml(){var e=Jt.p;return e!==0?e:(e=window.event,e===void 0?ys:p_(e.type))}function Lr(e,n){var s=Jt.p;try{return Jt.p=e,n()}finally{Jt.p=s}}function Fs(e){delete e[rn],delete e[Dn],delete e[Dg],delete e[tL],delete e[eL]}function gi(e){var n=e[rn];if(n)return n;for(var s=e.parentNode;s;){if(n=s[na]||s[rn]){if(s=n.alternate,n.child!==null||s!==null&&s.child!==null)for(e=e_(e);e!==null;){if(s=e[rn])return s;e=e_(e)}return n}e=s,s=e.parentNode}return null}function yi(e){if(e=e[rn]||e[na]){var n=e.tag;if(n===5||n===6||n===13||n===26||n===27||n===3)return e}return null}function js(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error("getNodeFromInstance: Invalid argument.")}function T(e){var n=e[E_];return n||(n=e[E_]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function P(e){e[Zl]=!0}function et(e,n){it(e,n),it(e+"Capture",n)}function it(e,n){Xa[e]&&console.error("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",e),Xa[e]=n;var s=e.toLowerCase();for(Mg[s]=e,e==="onDoubleClick"&&(Mg.ondblclick=e),e=0;e<n.length;e++)A_.add(n[e])}function ft(e,n){nL[n.type]||n.onChange||n.onInput||n.readOnly||n.disabled||n.value==null||console.error(e==="select"?"You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set `onChange`.":"You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`."),n.onChange||n.readOnly||n.disabled||n.checked==null||console.error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")}function Lt(e){return gs.call(T_,e)?!0:gs.call(__,e)?!1:iL.test(e)?T_[e]=!0:(__[e]=!0,console.error("Invalid attribute name: `%s`",e),!1)}function Ot(e,n,s){if(Lt(n)){if(!e.hasAttribute(n)){switch(typeof s){case"symbol":case"object":return s;case"function":return s;case"boolean":if(s===!1)return s}return s===void 0?void 0:null}return e=e.getAttribute(n),e===""&&s===!0?!0:(st(s,n),e===""+s?s:e)}}function qt(e,n,s){if(Lt(n))if(s===null)e.removeAttribute(n);else{switch(typeof s){case"undefined":case"function":case"symbol":e.removeAttribute(n);return;case"boolean":var o=n.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){e.removeAttribute(n);return}}st(s,n),e.setAttribute(n,""+s)}}function kt(e,n,s){if(s===null)e.removeAttribute(n);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}st(s,n),e.setAttribute(n,""+s)}}function Fe(e,n,s,o){if(o===null)e.removeAttribute(s);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(s);return}st(o,s),e.setAttributeNS(n,s,""+o)}}function as(){}function pp(){if(Jl===0){w_=console.log,C_=console.info,x_=console.warn,R_=console.error,D_=console.group,M_=console.groupCollapsed,O_=console.groupEnd;var e={configurable:!0,enumerable:!0,value:as,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}Jl++}function mp(){if(Jl--,Jl===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:It({},e,{value:w_}),info:It({},e,{value:C_}),warn:It({},e,{value:x_}),error:It({},e,{value:R_}),group:It({},e,{value:D_}),groupCollapsed:It({},e,{value:M_}),groupEnd:It({},e,{value:O_})})}0>Jl&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function Qn(e){if(Og===void 0)try{throw Error()}catch(s){var n=s.stack.trim().match(/\n( *(at )?)/);Og=n&&n[1]||"",k_=-1<s.stack.indexOf(`
66
+ */return function(){function l(e,n){for(e=e.memoizedState;e!==null&&0<n;)e=e.next,n--;return e}function t(e,n,s,o){if(s>=n.length)return o;var d=n[s],f=Ze(e)?e.slice():It({},e);return f[d]=t(e[d],n,s+1,o),f}function i(e,n,s){if(n.length!==s.length)console.warn("copyWithRename() expects paths of the same length");else{for(var o=0;o<s.length-1;o++)if(n[o]!==s[o]){console.warn("copyWithRename() expects paths to be the same except for the deepest key");return}return a(e,n,s,0)}}function a(e,n,s,o){var d=n[o],f=Ze(e)?e.slice():It({},e);return o+1===n.length?(f[s[o]]=f[d],Ze(f)?f.splice(d,1):delete f[d]):f[d]=a(e[d],n,s,o+1),f}function r(e,n,s){var o=n[s],d=Ze(e)?e.slice():It({},e);return s+1===n.length?(Ze(d)?d.splice(o,1):delete d[o],d):(d[o]=r(e[o],n,s+1),d)}function c(){return!1}function u(){return null}function h(){}function p(){console.error("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://react.dev/link/rules-of-hooks")}function m(){console.error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().")}function g(){}function y(e){var n=[];return e.forEach(function(s){n.push(s)}),n.sort().join(", ")}function b(e,n,s,o){return new xk(e,n,s,o)}function S(e,n){e.context===sa&&(ug(e.current,2,n,e,null,null),Vr())}function A(e,n){if(ii!==null){var s=n.staleFamilies;n=n.updatedFamilies,Fl(),Dp(e.current,n,s),Vr()}}function _(e){ii=e}function R(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function x(e){var n=e,s=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(s=n.return),e=n.return;while(e)}return n.tag===3?s:null}function L(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function k(e){if(x(e)!==e)throw Error("Unable to find node on an unmounted component.")}function U(e){var n=e.alternate;if(!n){if(n=x(e),n===null)throw Error("Unable to find node on an unmounted component.");return n!==e?null:e}for(var s=e,o=n;;){var d=s.return;if(d===null)break;var f=d.alternate;if(f===null){if(o=d.return,o!==null){s=o;continue}break}if(d.child===f.child){for(f=d.child;f;){if(f===s)return k(d),e;if(f===o)return k(d),n;f=f.sibling}throw Error("Unable to find node on an unmounted component.")}if(s.return!==o.return)s=d,o=f;else{for(var v=!1,E=d.child;E;){if(E===s){v=!0,s=d,o=f;break}if(E===o){v=!0,o=d,s=f;break}E=E.sibling}if(!v){for(E=f.child;E;){if(E===s){v=!0,s=f,o=d;break}if(E===o){v=!0,o=f,s=d;break}E=E.sibling}if(!v)throw Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.")}}if(s.alternate!==o)throw Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.")}if(s.tag!==3)throw Error("Unable to find node on an unmounted component.");return s.stateNode.current===s?e:n}function I(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=I(e),n!==null)return n;e=e.sibling}return null}function j(e){return e===null||typeof e!="object"?null:(e=v_&&e[v_]||e["@@iterator"],typeof e=="function"?e:null)}function F(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===jN?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Zr:return"Fragment";case yg:return"Profiler";case Ud:return"StrictMode";case vg:return"Suspense";case Sg:return"SuspenseList";case Eg:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case Kr:return"Portal";case Hi:return(e.displayName||"Context")+".Provider";case bg:return(e._context.displayName||"Context")+".Consumer";case Ql:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case zd:return n=e.displayName||null,n!==null?n:F(e.type)||"Memo";case jn:n=e._payload,e=e._init;try{return F(e(n))}catch{}}return null}function J(e){return typeof e.tag=="number"?Y(e):typeof e.name=="string"?e.name:null}function Y(e){var n=e.type;switch(e.tag){case 31:return"Activity";case 24:return"Cache";case 9:return(n._context.displayName||"Context")+".Consumer";case 10:return(n.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=n.render,e=e.displayName||e.name||"",n.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 26:case 27:case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return F(n);case 8:return n===Ud?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 14:case 15:if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n;break;case 29:if(n=e._debugInfo,n!=null){for(var s=n.length-1;0<=s;s--)if(typeof n[s].name=="string")return n[s].name}if(e.return!==null)return Y(e.return)}return null}function at(e){return{current:e}}function K(e,n){0>ms?console.error("Unexpected pop."):(n!==_g[ms]&&console.error("Unexpected Fiber popped."),e.current=Ag[ms],Ag[ms]=null,_g[ms]=null,ms--)}function lt(e,n,s){ms++,Ag[ms]=e.current,_g[ms]=s,e.current=n}function Et(e){return e===null&&console.error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue."),e}function bt(e,n){lt(ta,n,e),lt(Kl,e,e),lt(Js,null,e);var s=n.nodeType;switch(s){case 9:case 11:s=s===9?"#document":"#fragment",n=(n=n.documentElement)&&(n=n.namespaceURI)?XA(n):Cs;break;default:if(s=n.tagName,n=n.namespaceURI)n=XA(n),n=YA(n,s);else switch(s){case"svg":n=Lo;break;case"math":n=Th;break;default:n=Cs}}s=s.toLowerCase(),s=iS(null,s),s={context:n,ancestorInfo:s},K(Js,e),lt(Js,s,e)}function Gt(e){K(Js,e),K(Kl,e),K(ta,e)}function B(){return Et(Js.current)}function Q(e){e.memoizedState!==null&&lt(Hd,e,e);var n=Et(Js.current),s=e.type,o=YA(n.context,s);s=iS(n.ancestorInfo,s),o={context:o,ancestorInfo:s},n!==o&&(lt(Kl,e,e),lt(Js,o,e))}function dt(e){Kl.current===e&&(K(Js,e),K(Kl,e)),Hd.current===e&&(K(Hd,e),Ic._currentValue=fr)}function Ct(e){return typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}function W(e){try{return ht(e),!1}catch{return!0}}function ht(e){return""+e}function st(e,n){if(W(e))return console.error("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here.",n,Ct(e)),ht(e)}function vt(e,n){if(W(e))return console.error("The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before using it here.",n,Ct(e)),ht(e)}function Zt(e){if(W(e))return console.error("Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before using it here.",Ct(e)),ht(e)}function le(e){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")return!1;var n=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(n.isDisabled)return!0;if(!n.supportsFiber)return console.error("The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://react.dev/link/react-devtools"),!0;try{to=n.inject(e),an=n}catch(s){console.error("React instrumentation encountered an error: %s.",s)}return!!n.checkDCE}function tt(e){if(typeof WN=="function"&&QN(e),an&&typeof an.setStrictMode=="function")try{an.setStrictMode(to,e)}catch(n){Fi||(Fi=!0,console.error("React instrumentation encountered an error: %s",n))}}function Wt(e){rt=e}function Vt(){rt!==null&&typeof rt.markCommitStopped=="function"&&rt.markCommitStopped()}function ve(e){rt!==null&&typeof rt.markComponentRenderStarted=="function"&&rt.markComponentRenderStarted(e)}function Ye(){rt!==null&&typeof rt.markComponentRenderStopped=="function"&&rt.markComponentRenderStopped()}function Tn(e){rt!==null&&typeof rt.markRenderStarted=="function"&&rt.markRenderStarted(e)}function mi(){rt!==null&&typeof rt.markRenderStopped=="function"&&rt.markRenderStopped()}function Pn(e,n){rt!==null&&typeof rt.markStateUpdateScheduled=="function"&&rt.markStateUpdateScheduled(e,n)}function is(e){return e>>>=0,e===0?32:31-(KN(e)/ZN|0)|0}function Ma(e){if(e&1)return"SyncHydrationLane";if(e&2)return"Sync";if(e&4)return"InputContinuousHydration";if(e&8)return"InputContinuous";if(e&16)return"DefaultHydration";if(e&32)return"Default";if(e&128)return"TransitionHydration";if(e&4194048)return"Transition";if(e&62914560)return"Retry";if(e&67108864)return"SelectiveHydration";if(e&134217728)return"IdleHydration";if(e&268435456)return"Idle";if(e&536870912)return"Offscreen";if(e&1073741824)return"Deferred"}function Ne(e){var n=e&42;if(n!==0)return n;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return console.error("Should have found matching lanes. This is a bug in React."),e}}function ss(e,n,s){var o=e.pendingLanes;if(o===0)return 0;var d=0,f=e.suspendedLanes,v=e.pingedLanes;e=e.warmLanes;var E=o&134217727;return E!==0?(o=E&~f,o!==0?d=Ne(o):(v&=E,v!==0?d=Ne(v):s||(s=E&~e,s!==0&&(d=Ne(s))))):(E=o&~f,E!==0?d=Ne(E):v!==0?d=Ne(v):s||(s=o&~e,s!==0&&(d=Ne(s)))),d===0?0:n!==0&&n!==d&&(n&f)===0&&(f=d&-d,s=n&-n,f>=s||f===32&&(s&4194048)!==0)?n:d}function Hs(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function hp(e,n){switch(e){case 1:case 2:case 4:case 8:case 64:return n+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return console.error("Should have found matching lanes. This is a bug in React."),-1}}function Pt(){var e=Bd;return Bd<<=1,(Bd&4194048)===0&&(Bd=256),e}function Oa(){var e=Fd;return Fd<<=1,(Fd&62914560)===0&&(Fd=4194304),e}function kr(e){for(var n=[],s=0;31>s;s++)n.push(e);return n}function Bs(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Iu(e,n,s,o,d,f){var v=e.pendingLanes;e.pendingLanes=s,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=s,e.entangledLanes&=s,e.errorRecoveryDisabledLanes&=s,e.shellSuspendCounter=0;var E=e.entanglements,w=e.expirationTimes,C=e.hiddenUpdates;for(s=v&~s;0<s;){var H=31-pn(s),V=1<<H;E[H]=0,w[H]=-1;var z=C[H];if(z!==null)for(C[H]=null,H=0;H<z.length;H++){var q=z[H];q!==null&&(q.lane&=-536870913)}s&=~V}o!==0&&dl(e,o,0),f!==0&&d===0&&e.tag!==0&&(e.suspendedLanes|=f&~(v&~n))}function dl(e,n,s){e.pendingLanes|=n,e.suspendedLanes&=~n;var o=31-pn(n);e.entangledLanes|=n,e.entanglements[o]=e.entanglements[o]|1073741824|s&4194090}function Pu(e,n){var s=e.entangledLanes|=n;for(e=e.entanglements;s;){var o=31-pn(s),d=1<<o;d&n|e[o]&n&&(e[o]|=n),s&=~d}}function hl(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function fl(e,n,s){if(Si)for(e=e.pendingUpdatersLaneMap;0<s;){var o=31-pn(s),d=1<<o;e[o].add(n),s&=~d}}function pl(e,n){if(Si)for(var s=e.pendingUpdatersLaneMap,o=e.memoizedUpdaters;0<n;){var d=31-pn(n);e=1<<d,d=s[d],0<d.size&&(d.forEach(function(f){var v=f.alternate;v!==null&&o.has(v)||o.add(f)}),d.clear()),n&=~e}}function Nr(e){return e&=-e,ei<e?ji<e?(e&134217727)!==0?ys:jd:ji:ei}function ml(){var e=Jt.p;return e!==0?e:(e=window.event,e===void 0?ys:f_(e.type))}function Lr(e,n){var s=Jt.p;try{return Jt.p=e,n()}finally{Jt.p=s}}function Fs(e){delete e[rn],delete e[Dn],delete e[Rg],delete e[JN],delete e[tL]}function gi(e){var n=e[rn];if(n)return n;for(var s=e.parentNode;s;){if(n=s[na]||s[rn]){if(s=n.alternate,n.child!==null||s!==null&&s.child!==null)for(e=t_(e);e!==null;){if(s=e[rn])return s;e=t_(e)}return n}e=s,s=e.parentNode}return null}function yi(e){if(e=e[rn]||e[na]){var n=e.tag;if(n===5||n===6||n===13||n===26||n===27||n===3)return e}return null}function js(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error("getNodeFromInstance: Invalid argument.")}function T(e){var n=e[S_];return n||(n=e[S_]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function P(e){e[Zl]=!0}function et(e,n){it(e,n),it(e+"Capture",n)}function it(e,n){Ya[e]&&console.error("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",e),Ya[e]=n;var s=e.toLowerCase();for(Dg[s]=e,e==="onDoubleClick"&&(Dg.ondblclick=e),e=0;e<n.length;e++)E_.add(n[e])}function ft(e,n){eL[n.type]||n.onChange||n.onInput||n.readOnly||n.disabled||n.value==null||console.error(e==="select"?"You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set `onChange`.":"You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`."),n.onChange||n.readOnly||n.disabled||n.checked==null||console.error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")}function Lt(e){return gs.call(__,e)?!0:gs.call(A_,e)?!1:nL.test(e)?__[e]=!0:(A_[e]=!0,console.error("Invalid attribute name: `%s`",e),!1)}function Ot(e,n,s){if(Lt(n)){if(!e.hasAttribute(n)){switch(typeof s){case"symbol":case"object":return s;case"function":return s;case"boolean":if(s===!1)return s}return s===void 0?void 0:null}return e=e.getAttribute(n),e===""&&s===!0?!0:(st(s,n),e===""+s?s:e)}}function qt(e,n,s){if(Lt(n))if(s===null)e.removeAttribute(n);else{switch(typeof s){case"undefined":case"function":case"symbol":e.removeAttribute(n);return;case"boolean":var o=n.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){e.removeAttribute(n);return}}st(s,n),e.setAttribute(n,""+s)}}function kt(e,n,s){if(s===null)e.removeAttribute(n);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}st(s,n),e.setAttribute(n,""+s)}}function Fe(e,n,s,o){if(o===null)e.removeAttribute(s);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(s);return}st(o,s),e.setAttributeNS(n,s,""+o)}}function as(){}function fp(){if(Jl===0){T_=console.log,w_=console.info,x_=console.warn,C_=console.error,R_=console.group,D_=console.groupCollapsed,M_=console.groupEnd;var e={configurable:!0,enumerable:!0,value:as,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}Jl++}function pp(){if(Jl--,Jl===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:It({},e,{value:T_}),info:It({},e,{value:w_}),warn:It({},e,{value:x_}),error:It({},e,{value:C_}),group:It({},e,{value:R_}),groupCollapsed:It({},e,{value:D_}),groupEnd:It({},e,{value:M_})})}0>Jl&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function Qn(e){if(Mg===void 0)try{throw Error()}catch(s){var n=s.stack.trim().match(/\n( *(at )?)/);Mg=n&&n[1]||"",O_=-1<s.stack.indexOf(`
67
67
  at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
68
- `+Og+e+k_}function gp(e,n){if(!e||kg)return"";var s=Ng.get(e);if(s!==void 0)return s;kg=!0,s=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var o=null;o=G.H,G.H=null,pp();try{var d={DetermineComponentFrameRoot:function(){try{if(n){var z=function(){throw Error()};if(Object.defineProperty(z.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(z,[])}catch(ct){var q=ct}Reflect.construct(e,[],z)}else{try{z.call()}catch(ct){q=ct}e.call(z.prototype)}}else{try{throw Error()}catch(ct){q=ct}(z=e())&&typeof z.catch=="function"&&z.catch(function(){})}}catch(ct){if(ct&&q&&typeof ct.stack=="string")return[ct.stack,q.stack]}return[null,null]}};d.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(d.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(d.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var v=d.DetermineComponentFrameRoot(),E=v[0],w=v[1];if(E&&w){var x=E.split(`
68
+ `+Mg+e+O_}function mp(e,n){if(!e||Og)return"";var s=kg.get(e);if(s!==void 0)return s;Og=!0,s=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var o=null;o=G.H,G.H=null,fp();try{var d={DetermineComponentFrameRoot:function(){try{if(n){var z=function(){throw Error()};if(Object.defineProperty(z.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(z,[])}catch(ct){var q=ct}Reflect.construct(e,[],z)}else{try{z.call()}catch(ct){q=ct}e.call(z.prototype)}}else{try{throw Error()}catch(ct){q=ct}(z=e())&&typeof z.catch=="function"&&z.catch(function(){})}}catch(ct){if(ct&&q&&typeof ct.stack=="string")return[ct.stack,q.stack]}return[null,null]}};d.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(d.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(d.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var v=d.DetermineComponentFrameRoot(),E=v[0],w=v[1];if(E&&w){var C=E.split(`
69
69
  `),H=w.split(`
70
- `);for(v=f=0;f<x.length&&!x[f].includes("DetermineComponentFrameRoot");)f++;for(;v<H.length&&!H[v].includes("DetermineComponentFrameRoot");)v++;if(f===x.length||v===H.length)for(f=x.length-1,v=H.length-1;1<=f&&0<=v&&x[f]!==H[v];)v--;for(;1<=f&&0<=v;f--,v--)if(x[f]!==H[v]){if(f!==1||v!==1)do if(f--,v--,0>v||x[f]!==H[v]){var V=`
71
- `+x[f].replace(" at new "," at ");return e.displayName&&V.includes("<anonymous>")&&(V=V.replace("<anonymous>",e.displayName)),typeof e=="function"&&Ng.set(e,V),V}while(1<=f&&0<=v);break}}}finally{kg=!1,G.H=o,mp(),Error.prepareStackTrace=s}return x=(x=e?e.displayName||e.name:"")?Qn(x):"",typeof e=="function"&&Ng.set(e,x),x}function F0(e){var n=Error.prepareStackTrace;if(Error.prepareStackTrace=void 0,e=e.stack,Error.prepareStackTrace=n,e.startsWith(`Error: react-stack-top-frame
70
+ `);for(v=f=0;f<C.length&&!C[f].includes("DetermineComponentFrameRoot");)f++;for(;v<H.length&&!H[v].includes("DetermineComponentFrameRoot");)v++;if(f===C.length||v===H.length)for(f=C.length-1,v=H.length-1;1<=f&&0<=v&&C[f]!==H[v];)v--;for(;1<=f&&0<=v;f--,v--)if(C[f]!==H[v]){if(f!==1||v!==1)do if(f--,v--,0>v||C[f]!==H[v]){var V=`
71
+ `+C[f].replace(" at new "," at ");return e.displayName&&V.includes("<anonymous>")&&(V=V.replace("<anonymous>",e.displayName)),typeof e=="function"&&kg.set(e,V),V}while(1<=f&&0<=v);break}}}finally{Og=!1,G.H=o,pp(),Error.prepareStackTrace=s}return C=(C=e?e.displayName||e.name:"")?Qn(C):"",typeof e=="function"&&kg.set(e,C),C}function B0(e){var n=Error.prepareStackTrace;if(Error.prepareStackTrace=void 0,e=e.stack,Error.prepareStackTrace=n,e.startsWith(`Error: react-stack-top-frame
72
72
  `)&&(e=e.slice(29)),n=e.indexOf(`
73
73
  `),n!==-1&&(e=e.slice(n+1)),n=e.indexOf("react-stack-bottom-frame"),n!==-1&&(n=e.lastIndexOf(`
74
- `,n)),n!==-1)e=e.slice(0,n);else return"";return e}function rk(e){switch(e.tag){case 26:case 27:case 5:return Qn(e.type);case 16:return Qn("Lazy");case 13:return Qn("Suspense");case 19:return Qn("SuspenseList");case 0:case 15:return gp(e.type,!1);case 11:return gp(e.type.render,!1);case 1:return gp(e.type,!0);case 31:return Qn("Activity");default:return""}}function j0(e){try{var n="";do{n+=rk(e);var s=e._debugInfo;if(s)for(var o=s.length-1;0<=o;o--){var d=s[o];if(typeof d.name=="string"){var f=n,v=d.env,E=Qn(d.name+(v?" ["+v+"]":""));n=f+E}}e=e.return}while(e);return n}catch(w){return`
74
+ `,n)),n!==-1)e=e.slice(0,n);else return"";return e}function ak(e){switch(e.tag){case 26:case 27:case 5:return Qn(e.type);case 16:return Qn("Lazy");case 13:return Qn("Suspense");case 19:return Qn("SuspenseList");case 0:case 15:return mp(e.type,!1);case 11:return mp(e.type.render,!1);case 1:return mp(e.type,!0);case 31:return Qn("Activity");default:return""}}function F0(e){try{var n="";do{n+=ak(e);var s=e._debugInfo;if(s)for(var o=s.length-1;0<=o;o--){var d=s[o];if(typeof d.name=="string"){var f=n,v=d.env,E=Qn(d.name+(v?" ["+v+"]":""));n=f+E}}e=e.return}while(e);return n}catch(w){return`
75
75
  Error generating stack: `+w.message+`
76
- `+w.stack}}function $0(e){return(e=e?e.displayName||e.name:"")?Qn(e):""}function Pu(){if($n===null)return null;var e=$n._debugOwner;return e!=null?J(e):null}function ok(){if($n===null)return"";var e=$n;try{var n="";switch(e.tag===6&&(e=e.return),e.tag){case 26:case 27:case 5:n+=Qn(e.type);break;case 13:n+=Qn("Suspense");break;case 19:n+=Qn("SuspenseList");break;case 31:n+=Qn("Activity");break;case 30:case 0:case 15:case 1:e._debugOwner||n!==""||(n+=$0(e.type));break;case 11:e._debugOwner||n!==""||(n+=$0(e.type.render))}for(;e;)if(typeof e.tag=="number"){var s=e;e=s._debugOwner;var o=s._debugStack;e&&o&&(typeof o!="string"&&(s._debugStack=o=F0(o)),o!==""&&(n+=`
76
+ `+w.stack}}function j0(e){return(e=e?e.displayName||e.name:"")?Qn(e):""}function Uu(){if($n===null)return null;var e=$n._debugOwner;return e!=null?J(e):null}function rk(){if($n===null)return"";var e=$n;try{var n="";switch(e.tag===6&&(e=e.return),e.tag){case 26:case 27:case 5:n+=Qn(e.type);break;case 13:n+=Qn("Suspense");break;case 19:n+=Qn("SuspenseList");break;case 31:n+=Qn("Activity");break;case 30:case 0:case 15:case 1:e._debugOwner||n!==""||(n+=j0(e.type));break;case 11:e._debugOwner||n!==""||(n+=j0(e.type.render))}for(;e;)if(typeof e.tag=="number"){var s=e;e=s._debugOwner;var o=s._debugStack;e&&o&&(typeof o!="string"&&(s._debugStack=o=B0(o)),o!==""&&(n+=`
77
77
  `+o))}else if(e.debugStack!=null){var d=e.debugStack;(e=e.owner)&&d&&(n+=`
78
- `+F0(d))}else break;var f=n}catch(v){f=`
78
+ `+B0(d))}else break;var f=n}catch(v){f=`
79
79
  Error generating stack: `+v.message+`
80
- `+v.stack}return f}function pt(e,n,s,o,d,f,v){var E=$n;yp(e);try{return e!==null&&e._debugTask?e._debugTask.run(n.bind(null,s,o,d,f,v)):n(s,o,d,f,v)}finally{yp(E)}throw Error("runWithFiberInDEV should never be called in production. This is a bug in React.")}function yp(e){G.getCurrentStack=e===null?null:ok,$i=!1,$n=e}function Kn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return Zt(e),e;default:return""}}function G0(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function lk(e){var n=G0(e)?"checked":"value",s=Object.getOwnPropertyDescriptor(e.constructor.prototype,n);Zt(e[n]);var o=""+e[n];if(!e.hasOwnProperty(n)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var d=s.get,f=s.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return d.call(this)},set:function(v){Zt(v),o=""+v,f.call(this,v)}}),Object.defineProperty(e,n,{enumerable:s.enumerable}),{getValue:function(){return o},setValue:function(v){Zt(v),o=""+v},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function Uu(e){e._valueTracker||(e._valueTracker=lk(e))}function V0(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var s=n.getValue(),o="";return e&&(o=G0(e)?e.checked?"true":"false":e.value),e=o,e!==s?(n.setValue(e),!0):!1}function zu(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Zn(e){return e.replace(sL,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function q0(e,n){n.checked===void 0||n.defaultChecked===void 0||L_||(console.error("%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components",Pu()||"A component",n.type),L_=!0),n.value===void 0||n.defaultValue===void 0||N_||(console.error("%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components",Pu()||"A component",n.type),N_=!0)}function bp(e,n,s,o,d,f,v,E){e.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?(st(v,"type"),e.type=v):e.removeAttribute("type"),n!=null?v==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+Kn(n)):e.value!==""+Kn(n)&&(e.value=""+Kn(n)):v!=="submit"&&v!=="reset"||e.removeAttribute("value"),n!=null?vp(e,v,Kn(n)):s!=null?vp(e,v,Kn(s)):o!=null&&e.removeAttribute("value"),d==null&&f!=null&&(e.defaultChecked=!!f),d!=null&&(e.checked=d&&typeof d!="function"&&typeof d!="symbol"),E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?(st(E,"name"),e.name=""+Kn(E)):e.removeAttribute("name")}function Y0(e,n,s,o,d,f,v,E){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(st(f,"type"),e.type=f),n!=null||s!=null){if(!(f!=="submit"&&f!=="reset"||n!=null))return;s=s!=null?""+Kn(s):"",n=n!=null?""+Kn(n):s,E||n===e.value||(e.value=n),e.defaultValue=n}o=o??d,o=typeof o!="function"&&typeof o!="symbol"&&!!o,e.checked=E?e.checked:!!o,e.defaultChecked=!!o,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(st(v,"name"),e.name=v)}function vp(e,n,s){n==="number"&&zu(e.ownerDocument)===e||e.defaultValue===""+s||(e.defaultValue=""+s)}function X0(e,n){n.value==null&&(typeof n.children=="object"&&n.children!==null?yg.Children.forEach(n.children,function(s){s==null||typeof s=="string"||typeof s=="number"||typeof s=="bigint"||P_||(P_=!0,console.error("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>."))}):n.dangerouslySetInnerHTML==null||U_||(U_=!0,console.error("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected."))),n.selected==null||I_||(console.error("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),I_=!0)}function W0(){var e=Pu();return e?`
80
+ `+v.stack}return f}function pt(e,n,s,o,d,f,v){var E=$n;gp(e);try{return e!==null&&e._debugTask?e._debugTask.run(n.bind(null,s,o,d,f,v)):n(s,o,d,f,v)}finally{gp(E)}throw Error("runWithFiberInDEV should never be called in production. This is a bug in React.")}function gp(e){G.getCurrentStack=e===null?null:rk,$i=!1,$n=e}function Kn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return Zt(e),e;default:return""}}function $0(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function ok(e){var n=$0(e)?"checked":"value",s=Object.getOwnPropertyDescriptor(e.constructor.prototype,n);Zt(e[n]);var o=""+e[n];if(!e.hasOwnProperty(n)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var d=s.get,f=s.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return d.call(this)},set:function(v){Zt(v),o=""+v,f.call(this,v)}}),Object.defineProperty(e,n,{enumerable:s.enumerable}),{getValue:function(){return o},setValue:function(v){Zt(v),o=""+v},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function zu(e){e._valueTracker||(e._valueTracker=ok(e))}function G0(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var s=n.getValue(),o="";return e&&(o=$0(e)?e.checked?"true":"false":e.value),e=o,e!==s?(n.setValue(e),!0):!1}function Hu(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Zn(e){return e.replace(iL,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function V0(e,n){n.checked===void 0||n.defaultChecked===void 0||N_||(console.error("%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components",Uu()||"A component",n.type),N_=!0),n.value===void 0||n.defaultValue===void 0||k_||(console.error("%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components",Uu()||"A component",n.type),k_=!0)}function yp(e,n,s,o,d,f,v,E){e.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?(st(v,"type"),e.type=v):e.removeAttribute("type"),n!=null?v==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+Kn(n)):e.value!==""+Kn(n)&&(e.value=""+Kn(n)):v!=="submit"&&v!=="reset"||e.removeAttribute("value"),n!=null?bp(e,v,Kn(n)):s!=null?bp(e,v,Kn(s)):o!=null&&e.removeAttribute("value"),d==null&&f!=null&&(e.defaultChecked=!!f),d!=null&&(e.checked=d&&typeof d!="function"&&typeof d!="symbol"),E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?(st(E,"name"),e.name=""+Kn(E)):e.removeAttribute("name")}function q0(e,n,s,o,d,f,v,E){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(st(f,"type"),e.type=f),n!=null||s!=null){if(!(f!=="submit"&&f!=="reset"||n!=null))return;s=s!=null?""+Kn(s):"",n=n!=null?""+Kn(n):s,E||n===e.value||(e.value=n),e.defaultValue=n}o=o??d,o=typeof o!="function"&&typeof o!="symbol"&&!!o,e.checked=E?e.checked:!!o,e.defaultChecked=!!o,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(st(v,"name"),e.name=v)}function bp(e,n,s){n==="number"&&Hu(e.ownerDocument)===e||e.defaultValue===""+s||(e.defaultValue=""+s)}function X0(e,n){n.value==null&&(typeof n.children=="object"&&n.children!==null?gg.Children.forEach(n.children,function(s){s==null||typeof s=="string"||typeof s=="number"||typeof s=="bigint"||I_||(I_=!0,console.error("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>."))}):n.dangerouslySetInnerHTML==null||P_||(P_=!0,console.error("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected."))),n.selected==null||L_||(console.error("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),L_=!0)}function Y0(){var e=Uu();return e?`
81
81
 
82
- Check the render method of \``+e+"`.":""}function Ir(e,n,s,o){if(e=e.options,n){n={};for(var d=0;d<s.length;d++)n["$"+s[d]]=!0;for(s=0;s<e.length;s++)d=n.hasOwnProperty("$"+e[s].value),e[s].selected!==d&&(e[s].selected=d),d&&o&&(e[s].defaultSelected=!0)}else{for(s=""+Kn(s),n=null,d=0;d<e.length;d++){if(e[d].value===s){e[d].selected=!0,o&&(e[d].defaultSelected=!0);return}n!==null||e[d].disabled||(n=e[d])}n!==null&&(n.selected=!0)}}function Q0(e,n){for(e=0;e<H_.length;e++){var s=H_[e];if(n[s]!=null){var o=Ze(n[s]);n.multiple&&!o?console.error("The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",s,W0()):!n.multiple&&o&&console.error("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",s,W0())}}n.value===void 0||n.defaultValue===void 0||z_||(console.error("Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://react.dev/link/controlled-components"),z_=!0)}function K0(e,n){n.value===void 0||n.defaultValue===void 0||B_||(console.error("%s contains a textarea with both value and defaultValue props. Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://react.dev/link/controlled-components",Pu()||"A component"),B_=!0),n.children!=null&&n.value==null&&console.error("Use the `defaultValue` or `value` props instead of setting children on <textarea>.")}function Z0(e,n,s){if(n!=null&&(n=""+Kn(n),n!==e.value&&(e.value=n),s==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=s!=null?""+Kn(s):""}function J0(e,n,s,o){if(n==null){if(o!=null){if(s!=null)throw Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(Ze(o)){if(1<o.length)throw Error("<textarea> can only have at most one child.");o=o[0]}s=o}s==null&&(s=""),n=s}s=Kn(n),e.defaultValue=s,o=e.textContent,o===s&&o!==""&&o!==null&&(e.value=o)}function tS(e,n){return e.serverProps===void 0&&e.serverTail.length===0&&e.children.length===1&&3<e.distanceFromLeaf&&e.distanceFromLeaf>15-n?tS(e.children[0],n):e}function Un(e){return" "+" ".repeat(e)}function Pr(e){return"+ "+" ".repeat(e)}function ka(e){return"- "+" ".repeat(e)}function eS(e){switch(e.tag){case 26:case 27:case 5:return e.type;case 16:return"Lazy";case 13:return"Suspense";case 19:return"SuspenseList";case 0:case 15:return e=e.type,e.displayName||e.name||null;case 11:return e=e.type.render,e.displayName||e.name||null;case 1:return e=e.type,e.displayName||e.name||null;default:return null}}function gl(e,n){return F_.test(e)?(e=JSON.stringify(e),e.length>n-2?8>n?'{"..."}':"{"+e.slice(0,n-7)+'..."}':"{"+e+"}"):e.length>n?5>n?'{"..."}':e.slice(0,n-3)+"...":e}function Hu(e,n,s){var o=120-2*s;if(n===null)return Pr(s)+gl(e,o)+`
82
+ Check the render method of \``+e+"`.":""}function Ir(e,n,s,o){if(e=e.options,n){n={};for(var d=0;d<s.length;d++)n["$"+s[d]]=!0;for(s=0;s<e.length;s++)d=n.hasOwnProperty("$"+e[s].value),e[s].selected!==d&&(e[s].selected=d),d&&o&&(e[s].defaultSelected=!0)}else{for(s=""+Kn(s),n=null,d=0;d<e.length;d++){if(e[d].value===s){e[d].selected=!0,o&&(e[d].defaultSelected=!0);return}n!==null||e[d].disabled||(n=e[d])}n!==null&&(n.selected=!0)}}function W0(e,n){for(e=0;e<z_.length;e++){var s=z_[e];if(n[s]!=null){var o=Ze(n[s]);n.multiple&&!o?console.error("The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",s,Y0()):!n.multiple&&o&&console.error("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",s,Y0())}}n.value===void 0||n.defaultValue===void 0||U_||(console.error("Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://react.dev/link/controlled-components"),U_=!0)}function Q0(e,n){n.value===void 0||n.defaultValue===void 0||H_||(console.error("%s contains a textarea with both value and defaultValue props. Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://react.dev/link/controlled-components",Uu()||"A component"),H_=!0),n.children!=null&&n.value==null&&console.error("Use the `defaultValue` or `value` props instead of setting children on <textarea>.")}function K0(e,n,s){if(n!=null&&(n=""+Kn(n),n!==e.value&&(e.value=n),s==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=s!=null?""+Kn(s):""}function Z0(e,n,s,o){if(n==null){if(o!=null){if(s!=null)throw Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(Ze(o)){if(1<o.length)throw Error("<textarea> can only have at most one child.");o=o[0]}s=o}s==null&&(s=""),n=s}s=Kn(n),e.defaultValue=s,o=e.textContent,o===s&&o!==""&&o!==null&&(e.value=o)}function J0(e,n){return e.serverProps===void 0&&e.serverTail.length===0&&e.children.length===1&&3<e.distanceFromLeaf&&e.distanceFromLeaf>15-n?J0(e.children[0],n):e}function Un(e){return" "+" ".repeat(e)}function Pr(e){return"+ "+" ".repeat(e)}function ka(e){return"- "+" ".repeat(e)}function tS(e){switch(e.tag){case 26:case 27:case 5:return e.type;case 16:return"Lazy";case 13:return"Suspense";case 19:return"SuspenseList";case 0:case 15:return e=e.type,e.displayName||e.name||null;case 11:return e=e.type.render,e.displayName||e.name||null;case 1:return e=e.type,e.displayName||e.name||null;default:return null}}function gl(e,n){return B_.test(e)?(e=JSON.stringify(e),e.length>n-2?8>n?'{"..."}':"{"+e.slice(0,n-7)+'..."}':"{"+e+"}"):e.length>n?5>n?'{"..."}':e.slice(0,n-3)+"...":e}function Bu(e,n,s){var o=120-2*s;if(n===null)return Pr(s)+gl(e,o)+`
83
83
  `;if(typeof n=="string"){for(var d=0;d<n.length&&d<e.length&&n.charCodeAt(d)===e.charCodeAt(d);d++);return d>o-8&&10<d&&(e="..."+e.slice(d-8),n="..."+n.slice(d-8)),Pr(s)+gl(e,o)+`
84
84
  `+ka(s)+gl(n,o)+`
85
85
  `}return Un(s)+gl(e,o)+`
86
- `}function Sp(e){return Object.prototype.toString.call(e).replace(/^\[object (.*)\]$/,function(n,s){return s})}function yl(e,n){switch(typeof e){case"string":return e=JSON.stringify(e),e.length>n?5>n?'"..."':e.slice(0,n-4)+'..."':e;case"object":if(e===null)return"null";if(Ze(e))return"[...]";if(e.$$typeof===Zs)return(n=F(e.type))?"<"+n+">":"<...>";var s=Sp(e);if(s==="Object"){s="",n-=2;for(var o in e)if(e.hasOwnProperty(o)){var d=JSON.stringify(o);if(d!=='"'+o+'"'&&(o=d),n-=o.length-2,d=yl(e[o],15>n?n:15),n-=d.length,0>n){s+=s===""?"...":", ...";break}s+=(s===""?"":",")+o+":"+d}return"{"+s+"}"}return s;case"function":return(n=e.displayName||e.name)?"function "+n:"function";default:return String(e)}}function Ur(e,n){return typeof e!="string"||F_.test(e)?"{"+yl(e,n-2)+"}":e.length>n-2?5>n?'"..."':'"'+e.slice(0,n-5)+'..."':'"'+e+'"'}function Ep(e,n,s){var o=120-s.length-e.length,d=[],f;for(f in n)if(n.hasOwnProperty(f)&&f!=="children"){var v=Ur(n[f],120-s.length-f.length-1);o-=f.length+v.length+2,d.push(f+"="+v)}return d.length===0?s+"<"+e+`>
86
+ `}function vp(e){return Object.prototype.toString.call(e).replace(/^\[object (.*)\]$/,function(n,s){return s})}function yl(e,n){switch(typeof e){case"string":return e=JSON.stringify(e),e.length>n?5>n?'"..."':e.slice(0,n-4)+'..."':e;case"object":if(e===null)return"null";if(Ze(e))return"[...]";if(e.$$typeof===Zs)return(n=F(e.type))?"<"+n+">":"<...>";var s=vp(e);if(s==="Object"){s="",n-=2;for(var o in e)if(e.hasOwnProperty(o)){var d=JSON.stringify(o);if(d!=='"'+o+'"'&&(o=d),n-=o.length-2,d=yl(e[o],15>n?n:15),n-=d.length,0>n){s+=s===""?"...":", ...";break}s+=(s===""?"":",")+o+":"+d}return"{"+s+"}"}return s;case"function":return(n=e.displayName||e.name)?"function "+n:"function";default:return String(e)}}function Ur(e,n){return typeof e!="string"||B_.test(e)?"{"+yl(e,n-2)+"}":e.length>n-2?5>n?'"..."':'"'+e.slice(0,n-5)+'..."':'"'+e+'"'}function Sp(e,n,s){var o=120-s.length-e.length,d=[],f;for(f in n)if(n.hasOwnProperty(f)&&f!=="children"){var v=Ur(n[f],120-s.length-f.length-1);o-=f.length+v.length+2,d.push(f+"="+v)}return d.length===0?s+"<"+e+`>
87
87
  `:0<o?s+"<"+e+" "+d.join(" ")+`>
88
88
  `:s+"<"+e+`
89
89
  `+s+" "+d.join(`
90
90
  `+s+" ")+`
91
91
  `+s+`>
92
- `}function ck(e,n,s){var o="",d=It({},n),f;for(f in e)if(e.hasOwnProperty(f)){delete d[f];var v=120-2*s-f.length-2,E=yl(e[f],v);n.hasOwnProperty(f)?(v=yl(n[f],v),o+=Pr(s)+f+": "+E+`
92
+ `}function lk(e,n,s){var o="",d=It({},n),f;for(f in e)if(e.hasOwnProperty(f)){delete d[f];var v=120-2*s-f.length-2,E=yl(e[f],v);n.hasOwnProperty(f)?(v=yl(n[f],v),o+=Pr(s)+f+": "+E+`
93
93
  `,o+=ka(s)+f+": "+v+`
94
94
  `):o+=Pr(s)+f+": "+E+`
95
95
  `}for(var w in d)d.hasOwnProperty(w)&&(e=yl(d[w],120-2*s-w.length-2),o+=ka(s)+w+": "+e+`
96
- `);return o}function uk(e,n,s,o){var d="",f=new Map;for(x in s)s.hasOwnProperty(x)&&f.set(x.toLowerCase(),x);if(f.size===1&&f.has("children"))d+=Ep(e,n,Un(o));else{for(var v in n)if(n.hasOwnProperty(v)&&v!=="children"){var E=120-2*(o+1)-v.length-1,w=f.get(v.toLowerCase());if(w!==void 0){f.delete(v.toLowerCase());var x=n[v];w=s[w];var H=Ur(x,E);E=Ur(w,E),typeof x=="object"&&x!==null&&typeof w=="object"&&w!==null&&Sp(x)==="Object"&&Sp(w)==="Object"&&(2<Object.keys(x).length||2<Object.keys(w).length||-1<H.indexOf("...")||-1<E.indexOf("..."))?d+=Un(o+1)+v+`={{
97
- `+ck(x,w,o+2)+Un(o+1)+`}}
96
+ `);return o}function ck(e,n,s,o){var d="",f=new Map;for(C in s)s.hasOwnProperty(C)&&f.set(C.toLowerCase(),C);if(f.size===1&&f.has("children"))d+=Sp(e,n,Un(o));else{for(var v in n)if(n.hasOwnProperty(v)&&v!=="children"){var E=120-2*(o+1)-v.length-1,w=f.get(v.toLowerCase());if(w!==void 0){f.delete(v.toLowerCase());var C=n[v];w=s[w];var H=Ur(C,E);E=Ur(w,E),typeof C=="object"&&C!==null&&typeof w=="object"&&w!==null&&vp(C)==="Object"&&vp(w)==="Object"&&(2<Object.keys(C).length||2<Object.keys(w).length||-1<H.indexOf("...")||-1<E.indexOf("..."))?d+=Un(o+1)+v+`={{
97
+ `+lk(C,w,o+2)+Un(o+1)+`}}
98
98
  `:(d+=Pr(o+1)+v+"="+H+`
99
99
  `,d+=ka(o+1)+v+"="+E+`
100
100
  `)}else d+=Un(o+1)+v+"="+Ur(n[v],E)+`
@@ -102,22 +102,22 @@ Check the render method of \``+e+"`.":""}function Ir(e,n,s,o){if(e=e.options,n){
102
102
  `}}),d=d===""?Un(o)+"<"+e+`>
103
103
  `:Un(o)+"<"+e+`
104
104
  `+d+Un(o)+`>
105
- `}return e=s.children,n=n.children,typeof e=="string"||typeof e=="number"||typeof e=="bigint"?(f="",(typeof n=="string"||typeof n=="number"||typeof n=="bigint")&&(f=""+n),d+=Hu(f,""+e,o+1)):(typeof n=="string"||typeof n=="number"||typeof n=="bigint")&&(d=e==null?d+Hu(""+n,null,o+1):d+Hu(""+n,void 0,o+1)),d}function nS(e,n){var s=eS(e);if(s===null){for(s="",e=e.child;e;)s+=nS(e,n),e=e.sibling;return s}return Un(n)+"<"+s+`>
106
- `}function Ap(e,n){var s=tS(e,n);if(s!==e&&(e.children.length!==1||e.children[0]!==s))return Un(n)+`...
107
- `+Ap(s,n+1);s="";var o=e.fiber._debugInfo;if(o)for(var d=0;d<o.length;d++){var f=o[d].name;typeof f=="string"&&(s+=Un(n)+"<"+f+`>
108
- `,n++)}if(o="",d=e.fiber.pendingProps,e.fiber.tag===6)o=Hu(d,e.serverProps,n),n++;else if(f=eS(e.fiber),f!==null)if(e.serverProps===void 0){o=n;var v=120-2*o-f.length-2,E="";for(x in d)if(d.hasOwnProperty(x)&&x!=="children"){var w=Ur(d[x],15);if(v-=x.length+w.length+2,0>v){E+=" ...";break}E+=" "+x+"="+w}o=Un(o)+"<"+f+E+`>
109
- `,n++}else e.serverProps===null?(o=Ep(f,d,Pr(n)),n++):typeof e.serverProps=="string"?console.error("Should not have matched a non HostText fiber to a Text node. This is a bug in React."):(o=uk(f,d,e.serverProps,n),n++);var x="";for(d=e.fiber.child,f=0;d&&f<e.children.length;)v=e.children[f],v.fiber===d?(x+=Ap(v,n),f++):x+=nS(d,n),d=d.sibling;for(d&&0<e.children.length&&(x+=Un(n)+`...
110
- `),d=e.serverTail,e.serverProps===null&&n--,e=0;e<d.length;e++)f=d[e],x=typeof f=="string"?x+(ka(n)+gl(f,120-2*n)+`
111
- `):x+Ep(f.type,f.props,ka(n));return s+o+x}function _p(e){try{return`
112
-
113
- `+Ap(e,0)}catch{return""}}function iS(e,n,s){for(var o=n,d=null,f=0;o;)o===e&&(f=0),d={fiber:o,children:d!==null?[d]:[],serverProps:o===n?s:o===e?null:void 0,serverTail:[],distanceFromLeaf:f},f++,o=o.return;return d!==null?_p(d).replaceAll(/^[+-]/gm,">"):""}function sS(e,n){var s=It({},e||$_),o={tag:n};return j_.indexOf(n)!==-1&&(s.aTagInScope=null,s.buttonTagInScope=null,s.nobrTagInScope=null),rL.indexOf(n)!==-1&&(s.pTagInButtonScope=null),aL.indexOf(n)!==-1&&n!=="address"&&n!=="div"&&n!=="p"&&(s.listItemTagAutoclosing=null,s.dlItemTagAutoclosing=null),s.current=o,n==="form"&&(s.formTag=o),n==="a"&&(s.aTagInScope=o),n==="button"&&(s.buttonTagInScope=o),n==="nobr"&&(s.nobrTagInScope=o),n==="p"&&(s.pTagInButtonScope=o),n==="li"&&(s.listItemTagAutoclosing=o),(n==="dd"||n==="dt")&&(s.dlItemTagAutoclosing=o),n==="#document"||n==="html"?s.containerTagInScope=null:s.containerTagInScope||(s.containerTagInScope=o),e!==null||n!=="#document"&&n!=="html"&&n!=="body"?s.implicitRootScope===!0&&(s.implicitRootScope=!1):s.implicitRootScope=!0,s}function aS(e,n,s){switch(n){case"select":return e==="hr"||e==="option"||e==="optgroup"||e==="script"||e==="template"||e==="#text";case"optgroup":return e==="option"||e==="#text";case"option":return e==="#text";case"tr":return e==="th"||e==="td"||e==="style"||e==="script"||e==="template";case"tbody":case"thead":case"tfoot":return e==="tr"||e==="style"||e==="script"||e==="template";case"colgroup":return e==="col"||e==="template";case"table":return e==="caption"||e==="colgroup"||e==="tbody"||e==="tfoot"||e==="thead"||e==="style"||e==="script"||e==="template";case"head":return e==="base"||e==="basefont"||e==="bgsound"||e==="link"||e==="meta"||e==="title"||e==="noscript"||e==="noframes"||e==="style"||e==="script"||e==="template";case"html":if(s)break;return e==="head"||e==="body"||e==="frameset";case"frameset":return e==="frame";case"#document":if(!s)return e==="html"}switch(e){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return n!=="h1"&&n!=="h2"&&n!=="h3"&&n!=="h4"&&n!=="h5"&&n!=="h6";case"rp":case"rt":return oL.indexOf(n)===-1;case"caption":case"col":case"colgroup":case"frameset":case"frame":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return n==null;case"head":return s||n===null;case"html":return s&&n==="#document"||n===null;case"body":return s&&(n==="#document"||n==="html")||n===null}return!0}function dk(e,n){switch(e){case"address":case"article":case"aside":case"blockquote":case"center":case"details":case"dialog":case"dir":case"div":case"dl":case"fieldset":case"figcaption":case"figure":case"footer":case"header":case"hgroup":case"main":case"menu":case"nav":case"ol":case"p":case"section":case"summary":case"ul":case"pre":case"listing":case"table":case"hr":case"xmp":case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return n.pTagInButtonScope;case"form":return n.formTag||n.pTagInButtonScope;case"li":return n.listItemTagAutoclosing;case"dd":case"dt":return n.dlItemTagAutoclosing;case"button":return n.buttonTagInScope;case"a":return n.aTagInScope;case"nobr":return n.nobrTagInScope}return null}function rS(e,n){for(;e;){switch(e.tag){case 5:case 26:case 27:if(e.type===n)return e}e=e.return}return null}function Tp(e,n){n=n||$_;var s=n.current;if(n=(s=aS(e,s&&s.tag,n.implicitRootScope)?null:s)?null:dk(e,n),n=s||n,!n)return!0;var o=n.tag;if(n=String(!!s)+"|"+e+"|"+o,jd[n])return!1;jd[n]=!0;var d=(n=$n)?rS(n.return,o):null,f=n!==null&&d!==null?iS(d,n,null):"",v="<"+e+">";return s?(s="",o==="table"&&e==="tr"&&(s+=" Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by the browser."),console.error(`In HTML, %s cannot be a child of <%s>.%s
105
+ `}return e=s.children,n=n.children,typeof e=="string"||typeof e=="number"||typeof e=="bigint"?(f="",(typeof n=="string"||typeof n=="number"||typeof n=="bigint")&&(f=""+n),d+=Bu(f,""+e,o+1)):(typeof n=="string"||typeof n=="number"||typeof n=="bigint")&&(d=e==null?d+Bu(""+n,null,o+1):d+Bu(""+n,void 0,o+1)),d}function eS(e,n){var s=tS(e);if(s===null){for(s="",e=e.child;e;)s+=eS(e,n),e=e.sibling;return s}return Un(n)+"<"+s+`>
106
+ `}function Ep(e,n){var s=J0(e,n);if(s!==e&&(e.children.length!==1||e.children[0]!==s))return Un(n)+`...
107
+ `+Ep(s,n+1);s="";var o=e.fiber._debugInfo;if(o)for(var d=0;d<o.length;d++){var f=o[d].name;typeof f=="string"&&(s+=Un(n)+"<"+f+`>
108
+ `,n++)}if(o="",d=e.fiber.pendingProps,e.fiber.tag===6)o=Bu(d,e.serverProps,n),n++;else if(f=tS(e.fiber),f!==null)if(e.serverProps===void 0){o=n;var v=120-2*o-f.length-2,E="";for(C in d)if(d.hasOwnProperty(C)&&C!=="children"){var w=Ur(d[C],15);if(v-=C.length+w.length+2,0>v){E+=" ...";break}E+=" "+C+"="+w}o=Un(o)+"<"+f+E+`>
109
+ `,n++}else e.serverProps===null?(o=Sp(f,d,Pr(n)),n++):typeof e.serverProps=="string"?console.error("Should not have matched a non HostText fiber to a Text node. This is a bug in React."):(o=ck(f,d,e.serverProps,n),n++);var C="";for(d=e.fiber.child,f=0;d&&f<e.children.length;)v=e.children[f],v.fiber===d?(C+=Ep(v,n),f++):C+=eS(d,n),d=d.sibling;for(d&&0<e.children.length&&(C+=Un(n)+`...
110
+ `),d=e.serverTail,e.serverProps===null&&n--,e=0;e<d.length;e++)f=d[e],C=typeof f=="string"?C+(ka(n)+gl(f,120-2*n)+`
111
+ `):C+Sp(f.type,f.props,ka(n));return s+o+C}function Ap(e){try{return`
112
+
113
+ `+Ep(e,0)}catch{return""}}function nS(e,n,s){for(var o=n,d=null,f=0;o;)o===e&&(f=0),d={fiber:o,children:d!==null?[d]:[],serverProps:o===n?s:o===e?null:void 0,serverTail:[],distanceFromLeaf:f},f++,o=o.return;return d!==null?Ap(d).replaceAll(/^[+-]/gm,">"):""}function iS(e,n){var s=It({},e||j_),o={tag:n};return F_.indexOf(n)!==-1&&(s.aTagInScope=null,s.buttonTagInScope=null,s.nobrTagInScope=null),aL.indexOf(n)!==-1&&(s.pTagInButtonScope=null),sL.indexOf(n)!==-1&&n!=="address"&&n!=="div"&&n!=="p"&&(s.listItemTagAutoclosing=null,s.dlItemTagAutoclosing=null),s.current=o,n==="form"&&(s.formTag=o),n==="a"&&(s.aTagInScope=o),n==="button"&&(s.buttonTagInScope=o),n==="nobr"&&(s.nobrTagInScope=o),n==="p"&&(s.pTagInButtonScope=o),n==="li"&&(s.listItemTagAutoclosing=o),(n==="dd"||n==="dt")&&(s.dlItemTagAutoclosing=o),n==="#document"||n==="html"?s.containerTagInScope=null:s.containerTagInScope||(s.containerTagInScope=o),e!==null||n!=="#document"&&n!=="html"&&n!=="body"?s.implicitRootScope===!0&&(s.implicitRootScope=!1):s.implicitRootScope=!0,s}function sS(e,n,s){switch(n){case"select":return e==="hr"||e==="option"||e==="optgroup"||e==="script"||e==="template"||e==="#text";case"optgroup":return e==="option"||e==="#text";case"option":return e==="#text";case"tr":return e==="th"||e==="td"||e==="style"||e==="script"||e==="template";case"tbody":case"thead":case"tfoot":return e==="tr"||e==="style"||e==="script"||e==="template";case"colgroup":return e==="col"||e==="template";case"table":return e==="caption"||e==="colgroup"||e==="tbody"||e==="tfoot"||e==="thead"||e==="style"||e==="script"||e==="template";case"head":return e==="base"||e==="basefont"||e==="bgsound"||e==="link"||e==="meta"||e==="title"||e==="noscript"||e==="noframes"||e==="style"||e==="script"||e==="template";case"html":if(s)break;return e==="head"||e==="body"||e==="frameset";case"frameset":return e==="frame";case"#document":if(!s)return e==="html"}switch(e){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return n!=="h1"&&n!=="h2"&&n!=="h3"&&n!=="h4"&&n!=="h5"&&n!=="h6";case"rp":case"rt":return rL.indexOf(n)===-1;case"caption":case"col":case"colgroup":case"frameset":case"frame":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return n==null;case"head":return s||n===null;case"html":return s&&n==="#document"||n===null;case"body":return s&&(n==="#document"||n==="html")||n===null}return!0}function uk(e,n){switch(e){case"address":case"article":case"aside":case"blockquote":case"center":case"details":case"dialog":case"dir":case"div":case"dl":case"fieldset":case"figcaption":case"figure":case"footer":case"header":case"hgroup":case"main":case"menu":case"nav":case"ol":case"p":case"section":case"summary":case"ul":case"pre":case"listing":case"table":case"hr":case"xmp":case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return n.pTagInButtonScope;case"form":return n.formTag||n.pTagInButtonScope;case"li":return n.listItemTagAutoclosing;case"dd":case"dt":return n.dlItemTagAutoclosing;case"button":return n.buttonTagInScope;case"a":return n.aTagInScope;case"nobr":return n.nobrTagInScope}return null}function aS(e,n){for(;e;){switch(e.tag){case 5:case 26:case 27:if(e.type===n)return e}e=e.return}return null}function _p(e,n){n=n||j_;var s=n.current;if(n=(s=sS(e,s&&s.tag,n.implicitRootScope)?null:s)?null:uk(e,n),n=s||n,!n)return!0;var o=n.tag;if(n=String(!!s)+"|"+e+"|"+o,$d[n])return!1;$d[n]=!0;var d=(n=$n)?aS(n.return,o):null,f=n!==null&&d!==null?nS(d,n,null):"",v="<"+e+">";return s?(s="",o==="table"&&e==="tr"&&(s+=" Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by the browser."),console.error(`In HTML, %s cannot be a child of <%s>.%s
114
114
  This will cause a hydration error.%s`,v,o,s,f)):console.error(`In HTML, %s cannot be a descendant of <%s>.
115
115
  This will cause a hydration error.%s`,v,o,f),n&&(e=n.return,d===null||e===null||d===e&&e._debugOwner===n._debugOwner||pt(d,function(){console.error(`<%s> cannot contain a nested %s.
116
- See this log for the ancestor stack trace.`,o,v)})),!1}function Bu(e,n,s){if(s||aS("#text",n,!1))return!0;if(s="#text|"+n,jd[s])return!1;jd[s]=!0;var o=(s=$n)?rS(s,n):null;return s=s!==null&&o!==null?iS(o,s,s.tag!==6?{children:null}:null):"",/\S/.test(e)?console.error(`In HTML, text nodes cannot be a child of <%s>.
116
+ See this log for the ancestor stack trace.`,o,v)})),!1}function Fu(e,n,s){if(s||sS("#text",n,!1))return!0;if(s="#text|"+n,$d[s])return!1;$d[s]=!0;var o=(s=$n)?aS(s,n):null;return s=s!==null&&o!==null?nS(o,s,s.tag!==6?{children:null}:null):"",/\S/.test(e)?console.error(`In HTML, text nodes cannot be a child of <%s>.
117
117
  This will cause a hydration error.%s`,n,s):console.error(`In HTML, whitespace text nodes cannot be a child of <%s>. Make sure you don't have any extra whitespace between tags on each line of your source code.
118
- This will cause a hydration error.%s`,n,s),!1}function bl(e,n){if(n){var s=e.firstChild;if(s&&s===e.lastChild&&s.nodeType===3){s.nodeValue=n;return}}e.textContent=n}function hk(e){return e.replace(uL,function(n,s){return s.toUpperCase()})}function oS(e,n,s){var o=n.indexOf("--")===0;o||(-1<n.indexOf("-")?eo.hasOwnProperty(n)&&eo[n]||(eo[n]=!0,console.error("Unsupported style property %s. Did you mean %s?",n,hk(n.replace(cL,"ms-")))):lL.test(n)?eo.hasOwnProperty(n)&&eo[n]||(eo[n]=!0,console.error("Unsupported vendor-prefixed style property %s. Did you mean %s?",n,n.charAt(0).toUpperCase()+n.slice(1))):!q_.test(s)||Ig.hasOwnProperty(s)&&Ig[s]||(Ig[s]=!0,console.error(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,n,s.replace(q_,""))),typeof s=="number"&&(isNaN(s)?Y_||(Y_=!0,console.error("`NaN` is an invalid value for the `%s` css style property.",n)):isFinite(s)||X_||(X_=!0,console.error("`Infinity` is an invalid value for the `%s` css style property.",n)))),s==null||typeof s=="boolean"||s===""?o?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="":o?e.setProperty(n,s):typeof s!="number"||s===0||W_.has(n)?n==="float"?e.cssFloat=s:(vt(s,n),e[n]=(""+s).trim()):e[n]=s+"px"}function lS(e,n,s){if(n!=null&&typeof n!="object")throw Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");if(n&&Object.freeze(n),e=e.style,s!=null){if(n){var o={};if(s){for(var d in s)if(s.hasOwnProperty(d)&&!n.hasOwnProperty(d))for(var f=Lg[d]||[d],v=0;v<f.length;v++)o[f[v]]=d}for(var E in n)if(n.hasOwnProperty(E)&&(!s||s[E]!==n[E]))for(d=Lg[E]||[E],f=0;f<d.length;f++)o[d[f]]=E;E={};for(var w in n)for(d=Lg[w]||[w],f=0;f<d.length;f++)E[d[f]]=w;w={};for(var x in o)if(d=o[x],(f=E[x])&&d!==f&&(v=d+","+f,!w[v])){w[v]=!0,v=console;var H=n[d];v.error.call(v,"%s a style property during rerender (%s) when a conflicting property is set (%s) can lead to styling bugs. To avoid this, don't mix shorthand and non-shorthand properties for the same value; instead, replace the shorthand with separate values.",H==null||typeof H=="boolean"||H===""?"Removing":"Updating",d,f)}}for(var V in s)!s.hasOwnProperty(V)||n!=null&&n.hasOwnProperty(V)||(V.indexOf("--")===0?e.setProperty(V,""):V==="float"?e.cssFloat="":e[V]="");for(var z in n)x=n[z],n.hasOwnProperty(z)&&s[z]!==x&&oS(e,z,x)}else for(o in n)n.hasOwnProperty(o)&&oS(e,o,n[o])}function vl(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function cS(e){return dL.get(e)||e}function fk(e,n){if(gs.call(io,n)&&io[n])return!0;if(fL.test(n)){if(e="aria-"+n.slice(4).toLowerCase(),e=Q_.hasOwnProperty(e)?e:null,e==null)return console.error("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",n),io[n]=!0;if(n!==e)return console.error("Invalid ARIA attribute `%s`. Did you mean `%s`?",n,e),io[n]=!0}if(hL.test(n)){if(e=n.toLowerCase(),e=Q_.hasOwnProperty(e)?e:null,e==null)return io[n]=!0,!1;n!==e&&(console.error("Unknown ARIA attribute `%s`. Did you mean `%s`?",n,e),io[n]=!0)}return!0}function pk(e,n){var s=[],o;for(o in n)fk(e,o)||s.push(o);n=s.map(function(d){return"`"+d+"`"}).join(", "),s.length===1?console.error("Invalid aria prop %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",n,e):1<s.length&&console.error("Invalid aria props %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",n,e)}function mk(e,n,s,o){if(gs.call(mn,n)&&mn[n])return!0;var d=n.toLowerCase();if(d==="onfocusin"||d==="onfocusout")return console.error("React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React."),mn[n]=!0;if(typeof s=="function"&&(e==="form"&&n==="action"||e==="input"&&n==="formAction"||e==="button"&&n==="formAction"))return!0;if(o!=null){if(e=o.possibleRegistrationNames,o.registrationNameDependencies.hasOwnProperty(n))return!0;if(o=e.hasOwnProperty(d)?e[d]:null,o!=null)return console.error("Invalid event handler property `%s`. Did you mean `%s`?",n,o),mn[n]=!0;if(Z_.test(n))return console.error("Unknown event handler property `%s`. It will be ignored.",n),mn[n]=!0}else if(Z_.test(n))return pL.test(n)&&console.error("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",n),mn[n]=!0;if(mL.test(n)||gL.test(n))return!0;if(d==="innerhtml")return console.error("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),mn[n]=!0;if(d==="aria")return console.error("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),mn[n]=!0;if(d==="is"&&s!==null&&s!==void 0&&typeof s!="string")return console.error("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof s),mn[n]=!0;if(typeof s=="number"&&isNaN(s))return console.error("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",n),mn[n]=!0;if(Gd.hasOwnProperty(d)){if(d=Gd[d],d!==n)return console.error("Invalid DOM property `%s`. Did you mean `%s`?",n,d),mn[n]=!0}else if(n!==d)return console.error("React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.",n,d),mn[n]=!0;switch(n){case"dangerouslySetInnerHTML":case"children":case"style":case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":return!0;case"innerText":case"textContent":return!0}switch(typeof s){case"boolean":switch(n){case"autoFocus":case"checked":case"multiple":case"muted":case"selected":case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":case"capture":case"download":case"inert":return!0;default:return d=n.toLowerCase().slice(0,5),d==="data-"||d==="aria-"?!0:(s?console.error('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.',s,n,n,s,n):console.error('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.',s,n,n,s,n,n,n),mn[n]=!0)}case"function":case"symbol":return mn[n]=!0,!1;case"string":if(s==="false"||s==="true"){switch(n){case"checked":case"selected":case"multiple":case"muted":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":case"inert":break;default:return!0}console.error("Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",s,n,s==="false"?"The browser will interpret it as a truthy value.":'Although this works, it will not work as expected if you pass the string "false".',n,s),mn[n]=!0}}return!0}function gk(e,n,s){var o=[],d;for(d in n)mk(e,d,n[d],s)||o.push(d);n=o.map(function(f){return"`"+f+"`"}).join(", "),o.length===1?console.error("Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://react.dev/link/attribute-behavior ",n,e):1<o.length&&console.error("Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://react.dev/link/attribute-behavior ",n,e)}function Sl(e){return yL.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function wp(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}function uS(e){var n=yi(e);if(n&&(e=n.stateNode)){var s=e[Dn]||null;t:switch(e=n.stateNode,n.type){case"input":if(bp(e,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),n=s.name,s.type==="radio"&&n!=null){for(s=e;s.parentNode;)s=s.parentNode;for(st(n,"name"),s=s.querySelectorAll('input[name="'+Zn(""+n)+'"][type="radio"]'),n=0;n<s.length;n++){var o=s[n];if(o!==e&&o.form===e.form){var d=o[Dn]||null;if(!d)throw Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.");bp(o,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name)}}for(n=0;n<s.length;n++)o=s[n],o.form===e.form&&V0(o)}break t;case"textarea":Z0(e,s.value,s.defaultValue);break t;case"select":n=s.value,n!=null&&Ir(e,!!s.multiple,n,!1)}}}function dS(e,n,s){if(Pg)return e(n,s);Pg=!0;try{var o=e(n);return o}finally{if(Pg=!1,(so!==null||ao!==null)&&(Vr(),so&&(n=so,e=ao,ao=so=null,uS(n),e)))for(n=0;n<e.length;n++)uS(e[n])}}function El(e,n){var s=e.stateNode;if(s===null)return null;var o=s[Dn]||null;if(o===null)return null;s=o[n];t:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break t;default:e=!1}if(e)return null;if(s&&typeof s!="function")throw Error("Expected `"+n+"` listener to be a function, instead got a value of `"+typeof s+"` type.");return s}function hS(){if(Vd)return Vd;var e,n=zg,s=n.length,o,d="value"in ia?ia.value:ia.textContent,f=d.length;for(e=0;e<s&&n[e]===d[e];e++);var v=s-e;for(o=1;o<=v&&n[s-o]===d[f-o];o++);return Vd=d.slice(e,1<o?1-o:void 0)}function Fu(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function ju(){return!0}function fS(){return!1}function wn(e){function n(s,o,d,f,v){this._reactName=s,this._targetInst=d,this.type=o,this.nativeEvent=f,this.target=v,this.currentTarget=null;for(var E in e)e.hasOwnProperty(E)&&(s=e[E],this[E]=s?s(f):f[E]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?ju:fS,this.isPropagationStopped=fS,this}return It(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=ju)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=ju)},persist:function(){},isPersistent:ju}),n}function yk(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=ML[e])?!!n[e]:!1}function Cp(){return yk}function pS(e,n){switch(e){case"keyup":return jL.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==nT;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function mS(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}function bk(e,n){switch(e){case"compositionend":return mS(n);case"keypress":return n.which!==sT?null:(rT=!0,aT);case"textInput":return e=n.data,e===aT&&rT?null:e;default:return null}}function vk(e,n){if(ro)return e==="compositionend"||!jg&&pS(e,n)?(e=hS(),Vd=zg=ia=null,ro=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return iT&&n.locale!=="ko"?null:n.data;default:return null}}function gS(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!GL[e.type]:n==="textarea"}function Sk(e){if(!Gi)return!1;e="on"+e;var n=e in document;return n||(n=document.createElement("div"),n.setAttribute(e,"return;"),n=typeof n[e]=="function"),n}function yS(e,n,s,o){so?ao?ao.push(o):ao=[o]:so=o,n=Cd(n,"onChange"),0<n.length&&(s=new qd("onChange","change",null,s,o),e.push({event:s,listeners:n}))}function Ek(e){zA(e,0)}function $u(e){var n=js(e);if(V0(n))return e}function bS(e,n){if(e==="change")return n}function vS(){ac&&(ac.detachEvent("onpropertychange",SS),rc=ac=null)}function SS(e){if(e.propertyName==="value"&&$u(rc)){var n=[];yS(n,rc,e,wp(e)),dS(Ek,n)}}function Ak(e,n,s){e==="focusin"?(vS(),ac=n,rc=s,ac.attachEvent("onpropertychange",SS)):e==="focusout"&&vS()}function _k(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return $u(rc)}function Tk(e,n){if(e==="click")return $u(n)}function wk(e,n){if(e==="input"||e==="change")return $u(n)}function Ck(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}function Al(e,n){if(gn(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var s=Object.keys(e),o=Object.keys(n);if(s.length!==o.length)return!1;for(o=0;o<s.length;o++){var d=s[o];if(!gs.call(n,d)||!gn(e[d],n[d]))return!1}return!0}function ES(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function AS(e,n){var s=ES(e);e=0;for(var o;s;){if(s.nodeType===3){if(o=e+s.textContent.length,e<=n&&o>=n)return{node:s,offset:n-e};e=o}t:{for(;s;){if(s.nextSibling){s=s.nextSibling;break t}s=s.parentNode}s=void 0}s=ES(s)}}function _S(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?_S(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function TS(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=zu(e.document);n instanceof e.HTMLIFrameElement;){try{var s=typeof n.contentWindow.location.href=="string"}catch{s=!1}if(s)e=n.contentWindow;else break;n=zu(e.document)}return n}function xp(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}function wS(e,n,s){var o=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;Gg||oo==null||oo!==zu(o)||(o=oo,"selectionStart"in o&&xp(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),oc&&Al(oc,o)||(oc=o,o=Cd($g,"onSelect"),0<o.length&&(n=new qd("onSelect","select",null,n,s),e.push({event:n,listeners:o}),n.target=oo)))}function Na(e,n){var s={};return s[e.toLowerCase()]=n.toLowerCase(),s["Webkit"+e]="webkit"+n,s["Moz"+e]="moz"+n,s}function La(e){if(Vg[e])return Vg[e];if(!lo[e])return e;var n=lo[e],s;for(s in n)if(n.hasOwnProperty(s)&&s in lT)return Vg[e]=n[s];return e}function bi(e,n){fT.set(e,n),et(n,[e])}function zn(e,n){if(typeof e=="object"&&e!==null){var s=Yg.get(e);return s!==void 0?s:(n={value:e,source:n,stack:j0(n)},Yg.set(e,n),n)}return{value:e,source:n,stack:j0(n)}}function Gu(){for(var e=co,n=Xg=co=0;n<e;){var s=ni[n];ni[n++]=null;var o=ni[n];ni[n++]=null;var d=ni[n];ni[n++]=null;var f=ni[n];if(ni[n++]=null,o!==null&&d!==null){var v=o.pending;v===null?d.next=d:(d.next=v.next,v.next=d),o.pending=d}f!==0&&CS(s,d,f)}}function Vu(e,n,s,o){ni[co++]=e,ni[co++]=n,ni[co++]=s,ni[co++]=o,Xg|=o,e.lanes|=o,e=e.alternate,e!==null&&(e.lanes|=o)}function Rp(e,n,s,o){return Vu(e,n,s,o),qu(e)}function Cn(e,n){return Vu(e,null,null,n),qu(e)}function CS(e,n,s){e.lanes|=s;var o=e.alternate;o!==null&&(o.lanes|=s);for(var d=!1,f=e.return;f!==null;)f.childLanes|=s,o=f.alternate,o!==null&&(o.childLanes|=s),f.tag===22&&(e=f.stateNode,e===null||e._visibility&Xd||(d=!0)),e=f,f=f.return;return e.tag===3?(f=e.stateNode,d&&n!==null&&(d=31-pn(s),e=f.hiddenUpdates,o=e[d],o===null?e[d]=[n]:o.push(n),n.lane=s|536870912),f):null}function qu(e){if(Dc>fI)throw lr=Dc=0,Mc=Ty=null,Error("Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.");lr>pI&&(lr=0,Mc=null,console.error("Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render.")),e.alternate===null&&(e.flags&4098)!==0&&OA(e);for(var n=e,s=n.return;s!==null;)n.alternate===null&&(n.flags&4098)!==0&&OA(e),n=s,s=n.return;return n.tag===3?n.stateNode:null}function Ia(e){if(ii===null)return e;var n=ii(e);return n===void 0?e:n.current}function Dp(e){if(ii===null)return e;var n=ii(e);return n===void 0?e!=null&&typeof e.render=="function"&&(n=Ia(e.render),e.render!==n)?(n={$$typeof:Ql,render:n},e.displayName!==void 0&&(n.displayName=e.displayName),n):e:n.current}function xS(e,n){if(ii===null)return!1;var s=e.elementType;n=n.type;var o=!1,d=typeof n=="object"&&n!==null?n.$$typeof:null;switch(e.tag){case 1:typeof n=="function"&&(o=!0);break;case 0:(typeof n=="function"||d===jn)&&(o=!0);break;case 11:(d===Ql||d===jn)&&(o=!0);break;case 14:case 15:(d===Ud||d===jn)&&(o=!0);break;default:return!1}return!!(o&&(e=ii(s),e!==void 0&&e===ii(n)))}function RS(e){ii!==null&&typeof WeakSet=="function"&&(uo===null&&(uo=new WeakSet),uo.add(e))}function Mp(e,n,s){var o=e.alternate,d=e.child,f=e.sibling,v=e.tag,E=e.type,w=null;switch(v){case 0:case 15:case 1:w=E;break;case 11:w=E.render}if(ii===null)throw Error("Expected resolveFamily to be set during hot reload.");var x=!1;E=!1,w!==null&&(w=ii(w),w!==void 0&&(s.has(w)?E=!0:n.has(w)&&(v===1?E=!0:x=!0))),uo!==null&&(uo.has(e)||o!==null&&uo.has(o))&&(E=!0),E&&(e._debugNeedsRemount=!0),(E||x)&&(o=Cn(e,2),o!==null&&Ce(o,e,2)),d===null||E||Mp(d,n,s),f!==null&&Mp(f,n,s)}function xk(e,n,s,o){this.tag=e,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null,this.actualDuration=-0,this.actualStartTime=-1.1,this.treeBaseDuration=this.selfBaseDuration=-0,this._debugTask=this._debugStack=this._debugOwner=this._debugInfo=null,this._debugNeedsRemount=!1,this._debugHookTypes=null,mT||typeof Object.preventExtensions!="function"||Object.preventExtensions(this)}function Op(e){return e=e.prototype,!(!e||!e.isReactComponent)}function rs(e,n){var s=e.alternate;switch(s===null?(s=b(e.tag,n,e.key,e.mode),s.elementType=e.elementType,s.type=e.type,s.stateNode=e.stateNode,s._debugOwner=e._debugOwner,s._debugStack=e._debugStack,s._debugTask=e._debugTask,s._debugHookTypes=e._debugHookTypes,s.alternate=e,e.alternate=s):(s.pendingProps=n,s.type=e.type,s.flags=0,s.subtreeFlags=0,s.deletions=null,s.actualDuration=-0,s.actualStartTime=-1.1),s.flags=e.flags&65011712,s.childLanes=e.childLanes,s.lanes=e.lanes,s.child=e.child,s.memoizedProps=e.memoizedProps,s.memoizedState=e.memoizedState,s.updateQueue=e.updateQueue,n=e.dependencies,s.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext,_debugThenableState:n._debugThenableState},s.sibling=e.sibling,s.index=e.index,s.ref=e.ref,s.refCleanup=e.refCleanup,s.selfBaseDuration=e.selfBaseDuration,s.treeBaseDuration=e.treeBaseDuration,s._debugInfo=e._debugInfo,s._debugNeedsRemount=e._debugNeedsRemount,s.tag){case 0:case 15:s.type=Ia(e.type);break;case 1:s.type=Ia(e.type);break;case 11:s.type=Dp(e.type)}return s}function DS(e,n){e.flags&=65011714;var s=e.alternate;return s===null?(e.childLanes=0,e.lanes=n,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null,e.selfBaseDuration=0,e.treeBaseDuration=0):(e.childLanes=s.childLanes,e.lanes=s.lanes,e.child=s.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=s.memoizedProps,e.memoizedState=s.memoizedState,e.updateQueue=s.updateQueue,e.type=s.type,n=s.dependencies,e.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext,_debugThenableState:n._debugThenableState},e.selfBaseDuration=s.selfBaseDuration,e.treeBaseDuration=s.treeBaseDuration),e}function kp(e,n,s,o,d,f){var v=0,E=e;if(typeof e=="function")Op(e)&&(v=1),E=Ia(E);else if(typeof e=="string")v=B(),v=xN(e,s,v)?26:e==="html"||e==="head"||e==="body"?27:5;else t:switch(e){case Ag:return n=b(31,s,n,d),n.elementType=Ag,n.lanes=f,n;case Zr:return Pa(s.children,d,f,n);case Pd:v=8,d|=on,d|=Ei;break;case bg:return e=s,o=d,typeof e.id!="string"&&console.error('Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',typeof e.id),n=b(12,e,n,o|Je),n.elementType=bg,n.lanes=f,n.stateNode={effectDuration:0,passiveEffectDuration:0},n;case Sg:return n=b(13,s,n,d),n.elementType=Sg,n.lanes=f,n;case Eg:return n=b(19,s,n,d),n.elementType=Eg,n.lanes=f,n;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case FN:case Hi:v=10;break t;case vg:v=9;break t;case Ql:v=11,E=Dp(E);break t;case Ud:v=14;break t;case jn:v=16,E=null;break t}E="",(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(E+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),e===null?s="null":Ze(e)?s="array":e!==void 0&&e.$$typeof===Zs?(s="<"+(F(e.type)||"Unknown")+" />",E=" Did you accidentally export a JSX literal instead of a component?"):s=typeof e,(v=o?J(o):null)&&(E+=`
118
+ This will cause a hydration error.%s`,n,s),!1}function bl(e,n){if(n){var s=e.firstChild;if(s&&s===e.lastChild&&s.nodeType===3){s.nodeValue=n;return}}e.textContent=n}function dk(e){return e.replace(cL,function(n,s){return s.toUpperCase()})}function rS(e,n,s){var o=n.indexOf("--")===0;o||(-1<n.indexOf("-")?eo.hasOwnProperty(n)&&eo[n]||(eo[n]=!0,console.error("Unsupported style property %s. Did you mean %s?",n,dk(n.replace(lL,"ms-")))):oL.test(n)?eo.hasOwnProperty(n)&&eo[n]||(eo[n]=!0,console.error("Unsupported vendor-prefixed style property %s. Did you mean %s?",n,n.charAt(0).toUpperCase()+n.slice(1))):!V_.test(s)||Lg.hasOwnProperty(s)&&Lg[s]||(Lg[s]=!0,console.error(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,n,s.replace(V_,""))),typeof s=="number"&&(isNaN(s)?q_||(q_=!0,console.error("`NaN` is an invalid value for the `%s` css style property.",n)):isFinite(s)||X_||(X_=!0,console.error("`Infinity` is an invalid value for the `%s` css style property.",n)))),s==null||typeof s=="boolean"||s===""?o?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="":o?e.setProperty(n,s):typeof s!="number"||s===0||Y_.has(n)?n==="float"?e.cssFloat=s:(vt(s,n),e[n]=(""+s).trim()):e[n]=s+"px"}function oS(e,n,s){if(n!=null&&typeof n!="object")throw Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");if(n&&Object.freeze(n),e=e.style,s!=null){if(n){var o={};if(s){for(var d in s)if(s.hasOwnProperty(d)&&!n.hasOwnProperty(d))for(var f=Ng[d]||[d],v=0;v<f.length;v++)o[f[v]]=d}for(var E in n)if(n.hasOwnProperty(E)&&(!s||s[E]!==n[E]))for(d=Ng[E]||[E],f=0;f<d.length;f++)o[d[f]]=E;E={};for(var w in n)for(d=Ng[w]||[w],f=0;f<d.length;f++)E[d[f]]=w;w={};for(var C in o)if(d=o[C],(f=E[C])&&d!==f&&(v=d+","+f,!w[v])){w[v]=!0,v=console;var H=n[d];v.error.call(v,"%s a style property during rerender (%s) when a conflicting property is set (%s) can lead to styling bugs. To avoid this, don't mix shorthand and non-shorthand properties for the same value; instead, replace the shorthand with separate values.",H==null||typeof H=="boolean"||H===""?"Removing":"Updating",d,f)}}for(var V in s)!s.hasOwnProperty(V)||n!=null&&n.hasOwnProperty(V)||(V.indexOf("--")===0?e.setProperty(V,""):V==="float"?e.cssFloat="":e[V]="");for(var z in n)C=n[z],n.hasOwnProperty(z)&&s[z]!==C&&rS(e,z,C)}else for(o in n)n.hasOwnProperty(o)&&rS(e,o,n[o])}function vl(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function lS(e){return uL.get(e)||e}function hk(e,n){if(gs.call(io,n)&&io[n])return!0;if(hL.test(n)){if(e="aria-"+n.slice(4).toLowerCase(),e=W_.hasOwnProperty(e)?e:null,e==null)return console.error("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",n),io[n]=!0;if(n!==e)return console.error("Invalid ARIA attribute `%s`. Did you mean `%s`?",n,e),io[n]=!0}if(dL.test(n)){if(e=n.toLowerCase(),e=W_.hasOwnProperty(e)?e:null,e==null)return io[n]=!0,!1;n!==e&&(console.error("Unknown ARIA attribute `%s`. Did you mean `%s`?",n,e),io[n]=!0)}return!0}function fk(e,n){var s=[],o;for(o in n)hk(e,o)||s.push(o);n=s.map(function(d){return"`"+d+"`"}).join(", "),s.length===1?console.error("Invalid aria prop %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",n,e):1<s.length&&console.error("Invalid aria props %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",n,e)}function pk(e,n,s,o){if(gs.call(mn,n)&&mn[n])return!0;var d=n.toLowerCase();if(d==="onfocusin"||d==="onfocusout")return console.error("React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React."),mn[n]=!0;if(typeof s=="function"&&(e==="form"&&n==="action"||e==="input"&&n==="formAction"||e==="button"&&n==="formAction"))return!0;if(o!=null){if(e=o.possibleRegistrationNames,o.registrationNameDependencies.hasOwnProperty(n))return!0;if(o=e.hasOwnProperty(d)?e[d]:null,o!=null)return console.error("Invalid event handler property `%s`. Did you mean `%s`?",n,o),mn[n]=!0;if(K_.test(n))return console.error("Unknown event handler property `%s`. It will be ignored.",n),mn[n]=!0}else if(K_.test(n))return fL.test(n)&&console.error("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",n),mn[n]=!0;if(pL.test(n)||mL.test(n))return!0;if(d==="innerhtml")return console.error("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),mn[n]=!0;if(d==="aria")return console.error("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),mn[n]=!0;if(d==="is"&&s!==null&&s!==void 0&&typeof s!="string")return console.error("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof s),mn[n]=!0;if(typeof s=="number"&&isNaN(s))return console.error("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",n),mn[n]=!0;if(Vd.hasOwnProperty(d)){if(d=Vd[d],d!==n)return console.error("Invalid DOM property `%s`. Did you mean `%s`?",n,d),mn[n]=!0}else if(n!==d)return console.error("React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.",n,d),mn[n]=!0;switch(n){case"dangerouslySetInnerHTML":case"children":case"style":case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":return!0;case"innerText":case"textContent":return!0}switch(typeof s){case"boolean":switch(n){case"autoFocus":case"checked":case"multiple":case"muted":case"selected":case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":case"capture":case"download":case"inert":return!0;default:return d=n.toLowerCase().slice(0,5),d==="data-"||d==="aria-"?!0:(s?console.error('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.',s,n,n,s,n):console.error('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.',s,n,n,s,n,n,n),mn[n]=!0)}case"function":case"symbol":return mn[n]=!0,!1;case"string":if(s==="false"||s==="true"){switch(n){case"checked":case"selected":case"multiple":case"muted":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":case"inert":break;default:return!0}console.error("Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",s,n,s==="false"?"The browser will interpret it as a truthy value.":'Although this works, it will not work as expected if you pass the string "false".',n,s),mn[n]=!0}}return!0}function mk(e,n,s){var o=[],d;for(d in n)pk(e,d,n[d],s)||o.push(d);n=o.map(function(f){return"`"+f+"`"}).join(", "),o.length===1?console.error("Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://react.dev/link/attribute-behavior ",n,e):1<o.length&&console.error("Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://react.dev/link/attribute-behavior ",n,e)}function Sl(e){return gL.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Tp(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}function cS(e){var n=yi(e);if(n&&(e=n.stateNode)){var s=e[Dn]||null;t:switch(e=n.stateNode,n.type){case"input":if(yp(e,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),n=s.name,s.type==="radio"&&n!=null){for(s=e;s.parentNode;)s=s.parentNode;for(st(n,"name"),s=s.querySelectorAll('input[name="'+Zn(""+n)+'"][type="radio"]'),n=0;n<s.length;n++){var o=s[n];if(o!==e&&o.form===e.form){var d=o[Dn]||null;if(!d)throw Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.");yp(o,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name)}}for(n=0;n<s.length;n++)o=s[n],o.form===e.form&&G0(o)}break t;case"textarea":K0(e,s.value,s.defaultValue);break t;case"select":n=s.value,n!=null&&Ir(e,!!s.multiple,n,!1)}}}function uS(e,n,s){if(Ig)return e(n,s);Ig=!0;try{var o=e(n);return o}finally{if(Ig=!1,(so!==null||ao!==null)&&(Vr(),so&&(n=so,e=ao,ao=so=null,cS(n),e)))for(n=0;n<e.length;n++)cS(e[n])}}function El(e,n){var s=e.stateNode;if(s===null)return null;var o=s[Dn]||null;if(o===null)return null;s=o[n];t:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break t;default:e=!1}if(e)return null;if(s&&typeof s!="function")throw Error("Expected `"+n+"` listener to be a function, instead got a value of `"+typeof s+"` type.");return s}function dS(){if(qd)return qd;var e,n=Ug,s=n.length,o,d="value"in ia?ia.value:ia.textContent,f=d.length;for(e=0;e<s&&n[e]===d[e];e++);var v=s-e;for(o=1;o<=v&&n[s-o]===d[f-o];o++);return qd=d.slice(e,1<o?1-o:void 0)}function ju(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function $u(){return!0}function hS(){return!1}function wn(e){function n(s,o,d,f,v){this._reactName=s,this._targetInst=d,this.type=o,this.nativeEvent=f,this.target=v,this.currentTarget=null;for(var E in e)e.hasOwnProperty(E)&&(s=e[E],this[E]=s?s(f):f[E]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?$u:hS,this.isPropagationStopped=hS,this}return It(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=$u)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=$u)},persist:function(){},isPersistent:$u}),n}function gk(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=DL[e])?!!n[e]:!1}function wp(){return gk}function fS(e,n){switch(e){case"keyup":return FL.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==eT;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function pS(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}function yk(e,n){switch(e){case"compositionend":return pS(n);case"keypress":return n.which!==iT?null:(aT=!0,sT);case"textInput":return e=n.data,e===sT&&aT?null:e;default:return null}}function bk(e,n){if(ro)return e==="compositionend"||!Fg&&fS(e,n)?(e=dS(),qd=Ug=ia=null,ro=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return nT&&n.locale!=="ko"?null:n.data;default:return null}}function mS(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!$L[e.type]:n==="textarea"}function vk(e){if(!Gi)return!1;e="on"+e;var n=e in document;return n||(n=document.createElement("div"),n.setAttribute(e,"return;"),n=typeof n[e]=="function"),n}function gS(e,n,s,o){so?ao?ao.push(o):ao=[o]:so=o,n=Cd(n,"onChange"),0<n.length&&(s=new Xd("onChange","change",null,s,o),e.push({event:s,listeners:n}))}function Sk(e){UA(e,0)}function Gu(e){var n=js(e);if(G0(n))return e}function yS(e,n){if(e==="change")return n}function bS(){ac&&(ac.detachEvent("onpropertychange",vS),rc=ac=null)}function vS(e){if(e.propertyName==="value"&&Gu(rc)){var n=[];gS(n,rc,e,Tp(e)),uS(Sk,n)}}function Ek(e,n,s){e==="focusin"?(bS(),ac=n,rc=s,ac.attachEvent("onpropertychange",vS)):e==="focusout"&&bS()}function Ak(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Gu(rc)}function _k(e,n){if(e==="click")return Gu(n)}function Tk(e,n){if(e==="input"||e==="change")return Gu(n)}function wk(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}function Al(e,n){if(gn(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var s=Object.keys(e),o=Object.keys(n);if(s.length!==o.length)return!1;for(o=0;o<s.length;o++){var d=s[o];if(!gs.call(n,d)||!gn(e[d],n[d]))return!1}return!0}function SS(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ES(e,n){var s=SS(e);e=0;for(var o;s;){if(s.nodeType===3){if(o=e+s.textContent.length,e<=n&&o>=n)return{node:s,offset:n-e};e=o}t:{for(;s;){if(s.nextSibling){s=s.nextSibling;break t}s=s.parentNode}s=void 0}s=SS(s)}}function AS(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?AS(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function _S(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=Hu(e.document);n instanceof e.HTMLIFrameElement;){try{var s=typeof n.contentWindow.location.href=="string"}catch{s=!1}if(s)e=n.contentWindow;else break;n=Hu(e.document)}return n}function xp(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}function TS(e,n,s){var o=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;$g||oo==null||oo!==Hu(o)||(o=oo,"selectionStart"in o&&xp(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),oc&&Al(oc,o)||(oc=o,o=Cd(jg,"onSelect"),0<o.length&&(n=new Xd("onSelect","select",null,n,s),e.push({event:n,listeners:o}),n.target=oo)))}function Na(e,n){var s={};return s[e.toLowerCase()]=n.toLowerCase(),s["Webkit"+e]="webkit"+n,s["Moz"+e]="moz"+n,s}function La(e){if(Gg[e])return Gg[e];if(!lo[e])return e;var n=lo[e],s;for(s in n)if(n.hasOwnProperty(s)&&s in oT)return Gg[e]=n[s];return e}function bi(e,n){hT.set(e,n),et(n,[e])}function zn(e,n){if(typeof e=="object"&&e!==null){var s=qg.get(e);return s!==void 0?s:(n={value:e,source:n,stack:F0(n)},qg.set(e,n),n)}return{value:e,source:n,stack:F0(n)}}function Vu(){for(var e=co,n=Xg=co=0;n<e;){var s=ni[n];ni[n++]=null;var o=ni[n];ni[n++]=null;var d=ni[n];ni[n++]=null;var f=ni[n];if(ni[n++]=null,o!==null&&d!==null){var v=o.pending;v===null?d.next=d:(d.next=v.next,v.next=d),o.pending=d}f!==0&&wS(s,d,f)}}function qu(e,n,s,o){ni[co++]=e,ni[co++]=n,ni[co++]=s,ni[co++]=o,Xg|=o,e.lanes|=o,e=e.alternate,e!==null&&(e.lanes|=o)}function Cp(e,n,s,o){return qu(e,n,s,o),Xu(e)}function xn(e,n){return qu(e,null,null,n),Xu(e)}function wS(e,n,s){e.lanes|=s;var o=e.alternate;o!==null&&(o.lanes|=s);for(var d=!1,f=e.return;f!==null;)f.childLanes|=s,o=f.alternate,o!==null&&(o.childLanes|=s),f.tag===22&&(e=f.stateNode,e===null||e._visibility&Wd||(d=!0)),e=f,f=f.return;return e.tag===3?(f=e.stateNode,d&&n!==null&&(d=31-pn(s),e=f.hiddenUpdates,o=e[d],o===null?e[d]=[n]:o.push(n),n.lane=s|536870912),f):null}function Xu(e){if(Dc>hI)throw lr=Dc=0,Mc=_y=null,Error("Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.");lr>fI&&(lr=0,Mc=null,console.error("Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render.")),e.alternate===null&&(e.flags&4098)!==0&&MA(e);for(var n=e,s=n.return;s!==null;)n.alternate===null&&(n.flags&4098)!==0&&MA(e),n=s,s=n.return;return n.tag===3?n.stateNode:null}function Ia(e){if(ii===null)return e;var n=ii(e);return n===void 0?e:n.current}function Rp(e){if(ii===null)return e;var n=ii(e);return n===void 0?e!=null&&typeof e.render=="function"&&(n=Ia(e.render),e.render!==n)?(n={$$typeof:Ql,render:n},e.displayName!==void 0&&(n.displayName=e.displayName),n):e:n.current}function xS(e,n){if(ii===null)return!1;var s=e.elementType;n=n.type;var o=!1,d=typeof n=="object"&&n!==null?n.$$typeof:null;switch(e.tag){case 1:typeof n=="function"&&(o=!0);break;case 0:(typeof n=="function"||d===jn)&&(o=!0);break;case 11:(d===Ql||d===jn)&&(o=!0);break;case 14:case 15:(d===zd||d===jn)&&(o=!0);break;default:return!1}return!!(o&&(e=ii(s),e!==void 0&&e===ii(n)))}function CS(e){ii!==null&&typeof WeakSet=="function"&&(uo===null&&(uo=new WeakSet),uo.add(e))}function Dp(e,n,s){var o=e.alternate,d=e.child,f=e.sibling,v=e.tag,E=e.type,w=null;switch(v){case 0:case 15:case 1:w=E;break;case 11:w=E.render}if(ii===null)throw Error("Expected resolveFamily to be set during hot reload.");var C=!1;E=!1,w!==null&&(w=ii(w),w!==void 0&&(s.has(w)?E=!0:n.has(w)&&(v===1?E=!0:C=!0))),uo!==null&&(uo.has(e)||o!==null&&uo.has(o))&&(E=!0),E&&(e._debugNeedsRemount=!0),(E||C)&&(o=xn(e,2),o!==null&&xe(o,e,2)),d===null||E||Dp(d,n,s),f!==null&&Dp(f,n,s)}function xk(e,n,s,o){this.tag=e,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null,this.actualDuration=-0,this.actualStartTime=-1.1,this.treeBaseDuration=this.selfBaseDuration=-0,this._debugTask=this._debugStack=this._debugOwner=this._debugInfo=null,this._debugNeedsRemount=!1,this._debugHookTypes=null,pT||typeof Object.preventExtensions!="function"||Object.preventExtensions(this)}function Mp(e){return e=e.prototype,!(!e||!e.isReactComponent)}function rs(e,n){var s=e.alternate;switch(s===null?(s=b(e.tag,n,e.key,e.mode),s.elementType=e.elementType,s.type=e.type,s.stateNode=e.stateNode,s._debugOwner=e._debugOwner,s._debugStack=e._debugStack,s._debugTask=e._debugTask,s._debugHookTypes=e._debugHookTypes,s.alternate=e,e.alternate=s):(s.pendingProps=n,s.type=e.type,s.flags=0,s.subtreeFlags=0,s.deletions=null,s.actualDuration=-0,s.actualStartTime=-1.1),s.flags=e.flags&65011712,s.childLanes=e.childLanes,s.lanes=e.lanes,s.child=e.child,s.memoizedProps=e.memoizedProps,s.memoizedState=e.memoizedState,s.updateQueue=e.updateQueue,n=e.dependencies,s.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext,_debugThenableState:n._debugThenableState},s.sibling=e.sibling,s.index=e.index,s.ref=e.ref,s.refCleanup=e.refCleanup,s.selfBaseDuration=e.selfBaseDuration,s.treeBaseDuration=e.treeBaseDuration,s._debugInfo=e._debugInfo,s._debugNeedsRemount=e._debugNeedsRemount,s.tag){case 0:case 15:s.type=Ia(e.type);break;case 1:s.type=Ia(e.type);break;case 11:s.type=Rp(e.type)}return s}function RS(e,n){e.flags&=65011714;var s=e.alternate;return s===null?(e.childLanes=0,e.lanes=n,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null,e.selfBaseDuration=0,e.treeBaseDuration=0):(e.childLanes=s.childLanes,e.lanes=s.lanes,e.child=s.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=s.memoizedProps,e.memoizedState=s.memoizedState,e.updateQueue=s.updateQueue,e.type=s.type,n=s.dependencies,e.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext,_debugThenableState:n._debugThenableState},e.selfBaseDuration=s.selfBaseDuration,e.treeBaseDuration=s.treeBaseDuration),e}function Op(e,n,s,o,d,f){var v=0,E=e;if(typeof e=="function")Mp(e)&&(v=1),E=Ia(E);else if(typeof e=="string")v=B(),v=xN(e,s,v)?26:e==="html"||e==="head"||e==="body"?27:5;else t:switch(e){case Eg:return n=b(31,s,n,d),n.elementType=Eg,n.lanes=f,n;case Zr:return Pa(s.children,d,f,n);case Ud:v=8,d|=on,d|=Ei;break;case yg:return e=s,o=d,typeof e.id!="string"&&console.error('Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',typeof e.id),n=b(12,e,n,o|Je),n.elementType=yg,n.lanes=f,n.stateNode={effectDuration:0,passiveEffectDuration:0},n;case vg:return n=b(13,s,n,d),n.elementType=vg,n.lanes=f,n;case Sg:return n=b(19,s,n,d),n.elementType=Sg,n.lanes=f,n;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case BN:case Hi:v=10;break t;case bg:v=9;break t;case Ql:v=11,E=Rp(E);break t;case zd:v=14;break t;case jn:v=16,E=null;break t}E="",(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(E+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),e===null?s="null":Ze(e)?s="array":e!==void 0&&e.$$typeof===Zs?(s="<"+(F(e.type)||"Unknown")+" />",E=" Did you accidentally export a JSX literal instead of a component?"):s=typeof e,(v=o?J(o):null)&&(E+=`
119
119
 
120
- Check the render method of \``+v+"`."),v=29,s=Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: "+(s+"."+E)),E=null}return n=b(v,s,n,d),n.elementType=e,n.type=E,n.lanes=f,n._debugOwner=o,n}function Yu(e,n,s){return n=kp(e.type,e.key,e.props,e._owner,n,s),n._debugOwner=e._owner,n._debugStack=e._debugStack,n._debugTask=e._debugTask,n}function Pa(e,n,s,o){return e=b(7,e,o,n),e.lanes=s,e}function Np(e,n,s){return e=b(6,e,null,n),e.lanes=s,e}function Lp(e,n,s){return n=b(4,e.children!==null?e.children:[],e.key,n),n.lanes=s,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function Ua(e,n){za(),ho[fo++]=Qd,ho[fo++]=Wd,Wd=e,Qd=n}function MS(e,n,s){za(),si[ai++]=vs,si[ai++]=Ss,si[ai++]=Qa,Qa=e;var o=vs;e=Ss;var d=32-pn(o)-1;o&=~(1<<d),s+=1;var f=32-pn(n)+d;if(30<f){var v=d-d%5;f=(o&(1<<v)-1).toString(32),o>>=v,d-=v,vs=1<<32-pn(n)+d|s<<d|o,Ss=f+e}else vs=1<<f|s<<d|o,Ss=e}function Ip(e){za(),e.return!==null&&(Ua(e,1),MS(e,1,0))}function Pp(e){for(;e===Wd;)Wd=ho[--fo],ho[fo]=null,Qd=ho[--fo],ho[fo]=null;for(;e===Qa;)Qa=si[--ai],si[ai]=null,Ss=si[--ai],si[ai]=null,vs=si[--ai],si[ai]=null}function za(){Yt||console.error("Expected to be hydrating. This is a bug in React. Please file an issue.")}function Ha(e,n){if(e.return===null){if(ri===null)ri={fiber:e,children:[],serverProps:void 0,serverTail:[],distanceFromLeaf:n};else{if(ri.fiber!==e)throw Error("Saw multiple hydration diff roots in a pass. This is a bug in React.");ri.distanceFromLeaf>n&&(ri.distanceFromLeaf=n)}return ri}var s=Ha(e.return,n+1).children;return 0<s.length&&s[s.length-1].fiber===e?(s=s[s.length-1],s.distanceFromLeaf>n&&(s.distanceFromLeaf=n),s):(n={fiber:e,children:[],serverProps:void 0,serverTail:[],distanceFromLeaf:n},s.push(n),n)}function Up(e,n){Es||(e=Ha(e,0),e.serverProps=null,n!==null&&(n=ZA(n),e.serverTail.push(n)))}function Ba(e){var n="",s=ri;throw s!==null&&(ri=null,n=_p(s)),wl(zn(Error(`Hydration failed because the server rendered HTML didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:
120
+ Check the render method of \``+v+"`."),v=29,s=Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: "+(s+"."+E)),E=null}return n=b(v,s,n,d),n.elementType=e,n.type=E,n.lanes=f,n._debugOwner=o,n}function Yu(e,n,s){return n=Op(e.type,e.key,e.props,e._owner,n,s),n._debugOwner=e._owner,n._debugStack=e._debugStack,n._debugTask=e._debugTask,n}function Pa(e,n,s,o){return e=b(7,e,o,n),e.lanes=s,e}function kp(e,n,s){return e=b(6,e,null,n),e.lanes=s,e}function Np(e,n,s){return n=b(4,e.children!==null?e.children:[],e.key,n),n.lanes=s,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function Ua(e,n){za(),ho[fo++]=Kd,ho[fo++]=Qd,Qd=e,Kd=n}function DS(e,n,s){za(),si[ai++]=vs,si[ai++]=Ss,si[ai++]=Qa,Qa=e;var o=vs;e=Ss;var d=32-pn(o)-1;o&=~(1<<d),s+=1;var f=32-pn(n)+d;if(30<f){var v=d-d%5;f=(o&(1<<v)-1).toString(32),o>>=v,d-=v,vs=1<<32-pn(n)+d|s<<d|o,Ss=f+e}else vs=1<<f|s<<d|o,Ss=e}function Lp(e){za(),e.return!==null&&(Ua(e,1),DS(e,1,0))}function Ip(e){for(;e===Qd;)Qd=ho[--fo],ho[fo]=null,Kd=ho[--fo],ho[fo]=null;for(;e===Qa;)Qa=si[--ai],si[ai]=null,Ss=si[--ai],si[ai]=null,vs=si[--ai],si[ai]=null}function za(){Xt||console.error("Expected to be hydrating. This is a bug in React. Please file an issue.")}function Ha(e,n){if(e.return===null){if(ri===null)ri={fiber:e,children:[],serverProps:void 0,serverTail:[],distanceFromLeaf:n};else{if(ri.fiber!==e)throw Error("Saw multiple hydration diff roots in a pass. This is a bug in React.");ri.distanceFromLeaf>n&&(ri.distanceFromLeaf=n)}return ri}var s=Ha(e.return,n+1).children;return 0<s.length&&s[s.length-1].fiber===e?(s=s[s.length-1],s.distanceFromLeaf>n&&(s.distanceFromLeaf=n),s):(n={fiber:e,children:[],serverProps:void 0,serverTail:[],distanceFromLeaf:n},s.push(n),n)}function Pp(e,n){Es||(e=Ha(e,0),e.serverProps=null,n!==null&&(n=KA(n),e.serverTail.push(n)))}function Ba(e){var n="",s=ri;throw s!==null&&(ri=null,n=Ap(s)),wl(zn(Error(`Hydration failed because the server rendered HTML didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:
121
121
 
122
122
  - A server/client branch \`if (typeof window !== 'undefined')\`.
123
123
  - Variable input such as \`Date.now()\` or \`Math.random()\` which changes each time it's called.
@@ -127,7 +127,7 @@ Check the render method of \``+v+"`."),v=29,s=Error("Element type is invalid: ex
127
127
 
128
128
  It can also happen if the client has a browser extension installed which messes with the HTML before React loaded.
129
129
 
130
- https://react.dev/link/hydration-mismatch`+n),e)),Wg}function OS(e){var n=e.stateNode,s=e.type,o=e.memoizedProps;switch(n[rn]=e,n[Dn]=o,tg(s,o),s){case"dialog":Ft("cancel",n),Ft("close",n);break;case"iframe":case"object":case"embed":Ft("load",n);break;case"video":case"audio":for(s=0;s<Oc.length;s++)Ft(Oc[s],n);break;case"source":Ft("error",n);break;case"img":case"image":case"link":Ft("error",n),Ft("load",n);break;case"details":Ft("toggle",n);break;case"input":ft("input",o),Ft("invalid",n),q0(n,o),Y0(n,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0),Uu(n);break;case"option":X0(n,o);break;case"select":ft("select",o),Ft("invalid",n),Q0(n,o);break;case"textarea":ft("textarea",o),Ft("invalid",n),K0(n,o),J0(n,o.value,o.defaultValue,o.children),Uu(n)}s=o.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||n.textContent===""+s||o.suppressHydrationWarning===!0||jA(n.textContent,s)?(o.popover!=null&&(Ft("beforetoggle",n),Ft("toggle",n)),o.onScroll!=null&&Ft("scroll",n),o.onScrollEnd!=null&&Ft("scrollend",n),o.onClick!=null&&(n.onclick=xd),n=!0):n=!1,n||Ba(e)}function kS(e){for(yn=e.return;yn;)switch(yn.tag){case 5:case 13:Vi=!1;return;case 27:case 3:Vi=!0;return;default:yn=yn.return}}function _l(e){if(e!==yn)return!1;if(!Yt)return kS(e),Yt=!0,!1;var n=e.tag,s;if((s=n!==3&&n!==27)&&((s=n===5)&&(s=e.type,s=!(s!=="form"&&s!=="button")||ag(e.type,e.memoizedProps)),s=!s),s&&ve){for(s=ve;s;){var o=Ha(e,0),d=ZA(s);o.serverTail.push(d),s=d.type==="Suspense"?t_(s):ti(s.nextSibling)}Ba(e)}if(kS(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");ve=t_(e)}else n===27?(n=ve,Ks(e.type)?(e=Py,Py=null,ve=e):ve=n):ve=yn?ti(e.stateNode.nextSibling):null;return!0}function Tl(){ve=yn=null,Es=Yt=!1}function NS(){var e=Ka;return e!==null&&(Sn===null?Sn=e:Sn.push.apply(Sn,e),Ka=null),e}function wl(e){Ka===null?Ka=[e]:Ka.push(e)}function LS(){var e=ri;if(e!==null){ri=null;for(var n=_p(e);0<e.children.length;)e=e.children[0];pt(e.fiber,function(){console.error(`A tree hydrated but some attributes of the server rendered HTML didn't match the client properties. This won't be patched up. This can happen if a SSR-ed Client Component used:
130
+ https://react.dev/link/hydration-mismatch`+n),e)),Yg}function MS(e){var n=e.stateNode,s=e.type,o=e.memoizedProps;switch(n[rn]=e,n[Dn]=o,Jm(s,o),s){case"dialog":Ft("cancel",n),Ft("close",n);break;case"iframe":case"object":case"embed":Ft("load",n);break;case"video":case"audio":for(s=0;s<Oc.length;s++)Ft(Oc[s],n);break;case"source":Ft("error",n);break;case"img":case"image":case"link":Ft("error",n),Ft("load",n);break;case"details":Ft("toggle",n);break;case"input":ft("input",o),Ft("invalid",n),V0(n,o),q0(n,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0),zu(n);break;case"option":X0(n,o);break;case"select":ft("select",o),Ft("invalid",n),W0(n,o);break;case"textarea":ft("textarea",o),Ft("invalid",n),Q0(n,o),Z0(n,o.value,o.defaultValue,o.children),zu(n)}s=o.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||n.textContent===""+s||o.suppressHydrationWarning===!0||FA(n.textContent,s)?(o.popover!=null&&(Ft("beforetoggle",n),Ft("toggle",n)),o.onScroll!=null&&Ft("scroll",n),o.onScrollEnd!=null&&Ft("scrollend",n),o.onClick!=null&&(n.onclick=Rd),n=!0):n=!1,n||Ba(e)}function OS(e){for(yn=e.return;yn;)switch(yn.tag){case 5:case 13:Vi=!1;return;case 27:case 3:Vi=!0;return;default:yn=yn.return}}function _l(e){if(e!==yn)return!1;if(!Xt)return OS(e),Xt=!0,!1;var n=e.tag,s;if((s=n!==3&&n!==27)&&((s=n===5)&&(s=e.type,s=!(s!=="form"&&s!=="button")||sg(e.type,e.memoizedProps)),s=!s),s&&Se){for(s=Se;s;){var o=Ha(e,0),d=KA(s);o.serverTail.push(d),s=d.type==="Suspense"?JA(s):ti(s.nextSibling)}Ba(e)}if(OS(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");Se=JA(e)}else n===27?(n=Se,Ks(e.type)?(e=Iy,Iy=null,Se=e):Se=n):Se=yn?ti(e.stateNode.nextSibling):null;return!0}function Tl(){Se=yn=null,Es=Xt=!1}function kS(){var e=Ka;return e!==null&&(Sn===null?Sn=e:Sn.push.apply(Sn,e),Ka=null),e}function wl(e){Ka===null?Ka=[e]:Ka.push(e)}function NS(){var e=ri;if(e!==null){ri=null;for(var n=Ap(e);0<e.children.length;)e=e.children[0];pt(e.fiber,function(){console.error(`A tree hydrated but some attributes of the server rendered HTML didn't match the client properties. This won't be patched up. This can happen if a SSR-ed Client Component used:
131
131
 
132
132
  - A server/client branch \`if (typeof window !== 'undefined')\`.
133
133
  - Variable input such as \`Date.now()\` or \`Math.random()\` which changes each time it's called.
@@ -137,52 +137,52 @@ https://react.dev/link/hydration-mismatch`+n),e)),Wg}function OS(e){var n=e.stat
137
137
 
138
138
  It can also happen if the client has a browser extension installed which messes with the HTML before React loaded.
139
139
 
140
- %s%s`,"https://react.dev/link/hydration-mismatch",n)})}}function Xu(){po=Kd=null,mo=!1}function $s(e,n,s){lt(Qg,n._currentValue,e),n._currentValue=s,lt(Kg,n._currentRenderer,e),n._currentRenderer!==void 0&&n._currentRenderer!==null&&n._currentRenderer!==vT&&console.error("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),n._currentRenderer=vT}function os(e,n){e._currentValue=Qg.current;var s=Kg.current;K(Kg,n),e._currentRenderer=s,K(Qg,n)}function zp(e,n,s){for(;e!==null;){var o=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,o!==null&&(o.childLanes|=n)):o!==null&&(o.childLanes&n)!==n&&(o.childLanes|=n),e===s)break;e=e.return}e!==s&&console.error("Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue.")}function Hp(e,n,s,o){var d=e.child;for(d!==null&&(d.return=e);d!==null;){var f=d.dependencies;if(f!==null){var v=d.child;f=f.firstContext;t:for(;f!==null;){var E=f;f=d;for(var w=0;w<n.length;w++)if(E.context===n[w]){f.lanes|=s,E=f.alternate,E!==null&&(E.lanes|=s),zp(f.return,s,e),o||(v=null);break t}f=E.next}}else if(d.tag===18){if(v=d.return,v===null)throw Error("We just came from a parent so we must have had a parent. This is a bug in React.");v.lanes|=s,f=v.alternate,f!==null&&(f.lanes|=s),zp(v,s,e),v=null}else v=d.child;if(v!==null)v.return=d;else for(v=d;v!==null;){if(v===e){v=null;break}if(d=v.sibling,d!==null){d.return=v.return,v=d;break}v=v.return}d=v}}function Cl(e,n,s,o){e=null;for(var d=n,f=!1;d!==null;){if(!f){if((d.flags&524288)!==0)f=!0;else if((d.flags&262144)!==0)break}if(d.tag===10){var v=d.alternate;if(v===null)throw Error("Should have a current fiber. This is a bug in React.");if(v=v.memoizedProps,v!==null){var E=d.type;gn(d.pendingProps.value,v.value)||(e!==null?e.push(E):e=[E])}}else if(d===zd.current){if(v=d.alternate,v===null)throw Error("Should have a current fiber. This is a bug in React.");v.memoizedState.memoizedState!==d.memoizedState.memoizedState&&(e!==null?e.push(Ic):e=[Ic])}d=d.return}e!==null&&Hp(n,e,s,o),n.flags|=262144}function Wu(e){for(e=e.firstContext;e!==null;){if(!gn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Fa(e){Kd=e,po=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function fe(e){return mo&&console.error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."),IS(Kd,e)}function Qu(e,n){return Kd===null&&Fa(e),IS(e,n)}function IS(e,n){var s=n._currentValue;if(n={context:n,memoizedValue:s,next:null},po===null){if(e===null)throw Error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");po=n,e.dependencies={lanes:0,firstContext:n,_debugThenableState:null},e.flags|=524288}else po=po.next=n;return s}function Bp(){return{controller:new ZL,data:new Map,refCount:0}}function ja(e){e.controller.signal.aborted&&console.warn("A cache instance was retained after it was already freed. This likely indicates a bug in React."),e.refCount++}function xl(e){e.refCount--,0>e.refCount&&console.warn("A cache instance was released after it was already freed. This likely indicates a bug in React."),e.refCount===0&&JL(tI,function(){e.controller.abort()})}function ls(){var e=Za;return Za=0,e}function Ku(e){var n=Za;return Za=e,n}function Rl(e){var n=Za;return Za+=e,n}function Fp(e){Mn=go(),0>e.actualStartTime&&(e.actualStartTime=Mn)}function jp(e){if(0<=Mn){var n=go()-Mn;e.actualDuration+=n,e.selfBaseDuration=n,Mn=-1}}function PS(e){if(0<=Mn){var n=go()-Mn;e.actualDuration+=n,Mn=-1}}function ki(){if(0<=Mn){var e=go()-Mn;Mn=-1,Za+=e}}function Ni(){Mn=go()}function Zu(e){for(var n=e.child;n;)e.actualDuration+=n.actualDuration,n=n.sibling}function Rk(e,n){if(lc===null){var s=lc=[];Zg=0,Ja=Qm(),yo={status:"pending",value:void 0,then:function(o){s.push(o)}}}return Zg++,n.then(US,US),n}function US(){if(--Zg===0&&lc!==null){yo!==null&&(yo.status="fulfilled");var e=lc;lc=null,Ja=0,yo=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function Dk(e,n){var s=[],o={status:"pending",value:null,reason:null,then:function(d){s.push(d)}};return e.then(function(){o.status="fulfilled",o.value=n;for(var d=0;d<s.length;d++)(0,s[d])(n)},function(d){for(o.status="rejected",o.reason=d,d=0;d<s.length;d++)(0,s[d])(void 0)}),o}function $p(){var e=tr.current;return e!==null?e:le.pooledCache}function Ju(e,n){n===null?lt(tr,tr.current,e):lt(tr,n.pool,e)}function zS(){var e=$p();return e===null?null:{parent:ze._currentValue,pool:e}}function HS(){return{didWarnAboutUncachedPromise:!1,thenables:[]}}function BS(e){return e=e.status,e==="fulfilled"||e==="rejected"}function td(){}function FS(e,n,s){G.actQueue!==null&&(G.didUsePromise=!0);var o=e.thenables;switch(s=o[s],s===void 0?o.push(n):s!==n&&(e.didWarnAboutUncachedPromise||(e.didWarnAboutUncachedPromise=!0,console.error("A component was suspended by an uncached promise. Creating promises inside a Client Component or hook is not yet supported, except via a Suspense-compatible library or framework.")),n.then(td,td),n=s),n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,$S(e),e;default:if(typeof n.status=="string")n.then(td,td);else{if(e=le,e!==null&&100<e.shellSuspendCounter)throw Error("An unknown Component is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.");e=n,e.status="pending",e.then(function(d){if(n.status==="pending"){var f=n;f.status="fulfilled",f.value=d}},function(d){if(n.status==="pending"){var f=n;f.status="rejected",f.reason=d}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,$S(e),e}throw gc=n,ih=!0,mc}}function jS(){if(gc===null)throw Error("Expected a suspended thenable. This is a bug in React. Please file an issue.");var e=gc;return gc=null,ih=!1,e}function $S(e){if(e===mc||e===nh)throw Error("Hooks are not supported inside an async component. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.")}function Gp(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Vp(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Gs(e){return{lane:e,tag:TT,payload:null,callback:null,next:null}}function Vs(e,n,s){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,ey===o&&!xT){var d=X(e);console.error(`An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback.
140
+ %s%s`,"https://react.dev/link/hydration-mismatch",n)})}}function Wu(){po=Zd=null,mo=!1}function $s(e,n,s){lt(Wg,n._currentValue,e),n._currentValue=s,lt(Qg,n._currentRenderer,e),n._currentRenderer!==void 0&&n._currentRenderer!==null&&n._currentRenderer!==bT&&console.error("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),n._currentRenderer=bT}function os(e,n){e._currentValue=Wg.current;var s=Qg.current;K(Qg,n),e._currentRenderer=s,K(Wg,n)}function Up(e,n,s){for(;e!==null;){var o=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,o!==null&&(o.childLanes|=n)):o!==null&&(o.childLanes&n)!==n&&(o.childLanes|=n),e===s)break;e=e.return}e!==s&&console.error("Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue.")}function zp(e,n,s,o){var d=e.child;for(d!==null&&(d.return=e);d!==null;){var f=d.dependencies;if(f!==null){var v=d.child;f=f.firstContext;t:for(;f!==null;){var E=f;f=d;for(var w=0;w<n.length;w++)if(E.context===n[w]){f.lanes|=s,E=f.alternate,E!==null&&(E.lanes|=s),Up(f.return,s,e),o||(v=null);break t}f=E.next}}else if(d.tag===18){if(v=d.return,v===null)throw Error("We just came from a parent so we must have had a parent. This is a bug in React.");v.lanes|=s,f=v.alternate,f!==null&&(f.lanes|=s),Up(v,s,e),v=null}else v=d.child;if(v!==null)v.return=d;else for(v=d;v!==null;){if(v===e){v=null;break}if(d=v.sibling,d!==null){d.return=v.return,v=d;break}v=v.return}d=v}}function xl(e,n,s,o){e=null;for(var d=n,f=!1;d!==null;){if(!f){if((d.flags&524288)!==0)f=!0;else if((d.flags&262144)!==0)break}if(d.tag===10){var v=d.alternate;if(v===null)throw Error("Should have a current fiber. This is a bug in React.");if(v=v.memoizedProps,v!==null){var E=d.type;gn(d.pendingProps.value,v.value)||(e!==null?e.push(E):e=[E])}}else if(d===Hd.current){if(v=d.alternate,v===null)throw Error("Should have a current fiber. This is a bug in React.");v.memoizedState.memoizedState!==d.memoizedState.memoizedState&&(e!==null?e.push(Ic):e=[Ic])}d=d.return}e!==null&&zp(n,e,s,o),n.flags|=262144}function Qu(e){for(e=e.firstContext;e!==null;){if(!gn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Fa(e){Zd=e,po=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function pe(e){return mo&&console.error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."),LS(Zd,e)}function Ku(e,n){return Zd===null&&Fa(e),LS(e,n)}function LS(e,n){var s=n._currentValue;if(n={context:n,memoizedValue:s,next:null},po===null){if(e===null)throw Error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");po=n,e.dependencies={lanes:0,firstContext:n,_debugThenableState:null},e.flags|=524288}else po=po.next=n;return s}function Hp(){return{controller:new KL,data:new Map,refCount:0}}function ja(e){e.controller.signal.aborted&&console.warn("A cache instance was retained after it was already freed. This likely indicates a bug in React."),e.refCount++}function Cl(e){e.refCount--,0>e.refCount&&console.warn("A cache instance was released after it was already freed. This likely indicates a bug in React."),e.refCount===0&&ZL(JL,function(){e.controller.abort()})}function ls(){var e=Za;return Za=0,e}function Zu(e){var n=Za;return Za=e,n}function Rl(e){var n=Za;return Za+=e,n}function Bp(e){Mn=go(),0>e.actualStartTime&&(e.actualStartTime=Mn)}function Fp(e){if(0<=Mn){var n=go()-Mn;e.actualDuration+=n,e.selfBaseDuration=n,Mn=-1}}function IS(e){if(0<=Mn){var n=go()-Mn;e.actualDuration+=n,Mn=-1}}function ki(){if(0<=Mn){var e=go()-Mn;Mn=-1,Za+=e}}function Ni(){Mn=go()}function Ju(e){for(var n=e.child;n;)e.actualDuration+=n.actualDuration,n=n.sibling}function Ck(e,n){if(lc===null){var s=lc=[];Kg=0,Ja=Wm(),yo={status:"pending",value:void 0,then:function(o){s.push(o)}}}return Kg++,n.then(PS,PS),n}function PS(){if(--Kg===0&&lc!==null){yo!==null&&(yo.status="fulfilled");var e=lc;lc=null,Ja=0,yo=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function Rk(e,n){var s=[],o={status:"pending",value:null,reason:null,then:function(d){s.push(d)}};return e.then(function(){o.status="fulfilled",o.value=n;for(var d=0;d<s.length;d++)(0,s[d])(n)},function(d){for(o.status="rejected",o.reason=d,d=0;d<s.length;d++)(0,s[d])(void 0)}),o}function jp(){var e=tr.current;return e!==null?e:ce.pooledCache}function td(e,n){n===null?lt(tr,tr.current,e):lt(tr,n.pool,e)}function US(){var e=jp();return e===null?null:{parent:ze._currentValue,pool:e}}function zS(){return{didWarnAboutUncachedPromise:!1,thenables:[]}}function HS(e){return e=e.status,e==="fulfilled"||e==="rejected"}function ed(){}function BS(e,n,s){G.actQueue!==null&&(G.didUsePromise=!0);var o=e.thenables;switch(s=o[s],s===void 0?o.push(n):s!==n&&(e.didWarnAboutUncachedPromise||(e.didWarnAboutUncachedPromise=!0,console.error("A component was suspended by an uncached promise. Creating promises inside a Client Component or hook is not yet supported, except via a Suspense-compatible library or framework.")),n.then(ed,ed),n=s),n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,jS(e),e;default:if(typeof n.status=="string")n.then(ed,ed);else{if(e=ce,e!==null&&100<e.shellSuspendCounter)throw Error("An unknown Component is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.");e=n,e.status="pending",e.then(function(d){if(n.status==="pending"){var f=n;f.status="fulfilled",f.value=d}},function(d){if(n.status==="pending"){var f=n;f.status="rejected",f.reason=d}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,jS(e),e}throw gc=n,sh=!0,mc}}function FS(){if(gc===null)throw Error("Expected a suspended thenable. This is a bug in React. Please file an issue.");var e=gc;return gc=null,sh=!1,e}function jS(e){if(e===mc||e===ih)throw Error("Hooks are not supported inside an async component. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.")}function $p(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Gp(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Gs(e){return{lane:e,tag:_T,payload:null,callback:null,next:null}}function Vs(e,n,s){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,ty===o&&!xT){var d=Y(e);console.error(`An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback.
141
141
 
142
- Please update the following component: %s`,d),xT=!0}return(te&vn)!==Gn?(d=o.pending,d===null?n.next=n:(n.next=d.next,d.next=n),o.pending=n,n=qu(e),CS(e,null,s),n):(Vu(e,o,n,s),qu(e))}function Dl(e,n,s){if(n=n.updateQueue,n!==null&&(n=n.shared,(s&4194048)!==0)){var o=n.lanes;o&=e.pendingLanes,s|=o,n.lanes=s,Iu(e,s)}}function ed(e,n){var s=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,s===o)){var d=null,f=null;if(s=s.firstBaseUpdate,s!==null){do{var v={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};f===null?d=f=v:f=f.next=v,s=s.next}while(s!==null);f===null?d=f=n:f=f.next=n}else d=f=n;s={baseState:o.baseState,firstBaseUpdate:d,lastBaseUpdate:f,shared:o.shared,callbacks:o.callbacks},e.updateQueue=s;return}e=s.lastBaseUpdate,e===null?s.firstBaseUpdate=n:e.next=n,s.lastBaseUpdate=n}function Ml(){if(ny){var e=yo;if(e!==null)throw e}}function Ol(e,n,s,o){ny=!1;var d=e.updateQueue;aa=!1,ey=d.shared;var f=d.firstBaseUpdate,v=d.lastBaseUpdate,E=d.shared.pending;if(E!==null){d.shared.pending=null;var w=E,x=w.next;w.next=null,v===null?f=x:v.next=x,v=w;var H=e.alternate;H!==null&&(H=H.updateQueue,E=H.lastBaseUpdate,E!==v&&(E===null?H.firstBaseUpdate=x:E.next=x,H.lastBaseUpdate=w))}if(f!==null){var V=d.baseState;v=0,H=x=w=null,E=f;do{var z=E.lane&-536870913,q=z!==E.lane;if(q?(Bt&z)===z:(o&z)===z){z!==0&&z===Ja&&(ny=!0),H!==null&&(H=H.next={lane:0,tag:E.tag,payload:E.payload,callback:null,next:null});t:{z=e;var ct=E,At=n,ce=s;switch(ct.tag){case wT:if(ct=ct.payload,typeof ct=="function"){mo=!0;var jt=ct.call(ce,V,At);if(z.mode&on){tt(!0);try{ct.call(ce,V,At)}finally{tt(!1)}}mo=!1,V=jt;break t}V=ct;break t;case ty:z.flags=z.flags&-65537|128;case TT:if(jt=ct.payload,typeof jt=="function"){if(mo=!0,ct=jt.call(ce,V,At),z.mode&on){tt(!0);try{jt.call(ce,V,At)}finally{tt(!1)}}mo=!1}else ct=jt;if(ct==null)break t;V=It({},V,ct);break t;case CT:aa=!0}}z=E.callback,z!==null&&(e.flags|=64,q&&(e.flags|=8192),q=d.callbacks,q===null?d.callbacks=[z]:q.push(z))}else q={lane:z,tag:E.tag,payload:E.payload,callback:E.callback,next:null},H===null?(x=H=q,w=V):H=H.next=q,v|=z;if(E=E.next,E===null){if(E=d.shared.pending,E===null)break;q=E,E=q.next,q.next=null,d.lastBaseUpdate=q,d.shared.pending=null}}while(!0);H===null&&(w=V),d.baseState=w,d.firstBaseUpdate=x,d.lastBaseUpdate=H,f===null&&(d.shared.lanes=0),ca|=v,e.lanes=v,e.memoizedState=V}ey=null}function GS(e,n){if(typeof e!="function")throw Error("Invalid argument passed as callback. Expected a function. Instead received: "+e);e.call(n)}function Mk(e,n){var s=e.shared.hiddenCallbacks;if(s!==null)for(e.shared.hiddenCallbacks=null,e=0;e<s.length;e++)GS(s[e],n)}function VS(e,n){var s=e.callbacks;if(s!==null)for(e.callbacks=null,e=0;e<s.length;e++)GS(s[e],n)}function qS(e,n){var s=Xi;lt(sh,s,e),lt(bo,n,e),Xi=s|n.baseLanes}function qp(e){lt(sh,Xi,e),lt(bo,bo.current,e)}function Yp(e){Xi=sh.current,K(bo,e),K(sh,e)}function Ht(){var e=$;ci===null?ci=[e]:ci.push(e)}function Z(){var e=$;if(ci!==null&&(_s++,ci[_s]!==e)){var n=X(_t);if(!RT.has(n)&&(RT.add(n),ci!==null)){for(var s="",o=0;o<=_s;o++){var d=ci[o],f=o===_s?e:d;for(d=o+1+". "+d;30>d.length;)d+=" ";d+=f+`
142
+ Please update the following component: %s`,d),xT=!0}return(te&vn)!==Gn?(d=o.pending,d===null?n.next=n:(n.next=d.next,d.next=n),o.pending=n,n=Xu(e),wS(e,null,s),n):(qu(e,o,n,s),Xu(e))}function Dl(e,n,s){if(n=n.updateQueue,n!==null&&(n=n.shared,(s&4194048)!==0)){var o=n.lanes;o&=e.pendingLanes,s|=o,n.lanes=s,Pu(e,s)}}function nd(e,n){var s=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,s===o)){var d=null,f=null;if(s=s.firstBaseUpdate,s!==null){do{var v={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};f===null?d=f=v:f=f.next=v,s=s.next}while(s!==null);f===null?d=f=n:f=f.next=n}else d=f=n;s={baseState:o.baseState,firstBaseUpdate:d,lastBaseUpdate:f,shared:o.shared,callbacks:o.callbacks},e.updateQueue=s;return}e=s.lastBaseUpdate,e===null?s.firstBaseUpdate=n:e.next=n,s.lastBaseUpdate=n}function Ml(){if(ey){var e=yo;if(e!==null)throw e}}function Ol(e,n,s,o){ey=!1;var d=e.updateQueue;aa=!1,ty=d.shared;var f=d.firstBaseUpdate,v=d.lastBaseUpdate,E=d.shared.pending;if(E!==null){d.shared.pending=null;var w=E,C=w.next;w.next=null,v===null?f=C:v.next=C,v=w;var H=e.alternate;H!==null&&(H=H.updateQueue,E=H.lastBaseUpdate,E!==v&&(E===null?H.firstBaseUpdate=C:E.next=C,H.lastBaseUpdate=w))}if(f!==null){var V=d.baseState;v=0,H=C=w=null,E=f;do{var z=E.lane&-536870913,q=z!==E.lane;if(q?(Bt&z)===z:(o&z)===z){z!==0&&z===Ja&&(ey=!0),H!==null&&(H=H.next={lane:0,tag:E.tag,payload:E.payload,callback:null,next:null});t:{z=e;var ct=E,At=n,ue=s;switch(ct.tag){case TT:if(ct=ct.payload,typeof ct=="function"){mo=!0;var jt=ct.call(ue,V,At);if(z.mode&on){tt(!0);try{ct.call(ue,V,At)}finally{tt(!1)}}mo=!1,V=jt;break t}V=ct;break t;case Jg:z.flags=z.flags&-65537|128;case _T:if(jt=ct.payload,typeof jt=="function"){if(mo=!0,ct=jt.call(ue,V,At),z.mode&on){tt(!0);try{jt.call(ue,V,At)}finally{tt(!1)}}mo=!1}else ct=jt;if(ct==null)break t;V=It({},V,ct);break t;case wT:aa=!0}}z=E.callback,z!==null&&(e.flags|=64,q&&(e.flags|=8192),q=d.callbacks,q===null?d.callbacks=[z]:q.push(z))}else q={lane:z,tag:E.tag,payload:E.payload,callback:E.callback,next:null},H===null?(C=H=q,w=V):H=H.next=q,v|=z;if(E=E.next,E===null){if(E=d.shared.pending,E===null)break;q=E,E=q.next,q.next=null,d.lastBaseUpdate=q,d.shared.pending=null}}while(!0);H===null&&(w=V),d.baseState=w,d.firstBaseUpdate=C,d.lastBaseUpdate=H,f===null&&(d.shared.lanes=0),ca|=v,e.lanes=v,e.memoizedState=V}ty=null}function $S(e,n){if(typeof e!="function")throw Error("Invalid argument passed as callback. Expected a function. Instead received: "+e);e.call(n)}function Dk(e,n){var s=e.shared.hiddenCallbacks;if(s!==null)for(e.shared.hiddenCallbacks=null,e=0;e<s.length;e++)$S(s[e],n)}function GS(e,n){var s=e.callbacks;if(s!==null)for(e.callbacks=null,e=0;e<s.length;e++)$S(s[e],n)}function VS(e,n){var s=Yi;lt(ah,s,e),lt(bo,n,e),Yi=s|n.baseLanes}function Vp(e){lt(ah,Yi,e),lt(bo,bo.current,e)}function qp(e){Yi=ah.current,K(bo,e),K(ah,e)}function Ht(){var e=$;ci===null?ci=[e]:ci.push(e)}function Z(){var e=$;if(ci!==null&&(_s++,ci[_s]!==e)){var n=Y(_t);if(!CT.has(n)&&(CT.add(n),ci!==null)){for(var s="",o=0;o<=_s;o++){var d=ci[o],f=o===_s?e:d;for(d=o+1+". "+d;30>d.length;)d+=" ";d+=f+`
143
143
  `,s+=d}console.error(`React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://react.dev/link/rules-of-hooks
144
144
 
145
145
  Previous render Next render
146
146
  ------------------------------------------------------
147
147
  %s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
148
- `,n,s)}}}function zr(e){e==null||Ze(e)||console.error("%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",$,typeof e)}function nd(){var e=X(_t);MT.has(e)||(MT.add(e),console.error("ReactDOM.useFormState has been renamed to React.useActionState. Please update %s to use React.useActionState.",e))}function we(){throw Error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
148
+ `,n,s)}}}function zr(e){e==null||Ze(e)||console.error("%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",$,typeof e)}function id(){var e=Y(_t);DT.has(e)||(DT.add(e),console.error("ReactDOM.useFormState has been renamed to React.useActionState. Please update %s to use React.useActionState.",e))}function we(){throw Error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
149
149
  1. You might have mismatching versions of React and the renderer (such as React DOM)
150
150
  2. You might be breaking the Rules of Hooks
151
151
  3. You might have more than one copy of React in the same app
152
152
  See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`)}function Xp(e,n){if(bc)return!1;if(n===null)return console.error("%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.",$),!1;e.length!==n.length&&console.error(`The final argument passed to %s changed size between renders. The order and size of this array must remain constant.
153
153
 
154
154
  Previous: %s
155
- Incoming: %s`,$,"["+n.join(", ")+"]","["+e.join(", ")+"]");for(var s=0;s<n.length&&s<e.length;s++)if(!gn(e[s],n[s]))return!1;return!0}function Wp(e,n,s,o,d,f){ra=f,_t=n,ci=e!==null?e._debugHookTypes:null,_s=-1,bc=e!==null&&e.type!==n.type,(Object.prototype.toString.call(s)==="[object AsyncFunction]"||Object.prototype.toString.call(s)==="[object AsyncGeneratorFunction]")&&(f=X(_t),iy.has(f)||(iy.add(f),console.error("%s is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.",f===null?"An unknown Component":"<"+f+">"))),n.memoizedState=null,n.updateQueue=null,n.lanes=0,G.H=e!==null&&e.memoizedState!==null?ay:ci!==null?OT:sy,nr=f=(n.mode&on)!==ue;var v=ry(s,o,d);if(nr=!1,So&&(v=Qp(n,s,o,d)),f){tt(!0);try{v=Qp(n,s,o,d)}finally{tt(!1)}}return YS(e,n),v}function YS(e,n){n._debugHookTypes=ci,n.dependencies===null?As!==null&&(n.dependencies={lanes:0,firstContext:null,_debugThenableState:As}):n.dependencies._debugThenableState=As,G.H=oh;var s=re!==null&&re.next!==null;if(ra=0,ci=$=Ie=re=_t=null,_s=-1,e!==null&&(e.flags&65011712)!==(n.flags&65011712)&&console.error("Internal React error: Expected static flag was missing. Please notify the React team."),ah=!1,yc=0,As=null,s)throw Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");e===null||$e||(e=e.dependencies,e!==null&&Wu(e)&&($e=!0)),ih?(ih=!1,e=!0):e=!1,e&&(n=X(n)||"Unknown",DT.has(n)||iy.has(n)||(DT.add(n),console.error("`use` was called from inside a try/catch block. This is not allowed and can lead to unexpected behavior. To handle errors triggered by `use`, wrap your component in a error boundary.")))}function Qp(e,n,s,o){_t=e;var d=0;do{if(So&&(As=null),yc=0,So=!1,d>=nI)throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");if(d+=1,bc=!1,Ie=re=null,e.updateQueue!=null){var f=e.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}_s=-1,G.H=kT,f=ry(n,s,o)}while(So);return f}function Ok(){var e=G.H,n=e.useState()[0];return n=typeof n.then=="function"?kl(n):n,e=e.useState()[0],(re!==null?re.memoizedState:null)!==e&&(_t.flags|=1024),n}function Kp(){var e=rh!==0;return rh=0,e}function Zp(e,n,s){n.updateQueue=e.updateQueue,n.flags=(n.mode&Ei)!==ue?n.flags&-402655237:n.flags&-2053,e.lanes&=~s}function Jp(e){if(ah){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}ah=!1}ra=0,ci=Ie=re=_t=null,_s=-1,$=null,So=!1,yc=rh=0,As=null}function xn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ie===null?_t.memoizedState=Ie=e:Ie=Ie.next=e,Ie}function ne(){if(re===null){var e=_t.alternate;e=e!==null?e.memoizedState:null}else e=re.next;var n=Ie===null?_t.memoizedState:Ie.next;if(n!==null)Ie=n,re=e;else{if(e===null)throw _t.alternate===null?Error("Update hook called on initial render. This is likely a bug in React. Please file an issue."):Error("Rendered more hooks than during the previous render.");re=e,e={memoizedState:re.memoizedState,baseState:re.baseState,baseQueue:re.baseQueue,queue:re.queue,next:null},Ie===null?_t.memoizedState=Ie=e:Ie=Ie.next=e}return Ie}function tm(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function kl(e){var n=yc;return yc+=1,As===null&&(As=HS()),e=FS(As,e,n),n=_t,(Ie===null?n.memoizedState:Ie.next)===null&&(n=n.alternate,G.H=n!==null&&n.memoizedState!==null?ay:sy),e}function qs(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return kl(e);if(e.$$typeof===Hi)return fe(e)}throw Error("An unsupported type was passed to use(): "+String(e))}function $a(e){var n=null,s=_t.updateQueue;if(s!==null&&(n=s.memoCache),n==null){var o=_t.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(n={data:o.data.map(function(d){return d.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),s===null&&(s=tm(),_t.updateQueue=s),s.memoCache=n,s=n.data[n.index],s===void 0||bc)for(s=n.data[n.index]=Array(e),o=0;o<e;o++)s[o]=jN;else s.length!==e&&console.error("Expected a constant size argument for each invocation of useMemoCache. The previous cache was allocated with size %s but size %s was requested.",s.length,e);return n.index++,s}function vi(e,n){return typeof n=="function"?n(e):n}function em(e,n,s){var o=xn();if(s!==void 0){var d=s(n);if(nr){tt(!0);try{s(n)}finally{tt(!1)}}}else d=n;return o.memoizedState=o.baseState=d,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:d},o.queue=e,e=e.dispatch=Ik.bind(null,_t,e),[o.memoizedState,e]}function Hr(e){var n=ne();return nm(n,re,e)}function nm(e,n,s){var o=e.queue;if(o===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");o.lastRenderedReducer=s;var d=e.baseQueue,f=o.pending;if(f!==null){if(d!==null){var v=d.next;d.next=f.next,f.next=v}n.baseQueue!==d&&console.error("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."),n.baseQueue=d=f,o.pending=null}if(f=e.baseState,d===null)e.memoizedState=f;else{n=d.next;var E=v=null,w=null,x=n,H=!1;do{var V=x.lane&-536870913;if(V!==x.lane?(Bt&V)===V:(ra&V)===V){var z=x.revertLane;if(z===0)w!==null&&(w=w.next={lane:0,revertLane:0,action:x.action,hasEagerState:x.hasEagerState,eagerState:x.eagerState,next:null}),V===Ja&&(H=!0);else if((ra&z)===z){x=x.next,z===Ja&&(H=!0);continue}else V={lane:0,revertLane:x.revertLane,action:x.action,hasEagerState:x.hasEagerState,eagerState:x.eagerState,next:null},w===null?(E=w=V,v=f):w=w.next=V,_t.lanes|=z,ca|=z;V=x.action,nr&&s(f,V),f=x.hasEagerState?x.eagerState:s(f,V)}else z={lane:V,revertLane:x.revertLane,action:x.action,hasEagerState:x.hasEagerState,eagerState:x.eagerState,next:null},w===null?(E=w=z,v=f):w=w.next=z,_t.lanes|=V,ca|=V;x=x.next}while(x!==null&&x!==n);if(w===null?v=f:w.next=E,!gn(f,e.memoizedState)&&($e=!0,H&&(s=yo,s!==null)))throw s;e.memoizedState=f,e.baseState=v,e.baseQueue=w,o.lastRenderedState=f}return d===null&&(o.lanes=0),[e.memoizedState,o.dispatch]}function Nl(e){var n=ne(),s=n.queue;if(s===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");s.lastRenderedReducer=e;var o=s.dispatch,d=s.pending,f=n.memoizedState;if(d!==null){s.pending=null;var v=d=d.next;do f=e(f,v.action),v=v.next;while(v!==d);gn(f,n.memoizedState)||($e=!0),n.memoizedState=f,n.baseQueue===null&&(n.baseState=f),s.lastRenderedState=f}return[f,o]}function im(e,n,s){var o=_t,d=xn();if(Yt){if(s===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");var f=s();vo||f===s()||(console.error("The result of getServerSnapshot should be cached to avoid an infinite loop"),vo=!0)}else{if(f=n(),vo||(s=n(),gn(f,s)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),vo=!0)),le===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");(Bt&124)!==0||XS(o,n,f)}return d.memoizedState=f,s={value:f,getSnapshot:n},d.queue=s,od(QS.bind(null,o,s,e),[e]),o.flags|=2048,Fr(li|He,rd(),WS.bind(null,o,s,f,n),null),f}function id(e,n,s){var o=_t,d=ne(),f=Yt;if(f){if(s===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");s=s()}else if(s=n(),!vo){var v=n();gn(s,v)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),vo=!0)}(v=!gn((re||d).memoizedState,s))&&(d.memoizedState=s,$e=!0),d=d.queue;var E=QS.bind(null,o,d,e);if(Rn(2048,He,E,[e]),d.getSnapshot!==n||v||Ie!==null&&Ie.memoizedState.tag&li){if(o.flags|=2048,Fr(li|He,rd(),WS.bind(null,o,d,s,n),null),le===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");f||(ra&124)!==0||XS(o,n,s)}return s}function XS(e,n,s){e.flags|=16384,e={getSnapshot:n,value:s},n=_t.updateQueue,n===null?(n=tm(),_t.updateQueue=n,n.stores=[e]):(s=n.stores,s===null?n.stores=[e]:s.push(e))}function WS(e,n,s,o){n.value=s,n.getSnapshot=o,KS(n)&&ZS(e)}function QS(e,n,s){return s(function(){KS(n)&&ZS(e)})}function KS(e){var n=e.getSnapshot;e=e.value;try{var s=n();return!gn(e,s)}catch{return!0}}function ZS(e){var n=Cn(e,2);n!==null&&Ce(n,e,2)}function sm(e){var n=xn();if(typeof e=="function"){var s=e;if(e=s(),nr){tt(!0);try{s()}finally{tt(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:vi,lastRenderedState:e},n}function am(e){e=sm(e);var n=e.queue,s=yE.bind(null,_t,n);return n.dispatch=s,[e.memoizedState,s]}function rm(e){var n=xn();n.memoizedState=n.baseState=e;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=s,n=vm.bind(null,_t,!0,s),s.dispatch=n,[e,n]}function JS(e,n){var s=ne();return tE(s,re,e,n)}function tE(e,n,s,o){return e.baseState=s,nm(e,re,typeof o=="function"?o:vi)}function eE(e,n){var s=ne();return re!==null?tE(s,re,e,n):(s.baseState=e,[e,s.queue.dispatch])}function kk(e,n,s,o,d){if(dd(e))throw Error("Cannot update form state while rendering.");if(e=n.action,e!==null){var f={payload:d,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){f.listeners.push(v)}};G.T!==null?s(!0):f.isTransition=!1,o(f),s=n.pending,s===null?(f.next=n.pending=f,nE(n,f)):(f.next=s.next,n.pending=s.next=f)}}function nE(e,n){var s=n.action,o=n.payload,d=e.state;if(n.isTransition){var f=G.T,v={};G.T=v,G.T._updatedFibers=new Set;try{var E=s(d,o),w=G.S;w!==null&&w(v,E),iE(e,n,E)}catch(x){om(e,n,x)}finally{G.T=f,f===null&&v._updatedFibers&&(e=v._updatedFibers.size,v._updatedFibers.clear(),10<e&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."))}}else try{v=s(d,o),iE(e,n,v)}catch(x){om(e,n,x)}}function iE(e,n,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?(s.then(function(o){sE(e,n,o)},function(o){return om(e,n,o)}),n.isTransition||console.error("An async function with useActionState was called outside of a transition. This is likely not what you intended (for example, isPending will not update correctly). Either call the returned function inside startTransition, or pass it to an `action` or `formAction` prop.")):sE(e,n,s)}function sE(e,n,s){n.status="fulfilled",n.value=s,aE(n),e.state=s,n=e.pending,n!==null&&(s=n.next,s===n?e.pending=null:(s=s.next,n.next=s,nE(e,s)))}function om(e,n,s){var o=e.pending;if(e.pending=null,o!==null){o=o.next;do n.status="rejected",n.reason=s,aE(n),n=n.next;while(n!==o)}e.action=null}function aE(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function rE(e,n){return n}function Br(e,n){if(Yt){var s=le.formState;if(s!==null){t:{var o=_t;if(Yt){if(ve){e:{for(var d=ve,f=Vi;d.nodeType!==8;){if(!f){d=null;break e}if(d=ti(d.nextSibling),d===null){d=null;break e}}f=d.data,d=f===ky||f===Mw?d:null}if(d){ve=ti(d.nextSibling),o=d.data===ky;break t}}Ba(o)}o=!1}o&&(n=s[0])}}return s=xn(),s.memoizedState=s.baseState=n,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:rE,lastRenderedState:n},s.queue=o,s=yE.bind(null,_t,o),o.dispatch=s,o=sm(!1),f=vm.bind(null,_t,!1,o.queue),o=xn(),d={state:n,dispatch:null,action:e,pending:null},o.queue=d,s=kk.bind(null,_t,d,f,s),d.dispatch=s,o.memoizedState=e,[n,s,!1]}function sd(e){var n=ne();return oE(n,re,e)}function oE(e,n,s){if(n=nm(e,n,rE)[0],e=Hr(vi)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var o=kl(n)}catch(v){throw v===mc?nh:v}else o=n;n=ne();var d=n.queue,f=d.dispatch;return s!==n.memoizedState&&(_t.flags|=2048,Fr(li|He,rd(),Nk.bind(null,d,s),null)),[o,f,e]}function Nk(e,n){e.action=n}function ad(e){var n=ne(),s=re;if(s!==null)return oE(n,s,e);ne(),n=n.memoizedState,s=ne();var o=s.queue.dispatch;return s.memoizedState=e,[n,o,!1]}function Fr(e,n,s,o){return e={tag:e,create:s,deps:o,inst:n,next:null},n=_t.updateQueue,n===null&&(n=tm(),_t.updateQueue=n),s=n.lastEffect,s===null?n.lastEffect=e.next=e:(o=s.next,s.next=e,e.next=o,n.lastEffect=e),e}function rd(){return{destroy:void 0,resource:void 0}}function lm(e){var n=xn();return e={current:e},n.memoizedState=e}function Ga(e,n,s,o){var d=xn();o=o===void 0?null:o,_t.flags|=e,d.memoizedState=Fr(li|n,rd(),s,o)}function Rn(e,n,s,o){var d=ne();o=o===void 0?null:o;var f=d.memoizedState.inst;re!==null&&o!==null&&Xp(o,re.memoizedState.deps)?d.memoizedState=Fr(n,f,s,o):(_t.flags|=e,d.memoizedState=Fr(li|n,f,s,o))}function od(e,n){(_t.mode&Ei)!==ue&&(_t.mode&pT)===ue?Ga(276826112,He,e,n):Ga(8390656,He,e,n)}function cm(e,n){var s=4194308;return(_t.mode&Ei)!==ue&&(s|=134217728),Ga(s,tn,e,n)}function lE(e,n){if(typeof n=="function"){e=e();var s=n(e);return function(){typeof s=="function"?s():n(null)}}if(n!=null)return n.hasOwnProperty("current")||console.error("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(n).join(", ")+"}"),e=e(),n.current=e,function(){n.current=null}}function um(e,n,s){typeof n!="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",n!==null?typeof n:"null"),s=s!=null?s.concat([e]):null;var o=4194308;(_t.mode&Ei)!==ue&&(o|=134217728),Ga(o,tn,lE.bind(null,n,e),s)}function ld(e,n,s){typeof n!="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",n!==null?typeof n:"null"),s=s!=null?s.concat([e]):null,Rn(4,tn,lE.bind(null,n,e),s)}function dm(e,n){return xn().memoizedState=[e,n===void 0?null:n],e}function cd(e,n){var s=ne();n=n===void 0?null:n;var o=s.memoizedState;return n!==null&&Xp(n,o[1])?o[0]:(s.memoizedState=[e,n],e)}function hm(e,n){var s=xn();n=n===void 0?null:n;var o=e();if(nr){tt(!0);try{e()}finally{tt(!1)}}return s.memoizedState=[o,n],o}function ud(e,n){var s=ne();n=n===void 0?null:n;var o=s.memoizedState;if(n!==null&&Xp(n,o[1]))return o[0];if(o=e(),nr){tt(!0);try{e()}finally{tt(!1)}}return s.memoizedState=[o,n],o}function fm(e,n){var s=xn();return pm(s,e,n)}function cE(e,n){var s=ne();return dE(s,re.memoizedState,e,n)}function uE(e,n){var s=ne();return re===null?pm(s,e,n):dE(s,re.memoizedState,e,n)}function pm(e,n,s){return s===void 0||(ra&1073741824)!==0?e.memoizedState=n:(e.memoizedState=s,e=hA(),_t.lanes|=e,ca|=e,s)}function dE(e,n,s,o){return gn(s,n)?s:bo.current!==null?(e=pm(e,s,o),gn(e,n)||($e=!0),e):(ra&42)===0?($e=!0,e.memoizedState=s):(e=hA(),_t.lanes|=e,ca|=e,n)}function hE(e,n,s,o,d){var f=Jt.p;Jt.p=f!==0&&f<ji?f:ji;var v=G.T,E={};G.T=E,vm(e,!1,n,s),E._updatedFibers=new Set;try{var w=d(),x=G.S;if(x!==null&&x(E,w),w!==null&&typeof w=="object"&&typeof w.then=="function"){var H=Dk(w,o);Ll(e,n,H,Fn(e))}else Ll(e,n,o,Fn(e))}catch(V){Ll(e,n,{then:function(){},status:"rejected",reason:V},Fn(e))}finally{Jt.p=f,G.T=v,v===null&&E._updatedFibers&&(e=E._updatedFibers.size,E._updatedFibers.clear(),10<e&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."))}}function mm(e,n,s,o){if(e.tag!==5)throw Error("Expected the form instance to be a HostComponent. This is a bug in React.");var d=fE(e).queue;hE(e,d,n,fr,s===null?g:function(){return pE(e),s(o)})}function fE(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:fr,baseState:fr,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:vi,lastRenderedState:fr},next:null};var s={};return n.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:vi,lastRenderedState:s},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function pE(e){G.T===null&&console.error("requestFormReset was called outside a transition or action. To fix, move to an action, or wrap with startTransition.");var n=fE(e).next.queue;Ll(e,n,{},Fn(e))}function gm(){var e=sm(!1);return e=hE.bind(null,_t,e.queue,!0,!1),xn().memoizedState=e,[!1,e]}function mE(){var e=Hr(vi)[0],n=ne().memoizedState;return[typeof e=="boolean"?e:kl(e),n]}function gE(){var e=Nl(vi)[0],n=ne().memoizedState;return[typeof e=="boolean"?e:kl(e),n]}function Va(){return fe(Ic)}function ym(){var e=xn(),n=le.identifierPrefix;if(Yt){var s=Ss,o=vs;s=(o&~(1<<32-pn(o)-1)).toString(32)+s,n="«"+n+"R"+s,s=rh++,0<s&&(n+="H"+s.toString(32)),n+="»"}else s=eI++,n="«"+n+"r"+s.toString(32)+"»";return e.memoizedState=n}function bm(){return xn().memoizedState=Lk.bind(null,_t)}function Lk(e,n){for(var s=e.return;s!==null;){switch(s.tag){case 24:case 3:var o=Fn(s);e=Gs(o);var d=Vs(s,e,o);d!==null&&(Ce(d,s,o),Dl(d,s,o)),s=Bp(),n!=null&&d!==null&&console.error("The seed argument is not enabled outside experimental channels."),e.payload={cache:s};return}s=s.return}}function Ik(e,n,s){var o=arguments;typeof o[3]=="function"&&console.error("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."),o=Fn(e);var d={lane:o,revertLane:0,action:s,hasEagerState:!1,eagerState:null,next:null};dd(e)?bE(n,d):(d=Rp(e,n,d,o),d!==null&&(Ce(d,e,o),vE(d,n,o))),Pn(e,o)}function yE(e,n,s){var o=arguments;typeof o[3]=="function"&&console.error("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."),o=Fn(e),Ll(e,n,s,o),Pn(e,o)}function Ll(e,n,s,o){var d={lane:o,revertLane:0,action:s,hasEagerState:!1,eagerState:null,next:null};if(dd(e))bE(n,d);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=n.lastRenderedReducer,f!==null)){var v=G.H;G.H=_i;try{var E=n.lastRenderedState,w=f(E,s);if(d.hasEagerState=!0,d.eagerState=w,gn(w,E))return Vu(e,n,d,0),le===null&&Gu(),!1}catch{}finally{G.H=v}}if(s=Rp(e,n,d,o),s!==null)return Ce(s,e,o),vE(s,n,o),!0}return!1}function vm(e,n,s,o){if(G.T===null&&Ja===0&&console.error("An optimistic state update occurred outside a transition or action. To fix, move the update to an action, or wrap with startTransition."),o={lane:2,revertLane:Qm(),action:o,hasEagerState:!1,eagerState:null,next:null},dd(e)){if(n)throw Error("Cannot update optimistic state while rendering.");console.error("Cannot call startTransition while rendering.")}else n=Rp(e,s,o,2),n!==null&&Ce(n,e,2);Pn(e,2)}function dd(e){var n=e.alternate;return e===_t||n!==null&&n===_t}function bE(e,n){So=ah=!0;var s=e.pending;s===null?n.next=n:(n.next=s.next,s.next=n),e.pending=n}function vE(e,n,s){if((s&4194048)!==0){var o=n.lanes;o&=e.pendingLanes,s|=o,n.lanes=s,Iu(e,s)}}function We(e){var n=Nt;return e!=null&&(Nt=n===null?e:n.concat(e)),n}function hd(e,n,s){for(var o=Object.keys(e.props),d=0;d<o.length;d++){var f=o[d];if(f!=="children"&&f!=="key"){n===null&&(n=Yu(e,s.mode,0),n._debugInfo=Nt,n.return=s),pt(n,function(v){console.error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",v)},f);break}}}function fd(e){var n=vc;return vc+=1,Eo===null&&(Eo=HS()),FS(Eo,e,n)}function Il(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function pd(e,n){throw n.$$typeof===BN?Error(`A React Element from an older version of React was rendered. This is not supported. It can happen if:
155
+ Incoming: %s`,$,"["+n.join(", ")+"]","["+e.join(", ")+"]");for(var s=0;s<n.length&&s<e.length;s++)if(!gn(e[s],n[s]))return!1;return!0}function Yp(e,n,s,o,d,f){ra=f,_t=n,ci=e!==null?e._debugHookTypes:null,_s=-1,bc=e!==null&&e.type!==n.type,(Object.prototype.toString.call(s)==="[object AsyncFunction]"||Object.prototype.toString.call(s)==="[object AsyncGeneratorFunction]")&&(f=Y(_t),ny.has(f)||(ny.add(f),console.error("%s is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.",f===null?"An unknown Component":"<"+f+">"))),n.memoizedState=null,n.updateQueue=null,n.lanes=0,G.H=e!==null&&e.memoizedState!==null?sy:ci!==null?MT:iy,nr=f=(n.mode&on)!==de;var v=ay(s,o,d);if(nr=!1,So&&(v=Wp(n,s,o,d)),f){tt(!0);try{v=Wp(n,s,o,d)}finally{tt(!1)}}return qS(e,n),v}function qS(e,n){n._debugHookTypes=ci,n.dependencies===null?As!==null&&(n.dependencies={lanes:0,firstContext:null,_debugThenableState:As}):n.dependencies._debugThenableState=As,G.H=lh;var s=re!==null&&re.next!==null;if(ra=0,ci=$=Ie=re=_t=null,_s=-1,e!==null&&(e.flags&65011712)!==(n.flags&65011712)&&console.error("Internal React error: Expected static flag was missing. Please notify the React team."),rh=!1,yc=0,As=null,s)throw Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");e===null||$e||(e=e.dependencies,e!==null&&Qu(e)&&($e=!0)),sh?(sh=!1,e=!0):e=!1,e&&(n=Y(n)||"Unknown",RT.has(n)||ny.has(n)||(RT.add(n),console.error("`use` was called from inside a try/catch block. This is not allowed and can lead to unexpected behavior. To handle errors triggered by `use`, wrap your component in a error boundary.")))}function Wp(e,n,s,o){_t=e;var d=0;do{if(So&&(As=null),yc=0,So=!1,d>=eI)throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");if(d+=1,bc=!1,Ie=re=null,e.updateQueue!=null){var f=e.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}_s=-1,G.H=OT,f=ay(n,s,o)}while(So);return f}function Mk(){var e=G.H,n=e.useState()[0];return n=typeof n.then=="function"?kl(n):n,e=e.useState()[0],(re!==null?re.memoizedState:null)!==e&&(_t.flags|=1024),n}function Qp(){var e=oh!==0;return oh=0,e}function Kp(e,n,s){n.updateQueue=e.updateQueue,n.flags=(n.mode&Ei)!==de?n.flags&-402655237:n.flags&-2053,e.lanes&=~s}function Zp(e){if(rh){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}rh=!1}ra=0,ci=Ie=re=_t=null,_s=-1,$=null,So=!1,yc=oh=0,As=null}function Cn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ie===null?_t.memoizedState=Ie=e:Ie=Ie.next=e,Ie}function ne(){if(re===null){var e=_t.alternate;e=e!==null?e.memoizedState:null}else e=re.next;var n=Ie===null?_t.memoizedState:Ie.next;if(n!==null)Ie=n,re=e;else{if(e===null)throw _t.alternate===null?Error("Update hook called on initial render. This is likely a bug in React. Please file an issue."):Error("Rendered more hooks than during the previous render.");re=e,e={memoizedState:re.memoizedState,baseState:re.baseState,baseQueue:re.baseQueue,queue:re.queue,next:null},Ie===null?_t.memoizedState=Ie=e:Ie=Ie.next=e}return Ie}function Jp(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function kl(e){var n=yc;return yc+=1,As===null&&(As=zS()),e=BS(As,e,n),n=_t,(Ie===null?n.memoizedState:Ie.next)===null&&(n=n.alternate,G.H=n!==null&&n.memoizedState!==null?sy:iy),e}function qs(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return kl(e);if(e.$$typeof===Hi)return pe(e)}throw Error("An unsupported type was passed to use(): "+String(e))}function $a(e){var n=null,s=_t.updateQueue;if(s!==null&&(n=s.memoCache),n==null){var o=_t.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(n={data:o.data.map(function(d){return d.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),s===null&&(s=Jp(),_t.updateQueue=s),s.memoCache=n,s=n.data[n.index],s===void 0||bc)for(s=n.data[n.index]=Array(e),o=0;o<e;o++)s[o]=FN;else s.length!==e&&console.error("Expected a constant size argument for each invocation of useMemoCache. The previous cache was allocated with size %s but size %s was requested.",s.length,e);return n.index++,s}function vi(e,n){return typeof n=="function"?n(e):n}function tm(e,n,s){var o=Cn();if(s!==void 0){var d=s(n);if(nr){tt(!0);try{s(n)}finally{tt(!1)}}}else d=n;return o.memoizedState=o.baseState=d,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:d},o.queue=e,e=e.dispatch=Lk.bind(null,_t,e),[o.memoizedState,e]}function Hr(e){var n=ne();return em(n,re,e)}function em(e,n,s){var o=e.queue;if(o===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");o.lastRenderedReducer=s;var d=e.baseQueue,f=o.pending;if(f!==null){if(d!==null){var v=d.next;d.next=f.next,f.next=v}n.baseQueue!==d&&console.error("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."),n.baseQueue=d=f,o.pending=null}if(f=e.baseState,d===null)e.memoizedState=f;else{n=d.next;var E=v=null,w=null,C=n,H=!1;do{var V=C.lane&-536870913;if(V!==C.lane?(Bt&V)===V:(ra&V)===V){var z=C.revertLane;if(z===0)w!==null&&(w=w.next={lane:0,revertLane:0,action:C.action,hasEagerState:C.hasEagerState,eagerState:C.eagerState,next:null}),V===Ja&&(H=!0);else if((ra&z)===z){C=C.next,z===Ja&&(H=!0);continue}else V={lane:0,revertLane:C.revertLane,action:C.action,hasEagerState:C.hasEagerState,eagerState:C.eagerState,next:null},w===null?(E=w=V,v=f):w=w.next=V,_t.lanes|=z,ca|=z;V=C.action,nr&&s(f,V),f=C.hasEagerState?C.eagerState:s(f,V)}else z={lane:V,revertLane:C.revertLane,action:C.action,hasEagerState:C.hasEagerState,eagerState:C.eagerState,next:null},w===null?(E=w=z,v=f):w=w.next=z,_t.lanes|=V,ca|=V;C=C.next}while(C!==null&&C!==n);if(w===null?v=f:w.next=E,!gn(f,e.memoizedState)&&($e=!0,H&&(s=yo,s!==null)))throw s;e.memoizedState=f,e.baseState=v,e.baseQueue=w,o.lastRenderedState=f}return d===null&&(o.lanes=0),[e.memoizedState,o.dispatch]}function Nl(e){var n=ne(),s=n.queue;if(s===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");s.lastRenderedReducer=e;var o=s.dispatch,d=s.pending,f=n.memoizedState;if(d!==null){s.pending=null;var v=d=d.next;do f=e(f,v.action),v=v.next;while(v!==d);gn(f,n.memoizedState)||($e=!0),n.memoizedState=f,n.baseQueue===null&&(n.baseState=f),s.lastRenderedState=f}return[f,o]}function nm(e,n,s){var o=_t,d=Cn();if(Xt){if(s===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");var f=s();vo||f===s()||(console.error("The result of getServerSnapshot should be cached to avoid an infinite loop"),vo=!0)}else{if(f=n(),vo||(s=n(),gn(f,s)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),vo=!0)),ce===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");(Bt&124)!==0||XS(o,n,f)}return d.memoizedState=f,s={value:f,getSnapshot:n},d.queue=s,ld(WS.bind(null,o,s,e),[e]),o.flags|=2048,Fr(li|He,od(),YS.bind(null,o,s,f,n),null),f}function sd(e,n,s){var o=_t,d=ne(),f=Xt;if(f){if(s===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");s=s()}else if(s=n(),!vo){var v=n();gn(s,v)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),vo=!0)}(v=!gn((re||d).memoizedState,s))&&(d.memoizedState=s,$e=!0),d=d.queue;var E=WS.bind(null,o,d,e);if(Rn(2048,He,E,[e]),d.getSnapshot!==n||v||Ie!==null&&Ie.memoizedState.tag&li){if(o.flags|=2048,Fr(li|He,od(),YS.bind(null,o,d,s,n),null),ce===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");f||(ra&124)!==0||XS(o,n,s)}return s}function XS(e,n,s){e.flags|=16384,e={getSnapshot:n,value:s},n=_t.updateQueue,n===null?(n=Jp(),_t.updateQueue=n,n.stores=[e]):(s=n.stores,s===null?n.stores=[e]:s.push(e))}function YS(e,n,s,o){n.value=s,n.getSnapshot=o,QS(n)&&KS(e)}function WS(e,n,s){return s(function(){QS(n)&&KS(e)})}function QS(e){var n=e.getSnapshot;e=e.value;try{var s=n();return!gn(e,s)}catch{return!0}}function KS(e){var n=xn(e,2);n!==null&&xe(n,e,2)}function im(e){var n=Cn();if(typeof e=="function"){var s=e;if(e=s(),nr){tt(!0);try{s()}finally{tt(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:vi,lastRenderedState:e},n}function sm(e){e=im(e);var n=e.queue,s=gE.bind(null,_t,n);return n.dispatch=s,[e.memoizedState,s]}function am(e){var n=Cn();n.memoizedState=n.baseState=e;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=s,n=bm.bind(null,_t,!0,s),s.dispatch=n,[e,n]}function ZS(e,n){var s=ne();return JS(s,re,e,n)}function JS(e,n,s,o){return e.baseState=s,em(e,re,typeof o=="function"?o:vi)}function tE(e,n){var s=ne();return re!==null?JS(s,re,e,n):(s.baseState=e,[e,s.queue.dispatch])}function Ok(e,n,s,o,d){if(hd(e))throw Error("Cannot update form state while rendering.");if(e=n.action,e!==null){var f={payload:d,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){f.listeners.push(v)}};G.T!==null?s(!0):f.isTransition=!1,o(f),s=n.pending,s===null?(f.next=n.pending=f,eE(n,f)):(f.next=s.next,n.pending=s.next=f)}}function eE(e,n){var s=n.action,o=n.payload,d=e.state;if(n.isTransition){var f=G.T,v={};G.T=v,G.T._updatedFibers=new Set;try{var E=s(d,o),w=G.S;w!==null&&w(v,E),nE(e,n,E)}catch(C){rm(e,n,C)}finally{G.T=f,f===null&&v._updatedFibers&&(e=v._updatedFibers.size,v._updatedFibers.clear(),10<e&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."))}}else try{v=s(d,o),nE(e,n,v)}catch(C){rm(e,n,C)}}function nE(e,n,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?(s.then(function(o){iE(e,n,o)},function(o){return rm(e,n,o)}),n.isTransition||console.error("An async function with useActionState was called outside of a transition. This is likely not what you intended (for example, isPending will not update correctly). Either call the returned function inside startTransition, or pass it to an `action` or `formAction` prop.")):iE(e,n,s)}function iE(e,n,s){n.status="fulfilled",n.value=s,sE(n),e.state=s,n=e.pending,n!==null&&(s=n.next,s===n?e.pending=null:(s=s.next,n.next=s,eE(e,s)))}function rm(e,n,s){var o=e.pending;if(e.pending=null,o!==null){o=o.next;do n.status="rejected",n.reason=s,sE(n),n=n.next;while(n!==o)}e.action=null}function sE(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function aE(e,n){return n}function Br(e,n){if(Xt){var s=ce.formState;if(s!==null){t:{var o=_t;if(Xt){if(Se){e:{for(var d=Se,f=Vi;d.nodeType!==8;){if(!f){d=null;break e}if(d=ti(d.nextSibling),d===null){d=null;break e}}f=d.data,d=f===Oy||f===Dw?d:null}if(d){Se=ti(d.nextSibling),o=d.data===Oy;break t}}Ba(o)}o=!1}o&&(n=s[0])}}return s=Cn(),s.memoizedState=s.baseState=n,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:aE,lastRenderedState:n},s.queue=o,s=gE.bind(null,_t,o),o.dispatch=s,o=im(!1),f=bm.bind(null,_t,!1,o.queue),o=Cn(),d={state:n,dispatch:null,action:e,pending:null},o.queue=d,s=Ok.bind(null,_t,d,f,s),d.dispatch=s,o.memoizedState=e,[n,s,!1]}function ad(e){var n=ne();return rE(n,re,e)}function rE(e,n,s){if(n=em(e,n,aE)[0],e=Hr(vi)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var o=kl(n)}catch(v){throw v===mc?ih:v}else o=n;n=ne();var d=n.queue,f=d.dispatch;return s!==n.memoizedState&&(_t.flags|=2048,Fr(li|He,od(),kk.bind(null,d,s),null)),[o,f,e]}function kk(e,n){e.action=n}function rd(e){var n=ne(),s=re;if(s!==null)return rE(n,s,e);ne(),n=n.memoizedState,s=ne();var o=s.queue.dispatch;return s.memoizedState=e,[n,o,!1]}function Fr(e,n,s,o){return e={tag:e,create:s,deps:o,inst:n,next:null},n=_t.updateQueue,n===null&&(n=Jp(),_t.updateQueue=n),s=n.lastEffect,s===null?n.lastEffect=e.next=e:(o=s.next,s.next=e,e.next=o,n.lastEffect=e),e}function od(){return{destroy:void 0,resource:void 0}}function om(e){var n=Cn();return e={current:e},n.memoizedState=e}function Ga(e,n,s,o){var d=Cn();o=o===void 0?null:o,_t.flags|=e,d.memoizedState=Fr(li|n,od(),s,o)}function Rn(e,n,s,o){var d=ne();o=o===void 0?null:o;var f=d.memoizedState.inst;re!==null&&o!==null&&Xp(o,re.memoizedState.deps)?d.memoizedState=Fr(n,f,s,o):(_t.flags|=e,d.memoizedState=Fr(li|n,f,s,o))}function ld(e,n){(_t.mode&Ei)!==de&&(_t.mode&fT)===de?Ga(276826112,He,e,n):Ga(8390656,He,e,n)}function lm(e,n){var s=4194308;return(_t.mode&Ei)!==de&&(s|=134217728),Ga(s,tn,e,n)}function oE(e,n){if(typeof n=="function"){e=e();var s=n(e);return function(){typeof s=="function"?s():n(null)}}if(n!=null)return n.hasOwnProperty("current")||console.error("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(n).join(", ")+"}"),e=e(),n.current=e,function(){n.current=null}}function cm(e,n,s){typeof n!="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",n!==null?typeof n:"null"),s=s!=null?s.concat([e]):null;var o=4194308;(_t.mode&Ei)!==de&&(o|=134217728),Ga(o,tn,oE.bind(null,n,e),s)}function cd(e,n,s){typeof n!="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",n!==null?typeof n:"null"),s=s!=null?s.concat([e]):null,Rn(4,tn,oE.bind(null,n,e),s)}function um(e,n){return Cn().memoizedState=[e,n===void 0?null:n],e}function ud(e,n){var s=ne();n=n===void 0?null:n;var o=s.memoizedState;return n!==null&&Xp(n,o[1])?o[0]:(s.memoizedState=[e,n],e)}function dm(e,n){var s=Cn();n=n===void 0?null:n;var o=e();if(nr){tt(!0);try{e()}finally{tt(!1)}}return s.memoizedState=[o,n],o}function dd(e,n){var s=ne();n=n===void 0?null:n;var o=s.memoizedState;if(n!==null&&Xp(n,o[1]))return o[0];if(o=e(),nr){tt(!0);try{e()}finally{tt(!1)}}return s.memoizedState=[o,n],o}function hm(e,n){var s=Cn();return fm(s,e,n)}function lE(e,n){var s=ne();return uE(s,re.memoizedState,e,n)}function cE(e,n){var s=ne();return re===null?fm(s,e,n):uE(s,re.memoizedState,e,n)}function fm(e,n,s){return s===void 0||(ra&1073741824)!==0?e.memoizedState=n:(e.memoizedState=s,e=dA(),_t.lanes|=e,ca|=e,s)}function uE(e,n,s,o){return gn(s,n)?s:bo.current!==null?(e=fm(e,s,o),gn(e,n)||($e=!0),e):(ra&42)===0?($e=!0,e.memoizedState=s):(e=dA(),_t.lanes|=e,ca|=e,n)}function dE(e,n,s,o,d){var f=Jt.p;Jt.p=f!==0&&f<ji?f:ji;var v=G.T,E={};G.T=E,bm(e,!1,n,s),E._updatedFibers=new Set;try{var w=d(),C=G.S;if(C!==null&&C(E,w),w!==null&&typeof w=="object"&&typeof w.then=="function"){var H=Rk(w,o);Ll(e,n,H,Fn(e))}else Ll(e,n,o,Fn(e))}catch(V){Ll(e,n,{then:function(){},status:"rejected",reason:V},Fn(e))}finally{Jt.p=f,G.T=v,v===null&&E._updatedFibers&&(e=E._updatedFibers.size,E._updatedFibers.clear(),10<e&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."))}}function pm(e,n,s,o){if(e.tag!==5)throw Error("Expected the form instance to be a HostComponent. This is a bug in React.");var d=hE(e).queue;dE(e,d,n,fr,s===null?g:function(){return fE(e),s(o)})}function hE(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:fr,baseState:fr,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:vi,lastRenderedState:fr},next:null};var s={};return n.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:vi,lastRenderedState:s},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function fE(e){G.T===null&&console.error("requestFormReset was called outside a transition or action. To fix, move to an action, or wrap with startTransition.");var n=hE(e).next.queue;Ll(e,n,{},Fn(e))}function mm(){var e=im(!1);return e=dE.bind(null,_t,e.queue,!0,!1),Cn().memoizedState=e,[!1,e]}function pE(){var e=Hr(vi)[0],n=ne().memoizedState;return[typeof e=="boolean"?e:kl(e),n]}function mE(){var e=Nl(vi)[0],n=ne().memoizedState;return[typeof e=="boolean"?e:kl(e),n]}function Va(){return pe(Ic)}function gm(){var e=Cn(),n=ce.identifierPrefix;if(Xt){var s=Ss,o=vs;s=(o&~(1<<32-pn(o)-1)).toString(32)+s,n="«"+n+"R"+s,s=oh++,0<s&&(n+="H"+s.toString(32)),n+="»"}else s=tI++,n="«"+n+"r"+s.toString(32)+"»";return e.memoizedState=n}function ym(){return Cn().memoizedState=Nk.bind(null,_t)}function Nk(e,n){for(var s=e.return;s!==null;){switch(s.tag){case 24:case 3:var o=Fn(s);e=Gs(o);var d=Vs(s,e,o);d!==null&&(xe(d,s,o),Dl(d,s,o)),s=Hp(),n!=null&&d!==null&&console.error("The seed argument is not enabled outside experimental channels."),e.payload={cache:s};return}s=s.return}}function Lk(e,n,s){var o=arguments;typeof o[3]=="function"&&console.error("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."),o=Fn(e);var d={lane:o,revertLane:0,action:s,hasEagerState:!1,eagerState:null,next:null};hd(e)?yE(n,d):(d=Cp(e,n,d,o),d!==null&&(xe(d,e,o),bE(d,n,o))),Pn(e,o)}function gE(e,n,s){var o=arguments;typeof o[3]=="function"&&console.error("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."),o=Fn(e),Ll(e,n,s,o),Pn(e,o)}function Ll(e,n,s,o){var d={lane:o,revertLane:0,action:s,hasEagerState:!1,eagerState:null,next:null};if(hd(e))yE(n,d);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=n.lastRenderedReducer,f!==null)){var v=G.H;G.H=_i;try{var E=n.lastRenderedState,w=f(E,s);if(d.hasEagerState=!0,d.eagerState=w,gn(w,E))return qu(e,n,d,0),ce===null&&Vu(),!1}catch{}finally{G.H=v}}if(s=Cp(e,n,d,o),s!==null)return xe(s,e,o),bE(s,n,o),!0}return!1}function bm(e,n,s,o){if(G.T===null&&Ja===0&&console.error("An optimistic state update occurred outside a transition or action. To fix, move the update to an action, or wrap with startTransition."),o={lane:2,revertLane:Wm(),action:o,hasEagerState:!1,eagerState:null,next:null},hd(e)){if(n)throw Error("Cannot update optimistic state while rendering.");console.error("Cannot call startTransition while rendering.")}else n=Cp(e,s,o,2),n!==null&&xe(n,e,2);Pn(e,2)}function hd(e){var n=e.alternate;return e===_t||n!==null&&n===_t}function yE(e,n){So=rh=!0;var s=e.pending;s===null?n.next=n:(n.next=s.next,s.next=n),e.pending=n}function bE(e,n,s){if((s&4194048)!==0){var o=n.lanes;o&=e.pendingLanes,s|=o,n.lanes=s,Pu(e,s)}}function We(e){var n=Nt;return e!=null&&(Nt=n===null?e:n.concat(e)),n}function fd(e,n,s){for(var o=Object.keys(e.props),d=0;d<o.length;d++){var f=o[d];if(f!=="children"&&f!=="key"){n===null&&(n=Yu(e,s.mode,0),n._debugInfo=Nt,n.return=s),pt(n,function(v){console.error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",v)},f);break}}}function pd(e){var n=vc;return vc+=1,Eo===null&&(Eo=zS()),BS(Eo,e,n)}function Il(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function md(e,n){throw n.$$typeof===HN?Error(`A React Element from an older version of React was rendered. This is not supported. It can happen if:
156
156
  - Multiple copies of the "react" package is used.
157
157
  - A library pre-bundled an old copy of "react" or "react/jsx-runtime".
158
- - A compiler tries to "inline" JSX instead of using the runtime.`):(e=Object.prototype.toString.call(n),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead."))}function md(e,n){var s=X(e)||"Component";YT[s]||(YT[s]=!0,n=n.displayName||n.name||"Component",e.tag===3?console.error(`Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.
158
+ - A compiler tries to "inline" JSX instead of using the runtime.`):(e=Object.prototype.toString.call(n),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead."))}function gd(e,n){var s=Y(e)||"Component";qT[s]||(qT[s]=!0,n=n.displayName||n.name||"Component",e.tag===3?console.error(`Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.
159
159
  root.render(%s)`,n,n,n):console.error(`Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.
160
- <%s>{%s}</%s>`,n,n,s,n,s))}function gd(e,n){var s=X(e)||"Component";XT[s]||(XT[s]=!0,n=String(n),e.tag===3?console.error(`Symbols are not valid as a React child.
160
+ <%s>{%s}</%s>`,n,n,s,n,s))}function yd(e,n){var s=Y(e)||"Component";XT[s]||(XT[s]=!0,n=String(n),e.tag===3?console.error(`Symbols are not valid as a React child.
161
161
  root.render(%s)`,n):console.error(`Symbols are not valid as a React child.
162
- <%s>%s</%s>`,s,n,s))}function SE(e){function n(D,M){if(e){var k=D.deletions;k===null?(D.deletions=[M],D.flags|=16):k.push(M)}}function s(D,M){if(!e)return null;for(;M!==null;)n(D,M),M=M.sibling;return null}function o(D){for(var M=new Map;D!==null;)D.key!==null?M.set(D.key,D):M.set(D.index,D),D=D.sibling;return M}function d(D,M){return D=rs(D,M),D.index=0,D.sibling=null,D}function f(D,M,k){return D.index=k,e?(k=D.alternate,k!==null?(k=k.index,k<M?(D.flags|=67108866,M):k):(D.flags|=67108866,M)):(D.flags|=1048576,M)}function v(D){return e&&D.alternate===null&&(D.flags|=67108866),D}function E(D,M,k,Y){return M===null||M.tag!==6?(M=Np(k,D.mode,Y),M.return=D,M._debugOwner=D,M._debugTask=D._debugTask,M._debugInfo=Nt,M):(M=d(M,k),M.return=D,M._debugInfo=Nt,M)}function w(D,M,k,Y){var nt=k.type;return nt===Zr?(M=H(D,M,k.props.children,Y,k.key),hd(k,M,D),M):M!==null&&(M.elementType===nt||xS(M,k)||typeof nt=="object"&&nt!==null&&nt.$$typeof===jn&&oa(nt)===M.type)?(M=d(M,k.props),Il(M,k),M.return=D,M._debugOwner=k._owner,M._debugInfo=Nt,M):(M=Yu(k,D.mode,Y),Il(M,k),M.return=D,M._debugInfo=Nt,M)}function x(D,M,k,Y){return M===null||M.tag!==4||M.stateNode.containerInfo!==k.containerInfo||M.stateNode.implementation!==k.implementation?(M=Lp(k,D.mode,Y),M.return=D,M._debugInfo=Nt,M):(M=d(M,k.children||[]),M.return=D,M._debugInfo=Nt,M)}function H(D,M,k,Y,nt){return M===null||M.tag!==7?(M=Pa(k,D.mode,Y,nt),M.return=D,M._debugOwner=D,M._debugTask=D._debugTask,M._debugInfo=Nt,M):(M=d(M,k),M.return=D,M._debugInfo=Nt,M)}function V(D,M,k){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return M=Np(""+M,D.mode,k),M.return=D,M._debugOwner=D,M._debugTask=D._debugTask,M._debugInfo=Nt,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case Zs:return k=Yu(M,D.mode,k),Il(k,M),k.return=D,D=We(M._debugInfo),k._debugInfo=Nt,Nt=D,k;case Kr:return M=Lp(M,D.mode,k),M.return=D,M._debugInfo=Nt,M;case jn:var Y=We(M._debugInfo);return M=oa(M),D=V(D,M,k),Nt=Y,D}if(Ze(M)||j(M))return k=Pa(M,D.mode,k,null),k.return=D,k._debugOwner=D,k._debugTask=D._debugTask,D=We(M._debugInfo),k._debugInfo=Nt,Nt=D,k;if(typeof M.then=="function")return Y=We(M._debugInfo),D=V(D,fd(M),k),Nt=Y,D;if(M.$$typeof===Hi)return V(D,Qu(D,M),k);pd(D,M)}return typeof M=="function"&&md(D,M),typeof M=="symbol"&&gd(D,M),null}function z(D,M,k,Y){var nt=M!==null?M.key:null;if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return nt!==null?null:E(D,M,""+k,Y);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case Zs:return k.key===nt?(nt=We(k._debugInfo),D=w(D,M,k,Y),Nt=nt,D):null;case Kr:return k.key===nt?x(D,M,k,Y):null;case jn:return nt=We(k._debugInfo),k=oa(k),D=z(D,M,k,Y),Nt=nt,D}if(Ze(k)||j(k))return nt!==null?null:(nt=We(k._debugInfo),D=H(D,M,k,Y,null),Nt=nt,D);if(typeof k.then=="function")return nt=We(k._debugInfo),D=z(D,M,fd(k),Y),Nt=nt,D;if(k.$$typeof===Hi)return z(D,M,Qu(D,k),Y);pd(D,k)}return typeof k=="function"&&md(D,k),typeof k=="symbol"&&gd(D,k),null}function q(D,M,k,Y,nt){if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return D=D.get(k)||null,E(M,D,""+Y,nt);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case Zs:return k=D.get(Y.key===null?k:Y.key)||null,D=We(Y._debugInfo),M=w(M,k,Y,nt),Nt=D,M;case Kr:return D=D.get(Y.key===null?k:Y.key)||null,x(M,D,Y,nt);case jn:var Rt=We(Y._debugInfo);return Y=oa(Y),M=q(D,M,k,Y,nt),Nt=Rt,M}if(Ze(Y)||j(Y))return k=D.get(k)||null,D=We(Y._debugInfo),M=H(M,k,Y,nt,null),Nt=D,M;if(typeof Y.then=="function")return Rt=We(Y._debugInfo),M=q(D,M,k,fd(Y),nt),Nt=Rt,M;if(Y.$$typeof===Hi)return q(D,M,k,Qu(M,Y),nt);pd(M,Y)}return typeof Y=="function"&&md(M,Y),typeof Y=="symbol"&&gd(M,Y),null}function ct(D,M,k,Y){if(typeof k!="object"||k===null)return Y;switch(k.$$typeof){case Zs:case Kr:h(D,M,k);var nt=k.key;if(typeof nt!="string")break;if(Y===null){Y=new Set,Y.add(nt);break}if(!Y.has(nt)){Y.add(nt);break}pt(M,function(){console.error("Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.",nt)});break;case jn:k=oa(k),ct(D,M,k,Y)}return Y}function At(D,M,k,Y){for(var nt=null,Rt=null,ut=null,Dt=M,Mt=M=0,de=null;Dt!==null&&Mt<k.length;Mt++){Dt.index>Mt?(de=Dt,Dt=null):de=Dt.sibling;var Re=z(D,Dt,k[Mt],Y);if(Re===null){Dt===null&&(Dt=de);break}nt=ct(D,Re,k[Mt],nt),e&&Dt&&Re.alternate===null&&n(D,Dt),M=f(Re,M,Mt),ut===null?Rt=Re:ut.sibling=Re,ut=Re,Dt=de}if(Mt===k.length)return s(D,Dt),Yt&&Ua(D,Mt),Rt;if(Dt===null){for(;Mt<k.length;Mt++)Dt=V(D,k[Mt],Y),Dt!==null&&(nt=ct(D,Dt,k[Mt],nt),M=f(Dt,M,Mt),ut===null?Rt=Dt:ut.sibling=Dt,ut=Dt);return Yt&&Ua(D,Mt),Rt}for(Dt=o(Dt);Mt<k.length;Mt++)de=q(Dt,D,Mt,k[Mt],Y),de!==null&&(nt=ct(D,de,k[Mt],nt),e&&de.alternate!==null&&Dt.delete(de.key===null?Mt:de.key),M=f(de,M,Mt),ut===null?Rt=de:ut.sibling=de,ut=de);return e&&Dt.forEach(function(Ds){return n(D,Ds)}),Yt&&Ua(D,Mt),Rt}function ce(D,M,k,Y){if(k==null)throw Error("An iterable object provided no iterator.");for(var nt=null,Rt=null,ut=M,Dt=M=0,Mt=null,de=null,Re=k.next();ut!==null&&!Re.done;Dt++,Re=k.next()){ut.index>Dt?(Mt=ut,ut=null):Mt=ut.sibling;var Ds=z(D,ut,Re.value,Y);if(Ds===null){ut===null&&(ut=Mt);break}de=ct(D,Ds,Re.value,de),e&&ut&&Ds.alternate===null&&n(D,ut),M=f(Ds,M,Dt),Rt===null?nt=Ds:Rt.sibling=Ds,Rt=Ds,ut=Mt}if(Re.done)return s(D,ut),Yt&&Ua(D,Dt),nt;if(ut===null){for(;!Re.done;Dt++,Re=k.next())ut=V(D,Re.value,Y),ut!==null&&(de=ct(D,ut,Re.value,de),M=f(ut,M,Dt),Rt===null?nt=ut:Rt.sibling=ut,Rt=ut);return Yt&&Ua(D,Dt),nt}for(ut=o(ut);!Re.done;Dt++,Re=k.next())Mt=q(ut,D,Dt,Re.value,Y),Mt!==null&&(de=ct(D,Mt,Re.value,de),e&&Mt.alternate!==null&&ut.delete(Mt.key===null?Dt:Mt.key),M=f(Mt,M,Dt),Rt===null?nt=Mt:Rt.sibling=Mt,Rt=Mt);return e&&ut.forEach(function(RI){return n(D,RI)}),Yt&&Ua(D,Dt),nt}function jt(D,M,k,Y){if(typeof k=="object"&&k!==null&&k.type===Zr&&k.key===null&&(hd(k,null,D),k=k.props.children),typeof k=="object"&&k!==null){switch(k.$$typeof){case Zs:var nt=We(k._debugInfo);t:{for(var Rt=k.key;M!==null;){if(M.key===Rt){if(Rt=k.type,Rt===Zr){if(M.tag===7){s(D,M.sibling),Y=d(M,k.props.children),Y.return=D,Y._debugOwner=k._owner,Y._debugInfo=Nt,hd(k,Y,D),D=Y;break t}}else if(M.elementType===Rt||xS(M,k)||typeof Rt=="object"&&Rt!==null&&Rt.$$typeof===jn&&oa(Rt)===M.type){s(D,M.sibling),Y=d(M,k.props),Il(Y,k),Y.return=D,Y._debugOwner=k._owner,Y._debugInfo=Nt,D=Y;break t}s(D,M);break}else n(D,M);M=M.sibling}k.type===Zr?(Y=Pa(k.props.children,D.mode,Y,k.key),Y.return=D,Y._debugOwner=D,Y._debugTask=D._debugTask,Y._debugInfo=Nt,hd(k,Y,D),D=Y):(Y=Yu(k,D.mode,Y),Il(Y,k),Y.return=D,Y._debugInfo=Nt,D=Y)}return D=v(D),Nt=nt,D;case Kr:t:{for(nt=k,k=nt.key;M!==null;){if(M.key===k)if(M.tag===4&&M.stateNode.containerInfo===nt.containerInfo&&M.stateNode.implementation===nt.implementation){s(D,M.sibling),Y=d(M,nt.children||[]),Y.return=D,D=Y;break t}else{s(D,M);break}else n(D,M);M=M.sibling}Y=Lp(nt,D.mode,Y),Y.return=D,D=Y}return v(D);case jn:return nt=We(k._debugInfo),k=oa(k),D=jt(D,M,k,Y),Nt=nt,D}if(Ze(k))return nt=We(k._debugInfo),D=At(D,M,k,Y),Nt=nt,D;if(j(k)){if(nt=We(k._debugInfo),Rt=j(k),typeof Rt!="function")throw Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");var ut=Rt.call(k);return ut===k?(D.tag!==0||Object.prototype.toString.call(D.type)!=="[object GeneratorFunction]"||Object.prototype.toString.call(ut)!=="[object Generator]")&&(VT||console.error("Using Iterators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. You can also use an Iterable that can iterate multiple times over the same items."),VT=!0):k.entries!==Rt||ly||(console.error("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),ly=!0),D=ce(D,M,ut,Y),Nt=nt,D}if(typeof k.then=="function")return nt=We(k._debugInfo),D=jt(D,M,fd(k),Y),Nt=nt,D;if(k.$$typeof===Hi)return jt(D,M,Qu(D,k),Y);pd(D,k)}return typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint"?(nt=""+k,M!==null&&M.tag===6?(s(D,M.sibling),Y=d(M,nt),Y.return=D,D=Y):(s(D,M),Y=Np(nt,D.mode,Y),Y.return=D,Y._debugOwner=D,Y._debugTask=D._debugTask,Y._debugInfo=Nt,D=Y),v(D)):(typeof k=="function"&&md(D,k),typeof k=="symbol"&&gd(D,k),s(D,M))}return function(D,M,k,Y){var nt=Nt;Nt=null;try{vc=0;var Rt=jt(D,M,k,Y);return Eo=null,Rt}catch(de){if(de===mc||de===nh)throw de;var ut=b(29,de,null,D.mode);ut.lanes=Y,ut.return=D;var Dt=ut._debugInfo=Nt;if(ut._debugOwner=D._debugOwner,ut._debugTask=D._debugTask,Dt!=null){for(var Mt=Dt.length-1;0<=Mt;Mt--)if(typeof Dt[Mt].stack=="string"){ut._debugOwner=Dt[Mt],ut._debugTask=Dt[Mt].debugTask;break}}return ut}finally{Nt=nt}}}function Ys(e){var n=e.alternate;lt(Be,Be.current&_o,e),lt(ui,e,e),Yi===null&&(n===null||bo.current!==null||n.memoizedState!==null)&&(Yi=e)}function EE(e){if(e.tag===22){if(lt(Be,Be.current,e),lt(ui,e,e),Yi===null){var n=e.alternate;n!==null&&n.memoizedState!==null&&(Yi=e)}}else Xs(e)}function Xs(e){lt(Be,Be.current,e),lt(ui,ui.current,e)}function cs(e){K(ui,e),Yi===e&&(Yi=null),K(Be,e)}function yd(e){for(var n=e;n!==null;){if(n.tag===13){var s=n.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||s.data===Cs||og(s)))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!==void 0){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}function Sm(e){if(e!==null&&typeof e!="function"){var n=String(e);rw.has(n)||(rw.add(n),console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",e))}}function Em(e,n,s,o){var d=e.memoizedState,f=s(o,d);if(e.mode&on){tt(!0);try{f=s(o,d)}finally{tt(!1)}}f===void 0&&(n=F(n)||"Component",nw.has(n)||(nw.add(n),console.error("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",n))),d=f==null?d:It({},d,f),e.memoizedState=d,e.lanes===0&&(e.updateQueue.baseState=d)}function AE(e,n,s,o,d,f,v){var E=e.stateNode;if(typeof E.shouldComponentUpdate=="function"){if(s=E.shouldComponentUpdate(o,f,v),e.mode&on){tt(!0);try{s=E.shouldComponentUpdate(o,f,v)}finally{tt(!1)}}return s===void 0&&console.error("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",F(n)||"Component"),s}return n.prototype&&n.prototype.isPureReactComponent?!Al(s,o)||!Al(d,f):!0}function _E(e,n,s,o){var d=n.state;typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(s,o),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(s,o),n.state!==d&&(e=X(e)||"Component",KT.has(e)||(KT.add(e),console.error("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",e)),cy.enqueueReplaceState(n,n.state,null))}function qa(e,n){var s=n;if("ref"in n){s={};for(var o in n)o!=="ref"&&(s[o]=n[o])}if(e=e.defaultProps){s===n&&(s=It({},s));for(var d in e)s[d]===void 0&&(s[d]=e[d])}return s}function TE(e){uy(e),console.warn(`%s
162
+ <%s>%s</%s>`,s,n,s))}function vE(e){function n(D,M){if(e){var N=D.deletions;N===null?(D.deletions=[M],D.flags|=16):N.push(M)}}function s(D,M){if(!e)return null;for(;M!==null;)n(D,M),M=M.sibling;return null}function o(D){for(var M=new Map;D!==null;)D.key!==null?M.set(D.key,D):M.set(D.index,D),D=D.sibling;return M}function d(D,M){return D=rs(D,M),D.index=0,D.sibling=null,D}function f(D,M,N){return D.index=N,e?(N=D.alternate,N!==null?(N=N.index,N<M?(D.flags|=67108866,M):N):(D.flags|=67108866,M)):(D.flags|=1048576,M)}function v(D){return e&&D.alternate===null&&(D.flags|=67108866),D}function E(D,M,N,X){return M===null||M.tag!==6?(M=kp(N,D.mode,X),M.return=D,M._debugOwner=D,M._debugTask=D._debugTask,M._debugInfo=Nt,M):(M=d(M,N),M.return=D,M._debugInfo=Nt,M)}function w(D,M,N,X){var nt=N.type;return nt===Zr?(M=H(D,M,N.props.children,X,N.key),fd(N,M,D),M):M!==null&&(M.elementType===nt||xS(M,N)||typeof nt=="object"&&nt!==null&&nt.$$typeof===jn&&oa(nt)===M.type)?(M=d(M,N.props),Il(M,N),M.return=D,M._debugOwner=N._owner,M._debugInfo=Nt,M):(M=Yu(N,D.mode,X),Il(M,N),M.return=D,M._debugInfo=Nt,M)}function C(D,M,N,X){return M===null||M.tag!==4||M.stateNode.containerInfo!==N.containerInfo||M.stateNode.implementation!==N.implementation?(M=Np(N,D.mode,X),M.return=D,M._debugInfo=Nt,M):(M=d(M,N.children||[]),M.return=D,M._debugInfo=Nt,M)}function H(D,M,N,X,nt){return M===null||M.tag!==7?(M=Pa(N,D.mode,X,nt),M.return=D,M._debugOwner=D,M._debugTask=D._debugTask,M._debugInfo=Nt,M):(M=d(M,N),M.return=D,M._debugInfo=Nt,M)}function V(D,M,N){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return M=kp(""+M,D.mode,N),M.return=D,M._debugOwner=D,M._debugTask=D._debugTask,M._debugInfo=Nt,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case Zs:return N=Yu(M,D.mode,N),Il(N,M),N.return=D,D=We(M._debugInfo),N._debugInfo=Nt,Nt=D,N;case Kr:return M=Np(M,D.mode,N),M.return=D,M._debugInfo=Nt,M;case jn:var X=We(M._debugInfo);return M=oa(M),D=V(D,M,N),Nt=X,D}if(Ze(M)||j(M))return N=Pa(M,D.mode,N,null),N.return=D,N._debugOwner=D,N._debugTask=D._debugTask,D=We(M._debugInfo),N._debugInfo=Nt,Nt=D,N;if(typeof M.then=="function")return X=We(M._debugInfo),D=V(D,pd(M),N),Nt=X,D;if(M.$$typeof===Hi)return V(D,Ku(D,M),N);md(D,M)}return typeof M=="function"&&gd(D,M),typeof M=="symbol"&&yd(D,M),null}function z(D,M,N,X){var nt=M!==null?M.key:null;if(typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint")return nt!==null?null:E(D,M,""+N,X);if(typeof N=="object"&&N!==null){switch(N.$$typeof){case Zs:return N.key===nt?(nt=We(N._debugInfo),D=w(D,M,N,X),Nt=nt,D):null;case Kr:return N.key===nt?C(D,M,N,X):null;case jn:return nt=We(N._debugInfo),N=oa(N),D=z(D,M,N,X),Nt=nt,D}if(Ze(N)||j(N))return nt!==null?null:(nt=We(N._debugInfo),D=H(D,M,N,X,null),Nt=nt,D);if(typeof N.then=="function")return nt=We(N._debugInfo),D=z(D,M,pd(N),X),Nt=nt,D;if(N.$$typeof===Hi)return z(D,M,Ku(D,N),X);md(D,N)}return typeof N=="function"&&gd(D,N),typeof N=="symbol"&&yd(D,N),null}function q(D,M,N,X,nt){if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return D=D.get(N)||null,E(M,D,""+X,nt);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case Zs:return N=D.get(X.key===null?N:X.key)||null,D=We(X._debugInfo),M=w(M,N,X,nt),Nt=D,M;case Kr:return D=D.get(X.key===null?N:X.key)||null,C(M,D,X,nt);case jn:var Rt=We(X._debugInfo);return X=oa(X),M=q(D,M,N,X,nt),Nt=Rt,M}if(Ze(X)||j(X))return N=D.get(N)||null,D=We(X._debugInfo),M=H(M,N,X,nt,null),Nt=D,M;if(typeof X.then=="function")return Rt=We(X._debugInfo),M=q(D,M,N,pd(X),nt),Nt=Rt,M;if(X.$$typeof===Hi)return q(D,M,N,Ku(M,X),nt);md(M,X)}return typeof X=="function"&&gd(M,X),typeof X=="symbol"&&yd(M,X),null}function ct(D,M,N,X){if(typeof N!="object"||N===null)return X;switch(N.$$typeof){case Zs:case Kr:h(D,M,N);var nt=N.key;if(typeof nt!="string")break;if(X===null){X=new Set,X.add(nt);break}if(!X.has(nt)){X.add(nt);break}pt(M,function(){console.error("Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.",nt)});break;case jn:N=oa(N),ct(D,M,N,X)}return X}function At(D,M,N,X){for(var nt=null,Rt=null,ut=null,Dt=M,Mt=M=0,he=null;Dt!==null&&Mt<N.length;Mt++){Dt.index>Mt?(he=Dt,Dt=null):he=Dt.sibling;var Re=z(D,Dt,N[Mt],X);if(Re===null){Dt===null&&(Dt=he);break}nt=ct(D,Re,N[Mt],nt),e&&Dt&&Re.alternate===null&&n(D,Dt),M=f(Re,M,Mt),ut===null?Rt=Re:ut.sibling=Re,ut=Re,Dt=he}if(Mt===N.length)return s(D,Dt),Xt&&Ua(D,Mt),Rt;if(Dt===null){for(;Mt<N.length;Mt++)Dt=V(D,N[Mt],X),Dt!==null&&(nt=ct(D,Dt,N[Mt],nt),M=f(Dt,M,Mt),ut===null?Rt=Dt:ut.sibling=Dt,ut=Dt);return Xt&&Ua(D,Mt),Rt}for(Dt=o(Dt);Mt<N.length;Mt++)he=q(Dt,D,Mt,N[Mt],X),he!==null&&(nt=ct(D,he,N[Mt],nt),e&&he.alternate!==null&&Dt.delete(he.key===null?Mt:he.key),M=f(he,M,Mt),ut===null?Rt=he:ut.sibling=he,ut=he);return e&&Dt.forEach(function(Ds){return n(D,Ds)}),Xt&&Ua(D,Mt),Rt}function ue(D,M,N,X){if(N==null)throw Error("An iterable object provided no iterator.");for(var nt=null,Rt=null,ut=M,Dt=M=0,Mt=null,he=null,Re=N.next();ut!==null&&!Re.done;Dt++,Re=N.next()){ut.index>Dt?(Mt=ut,ut=null):Mt=ut.sibling;var Ds=z(D,ut,Re.value,X);if(Ds===null){ut===null&&(ut=Mt);break}he=ct(D,Ds,Re.value,he),e&&ut&&Ds.alternate===null&&n(D,ut),M=f(Ds,M,Dt),Rt===null?nt=Ds:Rt.sibling=Ds,Rt=Ds,ut=Mt}if(Re.done)return s(D,ut),Xt&&Ua(D,Dt),nt;if(ut===null){for(;!Re.done;Dt++,Re=N.next())ut=V(D,Re.value,X),ut!==null&&(he=ct(D,ut,Re.value,he),M=f(ut,M,Dt),Rt===null?nt=ut:Rt.sibling=ut,Rt=ut);return Xt&&Ua(D,Dt),nt}for(ut=o(ut);!Re.done;Dt++,Re=N.next())Mt=q(ut,D,Dt,Re.value,X),Mt!==null&&(he=ct(D,Mt,Re.value,he),e&&Mt.alternate!==null&&ut.delete(Mt.key===null?Dt:Mt.key),M=f(Mt,M,Dt),Rt===null?nt=Mt:Rt.sibling=Mt,Rt=Mt);return e&&ut.forEach(function(CI){return n(D,CI)}),Xt&&Ua(D,Dt),nt}function jt(D,M,N,X){if(typeof N=="object"&&N!==null&&N.type===Zr&&N.key===null&&(fd(N,null,D),N=N.props.children),typeof N=="object"&&N!==null){switch(N.$$typeof){case Zs:var nt=We(N._debugInfo);t:{for(var Rt=N.key;M!==null;){if(M.key===Rt){if(Rt=N.type,Rt===Zr){if(M.tag===7){s(D,M.sibling),X=d(M,N.props.children),X.return=D,X._debugOwner=N._owner,X._debugInfo=Nt,fd(N,X,D),D=X;break t}}else if(M.elementType===Rt||xS(M,N)||typeof Rt=="object"&&Rt!==null&&Rt.$$typeof===jn&&oa(Rt)===M.type){s(D,M.sibling),X=d(M,N.props),Il(X,N),X.return=D,X._debugOwner=N._owner,X._debugInfo=Nt,D=X;break t}s(D,M);break}else n(D,M);M=M.sibling}N.type===Zr?(X=Pa(N.props.children,D.mode,X,N.key),X.return=D,X._debugOwner=D,X._debugTask=D._debugTask,X._debugInfo=Nt,fd(N,X,D),D=X):(X=Yu(N,D.mode,X),Il(X,N),X.return=D,X._debugInfo=Nt,D=X)}return D=v(D),Nt=nt,D;case Kr:t:{for(nt=N,N=nt.key;M!==null;){if(M.key===N)if(M.tag===4&&M.stateNode.containerInfo===nt.containerInfo&&M.stateNode.implementation===nt.implementation){s(D,M.sibling),X=d(M,nt.children||[]),X.return=D,D=X;break t}else{s(D,M);break}else n(D,M);M=M.sibling}X=Np(nt,D.mode,X),X.return=D,D=X}return v(D);case jn:return nt=We(N._debugInfo),N=oa(N),D=jt(D,M,N,X),Nt=nt,D}if(Ze(N))return nt=We(N._debugInfo),D=At(D,M,N,X),Nt=nt,D;if(j(N)){if(nt=We(N._debugInfo),Rt=j(N),typeof Rt!="function")throw Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");var ut=Rt.call(N);return ut===N?(D.tag!==0||Object.prototype.toString.call(D.type)!=="[object GeneratorFunction]"||Object.prototype.toString.call(ut)!=="[object Generator]")&&(GT||console.error("Using Iterators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. You can also use an Iterable that can iterate multiple times over the same items."),GT=!0):N.entries!==Rt||oy||(console.error("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),oy=!0),D=ue(D,M,ut,X),Nt=nt,D}if(typeof N.then=="function")return nt=We(N._debugInfo),D=jt(D,M,pd(N),X),Nt=nt,D;if(N.$$typeof===Hi)return jt(D,M,Ku(D,N),X);md(D,N)}return typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint"?(nt=""+N,M!==null&&M.tag===6?(s(D,M.sibling),X=d(M,nt),X.return=D,D=X):(s(D,M),X=kp(nt,D.mode,X),X.return=D,X._debugOwner=D,X._debugTask=D._debugTask,X._debugInfo=Nt,D=X),v(D)):(typeof N=="function"&&gd(D,N),typeof N=="symbol"&&yd(D,N),s(D,M))}return function(D,M,N,X){var nt=Nt;Nt=null;try{vc=0;var Rt=jt(D,M,N,X);return Eo=null,Rt}catch(he){if(he===mc||he===ih)throw he;var ut=b(29,he,null,D.mode);ut.lanes=X,ut.return=D;var Dt=ut._debugInfo=Nt;if(ut._debugOwner=D._debugOwner,ut._debugTask=D._debugTask,Dt!=null){for(var Mt=Dt.length-1;0<=Mt;Mt--)if(typeof Dt[Mt].stack=="string"){ut._debugOwner=Dt[Mt],ut._debugTask=Dt[Mt].debugTask;break}}return ut}finally{Nt=nt}}}function Xs(e){var n=e.alternate;lt(Be,Be.current&_o,e),lt(ui,e,e),Xi===null&&(n===null||bo.current!==null||n.memoizedState!==null)&&(Xi=e)}function SE(e){if(e.tag===22){if(lt(Be,Be.current,e),lt(ui,e,e),Xi===null){var n=e.alternate;n!==null&&n.memoizedState!==null&&(Xi=e)}}else Ys(e)}function Ys(e){lt(Be,Be.current,e),lt(ui,ui.current,e)}function cs(e){K(ui,e),Xi===e&&(Xi=null),K(Be,e)}function bd(e){for(var n=e;n!==null;){if(n.tag===13){var s=n.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||s.data===xs||rg(s)))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!==void 0){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}function vm(e){if(e!==null&&typeof e!="function"){var n=String(e);aw.has(n)||(aw.add(n),console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",e))}}function Sm(e,n,s,o){var d=e.memoizedState,f=s(o,d);if(e.mode&on){tt(!0);try{f=s(o,d)}finally{tt(!1)}}f===void 0&&(n=F(n)||"Component",ew.has(n)||(ew.add(n),console.error("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",n))),d=f==null?d:It({},d,f),e.memoizedState=d,e.lanes===0&&(e.updateQueue.baseState=d)}function EE(e,n,s,o,d,f,v){var E=e.stateNode;if(typeof E.shouldComponentUpdate=="function"){if(s=E.shouldComponentUpdate(o,f,v),e.mode&on){tt(!0);try{s=E.shouldComponentUpdate(o,f,v)}finally{tt(!1)}}return s===void 0&&console.error("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",F(n)||"Component"),s}return n.prototype&&n.prototype.isPureReactComponent?!Al(s,o)||!Al(d,f):!0}function AE(e,n,s,o){var d=n.state;typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(s,o),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(s,o),n.state!==d&&(e=Y(e)||"Component",QT.has(e)||(QT.add(e),console.error("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",e)),ly.enqueueReplaceState(n,n.state,null))}function qa(e,n){var s=n;if("ref"in n){s={};for(var o in n)o!=="ref"&&(s[o]=n[o])}if(e=e.defaultProps){s===n&&(s=It({},s));for(var d in e)s[d]===void 0&&(s[d]=e[d])}return s}function _E(e){cy(e),console.warn(`%s
163
163
 
164
164
  %s
165
165
  `,To?"An error occurred in the <"+To+"> component.":"An error occurred in one of your React components.",`Consider adding an error boundary to your tree to customize error handling behavior.
166
- Visit https://react.dev/link/error-boundaries to learn more about error boundaries.`)}function wE(e){var n=To?"The above error occurred in the <"+To+"> component.":"The above error occurred in one of your React components.",s="React will try to recreate this component tree from scratch using the error boundary you provided, "+((dy||"Anonymous")+".");if(typeof e=="object"&&e!==null&&typeof e.environmentName=="string"){var o=e.environmentName;e=[`%o
166
+ Visit https://react.dev/link/error-boundaries to learn more about error boundaries.`)}function TE(e){var n=To?"The above error occurred in the <"+To+"> component.":"The above error occurred in one of your React components.",s="React will try to recreate this component tree from scratch using the error boundary you provided, "+((uy||"Anonymous")+".");if(typeof e=="object"&&e!==null&&typeof e.environmentName=="string"){var o=e.environmentName;e=[`%o
167
167
 
168
168
  %s
169
169
 
170
170
  %s
171
- `,e,n,s].slice(0),typeof e[0]=="string"?e.splice(0,1,zw+e[0],Hw,Ch+o+Ch,Bw):e.splice(0,0,zw,Hw,Ch+o+Ch,Bw),e.unshift(console),o=CI.apply(console.error,e),o()}else console.error(`%o
171
+ `,e,n,s].slice(0),typeof e[0]=="string"?e.splice(0,1,Uw+e[0],zw,Ch+o+Ch,Hw):e.splice(0,0,Uw,zw,Ch+o+Ch,Hw),e.unshift(console),o=wI.apply(console.error,e),o()}else console.error(`%o
172
172
 
173
173
  %s
174
174
 
175
175
  %s
176
- `,e,n,s)}function CE(e){uy(e)}function bd(e,n){try{To=n.source?X(n.source):null,dy=null;var s=n.value;if(G.actQueue!==null)G.thrownErrors.push(s);else{var o=e.onUncaughtError;o(s,{componentStack:n.stack})}}catch(d){setTimeout(function(){throw d})}}function xE(e,n,s){try{To=s.source?X(s.source):null,dy=X(n);var o=e.onCaughtError;o(s.value,{componentStack:s.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(d){setTimeout(function(){throw d})}}function Am(e,n,s){return s=Gs(s),s.tag=ty,s.payload={element:null},s.callback=function(){pt(n.source,bd,e,n)},s}function _m(e){return e=Gs(e),e.tag=ty,e}function Tm(e,n,s,o){var d=s.type.getDerivedStateFromError;if(typeof d=="function"){var f=o.value;e.payload=function(){return d(f)},e.callback=function(){RS(s),pt(o.source,xE,n,s,o)}}var v=s.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(e.callback=function(){RS(s),pt(o.source,xE,n,s,o),typeof d!="function"&&(da===null?da=new Set([this]):da.add(this)),iI(this,o),typeof d=="function"||(s.lanes&2)===0&&console.error("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",X(s)||"Unknown")})}function Pk(e,n,s,o,d){if(s.flags|=32768,Si&&jl(e,d),o!==null&&typeof o=="object"&&typeof o.then=="function"){if(n=s.alternate,n!==null&&Cl(n,s,d,!0),Yt&&(Es=!0),s=ui.current,s!==null){switch(s.tag){case 13:return Yi===null?$m():s.alternate===null&&Se===ws&&(Se=my),s.flags&=-257,s.flags|=65536,s.lanes=d,o===Jg?s.flags|=16384:(n=s.updateQueue,n===null?s.updateQueue=new Set([o]):n.add(o),qm(e,o,d)),!1;case 22:return s.flags|=65536,o===Jg?s.flags|=16384:(n=s.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([o])},s.updateQueue=n):(s=n.retryQueue,s===null?n.retryQueue=new Set([o]):s.add(o)),qm(e,o,d)),!1}throw Error("Unexpected Suspense handler tag ("+s.tag+"). This is a bug in React.")}return qm(e,o,d),$m(),!1}if(Yt)return Es=!0,n=ui.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=d,o!==Wg&&wl(zn(Error("There was an error while hydrating but React was able to recover by instead client rendering from the nearest Suspense boundary.",{cause:o}),s))):(o!==Wg&&wl(zn(Error("There was an error while hydrating but React was able to recover by instead client rendering the entire root.",{cause:o}),s)),e=e.current.alternate,e.flags|=65536,d&=-d,e.lanes|=d,o=zn(o,s),d=Am(e.stateNode,o,d),ed(e,d),Se!==ir&&(Se=Ro)),!1;var f=zn(Error("There was an error during concurrent rendering but React was able to recover by instead synchronously rendering the entire root.",{cause:o}),s);if(xc===null?xc=[f]:xc.push(f),Se!==ir&&(Se=Ro),n===null)return!0;o=zn(o,s),s=n;do{switch(s.tag){case 3:return s.flags|=65536,e=d&-d,s.lanes|=e,e=Am(s.stateNode,o,e),ed(s,e),!1;case 1:if(n=s.type,f=s.stateNode,(s.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(da===null||!da.has(f))))return s.flags|=65536,d&=-d,s.lanes|=d,d=_m(d),Tm(d,e,s,o),ed(s,d),!1}s=s.return}while(s!==null);return!1}function Qe(e,n,s,o){n.child=e===null?WT(n,null,s,o):Ao(n,e.child,s,o)}function RE(e,n,s,o,d){s=s.render;var f=n.ref;if("ref"in o){var v={};for(var E in o)E!=="ref"&&(v[E]=o[E])}else v=o;return Fa(n),be(n),o=Wp(e,n,s,v,f,d),E=Kp(),Xe(),e!==null&&!$e?(Zp(e,n,d),us(e,n,d)):(Yt&&E&&Ip(n),n.flags|=1,Qe(e,n,o,d),n.child)}function DE(e,n,s,o,d){if(e===null){var f=s.type;return typeof f=="function"&&!Op(f)&&f.defaultProps===void 0&&s.compare===null?(s=Ia(f),n.tag=15,n.type=s,Cm(n,f),ME(e,n,s,o,d)):(e=kp(s.type,null,o,n,n.mode,d),e.ref=n.ref,e.return=n,n.child=e)}if(f=e.child,!km(e,d)){var v=f.memoizedProps;if(s=s.compare,s=s!==null?s:Al,s(v,o)&&e.ref===n.ref)return us(e,n,d)}return n.flags|=1,e=rs(f,o),e.ref=n.ref,e.return=n,n.child=e}function ME(e,n,s,o,d){if(e!==null){var f=e.memoizedProps;if(Al(f,o)&&e.ref===n.ref&&n.type===e.type)if($e=!1,n.pendingProps=o=f,km(e,d))(e.flags&131072)!==0&&($e=!0);else return n.lanes=e.lanes,us(e,n,d)}return wm(e,n,s,o,d)}function OE(e,n,s){var o=n.pendingProps,d=o.children,f=e!==null?e.memoizedState:null;if(o.mode==="hidden"){if((n.flags&128)!==0){if(o=f!==null?f.baseLanes|s:s,e!==null){for(d=n.child=e.child,f=0;d!==null;)f=f|d.lanes|d.childLanes,d=d.sibling;n.childLanes=f&~o}else n.childLanes=0,n.child=null;return kE(e,n,o,s)}if((s&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ju(n,f!==null?f.cachePool:null),f!==null?qS(n,f):qp(n),EE(n);else return n.lanes=n.childLanes=536870912,kE(e,n,f!==null?f.baseLanes|s:s,s)}else f!==null?(Ju(n,f.cachePool),qS(n,f),Xs(n),n.memoizedState=null):(e!==null&&Ju(n,null),qp(n),Xs(n));return Qe(e,n,d,s),n.child}function kE(e,n,s,o){var d=$p();return d=d===null?null:{parent:ze._currentValue,pool:d},n.memoizedState={baseLanes:s,cachePool:d},e!==null&&Ju(n,null),qp(n),EE(n),e!==null&&Cl(e,n,o,!0),null}function vd(e,n){var s=n.ref;if(s===null)e!==null&&e.ref!==null&&(n.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error("Expected ref to be a function, an object returned by React.createRef(), or undefined/null.");(e===null||e.ref!==s)&&(n.flags|=4194816)}}function wm(e,n,s,o,d){if(s.prototype&&typeof s.prototype.render=="function"){var f=F(s)||"Unknown";lw[f]||(console.error("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",f,f),lw[f]=!0)}return n.mode&on&&Ai.recordLegacyContextWarning(n,null),e===null&&(Cm(n,n.type),s.contextTypes&&(f=F(s)||"Unknown",uw[f]||(uw[f]=!0,console.error("%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with React.useContext() instead. (https://react.dev/link/legacy-context)",f)))),Fa(n),be(n),s=Wp(e,n,s,o,void 0,d),o=Kp(),Xe(),e!==null&&!$e?(Zp(e,n,d),us(e,n,d)):(Yt&&o&&Ip(n),n.flags|=1,Qe(e,n,s,d),n.child)}function NE(e,n,s,o,d,f){return Fa(n),be(n),_s=-1,bc=e!==null&&e.type!==n.type,n.updateQueue=null,s=Qp(n,o,s,d),YS(e,n),o=Kp(),Xe(),e!==null&&!$e?(Zp(e,n,f),us(e,n,f)):(Yt&&o&&Ip(n),n.flags|=1,Qe(e,n,s,f),n.child)}function LE(e,n,s,o,d){switch(u(n)){case!1:var f=n.stateNode,v=new n.type(n.memoizedProps,f.context).state;f.updater.enqueueSetState(f,v,null);break;case!0:n.flags|=128,n.flags|=65536,f=Error("Simulated error coming from DevTools");var E=d&-d;if(n.lanes|=E,v=le,v===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");E=_m(E),Tm(E,v,n,zn(f,n)),ed(n,E)}if(Fa(n),n.stateNode===null){if(v=sa,f=s.contextType,"contextType"in s&&f!==null&&(f===void 0||f.$$typeof!==Hi)&&!aw.has(s)&&(aw.add(s),E=f===void 0?" However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file.":typeof f!="object"?" However, it is set to a "+typeof f+".":f.$$typeof===vg?" Did you accidentally pass the Context.Consumer instead?":" However, it is set to an object with keys {"+Object.keys(f).join(", ")+"}.",console.error("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",F(s)||"Component",E)),typeof f=="object"&&f!==null&&(v=fe(f)),f=new s(o,v),n.mode&on){tt(!0);try{f=new s(o,v)}finally{tt(!1)}}if(v=n.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=cy,n.stateNode=f,f._reactInternals=n,f._reactInternalInstance=QT,typeof s.getDerivedStateFromProps=="function"&&v===null&&(v=F(s)||"Component",ZT.has(v)||(ZT.add(v),console.error("`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.",v,f.state===null?"null":"undefined",v))),typeof s.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"){var w=E=v=null;if(typeof f.componentWillMount=="function"&&f.componentWillMount.__suppressDeprecationWarning!==!0?v="componentWillMount":typeof f.UNSAFE_componentWillMount=="function"&&(v="UNSAFE_componentWillMount"),typeof f.componentWillReceiveProps=="function"&&f.componentWillReceiveProps.__suppressDeprecationWarning!==!0?E="componentWillReceiveProps":typeof f.UNSAFE_componentWillReceiveProps=="function"&&(E="UNSAFE_componentWillReceiveProps"),typeof f.componentWillUpdate=="function"&&f.componentWillUpdate.__suppressDeprecationWarning!==!0?w="componentWillUpdate":typeof f.UNSAFE_componentWillUpdate=="function"&&(w="UNSAFE_componentWillUpdate"),v!==null||E!==null||w!==null){f=F(s)||"Component";var x=typeof s.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";tw.has(f)||(tw.add(f),console.error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
176
+ `,e,n,s)}function wE(e){cy(e)}function vd(e,n){try{To=n.source?Y(n.source):null,uy=null;var s=n.value;if(G.actQueue!==null)G.thrownErrors.push(s);else{var o=e.onUncaughtError;o(s,{componentStack:n.stack})}}catch(d){setTimeout(function(){throw d})}}function xE(e,n,s){try{To=s.source?Y(s.source):null,uy=Y(n);var o=e.onCaughtError;o(s.value,{componentStack:s.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(d){setTimeout(function(){throw d})}}function Em(e,n,s){return s=Gs(s),s.tag=Jg,s.payload={element:null},s.callback=function(){pt(n.source,vd,e,n)},s}function Am(e){return e=Gs(e),e.tag=Jg,e}function _m(e,n,s,o){var d=s.type.getDerivedStateFromError;if(typeof d=="function"){var f=o.value;e.payload=function(){return d(f)},e.callback=function(){CS(s),pt(o.source,xE,n,s,o)}}var v=s.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(e.callback=function(){CS(s),pt(o.source,xE,n,s,o),typeof d!="function"&&(da===null?da=new Set([this]):da.add(this)),nI(this,o),typeof d=="function"||(s.lanes&2)===0&&console.error("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",Y(s)||"Unknown")})}function Ik(e,n,s,o,d){if(s.flags|=32768,Si&&jl(e,d),o!==null&&typeof o=="object"&&typeof o.then=="function"){if(n=s.alternate,n!==null&&xl(n,s,d,!0),Xt&&(Es=!0),s=ui.current,s!==null){switch(s.tag){case 13:return Xi===null?jm():s.alternate===null&&Ee===ws&&(Ee=py),s.flags&=-257,s.flags|=65536,s.lanes=d,o===Zg?s.flags|=16384:(n=s.updateQueue,n===null?s.updateQueue=new Set([o]):n.add(o),Vm(e,o,d)),!1;case 22:return s.flags|=65536,o===Zg?s.flags|=16384:(n=s.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([o])},s.updateQueue=n):(s=n.retryQueue,s===null?n.retryQueue=new Set([o]):s.add(o)),Vm(e,o,d)),!1}throw Error("Unexpected Suspense handler tag ("+s.tag+"). This is a bug in React.")}return Vm(e,o,d),jm(),!1}if(Xt)return Es=!0,n=ui.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=d,o!==Yg&&wl(zn(Error("There was an error while hydrating but React was able to recover by instead client rendering from the nearest Suspense boundary.",{cause:o}),s))):(o!==Yg&&wl(zn(Error("There was an error while hydrating but React was able to recover by instead client rendering the entire root.",{cause:o}),s)),e=e.current.alternate,e.flags|=65536,d&=-d,e.lanes|=d,o=zn(o,s),d=Em(e.stateNode,o,d),nd(e,d),Ee!==ir&&(Ee=Ro)),!1;var f=zn(Error("There was an error during concurrent rendering but React was able to recover by instead synchronously rendering the entire root.",{cause:o}),s);if(Cc===null?Cc=[f]:Cc.push(f),Ee!==ir&&(Ee=Ro),n===null)return!0;o=zn(o,s),s=n;do{switch(s.tag){case 3:return s.flags|=65536,e=d&-d,s.lanes|=e,e=Em(s.stateNode,o,e),nd(s,e),!1;case 1:if(n=s.type,f=s.stateNode,(s.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(da===null||!da.has(f))))return s.flags|=65536,d&=-d,s.lanes|=d,d=Am(d),_m(d,e,s,o),nd(s,d),!1}s=s.return}while(s!==null);return!1}function Qe(e,n,s,o){n.child=e===null?YT(n,null,s,o):Ao(n,e.child,s,o)}function CE(e,n,s,o,d){s=s.render;var f=n.ref;if("ref"in o){var v={};for(var E in o)E!=="ref"&&(v[E]=o[E])}else v=o;return Fa(n),ve(n),o=Yp(e,n,s,v,f,d),E=Qp(),Ye(),e!==null&&!$e?(Kp(e,n,d),us(e,n,d)):(Xt&&E&&Lp(n),n.flags|=1,Qe(e,n,o,d),n.child)}function RE(e,n,s,o,d){if(e===null){var f=s.type;return typeof f=="function"&&!Mp(f)&&f.defaultProps===void 0&&s.compare===null?(s=Ia(f),n.tag=15,n.type=s,wm(n,f),DE(e,n,s,o,d)):(e=Op(s.type,null,o,n,n.mode,d),e.ref=n.ref,e.return=n,n.child=e)}if(f=e.child,!Om(e,d)){var v=f.memoizedProps;if(s=s.compare,s=s!==null?s:Al,s(v,o)&&e.ref===n.ref)return us(e,n,d)}return n.flags|=1,e=rs(f,o),e.ref=n.ref,e.return=n,n.child=e}function DE(e,n,s,o,d){if(e!==null){var f=e.memoizedProps;if(Al(f,o)&&e.ref===n.ref&&n.type===e.type)if($e=!1,n.pendingProps=o=f,Om(e,d))(e.flags&131072)!==0&&($e=!0);else return n.lanes=e.lanes,us(e,n,d)}return Tm(e,n,s,o,d)}function ME(e,n,s){var o=n.pendingProps,d=o.children,f=e!==null?e.memoizedState:null;if(o.mode==="hidden"){if((n.flags&128)!==0){if(o=f!==null?f.baseLanes|s:s,e!==null){for(d=n.child=e.child,f=0;d!==null;)f=f|d.lanes|d.childLanes,d=d.sibling;n.childLanes=f&~o}else n.childLanes=0,n.child=null;return OE(e,n,o,s)}if((s&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&td(n,f!==null?f.cachePool:null),f!==null?VS(n,f):Vp(n),SE(n);else return n.lanes=n.childLanes=536870912,OE(e,n,f!==null?f.baseLanes|s:s,s)}else f!==null?(td(n,f.cachePool),VS(n,f),Ys(n),n.memoizedState=null):(e!==null&&td(n,null),Vp(n),Ys(n));return Qe(e,n,d,s),n.child}function OE(e,n,s,o){var d=jp();return d=d===null?null:{parent:ze._currentValue,pool:d},n.memoizedState={baseLanes:s,cachePool:d},e!==null&&td(n,null),Vp(n),SE(n),e!==null&&xl(e,n,o,!0),null}function Sd(e,n){var s=n.ref;if(s===null)e!==null&&e.ref!==null&&(n.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error("Expected ref to be a function, an object returned by React.createRef(), or undefined/null.");(e===null||e.ref!==s)&&(n.flags|=4194816)}}function Tm(e,n,s,o,d){if(s.prototype&&typeof s.prototype.render=="function"){var f=F(s)||"Unknown";ow[f]||(console.error("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",f,f),ow[f]=!0)}return n.mode&on&&Ai.recordLegacyContextWarning(n,null),e===null&&(wm(n,n.type),s.contextTypes&&(f=F(s)||"Unknown",cw[f]||(cw[f]=!0,console.error("%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with React.useContext() instead. (https://react.dev/link/legacy-context)",f)))),Fa(n),ve(n),s=Yp(e,n,s,o,void 0,d),o=Qp(),Ye(),e!==null&&!$e?(Kp(e,n,d),us(e,n,d)):(Xt&&o&&Lp(n),n.flags|=1,Qe(e,n,s,d),n.child)}function kE(e,n,s,o,d,f){return Fa(n),ve(n),_s=-1,bc=e!==null&&e.type!==n.type,n.updateQueue=null,s=Wp(n,o,s,d),qS(e,n),o=Qp(),Ye(),e!==null&&!$e?(Kp(e,n,f),us(e,n,f)):(Xt&&o&&Lp(n),n.flags|=1,Qe(e,n,s,f),n.child)}function NE(e,n,s,o,d){switch(u(n)){case!1:var f=n.stateNode,v=new n.type(n.memoizedProps,f.context).state;f.updater.enqueueSetState(f,v,null);break;case!0:n.flags|=128,n.flags|=65536,f=Error("Simulated error coming from DevTools");var E=d&-d;if(n.lanes|=E,v=ce,v===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");E=Am(E),_m(E,v,n,zn(f,n)),nd(n,E)}if(Fa(n),n.stateNode===null){if(v=sa,f=s.contextType,"contextType"in s&&f!==null&&(f===void 0||f.$$typeof!==Hi)&&!sw.has(s)&&(sw.add(s),E=f===void 0?" However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file.":typeof f!="object"?" However, it is set to a "+typeof f+".":f.$$typeof===bg?" Did you accidentally pass the Context.Consumer instead?":" However, it is set to an object with keys {"+Object.keys(f).join(", ")+"}.",console.error("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",F(s)||"Component",E)),typeof f=="object"&&f!==null&&(v=pe(f)),f=new s(o,v),n.mode&on){tt(!0);try{f=new s(o,v)}finally{tt(!1)}}if(v=n.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=ly,n.stateNode=f,f._reactInternals=n,f._reactInternalInstance=WT,typeof s.getDerivedStateFromProps=="function"&&v===null&&(v=F(s)||"Component",KT.has(v)||(KT.add(v),console.error("`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.",v,f.state===null?"null":"undefined",v))),typeof s.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"){var w=E=v=null;if(typeof f.componentWillMount=="function"&&f.componentWillMount.__suppressDeprecationWarning!==!0?v="componentWillMount":typeof f.UNSAFE_componentWillMount=="function"&&(v="UNSAFE_componentWillMount"),typeof f.componentWillReceiveProps=="function"&&f.componentWillReceiveProps.__suppressDeprecationWarning!==!0?E="componentWillReceiveProps":typeof f.UNSAFE_componentWillReceiveProps=="function"&&(E="UNSAFE_componentWillReceiveProps"),typeof f.componentWillUpdate=="function"&&f.componentWillUpdate.__suppressDeprecationWarning!==!0?w="componentWillUpdate":typeof f.UNSAFE_componentWillUpdate=="function"&&(w="UNSAFE_componentWillUpdate"),v!==null||E!==null||w!==null){f=F(s)||"Component";var C=typeof s.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";JT.has(f)||(JT.add(f),console.error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
177
177
 
178
178
  %s uses %s but also contains the following legacy lifecycles:%s%s%s
179
179
 
180
180
  The above lifecycles should be removed. Learn more about this warning here:
181
- https://react.dev/link/unsafe-component-lifecycles`,f,x,v!==null?`
181
+ https://react.dev/link/unsafe-component-lifecycles`,f,C,v!==null?`
182
182
  `+v:"",E!==null?`
183
183
  `+E:"",w!==null?`
184
- `+w:""))}}f=n.stateNode,v=F(s)||"Component",f.render||(s.prototype&&typeof s.prototype.render=="function"?console.error("No `render` method found on the %s instance: did you accidentally return an object from the constructor?",v):console.error("No `render` method found on the %s instance: you may have forgotten to define `render`.",v)),!f.getInitialState||f.getInitialState.isReactClassApproved||f.state||console.error("getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",v),f.getDefaultProps&&!f.getDefaultProps.isReactClassApproved&&console.error("getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",v),f.contextType&&console.error("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",v),s.childContextTypes&&!sw.has(s)&&(sw.add(s),console.error("%s uses the legacy childContextTypes API which was removed in React 19. Use React.createContext() instead. (https://react.dev/link/legacy-context)",v)),s.contextTypes&&!iw.has(s)&&(iw.add(s),console.error("%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with static contextType instead. (https://react.dev/link/legacy-context)",v)),typeof f.componentShouldUpdate=="function"&&console.error("%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",v),s.prototype&&s.prototype.isPureReactComponent&&typeof f.shouldComponentUpdate<"u"&&console.error("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",F(s)||"A pure component"),typeof f.componentDidUnmount=="function"&&console.error("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",v),typeof f.componentDidReceiveProps=="function"&&console.error("%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().",v),typeof f.componentWillRecieveProps=="function"&&console.error("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",v),typeof f.UNSAFE_componentWillRecieveProps=="function"&&console.error("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",v),E=f.props!==o,f.props!==void 0&&E&&console.error("When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",v),f.defaultProps&&console.error("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",v,v),typeof f.getSnapshotBeforeUpdate!="function"||typeof f.componentDidUpdate=="function"||JT.has(s)||(JT.add(s),console.error("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",F(s))),typeof f.getDerivedStateFromProps=="function"&&console.error("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",v),typeof f.getDerivedStateFromError=="function"&&console.error("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",v),typeof s.getSnapshotBeforeUpdate=="function"&&console.error("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",v),(E=f.state)&&(typeof E!="object"||Ze(E))&&console.error("%s.state: must be set to an object or null",v),typeof f.getChildContext=="function"&&typeof s.childContextTypes!="object"&&console.error("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",v),f=n.stateNode,f.props=o,f.state=n.memoizedState,f.refs={},Gp(n),v=s.contextType,f.context=typeof v=="object"&&v!==null?fe(v):sa,f.state===o&&(v=F(s)||"Component",ew.has(v)||(ew.add(v),console.error("%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.",v))),n.mode&on&&Ai.recordLegacyContextWarning(n,f),Ai.recordUnsafeLifecycleWarnings(n,f),f.state=n.memoizedState,v=s.getDerivedStateFromProps,typeof v=="function"&&(Em(n,s,v,o),f.state=n.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(v=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),v!==f.state&&(console.error("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",X(n)||"Component"),cy.enqueueReplaceState(f,f.state,null)),Ol(n,o,f,d),Ml(),f.state=n.memoizedState),typeof f.componentDidMount=="function"&&(n.flags|=4194308),(n.mode&Ei)!==ue&&(n.flags|=134217728),f=!0}else if(e===null){f=n.stateNode;var H=n.memoizedProps;E=qa(s,H),f.props=E;var V=f.context;w=s.contextType,v=sa,typeof w=="object"&&w!==null&&(v=fe(w)),x=s.getDerivedStateFromProps,w=typeof x=="function"||typeof f.getSnapshotBeforeUpdate=="function",H=n.pendingProps!==H,w||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(H||V!==v)&&_E(n,f,o,v),aa=!1;var z=n.memoizedState;f.state=z,Ol(n,o,f,d),Ml(),V=n.memoizedState,H||z!==V||aa?(typeof x=="function"&&(Em(n,s,x,o),V=n.memoizedState),(E=aa||AE(n,s,E,o,z,V,v))?(w||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(n.flags|=4194308),(n.mode&Ei)!==ue&&(n.flags|=134217728)):(typeof f.componentDidMount=="function"&&(n.flags|=4194308),(n.mode&Ei)!==ue&&(n.flags|=134217728),n.memoizedProps=o,n.memoizedState=V),f.props=o,f.state=V,f.context=v,f=E):(typeof f.componentDidMount=="function"&&(n.flags|=4194308),(n.mode&Ei)!==ue&&(n.flags|=134217728),f=!1)}else{f=n.stateNode,Vp(e,n),v=n.memoizedProps,w=qa(s,v),f.props=w,x=n.pendingProps,z=f.context,V=s.contextType,E=sa,typeof V=="object"&&V!==null&&(E=fe(V)),H=s.getDerivedStateFromProps,(V=typeof H=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(v!==x||z!==E)&&_E(n,f,o,E),aa=!1,z=n.memoizedState,f.state=z,Ol(n,o,f,d),Ml();var q=n.memoizedState;v!==x||z!==q||aa||e!==null&&e.dependencies!==null&&Wu(e.dependencies)?(typeof H=="function"&&(Em(n,s,H,o),q=n.memoizedState),(w=aa||AE(n,s,w,o,z,q,E)||e!==null&&e.dependencies!==null&&Wu(e.dependencies))?(V||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(o,q,E),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(o,q,E)),typeof f.componentDidUpdate=="function"&&(n.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof f.componentDidUpdate!="function"||v===e.memoizedProps&&z===e.memoizedState||(n.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&z===e.memoizedState||(n.flags|=1024),n.memoizedProps=o,n.memoizedState=q),f.props=o,f.state=q,f.context=E,f=w):(typeof f.componentDidUpdate!="function"||v===e.memoizedProps&&z===e.memoizedState||(n.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&z===e.memoizedState||(n.flags|=1024),f=!1)}if(E=f,vd(e,n),v=(n.flags&128)!==0,E||v){if(E=n.stateNode,yp(n),v&&typeof s.getDerivedStateFromError!="function")s=null,Mn=-1;else{if(be(n),s=IT(E),n.mode&on){tt(!0);try{IT(E)}finally{tt(!1)}}Xe()}n.flags|=1,e!==null&&v?(n.child=Ao(n,e.child,null,d),n.child=Ao(n,null,s,d)):Qe(e,n,s,d),n.memoizedState=E.state,e=n.child}else e=us(e,n,d);return d=n.stateNode,f&&d.props!==o&&(wo||console.error("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",X(n)||"a component"),wo=!0),e}function IE(e,n,s,o){return Tl(),n.flags|=256,Qe(e,n,s,o),n.child}function Cm(e,n){n&&n.childContextTypes&&console.error(`childContextTypes cannot be defined on a function component.
185
- %s.childContextTypes = ...`,n.displayName||n.name||"Component"),typeof n.getDerivedStateFromProps=="function"&&(e=F(n)||"Unknown",dw[e]||(console.error("%s: Function components do not support getDerivedStateFromProps.",e),dw[e]=!0)),typeof n.contextType=="object"&&n.contextType!==null&&(n=F(n)||"Unknown",cw[n]||(console.error("%s: Function components do not support contextType.",n),cw[n]=!0))}function xm(e){return{baseLanes:e,cachePool:zS()}}function Rm(e,n,s){return e=e!==null?e.childLanes&~s:0,n&&(e|=qn),e}function PE(e,n,s){var o,d=n.pendingProps;c(n)&&(n.flags|=128);var f=!1,v=(n.flags&128)!==0;if((o=v)||(o=e!==null&&e.memoizedState===null?!1:(Be.current&Sc)!==0),o&&(f=!0,n.flags&=-129),o=(n.flags&32)!==0,n.flags&=-33,e===null){if(Yt){if(f?Ys(n):Xs(n),Yt){var E=ve,w;if(!(w=!E)){t:{var x=E;for(w=Vi;x.nodeType!==8;){if(!w){w=null;break t}if(x=ti(x.nextSibling),x===null){w=null;break t}}w=x}w!==null?(za(),n.memoizedState={dehydrated:w,treeContext:Qa!==null?{id:vs,overflow:Ss}:null,retryLane:536870912,hydrationErrors:null},x=b(18,null,null,ue),x.stateNode=w,x.return=n,n.child=x,yn=n,ve=null,w=!0):w=!1,w=!w}w&&(Up(n,E),Ba(n))}if(E=n.memoizedState,E!==null&&(E=E.dehydrated,E!==null))return og(E)?n.lanes=32:n.lanes=536870912,null;cs(n)}return E=d.children,d=d.fallback,f?(Xs(n),f=n.mode,E=Sd({mode:"hidden",children:E},f),d=Pa(d,f,s,null),E.return=n,d.return=n,E.sibling=d,n.child=E,f=n.child,f.memoizedState=xm(s),f.childLanes=Rm(e,o,s),n.memoizedState=fy,d):(Ys(n),Dm(n,E))}var H=e.memoizedState;if(H!==null&&(E=H.dehydrated,E!==null)){if(v)n.flags&256?(Ys(n),n.flags&=-257,n=Mm(e,n,s)):n.memoizedState!==null?(Xs(n),n.child=e.child,n.flags|=128,n=null):(Xs(n),f=d.fallback,E=n.mode,d=Sd({mode:"visible",children:d.children},E),f=Pa(f,E,s,null),f.flags|=2,d.return=n,f.return=n,d.sibling=f,n.child=d,Ao(n,e.child,null,s),d=n.child,d.memoizedState=xm(s),d.childLanes=Rm(e,o,s),n.memoizedState=fy,n=f);else if(Ys(n),Yt&&console.error("We should not be hydrating here. This is a bug in React. Please file a bug."),og(E)){if(o=E.nextSibling&&E.nextSibling.dataset,o){w=o.dgst;var V=o.msg;x=o.stck;var z=o.cstck}E=V,o=w,d=x,w=f=z,f=Error(E||"The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering."),f.stack=d||"",f.digest=o,o=w===void 0?null:w,d={value:f,source:null,stack:o},typeof o=="string"&&Yg.set(f,d),wl(d),n=Mm(e,n,s)}else if($e||Cl(e,n,s,!1),o=(s&e.childLanes)!==0,$e||o){if(o=le,o!==null&&(d=s&-s,d=(d&42)!==0?1:hl(d),d=(d&(o.suspendedLanes|s))!==0?0:d,d!==0&&d!==H.retryLane))throw H.retryLane=d,Cn(e,d),Ce(o,e,d),ow;E.data===Cs||$m(),n=Mm(e,n,s)}else E.data===Cs?(n.flags|=192,n.child=e.child,n=null):(e=H.treeContext,ve=ti(E.nextSibling),yn=n,Yt=!0,Ka=null,Es=!1,ri=null,Vi=!1,e!==null&&(za(),si[ai++]=vs,si[ai++]=Ss,si[ai++]=Qa,vs=e.id,Ss=e.overflow,Qa=n),n=Dm(n,d.children),n.flags|=4096);return n}return f?(Xs(n),f=d.fallback,E=n.mode,w=e.child,x=w.sibling,d=rs(w,{mode:"hidden",children:d.children}),d.subtreeFlags=w.subtreeFlags&65011712,x!==null?f=rs(x,f):(f=Pa(f,E,s,null),f.flags|=2),f.return=n,d.return=n,d.sibling=f,n.child=d,d=f,f=n.child,E=e.child.memoizedState,E===null?E=xm(s):(w=E.cachePool,w!==null?(x=ze._currentValue,w=w.parent!==x?{parent:x,pool:x}:w):w=zS(),E={baseLanes:E.baseLanes|s,cachePool:w}),f.memoizedState=E,f.childLanes=Rm(e,o,s),n.memoizedState=fy,d):(Ys(n),s=e.child,e=s.sibling,s=rs(s,{mode:"visible",children:d.children}),s.return=n,s.sibling=null,e!==null&&(o=n.deletions,o===null?(n.deletions=[e],n.flags|=16):o.push(e)),n.child=s,n.memoizedState=null,s)}function Dm(e,n){return n=Sd({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function Sd(e,n){return e=b(22,e,null,n),e.lanes=0,e.stateNode={_visibility:Xd,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function Mm(e,n,s){return Ao(n,e.child,null,s),e=Dm(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function UE(e,n,s){e.lanes|=n;var o=e.alternate;o!==null&&(o.lanes|=n),zp(e.return,n,s)}function zE(e,n){var s=Ze(e);return e=!s&&typeof j(e)=="function",s||e?(s=s?"array":"iterable",console.error("A nested %s was passed to row #%s in <SuspenseList />. Wrap it in an additional SuspenseList to configure its revealOrder: <SuspenseList revealOrder=...> ... <SuspenseList revealOrder=...>{%s}</SuspenseList> ... </SuspenseList>",s,n,s),!1):!0}function Om(e,n,s,o,d){var f=e.memoizedState;f===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:o,tail:s,tailMode:d}:(f.isBackwards=n,f.rendering=null,f.renderingStartTime=0,f.last=o,f.tail=s,f.tailMode=d)}function HE(e,n,s){var o=n.pendingProps,d=o.revealOrder,f=o.tail;if(o=o.children,d!==void 0&&d!=="forwards"&&d!=="backwards"&&d!=="together"&&!hw[d])if(hw[d]=!0,typeof d=="string")switch(d.toLowerCase()){case"together":case"forwards":case"backwards":console.error('"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',d,d.toLowerCase());break;case"forward":case"backward":console.error('"%s" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.',d,d.toLowerCase());break;default:console.error('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',d)}else console.error('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',d);f===void 0||hy[f]||(f!=="collapsed"&&f!=="hidden"?(hy[f]=!0,console.error('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "collapsed" or "hidden"?',f)):d!=="forwards"&&d!=="backwards"&&(hy[f]=!0,console.error('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',f)));t:if((d==="forwards"||d==="backwards")&&o!==void 0&&o!==null&&o!==!1)if(Ze(o)){for(var v=0;v<o.length;v++)if(!zE(o[v],v))break t}else if(v=j(o),typeof v=="function"){if(v=v.call(o))for(var E=v.next(),w=0;!E.done;E=v.next()){if(!zE(E.value,w))break t;w++}}else console.error('A single row was passed to a <SuspenseList revealOrder="%s" />. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?',d);if(Qe(e,n,o,s),o=Be.current,(o&Sc)!==0)o=o&_o|Sc,n.flags|=128;else{if(e!==null&&(e.flags&128)!==0)t:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&UE(e,s,n);else if(e.tag===19)UE(e,s,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break t;for(;e.sibling===null;){if(e.return===null||e.return===n)break t;e=e.return}e.sibling.return=e.return,e=e.sibling}o&=_o}switch(lt(Be,o,n),d){case"forwards":for(s=n.child,d=null;s!==null;)e=s.alternate,e!==null&&yd(e)===null&&(d=s),s=s.sibling;s=d,s===null?(d=n.child,n.child=null):(d=s.sibling,s.sibling=null),Om(n,!1,d,s,f);break;case"backwards":for(s=null,d=n.child,n.child=null;d!==null;){if(e=d.alternate,e!==null&&yd(e)===null){n.child=d;break}e=d.sibling,d.sibling=s,s=d,d=e}Om(n,!0,s,null,f);break;case"together":Om(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function us(e,n,s){if(e!==null&&(n.dependencies=e.dependencies),Mn=-1,ca|=n.lanes,(s&n.childLanes)===0)if(e!==null){if(Cl(e,n,s,!1),(s&n.childLanes)===0)return null}else return null;if(e!==null&&n.child!==e.child)throw Error("Resuming work not yet implemented.");if(n.child!==null){for(e=n.child,s=rs(e,e.pendingProps),n.child=s,s.return=n;e.sibling!==null;)e=e.sibling,s=s.sibling=rs(e,e.pendingProps),s.return=n;s.sibling=null}return n.child}function km(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&Wu(e)))}function Uk(e,n,s){switch(n.tag){case 3:bt(n,n.stateNode.containerInfo),$s(n,ze,e.memoizedState.cache),Tl();break;case 27:case 5:Q(n);break;case 4:bt(n,n.stateNode.containerInfo);break;case 10:$s(n,n.type,n.memoizedProps.value);break;case 12:(s&n.childLanes)!==0&&(n.flags|=4),n.flags|=2048;var o=n.stateNode;o.effectDuration=-0,o.passiveEffectDuration=-0;break;case 13:if(o=n.memoizedState,o!==null)return o.dehydrated!==null?(Ys(n),n.flags|=128,null):(s&n.child.childLanes)!==0?PE(e,n,s):(Ys(n),e=us(e,n,s),e!==null?e.sibling:null);Ys(n);break;case 19:var d=(e.flags&128)!==0;if(o=(s&n.childLanes)!==0,o||(Cl(e,n,s,!1),o=(s&n.childLanes)!==0),d){if(o)return HE(e,n,s);n.flags|=128}if(d=n.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),lt(Be,Be.current,n),o)break;return null;case 22:case 23:return n.lanes=0,OE(e,n,s);case 24:$s(n,ze,e.memoizedState.cache)}return us(e,n,s)}function Nm(e,n,s){if(n._debugNeedsRemount&&e!==null){s=kp(n.type,n.key,n.pendingProps,n._debugOwner||null,n.mode,n.lanes),s._debugStack=n._debugStack,s._debugTask=n._debugTask;var o=n.return;if(o===null)throw Error("Cannot swap the root fiber.");if(e.alternate=null,n.alternate=null,s.index=n.index,s.sibling=n.sibling,s.return=n.return,s.ref=n.ref,s._debugInfo=n._debugInfo,n===o.child)o.child=s;else{var d=o.child;if(d===null)throw Error("Expected parent to have a child.");for(;d.sibling!==n;)if(d=d.sibling,d===null)throw Error("Expected to find the previous sibling.");d.sibling=s}return n=o.deletions,n===null?(o.deletions=[e],o.flags|=16):n.push(e),s.flags|=2,s}if(e!==null)if(e.memoizedProps!==n.pendingProps||n.type!==e.type)$e=!0;else{if(!km(e,s)&&(n.flags&128)===0)return $e=!1,Uk(e,n,s);$e=(e.flags&131072)!==0}else $e=!1,(o=Yt)&&(za(),o=(n.flags&1048576)!==0),o&&(o=n.index,za(),MS(n,Qd,o));switch(n.lanes=0,n.tag){case 16:t:if(o=n.pendingProps,e=oa(n.elementType),n.type=e,typeof e=="function")Op(e)?(o=qa(e,o),n.tag=1,n.type=e=Ia(e),n=LE(null,n,e,o,s)):(n.tag=0,Cm(n,e),n.type=e=Ia(e),n=wm(null,n,e,o,s));else{if(e!=null){if(d=e.$$typeof,d===Ql){n.tag=11,n.type=e=Dp(e),n=RE(null,n,e,o,s);break t}else if(d===Ud){n.tag=14,n=DE(null,n,e,o,s);break t}}throw n="",e!==null&&typeof e=="object"&&e.$$typeof===jn&&(n=" Did you wrap a component in React.lazy() more than once?"),e=F(e)||e,Error("Element type is invalid. Received a promise that resolves to: "+e+". Lazy element type must resolve to a class or function."+n)}return n;case 0:return wm(e,n,n.type,n.pendingProps,s);case 1:return o=n.type,d=qa(o,n.pendingProps),LE(e,n,o,d,s);case 3:t:{if(bt(n,n.stateNode.containerInfo),e===null)throw Error("Should have a current fiber. This is a bug in React.");o=n.pendingProps;var f=n.memoizedState;d=f.element,Vp(e,n),Ol(n,o,null,s);var v=n.memoizedState;if(o=v.cache,$s(n,ze,o),o!==f.cache&&Hp(n,[ze],s,!0),Ml(),o=v.element,f.isDehydrated)if(f={element:o,isDehydrated:!1,cache:v.cache},n.updateQueue.baseState=f,n.memoizedState=f,n.flags&256){n=IE(e,n,o,s);break t}else if(o!==d){d=zn(Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),n),wl(d),n=IE(e,n,o,s);break t}else{switch(e=n.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(ve=ti(e.firstChild),yn=n,Yt=!0,Ka=null,Es=!1,ri=null,Vi=!0,e=WT(n,null,o,s),n.child=e;e;)e.flags=e.flags&-3|4096,e=e.sibling}else{if(Tl(),o===d){n=us(e,n,s);break t}Qe(e,n,o,s)}n=n.child}return n;case 26:return vd(e,n),e===null?(e=s_(n.type,null,n.pendingProps,null))?n.memoizedState=e:Yt||(e=n.type,s=n.pendingProps,o=Et(ta.current),o=Rd(o).createElement(e),o[rn]=n,o[Dn]=s,Ke(o,e,s),P(o),n.stateNode=o):n.memoizedState=s_(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return Q(n),e===null&&Yt&&(o=Et(ta.current),d=B(),o=n.stateNode=n_(n.type,n.pendingProps,o,d,!1),Es||(d=YA(o,n.type,n.pendingProps,d),d!==null&&(Ha(n,0).serverProps=d)),yn=n,Vi=!0,d=ve,Ks(n.type)?(Py=d,ve=ti(o.firstChild)):ve=d),Qe(e,n,n.pendingProps.children,s),vd(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&Yt&&(f=B(),o=Tp(n.type,f.ancestorInfo),d=ve,(v=!d)||(v=SN(d,n.type,n.pendingProps,Vi),v!==null?(n.stateNode=v,Es||(f=YA(v,n.type,n.pendingProps,f),f!==null&&(Ha(n,0).serverProps=f)),yn=n,ve=ti(v.firstChild),Vi=!1,f=!0):f=!1,v=!f),v&&(o&&Up(n,d),Ba(n))),Q(n),d=n.type,f=n.pendingProps,v=e!==null?e.memoizedProps:null,o=f.children,ag(d,f)?o=null:v!==null&&ag(d,v)&&(n.flags|=32),n.memoizedState!==null&&(d=Wp(e,n,Ok,null,null,s),Ic._currentValue=d),vd(e,n),Qe(e,n,o,s),n.child;case 6:return e===null&&Yt&&(e=n.pendingProps,s=B(),o=s.ancestorInfo.current,e=o!=null?Bu(e,o.tag,s.ancestorInfo.implicitRootScope):!0,s=ve,(o=!s)||(o=EN(s,n.pendingProps,Vi),o!==null?(n.stateNode=o,yn=n,ve=null,o=!0):o=!1,o=!o),o&&(e&&Up(n,s),Ba(n))),null;case 13:return PE(e,n,s);case 4:return bt(n,n.stateNode.containerInfo),o=n.pendingProps,e===null?n.child=Ao(n,null,o,s):Qe(e,n,o,s),n.child;case 11:return RE(e,n,n.type,n.pendingProps,s);case 7:return Qe(e,n,n.pendingProps,s),n.child;case 8:return Qe(e,n,n.pendingProps.children,s),n.child;case 12:return n.flags|=4,n.flags|=2048,o=n.stateNode,o.effectDuration=-0,o.passiveEffectDuration=-0,Qe(e,n,n.pendingProps.children,s),n.child;case 10:return o=n.type,d=n.pendingProps,f=d.value,"value"in d||fw||(fw=!0,console.error("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?")),$s(n,o,f),Qe(e,n,d.children,s),n.child;case 9:return d=n.type._context,o=n.pendingProps.children,typeof o!="function"&&console.error("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."),Fa(n),d=fe(d),be(n),o=ry(o,d,void 0),Xe(),n.flags|=1,Qe(e,n,o,s),n.child;case 14:return DE(e,n,n.type,n.pendingProps,s);case 15:return ME(e,n,n.type,n.pendingProps,s);case 19:return HE(e,n,s);case 31:return o=n.pendingProps,s=n.mode,o={mode:o.mode,children:o.children},e===null?(e=Sd(o,s),e.ref=n.ref,n.child=e,e.return=n,n=e):(e=rs(e.child,o),e.ref=n.ref,n.child=e,e.return=n,n=e),n;case 22:return OE(e,n,s);case 24:return Fa(n),o=fe(ze),e===null?(d=$p(),d===null&&(d=le,f=Bp(),d.pooledCache=f,ja(f),f!==null&&(d.pooledCacheLanes|=s),d=f),n.memoizedState={parent:o,cache:d},Gp(n),$s(n,ze,d)):((e.lanes&s)!==0&&(Vp(e,n),Ol(n,null,null,s),Ml()),d=e.memoizedState,f=n.memoizedState,d.parent!==o?(d={parent:o,cache:o},n.memoizedState=d,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=d),$s(n,ze,o)):(o=f.cache,$s(n,ze,o),o!==d.cache&&Hp(n,[ze],s,!0))),Qe(e,n,n.pendingProps.children,s),n.child;case 29:throw n.pendingProps}throw Error("Unknown unit of work tag ("+n.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function ds(e){e.flags|=4}function BE(e,n){if(n.type!=="stylesheet"||(n.state.loading&di)!==hr)e.flags&=-16777217;else if(e.flags|=16777216,!c_(n)){if(n=ui.current,n!==null&&((Bt&4194048)===Bt?Yi!==null:(Bt&62914560)!==Bt&&(Bt&536870912)===0||n!==Yi))throw gc=Jg,_T;e.flags|=8192}}function Ed(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?Oa():536870912,e.lanes|=n,rr|=n)}function Pl(e,n){if(!Yt)switch(e.tailMode){case"hidden":n=e.tail;for(var s=null;n!==null;)n.alternate!==null&&(s=n),n=n.sibling;s===null?e.tail=null:s.sibling=null;break;case"collapsed":s=e.tail;for(var o=null;s!==null;)s.alternate!==null&&(o=s),s=s.sibling;o===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function pe(e){var n=e.alternate!==null&&e.alternate.child===e.child,s=0,o=0;if(n)if((e.mode&Je)!==ue){for(var d=e.selfBaseDuration,f=e.child;f!==null;)s|=f.lanes|f.childLanes,o|=f.subtreeFlags&65011712,o|=f.flags&65011712,d+=f.treeBaseDuration,f=f.sibling;e.treeBaseDuration=d}else for(d=e.child;d!==null;)s|=d.lanes|d.childLanes,o|=d.subtreeFlags&65011712,o|=d.flags&65011712,d.return=e,d=d.sibling;else if((e.mode&Je)!==ue){d=e.actualDuration,f=e.selfBaseDuration;for(var v=e.child;v!==null;)s|=v.lanes|v.childLanes,o|=v.subtreeFlags,o|=v.flags,d+=v.actualDuration,f+=v.treeBaseDuration,v=v.sibling;e.actualDuration=d,e.treeBaseDuration=f}else for(d=e.child;d!==null;)s|=d.lanes|d.childLanes,o|=d.subtreeFlags,o|=d.flags,d.return=e,d=d.sibling;return e.subtreeFlags|=o,e.childLanes=s,n}function zk(e,n,s){var o=n.pendingProps;switch(Pp(n),n.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return pe(n),null;case 1:return pe(n),null;case 3:return s=n.stateNode,o=null,e!==null&&(o=e.memoizedState.cache),n.memoizedState.cache!==o&&(n.flags|=2048),os(ze,n),Gt(n),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(e===null||e.child===null)&&(_l(n)?(LS(),ds(n)):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,NS())),pe(n),null;case 26:return s=n.memoizedState,e===null?(ds(n),s!==null?(pe(n),BE(n,s)):(pe(n),n.flags&=-16777217)):s?s!==e.memoizedState?(ds(n),pe(n),BE(n,s)):(pe(n),n.flags&=-16777217):(e.memoizedProps!==o&&ds(n),pe(n),n.flags&=-16777217),null;case 27:dt(n),s=Et(ta.current);var d=n.type;if(e!==null&&n.stateNode!=null)e.memoizedProps!==o&&ds(n);else{if(!o){if(n.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return pe(n),null}e=B(),_l(n)?OS(n):(e=n_(d,o,s,e,!0),n.stateNode=e,ds(n))}return pe(n),null;case 5:if(dt(n),s=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==o&&ds(n);else{if(!o){if(n.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return pe(n),null}if(d=B(),_l(n))OS(n);else{switch(e=Et(ta.current),Tp(s,d.ancestorInfo),d=d.context,e=Rd(e),d){case Lo:e=e.createElementNS(no,s);break;case _h:e=e.createElementNS($d,s);break;default:switch(s){case"svg":e=e.createElementNS(no,s);break;case"math":e=e.createElementNS($d,s);break;case"script":e=e.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof o.is=="string"?e.createElement("select",{is:o.is}):e.createElement("select"),o.multiple?e.multiple=!0:o.size&&(e.size=o.size);break;default:e=typeof o.is=="string"?e.createElement(s,{is:o.is}):e.createElement(s),s.indexOf("-")===-1&&(s!==s.toLowerCase()&&console.error("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",s),Object.prototype.toString.call(e)!=="[object HTMLUnknownElement]"||gs.call(kw,s)||(kw[s]=!0,console.error("The tag <%s> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.",s)))}}e[rn]=n,e[Dn]=o;t:for(d=n.child;d!==null;){if(d.tag===5||d.tag===6)e.appendChild(d.stateNode);else if(d.tag!==4&&d.tag!==27&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===n)break t;for(;d.sibling===null;){if(d.return===null||d.return===n)break t;d=d.return}d.sibling.return=d.return,d=d.sibling}n.stateNode=e;t:switch(Ke(e,s,o),s){case"button":case"input":case"select":case"textarea":e=!!o.autoFocus;break t;case"img":e=!0;break t;default:e=!1}e&&ds(n)}}return pe(n),n.flags&=-16777217,null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==o&&ds(n);else{if(typeof o!="string"&&n.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");if(e=Et(ta.current),s=B(),_l(n)){e=n.stateNode,s=n.memoizedProps,d=!Es,o=null;var f=yn;if(f!==null)switch(f.tag){case 3:d&&(d=JA(e,s,o),d!==null&&(Ha(n,0).serverProps=d));break;case 27:case 5:o=f.memoizedProps,d&&(d=JA(e,s,o),d!==null&&(Ha(n,0).serverProps=d))}e[rn]=n,e=!!(e.nodeValue===s||o!==null&&o.suppressHydrationWarning===!0||jA(e.nodeValue,s)),e||Ba(n)}else d=s.ancestorInfo.current,d!=null&&Bu(o,d.tag,s.ancestorInfo.implicitRootScope),e=Rd(e).createTextNode(o),e[rn]=n,n.stateNode=e}return pe(n),null;case 13:if(o=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(d=_l(n),o!==null&&o.dehydrated!==null){if(e===null){if(!d)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(d=n.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");d[rn]=n,pe(n),(n.mode&Je)!==ue&&o!==null&&(d=n.child,d!==null&&(n.treeBaseDuration-=d.treeBaseDuration))}else LS(),Tl(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4,pe(n),(n.mode&Je)!==ue&&o!==null&&(d=n.child,d!==null&&(n.treeBaseDuration-=d.treeBaseDuration));d=!1}else d=NS(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=d),d=!0;if(!d)return n.flags&256?(cs(n),n):(cs(n),null)}return cs(n),(n.flags&128)!==0?(n.lanes=s,(n.mode&Je)!==ue&&Zu(n),n):(s=o!==null,e=e!==null&&e.memoizedState!==null,s&&(o=n.child,d=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(d=o.alternate.memoizedState.cachePool.pool),f=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(f=o.memoizedState.cachePool.pool),f!==d&&(o.flags|=2048)),s!==e&&s&&(n.child.flags|=8192),Ed(n,n.updateQueue),pe(n),(n.mode&Je)!==ue&&s&&(e=n.child,e!==null&&(n.treeBaseDuration-=e.treeBaseDuration)),null);case 4:return Gt(n),e===null&&Zm(n.stateNode.containerInfo),pe(n),null;case 10:return os(n.type,n),pe(n),null;case 19:if(K(Be,n),d=n.memoizedState,d===null)return pe(n),null;if(o=(n.flags&128)!==0,f=d.rendering,f===null)if(o)Pl(d,!1);else{if(Se!==ws||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(f=yd(e),f!==null){for(n.flags|=128,Pl(d,!1),e=f.updateQueue,n.updateQueue=e,Ed(n,e),n.subtreeFlags=0,e=s,s=n.child;s!==null;)DS(s,e),s=s.sibling;return lt(Be,Be.current&_o|Sc,n),n.child}e=e.sibling}d.tail!==null&&Bi()>dh&&(n.flags|=128,o=!0,Pl(d,!1),n.lanes=4194304)}else{if(!o)if(e=yd(f),e!==null){if(n.flags|=128,o=!0,e=e.updateQueue,n.updateQueue=e,Ed(n,e),Pl(d,!0),d.tail===null&&d.tailMode==="hidden"&&!f.alternate&&!Yt)return pe(n),null}else 2*Bi()-d.renderingStartTime>dh&&s!==536870912&&(n.flags|=128,o=!0,Pl(d,!1),n.lanes=4194304);d.isBackwards?(f.sibling=n.child,n.child=f):(e=d.last,e!==null?e.sibling=f:n.child=f,d.last=f)}return d.tail!==null?(e=d.tail,d.rendering=e,d.tail=e.sibling,d.renderingStartTime=Bi(),e.sibling=null,s=Be.current,s=o?s&_o|Sc:s&_o,lt(Be,s,n),e):(pe(n),null);case 22:case 23:return cs(n),Yp(n),o=n.memoizedState!==null,e!==null?e.memoizedState!==null!==o&&(n.flags|=8192):o&&(n.flags|=8192),o?(s&536870912)!==0&&(n.flags&128)===0&&(pe(n),n.subtreeFlags&6&&(n.flags|=8192)):pe(n),s=n.updateQueue,s!==null&&Ed(n,s.retryQueue),s=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),o=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),o!==s&&(n.flags|=2048),e!==null&&K(tr,n),null;case 24:return s=null,e!==null&&(s=e.memoizedState.cache),n.memoizedState.cache!==s&&(n.flags|=2048),os(ze,n),pe(n),null;case 25:return null;case 30:return null}throw Error("Unknown unit of work tag ("+n.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function Hk(e,n){switch(Pp(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,(n.mode&Je)!==ue&&Zu(n),n):null;case 3:return os(ze,n),Gt(n),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return dt(n),null;case 13:if(cs(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");Tl()}return e=n.flags,e&65536?(n.flags=e&-65537|128,(n.mode&Je)!==ue&&Zu(n),n):null;case 19:return K(Be,n),null;case 4:return Gt(n),null;case 10:return os(n.type,n),null;case 22:case 23:return cs(n),Yp(n),e!==null&&K(tr,n),e=n.flags,e&65536?(n.flags=e&-65537|128,(n.mode&Je)!==ue&&Zu(n),n):null;case 24:return os(ze,n),null;case 25:return null;default:return null}}function FE(e,n){switch(Pp(n),n.tag){case 3:os(ze,n),Gt(n);break;case 26:case 27:case 5:dt(n);break;case 4:Gt(n);break;case 13:cs(n);break;case 19:K(Be,n);break;case 10:os(n.type,n);break;case 22:case 23:cs(n),Yp(n),e!==null&&K(tr,n);break;case 24:os(ze,n)}}function Li(e){return(e.mode&Je)!==ue}function jE(e,n){Li(e)?(Ni(),Ul(n,e),ki()):Ul(n,e)}function Lm(e,n,s){Li(e)?(Ni(),jr(s,e,n),ki()):jr(s,e,n)}function Ul(e,n){try{var s=n.updateQueue,o=s!==null?s.lastEffect:null;if(o!==null){var d=o.next;s=d;do{if((s.tag&e)===e&&((e&He)!==oi?rt!==null&&typeof rt.markComponentPassiveEffectMountStarted=="function"&&rt.markComponentPassiveEffectMountStarted(n):(e&tn)!==oi&&rt!==null&&typeof rt.markComponentLayoutEffectMountStarted=="function"&&rt.markComponentLayoutEffectMountStarted(n),o=void 0,(e&bn)!==oi&&(ko=!0),o=pt(n,sI,s),(e&bn)!==oi&&(ko=!1),(e&He)!==oi?rt!==null&&typeof rt.markComponentPassiveEffectMountStopped=="function"&&rt.markComponentPassiveEffectMountStopped():(e&tn)!==oi&&rt!==null&&typeof rt.markComponentLayoutEffectMountStopped=="function"&&rt.markComponentLayoutEffectMountStopped(),o!==void 0&&typeof o!="function")){var f=void 0;f=(s.tag&tn)!==0?"useLayoutEffect":(s.tag&bn)!==0?"useInsertionEffect":"useEffect";var v=void 0;v=o===null?" You returned null. If your effect does not require clean up, return undefined (or nothing).":typeof o.then=="function"?`
184
+ `+w:""))}}f=n.stateNode,v=F(s)||"Component",f.render||(s.prototype&&typeof s.prototype.render=="function"?console.error("No `render` method found on the %s instance: did you accidentally return an object from the constructor?",v):console.error("No `render` method found on the %s instance: you may have forgotten to define `render`.",v)),!f.getInitialState||f.getInitialState.isReactClassApproved||f.state||console.error("getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",v),f.getDefaultProps&&!f.getDefaultProps.isReactClassApproved&&console.error("getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",v),f.contextType&&console.error("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",v),s.childContextTypes&&!iw.has(s)&&(iw.add(s),console.error("%s uses the legacy childContextTypes API which was removed in React 19. Use React.createContext() instead. (https://react.dev/link/legacy-context)",v)),s.contextTypes&&!nw.has(s)&&(nw.add(s),console.error("%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with static contextType instead. (https://react.dev/link/legacy-context)",v)),typeof f.componentShouldUpdate=="function"&&console.error("%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",v),s.prototype&&s.prototype.isPureReactComponent&&typeof f.shouldComponentUpdate<"u"&&console.error("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",F(s)||"A pure component"),typeof f.componentDidUnmount=="function"&&console.error("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",v),typeof f.componentDidReceiveProps=="function"&&console.error("%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().",v),typeof f.componentWillRecieveProps=="function"&&console.error("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",v),typeof f.UNSAFE_componentWillRecieveProps=="function"&&console.error("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",v),E=f.props!==o,f.props!==void 0&&E&&console.error("When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",v),f.defaultProps&&console.error("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",v,v),typeof f.getSnapshotBeforeUpdate!="function"||typeof f.componentDidUpdate=="function"||ZT.has(s)||(ZT.add(s),console.error("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",F(s))),typeof f.getDerivedStateFromProps=="function"&&console.error("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",v),typeof f.getDerivedStateFromError=="function"&&console.error("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",v),typeof s.getSnapshotBeforeUpdate=="function"&&console.error("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",v),(E=f.state)&&(typeof E!="object"||Ze(E))&&console.error("%s.state: must be set to an object or null",v),typeof f.getChildContext=="function"&&typeof s.childContextTypes!="object"&&console.error("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",v),f=n.stateNode,f.props=o,f.state=n.memoizedState,f.refs={},$p(n),v=s.contextType,f.context=typeof v=="object"&&v!==null?pe(v):sa,f.state===o&&(v=F(s)||"Component",tw.has(v)||(tw.add(v),console.error("%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.",v))),n.mode&on&&Ai.recordLegacyContextWarning(n,f),Ai.recordUnsafeLifecycleWarnings(n,f),f.state=n.memoizedState,v=s.getDerivedStateFromProps,typeof v=="function"&&(Sm(n,s,v,o),f.state=n.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(v=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),v!==f.state&&(console.error("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",Y(n)||"Component"),ly.enqueueReplaceState(f,f.state,null)),Ol(n,o,f,d),Ml(),f.state=n.memoizedState),typeof f.componentDidMount=="function"&&(n.flags|=4194308),(n.mode&Ei)!==de&&(n.flags|=134217728),f=!0}else if(e===null){f=n.stateNode;var H=n.memoizedProps;E=qa(s,H),f.props=E;var V=f.context;w=s.contextType,v=sa,typeof w=="object"&&w!==null&&(v=pe(w)),C=s.getDerivedStateFromProps,w=typeof C=="function"||typeof f.getSnapshotBeforeUpdate=="function",H=n.pendingProps!==H,w||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(H||V!==v)&&AE(n,f,o,v),aa=!1;var z=n.memoizedState;f.state=z,Ol(n,o,f,d),Ml(),V=n.memoizedState,H||z!==V||aa?(typeof C=="function"&&(Sm(n,s,C,o),V=n.memoizedState),(E=aa||EE(n,s,E,o,z,V,v))?(w||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(n.flags|=4194308),(n.mode&Ei)!==de&&(n.flags|=134217728)):(typeof f.componentDidMount=="function"&&(n.flags|=4194308),(n.mode&Ei)!==de&&(n.flags|=134217728),n.memoizedProps=o,n.memoizedState=V),f.props=o,f.state=V,f.context=v,f=E):(typeof f.componentDidMount=="function"&&(n.flags|=4194308),(n.mode&Ei)!==de&&(n.flags|=134217728),f=!1)}else{f=n.stateNode,Gp(e,n),v=n.memoizedProps,w=qa(s,v),f.props=w,C=n.pendingProps,z=f.context,V=s.contextType,E=sa,typeof V=="object"&&V!==null&&(E=pe(V)),H=s.getDerivedStateFromProps,(V=typeof H=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(v!==C||z!==E)&&AE(n,f,o,E),aa=!1,z=n.memoizedState,f.state=z,Ol(n,o,f,d),Ml();var q=n.memoizedState;v!==C||z!==q||aa||e!==null&&e.dependencies!==null&&Qu(e.dependencies)?(typeof H=="function"&&(Sm(n,s,H,o),q=n.memoizedState),(w=aa||EE(n,s,w,o,z,q,E)||e!==null&&e.dependencies!==null&&Qu(e.dependencies))?(V||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(o,q,E),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(o,q,E)),typeof f.componentDidUpdate=="function"&&(n.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof f.componentDidUpdate!="function"||v===e.memoizedProps&&z===e.memoizedState||(n.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&z===e.memoizedState||(n.flags|=1024),n.memoizedProps=o,n.memoizedState=q),f.props=o,f.state=q,f.context=E,f=w):(typeof f.componentDidUpdate!="function"||v===e.memoizedProps&&z===e.memoizedState||(n.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&z===e.memoizedState||(n.flags|=1024),f=!1)}if(E=f,Sd(e,n),v=(n.flags&128)!==0,E||v){if(E=n.stateNode,gp(n),v&&typeof s.getDerivedStateFromError!="function")s=null,Mn=-1;else{if(ve(n),s=LT(E),n.mode&on){tt(!0);try{LT(E)}finally{tt(!1)}}Ye()}n.flags|=1,e!==null&&v?(n.child=Ao(n,e.child,null,d),n.child=Ao(n,null,s,d)):Qe(e,n,s,d),n.memoizedState=E.state,e=n.child}else e=us(e,n,d);return d=n.stateNode,f&&d.props!==o&&(wo||console.error("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",Y(n)||"a component"),wo=!0),e}function LE(e,n,s,o){return Tl(),n.flags|=256,Qe(e,n,s,o),n.child}function wm(e,n){n&&n.childContextTypes&&console.error(`childContextTypes cannot be defined on a function component.
185
+ %s.childContextTypes = ...`,n.displayName||n.name||"Component"),typeof n.getDerivedStateFromProps=="function"&&(e=F(n)||"Unknown",uw[e]||(console.error("%s: Function components do not support getDerivedStateFromProps.",e),uw[e]=!0)),typeof n.contextType=="object"&&n.contextType!==null&&(n=F(n)||"Unknown",lw[n]||(console.error("%s: Function components do not support contextType.",n),lw[n]=!0))}function xm(e){return{baseLanes:e,cachePool:US()}}function Cm(e,n,s){return e=e!==null?e.childLanes&~s:0,n&&(e|=qn),e}function IE(e,n,s){var o,d=n.pendingProps;c(n)&&(n.flags|=128);var f=!1,v=(n.flags&128)!==0;if((o=v)||(o=e!==null&&e.memoizedState===null?!1:(Be.current&Sc)!==0),o&&(f=!0,n.flags&=-129),o=(n.flags&32)!==0,n.flags&=-33,e===null){if(Xt){if(f?Xs(n):Ys(n),Xt){var E=Se,w;if(!(w=!E)){t:{var C=E;for(w=Vi;C.nodeType!==8;){if(!w){w=null;break t}if(C=ti(C.nextSibling),C===null){w=null;break t}}w=C}w!==null?(za(),n.memoizedState={dehydrated:w,treeContext:Qa!==null?{id:vs,overflow:Ss}:null,retryLane:536870912,hydrationErrors:null},C=b(18,null,null,de),C.stateNode=w,C.return=n,n.child=C,yn=n,Se=null,w=!0):w=!1,w=!w}w&&(Pp(n,E),Ba(n))}if(E=n.memoizedState,E!==null&&(E=E.dehydrated,E!==null))return rg(E)?n.lanes=32:n.lanes=536870912,null;cs(n)}return E=d.children,d=d.fallback,f?(Ys(n),f=n.mode,E=Ed({mode:"hidden",children:E},f),d=Pa(d,f,s,null),E.return=n,d.return=n,E.sibling=d,n.child=E,f=n.child,f.memoizedState=xm(s),f.childLanes=Cm(e,o,s),n.memoizedState=hy,d):(Xs(n),Rm(n,E))}var H=e.memoizedState;if(H!==null&&(E=H.dehydrated,E!==null)){if(v)n.flags&256?(Xs(n),n.flags&=-257,n=Dm(e,n,s)):n.memoizedState!==null?(Ys(n),n.child=e.child,n.flags|=128,n=null):(Ys(n),f=d.fallback,E=n.mode,d=Ed({mode:"visible",children:d.children},E),f=Pa(f,E,s,null),f.flags|=2,d.return=n,f.return=n,d.sibling=f,n.child=d,Ao(n,e.child,null,s),d=n.child,d.memoizedState=xm(s),d.childLanes=Cm(e,o,s),n.memoizedState=hy,n=f);else if(Xs(n),Xt&&console.error("We should not be hydrating here. This is a bug in React. Please file a bug."),rg(E)){if(o=E.nextSibling&&E.nextSibling.dataset,o){w=o.dgst;var V=o.msg;C=o.stck;var z=o.cstck}E=V,o=w,d=C,w=f=z,f=Error(E||"The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering."),f.stack=d||"",f.digest=o,o=w===void 0?null:w,d={value:f,source:null,stack:o},typeof o=="string"&&qg.set(f,d),wl(d),n=Dm(e,n,s)}else if($e||xl(e,n,s,!1),o=(s&e.childLanes)!==0,$e||o){if(o=ce,o!==null&&(d=s&-s,d=(d&42)!==0?1:hl(d),d=(d&(o.suspendedLanes|s))!==0?0:d,d!==0&&d!==H.retryLane))throw H.retryLane=d,xn(e,d),xe(o,e,d),rw;E.data===xs||jm(),n=Dm(e,n,s)}else E.data===xs?(n.flags|=192,n.child=e.child,n=null):(e=H.treeContext,Se=ti(E.nextSibling),yn=n,Xt=!0,Ka=null,Es=!1,ri=null,Vi=!1,e!==null&&(za(),si[ai++]=vs,si[ai++]=Ss,si[ai++]=Qa,vs=e.id,Ss=e.overflow,Qa=n),n=Rm(n,d.children),n.flags|=4096);return n}return f?(Ys(n),f=d.fallback,E=n.mode,w=e.child,C=w.sibling,d=rs(w,{mode:"hidden",children:d.children}),d.subtreeFlags=w.subtreeFlags&65011712,C!==null?f=rs(C,f):(f=Pa(f,E,s,null),f.flags|=2),f.return=n,d.return=n,d.sibling=f,n.child=d,d=f,f=n.child,E=e.child.memoizedState,E===null?E=xm(s):(w=E.cachePool,w!==null?(C=ze._currentValue,w=w.parent!==C?{parent:C,pool:C}:w):w=US(),E={baseLanes:E.baseLanes|s,cachePool:w}),f.memoizedState=E,f.childLanes=Cm(e,o,s),n.memoizedState=hy,d):(Xs(n),s=e.child,e=s.sibling,s=rs(s,{mode:"visible",children:d.children}),s.return=n,s.sibling=null,e!==null&&(o=n.deletions,o===null?(n.deletions=[e],n.flags|=16):o.push(e)),n.child=s,n.memoizedState=null,s)}function Rm(e,n){return n=Ed({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function Ed(e,n){return e=b(22,e,null,n),e.lanes=0,e.stateNode={_visibility:Wd,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function Dm(e,n,s){return Ao(n,e.child,null,s),e=Rm(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function PE(e,n,s){e.lanes|=n;var o=e.alternate;o!==null&&(o.lanes|=n),Up(e.return,n,s)}function UE(e,n){var s=Ze(e);return e=!s&&typeof j(e)=="function",s||e?(s=s?"array":"iterable",console.error("A nested %s was passed to row #%s in <SuspenseList />. Wrap it in an additional SuspenseList to configure its revealOrder: <SuspenseList revealOrder=...> ... <SuspenseList revealOrder=...>{%s}</SuspenseList> ... </SuspenseList>",s,n,s),!1):!0}function Mm(e,n,s,o,d){var f=e.memoizedState;f===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:o,tail:s,tailMode:d}:(f.isBackwards=n,f.rendering=null,f.renderingStartTime=0,f.last=o,f.tail=s,f.tailMode=d)}function zE(e,n,s){var o=n.pendingProps,d=o.revealOrder,f=o.tail;if(o=o.children,d!==void 0&&d!=="forwards"&&d!=="backwards"&&d!=="together"&&!dw[d])if(dw[d]=!0,typeof d=="string")switch(d.toLowerCase()){case"together":case"forwards":case"backwards":console.error('"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',d,d.toLowerCase());break;case"forward":case"backward":console.error('"%s" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.',d,d.toLowerCase());break;default:console.error('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',d)}else console.error('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',d);f===void 0||dy[f]||(f!=="collapsed"&&f!=="hidden"?(dy[f]=!0,console.error('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "collapsed" or "hidden"?',f)):d!=="forwards"&&d!=="backwards"&&(dy[f]=!0,console.error('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',f)));t:if((d==="forwards"||d==="backwards")&&o!==void 0&&o!==null&&o!==!1)if(Ze(o)){for(var v=0;v<o.length;v++)if(!UE(o[v],v))break t}else if(v=j(o),typeof v=="function"){if(v=v.call(o))for(var E=v.next(),w=0;!E.done;E=v.next()){if(!UE(E.value,w))break t;w++}}else console.error('A single row was passed to a <SuspenseList revealOrder="%s" />. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?',d);if(Qe(e,n,o,s),o=Be.current,(o&Sc)!==0)o=o&_o|Sc,n.flags|=128;else{if(e!==null&&(e.flags&128)!==0)t:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&PE(e,s,n);else if(e.tag===19)PE(e,s,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break t;for(;e.sibling===null;){if(e.return===null||e.return===n)break t;e=e.return}e.sibling.return=e.return,e=e.sibling}o&=_o}switch(lt(Be,o,n),d){case"forwards":for(s=n.child,d=null;s!==null;)e=s.alternate,e!==null&&bd(e)===null&&(d=s),s=s.sibling;s=d,s===null?(d=n.child,n.child=null):(d=s.sibling,s.sibling=null),Mm(n,!1,d,s,f);break;case"backwards":for(s=null,d=n.child,n.child=null;d!==null;){if(e=d.alternate,e!==null&&bd(e)===null){n.child=d;break}e=d.sibling,d.sibling=s,s=d,d=e}Mm(n,!0,s,null,f);break;case"together":Mm(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function us(e,n,s){if(e!==null&&(n.dependencies=e.dependencies),Mn=-1,ca|=n.lanes,(s&n.childLanes)===0)if(e!==null){if(xl(e,n,s,!1),(s&n.childLanes)===0)return null}else return null;if(e!==null&&n.child!==e.child)throw Error("Resuming work not yet implemented.");if(n.child!==null){for(e=n.child,s=rs(e,e.pendingProps),n.child=s,s.return=n;e.sibling!==null;)e=e.sibling,s=s.sibling=rs(e,e.pendingProps),s.return=n;s.sibling=null}return n.child}function Om(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&Qu(e)))}function Pk(e,n,s){switch(n.tag){case 3:bt(n,n.stateNode.containerInfo),$s(n,ze,e.memoizedState.cache),Tl();break;case 27:case 5:Q(n);break;case 4:bt(n,n.stateNode.containerInfo);break;case 10:$s(n,n.type,n.memoizedProps.value);break;case 12:(s&n.childLanes)!==0&&(n.flags|=4),n.flags|=2048;var o=n.stateNode;o.effectDuration=-0,o.passiveEffectDuration=-0;break;case 13:if(o=n.memoizedState,o!==null)return o.dehydrated!==null?(Xs(n),n.flags|=128,null):(s&n.child.childLanes)!==0?IE(e,n,s):(Xs(n),e=us(e,n,s),e!==null?e.sibling:null);Xs(n);break;case 19:var d=(e.flags&128)!==0;if(o=(s&n.childLanes)!==0,o||(xl(e,n,s,!1),o=(s&n.childLanes)!==0),d){if(o)return zE(e,n,s);n.flags|=128}if(d=n.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),lt(Be,Be.current,n),o)break;return null;case 22:case 23:return n.lanes=0,ME(e,n,s);case 24:$s(n,ze,e.memoizedState.cache)}return us(e,n,s)}function km(e,n,s){if(n._debugNeedsRemount&&e!==null){s=Op(n.type,n.key,n.pendingProps,n._debugOwner||null,n.mode,n.lanes),s._debugStack=n._debugStack,s._debugTask=n._debugTask;var o=n.return;if(o===null)throw Error("Cannot swap the root fiber.");if(e.alternate=null,n.alternate=null,s.index=n.index,s.sibling=n.sibling,s.return=n.return,s.ref=n.ref,s._debugInfo=n._debugInfo,n===o.child)o.child=s;else{var d=o.child;if(d===null)throw Error("Expected parent to have a child.");for(;d.sibling!==n;)if(d=d.sibling,d===null)throw Error("Expected to find the previous sibling.");d.sibling=s}return n=o.deletions,n===null?(o.deletions=[e],o.flags|=16):n.push(e),s.flags|=2,s}if(e!==null)if(e.memoizedProps!==n.pendingProps||n.type!==e.type)$e=!0;else{if(!Om(e,s)&&(n.flags&128)===0)return $e=!1,Pk(e,n,s);$e=(e.flags&131072)!==0}else $e=!1,(o=Xt)&&(za(),o=(n.flags&1048576)!==0),o&&(o=n.index,za(),DS(n,Kd,o));switch(n.lanes=0,n.tag){case 16:t:if(o=n.pendingProps,e=oa(n.elementType),n.type=e,typeof e=="function")Mp(e)?(o=qa(e,o),n.tag=1,n.type=e=Ia(e),n=NE(null,n,e,o,s)):(n.tag=0,wm(n,e),n.type=e=Ia(e),n=Tm(null,n,e,o,s));else{if(e!=null){if(d=e.$$typeof,d===Ql){n.tag=11,n.type=e=Rp(e),n=CE(null,n,e,o,s);break t}else if(d===zd){n.tag=14,n=RE(null,n,e,o,s);break t}}throw n="",e!==null&&typeof e=="object"&&e.$$typeof===jn&&(n=" Did you wrap a component in React.lazy() more than once?"),e=F(e)||e,Error("Element type is invalid. Received a promise that resolves to: "+e+". Lazy element type must resolve to a class or function."+n)}return n;case 0:return Tm(e,n,n.type,n.pendingProps,s);case 1:return o=n.type,d=qa(o,n.pendingProps),NE(e,n,o,d,s);case 3:t:{if(bt(n,n.stateNode.containerInfo),e===null)throw Error("Should have a current fiber. This is a bug in React.");o=n.pendingProps;var f=n.memoizedState;d=f.element,Gp(e,n),Ol(n,o,null,s);var v=n.memoizedState;if(o=v.cache,$s(n,ze,o),o!==f.cache&&zp(n,[ze],s,!0),Ml(),o=v.element,f.isDehydrated)if(f={element:o,isDehydrated:!1,cache:v.cache},n.updateQueue.baseState=f,n.memoizedState=f,n.flags&256){n=LE(e,n,o,s);break t}else if(o!==d){d=zn(Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),n),wl(d),n=LE(e,n,o,s);break t}else{switch(e=n.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Se=ti(e.firstChild),yn=n,Xt=!0,Ka=null,Es=!1,ri=null,Vi=!0,e=YT(n,null,o,s),n.child=e;e;)e.flags=e.flags&-3|4096,e=e.sibling}else{if(Tl(),o===d){n=us(e,n,s);break t}Qe(e,n,o,s)}n=n.child}return n;case 26:return Sd(e,n),e===null?(e=i_(n.type,null,n.pendingProps,null))?n.memoizedState=e:Xt||(e=n.type,s=n.pendingProps,o=Et(ta.current),o=Dd(o).createElement(e),o[rn]=n,o[Dn]=s,Ke(o,e,s),P(o),n.stateNode=o):n.memoizedState=i_(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return Q(n),e===null&&Xt&&(o=Et(ta.current),d=B(),o=n.stateNode=e_(n.type,n.pendingProps,o,d,!1),Es||(d=qA(o,n.type,n.pendingProps,d),d!==null&&(Ha(n,0).serverProps=d)),yn=n,Vi=!0,d=Se,Ks(n.type)?(Iy=d,Se=ti(o.firstChild)):Se=d),Qe(e,n,n.pendingProps.children,s),Sd(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&Xt&&(f=B(),o=_p(n.type,f.ancestorInfo),d=Se,(v=!d)||(v=vN(d,n.type,n.pendingProps,Vi),v!==null?(n.stateNode=v,Es||(f=qA(v,n.type,n.pendingProps,f),f!==null&&(Ha(n,0).serverProps=f)),yn=n,Se=ti(v.firstChild),Vi=!1,f=!0):f=!1,v=!f),v&&(o&&Pp(n,d),Ba(n))),Q(n),d=n.type,f=n.pendingProps,v=e!==null?e.memoizedProps:null,o=f.children,sg(d,f)?o=null:v!==null&&sg(d,v)&&(n.flags|=32),n.memoizedState!==null&&(d=Yp(e,n,Mk,null,null,s),Ic._currentValue=d),Sd(e,n),Qe(e,n,o,s),n.child;case 6:return e===null&&Xt&&(e=n.pendingProps,s=B(),o=s.ancestorInfo.current,e=o!=null?Fu(e,o.tag,s.ancestorInfo.implicitRootScope):!0,s=Se,(o=!s)||(o=SN(s,n.pendingProps,Vi),o!==null?(n.stateNode=o,yn=n,Se=null,o=!0):o=!1,o=!o),o&&(e&&Pp(n,s),Ba(n))),null;case 13:return IE(e,n,s);case 4:return bt(n,n.stateNode.containerInfo),o=n.pendingProps,e===null?n.child=Ao(n,null,o,s):Qe(e,n,o,s),n.child;case 11:return CE(e,n,n.type,n.pendingProps,s);case 7:return Qe(e,n,n.pendingProps,s),n.child;case 8:return Qe(e,n,n.pendingProps.children,s),n.child;case 12:return n.flags|=4,n.flags|=2048,o=n.stateNode,o.effectDuration=-0,o.passiveEffectDuration=-0,Qe(e,n,n.pendingProps.children,s),n.child;case 10:return o=n.type,d=n.pendingProps,f=d.value,"value"in d||hw||(hw=!0,console.error("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?")),$s(n,o,f),Qe(e,n,d.children,s),n.child;case 9:return d=n.type._context,o=n.pendingProps.children,typeof o!="function"&&console.error("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."),Fa(n),d=pe(d),ve(n),o=ay(o,d,void 0),Ye(),n.flags|=1,Qe(e,n,o,s),n.child;case 14:return RE(e,n,n.type,n.pendingProps,s);case 15:return DE(e,n,n.type,n.pendingProps,s);case 19:return zE(e,n,s);case 31:return o=n.pendingProps,s=n.mode,o={mode:o.mode,children:o.children},e===null?(e=Ed(o,s),e.ref=n.ref,n.child=e,e.return=n,n=e):(e=rs(e.child,o),e.ref=n.ref,n.child=e,e.return=n,n=e),n;case 22:return ME(e,n,s);case 24:return Fa(n),o=pe(ze),e===null?(d=jp(),d===null&&(d=ce,f=Hp(),d.pooledCache=f,ja(f),f!==null&&(d.pooledCacheLanes|=s),d=f),n.memoizedState={parent:o,cache:d},$p(n),$s(n,ze,d)):((e.lanes&s)!==0&&(Gp(e,n),Ol(n,null,null,s),Ml()),d=e.memoizedState,f=n.memoizedState,d.parent!==o?(d={parent:o,cache:o},n.memoizedState=d,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=d),$s(n,ze,o)):(o=f.cache,$s(n,ze,o),o!==d.cache&&zp(n,[ze],s,!0))),Qe(e,n,n.pendingProps.children,s),n.child;case 29:throw n.pendingProps}throw Error("Unknown unit of work tag ("+n.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function ds(e){e.flags|=4}function HE(e,n){if(n.type!=="stylesheet"||(n.state.loading&di)!==hr)e.flags&=-16777217;else if(e.flags|=16777216,!l_(n)){if(n=ui.current,n!==null&&((Bt&4194048)===Bt?Xi!==null:(Bt&62914560)!==Bt&&(Bt&536870912)===0||n!==Xi))throw gc=Zg,AT;e.flags|=8192}}function Ad(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?Oa():536870912,e.lanes|=n,rr|=n)}function Pl(e,n){if(!Xt)switch(e.tailMode){case"hidden":n=e.tail;for(var s=null;n!==null;)n.alternate!==null&&(s=n),n=n.sibling;s===null?e.tail=null:s.sibling=null;break;case"collapsed":s=e.tail;for(var o=null;s!==null;)s.alternate!==null&&(o=s),s=s.sibling;o===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function me(e){var n=e.alternate!==null&&e.alternate.child===e.child,s=0,o=0;if(n)if((e.mode&Je)!==de){for(var d=e.selfBaseDuration,f=e.child;f!==null;)s|=f.lanes|f.childLanes,o|=f.subtreeFlags&65011712,o|=f.flags&65011712,d+=f.treeBaseDuration,f=f.sibling;e.treeBaseDuration=d}else for(d=e.child;d!==null;)s|=d.lanes|d.childLanes,o|=d.subtreeFlags&65011712,o|=d.flags&65011712,d.return=e,d=d.sibling;else if((e.mode&Je)!==de){d=e.actualDuration,f=e.selfBaseDuration;for(var v=e.child;v!==null;)s|=v.lanes|v.childLanes,o|=v.subtreeFlags,o|=v.flags,d+=v.actualDuration,f+=v.treeBaseDuration,v=v.sibling;e.actualDuration=d,e.treeBaseDuration=f}else for(d=e.child;d!==null;)s|=d.lanes|d.childLanes,o|=d.subtreeFlags,o|=d.flags,d.return=e,d=d.sibling;return e.subtreeFlags|=o,e.childLanes=s,n}function Uk(e,n,s){var o=n.pendingProps;switch(Ip(n),n.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return me(n),null;case 1:return me(n),null;case 3:return s=n.stateNode,o=null,e!==null&&(o=e.memoizedState.cache),n.memoizedState.cache!==o&&(n.flags|=2048),os(ze,n),Gt(n),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(e===null||e.child===null)&&(_l(n)?(NS(),ds(n)):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,kS())),me(n),null;case 26:return s=n.memoizedState,e===null?(ds(n),s!==null?(me(n),HE(n,s)):(me(n),n.flags&=-16777217)):s?s!==e.memoizedState?(ds(n),me(n),HE(n,s)):(me(n),n.flags&=-16777217):(e.memoizedProps!==o&&ds(n),me(n),n.flags&=-16777217),null;case 27:dt(n),s=Et(ta.current);var d=n.type;if(e!==null&&n.stateNode!=null)e.memoizedProps!==o&&ds(n);else{if(!o){if(n.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return me(n),null}e=B(),_l(n)?MS(n):(e=e_(d,o,s,e,!0),n.stateNode=e,ds(n))}return me(n),null;case 5:if(dt(n),s=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==o&&ds(n);else{if(!o){if(n.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return me(n),null}if(d=B(),_l(n))MS(n);else{switch(e=Et(ta.current),_p(s,d.ancestorInfo),d=d.context,e=Dd(e),d){case Lo:e=e.createElementNS(no,s);break;case Th:e=e.createElementNS(Gd,s);break;default:switch(s){case"svg":e=e.createElementNS(no,s);break;case"math":e=e.createElementNS(Gd,s);break;case"script":e=e.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof o.is=="string"?e.createElement("select",{is:o.is}):e.createElement("select"),o.multiple?e.multiple=!0:o.size&&(e.size=o.size);break;default:e=typeof o.is=="string"?e.createElement(s,{is:o.is}):e.createElement(s),s.indexOf("-")===-1&&(s!==s.toLowerCase()&&console.error("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",s),Object.prototype.toString.call(e)!=="[object HTMLUnknownElement]"||gs.call(Ow,s)||(Ow[s]=!0,console.error("The tag <%s> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.",s)))}}e[rn]=n,e[Dn]=o;t:for(d=n.child;d!==null;){if(d.tag===5||d.tag===6)e.appendChild(d.stateNode);else if(d.tag!==4&&d.tag!==27&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===n)break t;for(;d.sibling===null;){if(d.return===null||d.return===n)break t;d=d.return}d.sibling.return=d.return,d=d.sibling}n.stateNode=e;t:switch(Ke(e,s,o),s){case"button":case"input":case"select":case"textarea":e=!!o.autoFocus;break t;case"img":e=!0;break t;default:e=!1}e&&ds(n)}}return me(n),n.flags&=-16777217,null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==o&&ds(n);else{if(typeof o!="string"&&n.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");if(e=Et(ta.current),s=B(),_l(n)){e=n.stateNode,s=n.memoizedProps,d=!Es,o=null;var f=yn;if(f!==null)switch(f.tag){case 3:d&&(d=ZA(e,s,o),d!==null&&(Ha(n,0).serverProps=d));break;case 27:case 5:o=f.memoizedProps,d&&(d=ZA(e,s,o),d!==null&&(Ha(n,0).serverProps=d))}e[rn]=n,e=!!(e.nodeValue===s||o!==null&&o.suppressHydrationWarning===!0||FA(e.nodeValue,s)),e||Ba(n)}else d=s.ancestorInfo.current,d!=null&&Fu(o,d.tag,s.ancestorInfo.implicitRootScope),e=Dd(e).createTextNode(o),e[rn]=n,n.stateNode=e}return me(n),null;case 13:if(o=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(d=_l(n),o!==null&&o.dehydrated!==null){if(e===null){if(!d)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(d=n.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");d[rn]=n,me(n),(n.mode&Je)!==de&&o!==null&&(d=n.child,d!==null&&(n.treeBaseDuration-=d.treeBaseDuration))}else NS(),Tl(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4,me(n),(n.mode&Je)!==de&&o!==null&&(d=n.child,d!==null&&(n.treeBaseDuration-=d.treeBaseDuration));d=!1}else d=kS(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=d),d=!0;if(!d)return n.flags&256?(cs(n),n):(cs(n),null)}return cs(n),(n.flags&128)!==0?(n.lanes=s,(n.mode&Je)!==de&&Ju(n),n):(s=o!==null,e=e!==null&&e.memoizedState!==null,s&&(o=n.child,d=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(d=o.alternate.memoizedState.cachePool.pool),f=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(f=o.memoizedState.cachePool.pool),f!==d&&(o.flags|=2048)),s!==e&&s&&(n.child.flags|=8192),Ad(n,n.updateQueue),me(n),(n.mode&Je)!==de&&s&&(e=n.child,e!==null&&(n.treeBaseDuration-=e.treeBaseDuration)),null);case 4:return Gt(n),e===null&&Km(n.stateNode.containerInfo),me(n),null;case 10:return os(n.type,n),me(n),null;case 19:if(K(Be,n),d=n.memoizedState,d===null)return me(n),null;if(o=(n.flags&128)!==0,f=d.rendering,f===null)if(o)Pl(d,!1);else{if(Ee!==ws||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(f=bd(e),f!==null){for(n.flags|=128,Pl(d,!1),e=f.updateQueue,n.updateQueue=e,Ad(n,e),n.subtreeFlags=0,e=s,s=n.child;s!==null;)RS(s,e),s=s.sibling;return lt(Be,Be.current&_o|Sc,n),n.child}e=e.sibling}d.tail!==null&&Bi()>hh&&(n.flags|=128,o=!0,Pl(d,!1),n.lanes=4194304)}else{if(!o)if(e=bd(f),e!==null){if(n.flags|=128,o=!0,e=e.updateQueue,n.updateQueue=e,Ad(n,e),Pl(d,!0),d.tail===null&&d.tailMode==="hidden"&&!f.alternate&&!Xt)return me(n),null}else 2*Bi()-d.renderingStartTime>hh&&s!==536870912&&(n.flags|=128,o=!0,Pl(d,!1),n.lanes=4194304);d.isBackwards?(f.sibling=n.child,n.child=f):(e=d.last,e!==null?e.sibling=f:n.child=f,d.last=f)}return d.tail!==null?(e=d.tail,d.rendering=e,d.tail=e.sibling,d.renderingStartTime=Bi(),e.sibling=null,s=Be.current,s=o?s&_o|Sc:s&_o,lt(Be,s,n),e):(me(n),null);case 22:case 23:return cs(n),qp(n),o=n.memoizedState!==null,e!==null?e.memoizedState!==null!==o&&(n.flags|=8192):o&&(n.flags|=8192),o?(s&536870912)!==0&&(n.flags&128)===0&&(me(n),n.subtreeFlags&6&&(n.flags|=8192)):me(n),s=n.updateQueue,s!==null&&Ad(n,s.retryQueue),s=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),o=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),o!==s&&(n.flags|=2048),e!==null&&K(tr,n),null;case 24:return s=null,e!==null&&(s=e.memoizedState.cache),n.memoizedState.cache!==s&&(n.flags|=2048),os(ze,n),me(n),null;case 25:return null;case 30:return null}throw Error("Unknown unit of work tag ("+n.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function zk(e,n){switch(Ip(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,(n.mode&Je)!==de&&Ju(n),n):null;case 3:return os(ze,n),Gt(n),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return dt(n),null;case 13:if(cs(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");Tl()}return e=n.flags,e&65536?(n.flags=e&-65537|128,(n.mode&Je)!==de&&Ju(n),n):null;case 19:return K(Be,n),null;case 4:return Gt(n),null;case 10:return os(n.type,n),null;case 22:case 23:return cs(n),qp(n),e!==null&&K(tr,n),e=n.flags,e&65536?(n.flags=e&-65537|128,(n.mode&Je)!==de&&Ju(n),n):null;case 24:return os(ze,n),null;case 25:return null;default:return null}}function BE(e,n){switch(Ip(n),n.tag){case 3:os(ze,n),Gt(n);break;case 26:case 27:case 5:dt(n);break;case 4:Gt(n);break;case 13:cs(n);break;case 19:K(Be,n);break;case 10:os(n.type,n);break;case 22:case 23:cs(n),qp(n),e!==null&&K(tr,n);break;case 24:os(ze,n)}}function Li(e){return(e.mode&Je)!==de}function FE(e,n){Li(e)?(Ni(),Ul(n,e),ki()):Ul(n,e)}function Nm(e,n,s){Li(e)?(Ni(),jr(s,e,n),ki()):jr(s,e,n)}function Ul(e,n){try{var s=n.updateQueue,o=s!==null?s.lastEffect:null;if(o!==null){var d=o.next;s=d;do{if((s.tag&e)===e&&((e&He)!==oi?rt!==null&&typeof rt.markComponentPassiveEffectMountStarted=="function"&&rt.markComponentPassiveEffectMountStarted(n):(e&tn)!==oi&&rt!==null&&typeof rt.markComponentLayoutEffectMountStarted=="function"&&rt.markComponentLayoutEffectMountStarted(n),o=void 0,(e&bn)!==oi&&(ko=!0),o=pt(n,iI,s),(e&bn)!==oi&&(ko=!1),(e&He)!==oi?rt!==null&&typeof rt.markComponentPassiveEffectMountStopped=="function"&&rt.markComponentPassiveEffectMountStopped():(e&tn)!==oi&&rt!==null&&typeof rt.markComponentLayoutEffectMountStopped=="function"&&rt.markComponentLayoutEffectMountStopped(),o!==void 0&&typeof o!="function")){var f=void 0;f=(s.tag&tn)!==0?"useLayoutEffect":(s.tag&bn)!==0?"useInsertionEffect":"useEffect";var v=void 0;v=o===null?" You returned null. If your effect does not require clean up, return undefined (or nothing).":typeof o.then=="function"?`
186
186
 
187
187
  It looks like you wrote `+f+`(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:
188
188
 
@@ -195,11 +195,11 @@ It looks like you wrote `+f+`(async () => ...) or returned a Promise. Instead, w
195
195
  fetchData();
196
196
  }, [someId]); // Or [] if effect doesn't need props or state
197
197
 
198
- Learn more about data fetching with Hooks: https://react.dev/link/hooks-data-fetching`:" You returned: "+o,pt(n,function(E,w){console.error("%s must not return anything besides a function, which is used for clean-up.%s",E,w)},f,v)}s=s.next}while(s!==d)}}catch(E){se(n,n.return,E)}}function jr(e,n,s){try{var o=n.updateQueue,d=o!==null?o.lastEffect:null;if(d!==null){var f=d.next;o=f;do{if((o.tag&e)===e){var v=o.inst,E=v.destroy;E!==void 0&&(v.destroy=void 0,(e&He)!==oi?rt!==null&&typeof rt.markComponentPassiveEffectUnmountStarted=="function"&&rt.markComponentPassiveEffectUnmountStarted(n):(e&tn)!==oi&&rt!==null&&typeof rt.markComponentLayoutEffectUnmountStarted=="function"&&rt.markComponentLayoutEffectUnmountStarted(n),(e&bn)!==oi&&(ko=!0),d=n,pt(d,aI,d,s,E),(e&bn)!==oi&&(ko=!1),(e&He)!==oi?rt!==null&&typeof rt.markComponentPassiveEffectUnmountStopped=="function"&&rt.markComponentPassiveEffectUnmountStopped():(e&tn)!==oi&&rt!==null&&typeof rt.markComponentLayoutEffectUnmountStopped=="function"&&rt.markComponentLayoutEffectUnmountStopped())}o=o.next}while(o!==f)}}catch(w){se(n,n.return,w)}}function $E(e,n){Li(e)?(Ni(),Ul(n,e),ki()):Ul(n,e)}function Im(e,n,s){Li(e)?(Ni(),jr(s,e,n),ki()):jr(s,e,n)}function GE(e){var n=e.updateQueue;if(n!==null){var s=e.stateNode;e.type.defaultProps||"ref"in e.memoizedProps||wo||(s.props!==e.memoizedProps&&console.error("Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",X(e)||"instance"),s.state!==e.memoizedState&&console.error("Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",X(e)||"instance"));try{pt(e,VS,n,s)}catch(o){se(e,e.return,o)}}}function Bk(e,n,s){return e.getSnapshotBeforeUpdate(n,s)}function Fk(e,n){var s=n.memoizedProps,o=n.memoizedState;n=e.stateNode,e.type.defaultProps||"ref"in e.memoizedProps||wo||(n.props!==e.memoizedProps&&console.error("Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",X(e)||"instance"),n.state!==e.memoizedState&&console.error("Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",X(e)||"instance"));try{var d=qa(e.type,s,e.elementType===e.type),f=pt(e,Bk,n,d,o);s=pw,f!==void 0||s.has(e.type)||(s.add(e.type),pt(e,function(){console.error("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",X(e))})),n.__reactInternalSnapshotBeforeUpdate=f}catch(v){se(e,e.return,v)}}function VE(e,n,s){s.props=qa(e.type,e.memoizedProps),s.state=e.memoizedState,Li(e)?(Ni(),pt(e,FT,e,n,s),ki()):pt(e,FT,e,n,s)}function jk(e){var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var s=e.stateNode;break;case 30:s=e.stateNode;break;default:s=e.stateNode}if(typeof n=="function")if(Li(e))try{Ni(),e.refCleanup=n(s)}finally{ki()}else e.refCleanup=n(s);else typeof n=="string"?console.error("String refs are no longer supported."):n.hasOwnProperty("current")||console.error("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",X(e)),n.current=s}}function zl(e,n){try{pt(e,jk,e)}catch(s){se(e,n,s)}}function Ii(e,n){var s=e.ref,o=e.refCleanup;if(s!==null)if(typeof o=="function")try{if(Li(e))try{Ni(),pt(e,o)}finally{ki(e)}else pt(e,o)}catch(d){se(e,n,d)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof s=="function")try{if(Li(e))try{Ni(),pt(e,s,null)}finally{ki(e)}else pt(e,s,null)}catch(d){se(e,n,d)}else s.current=null}function qE(e,n,s,o){var d=e.memoizedProps,f=d.id,v=d.onCommit;d=d.onRender,n=n===null?"mount":"update",Jd&&(n="nested-update"),typeof d=="function"&&d(f,n,e.actualDuration,e.treeBaseDuration,e.actualStartTime,s),typeof v=="function"&&v(e.memoizedProps.id,n,o,s)}function $k(e,n,s,o){var d=e.memoizedProps;e=d.id,d=d.onPostCommit,n=n===null?"mount":"update",Jd&&(n="nested-update"),typeof d=="function"&&d(e,n,o,s)}function YE(e){var n=e.type,s=e.memoizedProps,o=e.stateNode;try{pt(e,dN,o,n,s,e)}catch(d){se(e,e.return,d)}}function Pm(e,n,s){try{pt(e,hN,e.stateNode,e.type,s,n,e)}catch(o){se(e,e.return,o)}}function XE(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ks(e.type)||e.tag===4}function Um(e){t:for(;;){for(;e.sibling===null;){if(e.return===null||XE(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Ks(e.type)||e.flags&2||e.child===null||e.tag===4)continue t;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function zm(e,n,s){var o=e.tag;if(o===5||o===6)e=e.stateNode,n?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(e,n):(n=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,n.appendChild(e),s=s._reactRootContainer,s!=null||n.onclick!==null||(n.onclick=xd));else if(o!==4&&(o===27&&Ks(e.type)&&(s=e.stateNode,n=null),e=e.child,e!==null))for(zm(e,n,s),e=e.sibling;e!==null;)zm(e,n,s),e=e.sibling}function Ad(e,n,s){var o=e.tag;if(o===5||o===6)e=e.stateNode,n?s.insertBefore(e,n):s.appendChild(e);else if(o!==4&&(o===27&&Ks(e.type)&&(s=e.stateNode),e=e.child,e!==null))for(Ad(e,n,s),e=e.sibling;e!==null;)Ad(e,n,s),e=e.sibling}function Gk(e){for(var n,s=e.return;s!==null;){if(XE(s)){n=s;break}s=s.return}if(n==null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");switch(n.tag){case 27:n=n.stateNode,s=Um(e),Ad(e,s,n);break;case 5:s=n.stateNode,n.flags&32&&(QA(s),n.flags&=-33),n=Um(e),Ad(e,n,s);break;case 3:case 4:n=n.stateNode.containerInfo,s=Um(e),zm(e,s,n);break;default:throw Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}}function WE(e){var n=e.stateNode,s=e.memoizedProps;try{pt(e,wN,e.type,s,n,e)}catch(o){se(e,e.return,o)}}function Vk(e,n){if(e=e.containerInfo,Ny=xh,e=TS(e),xp(e)){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else t:{s=(s=e.ownerDocument)&&s.defaultView||window;var o=s.getSelection&&s.getSelection();if(o&&o.rangeCount!==0){s=o.anchorNode;var d=o.anchorOffset,f=o.focusNode;o=o.focusOffset;try{s.nodeType,f.nodeType}catch{s=null;break t}var v=0,E=-1,w=-1,x=0,H=0,V=e,z=null;e:for(;;){for(var q;V!==s||d!==0&&V.nodeType!==3||(E=v+d),V!==f||o!==0&&V.nodeType!==3||(w=v+o),V.nodeType===3&&(v+=V.nodeValue.length),(q=V.firstChild)!==null;)z=V,V=q;for(;;){if(V===e)break e;if(z===s&&++x===d&&(E=v),z===f&&++H===o&&(w=v),(q=V.nextSibling)!==null)break;V=z,z=V.parentNode}V=q}s=E===-1||w===-1?null:{start:E,end:w}}else s=null}s=s||{start:0,end:0}}else s=null;for(Ly={focusedElem:e,selectionRange:s},xh=!1,Ge=n;Ge!==null;)if(n=Ge,e=n.child,(n.subtreeFlags&1024)!==0&&e!==null)e.return=n,Ge=e;else for(;Ge!==null;){switch(e=n=Ge,s=e.alternate,d=e.flags,e.tag){case 0:break;case 11:case 15:break;case 1:(d&1024)!==0&&s!==null&&Fk(e,s);break;case 3:if((d&1024)!==0){if(e=e.stateNode.containerInfo,s=e.nodeType,s===9)rg(e);else if(s===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":rg(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((d&1024)!==0)throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}if(e=n.sibling,e!==null){e.return=n.return,Ge=e;break}Ge=n.return}}function QE(e,n,s){var o=s.flags;switch(s.tag){case 0:case 11:case 15:fs(e,s),o&4&&jE(s,tn|li);break;case 1:if(fs(e,s),o&4)if(e=s.stateNode,n===null)s.type.defaultProps||"ref"in s.memoizedProps||wo||(e.props!==s.memoizedProps&&console.error("Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",X(s)||"instance"),e.state!==s.memoizedState&&console.error("Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",X(s)||"instance")),Li(s)?(Ni(),pt(s,oy,s,e),ki()):pt(s,oy,s,e);else{var d=qa(s.type,n.memoizedProps);n=n.memoizedState,s.type.defaultProps||"ref"in s.memoizedProps||wo||(e.props!==s.memoizedProps&&console.error("Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",X(s)||"instance"),e.state!==s.memoizedState&&console.error("Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",X(s)||"instance")),Li(s)?(Ni(),pt(s,zT,s,e,d,n,e.__reactInternalSnapshotBeforeUpdate),ki()):pt(s,zT,s,e,d,n,e.__reactInternalSnapshotBeforeUpdate)}o&64&&GE(s),o&512&&zl(s,s.return);break;case 3:if(n=ls(),fs(e,s),o&64&&(o=s.updateQueue,o!==null)){if(d=null,s.child!==null)switch(s.child.tag){case 27:case 5:d=s.child.stateNode;break;case 1:d=s.child.stateNode}try{pt(s,VS,o,d)}catch(v){se(s,s.return,v)}}e.effectDuration+=Ku(n);break;case 27:n===null&&o&4&&WE(s);case 26:case 5:fs(e,s),n===null&&o&4&&YE(s),o&512&&zl(s,s.return);break;case 12:if(o&4){o=ls(),fs(e,s),e=s.stateNode,e.effectDuration+=Rl(o);try{pt(s,qE,s,n,Zd,e.effectDuration)}catch(v){se(s,s.return,v)}}else fs(e,s);break;case 13:fs(e,s),o&4&&JE(e,s),o&64&&(e=s.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(s=tN.bind(null,s),AN(e,s))));break;case 22:if(o=s.memoizedState!==null||Ts,!o){n=n!==null&&n.memoizedState!==null||xe,d=Ts;var f=xe;Ts=o,(xe=n)&&!f?ps(e,s,(s.subtreeFlags&8772)!==0):fs(e,s),Ts=d,xe=f}break;case 30:break;default:fs(e,s)}}function KE(e){var n=e.alternate;n!==null&&(e.alternate=null,KE(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&Fs(n)),e.stateNode=null,e._debugOwner=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function hs(e,n,s){for(s=s.child;s!==null;)ZE(e,n,s),s=s.sibling}function ZE(e,n,s){if(an&&typeof an.onCommitFiberUnmount=="function")try{an.onCommitFiberUnmount(to,s)}catch(f){Fi||(Fi=!0,console.error("React instrumentation encountered an error: %s",f))}switch(s.tag){case 26:xe||Ii(s,n),hs(e,n,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:xe||Ii(s,n);var o=Pe,d=On;Ks(s.type)&&(Pe=s.stateNode,On=!1),hs(e,n,s),pt(s,Vl,s.stateNode),Pe=o,On=d;break;case 5:xe||Ii(s,n);case 6:if(o=Pe,d=On,Pe=null,hs(e,n,s),Pe=o,On=d,Pe!==null)if(On)try{pt(s,mN,Pe,s.stateNode)}catch(f){se(s,n,f)}else try{pt(s,pN,Pe,s.stateNode)}catch(f){se(s,n,f)}break;case 18:Pe!==null&&(On?(e=Pe,KA(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,s.stateNode),Wl(e)):KA(Pe,s.stateNode));break;case 4:o=Pe,d=On,Pe=s.stateNode.containerInfo,On=!0,hs(e,n,s),Pe=o,On=d;break;case 0:case 11:case 14:case 15:xe||jr(bn,s,n),xe||Lm(s,n,tn),hs(e,n,s);break;case 1:xe||(Ii(s,n),o=s.stateNode,typeof o.componentWillUnmount=="function"&&VE(s,n,o)),hs(e,n,s);break;case 21:hs(e,n,s);break;case 22:xe=(o=xe)||s.memoizedState!==null,hs(e,n,s),xe=o;break;default:hs(e,n,s)}}function JE(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{pt(n,TN,e)}catch(s){se(n,n.return,s)}}function qk(e){switch(e.tag){case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new mw),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new mw),n;default:throw Error("Unexpected Suspense handler tag ("+e.tag+"). This is a bug in React.")}}function Hm(e,n){var s=qk(e);n.forEach(function(o){var d=eN.bind(null,e,o);if(!s.has(o)){if(s.add(o),Si)if(Co!==null&&xo!==null)jl(xo,Co);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");o.then(d,d)}})}function Hn(e,n){var s=n.deletions;if(s!==null)for(var o=0;o<s.length;o++){var d=e,f=n,v=s[o],E=f;t:for(;E!==null;){switch(E.tag){case 27:if(Ks(E.type)){Pe=E.stateNode,On=!1;break t}break;case 5:Pe=E.stateNode,On=!1;break t;case 3:case 4:Pe=E.stateNode.containerInfo,On=!0;break t}E=E.return}if(Pe===null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");ZE(d,f,v),Pe=null,On=!1,d=v,f=d.alternate,f!==null&&(f.return=null),d.return=null}if(n.subtreeFlags&13878)for(n=n.child;n!==null;)tA(n,e),n=n.sibling}function tA(e,n){var s=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Hn(n,e),Bn(e),o&4&&(jr(bn|li,e,e.return),Ul(bn|li,e),Lm(e,e.return,tn|li));break;case 1:Hn(n,e),Bn(e),o&512&&(xe||s===null||Ii(s,s.return)),o&64&&Ts&&(e=e.updateQueue,e!==null&&(o=e.callbacks,o!==null&&(s=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=s===null?o:s.concat(o))));break;case 26:var d=Ti;if(Hn(n,e),Bn(e),o&512&&(xe||s===null||Ii(s,s.return)),o&4)if(n=s!==null?s.memoizedState:null,o=e.memoizedState,s===null)if(o===null)if(e.stateNode===null){t:{o=e.type,s=e.memoizedProps,n=d.ownerDocument||d;e:switch(o){case"title":d=n.getElementsByTagName("title")[0],(!d||d[Zl]||d[rn]||d.namespaceURI===no||d.hasAttribute("itemprop"))&&(d=n.createElement(o),n.head.insertBefore(d,n.querySelector("head > title"))),Ke(d,o,s),d[rn]=e,P(d),o=d;break t;case"link":var f=o_("link","href",n).get(o+(s.href||""));if(f){for(var v=0;v<f.length;v++)if(d=f[v],d.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&d.getAttribute("rel")===(s.rel==null?null:s.rel)&&d.getAttribute("title")===(s.title==null?null:s.title)&&d.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){f.splice(v,1);break e}}d=n.createElement(o),Ke(d,o,s),n.head.appendChild(d);break;case"meta":if(f=o_("meta","content",n).get(o+(s.content||""))){for(v=0;v<f.length;v++)if(d=f[v],st(s.content,"content"),d.getAttribute("content")===(s.content==null?null:""+s.content)&&d.getAttribute("name")===(s.name==null?null:s.name)&&d.getAttribute("property")===(s.property==null?null:s.property)&&d.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&d.getAttribute("charset")===(s.charSet==null?null:s.charSet)){f.splice(v,1);break e}}d=n.createElement(o),Ke(d,o,s),n.head.appendChild(d);break;default:throw Error('getNodesForType encountered a type it did not expect: "'+o+'". This is a bug in React.')}d[rn]=e,P(d),o=d}e.stateNode=o}else l_(d,e.type,e.stateNode);else e.stateNode=r_(d,o,e.memoizedProps);else n!==o?(n===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):n.count--,o===null?l_(d,e.type,e.stateNode):r_(d,o,e.memoizedProps)):o===null&&e.stateNode!==null&&Pm(e,e.memoizedProps,s.memoizedProps);break;case 27:Hn(n,e),Bn(e),o&512&&(xe||s===null||Ii(s,s.return)),s!==null&&o&4&&Pm(e,e.memoizedProps,s.memoizedProps);break;case 5:if(Hn(n,e),Bn(e),o&512&&(xe||s===null||Ii(s,s.return)),e.flags&32){n=e.stateNode;try{pt(e,QA,n)}catch(H){se(e,e.return,H)}}o&4&&e.stateNode!=null&&(n=e.memoizedProps,Pm(e,n,s!==null?s.memoizedProps:n)),o&1024&&(py=!0,e.type!=="form"&&console.error("Unexpected host component type. Expected a form. This is a bug in React."));break;case 6:if(Hn(n,e),Bn(e),o&4){if(e.stateNode===null)throw Error("This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.");o=e.memoizedProps,s=s!==null?s.memoizedProps:o,n=e.stateNode;try{pt(e,fN,n,s,o)}catch(H){se(e,e.return,H)}}break;case 3:if(d=ls(),Th=null,f=Ti,Ti=Dd(n.containerInfo),Hn(n,e),Ti=f,Bn(e),o&4&&s!==null&&s.memoizedState.isDehydrated)try{pt(e,_N,n.containerInfo)}catch(H){se(e,e.return,H)}py&&(py=!1,eA(e)),n.effectDuration+=Ku(d);break;case 4:o=Ti,Ti=Dd(e.stateNode.containerInfo),Hn(n,e),Bn(e),Ti=o;break;case 12:o=ls(),Hn(n,e),Bn(e),e.stateNode.effectDuration+=Rl(o);break;case 13:Hn(n,e),Bn(e),e.child.flags&8192&&e.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(Sy=Bi()),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,Hm(e,o)));break;case 22:d=e.memoizedState!==null;var E=s!==null&&s.memoizedState!==null,w=Ts,x=xe;if(Ts=w||d,xe=x||E,Hn(n,e),xe=x,Ts=w,Bn(e),o&8192)t:for(n=e.stateNode,n._visibility=d?n._visibility&~Xd:n._visibility|Xd,d&&(s===null||E||Ts||xe||Ya(e)),s=null,n=e;;){if(n.tag===5||n.tag===26){if(s===null){E=s=n;try{f=E.stateNode,d?pt(E,gN,f):pt(E,bN,E.stateNode,E.memoizedProps)}catch(H){se(E,E.return,H)}}}else if(n.tag===6){if(s===null){E=n;try{v=E.stateNode,d?pt(E,yN,v):pt(E,vN,v,E.memoizedProps)}catch(H){se(E,E.return,H)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===e)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break t;for(;n.sibling===null;){if(n.return===null||n.return===e)break t;s===n&&(s=null),n=n.return}s===n&&(s=null),n.sibling.return=n.return,n=n.sibling}o&4&&(o=e.updateQueue,o!==null&&(s=o.retryQueue,s!==null&&(o.retryQueue=null,Hm(e,s))));break;case 19:Hn(n,e),Bn(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,Hm(e,o)));break;case 30:break;case 21:break;default:Hn(n,e),Bn(e)}}function Bn(e){var n=e.flags;if(n&2){try{pt(e,Gk,e)}catch(s){se(e,e.return,s)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function eA(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;eA(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function fs(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)QE(e,n.alternate,n),n=n.sibling}function nA(e){switch(e.tag){case 0:case 11:case 14:case 15:Lm(e,e.return,tn),Ya(e);break;case 1:Ii(e,e.return);var n=e.stateNode;typeof n.componentWillUnmount=="function"&&VE(e,e.return,n),Ya(e);break;case 27:pt(e,Vl,e.stateNode);case 26:case 5:Ii(e,e.return),Ya(e);break;case 22:e.memoizedState===null&&Ya(e);break;case 30:Ya(e);break;default:Ya(e)}}function Ya(e){for(e=e.child;e!==null;)nA(e),e=e.sibling}function iA(e,n,s,o){var d=s.flags;switch(s.tag){case 0:case 11:case 15:ps(e,s,o),jE(s,tn);break;case 1:if(ps(e,s,o),n=s.stateNode,typeof n.componentDidMount=="function"&&pt(s,oy,s,n),n=s.updateQueue,n!==null){e=s.stateNode;try{pt(s,Mk,n,e)}catch(f){se(s,s.return,f)}}o&&d&64&&GE(s),zl(s,s.return);break;case 27:WE(s);case 26:case 5:ps(e,s,o),o&&n===null&&d&4&&YE(s),zl(s,s.return);break;case 12:if(o&&d&4){d=ls(),ps(e,s,o),o=s.stateNode,o.effectDuration+=Rl(d);try{pt(s,qE,s,n,Zd,o.effectDuration)}catch(f){se(s,s.return,f)}}else ps(e,s,o);break;case 13:ps(e,s,o),o&&d&4&&JE(e,s);break;case 22:s.memoizedState===null&&ps(e,s,o),zl(s,s.return);break;case 30:break;default:ps(e,s,o)}}function ps(e,n,s){for(s=s&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;)iA(e,n.alternate,n,s),n=n.sibling}function Bm(e,n){var s=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),e=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(e=n.memoizedState.cachePool.pool),e!==s&&(e!=null&&ja(e),s!=null&&xl(s))}function Fm(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(ja(n),e!=null&&xl(e))}function Pi(e,n,s,o){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)sA(e,n,s,o),n=n.sibling}function sA(e,n,s,o){var d=n.flags;switch(n.tag){case 0:case 11:case 15:Pi(e,n,s,o),d&2048&&$E(n,He|li);break;case 1:Pi(e,n,s,o);break;case 3:var f=ls();Pi(e,n,s,o),d&2048&&(s=null,n.alternate!==null&&(s=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==s&&(ja(n),s!=null&&xl(s))),e.passiveEffectDuration+=Ku(f);break;case 12:if(d&2048){d=ls(),Pi(e,n,s,o),e=n.stateNode,e.passiveEffectDuration+=Rl(d);try{pt(n,$k,n,n.alternate,Zd,e.passiveEffectDuration)}catch(E){se(n,n.return,E)}}else Pi(e,n,s,o);break;case 13:Pi(e,n,s,o);break;case 23:break;case 22:f=n.stateNode;var v=n.alternate;n.memoizedState!==null?f._visibility&bs?Pi(e,n,s,o):Hl(e,n):f._visibility&bs?Pi(e,n,s,o):(f._visibility|=bs,$r(e,n,s,o,(n.subtreeFlags&10256)!==0)),d&2048&&Bm(v,n);break;case 24:Pi(e,n,s,o),d&2048&&Fm(n.alternate,n);break;default:Pi(e,n,s,o)}}function $r(e,n,s,o,d){for(d=d&&(n.subtreeFlags&10256)!==0,n=n.child;n!==null;)aA(e,n,s,o,d),n=n.sibling}function aA(e,n,s,o,d){var f=n.flags;switch(n.tag){case 0:case 11:case 15:$r(e,n,s,o,d),$E(n,He);break;case 23:break;case 22:var v=n.stateNode;n.memoizedState!==null?v._visibility&bs?$r(e,n,s,o,d):Hl(e,n):(v._visibility|=bs,$r(e,n,s,o,d)),d&&f&2048&&Bm(n.alternate,n);break;case 24:$r(e,n,s,o,d),d&&f&2048&&Fm(n.alternate,n);break;default:$r(e,n,s,o,d)}}function Hl(e,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var s=e,o=n,d=o.flags;switch(o.tag){case 22:Hl(s,o),d&2048&&Bm(o.alternate,o);break;case 24:Hl(s,o),d&2048&&Fm(o.alternate,o);break;default:Hl(s,o)}n=n.sibling}}function Gr(e){if(e.subtreeFlags&Ec)for(e=e.child;e!==null;)rA(e),e=e.sibling}function rA(e){switch(e.tag){case 26:Gr(e),e.flags&Ec&&e.memoizedState!==null&&DN(Ti,e.memoizedState,e.memoizedProps);break;case 5:Gr(e);break;case 3:case 4:var n=Ti;Ti=Dd(e.stateNode.containerInfo),Gr(e),Ti=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=Ec,Ec=16777216,Gr(e),Ec=n):Gr(e));break;default:Gr(e)}}function oA(e){var n=e.alternate;if(n!==null&&(e=n.child,e!==null)){n.child=null;do n=e.sibling,e.sibling=null,e=n;while(e!==null)}}function Bl(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var s=0;s<n.length;s++){var o=n[s];Ge=o,uA(o,e)}oA(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)lA(e),e=e.sibling}function lA(e){switch(e.tag){case 0:case 11:case 15:Bl(e),e.flags&2048&&Im(e,e.return,He|li);break;case 3:var n=ls();Bl(e),e.stateNode.passiveEffectDuration+=Ku(n);break;case 12:n=ls(),Bl(e),e.stateNode.passiveEffectDuration+=Rl(n);break;case 22:n=e.stateNode,e.memoizedState!==null&&n._visibility&bs&&(e.return===null||e.return.tag!==13)?(n._visibility&=~bs,_d(e)):Bl(e);break;default:Bl(e)}}function _d(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var s=0;s<n.length;s++){var o=n[s];Ge=o,uA(o,e)}oA(e)}for(e=e.child;e!==null;)cA(e),e=e.sibling}function cA(e){switch(e.tag){case 0:case 11:case 15:Im(e,e.return,He),_d(e);break;case 22:var n=e.stateNode;n._visibility&bs&&(n._visibility&=~bs,_d(e));break;default:_d(e)}}function uA(e,n){for(;Ge!==null;){var s=Ge,o=s;switch(o.tag){case 0:case 11:case 15:Im(o,n,He);break;case 23:case 22:o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(o=o.memoizedState.cachePool.pool,o!=null&&ja(o));break;case 24:xl(o.memoizedState.cache)}if(o=s.child,o!==null)o.return=s,Ge=o;else t:for(s=e;Ge!==null;){o=Ge;var d=o.sibling,f=o.return;if(KE(o),o===s){Ge=null;break t}if(d!==null){d.return=f,Ge=d;break t}Ge=f}}}function Yk(){oI.forEach(function(e){return e()})}function dA(){var e=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0;return e||G.actQueue===null||console.error("The current testing environment is not configured to support act(...)"),e}function Fn(e){if((te&vn)!==Gn&&Bt!==0)return Bt&-Bt;var n=G.T;return n!==null?(n._updatedFibers||(n._updatedFibers=new Set),n._updatedFibers.add(e),e=Ja,e!==0?e:Qm()):ml()}function hA(){qn===0&&(qn=(Bt&536870912)===0||Yt?Pt():536870912);var e=ui.current;return e!==null&&(e.flags|=32),qn}function Ce(e,n,s){if(ko&&console.error("useInsertionEffect must not schedule updates."),wy&&(hh=!0),(e===le&&(ee===sr||ee===ar)||e.cancelPendingCommit!==null)&&(qr(e,0),Ws(e,Bt,qn,!1)),Bs(e,s),(te&vn)!==0&&e===le){if($i)switch(n.tag){case 0:case 11:case 15:e=Ut&&X(Ut)||"Unknown",ww.has(e)||(ww.add(e),n=X(n)||"Unknown",console.error("Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://react.dev/link/setstate-in-render",n,e,e));break;case 1:Tw||(console.error("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),Tw=!0)}}else Si&&fl(e,n,s),iN(n),e===le&&((te&vn)===Gn&&(ua|=s),Se===ir&&Ws(e,Bt,qn,!1)),Ui(e)}function fA(e,n,s){if((te&(vn|wi))!==Gn)throw Error("Should not already be working.");var o=!s&&(n&124)===0&&(n&e.expiredLanes)===0||Hs(e,n),d=o?Wk(e,n):Gm(e,n,!0),f=o;do{if(d===ws){Mo&&!o&&Ws(e,n,0,!1);break}else{if(s=e.current.alternate,f&&!Xk(s)){d=Gm(e,n,!1),f=!1;continue}if(d===Ro){if(f=n,e.errorRecoveryDisabledLanes&f)var v=0;else v=e.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){n=v;t:{d=e;var E=v;v=xc;var w=d.current.memoizedState.isDehydrated;if(w&&(qr(d,E).flags|=256),E=Gm(d,E,!1),E!==Ro){if(by&&!w){d.errorRecoveryDisabledLanes|=f,ua|=f,d=ir;break t}d=Sn,Sn=v,d!==null&&(Sn===null?Sn=d:Sn.push.apply(Sn,d))}d=E}if(f=!1,d!==Ro)continue}}if(d===_c){qr(e,0),Ws(e,n,0,!0);break}t:{switch(o=e,d){case ws:case _c:throw Error("Root did not complete. This is a bug in React.");case ir:if((n&4194048)!==n)break;case ch:Ws(o,n,qn,!la);break t;case Ro:Sn=null;break;case my:case gw:break;default:throw Error("Unknown root exit status.")}if(G.actQueue!==null)Vm(o,s,n,Sn,Rc,uh,qn,ua,rr);else{if((n&62914560)===n&&(f=Sy+bw-Bi(),10<f)){if(Ws(o,n,qn,!la),ss(o,0,!0)!==0)break t;o.timeoutHandle=Nw(pA.bind(null,o,s,Sn,Rc,uh,n,qn,ua,rr,la,d,dI,ST,0),f);break t}pA(o,s,Sn,Rc,uh,n,qn,ua,rr,la,d,cI,ST,0)}}}break}while(!0);Ui(e)}function pA(e,n,s,o,d,f,v,E,w,x,H,V,z,q){if(e.timeoutHandle=dr,V=n.subtreeFlags,(V&8192||(V&16785408)===16785408)&&(Lc={stylesheets:null,count:0,unsuspend:RN},rA(n),V=MN(),V!==null)){e.cancelPendingCommit=V(Vm.bind(null,e,n,f,s,o,d,v,E,w,H,uI,z,q)),Ws(e,f,v,!x);return}Vm(e,n,f,s,o,d,v,E,w)}function Xk(e){for(var n=e;;){var s=n.tag;if((s===0||s===11||s===15)&&n.flags&16384&&(s=n.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var o=0;o<s.length;o++){var d=s[o],f=d.getSnapshot;d=d.value;try{if(!gn(f(),d))return!1}catch{return!1}}if(s=n.child,n.subtreeFlags&16384&&s!==null)s.return=n,n=s;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function Ws(e,n,s,o){n&=~vy,n&=~ua,e.suspendedLanes|=n,e.pingedLanes&=~n,o&&(e.warmLanes|=n),o=e.expirationTimes;for(var d=n;0<d;){var f=31-pn(d),v=1<<f;o[f]=-1,d&=~v}s!==0&&dl(e,s,n)}function Vr(){return(te&(vn|wi))===Gn?($l(0),!1):!0}function jm(){if(Ut!==null){if(ee===kn)var e=Ut.return;else e=Ut,Xu(),Jp(e),Eo=null,vc=0,e=Ut;for(;e!==null;)FE(e.alternate,e),e=e.return;Ut=null}}function qr(e,n){var s=e.timeoutHandle;s!==dr&&(e.timeoutHandle=dr,TI(s)),s=e.cancelPendingCommit,s!==null&&(e.cancelPendingCommit=null,s()),jm(),le=e,Ut=s=rs(e.current,null),Bt=n,ee=kn,Vn=null,la=!1,Mo=Hs(e,n),by=!1,Se=ws,rr=qn=vy=ua=ca=0,Sn=xc=null,uh=!1,(n&8)!==0&&(n|=n&32);var o=e.entangledLanes;if(o!==0)for(e=e.entanglements,o&=n;0<o;){var d=31-pn(o),f=1<<d;n|=e[d],o&=~f}return Xi=n,Gu(),n=bT(),1e3<n-yT&&(G.recentlyCreatedOwnerStacks=0,yT=n),Ai.discardPendingWarnings(),s}function mA(e,n){_t=null,G.H=oh,G.getCurrentStack=null,$i=!1,$n=null,n===mc||n===nh?(n=jS(),ee=wc):n===_T?(n=jS(),ee=yw):ee=n===ow?yy:n!==null&&typeof n=="object"&&typeof n.then=="function"?Do:Tc,Vn=n;var s=Ut;if(s===null)Se=_c,bd(e,zn(n,e.current));else switch(s.mode&Je&&jp(s),Xe(),ee){case Tc:rt!==null&&typeof rt.markComponentErrored=="function"&&rt.markComponentErrored(s,n,Bt);break;case sr:case ar:case wc:case Do:case Cc:rt!==null&&typeof rt.markComponentSuspended=="function"&&rt.markComponentSuspended(s,n,Bt)}}function gA(){var e=G.H;return G.H=oh,e===null?oh:e}function yA(){var e=G.A;return G.A=rI,e}function $m(){Se=ir,la||(Bt&4194048)!==Bt&&ui.current!==null||(Mo=!0),(ca&134217727)===0&&(ua&134217727)===0||le===null||Ws(le,Bt,qn,!1)}function Gm(e,n,s){var o=te;te|=vn;var d=gA(),f=yA();if(le!==e||Bt!==n){if(Si){var v=e.memoizedUpdaters;0<v.size&&(jl(e,Bt),v.clear()),pl(e,n)}Rc=null,qr(e,n)}Tn(n),n=!1,v=Se;t:do try{if(ee!==kn&&Ut!==null){var E=Ut,w=Vn;switch(ee){case yy:jm(),v=ch;break t;case wc:case sr:case ar:case Do:ui.current===null&&(n=!0);var x=ee;if(ee=kn,Vn=null,Yr(e,E,w,x),s&&Mo){v=ws;break t}break;default:x=ee,ee=kn,Vn=null,Yr(e,E,w,x)}}bA(),v=Se;break}catch(H){mA(e,H)}while(!0);return n&&e.shellSuspendCounter++,Xu(),te=o,G.H=d,G.A=f,mi(),Ut===null&&(le=null,Bt=0,Gu()),v}function bA(){for(;Ut!==null;)vA(Ut)}function Wk(e,n){var s=te;te|=vn;var o=gA(),d=yA();if(le!==e||Bt!==n){if(Si){var f=e.memoizedUpdaters;0<f.size&&(jl(e,Bt),f.clear()),pl(e,n)}Rc=null,dh=Bi()+vw,qr(e,n)}else Mo=Hs(e,n);Tn(n);t:do try{if(ee!==kn&&Ut!==null)e:switch(n=Ut,f=Vn,ee){case Tc:ee=kn,Vn=null,Yr(e,n,f,Tc);break;case sr:case ar:if(BS(f)){ee=kn,Vn=null,SA(n);break}n=function(){ee!==sr&&ee!==ar||le!==e||(ee=Cc),Ui(e)},f.then(n,n);break t;case wc:ee=Cc;break t;case yw:ee=gy;break t;case Cc:BS(f)?(ee=kn,Vn=null,SA(n)):(ee=kn,Vn=null,Yr(e,n,f,Cc));break;case gy:var v=null;switch(Ut.tag){case 26:v=Ut.memoizedState;case 5:case 27:var E=Ut;if(!v||c_(v)){ee=kn,Vn=null;var w=E.sibling;if(w!==null)Ut=w;else{var x=E.return;x!==null?(Ut=x,Td(x)):Ut=null}break e}break;default:console.error("Unexpected type of fiber triggered a suspensey commit. This is a bug in React.")}ee=kn,Vn=null,Yr(e,n,f,gy);break;case Do:ee=kn,Vn=null,Yr(e,n,f,Do);break;case yy:jm(),Se=ch;break t;default:throw Error("Unexpected SuspendedReason. This is a bug in React.")}G.actQueue!==null?bA():Qk();break}catch(H){mA(e,H)}while(!0);return Xu(),G.H=o,G.A=d,te=s,Ut!==null?(rt!==null&&typeof rt.markRenderYielded=="function"&&rt.markRenderYielded(),ws):(mi(),le=null,Bt=0,Gu(),Se)}function Qk(){for(;Ut!==null&&!qN();)vA(Ut)}function vA(e){var n=e.alternate;(e.mode&Je)!==ue?(Fp(e),n=pt(e,Nm,n,e,Xi),jp(e)):n=pt(e,Nm,n,e,Xi),e.memoizedProps=e.pendingProps,n===null?Td(e):Ut=n}function SA(e){var n=pt(e,Kk,e);e.memoizedProps=e.pendingProps,n===null?Td(e):Ut=n}function Kk(e){var n=e.alternate,s=(e.mode&Je)!==ue;switch(s&&Fp(e),e.tag){case 15:case 0:n=NE(n,e,e.pendingProps,e.type,void 0,Bt);break;case 11:n=NE(n,e,e.pendingProps,e.type.render,e.ref,Bt);break;case 5:Jp(e);default:FE(n,e),e=Ut=DS(e,Xi),n=Nm(n,e,Xi)}return s&&jp(e),n}function Yr(e,n,s,o){Xu(),Jp(n),Eo=null,vc=0;var d=n.return;try{if(Pk(e,d,n,s,Bt)){Se=_c,bd(e,zn(s,e.current)),Ut=null;return}}catch(f){if(d!==null)throw Ut=d,f;Se=_c,bd(e,zn(s,e.current)),Ut=null;return}n.flags&32768?(Yt||o===Tc?e=!0:Mo||(Bt&536870912)!==0?e=!1:(la=e=!0,(o===sr||o===ar||o===wc||o===Do)&&(o=ui.current,o!==null&&o.tag===13&&(o.flags|=16384))),EA(n,e)):Td(n)}function Td(e){var n=e;do{if((n.flags&32768)!==0){EA(n,la);return}var s=n.alternate;if(e=n.return,Fp(n),s=pt(n,zk,s,n,Xi),(n.mode&Je)!==ue&&PS(n),s!==null){Ut=s;return}if(n=n.sibling,n!==null){Ut=n;return}Ut=n=e}while(n!==null);Se===ws&&(Se=gw)}function EA(e,n){do{var s=Hk(e.alternate,e);if(s!==null){s.flags&=32767,Ut=s;return}if((e.mode&Je)!==ue){PS(e),s=e.actualDuration;for(var o=e.child;o!==null;)s+=o.actualDuration,o=o.sibling;e.actualDuration=s}if(s=e.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!n&&(e=e.sibling,e!==null)){Ut=e;return}Ut=e=s}while(e!==null);Se=ch,Ut=null}function Vm(e,n,s,o,d,f,v,E,w){e.cancelPendingCommit=null;do Fl();while(en!==or);if(Ai.flushLegacyContextWarning(),Ai.flushPendingUnsafeLifecycleWarnings(),(te&(vn|wi))!==Gn)throw Error("Should not already be working.");if(rt!==null&&typeof rt.markCommitStarted=="function"&&rt.markCommitStarted(s),n===null)Vt();else{if(s===0&&console.error("finishedLanes should not be empty during a commit. This is a bug in React."),n===e.current)throw Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");if(f=n.lanes|n.childLanes,f|=Xg,Lu(e,s,f,v,E,w),e===le&&(Ut=le=null,Bt=0),Oo=n,ha=e,fa=s,Ay=f,_y=d,_w=o,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,nN(Jr,function(){return CA(),null})):(e.callbackNode=null,e.callbackPriority=0),Zd=go(),o=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||o){o=G.T,G.T=null,d=Jt.p,Jt.p=ei,v=te,te|=wi;try{Vk(e,n,s)}finally{te=v,Jt.p=d,G.T=o}}en=Sw,AA(),_A(),TA()}}function AA(){if(en===Sw){en=or;var e=ha,n=Oo,s=fa,o=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||o){o=G.T,G.T=null;var d=Jt.p;Jt.p=ei;var f=te;te|=wi;try{Co=s,xo=e,tA(n,e),xo=Co=null,s=Ly;var v=TS(e.containerInfo),E=s.focusedElem,w=s.selectionRange;if(v!==E&&E&&E.ownerDocument&&_S(E.ownerDocument.documentElement,E)){if(w!==null&&xp(E)){var x=w.start,H=w.end;if(H===void 0&&(H=x),"selectionStart"in E)E.selectionStart=x,E.selectionEnd=Math.min(H,E.value.length);else{var V=E.ownerDocument||document,z=V&&V.defaultView||window;if(z.getSelection){var q=z.getSelection(),ct=E.textContent.length,At=Math.min(w.start,ct),ce=w.end===void 0?At:Math.min(w.end,ct);!q.extend&&At>ce&&(v=ce,ce=At,At=v);var jt=AS(E,At),D=AS(E,ce);if(jt&&D&&(q.rangeCount!==1||q.anchorNode!==jt.node||q.anchorOffset!==jt.offset||q.focusNode!==D.node||q.focusOffset!==D.offset)){var M=V.createRange();M.setStart(jt.node,jt.offset),q.removeAllRanges(),At>ce?(q.addRange(M),q.extend(D.node,D.offset)):(M.setEnd(D.node,D.offset),q.addRange(M))}}}}for(V=[],q=E;q=q.parentNode;)q.nodeType===1&&V.push({element:q,left:q.scrollLeft,top:q.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E<V.length;E++){var k=V[E];k.element.scrollLeft=k.left,k.element.scrollTop=k.top}}xh=!!Ny,Ly=Ny=null}finally{te=f,Jt.p=d,G.T=o}}e.current=n,en=Ew}}function _A(){if(en===Ew){en=or;var e=ha,n=Oo,s=fa,o=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||o){o=G.T,G.T=null;var d=Jt.p;Jt.p=ei;var f=te;te|=wi;try{rt!==null&&typeof rt.markLayoutEffectsStarted=="function"&&rt.markLayoutEffectsStarted(s),Co=s,xo=e,QE(e,n.alternate,n),xo=Co=null,rt!==null&&typeof rt.markLayoutEffectsStopped=="function"&&rt.markLayoutEffectsStopped()}finally{te=f,Jt.p=d,G.T=o}}en=Aw}}function TA(){if(en===hI||en===Aw){en=or,YN();var e=ha,n=Oo,s=fa,o=_w,d=(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0;d?en=Ey:(en=or,Oo=ha=null,wA(e,e.pendingLanes),lr=0,Mc=null);var f=e.pendingLanes;if(f===0&&(da=null),d||MA(e),d=Nr(s),n=n.stateNode,an&&typeof an.onCommitFiberRoot=="function")try{var v=(n.current.flags&128)===128;switch(d){case ei:var E=Cg;break;case ji:E=xg;break;case ys:E=Jr;break;case Fd:E=Rg;break;default:E=Jr}an.onCommitFiberRoot(to,n,E,v)}catch(V){Fi||(Fi=!0,console.error("React instrumentation encountered an error: %s",V))}if(Si&&e.memoizedUpdaters.clear(),Yk(),o!==null){v=G.T,E=Jt.p,Jt.p=ei,G.T=null;try{var w=e.onRecoverableError;for(n=0;n<o.length;n++){var x=o[n],H=Zk(x.stack);pt(x.source,w,x.value,H)}}finally{G.T=v,Jt.p=E}}(fa&3)!==0&&Fl(),Ui(e),f=e.pendingLanes,(s&4194090)!==0&&(f&42)!==0?(th=!0,e===Ty?Dc++:(Dc=0,Ty=e)):Dc=0,$l(0),Vt()}}function Zk(e){return e={componentStack:e},Object.defineProperty(e,"digest",{get:function(){console.error('You are accessing "digest" from the errorInfo object passed to onRecoverableError. This property is no longer provided as part of errorInfo but can be accessed as a property of the Error instance itself.')}}),e}function wA(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,xl(n)))}function Fl(e){return AA(),_A(),TA(),CA()}function CA(){if(en!==Ey)return!1;var e=ha,n=Ay;Ay=0;var s=Nr(fa),o=ys>s?ys:s;s=G.T;var d=Jt.p;try{Jt.p=o,G.T=null,o=_y,_y=null;var f=ha,v=fa;if(en=or,Oo=ha=null,fa=0,(te&(vn|wi))!==Gn)throw Error("Cannot flush passive effects while already rendering.");wy=!0,hh=!1,rt!==null&&typeof rt.markPassiveEffectsStarted=="function"&&rt.markPassiveEffectsStarted(v);var E=te;if(te|=wi,lA(f.current),sA(f,f.current,v,o),rt!==null&&typeof rt.markPassiveEffectsStopped=="function"&&rt.markPassiveEffectsStopped(),MA(f),te=E,$l(0,!1),hh?f===Mc?lr++:(lr=0,Mc=f):lr=0,hh=wy=!1,an&&typeof an.onPostCommitFiberRoot=="function")try{an.onPostCommitFiberRoot(to,f)}catch(x){Fi||(Fi=!0,console.error("React instrumentation encountered an error: %s",x))}var w=f.current.stateNode;return w.effectDuration=0,w.passiveEffectDuration=0,!0}finally{Jt.p=d,G.T=s,wA(e,n)}}function xA(e,n,s){n=zn(s,n),n=Am(e.stateNode,n,2),e=Vs(e,n,2),e!==null&&(Bs(e,2),Ui(e))}function se(e,n,s){if(ko=!1,e.tag===3)xA(e,e,s);else{for(;n!==null;){if(n.tag===3){xA(n,e,s);return}if(n.tag===1){var o=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(da===null||!da.has(o))){e=zn(s,e),s=_m(2),o=Vs(n,s,2),o!==null&&(Tm(s,o,n,e),Bs(o,2),Ui(o));return}}n=n.return}console.error(`Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React. Potential causes include deleting the same fiber more than once, committing an already-finished tree, or an inconsistent return pointer.
198
+ Learn more about data fetching with Hooks: https://react.dev/link/hooks-data-fetching`:" You returned: "+o,pt(n,function(E,w){console.error("%s must not return anything besides a function, which is used for clean-up.%s",E,w)},f,v)}s=s.next}while(s!==d)}}catch(E){se(n,n.return,E)}}function jr(e,n,s){try{var o=n.updateQueue,d=o!==null?o.lastEffect:null;if(d!==null){var f=d.next;o=f;do{if((o.tag&e)===e){var v=o.inst,E=v.destroy;E!==void 0&&(v.destroy=void 0,(e&He)!==oi?rt!==null&&typeof rt.markComponentPassiveEffectUnmountStarted=="function"&&rt.markComponentPassiveEffectUnmountStarted(n):(e&tn)!==oi&&rt!==null&&typeof rt.markComponentLayoutEffectUnmountStarted=="function"&&rt.markComponentLayoutEffectUnmountStarted(n),(e&bn)!==oi&&(ko=!0),d=n,pt(d,sI,d,s,E),(e&bn)!==oi&&(ko=!1),(e&He)!==oi?rt!==null&&typeof rt.markComponentPassiveEffectUnmountStopped=="function"&&rt.markComponentPassiveEffectUnmountStopped():(e&tn)!==oi&&rt!==null&&typeof rt.markComponentLayoutEffectUnmountStopped=="function"&&rt.markComponentLayoutEffectUnmountStopped())}o=o.next}while(o!==f)}}catch(w){se(n,n.return,w)}}function jE(e,n){Li(e)?(Ni(),Ul(n,e),ki()):Ul(n,e)}function Lm(e,n,s){Li(e)?(Ni(),jr(s,e,n),ki()):jr(s,e,n)}function $E(e){var n=e.updateQueue;if(n!==null){var s=e.stateNode;e.type.defaultProps||"ref"in e.memoizedProps||wo||(s.props!==e.memoizedProps&&console.error("Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",Y(e)||"instance"),s.state!==e.memoizedState&&console.error("Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",Y(e)||"instance"));try{pt(e,GS,n,s)}catch(o){se(e,e.return,o)}}}function Hk(e,n,s){return e.getSnapshotBeforeUpdate(n,s)}function Bk(e,n){var s=n.memoizedProps,o=n.memoizedState;n=e.stateNode,e.type.defaultProps||"ref"in e.memoizedProps||wo||(n.props!==e.memoizedProps&&console.error("Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",Y(e)||"instance"),n.state!==e.memoizedState&&console.error("Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",Y(e)||"instance"));try{var d=qa(e.type,s,e.elementType===e.type),f=pt(e,Hk,n,d,o);s=fw,f!==void 0||s.has(e.type)||(s.add(e.type),pt(e,function(){console.error("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",Y(e))})),n.__reactInternalSnapshotBeforeUpdate=f}catch(v){se(e,e.return,v)}}function GE(e,n,s){s.props=qa(e.type,e.memoizedProps),s.state=e.memoizedState,Li(e)?(Ni(),pt(e,BT,e,n,s),ki()):pt(e,BT,e,n,s)}function Fk(e){var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var s=e.stateNode;break;case 30:s=e.stateNode;break;default:s=e.stateNode}if(typeof n=="function")if(Li(e))try{Ni(),e.refCleanup=n(s)}finally{ki()}else e.refCleanup=n(s);else typeof n=="string"?console.error("String refs are no longer supported."):n.hasOwnProperty("current")||console.error("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",Y(e)),n.current=s}}function zl(e,n){try{pt(e,Fk,e)}catch(s){se(e,n,s)}}function Ii(e,n){var s=e.ref,o=e.refCleanup;if(s!==null)if(typeof o=="function")try{if(Li(e))try{Ni(),pt(e,o)}finally{ki(e)}else pt(e,o)}catch(d){se(e,n,d)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof s=="function")try{if(Li(e))try{Ni(),pt(e,s,null)}finally{ki(e)}else pt(e,s,null)}catch(d){se(e,n,d)}else s.current=null}function VE(e,n,s,o){var d=e.memoizedProps,f=d.id,v=d.onCommit;d=d.onRender,n=n===null?"mount":"update",th&&(n="nested-update"),typeof d=="function"&&d(f,n,e.actualDuration,e.treeBaseDuration,e.actualStartTime,s),typeof v=="function"&&v(e.memoizedProps.id,n,o,s)}function jk(e,n,s,o){var d=e.memoizedProps;e=d.id,d=d.onPostCommit,n=n===null?"mount":"update",th&&(n="nested-update"),typeof d=="function"&&d(e,n,o,s)}function qE(e){var n=e.type,s=e.memoizedProps,o=e.stateNode;try{pt(e,uN,o,n,s,e)}catch(d){se(e,e.return,d)}}function Im(e,n,s){try{pt(e,dN,e.stateNode,e.type,s,n,e)}catch(o){se(e,e.return,o)}}function XE(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ks(e.type)||e.tag===4}function Pm(e){t:for(;;){for(;e.sibling===null;){if(e.return===null||XE(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Ks(e.type)||e.flags&2||e.child===null||e.tag===4)continue t;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Um(e,n,s){var o=e.tag;if(o===5||o===6)e=e.stateNode,n?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(e,n):(n=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,n.appendChild(e),s=s._reactRootContainer,s!=null||n.onclick!==null||(n.onclick=Rd));else if(o!==4&&(o===27&&Ks(e.type)&&(s=e.stateNode,n=null),e=e.child,e!==null))for(Um(e,n,s),e=e.sibling;e!==null;)Um(e,n,s),e=e.sibling}function _d(e,n,s){var o=e.tag;if(o===5||o===6)e=e.stateNode,n?s.insertBefore(e,n):s.appendChild(e);else if(o!==4&&(o===27&&Ks(e.type)&&(s=e.stateNode),e=e.child,e!==null))for(_d(e,n,s),e=e.sibling;e!==null;)_d(e,n,s),e=e.sibling}function $k(e){for(var n,s=e.return;s!==null;){if(XE(s)){n=s;break}s=s.return}if(n==null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");switch(n.tag){case 27:n=n.stateNode,s=Pm(e),_d(e,s,n);break;case 5:s=n.stateNode,n.flags&32&&(WA(s),n.flags&=-33),n=Pm(e),_d(e,n,s);break;case 3:case 4:n=n.stateNode.containerInfo,s=Pm(e),Um(e,s,n);break;default:throw Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}}function YE(e){var n=e.stateNode,s=e.memoizedProps;try{pt(e,TN,e.type,s,n,e)}catch(o){se(e,e.return,o)}}function Gk(e,n){if(e=e.containerInfo,ky=Rh,e=_S(e),xp(e)){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else t:{s=(s=e.ownerDocument)&&s.defaultView||window;var o=s.getSelection&&s.getSelection();if(o&&o.rangeCount!==0){s=o.anchorNode;var d=o.anchorOffset,f=o.focusNode;o=o.focusOffset;try{s.nodeType,f.nodeType}catch{s=null;break t}var v=0,E=-1,w=-1,C=0,H=0,V=e,z=null;e:for(;;){for(var q;V!==s||d!==0&&V.nodeType!==3||(E=v+d),V!==f||o!==0&&V.nodeType!==3||(w=v+o),V.nodeType===3&&(v+=V.nodeValue.length),(q=V.firstChild)!==null;)z=V,V=q;for(;;){if(V===e)break e;if(z===s&&++C===d&&(E=v),z===f&&++H===o&&(w=v),(q=V.nextSibling)!==null)break;V=z,z=V.parentNode}V=q}s=E===-1||w===-1?null:{start:E,end:w}}else s=null}s=s||{start:0,end:0}}else s=null;for(Ny={focusedElem:e,selectionRange:s},Rh=!1,Ge=n;Ge!==null;)if(n=Ge,e=n.child,(n.subtreeFlags&1024)!==0&&e!==null)e.return=n,Ge=e;else for(;Ge!==null;){switch(e=n=Ge,s=e.alternate,d=e.flags,e.tag){case 0:break;case 11:case 15:break;case 1:(d&1024)!==0&&s!==null&&Bk(e,s);break;case 3:if((d&1024)!==0){if(e=e.stateNode.containerInfo,s=e.nodeType,s===9)ag(e);else if(s===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":ag(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((d&1024)!==0)throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}if(e=n.sibling,e!==null){e.return=n.return,Ge=e;break}Ge=n.return}}function WE(e,n,s){var o=s.flags;switch(s.tag){case 0:case 11:case 15:fs(e,s),o&4&&FE(s,tn|li);break;case 1:if(fs(e,s),o&4)if(e=s.stateNode,n===null)s.type.defaultProps||"ref"in s.memoizedProps||wo||(e.props!==s.memoizedProps&&console.error("Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",Y(s)||"instance"),e.state!==s.memoizedState&&console.error("Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",Y(s)||"instance")),Li(s)?(Ni(),pt(s,ry,s,e),ki()):pt(s,ry,s,e);else{var d=qa(s.type,n.memoizedProps);n=n.memoizedState,s.type.defaultProps||"ref"in s.memoizedProps||wo||(e.props!==s.memoizedProps&&console.error("Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",Y(s)||"instance"),e.state!==s.memoizedState&&console.error("Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",Y(s)||"instance")),Li(s)?(Ni(),pt(s,UT,s,e,d,n,e.__reactInternalSnapshotBeforeUpdate),ki()):pt(s,UT,s,e,d,n,e.__reactInternalSnapshotBeforeUpdate)}o&64&&$E(s),o&512&&zl(s,s.return);break;case 3:if(n=ls(),fs(e,s),o&64&&(o=s.updateQueue,o!==null)){if(d=null,s.child!==null)switch(s.child.tag){case 27:case 5:d=s.child.stateNode;break;case 1:d=s.child.stateNode}try{pt(s,GS,o,d)}catch(v){se(s,s.return,v)}}e.effectDuration+=Zu(n);break;case 27:n===null&&o&4&&YE(s);case 26:case 5:fs(e,s),n===null&&o&4&&qE(s),o&512&&zl(s,s.return);break;case 12:if(o&4){o=ls(),fs(e,s),e=s.stateNode,e.effectDuration+=Rl(o);try{pt(s,VE,s,n,Jd,e.effectDuration)}catch(v){se(s,s.return,v)}}else fs(e,s);break;case 13:fs(e,s),o&4&&ZE(e,s),o&64&&(e=s.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(s=Jk.bind(null,s),EN(e,s))));break;case 22:if(o=s.memoizedState!==null||Ts,!o){n=n!==null&&n.memoizedState!==null||Ce,d=Ts;var f=Ce;Ts=o,(Ce=n)&&!f?ps(e,s,(s.subtreeFlags&8772)!==0):fs(e,s),Ts=d,Ce=f}break;case 30:break;default:fs(e,s)}}function QE(e){var n=e.alternate;n!==null&&(e.alternate=null,QE(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&Fs(n)),e.stateNode=null,e._debugOwner=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function hs(e,n,s){for(s=s.child;s!==null;)KE(e,n,s),s=s.sibling}function KE(e,n,s){if(an&&typeof an.onCommitFiberUnmount=="function")try{an.onCommitFiberUnmount(to,s)}catch(f){Fi||(Fi=!0,console.error("React instrumentation encountered an error: %s",f))}switch(s.tag){case 26:Ce||Ii(s,n),hs(e,n,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:Ce||Ii(s,n);var o=Pe,d=On;Ks(s.type)&&(Pe=s.stateNode,On=!1),hs(e,n,s),pt(s,Vl,s.stateNode),Pe=o,On=d;break;case 5:Ce||Ii(s,n);case 6:if(o=Pe,d=On,Pe=null,hs(e,n,s),Pe=o,On=d,Pe!==null)if(On)try{pt(s,pN,Pe,s.stateNode)}catch(f){se(s,n,f)}else try{pt(s,fN,Pe,s.stateNode)}catch(f){se(s,n,f)}break;case 18:Pe!==null&&(On?(e=Pe,QA(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,s.stateNode),Wl(e)):QA(Pe,s.stateNode));break;case 4:o=Pe,d=On,Pe=s.stateNode.containerInfo,On=!0,hs(e,n,s),Pe=o,On=d;break;case 0:case 11:case 14:case 15:Ce||jr(bn,s,n),Ce||Nm(s,n,tn),hs(e,n,s);break;case 1:Ce||(Ii(s,n),o=s.stateNode,typeof o.componentWillUnmount=="function"&&GE(s,n,o)),hs(e,n,s);break;case 21:hs(e,n,s);break;case 22:Ce=(o=Ce)||s.memoizedState!==null,hs(e,n,s),Ce=o;break;default:hs(e,n,s)}}function ZE(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{pt(n,_N,e)}catch(s){se(n,n.return,s)}}function Vk(e){switch(e.tag){case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new pw),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new pw),n;default:throw Error("Unexpected Suspense handler tag ("+e.tag+"). This is a bug in React.")}}function zm(e,n){var s=Vk(e);n.forEach(function(o){var d=tN.bind(null,e,o);if(!s.has(o)){if(s.add(o),Si)if(xo!==null&&Co!==null)jl(Co,xo);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");o.then(d,d)}})}function Hn(e,n){var s=n.deletions;if(s!==null)for(var o=0;o<s.length;o++){var d=e,f=n,v=s[o],E=f;t:for(;E!==null;){switch(E.tag){case 27:if(Ks(E.type)){Pe=E.stateNode,On=!1;break t}break;case 5:Pe=E.stateNode,On=!1;break t;case 3:case 4:Pe=E.stateNode.containerInfo,On=!0;break t}E=E.return}if(Pe===null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");KE(d,f,v),Pe=null,On=!1,d=v,f=d.alternate,f!==null&&(f.return=null),d.return=null}if(n.subtreeFlags&13878)for(n=n.child;n!==null;)JE(n,e),n=n.sibling}function JE(e,n){var s=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Hn(n,e),Bn(e),o&4&&(jr(bn|li,e,e.return),Ul(bn|li,e),Nm(e,e.return,tn|li));break;case 1:Hn(n,e),Bn(e),o&512&&(Ce||s===null||Ii(s,s.return)),o&64&&Ts&&(e=e.updateQueue,e!==null&&(o=e.callbacks,o!==null&&(s=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=s===null?o:s.concat(o))));break;case 26:var d=Ti;if(Hn(n,e),Bn(e),o&512&&(Ce||s===null||Ii(s,s.return)),o&4)if(n=s!==null?s.memoizedState:null,o=e.memoizedState,s===null)if(o===null)if(e.stateNode===null){t:{o=e.type,s=e.memoizedProps,n=d.ownerDocument||d;e:switch(o){case"title":d=n.getElementsByTagName("title")[0],(!d||d[Zl]||d[rn]||d.namespaceURI===no||d.hasAttribute("itemprop"))&&(d=n.createElement(o),n.head.insertBefore(d,n.querySelector("head > title"))),Ke(d,o,s),d[rn]=e,P(d),o=d;break t;case"link":var f=r_("link","href",n).get(o+(s.href||""));if(f){for(var v=0;v<f.length;v++)if(d=f[v],d.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&d.getAttribute("rel")===(s.rel==null?null:s.rel)&&d.getAttribute("title")===(s.title==null?null:s.title)&&d.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){f.splice(v,1);break e}}d=n.createElement(o),Ke(d,o,s),n.head.appendChild(d);break;case"meta":if(f=r_("meta","content",n).get(o+(s.content||""))){for(v=0;v<f.length;v++)if(d=f[v],st(s.content,"content"),d.getAttribute("content")===(s.content==null?null:""+s.content)&&d.getAttribute("name")===(s.name==null?null:s.name)&&d.getAttribute("property")===(s.property==null?null:s.property)&&d.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&d.getAttribute("charset")===(s.charSet==null?null:s.charSet)){f.splice(v,1);break e}}d=n.createElement(o),Ke(d,o,s),n.head.appendChild(d);break;default:throw Error('getNodesForType encountered a type it did not expect: "'+o+'". This is a bug in React.')}d[rn]=e,P(d),o=d}e.stateNode=o}else o_(d,e.type,e.stateNode);else e.stateNode=a_(d,o,e.memoizedProps);else n!==o?(n===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):n.count--,o===null?o_(d,e.type,e.stateNode):a_(d,o,e.memoizedProps)):o===null&&e.stateNode!==null&&Im(e,e.memoizedProps,s.memoizedProps);break;case 27:Hn(n,e),Bn(e),o&512&&(Ce||s===null||Ii(s,s.return)),s!==null&&o&4&&Im(e,e.memoizedProps,s.memoizedProps);break;case 5:if(Hn(n,e),Bn(e),o&512&&(Ce||s===null||Ii(s,s.return)),e.flags&32){n=e.stateNode;try{pt(e,WA,n)}catch(H){se(e,e.return,H)}}o&4&&e.stateNode!=null&&(n=e.memoizedProps,Im(e,n,s!==null?s.memoizedProps:n)),o&1024&&(fy=!0,e.type!=="form"&&console.error("Unexpected host component type. Expected a form. This is a bug in React."));break;case 6:if(Hn(n,e),Bn(e),o&4){if(e.stateNode===null)throw Error("This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.");o=e.memoizedProps,s=s!==null?s.memoizedProps:o,n=e.stateNode;try{pt(e,hN,n,s,o)}catch(H){se(e,e.return,H)}}break;case 3:if(d=ls(),wh=null,f=Ti,Ti=Md(n.containerInfo),Hn(n,e),Ti=f,Bn(e),o&4&&s!==null&&s.memoizedState.isDehydrated)try{pt(e,AN,n.containerInfo)}catch(H){se(e,e.return,H)}fy&&(fy=!1,tA(e)),n.effectDuration+=Zu(d);break;case 4:o=Ti,Ti=Md(e.stateNode.containerInfo),Hn(n,e),Bn(e),Ti=o;break;case 12:o=ls(),Hn(n,e),Bn(e),e.stateNode.effectDuration+=Rl(o);break;case 13:Hn(n,e),Bn(e),e.child.flags&8192&&e.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(vy=Bi()),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,zm(e,o)));break;case 22:d=e.memoizedState!==null;var E=s!==null&&s.memoizedState!==null,w=Ts,C=Ce;if(Ts=w||d,Ce=C||E,Hn(n,e),Ce=C,Ts=w,Bn(e),o&8192)t:for(n=e.stateNode,n._visibility=d?n._visibility&~Wd:n._visibility|Wd,d&&(s===null||E||Ts||Ce||Xa(e)),s=null,n=e;;){if(n.tag===5||n.tag===26){if(s===null){E=s=n;try{f=E.stateNode,d?pt(E,mN,f):pt(E,yN,E.stateNode,E.memoizedProps)}catch(H){se(E,E.return,H)}}}else if(n.tag===6){if(s===null){E=n;try{v=E.stateNode,d?pt(E,gN,v):pt(E,bN,v,E.memoizedProps)}catch(H){se(E,E.return,H)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===e)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break t;for(;n.sibling===null;){if(n.return===null||n.return===e)break t;s===n&&(s=null),n=n.return}s===n&&(s=null),n.sibling.return=n.return,n=n.sibling}o&4&&(o=e.updateQueue,o!==null&&(s=o.retryQueue,s!==null&&(o.retryQueue=null,zm(e,s))));break;case 19:Hn(n,e),Bn(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,zm(e,o)));break;case 30:break;case 21:break;default:Hn(n,e),Bn(e)}}function Bn(e){var n=e.flags;if(n&2){try{pt(e,$k,e)}catch(s){se(e,e.return,s)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function tA(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;tA(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function fs(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)WE(e,n.alternate,n),n=n.sibling}function eA(e){switch(e.tag){case 0:case 11:case 14:case 15:Nm(e,e.return,tn),Xa(e);break;case 1:Ii(e,e.return);var n=e.stateNode;typeof n.componentWillUnmount=="function"&&GE(e,e.return,n),Xa(e);break;case 27:pt(e,Vl,e.stateNode);case 26:case 5:Ii(e,e.return),Xa(e);break;case 22:e.memoizedState===null&&Xa(e);break;case 30:Xa(e);break;default:Xa(e)}}function Xa(e){for(e=e.child;e!==null;)eA(e),e=e.sibling}function nA(e,n,s,o){var d=s.flags;switch(s.tag){case 0:case 11:case 15:ps(e,s,o),FE(s,tn);break;case 1:if(ps(e,s,o),n=s.stateNode,typeof n.componentDidMount=="function"&&pt(s,ry,s,n),n=s.updateQueue,n!==null){e=s.stateNode;try{pt(s,Dk,n,e)}catch(f){se(s,s.return,f)}}o&&d&64&&$E(s),zl(s,s.return);break;case 27:YE(s);case 26:case 5:ps(e,s,o),o&&n===null&&d&4&&qE(s),zl(s,s.return);break;case 12:if(o&&d&4){d=ls(),ps(e,s,o),o=s.stateNode,o.effectDuration+=Rl(d);try{pt(s,VE,s,n,Jd,o.effectDuration)}catch(f){se(s,s.return,f)}}else ps(e,s,o);break;case 13:ps(e,s,o),o&&d&4&&ZE(e,s);break;case 22:s.memoizedState===null&&ps(e,s,o),zl(s,s.return);break;case 30:break;default:ps(e,s,o)}}function ps(e,n,s){for(s=s&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;)nA(e,n.alternate,n,s),n=n.sibling}function Hm(e,n){var s=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),e=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(e=n.memoizedState.cachePool.pool),e!==s&&(e!=null&&ja(e),s!=null&&Cl(s))}function Bm(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(ja(n),e!=null&&Cl(e))}function Pi(e,n,s,o){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)iA(e,n,s,o),n=n.sibling}function iA(e,n,s,o){var d=n.flags;switch(n.tag){case 0:case 11:case 15:Pi(e,n,s,o),d&2048&&jE(n,He|li);break;case 1:Pi(e,n,s,o);break;case 3:var f=ls();Pi(e,n,s,o),d&2048&&(s=null,n.alternate!==null&&(s=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==s&&(ja(n),s!=null&&Cl(s))),e.passiveEffectDuration+=Zu(f);break;case 12:if(d&2048){d=ls(),Pi(e,n,s,o),e=n.stateNode,e.passiveEffectDuration+=Rl(d);try{pt(n,jk,n,n.alternate,Jd,e.passiveEffectDuration)}catch(E){se(n,n.return,E)}}else Pi(e,n,s,o);break;case 13:Pi(e,n,s,o);break;case 23:break;case 22:f=n.stateNode;var v=n.alternate;n.memoizedState!==null?f._visibility&bs?Pi(e,n,s,o):Hl(e,n):f._visibility&bs?Pi(e,n,s,o):(f._visibility|=bs,$r(e,n,s,o,(n.subtreeFlags&10256)!==0)),d&2048&&Hm(v,n);break;case 24:Pi(e,n,s,o),d&2048&&Bm(n.alternate,n);break;default:Pi(e,n,s,o)}}function $r(e,n,s,o,d){for(d=d&&(n.subtreeFlags&10256)!==0,n=n.child;n!==null;)sA(e,n,s,o,d),n=n.sibling}function sA(e,n,s,o,d){var f=n.flags;switch(n.tag){case 0:case 11:case 15:$r(e,n,s,o,d),jE(n,He);break;case 23:break;case 22:var v=n.stateNode;n.memoizedState!==null?v._visibility&bs?$r(e,n,s,o,d):Hl(e,n):(v._visibility|=bs,$r(e,n,s,o,d)),d&&f&2048&&Hm(n.alternate,n);break;case 24:$r(e,n,s,o,d),d&&f&2048&&Bm(n.alternate,n);break;default:$r(e,n,s,o,d)}}function Hl(e,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var s=e,o=n,d=o.flags;switch(o.tag){case 22:Hl(s,o),d&2048&&Hm(o.alternate,o);break;case 24:Hl(s,o),d&2048&&Bm(o.alternate,o);break;default:Hl(s,o)}n=n.sibling}}function Gr(e){if(e.subtreeFlags&Ec)for(e=e.child;e!==null;)aA(e),e=e.sibling}function aA(e){switch(e.tag){case 26:Gr(e),e.flags&Ec&&e.memoizedState!==null&&RN(Ti,e.memoizedState,e.memoizedProps);break;case 5:Gr(e);break;case 3:case 4:var n=Ti;Ti=Md(e.stateNode.containerInfo),Gr(e),Ti=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=Ec,Ec=16777216,Gr(e),Ec=n):Gr(e));break;default:Gr(e)}}function rA(e){var n=e.alternate;if(n!==null&&(e=n.child,e!==null)){n.child=null;do n=e.sibling,e.sibling=null,e=n;while(e!==null)}}function Bl(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var s=0;s<n.length;s++){var o=n[s];Ge=o,cA(o,e)}rA(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)oA(e),e=e.sibling}function oA(e){switch(e.tag){case 0:case 11:case 15:Bl(e),e.flags&2048&&Lm(e,e.return,He|li);break;case 3:var n=ls();Bl(e),e.stateNode.passiveEffectDuration+=Zu(n);break;case 12:n=ls(),Bl(e),e.stateNode.passiveEffectDuration+=Rl(n);break;case 22:n=e.stateNode,e.memoizedState!==null&&n._visibility&bs&&(e.return===null||e.return.tag!==13)?(n._visibility&=~bs,Td(e)):Bl(e);break;default:Bl(e)}}function Td(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var s=0;s<n.length;s++){var o=n[s];Ge=o,cA(o,e)}rA(e)}for(e=e.child;e!==null;)lA(e),e=e.sibling}function lA(e){switch(e.tag){case 0:case 11:case 15:Lm(e,e.return,He),Td(e);break;case 22:var n=e.stateNode;n._visibility&bs&&(n._visibility&=~bs,Td(e));break;default:Td(e)}}function cA(e,n){for(;Ge!==null;){var s=Ge,o=s;switch(o.tag){case 0:case 11:case 15:Lm(o,n,He);break;case 23:case 22:o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(o=o.memoizedState.cachePool.pool,o!=null&&ja(o));break;case 24:Cl(o.memoizedState.cache)}if(o=s.child,o!==null)o.return=s,Ge=o;else t:for(s=e;Ge!==null;){o=Ge;var d=o.sibling,f=o.return;if(QE(o),o===s){Ge=null;break t}if(d!==null){d.return=f,Ge=d;break t}Ge=f}}}function qk(){rI.forEach(function(e){return e()})}function uA(){var e=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0;return e||G.actQueue===null||console.error("The current testing environment is not configured to support act(...)"),e}function Fn(e){if((te&vn)!==Gn&&Bt!==0)return Bt&-Bt;var n=G.T;return n!==null?(n._updatedFibers||(n._updatedFibers=new Set),n._updatedFibers.add(e),e=Ja,e!==0?e:Wm()):ml()}function dA(){qn===0&&(qn=(Bt&536870912)===0||Xt?Pt():536870912);var e=ui.current;return e!==null&&(e.flags|=32),qn}function xe(e,n,s){if(ko&&console.error("useInsertionEffect must not schedule updates."),Ty&&(fh=!0),(e===ce&&(ee===sr||ee===ar)||e.cancelPendingCommit!==null)&&(qr(e,0),Ws(e,Bt,qn,!1)),Bs(e,s),(te&vn)!==0&&e===ce){if($i)switch(n.tag){case 0:case 11:case 15:e=Ut&&Y(Ut)||"Unknown",Tw.has(e)||(Tw.add(e),n=Y(n)||"Unknown",console.error("Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://react.dev/link/setstate-in-render",n,e,e));break;case 1:_w||(console.error("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),_w=!0)}}else Si&&fl(e,n,s),nN(n),e===ce&&((te&vn)===Gn&&(ua|=s),Ee===ir&&Ws(e,Bt,qn,!1)),Ui(e)}function hA(e,n,s){if((te&(vn|wi))!==Gn)throw Error("Should not already be working.");var o=!s&&(n&124)===0&&(n&e.expiredLanes)===0||Hs(e,n),d=o?Yk(e,n):$m(e,n,!0),f=o;do{if(d===ws){Mo&&!o&&Ws(e,n,0,!1);break}else{if(s=e.current.alternate,f&&!Xk(s)){d=$m(e,n,!1),f=!1;continue}if(d===Ro){if(f=n,e.errorRecoveryDisabledLanes&f)var v=0;else v=e.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){n=v;t:{d=e;var E=v;v=Cc;var w=d.current.memoizedState.isDehydrated;if(w&&(qr(d,E).flags|=256),E=$m(d,E,!1),E!==Ro){if(yy&&!w){d.errorRecoveryDisabledLanes|=f,ua|=f,d=ir;break t}d=Sn,Sn=v,d!==null&&(Sn===null?Sn=d:Sn.push.apply(Sn,d))}d=E}if(f=!1,d!==Ro)continue}}if(d===_c){qr(e,0),Ws(e,n,0,!0);break}t:{switch(o=e,d){case ws:case _c:throw Error("Root did not complete. This is a bug in React.");case ir:if((n&4194048)!==n)break;case uh:Ws(o,n,qn,!la);break t;case Ro:Sn=null;break;case py:case mw:break;default:throw Error("Unknown root exit status.")}if(G.actQueue!==null)Gm(o,s,n,Sn,Rc,dh,qn,ua,rr);else{if((n&62914560)===n&&(f=vy+yw-Bi(),10<f)){if(Ws(o,n,qn,!la),ss(o,0,!0)!==0)break t;o.timeoutHandle=kw(fA.bind(null,o,s,Sn,Rc,dh,n,qn,ua,rr,la,d,uI,vT,0),f);break t}fA(o,s,Sn,Rc,dh,n,qn,ua,rr,la,d,lI,vT,0)}}}break}while(!0);Ui(e)}function fA(e,n,s,o,d,f,v,E,w,C,H,V,z,q){if(e.timeoutHandle=dr,V=n.subtreeFlags,(V&8192||(V&16785408)===16785408)&&(Lc={stylesheets:null,count:0,unsuspend:CN},aA(n),V=DN(),V!==null)){e.cancelPendingCommit=V(Gm.bind(null,e,n,f,s,o,d,v,E,w,H,cI,z,q)),Ws(e,f,v,!C);return}Gm(e,n,f,s,o,d,v,E,w)}function Xk(e){for(var n=e;;){var s=n.tag;if((s===0||s===11||s===15)&&n.flags&16384&&(s=n.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var o=0;o<s.length;o++){var d=s[o],f=d.getSnapshot;d=d.value;try{if(!gn(f(),d))return!1}catch{return!1}}if(s=n.child,n.subtreeFlags&16384&&s!==null)s.return=n,n=s;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function Ws(e,n,s,o){n&=~by,n&=~ua,e.suspendedLanes|=n,e.pingedLanes&=~n,o&&(e.warmLanes|=n),o=e.expirationTimes;for(var d=n;0<d;){var f=31-pn(d),v=1<<f;o[f]=-1,d&=~v}s!==0&&dl(e,s,n)}function Vr(){return(te&(vn|wi))===Gn?($l(0),!1):!0}function Fm(){if(Ut!==null){if(ee===kn)var e=Ut.return;else e=Ut,Wu(),Zp(e),Eo=null,vc=0,e=Ut;for(;e!==null;)BE(e.alternate,e),e=e.return;Ut=null}}function qr(e,n){var s=e.timeoutHandle;s!==dr&&(e.timeoutHandle=dr,_I(s)),s=e.cancelPendingCommit,s!==null&&(e.cancelPendingCommit=null,s()),Fm(),ce=e,Ut=s=rs(e.current,null),Bt=n,ee=kn,Vn=null,la=!1,Mo=Hs(e,n),yy=!1,Ee=ws,rr=qn=by=ua=ca=0,Sn=Cc=null,dh=!1,(n&8)!==0&&(n|=n&32);var o=e.entangledLanes;if(o!==0)for(e=e.entanglements,o&=n;0<o;){var d=31-pn(o),f=1<<d;n|=e[d],o&=~f}return Yi=n,Vu(),n=yT(),1e3<n-gT&&(G.recentlyCreatedOwnerStacks=0,gT=n),Ai.discardPendingWarnings(),s}function pA(e,n){_t=null,G.H=lh,G.getCurrentStack=null,$i=!1,$n=null,n===mc||n===ih?(n=FS(),ee=wc):n===AT?(n=FS(),ee=gw):ee=n===rw?gy:n!==null&&typeof n=="object"&&typeof n.then=="function"?Do:Tc,Vn=n;var s=Ut;if(s===null)Ee=_c,vd(e,zn(n,e.current));else switch(s.mode&Je&&Fp(s),Ye(),ee){case Tc:rt!==null&&typeof rt.markComponentErrored=="function"&&rt.markComponentErrored(s,n,Bt);break;case sr:case ar:case wc:case Do:case xc:rt!==null&&typeof rt.markComponentSuspended=="function"&&rt.markComponentSuspended(s,n,Bt)}}function mA(){var e=G.H;return G.H=lh,e===null?lh:e}function gA(){var e=G.A;return G.A=aI,e}function jm(){Ee=ir,la||(Bt&4194048)!==Bt&&ui.current!==null||(Mo=!0),(ca&134217727)===0&&(ua&134217727)===0||ce===null||Ws(ce,Bt,qn,!1)}function $m(e,n,s){var o=te;te|=vn;var d=mA(),f=gA();if(ce!==e||Bt!==n){if(Si){var v=e.memoizedUpdaters;0<v.size&&(jl(e,Bt),v.clear()),pl(e,n)}Rc=null,qr(e,n)}Tn(n),n=!1,v=Ee;t:do try{if(ee!==kn&&Ut!==null){var E=Ut,w=Vn;switch(ee){case gy:Fm(),v=uh;break t;case wc:case sr:case ar:case Do:ui.current===null&&(n=!0);var C=ee;if(ee=kn,Vn=null,Xr(e,E,w,C),s&&Mo){v=ws;break t}break;default:C=ee,ee=kn,Vn=null,Xr(e,E,w,C)}}yA(),v=Ee;break}catch(H){pA(e,H)}while(!0);return n&&e.shellSuspendCounter++,Wu(),te=o,G.H=d,G.A=f,mi(),Ut===null&&(ce=null,Bt=0,Vu()),v}function yA(){for(;Ut!==null;)bA(Ut)}function Yk(e,n){var s=te;te|=vn;var o=mA(),d=gA();if(ce!==e||Bt!==n){if(Si){var f=e.memoizedUpdaters;0<f.size&&(jl(e,Bt),f.clear()),pl(e,n)}Rc=null,hh=Bi()+bw,qr(e,n)}else Mo=Hs(e,n);Tn(n);t:do try{if(ee!==kn&&Ut!==null)e:switch(n=Ut,f=Vn,ee){case Tc:ee=kn,Vn=null,Xr(e,n,f,Tc);break;case sr:case ar:if(HS(f)){ee=kn,Vn=null,vA(n);break}n=function(){ee!==sr&&ee!==ar||ce!==e||(ee=xc),Ui(e)},f.then(n,n);break t;case wc:ee=xc;break t;case gw:ee=my;break t;case xc:HS(f)?(ee=kn,Vn=null,vA(n)):(ee=kn,Vn=null,Xr(e,n,f,xc));break;case my:var v=null;switch(Ut.tag){case 26:v=Ut.memoizedState;case 5:case 27:var E=Ut;if(!v||l_(v)){ee=kn,Vn=null;var w=E.sibling;if(w!==null)Ut=w;else{var C=E.return;C!==null?(Ut=C,wd(C)):Ut=null}break e}break;default:console.error("Unexpected type of fiber triggered a suspensey commit. This is a bug in React.")}ee=kn,Vn=null,Xr(e,n,f,my);break;case Do:ee=kn,Vn=null,Xr(e,n,f,Do);break;case gy:Fm(),Ee=uh;break t;default:throw Error("Unexpected SuspendedReason. This is a bug in React.")}G.actQueue!==null?yA():Wk();break}catch(H){pA(e,H)}while(!0);return Wu(),G.H=o,G.A=d,te=s,Ut!==null?(rt!==null&&typeof rt.markRenderYielded=="function"&&rt.markRenderYielded(),ws):(mi(),ce=null,Bt=0,Vu(),Ee)}function Wk(){for(;Ut!==null&&!VN();)bA(Ut)}function bA(e){var n=e.alternate;(e.mode&Je)!==de?(Bp(e),n=pt(e,km,n,e,Yi),Fp(e)):n=pt(e,km,n,e,Yi),e.memoizedProps=e.pendingProps,n===null?wd(e):Ut=n}function vA(e){var n=pt(e,Qk,e);e.memoizedProps=e.pendingProps,n===null?wd(e):Ut=n}function Qk(e){var n=e.alternate,s=(e.mode&Je)!==de;switch(s&&Bp(e),e.tag){case 15:case 0:n=kE(n,e,e.pendingProps,e.type,void 0,Bt);break;case 11:n=kE(n,e,e.pendingProps,e.type.render,e.ref,Bt);break;case 5:Zp(e);default:BE(n,e),e=Ut=RS(e,Yi),n=km(n,e,Yi)}return s&&Fp(e),n}function Xr(e,n,s,o){Wu(),Zp(n),Eo=null,vc=0;var d=n.return;try{if(Ik(e,d,n,s,Bt)){Ee=_c,vd(e,zn(s,e.current)),Ut=null;return}}catch(f){if(d!==null)throw Ut=d,f;Ee=_c,vd(e,zn(s,e.current)),Ut=null;return}n.flags&32768?(Xt||o===Tc?e=!0:Mo||(Bt&536870912)!==0?e=!1:(la=e=!0,(o===sr||o===ar||o===wc||o===Do)&&(o=ui.current,o!==null&&o.tag===13&&(o.flags|=16384))),SA(n,e)):wd(n)}function wd(e){var n=e;do{if((n.flags&32768)!==0){SA(n,la);return}var s=n.alternate;if(e=n.return,Bp(n),s=pt(n,Uk,s,n,Yi),(n.mode&Je)!==de&&IS(n),s!==null){Ut=s;return}if(n=n.sibling,n!==null){Ut=n;return}Ut=n=e}while(n!==null);Ee===ws&&(Ee=mw)}function SA(e,n){do{var s=zk(e.alternate,e);if(s!==null){s.flags&=32767,Ut=s;return}if((e.mode&Je)!==de){IS(e),s=e.actualDuration;for(var o=e.child;o!==null;)s+=o.actualDuration,o=o.sibling;e.actualDuration=s}if(s=e.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!n&&(e=e.sibling,e!==null)){Ut=e;return}Ut=e=s}while(e!==null);Ee=uh,Ut=null}function Gm(e,n,s,o,d,f,v,E,w){e.cancelPendingCommit=null;do Fl();while(en!==or);if(Ai.flushLegacyContextWarning(),Ai.flushPendingUnsafeLifecycleWarnings(),(te&(vn|wi))!==Gn)throw Error("Should not already be working.");if(rt!==null&&typeof rt.markCommitStarted=="function"&&rt.markCommitStarted(s),n===null)Vt();else{if(s===0&&console.error("finishedLanes should not be empty during a commit. This is a bug in React."),n===e.current)throw Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");if(f=n.lanes|n.childLanes,f|=Xg,Iu(e,s,f,v,E,w),e===ce&&(Ut=ce=null,Bt=0),Oo=n,ha=e,fa=s,Ey=f,Ay=d,Aw=o,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,eN(Jr,function(){return wA(),null})):(e.callbackNode=null,e.callbackPriority=0),Jd=go(),o=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||o){o=G.T,G.T=null,d=Jt.p,Jt.p=ei,v=te,te|=wi;try{Gk(e,n,s)}finally{te=v,Jt.p=d,G.T=o}}en=vw,EA(),AA(),_A()}}function EA(){if(en===vw){en=or;var e=ha,n=Oo,s=fa,o=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||o){o=G.T,G.T=null;var d=Jt.p;Jt.p=ei;var f=te;te|=wi;try{xo=s,Co=e,JE(n,e),Co=xo=null,s=Ny;var v=_S(e.containerInfo),E=s.focusedElem,w=s.selectionRange;if(v!==E&&E&&E.ownerDocument&&AS(E.ownerDocument.documentElement,E)){if(w!==null&&xp(E)){var C=w.start,H=w.end;if(H===void 0&&(H=C),"selectionStart"in E)E.selectionStart=C,E.selectionEnd=Math.min(H,E.value.length);else{var V=E.ownerDocument||document,z=V&&V.defaultView||window;if(z.getSelection){var q=z.getSelection(),ct=E.textContent.length,At=Math.min(w.start,ct),ue=w.end===void 0?At:Math.min(w.end,ct);!q.extend&&At>ue&&(v=ue,ue=At,At=v);var jt=ES(E,At),D=ES(E,ue);if(jt&&D&&(q.rangeCount!==1||q.anchorNode!==jt.node||q.anchorOffset!==jt.offset||q.focusNode!==D.node||q.focusOffset!==D.offset)){var M=V.createRange();M.setStart(jt.node,jt.offset),q.removeAllRanges(),At>ue?(q.addRange(M),q.extend(D.node,D.offset)):(M.setEnd(D.node,D.offset),q.addRange(M))}}}}for(V=[],q=E;q=q.parentNode;)q.nodeType===1&&V.push({element:q,left:q.scrollLeft,top:q.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E<V.length;E++){var N=V[E];N.element.scrollLeft=N.left,N.element.scrollTop=N.top}}Rh=!!ky,Ny=ky=null}finally{te=f,Jt.p=d,G.T=o}}e.current=n,en=Sw}}function AA(){if(en===Sw){en=or;var e=ha,n=Oo,s=fa,o=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||o){o=G.T,G.T=null;var d=Jt.p;Jt.p=ei;var f=te;te|=wi;try{rt!==null&&typeof rt.markLayoutEffectsStarted=="function"&&rt.markLayoutEffectsStarted(s),xo=s,Co=e,WE(e,n.alternate,n),Co=xo=null,rt!==null&&typeof rt.markLayoutEffectsStopped=="function"&&rt.markLayoutEffectsStopped()}finally{te=f,Jt.p=d,G.T=o}}en=Ew}}function _A(){if(en===dI||en===Ew){en=or,qN();var e=ha,n=Oo,s=fa,o=Aw,d=(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0;d?en=Sy:(en=or,Oo=ha=null,TA(e,e.pendingLanes),lr=0,Mc=null);var f=e.pendingLanes;if(f===0&&(da=null),d||DA(e),d=Nr(s),n=n.stateNode,an&&typeof an.onCommitFiberRoot=="function")try{var v=(n.current.flags&128)===128;switch(d){case ei:var E=wg;break;case ji:E=xg;break;case ys:E=Jr;break;case jd:E=Cg;break;default:E=Jr}an.onCommitFiberRoot(to,n,E,v)}catch(V){Fi||(Fi=!0,console.error("React instrumentation encountered an error: %s",V))}if(Si&&e.memoizedUpdaters.clear(),qk(),o!==null){v=G.T,E=Jt.p,Jt.p=ei,G.T=null;try{var w=e.onRecoverableError;for(n=0;n<o.length;n++){var C=o[n],H=Kk(C.stack);pt(C.source,w,C.value,H)}}finally{G.T=v,Jt.p=E}}(fa&3)!==0&&Fl(),Ui(e),f=e.pendingLanes,(s&4194090)!==0&&(f&42)!==0?(eh=!0,e===_y?Dc++:(Dc=0,_y=e)):Dc=0,$l(0),Vt()}}function Kk(e){return e={componentStack:e},Object.defineProperty(e,"digest",{get:function(){console.error('You are accessing "digest" from the errorInfo object passed to onRecoverableError. This property is no longer provided as part of errorInfo but can be accessed as a property of the Error instance itself.')}}),e}function TA(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,Cl(n)))}function Fl(e){return EA(),AA(),_A(),wA()}function wA(){if(en!==Sy)return!1;var e=ha,n=Ey;Ey=0;var s=Nr(fa),o=ys>s?ys:s;s=G.T;var d=Jt.p;try{Jt.p=o,G.T=null,o=Ay,Ay=null;var f=ha,v=fa;if(en=or,Oo=ha=null,fa=0,(te&(vn|wi))!==Gn)throw Error("Cannot flush passive effects while already rendering.");Ty=!0,fh=!1,rt!==null&&typeof rt.markPassiveEffectsStarted=="function"&&rt.markPassiveEffectsStarted(v);var E=te;if(te|=wi,oA(f.current),iA(f,f.current,v,o),rt!==null&&typeof rt.markPassiveEffectsStopped=="function"&&rt.markPassiveEffectsStopped(),DA(f),te=E,$l(0,!1),fh?f===Mc?lr++:(lr=0,Mc=f):lr=0,fh=Ty=!1,an&&typeof an.onPostCommitFiberRoot=="function")try{an.onPostCommitFiberRoot(to,f)}catch(C){Fi||(Fi=!0,console.error("React instrumentation encountered an error: %s",C))}var w=f.current.stateNode;return w.effectDuration=0,w.passiveEffectDuration=0,!0}finally{Jt.p=d,G.T=s,TA(e,n)}}function xA(e,n,s){n=zn(s,n),n=Em(e.stateNode,n,2),e=Vs(e,n,2),e!==null&&(Bs(e,2),Ui(e))}function se(e,n,s){if(ko=!1,e.tag===3)xA(e,e,s);else{for(;n!==null;){if(n.tag===3){xA(n,e,s);return}if(n.tag===1){var o=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(da===null||!da.has(o))){e=zn(s,e),s=Am(2),o=Vs(n,s,2),o!==null&&(_m(s,o,n,e),Bs(o,2),Ui(o));return}}n=n.return}console.error(`Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React. Potential causes include deleting the same fiber more than once, committing an already-finished tree, or an inconsistent return pointer.
199
199
 
200
200
  Error message:
201
201
 
202
- %s`,s)}}function qm(e,n,s){var o=e.pingCache;if(o===null){o=e.pingCache=new lI;var d=new Set;o.set(n,d)}else d=o.get(n),d===void 0&&(d=new Set,o.set(n,d));d.has(s)||(by=!0,d.add(s),o=Jk.bind(null,e,n,s),Si&&jl(e,s),n.then(o,o))}function Jk(e,n,s){var o=e.pingCache;o!==null&&o.delete(n),e.pingedLanes|=e.suspendedLanes&s,e.warmLanes&=~s,dA()&&G.actQueue===null&&console.error(`A suspended resource finished loading inside a test, but the event was not wrapped in act(...).
202
+ %s`,s)}}function Vm(e,n,s){var o=e.pingCache;if(o===null){o=e.pingCache=new oI;var d=new Set;o.set(n,d)}else d=o.get(n),d===void 0&&(d=new Set,o.set(n,d));d.has(s)||(yy=!0,d.add(s),o=Zk.bind(null,e,n,s),Si&&jl(e,s),n.then(o,o))}function Zk(e,n,s){var o=e.pingCache;o!==null&&o.delete(n),e.pingedLanes|=e.suspendedLanes&s,e.warmLanes&=~s,uA()&&G.actQueue===null&&console.error(`A suspended resource finished loading inside a test, but the event was not wrapped in act(...).
203
203
 
204
204
  When testing, code that resolves suspended data should be wrapped into act(...):
205
205
 
@@ -208,7 +208,7 @@ act(() => {
208
208
  });
209
209
  /* assert on the output */
210
210
 
211
- This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act`),le===e&&(Bt&s)===s&&(Se===ir||Se===my&&(Bt&62914560)===Bt&&Bi()-Sy<bw?(te&vn)===Gn&&qr(e,0):vy|=s,rr===Bt&&(rr=0)),Ui(e)}function RA(e,n){n===0&&(n=Oa()),e=Cn(e,n),e!==null&&(Bs(e,n),Ui(e))}function tN(e){var n=e.memoizedState,s=0;n!==null&&(s=n.retryLane),RA(e,s)}function eN(e,n){var s=0;switch(e.tag){case 13:var o=e.stateNode,d=e.memoizedState;d!==null&&(s=d.retryLane);break;case 19:o=e.stateNode;break;case 22:o=e.stateNode._retryCache;break;default:throw Error("Pinged unknown suspense boundary type. This is probably a bug in React.")}o!==null&&o.delete(n),RA(e,s)}function Ym(e,n,s){if((n.subtreeFlags&67117056)!==0)for(n=n.child;n!==null;){var o=e,d=n,f=d.type===Pd;f=s||f,d.tag!==22?d.flags&67108864?f&&pt(d,DA,o,d,(d.mode&pT)===ue):Ym(o,d,f):d.memoizedState===null&&(f&&d.flags&8192?pt(d,DA,o,d):d.subtreeFlags&67108864&&pt(d,Ym,o,d,f)),n=n.sibling}}function DA(e,n){var s=2<arguments.length&&arguments[2]!==void 0?arguments[2]:!0;tt(!0);try{nA(n),s&&cA(n),iA(e,n.alternate,n,!1),s&&aA(e,n,0,null,!1,0)}finally{tt(!1)}}function MA(e){var n=!0;e.current.mode&(on|Ei)||(n=!1),Ym(e,e.current,n)}function OA(e){if((te&vn)===Gn){var n=e.tag;if(n===3||n===1||n===0||n===11||n===14||n===15){if(n=X(e)||"ReactComponent",fh!==null){if(fh.has(n))return;fh.add(n)}else fh=new Set([n]);pt(e,function(){console.error("Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously later calls tries to update the component. Move this work to useEffect instead.")})}}}function jl(e,n){Si&&e.memoizedUpdaters.forEach(function(s){fl(e,s,n)})}function nN(e,n){var s=G.actQueue;return s!==null?(s.push(n),mI):wg(e,n)}function iN(e){dA()&&G.actQueue===null&&pt(e,function(){console.error(`An update to %s inside a test was not wrapped in act(...).
211
+ This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act`),ce===e&&(Bt&s)===s&&(Ee===ir||Ee===py&&(Bt&62914560)===Bt&&Bi()-vy<yw?(te&vn)===Gn&&qr(e,0):by|=s,rr===Bt&&(rr=0)),Ui(e)}function CA(e,n){n===0&&(n=Oa()),e=xn(e,n),e!==null&&(Bs(e,n),Ui(e))}function Jk(e){var n=e.memoizedState,s=0;n!==null&&(s=n.retryLane),CA(e,s)}function tN(e,n){var s=0;switch(e.tag){case 13:var o=e.stateNode,d=e.memoizedState;d!==null&&(s=d.retryLane);break;case 19:o=e.stateNode;break;case 22:o=e.stateNode._retryCache;break;default:throw Error("Pinged unknown suspense boundary type. This is probably a bug in React.")}o!==null&&o.delete(n),CA(e,s)}function qm(e,n,s){if((n.subtreeFlags&67117056)!==0)for(n=n.child;n!==null;){var o=e,d=n,f=d.type===Ud;f=s||f,d.tag!==22?d.flags&67108864?f&&pt(d,RA,o,d,(d.mode&fT)===de):qm(o,d,f):d.memoizedState===null&&(f&&d.flags&8192?pt(d,RA,o,d):d.subtreeFlags&67108864&&pt(d,qm,o,d,f)),n=n.sibling}}function RA(e,n){var s=2<arguments.length&&arguments[2]!==void 0?arguments[2]:!0;tt(!0);try{eA(n),s&&lA(n),nA(e,n.alternate,n,!1),s&&sA(e,n,0,null,!1,0)}finally{tt(!1)}}function DA(e){var n=!0;e.current.mode&(on|Ei)||(n=!1),qm(e,e.current,n)}function MA(e){if((te&vn)===Gn){var n=e.tag;if(n===3||n===1||n===0||n===11||n===14||n===15){if(n=Y(e)||"ReactComponent",ph!==null){if(ph.has(n))return;ph.add(n)}else ph=new Set([n]);pt(e,function(){console.error("Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously later calls tries to update the component. Move this work to useEffect instead.")})}}}function jl(e,n){Si&&e.memoizedUpdaters.forEach(function(s){fl(e,s,n)})}function eN(e,n){var s=G.actQueue;return s!==null?(s.push(n),pI):Tg(e,n)}function nN(e){uA()&&G.actQueue===null&&pt(e,function(){console.error(`An update to %s inside a test was not wrapped in act(...).
212
212
 
213
213
  When testing, code that causes React state updates should be wrapped into act(...):
214
214
 
@@ -217,16 +217,16 @@ act(() => {
217
217
  });
218
218
  /* assert on the output */
219
219
 
220
- This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act`,X(e))})}function Ui(e){e!==No&&e.next===null&&(No===null?ph=No=e:No=No.next=e),mh=!0,G.actQueue!==null?xy||(xy=!0,IA()):Cy||(Cy=!0,IA())}function $l(e,n){if(!Ry&&mh){Ry=!0;do for(var s=!1,o=ph;o!==null;){if(e!==0){var d=o.pendingLanes;if(d===0)var f=0;else{var v=o.suspendedLanes,E=o.pingedLanes;f=(1<<31-pn(42|e)+1)-1,f&=d&~(v&~E),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(s=!0,LA(o,f))}else f=Bt,f=ss(o,o===le?f:0,o.cancelPendingCommit!==null||o.timeoutHandle!==dr),(f&3)===0||Hs(o,f)||(s=!0,LA(o,f));o=o.next}while(s);Ry=!1}}function sN(){Xm()}function Xm(){mh=xy=Cy=!1;var e=0;cr!==0&&(cN()&&(e=cr),cr=0);for(var n=Bi(),s=null,o=ph;o!==null;){var d=o.next,f=kA(o,n);f===0?(o.next=null,s===null?ph=d:s.next=d,d===null&&(No=s)):(s=o,(e!==0||(f&3)!==0)&&(mh=!0)),o=d}$l(e)}function kA(e,n){for(var s=e.suspendedLanes,o=e.pingedLanes,d=e.expirationTimes,f=e.pendingLanes&-62914561;0<f;){var v=31-pn(f),E=1<<v,w=d[v];w===-1?((E&s)===0||(E&o)!==0)&&(d[v]=fp(E,n)):w<=n&&(e.expiredLanes|=E),f&=~E}if(n=le,s=Bt,s=ss(e,e===n?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==dr),o=e.callbackNode,s===0||e===n&&(ee===sr||ee===ar)||e.cancelPendingCommit!==null)return o!==null&&Wm(o),e.callbackNode=null,e.callbackPriority=0;if((s&3)===0||Hs(e,s)){if(n=s&-s,n!==e.callbackPriority||G.actQueue!==null&&o!==Dy)Wm(o);else return n;switch(Nr(s)){case ei:case ji:s=xg;break;case ys:s=Jr;break;case Fd:s=Rg;break;default:s=Jr}return o=NA.bind(null,e),G.actQueue!==null?(G.actQueue.push(o),s=Dy):s=wg(s,o),e.callbackPriority=n,e.callbackNode=s,n}return o!==null&&Wm(o),e.callbackPriority=2,e.callbackNode=null,2}function NA(e,n){if(th=Jd=!1,en!==or&&en!==Ey)return e.callbackNode=null,e.callbackPriority=0,null;var s=e.callbackNode;if(Fl()&&e.callbackNode!==s)return null;var o=Bt;return o=ss(e,e===le?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==dr),o===0?null:(fA(e,o,n),kA(e,Bi()),e.callbackNode!=null&&e.callbackNode===s?NA.bind(null,e):null)}function LA(e,n){if(Fl())return null;Jd=th,th=!1,fA(e,n,!0)}function Wm(e){e!==Dy&&e!==null&&VN(e)}function IA(){G.actQueue!==null&&G.actQueue.push(function(){return Xm(),null}),wI(function(){(te&(vn|wi))!==Gn?wg(Cg,sN):Xm()})}function Qm(){return cr===0&&(cr=Pt()),cr}function PA(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:(st(e,"action"),Sl(""+e))}function UA(e,n){var s=n.ownerDocument.createElement("input");return s.name=n.name,s.value=n.value,e.id&&s.setAttribute("form",e.id),n.parentNode.insertBefore(s,n),e=new FormData(e),s.parentNode.removeChild(s),e}function aN(e,n,s,o,d){if(n==="submit"&&s&&s.stateNode===d){var f=PA((d[Dn]||null).action),v=o.submitter;v&&(n=(n=v[Dn]||null)?PA(n.formAction):v.getAttribute("formAction"),n!==null&&(f=n,v=null));var E=new qd("action","action",null,o,d);e.push({event:E,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(cr!==0){var w=v?UA(d,v):new FormData(d),x={pending:!0,data:w,method:d.method,action:f};Object.freeze(x),mm(s,x,null,w)}}else typeof f=="function"&&(E.preventDefault(),w=v?UA(d,v):new FormData(d),x={pending:!0,data:w,method:d.method,action:f},Object.freeze(x),mm(s,x,f,w))},currentTarget:d}]})}}function wd(e,n,s){e.currentTarget=s;try{n(e)}catch(o){uy(o)}e.currentTarget=null}function zA(e,n){n=(n&4)!==0;for(var s=0;s<e.length;s++){var o=e[s];t:{var d=void 0,f=o.event;if(o=o.listeners,n)for(var v=o.length-1;0<=v;v--){var E=o[v],w=E.instance,x=E.currentTarget;if(E=E.listener,w!==d&&f.isPropagationStopped())break t;w!==null?pt(w,wd,f,E,x):wd(f,E,x),d=w}else for(v=0;v<o.length;v++){if(E=o[v],w=E.instance,x=E.currentTarget,E=E.listener,w!==d&&f.isPropagationStopped())break t;w!==null?pt(w,wd,f,E,x):wd(f,E,x),d=w}}}}function Ft(e,n){My.has(e)||console.error('Did not expect a listenToNonDelegatedEvent() call for "%s". This is a bug in React. Please file an issue.',e);var s=n[Dg];s===void 0&&(s=n[Dg]=new Set);var o=e+"__bubble";s.has(o)||(HA(n,e,2,!1),s.add(o))}function Km(e,n,s){My.has(e)&&!n&&console.error('Did not expect a listenToNativeEvent() call for "%s" in the bubble phase. This is a bug in React. Please file an issue.',e);var o=0;n&&(o|=4),HA(s,e,o,n)}function Zm(e){if(!e[gh]){e[gh]=!0,A_.forEach(function(s){s!=="selectionchange"&&(My.has(s)||Km(s,!1,e),Km(s,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[gh]||(n[gh]=!0,Km("selectionchange",!1,n))}}function HA(e,n,s,o){switch(p_(n)){case ei:var d=IN;break;case ji:d=PN;break;default:d=fg}s=d.bind(null,n,s,e),d=void 0,!Ug||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(d=!0),o?d!==void 0?e.addEventListener(n,s,{capture:!0,passive:d}):e.addEventListener(n,s,!0):d!==void 0?e.addEventListener(n,s,{passive:d}):e.addEventListener(n,s,!1)}function Jm(e,n,s,o,d){var f=o;if((n&1)===0&&(n&2)===0&&o!==null)t:for(;;){if(o===null)return;var v=o.tag;if(v===3||v===4){var E=o.stateNode.containerInfo;if(E===d)break;if(v===4)for(v=o.return;v!==null;){var w=v.tag;if((w===3||w===4)&&v.stateNode.containerInfo===d)return;v=v.return}for(;E!==null;){if(v=gi(E),v===null)return;if(w=v.tag,w===5||w===6||w===26||w===27){o=f=v;continue t}E=E.parentNode}}o=o.return}dS(function(){var x=f,H=wp(s),V=[];t:{var z=fT.get(e);if(z!==void 0){var q=qd,ct=e;switch(e){case"keypress":if(Fu(s)===0)break t;case"keydown":case"keyup":q=kL;break;case"focusin":ct="focus",q=Fg;break;case"focusout":ct="blur",q=Fg;break;case"beforeblur":case"afterblur":q=Fg;break;case"click":if(s.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":q=J_;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":q=SL;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":q=IL;break;case cT:case uT:case dT:q=_L;break;case hT:q=UL;break;case"scroll":case"scrollend":q=bL;break;case"wheel":q=HL;break;case"copy":case"cut":case"paste":q=wL;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":q=eT;break;case"toggle":case"beforetoggle":q=FL}var At=(n&4)!==0,ce=!At&&(e==="scroll"||e==="scrollend"),jt=At?z!==null?z+"Capture":null:z;At=[];for(var D=x,M;D!==null;){var k=D;if(M=k.stateNode,k=k.tag,k!==5&&k!==26&&k!==27||M===null||jt===null||(k=El(D,jt),k!=null&&At.push(Gl(D,k,M))),ce)break;D=D.return}0<At.length&&(z=new q(z,ct,null,s,H),V.push({event:z,listeners:At}))}}if((n&7)===0){t:{if(z=e==="mouseover"||e==="pointerover",q=e==="mouseout"||e==="pointerout",z&&s!==tc&&(ct=s.relatedTarget||s.fromElement)&&(gi(ct)||ct[na]))break t;if((q||z)&&(z=H.window===H?H:(z=H.ownerDocument)?z.defaultView||z.parentWindow:window,q?(ct=s.relatedTarget||s.toElement,q=x,ct=ct?gi(ct):null,ct!==null&&(ce=C(ct),At=ct.tag,ct!==ce||At!==5&&At!==27&&At!==6)&&(ct=null)):(q=null,ct=x),q!==ct)){if(At=J_,k="onMouseLeave",jt="onMouseEnter",D="mouse",(e==="pointerout"||e==="pointerover")&&(At=eT,k="onPointerLeave",jt="onPointerEnter",D="pointer"),ce=q==null?z:js(q),M=ct==null?z:js(ct),z=new At(k,D+"leave",q,s,H),z.target=ce,z.relatedTarget=M,k=null,gi(H)===x&&(At=new At(jt,D+"enter",ct,s,H),At.target=M,At.relatedTarget=ce,k=At),ce=k,q&&ct)e:{for(At=q,jt=ct,D=0,M=At;M;M=Xr(M))D++;for(M=0,k=jt;k;k=Xr(k))M++;for(;0<D-M;)At=Xr(At),D--;for(;0<M-D;)jt=Xr(jt),M--;for(;D--;){if(At===jt||jt!==null&&At===jt.alternate)break e;At=Xr(At),jt=Xr(jt)}At=null}else At=null;q!==null&&BA(V,z,q,At,!1),ct!==null&&ce!==null&&BA(V,ce,ct,At,!0)}}t:{if(z=x?js(x):window,q=z.nodeName&&z.nodeName.toLowerCase(),q==="select"||q==="input"&&z.type==="file")var Y=bS;else if(gS(z))if(oT)Y=wk;else{Y=_k;var nt=Ak}else q=z.nodeName,!q||q.toLowerCase()!=="input"||z.type!=="checkbox"&&z.type!=="radio"?x&&vl(x.elementType)&&(Y=bS):Y=Tk;if(Y&&(Y=Y(e,x))){yS(V,Y,s,H);break t}nt&&nt(e,z,x),e==="focusout"&&x&&z.type==="number"&&x.memoizedProps.value!=null&&vp(z,"number",z.value)}switch(nt=x?js(x):window,e){case"focusin":(gS(nt)||nt.contentEditable==="true")&&(oo=nt,$g=x,oc=null);break;case"focusout":oc=$g=oo=null;break;case"mousedown":Gg=!0;break;case"contextmenu":case"mouseup":case"dragend":Gg=!1,wS(V,s,H);break;case"selectionchange":if(VL)break;case"keydown":case"keyup":wS(V,s,H)}var Rt;if(jg)t:{switch(e){case"compositionstart":var ut="onCompositionStart";break t;case"compositionend":ut="onCompositionEnd";break t;case"compositionupdate":ut="onCompositionUpdate";break t}ut=void 0}else ro?pS(e,s)&&(ut="onCompositionEnd"):e==="keydown"&&s.keyCode===nT&&(ut="onCompositionStart");ut&&(iT&&s.locale!=="ko"&&(ro||ut!=="onCompositionStart"?ut==="onCompositionEnd"&&ro&&(Rt=hS()):(ia=H,zg="value"in ia?ia.value:ia.textContent,ro=!0)),nt=Cd(x,ut),0<nt.length&&(ut=new tT(ut,e,null,s,H),V.push({event:ut,listeners:nt}),Rt?ut.data=Rt:(Rt=mS(s),Rt!==null&&(ut.data=Rt)))),(Rt=$L?bk(e,s):vk(e,s))&&(ut=Cd(x,"onBeforeInput"),0<ut.length&&(nt=new xL("onBeforeInput","beforeinput",null,s,H),V.push({event:nt,listeners:ut}),nt.data=Rt)),aN(V,e,x,s,H)}zA(V,n)})}function Gl(e,n,s){return{instance:e,listener:n,currentTarget:s}}function Cd(e,n){for(var s=n+"Capture",o=[];e!==null;){var d=e,f=d.stateNode;if(d=d.tag,d!==5&&d!==26&&d!==27||f===null||(d=El(e,s),d!=null&&o.unshift(Gl(e,d,f)),d=El(e,n),d!=null&&o.push(Gl(e,d,f))),e.tag===3)return o;e=e.return}return[]}function Xr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function BA(e,n,s,o,d){for(var f=n._reactName,v=[];s!==null&&s!==o;){var E=s,w=E.alternate,x=E.stateNode;if(E=E.tag,w!==null&&w===o)break;E!==5&&E!==26&&E!==27||x===null||(w=x,d?(x=El(s,f),x!=null&&v.unshift(Gl(s,x,w))):d||(x=El(s,f),x!=null&&v.push(Gl(s,x,w)))),s=s.return}v.length!==0&&e.push({event:n,listeners:v})}function tg(e,n){pk(e,n),e!=="input"&&e!=="textarea"&&e!=="select"||n==null||n.value!==null||K_||(K_=!0,e==="select"&&n.multiple?console.error("`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.",e):console.error("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",e));var s={registrationNameDependencies:Xa,possibleRegistrationNames:Mg};vl(e)||typeof n.is=="string"||gk(e,n,s),n.contentEditable&&!n.suppressContentEditableWarning&&n.children!=null&&console.error("A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional.")}function je(e,n,s,o){n!==s&&(s=Qs(s),Qs(n)!==s&&(o[e]=n))}function rN(e,n,s){n.forEach(function(o){s[$A(o)]=o==="style"?ng(e):e.getAttribute(o)})}function zi(e,n){n===!1?console.error("Expected `%s` listener to be a function, instead got `false`.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.",e,e,e):console.error("Expected `%s` listener to be a function, instead got a value of `%s` type.",e,typeof n)}function FA(e,n){return e=e.namespaceURI===$d||e.namespaceURI===no?e.ownerDocument.createElementNS(e.namespaceURI,e.tagName):e.ownerDocument.createElement(e.tagName),e.innerHTML=n,e.innerHTML}function Qs(e){return W(e)&&(console.error("The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before using it here.",xt(e)),ht(e)),(typeof e=="string"?e:""+e).replace(gI,`
221
- `).replace(yI,"")}function jA(e,n){return n=Qs(n),Qs(e)===n}function xd(){}function ae(e,n,s,o,d,f){switch(s){case"children":typeof o=="string"?(Bu(o,n,!1),n==="body"||n==="textarea"&&o===""||bl(e,o)):(typeof o=="number"||typeof o=="bigint")&&(Bu(""+o,n,!1),n!=="body"&&bl(e,""+o));break;case"className":kt(e,"class",o);break;case"tabIndex":kt(e,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":kt(e,s,o);break;case"style":lS(e,o,f);break;case"data":if(n!=="object"){kt(e,"data",o);break}case"src":case"href":if(o===""&&(n!=="a"||s!=="href")){console.error(s==="src"?'An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.':'An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',s,s),e.removeAttribute(s);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(s);break}st(o,s),o=Sl(""+o),e.setAttribute(s,o);break;case"action":case"formAction":if(o!=null&&(n==="form"?s==="formAction"?console.error("You can only pass the formAction prop to <input> or <button>. Use the action prop on <form>."):typeof o=="function"&&(d.encType==null&&d.method==null||vh||(vh=!0,console.error("Cannot specify a encType or method for a form that specifies a function as the action. React provides those automatically. They will get overridden.")),d.target==null||bh||(bh=!0,console.error("Cannot specify a target for a form that specifies a function as the action. The function will always be executed in the same window."))):n==="input"||n==="button"?s==="action"?console.error("You can only pass the action prop to <form>. Use the formAction prop on <input> or <button>."):n!=="input"||d.type==="submit"||d.type==="image"||yh?n!=="button"||d.type==null||d.type==="submit"||yh?typeof o=="function"&&(d.name==null||Rw||(Rw=!0,console.error('Cannot specify a "name" prop for a button that specifies a function as a formAction. React needs it to encode which action should be invoked. It will get overridden.')),d.formEncType==null&&d.formMethod==null||vh||(vh=!0,console.error("Cannot specify a formEncType or formMethod for a button that specifies a function as a formAction. React provides those automatically. They will get overridden.")),d.formTarget==null||bh||(bh=!0,console.error("Cannot specify a formTarget for a button that specifies a function as a formAction. The function will always be executed in the same window."))):(yh=!0,console.error('A button can only specify a formAction along with type="submit" or no type.')):(yh=!0,console.error('An input can only specify a formAction along with type="submit" or type="image".')):console.error(s==="action"?"You can only pass the action prop to <form>.":"You can only pass the formAction prop to <input> or <button>.")),typeof o=="function"){e.setAttribute(s,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof f=="function"&&(s==="formAction"?(n!=="input"&&ae(e,n,"name",d.name,d,null),ae(e,n,"formEncType",d.formEncType,d,null),ae(e,n,"formMethod",d.formMethod,d,null),ae(e,n,"formTarget",d.formTarget,d,null)):(ae(e,n,"encType",d.encType,d,null),ae(e,n,"method",d.method,d,null),ae(e,n,"target",d.target,d,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(s);break}st(o,s),o=Sl(""+o),e.setAttribute(s,o);break;case"onClick":o!=null&&(typeof o!="function"&&zi(s,o),e.onclick=xd);break;case"onScroll":o!=null&&(typeof o!="function"&&zi(s,o),Ft("scroll",e));break;case"onScrollEnd":o!=null&&(typeof o!="function"&&zi(s,o),Ft("scrollend",e));break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");if(s=o.__html,s!=null){if(d.children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");e.innerHTML=s}}break;case"multiple":e.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":e.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){e.removeAttribute("xlink:href");break}st(o,s),s=Sl(""+o),e.setAttributeNS(ur,"xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":o!=null&&typeof o!="function"&&typeof o!="symbol"?(st(o,s),e.setAttribute(s,""+o)):e.removeAttribute(s);break;case"inert":o!==""||Sh[s]||(Sh[s]=!0,console.error("Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",s));case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":o&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(s,""):e.removeAttribute(s);break;case"capture":case"download":o===!0?e.setAttribute(s,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?(st(o,s),e.setAttribute(s,o)):e.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?(st(o,s),e.setAttribute(s,o)):e.removeAttribute(s);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?e.removeAttribute(s):(st(o,s),e.setAttribute(s,o));break;case"popover":Ft("beforetoggle",e),Ft("toggle",e),qt(e,"popover",o);break;case"xlinkActuate":Fe(e,ur,"xlink:actuate",o);break;case"xlinkArcrole":Fe(e,ur,"xlink:arcrole",o);break;case"xlinkRole":Fe(e,ur,"xlink:role",o);break;case"xlinkShow":Fe(e,ur,"xlink:show",o);break;case"xlinkTitle":Fe(e,ur,"xlink:title",o);break;case"xlinkType":Fe(e,ur,"xlink:type",o);break;case"xmlBase":Fe(e,Oy,"xml:base",o);break;case"xmlLang":Fe(e,Oy,"xml:lang",o);break;case"xmlSpace":Fe(e,Oy,"xml:space",o);break;case"is":f!=null&&console.error('Cannot update the "is" prop after it has been initialized.'),qt(e,"is",o);break;case"innerText":case"textContent":break;case"popoverTarget":Dw||o==null||typeof o!="object"||(Dw=!0,console.error("The `popoverTarget` prop expects the ID of an Element as a string. Received %s instead.",o));default:!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N"?(s=cS(s),qt(e,s,o)):Xa.hasOwnProperty(s)&&o!=null&&typeof o!="function"&&zi(s,o)}}function eg(e,n,s,o,d,f){switch(s){case"style":lS(e,o,f);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");if(s=o.__html,s!=null){if(d.children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");e.innerHTML=s}}break;case"children":typeof o=="string"?bl(e,o):(typeof o=="number"||typeof o=="bigint")&&bl(e,""+o);break;case"onScroll":o!=null&&(typeof o!="function"&&zi(s,o),Ft("scroll",e));break;case"onScrollEnd":o!=null&&(typeof o!="function"&&zi(s,o),Ft("scrollend",e));break;case"onClick":o!=null&&(typeof o!="function"&&zi(s,o),e.onclick=xd);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(Xa.hasOwnProperty(s))o!=null&&typeof o!="function"&&zi(s,o);else t:{if(s[0]==="o"&&s[1]==="n"&&(d=s.endsWith("Capture"),n=s.slice(2,d?s.length-7:void 0),f=e[Dn]||null,f=f!=null?f[s]:null,typeof f=="function"&&e.removeEventListener(n,f,d),typeof o=="function")){typeof f!="function"&&f!==null&&(s in e?e[s]=null:e.hasAttribute(s)&&e.removeAttribute(s)),e.addEventListener(n,o,d);break t}s in e?e[s]=o:o===!0?e.setAttribute(s,""):qt(e,s,o)}}}function Ke(e,n,s){switch(tg(n,s),n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ft("error",e),Ft("load",e);var o=!1,d=!1,f;for(f in s)if(s.hasOwnProperty(f)){var v=s[f];if(v!=null)switch(f){case"src":o=!0;break;case"srcSet":d=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(n+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:ae(e,n,f,v,s,null)}}d&&ae(e,n,"srcSet",s.srcSet,s,null),o&&ae(e,n,"src",s.src,s,null);return;case"input":ft("input",s),Ft("invalid",e);var E=f=v=d=null,w=null,x=null;for(o in s)if(s.hasOwnProperty(o)){var H=s[o];if(H!=null)switch(o){case"name":d=H;break;case"type":v=H;break;case"checked":w=H;break;case"defaultChecked":x=H;break;case"value":f=H;break;case"defaultValue":E=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(n+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:ae(e,n,o,H,s,null)}}q0(e,s),Y0(e,f,E,w,x,v,d,!1),Uu(e);return;case"select":ft("select",s),Ft("invalid",e),o=v=f=null;for(d in s)if(s.hasOwnProperty(d)&&(E=s[d],E!=null))switch(d){case"value":f=E;break;case"defaultValue":v=E;break;case"multiple":o=E;default:ae(e,n,d,E,s,null)}Q0(e,s),n=f,s=v,e.multiple=!!o,n!=null?Ir(e,!!o,n,!1):s!=null&&Ir(e,!!o,s,!0);return;case"textarea":ft("textarea",s),Ft("invalid",e),f=d=o=null;for(v in s)if(s.hasOwnProperty(v)&&(E=s[v],E!=null))switch(v){case"value":o=E;break;case"defaultValue":d=E;break;case"children":f=E;break;case"dangerouslySetInnerHTML":if(E!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");break;default:ae(e,n,v,E,s,null)}K0(e,s),J0(e,o,d,f),Uu(e);return;case"option":X0(e,s);for(w in s)if(s.hasOwnProperty(w)&&(o=s[w],o!=null))switch(w){case"selected":e.selected=o&&typeof o!="function"&&typeof o!="symbol";break;default:ae(e,n,w,o,s,null)}return;case"dialog":Ft("beforetoggle",e),Ft("toggle",e),Ft("cancel",e),Ft("close",e);break;case"iframe":case"object":Ft("load",e);break;case"video":case"audio":for(o=0;o<Oc.length;o++)Ft(Oc[o],e);break;case"image":Ft("error",e),Ft("load",e);break;case"details":Ft("toggle",e);break;case"embed":case"source":case"link":Ft("error",e),Ft("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(x in s)if(s.hasOwnProperty(x)&&(o=s[x],o!=null))switch(x){case"children":case"dangerouslySetInnerHTML":throw Error(n+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:ae(e,n,x,o,s,null)}return;default:if(vl(n)){for(H in s)s.hasOwnProperty(H)&&(o=s[H],o!==void 0&&eg(e,n,H,o,s,void 0));return}}for(E in s)s.hasOwnProperty(E)&&(o=s[E],o!=null&&ae(e,n,E,o,s,null))}function oN(e,n,s,o){switch(tg(n,o),n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var d=null,f=null,v=null,E=null,w=null,x=null,H=null;for(q in s){var V=s[q];if(s.hasOwnProperty(q)&&V!=null)switch(q){case"checked":break;case"value":break;case"defaultValue":w=V;default:o.hasOwnProperty(q)||ae(e,n,q,null,o,V)}}for(var z in o){var q=o[z];if(V=s[z],o.hasOwnProperty(z)&&(q!=null||V!=null))switch(z){case"type":f=q;break;case"name":d=q;break;case"checked":x=q;break;case"defaultChecked":H=q;break;case"value":v=q;break;case"defaultValue":E=q;break;case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(n+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:q!==V&&ae(e,n,z,q,o,V)}}n=s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null,o=o.type==="checkbox"||o.type==="radio"?o.checked!=null:o.value!=null,n||!o||xw||(console.error("A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://react.dev/link/controlled-components"),xw=!0),!n||o||Cw||(console.error("A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://react.dev/link/controlled-components"),Cw=!0),bp(e,v,E,w,x,H,f,d);return;case"select":q=v=E=z=null;for(f in s)if(w=s[f],s.hasOwnProperty(f)&&w!=null)switch(f){case"value":break;case"multiple":q=w;default:o.hasOwnProperty(f)||ae(e,n,f,null,o,w)}for(d in o)if(f=o[d],w=s[d],o.hasOwnProperty(d)&&(f!=null||w!=null))switch(d){case"value":z=f;break;case"defaultValue":E=f;break;case"multiple":v=f;default:f!==w&&ae(e,n,d,f,o,w)}o=E,n=v,s=q,z!=null?Ir(e,!!n,z,!1):!!s!=!!n&&(o!=null?Ir(e,!!n,o,!0):Ir(e,!!n,n?[]:"",!1));return;case"textarea":q=z=null;for(E in s)if(d=s[E],s.hasOwnProperty(E)&&d!=null&&!o.hasOwnProperty(E))switch(E){case"value":break;case"children":break;default:ae(e,n,E,null,o,d)}for(v in o)if(d=o[v],f=s[v],o.hasOwnProperty(v)&&(d!=null||f!=null))switch(v){case"value":z=d;break;case"defaultValue":q=d;break;case"children":break;case"dangerouslySetInnerHTML":if(d!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");break;default:d!==f&&ae(e,n,v,d,o,f)}Z0(e,z,q);return;case"option":for(var ct in s)if(z=s[ct],s.hasOwnProperty(ct)&&z!=null&&!o.hasOwnProperty(ct))switch(ct){case"selected":e.selected=!1;break;default:ae(e,n,ct,null,o,z)}for(w in o)if(z=o[w],q=s[w],o.hasOwnProperty(w)&&z!==q&&(z!=null||q!=null))switch(w){case"selected":e.selected=z&&typeof z!="function"&&typeof z!="symbol";break;default:ae(e,n,w,z,o,q)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var At in s)z=s[At],s.hasOwnProperty(At)&&z!=null&&!o.hasOwnProperty(At)&&ae(e,n,At,null,o,z);for(x in o)if(z=o[x],q=s[x],o.hasOwnProperty(x)&&z!==q&&(z!=null||q!=null))switch(x){case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(n+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:ae(e,n,x,z,o,q)}return;default:if(vl(n)){for(var ce in s)z=s[ce],s.hasOwnProperty(ce)&&z!==void 0&&!o.hasOwnProperty(ce)&&eg(e,n,ce,void 0,o,z);for(H in o)z=o[H],q=s[H],!o.hasOwnProperty(H)||z===q||z===void 0&&q===void 0||eg(e,n,H,z,o,q);return}}for(var jt in s)z=s[jt],s.hasOwnProperty(jt)&&z!=null&&!o.hasOwnProperty(jt)&&ae(e,n,jt,null,o,z);for(V in o)z=o[V],q=s[V],!o.hasOwnProperty(V)||z===q||z==null&&q==null||ae(e,n,V,z,o,q)}function $A(e){switch(e){case"class":return"className";case"for":return"htmlFor";default:return e}}function ng(e){var n={};e=e.style;for(var s=0;s<e.length;s++){var o=e[s];n[o]=e.getPropertyValue(o)}return n}function GA(e,n,s){if(n!=null&&typeof n!="object")console.error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");else{var o,d=o="",f;for(f in n)if(n.hasOwnProperty(f)){var v=n[f];v!=null&&typeof v!="boolean"&&v!==""&&(f.indexOf("--")===0?(vt(v,f),o+=d+f+":"+(""+v).trim()):typeof v!="number"||v===0||W_.has(f)?(vt(v,f),o+=d+f.replace(G_,"-$1").toLowerCase().replace(V_,"-ms-")+":"+(""+v).trim()):o+=d+f.replace(G_,"-$1").toLowerCase().replace(V_,"-ms-")+":"+v+"px",d=";")}o=o||null,n=e.getAttribute("style"),n!==o&&(o=Qs(o),Qs(n)!==o&&(s.style=ng(e)))}}function Jn(e,n,s,o,d,f){if(d.delete(s),e=e.getAttribute(s),e===null)switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":return}else if(o!=null)switch(typeof o){case"function":case"symbol":case"boolean":break;default:if(st(o,n),e===""+o)return}je(n,e,o,f)}function VA(e,n,s,o,d,f){if(d.delete(s),e=e.getAttribute(s),e===null){switch(typeof o){case"function":case"symbol":return}if(!o)return}else switch(typeof o){case"function":case"symbol":break;default:if(o)return}je(n,e,o,f)}function ig(e,n,s,o,d,f){if(d.delete(s),e=e.getAttribute(s),e===null)switch(typeof o){case"undefined":case"function":case"symbol":return}else if(o!=null)switch(typeof o){case"function":case"symbol":break;default:if(st(o,s),e===""+o)return}je(n,e,o,f)}function qA(e,n,s,o,d,f){if(d.delete(s),e=e.getAttribute(s),e===null)switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":return;default:if(isNaN(o))return}else if(o!=null)switch(typeof o){case"function":case"symbol":case"boolean":break;default:if(!isNaN(o)&&(st(o,n),e===""+o))return}je(n,e,o,f)}function sg(e,n,s,o,d,f){if(d.delete(s),e=e.getAttribute(s),e===null)switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":return}else if(o!=null)switch(typeof o){case"function":case"symbol":case"boolean":break;default:if(st(o,n),s=Sl(""+o),e===s)return}je(n,e,o,f)}function YA(e,n,s,o){for(var d={},f=new Set,v=e.attributes,E=0;E<v.length;E++)switch(v[E].name.toLowerCase()){case"value":break;case"checked":break;case"selected":break;default:f.add(v[E].name)}if(vl(n)){for(var w in s)if(s.hasOwnProperty(w)){var x=s[w];if(x!=null){if(Xa.hasOwnProperty(w))typeof x!="function"&&zi(w,x);else if(s.suppressHydrationWarning!==!0)switch(w){case"children":typeof x!="string"&&typeof x!="number"||je("children",e.textContent,x,d);continue;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":continue;case"dangerouslySetInnerHTML":v=e.innerHTML,x=x?x.__html:void 0,x!=null&&(x=FA(e,x),je(w,v,x,d));continue;case"style":f.delete(w),GA(e,x,d);continue;case"offsetParent":case"offsetTop":case"offsetLeft":case"offsetWidth":case"offsetHeight":case"isContentEditable":case"outerText":case"outerHTML":f.delete(w.toLowerCase()),console.error("Assignment to read-only property will result in a no-op: `%s`",w);continue;case"className":f.delete("class"),v=Ot(e,"class",x),je("className",v,x,d);continue;default:o.context===xs&&n!=="svg"&&n!=="math"?f.delete(w.toLowerCase()):f.delete(w),v=Ot(e,w,x),je(w,v,x,d)}}}}else for(x in s)if(s.hasOwnProperty(x)&&(w=s[x],w!=null)){if(Xa.hasOwnProperty(x))typeof w!="function"&&zi(x,w);else if(s.suppressHydrationWarning!==!0)switch(x){case"children":typeof w!="string"&&typeof w!="number"||je("children",e.textContent,w,d);continue;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"value":case"checked":case"selected":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":continue;case"dangerouslySetInnerHTML":v=e.innerHTML,w=w?w.__html:void 0,w!=null&&(w=FA(e,w),v!==w&&(d[x]={__html:v}));continue;case"className":Jn(e,x,"class",w,f,d);continue;case"tabIndex":Jn(e,x,"tabindex",w,f,d);continue;case"style":f.delete(x),GA(e,w,d);continue;case"multiple":f.delete(x),je(x,e.multiple,w,d);continue;case"muted":f.delete(x),je(x,e.muted,w,d);continue;case"autoFocus":f.delete("autofocus"),je(x,e.autofocus,w,d);continue;case"data":if(n!=="object"){f.delete(x),v=e.getAttribute("data"),je(x,v,w,d);continue}case"src":case"href":if(!(w!==""||n==="a"&&x==="href"||n==="object"&&x==="data")){console.error(x==="src"?'An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.':'An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',x,x);continue}sg(e,x,x,w,f,d);continue;case"action":case"formAction":if(v=e.getAttribute(x),typeof w=="function"){f.delete(x.toLowerCase()),x==="formAction"?(f.delete("name"),f.delete("formenctype"),f.delete("formmethod"),f.delete("formtarget")):(f.delete("enctype"),f.delete("method"),f.delete("target"));continue}else if(v===bI){f.delete(x.toLowerCase()),je(x,"function",w,d);continue}sg(e,x,x.toLowerCase(),w,f,d);continue;case"xlinkHref":sg(e,x,"xlink:href",w,f,d);continue;case"contentEditable":ig(e,x,"contenteditable",w,f,d);continue;case"spellCheck":ig(e,x,"spellcheck",w,f,d);continue;case"draggable":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":ig(e,x,x,w,f,d);continue;case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":VA(e,x,x.toLowerCase(),w,f,d);continue;case"capture":case"download":t:{E=e;var H=v=x,V=d;if(f.delete(H),E=E.getAttribute(H),E===null)switch(typeof w){case"undefined":case"function":case"symbol":break t;default:if(w===!1)break t}else if(w!=null)switch(typeof w){case"function":case"symbol":break;case"boolean":if(w===!0&&E==="")break t;break;default:if(st(w,v),E===""+w)break t}je(v,E,w,V)}continue;case"cols":case"rows":case"size":case"span":t:{if(E=e,H=v=x,V=d,f.delete(H),E=E.getAttribute(H),E===null)switch(typeof w){case"undefined":case"function":case"symbol":case"boolean":break t;default:if(isNaN(w)||1>w)break t}else if(w!=null)switch(typeof w){case"function":case"symbol":case"boolean":break;default:if(!(isNaN(w)||1>w)&&(st(w,v),E===""+w))break t}je(v,E,w,V)}continue;case"rowSpan":qA(e,x,"rowspan",w,f,d);continue;case"start":qA(e,x,x,w,f,d);continue;case"xHeight":Jn(e,x,"x-height",w,f,d);continue;case"xlinkActuate":Jn(e,x,"xlink:actuate",w,f,d);continue;case"xlinkArcrole":Jn(e,x,"xlink:arcrole",w,f,d);continue;case"xlinkRole":Jn(e,x,"xlink:role",w,f,d);continue;case"xlinkShow":Jn(e,x,"xlink:show",w,f,d);continue;case"xlinkTitle":Jn(e,x,"xlink:title",w,f,d);continue;case"xlinkType":Jn(e,x,"xlink:type",w,f,d);continue;case"xmlBase":Jn(e,x,"xml:base",w,f,d);continue;case"xmlLang":Jn(e,x,"xml:lang",w,f,d);continue;case"xmlSpace":Jn(e,x,"xml:space",w,f,d);continue;case"inert":w!==""||Sh[x]||(Sh[x]=!0,console.error("Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",x)),VA(e,x,x,w,f,d);continue;default:if(!(2<x.length)||x[0]!=="o"&&x[0]!=="O"||x[1]!=="n"&&x[1]!=="N"){E=cS(x),v=!1,o.context===xs&&n!=="svg"&&n!=="math"?f.delete(E.toLowerCase()):(H=x.toLowerCase(),H=Gd.hasOwnProperty(H)&&Gd[H]||null,H!==null&&H!==x&&(v=!0,f.delete(H)),f.delete(E));t:if(H=e,V=E,E=w,Lt(V))if(H.hasAttribute(V))H=H.getAttribute(V),st(E,V),E=H===""+E?E:H;else{switch(typeof E){case"function":case"symbol":break t;case"boolean":if(H=V.toLowerCase().slice(0,5),H!=="data-"&&H!=="aria-")break t}E=E===void 0?void 0:null}else E=void 0;v||je(x,E,w,d)}}}return 0<f.size&&s.suppressHydrationWarning!==!0&&rN(e,f,d),Object.keys(d).length===0?null:d}function lN(e,n){switch(e.length){case 0:return"";case 1:return e[0];case 2:return e[0]+" "+n+" "+e[1];default:return e.slice(0,-1).join(", ")+", "+n+" "+e[e.length-1]}}function Rd(e){return e.nodeType===9?e:e.ownerDocument}function XA(e){switch(e){case no:return Lo;case $d:return _h;default:return xs}}function WA(e,n){if(e===xs)switch(n){case"svg":return Lo;case"math":return _h;default:return xs}return e===Lo&&n==="foreignObject"?xs:e}function ag(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}function cN(){var e=window.event;return e&&e.type==="popstate"?e===Iy?!1:(Iy=e,!0):(Iy=null,!1)}function uN(e){setTimeout(function(){throw e})}function dN(e,n,s){switch(n){case"button":case"input":case"select":case"textarea":s.autoFocus&&e.focus();break;case"img":s.src?e.src=s.src:s.srcSet&&(e.srcset=s.srcSet)}}function hN(e,n,s,o){oN(e,n,s,o),e[Dn]=o}function QA(e){bl(e,"")}function fN(e,n,s){e.nodeValue=s}function Ks(e){return e==="head"}function pN(e,n){e.removeChild(n)}function mN(e,n){(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e).removeChild(n)}function KA(e,n){var s=n,o=0,d=0;do{var f=s.nextSibling;if(e.removeChild(s),f&&f.nodeType===8)if(s=f.data,s===Ah){if(0<o&&8>o){s=o;var v=e.ownerDocument;if(s&SI&&Vl(v.documentElement),s&EI&&Vl(v.body),s&AI)for(s=v.head,Vl(s),v=s.firstChild;v;){var E=v.nextSibling,w=v.nodeName;v[Zl]||w==="SCRIPT"||w==="STYLE"||w==="LINK"&&v.rel.toLowerCase()==="stylesheet"||s.removeChild(v),v=E}}if(d===0){e.removeChild(f),Wl(n);return}d--}else s===Eh||s===Cs||s===kc?d++:o=s.charCodeAt(0)-48;else o=0;s=f}while(s);Wl(n)}function gN(e){e=e.style,typeof e.setProperty=="function"?e.setProperty("display","none","important"):e.display="none"}function yN(e){e.nodeValue=""}function bN(e,n){n=n[_I],n=n!=null&&n.hasOwnProperty("display")?n.display:null,e.style.display=n==null||typeof n=="boolean"?"":(""+n).trim()}function vN(e,n){e.nodeValue=n}function rg(e){var n=e.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var s=n;switch(n=n.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":rg(s),Fs(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}e.removeChild(s)}}function SN(e,n,s,o){for(;e.nodeType===1;){var d=s;if(e.nodeName.toLowerCase()!==n.toLowerCase()){if(!o&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(o){if(!e[Zl])switch(n){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(f=e.getAttribute("rel"),f==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(f!==d.rel||e.getAttribute("href")!==(d.href==null||d.href===""?null:d.href)||e.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin)||e.getAttribute("title")!==(d.title==null?null:d.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(f=e.getAttribute("src"),(f!==(d.src==null?null:d.src)||e.getAttribute("type")!==(d.type==null?null:d.type)||e.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&f&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(n==="input"&&e.type==="hidden"){st(d.name,"name");var f=d.name==null?null:""+d.name;if(d.type==="hidden"&&e.getAttribute("name")===f)return e}else return e;if(e=ti(e.nextSibling),e===null)break}return null}function EN(e,n,s){if(n==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!s||(e=ti(e.nextSibling),e===null))return null;return e}function og(e){return e.data===kc||e.data===Cs&&e.ownerDocument.readyState===Ow}function AN(e,n){var s=e.ownerDocument;if(e.data!==Cs||s.readyState===Ow)n();else{var o=function(){n(),s.removeEventListener("DOMContentLoaded",o)};s.addEventListener("DOMContentLoaded",o),e._reactRetry=o}}function ti(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n===Eh||n===kc||n===Cs||n===ky||n===Mw)break;if(n===Ah)return null}}return e}function ZA(e){if(e.nodeType===1){for(var n=e.nodeName.toLowerCase(),s={},o=e.attributes,d=0;d<o.length;d++){var f=o[d];s[$A(f.name)]=f.name.toLowerCase()==="style"?ng(e):f.value}return{type:n,props:s}}return e.nodeType===8?{type:"Suspense",props:{}}:e.nodeValue}function JA(e,n,s){return s===null||s[vI]!==!0?(e.nodeValue===n?e=null:(n=Qs(n),e=Qs(e.nodeValue)===n?null:e.nodeValue),e):null}function t_(e){e=e.nextSibling;for(var n=0;e;){if(e.nodeType===8){var s=e.data;if(s===Ah){if(n===0)return ti(e.nextSibling);n--}else s!==Eh&&s!==kc&&s!==Cs||n++}e=e.nextSibling}return null}function e_(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var s=e.data;if(s===Eh||s===kc||s===Cs){if(n===0)return e;n--}else s===Ah&&n++}e=e.previousSibling}return null}function _N(e){Wl(e)}function TN(e){Wl(e)}function n_(e,n,s,o,d){switch(d&&Tp(e,o.ancestorInfo),n=Rd(s),e){case"html":if(e=n.documentElement,!e)throw Error("React expected an <html> element (document.documentElement) to exist in the Document but one was not found. React never removes the documentElement for any Document it renders into so the cause is likely in some other script running on this page.");return e;case"head":if(e=n.head,!e)throw Error("React expected a <head> element (document.head) to exist in the Document but one was not found. React never removes the head for any Document it renders into so the cause is likely in some other script running on this page.");return e;case"body":if(e=n.body,!e)throw Error("React expected a <body> element (document.body) to exist in the Document but one was not found. React never removes the body for any Document it renders into so the cause is likely in some other script running on this page.");return e;default:throw Error("resolveSingletonInstance was called with an element type that is not supported. This is a bug in React.")}}function wN(e,n,s,o){if(!s[na]&&yi(s)){var d=s.tagName.toLowerCase();console.error("You are mounting a new %s component when a previous one has not first unmounted. It is an error to render more than one %s component at a time and attributes and children of these components will likely fail in unpredictable ways. Please only render a single instance of <%s> and if you need to mount a new one, ensure any previous ones have unmounted first.",d,d,d)}switch(e){case"html":case"head":case"body":break;default:console.error("acquireSingletonInstance was called with an element type that is not supported. This is a bug in React.")}for(d=s.attributes;d.length;)s.removeAttributeNode(d[0]);Ke(s,e,n),s[rn]=o,s[Dn]=n}function Vl(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);Fs(e)}function Dd(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}function i_(e,n,s){var o=Io;if(o&&typeof n=="string"&&n){var d=Zn(n);d='link[rel="'+e+'"][href="'+d+'"]',typeof s=="string"&&(d+='[crossorigin="'+s+'"]'),Uw.has(d)||(Uw.add(d),e={rel:e,crossOrigin:s,href:n},o.querySelector(d)===null&&(n=o.createElement("link"),Ke(n,"link",e),P(n),o.head.appendChild(n)))}}function s_(e,n,s,o){var d=(d=ta.current)?Dd(d):null;if(!d)throw Error('"resourceRoot" was expected to exist. This is a bug in React.');switch(e){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(s=Wr(s.href),n=T(d).hoistableStyles,o=n.get(s),o||(o={type:"style",instance:null,count:0,state:null},n.set(s,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){e=Wr(s.href);var f=T(d).hoistableStyles,v=f.get(e);if(!v&&(d=d.ownerDocument||d,v={type:"stylesheet",instance:null,count:0,state:{loading:hr,preload:null}},f.set(e,v),(f=d.querySelector(ql(e)))&&!f._p&&(v.instance=f,v.state.loading=Nc|di),!hi.has(e))){var E={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy};hi.set(e,E),f||CN(d,e,E,v.state)}if(n&&o===null)throw s=`
220
+ This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act`,Y(e))})}function Ui(e){e!==No&&e.next===null&&(No===null?mh=No=e:No=No.next=e),gh=!0,G.actQueue!==null?xy||(xy=!0,LA()):wy||(wy=!0,LA())}function $l(e,n){if(!Cy&&gh){Cy=!0;do for(var s=!1,o=mh;o!==null;){if(e!==0){var d=o.pendingLanes;if(d===0)var f=0;else{var v=o.suspendedLanes,E=o.pingedLanes;f=(1<<31-pn(42|e)+1)-1,f&=d&~(v&~E),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(s=!0,NA(o,f))}else f=Bt,f=ss(o,o===ce?f:0,o.cancelPendingCommit!==null||o.timeoutHandle!==dr),(f&3)===0||Hs(o,f)||(s=!0,NA(o,f));o=o.next}while(s);Cy=!1}}function iN(){Xm()}function Xm(){gh=xy=wy=!1;var e=0;cr!==0&&(lN()&&(e=cr),cr=0);for(var n=Bi(),s=null,o=mh;o!==null;){var d=o.next,f=OA(o,n);f===0?(o.next=null,s===null?mh=d:s.next=d,d===null&&(No=s)):(s=o,(e!==0||(f&3)!==0)&&(gh=!0)),o=d}$l(e)}function OA(e,n){for(var s=e.suspendedLanes,o=e.pingedLanes,d=e.expirationTimes,f=e.pendingLanes&-62914561;0<f;){var v=31-pn(f),E=1<<v,w=d[v];w===-1?((E&s)===0||(E&o)!==0)&&(d[v]=hp(E,n)):w<=n&&(e.expiredLanes|=E),f&=~E}if(n=ce,s=Bt,s=ss(e,e===n?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==dr),o=e.callbackNode,s===0||e===n&&(ee===sr||ee===ar)||e.cancelPendingCommit!==null)return o!==null&&Ym(o),e.callbackNode=null,e.callbackPriority=0;if((s&3)===0||Hs(e,s)){if(n=s&-s,n!==e.callbackPriority||G.actQueue!==null&&o!==Ry)Ym(o);else return n;switch(Nr(s)){case ei:case ji:s=xg;break;case ys:s=Jr;break;case jd:s=Cg;break;default:s=Jr}return o=kA.bind(null,e),G.actQueue!==null?(G.actQueue.push(o),s=Ry):s=Tg(s,o),e.callbackPriority=n,e.callbackNode=s,n}return o!==null&&Ym(o),e.callbackPriority=2,e.callbackNode=null,2}function kA(e,n){if(eh=th=!1,en!==or&&en!==Sy)return e.callbackNode=null,e.callbackPriority=0,null;var s=e.callbackNode;if(Fl()&&e.callbackNode!==s)return null;var o=Bt;return o=ss(e,e===ce?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==dr),o===0?null:(hA(e,o,n),OA(e,Bi()),e.callbackNode!=null&&e.callbackNode===s?kA.bind(null,e):null)}function NA(e,n){if(Fl())return null;th=eh,eh=!1,hA(e,n,!0)}function Ym(e){e!==Ry&&e!==null&&GN(e)}function LA(){G.actQueue!==null&&G.actQueue.push(function(){return Xm(),null}),TI(function(){(te&(vn|wi))!==Gn?Tg(wg,iN):Xm()})}function Wm(){return cr===0&&(cr=Pt()),cr}function IA(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:(st(e,"action"),Sl(""+e))}function PA(e,n){var s=n.ownerDocument.createElement("input");return s.name=n.name,s.value=n.value,e.id&&s.setAttribute("form",e.id),n.parentNode.insertBefore(s,n),e=new FormData(e),s.parentNode.removeChild(s),e}function sN(e,n,s,o,d){if(n==="submit"&&s&&s.stateNode===d){var f=IA((d[Dn]||null).action),v=o.submitter;v&&(n=(n=v[Dn]||null)?IA(n.formAction):v.getAttribute("formAction"),n!==null&&(f=n,v=null));var E=new Xd("action","action",null,o,d);e.push({event:E,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(cr!==0){var w=v?PA(d,v):new FormData(d),C={pending:!0,data:w,method:d.method,action:f};Object.freeze(C),pm(s,C,null,w)}}else typeof f=="function"&&(E.preventDefault(),w=v?PA(d,v):new FormData(d),C={pending:!0,data:w,method:d.method,action:f},Object.freeze(C),pm(s,C,f,w))},currentTarget:d}]})}}function xd(e,n,s){e.currentTarget=s;try{n(e)}catch(o){cy(o)}e.currentTarget=null}function UA(e,n){n=(n&4)!==0;for(var s=0;s<e.length;s++){var o=e[s];t:{var d=void 0,f=o.event;if(o=o.listeners,n)for(var v=o.length-1;0<=v;v--){var E=o[v],w=E.instance,C=E.currentTarget;if(E=E.listener,w!==d&&f.isPropagationStopped())break t;w!==null?pt(w,xd,f,E,C):xd(f,E,C),d=w}else for(v=0;v<o.length;v++){if(E=o[v],w=E.instance,C=E.currentTarget,E=E.listener,w!==d&&f.isPropagationStopped())break t;w!==null?pt(w,xd,f,E,C):xd(f,E,C),d=w}}}}function Ft(e,n){Dy.has(e)||console.error('Did not expect a listenToNonDelegatedEvent() call for "%s". This is a bug in React. Please file an issue.',e);var s=n[Rg];s===void 0&&(s=n[Rg]=new Set);var o=e+"__bubble";s.has(o)||(zA(n,e,2,!1),s.add(o))}function Qm(e,n,s){Dy.has(e)&&!n&&console.error('Did not expect a listenToNativeEvent() call for "%s" in the bubble phase. This is a bug in React. Please file an issue.',e);var o=0;n&&(o|=4),zA(s,e,o,n)}function Km(e){if(!e[yh]){e[yh]=!0,E_.forEach(function(s){s!=="selectionchange"&&(Dy.has(s)||Qm(s,!1,e),Qm(s,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[yh]||(n[yh]=!0,Qm("selectionchange",!1,n))}}function zA(e,n,s,o){switch(f_(n)){case ei:var d=LN;break;case ji:d=IN;break;default:d=hg}s=d.bind(null,n,s,e),d=void 0,!Pg||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(d=!0),o?d!==void 0?e.addEventListener(n,s,{capture:!0,passive:d}):e.addEventListener(n,s,!0):d!==void 0?e.addEventListener(n,s,{passive:d}):e.addEventListener(n,s,!1)}function Zm(e,n,s,o,d){var f=o;if((n&1)===0&&(n&2)===0&&o!==null)t:for(;;){if(o===null)return;var v=o.tag;if(v===3||v===4){var E=o.stateNode.containerInfo;if(E===d)break;if(v===4)for(v=o.return;v!==null;){var w=v.tag;if((w===3||w===4)&&v.stateNode.containerInfo===d)return;v=v.return}for(;E!==null;){if(v=gi(E),v===null)return;if(w=v.tag,w===5||w===6||w===26||w===27){o=f=v;continue t}E=E.parentNode}}o=o.return}uS(function(){var C=f,H=Tp(s),V=[];t:{var z=hT.get(e);if(z!==void 0){var q=Xd,ct=e;switch(e){case"keypress":if(ju(s)===0)break t;case"keydown":case"keyup":q=OL;break;case"focusin":ct="focus",q=Bg;break;case"focusout":ct="blur",q=Bg;break;case"beforeblur":case"afterblur":q=Bg;break;case"click":if(s.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":q=Z_;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":q=vL;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":q=LL;break;case lT:case cT:case uT:q=AL;break;case dT:q=PL;break;case"scroll":case"scrollend":q=yL;break;case"wheel":q=zL;break;case"copy":case"cut":case"paste":q=TL;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":q=tT;break;case"toggle":case"beforetoggle":q=BL}var At=(n&4)!==0,ue=!At&&(e==="scroll"||e==="scrollend"),jt=At?z!==null?z+"Capture":null:z;At=[];for(var D=C,M;D!==null;){var N=D;if(M=N.stateNode,N=N.tag,N!==5&&N!==26&&N!==27||M===null||jt===null||(N=El(D,jt),N!=null&&At.push(Gl(D,N,M))),ue)break;D=D.return}0<At.length&&(z=new q(z,ct,null,s,H),V.push({event:z,listeners:At}))}}if((n&7)===0){t:{if(z=e==="mouseover"||e==="pointerover",q=e==="mouseout"||e==="pointerout",z&&s!==tc&&(ct=s.relatedTarget||s.fromElement)&&(gi(ct)||ct[na]))break t;if((q||z)&&(z=H.window===H?H:(z=H.ownerDocument)?z.defaultView||z.parentWindow:window,q?(ct=s.relatedTarget||s.toElement,q=C,ct=ct?gi(ct):null,ct!==null&&(ue=x(ct),At=ct.tag,ct!==ue||At!==5&&At!==27&&At!==6)&&(ct=null)):(q=null,ct=C),q!==ct)){if(At=Z_,N="onMouseLeave",jt="onMouseEnter",D="mouse",(e==="pointerout"||e==="pointerover")&&(At=tT,N="onPointerLeave",jt="onPointerEnter",D="pointer"),ue=q==null?z:js(q),M=ct==null?z:js(ct),z=new At(N,D+"leave",q,s,H),z.target=ue,z.relatedTarget=M,N=null,gi(H)===C&&(At=new At(jt,D+"enter",ct,s,H),At.target=M,At.relatedTarget=ue,N=At),ue=N,q&&ct)e:{for(At=q,jt=ct,D=0,M=At;M;M=Yr(M))D++;for(M=0,N=jt;N;N=Yr(N))M++;for(;0<D-M;)At=Yr(At),D--;for(;0<M-D;)jt=Yr(jt),M--;for(;D--;){if(At===jt||jt!==null&&At===jt.alternate)break e;At=Yr(At),jt=Yr(jt)}At=null}else At=null;q!==null&&HA(V,z,q,At,!1),ct!==null&&ue!==null&&HA(V,ue,ct,At,!0)}}t:{if(z=C?js(C):window,q=z.nodeName&&z.nodeName.toLowerCase(),q==="select"||q==="input"&&z.type==="file")var X=yS;else if(mS(z))if(rT)X=Tk;else{X=Ak;var nt=Ek}else q=z.nodeName,!q||q.toLowerCase()!=="input"||z.type!=="checkbox"&&z.type!=="radio"?C&&vl(C.elementType)&&(X=yS):X=_k;if(X&&(X=X(e,C))){gS(V,X,s,H);break t}nt&&nt(e,z,C),e==="focusout"&&C&&z.type==="number"&&C.memoizedProps.value!=null&&bp(z,"number",z.value)}switch(nt=C?js(C):window,e){case"focusin":(mS(nt)||nt.contentEditable==="true")&&(oo=nt,jg=C,oc=null);break;case"focusout":oc=jg=oo=null;break;case"mousedown":$g=!0;break;case"contextmenu":case"mouseup":case"dragend":$g=!1,TS(V,s,H);break;case"selectionchange":if(GL)break;case"keydown":case"keyup":TS(V,s,H)}var Rt;if(Fg)t:{switch(e){case"compositionstart":var ut="onCompositionStart";break t;case"compositionend":ut="onCompositionEnd";break t;case"compositionupdate":ut="onCompositionUpdate";break t}ut=void 0}else ro?fS(e,s)&&(ut="onCompositionEnd"):e==="keydown"&&s.keyCode===eT&&(ut="onCompositionStart");ut&&(nT&&s.locale!=="ko"&&(ro||ut!=="onCompositionStart"?ut==="onCompositionEnd"&&ro&&(Rt=dS()):(ia=H,Ug="value"in ia?ia.value:ia.textContent,ro=!0)),nt=Cd(C,ut),0<nt.length&&(ut=new J_(ut,e,null,s,H),V.push({event:ut,listeners:nt}),Rt?ut.data=Rt:(Rt=pS(s),Rt!==null&&(ut.data=Rt)))),(Rt=jL?yk(e,s):bk(e,s))&&(ut=Cd(C,"onBeforeInput"),0<ut.length&&(nt=new xL("onBeforeInput","beforeinput",null,s,H),V.push({event:nt,listeners:ut}),nt.data=Rt)),sN(V,e,C,s,H)}UA(V,n)})}function Gl(e,n,s){return{instance:e,listener:n,currentTarget:s}}function Cd(e,n){for(var s=n+"Capture",o=[];e!==null;){var d=e,f=d.stateNode;if(d=d.tag,d!==5&&d!==26&&d!==27||f===null||(d=El(e,s),d!=null&&o.unshift(Gl(e,d,f)),d=El(e,n),d!=null&&o.push(Gl(e,d,f))),e.tag===3)return o;e=e.return}return[]}function Yr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function HA(e,n,s,o,d){for(var f=n._reactName,v=[];s!==null&&s!==o;){var E=s,w=E.alternate,C=E.stateNode;if(E=E.tag,w!==null&&w===o)break;E!==5&&E!==26&&E!==27||C===null||(w=C,d?(C=El(s,f),C!=null&&v.unshift(Gl(s,C,w))):d||(C=El(s,f),C!=null&&v.push(Gl(s,C,w)))),s=s.return}v.length!==0&&e.push({event:n,listeners:v})}function Jm(e,n){fk(e,n),e!=="input"&&e!=="textarea"&&e!=="select"||n==null||n.value!==null||Q_||(Q_=!0,e==="select"&&n.multiple?console.error("`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.",e):console.error("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",e));var s={registrationNameDependencies:Ya,possibleRegistrationNames:Dg};vl(e)||typeof n.is=="string"||mk(e,n,s),n.contentEditable&&!n.suppressContentEditableWarning&&n.children!=null&&console.error("A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional.")}function je(e,n,s,o){n!==s&&(s=Qs(s),Qs(n)!==s&&(o[e]=n))}function aN(e,n,s){n.forEach(function(o){s[jA(o)]=o==="style"?eg(e):e.getAttribute(o)})}function zi(e,n){n===!1?console.error("Expected `%s` listener to be a function, instead got `false`.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.",e,e,e):console.error("Expected `%s` listener to be a function, instead got a value of `%s` type.",e,typeof n)}function BA(e,n){return e=e.namespaceURI===Gd||e.namespaceURI===no?e.ownerDocument.createElementNS(e.namespaceURI,e.tagName):e.ownerDocument.createElement(e.tagName),e.innerHTML=n,e.innerHTML}function Qs(e){return W(e)&&(console.error("The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before using it here.",Ct(e)),ht(e)),(typeof e=="string"?e:""+e).replace(mI,`
221
+ `).replace(gI,"")}function FA(e,n){return n=Qs(n),Qs(e)===n}function Rd(){}function ae(e,n,s,o,d,f){switch(s){case"children":typeof o=="string"?(Fu(o,n,!1),n==="body"||n==="textarea"&&o===""||bl(e,o)):(typeof o=="number"||typeof o=="bigint")&&(Fu(""+o,n,!1),n!=="body"&&bl(e,""+o));break;case"className":kt(e,"class",o);break;case"tabIndex":kt(e,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":kt(e,s,o);break;case"style":oS(e,o,f);break;case"data":if(n!=="object"){kt(e,"data",o);break}case"src":case"href":if(o===""&&(n!=="a"||s!=="href")){console.error(s==="src"?'An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.':'An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',s,s),e.removeAttribute(s);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(s);break}st(o,s),o=Sl(""+o),e.setAttribute(s,o);break;case"action":case"formAction":if(o!=null&&(n==="form"?s==="formAction"?console.error("You can only pass the formAction prop to <input> or <button>. Use the action prop on <form>."):typeof o=="function"&&(d.encType==null&&d.method==null||Sh||(Sh=!0,console.error("Cannot specify a encType or method for a form that specifies a function as the action. React provides those automatically. They will get overridden.")),d.target==null||vh||(vh=!0,console.error("Cannot specify a target for a form that specifies a function as the action. The function will always be executed in the same window."))):n==="input"||n==="button"?s==="action"?console.error("You can only pass the action prop to <form>. Use the formAction prop on <input> or <button>."):n!=="input"||d.type==="submit"||d.type==="image"||bh?n!=="button"||d.type==null||d.type==="submit"||bh?typeof o=="function"&&(d.name==null||Cw||(Cw=!0,console.error('Cannot specify a "name" prop for a button that specifies a function as a formAction. React needs it to encode which action should be invoked. It will get overridden.')),d.formEncType==null&&d.formMethod==null||Sh||(Sh=!0,console.error("Cannot specify a formEncType or formMethod for a button that specifies a function as a formAction. React provides those automatically. They will get overridden.")),d.formTarget==null||vh||(vh=!0,console.error("Cannot specify a formTarget for a button that specifies a function as a formAction. The function will always be executed in the same window."))):(bh=!0,console.error('A button can only specify a formAction along with type="submit" or no type.')):(bh=!0,console.error('An input can only specify a formAction along with type="submit" or type="image".')):console.error(s==="action"?"You can only pass the action prop to <form>.":"You can only pass the formAction prop to <input> or <button>.")),typeof o=="function"){e.setAttribute(s,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof f=="function"&&(s==="formAction"?(n!=="input"&&ae(e,n,"name",d.name,d,null),ae(e,n,"formEncType",d.formEncType,d,null),ae(e,n,"formMethod",d.formMethod,d,null),ae(e,n,"formTarget",d.formTarget,d,null)):(ae(e,n,"encType",d.encType,d,null),ae(e,n,"method",d.method,d,null),ae(e,n,"target",d.target,d,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(s);break}st(o,s),o=Sl(""+o),e.setAttribute(s,o);break;case"onClick":o!=null&&(typeof o!="function"&&zi(s,o),e.onclick=Rd);break;case"onScroll":o!=null&&(typeof o!="function"&&zi(s,o),Ft("scroll",e));break;case"onScrollEnd":o!=null&&(typeof o!="function"&&zi(s,o),Ft("scrollend",e));break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");if(s=o.__html,s!=null){if(d.children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");e.innerHTML=s}}break;case"multiple":e.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":e.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){e.removeAttribute("xlink:href");break}st(o,s),s=Sl(""+o),e.setAttributeNS(ur,"xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":o!=null&&typeof o!="function"&&typeof o!="symbol"?(st(o,s),e.setAttribute(s,""+o)):e.removeAttribute(s);break;case"inert":o!==""||Eh[s]||(Eh[s]=!0,console.error("Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",s));case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":o&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(s,""):e.removeAttribute(s);break;case"capture":case"download":o===!0?e.setAttribute(s,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?(st(o,s),e.setAttribute(s,o)):e.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?(st(o,s),e.setAttribute(s,o)):e.removeAttribute(s);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?e.removeAttribute(s):(st(o,s),e.setAttribute(s,o));break;case"popover":Ft("beforetoggle",e),Ft("toggle",e),qt(e,"popover",o);break;case"xlinkActuate":Fe(e,ur,"xlink:actuate",o);break;case"xlinkArcrole":Fe(e,ur,"xlink:arcrole",o);break;case"xlinkRole":Fe(e,ur,"xlink:role",o);break;case"xlinkShow":Fe(e,ur,"xlink:show",o);break;case"xlinkTitle":Fe(e,ur,"xlink:title",o);break;case"xlinkType":Fe(e,ur,"xlink:type",o);break;case"xmlBase":Fe(e,My,"xml:base",o);break;case"xmlLang":Fe(e,My,"xml:lang",o);break;case"xmlSpace":Fe(e,My,"xml:space",o);break;case"is":f!=null&&console.error('Cannot update the "is" prop after it has been initialized.'),qt(e,"is",o);break;case"innerText":case"textContent":break;case"popoverTarget":Rw||o==null||typeof o!="object"||(Rw=!0,console.error("The `popoverTarget` prop expects the ID of an Element as a string. Received %s instead.",o));default:!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N"?(s=lS(s),qt(e,s,o)):Ya.hasOwnProperty(s)&&o!=null&&typeof o!="function"&&zi(s,o)}}function tg(e,n,s,o,d,f){switch(s){case"style":oS(e,o,f);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");if(s=o.__html,s!=null){if(d.children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");e.innerHTML=s}}break;case"children":typeof o=="string"?bl(e,o):(typeof o=="number"||typeof o=="bigint")&&bl(e,""+o);break;case"onScroll":o!=null&&(typeof o!="function"&&zi(s,o),Ft("scroll",e));break;case"onScrollEnd":o!=null&&(typeof o!="function"&&zi(s,o),Ft("scrollend",e));break;case"onClick":o!=null&&(typeof o!="function"&&zi(s,o),e.onclick=Rd);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(Ya.hasOwnProperty(s))o!=null&&typeof o!="function"&&zi(s,o);else t:{if(s[0]==="o"&&s[1]==="n"&&(d=s.endsWith("Capture"),n=s.slice(2,d?s.length-7:void 0),f=e[Dn]||null,f=f!=null?f[s]:null,typeof f=="function"&&e.removeEventListener(n,f,d),typeof o=="function")){typeof f!="function"&&f!==null&&(s in e?e[s]=null:e.hasAttribute(s)&&e.removeAttribute(s)),e.addEventListener(n,o,d);break t}s in e?e[s]=o:o===!0?e.setAttribute(s,""):qt(e,s,o)}}}function Ke(e,n,s){switch(Jm(n,s),n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ft("error",e),Ft("load",e);var o=!1,d=!1,f;for(f in s)if(s.hasOwnProperty(f)){var v=s[f];if(v!=null)switch(f){case"src":o=!0;break;case"srcSet":d=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(n+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:ae(e,n,f,v,s,null)}}d&&ae(e,n,"srcSet",s.srcSet,s,null),o&&ae(e,n,"src",s.src,s,null);return;case"input":ft("input",s),Ft("invalid",e);var E=f=v=d=null,w=null,C=null;for(o in s)if(s.hasOwnProperty(o)){var H=s[o];if(H!=null)switch(o){case"name":d=H;break;case"type":v=H;break;case"checked":w=H;break;case"defaultChecked":C=H;break;case"value":f=H;break;case"defaultValue":E=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(n+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:ae(e,n,o,H,s,null)}}V0(e,s),q0(e,f,E,w,C,v,d,!1),zu(e);return;case"select":ft("select",s),Ft("invalid",e),o=v=f=null;for(d in s)if(s.hasOwnProperty(d)&&(E=s[d],E!=null))switch(d){case"value":f=E;break;case"defaultValue":v=E;break;case"multiple":o=E;default:ae(e,n,d,E,s,null)}W0(e,s),n=f,s=v,e.multiple=!!o,n!=null?Ir(e,!!o,n,!1):s!=null&&Ir(e,!!o,s,!0);return;case"textarea":ft("textarea",s),Ft("invalid",e),f=d=o=null;for(v in s)if(s.hasOwnProperty(v)&&(E=s[v],E!=null))switch(v){case"value":o=E;break;case"defaultValue":d=E;break;case"children":f=E;break;case"dangerouslySetInnerHTML":if(E!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");break;default:ae(e,n,v,E,s,null)}Q0(e,s),Z0(e,o,d,f),zu(e);return;case"option":X0(e,s);for(w in s)if(s.hasOwnProperty(w)&&(o=s[w],o!=null))switch(w){case"selected":e.selected=o&&typeof o!="function"&&typeof o!="symbol";break;default:ae(e,n,w,o,s,null)}return;case"dialog":Ft("beforetoggle",e),Ft("toggle",e),Ft("cancel",e),Ft("close",e);break;case"iframe":case"object":Ft("load",e);break;case"video":case"audio":for(o=0;o<Oc.length;o++)Ft(Oc[o],e);break;case"image":Ft("error",e),Ft("load",e);break;case"details":Ft("toggle",e);break;case"embed":case"source":case"link":Ft("error",e),Ft("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(C in s)if(s.hasOwnProperty(C)&&(o=s[C],o!=null))switch(C){case"children":case"dangerouslySetInnerHTML":throw Error(n+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:ae(e,n,C,o,s,null)}return;default:if(vl(n)){for(H in s)s.hasOwnProperty(H)&&(o=s[H],o!==void 0&&tg(e,n,H,o,s,void 0));return}}for(E in s)s.hasOwnProperty(E)&&(o=s[E],o!=null&&ae(e,n,E,o,s,null))}function rN(e,n,s,o){switch(Jm(n,o),n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var d=null,f=null,v=null,E=null,w=null,C=null,H=null;for(q in s){var V=s[q];if(s.hasOwnProperty(q)&&V!=null)switch(q){case"checked":break;case"value":break;case"defaultValue":w=V;default:o.hasOwnProperty(q)||ae(e,n,q,null,o,V)}}for(var z in o){var q=o[z];if(V=s[z],o.hasOwnProperty(z)&&(q!=null||V!=null))switch(z){case"type":f=q;break;case"name":d=q;break;case"checked":C=q;break;case"defaultChecked":H=q;break;case"value":v=q;break;case"defaultValue":E=q;break;case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(n+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:q!==V&&ae(e,n,z,q,o,V)}}n=s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null,o=o.type==="checkbox"||o.type==="radio"?o.checked!=null:o.value!=null,n||!o||xw||(console.error("A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://react.dev/link/controlled-components"),xw=!0),!n||o||ww||(console.error("A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://react.dev/link/controlled-components"),ww=!0),yp(e,v,E,w,C,H,f,d);return;case"select":q=v=E=z=null;for(f in s)if(w=s[f],s.hasOwnProperty(f)&&w!=null)switch(f){case"value":break;case"multiple":q=w;default:o.hasOwnProperty(f)||ae(e,n,f,null,o,w)}for(d in o)if(f=o[d],w=s[d],o.hasOwnProperty(d)&&(f!=null||w!=null))switch(d){case"value":z=f;break;case"defaultValue":E=f;break;case"multiple":v=f;default:f!==w&&ae(e,n,d,f,o,w)}o=E,n=v,s=q,z!=null?Ir(e,!!n,z,!1):!!s!=!!n&&(o!=null?Ir(e,!!n,o,!0):Ir(e,!!n,n?[]:"",!1));return;case"textarea":q=z=null;for(E in s)if(d=s[E],s.hasOwnProperty(E)&&d!=null&&!o.hasOwnProperty(E))switch(E){case"value":break;case"children":break;default:ae(e,n,E,null,o,d)}for(v in o)if(d=o[v],f=s[v],o.hasOwnProperty(v)&&(d!=null||f!=null))switch(v){case"value":z=d;break;case"defaultValue":q=d;break;case"children":break;case"dangerouslySetInnerHTML":if(d!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");break;default:d!==f&&ae(e,n,v,d,o,f)}K0(e,z,q);return;case"option":for(var ct in s)if(z=s[ct],s.hasOwnProperty(ct)&&z!=null&&!o.hasOwnProperty(ct))switch(ct){case"selected":e.selected=!1;break;default:ae(e,n,ct,null,o,z)}for(w in o)if(z=o[w],q=s[w],o.hasOwnProperty(w)&&z!==q&&(z!=null||q!=null))switch(w){case"selected":e.selected=z&&typeof z!="function"&&typeof z!="symbol";break;default:ae(e,n,w,z,o,q)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var At in s)z=s[At],s.hasOwnProperty(At)&&z!=null&&!o.hasOwnProperty(At)&&ae(e,n,At,null,o,z);for(C in o)if(z=o[C],q=s[C],o.hasOwnProperty(C)&&z!==q&&(z!=null||q!=null))switch(C){case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(n+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:ae(e,n,C,z,o,q)}return;default:if(vl(n)){for(var ue in s)z=s[ue],s.hasOwnProperty(ue)&&z!==void 0&&!o.hasOwnProperty(ue)&&tg(e,n,ue,void 0,o,z);for(H in o)z=o[H],q=s[H],!o.hasOwnProperty(H)||z===q||z===void 0&&q===void 0||tg(e,n,H,z,o,q);return}}for(var jt in s)z=s[jt],s.hasOwnProperty(jt)&&z!=null&&!o.hasOwnProperty(jt)&&ae(e,n,jt,null,o,z);for(V in o)z=o[V],q=s[V],!o.hasOwnProperty(V)||z===q||z==null&&q==null||ae(e,n,V,z,o,q)}function jA(e){switch(e){case"class":return"className";case"for":return"htmlFor";default:return e}}function eg(e){var n={};e=e.style;for(var s=0;s<e.length;s++){var o=e[s];n[o]=e.getPropertyValue(o)}return n}function $A(e,n,s){if(n!=null&&typeof n!="object")console.error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");else{var o,d=o="",f;for(f in n)if(n.hasOwnProperty(f)){var v=n[f];v!=null&&typeof v!="boolean"&&v!==""&&(f.indexOf("--")===0?(vt(v,f),o+=d+f+":"+(""+v).trim()):typeof v!="number"||v===0||Y_.has(f)?(vt(v,f),o+=d+f.replace($_,"-$1").toLowerCase().replace(G_,"-ms-")+":"+(""+v).trim()):o+=d+f.replace($_,"-$1").toLowerCase().replace(G_,"-ms-")+":"+v+"px",d=";")}o=o||null,n=e.getAttribute("style"),n!==o&&(o=Qs(o),Qs(n)!==o&&(s.style=eg(e)))}}function Jn(e,n,s,o,d,f){if(d.delete(s),e=e.getAttribute(s),e===null)switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":return}else if(o!=null)switch(typeof o){case"function":case"symbol":case"boolean":break;default:if(st(o,n),e===""+o)return}je(n,e,o,f)}function GA(e,n,s,o,d,f){if(d.delete(s),e=e.getAttribute(s),e===null){switch(typeof o){case"function":case"symbol":return}if(!o)return}else switch(typeof o){case"function":case"symbol":break;default:if(o)return}je(n,e,o,f)}function ng(e,n,s,o,d,f){if(d.delete(s),e=e.getAttribute(s),e===null)switch(typeof o){case"undefined":case"function":case"symbol":return}else if(o!=null)switch(typeof o){case"function":case"symbol":break;default:if(st(o,s),e===""+o)return}je(n,e,o,f)}function VA(e,n,s,o,d,f){if(d.delete(s),e=e.getAttribute(s),e===null)switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":return;default:if(isNaN(o))return}else if(o!=null)switch(typeof o){case"function":case"symbol":case"boolean":break;default:if(!isNaN(o)&&(st(o,n),e===""+o))return}je(n,e,o,f)}function ig(e,n,s,o,d,f){if(d.delete(s),e=e.getAttribute(s),e===null)switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":return}else if(o!=null)switch(typeof o){case"function":case"symbol":case"boolean":break;default:if(st(o,n),s=Sl(""+o),e===s)return}je(n,e,o,f)}function qA(e,n,s,o){for(var d={},f=new Set,v=e.attributes,E=0;E<v.length;E++)switch(v[E].name.toLowerCase()){case"value":break;case"checked":break;case"selected":break;default:f.add(v[E].name)}if(vl(n)){for(var w in s)if(s.hasOwnProperty(w)){var C=s[w];if(C!=null){if(Ya.hasOwnProperty(w))typeof C!="function"&&zi(w,C);else if(s.suppressHydrationWarning!==!0)switch(w){case"children":typeof C!="string"&&typeof C!="number"||je("children",e.textContent,C,d);continue;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":continue;case"dangerouslySetInnerHTML":v=e.innerHTML,C=C?C.__html:void 0,C!=null&&(C=BA(e,C),je(w,v,C,d));continue;case"style":f.delete(w),$A(e,C,d);continue;case"offsetParent":case"offsetTop":case"offsetLeft":case"offsetWidth":case"offsetHeight":case"isContentEditable":case"outerText":case"outerHTML":f.delete(w.toLowerCase()),console.error("Assignment to read-only property will result in a no-op: `%s`",w);continue;case"className":f.delete("class"),v=Ot(e,"class",C),je("className",v,C,d);continue;default:o.context===Cs&&n!=="svg"&&n!=="math"?f.delete(w.toLowerCase()):f.delete(w),v=Ot(e,w,C),je(w,v,C,d)}}}}else for(C in s)if(s.hasOwnProperty(C)&&(w=s[C],w!=null)){if(Ya.hasOwnProperty(C))typeof w!="function"&&zi(C,w);else if(s.suppressHydrationWarning!==!0)switch(C){case"children":typeof w!="string"&&typeof w!="number"||je("children",e.textContent,w,d);continue;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"value":case"checked":case"selected":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":continue;case"dangerouslySetInnerHTML":v=e.innerHTML,w=w?w.__html:void 0,w!=null&&(w=BA(e,w),v!==w&&(d[C]={__html:v}));continue;case"className":Jn(e,C,"class",w,f,d);continue;case"tabIndex":Jn(e,C,"tabindex",w,f,d);continue;case"style":f.delete(C),$A(e,w,d);continue;case"multiple":f.delete(C),je(C,e.multiple,w,d);continue;case"muted":f.delete(C),je(C,e.muted,w,d);continue;case"autoFocus":f.delete("autofocus"),je(C,e.autofocus,w,d);continue;case"data":if(n!=="object"){f.delete(C),v=e.getAttribute("data"),je(C,v,w,d);continue}case"src":case"href":if(!(w!==""||n==="a"&&C==="href"||n==="object"&&C==="data")){console.error(C==="src"?'An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.':'An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',C,C);continue}ig(e,C,C,w,f,d);continue;case"action":case"formAction":if(v=e.getAttribute(C),typeof w=="function"){f.delete(C.toLowerCase()),C==="formAction"?(f.delete("name"),f.delete("formenctype"),f.delete("formmethod"),f.delete("formtarget")):(f.delete("enctype"),f.delete("method"),f.delete("target"));continue}else if(v===yI){f.delete(C.toLowerCase()),je(C,"function",w,d);continue}ig(e,C,C.toLowerCase(),w,f,d);continue;case"xlinkHref":ig(e,C,"xlink:href",w,f,d);continue;case"contentEditable":ng(e,C,"contenteditable",w,f,d);continue;case"spellCheck":ng(e,C,"spellcheck",w,f,d);continue;case"draggable":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":ng(e,C,C,w,f,d);continue;case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":GA(e,C,C.toLowerCase(),w,f,d);continue;case"capture":case"download":t:{E=e;var H=v=C,V=d;if(f.delete(H),E=E.getAttribute(H),E===null)switch(typeof w){case"undefined":case"function":case"symbol":break t;default:if(w===!1)break t}else if(w!=null)switch(typeof w){case"function":case"symbol":break;case"boolean":if(w===!0&&E==="")break t;break;default:if(st(w,v),E===""+w)break t}je(v,E,w,V)}continue;case"cols":case"rows":case"size":case"span":t:{if(E=e,H=v=C,V=d,f.delete(H),E=E.getAttribute(H),E===null)switch(typeof w){case"undefined":case"function":case"symbol":case"boolean":break t;default:if(isNaN(w)||1>w)break t}else if(w!=null)switch(typeof w){case"function":case"symbol":case"boolean":break;default:if(!(isNaN(w)||1>w)&&(st(w,v),E===""+w))break t}je(v,E,w,V)}continue;case"rowSpan":VA(e,C,"rowspan",w,f,d);continue;case"start":VA(e,C,C,w,f,d);continue;case"xHeight":Jn(e,C,"x-height",w,f,d);continue;case"xlinkActuate":Jn(e,C,"xlink:actuate",w,f,d);continue;case"xlinkArcrole":Jn(e,C,"xlink:arcrole",w,f,d);continue;case"xlinkRole":Jn(e,C,"xlink:role",w,f,d);continue;case"xlinkShow":Jn(e,C,"xlink:show",w,f,d);continue;case"xlinkTitle":Jn(e,C,"xlink:title",w,f,d);continue;case"xlinkType":Jn(e,C,"xlink:type",w,f,d);continue;case"xmlBase":Jn(e,C,"xml:base",w,f,d);continue;case"xmlLang":Jn(e,C,"xml:lang",w,f,d);continue;case"xmlSpace":Jn(e,C,"xml:space",w,f,d);continue;case"inert":w!==""||Eh[C]||(Eh[C]=!0,console.error("Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",C)),GA(e,C,C,w,f,d);continue;default:if(!(2<C.length)||C[0]!=="o"&&C[0]!=="O"||C[1]!=="n"&&C[1]!=="N"){E=lS(C),v=!1,o.context===Cs&&n!=="svg"&&n!=="math"?f.delete(E.toLowerCase()):(H=C.toLowerCase(),H=Vd.hasOwnProperty(H)&&Vd[H]||null,H!==null&&H!==C&&(v=!0,f.delete(H)),f.delete(E));t:if(H=e,V=E,E=w,Lt(V))if(H.hasAttribute(V))H=H.getAttribute(V),st(E,V),E=H===""+E?E:H;else{switch(typeof E){case"function":case"symbol":break t;case"boolean":if(H=V.toLowerCase().slice(0,5),H!=="data-"&&H!=="aria-")break t}E=E===void 0?void 0:null}else E=void 0;v||je(C,E,w,d)}}}return 0<f.size&&s.suppressHydrationWarning!==!0&&aN(e,f,d),Object.keys(d).length===0?null:d}function oN(e,n){switch(e.length){case 0:return"";case 1:return e[0];case 2:return e[0]+" "+n+" "+e[1];default:return e.slice(0,-1).join(", ")+", "+n+" "+e[e.length-1]}}function Dd(e){return e.nodeType===9?e:e.ownerDocument}function XA(e){switch(e){case no:return Lo;case Gd:return Th;default:return Cs}}function YA(e,n){if(e===Cs)switch(n){case"svg":return Lo;case"math":return Th;default:return Cs}return e===Lo&&n==="foreignObject"?Cs:e}function sg(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}function lN(){var e=window.event;return e&&e.type==="popstate"?e===Ly?!1:(Ly=e,!0):(Ly=null,!1)}function cN(e){setTimeout(function(){throw e})}function uN(e,n,s){switch(n){case"button":case"input":case"select":case"textarea":s.autoFocus&&e.focus();break;case"img":s.src?e.src=s.src:s.srcSet&&(e.srcset=s.srcSet)}}function dN(e,n,s,o){rN(e,n,s,o),e[Dn]=o}function WA(e){bl(e,"")}function hN(e,n,s){e.nodeValue=s}function Ks(e){return e==="head"}function fN(e,n){e.removeChild(n)}function pN(e,n){(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e).removeChild(n)}function QA(e,n){var s=n,o=0,d=0;do{var f=s.nextSibling;if(e.removeChild(s),f&&f.nodeType===8)if(s=f.data,s===_h){if(0<o&&8>o){s=o;var v=e.ownerDocument;if(s&vI&&Vl(v.documentElement),s&SI&&Vl(v.body),s&EI)for(s=v.head,Vl(s),v=s.firstChild;v;){var E=v.nextSibling,w=v.nodeName;v[Zl]||w==="SCRIPT"||w==="STYLE"||w==="LINK"&&v.rel.toLowerCase()==="stylesheet"||s.removeChild(v),v=E}}if(d===0){e.removeChild(f),Wl(n);return}d--}else s===Ah||s===xs||s===kc?d++:o=s.charCodeAt(0)-48;else o=0;s=f}while(s);Wl(n)}function mN(e){e=e.style,typeof e.setProperty=="function"?e.setProperty("display","none","important"):e.display="none"}function gN(e){e.nodeValue=""}function yN(e,n){n=n[AI],n=n!=null&&n.hasOwnProperty("display")?n.display:null,e.style.display=n==null||typeof n=="boolean"?"":(""+n).trim()}function bN(e,n){e.nodeValue=n}function ag(e){var n=e.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var s=n;switch(n=n.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":ag(s),Fs(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}e.removeChild(s)}}function vN(e,n,s,o){for(;e.nodeType===1;){var d=s;if(e.nodeName.toLowerCase()!==n.toLowerCase()){if(!o&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(o){if(!e[Zl])switch(n){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(f=e.getAttribute("rel"),f==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(f!==d.rel||e.getAttribute("href")!==(d.href==null||d.href===""?null:d.href)||e.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin)||e.getAttribute("title")!==(d.title==null?null:d.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(f=e.getAttribute("src"),(f!==(d.src==null?null:d.src)||e.getAttribute("type")!==(d.type==null?null:d.type)||e.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&f&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(n==="input"&&e.type==="hidden"){st(d.name,"name");var f=d.name==null?null:""+d.name;if(d.type==="hidden"&&e.getAttribute("name")===f)return e}else return e;if(e=ti(e.nextSibling),e===null)break}return null}function SN(e,n,s){if(n==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!s||(e=ti(e.nextSibling),e===null))return null;return e}function rg(e){return e.data===kc||e.data===xs&&e.ownerDocument.readyState===Mw}function EN(e,n){var s=e.ownerDocument;if(e.data!==xs||s.readyState===Mw)n();else{var o=function(){n(),s.removeEventListener("DOMContentLoaded",o)};s.addEventListener("DOMContentLoaded",o),e._reactRetry=o}}function ti(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n===Ah||n===kc||n===xs||n===Oy||n===Dw)break;if(n===_h)return null}}return e}function KA(e){if(e.nodeType===1){for(var n=e.nodeName.toLowerCase(),s={},o=e.attributes,d=0;d<o.length;d++){var f=o[d];s[jA(f.name)]=f.name.toLowerCase()==="style"?eg(e):f.value}return{type:n,props:s}}return e.nodeType===8?{type:"Suspense",props:{}}:e.nodeValue}function ZA(e,n,s){return s===null||s[bI]!==!0?(e.nodeValue===n?e=null:(n=Qs(n),e=Qs(e.nodeValue)===n?null:e.nodeValue),e):null}function JA(e){e=e.nextSibling;for(var n=0;e;){if(e.nodeType===8){var s=e.data;if(s===_h){if(n===0)return ti(e.nextSibling);n--}else s!==Ah&&s!==kc&&s!==xs||n++}e=e.nextSibling}return null}function t_(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var s=e.data;if(s===Ah||s===kc||s===xs){if(n===0)return e;n--}else s===_h&&n++}e=e.previousSibling}return null}function AN(e){Wl(e)}function _N(e){Wl(e)}function e_(e,n,s,o,d){switch(d&&_p(e,o.ancestorInfo),n=Dd(s),e){case"html":if(e=n.documentElement,!e)throw Error("React expected an <html> element (document.documentElement) to exist in the Document but one was not found. React never removes the documentElement for any Document it renders into so the cause is likely in some other script running on this page.");return e;case"head":if(e=n.head,!e)throw Error("React expected a <head> element (document.head) to exist in the Document but one was not found. React never removes the head for any Document it renders into so the cause is likely in some other script running on this page.");return e;case"body":if(e=n.body,!e)throw Error("React expected a <body> element (document.body) to exist in the Document but one was not found. React never removes the body for any Document it renders into so the cause is likely in some other script running on this page.");return e;default:throw Error("resolveSingletonInstance was called with an element type that is not supported. This is a bug in React.")}}function TN(e,n,s,o){if(!s[na]&&yi(s)){var d=s.tagName.toLowerCase();console.error("You are mounting a new %s component when a previous one has not first unmounted. It is an error to render more than one %s component at a time and attributes and children of these components will likely fail in unpredictable ways. Please only render a single instance of <%s> and if you need to mount a new one, ensure any previous ones have unmounted first.",d,d,d)}switch(e){case"html":case"head":case"body":break;default:console.error("acquireSingletonInstance was called with an element type that is not supported. This is a bug in React.")}for(d=s.attributes;d.length;)s.removeAttributeNode(d[0]);Ke(s,e,n),s[rn]=o,s[Dn]=n}function Vl(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);Fs(e)}function Md(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}function n_(e,n,s){var o=Io;if(o&&typeof n=="string"&&n){var d=Zn(n);d='link[rel="'+e+'"][href="'+d+'"]',typeof s=="string"&&(d+='[crossorigin="'+s+'"]'),Pw.has(d)||(Pw.add(d),e={rel:e,crossOrigin:s,href:n},o.querySelector(d)===null&&(n=o.createElement("link"),Ke(n,"link",e),P(n),o.head.appendChild(n)))}}function i_(e,n,s,o){var d=(d=ta.current)?Md(d):null;if(!d)throw Error('"resourceRoot" was expected to exist. This is a bug in React.');switch(e){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(s=Wr(s.href),n=T(d).hoistableStyles,o=n.get(s),o||(o={type:"style",instance:null,count:0,state:null},n.set(s,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){e=Wr(s.href);var f=T(d).hoistableStyles,v=f.get(e);if(!v&&(d=d.ownerDocument||d,v={type:"stylesheet",instance:null,count:0,state:{loading:hr,preload:null}},f.set(e,v),(f=d.querySelector(ql(e)))&&!f._p&&(v.instance=f,v.state.loading=Nc|di),!hi.has(e))){var E={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy};hi.set(e,E),f||wN(d,e,E,v.state)}if(n&&o===null)throw s=`
222
222
 
223
- - `+Md(n)+`
224
- + `+Md(s),Error("Expected <link> not to update to be updated to a stylesheet with precedence. Check the `rel`, `href`, and `precedence` props of this component. Alternatively, check whether two different <link> components render in the same slot or share the same key."+s);return v}if(n&&o!==null)throw s=`
223
+ - `+Od(n)+`
224
+ + `+Od(s),Error("Expected <link> not to update to be updated to a stylesheet with precedence. Check the `rel`, `href`, and `precedence` props of this component. Alternatively, check whether two different <link> components render in the same slot or share the same key."+s);return v}if(n&&o!==null)throw s=`
225
225
 
226
- - `+Md(n)+`
227
- + `+Md(s),Error("Expected stylesheet with precedence to not be updated to a different kind of <link>. Check the `rel`, `href`, and `precedence` props of this component. Alternatively, check whether two different <link> components render in the same slot or share the same key."+s);return null;case"script":return n=s.async,s=s.src,typeof s=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(s=Qr(s),n=T(d).hoistableScripts,o=n.get(s),o||(o={type:"script",instance:null,count:0,state:null},n.set(s,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error('getResource encountered a type it did not expect: "'+e+'". this is a bug in React.')}}function Md(e){var n=0,s="<link";return typeof e.rel=="string"?(n++,s+=' rel="'+e.rel+'"'):gs.call(e,"rel")&&(n++,s+=' rel="'+(e.rel===null?"null":"invalid type "+typeof e.rel)+'"'),typeof e.href=="string"?(n++,s+=' href="'+e.href+'"'):gs.call(e,"href")&&(n++,s+=' href="'+(e.href===null?"null":"invalid type "+typeof e.href)+'"'),typeof e.precedence=="string"?(n++,s+=' precedence="'+e.precedence+'"'):gs.call(e,"precedence")&&(n++,s+=" precedence={"+(e.precedence===null?"null":"invalid type "+typeof e.precedence)+"}"),Object.getOwnPropertyNames(e).length>n&&(s+=" ..."),s+" />"}function Wr(e){return'href="'+Zn(e)+'"'}function ql(e){return'link[rel="stylesheet"]['+e+"]"}function a_(e){return It({},e,{"data-precedence":e.precedence,precedence:null})}function CN(e,n,s,o){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?o.loading=Nc:(n=e.createElement("link"),o.preload=n,n.addEventListener("load",function(){return o.loading|=Nc}),n.addEventListener("error",function(){return o.loading|=Iw}),Ke(n,"link",s),P(n),e.head.appendChild(n))}function Qr(e){return'[src="'+Zn(e)+'"]'}function Yl(e){return"script[async]"+e}function r_(e,n,s){if(n.count++,n.instance===null)switch(n.type){case"style":var o=e.querySelector('style[data-href~="'+Zn(s.href)+'"]');if(o)return n.instance=o,P(o),o;var d=It({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return o=(e.ownerDocument||e).createElement("style"),P(o),Ke(o,"style",d),Od(o,s.precedence,e),n.instance=o;case"stylesheet":d=Wr(s.href);var f=e.querySelector(ql(d));if(f)return n.state.loading|=di,n.instance=f,P(f),f;o=a_(s),(d=hi.get(d))&&lg(o,d),f=(e.ownerDocument||e).createElement("link"),P(f);var v=f;return v._p=new Promise(function(E,w){v.onload=E,v.onerror=w}),Ke(f,"link",o),n.state.loading|=di,Od(f,s.precedence,e),n.instance=f;case"script":return f=Qr(s.src),(d=e.querySelector(Yl(f)))?(n.instance=d,P(d),d):(o=s,(d=hi.get(f))&&(o=It({},s),cg(o,d)),e=e.ownerDocument||e,d=e.createElement("script"),P(d),Ke(d,"link",o),e.head.appendChild(d),n.instance=d);case"void":return null;default:throw Error('acquireResource encountered a resource type it did not expect: "'+n.type+'". this is a bug in React.')}else n.type==="stylesheet"&&(n.state.loading&di)===hr&&(o=n.instance,n.state.loading|=di,Od(o,s.precedence,e));return n.instance}function Od(e,n,s){for(var o=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),d=o.length?o[o.length-1]:null,f=d,v=0;v<o.length;v++){var E=o[v];if(E.dataset.precedence===n)f=E;else if(f!==d)break}f?f.parentNode.insertBefore(e,f.nextSibling):(n=s.nodeType===9?s.head:s,n.insertBefore(e,n.firstChild))}function lg(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function cg(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}function o_(e,n,s){if(Th===null){var o=new Map,d=Th=new Map;d.set(s,o)}else d=Th,o=d.get(s),o||(o=new Map,d.set(s,o));if(o.has(e))return o;for(o.set(e,null),s=s.getElementsByTagName(e),d=0;d<s.length;d++){var f=s[d];if(!(f[Zl]||f[rn]||e==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!==no){var v=f.getAttribute(n)||"";v=e+v;var E=o.get(v);E?E.push(f):o.set(v,[f])}}return o}function l_(e,n,s){e=e.ownerDocument||e,e.head.insertBefore(s,n==="title"?e.querySelector("head > title"):null)}function xN(e,n,s){var o=!s.ancestorInfo.containerTagInScope;if(s.context===Lo||n.itemProp!=null)return!o||n.itemProp==null||e!=="meta"&&e!=="title"&&e!=="style"&&e!=="link"&&e!=="script"||console.error("Cannot render a <%s> outside the main document if it has an `itemProp` prop. `itemProp` suggests the tag belongs to an `itemScope` which can appear anywhere in the DOM. If you were intending for React to hoist this <%s> remove the `itemProp` prop. Otherwise, try moving this tag into the <head> or <body> of the Document.",e,e),!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href===""){o&&console.error('Cannot render a <style> outside the main document without knowing its precedence and a unique href key. React can hoist and deduplicate <style> tags if you provide a `precedence` prop along with an `href` prop that does not conflict with the `href` values used in any other hoisted <style> or <link rel="stylesheet" ...> tags. Note that hoisting <style> tags is considered an advanced feature that most will not use directly. Consider moving the <style> tag to the <head> or consider adding a `precedence="default"` and `href="some unique resource identifier"`.');break}return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError){if(n.rel==="stylesheet"&&typeof n.precedence=="string"){e=n.href;var d=n.onError,f=n.disabled;s=[],n.onLoad&&s.push("`onLoad`"),d&&s.push("`onError`"),f!=null&&s.push("`disabled`"),d=lN(s,"and"),d+=s.length===1?" prop":" props",f=s.length===1?"an "+d:"the "+d,s.length&&console.error('React encountered a <link rel="stylesheet" href="%s" ... /> with a `precedence` prop that also included %s. The presence of loading and error handlers indicates an intent to manage the stylesheet loading state from your from your Component code and React will not hoist or deduplicate this stylesheet. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop remove the %s, otherwise remove the `precedence` prop.',e,f,d)}o&&(typeof n.rel!="string"||typeof n.href!="string"||n.href===""?console.error("Cannot render a <link> outside the main document without a `rel` and `href` prop. Try adding a `rel` and/or `href` prop to this <link> or moving the link into the <head> tag"):(n.onError||n.onLoad)&&console.error("Cannot render a <link> with onLoad or onError listeners outside the main document. Try removing onLoad={...} and onError={...} or moving it into the root <head> tag or somewhere in the <body>."));break}switch(n.rel){case"stylesheet":return e=n.precedence,n=n.disabled,typeof e!="string"&&o&&console.error('Cannot render a <link rel="stylesheet" /> outside the main document without knowing its precedence. Consider adding precedence="default" or moving it into the root <head> tag.'),typeof e=="string"&&n==null;default:return!0}case"script":if(e=n.async&&typeof n.async!="function"&&typeof n.async!="symbol",!e||n.onLoad||n.onError||!n.src||typeof n.src!="string"){o&&(e?n.onLoad||n.onError?console.error("Cannot render a <script> with onLoad or onError listeners outside the main document. Try removing onLoad={...} and onError={...} or moving it into the root <head> tag or somewhere in the <body>."):console.error("Cannot render a <script> outside the main document without `async={true}` and a non-empty `src` prop. Ensure there is a valid `src` and either make the script async or move it into the root <head> tag or somewhere in the <body>."):console.error('Cannot render a sync or defer <script> outside the main document without knowing its order. Try adding async="" or moving it into the root <head> tag.'));break}return!0;case"noscript":case"template":o&&console.error("Cannot render <%s> outside the main document. Try moving it into the root <head> tag.",e)}return!1}function c_(e){return!(e.type==="stylesheet"&&(e.state.loading&Pw)===hr)}function RN(){}function DN(e,n,s){if(Lc===null)throw Error("Internal React Error: suspendedState null when it was expected to exists. Please report this as a React bug.");var o=Lc;if(n.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(n.state.loading&di)===hr){if(n.instance===null){var d=Wr(s.href),f=e.querySelector(ql(d));if(f){e=f._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(o.count++,o=kd.bind(o),e.then(o,o)),n.state.loading|=di,n.instance=f,P(f);return}f=e.ownerDocument||e,s=a_(s),(d=hi.get(d))&&lg(s,d),f=f.createElement("link"),P(f);var v=f;v._p=new Promise(function(E,w){v.onload=E,v.onerror=w}),Ke(f,"link",s),n.instance=f}o.stylesheets===null&&(o.stylesheets=new Map),o.stylesheets.set(n,e),(e=n.state.preload)&&(n.state.loading&Pw)===hr&&(o.count++,n=kd.bind(o),e.addEventListener("load",n),e.addEventListener("error",n))}}function MN(){if(Lc===null)throw Error("Internal React Error: suspendedState null when it was expected to exists. Please report this as a React bug.");var e=Lc;return e.stylesheets&&e.count===0&&ug(e,e.stylesheets),0<e.count?function(n){var s=setTimeout(function(){if(e.stylesheets&&ug(e,e.stylesheets),e.unsuspend){var o=e.unsuspend;e.unsuspend=null,o()}},6e4);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(s)}}:null}function kd(){if(this.count--,this.count===0){if(this.stylesheets)ug(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}function ug(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,wh=new Map,n.forEach(ON,e),wh=null,kd.call(e))}function ON(e,n){if(!(n.state.loading&di)){var s=wh.get(e);if(s)var o=s.get(Uy);else{s=new Map,wh.set(e,s);for(var d=e.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<d.length;f++){var v=d[f];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(s.set(v.dataset.precedence,v),o=v)}o&&s.set(Uy,o)}d=n.instance,v=d.getAttribute("data-precedence"),f=s.get(v)||o,f===o&&s.set(Uy,d),s.set(v,d),this.count++,o=kd.bind(this),d.addEventListener("load",o),d.addEventListener("error",o),f?f.parentNode.insertBefore(d,f.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(d,e.firstChild)),n.state.loading|=di}}function kN(e,n,s,o,d,f,v,E){for(this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=dr,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=kr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=kr(0),this.hiddenUpdates=kr(null),this.identifierPrefix=o,this.onUncaughtError=d,this.onCaughtError=f,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=E,this.incompleteTransitions=new Map,this.passiveEffectDuration=this.effectDuration=-0,this.memoizedUpdaters=new Set,e=this.pendingUpdatersLaneMap=[],n=0;31>n;n++)e.push(new Set);this._debugRootType=s?"hydrateRoot()":"createRoot()"}function u_(e,n,s,o,d,f,v,E,w,x,H,V){return e=new kN(e,n,s,v,E,w,x,V),n=WL,f===!0&&(n|=on|Ei),Si&&(n|=Je),f=b(3,null,null,n),e.current=f,f.stateNode=e,n=Bp(),ja(n),e.pooledCache=n,ja(n),f.memoizedState={element:o,isDehydrated:s,cache:n},Gp(f),e}function d_(e){return e?(e=sa,e):sa}function dg(e,n,s,o,d,f){if(an&&typeof an.onScheduleFiberRoot=="function")try{an.onScheduleFiberRoot(to,o,s)}catch(v){Fi||(Fi=!0,console.error("React instrumentation encountered an error: %s",v))}rt!==null&&typeof rt.markRenderScheduled=="function"&&rt.markRenderScheduled(n),d=d_(d),o.context===null?o.context=d:o.pendingContext=d,$i&&$n!==null&&!Fw&&(Fw=!0,console.error(`Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.
226
+ - `+Od(n)+`
227
+ + `+Od(s),Error("Expected stylesheet with precedence to not be updated to a different kind of <link>. Check the `rel`, `href`, and `precedence` props of this component. Alternatively, check whether two different <link> components render in the same slot or share the same key."+s);return null;case"script":return n=s.async,s=s.src,typeof s=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(s=Qr(s),n=T(d).hoistableScripts,o=n.get(s),o||(o={type:"script",instance:null,count:0,state:null},n.set(s,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error('getResource encountered a type it did not expect: "'+e+'". this is a bug in React.')}}function Od(e){var n=0,s="<link";return typeof e.rel=="string"?(n++,s+=' rel="'+e.rel+'"'):gs.call(e,"rel")&&(n++,s+=' rel="'+(e.rel===null?"null":"invalid type "+typeof e.rel)+'"'),typeof e.href=="string"?(n++,s+=' href="'+e.href+'"'):gs.call(e,"href")&&(n++,s+=' href="'+(e.href===null?"null":"invalid type "+typeof e.href)+'"'),typeof e.precedence=="string"?(n++,s+=' precedence="'+e.precedence+'"'):gs.call(e,"precedence")&&(n++,s+=" precedence={"+(e.precedence===null?"null":"invalid type "+typeof e.precedence)+"}"),Object.getOwnPropertyNames(e).length>n&&(s+=" ..."),s+" />"}function Wr(e){return'href="'+Zn(e)+'"'}function ql(e){return'link[rel="stylesheet"]['+e+"]"}function s_(e){return It({},e,{"data-precedence":e.precedence,precedence:null})}function wN(e,n,s,o){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?o.loading=Nc:(n=e.createElement("link"),o.preload=n,n.addEventListener("load",function(){return o.loading|=Nc}),n.addEventListener("error",function(){return o.loading|=Lw}),Ke(n,"link",s),P(n),e.head.appendChild(n))}function Qr(e){return'[src="'+Zn(e)+'"]'}function Xl(e){return"script[async]"+e}function a_(e,n,s){if(n.count++,n.instance===null)switch(n.type){case"style":var o=e.querySelector('style[data-href~="'+Zn(s.href)+'"]');if(o)return n.instance=o,P(o),o;var d=It({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return o=(e.ownerDocument||e).createElement("style"),P(o),Ke(o,"style",d),kd(o,s.precedence,e),n.instance=o;case"stylesheet":d=Wr(s.href);var f=e.querySelector(ql(d));if(f)return n.state.loading|=di,n.instance=f,P(f),f;o=s_(s),(d=hi.get(d))&&og(o,d),f=(e.ownerDocument||e).createElement("link"),P(f);var v=f;return v._p=new Promise(function(E,w){v.onload=E,v.onerror=w}),Ke(f,"link",o),n.state.loading|=di,kd(f,s.precedence,e),n.instance=f;case"script":return f=Qr(s.src),(d=e.querySelector(Xl(f)))?(n.instance=d,P(d),d):(o=s,(d=hi.get(f))&&(o=It({},s),lg(o,d)),e=e.ownerDocument||e,d=e.createElement("script"),P(d),Ke(d,"link",o),e.head.appendChild(d),n.instance=d);case"void":return null;default:throw Error('acquireResource encountered a resource type it did not expect: "'+n.type+'". this is a bug in React.')}else n.type==="stylesheet"&&(n.state.loading&di)===hr&&(o=n.instance,n.state.loading|=di,kd(o,s.precedence,e));return n.instance}function kd(e,n,s){for(var o=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),d=o.length?o[o.length-1]:null,f=d,v=0;v<o.length;v++){var E=o[v];if(E.dataset.precedence===n)f=E;else if(f!==d)break}f?f.parentNode.insertBefore(e,f.nextSibling):(n=s.nodeType===9?s.head:s,n.insertBefore(e,n.firstChild))}function og(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function lg(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}function r_(e,n,s){if(wh===null){var o=new Map,d=wh=new Map;d.set(s,o)}else d=wh,o=d.get(s),o||(o=new Map,d.set(s,o));if(o.has(e))return o;for(o.set(e,null),s=s.getElementsByTagName(e),d=0;d<s.length;d++){var f=s[d];if(!(f[Zl]||f[rn]||e==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!==no){var v=f.getAttribute(n)||"";v=e+v;var E=o.get(v);E?E.push(f):o.set(v,[f])}}return o}function o_(e,n,s){e=e.ownerDocument||e,e.head.insertBefore(s,n==="title"?e.querySelector("head > title"):null)}function xN(e,n,s){var o=!s.ancestorInfo.containerTagInScope;if(s.context===Lo||n.itemProp!=null)return!o||n.itemProp==null||e!=="meta"&&e!=="title"&&e!=="style"&&e!=="link"&&e!=="script"||console.error("Cannot render a <%s> outside the main document if it has an `itemProp` prop. `itemProp` suggests the tag belongs to an `itemScope` which can appear anywhere in the DOM. If you were intending for React to hoist this <%s> remove the `itemProp` prop. Otherwise, try moving this tag into the <head> or <body> of the Document.",e,e),!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href===""){o&&console.error('Cannot render a <style> outside the main document without knowing its precedence and a unique href key. React can hoist and deduplicate <style> tags if you provide a `precedence` prop along with an `href` prop that does not conflict with the `href` values used in any other hoisted <style> or <link rel="stylesheet" ...> tags. Note that hoisting <style> tags is considered an advanced feature that most will not use directly. Consider moving the <style> tag to the <head> or consider adding a `precedence="default"` and `href="some unique resource identifier"`.');break}return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError){if(n.rel==="stylesheet"&&typeof n.precedence=="string"){e=n.href;var d=n.onError,f=n.disabled;s=[],n.onLoad&&s.push("`onLoad`"),d&&s.push("`onError`"),f!=null&&s.push("`disabled`"),d=oN(s,"and"),d+=s.length===1?" prop":" props",f=s.length===1?"an "+d:"the "+d,s.length&&console.error('React encountered a <link rel="stylesheet" href="%s" ... /> with a `precedence` prop that also included %s. The presence of loading and error handlers indicates an intent to manage the stylesheet loading state from your from your Component code and React will not hoist or deduplicate this stylesheet. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop remove the %s, otherwise remove the `precedence` prop.',e,f,d)}o&&(typeof n.rel!="string"||typeof n.href!="string"||n.href===""?console.error("Cannot render a <link> outside the main document without a `rel` and `href` prop. Try adding a `rel` and/or `href` prop to this <link> or moving the link into the <head> tag"):(n.onError||n.onLoad)&&console.error("Cannot render a <link> with onLoad or onError listeners outside the main document. Try removing onLoad={...} and onError={...} or moving it into the root <head> tag or somewhere in the <body>."));break}switch(n.rel){case"stylesheet":return e=n.precedence,n=n.disabled,typeof e!="string"&&o&&console.error('Cannot render a <link rel="stylesheet" /> outside the main document without knowing its precedence. Consider adding precedence="default" or moving it into the root <head> tag.'),typeof e=="string"&&n==null;default:return!0}case"script":if(e=n.async&&typeof n.async!="function"&&typeof n.async!="symbol",!e||n.onLoad||n.onError||!n.src||typeof n.src!="string"){o&&(e?n.onLoad||n.onError?console.error("Cannot render a <script> with onLoad or onError listeners outside the main document. Try removing onLoad={...} and onError={...} or moving it into the root <head> tag or somewhere in the <body>."):console.error("Cannot render a <script> outside the main document without `async={true}` and a non-empty `src` prop. Ensure there is a valid `src` and either make the script async or move it into the root <head> tag or somewhere in the <body>."):console.error('Cannot render a sync or defer <script> outside the main document without knowing its order. Try adding async="" or moving it into the root <head> tag.'));break}return!0;case"noscript":case"template":o&&console.error("Cannot render <%s> outside the main document. Try moving it into the root <head> tag.",e)}return!1}function l_(e){return!(e.type==="stylesheet"&&(e.state.loading&Iw)===hr)}function CN(){}function RN(e,n,s){if(Lc===null)throw Error("Internal React Error: suspendedState null when it was expected to exists. Please report this as a React bug.");var o=Lc;if(n.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(n.state.loading&di)===hr){if(n.instance===null){var d=Wr(s.href),f=e.querySelector(ql(d));if(f){e=f._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(o.count++,o=Nd.bind(o),e.then(o,o)),n.state.loading|=di,n.instance=f,P(f);return}f=e.ownerDocument||e,s=s_(s),(d=hi.get(d))&&og(s,d),f=f.createElement("link"),P(f);var v=f;v._p=new Promise(function(E,w){v.onload=E,v.onerror=w}),Ke(f,"link",s),n.instance=f}o.stylesheets===null&&(o.stylesheets=new Map),o.stylesheets.set(n,e),(e=n.state.preload)&&(n.state.loading&Iw)===hr&&(o.count++,n=Nd.bind(o),e.addEventListener("load",n),e.addEventListener("error",n))}}function DN(){if(Lc===null)throw Error("Internal React Error: suspendedState null when it was expected to exists. Please report this as a React bug.");var e=Lc;return e.stylesheets&&e.count===0&&cg(e,e.stylesheets),0<e.count?function(n){var s=setTimeout(function(){if(e.stylesheets&&cg(e,e.stylesheets),e.unsuspend){var o=e.unsuspend;e.unsuspend=null,o()}},6e4);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(s)}}:null}function Nd(){if(this.count--,this.count===0){if(this.stylesheets)cg(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}function cg(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,xh=new Map,n.forEach(MN,e),xh=null,Nd.call(e))}function MN(e,n){if(!(n.state.loading&di)){var s=xh.get(e);if(s)var o=s.get(Py);else{s=new Map,xh.set(e,s);for(var d=e.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<d.length;f++){var v=d[f];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(s.set(v.dataset.precedence,v),o=v)}o&&s.set(Py,o)}d=n.instance,v=d.getAttribute("data-precedence"),f=s.get(v)||o,f===o&&s.set(Py,d),s.set(v,d),this.count++,o=Nd.bind(this),d.addEventListener("load",o),d.addEventListener("error",o),f?f.parentNode.insertBefore(d,f.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(d,e.firstChild)),n.state.loading|=di}}function ON(e,n,s,o,d,f,v,E){for(this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=dr,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=kr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=kr(0),this.hiddenUpdates=kr(null),this.identifierPrefix=o,this.onUncaughtError=d,this.onCaughtError=f,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=E,this.incompleteTransitions=new Map,this.passiveEffectDuration=this.effectDuration=-0,this.memoizedUpdaters=new Set,e=this.pendingUpdatersLaneMap=[],n=0;31>n;n++)e.push(new Set);this._debugRootType=s?"hydrateRoot()":"createRoot()"}function c_(e,n,s,o,d,f,v,E,w,C,H,V){return e=new ON(e,n,s,v,E,w,C,V),n=YL,f===!0&&(n|=on|Ei),Si&&(n|=Je),f=b(3,null,null,n),e.current=f,f.stateNode=e,n=Hp(),ja(n),e.pooledCache=n,ja(n),f.memoizedState={element:o,isDehydrated:s,cache:n},$p(f),e}function u_(e){return e?(e=sa,e):sa}function ug(e,n,s,o,d,f){if(an&&typeof an.onScheduleFiberRoot=="function")try{an.onScheduleFiberRoot(to,o,s)}catch(v){Fi||(Fi=!0,console.error("React instrumentation encountered an error: %s",v))}rt!==null&&typeof rt.markRenderScheduled=="function"&&rt.markRenderScheduled(n),d=u_(d),o.context===null?o.context=d:o.pendingContext=d,$i&&$n!==null&&!Bw&&(Bw=!0,console.error(`Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.
228
228
 
229
- Check the render method of %s.`,X($n)||"Unknown")),o=Gs(n),o.payload={element:s},f=f===void 0?null:f,f!==null&&(typeof f!="function"&&console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",f),o.callback=f),s=Vs(e,o,n),s!==null&&(Ce(s,e,n),Dl(s,e,n))}function h_(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var s=e.retryLane;e.retryLane=s!==0&&s<n?s:n}}function hg(e,n){h_(e,n),(e=e.alternate)&&h_(e,n)}function f_(e){if(e.tag===13){var n=Cn(e,67108864);n!==null&&Ce(n,e,67108864),hg(e,67108864)}}function NN(){return $n}function LN(){for(var e=new Map,n=1,s=0;31>s;s++){var o=Ma(n);e.set(n,o),n*=2}return e}function IN(e,n,s,o){var d=G.T;G.T=null;var f=Jt.p;try{Jt.p=ei,fg(e,n,s,o)}finally{Jt.p=f,G.T=d}}function PN(e,n,s,o){var d=G.T;G.T=null;var f=Jt.p;try{Jt.p=ji,fg(e,n,s,o)}finally{Jt.p=f,G.T=d}}function fg(e,n,s,o){if(xh){var d=pg(o);if(d===null)Jm(e,n,o,Rh,s),m_(e,o);else if(UN(d,e,n,s,o))o.stopPropagation();else if(m_(e,o),n&4&&-1<xI.indexOf(e)){for(;d!==null;){var f=yi(d);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var v=Ne(f.pendingLanes);if(v!==0){var E=f;for(E.pendingLanes|=2,E.entangledLanes|=2;v;){var w=1<<31-pn(v);E.entanglements[1]|=w,v&=~w}Ui(f),(te&(vn|wi))===Gn&&(dh=Bi()+vw,$l(0))}}break;case 13:E=Cn(f,2),E!==null&&Ce(E,f,2),Vr(),hg(f,2)}if(f=pg(o),f===null&&Jm(e,n,o,Rh,s),f===d)break;d=f}d!==null&&o.stopPropagation()}else Jm(e,n,o,null,s)}}function pg(e){return e=wp(e),mg(e)}function mg(e){if(Rh=null,e=gi(e),e!==null){var n=C(e);if(n===null)e=null;else{var s=n.tag;if(s===13){if(e=N(n),e!==null)return e;e=null}else if(s===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null)}}return Rh=e,null}function p_(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return ei;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return ji;case"message":switch(XN()){case Cg:return ei;case xg:return ji;case Jr:case WN:return ys;case Rg:return Fd;default:return ys}default:return ys}}function m_(e,n){switch(e){case"focusin":case"focusout":pa=null;break;case"dragenter":case"dragleave":ma=null;break;case"mouseover":case"mouseout":ga=null;break;case"pointerover":case"pointerout":Pc.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Uc.delete(n.pointerId)}}function Xl(e,n,s,o,d,f){return e===null||e.nativeEvent!==f?(e={blockedOn:n,domEventName:s,eventSystemFlags:o,nativeEvent:f,targetContainers:[d]},n!==null&&(n=yi(n),n!==null&&f_(n)),e):(e.eventSystemFlags|=o,n=e.targetContainers,d!==null&&n.indexOf(d)===-1&&n.push(d),e)}function UN(e,n,s,o,d){switch(n){case"focusin":return pa=Xl(pa,e,n,s,o,d),!0;case"dragenter":return ma=Xl(ma,e,n,s,o,d),!0;case"mouseover":return ga=Xl(ga,e,n,s,o,d),!0;case"pointerover":var f=d.pointerId;return Pc.set(f,Xl(Pc.get(f)||null,e,n,s,o,d)),!0;case"gotpointercapture":return f=d.pointerId,Uc.set(f,Xl(Uc.get(f)||null,e,n,s,o,d)),!0}return!1}function g_(e){var n=gi(e.target);if(n!==null){var s=C(n);if(s!==null){if(n=s.tag,n===13){if(n=N(s),n!==null){e.blockedOn=n,Lr(e.priority,function(){if(s.tag===13){var o=Fn(s);o=hl(o);var d=Cn(s,o);d!==null&&Ce(d,s,o),hg(s,o)}});return}}else if(n===3&&s.stateNode.current.memoizedState.isDehydrated){e.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Nd(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var s=pg(e.nativeEvent);if(s===null){s=e.nativeEvent;var o=new s.constructor(s.type,s),d=o;tc!==null&&console.error("Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue."),tc=d,s.target.dispatchEvent(o),tc===null&&console.error("Expected currently replaying event to not be null. This error is likely caused by a bug in React. Please file an issue."),tc=null}else return n=yi(s),n!==null&&f_(n),e.blockedOn=s,!1;n.shift()}return!0}function y_(e,n,s){Nd(e)&&s.delete(n)}function zN(){zy=!1,pa!==null&&Nd(pa)&&(pa=null),ma!==null&&Nd(ma)&&(ma=null),ga!==null&&Nd(ga)&&(ga=null),Pc.forEach(y_),Uc.forEach(y_)}function Ld(e,n){e.blockedOn===n&&(e.blockedOn=null,zy||(zy=!0,Le.unstable_scheduleCallback(Le.unstable_NormalPriority,zN)))}function b_(e){Dh!==e&&(Dh=e,Le.unstable_scheduleCallback(Le.unstable_NormalPriority,function(){Dh===e&&(Dh=null);for(var n=0;n<e.length;n+=3){var s=e[n],o=e[n+1],d=e[n+2];if(typeof o!="function"){if(mg(o||s)===null)continue;break}var f=yi(s);f!==null&&(e.splice(n,3),n-=3,s={pending:!0,data:d,method:s.method,action:o},Object.freeze(s),mm(f,s,o,d))}}))}function Wl(e){function n(w){return Ld(w,e)}pa!==null&&Ld(pa,e),ma!==null&&Ld(ma,e),ga!==null&&Ld(ga,e),Pc.forEach(n),Uc.forEach(n);for(var s=0;s<ya.length;s++){var o=ya[s];o.blockedOn===e&&(o.blockedOn=null)}for(;0<ya.length&&(s=ya[0],s.blockedOn===null);)g_(s),s.blockedOn===null&&ya.shift();if(s=(e.ownerDocument||e).$$reactFormReplay,s!=null)for(o=0;o<s.length;o+=3){var d=s[o],f=s[o+1],v=d[Dn]||null;if(typeof f=="function")v||b_(s);else if(v){var E=null;if(f&&f.hasAttribute("formAction")){if(d=f,v=f[Dn]||null)E=v.formAction;else if(mg(d)!==null)continue}else E=v.action;typeof E=="function"?s[o+1]=E:(s.splice(o,3),o-=3),b_(s)}}}function gg(e){this._internalRoot=e}function Id(e){this._internalRoot=e}function v_(e){e[na]&&(e._reactRootContainer?console.error("You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported."):console.error("You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it."))}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var Le=QD(),yg=du(),HN=ZD(),It=Object.assign,BN=Symbol.for("react.element"),Zs=Symbol.for("react.transitional.element"),Kr=Symbol.for("react.portal"),Zr=Symbol.for("react.fragment"),Pd=Symbol.for("react.strict_mode"),bg=Symbol.for("react.profiler"),FN=Symbol.for("react.provider"),vg=Symbol.for("react.consumer"),Hi=Symbol.for("react.context"),Ql=Symbol.for("react.forward_ref"),Sg=Symbol.for("react.suspense"),Eg=Symbol.for("react.suspense_list"),Ud=Symbol.for("react.memo"),jn=Symbol.for("react.lazy"),Ag=Symbol.for("react.activity"),jN=Symbol.for("react.memo_cache_sentinel"),S_=Symbol.iterator,$N=Symbol.for("react.client.reference"),Ze=Array.isArray,G=yg.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Jt=HN.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,GN=Object.freeze({pending:!1,data:null,method:null,action:null}),_g=[],Tg=[],ms=-1,Js=at(null),Kl=at(null),ta=at(null),zd=at(null),gs=Object.prototype.hasOwnProperty,wg=Le.unstable_scheduleCallback,VN=Le.unstable_cancelCallback,qN=Le.unstable_shouldYield,YN=Le.unstable_requestPaint,Bi=Le.unstable_now,XN=Le.unstable_getCurrentPriorityLevel,Cg=Le.unstable_ImmediatePriority,xg=Le.unstable_UserBlockingPriority,Jr=Le.unstable_NormalPriority,WN=Le.unstable_LowPriority,Rg=Le.unstable_IdlePriority,QN=Le.log,KN=Le.unstable_setDisableYieldValue,to=null,an=null,rt=null,Fi=!1,Si=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u",pn=Math.clz32?Math.clz32:is,ZN=Math.log,JN=Math.LN2,Hd=256,Bd=4194304,ei=2,ji=8,ys=32,Fd=268435456,ea=Math.random().toString(36).slice(2),rn="__reactFiber$"+ea,Dn="__reactProps$"+ea,na="__reactContainer$"+ea,Dg="__reactEvents$"+ea,tL="__reactListeners$"+ea,eL="__reactHandles$"+ea,E_="__reactResources$"+ea,Zl="__reactMarker$"+ea,A_=new Set,Xa={},Mg={},nL={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0},iL=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),__={},T_={},Jl=0,w_,C_,x_,R_,D_,M_,O_;as.__reactDisabledLog=!0;var Og,k_,kg=!1,Ng=new(typeof WeakMap=="function"?WeakMap:Map),$n=null,$i=!1,sL=/[\n"\\]/g,N_=!1,L_=!1,I_=!1,P_=!1,U_=!1,z_=!1,H_=["value","defaultValue"],B_=!1,F_=/["'&<>\n\t]|^\s|\s$/,aL="address applet area article aside base basefont bgsound blockquote body br button caption center col colgroup dd details dir div dl dt embed fieldset figcaption figure footer form frame frameset h1 h2 h3 h4 h5 h6 head header hgroup hr html iframe img input isindex li link listing main marquee menu menuitem meta nav noembed noframes noscript object ol p param plaintext pre script section select source style summary table tbody td template textarea tfoot th thead title tr track ul wbr xmp".split(" "),j_="applet caption html table td th marquee object template foreignObject desc title".split(" "),rL=j_.concat(["button"]),oL="dd dt li option optgroup p rp rt".split(" "),$_={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null,containerTagInScope:null,implicitRootScope:!1},jd={},Lg={animation:"animationDelay animationDirection animationDuration animationFillMode animationIterationCount animationName animationPlayState animationTimingFunction".split(" "),background:"backgroundAttachment backgroundClip backgroundColor backgroundImage backgroundOrigin backgroundPositionX backgroundPositionY backgroundRepeat backgroundSize".split(" "),backgroundPosition:["backgroundPositionX","backgroundPositionY"],border:"borderBottomColor borderBottomStyle borderBottomWidth borderImageOutset borderImageRepeat borderImageSlice borderImageSource borderImageWidth borderLeftColor borderLeftStyle borderLeftWidth borderRightColor borderRightStyle borderRightWidth borderTopColor borderTopStyle borderTopWidth".split(" "),borderBlockEnd:["borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth"],borderBlockStart:["borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth"],borderBottom:["borderBottomColor","borderBottomStyle","borderBottomWidth"],borderColor:["borderBottomColor","borderLeftColor","borderRightColor","borderTopColor"],borderImage:["borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth"],borderInlineEnd:["borderInlineEndColor","borderInlineEndStyle","borderInlineEndWidth"],borderInlineStart:["borderInlineStartColor","borderInlineStartStyle","borderInlineStartWidth"],borderLeft:["borderLeftColor","borderLeftStyle","borderLeftWidth"],borderRadius:["borderBottomLeftRadius","borderBottomRightRadius","borderTopLeftRadius","borderTopRightRadius"],borderRight:["borderRightColor","borderRightStyle","borderRightWidth"],borderStyle:["borderBottomStyle","borderLeftStyle","borderRightStyle","borderTopStyle"],borderTop:["borderTopColor","borderTopStyle","borderTopWidth"],borderWidth:["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth"],columnRule:["columnRuleColor","columnRuleStyle","columnRuleWidth"],columns:["columnCount","columnWidth"],flex:["flexBasis","flexGrow","flexShrink"],flexFlow:["flexDirection","flexWrap"],font:"fontFamily fontFeatureSettings fontKerning fontLanguageOverride fontSize fontSizeAdjust fontStretch fontStyle fontVariant fontVariantAlternates fontVariantCaps fontVariantEastAsian fontVariantLigatures fontVariantNumeric fontVariantPosition fontWeight lineHeight".split(" "),fontVariant:"fontVariantAlternates fontVariantCaps fontVariantEastAsian fontVariantLigatures fontVariantNumeric fontVariantPosition".split(" "),gap:["columnGap","rowGap"],grid:"gridAutoColumns gridAutoFlow gridAutoRows gridTemplateAreas gridTemplateColumns gridTemplateRows".split(" "),gridArea:["gridColumnEnd","gridColumnStart","gridRowEnd","gridRowStart"],gridColumn:["gridColumnEnd","gridColumnStart"],gridColumnGap:["columnGap"],gridGap:["columnGap","rowGap"],gridRow:["gridRowEnd","gridRowStart"],gridRowGap:["rowGap"],gridTemplate:["gridTemplateAreas","gridTemplateColumns","gridTemplateRows"],listStyle:["listStyleImage","listStylePosition","listStyleType"],margin:["marginBottom","marginLeft","marginRight","marginTop"],marker:["markerEnd","markerMid","markerStart"],mask:"maskClip maskComposite maskImage maskMode maskOrigin maskPositionX maskPositionY maskRepeat maskSize".split(" "),maskPosition:["maskPositionX","maskPositionY"],outline:["outlineColor","outlineStyle","outlineWidth"],overflow:["overflowX","overflowY"],padding:["paddingBottom","paddingLeft","paddingRight","paddingTop"],placeContent:["alignContent","justifyContent"],placeItems:["alignItems","justifyItems"],placeSelf:["alignSelf","justifySelf"],textDecoration:["textDecorationColor","textDecorationLine","textDecorationStyle"],textEmphasis:["textEmphasisColor","textEmphasisStyle"],transition:["transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction"],wordWrap:["overflowWrap"]},G_=/([A-Z])/g,V_=/^ms-/,lL=/^(?:webkit|moz|o)[A-Z]/,cL=/^-ms-/,uL=/-(.)/g,q_=/;\s*$/,eo={},Ig={},Y_=!1,X_=!1,W_=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" ")),$d="http://www.w3.org/1998/Math/MathML",no="http://www.w3.org/2000/svg",dL=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Gd={accept:"accept",acceptcharset:"acceptCharset","accept-charset":"acceptCharset",accesskey:"accessKey",action:"action",allowfullscreen:"allowFullScreen",alt:"alt",as:"as",async:"async",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autosave:"autoSave",capture:"capture",cellpadding:"cellPadding",cellspacing:"cellSpacing",challenge:"challenge",charset:"charSet",checked:"checked",children:"children",cite:"cite",class:"className",classid:"classID",classname:"className",cols:"cols",colspan:"colSpan",content:"content",contenteditable:"contentEditable",contextmenu:"contextMenu",controls:"controls",controlslist:"controlsList",coords:"coords",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",data:"data",datetime:"dateTime",default:"default",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",defer:"defer",dir:"dir",disabled:"disabled",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback",download:"download",draggable:"draggable",enctype:"encType",enterkeyhint:"enterKeyHint",fetchpriority:"fetchPriority",for:"htmlFor",form:"form",formmethod:"formMethod",formaction:"formAction",formenctype:"formEncType",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",headers:"headers",height:"height",hidden:"hidden",high:"high",href:"href",hreflang:"hrefLang",htmlfor:"htmlFor",httpequiv:"httpEquiv","http-equiv":"httpEquiv",icon:"icon",id:"id",imagesizes:"imageSizes",imagesrcset:"imageSrcSet",inert:"inert",innerhtml:"innerHTML",inputmode:"inputMode",integrity:"integrity",is:"is",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",keyparams:"keyParams",keytype:"keyType",kind:"kind",label:"label",lang:"lang",list:"list",loop:"loop",low:"low",manifest:"manifest",marginwidth:"marginWidth",marginheight:"marginHeight",max:"max",maxlength:"maxLength",media:"media",mediagroup:"mediaGroup",method:"method",min:"min",minlength:"minLength",multiple:"multiple",muted:"muted",name:"name",nomodule:"noModule",nonce:"nonce",novalidate:"noValidate",open:"open",optimum:"optimum",pattern:"pattern",placeholder:"placeholder",playsinline:"playsInline",poster:"poster",preload:"preload",profile:"profile",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rel:"rel",required:"required",reversed:"reversed",role:"role",rows:"rows",rowspan:"rowSpan",sandbox:"sandbox",scope:"scope",scoped:"scoped",scrolling:"scrolling",seamless:"seamless",selected:"selected",shape:"shape",size:"size",sizes:"sizes",span:"span",spellcheck:"spellCheck",src:"src",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",start:"start",step:"step",style:"style",summary:"summary",tabindex:"tabIndex",target:"target",title:"title",type:"type",usemap:"useMap",value:"value",width:"width",wmode:"wmode",wrap:"wrap",about:"about",accentheight:"accentHeight","accent-height":"accentHeight",accumulate:"accumulate",additive:"additive",alignmentbaseline:"alignmentBaseline","alignment-baseline":"alignmentBaseline",allowreorder:"allowReorder",alphabetic:"alphabetic",amplitude:"amplitude",arabicform:"arabicForm","arabic-form":"arabicForm",ascent:"ascent",attributename:"attributeName",attributetype:"attributeType",autoreverse:"autoReverse",azimuth:"azimuth",basefrequency:"baseFrequency",baselineshift:"baselineShift","baseline-shift":"baselineShift",baseprofile:"baseProfile",bbox:"bbox",begin:"begin",bias:"bias",by:"by",calcmode:"calcMode",capheight:"capHeight","cap-height":"capHeight",clip:"clip",clippath:"clipPath","clip-path":"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","clip-rule":"clipRule",color:"color",colorinterpolation:"colorInterpolation","color-interpolation":"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters","color-interpolation-filters":"colorInterpolationFilters",colorprofile:"colorProfile","color-profile":"colorProfile",colorrendering:"colorRendering","color-rendering":"colorRendering",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",cursor:"cursor",cx:"cx",cy:"cy",d:"d",datatype:"datatype",decelerate:"decelerate",descent:"descent",diffuseconstant:"diffuseConstant",direction:"direction",display:"display",divisor:"divisor",dominantbaseline:"dominantBaseline","dominant-baseline":"dominantBaseline",dur:"dur",dx:"dx",dy:"dy",edgemode:"edgeMode",elevation:"elevation",enablebackground:"enableBackground","enable-background":"enableBackground",end:"end",exponent:"exponent",externalresourcesrequired:"externalResourcesRequired",fill:"fill",fillopacity:"fillOpacity","fill-opacity":"fillOpacity",fillrule:"fillRule","fill-rule":"fillRule",filter:"filter",filterres:"filterRes",filterunits:"filterUnits",floodopacity:"floodOpacity","flood-opacity":"floodOpacity",floodcolor:"floodColor","flood-color":"floodColor",focusable:"focusable",fontfamily:"fontFamily","font-family":"fontFamily",fontsize:"fontSize","font-size":"fontSize",fontsizeadjust:"fontSizeAdjust","font-size-adjust":"fontSizeAdjust",fontstretch:"fontStretch","font-stretch":"fontStretch",fontstyle:"fontStyle","font-style":"fontStyle",fontvariant:"fontVariant","font-variant":"fontVariant",fontweight:"fontWeight","font-weight":"fontWeight",format:"format",from:"from",fx:"fx",fy:"fy",g1:"g1",g2:"g2",glyphname:"glyphName","glyph-name":"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal","glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical","glyph-orientation-vertical":"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",hanging:"hanging",horizadvx:"horizAdvX","horiz-adv-x":"horizAdvX",horizoriginx:"horizOriginX","horiz-origin-x":"horizOriginX",ideographic:"ideographic",imagerendering:"imageRendering","image-rendering":"imageRendering",in2:"in2",in:"in",inlist:"inlist",intercept:"intercept",k1:"k1",k2:"k2",k3:"k3",k4:"k4",k:"k",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",kerning:"kerning",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",letterspacing:"letterSpacing","letter-spacing":"letterSpacing",lightingcolor:"lightingColor","lighting-color":"lightingColor",limitingconeangle:"limitingConeAngle",local:"local",markerend:"markerEnd","marker-end":"markerEnd",markerheight:"markerHeight",markermid:"markerMid","marker-mid":"markerMid",markerstart:"markerStart","marker-start":"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",mask:"mask",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",mathematical:"mathematical",mode:"mode",numoctaves:"numOctaves",offset:"offset",opacity:"opacity",operator:"operator",order:"order",orient:"orient",orientation:"orientation",origin:"origin",overflow:"overflow",overlineposition:"overlinePosition","overline-position":"overlinePosition",overlinethickness:"overlineThickness","overline-thickness":"overlineThickness",paintorder:"paintOrder","paint-order":"paintOrder",panose1:"panose1","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointerevents:"pointerEvents","pointer-events":"pointerEvents",points:"points",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",popover:"popover",popovertarget:"popoverTarget",popovertargetaction:"popoverTargetAction",prefix:"prefix",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",property:"property",r:"r",radius:"radius",refx:"refX",refy:"refY",renderingintent:"renderingIntent","rendering-intent":"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",resource:"resource",restart:"restart",result:"result",results:"results",rotate:"rotate",rx:"rx",ry:"ry",scale:"scale",security:"security",seed:"seed",shaperendering:"shapeRendering","shape-rendering":"shapeRendering",slope:"slope",spacing:"spacing",specularconstant:"specularConstant",specularexponent:"specularExponent",speed:"speed",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stemh:"stemh",stemv:"stemv",stitchtiles:"stitchTiles",stopcolor:"stopColor","stop-color":"stopColor",stopopacity:"stopOpacity","stop-opacity":"stopOpacity",strikethroughposition:"strikethroughPosition","strikethrough-position":"strikethroughPosition",strikethroughthickness:"strikethroughThickness","strikethrough-thickness":"strikethroughThickness",string:"string",stroke:"stroke",strokedasharray:"strokeDasharray","stroke-dasharray":"strokeDasharray",strokedashoffset:"strokeDashoffset","stroke-dashoffset":"strokeDashoffset",strokelinecap:"strokeLinecap","stroke-linecap":"strokeLinecap",strokelinejoin:"strokeLinejoin","stroke-linejoin":"strokeLinejoin",strokemiterlimit:"strokeMiterlimit","stroke-miterlimit":"strokeMiterlimit",strokewidth:"strokeWidth","stroke-width":"strokeWidth",strokeopacity:"strokeOpacity","stroke-opacity":"strokeOpacity",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textanchor:"textAnchor","text-anchor":"textAnchor",textdecoration:"textDecoration","text-decoration":"textDecoration",textlength:"textLength",textrendering:"textRendering","text-rendering":"textRendering",to:"to",transform:"transform",transformorigin:"transformOrigin","transform-origin":"transformOrigin",typeof:"typeof",u1:"u1",u2:"u2",underlineposition:"underlinePosition","underline-position":"underlinePosition",underlinethickness:"underlineThickness","underline-thickness":"underlineThickness",unicode:"unicode",unicodebidi:"unicodeBidi","unicode-bidi":"unicodeBidi",unicoderange:"unicodeRange","unicode-range":"unicodeRange",unitsperem:"unitsPerEm","units-per-em":"unitsPerEm",unselectable:"unselectable",valphabetic:"vAlphabetic","v-alphabetic":"vAlphabetic",values:"values",vectoreffect:"vectorEffect","vector-effect":"vectorEffect",version:"version",vertadvy:"vertAdvY","vert-adv-y":"vertAdvY",vertoriginx:"vertOriginX","vert-origin-x":"vertOriginX",vertoriginy:"vertOriginY","vert-origin-y":"vertOriginY",vhanging:"vHanging","v-hanging":"vHanging",videographic:"vIdeographic","v-ideographic":"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",visibility:"visibility",vmathematical:"vMathematical","v-mathematical":"vMathematical",vocab:"vocab",widths:"widths",wordspacing:"wordSpacing","word-spacing":"wordSpacing",writingmode:"writingMode","writing-mode":"writingMode",x1:"x1",x2:"x2",x:"x",xchannelselector:"xChannelSelector",xheight:"xHeight","x-height":"xHeight",xlinkactuate:"xlinkActuate","xlink:actuate":"xlinkActuate",xlinkarcrole:"xlinkArcrole","xlink:arcrole":"xlinkArcrole",xlinkhref:"xlinkHref","xlink:href":"xlinkHref",xlinkrole:"xlinkRole","xlink:role":"xlinkRole",xlinkshow:"xlinkShow","xlink:show":"xlinkShow",xlinktitle:"xlinkTitle","xlink:title":"xlinkTitle",xlinktype:"xlinkType","xlink:type":"xlinkType",xmlbase:"xmlBase","xml:base":"xmlBase",xmllang:"xmlLang","xml:lang":"xmlLang",xmlns:"xmlns","xml:space":"xmlSpace",xmlnsxlink:"xmlnsXlink","xmlns:xlink":"xmlnsXlink",xmlspace:"xmlSpace",y1:"y1",y2:"y2",y:"y",ychannelselector:"yChannelSelector",z:"z",zoomandpan:"zoomAndPan"},Q_={"aria-current":0,"aria-description":0,"aria-details":0,"aria-disabled":0,"aria-hidden":0,"aria-invalid":0,"aria-keyshortcuts":0,"aria-label":0,"aria-roledescription":0,"aria-autocomplete":0,"aria-checked":0,"aria-expanded":0,"aria-haspopup":0,"aria-level":0,"aria-modal":0,"aria-multiline":0,"aria-multiselectable":0,"aria-orientation":0,"aria-placeholder":0,"aria-pressed":0,"aria-readonly":0,"aria-required":0,"aria-selected":0,"aria-sort":0,"aria-valuemax":0,"aria-valuemin":0,"aria-valuenow":0,"aria-valuetext":0,"aria-atomic":0,"aria-busy":0,"aria-live":0,"aria-relevant":0,"aria-dropeffect":0,"aria-grabbed":0,"aria-activedescendant":0,"aria-colcount":0,"aria-colindex":0,"aria-colspan":0,"aria-controls":0,"aria-describedby":0,"aria-errormessage":0,"aria-flowto":0,"aria-labelledby":0,"aria-owns":0,"aria-posinset":0,"aria-rowcount":0,"aria-rowindex":0,"aria-rowspan":0,"aria-setsize":0},io={},hL=RegExp("^(aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),fL=RegExp("^(aria)[A-Z][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),K_=!1,mn={},Z_=/^on./,pL=/^on[^A-Z]/,mL=RegExp("^(aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),gL=RegExp("^(aria)[A-Z][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),yL=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i,tc=null,so=null,ao=null,Pg=!1,Gi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ug=!1;if(Gi)try{var ec={};Object.defineProperty(ec,"passive",{get:function(){Ug=!0}}),window.addEventListener("test",ec,ec),window.removeEventListener("test",ec,ec)}catch{Ug=!1}var ia=null,zg=null,Vd=null,Wa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},qd=wn(Wa),nc=It({},Wa,{view:0,detail:0}),bL=wn(nc),Hg,Bg,ic,Yd=It({},nc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Cp,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ic&&(ic&&e.type==="mousemove"?(Hg=e.screenX-ic.screenX,Bg=e.screenY-ic.screenY):Bg=Hg=0,ic=e),Hg)},movementY:function(e){return"movementY"in e?e.movementY:Bg}}),J_=wn(Yd),vL=It({},Yd,{dataTransfer:0}),SL=wn(vL),EL=It({},nc,{relatedTarget:0}),Fg=wn(EL),AL=It({},Wa,{animationName:0,elapsedTime:0,pseudoElement:0}),_L=wn(AL),TL=It({},Wa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),wL=wn(TL),CL=It({},Wa,{data:0}),tT=wn(CL),xL=tT,RL={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},DL={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},ML={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"},OL=It({},nc,{key:function(e){if(e.key){var n=RL[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=Fu(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?DL[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Cp,charCode:function(e){return e.type==="keypress"?Fu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Fu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),kL=wn(OL),NL=It({},Yd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),eT=wn(NL),LL=It({},nc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Cp}),IL=wn(LL),PL=It({},Wa,{propertyName:0,elapsedTime:0,pseudoElement:0}),UL=wn(PL),zL=It({},Yd,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),HL=wn(zL),BL=It({},Wa,{newState:0,oldState:0}),FL=wn(BL),jL=[9,13,27,32],nT=229,jg=Gi&&"CompositionEvent"in window,sc=null;Gi&&"documentMode"in document&&(sc=document.documentMode);var $L=Gi&&"TextEvent"in window&&!sc,iT=Gi&&(!jg||sc&&8<sc&&11>=sc),sT=32,aT=String.fromCharCode(sT),rT=!1,ro=!1,GL={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0},ac=null,rc=null,oT=!1;Gi&&(oT=Sk("input")&&(!document.documentMode||9<document.documentMode));var gn=typeof Object.is=="function"?Object.is:Ck,VL=Gi&&"documentMode"in document&&11>=document.documentMode,oo=null,$g=null,oc=null,Gg=!1,lo={animationend:Na("Animation","AnimationEnd"),animationiteration:Na("Animation","AnimationIteration"),animationstart:Na("Animation","AnimationStart"),transitionrun:Na("Transition","TransitionRun"),transitionstart:Na("Transition","TransitionStart"),transitioncancel:Na("Transition","TransitionCancel"),transitionend:Na("Transition","TransitionEnd")},Vg={},lT={};Gi&&(lT=document.createElement("div").style,"AnimationEvent"in window||(delete lo.animationend.animation,delete lo.animationiteration.animation,delete lo.animationstart.animation),"TransitionEvent"in window||delete lo.transitionend.transition);var cT=La("animationend"),uT=La("animationiteration"),dT=La("animationstart"),qL=La("transitionrun"),YL=La("transitionstart"),XL=La("transitioncancel"),hT=La("transitionend"),fT=new Map,qg="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");qg.push("scrollEnd");var Yg=new WeakMap,Xd=1,bs=2,ni=[],co=0,Xg=0,sa={};Object.freeze(sa);var ii=null,uo=null,ue=0,WL=1,Je=2,on=8,Ei=16,pT=64,mT=!1;try{var gT=Object.preventExtensions({})}catch{mT=!0}var ho=[],fo=0,Wd=null,Qd=0,si=[],ai=0,Qa=null,vs=1,Ss="",yn=null,ve=null,Yt=!1,Es=!1,ri=null,Ka=null,Vi=!1,Wg=Error("Hydration Mismatch Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React."),yT=0;if(typeof performance=="object"&&typeof performance.now=="function")var QL=performance,bT=function(){return QL.now()};else{var KL=Date;bT=function(){return KL.now()}}var Qg=at(null),Kg=at(null),vT={},Kd=null,po=null,mo=!1,ZL=typeof AbortController<"u"?AbortController:function(){var e=[],n=this.signal={aborted:!1,addEventListener:function(s,o){e.push(o)}};this.abort=function(){n.aborted=!0,e.forEach(function(s){return s()})}},JL=Le.unstable_scheduleCallback,tI=Le.unstable_NormalPriority,ze={$$typeof:Hi,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0,_currentRenderer:null,_currentRenderer2:null},go=Le.unstable_now,ST=-0,Zd=-0,Mn=-1.1,Za=-0,Jd=!1,th=!1,lc=null,Zg=0,Ja=0,yo=null,ET=G.S;G.S=function(e,n){typeof n=="object"&&n!==null&&typeof n.then=="function"&&Rk(e,n),ET!==null&&ET(e,n)};var tr=at(null),Ai={recordUnsafeLifecycleWarnings:function(){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}},cc=[],uc=[],dc=[],hc=[],fc=[],pc=[],er=new Set;Ai.recordUnsafeLifecycleWarnings=function(e,n){er.has(e.type)||(typeof n.componentWillMount=="function"&&n.componentWillMount.__suppressDeprecationWarning!==!0&&cc.push(e),e.mode&on&&typeof n.UNSAFE_componentWillMount=="function"&&uc.push(e),typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps.__suppressDeprecationWarning!==!0&&dc.push(e),e.mode&on&&typeof n.UNSAFE_componentWillReceiveProps=="function"&&hc.push(e),typeof n.componentWillUpdate=="function"&&n.componentWillUpdate.__suppressDeprecationWarning!==!0&&fc.push(e),e.mode&on&&typeof n.UNSAFE_componentWillUpdate=="function"&&pc.push(e))},Ai.flushPendingUnsafeLifecycleWarnings=function(){var e=new Set;0<cc.length&&(cc.forEach(function(E){e.add(X(E)||"Component"),er.add(E.type)}),cc=[]);var n=new Set;0<uc.length&&(uc.forEach(function(E){n.add(X(E)||"Component"),er.add(E.type)}),uc=[]);var s=new Set;0<dc.length&&(dc.forEach(function(E){s.add(X(E)||"Component"),er.add(E.type)}),dc=[]);var o=new Set;0<hc.length&&(hc.forEach(function(E){o.add(X(E)||"Component"),er.add(E.type)}),hc=[]);var d=new Set;0<fc.length&&(fc.forEach(function(E){d.add(X(E)||"Component"),er.add(E.type)}),fc=[]);var f=new Set;if(0<pc.length&&(pc.forEach(function(E){f.add(X(E)||"Component"),er.add(E.type)}),pc=[]),0<n.size){var v=y(n);console.error(`Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.
229
+ Check the render method of %s.`,Y($n)||"Unknown")),o=Gs(n),o.payload={element:s},f=f===void 0?null:f,f!==null&&(typeof f!="function"&&console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",f),o.callback=f),s=Vs(e,o,n),s!==null&&(xe(s,e,n),Dl(s,e,n))}function d_(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var s=e.retryLane;e.retryLane=s!==0&&s<n?s:n}}function dg(e,n){d_(e,n),(e=e.alternate)&&d_(e,n)}function h_(e){if(e.tag===13){var n=xn(e,67108864);n!==null&&xe(n,e,67108864),dg(e,67108864)}}function kN(){return $n}function NN(){for(var e=new Map,n=1,s=0;31>s;s++){var o=Ma(n);e.set(n,o),n*=2}return e}function LN(e,n,s,o){var d=G.T;G.T=null;var f=Jt.p;try{Jt.p=ei,hg(e,n,s,o)}finally{Jt.p=f,G.T=d}}function IN(e,n,s,o){var d=G.T;G.T=null;var f=Jt.p;try{Jt.p=ji,hg(e,n,s,o)}finally{Jt.p=f,G.T=d}}function hg(e,n,s,o){if(Rh){var d=fg(o);if(d===null)Zm(e,n,o,Dh,s),p_(e,o);else if(PN(d,e,n,s,o))o.stopPropagation();else if(p_(e,o),n&4&&-1<xI.indexOf(e)){for(;d!==null;){var f=yi(d);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var v=Ne(f.pendingLanes);if(v!==0){var E=f;for(E.pendingLanes|=2,E.entangledLanes|=2;v;){var w=1<<31-pn(v);E.entanglements[1]|=w,v&=~w}Ui(f),(te&(vn|wi))===Gn&&(hh=Bi()+bw,$l(0))}}break;case 13:E=xn(f,2),E!==null&&xe(E,f,2),Vr(),dg(f,2)}if(f=fg(o),f===null&&Zm(e,n,o,Dh,s),f===d)break;d=f}d!==null&&o.stopPropagation()}else Zm(e,n,o,null,s)}}function fg(e){return e=Tp(e),pg(e)}function pg(e){if(Dh=null,e=gi(e),e!==null){var n=x(e);if(n===null)e=null;else{var s=n.tag;if(s===13){if(e=L(n),e!==null)return e;e=null}else if(s===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null)}}return Dh=e,null}function f_(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return ei;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return ji;case"message":switch(XN()){case wg:return ei;case xg:return ji;case Jr:case YN:return ys;case Cg:return jd;default:return ys}default:return ys}}function p_(e,n){switch(e){case"focusin":case"focusout":pa=null;break;case"dragenter":case"dragleave":ma=null;break;case"mouseover":case"mouseout":ga=null;break;case"pointerover":case"pointerout":Pc.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Uc.delete(n.pointerId)}}function Yl(e,n,s,o,d,f){return e===null||e.nativeEvent!==f?(e={blockedOn:n,domEventName:s,eventSystemFlags:o,nativeEvent:f,targetContainers:[d]},n!==null&&(n=yi(n),n!==null&&h_(n)),e):(e.eventSystemFlags|=o,n=e.targetContainers,d!==null&&n.indexOf(d)===-1&&n.push(d),e)}function PN(e,n,s,o,d){switch(n){case"focusin":return pa=Yl(pa,e,n,s,o,d),!0;case"dragenter":return ma=Yl(ma,e,n,s,o,d),!0;case"mouseover":return ga=Yl(ga,e,n,s,o,d),!0;case"pointerover":var f=d.pointerId;return Pc.set(f,Yl(Pc.get(f)||null,e,n,s,o,d)),!0;case"gotpointercapture":return f=d.pointerId,Uc.set(f,Yl(Uc.get(f)||null,e,n,s,o,d)),!0}return!1}function m_(e){var n=gi(e.target);if(n!==null){var s=x(n);if(s!==null){if(n=s.tag,n===13){if(n=L(s),n!==null){e.blockedOn=n,Lr(e.priority,function(){if(s.tag===13){var o=Fn(s);o=hl(o);var d=xn(s,o);d!==null&&xe(d,s,o),dg(s,o)}});return}}else if(n===3&&s.stateNode.current.memoizedState.isDehydrated){e.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ld(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var s=fg(e.nativeEvent);if(s===null){s=e.nativeEvent;var o=new s.constructor(s.type,s),d=o;tc!==null&&console.error("Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue."),tc=d,s.target.dispatchEvent(o),tc===null&&console.error("Expected currently replaying event to not be null. This error is likely caused by a bug in React. Please file an issue."),tc=null}else return n=yi(s),n!==null&&h_(n),e.blockedOn=s,!1;n.shift()}return!0}function g_(e,n,s){Ld(e)&&s.delete(n)}function UN(){Uy=!1,pa!==null&&Ld(pa)&&(pa=null),ma!==null&&Ld(ma)&&(ma=null),ga!==null&&Ld(ga)&&(ga=null),Pc.forEach(g_),Uc.forEach(g_)}function Id(e,n){e.blockedOn===n&&(e.blockedOn=null,Uy||(Uy=!0,Le.unstable_scheduleCallback(Le.unstable_NormalPriority,UN)))}function y_(e){Mh!==e&&(Mh=e,Le.unstable_scheduleCallback(Le.unstable_NormalPriority,function(){Mh===e&&(Mh=null);for(var n=0;n<e.length;n+=3){var s=e[n],o=e[n+1],d=e[n+2];if(typeof o!="function"){if(pg(o||s)===null)continue;break}var f=yi(s);f!==null&&(e.splice(n,3),n-=3,s={pending:!0,data:d,method:s.method,action:o},Object.freeze(s),pm(f,s,o,d))}}))}function Wl(e){function n(w){return Id(w,e)}pa!==null&&Id(pa,e),ma!==null&&Id(ma,e),ga!==null&&Id(ga,e),Pc.forEach(n),Uc.forEach(n);for(var s=0;s<ya.length;s++){var o=ya[s];o.blockedOn===e&&(o.blockedOn=null)}for(;0<ya.length&&(s=ya[0],s.blockedOn===null);)m_(s),s.blockedOn===null&&ya.shift();if(s=(e.ownerDocument||e).$$reactFormReplay,s!=null)for(o=0;o<s.length;o+=3){var d=s[o],f=s[o+1],v=d[Dn]||null;if(typeof f=="function")v||y_(s);else if(v){var E=null;if(f&&f.hasAttribute("formAction")){if(d=f,v=f[Dn]||null)E=v.formAction;else if(pg(d)!==null)continue}else E=v.action;typeof E=="function"?s[o+1]=E:(s.splice(o,3),o-=3),y_(s)}}}function mg(e){this._internalRoot=e}function Pd(e){this._internalRoot=e}function b_(e){e[na]&&(e._reactRootContainer?console.error("You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported."):console.error("You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it."))}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var Le=QD(),gg=du(),zN=ZD(),It=Object.assign,HN=Symbol.for("react.element"),Zs=Symbol.for("react.transitional.element"),Kr=Symbol.for("react.portal"),Zr=Symbol.for("react.fragment"),Ud=Symbol.for("react.strict_mode"),yg=Symbol.for("react.profiler"),BN=Symbol.for("react.provider"),bg=Symbol.for("react.consumer"),Hi=Symbol.for("react.context"),Ql=Symbol.for("react.forward_ref"),vg=Symbol.for("react.suspense"),Sg=Symbol.for("react.suspense_list"),zd=Symbol.for("react.memo"),jn=Symbol.for("react.lazy"),Eg=Symbol.for("react.activity"),FN=Symbol.for("react.memo_cache_sentinel"),v_=Symbol.iterator,jN=Symbol.for("react.client.reference"),Ze=Array.isArray,G=gg.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Jt=zN.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$N=Object.freeze({pending:!1,data:null,method:null,action:null}),Ag=[],_g=[],ms=-1,Js=at(null),Kl=at(null),ta=at(null),Hd=at(null),gs=Object.prototype.hasOwnProperty,Tg=Le.unstable_scheduleCallback,GN=Le.unstable_cancelCallback,VN=Le.unstable_shouldYield,qN=Le.unstable_requestPaint,Bi=Le.unstable_now,XN=Le.unstable_getCurrentPriorityLevel,wg=Le.unstable_ImmediatePriority,xg=Le.unstable_UserBlockingPriority,Jr=Le.unstable_NormalPriority,YN=Le.unstable_LowPriority,Cg=Le.unstable_IdlePriority,WN=Le.log,QN=Le.unstable_setDisableYieldValue,to=null,an=null,rt=null,Fi=!1,Si=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u",pn=Math.clz32?Math.clz32:is,KN=Math.log,ZN=Math.LN2,Bd=256,Fd=4194304,ei=2,ji=8,ys=32,jd=268435456,ea=Math.random().toString(36).slice(2),rn="__reactFiber$"+ea,Dn="__reactProps$"+ea,na="__reactContainer$"+ea,Rg="__reactEvents$"+ea,JN="__reactListeners$"+ea,tL="__reactHandles$"+ea,S_="__reactResources$"+ea,Zl="__reactMarker$"+ea,E_=new Set,Ya={},Dg={},eL={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0},nL=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),A_={},__={},Jl=0,T_,w_,x_,C_,R_,D_,M_;as.__reactDisabledLog=!0;var Mg,O_,Og=!1,kg=new(typeof WeakMap=="function"?WeakMap:Map),$n=null,$i=!1,iL=/[\n"\\]/g,k_=!1,N_=!1,L_=!1,I_=!1,P_=!1,U_=!1,z_=["value","defaultValue"],H_=!1,B_=/["'&<>\n\t]|^\s|\s$/,sL="address applet area article aside base basefont bgsound blockquote body br button caption center col colgroup dd details dir div dl dt embed fieldset figcaption figure footer form frame frameset h1 h2 h3 h4 h5 h6 head header hgroup hr html iframe img input isindex li link listing main marquee menu menuitem meta nav noembed noframes noscript object ol p param plaintext pre script section select source style summary table tbody td template textarea tfoot th thead title tr track ul wbr xmp".split(" "),F_="applet caption html table td th marquee object template foreignObject desc title".split(" "),aL=F_.concat(["button"]),rL="dd dt li option optgroup p rp rt".split(" "),j_={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null,containerTagInScope:null,implicitRootScope:!1},$d={},Ng={animation:"animationDelay animationDirection animationDuration animationFillMode animationIterationCount animationName animationPlayState animationTimingFunction".split(" "),background:"backgroundAttachment backgroundClip backgroundColor backgroundImage backgroundOrigin backgroundPositionX backgroundPositionY backgroundRepeat backgroundSize".split(" "),backgroundPosition:["backgroundPositionX","backgroundPositionY"],border:"borderBottomColor borderBottomStyle borderBottomWidth borderImageOutset borderImageRepeat borderImageSlice borderImageSource borderImageWidth borderLeftColor borderLeftStyle borderLeftWidth borderRightColor borderRightStyle borderRightWidth borderTopColor borderTopStyle borderTopWidth".split(" "),borderBlockEnd:["borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth"],borderBlockStart:["borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth"],borderBottom:["borderBottomColor","borderBottomStyle","borderBottomWidth"],borderColor:["borderBottomColor","borderLeftColor","borderRightColor","borderTopColor"],borderImage:["borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth"],borderInlineEnd:["borderInlineEndColor","borderInlineEndStyle","borderInlineEndWidth"],borderInlineStart:["borderInlineStartColor","borderInlineStartStyle","borderInlineStartWidth"],borderLeft:["borderLeftColor","borderLeftStyle","borderLeftWidth"],borderRadius:["borderBottomLeftRadius","borderBottomRightRadius","borderTopLeftRadius","borderTopRightRadius"],borderRight:["borderRightColor","borderRightStyle","borderRightWidth"],borderStyle:["borderBottomStyle","borderLeftStyle","borderRightStyle","borderTopStyle"],borderTop:["borderTopColor","borderTopStyle","borderTopWidth"],borderWidth:["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth"],columnRule:["columnRuleColor","columnRuleStyle","columnRuleWidth"],columns:["columnCount","columnWidth"],flex:["flexBasis","flexGrow","flexShrink"],flexFlow:["flexDirection","flexWrap"],font:"fontFamily fontFeatureSettings fontKerning fontLanguageOverride fontSize fontSizeAdjust fontStretch fontStyle fontVariant fontVariantAlternates fontVariantCaps fontVariantEastAsian fontVariantLigatures fontVariantNumeric fontVariantPosition fontWeight lineHeight".split(" "),fontVariant:"fontVariantAlternates fontVariantCaps fontVariantEastAsian fontVariantLigatures fontVariantNumeric fontVariantPosition".split(" "),gap:["columnGap","rowGap"],grid:"gridAutoColumns gridAutoFlow gridAutoRows gridTemplateAreas gridTemplateColumns gridTemplateRows".split(" "),gridArea:["gridColumnEnd","gridColumnStart","gridRowEnd","gridRowStart"],gridColumn:["gridColumnEnd","gridColumnStart"],gridColumnGap:["columnGap"],gridGap:["columnGap","rowGap"],gridRow:["gridRowEnd","gridRowStart"],gridRowGap:["rowGap"],gridTemplate:["gridTemplateAreas","gridTemplateColumns","gridTemplateRows"],listStyle:["listStyleImage","listStylePosition","listStyleType"],margin:["marginBottom","marginLeft","marginRight","marginTop"],marker:["markerEnd","markerMid","markerStart"],mask:"maskClip maskComposite maskImage maskMode maskOrigin maskPositionX maskPositionY maskRepeat maskSize".split(" "),maskPosition:["maskPositionX","maskPositionY"],outline:["outlineColor","outlineStyle","outlineWidth"],overflow:["overflowX","overflowY"],padding:["paddingBottom","paddingLeft","paddingRight","paddingTop"],placeContent:["alignContent","justifyContent"],placeItems:["alignItems","justifyItems"],placeSelf:["alignSelf","justifySelf"],textDecoration:["textDecorationColor","textDecorationLine","textDecorationStyle"],textEmphasis:["textEmphasisColor","textEmphasisStyle"],transition:["transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction"],wordWrap:["overflowWrap"]},$_=/([A-Z])/g,G_=/^ms-/,oL=/^(?:webkit|moz|o)[A-Z]/,lL=/^-ms-/,cL=/-(.)/g,V_=/;\s*$/,eo={},Lg={},q_=!1,X_=!1,Y_=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" ")),Gd="http://www.w3.org/1998/Math/MathML",no="http://www.w3.org/2000/svg",uL=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Vd={accept:"accept",acceptcharset:"acceptCharset","accept-charset":"acceptCharset",accesskey:"accessKey",action:"action",allowfullscreen:"allowFullScreen",alt:"alt",as:"as",async:"async",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autosave:"autoSave",capture:"capture",cellpadding:"cellPadding",cellspacing:"cellSpacing",challenge:"challenge",charset:"charSet",checked:"checked",children:"children",cite:"cite",class:"className",classid:"classID",classname:"className",cols:"cols",colspan:"colSpan",content:"content",contenteditable:"contentEditable",contextmenu:"contextMenu",controls:"controls",controlslist:"controlsList",coords:"coords",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",data:"data",datetime:"dateTime",default:"default",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",defer:"defer",dir:"dir",disabled:"disabled",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback",download:"download",draggable:"draggable",enctype:"encType",enterkeyhint:"enterKeyHint",fetchpriority:"fetchPriority",for:"htmlFor",form:"form",formmethod:"formMethod",formaction:"formAction",formenctype:"formEncType",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",headers:"headers",height:"height",hidden:"hidden",high:"high",href:"href",hreflang:"hrefLang",htmlfor:"htmlFor",httpequiv:"httpEquiv","http-equiv":"httpEquiv",icon:"icon",id:"id",imagesizes:"imageSizes",imagesrcset:"imageSrcSet",inert:"inert",innerhtml:"innerHTML",inputmode:"inputMode",integrity:"integrity",is:"is",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",keyparams:"keyParams",keytype:"keyType",kind:"kind",label:"label",lang:"lang",list:"list",loop:"loop",low:"low",manifest:"manifest",marginwidth:"marginWidth",marginheight:"marginHeight",max:"max",maxlength:"maxLength",media:"media",mediagroup:"mediaGroup",method:"method",min:"min",minlength:"minLength",multiple:"multiple",muted:"muted",name:"name",nomodule:"noModule",nonce:"nonce",novalidate:"noValidate",open:"open",optimum:"optimum",pattern:"pattern",placeholder:"placeholder",playsinline:"playsInline",poster:"poster",preload:"preload",profile:"profile",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rel:"rel",required:"required",reversed:"reversed",role:"role",rows:"rows",rowspan:"rowSpan",sandbox:"sandbox",scope:"scope",scoped:"scoped",scrolling:"scrolling",seamless:"seamless",selected:"selected",shape:"shape",size:"size",sizes:"sizes",span:"span",spellcheck:"spellCheck",src:"src",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",start:"start",step:"step",style:"style",summary:"summary",tabindex:"tabIndex",target:"target",title:"title",type:"type",usemap:"useMap",value:"value",width:"width",wmode:"wmode",wrap:"wrap",about:"about",accentheight:"accentHeight","accent-height":"accentHeight",accumulate:"accumulate",additive:"additive",alignmentbaseline:"alignmentBaseline","alignment-baseline":"alignmentBaseline",allowreorder:"allowReorder",alphabetic:"alphabetic",amplitude:"amplitude",arabicform:"arabicForm","arabic-form":"arabicForm",ascent:"ascent",attributename:"attributeName",attributetype:"attributeType",autoreverse:"autoReverse",azimuth:"azimuth",basefrequency:"baseFrequency",baselineshift:"baselineShift","baseline-shift":"baselineShift",baseprofile:"baseProfile",bbox:"bbox",begin:"begin",bias:"bias",by:"by",calcmode:"calcMode",capheight:"capHeight","cap-height":"capHeight",clip:"clip",clippath:"clipPath","clip-path":"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","clip-rule":"clipRule",color:"color",colorinterpolation:"colorInterpolation","color-interpolation":"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters","color-interpolation-filters":"colorInterpolationFilters",colorprofile:"colorProfile","color-profile":"colorProfile",colorrendering:"colorRendering","color-rendering":"colorRendering",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",cursor:"cursor",cx:"cx",cy:"cy",d:"d",datatype:"datatype",decelerate:"decelerate",descent:"descent",diffuseconstant:"diffuseConstant",direction:"direction",display:"display",divisor:"divisor",dominantbaseline:"dominantBaseline","dominant-baseline":"dominantBaseline",dur:"dur",dx:"dx",dy:"dy",edgemode:"edgeMode",elevation:"elevation",enablebackground:"enableBackground","enable-background":"enableBackground",end:"end",exponent:"exponent",externalresourcesrequired:"externalResourcesRequired",fill:"fill",fillopacity:"fillOpacity","fill-opacity":"fillOpacity",fillrule:"fillRule","fill-rule":"fillRule",filter:"filter",filterres:"filterRes",filterunits:"filterUnits",floodopacity:"floodOpacity","flood-opacity":"floodOpacity",floodcolor:"floodColor","flood-color":"floodColor",focusable:"focusable",fontfamily:"fontFamily","font-family":"fontFamily",fontsize:"fontSize","font-size":"fontSize",fontsizeadjust:"fontSizeAdjust","font-size-adjust":"fontSizeAdjust",fontstretch:"fontStretch","font-stretch":"fontStretch",fontstyle:"fontStyle","font-style":"fontStyle",fontvariant:"fontVariant","font-variant":"fontVariant",fontweight:"fontWeight","font-weight":"fontWeight",format:"format",from:"from",fx:"fx",fy:"fy",g1:"g1",g2:"g2",glyphname:"glyphName","glyph-name":"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal","glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical","glyph-orientation-vertical":"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",hanging:"hanging",horizadvx:"horizAdvX","horiz-adv-x":"horizAdvX",horizoriginx:"horizOriginX","horiz-origin-x":"horizOriginX",ideographic:"ideographic",imagerendering:"imageRendering","image-rendering":"imageRendering",in2:"in2",in:"in",inlist:"inlist",intercept:"intercept",k1:"k1",k2:"k2",k3:"k3",k4:"k4",k:"k",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",kerning:"kerning",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",letterspacing:"letterSpacing","letter-spacing":"letterSpacing",lightingcolor:"lightingColor","lighting-color":"lightingColor",limitingconeangle:"limitingConeAngle",local:"local",markerend:"markerEnd","marker-end":"markerEnd",markerheight:"markerHeight",markermid:"markerMid","marker-mid":"markerMid",markerstart:"markerStart","marker-start":"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",mask:"mask",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",mathematical:"mathematical",mode:"mode",numoctaves:"numOctaves",offset:"offset",opacity:"opacity",operator:"operator",order:"order",orient:"orient",orientation:"orientation",origin:"origin",overflow:"overflow",overlineposition:"overlinePosition","overline-position":"overlinePosition",overlinethickness:"overlineThickness","overline-thickness":"overlineThickness",paintorder:"paintOrder","paint-order":"paintOrder",panose1:"panose1","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointerevents:"pointerEvents","pointer-events":"pointerEvents",points:"points",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",popover:"popover",popovertarget:"popoverTarget",popovertargetaction:"popoverTargetAction",prefix:"prefix",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",property:"property",r:"r",radius:"radius",refx:"refX",refy:"refY",renderingintent:"renderingIntent","rendering-intent":"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",resource:"resource",restart:"restart",result:"result",results:"results",rotate:"rotate",rx:"rx",ry:"ry",scale:"scale",security:"security",seed:"seed",shaperendering:"shapeRendering","shape-rendering":"shapeRendering",slope:"slope",spacing:"spacing",specularconstant:"specularConstant",specularexponent:"specularExponent",speed:"speed",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stemh:"stemh",stemv:"stemv",stitchtiles:"stitchTiles",stopcolor:"stopColor","stop-color":"stopColor",stopopacity:"stopOpacity","stop-opacity":"stopOpacity",strikethroughposition:"strikethroughPosition","strikethrough-position":"strikethroughPosition",strikethroughthickness:"strikethroughThickness","strikethrough-thickness":"strikethroughThickness",string:"string",stroke:"stroke",strokedasharray:"strokeDasharray","stroke-dasharray":"strokeDasharray",strokedashoffset:"strokeDashoffset","stroke-dashoffset":"strokeDashoffset",strokelinecap:"strokeLinecap","stroke-linecap":"strokeLinecap",strokelinejoin:"strokeLinejoin","stroke-linejoin":"strokeLinejoin",strokemiterlimit:"strokeMiterlimit","stroke-miterlimit":"strokeMiterlimit",strokewidth:"strokeWidth","stroke-width":"strokeWidth",strokeopacity:"strokeOpacity","stroke-opacity":"strokeOpacity",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textanchor:"textAnchor","text-anchor":"textAnchor",textdecoration:"textDecoration","text-decoration":"textDecoration",textlength:"textLength",textrendering:"textRendering","text-rendering":"textRendering",to:"to",transform:"transform",transformorigin:"transformOrigin","transform-origin":"transformOrigin",typeof:"typeof",u1:"u1",u2:"u2",underlineposition:"underlinePosition","underline-position":"underlinePosition",underlinethickness:"underlineThickness","underline-thickness":"underlineThickness",unicode:"unicode",unicodebidi:"unicodeBidi","unicode-bidi":"unicodeBidi",unicoderange:"unicodeRange","unicode-range":"unicodeRange",unitsperem:"unitsPerEm","units-per-em":"unitsPerEm",unselectable:"unselectable",valphabetic:"vAlphabetic","v-alphabetic":"vAlphabetic",values:"values",vectoreffect:"vectorEffect","vector-effect":"vectorEffect",version:"version",vertadvy:"vertAdvY","vert-adv-y":"vertAdvY",vertoriginx:"vertOriginX","vert-origin-x":"vertOriginX",vertoriginy:"vertOriginY","vert-origin-y":"vertOriginY",vhanging:"vHanging","v-hanging":"vHanging",videographic:"vIdeographic","v-ideographic":"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",visibility:"visibility",vmathematical:"vMathematical","v-mathematical":"vMathematical",vocab:"vocab",widths:"widths",wordspacing:"wordSpacing","word-spacing":"wordSpacing",writingmode:"writingMode","writing-mode":"writingMode",x1:"x1",x2:"x2",x:"x",xchannelselector:"xChannelSelector",xheight:"xHeight","x-height":"xHeight",xlinkactuate:"xlinkActuate","xlink:actuate":"xlinkActuate",xlinkarcrole:"xlinkArcrole","xlink:arcrole":"xlinkArcrole",xlinkhref:"xlinkHref","xlink:href":"xlinkHref",xlinkrole:"xlinkRole","xlink:role":"xlinkRole",xlinkshow:"xlinkShow","xlink:show":"xlinkShow",xlinktitle:"xlinkTitle","xlink:title":"xlinkTitle",xlinktype:"xlinkType","xlink:type":"xlinkType",xmlbase:"xmlBase","xml:base":"xmlBase",xmllang:"xmlLang","xml:lang":"xmlLang",xmlns:"xmlns","xml:space":"xmlSpace",xmlnsxlink:"xmlnsXlink","xmlns:xlink":"xmlnsXlink",xmlspace:"xmlSpace",y1:"y1",y2:"y2",y:"y",ychannelselector:"yChannelSelector",z:"z",zoomandpan:"zoomAndPan"},W_={"aria-current":0,"aria-description":0,"aria-details":0,"aria-disabled":0,"aria-hidden":0,"aria-invalid":0,"aria-keyshortcuts":0,"aria-label":0,"aria-roledescription":0,"aria-autocomplete":0,"aria-checked":0,"aria-expanded":0,"aria-haspopup":0,"aria-level":0,"aria-modal":0,"aria-multiline":0,"aria-multiselectable":0,"aria-orientation":0,"aria-placeholder":0,"aria-pressed":0,"aria-readonly":0,"aria-required":0,"aria-selected":0,"aria-sort":0,"aria-valuemax":0,"aria-valuemin":0,"aria-valuenow":0,"aria-valuetext":0,"aria-atomic":0,"aria-busy":0,"aria-live":0,"aria-relevant":0,"aria-dropeffect":0,"aria-grabbed":0,"aria-activedescendant":0,"aria-colcount":0,"aria-colindex":0,"aria-colspan":0,"aria-controls":0,"aria-describedby":0,"aria-errormessage":0,"aria-flowto":0,"aria-labelledby":0,"aria-owns":0,"aria-posinset":0,"aria-rowcount":0,"aria-rowindex":0,"aria-rowspan":0,"aria-setsize":0},io={},dL=RegExp("^(aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),hL=RegExp("^(aria)[A-Z][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Q_=!1,mn={},K_=/^on./,fL=/^on[^A-Z]/,pL=RegExp("^(aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),mL=RegExp("^(aria)[A-Z][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),gL=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i,tc=null,so=null,ao=null,Ig=!1,Gi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Pg=!1;if(Gi)try{var ec={};Object.defineProperty(ec,"passive",{get:function(){Pg=!0}}),window.addEventListener("test",ec,ec),window.removeEventListener("test",ec,ec)}catch{Pg=!1}var ia=null,Ug=null,qd=null,Wa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Xd=wn(Wa),nc=It({},Wa,{view:0,detail:0}),yL=wn(nc),zg,Hg,ic,Yd=It({},nc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:wp,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ic&&(ic&&e.type==="mousemove"?(zg=e.screenX-ic.screenX,Hg=e.screenY-ic.screenY):Hg=zg=0,ic=e),zg)},movementY:function(e){return"movementY"in e?e.movementY:Hg}}),Z_=wn(Yd),bL=It({},Yd,{dataTransfer:0}),vL=wn(bL),SL=It({},nc,{relatedTarget:0}),Bg=wn(SL),EL=It({},Wa,{animationName:0,elapsedTime:0,pseudoElement:0}),AL=wn(EL),_L=It({},Wa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),TL=wn(_L),wL=It({},Wa,{data:0}),J_=wn(wL),xL=J_,CL={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},RL={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},DL={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"},ML=It({},nc,{key:function(e){if(e.key){var n=CL[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=ju(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?RL[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:wp,charCode:function(e){return e.type==="keypress"?ju(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ju(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),OL=wn(ML),kL=It({},Yd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),tT=wn(kL),NL=It({},nc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:wp}),LL=wn(NL),IL=It({},Wa,{propertyName:0,elapsedTime:0,pseudoElement:0}),PL=wn(IL),UL=It({},Yd,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),zL=wn(UL),HL=It({},Wa,{newState:0,oldState:0}),BL=wn(HL),FL=[9,13,27,32],eT=229,Fg=Gi&&"CompositionEvent"in window,sc=null;Gi&&"documentMode"in document&&(sc=document.documentMode);var jL=Gi&&"TextEvent"in window&&!sc,nT=Gi&&(!Fg||sc&&8<sc&&11>=sc),iT=32,sT=String.fromCharCode(iT),aT=!1,ro=!1,$L={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0},ac=null,rc=null,rT=!1;Gi&&(rT=vk("input")&&(!document.documentMode||9<document.documentMode));var gn=typeof Object.is=="function"?Object.is:wk,GL=Gi&&"documentMode"in document&&11>=document.documentMode,oo=null,jg=null,oc=null,$g=!1,lo={animationend:Na("Animation","AnimationEnd"),animationiteration:Na("Animation","AnimationIteration"),animationstart:Na("Animation","AnimationStart"),transitionrun:Na("Transition","TransitionRun"),transitionstart:Na("Transition","TransitionStart"),transitioncancel:Na("Transition","TransitionCancel"),transitionend:Na("Transition","TransitionEnd")},Gg={},oT={};Gi&&(oT=document.createElement("div").style,"AnimationEvent"in window||(delete lo.animationend.animation,delete lo.animationiteration.animation,delete lo.animationstart.animation),"TransitionEvent"in window||delete lo.transitionend.transition);var lT=La("animationend"),cT=La("animationiteration"),uT=La("animationstart"),VL=La("transitionrun"),qL=La("transitionstart"),XL=La("transitioncancel"),dT=La("transitionend"),hT=new Map,Vg="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Vg.push("scrollEnd");var qg=new WeakMap,Wd=1,bs=2,ni=[],co=0,Xg=0,sa={};Object.freeze(sa);var ii=null,uo=null,de=0,YL=1,Je=2,on=8,Ei=16,fT=64,pT=!1;try{var mT=Object.preventExtensions({})}catch{pT=!0}var ho=[],fo=0,Qd=null,Kd=0,si=[],ai=0,Qa=null,vs=1,Ss="",yn=null,Se=null,Xt=!1,Es=!1,ri=null,Ka=null,Vi=!1,Yg=Error("Hydration Mismatch Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React."),gT=0;if(typeof performance=="object"&&typeof performance.now=="function")var WL=performance,yT=function(){return WL.now()};else{var QL=Date;yT=function(){return QL.now()}}var Wg=at(null),Qg=at(null),bT={},Zd=null,po=null,mo=!1,KL=typeof AbortController<"u"?AbortController:function(){var e=[],n=this.signal={aborted:!1,addEventListener:function(s,o){e.push(o)}};this.abort=function(){n.aborted=!0,e.forEach(function(s){return s()})}},ZL=Le.unstable_scheduleCallback,JL=Le.unstable_NormalPriority,ze={$$typeof:Hi,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0,_currentRenderer:null,_currentRenderer2:null},go=Le.unstable_now,vT=-0,Jd=-0,Mn=-1.1,Za=-0,th=!1,eh=!1,lc=null,Kg=0,Ja=0,yo=null,ST=G.S;G.S=function(e,n){typeof n=="object"&&n!==null&&typeof n.then=="function"&&Ck(e,n),ST!==null&&ST(e,n)};var tr=at(null),Ai={recordUnsafeLifecycleWarnings:function(){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}},cc=[],uc=[],dc=[],hc=[],fc=[],pc=[],er=new Set;Ai.recordUnsafeLifecycleWarnings=function(e,n){er.has(e.type)||(typeof n.componentWillMount=="function"&&n.componentWillMount.__suppressDeprecationWarning!==!0&&cc.push(e),e.mode&on&&typeof n.UNSAFE_componentWillMount=="function"&&uc.push(e),typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps.__suppressDeprecationWarning!==!0&&dc.push(e),e.mode&on&&typeof n.UNSAFE_componentWillReceiveProps=="function"&&hc.push(e),typeof n.componentWillUpdate=="function"&&n.componentWillUpdate.__suppressDeprecationWarning!==!0&&fc.push(e),e.mode&on&&typeof n.UNSAFE_componentWillUpdate=="function"&&pc.push(e))},Ai.flushPendingUnsafeLifecycleWarnings=function(){var e=new Set;0<cc.length&&(cc.forEach(function(E){e.add(Y(E)||"Component"),er.add(E.type)}),cc=[]);var n=new Set;0<uc.length&&(uc.forEach(function(E){n.add(Y(E)||"Component"),er.add(E.type)}),uc=[]);var s=new Set;0<dc.length&&(dc.forEach(function(E){s.add(Y(E)||"Component"),er.add(E.type)}),dc=[]);var o=new Set;0<hc.length&&(hc.forEach(function(E){o.add(Y(E)||"Component"),er.add(E.type)}),hc=[]);var d=new Set;0<fc.length&&(fc.forEach(function(E){d.add(Y(E)||"Component"),er.add(E.type)}),fc=[]);var f=new Set;if(0<pc.length&&(pc.forEach(function(E){f.add(Y(E)||"Component"),er.add(E.type)}),pc=[]),0<n.size){var v=y(n);console.error(`Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.
230
230
 
231
231
  * Move code with side effects to componentDidMount, and set initial state in the constructor.
232
232
 
@@ -255,24 +255,24 @@ Please update the following components: %s`,v)),0<d.size&&(v=y(d),console.warn(`
255
255
  * Move data fetching code or side effects to componentDidUpdate.
256
256
  * Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
257
257
 
258
- Please update the following components: %s`,v))};var eh=new Map,AT=new Set;Ai.recordLegacyContextWarning=function(e,n){for(var s=null,o=e;o!==null;)o.mode&on&&(s=o),o=o.return;s===null?console.error("Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue."):!AT.has(e.type)&&(o=eh.get(s),e.type.contextTypes!=null||e.type.childContextTypes!=null||n!==null&&typeof n.getChildContext=="function")&&(o===void 0&&(o=[],eh.set(s,o)),o.push(e))},Ai.flushLegacyContextWarning=function(){eh.forEach(function(e){if(e.length!==0){var n=e[0],s=new Set;e.forEach(function(d){s.add(X(d)||"Component"),AT.add(d.type)});var o=y(s);pt(n,function(){console.error(`Legacy context API has been detected within a strict-mode tree.
258
+ Please update the following components: %s`,v))};var nh=new Map,ET=new Set;Ai.recordLegacyContextWarning=function(e,n){for(var s=null,o=e;o!==null;)o.mode&on&&(s=o),o=o.return;s===null?console.error("Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue."):!ET.has(e.type)&&(o=nh.get(s),e.type.contextTypes!=null||e.type.childContextTypes!=null||n!==null&&typeof n.getChildContext=="function")&&(o===void 0&&(o=[],nh.set(s,o)),o.push(e))},Ai.flushLegacyContextWarning=function(){nh.forEach(function(e){if(e.length!==0){var n=e[0],s=new Set;e.forEach(function(d){s.add(Y(d)||"Component"),ET.add(d.type)});var o=y(s);pt(n,function(){console.error(`Legacy context API has been detected within a strict-mode tree.
259
259
 
260
260
  The old API will be supported in all 16.x releases, but applications using it should migrate to the new version.
261
261
 
262
262
  Please update the following components: %s
263
263
 
264
- Learn more about this warning here: https://react.dev/link/legacy-context`,o)})}})},Ai.discardPendingWarnings=function(){cc=[],uc=[],dc=[],hc=[],fc=[],pc=[],eh=new Map};var mc=Error("Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`."),_T=Error("Suspense Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React."),nh=Error("Suspense Exception: This is not a real error! It's an implementation detail of `useActionState` to interrupt the current render. You must either rethrow it immediately, or move the `useActionState` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary."),Jg={then:function(){console.error('Internal React error: A listener was unexpectedly attached to a "noop" thenable. This is a bug in React. Please file an issue.')}},gc=null,ih=!1,oi=0,li=1,bn=2,tn=4,He=8,TT=0,wT=1,CT=2,ty=3,aa=!1,xT=!1,ey=null,ny=!1,bo=at(null),sh=at(0),vo,RT=new Set,DT=new Set,iy=new Set,MT=new Set,ra=0,_t=null,re=null,Ie=null,ah=!1,So=!1,nr=!1,rh=0,yc=0,As=null,eI=0,nI=25,$=null,ci=null,_s=-1,bc=!1,oh={readContext:fe,use:qs,useCallback:we,useContext:we,useEffect:we,useImperativeHandle:we,useLayoutEffect:we,useInsertionEffect:we,useMemo:we,useReducer:we,useRef:we,useState:we,useDebugValue:we,useDeferredValue:we,useTransition:we,useSyncExternalStore:we,useId:we,useHostTransitionStatus:we,useFormState:we,useActionState:we,useOptimistic:we,useMemoCache:we,useCacheRefresh:we},sy=null,OT=null,ay=null,kT=null,qi=null,_i=null,lh=null;sy={readContext:function(e){return fe(e)},use:qs,useCallback:function(e,n){return $="useCallback",Ht(),zr(n),dm(e,n)},useContext:function(e){return $="useContext",Ht(),fe(e)},useEffect:function(e,n){return $="useEffect",Ht(),zr(n),od(e,n)},useImperativeHandle:function(e,n,s){return $="useImperativeHandle",Ht(),zr(s),um(e,n,s)},useInsertionEffect:function(e,n){$="useInsertionEffect",Ht(),zr(n),Ga(4,bn,e,n)},useLayoutEffect:function(e,n){return $="useLayoutEffect",Ht(),zr(n),cm(e,n)},useMemo:function(e,n){$="useMemo",Ht(),zr(n);var s=G.H;G.H=qi;try{return hm(e,n)}finally{G.H=s}},useReducer:function(e,n,s){$="useReducer",Ht();var o=G.H;G.H=qi;try{return em(e,n,s)}finally{G.H=o}},useRef:function(e){return $="useRef",Ht(),lm(e)},useState:function(e){$="useState",Ht();var n=G.H;G.H=qi;try{return am(e)}finally{G.H=n}},useDebugValue:function(){$="useDebugValue",Ht()},useDeferredValue:function(e,n){return $="useDeferredValue",Ht(),fm(e,n)},useTransition:function(){return $="useTransition",Ht(),gm()},useSyncExternalStore:function(e,n,s){return $="useSyncExternalStore",Ht(),im(e,n,s)},useId:function(){return $="useId",Ht(),ym()},useFormState:function(e,n){return $="useFormState",Ht(),nd(),Br(e,n)},useActionState:function(e,n){return $="useActionState",Ht(),Br(e,n)},useOptimistic:function(e){return $="useOptimistic",Ht(),rm(e)},useHostTransitionStatus:Va,useMemoCache:$a,useCacheRefresh:function(){return $="useCacheRefresh",Ht(),bm()}},OT={readContext:function(e){return fe(e)},use:qs,useCallback:function(e,n){return $="useCallback",Z(),dm(e,n)},useContext:function(e){return $="useContext",Z(),fe(e)},useEffect:function(e,n){return $="useEffect",Z(),od(e,n)},useImperativeHandle:function(e,n,s){return $="useImperativeHandle",Z(),um(e,n,s)},useInsertionEffect:function(e,n){$="useInsertionEffect",Z(),Ga(4,bn,e,n)},useLayoutEffect:function(e,n){return $="useLayoutEffect",Z(),cm(e,n)},useMemo:function(e,n){$="useMemo",Z();var s=G.H;G.H=qi;try{return hm(e,n)}finally{G.H=s}},useReducer:function(e,n,s){$="useReducer",Z();var o=G.H;G.H=qi;try{return em(e,n,s)}finally{G.H=o}},useRef:function(e){return $="useRef",Z(),lm(e)},useState:function(e){$="useState",Z();var n=G.H;G.H=qi;try{return am(e)}finally{G.H=n}},useDebugValue:function(){$="useDebugValue",Z()},useDeferredValue:function(e,n){return $="useDeferredValue",Z(),fm(e,n)},useTransition:function(){return $="useTransition",Z(),gm()},useSyncExternalStore:function(e,n,s){return $="useSyncExternalStore",Z(),im(e,n,s)},useId:function(){return $="useId",Z(),ym()},useActionState:function(e,n){return $="useActionState",Z(),Br(e,n)},useFormState:function(e,n){return $="useFormState",Z(),nd(),Br(e,n)},useOptimistic:function(e){return $="useOptimistic",Z(),rm(e)},useHostTransitionStatus:Va,useMemoCache:$a,useCacheRefresh:function(){return $="useCacheRefresh",Z(),bm()}},ay={readContext:function(e){return fe(e)},use:qs,useCallback:function(e,n){return $="useCallback",Z(),cd(e,n)},useContext:function(e){return $="useContext",Z(),fe(e)},useEffect:function(e,n){$="useEffect",Z(),Rn(2048,He,e,n)},useImperativeHandle:function(e,n,s){return $="useImperativeHandle",Z(),ld(e,n,s)},useInsertionEffect:function(e,n){return $="useInsertionEffect",Z(),Rn(4,bn,e,n)},useLayoutEffect:function(e,n){return $="useLayoutEffect",Z(),Rn(4,tn,e,n)},useMemo:function(e,n){$="useMemo",Z();var s=G.H;G.H=_i;try{return ud(e,n)}finally{G.H=s}},useReducer:function(e,n,s){$="useReducer",Z();var o=G.H;G.H=_i;try{return Hr(e,n,s)}finally{G.H=o}},useRef:function(){return $="useRef",Z(),ne().memoizedState},useState:function(){$="useState",Z();var e=G.H;G.H=_i;try{return Hr(vi)}finally{G.H=e}},useDebugValue:function(){$="useDebugValue",Z()},useDeferredValue:function(e,n){return $="useDeferredValue",Z(),cE(e,n)},useTransition:function(){return $="useTransition",Z(),mE()},useSyncExternalStore:function(e,n,s){return $="useSyncExternalStore",Z(),id(e,n,s)},useId:function(){return $="useId",Z(),ne().memoizedState},useFormState:function(e){return $="useFormState",Z(),nd(),sd(e)},useActionState:function(e){return $="useActionState",Z(),sd(e)},useOptimistic:function(e,n){return $="useOptimistic",Z(),JS(e,n)},useHostTransitionStatus:Va,useMemoCache:$a,useCacheRefresh:function(){return $="useCacheRefresh",Z(),ne().memoizedState}},kT={readContext:function(e){return fe(e)},use:qs,useCallback:function(e,n){return $="useCallback",Z(),cd(e,n)},useContext:function(e){return $="useContext",Z(),fe(e)},useEffect:function(e,n){$="useEffect",Z(),Rn(2048,He,e,n)},useImperativeHandle:function(e,n,s){return $="useImperativeHandle",Z(),ld(e,n,s)},useInsertionEffect:function(e,n){return $="useInsertionEffect",Z(),Rn(4,bn,e,n)},useLayoutEffect:function(e,n){return $="useLayoutEffect",Z(),Rn(4,tn,e,n)},useMemo:function(e,n){$="useMemo",Z();var s=G.H;G.H=lh;try{return ud(e,n)}finally{G.H=s}},useReducer:function(e,n,s){$="useReducer",Z();var o=G.H;G.H=lh;try{return Nl(e,n,s)}finally{G.H=o}},useRef:function(){return $="useRef",Z(),ne().memoizedState},useState:function(){$="useState",Z();var e=G.H;G.H=lh;try{return Nl(vi)}finally{G.H=e}},useDebugValue:function(){$="useDebugValue",Z()},useDeferredValue:function(e,n){return $="useDeferredValue",Z(),uE(e,n)},useTransition:function(){return $="useTransition",Z(),gE()},useSyncExternalStore:function(e,n,s){return $="useSyncExternalStore",Z(),id(e,n,s)},useId:function(){return $="useId",Z(),ne().memoizedState},useFormState:function(e){return $="useFormState",Z(),nd(),ad(e)},useActionState:function(e){return $="useActionState",Z(),ad(e)},useOptimistic:function(e,n){return $="useOptimistic",Z(),eE(e,n)},useHostTransitionStatus:Va,useMemoCache:$a,useCacheRefresh:function(){return $="useCacheRefresh",Z(),ne().memoizedState}},qi={readContext:function(e){return m(),fe(e)},use:function(e){return p(),qs(e)},useCallback:function(e,n){return $="useCallback",p(),Ht(),dm(e,n)},useContext:function(e){return $="useContext",p(),Ht(),fe(e)},useEffect:function(e,n){return $="useEffect",p(),Ht(),od(e,n)},useImperativeHandle:function(e,n,s){return $="useImperativeHandle",p(),Ht(),um(e,n,s)},useInsertionEffect:function(e,n){$="useInsertionEffect",p(),Ht(),Ga(4,bn,e,n)},useLayoutEffect:function(e,n){return $="useLayoutEffect",p(),Ht(),cm(e,n)},useMemo:function(e,n){$="useMemo",p(),Ht();var s=G.H;G.H=qi;try{return hm(e,n)}finally{G.H=s}},useReducer:function(e,n,s){$="useReducer",p(),Ht();var o=G.H;G.H=qi;try{return em(e,n,s)}finally{G.H=o}},useRef:function(e){return $="useRef",p(),Ht(),lm(e)},useState:function(e){$="useState",p(),Ht();var n=G.H;G.H=qi;try{return am(e)}finally{G.H=n}},useDebugValue:function(){$="useDebugValue",p(),Ht()},useDeferredValue:function(e,n){return $="useDeferredValue",p(),Ht(),fm(e,n)},useTransition:function(){return $="useTransition",p(),Ht(),gm()},useSyncExternalStore:function(e,n,s){return $="useSyncExternalStore",p(),Ht(),im(e,n,s)},useId:function(){return $="useId",p(),Ht(),ym()},useFormState:function(e,n){return $="useFormState",p(),Ht(),Br(e,n)},useActionState:function(e,n){return $="useActionState",p(),Ht(),Br(e,n)},useOptimistic:function(e){return $="useOptimistic",p(),Ht(),rm(e)},useMemoCache:function(e){return p(),$a(e)},useHostTransitionStatus:Va,useCacheRefresh:function(){return $="useCacheRefresh",Ht(),bm()}},_i={readContext:function(e){return m(),fe(e)},use:function(e){return p(),qs(e)},useCallback:function(e,n){return $="useCallback",p(),Z(),cd(e,n)},useContext:function(e){return $="useContext",p(),Z(),fe(e)},useEffect:function(e,n){$="useEffect",p(),Z(),Rn(2048,He,e,n)},useImperativeHandle:function(e,n,s){return $="useImperativeHandle",p(),Z(),ld(e,n,s)},useInsertionEffect:function(e,n){return $="useInsertionEffect",p(),Z(),Rn(4,bn,e,n)},useLayoutEffect:function(e,n){return $="useLayoutEffect",p(),Z(),Rn(4,tn,e,n)},useMemo:function(e,n){$="useMemo",p(),Z();var s=G.H;G.H=_i;try{return ud(e,n)}finally{G.H=s}},useReducer:function(e,n,s){$="useReducer",p(),Z();var o=G.H;G.H=_i;try{return Hr(e,n,s)}finally{G.H=o}},useRef:function(){return $="useRef",p(),Z(),ne().memoizedState},useState:function(){$="useState",p(),Z();var e=G.H;G.H=_i;try{return Hr(vi)}finally{G.H=e}},useDebugValue:function(){$="useDebugValue",p(),Z()},useDeferredValue:function(e,n){return $="useDeferredValue",p(),Z(),cE(e,n)},useTransition:function(){return $="useTransition",p(),Z(),mE()},useSyncExternalStore:function(e,n,s){return $="useSyncExternalStore",p(),Z(),id(e,n,s)},useId:function(){return $="useId",p(),Z(),ne().memoizedState},useFormState:function(e){return $="useFormState",p(),Z(),sd(e)},useActionState:function(e){return $="useActionState",p(),Z(),sd(e)},useOptimistic:function(e,n){return $="useOptimistic",p(),Z(),JS(e,n)},useMemoCache:function(e){return p(),$a(e)},useHostTransitionStatus:Va,useCacheRefresh:function(){return $="useCacheRefresh",Z(),ne().memoizedState}},lh={readContext:function(e){return m(),fe(e)},use:function(e){return p(),qs(e)},useCallback:function(e,n){return $="useCallback",p(),Z(),cd(e,n)},useContext:function(e){return $="useContext",p(),Z(),fe(e)},useEffect:function(e,n){$="useEffect",p(),Z(),Rn(2048,He,e,n)},useImperativeHandle:function(e,n,s){return $="useImperativeHandle",p(),Z(),ld(e,n,s)},useInsertionEffect:function(e,n){return $="useInsertionEffect",p(),Z(),Rn(4,bn,e,n)},useLayoutEffect:function(e,n){return $="useLayoutEffect",p(),Z(),Rn(4,tn,e,n)},useMemo:function(e,n){$="useMemo",p(),Z();var s=G.H;G.H=_i;try{return ud(e,n)}finally{G.H=s}},useReducer:function(e,n,s){$="useReducer",p(),Z();var o=G.H;G.H=_i;try{return Nl(e,n,s)}finally{G.H=o}},useRef:function(){return $="useRef",p(),Z(),ne().memoizedState},useState:function(){$="useState",p(),Z();var e=G.H;G.H=_i;try{return Nl(vi)}finally{G.H=e}},useDebugValue:function(){$="useDebugValue",p(),Z()},useDeferredValue:function(e,n){return $="useDeferredValue",p(),Z(),uE(e,n)},useTransition:function(){return $="useTransition",p(),Z(),gE()},useSyncExternalStore:function(e,n,s){return $="useSyncExternalStore",p(),Z(),id(e,n,s)},useId:function(){return $="useId",p(),Z(),ne().memoizedState},useFormState:function(e){return $="useFormState",p(),Z(),ad(e)},useActionState:function(e){return $="useActionState",p(),Z(),ad(e)},useOptimistic:function(e,n){return $="useOptimistic",p(),Z(),eE(e,n)},useMemoCache:function(e){return p(),$a(e)},useHostTransitionStatus:Va,useCacheRefresh:function(){return $="useCacheRefresh",Z(),ne().memoizedState}};var NT={"react-stack-bottom-frame":function(e,n,s){var o=$i;$i=!0;try{return e(n,s)}finally{$i=o}}},ry=NT["react-stack-bottom-frame"].bind(NT),LT={"react-stack-bottom-frame":function(e){var n=$i;$i=!0;try{return e.render()}finally{$i=n}}},IT=LT["react-stack-bottom-frame"].bind(LT),PT={"react-stack-bottom-frame":function(e,n){try{n.componentDidMount()}catch(s){se(e,e.return,s)}}},oy=PT["react-stack-bottom-frame"].bind(PT),UT={"react-stack-bottom-frame":function(e,n,s,o,d){try{n.componentDidUpdate(s,o,d)}catch(f){se(e,e.return,f)}}},zT=UT["react-stack-bottom-frame"].bind(UT),HT={"react-stack-bottom-frame":function(e,n){var s=n.stack;e.componentDidCatch(n.value,{componentStack:s!==null?s:""})}},iI=HT["react-stack-bottom-frame"].bind(HT),BT={"react-stack-bottom-frame":function(e,n,s){try{s.componentWillUnmount()}catch(o){se(e,n,o)}}},FT=BT["react-stack-bottom-frame"].bind(BT),jT={"react-stack-bottom-frame":function(e){e.resourceKind!=null&&console.error("Expected only SimpleEffects when enableUseEffectCRUDOverload is disabled, got %s",e.resourceKind);var n=e.create;return e=e.inst,n=n(),e.destroy=n}},sI=jT["react-stack-bottom-frame"].bind(jT),$T={"react-stack-bottom-frame":function(e,n,s){try{s()}catch(o){se(e,n,o)}}},aI=$T["react-stack-bottom-frame"].bind($T),GT={"react-stack-bottom-frame":function(e){var n=e._init;return n(e._payload)}},oa=GT["react-stack-bottom-frame"].bind(GT),Eo=null,vc=0,Nt=null,ly,VT=ly=!1,qT={},YT={},XT={};h=function(e,n,s){if(s!==null&&typeof s=="object"&&s._store&&(!s._store.validated&&s.key==null||s._store.validated===2)){if(typeof s._store!="object")throw Error("React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.");s._store.validated=1;var o=X(e),d=o||"null";if(!qT[d]){qT[d]=!0,s=s._owner,e=e._debugOwner;var f="";e&&typeof e.tag=="number"&&(d=X(e))&&(f=`
264
+ Learn more about this warning here: https://react.dev/link/legacy-context`,o)})}})},Ai.discardPendingWarnings=function(){cc=[],uc=[],dc=[],hc=[],fc=[],pc=[],nh=new Map};var mc=Error("Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`."),AT=Error("Suspense Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React."),ih=Error("Suspense Exception: This is not a real error! It's an implementation detail of `useActionState` to interrupt the current render. You must either rethrow it immediately, or move the `useActionState` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary."),Zg={then:function(){console.error('Internal React error: A listener was unexpectedly attached to a "noop" thenable. This is a bug in React. Please file an issue.')}},gc=null,sh=!1,oi=0,li=1,bn=2,tn=4,He=8,_T=0,TT=1,wT=2,Jg=3,aa=!1,xT=!1,ty=null,ey=!1,bo=at(null),ah=at(0),vo,CT=new Set,RT=new Set,ny=new Set,DT=new Set,ra=0,_t=null,re=null,Ie=null,rh=!1,So=!1,nr=!1,oh=0,yc=0,As=null,tI=0,eI=25,$=null,ci=null,_s=-1,bc=!1,lh={readContext:pe,use:qs,useCallback:we,useContext:we,useEffect:we,useImperativeHandle:we,useLayoutEffect:we,useInsertionEffect:we,useMemo:we,useReducer:we,useRef:we,useState:we,useDebugValue:we,useDeferredValue:we,useTransition:we,useSyncExternalStore:we,useId:we,useHostTransitionStatus:we,useFormState:we,useActionState:we,useOptimistic:we,useMemoCache:we,useCacheRefresh:we},iy=null,MT=null,sy=null,OT=null,qi=null,_i=null,ch=null;iy={readContext:function(e){return pe(e)},use:qs,useCallback:function(e,n){return $="useCallback",Ht(),zr(n),um(e,n)},useContext:function(e){return $="useContext",Ht(),pe(e)},useEffect:function(e,n){return $="useEffect",Ht(),zr(n),ld(e,n)},useImperativeHandle:function(e,n,s){return $="useImperativeHandle",Ht(),zr(s),cm(e,n,s)},useInsertionEffect:function(e,n){$="useInsertionEffect",Ht(),zr(n),Ga(4,bn,e,n)},useLayoutEffect:function(e,n){return $="useLayoutEffect",Ht(),zr(n),lm(e,n)},useMemo:function(e,n){$="useMemo",Ht(),zr(n);var s=G.H;G.H=qi;try{return dm(e,n)}finally{G.H=s}},useReducer:function(e,n,s){$="useReducer",Ht();var o=G.H;G.H=qi;try{return tm(e,n,s)}finally{G.H=o}},useRef:function(e){return $="useRef",Ht(),om(e)},useState:function(e){$="useState",Ht();var n=G.H;G.H=qi;try{return sm(e)}finally{G.H=n}},useDebugValue:function(){$="useDebugValue",Ht()},useDeferredValue:function(e,n){return $="useDeferredValue",Ht(),hm(e,n)},useTransition:function(){return $="useTransition",Ht(),mm()},useSyncExternalStore:function(e,n,s){return $="useSyncExternalStore",Ht(),nm(e,n,s)},useId:function(){return $="useId",Ht(),gm()},useFormState:function(e,n){return $="useFormState",Ht(),id(),Br(e,n)},useActionState:function(e,n){return $="useActionState",Ht(),Br(e,n)},useOptimistic:function(e){return $="useOptimistic",Ht(),am(e)},useHostTransitionStatus:Va,useMemoCache:$a,useCacheRefresh:function(){return $="useCacheRefresh",Ht(),ym()}},MT={readContext:function(e){return pe(e)},use:qs,useCallback:function(e,n){return $="useCallback",Z(),um(e,n)},useContext:function(e){return $="useContext",Z(),pe(e)},useEffect:function(e,n){return $="useEffect",Z(),ld(e,n)},useImperativeHandle:function(e,n,s){return $="useImperativeHandle",Z(),cm(e,n,s)},useInsertionEffect:function(e,n){$="useInsertionEffect",Z(),Ga(4,bn,e,n)},useLayoutEffect:function(e,n){return $="useLayoutEffect",Z(),lm(e,n)},useMemo:function(e,n){$="useMemo",Z();var s=G.H;G.H=qi;try{return dm(e,n)}finally{G.H=s}},useReducer:function(e,n,s){$="useReducer",Z();var o=G.H;G.H=qi;try{return tm(e,n,s)}finally{G.H=o}},useRef:function(e){return $="useRef",Z(),om(e)},useState:function(e){$="useState",Z();var n=G.H;G.H=qi;try{return sm(e)}finally{G.H=n}},useDebugValue:function(){$="useDebugValue",Z()},useDeferredValue:function(e,n){return $="useDeferredValue",Z(),hm(e,n)},useTransition:function(){return $="useTransition",Z(),mm()},useSyncExternalStore:function(e,n,s){return $="useSyncExternalStore",Z(),nm(e,n,s)},useId:function(){return $="useId",Z(),gm()},useActionState:function(e,n){return $="useActionState",Z(),Br(e,n)},useFormState:function(e,n){return $="useFormState",Z(),id(),Br(e,n)},useOptimistic:function(e){return $="useOptimistic",Z(),am(e)},useHostTransitionStatus:Va,useMemoCache:$a,useCacheRefresh:function(){return $="useCacheRefresh",Z(),ym()}},sy={readContext:function(e){return pe(e)},use:qs,useCallback:function(e,n){return $="useCallback",Z(),ud(e,n)},useContext:function(e){return $="useContext",Z(),pe(e)},useEffect:function(e,n){$="useEffect",Z(),Rn(2048,He,e,n)},useImperativeHandle:function(e,n,s){return $="useImperativeHandle",Z(),cd(e,n,s)},useInsertionEffect:function(e,n){return $="useInsertionEffect",Z(),Rn(4,bn,e,n)},useLayoutEffect:function(e,n){return $="useLayoutEffect",Z(),Rn(4,tn,e,n)},useMemo:function(e,n){$="useMemo",Z();var s=G.H;G.H=_i;try{return dd(e,n)}finally{G.H=s}},useReducer:function(e,n,s){$="useReducer",Z();var o=G.H;G.H=_i;try{return Hr(e,n,s)}finally{G.H=o}},useRef:function(){return $="useRef",Z(),ne().memoizedState},useState:function(){$="useState",Z();var e=G.H;G.H=_i;try{return Hr(vi)}finally{G.H=e}},useDebugValue:function(){$="useDebugValue",Z()},useDeferredValue:function(e,n){return $="useDeferredValue",Z(),lE(e,n)},useTransition:function(){return $="useTransition",Z(),pE()},useSyncExternalStore:function(e,n,s){return $="useSyncExternalStore",Z(),sd(e,n,s)},useId:function(){return $="useId",Z(),ne().memoizedState},useFormState:function(e){return $="useFormState",Z(),id(),ad(e)},useActionState:function(e){return $="useActionState",Z(),ad(e)},useOptimistic:function(e,n){return $="useOptimistic",Z(),ZS(e,n)},useHostTransitionStatus:Va,useMemoCache:$a,useCacheRefresh:function(){return $="useCacheRefresh",Z(),ne().memoizedState}},OT={readContext:function(e){return pe(e)},use:qs,useCallback:function(e,n){return $="useCallback",Z(),ud(e,n)},useContext:function(e){return $="useContext",Z(),pe(e)},useEffect:function(e,n){$="useEffect",Z(),Rn(2048,He,e,n)},useImperativeHandle:function(e,n,s){return $="useImperativeHandle",Z(),cd(e,n,s)},useInsertionEffect:function(e,n){return $="useInsertionEffect",Z(),Rn(4,bn,e,n)},useLayoutEffect:function(e,n){return $="useLayoutEffect",Z(),Rn(4,tn,e,n)},useMemo:function(e,n){$="useMemo",Z();var s=G.H;G.H=ch;try{return dd(e,n)}finally{G.H=s}},useReducer:function(e,n,s){$="useReducer",Z();var o=G.H;G.H=ch;try{return Nl(e,n,s)}finally{G.H=o}},useRef:function(){return $="useRef",Z(),ne().memoizedState},useState:function(){$="useState",Z();var e=G.H;G.H=ch;try{return Nl(vi)}finally{G.H=e}},useDebugValue:function(){$="useDebugValue",Z()},useDeferredValue:function(e,n){return $="useDeferredValue",Z(),cE(e,n)},useTransition:function(){return $="useTransition",Z(),mE()},useSyncExternalStore:function(e,n,s){return $="useSyncExternalStore",Z(),sd(e,n,s)},useId:function(){return $="useId",Z(),ne().memoizedState},useFormState:function(e){return $="useFormState",Z(),id(),rd(e)},useActionState:function(e){return $="useActionState",Z(),rd(e)},useOptimistic:function(e,n){return $="useOptimistic",Z(),tE(e,n)},useHostTransitionStatus:Va,useMemoCache:$a,useCacheRefresh:function(){return $="useCacheRefresh",Z(),ne().memoizedState}},qi={readContext:function(e){return m(),pe(e)},use:function(e){return p(),qs(e)},useCallback:function(e,n){return $="useCallback",p(),Ht(),um(e,n)},useContext:function(e){return $="useContext",p(),Ht(),pe(e)},useEffect:function(e,n){return $="useEffect",p(),Ht(),ld(e,n)},useImperativeHandle:function(e,n,s){return $="useImperativeHandle",p(),Ht(),cm(e,n,s)},useInsertionEffect:function(e,n){$="useInsertionEffect",p(),Ht(),Ga(4,bn,e,n)},useLayoutEffect:function(e,n){return $="useLayoutEffect",p(),Ht(),lm(e,n)},useMemo:function(e,n){$="useMemo",p(),Ht();var s=G.H;G.H=qi;try{return dm(e,n)}finally{G.H=s}},useReducer:function(e,n,s){$="useReducer",p(),Ht();var o=G.H;G.H=qi;try{return tm(e,n,s)}finally{G.H=o}},useRef:function(e){return $="useRef",p(),Ht(),om(e)},useState:function(e){$="useState",p(),Ht();var n=G.H;G.H=qi;try{return sm(e)}finally{G.H=n}},useDebugValue:function(){$="useDebugValue",p(),Ht()},useDeferredValue:function(e,n){return $="useDeferredValue",p(),Ht(),hm(e,n)},useTransition:function(){return $="useTransition",p(),Ht(),mm()},useSyncExternalStore:function(e,n,s){return $="useSyncExternalStore",p(),Ht(),nm(e,n,s)},useId:function(){return $="useId",p(),Ht(),gm()},useFormState:function(e,n){return $="useFormState",p(),Ht(),Br(e,n)},useActionState:function(e,n){return $="useActionState",p(),Ht(),Br(e,n)},useOptimistic:function(e){return $="useOptimistic",p(),Ht(),am(e)},useMemoCache:function(e){return p(),$a(e)},useHostTransitionStatus:Va,useCacheRefresh:function(){return $="useCacheRefresh",Ht(),ym()}},_i={readContext:function(e){return m(),pe(e)},use:function(e){return p(),qs(e)},useCallback:function(e,n){return $="useCallback",p(),Z(),ud(e,n)},useContext:function(e){return $="useContext",p(),Z(),pe(e)},useEffect:function(e,n){$="useEffect",p(),Z(),Rn(2048,He,e,n)},useImperativeHandle:function(e,n,s){return $="useImperativeHandle",p(),Z(),cd(e,n,s)},useInsertionEffect:function(e,n){return $="useInsertionEffect",p(),Z(),Rn(4,bn,e,n)},useLayoutEffect:function(e,n){return $="useLayoutEffect",p(),Z(),Rn(4,tn,e,n)},useMemo:function(e,n){$="useMemo",p(),Z();var s=G.H;G.H=_i;try{return dd(e,n)}finally{G.H=s}},useReducer:function(e,n,s){$="useReducer",p(),Z();var o=G.H;G.H=_i;try{return Hr(e,n,s)}finally{G.H=o}},useRef:function(){return $="useRef",p(),Z(),ne().memoizedState},useState:function(){$="useState",p(),Z();var e=G.H;G.H=_i;try{return Hr(vi)}finally{G.H=e}},useDebugValue:function(){$="useDebugValue",p(),Z()},useDeferredValue:function(e,n){return $="useDeferredValue",p(),Z(),lE(e,n)},useTransition:function(){return $="useTransition",p(),Z(),pE()},useSyncExternalStore:function(e,n,s){return $="useSyncExternalStore",p(),Z(),sd(e,n,s)},useId:function(){return $="useId",p(),Z(),ne().memoizedState},useFormState:function(e){return $="useFormState",p(),Z(),ad(e)},useActionState:function(e){return $="useActionState",p(),Z(),ad(e)},useOptimistic:function(e,n){return $="useOptimistic",p(),Z(),ZS(e,n)},useMemoCache:function(e){return p(),$a(e)},useHostTransitionStatus:Va,useCacheRefresh:function(){return $="useCacheRefresh",Z(),ne().memoizedState}},ch={readContext:function(e){return m(),pe(e)},use:function(e){return p(),qs(e)},useCallback:function(e,n){return $="useCallback",p(),Z(),ud(e,n)},useContext:function(e){return $="useContext",p(),Z(),pe(e)},useEffect:function(e,n){$="useEffect",p(),Z(),Rn(2048,He,e,n)},useImperativeHandle:function(e,n,s){return $="useImperativeHandle",p(),Z(),cd(e,n,s)},useInsertionEffect:function(e,n){return $="useInsertionEffect",p(),Z(),Rn(4,bn,e,n)},useLayoutEffect:function(e,n){return $="useLayoutEffect",p(),Z(),Rn(4,tn,e,n)},useMemo:function(e,n){$="useMemo",p(),Z();var s=G.H;G.H=_i;try{return dd(e,n)}finally{G.H=s}},useReducer:function(e,n,s){$="useReducer",p(),Z();var o=G.H;G.H=_i;try{return Nl(e,n,s)}finally{G.H=o}},useRef:function(){return $="useRef",p(),Z(),ne().memoizedState},useState:function(){$="useState",p(),Z();var e=G.H;G.H=_i;try{return Nl(vi)}finally{G.H=e}},useDebugValue:function(){$="useDebugValue",p(),Z()},useDeferredValue:function(e,n){return $="useDeferredValue",p(),Z(),cE(e,n)},useTransition:function(){return $="useTransition",p(),Z(),mE()},useSyncExternalStore:function(e,n,s){return $="useSyncExternalStore",p(),Z(),sd(e,n,s)},useId:function(){return $="useId",p(),Z(),ne().memoizedState},useFormState:function(e){return $="useFormState",p(),Z(),rd(e)},useActionState:function(e){return $="useActionState",p(),Z(),rd(e)},useOptimistic:function(e,n){return $="useOptimistic",p(),Z(),tE(e,n)},useMemoCache:function(e){return p(),$a(e)},useHostTransitionStatus:Va,useCacheRefresh:function(){return $="useCacheRefresh",Z(),ne().memoizedState}};var kT={"react-stack-bottom-frame":function(e,n,s){var o=$i;$i=!0;try{return e(n,s)}finally{$i=o}}},ay=kT["react-stack-bottom-frame"].bind(kT),NT={"react-stack-bottom-frame":function(e){var n=$i;$i=!0;try{return e.render()}finally{$i=n}}},LT=NT["react-stack-bottom-frame"].bind(NT),IT={"react-stack-bottom-frame":function(e,n){try{n.componentDidMount()}catch(s){se(e,e.return,s)}}},ry=IT["react-stack-bottom-frame"].bind(IT),PT={"react-stack-bottom-frame":function(e,n,s,o,d){try{n.componentDidUpdate(s,o,d)}catch(f){se(e,e.return,f)}}},UT=PT["react-stack-bottom-frame"].bind(PT),zT={"react-stack-bottom-frame":function(e,n){var s=n.stack;e.componentDidCatch(n.value,{componentStack:s!==null?s:""})}},nI=zT["react-stack-bottom-frame"].bind(zT),HT={"react-stack-bottom-frame":function(e,n,s){try{s.componentWillUnmount()}catch(o){se(e,n,o)}}},BT=HT["react-stack-bottom-frame"].bind(HT),FT={"react-stack-bottom-frame":function(e){e.resourceKind!=null&&console.error("Expected only SimpleEffects when enableUseEffectCRUDOverload is disabled, got %s",e.resourceKind);var n=e.create;return e=e.inst,n=n(),e.destroy=n}},iI=FT["react-stack-bottom-frame"].bind(FT),jT={"react-stack-bottom-frame":function(e,n,s){try{s()}catch(o){se(e,n,o)}}},sI=jT["react-stack-bottom-frame"].bind(jT),$T={"react-stack-bottom-frame":function(e){var n=e._init;return n(e._payload)}},oa=$T["react-stack-bottom-frame"].bind($T),Eo=null,vc=0,Nt=null,oy,GT=oy=!1,VT={},qT={},XT={};h=function(e,n,s){if(s!==null&&typeof s=="object"&&s._store&&(!s._store.validated&&s.key==null||s._store.validated===2)){if(typeof s._store!="object")throw Error("React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.");s._store.validated=1;var o=Y(e),d=o||"null";if(!VT[d]){VT[d]=!0,s=s._owner,e=e._debugOwner;var f="";e&&typeof e.tag=="number"&&(d=Y(e))&&(f=`
265
265
 
266
266
  Check the render method of \``+d+"`."),f||o&&(f=`
267
267
 
268
- Check the top-level render call using <`+o+">.");var v="";s!=null&&e!==s&&(o=null,typeof s.tag=="number"?o=X(s):typeof s.name=="string"&&(o=s.name),o&&(v=" It was passed a child from "+o+".")),pt(n,function(){console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',f,v)})}}};var Ao=SE(!0),WT=SE(!1),ui=at(null),Yi=null,_o=1,Sc=2,Be=at(0),QT={},KT=new Set,ZT=new Set,JT=new Set,tw=new Set,ew=new Set,nw=new Set,iw=new Set,sw=new Set,aw=new Set,rw=new Set;Object.freeze(QT);var cy={enqueueSetState:function(e,n,s){e=e._reactInternals;var o=Fn(e),d=Gs(o);d.payload=n,s!=null&&(Sm(s),d.callback=s),n=Vs(e,d,o),n!==null&&(Ce(n,e,o),Dl(n,e,o)),Pn(e,o)},enqueueReplaceState:function(e,n,s){e=e._reactInternals;var o=Fn(e),d=Gs(o);d.tag=wT,d.payload=n,s!=null&&(Sm(s),d.callback=s),n=Vs(e,d,o),n!==null&&(Ce(n,e,o),Dl(n,e,o)),Pn(e,o)},enqueueForceUpdate:function(e,n){e=e._reactInternals;var s=Fn(e),o=Gs(s);o.tag=CT,n!=null&&(Sm(n),o.callback=n),n=Vs(e,o,s),n!==null&&(Ce(n,e,s),Dl(n,e,s)),rt!==null&&typeof rt.markForceUpdateScheduled=="function"&&rt.markForceUpdateScheduled(e,s)}},uy=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},To=null,dy=null,ow=Error("This is not a real error. It's an implementation detail of React's selective hydration feature. If this leaks into userspace, it's a bug in React. Please file an issue."),$e=!1,lw={},cw={},uw={},dw={},wo=!1,hw={},hy={},fy={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null},fw=!1,pw=null;pw=new Set;var Ts=!1,xe=!1,py=!1,mw=typeof WeakSet=="function"?WeakSet:Set,Ge=null,Co=null,xo=null,Pe=null,On=!1,Ti=null,Ec=8192,rI={getCacheForType:function(e){var n=fe(ze),s=n.data.get(e);return s===void 0&&(s=e(),n.data.set(e,s)),s},getOwner:function(){return $n}};if(typeof Symbol=="function"&&Symbol.for){var Ac=Symbol.for;Ac("selector.component"),Ac("selector.has_pseudo_class"),Ac("selector.role"),Ac("selector.test_id"),Ac("selector.text")}var oI=[],lI=typeof WeakMap=="function"?WeakMap:Map,Gn=0,vn=2,wi=4,ws=0,_c=1,Ro=2,my=3,ir=4,ch=6,gw=5,te=Gn,le=null,Ut=null,Bt=0,kn=0,Tc=1,sr=2,wc=3,yw=4,gy=5,Do=6,Cc=7,yy=8,ar=9,ee=kn,Vn=null,la=!1,Mo=!1,by=!1,Xi=0,Se=ws,ca=0,ua=0,vy=0,qn=0,rr=0,xc=null,Sn=null,uh=!1,Sy=0,bw=300,dh=1/0,vw=500,Rc=null,da=null,cI=0,uI=1,dI=2,or=0,Sw=1,Ew=2,Aw=3,hI=4,Ey=5,en=0,ha=null,Oo=null,fa=0,Ay=0,_y=null,_w=null,fI=50,Dc=0,Ty=null,wy=!1,hh=!1,pI=50,lr=0,Mc=null,ko=!1,fh=null,Tw=!1,ww=new Set,mI={},ph=null,No=null,Cy=!1,xy=!1,mh=!1,Ry=!1,cr=0,Dy={};(function(){for(var e=0;e<qg.length;e++){var n=qg[e],s=n.toLowerCase();n=n[0].toUpperCase()+n.slice(1),bi(s,"on"+n)}bi(cT,"onAnimationEnd"),bi(uT,"onAnimationIteration"),bi(dT,"onAnimationStart"),bi("dblclick","onDoubleClick"),bi("focusin","onFocus"),bi("focusout","onBlur"),bi(qL,"onTransitionRun"),bi(YL,"onTransitionStart"),bi(XL,"onTransitionCancel"),bi(hT,"onTransitionEnd")})(),it("onMouseEnter",["mouseout","mouseover"]),it("onMouseLeave",["mouseout","mouseover"]),it("onPointerEnter",["pointerout","pointerover"]),it("onPointerLeave",["pointerout","pointerover"]),et("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),et("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),et("onBeforeInput",["compositionend","keypress","textInput","paste"]),et("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),et("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),et("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Oc="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),My=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Oc)),gh="_reactListening"+Math.random().toString(36).slice(2),Cw=!1,xw=!1,yh=!1,Rw=!1,bh=!1,vh=!1,Dw=!1,Sh={},gI=/\r\n?/g,yI=/\u0000|\uFFFD/g,ur="http://www.w3.org/1999/xlink",Oy="http://www.w3.org/XML/1998/namespace",bI="javascript:throw new Error('React form unexpectedly submitted.')",vI="suppressHydrationWarning",Eh="$",Ah="/$",Cs="$?",kc="$!",SI=1,EI=2,AI=4,ky="F!",Mw="F",Ow="complete",_I="style",xs=0,Lo=1,_h=2,Ny=null,Ly=null,kw={dialog:!0,webview:!0},Iy=null,Nw=typeof setTimeout=="function"?setTimeout:void 0,TI=typeof clearTimeout=="function"?clearTimeout:void 0,dr=-1,Lw=typeof Promise=="function"?Promise:void 0,wI=typeof queueMicrotask=="function"?queueMicrotask:typeof Lw<"u"?function(e){return Lw.resolve(null).then(e).catch(uN)}:Nw,Py=null,hr=0,Nc=1,Iw=2,Pw=3,di=4,hi=new Map,Uw=new Set,Rs=Jt.d;Jt.d={f:function(){var e=Rs.f(),n=Vr();return e||n},r:function(e){var n=yi(e);n!==null&&n.tag===5&&n.type==="form"?pE(n):Rs.r(e)},D:function(e){Rs.D(e),i_("dns-prefetch",e,null)},C:function(e,n){Rs.C(e,n),i_("preconnect",e,n)},L:function(e,n,s){Rs.L(e,n,s);var o=Io;if(o&&e&&n){var d='link[rel="preload"][as="'+Zn(n)+'"]';n==="image"&&s&&s.imageSrcSet?(d+='[imagesrcset="'+Zn(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(d+='[imagesizes="'+Zn(s.imageSizes)+'"]')):d+='[href="'+Zn(e)+'"]';var f=d;switch(n){case"style":f=Wr(e);break;case"script":f=Qr(e)}hi.has(f)||(e=It({rel:"preload",href:n==="image"&&s&&s.imageSrcSet?void 0:e,as:n},s),hi.set(f,e),o.querySelector(d)!==null||n==="style"&&o.querySelector(ql(f))||n==="script"&&o.querySelector(Yl(f))||(n=o.createElement("link"),Ke(n,"link",e),P(n),o.head.appendChild(n)))}},m:function(e,n){Rs.m(e,n);var s=Io;if(s&&e){var o=n&&typeof n.as=="string"?n.as:"script",d='link[rel="modulepreload"][as="'+Zn(o)+'"][href="'+Zn(e)+'"]',f=d;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=Qr(e)}if(!hi.has(f)&&(e=It({rel:"modulepreload",href:e},n),hi.set(f,e),s.querySelector(d)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(Yl(f)))return}o=s.createElement("link"),Ke(o,"link",e),P(o),s.head.appendChild(o)}}},X:function(e,n){Rs.X(e,n);var s=Io;if(s&&e){var o=T(s).hoistableScripts,d=Qr(e),f=o.get(d);f||(f=s.querySelector(Yl(d)),f||(e=It({src:e,async:!0},n),(n=hi.get(d))&&cg(e,n),f=s.createElement("script"),P(f),Ke(f,"link",e),s.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},o.set(d,f))}},S:function(e,n,s){Rs.S(e,n,s);var o=Io;if(o&&e){var d=T(o).hoistableStyles,f=Wr(e);n=n||"default";var v=d.get(f);if(!v){var E={loading:hr,preload:null};if(v=o.querySelector(ql(f)))E.loading=Nc|di;else{e=It({rel:"stylesheet",href:e,"data-precedence":n},s),(s=hi.get(f))&&lg(e,s);var w=v=o.createElement("link");P(w),Ke(w,"link",e),w._p=new Promise(function(x,H){w.onload=x,w.onerror=H}),w.addEventListener("load",function(){E.loading|=Nc}),w.addEventListener("error",function(){E.loading|=Iw}),E.loading|=di,Od(v,n,o)}v={type:"stylesheet",instance:v,count:1,state:E},d.set(f,v)}}},M:function(e,n){Rs.M(e,n);var s=Io;if(s&&e){var o=T(s).hoistableScripts,d=Qr(e),f=o.get(d);f||(f=s.querySelector(Yl(d)),f||(e=It({src:e,async:!0,type:"module"},n),(n=hi.get(d))&&cg(e,n),f=s.createElement("script"),P(f),Ke(f,"link",e),s.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},o.set(d,f))}}};var Io=typeof document>"u"?null:document,Th=null,Lc=null,Uy=null,wh=null,fr=GN,Ic={$$typeof:Hi,Provider:null,Consumer:null,_currentValue:fr,_currentValue2:fr,_threadCount:0},zw="%c%s%c ",Hw="background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px",Bw="",Ch=" ",CI=Function.prototype.bind,Fw=!1,jw=null,$w=null,Gw=null,Vw=null,qw=null,Yw=null,Xw=null,Ww=null,Qw=null;jw=function(e,n,s,o){n=l(e,n),n!==null&&(s=t(n.memoizedState,s,0,o),n.memoizedState=s,n.baseState=s,e.memoizedProps=It({},e.memoizedProps),s=Cn(e,2),s!==null&&Ce(s,e,2))},$w=function(e,n,s){n=l(e,n),n!==null&&(s=r(n.memoizedState,s,0),n.memoizedState=s,n.baseState=s,e.memoizedProps=It({},e.memoizedProps),s=Cn(e,2),s!==null&&Ce(s,e,2))},Gw=function(e,n,s,o){n=l(e,n),n!==null&&(s=i(n.memoizedState,s,o),n.memoizedState=s,n.baseState=s,e.memoizedProps=It({},e.memoizedProps),s=Cn(e,2),s!==null&&Ce(s,e,2))},Vw=function(e,n,s){e.pendingProps=t(e.memoizedProps,n,0,s),e.alternate&&(e.alternate.pendingProps=e.pendingProps),n=Cn(e,2),n!==null&&Ce(n,e,2)},qw=function(e,n){e.pendingProps=r(e.memoizedProps,n,0),e.alternate&&(e.alternate.pendingProps=e.pendingProps),n=Cn(e,2),n!==null&&Ce(n,e,2)},Yw=function(e,n,s){e.pendingProps=i(e.memoizedProps,n,s),e.alternate&&(e.alternate.pendingProps=e.pendingProps),n=Cn(e,2),n!==null&&Ce(n,e,2)},Xw=function(e){var n=Cn(e,2);n!==null&&Ce(n,e,2)},Ww=function(e){u=e},Qw=function(e){c=e};var xh=!0,Rh=null,zy=!1,pa=null,ma=null,ga=null,Pc=new Map,Uc=new Map,ya=[],xI="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" "),Dh=null;if(Id.prototype.render=gg.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error("Cannot update an unmounted root.");var s=arguments;typeof s[1]=="function"?console.error("does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."):R(s[1])?console.error("You passed a container to the second argument of root.render(...). You don't need to pass it again since you already passed it to create the root."):typeof s[1]<"u"&&console.error("You passed a second argument to root.render(...) but it only accepts one argument."),s=e;var o=n.current,d=Fn(o);dg(o,d,s,n,null,null)},Id.prototype.unmount=gg.prototype.unmount=function(){var e=arguments;if(typeof e[0]=="function"&&console.error("does not support a callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."),e=this._internalRoot,e!==null){this._internalRoot=null;var n=e.containerInfo;(te&(vn|wi))!==Gn&&console.error("Attempted to synchronously unmount a root while React was already rendering. React cannot finish unmounting the root until the current render has completed, which may lead to a race condition."),dg(e.current,2,null,e,null,null),Vr(),n[na]=null}},Id.prototype.unstable_scheduleHydration=function(e){if(e){var n=ml();e={blockedOn:null,target:e,priority:n};for(var s=0;s<ya.length&&n!==0&&n<ya[s].priority;s++);ya.splice(s,0,e),s===0&&g_(e)}},function(){var e=yg.version;if(e!=="19.1.0")throw Error(`Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:
268
+ Check the top-level render call using <`+o+">.");var v="";s!=null&&e!==s&&(o=null,typeof s.tag=="number"?o=Y(s):typeof s.name=="string"&&(o=s.name),o&&(v=" It was passed a child from "+o+".")),pt(n,function(){console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',f,v)})}}};var Ao=vE(!0),YT=vE(!1),ui=at(null),Xi=null,_o=1,Sc=2,Be=at(0),WT={},QT=new Set,KT=new Set,ZT=new Set,JT=new Set,tw=new Set,ew=new Set,nw=new Set,iw=new Set,sw=new Set,aw=new Set;Object.freeze(WT);var ly={enqueueSetState:function(e,n,s){e=e._reactInternals;var o=Fn(e),d=Gs(o);d.payload=n,s!=null&&(vm(s),d.callback=s),n=Vs(e,d,o),n!==null&&(xe(n,e,o),Dl(n,e,o)),Pn(e,o)},enqueueReplaceState:function(e,n,s){e=e._reactInternals;var o=Fn(e),d=Gs(o);d.tag=TT,d.payload=n,s!=null&&(vm(s),d.callback=s),n=Vs(e,d,o),n!==null&&(xe(n,e,o),Dl(n,e,o)),Pn(e,o)},enqueueForceUpdate:function(e,n){e=e._reactInternals;var s=Fn(e),o=Gs(s);o.tag=wT,n!=null&&(vm(n),o.callback=n),n=Vs(e,o,s),n!==null&&(xe(n,e,s),Dl(n,e,s)),rt!==null&&typeof rt.markForceUpdateScheduled=="function"&&rt.markForceUpdateScheduled(e,s)}},cy=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},To=null,uy=null,rw=Error("This is not a real error. It's an implementation detail of React's selective hydration feature. If this leaks into userspace, it's a bug in React. Please file an issue."),$e=!1,ow={},lw={},cw={},uw={},wo=!1,dw={},dy={},hy={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null},hw=!1,fw=null;fw=new Set;var Ts=!1,Ce=!1,fy=!1,pw=typeof WeakSet=="function"?WeakSet:Set,Ge=null,xo=null,Co=null,Pe=null,On=!1,Ti=null,Ec=8192,aI={getCacheForType:function(e){var n=pe(ze),s=n.data.get(e);return s===void 0&&(s=e(),n.data.set(e,s)),s},getOwner:function(){return $n}};if(typeof Symbol=="function"&&Symbol.for){var Ac=Symbol.for;Ac("selector.component"),Ac("selector.has_pseudo_class"),Ac("selector.role"),Ac("selector.test_id"),Ac("selector.text")}var rI=[],oI=typeof WeakMap=="function"?WeakMap:Map,Gn=0,vn=2,wi=4,ws=0,_c=1,Ro=2,py=3,ir=4,uh=6,mw=5,te=Gn,ce=null,Ut=null,Bt=0,kn=0,Tc=1,sr=2,wc=3,gw=4,my=5,Do=6,xc=7,gy=8,ar=9,ee=kn,Vn=null,la=!1,Mo=!1,yy=!1,Yi=0,Ee=ws,ca=0,ua=0,by=0,qn=0,rr=0,Cc=null,Sn=null,dh=!1,vy=0,yw=300,hh=1/0,bw=500,Rc=null,da=null,lI=0,cI=1,uI=2,or=0,vw=1,Sw=2,Ew=3,dI=4,Sy=5,en=0,ha=null,Oo=null,fa=0,Ey=0,Ay=null,Aw=null,hI=50,Dc=0,_y=null,Ty=!1,fh=!1,fI=50,lr=0,Mc=null,ko=!1,ph=null,_w=!1,Tw=new Set,pI={},mh=null,No=null,wy=!1,xy=!1,gh=!1,Cy=!1,cr=0,Ry={};(function(){for(var e=0;e<Vg.length;e++){var n=Vg[e],s=n.toLowerCase();n=n[0].toUpperCase()+n.slice(1),bi(s,"on"+n)}bi(lT,"onAnimationEnd"),bi(cT,"onAnimationIteration"),bi(uT,"onAnimationStart"),bi("dblclick","onDoubleClick"),bi("focusin","onFocus"),bi("focusout","onBlur"),bi(VL,"onTransitionRun"),bi(qL,"onTransitionStart"),bi(XL,"onTransitionCancel"),bi(dT,"onTransitionEnd")})(),it("onMouseEnter",["mouseout","mouseover"]),it("onMouseLeave",["mouseout","mouseover"]),it("onPointerEnter",["pointerout","pointerover"]),it("onPointerLeave",["pointerout","pointerover"]),et("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),et("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),et("onBeforeInput",["compositionend","keypress","textInput","paste"]),et("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),et("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),et("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Oc="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Dy=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Oc)),yh="_reactListening"+Math.random().toString(36).slice(2),ww=!1,xw=!1,bh=!1,Cw=!1,vh=!1,Sh=!1,Rw=!1,Eh={},mI=/\r\n?/g,gI=/\u0000|\uFFFD/g,ur="http://www.w3.org/1999/xlink",My="http://www.w3.org/XML/1998/namespace",yI="javascript:throw new Error('React form unexpectedly submitted.')",bI="suppressHydrationWarning",Ah="$",_h="/$",xs="$?",kc="$!",vI=1,SI=2,EI=4,Oy="F!",Dw="F",Mw="complete",AI="style",Cs=0,Lo=1,Th=2,ky=null,Ny=null,Ow={dialog:!0,webview:!0},Ly=null,kw=typeof setTimeout=="function"?setTimeout:void 0,_I=typeof clearTimeout=="function"?clearTimeout:void 0,dr=-1,Nw=typeof Promise=="function"?Promise:void 0,TI=typeof queueMicrotask=="function"?queueMicrotask:typeof Nw<"u"?function(e){return Nw.resolve(null).then(e).catch(cN)}:kw,Iy=null,hr=0,Nc=1,Lw=2,Iw=3,di=4,hi=new Map,Pw=new Set,Rs=Jt.d;Jt.d={f:function(){var e=Rs.f(),n=Vr();return e||n},r:function(e){var n=yi(e);n!==null&&n.tag===5&&n.type==="form"?fE(n):Rs.r(e)},D:function(e){Rs.D(e),n_("dns-prefetch",e,null)},C:function(e,n){Rs.C(e,n),n_("preconnect",e,n)},L:function(e,n,s){Rs.L(e,n,s);var o=Io;if(o&&e&&n){var d='link[rel="preload"][as="'+Zn(n)+'"]';n==="image"&&s&&s.imageSrcSet?(d+='[imagesrcset="'+Zn(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(d+='[imagesizes="'+Zn(s.imageSizes)+'"]')):d+='[href="'+Zn(e)+'"]';var f=d;switch(n){case"style":f=Wr(e);break;case"script":f=Qr(e)}hi.has(f)||(e=It({rel:"preload",href:n==="image"&&s&&s.imageSrcSet?void 0:e,as:n},s),hi.set(f,e),o.querySelector(d)!==null||n==="style"&&o.querySelector(ql(f))||n==="script"&&o.querySelector(Xl(f))||(n=o.createElement("link"),Ke(n,"link",e),P(n),o.head.appendChild(n)))}},m:function(e,n){Rs.m(e,n);var s=Io;if(s&&e){var o=n&&typeof n.as=="string"?n.as:"script",d='link[rel="modulepreload"][as="'+Zn(o)+'"][href="'+Zn(e)+'"]',f=d;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=Qr(e)}if(!hi.has(f)&&(e=It({rel:"modulepreload",href:e},n),hi.set(f,e),s.querySelector(d)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(Xl(f)))return}o=s.createElement("link"),Ke(o,"link",e),P(o),s.head.appendChild(o)}}},X:function(e,n){Rs.X(e,n);var s=Io;if(s&&e){var o=T(s).hoistableScripts,d=Qr(e),f=o.get(d);f||(f=s.querySelector(Xl(d)),f||(e=It({src:e,async:!0},n),(n=hi.get(d))&&lg(e,n),f=s.createElement("script"),P(f),Ke(f,"link",e),s.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},o.set(d,f))}},S:function(e,n,s){Rs.S(e,n,s);var o=Io;if(o&&e){var d=T(o).hoistableStyles,f=Wr(e);n=n||"default";var v=d.get(f);if(!v){var E={loading:hr,preload:null};if(v=o.querySelector(ql(f)))E.loading=Nc|di;else{e=It({rel:"stylesheet",href:e,"data-precedence":n},s),(s=hi.get(f))&&og(e,s);var w=v=o.createElement("link");P(w),Ke(w,"link",e),w._p=new Promise(function(C,H){w.onload=C,w.onerror=H}),w.addEventListener("load",function(){E.loading|=Nc}),w.addEventListener("error",function(){E.loading|=Lw}),E.loading|=di,kd(v,n,o)}v={type:"stylesheet",instance:v,count:1,state:E},d.set(f,v)}}},M:function(e,n){Rs.M(e,n);var s=Io;if(s&&e){var o=T(s).hoistableScripts,d=Qr(e),f=o.get(d);f||(f=s.querySelector(Xl(d)),f||(e=It({src:e,async:!0,type:"module"},n),(n=hi.get(d))&&lg(e,n),f=s.createElement("script"),P(f),Ke(f,"link",e),s.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},o.set(d,f))}}};var Io=typeof document>"u"?null:document,wh=null,Lc=null,Py=null,xh=null,fr=$N,Ic={$$typeof:Hi,Provider:null,Consumer:null,_currentValue:fr,_currentValue2:fr,_threadCount:0},Uw="%c%s%c ",zw="background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px",Hw="",Ch=" ",wI=Function.prototype.bind,Bw=!1,Fw=null,jw=null,$w=null,Gw=null,Vw=null,qw=null,Xw=null,Yw=null,Ww=null;Fw=function(e,n,s,o){n=l(e,n),n!==null&&(s=t(n.memoizedState,s,0,o),n.memoizedState=s,n.baseState=s,e.memoizedProps=It({},e.memoizedProps),s=xn(e,2),s!==null&&xe(s,e,2))},jw=function(e,n,s){n=l(e,n),n!==null&&(s=r(n.memoizedState,s,0),n.memoizedState=s,n.baseState=s,e.memoizedProps=It({},e.memoizedProps),s=xn(e,2),s!==null&&xe(s,e,2))},$w=function(e,n,s,o){n=l(e,n),n!==null&&(s=i(n.memoizedState,s,o),n.memoizedState=s,n.baseState=s,e.memoizedProps=It({},e.memoizedProps),s=xn(e,2),s!==null&&xe(s,e,2))},Gw=function(e,n,s){e.pendingProps=t(e.memoizedProps,n,0,s),e.alternate&&(e.alternate.pendingProps=e.pendingProps),n=xn(e,2),n!==null&&xe(n,e,2)},Vw=function(e,n){e.pendingProps=r(e.memoizedProps,n,0),e.alternate&&(e.alternate.pendingProps=e.pendingProps),n=xn(e,2),n!==null&&xe(n,e,2)},qw=function(e,n,s){e.pendingProps=i(e.memoizedProps,n,s),e.alternate&&(e.alternate.pendingProps=e.pendingProps),n=xn(e,2),n!==null&&xe(n,e,2)},Xw=function(e){var n=xn(e,2);n!==null&&xe(n,e,2)},Yw=function(e){u=e},Ww=function(e){c=e};var Rh=!0,Dh=null,Uy=!1,pa=null,ma=null,ga=null,Pc=new Map,Uc=new Map,ya=[],xI="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" "),Mh=null;if(Pd.prototype.render=mg.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error("Cannot update an unmounted root.");var s=arguments;typeof s[1]=="function"?console.error("does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."):R(s[1])?console.error("You passed a container to the second argument of root.render(...). You don't need to pass it again since you already passed it to create the root."):typeof s[1]<"u"&&console.error("You passed a second argument to root.render(...) but it only accepts one argument."),s=e;var o=n.current,d=Fn(o);ug(o,d,s,n,null,null)},Pd.prototype.unmount=mg.prototype.unmount=function(){var e=arguments;if(typeof e[0]=="function"&&console.error("does not support a callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."),e=this._internalRoot,e!==null){this._internalRoot=null;var n=e.containerInfo;(te&(vn|wi))!==Gn&&console.error("Attempted to synchronously unmount a root while React was already rendering. React cannot finish unmounting the root until the current render has completed, which may lead to a race condition."),ug(e.current,2,null,e,null,null),Vr(),n[na]=null}},Pd.prototype.unstable_scheduleHydration=function(e){if(e){var n=ml();e={blockedOn:null,target:e,priority:n};for(var s=0;s<ya.length&&n!==0&&n<ya[s].priority;s++);ya.splice(s,0,e),s===0&&m_(e)}},function(){var e=gg.version;if(e!=="19.1.0")throw Error(`Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:
269
269
  - react: `+(e+`
270
270
  - react-dom: 19.1.0
271
- Learn more: https://react.dev/warnings/version-mismatch`))}(),typeof Map=="function"&&Map.prototype!=null&&typeof Map.prototype.forEach=="function"&&typeof Set=="function"&&Set.prototype!=null&&typeof Set.prototype.clear=="function"&&typeof Set.prototype.forEach=="function"||console.error("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://react.dev/link/react-polyfills"),Jt.findDOMNode=function(e){var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error("Unable to find node on an unmounted component."):(e=Object.keys(e).join(","),Error("Argument appears to not be a ReactComponent. Keys: "+e));return e=U(n),e=e!==null?I(e):null,e=e===null?null:e.stateNode,e},!function(){var e={bundleType:1,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:G,reconcilerVersion:"19.1.0"};return e.overrideHookState=jw,e.overrideHookStateDeletePath=$w,e.overrideHookStateRenamePath=Gw,e.overrideProps=Vw,e.overridePropsDeletePath=qw,e.overridePropsRenamePath=Yw,e.scheduleUpdate=Xw,e.setErrorHandler=Ww,e.setSuspenseHandler=Qw,e.scheduleRefresh=A,e.scheduleRoot=S,e.setRefreshHandler=_,e.getCurrentFiber=NN,e.getLaneLabelMap=LN,e.injectProfilingHooks=Wt,oe(e)}()&&Gi&&window.top===window.self&&(-1<navigator.userAgent.indexOf("Chrome")&&navigator.userAgent.indexOf("Edge")===-1||-1<navigator.userAgent.indexOf("Firefox"))){var Kw=window.location.protocol;/^(https?|file):$/.test(Kw)&&console.info("%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools"+(Kw==="file:"?`
272
- You might need to use a local HTTP server (instead of file://): https://react.dev/link/react-devtools-faq`:""),"font-weight:bold")}Xo.createRoot=function(e,n){if(!R(e))throw Error("Target container is not a DOM element.");v_(e);var s=!1,o="",d=TE,f=wE,v=CE,E=null;return n!=null&&(n.hydrate?console.warn("hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead."):typeof n=="object"&&n!==null&&n.$$typeof===Zs&&console.error(`You passed a JSX element to createRoot. You probably meant to call root.render instead. Example usage:
271
+ Learn more: https://react.dev/warnings/version-mismatch`))}(),typeof Map=="function"&&Map.prototype!=null&&typeof Map.prototype.forEach=="function"&&typeof Set=="function"&&Set.prototype!=null&&typeof Set.prototype.clear=="function"&&typeof Set.prototype.forEach=="function"||console.error("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://react.dev/link/react-polyfills"),Jt.findDOMNode=function(e){var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error("Unable to find node on an unmounted component."):(e=Object.keys(e).join(","),Error("Argument appears to not be a ReactComponent. Keys: "+e));return e=U(n),e=e!==null?I(e):null,e=e===null?null:e.stateNode,e},!function(){var e={bundleType:1,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:G,reconcilerVersion:"19.1.0"};return e.overrideHookState=Fw,e.overrideHookStateDeletePath=jw,e.overrideHookStateRenamePath=$w,e.overrideProps=Gw,e.overridePropsDeletePath=Vw,e.overridePropsRenamePath=qw,e.scheduleUpdate=Xw,e.setErrorHandler=Yw,e.setSuspenseHandler=Ww,e.scheduleRefresh=A,e.scheduleRoot=S,e.setRefreshHandler=_,e.getCurrentFiber=kN,e.getLaneLabelMap=NN,e.injectProfilingHooks=Wt,le(e)}()&&Gi&&window.top===window.self&&(-1<navigator.userAgent.indexOf("Chrome")&&navigator.userAgent.indexOf("Edge")===-1||-1<navigator.userAgent.indexOf("Firefox"))){var Qw=window.location.protocol;/^(https?|file):$/.test(Qw)&&console.info("%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools"+(Qw==="file:"?`
272
+ You might need to use a local HTTP server (instead of file://): https://react.dev/link/react-devtools-faq`:""),"font-weight:bold")}Yo.createRoot=function(e,n){if(!R(e))throw Error("Target container is not a DOM element.");b_(e);var s=!1,o="",d=_E,f=TE,v=wE,E=null;return n!=null&&(n.hydrate?console.warn("hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead."):typeof n=="object"&&n!==null&&n.$$typeof===Zs&&console.error(`You passed a JSX element to createRoot. You probably meant to call root.render instead. Example usage:
273
273
 
274
274
  let root = createRoot(domContainer);
275
- root.render(<App />);`),n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onUncaughtError!==void 0&&(d=n.onUncaughtError),n.onCaughtError!==void 0&&(f=n.onCaughtError),n.onRecoverableError!==void 0&&(v=n.onRecoverableError),n.unstable_transitionCallbacks!==void 0&&(E=n.unstable_transitionCallbacks)),n=u_(e,1,!1,null,null,s,o,d,f,v,E,null),e[na]=n.current,Zm(e),new gg(n)},Xo.hydrateRoot=function(e,n,s){if(!R(e))throw Error("Target container is not a DOM element.");v_(e),n===void 0&&console.error("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var o=!1,d="",f=TE,v=wE,E=CE,w=null,x=null;return s!=null&&(s.unstable_strictMode===!0&&(o=!0),s.identifierPrefix!==void 0&&(d=s.identifierPrefix),s.onUncaughtError!==void 0&&(f=s.onUncaughtError),s.onCaughtError!==void 0&&(v=s.onCaughtError),s.onRecoverableError!==void 0&&(E=s.onRecoverableError),s.unstable_transitionCallbacks!==void 0&&(w=s.unstable_transitionCallbacks),s.formState!==void 0&&(x=s.formState)),n=u_(e,1,!0,n,s??null,o,d,f,v,E,w,x),n.context=d_(null),s=n.current,o=Fn(s),o=hl(o),d=Gs(o),d.callback=null,Vs(s,d,o),s=o,n.current.lanes=s,Bs(n,s),Ui(n),e[na]=n.current,Zm(e),new Id(n)},Xo.version="19.1.0",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}(),Xo}var Pv;function tM(){return Pv||(Pv=1,_f.exports=JD()),_f.exports}var eM=tM(),xf={exports:{}},hu={},Uv;function nM(){if(Uv)return hu;Uv=1;/**
275
+ root.render(<App />);`),n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onUncaughtError!==void 0&&(d=n.onUncaughtError),n.onCaughtError!==void 0&&(f=n.onCaughtError),n.onRecoverableError!==void 0&&(v=n.onRecoverableError),n.unstable_transitionCallbacks!==void 0&&(E=n.unstable_transitionCallbacks)),n=c_(e,1,!1,null,null,s,o,d,f,v,E,null),e[na]=n.current,Km(e),new mg(n)},Yo.hydrateRoot=function(e,n,s){if(!R(e))throw Error("Target container is not a DOM element.");b_(e),n===void 0&&console.error("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var o=!1,d="",f=_E,v=TE,E=wE,w=null,C=null;return s!=null&&(s.unstable_strictMode===!0&&(o=!0),s.identifierPrefix!==void 0&&(d=s.identifierPrefix),s.onUncaughtError!==void 0&&(f=s.onUncaughtError),s.onCaughtError!==void 0&&(v=s.onCaughtError),s.onRecoverableError!==void 0&&(E=s.onRecoverableError),s.unstable_transitionCallbacks!==void 0&&(w=s.unstable_transitionCallbacks),s.formState!==void 0&&(C=s.formState)),n=c_(e,1,!0,n,s??null,o,d,f,v,E,w,C),n.context=u_(null),s=n.current,o=Fn(s),o=hl(o),d=Gs(o),d.callback=null,Vs(s,d,o),s=o,n.current.lanes=s,Bs(n,s),Ui(n),e[na]=n.current,Km(e),new Pd(n)},Yo.version="19.1.0",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}(),Yo}var Lv;function tM(){return Lv||(Lv=1,Tf.exports=JD()),Tf.exports}var eM=tM(),Rf={exports:{}},hu={},Iv;function nM(){if(Iv)return hu;Iv=1;/**
276
276
  * @license React
277
277
  * react-jsx-dev-runtime.development.js
278
278
  *
@@ -280,12 +280,12 @@ You might need to use a local HTTP server (instead of file://): https://react.de
280
280
  *
281
281
  * This source code is licensed under the MIT license found in the
282
282
  * LICENSE file in the root directory of this source tree.
283
- */return function(){function l(W){if(W==null)return null;if(typeof W=="function")return W.$$typeof===at?null:W.displayName||W.name||null;if(typeof W=="string")return W;switch(W){case _:return"Fragment";case C:return"Profiler";case R:return"StrictMode";case I:return"Suspense";case j:return"SuspenseList";case X:return"Activity"}if(typeof W=="object")switch(typeof W.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),W.$$typeof){case A:return"Portal";case O:return(W.displayName||"Context")+".Provider";case N:return(W._context.displayName||"Context")+".Consumer";case U:var ht=W.render;return W=W.displayName,W||(W=ht.displayName||ht.name||"",W=W!==""?"ForwardRef("+W+")":"ForwardRef"),W;case F:return ht=W.displayName||null,ht!==null?ht:l(W.type)||"Memo";case J:ht=W._payload,W=W._init;try{return l(W(ht))}catch{}}return null}function t(W){return""+W}function i(W){try{t(W);var ht=!1}catch{ht=!0}if(ht){ht=console;var st=ht.error,vt=typeof Symbol=="function"&&Symbol.toStringTag&&W[Symbol.toStringTag]||W.constructor.name||"Object";return st.call(ht,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",vt),t(W)}}function a(W){if(W===_)return"<>";if(typeof W=="object"&&W!==null&&W.$$typeof===J)return"<...>";try{var ht=l(W);return ht?"<"+ht+">":"<...>"}catch{return"<...>"}}function r(){var W=K.A;return W===null?null:W.getOwner()}function c(){return Error("react-stack-top-frame")}function u(W){if(lt.call(W,"key")){var ht=Object.getOwnPropertyDescriptor(W,"key").get;if(ht&&ht.isReactWarning)return!1}return W.key!==void 0}function h(W,ht){function st(){Gt||(Gt=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",ht))}st.isReactWarning=!0,Object.defineProperty(W,"key",{get:st,configurable:!0})}function p(){var W=l(this.type);return B[W]||(B[W]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),W=this.props.ref,W!==void 0?W:null}function m(W,ht,st,vt,Zt,oe,tt,Wt){return st=oe.ref,W={$$typeof:S,type:W,key:ht,props:oe,_owner:Zt},(st!==void 0?st:null)!==null?Object.defineProperty(W,"ref",{enumerable:!1,get:p}):Object.defineProperty(W,"ref",{enumerable:!1,value:null}),W._store={},Object.defineProperty(W._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(W,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(W,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:tt}),Object.defineProperty(W,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Wt}),Object.freeze&&(Object.freeze(W.props),Object.freeze(W)),W}function g(W,ht,st,vt,Zt,oe,tt,Wt){var Vt=ht.children;if(Vt!==void 0)if(vt)if(Et(Vt)){for(vt=0;vt<Vt.length;vt++)y(Vt[vt]);Object.freeze&&Object.freeze(Vt)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else y(Vt);if(lt.call(ht,"key")){Vt=l(W);var be=Object.keys(ht).filter(function(Tn){return Tn!=="key"});vt=0<be.length?"{key: someKey, "+be.join(": ..., ")+": ...}":"{key: someKey}",xt[Vt+vt]||(be=0<be.length?"{"+be.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
283
+ */return function(){function l(W){if(W==null)return null;if(typeof W=="function")return W.$$typeof===at?null:W.displayName||W.name||null;if(typeof W=="string")return W;switch(W){case _:return"Fragment";case x:return"Profiler";case R:return"StrictMode";case I:return"Suspense";case j:return"SuspenseList";case Y:return"Activity"}if(typeof W=="object")switch(typeof W.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),W.$$typeof){case A:return"Portal";case k:return(W.displayName||"Context")+".Provider";case L:return(W._context.displayName||"Context")+".Consumer";case U:var ht=W.render;return W=W.displayName,W||(W=ht.displayName||ht.name||"",W=W!==""?"ForwardRef("+W+")":"ForwardRef"),W;case F:return ht=W.displayName||null,ht!==null?ht:l(W.type)||"Memo";case J:ht=W._payload,W=W._init;try{return l(W(ht))}catch{}}return null}function t(W){return""+W}function i(W){try{t(W);var ht=!1}catch{ht=!0}if(ht){ht=console;var st=ht.error,vt=typeof Symbol=="function"&&Symbol.toStringTag&&W[Symbol.toStringTag]||W.constructor.name||"Object";return st.call(ht,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",vt),t(W)}}function a(W){if(W===_)return"<>";if(typeof W=="object"&&W!==null&&W.$$typeof===J)return"<...>";try{var ht=l(W);return ht?"<"+ht+">":"<...>"}catch{return"<...>"}}function r(){var W=K.A;return W===null?null:W.getOwner()}function c(){return Error("react-stack-top-frame")}function u(W){if(lt.call(W,"key")){var ht=Object.getOwnPropertyDescriptor(W,"key").get;if(ht&&ht.isReactWarning)return!1}return W.key!==void 0}function h(W,ht){function st(){Gt||(Gt=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",ht))}st.isReactWarning=!0,Object.defineProperty(W,"key",{get:st,configurable:!0})}function p(){var W=l(this.type);return B[W]||(B[W]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),W=this.props.ref,W!==void 0?W:null}function m(W,ht,st,vt,Zt,le,tt,Wt){return st=le.ref,W={$$typeof:S,type:W,key:ht,props:le,_owner:Zt},(st!==void 0?st:null)!==null?Object.defineProperty(W,"ref",{enumerable:!1,get:p}):Object.defineProperty(W,"ref",{enumerable:!1,value:null}),W._store={},Object.defineProperty(W._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(W,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(W,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:tt}),Object.defineProperty(W,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Wt}),Object.freeze&&(Object.freeze(W.props),Object.freeze(W)),W}function g(W,ht,st,vt,Zt,le,tt,Wt){var Vt=ht.children;if(Vt!==void 0)if(vt)if(Et(Vt)){for(vt=0;vt<Vt.length;vt++)y(Vt[vt]);Object.freeze&&Object.freeze(Vt)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else y(Vt);if(lt.call(ht,"key")){Vt=l(W);var ve=Object.keys(ht).filter(function(Tn){return Tn!=="key"});vt=0<ve.length?"{key: someKey, "+ve.join(": ..., ")+": ...}":"{key: someKey}",Ct[Vt+vt]||(ve=0<ve.length?"{"+ve.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
284
284
  let props = %s;
285
285
  <%s {...props} />
286
286
  React keys must be passed directly to JSX without using spread:
287
287
  let props = %s;
288
- <%s key={someKey} {...props} />`,vt,Vt,be,Vt),xt[Vt+vt]=!0)}if(Vt=null,st!==void 0&&(i(st),Vt=""+st),u(ht)&&(i(ht.key),Vt=""+ht.key),"key"in ht){st={};for(var Xe in ht)Xe!=="key"&&(st[Xe]=ht[Xe])}else st=ht;return Vt&&h(st,typeof W=="function"?W.displayName||W.name||"Unknown":W),m(W,Vt,oe,Zt,r(),st,tt,Wt)}function y(W){typeof W=="object"&&W!==null&&W.$$typeof===S&&W._store&&(W._store.validated=1)}var b=du(),S=Symbol.for("react.transitional.element"),A=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),N=Symbol.for("react.consumer"),O=Symbol.for("react.context"),U=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),j=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),J=Symbol.for("react.lazy"),X=Symbol.for("react.activity"),at=Symbol.for("react.client.reference"),K=b.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,lt=Object.prototype.hasOwnProperty,Et=Array.isArray,bt=console.createTask?console.createTask:function(){return null};b={"react-stack-bottom-frame":function(W){return W()}};var Gt,B={},Q=b["react-stack-bottom-frame"].bind(b,c)(),dt=bt(a(c)),xt={};hu.Fragment=_,hu.jsxDEV=function(W,ht,st,vt,Zt,oe){var tt=1e4>K.recentlyCreatedOwnerStacks++;return g(W,ht,st,vt,Zt,oe,tt?Error("react-stack-top-frame"):Q,tt?bt(a(W)):dt)}}(),hu}var zv;function iM(){return zv||(zv=1,xf.exports=nM()),xf.exports}var ge=iM();function Hv(l){return typeof chrome<"u"&&chrome.runtime&&chrome.runtime.getURL?chrome.runtime.getURL(l):typeof browser<"u"&&browser.runtime&&browser.runtime.getURL?browser.runtime.getURL(l):new URL(l,typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Qt&&Qt.tagName.toUpperCase()==="SCRIPT"&&Qt.src||new URL("corisco.umd.js",document.baseURI).href).href}const Bv={icons:{icon128:Hv("public/icon-128.png"),chevron:Hv("public/chevron-right.svg")}},sM=()=>{const l=Xt.app.iframe_url,t=Bv.icons.icon128,i=Bv.icons.chevron,a=Xt.ui.panel.min_width,r=Xt.ui.panel.max_width_ratio,c=540,u=()=>{try{const tt=localStorage.getItem("chatjt-panel-width");return tt?parseInt(tt,10):c}catch{return c}},h=tt=>{try{localStorage.setItem("chatjt-panel-width",tt.toString())}catch{}},[p,m]=En.useState(!1),[g,y]=En.useState(!1),[b,S]=En.useState(!1),[A,_]=En.useState(!1),[R,C]=En.useState(u()||c),[N,O]=En.useState(!1),U=En.useRef(null),I=En.useRef(null),j=En.useRef(null);En.useEffect(()=>{const tt=j.current,Wt=U.current;if(!tt||!Wt)return;let Vt=!1;const be=mi=>{if(!N)return;const Pn=window.innerWidth*r,is=window.innerWidth-mi.clientX;if(is>=a){const Ma=Math.max(a,Math.min(Pn,is));C(Ma),_(!1),Vt=!1}else C(a),_(!0),Vt=!0},Xe=()=>{N&&(O(!1),document.body.style.userSelect="",I.current&&(I.current.style.pointerEvents="auto"),tt.style.backgroundColor="transparent",Vt?m(!1):h(R),_(!1),Vt=!1),O(!1)},Tn=()=>{O(!0),document.body.style.userSelect="none",I.current&&(I.current.style.pointerEvents="none"),tt.style.backgroundColor="#1591EA90"};return tt.addEventListener("mousedown",Tn),window.addEventListener("mousemove",be),window.addEventListener("mouseup",Xe),()=>{tt.removeEventListener("mousedown",Tn),window.removeEventListener("mousemove",be),window.removeEventListener("mouseup",Xe)}},[a,r,N,R]),En.useEffect(()=>{!p&&R!==u()&&h(R)},[p,R]),En.useEffect(()=>{p&&_(!1)},[p]);const F=()=>{y(!0),S(!1)},J=()=>{S(!0)},X=()=>{S(!1),I.current?.contentWindow?.location.reload()},at={position:"absolute",bottom:50,right:50,width:60,height:60,backgroundColor:"#111827",color:"white",border:"none",borderRadius:"33%",display:"flex",justifyContent:"center",alignItems:"center",cursor:"pointer",boxShadow:"0 4px 8px rgba(0, 0, 0, 0.2)",zIndex:9998,transition:"transform 0.3s ease, box-shadow 0.3s ease",padding:10,boxSizing:"border-box"},K={width:"100%",height:"100%",objectFit:"contain"},lt={position:"fixed",top:0,right:0,height:"100vh",width:R,backgroundColor:"#f8f9fa",borderLeft:"1px solid #111827",boxShadow:"-5px 0 15px rgba(0, 0, 0, 0.1)",zIndex:9999,display:"flex",flexDirection:"column",transition:p?"transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.4s ease":"transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), visibility 0s 0.2s, opacity 0s 0.2s ease",transform:p?"translateX(0)":"translateX(100%)",visibility:p?"visible":"hidden"},Et={position:"absolute",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0, 0, 0, 0.15)",backdropFilter:"blur(4px)",WebkitBackdropFilter:"blur(4px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:10003,opacity:A?1:0,visibility:A?"visible":"hidden",transition:"opacity 0.2s ease, visibility 0.2s ease"},bt={color:"white",fontSize:18,fontWeight:600,fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",textAlign:"center",textShadow:"0 2px 4px rgba(0, 0, 0, 0.5)",animation:A?"chatjt-pulse 1.5s ease-in-out infinite":""},Gt={position:"absolute",top:0,left:-8,width:8,height:"100%",cursor:"col-resize",backgroundColor:"transparent",zIndex:10002},B={position:"absolute",top:"50%",left:-36,width:28,height:50,transform:"translateY(-50%)",backgroundColor:"#111827",color:"white",borderRadius:20,cursor:"pointer",zIndex:10001,display:"flex",justifyContent:"center",alignItems:"center",transition:"transform 0.2s ease",padding:"6px 4px",boxSizing:"border-box"},Q={width:"100%",height:"100%",objectFit:"contain"},dt={position:"relative",flexGrow:1,overflow:"hidden"},xt={width:"100%",height:"100%",border:"none",transition:"opacity 0.3s ease"},W={position:"absolute",top:0,left:0,width:"100%",height:"100%",background:"linear-gradient(135deg, #253557 0%, #111827 100%)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3},ht={textAlign:"center",color:"white"},st={width:40,height:40,border:"3px solid rgba(255, 255, 255, 0.3)",borderRadius:"50%",borderTopColor:"white",animation:"chatjt-spin 1s ease-in-out infinite",margin:"0 auto 16px auto"},vt={fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",fontSize:14,fontWeight:500,marginBottom:12},Zt={fontSize:32,marginBottom:12,animation:"chatjt-pulse 2s ease-in-out infinite"},oe={background:"rgba(255, 255, 255, 0.2)",border:"1px solid rgba(255, 255, 255, 0.3)",color:"white",padding:"10px 20px",borderRadius:6,cursor:"pointer",fontSize:13,fontWeight:500,transition:"all 0.2s ease",marginTop:8};return En.useEffect(()=>{const tt=document.createElement("style");return tt.innerHTML=`
288
+ <%s key={someKey} {...props} />`,vt,Vt,ve,Vt),Ct[Vt+vt]=!0)}if(Vt=null,st!==void 0&&(i(st),Vt=""+st),u(ht)&&(i(ht.key),Vt=""+ht.key),"key"in ht){st={};for(var Ye in ht)Ye!=="key"&&(st[Ye]=ht[Ye])}else st=ht;return Vt&&h(st,typeof W=="function"?W.displayName||W.name||"Unknown":W),m(W,Vt,le,Zt,r(),st,tt,Wt)}function y(W){typeof W=="object"&&W!==null&&W.$$typeof===S&&W._store&&(W._store.validated=1)}var b=du(),S=Symbol.for("react.transitional.element"),A=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),L=Symbol.for("react.consumer"),k=Symbol.for("react.context"),U=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),j=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),J=Symbol.for("react.lazy"),Y=Symbol.for("react.activity"),at=Symbol.for("react.client.reference"),K=b.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,lt=Object.prototype.hasOwnProperty,Et=Array.isArray,bt=console.createTask?console.createTask:function(){return null};b={"react-stack-bottom-frame":function(W){return W()}};var Gt,B={},Q=b["react-stack-bottom-frame"].bind(b,c)(),dt=bt(a(c)),Ct={};hu.Fragment=_,hu.jsxDEV=function(W,ht,st,vt,Zt,le){var tt=1e4>K.recentlyCreatedOwnerStacks++;return g(W,ht,st,vt,Zt,le,tt?Error("react-stack-top-frame"):Q,tt?bt(a(W)):dt)}}(),hu}var Pv;function iM(){return Pv||(Pv=1,Rf.exports=nM()),Rf.exports}var ye=iM();function Uv(l){return typeof chrome<"u"&&chrome.runtime&&chrome.runtime.getURL?chrome.runtime.getURL(l):typeof browser<"u"&&browser.runtime&&browser.runtime.getURL?browser.runtime.getURL(l):new URL(l,typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Qt&&Qt.tagName.toUpperCase()==="SCRIPT"&&Qt.src||new URL("corisco.umd.js",document.baseURI).href).href}const zv={icons:{icon128:Uv("public/icon-128.png"),chevron:Uv("public/chevron-right.svg")}},sM=()=>{const l=Yt.app.iframe_url,t=zv.icons.icon128,i=zv.icons.chevron,a=Yt.ui.panel.min_width,r=Yt.ui.panel.max_width_ratio,c=540,u=()=>{try{const tt=localStorage.getItem("chatjt-panel-width");return tt?parseInt(tt,10):c}catch{return c}},h=tt=>{try{localStorage.setItem("chatjt-panel-width",tt.toString())}catch{}},[p,m]=En.useState(!1),[g,y]=En.useState(!1),[b,S]=En.useState(!1),[A,_]=En.useState(!1),[R,x]=En.useState(u()||c),[L,k]=En.useState(!1),U=En.useRef(null),I=En.useRef(null),j=En.useRef(null);En.useEffect(()=>{const tt=j.current,Wt=U.current;if(!tt||!Wt)return;let Vt=!1;const ve=mi=>{if(!L)return;const Pn=window.innerWidth*r,is=window.innerWidth-mi.clientX;if(is>=a){const Ma=Math.max(a,Math.min(Pn,is));x(Ma),_(!1),Vt=!1}else x(a),_(!0),Vt=!0},Ye=()=>{L&&(k(!1),document.body.style.userSelect="",I.current&&(I.current.style.pointerEvents="auto"),tt.style.backgroundColor="transparent",Vt?m(!1):h(R),_(!1),Vt=!1),k(!1)},Tn=()=>{k(!0),document.body.style.userSelect="none",I.current&&(I.current.style.pointerEvents="none"),tt.style.backgroundColor="#1591EA90"};return tt.addEventListener("mousedown",Tn),window.addEventListener("mousemove",ve),window.addEventListener("mouseup",Ye),()=>{tt.removeEventListener("mousedown",Tn),window.removeEventListener("mousemove",ve),window.removeEventListener("mouseup",Ye)}},[a,r,L,R]),En.useEffect(()=>{!p&&R!==u()&&h(R)},[p,R]),En.useEffect(()=>{p&&_(!1)},[p]);const F=()=>{y(!0),S(!1)},J=()=>{S(!0)},Y=()=>{S(!1),I.current?.contentWindow?.location.reload()},at={position:"absolute",bottom:50,right:50,width:60,height:60,backgroundColor:"#111827",color:"white",border:"none",borderRadius:"33%",display:"flex",justifyContent:"center",alignItems:"center",cursor:"pointer",boxShadow:"0 4px 8px rgba(0, 0, 0, 0.2)",zIndex:9998,transition:"transform 0.3s ease, box-shadow 0.3s ease",padding:10,boxSizing:"border-box"},K={width:"100%",height:"100%",objectFit:"contain"},lt={position:"fixed",top:0,right:0,height:"100vh",width:R,backgroundColor:"#f8f9fa",borderLeft:"1px solid #111827",boxShadow:"-5px 0 15px rgba(0, 0, 0, 0.1)",zIndex:9999,display:"flex",flexDirection:"column",transition:p?"transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.4s ease":"transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), visibility 0s 0.2s, opacity 0s 0.2s ease",transform:p?"translateX(0)":"translateX(100%)",visibility:p?"visible":"hidden"},Et={position:"absolute",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0, 0, 0, 0.15)",backdropFilter:"blur(4px)",WebkitBackdropFilter:"blur(4px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:10003,opacity:A?1:0,visibility:A?"visible":"hidden",transition:"opacity 0.2s ease, visibility 0.2s ease"},bt={color:"white",fontSize:18,fontWeight:600,fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",textAlign:"center",textShadow:"0 2px 4px rgba(0, 0, 0, 0.5)",animation:A?"chatjt-pulse 1.5s ease-in-out infinite":""},Gt={position:"absolute",top:0,left:-8,width:8,height:"100%",cursor:"col-resize",backgroundColor:"transparent",zIndex:10002},B={position:"absolute",top:"50%",left:-36,width:28,height:50,transform:"translateY(-50%)",backgroundColor:"#111827",color:"white",borderRadius:20,cursor:"pointer",zIndex:10001,display:"flex",justifyContent:"center",alignItems:"center",transition:"transform 0.2s ease",padding:"6px 4px",boxSizing:"border-box"},Q={width:"100%",height:"100%",objectFit:"contain"},dt={position:"relative",flexGrow:1,overflow:"hidden"},Ct={width:"100%",height:"100%",border:"none",transition:"opacity 0.3s ease"},W={position:"absolute",top:0,left:0,width:"100%",height:"100%",background:"linear-gradient(135deg, #253557 0%, #111827 100%)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3},ht={textAlign:"center",color:"white"},st={width:40,height:40,border:"3px solid rgba(255, 255, 255, 0.3)",borderRadius:"50%",borderTopColor:"white",animation:"chatjt-spin 1s ease-in-out infinite",margin:"0 auto 16px auto"},vt={fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",fontSize:14,fontWeight:500,marginBottom:12},Zt={fontSize:32,marginBottom:12,animation:"chatjt-pulse 2s ease-in-out infinite"},le={background:"rgba(255, 255, 255, 0.2)",border:"1px solid rgba(255, 255, 255, 0.3)",color:"white",padding:"10px 20px",borderRadius:6,cursor:"pointer",fontSize:13,fontWeight:500,transition:"all 0.2s ease",marginTop:8};return En.useEffect(()=>{const tt=document.createElement("style");return tt.innerHTML=`
289
289
  @keyframes chatjt-spin {
290
290
  to { transform: rotate(360deg); }
291
291
  }
@@ -293,28 +293,28 @@ React keys must be passed directly to JSX without using spread:
293
293
  0%, 100% { opacity: 1; transform: scale(1);}
294
294
  50% { opacity: 0.7; transform: scale(1.05);}
295
295
  }
296
- `,document.head.appendChild(tt),()=>{document.head.removeChild(tt)}},[]),ge.jsxDEV(ge.Fragment,{children:[!p&&ge.jsxDEV("button",{id:"chatjt-open-button",style:at,onClick:()=>m(!0),onMouseEnter:tt=>{tt.currentTarget.style.transform="translateY(-10%) scale(1.05)",tt.currentTarget.style.boxShadow="0 4px 12px rgba(0, 0, 0, 0.2)"},onMouseLeave:tt=>{tt.currentTarget.style.transform="",tt.currentTarget.style.boxShadow="0 4px 8px rgba(0, 0, 0, 0.2)"},children:ge.jsxDEV("img",{src:t,alt:"Abrir ChatJT",style:K},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/corisco/src/ui/ExtensionPanel.tsx",lineNumber:354,columnNumber:21},void 0)},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/corisco/src/ui/ExtensionPanel.tsx",lineNumber:341,columnNumber:17},void 0),ge.jsxDEV("div",{id:"chatjt-panel",ref:U,style:lt,children:[ge.jsxDEV("div",{id:"chatjt-resizer",ref:j,style:Gt,onMouseMove:tt=>{N?(tt.currentTarget.style.background="linear-gradient(to right, transparent 95%, #1591EA90 95%)",tt.currentTarget.style.left="-160px",tt.currentTarget.style.width="160px"):(tt.currentTarget.style.left="-8px",tt.currentTarget.style.width="8px")},onMouseEnter:tt=>{N||(tt.currentTarget.style.background="#11182750")},onMouseLeave:tt=>{N||(tt.currentTarget.style.background="transparent")}},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/corisco/src/ui/ExtensionPanel.tsx",lineNumber:365,columnNumber:17},void 0),ge.jsxDEV("div",{id:"chatjt-iframe-container",style:dt,children:[b?ge.jsxDEV("div",{id:"chatjt-loading",style:W,children:ge.jsxDEV("div",{style:ht,children:[ge.jsxDEV("div",{style:Zt,children:"⚠️"},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/corisco/src/ui/ExtensionPanel.tsx",lineNumber:397,columnNumber:33},void 0),ge.jsxDEV("div",{style:vt,children:"Erro ao carregar ChatJT"},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/corisco/src/ui/ExtensionPanel.tsx",lineNumber:398,columnNumber:33},void 0),ge.jsxDEV("button",{style:oe,onClick:X,onMouseEnter:tt=>{tt.currentTarget.style.background="rgba(255,255,255,0.3)",tt.currentTarget.style.borderColor="rgba(255,255,255,0.5)",tt.currentTarget.style.transform="translateY(-1px)"},onMouseLeave:tt=>{tt.currentTarget.style.background="rgba(255,255,255,0.2)",tt.currentTarget.style.borderColor="rgba(255,255,255,0.3)",tt.currentTarget.style.transform=""},onMouseDown:tt=>{tt.currentTarget.style.transform="translateY(0)"},children:"Tentar novamente"},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/corisco/src/ui/ExtensionPanel.tsx",lineNumber:399,columnNumber:33},void 0)]},void 0,!0,{fileName:"C:/Users/guilherme.moreira/git/corisco/src/ui/ExtensionPanel.tsx",lineNumber:396,columnNumber:29},void 0)},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/corisco/src/ui/ExtensionPanel.tsx",lineNumber:395,columnNumber:25},void 0):ge.jsxDEV(ge.Fragment,{children:[!g&&ge.jsxDEV("div",{id:"chatjt-loading",style:W,children:ge.jsxDEV("div",{style:ht,children:[ge.jsxDEV("div",{style:st},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/corisco/src/ui/ExtensionPanel.tsx",lineNumber:425,columnNumber:41},void 0),ge.jsxDEV("div",{style:vt,children:"Carregando ChatJT..."},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/corisco/src/ui/ExtensionPanel.tsx",lineNumber:426,columnNumber:41},void 0)]},void 0,!0,{fileName:"C:/Users/guilherme.moreira/git/corisco/src/ui/ExtensionPanel.tsx",lineNumber:424,columnNumber:37},void 0)},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/corisco/src/ui/ExtensionPanel.tsx",lineNumber:423,columnNumber:33},void 0),ge.jsxDEV("iframe",{id:"chatjt-iframe",ref:I,src:l,style:xt,onLoad:F,onError:J,sandbox:"allow-scripts allow-same-origin allow-forms allow-popups allow-storage-access-by-user-activation allow-top-navigation-by-user-activation allow-modals",allow:"storage-access 'src'"},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/corisco/src/ui/ExtensionPanel.tsx",lineNumber:430,columnNumber:29},void 0)]},void 0,!0,{fileName:"C:/Users/guilherme.moreira/git/corisco/src/ui/ExtensionPanel.tsx",lineNumber:421,columnNumber:25},void 0),ge.jsxDEV("div",{style:Et,children:ge.jsxDEV("div",{style:bt,children:"Solte para fechar"},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/corisco/src/ui/ExtensionPanel.tsx",lineNumber:445,columnNumber:25},void 0)},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/corisco/src/ui/ExtensionPanel.tsx",lineNumber:444,columnNumber:21},void 0)]},void 0,!0,{fileName:"C:/Users/guilherme.moreira/git/corisco/src/ui/ExtensionPanel.tsx",lineNumber:393,columnNumber:17},void 0),ge.jsxDEV("div",{id:"chatjt-close-button",style:B,title:"Fechar painel","aria-label":"Fechar painel",onClick:()=>m(!1),onMouseEnter:tt=>{tt.currentTarget.style.transform="translateY(-50%) scale(1.1)",tt.currentTarget.style.boxShadow="0 4px 12px rgba(0, 0, 0, 0.2)"},onMouseLeave:tt=>{tt.currentTarget.style.transform="translateY(-50%)",tt.currentTarget.style.boxShadow=""},children:ge.jsxDEV("img",{src:i,alt:"Fechar painel",style:Q},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/corisco/src/ui/ExtensionPanel.tsx",lineNumber:467,columnNumber:21},void 0)},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/corisco/src/ui/ExtensionPanel.tsx",lineNumber:452,columnNumber:17},void 0)]},void 0,!0,{fileName:"C:/Users/guilherme.moreira/git/corisco/src/ui/ExtensionPanel.tsx",lineNumber:359,columnNumber:13},void 0)]},void 0,!0,{fileName:"C:/Users/guilherme.moreira/git/corisco/src/ui/ExtensionPanel.tsx",lineNumber:338,columnNumber:9},void 0)},Rf="chatjt-container",Fv="chatjt-open-button",jv="chatjt-panel";class aM{root=null;container=null;async init(){try{if(document.getElementById(Rf))return;this.container=document.createElement("div"),this.container.id=Rf,this.container.style.pointerEvents="auto",document.body.appendChild(this.container),this.root=eM.createRoot(this.container),this.root.render(XD.createElement(sM)),L.info("UI da extensão inicializada via React"),setTimeout(()=>{const t=document.getElementById(Fv),i=document.getElementById(jv);L.info("Elementos criados:",{button:!!t,panel:!!i})},100)}catch(t){L.error("Erro ao inicializar UI:",t)}}destroy(){try{this.root&&(this.root.unmount(),this.root=null),this.container&&(this.container.remove(),this.container=null);const t=document.getElementById(Rf);t&&t.remove();const i=document.getElementById(Fv);i&&i.remove();const a=document.getElementById(jv);a&&a.remove(),L.info("UI da extensão destruída")}catch(t){L.error("Erro ao destruir UI:",t)}}}const Df={EXTENSION:"extension",IFRAME:"iframe"},Ae={HANDSHAKE:"HANDSHAKE",HANDSHAKE_ACK:"HANDSHAKE_ACK",SINGLE_DOCUMENT_EXTRACTED:"SINGLE_DOCUMENT_EXTRACTED",MULTIPLE_DOCUMENTS_EXTRACTED:"MULTIPLE_DOCUMENTS_EXTRACTED",AUTO_CAPTURE_DETECTION:"AUTO_CAPTURE_DETECTION",AUTO_CAPTURE_CLEANUP:"AUTO_CAPTURE_CLEANUP",EXTRACT_FULL_PROCESS:"EXTRACT_FULL_PROCESS",EXTRACT_SELECTED_DOCUMENTS:"EXTRACT_SELECTED_DOCUMENTS",EXTRACT_VISIBLE_DOCUMENT:"EXTRACT_VISIBLE_DOCUMENT",EXTRACTION_ERROR:"EXTRACTION_ERROR",GENERIC_ERROR:"GENERIC_ERROR",UNSUPPORTED_MESSAGE:"UNSUPPORTED_MESSAGE"};function rM(l){return new RegExp("^"+l.replace(/{{.*?}}/g,"\\d+")+"$")}function oM(l){try{const t=new URL(l),i=t.pathname;for(const a of Xt.action_map)if(a.allowed_hosts.some(()=>xv(t.toString())))for(const[r,c]of Object.entries(a.mapping)){if(r==="/*"&&c===null)continue;if(rM(r).test(i)){const h=c.map(p=>a.actions.find(m=>m.job===p)).filter(Boolean);if(h&&h.length>0)return h}}}catch(t){L.error("Erro ao obter actions para URL:",t)}return[]}let lM=class{source;isHandshakeComplete=!1;messageQueue=[];listeners=new Map;iframe;constructor(t=Df.EXTENSION){this.source=t,this.iframe=null,this.initializeIframe(),this.setupMessageListener()}initializeIframe(){this.iframe=document.querySelector("#chatjt-iframe"),this.iframe?(L.info("Iframe encontrado e inicializado"),this.onIframeReady()):(L.detail("Iframe não encontrado inicialmente, aguardando criação..."),this.waitForIframe())}waitForIframe(){const t=new MutationObserver(i=>{i.forEach(a=>{a.type==="childList"&&a.addedNodes.forEach(r=>{if(r.nodeType===Node.ELEMENT_NODE){const c=r,u=c.id==="chatjt-iframe"?c:c.querySelector("#chatjt-iframe");u&&(this.iframe=u,L.info("Iframe detectado via MutationObserver"),this.onIframeReady(),t.disconnect())}})})});t.observe(document.body,{childList:!0,subtree:!0}),setTimeout(()=>{t.disconnect(),this.iframe||L.error("Timeout: Iframe não foi encontrado após 10 segundos")},1e4)}onIframeReady(){this.iframe&&(this.iframe.contentWindow?this.processQueuedMessages():this.iframe.addEventListener("load",()=>{L.info("Iframe carregado completamente"),this.processQueuedMessages()}))}setupMessageListener(){window.addEventListener("message",t=>{try{const i=this.validateMessage(t.data);i&&this.handleMessage(i,t)}catch(i){L.error("Erro ao processar mensagem:",i)}})}validateMessage(t){return!t||typeof t!="object"||!t.type||typeof t.type!="string"||this.isErrorMessage(t.type)&&t.source===this.source||!t.source||!Object.values(Df).includes(t.source)?null:{id:t.id??crypto.randomUUID(),type:t.type,data:t.data??null,error:t.error??null,responseTo:t.responseTo??null,timestamp:t.timestamp??new Date().toISOString(),source:t.source??this.source}}isErrorMessage(t){return[Ae.GENERIC_ERROR,Ae.UNSUPPORTED_MESSAGE].includes(t)}handleMessage(t,i){if(t.type===Ae.HANDSHAKE){this.handleHandshake();return}if(!this.isHandshakeComplete){this.messageQueue.push({message:t,event:i});return}this.processMessage(t,i)}handleHandshake(){L.info("Handshake recebido do iframe"),this.isHandshakeComplete=!0;let t="";try{t=window.location.href}catch{t="unknown"}L.info("URL do iframe:",t);const i=oM(t);L.info("Ações disponíveis para a URL do iframe:",i),this.sendMessage(Ae.HANDSHAKE_ACK,{extensionVersion:Xt.app.version??"unknown",actions:i}),this.processQueuedMessages()}processMessage(t,i){const a=this.listeners.get(t.type);a&&a(t,i)}processQueuedMessages(){for(;this.messageQueue.length>0;){const{message:t,event:i}=this.messageQueue.shift();L.info(`Processando mensagem enfileirada: ${t.type}`),this.processMessage(t,i)}}sendMessage(t,i,a,r=null){const c={id:crypto.randomUUID(),type:t,data:i??null,error:a??void 0,responseTo:r??void 0,timestamp:new Date().toISOString(),source:this.source};if(L.info(`Enviando mensagem: ${t}`,c),!this.iframe||!this.iframe.contentWindow){L.warn(`Iframe não disponível, enfileirando mensagem: ${t}`),this.messageQueue.push({message:c,event:null});return}try{this.iframe.contentWindow.postMessage(c,"*"),L.info(`Mensagem enviada para o iframe: ${t}`)}catch(u){L.error("Erro ao enviar mensagem:",u),this.messageQueue.push({message:c,event:null})}}sendSuccessMessage(t,i=null,a){this.sendMessage(t,i,null,a??null)}sendError(t,i,a){this.sendMessage(t,null,i,a??null)}onMessage(t,i){this.listeners.set(t,i)}};const un=typeof process=="object"&&process+""=="[object process]"&&!process.versions.nw&&!(process.versions.electron&&process.type&&process.type!=="browser"),Mf=[.001,0,0,.001,0,0],Of=1.35,Ln={ANY:1,DISPLAY:2,PRINT:4,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,IS_EDITING:128,OPLIST:256},Is={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},$v="pdfjs_internal_editor_",wt={DISABLE:-1,NONE:0,FREETEXT:3,HIGHLIGHT:9,STAMP:13,INK:15,SIGNATURE:101,COMMENT:102},$t={RESIZE:1,CREATE:2,FREETEXT_SIZE:11,FREETEXT_COLOR:12,FREETEXT_OPACITY:13,INK_COLOR:21,INK_THICKNESS:22,INK_OPACITY:23,HIGHLIGHT_COLOR:31,HIGHLIGHT_THICKNESS:32,HIGHLIGHT_FREE:33,HIGHLIGHT_SHOW_ALL:34,DRAW_STEP:41},cM={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},sn={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},fu={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},De={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26},_r={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},pu={ERRORS:0,WARNINGS:1,INFOS:5},mu={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotation:80,endAnnotation:81,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91,setStrokeTransparent:92,setFillTransparent:93,rawFillPath:94},gu={moveTo:0,lineTo:1,curveTo:2,closePath:3},uM={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};let yu=pu.WARNINGS;function dM(l){Number.isInteger(l)&&(yu=l)}function hM(){return yu}function bu(l){yu>=pu.INFOS&&console.log(`Info: ${l}`)}function Ct(l){yu>=pu.WARNINGS&&console.log(`Warning: ${l}`)}function ie(l){throw new Error(l)}function Me(l,t){l||ie(t)}function fM(l){switch(l?.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}function Gv(l,t=null,i=null){if(!l)return null;if(i&&typeof l=="string"&&(i.addDefaultProtocol&&l.startsWith("www.")&&l.match(/\./g)?.length>=2&&(l=`http://${l}`),i.tryConvertEncoding))try{l=bM(l)}catch{}const a=t?URL.parse(l,t):URL.parse(l);return fM(a)?a:null}function Vv(l,t,i=!1){const a=URL.parse(l);return a?(a.hash=t,a.href):i&&Gv(l,"http://example.com")?l.split("#",1)[0]+`${t?`#${t}`:""}`:""}function zt(l,t,i,a=!1){return Object.defineProperty(l,t,{value:i,enumerable:!a,configurable:!0,writable:!1}),i}const Aa=function(){function t(i,a){this.message=i,this.name=a}return t.prototype=new Error,t.constructor=t,t}();class qv extends Aa{constructor(t,i){super(t,"PasswordException"),this.code=i}}class kf extends Aa{constructor(t,i){super(t,"UnknownErrorException"),this.details=i}}class Nf extends Aa{constructor(t){super(t,"InvalidPDFException")}}class vu extends Aa{constructor(t,i,a){super(t,"ResponseException"),this.status=i,this.missing=a}}class pM extends Aa{constructor(t){super(t,"FormatError")}}class Ps extends Aa{constructor(t){super(t,"AbortException")}}function Yv(l){(typeof l!="object"||l?.length===void 0)&&ie("Invalid argument for bytesToString");const t=l.length,i=8192;if(t<i)return String.fromCharCode.apply(null,l);const a=[];for(let r=0;r<t;r+=i){const c=Math.min(r+i,t),u=l.subarray(r,c);a.push(String.fromCharCode.apply(null,u))}return a.join("")}function Wo(l){typeof l!="string"&&ie("Invalid argument for stringToBytes");const t=l.length,i=new Uint8Array(t);for(let a=0;a<t;++a)i[a]=l.charCodeAt(a)&255;return i}function mM(l){return String.fromCharCode(l>>24&255,l>>16&255,l>>8&255,l&255)}function gM(){const l=new Uint8Array(4);return l[0]=1,new Uint32Array(l.buffer,0,1)[0]===1}function yM(){try{return new Function(""),!0}catch{return!1}}class Ve{static get isLittleEndian(){return zt(this,"isLittleEndian",gM())}static get isEvalSupported(){return zt(this,"isEvalSupported",yM())}static get isOffscreenCanvasSupported(){return zt(this,"isOffscreenCanvasSupported",typeof OffscreenCanvas<"u")}static get isImageDecoderSupported(){return zt(this,"isImageDecoderSupported",typeof ImageDecoder<"u")}static get platform(){const{platform:t,userAgent:i}=navigator;return zt(this,"platform",{isAndroid:i.includes("Android"),isLinux:t.includes("Linux"),isMac:t.includes("Mac"),isWindows:t.includes("Win"),isFirefox:i.includes("Firefox")})}static get isCSSRoundSupported(){return zt(this,"isCSSRoundSupported",globalThis.CSS?.supports?.("width: round(1.5px, 1px)"))}}const Lf=Array.from(Array(256).keys(),l=>l.toString(16).padStart(2,"0"));class mt{static makeHexColor(t,i,a){return`#${Lf[t]}${Lf[i]}${Lf[a]}`}static scaleMinMax(t,i){let a;t[0]?(t[0]<0&&(a=i[0],i[0]=i[2],i[2]=a),i[0]*=t[0],i[2]*=t[0],t[3]<0&&(a=i[1],i[1]=i[3],i[3]=a),i[1]*=t[3],i[3]*=t[3]):(a=i[0],i[0]=i[1],i[1]=a,a=i[2],i[2]=i[3],i[3]=a,t[1]<0&&(a=i[1],i[1]=i[3],i[3]=a),i[1]*=t[1],i[3]*=t[1],t[2]<0&&(a=i[0],i[0]=i[2],i[2]=a),i[0]*=t[2],i[2]*=t[2]),i[0]+=t[4],i[1]+=t[5],i[2]+=t[4],i[3]+=t[5]}static transform(t,i){return[t[0]*i[0]+t[2]*i[1],t[1]*i[0]+t[3]*i[1],t[0]*i[2]+t[2]*i[3],t[1]*i[2]+t[3]*i[3],t[0]*i[4]+t[2]*i[5]+t[4],t[1]*i[4]+t[3]*i[5]+t[5]]}static applyTransform(t,i,a=0){const r=t[a],c=t[a+1];t[a]=r*i[0]+c*i[2]+i[4],t[a+1]=r*i[1]+c*i[3]+i[5]}static applyTransformToBezier(t,i,a=0){const r=i[0],c=i[1],u=i[2],h=i[3],p=i[4],m=i[5];for(let g=0;g<6;g+=2){const y=t[a+g],b=t[a+g+1];t[a+g]=y*r+b*u+p,t[a+g+1]=y*c+b*h+m}}static applyInverseTransform(t,i){const a=t[0],r=t[1],c=i[0]*i[3]-i[1]*i[2];t[0]=(a*i[3]-r*i[2]+i[2]*i[5]-i[4]*i[3])/c,t[1]=(-a*i[1]+r*i[0]+i[4]*i[1]-i[5]*i[0])/c}static axialAlignedBoundingBox(t,i,a){const r=i[0],c=i[1],u=i[2],h=i[3],p=i[4],m=i[5],g=t[0],y=t[1],b=t[2],S=t[3];let A=r*g+p,_=A,R=r*b+p,C=R,N=h*y+m,O=N,U=h*S+m,I=U;if(c!==0||u!==0){const j=c*g,F=c*b,J=u*y,X=u*S;A+=J,C+=J,R+=X,_+=X,N+=j,I+=j,U+=F,O+=F}a[0]=Math.min(a[0],A,R,_,C),a[1]=Math.min(a[1],N,U,O,I),a[2]=Math.max(a[2],A,R,_,C),a[3]=Math.max(a[3],N,U,O,I)}static inverseTransform(t){const i=t[0]*t[3]-t[1]*t[2];return[t[3]/i,-t[1]/i,-t[2]/i,t[0]/i,(t[2]*t[5]-t[4]*t[3])/i,(t[4]*t[1]-t[5]*t[0])/i]}static singularValueDecompose2dScale(t,i){const a=t[0],r=t[1],c=t[2],u=t[3],h=a**2+r**2,p=a*c+r*u,m=c**2+u**2,g=(h+m)/2,y=Math.sqrt(g**2-(h*m-p**2));i[0]=Math.sqrt(g+y||1),i[1]=Math.sqrt(g-y||1)}static normalizeRect(t){const i=t.slice(0);return t[0]>t[2]&&(i[0]=t[2],i[2]=t[0]),t[1]>t[3]&&(i[1]=t[3],i[3]=t[1]),i}static intersect(t,i){const a=Math.max(Math.min(t[0],t[2]),Math.min(i[0],i[2])),r=Math.min(Math.max(t[0],t[2]),Math.max(i[0],i[2]));if(a>r)return null;const c=Math.max(Math.min(t[1],t[3]),Math.min(i[1],i[3])),u=Math.min(Math.max(t[1],t[3]),Math.max(i[1],i[3]));return c>u?null:[a,c,r,u]}static pointBoundingBox(t,i,a){a[0]=Math.min(a[0],t),a[1]=Math.min(a[1],i),a[2]=Math.max(a[2],t),a[3]=Math.max(a[3],i)}static rectBoundingBox(t,i,a,r,c){c[0]=Math.min(c[0],t,a),c[1]=Math.min(c[1],i,r),c[2]=Math.max(c[2],t,a),c[3]=Math.max(c[3],i,r)}static#t(t,i,a,r,c,u,h,p,m,g){if(m<=0||m>=1)return;const y=1-m,b=m*m,S=b*m,A=y*(y*(y*t+3*m*i)+3*b*a)+S*r,_=y*(y*(y*c+3*m*u)+3*b*h)+S*p;g[0]=Math.min(g[0],A),g[1]=Math.min(g[1],_),g[2]=Math.max(g[2],A),g[3]=Math.max(g[3],_)}static#e(t,i,a,r,c,u,h,p,m,g,y,b){if(Math.abs(m)<1e-12){Math.abs(g)>=1e-12&&this.#t(t,i,a,r,c,u,h,p,-y/g,b);return}const S=g**2-4*y*m;if(S<0)return;const A=Math.sqrt(S),_=2*m;this.#t(t,i,a,r,c,u,h,p,(-g+A)/_,b),this.#t(t,i,a,r,c,u,h,p,(-g-A)/_,b)}static bezierBoundingBox(t,i,a,r,c,u,h,p,m){m[0]=Math.min(m[0],t,h),m[1]=Math.min(m[1],i,p),m[2]=Math.max(m[2],t,h),m[3]=Math.max(m[3],i,p),this.#e(t,a,c,h,i,r,u,p,3*(-t+3*(a-c)+h),6*(t-2*a+c),3*(a-t),m),this.#e(t,a,c,h,i,r,u,p,3*(-i+3*(r-u)+p),6*(i-2*r+u),3*(r-i),m)}}function bM(l){return decodeURIComponent(escape(l))}let If=null,Xv=null;function vM(l){return If||(If=/([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu,Xv=new Map([["ſt","ſt"]])),l.replaceAll(If,(t,i,a)=>i?i.normalize("NFKC"):Xv.get(a))}function Wv(){if(typeof crypto.randomUUID=="function")return crypto.randomUUID();const l=new Uint8Array(32);return crypto.getRandomValues(l),Yv(l)}const Pf="pdfjs_internal_id_";function SM(l,t,i){if(!Array.isArray(i)||i.length<2)return!1;const[a,r,...c]=i;if(!l(a)&&!Number.isInteger(a)||!t(r))return!1;const u=c.length;let h=!0;switch(r.name){case"XYZ":if(u<2||u>3)return!1;break;case"Fit":case"FitB":return u===0;case"FitH":case"FitBH":case"FitV":case"FitBV":if(u>1)return!1;break;case"FitR":if(u!==4)return!1;h=!1;break;default:return!1}for(const p of c)if(!(typeof p=="number"||h&&p===null))return!1;return!0}function dn(l,t,i){return Math.min(Math.max(l,t),i)}function Qv(l){return Uint8Array.prototype.toBase64?l.toBase64():btoa(Yv(l))}function EM(l){return Uint8Array.fromBase64?Uint8Array.fromBase64(l):Wo(atob(l))}typeof Promise.try!="function"&&(Promise.try=function(l,...t){return new Promise(i=>{i(l(...t))})}),typeof Math.sumPrecise!="function"&&(Math.sumPrecise=function(l){return l.reduce((t,i)=>t+i,0)});const ts="http://www.w3.org/2000/svg";class Tr{static CSS=96;static PDF=72;static PDF_TO_CSS_UNITS=this.CSS/this.PDF}async function Qo(l,t="text"){if(Zo(l,document.baseURI)){const i=await fetch(l);if(!i.ok)throw new Error(i.statusText);switch(t){case"arraybuffer":return i.arrayBuffer();case"blob":return i.blob();case"json":return i.json()}return i.text()}return new Promise((i,a)=>{const r=new XMLHttpRequest;r.open("GET",l,!0),r.responseType=t,r.onreadystatechange=()=>{if(r.readyState===XMLHttpRequest.DONE){if(r.status===200||r.status===0){switch(t){case"arraybuffer":case"blob":case"json":i(r.response);return}i(r.responseText);return}a(new Error(r.statusText))}},r.send(null)})}class Ko{constructor({viewBox:t,userUnit:i,scale:a,rotation:r,offsetX:c=0,offsetY:u=0,dontFlip:h=!1}){this.viewBox=t,this.userUnit=i,this.scale=a,this.rotation=r,this.offsetX=c,this.offsetY=u,a*=i;const p=(t[2]+t[0])/2,m=(t[3]+t[1])/2;let g,y,b,S;switch(r%=360,r<0&&(r+=360),r){case 180:g=-1,y=0,b=0,S=1;break;case 90:g=0,y=1,b=1,S=0;break;case 270:g=0,y=-1,b=-1,S=0;break;case 0:g=1,y=0,b=0,S=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}h&&(b=-b,S=-S);let A,_,R,C;g===0?(A=Math.abs(m-t[1])*a+c,_=Math.abs(p-t[0])*a+u,R=(t[3]-t[1])*a,C=(t[2]-t[0])*a):(A=Math.abs(p-t[0])*a+c,_=Math.abs(m-t[1])*a+u,R=(t[2]-t[0])*a,C=(t[3]-t[1])*a),this.transform=[g*a,y*a,b*a,S*a,A-g*a*p-b*a*m,_-y*a*p-S*a*m],this.width=R,this.height=C}get rawDims(){const t=this.viewBox;return zt(this,"rawDims",{pageWidth:t[2]-t[0],pageHeight:t[3]-t[1],pageX:t[0],pageY:t[1]})}clone({scale:t=this.scale,rotation:i=this.rotation,offsetX:a=this.offsetX,offsetY:r=this.offsetY,dontFlip:c=!1}={}){return new Ko({viewBox:this.viewBox.slice(),userUnit:this.userUnit,scale:t,rotation:i,offsetX:a,offsetY:r,dontFlip:c})}convertToViewportPoint(t,i){const a=[t,i];return mt.applyTransform(a,this.transform),a}convertToViewportRectangle(t){const i=[t[0],t[1]];mt.applyTransform(i,this.transform);const a=[t[2],t[3]];return mt.applyTransform(a,this.transform),[i[0],i[1],a[0],a[1]]}convertToPdfPoint(t,i){const a=[t,i];return mt.applyInverseTransform(a,this.transform),a}}class Uf extends Aa{constructor(t,i=0){super(t,"RenderingCancelledException"),this.extraDelay=i}}function Su(l){const t=l.length;let i=0;for(;i<t&&l[i].trim()==="";)i++;return l.substring(i,i+5).toLowerCase()==="data:"}function zf(l){return typeof l=="string"&&/\.pdf$/i.test(l)}function AM(l){return[l]=l.split(/[#?]/,1),l.substring(l.lastIndexOf("/")+1)}function _M(l,t="document.pdf"){if(typeof l!="string")return t;if(Su(l))return Ct('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),t;const a=(h=>{try{return new URL(h)}catch{try{return new URL(decodeURIComponent(h))}catch{try{return new URL(h,"https://foo.bar")}catch{try{return new URL(decodeURIComponent(h),"https://foo.bar")}catch{return null}}}}})(l);if(!a)return t;const r=h=>{try{let p=decodeURIComponent(h);return p.includes("/")?(p=p.split("/").at(-1),p.test(/^\.pdf$/i)?p:h):p}catch{return h}},c=/\.pdf$/i,u=a.pathname.split("/").at(-1);if(c.test(u))return r(u);if(a.searchParams.size>0){const h=Array.from(a.searchParams.values()).reverse();for(const m of h)if(c.test(m))return r(m);const p=Array.from(a.searchParams.keys()).reverse();for(const m of p)if(c.test(m))return r(m)}if(a.hash){const p=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i.exec(a.hash);if(p)return r(p[0])}return t}class Kv{started=Object.create(null);times=[];time(t){t in this.started&&Ct(`Timer is already running for ${t}`),this.started[t]=Date.now()}timeEnd(t){t in this.started||Ct(`Timer has not been started for ${t}`),this.times.push({name:t,start:this.started[t],end:Date.now()}),delete this.started[t]}toString(){const t=[];let i=0;for(const{name:a}of this.times)i=Math.max(a.length,i);for(const{name:a,start:r,end:c}of this.times)t.push(`${a.padEnd(i)} ${c-r}ms
297
- `);return t.join("")}}function Zo(l,t){const i=t?URL.parse(l,t):URL.parse(l);return i?.protocol==="http:"||i?.protocol==="https:"}function Yn(l){l.preventDefault()}function Oe(l){l.preventDefault(),l.stopPropagation()}function TM(l){console.log("Deprecated API usage: "+l)}class Hf{static#t;static toDateObject(t){if(t instanceof Date)return t;if(!t||typeof t!="string")return null;this.#t||=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?");const i=this.#t.exec(t);if(!i)return null;const a=parseInt(i[1],10);let r=parseInt(i[2],10);r=r>=1&&r<=12?r-1:0;let c=parseInt(i[3],10);c=c>=1&&c<=31?c:1;let u=parseInt(i[4],10);u=u>=0&&u<=23?u:0;let h=parseInt(i[5],10);h=h>=0&&h<=59?h:0;let p=parseInt(i[6],10);p=p>=0&&p<=59?p:0;const m=i[7]||"Z";let g=parseInt(i[8],10);g=g>=0&&g<=23?g:0;let y=parseInt(i[9],10)||0;return y=y>=0&&y<=59?y:0,m==="-"?(u+=g,h+=y):m==="+"&&(u-=g,h-=y),new Date(Date.UTC(a,r,c,u,h,p))}}function wM(l,{scale:t=1,rotation:i=0}){const{width:a,height:r}=l.attributes.style,c=[0,0,parseInt(a),parseInt(r)];return new Ko({viewBox:c,userUnit:1,scale:t,rotation:i})}function Eu(l){if(l.startsWith("#")){const t=parseInt(l.slice(1),16);return[(t&16711680)>>16,(t&65280)>>8,t&255]}return l.startsWith("rgb(")?l.slice(4,-1).split(",").map(t=>parseInt(t)):l.startsWith("rgba(")?l.slice(5,-1).split(",").map(t=>parseInt(t)).slice(0,3):(Ct(`Not a valid color format: "${l}"`),[0,0,0])}function CM(l){const t=document.createElement("span");t.style.visibility="hidden",t.style.colorScheme="only light",document.body.append(t);for(const i of l.keys()){t.style.color=i;const a=window.getComputedStyle(t).color;l.set(i,Eu(a))}t.remove()}function ye(l){const{a:t,b:i,c:a,d:r,e:c,f:u}=l.getTransform();return[t,i,a,r,c,u]}function xi(l){const{a:t,b:i,c:a,d:r,e:c,f:u}=l.getTransform().invertSelf();return[t,i,a,r,c,u]}function _a(l,t,i=!1,a=!0){if(t instanceof Ko){const{pageWidth:r,pageHeight:c}=t.rawDims,{style:u}=l,h=Ve.isCSSRoundSupported,p=`var(--total-scale-factor) * ${r}px`,m=`var(--total-scale-factor) * ${c}px`,g=h?`round(down, ${p}, var(--scale-round-x))`:`calc(${p})`,y=h?`round(down, ${m}, var(--scale-round-y))`:`calc(${m})`;!i||t.rotation%180===0?(u.width=g,u.height=y):(u.width=y,u.height=g)}a&&l.setAttribute("data-main-rotation",t.rotation)}class Ri{constructor(){const{pixelRatio:t}=Ri;this.sx=t,this.sy=t}get scaled(){return this.sx!==1||this.sy!==1}get symmetric(){return this.sx===this.sy}limitCanvas(t,i,a,r,c=-1){let u=1/0,h=1/0,p=1/0;a=Ri.capPixels(a,c),a>0&&(u=Math.sqrt(a/(t*i))),r!==-1&&(h=r/t,p=r/i);const m=Math.min(u,h,p);return this.sx>m||this.sy>m?(this.sx=m,this.sy=m,!0):!1}static get pixelRatio(){return globalThis.devicePixelRatio||1}static capPixels(t,i){if(i>=0){const a=Math.ceil(window.screen.availWidth*window.screen.availHeight*this.pixelRatio**2*(1+i/100));return t>0?Math.min(t,a):a}return t}}const Bf=["image/apng","image/avif","image/bmp","image/gif","image/jpeg","image/png","image/svg+xml","image/webp","image/x-icon"];class Jo{#t=null;#e=null;#n;#i=null;#a=null;#s=null;#r=null;static#o=null;constructor(t){this.#n=t,Jo.#o||=Object.freeze({freetext:"pdfjs-editor-remove-freetext-button",highlight:"pdfjs-editor-remove-highlight-button",ink:"pdfjs-editor-remove-ink-button",stamp:"pdfjs-editor-remove-stamp-button",signature:"pdfjs-editor-remove-signature-button"})}render(){const t=this.#t=document.createElement("div");t.classList.add("editToolbar","hidden"),t.setAttribute("role","toolbar");const i=this.#n._uiManager._signal;t.addEventListener("contextmenu",Yn,{signal:i}),t.addEventListener("pointerdown",Jo.#u,{signal:i});const a=this.#i=document.createElement("div");a.className="buttons",t.append(a);const r=this.#n.toolbarPosition;if(r){const{style:c}=t,u=this.#n._uiManager.direction==="ltr"?1-r[0]:r[0];c.insetInlineEnd=`${100*u}%`,c.top=`calc(${100*r[1]}% + var(--editor-toolbar-vert-offset))`}return t}get div(){return this.#t}static#u(t){t.stopPropagation()}#c(t){this.#n._focusEventsAllowed=!1,Oe(t)}#h(t){this.#n._focusEventsAllowed=!0,Oe(t)}#l(t){const i=this.#n._uiManager._signal;t.addEventListener("focusin",this.#c.bind(this),{capture:!0,signal:i}),t.addEventListener("focusout",this.#h.bind(this),{capture:!0,signal:i}),t.addEventListener("contextmenu",Yn,{signal:i})}hide(){this.#t.classList.add("hidden"),this.#e?.hideDropdown()}show(){this.#t.classList.remove("hidden"),this.#a?.shown(),this.#s?.shown()}addDeleteButton(){const{editorType:t,_uiManager:i}=this.#n,a=document.createElement("button");a.className="delete",a.tabIndex=0,a.setAttribute("data-l10n-id",Jo.#o[t]),this.#l(a),a.addEventListener("click",r=>{i.delete()},{signal:i._signal}),this.#i.append(a)}get#p(){const t=document.createElement("div");return t.className="divider",t}async addAltText(t){const i=await t.render();this.#l(i),this.#i.append(i,this.#p),this.#a=t}addComment(t){if(this.#s)return;const i=t.render();i&&(this.#l(i),this.#i.prepend(i,this.#p),this.#s=t,t.toolbar=this)}addColorPicker(t){if(this.#e)return;this.#e=t;const i=t.renderButton();this.#l(i),this.#i.append(i,this.#p)}async addEditSignatureButton(t){const i=this.#r=await t.renderEditButton(this.#n);this.#l(i),this.#i.append(i,this.#p)}async addButton(t,i){switch(t){case"colorPicker":this.addColorPicker(i);break;case"altText":await this.addAltText(i);break;case"editSignature":await this.addEditSignatureButton(i);break;case"delete":this.addDeleteButton();break;case"comment":this.addComment(i);break}}updateEditSignatureButton(t){this.#r&&(this.#r.title=t)}remove(){this.#t.remove(),this.#e?.destroy(),this.#e=null}}class xM{#t=null;#e=null;#n;constructor(t){this.#n=t}#i(){const t=this.#e=document.createElement("div");t.className="editToolbar",t.setAttribute("role","toolbar"),t.addEventListener("contextmenu",Yn,{signal:this.#n._signal});const i=this.#t=document.createElement("div");return i.className="buttons",t.append(i),this.#s(),t}#a(t,i){let a=0,r=0;for(const c of t){const u=c.y+c.height;if(u<a)continue;const h=c.x+(i?c.width:0);if(u>a){r=h,a=u;continue}i?h>r&&(r=h):h<r&&(r=h)}return[i?1-r:r,a]}show(t,i,a){const[r,c]=this.#a(i,a),{style:u}=this.#e||=this.#i();t.append(this.#e),u.insetInlineEnd=`${100*r}%`,u.top=`calc(${100*c}% + var(--editor-toolbar-vert-offset))`}hide(){this.#e.remove()}#s(){const t=document.createElement("button");t.className="highlightButton",t.tabIndex=0,t.setAttribute("data-l10n-id","pdfjs-highlight-floating-button1");const i=document.createElement("span");t.append(i),i.className="visuallyHidden",i.setAttribute("data-l10n-id","pdfjs-highlight-floating-button-label");const a=this.#n._signal;t.addEventListener("contextmenu",Yn,{signal:a}),t.addEventListener("click",()=>{this.#n.highlightSelection("floating_button")},{signal:a}),this.#t.append(t)}}function Zv(l,t,i){for(const a of i)t.addEventListener(a,l[a].bind(l))}class RM{#t=0;get id(){return`${$v}${this.#t++}`}}class Ff{#t=Wv();#e=0;#n=null;static get _isSVGFittingCanvas(){const t='data:image/svg+xml;charset=UTF-8,<svg viewBox="0 0 1 1" width="1" height="1" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="1" style="fill:red;"/></svg>',a=new OffscreenCanvas(1,3).getContext("2d",{willReadFrequently:!0}),r=new Image;r.src=t;const c=r.decode().then(()=>(a.drawImage(r,0,0,1,1,0,0,1,3),new Uint32Array(a.getImageData(0,0,1,1).data.buffer)[0]===0));return zt(this,"_isSVGFittingCanvas",c)}async#i(t,i){this.#n||=new Map;let a=this.#n.get(t);if(a===null)return null;if(a?.bitmap)return a.refCounter+=1,a;try{a||={bitmap:null,id:`image_${this.#t}_${this.#e++}`,refCounter:0,isSvg:!1};let r;if(typeof i=="string"?(a.url=i,r=await Qo(i,"blob")):i instanceof File?r=a.file=i:i instanceof Blob&&(r=i),r.type==="image/svg+xml"){const c=Ff._isSVGFittingCanvas,u=new FileReader,h=new Image,p=new Promise((m,g)=>{h.onload=()=>{a.bitmap=h,a.isSvg=!0,m()},u.onload=async()=>{const y=a.svgUrl=u.result;h.src=await c?`${y}#svgView(preserveAspectRatio(none))`:y},h.onerror=u.onerror=g});u.readAsDataURL(r),await p}else a.bitmap=await createImageBitmap(r);a.refCounter=1}catch(r){Ct(r),a=null}return this.#n.set(t,a),a&&this.#n.set(a.id,a),a}async getFromFile(t){const{lastModified:i,name:a,size:r,type:c}=t;return this.#i(`${i}_${a}_${r}_${c}`,t)}async getFromUrl(t){return this.#i(t,t)}async getFromBlob(t,i){const a=await i;return this.#i(t,a)}async getFromId(t){this.#n||=new Map;const i=this.#n.get(t);if(!i)return null;if(i.bitmap)return i.refCounter+=1,i;if(i.file)return this.getFromFile(i.file);if(i.blobPromise){const{blobPromise:a}=i;return delete i.blobPromise,this.getFromBlob(i.id,a)}return this.getFromUrl(i.url)}getFromCanvas(t,i){this.#n||=new Map;let a=this.#n.get(t);if(a?.bitmap)return a.refCounter+=1,a;const r=new OffscreenCanvas(i.width,i.height);return r.getContext("2d").drawImage(i,0,0),a={bitmap:r.transferToImageBitmap(),id:`image_${this.#t}_${this.#e++}`,refCounter:1,isSvg:!1},this.#n.set(t,a),this.#n.set(a.id,a),a}getSvgUrl(t){const i=this.#n.get(t);return i?.isSvg?i.svgUrl:null}deleteId(t){this.#n||=new Map;const i=this.#n.get(t);if(!i||(i.refCounter-=1,i.refCounter!==0))return;const{bitmap:a}=i;if(!i.url&&!i.file){const r=new OffscreenCanvas(a.width,a.height);r.getContext("bitmaprenderer").transferFromImageBitmap(a),i.blobPromise=r.convertToBlob()}a.close?.(),i.bitmap=null}isValidId(t){return t.startsWith(`image_${this.#t}_`)}}class DM{#t=[];#e=!1;#n;#i=-1;constructor(t=128){this.#n=t}add({cmd:t,undo:i,post:a,mustExec:r,type:c=NaN,overwriteIfSameType:u=!1,keepUndo:h=!1}){if(r&&t(),this.#e)return;const p={cmd:t,undo:i,post:a,type:c};if(this.#i===-1){this.#t.length>0&&(this.#t.length=0),this.#i=0,this.#t.push(p);return}if(u&&this.#t[this.#i].type===c){h&&(p.undo=this.#t[this.#i].undo),this.#t[this.#i]=p;return}const m=this.#i+1;m===this.#n?this.#t.splice(0,1):(this.#i=m,m<this.#t.length&&this.#t.splice(m)),this.#t.push(p)}undo(){if(this.#i===-1)return;this.#e=!0;const{undo:t,post:i}=this.#t[this.#i];t(),i?.(),this.#e=!1,this.#i-=1}redo(){if(this.#i<this.#t.length-1){this.#i+=1,this.#e=!0;const{cmd:t,post:i}=this.#t[this.#i];t(),i?.(),this.#e=!1}}hasSomethingToUndo(){return this.#i!==-1}hasSomethingToRedo(){return this.#i<this.#t.length-1}cleanType(t){if(this.#i!==-1){for(let i=this.#i;i>=0;i--)if(this.#t[i].type!==t){this.#t.splice(i+1,this.#i-i),this.#i=i;return}this.#t.length=0,this.#i=-1}}destroy(){this.#t=null}}class tl{constructor(t){this.buffer=[],this.callbacks=new Map,this.allKeys=new Set;const{isMac:i}=Ve.platform;for(const[a,r,c={}]of t)for(const u of a){const h=u.startsWith("mac+");i&&h?(this.callbacks.set(u.slice(4),{callback:r,options:c}),this.allKeys.add(u.split("+").at(-1))):!i&&!h&&(this.callbacks.set(u,{callback:r,options:c}),this.allKeys.add(u.split("+").at(-1)))}}#t(t){t.altKey&&this.buffer.push("alt"),t.ctrlKey&&this.buffer.push("ctrl"),t.metaKey&&this.buffer.push("meta"),t.shiftKey&&this.buffer.push("shift"),this.buffer.push(t.key);const i=this.buffer.join("+");return this.buffer.length=0,i}exec(t,i){if(!this.allKeys.has(i.key))return;const a=this.callbacks.get(this.#t(i));if(!a)return;const{callback:r,options:{bubbles:c=!1,args:u=[],checker:h=null}}=a;h&&!h(t,i)||(r.bind(t,...u,i)(),c||Oe(i))}}class jf{static _colorsMapping=new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]]);get _colors(){const t=new Map([["CanvasText",null],["Canvas",null]]);return CM(t),zt(this,"_colors",t)}convert(t){const i=Eu(t);if(!window.matchMedia("(forced-colors: active)").matches)return i;for(const[a,r]of this._colors)if(r.every((c,u)=>c===i[u]))return jf._colorsMapping.get(a);return i}getHexCode(t){const i=this._colors.get(t);return i?mt.makeHexColor(...i):t}}class Us{#t=new AbortController;#e=null;#n=new Map;#i=new Map;#a=null;#s=null;#r=null;#o=new DM;#u=null;#c=null;#h=null;#l=0;#p=new Set;#g=null;#f=null;#d=new Set;_editorUndoBar=null;#m=!1;#v=!1;#y=!1;#E=null;#A=null;#b=null;#T=null;#D=!1;#_=null;#M=new RM;#R=!1;#x=!1;#C=null;#k=null;#U=null;#N=null;#F=null;#w=wt.NONE;#S=new Set;#z=null;#H=null;#j=null;#V=null;#q={isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1,hasSelectedText:!1};#$=[0,0];#L=null;#I=null;#G=null;#Q=null;#P=null;static TRANSLATE_SMALL=1;static TRANSLATE_BIG=10;static get _keyboardManager(){const t=Us.prototype,i=u=>u.#I.contains(document.activeElement)&&document.activeElement.tagName!=="BUTTON"&&u.hasSomethingToControl(),a=(u,{target:h})=>{if(h instanceof HTMLInputElement){const{type:p}=h;return p!=="text"&&p!=="number"}return!0},r=this.TRANSLATE_SMALL,c=this.TRANSLATE_BIG;return zt(this,"_keyboardManager",new tl([[["ctrl+a","mac+meta+a"],t.selectAll,{checker:a}],[["ctrl+z","mac+meta+z"],t.undo,{checker:a}],[["ctrl+y","ctrl+shift+z","mac+meta+shift+z","ctrl+shift+Z","mac+meta+shift+Z"],t.redo,{checker:a}],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete","mac+Delete"],t.delete,{checker:a}],[["Enter","mac+Enter"],t.addNewEditorFromKeyboard,{checker:(u,{target:h})=>!(h instanceof HTMLButtonElement)&&u.#I.contains(h)&&!u.isEnterHandled}],[[" ","mac+ "],t.addNewEditorFromKeyboard,{checker:(u,{target:h})=>!(h instanceof HTMLButtonElement)&&u.#I.contains(document.activeElement)}],[["Escape","mac+Escape"],t.unselectAll],[["ArrowLeft","mac+ArrowLeft"],t.translateSelectedEditors,{args:[-r,0],checker:i}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t.translateSelectedEditors,{args:[-c,0],checker:i}],[["ArrowRight","mac+ArrowRight"],t.translateSelectedEditors,{args:[r,0],checker:i}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t.translateSelectedEditors,{args:[c,0],checker:i}],[["ArrowUp","mac+ArrowUp"],t.translateSelectedEditors,{args:[0,-r],checker:i}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t.translateSelectedEditors,{args:[0,-c],checker:i}],[["ArrowDown","mac+ArrowDown"],t.translateSelectedEditors,{args:[0,r],checker:i}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t.translateSelectedEditors,{args:[0,c],checker:i}]]))}constructor(t,i,a,r,c,u,h,p,m,g,y,b,S,A,_,R){const C=this._signal=this.#t.signal;this.#I=t,this.#G=i,this.#Q=a,this.#a=r,this.#u=c,this.#H=u,this._eventBus=h,h._on("editingaction",this.onEditingAction.bind(this),{signal:C}),h._on("pagechanging",this.onPageChanging.bind(this),{signal:C}),h._on("scalechanging",this.onScaleChanging.bind(this),{signal:C}),h._on("rotationchanging",this.onRotationChanging.bind(this),{signal:C}),h._on("setpreference",this.onSetPreference.bind(this),{signal:C}),h._on("switchannotationeditorparams",N=>this.updateParams(N.type,N.value),{signal:C}),this.#at(),this.#ct(),this.#Z(),this.#s=p.annotationStorage,this.#E=p.filterFactory,this.#j=m,this.#T=g||null,this.#m=y,this.#v=b,this.#y=S,this.#F=A||null,this.viewParameters={realScale:Tr.PDF_TO_CSS_UNITS,rotation:0},this.isShiftKeyDown=!1,this._editorUndoBar=_||null,this._supportsPinchToZoom=R!==!1}destroy(){this.#P?.resolve(),this.#P=null,this.#t?.abort(),this.#t=null,this._signal=null;for(const t of this.#i.values())t.destroy();this.#i.clear(),this.#n.clear(),this.#d.clear(),this.#N?.clear(),this.#e=null,this.#S.clear(),this.#o.destroy(),this.#a?.destroy(),this.#u?.destroy(),this.#H?.destroy(),this.#_?.hide(),this.#_=null,this.#U?.destroy(),this.#U=null,this.#A&&(clearTimeout(this.#A),this.#A=null),this.#L&&(clearTimeout(this.#L),this.#L=null),this._editorUndoBar?.destroy()}combinedSignal(t){return AbortSignal.any([this._signal,t.signal])}get mlManager(){return this.#F}get useNewAltTextFlow(){return this.#v}get useNewAltTextWhenAddingImage(){return this.#y}get hcmFilter(){return zt(this,"hcmFilter",this.#j?this.#E.addHCMFilter(this.#j.foreground,this.#j.background):"none")}get direction(){return zt(this,"direction",getComputedStyle(this.#I).direction)}get _highlightColors(){return zt(this,"_highlightColors",this.#T?new Map(this.#T.split(",").map(t=>(t=t.split("=").map(i=>i.trim()),t[1]=t[1].toUpperCase(),t))):null)}get highlightColors(){const{_highlightColors:t}=this;if(!t)return zt(this,"highlightColors",null);const i=new Map,a=!!this.#j;for(const[r,c]of t){const u=r.endsWith("_HCM");if(a&&u){i.set(r.replace("_HCM",""),c);continue}!a&&!u&&i.set(r,c)}return zt(this,"highlightColors",i)}get highlightColorNames(){return zt(this,"highlightColorNames",this.highlightColors?new Map(Array.from(this.highlightColors,t=>t.reverse())):null)}getNonHCMColor(t){if(!this._highlightColors)return t;const i=this.highlightColorNames.get(t);return this._highlightColors.get(i)||t}getNonHCMColorName(t){return this.highlightColorNames.get(t)||t}setCurrentDrawingSession(t){t?(this.unselectAll(),this.disableUserSelect(!0)):this.disableUserSelect(!1),this.#h=t}setMainHighlightColorPicker(t){this.#U=t}editAltText(t,i=!1){this.#a?.editAltText(this,t,i)}hasCommentManager(){return!!this.#u}editComment(t,i){this.#u?.open(this,t,i)}getSignature(t){this.#H?.getSignature({uiManager:this,editor:t})}get signatureManager(){return this.#H}switchToMode(t,i){this._eventBus.on("annotationeditormodechanged",i,{once:!0,signal:this._signal}),this._eventBus.dispatch("showannotationeditorui",{source:this,mode:t})}setPreference(t,i){this._eventBus.dispatch("setpreference",{source:this,name:t,value:i})}onSetPreference({name:t,value:i}){switch(t){case"enableNewAltTextWhenAddingImage":this.#y=i;break}}onPageChanging({pageNumber:t}){this.#l=t-1}focusMainContainer(){this.#I.focus()}findParent(t,i){for(const a of this.#i.values()){const{x:r,y:c,width:u,height:h}=a.div.getBoundingClientRect();if(t>=r&&t<=r+u&&i>=c&&i<=c+h)return a}return null}disableUserSelect(t=!1){this.#G.classList.toggle("noUserSelect",t)}addShouldRescale(t){this.#d.add(t)}removeShouldRescale(t){this.#d.delete(t)}onScaleChanging({scale:t}){this.commitOrRemove(),this.viewParameters.realScale=t*Tr.PDF_TO_CSS_UNITS;for(const i of this.#d)i.onScaleChanging();this.#h?.onScaleChanging()}onRotationChanging({pagesRotation:t}){this.commitOrRemove(),this.viewParameters.rotation=t}#X({anchorNode:t}){return t.nodeType===Node.TEXT_NODE?t.parentElement:t}#K(t){const{currentLayer:i}=this;if(i.hasTextLayer(t))return i;for(const a of this.#i.values())if(a.hasTextLayer(t))return a;return null}highlightSelection(t=""){const i=document.getSelection();if(!i||i.isCollapsed)return;const{anchorNode:a,anchorOffset:r,focusNode:c,focusOffset:u}=i,h=i.toString(),m=this.#X(i).closest(".textLayer"),g=this.getSelectionBoxes(m);if(!g)return;i.empty();const y=this.#K(m),b=this.#w===wt.NONE,S=()=>{y?.createAndAddNewEditor({x:0,y:0},!1,{methodOfCreation:t,boxes:g,anchorNode:a,anchorOffset:r,focusNode:c,focusOffset:u,text:h}),b&&this.showAllEditors("highlight",!0,!0)};if(b){this.switchToMode(wt.HIGHLIGHT,S);return}S()}#it(){const t=document.getSelection();if(!t||t.isCollapsed)return;const a=this.#X(t).closest(".textLayer"),r=this.getSelectionBoxes(a);r&&(this.#_||=new xM(this),this.#_.show(a,r,this.direction==="ltr"))}addToAnnotationStorage(t){!t.isEmpty()&&this.#s&&!this.#s.has(t.id)&&this.#s.setValue(t.id,t)}a11yAlert(t,i=null){const a=this.#Q;a&&(a.setAttribute("data-l10n-id",t),i?a.setAttribute("data-l10n-args",JSON.stringify(i)):a.removeAttribute("data-l10n-args"))}#st(){const t=document.getSelection();if(!t||t.isCollapsed){this.#z&&(this.#_?.hide(),this.#z=null,this.#O({hasSelectedText:!1}));return}const{anchorNode:i}=t;if(i===this.#z)return;const r=this.#X(t).closest(".textLayer");if(!r){this.#z&&(this.#_?.hide(),this.#z=null,this.#O({hasSelectedText:!1}));return}if(this.#_?.hide(),this.#z=i,this.#O({hasSelectedText:!0}),!(this.#w!==wt.HIGHLIGHT&&this.#w!==wt.NONE)&&(this.#w===wt.HIGHLIGHT&&this.showAllEditors("highlight",!0,!0),this.#D=this.isShiftKeyDown,!this.isShiftKeyDown)){const c=this.#w===wt.HIGHLIGHT?this.#K(r):null;c?.toggleDrawing();const u=new AbortController,h=this.combinedSignal(u),p=m=>{m.type==="pointerup"&&m.button!==0||(u.abort(),c?.toggleDrawing(!0),m.type==="pointerup"&&this.#W("main_toolbar"))};window.addEventListener("pointerup",p,{signal:h}),window.addEventListener("blur",p,{signal:h})}}#W(t=""){this.#w===wt.HIGHLIGHT?this.highlightSelection(t):this.#m&&this.#it()}#at(){document.addEventListener("selectionchange",this.#st.bind(this),{signal:this._signal})}#rt(){if(this.#b)return;this.#b=new AbortController;const t=this.combinedSignal(this.#b);window.addEventListener("focus",this.focus.bind(this),{signal:t}),window.addEventListener("blur",this.blur.bind(this),{signal:t})}#ot(){this.#b?.abort(),this.#b=null}blur(){if(this.isShiftKeyDown=!1,this.#D&&(this.#D=!1,this.#W("main_toolbar")),!this.hasSelection)return;const{activeElement:t}=document;for(const i of this.#S)if(i.div.contains(t)){this.#k=[i,t],i._focusEventsAllowed=!1;break}}focus(){if(!this.#k)return;const[t,i]=this.#k;this.#k=null,i.addEventListener("focusin",()=>{t._focusEventsAllowed=!0},{once:!0,signal:this._signal}),i.focus()}#Z(){if(this.#C)return;this.#C=new AbortController;const t=this.combinedSignal(this.#C);window.addEventListener("keydown",this.keydown.bind(this),{signal:t}),window.addEventListener("keyup",this.keyup.bind(this),{signal:t})}#lt(){this.#C?.abort(),this.#C=null}#J(){if(this.#c)return;this.#c=new AbortController;const t=this.combinedSignal(this.#c);document.addEventListener("copy",this.copy.bind(this),{signal:t}),document.addEventListener("cut",this.cut.bind(this),{signal:t}),document.addEventListener("paste",this.paste.bind(this),{signal:t})}#tt(){this.#c?.abort(),this.#c=null}#ct(){const t=this._signal;document.addEventListener("dragover",this.dragOver.bind(this),{signal:t}),document.addEventListener("drop",this.drop.bind(this),{signal:t})}addEditListeners(){this.#Z(),this.#J()}removeEditListeners(){this.#lt(),this.#tt()}dragOver(t){for(const{type:i}of t.dataTransfer.items)for(const a of this.#f)if(a.isHandlingMimeForPasting(i)){t.dataTransfer.dropEffect="copy",t.preventDefault();return}}drop(t){for(const i of t.dataTransfer.items)for(const a of this.#f)if(a.isHandlingMimeForPasting(i.type)){a.paste(i,this.currentLayer),t.preventDefault();return}}copy(t){if(t.preventDefault(),this.#e?.commitOrRemove(),!this.hasSelection)return;const i=[];for(const a of this.#S){const r=a.serialize(!0);r&&i.push(r)}i.length!==0&&t.clipboardData.setData("application/pdfjs",JSON.stringify(i))}cut(t){this.copy(t),this.delete()}async paste(t){t.preventDefault();const{clipboardData:i}=t;for(const c of i.items)for(const u of this.#f)if(u.isHandlingMimeForPasting(c.type)){u.paste(c,this.currentLayer);return}let a=i.getData("application/pdfjs");if(!a)return;try{a=JSON.parse(a)}catch(c){Ct(`paste: "${c.message}".`);return}if(!Array.isArray(a))return;this.unselectAll();const r=this.currentLayer;try{const c=[];for(const p of a){const m=await r.deserialize(p);if(!m)return;c.push(m)}const u=()=>{for(const p of c)this.#et(p);this.#nt(c)},h=()=>{for(const p of c)p.remove()};this.addCommands({cmd:u,undo:h,mustExec:!0})}catch(c){Ct(`paste: "${c.message}".`)}}keydown(t){!this.isShiftKeyDown&&t.key==="Shift"&&(this.isShiftKeyDown=!0),this.#w!==wt.NONE&&!this.isEditorHandlingKeyboard&&Us._keyboardManager.exec(this,t)}keyup(t){this.isShiftKeyDown&&t.key==="Shift"&&(this.isShiftKeyDown=!1,this.#D&&(this.#D=!1,this.#W("main_toolbar")))}onEditingAction({name:t}){switch(t){case"undo":case"redo":case"delete":case"selectAll":this[t]();break;case"highlightSelection":this.highlightSelection("context_menu");break}}#O(t){Object.entries(t).some(([a,r])=>this.#q[a]!==r)&&(this._eventBus.dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(this.#q,t)}),this.#w===wt.HIGHLIGHT&&t.hasSelectedEditor===!1&&this.#B([[$t.HIGHLIGHT_FREE,!0]]))}#B(t){this._eventBus.dispatch("annotationeditorparamschanged",{source:this,details:t})}setEditingState(t){t?(this.#rt(),this.#J(),this.#O({isEditing:this.#w!==wt.NONE,isEmpty:this.#Y(),hasSomethingToUndo:this.#o.hasSomethingToUndo(),hasSomethingToRedo:this.#o.hasSomethingToRedo(),hasSelectedEditor:!1})):(this.#ot(),this.#tt(),this.#O({isEditing:!1}),this.disableUserSelect(!1))}registerEditorTypes(t){if(!this.#f){this.#f=t;for(const i of this.#f)this.#B(i.defaultPropertiesToUpdate)}}getId(){return this.#M.id}get currentLayer(){return this.#i.get(this.#l)}getLayer(t){return this.#i.get(t)}get currentPageIndex(){return this.#l}addLayer(t){this.#i.set(t.pageIndex,t),this.#R?t.enable():t.disable()}removeLayer(t){this.#i.delete(t.pageIndex)}async updateMode(t,i=null,a=!1,r=!1,c=!1){if(this.#w!==t&&!(this.#P&&(await this.#P.promise,!this.#P))){if(this.#P=Promise.withResolvers(),this.#h?.commitOrRemove(),this.#w=t,t===wt.NONE){this.setEditingState(!1),this.#dt(),this._editorUndoBar?.hide(),this.#P.resolve();return}t===wt.SIGNATURE&&await this.#H?.loadSignatures(),this.setEditingState(!0),await this.#ut(),this.unselectAll();for(const u of this.#i.values())u.updateMode(t);if(!i){a&&this.addNewEditorFromKeyboard(),this.#P.resolve();return}for(const u of this.#n.values())u.annotationElementId===i||u.id===i?(this.setSelected(u),c?u.editComment():r&&u.enterInEditMode()):u.unselect();this.#P.resolve()}}addNewEditorFromKeyboard(){this.currentLayer.canCreateNewEmptyEditor()&&this.currentLayer.addNewEditor()}updateToolbar(t){t.mode!==this.#w&&this._eventBus.dispatch("switchannotationeditormode",{source:this,...t})}updateParams(t,i){if(this.#f){switch(t){case $t.CREATE:this.currentLayer.addNewEditor(i);return;case $t.HIGHLIGHT_SHOW_ALL:this._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:{type:"highlight",action:"toggle_visibility"}}}),(this.#V||=new Map).set(t,i),this.showAllEditors("highlight",i);break}if(this.hasSelection)for(const a of this.#S)a.updateParams(t,i);else for(const a of this.#f)a.updateDefaultParams(t,i)}}showAllEditors(t,i,a=!1){for(const c of this.#n.values())c.editorType===t&&c.show(i);(this.#V?.get($t.HIGHLIGHT_SHOW_ALL)??!0)!==i&&this.#B([[$t.HIGHLIGHT_SHOW_ALL,i]])}enableWaiting(t=!1){if(this.#x!==t){this.#x=t;for(const i of this.#i.values())t?i.disableClick():i.enableClick(),i.div.classList.toggle("waiting",t)}}async#ut(){if(!this.#R){this.#R=!0;const t=[];for(const i of this.#i.values())t.push(i.enable());await Promise.all(t);for(const i of this.#n.values())i.enable()}}#dt(){if(this.unselectAll(),this.#R){this.#R=!1;for(const t of this.#i.values())t.disable();for(const t of this.#n.values())t.disable()}}getEditors(t){const i=[];for(const a of this.#n.values())a.pageIndex===t&&i.push(a);return i}getEditor(t){return this.#n.get(t)}addEditor(t){this.#n.set(t.id,t)}removeEditor(t){t.div.contains(document.activeElement)&&(this.#A&&clearTimeout(this.#A),this.#A=setTimeout(()=>{this.focusMainContainer(),this.#A=null},0)),this.#n.delete(t.id),t.annotationElementId&&this.#N?.delete(t.annotationElementId),this.unselect(t),(!t.annotationElementId||!this.#p.has(t.annotationElementId))&&this.#s?.remove(t.id)}addDeletedAnnotationElement(t){this.#p.add(t.annotationElementId),this.addChangedExistingAnnotation(t),t.deleted=!0}isDeletedAnnotationElement(t){return this.#p.has(t)}removeDeletedAnnotationElement(t){this.#p.delete(t.annotationElementId),this.removeChangedExistingAnnotation(t),t.deleted=!1}#et(t){const i=this.#i.get(t.pageIndex);i?i.addOrRebuild(t):(this.addEditor(t),this.addToAnnotationStorage(t))}setActiveEditor(t){this.#e!==t&&(this.#e=t,t&&this.#B(t.propertiesToUpdate))}get#ht(){let t=null;for(t of this.#S);return t}updateUI(t){this.#ht===t&&this.#B(t.propertiesToUpdate)}updateUIForDefaultProperties(t){this.#B(t.defaultPropertiesToUpdate)}toggleSelected(t){if(this.#S.has(t)){this.#S.delete(t),t.unselect(),this.#O({hasSelectedEditor:this.hasSelection});return}this.#S.add(t),t.select(),this.#B(t.propertiesToUpdate),this.#O({hasSelectedEditor:!0})}setSelected(t){this.updateToolbar({mode:t.mode,editId:t.id}),this.#h?.commitOrRemove();for(const i of this.#S)i!==t&&i.unselect();this.#S.clear(),this.#S.add(t),t.select(),this.#B(t.propertiesToUpdate),this.#O({hasSelectedEditor:!0})}isSelected(t){return this.#S.has(t)}get firstSelectedEditor(){return this.#S.values().next().value}unselect(t){t.unselect(),this.#S.delete(t),this.#O({hasSelectedEditor:this.hasSelection})}get hasSelection(){return this.#S.size!==0}get isEnterHandled(){return this.#S.size===1&&this.firstSelectedEditor.isEnterHandled}undo(){this.#o.undo(),this.#O({hasSomethingToUndo:this.#o.hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:this.#Y()}),this._editorUndoBar?.hide()}redo(){this.#o.redo(),this.#O({hasSomethingToUndo:!0,hasSomethingToRedo:this.#o.hasSomethingToRedo(),isEmpty:this.#Y()})}addCommands(t){this.#o.add(t),this.#O({hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:this.#Y()})}cleanUndoStack(t){this.#o.cleanType(t)}#Y(){if(this.#n.size===0)return!0;if(this.#n.size===1)for(const t of this.#n.values())return t.isEmpty();return!1}delete(){this.commitOrRemove();const t=this.currentLayer?.endDrawingSession(!0);if(!this.hasSelection&&!t)return;const i=t?[t]:[...this.#S],a=()=>{this._editorUndoBar?.show(r,i.length===1?i[0].editorType:i.length);for(const c of i)c.remove()},r=()=>{for(const c of i)this.#et(c)};this.addCommands({cmd:a,undo:r,mustExec:!0})}commitOrRemove(){this.#e?.commitOrRemove()}hasSomethingToControl(){return this.#e||this.hasSelection}#nt(t){for(const i of this.#S)i.unselect();this.#S.clear();for(const i of t)i.isEmpty()||(this.#S.add(i),i.select());this.#O({hasSelectedEditor:this.hasSelection})}selectAll(){for(const t of this.#S)t.commit();this.#nt(this.#n.values())}unselectAll(){if(!(this.#e&&(this.#e.commitOrRemove(),this.#w!==wt.NONE))&&!this.#h?.commitOrRemove()&&this.hasSelection){for(const t of this.#S)t.unselect();this.#S.clear(),this.#O({hasSelectedEditor:!1})}}translateSelectedEditors(t,i,a=!1){if(a||this.commitOrRemove(),!this.hasSelection)return;this.#$[0]+=t,this.#$[1]+=i;const[r,c]=this.#$,u=[...this.#S],h=1e3;this.#L&&clearTimeout(this.#L),this.#L=setTimeout(()=>{this.#L=null,this.#$[0]=this.#$[1]=0,this.addCommands({cmd:()=>{for(const p of u)this.#n.has(p.id)&&(p.translateInPage(r,c),p.translationDone())},undo:()=>{for(const p of u)this.#n.has(p.id)&&(p.translateInPage(-r,-c),p.translationDone())},mustExec:!1})},h);for(const p of u)p.translateInPage(t,i),p.translationDone()}setUpDragSession(){if(this.hasSelection){this.disableUserSelect(!0),this.#g=new Map;for(const t of this.#S)this.#g.set(t,{savedX:t.x,savedY:t.y,savedPageIndex:t.pageIndex,newX:0,newY:0,newPageIndex:-1})}}endDragSession(){if(!this.#g)return!1;this.disableUserSelect(!1);const t=this.#g;this.#g=null;let i=!1;for(const[{x:r,y:c,pageIndex:u},h]of t)h.newX=r,h.newY=c,h.newPageIndex=u,i||=r!==h.savedX||c!==h.savedY||u!==h.savedPageIndex;if(!i)return!1;const a=(r,c,u,h)=>{if(this.#n.has(r.id)){const p=this.#i.get(h);p?r._setParentAndPosition(p,c,u):(r.pageIndex=h,r.x=c,r.y=u)}};return this.addCommands({cmd:()=>{for(const[r,{newX:c,newY:u,newPageIndex:h}]of t)a(r,c,u,h)},undo:()=>{for(const[r,{savedX:c,savedY:u,savedPageIndex:h}]of t)a(r,c,u,h)},mustExec:!0}),!0}dragSelectedEditors(t,i){if(this.#g)for(const a of this.#g.keys())a.drag(t,i)}rebuild(t){if(t.parent===null){const i=this.getLayer(t.pageIndex);i?(i.changeParent(t),i.addOrRebuild(t)):(this.addEditor(t),this.addToAnnotationStorage(t),t.rebuild())}else t.parent.addOrRebuild(t)}get isEditorHandlingKeyboard(){return this.getActive()?.shouldGetKeyboardEvents()||this.#S.size===1&&this.firstSelectedEditor.shouldGetKeyboardEvents()}isActive(t){return this.#e===t}getActive(){return this.#e}getMode(){return this.#w}get imageManager(){return zt(this,"imageManager",new Ff)}getSelectionBoxes(t){if(!t)return null;const i=document.getSelection();for(let m=0,g=i.rangeCount;m<g;m++)if(!t.contains(i.getRangeAt(m).commonAncestorContainer))return null;const{x:a,y:r,width:c,height:u}=t.getBoundingClientRect();let h;switch(t.getAttribute("data-main-rotation")){case"90":h=(m,g,y,b)=>({x:(g-r)/u,y:1-(m+y-a)/c,width:b/u,height:y/c});break;case"180":h=(m,g,y,b)=>({x:1-(m+y-a)/c,y:1-(g+b-r)/u,width:y/c,height:b/u});break;case"270":h=(m,g,y,b)=>({x:1-(g+b-r)/u,y:(m-a)/c,width:b/u,height:y/c});break;default:h=(m,g,y,b)=>({x:(m-a)/c,y:(g-r)/u,width:y/c,height:b/u});break}const p=[];for(let m=0,g=i.rangeCount;m<g;m++){const y=i.getRangeAt(m);if(!y.collapsed)for(const{x:b,y:S,width:A,height:_}of y.getClientRects())A===0||_===0||p.push(h(b,S,A,_))}return p.length===0?null:p}addChangedExistingAnnotation({annotationElementId:t,id:i}){(this.#r||=new Map).set(t,i)}removeChangedExistingAnnotation({annotationElementId:t}){this.#r?.delete(t)}renderAnnotationElement(t){const i=this.#r?.get(t.data.id);if(!i)return;const a=this.#s.getRawValue(i);a&&(this.#w===wt.NONE&&!a.hasBeenModified||a.renderAnnotationElement(t))}setMissingCanvas(t,i,a){const r=this.#N?.get(t);r&&(r.setCanvas(i,a),this.#N.delete(t))}addMissingCanvas(t,i){(this.#N||=new Map).set(t,i)}}class Di{#t=null;#e=!1;#n=null;#i=null;#a=null;#s=null;#r=!1;#o=null;#u=null;#c=null;#h=null;#l=!1;static#p=null;static _l10n=null;constructor(t){this.#u=t,this.#l=t._uiManager.useNewAltTextFlow,Di.#p||=Object.freeze({added:"pdfjs-editor-new-alt-text-added-button","added-label":"pdfjs-editor-new-alt-text-added-button-label",missing:"pdfjs-editor-new-alt-text-missing-button","missing-label":"pdfjs-editor-new-alt-text-missing-button-label",review:"pdfjs-editor-new-alt-text-to-review-button","review-label":"pdfjs-editor-new-alt-text-to-review-button-label"})}static initialize(t){Di._l10n??=t}async render(){const t=this.#n=document.createElement("button");t.className="altText",t.tabIndex="0";const i=this.#i=document.createElement("span");t.append(i),this.#l?(t.classList.add("new"),t.setAttribute("data-l10n-id",Di.#p.missing),i.setAttribute("data-l10n-id",Di.#p["missing-label"])):(t.setAttribute("data-l10n-id","pdfjs-editor-alt-text-button"),i.setAttribute("data-l10n-id","pdfjs-editor-alt-text-button-label"));const a=this.#u._uiManager._signal;t.addEventListener("contextmenu",Yn,{signal:a}),t.addEventListener("pointerdown",c=>c.stopPropagation(),{signal:a});const r=c=>{c.preventDefault(),this.#u._uiManager.editAltText(this.#u),this.#l&&this.#u._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_clicked",data:{label:this.#g}})};return t.addEventListener("click",r,{capture:!0,signal:a}),t.addEventListener("keydown",c=>{c.target===t&&c.key==="Enter"&&(this.#r=!0,r(c))},{signal:a}),await this.#f(),t}get#g(){return this.#t&&"added"||this.#t===null&&this.guessedText&&"review"||"missing"}finish(){this.#n&&(this.#n.focus({focusVisible:this.#r}),this.#r=!1)}isEmpty(){return this.#l?this.#t===null:!this.#t&&!this.#e}hasData(){return this.#l?this.#t!==null||!!this.#c:this.isEmpty()}get guessedText(){return this.#c}async setGuessedText(t){this.#t===null&&(this.#c=t,this.#h=await Di._l10n.get("pdfjs-editor-new-alt-text-generated-alt-text-with-disclaimer",{generatedAltText:t}),this.#f())}toggleAltTextBadge(t=!1){if(!this.#l||this.#t){this.#o?.remove(),this.#o=null;return}if(!this.#o){const i=this.#o=document.createElement("div");i.className="noAltTextBadge",this.#u.div.append(i)}this.#o.classList.toggle("hidden",!t)}serialize(t){let i=this.#t;return!t&&this.#c===i&&(i=this.#h),{altText:i,decorative:this.#e,guessedText:this.#c,textWithDisclaimer:this.#h}}get data(){return{altText:this.#t,decorative:this.#e}}set data({altText:t,decorative:i,guessedText:a,textWithDisclaimer:r,cancel:c=!1}){a&&(this.#c=a,this.#h=r),!(this.#t===t&&this.#e===i)&&(c||(this.#t=t,this.#e=i),this.#f())}toggle(t=!1){this.#n&&(!t&&this.#s&&(clearTimeout(this.#s),this.#s=null),this.#n.disabled=!t)}shown(){this.#u._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_displayed",data:{label:this.#g}})}destroy(){this.#n?.remove(),this.#n=null,this.#i=null,this.#a=null,this.#o?.remove(),this.#o=null}async#f(){const t=this.#n;if(!t)return;if(this.#l){if(t.classList.toggle("done",!!this.#t),t.setAttribute("data-l10n-id",Di.#p[this.#g]),this.#i?.setAttribute("data-l10n-id",Di.#p[`${this.#g}-label`]),!this.#t){this.#a?.remove();return}}else{if(!this.#t&&!this.#e){t.classList.remove("done"),this.#a?.remove();return}t.classList.add("done"),t.setAttribute("data-l10n-id","pdfjs-editor-alt-text-edit-button")}let i=this.#a;if(!i){this.#a=i=document.createElement("span"),i.className="tooltip",i.setAttribute("role","tooltip"),i.id=`alt-text-tooltip-${this.#u.id}`;const r=100,c=this.#u._uiManager._signal;c.addEventListener("abort",()=>{clearTimeout(this.#s),this.#s=null},{once:!0}),t.addEventListener("mouseenter",()=>{this.#s=setTimeout(()=>{this.#s=null,this.#a.classList.add("show"),this.#u._reportTelemetry({action:"alt_text_tooltip"})},r)},{signal:c}),t.addEventListener("mouseleave",()=>{this.#s&&(clearTimeout(this.#s),this.#s=null),this.#a?.classList.remove("show")},{signal:c})}this.#e?i.setAttribute("data-l10n-id","pdfjs-editor-alt-text-decorative-tooltip"):(i.removeAttribute("data-l10n-id"),i.textContent=this.#t),i.parentNode||t.append(i),this.#u.getElementForAltText()?.setAttribute("aria-describedby",i.id)}}class Au{#t=null;#e=!1;#n=null;#i=null;#a=null;#s=null;#r=!1;constructor(t){this.#n=t,this.toolbar=null}render(){if(!this.#n._uiManager.hasCommentManager())return null;const t=this.#t=document.createElement("button");t.className="comment",t.tabIndex="0",t.setAttribute("data-l10n-id","pdfjs-editor-edit-comment-button");const i=this.#n._uiManager._signal;t.addEventListener("contextmenu",Yn,{signal:i}),t.addEventListener("pointerdown",r=>r.stopPropagation(),{signal:i});const a=r=>{r.preventDefault(),this.edit()};return t.addEventListener("click",a,{capture:!0,signal:i}),t.addEventListener("keydown",r=>{r.target===t&&r.key==="Enter"&&(this.#e=!0,a(r))},{signal:i}),t}edit(){const{bottom:t,left:i,right:a}=this.#n.getClientDimensions(),r={top:t};this.#n._uiManager.direction==="ltr"?r.right=a:r.left=i,this.#n._uiManager.editComment(this.#n,r)}finish(){this.#t&&(this.#t.focus({focusVisible:this.#e}),this.#e=!1)}isDeleted(){return this.#r||this.#a===""}hasBeenEdited(){return this.isDeleted()||this.#a!==this.#i}serialize(){return this.data}get data(){return{text:this.#a,date:this.#s,deleted:this.#r}}set data(t){if(t===null){this.#a="",this.#r=!0;return}this.#a=t,this.#s=new Date,this.#r=!1}setInitialText(t){this.#i=t,this.data=t}toggle(t=!1){this.#t&&(this.#t.disabled=!t)}shown(){}destroy(){this.#t?.remove(),this.#t=null,this.#a="",this.#s=null,this.#n=null,this.#e=!1,this.#r=!1}}class _u{#t;#e=!1;#n=null;#i;#a;#s;#r;#o=null;#u;#c=null;#h;#l=null;constructor({container:t,isPinchingDisabled:i=null,isPinchingStopped:a=null,onPinchStart:r=null,onPinching:c=null,onPinchEnd:u=null,signal:h}){this.#t=t,this.#n=a,this.#i=i,this.#a=r,this.#s=c,this.#r=u,this.#h=new AbortController,this.#u=AbortSignal.any([h,this.#h.signal]),t.addEventListener("touchstart",this.#p.bind(this),{passive:!1,signal:this.#u})}get MIN_TOUCH_DISTANCE_TO_PINCH(){return 35/Ri.pixelRatio}#p(t){if(this.#i?.())return;if(t.touches.length===1){if(this.#o)return;const r=this.#o=new AbortController,c=AbortSignal.any([this.#u,r.signal]),u=this.#t,h={capture:!0,signal:c,passive:!1},p=m=>{m.pointerType==="touch"&&(this.#o?.abort(),this.#o=null)};u.addEventListener("pointerdown",m=>{m.pointerType==="touch"&&(Oe(m),p(m))},h),u.addEventListener("pointerup",p,h),u.addEventListener("pointercancel",p,h);return}if(!this.#l){this.#l=new AbortController;const r=AbortSignal.any([this.#u,this.#l.signal]),c=this.#t,u={signal:r,capture:!1,passive:!1};c.addEventListener("touchmove",this.#g.bind(this),u);const h=this.#f.bind(this);c.addEventListener("touchend",h,u),c.addEventListener("touchcancel",h,u),u.capture=!0,c.addEventListener("pointerdown",Oe,u),c.addEventListener("pointermove",Oe,u),c.addEventListener("pointercancel",Oe,u),c.addEventListener("pointerup",Oe,u),this.#a?.()}if(Oe(t),t.touches.length!==2||this.#n?.()){this.#c=null;return}let[i,a]=t.touches;i.identifier>a.identifier&&([i,a]=[a,i]),this.#c={touch0X:i.screenX,touch0Y:i.screenY,touch1X:a.screenX,touch1Y:a.screenY}}#g(t){if(!this.#c||t.touches.length!==2)return;Oe(t);let[i,a]=t.touches;i.identifier>a.identifier&&([i,a]=[a,i]);const{screenX:r,screenY:c}=i,{screenX:u,screenY:h}=a,p=this.#c,{touch0X:m,touch0Y:g,touch1X:y,touch1Y:b}=p,S=y-m,A=b-g,_=u-r,R=h-c,C=Math.hypot(_,R)||1,N=Math.hypot(S,A)||1;if(!this.#e&&Math.abs(N-C)<=_u.MIN_TOUCH_DISTANCE_TO_PINCH)return;if(p.touch0X=r,p.touch0Y=c,p.touch1X=u,p.touch1Y=h,!this.#e){this.#e=!0;return}const O=[(r+u)/2,(c+h)/2];this.#s?.(O,N,C)}#f(t){t.touches.length>=2||(this.#l&&(this.#l.abort(),this.#l=null,this.#r?.()),this.#c&&(Oe(t),this.#c=null,this.#e=!1))}destroy(){this.#h?.abort(),this.#h=null,this.#o?.abort(),this.#o=null}}class yt{#t=null;#e=null;#n=null;#i=null;#a=!1;#s=null;#r="";#o=!1;#u=null;#c=null;#h=null;#l=null;#p="";#g=!1;#f=null;#d=!1;#m=!1;#v=!1;#y=null;#E=0;#A=0;#b=null;#T=null;isSelected=!1;_isCopy=!1;_editToolbar=null;_initialOptions=Object.create(null);_initialData=null;_isVisible=!0;_uiManager=null;_focusEventsAllowed=!0;static _l10n=null;static _l10nResizer=null;#D=!1;#_=yt._zIndex++;static _borderLineWidth=-1;static _colorManager=new jf;static _zIndex=1;static _telemetryTimeout=1e3;static get _resizerKeyboardManager(){const t=yt.prototype._resizeWithKeyboard,i=Us.TRANSLATE_SMALL,a=Us.TRANSLATE_BIG;return zt(this,"_resizerKeyboardManager",new tl([[["ArrowLeft","mac+ArrowLeft"],t,{args:[-i,0]}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t,{args:[-a,0]}],[["ArrowRight","mac+ArrowRight"],t,{args:[i,0]}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t,{args:[a,0]}],[["ArrowUp","mac+ArrowUp"],t,{args:[0,-i]}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t,{args:[0,-a]}],[["ArrowDown","mac+ArrowDown"],t,{args:[0,i]}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t,{args:[0,a]}],[["Escape","mac+Escape"],yt.prototype._stopResizingWithKeyboard]]))}constructor(t){this.parent=t.parent,this.id=t.id,this.width=this.height=null,this.pageIndex=t.parent.pageIndex,this.name=t.name,this.div=null,this._uiManager=t.uiManager,this.annotationElementId=null,this._willKeepAspectRatio=!1,this._initialOptions.isCentered=t.isCentered,this._structTreeParentId=null,this.annotationElementId=t.annotationElementId||null;const{rotation:i,rawDims:{pageWidth:a,pageHeight:r,pageX:c,pageY:u}}=this.parent.viewport;this.rotation=i,this.pageRotation=(360+i-this._uiManager.viewParameters.rotation)%360,this.pageDimensions=[a,r],this.pageTranslation=[c,u];const[h,p]=this.parentDimensions;this.x=t.x/h,this.y=t.y/p,this.isAttachedToDOM=!1,this.deleted=!1}get editorType(){return Object.getPrototypeOf(this).constructor._type}get mode(){return Object.getPrototypeOf(this).constructor._editorType}static get isDrawer(){return!1}static get _defaultLineColor(){return zt(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}static deleteAnnotationElement(t){const i=new MM({id:t.parent.getNextId(),parent:t.parent,uiManager:t._uiManager});i.annotationElementId=t.annotationElementId,i.deleted=!0,i._uiManager.addToAnnotationStorage(i)}static initialize(t,i){if(yt._l10n??=t,yt._l10nResizer||=Object.freeze({topLeft:"pdfjs-editor-resizer-top-left",topMiddle:"pdfjs-editor-resizer-top-middle",topRight:"pdfjs-editor-resizer-top-right",middleRight:"pdfjs-editor-resizer-middle-right",bottomRight:"pdfjs-editor-resizer-bottom-right",bottomMiddle:"pdfjs-editor-resizer-bottom-middle",bottomLeft:"pdfjs-editor-resizer-bottom-left",middleLeft:"pdfjs-editor-resizer-middle-left"}),yt._borderLineWidth!==-1)return;const a=getComputedStyle(document.documentElement);yt._borderLineWidth=parseFloat(a.getPropertyValue("--outline-width"))||0}static updateDefaultParams(t,i){}static get defaultPropertiesToUpdate(){return[]}static isHandlingMimeForPasting(t){return!1}static paste(t,i){ie("Not implemented")}get propertiesToUpdate(){return[]}get _isDraggable(){return this.#D}set _isDraggable(t){this.#D=t,this.div?.classList.toggle("draggable",t)}get isEnterHandled(){return!0}center(){const[t,i]=this.pageDimensions;switch(this.parentRotation){case 90:this.x-=this.height*i/(t*2),this.y+=this.width*t/(i*2);break;case 180:this.x+=this.width/2,this.y+=this.height/2;break;case 270:this.x+=this.height*i/(t*2),this.y-=this.width*t/(i*2);break;default:this.x-=this.width/2,this.y-=this.height/2;break}this.fixAndSetPosition()}addCommands(t){this._uiManager.addCommands(t)}get currentLayer(){return this._uiManager.currentLayer}setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=this.#_}setParent(t){t!==null?(this.pageIndex=t.pageIndex,this.pageDimensions=t.pageDimensions):this.#G(),this.parent=t}focusin(t){this._focusEventsAllowed&&(this.#g?this.#g=!1:this.parent.setSelected(this))}focusout(t){!this._focusEventsAllowed||!this.isAttachedToDOM||t.relatedTarget?.closest(`#${this.id}`)||(t.preventDefault(),this.parent?.isMultipleSelection||this.commitOrRemove())}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.isInEditMode()&&this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}setAt(t,i,a,r){const[c,u]=this.parentDimensions;[a,r]=this.screenToPageTranslation(a,r),this.x=(t+a)/c,this.y=(i+r)/u,this.fixAndSetPosition()}_moveAfterPaste(t,i){const[a,r]=this.parentDimensions;this.setAt(t*a,i*r,this.width*a,this.height*r),this._onTranslated()}#M([t,i],a,r){[a,r]=this.screenToPageTranslation(a,r),this.x+=a/t,this.y+=r/i,this._onTranslating(this.x,this.y),this.fixAndSetPosition()}translate(t,i){this.#M(this.parentDimensions,t,i)}translateInPage(t,i){this.#f||=[this.x,this.y,this.width,this.height],this.#M(this.pageDimensions,t,i),this.div.scrollIntoView({block:"nearest"})}translationDone(){this._onTranslated(this.x,this.y)}drag(t,i){this.#f||=[this.x,this.y,this.width,this.height];const{div:a,parentDimensions:[r,c]}=this;if(this.x+=t/r,this.y+=i/c,this.parent&&(this.x<0||this.x>1||this.y<0||this.y>1)){const{x:y,y:b}=this.div.getBoundingClientRect();this.parent.findNewParent(this,y,b)&&(this.x-=Math.floor(this.x),this.y-=Math.floor(this.y))}let{x:u,y:h}=this;const[p,m]=this.getBaseTranslation();u+=p,h+=m;const{style:g}=a;g.left=`${(100*u).toFixed(2)}%`,g.top=`${(100*h).toFixed(2)}%`,this._onTranslating(u,h),a.scrollIntoView({block:"nearest"})}_onTranslating(t,i){}_onTranslated(t,i){}get _hasBeenMoved(){return!!this.#f&&(this.#f[0]!==this.x||this.#f[1]!==this.y)}get _hasBeenResized(){return!!this.#f&&(this.#f[2]!==this.width||this.#f[3]!==this.height)}getBaseTranslation(){const[t,i]=this.parentDimensions,{_borderLineWidth:a}=yt,r=a/t,c=a/i;switch(this.rotation){case 90:return[-r,c];case 180:return[r,c];case 270:return[r,-c];default:return[-r,-c]}}get _mustFixPosition(){return!0}fixAndSetPosition(t=this.rotation){const{div:{style:i},pageDimensions:[a,r]}=this;let{x:c,y:u,width:h,height:p}=this;if(h*=a,p*=r,c*=a,u*=r,this._mustFixPosition)switch(t){case 0:c=dn(c,0,a-h),u=dn(u,0,r-p);break;case 90:c=dn(c,0,a-p),u=dn(u,h,r);break;case 180:c=dn(c,h,a),u=dn(u,p,r);break;case 270:c=dn(c,p,a),u=dn(u,0,r-h);break}this.x=c/=a,this.y=u/=r;const[m,g]=this.getBaseTranslation();c+=m,u+=g,i.left=`${(100*c).toFixed(2)}%`,i.top=`${(100*u).toFixed(2)}%`,this.moveInDOM()}static#R(t,i,a){switch(a){case 90:return[i,-t];case 180:return[-t,-i];case 270:return[-i,t];default:return[t,i]}}screenToPageTranslation(t,i){return yt.#R(t,i,this.parentRotation)}pageTranslationToScreen(t,i){return yt.#R(t,i,360-this.parentRotation)}#x(t){switch(t){case 90:{const[i,a]=this.pageDimensions;return[0,-i/a,a/i,0]}case 180:return[-1,0,0,-1];case 270:{const[i,a]=this.pageDimensions;return[0,i/a,-a/i,0]}default:return[1,0,0,1]}}get parentScale(){return this._uiManager.viewParameters.realScale}get parentRotation(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}get parentDimensions(){const{parentScale:t,pageDimensions:[i,a]}=this;return[i*t,a*t]}setDims(t,i){const[a,r]=this.parentDimensions,{style:c}=this.div;c.width=`${(100*t/a).toFixed(2)}%`,this.#o||(c.height=`${(100*i/r).toFixed(2)}%`)}fixDims(){const{style:t}=this.div,{height:i,width:a}=t,r=a.endsWith("%"),c=!this.#o&&i.endsWith("%");if(r&&c)return;const[u,h]=this.parentDimensions;r||(t.width=`${(100*parseFloat(a)/u).toFixed(2)}%`),!this.#o&&!c&&(t.height=`${(100*parseFloat(i)/h).toFixed(2)}%`)}getInitialTranslation(){return[0,0]}#C(){if(this.#u)return;this.#u=document.createElement("div"),this.#u.classList.add("resizers");const t=this._willKeepAspectRatio?["topLeft","topRight","bottomRight","bottomLeft"]:["topLeft","topMiddle","topRight","middleRight","bottomRight","bottomMiddle","bottomLeft","middleLeft"],i=this._uiManager._signal;for(const a of t){const r=document.createElement("div");this.#u.append(r),r.classList.add("resizer",a),r.setAttribute("data-resizer-name",a),r.addEventListener("pointerdown",this.#k.bind(this,a),{signal:i}),r.addEventListener("contextmenu",Yn,{signal:i}),r.tabIndex=-1}this.div.prepend(this.#u)}#k(t,i){i.preventDefault();const{isMac:a}=Ve.platform;if(i.button!==0||i.ctrlKey&&a)return;this.#n?.toggle(!1);const r=this._isDraggable;this._isDraggable=!1,this.#c=[i.screenX,i.screenY];const c=new AbortController,u=this._uiManager.combinedSignal(c);this.parent.togglePointerEvents(!1),window.addEventListener("pointermove",this.#F.bind(this,t),{passive:!0,capture:!0,signal:u}),window.addEventListener("touchmove",Oe,{passive:!1,signal:u}),window.addEventListener("contextmenu",Yn,{signal:u}),this.#h={savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height};const h=this.parent.div.style.cursor,p=this.div.style.cursor;this.div.style.cursor=this.parent.div.style.cursor=window.getComputedStyle(i.target).cursor;const m=()=>{c.abort(),this.parent.togglePointerEvents(!0),this.#n?.toggle(!0),this._isDraggable=r,this.parent.div.style.cursor=h,this.div.style.cursor=p,this.#N()};window.addEventListener("pointerup",m,{signal:u}),window.addEventListener("blur",m,{signal:u})}#U(t,i,a,r){this.width=a,this.height=r,this.x=t,this.y=i;const[c,u]=this.parentDimensions;this.setDims(c*a,u*r),this.fixAndSetPosition(),this._onResized()}_onResized(){}#N(){if(!this.#h)return;const{savedX:t,savedY:i,savedWidth:a,savedHeight:r}=this.#h;this.#h=null;const c=this.x,u=this.y,h=this.width,p=this.height;c===t&&u===i&&h===a&&p===r||this.addCommands({cmd:this.#U.bind(this,c,u,h,p),undo:this.#U.bind(this,t,i,a,r),mustExec:!0})}static _round(t){return Math.round(t*1e4)/1e4}#F(t,i){const[a,r]=this.parentDimensions,c=this.x,u=this.y,h=this.width,p=this.height,m=yt.MIN_SIZE/a,g=yt.MIN_SIZE/r,y=this.#x(this.rotation),b=(B,Q)=>[y[0]*B+y[2]*Q,y[1]*B+y[3]*Q],S=this.#x(360-this.rotation),A=(B,Q)=>[S[0]*B+S[2]*Q,S[1]*B+S[3]*Q];let _,R,C=!1,N=!1;switch(t){case"topLeft":C=!0,_=(B,Q)=>[0,0],R=(B,Q)=>[B,Q];break;case"topMiddle":_=(B,Q)=>[B/2,0],R=(B,Q)=>[B/2,Q];break;case"topRight":C=!0,_=(B,Q)=>[B,0],R=(B,Q)=>[0,Q];break;case"middleRight":N=!0,_=(B,Q)=>[B,Q/2],R=(B,Q)=>[0,Q/2];break;case"bottomRight":C=!0,_=(B,Q)=>[B,Q],R=(B,Q)=>[0,0];break;case"bottomMiddle":_=(B,Q)=>[B/2,Q],R=(B,Q)=>[B/2,0];break;case"bottomLeft":C=!0,_=(B,Q)=>[0,Q],R=(B,Q)=>[B,0];break;case"middleLeft":N=!0,_=(B,Q)=>[0,Q/2],R=(B,Q)=>[B,Q/2];break}const O=_(h,p),U=R(h,p);let I=b(...U);const j=yt._round(c+I[0]),F=yt._round(u+I[1]);let J=1,X=1,at,K;if(i.fromKeyboard)({deltaX:at,deltaY:K}=i);else{const{screenX:B,screenY:Q}=i,[dt,xt]=this.#c;[at,K]=this.screenToPageTranslation(B-dt,Q-xt),this.#c[0]=B,this.#c[1]=Q}if([at,K]=A(at/a,K/r),C){const B=Math.hypot(h,p);J=X=Math.max(Math.min(Math.hypot(U[0]-O[0]-at,U[1]-O[1]-K)/B,1/h,1/p),m/h,g/p)}else N?J=dn(Math.abs(U[0]-O[0]-at),m,1)/h:X=dn(Math.abs(U[1]-O[1]-K),g,1)/p;const lt=yt._round(h*J),Et=yt._round(p*X);I=b(...R(lt,Et));const bt=j-I[0],Gt=F-I[1];this.#f||=[this.x,this.y,this.width,this.height],this.width=lt,this.height=Et,this.x=bt,this.y=Gt,this.setDims(a*lt,r*Et),this.fixAndSetPosition(),this._onResizing()}_onResizing(){}altTextFinish(){this.#n?.finish()}get toolbarButtons(){return null}async addEditToolbar(){if(this._editToolbar||this.#m)return this._editToolbar;this._editToolbar=new Jo(this),this.div.append(this._editToolbar.render()),this._editToolbar.addButton("comment",this.addCommentButton());const{toolbarButtons:t}=this;if(t)for(const[i,a]of t)await this._editToolbar.addButton(i,a);return this._editToolbar.addButton("delete"),this._editToolbar}removeEditToolbar(){this._editToolbar&&(this._editToolbar.remove(),this._editToolbar=null,this.#n?.destroy())}addContainer(t){const i=this._editToolbar?.div;i?i.before(t):this.div.append(t)}getClientDimensions(){return this.div.getBoundingClientRect()}createAltText(){return this.#n||(Di.initialize(yt._l10n),this.#n=new Di(this),this.#t&&(this.#n.data=this.#t,this.#t=null)),this.#n}get altTextData(){return this.#n?.data}set altTextData(t){this.#n&&(this.#n.data=t)}get guessedAltText(){return this.#n?.guessedText}async setGuessedAltText(t){await this.#n?.setGuessedText(t)}serializeAltText(t){return this.#n?.serialize(t)}hasAltText(){return!!this.#n&&!this.#n.isEmpty()}hasAltTextData(){return this.#n?.hasData()??!1}addCommentButton(){return this.#i?this.#i:this.#i=new Au(this)}get commentColor(){return null}get comment(){const t=this.#i;return{text:t.data.text,date:t.data.date,deleted:t.isDeleted(),color:this.commentColor}}set comment(t){this.#i||(this.#i=new Au(this)),this.#i.data=t}setCommentData(t){this.#i||(this.#i=new Au(this)),this.#i.setInitialText(t)}get hasEditedComment(){return this.#i?.hasBeenEdited()}async editComment(){this.#i||(this.#i=new Au(this)),this.#i.edit()}addComment(t){this.hasEditedComment&&(t.popup={contents:this.comment.text,deleted:this.comment.deleted})}render(){const t=this.div=document.createElement("div");t.setAttribute("data-editor-rotation",(360-this.rotation)%360),t.className=this.name,t.setAttribute("id",this.id),t.tabIndex=this.#a?-1:0,t.setAttribute("role","application"),this.defaultL10nId&&t.setAttribute("data-l10n-id",this.defaultL10nId),this._isVisible||t.classList.add("hidden"),this.setInForeground(),this.#V();const[i,a]=this.parentDimensions;this.parentRotation%180!==0&&(t.style.maxWidth=`${(100*a/i).toFixed(2)}%`,t.style.maxHeight=`${(100*i/a).toFixed(2)}%`);const[r,c]=this.getInitialTranslation();return this.translate(r,c),Zv(this,t,["keydown","pointerdown","dblclick"]),this.isResizable&&this._uiManager._supportsPinchToZoom&&(this.#T||=new _u({container:t,isPinchingDisabled:()=>!this.isSelected,onPinchStart:this.#w.bind(this),onPinching:this.#S.bind(this),onPinchEnd:this.#z.bind(this),signal:this._uiManager._signal})),this._uiManager._editorUndoBar?.hide(),t}#w(){this.#h={savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height},this.#n?.toggle(!1),this.parent.togglePointerEvents(!1)}#S(t,i,a){let c=.7*(a/i)+1-.7;if(c===1)return;const u=this.#x(this.rotation),h=(j,F)=>[u[0]*j+u[2]*F,u[1]*j+u[3]*F],[p,m]=this.parentDimensions,g=this.x,y=this.y,b=this.width,S=this.height,A=yt.MIN_SIZE/p,_=yt.MIN_SIZE/m;c=Math.max(Math.min(c,1/b,1/S),A/b,_/S);const R=yt._round(b*c),C=yt._round(S*c);if(R===b&&C===S)return;this.#f||=[g,y,b,S];const N=h(b/2,S/2),O=yt._round(g+N[0]),U=yt._round(y+N[1]),I=h(R/2,C/2);this.x=O-I[0],this.y=U-I[1],this.width=R,this.height=C,this.setDims(p*R,m*C),this.fixAndSetPosition(),this._onResizing()}#z(){this.#n?.toggle(!0),this.parent.togglePointerEvents(!0),this.#N()}pointerdown(t){const{isMac:i}=Ve.platform;if(t.button!==0||t.ctrlKey&&i){t.preventDefault();return}if(this.#g=!0,this._isDraggable){this.#j(t);return}this.#H(t)}#H(t){const{isMac:i}=Ve.platform;t.ctrlKey&&!i||t.shiftKey||t.metaKey&&i?this.parent.toggleSelected(this):this.parent.setSelected(this)}#j(t){const{isSelected:i}=this;this._uiManager.setUpDragSession();let a=!1;const r=new AbortController,c=this._uiManager.combinedSignal(r),u={capture:!0,passive:!1,signal:c},h=m=>{r.abort(),this.#s=null,this.#g=!1,this._uiManager.endDragSession()||this.#H(m),a&&this._onStopDragging()};i&&(this.#E=t.clientX,this.#A=t.clientY,this.#s=t.pointerId,this.#r=t.pointerType,window.addEventListener("pointermove",m=>{a||(a=!0,this._onStartDragging());const{clientX:g,clientY:y,pointerId:b}=m;if(b!==this.#s){Oe(m);return}const[S,A]=this.screenToPageTranslation(g-this.#E,y-this.#A);this.#E=g,this.#A=y,this._uiManager.dragSelectedEditors(S,A)},u),window.addEventListener("touchmove",Oe,u),window.addEventListener("pointerdown",m=>{m.pointerType===this.#r&&(this.#T||m.isPrimary)&&h(m),Oe(m)},u));const p=m=>{if(!this.#s||this.#s===m.pointerId){h(m);return}Oe(m)};window.addEventListener("pointerup",p,{signal:c}),window.addEventListener("blur",p,{signal:c})}_onStartDragging(){}_onStopDragging(){}moveInDOM(){this.#y&&clearTimeout(this.#y),this.#y=setTimeout(()=>{this.#y=null,this.parent?.moveEditorInDOM(this)},0)}_setParentAndPosition(t,i,a){t.changeParent(this),this.x=i,this.y=a,this.fixAndSetPosition(),this._onTranslated()}getRect(t,i,a=this.rotation){const r=this.parentScale,[c,u]=this.pageDimensions,[h,p]=this.pageTranslation,m=t/r,g=i/r,y=this.x*c,b=this.y*u,S=this.width*c,A=this.height*u;switch(a){case 0:return[y+m+h,u-b-g-A+p,y+m+S+h,u-b-g+p];case 90:return[y+g+h,u-b+m+p,y+g+A+h,u-b+m+S+p];case 180:return[y-m-S+h,u-b+g+p,y-m+h,u-b+g+A+p];case 270:return[y-g-A+h,u-b-m-S+p,y-g+h,u-b-m+p];default:throw new Error("Invalid rotation")}}getRectInCurrentCoords(t,i){const[a,r,c,u]=t,h=c-a,p=u-r;switch(this.rotation){case 0:return[a,i-u,h,p];case 90:return[a,i-r,p,h];case 180:return[c,i-r,h,p];case 270:return[c,i-u,p,h];default:throw new Error("Invalid rotation")}}onceAdded(t){}isEmpty(){return!1}enableEditMode(){return this.isInEditMode()?!1:(this.parent.setEditingState(!1),this.#m=!0,!0)}disableEditMode(){return this.isInEditMode()?(this.parent.setEditingState(!0),this.#m=!1,!0):!1}isInEditMode(){return this.#m}shouldGetKeyboardEvents(){return this.#v}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}get isOnScreen(){const{top:t,left:i,bottom:a,right:r}=this.getClientDimensions(),{innerHeight:c,innerWidth:u}=window;return i<u&&r>0&&t<c&&a>0}#V(){if(this.#l||!this.div)return;this.#l=new AbortController;const t=this._uiManager.combinedSignal(this.#l);this.div.addEventListener("focusin",this.focusin.bind(this),{signal:t}),this.div.addEventListener("focusout",this.focusout.bind(this),{signal:t})}rebuild(){this.#V()}rotate(t){}resize(){}serializeDeleted(){return{id:this.annotationElementId,deleted:!0,pageIndex:this.pageIndex,popupRef:this._initialData?.popupRef||""}}serialize(t=!1,i=null){ie("An editor must be serializable")}static async deserialize(t,i,a){const r=new this.prototype.constructor({parent:i,id:i.getNextId(),uiManager:a,annotationElementId:t.annotationElementId});r.rotation=t.rotation,r.#t=t.accessibilityData,r._isCopy=t.isCopy||!1;const[c,u]=r.pageDimensions,[h,p,m,g]=r.getRectInCurrentCoords(t.rect,u);return r.x=h/c,r.y=p/u,r.width=m/c,r.height=g/u,r}get hasBeenModified(){return!!this.annotationElementId&&(this.deleted||this.serialize()!==null)}remove(){if(this.#l?.abort(),this.#l=null,this.isEmpty()||this.commit(),this.parent?this.parent.remove(this):this._uiManager.removeEditor(this),this.#y&&(clearTimeout(this.#y),this.#y=null),this.#G(),this.removeEditToolbar(),this.#b){for(const t of this.#b.values())clearTimeout(t);this.#b=null}this.parent=null,this.#T?.destroy(),this.#T=null}get isResizable(){return!1}makeResizable(){this.isResizable&&(this.#C(),this.#u.classList.remove("hidden"))}get toolbarPosition(){return null}keydown(t){if(!this.isResizable||t.target!==this.div||t.key!=="Enter")return;this._uiManager.setSelected(this),this.#h={savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height};const i=this.#u.children;if(!this.#e){this.#e=Array.from(i);const u=this.#q.bind(this),h=this.#$.bind(this),p=this._uiManager._signal;for(const m of this.#e){const g=m.getAttribute("data-resizer-name");m.setAttribute("role","spinbutton"),m.addEventListener("keydown",u,{signal:p}),m.addEventListener("blur",h,{signal:p}),m.addEventListener("focus",this.#L.bind(this,g),{signal:p}),m.setAttribute("data-l10n-id",yt._l10nResizer[g])}}const a=this.#e[0];let r=0;for(const u of i){if(u===a)break;r++}const c=(360-this.rotation+this.parentRotation)%360/90*(this.#e.length/4);if(c!==r){if(c<r)for(let h=0;h<r-c;h++)this.#u.append(this.#u.firstChild);else if(c>r)for(let h=0;h<c-r;h++)this.#u.firstChild.before(this.#u.lastChild);let u=0;for(const h of i){const m=this.#e[u++].getAttribute("data-resizer-name");h.setAttribute("data-l10n-id",yt._l10nResizer[m])}}this.#I(0),this.#v=!0,this.#u.firstChild.focus({focusVisible:!0}),t.preventDefault(),t.stopImmediatePropagation()}#q(t){yt._resizerKeyboardManager.exec(this,t)}#$(t){this.#v&&t.relatedTarget?.parentNode!==this.#u&&this.#G()}#L(t){this.#p=this.#v?t:""}#I(t){if(this.#e)for(const i of this.#e)i.tabIndex=t}_resizeWithKeyboard(t,i){this.#v&&this.#F(this.#p,{deltaX:t,deltaY:i,fromKeyboard:!0})}#G(){this.#v=!1,this.#I(-1),this.#N()}_stopResizingWithKeyboard(){this.#G(),this.div.focus()}select(){if(!(this.isSelected&&this._editToolbar)){if(this.isSelected=!0,this.makeResizable(),this.div?.classList.add("selectedEditor"),!this._editToolbar){this.addEditToolbar().then(()=>{this.div?.classList.contains("selectedEditor")&&this._editToolbar?.show()});return}this._editToolbar?.show(),this.#n?.toggleAltTextBadge(!1)}}unselect(){this.isSelected&&(this.isSelected=!1,this.#u?.classList.add("hidden"),this.div?.classList.remove("selectedEditor"),this.div?.contains(document.activeElement)&&this._uiManager.currentLayer.div.focus({preventScroll:!0}),this._editToolbar?.hide(),this.#n?.toggleAltTextBadge(!0))}updateParams(t,i){}disableEditing(){}enableEditing(){}get canChangeContent(){return!1}enterInEditMode(){this.canChangeContent&&(this.enableEditMode(),this.div.focus())}dblclick(t){this.enterInEditMode(),this.parent.updateToolbar({mode:this.constructor._editorType,editId:this.id})}getElementForAltText(){return this.div}get contentDiv(){return this.div}get isEditing(){return this.#d}set isEditing(t){this.#d=t,this.parent&&(t?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null))}setAspectRatio(t,i){this.#o=!0;const a=t/i,{style:r}=this.div;r.aspectRatio=a,r.height="auto"}static get MIN_SIZE(){return 16}static canCreateNewEmptyEditor(){return!0}get telemetryInitialData(){return{action:"added"}}get telemetryFinalData(){return null}_reportTelemetry(t,i=!1){if(i){this.#b||=new Map;const{action:a}=t;let r=this.#b.get(a);r&&clearTimeout(r),r=setTimeout(()=>{this._reportTelemetry(t),this.#b.delete(a),this.#b.size===0&&(this.#b=null)},yt._telemetryTimeout),this.#b.set(a,r);return}t.type||=this.editorType,this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:t}})}show(t=this._isVisible){this.div.classList.toggle("hidden",!t),this._isVisible=t}enable(){this.div&&(this.div.tabIndex=0),this.#a=!1}disable(){this.div&&(this.div.tabIndex=-1),this.#a=!0}renderAnnotationElement(t){let i=t.container.querySelector(".annotationContent");if(!i)i=document.createElement("div"),i.classList.add("annotationContent",this.editorType),t.container.prepend(i);else if(i.nodeName==="CANVAS"){const a=i;i=document.createElement("div"),i.classList.add("annotationContent",this.editorType),a.before(i)}return i}resetAnnotationElement(t){const{firstChild:i}=t.container;i?.nodeName==="DIV"&&i.classList.contains("annotationContent")&&i.remove()}}class MM extends yt{constructor(t){super(t),this.annotationElementId=t.annotationElementId,this.deleted=!0}serialize(){return this.serializeDeleted()}}const Jv=3285377520,Xn=4294901760,Mi=65535;class t0{constructor(t){this.h1=t?t&4294967295:Jv,this.h2=t?t&4294967295:Jv}update(t){let i,a;if(typeof t=="string"){i=new Uint8Array(t.length*2),a=0;for(let _=0,R=t.length;_<R;_++){const C=t.charCodeAt(_);C<=255?i[a++]=C:(i[a++]=C>>>8,i[a++]=C&255)}}else if(ArrayBuffer.isView(t))i=t.slice(),a=i.byteLength;else throw new Error("Invalid data format, must be a string or TypedArray.");const r=a>>2,c=a-r*4,u=new Uint32Array(i.buffer,0,r);let h=0,p=0,m=this.h1,g=this.h2;const y=3432918353,b=461845907,S=y&Mi,A=b&Mi;for(let _=0;_<r;_++)_&1?(h=u[_],h=h*y&Xn|h*S&Mi,h=h<<15|h>>>17,h=h*b&Xn|h*A&Mi,m^=h,m=m<<13|m>>>19,m=m*5+3864292196):(p=u[_],p=p*y&Xn|p*S&Mi,p=p<<15|p>>>17,p=p*b&Xn|p*A&Mi,g^=p,g=g<<13|g>>>19,g=g*5+3864292196);switch(h=0,c){case 3:h^=i[r*4+2]<<16;case 2:h^=i[r*4+1]<<8;case 1:h^=i[r*4],h=h*y&Xn|h*S&Mi,h=h<<15|h>>>17,h=h*b&Xn|h*A&Mi,r&1?m^=h:g^=h}this.h1=m,this.h2=g}hexdigest(){let t=this.h1,i=this.h2;return t^=i>>>1,t=t*3981806797&Xn|t*36045&Mi,i=i*4283543511&Xn|((i<<16|t>>>16)*2950163797&Xn)>>>16,t^=i>>>1,t=t*444984403&Xn|t*60499&Mi,i=i*3301882366&Xn|((i<<16|t>>>16)*3120437893&Xn)>>>16,t^=i>>>1,(t>>>0).toString(16).padStart(8,"0")+(i>>>0).toString(16).padStart(8,"0")}}const $f=Object.freeze({map:null,hash:"",transfer:void 0});class Gf{#t=!1;#e=null;#n=new Map;constructor(){this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}getValue(t,i){const a=this.#n.get(t);return a===void 0?i:Object.assign(i,a)}getRawValue(t){return this.#n.get(t)}remove(t){if(this.#n.delete(t),this.#n.size===0&&this.resetModified(),typeof this.onAnnotationEditor=="function"){for(const i of this.#n.values())if(i instanceof yt)return;this.onAnnotationEditor(null)}}setValue(t,i){const a=this.#n.get(t);let r=!1;if(a!==void 0)for(const[c,u]of Object.entries(i))a[c]!==u&&(r=!0,a[c]=u);else r=!0,this.#n.set(t,i);r&&this.#i(),i instanceof yt&&typeof this.onAnnotationEditor=="function"&&this.onAnnotationEditor(i.constructor._type)}has(t){return this.#n.has(t)}get size(){return this.#n.size}#i(){this.#t||(this.#t=!0,typeof this.onSetModified=="function"&&this.onSetModified())}resetModified(){this.#t&&(this.#t=!1,typeof this.onResetModified=="function"&&this.onResetModified())}get print(){return new e0(this)}get serializable(){if(this.#n.size===0)return $f;const t=new Map,i=new t0,a=[],r=Object.create(null);let c=!1;for(const[u,h]of this.#n){const p=h instanceof yt?h.serialize(!1,r):h;p&&(t.set(u,p),i.update(`${u}:${JSON.stringify(p)}`),c||=!!p.bitmap)}if(c)for(const u of t.values())u.bitmap&&a.push(u.bitmap);return t.size>0?{map:t,hash:i.hexdigest(),transfer:a}:$f}get editorStats(){let t=null;const i=new Map;for(const a of this.#n.values()){if(!(a instanceof yt))continue;const r=a.telemetryFinalData;if(!r)continue;const{type:c}=r;i.has(c)||i.set(c,Object.getPrototypeOf(a).constructor),t||=Object.create(null);const u=t[c]||=new Map;for(const[h,p]of Object.entries(r)){if(h==="type")continue;let m=u.get(h);m||(m=new Map,u.set(h,m));const g=m.get(p)??0;m.set(p,g+1)}}for(const[a,r]of i)t[a]=r.computeTelemetryFinalData(t[a]);return t}resetModifiedIds(){this.#e=null}get modifiedIds(){if(this.#e)return this.#e;const t=[];for(const i of this.#n.values())!(i instanceof yt)||!i.annotationElementId||!i.serialize()||t.push(i.annotationElementId);return this.#e={ids:new Set(t),hash:t.join(",")}}[Symbol.iterator](){return this.#n.entries()}}class e0 extends Gf{#t;constructor(t){super();const{map:i,hash:a,transfer:r}=t.serializable,c=structuredClone(i,r?{transfer:r}:null);this.#t={map:c,hash:a,transfer:r}}get print(){ie("Should not call PrintAnnotationStorage.print")}get serializable(){return this.#t}get modifiedIds(){return zt(this,"modifiedIds",{ids:new Set,hash:""})}}class OM{#t=new Set;constructor({ownerDocument:t=globalThis.document,styleElement:i=null}){this._document=t,this.nativeFontFaces=new Set,this.styleElement=null,this.loadingRequests=[],this.loadTestFontId=0}addNativeFontFace(t){this.nativeFontFaces.add(t),this._document.fonts.add(t)}removeNativeFontFace(t){this.nativeFontFaces.delete(t),this._document.fonts.delete(t)}insertRule(t){this.styleElement||(this.styleElement=this._document.createElement("style"),this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement));const i=this.styleElement.sheet;i.insertRule(t,i.cssRules.length)}clear(){for(const t of this.nativeFontFaces)this._document.fonts.delete(t);this.nativeFontFaces.clear(),this.#t.clear(),this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}async loadSystemFont({systemFontInfo:t,disableFontFace:i,_inspectFont:a}){if(!(!t||this.#t.has(t.loadedName))){if(Me(!i,"loadSystemFont shouldn't be called when `disableFontFace` is set."),this.isFontLoadingAPISupported){const{loadedName:r,src:c,style:u}=t,h=new FontFace(r,c,u);this.addNativeFontFace(h);try{await h.load(),this.#t.add(r),a?.(t)}catch{Ct(`Cannot load system font: ${t.baseFontName}, installing it could help to improve PDF rendering.`),this.removeNativeFontFace(h)}return}ie("Not implemented: loadSystemFont without the Font Loading API.")}}async bind(t){if(t.attached||t.missingFile&&!t.systemFontInfo)return;if(t.attached=!0,t.systemFontInfo){await this.loadSystemFont(t);return}if(this.isFontLoadingAPISupported){const a=t.createNativeFontFace();if(a){this.addNativeFontFace(a);try{await a.loaded}catch(r){throw Ct(`Failed to load font '${a.family}': '${r}'.`),t.disableFontFace=!0,r}}return}const i=t.createFontFaceRule();if(i){if(this.insertRule(i),this.isSyncFontLoadingSupported)return;await new Promise(a=>{const r=this._queueLoadingCallback(a);this._prepareFontLoadEvent(t,r)})}}get isFontLoadingAPISupported(){const t=!!this._document?.fonts;return zt(this,"isFontLoadingAPISupported",t)}get isSyncFontLoadingSupported(){return zt(this,"isSyncFontLoadingSupported",un||Ve.platform.isFirefox)}_queueLoadingCallback(t){function i(){for(Me(!r.done,"completeRequest() cannot be called twice."),r.done=!0;a.length>0&&a[0].done;){const c=a.shift();setTimeout(c.callback,0)}}const{loadingRequests:a}=this,r={done:!1,complete:i,callback:t};return a.push(r),r}get _loadTestFont(){const t=atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==");return zt(this,"_loadTestFont",t)}_prepareFontLoadEvent(t,i){function a(U,I){return U.charCodeAt(I)<<24|U.charCodeAt(I+1)<<16|U.charCodeAt(I+2)<<8|U.charCodeAt(I+3)&255}function r(U,I,j,F){const J=U.substring(0,I),X=U.substring(I+j);return J+F+X}let c,u;const h=this._document.createElement("canvas");h.width=1,h.height=1;const p=h.getContext("2d");let m=0;function g(U,I){if(++m>30){Ct("Load test font never loaded."),I();return}if(p.font="30px "+U,p.fillText(".",0,20),p.getImageData(0,0,1,1).data[3]>0){I();return}setTimeout(g.bind(null,U,I))}const y=`lt${Date.now()}${this.loadTestFontId++}`;let b=this._loadTestFont;b=r(b,976,y.length,y);const A=16,_=1482184792;let R=a(b,A);for(c=0,u=y.length-3;c<u;c+=4)R=R-_+a(y,c)|0;c<y.length&&(R=R-_+a(y+"XXX",c)|0),b=r(b,A,4,mM(R));const C=`url(data:font/opentype;base64,${btoa(b)});`,N=`@font-face {font-family:"${y}";src:${C}}`;this.insertRule(N);const O=this._document.createElement("div");O.style.visibility="hidden",O.style.width=O.style.height="10px",O.style.position="absolute",O.style.top=O.style.left="0px";for(const U of[t.loadedName,y]){const I=this._document.createElement("span");I.textContent="Hi",I.style.fontFamily=U,O.append(I)}this._document.body.append(O),g(y,()=>{O.remove(),i.complete()})}}class kM{constructor(t,i=null){this.compiledGlyphs=Object.create(null);for(const a in t)this[a]=t[a];this._inspectFont=i}createNativeFontFace(){if(!this.data||this.disableFontFace)return null;let t;if(!this.cssFontInfo)t=new FontFace(this.loadedName,this.data,{});else{const i={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(i.style=`oblique ${this.cssFontInfo.italicAngle}deg`),t=new FontFace(this.cssFontInfo.fontFamily,this.data,i)}return this._inspectFont?.(this),t}createFontFaceRule(){if(!this.data||this.disableFontFace)return null;const t=`url(data:${this.mimetype};base64,${Qv(this.data)});`;let i;if(!this.cssFontInfo)i=`@font-face {font-family:"${this.loadedName}";src:${t}}`;else{let a=`font-weight: ${this.cssFontInfo.fontWeight};`;this.cssFontInfo.italicAngle&&(a+=`font-style: oblique ${this.cssFontInfo.italicAngle}deg;`),i=`@font-face {font-family:"${this.cssFontInfo.fontFamily}";${a}src:${t}}`}return this._inspectFont?.(this,t),i}getPathGenerator(t,i){if(this.compiledGlyphs[i]!==void 0)return this.compiledGlyphs[i];const a=this.loadedName+"_path_"+i;let r;try{r=t.get(a)}catch(u){Ct(`getPathGenerator - ignoring character: "${u}".`)}const c=new Path2D(r||"");return this.fontExtraProperties||t.delete(a),this.compiledGlyphs[i]=c}}function NM(l){if(l instanceof URL)return l.href;if(typeof l=="string"){if(un)return l;const t=URL.parse(l,window.location);if(t)return t.href}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}function LM(l){if(un&&typeof Buffer<"u"&&l instanceof Buffer)throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");if(l instanceof Uint8Array&&l.byteLength===l.buffer.byteLength)return l;if(typeof l=="string")return Wo(l);if(l instanceof ArrayBuffer||ArrayBuffer.isView(l)||typeof l=="object"&&!isNaN(l?.length))return new Uint8Array(l);throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}function Tu(l){if(typeof l!="string")return null;if(l.endsWith("/"))return l;throw new Error(`Invalid factory url: "${l}" must include trailing slash.`)}const Vf=l=>typeof l=="object"&&Number.isInteger(l?.num)&&l.num>=0&&Number.isInteger(l?.gen)&&l.gen>=0,IM=l=>typeof l=="object"&&typeof l?.name=="string",PM=SM.bind(null,Vf,IM);class UM{#t=new Map;#e=Promise.resolve();postMessage(t,i){const a={data:structuredClone(t,i?{transfer:i}:null)};this.#e.then(()=>{for(const[r]of this.#t)r.call(this,a)})}addEventListener(t,i,a=null){let r=null;if(a?.signal instanceof AbortSignal){const{signal:c}=a;if(c.aborted){Ct("LoopbackPort - cannot use an `aborted` signal.");return}const u=()=>this.removeEventListener(t,i);r=()=>c.removeEventListener("abort",u),c.addEventListener("abort",u)}this.#t.set(i,r)}removeEventListener(t,i){this.#t.get(i)?.(),this.#t.delete(i)}terminate(){for(const[,t]of this.#t)t?.();this.#t.clear()}}const wu={DATA:1,ERROR:2},ke={CANCEL:1,CANCEL_COMPLETE:2,CLOSE:3,ENQUEUE:4,ERROR:5,PULL:6,PULL_COMPLETE:7,START_COMPLETE:8};function n0(){}function An(l){if(l instanceof Ps||l instanceof Nf||l instanceof qv||l instanceof vu||l instanceof kf)return l;switch(l instanceof Error||typeof l=="object"&&l!==null||ie('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),l.name){case"AbortException":return new Ps(l.message);case"InvalidPDFException":return new Nf(l.message);case"PasswordException":return new qv(l.message,l.code);case"ResponseException":return new vu(l.message,l.status,l.missing);case"UnknownErrorException":return new kf(l.message,l.details)}return new kf(l.message,l.toString())}class el{#t=new AbortController;constructor(t,i,a){this.sourceName=t,this.targetName=i,this.comObj=a,this.callbackId=1,this.streamId=1,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),a.addEventListener("message",this.#e.bind(this),{signal:this.#t.signal})}#e({data:t}){if(t.targetName!==this.sourceName)return;if(t.stream){this.#i(t);return}if(t.callback){const a=t.callbackId,r=this.callbackCapabilities[a];if(!r)throw new Error(`Cannot resolve callback ${a}`);if(delete this.callbackCapabilities[a],t.callback===wu.DATA)r.resolve(t.data);else if(t.callback===wu.ERROR)r.reject(An(t.reason));else throw new Error("Unexpected callback case");return}const i=this.actionHandler[t.action];if(!i)throw new Error(`Unknown action from worker: ${t.action}`);if(t.callbackId){const a=this.sourceName,r=t.sourceName,c=this.comObj;Promise.try(i,t.data).then(function(u){c.postMessage({sourceName:a,targetName:r,callback:wu.DATA,callbackId:t.callbackId,data:u})},function(u){c.postMessage({sourceName:a,targetName:r,callback:wu.ERROR,callbackId:t.callbackId,reason:An(u)})});return}if(t.streamId){this.#n(t);return}i(t.data)}on(t,i){const a=this.actionHandler;if(a[t])throw new Error(`There is already an actionName called "${t}"`);a[t]=i}send(t,i,a){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:t,data:i},a)}sendWithPromise(t,i,a){const r=this.callbackId++,c=Promise.withResolvers();this.callbackCapabilities[r]=c;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:t,callbackId:r,data:i},a)}catch(u){c.reject(u)}return c.promise}sendWithStream(t,i,a,r){const c=this.streamId++,u=this.sourceName,h=this.targetName,p=this.comObj;return new ReadableStream({start:m=>{const g=Promise.withResolvers();return this.streamControllers[c]={controller:m,startCall:g,pullCall:null,cancelCall:null,isClosed:!1},p.postMessage({sourceName:u,targetName:h,action:t,streamId:c,data:i,desiredSize:m.desiredSize},r),g.promise},pull:m=>{const g=Promise.withResolvers();return this.streamControllers[c].pullCall=g,p.postMessage({sourceName:u,targetName:h,stream:ke.PULL,streamId:c,desiredSize:m.desiredSize}),g.promise},cancel:m=>{Me(m instanceof Error,"cancel must have a valid reason");const g=Promise.withResolvers();return this.streamControllers[c].cancelCall=g,this.streamControllers[c].isClosed=!0,p.postMessage({sourceName:u,targetName:h,stream:ke.CANCEL,streamId:c,reason:An(m)}),g.promise}},a)}#n(t){const i=t.streamId,a=this.sourceName,r=t.sourceName,c=this.comObj,u=this,h=this.actionHandler[t.action],p={enqueue(m,g=1,y){if(this.isCancelled)return;const b=this.desiredSize;this.desiredSize-=g,b>0&&this.desiredSize<=0&&(this.sinkCapability=Promise.withResolvers(),this.ready=this.sinkCapability.promise),c.postMessage({sourceName:a,targetName:r,stream:ke.ENQUEUE,streamId:i,chunk:m},y)},close(){this.isCancelled||(this.isCancelled=!0,c.postMessage({sourceName:a,targetName:r,stream:ke.CLOSE,streamId:i}),delete u.streamSinks[i])},error(m){Me(m instanceof Error,"error must have a valid reason"),!this.isCancelled&&(this.isCancelled=!0,c.postMessage({sourceName:a,targetName:r,stream:ke.ERROR,streamId:i,reason:An(m)}))},sinkCapability:Promise.withResolvers(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:t.desiredSize,ready:null};p.sinkCapability.resolve(),p.ready=p.sinkCapability.promise,this.streamSinks[i]=p,Promise.try(h,t.data,p).then(function(){c.postMessage({sourceName:a,targetName:r,stream:ke.START_COMPLETE,streamId:i,success:!0})},function(m){c.postMessage({sourceName:a,targetName:r,stream:ke.START_COMPLETE,streamId:i,reason:An(m)})})}#i(t){const i=t.streamId,a=this.sourceName,r=t.sourceName,c=this.comObj,u=this.streamControllers[i],h=this.streamSinks[i];switch(t.stream){case ke.START_COMPLETE:t.success?u.startCall.resolve():u.startCall.reject(An(t.reason));break;case ke.PULL_COMPLETE:t.success?u.pullCall.resolve():u.pullCall.reject(An(t.reason));break;case ke.PULL:if(!h){c.postMessage({sourceName:a,targetName:r,stream:ke.PULL_COMPLETE,streamId:i,success:!0});break}h.desiredSize<=0&&t.desiredSize>0&&h.sinkCapability.resolve(),h.desiredSize=t.desiredSize,Promise.try(h.onPull||n0).then(function(){c.postMessage({sourceName:a,targetName:r,stream:ke.PULL_COMPLETE,streamId:i,success:!0})},function(m){c.postMessage({sourceName:a,targetName:r,stream:ke.PULL_COMPLETE,streamId:i,reason:An(m)})});break;case ke.ENQUEUE:if(Me(u,"enqueue should have stream controller"),u.isClosed)break;u.controller.enqueue(t.chunk);break;case ke.CLOSE:if(Me(u,"close should have stream controller"),u.isClosed)break;u.isClosed=!0,u.controller.close(),this.#a(u,i);break;case ke.ERROR:Me(u,"error should have stream controller"),u.controller.error(An(t.reason)),this.#a(u,i);break;case ke.CANCEL_COMPLETE:t.success?u.cancelCall.resolve():u.cancelCall.reject(An(t.reason)),this.#a(u,i);break;case ke.CANCEL:if(!h)break;const p=An(t.reason);Promise.try(h.onCancel||n0,p).then(function(){c.postMessage({sourceName:a,targetName:r,stream:ke.CANCEL_COMPLETE,streamId:i,success:!0})},function(m){c.postMessage({sourceName:a,targetName:r,stream:ke.CANCEL_COMPLETE,streamId:i,reason:An(m)})}),h.sinkCapability.reject(p),h.isCancelled=!0,delete this.streamSinks[i];break;default:throw new Error("Unexpected stream case")}}async#a(t,i){await Promise.allSettled([t.startCall?.promise,t.pullCall?.promise,t.cancelCall?.promise]),delete this.streamControllers[i]}destroy(){this.#t?.abort(),this.#t=null}}class i0{#t=!1;constructor({enableHWA:t=!1}){this.#t=t}create(t,i){if(t<=0||i<=0)throw new Error("Invalid canvas size");const a=this._createCanvas(t,i);return{canvas:a,context:a.getContext("2d",{willReadFrequently:!this.#t})}}reset(t,i,a){if(!t.canvas)throw new Error("Canvas is not specified");if(i<=0||a<=0)throw new Error("Invalid canvas size");t.canvas.width=i,t.canvas.height=a}destroy(t){if(!t.canvas)throw new Error("Canvas is not specified");t.canvas.width=0,t.canvas.height=0,t.canvas=null,t.context=null}_createCanvas(t,i){ie("Abstract method `_createCanvas` called.")}}class zM extends i0{constructor({ownerDocument:t=globalThis.document,enableHWA:i=!1}){super({enableHWA:i}),this._document=t}_createCanvas(t,i){const a=this._document.createElement("canvas");return a.width=t,a.height=i,a}}class s0{constructor({baseUrl:t=null,isCompressed:i=!0}){this.baseUrl=t,this.isCompressed=i}async fetch({name:t}){if(!this.baseUrl)throw new Error("Ensure that the `cMapUrl` and `cMapPacked` API parameters are provided.");if(!t)throw new Error("CMap name must be specified.");const i=this.baseUrl+t+(this.isCompressed?".bcmap":"");return this._fetch(i).then(a=>({cMapData:a,isCompressed:this.isCompressed})).catch(a=>{throw new Error(`Unable to load ${this.isCompressed?"binary ":""}CMap at: ${i}`)})}async _fetch(t){ie("Abstract method `_fetch` called.")}}class a0 extends s0{async _fetch(t){const i=await Qo(t,this.isCompressed?"arraybuffer":"text");return i instanceof ArrayBuffer?new Uint8Array(i):Wo(i)}}class r0{addFilter(t){return"none"}addHCMFilter(t,i){return"none"}addAlphaFilter(t){return"none"}addLuminosityFilter(t){return"none"}addHighlightHCMFilter(t,i,a,r,c){return"none"}destroy(t=!1){}}class HM extends r0{#t;#e;#n;#i;#a;#s;#r=0;constructor({docId:t,ownerDocument:i=globalThis.document}){super(),this.#i=t,this.#a=i}get#o(){return this.#e||=new Map}get#u(){return this.#s||=new Map}get#c(){if(!this.#n){const t=this.#a.createElement("div"),{style:i}=t;i.visibility="hidden",i.contain="strict",i.width=i.height=0,i.position="absolute",i.top=i.left=0,i.zIndex=-1;const a=this.#a.createElementNS(ts,"svg");a.setAttribute("width",0),a.setAttribute("height",0),this.#n=this.#a.createElementNS(ts,"defs"),t.append(a),a.append(this.#n),this.#a.body.append(t)}return this.#n}#h(t){if(t.length===1){const p=t[0],m=new Array(256);for(let y=0;y<256;y++)m[y]=p[y]/255;const g=m.join(",");return[g,g,g]}const[i,a,r]=t,c=new Array(256),u=new Array(256),h=new Array(256);for(let p=0;p<256;p++)c[p]=i[p]/255,u[p]=a[p]/255,h[p]=r[p]/255;return[c.join(","),u.join(","),h.join(",")]}#l(t){if(this.#t===void 0){this.#t="";const i=this.#a.URL;i!==this.#a.baseURI&&(Su(i)?Ct('#createUrl: ignore "data:"-URL for performance reasons.'):this.#t=Vv(i,""))}return`url(${this.#t}#${t})`}addFilter(t){if(!t)return"none";let i=this.#o.get(t);if(i)return i;const[a,r,c]=this.#h(t),u=t.length===1?a:`${a}${r}${c}`;if(i=this.#o.get(u),i)return this.#o.set(t,i),i;const h=`g_${this.#i}_transfer_map_${this.#r++}`,p=this.#l(h);this.#o.set(t,p),this.#o.set(u,p);const m=this.#f(h);return this.#m(a,r,c,m),p}addHCMFilter(t,i){const a=`${t}-${i}`,r="base";let c=this.#u.get(r);if(c?.key===a||(c?(c.filter?.remove(),c.key=a,c.url="none",c.filter=null):(c={key:a,url:"none",filter:null},this.#u.set(r,c)),!t||!i))return c.url;const u=this.#y(t);t=mt.makeHexColor(...u);const h=this.#y(i);if(i=mt.makeHexColor(...h),this.#c.style.color="",t==="#000000"&&i==="#ffffff"||t===i)return c.url;const p=new Array(256);for(let S=0;S<=255;S++){const A=S/255;p[S]=A<=.03928?A/12.92:((A+.055)/1.055)**2.4}const m=p.join(","),g=`g_${this.#i}_hcm_filter`,y=c.filter=this.#f(g);this.#m(m,m,m,y),this.#g(y);const b=(S,A)=>{const _=u[S]/255,R=h[S]/255,C=new Array(A+1);for(let N=0;N<=A;N++)C[N]=_+N/A*(R-_);return C.join(",")};return this.#m(b(0,5),b(1,5),b(2,5),y),c.url=this.#l(g),c.url}addAlphaFilter(t){let i=this.#o.get(t);if(i)return i;const[a]=this.#h([t]),r=`alpha_${a}`;if(i=this.#o.get(r),i)return this.#o.set(t,i),i;const c=`g_${this.#i}_alpha_map_${this.#r++}`,u=this.#l(c);this.#o.set(t,u),this.#o.set(r,u);const h=this.#f(c);return this.#v(a,h),u}addLuminosityFilter(t){let i=this.#o.get(t||"luminosity");if(i)return i;let a,r;if(t?([a]=this.#h([t]),r=`luminosity_${a}`):r="luminosity",i=this.#o.get(r),i)return this.#o.set(t,i),i;const c=`g_${this.#i}_luminosity_map_${this.#r++}`,u=this.#l(c);this.#o.set(t,u),this.#o.set(r,u);const h=this.#f(c);return this.#p(h),t&&this.#v(a,h),u}addHighlightHCMFilter(t,i,a,r,c){const u=`${i}-${a}-${r}-${c}`;let h=this.#u.get(t);if(h?.key===u||(h?(h.filter?.remove(),h.key=u,h.url="none",h.filter=null):(h={key:u,url:"none",filter:null},this.#u.set(t,h)),!i||!a))return h.url;const[p,m]=[i,a].map(this.#y.bind(this));let g=Math.round(.2126*p[0]+.7152*p[1]+.0722*p[2]),y=Math.round(.2126*m[0]+.7152*m[1]+.0722*m[2]),[b,S]=[r,c].map(this.#y.bind(this));y<g&&([g,y,b,S]=[y,g,S,b]),this.#c.style.color="";const A=(C,N,O)=>{const U=new Array(256),I=(y-g)/O,j=C/255,F=(N-C)/(255*O);let J=0;for(let X=0;X<=O;X++){const at=Math.round(g+X*I),K=j+X*F;for(let lt=J;lt<=at;lt++)U[lt]=K;J=at+1}for(let X=J;X<256;X++)U[X]=U[J-1];return U.join(",")},_=`g_${this.#i}_hcm_${t}_filter`,R=h.filter=this.#f(_);return this.#g(R),this.#m(A(b[0],S[0],5),A(b[1],S[1],5),A(b[2],S[2],5),R),h.url=this.#l(_),h.url}destroy(t=!1){t&&this.#s?.size||(this.#n?.parentNode.parentNode.remove(),this.#n=null,this.#e?.clear(),this.#e=null,this.#s?.clear(),this.#s=null,this.#r=0)}#p(t){const i=this.#a.createElementNS(ts,"feColorMatrix");i.setAttribute("type","matrix"),i.setAttribute("values","0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0.59 0.11 0 0"),t.append(i)}#g(t){const i=this.#a.createElementNS(ts,"feColorMatrix");i.setAttribute("type","matrix"),i.setAttribute("values","0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0"),t.append(i)}#f(t){const i=this.#a.createElementNS(ts,"filter");return i.setAttribute("color-interpolation-filters","sRGB"),i.setAttribute("id",t),this.#c.append(i),i}#d(t,i,a){const r=this.#a.createElementNS(ts,i);r.setAttribute("type","discrete"),r.setAttribute("tableValues",a),t.append(r)}#m(t,i,a,r){const c=this.#a.createElementNS(ts,"feComponentTransfer");r.append(c),this.#d(c,"feFuncR",t),this.#d(c,"feFuncG",i),this.#d(c,"feFuncB",a)}#v(t,i){const a=this.#a.createElementNS(ts,"feComponentTransfer");i.append(a),this.#d(a,"feFuncA",t)}#y(t){return this.#c.style.color=t,Eu(getComputedStyle(this.#c).getPropertyValue("color"))}}class o0{constructor({baseUrl:t=null}){this.baseUrl=t}async fetch({filename:t}){if(!this.baseUrl)throw new Error("Ensure that the `standardFontDataUrl` API parameter is provided.");if(!t)throw new Error("Font filename must be specified.");const i=`${this.baseUrl}${t}`;return this._fetch(i).catch(a=>{throw new Error(`Unable to load font data at: ${i}`)})}async _fetch(t){ie("Abstract method `_fetch` called.")}}class l0 extends o0{async _fetch(t){const i=await Qo(t,"arraybuffer");return new Uint8Array(i)}}class c0{constructor({baseUrl:t=null}){this.baseUrl=t}async fetch({filename:t}){if(!this.baseUrl)throw new Error("Ensure that the `wasmUrl` API parameter is provided.");if(!t)throw new Error("Wasm filename must be specified.");const i=`${this.baseUrl}${t}`;return this._fetch(i).catch(a=>{throw new Error(`Unable to load wasm data at: ${i}`)})}async _fetch(t){ie("Abstract method `_fetch` called.")}}class u0 extends c0{async _fetch(t){const i=await Qo(t,"arraybuffer");return new Uint8Array(i)}}un&&Ct("Please use the `legacy` build in Node.js environments.");async function qf(l){const i=await process.getBuiltinModule("fs").promises.readFile(l);return new Uint8Array(i)}class BM extends r0{}class FM extends i0{_createCanvas(t,i){return process.getBuiltinModule("module").createRequire(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Qt&&Qt.tagName.toUpperCase()==="SCRIPT"&&Qt.src||new URL("corisco.umd.js",document.baseURI).href)("@napi-rs/canvas").createCanvas(t,i)}}class jM extends s0{async _fetch(t){return qf(t)}}class $M extends o0{async _fetch(t){return qf(t)}}class GM extends c0{async _fetch(t){return qf(t)}}const qe={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};function Yf(l,t){if(!t)return;const i=t[2]-t[0],a=t[3]-t[1],r=new Path2D;r.rect(t[0],t[1],i,a),l.clip(r)}class Xf{isModifyingCurrentTransform(){return!1}getPattern(){ie("Abstract method `getPattern` called.")}}class VM extends Xf{constructor(t){super(),this._type=t[1],this._bbox=t[2],this._colorStops=t[3],this._p0=t[4],this._p1=t[5],this._r0=t[6],this._r1=t[7],this.matrix=null}_createGradient(t){let i;this._type==="axial"?i=t.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):this._type==="radial"&&(i=t.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));for(const a of this._colorStops)i.addColorStop(a[0],a[1]);return i}getPattern(t,i,a,r){let c;if(r===qe.STROKE||r===qe.FILL){const u=i.current.getClippedPathBoundingBox(r,ye(t))||[0,0,0,0],h=Math.ceil(u[2]-u[0])||1,p=Math.ceil(u[3]-u[1])||1,m=i.cachedCanvases.getCanvas("pattern",h,p),g=m.context;g.clearRect(0,0,g.canvas.width,g.canvas.height),g.beginPath(),g.rect(0,0,g.canvas.width,g.canvas.height),g.translate(-u[0],-u[1]),a=mt.transform(a,[1,0,0,1,u[0],u[1]]),g.transform(...i.baseTransform),this.matrix&&g.transform(...this.matrix),Yf(g,this._bbox),g.fillStyle=this._createGradient(g),g.fill(),c=t.createPattern(m.canvas,"no-repeat");const y=new DOMMatrix(a);c.setTransform(y)}else Yf(t,this._bbox),c=this._createGradient(t);return c}}function Wf(l,t,i,a,r,c,u,h){const p=t.coords,m=t.colors,g=l.data,y=l.width*4;let b;p[i+1]>p[a+1]&&(b=i,i=a,a=b,b=c,c=u,u=b),p[a+1]>p[r+1]&&(b=a,a=r,r=b,b=u,u=h,h=b),p[i+1]>p[a+1]&&(b=i,i=a,a=b,b=c,c=u,u=b);const S=(p[i]+t.offsetX)*t.scaleX,A=(p[i+1]+t.offsetY)*t.scaleY,_=(p[a]+t.offsetX)*t.scaleX,R=(p[a+1]+t.offsetY)*t.scaleY,C=(p[r]+t.offsetX)*t.scaleX,N=(p[r+1]+t.offsetY)*t.scaleY;if(A>=N)return;const O=m[c],U=m[c+1],I=m[c+2],j=m[u],F=m[u+1],J=m[u+2],X=m[h],at=m[h+1],K=m[h+2],lt=Math.round(A),Et=Math.round(N);let bt,Gt,B,Q,dt,xt,W,ht;for(let st=lt;st<=Et;st++){if(st<R){const Wt=st<A?0:(A-st)/(A-R);bt=S-(S-_)*Wt,Gt=O-(O-j)*Wt,B=U-(U-F)*Wt,Q=I-(I-J)*Wt}else{let Wt;st>N?Wt=1:R===N?Wt=0:Wt=(R-st)/(R-N),bt=_-(_-C)*Wt,Gt=j-(j-X)*Wt,B=F-(F-at)*Wt,Q=J-(J-K)*Wt}let vt;st<A?vt=0:st>N?vt=1:vt=(A-st)/(A-N),dt=S-(S-C)*vt,xt=O-(O-X)*vt,W=U-(U-at)*vt,ht=I-(I-K)*vt;const Zt=Math.round(Math.min(bt,dt)),oe=Math.round(Math.max(bt,dt));let tt=y*st+Zt*4;for(let Wt=Zt;Wt<=oe;Wt++)vt=(bt-Wt)/(bt-dt),vt<0?vt=0:vt>1&&(vt=1),g[tt++]=Gt-(Gt-xt)*vt|0,g[tt++]=B-(B-W)*vt|0,g[tt++]=Q-(Q-ht)*vt|0,g[tt++]=255}}function qM(l,t,i){const a=t.coords,r=t.colors;let c,u;switch(t.type){case"lattice":const h=t.verticesPerRow,p=Math.floor(a.length/h)-1,m=h-1;for(c=0;c<p;c++){let g=c*h;for(let y=0;y<m;y++,g++)Wf(l,i,a[g],a[g+1],a[g+h],r[g],r[g+1],r[g+h]),Wf(l,i,a[g+h+1],a[g+1],a[g+h],r[g+h+1],r[g+1],r[g+h])}break;case"triangles":for(c=0,u=a.length;c<u;c+=3)Wf(l,i,a[c],a[c+1],a[c+2],r[c],r[c+1],r[c+2]);break;default:throw new Error("illegal figure")}}class YM extends Xf{constructor(t){super(),this._coords=t[2],this._colors=t[3],this._figures=t[4],this._bounds=t[5],this._bbox=t[6],this._background=t[7],this.matrix=null}_createMeshCanvas(t,i,a){const h=Math.floor(this._bounds[0]),p=Math.floor(this._bounds[1]),m=Math.ceil(this._bounds[2])-h,g=Math.ceil(this._bounds[3])-p,y=Math.min(Math.ceil(Math.abs(m*t[0]*1.1)),3e3),b=Math.min(Math.ceil(Math.abs(g*t[1]*1.1)),3e3),S=m/y,A=g/b,_={coords:this._coords,colors:this._colors,offsetX:-h,offsetY:-p,scaleX:1/S,scaleY:1/A},R=y+4,C=b+4,N=a.getCanvas("mesh",R,C),O=N.context,U=O.createImageData(y,b);if(i){const j=U.data;for(let F=0,J=j.length;F<J;F+=4)j[F]=i[0],j[F+1]=i[1],j[F+2]=i[2],j[F+3]=255}for(const j of this._figures)qM(U,j,_);return O.putImageData(U,2,2),{canvas:N.canvas,offsetX:h-2*S,offsetY:p-2*A,scaleX:S,scaleY:A}}isModifyingCurrentTransform(){return!0}getPattern(t,i,a,r){Yf(t,this._bbox);const c=new Float32Array(2);if(r===qe.SHADING)mt.singularValueDecompose2dScale(ye(t),c);else if(this.matrix){mt.singularValueDecompose2dScale(this.matrix,c);const[h,p]=c;mt.singularValueDecompose2dScale(i.baseTransform,c),c[0]*=h,c[1]*=p}else mt.singularValueDecompose2dScale(i.baseTransform,c);const u=this._createMeshCanvas(c,r===qe.SHADING?null:this._background,i.cachedCanvases);return r!==qe.SHADING&&(t.setTransform(...i.baseTransform),this.matrix&&t.transform(...this.matrix)),t.translate(u.offsetX,u.offsetY),t.scale(u.scaleX,u.scaleY),t.createPattern(u.canvas,"no-repeat")}}class XM extends Xf{getPattern(){return"hotpink"}}function WM(l){switch(l[0]){case"RadialAxial":return new VM(l);case"Mesh":return new YM(l);case"Dummy":return new XM}throw new Error(`Unknown IR type: ${l[0]}`)}const d0={COLORED:1,UNCOLORED:2};class Qf{static MAX_PATTERN_SIZE=3e3;constructor(t,i,a,r){this.color=t[1],this.operatorList=t[2],this.matrix=t[3],this.bbox=t[4],this.xstep=t[5],this.ystep=t[6],this.paintType=t[7],this.tilingType=t[8],this.ctx=i,this.canvasGraphicsFactory=a,this.baseTransform=r}createPatternCanvas(t){const{bbox:i,operatorList:a,paintType:r,tilingType:c,color:u,canvasGraphicsFactory:h}=this;let{xstep:p,ystep:m}=this;p=Math.abs(p),m=Math.abs(m),bu("TilingType: "+c);const g=i[0],y=i[1],b=i[2],S=i[3],A=b-g,_=S-y,R=new Float32Array(2);mt.singularValueDecompose2dScale(this.matrix,R);const[C,N]=R;mt.singularValueDecompose2dScale(this.baseTransform,R);const O=C*R[0],U=N*R[1];let I=A,j=_,F=!1,J=!1;const X=Math.ceil(p*O),at=Math.ceil(m*U),K=Math.ceil(A*O),lt=Math.ceil(_*U);X>=K?I=p:F=!0,at>=lt?j=m:J=!0;const Et=this.getSizeAndScale(I,this.ctx.canvas.width,O),bt=this.getSizeAndScale(j,this.ctx.canvas.height,U),Gt=t.cachedCanvases.getCanvas("pattern",Et.size,bt.size),B=Gt.context,Q=h.createCanvasGraphics(B);if(Q.groupLevel=t.groupLevel,this.setFillAndStrokeStyleToContext(Q,r,u),B.translate(-Et.scale*g,-bt.scale*y),Q.transform(Et.scale,0,0,bt.scale,0,0),B.save(),this.clipBbox(Q,g,y,b,S),Q.baseTransform=ye(Q.ctx),Q.executeOperatorList(a),Q.endDrawing(),B.restore(),F||J){const dt=Gt.canvas;F&&(I=p),J&&(j=m);const xt=this.getSizeAndScale(I,this.ctx.canvas.width,O),W=this.getSizeAndScale(j,this.ctx.canvas.height,U),ht=xt.size,st=W.size,vt=t.cachedCanvases.getCanvas("pattern-workaround",ht,st),Zt=vt.context,oe=F?Math.floor(A/p):0,tt=J?Math.floor(_/m):0;for(let Wt=0;Wt<=oe;Wt++)for(let Vt=0;Vt<=tt;Vt++)Zt.drawImage(dt,ht*Wt,st*Vt,ht,st,0,0,ht,st);return{canvas:vt.canvas,scaleX:xt.scale,scaleY:W.scale,offsetX:g,offsetY:y}}return{canvas:Gt.canvas,scaleX:Et.scale,scaleY:bt.scale,offsetX:g,offsetY:y}}getSizeAndScale(t,i,a){const r=Math.max(Qf.MAX_PATTERN_SIZE,i);let c=Math.ceil(t*a);return c>=r?c=r:a=c/t,{scale:a,size:c}}clipBbox(t,i,a,r,c){const u=r-i,h=c-a;t.ctx.rect(i,a,u,h),mt.axialAlignedBoundingBox([i,a,r,c],ye(t.ctx),t.current.minMax),t.clip(),t.endPath()}setFillAndStrokeStyleToContext(t,i,a){const r=t.ctx,c=t.current;switch(i){case d0.COLORED:const{fillStyle:u,strokeStyle:h}=this.ctx;r.fillStyle=c.fillColor=u,r.strokeStyle=c.strokeColor=h;break;case d0.UNCOLORED:r.fillStyle=r.strokeStyle=a,c.fillColor=c.strokeColor=a;break;default:throw new pM(`Unsupported paint type: ${i}`)}}isModifyingCurrentTransform(){return!1}getPattern(t,i,a,r){let c=a;r!==qe.SHADING&&(c=mt.transform(c,i.baseTransform),this.matrix&&(c=mt.transform(c,this.matrix)));const u=this.createPatternCanvas(i);let h=new DOMMatrix(c);h=h.translate(u.offsetX,u.offsetY),h=h.scale(1/u.scaleX,1/u.scaleY);const p=t.createPattern(u.canvas,"repeat");return p.setTransform(h),p}}function QM({src:l,srcPos:t=0,dest:i,width:a,height:r,nonBlackColor:c=4294967295,inverseDecode:u=!1}){const h=Ve.isLittleEndian?4278190080:255,[p,m]=u?[c,h]:[h,c],g=a>>3,y=a&7,b=l.length;i=new Uint32Array(i.buffer);let S=0;for(let A=0;A<r;A++){for(const R=t+g;t<R;t++){const C=t<b?l[t]:255;i[S++]=C&128?m:p,i[S++]=C&64?m:p,i[S++]=C&32?m:p,i[S++]=C&16?m:p,i[S++]=C&8?m:p,i[S++]=C&4?m:p,i[S++]=C&2?m:p,i[S++]=C&1?m:p}if(y===0)continue;const _=t<b?l[t++]:255;for(let R=0;R<y;R++)i[S++]=_&1<<7-R?m:p}return{srcPos:t,destPos:S}}const h0=16,f0=100,KM=15,p0=10,_n=16,Kf=new DOMMatrix,In=new Float32Array(2),wr=new Float32Array([1/0,1/0,-1/0,-1/0]);function ZM(l,t){if(l._removeMirroring)throw new Error("Context is already forwarding operations.");l.__originalSave=l.save,l.__originalRestore=l.restore,l.__originalRotate=l.rotate,l.__originalScale=l.scale,l.__originalTranslate=l.translate,l.__originalTransform=l.transform,l.__originalSetTransform=l.setTransform,l.__originalResetTransform=l.resetTransform,l.__originalClip=l.clip,l.__originalMoveTo=l.moveTo,l.__originalLineTo=l.lineTo,l.__originalBezierCurveTo=l.bezierCurveTo,l.__originalRect=l.rect,l.__originalClosePath=l.closePath,l.__originalBeginPath=l.beginPath,l._removeMirroring=()=>{l.save=l.__originalSave,l.restore=l.__originalRestore,l.rotate=l.__originalRotate,l.scale=l.__originalScale,l.translate=l.__originalTranslate,l.transform=l.__originalTransform,l.setTransform=l.__originalSetTransform,l.resetTransform=l.__originalResetTransform,l.clip=l.__originalClip,l.moveTo=l.__originalMoveTo,l.lineTo=l.__originalLineTo,l.bezierCurveTo=l.__originalBezierCurveTo,l.rect=l.__originalRect,l.closePath=l.__originalClosePath,l.beginPath=l.__originalBeginPath,delete l._removeMirroring},l.save=function(){t.save(),this.__originalSave()},l.restore=function(){t.restore(),this.__originalRestore()},l.translate=function(i,a){t.translate(i,a),this.__originalTranslate(i,a)},l.scale=function(i,a){t.scale(i,a),this.__originalScale(i,a)},l.transform=function(i,a,r,c,u,h){t.transform(i,a,r,c,u,h),this.__originalTransform(i,a,r,c,u,h)},l.setTransform=function(i,a,r,c,u,h){t.setTransform(i,a,r,c,u,h),this.__originalSetTransform(i,a,r,c,u,h)},l.resetTransform=function(){t.resetTransform(),this.__originalResetTransform()},l.rotate=function(i){t.rotate(i),this.__originalRotate(i)},l.clip=function(i){t.clip(i),this.__originalClip(i)},l.moveTo=function(i,a){t.moveTo(i,a),this.__originalMoveTo(i,a)},l.lineTo=function(i,a){t.lineTo(i,a),this.__originalLineTo(i,a)},l.bezierCurveTo=function(i,a,r,c,u,h){t.bezierCurveTo(i,a,r,c,u,h),this.__originalBezierCurveTo(i,a,r,c,u,h)},l.rect=function(i,a,r,c){t.rect(i,a,r,c),this.__originalRect(i,a,r,c)},l.closePath=function(){t.closePath(),this.__originalClosePath()},l.beginPath=function(){t.beginPath(),this.__originalBeginPath()}}class JM{constructor(t){this.canvasFactory=t,this.cache=Object.create(null)}getCanvas(t,i,a){let r;return this.cache[t]!==void 0?(r=this.cache[t],this.canvasFactory.reset(r,i,a)):(r=this.canvasFactory.create(i,a),this.cache[t]=r),r}delete(t){delete this.cache[t]}clear(){for(const t in this.cache){const i=this.cache[t];this.canvasFactory.destroy(i),delete this.cache[t]}}}function Cu(l,t,i,a,r,c,u,h,p,m){const[g,y,b,S,A,_]=ye(l);if(y===0&&b===0){const N=u*g+A,O=Math.round(N),U=h*S+_,I=Math.round(U),j=(u+p)*g+A,F=Math.abs(Math.round(j)-O)||1,J=(h+m)*S+_,X=Math.abs(Math.round(J)-I)||1;return l.setTransform(Math.sign(g),0,0,Math.sign(S),O,I),l.drawImage(t,i,a,r,c,0,0,F,X),l.setTransform(g,y,b,S,A,_),[F,X]}if(g===0&&S===0){const N=h*b+A,O=Math.round(N),U=u*y+_,I=Math.round(U),j=(h+m)*b+A,F=Math.abs(Math.round(j)-O)||1,J=(u+p)*y+_,X=Math.abs(Math.round(J)-I)||1;return l.setTransform(0,Math.sign(y),Math.sign(b),0,O,I),l.drawImage(t,i,a,r,c,0,0,X,F),l.setTransform(g,y,b,S,A,_),[X,F]}l.drawImage(t,i,a,r,c,u,h,p,m);const R=Math.hypot(g,y),C=Math.hypot(b,S);return[R*p,C*m]}class m0{alphaIsShape=!1;fontSize=0;fontSizeScale=1;textMatrix=null;textMatrixScale=1;fontMatrix=Mf;leading=0;x=0;y=0;lineX=0;lineY=0;charSpacing=0;wordSpacing=0;textHScale=1;textRenderingMode=sn.FILL;textRise=0;fillColor="#000000";strokeColor="#000000";patternFill=!1;patternStroke=!1;fillAlpha=1;strokeAlpha=1;lineWidth=1;activeSMask=null;transferMaps="none";constructor(t,i){this.clipBox=new Float32Array([0,0,t,i]),this.minMax=wr.slice()}clone(){const t=Object.create(this);return t.clipBox=this.clipBox.slice(),t.minMax=this.minMax.slice(),t}getPathBoundingBox(t=qe.FILL,i=null){const a=this.minMax.slice();if(t===qe.STROKE){i||ie("Stroke bounding box must include transform."),mt.singularValueDecompose2dScale(i,In);const r=In[0]*this.lineWidth/2,c=In[1]*this.lineWidth/2;a[0]-=r,a[1]-=c,a[2]+=r,a[3]+=c}return a}updateClipFromPath(){const t=mt.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(t||[0,0,0,0])}isEmptyClip(){return this.minMax[0]===1/0}startNewPathAndClipBox(t){this.clipBox.set(t,0),this.minMax.set(wr,0)}getClippedPathBoundingBox(t=qe.FILL,i=null){return mt.intersect(this.clipBox,this.getPathBoundingBox(t,i))}}function g0(l,t){if(t instanceof ImageData){l.putImageData(t,0,0);return}const i=t.height,a=t.width,r=i%_n,c=(i-r)/_n,u=r===0?c:c+1,h=l.createImageData(a,_n);let p=0,m;const g=t.data,y=h.data;let b,S,A,_;if(t.kind===fu.GRAYSCALE_1BPP){const R=g.byteLength,C=new Uint32Array(y.buffer,0,y.byteLength>>2),N=C.length,O=a+7>>3,U=4294967295,I=Ve.isLittleEndian?4278190080:255;for(b=0;b<u;b++){for(A=b<c?_n:r,m=0,S=0;S<A;S++){const j=R-p;let F=0;const J=j>O?a:j*8-7,X=J&-8;let at=0,K=0;for(;F<X;F+=8)K=g[p++],C[m++]=K&128?U:I,C[m++]=K&64?U:I,C[m++]=K&32?U:I,C[m++]=K&16?U:I,C[m++]=K&8?U:I,C[m++]=K&4?U:I,C[m++]=K&2?U:I,C[m++]=K&1?U:I;for(;F<J;F++)at===0&&(K=g[p++],at=128),C[m++]=K&at?U:I,at>>=1}for(;m<N;)C[m++]=0;l.putImageData(h,0,b*_n)}}else if(t.kind===fu.RGBA_32BPP){for(S=0,_=a*_n*4,b=0;b<c;b++)y.set(g.subarray(p,p+_)),p+=_,l.putImageData(h,0,S),S+=_n;b<u&&(_=a*r*4,y.set(g.subarray(p,p+_)),l.putImageData(h,0,S))}else if(t.kind===fu.RGB_24BPP)for(A=_n,_=a*A,b=0;b<u;b++){for(b>=c&&(A=r,_=a*A),m=0,S=_;S--;)y[m++]=g[p++],y[m++]=g[p++],y[m++]=g[p++],y[m++]=255;l.putImageData(h,0,b*_n)}else throw new Error(`bad image kind: ${t.kind}`)}function y0(l,t){if(t.bitmap){l.drawImage(t.bitmap,0,0);return}const i=t.height,a=t.width,r=i%_n,c=(i-r)/_n,u=r===0?c:c+1,h=l.createImageData(a,_n);let p=0;const m=t.data,g=h.data;for(let y=0;y<u;y++){const b=y<c?_n:r;({srcPos:p}=QM({src:m,srcPos:p,dest:g,width:a,height:b,nonBlackColor:0})),l.putImageData(h,0,y*_n)}}function nl(l,t){const i=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font","filter"];for(const a of i)l[a]!==void 0&&(t[a]=l[a]);l.setLineDash!==void 0&&(t.setLineDash(l.getLineDash()),t.lineDashOffset=l.lineDashOffset)}function xu(l){l.strokeStyle=l.fillStyle="#000000",l.fillRule="nonzero",l.globalAlpha=1,l.lineWidth=1,l.lineCap="butt",l.lineJoin="miter",l.miterLimit=10,l.globalCompositeOperation="source-over",l.font="10px sans-serif",l.setLineDash!==void 0&&(l.setLineDash([]),l.lineDashOffset=0);const{filter:t}=l;t!=="none"&&t!==""&&(l.filter="none")}function b0(l,t){if(t)return!0;mt.singularValueDecompose2dScale(l,In);const i=Math.fround(Ri.pixelRatio*Tr.PDF_TO_CSS_UNITS);return In[0]<=i&&In[1]<=i}const tO=["butt","round","square"],eO=["miter","round","bevel"],nO={},v0={};class Cr{constructor(t,i,a,r,c,{optionalContentConfig:u,markedContentStack:h=null},p,m){this.ctx=t,this.current=new m0(this.ctx.canvas.width,this.ctx.canvas.height),this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=i,this.objs=a,this.canvasFactory=r,this.filterFactory=c,this.groupStack=[],this.baseTransform=null,this.baseTransformStack=[],this.groupLevel=0,this.smaskStack=[],this.smaskCounter=0,this.tempSMask=null,this.suspendedCtx=null,this.contentVisible=!0,this.markedContentStack=h||[],this.optionalContentConfig=u,this.cachedCanvases=new JM(this.canvasFactory),this.cachedPatterns=new Map,this.annotationCanvasMap=p,this.viewportScale=1,this.outputScaleX=1,this.outputScaleY=1,this.pageColors=m,this._cachedScaleForStroking=[-1,0],this._cachedGetSinglePixelWidth=null,this._cachedBitmapsMap=new Map}getObject(t,i=null){return typeof t=="string"?t.startsWith("g_")?this.commonObjs.get(t):this.objs.get(t):i}beginDrawing({transform:t,viewport:i,transparency:a=!1,background:r=null}){const c=this.ctx.canvas.width,u=this.ctx.canvas.height,h=this.ctx.fillStyle;if(this.ctx.fillStyle=r||"#ffffff",this.ctx.fillRect(0,0,c,u),this.ctx.fillStyle=h,a){const p=this.cachedCanvases.getCanvas("transparent",c,u);this.compositeCtx=this.ctx,this.transparentCanvas=p.canvas,this.ctx=p.context,this.ctx.save(),this.ctx.transform(...ye(this.compositeCtx))}this.ctx.save(),xu(this.ctx),t&&(this.ctx.transform(...t),this.outputScaleX=t[0],this.outputScaleY=t[0]),this.ctx.transform(...i.transform),this.viewportScale=i.scale,this.baseTransform=ye(this.ctx)}executeOperatorList(t,i,a,r){const c=t.argsArray,u=t.fnArray;let h=i||0;const p=c.length;if(p===h)return h;const m=p-h>p0&&typeof a=="function",g=m?Date.now()+KM:0;let y=0;const b=this.commonObjs,S=this.objs;let A;for(;;){if(r!==void 0&&h===r.nextBreakPoint)return r.breakIt(h,a),h;if(A=u[h],A!==mu.dependency)this[A].apply(this,c[h]);else for(const _ of c[h]){const R=_.startsWith("g_")?b:S;if(!R.has(_))return R.get(_,a),h}if(h++,h===p)return h;if(m&&++y>p0){if(Date.now()>g)return a(),h;y=0}}}#t(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();this.current.activeSMask=null,this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.transparentCanvas=null)}endDrawing(){this.#t(),this.cachedCanvases.clear(),this.cachedPatterns.clear();for(const t of this._cachedBitmapsMap.values()){for(const i of t.values())typeof HTMLCanvasElement<"u"&&i instanceof HTMLCanvasElement&&(i.width=i.height=0);t.clear()}this._cachedBitmapsMap.clear(),this.#e()}#e(){if(this.pageColors){const t=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if(t!=="none"){const i=this.ctx.filter;this.ctx.filter=t,this.ctx.drawImage(this.ctx.canvas,0,0),this.ctx.filter=i}}}_scaleImage(t,i){const a=t.width??t.displayWidth,r=t.height??t.displayHeight;let c=Math.max(Math.hypot(i[0],i[1]),1),u=Math.max(Math.hypot(i[2],i[3]),1),h=a,p=r,m="prescale1",g,y;for(;c>2&&h>1||u>2&&p>1;){let b=h,S=p;c>2&&h>1&&(b=h>=16384?Math.floor(h/2)-1||1:Math.ceil(h/2),c/=h/b),u>2&&p>1&&(S=p>=16384?Math.floor(p/2)-1||1:Math.ceil(p)/2,u/=p/S),g=this.cachedCanvases.getCanvas(m,b,S),y=g.context,y.clearRect(0,0,b,S),y.drawImage(t,0,0,h,p,0,0,b,S),t=g.canvas,h=b,p=S,m=m==="prescale1"?"prescale2":"prescale1"}return{img:t,paintWidth:h,paintHeight:p}}_createMaskCanvas(t){const i=this.ctx,{width:a,height:r}=t,c=this.current.fillColor,u=this.current.patternFill,h=ye(i);let p,m,g,y;if((t.bitmap||t.data)&&t.count>1){const X=t.bitmap||t.data.buffer;m=JSON.stringify(u?h:[h.slice(0,4),c]),p=this._cachedBitmapsMap.get(X),p||(p=new Map,this._cachedBitmapsMap.set(X,p));const at=p.get(m);if(at&&!u){const K=Math.round(Math.min(h[0],h[2])+h[4]),lt=Math.round(Math.min(h[1],h[3])+h[5]);return{canvas:at,offsetX:K,offsetY:lt}}g=at}g||(y=this.cachedCanvases.getCanvas("maskCanvas",a,r),y0(y.context,t));let b=mt.transform(h,[1/a,0,0,-1/r,0,0]);b=mt.transform(b,[1,0,0,1,0,-r]);const S=wr.slice();mt.axialAlignedBoundingBox([0,0,a,r],b,S);const[A,_,R,C]=S,N=Math.round(R-A)||1,O=Math.round(C-_)||1,U=this.cachedCanvases.getCanvas("fillCanvas",N,O),I=U.context,j=A,F=_;I.translate(-j,-F),I.transform(...b),g||(g=this._scaleImage(y.canvas,xi(I)),g=g.img,p&&u&&p.set(m,g)),I.imageSmoothingEnabled=b0(ye(I),t.interpolate),Cu(I,g,0,0,g.width,g.height,0,0,a,r),I.globalCompositeOperation="source-in";const J=mt.transform(xi(I),[1,0,0,1,-j,-F]);return I.fillStyle=u?c.getPattern(i,this,J,qe.FILL):c,I.fillRect(0,0,a,r),p&&!u&&(this.cachedCanvases.delete("fillCanvas"),p.set(m,U.canvas)),{canvas:U.canvas,offsetX:Math.round(j),offsetY:Math.round(F)}}setLineWidth(t){t!==this.current.lineWidth&&(this._cachedScaleForStroking[0]=-1),this.current.lineWidth=t,this.ctx.lineWidth=t}setLineCap(t){this.ctx.lineCap=tO[t]}setLineJoin(t){this.ctx.lineJoin=eO[t]}setMiterLimit(t){this.ctx.miterLimit=t}setDash(t,i){const a=this.ctx;a.setLineDash!==void 0&&(a.setLineDash(t),a.lineDashOffset=i)}setRenderingIntent(t){}setFlatness(t){}setGState(t){for(const[i,a]of t)switch(i){case"LW":this.setLineWidth(a);break;case"LC":this.setLineCap(a);break;case"LJ":this.setLineJoin(a);break;case"ML":this.setMiterLimit(a);break;case"D":this.setDash(a[0],a[1]);break;case"RI":this.setRenderingIntent(a);break;case"FL":this.setFlatness(a);break;case"Font":this.setFont(a[0],a[1]);break;case"CA":this.current.strokeAlpha=a;break;case"ca":this.ctx.globalAlpha=this.current.fillAlpha=a;break;case"BM":this.ctx.globalCompositeOperation=a;break;case"SMask":this.current.activeSMask=a?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(a);break}}get inSMaskMode(){return!!this.suspendedCtx}checkSMaskState(){const t=this.inSMaskMode;this.current.activeSMask&&!t?this.beginSMaskMode():!this.current.activeSMask&&t&&this.endSMaskMode()}beginSMaskMode(){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");const t=this.ctx.canvas.width,i=this.ctx.canvas.height,a="smaskGroupAt"+this.groupLevel,r=this.cachedCanvases.getCanvas(a,t,i);this.suspendedCtx=this.ctx;const c=this.ctx=r.context;c.setTransform(this.suspendedCtx.getTransform()),nl(this.suspendedCtx,c),ZM(c,this.suspendedCtx),this.setGState([["BM","source-over"]])}endSMaskMode(){if(!this.inSMaskMode)throw new Error("endSMaskMode called while not in smask mode");this.ctx._removeMirroring(),nl(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}compose(t){if(!this.current.activeSMask)return;t?(t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.ceil(t[2]),t[3]=Math.ceil(t[3])):t=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];const i=this.current.activeSMask,a=this.suspendedCtx;this.composeSMask(a,i,this.ctx,t),this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.restore()}composeSMask(t,i,a,r){const c=r[0],u=r[1],h=r[2]-c,p=r[3]-u;h===0||p===0||(this.genericComposeSMask(i.context,a,h,p,i.subtype,i.backdrop,i.transferMap,c,u,i.offsetX,i.offsetY),t.save(),t.globalAlpha=1,t.globalCompositeOperation="source-over",t.setTransform(1,0,0,1,0,0),t.drawImage(a.canvas,0,0),t.restore())}genericComposeSMask(t,i,a,r,c,u,h,p,m,g,y){let b=t.canvas,S=p-g,A=m-y;if(u)if(S<0||A<0||S+a>b.width||A+r>b.height){const R=this.cachedCanvases.getCanvas("maskExtension",a,r),C=R.context;C.drawImage(b,-S,-A),C.globalCompositeOperation="destination-atop",C.fillStyle=u,C.fillRect(0,0,a,r),C.globalCompositeOperation="source-over",b=R.canvas,S=A=0}else{t.save(),t.globalAlpha=1,t.setTransform(1,0,0,1,0,0);const R=new Path2D;R.rect(S,A,a,r),t.clip(R),t.globalCompositeOperation="destination-atop",t.fillStyle=u,t.fillRect(S,A,a,r),t.restore()}i.save(),i.globalAlpha=1,i.setTransform(1,0,0,1,0,0),c==="Alpha"&&h?i.filter=this.filterFactory.addAlphaFilter(h):c==="Luminosity"&&(i.filter=this.filterFactory.addLuminosityFilter(h));const _=new Path2D;_.rect(p,m,a,r),i.clip(_),i.globalCompositeOperation="destination-in",i.drawImage(b,S,A,a,r,p,m,a,r),i.restore()}save(){this.inSMaskMode&&nl(this.ctx,this.suspendedCtx),this.ctx.save();const t=this.current;this.stateStack.push(t),this.current=t.clone()}restore(){if(this.stateStack.length===0){this.inSMaskMode&&this.endSMaskMode();return}this.current=this.stateStack.pop(),this.ctx.restore(),this.inSMaskMode&&nl(this.suspendedCtx,this.ctx),this.checkSMaskState(),this.pendingClip=null,this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}transform(t,i,a,r,c,u){this.ctx.transform(t,i,a,r,c,u),this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}constructPath(t,i,a){let[r]=i;if(!a){r||=i[0]=new Path2D,this[t](r);return}if(!(r instanceof Path2D)){const c=i[0]=new Path2D;for(let u=0,h=r.length;u<h;)switch(r[u++]){case gu.moveTo:c.moveTo(r[u++],r[u++]);break;case gu.lineTo:c.lineTo(r[u++],r[u++]);break;case gu.curveTo:c.bezierCurveTo(r[u++],r[u++],r[u++],r[u++],r[u++],r[u++]);break;case gu.closePath:c.closePath();break;default:Ct(`Unrecognized drawing path operator: ${r[u-1]}`);break}r=c}mt.axialAlignedBoundingBox(a,ye(this.ctx),this.current.minMax),this[t](r)}closePath(){this.ctx.closePath()}stroke(t,i=!0){const a=this.ctx,r=this.current.strokeColor;if(a.globalAlpha=this.current.strokeAlpha,this.contentVisible)if(typeof r=="object"&&r?.getPattern){const c=r.isModifyingCurrentTransform()?a.getTransform():null;if(a.save(),a.strokeStyle=r.getPattern(a,this,xi(a),qe.STROKE),c){const u=new Path2D;u.addPath(t,a.getTransform().invertSelf().multiplySelf(c)),t=u}this.rescaleAndStroke(t,!1),a.restore()}else this.rescaleAndStroke(t,!0);i&&this.consumePath(t,this.current.getClippedPathBoundingBox(qe.STROKE,ye(this.ctx))),a.globalAlpha=this.current.fillAlpha}closeStroke(t){this.stroke(t)}fill(t,i=!0){const a=this.ctx,r=this.current.fillColor,c=this.current.patternFill;let u=!1;if(c){const p=r.isModifyingCurrentTransform()?a.getTransform():null;if(a.save(),a.fillStyle=r.getPattern(a,this,xi(a),qe.FILL),p){const m=new Path2D;m.addPath(t,a.getTransform().invertSelf().multiplySelf(p)),t=m}u=!0}const h=this.current.getClippedPathBoundingBox();this.contentVisible&&h!==null&&(this.pendingEOFill?(a.fill(t,"evenodd"),this.pendingEOFill=!1):a.fill(t)),u&&a.restore(),i&&this.consumePath(t,h)}eoFill(t){this.pendingEOFill=!0,this.fill(t)}fillStroke(t){this.fill(t,!1),this.stroke(t,!1),this.consumePath(t)}eoFillStroke(t){this.pendingEOFill=!0,this.fillStroke(t)}closeFillStroke(t){this.fillStroke(t)}closeEOFillStroke(t){this.pendingEOFill=!0,this.fillStroke(t)}endPath(t){this.consumePath(t)}rawFillPath(t){this.ctx.fill(t)}clip(){this.pendingClip=nO}eoClip(){this.pendingClip=v0}beginText(){this.current.textMatrix=null,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}endText(){const t=this.pendingTextPaths,i=this.ctx;if(t===void 0)return;const a=new Path2D,r=i.getTransform().invertSelf();for(const{transform:c,x:u,y:h,fontSize:p,path:m}of t)m&&a.addPath(m,new DOMMatrix(c).preMultiplySelf(r).translate(u,h).scale(p,-p));i.clip(a),delete this.pendingTextPaths}setCharSpacing(t){this.current.charSpacing=t}setWordSpacing(t){this.current.wordSpacing=t}setHScale(t){this.current.textHScale=t/100}setLeading(t){this.current.leading=-t}setFont(t,i){const a=this.commonObjs.get(t),r=this.current;if(!a)throw new Error(`Can't find font for ${t}`);if(r.fontMatrix=a.fontMatrix||Mf,(r.fontMatrix[0]===0||r.fontMatrix[3]===0)&&Ct("Invalid font matrix for font "+t),i<0?(i=-i,r.fontDirection=-1):r.fontDirection=1,this.current.font=a,this.current.fontSize=i,a.isType3Font)return;const c=a.loadedName||"sans-serif",u=a.systemFontInfo?.css||`"${c}", ${a.fallbackName}`;let h="normal";a.black?h="900":a.bold&&(h="bold");const p=a.italic?"italic":"normal";let m=i;i<h0?m=h0:i>f0&&(m=f0),this.current.fontSizeScale=i/m,this.ctx.font=`${p} ${h} ${m}px ${u}`}setTextRenderingMode(t){this.current.textRenderingMode=t}setTextRise(t){this.current.textRise=t}moveText(t,i){this.current.x=this.current.lineX+=t,this.current.y=this.current.lineY+=i}setLeadingMoveText(t,i){this.setLeading(-i),this.moveText(t,i)}setTextMatrix(t){const{current:i}=this;i.textMatrix=t,i.textMatrixScale=Math.hypot(t[0],t[1]),i.x=i.lineX=0,i.y=i.lineY=0}nextLine(){this.moveText(0,this.current.leading)}#n(t,i,a){const r=new Path2D;return r.addPath(t,new DOMMatrix(a).invertSelf().multiplySelf(i)),r}paintChar(t,i,a,r,c){const u=this.ctx,h=this.current,p=h.font,m=h.textRenderingMode,g=h.fontSize/h.fontSizeScale,y=m&sn.FILL_STROKE_MASK,b=!!(m&sn.ADD_TO_PATH_FLAG),S=h.patternFill&&!p.missingFile,A=h.patternStroke&&!p.missingFile;let _;if((p.disableFontFace||b||S||A)&&!p.missingFile&&(_=p.getPathGenerator(this.commonObjs,t)),_&&(p.disableFontFace||S||A)){u.save(),u.translate(i,a),u.scale(g,-g);let R;if((y===sn.FILL||y===sn.FILL_STROKE)&&(r?(R=u.getTransform(),u.setTransform(...r),u.fill(this.#n(_,R,r))):u.fill(_)),y===sn.STROKE||y===sn.FILL_STROKE)if(c){R||=u.getTransform(),u.setTransform(...c);const{a:C,b:N,c:O,d:U}=R,I=mt.inverseTransform(c),j=mt.transform([C,N,O,U,0,0],I);mt.singularValueDecompose2dScale(j,In),u.lineWidth*=Math.max(In[0],In[1])/g,u.stroke(this.#n(_,R,c))}else u.lineWidth/=g,u.stroke(_);u.restore()}else(y===sn.FILL||y===sn.FILL_STROKE)&&u.fillText(t,i,a),(y===sn.STROKE||y===sn.FILL_STROKE)&&u.strokeText(t,i,a);b&&(this.pendingTextPaths||=[]).push({transform:ye(u),x:i,y:a,fontSize:g,path:_})}get isFontSubpixelAAEnabled(){const{context:t}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10);t.scale(1.5,1),t.fillText("I",0,10);const i=t.getImageData(0,0,10,10).data;let a=!1;for(let r=3;r<i.length;r+=4)if(i[r]>0&&i[r]<255){a=!0;break}return zt(this,"isFontSubpixelAAEnabled",a)}showText(t){const i=this.current,a=i.font;if(a.isType3Font)return this.showType3Text(t);const r=i.fontSize;if(r===0)return;const c=this.ctx,u=i.fontSizeScale,h=i.charSpacing,p=i.wordSpacing,m=i.fontDirection,g=i.textHScale*m,y=t.length,b=a.vertical,S=b?1:-1,A=a.defaultVMetrics,_=r*i.fontMatrix[0],R=i.textRenderingMode===sn.FILL&&!a.disableFontFace&&!i.patternFill;c.save(),i.textMatrix&&c.transform(...i.textMatrix),c.translate(i.x,i.y+i.textRise),m>0?c.scale(g,-1):c.scale(g,1);let C,N;if(i.patternFill){c.save();const F=i.fillColor.getPattern(c,this,xi(c),qe.FILL);C=ye(c),c.restore(),c.fillStyle=F}if(i.patternStroke){c.save();const F=i.strokeColor.getPattern(c,this,xi(c),qe.STROKE);N=ye(c),c.restore(),c.strokeStyle=F}let O=i.lineWidth;const U=i.textMatrixScale;if(U===0||O===0){const F=i.textRenderingMode&sn.FILL_STROKE_MASK;(F===sn.STROKE||F===sn.FILL_STROKE)&&(O=this.getSinglePixelWidth())}else O/=U;if(u!==1&&(c.scale(u,u),O/=u),c.lineWidth=O,a.isInvalidPDFjsFont){const F=[];let J=0;for(const X of t)F.push(X.unicode),J+=X.width;c.fillText(F.join(""),0,0),i.x+=J*_*g,c.restore(),this.compose();return}let I=0,j;for(j=0;j<y;++j){const F=t[j];if(typeof F=="number"){I+=S*F*r/1e3;continue}let J=!1;const X=(F.isSpace?p:0)+h,at=F.fontChar,K=F.accent;let lt,Et,bt=F.width;if(b){const B=F.vmetric||A,Q=-(F.vmetric?B[1]:bt*.5)*_,dt=B[2]*_;bt=B?-B[0]:bt,lt=Q/u,Et=(I+dt)/u}else lt=I/u,Et=0;if(a.remeasure&&bt>0){const B=c.measureText(at).width*1e3/r*u;if(bt<B&&this.isFontSubpixelAAEnabled){const Q=bt/B;J=!0,c.save(),c.scale(Q,1),lt/=Q}else bt!==B&&(lt+=(bt-B)/2e3*r/u)}if(this.contentVisible&&(F.isInFont||a.missingFile)){if(R&&!K)c.fillText(at,lt,Et);else if(this.paintChar(at,lt,Et,C,N),K){const B=lt+r*K.offset.x/u,Q=Et-r*K.offset.y/u;this.paintChar(K.fontChar,B,Q,C,N)}}const Gt=b?bt*_-X*m:bt*_+X*m;I+=Gt,J&&c.restore()}b?i.y-=I:i.x+=I*g,c.restore(),this.compose()}showType3Text(t){const i=this.ctx,a=this.current,r=a.font,c=a.fontSize,u=a.fontDirection,h=r.vertical?1:-1,p=a.charSpacing,m=a.wordSpacing,g=a.textHScale*u,y=a.fontMatrix||Mf,b=t.length,S=a.textRenderingMode===sn.INVISIBLE;let A,_,R,C;if(!(S||c===0)){for(this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null,i.save(),a.textMatrix&&i.transform(...a.textMatrix),i.translate(a.x,a.y+a.textRise),i.scale(g,u),A=0;A<b;++A){if(_=t[A],typeof _=="number"){C=h*_*c/1e3,this.ctx.translate(C,0),a.x+=C*g;continue}const N=(_.isSpace?m:0)+p,O=r.charProcOperatorList[_.operatorListId];O?this.contentVisible&&(this.save(),i.scale(c,c),i.transform(...y),this.executeOperatorList(O),this.restore()):Ct(`Type3 character "${_.operatorListId}" is not available.`);const U=[_.width,0];mt.applyTransform(U,y),R=U[0]*c+N,i.translate(R,0),a.x+=R*g}i.restore()}}setCharWidth(t,i){}setCharWidthAndBounds(t,i,a,r,c,u){const h=new Path2D;h.rect(a,r,c-a,u-r),this.ctx.clip(h),this.endPath()}getColorN_Pattern(t){let i;if(t[0]==="TilingPattern"){const a=this.baseTransform||ye(this.ctx),r={createCanvasGraphics:c=>new Cr(c,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:this.optionalContentConfig,markedContentStack:this.markedContentStack})};i=new Qf(t,this.ctx,r,a)}else i=this._getPattern(t[1],t[2]);return i}setStrokeColorN(){this.current.strokeColor=this.getColorN_Pattern(arguments),this.current.patternStroke=!0}setFillColorN(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0}setStrokeRGBColor(t){this.ctx.strokeStyle=this.current.strokeColor=t,this.current.patternStroke=!1}setStrokeTransparent(){this.ctx.strokeStyle=this.current.strokeColor="transparent",this.current.patternStroke=!1}setFillRGBColor(t){this.ctx.fillStyle=this.current.fillColor=t,this.current.patternFill=!1}setFillTransparent(){this.ctx.fillStyle=this.current.fillColor="transparent",this.current.patternFill=!1}_getPattern(t,i=null){let a;return this.cachedPatterns.has(t)?a=this.cachedPatterns.get(t):(a=WM(this.getObject(t)),this.cachedPatterns.set(t,a)),i&&(a.matrix=i),a}shadingFill(t){if(!this.contentVisible)return;const i=this.ctx;this.save();const a=this._getPattern(t);i.fillStyle=a.getPattern(i,this,xi(i),qe.SHADING);const r=xi(i);if(r){const{width:c,height:u}=i.canvas,h=wr.slice();mt.axialAlignedBoundingBox([0,0,c,u],r,h);const[p,m,g,y]=h;this.ctx.fillRect(p,m,g-p,y-m)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox()),this.restore()}beginInlineImage(){ie("Should not call beginInlineImage")}beginImageData(){ie("Should not call beginImageData")}paintFormXObjectBegin(t,i){if(this.contentVisible&&(this.save(),this.baseTransformStack.push(this.baseTransform),t&&this.transform(...t),this.baseTransform=ye(this.ctx),i)){mt.axialAlignedBoundingBox(i,this.baseTransform,this.current.minMax);const[a,r,c,u]=i,h=new Path2D;h.rect(a,r,c-a,u-r),this.ctx.clip(h),this.endPath()}}paintFormXObjectEnd(){this.contentVisible&&(this.restore(),this.baseTransform=this.baseTransformStack.pop())}beginGroup(t){if(!this.contentVisible)return;this.save(),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);const i=this.ctx;t.isolated||bu("TODO: Support non-isolated groups."),t.knockout&&Ct("Knockout groups not supported.");const a=ye(i);if(t.matrix&&i.transform(...t.matrix),!t.bbox)throw new Error("Bounding box is required.");let r=wr.slice();mt.axialAlignedBoundingBox(t.bbox,ye(i),r);const c=[0,0,i.canvas.width,i.canvas.height];r=mt.intersect(r,c)||[0,0,0,0];const u=Math.floor(r[0]),h=Math.floor(r[1]),p=Math.max(Math.ceil(r[2])-u,1),m=Math.max(Math.ceil(r[3])-h,1);this.current.startNewPathAndClipBox([0,0,p,m]);let g="groupAt"+this.groupLevel;t.smask&&(g+="_smask_"+this.smaskCounter++%2);const y=this.cachedCanvases.getCanvas(g,p,m),b=y.context;b.translate(-u,-h),b.transform(...a);let S=new Path2D;const[A,_,R,C]=t.bbox;if(S.rect(A,_,R-A,C-_),t.matrix){const N=new Path2D;N.addPath(S,new DOMMatrix(t.matrix)),S=N}b.clip(S),t.smask?this.smaskStack.push({canvas:y.canvas,context:b,offsetX:u,offsetY:h,subtype:t.smask.subtype,backdrop:t.smask.backdrop,transferMap:t.smask.transferMap||null,startTransformInverse:null}):(i.setTransform(1,0,0,1,0,0),i.translate(u,h),i.save()),nl(i,b),this.ctx=b,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(i),this.groupLevel++}endGroup(t){if(!this.contentVisible)return;this.groupLevel--;const i=this.ctx,a=this.groupStack.pop();if(this.ctx=a,this.ctx.imageSmoothingEnabled=!1,t.smask)this.tempSMask=this.smaskStack.pop(),this.restore();else{this.ctx.restore();const r=ye(this.ctx);this.restore(),this.ctx.save(),this.ctx.setTransform(...r);const c=wr.slice();mt.axialAlignedBoundingBox([0,0,i.canvas.width,i.canvas.height],r,c),this.ctx.drawImage(i.canvas,0,0),this.ctx.restore(),this.compose(c)}}beginAnnotation(t,i,a,r,c){if(this.#t(),xu(this.ctx),this.ctx.save(),this.save(),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),i){const u=i[2]-i[0],h=i[3]-i[1];if(c&&this.annotationCanvasMap){a=a.slice(),a[4]-=i[0],a[5]-=i[1],i=i.slice(),i[0]=i[1]=0,i[2]=u,i[3]=h,mt.singularValueDecompose2dScale(ye(this.ctx),In);const{viewportScale:p}=this,m=Math.ceil(u*this.outputScaleX*p),g=Math.ceil(h*this.outputScaleY*p);this.annotationCanvas=this.canvasFactory.create(m,g);const{canvas:y,context:b}=this.annotationCanvas;this.annotationCanvasMap.set(t,y),this.annotationCanvas.savedCtx=this.ctx,this.ctx=b,this.ctx.save(),this.ctx.setTransform(In[0],0,0,-In[1],0,h*In[1]),xu(this.ctx)}else{xu(this.ctx),this.endPath();const p=new Path2D;p.rect(i[0],i[1],u,h),this.ctx.clip(p)}}this.current=new m0(this.ctx.canvas.width,this.ctx.canvas.height),this.transform(...a),this.transform(...r)}endAnnotation(){this.annotationCanvas&&(this.ctx.restore(),this.#e(),this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}paintImageMaskXObject(t){if(!this.contentVisible)return;const i=t.count;t=this.getObject(t.data,t),t.count=i;const a=this.ctx,r=this._createMaskCanvas(t),c=r.canvas;a.save(),a.setTransform(1,0,0,1,0,0),a.drawImage(c,r.offsetX,r.offsetY),a.restore(),this.compose()}paintImageMaskXObjectRepeat(t,i,a=0,r=0,c,u){if(!this.contentVisible)return;t=this.getObject(t.data,t);const h=this.ctx;h.save();const p=ye(h);h.transform(i,a,r,c,0,0);const m=this._createMaskCanvas(t);h.setTransform(1,0,0,1,m.offsetX-p[4],m.offsetY-p[5]);for(let g=0,y=u.length;g<y;g+=2){const b=mt.transform(p,[i,a,r,c,u[g],u[g+1]]);h.drawImage(m.canvas,b[4],b[5])}h.restore(),this.compose()}paintImageMaskXObjectGroup(t){if(!this.contentVisible)return;const i=this.ctx,a=this.current.fillColor,r=this.current.patternFill;for(const c of t){const{data:u,width:h,height:p,transform:m}=c,g=this.cachedCanvases.getCanvas("maskCanvas",h,p),y=g.context;y.save();const b=this.getObject(u,c);y0(y,b),y.globalCompositeOperation="source-in",y.fillStyle=r?a.getPattern(y,this,xi(i),qe.FILL):a,y.fillRect(0,0,h,p),y.restore(),i.save(),i.transform(...m),i.scale(1,-1),Cu(i,g.canvas,0,0,h,p,0,-1,1,1),i.restore()}this.compose()}paintImageXObject(t){if(!this.contentVisible)return;const i=this.getObject(t);if(!i){Ct("Dependent image isn't ready yet");return}this.paintInlineImageXObject(i)}paintImageXObjectRepeat(t,i,a,r){if(!this.contentVisible)return;const c=this.getObject(t);if(!c){Ct("Dependent image isn't ready yet");return}const u=c.width,h=c.height,p=[];for(let m=0,g=r.length;m<g;m+=2)p.push({transform:[i,0,0,a,r[m],r[m+1]],x:0,y:0,w:u,h});this.paintInlineImageXObjectGroup(c,p)}applyTransferMapsToCanvas(t){return this.current.transferMaps!=="none"&&(t.filter=this.current.transferMaps,t.drawImage(t.canvas,0,0),t.filter="none"),t.canvas}applyTransferMapsToBitmap(t){if(this.current.transferMaps==="none")return t.bitmap;const{bitmap:i,width:a,height:r}=t,c=this.cachedCanvases.getCanvas("inlineImage",a,r),u=c.context;return u.filter=this.current.transferMaps,u.drawImage(i,0,0),u.filter="none",c.canvas}paintInlineImageXObject(t){if(!this.contentVisible)return;const i=t.width,a=t.height,r=this.ctx;this.save();const{filter:c}=r;c!=="none"&&c!==""&&(r.filter="none"),r.scale(1/i,-1/a);let u;if(t.bitmap)u=this.applyTransferMapsToBitmap(t);else if(typeof HTMLElement=="function"&&t instanceof HTMLElement||!t.data)u=t;else{const m=this.cachedCanvases.getCanvas("inlineImage",i,a).context;g0(m,t),u=this.applyTransferMapsToCanvas(m)}const h=this._scaleImage(u,xi(r));r.imageSmoothingEnabled=b0(ye(r),t.interpolate),Cu(r,h.img,0,0,h.paintWidth,h.paintHeight,0,-a,i,a),this.compose(),this.restore()}paintInlineImageXObjectGroup(t,i){if(!this.contentVisible)return;const a=this.ctx;let r;if(t.bitmap)r=t.bitmap;else{const c=t.width,u=t.height,p=this.cachedCanvases.getCanvas("inlineImage",c,u).context;g0(p,t),r=this.applyTransferMapsToCanvas(p)}for(const c of i)a.save(),a.transform(...c.transform),a.scale(1,-1),Cu(a,r,c.x,c.y,c.w,c.h,0,-1,1,1),a.restore();this.compose()}paintSolidColorImageMask(){this.contentVisible&&(this.ctx.fillRect(0,0,1,1),this.compose())}markPoint(t){}markPointProps(t,i){}beginMarkedContent(t){this.markedContentStack.push({visible:!0})}beginMarkedContentProps(t,i){t==="OC"?this.markedContentStack.push({visible:this.optionalContentConfig.isVisible(i)}):this.markedContentStack.push({visible:!0}),this.contentVisible=this.isContentVisible()}endMarkedContent(){this.markedContentStack.pop(),this.contentVisible=this.isContentVisible()}beginCompat(){}endCompat(){}consumePath(t,i){const a=this.current.isEmptyClip();this.pendingClip&&this.current.updateClipFromPath(),this.pendingClip||this.compose(i);const r=this.ctx;this.pendingClip&&(a||(this.pendingClip===v0?r.clip(t,"evenodd"):r.clip(t)),this.pendingClip=null),this.current.startNewPathAndClipBox(this.current.clipBox)}getSinglePixelWidth(){if(!this._cachedGetSinglePixelWidth){const t=ye(this.ctx);if(t[1]===0&&t[2]===0)this._cachedGetSinglePixelWidth=1/Math.min(Math.abs(t[0]),Math.abs(t[3]));else{const i=Math.abs(t[0]*t[3]-t[2]*t[1]),a=Math.hypot(t[0],t[2]),r=Math.hypot(t[1],t[3]);this._cachedGetSinglePixelWidth=Math.max(a,r)/i}}return this._cachedGetSinglePixelWidth}getScaleForStroking(){if(this._cachedScaleForStroking[0]===-1){const{lineWidth:t}=this.current,{a:i,b:a,c:r,d:c}=this.ctx.getTransform();let u,h;if(a===0&&r===0){const p=Math.abs(i),m=Math.abs(c);if(p===m)if(t===0)u=h=1/p;else{const g=p*t;u=h=g<1?1/g:1}else if(t===0)u=1/p,h=1/m;else{const g=p*t,y=m*t;u=g<1?1/g:1,h=y<1?1/y:1}}else{const p=Math.abs(i*c-a*r),m=Math.hypot(i,a),g=Math.hypot(r,c);if(t===0)u=g/p,h=m/p;else{const y=t*p;u=g>y?g/y:1,h=m>y?m/y:1}}this._cachedScaleForStroking[0]=u,this._cachedScaleForStroking[1]=h}return this._cachedScaleForStroking}rescaleAndStroke(t,i){const{ctx:a,current:{lineWidth:r}}=this,[c,u]=this.getScaleForStroking();if(c===u){a.lineWidth=(r||1)*c,a.stroke(t);return}const h=a.getLineDash();i&&a.save(),a.scale(c,u),Kf.a=1/c,Kf.d=1/u;const p=new Path2D;if(p.addPath(t,Kf),h.length>0){const m=Math.max(c,u);a.setLineDash(h.map(g=>g/m)),a.lineDashOffset/=m}a.lineWidth=r||1,a.stroke(p),i&&a.restore()}isContentVisible(){for(let t=this.markedContentStack.length-1;t>=0;t--)if(!this.markedContentStack[t].visible)return!1;return!0}}for(const l in mu)Cr.prototype[l]!==void 0&&(Cr.prototype[mu[l]]=Cr.prototype[l]);class xr{static#t=null;static#e="";static get workerPort(){return this.#t}static set workerPort(t){if(!(typeof Worker<"u"&&t instanceof Worker)&&t!==null)throw new Error("Invalid `workerPort` type.");this.#t=t}static get workerSrc(){return this.#e}static set workerSrc(t){if(typeof t!="string")throw new Error("Invalid `workerSrc` type.");this.#e=t}}class iO{#t;#e;constructor({parsedData:t,rawData:i}){this.#t=t,this.#e=i}getRaw(){return this.#e}get(t){return this.#t.get(t)??null}[Symbol.iterator](){return this.#t.entries()}}const Rr=Symbol("INTERNAL");class sO{#t=!1;#e=!1;#n=!1;#i=!0;constructor(t,{name:i,intent:a,usage:r,rbGroups:c}){this.#t=!!(t&Ln.DISPLAY),this.#e=!!(t&Ln.PRINT),this.name=i,this.intent=a,this.usage=r,this.rbGroups=c}get visible(){if(this.#n)return this.#i;if(!this.#i)return!1;const{print:t,view:i}=this.usage;return this.#t?i?.viewState!=="OFF":this.#e?t?.printState!=="OFF":!0}_setVisible(t,i,a=!1){t!==Rr&&ie("Internal method `_setVisible` called."),this.#n=a,this.#i=i}}class aO{#t=null;#e=new Map;#n=null;#i=null;constructor(t,i=Ln.DISPLAY){if(this.renderingIntent=i,this.name=null,this.creator=null,t!==null){this.name=t.name,this.creator=t.creator,this.#i=t.order;for(const a of t.groups)this.#e.set(a.id,new sO(i,a));if(t.baseState==="OFF")for(const a of this.#e.values())a._setVisible(Rr,!1);for(const a of t.on)this.#e.get(a)._setVisible(Rr,!0);for(const a of t.off)this.#e.get(a)._setVisible(Rr,!1);this.#n=this.getHash()}}#a(t){const i=t.length;if(i<2)return!0;const a=t[0];for(let r=1;r<i;r++){const c=t[r];let u;if(Array.isArray(c))u=this.#a(c);else if(this.#e.has(c))u=this.#e.get(c).visible;else return Ct(`Optional content group not found: ${c}`),!0;switch(a){case"And":if(!u)return!1;break;case"Or":if(u)return!0;break;case"Not":return!u;default:return!0}}return a==="And"}isVisible(t){if(this.#e.size===0)return!0;if(!t)return bu("Optional content group not defined."),!0;if(t.type==="OCG")return this.#e.has(t.id)?this.#e.get(t.id).visible:(Ct(`Optional content group not found: ${t.id}`),!0);if(t.type==="OCMD"){if(t.expression)return this.#a(t.expression);if(!t.policy||t.policy==="AnyOn"){for(const i of t.ids){if(!this.#e.has(i))return Ct(`Optional content group not found: ${i}`),!0;if(this.#e.get(i).visible)return!0}return!1}else if(t.policy==="AllOn"){for(const i of t.ids){if(!this.#e.has(i))return Ct(`Optional content group not found: ${i}`),!0;if(!this.#e.get(i).visible)return!1}return!0}else if(t.policy==="AnyOff"){for(const i of t.ids){if(!this.#e.has(i))return Ct(`Optional content group not found: ${i}`),!0;if(!this.#e.get(i).visible)return!0}return!1}else if(t.policy==="AllOff"){for(const i of t.ids){if(!this.#e.has(i))return Ct(`Optional content group not found: ${i}`),!0;if(this.#e.get(i).visible)return!1}return!0}return Ct(`Unknown optional content policy ${t.policy}.`),!0}return Ct(`Unknown group type ${t.type}.`),!0}setVisibility(t,i=!0,a=!0){const r=this.#e.get(t);if(!r){Ct(`Optional content group not found: ${t}`);return}if(a&&i&&r.rbGroups.length)for(const c of r.rbGroups)for(const u of c)u!==t&&this.#e.get(u)?._setVisible(Rr,!1,!0);r._setVisible(Rr,!!i,!0),this.#t=null}setOCGState({state:t,preserveRB:i}){let a;for(const r of t){switch(r){case"ON":case"OFF":case"Toggle":a=r;continue}const c=this.#e.get(r);if(c)switch(a){case"ON":this.setVisibility(r,!0,i);break;case"OFF":this.setVisibility(r,!1,i);break;case"Toggle":this.setVisibility(r,!c.visible,i);break}}this.#t=null}get hasInitialVisibility(){return this.#n===null||this.getHash()===this.#n}getOrder(){return this.#e.size?this.#i?this.#i.slice():[...this.#e.keys()]:null}getGroup(t){return this.#e.get(t)||null}getHash(){if(this.#t!==null)return this.#t;const t=new t0;for(const[i,a]of this.#e)t.update(`${i}:${a.visible}`);return this.#t=t.hexdigest()}[Symbol.iterator](){return this.#e.entries()}}class rO{constructor(t,{disableRange:i=!1,disableStream:a=!1}){Me(t,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.');const{length:r,initialData:c,progressiveDone:u,contentDispositionFilename:h}=t;if(this._queuedChunks=[],this._progressiveDone=u,this._contentDispositionFilename=h,c?.length>0){const p=c instanceof Uint8Array&&c.byteLength===c.buffer.byteLength?c.buffer:new Uint8Array(c).buffer;this._queuedChunks.push(p)}this._pdfDataRangeTransport=t,this._isStreamingSupported=!a,this._isRangeSupported=!i,this._contentLength=r,this._fullRequestReader=null,this._rangeReaders=[],t.addRangeListener((p,m)=>{this._onReceiveData({begin:p,chunk:m})}),t.addProgressListener((p,m)=>{this._onProgress({loaded:p,total:m})}),t.addProgressiveReadListener(p=>{this._onReceiveData({chunk:p})}),t.addProgressiveDoneListener(()=>{this._onProgressiveDone()}),t.transportReady()}_onReceiveData({begin:t,chunk:i}){const a=i instanceof Uint8Array&&i.byteLength===i.buffer.byteLength?i.buffer:new Uint8Array(i).buffer;if(t===void 0)this._fullRequestReader?this._fullRequestReader._enqueue(a):this._queuedChunks.push(a);else{const r=this._rangeReaders.some(function(c){return c._begin!==t?!1:(c._enqueue(a),!0)});Me(r,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}_onProgress(t){t.total===void 0?this._rangeReaders[0]?.onProgress?.({loaded:t.loaded}):this._fullRequestReader?.onProgress?.({loaded:t.loaded,total:t.total})}_onProgressiveDone(){this._fullRequestReader?.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(t){const i=this._rangeReaders.indexOf(t);i>=0&&this._rangeReaders.splice(i,1)}getFullReader(){Me(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");const t=this._queuedChunks;return this._queuedChunks=null,new oO(this,t,this._progressiveDone,this._contentDispositionFilename)}getRangeReader(t,i){if(i<=this._progressiveDataLength)return null;const a=new lO(this,t,i);return this._pdfDataRangeTransport.requestDataRange(t,i),this._rangeReaders.push(a),a}cancelAllRequests(t){this._fullRequestReader?.cancel(t);for(const i of this._rangeReaders.slice(0))i.cancel(t);this._pdfDataRangeTransport.abort()}}class oO{constructor(t,i,a=!1,r=null){this._stream=t,this._done=a||!1,this._filename=zf(r)?r:null,this._queuedChunks=i||[],this._loaded=0;for(const c of this._queuedChunks)this._loaded+=c.byteLength;this._requests=[],this._headersReady=Promise.resolve(),t._fullRequestReader=this,this.onProgress=null}_enqueue(t){this._done||(this._requests.length>0?this._requests.shift().resolve({value:t,done:!1}):this._queuedChunks.push(t),this._loaded+=t.byteLength)}get headersReady(){return this._headersReady}get filename(){return this._filename}get isRangeSupported(){return this._stream._isRangeSupported}get isStreamingSupported(){return this._stream._isStreamingSupported}get contentLength(){return this._stream._contentLength}async read(){if(this._queuedChunks.length>0)return{value:this._queuedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const t=Promise.withResolvers();return this._requests.push(t),t.promise}cancel(t){this._done=!0;for(const i of this._requests)i.resolve({value:void 0,done:!0});this._requests.length=0}progressiveDone(){this._done||(this._done=!0)}}class lO{constructor(t,i,a){this._stream=t,this._begin=i,this._end=a,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(t){if(!this._done){if(this._requests.length===0)this._queuedChunk=t;else{this._requests.shift().resolve({value:t,done:!1});for(const a of this._requests)a.resolve({value:void 0,done:!0});this._requests.length=0}this._done=!0,this._stream._removeRangeReader(this)}}get isStreamingSupported(){return!1}async read(){if(this._queuedChunk){const i=this._queuedChunk;return this._queuedChunk=null,{value:i,done:!1}}if(this._done)return{value:void 0,done:!0};const t=Promise.withResolvers();return this._requests.push(t),t.promise}cancel(t){this._done=!0;for(const i of this._requests)i.resolve({value:void 0,done:!0});this._requests.length=0,this._stream._removeRangeReader(this)}}function cO(l){let t=!0,i=a("filename\\*","i").exec(l);if(i){i=i[1];let g=h(i);return g=unescape(g),g=p(g),g=m(g),c(g)}if(i=u(l),i){const g=m(i);return c(g)}if(i=a("filename","i").exec(l),i){i=i[1];let g=h(i);return g=m(g),c(g)}function a(g,y){return new RegExp("(?:^|;)\\s*"+g+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',y)}function r(g,y){if(g){if(!/^[\x00-\xFF]+$/.test(y))return y;try{const b=new TextDecoder(g,{fatal:!0}),S=Wo(y);y=b.decode(S),t=!1}catch{}}return y}function c(g){return t&&/[\x80-\xff]/.test(g)&&(g=r("utf-8",g),t&&(g=r("iso-8859-1",g))),g}function u(g){const y=[];let b;const S=a("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;(b=S.exec(g))!==null;){let[,_,R,C]=b;if(_=parseInt(_,10),_ in y){if(_===0)break;continue}y[_]=[R,C]}const A=[];for(let _=0;_<y.length&&_ in y;++_){let[R,C]=y[_];C=h(C),R&&(C=unescape(C),_===0&&(C=p(C))),A.push(C)}return A.join("")}function h(g){if(g.startsWith('"')){const y=g.slice(1).split('\\"');for(let b=0;b<y.length;++b){const S=y[b].indexOf('"');S!==-1&&(y[b]=y[b].slice(0,S),y.length=b+1),y[b]=y[b].replaceAll(/\\(.)/g,"$1")}g=y.join('"')}return g}function p(g){const y=g.indexOf("'");if(y===-1)return g;const b=g.slice(0,y),A=g.slice(y+1).replace(/^[^']*'/,"");return r(b,A)}function m(g){return!g.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(g)?g:g.replaceAll(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,function(y,b,S,A){if(S==="q"||S==="Q")return A=A.replaceAll("_"," "),A=A.replaceAll(/=([0-9a-fA-F]{2})/g,function(_,R){return String.fromCharCode(parseInt(R,16))}),r(b,A);try{A=atob(A)}catch{}return r(b,A)})}return""}function S0(l,t){const i=new Headers;if(!l||!t||typeof t!="object")return i;for(const a in t){const r=t[a];r!==void 0&&i.append(a,r)}return i}function Ru(l){return URL.parse(l)?.origin??null}function E0({responseHeaders:l,isHttp:t,rangeChunkSize:i,disableRange:a}){const r={allowRangeRequests:!1,suggestedLength:void 0},c=parseInt(l.get("Content-Length"),10);return!Number.isInteger(c)||(r.suggestedLength=c,c<=2*i)||a||!t||l.get("Accept-Ranges")!=="bytes"||(l.get("Content-Encoding")||"identity")!=="identity"||(r.allowRangeRequests=!0),r}function A0(l){const t=l.get("Content-Disposition");if(t){let i=cO(t);if(i.includes("%"))try{i=decodeURIComponent(i)}catch{}if(zf(i))return i}return null}function il(l,t){return new vu(`Unexpected server response (${l}) while retrieving PDF "${t}".`,l,l===404||l===0&&t.startsWith("file:"))}function _0(l){return l===200||l===206}function T0(l,t,i){return{method:"GET",headers:l,signal:i.signal,mode:"cors",credentials:t?"include":"same-origin",redirect:"follow"}}function w0(l){return l instanceof Uint8Array?l.buffer:l instanceof ArrayBuffer?l:(Ct(`getArrayBuffer - unexpected data format: ${l}`),new Uint8Array(l).buffer)}class uO{_responseOrigin=null;constructor(t){this.source=t,this.isHttp=/^https?:/i.test(t.url),this.headers=S0(this.isHttp,t.httpHeaders),this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}getFullReader(){return Me(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new dO(this),this._fullRequestReader}getRangeReader(t,i){if(i<=this._progressiveDataLength)return null;const a=new hO(this,t,i);return this._rangeRequestReaders.push(a),a}cancelAllRequests(t){this._fullRequestReader?.cancel(t);for(const i of this._rangeRequestReaders.slice(0))i.cancel(t)}}class dO{constructor(t){this._stream=t,this._reader=null,this._loaded=0,this._filename=null;const i=t.source;this._withCredentials=i.withCredentials||!1,this._contentLength=i.length,this._headersCapability=Promise.withResolvers(),this._disableRange=i.disableRange||!1,this._rangeChunkSize=i.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._abortController=new AbortController,this._isStreamingSupported=!i.disableStream,this._isRangeSupported=!i.disableRange;const a=new Headers(t.headers),r=i.url;fetch(r,T0(a,this._withCredentials,this._abortController)).then(c=>{if(t._responseOrigin=Ru(c.url),!_0(c.status))throw il(c.status,r);this._reader=c.body.getReader(),this._headersCapability.resolve();const u=c.headers,{allowRangeRequests:h,suggestedLength:p}=E0({responseHeaders:u,isHttp:t.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=h,this._contentLength=p||this._contentLength,this._filename=A0(u),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new Ps("Streaming is disabled."))}).catch(this._headersCapability.reject),this.onProgress=null}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._headersCapability.promise;const{value:t,done:i}=await this._reader.read();return i?{value:t,done:i}:(this._loaded+=t.byteLength,this.onProgress?.({loaded:this._loaded,total:this._contentLength}),{value:w0(t),done:!1})}cancel(t){this._reader?.cancel(t),this._abortController.abort()}}class hO{constructor(t,i,a){this._stream=t,this._reader=null,this._loaded=0;const r=t.source;this._withCredentials=r.withCredentials||!1,this._readCapability=Promise.withResolvers(),this._isStreamingSupported=!r.disableStream,this._abortController=new AbortController;const c=new Headers(t.headers);c.append("Range",`bytes=${i}-${a-1}`);const u=r.url;fetch(u,T0(c,this._withCredentials,this._abortController)).then(h=>{const p=Ru(h.url);if(p!==t._responseOrigin)throw new Error(`Expected range response-origin "${p}" to match "${t._responseOrigin}".`);if(!_0(h.status))throw il(h.status,u);this._readCapability.resolve(),this._reader=h.body.getReader()}).catch(this._readCapability.reject),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._readCapability.promise;const{value:t,done:i}=await this._reader.read();return i?{value:t,done:i}:(this._loaded+=t.byteLength,this.onProgress?.({loaded:this._loaded}),{value:w0(t),done:!1})}cancel(t){this._reader?.cancel(t),this._abortController.abort()}}const Zf=200,Jf=206;function fO(l){const t=l.response;return typeof t!="string"?t:Wo(t).buffer}class pO{_responseOrigin=null;constructor({url:t,httpHeaders:i,withCredentials:a}){this.url=t,this.isHttp=/^https?:/i.test(t),this.headers=S0(this.isHttp,i),this.withCredentials=a||!1,this.currXhrId=0,this.pendingRequests=Object.create(null)}request(t){const i=new XMLHttpRequest,a=this.currXhrId++,r=this.pendingRequests[a]={xhr:i};i.open("GET",this.url),i.withCredentials=this.withCredentials;for(const[c,u]of this.headers)i.setRequestHeader(c,u);return this.isHttp&&"begin"in t&&"end"in t?(i.setRequestHeader("Range",`bytes=${t.begin}-${t.end-1}`),r.expectedStatus=Jf):r.expectedStatus=Zf,i.responseType="arraybuffer",Me(t.onError,"Expected `onError` callback to be provided."),i.onerror=()=>{t.onError(i.status)},i.onreadystatechange=this.onStateChange.bind(this,a),i.onprogress=this.onProgress.bind(this,a),r.onHeadersReceived=t.onHeadersReceived,r.onDone=t.onDone,r.onError=t.onError,r.onProgress=t.onProgress,i.send(null),a}onProgress(t,i){const a=this.pendingRequests[t];a&&a.onProgress?.(i)}onStateChange(t,i){const a=this.pendingRequests[t];if(!a)return;const r=a.xhr;if(r.readyState>=2&&a.onHeadersReceived&&(a.onHeadersReceived(),delete a.onHeadersReceived),r.readyState!==4||!(t in this.pendingRequests))return;if(delete this.pendingRequests[t],r.status===0&&this.isHttp){a.onError(r.status);return}const c=r.status||Zf;if(!(c===Zf&&a.expectedStatus===Jf)&&c!==a.expectedStatus){a.onError(r.status);return}const h=fO(r);if(c===Jf){const p=r.getResponseHeader("Content-Range"),m=/bytes (\d+)-(\d+)\/(\d+)/.exec(p);m?a.onDone({begin:parseInt(m[1],10),chunk:h}):(Ct('Missing or invalid "Content-Range" header.'),a.onError(0))}else h?a.onDone({begin:0,chunk:h}):a.onError(r.status)}getRequestXhr(t){return this.pendingRequests[t].xhr}isPendingRequest(t){return t in this.pendingRequests}abortRequest(t){const i=this.pendingRequests[t].xhr;delete this.pendingRequests[t],i.abort()}}class mO{constructor(t){this._source=t,this._manager=new pO(t),this._rangeChunkSize=t.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(t){const i=this._rangeRequestReaders.indexOf(t);i>=0&&this._rangeRequestReaders.splice(i,1)}getFullReader(){return Me(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new gO(this._manager,this._source),this._fullRequestReader}getRangeReader(t,i){const a=new yO(this._manager,t,i);return a.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(a),a}cancelAllRequests(t){this._fullRequestReader?.cancel(t);for(const i of this._rangeRequestReaders.slice(0))i.cancel(t)}}class gO{constructor(t,i){this._manager=t,this._url=i.url,this._fullRequestId=t.request({onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)}),this._headersCapability=Promise.withResolvers(),this._disableRange=i.disableRange||!1,this._contentLength=i.length,this._rangeChunkSize=i.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!1,this._isRangeSupported=!1,this._cachedChunks=[],this._requests=[],this._done=!1,this._storedError=void 0,this._filename=null,this.onProgress=null}_onHeadersReceived(){const t=this._fullRequestId,i=this._manager.getRequestXhr(t);this._manager._responseOrigin=Ru(i.responseURL);const a=i.getAllResponseHeaders(),r=new Headers(a?a.trimStart().replace(/[^\S ]+$/,"").split(/[\r\n]+/).map(h=>{const[p,...m]=h.split(": ");return[p,m.join(": ")]}):[]),{allowRangeRequests:c,suggestedLength:u}=E0({responseHeaders:r,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});c&&(this._isRangeSupported=!0),this._contentLength=u||this._contentLength,this._filename=A0(r),this._isRangeSupported&&this._manager.abortRequest(t),this._headersCapability.resolve()}_onDone(t){if(t&&(this._requests.length>0?this._requests.shift().resolve({value:t.chunk,done:!1}):this._cachedChunks.push(t.chunk)),this._done=!0,!(this._cachedChunks.length>0)){for(const i of this._requests)i.resolve({value:void 0,done:!0});this._requests.length=0}}_onError(t){this._storedError=il(t,this._url),this._headersCapability.reject(this._storedError);for(const i of this._requests)i.reject(this._storedError);this._requests.length=0,this._cachedChunks.length=0}_onProgress(t){this.onProgress?.({loaded:t.loaded,total:t.lengthComputable?t.total:this._contentLength})}get filename(){return this._filename}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}get contentLength(){return this._contentLength}get headersReady(){return this._headersCapability.promise}async read(){if(await this._headersCapability.promise,this._storedError)throw this._storedError;if(this._cachedChunks.length>0)return{value:this._cachedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const t=Promise.withResolvers();return this._requests.push(t),t.promise}cancel(t){this._done=!0,this._headersCapability.reject(t);for(const i of this._requests)i.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}class yO{constructor(t,i,a){this._manager=t,this._url=t.url,this._requestId=t.request({begin:i,end:a,onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)}),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}_onHeadersReceived(){const t=Ru(this._manager.getRequestXhr(this._requestId)?.responseURL);t!==this._manager._responseOrigin&&(this._storedError=new Error(`Expected range response-origin "${t}" to match "${this._manager._responseOrigin}".`),this._onError(0))}_close(){this.onClosed?.(this)}_onDone(t){const i=t.chunk;this._requests.length>0?this._requests.shift().resolve({value:i,done:!1}):this._queuedChunk=i,this._done=!0;for(const a of this._requests)a.resolve({value:void 0,done:!0});this._requests.length=0,this._close()}_onError(t){this._storedError??=il(t,this._url);for(const i of this._requests)i.reject(this._storedError);this._requests.length=0,this._queuedChunk=null}_onProgress(t){this.isStreamingSupported||this.onProgress?.({loaded:t.loaded})}get isStreamingSupported(){return!1}async read(){if(this._storedError)throw this._storedError;if(this._queuedChunk!==null){const i=this._queuedChunk;return this._queuedChunk=null,{value:i,done:!1}}if(this._done)return{value:void 0,done:!0};const t=Promise.withResolvers();return this._requests.push(t),t.promise}cancel(t){this._done=!0;for(const i of this._requests)i.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}const bO=/^[a-z][a-z0-9\-+.]+:/i;function vO(l){if(bO.test(l))return new URL(l);const t=process.getBuiltinModule("url");return new URL(t.pathToFileURL(l))}class SO{constructor(t){this.source=t,this.url=vO(t.url),Me(this.url.protocol==="file:","PDFNodeStream only supports file:// URLs."),this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}getFullReader(){return Me(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=new EO(this),this._fullRequestReader}getRangeReader(t,i){if(i<=this._progressiveDataLength)return null;const a=new AO(this,t,i);return this._rangeRequestReaders.push(a),a}cancelAllRequests(t){this._fullRequestReader?.cancel(t);for(const i of this._rangeRequestReaders.slice(0))i.cancel(t)}}class EO{constructor(t){this._url=t.url,this._done=!1,this._storedError=null,this.onProgress=null;const i=t.source;this._contentLength=i.length,this._loaded=0,this._filename=null,this._disableRange=i.disableRange||!1,this._rangeChunkSize=i.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!i.disableStream,this._isRangeSupported=!i.disableRange,this._readableStream=null,this._readCapability=Promise.withResolvers(),this._headersCapability=Promise.withResolvers();const a=process.getBuiltinModule("fs");a.promises.lstat(this._url).then(r=>{this._contentLength=r.size,this._setReadableStream(a.createReadStream(this._url)),this._headersCapability.resolve()},r=>{r.code==="ENOENT"&&(r=il(0,this._url.href)),this._storedError=r,this._headersCapability.reject(r)})}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const t=this._readableStream.read();return t===null?(this._readCapability=Promise.withResolvers(),this.read()):(this._loaded+=t.length,this.onProgress?.({loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(t).buffer,done:!1})}cancel(t){if(!this._readableStream){this._error(t);return}this._readableStream.destroy(t)}_error(t){this._storedError=t,this._readCapability.resolve()}_setReadableStream(t){this._readableStream=t,t.on("readable",()=>{this._readCapability.resolve()}),t.on("end",()=>{t.destroy(),this._done=!0,this._readCapability.resolve()}),t.on("error",i=>{this._error(i)}),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new Ps("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}class AO{constructor(t,i,a){this._url=t.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=Promise.withResolvers();const r=t.source;this._isStreamingSupported=!r.disableStream;const c=process.getBuiltinModule("fs");this._setReadableStream(c.createReadStream(this._url,{start:i,end:a-1}))}get isStreamingSupported(){return this._isStreamingSupported}async read(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const t=this._readableStream.read();return t===null?(this._readCapability=Promise.withResolvers(),this.read()):(this._loaded+=t.length,this.onProgress?.({loaded:this._loaded}),{value:new Uint8Array(t).buffer,done:!1})}cancel(t){if(!this._readableStream){this._error(t);return}this._readableStream.destroy(t)}_error(t){this._storedError=t,this._readCapability.resolve()}_setReadableStream(t){this._readableStream=t,t.on("readable",()=>{this._readCapability.resolve()}),t.on("end",()=>{t.destroy(),this._done=!0,this._readCapability.resolve()}),t.on("error",i=>{this._error(i)}),this._storedError&&this._readableStream.destroy(this._storedError)}}const sl=Symbol("INITIAL_DATA");class C0{#t=Object.create(null);#e(t){return this.#t[t]||={...Promise.withResolvers(),data:sl}}get(t,i=null){if(i){const r=this.#e(t);return r.promise.then(()=>i(r.data)),null}const a=this.#t[t];if(!a||a.data===sl)throw new Error(`Requesting object that isn't resolved yet ${t}.`);return a.data}has(t){const i=this.#t[t];return!!i&&i.data!==sl}delete(t){const i=this.#t[t];return!i||i.data===sl?!1:(delete this.#t[t],!0)}resolve(t,i=null){const a=this.#e(t);a.data=i,a.resolve()}clear(){for(const t in this.#t){const{data:i}=this.#t[t];i?.bitmap?.close()}this.#t=Object.create(null)}*[Symbol.iterator](){for(const t in this.#t){const{data:i}=this.#t[t];i!==sl&&(yield[t,i])}}}const _O=1e5,x0=30;class hn{#t=Promise.withResolvers();#e=null;#n=!1;#i=!!globalThis.FontInspector?.enabled;#a=null;#s=null;#r=0;#o=0;#u=null;#c=null;#h=0;#l=0;#p=Object.create(null);#g=[];#f=null;#d=[];#m=new WeakMap;#v=null;static#y=new Map;static#E=new Map;static#A=new WeakMap;static#b=null;static#T=new Set;constructor({textContentSource:t,container:i,viewport:a}){if(t instanceof ReadableStream)this.#f=t;else if(typeof t=="object")this.#f=new ReadableStream({start(p){p.enqueue(t),p.close()}});else throw new Error('No "textContentSource" parameter specified.');this.#e=this.#c=i,this.#l=a.scale*Ri.pixelRatio,this.#h=a.rotation,this.#s={div:null,properties:null,ctx:null};const{pageWidth:r,pageHeight:c,pageX:u,pageY:h}=a.rawDims;this.#v=[1,0,0,-1,-u,h+c],this.#o=r,this.#r=c,hn.#C(),_a(i,a),this.#t.promise.finally(()=>{hn.#T.delete(this),this.#s=null,this.#p=null}).catch(()=>{})}static get fontFamilyMap(){const{isWindows:t,isFirefox:i}=Ve.platform;return zt(this,"fontFamilyMap",new Map([["sans-serif",`${t&&i?"Calibri, ":""}sans-serif`],["monospace",`${t&&i?"Lucida Console, ":""}monospace`]]))}render(){const t=()=>{this.#u.read().then(({value:i,done:a})=>{if(a){this.#t.resolve();return}this.#a??=i.lang,Object.assign(this.#p,i.styles),this.#D(i.items),t()},this.#t.reject)};return this.#u=this.#f.getReader(),hn.#T.add(this),t(),this.#t.promise}update({viewport:t,onBefore:i=null}){const a=t.scale*Ri.pixelRatio,r=t.rotation;if(r!==this.#h&&(i?.(),this.#h=r,_a(this.#c,{rotation:r})),a!==this.#l){i?.(),this.#l=a;const c={div:null,properties:null,ctx:hn.#R(this.#a)};for(const u of this.#d)c.properties=this.#m.get(u),c.div=u,this.#M(c)}}cancel(){const t=new Ps("TextLayer task cancelled.");this.#u?.cancel(t).catch(()=>{}),this.#u=null,this.#t.reject(t)}get textDivs(){return this.#d}get textContentItemsStr(){return this.#g}#D(t){if(this.#n)return;this.#s.ctx??=hn.#R(this.#a);const i=this.#d,a=this.#g;for(const r of t){if(i.length>_O){Ct("Ignoring additional textDivs for performance reasons."),this.#n=!0;return}if(r.str===void 0){if(r.type==="beginMarkedContentProps"||r.type==="beginMarkedContent"){const c=this.#e;this.#e=document.createElement("span"),this.#e.classList.add("markedContent"),r.id&&this.#e.setAttribute("id",`${r.id}`),c.append(this.#e)}else r.type==="endMarkedContent"&&(this.#e=this.#e.parentNode);continue}a.push(r.str),this.#_(r)}}#_(t){const i=document.createElement("span"),a={angle:0,canvasWidth:0,hasText:t.str!=="",hasEOL:t.hasEOL,fontSize:0};this.#d.push(i);const r=mt.transform(this.#v,t.transform);let c=Math.atan2(r[1],r[0]);const u=this.#p[t.fontName];u.vertical&&(c+=Math.PI/2);let h=this.#i&&u.fontSubstitution||u.fontFamily;h=hn.fontFamilyMap.get(h)||h;const p=Math.hypot(r[2],r[3]),m=p*hn.#k(h,u,this.#a);let g,y;c===0?(g=r[4],y=r[5]-m):(g=r[4]+m*Math.sin(c),y=r[5]-m*Math.cos(c));const b="calc(var(--total-scale-factor) *",S=i.style;this.#e===this.#c?(S.left=`${(100*g/this.#o).toFixed(2)}%`,S.top=`${(100*y/this.#r).toFixed(2)}%`):(S.left=`${b}${g.toFixed(2)}px)`,S.top=`${b}${y.toFixed(2)}px)`),S.fontSize=`${b}${(hn.#b*p).toFixed(2)}px)`,S.fontFamily=h,a.fontSize=p,i.setAttribute("role","presentation"),i.textContent=t.str,i.dir=t.dir,this.#i&&(i.dataset.fontName=u.fontSubstitutionLoadedName||t.fontName),c!==0&&(a.angle=c*(180/Math.PI));let A=!1;if(t.str.length>1)A=!0;else if(t.str!==" "&&t.transform[0]!==t.transform[3]){const _=Math.abs(t.transform[0]),R=Math.abs(t.transform[3]);_!==R&&Math.max(_,R)/Math.min(_,R)>1.5&&(A=!0)}if(A&&(a.canvasWidth=u.vertical?t.height:t.width),this.#m.set(i,a),this.#s.div=i,this.#s.properties=a,this.#M(this.#s),a.hasText&&this.#e.append(i),a.hasEOL){const _=document.createElement("br");_.setAttribute("role","presentation"),this.#e.append(_)}}#M(t){const{div:i,properties:a,ctx:r}=t,{style:c}=i;let u="";if(hn.#b>1&&(u=`scale(${1/hn.#b})`),a.canvasWidth!==0&&a.hasText){const{fontFamily:h}=c,{canvasWidth:p,fontSize:m}=a;hn.#x(r,m*this.#l,h);const{width:g}=r.measureText(i.textContent);g>0&&(u=`scaleX(${p*this.#l/g}) ${u}`)}a.angle!==0&&(u=`rotate(${a.angle}deg) ${u}`),u.length>0&&(c.transform=u)}static cleanup(){if(!(this.#T.size>0)){this.#y.clear();for(const{canvas:t}of this.#E.values())t.remove();this.#E.clear()}}static#R(t=null){let i=this.#E.get(t||="");if(!i){const a=document.createElement("canvas");a.className="hiddenCanvasElement",a.lang=t,document.body.append(a),i=a.getContext("2d",{alpha:!1,willReadFrequently:!0}),this.#E.set(t,i),this.#A.set(i,{size:0,family:""})}return i}static#x(t,i,a){const r=this.#A.get(t);i===r.size&&a===r.family||(t.font=`${i}px ${a}`,r.size=i,r.family=a)}static#C(){if(this.#b!==null)return;const t=document.createElement("div");t.style.opacity=0,t.style.lineHeight=1,t.style.fontSize="1px",t.style.position="absolute",t.textContent="X",document.body.append(t),this.#b=t.getBoundingClientRect().height,t.remove()}static#k(t,i,a){const r=this.#y.get(t);if(r)return r;const c=this.#R(a);c.canvas.width=c.canvas.height=x0,this.#x(c,x0,t);const u=c.measureText(""),h=u.fontBoundingBoxAscent,p=Math.abs(u.fontBoundingBoxDescent);c.canvas.width=c.canvas.height=0;let m=.8;return h?m=h/(h+p):(Ve.platform.isFirefox&&Ct("Enable the `dom.textMetrics.fontBoundingBox.enabled` preference in `about:config` to improve TextLayer rendering."),i.ascent?m=i.ascent:i.descent&&(m=1+i.descent)),this.#y.set(t,m),m}}class al{static textContent(t){const i=[],a={items:i,styles:Object.create(null)};function r(c){if(!c)return;let u=null;const h=c.name;if(h==="#text")u=c.value;else if(al.shouldBuildText(h))c?.attributes?.textContent?u=c.attributes.textContent:c.value&&(u=c.value);else return;if(u!==null&&i.push({str:u}),!!c.children)for(const p of c.children)r(p)}return r(t),a}static shouldBuildText(t){return!(t==="textarea"||t==="input"||t==="option"||t==="select")}}const TO=100;function R0(l={}){typeof l=="string"||l instanceof URL?l={url:l}:(l instanceof ArrayBuffer||ArrayBuffer.isView(l))&&(l={data:l});const t=new tp,{docId:i}=t,a=l.url?NM(l.url):null,r=l.data?LM(l.data):null,c=l.httpHeaders||null,u=l.withCredentials===!0,h=l.password??null,p=l.range instanceof D0?l.range:null,m=Number.isInteger(l.rangeChunkSize)&&l.rangeChunkSize>0?l.rangeChunkSize:2**16;let g=l.worker instanceof rl?l.worker:null;const y=l.verbosity,b=typeof l.docBaseUrl=="string"&&!Su(l.docBaseUrl)?l.docBaseUrl:null,S=Tu(l.cMapUrl),A=l.cMapPacked!==!1,_=l.CMapReaderFactory||(un?jM:a0),R=Tu(l.iccUrl),C=Tu(l.standardFontDataUrl),N=l.StandardFontDataFactory||(un?$M:l0),O=Tu(l.wasmUrl),U=l.WasmFactory||(un?GM:u0),I=l.stopAtErrors!==!0,j=Number.isInteger(l.maxImageSize)&&l.maxImageSize>-1?l.maxImageSize:-1,F=l.isEvalSupported!==!1,J=typeof l.isOffscreenCanvasSupported=="boolean"?l.isOffscreenCanvasSupported:!un,X=typeof l.isImageDecoderSupported=="boolean"?l.isImageDecoderSupported:!un&&(Ve.platform.isFirefox||!globalThis.chrome),at=Number.isInteger(l.canvasMaxAreaInBytes)?l.canvasMaxAreaInBytes:-1,K=typeof l.disableFontFace=="boolean"?l.disableFontFace:un,lt=l.fontExtraProperties===!0,Et=l.enableXfa===!0,bt=l.ownerDocument||globalThis.document,Gt=l.disableRange===!0,B=l.disableStream===!0,Q=l.disableAutoFetch===!0,dt=l.pdfBug===!0,xt=l.CanvasFactory||(un?FM:zM),W=l.FilterFactory||(un?BM:HM),ht=l.enableHWA===!0,st=l.useWasm!==!1,vt=p?p.length:l.length??NaN,Zt=typeof l.useSystemFonts=="boolean"?l.useSystemFonts:!un&&!K,oe=typeof l.useWorkerFetch=="boolean"?l.useWorkerFetch:!!(_===a0&&N===l0&&U===u0&&S&&C&&O&&Zo(S,document.baseURI)&&Zo(C,document.baseURI)&&Zo(O,document.baseURI)),tt=null;dM(y);const Wt={canvasFactory:new xt({ownerDocument:bt,enableHWA:ht}),filterFactory:new W({docId:i,ownerDocument:bt}),cMapReaderFactory:oe?null:new _({baseUrl:S,isCompressed:A}),standardFontDataFactory:oe?null:new N({baseUrl:C}),wasmFactory:oe?null:new U({baseUrl:O})};g||(g=rl.create({verbosity:y,port:xr.workerPort}),t._worker=g);const Vt={docId:i,apiVersion:"5.4.54",data:r,password:h,disableAutoFetch:Q,rangeChunkSize:m,length:vt,docBaseUrl:b,enableXfa:Et,evaluatorOptions:{maxImageSize:j,disableFontFace:K,ignoreErrors:I,isEvalSupported:F,isOffscreenCanvasSupported:J,isImageDecoderSupported:X,canvasMaxAreaInBytes:at,fontExtraProperties:lt,useSystemFonts:Zt,useWasm:st,useWorkerFetch:oe,cMapUrl:S,iccUrl:R,standardFontDataUrl:C,wasmUrl:O}},be={ownerDocument:bt,pdfBug:dt,styleElement:tt,loadingParams:{disableAutoFetch:Q,enableXfa:Et}};return g.promise.then(function(){if(t.destroyed)throw new Error("Loading aborted");if(g.destroyed)throw new Error("Worker was destroyed");const Xe=g.messageHandler.sendWithPromise("GetDocRequest",Vt,r?[r.buffer]:null);let Tn;if(p)Tn=new rO(p,{disableRange:Gt,disableStream:B});else if(!r){if(!a)throw new Error("getDocument - no `url` parameter provided.");const mi=Zo(a)?uO:un?SO:mO;Tn=new mi({url:a,length:vt,httpHeaders:c,withCredentials:u,rangeChunkSize:m,disableRange:Gt,disableStream:B})}return Xe.then(mi=>{if(t.destroyed)throw new Error("Loading aborted");if(g.destroyed)throw new Error("Worker was destroyed");const Pn=new el(i,mi,g.port),is=new xO(Pn,t,Tn,be,Wt,ht);t._transport=is,Pn.send("Ready",null)})}).catch(t._capability.reject),t}class tp{static#t=0;_capability=Promise.withResolvers();_transport=null;_worker=null;docId=`d${tp.#t++}`;destroyed=!1;onPassword=null;onProgress=null;get promise(){return this._capability.promise}async destroy(){this.destroyed=!0;try{this._worker?.port&&(this._worker._pendingDestroy=!0),await this._transport?.destroy()}catch(t){throw this._worker?.port&&delete this._worker._pendingDestroy,t}this._transport=null,this._worker?.destroy(),this._worker=null}async getData(){return this._transport.getData()}}class D0{#t=Promise.withResolvers();#e=[];#n=[];#i=[];#a=[];constructor(t,i,a=!1,r=null){this.length=t,this.initialData=i,this.progressiveDone=a,this.contentDispositionFilename=r}addRangeListener(t){this.#a.push(t)}addProgressListener(t){this.#i.push(t)}addProgressiveReadListener(t){this.#n.push(t)}addProgressiveDoneListener(t){this.#e.push(t)}onDataRange(t,i){for(const a of this.#a)a(t,i)}onDataProgress(t,i){this.#t.promise.then(()=>{for(const a of this.#i)a(t,i)})}onDataProgressiveRead(t){this.#t.promise.then(()=>{for(const i of this.#n)i(t)})}onDataProgressiveDone(){this.#t.promise.then(()=>{for(const t of this.#e)t()})}transportReady(){this.#t.resolve()}requestDataRange(t,i){ie("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}class wO{constructor(t,i){this._pdfInfo=t,this._transport=i}get annotationStorage(){return this._transport.annotationStorage}get canvasFactory(){return this._transport.canvasFactory}get filterFactory(){return this._transport.filterFactory}get numPages(){return this._pdfInfo.numPages}get fingerprints(){return this._pdfInfo.fingerprints}get isPureXfa(){return zt(this,"isPureXfa",!!this._transport._htmlForXfa)}get allXfaHtml(){return this._transport._htmlForXfa}getPage(t){return this._transport.getPage(t)}getPageIndex(t){return this._transport.getPageIndex(t)}getDestinations(){return this._transport.getDestinations()}getDestination(t){return this._transport.getDestination(t)}getPageLabels(){return this._transport.getPageLabels()}getPageLayout(){return this._transport.getPageLayout()}getPageMode(){return this._transport.getPageMode()}getViewerPreferences(){return this._transport.getViewerPreferences()}getOpenAction(){return this._transport.getOpenAction()}getAttachments(){return this._transport.getAttachments()}getJSActions(){return this._transport.getDocJSActions()}getOutline(){return this._transport.getOutline()}getOptionalContentConfig({intent:t="display"}={}){const{renderingIntent:i}=this._transport.getRenderingIntent(t);return this._transport.getOptionalContentConfig(i)}getPermissions(){return this._transport.getPermissions()}getMetadata(){return this._transport.getMetadata()}getMarkInfo(){return this._transport.getMarkInfo()}getData(){return this._transport.getData()}saveDocument(){return this._transport.saveDocument()}getDownloadInfo(){return this._transport.downloadInfoCapability.promise}cleanup(t=!1){return this._transport.startCleanup(t||this.isPureXfa)}destroy(){return this.loadingTask.destroy()}cachedPageNumber(t){return this._transport.cachedPageNumber(t)}get loadingParams(){return this._transport.loadingParams}get loadingTask(){return this._transport.loadingTask}getFieldObjects(){return this._transport.getFieldObjects()}hasJSActions(){return this._transport.hasJSActions()}getCalculationOrderIds(){return this._transport.getCalculationOrderIds()}}class CO{#t=!1;constructor(t,i,a,r=!1){this._pageIndex=t,this._pageInfo=i,this._transport=a,this._stats=r?new Kv:null,this._pdfBug=r,this.commonObjs=a.commonObjs,this.objs=new C0,this._intentStates=new Map,this.destroyed=!1}get pageNumber(){return this._pageIndex+1}get rotate(){return this._pageInfo.rotate}get ref(){return this._pageInfo.ref}get userUnit(){return this._pageInfo.userUnit}get view(){return this._pageInfo.view}getViewport({scale:t,rotation:i=this.rotate,offsetX:a=0,offsetY:r=0,dontFlip:c=!1}={}){return new Ko({viewBox:this.view,userUnit:this.userUnit,scale:t,rotation:i,offsetX:a,offsetY:r,dontFlip:c})}getAnnotations({intent:t="display"}={}){const{renderingIntent:i}=this._transport.getRenderingIntent(t);return this._transport.getAnnotations(this._pageIndex,i)}getJSActions(){return this._transport.getPageJSActions(this._pageIndex)}get filterFactory(){return this._transport.filterFactory}get isPureXfa(){return zt(this,"isPureXfa",!!this._transport._htmlForXfa)}async getXfa(){return this._transport._htmlForXfa?.children[this._pageIndex]||null}render({canvasContext:t,canvas:i=t.canvas,viewport:a,intent:r="display",annotationMode:c=Is.ENABLE,transform:u=null,background:h=null,optionalContentConfigPromise:p=null,annotationCanvasMap:m=null,pageColors:g=null,printAnnotationStorage:y=null,isEditing:b=!1}){this._stats?.time("Overall");const S=this._transport.getRenderingIntent(r,c,y,b),{renderingIntent:A,cacheKey:_}=S;this.#t=!1,p||=this._transport.getOptionalContentConfig(A);let R=this._intentStates.get(_);R||(R=Object.create(null),this._intentStates.set(_,R)),R.streamReaderCancelTimeout&&(clearTimeout(R.streamReaderCancelTimeout),R.streamReaderCancelTimeout=null);const C=!!(A&Ln.PRINT);R.displayReadyCapability||(R.displayReadyCapability=Promise.withResolvers(),R.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},this._stats?.time("Page Request"),this._pumpOperatorList(S));const N=I=>{R.renderTasks.delete(O),C&&(this.#t=!0),this.#e(),I?(O.capability.reject(I),this._abortOperatorList({intentState:R,reason:I instanceof Error?I:new Error(I)})):O.capability.resolve(),this._stats&&(this._stats.timeEnd("Rendering"),this._stats.timeEnd("Overall"),globalThis.Stats?.enabled&&globalThis.Stats.add(this.pageNumber,this._stats))},O=new Dr({callback:N,params:{canvas:i,canvasContext:t,viewport:a,transform:u,background:h},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:m,operatorList:R.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!C,pdfBug:this._pdfBug,pageColors:g,enableHWA:this._transport.enableHWA});(R.renderTasks||=new Set).add(O);const U=O.task;return Promise.all([R.displayReadyCapability.promise,p]).then(([I,j])=>{if(this.destroyed){N();return}if(this._stats?.time("Rendering"),!(j.renderingIntent&A))throw new Error("Must use the same `intent`-argument when calling the `PDFPageProxy.render` and `PDFDocumentProxy.getOptionalContentConfig` methods.");O.initializeGraphics({transparency:I,optionalContentConfig:j}),O.operatorListChanged()}).catch(N),U}getOperatorList({intent:t="display",annotationMode:i=Is.ENABLE,printAnnotationStorage:a=null,isEditing:r=!1}={}){function c(){h.operatorList.lastChunk&&(h.opListReadCapability.resolve(h.operatorList),h.renderTasks.delete(p))}const u=this._transport.getRenderingIntent(t,i,a,r,!0);let h=this._intentStates.get(u.cacheKey);h||(h=Object.create(null),this._intentStates.set(u.cacheKey,h));let p;return h.opListReadCapability||(p=Object.create(null),p.operatorListChanged=c,h.opListReadCapability=Promise.withResolvers(),(h.renderTasks||=new Set).add(p),h.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},this._stats?.time("Page Request"),this._pumpOperatorList(u)),h.opListReadCapability.promise}streamTextContent({includeMarkedContent:t=!1,disableNormalization:i=!1}={}){return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,includeMarkedContent:t===!0,disableNormalization:i===!0},{highWaterMark:100,size(r){return r.items.length}})}getTextContent(t={}){if(this._transport._htmlForXfa)return this.getXfa().then(a=>al.textContent(a));const i=this.streamTextContent(t);return new Promise(function(a,r){function c(){u.read().then(function({value:p,done:m}){if(m){a(h);return}h.lang??=p.lang,Object.assign(h.styles,p.styles),h.items.push(...p.items),c()},r)}const u=i.getReader(),h={items:[],styles:Object.create(null),lang:null};c()})}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;const t=[];for(const i of this._intentStates.values())if(this._abortOperatorList({intentState:i,reason:new Error("Page was destroyed."),force:!0}),!i.opListReadCapability)for(const a of i.renderTasks)t.push(a.completed),a.cancel();return this.objs.clear(),this.#t=!1,Promise.all(t)}cleanup(t=!1){this.#t=!0;const i=this.#e();return t&&i&&(this._stats&&=new Kv),i}#e(){if(!this.#t||this.destroyed)return!1;for(const{renderTasks:t,operatorList:i}of this._intentStates.values())if(t.size>0||!i.lastChunk)return!1;return this._intentStates.clear(),this.objs.clear(),this.#t=!1,!0}_startRenderPage(t,i){const a=this._intentStates.get(i);a&&(this._stats?.timeEnd("Page Request"),a.displayReadyCapability?.resolve(t))}_renderPageChunk(t,i){for(let a=0,r=t.length;a<r;a++)i.operatorList.fnArray.push(t.fnArray[a]),i.operatorList.argsArray.push(t.argsArray[a]);i.operatorList.lastChunk=t.lastChunk,i.operatorList.separateAnnots=t.separateAnnots;for(const a of i.renderTasks)a.operatorListChanged();t.lastChunk&&this.#e()}_pumpOperatorList({renderingIntent:t,cacheKey:i,annotationStorageSerializable:a,modifiedIds:r}){const{map:c,transfer:u}=a,p=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageIndex:this._pageIndex,intent:t,cacheKey:i,annotationStorage:c,modifiedIds:r},u).getReader(),m=this._intentStates.get(i);m.streamReader=p;const g=()=>{p.read().then(({value:y,done:b})=>{if(b){m.streamReader=null;return}this._transport.destroyed||(this._renderPageChunk(y,m),g())},y=>{if(m.streamReader=null,!this._transport.destroyed){if(m.operatorList){m.operatorList.lastChunk=!0;for(const b of m.renderTasks)b.operatorListChanged();this.#e()}if(m.displayReadyCapability)m.displayReadyCapability.reject(y);else if(m.opListReadCapability)m.opListReadCapability.reject(y);else throw y}})};g()}_abortOperatorList({intentState:t,reason:i,force:a=!1}){if(t.streamReader){if(t.streamReaderCancelTimeout&&(clearTimeout(t.streamReaderCancelTimeout),t.streamReaderCancelTimeout=null),!a){if(t.renderTasks.size>0)return;if(i instanceof Uf){let r=TO;i.extraDelay>0&&i.extraDelay<1e3&&(r+=i.extraDelay),t.streamReaderCancelTimeout=setTimeout(()=>{t.streamReaderCancelTimeout=null,this._abortOperatorList({intentState:t,reason:i,force:!0})},r);return}}if(t.streamReader.cancel(new Ps(i.message)).catch(()=>{}),t.streamReader=null,!this._transport.destroyed){for(const[r,c]of this._intentStates)if(c===t){this._intentStates.delete(r);break}this.cleanup()}}}get stats(){return this._stats}}const he=class he{constructor({name:t=null,port:i=null,verbosity:a=hM()}={}){Wi(this,fn);Wi(this,zs,Promise.withResolvers());Wi(this,pi,null);Wi(this,ns,null);Wi(this,xa,null);if(this.name=t,this.destroyed=!1,this.verbosity=a,i){if(me(he,Da).has(i))throw new Error("Cannot use more than one PDFWorker per port.");me(he,Da).set(i,this),Qi(this,fn,t1).call(this,i)}else Qi(this,fn,e1).call(this)}get promise(){return me(this,zs).promise}get port(){return me(this,ns)}get messageHandler(){return me(this,pi)}destroy(){this.destroyed=!0,me(this,xa)?.terminate(),Nn(this,xa,null),me(he,Da).delete(me(this,ns)),Nn(this,ns,null),me(this,pi)?.destroy(),Nn(this,pi,null)}static create(t){const i=me(this,Da).get(t?.port);if(i){if(i._pendingDestroy)throw new Error("PDFWorker.create - the worker is being destroyed.\nPlease remember to await `PDFDocumentLoadingTask.destroy()`-calls.");return i}return new he(t)}static get workerSrc(){if(xr.workerSrc)return xr.workerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get _setupFakeWorkerGlobal(){return zt(this,"_setupFakeWorkerGlobal",(async()=>me(this,Or,Oh)?me(this,Or,Oh):(await import(this.workerSrc)).WorkerMessageHandler)())}};zs=new WeakMap,pi=new WeakMap,ns=new WeakMap,xa=new WeakMap,Nu=new WeakMap,Ra=new WeakMap,Da=new WeakMap,fn=new WeakSet,Mh=function(){me(this,zs).resolve(),me(this,pi).send("configure",{verbosity:this.verbosity})},t1=function(t){Nn(this,ns,t),Nn(this,pi,new el("main","worker",t)),me(this,pi).on("ready",()=>{}),Qi(this,fn,Mh).call(this)},e1=function(){if(me(he,Ra)||me(he,Or,Oh)){Qi(this,fn,zc).call(this);return}let{workerSrc:t}=he;try{he._isSameOrigin(window.location,t)||(t=he._createCDNWrapper(new URL(t,window.location).href));const i=new Worker(t,{type:"module"}),a=new el("main","worker",i),r=()=>{c.abort(),a.destroy(),i.terminate(),this.destroyed?me(this,zs).reject(new Error("Worker was destroyed")):Qi(this,fn,zc).call(this)},c=new AbortController;i.addEventListener("error",()=>{me(this,xa)||r()},{signal:c.signal}),a.on("test",h=>{if(c.abort(),this.destroyed||!h){r();return}Nn(this,pi,a),Nn(this,ns,i),Nn(this,xa,i),Qi(this,fn,Mh).call(this)}),a.on("ready",h=>{if(c.abort(),this.destroyed){r();return}try{u()}catch{Qi(this,fn,zc).call(this)}});const u=()=>{const h=new Uint8Array;a.send("test",h,[h.buffer])};u();return}catch{bu("The worker has been disabled.")}Qi(this,fn,zc).call(this)},zc=function(){me(he,Ra)||(Ct("Setting up fake worker."),Nn(he,Ra,!0)),he._setupFakeWorkerGlobal.then(t=>{if(this.destroyed){me(this,zs).reject(new Error("Worker was destroyed"));return}const i=new UM;Nn(this,ns,i);const a=`fake${Jw(he,Nu)._++}`,r=new el(a+"_worker",a,i);t.setup(r,i),Nn(this,pi,new el(a,a+"_worker",i)),Qi(this,fn,Mh).call(this)}).catch(t=>{me(this,zs).reject(new Error(`Setting up fake worker failed: "${t.message}".`))})},Or=new WeakSet,Oh=function(){try{return globalThis.pdfjsWorker?.WorkerMessageHandler||null}catch{return null}},Wi(he,Or),Wi(he,Nu,0),Wi(he,Ra,!1),Wi(he,Da,new WeakMap),un&&(Nn(he,Ra,!0),xr.workerSrc||="./pdf.worker.mjs"),he._isSameOrigin=(t,i)=>{const a=URL.parse(t);if(!a?.origin||a.origin==="null")return!1;const r=new URL(i,a);return a.origin===r.origin},he._createCDNWrapper=t=>{const i=`await import("${t}");`;return URL.createObjectURL(new Blob([i],{type:"text/javascript"}))},he.fromPort=t=>{if(TM("`PDFWorker.fromPort` - please use `PDFWorker.create` instead."),!t?.port)throw new Error("PDFWorker.fromPort - invalid method signature.");return he.create(t)};let rl=he;class xO{#t=new Map;#e=new Map;#n=new Map;#i=new Map;#a=null;constructor(t,i,a,r,c,u){this.messageHandler=t,this.loadingTask=i,this.commonObjs=new C0,this.fontLoader=new OM({ownerDocument:r.ownerDocument,styleElement:r.styleElement}),this.loadingParams=r.loadingParams,this._params=r,this.canvasFactory=c.canvasFactory,this.filterFactory=c.filterFactory,this.cMapReaderFactory=c.cMapReaderFactory,this.standardFontDataFactory=c.standardFontDataFactory,this.wasmFactory=c.wasmFactory,this.destroyed=!1,this.destroyCapability=null,this._networkStream=a,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=Promise.withResolvers(),this.enableHWA=u,this.setupMessageHandler()}#s(t,i=null){const a=this.#t.get(t);if(a)return a;const r=this.messageHandler.sendWithPromise(t,i);return this.#t.set(t,r),r}get annotationStorage(){return zt(this,"annotationStorage",new Gf)}getRenderingIntent(t,i=Is.ENABLE,a=null,r=!1,c=!1){let u=Ln.DISPLAY,h=$f;switch(t){case"any":u=Ln.ANY;break;case"display":break;case"print":u=Ln.PRINT;break;default:Ct(`getRenderingIntent - invalid intent: ${t}`)}const p=u&Ln.PRINT&&a instanceof e0?a:this.annotationStorage;switch(i){case Is.DISABLE:u+=Ln.ANNOTATIONS_DISABLE;break;case Is.ENABLE:break;case Is.ENABLE_FORMS:u+=Ln.ANNOTATIONS_FORMS;break;case Is.ENABLE_STORAGE:u+=Ln.ANNOTATIONS_STORAGE,h=p.serializable;break;default:Ct(`getRenderingIntent - invalid annotationMode: ${i}`)}r&&(u+=Ln.IS_EDITING),c&&(u+=Ln.OPLIST);const{ids:m,hash:g}=p.modifiedIds,y=[u,h.hash,g];return{renderingIntent:u,cacheKey:y.join("_"),annotationStorageSerializable:h,modifiedIds:m}}destroy(){if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=Promise.withResolvers(),this.#a?.reject(new Error("Worker was destroyed during onPassword callback"));const t=[];for(const a of this.#e.values())t.push(a._destroy());this.#e.clear(),this.#n.clear(),this.#i.clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();const i=this.messageHandler.sendWithPromise("Terminate",null);return t.push(i),Promise.all(t).then(()=>{this.commonObjs.clear(),this.fontLoader.clear(),this.#t.clear(),this.filterFactory.destroy(),hn.cleanup(),this._networkStream?.cancelAllRequests(new Ps("Worker was terminated.")),this.messageHandler?.destroy(),this.messageHandler=null,this.destroyCapability.resolve()},this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){const{messageHandler:t,loadingTask:i}=this;t.on("GetReader",(a,r)=>{Me(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=c=>{this._lastProgress={loaded:c.loaded,total:c.total}},r.onPull=()=>{this._fullReader.read().then(function({value:c,done:u}){if(u){r.close();return}Me(c instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),r.enqueue(new Uint8Array(c),1,[c])}).catch(c=>{r.error(c)})},r.onCancel=c=>{this._fullReader.cancel(c),r.ready.catch(u=>{if(!this.destroyed)throw u})}}),t.on("ReaderHeadersReady",async a=>{await this._fullReader.headersReady;const{isStreamingSupported:r,isRangeSupported:c,contentLength:u}=this._fullReader;return(!r||!c)&&(this._lastProgress&&i.onProgress?.(this._lastProgress),this._fullReader.onProgress=h=>{i.onProgress?.({loaded:h.loaded,total:h.total})}),{isStreamingSupported:r,isRangeSupported:c,contentLength:u}}),t.on("GetRangeReader",(a,r)=>{Me(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");const c=this._networkStream.getRangeReader(a.begin,a.end);if(!c){r.close();return}r.onPull=()=>{c.read().then(function({value:u,done:h}){if(h){r.close();return}Me(u instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),r.enqueue(new Uint8Array(u),1,[u])}).catch(u=>{r.error(u)})},r.onCancel=u=>{c.cancel(u),r.ready.catch(h=>{if(!this.destroyed)throw h})}}),t.on("GetDoc",({pdfInfo:a})=>{this._numPages=a.numPages,this._htmlForXfa=a.htmlForXfa,delete a.htmlForXfa,i._capability.resolve(new wO(a,this))}),t.on("DocException",a=>{i._capability.reject(An(a))}),t.on("PasswordRequest",a=>{this.#a=Promise.withResolvers();try{if(!i.onPassword)throw An(a);const r=c=>{c instanceof Error?this.#a.reject(c):this.#a.resolve({password:c})};i.onPassword(r,a.code)}catch(r){this.#a.reject(r)}return this.#a.promise}),t.on("DataLoaded",a=>{i.onProgress?.({loaded:a.length,total:a.length}),this.downloadInfoCapability.resolve(a)}),t.on("StartRenderPage",a=>{if(this.destroyed)return;this.#e.get(a.pageIndex)._startRenderPage(a.transparency,a.cacheKey)}),t.on("commonobj",([a,r,c])=>{if(this.destroyed||this.commonObjs.has(a))return null;switch(r){case"Font":if("error"in c){const m=c.error;Ct(`Error during font loading: ${m}`),this.commonObjs.resolve(a,m);break}const u=this._params.pdfBug&&globalThis.FontInspector?.enabled?(m,g)=>globalThis.FontInspector.fontAdded(m,g):null,h=new kM(c,u);this.fontLoader.bind(h).catch(()=>t.sendWithPromise("FontFallback",{id:a})).finally(()=>{!h.fontExtraProperties&&h.data&&(h.data=null),this.commonObjs.resolve(a,h)});break;case"CopyLocalImage":const{imageRef:p}=c;Me(p,"The imageRef must be defined.");for(const m of this.#e.values())for(const[,g]of m.objs)if(g?.ref===p)return g.dataLen?(this.commonObjs.resolve(a,structuredClone(g)),g.dataLen):null;break;case"FontPath":case"Image":case"Pattern":this.commonObjs.resolve(a,c);break;default:throw new Error(`Got unknown common object type ${r}`)}return null}),t.on("obj",([a,r,c,u])=>{if(this.destroyed)return;const h=this.#e.get(r);if(!h.objs.has(a)){if(h._intentStates.size===0){u?.bitmap?.close();return}switch(c){case"Image":case"Pattern":h.objs.resolve(a,u);break;default:throw new Error(`Got unknown object type ${c}`)}}}),t.on("DocProgress",a=>{this.destroyed||i.onProgress?.({loaded:a.loaded,total:a.total})}),t.on("FetchBinaryData",async a=>{if(this.destroyed)throw new Error("Worker was destroyed.");const r=this[a.type];if(!r)throw new Error(`${a.type} not initialized, see the \`useWorkerFetch\` parameter.`);return r.fetch(a)})}getData(){return this.messageHandler.sendWithPromise("GetData",null)}saveDocument(){this.annotationStorage.size<=0&&Ct("saveDocument called while `annotationStorage` is empty, please use the getData-method instead.");const{map:t,transfer:i}=this.annotationStorage.serializable;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:t,filename:this._fullReader?.filename??null},i).finally(()=>{this.annotationStorage.resetModified()})}getPage(t){if(!Number.isInteger(t)||t<=0||t>this._numPages)return Promise.reject(new Error("Invalid page request."));const i=t-1,a=this.#n.get(i);if(a)return a;const r=this.messageHandler.sendWithPromise("GetPage",{pageIndex:i}).then(c=>{if(this.destroyed)throw new Error("Transport destroyed");c.refStr&&this.#i.set(c.refStr,t);const u=new CO(i,c,this,this._params.pdfBug);return this.#e.set(i,u),u});return this.#n.set(i,r),r}getPageIndex(t){return Vf(t)?this.messageHandler.sendWithPromise("GetPageIndex",{num:t.num,gen:t.gen}):Promise.reject(new Error("Invalid pageIndex request."))}getAnnotations(t,i){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:t,intent:i})}getFieldObjects(){return this.#s("GetFieldObjects")}hasJSActions(){return this.#s("HasJSActions")}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(t){return typeof t!="string"?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:t})}getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}getPageLayout(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}getDocJSActions(){return this.#s("GetDocJSActions")}getPageJSActions(t){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:t})}getStructTree(t){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:t})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(t){return this.#s("GetOptionalContentConfig").then(i=>new aO(i,t))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){const t="GetMetadata",i=this.#t.get(t);if(i)return i;const a=this.messageHandler.sendWithPromise(t,null).then(r=>({info:r[0],metadata:r[1]?new iO(r[1]):null,contentDispositionFilename:this._fullReader?.filename??null,contentLength:this._fullReader?.contentLength??null}));return this.#t.set(t,a),a}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}async startCleanup(t=!1){if(!this.destroyed){await this.messageHandler.sendWithPromise("Cleanup",null);for(const i of this.#e.values())if(!i.cleanup())throw new Error(`startCleanup: Page ${i.pageNumber} is currently rendering.`);this.commonObjs.clear(),t||this.fontLoader.clear(),this.#t.clear(),this.filterFactory.destroy(!0),hn.cleanup()}}cachedPageNumber(t){if(!Vf(t))return null;const i=t.gen===0?`${t.num}R`:`${t.num}R${t.gen}`;return this.#i.get(i)??null}}class RO{#t=null;onContinue=null;onError=null;constructor(t){this.#t=t}get promise(){return this.#t.capability.promise}cancel(t=0){this.#t.cancel(null,t)}get separateAnnots(){const{separateAnnots:t}=this.#t.operatorList;if(!t)return!1;const{annotationCanvasMap:i}=this.#t;return t.form||t.canvas&&i?.size>0}}class Dr{#t=null;static#e=new WeakSet;constructor({callback:t,params:i,objs:a,commonObjs:r,annotationCanvasMap:c,operatorList:u,pageIndex:h,canvasFactory:p,filterFactory:m,useRequestAnimationFrame:g=!1,pdfBug:y=!1,pageColors:b=null,enableHWA:S=!1}){this.callback=t,this.params=i,this.objs=a,this.commonObjs=r,this.annotationCanvasMap=c,this.operatorListIdx=null,this.operatorList=u,this._pageIndex=h,this.canvasFactory=p,this.filterFactory=m,this._pdfBug=y,this.pageColors=b,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=g===!0&&typeof window<"u",this.cancelled=!1,this.capability=Promise.withResolvers(),this.task=new RO(this),this._cancelBound=this.cancel.bind(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=i.canvas,this._canvasContext=i.canvas?null:i.canvasContext,this._enableHWA=S}get completed(){return this.capability.promise.catch(function(){})}initializeGraphics({transparency:t=!1,optionalContentConfig:i}){if(this.cancelled)return;if(this._canvas){if(Dr.#e.has(this._canvas))throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");Dr.#e.add(this._canvas)}this._pdfBug&&globalThis.StepperManager?.enabled&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());const{viewport:a,transform:r,background:c}=this.params,u=this._canvasContext||this._canvas.getContext("2d",{alpha:!1,willReadFrequently:!this._enableHWA});this.gfx=new Cr(u,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:i},this.annotationCanvasMap,this.pageColors),this.gfx.beginDrawing({transform:r,viewport:a,transparency:t,background:c}),this.operatorListIdx=0,this.graphicsReady=!0,this.graphicsReadyCallback?.()}cancel(t=null,i=0){this.running=!1,this.cancelled=!0,this.gfx?.endDrawing(),this.#t&&(window.cancelAnimationFrame(this.#t),this.#t=null),Dr.#e.delete(this._canvas),t||=new Uf(`Rendering cancelled, page ${this._pageIndex+1}`,i),this.callback(t),this.task.onError?.(t)}operatorListChanged(){if(!this.graphicsReady){this.graphicsReadyCallback||=this._continueBound;return}this.stepper?.updateOperatorList(this.operatorList),!this.running&&this._continue()}_continue(){this.running=!0,!this.cancelled&&(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}_scheduleNext(){this._useRequestAnimationFrame?this.#t=window.requestAnimationFrame(()=>{this.#t=null,this._nextBound().catch(this._cancelBound)}):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}async _next(){this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),Dr.#e.delete(this._canvas),this.callback())))}}const DO="5.4.54",MO="295fb3ec4";class Wn{#t=null;#e=null;#n;#i=null;#a=!1;#s=!1;#r=null;#o;#u=null;#c=null;static#h=null;static get _keyboardManager(){return zt(this,"_keyboardManager",new tl([[["Escape","mac+Escape"],Wn.prototype._hideDropdownFromKeyboard],[[" ","mac+ "],Wn.prototype._colorSelectFromKeyboard],[["ArrowDown","ArrowRight","mac+ArrowDown","mac+ArrowRight"],Wn.prototype._moveToNext],[["ArrowUp","ArrowLeft","mac+ArrowUp","mac+ArrowLeft"],Wn.prototype._moveToPrevious],[["Home","mac+Home"],Wn.prototype._moveToBeginning],[["End","mac+End"],Wn.prototype._moveToEnd]]))}constructor({editor:t=null,uiManager:i=null}){t?(this.#s=!1,this.#r=t):this.#s=!0,this.#c=t?._uiManager||i,this.#o=this.#c._eventBus,this.#n=t?.color?.toUpperCase()||this.#c?.highlightColors.values().next().value||"#FFFF98",Wn.#h||=Object.freeze({blue:"pdfjs-editor-colorpicker-blue",green:"pdfjs-editor-colorpicker-green",pink:"pdfjs-editor-colorpicker-pink",red:"pdfjs-editor-colorpicker-red",yellow:"pdfjs-editor-colorpicker-yellow"})}renderButton(){const t=this.#t=document.createElement("button");t.className="colorPicker",t.tabIndex="0",t.setAttribute("data-l10n-id","pdfjs-editor-colorpicker-button"),t.ariaHasPopup="true",this.#r&&(t.ariaControls=`${this.#r.id}_colorpicker_dropdown`);const i=this.#c._signal;t.addEventListener("click",this.#f.bind(this),{signal:i}),t.addEventListener("keydown",this.#g.bind(this),{signal:i});const a=this.#e=document.createElement("span");return a.className="swatch",a.ariaHidden="true",a.style.backgroundColor=this.#n,t.append(a),t}renderMainDropdown(){const t=this.#i=this.#l();return t.ariaOrientation="horizontal",t.ariaLabelledBy="highlightColorPickerLabel",t}#l(){const t=document.createElement("div"),i=this.#c._signal;t.addEventListener("contextmenu",Yn,{signal:i}),t.className="dropdown",t.role="listbox",t.ariaMultiSelectable="false",t.ariaOrientation="vertical",t.setAttribute("data-l10n-id","pdfjs-editor-colorpicker-dropdown"),this.#r&&(t.id=`${this.#r.id}_colorpicker_dropdown`);for(const[a,r]of this.#c.highlightColors){const c=document.createElement("button");c.tabIndex="0",c.role="option",c.setAttribute("data-color",r),c.title=a,c.setAttribute("data-l10n-id",Wn.#h[a]);const u=document.createElement("span");c.append(u),u.className="swatch",u.style.backgroundColor=r,c.ariaSelected=r===this.#n,c.addEventListener("click",this.#p.bind(this,r),{signal:i}),t.append(c)}return t.addEventListener("keydown",this.#g.bind(this),{signal:i}),t}#p(t,i){i.stopPropagation(),this.#o.dispatch("switchannotationeditorparams",{source:this,type:$t.HIGHLIGHT_COLOR,value:t}),this.updateColor(t)}_colorSelectFromKeyboard(t){if(t.target===this.#t){this.#f(t);return}const i=t.target.getAttribute("data-color");i&&this.#p(i,t)}_moveToNext(t){if(!this.#m){this.#f(t);return}if(t.target===this.#t){this.#i.firstChild?.focus();return}t.target.nextSibling?.focus()}_moveToPrevious(t){if(t.target===this.#i?.firstChild||t.target===this.#t){this.#m&&this._hideDropdownFromKeyboard();return}this.#m||this.#f(t),t.target.previousSibling?.focus()}_moveToBeginning(t){if(!this.#m){this.#f(t);return}this.#i.firstChild?.focus()}_moveToEnd(t){if(!this.#m){this.#f(t);return}this.#i.lastChild?.focus()}#g(t){Wn._keyboardManager.exec(this,t)}#f(t){if(this.#m){this.hideDropdown();return}if(this.#a=t.detail===0,this.#u||(this.#u=new AbortController,window.addEventListener("pointerdown",this.#d.bind(this),{signal:this.#c.combinedSignal(this.#u)})),this.#t.ariaExpanded="true",this.#i){this.#i.classList.remove("hidden");return}const i=this.#i=this.#l();this.#t.append(i)}#d(t){this.#i?.contains(t.target)||this.hideDropdown()}hideDropdown(){this.#i?.classList.add("hidden"),this.#t.ariaExpanded="false",this.#u?.abort(),this.#u=null}get#m(){return this.#i&&!this.#i.classList.contains("hidden")}_hideDropdownFromKeyboard(){if(!this.#s){if(!this.#m){this.#r?.unselect();return}this.hideDropdown(),this.#t.focus({preventScroll:!0,focusVisible:this.#a})}}updateColor(t){if(this.#e&&(this.#e.style.backgroundColor=t),!this.#i)return;const i=this.#c.highlightColors.values();for(const a of this.#i.children)a.ariaSelected=i.next().value===t.toUpperCase()}destroy(){this.#t?.remove(),this.#t=null,this.#e=null,this.#i?.remove(),this.#i=null}}class ol{#t=null;#e=null;#n=null;static#i=null;constructor(t){this.#e=t,this.#n=t._uiManager,ol.#i||=Object.freeze({freetext:"pdfjs-editor-color-picker-free-text-input",ink:"pdfjs-editor-color-picker-ink-input"})}renderButton(){if(this.#t)return this.#t;const{editorType:t,colorType:i,colorValue:a}=this.#e,r=this.#t=document.createElement("input");return r.type="color",r.value=a||"#000000",r.className="basicColorPicker",r.tabIndex=0,r.setAttribute("data-l10n-id",ol.#i[t]),r.addEventListener("input",()=>{this.#n.updateParams(i,r.value)},{signal:this.#n._signal}),r}update(t){this.#t&&(this.#t.value=t)}destroy(){this.#t?.remove(),this.#t=null}hideDropdown(){}}function M0(l){return Math.floor(Math.max(0,Math.min(1,l))*255).toString(16).padStart(2,"0")}function ll(l){return Math.max(0,Math.min(255,255*l))}class O0{static CMYK_G([t,i,a,r]){return["G",1-Math.min(1,.3*t+.59*a+.11*i+r)]}static G_CMYK([t]){return["CMYK",0,0,0,1-t]}static G_RGB([t]){return["RGB",t,t,t]}static G_rgb([t]){return t=ll(t),[t,t,t]}static G_HTML([t]){const i=M0(t);return`#${i}${i}${i}`}static RGB_G([t,i,a]){return["G",.3*t+.59*i+.11*a]}static RGB_rgb(t){return t.map(ll)}static RGB_HTML(t){return`#${t.map(M0).join("")}`}static T_HTML(){return"#00000000"}static T_rgb(){return[null]}static CMYK_RGB([t,i,a,r]){return["RGB",1-Math.min(1,t+r),1-Math.min(1,a+r),1-Math.min(1,i+r)]}static CMYK_rgb([t,i,a,r]){return[ll(1-Math.min(1,t+r)),ll(1-Math.min(1,a+r)),ll(1-Math.min(1,i+r))]}static CMYK_HTML(t){const i=this.CMYK_RGB(t).slice(1);return this.RGB_HTML(i)}static RGB_CMYK([t,i,a]){const r=1-t,c=1-i,u=1-a,h=Math.min(r,c,u);return["CMYK",r,c,u,h]}}class OO{create(t,i,a=!1){if(t<=0||i<=0)throw new Error("Invalid SVG dimensions");const r=this._createSVG("svg:svg");return r.setAttribute("version","1.1"),a||(r.setAttribute("width",`${t}px`),r.setAttribute("height",`${i}px`)),r.setAttribute("preserveAspectRatio","none"),r.setAttribute("viewBox",`0 0 ${t} ${i}`),r}createElement(t){if(typeof t!="string")throw new Error("Invalid SVG element type");return this._createSVG(t)}_createSVG(t){ie("Abstract method `_createSVG` called.")}}class Du extends OO{_createSVG(t){return document.createElementNS(ts,t)}}class k0{static setupStorage(t,i,a,r,c){const u=r.getValue(i,{value:null});switch(a.name){case"textarea":if(u.value!==null&&(t.textContent=u.value),c==="print")break;t.addEventListener("input",h=>{r.setValue(i,{value:h.target.value})});break;case"input":if(a.attributes.type==="radio"||a.attributes.type==="checkbox"){if(u.value===a.attributes.xfaOn?t.setAttribute("checked",!0):u.value===a.attributes.xfaOff&&t.removeAttribute("checked"),c==="print")break;t.addEventListener("change",h=>{r.setValue(i,{value:h.target.checked?h.target.getAttribute("xfaOn"):h.target.getAttribute("xfaOff")})})}else{if(u.value!==null&&t.setAttribute("value",u.value),c==="print")break;t.addEventListener("input",h=>{r.setValue(i,{value:h.target.value})})}break;case"select":if(u.value!==null){t.setAttribute("value",u.value);for(const h of a.children)h.attributes.value===u.value?h.attributes.selected=!0:h.attributes.hasOwnProperty("selected")&&delete h.attributes.selected}t.addEventListener("input",h=>{const p=h.target.options,m=p.selectedIndex===-1?"":p[p.selectedIndex].value;r.setValue(i,{value:m})});break}}static setAttributes({html:t,element:i,storage:a=null,intent:r,linkService:c}){const{attributes:u}=i,h=t instanceof HTMLAnchorElement;u.type==="radio"&&(u.name=`${u.name}-${r}`);for(const[p,m]of Object.entries(u))if(m!=null)switch(p){case"class":m.length&&t.setAttribute(p,m.join(" "));break;case"dataId":break;case"id":t.setAttribute("data-element-id",m);break;case"style":Object.assign(t.style,m);break;case"textContent":t.textContent=m;break;default:(!h||p!=="href"&&p!=="newWindow")&&t.setAttribute(p,m)}h&&c.addLinkAttributes(t,u.href,u.newWindow),a&&u.dataId&&this.setupStorage(t,u.dataId,i,a)}static render(t){const i=t.annotationStorage,a=t.linkService,r=t.xfaHtml,c=t.intent||"display",u=document.createElement(r.name);r.attributes&&this.setAttributes({html:u,element:r,intent:c,linkService:a});const h=c!=="richText",p=t.div;if(p.append(u),t.viewport){const y=`matrix(${t.viewport.transform.join(",")})`;p.style.transform=y}h&&p.setAttribute("class","xfaLayer xfaFont");const m=[];if(r.children.length===0){if(r.value){const y=document.createTextNode(r.value);u.append(y),h&&al.shouldBuildText(r.name)&&m.push(y)}return{textDivs:m}}const g=[[r,-1,u]];for(;g.length>0;){const[y,b,S]=g.at(-1);if(b+1===y.children.length){g.pop();continue}const A=y.children[++g.at(-1)[1]];if(A===null)continue;const{name:_}=A;if(_==="#text"){const C=document.createTextNode(A.value);m.push(C),S.append(C);continue}const R=A?.attributes?.xmlns?document.createElementNS(A.attributes.xmlns,_):document.createElement(_);if(S.append(R),A.attributes&&this.setAttributes({html:R,element:A,storage:i,intent:c,linkService:a}),A.children?.length>0)g.push([A,-1,R]);else if(A.value){const C=document.createTextNode(A.value);h&&al.shouldBuildText(_)&&m.push(C),R.append(C)}}for(const y of p.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))y.setAttribute("readOnly",!0);return{textDivs:m}}static update(t){const i=`matrix(${t.viewport.transform.join(",")})`;t.div.style.transform=i,t.div.hidden=!1}}const kO=9,Ta=new WeakSet,NO=new Date().getTimezoneOffset()*60*1e3;class N0{static create(t){switch(t.data.annotationType){case De.LINK:return new ep(t);case De.TEXT:return new LO(t);case De.WIDGET:switch(t.data.fieldType){case"Tx":return new IO(t);case"Btn":return t.data.radioButton?new L0(t):t.data.checkBox?new UO(t):new zO(t);case"Ch":return new HO(t);case"Sig":return new PO(t)}return new wa(t);case De.POPUP:return new np(t);case De.FREETEXT:return new I0(t);case De.LINE:return new FO(t);case De.SQUARE:return new jO(t);case De.CIRCLE:return new $O(t);case De.POLYLINE:return new P0(t);case De.CARET:return new VO(t);case De.INK:return new ip(t);case De.POLYGON:return new GO(t);case De.HIGHLIGHT:return new U0(t);case De.UNDERLINE:return new qO(t);case De.SQUIGGLY:return new YO(t);case De.STRIKEOUT:return new XO(t);case De.STAMP:return new z0(t);case De.FILEATTACHMENT:return new WO(t);default:return new _e(t)}}}class _e{#t=null;#e=!1;#n=null;constructor(t,{isRenderable:i=!1,ignoreBorder:a=!1,createQuadrilaterals:r=!1}={}){this.isRenderable=i,this.data=t.data,this.layer=t.layer,this.linkService=t.linkService,this.downloadManager=t.downloadManager,this.imageResourcesPath=t.imageResourcesPath,this.renderForms=t.renderForms,this.svgFactory=t.svgFactory,this.annotationStorage=t.annotationStorage,this.enableScripting=t.enableScripting,this.hasJSActions=t.hasJSActions,this._fieldObjects=t.fieldObjects,this.parent=t.parent,i&&(this.container=this._createContainer(a)),r&&this._createQuadrilaterals()}static _hasPopupData({contentsObj:t,richText:i}){return!!(t?.str||i?.str)}get _isEditable(){return this.data.isEditable}get hasPopupData(){return _e._hasPopupData(this.data)}updateEdited(t){if(!this.container)return;t.rect&&(this.#t||={rect:this.data.rect.slice(0)});const{rect:i,popup:a}=t;i&&this.#i(i);let r=this.#n?.popup||this.popup;!r&&a?.text&&(this._createPopup(a),r=this.#n.popup),r&&(r.updateEdited(t),a?.deleted&&(r.remove(),this.#n=null,this.popup=null))}resetEdited(){this.#t&&(this.#i(this.#t.rect),this.#n?.popup.resetEdited(),this.#t=null)}#i(t){const{container:{style:i},data:{rect:a,rotation:r},parent:{viewport:{rawDims:{pageWidth:c,pageHeight:u,pageX:h,pageY:p}}}}=this;a?.splice(0,4,...t),i.left=`${100*(t[0]-h)/c}%`,i.top=`${100*(u-t[3]+p)/u}%`,r===0?(i.width=`${100*(t[2]-t[0])/c}%`,i.height=`${100*(t[3]-t[1])/u}%`):this.setRotation(r)}_createContainer(t){const{data:i,parent:{page:a,viewport:r}}=this,c=document.createElement("section");c.setAttribute("data-annotation-id",i.id),!(this instanceof wa)&&!(this instanceof ep)&&(c.tabIndex=0);const{style:u}=c;if(u.zIndex=this.parent.zIndex++,i.alternativeText&&(c.title=i.alternativeText),i.noRotate&&c.classList.add("norotate"),!i.rect||this instanceof np){const{rotation:_}=i;return!i.hasOwnCanvas&&_!==0&&this.setRotation(_,c),c}const{width:h,height:p}=this;if(!t&&i.borderStyle.width>0){u.borderWidth=`${i.borderStyle.width}px`;const _=i.borderStyle.horizontalCornerRadius,R=i.borderStyle.verticalCornerRadius;if(_>0||R>0){const N=`calc(${_}px * var(--total-scale-factor)) / calc(${R}px * var(--total-scale-factor))`;u.borderRadius=N}else if(this instanceof L0){const N=`calc(${h}px * var(--total-scale-factor)) / calc(${p}px * var(--total-scale-factor))`;u.borderRadius=N}switch(i.borderStyle.style){case _r.SOLID:u.borderStyle="solid";break;case _r.DASHED:u.borderStyle="dashed";break;case _r.BEVELED:Ct("Unimplemented border style: beveled");break;case _r.INSET:Ct("Unimplemented border style: inset");break;case _r.UNDERLINE:u.borderBottomStyle="solid";break}const C=i.borderColor||null;C?(this.#e=!0,u.borderColor=mt.makeHexColor(C[0]|0,C[1]|0,C[2]|0)):u.borderWidth=0}const m=mt.normalizeRect([i.rect[0],a.view[3]-i.rect[1]+a.view[1],i.rect[2],a.view[3]-i.rect[3]+a.view[1]]),{pageWidth:g,pageHeight:y,pageX:b,pageY:S}=r.rawDims;u.left=`${100*(m[0]-b)/g}%`,u.top=`${100*(m[1]-S)/y}%`;const{rotation:A}=i;return i.hasOwnCanvas||A===0?(u.width=`${100*h/g}%`,u.height=`${100*p/y}%`):this.setRotation(A,c),c}setRotation(t,i=this.container){if(!this.data.rect)return;const{pageWidth:a,pageHeight:r}=this.parent.viewport.rawDims;let{width:c,height:u}=this;t%180!==0&&([c,u]=[u,c]),i.style.width=`${100*c/a}%`,i.style.height=`${100*u/r}%`,i.setAttribute("data-main-rotation",(360-t)%360)}get _commonActions(){const t=(i,a,r)=>{const c=r.detail[i],u=c[0],h=c.slice(1);r.target.style[a]=O0[`${u}_HTML`](h),this.annotationStorage.setValue(this.data.id,{[a]:O0[`${u}_rgb`](h)})};return zt(this,"_commonActions",{display:i=>{const{display:a}=i.detail,r=a%2===1;this.container.style.visibility=r?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noView:r,noPrint:a===1||a===2})},print:i=>{this.annotationStorage.setValue(this.data.id,{noPrint:!i.detail.print})},hidden:i=>{const{hidden:a}=i.detail;this.container.style.visibility=a?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noPrint:a,noView:a})},focus:i=>{setTimeout(()=>i.target.focus({preventScroll:!1}),0)},userName:i=>{i.target.title=i.detail.userName},readonly:i=>{i.target.disabled=i.detail.readonly},required:i=>{this._setRequired(i.target,i.detail.required)},bgColor:i=>{t("bgColor","backgroundColor",i)},fillColor:i=>{t("fillColor","backgroundColor",i)},fgColor:i=>{t("fgColor","color",i)},textColor:i=>{t("textColor","color",i)},borderColor:i=>{t("borderColor","borderColor",i)},strokeColor:i=>{t("strokeColor","borderColor",i)},rotation:i=>{const a=i.detail.rotation;this.setRotation(a),this.annotationStorage.setValue(this.data.id,{rotation:a})}})}_dispatchEventFromSandbox(t,i){const a=this._commonActions;for(const r of Object.keys(i.detail))(t[r]||a[r])?.(i)}_setDefaultPropertiesFromJS(t){if(!this.enableScripting)return;const i=this.annotationStorage.getRawValue(this.data.id);if(!i)return;const a=this._commonActions;for(const[r,c]of Object.entries(i)){const u=a[r];if(u){const h={detail:{[r]:c},target:t};u(h),delete i[r]}}}_createQuadrilaterals(){if(!this.container)return;const{quadPoints:t}=this.data;if(!t)return;const[i,a,r,c]=this.data.rect.map(_=>Math.fround(_));if(t.length===8){const[_,R,C,N]=t.subarray(2,6);if(r===_&&c===R&&i===C&&a===N)return}const{style:u}=this.container;let h;if(this.#e){const{borderColor:_,borderWidth:R}=u;u.borderWidth=0,h=["url('data:image/svg+xml;utf8,",'<svg xmlns="http://www.w3.org/2000/svg"',' preserveAspectRatio="none" viewBox="0 0 1 1">',`<g fill="transparent" stroke="${_}" stroke-width="${R}">`],this.container.classList.add("hasBorder")}const p=r-i,m=c-a,{svgFactory:g}=this,y=g.createElement("svg");y.classList.add("quadrilateralsContainer"),y.setAttribute("width",0),y.setAttribute("height",0),y.role="none";const b=g.createElement("defs");y.append(b);const S=g.createElement("clipPath"),A=`clippath_${this.data.id}`;S.setAttribute("id",A),S.setAttribute("clipPathUnits","objectBoundingBox"),b.append(S);for(let _=2,R=t.length;_<R;_+=8){const C=t[_],N=t[_+1],O=t[_+2],U=t[_+3],I=g.createElement("rect"),j=(O-i)/p,F=(c-N)/m,J=(C-O)/p,X=(N-U)/m;I.setAttribute("x",j),I.setAttribute("y",F),I.setAttribute("width",J),I.setAttribute("height",X),S.append(I),h?.push(`<rect vector-effect="non-scaling-stroke" x="${j}" y="${F}" width="${J}" height="${X}"/>`)}this.#e&&(h.push("</g></svg>')"),u.backgroundImage=h.join("")),this.container.append(y),this.container.style.clipPath=`url(#${A})`}_createPopup(t=null){const{data:i}=this;let a,r;t?(a={str:t.text},r=t.date):(a=i.contentsObj,r=i.modificationDate);const c=this.#n=new np({data:{color:i.color,titleObj:i.titleObj,modificationDate:r,contentsObj:a,richText:i.richText,parentRect:i.rect,borderStyle:0,id:`popup_${i.id}`,rotation:i.rotation,noRotate:!0},linkService:this.linkService,parent:this.parent,elements:[this]});this.parent.div.append(c.render())}get hasPopupElement(){return!!(this.#n||this.popup||this.data.popupRef)}render(){ie("Abstract method `AnnotationElement.render` called")}_getElementsByName(t,i=null){const a=[];if(this._fieldObjects){const r=this._fieldObjects[t];if(r)for(const{page:c,id:u,exportValues:h}of r){if(c===-1||u===i)continue;const p=typeof h=="string"?h:null,m=document.querySelector(`[data-element-id="${u}"]`);if(m&&!Ta.has(m)){Ct(`_getElementsByName - element not allowed: ${u}`);continue}a.push({id:u,exportValue:p,domElement:m})}return a}for(const r of document.getElementsByName(t)){const{exportValue:c}=r,u=r.getAttribute("data-element-id");u!==i&&Ta.has(r)&&a.push({id:u,exportValue:c,domElement:r})}return a}show(){this.container&&(this.container.hidden=!1),this.popup?.maybeShow()}hide(){this.container&&(this.container.hidden=!0),this.popup?.forceHide()}getElementsToTriggerPopup(){return this.container}addHighlightArea(){const t=this.getElementsToTriggerPopup();if(Array.isArray(t))for(const i of t)i.classList.add("highlightArea");else t.classList.add("highlightArea")}_editOnDoubleClick(){if(!this._isEditable)return;const{annotationEditorType:t,data:{id:i}}=this;this.container.addEventListener("dblclick",()=>{this.linkService.eventBus?.dispatch("switchannotationeditormode",{source:this,mode:t,editId:i,mustEnterInEditMode:!0})})}get width(){return this.data.rect[2]-this.data.rect[0]}get height(){return this.data.rect[3]-this.data.rect[1]}}class ep extends _e{constructor(t,i=null){super(t,{isRenderable:!0,ignoreBorder:!!i?.ignoreBorder,createQuadrilaterals:!0}),this.isTooltipOnly=t.data.isTooltipOnly}render(){const{data:t,linkService:i}=this,a=document.createElement("a");a.setAttribute("data-element-id",t.id);let r=!1;return t.url?(i.addLinkAttributes(a,t.url,t.newWindow),r=!0):t.action?(this._bindNamedAction(a,t.action,t.overlaidText),r=!0):t.attachment?(this.#e(a,t.attachment,t.overlaidText,t.attachmentDest),r=!0):t.setOCGState?(this.#n(a,t.setOCGState,t.overlaidText),r=!0):t.dest?(this._bindLink(a,t.dest,t.overlaidText),r=!0):(t.actions&&(t.actions.Action||t.actions["Mouse Up"]||t.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(this._bindJSAction(a,t),r=!0),t.resetForm?(this._bindResetFormAction(a,t.resetForm),r=!0):this.isTooltipOnly&&!r&&(this._bindLink(a,""),r=!0)),this.container.classList.add("linkAnnotation"),r&&this.container.append(a),this.container}#t(){this.container.setAttribute("data-internal-link","")}_bindLink(t,i,a=""){t.href=this.linkService.getDestinationHash(i),t.onclick=()=>(i&&this.linkService.goToDestination(i),!1),(i||i==="")&&this.#t(),a&&(t.title=a)}_bindNamedAction(t,i,a=""){t.href=this.linkService.getAnchorUrl(""),t.onclick=()=>(this.linkService.executeNamedAction(i),!1),a&&(t.title=a),this.#t()}#e(t,i,a="",r=null){t.href=this.linkService.getAnchorUrl(""),i.description?t.title=i.description:a&&(t.title=a),t.onclick=()=>(this.downloadManager?.openOrDownloadData(i.content,i.filename,r),!1),this.#t()}#n(t,i,a=""){t.href=this.linkService.getAnchorUrl(""),t.onclick=()=>(this.linkService.executeSetOCGState(i),!1),a&&(t.title=a),this.#t()}_bindJSAction(t,i){t.href=this.linkService.getAnchorUrl("");const a=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(const r of Object.keys(i.actions)){const c=a.get(r);c&&(t[c]=()=>(this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:i.id,name:r}}),!1))}i.overlaidText&&(t.title=i.overlaidText),t.onclick||(t.onclick=()=>!1),this.#t()}_bindResetFormAction(t,i){const a=t.onclick;if(a||(t.href=this.linkService.getAnchorUrl("")),this.#t(),!this._fieldObjects){Ct('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),a||(t.onclick=()=>!1);return}t.onclick=()=>{a?.();const{fields:r,refs:c,include:u}=i,h=[];if(r.length!==0||c.length!==0){const g=new Set(c);for(const y of r){const b=this._fieldObjects[y]||[];for(const{id:S}of b)g.add(S)}for(const y of Object.values(this._fieldObjects))for(const b of y)g.has(b.id)===u&&h.push(b)}else for(const g of Object.values(this._fieldObjects))h.push(...g);const p=this.annotationStorage,m=[];for(const g of h){const{id:y}=g;switch(m.push(y),g.type){case"text":{const S=g.defaultValue||"";p.setValue(y,{value:S});break}case"checkbox":case"radiobutton":{const S=g.defaultValue===g.exportValues;p.setValue(y,{value:S});break}case"combobox":case"listbox":{const S=g.defaultValue||"";p.setValue(y,{value:S});break}default:continue}const b=document.querySelector(`[data-element-id="${y}"]`);if(b){if(!Ta.has(b)){Ct(`_bindResetFormAction - element not allowed: ${y}`);continue}}else continue;b.dispatchEvent(new Event("resetform"))}return this.enableScripting&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:m,name:"ResetForm"}}),!1}}}class LO extends _e{constructor(t){super(t,{isRenderable:!0})}render(){this.container.classList.add("textAnnotation");const t=document.createElement("img");return t.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",t.setAttribute("data-l10n-id","pdfjs-text-annotation-type"),t.setAttribute("data-l10n-args",JSON.stringify({type:this.data.name})),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.append(t),this.container}}class wa extends _e{render(){return this.container}showElementAndHideCanvas(t){this.data.hasOwnCanvas&&(t.previousSibling?.nodeName==="CANVAS"&&(t.previousSibling.hidden=!0),t.hidden=!1)}_getKeyModifier(t){return Ve.platform.isMac?t.metaKey:t.ctrlKey}_setEventListener(t,i,a,r,c){a.includes("mouse")?t.addEventListener(a,u=>{this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:r,value:c(u),shift:u.shiftKey,modifier:this._getKeyModifier(u)}})}):t.addEventListener(a,u=>{if(a==="blur"){if(!i.focused||!u.relatedTarget)return;i.focused=!1}else if(a==="focus"){if(i.focused)return;i.focused=!0}c&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:r,value:c(u)}})})}_setEventListeners(t,i,a,r){for(const[c,u]of a)(u==="Action"||this.data.actions?.[u])&&((u==="Focus"||u==="Blur")&&(i||={focused:!1}),this._setEventListener(t,i,c,u,r),u==="Focus"&&!this.data.actions?.Blur?this._setEventListener(t,i,"blur","Blur",null):u==="Blur"&&!this.data.actions?.Focus&&this._setEventListener(t,i,"focus","Focus",null))}_setBackgroundColor(t){const i=this.data.backgroundColor||null;t.style.backgroundColor=i===null?"transparent":mt.makeHexColor(i[0],i[1],i[2])}_setTextStyle(t){const i=["left","center","right"],{fontColor:a}=this.data.defaultAppearanceData,r=this.data.defaultAppearanceData.fontSize||kO,c=t.style;let u;const h=2,p=m=>Math.round(10*m)/10;if(this.data.multiLine){const m=Math.abs(this.data.rect[3]-this.data.rect[1]-h),g=Math.round(m/(Of*r))||1,y=m/g;u=Math.min(r,p(y/Of))}else{const m=Math.abs(this.data.rect[3]-this.data.rect[1]-h);u=Math.min(r,p(m/Of))}c.fontSize=`calc(${u}px * var(--total-scale-factor))`,c.color=mt.makeHexColor(a[0],a[1],a[2]),this.data.textAlignment!==null&&(c.textAlign=i[this.data.textAlignment])}_setRequired(t,i){i?t.setAttribute("required",!0):t.removeAttribute("required"),t.setAttribute("aria-required",i)}}class IO extends wa{constructor(t){const i=t.renderForms||t.data.hasOwnCanvas||!t.data.hasAppearance&&!!t.data.fieldValue;super(t,{isRenderable:i})}setPropertyOnSiblings(t,i,a,r){const c=this.annotationStorage;for(const u of this._getElementsByName(t.name,t.id))u.domElement&&(u.domElement[i]=a),c.setValue(u.id,{[r]:a})}render(){const t=this.annotationStorage,i=this.data.id;this.container.classList.add("textWidgetAnnotation");let a=null;if(this.renderForms){const r=t.getValue(i,{value:this.data.fieldValue});let c=r.value||"";const u=t.getValue(i,{charLimit:this.data.maxLen}).charLimit;u&&c.length>u&&(c=c.slice(0,u));let h=r.formattedValue||this.data.textContent?.join(`
298
- `)||null;h&&this.data.comb&&(h=h.replaceAll(/\s+/g,""));const p={userValue:c,formattedValue:h,lastCommittedValue:null,commitKey:1,focused:!1};this.data.multiLine?(a=document.createElement("textarea"),a.textContent=h??c,this.data.doNotScroll&&(a.style.overflowY="hidden")):(a=document.createElement("input"),a.type=this.data.password?"password":"text",a.setAttribute("value",h??c),this.data.doNotScroll&&(a.style.overflowX="hidden")),this.data.hasOwnCanvas&&(a.hidden=!0),Ta.add(a),a.setAttribute("data-element-id",i),a.disabled=this.data.readOnly,a.name=this.data.fieldName,a.tabIndex=0;const{datetimeFormat:m,datetimeType:g,timeStep:y}=this.data,b=!!g&&this.enableScripting;m&&(a.title=m),this._setRequired(a,this.data.required),u&&(a.maxLength=u),a.addEventListener("input",A=>{t.setValue(i,{value:A.target.value}),this.setPropertyOnSiblings(a,"value",A.target.value,"value"),p.formattedValue=null}),a.addEventListener("resetform",A=>{const _=this.data.defaultFieldValue??"";a.value=p.userValue=_,p.formattedValue=null});let S=A=>{const{formattedValue:_}=p;_!=null&&(A.target.value=_),A.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){a.addEventListener("focus",_=>{if(p.focused)return;const{target:R}=_;if(b&&(R.type=g,y&&(R.step=y)),p.userValue){const C=p.userValue;if(b)if(g==="time"){const N=new Date(C),O=[N.getHours(),N.getMinutes(),N.getSeconds()];R.value=O.map(U=>U.toString().padStart(2,"0")).join(":")}else R.value=new Date(C-NO).toISOString().split(g==="date"?"T":".",1)[0];else R.value=C}p.lastCommittedValue=R.value,p.commitKey=1,this.data.actions?.Focus||(p.focused=!0)}),a.addEventListener("updatefromsandbox",_=>{this.showElementAndHideCanvas(_.target);const R={value(C){p.userValue=C.detail.value??"",b||t.setValue(i,{value:p.userValue.toString()}),C.target.value=p.userValue},formattedValue(C){const{formattedValue:N}=C.detail;p.formattedValue=N,N!=null&&C.target!==document.activeElement&&(C.target.value=N);const O={formattedValue:N};b&&(O.value=N),t.setValue(i,O)},selRange(C){C.target.setSelectionRange(...C.detail.selRange)},charLimit:C=>{const{charLimit:N}=C.detail,{target:O}=C;if(N===0){O.removeAttribute("maxLength");return}O.setAttribute("maxLength",N);let U=p.userValue;!U||U.length<=N||(U=U.slice(0,N),O.value=p.userValue=U,t.setValue(i,{value:U}),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:i,name:"Keystroke",value:U,willCommit:!0,commitKey:1,selStart:O.selectionStart,selEnd:O.selectionEnd}}))}};this._dispatchEventFromSandbox(R,_)}),a.addEventListener("keydown",_=>{p.commitKey=1;let R=-1;if(_.key==="Escape"?R=0:_.key==="Enter"&&!this.data.multiLine?R=2:_.key==="Tab"&&(p.commitKey=3),R===-1)return;const{value:C}=_.target;p.lastCommittedValue!==C&&(p.lastCommittedValue=C,p.userValue=C,this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:i,name:"Keystroke",value:C,willCommit:!0,commitKey:R,selStart:_.target.selectionStart,selEnd:_.target.selectionEnd}}))});const A=S;S=null,a.addEventListener("blur",_=>{if(!p.focused||!_.relatedTarget)return;this.data.actions?.Blur||(p.focused=!1);const{target:R}=_;let{value:C}=R;if(b){if(C&&g==="time"){const N=C.split(":").map(O=>parseInt(O,10));C=new Date(2e3,0,1,N[0],N[1],N[2]||0).valueOf(),R.step=""}else C=new Date(C).valueOf();R.type="text"}p.userValue=C,p.lastCommittedValue!==C&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:i,name:"Keystroke",value:C,willCommit:!0,commitKey:p.commitKey,selStart:_.target.selectionStart,selEnd:_.target.selectionEnd}}),A(_)}),this.data.actions?.Keystroke&&a.addEventListener("beforeinput",_=>{p.lastCommittedValue=null;const{data:R,target:C}=_,{value:N,selectionStart:O,selectionEnd:U}=C;let I=O,j=U;switch(_.inputType){case"deleteWordBackward":{const F=N.substring(0,O).match(/\w*[^\w]*$/);F&&(I-=F[0].length);break}case"deleteWordForward":{const F=N.substring(O).match(/^[^\w]*\w*/);F&&(j+=F[0].length);break}case"deleteContentBackward":O===U&&(I-=1);break;case"deleteContentForward":O===U&&(j+=1);break}_.preventDefault(),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:i,name:"Keystroke",value:N,change:R||"",willCommit:!1,selStart:I,selEnd:j}})}),this._setEventListeners(a,p,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],_=>_.target.value)}if(S&&a.addEventListener("blur",S),this.data.comb){const _=(this.data.rect[2]-this.data.rect[0])/u;a.classList.add("comb"),a.style.letterSpacing=`calc(${_}px * var(--total-scale-factor) - 1ch)`}}else a=document.createElement("div"),a.textContent=this.data.fieldValue,a.style.verticalAlign="middle",a.style.display="table-cell",this.data.hasOwnCanvas&&(a.hidden=!0);return this._setTextStyle(a),this._setBackgroundColor(a),this._setDefaultPropertiesFromJS(a),this.container.append(a),this.container}}class PO extends wa{constructor(t){super(t,{isRenderable:!!t.data.hasOwnCanvas})}}class UO extends wa{constructor(t){super(t,{isRenderable:t.renderForms})}render(){const t=this.annotationStorage,i=this.data,a=i.id;let r=t.getValue(a,{value:i.exportValue===i.fieldValue}).value;typeof r=="string"&&(r=r!=="Off",t.setValue(a,{value:r})),this.container.classList.add("buttonWidgetAnnotation","checkBox");const c=document.createElement("input");return Ta.add(c),c.setAttribute("data-element-id",a),c.disabled=i.readOnly,this._setRequired(c,this.data.required),c.type="checkbox",c.name=i.fieldName,r&&c.setAttribute("checked",!0),c.setAttribute("exportValue",i.exportValue),c.tabIndex=0,c.addEventListener("change",u=>{const{name:h,checked:p}=u.target;for(const m of this._getElementsByName(h,a)){const g=p&&m.exportValue===i.exportValue;m.domElement&&(m.domElement.checked=g),t.setValue(m.id,{value:g})}t.setValue(a,{value:p})}),c.addEventListener("resetform",u=>{const h=i.defaultFieldValue||"Off";u.target.checked=h===i.exportValue}),this.enableScripting&&this.hasJSActions&&(c.addEventListener("updatefromsandbox",u=>{const h={value(p){p.target.checked=p.detail.value!=="Off",t.setValue(a,{value:p.target.checked})}};this._dispatchEventFromSandbox(h,u)}),this._setEventListeners(c,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],u=>u.target.checked)),this._setBackgroundColor(c),this._setDefaultPropertiesFromJS(c),this.container.append(c),this.container}}class L0 extends wa{constructor(t){super(t,{isRenderable:t.renderForms})}render(){this.container.classList.add("buttonWidgetAnnotation","radioButton");const t=this.annotationStorage,i=this.data,a=i.id;let r=t.getValue(a,{value:i.fieldValue===i.buttonValue}).value;if(typeof r=="string"&&(r=r!==i.buttonValue,t.setValue(a,{value:r})),r)for(const u of this._getElementsByName(i.fieldName,a))t.setValue(u.id,{value:!1});const c=document.createElement("input");if(Ta.add(c),c.setAttribute("data-element-id",a),c.disabled=i.readOnly,this._setRequired(c,this.data.required),c.type="radio",c.name=i.fieldName,r&&c.setAttribute("checked",!0),c.tabIndex=0,c.addEventListener("change",u=>{const{name:h,checked:p}=u.target;for(const m of this._getElementsByName(h,a))t.setValue(m.id,{value:!1});t.setValue(a,{value:p})}),c.addEventListener("resetform",u=>{const h=i.defaultFieldValue;u.target.checked=h!=null&&h===i.buttonValue}),this.enableScripting&&this.hasJSActions){const u=i.buttonValue;c.addEventListener("updatefromsandbox",h=>{const p={value:m=>{const g=u===m.detail.value;for(const y of this._getElementsByName(m.target.name)){const b=g&&y.id===a;y.domElement&&(y.domElement.checked=b),t.setValue(y.id,{value:b})}}};this._dispatchEventFromSandbox(p,h)}),this._setEventListeners(c,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],h=>h.target.checked)}return this._setBackgroundColor(c),this._setDefaultPropertiesFromJS(c),this.container.append(c),this.container}}class zO extends ep{constructor(t){super(t,{ignoreBorder:t.data.hasAppearance})}render(){const t=super.render();t.classList.add("buttonWidgetAnnotation","pushButton");const i=t.lastChild;return this.enableScripting&&this.hasJSActions&&i&&(this._setDefaultPropertiesFromJS(i),i.addEventListener("updatefromsandbox",a=>{this._dispatchEventFromSandbox({},a)})),t}}class HO extends wa{constructor(t){super(t,{isRenderable:t.renderForms})}render(){this.container.classList.add("choiceWidgetAnnotation");const t=this.annotationStorage,i=this.data.id,a=t.getValue(i,{value:this.data.fieldValue}),r=document.createElement("select");Ta.add(r),r.setAttribute("data-element-id",i),r.disabled=this.data.readOnly,this._setRequired(r,this.data.required),r.name=this.data.fieldName,r.tabIndex=0;let c=this.data.combo&&this.data.options.length>0;this.data.combo||(r.size=this.data.options.length,this.data.multiSelect&&(r.multiple=!0)),r.addEventListener("resetform",g=>{const y=this.data.defaultFieldValue;for(const b of r.options)b.selected=b.value===y});for(const g of this.data.options){const y=document.createElement("option");y.textContent=g.displayValue,y.value=g.exportValue,a.value.includes(g.exportValue)&&(y.setAttribute("selected",!0),c=!1),r.append(y)}let u=null;if(c){const g=document.createElement("option");g.value=" ",g.setAttribute("hidden",!0),g.setAttribute("selected",!0),r.prepend(g),u=()=>{g.remove(),r.removeEventListener("input",u),u=null},r.addEventListener("input",u)}const h=g=>{const y=g?"value":"textContent",{options:b,multiple:S}=r;return S?Array.prototype.filter.call(b,A=>A.selected).map(A=>A[y]):b.selectedIndex===-1?null:b[b.selectedIndex][y]};let p=h(!1);const m=g=>{const y=g.target.options;return Array.prototype.map.call(y,b=>({displayValue:b.textContent,exportValue:b.value}))};return this.enableScripting&&this.hasJSActions?(r.addEventListener("updatefromsandbox",g=>{const y={value(b){u?.();const S=b.detail.value,A=new Set(Array.isArray(S)?S:[S]);for(const _ of r.options)_.selected=A.has(_.value);t.setValue(i,{value:h(!0)}),p=h(!1)},multipleSelection(b){r.multiple=!0},remove(b){const S=r.options,A=b.detail.remove;S[A].selected=!1,r.remove(A),S.length>0&&Array.prototype.findIndex.call(S,R=>R.selected)===-1&&(S[0].selected=!0),t.setValue(i,{value:h(!0),items:m(b)}),p=h(!1)},clear(b){for(;r.length!==0;)r.remove(0);t.setValue(i,{value:null,items:[]}),p=h(!1)},insert(b){const{index:S,displayValue:A,exportValue:_}=b.detail.insert,R=r.children[S],C=document.createElement("option");C.textContent=A,C.value=_,R?R.before(C):r.append(C),t.setValue(i,{value:h(!0),items:m(b)}),p=h(!1)},items(b){const{items:S}=b.detail;for(;r.length!==0;)r.remove(0);for(const A of S){const{displayValue:_,exportValue:R}=A,C=document.createElement("option");C.textContent=_,C.value=R,r.append(C)}r.options.length>0&&(r.options[0].selected=!0),t.setValue(i,{value:h(!0),items:m(b)}),p=h(!1)},indices(b){const S=new Set(b.detail.indices);for(const A of b.target.options)A.selected=S.has(A.index);t.setValue(i,{value:h(!0)}),p=h(!1)},editable(b){b.target.disabled=!b.detail.editable}};this._dispatchEventFromSandbox(y,g)}),r.addEventListener("input",g=>{const y=h(!0),b=h(!1);t.setValue(i,{value:y}),g.preventDefault(),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:i,name:"Keystroke",value:p,change:b,changeEx:y,willCommit:!1,commitKey:1,keyDown:!1}})}),this._setEventListeners(r,null,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],g=>g.target.value)):r.addEventListener("input",function(g){t.setValue(i,{value:h(!0)})}),this.data.combo&&this._setTextStyle(r),this._setBackgroundColor(r),this._setDefaultPropertiesFromJS(r),this.container.append(r),this.container}}class np extends _e{constructor(t){const{data:i,elements:a}=t;super(t,{isRenderable:_e._hasPopupData(i)}),this.elements=a,this.popup=null}render(){const{container:t}=this;t.classList.add("popupAnnotation"),t.role="comment";const i=this.popup=new BO({container:this.container,color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate||this.data.creationDate,contentsObj:this.data.contentsObj,richText:this.data.richText,rect:this.data.rect,parentRect:this.data.parentRect||null,parent:this.parent,elements:this.elements,open:this.data.open}),a=[];for(const r of this.elements)r.popup=i,r.container.ariaHasPopup="dialog",a.push(r.data.id),r.addHighlightArea();return this.container.setAttribute("aria-controls",a.map(r=>`${Pf}${r}`).join(",")),this.container}}class BO{#t=this.#M.bind(this);#e=this.#k.bind(this);#n=this.#C.bind(this);#i=this.#x.bind(this);#a=null;#s=null;#r=null;#o=null;#u=null;#c=null;#h=null;#l=!1;#p=null;#g=null;#f=null;#d=null;#m=null;#v=null;#y=null;#E=!1;constructor({container:t,color:i,elements:a,titleObj:r,modificationDate:c,contentsObj:u,richText:h,parent:p,rect:m,parentRect:g,open:y}){this.#s=t,this.#v=r,this.#r=u,this.#m=h,this.#c=p,this.#a=i,this.#d=m,this.#h=g,this.#u=a,this.#o=Hf.toDateObject(c),this.trigger=a.flatMap(b=>b.getElementsToTriggerPopup()),this.#A(),this.#s.hidden=!0,y&&this.#x()}#A(){if(this.#g)return;this.#g=new AbortController;const{signal:t}=this.#g;for(const i of this.trigger)i.addEventListener("click",this.#i,{signal:t}),i.addEventListener("mouseenter",this.#n,{signal:t}),i.addEventListener("mouseleave",this.#e,{signal:t}),i.classList.add("popupTriggerArea");for(const i of this.#u)i.container?.addEventListener("keydown",this.#t,{signal:t})}render(){if(this.#p)return;const t=this.#p=document.createElement("div");if(t.className="popup",this.#a){const r=t.style.outlineColor=mt.makeHexColor(...this.#a);t.style.backgroundColor=`color-mix(in srgb, ${r} 30%, white)`}const i=document.createElement("span");if(i.className="header",this.#v?.str){const r=document.createElement("span");r.className="title",i.append(r),{dir:r.dir,str:r.textContent}=this.#v}if(t.append(i),this.#o){const r=document.createElement("time");r.className="popupDate",r.setAttribute("data-l10n-id","pdfjs-annotation-date-time-string"),r.setAttribute("data-l10n-args",JSON.stringify({dateObj:this.#o.valueOf()})),r.dateTime=this.#o.toISOString(),i.append(r)}const a=this.#b;if(a)k0.render({xfaHtml:a,intent:"richText",div:t}),t.lastChild.classList.add("richText","popupContent");else{const r=this._formatContents(this.#r);t.append(r)}this.#s.append(t)}get#b(){const t=this.#m,i=this.#r;return t?.str&&(!i?.str||i.str===t.str)&&this.#m.html||null}get#T(){return this.#b?.attributes?.style?.fontSize||0}get#D(){return this.#b?.attributes?.style?.color||null}#_(t){const i=[],a={str:t,html:{name:"div",attributes:{dir:"auto"},children:[{name:"p",children:i}]}},r={style:{color:this.#D,fontSize:this.#T?`calc(${this.#T}px * var(--total-scale-factor))`:""}};for(const c of t.split(`
299
- `))i.push({name:"span",value:c,attributes:r});return a}_formatContents({str:t,dir:i}){const a=document.createElement("p");a.classList.add("popupContent"),a.dir=i;const r=t.split(/(?:\r\n?|\n)/);for(let c=0,u=r.length;c<u;++c){const h=r[c];a.append(document.createTextNode(h)),c<u-1&&a.append(document.createElement("br"))}return a}#M(t){t.altKey||t.shiftKey||t.ctrlKey||t.metaKey||(t.key==="Enter"||t.key==="Escape"&&this.#l)&&this.#x()}updateEdited({rect:t,popup:i,deleted:a}){if(a||i?.deleted){this.remove();return}this.#A(),this.#y||={contentsObj:this.#r,richText:this.#m},t&&(this.#f=null),i&&(this.#m=this.#_(i.text),this.#o=Hf.toDateObject(i.date),this.#r=null),this.#p?.remove(),this.#p=null}resetEdited(){this.#y&&({contentsObj:this.#r,richText:this.#m}=this.#y,this.#y=null,this.#p?.remove(),this.#p=null,this.#f=null)}remove(){this.#g?.abort(),this.#g=null,this.#p?.remove(),this.#p=null,this.#E=!1,this.#l=!1;for(const t of this.trigger)t.classList.remove("popupTriggerArea")}#R(){if(this.#f!==null)return;const{page:{view:t},viewport:{rawDims:{pageWidth:i,pageHeight:a,pageX:r,pageY:c}}}=this.#c;let u=!!this.#h,h=u?this.#h:this.#d;for(const A of this.#u)if(!h||mt.intersect(A.data.rect,h)!==null){h=A.data.rect,u=!0;break}const p=mt.normalizeRect([h[0],t[3]-h[1]+t[1],h[2],t[3]-h[3]+t[1]]),g=u?h[2]-h[0]+5:0,y=p[0]+g,b=p[1];this.#f=[100*(y-r)/i,100*(b-c)/a];const{style:S}=this.#s;S.left=`${this.#f[0]}%`,S.top=`${this.#f[1]}%`}#x(){this.#l=!this.#l,this.#l?(this.#C(),this.#s.addEventListener("click",this.#i),this.#s.addEventListener("keydown",this.#t)):(this.#k(),this.#s.removeEventListener("click",this.#i),this.#s.removeEventListener("keydown",this.#t))}#C(){this.#p||this.render(),this.isVisible?this.#l&&this.#s.classList.add("focused"):(this.#R(),this.#s.hidden=!1,this.#s.style.zIndex=parseInt(this.#s.style.zIndex)+1e3)}#k(){this.#s.classList.remove("focused"),!(this.#l||!this.isVisible)&&(this.#s.hidden=!0,this.#s.style.zIndex=parseInt(this.#s.style.zIndex)-1e3)}forceHide(){this.#E=this.isVisible,this.#E&&(this.#s.hidden=!0)}maybeShow(){this.#A(),this.#E&&(this.#p||this.#C(),this.#E=!1,this.#s.hidden=!1)}get isVisible(){return this.#s.hidden===!1}}class I0 extends _e{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0}),this.textContent=t.data.textContent,this.textPosition=t.data.textPosition,this.annotationEditorType=wt.FREETEXT}render(){if(this.container.classList.add("freeTextAnnotation"),this.textContent){const t=document.createElement("div");t.classList.add("annotationTextContent"),t.setAttribute("role","comment");for(const i of this.textContent){const a=document.createElement("span");a.textContent=i,t.append(a)}this.container.append(t)}return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this._editOnDoubleClick(),this.container}}class FO extends _e{#t=null;constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0})}render(){this.container.classList.add("lineAnnotation");const{data:t,width:i,height:a}=this,r=this.svgFactory.create(i,a,!0),c=this.#t=this.svgFactory.createElement("svg:line");return c.setAttribute("x1",t.rect[2]-t.lineCoordinates[0]),c.setAttribute("y1",t.rect[3]-t.lineCoordinates[1]),c.setAttribute("x2",t.rect[2]-t.lineCoordinates[2]),c.setAttribute("y2",t.rect[3]-t.lineCoordinates[3]),c.setAttribute("stroke-width",t.borderStyle.width||1),c.setAttribute("stroke","transparent"),c.setAttribute("fill","transparent"),r.append(c),this.container.append(r),!t.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#t}addHighlightArea(){this.container.classList.add("highlightArea")}}class jO extends _e{#t=null;constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0})}render(){this.container.classList.add("squareAnnotation");const{data:t,width:i,height:a}=this,r=this.svgFactory.create(i,a,!0),c=t.borderStyle.width,u=this.#t=this.svgFactory.createElement("svg:rect");return u.setAttribute("x",c/2),u.setAttribute("y",c/2),u.setAttribute("width",i-c),u.setAttribute("height",a-c),u.setAttribute("stroke-width",c||1),u.setAttribute("stroke","transparent"),u.setAttribute("fill","transparent"),r.append(u),this.container.append(r),!t.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#t}addHighlightArea(){this.container.classList.add("highlightArea")}}class $O extends _e{#t=null;constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0})}render(){this.container.classList.add("circleAnnotation");const{data:t,width:i,height:a}=this,r=this.svgFactory.create(i,a,!0),c=t.borderStyle.width,u=this.#t=this.svgFactory.createElement("svg:ellipse");return u.setAttribute("cx",i/2),u.setAttribute("cy",a/2),u.setAttribute("rx",i/2-c/2),u.setAttribute("ry",a/2-c/2),u.setAttribute("stroke-width",c||1),u.setAttribute("stroke","transparent"),u.setAttribute("fill","transparent"),r.append(u),this.container.append(r),!t.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#t}addHighlightArea(){this.container.classList.add("highlightArea")}}class P0 extends _e{#t=null;constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0}),this.containerClassName="polylineAnnotation",this.svgElementName="svg:polyline"}render(){this.container.classList.add(this.containerClassName);const{data:{rect:t,vertices:i,borderStyle:a,popupRef:r},width:c,height:u}=this;if(!i)return this.container;const h=this.svgFactory.create(c,u,!0);let p=[];for(let g=0,y=i.length;g<y;g+=2){const b=i[g]-t[0],S=t[3]-i[g+1];p.push(`${b},${S}`)}p=p.join(" ");const m=this.#t=this.svgFactory.createElement(this.svgElementName);return m.setAttribute("points",p),m.setAttribute("stroke-width",a.width||1),m.setAttribute("stroke","transparent"),m.setAttribute("fill","transparent"),h.append(m),this.container.append(h),!r&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#t}addHighlightArea(){this.container.classList.add("highlightArea")}}class GO extends P0{constructor(t){super(t),this.containerClassName="polygonAnnotation",this.svgElementName="svg:polygon"}}class VO extends _e{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0})}render(){return this.container.classList.add("caretAnnotation"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container}}class ip extends _e{#t=null;#e=[];constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0}),this.containerClassName="inkAnnotation",this.svgElementName="svg:polyline",this.annotationEditorType=this.data.it==="InkHighlight"?wt.HIGHLIGHT:wt.INK}#n(t,i){switch(t){case 90:return{transform:`rotate(90) translate(${-i[0]},${i[1]}) scale(1,-1)`,width:i[3]-i[1],height:i[2]-i[0]};case 180:return{transform:`rotate(180) translate(${-i[2]},${i[1]}) scale(1,-1)`,width:i[2]-i[0],height:i[3]-i[1]};case 270:return{transform:`rotate(270) translate(${-i[2]},${i[3]}) scale(1,-1)`,width:i[3]-i[1],height:i[2]-i[0]};default:return{transform:`translate(${-i[0]},${i[3]}) scale(1,-1)`,width:i[2]-i[0],height:i[3]-i[1]}}}render(){this.container.classList.add(this.containerClassName);const{data:{rect:t,rotation:i,inkLists:a,borderStyle:r,popupRef:c}}=this,{transform:u,width:h,height:p}=this.#n(i,t),m=this.svgFactory.create(h,p,!0),g=this.#t=this.svgFactory.createElement("svg:g");m.append(g),g.setAttribute("stroke-width",r.width||1),g.setAttribute("stroke-linecap","round"),g.setAttribute("stroke-linejoin","round"),g.setAttribute("stroke-miterlimit",10),g.setAttribute("stroke","transparent"),g.setAttribute("fill","transparent"),g.setAttribute("transform",u);for(let y=0,b=a.length;y<b;y++){const S=this.svgFactory.createElement(this.svgElementName);this.#e.push(S),S.setAttribute("points",a[y].join(",")),g.append(S)}return!c&&this.hasPopupData&&this._createPopup(),this.container.append(m),this._editOnDoubleClick(),this.container}updateEdited(t){super.updateEdited(t);const{thickness:i,points:a,rect:r}=t,c=this.#t;if(i>=0&&c.setAttribute("stroke-width",i||1),a)for(let u=0,h=this.#e.length;u<h;u++)this.#e[u].setAttribute("points",a[u].join(","));if(r){const{transform:u,width:h,height:p}=this.#n(this.data.rotation,r);c.parentElement.setAttribute("viewBox",`0 0 ${h} ${p}`),c.setAttribute("transform",u)}}getElementsToTriggerPopup(){return this.#e}addHighlightArea(){this.container.classList.add("highlightArea")}}class U0 extends _e{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0}),this.annotationEditorType=wt.HIGHLIGHT}render(){const{data:{overlaidText:t,popupRef:i}}=this;if(!i&&this.hasPopupData&&this._createPopup(),this.container.classList.add("highlightAnnotation"),this._editOnDoubleClick(),t){const a=document.createElement("mark");a.classList.add("overlaidText"),a.textContent=t,this.container.append(a)}return this.container}}class qO extends _e{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){const{data:{overlaidText:t,popupRef:i}}=this;if(!i&&this.hasPopupData&&this._createPopup(),this.container.classList.add("underlineAnnotation"),t){const a=document.createElement("u");a.classList.add("overlaidText"),a.textContent=t,this.container.append(a)}return this.container}}class YO extends _e{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){const{data:{overlaidText:t,popupRef:i}}=this;if(!i&&this.hasPopupData&&this._createPopup(),this.container.classList.add("squigglyAnnotation"),t){const a=document.createElement("u");a.classList.add("overlaidText"),a.textContent=t,this.container.append(a)}return this.container}}class XO extends _e{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){const{data:{overlaidText:t,popupRef:i}}=this;if(!i&&this.hasPopupData&&this._createPopup(),this.container.classList.add("strikeoutAnnotation"),t){const a=document.createElement("s");a.classList.add("overlaidText"),a.textContent=t,this.container.append(a)}return this.container}}class z0 extends _e{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0}),this.annotationEditorType=wt.STAMP}render(){return this.container.classList.add("stampAnnotation"),this.container.setAttribute("role","img"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this._editOnDoubleClick(),this.container}}class WO extends _e{#t=null;constructor(t){super(t,{isRenderable:!0});const{file:i}=this.data;this.filename=i.filename,this.content=i.content,this.linkService.eventBus?.dispatch("fileattachmentannotation",{source:this,...i})}render(){this.container.classList.add("fileAttachmentAnnotation");const{container:t,data:i}=this;let a;i.hasAppearance||i.fillAlpha===0?a=document.createElement("div"):(a=document.createElement("img"),a.src=`${this.imageResourcesPath}annotation-${/paperclip/i.test(i.name)?"paperclip":"pushpin"}.svg`,i.fillAlpha&&i.fillAlpha<1&&(a.style=`filter: opacity(${Math.round(i.fillAlpha*100)}%);`)),a.addEventListener("dblclick",this.#e.bind(this)),this.#t=a;const{isMac:r}=Ve.platform;return t.addEventListener("keydown",c=>{c.key==="Enter"&&(r?c.metaKey:c.ctrlKey)&&this.#e()}),!i.popupRef&&this.hasPopupData?this._createPopup():a.classList.add("popupTriggerArea"),t.append(a),t}getElementsToTriggerPopup(){return this.#t}addHighlightArea(){this.container.classList.add("highlightArea")}#e(){this.downloadManager?.openOrDownloadData(this.content,this.filename)}}class sp{#t=null;#e=null;#n=new Map;#i=null;constructor({div:t,accessibilityManager:i,annotationCanvasMap:a,annotationEditorUIManager:r,page:c,viewport:u,structTreeLayer:h}){this.div=t,this.#t=i,this.#e=a,this.#i=h||null,this.page=c,this.viewport=u,this.zIndex=0,this._annotationEditorUIManager=r}hasEditableAnnotations(){return this.#n.size>0}async#a(t,i,a){const r=t.firstChild||t,c=r.id=`${Pf}${i}`,u=await this.#i?.getAriaAttributes(c);if(u)for(const[h,p]of u)r.setAttribute(h,p);a?a.at(-1).container.after(t):(this.div.append(t),this.#t?.moveElementInDOM(this.div,t,r,!1))}async render(t){const{annotations:i}=t,a=this.div;_a(a,this.viewport);const r=new Map,c={data:null,layer:a,linkService:t.linkService,downloadManager:t.downloadManager,imageResourcesPath:t.imageResourcesPath||"",renderForms:t.renderForms!==!1,svgFactory:new Du,annotationStorage:t.annotationStorage||new Gf,enableScripting:t.enableScripting===!0,hasJSActions:t.hasJSActions,fieldObjects:t.fieldObjects,parent:this,elements:null};for(const u of i){if(u.noHTML)continue;const h=u.annotationType===De.POPUP;if(h){const g=r.get(u.id);if(!g)continue;c.elements=g}else if(u.rect[2]===u.rect[0]||u.rect[3]===u.rect[1])continue;c.data=u;const p=N0.create(c);if(!p.isRenderable)continue;if(!h&&u.popupRef){const g=r.get(u.popupRef);g?g.push(p):r.set(u.popupRef,[p])}const m=p.render();u.hidden&&(m.style.visibility="hidden"),await this.#a(m,u.id,c.elements),p._isEditable&&(this.#n.set(p.data.id,p),this._annotationEditorUIManager?.renderAnnotationElement(p))}this.#s()}async addLinkAnnotations(t,i){const a={data:null,layer:this.div,linkService:i,svgFactory:new Du,parent:this};for(const r of t){r.borderStyle||=sp._defaultBorderStyle,a.data=r;const c=N0.create(a);if(!c.isRenderable)continue;const u=c.render();await this.#a(u,r.id,null)}}update({viewport:t}){const i=this.div;this.viewport=t,_a(i,{rotation:t.rotation}),this.#s(),i.hidden=!1}#s(){if(!this.#e)return;const t=this.div;for(const[i,a]of this.#e){const r=t.querySelector(`[data-annotation-id="${i}"]`);if(!r)continue;a.className="annotationContent";const{firstChild:c}=r;c?c.nodeName==="CANVAS"?c.replaceWith(a):c.classList.contains("annotationContent")?c.after(a):c.before(a):r.append(a);const u=this.#n.get(i);u&&(u._hasNoCanvas?(this._annotationEditorUIManager?.setMissingCanvas(i,r.id,a),u._hasNoCanvas=!1):u.canvas=a)}this.#e.clear()}getEditableAnnotations(){return Array.from(this.#n.values())}getEditableAnnotation(t){return this.#n.get(t)}static get _defaultBorderStyle(){return zt(this,"_defaultBorderStyle",Object.freeze({width:1,rawWidth:1,style:_r.SOLID,dashArray:[3],horizontalCornerRadius:0,verticalCornerRadius:0}))}}const Mu=/\r\n?|\n/g;class Ue extends yt{#t;#e="";#n=`${this.id}-editor`;#i=null;#a;_colorPicker=null;static _freeTextDefaultContent="";static _internalPadding=0;static _defaultColor=null;static _defaultFontSize=10;static get _keyboardManager(){const t=Ue.prototype,i=c=>c.isEmpty(),a=Us.TRANSLATE_SMALL,r=Us.TRANSLATE_BIG;return zt(this,"_keyboardManager",new tl([[["ctrl+s","mac+meta+s","ctrl+p","mac+meta+p"],t.commitOrRemove,{bubbles:!0}],[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],t.commitOrRemove],[["ArrowLeft","mac+ArrowLeft"],t._translateEmpty,{args:[-a,0],checker:i}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t._translateEmpty,{args:[-r,0],checker:i}],[["ArrowRight","mac+ArrowRight"],t._translateEmpty,{args:[a,0],checker:i}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t._translateEmpty,{args:[r,0],checker:i}],[["ArrowUp","mac+ArrowUp"],t._translateEmpty,{args:[0,-a],checker:i}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t._translateEmpty,{args:[0,-r],checker:i}],[["ArrowDown","mac+ArrowDown"],t._translateEmpty,{args:[0,a],checker:i}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t._translateEmpty,{args:[0,r],checker:i}]]))}static _type="freetext";static _editorType=wt.FREETEXT;constructor(t){super({...t,name:"freeTextEditor"}),this.#t=t.color||Ue._defaultColor||yt._defaultLineColor,this.#a=t.fontSize||Ue._defaultFontSize,this.annotationElementId||this._uiManager.a11yAlert("pdfjs-editor-freetext-added-alert")}static initialize(t,i){yt.initialize(t,i);const a=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(a.getPropertyValue("--freetext-padding"))}static updateDefaultParams(t,i){switch(t){case $t.FREETEXT_SIZE:Ue._defaultFontSize=i;break;case $t.FREETEXT_COLOR:Ue._defaultColor=i;break}}updateParams(t,i){switch(t){case $t.FREETEXT_SIZE:this.#s(i);break;case $t.FREETEXT_COLOR:this.#r(i);break}}static get defaultPropertiesToUpdate(){return[[$t.FREETEXT_SIZE,Ue._defaultFontSize],[$t.FREETEXT_COLOR,Ue._defaultColor||yt._defaultLineColor]]}get propertiesToUpdate(){return[[$t.FREETEXT_SIZE,this.#a],[$t.FREETEXT_COLOR,this.#t]]}get toolbarButtons(){return this._colorPicker||=new ol(this),[["colorPicker",this._colorPicker]]}get colorType(){return $t.FREETEXT_COLOR}get colorValue(){return this.#t}#s(t){const i=r=>{this.editorDiv.style.fontSize=`calc(${r}px * var(--total-scale-factor))`,this.translate(0,-(r-this.#a)*this.parentScale),this.#a=r,this.#u()},a=this.#a;this.addCommands({cmd:i.bind(this,t),undo:i.bind(this,a),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:$t.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})}#r(t){const i=r=>{this.#t=this.editorDiv.style.color=r,this._colorPicker?.update(r)},a=this.#t;this.addCommands({cmd:i.bind(this,t),undo:i.bind(this,a),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:$t.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})}_translateEmpty(t,i){this._uiManager.translateSelectedEditors(t,i,!0)}getInitialTranslation(){const t=this.parentScale;return[-Ue._internalPadding*t,-(Ue._internalPadding+this.#a)*t]}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.isAttachedToDOM||this.parent.add(this)))}enableEditMode(){if(!super.enableEditMode())return!1;this.overlayDiv.classList.remove("enabled"),this.editorDiv.contentEditable=!0,this._isDraggable=!1,this.div.removeAttribute("aria-activedescendant"),this.#i=new AbortController;const t=this._uiManager.combinedSignal(this.#i);return this.editorDiv.addEventListener("keydown",this.editorDivKeydown.bind(this),{signal:t}),this.editorDiv.addEventListener("focus",this.editorDivFocus.bind(this),{signal:t}),this.editorDiv.addEventListener("blur",this.editorDivBlur.bind(this),{signal:t}),this.editorDiv.addEventListener("input",this.editorDivInput.bind(this),{signal:t}),this.editorDiv.addEventListener("paste",this.editorDivPaste.bind(this),{signal:t}),!0}disableEditMode(){return super.disableEditMode()?(this.overlayDiv.classList.add("enabled"),this.editorDiv.contentEditable=!1,this.div.setAttribute("aria-activedescendant",this.#n),this._isDraggable=!0,this.#i?.abort(),this.#i=null,this.div.focus({preventScroll:!0}),this.isEditing=!1,this.parent.div.classList.add("freetextEditing"),!0):!1}focusin(t){this._focusEventsAllowed&&(super.focusin(t),t.target!==this.editorDiv&&this.editorDiv.focus())}onceAdded(t){this.width||(this.enableEditMode(),t&&this.editorDiv.focus(),this._initialOptions?.isCentered&&this.center(),this._initialOptions=null)}isEmpty(){return!this.editorDiv||this.editorDiv.innerText.trim()===""}remove(){this.isEditing=!1,this.parent&&(this.parent.setEditingState(!0),this.parent.div.classList.add("freetextEditing")),super.remove()}#o(){const t=[];this.editorDiv.normalize();let i=null;for(const a of this.editorDiv.childNodes)i?.nodeType===Node.TEXT_NODE&&a.nodeName==="BR"||(t.push(Ue.#c(a)),i=a);return t.join(`
296
+ `,document.head.appendChild(tt),()=>{document.head.removeChild(tt)}},[]),ye.jsxDEV(ye.Fragment,{children:[!p&&ye.jsxDEV("button",{id:"chatjt-open-button",style:at,onClick:()=>m(!0),onMouseEnter:tt=>{tt.currentTarget.style.transform="translateY(-10%) scale(1.05)",tt.currentTarget.style.boxShadow="0 4px 12px rgba(0, 0, 0, 0.2)"},onMouseLeave:tt=>{tt.currentTarget.style.transform="",tt.currentTarget.style.boxShadow="0 4px 8px rgba(0, 0, 0, 0.2)"},children:ye.jsxDEV("img",{src:t,alt:"Abrir ChatJT",style:K},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/ExtensionPanel.tsx",lineNumber:354,columnNumber:21},void 0)},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/ExtensionPanel.tsx",lineNumber:341,columnNumber:17},void 0),ye.jsxDEV("div",{id:"chatjt-panel",ref:U,style:lt,children:[ye.jsxDEV("div",{id:"chatjt-resizer",ref:j,style:Gt,onMouseMove:tt=>{L?(tt.currentTarget.style.background="linear-gradient(to right, transparent 95%, #1591EA90 95%)",tt.currentTarget.style.left="-160px",tt.currentTarget.style.width="160px"):(tt.currentTarget.style.left="-8px",tt.currentTarget.style.width="8px")},onMouseEnter:tt=>{L||(tt.currentTarget.style.background="#11182750")},onMouseLeave:tt=>{L||(tt.currentTarget.style.background="transparent")}},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/ExtensionPanel.tsx",lineNumber:365,columnNumber:17},void 0),ye.jsxDEV("div",{id:"chatjt-iframe-container",style:dt,children:[b?ye.jsxDEV("div",{id:"chatjt-loading",style:W,children:ye.jsxDEV("div",{style:ht,children:[ye.jsxDEV("div",{style:Zt,children:"⚠️"},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/ExtensionPanel.tsx",lineNumber:397,columnNumber:33},void 0),ye.jsxDEV("div",{style:vt,children:"Erro ao carregar ChatJT"},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/ExtensionPanel.tsx",lineNumber:398,columnNumber:33},void 0),ye.jsxDEV("button",{style:le,onClick:Y,onMouseEnter:tt=>{tt.currentTarget.style.background="rgba(255,255,255,0.3)",tt.currentTarget.style.borderColor="rgba(255,255,255,0.5)",tt.currentTarget.style.transform="translateY(-1px)"},onMouseLeave:tt=>{tt.currentTarget.style.background="rgba(255,255,255,0.2)",tt.currentTarget.style.borderColor="rgba(255,255,255,0.3)",tt.currentTarget.style.transform=""},onMouseDown:tt=>{tt.currentTarget.style.transform="translateY(0)"},children:"Tentar novamente"},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/ExtensionPanel.tsx",lineNumber:399,columnNumber:33},void 0)]},void 0,!0,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/ExtensionPanel.tsx",lineNumber:396,columnNumber:29},void 0)},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/ExtensionPanel.tsx",lineNumber:395,columnNumber:25},void 0):ye.jsxDEV(ye.Fragment,{children:[!g&&ye.jsxDEV("div",{id:"chatjt-loading",style:W,children:ye.jsxDEV("div",{style:ht,children:[ye.jsxDEV("div",{style:st},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/ExtensionPanel.tsx",lineNumber:425,columnNumber:41},void 0),ye.jsxDEV("div",{style:vt,children:"Carregando ChatJT..."},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/ExtensionPanel.tsx",lineNumber:426,columnNumber:41},void 0)]},void 0,!0,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/ExtensionPanel.tsx",lineNumber:424,columnNumber:37},void 0)},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/ExtensionPanel.tsx",lineNumber:423,columnNumber:33},void 0),ye.jsxDEV("iframe",{id:"chatjt-iframe",ref:I,src:l,style:Ct,onLoad:F,onError:J,sandbox:"allow-scripts allow-same-origin allow-forms allow-popups allow-storage-access-by-user-activation allow-top-navigation-by-user-activation allow-modals",allow:"storage-access 'src'"},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/ExtensionPanel.tsx",lineNumber:430,columnNumber:29},void 0)]},void 0,!0,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/ExtensionPanel.tsx",lineNumber:421,columnNumber:25},void 0),ye.jsxDEV("div",{style:Et,children:ye.jsxDEV("div",{style:bt,children:"Solte para fechar"},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/ExtensionPanel.tsx",lineNumber:445,columnNumber:25},void 0)},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/ExtensionPanel.tsx",lineNumber:444,columnNumber:21},void 0)]},void 0,!0,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/ExtensionPanel.tsx",lineNumber:393,columnNumber:17},void 0),ye.jsxDEV("div",{id:"chatjt-close-button",style:B,title:"Fechar painel","aria-label":"Fechar painel",onClick:()=>m(!1),onMouseEnter:tt=>{tt.currentTarget.style.transform="translateY(-50%) scale(1.1)",tt.currentTarget.style.boxShadow="0 4px 12px rgba(0, 0, 0, 0.2)"},onMouseLeave:tt=>{tt.currentTarget.style.transform="translateY(-50%)",tt.currentTarget.style.boxShadow=""},children:ye.jsxDEV("img",{src:i,alt:"Fechar painel",style:Q},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/ExtensionPanel.tsx",lineNumber:467,columnNumber:21},void 0)},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/ExtensionPanel.tsx",lineNumber:452,columnNumber:17},void 0)]},void 0,!0,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/ExtensionPanel.tsx",lineNumber:359,columnNumber:13},void 0)]},void 0,!0,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/ExtensionPanel.tsx",lineNumber:338,columnNumber:9},void 0)},Df="chatjt-container",Hv="chatjt-open-button",Bv="chatjt-panel";class aM{root=null;container=null;async init(){try{if(document.getElementById(Df))return;this.container=document.createElement("div"),this.container.id=Df,this.container.style.pointerEvents="auto",document.body.appendChild(this.container),this.root=eM.createRoot(this.container),this.root.render(YD.createElement(sM)),O.info("UI da extensão inicializada via React"),setTimeout(()=>{const t=document.getElementById(Hv),i=document.getElementById(Bv);O.info("Elementos criados:",{button:!!t,panel:!!i})},100)}catch(t){O.error("Erro ao inicializar UI:",t)}}destroy(){try{this.root&&(this.root.unmount(),this.root=null),this.container&&(this.container.remove(),this.container=null);const t=document.getElementById(Df);t&&t.remove();const i=document.getElementById(Hv);i&&i.remove();const a=document.getElementById(Bv);a&&a.remove(),O.info("UI da extensão destruída")}catch(t){O.error("Erro ao destruir UI:",t)}}}const Fv={EXTENSION:"extension"},oe={HANDSHAKE:"HANDSHAKE",HANDSHAKE_ACK:"HANDSHAKE_ACK",SINGLE_DOCUMENT_EXTRACTED:"SINGLE_DOCUMENT_EXTRACTED",MULTIPLE_DOCUMENTS_EXTRACTED:"MULTIPLE_DOCUMENTS_EXTRACTED",METADATA_EXTRACTED:"METADATA_EXTRACTED",AUTO_CAPTURE_DETECTION:"AUTO_CAPTURE_DETECTION",AUTO_CAPTURE_CLEANUP:"AUTO_CAPTURE_CLEANUP",EXTRACT_FULL_PROCESS:"EXTRACT_FULL_PROCESS",EXTRACT_SELECTED_DOCUMENTS:"EXTRACT_SELECTED_DOCUMENTS",EXTRACT_VISIBLE_DOCUMENT:"EXTRACT_VISIBLE_DOCUMENT",EXTRACT_METADATA:"EXTRACT_METADATA",EXTRACTION_ERROR:"EXTRACTION_ERROR",GENERIC_ERROR:"GENERIC_ERROR",UNSUPPORTED_MESSAGE:"UNSUPPORTED_MESSAGE"};let rM=class{source;isHandshakeComplete=!1;messageQueue=[];listeners=new Map;iframe;constructor(t=Fv.EXTENSION){this.source=t,this.iframe=null,this.initializeIframe(),this.setupMessageListener()}initializeIframe(){this.iframe=document.querySelector("#chatjt-iframe"),this.iframe?(O.info("Iframe encontrado e inicializado"),this.onIframeReady()):(O.detail("Iframe não encontrado inicialmente, aguardando criação..."),this.waitForIframe())}waitForIframe(){const t=new MutationObserver(i=>{i.forEach(a=>{a.type==="childList"&&a.addedNodes.forEach(r=>{if(r.nodeType===Node.ELEMENT_NODE){const c=r,u=c.id==="chatjt-iframe"?c:c.querySelector("#chatjt-iframe");u&&(this.iframe=u,O.info("Iframe detectado via MutationObserver"),this.onIframeReady(),t.disconnect())}})})});t.observe(document.body,{childList:!0,subtree:!0}),setTimeout(()=>{t.disconnect(),this.iframe||O.error("Timeout: Iframe não foi encontrado após 10 segundos")},1e4)}onIframeReady(){this.iframe&&(this.iframe.contentWindow?this.processQueuedMessages():this.iframe.addEventListener("load",()=>{O.info("Iframe carregado completamente"),this.processQueuedMessages()}))}setupMessageListener(){window.addEventListener("message",t=>{try{const i=this.validateMessage(t.data);i?this.handleMessage(i,t):O.warn("Mensagem inválida recebida, ignorando:",t.data)}catch(i){O.error("Erro ao processar mensagem:",i)}})}validateMessage(t){return!t||typeof t!="object"||!t.type||typeof t.type!="string"?null:this.isErrorMessage(t.type)&&t.source===this.source?(O.warn(`Mensagem de erro própria ignorada: ${t.type}`,t),null):{id:t.id??crypto.randomUUID(),type:t.type,data:t.data??null,error:t.error??null,responseTo:t.responseTo??null,timestamp:t.timestamp??new Date().toISOString(),source:t.source??this.source}}isErrorMessage(t){return[oe.GENERIC_ERROR,oe.UNSUPPORTED_MESSAGE].includes(t)}handleMessage(t,i){if(O.info(`Mensagem recebida: ${t.type}`,t),t.type===oe.HANDSHAKE){this.handleHandshake();return}if(!this.isHandshakeComplete){this.messageQueue.push({message:t,event:i}),O.info(`Mensagem enfileirada - handshake pendente: ${t.type}`);return}this.processMessage(t,i)}handleHandshake(){O.info("Handshake recebido do iframe"),this.isHandshakeComplete=!0;let t="";try{t=window.location.href}catch{t="unknown"}O.info("URL do iframe:",t);const i=VD(t);O.info("Ações disponíveis para a URL do iframe:",i),this.sendMessage(oe.HANDSHAKE_ACK,{extensionVersion:Yt.app.version??"unknown",actions:i}),this.processQueuedMessages()}processMessage(t,i){const a=this.listeners.get(t.type);a?a(t,i):O.info(`Tipo de mensagem não suportado ou listener não configurado: ${t.type}`,t)}processQueuedMessages(){for(;this.messageQueue.length>0;){const{message:t,event:i}=this.messageQueue.shift();O.info(`Processando mensagem enfileirada: ${t.type}`),this.processMessage(t,i)}}sendMessage(t,i,a,r=null){const c={id:crypto.randomUUID(),type:t,data:i??null,error:a??void 0,responseTo:r??void 0,timestamp:new Date().toISOString(),source:this.source};if(O.info(`Enviando mensagem: ${t}`,c),!this.iframe||!this.iframe.contentWindow){O.warn(`Iframe não disponível, enfileirando mensagem: ${t}`),this.messageQueue.push({message:c,event:null});return}try{this.iframe.contentWindow.postMessage(c,"*"),O.info(`Mensagem enviada para o iframe: ${t}`)}catch(u){O.error("Erro ao enviar mensagem:",u),this.messageQueue.push({message:c,event:null})}}sendSuccessMessage(t,i=null,a){this.sendMessage(t,i,null,a??null)}sendError(t,i,a){this.sendMessage(t,null,i,a??null)}onMessage(t,i){this.listeners.set(t,i)}};const un=typeof process=="object"&&process+""=="[object process]"&&!process.versions.nw&&!(process.versions.electron&&process.type&&process.type!=="browser"),Mf=[.001,0,0,.001,0,0],Of=1.35,Ln={ANY:1,DISPLAY:2,PRINT:4,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,IS_EDITING:128,OPLIST:256},Is={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},jv="pdfjs_internal_editor_",wt={DISABLE:-1,NONE:0,FREETEXT:3,HIGHLIGHT:9,STAMP:13,INK:15,SIGNATURE:101,COMMENT:102},$t={RESIZE:1,CREATE:2,FREETEXT_SIZE:11,FREETEXT_COLOR:12,FREETEXT_OPACITY:13,INK_COLOR:21,INK_THICKNESS:22,INK_OPACITY:23,HIGHLIGHT_COLOR:31,HIGHLIGHT_THICKNESS:32,HIGHLIGHT_FREE:33,HIGHLIGHT_SHOW_ALL:34,DRAW_STEP:41},oM={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},sn={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},fu={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},De={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26},_r={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},pu={ERRORS:0,WARNINGS:1,INFOS:5},mu={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotation:80,endAnnotation:81,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91,setStrokeTransparent:92,setFillTransparent:93,rawFillPath:94},gu={moveTo:0,lineTo:1,curveTo:2,closePath:3},lM={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};let yu=pu.WARNINGS;function cM(l){Number.isInteger(l)&&(yu=l)}function uM(){return yu}function bu(l){yu>=pu.INFOS&&console.log(`Info: ${l}`)}function xt(l){yu>=pu.WARNINGS&&console.log(`Warning: ${l}`)}function ie(l){throw new Error(l)}function Me(l,t){l||ie(t)}function dM(l){switch(l?.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}function $v(l,t=null,i=null){if(!l)return null;if(i&&typeof l=="string"&&(i.addDefaultProtocol&&l.startsWith("www.")&&l.match(/\./g)?.length>=2&&(l=`http://${l}`),i.tryConvertEncoding))try{l=gM(l)}catch{}const a=t?URL.parse(l,t):URL.parse(l);return dM(a)?a:null}function Gv(l,t,i=!1){const a=URL.parse(l);return a?(a.hash=t,a.href):i&&$v(l,"http://example.com")?l.split("#",1)[0]+`${t?`#${t}`:""}`:""}function zt(l,t,i,a=!1){return Object.defineProperty(l,t,{value:i,enumerable:!a,configurable:!0,writable:!1}),i}const Aa=function(){function t(i,a){this.message=i,this.name=a}return t.prototype=new Error,t.constructor=t,t}();class Vv extends Aa{constructor(t,i){super(t,"PasswordException"),this.code=i}}class kf extends Aa{constructor(t,i){super(t,"UnknownErrorException"),this.details=i}}class Nf extends Aa{constructor(t){super(t,"InvalidPDFException")}}class vu extends Aa{constructor(t,i,a){super(t,"ResponseException"),this.status=i,this.missing=a}}class hM extends Aa{constructor(t){super(t,"FormatError")}}class Ps extends Aa{constructor(t){super(t,"AbortException")}}function qv(l){(typeof l!="object"||l?.length===void 0)&&ie("Invalid argument for bytesToString");const t=l.length,i=8192;if(t<i)return String.fromCharCode.apply(null,l);const a=[];for(let r=0;r<t;r+=i){const c=Math.min(r+i,t),u=l.subarray(r,c);a.push(String.fromCharCode.apply(null,u))}return a.join("")}function Wo(l){typeof l!="string"&&ie("Invalid argument for stringToBytes");const t=l.length,i=new Uint8Array(t);for(let a=0;a<t;++a)i[a]=l.charCodeAt(a)&255;return i}function fM(l){return String.fromCharCode(l>>24&255,l>>16&255,l>>8&255,l&255)}function pM(){const l=new Uint8Array(4);return l[0]=1,new Uint32Array(l.buffer,0,1)[0]===1}function mM(){try{return new Function(""),!0}catch{return!1}}class Ve{static get isLittleEndian(){return zt(this,"isLittleEndian",pM())}static get isEvalSupported(){return zt(this,"isEvalSupported",mM())}static get isOffscreenCanvasSupported(){return zt(this,"isOffscreenCanvasSupported",typeof OffscreenCanvas<"u")}static get isImageDecoderSupported(){return zt(this,"isImageDecoderSupported",typeof ImageDecoder<"u")}static get platform(){const{platform:t,userAgent:i}=navigator;return zt(this,"platform",{isAndroid:i.includes("Android"),isLinux:t.includes("Linux"),isMac:t.includes("Mac"),isWindows:t.includes("Win"),isFirefox:i.includes("Firefox")})}static get isCSSRoundSupported(){return zt(this,"isCSSRoundSupported",globalThis.CSS?.supports?.("width: round(1.5px, 1px)"))}}const Lf=Array.from(Array(256).keys(),l=>l.toString(16).padStart(2,"0"));class mt{static makeHexColor(t,i,a){return`#${Lf[t]}${Lf[i]}${Lf[a]}`}static scaleMinMax(t,i){let a;t[0]?(t[0]<0&&(a=i[0],i[0]=i[2],i[2]=a),i[0]*=t[0],i[2]*=t[0],t[3]<0&&(a=i[1],i[1]=i[3],i[3]=a),i[1]*=t[3],i[3]*=t[3]):(a=i[0],i[0]=i[1],i[1]=a,a=i[2],i[2]=i[3],i[3]=a,t[1]<0&&(a=i[1],i[1]=i[3],i[3]=a),i[1]*=t[1],i[3]*=t[1],t[2]<0&&(a=i[0],i[0]=i[2],i[2]=a),i[0]*=t[2],i[2]*=t[2]),i[0]+=t[4],i[1]+=t[5],i[2]+=t[4],i[3]+=t[5]}static transform(t,i){return[t[0]*i[0]+t[2]*i[1],t[1]*i[0]+t[3]*i[1],t[0]*i[2]+t[2]*i[3],t[1]*i[2]+t[3]*i[3],t[0]*i[4]+t[2]*i[5]+t[4],t[1]*i[4]+t[3]*i[5]+t[5]]}static applyTransform(t,i,a=0){const r=t[a],c=t[a+1];t[a]=r*i[0]+c*i[2]+i[4],t[a+1]=r*i[1]+c*i[3]+i[5]}static applyTransformToBezier(t,i,a=0){const r=i[0],c=i[1],u=i[2],h=i[3],p=i[4],m=i[5];for(let g=0;g<6;g+=2){const y=t[a+g],b=t[a+g+1];t[a+g]=y*r+b*u+p,t[a+g+1]=y*c+b*h+m}}static applyInverseTransform(t,i){const a=t[0],r=t[1],c=i[0]*i[3]-i[1]*i[2];t[0]=(a*i[3]-r*i[2]+i[2]*i[5]-i[4]*i[3])/c,t[1]=(-a*i[1]+r*i[0]+i[4]*i[1]-i[5]*i[0])/c}static axialAlignedBoundingBox(t,i,a){const r=i[0],c=i[1],u=i[2],h=i[3],p=i[4],m=i[5],g=t[0],y=t[1],b=t[2],S=t[3];let A=r*g+p,_=A,R=r*b+p,x=R,L=h*y+m,k=L,U=h*S+m,I=U;if(c!==0||u!==0){const j=c*g,F=c*b,J=u*y,Y=u*S;A+=J,x+=J,R+=Y,_+=Y,L+=j,I+=j,U+=F,k+=F}a[0]=Math.min(a[0],A,R,_,x),a[1]=Math.min(a[1],L,U,k,I),a[2]=Math.max(a[2],A,R,_,x),a[3]=Math.max(a[3],L,U,k,I)}static inverseTransform(t){const i=t[0]*t[3]-t[1]*t[2];return[t[3]/i,-t[1]/i,-t[2]/i,t[0]/i,(t[2]*t[5]-t[4]*t[3])/i,(t[4]*t[1]-t[5]*t[0])/i]}static singularValueDecompose2dScale(t,i){const a=t[0],r=t[1],c=t[2],u=t[3],h=a**2+r**2,p=a*c+r*u,m=c**2+u**2,g=(h+m)/2,y=Math.sqrt(g**2-(h*m-p**2));i[0]=Math.sqrt(g+y||1),i[1]=Math.sqrt(g-y||1)}static normalizeRect(t){const i=t.slice(0);return t[0]>t[2]&&(i[0]=t[2],i[2]=t[0]),t[1]>t[3]&&(i[1]=t[3],i[3]=t[1]),i}static intersect(t,i){const a=Math.max(Math.min(t[0],t[2]),Math.min(i[0],i[2])),r=Math.min(Math.max(t[0],t[2]),Math.max(i[0],i[2]));if(a>r)return null;const c=Math.max(Math.min(t[1],t[3]),Math.min(i[1],i[3])),u=Math.min(Math.max(t[1],t[3]),Math.max(i[1],i[3]));return c>u?null:[a,c,r,u]}static pointBoundingBox(t,i,a){a[0]=Math.min(a[0],t),a[1]=Math.min(a[1],i),a[2]=Math.max(a[2],t),a[3]=Math.max(a[3],i)}static rectBoundingBox(t,i,a,r,c){c[0]=Math.min(c[0],t,a),c[1]=Math.min(c[1],i,r),c[2]=Math.max(c[2],t,a),c[3]=Math.max(c[3],i,r)}static#t(t,i,a,r,c,u,h,p,m,g){if(m<=0||m>=1)return;const y=1-m,b=m*m,S=b*m,A=y*(y*(y*t+3*m*i)+3*b*a)+S*r,_=y*(y*(y*c+3*m*u)+3*b*h)+S*p;g[0]=Math.min(g[0],A),g[1]=Math.min(g[1],_),g[2]=Math.max(g[2],A),g[3]=Math.max(g[3],_)}static#e(t,i,a,r,c,u,h,p,m,g,y,b){if(Math.abs(m)<1e-12){Math.abs(g)>=1e-12&&this.#t(t,i,a,r,c,u,h,p,-y/g,b);return}const S=g**2-4*y*m;if(S<0)return;const A=Math.sqrt(S),_=2*m;this.#t(t,i,a,r,c,u,h,p,(-g+A)/_,b),this.#t(t,i,a,r,c,u,h,p,(-g-A)/_,b)}static bezierBoundingBox(t,i,a,r,c,u,h,p,m){m[0]=Math.min(m[0],t,h),m[1]=Math.min(m[1],i,p),m[2]=Math.max(m[2],t,h),m[3]=Math.max(m[3],i,p),this.#e(t,a,c,h,i,r,u,p,3*(-t+3*(a-c)+h),6*(t-2*a+c),3*(a-t),m),this.#e(t,a,c,h,i,r,u,p,3*(-i+3*(r-u)+p),6*(i-2*r+u),3*(r-i),m)}}function gM(l){return decodeURIComponent(escape(l))}let If=null,Xv=null;function yM(l){return If||(If=/([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu,Xv=new Map([["ſt","ſt"]])),l.replaceAll(If,(t,i,a)=>i?i.normalize("NFKC"):Xv.get(a))}function Yv(){if(typeof crypto.randomUUID=="function")return crypto.randomUUID();const l=new Uint8Array(32);return crypto.getRandomValues(l),qv(l)}const Pf="pdfjs_internal_id_";function bM(l,t,i){if(!Array.isArray(i)||i.length<2)return!1;const[a,r,...c]=i;if(!l(a)&&!Number.isInteger(a)||!t(r))return!1;const u=c.length;let h=!0;switch(r.name){case"XYZ":if(u<2||u>3)return!1;break;case"Fit":case"FitB":return u===0;case"FitH":case"FitBH":case"FitV":case"FitBV":if(u>1)return!1;break;case"FitR":if(u!==4)return!1;h=!1;break;default:return!1}for(const p of c)if(!(typeof p=="number"||h&&p===null))return!1;return!0}function dn(l,t,i){return Math.min(Math.max(l,t),i)}function Wv(l){return Uint8Array.prototype.toBase64?l.toBase64():btoa(qv(l))}function vM(l){return Uint8Array.fromBase64?Uint8Array.fromBase64(l):Wo(atob(l))}typeof Promise.try!="function"&&(Promise.try=function(l,...t){return new Promise(i=>{i(l(...t))})}),typeof Math.sumPrecise!="function"&&(Math.sumPrecise=function(l){return l.reduce((t,i)=>t+i,0)});const ts="http://www.w3.org/2000/svg";class Tr{static CSS=96;static PDF=72;static PDF_TO_CSS_UNITS=this.CSS/this.PDF}async function Qo(l,t="text"){if(Zo(l,document.baseURI)){const i=await fetch(l);if(!i.ok)throw new Error(i.statusText);switch(t){case"arraybuffer":return i.arrayBuffer();case"blob":return i.blob();case"json":return i.json()}return i.text()}return new Promise((i,a)=>{const r=new XMLHttpRequest;r.open("GET",l,!0),r.responseType=t,r.onreadystatechange=()=>{if(r.readyState===XMLHttpRequest.DONE){if(r.status===200||r.status===0){switch(t){case"arraybuffer":case"blob":case"json":i(r.response);return}i(r.responseText);return}a(new Error(r.statusText))}},r.send(null)})}class Ko{constructor({viewBox:t,userUnit:i,scale:a,rotation:r,offsetX:c=0,offsetY:u=0,dontFlip:h=!1}){this.viewBox=t,this.userUnit=i,this.scale=a,this.rotation=r,this.offsetX=c,this.offsetY=u,a*=i;const p=(t[2]+t[0])/2,m=(t[3]+t[1])/2;let g,y,b,S;switch(r%=360,r<0&&(r+=360),r){case 180:g=-1,y=0,b=0,S=1;break;case 90:g=0,y=1,b=1,S=0;break;case 270:g=0,y=-1,b=-1,S=0;break;case 0:g=1,y=0,b=0,S=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}h&&(b=-b,S=-S);let A,_,R,x;g===0?(A=Math.abs(m-t[1])*a+c,_=Math.abs(p-t[0])*a+u,R=(t[3]-t[1])*a,x=(t[2]-t[0])*a):(A=Math.abs(p-t[0])*a+c,_=Math.abs(m-t[1])*a+u,R=(t[2]-t[0])*a,x=(t[3]-t[1])*a),this.transform=[g*a,y*a,b*a,S*a,A-g*a*p-b*a*m,_-y*a*p-S*a*m],this.width=R,this.height=x}get rawDims(){const t=this.viewBox;return zt(this,"rawDims",{pageWidth:t[2]-t[0],pageHeight:t[3]-t[1],pageX:t[0],pageY:t[1]})}clone({scale:t=this.scale,rotation:i=this.rotation,offsetX:a=this.offsetX,offsetY:r=this.offsetY,dontFlip:c=!1}={}){return new Ko({viewBox:this.viewBox.slice(),userUnit:this.userUnit,scale:t,rotation:i,offsetX:a,offsetY:r,dontFlip:c})}convertToViewportPoint(t,i){const a=[t,i];return mt.applyTransform(a,this.transform),a}convertToViewportRectangle(t){const i=[t[0],t[1]];mt.applyTransform(i,this.transform);const a=[t[2],t[3]];return mt.applyTransform(a,this.transform),[i[0],i[1],a[0],a[1]]}convertToPdfPoint(t,i){const a=[t,i];return mt.applyInverseTransform(a,this.transform),a}}class Uf extends Aa{constructor(t,i=0){super(t,"RenderingCancelledException"),this.extraDelay=i}}function Su(l){const t=l.length;let i=0;for(;i<t&&l[i].trim()==="";)i++;return l.substring(i,i+5).toLowerCase()==="data:"}function zf(l){return typeof l=="string"&&/\.pdf$/i.test(l)}function SM(l){return[l]=l.split(/[#?]/,1),l.substring(l.lastIndexOf("/")+1)}function EM(l,t="document.pdf"){if(typeof l!="string")return t;if(Su(l))return xt('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),t;const a=(h=>{try{return new URL(h)}catch{try{return new URL(decodeURIComponent(h))}catch{try{return new URL(h,"https://foo.bar")}catch{try{return new URL(decodeURIComponent(h),"https://foo.bar")}catch{return null}}}}})(l);if(!a)return t;const r=h=>{try{let p=decodeURIComponent(h);return p.includes("/")?(p=p.split("/").at(-1),p.test(/^\.pdf$/i)?p:h):p}catch{return h}},c=/\.pdf$/i,u=a.pathname.split("/").at(-1);if(c.test(u))return r(u);if(a.searchParams.size>0){const h=Array.from(a.searchParams.values()).reverse();for(const m of h)if(c.test(m))return r(m);const p=Array.from(a.searchParams.keys()).reverse();for(const m of p)if(c.test(m))return r(m)}if(a.hash){const p=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i.exec(a.hash);if(p)return r(p[0])}return t}class Qv{started=Object.create(null);times=[];time(t){t in this.started&&xt(`Timer is already running for ${t}`),this.started[t]=Date.now()}timeEnd(t){t in this.started||xt(`Timer has not been started for ${t}`),this.times.push({name:t,start:this.started[t],end:Date.now()}),delete this.started[t]}toString(){const t=[];let i=0;for(const{name:a}of this.times)i=Math.max(a.length,i);for(const{name:a,start:r,end:c}of this.times)t.push(`${a.padEnd(i)} ${c-r}ms
297
+ `);return t.join("")}}function Zo(l,t){const i=t?URL.parse(l,t):URL.parse(l);return i?.protocol==="http:"||i?.protocol==="https:"}function Xn(l){l.preventDefault()}function Oe(l){l.preventDefault(),l.stopPropagation()}function AM(l){console.log("Deprecated API usage: "+l)}class Hf{static#t;static toDateObject(t){if(t instanceof Date)return t;if(!t||typeof t!="string")return null;this.#t||=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?");const i=this.#t.exec(t);if(!i)return null;const a=parseInt(i[1],10);let r=parseInt(i[2],10);r=r>=1&&r<=12?r-1:0;let c=parseInt(i[3],10);c=c>=1&&c<=31?c:1;let u=parseInt(i[4],10);u=u>=0&&u<=23?u:0;let h=parseInt(i[5],10);h=h>=0&&h<=59?h:0;let p=parseInt(i[6],10);p=p>=0&&p<=59?p:0;const m=i[7]||"Z";let g=parseInt(i[8],10);g=g>=0&&g<=23?g:0;let y=parseInt(i[9],10)||0;return y=y>=0&&y<=59?y:0,m==="-"?(u+=g,h+=y):m==="+"&&(u-=g,h-=y),new Date(Date.UTC(a,r,c,u,h,p))}}function _M(l,{scale:t=1,rotation:i=0}){const{width:a,height:r}=l.attributes.style,c=[0,0,parseInt(a),parseInt(r)];return new Ko({viewBox:c,userUnit:1,scale:t,rotation:i})}function Eu(l){if(l.startsWith("#")){const t=parseInt(l.slice(1),16);return[(t&16711680)>>16,(t&65280)>>8,t&255]}return l.startsWith("rgb(")?l.slice(4,-1).split(",").map(t=>parseInt(t)):l.startsWith("rgba(")?l.slice(5,-1).split(",").map(t=>parseInt(t)).slice(0,3):(xt(`Not a valid color format: "${l}"`),[0,0,0])}function TM(l){const t=document.createElement("span");t.style.visibility="hidden",t.style.colorScheme="only light",document.body.append(t);for(const i of l.keys()){t.style.color=i;const a=window.getComputedStyle(t).color;l.set(i,Eu(a))}t.remove()}function be(l){const{a:t,b:i,c:a,d:r,e:c,f:u}=l.getTransform();return[t,i,a,r,c,u]}function Ci(l){const{a:t,b:i,c:a,d:r,e:c,f:u}=l.getTransform().invertSelf();return[t,i,a,r,c,u]}function _a(l,t,i=!1,a=!0){if(t instanceof Ko){const{pageWidth:r,pageHeight:c}=t.rawDims,{style:u}=l,h=Ve.isCSSRoundSupported,p=`var(--total-scale-factor) * ${r}px`,m=`var(--total-scale-factor) * ${c}px`,g=h?`round(down, ${p}, var(--scale-round-x))`:`calc(${p})`,y=h?`round(down, ${m}, var(--scale-round-y))`:`calc(${m})`;!i||t.rotation%180===0?(u.width=g,u.height=y):(u.width=y,u.height=g)}a&&l.setAttribute("data-main-rotation",t.rotation)}class Ri{constructor(){const{pixelRatio:t}=Ri;this.sx=t,this.sy=t}get scaled(){return this.sx!==1||this.sy!==1}get symmetric(){return this.sx===this.sy}limitCanvas(t,i,a,r,c=-1){let u=1/0,h=1/0,p=1/0;a=Ri.capPixels(a,c),a>0&&(u=Math.sqrt(a/(t*i))),r!==-1&&(h=r/t,p=r/i);const m=Math.min(u,h,p);return this.sx>m||this.sy>m?(this.sx=m,this.sy=m,!0):!1}static get pixelRatio(){return globalThis.devicePixelRatio||1}static capPixels(t,i){if(i>=0){const a=Math.ceil(window.screen.availWidth*window.screen.availHeight*this.pixelRatio**2*(1+i/100));return t>0?Math.min(t,a):a}return t}}const Bf=["image/apng","image/avif","image/bmp","image/gif","image/jpeg","image/png","image/svg+xml","image/webp","image/x-icon"];class Jo{#t=null;#e=null;#n;#i=null;#a=null;#s=null;#r=null;static#o=null;constructor(t){this.#n=t,Jo.#o||=Object.freeze({freetext:"pdfjs-editor-remove-freetext-button",highlight:"pdfjs-editor-remove-highlight-button",ink:"pdfjs-editor-remove-ink-button",stamp:"pdfjs-editor-remove-stamp-button",signature:"pdfjs-editor-remove-signature-button"})}render(){const t=this.#t=document.createElement("div");t.classList.add("editToolbar","hidden"),t.setAttribute("role","toolbar");const i=this.#n._uiManager._signal;t.addEventListener("contextmenu",Xn,{signal:i}),t.addEventListener("pointerdown",Jo.#u,{signal:i});const a=this.#i=document.createElement("div");a.className="buttons",t.append(a);const r=this.#n.toolbarPosition;if(r){const{style:c}=t,u=this.#n._uiManager.direction==="ltr"?1-r[0]:r[0];c.insetInlineEnd=`${100*u}%`,c.top=`calc(${100*r[1]}% + var(--editor-toolbar-vert-offset))`}return t}get div(){return this.#t}static#u(t){t.stopPropagation()}#c(t){this.#n._focusEventsAllowed=!1,Oe(t)}#h(t){this.#n._focusEventsAllowed=!0,Oe(t)}#l(t){const i=this.#n._uiManager._signal;t.addEventListener("focusin",this.#c.bind(this),{capture:!0,signal:i}),t.addEventListener("focusout",this.#h.bind(this),{capture:!0,signal:i}),t.addEventListener("contextmenu",Xn,{signal:i})}hide(){this.#t.classList.add("hidden"),this.#e?.hideDropdown()}show(){this.#t.classList.remove("hidden"),this.#a?.shown(),this.#s?.shown()}addDeleteButton(){const{editorType:t,_uiManager:i}=this.#n,a=document.createElement("button");a.className="delete",a.tabIndex=0,a.setAttribute("data-l10n-id",Jo.#o[t]),this.#l(a),a.addEventListener("click",r=>{i.delete()},{signal:i._signal}),this.#i.append(a)}get#p(){const t=document.createElement("div");return t.className="divider",t}async addAltText(t){const i=await t.render();this.#l(i),this.#i.append(i,this.#p),this.#a=t}addComment(t){if(this.#s)return;const i=t.render();i&&(this.#l(i),this.#i.prepend(i,this.#p),this.#s=t,t.toolbar=this)}addColorPicker(t){if(this.#e)return;this.#e=t;const i=t.renderButton();this.#l(i),this.#i.append(i,this.#p)}async addEditSignatureButton(t){const i=this.#r=await t.renderEditButton(this.#n);this.#l(i),this.#i.append(i,this.#p)}async addButton(t,i){switch(t){case"colorPicker":this.addColorPicker(i);break;case"altText":await this.addAltText(i);break;case"editSignature":await this.addEditSignatureButton(i);break;case"delete":this.addDeleteButton();break;case"comment":this.addComment(i);break}}updateEditSignatureButton(t){this.#r&&(this.#r.title=t)}remove(){this.#t.remove(),this.#e?.destroy(),this.#e=null}}class wM{#t=null;#e=null;#n;constructor(t){this.#n=t}#i(){const t=this.#e=document.createElement("div");t.className="editToolbar",t.setAttribute("role","toolbar"),t.addEventListener("contextmenu",Xn,{signal:this.#n._signal});const i=this.#t=document.createElement("div");return i.className="buttons",t.append(i),this.#s(),t}#a(t,i){let a=0,r=0;for(const c of t){const u=c.y+c.height;if(u<a)continue;const h=c.x+(i?c.width:0);if(u>a){r=h,a=u;continue}i?h>r&&(r=h):h<r&&(r=h)}return[i?1-r:r,a]}show(t,i,a){const[r,c]=this.#a(i,a),{style:u}=this.#e||=this.#i();t.append(this.#e),u.insetInlineEnd=`${100*r}%`,u.top=`calc(${100*c}% + var(--editor-toolbar-vert-offset))`}hide(){this.#e.remove()}#s(){const t=document.createElement("button");t.className="highlightButton",t.tabIndex=0,t.setAttribute("data-l10n-id","pdfjs-highlight-floating-button1");const i=document.createElement("span");t.append(i),i.className="visuallyHidden",i.setAttribute("data-l10n-id","pdfjs-highlight-floating-button-label");const a=this.#n._signal;t.addEventListener("contextmenu",Xn,{signal:a}),t.addEventListener("click",()=>{this.#n.highlightSelection("floating_button")},{signal:a}),this.#t.append(t)}}function Kv(l,t,i){for(const a of i)t.addEventListener(a,l[a].bind(l))}class xM{#t=0;get id(){return`${jv}${this.#t++}`}}class Ff{#t=Yv();#e=0;#n=null;static get _isSVGFittingCanvas(){const t='data:image/svg+xml;charset=UTF-8,<svg viewBox="0 0 1 1" width="1" height="1" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="1" style="fill:red;"/></svg>',a=new OffscreenCanvas(1,3).getContext("2d",{willReadFrequently:!0}),r=new Image;r.src=t;const c=r.decode().then(()=>(a.drawImage(r,0,0,1,1,0,0,1,3),new Uint32Array(a.getImageData(0,0,1,1).data.buffer)[0]===0));return zt(this,"_isSVGFittingCanvas",c)}async#i(t,i){this.#n||=new Map;let a=this.#n.get(t);if(a===null)return null;if(a?.bitmap)return a.refCounter+=1,a;try{a||={bitmap:null,id:`image_${this.#t}_${this.#e++}`,refCounter:0,isSvg:!1};let r;if(typeof i=="string"?(a.url=i,r=await Qo(i,"blob")):i instanceof File?r=a.file=i:i instanceof Blob&&(r=i),r.type==="image/svg+xml"){const c=Ff._isSVGFittingCanvas,u=new FileReader,h=new Image,p=new Promise((m,g)=>{h.onload=()=>{a.bitmap=h,a.isSvg=!0,m()},u.onload=async()=>{const y=a.svgUrl=u.result;h.src=await c?`${y}#svgView(preserveAspectRatio(none))`:y},h.onerror=u.onerror=g});u.readAsDataURL(r),await p}else a.bitmap=await createImageBitmap(r);a.refCounter=1}catch(r){xt(r),a=null}return this.#n.set(t,a),a&&this.#n.set(a.id,a),a}async getFromFile(t){const{lastModified:i,name:a,size:r,type:c}=t;return this.#i(`${i}_${a}_${r}_${c}`,t)}async getFromUrl(t){return this.#i(t,t)}async getFromBlob(t,i){const a=await i;return this.#i(t,a)}async getFromId(t){this.#n||=new Map;const i=this.#n.get(t);if(!i)return null;if(i.bitmap)return i.refCounter+=1,i;if(i.file)return this.getFromFile(i.file);if(i.blobPromise){const{blobPromise:a}=i;return delete i.blobPromise,this.getFromBlob(i.id,a)}return this.getFromUrl(i.url)}getFromCanvas(t,i){this.#n||=new Map;let a=this.#n.get(t);if(a?.bitmap)return a.refCounter+=1,a;const r=new OffscreenCanvas(i.width,i.height);return r.getContext("2d").drawImage(i,0,0),a={bitmap:r.transferToImageBitmap(),id:`image_${this.#t}_${this.#e++}`,refCounter:1,isSvg:!1},this.#n.set(t,a),this.#n.set(a.id,a),a}getSvgUrl(t){const i=this.#n.get(t);return i?.isSvg?i.svgUrl:null}deleteId(t){this.#n||=new Map;const i=this.#n.get(t);if(!i||(i.refCounter-=1,i.refCounter!==0))return;const{bitmap:a}=i;if(!i.url&&!i.file){const r=new OffscreenCanvas(a.width,a.height);r.getContext("bitmaprenderer").transferFromImageBitmap(a),i.blobPromise=r.convertToBlob()}a.close?.(),i.bitmap=null}isValidId(t){return t.startsWith(`image_${this.#t}_`)}}class CM{#t=[];#e=!1;#n;#i=-1;constructor(t=128){this.#n=t}add({cmd:t,undo:i,post:a,mustExec:r,type:c=NaN,overwriteIfSameType:u=!1,keepUndo:h=!1}){if(r&&t(),this.#e)return;const p={cmd:t,undo:i,post:a,type:c};if(this.#i===-1){this.#t.length>0&&(this.#t.length=0),this.#i=0,this.#t.push(p);return}if(u&&this.#t[this.#i].type===c){h&&(p.undo=this.#t[this.#i].undo),this.#t[this.#i]=p;return}const m=this.#i+1;m===this.#n?this.#t.splice(0,1):(this.#i=m,m<this.#t.length&&this.#t.splice(m)),this.#t.push(p)}undo(){if(this.#i===-1)return;this.#e=!0;const{undo:t,post:i}=this.#t[this.#i];t(),i?.(),this.#e=!1,this.#i-=1}redo(){if(this.#i<this.#t.length-1){this.#i+=1,this.#e=!0;const{cmd:t,post:i}=this.#t[this.#i];t(),i?.(),this.#e=!1}}hasSomethingToUndo(){return this.#i!==-1}hasSomethingToRedo(){return this.#i<this.#t.length-1}cleanType(t){if(this.#i!==-1){for(let i=this.#i;i>=0;i--)if(this.#t[i].type!==t){this.#t.splice(i+1,this.#i-i),this.#i=i;return}this.#t.length=0,this.#i=-1}}destroy(){this.#t=null}}class tl{constructor(t){this.buffer=[],this.callbacks=new Map,this.allKeys=new Set;const{isMac:i}=Ve.platform;for(const[a,r,c={}]of t)for(const u of a){const h=u.startsWith("mac+");i&&h?(this.callbacks.set(u.slice(4),{callback:r,options:c}),this.allKeys.add(u.split("+").at(-1))):!i&&!h&&(this.callbacks.set(u,{callback:r,options:c}),this.allKeys.add(u.split("+").at(-1)))}}#t(t){t.altKey&&this.buffer.push("alt"),t.ctrlKey&&this.buffer.push("ctrl"),t.metaKey&&this.buffer.push("meta"),t.shiftKey&&this.buffer.push("shift"),this.buffer.push(t.key);const i=this.buffer.join("+");return this.buffer.length=0,i}exec(t,i){if(!this.allKeys.has(i.key))return;const a=this.callbacks.get(this.#t(i));if(!a)return;const{callback:r,options:{bubbles:c=!1,args:u=[],checker:h=null}}=a;h&&!h(t,i)||(r.bind(t,...u,i)(),c||Oe(i))}}class jf{static _colorsMapping=new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]]);get _colors(){const t=new Map([["CanvasText",null],["Canvas",null]]);return TM(t),zt(this,"_colors",t)}convert(t){const i=Eu(t);if(!window.matchMedia("(forced-colors: active)").matches)return i;for(const[a,r]of this._colors)if(r.every((c,u)=>c===i[u]))return jf._colorsMapping.get(a);return i}getHexCode(t){const i=this._colors.get(t);return i?mt.makeHexColor(...i):t}}class Us{#t=new AbortController;#e=null;#n=new Map;#i=new Map;#a=null;#s=null;#r=null;#o=new CM;#u=null;#c=null;#h=null;#l=0;#p=new Set;#g=null;#f=null;#d=new Set;_editorUndoBar=null;#m=!1;#v=!1;#y=!1;#E=null;#A=null;#b=null;#T=null;#D=!1;#_=null;#M=new xM;#R=!1;#C=!1;#x=null;#k=null;#U=null;#N=null;#F=null;#w=wt.NONE;#S=new Set;#z=null;#H=null;#j=null;#V=null;#q={isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1,hasSelectedText:!1};#$=[0,0];#L=null;#I=null;#G=null;#Q=null;#P=null;static TRANSLATE_SMALL=1;static TRANSLATE_BIG=10;static get _keyboardManager(){const t=Us.prototype,i=u=>u.#I.contains(document.activeElement)&&document.activeElement.tagName!=="BUTTON"&&u.hasSomethingToControl(),a=(u,{target:h})=>{if(h instanceof HTMLInputElement){const{type:p}=h;return p!=="text"&&p!=="number"}return!0},r=this.TRANSLATE_SMALL,c=this.TRANSLATE_BIG;return zt(this,"_keyboardManager",new tl([[["ctrl+a","mac+meta+a"],t.selectAll,{checker:a}],[["ctrl+z","mac+meta+z"],t.undo,{checker:a}],[["ctrl+y","ctrl+shift+z","mac+meta+shift+z","ctrl+shift+Z","mac+meta+shift+Z"],t.redo,{checker:a}],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete","mac+Delete"],t.delete,{checker:a}],[["Enter","mac+Enter"],t.addNewEditorFromKeyboard,{checker:(u,{target:h})=>!(h instanceof HTMLButtonElement)&&u.#I.contains(h)&&!u.isEnterHandled}],[[" ","mac+ "],t.addNewEditorFromKeyboard,{checker:(u,{target:h})=>!(h instanceof HTMLButtonElement)&&u.#I.contains(document.activeElement)}],[["Escape","mac+Escape"],t.unselectAll],[["ArrowLeft","mac+ArrowLeft"],t.translateSelectedEditors,{args:[-r,0],checker:i}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t.translateSelectedEditors,{args:[-c,0],checker:i}],[["ArrowRight","mac+ArrowRight"],t.translateSelectedEditors,{args:[r,0],checker:i}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t.translateSelectedEditors,{args:[c,0],checker:i}],[["ArrowUp","mac+ArrowUp"],t.translateSelectedEditors,{args:[0,-r],checker:i}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t.translateSelectedEditors,{args:[0,-c],checker:i}],[["ArrowDown","mac+ArrowDown"],t.translateSelectedEditors,{args:[0,r],checker:i}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t.translateSelectedEditors,{args:[0,c],checker:i}]]))}constructor(t,i,a,r,c,u,h,p,m,g,y,b,S,A,_,R){const x=this._signal=this.#t.signal;this.#I=t,this.#G=i,this.#Q=a,this.#a=r,this.#u=c,this.#H=u,this._eventBus=h,h._on("editingaction",this.onEditingAction.bind(this),{signal:x}),h._on("pagechanging",this.onPageChanging.bind(this),{signal:x}),h._on("scalechanging",this.onScaleChanging.bind(this),{signal:x}),h._on("rotationchanging",this.onRotationChanging.bind(this),{signal:x}),h._on("setpreference",this.onSetPreference.bind(this),{signal:x}),h._on("switchannotationeditorparams",L=>this.updateParams(L.type,L.value),{signal:x}),this.#at(),this.#ct(),this.#Z(),this.#s=p.annotationStorage,this.#E=p.filterFactory,this.#j=m,this.#T=g||null,this.#m=y,this.#v=b,this.#y=S,this.#F=A||null,this.viewParameters={realScale:Tr.PDF_TO_CSS_UNITS,rotation:0},this.isShiftKeyDown=!1,this._editorUndoBar=_||null,this._supportsPinchToZoom=R!==!1}destroy(){this.#P?.resolve(),this.#P=null,this.#t?.abort(),this.#t=null,this._signal=null;for(const t of this.#i.values())t.destroy();this.#i.clear(),this.#n.clear(),this.#d.clear(),this.#N?.clear(),this.#e=null,this.#S.clear(),this.#o.destroy(),this.#a?.destroy(),this.#u?.destroy(),this.#H?.destroy(),this.#_?.hide(),this.#_=null,this.#U?.destroy(),this.#U=null,this.#A&&(clearTimeout(this.#A),this.#A=null),this.#L&&(clearTimeout(this.#L),this.#L=null),this._editorUndoBar?.destroy()}combinedSignal(t){return AbortSignal.any([this._signal,t.signal])}get mlManager(){return this.#F}get useNewAltTextFlow(){return this.#v}get useNewAltTextWhenAddingImage(){return this.#y}get hcmFilter(){return zt(this,"hcmFilter",this.#j?this.#E.addHCMFilter(this.#j.foreground,this.#j.background):"none")}get direction(){return zt(this,"direction",getComputedStyle(this.#I).direction)}get _highlightColors(){return zt(this,"_highlightColors",this.#T?new Map(this.#T.split(",").map(t=>(t=t.split("=").map(i=>i.trim()),t[1]=t[1].toUpperCase(),t))):null)}get highlightColors(){const{_highlightColors:t}=this;if(!t)return zt(this,"highlightColors",null);const i=new Map,a=!!this.#j;for(const[r,c]of t){const u=r.endsWith("_HCM");if(a&&u){i.set(r.replace("_HCM",""),c);continue}!a&&!u&&i.set(r,c)}return zt(this,"highlightColors",i)}get highlightColorNames(){return zt(this,"highlightColorNames",this.highlightColors?new Map(Array.from(this.highlightColors,t=>t.reverse())):null)}getNonHCMColor(t){if(!this._highlightColors)return t;const i=this.highlightColorNames.get(t);return this._highlightColors.get(i)||t}getNonHCMColorName(t){return this.highlightColorNames.get(t)||t}setCurrentDrawingSession(t){t?(this.unselectAll(),this.disableUserSelect(!0)):this.disableUserSelect(!1),this.#h=t}setMainHighlightColorPicker(t){this.#U=t}editAltText(t,i=!1){this.#a?.editAltText(this,t,i)}hasCommentManager(){return!!this.#u}editComment(t,i){this.#u?.open(this,t,i)}getSignature(t){this.#H?.getSignature({uiManager:this,editor:t})}get signatureManager(){return this.#H}switchToMode(t,i){this._eventBus.on("annotationeditormodechanged",i,{once:!0,signal:this._signal}),this._eventBus.dispatch("showannotationeditorui",{source:this,mode:t})}setPreference(t,i){this._eventBus.dispatch("setpreference",{source:this,name:t,value:i})}onSetPreference({name:t,value:i}){switch(t){case"enableNewAltTextWhenAddingImage":this.#y=i;break}}onPageChanging({pageNumber:t}){this.#l=t-1}focusMainContainer(){this.#I.focus()}findParent(t,i){for(const a of this.#i.values()){const{x:r,y:c,width:u,height:h}=a.div.getBoundingClientRect();if(t>=r&&t<=r+u&&i>=c&&i<=c+h)return a}return null}disableUserSelect(t=!1){this.#G.classList.toggle("noUserSelect",t)}addShouldRescale(t){this.#d.add(t)}removeShouldRescale(t){this.#d.delete(t)}onScaleChanging({scale:t}){this.commitOrRemove(),this.viewParameters.realScale=t*Tr.PDF_TO_CSS_UNITS;for(const i of this.#d)i.onScaleChanging();this.#h?.onScaleChanging()}onRotationChanging({pagesRotation:t}){this.commitOrRemove(),this.viewParameters.rotation=t}#Y({anchorNode:t}){return t.nodeType===Node.TEXT_NODE?t.parentElement:t}#K(t){const{currentLayer:i}=this;if(i.hasTextLayer(t))return i;for(const a of this.#i.values())if(a.hasTextLayer(t))return a;return null}highlightSelection(t=""){const i=document.getSelection();if(!i||i.isCollapsed)return;const{anchorNode:a,anchorOffset:r,focusNode:c,focusOffset:u}=i,h=i.toString(),m=this.#Y(i).closest(".textLayer"),g=this.getSelectionBoxes(m);if(!g)return;i.empty();const y=this.#K(m),b=this.#w===wt.NONE,S=()=>{y?.createAndAddNewEditor({x:0,y:0},!1,{methodOfCreation:t,boxes:g,anchorNode:a,anchorOffset:r,focusNode:c,focusOffset:u,text:h}),b&&this.showAllEditors("highlight",!0,!0)};if(b){this.switchToMode(wt.HIGHLIGHT,S);return}S()}#it(){const t=document.getSelection();if(!t||t.isCollapsed)return;const a=this.#Y(t).closest(".textLayer"),r=this.getSelectionBoxes(a);r&&(this.#_||=new wM(this),this.#_.show(a,r,this.direction==="ltr"))}addToAnnotationStorage(t){!t.isEmpty()&&this.#s&&!this.#s.has(t.id)&&this.#s.setValue(t.id,t)}a11yAlert(t,i=null){const a=this.#Q;a&&(a.setAttribute("data-l10n-id",t),i?a.setAttribute("data-l10n-args",JSON.stringify(i)):a.removeAttribute("data-l10n-args"))}#st(){const t=document.getSelection();if(!t||t.isCollapsed){this.#z&&(this.#_?.hide(),this.#z=null,this.#O({hasSelectedText:!1}));return}const{anchorNode:i}=t;if(i===this.#z)return;const r=this.#Y(t).closest(".textLayer");if(!r){this.#z&&(this.#_?.hide(),this.#z=null,this.#O({hasSelectedText:!1}));return}if(this.#_?.hide(),this.#z=i,this.#O({hasSelectedText:!0}),!(this.#w!==wt.HIGHLIGHT&&this.#w!==wt.NONE)&&(this.#w===wt.HIGHLIGHT&&this.showAllEditors("highlight",!0,!0),this.#D=this.isShiftKeyDown,!this.isShiftKeyDown)){const c=this.#w===wt.HIGHLIGHT?this.#K(r):null;c?.toggleDrawing();const u=new AbortController,h=this.combinedSignal(u),p=m=>{m.type==="pointerup"&&m.button!==0||(u.abort(),c?.toggleDrawing(!0),m.type==="pointerup"&&this.#W("main_toolbar"))};window.addEventListener("pointerup",p,{signal:h}),window.addEventListener("blur",p,{signal:h})}}#W(t=""){this.#w===wt.HIGHLIGHT?this.highlightSelection(t):this.#m&&this.#it()}#at(){document.addEventListener("selectionchange",this.#st.bind(this),{signal:this._signal})}#rt(){if(this.#b)return;this.#b=new AbortController;const t=this.combinedSignal(this.#b);window.addEventListener("focus",this.focus.bind(this),{signal:t}),window.addEventListener("blur",this.blur.bind(this),{signal:t})}#ot(){this.#b?.abort(),this.#b=null}blur(){if(this.isShiftKeyDown=!1,this.#D&&(this.#D=!1,this.#W("main_toolbar")),!this.hasSelection)return;const{activeElement:t}=document;for(const i of this.#S)if(i.div.contains(t)){this.#k=[i,t],i._focusEventsAllowed=!1;break}}focus(){if(!this.#k)return;const[t,i]=this.#k;this.#k=null,i.addEventListener("focusin",()=>{t._focusEventsAllowed=!0},{once:!0,signal:this._signal}),i.focus()}#Z(){if(this.#x)return;this.#x=new AbortController;const t=this.combinedSignal(this.#x);window.addEventListener("keydown",this.keydown.bind(this),{signal:t}),window.addEventListener("keyup",this.keyup.bind(this),{signal:t})}#lt(){this.#x?.abort(),this.#x=null}#J(){if(this.#c)return;this.#c=new AbortController;const t=this.combinedSignal(this.#c);document.addEventListener("copy",this.copy.bind(this),{signal:t}),document.addEventListener("cut",this.cut.bind(this),{signal:t}),document.addEventListener("paste",this.paste.bind(this),{signal:t})}#tt(){this.#c?.abort(),this.#c=null}#ct(){const t=this._signal;document.addEventListener("dragover",this.dragOver.bind(this),{signal:t}),document.addEventListener("drop",this.drop.bind(this),{signal:t})}addEditListeners(){this.#Z(),this.#J()}removeEditListeners(){this.#lt(),this.#tt()}dragOver(t){for(const{type:i}of t.dataTransfer.items)for(const a of this.#f)if(a.isHandlingMimeForPasting(i)){t.dataTransfer.dropEffect="copy",t.preventDefault();return}}drop(t){for(const i of t.dataTransfer.items)for(const a of this.#f)if(a.isHandlingMimeForPasting(i.type)){a.paste(i,this.currentLayer),t.preventDefault();return}}copy(t){if(t.preventDefault(),this.#e?.commitOrRemove(),!this.hasSelection)return;const i=[];for(const a of this.#S){const r=a.serialize(!0);r&&i.push(r)}i.length!==0&&t.clipboardData.setData("application/pdfjs",JSON.stringify(i))}cut(t){this.copy(t),this.delete()}async paste(t){t.preventDefault();const{clipboardData:i}=t;for(const c of i.items)for(const u of this.#f)if(u.isHandlingMimeForPasting(c.type)){u.paste(c,this.currentLayer);return}let a=i.getData("application/pdfjs");if(!a)return;try{a=JSON.parse(a)}catch(c){xt(`paste: "${c.message}".`);return}if(!Array.isArray(a))return;this.unselectAll();const r=this.currentLayer;try{const c=[];for(const p of a){const m=await r.deserialize(p);if(!m)return;c.push(m)}const u=()=>{for(const p of c)this.#et(p);this.#nt(c)},h=()=>{for(const p of c)p.remove()};this.addCommands({cmd:u,undo:h,mustExec:!0})}catch(c){xt(`paste: "${c.message}".`)}}keydown(t){!this.isShiftKeyDown&&t.key==="Shift"&&(this.isShiftKeyDown=!0),this.#w!==wt.NONE&&!this.isEditorHandlingKeyboard&&Us._keyboardManager.exec(this,t)}keyup(t){this.isShiftKeyDown&&t.key==="Shift"&&(this.isShiftKeyDown=!1,this.#D&&(this.#D=!1,this.#W("main_toolbar")))}onEditingAction({name:t}){switch(t){case"undo":case"redo":case"delete":case"selectAll":this[t]();break;case"highlightSelection":this.highlightSelection("context_menu");break}}#O(t){Object.entries(t).some(([a,r])=>this.#q[a]!==r)&&(this._eventBus.dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(this.#q,t)}),this.#w===wt.HIGHLIGHT&&t.hasSelectedEditor===!1&&this.#B([[$t.HIGHLIGHT_FREE,!0]]))}#B(t){this._eventBus.dispatch("annotationeditorparamschanged",{source:this,details:t})}setEditingState(t){t?(this.#rt(),this.#J(),this.#O({isEditing:this.#w!==wt.NONE,isEmpty:this.#X(),hasSomethingToUndo:this.#o.hasSomethingToUndo(),hasSomethingToRedo:this.#o.hasSomethingToRedo(),hasSelectedEditor:!1})):(this.#ot(),this.#tt(),this.#O({isEditing:!1}),this.disableUserSelect(!1))}registerEditorTypes(t){if(!this.#f){this.#f=t;for(const i of this.#f)this.#B(i.defaultPropertiesToUpdate)}}getId(){return this.#M.id}get currentLayer(){return this.#i.get(this.#l)}getLayer(t){return this.#i.get(t)}get currentPageIndex(){return this.#l}addLayer(t){this.#i.set(t.pageIndex,t),this.#R?t.enable():t.disable()}removeLayer(t){this.#i.delete(t.pageIndex)}async updateMode(t,i=null,a=!1,r=!1,c=!1){if(this.#w!==t&&!(this.#P&&(await this.#P.promise,!this.#P))){if(this.#P=Promise.withResolvers(),this.#h?.commitOrRemove(),this.#w=t,t===wt.NONE){this.setEditingState(!1),this.#dt(),this._editorUndoBar?.hide(),this.#P.resolve();return}t===wt.SIGNATURE&&await this.#H?.loadSignatures(),this.setEditingState(!0),await this.#ut(),this.unselectAll();for(const u of this.#i.values())u.updateMode(t);if(!i){a&&this.addNewEditorFromKeyboard(),this.#P.resolve();return}for(const u of this.#n.values())u.annotationElementId===i||u.id===i?(this.setSelected(u),c?u.editComment():r&&u.enterInEditMode()):u.unselect();this.#P.resolve()}}addNewEditorFromKeyboard(){this.currentLayer.canCreateNewEmptyEditor()&&this.currentLayer.addNewEditor()}updateToolbar(t){t.mode!==this.#w&&this._eventBus.dispatch("switchannotationeditormode",{source:this,...t})}updateParams(t,i){if(this.#f){switch(t){case $t.CREATE:this.currentLayer.addNewEditor(i);return;case $t.HIGHLIGHT_SHOW_ALL:this._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:{type:"highlight",action:"toggle_visibility"}}}),(this.#V||=new Map).set(t,i),this.showAllEditors("highlight",i);break}if(this.hasSelection)for(const a of this.#S)a.updateParams(t,i);else for(const a of this.#f)a.updateDefaultParams(t,i)}}showAllEditors(t,i,a=!1){for(const c of this.#n.values())c.editorType===t&&c.show(i);(this.#V?.get($t.HIGHLIGHT_SHOW_ALL)??!0)!==i&&this.#B([[$t.HIGHLIGHT_SHOW_ALL,i]])}enableWaiting(t=!1){if(this.#C!==t){this.#C=t;for(const i of this.#i.values())t?i.disableClick():i.enableClick(),i.div.classList.toggle("waiting",t)}}async#ut(){if(!this.#R){this.#R=!0;const t=[];for(const i of this.#i.values())t.push(i.enable());await Promise.all(t);for(const i of this.#n.values())i.enable()}}#dt(){if(this.unselectAll(),this.#R){this.#R=!1;for(const t of this.#i.values())t.disable();for(const t of this.#n.values())t.disable()}}getEditors(t){const i=[];for(const a of this.#n.values())a.pageIndex===t&&i.push(a);return i}getEditor(t){return this.#n.get(t)}addEditor(t){this.#n.set(t.id,t)}removeEditor(t){t.div.contains(document.activeElement)&&(this.#A&&clearTimeout(this.#A),this.#A=setTimeout(()=>{this.focusMainContainer(),this.#A=null},0)),this.#n.delete(t.id),t.annotationElementId&&this.#N?.delete(t.annotationElementId),this.unselect(t),(!t.annotationElementId||!this.#p.has(t.annotationElementId))&&this.#s?.remove(t.id)}addDeletedAnnotationElement(t){this.#p.add(t.annotationElementId),this.addChangedExistingAnnotation(t),t.deleted=!0}isDeletedAnnotationElement(t){return this.#p.has(t)}removeDeletedAnnotationElement(t){this.#p.delete(t.annotationElementId),this.removeChangedExistingAnnotation(t),t.deleted=!1}#et(t){const i=this.#i.get(t.pageIndex);i?i.addOrRebuild(t):(this.addEditor(t),this.addToAnnotationStorage(t))}setActiveEditor(t){this.#e!==t&&(this.#e=t,t&&this.#B(t.propertiesToUpdate))}get#ht(){let t=null;for(t of this.#S);return t}updateUI(t){this.#ht===t&&this.#B(t.propertiesToUpdate)}updateUIForDefaultProperties(t){this.#B(t.defaultPropertiesToUpdate)}toggleSelected(t){if(this.#S.has(t)){this.#S.delete(t),t.unselect(),this.#O({hasSelectedEditor:this.hasSelection});return}this.#S.add(t),t.select(),this.#B(t.propertiesToUpdate),this.#O({hasSelectedEditor:!0})}setSelected(t){this.updateToolbar({mode:t.mode,editId:t.id}),this.#h?.commitOrRemove();for(const i of this.#S)i!==t&&i.unselect();this.#S.clear(),this.#S.add(t),t.select(),this.#B(t.propertiesToUpdate),this.#O({hasSelectedEditor:!0})}isSelected(t){return this.#S.has(t)}get firstSelectedEditor(){return this.#S.values().next().value}unselect(t){t.unselect(),this.#S.delete(t),this.#O({hasSelectedEditor:this.hasSelection})}get hasSelection(){return this.#S.size!==0}get isEnterHandled(){return this.#S.size===1&&this.firstSelectedEditor.isEnterHandled}undo(){this.#o.undo(),this.#O({hasSomethingToUndo:this.#o.hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:this.#X()}),this._editorUndoBar?.hide()}redo(){this.#o.redo(),this.#O({hasSomethingToUndo:!0,hasSomethingToRedo:this.#o.hasSomethingToRedo(),isEmpty:this.#X()})}addCommands(t){this.#o.add(t),this.#O({hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:this.#X()})}cleanUndoStack(t){this.#o.cleanType(t)}#X(){if(this.#n.size===0)return!0;if(this.#n.size===1)for(const t of this.#n.values())return t.isEmpty();return!1}delete(){this.commitOrRemove();const t=this.currentLayer?.endDrawingSession(!0);if(!this.hasSelection&&!t)return;const i=t?[t]:[...this.#S],a=()=>{this._editorUndoBar?.show(r,i.length===1?i[0].editorType:i.length);for(const c of i)c.remove()},r=()=>{for(const c of i)this.#et(c)};this.addCommands({cmd:a,undo:r,mustExec:!0})}commitOrRemove(){this.#e?.commitOrRemove()}hasSomethingToControl(){return this.#e||this.hasSelection}#nt(t){for(const i of this.#S)i.unselect();this.#S.clear();for(const i of t)i.isEmpty()||(this.#S.add(i),i.select());this.#O({hasSelectedEditor:this.hasSelection})}selectAll(){for(const t of this.#S)t.commit();this.#nt(this.#n.values())}unselectAll(){if(!(this.#e&&(this.#e.commitOrRemove(),this.#w!==wt.NONE))&&!this.#h?.commitOrRemove()&&this.hasSelection){for(const t of this.#S)t.unselect();this.#S.clear(),this.#O({hasSelectedEditor:!1})}}translateSelectedEditors(t,i,a=!1){if(a||this.commitOrRemove(),!this.hasSelection)return;this.#$[0]+=t,this.#$[1]+=i;const[r,c]=this.#$,u=[...this.#S],h=1e3;this.#L&&clearTimeout(this.#L),this.#L=setTimeout(()=>{this.#L=null,this.#$[0]=this.#$[1]=0,this.addCommands({cmd:()=>{for(const p of u)this.#n.has(p.id)&&(p.translateInPage(r,c),p.translationDone())},undo:()=>{for(const p of u)this.#n.has(p.id)&&(p.translateInPage(-r,-c),p.translationDone())},mustExec:!1})},h);for(const p of u)p.translateInPage(t,i),p.translationDone()}setUpDragSession(){if(this.hasSelection){this.disableUserSelect(!0),this.#g=new Map;for(const t of this.#S)this.#g.set(t,{savedX:t.x,savedY:t.y,savedPageIndex:t.pageIndex,newX:0,newY:0,newPageIndex:-1})}}endDragSession(){if(!this.#g)return!1;this.disableUserSelect(!1);const t=this.#g;this.#g=null;let i=!1;for(const[{x:r,y:c,pageIndex:u},h]of t)h.newX=r,h.newY=c,h.newPageIndex=u,i||=r!==h.savedX||c!==h.savedY||u!==h.savedPageIndex;if(!i)return!1;const a=(r,c,u,h)=>{if(this.#n.has(r.id)){const p=this.#i.get(h);p?r._setParentAndPosition(p,c,u):(r.pageIndex=h,r.x=c,r.y=u)}};return this.addCommands({cmd:()=>{for(const[r,{newX:c,newY:u,newPageIndex:h}]of t)a(r,c,u,h)},undo:()=>{for(const[r,{savedX:c,savedY:u,savedPageIndex:h}]of t)a(r,c,u,h)},mustExec:!0}),!0}dragSelectedEditors(t,i){if(this.#g)for(const a of this.#g.keys())a.drag(t,i)}rebuild(t){if(t.parent===null){const i=this.getLayer(t.pageIndex);i?(i.changeParent(t),i.addOrRebuild(t)):(this.addEditor(t),this.addToAnnotationStorage(t),t.rebuild())}else t.parent.addOrRebuild(t)}get isEditorHandlingKeyboard(){return this.getActive()?.shouldGetKeyboardEvents()||this.#S.size===1&&this.firstSelectedEditor.shouldGetKeyboardEvents()}isActive(t){return this.#e===t}getActive(){return this.#e}getMode(){return this.#w}get imageManager(){return zt(this,"imageManager",new Ff)}getSelectionBoxes(t){if(!t)return null;const i=document.getSelection();for(let m=0,g=i.rangeCount;m<g;m++)if(!t.contains(i.getRangeAt(m).commonAncestorContainer))return null;const{x:a,y:r,width:c,height:u}=t.getBoundingClientRect();let h;switch(t.getAttribute("data-main-rotation")){case"90":h=(m,g,y,b)=>({x:(g-r)/u,y:1-(m+y-a)/c,width:b/u,height:y/c});break;case"180":h=(m,g,y,b)=>({x:1-(m+y-a)/c,y:1-(g+b-r)/u,width:y/c,height:b/u});break;case"270":h=(m,g,y,b)=>({x:1-(g+b-r)/u,y:(m-a)/c,width:b/u,height:y/c});break;default:h=(m,g,y,b)=>({x:(m-a)/c,y:(g-r)/u,width:y/c,height:b/u});break}const p=[];for(let m=0,g=i.rangeCount;m<g;m++){const y=i.getRangeAt(m);if(!y.collapsed)for(const{x:b,y:S,width:A,height:_}of y.getClientRects())A===0||_===0||p.push(h(b,S,A,_))}return p.length===0?null:p}addChangedExistingAnnotation({annotationElementId:t,id:i}){(this.#r||=new Map).set(t,i)}removeChangedExistingAnnotation({annotationElementId:t}){this.#r?.delete(t)}renderAnnotationElement(t){const i=this.#r?.get(t.data.id);if(!i)return;const a=this.#s.getRawValue(i);a&&(this.#w===wt.NONE&&!a.hasBeenModified||a.renderAnnotationElement(t))}setMissingCanvas(t,i,a){const r=this.#N?.get(t);r&&(r.setCanvas(i,a),this.#N.delete(t))}addMissingCanvas(t,i){(this.#N||=new Map).set(t,i)}}class Di{#t=null;#e=!1;#n=null;#i=null;#a=null;#s=null;#r=!1;#o=null;#u=null;#c=null;#h=null;#l=!1;static#p=null;static _l10n=null;constructor(t){this.#u=t,this.#l=t._uiManager.useNewAltTextFlow,Di.#p||=Object.freeze({added:"pdfjs-editor-new-alt-text-added-button","added-label":"pdfjs-editor-new-alt-text-added-button-label",missing:"pdfjs-editor-new-alt-text-missing-button","missing-label":"pdfjs-editor-new-alt-text-missing-button-label",review:"pdfjs-editor-new-alt-text-to-review-button","review-label":"pdfjs-editor-new-alt-text-to-review-button-label"})}static initialize(t){Di._l10n??=t}async render(){const t=this.#n=document.createElement("button");t.className="altText",t.tabIndex="0";const i=this.#i=document.createElement("span");t.append(i),this.#l?(t.classList.add("new"),t.setAttribute("data-l10n-id",Di.#p.missing),i.setAttribute("data-l10n-id",Di.#p["missing-label"])):(t.setAttribute("data-l10n-id","pdfjs-editor-alt-text-button"),i.setAttribute("data-l10n-id","pdfjs-editor-alt-text-button-label"));const a=this.#u._uiManager._signal;t.addEventListener("contextmenu",Xn,{signal:a}),t.addEventListener("pointerdown",c=>c.stopPropagation(),{signal:a});const r=c=>{c.preventDefault(),this.#u._uiManager.editAltText(this.#u),this.#l&&this.#u._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_clicked",data:{label:this.#g}})};return t.addEventListener("click",r,{capture:!0,signal:a}),t.addEventListener("keydown",c=>{c.target===t&&c.key==="Enter"&&(this.#r=!0,r(c))},{signal:a}),await this.#f(),t}get#g(){return this.#t&&"added"||this.#t===null&&this.guessedText&&"review"||"missing"}finish(){this.#n&&(this.#n.focus({focusVisible:this.#r}),this.#r=!1)}isEmpty(){return this.#l?this.#t===null:!this.#t&&!this.#e}hasData(){return this.#l?this.#t!==null||!!this.#c:this.isEmpty()}get guessedText(){return this.#c}async setGuessedText(t){this.#t===null&&(this.#c=t,this.#h=await Di._l10n.get("pdfjs-editor-new-alt-text-generated-alt-text-with-disclaimer",{generatedAltText:t}),this.#f())}toggleAltTextBadge(t=!1){if(!this.#l||this.#t){this.#o?.remove(),this.#o=null;return}if(!this.#o){const i=this.#o=document.createElement("div");i.className="noAltTextBadge",this.#u.div.append(i)}this.#o.classList.toggle("hidden",!t)}serialize(t){let i=this.#t;return!t&&this.#c===i&&(i=this.#h),{altText:i,decorative:this.#e,guessedText:this.#c,textWithDisclaimer:this.#h}}get data(){return{altText:this.#t,decorative:this.#e}}set data({altText:t,decorative:i,guessedText:a,textWithDisclaimer:r,cancel:c=!1}){a&&(this.#c=a,this.#h=r),!(this.#t===t&&this.#e===i)&&(c||(this.#t=t,this.#e=i),this.#f())}toggle(t=!1){this.#n&&(!t&&this.#s&&(clearTimeout(this.#s),this.#s=null),this.#n.disabled=!t)}shown(){this.#u._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_displayed",data:{label:this.#g}})}destroy(){this.#n?.remove(),this.#n=null,this.#i=null,this.#a=null,this.#o?.remove(),this.#o=null}async#f(){const t=this.#n;if(!t)return;if(this.#l){if(t.classList.toggle("done",!!this.#t),t.setAttribute("data-l10n-id",Di.#p[this.#g]),this.#i?.setAttribute("data-l10n-id",Di.#p[`${this.#g}-label`]),!this.#t){this.#a?.remove();return}}else{if(!this.#t&&!this.#e){t.classList.remove("done"),this.#a?.remove();return}t.classList.add("done"),t.setAttribute("data-l10n-id","pdfjs-editor-alt-text-edit-button")}let i=this.#a;if(!i){this.#a=i=document.createElement("span"),i.className="tooltip",i.setAttribute("role","tooltip"),i.id=`alt-text-tooltip-${this.#u.id}`;const r=100,c=this.#u._uiManager._signal;c.addEventListener("abort",()=>{clearTimeout(this.#s),this.#s=null},{once:!0}),t.addEventListener("mouseenter",()=>{this.#s=setTimeout(()=>{this.#s=null,this.#a.classList.add("show"),this.#u._reportTelemetry({action:"alt_text_tooltip"})},r)},{signal:c}),t.addEventListener("mouseleave",()=>{this.#s&&(clearTimeout(this.#s),this.#s=null),this.#a?.classList.remove("show")},{signal:c})}this.#e?i.setAttribute("data-l10n-id","pdfjs-editor-alt-text-decorative-tooltip"):(i.removeAttribute("data-l10n-id"),i.textContent=this.#t),i.parentNode||t.append(i),this.#u.getElementForAltText()?.setAttribute("aria-describedby",i.id)}}class Au{#t=null;#e=!1;#n=null;#i=null;#a=null;#s=null;#r=!1;constructor(t){this.#n=t,this.toolbar=null}render(){if(!this.#n._uiManager.hasCommentManager())return null;const t=this.#t=document.createElement("button");t.className="comment",t.tabIndex="0",t.setAttribute("data-l10n-id","pdfjs-editor-edit-comment-button");const i=this.#n._uiManager._signal;t.addEventListener("contextmenu",Xn,{signal:i}),t.addEventListener("pointerdown",r=>r.stopPropagation(),{signal:i});const a=r=>{r.preventDefault(),this.edit()};return t.addEventListener("click",a,{capture:!0,signal:i}),t.addEventListener("keydown",r=>{r.target===t&&r.key==="Enter"&&(this.#e=!0,a(r))},{signal:i}),t}edit(){const{bottom:t,left:i,right:a}=this.#n.getClientDimensions(),r={top:t};this.#n._uiManager.direction==="ltr"?r.right=a:r.left=i,this.#n._uiManager.editComment(this.#n,r)}finish(){this.#t&&(this.#t.focus({focusVisible:this.#e}),this.#e=!1)}isDeleted(){return this.#r||this.#a===""}hasBeenEdited(){return this.isDeleted()||this.#a!==this.#i}serialize(){return this.data}get data(){return{text:this.#a,date:this.#s,deleted:this.#r}}set data(t){if(t===null){this.#a="",this.#r=!0;return}this.#a=t,this.#s=new Date,this.#r=!1}setInitialText(t){this.#i=t,this.data=t}toggle(t=!1){this.#t&&(this.#t.disabled=!t)}shown(){}destroy(){this.#t?.remove(),this.#t=null,this.#a="",this.#s=null,this.#n=null,this.#e=!1,this.#r=!1}}class _u{#t;#e=!1;#n=null;#i;#a;#s;#r;#o=null;#u;#c=null;#h;#l=null;constructor({container:t,isPinchingDisabled:i=null,isPinchingStopped:a=null,onPinchStart:r=null,onPinching:c=null,onPinchEnd:u=null,signal:h}){this.#t=t,this.#n=a,this.#i=i,this.#a=r,this.#s=c,this.#r=u,this.#h=new AbortController,this.#u=AbortSignal.any([h,this.#h.signal]),t.addEventListener("touchstart",this.#p.bind(this),{passive:!1,signal:this.#u})}get MIN_TOUCH_DISTANCE_TO_PINCH(){return 35/Ri.pixelRatio}#p(t){if(this.#i?.())return;if(t.touches.length===1){if(this.#o)return;const r=this.#o=new AbortController,c=AbortSignal.any([this.#u,r.signal]),u=this.#t,h={capture:!0,signal:c,passive:!1},p=m=>{m.pointerType==="touch"&&(this.#o?.abort(),this.#o=null)};u.addEventListener("pointerdown",m=>{m.pointerType==="touch"&&(Oe(m),p(m))},h),u.addEventListener("pointerup",p,h),u.addEventListener("pointercancel",p,h);return}if(!this.#l){this.#l=new AbortController;const r=AbortSignal.any([this.#u,this.#l.signal]),c=this.#t,u={signal:r,capture:!1,passive:!1};c.addEventListener("touchmove",this.#g.bind(this),u);const h=this.#f.bind(this);c.addEventListener("touchend",h,u),c.addEventListener("touchcancel",h,u),u.capture=!0,c.addEventListener("pointerdown",Oe,u),c.addEventListener("pointermove",Oe,u),c.addEventListener("pointercancel",Oe,u),c.addEventListener("pointerup",Oe,u),this.#a?.()}if(Oe(t),t.touches.length!==2||this.#n?.()){this.#c=null;return}let[i,a]=t.touches;i.identifier>a.identifier&&([i,a]=[a,i]),this.#c={touch0X:i.screenX,touch0Y:i.screenY,touch1X:a.screenX,touch1Y:a.screenY}}#g(t){if(!this.#c||t.touches.length!==2)return;Oe(t);let[i,a]=t.touches;i.identifier>a.identifier&&([i,a]=[a,i]);const{screenX:r,screenY:c}=i,{screenX:u,screenY:h}=a,p=this.#c,{touch0X:m,touch0Y:g,touch1X:y,touch1Y:b}=p,S=y-m,A=b-g,_=u-r,R=h-c,x=Math.hypot(_,R)||1,L=Math.hypot(S,A)||1;if(!this.#e&&Math.abs(L-x)<=_u.MIN_TOUCH_DISTANCE_TO_PINCH)return;if(p.touch0X=r,p.touch0Y=c,p.touch1X=u,p.touch1Y=h,!this.#e){this.#e=!0;return}const k=[(r+u)/2,(c+h)/2];this.#s?.(k,L,x)}#f(t){t.touches.length>=2||(this.#l&&(this.#l.abort(),this.#l=null,this.#r?.()),this.#c&&(Oe(t),this.#c=null,this.#e=!1))}destroy(){this.#h?.abort(),this.#h=null,this.#o?.abort(),this.#o=null}}class yt{#t=null;#e=null;#n=null;#i=null;#a=!1;#s=null;#r="";#o=!1;#u=null;#c=null;#h=null;#l=null;#p="";#g=!1;#f=null;#d=!1;#m=!1;#v=!1;#y=null;#E=0;#A=0;#b=null;#T=null;isSelected=!1;_isCopy=!1;_editToolbar=null;_initialOptions=Object.create(null);_initialData=null;_isVisible=!0;_uiManager=null;_focusEventsAllowed=!0;static _l10n=null;static _l10nResizer=null;#D=!1;#_=yt._zIndex++;static _borderLineWidth=-1;static _colorManager=new jf;static _zIndex=1;static _telemetryTimeout=1e3;static get _resizerKeyboardManager(){const t=yt.prototype._resizeWithKeyboard,i=Us.TRANSLATE_SMALL,a=Us.TRANSLATE_BIG;return zt(this,"_resizerKeyboardManager",new tl([[["ArrowLeft","mac+ArrowLeft"],t,{args:[-i,0]}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t,{args:[-a,0]}],[["ArrowRight","mac+ArrowRight"],t,{args:[i,0]}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t,{args:[a,0]}],[["ArrowUp","mac+ArrowUp"],t,{args:[0,-i]}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t,{args:[0,-a]}],[["ArrowDown","mac+ArrowDown"],t,{args:[0,i]}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t,{args:[0,a]}],[["Escape","mac+Escape"],yt.prototype._stopResizingWithKeyboard]]))}constructor(t){this.parent=t.parent,this.id=t.id,this.width=this.height=null,this.pageIndex=t.parent.pageIndex,this.name=t.name,this.div=null,this._uiManager=t.uiManager,this.annotationElementId=null,this._willKeepAspectRatio=!1,this._initialOptions.isCentered=t.isCentered,this._structTreeParentId=null,this.annotationElementId=t.annotationElementId||null;const{rotation:i,rawDims:{pageWidth:a,pageHeight:r,pageX:c,pageY:u}}=this.parent.viewport;this.rotation=i,this.pageRotation=(360+i-this._uiManager.viewParameters.rotation)%360,this.pageDimensions=[a,r],this.pageTranslation=[c,u];const[h,p]=this.parentDimensions;this.x=t.x/h,this.y=t.y/p,this.isAttachedToDOM=!1,this.deleted=!1}get editorType(){return Object.getPrototypeOf(this).constructor._type}get mode(){return Object.getPrototypeOf(this).constructor._editorType}static get isDrawer(){return!1}static get _defaultLineColor(){return zt(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}static deleteAnnotationElement(t){const i=new RM({id:t.parent.getNextId(),parent:t.parent,uiManager:t._uiManager});i.annotationElementId=t.annotationElementId,i.deleted=!0,i._uiManager.addToAnnotationStorage(i)}static initialize(t,i){if(yt._l10n??=t,yt._l10nResizer||=Object.freeze({topLeft:"pdfjs-editor-resizer-top-left",topMiddle:"pdfjs-editor-resizer-top-middle",topRight:"pdfjs-editor-resizer-top-right",middleRight:"pdfjs-editor-resizer-middle-right",bottomRight:"pdfjs-editor-resizer-bottom-right",bottomMiddle:"pdfjs-editor-resizer-bottom-middle",bottomLeft:"pdfjs-editor-resizer-bottom-left",middleLeft:"pdfjs-editor-resizer-middle-left"}),yt._borderLineWidth!==-1)return;const a=getComputedStyle(document.documentElement);yt._borderLineWidth=parseFloat(a.getPropertyValue("--outline-width"))||0}static updateDefaultParams(t,i){}static get defaultPropertiesToUpdate(){return[]}static isHandlingMimeForPasting(t){return!1}static paste(t,i){ie("Not implemented")}get propertiesToUpdate(){return[]}get _isDraggable(){return this.#D}set _isDraggable(t){this.#D=t,this.div?.classList.toggle("draggable",t)}get isEnterHandled(){return!0}center(){const[t,i]=this.pageDimensions;switch(this.parentRotation){case 90:this.x-=this.height*i/(t*2),this.y+=this.width*t/(i*2);break;case 180:this.x+=this.width/2,this.y+=this.height/2;break;case 270:this.x+=this.height*i/(t*2),this.y-=this.width*t/(i*2);break;default:this.x-=this.width/2,this.y-=this.height/2;break}this.fixAndSetPosition()}addCommands(t){this._uiManager.addCommands(t)}get currentLayer(){return this._uiManager.currentLayer}setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=this.#_}setParent(t){t!==null?(this.pageIndex=t.pageIndex,this.pageDimensions=t.pageDimensions):this.#G(),this.parent=t}focusin(t){this._focusEventsAllowed&&(this.#g?this.#g=!1:this.parent.setSelected(this))}focusout(t){!this._focusEventsAllowed||!this.isAttachedToDOM||t.relatedTarget?.closest(`#${this.id}`)||(t.preventDefault(),this.parent?.isMultipleSelection||this.commitOrRemove())}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.isInEditMode()&&this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}setAt(t,i,a,r){const[c,u]=this.parentDimensions;[a,r]=this.screenToPageTranslation(a,r),this.x=(t+a)/c,this.y=(i+r)/u,this.fixAndSetPosition()}_moveAfterPaste(t,i){const[a,r]=this.parentDimensions;this.setAt(t*a,i*r,this.width*a,this.height*r),this._onTranslated()}#M([t,i],a,r){[a,r]=this.screenToPageTranslation(a,r),this.x+=a/t,this.y+=r/i,this._onTranslating(this.x,this.y),this.fixAndSetPosition()}translate(t,i){this.#M(this.parentDimensions,t,i)}translateInPage(t,i){this.#f||=[this.x,this.y,this.width,this.height],this.#M(this.pageDimensions,t,i),this.div.scrollIntoView({block:"nearest"})}translationDone(){this._onTranslated(this.x,this.y)}drag(t,i){this.#f||=[this.x,this.y,this.width,this.height];const{div:a,parentDimensions:[r,c]}=this;if(this.x+=t/r,this.y+=i/c,this.parent&&(this.x<0||this.x>1||this.y<0||this.y>1)){const{x:y,y:b}=this.div.getBoundingClientRect();this.parent.findNewParent(this,y,b)&&(this.x-=Math.floor(this.x),this.y-=Math.floor(this.y))}let{x:u,y:h}=this;const[p,m]=this.getBaseTranslation();u+=p,h+=m;const{style:g}=a;g.left=`${(100*u).toFixed(2)}%`,g.top=`${(100*h).toFixed(2)}%`,this._onTranslating(u,h),a.scrollIntoView({block:"nearest"})}_onTranslating(t,i){}_onTranslated(t,i){}get _hasBeenMoved(){return!!this.#f&&(this.#f[0]!==this.x||this.#f[1]!==this.y)}get _hasBeenResized(){return!!this.#f&&(this.#f[2]!==this.width||this.#f[3]!==this.height)}getBaseTranslation(){const[t,i]=this.parentDimensions,{_borderLineWidth:a}=yt,r=a/t,c=a/i;switch(this.rotation){case 90:return[-r,c];case 180:return[r,c];case 270:return[r,-c];default:return[-r,-c]}}get _mustFixPosition(){return!0}fixAndSetPosition(t=this.rotation){const{div:{style:i},pageDimensions:[a,r]}=this;let{x:c,y:u,width:h,height:p}=this;if(h*=a,p*=r,c*=a,u*=r,this._mustFixPosition)switch(t){case 0:c=dn(c,0,a-h),u=dn(u,0,r-p);break;case 90:c=dn(c,0,a-p),u=dn(u,h,r);break;case 180:c=dn(c,h,a),u=dn(u,p,r);break;case 270:c=dn(c,p,a),u=dn(u,0,r-h);break}this.x=c/=a,this.y=u/=r;const[m,g]=this.getBaseTranslation();c+=m,u+=g,i.left=`${(100*c).toFixed(2)}%`,i.top=`${(100*u).toFixed(2)}%`,this.moveInDOM()}static#R(t,i,a){switch(a){case 90:return[i,-t];case 180:return[-t,-i];case 270:return[-i,t];default:return[t,i]}}screenToPageTranslation(t,i){return yt.#R(t,i,this.parentRotation)}pageTranslationToScreen(t,i){return yt.#R(t,i,360-this.parentRotation)}#C(t){switch(t){case 90:{const[i,a]=this.pageDimensions;return[0,-i/a,a/i,0]}case 180:return[-1,0,0,-1];case 270:{const[i,a]=this.pageDimensions;return[0,i/a,-a/i,0]}default:return[1,0,0,1]}}get parentScale(){return this._uiManager.viewParameters.realScale}get parentRotation(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}get parentDimensions(){const{parentScale:t,pageDimensions:[i,a]}=this;return[i*t,a*t]}setDims(t,i){const[a,r]=this.parentDimensions,{style:c}=this.div;c.width=`${(100*t/a).toFixed(2)}%`,this.#o||(c.height=`${(100*i/r).toFixed(2)}%`)}fixDims(){const{style:t}=this.div,{height:i,width:a}=t,r=a.endsWith("%"),c=!this.#o&&i.endsWith("%");if(r&&c)return;const[u,h]=this.parentDimensions;r||(t.width=`${(100*parseFloat(a)/u).toFixed(2)}%`),!this.#o&&!c&&(t.height=`${(100*parseFloat(i)/h).toFixed(2)}%`)}getInitialTranslation(){return[0,0]}#x(){if(this.#u)return;this.#u=document.createElement("div"),this.#u.classList.add("resizers");const t=this._willKeepAspectRatio?["topLeft","topRight","bottomRight","bottomLeft"]:["topLeft","topMiddle","topRight","middleRight","bottomRight","bottomMiddle","bottomLeft","middleLeft"],i=this._uiManager._signal;for(const a of t){const r=document.createElement("div");this.#u.append(r),r.classList.add("resizer",a),r.setAttribute("data-resizer-name",a),r.addEventListener("pointerdown",this.#k.bind(this,a),{signal:i}),r.addEventListener("contextmenu",Xn,{signal:i}),r.tabIndex=-1}this.div.prepend(this.#u)}#k(t,i){i.preventDefault();const{isMac:a}=Ve.platform;if(i.button!==0||i.ctrlKey&&a)return;this.#n?.toggle(!1);const r=this._isDraggable;this._isDraggable=!1,this.#c=[i.screenX,i.screenY];const c=new AbortController,u=this._uiManager.combinedSignal(c);this.parent.togglePointerEvents(!1),window.addEventListener("pointermove",this.#F.bind(this,t),{passive:!0,capture:!0,signal:u}),window.addEventListener("touchmove",Oe,{passive:!1,signal:u}),window.addEventListener("contextmenu",Xn,{signal:u}),this.#h={savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height};const h=this.parent.div.style.cursor,p=this.div.style.cursor;this.div.style.cursor=this.parent.div.style.cursor=window.getComputedStyle(i.target).cursor;const m=()=>{c.abort(),this.parent.togglePointerEvents(!0),this.#n?.toggle(!0),this._isDraggable=r,this.parent.div.style.cursor=h,this.div.style.cursor=p,this.#N()};window.addEventListener("pointerup",m,{signal:u}),window.addEventListener("blur",m,{signal:u})}#U(t,i,a,r){this.width=a,this.height=r,this.x=t,this.y=i;const[c,u]=this.parentDimensions;this.setDims(c*a,u*r),this.fixAndSetPosition(),this._onResized()}_onResized(){}#N(){if(!this.#h)return;const{savedX:t,savedY:i,savedWidth:a,savedHeight:r}=this.#h;this.#h=null;const c=this.x,u=this.y,h=this.width,p=this.height;c===t&&u===i&&h===a&&p===r||this.addCommands({cmd:this.#U.bind(this,c,u,h,p),undo:this.#U.bind(this,t,i,a,r),mustExec:!0})}static _round(t){return Math.round(t*1e4)/1e4}#F(t,i){const[a,r]=this.parentDimensions,c=this.x,u=this.y,h=this.width,p=this.height,m=yt.MIN_SIZE/a,g=yt.MIN_SIZE/r,y=this.#C(this.rotation),b=(B,Q)=>[y[0]*B+y[2]*Q,y[1]*B+y[3]*Q],S=this.#C(360-this.rotation),A=(B,Q)=>[S[0]*B+S[2]*Q,S[1]*B+S[3]*Q];let _,R,x=!1,L=!1;switch(t){case"topLeft":x=!0,_=(B,Q)=>[0,0],R=(B,Q)=>[B,Q];break;case"topMiddle":_=(B,Q)=>[B/2,0],R=(B,Q)=>[B/2,Q];break;case"topRight":x=!0,_=(B,Q)=>[B,0],R=(B,Q)=>[0,Q];break;case"middleRight":L=!0,_=(B,Q)=>[B,Q/2],R=(B,Q)=>[0,Q/2];break;case"bottomRight":x=!0,_=(B,Q)=>[B,Q],R=(B,Q)=>[0,0];break;case"bottomMiddle":_=(B,Q)=>[B/2,Q],R=(B,Q)=>[B/2,0];break;case"bottomLeft":x=!0,_=(B,Q)=>[0,Q],R=(B,Q)=>[B,0];break;case"middleLeft":L=!0,_=(B,Q)=>[0,Q/2],R=(B,Q)=>[B,Q/2];break}const k=_(h,p),U=R(h,p);let I=b(...U);const j=yt._round(c+I[0]),F=yt._round(u+I[1]);let J=1,Y=1,at,K;if(i.fromKeyboard)({deltaX:at,deltaY:K}=i);else{const{screenX:B,screenY:Q}=i,[dt,Ct]=this.#c;[at,K]=this.screenToPageTranslation(B-dt,Q-Ct),this.#c[0]=B,this.#c[1]=Q}if([at,K]=A(at/a,K/r),x){const B=Math.hypot(h,p);J=Y=Math.max(Math.min(Math.hypot(U[0]-k[0]-at,U[1]-k[1]-K)/B,1/h,1/p),m/h,g/p)}else L?J=dn(Math.abs(U[0]-k[0]-at),m,1)/h:Y=dn(Math.abs(U[1]-k[1]-K),g,1)/p;const lt=yt._round(h*J),Et=yt._round(p*Y);I=b(...R(lt,Et));const bt=j-I[0],Gt=F-I[1];this.#f||=[this.x,this.y,this.width,this.height],this.width=lt,this.height=Et,this.x=bt,this.y=Gt,this.setDims(a*lt,r*Et),this.fixAndSetPosition(),this._onResizing()}_onResizing(){}altTextFinish(){this.#n?.finish()}get toolbarButtons(){return null}async addEditToolbar(){if(this._editToolbar||this.#m)return this._editToolbar;this._editToolbar=new Jo(this),this.div.append(this._editToolbar.render()),this._editToolbar.addButton("comment",this.addCommentButton());const{toolbarButtons:t}=this;if(t)for(const[i,a]of t)await this._editToolbar.addButton(i,a);return this._editToolbar.addButton("delete"),this._editToolbar}removeEditToolbar(){this._editToolbar&&(this._editToolbar.remove(),this._editToolbar=null,this.#n?.destroy())}addContainer(t){const i=this._editToolbar?.div;i?i.before(t):this.div.append(t)}getClientDimensions(){return this.div.getBoundingClientRect()}createAltText(){return this.#n||(Di.initialize(yt._l10n),this.#n=new Di(this),this.#t&&(this.#n.data=this.#t,this.#t=null)),this.#n}get altTextData(){return this.#n?.data}set altTextData(t){this.#n&&(this.#n.data=t)}get guessedAltText(){return this.#n?.guessedText}async setGuessedAltText(t){await this.#n?.setGuessedText(t)}serializeAltText(t){return this.#n?.serialize(t)}hasAltText(){return!!this.#n&&!this.#n.isEmpty()}hasAltTextData(){return this.#n?.hasData()??!1}addCommentButton(){return this.#i?this.#i:this.#i=new Au(this)}get commentColor(){return null}get comment(){const t=this.#i;return{text:t.data.text,date:t.data.date,deleted:t.isDeleted(),color:this.commentColor}}set comment(t){this.#i||(this.#i=new Au(this)),this.#i.data=t}setCommentData(t){this.#i||(this.#i=new Au(this)),this.#i.setInitialText(t)}get hasEditedComment(){return this.#i?.hasBeenEdited()}async editComment(){this.#i||(this.#i=new Au(this)),this.#i.edit()}addComment(t){this.hasEditedComment&&(t.popup={contents:this.comment.text,deleted:this.comment.deleted})}render(){const t=this.div=document.createElement("div");t.setAttribute("data-editor-rotation",(360-this.rotation)%360),t.className=this.name,t.setAttribute("id",this.id),t.tabIndex=this.#a?-1:0,t.setAttribute("role","application"),this.defaultL10nId&&t.setAttribute("data-l10n-id",this.defaultL10nId),this._isVisible||t.classList.add("hidden"),this.setInForeground(),this.#V();const[i,a]=this.parentDimensions;this.parentRotation%180!==0&&(t.style.maxWidth=`${(100*a/i).toFixed(2)}%`,t.style.maxHeight=`${(100*i/a).toFixed(2)}%`);const[r,c]=this.getInitialTranslation();return this.translate(r,c),Kv(this,t,["keydown","pointerdown","dblclick"]),this.isResizable&&this._uiManager._supportsPinchToZoom&&(this.#T||=new _u({container:t,isPinchingDisabled:()=>!this.isSelected,onPinchStart:this.#w.bind(this),onPinching:this.#S.bind(this),onPinchEnd:this.#z.bind(this),signal:this._uiManager._signal})),this._uiManager._editorUndoBar?.hide(),t}#w(){this.#h={savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height},this.#n?.toggle(!1),this.parent.togglePointerEvents(!1)}#S(t,i,a){let c=.7*(a/i)+1-.7;if(c===1)return;const u=this.#C(this.rotation),h=(j,F)=>[u[0]*j+u[2]*F,u[1]*j+u[3]*F],[p,m]=this.parentDimensions,g=this.x,y=this.y,b=this.width,S=this.height,A=yt.MIN_SIZE/p,_=yt.MIN_SIZE/m;c=Math.max(Math.min(c,1/b,1/S),A/b,_/S);const R=yt._round(b*c),x=yt._round(S*c);if(R===b&&x===S)return;this.#f||=[g,y,b,S];const L=h(b/2,S/2),k=yt._round(g+L[0]),U=yt._round(y+L[1]),I=h(R/2,x/2);this.x=k-I[0],this.y=U-I[1],this.width=R,this.height=x,this.setDims(p*R,m*x),this.fixAndSetPosition(),this._onResizing()}#z(){this.#n?.toggle(!0),this.parent.togglePointerEvents(!0),this.#N()}pointerdown(t){const{isMac:i}=Ve.platform;if(t.button!==0||t.ctrlKey&&i){t.preventDefault();return}if(this.#g=!0,this._isDraggable){this.#j(t);return}this.#H(t)}#H(t){const{isMac:i}=Ve.platform;t.ctrlKey&&!i||t.shiftKey||t.metaKey&&i?this.parent.toggleSelected(this):this.parent.setSelected(this)}#j(t){const{isSelected:i}=this;this._uiManager.setUpDragSession();let a=!1;const r=new AbortController,c=this._uiManager.combinedSignal(r),u={capture:!0,passive:!1,signal:c},h=m=>{r.abort(),this.#s=null,this.#g=!1,this._uiManager.endDragSession()||this.#H(m),a&&this._onStopDragging()};i&&(this.#E=t.clientX,this.#A=t.clientY,this.#s=t.pointerId,this.#r=t.pointerType,window.addEventListener("pointermove",m=>{a||(a=!0,this._onStartDragging());const{clientX:g,clientY:y,pointerId:b}=m;if(b!==this.#s){Oe(m);return}const[S,A]=this.screenToPageTranslation(g-this.#E,y-this.#A);this.#E=g,this.#A=y,this._uiManager.dragSelectedEditors(S,A)},u),window.addEventListener("touchmove",Oe,u),window.addEventListener("pointerdown",m=>{m.pointerType===this.#r&&(this.#T||m.isPrimary)&&h(m),Oe(m)},u));const p=m=>{if(!this.#s||this.#s===m.pointerId){h(m);return}Oe(m)};window.addEventListener("pointerup",p,{signal:c}),window.addEventListener("blur",p,{signal:c})}_onStartDragging(){}_onStopDragging(){}moveInDOM(){this.#y&&clearTimeout(this.#y),this.#y=setTimeout(()=>{this.#y=null,this.parent?.moveEditorInDOM(this)},0)}_setParentAndPosition(t,i,a){t.changeParent(this),this.x=i,this.y=a,this.fixAndSetPosition(),this._onTranslated()}getRect(t,i,a=this.rotation){const r=this.parentScale,[c,u]=this.pageDimensions,[h,p]=this.pageTranslation,m=t/r,g=i/r,y=this.x*c,b=this.y*u,S=this.width*c,A=this.height*u;switch(a){case 0:return[y+m+h,u-b-g-A+p,y+m+S+h,u-b-g+p];case 90:return[y+g+h,u-b+m+p,y+g+A+h,u-b+m+S+p];case 180:return[y-m-S+h,u-b+g+p,y-m+h,u-b+g+A+p];case 270:return[y-g-A+h,u-b-m-S+p,y-g+h,u-b-m+p];default:throw new Error("Invalid rotation")}}getRectInCurrentCoords(t,i){const[a,r,c,u]=t,h=c-a,p=u-r;switch(this.rotation){case 0:return[a,i-u,h,p];case 90:return[a,i-r,p,h];case 180:return[c,i-r,h,p];case 270:return[c,i-u,p,h];default:throw new Error("Invalid rotation")}}onceAdded(t){}isEmpty(){return!1}enableEditMode(){return this.isInEditMode()?!1:(this.parent.setEditingState(!1),this.#m=!0,!0)}disableEditMode(){return this.isInEditMode()?(this.parent.setEditingState(!0),this.#m=!1,!0):!1}isInEditMode(){return this.#m}shouldGetKeyboardEvents(){return this.#v}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}get isOnScreen(){const{top:t,left:i,bottom:a,right:r}=this.getClientDimensions(),{innerHeight:c,innerWidth:u}=window;return i<u&&r>0&&t<c&&a>0}#V(){if(this.#l||!this.div)return;this.#l=new AbortController;const t=this._uiManager.combinedSignal(this.#l);this.div.addEventListener("focusin",this.focusin.bind(this),{signal:t}),this.div.addEventListener("focusout",this.focusout.bind(this),{signal:t})}rebuild(){this.#V()}rotate(t){}resize(){}serializeDeleted(){return{id:this.annotationElementId,deleted:!0,pageIndex:this.pageIndex,popupRef:this._initialData?.popupRef||""}}serialize(t=!1,i=null){ie("An editor must be serializable")}static async deserialize(t,i,a){const r=new this.prototype.constructor({parent:i,id:i.getNextId(),uiManager:a,annotationElementId:t.annotationElementId});r.rotation=t.rotation,r.#t=t.accessibilityData,r._isCopy=t.isCopy||!1;const[c,u]=r.pageDimensions,[h,p,m,g]=r.getRectInCurrentCoords(t.rect,u);return r.x=h/c,r.y=p/u,r.width=m/c,r.height=g/u,r}get hasBeenModified(){return!!this.annotationElementId&&(this.deleted||this.serialize()!==null)}remove(){if(this.#l?.abort(),this.#l=null,this.isEmpty()||this.commit(),this.parent?this.parent.remove(this):this._uiManager.removeEditor(this),this.#y&&(clearTimeout(this.#y),this.#y=null),this.#G(),this.removeEditToolbar(),this.#b){for(const t of this.#b.values())clearTimeout(t);this.#b=null}this.parent=null,this.#T?.destroy(),this.#T=null}get isResizable(){return!1}makeResizable(){this.isResizable&&(this.#x(),this.#u.classList.remove("hidden"))}get toolbarPosition(){return null}keydown(t){if(!this.isResizable||t.target!==this.div||t.key!=="Enter")return;this._uiManager.setSelected(this),this.#h={savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height};const i=this.#u.children;if(!this.#e){this.#e=Array.from(i);const u=this.#q.bind(this),h=this.#$.bind(this),p=this._uiManager._signal;for(const m of this.#e){const g=m.getAttribute("data-resizer-name");m.setAttribute("role","spinbutton"),m.addEventListener("keydown",u,{signal:p}),m.addEventListener("blur",h,{signal:p}),m.addEventListener("focus",this.#L.bind(this,g),{signal:p}),m.setAttribute("data-l10n-id",yt._l10nResizer[g])}}const a=this.#e[0];let r=0;for(const u of i){if(u===a)break;r++}const c=(360-this.rotation+this.parentRotation)%360/90*(this.#e.length/4);if(c!==r){if(c<r)for(let h=0;h<r-c;h++)this.#u.append(this.#u.firstChild);else if(c>r)for(let h=0;h<c-r;h++)this.#u.firstChild.before(this.#u.lastChild);let u=0;for(const h of i){const m=this.#e[u++].getAttribute("data-resizer-name");h.setAttribute("data-l10n-id",yt._l10nResizer[m])}}this.#I(0),this.#v=!0,this.#u.firstChild.focus({focusVisible:!0}),t.preventDefault(),t.stopImmediatePropagation()}#q(t){yt._resizerKeyboardManager.exec(this,t)}#$(t){this.#v&&t.relatedTarget?.parentNode!==this.#u&&this.#G()}#L(t){this.#p=this.#v?t:""}#I(t){if(this.#e)for(const i of this.#e)i.tabIndex=t}_resizeWithKeyboard(t,i){this.#v&&this.#F(this.#p,{deltaX:t,deltaY:i,fromKeyboard:!0})}#G(){this.#v=!1,this.#I(-1),this.#N()}_stopResizingWithKeyboard(){this.#G(),this.div.focus()}select(){if(!(this.isSelected&&this._editToolbar)){if(this.isSelected=!0,this.makeResizable(),this.div?.classList.add("selectedEditor"),!this._editToolbar){this.addEditToolbar().then(()=>{this.div?.classList.contains("selectedEditor")&&this._editToolbar?.show()});return}this._editToolbar?.show(),this.#n?.toggleAltTextBadge(!1)}}unselect(){this.isSelected&&(this.isSelected=!1,this.#u?.classList.add("hidden"),this.div?.classList.remove("selectedEditor"),this.div?.contains(document.activeElement)&&this._uiManager.currentLayer.div.focus({preventScroll:!0}),this._editToolbar?.hide(),this.#n?.toggleAltTextBadge(!0))}updateParams(t,i){}disableEditing(){}enableEditing(){}get canChangeContent(){return!1}enterInEditMode(){this.canChangeContent&&(this.enableEditMode(),this.div.focus())}dblclick(t){this.enterInEditMode(),this.parent.updateToolbar({mode:this.constructor._editorType,editId:this.id})}getElementForAltText(){return this.div}get contentDiv(){return this.div}get isEditing(){return this.#d}set isEditing(t){this.#d=t,this.parent&&(t?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null))}setAspectRatio(t,i){this.#o=!0;const a=t/i,{style:r}=this.div;r.aspectRatio=a,r.height="auto"}static get MIN_SIZE(){return 16}static canCreateNewEmptyEditor(){return!0}get telemetryInitialData(){return{action:"added"}}get telemetryFinalData(){return null}_reportTelemetry(t,i=!1){if(i){this.#b||=new Map;const{action:a}=t;let r=this.#b.get(a);r&&clearTimeout(r),r=setTimeout(()=>{this._reportTelemetry(t),this.#b.delete(a),this.#b.size===0&&(this.#b=null)},yt._telemetryTimeout),this.#b.set(a,r);return}t.type||=this.editorType,this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:t}})}show(t=this._isVisible){this.div.classList.toggle("hidden",!t),this._isVisible=t}enable(){this.div&&(this.div.tabIndex=0),this.#a=!1}disable(){this.div&&(this.div.tabIndex=-1),this.#a=!0}renderAnnotationElement(t){let i=t.container.querySelector(".annotationContent");if(!i)i=document.createElement("div"),i.classList.add("annotationContent",this.editorType),t.container.prepend(i);else if(i.nodeName==="CANVAS"){const a=i;i=document.createElement("div"),i.classList.add("annotationContent",this.editorType),a.before(i)}return i}resetAnnotationElement(t){const{firstChild:i}=t.container;i?.nodeName==="DIV"&&i.classList.contains("annotationContent")&&i.remove()}}class RM extends yt{constructor(t){super(t),this.annotationElementId=t.annotationElementId,this.deleted=!0}serialize(){return this.serializeDeleted()}}const Zv=3285377520,Yn=4294901760,Mi=65535;class Jv{constructor(t){this.h1=t?t&4294967295:Zv,this.h2=t?t&4294967295:Zv}update(t){let i,a;if(typeof t=="string"){i=new Uint8Array(t.length*2),a=0;for(let _=0,R=t.length;_<R;_++){const x=t.charCodeAt(_);x<=255?i[a++]=x:(i[a++]=x>>>8,i[a++]=x&255)}}else if(ArrayBuffer.isView(t))i=t.slice(),a=i.byteLength;else throw new Error("Invalid data format, must be a string or TypedArray.");const r=a>>2,c=a-r*4,u=new Uint32Array(i.buffer,0,r);let h=0,p=0,m=this.h1,g=this.h2;const y=3432918353,b=461845907,S=y&Mi,A=b&Mi;for(let _=0;_<r;_++)_&1?(h=u[_],h=h*y&Yn|h*S&Mi,h=h<<15|h>>>17,h=h*b&Yn|h*A&Mi,m^=h,m=m<<13|m>>>19,m=m*5+3864292196):(p=u[_],p=p*y&Yn|p*S&Mi,p=p<<15|p>>>17,p=p*b&Yn|p*A&Mi,g^=p,g=g<<13|g>>>19,g=g*5+3864292196);switch(h=0,c){case 3:h^=i[r*4+2]<<16;case 2:h^=i[r*4+1]<<8;case 1:h^=i[r*4],h=h*y&Yn|h*S&Mi,h=h<<15|h>>>17,h=h*b&Yn|h*A&Mi,r&1?m^=h:g^=h}this.h1=m,this.h2=g}hexdigest(){let t=this.h1,i=this.h2;return t^=i>>>1,t=t*3981806797&Yn|t*36045&Mi,i=i*4283543511&Yn|((i<<16|t>>>16)*2950163797&Yn)>>>16,t^=i>>>1,t=t*444984403&Yn|t*60499&Mi,i=i*3301882366&Yn|((i<<16|t>>>16)*3120437893&Yn)>>>16,t^=i>>>1,(t>>>0).toString(16).padStart(8,"0")+(i>>>0).toString(16).padStart(8,"0")}}const $f=Object.freeze({map:null,hash:"",transfer:void 0});class Gf{#t=!1;#e=null;#n=new Map;constructor(){this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}getValue(t,i){const a=this.#n.get(t);return a===void 0?i:Object.assign(i,a)}getRawValue(t){return this.#n.get(t)}remove(t){if(this.#n.delete(t),this.#n.size===0&&this.resetModified(),typeof this.onAnnotationEditor=="function"){for(const i of this.#n.values())if(i instanceof yt)return;this.onAnnotationEditor(null)}}setValue(t,i){const a=this.#n.get(t);let r=!1;if(a!==void 0)for(const[c,u]of Object.entries(i))a[c]!==u&&(r=!0,a[c]=u);else r=!0,this.#n.set(t,i);r&&this.#i(),i instanceof yt&&typeof this.onAnnotationEditor=="function"&&this.onAnnotationEditor(i.constructor._type)}has(t){return this.#n.has(t)}get size(){return this.#n.size}#i(){this.#t||(this.#t=!0,typeof this.onSetModified=="function"&&this.onSetModified())}resetModified(){this.#t&&(this.#t=!1,typeof this.onResetModified=="function"&&this.onResetModified())}get print(){return new t0(this)}get serializable(){if(this.#n.size===0)return $f;const t=new Map,i=new Jv,a=[],r=Object.create(null);let c=!1;for(const[u,h]of this.#n){const p=h instanceof yt?h.serialize(!1,r):h;p&&(t.set(u,p),i.update(`${u}:${JSON.stringify(p)}`),c||=!!p.bitmap)}if(c)for(const u of t.values())u.bitmap&&a.push(u.bitmap);return t.size>0?{map:t,hash:i.hexdigest(),transfer:a}:$f}get editorStats(){let t=null;const i=new Map;for(const a of this.#n.values()){if(!(a instanceof yt))continue;const r=a.telemetryFinalData;if(!r)continue;const{type:c}=r;i.has(c)||i.set(c,Object.getPrototypeOf(a).constructor),t||=Object.create(null);const u=t[c]||=new Map;for(const[h,p]of Object.entries(r)){if(h==="type")continue;let m=u.get(h);m||(m=new Map,u.set(h,m));const g=m.get(p)??0;m.set(p,g+1)}}for(const[a,r]of i)t[a]=r.computeTelemetryFinalData(t[a]);return t}resetModifiedIds(){this.#e=null}get modifiedIds(){if(this.#e)return this.#e;const t=[];for(const i of this.#n.values())!(i instanceof yt)||!i.annotationElementId||!i.serialize()||t.push(i.annotationElementId);return this.#e={ids:new Set(t),hash:t.join(",")}}[Symbol.iterator](){return this.#n.entries()}}class t0 extends Gf{#t;constructor(t){super();const{map:i,hash:a,transfer:r}=t.serializable,c=structuredClone(i,r?{transfer:r}:null);this.#t={map:c,hash:a,transfer:r}}get print(){ie("Should not call PrintAnnotationStorage.print")}get serializable(){return this.#t}get modifiedIds(){return zt(this,"modifiedIds",{ids:new Set,hash:""})}}class DM{#t=new Set;constructor({ownerDocument:t=globalThis.document,styleElement:i=null}){this._document=t,this.nativeFontFaces=new Set,this.styleElement=null,this.loadingRequests=[],this.loadTestFontId=0}addNativeFontFace(t){this.nativeFontFaces.add(t),this._document.fonts.add(t)}removeNativeFontFace(t){this.nativeFontFaces.delete(t),this._document.fonts.delete(t)}insertRule(t){this.styleElement||(this.styleElement=this._document.createElement("style"),this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement));const i=this.styleElement.sheet;i.insertRule(t,i.cssRules.length)}clear(){for(const t of this.nativeFontFaces)this._document.fonts.delete(t);this.nativeFontFaces.clear(),this.#t.clear(),this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}async loadSystemFont({systemFontInfo:t,disableFontFace:i,_inspectFont:a}){if(!(!t||this.#t.has(t.loadedName))){if(Me(!i,"loadSystemFont shouldn't be called when `disableFontFace` is set."),this.isFontLoadingAPISupported){const{loadedName:r,src:c,style:u}=t,h=new FontFace(r,c,u);this.addNativeFontFace(h);try{await h.load(),this.#t.add(r),a?.(t)}catch{xt(`Cannot load system font: ${t.baseFontName}, installing it could help to improve PDF rendering.`),this.removeNativeFontFace(h)}return}ie("Not implemented: loadSystemFont without the Font Loading API.")}}async bind(t){if(t.attached||t.missingFile&&!t.systemFontInfo)return;if(t.attached=!0,t.systemFontInfo){await this.loadSystemFont(t);return}if(this.isFontLoadingAPISupported){const a=t.createNativeFontFace();if(a){this.addNativeFontFace(a);try{await a.loaded}catch(r){throw xt(`Failed to load font '${a.family}': '${r}'.`),t.disableFontFace=!0,r}}return}const i=t.createFontFaceRule();if(i){if(this.insertRule(i),this.isSyncFontLoadingSupported)return;await new Promise(a=>{const r=this._queueLoadingCallback(a);this._prepareFontLoadEvent(t,r)})}}get isFontLoadingAPISupported(){const t=!!this._document?.fonts;return zt(this,"isFontLoadingAPISupported",t)}get isSyncFontLoadingSupported(){return zt(this,"isSyncFontLoadingSupported",un||Ve.platform.isFirefox)}_queueLoadingCallback(t){function i(){for(Me(!r.done,"completeRequest() cannot be called twice."),r.done=!0;a.length>0&&a[0].done;){const c=a.shift();setTimeout(c.callback,0)}}const{loadingRequests:a}=this,r={done:!1,complete:i,callback:t};return a.push(r),r}get _loadTestFont(){const t=atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==");return zt(this,"_loadTestFont",t)}_prepareFontLoadEvent(t,i){function a(U,I){return U.charCodeAt(I)<<24|U.charCodeAt(I+1)<<16|U.charCodeAt(I+2)<<8|U.charCodeAt(I+3)&255}function r(U,I,j,F){const J=U.substring(0,I),Y=U.substring(I+j);return J+F+Y}let c,u;const h=this._document.createElement("canvas");h.width=1,h.height=1;const p=h.getContext("2d");let m=0;function g(U,I){if(++m>30){xt("Load test font never loaded."),I();return}if(p.font="30px "+U,p.fillText(".",0,20),p.getImageData(0,0,1,1).data[3]>0){I();return}setTimeout(g.bind(null,U,I))}const y=`lt${Date.now()}${this.loadTestFontId++}`;let b=this._loadTestFont;b=r(b,976,y.length,y);const A=16,_=1482184792;let R=a(b,A);for(c=0,u=y.length-3;c<u;c+=4)R=R-_+a(y,c)|0;c<y.length&&(R=R-_+a(y+"XXX",c)|0),b=r(b,A,4,fM(R));const x=`url(data:font/opentype;base64,${btoa(b)});`,L=`@font-face {font-family:"${y}";src:${x}}`;this.insertRule(L);const k=this._document.createElement("div");k.style.visibility="hidden",k.style.width=k.style.height="10px",k.style.position="absolute",k.style.top=k.style.left="0px";for(const U of[t.loadedName,y]){const I=this._document.createElement("span");I.textContent="Hi",I.style.fontFamily=U,k.append(I)}this._document.body.append(k),g(y,()=>{k.remove(),i.complete()})}}class MM{constructor(t,i=null){this.compiledGlyphs=Object.create(null);for(const a in t)this[a]=t[a];this._inspectFont=i}createNativeFontFace(){if(!this.data||this.disableFontFace)return null;let t;if(!this.cssFontInfo)t=new FontFace(this.loadedName,this.data,{});else{const i={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(i.style=`oblique ${this.cssFontInfo.italicAngle}deg`),t=new FontFace(this.cssFontInfo.fontFamily,this.data,i)}return this._inspectFont?.(this),t}createFontFaceRule(){if(!this.data||this.disableFontFace)return null;const t=`url(data:${this.mimetype};base64,${Wv(this.data)});`;let i;if(!this.cssFontInfo)i=`@font-face {font-family:"${this.loadedName}";src:${t}}`;else{let a=`font-weight: ${this.cssFontInfo.fontWeight};`;this.cssFontInfo.italicAngle&&(a+=`font-style: oblique ${this.cssFontInfo.italicAngle}deg;`),i=`@font-face {font-family:"${this.cssFontInfo.fontFamily}";${a}src:${t}}`}return this._inspectFont?.(this,t),i}getPathGenerator(t,i){if(this.compiledGlyphs[i]!==void 0)return this.compiledGlyphs[i];const a=this.loadedName+"_path_"+i;let r;try{r=t.get(a)}catch(u){xt(`getPathGenerator - ignoring character: "${u}".`)}const c=new Path2D(r||"");return this.fontExtraProperties||t.delete(a),this.compiledGlyphs[i]=c}}function OM(l){if(l instanceof URL)return l.href;if(typeof l=="string"){if(un)return l;const t=URL.parse(l,window.location);if(t)return t.href}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}function kM(l){if(un&&typeof Buffer<"u"&&l instanceof Buffer)throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");if(l instanceof Uint8Array&&l.byteLength===l.buffer.byteLength)return l;if(typeof l=="string")return Wo(l);if(l instanceof ArrayBuffer||ArrayBuffer.isView(l)||typeof l=="object"&&!isNaN(l?.length))return new Uint8Array(l);throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}function Tu(l){if(typeof l!="string")return null;if(l.endsWith("/"))return l;throw new Error(`Invalid factory url: "${l}" must include trailing slash.`)}const Vf=l=>typeof l=="object"&&Number.isInteger(l?.num)&&l.num>=0&&Number.isInteger(l?.gen)&&l.gen>=0,NM=l=>typeof l=="object"&&typeof l?.name=="string",LM=bM.bind(null,Vf,NM);class IM{#t=new Map;#e=Promise.resolve();postMessage(t,i){const a={data:structuredClone(t,i?{transfer:i}:null)};this.#e.then(()=>{for(const[r]of this.#t)r.call(this,a)})}addEventListener(t,i,a=null){let r=null;if(a?.signal instanceof AbortSignal){const{signal:c}=a;if(c.aborted){xt("LoopbackPort - cannot use an `aborted` signal.");return}const u=()=>this.removeEventListener(t,i);r=()=>c.removeEventListener("abort",u),c.addEventListener("abort",u)}this.#t.set(i,r)}removeEventListener(t,i){this.#t.get(i)?.(),this.#t.delete(i)}terminate(){for(const[,t]of this.#t)t?.();this.#t.clear()}}const wu={DATA:1,ERROR:2},ke={CANCEL:1,CANCEL_COMPLETE:2,CLOSE:3,ENQUEUE:4,ERROR:5,PULL:6,PULL_COMPLETE:7,START_COMPLETE:8};function e0(){}function An(l){if(l instanceof Ps||l instanceof Nf||l instanceof Vv||l instanceof vu||l instanceof kf)return l;switch(l instanceof Error||typeof l=="object"&&l!==null||ie('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),l.name){case"AbortException":return new Ps(l.message);case"InvalidPDFException":return new Nf(l.message);case"PasswordException":return new Vv(l.message,l.code);case"ResponseException":return new vu(l.message,l.status,l.missing);case"UnknownErrorException":return new kf(l.message,l.details)}return new kf(l.message,l.toString())}class el{#t=new AbortController;constructor(t,i,a){this.sourceName=t,this.targetName=i,this.comObj=a,this.callbackId=1,this.streamId=1,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),a.addEventListener("message",this.#e.bind(this),{signal:this.#t.signal})}#e({data:t}){if(t.targetName!==this.sourceName)return;if(t.stream){this.#i(t);return}if(t.callback){const a=t.callbackId,r=this.callbackCapabilities[a];if(!r)throw new Error(`Cannot resolve callback ${a}`);if(delete this.callbackCapabilities[a],t.callback===wu.DATA)r.resolve(t.data);else if(t.callback===wu.ERROR)r.reject(An(t.reason));else throw new Error("Unexpected callback case");return}const i=this.actionHandler[t.action];if(!i)throw new Error(`Unknown action from worker: ${t.action}`);if(t.callbackId){const a=this.sourceName,r=t.sourceName,c=this.comObj;Promise.try(i,t.data).then(function(u){c.postMessage({sourceName:a,targetName:r,callback:wu.DATA,callbackId:t.callbackId,data:u})},function(u){c.postMessage({sourceName:a,targetName:r,callback:wu.ERROR,callbackId:t.callbackId,reason:An(u)})});return}if(t.streamId){this.#n(t);return}i(t.data)}on(t,i){const a=this.actionHandler;if(a[t])throw new Error(`There is already an actionName called "${t}"`);a[t]=i}send(t,i,a){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:t,data:i},a)}sendWithPromise(t,i,a){const r=this.callbackId++,c=Promise.withResolvers();this.callbackCapabilities[r]=c;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:t,callbackId:r,data:i},a)}catch(u){c.reject(u)}return c.promise}sendWithStream(t,i,a,r){const c=this.streamId++,u=this.sourceName,h=this.targetName,p=this.comObj;return new ReadableStream({start:m=>{const g=Promise.withResolvers();return this.streamControllers[c]={controller:m,startCall:g,pullCall:null,cancelCall:null,isClosed:!1},p.postMessage({sourceName:u,targetName:h,action:t,streamId:c,data:i,desiredSize:m.desiredSize},r),g.promise},pull:m=>{const g=Promise.withResolvers();return this.streamControllers[c].pullCall=g,p.postMessage({sourceName:u,targetName:h,stream:ke.PULL,streamId:c,desiredSize:m.desiredSize}),g.promise},cancel:m=>{Me(m instanceof Error,"cancel must have a valid reason");const g=Promise.withResolvers();return this.streamControllers[c].cancelCall=g,this.streamControllers[c].isClosed=!0,p.postMessage({sourceName:u,targetName:h,stream:ke.CANCEL,streamId:c,reason:An(m)}),g.promise}},a)}#n(t){const i=t.streamId,a=this.sourceName,r=t.sourceName,c=this.comObj,u=this,h=this.actionHandler[t.action],p={enqueue(m,g=1,y){if(this.isCancelled)return;const b=this.desiredSize;this.desiredSize-=g,b>0&&this.desiredSize<=0&&(this.sinkCapability=Promise.withResolvers(),this.ready=this.sinkCapability.promise),c.postMessage({sourceName:a,targetName:r,stream:ke.ENQUEUE,streamId:i,chunk:m},y)},close(){this.isCancelled||(this.isCancelled=!0,c.postMessage({sourceName:a,targetName:r,stream:ke.CLOSE,streamId:i}),delete u.streamSinks[i])},error(m){Me(m instanceof Error,"error must have a valid reason"),!this.isCancelled&&(this.isCancelled=!0,c.postMessage({sourceName:a,targetName:r,stream:ke.ERROR,streamId:i,reason:An(m)}))},sinkCapability:Promise.withResolvers(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:t.desiredSize,ready:null};p.sinkCapability.resolve(),p.ready=p.sinkCapability.promise,this.streamSinks[i]=p,Promise.try(h,t.data,p).then(function(){c.postMessage({sourceName:a,targetName:r,stream:ke.START_COMPLETE,streamId:i,success:!0})},function(m){c.postMessage({sourceName:a,targetName:r,stream:ke.START_COMPLETE,streamId:i,reason:An(m)})})}#i(t){const i=t.streamId,a=this.sourceName,r=t.sourceName,c=this.comObj,u=this.streamControllers[i],h=this.streamSinks[i];switch(t.stream){case ke.START_COMPLETE:t.success?u.startCall.resolve():u.startCall.reject(An(t.reason));break;case ke.PULL_COMPLETE:t.success?u.pullCall.resolve():u.pullCall.reject(An(t.reason));break;case ke.PULL:if(!h){c.postMessage({sourceName:a,targetName:r,stream:ke.PULL_COMPLETE,streamId:i,success:!0});break}h.desiredSize<=0&&t.desiredSize>0&&h.sinkCapability.resolve(),h.desiredSize=t.desiredSize,Promise.try(h.onPull||e0).then(function(){c.postMessage({sourceName:a,targetName:r,stream:ke.PULL_COMPLETE,streamId:i,success:!0})},function(m){c.postMessage({sourceName:a,targetName:r,stream:ke.PULL_COMPLETE,streamId:i,reason:An(m)})});break;case ke.ENQUEUE:if(Me(u,"enqueue should have stream controller"),u.isClosed)break;u.controller.enqueue(t.chunk);break;case ke.CLOSE:if(Me(u,"close should have stream controller"),u.isClosed)break;u.isClosed=!0,u.controller.close(),this.#a(u,i);break;case ke.ERROR:Me(u,"error should have stream controller"),u.controller.error(An(t.reason)),this.#a(u,i);break;case ke.CANCEL_COMPLETE:t.success?u.cancelCall.resolve():u.cancelCall.reject(An(t.reason)),this.#a(u,i);break;case ke.CANCEL:if(!h)break;const p=An(t.reason);Promise.try(h.onCancel||e0,p).then(function(){c.postMessage({sourceName:a,targetName:r,stream:ke.CANCEL_COMPLETE,streamId:i,success:!0})},function(m){c.postMessage({sourceName:a,targetName:r,stream:ke.CANCEL_COMPLETE,streamId:i,reason:An(m)})}),h.sinkCapability.reject(p),h.isCancelled=!0,delete this.streamSinks[i];break;default:throw new Error("Unexpected stream case")}}async#a(t,i){await Promise.allSettled([t.startCall?.promise,t.pullCall?.promise,t.cancelCall?.promise]),delete this.streamControllers[i]}destroy(){this.#t?.abort(),this.#t=null}}class n0{#t=!1;constructor({enableHWA:t=!1}){this.#t=t}create(t,i){if(t<=0||i<=0)throw new Error("Invalid canvas size");const a=this._createCanvas(t,i);return{canvas:a,context:a.getContext("2d",{willReadFrequently:!this.#t})}}reset(t,i,a){if(!t.canvas)throw new Error("Canvas is not specified");if(i<=0||a<=0)throw new Error("Invalid canvas size");t.canvas.width=i,t.canvas.height=a}destroy(t){if(!t.canvas)throw new Error("Canvas is not specified");t.canvas.width=0,t.canvas.height=0,t.canvas=null,t.context=null}_createCanvas(t,i){ie("Abstract method `_createCanvas` called.")}}class PM extends n0{constructor({ownerDocument:t=globalThis.document,enableHWA:i=!1}){super({enableHWA:i}),this._document=t}_createCanvas(t,i){const a=this._document.createElement("canvas");return a.width=t,a.height=i,a}}class i0{constructor({baseUrl:t=null,isCompressed:i=!0}){this.baseUrl=t,this.isCompressed=i}async fetch({name:t}){if(!this.baseUrl)throw new Error("Ensure that the `cMapUrl` and `cMapPacked` API parameters are provided.");if(!t)throw new Error("CMap name must be specified.");const i=this.baseUrl+t+(this.isCompressed?".bcmap":"");return this._fetch(i).then(a=>({cMapData:a,isCompressed:this.isCompressed})).catch(a=>{throw new Error(`Unable to load ${this.isCompressed?"binary ":""}CMap at: ${i}`)})}async _fetch(t){ie("Abstract method `_fetch` called.")}}class s0 extends i0{async _fetch(t){const i=await Qo(t,this.isCompressed?"arraybuffer":"text");return i instanceof ArrayBuffer?new Uint8Array(i):Wo(i)}}class a0{addFilter(t){return"none"}addHCMFilter(t,i){return"none"}addAlphaFilter(t){return"none"}addLuminosityFilter(t){return"none"}addHighlightHCMFilter(t,i,a,r,c){return"none"}destroy(t=!1){}}class UM extends a0{#t;#e;#n;#i;#a;#s;#r=0;constructor({docId:t,ownerDocument:i=globalThis.document}){super(),this.#i=t,this.#a=i}get#o(){return this.#e||=new Map}get#u(){return this.#s||=new Map}get#c(){if(!this.#n){const t=this.#a.createElement("div"),{style:i}=t;i.visibility="hidden",i.contain="strict",i.width=i.height=0,i.position="absolute",i.top=i.left=0,i.zIndex=-1;const a=this.#a.createElementNS(ts,"svg");a.setAttribute("width",0),a.setAttribute("height",0),this.#n=this.#a.createElementNS(ts,"defs"),t.append(a),a.append(this.#n),this.#a.body.append(t)}return this.#n}#h(t){if(t.length===1){const p=t[0],m=new Array(256);for(let y=0;y<256;y++)m[y]=p[y]/255;const g=m.join(",");return[g,g,g]}const[i,a,r]=t,c=new Array(256),u=new Array(256),h=new Array(256);for(let p=0;p<256;p++)c[p]=i[p]/255,u[p]=a[p]/255,h[p]=r[p]/255;return[c.join(","),u.join(","),h.join(",")]}#l(t){if(this.#t===void 0){this.#t="";const i=this.#a.URL;i!==this.#a.baseURI&&(Su(i)?xt('#createUrl: ignore "data:"-URL for performance reasons.'):this.#t=Gv(i,""))}return`url(${this.#t}#${t})`}addFilter(t){if(!t)return"none";let i=this.#o.get(t);if(i)return i;const[a,r,c]=this.#h(t),u=t.length===1?a:`${a}${r}${c}`;if(i=this.#o.get(u),i)return this.#o.set(t,i),i;const h=`g_${this.#i}_transfer_map_${this.#r++}`,p=this.#l(h);this.#o.set(t,p),this.#o.set(u,p);const m=this.#f(h);return this.#m(a,r,c,m),p}addHCMFilter(t,i){const a=`${t}-${i}`,r="base";let c=this.#u.get(r);if(c?.key===a||(c?(c.filter?.remove(),c.key=a,c.url="none",c.filter=null):(c={key:a,url:"none",filter:null},this.#u.set(r,c)),!t||!i))return c.url;const u=this.#y(t);t=mt.makeHexColor(...u);const h=this.#y(i);if(i=mt.makeHexColor(...h),this.#c.style.color="",t==="#000000"&&i==="#ffffff"||t===i)return c.url;const p=new Array(256);for(let S=0;S<=255;S++){const A=S/255;p[S]=A<=.03928?A/12.92:((A+.055)/1.055)**2.4}const m=p.join(","),g=`g_${this.#i}_hcm_filter`,y=c.filter=this.#f(g);this.#m(m,m,m,y),this.#g(y);const b=(S,A)=>{const _=u[S]/255,R=h[S]/255,x=new Array(A+1);for(let L=0;L<=A;L++)x[L]=_+L/A*(R-_);return x.join(",")};return this.#m(b(0,5),b(1,5),b(2,5),y),c.url=this.#l(g),c.url}addAlphaFilter(t){let i=this.#o.get(t);if(i)return i;const[a]=this.#h([t]),r=`alpha_${a}`;if(i=this.#o.get(r),i)return this.#o.set(t,i),i;const c=`g_${this.#i}_alpha_map_${this.#r++}`,u=this.#l(c);this.#o.set(t,u),this.#o.set(r,u);const h=this.#f(c);return this.#v(a,h),u}addLuminosityFilter(t){let i=this.#o.get(t||"luminosity");if(i)return i;let a,r;if(t?([a]=this.#h([t]),r=`luminosity_${a}`):r="luminosity",i=this.#o.get(r),i)return this.#o.set(t,i),i;const c=`g_${this.#i}_luminosity_map_${this.#r++}`,u=this.#l(c);this.#o.set(t,u),this.#o.set(r,u);const h=this.#f(c);return this.#p(h),t&&this.#v(a,h),u}addHighlightHCMFilter(t,i,a,r,c){const u=`${i}-${a}-${r}-${c}`;let h=this.#u.get(t);if(h?.key===u||(h?(h.filter?.remove(),h.key=u,h.url="none",h.filter=null):(h={key:u,url:"none",filter:null},this.#u.set(t,h)),!i||!a))return h.url;const[p,m]=[i,a].map(this.#y.bind(this));let g=Math.round(.2126*p[0]+.7152*p[1]+.0722*p[2]),y=Math.round(.2126*m[0]+.7152*m[1]+.0722*m[2]),[b,S]=[r,c].map(this.#y.bind(this));y<g&&([g,y,b,S]=[y,g,S,b]),this.#c.style.color="";const A=(x,L,k)=>{const U=new Array(256),I=(y-g)/k,j=x/255,F=(L-x)/(255*k);let J=0;for(let Y=0;Y<=k;Y++){const at=Math.round(g+Y*I),K=j+Y*F;for(let lt=J;lt<=at;lt++)U[lt]=K;J=at+1}for(let Y=J;Y<256;Y++)U[Y]=U[J-1];return U.join(",")},_=`g_${this.#i}_hcm_${t}_filter`,R=h.filter=this.#f(_);return this.#g(R),this.#m(A(b[0],S[0],5),A(b[1],S[1],5),A(b[2],S[2],5),R),h.url=this.#l(_),h.url}destroy(t=!1){t&&this.#s?.size||(this.#n?.parentNode.parentNode.remove(),this.#n=null,this.#e?.clear(),this.#e=null,this.#s?.clear(),this.#s=null,this.#r=0)}#p(t){const i=this.#a.createElementNS(ts,"feColorMatrix");i.setAttribute("type","matrix"),i.setAttribute("values","0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0.59 0.11 0 0"),t.append(i)}#g(t){const i=this.#a.createElementNS(ts,"feColorMatrix");i.setAttribute("type","matrix"),i.setAttribute("values","0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0"),t.append(i)}#f(t){const i=this.#a.createElementNS(ts,"filter");return i.setAttribute("color-interpolation-filters","sRGB"),i.setAttribute("id",t),this.#c.append(i),i}#d(t,i,a){const r=this.#a.createElementNS(ts,i);r.setAttribute("type","discrete"),r.setAttribute("tableValues",a),t.append(r)}#m(t,i,a,r){const c=this.#a.createElementNS(ts,"feComponentTransfer");r.append(c),this.#d(c,"feFuncR",t),this.#d(c,"feFuncG",i),this.#d(c,"feFuncB",a)}#v(t,i){const a=this.#a.createElementNS(ts,"feComponentTransfer");i.append(a),this.#d(a,"feFuncA",t)}#y(t){return this.#c.style.color=t,Eu(getComputedStyle(this.#c).getPropertyValue("color"))}}class r0{constructor({baseUrl:t=null}){this.baseUrl=t}async fetch({filename:t}){if(!this.baseUrl)throw new Error("Ensure that the `standardFontDataUrl` API parameter is provided.");if(!t)throw new Error("Font filename must be specified.");const i=`${this.baseUrl}${t}`;return this._fetch(i).catch(a=>{throw new Error(`Unable to load font data at: ${i}`)})}async _fetch(t){ie("Abstract method `_fetch` called.")}}class o0 extends r0{async _fetch(t){const i=await Qo(t,"arraybuffer");return new Uint8Array(i)}}class l0{constructor({baseUrl:t=null}){this.baseUrl=t}async fetch({filename:t}){if(!this.baseUrl)throw new Error("Ensure that the `wasmUrl` API parameter is provided.");if(!t)throw new Error("Wasm filename must be specified.");const i=`${this.baseUrl}${t}`;return this._fetch(i).catch(a=>{throw new Error(`Unable to load wasm data at: ${i}`)})}async _fetch(t){ie("Abstract method `_fetch` called.")}}class c0 extends l0{async _fetch(t){const i=await Qo(t,"arraybuffer");return new Uint8Array(i)}}un&&xt("Please use the `legacy` build in Node.js environments.");async function qf(l){const i=await process.getBuiltinModule("fs").promises.readFile(l);return new Uint8Array(i)}class zM extends a0{}class HM extends n0{_createCanvas(t,i){return process.getBuiltinModule("module").createRequire(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Qt&&Qt.tagName.toUpperCase()==="SCRIPT"&&Qt.src||new URL("corisco.umd.js",document.baseURI).href)("@napi-rs/canvas").createCanvas(t,i)}}class BM extends i0{async _fetch(t){return qf(t)}}class FM extends r0{async _fetch(t){return qf(t)}}class jM extends l0{async _fetch(t){return qf(t)}}const qe={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};function Xf(l,t){if(!t)return;const i=t[2]-t[0],a=t[3]-t[1],r=new Path2D;r.rect(t[0],t[1],i,a),l.clip(r)}class Yf{isModifyingCurrentTransform(){return!1}getPattern(){ie("Abstract method `getPattern` called.")}}class $M extends Yf{constructor(t){super(),this._type=t[1],this._bbox=t[2],this._colorStops=t[3],this._p0=t[4],this._p1=t[5],this._r0=t[6],this._r1=t[7],this.matrix=null}_createGradient(t){let i;this._type==="axial"?i=t.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):this._type==="radial"&&(i=t.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));for(const a of this._colorStops)i.addColorStop(a[0],a[1]);return i}getPattern(t,i,a,r){let c;if(r===qe.STROKE||r===qe.FILL){const u=i.current.getClippedPathBoundingBox(r,be(t))||[0,0,0,0],h=Math.ceil(u[2]-u[0])||1,p=Math.ceil(u[3]-u[1])||1,m=i.cachedCanvases.getCanvas("pattern",h,p),g=m.context;g.clearRect(0,0,g.canvas.width,g.canvas.height),g.beginPath(),g.rect(0,0,g.canvas.width,g.canvas.height),g.translate(-u[0],-u[1]),a=mt.transform(a,[1,0,0,1,u[0],u[1]]),g.transform(...i.baseTransform),this.matrix&&g.transform(...this.matrix),Xf(g,this._bbox),g.fillStyle=this._createGradient(g),g.fill(),c=t.createPattern(m.canvas,"no-repeat");const y=new DOMMatrix(a);c.setTransform(y)}else Xf(t,this._bbox),c=this._createGradient(t);return c}}function Wf(l,t,i,a,r,c,u,h){const p=t.coords,m=t.colors,g=l.data,y=l.width*4;let b;p[i+1]>p[a+1]&&(b=i,i=a,a=b,b=c,c=u,u=b),p[a+1]>p[r+1]&&(b=a,a=r,r=b,b=u,u=h,h=b),p[i+1]>p[a+1]&&(b=i,i=a,a=b,b=c,c=u,u=b);const S=(p[i]+t.offsetX)*t.scaleX,A=(p[i+1]+t.offsetY)*t.scaleY,_=(p[a]+t.offsetX)*t.scaleX,R=(p[a+1]+t.offsetY)*t.scaleY,x=(p[r]+t.offsetX)*t.scaleX,L=(p[r+1]+t.offsetY)*t.scaleY;if(A>=L)return;const k=m[c],U=m[c+1],I=m[c+2],j=m[u],F=m[u+1],J=m[u+2],Y=m[h],at=m[h+1],K=m[h+2],lt=Math.round(A),Et=Math.round(L);let bt,Gt,B,Q,dt,Ct,W,ht;for(let st=lt;st<=Et;st++){if(st<R){const Wt=st<A?0:(A-st)/(A-R);bt=S-(S-_)*Wt,Gt=k-(k-j)*Wt,B=U-(U-F)*Wt,Q=I-(I-J)*Wt}else{let Wt;st>L?Wt=1:R===L?Wt=0:Wt=(R-st)/(R-L),bt=_-(_-x)*Wt,Gt=j-(j-Y)*Wt,B=F-(F-at)*Wt,Q=J-(J-K)*Wt}let vt;st<A?vt=0:st>L?vt=1:vt=(A-st)/(A-L),dt=S-(S-x)*vt,Ct=k-(k-Y)*vt,W=U-(U-at)*vt,ht=I-(I-K)*vt;const Zt=Math.round(Math.min(bt,dt)),le=Math.round(Math.max(bt,dt));let tt=y*st+Zt*4;for(let Wt=Zt;Wt<=le;Wt++)vt=(bt-Wt)/(bt-dt),vt<0?vt=0:vt>1&&(vt=1),g[tt++]=Gt-(Gt-Ct)*vt|0,g[tt++]=B-(B-W)*vt|0,g[tt++]=Q-(Q-ht)*vt|0,g[tt++]=255}}function GM(l,t,i){const a=t.coords,r=t.colors;let c,u;switch(t.type){case"lattice":const h=t.verticesPerRow,p=Math.floor(a.length/h)-1,m=h-1;for(c=0;c<p;c++){let g=c*h;for(let y=0;y<m;y++,g++)Wf(l,i,a[g],a[g+1],a[g+h],r[g],r[g+1],r[g+h]),Wf(l,i,a[g+h+1],a[g+1],a[g+h],r[g+h+1],r[g+1],r[g+h])}break;case"triangles":for(c=0,u=a.length;c<u;c+=3)Wf(l,i,a[c],a[c+1],a[c+2],r[c],r[c+1],r[c+2]);break;default:throw new Error("illegal figure")}}class VM extends Yf{constructor(t){super(),this._coords=t[2],this._colors=t[3],this._figures=t[4],this._bounds=t[5],this._bbox=t[6],this._background=t[7],this.matrix=null}_createMeshCanvas(t,i,a){const h=Math.floor(this._bounds[0]),p=Math.floor(this._bounds[1]),m=Math.ceil(this._bounds[2])-h,g=Math.ceil(this._bounds[3])-p,y=Math.min(Math.ceil(Math.abs(m*t[0]*1.1)),3e3),b=Math.min(Math.ceil(Math.abs(g*t[1]*1.1)),3e3),S=m/y,A=g/b,_={coords:this._coords,colors:this._colors,offsetX:-h,offsetY:-p,scaleX:1/S,scaleY:1/A},R=y+4,x=b+4,L=a.getCanvas("mesh",R,x),k=L.context,U=k.createImageData(y,b);if(i){const j=U.data;for(let F=0,J=j.length;F<J;F+=4)j[F]=i[0],j[F+1]=i[1],j[F+2]=i[2],j[F+3]=255}for(const j of this._figures)GM(U,j,_);return k.putImageData(U,2,2),{canvas:L.canvas,offsetX:h-2*S,offsetY:p-2*A,scaleX:S,scaleY:A}}isModifyingCurrentTransform(){return!0}getPattern(t,i,a,r){Xf(t,this._bbox);const c=new Float32Array(2);if(r===qe.SHADING)mt.singularValueDecompose2dScale(be(t),c);else if(this.matrix){mt.singularValueDecompose2dScale(this.matrix,c);const[h,p]=c;mt.singularValueDecompose2dScale(i.baseTransform,c),c[0]*=h,c[1]*=p}else mt.singularValueDecompose2dScale(i.baseTransform,c);const u=this._createMeshCanvas(c,r===qe.SHADING?null:this._background,i.cachedCanvases);return r!==qe.SHADING&&(t.setTransform(...i.baseTransform),this.matrix&&t.transform(...this.matrix)),t.translate(u.offsetX,u.offsetY),t.scale(u.scaleX,u.scaleY),t.createPattern(u.canvas,"no-repeat")}}class qM extends Yf{getPattern(){return"hotpink"}}function XM(l){switch(l[0]){case"RadialAxial":return new $M(l);case"Mesh":return new VM(l);case"Dummy":return new qM}throw new Error(`Unknown IR type: ${l[0]}`)}const u0={COLORED:1,UNCOLORED:2};class Qf{static MAX_PATTERN_SIZE=3e3;constructor(t,i,a,r){this.color=t[1],this.operatorList=t[2],this.matrix=t[3],this.bbox=t[4],this.xstep=t[5],this.ystep=t[6],this.paintType=t[7],this.tilingType=t[8],this.ctx=i,this.canvasGraphicsFactory=a,this.baseTransform=r}createPatternCanvas(t){const{bbox:i,operatorList:a,paintType:r,tilingType:c,color:u,canvasGraphicsFactory:h}=this;let{xstep:p,ystep:m}=this;p=Math.abs(p),m=Math.abs(m),bu("TilingType: "+c);const g=i[0],y=i[1],b=i[2],S=i[3],A=b-g,_=S-y,R=new Float32Array(2);mt.singularValueDecompose2dScale(this.matrix,R);const[x,L]=R;mt.singularValueDecompose2dScale(this.baseTransform,R);const k=x*R[0],U=L*R[1];let I=A,j=_,F=!1,J=!1;const Y=Math.ceil(p*k),at=Math.ceil(m*U),K=Math.ceil(A*k),lt=Math.ceil(_*U);Y>=K?I=p:F=!0,at>=lt?j=m:J=!0;const Et=this.getSizeAndScale(I,this.ctx.canvas.width,k),bt=this.getSizeAndScale(j,this.ctx.canvas.height,U),Gt=t.cachedCanvases.getCanvas("pattern",Et.size,bt.size),B=Gt.context,Q=h.createCanvasGraphics(B);if(Q.groupLevel=t.groupLevel,this.setFillAndStrokeStyleToContext(Q,r,u),B.translate(-Et.scale*g,-bt.scale*y),Q.transform(Et.scale,0,0,bt.scale,0,0),B.save(),this.clipBbox(Q,g,y,b,S),Q.baseTransform=be(Q.ctx),Q.executeOperatorList(a),Q.endDrawing(),B.restore(),F||J){const dt=Gt.canvas;F&&(I=p),J&&(j=m);const Ct=this.getSizeAndScale(I,this.ctx.canvas.width,k),W=this.getSizeAndScale(j,this.ctx.canvas.height,U),ht=Ct.size,st=W.size,vt=t.cachedCanvases.getCanvas("pattern-workaround",ht,st),Zt=vt.context,le=F?Math.floor(A/p):0,tt=J?Math.floor(_/m):0;for(let Wt=0;Wt<=le;Wt++)for(let Vt=0;Vt<=tt;Vt++)Zt.drawImage(dt,ht*Wt,st*Vt,ht,st,0,0,ht,st);return{canvas:vt.canvas,scaleX:Ct.scale,scaleY:W.scale,offsetX:g,offsetY:y}}return{canvas:Gt.canvas,scaleX:Et.scale,scaleY:bt.scale,offsetX:g,offsetY:y}}getSizeAndScale(t,i,a){const r=Math.max(Qf.MAX_PATTERN_SIZE,i);let c=Math.ceil(t*a);return c>=r?c=r:a=c/t,{scale:a,size:c}}clipBbox(t,i,a,r,c){const u=r-i,h=c-a;t.ctx.rect(i,a,u,h),mt.axialAlignedBoundingBox([i,a,r,c],be(t.ctx),t.current.minMax),t.clip(),t.endPath()}setFillAndStrokeStyleToContext(t,i,a){const r=t.ctx,c=t.current;switch(i){case u0.COLORED:const{fillStyle:u,strokeStyle:h}=this.ctx;r.fillStyle=c.fillColor=u,r.strokeStyle=c.strokeColor=h;break;case u0.UNCOLORED:r.fillStyle=r.strokeStyle=a,c.fillColor=c.strokeColor=a;break;default:throw new hM(`Unsupported paint type: ${i}`)}}isModifyingCurrentTransform(){return!1}getPattern(t,i,a,r){let c=a;r!==qe.SHADING&&(c=mt.transform(c,i.baseTransform),this.matrix&&(c=mt.transform(c,this.matrix)));const u=this.createPatternCanvas(i);let h=new DOMMatrix(c);h=h.translate(u.offsetX,u.offsetY),h=h.scale(1/u.scaleX,1/u.scaleY);const p=t.createPattern(u.canvas,"repeat");return p.setTransform(h),p}}function YM({src:l,srcPos:t=0,dest:i,width:a,height:r,nonBlackColor:c=4294967295,inverseDecode:u=!1}){const h=Ve.isLittleEndian?4278190080:255,[p,m]=u?[c,h]:[h,c],g=a>>3,y=a&7,b=l.length;i=new Uint32Array(i.buffer);let S=0;for(let A=0;A<r;A++){for(const R=t+g;t<R;t++){const x=t<b?l[t]:255;i[S++]=x&128?m:p,i[S++]=x&64?m:p,i[S++]=x&32?m:p,i[S++]=x&16?m:p,i[S++]=x&8?m:p,i[S++]=x&4?m:p,i[S++]=x&2?m:p,i[S++]=x&1?m:p}if(y===0)continue;const _=t<b?l[t++]:255;for(let R=0;R<y;R++)i[S++]=_&1<<7-R?m:p}return{srcPos:t,destPos:S}}const d0=16,h0=100,WM=15,f0=10,_n=16,Kf=new DOMMatrix,In=new Float32Array(2),wr=new Float32Array([1/0,1/0,-1/0,-1/0]);function QM(l,t){if(l._removeMirroring)throw new Error("Context is already forwarding operations.");l.__originalSave=l.save,l.__originalRestore=l.restore,l.__originalRotate=l.rotate,l.__originalScale=l.scale,l.__originalTranslate=l.translate,l.__originalTransform=l.transform,l.__originalSetTransform=l.setTransform,l.__originalResetTransform=l.resetTransform,l.__originalClip=l.clip,l.__originalMoveTo=l.moveTo,l.__originalLineTo=l.lineTo,l.__originalBezierCurveTo=l.bezierCurveTo,l.__originalRect=l.rect,l.__originalClosePath=l.closePath,l.__originalBeginPath=l.beginPath,l._removeMirroring=()=>{l.save=l.__originalSave,l.restore=l.__originalRestore,l.rotate=l.__originalRotate,l.scale=l.__originalScale,l.translate=l.__originalTranslate,l.transform=l.__originalTransform,l.setTransform=l.__originalSetTransform,l.resetTransform=l.__originalResetTransform,l.clip=l.__originalClip,l.moveTo=l.__originalMoveTo,l.lineTo=l.__originalLineTo,l.bezierCurveTo=l.__originalBezierCurveTo,l.rect=l.__originalRect,l.closePath=l.__originalClosePath,l.beginPath=l.__originalBeginPath,delete l._removeMirroring},l.save=function(){t.save(),this.__originalSave()},l.restore=function(){t.restore(),this.__originalRestore()},l.translate=function(i,a){t.translate(i,a),this.__originalTranslate(i,a)},l.scale=function(i,a){t.scale(i,a),this.__originalScale(i,a)},l.transform=function(i,a,r,c,u,h){t.transform(i,a,r,c,u,h),this.__originalTransform(i,a,r,c,u,h)},l.setTransform=function(i,a,r,c,u,h){t.setTransform(i,a,r,c,u,h),this.__originalSetTransform(i,a,r,c,u,h)},l.resetTransform=function(){t.resetTransform(),this.__originalResetTransform()},l.rotate=function(i){t.rotate(i),this.__originalRotate(i)},l.clip=function(i){t.clip(i),this.__originalClip(i)},l.moveTo=function(i,a){t.moveTo(i,a),this.__originalMoveTo(i,a)},l.lineTo=function(i,a){t.lineTo(i,a),this.__originalLineTo(i,a)},l.bezierCurveTo=function(i,a,r,c,u,h){t.bezierCurveTo(i,a,r,c,u,h),this.__originalBezierCurveTo(i,a,r,c,u,h)},l.rect=function(i,a,r,c){t.rect(i,a,r,c),this.__originalRect(i,a,r,c)},l.closePath=function(){t.closePath(),this.__originalClosePath()},l.beginPath=function(){t.beginPath(),this.__originalBeginPath()}}class KM{constructor(t){this.canvasFactory=t,this.cache=Object.create(null)}getCanvas(t,i,a){let r;return this.cache[t]!==void 0?(r=this.cache[t],this.canvasFactory.reset(r,i,a)):(r=this.canvasFactory.create(i,a),this.cache[t]=r),r}delete(t){delete this.cache[t]}clear(){for(const t in this.cache){const i=this.cache[t];this.canvasFactory.destroy(i),delete this.cache[t]}}}function xu(l,t,i,a,r,c,u,h,p,m){const[g,y,b,S,A,_]=be(l);if(y===0&&b===0){const L=u*g+A,k=Math.round(L),U=h*S+_,I=Math.round(U),j=(u+p)*g+A,F=Math.abs(Math.round(j)-k)||1,J=(h+m)*S+_,Y=Math.abs(Math.round(J)-I)||1;return l.setTransform(Math.sign(g),0,0,Math.sign(S),k,I),l.drawImage(t,i,a,r,c,0,0,F,Y),l.setTransform(g,y,b,S,A,_),[F,Y]}if(g===0&&S===0){const L=h*b+A,k=Math.round(L),U=u*y+_,I=Math.round(U),j=(h+m)*b+A,F=Math.abs(Math.round(j)-k)||1,J=(u+p)*y+_,Y=Math.abs(Math.round(J)-I)||1;return l.setTransform(0,Math.sign(y),Math.sign(b),0,k,I),l.drawImage(t,i,a,r,c,0,0,Y,F),l.setTransform(g,y,b,S,A,_),[Y,F]}l.drawImage(t,i,a,r,c,u,h,p,m);const R=Math.hypot(g,y),x=Math.hypot(b,S);return[R*p,x*m]}class p0{alphaIsShape=!1;fontSize=0;fontSizeScale=1;textMatrix=null;textMatrixScale=1;fontMatrix=Mf;leading=0;x=0;y=0;lineX=0;lineY=0;charSpacing=0;wordSpacing=0;textHScale=1;textRenderingMode=sn.FILL;textRise=0;fillColor="#000000";strokeColor="#000000";patternFill=!1;patternStroke=!1;fillAlpha=1;strokeAlpha=1;lineWidth=1;activeSMask=null;transferMaps="none";constructor(t,i){this.clipBox=new Float32Array([0,0,t,i]),this.minMax=wr.slice()}clone(){const t=Object.create(this);return t.clipBox=this.clipBox.slice(),t.minMax=this.minMax.slice(),t}getPathBoundingBox(t=qe.FILL,i=null){const a=this.minMax.slice();if(t===qe.STROKE){i||ie("Stroke bounding box must include transform."),mt.singularValueDecompose2dScale(i,In);const r=In[0]*this.lineWidth/2,c=In[1]*this.lineWidth/2;a[0]-=r,a[1]-=c,a[2]+=r,a[3]+=c}return a}updateClipFromPath(){const t=mt.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(t||[0,0,0,0])}isEmptyClip(){return this.minMax[0]===1/0}startNewPathAndClipBox(t){this.clipBox.set(t,0),this.minMax.set(wr,0)}getClippedPathBoundingBox(t=qe.FILL,i=null){return mt.intersect(this.clipBox,this.getPathBoundingBox(t,i))}}function m0(l,t){if(t instanceof ImageData){l.putImageData(t,0,0);return}const i=t.height,a=t.width,r=i%_n,c=(i-r)/_n,u=r===0?c:c+1,h=l.createImageData(a,_n);let p=0,m;const g=t.data,y=h.data;let b,S,A,_;if(t.kind===fu.GRAYSCALE_1BPP){const R=g.byteLength,x=new Uint32Array(y.buffer,0,y.byteLength>>2),L=x.length,k=a+7>>3,U=4294967295,I=Ve.isLittleEndian?4278190080:255;for(b=0;b<u;b++){for(A=b<c?_n:r,m=0,S=0;S<A;S++){const j=R-p;let F=0;const J=j>k?a:j*8-7,Y=J&-8;let at=0,K=0;for(;F<Y;F+=8)K=g[p++],x[m++]=K&128?U:I,x[m++]=K&64?U:I,x[m++]=K&32?U:I,x[m++]=K&16?U:I,x[m++]=K&8?U:I,x[m++]=K&4?U:I,x[m++]=K&2?U:I,x[m++]=K&1?U:I;for(;F<J;F++)at===0&&(K=g[p++],at=128),x[m++]=K&at?U:I,at>>=1}for(;m<L;)x[m++]=0;l.putImageData(h,0,b*_n)}}else if(t.kind===fu.RGBA_32BPP){for(S=0,_=a*_n*4,b=0;b<c;b++)y.set(g.subarray(p,p+_)),p+=_,l.putImageData(h,0,S),S+=_n;b<u&&(_=a*r*4,y.set(g.subarray(p,p+_)),l.putImageData(h,0,S))}else if(t.kind===fu.RGB_24BPP)for(A=_n,_=a*A,b=0;b<u;b++){for(b>=c&&(A=r,_=a*A),m=0,S=_;S--;)y[m++]=g[p++],y[m++]=g[p++],y[m++]=g[p++],y[m++]=255;l.putImageData(h,0,b*_n)}else throw new Error(`bad image kind: ${t.kind}`)}function g0(l,t){if(t.bitmap){l.drawImage(t.bitmap,0,0);return}const i=t.height,a=t.width,r=i%_n,c=(i-r)/_n,u=r===0?c:c+1,h=l.createImageData(a,_n);let p=0;const m=t.data,g=h.data;for(let y=0;y<u;y++){const b=y<c?_n:r;({srcPos:p}=YM({src:m,srcPos:p,dest:g,width:a,height:b,nonBlackColor:0})),l.putImageData(h,0,y*_n)}}function nl(l,t){const i=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font","filter"];for(const a of i)l[a]!==void 0&&(t[a]=l[a]);l.setLineDash!==void 0&&(t.setLineDash(l.getLineDash()),t.lineDashOffset=l.lineDashOffset)}function Cu(l){l.strokeStyle=l.fillStyle="#000000",l.fillRule="nonzero",l.globalAlpha=1,l.lineWidth=1,l.lineCap="butt",l.lineJoin="miter",l.miterLimit=10,l.globalCompositeOperation="source-over",l.font="10px sans-serif",l.setLineDash!==void 0&&(l.setLineDash([]),l.lineDashOffset=0);const{filter:t}=l;t!=="none"&&t!==""&&(l.filter="none")}function y0(l,t){if(t)return!0;mt.singularValueDecompose2dScale(l,In);const i=Math.fround(Ri.pixelRatio*Tr.PDF_TO_CSS_UNITS);return In[0]<=i&&In[1]<=i}const ZM=["butt","round","square"],JM=["miter","round","bevel"],tO={},b0={};class xr{constructor(t,i,a,r,c,{optionalContentConfig:u,markedContentStack:h=null},p,m){this.ctx=t,this.current=new p0(this.ctx.canvas.width,this.ctx.canvas.height),this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=i,this.objs=a,this.canvasFactory=r,this.filterFactory=c,this.groupStack=[],this.baseTransform=null,this.baseTransformStack=[],this.groupLevel=0,this.smaskStack=[],this.smaskCounter=0,this.tempSMask=null,this.suspendedCtx=null,this.contentVisible=!0,this.markedContentStack=h||[],this.optionalContentConfig=u,this.cachedCanvases=new KM(this.canvasFactory),this.cachedPatterns=new Map,this.annotationCanvasMap=p,this.viewportScale=1,this.outputScaleX=1,this.outputScaleY=1,this.pageColors=m,this._cachedScaleForStroking=[-1,0],this._cachedGetSinglePixelWidth=null,this._cachedBitmapsMap=new Map}getObject(t,i=null){return typeof t=="string"?t.startsWith("g_")?this.commonObjs.get(t):this.objs.get(t):i}beginDrawing({transform:t,viewport:i,transparency:a=!1,background:r=null}){const c=this.ctx.canvas.width,u=this.ctx.canvas.height,h=this.ctx.fillStyle;if(this.ctx.fillStyle=r||"#ffffff",this.ctx.fillRect(0,0,c,u),this.ctx.fillStyle=h,a){const p=this.cachedCanvases.getCanvas("transparent",c,u);this.compositeCtx=this.ctx,this.transparentCanvas=p.canvas,this.ctx=p.context,this.ctx.save(),this.ctx.transform(...be(this.compositeCtx))}this.ctx.save(),Cu(this.ctx),t&&(this.ctx.transform(...t),this.outputScaleX=t[0],this.outputScaleY=t[0]),this.ctx.transform(...i.transform),this.viewportScale=i.scale,this.baseTransform=be(this.ctx)}executeOperatorList(t,i,a,r){const c=t.argsArray,u=t.fnArray;let h=i||0;const p=c.length;if(p===h)return h;const m=p-h>f0&&typeof a=="function",g=m?Date.now()+WM:0;let y=0;const b=this.commonObjs,S=this.objs;let A;for(;;){if(r!==void 0&&h===r.nextBreakPoint)return r.breakIt(h,a),h;if(A=u[h],A!==mu.dependency)this[A].apply(this,c[h]);else for(const _ of c[h]){const R=_.startsWith("g_")?b:S;if(!R.has(_))return R.get(_,a),h}if(h++,h===p)return h;if(m&&++y>f0){if(Date.now()>g)return a(),h;y=0}}}#t(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();this.current.activeSMask=null,this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.transparentCanvas=null)}endDrawing(){this.#t(),this.cachedCanvases.clear(),this.cachedPatterns.clear();for(const t of this._cachedBitmapsMap.values()){for(const i of t.values())typeof HTMLCanvasElement<"u"&&i instanceof HTMLCanvasElement&&(i.width=i.height=0);t.clear()}this._cachedBitmapsMap.clear(),this.#e()}#e(){if(this.pageColors){const t=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if(t!=="none"){const i=this.ctx.filter;this.ctx.filter=t,this.ctx.drawImage(this.ctx.canvas,0,0),this.ctx.filter=i}}}_scaleImage(t,i){const a=t.width??t.displayWidth,r=t.height??t.displayHeight;let c=Math.max(Math.hypot(i[0],i[1]),1),u=Math.max(Math.hypot(i[2],i[3]),1),h=a,p=r,m="prescale1",g,y;for(;c>2&&h>1||u>2&&p>1;){let b=h,S=p;c>2&&h>1&&(b=h>=16384?Math.floor(h/2)-1||1:Math.ceil(h/2),c/=h/b),u>2&&p>1&&(S=p>=16384?Math.floor(p/2)-1||1:Math.ceil(p)/2,u/=p/S),g=this.cachedCanvases.getCanvas(m,b,S),y=g.context,y.clearRect(0,0,b,S),y.drawImage(t,0,0,h,p,0,0,b,S),t=g.canvas,h=b,p=S,m=m==="prescale1"?"prescale2":"prescale1"}return{img:t,paintWidth:h,paintHeight:p}}_createMaskCanvas(t){const i=this.ctx,{width:a,height:r}=t,c=this.current.fillColor,u=this.current.patternFill,h=be(i);let p,m,g,y;if((t.bitmap||t.data)&&t.count>1){const Y=t.bitmap||t.data.buffer;m=JSON.stringify(u?h:[h.slice(0,4),c]),p=this._cachedBitmapsMap.get(Y),p||(p=new Map,this._cachedBitmapsMap.set(Y,p));const at=p.get(m);if(at&&!u){const K=Math.round(Math.min(h[0],h[2])+h[4]),lt=Math.round(Math.min(h[1],h[3])+h[5]);return{canvas:at,offsetX:K,offsetY:lt}}g=at}g||(y=this.cachedCanvases.getCanvas("maskCanvas",a,r),g0(y.context,t));let b=mt.transform(h,[1/a,0,0,-1/r,0,0]);b=mt.transform(b,[1,0,0,1,0,-r]);const S=wr.slice();mt.axialAlignedBoundingBox([0,0,a,r],b,S);const[A,_,R,x]=S,L=Math.round(R-A)||1,k=Math.round(x-_)||1,U=this.cachedCanvases.getCanvas("fillCanvas",L,k),I=U.context,j=A,F=_;I.translate(-j,-F),I.transform(...b),g||(g=this._scaleImage(y.canvas,Ci(I)),g=g.img,p&&u&&p.set(m,g)),I.imageSmoothingEnabled=y0(be(I),t.interpolate),xu(I,g,0,0,g.width,g.height,0,0,a,r),I.globalCompositeOperation="source-in";const J=mt.transform(Ci(I),[1,0,0,1,-j,-F]);return I.fillStyle=u?c.getPattern(i,this,J,qe.FILL):c,I.fillRect(0,0,a,r),p&&!u&&(this.cachedCanvases.delete("fillCanvas"),p.set(m,U.canvas)),{canvas:U.canvas,offsetX:Math.round(j),offsetY:Math.round(F)}}setLineWidth(t){t!==this.current.lineWidth&&(this._cachedScaleForStroking[0]=-1),this.current.lineWidth=t,this.ctx.lineWidth=t}setLineCap(t){this.ctx.lineCap=ZM[t]}setLineJoin(t){this.ctx.lineJoin=JM[t]}setMiterLimit(t){this.ctx.miterLimit=t}setDash(t,i){const a=this.ctx;a.setLineDash!==void 0&&(a.setLineDash(t),a.lineDashOffset=i)}setRenderingIntent(t){}setFlatness(t){}setGState(t){for(const[i,a]of t)switch(i){case"LW":this.setLineWidth(a);break;case"LC":this.setLineCap(a);break;case"LJ":this.setLineJoin(a);break;case"ML":this.setMiterLimit(a);break;case"D":this.setDash(a[0],a[1]);break;case"RI":this.setRenderingIntent(a);break;case"FL":this.setFlatness(a);break;case"Font":this.setFont(a[0],a[1]);break;case"CA":this.current.strokeAlpha=a;break;case"ca":this.ctx.globalAlpha=this.current.fillAlpha=a;break;case"BM":this.ctx.globalCompositeOperation=a;break;case"SMask":this.current.activeSMask=a?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(a);break}}get inSMaskMode(){return!!this.suspendedCtx}checkSMaskState(){const t=this.inSMaskMode;this.current.activeSMask&&!t?this.beginSMaskMode():!this.current.activeSMask&&t&&this.endSMaskMode()}beginSMaskMode(){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");const t=this.ctx.canvas.width,i=this.ctx.canvas.height,a="smaskGroupAt"+this.groupLevel,r=this.cachedCanvases.getCanvas(a,t,i);this.suspendedCtx=this.ctx;const c=this.ctx=r.context;c.setTransform(this.suspendedCtx.getTransform()),nl(this.suspendedCtx,c),QM(c,this.suspendedCtx),this.setGState([["BM","source-over"]])}endSMaskMode(){if(!this.inSMaskMode)throw new Error("endSMaskMode called while not in smask mode");this.ctx._removeMirroring(),nl(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}compose(t){if(!this.current.activeSMask)return;t?(t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.ceil(t[2]),t[3]=Math.ceil(t[3])):t=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];const i=this.current.activeSMask,a=this.suspendedCtx;this.composeSMask(a,i,this.ctx,t),this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.restore()}composeSMask(t,i,a,r){const c=r[0],u=r[1],h=r[2]-c,p=r[3]-u;h===0||p===0||(this.genericComposeSMask(i.context,a,h,p,i.subtype,i.backdrop,i.transferMap,c,u,i.offsetX,i.offsetY),t.save(),t.globalAlpha=1,t.globalCompositeOperation="source-over",t.setTransform(1,0,0,1,0,0),t.drawImage(a.canvas,0,0),t.restore())}genericComposeSMask(t,i,a,r,c,u,h,p,m,g,y){let b=t.canvas,S=p-g,A=m-y;if(u)if(S<0||A<0||S+a>b.width||A+r>b.height){const R=this.cachedCanvases.getCanvas("maskExtension",a,r),x=R.context;x.drawImage(b,-S,-A),x.globalCompositeOperation="destination-atop",x.fillStyle=u,x.fillRect(0,0,a,r),x.globalCompositeOperation="source-over",b=R.canvas,S=A=0}else{t.save(),t.globalAlpha=1,t.setTransform(1,0,0,1,0,0);const R=new Path2D;R.rect(S,A,a,r),t.clip(R),t.globalCompositeOperation="destination-atop",t.fillStyle=u,t.fillRect(S,A,a,r),t.restore()}i.save(),i.globalAlpha=1,i.setTransform(1,0,0,1,0,0),c==="Alpha"&&h?i.filter=this.filterFactory.addAlphaFilter(h):c==="Luminosity"&&(i.filter=this.filterFactory.addLuminosityFilter(h));const _=new Path2D;_.rect(p,m,a,r),i.clip(_),i.globalCompositeOperation="destination-in",i.drawImage(b,S,A,a,r,p,m,a,r),i.restore()}save(){this.inSMaskMode&&nl(this.ctx,this.suspendedCtx),this.ctx.save();const t=this.current;this.stateStack.push(t),this.current=t.clone()}restore(){if(this.stateStack.length===0){this.inSMaskMode&&this.endSMaskMode();return}this.current=this.stateStack.pop(),this.ctx.restore(),this.inSMaskMode&&nl(this.suspendedCtx,this.ctx),this.checkSMaskState(),this.pendingClip=null,this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}transform(t,i,a,r,c,u){this.ctx.transform(t,i,a,r,c,u),this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}constructPath(t,i,a){let[r]=i;if(!a){r||=i[0]=new Path2D,this[t](r);return}if(!(r instanceof Path2D)){const c=i[0]=new Path2D;for(let u=0,h=r.length;u<h;)switch(r[u++]){case gu.moveTo:c.moveTo(r[u++],r[u++]);break;case gu.lineTo:c.lineTo(r[u++],r[u++]);break;case gu.curveTo:c.bezierCurveTo(r[u++],r[u++],r[u++],r[u++],r[u++],r[u++]);break;case gu.closePath:c.closePath();break;default:xt(`Unrecognized drawing path operator: ${r[u-1]}`);break}r=c}mt.axialAlignedBoundingBox(a,be(this.ctx),this.current.minMax),this[t](r)}closePath(){this.ctx.closePath()}stroke(t,i=!0){const a=this.ctx,r=this.current.strokeColor;if(a.globalAlpha=this.current.strokeAlpha,this.contentVisible)if(typeof r=="object"&&r?.getPattern){const c=r.isModifyingCurrentTransform()?a.getTransform():null;if(a.save(),a.strokeStyle=r.getPattern(a,this,Ci(a),qe.STROKE),c){const u=new Path2D;u.addPath(t,a.getTransform().invertSelf().multiplySelf(c)),t=u}this.rescaleAndStroke(t,!1),a.restore()}else this.rescaleAndStroke(t,!0);i&&this.consumePath(t,this.current.getClippedPathBoundingBox(qe.STROKE,be(this.ctx))),a.globalAlpha=this.current.fillAlpha}closeStroke(t){this.stroke(t)}fill(t,i=!0){const a=this.ctx,r=this.current.fillColor,c=this.current.patternFill;let u=!1;if(c){const p=r.isModifyingCurrentTransform()?a.getTransform():null;if(a.save(),a.fillStyle=r.getPattern(a,this,Ci(a),qe.FILL),p){const m=new Path2D;m.addPath(t,a.getTransform().invertSelf().multiplySelf(p)),t=m}u=!0}const h=this.current.getClippedPathBoundingBox();this.contentVisible&&h!==null&&(this.pendingEOFill?(a.fill(t,"evenodd"),this.pendingEOFill=!1):a.fill(t)),u&&a.restore(),i&&this.consumePath(t,h)}eoFill(t){this.pendingEOFill=!0,this.fill(t)}fillStroke(t){this.fill(t,!1),this.stroke(t,!1),this.consumePath(t)}eoFillStroke(t){this.pendingEOFill=!0,this.fillStroke(t)}closeFillStroke(t){this.fillStroke(t)}closeEOFillStroke(t){this.pendingEOFill=!0,this.fillStroke(t)}endPath(t){this.consumePath(t)}rawFillPath(t){this.ctx.fill(t)}clip(){this.pendingClip=tO}eoClip(){this.pendingClip=b0}beginText(){this.current.textMatrix=null,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}endText(){const t=this.pendingTextPaths,i=this.ctx;if(t===void 0)return;const a=new Path2D,r=i.getTransform().invertSelf();for(const{transform:c,x:u,y:h,fontSize:p,path:m}of t)m&&a.addPath(m,new DOMMatrix(c).preMultiplySelf(r).translate(u,h).scale(p,-p));i.clip(a),delete this.pendingTextPaths}setCharSpacing(t){this.current.charSpacing=t}setWordSpacing(t){this.current.wordSpacing=t}setHScale(t){this.current.textHScale=t/100}setLeading(t){this.current.leading=-t}setFont(t,i){const a=this.commonObjs.get(t),r=this.current;if(!a)throw new Error(`Can't find font for ${t}`);if(r.fontMatrix=a.fontMatrix||Mf,(r.fontMatrix[0]===0||r.fontMatrix[3]===0)&&xt("Invalid font matrix for font "+t),i<0?(i=-i,r.fontDirection=-1):r.fontDirection=1,this.current.font=a,this.current.fontSize=i,a.isType3Font)return;const c=a.loadedName||"sans-serif",u=a.systemFontInfo?.css||`"${c}", ${a.fallbackName}`;let h="normal";a.black?h="900":a.bold&&(h="bold");const p=a.italic?"italic":"normal";let m=i;i<d0?m=d0:i>h0&&(m=h0),this.current.fontSizeScale=i/m,this.ctx.font=`${p} ${h} ${m}px ${u}`}setTextRenderingMode(t){this.current.textRenderingMode=t}setTextRise(t){this.current.textRise=t}moveText(t,i){this.current.x=this.current.lineX+=t,this.current.y=this.current.lineY+=i}setLeadingMoveText(t,i){this.setLeading(-i),this.moveText(t,i)}setTextMatrix(t){const{current:i}=this;i.textMatrix=t,i.textMatrixScale=Math.hypot(t[0],t[1]),i.x=i.lineX=0,i.y=i.lineY=0}nextLine(){this.moveText(0,this.current.leading)}#n(t,i,a){const r=new Path2D;return r.addPath(t,new DOMMatrix(a).invertSelf().multiplySelf(i)),r}paintChar(t,i,a,r,c){const u=this.ctx,h=this.current,p=h.font,m=h.textRenderingMode,g=h.fontSize/h.fontSizeScale,y=m&sn.FILL_STROKE_MASK,b=!!(m&sn.ADD_TO_PATH_FLAG),S=h.patternFill&&!p.missingFile,A=h.patternStroke&&!p.missingFile;let _;if((p.disableFontFace||b||S||A)&&!p.missingFile&&(_=p.getPathGenerator(this.commonObjs,t)),_&&(p.disableFontFace||S||A)){u.save(),u.translate(i,a),u.scale(g,-g);let R;if((y===sn.FILL||y===sn.FILL_STROKE)&&(r?(R=u.getTransform(),u.setTransform(...r),u.fill(this.#n(_,R,r))):u.fill(_)),y===sn.STROKE||y===sn.FILL_STROKE)if(c){R||=u.getTransform(),u.setTransform(...c);const{a:x,b:L,c:k,d:U}=R,I=mt.inverseTransform(c),j=mt.transform([x,L,k,U,0,0],I);mt.singularValueDecompose2dScale(j,In),u.lineWidth*=Math.max(In[0],In[1])/g,u.stroke(this.#n(_,R,c))}else u.lineWidth/=g,u.stroke(_);u.restore()}else(y===sn.FILL||y===sn.FILL_STROKE)&&u.fillText(t,i,a),(y===sn.STROKE||y===sn.FILL_STROKE)&&u.strokeText(t,i,a);b&&(this.pendingTextPaths||=[]).push({transform:be(u),x:i,y:a,fontSize:g,path:_})}get isFontSubpixelAAEnabled(){const{context:t}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10);t.scale(1.5,1),t.fillText("I",0,10);const i=t.getImageData(0,0,10,10).data;let a=!1;for(let r=3;r<i.length;r+=4)if(i[r]>0&&i[r]<255){a=!0;break}return zt(this,"isFontSubpixelAAEnabled",a)}showText(t){const i=this.current,a=i.font;if(a.isType3Font)return this.showType3Text(t);const r=i.fontSize;if(r===0)return;const c=this.ctx,u=i.fontSizeScale,h=i.charSpacing,p=i.wordSpacing,m=i.fontDirection,g=i.textHScale*m,y=t.length,b=a.vertical,S=b?1:-1,A=a.defaultVMetrics,_=r*i.fontMatrix[0],R=i.textRenderingMode===sn.FILL&&!a.disableFontFace&&!i.patternFill;c.save(),i.textMatrix&&c.transform(...i.textMatrix),c.translate(i.x,i.y+i.textRise),m>0?c.scale(g,-1):c.scale(g,1);let x,L;if(i.patternFill){c.save();const F=i.fillColor.getPattern(c,this,Ci(c),qe.FILL);x=be(c),c.restore(),c.fillStyle=F}if(i.patternStroke){c.save();const F=i.strokeColor.getPattern(c,this,Ci(c),qe.STROKE);L=be(c),c.restore(),c.strokeStyle=F}let k=i.lineWidth;const U=i.textMatrixScale;if(U===0||k===0){const F=i.textRenderingMode&sn.FILL_STROKE_MASK;(F===sn.STROKE||F===sn.FILL_STROKE)&&(k=this.getSinglePixelWidth())}else k/=U;if(u!==1&&(c.scale(u,u),k/=u),c.lineWidth=k,a.isInvalidPDFjsFont){const F=[];let J=0;for(const Y of t)F.push(Y.unicode),J+=Y.width;c.fillText(F.join(""),0,0),i.x+=J*_*g,c.restore(),this.compose();return}let I=0,j;for(j=0;j<y;++j){const F=t[j];if(typeof F=="number"){I+=S*F*r/1e3;continue}let J=!1;const Y=(F.isSpace?p:0)+h,at=F.fontChar,K=F.accent;let lt,Et,bt=F.width;if(b){const B=F.vmetric||A,Q=-(F.vmetric?B[1]:bt*.5)*_,dt=B[2]*_;bt=B?-B[0]:bt,lt=Q/u,Et=(I+dt)/u}else lt=I/u,Et=0;if(a.remeasure&&bt>0){const B=c.measureText(at).width*1e3/r*u;if(bt<B&&this.isFontSubpixelAAEnabled){const Q=bt/B;J=!0,c.save(),c.scale(Q,1),lt/=Q}else bt!==B&&(lt+=(bt-B)/2e3*r/u)}if(this.contentVisible&&(F.isInFont||a.missingFile)){if(R&&!K)c.fillText(at,lt,Et);else if(this.paintChar(at,lt,Et,x,L),K){const B=lt+r*K.offset.x/u,Q=Et-r*K.offset.y/u;this.paintChar(K.fontChar,B,Q,x,L)}}const Gt=b?bt*_-Y*m:bt*_+Y*m;I+=Gt,J&&c.restore()}b?i.y-=I:i.x+=I*g,c.restore(),this.compose()}showType3Text(t){const i=this.ctx,a=this.current,r=a.font,c=a.fontSize,u=a.fontDirection,h=r.vertical?1:-1,p=a.charSpacing,m=a.wordSpacing,g=a.textHScale*u,y=a.fontMatrix||Mf,b=t.length,S=a.textRenderingMode===sn.INVISIBLE;let A,_,R,x;if(!(S||c===0)){for(this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null,i.save(),a.textMatrix&&i.transform(...a.textMatrix),i.translate(a.x,a.y+a.textRise),i.scale(g,u),A=0;A<b;++A){if(_=t[A],typeof _=="number"){x=h*_*c/1e3,this.ctx.translate(x,0),a.x+=x*g;continue}const L=(_.isSpace?m:0)+p,k=r.charProcOperatorList[_.operatorListId];k?this.contentVisible&&(this.save(),i.scale(c,c),i.transform(...y),this.executeOperatorList(k),this.restore()):xt(`Type3 character "${_.operatorListId}" is not available.`);const U=[_.width,0];mt.applyTransform(U,y),R=U[0]*c+L,i.translate(R,0),a.x+=R*g}i.restore()}}setCharWidth(t,i){}setCharWidthAndBounds(t,i,a,r,c,u){const h=new Path2D;h.rect(a,r,c-a,u-r),this.ctx.clip(h),this.endPath()}getColorN_Pattern(t){let i;if(t[0]==="TilingPattern"){const a=this.baseTransform||be(this.ctx),r={createCanvasGraphics:c=>new xr(c,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:this.optionalContentConfig,markedContentStack:this.markedContentStack})};i=new Qf(t,this.ctx,r,a)}else i=this._getPattern(t[1],t[2]);return i}setStrokeColorN(){this.current.strokeColor=this.getColorN_Pattern(arguments),this.current.patternStroke=!0}setFillColorN(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0}setStrokeRGBColor(t){this.ctx.strokeStyle=this.current.strokeColor=t,this.current.patternStroke=!1}setStrokeTransparent(){this.ctx.strokeStyle=this.current.strokeColor="transparent",this.current.patternStroke=!1}setFillRGBColor(t){this.ctx.fillStyle=this.current.fillColor=t,this.current.patternFill=!1}setFillTransparent(){this.ctx.fillStyle=this.current.fillColor="transparent",this.current.patternFill=!1}_getPattern(t,i=null){let a;return this.cachedPatterns.has(t)?a=this.cachedPatterns.get(t):(a=XM(this.getObject(t)),this.cachedPatterns.set(t,a)),i&&(a.matrix=i),a}shadingFill(t){if(!this.contentVisible)return;const i=this.ctx;this.save();const a=this._getPattern(t);i.fillStyle=a.getPattern(i,this,Ci(i),qe.SHADING);const r=Ci(i);if(r){const{width:c,height:u}=i.canvas,h=wr.slice();mt.axialAlignedBoundingBox([0,0,c,u],r,h);const[p,m,g,y]=h;this.ctx.fillRect(p,m,g-p,y-m)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox()),this.restore()}beginInlineImage(){ie("Should not call beginInlineImage")}beginImageData(){ie("Should not call beginImageData")}paintFormXObjectBegin(t,i){if(this.contentVisible&&(this.save(),this.baseTransformStack.push(this.baseTransform),t&&this.transform(...t),this.baseTransform=be(this.ctx),i)){mt.axialAlignedBoundingBox(i,this.baseTransform,this.current.minMax);const[a,r,c,u]=i,h=new Path2D;h.rect(a,r,c-a,u-r),this.ctx.clip(h),this.endPath()}}paintFormXObjectEnd(){this.contentVisible&&(this.restore(),this.baseTransform=this.baseTransformStack.pop())}beginGroup(t){if(!this.contentVisible)return;this.save(),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);const i=this.ctx;t.isolated||bu("TODO: Support non-isolated groups."),t.knockout&&xt("Knockout groups not supported.");const a=be(i);if(t.matrix&&i.transform(...t.matrix),!t.bbox)throw new Error("Bounding box is required.");let r=wr.slice();mt.axialAlignedBoundingBox(t.bbox,be(i),r);const c=[0,0,i.canvas.width,i.canvas.height];r=mt.intersect(r,c)||[0,0,0,0];const u=Math.floor(r[0]),h=Math.floor(r[1]),p=Math.max(Math.ceil(r[2])-u,1),m=Math.max(Math.ceil(r[3])-h,1);this.current.startNewPathAndClipBox([0,0,p,m]);let g="groupAt"+this.groupLevel;t.smask&&(g+="_smask_"+this.smaskCounter++%2);const y=this.cachedCanvases.getCanvas(g,p,m),b=y.context;b.translate(-u,-h),b.transform(...a);let S=new Path2D;const[A,_,R,x]=t.bbox;if(S.rect(A,_,R-A,x-_),t.matrix){const L=new Path2D;L.addPath(S,new DOMMatrix(t.matrix)),S=L}b.clip(S),t.smask?this.smaskStack.push({canvas:y.canvas,context:b,offsetX:u,offsetY:h,subtype:t.smask.subtype,backdrop:t.smask.backdrop,transferMap:t.smask.transferMap||null,startTransformInverse:null}):(i.setTransform(1,0,0,1,0,0),i.translate(u,h),i.save()),nl(i,b),this.ctx=b,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(i),this.groupLevel++}endGroup(t){if(!this.contentVisible)return;this.groupLevel--;const i=this.ctx,a=this.groupStack.pop();if(this.ctx=a,this.ctx.imageSmoothingEnabled=!1,t.smask)this.tempSMask=this.smaskStack.pop(),this.restore();else{this.ctx.restore();const r=be(this.ctx);this.restore(),this.ctx.save(),this.ctx.setTransform(...r);const c=wr.slice();mt.axialAlignedBoundingBox([0,0,i.canvas.width,i.canvas.height],r,c),this.ctx.drawImage(i.canvas,0,0),this.ctx.restore(),this.compose(c)}}beginAnnotation(t,i,a,r,c){if(this.#t(),Cu(this.ctx),this.ctx.save(),this.save(),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),i){const u=i[2]-i[0],h=i[3]-i[1];if(c&&this.annotationCanvasMap){a=a.slice(),a[4]-=i[0],a[5]-=i[1],i=i.slice(),i[0]=i[1]=0,i[2]=u,i[3]=h,mt.singularValueDecompose2dScale(be(this.ctx),In);const{viewportScale:p}=this,m=Math.ceil(u*this.outputScaleX*p),g=Math.ceil(h*this.outputScaleY*p);this.annotationCanvas=this.canvasFactory.create(m,g);const{canvas:y,context:b}=this.annotationCanvas;this.annotationCanvasMap.set(t,y),this.annotationCanvas.savedCtx=this.ctx,this.ctx=b,this.ctx.save(),this.ctx.setTransform(In[0],0,0,-In[1],0,h*In[1]),Cu(this.ctx)}else{Cu(this.ctx),this.endPath();const p=new Path2D;p.rect(i[0],i[1],u,h),this.ctx.clip(p)}}this.current=new p0(this.ctx.canvas.width,this.ctx.canvas.height),this.transform(...a),this.transform(...r)}endAnnotation(){this.annotationCanvas&&(this.ctx.restore(),this.#e(),this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}paintImageMaskXObject(t){if(!this.contentVisible)return;const i=t.count;t=this.getObject(t.data,t),t.count=i;const a=this.ctx,r=this._createMaskCanvas(t),c=r.canvas;a.save(),a.setTransform(1,0,0,1,0,0),a.drawImage(c,r.offsetX,r.offsetY),a.restore(),this.compose()}paintImageMaskXObjectRepeat(t,i,a=0,r=0,c,u){if(!this.contentVisible)return;t=this.getObject(t.data,t);const h=this.ctx;h.save();const p=be(h);h.transform(i,a,r,c,0,0);const m=this._createMaskCanvas(t);h.setTransform(1,0,0,1,m.offsetX-p[4],m.offsetY-p[5]);for(let g=0,y=u.length;g<y;g+=2){const b=mt.transform(p,[i,a,r,c,u[g],u[g+1]]);h.drawImage(m.canvas,b[4],b[5])}h.restore(),this.compose()}paintImageMaskXObjectGroup(t){if(!this.contentVisible)return;const i=this.ctx,a=this.current.fillColor,r=this.current.patternFill;for(const c of t){const{data:u,width:h,height:p,transform:m}=c,g=this.cachedCanvases.getCanvas("maskCanvas",h,p),y=g.context;y.save();const b=this.getObject(u,c);g0(y,b),y.globalCompositeOperation="source-in",y.fillStyle=r?a.getPattern(y,this,Ci(i),qe.FILL):a,y.fillRect(0,0,h,p),y.restore(),i.save(),i.transform(...m),i.scale(1,-1),xu(i,g.canvas,0,0,h,p,0,-1,1,1),i.restore()}this.compose()}paintImageXObject(t){if(!this.contentVisible)return;const i=this.getObject(t);if(!i){xt("Dependent image isn't ready yet");return}this.paintInlineImageXObject(i)}paintImageXObjectRepeat(t,i,a,r){if(!this.contentVisible)return;const c=this.getObject(t);if(!c){xt("Dependent image isn't ready yet");return}const u=c.width,h=c.height,p=[];for(let m=0,g=r.length;m<g;m+=2)p.push({transform:[i,0,0,a,r[m],r[m+1]],x:0,y:0,w:u,h});this.paintInlineImageXObjectGroup(c,p)}applyTransferMapsToCanvas(t){return this.current.transferMaps!=="none"&&(t.filter=this.current.transferMaps,t.drawImage(t.canvas,0,0),t.filter="none"),t.canvas}applyTransferMapsToBitmap(t){if(this.current.transferMaps==="none")return t.bitmap;const{bitmap:i,width:a,height:r}=t,c=this.cachedCanvases.getCanvas("inlineImage",a,r),u=c.context;return u.filter=this.current.transferMaps,u.drawImage(i,0,0),u.filter="none",c.canvas}paintInlineImageXObject(t){if(!this.contentVisible)return;const i=t.width,a=t.height,r=this.ctx;this.save();const{filter:c}=r;c!=="none"&&c!==""&&(r.filter="none"),r.scale(1/i,-1/a);let u;if(t.bitmap)u=this.applyTransferMapsToBitmap(t);else if(typeof HTMLElement=="function"&&t instanceof HTMLElement||!t.data)u=t;else{const m=this.cachedCanvases.getCanvas("inlineImage",i,a).context;m0(m,t),u=this.applyTransferMapsToCanvas(m)}const h=this._scaleImage(u,Ci(r));r.imageSmoothingEnabled=y0(be(r),t.interpolate),xu(r,h.img,0,0,h.paintWidth,h.paintHeight,0,-a,i,a),this.compose(),this.restore()}paintInlineImageXObjectGroup(t,i){if(!this.contentVisible)return;const a=this.ctx;let r;if(t.bitmap)r=t.bitmap;else{const c=t.width,u=t.height,p=this.cachedCanvases.getCanvas("inlineImage",c,u).context;m0(p,t),r=this.applyTransferMapsToCanvas(p)}for(const c of i)a.save(),a.transform(...c.transform),a.scale(1,-1),xu(a,r,c.x,c.y,c.w,c.h,0,-1,1,1),a.restore();this.compose()}paintSolidColorImageMask(){this.contentVisible&&(this.ctx.fillRect(0,0,1,1),this.compose())}markPoint(t){}markPointProps(t,i){}beginMarkedContent(t){this.markedContentStack.push({visible:!0})}beginMarkedContentProps(t,i){t==="OC"?this.markedContentStack.push({visible:this.optionalContentConfig.isVisible(i)}):this.markedContentStack.push({visible:!0}),this.contentVisible=this.isContentVisible()}endMarkedContent(){this.markedContentStack.pop(),this.contentVisible=this.isContentVisible()}beginCompat(){}endCompat(){}consumePath(t,i){const a=this.current.isEmptyClip();this.pendingClip&&this.current.updateClipFromPath(),this.pendingClip||this.compose(i);const r=this.ctx;this.pendingClip&&(a||(this.pendingClip===b0?r.clip(t,"evenodd"):r.clip(t)),this.pendingClip=null),this.current.startNewPathAndClipBox(this.current.clipBox)}getSinglePixelWidth(){if(!this._cachedGetSinglePixelWidth){const t=be(this.ctx);if(t[1]===0&&t[2]===0)this._cachedGetSinglePixelWidth=1/Math.min(Math.abs(t[0]),Math.abs(t[3]));else{const i=Math.abs(t[0]*t[3]-t[2]*t[1]),a=Math.hypot(t[0],t[2]),r=Math.hypot(t[1],t[3]);this._cachedGetSinglePixelWidth=Math.max(a,r)/i}}return this._cachedGetSinglePixelWidth}getScaleForStroking(){if(this._cachedScaleForStroking[0]===-1){const{lineWidth:t}=this.current,{a:i,b:a,c:r,d:c}=this.ctx.getTransform();let u,h;if(a===0&&r===0){const p=Math.abs(i),m=Math.abs(c);if(p===m)if(t===0)u=h=1/p;else{const g=p*t;u=h=g<1?1/g:1}else if(t===0)u=1/p,h=1/m;else{const g=p*t,y=m*t;u=g<1?1/g:1,h=y<1?1/y:1}}else{const p=Math.abs(i*c-a*r),m=Math.hypot(i,a),g=Math.hypot(r,c);if(t===0)u=g/p,h=m/p;else{const y=t*p;u=g>y?g/y:1,h=m>y?m/y:1}}this._cachedScaleForStroking[0]=u,this._cachedScaleForStroking[1]=h}return this._cachedScaleForStroking}rescaleAndStroke(t,i){const{ctx:a,current:{lineWidth:r}}=this,[c,u]=this.getScaleForStroking();if(c===u){a.lineWidth=(r||1)*c,a.stroke(t);return}const h=a.getLineDash();i&&a.save(),a.scale(c,u),Kf.a=1/c,Kf.d=1/u;const p=new Path2D;if(p.addPath(t,Kf),h.length>0){const m=Math.max(c,u);a.setLineDash(h.map(g=>g/m)),a.lineDashOffset/=m}a.lineWidth=r||1,a.stroke(p),i&&a.restore()}isContentVisible(){for(let t=this.markedContentStack.length-1;t>=0;t--)if(!this.markedContentStack[t].visible)return!1;return!0}}for(const l in mu)xr.prototype[l]!==void 0&&(xr.prototype[mu[l]]=xr.prototype[l]);class Cr{static#t=null;static#e="";static get workerPort(){return this.#t}static set workerPort(t){if(!(typeof Worker<"u"&&t instanceof Worker)&&t!==null)throw new Error("Invalid `workerPort` type.");this.#t=t}static get workerSrc(){return this.#e}static set workerSrc(t){if(typeof t!="string")throw new Error("Invalid `workerSrc` type.");this.#e=t}}class eO{#t;#e;constructor({parsedData:t,rawData:i}){this.#t=t,this.#e=i}getRaw(){return this.#e}get(t){return this.#t.get(t)??null}[Symbol.iterator](){return this.#t.entries()}}const Rr=Symbol("INTERNAL");class nO{#t=!1;#e=!1;#n=!1;#i=!0;constructor(t,{name:i,intent:a,usage:r,rbGroups:c}){this.#t=!!(t&Ln.DISPLAY),this.#e=!!(t&Ln.PRINT),this.name=i,this.intent=a,this.usage=r,this.rbGroups=c}get visible(){if(this.#n)return this.#i;if(!this.#i)return!1;const{print:t,view:i}=this.usage;return this.#t?i?.viewState!=="OFF":this.#e?t?.printState!=="OFF":!0}_setVisible(t,i,a=!1){t!==Rr&&ie("Internal method `_setVisible` called."),this.#n=a,this.#i=i}}class iO{#t=null;#e=new Map;#n=null;#i=null;constructor(t,i=Ln.DISPLAY){if(this.renderingIntent=i,this.name=null,this.creator=null,t!==null){this.name=t.name,this.creator=t.creator,this.#i=t.order;for(const a of t.groups)this.#e.set(a.id,new nO(i,a));if(t.baseState==="OFF")for(const a of this.#e.values())a._setVisible(Rr,!1);for(const a of t.on)this.#e.get(a)._setVisible(Rr,!0);for(const a of t.off)this.#e.get(a)._setVisible(Rr,!1);this.#n=this.getHash()}}#a(t){const i=t.length;if(i<2)return!0;const a=t[0];for(let r=1;r<i;r++){const c=t[r];let u;if(Array.isArray(c))u=this.#a(c);else if(this.#e.has(c))u=this.#e.get(c).visible;else return xt(`Optional content group not found: ${c}`),!0;switch(a){case"And":if(!u)return!1;break;case"Or":if(u)return!0;break;case"Not":return!u;default:return!0}}return a==="And"}isVisible(t){if(this.#e.size===0)return!0;if(!t)return bu("Optional content group not defined."),!0;if(t.type==="OCG")return this.#e.has(t.id)?this.#e.get(t.id).visible:(xt(`Optional content group not found: ${t.id}`),!0);if(t.type==="OCMD"){if(t.expression)return this.#a(t.expression);if(!t.policy||t.policy==="AnyOn"){for(const i of t.ids){if(!this.#e.has(i))return xt(`Optional content group not found: ${i}`),!0;if(this.#e.get(i).visible)return!0}return!1}else if(t.policy==="AllOn"){for(const i of t.ids){if(!this.#e.has(i))return xt(`Optional content group not found: ${i}`),!0;if(!this.#e.get(i).visible)return!1}return!0}else if(t.policy==="AnyOff"){for(const i of t.ids){if(!this.#e.has(i))return xt(`Optional content group not found: ${i}`),!0;if(!this.#e.get(i).visible)return!0}return!1}else if(t.policy==="AllOff"){for(const i of t.ids){if(!this.#e.has(i))return xt(`Optional content group not found: ${i}`),!0;if(this.#e.get(i).visible)return!1}return!0}return xt(`Unknown optional content policy ${t.policy}.`),!0}return xt(`Unknown group type ${t.type}.`),!0}setVisibility(t,i=!0,a=!0){const r=this.#e.get(t);if(!r){xt(`Optional content group not found: ${t}`);return}if(a&&i&&r.rbGroups.length)for(const c of r.rbGroups)for(const u of c)u!==t&&this.#e.get(u)?._setVisible(Rr,!1,!0);r._setVisible(Rr,!!i,!0),this.#t=null}setOCGState({state:t,preserveRB:i}){let a;for(const r of t){switch(r){case"ON":case"OFF":case"Toggle":a=r;continue}const c=this.#e.get(r);if(c)switch(a){case"ON":this.setVisibility(r,!0,i);break;case"OFF":this.setVisibility(r,!1,i);break;case"Toggle":this.setVisibility(r,!c.visible,i);break}}this.#t=null}get hasInitialVisibility(){return this.#n===null||this.getHash()===this.#n}getOrder(){return this.#e.size?this.#i?this.#i.slice():[...this.#e.keys()]:null}getGroup(t){return this.#e.get(t)||null}getHash(){if(this.#t!==null)return this.#t;const t=new Jv;for(const[i,a]of this.#e)t.update(`${i}:${a.visible}`);return this.#t=t.hexdigest()}[Symbol.iterator](){return this.#e.entries()}}class sO{constructor(t,{disableRange:i=!1,disableStream:a=!1}){Me(t,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.');const{length:r,initialData:c,progressiveDone:u,contentDispositionFilename:h}=t;if(this._queuedChunks=[],this._progressiveDone=u,this._contentDispositionFilename=h,c?.length>0){const p=c instanceof Uint8Array&&c.byteLength===c.buffer.byteLength?c.buffer:new Uint8Array(c).buffer;this._queuedChunks.push(p)}this._pdfDataRangeTransport=t,this._isStreamingSupported=!a,this._isRangeSupported=!i,this._contentLength=r,this._fullRequestReader=null,this._rangeReaders=[],t.addRangeListener((p,m)=>{this._onReceiveData({begin:p,chunk:m})}),t.addProgressListener((p,m)=>{this._onProgress({loaded:p,total:m})}),t.addProgressiveReadListener(p=>{this._onReceiveData({chunk:p})}),t.addProgressiveDoneListener(()=>{this._onProgressiveDone()}),t.transportReady()}_onReceiveData({begin:t,chunk:i}){const a=i instanceof Uint8Array&&i.byteLength===i.buffer.byteLength?i.buffer:new Uint8Array(i).buffer;if(t===void 0)this._fullRequestReader?this._fullRequestReader._enqueue(a):this._queuedChunks.push(a);else{const r=this._rangeReaders.some(function(c){return c._begin!==t?!1:(c._enqueue(a),!0)});Me(r,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}_onProgress(t){t.total===void 0?this._rangeReaders[0]?.onProgress?.({loaded:t.loaded}):this._fullRequestReader?.onProgress?.({loaded:t.loaded,total:t.total})}_onProgressiveDone(){this._fullRequestReader?.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(t){const i=this._rangeReaders.indexOf(t);i>=0&&this._rangeReaders.splice(i,1)}getFullReader(){Me(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");const t=this._queuedChunks;return this._queuedChunks=null,new aO(this,t,this._progressiveDone,this._contentDispositionFilename)}getRangeReader(t,i){if(i<=this._progressiveDataLength)return null;const a=new rO(this,t,i);return this._pdfDataRangeTransport.requestDataRange(t,i),this._rangeReaders.push(a),a}cancelAllRequests(t){this._fullRequestReader?.cancel(t);for(const i of this._rangeReaders.slice(0))i.cancel(t);this._pdfDataRangeTransport.abort()}}class aO{constructor(t,i,a=!1,r=null){this._stream=t,this._done=a||!1,this._filename=zf(r)?r:null,this._queuedChunks=i||[],this._loaded=0;for(const c of this._queuedChunks)this._loaded+=c.byteLength;this._requests=[],this._headersReady=Promise.resolve(),t._fullRequestReader=this,this.onProgress=null}_enqueue(t){this._done||(this._requests.length>0?this._requests.shift().resolve({value:t,done:!1}):this._queuedChunks.push(t),this._loaded+=t.byteLength)}get headersReady(){return this._headersReady}get filename(){return this._filename}get isRangeSupported(){return this._stream._isRangeSupported}get isStreamingSupported(){return this._stream._isStreamingSupported}get contentLength(){return this._stream._contentLength}async read(){if(this._queuedChunks.length>0)return{value:this._queuedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const t=Promise.withResolvers();return this._requests.push(t),t.promise}cancel(t){this._done=!0;for(const i of this._requests)i.resolve({value:void 0,done:!0});this._requests.length=0}progressiveDone(){this._done||(this._done=!0)}}class rO{constructor(t,i,a){this._stream=t,this._begin=i,this._end=a,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(t){if(!this._done){if(this._requests.length===0)this._queuedChunk=t;else{this._requests.shift().resolve({value:t,done:!1});for(const a of this._requests)a.resolve({value:void 0,done:!0});this._requests.length=0}this._done=!0,this._stream._removeRangeReader(this)}}get isStreamingSupported(){return!1}async read(){if(this._queuedChunk){const i=this._queuedChunk;return this._queuedChunk=null,{value:i,done:!1}}if(this._done)return{value:void 0,done:!0};const t=Promise.withResolvers();return this._requests.push(t),t.promise}cancel(t){this._done=!0;for(const i of this._requests)i.resolve({value:void 0,done:!0});this._requests.length=0,this._stream._removeRangeReader(this)}}function oO(l){let t=!0,i=a("filename\\*","i").exec(l);if(i){i=i[1];let g=h(i);return g=unescape(g),g=p(g),g=m(g),c(g)}if(i=u(l),i){const g=m(i);return c(g)}if(i=a("filename","i").exec(l),i){i=i[1];let g=h(i);return g=m(g),c(g)}function a(g,y){return new RegExp("(?:^|;)\\s*"+g+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',y)}function r(g,y){if(g){if(!/^[\x00-\xFF]+$/.test(y))return y;try{const b=new TextDecoder(g,{fatal:!0}),S=Wo(y);y=b.decode(S),t=!1}catch{}}return y}function c(g){return t&&/[\x80-\xff]/.test(g)&&(g=r("utf-8",g),t&&(g=r("iso-8859-1",g))),g}function u(g){const y=[];let b;const S=a("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;(b=S.exec(g))!==null;){let[,_,R,x]=b;if(_=parseInt(_,10),_ in y){if(_===0)break;continue}y[_]=[R,x]}const A=[];for(let _=0;_<y.length&&_ in y;++_){let[R,x]=y[_];x=h(x),R&&(x=unescape(x),_===0&&(x=p(x))),A.push(x)}return A.join("")}function h(g){if(g.startsWith('"')){const y=g.slice(1).split('\\"');for(let b=0;b<y.length;++b){const S=y[b].indexOf('"');S!==-1&&(y[b]=y[b].slice(0,S),y.length=b+1),y[b]=y[b].replaceAll(/\\(.)/g,"$1")}g=y.join('"')}return g}function p(g){const y=g.indexOf("'");if(y===-1)return g;const b=g.slice(0,y),A=g.slice(y+1).replace(/^[^']*'/,"");return r(b,A)}function m(g){return!g.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(g)?g:g.replaceAll(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,function(y,b,S,A){if(S==="q"||S==="Q")return A=A.replaceAll("_"," "),A=A.replaceAll(/=([0-9a-fA-F]{2})/g,function(_,R){return String.fromCharCode(parseInt(R,16))}),r(b,A);try{A=atob(A)}catch{}return r(b,A)})}return""}function v0(l,t){const i=new Headers;if(!l||!t||typeof t!="object")return i;for(const a in t){const r=t[a];r!==void 0&&i.append(a,r)}return i}function Ru(l){return URL.parse(l)?.origin??null}function S0({responseHeaders:l,isHttp:t,rangeChunkSize:i,disableRange:a}){const r={allowRangeRequests:!1,suggestedLength:void 0},c=parseInt(l.get("Content-Length"),10);return!Number.isInteger(c)||(r.suggestedLength=c,c<=2*i)||a||!t||l.get("Accept-Ranges")!=="bytes"||(l.get("Content-Encoding")||"identity")!=="identity"||(r.allowRangeRequests=!0),r}function E0(l){const t=l.get("Content-Disposition");if(t){let i=oO(t);if(i.includes("%"))try{i=decodeURIComponent(i)}catch{}if(zf(i))return i}return null}function il(l,t){return new vu(`Unexpected server response (${l}) while retrieving PDF "${t}".`,l,l===404||l===0&&t.startsWith("file:"))}function A0(l){return l===200||l===206}function _0(l,t,i){return{method:"GET",headers:l,signal:i.signal,mode:"cors",credentials:t?"include":"same-origin",redirect:"follow"}}function T0(l){return l instanceof Uint8Array?l.buffer:l instanceof ArrayBuffer?l:(xt(`getArrayBuffer - unexpected data format: ${l}`),new Uint8Array(l).buffer)}class lO{_responseOrigin=null;constructor(t){this.source=t,this.isHttp=/^https?:/i.test(t.url),this.headers=v0(this.isHttp,t.httpHeaders),this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}getFullReader(){return Me(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new cO(this),this._fullRequestReader}getRangeReader(t,i){if(i<=this._progressiveDataLength)return null;const a=new uO(this,t,i);return this._rangeRequestReaders.push(a),a}cancelAllRequests(t){this._fullRequestReader?.cancel(t);for(const i of this._rangeRequestReaders.slice(0))i.cancel(t)}}class cO{constructor(t){this._stream=t,this._reader=null,this._loaded=0,this._filename=null;const i=t.source;this._withCredentials=i.withCredentials||!1,this._contentLength=i.length,this._headersCapability=Promise.withResolvers(),this._disableRange=i.disableRange||!1,this._rangeChunkSize=i.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._abortController=new AbortController,this._isStreamingSupported=!i.disableStream,this._isRangeSupported=!i.disableRange;const a=new Headers(t.headers),r=i.url;fetch(r,_0(a,this._withCredentials,this._abortController)).then(c=>{if(t._responseOrigin=Ru(c.url),!A0(c.status))throw il(c.status,r);this._reader=c.body.getReader(),this._headersCapability.resolve();const u=c.headers,{allowRangeRequests:h,suggestedLength:p}=S0({responseHeaders:u,isHttp:t.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=h,this._contentLength=p||this._contentLength,this._filename=E0(u),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new Ps("Streaming is disabled."))}).catch(this._headersCapability.reject),this.onProgress=null}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._headersCapability.promise;const{value:t,done:i}=await this._reader.read();return i?{value:t,done:i}:(this._loaded+=t.byteLength,this.onProgress?.({loaded:this._loaded,total:this._contentLength}),{value:T0(t),done:!1})}cancel(t){this._reader?.cancel(t),this._abortController.abort()}}class uO{constructor(t,i,a){this._stream=t,this._reader=null,this._loaded=0;const r=t.source;this._withCredentials=r.withCredentials||!1,this._readCapability=Promise.withResolvers(),this._isStreamingSupported=!r.disableStream,this._abortController=new AbortController;const c=new Headers(t.headers);c.append("Range",`bytes=${i}-${a-1}`);const u=r.url;fetch(u,_0(c,this._withCredentials,this._abortController)).then(h=>{const p=Ru(h.url);if(p!==t._responseOrigin)throw new Error(`Expected range response-origin "${p}" to match "${t._responseOrigin}".`);if(!A0(h.status))throw il(h.status,u);this._readCapability.resolve(),this._reader=h.body.getReader()}).catch(this._readCapability.reject),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._readCapability.promise;const{value:t,done:i}=await this._reader.read();return i?{value:t,done:i}:(this._loaded+=t.byteLength,this.onProgress?.({loaded:this._loaded}),{value:T0(t),done:!1})}cancel(t){this._reader?.cancel(t),this._abortController.abort()}}const Zf=200,Jf=206;function dO(l){const t=l.response;return typeof t!="string"?t:Wo(t).buffer}class hO{_responseOrigin=null;constructor({url:t,httpHeaders:i,withCredentials:a}){this.url=t,this.isHttp=/^https?:/i.test(t),this.headers=v0(this.isHttp,i),this.withCredentials=a||!1,this.currXhrId=0,this.pendingRequests=Object.create(null)}request(t){const i=new XMLHttpRequest,a=this.currXhrId++,r=this.pendingRequests[a]={xhr:i};i.open("GET",this.url),i.withCredentials=this.withCredentials;for(const[c,u]of this.headers)i.setRequestHeader(c,u);return this.isHttp&&"begin"in t&&"end"in t?(i.setRequestHeader("Range",`bytes=${t.begin}-${t.end-1}`),r.expectedStatus=Jf):r.expectedStatus=Zf,i.responseType="arraybuffer",Me(t.onError,"Expected `onError` callback to be provided."),i.onerror=()=>{t.onError(i.status)},i.onreadystatechange=this.onStateChange.bind(this,a),i.onprogress=this.onProgress.bind(this,a),r.onHeadersReceived=t.onHeadersReceived,r.onDone=t.onDone,r.onError=t.onError,r.onProgress=t.onProgress,i.send(null),a}onProgress(t,i){const a=this.pendingRequests[t];a&&a.onProgress?.(i)}onStateChange(t,i){const a=this.pendingRequests[t];if(!a)return;const r=a.xhr;if(r.readyState>=2&&a.onHeadersReceived&&(a.onHeadersReceived(),delete a.onHeadersReceived),r.readyState!==4||!(t in this.pendingRequests))return;if(delete this.pendingRequests[t],r.status===0&&this.isHttp){a.onError(r.status);return}const c=r.status||Zf;if(!(c===Zf&&a.expectedStatus===Jf)&&c!==a.expectedStatus){a.onError(r.status);return}const h=dO(r);if(c===Jf){const p=r.getResponseHeader("Content-Range"),m=/bytes (\d+)-(\d+)\/(\d+)/.exec(p);m?a.onDone({begin:parseInt(m[1],10),chunk:h}):(xt('Missing or invalid "Content-Range" header.'),a.onError(0))}else h?a.onDone({begin:0,chunk:h}):a.onError(r.status)}getRequestXhr(t){return this.pendingRequests[t].xhr}isPendingRequest(t){return t in this.pendingRequests}abortRequest(t){const i=this.pendingRequests[t].xhr;delete this.pendingRequests[t],i.abort()}}class fO{constructor(t){this._source=t,this._manager=new hO(t),this._rangeChunkSize=t.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(t){const i=this._rangeRequestReaders.indexOf(t);i>=0&&this._rangeRequestReaders.splice(i,1)}getFullReader(){return Me(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new pO(this._manager,this._source),this._fullRequestReader}getRangeReader(t,i){const a=new mO(this._manager,t,i);return a.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(a),a}cancelAllRequests(t){this._fullRequestReader?.cancel(t);for(const i of this._rangeRequestReaders.slice(0))i.cancel(t)}}class pO{constructor(t,i){this._manager=t,this._url=i.url,this._fullRequestId=t.request({onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)}),this._headersCapability=Promise.withResolvers(),this._disableRange=i.disableRange||!1,this._contentLength=i.length,this._rangeChunkSize=i.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!1,this._isRangeSupported=!1,this._cachedChunks=[],this._requests=[],this._done=!1,this._storedError=void 0,this._filename=null,this.onProgress=null}_onHeadersReceived(){const t=this._fullRequestId,i=this._manager.getRequestXhr(t);this._manager._responseOrigin=Ru(i.responseURL);const a=i.getAllResponseHeaders(),r=new Headers(a?a.trimStart().replace(/[^\S ]+$/,"").split(/[\r\n]+/).map(h=>{const[p,...m]=h.split(": ");return[p,m.join(": ")]}):[]),{allowRangeRequests:c,suggestedLength:u}=S0({responseHeaders:r,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});c&&(this._isRangeSupported=!0),this._contentLength=u||this._contentLength,this._filename=E0(r),this._isRangeSupported&&this._manager.abortRequest(t),this._headersCapability.resolve()}_onDone(t){if(t&&(this._requests.length>0?this._requests.shift().resolve({value:t.chunk,done:!1}):this._cachedChunks.push(t.chunk)),this._done=!0,!(this._cachedChunks.length>0)){for(const i of this._requests)i.resolve({value:void 0,done:!0});this._requests.length=0}}_onError(t){this._storedError=il(t,this._url),this._headersCapability.reject(this._storedError);for(const i of this._requests)i.reject(this._storedError);this._requests.length=0,this._cachedChunks.length=0}_onProgress(t){this.onProgress?.({loaded:t.loaded,total:t.lengthComputable?t.total:this._contentLength})}get filename(){return this._filename}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}get contentLength(){return this._contentLength}get headersReady(){return this._headersCapability.promise}async read(){if(await this._headersCapability.promise,this._storedError)throw this._storedError;if(this._cachedChunks.length>0)return{value:this._cachedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const t=Promise.withResolvers();return this._requests.push(t),t.promise}cancel(t){this._done=!0,this._headersCapability.reject(t);for(const i of this._requests)i.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}class mO{constructor(t,i,a){this._manager=t,this._url=t.url,this._requestId=t.request({begin:i,end:a,onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)}),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}_onHeadersReceived(){const t=Ru(this._manager.getRequestXhr(this._requestId)?.responseURL);t!==this._manager._responseOrigin&&(this._storedError=new Error(`Expected range response-origin "${t}" to match "${this._manager._responseOrigin}".`),this._onError(0))}_close(){this.onClosed?.(this)}_onDone(t){const i=t.chunk;this._requests.length>0?this._requests.shift().resolve({value:i,done:!1}):this._queuedChunk=i,this._done=!0;for(const a of this._requests)a.resolve({value:void 0,done:!0});this._requests.length=0,this._close()}_onError(t){this._storedError??=il(t,this._url);for(const i of this._requests)i.reject(this._storedError);this._requests.length=0,this._queuedChunk=null}_onProgress(t){this.isStreamingSupported||this.onProgress?.({loaded:t.loaded})}get isStreamingSupported(){return!1}async read(){if(this._storedError)throw this._storedError;if(this._queuedChunk!==null){const i=this._queuedChunk;return this._queuedChunk=null,{value:i,done:!1}}if(this._done)return{value:void 0,done:!0};const t=Promise.withResolvers();return this._requests.push(t),t.promise}cancel(t){this._done=!0;for(const i of this._requests)i.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}const gO=/^[a-z][a-z0-9\-+.]+:/i;function yO(l){if(gO.test(l))return new URL(l);const t=process.getBuiltinModule("url");return new URL(t.pathToFileURL(l))}class bO{constructor(t){this.source=t,this.url=yO(t.url),Me(this.url.protocol==="file:","PDFNodeStream only supports file:// URLs."),this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}getFullReader(){return Me(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=new vO(this),this._fullRequestReader}getRangeReader(t,i){if(i<=this._progressiveDataLength)return null;const a=new SO(this,t,i);return this._rangeRequestReaders.push(a),a}cancelAllRequests(t){this._fullRequestReader?.cancel(t);for(const i of this._rangeRequestReaders.slice(0))i.cancel(t)}}class vO{constructor(t){this._url=t.url,this._done=!1,this._storedError=null,this.onProgress=null;const i=t.source;this._contentLength=i.length,this._loaded=0,this._filename=null,this._disableRange=i.disableRange||!1,this._rangeChunkSize=i.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!i.disableStream,this._isRangeSupported=!i.disableRange,this._readableStream=null,this._readCapability=Promise.withResolvers(),this._headersCapability=Promise.withResolvers();const a=process.getBuiltinModule("fs");a.promises.lstat(this._url).then(r=>{this._contentLength=r.size,this._setReadableStream(a.createReadStream(this._url)),this._headersCapability.resolve()},r=>{r.code==="ENOENT"&&(r=il(0,this._url.href)),this._storedError=r,this._headersCapability.reject(r)})}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const t=this._readableStream.read();return t===null?(this._readCapability=Promise.withResolvers(),this.read()):(this._loaded+=t.length,this.onProgress?.({loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(t).buffer,done:!1})}cancel(t){if(!this._readableStream){this._error(t);return}this._readableStream.destroy(t)}_error(t){this._storedError=t,this._readCapability.resolve()}_setReadableStream(t){this._readableStream=t,t.on("readable",()=>{this._readCapability.resolve()}),t.on("end",()=>{t.destroy(),this._done=!0,this._readCapability.resolve()}),t.on("error",i=>{this._error(i)}),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new Ps("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}class SO{constructor(t,i,a){this._url=t.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=Promise.withResolvers();const r=t.source;this._isStreamingSupported=!r.disableStream;const c=process.getBuiltinModule("fs");this._setReadableStream(c.createReadStream(this._url,{start:i,end:a-1}))}get isStreamingSupported(){return this._isStreamingSupported}async read(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const t=this._readableStream.read();return t===null?(this._readCapability=Promise.withResolvers(),this.read()):(this._loaded+=t.length,this.onProgress?.({loaded:this._loaded}),{value:new Uint8Array(t).buffer,done:!1})}cancel(t){if(!this._readableStream){this._error(t);return}this._readableStream.destroy(t)}_error(t){this._storedError=t,this._readCapability.resolve()}_setReadableStream(t){this._readableStream=t,t.on("readable",()=>{this._readCapability.resolve()}),t.on("end",()=>{t.destroy(),this._done=!0,this._readCapability.resolve()}),t.on("error",i=>{this._error(i)}),this._storedError&&this._readableStream.destroy(this._storedError)}}const sl=Symbol("INITIAL_DATA");class w0{#t=Object.create(null);#e(t){return this.#t[t]||={...Promise.withResolvers(),data:sl}}get(t,i=null){if(i){const r=this.#e(t);return r.promise.then(()=>i(r.data)),null}const a=this.#t[t];if(!a||a.data===sl)throw new Error(`Requesting object that isn't resolved yet ${t}.`);return a.data}has(t){const i=this.#t[t];return!!i&&i.data!==sl}delete(t){const i=this.#t[t];return!i||i.data===sl?!1:(delete this.#t[t],!0)}resolve(t,i=null){const a=this.#e(t);a.data=i,a.resolve()}clear(){for(const t in this.#t){const{data:i}=this.#t[t];i?.bitmap?.close()}this.#t=Object.create(null)}*[Symbol.iterator](){for(const t in this.#t){const{data:i}=this.#t[t];i!==sl&&(yield[t,i])}}}const EO=1e5,x0=30;class hn{#t=Promise.withResolvers();#e=null;#n=!1;#i=!!globalThis.FontInspector?.enabled;#a=null;#s=null;#r=0;#o=0;#u=null;#c=null;#h=0;#l=0;#p=Object.create(null);#g=[];#f=null;#d=[];#m=new WeakMap;#v=null;static#y=new Map;static#E=new Map;static#A=new WeakMap;static#b=null;static#T=new Set;constructor({textContentSource:t,container:i,viewport:a}){if(t instanceof ReadableStream)this.#f=t;else if(typeof t=="object")this.#f=new ReadableStream({start(p){p.enqueue(t),p.close()}});else throw new Error('No "textContentSource" parameter specified.');this.#e=this.#c=i,this.#l=a.scale*Ri.pixelRatio,this.#h=a.rotation,this.#s={div:null,properties:null,ctx:null};const{pageWidth:r,pageHeight:c,pageX:u,pageY:h}=a.rawDims;this.#v=[1,0,0,-1,-u,h+c],this.#o=r,this.#r=c,hn.#x(),_a(i,a),this.#t.promise.finally(()=>{hn.#T.delete(this),this.#s=null,this.#p=null}).catch(()=>{})}static get fontFamilyMap(){const{isWindows:t,isFirefox:i}=Ve.platform;return zt(this,"fontFamilyMap",new Map([["sans-serif",`${t&&i?"Calibri, ":""}sans-serif`],["monospace",`${t&&i?"Lucida Console, ":""}monospace`]]))}render(){const t=()=>{this.#u.read().then(({value:i,done:a})=>{if(a){this.#t.resolve();return}this.#a??=i.lang,Object.assign(this.#p,i.styles),this.#D(i.items),t()},this.#t.reject)};return this.#u=this.#f.getReader(),hn.#T.add(this),t(),this.#t.promise}update({viewport:t,onBefore:i=null}){const a=t.scale*Ri.pixelRatio,r=t.rotation;if(r!==this.#h&&(i?.(),this.#h=r,_a(this.#c,{rotation:r})),a!==this.#l){i?.(),this.#l=a;const c={div:null,properties:null,ctx:hn.#R(this.#a)};for(const u of this.#d)c.properties=this.#m.get(u),c.div=u,this.#M(c)}}cancel(){const t=new Ps("TextLayer task cancelled.");this.#u?.cancel(t).catch(()=>{}),this.#u=null,this.#t.reject(t)}get textDivs(){return this.#d}get textContentItemsStr(){return this.#g}#D(t){if(this.#n)return;this.#s.ctx??=hn.#R(this.#a);const i=this.#d,a=this.#g;for(const r of t){if(i.length>EO){xt("Ignoring additional textDivs for performance reasons."),this.#n=!0;return}if(r.str===void 0){if(r.type==="beginMarkedContentProps"||r.type==="beginMarkedContent"){const c=this.#e;this.#e=document.createElement("span"),this.#e.classList.add("markedContent"),r.id&&this.#e.setAttribute("id",`${r.id}`),c.append(this.#e)}else r.type==="endMarkedContent"&&(this.#e=this.#e.parentNode);continue}a.push(r.str),this.#_(r)}}#_(t){const i=document.createElement("span"),a={angle:0,canvasWidth:0,hasText:t.str!=="",hasEOL:t.hasEOL,fontSize:0};this.#d.push(i);const r=mt.transform(this.#v,t.transform);let c=Math.atan2(r[1],r[0]);const u=this.#p[t.fontName];u.vertical&&(c+=Math.PI/2);let h=this.#i&&u.fontSubstitution||u.fontFamily;h=hn.fontFamilyMap.get(h)||h;const p=Math.hypot(r[2],r[3]),m=p*hn.#k(h,u,this.#a);let g,y;c===0?(g=r[4],y=r[5]-m):(g=r[4]+m*Math.sin(c),y=r[5]-m*Math.cos(c));const b="calc(var(--total-scale-factor) *",S=i.style;this.#e===this.#c?(S.left=`${(100*g/this.#o).toFixed(2)}%`,S.top=`${(100*y/this.#r).toFixed(2)}%`):(S.left=`${b}${g.toFixed(2)}px)`,S.top=`${b}${y.toFixed(2)}px)`),S.fontSize=`${b}${(hn.#b*p).toFixed(2)}px)`,S.fontFamily=h,a.fontSize=p,i.setAttribute("role","presentation"),i.textContent=t.str,i.dir=t.dir,this.#i&&(i.dataset.fontName=u.fontSubstitutionLoadedName||t.fontName),c!==0&&(a.angle=c*(180/Math.PI));let A=!1;if(t.str.length>1)A=!0;else if(t.str!==" "&&t.transform[0]!==t.transform[3]){const _=Math.abs(t.transform[0]),R=Math.abs(t.transform[3]);_!==R&&Math.max(_,R)/Math.min(_,R)>1.5&&(A=!0)}if(A&&(a.canvasWidth=u.vertical?t.height:t.width),this.#m.set(i,a),this.#s.div=i,this.#s.properties=a,this.#M(this.#s),a.hasText&&this.#e.append(i),a.hasEOL){const _=document.createElement("br");_.setAttribute("role","presentation"),this.#e.append(_)}}#M(t){const{div:i,properties:a,ctx:r}=t,{style:c}=i;let u="";if(hn.#b>1&&(u=`scale(${1/hn.#b})`),a.canvasWidth!==0&&a.hasText){const{fontFamily:h}=c,{canvasWidth:p,fontSize:m}=a;hn.#C(r,m*this.#l,h);const{width:g}=r.measureText(i.textContent);g>0&&(u=`scaleX(${p*this.#l/g}) ${u}`)}a.angle!==0&&(u=`rotate(${a.angle}deg) ${u}`),u.length>0&&(c.transform=u)}static cleanup(){if(!(this.#T.size>0)){this.#y.clear();for(const{canvas:t}of this.#E.values())t.remove();this.#E.clear()}}static#R(t=null){let i=this.#E.get(t||="");if(!i){const a=document.createElement("canvas");a.className="hiddenCanvasElement",a.lang=t,document.body.append(a),i=a.getContext("2d",{alpha:!1,willReadFrequently:!0}),this.#E.set(t,i),this.#A.set(i,{size:0,family:""})}return i}static#C(t,i,a){const r=this.#A.get(t);i===r.size&&a===r.family||(t.font=`${i}px ${a}`,r.size=i,r.family=a)}static#x(){if(this.#b!==null)return;const t=document.createElement("div");t.style.opacity=0,t.style.lineHeight=1,t.style.fontSize="1px",t.style.position="absolute",t.textContent="X",document.body.append(t),this.#b=t.getBoundingClientRect().height,t.remove()}static#k(t,i,a){const r=this.#y.get(t);if(r)return r;const c=this.#R(a);c.canvas.width=c.canvas.height=x0,this.#C(c,x0,t);const u=c.measureText(""),h=u.fontBoundingBoxAscent,p=Math.abs(u.fontBoundingBoxDescent);c.canvas.width=c.canvas.height=0;let m=.8;return h?m=h/(h+p):(Ve.platform.isFirefox&&xt("Enable the `dom.textMetrics.fontBoundingBox.enabled` preference in `about:config` to improve TextLayer rendering."),i.ascent?m=i.ascent:i.descent&&(m=1+i.descent)),this.#y.set(t,m),m}}class al{static textContent(t){const i=[],a={items:i,styles:Object.create(null)};function r(c){if(!c)return;let u=null;const h=c.name;if(h==="#text")u=c.value;else if(al.shouldBuildText(h))c?.attributes?.textContent?u=c.attributes.textContent:c.value&&(u=c.value);else return;if(u!==null&&i.push({str:u}),!!c.children)for(const p of c.children)r(p)}return r(t),a}static shouldBuildText(t){return!(t==="textarea"||t==="input"||t==="option"||t==="select")}}const AO=100;function C0(l={}){typeof l=="string"||l instanceof URL?l={url:l}:(l instanceof ArrayBuffer||ArrayBuffer.isView(l))&&(l={data:l});const t=new tp,{docId:i}=t,a=l.url?OM(l.url):null,r=l.data?kM(l.data):null,c=l.httpHeaders||null,u=l.withCredentials===!0,h=l.password??null,p=l.range instanceof R0?l.range:null,m=Number.isInteger(l.rangeChunkSize)&&l.rangeChunkSize>0?l.rangeChunkSize:2**16;let g=l.worker instanceof rl?l.worker:null;const y=l.verbosity,b=typeof l.docBaseUrl=="string"&&!Su(l.docBaseUrl)?l.docBaseUrl:null,S=Tu(l.cMapUrl),A=l.cMapPacked!==!1,_=l.CMapReaderFactory||(un?BM:s0),R=Tu(l.iccUrl),x=Tu(l.standardFontDataUrl),L=l.StandardFontDataFactory||(un?FM:o0),k=Tu(l.wasmUrl),U=l.WasmFactory||(un?jM:c0),I=l.stopAtErrors!==!0,j=Number.isInteger(l.maxImageSize)&&l.maxImageSize>-1?l.maxImageSize:-1,F=l.isEvalSupported!==!1,J=typeof l.isOffscreenCanvasSupported=="boolean"?l.isOffscreenCanvasSupported:!un,Y=typeof l.isImageDecoderSupported=="boolean"?l.isImageDecoderSupported:!un&&(Ve.platform.isFirefox||!globalThis.chrome),at=Number.isInteger(l.canvasMaxAreaInBytes)?l.canvasMaxAreaInBytes:-1,K=typeof l.disableFontFace=="boolean"?l.disableFontFace:un,lt=l.fontExtraProperties===!0,Et=l.enableXfa===!0,bt=l.ownerDocument||globalThis.document,Gt=l.disableRange===!0,B=l.disableStream===!0,Q=l.disableAutoFetch===!0,dt=l.pdfBug===!0,Ct=l.CanvasFactory||(un?HM:PM),W=l.FilterFactory||(un?zM:UM),ht=l.enableHWA===!0,st=l.useWasm!==!1,vt=p?p.length:l.length??NaN,Zt=typeof l.useSystemFonts=="boolean"?l.useSystemFonts:!un&&!K,le=typeof l.useWorkerFetch=="boolean"?l.useWorkerFetch:!!(_===s0&&L===o0&&U===c0&&S&&x&&k&&Zo(S,document.baseURI)&&Zo(x,document.baseURI)&&Zo(k,document.baseURI)),tt=null;cM(y);const Wt={canvasFactory:new Ct({ownerDocument:bt,enableHWA:ht}),filterFactory:new W({docId:i,ownerDocument:bt}),cMapReaderFactory:le?null:new _({baseUrl:S,isCompressed:A}),standardFontDataFactory:le?null:new L({baseUrl:x}),wasmFactory:le?null:new U({baseUrl:k})};g||(g=rl.create({verbosity:y,port:Cr.workerPort}),t._worker=g);const Vt={docId:i,apiVersion:"5.4.54",data:r,password:h,disableAutoFetch:Q,rangeChunkSize:m,length:vt,docBaseUrl:b,enableXfa:Et,evaluatorOptions:{maxImageSize:j,disableFontFace:K,ignoreErrors:I,isEvalSupported:F,isOffscreenCanvasSupported:J,isImageDecoderSupported:Y,canvasMaxAreaInBytes:at,fontExtraProperties:lt,useSystemFonts:Zt,useWasm:st,useWorkerFetch:le,cMapUrl:S,iccUrl:R,standardFontDataUrl:x,wasmUrl:k}},ve={ownerDocument:bt,pdfBug:dt,styleElement:tt,loadingParams:{disableAutoFetch:Q,enableXfa:Et}};return g.promise.then(function(){if(t.destroyed)throw new Error("Loading aborted");if(g.destroyed)throw new Error("Worker was destroyed");const Ye=g.messageHandler.sendWithPromise("GetDocRequest",Vt,r?[r.buffer]:null);let Tn;if(p)Tn=new sO(p,{disableRange:Gt,disableStream:B});else if(!r){if(!a)throw new Error("getDocument - no `url` parameter provided.");const mi=Zo(a)?lO:un?bO:fO;Tn=new mi({url:a,length:vt,httpHeaders:c,withCredentials:u,rangeChunkSize:m,disableRange:Gt,disableStream:B})}return Ye.then(mi=>{if(t.destroyed)throw new Error("Loading aborted");if(g.destroyed)throw new Error("Worker was destroyed");const Pn=new el(i,mi,g.port),is=new wO(Pn,t,Tn,ve,Wt,ht);t._transport=is,Pn.send("Ready",null)})}).catch(t._capability.reject),t}class tp{static#t=0;_capability=Promise.withResolvers();_transport=null;_worker=null;docId=`d${tp.#t++}`;destroyed=!1;onPassword=null;onProgress=null;get promise(){return this._capability.promise}async destroy(){this.destroyed=!0;try{this._worker?.port&&(this._worker._pendingDestroy=!0),await this._transport?.destroy()}catch(t){throw this._worker?.port&&delete this._worker._pendingDestroy,t}this._transport=null,this._worker?.destroy(),this._worker=null}async getData(){return this._transport.getData()}}class R0{#t=Promise.withResolvers();#e=[];#n=[];#i=[];#a=[];constructor(t,i,a=!1,r=null){this.length=t,this.initialData=i,this.progressiveDone=a,this.contentDispositionFilename=r}addRangeListener(t){this.#a.push(t)}addProgressListener(t){this.#i.push(t)}addProgressiveReadListener(t){this.#n.push(t)}addProgressiveDoneListener(t){this.#e.push(t)}onDataRange(t,i){for(const a of this.#a)a(t,i)}onDataProgress(t,i){this.#t.promise.then(()=>{for(const a of this.#i)a(t,i)})}onDataProgressiveRead(t){this.#t.promise.then(()=>{for(const i of this.#n)i(t)})}onDataProgressiveDone(){this.#t.promise.then(()=>{for(const t of this.#e)t()})}transportReady(){this.#t.resolve()}requestDataRange(t,i){ie("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}class _O{constructor(t,i){this._pdfInfo=t,this._transport=i}get annotationStorage(){return this._transport.annotationStorage}get canvasFactory(){return this._transport.canvasFactory}get filterFactory(){return this._transport.filterFactory}get numPages(){return this._pdfInfo.numPages}get fingerprints(){return this._pdfInfo.fingerprints}get isPureXfa(){return zt(this,"isPureXfa",!!this._transport._htmlForXfa)}get allXfaHtml(){return this._transport._htmlForXfa}getPage(t){return this._transport.getPage(t)}getPageIndex(t){return this._transport.getPageIndex(t)}getDestinations(){return this._transport.getDestinations()}getDestination(t){return this._transport.getDestination(t)}getPageLabels(){return this._transport.getPageLabels()}getPageLayout(){return this._transport.getPageLayout()}getPageMode(){return this._transport.getPageMode()}getViewerPreferences(){return this._transport.getViewerPreferences()}getOpenAction(){return this._transport.getOpenAction()}getAttachments(){return this._transport.getAttachments()}getJSActions(){return this._transport.getDocJSActions()}getOutline(){return this._transport.getOutline()}getOptionalContentConfig({intent:t="display"}={}){const{renderingIntent:i}=this._transport.getRenderingIntent(t);return this._transport.getOptionalContentConfig(i)}getPermissions(){return this._transport.getPermissions()}getMetadata(){return this._transport.getMetadata()}getMarkInfo(){return this._transport.getMarkInfo()}getData(){return this._transport.getData()}saveDocument(){return this._transport.saveDocument()}getDownloadInfo(){return this._transport.downloadInfoCapability.promise}cleanup(t=!1){return this._transport.startCleanup(t||this.isPureXfa)}destroy(){return this.loadingTask.destroy()}cachedPageNumber(t){return this._transport.cachedPageNumber(t)}get loadingParams(){return this._transport.loadingParams}get loadingTask(){return this._transport.loadingTask}getFieldObjects(){return this._transport.getFieldObjects()}hasJSActions(){return this._transport.hasJSActions()}getCalculationOrderIds(){return this._transport.getCalculationOrderIds()}}class TO{#t=!1;constructor(t,i,a,r=!1){this._pageIndex=t,this._pageInfo=i,this._transport=a,this._stats=r?new Qv:null,this._pdfBug=r,this.commonObjs=a.commonObjs,this.objs=new w0,this._intentStates=new Map,this.destroyed=!1}get pageNumber(){return this._pageIndex+1}get rotate(){return this._pageInfo.rotate}get ref(){return this._pageInfo.ref}get userUnit(){return this._pageInfo.userUnit}get view(){return this._pageInfo.view}getViewport({scale:t,rotation:i=this.rotate,offsetX:a=0,offsetY:r=0,dontFlip:c=!1}={}){return new Ko({viewBox:this.view,userUnit:this.userUnit,scale:t,rotation:i,offsetX:a,offsetY:r,dontFlip:c})}getAnnotations({intent:t="display"}={}){const{renderingIntent:i}=this._transport.getRenderingIntent(t);return this._transport.getAnnotations(this._pageIndex,i)}getJSActions(){return this._transport.getPageJSActions(this._pageIndex)}get filterFactory(){return this._transport.filterFactory}get isPureXfa(){return zt(this,"isPureXfa",!!this._transport._htmlForXfa)}async getXfa(){return this._transport._htmlForXfa?.children[this._pageIndex]||null}render({canvasContext:t,canvas:i=t.canvas,viewport:a,intent:r="display",annotationMode:c=Is.ENABLE,transform:u=null,background:h=null,optionalContentConfigPromise:p=null,annotationCanvasMap:m=null,pageColors:g=null,printAnnotationStorage:y=null,isEditing:b=!1}){this._stats?.time("Overall");const S=this._transport.getRenderingIntent(r,c,y,b),{renderingIntent:A,cacheKey:_}=S;this.#t=!1,p||=this._transport.getOptionalContentConfig(A);let R=this._intentStates.get(_);R||(R=Object.create(null),this._intentStates.set(_,R)),R.streamReaderCancelTimeout&&(clearTimeout(R.streamReaderCancelTimeout),R.streamReaderCancelTimeout=null);const x=!!(A&Ln.PRINT);R.displayReadyCapability||(R.displayReadyCapability=Promise.withResolvers(),R.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},this._stats?.time("Page Request"),this._pumpOperatorList(S));const L=I=>{R.renderTasks.delete(k),x&&(this.#t=!0),this.#e(),I?(k.capability.reject(I),this._abortOperatorList({intentState:R,reason:I instanceof Error?I:new Error(I)})):k.capability.resolve(),this._stats&&(this._stats.timeEnd("Rendering"),this._stats.timeEnd("Overall"),globalThis.Stats?.enabled&&globalThis.Stats.add(this.pageNumber,this._stats))},k=new Dr({callback:L,params:{canvas:i,canvasContext:t,viewport:a,transform:u,background:h},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:m,operatorList:R.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!x,pdfBug:this._pdfBug,pageColors:g,enableHWA:this._transport.enableHWA});(R.renderTasks||=new Set).add(k);const U=k.task;return Promise.all([R.displayReadyCapability.promise,p]).then(([I,j])=>{if(this.destroyed){L();return}if(this._stats?.time("Rendering"),!(j.renderingIntent&A))throw new Error("Must use the same `intent`-argument when calling the `PDFPageProxy.render` and `PDFDocumentProxy.getOptionalContentConfig` methods.");k.initializeGraphics({transparency:I,optionalContentConfig:j}),k.operatorListChanged()}).catch(L),U}getOperatorList({intent:t="display",annotationMode:i=Is.ENABLE,printAnnotationStorage:a=null,isEditing:r=!1}={}){function c(){h.operatorList.lastChunk&&(h.opListReadCapability.resolve(h.operatorList),h.renderTasks.delete(p))}const u=this._transport.getRenderingIntent(t,i,a,r,!0);let h=this._intentStates.get(u.cacheKey);h||(h=Object.create(null),this._intentStates.set(u.cacheKey,h));let p;return h.opListReadCapability||(p=Object.create(null),p.operatorListChanged=c,h.opListReadCapability=Promise.withResolvers(),(h.renderTasks||=new Set).add(p),h.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},this._stats?.time("Page Request"),this._pumpOperatorList(u)),h.opListReadCapability.promise}streamTextContent({includeMarkedContent:t=!1,disableNormalization:i=!1}={}){return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,includeMarkedContent:t===!0,disableNormalization:i===!0},{highWaterMark:100,size(r){return r.items.length}})}getTextContent(t={}){if(this._transport._htmlForXfa)return this.getXfa().then(a=>al.textContent(a));const i=this.streamTextContent(t);return new Promise(function(a,r){function c(){u.read().then(function({value:p,done:m}){if(m){a(h);return}h.lang??=p.lang,Object.assign(h.styles,p.styles),h.items.push(...p.items),c()},r)}const u=i.getReader(),h={items:[],styles:Object.create(null),lang:null};c()})}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;const t=[];for(const i of this._intentStates.values())if(this._abortOperatorList({intentState:i,reason:new Error("Page was destroyed."),force:!0}),!i.opListReadCapability)for(const a of i.renderTasks)t.push(a.completed),a.cancel();return this.objs.clear(),this.#t=!1,Promise.all(t)}cleanup(t=!1){this.#t=!0;const i=this.#e();return t&&i&&(this._stats&&=new Qv),i}#e(){if(!this.#t||this.destroyed)return!1;for(const{renderTasks:t,operatorList:i}of this._intentStates.values())if(t.size>0||!i.lastChunk)return!1;return this._intentStates.clear(),this.objs.clear(),this.#t=!1,!0}_startRenderPage(t,i){const a=this._intentStates.get(i);a&&(this._stats?.timeEnd("Page Request"),a.displayReadyCapability?.resolve(t))}_renderPageChunk(t,i){for(let a=0,r=t.length;a<r;a++)i.operatorList.fnArray.push(t.fnArray[a]),i.operatorList.argsArray.push(t.argsArray[a]);i.operatorList.lastChunk=t.lastChunk,i.operatorList.separateAnnots=t.separateAnnots;for(const a of i.renderTasks)a.operatorListChanged();t.lastChunk&&this.#e()}_pumpOperatorList({renderingIntent:t,cacheKey:i,annotationStorageSerializable:a,modifiedIds:r}){const{map:c,transfer:u}=a,p=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageIndex:this._pageIndex,intent:t,cacheKey:i,annotationStorage:c,modifiedIds:r},u).getReader(),m=this._intentStates.get(i);m.streamReader=p;const g=()=>{p.read().then(({value:y,done:b})=>{if(b){m.streamReader=null;return}this._transport.destroyed||(this._renderPageChunk(y,m),g())},y=>{if(m.streamReader=null,!this._transport.destroyed){if(m.operatorList){m.operatorList.lastChunk=!0;for(const b of m.renderTasks)b.operatorListChanged();this.#e()}if(m.displayReadyCapability)m.displayReadyCapability.reject(y);else if(m.opListReadCapability)m.opListReadCapability.reject(y);else throw y}})};g()}_abortOperatorList({intentState:t,reason:i,force:a=!1}){if(t.streamReader){if(t.streamReaderCancelTimeout&&(clearTimeout(t.streamReaderCancelTimeout),t.streamReaderCancelTimeout=null),!a){if(t.renderTasks.size>0)return;if(i instanceof Uf){let r=AO;i.extraDelay>0&&i.extraDelay<1e3&&(r+=i.extraDelay),t.streamReaderCancelTimeout=setTimeout(()=>{t.streamReaderCancelTimeout=null,this._abortOperatorList({intentState:t,reason:i,force:!0})},r);return}}if(t.streamReader.cancel(new Ps(i.message)).catch(()=>{}),t.streamReader=null,!this._transport.destroyed){for(const[r,c]of this._intentStates)if(c===t){this._intentStates.delete(r);break}this.cleanup()}}}get stats(){return this._stats}}const fe=class fe{constructor({name:t=null,port:i=null,verbosity:a=uM()}={}){Wi(this,fn);Wi(this,zs,Promise.withResolvers());Wi(this,pi,null);Wi(this,ns,null);Wi(this,Ca,null);if(this.name=t,this.destroyed=!1,this.verbosity=a,i){if(ge(fe,Da).has(i))throw new Error("Cannot use more than one PDFWorker per port.");ge(fe,Da).set(i,this),Qi(this,fn,Jw).call(this,i)}else Qi(this,fn,t1).call(this)}get promise(){return ge(this,zs).promise}get port(){return ge(this,ns)}get messageHandler(){return ge(this,pi)}destroy(){this.destroyed=!0,ge(this,Ca)?.terminate(),Nn(this,Ca,null),ge(fe,Da).delete(ge(this,ns)),Nn(this,ns,null),ge(this,pi)?.destroy(),Nn(this,pi,null)}static create(t){const i=ge(this,Da).get(t?.port);if(i){if(i._pendingDestroy)throw new Error("PDFWorker.create - the worker is being destroyed.\nPlease remember to await `PDFDocumentLoadingTask.destroy()`-calls.");return i}return new fe(t)}static get workerSrc(){if(Cr.workerSrc)return Cr.workerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get _setupFakeWorkerGlobal(){return zt(this,"_setupFakeWorkerGlobal",(async()=>ge(this,Or,kh)?ge(this,Or,kh):(await import(this.workerSrc)).WorkerMessageHandler)())}};zs=new WeakMap,pi=new WeakMap,ns=new WeakMap,Ca=new WeakMap,Lu=new WeakMap,Ra=new WeakMap,Da=new WeakMap,fn=new WeakSet,Oh=function(){ge(this,zs).resolve(),ge(this,pi).send("configure",{verbosity:this.verbosity})},Jw=function(t){Nn(this,ns,t),Nn(this,pi,new el("main","worker",t)),ge(this,pi).on("ready",()=>{}),Qi(this,fn,Oh).call(this)},t1=function(){if(ge(fe,Ra)||ge(fe,Or,kh)){Qi(this,fn,zc).call(this);return}let{workerSrc:t}=fe;try{fe._isSameOrigin(window.location,t)||(t=fe._createCDNWrapper(new URL(t,window.location).href));const i=new Worker(t,{type:"module"}),a=new el("main","worker",i),r=()=>{c.abort(),a.destroy(),i.terminate(),this.destroyed?ge(this,zs).reject(new Error("Worker was destroyed")):Qi(this,fn,zc).call(this)},c=new AbortController;i.addEventListener("error",()=>{ge(this,Ca)||r()},{signal:c.signal}),a.on("test",h=>{if(c.abort(),this.destroyed||!h){r();return}Nn(this,pi,a),Nn(this,ns,i),Nn(this,Ca,i),Qi(this,fn,Oh).call(this)}),a.on("ready",h=>{if(c.abort(),this.destroyed){r();return}try{u()}catch{Qi(this,fn,zc).call(this)}});const u=()=>{const h=new Uint8Array;a.send("test",h,[h.buffer])};u();return}catch{bu("The worker has been disabled.")}Qi(this,fn,zc).call(this)},zc=function(){ge(fe,Ra)||(xt("Setting up fake worker."),Nn(fe,Ra,!0)),fe._setupFakeWorkerGlobal.then(t=>{if(this.destroyed){ge(this,zs).reject(new Error("Worker was destroyed"));return}const i=new IM;Nn(this,ns,i);const a=`fake${Zw(fe,Lu)._++}`,r=new el(a+"_worker",a,i);t.setup(r,i),Nn(this,pi,new el(a,a+"_worker",i)),Qi(this,fn,Oh).call(this)}).catch(t=>{ge(this,zs).reject(new Error(`Setting up fake worker failed: "${t.message}".`))})},Or=new WeakSet,kh=function(){try{return globalThis.pdfjsWorker?.WorkerMessageHandler||null}catch{return null}},Wi(fe,Or),Wi(fe,Lu,0),Wi(fe,Ra,!1),Wi(fe,Da,new WeakMap),un&&(Nn(fe,Ra,!0),Cr.workerSrc||="./pdf.worker.mjs"),fe._isSameOrigin=(t,i)=>{const a=URL.parse(t);if(!a?.origin||a.origin==="null")return!1;const r=new URL(i,a);return a.origin===r.origin},fe._createCDNWrapper=t=>{const i=`await import("${t}");`;return URL.createObjectURL(new Blob([i],{type:"text/javascript"}))},fe.fromPort=t=>{if(AM("`PDFWorker.fromPort` - please use `PDFWorker.create` instead."),!t?.port)throw new Error("PDFWorker.fromPort - invalid method signature.");return fe.create(t)};let rl=fe;class wO{#t=new Map;#e=new Map;#n=new Map;#i=new Map;#a=null;constructor(t,i,a,r,c,u){this.messageHandler=t,this.loadingTask=i,this.commonObjs=new w0,this.fontLoader=new DM({ownerDocument:r.ownerDocument,styleElement:r.styleElement}),this.loadingParams=r.loadingParams,this._params=r,this.canvasFactory=c.canvasFactory,this.filterFactory=c.filterFactory,this.cMapReaderFactory=c.cMapReaderFactory,this.standardFontDataFactory=c.standardFontDataFactory,this.wasmFactory=c.wasmFactory,this.destroyed=!1,this.destroyCapability=null,this._networkStream=a,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=Promise.withResolvers(),this.enableHWA=u,this.setupMessageHandler()}#s(t,i=null){const a=this.#t.get(t);if(a)return a;const r=this.messageHandler.sendWithPromise(t,i);return this.#t.set(t,r),r}get annotationStorage(){return zt(this,"annotationStorage",new Gf)}getRenderingIntent(t,i=Is.ENABLE,a=null,r=!1,c=!1){let u=Ln.DISPLAY,h=$f;switch(t){case"any":u=Ln.ANY;break;case"display":break;case"print":u=Ln.PRINT;break;default:xt(`getRenderingIntent - invalid intent: ${t}`)}const p=u&Ln.PRINT&&a instanceof t0?a:this.annotationStorage;switch(i){case Is.DISABLE:u+=Ln.ANNOTATIONS_DISABLE;break;case Is.ENABLE:break;case Is.ENABLE_FORMS:u+=Ln.ANNOTATIONS_FORMS;break;case Is.ENABLE_STORAGE:u+=Ln.ANNOTATIONS_STORAGE,h=p.serializable;break;default:xt(`getRenderingIntent - invalid annotationMode: ${i}`)}r&&(u+=Ln.IS_EDITING),c&&(u+=Ln.OPLIST);const{ids:m,hash:g}=p.modifiedIds,y=[u,h.hash,g];return{renderingIntent:u,cacheKey:y.join("_"),annotationStorageSerializable:h,modifiedIds:m}}destroy(){if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=Promise.withResolvers(),this.#a?.reject(new Error("Worker was destroyed during onPassword callback"));const t=[];for(const a of this.#e.values())t.push(a._destroy());this.#e.clear(),this.#n.clear(),this.#i.clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();const i=this.messageHandler.sendWithPromise("Terminate",null);return t.push(i),Promise.all(t).then(()=>{this.commonObjs.clear(),this.fontLoader.clear(),this.#t.clear(),this.filterFactory.destroy(),hn.cleanup(),this._networkStream?.cancelAllRequests(new Ps("Worker was terminated.")),this.messageHandler?.destroy(),this.messageHandler=null,this.destroyCapability.resolve()},this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){const{messageHandler:t,loadingTask:i}=this;t.on("GetReader",(a,r)=>{Me(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=c=>{this._lastProgress={loaded:c.loaded,total:c.total}},r.onPull=()=>{this._fullReader.read().then(function({value:c,done:u}){if(u){r.close();return}Me(c instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),r.enqueue(new Uint8Array(c),1,[c])}).catch(c=>{r.error(c)})},r.onCancel=c=>{this._fullReader.cancel(c),r.ready.catch(u=>{if(!this.destroyed)throw u})}}),t.on("ReaderHeadersReady",async a=>{await this._fullReader.headersReady;const{isStreamingSupported:r,isRangeSupported:c,contentLength:u}=this._fullReader;return(!r||!c)&&(this._lastProgress&&i.onProgress?.(this._lastProgress),this._fullReader.onProgress=h=>{i.onProgress?.({loaded:h.loaded,total:h.total})}),{isStreamingSupported:r,isRangeSupported:c,contentLength:u}}),t.on("GetRangeReader",(a,r)=>{Me(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");const c=this._networkStream.getRangeReader(a.begin,a.end);if(!c){r.close();return}r.onPull=()=>{c.read().then(function({value:u,done:h}){if(h){r.close();return}Me(u instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),r.enqueue(new Uint8Array(u),1,[u])}).catch(u=>{r.error(u)})},r.onCancel=u=>{c.cancel(u),r.ready.catch(h=>{if(!this.destroyed)throw h})}}),t.on("GetDoc",({pdfInfo:a})=>{this._numPages=a.numPages,this._htmlForXfa=a.htmlForXfa,delete a.htmlForXfa,i._capability.resolve(new _O(a,this))}),t.on("DocException",a=>{i._capability.reject(An(a))}),t.on("PasswordRequest",a=>{this.#a=Promise.withResolvers();try{if(!i.onPassword)throw An(a);const r=c=>{c instanceof Error?this.#a.reject(c):this.#a.resolve({password:c})};i.onPassword(r,a.code)}catch(r){this.#a.reject(r)}return this.#a.promise}),t.on("DataLoaded",a=>{i.onProgress?.({loaded:a.length,total:a.length}),this.downloadInfoCapability.resolve(a)}),t.on("StartRenderPage",a=>{if(this.destroyed)return;this.#e.get(a.pageIndex)._startRenderPage(a.transparency,a.cacheKey)}),t.on("commonobj",([a,r,c])=>{if(this.destroyed||this.commonObjs.has(a))return null;switch(r){case"Font":if("error"in c){const m=c.error;xt(`Error during font loading: ${m}`),this.commonObjs.resolve(a,m);break}const u=this._params.pdfBug&&globalThis.FontInspector?.enabled?(m,g)=>globalThis.FontInspector.fontAdded(m,g):null,h=new MM(c,u);this.fontLoader.bind(h).catch(()=>t.sendWithPromise("FontFallback",{id:a})).finally(()=>{!h.fontExtraProperties&&h.data&&(h.data=null),this.commonObjs.resolve(a,h)});break;case"CopyLocalImage":const{imageRef:p}=c;Me(p,"The imageRef must be defined.");for(const m of this.#e.values())for(const[,g]of m.objs)if(g?.ref===p)return g.dataLen?(this.commonObjs.resolve(a,structuredClone(g)),g.dataLen):null;break;case"FontPath":case"Image":case"Pattern":this.commonObjs.resolve(a,c);break;default:throw new Error(`Got unknown common object type ${r}`)}return null}),t.on("obj",([a,r,c,u])=>{if(this.destroyed)return;const h=this.#e.get(r);if(!h.objs.has(a)){if(h._intentStates.size===0){u?.bitmap?.close();return}switch(c){case"Image":case"Pattern":h.objs.resolve(a,u);break;default:throw new Error(`Got unknown object type ${c}`)}}}),t.on("DocProgress",a=>{this.destroyed||i.onProgress?.({loaded:a.loaded,total:a.total})}),t.on("FetchBinaryData",async a=>{if(this.destroyed)throw new Error("Worker was destroyed.");const r=this[a.type];if(!r)throw new Error(`${a.type} not initialized, see the \`useWorkerFetch\` parameter.`);return r.fetch(a)})}getData(){return this.messageHandler.sendWithPromise("GetData",null)}saveDocument(){this.annotationStorage.size<=0&&xt("saveDocument called while `annotationStorage` is empty, please use the getData-method instead.");const{map:t,transfer:i}=this.annotationStorage.serializable;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:t,filename:this._fullReader?.filename??null},i).finally(()=>{this.annotationStorage.resetModified()})}getPage(t){if(!Number.isInteger(t)||t<=0||t>this._numPages)return Promise.reject(new Error("Invalid page request."));const i=t-1,a=this.#n.get(i);if(a)return a;const r=this.messageHandler.sendWithPromise("GetPage",{pageIndex:i}).then(c=>{if(this.destroyed)throw new Error("Transport destroyed");c.refStr&&this.#i.set(c.refStr,t);const u=new TO(i,c,this,this._params.pdfBug);return this.#e.set(i,u),u});return this.#n.set(i,r),r}getPageIndex(t){return Vf(t)?this.messageHandler.sendWithPromise("GetPageIndex",{num:t.num,gen:t.gen}):Promise.reject(new Error("Invalid pageIndex request."))}getAnnotations(t,i){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:t,intent:i})}getFieldObjects(){return this.#s("GetFieldObjects")}hasJSActions(){return this.#s("HasJSActions")}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(t){return typeof t!="string"?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:t})}getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}getPageLayout(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}getDocJSActions(){return this.#s("GetDocJSActions")}getPageJSActions(t){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:t})}getStructTree(t){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:t})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(t){return this.#s("GetOptionalContentConfig").then(i=>new iO(i,t))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){const t="GetMetadata",i=this.#t.get(t);if(i)return i;const a=this.messageHandler.sendWithPromise(t,null).then(r=>({info:r[0],metadata:r[1]?new eO(r[1]):null,contentDispositionFilename:this._fullReader?.filename??null,contentLength:this._fullReader?.contentLength??null}));return this.#t.set(t,a),a}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}async startCleanup(t=!1){if(!this.destroyed){await this.messageHandler.sendWithPromise("Cleanup",null);for(const i of this.#e.values())if(!i.cleanup())throw new Error(`startCleanup: Page ${i.pageNumber} is currently rendering.`);this.commonObjs.clear(),t||this.fontLoader.clear(),this.#t.clear(),this.filterFactory.destroy(!0),hn.cleanup()}}cachedPageNumber(t){if(!Vf(t))return null;const i=t.gen===0?`${t.num}R`:`${t.num}R${t.gen}`;return this.#i.get(i)??null}}class xO{#t=null;onContinue=null;onError=null;constructor(t){this.#t=t}get promise(){return this.#t.capability.promise}cancel(t=0){this.#t.cancel(null,t)}get separateAnnots(){const{separateAnnots:t}=this.#t.operatorList;if(!t)return!1;const{annotationCanvasMap:i}=this.#t;return t.form||t.canvas&&i?.size>0}}class Dr{#t=null;static#e=new WeakSet;constructor({callback:t,params:i,objs:a,commonObjs:r,annotationCanvasMap:c,operatorList:u,pageIndex:h,canvasFactory:p,filterFactory:m,useRequestAnimationFrame:g=!1,pdfBug:y=!1,pageColors:b=null,enableHWA:S=!1}){this.callback=t,this.params=i,this.objs=a,this.commonObjs=r,this.annotationCanvasMap=c,this.operatorListIdx=null,this.operatorList=u,this._pageIndex=h,this.canvasFactory=p,this.filterFactory=m,this._pdfBug=y,this.pageColors=b,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=g===!0&&typeof window<"u",this.cancelled=!1,this.capability=Promise.withResolvers(),this.task=new xO(this),this._cancelBound=this.cancel.bind(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=i.canvas,this._canvasContext=i.canvas?null:i.canvasContext,this._enableHWA=S}get completed(){return this.capability.promise.catch(function(){})}initializeGraphics({transparency:t=!1,optionalContentConfig:i}){if(this.cancelled)return;if(this._canvas){if(Dr.#e.has(this._canvas))throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");Dr.#e.add(this._canvas)}this._pdfBug&&globalThis.StepperManager?.enabled&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());const{viewport:a,transform:r,background:c}=this.params,u=this._canvasContext||this._canvas.getContext("2d",{alpha:!1,willReadFrequently:!this._enableHWA});this.gfx=new xr(u,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:i},this.annotationCanvasMap,this.pageColors),this.gfx.beginDrawing({transform:r,viewport:a,transparency:t,background:c}),this.operatorListIdx=0,this.graphicsReady=!0,this.graphicsReadyCallback?.()}cancel(t=null,i=0){this.running=!1,this.cancelled=!0,this.gfx?.endDrawing(),this.#t&&(window.cancelAnimationFrame(this.#t),this.#t=null),Dr.#e.delete(this._canvas),t||=new Uf(`Rendering cancelled, page ${this._pageIndex+1}`,i),this.callback(t),this.task.onError?.(t)}operatorListChanged(){if(!this.graphicsReady){this.graphicsReadyCallback||=this._continueBound;return}this.stepper?.updateOperatorList(this.operatorList),!this.running&&this._continue()}_continue(){this.running=!0,!this.cancelled&&(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}_scheduleNext(){this._useRequestAnimationFrame?this.#t=window.requestAnimationFrame(()=>{this.#t=null,this._nextBound().catch(this._cancelBound)}):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}async _next(){this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),Dr.#e.delete(this._canvas),this.callback())))}}const CO="5.4.54",RO="295fb3ec4";class Wn{#t=null;#e=null;#n;#i=null;#a=!1;#s=!1;#r=null;#o;#u=null;#c=null;static#h=null;static get _keyboardManager(){return zt(this,"_keyboardManager",new tl([[["Escape","mac+Escape"],Wn.prototype._hideDropdownFromKeyboard],[[" ","mac+ "],Wn.prototype._colorSelectFromKeyboard],[["ArrowDown","ArrowRight","mac+ArrowDown","mac+ArrowRight"],Wn.prototype._moveToNext],[["ArrowUp","ArrowLeft","mac+ArrowUp","mac+ArrowLeft"],Wn.prototype._moveToPrevious],[["Home","mac+Home"],Wn.prototype._moveToBeginning],[["End","mac+End"],Wn.prototype._moveToEnd]]))}constructor({editor:t=null,uiManager:i=null}){t?(this.#s=!1,this.#r=t):this.#s=!0,this.#c=t?._uiManager||i,this.#o=this.#c._eventBus,this.#n=t?.color?.toUpperCase()||this.#c?.highlightColors.values().next().value||"#FFFF98",Wn.#h||=Object.freeze({blue:"pdfjs-editor-colorpicker-blue",green:"pdfjs-editor-colorpicker-green",pink:"pdfjs-editor-colorpicker-pink",red:"pdfjs-editor-colorpicker-red",yellow:"pdfjs-editor-colorpicker-yellow"})}renderButton(){const t=this.#t=document.createElement("button");t.className="colorPicker",t.tabIndex="0",t.setAttribute("data-l10n-id","pdfjs-editor-colorpicker-button"),t.ariaHasPopup="true",this.#r&&(t.ariaControls=`${this.#r.id}_colorpicker_dropdown`);const i=this.#c._signal;t.addEventListener("click",this.#f.bind(this),{signal:i}),t.addEventListener("keydown",this.#g.bind(this),{signal:i});const a=this.#e=document.createElement("span");return a.className="swatch",a.ariaHidden="true",a.style.backgroundColor=this.#n,t.append(a),t}renderMainDropdown(){const t=this.#i=this.#l();return t.ariaOrientation="horizontal",t.ariaLabelledBy="highlightColorPickerLabel",t}#l(){const t=document.createElement("div"),i=this.#c._signal;t.addEventListener("contextmenu",Xn,{signal:i}),t.className="dropdown",t.role="listbox",t.ariaMultiSelectable="false",t.ariaOrientation="vertical",t.setAttribute("data-l10n-id","pdfjs-editor-colorpicker-dropdown"),this.#r&&(t.id=`${this.#r.id}_colorpicker_dropdown`);for(const[a,r]of this.#c.highlightColors){const c=document.createElement("button");c.tabIndex="0",c.role="option",c.setAttribute("data-color",r),c.title=a,c.setAttribute("data-l10n-id",Wn.#h[a]);const u=document.createElement("span");c.append(u),u.className="swatch",u.style.backgroundColor=r,c.ariaSelected=r===this.#n,c.addEventListener("click",this.#p.bind(this,r),{signal:i}),t.append(c)}return t.addEventListener("keydown",this.#g.bind(this),{signal:i}),t}#p(t,i){i.stopPropagation(),this.#o.dispatch("switchannotationeditorparams",{source:this,type:$t.HIGHLIGHT_COLOR,value:t}),this.updateColor(t)}_colorSelectFromKeyboard(t){if(t.target===this.#t){this.#f(t);return}const i=t.target.getAttribute("data-color");i&&this.#p(i,t)}_moveToNext(t){if(!this.#m){this.#f(t);return}if(t.target===this.#t){this.#i.firstChild?.focus();return}t.target.nextSibling?.focus()}_moveToPrevious(t){if(t.target===this.#i?.firstChild||t.target===this.#t){this.#m&&this._hideDropdownFromKeyboard();return}this.#m||this.#f(t),t.target.previousSibling?.focus()}_moveToBeginning(t){if(!this.#m){this.#f(t);return}this.#i.firstChild?.focus()}_moveToEnd(t){if(!this.#m){this.#f(t);return}this.#i.lastChild?.focus()}#g(t){Wn._keyboardManager.exec(this,t)}#f(t){if(this.#m){this.hideDropdown();return}if(this.#a=t.detail===0,this.#u||(this.#u=new AbortController,window.addEventListener("pointerdown",this.#d.bind(this),{signal:this.#c.combinedSignal(this.#u)})),this.#t.ariaExpanded="true",this.#i){this.#i.classList.remove("hidden");return}const i=this.#i=this.#l();this.#t.append(i)}#d(t){this.#i?.contains(t.target)||this.hideDropdown()}hideDropdown(){this.#i?.classList.add("hidden"),this.#t.ariaExpanded="false",this.#u?.abort(),this.#u=null}get#m(){return this.#i&&!this.#i.classList.contains("hidden")}_hideDropdownFromKeyboard(){if(!this.#s){if(!this.#m){this.#r?.unselect();return}this.hideDropdown(),this.#t.focus({preventScroll:!0,focusVisible:this.#a})}}updateColor(t){if(this.#e&&(this.#e.style.backgroundColor=t),!this.#i)return;const i=this.#c.highlightColors.values();for(const a of this.#i.children)a.ariaSelected=i.next().value===t.toUpperCase()}destroy(){this.#t?.remove(),this.#t=null,this.#e=null,this.#i?.remove(),this.#i=null}}class ol{#t=null;#e=null;#n=null;static#i=null;constructor(t){this.#e=t,this.#n=t._uiManager,ol.#i||=Object.freeze({freetext:"pdfjs-editor-color-picker-free-text-input",ink:"pdfjs-editor-color-picker-ink-input"})}renderButton(){if(this.#t)return this.#t;const{editorType:t,colorType:i,colorValue:a}=this.#e,r=this.#t=document.createElement("input");return r.type="color",r.value=a||"#000000",r.className="basicColorPicker",r.tabIndex=0,r.setAttribute("data-l10n-id",ol.#i[t]),r.addEventListener("input",()=>{this.#n.updateParams(i,r.value)},{signal:this.#n._signal}),r}update(t){this.#t&&(this.#t.value=t)}destroy(){this.#t?.remove(),this.#t=null}hideDropdown(){}}function D0(l){return Math.floor(Math.max(0,Math.min(1,l))*255).toString(16).padStart(2,"0")}function ll(l){return Math.max(0,Math.min(255,255*l))}class M0{static CMYK_G([t,i,a,r]){return["G",1-Math.min(1,.3*t+.59*a+.11*i+r)]}static G_CMYK([t]){return["CMYK",0,0,0,1-t]}static G_RGB([t]){return["RGB",t,t,t]}static G_rgb([t]){return t=ll(t),[t,t,t]}static G_HTML([t]){const i=D0(t);return`#${i}${i}${i}`}static RGB_G([t,i,a]){return["G",.3*t+.59*i+.11*a]}static RGB_rgb(t){return t.map(ll)}static RGB_HTML(t){return`#${t.map(D0).join("")}`}static T_HTML(){return"#00000000"}static T_rgb(){return[null]}static CMYK_RGB([t,i,a,r]){return["RGB",1-Math.min(1,t+r),1-Math.min(1,a+r),1-Math.min(1,i+r)]}static CMYK_rgb([t,i,a,r]){return[ll(1-Math.min(1,t+r)),ll(1-Math.min(1,a+r)),ll(1-Math.min(1,i+r))]}static CMYK_HTML(t){const i=this.CMYK_RGB(t).slice(1);return this.RGB_HTML(i)}static RGB_CMYK([t,i,a]){const r=1-t,c=1-i,u=1-a,h=Math.min(r,c,u);return["CMYK",r,c,u,h]}}class DO{create(t,i,a=!1){if(t<=0||i<=0)throw new Error("Invalid SVG dimensions");const r=this._createSVG("svg:svg");return r.setAttribute("version","1.1"),a||(r.setAttribute("width",`${t}px`),r.setAttribute("height",`${i}px`)),r.setAttribute("preserveAspectRatio","none"),r.setAttribute("viewBox",`0 0 ${t} ${i}`),r}createElement(t){if(typeof t!="string")throw new Error("Invalid SVG element type");return this._createSVG(t)}_createSVG(t){ie("Abstract method `_createSVG` called.")}}class Du extends DO{_createSVG(t){return document.createElementNS(ts,t)}}class O0{static setupStorage(t,i,a,r,c){const u=r.getValue(i,{value:null});switch(a.name){case"textarea":if(u.value!==null&&(t.textContent=u.value),c==="print")break;t.addEventListener("input",h=>{r.setValue(i,{value:h.target.value})});break;case"input":if(a.attributes.type==="radio"||a.attributes.type==="checkbox"){if(u.value===a.attributes.xfaOn?t.setAttribute("checked",!0):u.value===a.attributes.xfaOff&&t.removeAttribute("checked"),c==="print")break;t.addEventListener("change",h=>{r.setValue(i,{value:h.target.checked?h.target.getAttribute("xfaOn"):h.target.getAttribute("xfaOff")})})}else{if(u.value!==null&&t.setAttribute("value",u.value),c==="print")break;t.addEventListener("input",h=>{r.setValue(i,{value:h.target.value})})}break;case"select":if(u.value!==null){t.setAttribute("value",u.value);for(const h of a.children)h.attributes.value===u.value?h.attributes.selected=!0:h.attributes.hasOwnProperty("selected")&&delete h.attributes.selected}t.addEventListener("input",h=>{const p=h.target.options,m=p.selectedIndex===-1?"":p[p.selectedIndex].value;r.setValue(i,{value:m})});break}}static setAttributes({html:t,element:i,storage:a=null,intent:r,linkService:c}){const{attributes:u}=i,h=t instanceof HTMLAnchorElement;u.type==="radio"&&(u.name=`${u.name}-${r}`);for(const[p,m]of Object.entries(u))if(m!=null)switch(p){case"class":m.length&&t.setAttribute(p,m.join(" "));break;case"dataId":break;case"id":t.setAttribute("data-element-id",m);break;case"style":Object.assign(t.style,m);break;case"textContent":t.textContent=m;break;default:(!h||p!=="href"&&p!=="newWindow")&&t.setAttribute(p,m)}h&&c.addLinkAttributes(t,u.href,u.newWindow),a&&u.dataId&&this.setupStorage(t,u.dataId,i,a)}static render(t){const i=t.annotationStorage,a=t.linkService,r=t.xfaHtml,c=t.intent||"display",u=document.createElement(r.name);r.attributes&&this.setAttributes({html:u,element:r,intent:c,linkService:a});const h=c!=="richText",p=t.div;if(p.append(u),t.viewport){const y=`matrix(${t.viewport.transform.join(",")})`;p.style.transform=y}h&&p.setAttribute("class","xfaLayer xfaFont");const m=[];if(r.children.length===0){if(r.value){const y=document.createTextNode(r.value);u.append(y),h&&al.shouldBuildText(r.name)&&m.push(y)}return{textDivs:m}}const g=[[r,-1,u]];for(;g.length>0;){const[y,b,S]=g.at(-1);if(b+1===y.children.length){g.pop();continue}const A=y.children[++g.at(-1)[1]];if(A===null)continue;const{name:_}=A;if(_==="#text"){const x=document.createTextNode(A.value);m.push(x),S.append(x);continue}const R=A?.attributes?.xmlns?document.createElementNS(A.attributes.xmlns,_):document.createElement(_);if(S.append(R),A.attributes&&this.setAttributes({html:R,element:A,storage:i,intent:c,linkService:a}),A.children?.length>0)g.push([A,-1,R]);else if(A.value){const x=document.createTextNode(A.value);h&&al.shouldBuildText(_)&&m.push(x),R.append(x)}}for(const y of p.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))y.setAttribute("readOnly",!0);return{textDivs:m}}static update(t){const i=`matrix(${t.viewport.transform.join(",")})`;t.div.style.transform=i,t.div.hidden=!1}}const MO=9,Ta=new WeakSet,OO=new Date().getTimezoneOffset()*60*1e3;class k0{static create(t){switch(t.data.annotationType){case De.LINK:return new ep(t);case De.TEXT:return new kO(t);case De.WIDGET:switch(t.data.fieldType){case"Tx":return new NO(t);case"Btn":return t.data.radioButton?new N0(t):t.data.checkBox?new IO(t):new PO(t);case"Ch":return new UO(t);case"Sig":return new LO(t)}return new wa(t);case De.POPUP:return new np(t);case De.FREETEXT:return new L0(t);case De.LINE:return new HO(t);case De.SQUARE:return new BO(t);case De.CIRCLE:return new FO(t);case De.POLYLINE:return new I0(t);case De.CARET:return new $O(t);case De.INK:return new ip(t);case De.POLYGON:return new jO(t);case De.HIGHLIGHT:return new P0(t);case De.UNDERLINE:return new GO(t);case De.SQUIGGLY:return new VO(t);case De.STRIKEOUT:return new qO(t);case De.STAMP:return new U0(t);case De.FILEATTACHMENT:return new XO(t);default:return new _e(t)}}}class _e{#t=null;#e=!1;#n=null;constructor(t,{isRenderable:i=!1,ignoreBorder:a=!1,createQuadrilaterals:r=!1}={}){this.isRenderable=i,this.data=t.data,this.layer=t.layer,this.linkService=t.linkService,this.downloadManager=t.downloadManager,this.imageResourcesPath=t.imageResourcesPath,this.renderForms=t.renderForms,this.svgFactory=t.svgFactory,this.annotationStorage=t.annotationStorage,this.enableScripting=t.enableScripting,this.hasJSActions=t.hasJSActions,this._fieldObjects=t.fieldObjects,this.parent=t.parent,i&&(this.container=this._createContainer(a)),r&&this._createQuadrilaterals()}static _hasPopupData({contentsObj:t,richText:i}){return!!(t?.str||i?.str)}get _isEditable(){return this.data.isEditable}get hasPopupData(){return _e._hasPopupData(this.data)}updateEdited(t){if(!this.container)return;t.rect&&(this.#t||={rect:this.data.rect.slice(0)});const{rect:i,popup:a}=t;i&&this.#i(i);let r=this.#n?.popup||this.popup;!r&&a?.text&&(this._createPopup(a),r=this.#n.popup),r&&(r.updateEdited(t),a?.deleted&&(r.remove(),this.#n=null,this.popup=null))}resetEdited(){this.#t&&(this.#i(this.#t.rect),this.#n?.popup.resetEdited(),this.#t=null)}#i(t){const{container:{style:i},data:{rect:a,rotation:r},parent:{viewport:{rawDims:{pageWidth:c,pageHeight:u,pageX:h,pageY:p}}}}=this;a?.splice(0,4,...t),i.left=`${100*(t[0]-h)/c}%`,i.top=`${100*(u-t[3]+p)/u}%`,r===0?(i.width=`${100*(t[2]-t[0])/c}%`,i.height=`${100*(t[3]-t[1])/u}%`):this.setRotation(r)}_createContainer(t){const{data:i,parent:{page:a,viewport:r}}=this,c=document.createElement("section");c.setAttribute("data-annotation-id",i.id),!(this instanceof wa)&&!(this instanceof ep)&&(c.tabIndex=0);const{style:u}=c;if(u.zIndex=this.parent.zIndex++,i.alternativeText&&(c.title=i.alternativeText),i.noRotate&&c.classList.add("norotate"),!i.rect||this instanceof np){const{rotation:_}=i;return!i.hasOwnCanvas&&_!==0&&this.setRotation(_,c),c}const{width:h,height:p}=this;if(!t&&i.borderStyle.width>0){u.borderWidth=`${i.borderStyle.width}px`;const _=i.borderStyle.horizontalCornerRadius,R=i.borderStyle.verticalCornerRadius;if(_>0||R>0){const L=`calc(${_}px * var(--total-scale-factor)) / calc(${R}px * var(--total-scale-factor))`;u.borderRadius=L}else if(this instanceof N0){const L=`calc(${h}px * var(--total-scale-factor)) / calc(${p}px * var(--total-scale-factor))`;u.borderRadius=L}switch(i.borderStyle.style){case _r.SOLID:u.borderStyle="solid";break;case _r.DASHED:u.borderStyle="dashed";break;case _r.BEVELED:xt("Unimplemented border style: beveled");break;case _r.INSET:xt("Unimplemented border style: inset");break;case _r.UNDERLINE:u.borderBottomStyle="solid";break}const x=i.borderColor||null;x?(this.#e=!0,u.borderColor=mt.makeHexColor(x[0]|0,x[1]|0,x[2]|0)):u.borderWidth=0}const m=mt.normalizeRect([i.rect[0],a.view[3]-i.rect[1]+a.view[1],i.rect[2],a.view[3]-i.rect[3]+a.view[1]]),{pageWidth:g,pageHeight:y,pageX:b,pageY:S}=r.rawDims;u.left=`${100*(m[0]-b)/g}%`,u.top=`${100*(m[1]-S)/y}%`;const{rotation:A}=i;return i.hasOwnCanvas||A===0?(u.width=`${100*h/g}%`,u.height=`${100*p/y}%`):this.setRotation(A,c),c}setRotation(t,i=this.container){if(!this.data.rect)return;const{pageWidth:a,pageHeight:r}=this.parent.viewport.rawDims;let{width:c,height:u}=this;t%180!==0&&([c,u]=[u,c]),i.style.width=`${100*c/a}%`,i.style.height=`${100*u/r}%`,i.setAttribute("data-main-rotation",(360-t)%360)}get _commonActions(){const t=(i,a,r)=>{const c=r.detail[i],u=c[0],h=c.slice(1);r.target.style[a]=M0[`${u}_HTML`](h),this.annotationStorage.setValue(this.data.id,{[a]:M0[`${u}_rgb`](h)})};return zt(this,"_commonActions",{display:i=>{const{display:a}=i.detail,r=a%2===1;this.container.style.visibility=r?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noView:r,noPrint:a===1||a===2})},print:i=>{this.annotationStorage.setValue(this.data.id,{noPrint:!i.detail.print})},hidden:i=>{const{hidden:a}=i.detail;this.container.style.visibility=a?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noPrint:a,noView:a})},focus:i=>{setTimeout(()=>i.target.focus({preventScroll:!1}),0)},userName:i=>{i.target.title=i.detail.userName},readonly:i=>{i.target.disabled=i.detail.readonly},required:i=>{this._setRequired(i.target,i.detail.required)},bgColor:i=>{t("bgColor","backgroundColor",i)},fillColor:i=>{t("fillColor","backgroundColor",i)},fgColor:i=>{t("fgColor","color",i)},textColor:i=>{t("textColor","color",i)},borderColor:i=>{t("borderColor","borderColor",i)},strokeColor:i=>{t("strokeColor","borderColor",i)},rotation:i=>{const a=i.detail.rotation;this.setRotation(a),this.annotationStorage.setValue(this.data.id,{rotation:a})}})}_dispatchEventFromSandbox(t,i){const a=this._commonActions;for(const r of Object.keys(i.detail))(t[r]||a[r])?.(i)}_setDefaultPropertiesFromJS(t){if(!this.enableScripting)return;const i=this.annotationStorage.getRawValue(this.data.id);if(!i)return;const a=this._commonActions;for(const[r,c]of Object.entries(i)){const u=a[r];if(u){const h={detail:{[r]:c},target:t};u(h),delete i[r]}}}_createQuadrilaterals(){if(!this.container)return;const{quadPoints:t}=this.data;if(!t)return;const[i,a,r,c]=this.data.rect.map(_=>Math.fround(_));if(t.length===8){const[_,R,x,L]=t.subarray(2,6);if(r===_&&c===R&&i===x&&a===L)return}const{style:u}=this.container;let h;if(this.#e){const{borderColor:_,borderWidth:R}=u;u.borderWidth=0,h=["url('data:image/svg+xml;utf8,",'<svg xmlns="http://www.w3.org/2000/svg"',' preserveAspectRatio="none" viewBox="0 0 1 1">',`<g fill="transparent" stroke="${_}" stroke-width="${R}">`],this.container.classList.add("hasBorder")}const p=r-i,m=c-a,{svgFactory:g}=this,y=g.createElement("svg");y.classList.add("quadrilateralsContainer"),y.setAttribute("width",0),y.setAttribute("height",0),y.role="none";const b=g.createElement("defs");y.append(b);const S=g.createElement("clipPath"),A=`clippath_${this.data.id}`;S.setAttribute("id",A),S.setAttribute("clipPathUnits","objectBoundingBox"),b.append(S);for(let _=2,R=t.length;_<R;_+=8){const x=t[_],L=t[_+1],k=t[_+2],U=t[_+3],I=g.createElement("rect"),j=(k-i)/p,F=(c-L)/m,J=(x-k)/p,Y=(L-U)/m;I.setAttribute("x",j),I.setAttribute("y",F),I.setAttribute("width",J),I.setAttribute("height",Y),S.append(I),h?.push(`<rect vector-effect="non-scaling-stroke" x="${j}" y="${F}" width="${J}" height="${Y}"/>`)}this.#e&&(h.push("</g></svg>')"),u.backgroundImage=h.join("")),this.container.append(y),this.container.style.clipPath=`url(#${A})`}_createPopup(t=null){const{data:i}=this;let a,r;t?(a={str:t.text},r=t.date):(a=i.contentsObj,r=i.modificationDate);const c=this.#n=new np({data:{color:i.color,titleObj:i.titleObj,modificationDate:r,contentsObj:a,richText:i.richText,parentRect:i.rect,borderStyle:0,id:`popup_${i.id}`,rotation:i.rotation,noRotate:!0},linkService:this.linkService,parent:this.parent,elements:[this]});this.parent.div.append(c.render())}get hasPopupElement(){return!!(this.#n||this.popup||this.data.popupRef)}render(){ie("Abstract method `AnnotationElement.render` called")}_getElementsByName(t,i=null){const a=[];if(this._fieldObjects){const r=this._fieldObjects[t];if(r)for(const{page:c,id:u,exportValues:h}of r){if(c===-1||u===i)continue;const p=typeof h=="string"?h:null,m=document.querySelector(`[data-element-id="${u}"]`);if(m&&!Ta.has(m)){xt(`_getElementsByName - element not allowed: ${u}`);continue}a.push({id:u,exportValue:p,domElement:m})}return a}for(const r of document.getElementsByName(t)){const{exportValue:c}=r,u=r.getAttribute("data-element-id");u!==i&&Ta.has(r)&&a.push({id:u,exportValue:c,domElement:r})}return a}show(){this.container&&(this.container.hidden=!1),this.popup?.maybeShow()}hide(){this.container&&(this.container.hidden=!0),this.popup?.forceHide()}getElementsToTriggerPopup(){return this.container}addHighlightArea(){const t=this.getElementsToTriggerPopup();if(Array.isArray(t))for(const i of t)i.classList.add("highlightArea");else t.classList.add("highlightArea")}_editOnDoubleClick(){if(!this._isEditable)return;const{annotationEditorType:t,data:{id:i}}=this;this.container.addEventListener("dblclick",()=>{this.linkService.eventBus?.dispatch("switchannotationeditormode",{source:this,mode:t,editId:i,mustEnterInEditMode:!0})})}get width(){return this.data.rect[2]-this.data.rect[0]}get height(){return this.data.rect[3]-this.data.rect[1]}}class ep extends _e{constructor(t,i=null){super(t,{isRenderable:!0,ignoreBorder:!!i?.ignoreBorder,createQuadrilaterals:!0}),this.isTooltipOnly=t.data.isTooltipOnly}render(){const{data:t,linkService:i}=this,a=document.createElement("a");a.setAttribute("data-element-id",t.id);let r=!1;return t.url?(i.addLinkAttributes(a,t.url,t.newWindow),r=!0):t.action?(this._bindNamedAction(a,t.action,t.overlaidText),r=!0):t.attachment?(this.#e(a,t.attachment,t.overlaidText,t.attachmentDest),r=!0):t.setOCGState?(this.#n(a,t.setOCGState,t.overlaidText),r=!0):t.dest?(this._bindLink(a,t.dest,t.overlaidText),r=!0):(t.actions&&(t.actions.Action||t.actions["Mouse Up"]||t.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(this._bindJSAction(a,t),r=!0),t.resetForm?(this._bindResetFormAction(a,t.resetForm),r=!0):this.isTooltipOnly&&!r&&(this._bindLink(a,""),r=!0)),this.container.classList.add("linkAnnotation"),r&&this.container.append(a),this.container}#t(){this.container.setAttribute("data-internal-link","")}_bindLink(t,i,a=""){t.href=this.linkService.getDestinationHash(i),t.onclick=()=>(i&&this.linkService.goToDestination(i),!1),(i||i==="")&&this.#t(),a&&(t.title=a)}_bindNamedAction(t,i,a=""){t.href=this.linkService.getAnchorUrl(""),t.onclick=()=>(this.linkService.executeNamedAction(i),!1),a&&(t.title=a),this.#t()}#e(t,i,a="",r=null){t.href=this.linkService.getAnchorUrl(""),i.description?t.title=i.description:a&&(t.title=a),t.onclick=()=>(this.downloadManager?.openOrDownloadData(i.content,i.filename,r),!1),this.#t()}#n(t,i,a=""){t.href=this.linkService.getAnchorUrl(""),t.onclick=()=>(this.linkService.executeSetOCGState(i),!1),a&&(t.title=a),this.#t()}_bindJSAction(t,i){t.href=this.linkService.getAnchorUrl("");const a=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(const r of Object.keys(i.actions)){const c=a.get(r);c&&(t[c]=()=>(this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:i.id,name:r}}),!1))}i.overlaidText&&(t.title=i.overlaidText),t.onclick||(t.onclick=()=>!1),this.#t()}_bindResetFormAction(t,i){const a=t.onclick;if(a||(t.href=this.linkService.getAnchorUrl("")),this.#t(),!this._fieldObjects){xt('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),a||(t.onclick=()=>!1);return}t.onclick=()=>{a?.();const{fields:r,refs:c,include:u}=i,h=[];if(r.length!==0||c.length!==0){const g=new Set(c);for(const y of r){const b=this._fieldObjects[y]||[];for(const{id:S}of b)g.add(S)}for(const y of Object.values(this._fieldObjects))for(const b of y)g.has(b.id)===u&&h.push(b)}else for(const g of Object.values(this._fieldObjects))h.push(...g);const p=this.annotationStorage,m=[];for(const g of h){const{id:y}=g;switch(m.push(y),g.type){case"text":{const S=g.defaultValue||"";p.setValue(y,{value:S});break}case"checkbox":case"radiobutton":{const S=g.defaultValue===g.exportValues;p.setValue(y,{value:S});break}case"combobox":case"listbox":{const S=g.defaultValue||"";p.setValue(y,{value:S});break}default:continue}const b=document.querySelector(`[data-element-id="${y}"]`);if(b){if(!Ta.has(b)){xt(`_bindResetFormAction - element not allowed: ${y}`);continue}}else continue;b.dispatchEvent(new Event("resetform"))}return this.enableScripting&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:m,name:"ResetForm"}}),!1}}}class kO extends _e{constructor(t){super(t,{isRenderable:!0})}render(){this.container.classList.add("textAnnotation");const t=document.createElement("img");return t.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",t.setAttribute("data-l10n-id","pdfjs-text-annotation-type"),t.setAttribute("data-l10n-args",JSON.stringify({type:this.data.name})),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.append(t),this.container}}class wa extends _e{render(){return this.container}showElementAndHideCanvas(t){this.data.hasOwnCanvas&&(t.previousSibling?.nodeName==="CANVAS"&&(t.previousSibling.hidden=!0),t.hidden=!1)}_getKeyModifier(t){return Ve.platform.isMac?t.metaKey:t.ctrlKey}_setEventListener(t,i,a,r,c){a.includes("mouse")?t.addEventListener(a,u=>{this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:r,value:c(u),shift:u.shiftKey,modifier:this._getKeyModifier(u)}})}):t.addEventListener(a,u=>{if(a==="blur"){if(!i.focused||!u.relatedTarget)return;i.focused=!1}else if(a==="focus"){if(i.focused)return;i.focused=!0}c&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:r,value:c(u)}})})}_setEventListeners(t,i,a,r){for(const[c,u]of a)(u==="Action"||this.data.actions?.[u])&&((u==="Focus"||u==="Blur")&&(i||={focused:!1}),this._setEventListener(t,i,c,u,r),u==="Focus"&&!this.data.actions?.Blur?this._setEventListener(t,i,"blur","Blur",null):u==="Blur"&&!this.data.actions?.Focus&&this._setEventListener(t,i,"focus","Focus",null))}_setBackgroundColor(t){const i=this.data.backgroundColor||null;t.style.backgroundColor=i===null?"transparent":mt.makeHexColor(i[0],i[1],i[2])}_setTextStyle(t){const i=["left","center","right"],{fontColor:a}=this.data.defaultAppearanceData,r=this.data.defaultAppearanceData.fontSize||MO,c=t.style;let u;const h=2,p=m=>Math.round(10*m)/10;if(this.data.multiLine){const m=Math.abs(this.data.rect[3]-this.data.rect[1]-h),g=Math.round(m/(Of*r))||1,y=m/g;u=Math.min(r,p(y/Of))}else{const m=Math.abs(this.data.rect[3]-this.data.rect[1]-h);u=Math.min(r,p(m/Of))}c.fontSize=`calc(${u}px * var(--total-scale-factor))`,c.color=mt.makeHexColor(a[0],a[1],a[2]),this.data.textAlignment!==null&&(c.textAlign=i[this.data.textAlignment])}_setRequired(t,i){i?t.setAttribute("required",!0):t.removeAttribute("required"),t.setAttribute("aria-required",i)}}class NO extends wa{constructor(t){const i=t.renderForms||t.data.hasOwnCanvas||!t.data.hasAppearance&&!!t.data.fieldValue;super(t,{isRenderable:i})}setPropertyOnSiblings(t,i,a,r){const c=this.annotationStorage;for(const u of this._getElementsByName(t.name,t.id))u.domElement&&(u.domElement[i]=a),c.setValue(u.id,{[r]:a})}render(){const t=this.annotationStorage,i=this.data.id;this.container.classList.add("textWidgetAnnotation");let a=null;if(this.renderForms){const r=t.getValue(i,{value:this.data.fieldValue});let c=r.value||"";const u=t.getValue(i,{charLimit:this.data.maxLen}).charLimit;u&&c.length>u&&(c=c.slice(0,u));let h=r.formattedValue||this.data.textContent?.join(`
298
+ `)||null;h&&this.data.comb&&(h=h.replaceAll(/\s+/g,""));const p={userValue:c,formattedValue:h,lastCommittedValue:null,commitKey:1,focused:!1};this.data.multiLine?(a=document.createElement("textarea"),a.textContent=h??c,this.data.doNotScroll&&(a.style.overflowY="hidden")):(a=document.createElement("input"),a.type=this.data.password?"password":"text",a.setAttribute("value",h??c),this.data.doNotScroll&&(a.style.overflowX="hidden")),this.data.hasOwnCanvas&&(a.hidden=!0),Ta.add(a),a.setAttribute("data-element-id",i),a.disabled=this.data.readOnly,a.name=this.data.fieldName,a.tabIndex=0;const{datetimeFormat:m,datetimeType:g,timeStep:y}=this.data,b=!!g&&this.enableScripting;m&&(a.title=m),this._setRequired(a,this.data.required),u&&(a.maxLength=u),a.addEventListener("input",A=>{t.setValue(i,{value:A.target.value}),this.setPropertyOnSiblings(a,"value",A.target.value,"value"),p.formattedValue=null}),a.addEventListener("resetform",A=>{const _=this.data.defaultFieldValue??"";a.value=p.userValue=_,p.formattedValue=null});let S=A=>{const{formattedValue:_}=p;_!=null&&(A.target.value=_),A.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){a.addEventListener("focus",_=>{if(p.focused)return;const{target:R}=_;if(b&&(R.type=g,y&&(R.step=y)),p.userValue){const x=p.userValue;if(b)if(g==="time"){const L=new Date(x),k=[L.getHours(),L.getMinutes(),L.getSeconds()];R.value=k.map(U=>U.toString().padStart(2,"0")).join(":")}else R.value=new Date(x-OO).toISOString().split(g==="date"?"T":".",1)[0];else R.value=x}p.lastCommittedValue=R.value,p.commitKey=1,this.data.actions?.Focus||(p.focused=!0)}),a.addEventListener("updatefromsandbox",_=>{this.showElementAndHideCanvas(_.target);const R={value(x){p.userValue=x.detail.value??"",b||t.setValue(i,{value:p.userValue.toString()}),x.target.value=p.userValue},formattedValue(x){const{formattedValue:L}=x.detail;p.formattedValue=L,L!=null&&x.target!==document.activeElement&&(x.target.value=L);const k={formattedValue:L};b&&(k.value=L),t.setValue(i,k)},selRange(x){x.target.setSelectionRange(...x.detail.selRange)},charLimit:x=>{const{charLimit:L}=x.detail,{target:k}=x;if(L===0){k.removeAttribute("maxLength");return}k.setAttribute("maxLength",L);let U=p.userValue;!U||U.length<=L||(U=U.slice(0,L),k.value=p.userValue=U,t.setValue(i,{value:U}),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:i,name:"Keystroke",value:U,willCommit:!0,commitKey:1,selStart:k.selectionStart,selEnd:k.selectionEnd}}))}};this._dispatchEventFromSandbox(R,_)}),a.addEventListener("keydown",_=>{p.commitKey=1;let R=-1;if(_.key==="Escape"?R=0:_.key==="Enter"&&!this.data.multiLine?R=2:_.key==="Tab"&&(p.commitKey=3),R===-1)return;const{value:x}=_.target;p.lastCommittedValue!==x&&(p.lastCommittedValue=x,p.userValue=x,this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:i,name:"Keystroke",value:x,willCommit:!0,commitKey:R,selStart:_.target.selectionStart,selEnd:_.target.selectionEnd}}))});const A=S;S=null,a.addEventListener("blur",_=>{if(!p.focused||!_.relatedTarget)return;this.data.actions?.Blur||(p.focused=!1);const{target:R}=_;let{value:x}=R;if(b){if(x&&g==="time"){const L=x.split(":").map(k=>parseInt(k,10));x=new Date(2e3,0,1,L[0],L[1],L[2]||0).valueOf(),R.step=""}else x=new Date(x).valueOf();R.type="text"}p.userValue=x,p.lastCommittedValue!==x&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:i,name:"Keystroke",value:x,willCommit:!0,commitKey:p.commitKey,selStart:_.target.selectionStart,selEnd:_.target.selectionEnd}}),A(_)}),this.data.actions?.Keystroke&&a.addEventListener("beforeinput",_=>{p.lastCommittedValue=null;const{data:R,target:x}=_,{value:L,selectionStart:k,selectionEnd:U}=x;let I=k,j=U;switch(_.inputType){case"deleteWordBackward":{const F=L.substring(0,k).match(/\w*[^\w]*$/);F&&(I-=F[0].length);break}case"deleteWordForward":{const F=L.substring(k).match(/^[^\w]*\w*/);F&&(j+=F[0].length);break}case"deleteContentBackward":k===U&&(I-=1);break;case"deleteContentForward":k===U&&(j+=1);break}_.preventDefault(),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:i,name:"Keystroke",value:L,change:R||"",willCommit:!1,selStart:I,selEnd:j}})}),this._setEventListeners(a,p,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],_=>_.target.value)}if(S&&a.addEventListener("blur",S),this.data.comb){const _=(this.data.rect[2]-this.data.rect[0])/u;a.classList.add("comb"),a.style.letterSpacing=`calc(${_}px * var(--total-scale-factor) - 1ch)`}}else a=document.createElement("div"),a.textContent=this.data.fieldValue,a.style.verticalAlign="middle",a.style.display="table-cell",this.data.hasOwnCanvas&&(a.hidden=!0);return this._setTextStyle(a),this._setBackgroundColor(a),this._setDefaultPropertiesFromJS(a),this.container.append(a),this.container}}class LO extends wa{constructor(t){super(t,{isRenderable:!!t.data.hasOwnCanvas})}}class IO extends wa{constructor(t){super(t,{isRenderable:t.renderForms})}render(){const t=this.annotationStorage,i=this.data,a=i.id;let r=t.getValue(a,{value:i.exportValue===i.fieldValue}).value;typeof r=="string"&&(r=r!=="Off",t.setValue(a,{value:r})),this.container.classList.add("buttonWidgetAnnotation","checkBox");const c=document.createElement("input");return Ta.add(c),c.setAttribute("data-element-id",a),c.disabled=i.readOnly,this._setRequired(c,this.data.required),c.type="checkbox",c.name=i.fieldName,r&&c.setAttribute("checked",!0),c.setAttribute("exportValue",i.exportValue),c.tabIndex=0,c.addEventListener("change",u=>{const{name:h,checked:p}=u.target;for(const m of this._getElementsByName(h,a)){const g=p&&m.exportValue===i.exportValue;m.domElement&&(m.domElement.checked=g),t.setValue(m.id,{value:g})}t.setValue(a,{value:p})}),c.addEventListener("resetform",u=>{const h=i.defaultFieldValue||"Off";u.target.checked=h===i.exportValue}),this.enableScripting&&this.hasJSActions&&(c.addEventListener("updatefromsandbox",u=>{const h={value(p){p.target.checked=p.detail.value!=="Off",t.setValue(a,{value:p.target.checked})}};this._dispatchEventFromSandbox(h,u)}),this._setEventListeners(c,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],u=>u.target.checked)),this._setBackgroundColor(c),this._setDefaultPropertiesFromJS(c),this.container.append(c),this.container}}class N0 extends wa{constructor(t){super(t,{isRenderable:t.renderForms})}render(){this.container.classList.add("buttonWidgetAnnotation","radioButton");const t=this.annotationStorage,i=this.data,a=i.id;let r=t.getValue(a,{value:i.fieldValue===i.buttonValue}).value;if(typeof r=="string"&&(r=r!==i.buttonValue,t.setValue(a,{value:r})),r)for(const u of this._getElementsByName(i.fieldName,a))t.setValue(u.id,{value:!1});const c=document.createElement("input");if(Ta.add(c),c.setAttribute("data-element-id",a),c.disabled=i.readOnly,this._setRequired(c,this.data.required),c.type="radio",c.name=i.fieldName,r&&c.setAttribute("checked",!0),c.tabIndex=0,c.addEventListener("change",u=>{const{name:h,checked:p}=u.target;for(const m of this._getElementsByName(h,a))t.setValue(m.id,{value:!1});t.setValue(a,{value:p})}),c.addEventListener("resetform",u=>{const h=i.defaultFieldValue;u.target.checked=h!=null&&h===i.buttonValue}),this.enableScripting&&this.hasJSActions){const u=i.buttonValue;c.addEventListener("updatefromsandbox",h=>{const p={value:m=>{const g=u===m.detail.value;for(const y of this._getElementsByName(m.target.name)){const b=g&&y.id===a;y.domElement&&(y.domElement.checked=b),t.setValue(y.id,{value:b})}}};this._dispatchEventFromSandbox(p,h)}),this._setEventListeners(c,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],h=>h.target.checked)}return this._setBackgroundColor(c),this._setDefaultPropertiesFromJS(c),this.container.append(c),this.container}}class PO extends ep{constructor(t){super(t,{ignoreBorder:t.data.hasAppearance})}render(){const t=super.render();t.classList.add("buttonWidgetAnnotation","pushButton");const i=t.lastChild;return this.enableScripting&&this.hasJSActions&&i&&(this._setDefaultPropertiesFromJS(i),i.addEventListener("updatefromsandbox",a=>{this._dispatchEventFromSandbox({},a)})),t}}class UO extends wa{constructor(t){super(t,{isRenderable:t.renderForms})}render(){this.container.classList.add("choiceWidgetAnnotation");const t=this.annotationStorage,i=this.data.id,a=t.getValue(i,{value:this.data.fieldValue}),r=document.createElement("select");Ta.add(r),r.setAttribute("data-element-id",i),r.disabled=this.data.readOnly,this._setRequired(r,this.data.required),r.name=this.data.fieldName,r.tabIndex=0;let c=this.data.combo&&this.data.options.length>0;this.data.combo||(r.size=this.data.options.length,this.data.multiSelect&&(r.multiple=!0)),r.addEventListener("resetform",g=>{const y=this.data.defaultFieldValue;for(const b of r.options)b.selected=b.value===y});for(const g of this.data.options){const y=document.createElement("option");y.textContent=g.displayValue,y.value=g.exportValue,a.value.includes(g.exportValue)&&(y.setAttribute("selected",!0),c=!1),r.append(y)}let u=null;if(c){const g=document.createElement("option");g.value=" ",g.setAttribute("hidden",!0),g.setAttribute("selected",!0),r.prepend(g),u=()=>{g.remove(),r.removeEventListener("input",u),u=null},r.addEventListener("input",u)}const h=g=>{const y=g?"value":"textContent",{options:b,multiple:S}=r;return S?Array.prototype.filter.call(b,A=>A.selected).map(A=>A[y]):b.selectedIndex===-1?null:b[b.selectedIndex][y]};let p=h(!1);const m=g=>{const y=g.target.options;return Array.prototype.map.call(y,b=>({displayValue:b.textContent,exportValue:b.value}))};return this.enableScripting&&this.hasJSActions?(r.addEventListener("updatefromsandbox",g=>{const y={value(b){u?.();const S=b.detail.value,A=new Set(Array.isArray(S)?S:[S]);for(const _ of r.options)_.selected=A.has(_.value);t.setValue(i,{value:h(!0)}),p=h(!1)},multipleSelection(b){r.multiple=!0},remove(b){const S=r.options,A=b.detail.remove;S[A].selected=!1,r.remove(A),S.length>0&&Array.prototype.findIndex.call(S,R=>R.selected)===-1&&(S[0].selected=!0),t.setValue(i,{value:h(!0),items:m(b)}),p=h(!1)},clear(b){for(;r.length!==0;)r.remove(0);t.setValue(i,{value:null,items:[]}),p=h(!1)},insert(b){const{index:S,displayValue:A,exportValue:_}=b.detail.insert,R=r.children[S],x=document.createElement("option");x.textContent=A,x.value=_,R?R.before(x):r.append(x),t.setValue(i,{value:h(!0),items:m(b)}),p=h(!1)},items(b){const{items:S}=b.detail;for(;r.length!==0;)r.remove(0);for(const A of S){const{displayValue:_,exportValue:R}=A,x=document.createElement("option");x.textContent=_,x.value=R,r.append(x)}r.options.length>0&&(r.options[0].selected=!0),t.setValue(i,{value:h(!0),items:m(b)}),p=h(!1)},indices(b){const S=new Set(b.detail.indices);for(const A of b.target.options)A.selected=S.has(A.index);t.setValue(i,{value:h(!0)}),p=h(!1)},editable(b){b.target.disabled=!b.detail.editable}};this._dispatchEventFromSandbox(y,g)}),r.addEventListener("input",g=>{const y=h(!0),b=h(!1);t.setValue(i,{value:y}),g.preventDefault(),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:i,name:"Keystroke",value:p,change:b,changeEx:y,willCommit:!1,commitKey:1,keyDown:!1}})}),this._setEventListeners(r,null,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],g=>g.target.value)):r.addEventListener("input",function(g){t.setValue(i,{value:h(!0)})}),this.data.combo&&this._setTextStyle(r),this._setBackgroundColor(r),this._setDefaultPropertiesFromJS(r),this.container.append(r),this.container}}class np extends _e{constructor(t){const{data:i,elements:a}=t;super(t,{isRenderable:_e._hasPopupData(i)}),this.elements=a,this.popup=null}render(){const{container:t}=this;t.classList.add("popupAnnotation"),t.role="comment";const i=this.popup=new zO({container:this.container,color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate||this.data.creationDate,contentsObj:this.data.contentsObj,richText:this.data.richText,rect:this.data.rect,parentRect:this.data.parentRect||null,parent:this.parent,elements:this.elements,open:this.data.open}),a=[];for(const r of this.elements)r.popup=i,r.container.ariaHasPopup="dialog",a.push(r.data.id),r.addHighlightArea();return this.container.setAttribute("aria-controls",a.map(r=>`${Pf}${r}`).join(",")),this.container}}class zO{#t=this.#M.bind(this);#e=this.#k.bind(this);#n=this.#x.bind(this);#i=this.#C.bind(this);#a=null;#s=null;#r=null;#o=null;#u=null;#c=null;#h=null;#l=!1;#p=null;#g=null;#f=null;#d=null;#m=null;#v=null;#y=null;#E=!1;constructor({container:t,color:i,elements:a,titleObj:r,modificationDate:c,contentsObj:u,richText:h,parent:p,rect:m,parentRect:g,open:y}){this.#s=t,this.#v=r,this.#r=u,this.#m=h,this.#c=p,this.#a=i,this.#d=m,this.#h=g,this.#u=a,this.#o=Hf.toDateObject(c),this.trigger=a.flatMap(b=>b.getElementsToTriggerPopup()),this.#A(),this.#s.hidden=!0,y&&this.#C()}#A(){if(this.#g)return;this.#g=new AbortController;const{signal:t}=this.#g;for(const i of this.trigger)i.addEventListener("click",this.#i,{signal:t}),i.addEventListener("mouseenter",this.#n,{signal:t}),i.addEventListener("mouseleave",this.#e,{signal:t}),i.classList.add("popupTriggerArea");for(const i of this.#u)i.container?.addEventListener("keydown",this.#t,{signal:t})}render(){if(this.#p)return;const t=this.#p=document.createElement("div");if(t.className="popup",this.#a){const r=t.style.outlineColor=mt.makeHexColor(...this.#a);t.style.backgroundColor=`color-mix(in srgb, ${r} 30%, white)`}const i=document.createElement("span");if(i.className="header",this.#v?.str){const r=document.createElement("span");r.className="title",i.append(r),{dir:r.dir,str:r.textContent}=this.#v}if(t.append(i),this.#o){const r=document.createElement("time");r.className="popupDate",r.setAttribute("data-l10n-id","pdfjs-annotation-date-time-string"),r.setAttribute("data-l10n-args",JSON.stringify({dateObj:this.#o.valueOf()})),r.dateTime=this.#o.toISOString(),i.append(r)}const a=this.#b;if(a)O0.render({xfaHtml:a,intent:"richText",div:t}),t.lastChild.classList.add("richText","popupContent");else{const r=this._formatContents(this.#r);t.append(r)}this.#s.append(t)}get#b(){const t=this.#m,i=this.#r;return t?.str&&(!i?.str||i.str===t.str)&&this.#m.html||null}get#T(){return this.#b?.attributes?.style?.fontSize||0}get#D(){return this.#b?.attributes?.style?.color||null}#_(t){const i=[],a={str:t,html:{name:"div",attributes:{dir:"auto"},children:[{name:"p",children:i}]}},r={style:{color:this.#D,fontSize:this.#T?`calc(${this.#T}px * var(--total-scale-factor))`:""}};for(const c of t.split(`
299
+ `))i.push({name:"span",value:c,attributes:r});return a}_formatContents({str:t,dir:i}){const a=document.createElement("p");a.classList.add("popupContent"),a.dir=i;const r=t.split(/(?:\r\n?|\n)/);for(let c=0,u=r.length;c<u;++c){const h=r[c];a.append(document.createTextNode(h)),c<u-1&&a.append(document.createElement("br"))}return a}#M(t){t.altKey||t.shiftKey||t.ctrlKey||t.metaKey||(t.key==="Enter"||t.key==="Escape"&&this.#l)&&this.#C()}updateEdited({rect:t,popup:i,deleted:a}){if(a||i?.deleted){this.remove();return}this.#A(),this.#y||={contentsObj:this.#r,richText:this.#m},t&&(this.#f=null),i&&(this.#m=this.#_(i.text),this.#o=Hf.toDateObject(i.date),this.#r=null),this.#p?.remove(),this.#p=null}resetEdited(){this.#y&&({contentsObj:this.#r,richText:this.#m}=this.#y,this.#y=null,this.#p?.remove(),this.#p=null,this.#f=null)}remove(){this.#g?.abort(),this.#g=null,this.#p?.remove(),this.#p=null,this.#E=!1,this.#l=!1;for(const t of this.trigger)t.classList.remove("popupTriggerArea")}#R(){if(this.#f!==null)return;const{page:{view:t},viewport:{rawDims:{pageWidth:i,pageHeight:a,pageX:r,pageY:c}}}=this.#c;let u=!!this.#h,h=u?this.#h:this.#d;for(const A of this.#u)if(!h||mt.intersect(A.data.rect,h)!==null){h=A.data.rect,u=!0;break}const p=mt.normalizeRect([h[0],t[3]-h[1]+t[1],h[2],t[3]-h[3]+t[1]]),g=u?h[2]-h[0]+5:0,y=p[0]+g,b=p[1];this.#f=[100*(y-r)/i,100*(b-c)/a];const{style:S}=this.#s;S.left=`${this.#f[0]}%`,S.top=`${this.#f[1]}%`}#C(){this.#l=!this.#l,this.#l?(this.#x(),this.#s.addEventListener("click",this.#i),this.#s.addEventListener("keydown",this.#t)):(this.#k(),this.#s.removeEventListener("click",this.#i),this.#s.removeEventListener("keydown",this.#t))}#x(){this.#p||this.render(),this.isVisible?this.#l&&this.#s.classList.add("focused"):(this.#R(),this.#s.hidden=!1,this.#s.style.zIndex=parseInt(this.#s.style.zIndex)+1e3)}#k(){this.#s.classList.remove("focused"),!(this.#l||!this.isVisible)&&(this.#s.hidden=!0,this.#s.style.zIndex=parseInt(this.#s.style.zIndex)-1e3)}forceHide(){this.#E=this.isVisible,this.#E&&(this.#s.hidden=!0)}maybeShow(){this.#A(),this.#E&&(this.#p||this.#x(),this.#E=!1,this.#s.hidden=!1)}get isVisible(){return this.#s.hidden===!1}}class L0 extends _e{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0}),this.textContent=t.data.textContent,this.textPosition=t.data.textPosition,this.annotationEditorType=wt.FREETEXT}render(){if(this.container.classList.add("freeTextAnnotation"),this.textContent){const t=document.createElement("div");t.classList.add("annotationTextContent"),t.setAttribute("role","comment");for(const i of this.textContent){const a=document.createElement("span");a.textContent=i,t.append(a)}this.container.append(t)}return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this._editOnDoubleClick(),this.container}}class HO extends _e{#t=null;constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0})}render(){this.container.classList.add("lineAnnotation");const{data:t,width:i,height:a}=this,r=this.svgFactory.create(i,a,!0),c=this.#t=this.svgFactory.createElement("svg:line");return c.setAttribute("x1",t.rect[2]-t.lineCoordinates[0]),c.setAttribute("y1",t.rect[3]-t.lineCoordinates[1]),c.setAttribute("x2",t.rect[2]-t.lineCoordinates[2]),c.setAttribute("y2",t.rect[3]-t.lineCoordinates[3]),c.setAttribute("stroke-width",t.borderStyle.width||1),c.setAttribute("stroke","transparent"),c.setAttribute("fill","transparent"),r.append(c),this.container.append(r),!t.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#t}addHighlightArea(){this.container.classList.add("highlightArea")}}class BO extends _e{#t=null;constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0})}render(){this.container.classList.add("squareAnnotation");const{data:t,width:i,height:a}=this,r=this.svgFactory.create(i,a,!0),c=t.borderStyle.width,u=this.#t=this.svgFactory.createElement("svg:rect");return u.setAttribute("x",c/2),u.setAttribute("y",c/2),u.setAttribute("width",i-c),u.setAttribute("height",a-c),u.setAttribute("stroke-width",c||1),u.setAttribute("stroke","transparent"),u.setAttribute("fill","transparent"),r.append(u),this.container.append(r),!t.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#t}addHighlightArea(){this.container.classList.add("highlightArea")}}class FO extends _e{#t=null;constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0})}render(){this.container.classList.add("circleAnnotation");const{data:t,width:i,height:a}=this,r=this.svgFactory.create(i,a,!0),c=t.borderStyle.width,u=this.#t=this.svgFactory.createElement("svg:ellipse");return u.setAttribute("cx",i/2),u.setAttribute("cy",a/2),u.setAttribute("rx",i/2-c/2),u.setAttribute("ry",a/2-c/2),u.setAttribute("stroke-width",c||1),u.setAttribute("stroke","transparent"),u.setAttribute("fill","transparent"),r.append(u),this.container.append(r),!t.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#t}addHighlightArea(){this.container.classList.add("highlightArea")}}class I0 extends _e{#t=null;constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0}),this.containerClassName="polylineAnnotation",this.svgElementName="svg:polyline"}render(){this.container.classList.add(this.containerClassName);const{data:{rect:t,vertices:i,borderStyle:a,popupRef:r},width:c,height:u}=this;if(!i)return this.container;const h=this.svgFactory.create(c,u,!0);let p=[];for(let g=0,y=i.length;g<y;g+=2){const b=i[g]-t[0],S=t[3]-i[g+1];p.push(`${b},${S}`)}p=p.join(" ");const m=this.#t=this.svgFactory.createElement(this.svgElementName);return m.setAttribute("points",p),m.setAttribute("stroke-width",a.width||1),m.setAttribute("stroke","transparent"),m.setAttribute("fill","transparent"),h.append(m),this.container.append(h),!r&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#t}addHighlightArea(){this.container.classList.add("highlightArea")}}class jO extends I0{constructor(t){super(t),this.containerClassName="polygonAnnotation",this.svgElementName="svg:polygon"}}class $O extends _e{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0})}render(){return this.container.classList.add("caretAnnotation"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container}}class ip extends _e{#t=null;#e=[];constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0}),this.containerClassName="inkAnnotation",this.svgElementName="svg:polyline",this.annotationEditorType=this.data.it==="InkHighlight"?wt.HIGHLIGHT:wt.INK}#n(t,i){switch(t){case 90:return{transform:`rotate(90) translate(${-i[0]},${i[1]}) scale(1,-1)`,width:i[3]-i[1],height:i[2]-i[0]};case 180:return{transform:`rotate(180) translate(${-i[2]},${i[1]}) scale(1,-1)`,width:i[2]-i[0],height:i[3]-i[1]};case 270:return{transform:`rotate(270) translate(${-i[2]},${i[3]}) scale(1,-1)`,width:i[3]-i[1],height:i[2]-i[0]};default:return{transform:`translate(${-i[0]},${i[3]}) scale(1,-1)`,width:i[2]-i[0],height:i[3]-i[1]}}}render(){this.container.classList.add(this.containerClassName);const{data:{rect:t,rotation:i,inkLists:a,borderStyle:r,popupRef:c}}=this,{transform:u,width:h,height:p}=this.#n(i,t),m=this.svgFactory.create(h,p,!0),g=this.#t=this.svgFactory.createElement("svg:g");m.append(g),g.setAttribute("stroke-width",r.width||1),g.setAttribute("stroke-linecap","round"),g.setAttribute("stroke-linejoin","round"),g.setAttribute("stroke-miterlimit",10),g.setAttribute("stroke","transparent"),g.setAttribute("fill","transparent"),g.setAttribute("transform",u);for(let y=0,b=a.length;y<b;y++){const S=this.svgFactory.createElement(this.svgElementName);this.#e.push(S),S.setAttribute("points",a[y].join(",")),g.append(S)}return!c&&this.hasPopupData&&this._createPopup(),this.container.append(m),this._editOnDoubleClick(),this.container}updateEdited(t){super.updateEdited(t);const{thickness:i,points:a,rect:r}=t,c=this.#t;if(i>=0&&c.setAttribute("stroke-width",i||1),a)for(let u=0,h=this.#e.length;u<h;u++)this.#e[u].setAttribute("points",a[u].join(","));if(r){const{transform:u,width:h,height:p}=this.#n(this.data.rotation,r);c.parentElement.setAttribute("viewBox",`0 0 ${h} ${p}`),c.setAttribute("transform",u)}}getElementsToTriggerPopup(){return this.#e}addHighlightArea(){this.container.classList.add("highlightArea")}}class P0 extends _e{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0}),this.annotationEditorType=wt.HIGHLIGHT}render(){const{data:{overlaidText:t,popupRef:i}}=this;if(!i&&this.hasPopupData&&this._createPopup(),this.container.classList.add("highlightAnnotation"),this._editOnDoubleClick(),t){const a=document.createElement("mark");a.classList.add("overlaidText"),a.textContent=t,this.container.append(a)}return this.container}}class GO extends _e{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){const{data:{overlaidText:t,popupRef:i}}=this;if(!i&&this.hasPopupData&&this._createPopup(),this.container.classList.add("underlineAnnotation"),t){const a=document.createElement("u");a.classList.add("overlaidText"),a.textContent=t,this.container.append(a)}return this.container}}class VO extends _e{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){const{data:{overlaidText:t,popupRef:i}}=this;if(!i&&this.hasPopupData&&this._createPopup(),this.container.classList.add("squigglyAnnotation"),t){const a=document.createElement("u");a.classList.add("overlaidText"),a.textContent=t,this.container.append(a)}return this.container}}class qO extends _e{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){const{data:{overlaidText:t,popupRef:i}}=this;if(!i&&this.hasPopupData&&this._createPopup(),this.container.classList.add("strikeoutAnnotation"),t){const a=document.createElement("s");a.classList.add("overlaidText"),a.textContent=t,this.container.append(a)}return this.container}}class U0 extends _e{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0}),this.annotationEditorType=wt.STAMP}render(){return this.container.classList.add("stampAnnotation"),this.container.setAttribute("role","img"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this._editOnDoubleClick(),this.container}}class XO extends _e{#t=null;constructor(t){super(t,{isRenderable:!0});const{file:i}=this.data;this.filename=i.filename,this.content=i.content,this.linkService.eventBus?.dispatch("fileattachmentannotation",{source:this,...i})}render(){this.container.classList.add("fileAttachmentAnnotation");const{container:t,data:i}=this;let a;i.hasAppearance||i.fillAlpha===0?a=document.createElement("div"):(a=document.createElement("img"),a.src=`${this.imageResourcesPath}annotation-${/paperclip/i.test(i.name)?"paperclip":"pushpin"}.svg`,i.fillAlpha&&i.fillAlpha<1&&(a.style=`filter: opacity(${Math.round(i.fillAlpha*100)}%);`)),a.addEventListener("dblclick",this.#e.bind(this)),this.#t=a;const{isMac:r}=Ve.platform;return t.addEventListener("keydown",c=>{c.key==="Enter"&&(r?c.metaKey:c.ctrlKey)&&this.#e()}),!i.popupRef&&this.hasPopupData?this._createPopup():a.classList.add("popupTriggerArea"),t.append(a),t}getElementsToTriggerPopup(){return this.#t}addHighlightArea(){this.container.classList.add("highlightArea")}#e(){this.downloadManager?.openOrDownloadData(this.content,this.filename)}}class sp{#t=null;#e=null;#n=new Map;#i=null;constructor({div:t,accessibilityManager:i,annotationCanvasMap:a,annotationEditorUIManager:r,page:c,viewport:u,structTreeLayer:h}){this.div=t,this.#t=i,this.#e=a,this.#i=h||null,this.page=c,this.viewport=u,this.zIndex=0,this._annotationEditorUIManager=r}hasEditableAnnotations(){return this.#n.size>0}async#a(t,i,a){const r=t.firstChild||t,c=r.id=`${Pf}${i}`,u=await this.#i?.getAriaAttributes(c);if(u)for(const[h,p]of u)r.setAttribute(h,p);a?a.at(-1).container.after(t):(this.div.append(t),this.#t?.moveElementInDOM(this.div,t,r,!1))}async render(t){const{annotations:i}=t,a=this.div;_a(a,this.viewport);const r=new Map,c={data:null,layer:a,linkService:t.linkService,downloadManager:t.downloadManager,imageResourcesPath:t.imageResourcesPath||"",renderForms:t.renderForms!==!1,svgFactory:new Du,annotationStorage:t.annotationStorage||new Gf,enableScripting:t.enableScripting===!0,hasJSActions:t.hasJSActions,fieldObjects:t.fieldObjects,parent:this,elements:null};for(const u of i){if(u.noHTML)continue;const h=u.annotationType===De.POPUP;if(h){const g=r.get(u.id);if(!g)continue;c.elements=g}else if(u.rect[2]===u.rect[0]||u.rect[3]===u.rect[1])continue;c.data=u;const p=k0.create(c);if(!p.isRenderable)continue;if(!h&&u.popupRef){const g=r.get(u.popupRef);g?g.push(p):r.set(u.popupRef,[p])}const m=p.render();u.hidden&&(m.style.visibility="hidden"),await this.#a(m,u.id,c.elements),p._isEditable&&(this.#n.set(p.data.id,p),this._annotationEditorUIManager?.renderAnnotationElement(p))}this.#s()}async addLinkAnnotations(t,i){const a={data:null,layer:this.div,linkService:i,svgFactory:new Du,parent:this};for(const r of t){r.borderStyle||=sp._defaultBorderStyle,a.data=r;const c=k0.create(a);if(!c.isRenderable)continue;const u=c.render();await this.#a(u,r.id,null)}}update({viewport:t}){const i=this.div;this.viewport=t,_a(i,{rotation:t.rotation}),this.#s(),i.hidden=!1}#s(){if(!this.#e)return;const t=this.div;for(const[i,a]of this.#e){const r=t.querySelector(`[data-annotation-id="${i}"]`);if(!r)continue;a.className="annotationContent";const{firstChild:c}=r;c?c.nodeName==="CANVAS"?c.replaceWith(a):c.classList.contains("annotationContent")?c.after(a):c.before(a):r.append(a);const u=this.#n.get(i);u&&(u._hasNoCanvas?(this._annotationEditorUIManager?.setMissingCanvas(i,r.id,a),u._hasNoCanvas=!1):u.canvas=a)}this.#e.clear()}getEditableAnnotations(){return Array.from(this.#n.values())}getEditableAnnotation(t){return this.#n.get(t)}static get _defaultBorderStyle(){return zt(this,"_defaultBorderStyle",Object.freeze({width:1,rawWidth:1,style:_r.SOLID,dashArray:[3],horizontalCornerRadius:0,verticalCornerRadius:0}))}}const Mu=/\r\n?|\n/g;class Ue extends yt{#t;#e="";#n=`${this.id}-editor`;#i=null;#a;_colorPicker=null;static _freeTextDefaultContent="";static _internalPadding=0;static _defaultColor=null;static _defaultFontSize=10;static get _keyboardManager(){const t=Ue.prototype,i=c=>c.isEmpty(),a=Us.TRANSLATE_SMALL,r=Us.TRANSLATE_BIG;return zt(this,"_keyboardManager",new tl([[["ctrl+s","mac+meta+s","ctrl+p","mac+meta+p"],t.commitOrRemove,{bubbles:!0}],[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],t.commitOrRemove],[["ArrowLeft","mac+ArrowLeft"],t._translateEmpty,{args:[-a,0],checker:i}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t._translateEmpty,{args:[-r,0],checker:i}],[["ArrowRight","mac+ArrowRight"],t._translateEmpty,{args:[a,0],checker:i}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t._translateEmpty,{args:[r,0],checker:i}],[["ArrowUp","mac+ArrowUp"],t._translateEmpty,{args:[0,-a],checker:i}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t._translateEmpty,{args:[0,-r],checker:i}],[["ArrowDown","mac+ArrowDown"],t._translateEmpty,{args:[0,a],checker:i}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t._translateEmpty,{args:[0,r],checker:i}]]))}static _type="freetext";static _editorType=wt.FREETEXT;constructor(t){super({...t,name:"freeTextEditor"}),this.#t=t.color||Ue._defaultColor||yt._defaultLineColor,this.#a=t.fontSize||Ue._defaultFontSize,this.annotationElementId||this._uiManager.a11yAlert("pdfjs-editor-freetext-added-alert")}static initialize(t,i){yt.initialize(t,i);const a=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(a.getPropertyValue("--freetext-padding"))}static updateDefaultParams(t,i){switch(t){case $t.FREETEXT_SIZE:Ue._defaultFontSize=i;break;case $t.FREETEXT_COLOR:Ue._defaultColor=i;break}}updateParams(t,i){switch(t){case $t.FREETEXT_SIZE:this.#s(i);break;case $t.FREETEXT_COLOR:this.#r(i);break}}static get defaultPropertiesToUpdate(){return[[$t.FREETEXT_SIZE,Ue._defaultFontSize],[$t.FREETEXT_COLOR,Ue._defaultColor||yt._defaultLineColor]]}get propertiesToUpdate(){return[[$t.FREETEXT_SIZE,this.#a],[$t.FREETEXT_COLOR,this.#t]]}get toolbarButtons(){return this._colorPicker||=new ol(this),[["colorPicker",this._colorPicker]]}get colorType(){return $t.FREETEXT_COLOR}get colorValue(){return this.#t}#s(t){const i=r=>{this.editorDiv.style.fontSize=`calc(${r}px * var(--total-scale-factor))`,this.translate(0,-(r-this.#a)*this.parentScale),this.#a=r,this.#u()},a=this.#a;this.addCommands({cmd:i.bind(this,t),undo:i.bind(this,a),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:$t.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})}#r(t){const i=r=>{this.#t=this.editorDiv.style.color=r,this._colorPicker?.update(r)},a=this.#t;this.addCommands({cmd:i.bind(this,t),undo:i.bind(this,a),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:$t.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})}_translateEmpty(t,i){this._uiManager.translateSelectedEditors(t,i,!0)}getInitialTranslation(){const t=this.parentScale;return[-Ue._internalPadding*t,-(Ue._internalPadding+this.#a)*t]}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.isAttachedToDOM||this.parent.add(this)))}enableEditMode(){if(!super.enableEditMode())return!1;this.overlayDiv.classList.remove("enabled"),this.editorDiv.contentEditable=!0,this._isDraggable=!1,this.div.removeAttribute("aria-activedescendant"),this.#i=new AbortController;const t=this._uiManager.combinedSignal(this.#i);return this.editorDiv.addEventListener("keydown",this.editorDivKeydown.bind(this),{signal:t}),this.editorDiv.addEventListener("focus",this.editorDivFocus.bind(this),{signal:t}),this.editorDiv.addEventListener("blur",this.editorDivBlur.bind(this),{signal:t}),this.editorDiv.addEventListener("input",this.editorDivInput.bind(this),{signal:t}),this.editorDiv.addEventListener("paste",this.editorDivPaste.bind(this),{signal:t}),!0}disableEditMode(){return super.disableEditMode()?(this.overlayDiv.classList.add("enabled"),this.editorDiv.contentEditable=!1,this.div.setAttribute("aria-activedescendant",this.#n),this._isDraggable=!0,this.#i?.abort(),this.#i=null,this.div.focus({preventScroll:!0}),this.isEditing=!1,this.parent.div.classList.add("freetextEditing"),!0):!1}focusin(t){this._focusEventsAllowed&&(super.focusin(t),t.target!==this.editorDiv&&this.editorDiv.focus())}onceAdded(t){this.width||(this.enableEditMode(),t&&this.editorDiv.focus(),this._initialOptions?.isCentered&&this.center(),this._initialOptions=null)}isEmpty(){return!this.editorDiv||this.editorDiv.innerText.trim()===""}remove(){this.isEditing=!1,this.parent&&(this.parent.setEditingState(!0),this.parent.div.classList.add("freetextEditing")),super.remove()}#o(){const t=[];this.editorDiv.normalize();let i=null;for(const a of this.editorDiv.childNodes)i?.nodeType===Node.TEXT_NODE&&a.nodeName==="BR"||(t.push(Ue.#c(a)),i=a);return t.join(`
300
300
  `)}#u(){const[t,i]=this.parentDimensions;let a;if(this.isAttachedToDOM)a=this.div.getBoundingClientRect();else{const{currentLayer:r,div:c}=this,u=c.style.display,h=c.classList.contains("hidden");c.classList.remove("hidden"),c.style.display="hidden",r.div.append(this.div),a=c.getBoundingClientRect(),c.remove(),c.style.display=u,c.classList.toggle("hidden",h)}this.rotation%180===this.parentRotation%180?(this.width=a.width/t,this.height=a.height/i):(this.width=a.height/t,this.height=a.width/i),this.fixAndSetPosition()}commit(){if(!this.isInEditMode())return;super.commit(),this.disableEditMode();const t=this.#e,i=this.#e=this.#o().trimEnd();if(t===i)return;const a=r=>{if(this.#e=r,!r){this.remove();return}this.#h(),this._uiManager.rebuild(this),this.#u()};this.addCommands({cmd:()=>{a(i)},undo:()=>{a(t)},mustExec:!1}),this.#u()}shouldGetKeyboardEvents(){return this.isInEditMode()}enterInEditMode(){this.enableEditMode(),this.editorDiv.focus()}keydown(t){t.target===this.div&&t.key==="Enter"&&(this.enterInEditMode(),t.preventDefault())}editorDivKeydown(t){Ue._keyboardManager.exec(this,t)}editorDivFocus(t){this.isEditing=!0}editorDivBlur(t){this.isEditing=!1}editorDivInput(t){this.parent.div.classList.toggle("freetextEditing",this.isEmpty())}disableEditing(){this.editorDiv.setAttribute("role","comment"),this.editorDiv.removeAttribute("aria-multiline")}enableEditing(){this.editorDiv.setAttribute("role","textbox"),this.editorDiv.setAttribute("aria-multiline",!0)}get canChangeContent(){return!0}render(){if(this.div)return this.div;let t,i;(this._isCopy||this.annotationElementId)&&(t=this.x,i=this.y),super.render(),this.editorDiv=document.createElement("div"),this.editorDiv.className="internal",this.editorDiv.setAttribute("id",this.#n),this.editorDiv.setAttribute("data-l10n-id","pdfjs-free-text2"),this.editorDiv.setAttribute("data-l10n-attrs","default-content"),this.enableEditing(),this.editorDiv.contentEditable=!0;const{style:a}=this.editorDiv;if(a.fontSize=`calc(${this.#a}px * var(--total-scale-factor))`,a.color=this.#t,this.div.append(this.editorDiv),this.overlayDiv=document.createElement("div"),this.overlayDiv.classList.add("overlay","enabled"),this.div.append(this.overlayDiv),this._isCopy||this.annotationElementId){const[r,c]=this.parentDimensions;if(this.annotationElementId){const{position:u}=this._initialData;let[h,p]=this.getInitialTranslation();[h,p]=this.pageTranslationToScreen(h,p);const[m,g]=this.pageDimensions,[y,b]=this.pageTranslation;let S,A;switch(this.rotation){case 0:S=t+(u[0]-y)/m,A=i+this.height-(u[1]-b)/g;break;case 90:S=t+(u[0]-y)/m,A=i-(u[1]-b)/g,[h,p]=[p,-h];break;case 180:S=t-this.width+(u[0]-y)/m,A=i-(u[1]-b)/g,[h,p]=[-h,-p];break;case 270:S=t+(u[0]-y-this.height*g)/m,A=i+(u[1]-b-this.width*m)/g,[h,p]=[-p,h];break}this.setAt(S*r,A*c,h,p)}else this._moveAfterPaste(t,i);this.#h(),this._isDraggable=!0,this.editorDiv.contentEditable=!1}else this._isDraggable=!1,this.editorDiv.contentEditable=!0;return this.div}static#c(t){return(t.nodeType===Node.TEXT_NODE?t.nodeValue:t.innerText).replaceAll(Mu,"")}editorDivPaste(t){const i=t.clipboardData||window.clipboardData,{types:a}=i;if(a.length===1&&a[0]==="text/plain")return;t.preventDefault();const r=Ue.#p(i.getData("text")||"").replaceAll(Mu,`
301
301
  `);if(!r)return;const c=window.getSelection();if(!c.rangeCount)return;this.editorDiv.normalize(),c.deleteFromDocument();const u=c.getRangeAt(0);if(!r.includes(`
302
302
  `)){u.insertNode(document.createTextNode(r)),this.editorDiv.normalize(),c.collapseToStart();return}const{startContainer:h,startOffset:p}=u,m=[],g=[];if(h.nodeType===Node.TEXT_NODE){const S=h.parentElement;if(g.push(h.nodeValue.slice(p).replaceAll(Mu,"")),S!==this.editorDiv){let A=m;for(const _ of this.editorDiv.childNodes){if(_===S){A=g;continue}A.push(Ue.#c(_))}}m.push(h.nodeValue.slice(0,p).replaceAll(Mu,""))}else if(h===this.editorDiv){let S=m,A=0;for(const _ of this.editorDiv.childNodes)A++===p&&(S=g),S.push(Ue.#c(_))}this.#e=`${m.join(`
303
303
  `)}${r}${g.join(`
304
304
  `)}`,this.#h();const y=new Range;let b=Math.sumPrecise(m.map(S=>S.length));for(const{firstChild:S}of this.editorDiv.childNodes)if(S.nodeType===Node.TEXT_NODE){const A=S.nodeValue.length;if(b<=A){y.setStart(S,b),y.setEnd(S,b);break}b-=A}c.removeAllRanges(),c.addRange(y)}#h(){if(this.editorDiv.replaceChildren(),!!this.#e)for(const t of this.#e.split(`
305
- `)){const i=document.createElement("div");i.append(t?document.createTextNode(t):document.createElement("br")),this.editorDiv.append(i)}}#l(){return this.#e.replaceAll(" "," ")}static#p(t){return t.replaceAll(" "," ")}get contentDiv(){return this.editorDiv}static async deserialize(t,i,a){let r=null;if(t instanceof I0){const{data:{defaultAppearanceData:{fontSize:u,fontColor:h},rect:p,rotation:m,id:g,popupRef:y,contentsObj:b},textContent:S,textPosition:A,parent:{page:{pageNumber:_}}}=t;if(!S||S.length===0)return null;r=t={annotationType:wt.FREETEXT,color:Array.from(h),fontSize:u,value:S.join(`
305
+ `)){const i=document.createElement("div");i.append(t?document.createTextNode(t):document.createElement("br")),this.editorDiv.append(i)}}#l(){return this.#e.replaceAll(" "," ")}static#p(t){return t.replaceAll(" "," ")}get contentDiv(){return this.editorDiv}static async deserialize(t,i,a){let r=null;if(t instanceof L0){const{data:{defaultAppearanceData:{fontSize:u,fontColor:h},rect:p,rotation:m,id:g,popupRef:y,contentsObj:b},textContent:S,textPosition:A,parent:{page:{pageNumber:_}}}=t;if(!S||S.length===0)return null;r=t={annotationType:wt.FREETEXT,color:Array.from(h),fontSize:u,value:S.join(`
306
306
  `),position:A,pageIndex:_-1,rect:p.slice(0),rotation:m,annotationElementId:g,id:g,deleted:!1,popupRef:y,comment:b?.str||null}}const c=await super.deserialize(t,i,a);return c.#a=t.fontSize,c.#t=mt.makeHexColor(...t.color),c.#e=Ue.#p(t.value),c._initialData=r,t.comment&&c.setCommentData(t.comment),c}serialize(t=!1){if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();const i=Ue._internalPadding*this.parentScale,a=this.getRect(i,i),r=yt._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:this.#t),c={annotationType:wt.FREETEXT,color:r,fontSize:this.#a,value:this.#l(),pageIndex:this.pageIndex,rect:a,rotation:this.rotation,structTreeParentId:this._structTreeParentId};return this.addComment(c),t?(c.isCopy=!0,c):this.annotationElementId&&!this.#g(c)?null:(c.id=this.annotationElementId,c)}#g(t){const{value:i,fontSize:a,color:r,pageIndex:c}=this._initialData;return this.hasEditedComment||this._hasBeenMoved||t.value!==i||t.fontSize!==a||t.color.some((u,h)=>u!==r[h])||t.pageIndex!==c}renderAnnotationElement(t){const i=super.renderAnnotationElement(t),{style:a}=i;a.fontSize=`calc(${this.#a}px * var(--total-scale-factor))`,a.color=this.#t,i.replaceChildren();for(const u of this.#e.split(`
307
- `)){const h=document.createElement("div");h.append(u?document.createTextNode(u):document.createElement("br")),i.append(h)}const r=Ue._internalPadding*this.parentScale,c={rect:this.getRect(r,r)};return c.popup=this.hasEditedComment?this.comment:{text:this.#e},t.updateEdited(c),i}resetAnnotationElement(t){super.resetAnnotationElement(t),t.resetEdited()}}class ot{static PRECISION=1e-4;toSVGPath(){ie("Abstract method `toSVGPath` must be implemented.")}get box(){ie("Abstract getter `box` must be implemented.")}serialize(t,i){ie("Abstract method `serialize` must be implemented.")}static _rescale(t,i,a,r,c,u){u||=new Float32Array(t.length);for(let h=0,p=t.length;h<p;h+=2)u[h]=i+t[h]*r,u[h+1]=a+t[h+1]*c;return u}static _rescaleAndSwap(t,i,a,r,c,u){u||=new Float32Array(t.length);for(let h=0,p=t.length;h<p;h+=2)u[h]=i+t[h+1]*r,u[h+1]=a+t[h]*c;return u}static _translate(t,i,a,r){r||=new Float32Array(t.length);for(let c=0,u=t.length;c<u;c+=2)r[c]=i+t[c],r[c+1]=a+t[c+1];return r}static svgRound(t){return Math.round(t*1e4)}static _normalizePoint(t,i,a,r,c){switch(c){case 90:return[1-i/a,t/r];case 180:return[1-t/a,1-i/r];case 270:return[i/a,1-t/r];default:return[t/a,i/r]}}static _normalizePagePoint(t,i,a){switch(a){case 90:return[1-i,t];case 180:return[1-t,1-i];case 270:return[i,1-t];default:return[t,i]}}static createBezierPoints(t,i,a,r,c,u){return[(t+5*a)/6,(i+5*r)/6,(5*a+c)/6,(5*r+u)/6,(a+c)/2,(r+u)/2]}}class Ca{#t;#e=[];#n;#i;#a=[];#s=new Float32Array(18);#r;#o;#u;#c;#h;#l;#p=[];static#g=8;static#f=2;static#d=Ca.#g+Ca.#f;constructor({x:t,y:i},a,r,c,u,h=0){this.#t=a,this.#l=c*r,this.#i=u,this.#s.set([NaN,NaN,NaN,NaN,t,i],6),this.#n=h,this.#c=Ca.#g*r,this.#u=Ca.#d*r,this.#h=r,this.#p.push(t,i)}isEmpty(){return isNaN(this.#s[8])}#m(){const t=this.#s.subarray(4,6),i=this.#s.subarray(16,18),[a,r,c,u]=this.#t;return[(this.#r+(t[0]-i[0])/2-a)/c,(this.#o+(t[1]-i[1])/2-r)/u,(this.#r+(i[0]-t[0])/2-a)/c,(this.#o+(i[1]-t[1])/2-r)/u]}add({x:t,y:i}){this.#r=t,this.#o=i;const[a,r,c,u]=this.#t;let[h,p,m,g]=this.#s.subarray(8,12);const y=t-m,b=i-g,S=Math.hypot(y,b);if(S<this.#u)return!1;const A=S-this.#c,_=A/S,R=_*y,C=_*b;let N=h,O=p;h=m,p=g,m+=R,g+=C,this.#p?.push(t,i);const U=-C/A,I=R/A,j=U*this.#l,F=I*this.#l;return this.#s.set(this.#s.subarray(2,8),0),this.#s.set([m+j,g+F],4),this.#s.set(this.#s.subarray(14,18),12),this.#s.set([m-j,g-F],16),isNaN(this.#s[6])?(this.#a.length===0&&(this.#s.set([h+j,p+F],2),this.#a.push(NaN,NaN,NaN,NaN,(h+j-a)/c,(p+F-r)/u),this.#s.set([h-j,p-F],14),this.#e.push(NaN,NaN,NaN,NaN,(h-j-a)/c,(p-F-r)/u)),this.#s.set([N,O,h,p,m,g],6),!this.isEmpty()):(this.#s.set([N,O,h,p,m,g],6),Math.abs(Math.atan2(O-p,N-h)-Math.atan2(C,R))<Math.PI/2?([h,p,m,g]=this.#s.subarray(2,6),this.#a.push(NaN,NaN,NaN,NaN,((h+m)/2-a)/c,((p+g)/2-r)/u),[h,p,N,O]=this.#s.subarray(14,18),this.#e.push(NaN,NaN,NaN,NaN,((N+h)/2-a)/c,((O+p)/2-r)/u),!0):([N,O,h,p,m,g]=this.#s.subarray(0,6),this.#a.push(((N+5*h)/6-a)/c,((O+5*p)/6-r)/u,((5*h+m)/6-a)/c,((5*p+g)/6-r)/u,((h+m)/2-a)/c,((p+g)/2-r)/u),[m,g,h,p,N,O]=this.#s.subarray(12,18),this.#e.push(((N+5*h)/6-a)/c,((O+5*p)/6-r)/u,((5*h+m)/6-a)/c,((5*p+g)/6-r)/u,((h+m)/2-a)/c,((p+g)/2-r)/u),!0))}toSVGPath(){if(this.isEmpty())return"";const t=this.#a,i=this.#e;if(isNaN(this.#s[6])&&!this.isEmpty())return this.#v();const a=[];a.push(`M${t[4]} ${t[5]}`);for(let r=6;r<t.length;r+=6)isNaN(t[r])?a.push(`L${t[r+4]} ${t[r+5]}`):a.push(`C${t[r]} ${t[r+1]} ${t[r+2]} ${t[r+3]} ${t[r+4]} ${t[r+5]}`);this.#E(a);for(let r=i.length-6;r>=6;r-=6)isNaN(i[r])?a.push(`L${i[r+4]} ${i[r+5]}`):a.push(`C${i[r]} ${i[r+1]} ${i[r+2]} ${i[r+3]} ${i[r+4]} ${i[r+5]}`);return this.#y(a),a.join(" ")}#v(){const[t,i,a,r]=this.#t,[c,u,h,p]=this.#m();return`M${(this.#s[2]-t)/a} ${(this.#s[3]-i)/r} L${(this.#s[4]-t)/a} ${(this.#s[5]-i)/r} L${c} ${u} L${h} ${p} L${(this.#s[16]-t)/a} ${(this.#s[17]-i)/r} L${(this.#s[14]-t)/a} ${(this.#s[15]-i)/r} Z`}#y(t){const i=this.#e;t.push(`L${i[4]} ${i[5]} Z`)}#E(t){const[i,a,r,c]=this.#t,u=this.#s.subarray(4,6),h=this.#s.subarray(16,18),[p,m,g,y]=this.#m();t.push(`L${(u[0]-i)/r} ${(u[1]-a)/c} L${p} ${m} L${g} ${y} L${(h[0]-i)/r} ${(h[1]-a)/c}`)}newFreeDrawOutline(t,i,a,r,c,u){return new H0(t,i,a,r,c,u)}getOutlines(){const t=this.#a,i=this.#e,a=this.#s,[r,c,u,h]=this.#t,p=new Float32Array((this.#p?.length??0)+2);for(let y=0,b=p.length-2;y<b;y+=2)p[y]=(this.#p[y]-r)/u,p[y+1]=(this.#p[y+1]-c)/h;if(p[p.length-2]=(this.#r-r)/u,p[p.length-1]=(this.#o-c)/h,isNaN(a[6])&&!this.isEmpty())return this.#A(p);const m=new Float32Array(this.#a.length+24+this.#e.length);let g=t.length;for(let y=0;y<g;y+=2){if(isNaN(t[y])){m[y]=m[y+1]=NaN;continue}m[y]=t[y],m[y+1]=t[y+1]}g=this.#T(m,g);for(let y=i.length-6;y>=6;y-=6)for(let b=0;b<6;b+=2){if(isNaN(i[y+b])){m[g]=m[g+1]=NaN,g+=2;continue}m[g]=i[y+b],m[g+1]=i[y+b+1],g+=2}return this.#b(m,g),this.newFreeDrawOutline(m,p,this.#t,this.#h,this.#n,this.#i)}#A(t){const i=this.#s,[a,r,c,u]=this.#t,[h,p,m,g]=this.#m(),y=new Float32Array(36);return y.set([NaN,NaN,NaN,NaN,(i[2]-a)/c,(i[3]-r)/u,NaN,NaN,NaN,NaN,(i[4]-a)/c,(i[5]-r)/u,NaN,NaN,NaN,NaN,h,p,NaN,NaN,NaN,NaN,m,g,NaN,NaN,NaN,NaN,(i[16]-a)/c,(i[17]-r)/u,NaN,NaN,NaN,NaN,(i[14]-a)/c,(i[15]-r)/u],0),this.newFreeDrawOutline(y,t,this.#t,this.#h,this.#n,this.#i)}#b(t,i){const a=this.#e;return t.set([NaN,NaN,NaN,NaN,a[4],a[5]],i),i+=6}#T(t,i){const a=this.#s.subarray(4,6),r=this.#s.subarray(16,18),[c,u,h,p]=this.#t,[m,g,y,b]=this.#m();return t.set([NaN,NaN,NaN,NaN,(a[0]-c)/h,(a[1]-u)/p,NaN,NaN,NaN,NaN,m,g,NaN,NaN,NaN,NaN,y,b,NaN,NaN,NaN,NaN,(r[0]-c)/h,(r[1]-u)/p],i),i+=24}}class H0 extends ot{#t;#e=new Float32Array(4);#n;#i;#a;#s;#r;constructor(t,i,a,r,c,u){super(),this.#r=t,this.#a=i,this.#t=a,this.#s=r,this.#n=c,this.#i=u,this.lastPoint=[NaN,NaN],this.#o(u);const[h,p,m,g]=this.#e;for(let y=0,b=t.length;y<b;y+=2)t[y]=(t[y]-h)/m,t[y+1]=(t[y+1]-p)/g;for(let y=0,b=i.length;y<b;y+=2)i[y]=(i[y]-h)/m,i[y+1]=(i[y+1]-p)/g}toSVGPath(){const t=[`M${this.#r[4]} ${this.#r[5]}`];for(let i=6,a=this.#r.length;i<a;i+=6){if(isNaN(this.#r[i])){t.push(`L${this.#r[i+4]} ${this.#r[i+5]}`);continue}t.push(`C${this.#r[i]} ${this.#r[i+1]} ${this.#r[i+2]} ${this.#r[i+3]} ${this.#r[i+4]} ${this.#r[i+5]}`)}return t.push("Z"),t.join(" ")}serialize([t,i,a,r],c){const u=a-t,h=r-i;let p,m;switch(c){case 0:p=ot._rescale(this.#r,t,r,u,-h),m=ot._rescale(this.#a,t,r,u,-h);break;case 90:p=ot._rescaleAndSwap(this.#r,t,i,u,h),m=ot._rescaleAndSwap(this.#a,t,i,u,h);break;case 180:p=ot._rescale(this.#r,a,i,-u,h),m=ot._rescale(this.#a,a,i,-u,h);break;case 270:p=ot._rescaleAndSwap(this.#r,a,r,-u,-h),m=ot._rescaleAndSwap(this.#a,a,r,-u,-h);break}return{outline:Array.from(p),points:[Array.from(m)]}}#o(t){const i=this.#r;let a=i[4],r=i[5];const c=[a,r,a,r];let u=a,h=r;const p=t?Math.max:Math.min;for(let g=6,y=i.length;g<y;g+=6){const b=i[g+4],S=i[g+5];if(isNaN(i[g]))mt.pointBoundingBox(b,S,c),h<S?(u=b,h=S):h===S&&(u=p(u,b));else{const A=[1/0,1/0,-1/0,-1/0];mt.bezierBoundingBox(a,r,...i.slice(g,g+6),A),mt.rectBoundingBox(...A,c),h<A[3]?(u=A[2],h=A[3]):h===A[3]&&(u=p(u,A[2]))}a=b,r=S}const m=this.#e;m[0]=c[0]-this.#n,m[1]=c[1]-this.#n,m[2]=c[2]-c[0]+2*this.#n,m[3]=c[3]-c[1]+2*this.#n,this.lastPoint=[u,h]}get box(){return this.#e}newOutliner(t,i,a,r,c,u=0){return new Ca(t,i,a,r,c,u)}getNewOutline(t,i){const[a,r,c,u]=this.#e,[h,p,m,g]=this.#t,y=c*m,b=u*g,S=a*m+h,A=r*g+p,_=this.newOutliner({x:this.#a[0]*y+S,y:this.#a[1]*b+A},this.#t,this.#s,t,this.#i,i??this.#n);for(let R=2;R<this.#a.length;R+=2)_.add({x:this.#a[R]*y+S,y:this.#a[R+1]*b+A});return _.getOutlines()}}class ap{#t;#e;#n=[];#i=[];constructor(t,i=0,a=0,r=!0){const c=[1/0,1/0,-1/0,-1/0],u=10**-4;for(const{x:S,y:A,width:_,height:R}of t){const C=Math.floor((S-i)/u)*u,N=Math.ceil((S+_+i)/u)*u,O=Math.floor((A-i)/u)*u,U=Math.ceil((A+R+i)/u)*u,I=[C,O,U,!0],j=[N,O,U,!1];this.#n.push(I,j),mt.rectBoundingBox(C,O,N,U,c)}const h=c[2]-c[0]+2*a,p=c[3]-c[1]+2*a,m=c[0]-a,g=c[1]-a,y=this.#n.at(r?-1:-2),b=[y[0],y[2]];for(const S of this.#n){const[A,_,R]=S;S[0]=(A-m)/h,S[1]=(_-g)/p,S[2]=(R-g)/p}this.#t=new Float32Array([m,g,h,p]),this.#e=b}getOutlines(){this.#n.sort((i,a)=>i[0]-a[0]||i[1]-a[1]||i[2]-a[2]);const t=[];for(const i of this.#n)i[3]?(t.push(...this.#u(i)),this.#r(i)):(this.#o(i),t.push(...this.#u(i)));return this.#a(t)}#a(t){const i=[],a=new Set;for(const u of t){const[h,p,m]=u;i.push([h,p,u],[h,m,u])}i.sort((u,h)=>u[1]-h[1]||u[0]-h[0]);for(let u=0,h=i.length;u<h;u+=2){const p=i[u][2],m=i[u+1][2];p.push(m),m.push(p),a.add(p),a.add(m)}const r=[];let c;for(;a.size>0;){const u=a.values().next().value;let[h,p,m,g,y]=u;a.delete(u);let b=h,S=p;for(c=[h,m],r.push(c);;){let A;if(a.has(g))A=g;else if(a.has(y))A=y;else break;a.delete(A),[h,p,m,g,y]=A,b!==h&&(c.push(b,S,h,S===p?p:m),b=h),S=S===p?m:p}c.push(b,S)}return new QO(r,this.#t,this.#e)}#s(t){const i=this.#i;let a=0,r=i.length-1;for(;a<=r;){const c=a+r>>1,u=i[c][0];if(u===t)return c;u<t?a=c+1:r=c-1}return r+1}#r([,t,i]){const a=this.#s(t);this.#i.splice(a,0,[t,i])}#o([,t,i]){const a=this.#s(t);for(let r=a;r<this.#i.length;r++){const[c,u]=this.#i[r];if(c!==t)break;if(c===t&&u===i){this.#i.splice(r,1);return}}for(let r=a-1;r>=0;r--){const[c,u]=this.#i[r];if(c!==t)break;if(c===t&&u===i){this.#i.splice(r,1);return}}}#u(t){const[i,a,r]=t,c=[[i,a,r]],u=this.#s(r);for(let h=0;h<u;h++){const[p,m]=this.#i[h];for(let g=0,y=c.length;g<y;g++){const[,b,S]=c[g];if(!(m<=b||S<=p)){if(b>=p){if(S>m)c[g][1]=m;else{if(y===1)return[];c.splice(g,1),g--,y--}continue}c[g][2]=p,S>m&&c.push([i,m,S])}}}return c}}class QO extends ot{#t;#e;constructor(t,i,a){super(),this.#e=t,this.#t=i,this.lastPoint=a}toSVGPath(){const t=[];for(const i of this.#e){let[a,r]=i;t.push(`M${a} ${r}`);for(let c=2;c<i.length;c+=2){const u=i[c],h=i[c+1];u===a?(t.push(`V${h}`),r=h):h===r&&(t.push(`H${u}`),a=u)}t.push("Z")}return t.join(" ")}serialize([t,i,a,r],c){const u=[],h=a-t,p=r-i;for(const m of this.#e){const g=new Array(m.length);for(let y=0;y<m.length;y+=2)g[y]=t+m[y]*h,g[y+1]=r-m[y+1]*p;u.push(g)}return u}get box(){return this.#t}get classNamesForOutlining(){return["highlightOutline"]}}class rp extends Ca{newFreeDrawOutline(t,i,a,r,c,u){return new KO(t,i,a,r,c,u)}}class KO extends H0{newOutliner(t,i,a,r,c,u=0){return new rp(t,i,a,r,c,u)}}class Te extends yt{#t=null;#e=0;#n;#i=null;#a=null;#s=null;#r=null;#o=0;#u=null;#c=null;#h=null;#l=!1;#p=null;#g;#f=null;#d="";#m;#v="";static _defaultColor=null;static _defaultOpacity=1;static _defaultThickness=12;static _type="highlight";static _editorType=wt.HIGHLIGHT;static _freeHighlightId=-1;static _freeHighlight=null;static _freeHighlightClipId="";static get _keyboardManager(){const t=Te.prototype;return zt(this,"_keyboardManager",new tl([[["ArrowLeft","mac+ArrowLeft"],t._moveCaret,{args:[0]}],[["ArrowRight","mac+ArrowRight"],t._moveCaret,{args:[1]}],[["ArrowUp","mac+ArrowUp"],t._moveCaret,{args:[2]}],[["ArrowDown","mac+ArrowDown"],t._moveCaret,{args:[3]}]]))}constructor(t){super({...t,name:"highlightEditor"}),this.color=t.color||Te._defaultColor,this.#m=t.thickness||Te._defaultThickness,this.#g=t.opacity||Te._defaultOpacity,this.#n=t.boxes||null,this.#v=t.methodOfCreation||"",this.#d=t.text||"",this._isDraggable=!1,this.defaultL10nId="pdfjs-editor-highlight-editor",t.highlightId>-1?(this.#l=!0,this.#E(t),this.#_()):this.#n&&(this.#t=t.anchorNode,this.#e=t.anchorOffset,this.#r=t.focusNode,this.#o=t.focusOffset,this.#y(),this.#_(),this.rotate(this.rotation)),this.annotationElementId||this._uiManager.a11yAlert("pdfjs-editor-highlight-added-alert")}get telemetryInitialData(){return{action:"added",type:this.#l?"free_highlight":"highlight",color:this._uiManager.getNonHCMColorName(this.color),thickness:this.#m,methodOfCreation:this.#v}}get telemetryFinalData(){return{type:"highlight",color:this._uiManager.getNonHCMColorName(this.color)}}get commentColor(){return this.color}static computeTelemetryFinalData(t){return{numberOfColors:t.get("color").size}}#y(){const t=new ap(this.#n,.001);this.#c=t.getOutlines(),[this.x,this.y,this.width,this.height]=this.#c.box;const i=new ap(this.#n,.0025,.001,this._uiManager.direction==="ltr");this.#s=i.getOutlines();const{lastPoint:a}=this.#s;this.#p=[(a[0]-this.x)/this.width,(a[1]-this.y)/this.height]}#E({highlightOutlines:t,highlightId:i,clipPathId:a}){this.#c=t;const r=1.5;if(this.#s=t.getNewOutline(this.#m/2+r,.0025),i>=0)this.#h=i,this.#i=a,this.parent.drawLayer.finalizeDraw(i,{bbox:t.box,path:{d:t.toSVGPath()}}),this.#f=this.parent.drawLayer.drawOutline({rootClass:{highlightOutline:!0,free:!0},bbox:this.#s.box,path:{d:this.#s.toSVGPath()}},!0);else if(this.parent){const g=this.parent.viewport.rotation;this.parent.drawLayer.updateProperties(this.#h,{bbox:Te.#M(this.#c.box,(g-this.rotation+360)%360),path:{d:t.toSVGPath()}}),this.parent.drawLayer.updateProperties(this.#f,{bbox:Te.#M(this.#s.box,g),path:{d:this.#s.toSVGPath()}})}const[c,u,h,p]=t.box;switch(this.rotation){case 0:this.x=c,this.y=u,this.width=h,this.height=p;break;case 90:{const[g,y]=this.parentDimensions;this.x=u,this.y=1-c,this.width=h*y/g,this.height=p*g/y;break}case 180:this.x=1-c,this.y=1-u,this.width=h,this.height=p;break;case 270:{const[g,y]=this.parentDimensions;this.x=1-u,this.y=c,this.width=h*y/g,this.height=p*g/y;break}}const{lastPoint:m}=this.#s;this.#p=[(m[0]-c)/h,(m[1]-u)/p]}static initialize(t,i){yt.initialize(t,i),Te._defaultColor||=i.highlightColors?.values().next().value||"#fff066"}static updateDefaultParams(t,i){switch(t){case $t.HIGHLIGHT_COLOR:Te._defaultColor=i;break;case $t.HIGHLIGHT_THICKNESS:Te._defaultThickness=i;break}}translateInPage(t,i){}get toolbarPosition(){return this.#p}updateParams(t,i){switch(t){case $t.HIGHLIGHT_COLOR:this.#A(i);break;case $t.HIGHLIGHT_THICKNESS:this.#b(i);break}}static get defaultPropertiesToUpdate(){return[[$t.HIGHLIGHT_COLOR,Te._defaultColor],[$t.HIGHLIGHT_THICKNESS,Te._defaultThickness]]}get propertiesToUpdate(){return[[$t.HIGHLIGHT_COLOR,this.color||Te._defaultColor],[$t.HIGHLIGHT_THICKNESS,this.#m||Te._defaultThickness],[$t.HIGHLIGHT_FREE,this.#l]]}#A(t){const i=(c,u)=>{this.color=c,this.#g=u,this.parent?.drawLayer.updateProperties(this.#h,{root:{fill:c,"fill-opacity":u}}),this.#a?.updateColor(c)},a=this.color,r=this.#g;this.addCommands({cmd:i.bind(this,t,Te._defaultOpacity),undo:i.bind(this,a,r),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:$t.HIGHLIGHT_COLOR,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:"color_changed",color:this._uiManager.getNonHCMColorName(t)},!0)}#b(t){const i=this.#m,a=r=>{this.#m=r,this.#T(r)};this.addCommands({cmd:a.bind(this,t),undo:a.bind(this,i),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:$t.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:"thickness_changed",thickness:t},!0)}get toolbarButtons(){return this._uiManager.highlightColors?[["colorPicker",this.#a=new Wn({editor:this})]]:super.toolbarButtons}disableEditing(){super.disableEditing(),this.div.classList.toggle("disabled",!0)}enableEditing(){super.enableEditing(),this.div.classList.toggle("disabled",!1)}fixAndSetPosition(){return super.fixAndSetPosition(this.#C())}getBaseTranslation(){return[0,0]}getRect(t,i){return super.getRect(t,i,this.#C())}onceAdded(t){this.annotationElementId||this.parent.addUndoableEditor(this),t&&this.div.focus()}remove(){this.#D(),this._reportTelemetry({action:"deleted"}),super.remove()}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.#_(),this.isAttachedToDOM||this.parent.add(this)))}setParent(t){let i=!1;this.parent&&!t?this.#D():t&&(this.#_(t),i=!this.parent&&this.div?.classList.contains("selectedEditor")),super.setParent(t),this.show(this._isVisible),i&&this.select()}#T(t){if(!this.#l)return;this.#E({highlightOutlines:this.#c.getNewOutline(t/2)}),this.fixAndSetPosition();const[i,a]=this.parentDimensions;this.setDims(this.width*i,this.height*a)}#D(){this.#h===null||!this.parent||(this.parent.drawLayer.remove(this.#h),this.#h=null,this.parent.drawLayer.remove(this.#f),this.#f=null)}#_(t=this.parent){this.#h===null&&({id:this.#h,clipPathId:this.#i}=t.drawLayer.draw({bbox:this.#c.box,root:{viewBox:"0 0 1 1",fill:this.color,"fill-opacity":this.#g},rootClass:{highlight:!0,free:this.#l},path:{d:this.#c.toSVGPath()}},!1,!0),this.#f=t.drawLayer.drawOutline({rootClass:{highlightOutline:!0,free:this.#l},bbox:this.#s.box,path:{d:this.#s.toSVGPath()}},this.#l),this.#u&&(this.#u.style.clipPath=this.#i))}static#M([t,i,a,r],c){switch(c){case 90:return[1-i-r,t,r,a];case 180:return[1-t-a,1-i-r,a,r];case 270:return[i,1-t-a,r,a]}return[t,i,a,r]}rotate(t){const{drawLayer:i}=this.parent;let a;this.#l?(t=(t-this.rotation+360)%360,a=Te.#M(this.#c.box,t)):a=Te.#M([this.x,this.y,this.width,this.height],t),i.updateProperties(this.#h,{bbox:a,root:{"data-main-rotation":t}}),i.updateProperties(this.#f,{bbox:Te.#M(this.#s.box,t),root:{"data-main-rotation":t}})}render(){if(this.div)return this.div;const t=super.render();this.#d&&(t.setAttribute("aria-label",this.#d),t.setAttribute("role","mark")),this.#l?t.classList.add("free"):this.div.addEventListener("keydown",this.#R.bind(this),{signal:this._uiManager._signal});const i=this.#u=document.createElement("div");t.append(i),i.setAttribute("aria-hidden","true"),i.className="internal",i.style.clipPath=this.#i;const[a,r]=this.parentDimensions;return this.setDims(this.width*a,this.height*r),Zv(this,this.#u,["pointerover","pointerleave"]),this.enableEditing(),t}pointerover(){this.isSelected||this.parent?.drawLayer.updateProperties(this.#f,{rootClass:{hovered:!0}})}pointerleave(){this.isSelected||this.parent?.drawLayer.updateProperties(this.#f,{rootClass:{hovered:!1}})}#R(t){Te._keyboardManager.exec(this,t)}_moveCaret(t){switch(this.parent.unselect(this),t){case 0:case 2:this.#x(!0);break;case 1:case 3:this.#x(!1);break}}#x(t){if(!this.#t)return;const i=window.getSelection();t?i.setPosition(this.#t,this.#e):i.setPosition(this.#r,this.#o)}select(){super.select(),this.#f&&this.parent?.drawLayer.updateProperties(this.#f,{rootClass:{hovered:!1,selected:!0}})}unselect(){super.unselect(),this.#f&&(this.parent?.drawLayer.updateProperties(this.#f,{rootClass:{selected:!1}}),this.#l||this.#x(!1))}get _mustFixPosition(){return!this.#l}show(t=this._isVisible){super.show(t),this.parent&&(this.parent.drawLayer.updateProperties(this.#h,{rootClass:{hidden:!t}}),this.parent.drawLayer.updateProperties(this.#f,{rootClass:{hidden:!t}}))}#C(){return this.#l?this.rotation:0}#k(){if(this.#l)return null;const[t,i]=this.pageDimensions,[a,r]=this.pageTranslation,c=this.#n,u=new Float32Array(c.length*8);let h=0;for(const{x:p,y:m,width:g,height:y}of c){const b=p*t+a,S=(1-m)*i+r;u[h]=u[h+4]=b,u[h+1]=u[h+3]=S,u[h+2]=u[h+6]=b+g*t,u[h+5]=u[h+7]=S-y*i,h+=8}return u}#U(t){return this.#c.serialize(t,this.#C())}static startHighlighting(t,i,{target:a,x:r,y:c}){const{x:u,y:h,width:p,height:m}=a.getBoundingClientRect(),g=new AbortController,y=t.combinedSignal(g),b=S=>{g.abort(),this.#F(t,S)};window.addEventListener("blur",b,{signal:y}),window.addEventListener("pointerup",b,{signal:y}),window.addEventListener("pointerdown",Oe,{capture:!0,passive:!1,signal:y}),window.addEventListener("contextmenu",Yn,{signal:y}),a.addEventListener("pointermove",this.#N.bind(this,t),{signal:y}),this._freeHighlight=new rp({x:r,y:c},[u,h,p,m],t.scale,this._defaultThickness/2,i,.001),{id:this._freeHighlightId,clipPathId:this._freeHighlightClipId}=t.drawLayer.draw({bbox:[0,0,1,1],root:{viewBox:"0 0 1 1",fill:this._defaultColor,"fill-opacity":this._defaultOpacity},rootClass:{highlight:!0,free:!0},path:{d:this._freeHighlight.toSVGPath()}},!0,!0)}static#N(t,i){this._freeHighlight.add(i)&&t.drawLayer.updateProperties(this._freeHighlightId,{path:{d:this._freeHighlight.toSVGPath()}})}static#F(t,i){this._freeHighlight.isEmpty()?t.drawLayer.remove(this._freeHighlightId):t.createAndAddNewEditor(i,!1,{highlightId:this._freeHighlightId,highlightOutlines:this._freeHighlight.getOutlines(),clipPathId:this._freeHighlightClipId,methodOfCreation:"main_toolbar"}),this._freeHighlightId=-1,this._freeHighlight=null,this._freeHighlightClipId=""}static async deserialize(t,i,a){let r=null;if(t instanceof U0){const{data:{quadPoints:A,rect:_,rotation:R,id:C,color:N,opacity:O,popupRef:U,contentsObj:I},parent:{page:{pageNumber:j}}}=t;r=t={annotationType:wt.HIGHLIGHT,color:Array.from(N),opacity:O,quadPoints:A,boxes:null,pageIndex:j-1,rect:_.slice(0),rotation:R,annotationElementId:C,id:C,deleted:!1,popupRef:U,comment:I?.str||null}}else if(t instanceof ip){const{data:{inkLists:A,rect:_,rotation:R,id:C,color:N,borderStyle:{rawWidth:O},popupRef:U,contentsObj:I},parent:{page:{pageNumber:j}}}=t;r=t={annotationType:wt.HIGHLIGHT,color:Array.from(N),thickness:O,inkLists:A,boxes:null,pageIndex:j-1,rect:_.slice(0),rotation:R,annotationElementId:C,id:C,deleted:!1,popupRef:U,comment:I?.str||null}}const{color:c,quadPoints:u,inkLists:h,opacity:p}=t,m=await super.deserialize(t,i,a);m.color=mt.makeHexColor(...c),m.#g=p||1,h&&(m.#m=t.thickness),m._initialData=r,t.comment&&m.setCommentData(t.comment);const[g,y]=m.pageDimensions,[b,S]=m.pageTranslation;if(u){const A=m.#n=[];for(let _=0;_<u.length;_+=8)A.push({x:(u[_]-b)/g,y:1-(u[_+1]-S)/y,width:(u[_+2]-u[_])/g,height:(u[_+1]-u[_+5])/y});m.#y(),m.#_(),m.rotate(m.rotation)}else if(h){m.#l=!0;const A=h[0],_={x:A[0]-b,y:y-(A[1]-S)},R=new rp(_,[0,0,g,y],1,m.#m/2,!0,.001);for(let O=0,U=A.length;O<U;O+=2)_.x=A[O]-b,_.y=y-(A[O+1]-S),R.add(_);const{id:C,clipPathId:N}=i.drawLayer.draw({bbox:[0,0,1,1],root:{viewBox:"0 0 1 1",fill:m.color,"fill-opacity":m._defaultOpacity},rootClass:{highlight:!0,free:!0},path:{d:R.toSVGPath()}},!0,!0);m.#E({highlightOutlines:R.getOutlines(),highlightId:C,clipPathId:N}),m.#_(),m.rotate(m.parentRotation)}return m}serialize(t=!1){if(this.isEmpty()||t)return null;if(this.deleted)return this.serializeDeleted();const i=this.getRect(0,0),a=yt._colorManager.convert(this._uiManager.getNonHCMColor(this.color)),r={annotationType:wt.HIGHLIGHT,color:a,opacity:this.#g,thickness:this.#m,quadPoints:this.#k(),outlines:this.#U(i),pageIndex:this.pageIndex,rect:i,rotation:this.#C(),structTreeParentId:this._structTreeParentId};return this.addComment(r),this.annotationElementId&&!this.#w(r)?null:(r.id=this.annotationElementId,r)}#w(t){const{color:i}=this._initialData;return this.hasEditedComment||t.color.some((a,r)=>a!==i[r])}renderAnnotationElement(t){const i={rect:this.getRect(0,0)};return this.hasEditedComment&&(i.popup=this.comment),t.updateEdited(i),null}static canCreateNewEmptyEditor(){return!1}}class B0{#t=Object.create(null);updateProperty(t,i){this[t]=i,this.updateSVGProperty(t,i)}updateProperties(t){if(t)for(const[i,a]of Object.entries(t))i.startsWith("_")||this.updateProperty(i,a)}updateSVGProperty(t,i){this.#t[t]=i}toSVGProperties(){const t=this.#t;return this.#t=Object.create(null),{root:t}}reset(){this.#t=Object.create(null)}updateAll(t=this){this.updateProperties(t)}clone(){ie("Not implemented")}}class St extends yt{#t=null;#e;_colorPicker=null;_drawId=null;static _currentDrawId=-1;static _currentParent=null;static#n=null;static#i=null;static#a=null;static#s=NaN;static#r=null;static#o=null;static#u=NaN;static _INNER_MARGIN=3;constructor(t){super(t),this.#e=t.mustBeCommitted||!1,this._addOutlines(t)}_addOutlines(t){t.drawOutlines&&(this.#c(t),this.#p())}#c({drawOutlines:t,drawId:i,drawingOptions:a}){this.#t=t,this._drawingOptions||=a,this.annotationElementId||this._uiManager.a11yAlert(`pdfjs-editor-${this.editorType}-added-alert`),i>=0?(this._drawId=i,this.parent.drawLayer.finalizeDraw(i,t.defaultProperties)):this._drawId=this.#h(t,this.parent),this.#d(t.box)}#h(t,i){const{id:a}=i.drawLayer.draw(St._mergeSVGProperties(this._drawingOptions.toSVGProperties(),t.defaultSVGProperties),!1,!1);return a}static _mergeSVGProperties(t,i){const a=new Set(Object.keys(t));for(const[r,c]of Object.entries(i))a.has(r)?Object.assign(t[r],c):t[r]=c;return t}static getDefaultDrawingOptions(t){ie("Not implemented")}static get typesMap(){ie("Not implemented")}static get isDrawer(){return!0}static get supportMultipleDrawings(){return!1}static updateDefaultParams(t,i){const a=this.typesMap.get(t);a&&this._defaultDrawingOptions.updateProperty(a,i),this._currentParent&&(St.#n.updateProperty(a,i),this._currentParent.drawLayer.updateProperties(this._currentDrawId,this._defaultDrawingOptions.toSVGProperties()))}updateParams(t,i){const a=this.constructor.typesMap.get(t);a&&this._updateProperty(t,a,i)}static get defaultPropertiesToUpdate(){const t=[],i=this._defaultDrawingOptions;for(const[a,r]of this.typesMap)t.push([a,i[r]]);return t}get propertiesToUpdate(){const t=[],{_drawingOptions:i}=this;for(const[a,r]of this.constructor.typesMap)t.push([a,i[r]]);return t}_updateProperty(t,i,a){const r=this._drawingOptions,c=r[i],u=h=>{r.updateProperty(i,h);const p=this.#t.updateProperty(i,h);p&&this.#d(p),this.parent?.drawLayer.updateProperties(this._drawId,r.toSVGProperties()),t===this.colorType&&this._colorPicker?.update(h)};this.addCommands({cmd:u.bind(this,a),undo:u.bind(this,c),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:t,overwriteIfSameType:!0,keepUndo:!0})}_onResizing(){this.parent?.drawLayer.updateProperties(this._drawId,St._mergeSVGProperties(this.#t.getPathResizingSVGProperties(this.#f()),{bbox:this.#m()}))}_onResized(){this.parent?.drawLayer.updateProperties(this._drawId,St._mergeSVGProperties(this.#t.getPathResizedSVGProperties(this.#f()),{bbox:this.#m()}))}_onTranslating(t,i){this.parent?.drawLayer.updateProperties(this._drawId,{bbox:this.#m()})}_onTranslated(){this.parent?.drawLayer.updateProperties(this._drawId,St._mergeSVGProperties(this.#t.getPathTranslatedSVGProperties(this.#f(),this.parentDimensions),{bbox:this.#m()}))}_onStartDragging(){this.parent?.drawLayer.updateProperties(this._drawId,{rootClass:{moving:!0}})}_onStopDragging(){this.parent?.drawLayer.updateProperties(this._drawId,{rootClass:{moving:!1}})}commit(){super.commit(),this.disableEditMode(),this.disableEditing()}disableEditing(){super.disableEditing(),this.div.classList.toggle("disabled",!0)}enableEditing(){super.enableEditing(),this.div.classList.toggle("disabled",!1)}getBaseTranslation(){return[0,0]}get isResizable(){return!0}onceAdded(t){this.annotationElementId||this.parent.addUndoableEditor(this),this._isDraggable=!0,this.#e&&(this.#e=!1,this.commit(),this.parent.setSelected(this),t&&this.isOnScreen&&this.div.focus())}remove(){this.#l(),super.remove()}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.#p(),this.#d(this.#t.box),this.isAttachedToDOM||this.parent.add(this)))}setParent(t){let i=!1;this.parent&&!t?(this._uiManager.removeShouldRescale(this),this.#l()):t&&(this._uiManager.addShouldRescale(this),this.#p(t),i=!this.parent&&this.div?.classList.contains("selectedEditor")),super.setParent(t),i&&this.select()}#l(){this._drawId===null||!this.parent||(this.parent.drawLayer.remove(this._drawId),this._drawId=null,this._drawingOptions.reset())}#p(t=this.parent){if(!(this._drawId!==null&&this.parent===t)){if(this._drawId!==null){this.parent.drawLayer.updateParent(this._drawId,t.drawLayer);return}this._drawingOptions.updateAll(),this._drawId=this.#h(this.#t,t)}}#g([t,i,a,r]){const{parentDimensions:[c,u],rotation:h}=this;switch(h){case 90:return[i,1-t,a*(u/c),r*(c/u)];case 180:return[1-t,1-i,a,r];case 270:return[1-i,t,a*(u/c),r*(c/u)];default:return[t,i,a,r]}}#f(){const{x:t,y:i,width:a,height:r,parentDimensions:[c,u],rotation:h}=this;switch(h){case 90:return[1-i,t,a*(c/u),r*(u/c)];case 180:return[1-t,1-i,a,r];case 270:return[i,1-t,a*(c/u),r*(u/c)];default:return[t,i,a,r]}}#d(t){if([this.x,this.y,this.width,this.height]=this.#g(t),this.div){this.fixAndSetPosition();const[i,a]=this.parentDimensions;this.setDims(this.width*i,this.height*a)}this._onResized()}#m(){const{x:t,y:i,width:a,height:r,rotation:c,parentRotation:u,parentDimensions:[h,p]}=this;switch((c*4+u)/90){case 1:return[1-i-r,t,r,a];case 2:return[1-t-a,1-i-r,a,r];case 3:return[i,1-t-a,r,a];case 4:return[t,i-a*(h/p),r*(p/h),a*(h/p)];case 5:return[1-i,t,a*(h/p),r*(p/h)];case 6:return[1-t-r*(p/h),1-i,r*(p/h),a*(h/p)];case 7:return[i-a*(h/p),1-t-r*(p/h),a*(h/p),r*(p/h)];case 8:return[t-a,i-r,a,r];case 9:return[1-i,t-a,r,a];case 10:return[1-t,1-i,a,r];case 11:return[i-r,1-t,r,a];case 12:return[t-r*(p/h),i,r*(p/h),a*(h/p)];case 13:return[1-i-a*(h/p),t-r*(p/h),a*(h/p),r*(p/h)];case 14:return[1-t,1-i-a*(h/p),r*(p/h),a*(h/p)];case 15:return[i,1-t,a*(h/p),r*(p/h)];default:return[t,i,a,r]}}rotate(){this.parent&&this.parent.drawLayer.updateProperties(this._drawId,St._mergeSVGProperties({bbox:this.#m()},this.#t.updateRotation((this.parentRotation-this.rotation+360)%360)))}onScaleChanging(){this.parent&&this.#d(this.#t.updateParentDimensions(this.parentDimensions,this.parent.scale))}static onScaleChangingWhenDrawing(){}render(){if(this.div)return this.div;let t,i;this._isCopy&&(t=this.x,i=this.y);const a=super.render();a.classList.add("draw");const r=document.createElement("div");a.append(r),r.setAttribute("aria-hidden","true"),r.className="internal";const[c,u]=this.parentDimensions;return this.setDims(this.width*c,this.height*u),this._uiManager.addShouldRescale(this),this.disableEditing(),this._isCopy&&this._moveAfterPaste(t,i),a}static createDrawerInstance(t,i,a,r,c){ie("Not implemented")}static startDrawing(t,i,a,r){const{target:c,offsetX:u,offsetY:h,pointerId:p,pointerType:m}=r;if(St.#r&&St.#r!==m)return;const{viewport:{rotation:g}}=t,{width:y,height:b}=c.getBoundingClientRect(),S=St.#i=new AbortController,A=t.combinedSignal(S);if(St.#s||=p,St.#r??=m,window.addEventListener("pointerup",_=>{St.#s===_.pointerId?this._endDraw(_):St.#o?.delete(_.pointerId)},{signal:A}),window.addEventListener("pointercancel",_=>{St.#s===_.pointerId?this._currentParent.endDrawingSession():St.#o?.delete(_.pointerId)},{signal:A}),window.addEventListener("pointerdown",_=>{St.#r===_.pointerType&&((St.#o||=new Set).add(_.pointerId),St.#n.isCancellable()&&(St.#n.removeLastElement(),St.#n.isEmpty()?this._currentParent.endDrawingSession(!0):this._endDraw(null)))},{capture:!0,passive:!1,signal:A}),window.addEventListener("contextmenu",Yn,{signal:A}),c.addEventListener("pointermove",this._drawMove.bind(this),{signal:A}),c.addEventListener("touchmove",_=>{_.timeStamp===St.#u&&Oe(_)},{signal:A}),t.toggleDrawing(),i._editorUndoBar?.hide(),St.#n){t.drawLayer.updateProperties(this._currentDrawId,St.#n.startNew(u,h,y,b,g));return}i.updateUIForDefaultProperties(this),St.#n=this.createDrawerInstance(u,h,y,b,g),St.#a=this.getDefaultDrawingOptions(),this._currentParent=t,{id:this._currentDrawId}=t.drawLayer.draw(this._mergeSVGProperties(St.#a.toSVGProperties(),St.#n.defaultSVGProperties),!0,!1)}static _drawMove(t){if(St.#u=-1,!St.#n)return;const{offsetX:i,offsetY:a,pointerId:r}=t;if(St.#s===r){if(St.#o?.size>=1){this._endDraw(t);return}this._currentParent.drawLayer.updateProperties(this._currentDrawId,St.#n.add(i,a)),St.#u=t.timeStamp,Oe(t)}}static _cleanup(t){t&&(this._currentDrawId=-1,this._currentParent=null,St.#n=null,St.#a=null,St.#r=null,St.#u=NaN),St.#i&&(St.#i.abort(),St.#i=null,St.#s=NaN,St.#o=null)}static _endDraw(t){const i=this._currentParent;if(i){if(i.toggleDrawing(!0),this._cleanup(!1),t?.target===i.div&&i.drawLayer.updateProperties(this._currentDrawId,St.#n.end(t.offsetX,t.offsetY)),this.supportMultipleDrawings){const a=St.#n,r=this._currentDrawId,c=a.getLastElement();i.addCommands({cmd:()=>{i.drawLayer.updateProperties(r,a.setLastElement(c))},undo:()=>{i.drawLayer.updateProperties(r,a.removeLastElement())},mustExec:!1,type:$t.DRAW_STEP});return}this.endDrawing(!1)}}static endDrawing(t){const i=this._currentParent;if(!i)return null;if(i.toggleDrawing(!0),i.cleanUndoStack($t.DRAW_STEP),!St.#n.isEmpty()){const{pageDimensions:[a,r],scale:c}=i,u=i.createAndAddNewEditor({offsetX:0,offsetY:0},!1,{drawId:this._currentDrawId,drawOutlines:St.#n.getOutlines(a*c,r*c,c,this._INNER_MARGIN),drawingOptions:St.#a,mustBeCommitted:!t});return this._cleanup(!0),u}return i.drawLayer.remove(this._currentDrawId),this._cleanup(!0),null}createDrawingOptions(t){}static deserializeDraw(t,i,a,r,c,u){ie("Not implemented")}static async deserialize(t,i,a){const{rawDims:{pageWidth:r,pageHeight:c,pageX:u,pageY:h}}=i.viewport,p=this.deserializeDraw(u,h,r,c,this._INNER_MARGIN,t),m=await super.deserialize(t,i,a);return m.createDrawingOptions(t),m.#c({drawOutlines:p}),m.#p(),m.onScaleChanging(),m.rotate(),m}serializeDraw(t){const[i,a]=this.pageTranslation,[r,c]=this.pageDimensions;return this.#t.serialize([i,a,r,c],t)}renderAnnotationElement(t){return t.updateEdited({rect:this.getRect(0,0)}),null}static canCreateNewEmptyEditor(){return!1}}class ZO{#t=new Float64Array(6);#e;#n;#i;#a;#s;#r="";#o=0;#u=new cl;#c;#h;constructor(t,i,a,r,c,u){this.#c=a,this.#h=r,this.#i=c,this.#a=u,[t,i]=this.#l(t,i);const h=this.#e=[NaN,NaN,NaN,NaN,t,i];this.#s=[t,i],this.#n=[{line:h,points:this.#s}],this.#t.set(h,0)}updateProperty(t,i){t==="stroke-width"&&(this.#a=i)}#l(t,i){return ot._normalizePoint(t,i,this.#c,this.#h,this.#i)}isEmpty(){return!this.#n||this.#n.length===0}isCancellable(){return this.#s.length<=10}add(t,i){[t,i]=this.#l(t,i);const[a,r,c,u]=this.#t.subarray(2,6),h=t-c,p=i-u;return Math.hypot(this.#c*h,this.#h*p)<=2?null:(this.#s.push(t,i),isNaN(a)?(this.#t.set([c,u,t,i],2),this.#e.push(NaN,NaN,NaN,NaN,t,i),{path:{d:this.toSVGPath()}}):(isNaN(this.#t[0])&&this.#e.splice(6,6),this.#t.set([a,r,c,u,t,i],0),this.#e.push(...ot.createBezierPoints(a,r,c,u,t,i)),{path:{d:this.toSVGPath()}}))}end(t,i){const a=this.add(t,i);return a||(this.#s.length===2?{path:{d:this.toSVGPath()}}:null)}startNew(t,i,a,r,c){this.#c=a,this.#h=r,this.#i=c,[t,i]=this.#l(t,i);const u=this.#e=[NaN,NaN,NaN,NaN,t,i];this.#s=[t,i];const h=this.#n.at(-1);return h&&(h.line=new Float32Array(h.line),h.points=new Float32Array(h.points)),this.#n.push({line:u,points:this.#s}),this.#t.set(u,0),this.#o=0,this.toSVGPath(),null}getLastElement(){return this.#n.at(-1)}setLastElement(t){return this.#n?(this.#n.push(t),this.#e=t.line,this.#s=t.points,this.#o=0,{path:{d:this.toSVGPath()}}):this.#u.setLastElement(t)}removeLastElement(){if(!this.#n)return this.#u.removeLastElement();this.#n.pop(),this.#r="";for(let t=0,i=this.#n.length;t<i;t++){const{line:a,points:r}=this.#n[t];this.#e=a,this.#s=r,this.#o=0,this.toSVGPath()}return{path:{d:this.#r}}}toSVGPath(){const t=ot.svgRound(this.#e[4]),i=ot.svgRound(this.#e[5]);if(this.#s.length===2)return this.#r=`${this.#r} M ${t} ${i} Z`,this.#r;if(this.#s.length<=6){const r=this.#r.lastIndexOf("M");this.#r=`${this.#r.slice(0,r)} M ${t} ${i}`,this.#o=6}if(this.#s.length===4){const r=ot.svgRound(this.#e[10]),c=ot.svgRound(this.#e[11]);return this.#r=`${this.#r} L ${r} ${c}`,this.#o=12,this.#r}const a=[];this.#o===0&&(a.push(`M ${t} ${i}`),this.#o=6);for(let r=this.#o,c=this.#e.length;r<c;r+=6){const[u,h,p,m,g,y]=this.#e.slice(r,r+6).map(ot.svgRound);a.push(`C${u} ${h} ${p} ${m} ${g} ${y}`)}return this.#r+=a.join(" "),this.#o=this.#e.length,this.#r}getOutlines(t,i,a,r){const c=this.#n.at(-1);return c.line=new Float32Array(c.line),c.points=new Float32Array(c.points),this.#u.build(this.#n,t,i,a,this.#i,this.#a,r),this.#t=null,this.#e=null,this.#n=null,this.#r=null,this.#u}get defaultSVGProperties(){return{root:{viewBox:"0 0 10000 10000"},rootClass:{draw:!0},bbox:[0,0,1,1]}}}class cl extends ot{#t;#e=0;#n;#i;#a;#s;#r;#o;#u;build(t,i,a,r,c,u,h){this.#a=i,this.#s=a,this.#r=r,this.#o=c,this.#u=u,this.#n=h??0,this.#i=t,this.#l()}get thickness(){return this.#u}setLastElement(t){return this.#i.push(t),{path:{d:this.toSVGPath()}}}removeLastElement(){return this.#i.pop(),{path:{d:this.toSVGPath()}}}toSVGPath(){const t=[];for(const{line:i}of this.#i){if(t.push(`M${ot.svgRound(i[4])} ${ot.svgRound(i[5])}`),i.length===6){t.push("Z");continue}if(i.length===12&&isNaN(i[6])){t.push(`L${ot.svgRound(i[10])} ${ot.svgRound(i[11])}`);continue}for(let a=6,r=i.length;a<r;a+=6){const[c,u,h,p,m,g]=i.subarray(a,a+6).map(ot.svgRound);t.push(`C${c} ${u} ${h} ${p} ${m} ${g}`)}}return t.join("")}serialize([t,i,a,r],c){const u=[],h=[],[p,m,g,y]=this.#h();let b,S,A,_,R,C,N,O,U;switch(this.#o){case 0:U=ot._rescale,b=t,S=i+r,A=a,_=-r,R=t+p*a,C=i+(1-m-y)*r,N=t+(p+g)*a,O=i+(1-m)*r;break;case 90:U=ot._rescaleAndSwap,b=t,S=i,A=a,_=r,R=t+m*a,C=i+p*r,N=t+(m+y)*a,O=i+(p+g)*r;break;case 180:U=ot._rescale,b=t+a,S=i,A=-a,_=r,R=t+(1-p-g)*a,C=i+m*r,N=t+(1-p)*a,O=i+(m+y)*r;break;case 270:U=ot._rescaleAndSwap,b=t+a,S=i+r,A=-a,_=-r,R=t+(1-m-y)*a,C=i+(1-p-g)*r,N=t+(1-m)*a,O=i+(1-p)*r;break}for(const{line:I,points:j}of this.#i)u.push(U(I,b,S,A,_,c?new Array(I.length):null)),h.push(U(j,b,S,A,_,c?new Array(j.length):null));return{lines:u,points:h,rect:[R,C,N,O]}}static deserialize(t,i,a,r,c,{paths:{lines:u,points:h},rotation:p,thickness:m}){const g=[];let y,b,S,A,_;switch(p){case 0:_=ot._rescale,y=-t/a,b=i/r+1,S=1/a,A=-1/r;break;case 90:_=ot._rescaleAndSwap,y=-i/r,b=-t/a,S=1/r,A=1/a;break;case 180:_=ot._rescale,y=t/a+1,b=-i/r,S=-1/a,A=1/r;break;case 270:_=ot._rescaleAndSwap,y=i/r+1,b=t/a+1,S=-1/r,A=-1/a;break}if(!u){u=[];for(const C of h){const N=C.length;if(N===2){u.push(new Float32Array([NaN,NaN,NaN,NaN,C[0],C[1]]));continue}if(N===4){u.push(new Float32Array([NaN,NaN,NaN,NaN,C[0],C[1],NaN,NaN,NaN,NaN,C[2],C[3]]));continue}const O=new Float32Array(3*(N-2));u.push(O);let[U,I,j,F]=C.subarray(0,4);O.set([NaN,NaN,NaN,NaN,U,I],0);for(let J=4;J<N;J+=2){const X=C[J],at=C[J+1];O.set(ot.createBezierPoints(U,I,j,F,X,at),(J-2)*3),[U,I,j,F]=[j,F,X,at]}}}for(let C=0,N=u.length;C<N;C++)g.push({line:_(u[C].map(O=>O??NaN),y,b,S,A),points:_(h[C].map(O=>O??NaN),y,b,S,A)});const R=new this.prototype.constructor;return R.build(g,a,r,1,p,m,c),R}#c(t=this.#u){const i=this.#n+t/2*this.#r;return this.#o%180===0?[i/this.#a,i/this.#s]:[i/this.#s,i/this.#a]}#h(){const[t,i,a,r]=this.#t,[c,u]=this.#c(0);return[t+c,i+u,a-2*c,r-2*u]}#l(){const t=this.#t=new Float32Array([1/0,1/0,-1/0,-1/0]);for(const{line:r}of this.#i){if(r.length<=12){for(let h=4,p=r.length;h<p;h+=6)mt.pointBoundingBox(r[h],r[h+1],t);continue}let c=r[4],u=r[5];for(let h=6,p=r.length;h<p;h+=6){const[m,g,y,b,S,A]=r.subarray(h,h+6);mt.bezierBoundingBox(c,u,m,g,y,b,S,A,t),c=S,u=A}}const[i,a]=this.#c();t[0]=dn(t[0]-i,0,1),t[1]=dn(t[1]-a,0,1),t[2]=dn(t[2]+i,0,1),t[3]=dn(t[3]+a,0,1),t[2]-=t[0],t[3]-=t[1]}get box(){return this.#t}updateProperty(t,i){return t==="stroke-width"?this.#p(i):null}#p(t){const[i,a]=this.#c();this.#u=t;const[r,c]=this.#c(),[u,h]=[r-i,c-a],p=this.#t;return p[0]-=u,p[1]-=h,p[2]+=2*u,p[3]+=2*h,p}updateParentDimensions([t,i],a){const[r,c]=this.#c();this.#a=t,this.#s=i,this.#r=a;const[u,h]=this.#c(),p=u-r,m=h-c,g=this.#t;return g[0]-=p,g[1]-=m,g[2]+=2*p,g[3]+=2*m,g}updateRotation(t){return this.#e=t,{path:{transform:this.rotationTransform}}}get viewBox(){return this.#t.map(ot.svgRound).join(" ")}get defaultProperties(){const[t,i]=this.#t;return{root:{viewBox:this.viewBox},path:{"transform-origin":`${ot.svgRound(t)} ${ot.svgRound(i)}`}}}get rotationTransform(){const[,,t,i]=this.#t;let a=0,r=0,c=0,u=0,h=0,p=0;switch(this.#e){case 90:r=i/t,c=-t/i,h=t;break;case 180:a=-1,u=-1,h=t,p=i;break;case 270:r=-i/t,c=t/i,p=i;break;default:return""}return`matrix(${a} ${r} ${c} ${u} ${ot.svgRound(h)} ${ot.svgRound(p)})`}getPathResizingSVGProperties([t,i,a,r]){const[c,u]=this.#c(),[h,p,m,g]=this.#t;if(Math.abs(m-c)<=ot.PRECISION||Math.abs(g-u)<=ot.PRECISION){const _=t+a/2-(h+m/2),R=i+r/2-(p+g/2);return{path:{"transform-origin":`${ot.svgRound(t)} ${ot.svgRound(i)}`,transform:`${this.rotationTransform} translate(${_} ${R})`}}}const y=(a-2*c)/(m-2*c),b=(r-2*u)/(g-2*u),S=m/a,A=g/r;return{path:{"transform-origin":`${ot.svgRound(h)} ${ot.svgRound(p)}`,transform:`${this.rotationTransform} scale(${S} ${A}) translate(${ot.svgRound(c)} ${ot.svgRound(u)}) scale(${y} ${b}) translate(${ot.svgRound(-c)} ${ot.svgRound(-u)})`}}}getPathResizedSVGProperties([t,i,a,r]){const[c,u]=this.#c(),h=this.#t,[p,m,g,y]=h;if(h[0]=t,h[1]=i,h[2]=a,h[3]=r,Math.abs(g-c)<=ot.PRECISION||Math.abs(y-u)<=ot.PRECISION){const R=t+a/2-(p+g/2),C=i+r/2-(m+y/2);for(const{line:N,points:O}of this.#i)ot._translate(N,R,C,N),ot._translate(O,R,C,O);return{root:{viewBox:this.viewBox},path:{"transform-origin":`${ot.svgRound(t)} ${ot.svgRound(i)}`,transform:this.rotationTransform||null,d:this.toSVGPath()}}}const b=(a-2*c)/(g-2*c),S=(r-2*u)/(y-2*u),A=-b*(p+c)+t+c,_=-S*(m+u)+i+u;if(b!==1||S!==1||A!==0||_!==0)for(const{line:R,points:C}of this.#i)ot._rescale(R,A,_,b,S,R),ot._rescale(C,A,_,b,S,C);return{root:{viewBox:this.viewBox},path:{"transform-origin":`${ot.svgRound(t)} ${ot.svgRound(i)}`,transform:this.rotationTransform||null,d:this.toSVGPath()}}}getPathTranslatedSVGProperties([t,i],a){const[r,c]=a,u=this.#t,h=t-u[0],p=i-u[1];if(this.#a===r&&this.#s===c)for(const{line:m,points:g}of this.#i)ot._translate(m,h,p,m),ot._translate(g,h,p,g);else{const m=this.#a/r,g=this.#s/c;this.#a=r,this.#s=c;for(const{line:y,points:b}of this.#i)ot._rescale(y,h,p,m,g,y),ot._rescale(b,h,p,m,g,b);u[2]*=m,u[3]*=g}return u[0]=t,u[1]=i,{root:{viewBox:this.viewBox},path:{d:this.toSVGPath(),"transform-origin":`${ot.svgRound(t)} ${ot.svgRound(i)}`}}}get defaultSVGProperties(){const t=this.#t;return{root:{viewBox:this.viewBox},rootClass:{draw:!0},path:{d:this.toSVGPath(),"transform-origin":`${ot.svgRound(t[0])} ${ot.svgRound(t[1])}`,transform:this.rotationTransform||null},bbox:t}}}class Ou extends B0{constructor(t){super(),this._viewParameters=t,super.updateProperties({fill:"none",stroke:yt._defaultLineColor,"stroke-opacity":1,"stroke-width":1,"stroke-linecap":"round","stroke-linejoin":"round","stroke-miterlimit":10})}updateSVGProperty(t,i){t==="stroke-width"&&(i??=this["stroke-width"],i*=this._viewParameters.realScale),super.updateSVGProperty(t,i)}clone(){const t=new Ou(this._viewParameters);return t.updateAll(this),t}}class op extends St{static _type="ink";static _editorType=wt.INK;static _defaultDrawingOptions=null;constructor(t){super({...t,name:"inkEditor"}),this._willKeepAspectRatio=!0,this.defaultL10nId="pdfjs-editor-ink-editor"}static initialize(t,i){yt.initialize(t,i),this._defaultDrawingOptions=new Ou(i.viewParameters)}static getDefaultDrawingOptions(t){const i=this._defaultDrawingOptions.clone();return i.updateProperties(t),i}static get supportMultipleDrawings(){return!0}static get typesMap(){return zt(this,"typesMap",new Map([[$t.INK_THICKNESS,"stroke-width"],[$t.INK_COLOR,"stroke"],[$t.INK_OPACITY,"stroke-opacity"]]))}static createDrawerInstance(t,i,a,r,c){return new ZO(t,i,a,r,c,this._defaultDrawingOptions["stroke-width"])}static deserializeDraw(t,i,a,r,c,u){return cl.deserialize(t,i,a,r,c,u)}static async deserialize(t,i,a){let r=null;if(t instanceof ip){const{data:{inkLists:u,rect:h,rotation:p,id:m,color:g,opacity:y,borderStyle:{rawWidth:b},popupRef:S,contentsObj:A},parent:{page:{pageNumber:_}}}=t;r=t={annotationType:wt.INK,color:Array.from(g),thickness:b,opacity:y,paths:{points:u},boxes:null,pageIndex:_-1,rect:h.slice(0),rotation:p,annotationElementId:m,id:m,deleted:!1,popupRef:S,comment:A?.str||null}}const c=await super.deserialize(t,i,a);return c._initialData=r,t.comment&&c.setCommentData(t.comment),c}get toolbarButtons(){return this._colorPicker||=new ol(this),[["colorPicker",this._colorPicker]]}get colorType(){return $t.INK_COLOR}get colorValue(){return this._drawingOptions.stroke}onScaleChanging(){if(!this.parent)return;super.onScaleChanging();const{_drawId:t,_drawingOptions:i,parent:a}=this;i.updateSVGProperty("stroke-width"),a.drawLayer.updateProperties(t,i.toSVGProperties())}static onScaleChangingWhenDrawing(){const t=this._currentParent;t&&(super.onScaleChangingWhenDrawing(),this._defaultDrawingOptions.updateSVGProperty("stroke-width"),t.drawLayer.updateProperties(this._currentDrawId,this._defaultDrawingOptions.toSVGProperties()))}createDrawingOptions({color:t,thickness:i,opacity:a}){this._drawingOptions=op.getDefaultDrawingOptions({stroke:mt.makeHexColor(...t),"stroke-width":i,"stroke-opacity":a})}serialize(t=!1){if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();const{lines:i,points:a,rect:r}=this.serializeDraw(t),{_drawingOptions:{stroke:c,"stroke-opacity":u,"stroke-width":h}}=this,p={annotationType:wt.INK,color:yt._colorManager.convert(c),opacity:u,thickness:h,paths:{lines:i,points:a},pageIndex:this.pageIndex,rect:r,rotation:this.rotation,structTreeParentId:this._structTreeParentId};return this.addComment(p),t?(p.isCopy=!0,p):this.annotationElementId&&!this.#t(p)?null:(p.id=this.annotationElementId,p)}#t(t){const{color:i,thickness:a,opacity:r,pageIndex:c}=this._initialData;return this.hasEditedComment||this._hasBeenMoved||this._hasBeenResized||t.color.some((u,h)=>u!==i[h])||t.thickness!==a||t.opacity!==r||t.pageIndex!==c}renderAnnotationElement(t){const{points:i,rect:a}=this.serializeDraw(!1),r={rect:a,thickness:this._drawingOptions["stroke-width"],points:i};return this.hasEditedComment&&(r.popup=this.comment),t.updateEdited(r),null}}class lp extends cl{toSVGPath(){let t=super.toSVGPath();return t.endsWith("Z")||(t+="Z"),t}}const ku=8,ul=3;class Mr{static#t={maxDim:512,sigmaSFactor:.02,sigmaR:25,kernelSize:16};static#e(t,i,a,r){return a-=t,r-=i,a===0?r>0?0:4:a===1?r+6:2-r}static#n=new Int32Array([0,1,-1,1,-1,0,-1,-1,0,-1,1,-1,1,0,1,1]);static#i(t,i,a,r,c,u,h){const p=this.#e(a,r,c,u);for(let m=0;m<8;m++){const g=(-m+p-h+16)%8,y=this.#n[2*g],b=this.#n[2*g+1];if(t[(a+y)*i+(r+b)]!==0)return g}return-1}static#a(t,i,a,r,c,u,h){const p=this.#e(a,r,c,u);for(let m=0;m<8;m++){const g=(m+p+h+16)%8,y=this.#n[2*g],b=this.#n[2*g+1];if(t[(a+y)*i+(r+b)]!==0)return g}return-1}static#s(t,i,a,r){const c=t.length,u=new Int32Array(c);for(let g=0;g<c;g++)u[g]=t[g]<=r?1:0;for(let g=1;g<a-1;g++)u[g*i]=u[g*i+i-1]=0;for(let g=0;g<i;g++)u[g]=u[i*a-1-g]=0;let h=1,p;const m=[];for(let g=1;g<a-1;g++){p=1;for(let y=1;y<i-1;y++){const b=g*i+y,S=u[b];if(S===0)continue;let A=g,_=y;if(S===1&&u[b-1]===0)h+=1,_-=1;else if(S>=1&&u[b+1]===0)h+=1,_+=1,S>1&&(p=S);else{S!==1&&(p=Math.abs(S));continue}const R=[y,g],C=_===y+1,N={isHole:C,points:R,id:h,parent:0};m.push(N);let O;for(const K of m)if(K.id===p){O=K;break}O?O.isHole?N.parent=C?O.parent:p:N.parent=C?p:O.parent:N.parent=C?p:0;const U=this.#i(u,i,g,y,A,_,0);if(U===-1){u[b]=-h,u[b]!==1&&(p=Math.abs(u[b]));continue}let I=this.#n[2*U],j=this.#n[2*U+1];const F=g+I,J=y+j;A=F,_=J;let X=g,at=y;for(;;){const K=this.#a(u,i,X,at,A,_,1);I=this.#n[2*K],j=this.#n[2*K+1];const lt=X+I,Et=at+j;R.push(Et,lt);const bt=X*i+at;if(u[bt+1]===0?u[bt]=-h:u[bt]===1&&(u[bt]=h),lt===g&&Et===y&&X===F&&at===J){u[b]!==1&&(p=Math.abs(u[b]));break}else A=X,_=at,X=lt,at=Et}}}return m}static#r(t,i,a,r){if(a-i<=4){for(let F=i;F<a-2;F+=2)r.push(t[F],t[F+1]);return}const c=t[i],u=t[i+1],h=t[a-4]-c,p=t[a-3]-u,m=Math.hypot(h,p),g=h/m,y=p/m,b=g*u-y*c,S=p/h,A=1/m,_=Math.atan(S),R=Math.cos(_),C=Math.sin(_),N=A*(Math.abs(R)+Math.abs(C)),O=A*(1-N+N**2),U=Math.max(Math.atan(Math.abs(C+R)*O),Math.atan(Math.abs(C-R)*O));let I=0,j=i;for(let F=i+2;F<a-2;F+=2){const J=Math.abs(b-g*t[F+1]+y*t[F]);J>I&&(j=F,I=J)}I>(m*U)**2?(this.#r(t,i,j+2,r),this.#r(t,j,a,r)):r.push(c,u)}static#o(t){const i=[],a=t.length;return this.#r(t,0,a,i),i.push(t[a-2],t[a-1]),i.length<=4?null:i}static#u(t,i,a,r,c,u){const h=new Float32Array(u**2),p=-2*r**2,m=u>>1;for(let _=0;_<u;_++){const R=(_-m)**2;for(let C=0;C<u;C++)h[_*u+C]=Math.exp((R+(C-m)**2)/p)}const g=new Float32Array(256),y=-2*c**2;for(let _=0;_<256;_++)g[_]=Math.exp(_**2/y);const b=t.length,S=new Uint8Array(b),A=new Uint32Array(256);for(let _=0;_<a;_++)for(let R=0;R<i;R++){const C=_*i+R,N=t[C];let O=0,U=0;for(let j=0;j<u;j++){const F=_+j-m;if(!(F<0||F>=a))for(let J=0;J<u;J++){const X=R+J-m;if(X<0||X>=i)continue;const at=t[F*i+X],K=h[j*u+J]*g[Math.abs(at-N)];O+=at*K,U+=K}}const I=S[C]=Math.round(O/U);A[I]++}return[S,A]}static#c(t){const i=new Uint32Array(256);for(const a of t)i[a]++;return i}static#h(t){const i=t.length,a=new Uint8ClampedArray(i>>2);let r=-1/0,c=1/0;for(let h=0,p=a.length;h<p;h++){const m=a[h]=t[h<<2];r=Math.max(r,m),c=Math.min(c,m)}const u=255/(r-c);for(let h=0,p=a.length;h<p;h++)a[h]=(a[h]-c)*u;return a}static#l(t){let i,a=-1/0,r=-1/0;const c=t.findIndex(p=>p!==0);let u=c,h=c;for(i=c;i<256;i++){const p=t[i];p>a&&(i-u>r&&(r=i-u,h=i-1),a=p,u=i)}for(i=h-1;i>=0&&!(t[i]>t[i+1]);i--);return i}static#p(t){const i=t,{width:a,height:r}=t,{maxDim:c}=this.#t;let u=a,h=r;if(a>c||r>c){let b=a,S=r,A=Math.log2(Math.max(a,r)/c);const _=Math.floor(A);A=A===_?_-1:_;for(let C=0;C<A;C++){u=Math.ceil(b/2),h=Math.ceil(S/2);const N=new OffscreenCanvas(u,h);N.getContext("2d").drawImage(t,0,0,b,S,0,0,u,h),b=u,S=h,t!==i&&t.close(),t=N.transferToImageBitmap()}const R=Math.min(c/u,c/h);u=Math.round(u*R),h=Math.round(h*R)}const m=new OffscreenCanvas(u,h).getContext("2d",{willReadFrequently:!0});m.fillStyle="white",m.fillRect(0,0,u,h),m.filter="grayscale(1)",m.drawImage(t,0,0,t.width,t.height,0,0,u,h);const g=m.getImageData(0,0,u,h).data;return[this.#h(g),u,h]}static extractContoursFromText(t,{fontFamily:i,fontStyle:a,fontWeight:r},c,u,h,p){let m=new OffscreenCanvas(1,1),g=m.getContext("2d",{alpha:!1});const y=200,b=g.font=`${a} ${r} ${y}px ${i}`,{actualBoundingBoxLeft:S,actualBoundingBoxRight:A,actualBoundingBoxAscent:_,actualBoundingBoxDescent:R,fontBoundingBoxAscent:C,fontBoundingBoxDescent:N,width:O}=g.measureText(t),U=1.5,I=Math.ceil(Math.max(Math.abs(S)+Math.abs(A)||0,O)*U),j=Math.ceil(Math.max(Math.abs(_)+Math.abs(R)||y,Math.abs(C)+Math.abs(N)||y)*U);m=new OffscreenCanvas(I,j),g=m.getContext("2d",{alpha:!0,willReadFrequently:!0}),g.font=b,g.filter="grayscale(1)",g.fillStyle="white",g.fillRect(0,0,I,j),g.fillStyle="black",g.fillText(t,I*(U-1)/2,j*(3-U)/2);const F=this.#h(g.getImageData(0,0,I,j).data),J=this.#c(F),X=this.#l(J),at=this.#s(F,I,j,X);return this.processDrawnLines({lines:{curves:at,width:I,height:j},pageWidth:c,pageHeight:u,rotation:h,innerMargin:p,mustSmooth:!0,areContours:!0})}static process(t,i,a,r,c){const[u,h,p]=this.#p(t),[m,g]=this.#u(u,h,p,Math.hypot(h,p)*this.#t.sigmaSFactor,this.#t.sigmaR,this.#t.kernelSize),y=this.#l(g),b=this.#s(m,h,p,y);return this.processDrawnLines({lines:{curves:b,width:h,height:p},pageWidth:i,pageHeight:a,rotation:r,innerMargin:c,mustSmooth:!0,areContours:!0})}static processDrawnLines({lines:t,pageWidth:i,pageHeight:a,rotation:r,innerMargin:c,mustSmooth:u,areContours:h}){r%180!==0&&([i,a]=[a,i]);const{curves:p,width:m,height:g}=t,y=t.thickness??0,b=[],S=Math.min(i/m,a/g),A=S/i,_=S/a,R=[];for(const{points:N}of p){const O=u?this.#o(N):N;if(!O)continue;R.push(O);const U=O.length,I=new Float32Array(U),j=new Float32Array(3*(U===2?2:U-2));if(b.push({line:j,points:I}),U===2){I[0]=O[0]*A,I[1]=O[1]*_,j.set([NaN,NaN,NaN,NaN,I[0],I[1]],0);continue}let[F,J,X,at]=O;F*=A,J*=_,X*=A,at*=_,I.set([F,J,X,at],0),j.set([NaN,NaN,NaN,NaN,F,J],0);for(let K=4;K<U;K+=2){const lt=I[K]=O[K]*A,Et=I[K+1]=O[K+1]*_;j.set(ot.createBezierPoints(F,J,X,at,lt,Et),(K-2)*3),[F,J,X,at]=[X,at,lt,Et]}}if(b.length===0)return null;const C=h?new lp:new cl;return C.build(b,i,a,1,r,h?0:y,c),{outline:C,newCurves:R,areContours:h,thickness:y,width:m,height:g}}static async compressSignature({outlines:t,areContours:i,thickness:a,width:r,height:c}){let u=1/0,h=-1/0,p=0;for(const O of t){p+=O.length;for(let U=2,I=O.length;U<I;U++){const j=O[U]-O[U-2];u=Math.min(u,j),h=Math.max(h,j)}}let m;u>=-128&&h<=127?m=Int8Array:u>=-32768&&h<=32767?m=Int16Array:m=Int32Array;const g=t.length,y=ku+ul*g,b=new Uint32Array(y);let S=0;b[S++]=y*Uint32Array.BYTES_PER_ELEMENT+(p-2*g)*m.BYTES_PER_ELEMENT,b[S++]=0,b[S++]=r,b[S++]=c,b[S++]=i?0:1,b[S++]=Math.max(0,Math.floor(a??0)),b[S++]=g,b[S++]=m.BYTES_PER_ELEMENT;for(const O of t)b[S++]=O.length-2,b[S++]=O[0],b[S++]=O[1];const A=new CompressionStream("deflate-raw"),_=A.writable.getWriter();await _.ready,_.write(b);const R=m.prototype.constructor;for(const O of t){const U=new R(O.length-2);for(let I=2,j=O.length;I<j;I++)U[I-2]=O[I]-O[I-2];_.write(U)}_.close();const C=await new Response(A.readable).arrayBuffer(),N=new Uint8Array(C);return Qv(N)}static async decompressSignature(t){try{const i=EM(t),{readable:a,writable:r}=new DecompressionStream("deflate-raw"),c=r.getWriter();await c.ready,c.write(i).then(async()=>{await c.ready,await c.close()}).catch(()=>{});let u=null,h=0;for await(const O of a)u||=new Uint8Array(new Uint32Array(O.buffer,0,4)[0]),u.set(O,h),h+=O.length;const p=new Uint32Array(u.buffer,0,u.length>>2),m=p[1];if(m!==0)throw new Error(`Invalid version: ${m}`);const g=p[2],y=p[3],b=p[4]===0,S=p[5],A=p[6],_=p[7],R=[],C=(ku+ul*A)*Uint32Array.BYTES_PER_ELEMENT;let N;switch(_){case Int8Array.BYTES_PER_ELEMENT:N=new Int8Array(u.buffer,C);break;case Int16Array.BYTES_PER_ELEMENT:N=new Int16Array(u.buffer,C);break;case Int32Array.BYTES_PER_ELEMENT:N=new Int32Array(u.buffer,C);break}h=0;for(let O=0;O<A;O++){const U=p[ul*O+ku],I=new Float32Array(U+2);R.push(I);for(let j=0;j<ul-1;j++)I[j]=p[ul*O+ku+j+1];for(let j=0;j<U;j++)I[j+2]=I[j]+N[h++]}return{areContours:b,thickness:S,outlines:R,width:g,height:y}}catch(i){return Ct(`decompressSignature: ${i}`),null}}}class cp extends B0{constructor(){super(),super.updateProperties({fill:yt._defaultLineColor,"stroke-width":0})}clone(){const t=new cp;return t.updateAll(this),t}}class up extends Ou{constructor(t){super(t),super.updateProperties({stroke:yt._defaultLineColor,"stroke-width":1})}clone(){const t=new up(this._viewParameters);return t.updateAll(this),t}}class Oi extends St{#t=!1;#e=null;#n=null;#i=null;static _type="signature";static _editorType=wt.SIGNATURE;static _defaultDrawingOptions=null;constructor(t){super({...t,mustBeCommitted:!0,name:"signatureEditor"}),this._willKeepAspectRatio=!0,this.#n=t.signatureData||null,this.#e=null,this.defaultL10nId="pdfjs-editor-signature-editor1"}static initialize(t,i){yt.initialize(t,i),this._defaultDrawingOptions=new cp,this._defaultDrawnSignatureOptions=new up(i.viewParameters)}static getDefaultDrawingOptions(t){const i=this._defaultDrawingOptions.clone();return i.updateProperties(t),i}static get supportMultipleDrawings(){return!1}static get typesMap(){return zt(this,"typesMap",new Map)}static get isDrawer(){return!1}get telemetryFinalData(){return{type:"signature",hasDescription:!!this.#e}}static computeTelemetryFinalData(t){const i=t.get("hasDescription");return{hasAltText:i.get(!0)??0,hasNoAltText:i.get(!1)??0}}get isResizable(){return!0}onScaleChanging(){this._drawId!==null&&super.onScaleChanging()}render(){if(this.div)return this.div;let t,i;const{_isCopy:a}=this;if(a&&(this._isCopy=!1,t=this.x,i=this.y),super.render(),this._drawId===null)if(this.#n){const{lines:r,mustSmooth:c,areContours:u,description:h,uuid:p,heightInPage:m}=this.#n,{rawDims:{pageWidth:g,pageHeight:y},rotation:b}=this.parent.viewport,S=Mr.processDrawnLines({lines:r,pageWidth:g,pageHeight:y,rotation:b,innerMargin:Oi._INNER_MARGIN,mustSmooth:c,areContours:u});this.addSignature(S,m,h,p)}else this.div.setAttribute("data-l10n-args",JSON.stringify({description:""})),this.div.hidden=!0,this._uiManager.getSignature(this);else this.div.setAttribute("data-l10n-args",JSON.stringify({description:this.#e||""}));return a&&(this._isCopy=!0,this._moveAfterPaste(t,i)),this.div}setUuid(t){this.#i=t,this.addEditToolbar()}getUuid(){return this.#i}get description(){return this.#e}set description(t){this.#e=t,this.div&&(this.div.setAttribute("data-l10n-args",JSON.stringify({description:t})),super.addEditToolbar().then(i=>{i?.updateEditSignatureButton(t)}))}getSignaturePreview(){const{newCurves:t,areContours:i,thickness:a,width:r,height:c}=this.#n,u=Math.max(r,c),h=Mr.processDrawnLines({lines:{curves:t.map(p=>({points:p})),thickness:a,width:r,height:c},pageWidth:u,pageHeight:u,rotation:0,innerMargin:0,mustSmooth:!1,areContours:i});return{areContours:i,outline:h.outline}}get toolbarButtons(){return this._uiManager.signatureManager?[["editSignature",this._uiManager.signatureManager]]:super.toolbarButtons}addSignature(t,i,a,r){const{x:c,y:u}=this,{outline:h}=this.#n=t;this.#t=h instanceof lp,this.description=a;let p;this.#t?p=Oi.getDefaultDrawingOptions():(p=Oi._defaultDrawnSignatureOptions.clone(),p.updateProperties({"stroke-width":h.thickness})),this._addOutlines({drawOutlines:h,drawingOptions:p});const[m,g]=this.parentDimensions,[,y]=this.pageDimensions;let b=i/y;b=b>=1?.5:b,this.width*=b/this.height,this.width>=1&&(b*=.9/this.width,this.width=.9),this.height=b,this.setDims(m*this.width,g*this.height),this.x=c,this.y=u,this.center(),this._onResized(),this.onScaleChanging(),this.rotate(),this._uiManager.addToAnnotationStorage(this),this.setUuid(r),this._reportTelemetry({action:"pdfjs.signature.inserted",data:{hasBeenSaved:!!r,hasDescription:!!a}}),this.div.hidden=!1}getFromImage(t){const{rawDims:{pageWidth:i,pageHeight:a},rotation:r}=this.parent.viewport;return Mr.process(t,i,a,r,Oi._INNER_MARGIN)}getFromText(t,i){const{rawDims:{pageWidth:a,pageHeight:r},rotation:c}=this.parent.viewport;return Mr.extractContoursFromText(t,i,a,r,c,Oi._INNER_MARGIN)}getDrawnSignature(t){const{rawDims:{pageWidth:i,pageHeight:a},rotation:r}=this.parent.viewport;return Mr.processDrawnLines({lines:t,pageWidth:i,pageHeight:a,rotation:r,innerMargin:Oi._INNER_MARGIN,mustSmooth:!1,areContours:!1})}createDrawingOptions({areContours:t,thickness:i}){t?this._drawingOptions=Oi.getDefaultDrawingOptions():(this._drawingOptions=Oi._defaultDrawnSignatureOptions.clone(),this._drawingOptions.updateProperties({"stroke-width":i}))}serialize(t=!1){if(this.isEmpty())return null;const{lines:i,points:a,rect:r}=this.serializeDraw(t),{_drawingOptions:{"stroke-width":c}}=this,u={annotationType:wt.SIGNATURE,isSignature:!0,areContours:this.#t,color:[0,0,0],thickness:this.#t?0:c,pageIndex:this.pageIndex,rect:r,rotation:this.rotation,structTreeParentId:this._structTreeParentId};return this.addComment(u),t?(u.paths={lines:i,points:a},u.uuid=this.#i,u.isCopy=!0):u.lines=i,this.#e&&(u.accessibilityData={type:"Figure",alt:this.#e}),u}static deserializeDraw(t,i,a,r,c,u){return u.areContours?lp.deserialize(t,i,a,r,c,u):cl.deserialize(t,i,a,r,c,u)}static async deserialize(t,i,a){const r=await super.deserialize(t,i,a);return r.#t=t.areContours,r.description=t.accessibilityData?.alt||"",r.#i=t.uuid,r}}class JO extends yt{#t=null;#e=null;#n=null;#i=null;#a=null;#s="";#r=null;#o=!1;#u=null;#c=!1;#h=!1;static _type="stamp";static _editorType=wt.STAMP;constructor(t){super({...t,name:"stampEditor"}),this.#i=t.bitmapUrl,this.#a=t.bitmapFile,this.defaultL10nId="pdfjs-editor-stamp-editor"}static initialize(t,i){yt.initialize(t,i)}static isHandlingMimeForPasting(t){return Bf.includes(t)}static paste(t,i){i.pasteEditor({mode:wt.STAMP},{bitmapFile:t.getAsFile()})}altTextFinish(){this._uiManager.useNewAltTextFlow&&(this.div.hidden=!1),super.altTextFinish()}get telemetryFinalData(){return{type:"stamp",hasAltText:!!this.altTextData?.altText}}static computeTelemetryFinalData(t){const i=t.get("hasAltText");return{hasAltText:i.get(!0)??0,hasNoAltText:i.get(!1)??0}}#l(t,i=!1){if(!t){this.remove();return}this.#t=t.bitmap,i||(this.#e=t.id,this.#c=t.isSvg),t.file&&(this.#s=t.file.name),this.#f()}#p(){if(this.#n=null,this._uiManager.enableWaiting(!1),!!this.#r){if(this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&this.#t){this.addEditToolbar().then(()=>{this._editToolbar.hide(),this._uiManager.editAltText(this,!0)});return}if(!this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&this.#t){this._reportTelemetry({action:"pdfjs.image.image_added",data:{alt_text_modal:!1,alt_text_type:"empty"}});try{this.mlGuessAltText()}catch{}}this.div.focus()}}async mlGuessAltText(t=null,i=!0){if(this.hasAltTextData())return null;const{mlManager:a}=this._uiManager;if(!a)throw new Error("No ML.");if(!await a.isEnabledFor("altText"))throw new Error("ML isn't enabled for alt text.");const{data:r,width:c,height:u}=t||this.copyCanvas(null,null,!0).imageData,h=await a.guess({name:"altText",request:{data:r,width:c,height:u,channels:r.length/(c*u)}});if(!h)throw new Error("No response from the AI service.");if(h.error)throw new Error("Error from the AI service.");if(h.cancel)return null;if(!h.output)throw new Error("No valid response from the AI service.");const p=h.output;return await this.setGuessedAltText(p),i&&!this.hasAltTextData()&&(this.altTextData={alt:p,decorative:!1}),p}#g(){if(this.#e){this._uiManager.enableWaiting(!0),this._uiManager.imageManager.getFromId(this.#e).then(a=>this.#l(a,!0)).finally(()=>this.#p());return}if(this.#i){const a=this.#i;this.#i=null,this._uiManager.enableWaiting(!0),this.#n=this._uiManager.imageManager.getFromUrl(a).then(r=>this.#l(r)).finally(()=>this.#p());return}if(this.#a){const a=this.#a;this.#a=null,this._uiManager.enableWaiting(!0),this.#n=this._uiManager.imageManager.getFromFile(a).then(r=>this.#l(r)).finally(()=>this.#p());return}const t=document.createElement("input");t.type="file",t.accept=Bf.join(",");const i=this._uiManager._signal;this.#n=new Promise(a=>{t.addEventListener("change",async()=>{if(!t.files||t.files.length===0)this.remove();else{this._uiManager.enableWaiting(!0);const r=await this._uiManager.imageManager.getFromFile(t.files[0]);this._reportTelemetry({action:"pdfjs.image.image_selected",data:{alt_text_modal:this._uiManager.useNewAltTextFlow}}),this.#l(r)}a()},{signal:i}),t.addEventListener("cancel",()=>{this.remove(),a()},{signal:i})}).finally(()=>this.#p()),t.click()}remove(){this.#e&&(this.#t=null,this._uiManager.imageManager.deleteId(this.#e),this.#r?.remove(),this.#r=null,this.#u&&(clearTimeout(this.#u),this.#u=null)),super.remove()}rebuild(){if(!this.parent){this.#e&&this.#g();return}super.rebuild(),this.div!==null&&(this.#e&&this.#r===null&&this.#g(),this.isAttachedToDOM||this.parent.add(this))}onceAdded(t){this._isDraggable=!0,t&&this.div.focus()}isEmpty(){return!(this.#n||this.#t||this.#i||this.#a||this.#e||this.#o)}get toolbarButtons(){return[["altText",this.createAltText()]]}get isResizable(){return!0}render(){if(this.div)return this.div;let t,i;return this._isCopy&&(t=this.x,i=this.y),super.render(),this.div.hidden=!0,this.createAltText(),this.#o||(this.#t?this.#f():this.#g()),this._isCopy&&this._moveAfterPaste(t,i),this._uiManager.addShouldRescale(this),this.div}setCanvas(t,i){const{id:a,bitmap:r}=this._uiManager.imageManager.getFromCanvas(t,i);i.remove(),a&&this._uiManager.imageManager.isValidId(a)&&(this.#e=a,r&&(this.#t=r),this.#o=!1,this.#f())}_onResized(){this.onScaleChanging()}onScaleChanging(){if(!this.parent)return;this.#u!==null&&clearTimeout(this.#u);const t=200;this.#u=setTimeout(()=>{this.#u=null,this.#m()},t)}#f(){const{div:t}=this;let{width:i,height:a}=this.#t;const[r,c]=this.pageDimensions,u=.75;if(this.width)i=this.width*r,a=this.height*c;else if(i>u*r||a>u*c){const g=Math.min(u*r/i,u*c/a);i*=g,a*=g}const[h,p]=this.parentDimensions;this.setDims(i*h/r,a*p/c),this._uiManager.enableWaiting(!1);const m=this.#r=document.createElement("canvas");m.setAttribute("role","img"),this.addContainer(m),this.width=i/r,this.height=a/c,this._initialOptions?.isCentered?this.center():this.fixAndSetPosition(),this._initialOptions=null,(!this._uiManager.useNewAltTextWhenAddingImage||!this._uiManager.useNewAltTextFlow||this.annotationElementId)&&(t.hidden=!1),this.#m(),this.#h||(this.parent.addUndoableEditor(this),this.#h=!0),this._reportTelemetry({action:"inserted_image"}),this.#s&&this.div.setAttribute("aria-description",this.#s),this.annotationElementId||this._uiManager.a11yAlert("pdfjs-editor-stamp-added-alert")}copyCanvas(t,i,a=!1){t||(t=224);const{width:r,height:c}=this.#t,u=new Ri;let h=this.#t,p=r,m=c,g=null;if(i){if(r>i||c>i){const j=Math.min(i/r,i/c);p=Math.floor(r*j),m=Math.floor(c*j)}g=document.createElement("canvas");const b=g.width=Math.ceil(p*u.sx),S=g.height=Math.ceil(m*u.sy);this.#c||(h=this.#d(b,S));const A=g.getContext("2d");A.filter=this._uiManager.hcmFilter;let _="white",R="#cfcfd8";this._uiManager.hcmFilter!=="none"?R="black":window.matchMedia?.("(prefers-color-scheme: dark)").matches&&(_="#8f8f9d",R="#42414d");const C=15,N=C*u.sx,O=C*u.sy,U=new OffscreenCanvas(N*2,O*2),I=U.getContext("2d");I.fillStyle=_,I.fillRect(0,0,N*2,O*2),I.fillStyle=R,I.fillRect(0,0,N,O),I.fillRect(N,O,N,O),A.fillStyle=A.createPattern(U,"repeat"),A.fillRect(0,0,b,S),A.drawImage(h,0,0,h.width,h.height,0,0,b,S)}let y=null;if(a){let b,S;if(u.symmetric&&h.width<t&&h.height<t)b=h.width,S=h.height;else if(h=this.#t,r>t||c>t){const R=Math.min(t/r,t/c);b=Math.floor(r*R),S=Math.floor(c*R),this.#c||(h=this.#d(b,S))}const _=new OffscreenCanvas(b,S).getContext("2d",{willReadFrequently:!0});_.drawImage(h,0,0,h.width,h.height,0,0,b,S),y={width:b,height:S,data:_.getImageData(0,0,b,S).data}}return{canvas:g,width:p,height:m,imageData:y}}#d(t,i){const{width:a,height:r}=this.#t;let c=a,u=r,h=this.#t;for(;c>2*t||u>2*i;){const p=c,m=u;c>2*t&&(c=c>=16384?Math.floor(c/2)-1:Math.ceil(c/2)),u>2*i&&(u=u>=16384?Math.floor(u/2)-1:Math.ceil(u/2));const g=new OffscreenCanvas(c,u);g.getContext("2d").drawImage(h,0,0,p,m,0,0,c,u),h=g.transferToImageBitmap()}return h}#m(){const[t,i]=this.parentDimensions,{width:a,height:r}=this,c=new Ri,u=Math.ceil(a*t*c.sx),h=Math.ceil(r*i*c.sy),p=this.#r;if(!p||p.width===u&&p.height===h)return;p.width=u,p.height=h;const m=this.#c?this.#t:this.#d(u,h),g=p.getContext("2d");g.filter=this._uiManager.hcmFilter,g.drawImage(m,0,0,m.width,m.height,0,0,u,h)}#v(t){if(t){if(this.#c){const r=this._uiManager.imageManager.getSvgUrl(this.#e);if(r)return r}const i=document.createElement("canvas");return{width:i.width,height:i.height}=this.#t,i.getContext("2d").drawImage(this.#t,0,0),i.toDataURL()}if(this.#c){const[i,a]=this.pageDimensions,r=Math.round(this.width*i*Tr.PDF_TO_CSS_UNITS),c=Math.round(this.height*a*Tr.PDF_TO_CSS_UNITS),u=new OffscreenCanvas(r,c);return u.getContext("2d").drawImage(this.#t,0,0,this.#t.width,this.#t.height,0,0,r,c),u.transferToImageBitmap()}return structuredClone(this.#t)}static async deserialize(t,i,a){let r=null,c=!1;if(t instanceof z0){const{data:{rect:_,rotation:R,id:C,structParent:N,popupRef:O,contentsObj:U},container:I,parent:{page:{pageNumber:j}},canvas:F}=t;let J,X;F?(delete t.canvas,{id:J,bitmap:X}=a.imageManager.getFromCanvas(I.id,F),F.remove()):(c=!0,t._hasNoCanvas=!0);const at=(await i._structTree.getAriaAttributes(`${Pf}${C}`))?.get("aria-label")||"";r=t={annotationType:wt.STAMP,bitmapId:J,bitmap:X,pageIndex:j-1,rect:_.slice(0),rotation:R,annotationElementId:C,id:C,deleted:!1,accessibilityData:{decorative:!1,altText:at},isSvg:!1,structParent:N,popupRef:O,comment:U?.str||null}}const u=await super.deserialize(t,i,a),{rect:h,bitmap:p,bitmapUrl:m,bitmapId:g,isSvg:y,accessibilityData:b}=t;c?(a.addMissingCanvas(t.id,u),u.#o=!0):g&&a.imageManager.isValidId(g)?(u.#e=g,p&&(u.#t=p)):u.#i=m,u.#c=y;const[S,A]=u.pageDimensions;return u.width=(h[2]-h[0])/S,u.height=(h[3]-h[1])/A,b&&(u.altTextData=b),u._initialData=r,t.comment&&u.setCommentData(t.comment),u.#h=!!r,u}serialize(t=!1,i=null){if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();const a={annotationType:wt.STAMP,bitmapId:this.#e,pageIndex:this.pageIndex,rect:this.getRect(0,0),rotation:this.rotation,isSvg:this.#c,structTreeParentId:this._structTreeParentId};if(this.addComment(a),t)return a.bitmapUrl=this.#v(!0),a.accessibilityData=this.serializeAltText(!0),a.isCopy=!0,a;const{decorative:r,altText:c}=this.serializeAltText(!1);if(!r&&c&&(a.accessibilityData={type:"Figure",alt:c}),this.annotationElementId){const h=this.#y(a);if(h.isSame)return null;h.isSameAltText?delete a.accessibilityData:a.accessibilityData.structParent=this._initialData.structParent??-1}if(a.id=this.annotationElementId,i===null)return a;i.stamps||=new Map;const u=this.#c?(a.rect[2]-a.rect[0])*(a.rect[3]-a.rect[1]):null;if(!i.stamps.has(this.#e))i.stamps.set(this.#e,{area:u,serialized:a}),a.bitmap=this.#v(!1);else if(this.#c){const h=i.stamps.get(this.#e);u>h.area&&(h.area=u,h.serialized.bitmap.close(),h.serialized.bitmap=this.#v(!1))}return a}#y(t){const{pageIndex:i,accessibilityData:{altText:a}}=this._initialData,r=t.pageIndex===i,c=(t.accessibilityData?.alt||"")===a;return{isSame:!this.hasEditedComment&&!this._hasBeenMoved&&!this._hasBeenResized&&r&&c,isSameAltText:c}}renderAnnotationElement(t){const i={rect:this.getRect(0,0)};return this.hasEditedComment&&(i.popup=this.comment),t.updateEdited(i),null}}class es{#t;#e=!1;#n=null;#i=null;#a=null;#s=new Map;#r=!1;#o=!1;#u=!1;#c=null;#h=null;#l=null;#p=null;#g=null;#f=-1;#d;static _initialized=!1;static#m=new Map([Ue,op,JO,Te,Oi].map(t=>[t._editorType,t]));constructor({uiManager:t,pageIndex:i,div:a,structTreeLayer:r,accessibilityManager:c,annotationLayer:u,drawLayer:h,textLayer:p,viewport:m,l10n:g}){const y=[...es.#m.values()];if(!es._initialized){es._initialized=!0;for(const b of y)b.initialize(g,t)}t.registerEditorTypes(y),this.#d=t,this.pageIndex=i,this.div=a,this.#t=c,this.#n=u,this.viewport=m,this.#l=p,this.drawLayer=h,this._structTree=r,this.#d.addLayer(this)}get isEmpty(){return this.#s.size===0}get isInvisible(){return this.isEmpty&&this.#d.getMode()===wt.NONE}updateToolbar(t){this.#d.updateToolbar(t)}updateMode(t=this.#d.getMode()){switch(this.#b(),t){case wt.NONE:this.disableTextSelection(),this.togglePointerEvents(!1),this.toggleAnnotationLayerPointerEvents(!0),this.disableClick();return;case wt.INK:this.disableTextSelection(),this.togglePointerEvents(!0),this.enableClick();break;case wt.HIGHLIGHT:this.enableTextSelection(),this.togglePointerEvents(!1),this.disableClick();break;default:this.disableTextSelection(),this.togglePointerEvents(!0),this.enableClick()}this.toggleAnnotationLayerPointerEvents(!1);const{classList:i}=this.div;for(const a of es.#m.values())i.toggle(`${a._type}Editing`,t===a._editorType);this.div.hidden=!1}hasTextLayer(t){return t===this.#l?.div}setEditingState(t){this.#d.setEditingState(t)}addCommands(t){this.#d.addCommands(t)}cleanUndoStack(t){this.#d.cleanUndoStack(t)}toggleDrawing(t=!1){this.div.classList.toggle("drawing",!t)}togglePointerEvents(t=!1){this.div.classList.toggle("disabled",!t)}toggleAnnotationLayerPointerEvents(t=!1){this.#n?.div.classList.toggle("disabled",!t)}async enable(){this.#u=!0,this.div.tabIndex=0,this.togglePointerEvents(!0),this.#g?.abort(),this.#g=null;const t=new Set;for(const a of this.#s.values())a.enableEditing(),a.show(!0),a.annotationElementId&&(this.#d.removeChangedExistingAnnotation(a),t.add(a.annotationElementId));if(!this.#n){this.#u=!1;return}const i=this.#n.getEditableAnnotations();for(const a of i){if(a.hide(),this.#d.isDeletedAnnotationElement(a.data.id)||t.has(a.data.id))continue;const r=await this.deserialize(a);r&&(this.addOrRebuild(r),r.enableEditing())}this.#u=!1}disable(){if(this.#o=!0,this.div.tabIndex=-1,this.togglePointerEvents(!1),this.#l&&!this.#g){this.#g=new AbortController;const r=this.#d.combinedSignal(this.#g);this.#l.div.addEventListener("pointerdown",c=>{const{clientX:h,clientY:p,timeStamp:m}=c,g=this.#f;if(m-g>500){this.#f=m;return}this.#f=-1;const{classList:y}=this.div;y.toggle("getElements",!0);const b=document.elementsFromPoint(h,p);if(y.toggle("getElements",!1),!this.div.contains(b[0]))return;let S;const A=new RegExp(`^${$v}[0-9]+$`);for(const R of b)if(A.test(R.id)){S=R.id;break}if(!S)return;const _=this.#s.get(S);_?.annotationElementId===null&&(c.stopPropagation(),c.preventDefault(),_.dblclick())},{signal:r,capture:!0})}const t=new Map,i=new Map;for(const r of this.#s.values())if(r.disableEditing(),!!r.annotationElementId){if(r.serialize()!==null){t.set(r.annotationElementId,r);continue}else i.set(r.annotationElementId,r);this.getEditableAnnotation(r.annotationElementId)?.show(),r.remove()}if(this.#n){const r=this.#n.getEditableAnnotations();for(const c of r){const{id:u}=c.data;if(this.#d.isDeletedAnnotationElement(u)){c.updateEdited({deleted:!0});continue}let h=i.get(u);if(h){h.resetAnnotationElement(c),h.show(!1),c.show();continue}h=t.get(u),h&&(this.#d.addChangedExistingAnnotation(h),h.renderAnnotationElement(c)&&h.show(!1)),c.show()}}this.#b(),this.isEmpty&&(this.div.hidden=!0);const{classList:a}=this.div;for(const r of es.#m.values())a.remove(`${r._type}Editing`);this.disableTextSelection(),this.toggleAnnotationLayerPointerEvents(!0),this.#o=!1}getEditableAnnotation(t){return this.#n?.getEditableAnnotation(t)||null}setActiveEditor(t){this.#d.getActive()!==t&&this.#d.setActiveEditor(t)}enableTextSelection(){if(this.div.tabIndex=-1,this.#l?.div&&!this.#p){this.#p=new AbortController;const t=this.#d.combinedSignal(this.#p);this.#l.div.addEventListener("pointerdown",this.#v.bind(this),{signal:t}),this.#l.div.classList.add("highlighting")}}disableTextSelection(){this.div.tabIndex=0,this.#l?.div&&this.#p&&(this.#p.abort(),this.#p=null,this.#l.div.classList.remove("highlighting"))}#v(t){this.#d.unselectAll();const{target:i}=t;if(i===this.#l.div||(i.getAttribute("role")==="img"||i.classList.contains("endOfContent"))&&this.#l.div.contains(i)){const{isMac:a}=Ve.platform;if(t.button!==0||t.ctrlKey&&a)return;this.#d.showAllEditors("highlight",!0,!0),this.#l.div.classList.add("free"),this.toggleDrawing(),Te.startHighlighting(this,this.#d.direction==="ltr",{target:this.#l.div,x:t.x,y:t.y}),this.#l.div.addEventListener("pointerup",()=>{this.#l.div.classList.remove("free"),this.toggleDrawing(!0)},{once:!0,signal:this.#d._signal}),t.preventDefault()}}enableClick(){if(this.#i)return;this.#i=new AbortController;const t=this.#d.combinedSignal(this.#i);this.div.addEventListener("pointerdown",this.pointerdown.bind(this),{signal:t});const i=this.pointerup.bind(this);this.div.addEventListener("pointerup",i,{signal:t}),this.div.addEventListener("pointercancel",i,{signal:t})}disableClick(){this.#i?.abort(),this.#i=null}attach(t){this.#s.set(t.id,t);const{annotationElementId:i}=t;i&&this.#d.isDeletedAnnotationElement(i)&&this.#d.removeDeletedAnnotationElement(t)}detach(t){this.#s.delete(t.id),this.#t?.removePointerInTextLayer(t.contentDiv),!this.#o&&t.annotationElementId&&this.#d.addDeletedAnnotationElement(t)}remove(t){this.detach(t),this.#d.removeEditor(t),t.div.remove(),t.isAttachedToDOM=!1}changeParent(t){t.parent!==this&&(t.parent&&t.annotationElementId&&(this.#d.addDeletedAnnotationElement(t.annotationElementId),yt.deleteAnnotationElement(t),t.annotationElementId=null),this.attach(t),t.parent?.detach(t),t.setParent(this),t.div&&t.isAttachedToDOM&&(t.div.remove(),this.div.append(t.div)))}add(t){if(!(t.parent===this&&t.isAttachedToDOM)){if(this.changeParent(t),this.#d.addEditor(t),this.attach(t),!t.isAttachedToDOM){const i=t.render();this.div.append(i),t.isAttachedToDOM=!0}t.fixAndSetPosition(),t.onceAdded(!this.#u),this.#d.addToAnnotationStorage(t),t._reportTelemetry(t.telemetryInitialData)}}moveEditorInDOM(t){if(!t.isAttachedToDOM)return;const{activeElement:i}=document;t.div.contains(i)&&!this.#a&&(t._focusEventsAllowed=!1,this.#a=setTimeout(()=>{this.#a=null,t.div.contains(document.activeElement)?t._focusEventsAllowed=!0:(t.div.addEventListener("focusin",()=>{t._focusEventsAllowed=!0},{once:!0,signal:this.#d._signal}),i.focus())},0)),t._structTreeParentId=this.#t?.moveElementInDOM(this.div,t.div,t.contentDiv,!0)}addOrRebuild(t){t.needsToBeRebuilt()?(t.parent||=this,t.rebuild(),t.show()):this.add(t)}addUndoableEditor(t){const i=()=>t._uiManager.rebuild(t),a=()=>{t.remove()};this.addCommands({cmd:i,undo:a,mustExec:!1})}getNextId(){return this.#d.getId()}get#y(){return es.#m.get(this.#d.getMode())}combinedSignal(t){return this.#d.combinedSignal(t)}#E(t){const i=this.#y;return i?new i.prototype.constructor(t):null}canCreateNewEmptyEditor(){return this.#y?.canCreateNewEmptyEditor()}async pasteEditor(t,i){this.updateToolbar(t),await this.#d.updateMode(t.mode);const{offsetX:a,offsetY:r}=this.#A(),c=this.getNextId(),u=this.#E({parent:this,id:c,x:a,y:r,uiManager:this.#d,isCentered:!0,...i});u&&this.add(u)}async deserialize(t){return await es.#m.get(t.annotationType??t.annotationEditorType)?.deserialize(t,this,this.#d)||null}createAndAddNewEditor(t,i,a={}){const r=this.getNextId(),c=this.#E({parent:this,id:r,x:t.offsetX,y:t.offsetY,uiManager:this.#d,isCentered:i,...a});return c&&this.add(c),c}#A(){const{x:t,y:i,width:a,height:r}=this.div.getBoundingClientRect(),c=Math.max(0,t),u=Math.max(0,i),h=Math.min(window.innerWidth,t+a),p=Math.min(window.innerHeight,i+r),m=(c+h)/2-t,g=(u+p)/2-i,[y,b]=this.viewport.rotation%180===0?[m,g]:[g,m];return{offsetX:y,offsetY:b}}addNewEditor(t={}){this.createAndAddNewEditor(this.#A(),!0,t)}setSelected(t){this.#d.setSelected(t)}toggleSelected(t){this.#d.toggleSelected(t)}unselect(t){this.#d.unselect(t)}pointerup(t){const{isMac:i}=Ve.platform;if(t.button!==0||t.ctrlKey&&i||t.target!==this.div||!this.#r||(this.#r=!1,this.#y?.isDrawer&&this.#y.supportMultipleDrawings))return;if(!this.#e){this.#e=!0;return}const a=this.#d.getMode();if(a===wt.STAMP||a===wt.SIGNATURE){this.#d.unselectAll();return}this.createAndAddNewEditor(t,!1)}pointerdown(t){if(this.#d.getMode()===wt.HIGHLIGHT&&this.enableTextSelection(),this.#r){this.#r=!1;return}const{isMac:i}=Ve.platform;if(t.button!==0||t.ctrlKey&&i||t.target!==this.div)return;if(this.#r=!0,this.#y?.isDrawer){this.startDrawingSession(t);return}const a=this.#d.getActive();this.#e=!a||a.isEmpty()}startDrawingSession(t){if(this.div.focus({preventScroll:!0}),this.#c){this.#y.startDrawing(this,this.#d,!1,t);return}this.#d.setCurrentDrawingSession(this),this.#c=new AbortController;const i=this.#d.combinedSignal(this.#c);this.div.addEventListener("blur",({relatedTarget:a})=>{a&&!this.div.contains(a)&&(this.#h=null,this.commitOrRemove())},{signal:i}),this.#y.startDrawing(this,this.#d,!1,t)}pause(t){if(t){const{activeElement:i}=document;this.div.contains(i)&&(this.#h=i);return}this.#h&&setTimeout(()=>{this.#h?.focus(),this.#h=null},0)}endDrawingSession(t=!1){return this.#c?(this.#d.setCurrentDrawingSession(null),this.#c.abort(),this.#c=null,this.#h=null,this.#y.endDrawing(t)):null}findNewParent(t,i,a){const r=this.#d.findParent(i,a);return r===null||r===this?!1:(r.changeParent(t),!0)}commitOrRemove(){return this.#c?(this.endDrawingSession(),!0):!1}onScaleChanging(){this.#c&&this.#y.onScaleChangingWhenDrawing(this)}destroy(){this.commitOrRemove(),this.#d.getActive()?.parent===this&&(this.#d.commitOrRemove(),this.#d.setActiveEditor(null)),this.#a&&(clearTimeout(this.#a),this.#a=null);for(const t of this.#s.values())this.#t?.removePointerInTextLayer(t.contentDiv),t.setParent(null),t.isAttachedToDOM=!1,t.div.remove();this.div=null,this.#s.clear(),this.#d.removeLayer(this)}#b(){for(const t of this.#s.values())t.isEmpty()&&t.remove()}render({viewport:t}){this.viewport=t,_a(this.div,t);for(const i of this.#d.getEditors(this.pageIndex))this.add(i),i.rebuild();this.updateMode()}update({viewport:t}){this.#d.commitOrRemove(),this.#b();const i=this.viewport.rotation,a=t.rotation;if(this.viewport=t,_a(this.div,{rotation:a}),i!==a)for(const r of this.#s.values())r.rotate(a)}get pageDimensions(){const{pageWidth:t,pageHeight:i}=this.viewport.rawDims;return[t,i]}get scale(){return this.#d.viewParameters.realScale}}class Ye{#t=null;#e=new Map;#n=new Map;static#i=0;constructor({pageIndex:t}){this.pageIndex=t}setParent(t){if(!this.#t){this.#t=t;return}if(this.#t!==t){if(this.#e.size>0)for(const i of this.#e.values())i.remove(),t.append(i);this.#t=t}}static get _svgFactory(){return zt(this,"_svgFactory",new Du)}static#a(t,[i,a,r,c]){const{style:u}=t;u.top=`${100*a}%`,u.left=`${100*i}%`,u.width=`${100*r}%`,u.height=`${100*c}%`}#s(){const t=Ye._svgFactory.create(1,1,!0);return this.#t.append(t),t.setAttribute("aria-hidden",!0),t}#r(t,i){const a=Ye._svgFactory.createElement("clipPath");t.append(a);const r=`clip_${i}`;a.setAttribute("id",r),a.setAttribute("clipPathUnits","objectBoundingBox");const c=Ye._svgFactory.createElement("use");return a.append(c),c.setAttribute("href",`#${i}`),c.classList.add("clip"),r}#o(t,i){for(const[a,r]of Object.entries(i))r===null?t.removeAttribute(a):t.setAttribute(a,r)}draw(t,i=!1,a=!1){const r=Ye.#i++,c=this.#s(),u=Ye._svgFactory.createElement("defs");c.append(u);const h=Ye._svgFactory.createElement("path");u.append(h);const p=`path_p${this.pageIndex}_${r}`;h.setAttribute("id",p),h.setAttribute("vector-effect","non-scaling-stroke"),i&&this.#n.set(r,h);const m=a?this.#r(u,p):null,g=Ye._svgFactory.createElement("use");return c.append(g),g.setAttribute("href",`#${p}`),this.updateProperties(c,t),this.#e.set(r,c),{id:r,clipPathId:`url(#${m})`}}drawOutline(t,i){const a=Ye.#i++,r=this.#s(),c=Ye._svgFactory.createElement("defs");r.append(c);const u=Ye._svgFactory.createElement("path");c.append(u);const h=`path_p${this.pageIndex}_${a}`;u.setAttribute("id",h),u.setAttribute("vector-effect","non-scaling-stroke");let p;if(i){const y=Ye._svgFactory.createElement("mask");c.append(y),p=`mask_p${this.pageIndex}_${a}`,y.setAttribute("id",p),y.setAttribute("maskUnits","objectBoundingBox");const b=Ye._svgFactory.createElement("rect");y.append(b),b.setAttribute("width","1"),b.setAttribute("height","1"),b.setAttribute("fill","white");const S=Ye._svgFactory.createElement("use");y.append(S),S.setAttribute("href",`#${h}`),S.setAttribute("stroke","none"),S.setAttribute("fill","black"),S.setAttribute("fill-rule","nonzero"),S.classList.add("mask")}const m=Ye._svgFactory.createElement("use");r.append(m),m.setAttribute("href",`#${h}`),p&&m.setAttribute("mask",`url(#${p})`);const g=m.cloneNode();return r.append(g),m.classList.add("mainOutline"),g.classList.add("secondaryOutline"),this.updateProperties(r,t),this.#e.set(a,r),a}finalizeDraw(t,i){this.#n.delete(t),this.updateProperties(t,i)}updateProperties(t,i){if(!i)return;const{root:a,bbox:r,rootClass:c,path:u}=i,h=typeof t=="number"?this.#e.get(t):t;if(h){if(a&&this.#o(h,a),r&&Ye.#a(h,r),c){const{classList:p}=h;for(const[m,g]of Object.entries(c))p.toggle(m,g)}if(u){const m=h.firstChild.firstChild;this.#o(m,u)}}}updateParent(t,i){if(i===this)return;const a=this.#e.get(t);a&&(i.#t.append(a),this.#e.delete(t),i.#e.set(t,a))}remove(t){this.#n.delete(t),this.#t!==null&&(this.#e.get(t).remove(),this.#e.delete(t))}destroy(){this.#t=null;for(const t of this.#e.values())t.remove();this.#e.clear(),this.#n.clear()}}globalThis._pdfjsTestingUtils={HighlightOutliner:ap},globalThis.pdfjsLib={AbortException:Ps,AnnotationEditorLayer:es,AnnotationEditorParamsType:$t,AnnotationEditorType:wt,AnnotationEditorUIManager:Us,AnnotationLayer:sp,AnnotationMode:Is,AnnotationType:De,build:MO,ColorPicker:Wn,createValidAbsoluteUrl:Gv,DOMSVGFactory:Du,DrawLayer:Ye,FeatureTest:Ve,fetchData:Qo,getDocument:R0,getFilenameFromUrl:AM,getPdfFilenameFromUrl:_M,getRGB:Eu,getUuid:Wv,getXfaPageViewport:wM,GlobalWorkerOptions:xr,ImageKind:fu,InvalidPDFException:Nf,isDataScheme:Su,isPdfFile:zf,isValidExplicitDest:PM,MathClamp:dn,noContextMenu:Yn,normalizeUnicode:vM,OPS:mu,OutputScale:Ri,PasswordResponses:uM,PDFDataRangeTransport:D0,PDFDateString:Hf,PDFWorker:rl,PermissionFlag:cM,PixelsPerInch:Tr,RenderingCancelledException:Uf,ResponseException:vu,setLayerDimensions:_a,shadow:zt,SignatureExtractor:Mr,stopEvent:Oe,SupportedImageMimeTypes:Bf,TextLayer:hn,TouchManager:_u,updateUrlHash:Vv,Util:mt,VerbosityLevel:pu,version:DO,XfaLayer:k0},typeof Promise.withResolvers>"u"&&(Promise.withResolvers=function(){let l,t;return{promise:new Promise((a,r)=>{l=a,t=r}),resolve:l,reject:t}}),xr.workerSrc="/pdf.worker.js";class tk{extractProcessId(){try{const t=window.location.href;let i=t.match(/\/processo\/(\d+)\//);if(i&&i[1])return L.detail(`ID do processo extraído da URL: ${i[1]}`),i[1];if(i=t.match(/\/pjekz\/processo\/(\d+)\//),i&&i[1])return L.detail(`ID do processo extraído da URL (pjekz): ${i[1]}`),i[1];const a=new URLSearchParams(window.location.search),r=["idProcesso","processoId","id","processo"];for(const c of r){const u=a.get(c);if(u&&/^\d+$/.test(u))return L.detail(`ID do processo extraído do parâmetro ${c}: ${u}`),u}return L.warn("ID do processo não encontrado na URL"),null}catch(t){return L.error("Erro ao extrair ID do processo:",t),null}}extractDocumentId(){try{const i=window.location.href.match(/\/documento\/(\d+)\//);if(i&&i[1])return L.detail(`ID do documento extraído da URL: ${i[1]}`),i[1];const a=new URLSearchParams(window.location.search),r=["idDocumento","documentoId","docId"];for(const u of r){const h=a.get(u);if(h&&/^\d+$/.test(h))return L.detail(`ID do documento extraído do parâmetro ${u}: ${h}`),h}const c=document.querySelector("mat-card-title");if(c){const u=c.textContent.match(/Id\s+([a-zA-Z0-9]+)/);if(u&&/^\d+$/.test(u[1]))return L.detail(`ID do documento extraído do título: ${u[1]}`),u[1]}return L.warn("ID do documento não encontrado"),null}catch(t){return L.error("Erro ao extrair ID do documento:",t),null}}buildContentUrl(t,i,a="pdf"){if(!t||!i)return L.warn("IDs do processo ou documento não fornecidos para construir URL"),null;const r=window.location.origin;if(a==="txt"){const c=`${r}/pje-comum-api/api/processos/id/${t}/documentos/id/${i}/conteudo`;return L.detail(`URL do TXT construída: ${c}`),c}else if(a==="pdf"){L.detail(`Construindo URL para PDF: processoId=${t}, documentId=${i}`);const c=`${r}/pje-comum-api/api/processos/id/${t}/documentos/id/${i}/conteudo?incluirCapa=false&incluirAssinatura=true`;return L.detail(`URL do PDF construída: ${c}`),c}else return L.warn(`Tipo de conteúdo desconhecido: ${a}`),null}buildFullProcessUrl(t){if(!t)return L.warn("ID do processo não fornecido para construir URL completa"),null;const a=`${window.location.origin}/pje-comum-api/api/processos/id/${t}/documentos/agrupados?processoCompleto=true`;return L.detail(`URL completa do processo construída: ${a}`),a}async download(t){if(!t)throw new Error("URL do PDF não fornecida");L.info(`Baixando PDF de: ${t}`);const i=await fetch(t,{method:"GET",credentials:"same-origin",headers:{Accept:"application/pdf, application/json"}});if(!i.ok)throw new Error(`Erro HTTP ${i.status}: ${i.statusText}`);const a=i.headers.get("Content-Type")||null;if(!a)throw new Error("Cabeçalho Content-Type não encontrado na resposta");if(!a.startsWith("application/pdf")&&!a.startsWith("application/json"))throw new Error(`Tipo de conteúdo inesperado: ${a}`);if(L.info(`Tipo de conteúdo recebido: ${a}`),a.startsWith("application/json")){const r=await i.text();if(L.info(`JSON recebido, tamanho: ${r.length} caracteres`),r.length===0)throw new Error("Resposta JSON está vazia");return{content:r,mimeType:"application/json"}}if(a.startsWith("application/pdf")){const r=await i.arrayBuffer();if(r.byteLength===0)throw new Error("PDF baixado está vazio");return L.info(`PDF baixado com sucesso, tamanho: ${r.byteLength} bytes`),{content:r,mimeType:"application/pdf"}}return null}findPdfElements(){const t=['pje-historico-scroll-documento object[id^="obj"]','object[id^="obj"][type="application/pdf"]',"iframe#iframeVisualizacao","iframe.documento-frame",'iframe[src*="documento"]','iframe[src*="conteudo"]','div.visualizador-documento object[type="application/pdf"]','div.viewer-documento object[type="application/pdf"]','iframe[src*=".pdf"], embed[src*=".pdf"], object[type="application/pdf"]'];for(const i of t){const a=document.querySelector(i);if(a)return L.detail(`PDF viewer encontrado com seletor: ${i}`),a}return null}findPdfLinks(){return document.querySelector('a[href*="/documento/"][href*="/conteudo"], a[href*="baixar"], a[href*="download"]')}captureTextContent(){const t=[".documento-conteudo",".rich-panel-body",".viewer-documento .conteudo","mat-card-content",".documento-texto",".conteudo-documento",'[class*="documento"] [class*="conteudo"]',".visualizador-documento",'div[class*="text"] div[class*="content"]'];for(const i of t){const a=document.querySelector(i);if(a){const r=a.innerText||a.textContent||"";if(r&&r.trim().length>50)return L.detail(`Conteúdo textual encontrado com seletor: ${i}`),{type:"txt",data:r.trim().replace(/\n\s*\n\s*\n/g,`
307
+ `)){const h=document.createElement("div");h.append(u?document.createTextNode(u):document.createElement("br")),i.append(h)}const r=Ue._internalPadding*this.parentScale,c={rect:this.getRect(r,r)};return c.popup=this.hasEditedComment?this.comment:{text:this.#e},t.updateEdited(c),i}resetAnnotationElement(t){super.resetAnnotationElement(t),t.resetEdited()}}class ot{static PRECISION=1e-4;toSVGPath(){ie("Abstract method `toSVGPath` must be implemented.")}get box(){ie("Abstract getter `box` must be implemented.")}serialize(t,i){ie("Abstract method `serialize` must be implemented.")}static _rescale(t,i,a,r,c,u){u||=new Float32Array(t.length);for(let h=0,p=t.length;h<p;h+=2)u[h]=i+t[h]*r,u[h+1]=a+t[h+1]*c;return u}static _rescaleAndSwap(t,i,a,r,c,u){u||=new Float32Array(t.length);for(let h=0,p=t.length;h<p;h+=2)u[h]=i+t[h+1]*r,u[h+1]=a+t[h]*c;return u}static _translate(t,i,a,r){r||=new Float32Array(t.length);for(let c=0,u=t.length;c<u;c+=2)r[c]=i+t[c],r[c+1]=a+t[c+1];return r}static svgRound(t){return Math.round(t*1e4)}static _normalizePoint(t,i,a,r,c){switch(c){case 90:return[1-i/a,t/r];case 180:return[1-t/a,1-i/r];case 270:return[i/a,1-t/r];default:return[t/a,i/r]}}static _normalizePagePoint(t,i,a){switch(a){case 90:return[1-i,t];case 180:return[1-t,1-i];case 270:return[i,1-t];default:return[t,i]}}static createBezierPoints(t,i,a,r,c,u){return[(t+5*a)/6,(i+5*r)/6,(5*a+c)/6,(5*r+u)/6,(a+c)/2,(r+u)/2]}}class xa{#t;#e=[];#n;#i;#a=[];#s=new Float32Array(18);#r;#o;#u;#c;#h;#l;#p=[];static#g=8;static#f=2;static#d=xa.#g+xa.#f;constructor({x:t,y:i},a,r,c,u,h=0){this.#t=a,this.#l=c*r,this.#i=u,this.#s.set([NaN,NaN,NaN,NaN,t,i],6),this.#n=h,this.#c=xa.#g*r,this.#u=xa.#d*r,this.#h=r,this.#p.push(t,i)}isEmpty(){return isNaN(this.#s[8])}#m(){const t=this.#s.subarray(4,6),i=this.#s.subarray(16,18),[a,r,c,u]=this.#t;return[(this.#r+(t[0]-i[0])/2-a)/c,(this.#o+(t[1]-i[1])/2-r)/u,(this.#r+(i[0]-t[0])/2-a)/c,(this.#o+(i[1]-t[1])/2-r)/u]}add({x:t,y:i}){this.#r=t,this.#o=i;const[a,r,c,u]=this.#t;let[h,p,m,g]=this.#s.subarray(8,12);const y=t-m,b=i-g,S=Math.hypot(y,b);if(S<this.#u)return!1;const A=S-this.#c,_=A/S,R=_*y,x=_*b;let L=h,k=p;h=m,p=g,m+=R,g+=x,this.#p?.push(t,i);const U=-x/A,I=R/A,j=U*this.#l,F=I*this.#l;return this.#s.set(this.#s.subarray(2,8),0),this.#s.set([m+j,g+F],4),this.#s.set(this.#s.subarray(14,18),12),this.#s.set([m-j,g-F],16),isNaN(this.#s[6])?(this.#a.length===0&&(this.#s.set([h+j,p+F],2),this.#a.push(NaN,NaN,NaN,NaN,(h+j-a)/c,(p+F-r)/u),this.#s.set([h-j,p-F],14),this.#e.push(NaN,NaN,NaN,NaN,(h-j-a)/c,(p-F-r)/u)),this.#s.set([L,k,h,p,m,g],6),!this.isEmpty()):(this.#s.set([L,k,h,p,m,g],6),Math.abs(Math.atan2(k-p,L-h)-Math.atan2(x,R))<Math.PI/2?([h,p,m,g]=this.#s.subarray(2,6),this.#a.push(NaN,NaN,NaN,NaN,((h+m)/2-a)/c,((p+g)/2-r)/u),[h,p,L,k]=this.#s.subarray(14,18),this.#e.push(NaN,NaN,NaN,NaN,((L+h)/2-a)/c,((k+p)/2-r)/u),!0):([L,k,h,p,m,g]=this.#s.subarray(0,6),this.#a.push(((L+5*h)/6-a)/c,((k+5*p)/6-r)/u,((5*h+m)/6-a)/c,((5*p+g)/6-r)/u,((h+m)/2-a)/c,((p+g)/2-r)/u),[m,g,h,p,L,k]=this.#s.subarray(12,18),this.#e.push(((L+5*h)/6-a)/c,((k+5*p)/6-r)/u,((5*h+m)/6-a)/c,((5*p+g)/6-r)/u,((h+m)/2-a)/c,((p+g)/2-r)/u),!0))}toSVGPath(){if(this.isEmpty())return"";const t=this.#a,i=this.#e;if(isNaN(this.#s[6])&&!this.isEmpty())return this.#v();const a=[];a.push(`M${t[4]} ${t[5]}`);for(let r=6;r<t.length;r+=6)isNaN(t[r])?a.push(`L${t[r+4]} ${t[r+5]}`):a.push(`C${t[r]} ${t[r+1]} ${t[r+2]} ${t[r+3]} ${t[r+4]} ${t[r+5]}`);this.#E(a);for(let r=i.length-6;r>=6;r-=6)isNaN(i[r])?a.push(`L${i[r+4]} ${i[r+5]}`):a.push(`C${i[r]} ${i[r+1]} ${i[r+2]} ${i[r+3]} ${i[r+4]} ${i[r+5]}`);return this.#y(a),a.join(" ")}#v(){const[t,i,a,r]=this.#t,[c,u,h,p]=this.#m();return`M${(this.#s[2]-t)/a} ${(this.#s[3]-i)/r} L${(this.#s[4]-t)/a} ${(this.#s[5]-i)/r} L${c} ${u} L${h} ${p} L${(this.#s[16]-t)/a} ${(this.#s[17]-i)/r} L${(this.#s[14]-t)/a} ${(this.#s[15]-i)/r} Z`}#y(t){const i=this.#e;t.push(`L${i[4]} ${i[5]} Z`)}#E(t){const[i,a,r,c]=this.#t,u=this.#s.subarray(4,6),h=this.#s.subarray(16,18),[p,m,g,y]=this.#m();t.push(`L${(u[0]-i)/r} ${(u[1]-a)/c} L${p} ${m} L${g} ${y} L${(h[0]-i)/r} ${(h[1]-a)/c}`)}newFreeDrawOutline(t,i,a,r,c,u){return new z0(t,i,a,r,c,u)}getOutlines(){const t=this.#a,i=this.#e,a=this.#s,[r,c,u,h]=this.#t,p=new Float32Array((this.#p?.length??0)+2);for(let y=0,b=p.length-2;y<b;y+=2)p[y]=(this.#p[y]-r)/u,p[y+1]=(this.#p[y+1]-c)/h;if(p[p.length-2]=(this.#r-r)/u,p[p.length-1]=(this.#o-c)/h,isNaN(a[6])&&!this.isEmpty())return this.#A(p);const m=new Float32Array(this.#a.length+24+this.#e.length);let g=t.length;for(let y=0;y<g;y+=2){if(isNaN(t[y])){m[y]=m[y+1]=NaN;continue}m[y]=t[y],m[y+1]=t[y+1]}g=this.#T(m,g);for(let y=i.length-6;y>=6;y-=6)for(let b=0;b<6;b+=2){if(isNaN(i[y+b])){m[g]=m[g+1]=NaN,g+=2;continue}m[g]=i[y+b],m[g+1]=i[y+b+1],g+=2}return this.#b(m,g),this.newFreeDrawOutline(m,p,this.#t,this.#h,this.#n,this.#i)}#A(t){const i=this.#s,[a,r,c,u]=this.#t,[h,p,m,g]=this.#m(),y=new Float32Array(36);return y.set([NaN,NaN,NaN,NaN,(i[2]-a)/c,(i[3]-r)/u,NaN,NaN,NaN,NaN,(i[4]-a)/c,(i[5]-r)/u,NaN,NaN,NaN,NaN,h,p,NaN,NaN,NaN,NaN,m,g,NaN,NaN,NaN,NaN,(i[16]-a)/c,(i[17]-r)/u,NaN,NaN,NaN,NaN,(i[14]-a)/c,(i[15]-r)/u],0),this.newFreeDrawOutline(y,t,this.#t,this.#h,this.#n,this.#i)}#b(t,i){const a=this.#e;return t.set([NaN,NaN,NaN,NaN,a[4],a[5]],i),i+=6}#T(t,i){const a=this.#s.subarray(4,6),r=this.#s.subarray(16,18),[c,u,h,p]=this.#t,[m,g,y,b]=this.#m();return t.set([NaN,NaN,NaN,NaN,(a[0]-c)/h,(a[1]-u)/p,NaN,NaN,NaN,NaN,m,g,NaN,NaN,NaN,NaN,y,b,NaN,NaN,NaN,NaN,(r[0]-c)/h,(r[1]-u)/p],i),i+=24}}class z0 extends ot{#t;#e=new Float32Array(4);#n;#i;#a;#s;#r;constructor(t,i,a,r,c,u){super(),this.#r=t,this.#a=i,this.#t=a,this.#s=r,this.#n=c,this.#i=u,this.lastPoint=[NaN,NaN],this.#o(u);const[h,p,m,g]=this.#e;for(let y=0,b=t.length;y<b;y+=2)t[y]=(t[y]-h)/m,t[y+1]=(t[y+1]-p)/g;for(let y=0,b=i.length;y<b;y+=2)i[y]=(i[y]-h)/m,i[y+1]=(i[y+1]-p)/g}toSVGPath(){const t=[`M${this.#r[4]} ${this.#r[5]}`];for(let i=6,a=this.#r.length;i<a;i+=6){if(isNaN(this.#r[i])){t.push(`L${this.#r[i+4]} ${this.#r[i+5]}`);continue}t.push(`C${this.#r[i]} ${this.#r[i+1]} ${this.#r[i+2]} ${this.#r[i+3]} ${this.#r[i+4]} ${this.#r[i+5]}`)}return t.push("Z"),t.join(" ")}serialize([t,i,a,r],c){const u=a-t,h=r-i;let p,m;switch(c){case 0:p=ot._rescale(this.#r,t,r,u,-h),m=ot._rescale(this.#a,t,r,u,-h);break;case 90:p=ot._rescaleAndSwap(this.#r,t,i,u,h),m=ot._rescaleAndSwap(this.#a,t,i,u,h);break;case 180:p=ot._rescale(this.#r,a,i,-u,h),m=ot._rescale(this.#a,a,i,-u,h);break;case 270:p=ot._rescaleAndSwap(this.#r,a,r,-u,-h),m=ot._rescaleAndSwap(this.#a,a,r,-u,-h);break}return{outline:Array.from(p),points:[Array.from(m)]}}#o(t){const i=this.#r;let a=i[4],r=i[5];const c=[a,r,a,r];let u=a,h=r;const p=t?Math.max:Math.min;for(let g=6,y=i.length;g<y;g+=6){const b=i[g+4],S=i[g+5];if(isNaN(i[g]))mt.pointBoundingBox(b,S,c),h<S?(u=b,h=S):h===S&&(u=p(u,b));else{const A=[1/0,1/0,-1/0,-1/0];mt.bezierBoundingBox(a,r,...i.slice(g,g+6),A),mt.rectBoundingBox(...A,c),h<A[3]?(u=A[2],h=A[3]):h===A[3]&&(u=p(u,A[2]))}a=b,r=S}const m=this.#e;m[0]=c[0]-this.#n,m[1]=c[1]-this.#n,m[2]=c[2]-c[0]+2*this.#n,m[3]=c[3]-c[1]+2*this.#n,this.lastPoint=[u,h]}get box(){return this.#e}newOutliner(t,i,a,r,c,u=0){return new xa(t,i,a,r,c,u)}getNewOutline(t,i){const[a,r,c,u]=this.#e,[h,p,m,g]=this.#t,y=c*m,b=u*g,S=a*m+h,A=r*g+p,_=this.newOutliner({x:this.#a[0]*y+S,y:this.#a[1]*b+A},this.#t,this.#s,t,this.#i,i??this.#n);for(let R=2;R<this.#a.length;R+=2)_.add({x:this.#a[R]*y+S,y:this.#a[R+1]*b+A});return _.getOutlines()}}class ap{#t;#e;#n=[];#i=[];constructor(t,i=0,a=0,r=!0){const c=[1/0,1/0,-1/0,-1/0],u=10**-4;for(const{x:S,y:A,width:_,height:R}of t){const x=Math.floor((S-i)/u)*u,L=Math.ceil((S+_+i)/u)*u,k=Math.floor((A-i)/u)*u,U=Math.ceil((A+R+i)/u)*u,I=[x,k,U,!0],j=[L,k,U,!1];this.#n.push(I,j),mt.rectBoundingBox(x,k,L,U,c)}const h=c[2]-c[0]+2*a,p=c[3]-c[1]+2*a,m=c[0]-a,g=c[1]-a,y=this.#n.at(r?-1:-2),b=[y[0],y[2]];for(const S of this.#n){const[A,_,R]=S;S[0]=(A-m)/h,S[1]=(_-g)/p,S[2]=(R-g)/p}this.#t=new Float32Array([m,g,h,p]),this.#e=b}getOutlines(){this.#n.sort((i,a)=>i[0]-a[0]||i[1]-a[1]||i[2]-a[2]);const t=[];for(const i of this.#n)i[3]?(t.push(...this.#u(i)),this.#r(i)):(this.#o(i),t.push(...this.#u(i)));return this.#a(t)}#a(t){const i=[],a=new Set;for(const u of t){const[h,p,m]=u;i.push([h,p,u],[h,m,u])}i.sort((u,h)=>u[1]-h[1]||u[0]-h[0]);for(let u=0,h=i.length;u<h;u+=2){const p=i[u][2],m=i[u+1][2];p.push(m),m.push(p),a.add(p),a.add(m)}const r=[];let c;for(;a.size>0;){const u=a.values().next().value;let[h,p,m,g,y]=u;a.delete(u);let b=h,S=p;for(c=[h,m],r.push(c);;){let A;if(a.has(g))A=g;else if(a.has(y))A=y;else break;a.delete(A),[h,p,m,g,y]=A,b!==h&&(c.push(b,S,h,S===p?p:m),b=h),S=S===p?m:p}c.push(b,S)}return new YO(r,this.#t,this.#e)}#s(t){const i=this.#i;let a=0,r=i.length-1;for(;a<=r;){const c=a+r>>1,u=i[c][0];if(u===t)return c;u<t?a=c+1:r=c-1}return r+1}#r([,t,i]){const a=this.#s(t);this.#i.splice(a,0,[t,i])}#o([,t,i]){const a=this.#s(t);for(let r=a;r<this.#i.length;r++){const[c,u]=this.#i[r];if(c!==t)break;if(c===t&&u===i){this.#i.splice(r,1);return}}for(let r=a-1;r>=0;r--){const[c,u]=this.#i[r];if(c!==t)break;if(c===t&&u===i){this.#i.splice(r,1);return}}}#u(t){const[i,a,r]=t,c=[[i,a,r]],u=this.#s(r);for(let h=0;h<u;h++){const[p,m]=this.#i[h];for(let g=0,y=c.length;g<y;g++){const[,b,S]=c[g];if(!(m<=b||S<=p)){if(b>=p){if(S>m)c[g][1]=m;else{if(y===1)return[];c.splice(g,1),g--,y--}continue}c[g][2]=p,S>m&&c.push([i,m,S])}}}return c}}class YO extends ot{#t;#e;constructor(t,i,a){super(),this.#e=t,this.#t=i,this.lastPoint=a}toSVGPath(){const t=[];for(const i of this.#e){let[a,r]=i;t.push(`M${a} ${r}`);for(let c=2;c<i.length;c+=2){const u=i[c],h=i[c+1];u===a?(t.push(`V${h}`),r=h):h===r&&(t.push(`H${u}`),a=u)}t.push("Z")}return t.join(" ")}serialize([t,i,a,r],c){const u=[],h=a-t,p=r-i;for(const m of this.#e){const g=new Array(m.length);for(let y=0;y<m.length;y+=2)g[y]=t+m[y]*h,g[y+1]=r-m[y+1]*p;u.push(g)}return u}get box(){return this.#t}get classNamesForOutlining(){return["highlightOutline"]}}class rp extends xa{newFreeDrawOutline(t,i,a,r,c,u){return new WO(t,i,a,r,c,u)}}class WO extends z0{newOutliner(t,i,a,r,c,u=0){return new rp(t,i,a,r,c,u)}}class Te extends yt{#t=null;#e=0;#n;#i=null;#a=null;#s=null;#r=null;#o=0;#u=null;#c=null;#h=null;#l=!1;#p=null;#g;#f=null;#d="";#m;#v="";static _defaultColor=null;static _defaultOpacity=1;static _defaultThickness=12;static _type="highlight";static _editorType=wt.HIGHLIGHT;static _freeHighlightId=-1;static _freeHighlight=null;static _freeHighlightClipId="";static get _keyboardManager(){const t=Te.prototype;return zt(this,"_keyboardManager",new tl([[["ArrowLeft","mac+ArrowLeft"],t._moveCaret,{args:[0]}],[["ArrowRight","mac+ArrowRight"],t._moveCaret,{args:[1]}],[["ArrowUp","mac+ArrowUp"],t._moveCaret,{args:[2]}],[["ArrowDown","mac+ArrowDown"],t._moveCaret,{args:[3]}]]))}constructor(t){super({...t,name:"highlightEditor"}),this.color=t.color||Te._defaultColor,this.#m=t.thickness||Te._defaultThickness,this.#g=t.opacity||Te._defaultOpacity,this.#n=t.boxes||null,this.#v=t.methodOfCreation||"",this.#d=t.text||"",this._isDraggable=!1,this.defaultL10nId="pdfjs-editor-highlight-editor",t.highlightId>-1?(this.#l=!0,this.#E(t),this.#_()):this.#n&&(this.#t=t.anchorNode,this.#e=t.anchorOffset,this.#r=t.focusNode,this.#o=t.focusOffset,this.#y(),this.#_(),this.rotate(this.rotation)),this.annotationElementId||this._uiManager.a11yAlert("pdfjs-editor-highlight-added-alert")}get telemetryInitialData(){return{action:"added",type:this.#l?"free_highlight":"highlight",color:this._uiManager.getNonHCMColorName(this.color),thickness:this.#m,methodOfCreation:this.#v}}get telemetryFinalData(){return{type:"highlight",color:this._uiManager.getNonHCMColorName(this.color)}}get commentColor(){return this.color}static computeTelemetryFinalData(t){return{numberOfColors:t.get("color").size}}#y(){const t=new ap(this.#n,.001);this.#c=t.getOutlines(),[this.x,this.y,this.width,this.height]=this.#c.box;const i=new ap(this.#n,.0025,.001,this._uiManager.direction==="ltr");this.#s=i.getOutlines();const{lastPoint:a}=this.#s;this.#p=[(a[0]-this.x)/this.width,(a[1]-this.y)/this.height]}#E({highlightOutlines:t,highlightId:i,clipPathId:a}){this.#c=t;const r=1.5;if(this.#s=t.getNewOutline(this.#m/2+r,.0025),i>=0)this.#h=i,this.#i=a,this.parent.drawLayer.finalizeDraw(i,{bbox:t.box,path:{d:t.toSVGPath()}}),this.#f=this.parent.drawLayer.drawOutline({rootClass:{highlightOutline:!0,free:!0},bbox:this.#s.box,path:{d:this.#s.toSVGPath()}},!0);else if(this.parent){const g=this.parent.viewport.rotation;this.parent.drawLayer.updateProperties(this.#h,{bbox:Te.#M(this.#c.box,(g-this.rotation+360)%360),path:{d:t.toSVGPath()}}),this.parent.drawLayer.updateProperties(this.#f,{bbox:Te.#M(this.#s.box,g),path:{d:this.#s.toSVGPath()}})}const[c,u,h,p]=t.box;switch(this.rotation){case 0:this.x=c,this.y=u,this.width=h,this.height=p;break;case 90:{const[g,y]=this.parentDimensions;this.x=u,this.y=1-c,this.width=h*y/g,this.height=p*g/y;break}case 180:this.x=1-c,this.y=1-u,this.width=h,this.height=p;break;case 270:{const[g,y]=this.parentDimensions;this.x=1-u,this.y=c,this.width=h*y/g,this.height=p*g/y;break}}const{lastPoint:m}=this.#s;this.#p=[(m[0]-c)/h,(m[1]-u)/p]}static initialize(t,i){yt.initialize(t,i),Te._defaultColor||=i.highlightColors?.values().next().value||"#fff066"}static updateDefaultParams(t,i){switch(t){case $t.HIGHLIGHT_COLOR:Te._defaultColor=i;break;case $t.HIGHLIGHT_THICKNESS:Te._defaultThickness=i;break}}translateInPage(t,i){}get toolbarPosition(){return this.#p}updateParams(t,i){switch(t){case $t.HIGHLIGHT_COLOR:this.#A(i);break;case $t.HIGHLIGHT_THICKNESS:this.#b(i);break}}static get defaultPropertiesToUpdate(){return[[$t.HIGHLIGHT_COLOR,Te._defaultColor],[$t.HIGHLIGHT_THICKNESS,Te._defaultThickness]]}get propertiesToUpdate(){return[[$t.HIGHLIGHT_COLOR,this.color||Te._defaultColor],[$t.HIGHLIGHT_THICKNESS,this.#m||Te._defaultThickness],[$t.HIGHLIGHT_FREE,this.#l]]}#A(t){const i=(c,u)=>{this.color=c,this.#g=u,this.parent?.drawLayer.updateProperties(this.#h,{root:{fill:c,"fill-opacity":u}}),this.#a?.updateColor(c)},a=this.color,r=this.#g;this.addCommands({cmd:i.bind(this,t,Te._defaultOpacity),undo:i.bind(this,a,r),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:$t.HIGHLIGHT_COLOR,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:"color_changed",color:this._uiManager.getNonHCMColorName(t)},!0)}#b(t){const i=this.#m,a=r=>{this.#m=r,this.#T(r)};this.addCommands({cmd:a.bind(this,t),undo:a.bind(this,i),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:$t.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:"thickness_changed",thickness:t},!0)}get toolbarButtons(){return this._uiManager.highlightColors?[["colorPicker",this.#a=new Wn({editor:this})]]:super.toolbarButtons}disableEditing(){super.disableEditing(),this.div.classList.toggle("disabled",!0)}enableEditing(){super.enableEditing(),this.div.classList.toggle("disabled",!1)}fixAndSetPosition(){return super.fixAndSetPosition(this.#x())}getBaseTranslation(){return[0,0]}getRect(t,i){return super.getRect(t,i,this.#x())}onceAdded(t){this.annotationElementId||this.parent.addUndoableEditor(this),t&&this.div.focus()}remove(){this.#D(),this._reportTelemetry({action:"deleted"}),super.remove()}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.#_(),this.isAttachedToDOM||this.parent.add(this)))}setParent(t){let i=!1;this.parent&&!t?this.#D():t&&(this.#_(t),i=!this.parent&&this.div?.classList.contains("selectedEditor")),super.setParent(t),this.show(this._isVisible),i&&this.select()}#T(t){if(!this.#l)return;this.#E({highlightOutlines:this.#c.getNewOutline(t/2)}),this.fixAndSetPosition();const[i,a]=this.parentDimensions;this.setDims(this.width*i,this.height*a)}#D(){this.#h===null||!this.parent||(this.parent.drawLayer.remove(this.#h),this.#h=null,this.parent.drawLayer.remove(this.#f),this.#f=null)}#_(t=this.parent){this.#h===null&&({id:this.#h,clipPathId:this.#i}=t.drawLayer.draw({bbox:this.#c.box,root:{viewBox:"0 0 1 1",fill:this.color,"fill-opacity":this.#g},rootClass:{highlight:!0,free:this.#l},path:{d:this.#c.toSVGPath()}},!1,!0),this.#f=t.drawLayer.drawOutline({rootClass:{highlightOutline:!0,free:this.#l},bbox:this.#s.box,path:{d:this.#s.toSVGPath()}},this.#l),this.#u&&(this.#u.style.clipPath=this.#i))}static#M([t,i,a,r],c){switch(c){case 90:return[1-i-r,t,r,a];case 180:return[1-t-a,1-i-r,a,r];case 270:return[i,1-t-a,r,a]}return[t,i,a,r]}rotate(t){const{drawLayer:i}=this.parent;let a;this.#l?(t=(t-this.rotation+360)%360,a=Te.#M(this.#c.box,t)):a=Te.#M([this.x,this.y,this.width,this.height],t),i.updateProperties(this.#h,{bbox:a,root:{"data-main-rotation":t}}),i.updateProperties(this.#f,{bbox:Te.#M(this.#s.box,t),root:{"data-main-rotation":t}})}render(){if(this.div)return this.div;const t=super.render();this.#d&&(t.setAttribute("aria-label",this.#d),t.setAttribute("role","mark")),this.#l?t.classList.add("free"):this.div.addEventListener("keydown",this.#R.bind(this),{signal:this._uiManager._signal});const i=this.#u=document.createElement("div");t.append(i),i.setAttribute("aria-hidden","true"),i.className="internal",i.style.clipPath=this.#i;const[a,r]=this.parentDimensions;return this.setDims(this.width*a,this.height*r),Kv(this,this.#u,["pointerover","pointerleave"]),this.enableEditing(),t}pointerover(){this.isSelected||this.parent?.drawLayer.updateProperties(this.#f,{rootClass:{hovered:!0}})}pointerleave(){this.isSelected||this.parent?.drawLayer.updateProperties(this.#f,{rootClass:{hovered:!1}})}#R(t){Te._keyboardManager.exec(this,t)}_moveCaret(t){switch(this.parent.unselect(this),t){case 0:case 2:this.#C(!0);break;case 1:case 3:this.#C(!1);break}}#C(t){if(!this.#t)return;const i=window.getSelection();t?i.setPosition(this.#t,this.#e):i.setPosition(this.#r,this.#o)}select(){super.select(),this.#f&&this.parent?.drawLayer.updateProperties(this.#f,{rootClass:{hovered:!1,selected:!0}})}unselect(){super.unselect(),this.#f&&(this.parent?.drawLayer.updateProperties(this.#f,{rootClass:{selected:!1}}),this.#l||this.#C(!1))}get _mustFixPosition(){return!this.#l}show(t=this._isVisible){super.show(t),this.parent&&(this.parent.drawLayer.updateProperties(this.#h,{rootClass:{hidden:!t}}),this.parent.drawLayer.updateProperties(this.#f,{rootClass:{hidden:!t}}))}#x(){return this.#l?this.rotation:0}#k(){if(this.#l)return null;const[t,i]=this.pageDimensions,[a,r]=this.pageTranslation,c=this.#n,u=new Float32Array(c.length*8);let h=0;for(const{x:p,y:m,width:g,height:y}of c){const b=p*t+a,S=(1-m)*i+r;u[h]=u[h+4]=b,u[h+1]=u[h+3]=S,u[h+2]=u[h+6]=b+g*t,u[h+5]=u[h+7]=S-y*i,h+=8}return u}#U(t){return this.#c.serialize(t,this.#x())}static startHighlighting(t,i,{target:a,x:r,y:c}){const{x:u,y:h,width:p,height:m}=a.getBoundingClientRect(),g=new AbortController,y=t.combinedSignal(g),b=S=>{g.abort(),this.#F(t,S)};window.addEventListener("blur",b,{signal:y}),window.addEventListener("pointerup",b,{signal:y}),window.addEventListener("pointerdown",Oe,{capture:!0,passive:!1,signal:y}),window.addEventListener("contextmenu",Xn,{signal:y}),a.addEventListener("pointermove",this.#N.bind(this,t),{signal:y}),this._freeHighlight=new rp({x:r,y:c},[u,h,p,m],t.scale,this._defaultThickness/2,i,.001),{id:this._freeHighlightId,clipPathId:this._freeHighlightClipId}=t.drawLayer.draw({bbox:[0,0,1,1],root:{viewBox:"0 0 1 1",fill:this._defaultColor,"fill-opacity":this._defaultOpacity},rootClass:{highlight:!0,free:!0},path:{d:this._freeHighlight.toSVGPath()}},!0,!0)}static#N(t,i){this._freeHighlight.add(i)&&t.drawLayer.updateProperties(this._freeHighlightId,{path:{d:this._freeHighlight.toSVGPath()}})}static#F(t,i){this._freeHighlight.isEmpty()?t.drawLayer.remove(this._freeHighlightId):t.createAndAddNewEditor(i,!1,{highlightId:this._freeHighlightId,highlightOutlines:this._freeHighlight.getOutlines(),clipPathId:this._freeHighlightClipId,methodOfCreation:"main_toolbar"}),this._freeHighlightId=-1,this._freeHighlight=null,this._freeHighlightClipId=""}static async deserialize(t,i,a){let r=null;if(t instanceof P0){const{data:{quadPoints:A,rect:_,rotation:R,id:x,color:L,opacity:k,popupRef:U,contentsObj:I},parent:{page:{pageNumber:j}}}=t;r=t={annotationType:wt.HIGHLIGHT,color:Array.from(L),opacity:k,quadPoints:A,boxes:null,pageIndex:j-1,rect:_.slice(0),rotation:R,annotationElementId:x,id:x,deleted:!1,popupRef:U,comment:I?.str||null}}else if(t instanceof ip){const{data:{inkLists:A,rect:_,rotation:R,id:x,color:L,borderStyle:{rawWidth:k},popupRef:U,contentsObj:I},parent:{page:{pageNumber:j}}}=t;r=t={annotationType:wt.HIGHLIGHT,color:Array.from(L),thickness:k,inkLists:A,boxes:null,pageIndex:j-1,rect:_.slice(0),rotation:R,annotationElementId:x,id:x,deleted:!1,popupRef:U,comment:I?.str||null}}const{color:c,quadPoints:u,inkLists:h,opacity:p}=t,m=await super.deserialize(t,i,a);m.color=mt.makeHexColor(...c),m.#g=p||1,h&&(m.#m=t.thickness),m._initialData=r,t.comment&&m.setCommentData(t.comment);const[g,y]=m.pageDimensions,[b,S]=m.pageTranslation;if(u){const A=m.#n=[];for(let _=0;_<u.length;_+=8)A.push({x:(u[_]-b)/g,y:1-(u[_+1]-S)/y,width:(u[_+2]-u[_])/g,height:(u[_+1]-u[_+5])/y});m.#y(),m.#_(),m.rotate(m.rotation)}else if(h){m.#l=!0;const A=h[0],_={x:A[0]-b,y:y-(A[1]-S)},R=new rp(_,[0,0,g,y],1,m.#m/2,!0,.001);for(let k=0,U=A.length;k<U;k+=2)_.x=A[k]-b,_.y=y-(A[k+1]-S),R.add(_);const{id:x,clipPathId:L}=i.drawLayer.draw({bbox:[0,0,1,1],root:{viewBox:"0 0 1 1",fill:m.color,"fill-opacity":m._defaultOpacity},rootClass:{highlight:!0,free:!0},path:{d:R.toSVGPath()}},!0,!0);m.#E({highlightOutlines:R.getOutlines(),highlightId:x,clipPathId:L}),m.#_(),m.rotate(m.parentRotation)}return m}serialize(t=!1){if(this.isEmpty()||t)return null;if(this.deleted)return this.serializeDeleted();const i=this.getRect(0,0),a=yt._colorManager.convert(this._uiManager.getNonHCMColor(this.color)),r={annotationType:wt.HIGHLIGHT,color:a,opacity:this.#g,thickness:this.#m,quadPoints:this.#k(),outlines:this.#U(i),pageIndex:this.pageIndex,rect:i,rotation:this.#x(),structTreeParentId:this._structTreeParentId};return this.addComment(r),this.annotationElementId&&!this.#w(r)?null:(r.id=this.annotationElementId,r)}#w(t){const{color:i}=this._initialData;return this.hasEditedComment||t.color.some((a,r)=>a!==i[r])}renderAnnotationElement(t){const i={rect:this.getRect(0,0)};return this.hasEditedComment&&(i.popup=this.comment),t.updateEdited(i),null}static canCreateNewEmptyEditor(){return!1}}class H0{#t=Object.create(null);updateProperty(t,i){this[t]=i,this.updateSVGProperty(t,i)}updateProperties(t){if(t)for(const[i,a]of Object.entries(t))i.startsWith("_")||this.updateProperty(i,a)}updateSVGProperty(t,i){this.#t[t]=i}toSVGProperties(){const t=this.#t;return this.#t=Object.create(null),{root:t}}reset(){this.#t=Object.create(null)}updateAll(t=this){this.updateProperties(t)}clone(){ie("Not implemented")}}class St extends yt{#t=null;#e;_colorPicker=null;_drawId=null;static _currentDrawId=-1;static _currentParent=null;static#n=null;static#i=null;static#a=null;static#s=NaN;static#r=null;static#o=null;static#u=NaN;static _INNER_MARGIN=3;constructor(t){super(t),this.#e=t.mustBeCommitted||!1,this._addOutlines(t)}_addOutlines(t){t.drawOutlines&&(this.#c(t),this.#p())}#c({drawOutlines:t,drawId:i,drawingOptions:a}){this.#t=t,this._drawingOptions||=a,this.annotationElementId||this._uiManager.a11yAlert(`pdfjs-editor-${this.editorType}-added-alert`),i>=0?(this._drawId=i,this.parent.drawLayer.finalizeDraw(i,t.defaultProperties)):this._drawId=this.#h(t,this.parent),this.#d(t.box)}#h(t,i){const{id:a}=i.drawLayer.draw(St._mergeSVGProperties(this._drawingOptions.toSVGProperties(),t.defaultSVGProperties),!1,!1);return a}static _mergeSVGProperties(t,i){const a=new Set(Object.keys(t));for(const[r,c]of Object.entries(i))a.has(r)?Object.assign(t[r],c):t[r]=c;return t}static getDefaultDrawingOptions(t){ie("Not implemented")}static get typesMap(){ie("Not implemented")}static get isDrawer(){return!0}static get supportMultipleDrawings(){return!1}static updateDefaultParams(t,i){const a=this.typesMap.get(t);a&&this._defaultDrawingOptions.updateProperty(a,i),this._currentParent&&(St.#n.updateProperty(a,i),this._currentParent.drawLayer.updateProperties(this._currentDrawId,this._defaultDrawingOptions.toSVGProperties()))}updateParams(t,i){const a=this.constructor.typesMap.get(t);a&&this._updateProperty(t,a,i)}static get defaultPropertiesToUpdate(){const t=[],i=this._defaultDrawingOptions;for(const[a,r]of this.typesMap)t.push([a,i[r]]);return t}get propertiesToUpdate(){const t=[],{_drawingOptions:i}=this;for(const[a,r]of this.constructor.typesMap)t.push([a,i[r]]);return t}_updateProperty(t,i,a){const r=this._drawingOptions,c=r[i],u=h=>{r.updateProperty(i,h);const p=this.#t.updateProperty(i,h);p&&this.#d(p),this.parent?.drawLayer.updateProperties(this._drawId,r.toSVGProperties()),t===this.colorType&&this._colorPicker?.update(h)};this.addCommands({cmd:u.bind(this,a),undo:u.bind(this,c),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:t,overwriteIfSameType:!0,keepUndo:!0})}_onResizing(){this.parent?.drawLayer.updateProperties(this._drawId,St._mergeSVGProperties(this.#t.getPathResizingSVGProperties(this.#f()),{bbox:this.#m()}))}_onResized(){this.parent?.drawLayer.updateProperties(this._drawId,St._mergeSVGProperties(this.#t.getPathResizedSVGProperties(this.#f()),{bbox:this.#m()}))}_onTranslating(t,i){this.parent?.drawLayer.updateProperties(this._drawId,{bbox:this.#m()})}_onTranslated(){this.parent?.drawLayer.updateProperties(this._drawId,St._mergeSVGProperties(this.#t.getPathTranslatedSVGProperties(this.#f(),this.parentDimensions),{bbox:this.#m()}))}_onStartDragging(){this.parent?.drawLayer.updateProperties(this._drawId,{rootClass:{moving:!0}})}_onStopDragging(){this.parent?.drawLayer.updateProperties(this._drawId,{rootClass:{moving:!1}})}commit(){super.commit(),this.disableEditMode(),this.disableEditing()}disableEditing(){super.disableEditing(),this.div.classList.toggle("disabled",!0)}enableEditing(){super.enableEditing(),this.div.classList.toggle("disabled",!1)}getBaseTranslation(){return[0,0]}get isResizable(){return!0}onceAdded(t){this.annotationElementId||this.parent.addUndoableEditor(this),this._isDraggable=!0,this.#e&&(this.#e=!1,this.commit(),this.parent.setSelected(this),t&&this.isOnScreen&&this.div.focus())}remove(){this.#l(),super.remove()}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.#p(),this.#d(this.#t.box),this.isAttachedToDOM||this.parent.add(this)))}setParent(t){let i=!1;this.parent&&!t?(this._uiManager.removeShouldRescale(this),this.#l()):t&&(this._uiManager.addShouldRescale(this),this.#p(t),i=!this.parent&&this.div?.classList.contains("selectedEditor")),super.setParent(t),i&&this.select()}#l(){this._drawId===null||!this.parent||(this.parent.drawLayer.remove(this._drawId),this._drawId=null,this._drawingOptions.reset())}#p(t=this.parent){if(!(this._drawId!==null&&this.parent===t)){if(this._drawId!==null){this.parent.drawLayer.updateParent(this._drawId,t.drawLayer);return}this._drawingOptions.updateAll(),this._drawId=this.#h(this.#t,t)}}#g([t,i,a,r]){const{parentDimensions:[c,u],rotation:h}=this;switch(h){case 90:return[i,1-t,a*(u/c),r*(c/u)];case 180:return[1-t,1-i,a,r];case 270:return[1-i,t,a*(u/c),r*(c/u)];default:return[t,i,a,r]}}#f(){const{x:t,y:i,width:a,height:r,parentDimensions:[c,u],rotation:h}=this;switch(h){case 90:return[1-i,t,a*(c/u),r*(u/c)];case 180:return[1-t,1-i,a,r];case 270:return[i,1-t,a*(c/u),r*(u/c)];default:return[t,i,a,r]}}#d(t){if([this.x,this.y,this.width,this.height]=this.#g(t),this.div){this.fixAndSetPosition();const[i,a]=this.parentDimensions;this.setDims(this.width*i,this.height*a)}this._onResized()}#m(){const{x:t,y:i,width:a,height:r,rotation:c,parentRotation:u,parentDimensions:[h,p]}=this;switch((c*4+u)/90){case 1:return[1-i-r,t,r,a];case 2:return[1-t-a,1-i-r,a,r];case 3:return[i,1-t-a,r,a];case 4:return[t,i-a*(h/p),r*(p/h),a*(h/p)];case 5:return[1-i,t,a*(h/p),r*(p/h)];case 6:return[1-t-r*(p/h),1-i,r*(p/h),a*(h/p)];case 7:return[i-a*(h/p),1-t-r*(p/h),a*(h/p),r*(p/h)];case 8:return[t-a,i-r,a,r];case 9:return[1-i,t-a,r,a];case 10:return[1-t,1-i,a,r];case 11:return[i-r,1-t,r,a];case 12:return[t-r*(p/h),i,r*(p/h),a*(h/p)];case 13:return[1-i-a*(h/p),t-r*(p/h),a*(h/p),r*(p/h)];case 14:return[1-t,1-i-a*(h/p),r*(p/h),a*(h/p)];case 15:return[i,1-t,a*(h/p),r*(p/h)];default:return[t,i,a,r]}}rotate(){this.parent&&this.parent.drawLayer.updateProperties(this._drawId,St._mergeSVGProperties({bbox:this.#m()},this.#t.updateRotation((this.parentRotation-this.rotation+360)%360)))}onScaleChanging(){this.parent&&this.#d(this.#t.updateParentDimensions(this.parentDimensions,this.parent.scale))}static onScaleChangingWhenDrawing(){}render(){if(this.div)return this.div;let t,i;this._isCopy&&(t=this.x,i=this.y);const a=super.render();a.classList.add("draw");const r=document.createElement("div");a.append(r),r.setAttribute("aria-hidden","true"),r.className="internal";const[c,u]=this.parentDimensions;return this.setDims(this.width*c,this.height*u),this._uiManager.addShouldRescale(this),this.disableEditing(),this._isCopy&&this._moveAfterPaste(t,i),a}static createDrawerInstance(t,i,a,r,c){ie("Not implemented")}static startDrawing(t,i,a,r){const{target:c,offsetX:u,offsetY:h,pointerId:p,pointerType:m}=r;if(St.#r&&St.#r!==m)return;const{viewport:{rotation:g}}=t,{width:y,height:b}=c.getBoundingClientRect(),S=St.#i=new AbortController,A=t.combinedSignal(S);if(St.#s||=p,St.#r??=m,window.addEventListener("pointerup",_=>{St.#s===_.pointerId?this._endDraw(_):St.#o?.delete(_.pointerId)},{signal:A}),window.addEventListener("pointercancel",_=>{St.#s===_.pointerId?this._currentParent.endDrawingSession():St.#o?.delete(_.pointerId)},{signal:A}),window.addEventListener("pointerdown",_=>{St.#r===_.pointerType&&((St.#o||=new Set).add(_.pointerId),St.#n.isCancellable()&&(St.#n.removeLastElement(),St.#n.isEmpty()?this._currentParent.endDrawingSession(!0):this._endDraw(null)))},{capture:!0,passive:!1,signal:A}),window.addEventListener("contextmenu",Xn,{signal:A}),c.addEventListener("pointermove",this._drawMove.bind(this),{signal:A}),c.addEventListener("touchmove",_=>{_.timeStamp===St.#u&&Oe(_)},{signal:A}),t.toggleDrawing(),i._editorUndoBar?.hide(),St.#n){t.drawLayer.updateProperties(this._currentDrawId,St.#n.startNew(u,h,y,b,g));return}i.updateUIForDefaultProperties(this),St.#n=this.createDrawerInstance(u,h,y,b,g),St.#a=this.getDefaultDrawingOptions(),this._currentParent=t,{id:this._currentDrawId}=t.drawLayer.draw(this._mergeSVGProperties(St.#a.toSVGProperties(),St.#n.defaultSVGProperties),!0,!1)}static _drawMove(t){if(St.#u=-1,!St.#n)return;const{offsetX:i,offsetY:a,pointerId:r}=t;if(St.#s===r){if(St.#o?.size>=1){this._endDraw(t);return}this._currentParent.drawLayer.updateProperties(this._currentDrawId,St.#n.add(i,a)),St.#u=t.timeStamp,Oe(t)}}static _cleanup(t){t&&(this._currentDrawId=-1,this._currentParent=null,St.#n=null,St.#a=null,St.#r=null,St.#u=NaN),St.#i&&(St.#i.abort(),St.#i=null,St.#s=NaN,St.#o=null)}static _endDraw(t){const i=this._currentParent;if(i){if(i.toggleDrawing(!0),this._cleanup(!1),t?.target===i.div&&i.drawLayer.updateProperties(this._currentDrawId,St.#n.end(t.offsetX,t.offsetY)),this.supportMultipleDrawings){const a=St.#n,r=this._currentDrawId,c=a.getLastElement();i.addCommands({cmd:()=>{i.drawLayer.updateProperties(r,a.setLastElement(c))},undo:()=>{i.drawLayer.updateProperties(r,a.removeLastElement())},mustExec:!1,type:$t.DRAW_STEP});return}this.endDrawing(!1)}}static endDrawing(t){const i=this._currentParent;if(!i)return null;if(i.toggleDrawing(!0),i.cleanUndoStack($t.DRAW_STEP),!St.#n.isEmpty()){const{pageDimensions:[a,r],scale:c}=i,u=i.createAndAddNewEditor({offsetX:0,offsetY:0},!1,{drawId:this._currentDrawId,drawOutlines:St.#n.getOutlines(a*c,r*c,c,this._INNER_MARGIN),drawingOptions:St.#a,mustBeCommitted:!t});return this._cleanup(!0),u}return i.drawLayer.remove(this._currentDrawId),this._cleanup(!0),null}createDrawingOptions(t){}static deserializeDraw(t,i,a,r,c,u){ie("Not implemented")}static async deserialize(t,i,a){const{rawDims:{pageWidth:r,pageHeight:c,pageX:u,pageY:h}}=i.viewport,p=this.deserializeDraw(u,h,r,c,this._INNER_MARGIN,t),m=await super.deserialize(t,i,a);return m.createDrawingOptions(t),m.#c({drawOutlines:p}),m.#p(),m.onScaleChanging(),m.rotate(),m}serializeDraw(t){const[i,a]=this.pageTranslation,[r,c]=this.pageDimensions;return this.#t.serialize([i,a,r,c],t)}renderAnnotationElement(t){return t.updateEdited({rect:this.getRect(0,0)}),null}static canCreateNewEmptyEditor(){return!1}}class QO{#t=new Float64Array(6);#e;#n;#i;#a;#s;#r="";#o=0;#u=new cl;#c;#h;constructor(t,i,a,r,c,u){this.#c=a,this.#h=r,this.#i=c,this.#a=u,[t,i]=this.#l(t,i);const h=this.#e=[NaN,NaN,NaN,NaN,t,i];this.#s=[t,i],this.#n=[{line:h,points:this.#s}],this.#t.set(h,0)}updateProperty(t,i){t==="stroke-width"&&(this.#a=i)}#l(t,i){return ot._normalizePoint(t,i,this.#c,this.#h,this.#i)}isEmpty(){return!this.#n||this.#n.length===0}isCancellable(){return this.#s.length<=10}add(t,i){[t,i]=this.#l(t,i);const[a,r,c,u]=this.#t.subarray(2,6),h=t-c,p=i-u;return Math.hypot(this.#c*h,this.#h*p)<=2?null:(this.#s.push(t,i),isNaN(a)?(this.#t.set([c,u,t,i],2),this.#e.push(NaN,NaN,NaN,NaN,t,i),{path:{d:this.toSVGPath()}}):(isNaN(this.#t[0])&&this.#e.splice(6,6),this.#t.set([a,r,c,u,t,i],0),this.#e.push(...ot.createBezierPoints(a,r,c,u,t,i)),{path:{d:this.toSVGPath()}}))}end(t,i){const a=this.add(t,i);return a||(this.#s.length===2?{path:{d:this.toSVGPath()}}:null)}startNew(t,i,a,r,c){this.#c=a,this.#h=r,this.#i=c,[t,i]=this.#l(t,i);const u=this.#e=[NaN,NaN,NaN,NaN,t,i];this.#s=[t,i];const h=this.#n.at(-1);return h&&(h.line=new Float32Array(h.line),h.points=new Float32Array(h.points)),this.#n.push({line:u,points:this.#s}),this.#t.set(u,0),this.#o=0,this.toSVGPath(),null}getLastElement(){return this.#n.at(-1)}setLastElement(t){return this.#n?(this.#n.push(t),this.#e=t.line,this.#s=t.points,this.#o=0,{path:{d:this.toSVGPath()}}):this.#u.setLastElement(t)}removeLastElement(){if(!this.#n)return this.#u.removeLastElement();this.#n.pop(),this.#r="";for(let t=0,i=this.#n.length;t<i;t++){const{line:a,points:r}=this.#n[t];this.#e=a,this.#s=r,this.#o=0,this.toSVGPath()}return{path:{d:this.#r}}}toSVGPath(){const t=ot.svgRound(this.#e[4]),i=ot.svgRound(this.#e[5]);if(this.#s.length===2)return this.#r=`${this.#r} M ${t} ${i} Z`,this.#r;if(this.#s.length<=6){const r=this.#r.lastIndexOf("M");this.#r=`${this.#r.slice(0,r)} M ${t} ${i}`,this.#o=6}if(this.#s.length===4){const r=ot.svgRound(this.#e[10]),c=ot.svgRound(this.#e[11]);return this.#r=`${this.#r} L ${r} ${c}`,this.#o=12,this.#r}const a=[];this.#o===0&&(a.push(`M ${t} ${i}`),this.#o=6);for(let r=this.#o,c=this.#e.length;r<c;r+=6){const[u,h,p,m,g,y]=this.#e.slice(r,r+6).map(ot.svgRound);a.push(`C${u} ${h} ${p} ${m} ${g} ${y}`)}return this.#r+=a.join(" "),this.#o=this.#e.length,this.#r}getOutlines(t,i,a,r){const c=this.#n.at(-1);return c.line=new Float32Array(c.line),c.points=new Float32Array(c.points),this.#u.build(this.#n,t,i,a,this.#i,this.#a,r),this.#t=null,this.#e=null,this.#n=null,this.#r=null,this.#u}get defaultSVGProperties(){return{root:{viewBox:"0 0 10000 10000"},rootClass:{draw:!0},bbox:[0,0,1,1]}}}class cl extends ot{#t;#e=0;#n;#i;#a;#s;#r;#o;#u;build(t,i,a,r,c,u,h){this.#a=i,this.#s=a,this.#r=r,this.#o=c,this.#u=u,this.#n=h??0,this.#i=t,this.#l()}get thickness(){return this.#u}setLastElement(t){return this.#i.push(t),{path:{d:this.toSVGPath()}}}removeLastElement(){return this.#i.pop(),{path:{d:this.toSVGPath()}}}toSVGPath(){const t=[];for(const{line:i}of this.#i){if(t.push(`M${ot.svgRound(i[4])} ${ot.svgRound(i[5])}`),i.length===6){t.push("Z");continue}if(i.length===12&&isNaN(i[6])){t.push(`L${ot.svgRound(i[10])} ${ot.svgRound(i[11])}`);continue}for(let a=6,r=i.length;a<r;a+=6){const[c,u,h,p,m,g]=i.subarray(a,a+6).map(ot.svgRound);t.push(`C${c} ${u} ${h} ${p} ${m} ${g}`)}}return t.join("")}serialize([t,i,a,r],c){const u=[],h=[],[p,m,g,y]=this.#h();let b,S,A,_,R,x,L,k,U;switch(this.#o){case 0:U=ot._rescale,b=t,S=i+r,A=a,_=-r,R=t+p*a,x=i+(1-m-y)*r,L=t+(p+g)*a,k=i+(1-m)*r;break;case 90:U=ot._rescaleAndSwap,b=t,S=i,A=a,_=r,R=t+m*a,x=i+p*r,L=t+(m+y)*a,k=i+(p+g)*r;break;case 180:U=ot._rescale,b=t+a,S=i,A=-a,_=r,R=t+(1-p-g)*a,x=i+m*r,L=t+(1-p)*a,k=i+(m+y)*r;break;case 270:U=ot._rescaleAndSwap,b=t+a,S=i+r,A=-a,_=-r,R=t+(1-m-y)*a,x=i+(1-p-g)*r,L=t+(1-m)*a,k=i+(1-p)*r;break}for(const{line:I,points:j}of this.#i)u.push(U(I,b,S,A,_,c?new Array(I.length):null)),h.push(U(j,b,S,A,_,c?new Array(j.length):null));return{lines:u,points:h,rect:[R,x,L,k]}}static deserialize(t,i,a,r,c,{paths:{lines:u,points:h},rotation:p,thickness:m}){const g=[];let y,b,S,A,_;switch(p){case 0:_=ot._rescale,y=-t/a,b=i/r+1,S=1/a,A=-1/r;break;case 90:_=ot._rescaleAndSwap,y=-i/r,b=-t/a,S=1/r,A=1/a;break;case 180:_=ot._rescale,y=t/a+1,b=-i/r,S=-1/a,A=1/r;break;case 270:_=ot._rescaleAndSwap,y=i/r+1,b=t/a+1,S=-1/r,A=-1/a;break}if(!u){u=[];for(const x of h){const L=x.length;if(L===2){u.push(new Float32Array([NaN,NaN,NaN,NaN,x[0],x[1]]));continue}if(L===4){u.push(new Float32Array([NaN,NaN,NaN,NaN,x[0],x[1],NaN,NaN,NaN,NaN,x[2],x[3]]));continue}const k=new Float32Array(3*(L-2));u.push(k);let[U,I,j,F]=x.subarray(0,4);k.set([NaN,NaN,NaN,NaN,U,I],0);for(let J=4;J<L;J+=2){const Y=x[J],at=x[J+1];k.set(ot.createBezierPoints(U,I,j,F,Y,at),(J-2)*3),[U,I,j,F]=[j,F,Y,at]}}}for(let x=0,L=u.length;x<L;x++)g.push({line:_(u[x].map(k=>k??NaN),y,b,S,A),points:_(h[x].map(k=>k??NaN),y,b,S,A)});const R=new this.prototype.constructor;return R.build(g,a,r,1,p,m,c),R}#c(t=this.#u){const i=this.#n+t/2*this.#r;return this.#o%180===0?[i/this.#a,i/this.#s]:[i/this.#s,i/this.#a]}#h(){const[t,i,a,r]=this.#t,[c,u]=this.#c(0);return[t+c,i+u,a-2*c,r-2*u]}#l(){const t=this.#t=new Float32Array([1/0,1/0,-1/0,-1/0]);for(const{line:r}of this.#i){if(r.length<=12){for(let h=4,p=r.length;h<p;h+=6)mt.pointBoundingBox(r[h],r[h+1],t);continue}let c=r[4],u=r[5];for(let h=6,p=r.length;h<p;h+=6){const[m,g,y,b,S,A]=r.subarray(h,h+6);mt.bezierBoundingBox(c,u,m,g,y,b,S,A,t),c=S,u=A}}const[i,a]=this.#c();t[0]=dn(t[0]-i,0,1),t[1]=dn(t[1]-a,0,1),t[2]=dn(t[2]+i,0,1),t[3]=dn(t[3]+a,0,1),t[2]-=t[0],t[3]-=t[1]}get box(){return this.#t}updateProperty(t,i){return t==="stroke-width"?this.#p(i):null}#p(t){const[i,a]=this.#c();this.#u=t;const[r,c]=this.#c(),[u,h]=[r-i,c-a],p=this.#t;return p[0]-=u,p[1]-=h,p[2]+=2*u,p[3]+=2*h,p}updateParentDimensions([t,i],a){const[r,c]=this.#c();this.#a=t,this.#s=i,this.#r=a;const[u,h]=this.#c(),p=u-r,m=h-c,g=this.#t;return g[0]-=p,g[1]-=m,g[2]+=2*p,g[3]+=2*m,g}updateRotation(t){return this.#e=t,{path:{transform:this.rotationTransform}}}get viewBox(){return this.#t.map(ot.svgRound).join(" ")}get defaultProperties(){const[t,i]=this.#t;return{root:{viewBox:this.viewBox},path:{"transform-origin":`${ot.svgRound(t)} ${ot.svgRound(i)}`}}}get rotationTransform(){const[,,t,i]=this.#t;let a=0,r=0,c=0,u=0,h=0,p=0;switch(this.#e){case 90:r=i/t,c=-t/i,h=t;break;case 180:a=-1,u=-1,h=t,p=i;break;case 270:r=-i/t,c=t/i,p=i;break;default:return""}return`matrix(${a} ${r} ${c} ${u} ${ot.svgRound(h)} ${ot.svgRound(p)})`}getPathResizingSVGProperties([t,i,a,r]){const[c,u]=this.#c(),[h,p,m,g]=this.#t;if(Math.abs(m-c)<=ot.PRECISION||Math.abs(g-u)<=ot.PRECISION){const _=t+a/2-(h+m/2),R=i+r/2-(p+g/2);return{path:{"transform-origin":`${ot.svgRound(t)} ${ot.svgRound(i)}`,transform:`${this.rotationTransform} translate(${_} ${R})`}}}const y=(a-2*c)/(m-2*c),b=(r-2*u)/(g-2*u),S=m/a,A=g/r;return{path:{"transform-origin":`${ot.svgRound(h)} ${ot.svgRound(p)}`,transform:`${this.rotationTransform} scale(${S} ${A}) translate(${ot.svgRound(c)} ${ot.svgRound(u)}) scale(${y} ${b}) translate(${ot.svgRound(-c)} ${ot.svgRound(-u)})`}}}getPathResizedSVGProperties([t,i,a,r]){const[c,u]=this.#c(),h=this.#t,[p,m,g,y]=h;if(h[0]=t,h[1]=i,h[2]=a,h[3]=r,Math.abs(g-c)<=ot.PRECISION||Math.abs(y-u)<=ot.PRECISION){const R=t+a/2-(p+g/2),x=i+r/2-(m+y/2);for(const{line:L,points:k}of this.#i)ot._translate(L,R,x,L),ot._translate(k,R,x,k);return{root:{viewBox:this.viewBox},path:{"transform-origin":`${ot.svgRound(t)} ${ot.svgRound(i)}`,transform:this.rotationTransform||null,d:this.toSVGPath()}}}const b=(a-2*c)/(g-2*c),S=(r-2*u)/(y-2*u),A=-b*(p+c)+t+c,_=-S*(m+u)+i+u;if(b!==1||S!==1||A!==0||_!==0)for(const{line:R,points:x}of this.#i)ot._rescale(R,A,_,b,S,R),ot._rescale(x,A,_,b,S,x);return{root:{viewBox:this.viewBox},path:{"transform-origin":`${ot.svgRound(t)} ${ot.svgRound(i)}`,transform:this.rotationTransform||null,d:this.toSVGPath()}}}getPathTranslatedSVGProperties([t,i],a){const[r,c]=a,u=this.#t,h=t-u[0],p=i-u[1];if(this.#a===r&&this.#s===c)for(const{line:m,points:g}of this.#i)ot._translate(m,h,p,m),ot._translate(g,h,p,g);else{const m=this.#a/r,g=this.#s/c;this.#a=r,this.#s=c;for(const{line:y,points:b}of this.#i)ot._rescale(y,h,p,m,g,y),ot._rescale(b,h,p,m,g,b);u[2]*=m,u[3]*=g}return u[0]=t,u[1]=i,{root:{viewBox:this.viewBox},path:{d:this.toSVGPath(),"transform-origin":`${ot.svgRound(t)} ${ot.svgRound(i)}`}}}get defaultSVGProperties(){const t=this.#t;return{root:{viewBox:this.viewBox},rootClass:{draw:!0},path:{d:this.toSVGPath(),"transform-origin":`${ot.svgRound(t[0])} ${ot.svgRound(t[1])}`,transform:this.rotationTransform||null},bbox:t}}}class Ou extends H0{constructor(t){super(),this._viewParameters=t,super.updateProperties({fill:"none",stroke:yt._defaultLineColor,"stroke-opacity":1,"stroke-width":1,"stroke-linecap":"round","stroke-linejoin":"round","stroke-miterlimit":10})}updateSVGProperty(t,i){t==="stroke-width"&&(i??=this["stroke-width"],i*=this._viewParameters.realScale),super.updateSVGProperty(t,i)}clone(){const t=new Ou(this._viewParameters);return t.updateAll(this),t}}class op extends St{static _type="ink";static _editorType=wt.INK;static _defaultDrawingOptions=null;constructor(t){super({...t,name:"inkEditor"}),this._willKeepAspectRatio=!0,this.defaultL10nId="pdfjs-editor-ink-editor"}static initialize(t,i){yt.initialize(t,i),this._defaultDrawingOptions=new Ou(i.viewParameters)}static getDefaultDrawingOptions(t){const i=this._defaultDrawingOptions.clone();return i.updateProperties(t),i}static get supportMultipleDrawings(){return!0}static get typesMap(){return zt(this,"typesMap",new Map([[$t.INK_THICKNESS,"stroke-width"],[$t.INK_COLOR,"stroke"],[$t.INK_OPACITY,"stroke-opacity"]]))}static createDrawerInstance(t,i,a,r,c){return new QO(t,i,a,r,c,this._defaultDrawingOptions["stroke-width"])}static deserializeDraw(t,i,a,r,c,u){return cl.deserialize(t,i,a,r,c,u)}static async deserialize(t,i,a){let r=null;if(t instanceof ip){const{data:{inkLists:u,rect:h,rotation:p,id:m,color:g,opacity:y,borderStyle:{rawWidth:b},popupRef:S,contentsObj:A},parent:{page:{pageNumber:_}}}=t;r=t={annotationType:wt.INK,color:Array.from(g),thickness:b,opacity:y,paths:{points:u},boxes:null,pageIndex:_-1,rect:h.slice(0),rotation:p,annotationElementId:m,id:m,deleted:!1,popupRef:S,comment:A?.str||null}}const c=await super.deserialize(t,i,a);return c._initialData=r,t.comment&&c.setCommentData(t.comment),c}get toolbarButtons(){return this._colorPicker||=new ol(this),[["colorPicker",this._colorPicker]]}get colorType(){return $t.INK_COLOR}get colorValue(){return this._drawingOptions.stroke}onScaleChanging(){if(!this.parent)return;super.onScaleChanging();const{_drawId:t,_drawingOptions:i,parent:a}=this;i.updateSVGProperty("stroke-width"),a.drawLayer.updateProperties(t,i.toSVGProperties())}static onScaleChangingWhenDrawing(){const t=this._currentParent;t&&(super.onScaleChangingWhenDrawing(),this._defaultDrawingOptions.updateSVGProperty("stroke-width"),t.drawLayer.updateProperties(this._currentDrawId,this._defaultDrawingOptions.toSVGProperties()))}createDrawingOptions({color:t,thickness:i,opacity:a}){this._drawingOptions=op.getDefaultDrawingOptions({stroke:mt.makeHexColor(...t),"stroke-width":i,"stroke-opacity":a})}serialize(t=!1){if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();const{lines:i,points:a,rect:r}=this.serializeDraw(t),{_drawingOptions:{stroke:c,"stroke-opacity":u,"stroke-width":h}}=this,p={annotationType:wt.INK,color:yt._colorManager.convert(c),opacity:u,thickness:h,paths:{lines:i,points:a},pageIndex:this.pageIndex,rect:r,rotation:this.rotation,structTreeParentId:this._structTreeParentId};return this.addComment(p),t?(p.isCopy=!0,p):this.annotationElementId&&!this.#t(p)?null:(p.id=this.annotationElementId,p)}#t(t){const{color:i,thickness:a,opacity:r,pageIndex:c}=this._initialData;return this.hasEditedComment||this._hasBeenMoved||this._hasBeenResized||t.color.some((u,h)=>u!==i[h])||t.thickness!==a||t.opacity!==r||t.pageIndex!==c}renderAnnotationElement(t){const{points:i,rect:a}=this.serializeDraw(!1),r={rect:a,thickness:this._drawingOptions["stroke-width"],points:i};return this.hasEditedComment&&(r.popup=this.comment),t.updateEdited(r),null}}class lp extends cl{toSVGPath(){let t=super.toSVGPath();return t.endsWith("Z")||(t+="Z"),t}}const ku=8,ul=3;class Mr{static#t={maxDim:512,sigmaSFactor:.02,sigmaR:25,kernelSize:16};static#e(t,i,a,r){return a-=t,r-=i,a===0?r>0?0:4:a===1?r+6:2-r}static#n=new Int32Array([0,1,-1,1,-1,0,-1,-1,0,-1,1,-1,1,0,1,1]);static#i(t,i,a,r,c,u,h){const p=this.#e(a,r,c,u);for(let m=0;m<8;m++){const g=(-m+p-h+16)%8,y=this.#n[2*g],b=this.#n[2*g+1];if(t[(a+y)*i+(r+b)]!==0)return g}return-1}static#a(t,i,a,r,c,u,h){const p=this.#e(a,r,c,u);for(let m=0;m<8;m++){const g=(m+p+h+16)%8,y=this.#n[2*g],b=this.#n[2*g+1];if(t[(a+y)*i+(r+b)]!==0)return g}return-1}static#s(t,i,a,r){const c=t.length,u=new Int32Array(c);for(let g=0;g<c;g++)u[g]=t[g]<=r?1:0;for(let g=1;g<a-1;g++)u[g*i]=u[g*i+i-1]=0;for(let g=0;g<i;g++)u[g]=u[i*a-1-g]=0;let h=1,p;const m=[];for(let g=1;g<a-1;g++){p=1;for(let y=1;y<i-1;y++){const b=g*i+y,S=u[b];if(S===0)continue;let A=g,_=y;if(S===1&&u[b-1]===0)h+=1,_-=1;else if(S>=1&&u[b+1]===0)h+=1,_+=1,S>1&&(p=S);else{S!==1&&(p=Math.abs(S));continue}const R=[y,g],x=_===y+1,L={isHole:x,points:R,id:h,parent:0};m.push(L);let k;for(const K of m)if(K.id===p){k=K;break}k?k.isHole?L.parent=x?k.parent:p:L.parent=x?p:k.parent:L.parent=x?p:0;const U=this.#i(u,i,g,y,A,_,0);if(U===-1){u[b]=-h,u[b]!==1&&(p=Math.abs(u[b]));continue}let I=this.#n[2*U],j=this.#n[2*U+1];const F=g+I,J=y+j;A=F,_=J;let Y=g,at=y;for(;;){const K=this.#a(u,i,Y,at,A,_,1);I=this.#n[2*K],j=this.#n[2*K+1];const lt=Y+I,Et=at+j;R.push(Et,lt);const bt=Y*i+at;if(u[bt+1]===0?u[bt]=-h:u[bt]===1&&(u[bt]=h),lt===g&&Et===y&&Y===F&&at===J){u[b]!==1&&(p=Math.abs(u[b]));break}else A=Y,_=at,Y=lt,at=Et}}}return m}static#r(t,i,a,r){if(a-i<=4){for(let F=i;F<a-2;F+=2)r.push(t[F],t[F+1]);return}const c=t[i],u=t[i+1],h=t[a-4]-c,p=t[a-3]-u,m=Math.hypot(h,p),g=h/m,y=p/m,b=g*u-y*c,S=p/h,A=1/m,_=Math.atan(S),R=Math.cos(_),x=Math.sin(_),L=A*(Math.abs(R)+Math.abs(x)),k=A*(1-L+L**2),U=Math.max(Math.atan(Math.abs(x+R)*k),Math.atan(Math.abs(x-R)*k));let I=0,j=i;for(let F=i+2;F<a-2;F+=2){const J=Math.abs(b-g*t[F+1]+y*t[F]);J>I&&(j=F,I=J)}I>(m*U)**2?(this.#r(t,i,j+2,r),this.#r(t,j,a,r)):r.push(c,u)}static#o(t){const i=[],a=t.length;return this.#r(t,0,a,i),i.push(t[a-2],t[a-1]),i.length<=4?null:i}static#u(t,i,a,r,c,u){const h=new Float32Array(u**2),p=-2*r**2,m=u>>1;for(let _=0;_<u;_++){const R=(_-m)**2;for(let x=0;x<u;x++)h[_*u+x]=Math.exp((R+(x-m)**2)/p)}const g=new Float32Array(256),y=-2*c**2;for(let _=0;_<256;_++)g[_]=Math.exp(_**2/y);const b=t.length,S=new Uint8Array(b),A=new Uint32Array(256);for(let _=0;_<a;_++)for(let R=0;R<i;R++){const x=_*i+R,L=t[x];let k=0,U=0;for(let j=0;j<u;j++){const F=_+j-m;if(!(F<0||F>=a))for(let J=0;J<u;J++){const Y=R+J-m;if(Y<0||Y>=i)continue;const at=t[F*i+Y],K=h[j*u+J]*g[Math.abs(at-L)];k+=at*K,U+=K}}const I=S[x]=Math.round(k/U);A[I]++}return[S,A]}static#c(t){const i=new Uint32Array(256);for(const a of t)i[a]++;return i}static#h(t){const i=t.length,a=new Uint8ClampedArray(i>>2);let r=-1/0,c=1/0;for(let h=0,p=a.length;h<p;h++){const m=a[h]=t[h<<2];r=Math.max(r,m),c=Math.min(c,m)}const u=255/(r-c);for(let h=0,p=a.length;h<p;h++)a[h]=(a[h]-c)*u;return a}static#l(t){let i,a=-1/0,r=-1/0;const c=t.findIndex(p=>p!==0);let u=c,h=c;for(i=c;i<256;i++){const p=t[i];p>a&&(i-u>r&&(r=i-u,h=i-1),a=p,u=i)}for(i=h-1;i>=0&&!(t[i]>t[i+1]);i--);return i}static#p(t){const i=t,{width:a,height:r}=t,{maxDim:c}=this.#t;let u=a,h=r;if(a>c||r>c){let b=a,S=r,A=Math.log2(Math.max(a,r)/c);const _=Math.floor(A);A=A===_?_-1:_;for(let x=0;x<A;x++){u=Math.ceil(b/2),h=Math.ceil(S/2);const L=new OffscreenCanvas(u,h);L.getContext("2d").drawImage(t,0,0,b,S,0,0,u,h),b=u,S=h,t!==i&&t.close(),t=L.transferToImageBitmap()}const R=Math.min(c/u,c/h);u=Math.round(u*R),h=Math.round(h*R)}const m=new OffscreenCanvas(u,h).getContext("2d",{willReadFrequently:!0});m.fillStyle="white",m.fillRect(0,0,u,h),m.filter="grayscale(1)",m.drawImage(t,0,0,t.width,t.height,0,0,u,h);const g=m.getImageData(0,0,u,h).data;return[this.#h(g),u,h]}static extractContoursFromText(t,{fontFamily:i,fontStyle:a,fontWeight:r},c,u,h,p){let m=new OffscreenCanvas(1,1),g=m.getContext("2d",{alpha:!1});const y=200,b=g.font=`${a} ${r} ${y}px ${i}`,{actualBoundingBoxLeft:S,actualBoundingBoxRight:A,actualBoundingBoxAscent:_,actualBoundingBoxDescent:R,fontBoundingBoxAscent:x,fontBoundingBoxDescent:L,width:k}=g.measureText(t),U=1.5,I=Math.ceil(Math.max(Math.abs(S)+Math.abs(A)||0,k)*U),j=Math.ceil(Math.max(Math.abs(_)+Math.abs(R)||y,Math.abs(x)+Math.abs(L)||y)*U);m=new OffscreenCanvas(I,j),g=m.getContext("2d",{alpha:!0,willReadFrequently:!0}),g.font=b,g.filter="grayscale(1)",g.fillStyle="white",g.fillRect(0,0,I,j),g.fillStyle="black",g.fillText(t,I*(U-1)/2,j*(3-U)/2);const F=this.#h(g.getImageData(0,0,I,j).data),J=this.#c(F),Y=this.#l(J),at=this.#s(F,I,j,Y);return this.processDrawnLines({lines:{curves:at,width:I,height:j},pageWidth:c,pageHeight:u,rotation:h,innerMargin:p,mustSmooth:!0,areContours:!0})}static process(t,i,a,r,c){const[u,h,p]=this.#p(t),[m,g]=this.#u(u,h,p,Math.hypot(h,p)*this.#t.sigmaSFactor,this.#t.sigmaR,this.#t.kernelSize),y=this.#l(g),b=this.#s(m,h,p,y);return this.processDrawnLines({lines:{curves:b,width:h,height:p},pageWidth:i,pageHeight:a,rotation:r,innerMargin:c,mustSmooth:!0,areContours:!0})}static processDrawnLines({lines:t,pageWidth:i,pageHeight:a,rotation:r,innerMargin:c,mustSmooth:u,areContours:h}){r%180!==0&&([i,a]=[a,i]);const{curves:p,width:m,height:g}=t,y=t.thickness??0,b=[],S=Math.min(i/m,a/g),A=S/i,_=S/a,R=[];for(const{points:L}of p){const k=u?this.#o(L):L;if(!k)continue;R.push(k);const U=k.length,I=new Float32Array(U),j=new Float32Array(3*(U===2?2:U-2));if(b.push({line:j,points:I}),U===2){I[0]=k[0]*A,I[1]=k[1]*_,j.set([NaN,NaN,NaN,NaN,I[0],I[1]],0);continue}let[F,J,Y,at]=k;F*=A,J*=_,Y*=A,at*=_,I.set([F,J,Y,at],0),j.set([NaN,NaN,NaN,NaN,F,J],0);for(let K=4;K<U;K+=2){const lt=I[K]=k[K]*A,Et=I[K+1]=k[K+1]*_;j.set(ot.createBezierPoints(F,J,Y,at,lt,Et),(K-2)*3),[F,J,Y,at]=[Y,at,lt,Et]}}if(b.length===0)return null;const x=h?new lp:new cl;return x.build(b,i,a,1,r,h?0:y,c),{outline:x,newCurves:R,areContours:h,thickness:y,width:m,height:g}}static async compressSignature({outlines:t,areContours:i,thickness:a,width:r,height:c}){let u=1/0,h=-1/0,p=0;for(const k of t){p+=k.length;for(let U=2,I=k.length;U<I;U++){const j=k[U]-k[U-2];u=Math.min(u,j),h=Math.max(h,j)}}let m;u>=-128&&h<=127?m=Int8Array:u>=-32768&&h<=32767?m=Int16Array:m=Int32Array;const g=t.length,y=ku+ul*g,b=new Uint32Array(y);let S=0;b[S++]=y*Uint32Array.BYTES_PER_ELEMENT+(p-2*g)*m.BYTES_PER_ELEMENT,b[S++]=0,b[S++]=r,b[S++]=c,b[S++]=i?0:1,b[S++]=Math.max(0,Math.floor(a??0)),b[S++]=g,b[S++]=m.BYTES_PER_ELEMENT;for(const k of t)b[S++]=k.length-2,b[S++]=k[0],b[S++]=k[1];const A=new CompressionStream("deflate-raw"),_=A.writable.getWriter();await _.ready,_.write(b);const R=m.prototype.constructor;for(const k of t){const U=new R(k.length-2);for(let I=2,j=k.length;I<j;I++)U[I-2]=k[I]-k[I-2];_.write(U)}_.close();const x=await new Response(A.readable).arrayBuffer(),L=new Uint8Array(x);return Wv(L)}static async decompressSignature(t){try{const i=vM(t),{readable:a,writable:r}=new DecompressionStream("deflate-raw"),c=r.getWriter();await c.ready,c.write(i).then(async()=>{await c.ready,await c.close()}).catch(()=>{});let u=null,h=0;for await(const k of a)u||=new Uint8Array(new Uint32Array(k.buffer,0,4)[0]),u.set(k,h),h+=k.length;const p=new Uint32Array(u.buffer,0,u.length>>2),m=p[1];if(m!==0)throw new Error(`Invalid version: ${m}`);const g=p[2],y=p[3],b=p[4]===0,S=p[5],A=p[6],_=p[7],R=[],x=(ku+ul*A)*Uint32Array.BYTES_PER_ELEMENT;let L;switch(_){case Int8Array.BYTES_PER_ELEMENT:L=new Int8Array(u.buffer,x);break;case Int16Array.BYTES_PER_ELEMENT:L=new Int16Array(u.buffer,x);break;case Int32Array.BYTES_PER_ELEMENT:L=new Int32Array(u.buffer,x);break}h=0;for(let k=0;k<A;k++){const U=p[ul*k+ku],I=new Float32Array(U+2);R.push(I);for(let j=0;j<ul-1;j++)I[j]=p[ul*k+ku+j+1];for(let j=0;j<U;j++)I[j+2]=I[j]+L[h++]}return{areContours:b,thickness:S,outlines:R,width:g,height:y}}catch(i){return xt(`decompressSignature: ${i}`),null}}}class cp extends H0{constructor(){super(),super.updateProperties({fill:yt._defaultLineColor,"stroke-width":0})}clone(){const t=new cp;return t.updateAll(this),t}}class up extends Ou{constructor(t){super(t),super.updateProperties({stroke:yt._defaultLineColor,"stroke-width":1})}clone(){const t=new up(this._viewParameters);return t.updateAll(this),t}}class Oi extends St{#t=!1;#e=null;#n=null;#i=null;static _type="signature";static _editorType=wt.SIGNATURE;static _defaultDrawingOptions=null;constructor(t){super({...t,mustBeCommitted:!0,name:"signatureEditor"}),this._willKeepAspectRatio=!0,this.#n=t.signatureData||null,this.#e=null,this.defaultL10nId="pdfjs-editor-signature-editor1"}static initialize(t,i){yt.initialize(t,i),this._defaultDrawingOptions=new cp,this._defaultDrawnSignatureOptions=new up(i.viewParameters)}static getDefaultDrawingOptions(t){const i=this._defaultDrawingOptions.clone();return i.updateProperties(t),i}static get supportMultipleDrawings(){return!1}static get typesMap(){return zt(this,"typesMap",new Map)}static get isDrawer(){return!1}get telemetryFinalData(){return{type:"signature",hasDescription:!!this.#e}}static computeTelemetryFinalData(t){const i=t.get("hasDescription");return{hasAltText:i.get(!0)??0,hasNoAltText:i.get(!1)??0}}get isResizable(){return!0}onScaleChanging(){this._drawId!==null&&super.onScaleChanging()}render(){if(this.div)return this.div;let t,i;const{_isCopy:a}=this;if(a&&(this._isCopy=!1,t=this.x,i=this.y),super.render(),this._drawId===null)if(this.#n){const{lines:r,mustSmooth:c,areContours:u,description:h,uuid:p,heightInPage:m}=this.#n,{rawDims:{pageWidth:g,pageHeight:y},rotation:b}=this.parent.viewport,S=Mr.processDrawnLines({lines:r,pageWidth:g,pageHeight:y,rotation:b,innerMargin:Oi._INNER_MARGIN,mustSmooth:c,areContours:u});this.addSignature(S,m,h,p)}else this.div.setAttribute("data-l10n-args",JSON.stringify({description:""})),this.div.hidden=!0,this._uiManager.getSignature(this);else this.div.setAttribute("data-l10n-args",JSON.stringify({description:this.#e||""}));return a&&(this._isCopy=!0,this._moveAfterPaste(t,i)),this.div}setUuid(t){this.#i=t,this.addEditToolbar()}getUuid(){return this.#i}get description(){return this.#e}set description(t){this.#e=t,this.div&&(this.div.setAttribute("data-l10n-args",JSON.stringify({description:t})),super.addEditToolbar().then(i=>{i?.updateEditSignatureButton(t)}))}getSignaturePreview(){const{newCurves:t,areContours:i,thickness:a,width:r,height:c}=this.#n,u=Math.max(r,c),h=Mr.processDrawnLines({lines:{curves:t.map(p=>({points:p})),thickness:a,width:r,height:c},pageWidth:u,pageHeight:u,rotation:0,innerMargin:0,mustSmooth:!1,areContours:i});return{areContours:i,outline:h.outline}}get toolbarButtons(){return this._uiManager.signatureManager?[["editSignature",this._uiManager.signatureManager]]:super.toolbarButtons}addSignature(t,i,a,r){const{x:c,y:u}=this,{outline:h}=this.#n=t;this.#t=h instanceof lp,this.description=a;let p;this.#t?p=Oi.getDefaultDrawingOptions():(p=Oi._defaultDrawnSignatureOptions.clone(),p.updateProperties({"stroke-width":h.thickness})),this._addOutlines({drawOutlines:h,drawingOptions:p});const[m,g]=this.parentDimensions,[,y]=this.pageDimensions;let b=i/y;b=b>=1?.5:b,this.width*=b/this.height,this.width>=1&&(b*=.9/this.width,this.width=.9),this.height=b,this.setDims(m*this.width,g*this.height),this.x=c,this.y=u,this.center(),this._onResized(),this.onScaleChanging(),this.rotate(),this._uiManager.addToAnnotationStorage(this),this.setUuid(r),this._reportTelemetry({action:"pdfjs.signature.inserted",data:{hasBeenSaved:!!r,hasDescription:!!a}}),this.div.hidden=!1}getFromImage(t){const{rawDims:{pageWidth:i,pageHeight:a},rotation:r}=this.parent.viewport;return Mr.process(t,i,a,r,Oi._INNER_MARGIN)}getFromText(t,i){const{rawDims:{pageWidth:a,pageHeight:r},rotation:c}=this.parent.viewport;return Mr.extractContoursFromText(t,i,a,r,c,Oi._INNER_MARGIN)}getDrawnSignature(t){const{rawDims:{pageWidth:i,pageHeight:a},rotation:r}=this.parent.viewport;return Mr.processDrawnLines({lines:t,pageWidth:i,pageHeight:a,rotation:r,innerMargin:Oi._INNER_MARGIN,mustSmooth:!1,areContours:!1})}createDrawingOptions({areContours:t,thickness:i}){t?this._drawingOptions=Oi.getDefaultDrawingOptions():(this._drawingOptions=Oi._defaultDrawnSignatureOptions.clone(),this._drawingOptions.updateProperties({"stroke-width":i}))}serialize(t=!1){if(this.isEmpty())return null;const{lines:i,points:a,rect:r}=this.serializeDraw(t),{_drawingOptions:{"stroke-width":c}}=this,u={annotationType:wt.SIGNATURE,isSignature:!0,areContours:this.#t,color:[0,0,0],thickness:this.#t?0:c,pageIndex:this.pageIndex,rect:r,rotation:this.rotation,structTreeParentId:this._structTreeParentId};return this.addComment(u),t?(u.paths={lines:i,points:a},u.uuid=this.#i,u.isCopy=!0):u.lines=i,this.#e&&(u.accessibilityData={type:"Figure",alt:this.#e}),u}static deserializeDraw(t,i,a,r,c,u){return u.areContours?lp.deserialize(t,i,a,r,c,u):cl.deserialize(t,i,a,r,c,u)}static async deserialize(t,i,a){const r=await super.deserialize(t,i,a);return r.#t=t.areContours,r.description=t.accessibilityData?.alt||"",r.#i=t.uuid,r}}class KO extends yt{#t=null;#e=null;#n=null;#i=null;#a=null;#s="";#r=null;#o=!1;#u=null;#c=!1;#h=!1;static _type="stamp";static _editorType=wt.STAMP;constructor(t){super({...t,name:"stampEditor"}),this.#i=t.bitmapUrl,this.#a=t.bitmapFile,this.defaultL10nId="pdfjs-editor-stamp-editor"}static initialize(t,i){yt.initialize(t,i)}static isHandlingMimeForPasting(t){return Bf.includes(t)}static paste(t,i){i.pasteEditor({mode:wt.STAMP},{bitmapFile:t.getAsFile()})}altTextFinish(){this._uiManager.useNewAltTextFlow&&(this.div.hidden=!1),super.altTextFinish()}get telemetryFinalData(){return{type:"stamp",hasAltText:!!this.altTextData?.altText}}static computeTelemetryFinalData(t){const i=t.get("hasAltText");return{hasAltText:i.get(!0)??0,hasNoAltText:i.get(!1)??0}}#l(t,i=!1){if(!t){this.remove();return}this.#t=t.bitmap,i||(this.#e=t.id,this.#c=t.isSvg),t.file&&(this.#s=t.file.name),this.#f()}#p(){if(this.#n=null,this._uiManager.enableWaiting(!1),!!this.#r){if(this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&this.#t){this.addEditToolbar().then(()=>{this._editToolbar.hide(),this._uiManager.editAltText(this,!0)});return}if(!this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&this.#t){this._reportTelemetry({action:"pdfjs.image.image_added",data:{alt_text_modal:!1,alt_text_type:"empty"}});try{this.mlGuessAltText()}catch{}}this.div.focus()}}async mlGuessAltText(t=null,i=!0){if(this.hasAltTextData())return null;const{mlManager:a}=this._uiManager;if(!a)throw new Error("No ML.");if(!await a.isEnabledFor("altText"))throw new Error("ML isn't enabled for alt text.");const{data:r,width:c,height:u}=t||this.copyCanvas(null,null,!0).imageData,h=await a.guess({name:"altText",request:{data:r,width:c,height:u,channels:r.length/(c*u)}});if(!h)throw new Error("No response from the AI service.");if(h.error)throw new Error("Error from the AI service.");if(h.cancel)return null;if(!h.output)throw new Error("No valid response from the AI service.");const p=h.output;return await this.setGuessedAltText(p),i&&!this.hasAltTextData()&&(this.altTextData={alt:p,decorative:!1}),p}#g(){if(this.#e){this._uiManager.enableWaiting(!0),this._uiManager.imageManager.getFromId(this.#e).then(a=>this.#l(a,!0)).finally(()=>this.#p());return}if(this.#i){const a=this.#i;this.#i=null,this._uiManager.enableWaiting(!0),this.#n=this._uiManager.imageManager.getFromUrl(a).then(r=>this.#l(r)).finally(()=>this.#p());return}if(this.#a){const a=this.#a;this.#a=null,this._uiManager.enableWaiting(!0),this.#n=this._uiManager.imageManager.getFromFile(a).then(r=>this.#l(r)).finally(()=>this.#p());return}const t=document.createElement("input");t.type="file",t.accept=Bf.join(",");const i=this._uiManager._signal;this.#n=new Promise(a=>{t.addEventListener("change",async()=>{if(!t.files||t.files.length===0)this.remove();else{this._uiManager.enableWaiting(!0);const r=await this._uiManager.imageManager.getFromFile(t.files[0]);this._reportTelemetry({action:"pdfjs.image.image_selected",data:{alt_text_modal:this._uiManager.useNewAltTextFlow}}),this.#l(r)}a()},{signal:i}),t.addEventListener("cancel",()=>{this.remove(),a()},{signal:i})}).finally(()=>this.#p()),t.click()}remove(){this.#e&&(this.#t=null,this._uiManager.imageManager.deleteId(this.#e),this.#r?.remove(),this.#r=null,this.#u&&(clearTimeout(this.#u),this.#u=null)),super.remove()}rebuild(){if(!this.parent){this.#e&&this.#g();return}super.rebuild(),this.div!==null&&(this.#e&&this.#r===null&&this.#g(),this.isAttachedToDOM||this.parent.add(this))}onceAdded(t){this._isDraggable=!0,t&&this.div.focus()}isEmpty(){return!(this.#n||this.#t||this.#i||this.#a||this.#e||this.#o)}get toolbarButtons(){return[["altText",this.createAltText()]]}get isResizable(){return!0}render(){if(this.div)return this.div;let t,i;return this._isCopy&&(t=this.x,i=this.y),super.render(),this.div.hidden=!0,this.createAltText(),this.#o||(this.#t?this.#f():this.#g()),this._isCopy&&this._moveAfterPaste(t,i),this._uiManager.addShouldRescale(this),this.div}setCanvas(t,i){const{id:a,bitmap:r}=this._uiManager.imageManager.getFromCanvas(t,i);i.remove(),a&&this._uiManager.imageManager.isValidId(a)&&(this.#e=a,r&&(this.#t=r),this.#o=!1,this.#f())}_onResized(){this.onScaleChanging()}onScaleChanging(){if(!this.parent)return;this.#u!==null&&clearTimeout(this.#u);const t=200;this.#u=setTimeout(()=>{this.#u=null,this.#m()},t)}#f(){const{div:t}=this;let{width:i,height:a}=this.#t;const[r,c]=this.pageDimensions,u=.75;if(this.width)i=this.width*r,a=this.height*c;else if(i>u*r||a>u*c){const g=Math.min(u*r/i,u*c/a);i*=g,a*=g}const[h,p]=this.parentDimensions;this.setDims(i*h/r,a*p/c),this._uiManager.enableWaiting(!1);const m=this.#r=document.createElement("canvas");m.setAttribute("role","img"),this.addContainer(m),this.width=i/r,this.height=a/c,this._initialOptions?.isCentered?this.center():this.fixAndSetPosition(),this._initialOptions=null,(!this._uiManager.useNewAltTextWhenAddingImage||!this._uiManager.useNewAltTextFlow||this.annotationElementId)&&(t.hidden=!1),this.#m(),this.#h||(this.parent.addUndoableEditor(this),this.#h=!0),this._reportTelemetry({action:"inserted_image"}),this.#s&&this.div.setAttribute("aria-description",this.#s),this.annotationElementId||this._uiManager.a11yAlert("pdfjs-editor-stamp-added-alert")}copyCanvas(t,i,a=!1){t||(t=224);const{width:r,height:c}=this.#t,u=new Ri;let h=this.#t,p=r,m=c,g=null;if(i){if(r>i||c>i){const j=Math.min(i/r,i/c);p=Math.floor(r*j),m=Math.floor(c*j)}g=document.createElement("canvas");const b=g.width=Math.ceil(p*u.sx),S=g.height=Math.ceil(m*u.sy);this.#c||(h=this.#d(b,S));const A=g.getContext("2d");A.filter=this._uiManager.hcmFilter;let _="white",R="#cfcfd8";this._uiManager.hcmFilter!=="none"?R="black":window.matchMedia?.("(prefers-color-scheme: dark)").matches&&(_="#8f8f9d",R="#42414d");const x=15,L=x*u.sx,k=x*u.sy,U=new OffscreenCanvas(L*2,k*2),I=U.getContext("2d");I.fillStyle=_,I.fillRect(0,0,L*2,k*2),I.fillStyle=R,I.fillRect(0,0,L,k),I.fillRect(L,k,L,k),A.fillStyle=A.createPattern(U,"repeat"),A.fillRect(0,0,b,S),A.drawImage(h,0,0,h.width,h.height,0,0,b,S)}let y=null;if(a){let b,S;if(u.symmetric&&h.width<t&&h.height<t)b=h.width,S=h.height;else if(h=this.#t,r>t||c>t){const R=Math.min(t/r,t/c);b=Math.floor(r*R),S=Math.floor(c*R),this.#c||(h=this.#d(b,S))}const _=new OffscreenCanvas(b,S).getContext("2d",{willReadFrequently:!0});_.drawImage(h,0,0,h.width,h.height,0,0,b,S),y={width:b,height:S,data:_.getImageData(0,0,b,S).data}}return{canvas:g,width:p,height:m,imageData:y}}#d(t,i){const{width:a,height:r}=this.#t;let c=a,u=r,h=this.#t;for(;c>2*t||u>2*i;){const p=c,m=u;c>2*t&&(c=c>=16384?Math.floor(c/2)-1:Math.ceil(c/2)),u>2*i&&(u=u>=16384?Math.floor(u/2)-1:Math.ceil(u/2));const g=new OffscreenCanvas(c,u);g.getContext("2d").drawImage(h,0,0,p,m,0,0,c,u),h=g.transferToImageBitmap()}return h}#m(){const[t,i]=this.parentDimensions,{width:a,height:r}=this,c=new Ri,u=Math.ceil(a*t*c.sx),h=Math.ceil(r*i*c.sy),p=this.#r;if(!p||p.width===u&&p.height===h)return;p.width=u,p.height=h;const m=this.#c?this.#t:this.#d(u,h),g=p.getContext("2d");g.filter=this._uiManager.hcmFilter,g.drawImage(m,0,0,m.width,m.height,0,0,u,h)}#v(t){if(t){if(this.#c){const r=this._uiManager.imageManager.getSvgUrl(this.#e);if(r)return r}const i=document.createElement("canvas");return{width:i.width,height:i.height}=this.#t,i.getContext("2d").drawImage(this.#t,0,0),i.toDataURL()}if(this.#c){const[i,a]=this.pageDimensions,r=Math.round(this.width*i*Tr.PDF_TO_CSS_UNITS),c=Math.round(this.height*a*Tr.PDF_TO_CSS_UNITS),u=new OffscreenCanvas(r,c);return u.getContext("2d").drawImage(this.#t,0,0,this.#t.width,this.#t.height,0,0,r,c),u.transferToImageBitmap()}return structuredClone(this.#t)}static async deserialize(t,i,a){let r=null,c=!1;if(t instanceof U0){const{data:{rect:_,rotation:R,id:x,structParent:L,popupRef:k,contentsObj:U},container:I,parent:{page:{pageNumber:j}},canvas:F}=t;let J,Y;F?(delete t.canvas,{id:J,bitmap:Y}=a.imageManager.getFromCanvas(I.id,F),F.remove()):(c=!0,t._hasNoCanvas=!0);const at=(await i._structTree.getAriaAttributes(`${Pf}${x}`))?.get("aria-label")||"";r=t={annotationType:wt.STAMP,bitmapId:J,bitmap:Y,pageIndex:j-1,rect:_.slice(0),rotation:R,annotationElementId:x,id:x,deleted:!1,accessibilityData:{decorative:!1,altText:at},isSvg:!1,structParent:L,popupRef:k,comment:U?.str||null}}const u=await super.deserialize(t,i,a),{rect:h,bitmap:p,bitmapUrl:m,bitmapId:g,isSvg:y,accessibilityData:b}=t;c?(a.addMissingCanvas(t.id,u),u.#o=!0):g&&a.imageManager.isValidId(g)?(u.#e=g,p&&(u.#t=p)):u.#i=m,u.#c=y;const[S,A]=u.pageDimensions;return u.width=(h[2]-h[0])/S,u.height=(h[3]-h[1])/A,b&&(u.altTextData=b),u._initialData=r,t.comment&&u.setCommentData(t.comment),u.#h=!!r,u}serialize(t=!1,i=null){if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();const a={annotationType:wt.STAMP,bitmapId:this.#e,pageIndex:this.pageIndex,rect:this.getRect(0,0),rotation:this.rotation,isSvg:this.#c,structTreeParentId:this._structTreeParentId};if(this.addComment(a),t)return a.bitmapUrl=this.#v(!0),a.accessibilityData=this.serializeAltText(!0),a.isCopy=!0,a;const{decorative:r,altText:c}=this.serializeAltText(!1);if(!r&&c&&(a.accessibilityData={type:"Figure",alt:c}),this.annotationElementId){const h=this.#y(a);if(h.isSame)return null;h.isSameAltText?delete a.accessibilityData:a.accessibilityData.structParent=this._initialData.structParent??-1}if(a.id=this.annotationElementId,i===null)return a;i.stamps||=new Map;const u=this.#c?(a.rect[2]-a.rect[0])*(a.rect[3]-a.rect[1]):null;if(!i.stamps.has(this.#e))i.stamps.set(this.#e,{area:u,serialized:a}),a.bitmap=this.#v(!1);else if(this.#c){const h=i.stamps.get(this.#e);u>h.area&&(h.area=u,h.serialized.bitmap.close(),h.serialized.bitmap=this.#v(!1))}return a}#y(t){const{pageIndex:i,accessibilityData:{altText:a}}=this._initialData,r=t.pageIndex===i,c=(t.accessibilityData?.alt||"")===a;return{isSame:!this.hasEditedComment&&!this._hasBeenMoved&&!this._hasBeenResized&&r&&c,isSameAltText:c}}renderAnnotationElement(t){const i={rect:this.getRect(0,0)};return this.hasEditedComment&&(i.popup=this.comment),t.updateEdited(i),null}}class es{#t;#e=!1;#n=null;#i=null;#a=null;#s=new Map;#r=!1;#o=!1;#u=!1;#c=null;#h=null;#l=null;#p=null;#g=null;#f=-1;#d;static _initialized=!1;static#m=new Map([Ue,op,KO,Te,Oi].map(t=>[t._editorType,t]));constructor({uiManager:t,pageIndex:i,div:a,structTreeLayer:r,accessibilityManager:c,annotationLayer:u,drawLayer:h,textLayer:p,viewport:m,l10n:g}){const y=[...es.#m.values()];if(!es._initialized){es._initialized=!0;for(const b of y)b.initialize(g,t)}t.registerEditorTypes(y),this.#d=t,this.pageIndex=i,this.div=a,this.#t=c,this.#n=u,this.viewport=m,this.#l=p,this.drawLayer=h,this._structTree=r,this.#d.addLayer(this)}get isEmpty(){return this.#s.size===0}get isInvisible(){return this.isEmpty&&this.#d.getMode()===wt.NONE}updateToolbar(t){this.#d.updateToolbar(t)}updateMode(t=this.#d.getMode()){switch(this.#b(),t){case wt.NONE:this.disableTextSelection(),this.togglePointerEvents(!1),this.toggleAnnotationLayerPointerEvents(!0),this.disableClick();return;case wt.INK:this.disableTextSelection(),this.togglePointerEvents(!0),this.enableClick();break;case wt.HIGHLIGHT:this.enableTextSelection(),this.togglePointerEvents(!1),this.disableClick();break;default:this.disableTextSelection(),this.togglePointerEvents(!0),this.enableClick()}this.toggleAnnotationLayerPointerEvents(!1);const{classList:i}=this.div;for(const a of es.#m.values())i.toggle(`${a._type}Editing`,t===a._editorType);this.div.hidden=!1}hasTextLayer(t){return t===this.#l?.div}setEditingState(t){this.#d.setEditingState(t)}addCommands(t){this.#d.addCommands(t)}cleanUndoStack(t){this.#d.cleanUndoStack(t)}toggleDrawing(t=!1){this.div.classList.toggle("drawing",!t)}togglePointerEvents(t=!1){this.div.classList.toggle("disabled",!t)}toggleAnnotationLayerPointerEvents(t=!1){this.#n?.div.classList.toggle("disabled",!t)}async enable(){this.#u=!0,this.div.tabIndex=0,this.togglePointerEvents(!0),this.#g?.abort(),this.#g=null;const t=new Set;for(const a of this.#s.values())a.enableEditing(),a.show(!0),a.annotationElementId&&(this.#d.removeChangedExistingAnnotation(a),t.add(a.annotationElementId));if(!this.#n){this.#u=!1;return}const i=this.#n.getEditableAnnotations();for(const a of i){if(a.hide(),this.#d.isDeletedAnnotationElement(a.data.id)||t.has(a.data.id))continue;const r=await this.deserialize(a);r&&(this.addOrRebuild(r),r.enableEditing())}this.#u=!1}disable(){if(this.#o=!0,this.div.tabIndex=-1,this.togglePointerEvents(!1),this.#l&&!this.#g){this.#g=new AbortController;const r=this.#d.combinedSignal(this.#g);this.#l.div.addEventListener("pointerdown",c=>{const{clientX:h,clientY:p,timeStamp:m}=c,g=this.#f;if(m-g>500){this.#f=m;return}this.#f=-1;const{classList:y}=this.div;y.toggle("getElements",!0);const b=document.elementsFromPoint(h,p);if(y.toggle("getElements",!1),!this.div.contains(b[0]))return;let S;const A=new RegExp(`^${jv}[0-9]+$`);for(const R of b)if(A.test(R.id)){S=R.id;break}if(!S)return;const _=this.#s.get(S);_?.annotationElementId===null&&(c.stopPropagation(),c.preventDefault(),_.dblclick())},{signal:r,capture:!0})}const t=new Map,i=new Map;for(const r of this.#s.values())if(r.disableEditing(),!!r.annotationElementId){if(r.serialize()!==null){t.set(r.annotationElementId,r);continue}else i.set(r.annotationElementId,r);this.getEditableAnnotation(r.annotationElementId)?.show(),r.remove()}if(this.#n){const r=this.#n.getEditableAnnotations();for(const c of r){const{id:u}=c.data;if(this.#d.isDeletedAnnotationElement(u)){c.updateEdited({deleted:!0});continue}let h=i.get(u);if(h){h.resetAnnotationElement(c),h.show(!1),c.show();continue}h=t.get(u),h&&(this.#d.addChangedExistingAnnotation(h),h.renderAnnotationElement(c)&&h.show(!1)),c.show()}}this.#b(),this.isEmpty&&(this.div.hidden=!0);const{classList:a}=this.div;for(const r of es.#m.values())a.remove(`${r._type}Editing`);this.disableTextSelection(),this.toggleAnnotationLayerPointerEvents(!0),this.#o=!1}getEditableAnnotation(t){return this.#n?.getEditableAnnotation(t)||null}setActiveEditor(t){this.#d.getActive()!==t&&this.#d.setActiveEditor(t)}enableTextSelection(){if(this.div.tabIndex=-1,this.#l?.div&&!this.#p){this.#p=new AbortController;const t=this.#d.combinedSignal(this.#p);this.#l.div.addEventListener("pointerdown",this.#v.bind(this),{signal:t}),this.#l.div.classList.add("highlighting")}}disableTextSelection(){this.div.tabIndex=0,this.#l?.div&&this.#p&&(this.#p.abort(),this.#p=null,this.#l.div.classList.remove("highlighting"))}#v(t){this.#d.unselectAll();const{target:i}=t;if(i===this.#l.div||(i.getAttribute("role")==="img"||i.classList.contains("endOfContent"))&&this.#l.div.contains(i)){const{isMac:a}=Ve.platform;if(t.button!==0||t.ctrlKey&&a)return;this.#d.showAllEditors("highlight",!0,!0),this.#l.div.classList.add("free"),this.toggleDrawing(),Te.startHighlighting(this,this.#d.direction==="ltr",{target:this.#l.div,x:t.x,y:t.y}),this.#l.div.addEventListener("pointerup",()=>{this.#l.div.classList.remove("free"),this.toggleDrawing(!0)},{once:!0,signal:this.#d._signal}),t.preventDefault()}}enableClick(){if(this.#i)return;this.#i=new AbortController;const t=this.#d.combinedSignal(this.#i);this.div.addEventListener("pointerdown",this.pointerdown.bind(this),{signal:t});const i=this.pointerup.bind(this);this.div.addEventListener("pointerup",i,{signal:t}),this.div.addEventListener("pointercancel",i,{signal:t})}disableClick(){this.#i?.abort(),this.#i=null}attach(t){this.#s.set(t.id,t);const{annotationElementId:i}=t;i&&this.#d.isDeletedAnnotationElement(i)&&this.#d.removeDeletedAnnotationElement(t)}detach(t){this.#s.delete(t.id),this.#t?.removePointerInTextLayer(t.contentDiv),!this.#o&&t.annotationElementId&&this.#d.addDeletedAnnotationElement(t)}remove(t){this.detach(t),this.#d.removeEditor(t),t.div.remove(),t.isAttachedToDOM=!1}changeParent(t){t.parent!==this&&(t.parent&&t.annotationElementId&&(this.#d.addDeletedAnnotationElement(t.annotationElementId),yt.deleteAnnotationElement(t),t.annotationElementId=null),this.attach(t),t.parent?.detach(t),t.setParent(this),t.div&&t.isAttachedToDOM&&(t.div.remove(),this.div.append(t.div)))}add(t){if(!(t.parent===this&&t.isAttachedToDOM)){if(this.changeParent(t),this.#d.addEditor(t),this.attach(t),!t.isAttachedToDOM){const i=t.render();this.div.append(i),t.isAttachedToDOM=!0}t.fixAndSetPosition(),t.onceAdded(!this.#u),this.#d.addToAnnotationStorage(t),t._reportTelemetry(t.telemetryInitialData)}}moveEditorInDOM(t){if(!t.isAttachedToDOM)return;const{activeElement:i}=document;t.div.contains(i)&&!this.#a&&(t._focusEventsAllowed=!1,this.#a=setTimeout(()=>{this.#a=null,t.div.contains(document.activeElement)?t._focusEventsAllowed=!0:(t.div.addEventListener("focusin",()=>{t._focusEventsAllowed=!0},{once:!0,signal:this.#d._signal}),i.focus())},0)),t._structTreeParentId=this.#t?.moveElementInDOM(this.div,t.div,t.contentDiv,!0)}addOrRebuild(t){t.needsToBeRebuilt()?(t.parent||=this,t.rebuild(),t.show()):this.add(t)}addUndoableEditor(t){const i=()=>t._uiManager.rebuild(t),a=()=>{t.remove()};this.addCommands({cmd:i,undo:a,mustExec:!1})}getNextId(){return this.#d.getId()}get#y(){return es.#m.get(this.#d.getMode())}combinedSignal(t){return this.#d.combinedSignal(t)}#E(t){const i=this.#y;return i?new i.prototype.constructor(t):null}canCreateNewEmptyEditor(){return this.#y?.canCreateNewEmptyEditor()}async pasteEditor(t,i){this.updateToolbar(t),await this.#d.updateMode(t.mode);const{offsetX:a,offsetY:r}=this.#A(),c=this.getNextId(),u=this.#E({parent:this,id:c,x:a,y:r,uiManager:this.#d,isCentered:!0,...i});u&&this.add(u)}async deserialize(t){return await es.#m.get(t.annotationType??t.annotationEditorType)?.deserialize(t,this,this.#d)||null}createAndAddNewEditor(t,i,a={}){const r=this.getNextId(),c=this.#E({parent:this,id:r,x:t.offsetX,y:t.offsetY,uiManager:this.#d,isCentered:i,...a});return c&&this.add(c),c}#A(){const{x:t,y:i,width:a,height:r}=this.div.getBoundingClientRect(),c=Math.max(0,t),u=Math.max(0,i),h=Math.min(window.innerWidth,t+a),p=Math.min(window.innerHeight,i+r),m=(c+h)/2-t,g=(u+p)/2-i,[y,b]=this.viewport.rotation%180===0?[m,g]:[g,m];return{offsetX:y,offsetY:b}}addNewEditor(t={}){this.createAndAddNewEditor(this.#A(),!0,t)}setSelected(t){this.#d.setSelected(t)}toggleSelected(t){this.#d.toggleSelected(t)}unselect(t){this.#d.unselect(t)}pointerup(t){const{isMac:i}=Ve.platform;if(t.button!==0||t.ctrlKey&&i||t.target!==this.div||!this.#r||(this.#r=!1,this.#y?.isDrawer&&this.#y.supportMultipleDrawings))return;if(!this.#e){this.#e=!0;return}const a=this.#d.getMode();if(a===wt.STAMP||a===wt.SIGNATURE){this.#d.unselectAll();return}this.createAndAddNewEditor(t,!1)}pointerdown(t){if(this.#d.getMode()===wt.HIGHLIGHT&&this.enableTextSelection(),this.#r){this.#r=!1;return}const{isMac:i}=Ve.platform;if(t.button!==0||t.ctrlKey&&i||t.target!==this.div)return;if(this.#r=!0,this.#y?.isDrawer){this.startDrawingSession(t);return}const a=this.#d.getActive();this.#e=!a||a.isEmpty()}startDrawingSession(t){if(this.div.focus({preventScroll:!0}),this.#c){this.#y.startDrawing(this,this.#d,!1,t);return}this.#d.setCurrentDrawingSession(this),this.#c=new AbortController;const i=this.#d.combinedSignal(this.#c);this.div.addEventListener("blur",({relatedTarget:a})=>{a&&!this.div.contains(a)&&(this.#h=null,this.commitOrRemove())},{signal:i}),this.#y.startDrawing(this,this.#d,!1,t)}pause(t){if(t){const{activeElement:i}=document;this.div.contains(i)&&(this.#h=i);return}this.#h&&setTimeout(()=>{this.#h?.focus(),this.#h=null},0)}endDrawingSession(t=!1){return this.#c?(this.#d.setCurrentDrawingSession(null),this.#c.abort(),this.#c=null,this.#h=null,this.#y.endDrawing(t)):null}findNewParent(t,i,a){const r=this.#d.findParent(i,a);return r===null||r===this?!1:(r.changeParent(t),!0)}commitOrRemove(){return this.#c?(this.endDrawingSession(),!0):!1}onScaleChanging(){this.#c&&this.#y.onScaleChangingWhenDrawing(this)}destroy(){this.commitOrRemove(),this.#d.getActive()?.parent===this&&(this.#d.commitOrRemove(),this.#d.setActiveEditor(null)),this.#a&&(clearTimeout(this.#a),this.#a=null);for(const t of this.#s.values())this.#t?.removePointerInTextLayer(t.contentDiv),t.setParent(null),t.isAttachedToDOM=!1,t.div.remove();this.div=null,this.#s.clear(),this.#d.removeLayer(this)}#b(){for(const t of this.#s.values())t.isEmpty()&&t.remove()}render({viewport:t}){this.viewport=t,_a(this.div,t);for(const i of this.#d.getEditors(this.pageIndex))this.add(i),i.rebuild();this.updateMode()}update({viewport:t}){this.#d.commitOrRemove(),this.#b();const i=this.viewport.rotation,a=t.rotation;if(this.viewport=t,_a(this.div,{rotation:a}),i!==a)for(const r of this.#s.values())r.rotate(a)}get pageDimensions(){const{pageWidth:t,pageHeight:i}=this.viewport.rawDims;return[t,i]}get scale(){return this.#d.viewParameters.realScale}}class Xe{#t=null;#e=new Map;#n=new Map;static#i=0;constructor({pageIndex:t}){this.pageIndex=t}setParent(t){if(!this.#t){this.#t=t;return}if(this.#t!==t){if(this.#e.size>0)for(const i of this.#e.values())i.remove(),t.append(i);this.#t=t}}static get _svgFactory(){return zt(this,"_svgFactory",new Du)}static#a(t,[i,a,r,c]){const{style:u}=t;u.top=`${100*a}%`,u.left=`${100*i}%`,u.width=`${100*r}%`,u.height=`${100*c}%`}#s(){const t=Xe._svgFactory.create(1,1,!0);return this.#t.append(t),t.setAttribute("aria-hidden",!0),t}#r(t,i){const a=Xe._svgFactory.createElement("clipPath");t.append(a);const r=`clip_${i}`;a.setAttribute("id",r),a.setAttribute("clipPathUnits","objectBoundingBox");const c=Xe._svgFactory.createElement("use");return a.append(c),c.setAttribute("href",`#${i}`),c.classList.add("clip"),r}#o(t,i){for(const[a,r]of Object.entries(i))r===null?t.removeAttribute(a):t.setAttribute(a,r)}draw(t,i=!1,a=!1){const r=Xe.#i++,c=this.#s(),u=Xe._svgFactory.createElement("defs");c.append(u);const h=Xe._svgFactory.createElement("path");u.append(h);const p=`path_p${this.pageIndex}_${r}`;h.setAttribute("id",p),h.setAttribute("vector-effect","non-scaling-stroke"),i&&this.#n.set(r,h);const m=a?this.#r(u,p):null,g=Xe._svgFactory.createElement("use");return c.append(g),g.setAttribute("href",`#${p}`),this.updateProperties(c,t),this.#e.set(r,c),{id:r,clipPathId:`url(#${m})`}}drawOutline(t,i){const a=Xe.#i++,r=this.#s(),c=Xe._svgFactory.createElement("defs");r.append(c);const u=Xe._svgFactory.createElement("path");c.append(u);const h=`path_p${this.pageIndex}_${a}`;u.setAttribute("id",h),u.setAttribute("vector-effect","non-scaling-stroke");let p;if(i){const y=Xe._svgFactory.createElement("mask");c.append(y),p=`mask_p${this.pageIndex}_${a}`,y.setAttribute("id",p),y.setAttribute("maskUnits","objectBoundingBox");const b=Xe._svgFactory.createElement("rect");y.append(b),b.setAttribute("width","1"),b.setAttribute("height","1"),b.setAttribute("fill","white");const S=Xe._svgFactory.createElement("use");y.append(S),S.setAttribute("href",`#${h}`),S.setAttribute("stroke","none"),S.setAttribute("fill","black"),S.setAttribute("fill-rule","nonzero"),S.classList.add("mask")}const m=Xe._svgFactory.createElement("use");r.append(m),m.setAttribute("href",`#${h}`),p&&m.setAttribute("mask",`url(#${p})`);const g=m.cloneNode();return r.append(g),m.classList.add("mainOutline"),g.classList.add("secondaryOutline"),this.updateProperties(r,t),this.#e.set(a,r),a}finalizeDraw(t,i){this.#n.delete(t),this.updateProperties(t,i)}updateProperties(t,i){if(!i)return;const{root:a,bbox:r,rootClass:c,path:u}=i,h=typeof t=="number"?this.#e.get(t):t;if(h){if(a&&this.#o(h,a),r&&Xe.#a(h,r),c){const{classList:p}=h;for(const[m,g]of Object.entries(c))p.toggle(m,g)}if(u){const m=h.firstChild.firstChild;this.#o(m,u)}}}updateParent(t,i){if(i===this)return;const a=this.#e.get(t);a&&(i.#t.append(a),this.#e.delete(t),i.#e.set(t,a))}remove(t){this.#n.delete(t),this.#t!==null&&(this.#e.get(t).remove(),this.#e.delete(t))}destroy(){this.#t=null;for(const t of this.#e.values())t.remove();this.#e.clear(),this.#n.clear()}}globalThis._pdfjsTestingUtils={HighlightOutliner:ap},globalThis.pdfjsLib={AbortException:Ps,AnnotationEditorLayer:es,AnnotationEditorParamsType:$t,AnnotationEditorType:wt,AnnotationEditorUIManager:Us,AnnotationLayer:sp,AnnotationMode:Is,AnnotationType:De,build:RO,ColorPicker:Wn,createValidAbsoluteUrl:$v,DOMSVGFactory:Du,DrawLayer:Xe,FeatureTest:Ve,fetchData:Qo,getDocument:C0,getFilenameFromUrl:SM,getPdfFilenameFromUrl:EM,getRGB:Eu,getUuid:Yv,getXfaPageViewport:_M,GlobalWorkerOptions:Cr,ImageKind:fu,InvalidPDFException:Nf,isDataScheme:Su,isPdfFile:zf,isValidExplicitDest:LM,MathClamp:dn,noContextMenu:Xn,normalizeUnicode:yM,OPS:mu,OutputScale:Ri,PasswordResponses:lM,PDFDataRangeTransport:R0,PDFDateString:Hf,PDFWorker:rl,PermissionFlag:oM,PixelsPerInch:Tr,RenderingCancelledException:Uf,ResponseException:vu,setLayerDimensions:_a,shadow:zt,SignatureExtractor:Mr,stopEvent:Oe,SupportedImageMimeTypes:Bf,TextLayer:hn,TouchManager:_u,updateUrlHash:Gv,Util:mt,VerbosityLevel:pu,version:CO,XfaLayer:O0},typeof Promise.withResolvers>"u"&&(Promise.withResolvers=function(){let l,t;return{promise:new Promise((a,r)=>{l=a,t=r}),resolve:l,reject:t}}),Cr.workerSrc="/pdf.worker.js";class ZO{extractProcessId(){try{const t=window.location.href;let i=t.match(/\/processo\/(\d+)\//);if(i&&i[1])return O.detail(`ID do processo extraído da URL: ${i[1]}`),i[1];if(i=t.match(/\/pjekz\/processo\/(\d+)\//),i&&i[1])return O.detail(`ID do processo extraído da URL (pjekz): ${i[1]}`),i[1];const a=new URLSearchParams(window.location.search),r=["idProcesso","processoId","id","processo"];for(const c of r){const u=a.get(c);if(u&&/^\d+$/.test(u))return O.detail(`ID do processo extraído do parâmetro ${c}: ${u}`),u}return O.warn("ID do processo não encontrado na URL"),null}catch(t){return O.error("Erro ao extrair ID do processo:",t),null}}extractDocumentId(){try{const i=window.location.href.match(/\/documento\/(\d+)\//);if(i&&i[1])return O.detail(`ID do documento extraído da URL: ${i[1]}`),i[1];const a=new URLSearchParams(window.location.search),r=["idDocumento","documentoId","docId"];for(const u of r){const h=a.get(u);if(h&&/^\d+$/.test(h))return O.detail(`ID do documento extraído do parâmetro ${u}: ${h}`),h}const c=document.querySelector("mat-card-title");if(c){const u=c.textContent.match(/Id\s+([a-zA-Z0-9]+)/);if(u&&/^\d+$/.test(u[1]))return O.detail(`ID do documento extraído do título: ${u[1]}`),u[1]}return O.warn("ID do documento não encontrado"),null}catch(t){return O.error("Erro ao extrair ID do documento:",t),null}}buildContentUrl(t,i,a="pdf"){if(!t||!i)return O.warn("IDs do processo ou documento não fornecidos para construir URL"),null;const r=window.location.origin;if(a==="txt"){const c=`${r}/pje-comum-api/api/processos/id/${t}/documentos/id/${i}/conteudo`;return O.detail(`URL do TXT construída: ${c}`),c}else if(a==="pdf"){O.detail(`Construindo URL para PDF: processoId=${t}, documentId=${i}`);const c=`${r}/pje-comum-api/api/processos/id/${t}/documentos/id/${i}/conteudo?incluirCapa=false&incluirAssinatura=true`;return O.detail(`URL do PDF construída: ${c}`),c}else return O.warn(`Tipo de conteúdo desconhecido: ${a}`),null}buildFullProcessUrl(t){if(!t)return O.warn("ID do processo não fornecido para construir URL completa"),null;const a=`${window.location.origin}/pje-comum-api/api/processos/id/${t}/documentos/agrupados?processoCompleto=true`;return O.detail(`URL completa do processo construída: ${a}`),a}async download(t){if(!t)throw new Error("URL do PDF não fornecida");O.info(`Baixando PDF de: ${t}`);const i=await fetch(t,{method:"GET",credentials:"same-origin",headers:{Accept:"application/pdf, application/json"}});if(!i.ok)throw new Error(`Erro HTTP ${i.status}: ${i.statusText}`);const a=i.headers.get("Content-Type")||null;if(!a)throw new Error("Cabeçalho Content-Type não encontrado na resposta");if(!a.startsWith("application/pdf")&&!a.startsWith("application/json"))throw new Error(`Tipo de conteúdo inesperado: ${a}`);if(O.info(`Tipo de conteúdo recebido: ${a}`),a.startsWith("application/json")){const r=await i.text();if(O.info(`JSON recebido, tamanho: ${r.length} caracteres`),r.length===0)throw new Error("Resposta JSON está vazia");return{content:r,mimeType:"application/json"}}if(a.startsWith("application/pdf")){const r=await i.arrayBuffer();if(r.byteLength===0)throw new Error("PDF baixado está vazio");return O.info(`PDF baixado com sucesso, tamanho: ${r.byteLength} bytes`),{content:r,mimeType:"application/pdf"}}return null}findPdfElements(){const t=['pje-historico-scroll-documento object[id^="obj"]','object[id^="obj"][type="application/pdf"]',"iframe#iframeVisualizacao","iframe.documento-frame",'iframe[src*="documento"]','iframe[src*="conteudo"]','div.visualizador-documento object[type="application/pdf"]','div.viewer-documento object[type="application/pdf"]','iframe[src*=".pdf"], embed[src*=".pdf"], object[type="application/pdf"]'];for(const i of t){const a=document.querySelector(i);if(a)return O.detail(`PDF viewer encontrado com seletor: ${i}`),a}return null}findPdfLinks(){return document.querySelector('a[href*="/documento/"][href*="/conteudo"], a[href*="baixar"], a[href*="download"]')}captureTextContent(){const t=[".documento-conteudo",".rich-panel-body",".viewer-documento .conteudo","mat-card-content",".documento-texto",".conteudo-documento",'[class*="documento"] [class*="conteudo"]',".visualizador-documento",'div[class*="text"] div[class*="content"]'];for(const i of t){const a=document.querySelector(i);if(a){const r=a.innerText||a.textContent||"";if(r&&r.trim().length>50)return O.detail(`Conteúdo textual encontrado com seletor: ${i}`),{type:"txt",data:r.trim().replace(/\n\s*\n\s*\n/g,`
308
308
 
309
- `),mimeType:"text/plain",size:r.length}}}return L.warn("Nenhum conteúdo textual encontrado"),null}async extractTextFromPdf(t){try{L.info("Iniciando extração de texto do PDF...");const i=await t.arrayBuffer(),r=await R0({data:i,useSystemFonts:!0,verbosity:0}).promise,c=[];L.info(`PDF carregado com ${r.numPages} páginas`);for(let h=1;h<=r.numPages;h++)try{const g=(await(await r.getPage(h)).getTextContent()).items.map(y=>y.str).join(" ");g.trim()&&c.push(`
309
+ `),mimeType:"text/plain",size:r.length}}}return O.warn("Nenhum conteúdo textual encontrado"),null}async extractTextFromPdf(t){try{O.info("Iniciando extração de texto do PDF...");const i=await t.arrayBuffer(),r=await C0({data:i,useSystemFonts:!0,verbosity:0}).promise,c=[];O.info(`PDF carregado com ${r.numPages} páginas`);for(let h=1;h<=r.numPages;h++)try{const g=(await(await r.getPage(h)).getTextContent()).items.map(y=>y.str).join(" ");g.trim()&&c.push(`
310
310
  --- Página ${h} ---
311
311
  ${g}
312
- `),h%10===0&&L.info(`Extraído texto de ${h}/${r.numPages} páginas`)}catch(p){L.warn(`Erro ao extrair texto da página ${h}:`,p),c.push(`
312
+ `),h%10===0&&O.info(`Extraído texto de ${h}/${r.numPages} páginas`)}catch(p){O.warn(`Erro ao extrair texto da página ${h}:`,p),c.push(`
313
313
  --- Página ${h} (erro na extração) ---
314
314
  `)}const u=c.join(`
315
- `);return L.info(`Extração concluída. Texto extraído: ${u.length} caracteres`),u}catch(i){throw L.error("Erro ao extrair texto do PDF:",i),new Error(`Falha na extração de texto: ${i}`)}}formatFileSize(t){return t>=1024*1024?`${(t/(1024*1024)).toFixed(2)} MB`:`${(t/1024).toFixed(2)} KB`}extractProcessNumber(){const t=document.querySelector("pje-descricao-processo");if(t){const i=t.querySelector('a[aria-label*="Detalhes do Processo"] span');if(i&&i.textContent){const a=i.textContent.trim();if(a)return L.detail(`Número do processo extraído (pje-descricao-processo): ${a}`),a}}return L.warn("Número do processo não encontrado"),null}captureTextFromJsonBase64(t){const i=JSON.parse(t),a=i?.conteudoBase64;if(!i||!a)return L.warn("Conteúdo Base64 não encontrado na resposta da API"),null;const r=atob(a),u=new DOMParser().parseFromString(r,"text/html");L.info("Conteúdo do documento HTML capturado com sucesso",u);const h=this.extractTextFromParsedDocument(u);return h?(L.info("Texto extraído com sucesso do documento"),h):(L.warn("Nenhum texto significativo encontrado no documento"),"")}extractTextFromParsedDocument(t){try{const i=["main .corpo","div.corpo",".corpo","main","body"];for(const c of i){const u=t.querySelector(c);if(u){let h=u.innerText||u.textContent||"";if(h=h.replace(/\n\s*\n/g,`
316
- `).replace(/\s+/g," ").trim(),h&&h.length>100)return L.detail(`Conteúdo extraído com seletor: ${c}`),h}}const a=t.querySelectorAll("p, div.topico, li");if(a.length>0){const c=[];if(a.forEach(u=>{const h=(u.textContent||"").trim();h&&h.length>10&&c.push(h)}),c.length>0){const u=c.join(`
317
- `).trim();if(u.length>100)return L.detail("Conteúdo extraído de parágrafos estruturais"),u}}const r=t.body?.textContent?.trim();return r&&r.length>50?(L.detail("Conteúdo extraído do body completo"),r.replace(/\n\s*\n/g,`
318
- `).replace(/\s+/g," ").trim()):(L.warn("Nenhum conteúdo textual significativo encontrado"),null)}catch(i){return L.error("Erro ao extrair texto do documento parseado:",i),null}}}class ek{pjeManager;lastDocId=null;checkTimeout=null;observer=null;ID_NOT_FOUND="id-not-found";NUM_ID_NOT_FOUND="num-id-not-found";TITLE_NOT_FOUND="Documento PJe";constructor(t){this.pjeManager=t||new dp,setTimeout(()=>{this.observeDocuments()},500)}handleMessage(t){t.data.type===Ae.EXTRACT_VISIBLE_DOCUMENT&&(L.info("Mensagem de extração de documento recebida"),this.extractDocumentAndSendResponse(t.data.id))}observeDocuments(){this.observer=new MutationObserver(t=>{t.forEach(i=>{i.type==="childList"&&(this.checkTimeout&&clearTimeout(this.checkTimeout),this.checkTimeout=setTimeout(()=>{this.checkForDocuments()},500))})}),this.observer.observe(document.body,{childList:!0,subtree:!0}),L.detail("Observador de documentos iniciado")}async checkForDocuments(){try{const t=['object[type="application/pdf"]','iframe[src*=".pdf"]','embed[src*=".pdf"]',".documento-conteudo",".rich-panel-body",".mat-card-content.conteudo-html"];let i=!1;for(const a of t)if(document.querySelector(a)){i=!0;break}if(i){const a=this.extractDocumentInfo(),r=a.id||this.ID_NOT_FOUND;r!==this.lastDocId&&(this.lastDocId=r,L.info("Novo documento detectado:",a),this.notifyDocumentDetected())}else this.lastDocId&&(this.lastDocId=null,L.info("Documento removido ou não encontrado."),this.notifyDocumentRemoved())}catch(t){L.error("Erro ao verificar documentos:",t)}}notifyDocumentDetected(){L.detail("Notificando documento detectado."),this.pjeManager.sendSuccessMessage(Ae.AUTO_CAPTURE_DETECTION)}notifyDocumentRemoved(){L.detail("Notificando documento removido."),this.pjeManager.sendSuccessMessage(Ae.AUTO_CAPTURE_CLEANUP)}async extractDocumentAndSendResponse(t){try{L.info("Iniciando captura automática do documento...");const i=await this.extractDocument();i?(L.info("Documento capturado com sucesso:",i),this.pjeManager.sendSuccessMessage(Ae.SINGLE_DOCUMENT_EXTRACTED,i,t),L.info("Documento enviado com sucesso:",i.id)):L.warn("Nenhum documento encontrado para captura.")}catch(i){L.error("Erro ao capturar documento:",i),this.pjeManager.sendError(Ae.EXTRACTION_ERROR,String(i),t)}}async extractDocument(){const t=this.extractDocumentInfo(),i=await this.captureDocumentContent(t);if(i&&i.data)return L.info("Documento capturado"),{id:t.id||t.numericId||this.ID_NOT_FOUND,title:t.id==="minuta"?"Minuta":t.id||this.TITLE_NOT_FOUND,subtitle:t.name||void 0,type:i.type,mimeType:i.type==="pdf"?"application/pdf":"text/plain",size:i.data instanceof Blob?i.data.size:i.data.length,content:i.data instanceof Blob?i.data:new Blob([i.data],{type:"text/plain"}),extractedAt:new Date,isAutoCapture:!0};const a=this.pjeManager.pjeUtils.findPdfLinks();if(a&&this.isValidPdfUrl(a.href)){L.info("Fallback 2: PDF link direto encontrado, tentando baixar de",a.href);const u=await this.pjeManager.pjeUtils.download(a.href);if(!u)return L.warn("Falha ao baixar PDF do link direto."),null;const h=u;if(h.mimeType==="application/pdf"&&h.content instanceof ArrayBuffer)return L.info("PDF baixado com sucesso do link direto."),{id:t.id||t.numericId||this.ID_NOT_FOUND,title:t.id||this.TITLE_NOT_FOUND,subtitle:t.name||void 0,type:"pdf",mimeType:"application/pdf",size:h.content.byteLength,content:new Blob([h.content],{type:"application/pdf"}),extractedAt:new Date,isAutoCapture:!0}}const r=this.pjeManager.pjeUtils.extractProcessId(),c=this.pjeManager.pjeUtils.extractDocumentId();if(r&&c){const u=this.pjeManager.pjeUtils.buildContentUrl(r,c);L.info("Fallback 3: Tentando capturar documento pela URL ",u);const h=await this.pjeManager.pjeUtils.download(u);if(!h)return L.info("Falha ao baixar documento pela URL."),null;const p=h;if(p.mimeType==="application/pdf"&&p.content instanceof ArrayBuffer)return L.info("Documento capturado com sucesso pela URL."),{id:t.id||t.numericId||this.ID_NOT_FOUND,title:t.id||this.TITLE_NOT_FOUND,subtitle:t.name||void 0,type:"pdf",mimeType:"application/pdf",size:p.content.byteLength,content:new Blob([p.content],{type:"application/pdf"}),extractedAt:new Date,isAutoCapture:!0};if(p.mimeType==="application/json"&&typeof p.content=="string"){const m=this.pjeManager.pjeUtils.captureTextFromJsonBase64(p.content);if(m)return L.info("Conteúdo capturado como TXT da URL."),{id:t.id||t.numericId||this.ID_NOT_FOUND,title:t.id||this.TITLE_NOT_FOUND,subtitle:t.name||void 0,type:"txt",mimeType:"text/plain",size:m.length,content:new Blob([m],{type:"text/plain"}),extractedAt:new Date,isAutoCapture:!0}}}return L.info("Nenhum conteúdo de documento foi capturado."),null}isValidPdfUrl(t){if(!t)return!1;if(t.startsWith("blob:"))return L.detail("URL de blob rejeitada:",t),!1;if(t.includes("/viewer.html"))return L.detail("URL de viewer HTML rejeitada:",t),!1;const a=["/api/processos/","/documento/","/conteudo",".pdf"].some(r=>t.includes(r));return L.detail(`URL ${t} ${a?"aceita":"rejeitada"}`),a}extractDocumentInfo(){let t=this.ID_NOT_FOUND,i=this.NUM_ID_NOT_FOUND,a=this.TITLE_NOT_FOUND,r=!1;try{const c=document.querySelector("mat-card-title");if(c){const u=c.textContent;if(a=u.trim(),u.toLowerCase().startsWith("minuta")){r=!0;const h=u.indexOf("-");h!==-1&&h<u.length-1&&(a=u.substring(h+1).trim()),t=this.findDocumentIdInTimeline(),L.detail(`Documento tipo Minuta detectado: ${a}`)}else{const h=[/Id\s+([a-zA-Z0-9]+)/i,/ID:\s*([a-zA-Z0-9]+)/i,/Documento\s+([a-zA-Z0-9]+)/i,/Doc\.\s*([a-zA-Z0-9]+)/i];for(const p of h){const m=u.match(p);if(m&&m[1]){t=m[1],L.detail(`ID alfanumérico extraído do título: ${t}`);break}}}}if(t!==this.ID_NOT_FOUND&&!r&&(i=this.findNumericIdInTimeline(t,a),i!==this.NUM_ID_NOT_FOUND&&L.detail(`ID numérico encontrado na timeline: ${i}`)),a===this.TITLE_NOT_FOUND||!a.trim()){const u=[".documento-titulo",".rich-panel-header","h3",".titulo-documento",'[data-testid="document-title"]',".document-title"];for(const h of u){const p=document.querySelector(h);if(p&&p.textContent.trim()){a=p.textContent.trim(),L.detail(`Nome extraído de ${h}: ${a}`);break}}}L.detail("Informações extraídas:",{documentId:t,numericDocumentId:i,documentName:a,isMinuta:r})}catch(c){L.info("Erro ao extrair informações do documento:",c)}return a.includes(t)&&(a=a.replace(t,"").trim(),a.startsWith("Id -")&&(a=a.replace("Id -","").trim())),{id:t,numericId:i,name:a||this.TITLE_NOT_FOUND,isMinuta:r}}findDocumentIdInTimeline(){try{const t=document.querySelector('[aria-label="Documento não assinado"]');if(t){let r=t;for(;r&&r.parentElement;){r=r.parentElement;const c=r.querySelector('mat-card[id^="doc_"]');if(c&&c.id){const u=c.id.match(/^doc_([a-zA-Z0-9]+)$/);if(u&&u[1])return L.detail(`ID alfanumérico do documento encontrado via aria-label: ${u[1]}`),u[1]}if(r.id&&r.id.startsWith("doc_")){const u=r.id.match(/^doc_(\d+)$/);if(u&&u[1]){const h=this.findAlphanumericIdForNumeric(u[1]);return h!==this.ID_NOT_FOUND?(L.detail(`ID alfanumérico encontrado para numérico ${u[1]}: ${h}`),h):(L.detail(`ID numérico do documento encontrado via aria-label: ${u[1]}`),u[1])}}}}const i=document.querySelectorAll('li.tl-item-container[id^="doc_"], div[id^="doc_"]');for(const r of i){const c=r.textContent||(r instanceof HTMLElement?r.innerText:"")||"";if(L.detail(`Texto encontrado na timeline: ${c}`),c.includes("Documento não assinado")||c.toLowerCase().includes("minuta")||r.querySelector('[aria-label="Documento não assinado"]')){const h=r.querySelector('mat-card[id^="doc_"]');if(h&&h.id){const m=h.id.match(/^doc_([a-zA-Z0-9]+)$/);if(m&&m[1])return L.detail(`ID alfanumérico do documento encontrado na timeline: ${m[1]}`),m[1]}const p=r.id.match(/^doc_(\d+)$/);if(p&&p[1]){const m=this.findAlphanumericIdForNumeric(p[1]);return m!==this.ID_NOT_FOUND?(L.detail(`ID alfanumérico encontrado para numérico ${p[1]}: ${m}`),m):(L.detail(`ID numérico do documento encontrado na timeline: ${p[1]}`),p[1])}}}const a=document.querySelectorAll(".fa-unlock, .documento-nao-assinado");for(const r of a){let c=r;for(;c&&c.parentElement;){c=c.parentElement;const u=c.querySelector('mat-card[id^="doc_"]');if(u&&u.id){const h=u.id.match(/^doc_([a-zA-Z0-9]+)$/);if(h&&h[1])return L.detail(`ID alfanumérico encontrado via ícone não assinado: ${h[1]}`),h[1]}if(c.id&&c.id.startsWith("doc_")){const h=c.id.match(/^doc_(\d+)$/);if(h&&h[1]){const p=this.findAlphanumericIdForNumeric(h[1]);return p!==this.ID_NOT_FOUND?p:(L.detail(`ID numérico encontrado via ícone não assinado: ${h[1]}`),h[1])}}}}}catch(t){L.info("Erro ao buscar ID do documento na timeline:",t)}return this.ID_NOT_FOUND}findAlphanumericIdForNumeric(t){try{const i=document.getElementById(`doc_${t}`);if(i){const r=i.querySelector('mat-card[id^="doc_"]');if(r&&r.id){const c=r.id.match(/^doc_([a-zA-Z0-9]+)$/);if(c&&c[1])return c[1]}}const a=document.querySelectorAll(`a[href*="/documento/${t}/"]`);for(const r of a){let c=r;for(;c&&c.parentElement;){const u=c.querySelector('mat-card[id^="doc_"]')||c.closest('mat-card[id^="doc_"]');if(u&&u.id){const h=u.id.match(/^doc_([a-zA-Z0-9]+)$/);if(h&&h[1])return h[1]}c=c.parentElement}}return this.ID_NOT_FOUND}catch(i){return L.info("Erro ao buscar ID alfanumérico para numérico:",i),this.ID_NOT_FOUND}}findNumericIdInTimeline(t,i){try{const a=document.querySelectorAll('li.tl-item-container[id^="doc_"], div[id^="doc_"]');for(const c of a)if((c.textContent||(c instanceof HTMLElement?c.innerText:"")||"").includes(t||i)){const h=c.id.match(/^doc_(\d+)$/);if(h&&h[1])return L.detail(`ID numérico ${h[1]} encontrado para ID alfanumérico ${t}`),h[1]}const r=document.querySelectorAll('a[href*="/documento/"]');for(const c of r)if((c.textContent||(c instanceof HTMLElement?c.innerText:"")||"").includes(t)){const p=c.href.match(/\/documento\/(\d+)\//);if(p&&p[1])return L.detail(`ID numérico ${p[1]} encontrado em link para ID alfanumérico ${t}`),p[1]}return L.info(`ID numérico não encontrado para ID alfanumérico: ${t}`),this.NUM_ID_NOT_FOUND}catch(a){return L.info("Erro ao buscar ID numérico na timeline:",a),this.NUM_ID_NOT_FOUND}}async captureDocumentContent(t){try{const i=this.pjeManager.pjeUtils.extractProcessId(),a=t.numericId,r=t.isMinuta;if(L.info("Tentando capturar documento:",t),i&&a&&a!==this.NUM_ID_NOT_FOUND&&!r){const c=this.pjeManager.pjeUtils.buildContentUrl(i,a);L.info("Tentando baixar PDF da API construída:",c);try{const u=await this.pjeManager.pjeUtils.download(c);u||L.warn("Falha ao baixar PDF da API construída.");const h=u;if(h.mimeType==="application/pdf"){if(L.info("PDF baixado com sucesso da API construída."),h.content instanceof ArrayBuffer)return{data:new Blob([h.content],{type:"application/pdf"}),type:"pdf"}}else if(h.mimeType==="application/json"&&(L.warn("API retornou JSON, tentando capturar como TXT."),typeof h.content=="string")){const p=this.pjeManager.pjeUtils.captureTextFromJsonBase64(h.content);if(p)return L.info("Conteúdo capturado como TXT da API."),{data:p,type:"txt"}}}catch(u){L.warn("Falha ao baixar da API construída:",String(u))}}else{if(L.info("ID numérico não encontrado, tentando capturar como TXT."),r){L.info("Documento é uma Minuta, capturando como TXT.");const c=await this.captureContentAsText();if(c&&c.data)return L.info("Conteúdo capturado como TXT."),{data:c.data,type:"txt"}}L.warn("ID numérico inválido ou não encontrado e não é Minuta, não será possível capturar arquivo PDF ou TXT.")}L.warn("Nenhum documento PDF ou TXT capturado, retornando erro.")}catch(i){return L.error("Erro ao capturar documento:",i),null}}async captureContentAsText(){try{L.info("Tentando capturar conteúdo como TXT...");const t=[".documento-conteudo",".rich-panel-body",".viewer-documento .conteudo","mat-card-content",".documento-texto",".conteudo-documento",'[class*="documento"] [class*="conteudo"]',".visualizador-documento",'div[class*="text"] div[class*="content"]'];let i="";for(const a of t){const r=document.querySelector(a);if(r&&(L.detail(`Conteúdo textual encontrado com seletor: ${a}`),i=r.innerText||r.textContent||"",i&&i.trim().length>50))break}if(!i||i.trim().length<50){const a=document.querySelector("mat-card");a&&(L.detail("Capturando conteúdo de mat-card geral."),i=a.innerText||a.textContent||"")}if(!i||i.trim().length<10)throw new Error("Nenhum conteúdo textual significativo encontrado.");return i=i.trim(),i=i.replace(/\n\s*\n\s*\n/g,`
315
+ `);return O.info(`Extração concluída. Texto extraído: ${u.length} caracteres`),u}catch(i){throw O.error("Erro ao extrair texto do PDF:",i),new Error(`Falha na extração de texto: ${i}`)}}formatFileSize(t){return t>=1024*1024?`${(t/(1024*1024)).toFixed(2)} MB`:`${(t/1024).toFixed(2)} KB`}extractProcessNumber(){const t=document.querySelector("pje-descricao-processo");if(t){const i=t.querySelector('a[aria-label*="Detalhes do Processo"] span');if(i&&i.textContent){const a=i.textContent.trim();if(a)return O.detail(`Número do processo extraído (pje-descricao-processo): ${a}`),a}}return O.warn("Número do processo não encontrado"),null}captureTextFromJsonBase64(t){const i=JSON.parse(t),a=i?.conteudoBase64;if(!i||!a)return O.warn("Conteúdo Base64 não encontrado na resposta da API"),null;const r=atob(a),u=new DOMParser().parseFromString(r,"text/html");O.info("Conteúdo do documento HTML capturado com sucesso",u);const h=this.extractTextFromParsedDocument(u);return h?(O.info("Texto extraído com sucesso do documento"),h):(O.warn("Nenhum texto significativo encontrado no documento"),"")}extractTextFromParsedDocument(t){try{const i=["main .corpo","div.corpo",".corpo","main","body"];for(const c of i){const u=t.querySelector(c);if(u){let h=u.innerText||u.textContent||"";if(h=h.replace(/\n\s*\n/g,`
316
+ `).replace(/\s+/g," ").trim(),h&&h.length>100)return O.detail(`Conteúdo extraído com seletor: ${c}`),h}}const a=t.querySelectorAll("p, div.topico, li");if(a.length>0){const c=[];if(a.forEach(u=>{const h=(u.textContent||"").trim();h&&h.length>10&&c.push(h)}),c.length>0){const u=c.join(`
317
+ `).trim();if(u.length>100)return O.detail("Conteúdo extraído de parágrafos estruturais"),u}}const r=t.body?.textContent?.trim();return r&&r.length>50?(O.detail("Conteúdo extraído do body completo"),r.replace(/\n\s*\n/g,`
318
+ `).replace(/\s+/g," ").trim()):(O.warn("Nenhum conteúdo textual significativo encontrado"),null)}catch(i){return O.error("Erro ao extrair texto do documento parseado:",i),null}}}class JO{pjeManager;lastDocId=null;checkTimeout=null;observer=null;ID_NOT_FOUND="id-not-found";NUM_ID_NOT_FOUND="num-id-not-found";TITLE_NOT_FOUND="Documento PJe";constructor(t){this.pjeManager=t||new Nu,setTimeout(()=>{this.observeDocuments()},500)}handleMessage(t){t.data.type===oe.EXTRACT_VISIBLE_DOCUMENT&&(O.info("Mensagem de extração de documento recebida"),this.extractDocumentAndSendResponse(t.data.id))}observeDocuments(){this.observer=new MutationObserver(t=>{t.forEach(i=>{i.type==="childList"&&(this.checkTimeout&&clearTimeout(this.checkTimeout),this.checkTimeout=setTimeout(()=>{this.checkForDocuments()},500))})}),this.observer.observe(document.body,{childList:!0,subtree:!0}),O.detail("Observador de documentos iniciado")}async checkForDocuments(){try{const t=['object[type="application/pdf"]','iframe[src*=".pdf"]','embed[src*=".pdf"]',".documento-conteudo",".rich-panel-body",".mat-card-content.conteudo-html"];let i=!1;for(const a of t)if(document.querySelector(a)){i=!0;break}if(i){const a=this.extractDocumentInfo(),r=a.id||this.ID_NOT_FOUND;r!==this.lastDocId&&(this.lastDocId=r,O.info("Novo documento detectado:",a),this.notifyDocumentDetected())}else this.lastDocId&&(this.lastDocId=null,O.info("Documento removido ou não encontrado."),this.notifyDocumentRemoved())}catch(t){O.error("Erro ao verificar documentos:",t)}}notifyDocumentDetected(){O.detail("Notificando documento detectado."),this.pjeManager.sendSuccessMessage(oe.AUTO_CAPTURE_DETECTION)}notifyDocumentRemoved(){O.detail("Notificando documento removido."),this.pjeManager.sendSuccessMessage(oe.AUTO_CAPTURE_CLEANUP)}async extractDocumentAndSendResponse(t){try{O.info("Iniciando captura automática do documento...");const i=await this.extractDocument();i?(O.info("Documento capturado com sucesso:",i),this.pjeManager.sendSuccessMessage(oe.SINGLE_DOCUMENT_EXTRACTED,i,t),O.info("Documento enviado com sucesso:",i.id)):O.warn("Nenhum documento encontrado para captura.")}catch(i){O.error("Erro ao capturar documento:",i),this.pjeManager.sendError(oe.EXTRACTION_ERROR,String(i),t)}}async extractDocument(){const t=this.extractDocumentInfo(),i=await this.captureDocumentContent(t);if(i&&i.data)return O.info("Documento capturado"),{id:t.id||t.numericId||this.ID_NOT_FOUND,title:t.id==="minuta"?"Minuta":t.id||this.TITLE_NOT_FOUND,subtitle:t.name||void 0,type:i.type,mimeType:i.type==="pdf"?"application/pdf":"text/plain",size:i.data instanceof Blob?i.data.size:i.data.length,content:i.data instanceof Blob?i.data:new Blob([i.data],{type:"text/plain"}),extractedAt:new Date,isAutoCapture:!0};const a=this.pjeManager.pjeUtils.findPdfLinks();if(a&&this.isValidPdfUrl(a.href)){O.info("Fallback 2: PDF link direto encontrado, tentando baixar de",a.href);const u=await this.pjeManager.pjeUtils.download(a.href);if(!u)return O.warn("Falha ao baixar PDF do link direto."),null;const h=u;if(h.mimeType==="application/pdf"&&h.content instanceof ArrayBuffer)return O.info("PDF baixado com sucesso do link direto."),{id:t.id||t.numericId||this.ID_NOT_FOUND,title:t.id||this.TITLE_NOT_FOUND,subtitle:t.name||void 0,type:"pdf",mimeType:"application/pdf",size:h.content.byteLength,content:new Blob([h.content],{type:"application/pdf"}),extractedAt:new Date,isAutoCapture:!0}}const r=this.pjeManager.pjeUtils.extractProcessId(),c=this.pjeManager.pjeUtils.extractDocumentId();if(r&&c){const u=this.pjeManager.pjeUtils.buildContentUrl(r,c);O.info("Fallback 3: Tentando capturar documento pela URL ",u);const h=await this.pjeManager.pjeUtils.download(u);if(!h)return O.info("Falha ao baixar documento pela URL."),null;const p=h;if(p.mimeType==="application/pdf"&&p.content instanceof ArrayBuffer)return O.info("Documento capturado com sucesso pela URL."),{id:t.id||t.numericId||this.ID_NOT_FOUND,title:t.id||this.TITLE_NOT_FOUND,subtitle:t.name||void 0,type:"pdf",mimeType:"application/pdf",size:p.content.byteLength,content:new Blob([p.content],{type:"application/pdf"}),extractedAt:new Date,isAutoCapture:!0};if(p.mimeType==="application/json"&&typeof p.content=="string"){const m=this.pjeManager.pjeUtils.captureTextFromJsonBase64(p.content);if(m)return O.info("Conteúdo capturado como TXT da URL."),{id:t.id||t.numericId||this.ID_NOT_FOUND,title:t.id||this.TITLE_NOT_FOUND,subtitle:t.name||void 0,type:"txt",mimeType:"text/plain",size:m.length,content:new Blob([m],{type:"text/plain"}),extractedAt:new Date,isAutoCapture:!0}}}return O.info("Nenhum conteúdo de documento foi capturado."),null}isValidPdfUrl(t){if(!t)return!1;if(t.startsWith("blob:"))return O.detail("URL de blob rejeitada:",t),!1;if(t.includes("/viewer.html"))return O.detail("URL de viewer HTML rejeitada:",t),!1;const a=["/api/processos/","/documento/","/conteudo",".pdf"].some(r=>t.includes(r));return O.detail(`URL ${t} ${a?"aceita":"rejeitada"}`),a}extractDocumentInfo(){let t=this.ID_NOT_FOUND,i=this.NUM_ID_NOT_FOUND,a=this.TITLE_NOT_FOUND,r=!1;try{const c=document.querySelector("mat-card-title");if(c){const u=c.textContent;if(a=u.trim(),u.toLowerCase().startsWith("minuta")){r=!0;const h=u.indexOf("-");h!==-1&&h<u.length-1&&(a=u.substring(h+1).trim()),t=this.findDocumentIdInTimeline(),O.detail(`Documento tipo Minuta detectado: ${a}`)}else{const h=[/Id\s+([a-zA-Z0-9]+)/i,/ID:\s*([a-zA-Z0-9]+)/i,/Documento\s+([a-zA-Z0-9]+)/i,/Doc\.\s*([a-zA-Z0-9]+)/i];for(const p of h){const m=u.match(p);if(m&&m[1]){t=m[1],O.detail(`ID alfanumérico extraído do título: ${t}`);break}}}}if(t!==this.ID_NOT_FOUND&&!r&&(i=this.findNumericIdInTimeline(t,a),i!==this.NUM_ID_NOT_FOUND&&O.detail(`ID numérico encontrado na timeline: ${i}`)),a===this.TITLE_NOT_FOUND||!a.trim()){const u=[".documento-titulo",".rich-panel-header","h3",".titulo-documento",'[data-testid="document-title"]',".document-title"];for(const h of u){const p=document.querySelector(h);if(p&&p.textContent.trim()){a=p.textContent.trim(),O.detail(`Nome extraído de ${h}: ${a}`);break}}}O.detail("Informações extraídas:",{documentId:t,numericDocumentId:i,documentName:a,isMinuta:r})}catch(c){O.info("Erro ao extrair informações do documento:",c)}return a.includes(t)&&(a=a.replace(t,"").trim(),a.startsWith("Id -")&&(a=a.replace("Id -","").trim())),{id:t,numericId:i,name:a||this.TITLE_NOT_FOUND,isMinuta:r}}findDocumentIdInTimeline(){try{const t=document.querySelector('[aria-label="Documento não assinado"]');if(t){let r=t;for(;r&&r.parentElement;){r=r.parentElement;const c=r.querySelector('mat-card[id^="doc_"]');if(c&&c.id){const u=c.id.match(/^doc_([a-zA-Z0-9]+)$/);if(u&&u[1])return O.detail(`ID alfanumérico do documento encontrado via aria-label: ${u[1]}`),u[1]}if(r.id&&r.id.startsWith("doc_")){const u=r.id.match(/^doc_(\d+)$/);if(u&&u[1]){const h=this.findAlphanumericIdForNumeric(u[1]);return h!==this.ID_NOT_FOUND?(O.detail(`ID alfanumérico encontrado para numérico ${u[1]}: ${h}`),h):(O.detail(`ID numérico do documento encontrado via aria-label: ${u[1]}`),u[1])}}}}const i=document.querySelectorAll('li.tl-item-container[id^="doc_"], div[id^="doc_"]');for(const r of i){const c=r.textContent||(r instanceof HTMLElement?r.innerText:"")||"";if(O.detail(`Texto encontrado na timeline: ${c}`),c.includes("Documento não assinado")||c.toLowerCase().includes("minuta")||r.querySelector('[aria-label="Documento não assinado"]')){const h=r.querySelector('mat-card[id^="doc_"]');if(h&&h.id){const m=h.id.match(/^doc_([a-zA-Z0-9]+)$/);if(m&&m[1])return O.detail(`ID alfanumérico do documento encontrado na timeline: ${m[1]}`),m[1]}const p=r.id.match(/^doc_(\d+)$/);if(p&&p[1]){const m=this.findAlphanumericIdForNumeric(p[1]);return m!==this.ID_NOT_FOUND?(O.detail(`ID alfanumérico encontrado para numérico ${p[1]}: ${m}`),m):(O.detail(`ID numérico do documento encontrado na timeline: ${p[1]}`),p[1])}}}const a=document.querySelectorAll(".fa-unlock, .documento-nao-assinado");for(const r of a){let c=r;for(;c&&c.parentElement;){c=c.parentElement;const u=c.querySelector('mat-card[id^="doc_"]');if(u&&u.id){const h=u.id.match(/^doc_([a-zA-Z0-9]+)$/);if(h&&h[1])return O.detail(`ID alfanumérico encontrado via ícone não assinado: ${h[1]}`),h[1]}if(c.id&&c.id.startsWith("doc_")){const h=c.id.match(/^doc_(\d+)$/);if(h&&h[1]){const p=this.findAlphanumericIdForNumeric(h[1]);return p!==this.ID_NOT_FOUND?p:(O.detail(`ID numérico encontrado via ícone não assinado: ${h[1]}`),h[1])}}}}}catch(t){O.info("Erro ao buscar ID do documento na timeline:",t)}return this.ID_NOT_FOUND}findAlphanumericIdForNumeric(t){try{const i=document.getElementById(`doc_${t}`);if(i){const r=i.querySelector('mat-card[id^="doc_"]');if(r&&r.id){const c=r.id.match(/^doc_([a-zA-Z0-9]+)$/);if(c&&c[1])return c[1]}}const a=document.querySelectorAll(`a[href*="/documento/${t}/"]`);for(const r of a){let c=r;for(;c&&c.parentElement;){const u=c.querySelector('mat-card[id^="doc_"]')||c.closest('mat-card[id^="doc_"]');if(u&&u.id){const h=u.id.match(/^doc_([a-zA-Z0-9]+)$/);if(h&&h[1])return h[1]}c=c.parentElement}}return this.ID_NOT_FOUND}catch(i){return O.info("Erro ao buscar ID alfanumérico para numérico:",i),this.ID_NOT_FOUND}}findNumericIdInTimeline(t,i){try{const a=document.querySelectorAll('li.tl-item-container[id^="doc_"], div[id^="doc_"]');for(const c of a)if((c.textContent||(c instanceof HTMLElement?c.innerText:"")||"").includes(t||i)){const h=c.id.match(/^doc_(\d+)$/);if(h&&h[1])return O.detail(`ID numérico ${h[1]} encontrado para ID alfanumérico ${t}`),h[1]}const r=document.querySelectorAll('a[href*="/documento/"]');for(const c of r)if((c.textContent||(c instanceof HTMLElement?c.innerText:"")||"").includes(t)){const p=c.href.match(/\/documento\/(\d+)\//);if(p&&p[1])return O.detail(`ID numérico ${p[1]} encontrado em link para ID alfanumérico ${t}`),p[1]}return O.info(`ID numérico não encontrado para ID alfanumérico: ${t}`),this.NUM_ID_NOT_FOUND}catch(a){return O.info("Erro ao buscar ID numérico na timeline:",a),this.NUM_ID_NOT_FOUND}}async captureDocumentContent(t){try{const i=this.pjeManager.pjeUtils.extractProcessId(),a=t.numericId,r=t.isMinuta;if(O.info("Tentando capturar documento:",t),i&&a&&a!==this.NUM_ID_NOT_FOUND&&!r){const c=this.pjeManager.pjeUtils.buildContentUrl(i,a);O.info("Tentando baixar PDF da API construída:",c);try{const u=await this.pjeManager.pjeUtils.download(c);u||O.warn("Falha ao baixar PDF da API construída.");const h=u;if(h.mimeType==="application/pdf"){if(O.info("PDF baixado com sucesso da API construída."),h.content instanceof ArrayBuffer)return{data:new Blob([h.content],{type:"application/pdf"}),type:"pdf"}}else if(h.mimeType==="application/json"&&(O.warn("API retornou JSON, tentando capturar como TXT."),typeof h.content=="string")){const p=this.pjeManager.pjeUtils.captureTextFromJsonBase64(h.content);if(p)return O.info("Conteúdo capturado como TXT da API."),{data:p,type:"txt"}}}catch(u){O.warn("Falha ao baixar da API construída:",String(u))}}else{if(O.info("ID numérico não encontrado, tentando capturar como TXT."),r){O.info("Documento é uma Minuta, capturando como TXT.");const c=await this.captureContentAsText();if(c&&c.data)return O.info("Conteúdo capturado como TXT."),{data:c.data,type:"txt"}}O.warn("ID numérico inválido ou não encontrado e não é Minuta, não será possível capturar arquivo PDF ou TXT.")}O.warn("Nenhum documento PDF ou TXT capturado, retornando erro.")}catch(i){return O.error("Erro ao capturar documento:",i),null}}async captureContentAsText(){try{O.info("Tentando capturar conteúdo como TXT...");const t=[".documento-conteudo",".rich-panel-body",".viewer-documento .conteudo","mat-card-content",".documento-texto",".conteudo-documento",'[class*="documento"] [class*="conteudo"]',".visualizador-documento",'div[class*="text"] div[class*="content"]'];let i="";for(const a of t){const r=document.querySelector(a);if(r&&(O.detail(`Conteúdo textual encontrado com seletor: ${a}`),i=r.innerText||r.textContent||"",i&&i.trim().length>50))break}if(!i||i.trim().length<50){const a=document.querySelector("mat-card");a&&(O.detail("Capturando conteúdo de mat-card geral."),i=a.innerText||a.textContent||"")}if(!i||i.trim().length<10)throw new Error("Nenhum conteúdo textual significativo encontrado.");return i=i.trim(),i=i.replace(/\n\s*\n\s*\n/g,`
319
319
 
320
- `),L.info(`Conteúdo TXT capturado: ${i.length} caracteres.`),{data:i}}catch(t){return L.error("Erro ao capturar conteúdo como TXT:",t),null}}destroy(){this.observer&&(this.observer.disconnect(),this.observer=null),this.checkTimeout&&(clearTimeout(this.checkTimeout),this.checkTimeout=null)}}class nk{pjeManager;constructor(t){this.pjeManager=t}handleMessage(t){const i=t.data;i.type===Ae.EXTRACT_SELECTED_DOCUMENTS&&(L.info("Mensagem de extração de documentos selecionados recebida"),this.extractAndSendSelectedDocuments(i.id))}async getSelectedDocuments(){L.info("PJe: Buscando documentos selecionados na timeline...");const t=[],i=this.pjeManager.pjeUtils.extractProcessId();if(!i)return L.warn("PJe: ID do processo não encontrado."),t;try{const a=document.querySelectorAll('mat-checkbox.mat-checkbox-checked input[type="checkbox"], input[type="checkbox"][aria-checked="true"]');if(L.info(`PJe: Encontrados ${a.length} checkboxes marcados`),a.length===0)return t;for(const r of a){const c=this.findDocumentContainer(r);if(c){L.info(`PJe: Processando container com ID: ${c.id}`);const u=await this.extractDocumentFromContainer(c,i);u&&(t.push(u),L.info(`PJe: Documento extraído: ${u.title}`))}}return t}catch(a){return L.error("PJe: Erro ao buscar documentos selecionados:",a),[]}}findDocumentContainer(t){let i=t,a=0;const r=10;for(;i&&a<r;)if(a++,i=i.parentElement,i){const c=i.classList.contains("tl-item-container")&&i.id&&i.id.startsWith("doc_"),u=i.classList.contains("tl-item-anexo")&&i.id&&i.id.startsWith("doc_");if(c||u){const h=u?"ANEXO":"DOCUMENTO";return L.info(`PJe: Container ${h} encontrado: ${i.id}`),i}}return L.warn("PJe: Container de documento/anexo não encontrado para checkbox"),null}async extractDocumentFromContainer(t,i){try{const a=t.id.match(/^doc_([a-zA-Z0-9]+)$/);if(!a||!a[1])return L.warn(`PJe: ID de documento/anexo inválido no container: ${t.id}`),null;const r=a[1],c=t.classList.contains("tl-item-anexo");let u=`${c?"Anexo":"Documento"} ${r}`,h=!1,p=r,m=r;if(c){const C=t.querySelector('a[href*="/documento/"]');if(C&&C.href){const N=C.href.match(/\/documento\/(\d+)\/conteudo/);if(N&&N[1])m=N[1],L.info(`PJe: ID numérico extraído do link do anexo: ${m}`);else return L.warn(`PJe: Não foi possível extrair ID numérico do link do anexo: ${C.href}`),null}else return L.warn(`PJe: Link de download não encontrado para anexo ${r}`),null}const g=c?[t.querySelector("a.tl-documento[aria-label]"),t.querySelector("a.tl-documento"),t.querySelector(".tl-subitem-detalhe")]:[t.querySelector("a.tl-documento"),t.querySelector('a[aria-label*="Título:"]'),t.querySelector("span:not(.sr-only)")];for(const C of g)if(C){let N=null;const O=C.getAttribute("aria-label");if(O&&!c){const U=O.match(/Título:\s*(.*)/);U&&U[1]&&(N=U[1].trim());const I=O.match(/- Id:\s*([a-zA-Z0-9]+)/);I&&I[1]?(p=I[1].trim(),h=!1):h=!0}if(N||(N=C.textContent||C.innerText),N&&N.trim()&&!N.includes("sr-only")){const U=N.match(/\(([^)]+)\)/);u=U?U[1]:N.trim(),L.info(`PJe: Nome do ${c?"anexo":"documento"} extraído: ${u}`);break}}let y=null,b="pdf",S="application/pdf",A=null;if(h&&!c){L.info("PJe: Documento Minuta detectado, capturando como TXT sem navegação");const C=await this.captureDocumentAsText(i,m);C&&(y=C,b="txt",S="text/plain",L.info(`PJe: Minuta capturada como TXT, tamanho: ${C.length} caracteres`))}else if(A=this.pjeManager.pjeUtils.buildContentUrl(i,m,"pdf"),A)try{const C=await this.pjeManager.pjeUtils.download(A);if(!C)return L.warn(`PJe: PDF não baixado corretamente de ${A}`),null;if(L.info(`PJe: PDF baixado com sucesso de ${A}`),C.content instanceof ArrayBuffer&&C.mimeType==="application/pdf")y=new Blob([C.content],{type:"application/pdf"}),b="pdf",S="application/pdf",L.info(`PJe: PDF baixado com sucesso, tamanho: ${y.size} bytes`);else throw new Error(`Tipo de conteúdo inesperado ao baixar PDF: ${C.mimeType}`)}catch(C){L.warn(`PJe: Erro ao baixar PDF ${m}, tentando capturar como TXT:`,C);const N=await this.captureDocumentAsText(i,m);N&&(y=N,b="txt",S="text/plain",L.info(`PJe: Conteúdo TXT capturado, tamanho: ${N.length} caracteres`))}else{L.warn(`PJe: URL do PDF não pode ser construída para ${m}, tentando capturar como TXT`);const C=await this.captureDocumentAsText(i,m);C&&(y=C,b="txt",S="text/plain",L.info(`PJe: Conteúdo TXT capturado, tamanho: ${C.length} caracteres`))}if(!y)return L.warn(`PJe: Não foi possível capturar conteúdo para ${c?"anexo":"documento"} ${m}`),null;const _=typeof y=="string"?y.length:y.size||void 0,R={id:p||m||crypto.randomUUID().substring(0,6),title:p||(c?"Anexo":"Minuta"),subtitle:u||void 0,type:b,mimeType:S,size:_,url:A||void 0,extractedAt:new Date,content:y,isAutoCapture:!1};return L.info(`PJe: ${c?"Anexo":"Documento"} processado como ${b.toUpperCase()}: ${u} (ID: ${R.id}, ID Numérico: ${m})`),R}catch(a){return L.error("PJe: Erro ao extrair documento/anexo do container:",a),null}}async captureDocumentAsText(t,i){try{const a=this.pjeManager.pjeUtils.buildContentUrl(t,i,"txt");if(!a)return L.warn(`PJe: URL de captura de texto não pode ser construída para ${i}`),null;L.info(`PJe: Capturando conteúdo textual do documento via API: ${a}`);const r=await fetch(a,{credentials:"include",headers:{Accept:"application/json"}});if(!r.ok)return L.error("Erro ao buscar documento via API:",r.statusText),null;const c=await r.text(),u=this.pjeManager.pjeUtils.captureTextFromJsonBase64(c);return u?(L.info(`Texto extraído com sucesso do documento ${i}`),u):(L.warn(`Nenhum texto significativo encontrado no documento ${i}`),null)}catch(a){return L.error("Erro ao capturar documento como texto:",a),null}}async extractAndSendSelectedDocuments(t){try{L.info("Iniciando extração de documentos selecionados...");const i=await this.getSelectedDocuments();if(i.length===0){this.pjeManager.sendError(Ae.EXTRACTION_ERROR,"Nenhum documento selecionado encontrado",t);return}L.info(`${i.length} documentos selecionados encontrados`),this.pjeManager.sendSuccessMessage(Ae.MULTIPLE_DOCUMENTS_EXTRACTED,i,t),L.info("Documentos selecionados enviados com sucesso")}catch(i){L.error("Erro ao extrair documentos selecionados:",i),this.pjeManager.sendError(Ae.EXTRACTION_ERROR,`Erro ao extrair documentos selecionados: ${i.message}`,t)}}destroy(){}}class ik{pjeManager;extractionTimeout=null;TIMEOUT=6e4;MAX_PDF_SIZE=Xt.max_pdf_size*1024*1024;isExtracting=!1;constructor(t){this.pjeManager=t||new dp}async handleMessage(t){const i=t.data;if(i.type===Ae.EXTRACT_FULL_PROCESS){if(L.info("Mensagem de extração de processo completo recebida"),this.isExtracting){L.info("Extração já em andamento, ignorando nova solicitação");return}this.isExtracting=!0,this.clearTimeout();let a=!1;this.extractionTimeout=setTimeout(()=>{a=!0,L.warn("Tempo limite de extração de processo completo atingido, abortando..."),this.pjeManager.sendError(Ae.EXTRACTION_ERROR,"Tempo limite de extração de processo completo atingido. Tente novamente mais tarde.",i.id)},this.TIMEOUT);try{const r=await this.extractFullProcess();!a&&this.isExtracting&&(this.clearTimeout(),this.isExtracting=!1,this.sendExtractionResult(r,i.id),L.info("Processo completo extraído com sucesso:",r))}catch(r){L.error("Erro ao extrair processo completo:",r),!a&&this.isExtracting&&(this.clearTimeout(),this.isExtracting=!1,this.pjeManager.sendError(Ae.EXTRACTION_ERROR,`Erro durante extração: ${r}`,i.id))}}}clearTimeout(){this.extractionTimeout&&(clearTimeout(this.extractionTimeout),this.extractionTimeout=null,L.detail("Timeout de extração limpo"))}async extractFullProcess(){L.info("Iniciando extração do processo completo...");try{const t=this.pjeManager.pjeUtils.extractProcessId();if(!t)return L.warn("ID do processo não encontrado, abortando extração."),null;L.info("ID do processo encontrado:",t);const i=this.pjeManager.pjeUtils.buildFullProcessUrl(t),a=this.pjeManager.pjeUtils.extractProcessNumber();if(L.info("Número do processo extraído:",a),L.info("URL do processo completo:",i),!i)return L.warn("URL do processo completo não encontrada, abortando extração."),null;const r=await this.capturePdfFromUrl(i);if(r){const c=r.size||0;if(L.info(`PDF baixado com tamanho: ${this.pjeManager.pjeUtils.formatFileSize(c)}`),c>this.MAX_PDF_SIZE){L.info(`PDF maior que ${this.MAX_PDF_SIZE}MB, extraindo texto...`);try{const h=await this.pjeManager.pjeUtils.extractTextFromPdf(r),p=new Blob([h],{type:"text/plain"});return{id:t,title:"Processo",subtitle:a||void 0,type:"txt",mimeType:"text/plain",size:p.size,url:i,extractedAt:new Date,content:p,isAutoCapture:!1}}catch(h){L.error("Erro na extração de texto do Processo Completo, retornando PDF original:",h)}}return{id:t,title:"Processo",subtitle:a||void 0,type:"pdf",mimeType:"application/pdf",size:c,url:i,extractedAt:new Date,content:r,isAutoCapture:!1}}return null}catch(t){throw L.error("Erro na extração do processo completo:",t),t}}sendExtractionResult(t,i){if(!t){L.warn("Nenhum dado de documento capturado."),this.pjeManager.sendError(Ae.EXTRACTION_ERROR,"Nenhum dado de documento capturado durante a extração do processo completo",i);return}L.info("Enviando resultado da extração do processo completo:",t),this.pjeManager.sendSuccessMessage(Ae.SINGLE_DOCUMENT_EXTRACTED,t,i)}async capturePdfFromUrl(t){if(!t)return L.warn("URL de PDF nula"),null;try{const i=await this.pjeManager.pjeUtils.download(t);if(!i)return L.warn("Falha ao baixar PDF do link direto."),null;const a=i;if(a.mimeType!=="application/pdf")throw new Error(`Tipo MIME inesperado: ${a.mimeType}`);if(!a.content||a.content.byteLength===0)throw new Error("PDF baixado está vazio");return new Blob([a.content],{type:"application/pdf"})}catch(i){return L.error("Erro ao capturar PDF da URL:",i),null}}destroy(){this.reset()}reset(){this.clearTimeout(),this.isExtracting=!1,L.detail("Estado de extração resetado")}}class dp extends lM{instances;pjeUtils;constructor(){super(Df.EXTENSION),this.instances=new Map,this.pjeUtils=new tk,this.initializeModules(),this.setupMessageListeners()}initializeModules(){const t=new ek(this),i=new nk(this),a=new ik(this);this.instances.set("currentDocument",t),this.instances.set("selectedDocuments",i),this.instances.set("fullProcess",a),L.info("PJeManager: Módulos inicializados")}setupMessageListeners(){this.onMessage(Ae.EXTRACT_VISIBLE_DOCUMENT,(t,i)=>{const a=this.instances.get("currentDocument");a&&a.handleMessage(i)}),this.onMessage(Ae.EXTRACT_SELECTED_DOCUMENTS,(t,i)=>{const a=this.instances.get("selectedDocuments");a&&a.handleMessage(i)}),this.onMessage(Ae.EXTRACT_FULL_PROCESS,(t,i)=>{const a=this.instances.get("fullProcess");a&&a.handleMessage(i)}),L.info("Listeners de mensagem registrados")}destroy(){this.instances.forEach(t=>t.destroy()),this.instances.clear(),L.info("PJeManager destruído")}}function sk(l){jD({dsn:"https://e791541eab7648b79f52682c23847181@o4509921655521280.ingest.us.sentry.io/4509928058978304",sendDefaultPii:!0,environment:l,beforeSend(t){return t.exception?.values?.[0]?.value?.includes("Extension context invalidated")?null:t}})}class ak{config=null;ui=null;pjeManager=null;initialized=!1;lastCheckedUrl=null;showUi={mapped:!1,unmapped:!1};constructor(){this.config=Xt}async start(){try{sk(this.config?.env||"unk"),this.config=Xt,L.info("Corisco iniciado",this.config),await this.checkUrlAndToggleState(),setInterval(()=>this.checkUrlAndToggleState(),500)}catch(t){L.error("Erro ao inicializar Corisco:",t)}}async checkUrlAndToggleState(t=!1){const i=window.location.href;if(i===this.lastCheckedUrl&&!t)return;if(this.lastCheckedUrl=i,!this.isHostAllowed()){L.info(`Host não permitido (${i}). Destruindo componentes se inicializados.`),this.destroy();return}const a=Rv(i);if(a&&this.showUi.mapped){L.info(`URL mapeada (${i}) e extensão habilitada. Inicializando...`),await this.initializeComponents();return}else if(!a&&this.showUi.unmapped){L.info(`URL não mapeada (${i}) e extensão habilitada. Inicializando...`),await this.initializeComponents();return}else{L.info(`URL (${i}) não atende aos critérios. Destruindo componentes se inicializados.`),this.destroy();return}}async initializeComponents(){this.initialized||(this.ui=new aM,await this.ui.init(),this.pjeManager=new dp,this.initialized=!0,L.info("Componentes da extensão inicializados com sucesso"))}destroy(){this.initialized&&(this.ui?.destroy(),this.pjeManager?.destroy(),this.initialized=!1)}isInitialized(){return L.info("Verificando estado de inicialização, retornando:",this.initialized),this.initialized}getVersion(){return L.info("Obtendo versão da aplicação, retornando:",this.config?.app.version||"unk"),this.config?.app.version||"unk"}getEnv(){return L.info("Obtendo ambiente da aplicação, retornando:",this.config?.env||"unk"),this.config?.env||"unk"}isHostAllowed(){const t=window.location.href;L.info(`Verificando se o host é permitido: ${t}`);const i=xv(t);return L.info(`Host permitido: ${i}`),i}isHostUrlMapped(){const t=window.location.href;L.info(`Verificando se a URL está mapeada: ${t}`);const i=Rv(t);return L.info(`URL mapeada: ${i}`),i}async toggleShowUi(t,i){this.showUi[t]=i,L.info(`Configuração atualizada: Mostrar UI para '${t}' = ${i}`),await this.checkUrlAndToggleState(!0)}}const hp=new ak;return typeof window<"u"&&(window.Corisco=hp),typeof globalThis<"u"&&(globalThis.Corisco=hp),hp});
320
+ `),O.info(`Conteúdo TXT capturado: ${i.length} caracteres.`),{data:i}}catch(t){return O.error("Erro ao capturar conteúdo como TXT:",t),null}}destroy(){this.observer&&(this.observer.disconnect(),this.observer=null),this.checkTimeout&&(clearTimeout(this.checkTimeout),this.checkTimeout=null)}}class tk{pjeManager;constructor(t){this.pjeManager=t}handleMessage(t){const i=t.data;i.type===oe.EXTRACT_SELECTED_DOCUMENTS&&(O.info("Mensagem de extração de documentos selecionados recebida"),this.extractAndSendSelectedDocuments(i.id))}async getSelectedDocuments(){O.info("PJe: Buscando documentos selecionados na timeline...");const t=[],i=this.pjeManager.pjeUtils.extractProcessId();if(!i)return O.warn("PJe: ID do processo não encontrado."),t;try{const a=document.querySelectorAll('mat-checkbox.mat-checkbox-checked input[type="checkbox"], input[type="checkbox"][aria-checked="true"]');if(O.info(`PJe: Encontrados ${a.length} checkboxes marcados`),a.length===0)return t;for(const r of a){const c=this.findDocumentContainer(r);if(c){O.info(`PJe: Processando container com ID: ${c.id}`);const u=await this.extractDocumentFromContainer(c,i);u&&(t.push(u),O.info(`PJe: Documento extraído: ${u.title}`))}}return t}catch(a){return O.error("PJe: Erro ao buscar documentos selecionados:",a),[]}}findDocumentContainer(t){let i=t,a=0;const r=10;for(;i&&a<r;)if(a++,i=i.parentElement,i){const c=i.classList.contains("tl-item-container")&&i.id&&i.id.startsWith("doc_"),u=i.classList.contains("tl-item-anexo")&&i.id&&i.id.startsWith("doc_");if(c||u){const h=u?"ANEXO":"DOCUMENTO";return O.info(`PJe: Container ${h} encontrado: ${i.id}`),i}}return O.warn("PJe: Container de documento/anexo não encontrado para checkbox"),null}async extractDocumentFromContainer(t,i){try{const a=t.id.match(/^doc_([a-zA-Z0-9]+)$/);if(!a||!a[1])return O.warn(`PJe: ID de documento/anexo inválido no container: ${t.id}`),null;const r=a[1],c=t.classList.contains("tl-item-anexo");let u=`${c?"Anexo":"Documento"} ${r}`,h=!1,p=r,m=r;if(c){const x=t.querySelector('a[href*="/documento/"]');if(x&&x.href){const L=x.href.match(/\/documento\/(\d+)\/conteudo/);if(L&&L[1])m=L[1],O.info(`PJe: ID numérico extraído do link do anexo: ${m}`);else return O.warn(`PJe: Não foi possível extrair ID numérico do link do anexo: ${x.href}`),null}else return O.warn(`PJe: Link de download não encontrado para anexo ${r}`),null}const g=c?[t.querySelector("a.tl-documento[aria-label]"),t.querySelector("a.tl-documento"),t.querySelector(".tl-subitem-detalhe")]:[t.querySelector("a.tl-documento"),t.querySelector('a[aria-label*="Título:"]'),t.querySelector("span:not(.sr-only)")];for(const x of g)if(x){let L=null;const k=x.getAttribute("aria-label");if(k&&!c){const U=k.match(/Título:\s*(.*)/);U&&U[1]&&(L=U[1].trim());const I=k.match(/- Id:\s*([a-zA-Z0-9]+)/);I&&I[1]?(p=I[1].trim(),h=!1):h=!0}if(L||(L=x.textContent||x.innerText),L&&L.trim()&&!L.includes("sr-only")){const U=L.match(/\(([^)]+)\)/);u=U?U[1]:L.trim(),O.info(`PJe: Nome do ${c?"anexo":"documento"} extraído: ${u}`);break}}let y=null,b="pdf",S="application/pdf",A=null;if(h&&!c){O.info("PJe: Documento Minuta detectado, capturando como TXT sem navegação");const x=await this.captureDocumentAsText(i,m);x&&(y=x,b="txt",S="text/plain",O.info(`PJe: Minuta capturada como TXT, tamanho: ${x.length} caracteres`))}else if(A=this.pjeManager.pjeUtils.buildContentUrl(i,m,"pdf"),A)try{const x=await this.pjeManager.pjeUtils.download(A);if(!x)return O.warn(`PJe: PDF não baixado corretamente de ${A}`),null;if(O.info(`PJe: PDF baixado com sucesso de ${A}`),x.content instanceof ArrayBuffer&&x.mimeType==="application/pdf")y=new Blob([x.content],{type:"application/pdf"}),b="pdf",S="application/pdf",O.info(`PJe: PDF baixado com sucesso, tamanho: ${y.size} bytes`);else throw new Error(`Tipo de conteúdo inesperado ao baixar PDF: ${x.mimeType}`)}catch(x){O.warn(`PJe: Erro ao baixar PDF ${m}, tentando capturar como TXT:`,x);const L=await this.captureDocumentAsText(i,m);L&&(y=L,b="txt",S="text/plain",O.info(`PJe: Conteúdo TXT capturado, tamanho: ${L.length} caracteres`))}else{O.warn(`PJe: URL do PDF não pode ser construída para ${m}, tentando capturar como TXT`);const x=await this.captureDocumentAsText(i,m);x&&(y=x,b="txt",S="text/plain",O.info(`PJe: Conteúdo TXT capturado, tamanho: ${x.length} caracteres`))}if(!y)return O.warn(`PJe: Não foi possível capturar conteúdo para ${c?"anexo":"documento"} ${m}`),null;const _=typeof y=="string"?y.length:y.size||void 0,R={id:p||m||crypto.randomUUID().substring(0,6),title:p||(c?"Anexo":"Minuta"),subtitle:u||void 0,type:b,mimeType:S,size:_,url:A||void 0,extractedAt:new Date,content:y,isAutoCapture:!1};return O.info(`PJe: ${c?"Anexo":"Documento"} processado como ${b.toUpperCase()}: ${u} (ID: ${R.id}, ID Numérico: ${m})`),R}catch(a){return O.error("PJe: Erro ao extrair documento/anexo do container:",a),null}}async captureDocumentAsText(t,i){try{const a=this.pjeManager.pjeUtils.buildContentUrl(t,i,"txt");if(!a)return O.warn(`PJe: URL de captura de texto não pode ser construída para ${i}`),null;O.info(`PJe: Capturando conteúdo textual do documento via API: ${a}`);const r=await fetch(a,{credentials:"include",headers:{Accept:"application/json"}});if(!r.ok)return O.error("Erro ao buscar documento via API:",r.statusText),null;const c=await r.text(),u=this.pjeManager.pjeUtils.captureTextFromJsonBase64(c);return u?(O.info(`Texto extraído com sucesso do documento ${i}`),u):(O.warn(`Nenhum texto significativo encontrado no documento ${i}`),null)}catch(a){return O.error("Erro ao capturar documento como texto:",a),null}}async extractAndSendSelectedDocuments(t){try{O.info("Iniciando extração de documentos selecionados...");const i=await this.getSelectedDocuments();if(i.length===0){this.pjeManager.sendError(oe.EXTRACTION_ERROR,"Nenhum documento selecionado encontrado",t);return}O.info(`${i.length} documentos selecionados encontrados`),this.pjeManager.sendSuccessMessage(oe.MULTIPLE_DOCUMENTS_EXTRACTED,i,t),O.info("Documentos selecionados enviados com sucesso")}catch(i){O.error("Erro ao extrair documentos selecionados:",i),this.pjeManager.sendError(oe.EXTRACTION_ERROR,`Erro ao extrair documentos selecionados: ${i.message}`,t)}}destroy(){}}class ek{pjeManager;extractionTimeout=null;TIMEOUT=6e4;MAX_PDF_SIZE=Yt.max_pdf_size*1024*1024;isExtracting=!1;constructor(t){this.pjeManager=t||new Nu}async handleMessage(t){const i=t.data;if(i.type===oe.EXTRACT_FULL_PROCESS){if(O.info("Mensagem de extração de processo completo recebida"),this.isExtracting){O.info("Extração já em andamento, ignorando nova solicitação");return}this.isExtracting=!0,this.clearTimeout();let a=!1;this.extractionTimeout=setTimeout(()=>{a=!0,O.warn("Tempo limite de extração de processo completo atingido, abortando..."),this.pjeManager.sendError(oe.EXTRACTION_ERROR,"Tempo limite de extração de processo completo atingido. Tente novamente mais tarde.",i.id)},this.TIMEOUT);try{const r=await this.extractFullProcess();!a&&this.isExtracting&&(this.clearTimeout(),this.isExtracting=!1,this.sendExtractionResult(r,i.id),O.info("Processo completo extraído com sucesso:",r))}catch(r){O.error("Erro ao extrair processo completo:",r),!a&&this.isExtracting&&(this.clearTimeout(),this.isExtracting=!1,this.pjeManager.sendError(oe.EXTRACTION_ERROR,`Erro durante extração: ${r}`,i.id))}}}clearTimeout(){this.extractionTimeout&&(clearTimeout(this.extractionTimeout),this.extractionTimeout=null,O.detail("Timeout de extração limpo"))}async extractFullProcess(){O.info("Iniciando extração do processo completo...");try{const t=this.pjeManager.pjeUtils.extractProcessId();if(!t)return O.warn("ID do processo não encontrado, abortando extração."),null;O.info("ID do processo encontrado:",t);const i=this.pjeManager.pjeUtils.buildFullProcessUrl(t),a=this.pjeManager.pjeUtils.extractProcessNumber();if(O.info("Número do processo extraído:",a),O.info("URL do processo completo:",i),!i)return O.warn("URL do processo completo não encontrada, abortando extração."),null;const r=await this.capturePdfFromUrl(i);if(r){const c=r.size||0;if(O.info(`PDF baixado com tamanho: ${this.pjeManager.pjeUtils.formatFileSize(c)}`),c>this.MAX_PDF_SIZE){O.info(`PDF maior que ${this.MAX_PDF_SIZE}MB, extraindo texto...`);try{const h=await this.pjeManager.pjeUtils.extractTextFromPdf(r),p=new Blob([h],{type:"text/plain"});return{id:t,title:"Processo",subtitle:a||void 0,type:"txt",mimeType:"text/plain",size:p.size,url:i,extractedAt:new Date,content:p,isAutoCapture:!1}}catch(h){O.error("Erro na extração de texto do Processo Completo, retornando PDF original:",h)}}return{id:t,title:"Processo",subtitle:a||void 0,type:"pdf",mimeType:"application/pdf",size:c,url:i,extractedAt:new Date,content:r,isAutoCapture:!1}}return null}catch(t){throw O.error("Erro na extração do processo completo:",t),t}}sendExtractionResult(t,i){if(!t){O.warn("Nenhum dado de documento capturado."),this.pjeManager.sendError(oe.EXTRACTION_ERROR,"Nenhum dado de documento capturado durante a extração do processo completo",i);return}O.info("Enviando resultado da extração do processo completo:",t),this.pjeManager.sendSuccessMessage(oe.SINGLE_DOCUMENT_EXTRACTED,t,i)}async capturePdfFromUrl(t){if(!t)return O.warn("URL de PDF nula"),null;try{const i=await this.pjeManager.pjeUtils.download(t);if(!i)return O.warn("Falha ao baixar PDF do link direto."),null;const a=i;if(a.mimeType!=="application/pdf")throw new Error(`Tipo MIME inesperado: ${a.mimeType}`);if(!a.content||a.content.byteLength===0)throw new Error("PDF baixado está vazio");return new Blob([a.content],{type:"application/pdf"})}catch(i){return O.error("Erro ao capturar PDF da URL:",i),null}}destroy(){this.reset()}reset(){this.clearTimeout(),this.isExtracting=!1,O.detail("Estado de extração resetado")}}class nk{pjeManager;extractionTimeout=null;TIMEOUT=6e4;isExtracting=!1;constructor(t){this.pjeManager=t||new Nu}async handleMessage(t){const i=t.data;if(i.type===oe.EXTRACT_METADATA){if(O.info("Mensagem de extração de metadados recebida"),this.isExtracting){O.info("Extração já em andamento, ignorando nova solicitação");return}this.isExtracting=!0,this.clearTimeout();let a=!1;this.extractionTimeout=setTimeout(()=>{a=!0,O.warn("Tempo limite de extração de metadados atingido, abortando..."),this.pjeManager.sendError(oe.EXTRACTION_ERROR,"Tempo limite de extração de metadados atingido. Tente novamente mais tarde.",i.id)},this.TIMEOUT);const r=window.location.href;O.detail(`URL atual para extração de metadados: ${r}`);try{let c={};/processo\/\d+\/detalhe/.test(r)&&(c=await this.extractMetadataDetalheProcesso()||{}),/painel\/global\/\d+\/lista-processos/.test(r)&&(c=await this.extractMetadataPainelListaProcessos()||{}),!a&&this.isExtracting&&(this.clearTimeout(),this.isExtracting=!1,this.sendExtractionResult(c,i.id),O.info("Metadados extraídos com sucesso:",c))}catch(c){O.error("Erro ao extrair metadados:",c),!a&&this.isExtracting&&(this.clearTimeout(),this.isExtracting=!1,this.pjeManager.sendError(oe.EXTRACTION_ERROR,`Erro durante extração: ${c}`,i.id))}}}clearTimeout(){this.extractionTimeout&&(clearTimeout(this.extractionTimeout),this.extractionTimeout=null,O.detail("Timeout de extração limpo"))}async extractMetadataDetalheProcesso(){O.info("Iniciando extração de metadados...");try{const t=this.extractNumeroProcesso(),i=this.extractVara(),a=Number(this.pjeManager.pjeUtils.extractProcessId());return{processo:t,id_processo:a,vara:i}}catch(t){throw O.error("Erro na extração do processo completo:",t),t}}extractNumeroProcesso(){let t=document.querySelector("pje-descricao-processo a span");t||(t=document.querySelector("span.numero-processo, div.numero-processo"));const i=t&&t.textContent?.trim()||null;return i?(O.detail(`Número do processo extraído: ${i}`),i):(O.warn("Número do processo não encontrado no cabeçalho."),null)}extractVara(){const t=document.querySelector("section.oj-cargo"),i=t?t.textContent?.trim():null;return i?i.split("/")[0].trim():null}async extractMetadataPainelListaProcessos(){O.info("Iniciando extração de metadados da página de lista de processos...");try{return{processos:[...document.querySelectorAll("table tbody tr span pje-descricao-processo a span")].map(a=>a.textContent?.trim()||"").filter(a=>a)}}catch(t){throw O.error("Erro na extração de metadados da página de lista de processos:",t),t}}sendExtractionResult(t,i){if(!t){O.warn("Nenhum dado de documento capturado."),this.pjeManager.sendError(oe.EXTRACTION_ERROR,"Nenhum dado de documento capturado durante a extração de metadados",i);return}O.info("Enviando resultado da extração de metadados:",t),this.pjeManager.sendSuccessMessage(oe.METADATA_EXTRACTED,t,i)}destroy(){this.reset()}reset(){this.clearTimeout(),this.isExtracting=!1,O.detail("Estado de extração resetado")}}class Nu extends rM{instances;pjeUtils;constructor(){super(Fv.EXTENSION),this.instances=new Map,this.pjeUtils=new ZO,this.initializeModules(),this.setupMessageListeners()}initializeModules(){const t=new JO(this),i=new tk(this),a=new ek(this),r=new nk(this);this.instances.set("currentDocument",t),this.instances.set("selectedDocuments",i),this.instances.set("fullProcess",a),this.instances.set("metadata",r),O.info("PJeManager: Módulos inicializados")}setupMessageListeners(){this.onMessage(oe.EXTRACT_VISIBLE_DOCUMENT,(t,i)=>{const a=this.instances.get("currentDocument");a&&a.handleMessage(i)}),this.onMessage(oe.EXTRACT_SELECTED_DOCUMENTS,(t,i)=>{const a=this.instances.get("selectedDocuments");a&&a.handleMessage(i)}),this.onMessage(oe.EXTRACT_FULL_PROCESS,(t,i)=>{const a=this.instances.get("fullProcess");a&&a.handleMessage(i)}),this.onMessage(oe.EXTRACT_METADATA,(t,i)=>{const a=this.instances.get("metadata");a&&a.handleMessage(i)}),O.info("Listeners de mensagem registrados")}destroy(){this.instances.forEach(t=>t.destroy()),this.instances.clear(),O.info("PJeManager destruído")}}function ik(l){FD({dsn:"https://e791541eab7648b79f52682c23847181@o4509921655521280.ingest.us.sentry.io/4509928058978304",sendDefaultPii:!0,environment:l,beforeSend(t){return t.exception?.values?.[0]?.value?.includes("Extension context invalidated")?null:t}})}class sk{config=null;ui=null;pjeManager=null;initialized=!1;lastCheckedUrl=null;showUi={mapped:!1,unmapped:!1};constructor(){this.config=Yt}async start(){try{ik(this.config?.env||"unk"),this.config=Yt,O.info("Corisco iniciado",this.config),await this.checkUrlAndToggleState(),setInterval(()=>this.checkUrlAndToggleState(),500)}catch(t){O.error("Erro ao inicializar Corisco:",t)}}async checkUrlAndToggleState(t=!1){const i=window.location.href;if(i===this.lastCheckedUrl&&!t)return;if(this.lastCheckedUrl=i,!this.isHostAllowed()){O.info(`Host não permitido (${i}). Destruindo componentes se inicializados.`),this.destroy();return}const a=xv(i);if(a&&this.showUi.mapped){O.info(`URL mapeada (${i}) e extensão habilitada. Inicializando...`),await this.initializeComponents();return}else if(!a&&this.showUi.unmapped){O.info(`URL não mapeada (${i}) e extensão habilitada. Inicializando...`),await this.initializeComponents();return}else{O.info(`URL (${i}) não atende aos critérios. Destruindo componentes se inicializados.`),this.destroy();return}}async initializeComponents(){this.initialized||(this.ui=new aM,await this.ui.init(),this.pjeManager=new Nu,this.initialized=!0,O.info("Componentes da extensão inicializados com sucesso"))}destroy(){this.initialized&&(this.ui?.destroy(),this.pjeManager?.destroy(),this.initialized=!1)}isInitialized(){return O.info("Verificando estado de inicialização, retornando:",this.initialized),this.initialized}getVersion(){return O.info("Obtendo versão da aplicação, retornando:",this.config?.app.version||"unk"),this.config?.app.version||"unk"}getEnv(){return O.info("Obtendo ambiente da aplicação, retornando:",this.config?.env||"unk"),this.config?.env||"unk"}isHostAllowed(){const t=window.location.href;O.info(`Verificando se o host é permitido: ${t}`);const i=wv(t);return O.info(`Host permitido: ${i}`),i}isHostUrlMapped(){const t=window.location.href;O.info(`Verificando se a URL está mapeada: ${t}`);const i=xv(t);return O.info(`URL mapeada: ${i}`),i}async toggleShowUi(t,i){this.showUi[t]=i,O.info(`Configuração atualizada: Mostrar UI para '${t}' = ${i}`),await this.checkUrlAndToggleState(!0)}}const dp=new sk;return typeof window<"u"&&(window.Corisco=dp),typeof globalThis<"u"&&(globalThis.Corisco=dp),dp});