corisco 1.3.5-hml → 1.3.6-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(ne,Xt){typeof exports=="object"&&typeof module<"u"?module.exports=Xt():typeof define=="function"&&define.amd?define(Xt):(ne=typeof globalThis<"u"?globalThis:ne||self,ne.Corisco=Xt())})(this,function(){"use strict";var Kw=ne=>{throw TypeError(ne)};var Fy=(ne,Xt,mt)=>Xt.has(ne)||Kw("Cannot "+mt);var ye=(ne,Xt,mt)=>(Fy(ne,Xt,"read from private field"),mt?mt.call(ne):Xt.get(ne)),Qi=(ne,Xt,mt)=>Xt.has(ne)?Kw("Cannot add the same private member more than once"):Xt instanceof WeakSet?Xt.add(ne):Xt.set(ne,mt),Nn=(ne,Xt,mt,Qt)=>(Fy(ne,Xt,"write to private field"),Qt?Qt.call(ne,mt):Xt.set(ne,mt),mt),Ki=(ne,Xt,mt)=>(Fy(ne,Xt,"access private method"),mt);var Zw=(ne,Xt,mt,Qt)=>({set _(Zi){Nn(ne,Xt,Zi,mt)},get _(){return ye(ne,Xt,Qt)}});var Hs,pi,is,Ra,Pu,Da,Ma,fn,kh,Jw,t1,Bc,Or,Lh;var ne=typeof document<"u"?document.currentScript:null;const Xt={app:{name:"Corisco ChatJT",version:"1.3.5",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:[0-9]+\\/.*$/"],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,metadata_capture:!1,versao_min:"2.16.3",versao_max:"999.9.9"},{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,metadata_capture:!1,versao_min:"0.0.0",versao_max:"999.9.9"},{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,metadata_capture:!1,versao_min:"0.0.0",versao_max:"2.16.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,metadata_capture:!1,versao_min:"2.16.3",versao_max:"999.9.9"},{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,metadata_capture:!0,versao_min:"0.0.0",versao_max:"999.9.9"}],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"]}}]},mt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Qt=globalThis,Zi="10.8.0";function Fc(){return jc(Qt),Qt}function jc(l){const t=l.__SENTRY__=l.__SENTRY__||{};return t.version=t.version||Zi,t[Zi]=t[Zi]||{}}function Uo(l,t,i=Qt){const a=i.__SENTRY__=i.__SENTRY__||{},r=a[Zi]=a[Zi]||{};return r[l]||(r[l]=t())}const e1=["debug","info","warn","error","log","assert","trace"],n1="Sentry Logger ",$c={};function pr(l){if(!("console"in Qt))return l();const t=Qt.console,i={},a=Object.keys($c);a.forEach(r=>{const c=$c[r];i[r]=t[r],t[r]=c});try{return l()}finally{a.forEach(r=>{t[r]=i[r]})}}function i1(){Ph().enabled=!0}function s1(){Ph().enabled=!1}function jy(){return Ph().enabled}function a1(...l){Ih("log",...l)}function r1(...l){Ih("warn",...l)}function o1(...l){Ih("error",...l)}function Ih(l,...t){mt&&jy()&&pr(()=>{Qt.console[l](`${n1}[${l}]:`,...t)})}function Ph(){return mt?Uo("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const Tt={enable:i1,disable:s1,isEnabled:jy,log:a1,warn:r1,error:o1},$y=50,va="?",Gy=/\(error: (.*)\)/,Vy=/captureMessage|captureException/;function qy(...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=Gy.test(p)?p.replace(Gy,"$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>=$y+r)break}}return c1(c.slice(r))}}function l1(l){return Array.isArray(l)?qy(...l):l}function c1(l){if(!l.length)return[];const t=Array.from(l);return/sentryWrapped/.test(Gc(t).function||"")&&t.pop(),t.reverse(),Vy.test(Gc(t).function||"")&&(t.pop(),Vy.test(Gc(t).function||"")&&t.pop()),t.slice(0,$y).map(i=>({...i,filename:i.filename||Gc(t).filename,function:i.function||va}))}function Gc(l){return l[l.length-1]||{}}const Uh="<anonymous>";function Os(l){try{return!l||typeof l!="function"?Uh:l.name||Uh}catch{return Uh}}function Yy(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 Vc={},Xy={};function qc(l,t){Vc[l]=Vc[l]||[],Vc[l].push(t)}function Yc(l,t){if(!Xy[l]){Xy[l]=!0;try{t()}catch(i){mt&&Tt.error(`Error while instrumenting ${l}`,i)}}}function mr(l,t){const i=l&&Vc[l];if(i)for(const a of i)try{a(t)}catch(r){mt&&Tt.error(`Error while triggering instrumentation handler.
1
+ (function(ne,Xt){typeof exports=="object"&&typeof module<"u"?module.exports=Xt():typeof define=="function"&&define.amd?define(Xt):(ne=typeof globalThis<"u"?globalThis:ne||self,ne.Corisco=Xt())})(this,function(){"use strict";var K1=ne=>{throw TypeError(ne)};var jy=(ne,Xt,mt)=>Xt.has(ne)||K1("Cannot "+mt);var ye=(ne,Xt,mt)=>(jy(ne,Xt,"read from private field"),mt?mt.call(ne):Xt.get(ne)),Qi=(ne,Xt,mt)=>Xt.has(ne)?K1("Cannot add the same private member more than once"):Xt instanceof WeakSet?Xt.add(ne):Xt.set(ne,mt),Nn=(ne,Xt,mt,Qt)=>(jy(ne,Xt,"write to private field"),Qt?Qt.call(ne,mt):Xt.set(ne,mt),mt),Ki=(ne,Xt,mt)=>(jy(ne,Xt,"access private method"),mt);var Z1=(ne,Xt,mt,Qt)=>({set _(Zi){Nn(ne,Xt,Zi,mt)},get _(){return ye(ne,Xt,Qt)}});var Hs,pi,is,Ra,Pu,Da,Ma,fn,kh,J1,tw,Bc,Or,Lh;var ne=typeof document<"u"?document.currentScript:null;const Xt={app:{name:"Corisco ChatJT",version:"1.3.6",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:[0-9]+\\/.*$/"],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,metadata_capture:!1,versao_min:"0.0.0",versao_max:"999.9.9"},{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,metadata_capture:!1,versao_min:"0.0.0",versao_max:"999.9.9"},{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,metadata_capture:!1,versao_min:"0.0.0",versao_max:"999.9.9"},{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,metadata_capture:!0,versao_min:"0.0.0",versao_max:"999.9.9"}],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"]}}]},mt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Qt=globalThis,Zi="10.8.0";function jc(){return Fc(Qt),Qt}function Fc(l){const t=l.__SENTRY__=l.__SENTRY__||{};return t.version=t.version||Zi,t[Zi]=t[Zi]||{}}function Uo(l,t,i=Qt){const a=i.__SENTRY__=i.__SENTRY__||{},r=a[Zi]=a[Zi]||{};return r[l]||(r[l]=t())}const ew=["debug","info","warn","error","log","assert","trace"],nw="Sentry Logger ",$c={};function pr(l){if(!("console"in Qt))return l();const t=Qt.console,i={},a=Object.keys($c);a.forEach(r=>{const c=$c[r];i[r]=t[r],t[r]=c});try{return l()}finally{a.forEach(r=>{t[r]=i[r]})}}function iw(){Ph().enabled=!0}function sw(){Ph().enabled=!1}function Fy(){return Ph().enabled}function aw(...l){Ih("log",...l)}function rw(...l){Ih("warn",...l)}function ow(...l){Ih("error",...l)}function Ih(l,...t){mt&&Fy()&&pr(()=>{Qt.console[l](`${nw}[${l}]:`,...t)})}function Ph(){return mt?Uo("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const Tt={enable:iw,disable:sw,isEnabled:Fy,log:aw,warn:rw,error:ow},$y=50,va="?",Gy=/\(error: (.*)\)/,Vy=/captureMessage|captureException/;function qy(...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=Gy.test(p)?p.replace(Gy,"$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>=$y+r)break}}return cw(c.slice(r))}}function lw(l){return Array.isArray(l)?qy(...l):l}function cw(l){if(!l.length)return[];const t=Array.from(l);return/sentryWrapped/.test(Gc(t).function||"")&&t.pop(),t.reverse(),Vy.test(Gc(t).function||"")&&(t.pop(),Vy.test(Gc(t).function||"")&&t.pop()),t.slice(0,$y).map(i=>({...i,filename:i.filename||Gc(t).filename,function:i.function||va}))}function Gc(l){return l[l.length-1]||{}}const Uh="<anonymous>";function Os(l){try{return!l||typeof l!="function"?Uh:l.name||Uh}catch{return Uh}}function Yy(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 Vc={},Xy={};function qc(l,t){Vc[l]=Vc[l]||[],Vc[l].push(t)}function Yc(l,t){if(!Xy[l]){Xy[l]=!0;try{t()}catch(i){mt&&Tt.error(`Error while instrumenting ${l}`,i)}}}function mr(l,t){const i=l&&Vc[l];if(i)for(const a of i)try{a(t)}catch(r){mt&&Tt.error(`Error while triggering instrumentation handler.
3
3
  Type: ${l}
4
4
  Name: ${Os(a)}
5
- Error:`,r)}}let zh=null;function u1(l){const t="error";qc(t,l),Yc(t,d1)}function d1(){zh=Qt.onerror,Qt.onerror=function(l,t,i,a,r){return mr("error",{column:a,error:r,line:i,msg:l,url:t}),zh?zh.apply(this,arguments):!1},Qt.onerror.__SENTRY_INSTRUMENTED__=!0}let Hh=null;function h1(l){const t="unhandledrejection";qc(t,l),Yc(t,f1)}function f1(){Hh=Qt.onunhandledrejection,Qt.onunhandledrejection=function(l){return mr("unhandledrejection",l),Hh?Hh.apply(this,arguments):!0},Qt.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const Wy=Object.prototype.toString;function Bh(l){switch(Wy.call(l)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Ns(l,Error)}}function gr(l,t){return Wy.call(l)===`[object ${t}]`}function Qy(l){return gr(l,"ErrorEvent")}function Ky(l){return gr(l,"DOMError")}function p1(l){return gr(l,"DOMException")}function zo(l){return gr(l,"String")}function Fh(l){return typeof l=="object"&&l!==null&&"__sentry_template_string__"in l&&"__sentry_template_values__"in l}function jh(l){return l===null||Fh(l)||typeof l!="object"&&typeof l!="function"}function Ho(l){return gr(l,"Object")}function Xc(l){return typeof Event<"u"&&Ns(l,Event)}function m1(l){return typeof Element<"u"&&Ns(l,Element)}function g1(l){return gr(l,"RegExp")}function Wc(l){return!!(l?.then&&typeof l.then=="function")}function y1(l){return Ho(l)&&"nativeEvent"in l&&"preventDefault"in l&&"stopPropagation"in l}function Ns(l,t){try{return l instanceof t}catch{return!1}}function Zy(l){return!!(typeof l=="object"&&l!==null&&(l.__isVue||l._isVue))}function b1(l){return typeof Request<"u"&&Ns(l,Request)}const $h=Qt,v1=80;function Jy(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($h.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&&zo(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 Gh(){try{return $h.document.location.href}catch{return""}}function E1(l){if(!$h.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 Qc(l,t=0){return typeof l!="string"||t===0||l.length<=t?l:`${l.slice(0,t)}...`}function tb(l,t){if(!Array.isArray(l))return"";const i=[];for(let a=0;a<l.length;a++){const r=l[a];try{Zy(r)?i.push("[VueViewModel]"):i.push(String(r))}catch{i.push("[value cannot be serialized]")}}return i.join(t)}function Kc(l,t,i=!1){return zo(l)?g1(t)?t.test(l):zo(t)?i?l===t:l.includes(t):!1:!1}function Zc(l,t=[],i=!1){return t.some(a=>Kc(l,a,i))}function Ji(l,t,i){if(!(t in l))return;const a=l[t];if(typeof a!="function")return;const r=i(a);typeof r=="function"&&eb(r,a);try{l[t]=r}catch{mt&&Tt.log(`Failed to replace method "${t}" in object`,l)}}function Bo(l,t,i){try{Object.defineProperty(l,t,{value:i,writable:!0,configurable:!0})}catch{mt&&Tt.log(`Failed to add non-enumerable property "${t}" to object`,l)}}function eb(l,t){try{const i=t.prototype||{};l.prototype=t.prototype=i,Bo(l,"__sentry_original__",t)}catch{}}function Vh(l){return l.__sentry_original__}function nb(l){if(Bh(l))return{message:l.message,name:l.name,stack:l.stack,...sb(l)};if(Xc(l)){const t={type:l.type,target:ib(l.target),currentTarget:ib(l.currentTarget),...sb(l)};return typeof CustomEvent<"u"&&Ns(l,CustomEvent)&&(t.detail=l.detail),t}else return l}function ib(l){try{return m1(l)?Jy(l):Object.prototype.toString.call(l)}catch{return"<unknown>"}}function sb(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(nb(l));i.sort();const a=i[0];if(!a)return"[object has no keys]";if(a.length>=t)return Qc(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:Qc(c,t)}return""}function _1(){const l=Qt;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 ab(l){return l.exception?.values?.[0]}function Sa(l){const{message:t,event_id:i}=l;if(t)return t;const a=ab(l);return a?a.type&&a.value?`${a.type}: ${a.value}`:a.type||a.value||i||"<unknown>":i||"<unknown>"}function qh(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=ab(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 rb(l){if(T1(l))return!0;try{Bo(l,"__sentry_captured__",!0)}catch{}return!1}function T1(l){try{return l.__sentry_captured__}catch{}}const ob=1e3;function Fo(){return Date.now()/ob}function w1(){const{performance:l}=Qt;if(!l?.now||!l.timeOrigin)return Fo;const t=l.timeOrigin;return()=>(t+l.now())/ob}let lb;function br(){return(lb??(lb=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 jo(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]=jo(a[r],t[r],i-1));return a}function cb(){return fi()}function ub(){return fi().substring(16)}const Yh="_sentrySpan";function db(l,t){t?Bo(l,Yh,t):delete l[Yh]}function hb(l){return l[Yh]}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:cb(),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,db(t,hb(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():Ho(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,db(this,void 0),this._attachments=[],this.setPropagationContext({traceId:cb(),sampleRand:Math.random()}),this._notifyScopeListeners(),this}addBreadcrumb(t,i){const a=typeof i=="number"?i:D1;if(a<=0)return this;const r={timestamp:Fo(),...t,message:t.message?Qc(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:hb(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=jo(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 mt&&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 mt&&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):(mt&&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 Uo("defaultCurrentScope",()=>new xi)}function O1(){return Uo("defaultIsolationScope",()=>new xi)}class N1{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 Wc(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=Fc(),t=jc(l);return t.stack=t.stack||new N1(M1(),O1())}function k1(l){return Sr().withScope(l)}function L1(l,t){const i=Sr();return i.withScope(()=>(i.getStackTop().scope=l,t(l)))}function fb(l){return Sr().withScope(()=>l(Sr().getIsolationScope()))}function I1(){return{withIsolationScope:fb,withScope:k1,withSetScope:L1,withSetIsolationScope:(l,t)=>fb(t),getCurrentScope:()=>Sr().getScope(),getIsolationScope:()=>Sr().getIsolationScope()}}function Xh(l){const t=jc(l);return t.acs?t.acs:I1()}function ks(){const l=Fc();return Xh(l).getCurrentScope()}function $o(){const l=Fc();return Xh(l).getIsolationScope()}function P1(){return Uo("globalScope",()=>new xi)}function U1(...l){const t=Fc(),i=Xh(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||ub()};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",pb="sentry.profile_id",mb="sentry.exclusive_time",G1=0,V1=1,q1="_sentryScope",Y1="_sentryIsolationScope";function gb(l){return{scope:l[q1],isolationScope:l[Y1]}}const X1="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(X1.length);a[u]=c}return a},{});if(Object.keys(i).length>0)return i}function K1(l){if(!(!l||!zo(l)&&!Array.isArray(l)))return Array.isArray(l)?l.reduce((t,i)=>{const a=yb(i);return Object.entries(a).forEach(([r,c])=>{t[r]=c}),t},{}):yb(l)}function yb(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 Jc(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 bb({host:c,pass:r,path:p,projectId:m,port:u,protocol:i,publicKey:a})}function bb(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(!mt)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):bb(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 vb=1;let Sb=!1;function ox(l){const{spanId:t,traceId:i,isRemote:a}=l.spanContext(),r=a?t:Wh(l).parent_span_id,c=gb(l).scope,u=a?c?.getPropagationContext().propagationSpanId||ub():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===vb,attributes:c,...r}))}function Eb(l){return typeof l=="number"?Ab(l):Array.isArray(l)?l[0]+l[1]/1e9:l instanceof Date?Ab(l.getTime()):br()}function Ab(l){return l>9999999999?l/1e3:l}function Wh(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:Eb(r),timestamp:Eb(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===vb}function hx(l){if(!(!l||l.code===G1))return l.code===V1?"ok":l.message||"unknown_error"}const fx="_sentryRootSpan";function _b(l){return l[fx]||l}function Tb(){Sb||(pr(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly.")}),Sb=!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 Qh="production",mx="_frozenDsc";function wb(l,t){const i=t.getOptions(),{publicKey:a}=t.getDsn()||{},r={environment:i.environment||Qh,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||wb(i.traceId,l)}function yx(l){const t=ln();if(!t)return{};const i=_b(l),a=Wh(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=wb(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")??gb(i).scope?.getPropagationContext().sampleRand.toString()),h(y),t.emit("createDsc",y,i),y}function ts(l,t=100,i=1/0){try{return Kh("",l,t,i)}catch(a){return{ERROR:`**non-serializable** (${a})`}}}function xb(l,t=3,i=100*1024){const a=ts(l,t);return Ex(a)>i?xb(l,t-1,i):a}function Kh(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 Kh("",S,p-1,a,r)}catch{}const g=Array.isArray(t)?[]:{};let y=0;const b=nb(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]=Kh(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(Zy(t))return"[VueViewModel]";if(y1(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${Os(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 Go(l,t=[]){return[l,t]}function _x(l,t){const[i,a]=l;return[i,[...a,t]]}function Cb(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 Zh(l){const t=jc(Qt);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:[Zh(a),c]:a.push(typeof c=="string"?Zh(c):c)}for(const c of i){const[u,h]=c;if(r(`
5
+ Error:`,r)}}let zh=null;function uw(l){const t="error";qc(t,l),Yc(t,dw)}function dw(){zh=Qt.onerror,Qt.onerror=function(l,t,i,a,r){return mr("error",{column:a,error:r,line:i,msg:l,url:t}),zh?zh.apply(this,arguments):!1},Qt.onerror.__SENTRY_INSTRUMENTED__=!0}let Hh=null;function hw(l){const t="unhandledrejection";qc(t,l),Yc(t,fw)}function fw(){Hh=Qt.onunhandledrejection,Qt.onunhandledrejection=function(l){return mr("unhandledrejection",l),Hh?Hh.apply(this,arguments):!0},Qt.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const Wy=Object.prototype.toString;function Bh(l){switch(Wy.call(l)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Ns(l,Error)}}function gr(l,t){return Wy.call(l)===`[object ${t}]`}function Qy(l){return gr(l,"ErrorEvent")}function Ky(l){return gr(l,"DOMError")}function pw(l){return gr(l,"DOMException")}function zo(l){return gr(l,"String")}function jh(l){return typeof l=="object"&&l!==null&&"__sentry_template_string__"in l&&"__sentry_template_values__"in l}function Fh(l){return l===null||jh(l)||typeof l!="object"&&typeof l!="function"}function Ho(l){return gr(l,"Object")}function Xc(l){return typeof Event<"u"&&Ns(l,Event)}function mw(l){return typeof Element<"u"&&Ns(l,Element)}function gw(l){return gr(l,"RegExp")}function Wc(l){return!!(l?.then&&typeof l.then=="function")}function yw(l){return Ho(l)&&"nativeEvent"in l&&"preventDefault"in l&&"stopPropagation"in l}function Ns(l,t){try{return l instanceof t}catch{return!1}}function Zy(l){return!!(typeof l=="object"&&l!==null&&(l.__isVue||l._isVue))}function bw(l){return typeof Request<"u"&&Ns(l,Request)}const $h=Qt,vw=80;function Jy(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||vw;for(;i&&c++<a&&(m=Sw(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 Sw(l,t){const i=l,a=[];if(!i?.tagName)return"";if($h.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&&zo(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 Gh(){try{return $h.document.location.href}catch{return""}}function Ew(l){if(!$h.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 Qc(l,t=0){return typeof l!="string"||t===0||l.length<=t?l:`${l.slice(0,t)}...`}function tb(l,t){if(!Array.isArray(l))return"";const i=[];for(let a=0;a<l.length;a++){const r=l[a];try{Zy(r)?i.push("[VueViewModel]"):i.push(String(r))}catch{i.push("[value cannot be serialized]")}}return i.join(t)}function Kc(l,t,i=!1){return zo(l)?gw(t)?t.test(l):zo(t)?i?l===t:l.includes(t):!1:!1}function Zc(l,t=[],i=!1){return t.some(a=>Kc(l,a,i))}function Ji(l,t,i){if(!(t in l))return;const a=l[t];if(typeof a!="function")return;const r=i(a);typeof r=="function"&&eb(r,a);try{l[t]=r}catch{mt&&Tt.log(`Failed to replace method "${t}" in object`,l)}}function Bo(l,t,i){try{Object.defineProperty(l,t,{value:i,writable:!0,configurable:!0})}catch{mt&&Tt.log(`Failed to add non-enumerable property "${t}" to object`,l)}}function eb(l,t){try{const i=t.prototype||{};l.prototype=t.prototype=i,Bo(l,"__sentry_original__",t)}catch{}}function Vh(l){return l.__sentry_original__}function nb(l){if(Bh(l))return{message:l.message,name:l.name,stack:l.stack,...sb(l)};if(Xc(l)){const t={type:l.type,target:ib(l.target),currentTarget:ib(l.currentTarget),...sb(l)};return typeof CustomEvent<"u"&&Ns(l,CustomEvent)&&(t.detail=l.detail),t}else return l}function ib(l){try{return mw(l)?Jy(l):Object.prototype.toString.call(l)}catch{return"<unknown>"}}function sb(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 Aw(l,t=40){const i=Object.keys(nb(l));i.sort();const a=i[0];if(!a)return"[object has no keys]";if(a.length>=t)return Qc(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:Qc(c,t)}return""}function _w(){const l=Qt;return l.crypto||l.msCrypto}function fi(l=_w()){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 ab(l){return l.exception?.values?.[0]}function Sa(l){const{message:t,event_id:i}=l;if(t)return t;const a=ab(l);return a?a.type&&a.value?`${a.type}: ${a.value}`:a.type||a.value||i||"<unknown>":i||"<unknown>"}function qh(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=ab(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 rb(l){if(Tw(l))return!0;try{Bo(l,"__sentry_captured__",!0)}catch{}return!1}function Tw(l){try{return l.__sentry_captured__}catch{}}const ob=1e3;function jo(){return Date.now()/ob}function ww(){const{performance:l}=Qt;if(!l?.now||!l.timeOrigin)return jo;const t=l.timeOrigin;return()=>(t+l.now())/ob}let lb;function br(){return(lb??(lb=ww()))()}function xw(l){const t=br(),i={sid:fi(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>Rw(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 Cw(l,t){let i={};l.status==="ok"&&(i={status:"exited"}),vr(l,i)}function Rw(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 cb(){return fi()}function ub(){return fi().substring(16)}const Yh="_sentrySpan";function db(l,t){t?Bo(l,Yh,t):delete l[Yh]}function hb(l){return l[Yh]}const Dw=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:cb(),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,db(t,hb(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():Ho(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,db(this,void 0),this._attachments=[],this.setPropagationContext({traceId:cb(),sampleRand:Math.random()}),this._notifyScopeListeners(),this}addBreadcrumb(t,i){const a=typeof i=="number"?i:Dw;if(a<=0)return this;const r={timestamp:jo(),...t,message:t.message?Qc(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:hb(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 mt&&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 mt&&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):(mt&&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 Mw(){return Uo("defaultCurrentScope",()=>new xi)}function Ow(){return Uo("defaultIsolationScope",()=>new xi)}class Nw{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 Wc(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=jc(),t=Fc(l);return t.stack=t.stack||new Nw(Mw(),Ow())}function kw(l){return Sr().withScope(l)}function Lw(l,t){const i=Sr();return i.withScope(()=>(i.getStackTop().scope=l,t(l)))}function fb(l){return Sr().withScope(()=>l(Sr().getIsolationScope()))}function Iw(){return{withIsolationScope:fb,withScope:kw,withSetScope:Lw,withSetIsolationScope:(l,t)=>fb(t),getCurrentScope:()=>Sr().getScope(),getIsolationScope:()=>Sr().getIsolationScope()}}function Xh(l){const t=Fc(l);return t.acs?t.acs:Iw()}function ks(){const l=jc();return Xh(l).getCurrentScope()}function $o(){const l=jc();return Xh(l).getIsolationScope()}function Pw(){return Uo("globalScope",()=>new xi)}function Uw(...l){const t=jc(),i=Xh(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 zw(l){const t=l.getPropagationContext(),{traceId:i,parentSpanId:a,propagationSpanId:r}=t,c={trace_id:i,span_id:r||ub()};return a&&(c.parent_span_id=a),c}const Hw="sentry.source",Bw="sentry.sample_rate",jw="sentry.previous_trace_sample_rate",Fw="sentry.op",$w="sentry.origin",pb="sentry.profile_id",mb="sentry.exclusive_time",Gw=0,Vw=1,qw="_sentryScope",Yw="_sentryIsolationScope";function gb(l){return{scope:l[qw],isolationScope:l[Yw]}}const Xw="sentry-",Ww=/^sentry-/;function Qw(l){const t=Kw(l);if(!t)return;const i=Object.entries(t).reduce((a,[r,c])=>{if(r.match(Ww)){const u=r.slice(Xw.length);a[u]=c}return a},{});if(Object.keys(i).length>0)return i}function Kw(l){if(!(!l||!zo(l)&&!Array.isArray(l)))return Array.isArray(l)?l.reduce((t,i)=>{const a=yb(i);return Object.entries(a).forEach(([r,c])=>{t[r]=c}),t},{}):yb(l)}function yb(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 Zw=/^o(\d+)\./,Jw=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function tx(l){return l==="http"||l==="https"}function Jc(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=Jw.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 bb({host:c,pass:r,path:p,projectId:m,port:u,protocol:i,publicKey:a})}function bb(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(!mt)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(Zw)?.[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):bb(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 vb=1;let Sb=!1;function ox(l){const{spanId:t,traceId:i,isRemote:a}=l.spanContext(),r=a?t:Wh(l).parent_span_id,c=gb(l).scope,u=a?c?.getPropagationContext().propagationSpanId||ub():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===vb,attributes:c,...r}))}function Eb(l){return typeof l=="number"?Ab(l):Array.isArray(l)?l[0]+l[1]/1e9:l instanceof Date?Ab(l.getTime()):br()}function Ab(l){return l>9999999999?l/1e3:l}function Wh(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:Eb(r),timestamp:Eb(u)||void 0,status:hx(h),op:a[Fw],origin:a[$w],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===vb}function hx(l){if(!(!l||l.code===Gw))return l.code===Vw?"ok":l.message||"unknown_error"}const fx="_sentryRootSpan";function _b(l){return l[fx]||l}function Tb(){Sb||(pr(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly.")}),Sb=!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 Qh="production",mx="_frozenDsc";function wb(l,t){const i=t.getOptions(),{publicKey:a}=t.getDsn()||{},r={environment:i.environment||Qh,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||wb(i.traceId,l)}function yx(l){const t=ln();if(!t)return{};const i=_b(l),a=Wh(i),r=a.data,c=i.spanContext().traceState,u=c?.get("sentry.sample_rate")??r[Bw]??r[jw];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&&Qw(m);if(g)return h(g);const y=wb(l.spanContext().traceId,t),b=r[Hw],S=a.description;return b!=="url"&&S&&(y.transaction=S),px()&&(y.sampled=String(dx(i)),y.sample_rand=c?.get("sentry.sample_rand")??gb(i).scope?.getPropagationContext().sampleRand.toString()),h(y),t.emit("createDsc",y,i),y}function ts(l,t=100,i=1/0){try{return Kh("",l,t,i)}catch(a){return{ERROR:`**non-serializable** (${a})`}}}function xb(l,t=3,i=100*1024){const a=ts(l,t);return Ex(a)>i?xb(l,t-1,i):a}function Kh(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 Kh("",S,p-1,a,r)}catch{}const g=Array.isArray(t)?[]:{};let y=0;const b=nb(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]=Kh(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(Zy(t))return"[VueViewModel]";if(yw(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${Os(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 Go(l,t=[]){return[l,t]}function _x(l,t){const[i,a]=l;return[i,[...a,t]]}function Cb(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 Zh(l){const t=Fc(Qt);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:[Zh(a),c]:a.push(typeof c=="string"?Zh(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(ts(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"?Zh(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 Rb(l){return Cx[l]}function Db(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:Jc(a)},...r&&{trace:r}}}function Mb(l,t){if(!t?.length||!l.description)return!1;for(const i of t){if(Mx(i)){if(Kc(l.description,i))return!0;continue}if(!i.name&&!i.op)continue;const a=i.name?Kc(l.description,i.name):!0,r=i.op?l.op&&Kc(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 Nx(l,t,i,a){const r=Db(i),c={sent_at:new Date().toISOString(),...r&&{sdk:r},...!!a&&t&&{dsn:Jc(t)}},u="aggregates"in l?[{type:"sessions"},l]:[{type:"session"},l.toJSON()];return Go(c,[u])}function kx(l,t,i,a){const r=Db(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,Go(u,[[{type:c},l]])}const Jh=0,Ob=1,Nb=2;function Ea(l){return new Ls(t=>{t(l)})}function tu(l){return new Ls((t,i)=>{i(l)})}class Ls{constructor(t){this._state=Jh,this._handlers=[],this._runExecutor(t)}then(t,i){return new Ls((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 Ls((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===Jh)return;const t=this._handlers.slice();this._handlers=[],t.forEach(i=>{i[0]||(this._state===Ob&&i[1](this._value),this._state===Nb&&i[2](this._value),i[0]=!0)})}_runExecutor(t){const i=(c,u)=>{if(this._state===Jh){if(Wc(u)){u.then(a,r);return}this._state=c,this._value=u,this._executeHandlers()}},a=c=>{i(Ob,c)},r=c=>{i(Nb,c)};try{t(a,r)}catch(c){r(c)}}}function tf(l,t,i,a=0){return new Ls((r,c)=>{const u=l[a];if(t===null||typeof u!="function")r(t);else{const h=u({...t},i);mt&&u.id&&h===null&&Tt.log(`Event processor "${u.id}" dropped event`),Wc(h)?h.then(p=>tf(l,p,i,a+1).then(r)).then(null,c):tf(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 kb(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;eu(l,"extra",i),eu(l,"tags",a),eu(l,"user",r),eu(l,"contexts",c),l.sdkProcessingMetadata=jo(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 eu(l,t,i){l[t]=jo(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=_b(t),a=Wh(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 nu,Lb,iu;function Bx(l){const t=Qt._sentryDebugIds;if(!t)return{};const i=Object.keys(t);return iu&&i.length===Lb||(Lb=i.length,iu=i.reduce((a,r)=>{nu||(nu={});const c=nu[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,nu[r]=[m,g];break}}}return a},{})),iu}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||Fo()},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=Yx(a,i.captureContext);i.mechanism&&yr(p,i.mechanism);const y=r?r.getEventProcessors():[],b=P1().getScopeData();if(c){const R=c.getScopeData();kb(b,R)}if(g){const R=g.getScopeData();kb(b,R)}const S=[...i.attachments||[],...b.attachments];S.length&&(i.attachments=S),Lx(p,b);const A=[...y,...b.eventProcessors];return tf(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||Qh,!l.release&&a&&(l.release=a),!l.dist&&r&&(l.dist=r);const u=l.request;u?.url&&(u.url=Qc(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:ts(r.data,t,i)}}))},...l.user&&{user:ts(l.user,t,i)},...l.contexts&&{contexts:ts(l.contexts,t,i)},...l.extra&&{extra:ts(l.extra,t,i)}};return l.contexts?.trace&&a.contexts&&(a.contexts.trace=l.contexts.trace,l.contexts.trace.data&&(a.contexts.trace.data=ts(l.contexts.trace.data,t,i))),l.spans&&(a.spans=l.spans.map(r=>({...r,...r.data&&{data:ts(r.data,t,i)}}))),l.contexts?.flags&&a.contexts&&(a.contexts.flags=ts(l.contexts.flags,3,i)),a}function Yx(l,t){if(!t)return l;const i=l?l.clone():new xi;return i.update(t),i}function Xx(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 Ib(l,t){return ks().captureException(l,Xx(t))}function Pb(l,t){return ks().captureEvent(l,t)}function Ub(l){const t=$o(),i=ks(),{userAgent:a}=Qt.navigator||{},r=x1({user:i.getUser()||t.getUser(),...a&&{userAgent:a},...l}),c=t.getSession();return c?.status==="ok"&&vr(c,{status:"exited"}),zb(),t.setSession(r),r}function zb(){const l=$o(),i=ks().getSession()||l.getSession();i&&C1(i),Hb(),l.setSession()}function Hb(){const l=$o(),t=ln(),i=l.getSession();i&&t&&t.captureSession(i)}function Bb(l=!1){if(l){zb();return}Hb()}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 Fb=[];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&&$b(l,a,i)}),i}function jb(l,t){for(const i of t)i?.afterAllSetup&&i.afterAllSetup(l)}function $b(l,t,i){if(i[t.name]){mt&&Tt.log(`Integration skipped because it was already installed: ${t.name}`);return}if(i[t.name]=t,Fb.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),Fb.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)}mt&&Tt.log(`Integration installed: ${t.name}`)}function DI(l){return l}function rC(l,t,i){const a=[{type:"client_report"},{timestamp:Fo(),discarded_events:l}];return Go(t?{dsn:t}:{},[a])}function Gb(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?.[pb],exclusive_time:u?.[mb],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&&{[pb]:l.profile_id},...l.exclusive_time&&{[mb]:l.exclusive_time}}}},measurements:l.measurements}}const Vb="Not capturing exception because it's already been captured.",qb="Discarded session because of missing or non-string release",Yb=Symbol.for("SentryInternalError"),Xb=Symbol.for("SentryDoNotSendEventError");function su(l){return{message:l,[Yb]:!0}}function ef(l){return{message:l,[Xb]:!0}}function Wb(l){return!!l&&typeof l=="object"&&Yb in l}function Qb(l){return!!l&&typeof l=="object"&&Xb 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):mt&&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(rb(t))return mt&&Tt.log(Vb),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=Fh(t)?t:String(t),h=jh(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&&rb(i.originalException))return mt&&Tt.log(Vb),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))):Ea(!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];$b(this,t,this._integrations),i||jb(this,[t])}sendEvent(t,i={}){this.emit("beforeSendEvent",t,i);let a=kx(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=Qh}=this._options;if("aggregates"in t){const c=t.attrs||{};if(!c.release&&!i){mt&&Tt.warn(qb);return}c.release=c.release||i,c.environment=c.environment||a,t.attrs=c}else{if(!t.release&&!i){mt&&Tt.warn(qb);return}t.release=t.release||i,t.environment=t.environment||a}this.emit("beforeSendSession",t);const r=Nx(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}`;mt&&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=>(mt&&Tt.error("Error while sending envelope:",i),i)):(mt&&Tt.error("Transport disabled"),Ea({}))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=aC(this,t),jb(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 Ls(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=$o()){return mt&&nf(t)&&Tt.log(`Captured error event \`${Gb(t)[0]||"<unknown>"}\``),this._processEvent(t,i,a,r).then(c=>c.event_id,c=>{mt&&(Qb(c)?Tt.log(c.message):Wb(c)?Tt.warn(c.message):Tt.warn(c))})}_processEvent(t,i,a,r){const c=this.getOptions(),{sampleRate:u}=c,h=Kb(t),p=nf(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"),tu(ef(`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),ef("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 ef(`${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 Qb(S)||Wb(S)?S:(this.captureException(S,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:S}),su(`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(){mt&&Tt.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){mt&&Tt.log("No outcomes to send");return}if(!this._dsn){mt&&Tt.log("No dsn provided, will not send outcomes");return}mt&&Tt.log("Sending outcomes:",t);const i=rC(t,this._options.tunnel&&Jc(this._dsn));this.sendEnvelope(i)}}function uC(l,t){const i=`${t} must return \`null\` or a valid event.`;if(Wc(l))return l.then(a=>{if(!Ho(a)&&a!==null)throw su(i);return a},a=>{throw su(`${t} rejected with ${a}`)});if(!Ho(l)&&l!==null)throw su(i);return l}function dC(l,t,i,a){const{beforeSend:r,beforeSendTransaction:c,beforeSendSpan:u,ignoreSpans:h}=t;let p=i;if(nf(p)&&r)return r(p,a);if(Kb(p)){if(u||h){const m=oC(p);if(h?.length&&Mb(m,h))return null;if(u){const g=u(m);g?p=jo(i,lC(g)):Tb()}if(p.spans){const g=[],y=p.spans;for(const S of y){if(h?.length&&Mb(S,h)){Dx(y,S);continue}if(u){const A=u(S);A?g.push(A):(Tb(),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 nf(l){return l.type===void 0}function Kb(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=Jc(a)),Go(r,[hC(l)])}function sf(l,t){const i=pC(l)??[];if(i.length===0)return;const a=l.getOptions(),r=fC(i,a._metadata,a.tunnel,l.getDsn());Zb().set(l,[]),l.emit("flushLogs"),l.sendEnvelope(r)}function pC(l){return Zb().get(l)}function Zb(){return Uo("clientToLogBufferMap",()=>new WeakMap)}function mC(l,t){t.debug===!0&&(mt?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 Jb=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 tu(Jb);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 Ls((h,p)=>{let m=t.length;if(!m)return h(!0);const g=setTimeout(()=>{u&&u>0&&h(!1)},u);t.forEach(y=>{Ea(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(Cb(u,(y,b)=>{const S=Rb(b);EC(a,S)?l.recordDroppedEvent("ratelimit_backoff",S):h.push(y)}),h.length===0)return Ea({});const p=Go(u[0],h),m=y=>{Cb(p,(b,S)=>{l.recordDroppedEvent(y,Rb(S))})},g=()=>t({body:Tx(p)}).then(y=>(y.statusCode!==void 0&&(y.statusCode<200||y.statusCode>=300)&&mt&&Tt.warn(`Sentry responded with status code ${y.statusCode} to sent event.`),a=AC(a,y),y),y=>{throw m("network_error"),mt&&Tt.error("Encountered error running transport request:",y),y});return i.add(g).then(y=>y,y=>{if(y===Jb)return mt&&Tt.error("Skipped sending event because buffer is full."),m("queue_overflow"),Ea({});throw y})}return{send:c,flush:r}}function af(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:Zi})),version:Zi}),l._metadata=r}const CC=100;function Aa(l,t){const i=ln(),a=$o();if(!i)return;const{beforeBreadcrumb:r=null,maxBreadcrumbs:c=CC}=i.getOptions();if(c<=0)return;const h={timestamp:Fo(),...l},p=r?pr(()=>r(h,t)):h;p!==null&&(i.emit&&i.emit("beforeAddBreadcrumb",p,t),a.addBreadcrumb(p,c))}let tv;const RC="FunctionToString",ev=new WeakMap,DC=()=>({name:RC,setupOnce(){tv=Function.prototype.toString;try{Function.prototype.toString=function(...l){const t=Vh(this),i=ev.has(ln())&&t!==void 0?t:this;return tv.apply(i,l)}}catch{}},setup(l){ev.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",NC=(l={})=>{let t;return{name:OC,setup(i){const a=i.getOptions();t=nv(l,a)},processEvent(i,a,r){if(!t){const c=r.getOptions();t=nv(l,c)}return LC(i,t)?null:i}}},kC=(l={})=>({...NC(l),name:"InboundFilters"});function nv(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 mt&&Tt.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
7
+ `),typeof h=="string"||h instanceof Uint8Array)r(h);else{let p;try{p=JSON.stringify(h)}catch{p=JSON.stringify(ts(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"?Zh(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 Rb(l){return Cx[l]}function Db(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:Jc(a)},...r&&{trace:r}}}function Mb(l,t){if(!t?.length||!l.description)return!1;for(const i of t){if(Mx(i)){if(Kc(l.description,i))return!0;continue}if(!i.name&&!i.op)continue;const a=i.name?Kc(l.description,i.name):!0,r=i.op?l.op&&Kc(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 Nx(l,t,i,a){const r=Db(i),c={sent_at:new Date().toISOString(),...r&&{sdk:r},...!!a&&t&&{dsn:Jc(t)}},u="aggregates"in l?[{type:"sessions"},l]:[{type:"session"},l.toJSON()];return Go(c,[u])}function kx(l,t,i,a){const r=Db(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,Go(u,[[{type:c},l]])}const Jh=0,Ob=1,Nb=2;function Ea(l){return new Ls(t=>{t(l)})}function tu(l){return new Ls((t,i)=>{i(l)})}class Ls{constructor(t){this._state=Jh,this._handlers=[],this._runExecutor(t)}then(t,i){return new Ls((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 Ls((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===Jh)return;const t=this._handlers.slice();this._handlers=[],t.forEach(i=>{i[0]||(this._state===Ob&&i[1](this._value),this._state===Nb&&i[2](this._value),i[0]=!0)})}_runExecutor(t){const i=(c,u)=>{if(this._state===Jh){if(Wc(u)){u.then(a,r);return}this._state=c,this._value=u,this._executeHandlers()}},a=c=>{i(Ob,c)},r=c=>{i(Nb,c)};try{t(a,r)}catch(c){r(c)}}}function tf(l,t,i,a=0){return new Ls((r,c)=>{const u=l[a];if(t===null||typeof u!="function")r(t);else{const h=u({...t},i);mt&&u.id&&h===null&&Tt.log(`Event processor "${u.id}" dropped event`),Wc(h)?h.then(p=>tf(l,p,i,a+1).then(r)).then(null,c):tf(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 kb(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;eu(l,"extra",i),eu(l,"tags",a),eu(l,"user",r),eu(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 eu(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=_b(t),a=Wh(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 nu,Lb,iu;function Bx(l){const t=Qt._sentryDebugIds;if(!t)return{};const i=Object.keys(t);return iu&&i.length===Lb||(Lb=i.length,iu=i.reduce((a,r)=>{nu||(nu={});const c=nu[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,nu[r]=[m,g];break}}}return a},{})),iu}function jx(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||jo()},m=i.integrations||l.integrations.map(C=>C.name);Fx(p,l),Vx(p,m),r&&r.emit("applyFrameMetadata",t),t.type===void 0&&$x(p,l.stackParser);const g=Yx(a,i.captureContext);i.mechanism&&yr(p,i.mechanism);const y=r?r.getEventProcessors():[],b=Pw().getScopeData();if(c){const C=c.getScopeData();kb(b,C)}if(g){const C=g.getScopeData();kb(b,C)}const S=[...i.attachments||[],...b.attachments];S.length&&(i.attachments=S),Lx(p,b);const A=[...y,...b.eventProcessors];return tf(A,p,i).then(C=>(C&&Gx(C),typeof u=="number"&&u>0?qx(C,u,h):C))}function Fx(l,t){const{environment:i,release:a,dist:r,maxValueLength:c=250}=t;l.environment=l.environment||i||Qh,!l.release&&a&&(l.release=a),!l.dist&&r&&(l.dist=r);const u=l.request;u?.url&&(u.url=Qc(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:ts(r.data,t,i)}}))},...l.user&&{user:ts(l.user,t,i)},...l.contexts&&{contexts:ts(l.contexts,t,i)},...l.extra&&{extra:ts(l.extra,t,i)}};return l.contexts?.trace&&a.contexts&&(a.contexts.trace=l.contexts.trace,l.contexts.trace.data&&(a.contexts.trace.data=ts(l.contexts.trace.data,t,i))),l.spans&&(a.spans=l.spans.map(r=>({...r,...r.data&&{data:ts(r.data,t,i)}}))),l.contexts?.flags&&a.contexts&&(a.contexts.flags=ts(l.contexts.flags,3,i)),a}function Yx(l,t){if(!t)return l;const i=l?l.clone():new xi;return i.update(t),i}function Xx(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 Ib(l,t){return ks().captureException(l,Xx(t))}function Pb(l,t){return ks().captureEvent(l,t)}function Ub(l){const t=$o(),i=ks(),{userAgent:a}=Qt.navigator||{},r=xw({user:i.getUser()||t.getUser(),...a&&{userAgent:a},...l}),c=t.getSession();return c?.status==="ok"&&vr(c,{status:"exited"}),zb(),t.setSession(r),r}function zb(){const l=$o(),i=ks().getSession()||l.getSession();i&&Cw(i),Hb(),l.setSession()}function Hb(){const l=$o(),t=ln(),i=l.getSession();i&&t&&t.captureSession(i)}function Bb(l=!1){if(l){zb();return}Hb()}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 jb=[];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&&$b(l,a,i)}),i}function Fb(l,t){for(const i of t)i?.afterAllSetup&&i.afterAllSetup(l)}function $b(l,t,i){if(i[t.name]){mt&&Tt.log(`Integration skipped because it was already installed: ${t.name}`);return}if(i[t.name]=t,jb.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),jb.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)}mt&&Tt.log(`Integration installed: ${t.name}`)}function DI(l){return l}function rC(l,t,i){const a=[{type:"client_report"},{timestamp:jo(),discarded_events:l}];return Go(t?{dsn:t}:{},[a])}function Gb(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?.[pb],exclusive_time:u?.[mb],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&&{[pb]:l.profile_id},...l.exclusive_time&&{[mb]:l.exclusive_time}}}},measurements:l.measurements}}const Vb="Not capturing exception because it's already been captured.",qb="Discarded session because of missing or non-string release",Yb=Symbol.for("SentryInternalError"),Xb=Symbol.for("SentryDoNotSendEventError");function su(l){return{message:l,[Yb]:!0}}function ef(l){return{message:l,[Xb]:!0}}function Wb(l){return!!l&&typeof l=="object"&&Yb in l}function Qb(l){return!!l&&typeof l=="object"&&Xb 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):mt&&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(rb(t))return mt&&Tt.log(Vb),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=jh(t)?t:String(t),h=Fh(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&&rb(i.originalException))return mt&&Tt.log(Vb),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))):Ea(!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];$b(this,t,this._integrations),i||Fb(this,[t])}sendEvent(t,i={}){this.emit("beforeSendEvent",t,i);let a=kx(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=Qh}=this._options;if("aggregates"in t){const c=t.attrs||{};if(!c.release&&!i){mt&&Tt.warn(qb);return}c.release=c.release||i,c.environment=c.environment||a,t.attrs=c}else{if(!t.release&&!i){mt&&Tt.warn(qb);return}t.release=t.release||i,t.environment=t.environment||a}this.emit("beforeSendSession",t);const r=Nx(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}`;mt&&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=>(mt&&Tt.error("Error while sending envelope:",i),i)):(mt&&Tt.error("Transport disabled"),Ea({}))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=aC(this,t),Fb(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 Ls(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),jx(c,t,i,a,this,r).then(h=>{if(h===null)return h;this.emit("postprocessEvent",h,i),h.contexts={trace:zw(a),...h.contexts};const p=gx(this,a);return h.sdkProcessingMetadata={dynamicSamplingContext:p,...h.sdkProcessingMetadata},h})}_captureEvent(t,i={},a=ks(),r=$o()){return mt&&nf(t)&&Tt.log(`Captured error event \`${Gb(t)[0]||"<unknown>"}\``),this._processEvent(t,i,a,r).then(c=>c.event_id,c=>{mt&&(Qb(c)?Tt.log(c.message):Wb(c)?Tt.warn(c.message):Tt.warn(c))})}_processEvent(t,i,a,r){const c=this.getOptions(),{sampleRate:u}=c,h=Kb(t),p=nf(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"),tu(ef(`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),ef("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 R=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",R)}throw ef(`${g} returned \`null\`, will not send event.`)}const A=a.getSession()||r.getSession();if(p&&A&&this._updateSessionFromEvent(A,S),h){const C=S.sdkProcessingMetadata?.spanCountBeforeProcessing||0,R=S.spans?S.spans.length:0,L=C-R;L>0&&this.recordDroppedEvent("before_send","span",L)}const _=S.transaction_info;if(h&&_&&S.transaction!==t.transaction){const C="custom";S.transaction_info={..._,source:C}}return this.sendEvent(S,i),S}).then(null,S=>{throw Qb(S)||Wb(S)?S:(this.captureException(S,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:S}),su(`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(){mt&&Tt.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){mt&&Tt.log("No outcomes to send");return}if(!this._dsn){mt&&Tt.log("No dsn provided, will not send outcomes");return}mt&&Tt.log("Sending outcomes:",t);const i=rC(t,this._options.tunnel&&Jc(this._dsn));this.sendEnvelope(i)}}function uC(l,t){const i=`${t} must return \`null\` or a valid event.`;if(Wc(l))return l.then(a=>{if(!Ho(a)&&a!==null)throw su(i);return a},a=>{throw su(`${t} rejected with ${a}`)});if(!Ho(l)&&l!==null)throw su(i);return l}function dC(l,t,i,a){const{beforeSend:r,beforeSendTransaction:c,beforeSendSpan:u,ignoreSpans:h}=t;let p=i;if(nf(p)&&r)return r(p,a);if(Kb(p)){if(u||h){const m=oC(p);if(h?.length&&Mb(m,h))return null;if(u){const g=u(m);g?p=Fo(i,lC(g)):Tb()}if(p.spans){const g=[],y=p.spans;for(const S of y){if(h?.length&&Mb(S,h)){Dx(y,S);continue}if(u){const A=u(S);A?g.push(A):(Tb(),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 nf(l){return l.type===void 0}function Kb(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=Jc(a)),Go(r,[hC(l)])}function sf(l,t){const i=pC(l)??[];if(i.length===0)return;const a=l.getOptions(),r=fC(i,a._metadata,a.tunnel,l.getDsn());Zb().set(l,[]),l.emit("flushLogs"),l.sendEnvelope(r)}function pC(l){return Zb().get(l)}function Zb(){return Uo("clientToLogBufferMap",()=>new WeakMap)}function mC(l,t){t.debug===!0&&(mt?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 Jb=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 tu(Jb);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 Ls((h,p)=>{let m=t.length;if(!m)return h(!0);const g=setTimeout(()=>{u&&u>0&&h(!1)},u);t.forEach(y=>{Ea(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(Cb(u,(y,b)=>{const S=Rb(b);EC(a,S)?l.recordDroppedEvent("ratelimit_backoff",S):h.push(y)}),h.length===0)return Ea({});const p=Go(u[0],h),m=y=>{Cb(p,(b,S)=>{l.recordDroppedEvent(y,Rb(S))})},g=()=>t({body:Tx(p)}).then(y=>(y.statusCode!==void 0&&(y.statusCode<200||y.statusCode>=300)&&mt&&Tt.warn(`Sentry responded with status code ${y.statusCode} to sent event.`),a=AC(a,y),y),y=>{throw m("network_error"),mt&&Tt.error("Encountered error running transport request:",y),y});return i.add(g).then(y=>y,y=>{if(y===Jb)return mt&&Tt.error("Skipped sending event because buffer is full."),m("queue_overflow"),Ea({});throw y})}return{send:c,flush:r}}function af(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:Zi})),version:Zi}),l._metadata=r}const CC=100;function Aa(l,t){const i=ln(),a=$o();if(!i)return;const{beforeBreadcrumb:r=null,maxBreadcrumbs:c=CC}=i.getOptions();if(c<=0)return;const h={timestamp:jo(),...l},p=r?pr(()=>r(h,t)):h;p!==null&&(i.emit&&i.emit("beforeAddBreadcrumb",p,t),a.addBreadcrumb(p,c))}let tv;const RC="FunctionToString",ev=new WeakMap,DC=()=>({name:RC,setupOnce(){tv=Function.prototype.toString;try{Function.prototype.toString=function(...l){const t=Vh(this),i=ev.has(ln())&&t!==void 0?t:this;return tv.apply(i,l)}}catch{}},setup(l){ev.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",NC=(l={})=>{let t;return{name:OC,setup(i){const a=i.getOptions();t=nv(l,a)},processEvent(i,a,r){if(!t){const c=r.getOptions();t=nv(l,c)}return LC(i,t)?null:i}}},kC=(l={})=>({...NC(l),name:"InboundFilters"});function nv(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 mt&&Tt.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
9
9
  Event: ${Sa(l)}`),!0}else{if(IC(l,t.ignoreErrors))return mt&&Tt.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
10
10
  Event: ${Sa(l)}`),!0;if(BC(l))return mt&&Tt.warn(`Event dropped due to not having an error message, error type or stacktrace.
11
11
  Event: ${Sa(l)}`),!0;if(UC(l,t.denyUrls))return mt&&Tt.warn(`Event dropped due to being matched by \`denyUrls\` option.
12
12
  Event: ${Sa(l)}.
13
13
  Url: ${au(l)}`),!0;if(!zC(l,t.allowUrls))return mt&&Tt.warn(`Event dropped due to not being matched by \`allowUrls\` option.
14
14
  Event: ${Sa(l)}.
15
- Url: ${au(l)}`),!0}return!1}function IC(l,t){return t?.length?Gb(l).some(i=>Zc(i,t)):!1}function PC(l,t){if(!t?.length)return!1;const i=l.transaction;return i?Zc(i,t):!1}function UC(l,t){if(!t?.length)return!1;const i=au(l);return i?Zc(i,t):!1}function zC(l,t){if(!t?.length)return!0;const i=au(l);return i?Zc(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 au(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 mt&&Tt.error(`Cannot extract url for event ${Sa(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||!Ns(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=rf(l,t,a,c.originalException,i,r.exception.values,u,0))}function rf(l,t,i,a,r,c,u,h){if(c.length>=i+1)return c;let p=[...c];if(Ns(a[r],Error)){iv(u,h);const m=l(t,a[r]),g=p.length;sv(m,r,g,h),p=rf(l,t,i,a[r],r,[m,...p],m,g)}return Array.isArray(a.errors)&&a.errors.forEach((m,g)=>{if(Ns(m,Error)){iv(u,h);const y=l(t,m),b=p.length;sv(y,`errors[${g}]`,b,h),p=rf(l,t,i,m,r,[y,...p],y,b)}}),p}function iv(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 sv(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";qc(t,l),Yc(t,$C)}function $C(){"console"in Qt&&e1.forEach(function(l){l in Qt.console&&Ji(Qt.console,l,function(t){return $c[l]=t,function(...i){mr("console",{args:i,level:l}),$c[l]?.apply(Qt.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(YC(t,l))return mt&&Tt.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return l=t}}};function YC(l,t){return t?!!(XC(l,t)||WC(l,t)):!1}function XC(l,t){const i=l.message,a=t.message;return!(!i&&!a||i&&!a||!i&&a||i!==a||!rv(l,t)||!av(l,t))}function WC(l,t){const i=ov(t),a=ov(l);return!(!i||!a||i.type!==a.type||i.value!==a.value||!rv(l,t)||!av(l,t))}function av(l,t){let i=Yy(l),a=Yy(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 rv(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 ov(l){return l.exception?.values?.[0]}function lv(l){if(l!==void 0)return l>=400&&l<500?"warning":l>=500?"error":void 0}const of=Qt;function QC(){if(!("fetch"in of))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function cv(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(cv(of.fetch))return!0;let l=!1;const t=of.document;if(t&&typeof t.createElement=="function")try{const i=t.createElement("iframe");i.hidden=!0,t.head.appendChild(i),i.contentWindow?.fetch&&(l=cv(i.contentWindow.fetch)),t.head.removeChild(i)}catch(i){mt&&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";qc(i,l),Yc(i,()=>JC(void 0,t))}function JC(l,t=!1){t&&!KC()||Ji(Qt,"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(Qt,a).then(async p=>(mr("fetch",{...h,endTimestamp:br()*1e3,response:p}),p),p=>{if(mr("fetch",{...h,endTimestamp:br()*1e3,error:p}),Bh(p)&&p.stack===void 0&&(p.stack=r.stack,Bo(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 lf(l,t){return!!l&&typeof l=="object"&&!!l[t]}function uv(l){return typeof l=="string"?l:l?lf(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:uv(i),method:lf(a,"method")?String(a.method).toUpperCase():"GET"}}const t=l[0];return{url:uv(t),method:lf(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 Ee=Qt;let cf=0;function dv(){return cf>0}function iR(){cf++,setTimeout(()=>{cf--})}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(Vh(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&&(qh(h,void 0),yr(h,t.mechanism)),h.extra={...h.extra,arguments:r},h)),Ib(c)}),c}};try{for(const r in l)Object.prototype.hasOwnProperty.call(l,r)&&(a[r]=l[r])}catch{}eb(a,l),Bo(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=Gh(),{referrer:t}=Ee.document||{},{userAgent:i}=Ee.navigator||{},a={...t&&{Referer:t},...i&&{"User-Agent":i}};return{url:l,headers:a}}function uf(l,t){const i=hf(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__:xb(t,c)};if(u)return{exception:{values:[uf(l,u)]},extra:h};const p={exception:{values:[{type:Xc(t)?t.constructor.name:a?"UnhandledRejection":"Error",value:fR(t,{isUnhandledRejection:a})}]},extra:h};if(i){const m=hf(l,i);m.length&&(p.exception.values[0].stacktrace={frames:m})}return p}function df(l,t){return{exception:{values:[uf(l,t)]}}}function hf(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 hv(l){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?l instanceof WebAssembly.Exception:!1}function cR(l){const t=l?.name;return!t&&hv(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 hv(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=ff(l,t,r,a);return yr(c),c.level="error",i?.event_id&&(c.event_id=i.event_id),Ea(c)}function hR(l,t,i="info",a,r){const c=a?.syntheticException||void 0,u=pf(l,t,c,r);return u.level=i,a?.event_id&&(u.event_id=a.event_id),Ea(u)}function ff(l,t,i,a,r){let c;if(Qy(t)&&t.error)return df(l,t.error);if(Ky(t)||p1(t)){const u=t;if("stack"in t)c=df(l,t);else{const h=u.name||(Ky(u)?"DOMError":"DOMException"),p=u.message?`${h}: ${u.message}`:h;c=pf(l,p,i,a),qh(c,p)}return"code"in u&&(c.tags={...c.tags,"DOMException.code":`${u.code}`}),c}return Bh(t)?df(l,t):Ho(t)||Xc(t)?(c=aR(l,t,i,r),yr(c,{synthetic:!0}),c):(c=pf(l,t,i,a),qh(c,`${t}`),yr(c,{synthetic:!0}),c)}function pf(l,t,i,a){const r={};if(a&&i){const c=hf(l,i);c.length&&(r.exception={values:[{value:t,stacktrace:{frames:c}}]}),yr(r,{synthetic:!0})}if(Fh(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 Qy(l)?`Event \`ErrorEvent\` captured as ${a} with message \`${l.message}\``:Xc(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=Ee.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;Ee.document&&(c||u)&&Ee.document.addEventListener("visibilitychange",()=>{Ee.document.visibilityState==="hidden"&&(c&&this._flushOutcomes(),u&&sf(this))}),u&&(this.on("flush",()=>{sf(this)}),this.on("afterCaptureLog",()=>{this._logFlushIdleTimeout&&clearTimeout(this._logFlushIdleTimeout),this._logFlushIdleTimeout=setTimeout(()=>{sf(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__:Ee.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...l}}const Ar=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Is=globalThis,fv="10.8.0";function vR(l,t,i=Is){const a=i.__SENTRY__=i.__SENTRY__||{},r=a[fv]=a[fv]||{};return r[l]||(r[l]=t())}const SR="Sentry Logger ",pv={};function ER(l){if(!("console"in Is))return l();const t=Is.console,i={},a=Object.keys(pv);a.forEach(r=>{const c=pv[r];i[r]=t[r],t[r]=c});try{return l()}finally{a.forEach(r=>{t[r]=i[r]})}}function AR(){gf().enabled=!0}function _R(){gf().enabled=!1}function mv(){return gf().enabled}function TR(...l){mf("log",...l)}function wR(...l){mf("warn",...l)}function xR(...l){mf("error",...l)}function mf(l,...t){Ar&&mv()&&ER(()=>{Is.console[l](`${SR}[${l}]:`,...t)})}function gf(){return Ar?vR("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const Vo={enable:AR,disable:_R,isEnabled:mv,log:TR,warn:wR,error:xR},yf="<anonymous>";function CR(l){try{return!l||typeof l!="function"?yf:l.name||yf}catch{return yf}}const ru={},gv={};function bf(l,t){ru[l]=ru[l]||[],ru[l].push(t)}function vf(l,t){if(!gv[l]){gv[l]=!0;try{t()}catch(i){Ar&&Vo.error(`Error while instrumenting ${l}`,i)}}}function qo(l,t){const i=l&&ru[l];if(i)for(const a of i)try{a(t)}catch(r){Ar&&Vo.error(`Error while triggering instrumentation handler.
15
+ Url: ${au(l)}`),!0}return!1}function IC(l,t){return t?.length?Gb(l).some(i=>Zc(i,t)):!1}function PC(l,t){if(!t?.length)return!1;const i=l.transaction;return i?Zc(i,t):!1}function UC(l,t){if(!t?.length)return!1;const i=au(l);return i?Zc(i,t):!1}function zC(l,t){if(!t?.length)return!0;const i=au(l);return i?Zc(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 au(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 mt&&Tt.error(`Cannot extract url for event ${Sa(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 jC(l,t,i,a,r,c){if(!r.exception?.values||!c||!Ns(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=rf(l,t,a,c.originalException,i,r.exception.values,u,0))}function rf(l,t,i,a,r,c,u,h){if(c.length>=i+1)return c;let p=[...c];if(Ns(a[r],Error)){iv(u,h);const m=l(t,a[r]),g=p.length;sv(m,r,g,h),p=rf(l,t,i,a[r],r,[m,...p],m,g)}return Array.isArray(a.errors)&&a.errors.forEach((m,g)=>{if(Ns(m,Error)){iv(u,h);const y=l(t,m),b=p.length;sv(y,`errors[${g}]`,b,h),p=rf(l,t,i,m,r,[y,...p],y,b)}}),p}function iv(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 sv(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 FC(l){const t="console";qc(t,l),Yc(t,$C)}function $C(){"console"in Qt&&ew.forEach(function(l){l in Qt.console&&Ji(Qt.console,l,function(t){return $c[l]=t,function(...i){mr("console",{args:i,level:l}),$c[l]?.apply(Qt.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(YC(t,l))return mt&&Tt.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return l=t}}};function YC(l,t){return t?!!(XC(l,t)||WC(l,t)):!1}function XC(l,t){const i=l.message,a=t.message;return!(!i&&!a||i&&!a||!i&&a||i!==a||!rv(l,t)||!av(l,t))}function WC(l,t){const i=ov(t),a=ov(l);return!(!i||!a||i.type!==a.type||i.value!==a.value||!rv(l,t)||!av(l,t))}function av(l,t){let i=Yy(l),a=Yy(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 rv(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 ov(l){return l.exception?.values?.[0]}function lv(l){if(l!==void 0)return l>=400&&l<500?"warning":l>=500?"error":void 0}const of=Qt;function QC(){if(!("fetch"in of))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function cv(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(cv(of.fetch))return!0;let l=!1;const t=of.document;if(t&&typeof t.createElement=="function")try{const i=t.createElement("iframe");i.hidden=!0,t.head.appendChild(i),i.contentWindow?.fetch&&(l=cv(i.contentWindow.fetch)),t.head.removeChild(i)}catch(i){mt&&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";qc(i,l),Yc(i,()=>JC(void 0,t))}function JC(l,t=!1){t&&!KC()||Ji(Qt,"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(Qt,a).then(async p=>(mr("fetch",{...h,endTimestamp:br()*1e3,response:p}),p),p=>{if(mr("fetch",{...h,endTimestamp:br()*1e3,error:p}),Bh(p)&&p.stack===void 0&&(p.stack=r.stack,Bo(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 lf(l,t){return!!l&&typeof l=="object"&&!!l[t]}function uv(l){return typeof l=="string"?l:l?lf(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:uv(i),method:lf(a,"method")?String(a.method).toUpperCase():"GET"}}const t=l[0];return{url:uv(t),method:lf(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(bw(t))return new Headers(t.headers)}catch{}}function nR(){return"npm"}const Ee=Qt;let cf=0;function dv(){return cf>0}function iR(){cf++,setTimeout(()=>{cf--})}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(Vh(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(),Uw(u=>{u.addEventProcessor(h=>(t.mechanism&&(qh(h,void 0),yr(h,t.mechanism)),h.extra={...h.extra,arguments:r},h)),Ib(c)}),c}};try{for(const r in l)Object.prototype.hasOwnProperty.call(l,r)&&(a[r]=l[r])}catch{}eb(a,l),Bo(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=Gh(),{referrer:t}=Ee.document||{},{userAgent:i}=Ee.navigator||{},a={...t&&{Referer:t},...i&&{"User-Agent":i}};return{url:l,headers:a}}function uf(l,t){const i=hf(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__:xb(t,c)};if(u)return{exception:{values:[uf(l,u)]},extra:h};const p={exception:{values:[{type:Xc(t)?t.constructor.name:a?"UnhandledRejection":"Error",value:fR(t,{isUnhandledRejection:a})}]},extra:h};if(i){const m=hf(l,i);m.length&&(p.exception.values[0].stacktrace={frames:m})}return p}function df(l,t){return{exception:{values:[uf(l,t)]}}}function hf(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 hv(l){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?l instanceof WebAssembly.Exception:!1}function cR(l){const t=l?.name;return!t&&hv(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 hv(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=ff(l,t,r,a);return yr(c),c.level="error",i?.event_id&&(c.event_id=i.event_id),Ea(c)}function hR(l,t,i="info",a,r){const c=a?.syntheticException||void 0,u=pf(l,t,c,r);return u.level=i,a?.event_id&&(u.event_id=a.event_id),Ea(u)}function ff(l,t,i,a,r){let c;if(Qy(t)&&t.error)return df(l,t.error);if(Ky(t)||pw(t)){const u=t;if("stack"in t)c=df(l,t);else{const h=u.name||(Ky(u)?"DOMError":"DOMException"),p=u.message?`${h}: ${u.message}`:h;c=pf(l,p,i,a),qh(c,p)}return"code"in u&&(c.tags={...c.tags,"DOMException.code":`${u.code}`}),c}return Bh(t)?df(l,t):Ho(t)||Xc(t)?(c=aR(l,t,i,r),yr(c,{synthetic:!0}),c):(c=pf(l,t,i,a),qh(c,`${t}`),yr(c,{synthetic:!0}),c)}function pf(l,t,i,a){const r={};if(a&&i){const c=hf(l,i);c.length&&(r.exception={values:[{value:t,stacktrace:{frames:c}}]}),yr(r,{synthetic:!0})}if(jh(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=Aw(l),a=t?"promise rejection":"exception";return Qy(l)?`Event \`ErrorEvent\` captured as ${a} with message \`${l.message}\``:Xc(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=Ee.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;Ee.document&&(c||u)&&Ee.document.addEventListener("visibilitychange",()=>{Ee.document.visibilityState==="hidden"&&(c&&this._flushOutcomes(),u&&sf(this))}),u&&(this.on("flush",()=>{sf(this)}),this.on("afterCaptureLog",()=>{this._logFlushIdleTimeout&&clearTimeout(this._logFlushIdleTimeout),this._logFlushIdleTimeout=setTimeout(()=>{sf(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__:Ee.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...l}}const Ar=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Is=globalThis,fv="10.8.0";function vR(l,t,i=Is){const a=i.__SENTRY__=i.__SENTRY__||{},r=a[fv]=a[fv]||{};return r[l]||(r[l]=t())}const SR="Sentry Logger ",pv={};function ER(l){if(!("console"in Is))return l();const t=Is.console,i={},a=Object.keys(pv);a.forEach(r=>{const c=pv[r];i[r]=t[r],t[r]=c});try{return l()}finally{a.forEach(r=>{t[r]=i[r]})}}function AR(){gf().enabled=!0}function _R(){gf().enabled=!1}function mv(){return gf().enabled}function TR(...l){mf("log",...l)}function wR(...l){mf("warn",...l)}function xR(...l){mf("error",...l)}function mf(l,...t){Ar&&mv()&&ER(()=>{Is.console[l](`${SR}[${l}]:`,...t)})}function gf(){return Ar?vR("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const Vo={enable:AR,disable:_R,isEnabled:mv,log:TR,warn:wR,error:xR},yf="<anonymous>";function CR(l){try{return!l||typeof l!="function"?yf:l.name||yf}catch{return yf}}const ru={},gv={};function bf(l,t){ru[l]=ru[l]||[],ru[l].push(t)}function vf(l,t){if(!gv[l]){gv[l]=!0;try{t()}catch(i){Ar&&Vo.error(`Error while instrumenting ${l}`,i)}}}function qo(l,t){const i=l&&ru[l];if(i)for(const a of i)try{a(t)}catch(r){Ar&&Vo.error(`Error while triggering instrumentation handler.
16
16
  Type: ${l}
17
17
  Name: ${CR(a)}
18
- Error:`,r)}}const RR=Object.prototype.toString;function DR(l,t){return RR.call(l)===`[object ${t}]`}function ou(l){return DR(l,"String")}function lu(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&&Vo.log(`Failed to replace method "${t}" in object`,l)}}function Sf(l,t,i){try{Object.defineProperty(l,t,{value:i,writable:!0,configurable:!0})}catch{Ar&&Vo.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,Sf(l,"__sentry_original__",t)}catch{}}function OR(){const l=Is;return l.crypto||l.msCrypto}function NR(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 yv=1e3;function kR(){return Date.now()/yv}function LR(){const{performance:l}=Is;if(!l?.now||!l.timeOrigin)return kR;const t=l.timeOrigin;return()=>(t+l.now())/yv}let bv;function Ef(){return(bv??(bv=LR()))()}const vv=Is;function IR(){return"history"in vv&&!!vv.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=Is,zR=1e3;let Sv,Af,_f;function HR(l){bf("dom",l),vf("dom",BR)}function BR(){if(!cn.document)return;const l=qo.bind(null,"dom"),t=Ev(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")&&(lu(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=Ev(l);g.handler=y,c.call(this,u,y,p)}g.refCount++}catch{}return c.call(this,u,h,p)}}),lu(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!==Af)return!1;try{if(!l.target||l.target._sentryId!==_f)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 Ev(l,t=!1){return i=>{if(!i||i._sentryCaptured)return;const a=$R(i);if(jR(i.type,a))return;Sf(i,"_sentryCaptured",!0),a&&!a._sentryId&&Sf(a,"_sentryId",NR());const r=i.type==="keypress"?"input":i.type;FR(i)||(l({event:i,name:r,global:t}),Af=i.type,_f=a?a._sentryId:void 0),clearTimeout(Sv),Sv=cn.setTimeout(()=>{_f=void 0,Af=void 0},zR)}}function $R(l){try{return l.target}catch{return null}}let cu;function Av(l){const t="history";bf(t,l),vf(t,GR)}function GR(){if(cn.addEventListener("popstate",()=>{const t=cn.location.href,i=cu;if(cu=t,i===t)return;qo("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=cu,c=VR(String(a));if(cu=c,r===c)return t.apply(this,i);qo("history",{from:r,to:c})}return t.apply(this,i)}}lu(cn.history,"pushState",l),lu(cn.history,"replaceState",l)}function VR(l){try{return new URL(l,cn.location.origin).toString()}catch{return l}}const uu={};function qR(l){const t=uu[l];if(t)return t;let i=cn[l];if(PR(i))return uu[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&&Vo.warn(`Could not create sandbox iframe for ${l} check, bailing to window.${l}: `,r)}return i&&(uu[l]=i.bind(cn))}function _v(l){uu[l]=void 0}const Yo="__sentry_xhr_v3__";function YR(l){bf("xhr",l),vf("xhr",XR)}function XR(){if(!cn.XMLHttpRequest)return;const l=XMLHttpRequest.prototype;l.open=new Proxy(l.open,{apply(t,i,a){const r=new Error,c=Ef()*1e3,u=ou(a[0])?a[0].toUpperCase():void 0,h=WR(a[1]);if(!u||!h)return t.apply(i,a);i[Yo]={method:u,url:h,request_headers:{}},u==="POST"&&h.match(/sentry_key/)&&(i.__sentry_own_request__=!0);const p=()=>{const m=i[Yo];if(m&&i.readyState===4){try{m.status_code=i.status}catch{}const g={endTimestamp:Ef()*1e3,startTimestamp:c,xhr:i,virtualError:r};qo("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[Yo];return A&&ou(b)&&ou(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[Yo];if(!r)return t.apply(i,a);a[0]!==void 0&&(r.body=a[0]);const c={startTimestamp:Ef()*1e3,xhr:i};return qo("xhr",c),t.apply(i,a)}})}function WR(l){if(ou(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 _v("fetch"),tu("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 _v("fetch"),i-=u,a--,tu(p)}}return TC(l,r)}const KR=30,ZR=50;function Tf(l,t,i,a){const r={filename:l,function:t==="<anonymous>"?va: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 Tf(r,va,+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]=Tv(a[1]||va,a[2]);return Tf(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=qy(...[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]||va;return[r,a]=Tv(r,a),Tf(a,r,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]]),Tv=(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]:va,i?`safari-extension:${t}`:`safari-web-extension:${t}`]:[l,t]},du=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,hu=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&&YR(hD(i)),t.fetch&&ZC(fD(i)),t.history&&Av(pD(i)),t.sentry&&i.on("beforeSendEvent",cD(i))}}};function cD(l){return function(i){ln()===l&&Aa({category:`sentry.${i.type==="transaction"?"transaction":"event"}`,event_id:i.event_id,level:i.level,message:Sa(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>hu&&(du&&Tt.warn(`\`dom.maxStringLength\` cannot exceed ${hu}, but a value of ${h} was configured. Sentry will use ${hu} instead.`),h=hu),typeof u=="string"&&(u=[u]);try{const m=a.event,g=mD(m)?m.target:m;r=Jy(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}),Aa(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:tb(i.args," ")};if(i.level==="assert")if(i.args[0]===!1)a.message=`Assertion failed: ${tb(i.args.slice(1)," ")||"console.assert"}`,a.data.arguments=i.args.slice(1);else return;Aa(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[Yo];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:lv(p)};l.emit("beforeOutgoingRequestBreadcrumb",b,y),Aa(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),Aa(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:lv(u.status_code)};l.emit("beforeOutgoingRequestBreadcrumb",p,h),Aa(p,h)}}}function pD(l){return function(i){if(ln()!==l)return;let a=i.from,r=i.to;const c=af(Ee.location.href);let u=a?af(a):void 0;const h=af(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),Aa({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&&Ji(Ee,"setTimeout",wv),t.setInterval&&Ji(Ee,"setInterval",wv),t.requestAnimationFrame&&Ji(Ee,"requestAnimationFrame",vD),t.XMLHttpRequest&&"XMLHttpRequest"in Ee&&Ji(XMLHttpRequest.prototype,"send",SD);const i=t.eventTarget;i&&(Array.isArray(i)?i:gD).forEach(r=>ED(r,t))}}};function wv(l){return function(...t){const i=t[0];return t[0]=Er(i,{mechanism:{data:{function:Os(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:Os(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"&&Ji(i,r,function(c){const u={mechanism:{data:{function:r,handler:Os(c)},handled:!1,type:"instrument"}},h=Vh(c);return h&&(u.mechanism.data.handler=Os(h)),Er(c,u)})}),l.apply(this,t)}}function ED(l,t){const a=Ee[l]?.prototype;a?.hasOwnProperty?.("addEventListener")&&(Ji(a,"addEventListener",function(r){return function(c,u,h){try{AD(u)&&(u.handleEvent=Er(u.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Os(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:Os(u),target:l},handled:!1,type:"instrument"}}),h])}}),Ji(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 Ee.document>"u"){du&&Tt.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}Ub({ignoreDuration:!0}),Bb(),Av(({from:l,to:t})=>{l!==void 0&&l!==t&&(Ub({ignoreDuration:!0}),Bb())})}}),wD="GlobalHandlers",xD=(l={})=>{const t={onerror:!0,onunhandledrejection:!0,...l};return{name:wD,setupOnce(){Error.stackTraceLimit=50},setup(i){t.onerror&&(CD(i),xv("onerror")),t.onunhandledrejection&&(RD(i),xv("onunhandledrejection"))}}};function CD(l){u1(t=>{const{stackParser:i,attachStacktrace:a}=Cv();if(ln()!==l||dv())return;const{msg:r,url:c,line:u,column:h,error:p}=t,m=OD(ff(i,p||r,void 0,a,!1),c,u,h);m.level="error",Pb(m,{originalException:p,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}function RD(l){h1(t=>{const{stackParser:i,attachStacktrace:a}=Cv();if(ln()!==l||dv())return;const r=DD(t),c=jh(r)?MD(r):ff(i,r,void 0,a,!0);c.level="error",Pb(c,{originalException:r,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}function DD(l){if(jh(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=ND(t)??Gh();return p.length===0&&p.push({colno:m,filename:y,function:va,in_app:!0,lineno:g}),l}function xv(l){du&&Tt.log(`Global Handler attached: ${l}`)}function Cv(){return ln()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function ND(l){if(!(!zo(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 kD=()=>({name:"HttpContext",preprocessEvent(l){if(!Ee.navigator&&!Ee.location&&!Ee.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(uf,u.stackParser,i,t,a,r)}}};function zD(){return HD()?(du&&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 Ee.window>"u")return!1;const l=Ee;if(l.nw||!(l.chrome||l.browser)?.runtime?.id)return!1;const i=Gh(),a=["chrome-extension","moz-extension","ms-browser-extension","safari-web-extension"];return!(Ee===Ee.top&&a.some(c=>i.startsWith(`${c}://`)))}function BD(l){return[kC(),DC(),bD(),lD(),xD(),UD(),qC(),kD(),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;lastMessage=null;lastMessageCount=0;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";logMessage(t,i,a,...r){if(!a)return;const c=`[${this.getTimestamp()}] ${this.BASE} ${t}] ${i}`;if(this.lastMessage===c)this.lastMessageCount++;else{if(this.lastMessageCount>1&&this.lastMessage){const u=this.lastMessage.split("] "),h=u[1],p=u.slice(2).join("] "),m=`[${this.getTimestamp()}] ${this.BASE} ${t}] (x${this.lastMessageCount}) ${p}`;h.includes("Error")?console.error(m,...r):h.includes("Warning")?console.warn(m,...r):console.log(m,...r)}t.includes("Error")?console.error(c,...r):t.includes("Warning")?console.warn(c,...r):console.log(c,...r),this.lastMessage=c,this.lastMessageCount=0}}detail(t,...i){this.logMessage("Detail",t,this.debug&&this.logLevel>=2,...i)}info(t,...i){this.logMessage("Info",t,this.debug&&this.logLevel>=1,...i)}warn(t,...i){this.logMessage("Warning",t,this.debug,...i)}error(t,...i){this.logMessage("Error",t,this.debug,...i),this.debug&&Ib(new Error(t),{extra:{args:i}})}}const O=new jD;function $D(){const l=Xt.action_map?.flatMap(t=>t.allowed_hosts||[]).filter(Boolean);return Array.from(new Set(l))}function Rv(l){const t=$D();if(!l)return!1;for(const i of t)try{if(new RegExp(i.slice(1,-1)).test(l))return!0}catch(a){O.error(`Padrão de host inválido: ${i}`,a)}return!1}function GD(){const l=[];return Xt.action_map?.forEach(t=>{Object.keys(t.mapping).forEach(i=>{l.push({url:i,allowedHosts:t.allowed_hosts||[]})})}),l}function Dv(l){try{const t=GD();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!0}catch(c){O.error(`Erro ao verificar host permitido: ${r}`,c)}return!1}catch(t){return console.error("Erro ao verificar URL mapeada:",t),!1}}function fu(l,t){const i=l.split(".").map(Number),a=t.split(".").map(Number),r=Math.max(i.length,a.length);for(let c=0;c<r;c++){const u=i[c]||0,h=a[c]||0;if(u>h)return 1;if(u<h)return-1}return 0}function VD(l,t){try{for(const i of Xt.action_map)if(Rv(l))for(const[a,r]of Object.entries(i.mapping)){if(a==="/*"&&r===null)continue;if(new RegExp(a.slice(1,-1)).test(l))return i.actions.filter(h=>{const p=r.includes(h.job);return!t||!p?p:fu(t,h.versao_min)>=0&&fu(t,h.versao_max)<=0})}}catch(i){O.error("Erro ao obter actions para URL:",i)}return[]}function qD(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var wf={exports:{}},Xo={exports:{}};Xo.exports;var Mv;function YD(){return Mv||(Mv=1,function(l,t){/**
18
+ Error:`,r)}}const RR=Object.prototype.toString;function DR(l,t){return RR.call(l)===`[object ${t}]`}function ou(l){return DR(l,"String")}function lu(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&&Vo.log(`Failed to replace method "${t}" in object`,l)}}function Sf(l,t,i){try{Object.defineProperty(l,t,{value:i,writable:!0,configurable:!0})}catch{Ar&&Vo.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,Sf(l,"__sentry_original__",t)}catch{}}function OR(){const l=Is;return l.crypto||l.msCrypto}function NR(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 yv=1e3;function kR(){return Date.now()/yv}function LR(){const{performance:l}=Is;if(!l?.now||!l.timeOrigin)return kR;const t=l.timeOrigin;return()=>(t+l.now())/yv}let bv;function Ef(){return(bv??(bv=LR()))()}const vv=Is;function IR(){return"history"in vv&&!!vv.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=Is,zR=1e3;let Sv,Af,_f;function HR(l){bf("dom",l),vf("dom",BR)}function BR(){if(!cn.document)return;const l=qo.bind(null,"dom"),t=Ev(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")&&(lu(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=Ev(l);g.handler=y,c.call(this,u,y,p)}g.refCount++}catch{}return c.call(this,u,h,p)}}),lu(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!==Af)return!1;try{if(!l.target||l.target._sentryId!==_f)return!1}catch{}return!0}function FR(l,t){return l!=="keypress"?!1:t?.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}function Ev(l,t=!1){return i=>{if(!i||i._sentryCaptured)return;const a=$R(i);if(FR(i.type,a))return;Sf(i,"_sentryCaptured",!0),a&&!a._sentryId&&Sf(a,"_sentryId",NR());const r=i.type==="keypress"?"input":i.type;jR(i)||(l({event:i,name:r,global:t}),Af=i.type,_f=a?a._sentryId:void 0),clearTimeout(Sv),Sv=cn.setTimeout(()=>{_f=void 0,Af=void 0},zR)}}function $R(l){try{return l.target}catch{return null}}let cu;function Av(l){const t="history";bf(t,l),vf(t,GR)}function GR(){if(cn.addEventListener("popstate",()=>{const t=cn.location.href,i=cu;if(cu=t,i===t)return;qo("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=cu,c=VR(String(a));if(cu=c,r===c)return t.apply(this,i);qo("history",{from:r,to:c})}return t.apply(this,i)}}lu(cn.history,"pushState",l),lu(cn.history,"replaceState",l)}function VR(l){try{return new URL(l,cn.location.origin).toString()}catch{return l}}const uu={};function qR(l){const t=uu[l];if(t)return t;let i=cn[l];if(PR(i))return uu[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&&Vo.warn(`Could not create sandbox iframe for ${l} check, bailing to window.${l}: `,r)}return i&&(uu[l]=i.bind(cn))}function _v(l){uu[l]=void 0}const Yo="__sentry_xhr_v3__";function YR(l){bf("xhr",l),vf("xhr",XR)}function XR(){if(!cn.XMLHttpRequest)return;const l=XMLHttpRequest.prototype;l.open=new Proxy(l.open,{apply(t,i,a){const r=new Error,c=Ef()*1e3,u=ou(a[0])?a[0].toUpperCase():void 0,h=WR(a[1]);if(!u||!h)return t.apply(i,a);i[Yo]={method:u,url:h,request_headers:{}},u==="POST"&&h.match(/sentry_key/)&&(i.__sentry_own_request__=!0);const p=()=>{const m=i[Yo];if(m&&i.readyState===4){try{m.status_code=i.status}catch{}const g={endTimestamp:Ef()*1e3,startTimestamp:c,xhr:i,virtualError:r};qo("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[Yo];return A&&ou(b)&&ou(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[Yo];if(!r)return t.apply(i,a);a[0]!==void 0&&(r.body=a[0]);const c={startTimestamp:Ef()*1e3,xhr:i};return qo("xhr",c),t.apply(i,a)}})}function WR(l){if(ou(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 _v("fetch"),tu("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 _v("fetch"),i-=u,a--,tu(p)}}return TC(l,r)}const KR=30,ZR=50;function Tf(l,t,i,a){const r={filename:l,function:t==="<anonymous>"?va: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 Tf(r,va,+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]=Tv(a[1]||va,a[2]);return Tf(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=qy(...[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]||va;return[r,a]=Tv(r,a),Tf(a,r,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]]),Tv=(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]:va,i?`safari-extension:${t}`:`safari-web-extension:${t}`]:[l,t]},du=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,hu=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&&FC(dD(i)),t.dom&&HR(uD(i,t.dom)),t.xhr&&YR(hD(i)),t.fetch&&ZC(fD(i)),t.history&&Av(pD(i)),t.sentry&&i.on("beforeSendEvent",cD(i))}}};function cD(l){return function(i){ln()===l&&Aa({category:`sentry.${i.type==="transaction"?"transaction":"event"}`,event_id:i.event_id,level:i.level,message:Sa(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>hu&&(du&&Tt.warn(`\`dom.maxStringLength\` cannot exceed ${hu}, but a value of ${h} was configured. Sentry will use ${hu} instead.`),h=hu),typeof u=="string"&&(u=[u]);try{const m=a.event,g=mD(m)?m.target:m;r=Jy(g,{keyAttrs:u,maxStringLength:h}),c=Ew(g)}catch{r="<unknown>"}if(r.length===0)return;const p={category:`ui.${a.name}`,message:r};c&&(p.data={"ui.component_name":c}),Aa(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:tb(i.args," ")};if(i.level==="assert")if(i.args[0]===!1)a.message=`Assertion failed: ${tb(i.args.slice(1)," ")||"console.assert"}`,a.data.arguments=i.args.slice(1);else return;Aa(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[Yo];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:lv(p)};l.emit("beforeOutgoingRequestBreadcrumb",b,y),Aa(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),Aa(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:lv(u.status_code)};l.emit("beforeOutgoingRequestBreadcrumb",p,h),Aa(p,h)}}}function pD(l){return function(i){if(ln()!==l)return;let a=i.from,r=i.to;const c=af(Ee.location.href);let u=a?af(a):void 0;const h=af(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),Aa({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&&Ji(Ee,"setTimeout",wv),t.setInterval&&Ji(Ee,"setInterval",wv),t.requestAnimationFrame&&Ji(Ee,"requestAnimationFrame",vD),t.XMLHttpRequest&&"XMLHttpRequest"in Ee&&Ji(XMLHttpRequest.prototype,"send",SD);const i=t.eventTarget;i&&(Array.isArray(i)?i:gD).forEach(r=>ED(r,t))}}};function wv(l){return function(...t){const i=t[0];return t[0]=Er(i,{mechanism:{data:{function:Os(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:Os(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"&&Ji(i,r,function(c){const u={mechanism:{data:{function:r,handler:Os(c)},handled:!1,type:"instrument"}},h=Vh(c);return h&&(u.mechanism.data.handler=Os(h)),Er(c,u)})}),l.apply(this,t)}}function ED(l,t){const a=Ee[l]?.prototype;a?.hasOwnProperty?.("addEventListener")&&(Ji(a,"addEventListener",function(r){return function(c,u,h){try{AD(u)&&(u.handleEvent=Er(u.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Os(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:Os(u),target:l},handled:!1,type:"instrument"}}),h])}}),Ji(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 Ee.document>"u"){du&&Tt.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}Ub({ignoreDuration:!0}),Bb(),Av(({from:l,to:t})=>{l!==void 0&&l!==t&&(Ub({ignoreDuration:!0}),Bb())})}}),wD="GlobalHandlers",xD=(l={})=>{const t={onerror:!0,onunhandledrejection:!0,...l};return{name:wD,setupOnce(){Error.stackTraceLimit=50},setup(i){t.onerror&&(CD(i),xv("onerror")),t.onunhandledrejection&&(RD(i),xv("onunhandledrejection"))}}};function CD(l){uw(t=>{const{stackParser:i,attachStacktrace:a}=Cv();if(ln()!==l||dv())return;const{msg:r,url:c,line:u,column:h,error:p}=t,m=OD(ff(i,p||r,void 0,a,!1),c,u,h);m.level="error",Pb(m,{originalException:p,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}function RD(l){hw(t=>{const{stackParser:i,attachStacktrace:a}=Cv();if(ln()!==l||dv())return;const r=DD(t),c=Fh(r)?MD(r):ff(i,r,void 0,a,!0);c.level="error",Pb(c,{originalException:r,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}function DD(l){if(Fh(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=ND(t)??Gh();return p.length===0&&p.push({colno:m,filename:y,function:va,in_app:!0,lineno:g}),l}function xv(l){du&&Tt.log(`Global Handler attached: ${l}`)}function Cv(){return ln()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function ND(l){if(!(!zo(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 kD=()=>({name:"HttpContext",preprocessEvent(l){if(!Ee.navigator&&!Ee.location&&!Ee.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();jC(uf,u.stackParser,i,t,a,r)}}};function zD(){return HD()?(du&&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 Ee.window>"u")return!1;const l=Ee;if(l.nw||!(l.chrome||l.browser)?.runtime?.id)return!1;const i=Gh(),a=["chrome-extension","moz-extension","ms-browser-extension","safari-web-extension"];return!(Ee===Ee.top&&a.some(c=>i.startsWith(`${c}://`)))}function BD(l){return[kC(),DC(),bD(),lD(),xD(),UD(),qC(),kD(),TD()]}function jD(l={}){const t=!l.skipBrowserExtensionCheck&&zD(),i={...l,enabled:t?!1:l.enabled,stackParser:lw(l.stackParser||rD),integrations:sC({integrations:l.integrations,defaultIntegrations:l.defaultIntegrations==null?BD():l.defaultIntegrations}),transport:l.transport||QR};return mC(yR,i)}class FD{config;debug;logLevel;lastMessage=null;lastMessageCount=0;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";logMessage(t,i,a,...r){if(!a)return;const c=`[${this.getTimestamp()}] ${this.BASE} ${t}] ${i}`;if(this.lastMessage===c)this.lastMessageCount++;else{if(this.lastMessageCount>1&&this.lastMessage){const u=this.lastMessage.split("] "),h=u[1],p=u.slice(2).join("] "),m=`[${this.getTimestamp()}] ${this.BASE} ${t}] (x${this.lastMessageCount}) ${p}`;h.includes("Error")?console.error(m,...r):h.includes("Warning")?console.warn(m,...r):console.log(m,...r)}t.includes("Error")?console.error(c,...r):t.includes("Warning")?console.warn(c,...r):console.log(c,...r),this.lastMessage=c,this.lastMessageCount=0}}detail(t,...i){this.logMessage("Detail",t,this.debug&&this.logLevel>=2,...i)}info(t,...i){this.logMessage("Info",t,this.debug&&this.logLevel>=1,...i)}warn(t,...i){this.logMessage("Warning",t,this.debug,...i)}error(t,...i){this.logMessage("Error",t,this.debug,...i),this.debug&&Ib(new Error(t),{extra:{args:i}})}}const k=new FD;function $D(){const l=Xt.action_map?.flatMap(t=>t.allowed_hosts||[]).filter(Boolean);return Array.from(new Set(l))}function Rv(l){const t=$D();if(!l)return!1;for(const i of t)try{if(new RegExp(i.slice(1,-1)).test(l))return!0}catch(a){k.error(`Padrão de host inválido: ${i}`,a)}return!1}function GD(){const l=[];return Xt.action_map?.forEach(t=>{Object.keys(t.mapping).forEach(i=>{l.push({url:i,allowedHosts:t.allowed_hosts||[]})})}),l}function Dv(l){try{const t=GD();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!0}catch(c){k.error(`Erro ao verificar host permitido: ${r}`,c)}return!1}catch(t){return console.error("Erro ao verificar URL mapeada:",t),!1}}function fu(l,t){const i=l.split(".").map(Number),a=t.split(".").map(Number),r=Math.max(i.length,a.length);for(let c=0;c<r;c++){const u=i[c]||0,h=a[c]||0;if(u>h)return 1;if(u<h)return-1}return 0}function VD(l,t){try{for(const i of Xt.action_map)if(Rv(l))for(const[a,r]of Object.entries(i.mapping)){if(a==="/*"&&r===null)continue;if(new RegExp(a.slice(1,-1)).test(l))return i.actions.filter(h=>{const p=r.includes(h.job);return!t||!p?p:fu(t,h.versao_min)>=0&&fu(t,h.versao_max)<=0})}}catch(i){k.error("Erro ao obter actions para URL:",i)}return[]}function qD(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var wf={exports:{}},Xo={exports:{}};Xo.exports;var Mv;function YD(){return Mv||(Mv=1,function(l,t){/**
19
19
  * @license React
20
20
  * react.development.js
21
21
  *
@@ -23,7 +23,7 @@ Error:`,r)}}const RR=Object.prototype.toString;function DR(l,t){return RR.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,I){Object.defineProperty(c.prototype,T,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",I[0],I[1])}})}function a(T){return T===null||typeof T!="object"?null:(T=Pn&&T[Pn]||T["@@iterator"],typeof T=="function"?T:null)}function r(T,I){T=(T=T.constructor)&&(T.displayName||T.name)||"ReactClass";var et=T+"."+I;ss[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.",I,T),ss[et]=!0)}function c(T,I,et){this.props=T,this.context=I,this.refs=hl,this.updater=et||mi}function u(){}function h(T,I,et){this.props=T,this.context=I,this.refs=hl,this.updater=et||mi}function p(T){return""+T}function m(T){try{p(T);var I=!1}catch{I=!0}if(I){I=console;var et=I.error,it=typeof Symbol=="function"&&Symbol.toStringTag&&T[Symbol.toStringTag]||T.constructor.name||"Object";return et.call(I,"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===mp?null:T.displayName||T.name||null;if(typeof T=="string")return T;switch(T){case W:return"Fragment";case Q:return"Profiler";case dt:return"StrictMode";case At: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 wt:return"Portal";case Vt:return(T.displayName||"Context")+".Provider";case vt:return(T._context.displayName||"Context")+".Consumer";case ae:var I=T.render;return T=T.displayName,T||(T=I.displayName||I.name||"",T=T!==""?"ForwardRef("+T+")":"ForwardRef"),T;case Kt:return I=T.displayName||null,I!==null?I:g(T.type)||"Memo";case Te:I=T._payload,T=T._init;try{return g(T(I))}catch{}}return null}function y(T){if(T===W)return"<>";if(typeof T=="object"&&T!==null&&T.$$typeof===Te)return"<...>";try{var I=g(T);return I?"<"+I+">":"<...>"}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 I=Object.getOwnPropertyDescriptor(T,"key").get;if(I&&I.isReactWarning)return!1}return T.key!==void 0}function _(T,I){function et(){Fs||(Fs=!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)",I))}et.isReactWarning=!0,Object.defineProperty(T,"key",{get:et,configurable:!0})}function R(){var T=g(this.type);return fl[T]||(fl[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,I,et,it,ht,Lt,Ot,qt){return et=Lt.ref,T={$$typeof:ut,type:T,key:I,props:Lt,_owner:ht},(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,I){return I=x(T.type,I,void 0,void 0,T._owner,T.props,T._debugStack,T._debugTask),T._store&&(I._store.validated=T._store.validated),I}function N(T){return typeof T=="object"&&T!==null&&T.$$typeof===ut}function U(T){var I={"=":"=0",":":"=2"};return"$"+T.replace(/[=:]/g,function(et){return I[et]})}function P(T,I){return typeof T=="object"&&T!==null&&T.key!=null?(m(T.key),U(""+T.key)):I.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(I){T.status==="pending"&&(T.status="fulfilled",T.value=I)},function(I){T.status==="pending"&&(T.status="rejected",T.reason=I)})),T.status){case"fulfilled":return T.value;case"rejected":throw T.reason}}throw T}function tt(T,I,et,it,ht){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 ut:case wt:Ot=!0;break;case Te:return Ot=T._init,tt(Ot(T._payload),I,et,it,ht)}}if(Ot){Ot=T,ht=ht(Ot);var qt=it===""?"."+P(Ot,0):it;return Bs(ht)?(et="",qt!=null&&(et=qt.replace(gl,"$&/")+"/"),tt(ht,I,et,"",function(Fe){return Fe})):ht!=null&&(N(ht)&&(ht.key!=null&&(Ot&&Ot.key===ht.key||m(ht.key)),et=L(ht,et+(ht.key==null||Ot&&Ot.key===ht.key?"":(""+ht.key).replace(gl,"$&/")+"/")+qt),it!==""&&Ot!=null&&N(Ot)&&Ot.key==null&&Ot._store&&!Ot._store.validated&&(et._store.validated=2),ht=et),I.push(ht)),1}if(Ot=0,qt=it===""?".":it+":",Bs(T))for(var Nt=0;Nt<T.length;Nt++)it=T[Nt],Lt=qt+P(it,Nt),Ot+=tt(it,I,et,Lt,ht);else if(Nt=a(T),typeof Nt=="function")for(Nt===T.entries&&(ml||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),ml=!0),T=Nt.call(T),Nt=0;!(it=T.next()).done;)it=it.value,Lt=qt+P(it,Nt++),Ot+=tt(it,I,et,Lt,ht);else if(Lt==="object"){if(typeof T.then=="function")return tt(F(T),I,et,it,ht);throw I=String(T),Error("Objects are not valid as a React child (found: "+(I==="[object Object]"?"object with keys {"+Object.keys(T).join(", ")+"}":I)+"). If you meant to render a collection of children, use an array instead.")}return Ot}function X(T,I,et){if(T==null)return T;var it=[],ht=0;return tt(T,it,"","",function(Lt){return I.call(et,Lt,ht++)}),it}function st(T){if(T._status===-1){var I=T._result;I=I(),I.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=I)}if(T._status===1)return I=T._result,I===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
26
+ */(function(){function i(T,I){Object.defineProperty(c.prototype,T,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",I[0],I[1])}})}function a(T){return T===null||typeof T!="object"?null:(T=Pn&&T[Pn]||T["@@iterator"],typeof T=="function"?T:null)}function r(T,I){T=(T=T.constructor)&&(T.displayName||T.name)||"ReactClass";var et=T+"."+I;ss[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.",I,T),ss[et]=!0)}function c(T,I,et){this.props=T,this.context=I,this.refs=hl,this.updater=et||mi}function u(){}function h(T,I,et){this.props=T,this.context=I,this.refs=hl,this.updater=et||mi}function p(T){return""+T}function m(T){try{p(T);var I=!1}catch{I=!0}if(I){I=console;var et=I.error,it=typeof Symbol=="function"&&Symbol.toStringTag&&T[Symbol.toStringTag]||T.constructor.name||"Object";return et.call(I,"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===mp?null:T.displayName||T.name||null;if(typeof T=="string")return T;switch(T){case W:return"Fragment";case Q:return"Profiler";case dt:return"StrictMode";case At: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 wt:return"Portal";case Vt:return(T.displayName||"Context")+".Provider";case vt:return(T._context.displayName||"Context")+".Consumer";case ae:var I=T.render;return T=T.displayName,T||(T=I.displayName||I.name||"",T=T!==""?"ForwardRef("+T+")":"ForwardRef"),T;case Kt:return I=T.displayName||null,I!==null?I:g(T.type)||"Memo";case Te:I=T._payload,T=T._init;try{return g(T(I))}catch{}}return null}function y(T){if(T===W)return"<>";if(typeof T=="object"&&T!==null&&T.$$typeof===Te)return"<...>";try{var I=g(T);return I?"<"+I+">":"<...>"}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 I=Object.getOwnPropertyDescriptor(T,"key").get;if(I&&I.isReactWarning)return!1}return T.key!==void 0}function _(T,I){function et(){js||(js=!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)",I))}et.isReactWarning=!0,Object.defineProperty(T,"key",{get:et,configurable:!0})}function C(){var T=g(this.type);return fl[T]||(fl[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 R(T,I,et,it,ht,Lt,Ot,qt){return et=Lt.ref,T={$$typeof:ut,type:T,key:I,props:Lt,_owner:ht},(et!==void 0?et:null)!==null?Object.defineProperty(T,"ref",{enumerable:!1,get:C}):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,I){return I=R(T.type,I,void 0,void 0,T._owner,T.props,T._debugStack,T._debugTask),T._store&&(I._store.validated=T._store.validated),I}function O(T){return typeof T=="object"&&T!==null&&T.$$typeof===ut}function U(T){var I={"=":"=0",":":"=2"};return"$"+T.replace(/[=:]/g,function(et){return I[et]})}function P(T,I){return typeof T=="object"&&T!==null&&T.key!=null?(m(T.key),U(""+T.key)):I.toString(36)}function F(){}function j(T){switch(T.status){case"fulfilled":return T.value;case"rejected":throw T.reason;default:switch(typeof T.status=="string"?T.then(F,F):(T.status="pending",T.then(function(I){T.status==="pending"&&(T.status="fulfilled",T.value=I)},function(I){T.status==="pending"&&(T.status="rejected",T.reason=I)})),T.status){case"fulfilled":return T.value;case"rejected":throw T.reason}}throw T}function tt(T,I,et,it,ht){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 ut:case wt:Ot=!0;break;case Te:return Ot=T._init,tt(Ot(T._payload),I,et,it,ht)}}if(Ot){Ot=T,ht=ht(Ot);var qt=it===""?"."+P(Ot,0):it;return Bs(ht)?(et="",qt!=null&&(et=qt.replace(gl,"$&/")+"/"),tt(ht,I,et,"",function(je){return je})):ht!=null&&(O(ht)&&(ht.key!=null&&(Ot&&Ot.key===ht.key||m(ht.key)),et=L(ht,et+(ht.key==null||Ot&&Ot.key===ht.key?"":(""+ht.key).replace(gl,"$&/")+"/")+qt),it!==""&&Ot!=null&&O(Ot)&&Ot.key==null&&Ot._store&&!Ot._store.validated&&(et._store.validated=2),ht=et),I.push(ht)),1}if(Ot=0,qt=it===""?".":it+":",Bs(T))for(var Nt=0;Nt<T.length;Nt++)it=T[Nt],Lt=qt+P(it,Nt),Ot+=tt(it,I,et,Lt,ht);else if(Nt=a(T),typeof Nt=="function")for(Nt===T.entries&&(ml||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),ml=!0),T=Nt.call(T),Nt=0;!(it=T.next()).done;)it=it.value,Lt=qt+P(it,Nt++),Ot+=tt(it,I,et,Lt,ht);else if(Lt==="object"){if(typeof T.then=="function")return tt(j(T),I,et,it,ht);throw I=String(T),Error("Objects are not valid as a React child (found: "+(I==="[object Object]"?"object with keys {"+Object.keys(T).join(", ")+"}":I)+"). If you meant to render a collection of children, use an array instead.")}return Ot}function X(T,I,et){if(T==null)return T;var it=[],ht=0;return tt(T,it,"","",function(Lt){return I.call(et,Lt,ht++)}),it}function st(T){if(T._status===-1){var I=T._result;I=I(),I.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=I)}if(T._status===1)return I=T._result,I===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 ot(){}function St(T){if(Ir===null)try{var I=("require"+Math.random()).slice(0,7);Ir=(l&&l[I]).call(l,"timers").setImmediate}catch{Ir=function(it){yl===!1&&(yl=!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 ht=new MessageChannel;ht.port1.onmessage=it,ht.port2.postMessage(void 0)}}return Ir(T)}function yt(T){return 1<T.length&&typeof AggregateError=="function"?new AggregateError(T):T[0]}function Gt(T,I){I!==js-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. "),js=I}function B(T,I,et){var it=Pt.actQueue;if(it!==null)if(it.length!==0)try{K(it),St(function(){return B(T,I,et)});return}catch(ht){Pt.thrownErrors.push(ht)}else Pt.actQueue=null;0<Pt.thrownErrors.length?(it=yt(Pt.thrownErrors),Pt.thrownErrors.length=0,et(it)):I(T)}function K(T){if(!yi){yi=!0;var I=0;try{for(;I<T.length;I++){var et=T[I];do{Pt.didUsePromise=!1;var it=et(!1);if(it!==null){if(Pt.didUsePromise){T[I]=et,T.splice(0,I);return}et=it}else break}while(!0)}T.length=0}catch(ht){T.splice(0,I+1),Pt.thrownErrors.push(ht)}finally{yi=!1}}}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var ut=Symbol.for("react.transitional.element"),wt=Symbol.for("react.portal"),W=Symbol.for("react.fragment"),dt=Symbol.for("react.strict_mode"),Q=Symbol.for("react.profiler"),vt=Symbol.for("react.consumer"),Vt=Symbol.for("react.context"),ae=Symbol.for("react.forward_ref"),At=Symbol.for("react.suspense"),Wt=Symbol.for("react.suspense_list"),Kt=Symbol.for("react.memo"),Te=Symbol.for("react.lazy"),Xe=Symbol.for("react.activity"),Pn=Symbol.iterator,ss={},mi={isMounted:function(){return!1},enqueueForceUpdate:function(T){r(T,"forceUpdate")},enqueueReplaceState:function(T){r(T,"replaceState")},enqueueSetState:function(T){r(T,"setState")}},Nr=Object.assign,hl={};Object.freeze(hl),c.prototype.isReactComponent={},c.prototype.setState=function(T,I){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,I,"setState")},c.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,"forceUpdate")};var ke={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)."]},as;for(as in ke)ke.hasOwnProperty(as)&&i(as,ke[as]);u.prototype=c.prototype,ke=h.prototype=new u,ke.constructor=h,Nr(ke,c.prototype),ke.isPureReactComponent=!0;var Bs=Array.isArray,mp=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};ke={"react-stack-bottom-frame":function(T){return T()}};var Fs,Uu,fl={},zu=ke["react-stack-bottom-frame"].bind(ke,S)(),pl=kr(y(S)),ml=!1,gl=/\/+/g,Lr=typeof reportError=="function"?reportError:function(T){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var I=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(I))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",T);return}console.error(T)},yl=!1,Ir=null,js=0,gi=!1,yi=!1,$s=typeof queueMicrotask=="function"?function(T){queueMicrotask(function(){return queueMicrotask(T)})}:St;ke=Object.freeze({__proto__:null,c:function(T){return Z().useMemoCache(T)}}),t.Children={map:X,forEach:function(T,I,et){X(T,function(){I.apply(this,arguments)},et)},count:function(T){var I=0;return X(T,function(){I++}),I},toArray:function(T){return X(T,function(I){return I})||[]},only:function(T){if(!N(T))throw Error("React.Children.only expected to receive a single React element child.");return T}},t.Component=c,t.Fragment=W,t.Profiler=Q,t.PureComponent=h,t.StrictMode=dt,t.Suspense=At,t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Pt,t.__COMPILER_RUNTIME=ke,t.act=function(T){var I=Pt.actQueue,et=js;js++;var it=Pt.actQueue=I!==null?I:[],ht=!1;try{var Lt=T()}catch(Nt){Pt.thrownErrors.push(Nt)}if(0<Pt.thrownErrors.length)throw Gt(I,et),T=yt(Pt.thrownErrors),Pt.thrownErrors.length=0,T;if(Lt!==null&&typeof Lt=="object"&&typeof Lt.then=="function"){var Ot=Lt;return $s(function(){ht||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(Nt,Fe){ht=!0,Ot.then(function(rs){if(Gt(I,et),et===0){try{K(it),St(function(){return B(rs,Nt,Fe)})}catch(yp){Pt.thrownErrors.push(yp)}if(0<Pt.thrownErrors.length){var gp=yt(Pt.thrownErrors);Pt.thrownErrors.length=0,Fe(gp)}}else Nt(rs)},function(rs){Gt(I,et),0<Pt.thrownErrors.length&&(rs=yt(Pt.thrownErrors),Pt.thrownErrors.length=0),Fe(rs)})}}}var qt=Lt;if(Gt(I,et),et===0&&(K(it),it.length!==0&&$s(function(){ht||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=yt(Pt.thrownErrors),Pt.thrownErrors.length=0,T;return{then:function(Nt,Fe){ht=!0,et===0?(Pt.actQueue=it,St(function(){return B(qt,Nt,Fe)})):Nt(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,I,et){if(T==null)throw Error("The argument must be a React element, but you passed "+T+".");var it=Nr({},T.props),ht=T.key,Lt=T._owner;if(I!=null){var Ot;t:{if(Oa.call(I,"ref")&&(Ot=Object.getOwnPropertyDescriptor(I,"ref").get)&&Ot.isReactWarning){Ot=!1;break t}Ot=I.ref!==void 0}Ot&&(Lt=b()),A(I)&&(m(I.key),ht=""+I.key);for(qt in I)!Oa.call(I,qt)||qt==="key"||qt==="__self"||qt==="__source"||qt==="ref"&&I.ref===void 0||(it[qt]=I[qt])}var qt=arguments.length-2;if(qt===1)it.children=et;else if(1<qt){Ot=Array(qt);for(var Nt=0;Nt<qt;Nt++)Ot[Nt]=arguments[Nt+2];it.children=Ot}for(it=x(T.type,ht,void 0,void 0,Lt,it,T._debugStack,T._debugTask),ht=2;ht<arguments.length;ht++)Lt=arguments[ht],N(Lt)&&Lt._store&&(Lt._store.validated=1);return it},t.createContext=function(T){return T={$$typeof:Vt,_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,I,et){for(var it=2;it<arguments.length;it++){var ht=arguments[it];N(ht)&&ht._store&&(ht._store.validated=1)}if(it={},ht=null,I!=null)for(Nt in Uu||!("__self"in I)||"key"in I||(Uu=!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(I)&&(m(I.key),ht=""+I.key),I)Oa.call(I,Nt)&&Nt!=="key"&&Nt!=="__self"&&Nt!=="__source"&&(it[Nt]=I[Nt]);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(Nt in Lt=T.defaultProps,Lt)it[Nt]===void 0&&(it[Nt]=Lt[Nt]);ht&&_(it,typeof T=="function"?T.displayName||T.name||"Unknown":T);var Nt=1e4>Pt.recentlyCreatedOwnerStacks++;return x(T,ht,void 0,void 0,b(),it,Nt?Error("react-stack-top-frame"):zu,Nt?kr(y(T)):pl)},t.createRef=function(){var T={current:null};return Object.seal(T),T},t.forwardRef=function(T){T!=null&&T.$$typeof===Kt?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 I={$$typeof:ae,render:T},et;return Object.defineProperty(I,"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)}}),I},t.isValidElement=N,t.lazy=function(T){return{$$typeof:Te,_payload:{_status:-1,_result:T},_init:st}},t.memo=function(T,I){T==null&&console.error("memo: The first argument must be a component. Instead received: %s",T===null?"null":typeof T),I={$$typeof:Kt,type:T,compare:I===void 0?null:I};var et;return Object.defineProperty(I,"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)}}),I},t.startTransition=function(T){var I=Pt.T,et={};Pt.T=et,et._updatedFibers=new Set;try{var it=T(),ht=Pt.S;ht!==null&&ht(et,it),typeof it=="object"&&it!==null&&typeof it.then=="function"&&it.then(ot,Lr)}catch(Lt){Lr(Lt)}finally{I===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=I}},t.unstable_useCacheRefresh=function(){return Z().useCacheRefresh()},t.use=function(T){return Z().use(T)},t.useActionState=function(T,I,et){return Z().useActionState(T,I,et)},t.useCallback=function(T,I){return Z().useCallback(T,I)},t.useContext=function(T){var I=Z();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?"),I.useContext(T)},t.useDebugValue=function(T,I){return Z().useDebugValue(T,I)},t.useDeferredValue=function(T,I){return Z().useDeferredValue(T,I)},t.useEffect=function(T,I,et){T==null&&console.warn("React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?");var it=Z();if(typeof et=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return it.useEffect(T,I)},t.useId=function(){return Z().useId()},t.useImperativeHandle=function(T,I,et){return Z().useImperativeHandle(T,I,et)},t.useInsertionEffect=function(T,I){return T==null&&console.warn("React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"),Z().useInsertionEffect(T,I)},t.useLayoutEffect=function(T,I){return T==null&&console.warn("React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"),Z().useLayoutEffect(T,I)},t.useMemo=function(T,I){return Z().useMemo(T,I)},t.useOptimistic=function(T,I){return Z().useOptimistic(T,I)},t.useReducer=function(T,I,et){return Z().useReducer(T,I,et)},t.useRef=function(T){return Z().useRef(T)},t.useState=function(T){return Z().useState(T)},t.useSyncExternalStore=function(T,I,et){return Z().useSyncExternalStore(T,I,et)},t.useTransition=function(){return Z().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 Ov;function pu(){return Ov||(Ov=1,wf.exports=YD()),wf.exports}var En=pu();const XD=qD(En);var xf={exports:{}},Wo={},Cf={exports:{}},Rf={},Nv;function WD(){return Nv||(Nv=1,function(l){/**
38
+ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),T}function ot(){}function St(T){if(Ir===null)try{var I=("require"+Math.random()).slice(0,7);Ir=(l&&l[I]).call(l,"timers").setImmediate}catch{Ir=function(it){yl===!1&&(yl=!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 ht=new MessageChannel;ht.port1.onmessage=it,ht.port2.postMessage(void 0)}}return Ir(T)}function yt(T){return 1<T.length&&typeof AggregateError=="function"?new AggregateError(T):T[0]}function Gt(T,I){I!==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=I}function B(T,I,et){var it=Pt.actQueue;if(it!==null)if(it.length!==0)try{K(it),St(function(){return B(T,I,et)});return}catch(ht){Pt.thrownErrors.push(ht)}else Pt.actQueue=null;0<Pt.thrownErrors.length?(it=yt(Pt.thrownErrors),Pt.thrownErrors.length=0,et(it)):I(T)}function K(T){if(!yi){yi=!0;var I=0;try{for(;I<T.length;I++){var et=T[I];do{Pt.didUsePromise=!1;var it=et(!1);if(it!==null){if(Pt.didUsePromise){T[I]=et,T.splice(0,I);return}et=it}else break}while(!0)}T.length=0}catch(ht){T.splice(0,I+1),Pt.thrownErrors.push(ht)}finally{yi=!1}}}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var ut=Symbol.for("react.transitional.element"),wt=Symbol.for("react.portal"),W=Symbol.for("react.fragment"),dt=Symbol.for("react.strict_mode"),Q=Symbol.for("react.profiler"),vt=Symbol.for("react.consumer"),Vt=Symbol.for("react.context"),ae=Symbol.for("react.forward_ref"),At=Symbol.for("react.suspense"),Wt=Symbol.for("react.suspense_list"),Kt=Symbol.for("react.memo"),Te=Symbol.for("react.lazy"),Xe=Symbol.for("react.activity"),Pn=Symbol.iterator,ss={},mi={isMounted:function(){return!1},enqueueForceUpdate:function(T){r(T,"forceUpdate")},enqueueReplaceState:function(T){r(T,"replaceState")},enqueueSetState:function(T){r(T,"setState")}},Nr=Object.assign,hl={};Object.freeze(hl),c.prototype.isReactComponent={},c.prototype.setState=function(T,I){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,I,"setState")},c.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,"forceUpdate")};var ke={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)."]},as;for(as in ke)ke.hasOwnProperty(as)&&i(as,ke[as]);u.prototype=c.prototype,ke=h.prototype=new u,ke.constructor=h,Nr(ke,c.prototype),ke.isPureReactComponent=!0;var Bs=Array.isArray,mp=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};ke={"react-stack-bottom-frame":function(T){return T()}};var js,Uu,fl={},zu=ke["react-stack-bottom-frame"].bind(ke,S)(),pl=kr(y(S)),ml=!1,gl=/\/+/g,Lr=typeof reportError=="function"?reportError:function(T){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var I=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(I))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",T);return}console.error(T)},yl=!1,Ir=null,Fs=0,gi=!1,yi=!1,$s=typeof queueMicrotask=="function"?function(T){queueMicrotask(function(){return queueMicrotask(T)})}:St;ke=Object.freeze({__proto__:null,c:function(T){return Z().useMemoCache(T)}}),t.Children={map:X,forEach:function(T,I,et){X(T,function(){I.apply(this,arguments)},et)},count:function(T){var I=0;return X(T,function(){I++}),I},toArray:function(T){return X(T,function(I){return I})||[]},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=Q,t.PureComponent=h,t.StrictMode=dt,t.Suspense=At,t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Pt,t.__COMPILER_RUNTIME=ke,t.act=function(T){var I=Pt.actQueue,et=Fs;Fs++;var it=Pt.actQueue=I!==null?I:[],ht=!1;try{var Lt=T()}catch(Nt){Pt.thrownErrors.push(Nt)}if(0<Pt.thrownErrors.length)throw Gt(I,et),T=yt(Pt.thrownErrors),Pt.thrownErrors.length=0,T;if(Lt!==null&&typeof Lt=="object"&&typeof Lt.then=="function"){var Ot=Lt;return $s(function(){ht||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(Nt,je){ht=!0,Ot.then(function(rs){if(Gt(I,et),et===0){try{K(it),St(function(){return B(rs,Nt,je)})}catch(yp){Pt.thrownErrors.push(yp)}if(0<Pt.thrownErrors.length){var gp=yt(Pt.thrownErrors);Pt.thrownErrors.length=0,je(gp)}}else Nt(rs)},function(rs){Gt(I,et),0<Pt.thrownErrors.length&&(rs=yt(Pt.thrownErrors),Pt.thrownErrors.length=0),je(rs)})}}}var qt=Lt;if(Gt(I,et),et===0&&(K(it),it.length!==0&&$s(function(){ht||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=yt(Pt.thrownErrors),Pt.thrownErrors.length=0,T;return{then:function(Nt,je){ht=!0,et===0?(Pt.actQueue=it,St(function(){return B(qt,Nt,je)})):Nt(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,I,et){if(T==null)throw Error("The argument must be a React element, but you passed "+T+".");var it=Nr({},T.props),ht=T.key,Lt=T._owner;if(I!=null){var Ot;t:{if(Oa.call(I,"ref")&&(Ot=Object.getOwnPropertyDescriptor(I,"ref").get)&&Ot.isReactWarning){Ot=!1;break t}Ot=I.ref!==void 0}Ot&&(Lt=b()),A(I)&&(m(I.key),ht=""+I.key);for(qt in I)!Oa.call(I,qt)||qt==="key"||qt==="__self"||qt==="__source"||qt==="ref"&&I.ref===void 0||(it[qt]=I[qt])}var qt=arguments.length-2;if(qt===1)it.children=et;else if(1<qt){Ot=Array(qt);for(var Nt=0;Nt<qt;Nt++)Ot[Nt]=arguments[Nt+2];it.children=Ot}for(it=R(T.type,ht,void 0,void 0,Lt,it,T._debugStack,T._debugTask),ht=2;ht<arguments.length;ht++)Lt=arguments[ht],O(Lt)&&Lt._store&&(Lt._store.validated=1);return it},t.createContext=function(T){return T={$$typeof:Vt,_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,I,et){for(var it=2;it<arguments.length;it++){var ht=arguments[it];O(ht)&&ht._store&&(ht._store.validated=1)}if(it={},ht=null,I!=null)for(Nt in Uu||!("__self"in I)||"key"in I||(Uu=!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(I)&&(m(I.key),ht=""+I.key),I)Oa.call(I,Nt)&&Nt!=="key"&&Nt!=="__self"&&Nt!=="__source"&&(it[Nt]=I[Nt]);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(Nt in Lt=T.defaultProps,Lt)it[Nt]===void 0&&(it[Nt]=Lt[Nt]);ht&&_(it,typeof T=="function"?T.displayName||T.name||"Unknown":T);var Nt=1e4>Pt.recentlyCreatedOwnerStacks++;return R(T,ht,void 0,void 0,b(),it,Nt?Error("react-stack-top-frame"):zu,Nt?kr(y(T)):pl)},t.createRef=function(){var T={current:null};return Object.seal(T),T},t.forwardRef=function(T){T!=null&&T.$$typeof===Kt?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 I={$$typeof:ae,render:T},et;return Object.defineProperty(I,"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)}}),I},t.isValidElement=O,t.lazy=function(T){return{$$typeof:Te,_payload:{_status:-1,_result:T},_init:st}},t.memo=function(T,I){T==null&&console.error("memo: The first argument must be a component. Instead received: %s",T===null?"null":typeof T),I={$$typeof:Kt,type:T,compare:I===void 0?null:I};var et;return Object.defineProperty(I,"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)}}),I},t.startTransition=function(T){var I=Pt.T,et={};Pt.T=et,et._updatedFibers=new Set;try{var it=T(),ht=Pt.S;ht!==null&&ht(et,it),typeof it=="object"&&it!==null&&typeof it.then=="function"&&it.then(ot,Lr)}catch(Lt){Lr(Lt)}finally{I===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=I}},t.unstable_useCacheRefresh=function(){return Z().useCacheRefresh()},t.use=function(T){return Z().use(T)},t.useActionState=function(T,I,et){return Z().useActionState(T,I,et)},t.useCallback=function(T,I){return Z().useCallback(T,I)},t.useContext=function(T){var I=Z();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?"),I.useContext(T)},t.useDebugValue=function(T,I){return Z().useDebugValue(T,I)},t.useDeferredValue=function(T,I){return Z().useDeferredValue(T,I)},t.useEffect=function(T,I,et){T==null&&console.warn("React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?");var it=Z();if(typeof et=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return it.useEffect(T,I)},t.useId=function(){return Z().useId()},t.useImperativeHandle=function(T,I,et){return Z().useImperativeHandle(T,I,et)},t.useInsertionEffect=function(T,I){return T==null&&console.warn("React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"),Z().useInsertionEffect(T,I)},t.useLayoutEffect=function(T,I){return T==null&&console.warn("React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"),Z().useLayoutEffect(T,I)},t.useMemo=function(T,I){return Z().useMemo(T,I)},t.useOptimistic=function(T,I){return Z().useOptimistic(T,I)},t.useReducer=function(T,I,et){return Z().useReducer(T,I,et)},t.useRef=function(T){return Z().useRef(T)},t.useState=function(T){return Z().useState(T)},t.useSyncExternalStore=function(T,I,et){return Z().useSyncExternalStore(T,I,et)},t.useTransition=function(){return Z().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 Ov;function pu(){return Ov||(Ov=1,wf.exports=YD()),wf.exports}var En=pu();const XD=qD(En);var xf={exports:{}},Wo={},Cf={exports:{}},Rf={},Nv;function WD(){return Nv||(Nv=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(P=!1,X){var B=l.unstable_now();ot=B;var K=!0;try{t:{N=!1,U&&(U=!1,F(st),st=-1),L=!0;var ut=x;try{e:{for(u(B),R=a(S);R!==null&&!(R.expirationTime>B&&p());){var wt=R.callback;if(typeof wt=="function"){R.callback=null,x=R.priorityLevel;var W=wt(R.expirationTime<=B);if(B=l.unstable_now(),typeof W=="function"){R.callback=W,u(B),K=!0;break e}R===a(S)&&r(S),u(B)}else r(S);R=a(S)}if(R!==null)K=!0;else{var dt=a(A);dt!==null&&m(h,dt.startTime-B),K=!1}}break t}finally{R=null,x=ut,L=!1}K=void 0}}finally{K?St():X=!1}}}function i(B,K){var ut=B.length;B.push(K);t:for(;0<ut;){var wt=ut-1>>>1,W=B[wt];if(0<c(W,K))B[wt]=K,B[ut]=W,ut=wt;else break t}}function a(B){return B.length===0?null:B[0]}function r(B){if(B.length===0)return null;var K=B[0],ut=B.pop();if(ut!==K){B[0]=ut;t:for(var wt=0,W=B.length,dt=W>>>1;wt<dt;){var Q=2*(wt+1)-1,vt=B[Q],Vt=Q+1,ae=B[Vt];if(0>c(vt,ut))Vt<W&&0>c(ae,vt)?(B[wt]=ae,B[Vt]=ut,wt=Vt):(B[wt]=vt,B[Q]=ut,wt=Q);else if(Vt<W&&0>c(ae,ut))B[wt]=ae,B[Vt]=ut,wt=Vt;else break t}}return K}function c(B,K){var ut=B.sortIndex-K.sortIndex;return ut!==0?ut:B.id-K.id}function u(B){for(var K=a(A);K!==null;){if(K.callback===null)r(A);else if(K.startTime<=B)r(A),K.sortIndex=K.expirationTime,i(S,K);else break;K=a(A)}}function h(B){if(U=!1,u(B),!N)if(a(S)!==null)N=!0,X||(X=!0,St());else{var K=a(A);K!==null&&m(h,K.startTime-B)}}function p(){return P?!0:!(l.unstable_now()-ot<Z)}function m(B,K){st=j(function(){B(l.unstable_now())},K)}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,N=!1,U=!1,P=!1,j=typeof setTimeout=="function"?setTimeout:null,F=typeof clearTimeout=="function"?clearTimeout:null,tt=typeof setImmediate<"u"?setImmediate:null,X=!1,st=-1,Z=5,ot=-1;if(typeof tt=="function")var St=function(){tt(t)};else if(typeof MessageChannel<"u"){var yt=new MessageChannel,Gt=yt.port2;yt.port1.onmessage=t,St=function(){Gt.postMessage(null)}}else St=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"):Z=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 K=3;break;default:K=x}var ut=x;x=K;try{return B()}finally{x=ut}},l.unstable_requestPaint=function(){P=!0},l.unstable_runWithPriority=function(B,K){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var ut=x;x=B;try{return K()}finally{x=ut}},l.unstable_scheduleCallback=function(B,K,ut){var wt=l.unstable_now();switch(typeof ut=="object"&&ut!==null?(ut=ut.delay,ut=typeof ut=="number"&&0<ut?wt+ut:wt):ut=wt,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=ut+W,B={id:_++,callback:K,priorityLevel:B,startTime:ut,expirationTime:W,sortIndex:-1},ut>wt?(B.sortIndex=ut,i(A,B),a(S)===null&&B===a(A)&&(U?(F(st),st=-1):U=!0,m(h,ut-wt))):(B.sortIndex=W,i(S,B),N||L||(N=!0,X||(X=!0,St()))),B},l.unstable_shouldYield=p,l.unstable_wrapCallback=function(B){var K=x;return function(){var ut=x;x=K;try{return B.apply(this,arguments)}finally{x=ut}}},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()}(Rf)),Rf}var kv;function QD(){return kv||(kv=1,Cf.exports=WD()),Cf.exports}var Df={exports:{}},nn={},Lv;function KD(){if(Lv)return nn;Lv=1;/**
46
+ */(function(){function t(){if(P=!1,X){var B=l.unstable_now();ot=B;var K=!0;try{t:{O=!1,U&&(U=!1,j(st),st=-1),L=!0;var ut=R;try{e:{for(u(B),C=a(S);C!==null&&!(C.expirationTime>B&&p());){var wt=C.callback;if(typeof wt=="function"){C.callback=null,R=C.priorityLevel;var W=wt(C.expirationTime<=B);if(B=l.unstable_now(),typeof W=="function"){C.callback=W,u(B),K=!0;break e}C===a(S)&&r(S),u(B)}else r(S);C=a(S)}if(C!==null)K=!0;else{var dt=a(A);dt!==null&&m(h,dt.startTime-B),K=!1}}break t}finally{C=null,R=ut,L=!1}K=void 0}}finally{K?St():X=!1}}}function i(B,K){var ut=B.length;B.push(K);t:for(;0<ut;){var wt=ut-1>>>1,W=B[wt];if(0<c(W,K))B[wt]=K,B[ut]=W,ut=wt;else break t}}function a(B){return B.length===0?null:B[0]}function r(B){if(B.length===0)return null;var K=B[0],ut=B.pop();if(ut!==K){B[0]=ut;t:for(var wt=0,W=B.length,dt=W>>>1;wt<dt;){var Q=2*(wt+1)-1,vt=B[Q],Vt=Q+1,ae=B[Vt];if(0>c(vt,ut))Vt<W&&0>c(ae,vt)?(B[wt]=ae,B[Vt]=ut,wt=Vt):(B[wt]=vt,B[Q]=ut,wt=Q);else if(Vt<W&&0>c(ae,ut))B[wt]=ae,B[Vt]=ut,wt=Vt;else break t}}return K}function c(B,K){var ut=B.sortIndex-K.sortIndex;return ut!==0?ut:B.id-K.id}function u(B){for(var K=a(A);K!==null;){if(K.callback===null)r(A);else if(K.startTime<=B)r(A),K.sortIndex=K.expirationTime,i(S,K);else break;K=a(A)}}function h(B){if(U=!1,u(B),!O)if(a(S)!==null)O=!0,X||(X=!0,St());else{var K=a(A);K!==null&&m(h,K.startTime-B)}}function p(){return P?!0:!(l.unstable_now()-ot<Z)}function m(B,K){st=F(function(){B(l.unstable_now())},K)}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,C=null,R=3,L=!1,O=!1,U=!1,P=!1,F=typeof setTimeout=="function"?setTimeout:null,j=typeof clearTimeout=="function"?clearTimeout:null,tt=typeof setImmediate<"u"?setImmediate:null,X=!1,st=-1,Z=5,ot=-1;if(typeof tt=="function")var St=function(){tt(t)};else if(typeof MessageChannel<"u"){var yt=new MessageChannel,Gt=yt.port2;yt.port1.onmessage=t,St=function(){Gt.postMessage(null)}}else St=function(){F(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"):Z=0<B?Math.floor(1e3/B):5},l.unstable_getCurrentPriorityLevel=function(){return R},l.unstable_next=function(B){switch(R){case 1:case 2:case 3:var K=3;break;default:K=R}var ut=R;R=K;try{return B()}finally{R=ut}},l.unstable_requestPaint=function(){P=!0},l.unstable_runWithPriority=function(B,K){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var ut=R;R=B;try{return K()}finally{R=ut}},l.unstable_scheduleCallback=function(B,K,ut){var wt=l.unstable_now();switch(typeof ut=="object"&&ut!==null?(ut=ut.delay,ut=typeof ut=="number"&&0<ut?wt+ut:wt):ut=wt,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=ut+W,B={id:_++,callback:K,priorityLevel:B,startTime:ut,expirationTime:W,sortIndex:-1},ut>wt?(B.sortIndex=ut,i(A,B),a(S)===null&&B===a(A)&&(U?(j(st),st=-1):U=!0,m(h,ut-wt))):(B.sortIndex=W,i(S,B),O||L||(O=!0,X||(X=!0,St()))),B},l.unstable_shouldYield=p,l.unstable_wrapCallback=function(B){var K=R;return function(){var ut=R;R=K;try{return B.apply(this,arguments)}finally{R=ut}}},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()}(Rf)),Rf}var kv;function QD(){return kv||(kv=1,Cf.exports=WD()),Cf.exports}var Df={exports:{}},nn={},Lv;function KD(){if(Lv)return nn;Lv=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=pu(),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 Iv;function ZD(){return Iv||(Iv=1,Df.exports=KD()),Df.exports}var Pv;function JD(){if(Pv)return Wo;Pv=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=pu(),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,C=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:C}):S==="script"&&p.d.X(y,{crossOrigin:A,integrity:_,fetchPriority:C,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 Iv;function ZD(){return Iv||(Iv=1,Df.exports=KD()),Df.exports}var Pv;function JD(){if(Pv)return Wo;Pv=1;/**
59
59
  * @license React
60
60
  * react-dom-client.development.js
61
61
  *
@@ -63,27 +63,27 @@ 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 CN(e,n,s,o)}function S(e,n){e.context===aa&&(fg(e.current,2,n,e,null,null),qr())}function A(e,n){if(ii!==null){var s=n.staleFamilies;n=n.updatedFamilies,$l(),Np(e.current,n,s),qr()}}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 N(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 N(d),e;if(f===o)return N(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 P(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=P(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===$k?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Jr:return"Fragment";case Sg:return"Profiler";case Hd:return"StrictMode";case Ag:return"Suspense";case _g:return"SuspenseList";case Tg: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 Zr:return"Portal";case Bi:return(e.displayName||"Context")+".Provider";case Eg:return(e._context.displayName||"Context")+".Consumer";case Zl:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Bd: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 tt(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===Hd?"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 st(e){return{current:e}}function Z(e,n){0>gs?console.error("Unexpected pop."):(n!==xg[gs]&&console.error("Unexpected Fiber popped."),e.current=wg[gs],wg[gs]=null,xg[gs]=null,gs--)}function ot(e,n,s){gs++,wg[gs]=e.current,xg[gs]=s,e.current=n}function St(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 yt(e,n){ot(ea,n,e),ot(Jl,e,e),ot(ta,null,e);var s=n.nodeType;switch(s){case 9:case 11:s=s===9?"#document":"#fragment",n=(n=n.documentElement)&&(n=n.namespaceURI)?YA(n):Rs;break;default:if(s=n.tagName,n=n.namespaceURI)n=YA(n),n=XA(n,s);else switch(s){case"svg":n=Io;break;case"math":n=xh;break;default:n=Rs}}s=s.toLowerCase(),s=iS(null,s),s={context:n,ancestorInfo:s},Z(ta,e),ot(ta,s,e)}function Gt(e){Z(ta,e),Z(Jl,e),Z(ea,e)}function B(){return St(ta.current)}function K(e){e.memoizedState!==null&&ot(Fd,e,e);var n=St(ta.current),s=e.type,o=XA(n.context,s);s=iS(n.ancestorInfo,s),o={context:o,ancestorInfo:s},n!==o&&(ot(Jl,e,e),ot(ta,o,e))}function ut(e){Jl.current===e&&(Z(ta,e),Z(Jl,e)),Fd.current===e&&(Z(Fd,e),Uc._currentValue=fr)}function wt(e){return typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}function W(e){try{return dt(e),!1}catch{return!0}}function dt(e){return""+e}function Q(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,wt(e)),dt(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,wt(e)),dt(e)}function Vt(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.",wt(e)),dt(e)}function ae(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{eo=n.inject(e),an=n}catch(s){console.error("React instrumentation encountered an error: %s.",s)}return!!n.checkDCE}function At(e){if(typeof Qk=="function"&&Kk(e),an&&typeof an.setStrictMode=="function")try{an.setStrictMode(eo,e)}catch(n){ji||(ji=!0,console.error("React instrumentation encountered an error: %s",n))}}function Wt(e){at=e}function Kt(){at!==null&&typeof at.markCommitStopped=="function"&&at.markCommitStopped()}function Te(e){at!==null&&typeof at.markComponentRenderStarted=="function"&&at.markComponentRenderStarted(e)}function Xe(){at!==null&&typeof at.markComponentRenderStopped=="function"&&at.markComponentRenderStopped()}function Pn(e){at!==null&&typeof at.markRenderStarted=="function"&&at.markRenderStarted(e)}function ss(){at!==null&&typeof at.markRenderStopped=="function"&&at.markRenderStopped()}function mi(e,n){at!==null&&typeof at.markStateUpdateScheduled=="function"&&at.markStateUpdateScheduled(e,n)}function Nr(e){return e>>>=0,e===0?32:31-(Zk(e)/Jk|0)|0}function hl(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 ke(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 as(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=ke(o):(v&=E,v!==0?d=ke(v):s||(s=E&~e,s!==0&&(d=ke(s))))):(E=o&~f,E!==0?d=ke(E):v!==0?d=ke(v):s||(s=o&~e,s!==0&&(d=ke(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 Bs(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function mp(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=jd;return jd<<=1,(jd&4194048)===0&&(jd=256),e}function Oa(){var e=$d;return $d<<=1,($d&62914560)===0&&($d=4194304),e}function kr(e){for(var n=[],s=0;31>s;s++)n.push(e);return n}function Fs(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Uu(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&&fl(e,o,0),f!==0&&d===0&&e.tag!==0&&(e.suspendedLanes|=f&~(v&~n))}function fl(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 zu(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 pl(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 ml(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 gl(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 Lr(e){return e&=-e,ei<e?$i<e?(e&134217727)!==0?bs:Gd:$i:ei}function yl(){var e=Zt.p;return e!==0?e:(e=window.event,e===void 0?bs:f_(e.type))}function Ir(e,n){var s=Zt.p;try{return Zt.p=e,n()}finally{Zt.p=s}}function js(e){delete e[rn],delete e[Rn],delete e[Og],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[ia]||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[ia]){var n=e.tag;if(n===5||n===6||n===13||n===26||n===27||n===3)return e}return null}function $s(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 I(e){e[tc]=!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(Ng[s]=e,e==="onDoubleClick"&&(Ng.ondblclick=e),e=0;e<n.length;e++)E_.add(n[e])}function ht(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 ys.call(__,e)?!0:ys.call(A_,e)?!1:iL.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:(Q(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}}Q(s,n),e.setAttribute(n,""+s)}}function Nt(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}Q(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}Q(o,s),e.setAttributeNS(n,s,""+o)}}function rs(){}function gp(){if(ec===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:rs,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}ec++}function yp(){if(ec--,ec===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>ec&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function Qn(e){if(kg===void 0)try{throw Error()}catch(s){var n=s.stack.trim().match(/\n( *(at )?)/);kg=n&&n[1]||"",O_=-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 CN(e,n,s,o)}function S(e,n){e.context===aa&&(fg(e.current,2,n,e,null,null),qr())}function A(e,n){if(ii!==null){var s=n.staleFamilies;n=n.updatedFamilies,$l(),Np(e.current,n,s),qr()}}function _(e){ii=e}function C(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function R(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 O(e){if(R(e)!==e)throw Error("Unable to find node on an unmounted component.")}function U(e){var n=e.alternate;if(!n){if(n=R(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 P(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=P(e),n!==null)return n;e=e.sibling}return null}function F(e){return e===null||typeof e!="object"?null:(e=v_&&e[v_]||e["@@iterator"],typeof e=="function"?e:null)}function j(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===$k?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Jr:return"Fragment";case Sg:return"Profiler";case Hd:return"StrictMode";case Ag:return"Suspense";case _g:return"SuspenseList";case Tg: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 Zr:return"Portal";case Bi:return(e.displayName||"Context")+".Provider";case Eg:return(e._context.displayName||"Context")+".Consumer";case Zl:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Bd:return n=e.displayName||null,n!==null?n:j(e.type)||"Memo";case Fn:n=e._payload,e=e._init;try{return j(e(n))}catch{}}return null}function tt(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 j(n);case 8:return n===Hd?"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 st(e){return{current:e}}function Z(e,n){0>gs?console.error("Unexpected pop."):(n!==xg[gs]&&console.error("Unexpected Fiber popped."),e.current=wg[gs],wg[gs]=null,xg[gs]=null,gs--)}function ot(e,n,s){gs++,wg[gs]=e.current,xg[gs]=s,e.current=n}function St(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 yt(e,n){ot(ea,n,e),ot(Jl,e,e),ot(ta,null,e);var s=n.nodeType;switch(s){case 9:case 11:s=s===9?"#document":"#fragment",n=(n=n.documentElement)&&(n=n.namespaceURI)?YA(n):Rs;break;default:if(s=n.tagName,n=n.namespaceURI)n=YA(n),n=XA(n,s);else switch(s){case"svg":n=Io;break;case"math":n=xh;break;default:n=Rs}}s=s.toLowerCase(),s=iS(null,s),s={context:n,ancestorInfo:s},Z(ta,e),ot(ta,s,e)}function Gt(e){Z(ta,e),Z(Jl,e),Z(ea,e)}function B(){return St(ta.current)}function K(e){e.memoizedState!==null&&ot(jd,e,e);var n=St(ta.current),s=e.type,o=XA(n.context,s);s=iS(n.ancestorInfo,s),o={context:o,ancestorInfo:s},n!==o&&(ot(Jl,e,e),ot(ta,o,e))}function ut(e){Jl.current===e&&(Z(ta,e),Z(Jl,e)),jd.current===e&&(Z(jd,e),Uc._currentValue=fr)}function wt(e){return typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}function W(e){try{return dt(e),!1}catch{return!0}}function dt(e){return""+e}function Q(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,wt(e)),dt(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,wt(e)),dt(e)}function Vt(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.",wt(e)),dt(e)}function ae(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{eo=n.inject(e),an=n}catch(s){console.error("React instrumentation encountered an error: %s.",s)}return!!n.checkDCE}function At(e){if(typeof Qk=="function"&&Kk(e),an&&typeof an.setStrictMode=="function")try{an.setStrictMode(eo,e)}catch(n){Fi||(Fi=!0,console.error("React instrumentation encountered an error: %s",n))}}function Wt(e){at=e}function Kt(){at!==null&&typeof at.markCommitStopped=="function"&&at.markCommitStopped()}function Te(e){at!==null&&typeof at.markComponentRenderStarted=="function"&&at.markComponentRenderStarted(e)}function Xe(){at!==null&&typeof at.markComponentRenderStopped=="function"&&at.markComponentRenderStopped()}function Pn(e){at!==null&&typeof at.markRenderStarted=="function"&&at.markRenderStarted(e)}function ss(){at!==null&&typeof at.markRenderStopped=="function"&&at.markRenderStopped()}function mi(e,n){at!==null&&typeof at.markStateUpdateScheduled=="function"&&at.markStateUpdateScheduled(e,n)}function Nr(e){return e>>>=0,e===0?32:31-(Zk(e)/Jk|0)|0}function hl(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 ke(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 as(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=ke(o):(v&=E,v!==0?d=ke(v):s||(s=E&~e,s!==0&&(d=ke(s))))):(E=o&~f,E!==0?d=ke(E):v!==0?d=ke(v):s||(s=o&~e,s!==0&&(d=ke(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 Bs(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function mp(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=Fd;return Fd<<=1,(Fd&4194048)===0&&(Fd=256),e}function Oa(){var e=$d;return $d<<=1,($d&62914560)===0&&($d=4194304),e}function kr(e){for(var n=[],s=0;31>s;s++)n.push(e);return n}function js(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Uu(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&&fl(e,o,0),f!==0&&d===0&&e.tag!==0&&(e.suspendedLanes|=f&~(v&~n))}function fl(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 zu(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 pl(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 ml(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 gl(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 Lr(e){return e&=-e,ei<e?$i<e?(e&134217727)!==0?bs:Gd:$i:ei}function yl(){var e=Zt.p;return e!==0?e:(e=window.event,e===void 0?bs:f_(e.type))}function Ir(e,n){var s=Zt.p;try{return Zt.p=e,n()}finally{Zt.p=s}}function Fs(e){delete e[rn],delete e[Rn],delete e[Og],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[ia]||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[ia]){var n=e.tag;if(n===5||n===6||n===13||n===26||n===27||n===3)return e}return null}function $s(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 I(e){e[tc]=!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(Ng[s]=e,e==="onDoubleClick"&&(Ng.ondblclick=e),e=0;e<n.length;e++)E_.add(n[e])}function ht(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 ys.call(__,e)?!0:ys.call(A_,e)?!1:iL.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:(Q(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}}Q(s,n),e.setAttribute(n,""+s)}}function Nt(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}Q(s,n),e.setAttribute(n,""+s)}}function je(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}Q(o,s),e.setAttributeNS(n,s,""+o)}}function rs(){}function gp(){if(ec===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:rs,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}ec++}function yp(){if(ec--,ec===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>ec&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function Qn(e){if(kg===void 0)try{throw Error()}catch(s){var n=s.stack.trim().match(/\n( *(at )?)/);kg=n&&n[1]||"",O_=-1<s.stack.indexOf(`
67
67
  at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
68
- `+kg+e+O_}function bp(e,n){if(!e||Lg)return"";var s=Ig.get(e);if(s!==void 0)return s;Lg=!0,s=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var o=null;o=G.H,G.H=null,gp();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(lt){var q=lt}Reflect.construct(e,[],z)}else{try{z.call()}catch(lt){q=lt}e.call(z.prototype)}}else{try{throw Error()}catch(lt){q=lt}(z=e())&&typeof z.catch=="function"&&z.catch(function(){})}}catch(lt){if(lt&&q&&typeof lt.stack=="string")return[lt.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(`
68
+ `+kg+e+O_}function bp(e,n){if(!e||Lg)return"";var s=Ig.get(e);if(s!==void 0)return s;Lg=!0,s=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var o=null;o=G.H,G.H=null,gp();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(lt){var q=lt}Reflect.construct(e,[],z)}else{try{z.call()}catch(lt){q=lt}e.call(z.prototype)}}else{try{throw Error()}catch(lt){q=lt}(z=e())&&typeof z.catch=="function"&&z.catch(function(){})}}catch(lt){if(lt&&q&&typeof lt.stack=="string")return[lt.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(`
69
69
  `),H=w.split(`
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"&&Ig.set(e,V),V}while(1<=f&&0<=v);break}}}finally{Lg=!1,G.H=o,yp(),Error.prepareStackTrace=s}return C=(C=e?e.displayName||e.name:"")?Qn(C):"",typeof e=="function"&&Ig.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
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"&&Ig.set(e,V),V}while(1<=f&&0<=v);break}}}finally{Lg=!1,G.H=o,yp(),Error.prepareStackTrace=s}return x=(x=e?e.displayName||e.name:"")?Qn(x):"",typeof e=="function"&&Ig.set(e,x),x}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 rN(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 bp(e.type,!1);case 11:return bp(e.type.render,!1);case 1:return bp(e.type,!0);case 31:return Qn("Activity");default:return""}}function F0(e){try{var n="";do{n+=rN(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 rN(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 bp(e.type,!1);case 11:return bp(e.type.render,!1);case 1:return bp(e.type,!0);case 31:return Qn("Activity");default:return""}}function j0(e){try{var n="";do{n+=rN(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 j0(e){return(e=e?e.displayName||e.name:"")?Qn(e):""}function Hu(){if($n===null)return null;var e=$n._debugOwner;return e!=null?tt(e):null}function oN(){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+=`
76
+ `+w.stack}}function F0(e){return(e=e?e.displayName||e.name:"")?Qn(e):""}function Hu(){if($n===null)return null;var e=$n._debugOwner;return e!=null?tt(e):null}function oN(){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+=F0(e.type));break;case 11:e._debugOwner||n!==""||(n+=F0(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
78
  `+B0(d))}else break;var f=n}catch(v){f=`
79
79
  Error generating stack: `+v.message+`
80
- `+v.stack}return f}function ft(e,n,s,o,d,f,v){var E=$n;vp(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{vp(E)}throw Error("runWithFiberInDEV should never be called in production. This is a bug in React.")}function vp(e){G.getCurrentStack=e===null?null:oN,Gi=!1,$n=e}function Kn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return Vt(e),e;default:return""}}function $0(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function lN(e){var n=$0(e)?"checked":"value",s=Object.getOwnPropertyDescriptor(e.constructor.prototype,n);Vt(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){Vt(v),o=""+v,f.call(this,v)}}),Object.defineProperty(e,n,{enumerable:s.enumerable}),{getValue:function(){return o},setValue:function(v){Vt(v),o=""+v},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function Bu(e){e._valueTracker||(e._valueTracker=lN(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 Fu(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 V0(e,n){n.checked===void 0||n.defaultChecked===void 0||k_||(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",Hu()||"A component",n.type),k_=!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",Hu()||"A component",n.type),N_=!0)}function Sp(e,n,s,o,d,f,v,E){e.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?(Q(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?Ep(e,v,Kn(n)):s!=null?Ep(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"?(Q(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"&&(Q(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"&&(Q(v,"name"),e.name=v)}function Ep(e,n,s){n==="number"&&Fu(e.ownerDocument)===e||e.defaultValue===""+s||(e.defaultValue=""+s)}function Y0(e,n){n.value==null&&(typeof n.children=="object"&&n.children!==null?vg.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 X0(){var e=Hu();return e?`
80
+ `+v.stack}return f}function ft(e,n,s,o,d,f,v){var E=$n;vp(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{vp(E)}throw Error("runWithFiberInDEV should never be called in production. This is a bug in React.")}function vp(e){G.getCurrentStack=e===null?null:oN,Gi=!1,$n=e}function Kn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return Vt(e),e;default:return""}}function $0(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function lN(e){var n=$0(e)?"checked":"value",s=Object.getOwnPropertyDescriptor(e.constructor.prototype,n);Vt(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){Vt(v),o=""+v,f.call(this,v)}}),Object.defineProperty(e,n,{enumerable:s.enumerable}),{getValue:function(){return o},setValue:function(v){Vt(v),o=""+v},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function Bu(e){e._valueTracker||(e._valueTracker=lN(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 ju(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 V0(e,n){n.checked===void 0||n.defaultChecked===void 0||k_||(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",Hu()||"A component",n.type),k_=!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",Hu()||"A component",n.type),N_=!0)}function Sp(e,n,s,o,d,f,v,E){e.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?(Q(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?Ep(e,v,Kn(n)):s!=null?Ep(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"?(Q(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"&&(Q(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"&&(Q(v,"name"),e.name=v)}function Ep(e,n,s){n==="number"&&ju(e.ownerDocument)===e||e.defaultValue===""+s||(e.defaultValue=""+s)}function Y0(e,n){n.value==null&&(typeof n.children=="object"&&n.children!==null?vg.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 X0(){var e=Hu();return e?`
81
81
 
82
- Check the render method of \``+e+"`.":""}function Pr(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,X0()):!n.multiple&&o&&console.error("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",s,X0())}}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",Hu()||"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 Ur(e){return"+ "+" ".repeat(e)}function Na(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 bl(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 ju(e,n,s){var o=120-2*s;if(n===null)return Ur(s)+bl(e,o)+`
82
+ Check the render method of \``+e+"`.":""}function Pr(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,X0()):!n.multiple&&o&&console.error("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",s,X0())}}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",Hu()||"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 Ur(e){return"+ "+" ".repeat(e)}function Na(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 bl(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 Fu(e,n,s){var o=120-2*s;if(n===null)return Ur(s)+bl(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)),Ur(s)+bl(e,o)+`
84
84
  `+Na(s)+bl(n,o)+`
85
85
  `}return Un(s)+bl(e,o)+`
86
- `}function Ap(e){return Object.prototype.toString.call(e).replace(/^\[object (.*)\]$/,function(n,s){return s})}function vl(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===Js)return(n=F(e.type))?"<"+n+">":"<...>";var s=Ap(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=vl(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 zr(e,n){return typeof e!="string"||B_.test(e)?"{"+vl(e,n-2)+"}":e.length>n-2?5>n?'"..."':'"'+e.slice(0,n-5)+'..."':'"'+e+'"'}function _p(e,n,s){var o=120-s.length-e.length,d=[],f;for(f in n)if(n.hasOwnProperty(f)&&f!=="children"){var v=zr(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 Ap(e){return Object.prototype.toString.call(e).replace(/^\[object (.*)\]$/,function(n,s){return s})}function vl(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===Js)return(n=j(e.type))?"<"+n+">":"<...>";var s=Ap(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=vl(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 zr(e,n){return typeof e!="string"||B_.test(e)?"{"+vl(e,n-2)+"}":e.length>n-2?5>n?'"..."':'"'+e.slice(0,n-5)+'..."':'"'+e+'"'}function _p(e,n,s){var o=120-s.length-e.length,d=[],f;for(f in n)if(n.hasOwnProperty(f)&&f!=="children"){var v=zr(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(`
@@ -93,8 +93,8 @@ Check the render method of \``+e+"`.":""}function Pr(e,n,s,o){if(e=e.options,n){
93
93
  `,o+=Na(s)+f+": "+v+`
94
94
  `):o+=Ur(s)+f+": "+E+`
95
95
  `}for(var w in d)d.hasOwnProperty(w)&&(e=vl(d[w],120-2*s-w.length-2),o+=Na(s)+w+": "+e+`
96
- `);return o}function uN(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+=_p(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=zr(C,E);E=zr(w,E),typeof C=="object"&&C!==null&&typeof w=="object"&&w!==null&&Ap(C)==="Object"&&Ap(w)==="Object"&&(2<Object.keys(C).length||2<Object.keys(w).length||-1<H.indexOf("...")||-1<E.indexOf("..."))?d+=Un(o+1)+v+`={{
97
- `+cN(C,w,o+2)+Un(o+1)+`}}
96
+ `);return o}function uN(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+=_p(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=zr(x,E);E=zr(w,E),typeof x=="object"&&x!==null&&typeof w=="object"&&w!==null&&Ap(x)==="Object"&&Ap(w)==="Object"&&(2<Object.keys(x).length||2<Object.keys(w).length||-1<H.indexOf("...")||-1<E.indexOf("..."))?d+=Un(o+1)+v+`={{
97
+ `+cN(x,w,o+2)+Un(o+1)+`}}
98
98
  `:(d+=Ur(o+1)+v+"="+H+`
99
99
  `,d+=Na(o+1)+v+"="+E+`
100
100
  `)}else d+=Un(o+1)+v+"="+zr(n[v],E)+`
@@ -102,20 +102,20 @@ Check the render method of \``+e+"`.":""}function Pr(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+=ju(f,""+e,o+1)):(typeof n=="string"||typeof n=="number"||typeof n=="bigint")&&(d=e==null?d+ju(""+n,null,o+1):d+ju(""+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+`>
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+=Fu(f,""+e,o+1)):(typeof n=="string"||typeof n=="number"||typeof n=="bigint")&&(d=e==null?d+Fu(""+n,null,o+1):d+Fu(""+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
106
  `}function Tp(e,n){var s=J0(e,n);if(s!==e&&(e.children.length!==1||e.children[0]!==s))return Un(n)+`...
107
107
  `+Tp(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=ju(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=zr(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=_p(f,d,Ur(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=uN(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+=Tp(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+(Na(n)+bl(f,120-2*n)+`
111
- `):C+_p(f.type,f.props,Na(n));return s+o+C}function wp(e){try{return`
108
+ `,n++)}if(o="",d=e.fiber.pendingProps,e.fiber.tag===6)o=Fu(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(x in d)if(d.hasOwnProperty(x)&&x!=="children"){var w=zr(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=_p(f,d,Ur(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=uN(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+=Tp(v,n),f++):x+=eS(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+(Na(n)+bl(f,120-2*n)+`
111
+ `):x+_p(f.type,f.props,Na(n));return s+o+x}function wp(e){try{return`
112
112
 
113
- `+Tp(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?wp(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),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 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 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 dN(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 xp(e,n){n=n||j_;var s=n.current;if(n=(s=sS(e,s&&s.tag,n.implicitRootScope)?null:s)?null:dN(e,n),n=s||n,!n)return!0;var o=n.tag;if(n=String(!!s)+"|"+e+"|"+o,Vd[n])return!1;Vd[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
113
+ `+Tp(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?wp(d).replaceAll(/^[+-]/gm,">"):""}function iS(e,n){var s=It({},e||F_),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 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 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 dN(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 xp(e,n){n=n||F_;var s=n.current;if(n=(s=sS(e,s&&s.tag,n.implicitRootScope)?null:s)?null:dN(e,n),n=s||n,!n)return!0;var o=n.tag;if(n=String(!!s)+"|"+e+"|"+o,Vd[n])return!1;Vd[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||ft(d,function(){console.error(`<%s> cannot contain a nested %s.
116
116
  See this log for the ancestor stack trace.`,o,v)})),!1}function $u(e,n,s){if(s||sS("#text",n,!1))return!0;if(s="#text|"+n,Vd[s])return!1;Vd[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 Sl(e,n){if(n){var s=e.firstChild;if(s&&s===e.lastChild&&s.nodeType===3){s.nodeValue=n;return}}e.textContent=n}function hN(e){return e.replace(uL,function(n,s){return s.toUpperCase()})}function rS(e,n,s){var o=n.indexOf("--")===0;o||(-1<n.indexOf("-")?no.hasOwnProperty(n)&&no[n]||(no[n]=!0,console.error("Unsupported style property %s. Did you mean %s?",n,hN(n.replace(cL,"ms-")))):lL.test(n)?no.hasOwnProperty(n)&&no[n]||(no[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)||Ug.hasOwnProperty(s)&&Ug[s]||(Ug[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)||Y_||(Y_=!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||X_.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=Pg[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=Pg[E]||[E],f=0;f<d.length;f++)o[d[f]]=E;E={};for(var w in n)for(d=Pg[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 El(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 dL.get(e)||e}function fN(e,n){if(ys.call(so,n)&&so[n])return!0;if(fL.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),so[n]=!0;if(n!==e)return console.error("Invalid ARIA attribute `%s`. Did you mean `%s`?",n,e),so[n]=!0}if(hL.test(n)){if(e=n.toLowerCase(),e=W_.hasOwnProperty(e)?e:null,e==null)return so[n]=!0,!1;n!==e&&(console.error("Unknown ARIA attribute `%s`. Did you mean `%s`?",n,e),so[n]=!0)}return!0}function pN(e,n){var s=[],o;for(o in n)fN(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 mN(e,n,s,o){if(ys.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 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(Yd.hasOwnProperty(d)){if(d=Yd[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 gN(e,n,s){var o=[],d;for(d in n)mN(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 Al(e){return yL.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Cp(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[Rn]||null;t:switch(e=n.stateNode,n.type){case"input":if(Sp(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(Q(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[Rn]||null;if(!d)throw Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.");Sp(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&&Pr(e,!!s.multiple,n,!1)}}}function uS(e,n,s){if(zg)return e(n,s);zg=!0;try{var o=e(n);return o}finally{if(zg=!1,(ao!==null||ro!==null)&&(qr(),ao&&(n=ao,e=ro,ro=ao=null,cS(n),e)))for(n=0;n<e.length;n++)cS(e[n])}}function _l(e,n){var s=e.stateNode;if(s===null)return null;var o=s[Rn]||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(Xd)return Xd;var e,n=Bg,s=n.length,o,d="value"in sa?sa.value:sa.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 Xd=d.slice(e,1<o?1-o:void 0)}function Gu(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 Vu(){return!0}function hS(){return!1}function Tn(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)?Vu: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=Vu)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=Vu)},persist:function(){},isPersistent:Vu}),n}function yN(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=ML[e])?!!n[e]:!1}function Rp(){return yN}function fS(e,n){switch(e){case"keyup":return jL.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 bN(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 vN(e,n){if(oo)return e==="compositionend"||!Gg&&fS(e,n)?(e=dS(),Xd=Bg=sa=null,oo=!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"?!!GL[e.type]:n==="textarea"}function SN(e){if(!Vi)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){ao?ro?ro.push(o):ro=[o]:ao=o,n=Dd(n,"onChange"),0<n.length&&(s=new Wd("onChange","change",null,s,o),e.push({event:s,listeners:n}))}function EN(e){UA(e,0)}function qu(e){var n=$s(e);if(G0(n))return e}function yS(e,n){if(e==="change")return n}function bS(){oc&&(oc.detachEvent("onpropertychange",vS),lc=oc=null)}function vS(e){if(e.propertyName==="value"&&qu(lc)){var n=[];gS(n,lc,e,Cp(e)),uS(EN,n)}}function AN(e,n,s){e==="focusin"?(bS(),oc=n,lc=s,oc.attachEvent("onpropertychange",vS)):e==="focusout"&&bS()}function _N(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return qu(lc)}function TN(e,n){if(e==="click")return qu(n)}function wN(e,n){if(e==="input"||e==="change")return qu(n)}function xN(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}function Tl(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(!ys.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=Fu(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=Fu(e.document)}return n}function Dp(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;qg||lo==null||lo!==Fu(o)||(o=lo,"selectionStart"in o&&Dp(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}),cc&&Tl(cc,o)||(cc=o,o=Dd(Vg,"onSelect"),0<o.length&&(n=new Wd("onSelect","select",null,n,s),e.push({event:n,listeners:o}),n.target=lo)))}function ka(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(Yg[e])return Yg[e];if(!co[e])return e;var n=co[e],s;for(s in n)if(n.hasOwnProperty(s)&&s in oT)return Yg[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=Wg.get(e);return s!==void 0?s:(n={value:e,source:n,stack:F0(n)},Wg.set(e,n),n)}return{value:e,source:n,stack:F0(n)}}function Yu(){for(var e=uo,n=Qg=uo=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 Xu(e,n,s,o){ni[uo++]=e,ni[uo++]=n,ni[uo++]=s,ni[uo++]=o,Qg|=o,e.lanes|=o,e=e.alternate,e!==null&&(e.lanes|=o)}function Mp(e,n,s,o){return Xu(e,n,s,o),Wu(e)}function wn(e,n){return Xu(e,null,null,n),Wu(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&Kd||(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 Wu(e){if(Oc>fI)throw lr=Oc=0,Nc=xy=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,Nc=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 Op(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:Zl,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===Zl||d===jn)&&(o=!0);break;case 14:case 15:(d===Bd||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"&&(ho===null&&(ho=new WeakSet),ho.add(e))}function Np(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))),ho!==null&&(ho.has(e)||o!==null&&ho.has(o))&&(E=!0),E&&(e._debugNeedsRemount=!0),(E||C)&&(o=wn(e,2),o!==null&&xe(o,e,2)),d===null||E||Np(d,n,s),f!==null&&Np(f,n,s)}function CN(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 kp(e){return e=e.prototype,!(!e||!e.isReactComponent)}function os(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=Op(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 Lp(e,n,s,o,d,f){var v=0,E=e;if(typeof e=="function")kp(e)&&(v=1),E=Ia(E);else if(typeof e=="string")v=B(),v=Ck(e,s,v)?26:e==="html"||e==="head"||e==="body"?27:5;else t:switch(e){case Tg:return n=b(31,s,n,d),n.elementType=Tg,n.lanes=f,n;case Jr:return Pa(s.children,d,f,n);case Hd:v=8,d|=on,d|=Ei;break;case Sg: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=Sg,n.lanes=f,n.stateNode={effectDuration:0,passiveEffectDuration:0},n;case Ag:return n=b(13,s,n,d),n.elementType=Ag,n.lanes=f,n;case _g:return n=b(19,s,n,d),n.elementType=_g,n.lanes=f,n;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Fk:case Bi:v=10;break t;case Eg:v=9;break t;case Zl:v=11,E=Op(E);break t;case Bd: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===Js?(s="<"+(F(e.type)||"Unknown")+" />",E=" Did you accidentally export a JSX literal instead of a component?"):s=typeof e,(v=o?tt(o):null)&&(E+=`
118
+ This will cause a hydration error.%s`,n,s),!1}function Sl(e,n){if(n){var s=e.firstChild;if(s&&s===e.lastChild&&s.nodeType===3){s.nodeValue=n;return}}e.textContent=n}function hN(e){return e.replace(uL,function(n,s){return s.toUpperCase()})}function rS(e,n,s){var o=n.indexOf("--")===0;o||(-1<n.indexOf("-")?no.hasOwnProperty(n)&&no[n]||(no[n]=!0,console.error("Unsupported style property %s. Did you mean %s?",n,hN(n.replace(cL,"ms-")))):lL.test(n)?no.hasOwnProperty(n)&&no[n]||(no[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)||Ug.hasOwnProperty(s)&&Ug[s]||(Ug[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)||Y_||(Y_=!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||X_.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=Pg[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=Pg[E]||[E],f=0;f<d.length;f++)o[d[f]]=E;E={};for(var w in n)for(d=Pg[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&&rS(e,z,x)}else for(o in n)n.hasOwnProperty(o)&&rS(e,o,n[o])}function El(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 dL.get(e)||e}function fN(e,n){if(ys.call(so,n)&&so[n])return!0;if(fL.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),so[n]=!0;if(n!==e)return console.error("Invalid ARIA attribute `%s`. Did you mean `%s`?",n,e),so[n]=!0}if(hL.test(n)){if(e=n.toLowerCase(),e=W_.hasOwnProperty(e)?e:null,e==null)return so[n]=!0,!1;n!==e&&(console.error("Unknown ARIA attribute `%s`. Did you mean `%s`?",n,e),so[n]=!0)}return!0}function pN(e,n){var s=[],o;for(o in n)fN(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 mN(e,n,s,o){if(ys.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 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(Yd.hasOwnProperty(d)){if(d=Yd[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 gN(e,n,s){var o=[],d;for(d in n)mN(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 Al(e){return yL.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Cp(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[Rn]||null;t:switch(e=n.stateNode,n.type){case"input":if(Sp(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(Q(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[Rn]||null;if(!d)throw Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.");Sp(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&&Pr(e,!!s.multiple,n,!1)}}}function uS(e,n,s){if(zg)return e(n,s);zg=!0;try{var o=e(n);return o}finally{if(zg=!1,(ao!==null||ro!==null)&&(qr(),ao&&(n=ao,e=ro,ro=ao=null,cS(n),e)))for(n=0;n<e.length;n++)cS(e[n])}}function _l(e,n){var s=e.stateNode;if(s===null)return null;var o=s[Rn]||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(Xd)return Xd;var e,n=Bg,s=n.length,o,d="value"in sa?sa.value:sa.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 Xd=d.slice(e,1<o?1-o:void 0)}function Gu(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 Vu(){return!0}function hS(){return!1}function Tn(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)?Vu: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=Vu)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=Vu)},persist:function(){},isPersistent:Vu}),n}function yN(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=ML[e])?!!n[e]:!1}function Rp(){return yN}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 bN(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 vN(e,n){if(oo)return e==="compositionend"||!Gg&&fS(e,n)?(e=dS(),Xd=Bg=sa=null,oo=!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"?!!GL[e.type]:n==="textarea"}function SN(e){if(!Vi)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){ao?ro?ro.push(o):ro=[o]:ao=o,n=Dd(n,"onChange"),0<n.length&&(s=new Wd("onChange","change",null,s,o),e.push({event:s,listeners:n}))}function EN(e){UA(e,0)}function qu(e){var n=$s(e);if(G0(n))return e}function yS(e,n){if(e==="change")return n}function bS(){oc&&(oc.detachEvent("onpropertychange",vS),lc=oc=null)}function vS(e){if(e.propertyName==="value"&&qu(lc)){var n=[];gS(n,lc,e,Cp(e)),uS(EN,n)}}function AN(e,n,s){e==="focusin"?(bS(),oc=n,lc=s,oc.attachEvent("onpropertychange",vS)):e==="focusout"&&bS()}function _N(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return qu(lc)}function TN(e,n){if(e==="click")return qu(n)}function wN(e,n){if(e==="input"||e==="change")return qu(n)}function xN(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}function Tl(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(!ys.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=ju(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=ju(e.document)}return n}function Dp(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;qg||lo==null||lo!==ju(o)||(o=lo,"selectionStart"in o&&Dp(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}),cc&&Tl(cc,o)||(cc=o,o=Dd(Vg,"onSelect"),0<o.length&&(n=new Wd("onSelect","select",null,n,s),e.push({event:n,listeners:o}),n.target=lo)))}function ka(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(Yg[e])return Yg[e];if(!co[e])return e;var n=co[e],s;for(s in n)if(n.hasOwnProperty(s)&&s in oT)return Yg[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=Wg.get(e);return s!==void 0?s:(n={value:e,source:n,stack:j0(n)},Wg.set(e,n),n)}return{value:e,source:n,stack:j0(n)}}function Yu(){for(var e=uo,n=Qg=uo=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 Xu(e,n,s,o){ni[uo++]=e,ni[uo++]=n,ni[uo++]=s,ni[uo++]=o,Qg|=o,e.lanes|=o,e=e.alternate,e!==null&&(e.lanes|=o)}function Mp(e,n,s,o){return Xu(e,n,s,o),Wu(e)}function wn(e,n){return Xu(e,null,null,n),Wu(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&Kd||(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 Wu(e){if(Oc>fI)throw lr=Oc=0,Nc=xy=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,Nc=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 Op(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:Zl,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===Fn)&&(o=!0);break;case 11:(d===Zl||d===Fn)&&(o=!0);break;case 14:case 15:(d===Bd||d===Fn)&&(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"&&(ho===null&&(ho=new WeakSet),ho.add(e))}function Np(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))),ho!==null&&(ho.has(e)||o!==null&&ho.has(o))&&(E=!0),E&&(e._debugNeedsRemount=!0),(E||x)&&(o=wn(e,2),o!==null&&xe(o,e,2)),d===null||E||Np(d,n,s),f!==null&&Np(f,n,s)}function CN(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 kp(e){return e=e.prototype,!(!e||!e.isReactComponent)}function os(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=Op(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 Lp(e,n,s,o,d,f){var v=0,E=e;if(typeof e=="function")kp(e)&&(v=1),E=Ia(E);else if(typeof e=="string")v=B(),v=Ck(e,s,v)?26:e==="html"||e==="head"||e==="body"?27:5;else t:switch(e){case Tg:return n=b(31,s,n,d),n.elementType=Tg,n.lanes=f,n;case Jr:return Pa(s.children,d,f,n);case Hd:v=8,d|=on,d|=Ei;break;case Sg: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=Sg,n.lanes=f,n.stateNode={effectDuration:0,passiveEffectDuration:0},n;case Ag:return n=b(13,s,n,d),n.elementType=Ag,n.lanes=f,n;case _g:return n=b(19,s,n,d),n.elementType=_g,n.lanes=f,n;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case jk:case Bi:v=10;break t;case Eg:v=9;break t;case Zl:v=11,E=Op(E);break t;case Bd:v=14;break t;case Fn: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===Js?(s="<"+(j(e.type)||"Unknown")+" />",E=" Did you accidentally export a JSX literal instead of a component?"):s=typeof e,(v=o?tt(o):null)&&(E+=`
119
119
 
120
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 Qu(e,n,s){return n=Lp(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 Ip(e,n,s){return e=b(6,e,null,n),e.lanes=s,e}function Pp(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(),fo[po++]=Jd,fo[po++]=Zd,Zd=e,Jd=n}function DS(e,n,s){za(),si[ai++]=Ss,si[ai++]=Es,si[ai++]=Qa,Qa=e;var o=Ss;e=Es;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,Ss=1<<32-pn(n)+d|s<<d|o,Es=f+e}else Ss=1<<f|s<<d|o,Es=e}function Up(e){za(),e.return!==null&&(Ua(e,1),DS(e,1,0))}function zp(e){for(;e===Zd;)Zd=fo[--po],fo[po]=null,Jd=fo[--po],fo[po]=null;for(;e===Qa;)Qa=si[--ai],si[ai]=null,Es=si[--ai],si[ai]=null,Ss=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 Hp(e,n){As||(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=wp(s)),Cl(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
 
@@ -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)),Kg}function MS(e){var n=e.stateNode,s=e.type,o=e.memoizedProps;switch(n[rn]=e,n[Rn]=o,ng(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<kc.length;s++)Ft(kc[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":ht("input",o),Ft("invalid",n),V0(n,o),q0(n,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0),Bu(n);break;case"option":Y0(n,o);break;case"select":ht("select",o),Ft("invalid",n),W0(n,o);break;case"textarea":ht("textarea",o),Ft("invalid",n),Q0(n,o),Z0(n,o.value,o.defaultValue,o.children),Bu(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=Md),n=!0):n=!1,n||Ba(e)}function OS(e){for(yn=e.return;yn;)switch(yn.tag){case 5:case 13:qi=!1;return;case 27:case 3:qi=!0;return;default:yn=yn.return}}function wl(e){if(e!==yn)return!1;if(!Yt)return OS(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")||og(e.type,e.memoizedProps)),s=!s),s&&ve){for(s=ve;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.");ve=JA(e)}else n===27?(n=ve,Zs(e.type)?(e=zy,zy=null,ve=e):ve=n):ve=yn?ti(e.stateNode.nextSibling):null;return!0}function xl(){ve=yn=null,As=Yt=!1}function NS(){var e=Ka;return e!==null&&(Sn===null?Sn=e:Sn.push.apply(Sn,e),Ka=null),e}function Cl(e){Ka===null?Ka=[e]:Ka.push(e)}function kS(){var e=ri;if(e!==null){ri=null;for(var n=wp(e);0<e.children.length;)e=e.children[0];ft(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)),Kg}function MS(e){var n=e.stateNode,s=e.type,o=e.memoizedProps;switch(n[rn]=e,n[Rn]=o,ng(s,o),s){case"dialog":jt("cancel",n),jt("close",n);break;case"iframe":case"object":case"embed":jt("load",n);break;case"video":case"audio":for(s=0;s<kc.length;s++)jt(kc[s],n);break;case"source":jt("error",n);break;case"img":case"image":case"link":jt("error",n),jt("load",n);break;case"details":jt("toggle",n);break;case"input":ht("input",o),jt("invalid",n),V0(n,o),q0(n,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0),Bu(n);break;case"option":Y0(n,o);break;case"select":ht("select",o),jt("invalid",n),W0(n,o);break;case"textarea":ht("textarea",o),jt("invalid",n),Q0(n,o),Z0(n,o.value,o.defaultValue,o.children),Bu(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&&(jt("beforetoggle",n),jt("toggle",n)),o.onScroll!=null&&jt("scroll",n),o.onScrollEnd!=null&&jt("scrollend",n),o.onClick!=null&&(n.onclick=Md),n=!0):n=!1,n||Ba(e)}function OS(e){for(yn=e.return;yn;)switch(yn.tag){case 5:case 13:qi=!1;return;case 27:case 3:qi=!0;return;default:yn=yn.return}}function wl(e){if(e!==yn)return!1;if(!Yt)return OS(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")||og(e.type,e.memoizedProps)),s=!s),s&&ve){for(s=ve;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.");ve=JA(e)}else n===27?(n=ve,Zs(e.type)?(e=zy,zy=null,ve=e):ve=n):ve=yn?ti(e.stateNode.nextSibling):null;return!0}function xl(){ve=yn=null,As=Yt=!1}function NS(){var e=Ka;return e!==null&&(Sn===null?Sn=e:Sn.push.apply(Sn,e),Ka=null),e}function Cl(e){Ka===null?Ka=[e]:Ka.push(e)}function kS(){var e=ri;if(e!==null){ri=null;for(var n=wp(e);0<e.children.length;)e=e.children[0];ft(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,9 +137,9 @@ https://react.dev/link/hydration-mismatch`+n),e)),Kg}function MS(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 Ku(){mo=th=null,go=!1}function Gs(e,n,s){ot(Zg,n._currentValue,e),n._currentValue=s,ot(Jg,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 ls(e,n){e._currentValue=Zg.current;var s=Jg.current;Z(Jg,n),e._currentRenderer=s,Z(Zg,n)}function Bp(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 Fp(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),Bp(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),Bp(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 Rl(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===Fd.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(Uc):e=[Uc])}d=d.return}e!==null&&Fp(n,e,s,o),n.flags|=262144}function Zu(e){for(e=e.firstContext;e!==null;){if(!gn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Fa(e){th=e,mo=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function me(e){return go&&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(th,e)}function Ju(e,n){return th===null&&Fa(e),LS(e,n)}function LS(e,n){var s=n._currentValue;if(n={context:n,memoizedValue:s,next:null},mo===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().");mo=n,e.dependencies={lanes:0,firstContext:n,_debugThenableState:null},e.flags|=524288}else mo=mo.next=n;return s}function jp(){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 Dl(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 cs(){var e=Za;return Za=0,e}function td(e){var n=Za;return Za=e,n}function Ml(e){var n=Za;return Za+=e,n}function $p(e){Dn=yo(),0>e.actualStartTime&&(e.actualStartTime=Dn)}function Gp(e){if(0<=Dn){var n=yo()-Dn;e.actualDuration+=n,e.selfBaseDuration=n,Dn=-1}}function IS(e){if(0<=Dn){var n=yo()-Dn;e.actualDuration+=n,Dn=-1}}function ki(){if(0<=Dn){var e=yo()-Dn;Dn=-1,Za+=e}}function Li(){Dn=yo()}function ed(e){for(var n=e.child;n;)e.actualDuration+=n.actualDuration,n=n.sibling}function RN(e,n){if(uc===null){var s=uc=[];ty=0,Ja=Zm(),bo={status:"pending",value:void 0,then:function(o){s.push(o)}}}return ty++,n.then(PS,PS),n}function PS(){if(--ty===0&&uc!==null){bo!==null&&(bo.status="fulfilled");var e=uc;uc=null,Ja=0,bo=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function DN(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 Vp(){var e=tr.current;return e!==null?e:ce.pooledCache}function nd(e,n){n===null?ot(tr,tr.current,e):ot(tr,n.pool,e)}function US(){var e=Vp();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 id(){}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(id,id),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(id,id);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 bc=n,rh=!0,yc}}function FS(){if(bc===null)throw Error("Expected a suspended thenable. This is a bug in React. Please file an issue.");var e=bc;return bc=null,rh=!1,e}function jS(e){if(e===yc||e===ah)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 qp(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Yp(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 Vs(e){return{lane:e,tag:_T,payload:null,callback:null,next:null}}function qs(e,n,s){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,iy===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 Ku(){mo=th=null,go=!1}function Gs(e,n,s){ot(Zg,n._currentValue,e),n._currentValue=s,ot(Jg,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 ls(e,n){e._currentValue=Zg.current;var s=Jg.current;Z(Jg,n),e._currentRenderer=s,Z(Zg,n)}function Bp(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 jp(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),Bp(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),Bp(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 Rl(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===jd.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(Uc):e=[Uc])}d=d.return}e!==null&&jp(n,e,s,o),n.flags|=262144}function Zu(e){for(e=e.firstContext;e!==null;){if(!gn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ja(e){th=e,mo=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function me(e){return go&&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(th,e)}function Ju(e,n){return th===null&&ja(e),LS(e,n)}function LS(e,n){var s=n._currentValue;if(n={context:n,memoizedValue:s,next:null},mo===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().");mo=n,e.dependencies={lanes:0,firstContext:n,_debugThenableState:null},e.flags|=524288}else mo=mo.next=n;return s}function Fp(){return{controller:new ZL,data:new Map,refCount:0}}function Fa(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 Dl(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 cs(){var e=Za;return Za=0,e}function td(e){var n=Za;return Za=e,n}function Ml(e){var n=Za;return Za+=e,n}function $p(e){Dn=yo(),0>e.actualStartTime&&(e.actualStartTime=Dn)}function Gp(e){if(0<=Dn){var n=yo()-Dn;e.actualDuration+=n,e.selfBaseDuration=n,Dn=-1}}function IS(e){if(0<=Dn){var n=yo()-Dn;e.actualDuration+=n,Dn=-1}}function ki(){if(0<=Dn){var e=yo()-Dn;Dn=-1,Za+=e}}function Li(){Dn=yo()}function ed(e){for(var n=e.child;n;)e.actualDuration+=n.actualDuration,n=n.sibling}function RN(e,n){if(uc===null){var s=uc=[];ty=0,Ja=Zm(),bo={status:"pending",value:void 0,then:function(o){s.push(o)}}}return ty++,n.then(PS,PS),n}function PS(){if(--ty===0&&uc!==null){bo!==null&&(bo.status="fulfilled");var e=uc;uc=null,Ja=0,bo=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function DN(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 Vp(){var e=tr.current;return e!==null?e:ce.pooledCache}function nd(e,n){n===null?ot(tr,tr.current,e):ot(tr,n.pool,e)}function US(){var e=Vp();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 id(){}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(id,id),n=s),n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,FS(e),e;default:if(typeof n.status=="string")n.then(id,id);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,FS(e),e}throw bc=n,rh=!0,yc}}function jS(){if(bc===null)throw Error("Expected a suspended thenable. This is a bug in React. Please file an issue.");var e=bc;return bc=null,rh=!1,e}function FS(e){if(e===yc||e===ah)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 qp(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Yp(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 Vs(e){return{lane:e,tag:_T,payload:null,callback:null,next:null}}function qs(e,n,s){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,iy===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.
141
141
 
142
- Please update the following component: %s`,d),xT=!0}return(Jt&vn)!==Gn?(d=o.pending,d===null?n.next=n:(n.next=d.next,d.next=n),o.pending=n,n=Wu(e),wS(e,null,s),n):(Xu(e,o,n,s),Wu(e))}function Ol(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,zu(e,s)}}function sd(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 Nl(){if(sy){var e=bo;if(e!==null)throw e}}function kl(e,n,s,o){sy=!1;var d=e.updateQueue;ra=!1,iy=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&&(sy=!0),H!==null&&(H=H.next={lane:0,tag:E.tag,payload:E.payload,callback:null,next:null});t:{z=e;var lt=E,Et=n,ue=s;switch(lt.tag){case TT:if(lt=lt.payload,typeof lt=="function"){go=!0;var jt=lt.call(ue,V,Et);if(z.mode&on){At(!0);try{lt.call(ue,V,Et)}finally{At(!1)}}go=!1,V=jt;break t}V=lt;break t;case ny:z.flags=z.flags&-65537|128;case _T:if(jt=lt.payload,typeof jt=="function"){if(go=!0,lt=jt.call(ue,V,Et),z.mode&on){At(!0);try{jt.call(ue,V,Et)}finally{At(!1)}}go=!1}else lt=jt;if(lt==null)break t;V=It({},V,lt);break t;case wT:ra=!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),ua|=v,e.lanes=v,e.memoizedState=V}iy=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 MN(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=Wi;ot(oh,s,e),ot(vo,n,e),Wi=s|n.baseLanes}function Xp(e){ot(oh,Wi,e),ot(vo,vo.current,e)}function Wp(e){Wi=oh.current,Z(vo,e),Z(oh,e)}function Ht(){var e=$;ci===null?ci=[e]:ci.push(e)}function J(){var e=$;if(ci!==null&&(Ts++,ci[Ts]!==e)){var n=X(_t);if(!CT.has(n)&&(CT.add(n),ci!==null)){for(var s="",o=0;o<=Ts;o++){var d=ci[o],f=o===Ts?e:d;for(d=o+1+". "+d;30>d.length;)d+=" ";d+=f+`
142
+ Please update the following component: %s`,d),xT=!0}return(Jt&vn)!==Gn?(d=o.pending,d===null?n.next=n:(n.next=d.next,d.next=n),o.pending=n,n=Wu(e),wS(e,null,s),n):(Xu(e,o,n,s),Wu(e))}function Ol(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,zu(e,s)}}function sd(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 Nl(){if(sy){var e=bo;if(e!==null)throw e}}function kl(e,n,s,o){sy=!1;var d=e.updateQueue;ra=!1,iy=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&&(sy=!0),H!==null&&(H=H.next={lane:0,tag:E.tag,payload:E.payload,callback:null,next:null});t:{z=e;var lt=E,Et=n,ue=s;switch(lt.tag){case TT:if(lt=lt.payload,typeof lt=="function"){go=!0;var Ft=lt.call(ue,V,Et);if(z.mode&on){At(!0);try{lt.call(ue,V,Et)}finally{At(!1)}}go=!1,V=Ft;break t}V=lt;break t;case ny:z.flags=z.flags&-65537|128;case _T:if(Ft=lt.payload,typeof Ft=="function"){if(go=!0,lt=Ft.call(ue,V,Et),z.mode&on){At(!0);try{Ft.call(ue,V,Et)}finally{At(!1)}}go=!1}else lt=Ft;if(lt==null)break t;V=It({},V,lt);break t;case wT:ra=!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),ua|=v,e.lanes=v,e.memoizedState=V}iy=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 MN(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=Wi;ot(oh,s,e),ot(vo,n,e),Wi=s|n.baseLanes}function Xp(e){ot(oh,Wi,e),ot(vo,vo.current,e)}function Wp(e){Wi=oh.current,Z(vo,e),Z(oh,e)}function Ht(){var e=$;ci===null?ci=[e]:ci.push(e)}function J(){var e=$;if(ci!==null&&(Ts++,ci[Ts]!==e)){var n=X(_t);if(!CT.has(n)&&(CT.add(n),ci!==null)){for(var s="",o=0;o<=Ts;o++){var d=ci[o],f=o===Ts?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
@@ -152,14 +152,14 @@ Please update the following component: %s`,d),xT=!0}return(Jt&vn)!==Gn?(d=o.pend
152
152
  See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`)}function Qp(e,n){if(Sc)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 Kp(e,n,s,o,d,f){oa=f,_t=n,ci=e!==null?e._debugHookTypes:null,Ts=-1,Sc=e!==null&&e.type!==n.type,(Object.prototype.toString.call(s)==="[object AsyncFunction]"||Object.prototype.toString.call(s)==="[object AsyncGeneratorFunction]")&&(f=X(_t),ay.has(f)||(ay.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?oy:ci!==null?MT:ry,nr=f=(n.mode&on)!==de;var v=ly(s,o,d);if(nr=!1,Eo&&(v=Zp(n,s,o,d)),f){At(!0);try{v=Zp(n,s,o,d)}finally{At(!1)}}return qS(e,n),v}function qS(e,n){n._debugHookTypes=ci,n.dependencies===null?_s!==null&&(n.dependencies={lanes:0,firstContext:null,_debugThenableState:_s}):n.dependencies._debugThenableState=_s,G.H=uh;var s=le!==null&&le.next!==null;if(oa=0,ci=$=Ie=le=_t=null,Ts=-1,e!==null&&(e.flags&65011712)!==(n.flags&65011712)&&console.error("Internal React error: Expected static flag was missing. Please notify the React team."),lh=!1,vc=0,_s=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&&Zu(e)&&($e=!0)),rh?(rh=!1,e=!0):e=!1,e&&(n=X(n)||"Unknown",RT.has(n)||ay.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 Zp(e,n,s,o){_t=e;var d=0;do{if(Eo&&(_s=null),vc=0,Eo=!1,d>=nI)throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");if(d+=1,Sc=!1,Ie=le=null,e.updateQueue!=null){var f=e.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}Ts=-1,G.H=OT,f=ly(n,s,o)}while(Eo);return f}function ON(){var e=G.H,n=e.useState()[0];return n=typeof n.then=="function"?Ll(n):n,e=e.useState()[0],(le!==null?le.memoizedState:null)!==e&&(_t.flags|=1024),n}function Jp(){var e=ch!==0;return ch=0,e}function tm(e,n,s){n.updateQueue=e.updateQueue,n.flags=(n.mode&Ei)!==de?n.flags&-402655237:n.flags&-2053,e.lanes&=~s}function em(e){if(lh){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}lh=!1}oa=0,ci=Ie=le=_t=null,Ts=-1,$=null,Eo=!1,vc=ch=0,_s=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 ee(){if(le===null){var e=_t.alternate;e=e!==null?e.memoizedState:null}else e=le.next;var n=Ie===null?_t.memoizedState:Ie.next;if(n!==null)Ie=n,le=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.");le=e,e={memoizedState:le.memoizedState,baseState:le.baseState,baseQueue:le.baseQueue,queue:le.queue,next:null},Ie===null?_t.memoizedState=Ie=e:Ie=Ie.next=e}return Ie}function nm(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ll(e){var n=vc;return vc+=1,_s===null&&(_s=zS()),e=BS(_s,e,n),n=_t,(Ie===null?n.memoizedState:Ie.next)===null&&(n=n.alternate,G.H=n!==null&&n.memoizedState!==null?oy:ry),e}function Ys(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ll(e);if(e.$$typeof===Bi)return me(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=nm(),_t.updateQueue=s),s.memoCache=n,s=n.data[n.index],s===void 0||Sc)for(s=n.data[n.index]=Array(e),o=0;o<e;o++)s[o]=jk;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 im(e,n,s){var o=xn();if(s!==void 0){var d=s(n);if(nr){At(!0);try{s(n)}finally{At(!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=IN.bind(null,_t,e),[o.memoizedState,e]}function Br(e){var n=ee();return sm(n,le,e)}function sm(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:(oa&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((oa&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,ua|=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,ua|=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=bo,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 Il(e){var n=ee(),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 am(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();So||f===s()||(console.error("The result of getServerSnapshot should be cached to avoid an infinite loop"),So=!0)}else{if(f=n(),So||(s=n(),gn(f,s)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),So=!0)),ce===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");(Bt&124)!==0||YS(o,n,f)}return d.memoizedState=f,s={value:f,getSnapshot:n},d.queue=s,ud(WS.bind(null,o,s,e),[e]),o.flags|=2048,jr(li|He,cd(),XS.bind(null,o,s,f,n),null),f}function rd(e,n,s){var o=_t,d=ee(),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(),!So){var v=n();gn(s,v)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),So=!0)}(v=!gn((le||d).memoizedState,s))&&(d.memoizedState=s,$e=!0),d=d.queue;var E=WS.bind(null,o,d,e);if(Cn(2048,He,E,[e]),d.getSnapshot!==n||v||Ie!==null&&Ie.memoizedState.tag&li){if(o.flags|=2048,jr(li|He,cd(),XS.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||(oa&124)!==0||YS(o,n,s)}return s}function YS(e,n,s){e.flags|=16384,e={getSnapshot:n,value:s},n=_t.updateQueue,n===null?(n=nm(),_t.updateQueue=n,n.stores=[e]):(s=n.stores,s===null?n.stores=[e]:s.push(e))}function XS(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=wn(e,2);n!==null&&xe(n,e,2)}function rm(e){var n=xn();if(typeof e=="function"){var s=e;if(e=s(),nr){At(!0);try{s()}finally{At(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:vi,lastRenderedState:e},n}function om(e){e=rm(e);var n=e.queue,s=gE.bind(null,_t,n);return n.dispatch=s,[e.memoizedState,s]}function lm(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=Em.bind(null,_t,!0,s),s.dispatch=n,[e,n]}function ZS(e,n){var s=ee();return JS(s,le,e,n)}function JS(e,n,s,o){return e.baseState=s,sm(e,le,typeof o=="function"?o:vi)}function tE(e,n){var s=ee();return le!==null?JS(s,le,e,n):(s.baseState=e,[e,s.queue.dispatch])}function NN(e,n,s,o,d){if(pd(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){cm(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){cm(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 cm(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 cm(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 Fr(e,n){if(Yt){var s=ce.formState;if(s!==null){t:{var o=_t;if(Yt){if(ve){e:{for(var d=ve,f=qi;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===Ly||f===Dw?d:null}if(d){ve=ti(d.nextSibling),o=d.data===Ly;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:aE,lastRenderedState:n},s.queue=o,s=gE.bind(null,_t,o),o.dispatch=s,o=rm(!1),f=Em.bind(null,_t,!1,o.queue),o=xn(),d={state:n,dispatch:null,action:e,pending:null},o.queue=d,s=NN.bind(null,_t,d,f,s),d.dispatch=s,o.memoizedState=e,[n,s,!1]}function od(e){var n=ee();return rE(n,le,e)}function rE(e,n,s){if(n=sm(e,n,aE)[0],e=Br(vi)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var o=Ll(n)}catch(v){throw v===yc?ah:v}else o=n;n=ee();var d=n.queue,f=d.dispatch;return s!==n.memoizedState&&(_t.flags|=2048,jr(li|He,cd(),kN.bind(null,d,s),null)),[o,f,e]}function kN(e,n){e.action=n}function ld(e){var n=ee(),s=le;if(s!==null)return rE(n,s,e);ee(),n=n.memoizedState,s=ee();var o=s.queue.dispatch;return s.memoizedState=e,[n,o,!1]}function jr(e,n,s,o){return e={tag:e,create:s,deps:o,inst:n,next:null},n=_t.updateQueue,n===null&&(n=nm(),_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 cd(){return{destroy:void 0,resource:void 0}}function um(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=jr(li|n,cd(),s,o)}function Cn(e,n,s,o){var d=ee();o=o===void 0?null:o;var f=d.memoizedState.inst;le!==null&&o!==null&&Qp(o,le.memoizedState.deps)?d.memoizedState=jr(n,f,s,o):(_t.flags|=e,d.memoizedState=jr(li|n,f,s,o))}function ud(e,n){(_t.mode&Ei)!==de&&(_t.mode&fT)===de?Ga(276826112,He,e,n):Ga(8390656,He,e,n)}function dm(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 hm(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 dd(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,Cn(4,tn,oE.bind(null,n,e),s)}function fm(e,n){return xn().memoizedState=[e,n===void 0?null:n],e}function hd(e,n){var s=ee();n=n===void 0?null:n;var o=s.memoizedState;return n!==null&&Qp(n,o[1])?o[0]:(s.memoizedState=[e,n],e)}function pm(e,n){var s=xn();n=n===void 0?null:n;var o=e();if(nr){At(!0);try{e()}finally{At(!1)}}return s.memoizedState=[o,n],o}function fd(e,n){var s=ee();n=n===void 0?null:n;var o=s.memoizedState;if(n!==null&&Qp(n,o[1]))return o[0];if(o=e(),nr){At(!0);try{e()}finally{At(!1)}}return s.memoizedState=[o,n],o}function mm(e,n){var s=xn();return gm(s,e,n)}function lE(e,n){var s=ee();return uE(s,le.memoizedState,e,n)}function cE(e,n){var s=ee();return le===null?gm(s,e,n):uE(s,le.memoizedState,e,n)}function gm(e,n,s){return s===void 0||(oa&1073741824)!==0?e.memoizedState=n:(e.memoizedState=s,e=dA(),_t.lanes|=e,ua|=e,s)}function uE(e,n,s,o){return gn(s,n)?s:vo.current!==null?(e=gm(e,s,o),gn(e,n)||($e=!0),e):(oa&42)===0?($e=!0,e.memoizedState=s):(e=dA(),_t.lanes|=e,ua|=e,n)}function dE(e,n,s,o,d){var f=Zt.p;Zt.p=f!==0&&f<$i?f:$i;var v=G.T,E={};G.T=E,Em(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=DN(w,o);Pl(e,n,H,Fn(e))}else Pl(e,n,o,Fn(e))}catch(V){Pl(e,n,{then:function(){},status:"rejected",reason:V},Fn(e))}finally{Zt.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 ym(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;Pl(e,n,{},Fn(e))}function bm(){var e=rm(!1);return e=dE.bind(null,_t,e.queue,!0,!1),xn().memoizedState=e,[!1,e]}function pE(){var e=Br(vi)[0],n=ee().memoizedState;return[typeof e=="boolean"?e:Ll(e),n]}function mE(){var e=Il(vi)[0],n=ee().memoizedState;return[typeof e=="boolean"?e:Ll(e),n]}function Va(){return me(Uc)}function vm(){var e=xn(),n=ce.identifierPrefix;if(Yt){var s=Es,o=Ss;s=(o&~(1<<32-pn(o)-1)).toString(32)+s,n="«"+n+"R"+s,s=ch++,0<s&&(n+="H"+s.toString(32)),n+="»"}else s=eI++,n="«"+n+"r"+s.toString(32)+"»";return e.memoizedState=n}function Sm(){return xn().memoizedState=LN.bind(null,_t)}function LN(e,n){for(var s=e.return;s!==null;){switch(s.tag){case 24:case 3:var o=Fn(s);e=Vs(o);var d=qs(s,e,o);d!==null&&(xe(d,s,o),Ol(d,s,o)),s=jp(),n!=null&&d!==null&&console.error("The seed argument is not enabled outside experimental channels."),e.payload={cache:s};return}s=s.return}}function IN(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};pd(e)?yE(n,d):(d=Mp(e,n,d,o),d!==null&&(xe(d,e,o),bE(d,n,o))),mi(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),Pl(e,n,s,o),mi(e,o)}function Pl(e,n,s,o){var d={lane:o,revertLane:0,action:s,hasEagerState:!1,eagerState:null,next:null};if(pd(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 Xu(e,n,d,0),ce===null&&Yu(),!1}catch{}finally{G.H=v}}if(s=Mp(e,n,d,o),s!==null)return xe(s,e,o),bE(s,n,o),!0}return!1}function Em(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:Zm(),action:o,hasEagerState:!1,eagerState:null,next:null},pd(e)){if(n)throw Error("Cannot update optimistic state while rendering.");console.error("Cannot call startTransition while rendering.")}else n=Mp(e,s,o,2),n!==null&&xe(n,e,2);mi(e,2)}function pd(e){var n=e.alternate;return e===_t||n!==null&&n===_t}function yE(e,n){Eo=lh=!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,zu(e,s)}}function We(e){var n=kt;return e!=null&&(kt=n===null?e:n.concat(e)),n}function md(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=Qu(e,s.mode,0),n._debugInfo=kt,n.return=s),ft(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 gd(e){var n=Ec;return Ec+=1,Ao===null&&(Ao=zS()),BS(Ao,e,n)}function Ul(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function yd(e,n){throw n.$$typeof===Bk?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 Kp(e,n,s,o,d,f){oa=f,_t=n,ci=e!==null?e._debugHookTypes:null,Ts=-1,Sc=e!==null&&e.type!==n.type,(Object.prototype.toString.call(s)==="[object AsyncFunction]"||Object.prototype.toString.call(s)==="[object AsyncGeneratorFunction]")&&(f=X(_t),ay.has(f)||(ay.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?oy:ci!==null?MT:ry,nr=f=(n.mode&on)!==de;var v=ly(s,o,d);if(nr=!1,Eo&&(v=Zp(n,s,o,d)),f){At(!0);try{v=Zp(n,s,o,d)}finally{At(!1)}}return qS(e,n),v}function qS(e,n){n._debugHookTypes=ci,n.dependencies===null?_s!==null&&(n.dependencies={lanes:0,firstContext:null,_debugThenableState:_s}):n.dependencies._debugThenableState=_s,G.H=uh;var s=le!==null&&le.next!==null;if(oa=0,ci=$=Ie=le=_t=null,Ts=-1,e!==null&&(e.flags&65011712)!==(n.flags&65011712)&&console.error("Internal React error: Expected static flag was missing. Please notify the React team."),lh=!1,vc=0,_s=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&&Zu(e)&&($e=!0)),rh?(rh=!1,e=!0):e=!1,e&&(n=X(n)||"Unknown",RT.has(n)||ay.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 Zp(e,n,s,o){_t=e;var d=0;do{if(Eo&&(_s=null),vc=0,Eo=!1,d>=nI)throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");if(d+=1,Sc=!1,Ie=le=null,e.updateQueue!=null){var f=e.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}Ts=-1,G.H=OT,f=ly(n,s,o)}while(Eo);return f}function ON(){var e=G.H,n=e.useState()[0];return n=typeof n.then=="function"?Ll(n):n,e=e.useState()[0],(le!==null?le.memoizedState:null)!==e&&(_t.flags|=1024),n}function Jp(){var e=ch!==0;return ch=0,e}function tm(e,n,s){n.updateQueue=e.updateQueue,n.flags=(n.mode&Ei)!==de?n.flags&-402655237:n.flags&-2053,e.lanes&=~s}function em(e){if(lh){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}lh=!1}oa=0,ci=Ie=le=_t=null,Ts=-1,$=null,Eo=!1,vc=ch=0,_s=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 ee(){if(le===null){var e=_t.alternate;e=e!==null?e.memoizedState:null}else e=le.next;var n=Ie===null?_t.memoizedState:Ie.next;if(n!==null)Ie=n,le=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.");le=e,e={memoizedState:le.memoizedState,baseState:le.baseState,baseQueue:le.baseQueue,queue:le.queue,next:null},Ie===null?_t.memoizedState=Ie=e:Ie=Ie.next=e}return Ie}function nm(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ll(e){var n=vc;return vc+=1,_s===null&&(_s=zS()),e=BS(_s,e,n),n=_t,(Ie===null?n.memoizedState:Ie.next)===null&&(n=n.alternate,G.H=n!==null&&n.memoizedState!==null?oy:ry),e}function Ys(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ll(e);if(e.$$typeof===Bi)return me(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=nm(),_t.updateQueue=s),s.memoCache=n,s=n.data[n.index],s===void 0||Sc)for(s=n.data[n.index]=Array(e),o=0;o<e;o++)s[o]=Fk;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 im(e,n,s){var o=xn();if(s!==void 0){var d=s(n);if(nr){At(!0);try{s(n)}finally{At(!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=IN.bind(null,_t,e),[o.memoizedState,e]}function Br(e){var n=ee();return sm(n,le,e)}function sm(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:(oa&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((oa&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,ua|=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,ua|=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=bo,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 Il(e){var n=ee(),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 am(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();So||f===s()||(console.error("The result of getServerSnapshot should be cached to avoid an infinite loop"),So=!0)}else{if(f=n(),So||(s=n(),gn(f,s)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),So=!0)),ce===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");(Bt&124)!==0||YS(o,n,f)}return d.memoizedState=f,s={value:f,getSnapshot:n},d.queue=s,ud(WS.bind(null,o,s,e),[e]),o.flags|=2048,Fr(li|He,cd(),XS.bind(null,o,s,f,n),null),f}function rd(e,n,s){var o=_t,d=ee(),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(),!So){var v=n();gn(s,v)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),So=!0)}(v=!gn((le||d).memoizedState,s))&&(d.memoizedState=s,$e=!0),d=d.queue;var E=WS.bind(null,o,d,e);if(Cn(2048,He,E,[e]),d.getSnapshot!==n||v||Ie!==null&&Ie.memoizedState.tag&li){if(o.flags|=2048,Fr(li|He,cd(),XS.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||(oa&124)!==0||YS(o,n,s)}return s}function YS(e,n,s){e.flags|=16384,e={getSnapshot:n,value:s},n=_t.updateQueue,n===null?(n=nm(),_t.updateQueue=n,n.stores=[e]):(s=n.stores,s===null?n.stores=[e]:s.push(e))}function XS(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=wn(e,2);n!==null&&xe(n,e,2)}function rm(e){var n=xn();if(typeof e=="function"){var s=e;if(e=s(),nr){At(!0);try{s()}finally{At(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:vi,lastRenderedState:e},n}function om(e){e=rm(e);var n=e.queue,s=gE.bind(null,_t,n);return n.dispatch=s,[e.memoizedState,s]}function lm(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=Em.bind(null,_t,!0,s),s.dispatch=n,[e,n]}function ZS(e,n){var s=ee();return JS(s,le,e,n)}function JS(e,n,s,o){return e.baseState=s,sm(e,le,typeof o=="function"?o:vi)}function tE(e,n){var s=ee();return le!==null?JS(s,le,e,n):(s.baseState=e,[e,s.queue.dispatch])}function NN(e,n,s,o,d){if(pd(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(x){cm(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),nE(e,n,v)}catch(x){cm(e,n,x)}}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 cm(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 cm(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 jr(e,n){if(Yt){var s=ce.formState;if(s!==null){t:{var o=_t;if(Yt){if(ve){e:{for(var d=ve,f=qi;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===Ly||f===D1?d:null}if(d){ve=ti(d.nextSibling),o=d.data===Ly;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:aE,lastRenderedState:n},s.queue=o,s=gE.bind(null,_t,o),o.dispatch=s,o=rm(!1),f=Em.bind(null,_t,!1,o.queue),o=xn(),d={state:n,dispatch:null,action:e,pending:null},o.queue=d,s=NN.bind(null,_t,d,f,s),d.dispatch=s,o.memoizedState=e,[n,s,!1]}function od(e){var n=ee();return rE(n,le,e)}function rE(e,n,s){if(n=sm(e,n,aE)[0],e=Br(vi)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var o=Ll(n)}catch(v){throw v===yc?ah:v}else o=n;n=ee();var d=n.queue,f=d.dispatch;return s!==n.memoizedState&&(_t.flags|=2048,Fr(li|He,cd(),kN.bind(null,d,s),null)),[o,f,e]}function kN(e,n){e.action=n}function ld(e){var n=ee(),s=le;if(s!==null)return rE(n,s,e);ee(),n=n.memoizedState,s=ee();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=nm(),_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 cd(){return{destroy:void 0,resource:void 0}}function um(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,cd(),s,o)}function Cn(e,n,s,o){var d=ee();o=o===void 0?null:o;var f=d.memoizedState.inst;le!==null&&o!==null&&Qp(o,le.memoizedState.deps)?d.memoizedState=Fr(n,f,s,o):(_t.flags|=e,d.memoizedState=Fr(li|n,f,s,o))}function ud(e,n){(_t.mode&Ei)!==de&&(_t.mode&fT)===de?Ga(276826112,He,e,n):Ga(8390656,He,e,n)}function dm(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 hm(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 dd(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,Cn(4,tn,oE.bind(null,n,e),s)}function fm(e,n){return xn().memoizedState=[e,n===void 0?null:n],e}function hd(e,n){var s=ee();n=n===void 0?null:n;var o=s.memoizedState;return n!==null&&Qp(n,o[1])?o[0]:(s.memoizedState=[e,n],e)}function pm(e,n){var s=xn();n=n===void 0?null:n;var o=e();if(nr){At(!0);try{e()}finally{At(!1)}}return s.memoizedState=[o,n],o}function fd(e,n){var s=ee();n=n===void 0?null:n;var o=s.memoizedState;if(n!==null&&Qp(n,o[1]))return o[0];if(o=e(),nr){At(!0);try{e()}finally{At(!1)}}return s.memoizedState=[o,n],o}function mm(e,n){var s=xn();return gm(s,e,n)}function lE(e,n){var s=ee();return uE(s,le.memoizedState,e,n)}function cE(e,n){var s=ee();return le===null?gm(s,e,n):uE(s,le.memoizedState,e,n)}function gm(e,n,s){return s===void 0||(oa&1073741824)!==0?e.memoizedState=n:(e.memoizedState=s,e=dA(),_t.lanes|=e,ua|=e,s)}function uE(e,n,s,o){return gn(s,n)?s:vo.current!==null?(e=gm(e,s,o),gn(e,n)||($e=!0),e):(oa&42)===0?($e=!0,e.memoizedState=s):(e=dA(),_t.lanes|=e,ua|=e,n)}function dE(e,n,s,o,d){var f=Zt.p;Zt.p=f!==0&&f<$i?f:$i;var v=G.T,E={};G.T=E,Em(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=DN(w,o);Pl(e,n,H,jn(e))}else Pl(e,n,o,jn(e))}catch(V){Pl(e,n,{then:function(){},status:"rejected",reason:V},jn(e))}finally{Zt.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 ym(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;Pl(e,n,{},jn(e))}function bm(){var e=rm(!1);return e=dE.bind(null,_t,e.queue,!0,!1),xn().memoizedState=e,[!1,e]}function pE(){var e=Br(vi)[0],n=ee().memoizedState;return[typeof e=="boolean"?e:Ll(e),n]}function mE(){var e=Il(vi)[0],n=ee().memoizedState;return[typeof e=="boolean"?e:Ll(e),n]}function Va(){return me(Uc)}function vm(){var e=xn(),n=ce.identifierPrefix;if(Yt){var s=Es,o=Ss;s=(o&~(1<<32-pn(o)-1)).toString(32)+s,n="«"+n+"R"+s,s=ch++,0<s&&(n+="H"+s.toString(32)),n+="»"}else s=eI++,n="«"+n+"r"+s.toString(32)+"»";return e.memoizedState=n}function Sm(){return xn().memoizedState=LN.bind(null,_t)}function LN(e,n){for(var s=e.return;s!==null;){switch(s.tag){case 24:case 3:var o=jn(s);e=Vs(o);var d=qs(s,e,o);d!==null&&(xe(d,s,o),Ol(d,s,o)),s=Fp(),n!=null&&d!==null&&console.error("The seed argument is not enabled outside experimental channels."),e.payload={cache:s};return}s=s.return}}function IN(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=jn(e);var d={lane:o,revertLane:0,action:s,hasEagerState:!1,eagerState:null,next:null};pd(e)?yE(n,d):(d=Mp(e,n,d,o),d!==null&&(xe(d,e,o),bE(d,n,o))),mi(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=jn(e),Pl(e,n,s,o),mi(e,o)}function Pl(e,n,s,o){var d={lane:o,revertLane:0,action:s,hasEagerState:!1,eagerState:null,next:null};if(pd(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 Xu(e,n,d,0),ce===null&&Yu(),!1}catch{}finally{G.H=v}}if(s=Mp(e,n,d,o),s!==null)return xe(s,e,o),bE(s,n,o),!0}return!1}function Em(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:Zm(),action:o,hasEagerState:!1,eagerState:null,next:null},pd(e)){if(n)throw Error("Cannot update optimistic state while rendering.");console.error("Cannot call startTransition while rendering.")}else n=Mp(e,s,o,2),n!==null&&xe(n,e,2);mi(e,2)}function pd(e){var n=e.alternate;return e===_t||n!==null&&n===_t}function yE(e,n){Eo=lh=!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,zu(e,s)}}function We(e){var n=kt;return e!=null&&(kt=n===null?e:n.concat(e)),n}function md(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=Qu(e,s.mode,0),n._debugInfo=kt,n.return=s),ft(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 gd(e){var n=Ec;return Ec+=1,Ao===null&&(Ao=zS()),BS(Ao,e,n)}function Ul(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function yd(e,n){throw n.$$typeof===Bk?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
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 bd(e,n){var s=X(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
160
  <%s>{%s}</%s>`,n,n,s,n,s))}function vd(e,n){var s=X(e)||"Component";YT[s]||(YT[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 vE(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=os(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=Ip(k,D.mode,Y),M.return=D,M._debugOwner=D,M._debugTask=D._debugTask,M._debugInfo=kt,M):(M=d(M,k),M.return=D,M._debugInfo=kt,M)}function w(D,M,k,Y){var nt=k.type;return nt===Jr?(M=H(D,M,k.props.children,Y,k.key),md(k,M,D),M):M!==null&&(M.elementType===nt||xS(M,k)||typeof nt=="object"&&nt!==null&&nt.$$typeof===jn&&la(nt)===M.type)?(M=d(M,k.props),Ul(M,k),M.return=D,M._debugOwner=k._owner,M._debugInfo=kt,M):(M=Qu(k,D.mode,Y),Ul(M,k),M.return=D,M._debugInfo=kt,M)}function C(D,M,k,Y){return M===null||M.tag!==4||M.stateNode.containerInfo!==k.containerInfo||M.stateNode.implementation!==k.implementation?(M=Pp(k,D.mode,Y),M.return=D,M._debugInfo=kt,M):(M=d(M,k.children||[]),M.return=D,M._debugInfo=kt,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=kt,M):(M=d(M,k),M.return=D,M._debugInfo=kt,M)}function V(D,M,k){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return M=Ip(""+M,D.mode,k),M.return=D,M._debugOwner=D,M._debugTask=D._debugTask,M._debugInfo=kt,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case Js:return k=Qu(M,D.mode,k),Ul(k,M),k.return=D,D=We(M._debugInfo),k._debugInfo=kt,kt=D,k;case Zr:return M=Pp(M,D.mode,k),M.return=D,M._debugInfo=kt,M;case jn:var Y=We(M._debugInfo);return M=la(M),D=V(D,M,k),kt=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=kt,kt=D,k;if(typeof M.then=="function")return Y=We(M._debugInfo),D=V(D,gd(M),k),kt=Y,D;if(M.$$typeof===Bi)return V(D,Ju(D,M),k);yd(D,M)}return typeof M=="function"&&bd(D,M),typeof M=="symbol"&&vd(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 Js:return k.key===nt?(nt=We(k._debugInfo),D=w(D,M,k,Y),kt=nt,D):null;case Zr:return k.key===nt?C(D,M,k,Y):null;case jn:return nt=We(k._debugInfo),k=la(k),D=z(D,M,k,Y),kt=nt,D}if(Ze(k)||j(k))return nt!==null?null:(nt=We(k._debugInfo),D=H(D,M,k,Y,null),kt=nt,D);if(typeof k.then=="function")return nt=We(k._debugInfo),D=z(D,M,gd(k),Y),kt=nt,D;if(k.$$typeof===Bi)return z(D,M,Ju(D,k),Y);yd(D,k)}return typeof k=="function"&&bd(D,k),typeof k=="symbol"&&vd(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 Js:return k=D.get(Y.key===null?k:Y.key)||null,D=We(Y._debugInfo),M=w(M,k,Y,nt),kt=D,M;case Zr:return D=D.get(Y.key===null?k:Y.key)||null,C(M,D,Y,nt);case jn:var Rt=We(Y._debugInfo);return Y=la(Y),M=q(D,M,k,Y,nt),kt=Rt,M}if(Ze(Y)||j(Y))return k=D.get(k)||null,D=We(Y._debugInfo),M=H(M,k,Y,nt,null),kt=D,M;if(typeof Y.then=="function")return Rt=We(Y._debugInfo),M=q(D,M,k,gd(Y),nt),kt=Rt,M;if(Y.$$typeof===Bi)return q(D,M,k,Ju(M,Y),nt);yd(M,Y)}return typeof Y=="function"&&bd(M,Y),typeof Y=="symbol"&&vd(M,Y),null}function lt(D,M,k,Y){if(typeof k!="object"||k===null)return Y;switch(k.$$typeof){case Js:case Zr: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}ft(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=la(k),lt(D,M,k,Y)}return Y}function Et(D,M,k,Y){for(var nt=null,Rt=null,ct=null,Dt=M,Mt=M=0,he=null;Dt!==null&&Mt<k.length;Mt++){Dt.index>Mt?(he=Dt,Dt=null):he=Dt.sibling;var Re=z(D,Dt,k[Mt],Y);if(Re===null){Dt===null&&(Dt=he);break}nt=lt(D,Re,k[Mt],nt),e&&Dt&&Re.alternate===null&&n(D,Dt),M=f(Re,M,Mt),ct===null?Rt=Re:ct.sibling=Re,ct=Re,Dt=he}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=lt(D,Dt,k[Mt],nt),M=f(Dt,M,Mt),ct===null?Rt=Dt:ct.sibling=Dt,ct=Dt);return Yt&&Ua(D,Mt),Rt}for(Dt=o(Dt);Mt<k.length;Mt++)he=q(Dt,D,Mt,k[Mt],Y),he!==null&&(nt=lt(D,he,k[Mt],nt),e&&he.alternate!==null&&Dt.delete(he.key===null?Mt:he.key),M=f(he,M,Mt),ct===null?Rt=he:ct.sibling=he,ct=he);return e&&Dt.forEach(function(Ms){return n(D,Ms)}),Yt&&Ua(D,Mt),Rt}function ue(D,M,k,Y){if(k==null)throw Error("An iterable object provided no iterator.");for(var nt=null,Rt=null,ct=M,Dt=M=0,Mt=null,he=null,Re=k.next();ct!==null&&!Re.done;Dt++,Re=k.next()){ct.index>Dt?(Mt=ct,ct=null):Mt=ct.sibling;var Ms=z(D,ct,Re.value,Y);if(Ms===null){ct===null&&(ct=Mt);break}he=lt(D,Ms,Re.value,he),e&&ct&&Ms.alternate===null&&n(D,ct),M=f(Ms,M,Dt),Rt===null?nt=Ms:Rt.sibling=Ms,Rt=Ms,ct=Mt}if(Re.done)return s(D,ct),Yt&&Ua(D,Dt),nt;if(ct===null){for(;!Re.done;Dt++,Re=k.next())ct=V(D,Re.value,Y),ct!==null&&(he=lt(D,ct,Re.value,he),M=f(ct,M,Dt),Rt===null?nt=ct:Rt.sibling=ct,Rt=ct);return Yt&&Ua(D,Dt),nt}for(ct=o(ct);!Re.done;Dt++,Re=k.next())Mt=q(ct,D,Dt,Re.value,Y),Mt!==null&&(he=lt(D,Mt,Re.value,he),e&&Mt.alternate!==null&&ct.delete(Mt.key===null?Dt:Mt.key),M=f(Mt,M,Dt),Rt===null?nt=Mt:Rt.sibling=Mt,Rt=Mt);return e&&ct.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===Jr&&k.key===null&&(md(k,null,D),k=k.props.children),typeof k=="object"&&k!==null){switch(k.$$typeof){case Js:var nt=We(k._debugInfo);t:{for(var Rt=k.key;M!==null;){if(M.key===Rt){if(Rt=k.type,Rt===Jr){if(M.tag===7){s(D,M.sibling),Y=d(M,k.props.children),Y.return=D,Y._debugOwner=k._owner,Y._debugInfo=kt,md(k,Y,D),D=Y;break t}}else if(M.elementType===Rt||xS(M,k)||typeof Rt=="object"&&Rt!==null&&Rt.$$typeof===jn&&la(Rt)===M.type){s(D,M.sibling),Y=d(M,k.props),Ul(Y,k),Y.return=D,Y._debugOwner=k._owner,Y._debugInfo=kt,D=Y;break t}s(D,M);break}else n(D,M);M=M.sibling}k.type===Jr?(Y=Pa(k.props.children,D.mode,Y,k.key),Y.return=D,Y._debugOwner=D,Y._debugTask=D._debugTask,Y._debugInfo=kt,md(k,Y,D),D=Y):(Y=Qu(k,D.mode,Y),Ul(Y,k),Y.return=D,Y._debugInfo=kt,D=Y)}return D=v(D),kt=nt,D;case Zr: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=Pp(nt,D.mode,Y),Y.return=D,D=Y}return v(D);case jn:return nt=We(k._debugInfo),k=la(k),D=jt(D,M,k,Y),kt=nt,D}if(Ze(k))return nt=We(k._debugInfo),D=Et(D,M,k,Y),kt=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 ct=Rt.call(k);return ct===k?(D.tag!==0||Object.prototype.toString.call(D.type)!=="[object GeneratorFunction]"||Object.prototype.toString.call(ct)!=="[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):k.entries!==Rt||uy||(console.error("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),uy=!0),D=ue(D,M,ct,Y),kt=nt,D}if(typeof k.then=="function")return nt=We(k._debugInfo),D=jt(D,M,gd(k),Y),kt=nt,D;if(k.$$typeof===Bi)return jt(D,M,Ju(D,k),Y);yd(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=Ip(nt,D.mode,Y),Y.return=D,Y._debugOwner=D,Y._debugTask=D._debugTask,Y._debugInfo=kt,D=Y),v(D)):(typeof k=="function"&&bd(D,k),typeof k=="symbol"&&vd(D,k),s(D,M))}return function(D,M,k,Y){var nt=kt;kt=null;try{Ec=0;var Rt=jt(D,M,k,Y);return Ao=null,Rt}catch(he){if(he===yc||he===ah)throw he;var ct=b(29,he,null,D.mode);ct.lanes=Y,ct.return=D;var Dt=ct._debugInfo=kt;if(ct._debugOwner=D._debugOwner,ct._debugTask=D._debugTask,Dt!=null){for(var Mt=Dt.length-1;0<=Mt;Mt--)if(typeof Dt[Mt].stack=="string"){ct._debugOwner=Dt[Mt],ct._debugTask=Dt[Mt].debugTask;break}}return ct}finally{kt=nt}}}function Xs(e){var n=e.alternate;ot(Be,Be.current&To,e),ot(ui,e,e),Xi===null&&(n===null||vo.current!==null||n.memoizedState!==null)&&(Xi=e)}function SE(e){if(e.tag===22){if(ot(Be,Be.current,e),ot(ui,e,e),Xi===null){var n=e.alternate;n!==null&&n.memoizedState!==null&&(Xi=e)}}else Ws(e)}function Ws(e){ot(Be,Be.current,e),ot(ui,ui.current,e)}function us(e){Z(ui,e),Xi===e&&(Xi=null),Z(Be,e)}function Sd(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||cg(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 Am(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 _m(e,n,s,o){var d=e.memoizedState,f=s(o,d);if(e.mode&on){At(!0);try{f=s(o,d)}finally{At(!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){At(!0);try{s=E.shouldComponentUpdate(o,f,v)}finally{At(!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?!Tl(s,o)||!Tl(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=X(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)),dy.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){hy(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=os(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,Y){return M===null||M.tag!==6?(M=Ip(N,D.mode,Y),M.return=D,M._debugOwner=D,M._debugTask=D._debugTask,M._debugInfo=kt,M):(M=d(M,N),M.return=D,M._debugInfo=kt,M)}function w(D,M,N,Y){var nt=N.type;return nt===Jr?(M=H(D,M,N.props.children,Y,N.key),md(N,M,D),M):M!==null&&(M.elementType===nt||xS(M,N)||typeof nt=="object"&&nt!==null&&nt.$$typeof===Fn&&la(nt)===M.type)?(M=d(M,N.props),Ul(M,N),M.return=D,M._debugOwner=N._owner,M._debugInfo=kt,M):(M=Qu(N,D.mode,Y),Ul(M,N),M.return=D,M._debugInfo=kt,M)}function x(D,M,N,Y){return M===null||M.tag!==4||M.stateNode.containerInfo!==N.containerInfo||M.stateNode.implementation!==N.implementation?(M=Pp(N,D.mode,Y),M.return=D,M._debugInfo=kt,M):(M=d(M,N.children||[]),M.return=D,M._debugInfo=kt,M)}function H(D,M,N,Y,nt){return M===null||M.tag!==7?(M=Pa(N,D.mode,Y,nt),M.return=D,M._debugOwner=D,M._debugTask=D._debugTask,M._debugInfo=kt,M):(M=d(M,N),M.return=D,M._debugInfo=kt,M)}function V(D,M,N){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return M=Ip(""+M,D.mode,N),M.return=D,M._debugOwner=D,M._debugTask=D._debugTask,M._debugInfo=kt,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case Js:return N=Qu(M,D.mode,N),Ul(N,M),N.return=D,D=We(M._debugInfo),N._debugInfo=kt,kt=D,N;case Zr:return M=Pp(M,D.mode,N),M.return=D,M._debugInfo=kt,M;case Fn:var Y=We(M._debugInfo);return M=la(M),D=V(D,M,N),kt=Y,D}if(Ze(M)||F(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=kt,kt=D,N;if(typeof M.then=="function")return Y=We(M._debugInfo),D=V(D,gd(M),N),kt=Y,D;if(M.$$typeof===Bi)return V(D,Ju(D,M),N);yd(D,M)}return typeof M=="function"&&bd(D,M),typeof M=="symbol"&&vd(D,M),null}function z(D,M,N,Y){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,Y);if(typeof N=="object"&&N!==null){switch(N.$$typeof){case Js:return N.key===nt?(nt=We(N._debugInfo),D=w(D,M,N,Y),kt=nt,D):null;case Zr:return N.key===nt?x(D,M,N,Y):null;case Fn:return nt=We(N._debugInfo),N=la(N),D=z(D,M,N,Y),kt=nt,D}if(Ze(N)||F(N))return nt!==null?null:(nt=We(N._debugInfo),D=H(D,M,N,Y,null),kt=nt,D);if(typeof N.then=="function")return nt=We(N._debugInfo),D=z(D,M,gd(N),Y),kt=nt,D;if(N.$$typeof===Bi)return z(D,M,Ju(D,N),Y);yd(D,N)}return typeof N=="function"&&bd(D,N),typeof N=="symbol"&&vd(D,N),null}function q(D,M,N,Y,nt){if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return D=D.get(N)||null,E(M,D,""+Y,nt);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case Js:return N=D.get(Y.key===null?N:Y.key)||null,D=We(Y._debugInfo),M=w(M,N,Y,nt),kt=D,M;case Zr:return D=D.get(Y.key===null?N:Y.key)||null,x(M,D,Y,nt);case Fn:var Rt=We(Y._debugInfo);return Y=la(Y),M=q(D,M,N,Y,nt),kt=Rt,M}if(Ze(Y)||F(Y))return N=D.get(N)||null,D=We(Y._debugInfo),M=H(M,N,Y,nt,null),kt=D,M;if(typeof Y.then=="function")return Rt=We(Y._debugInfo),M=q(D,M,N,gd(Y),nt),kt=Rt,M;if(Y.$$typeof===Bi)return q(D,M,N,Ju(M,Y),nt);yd(M,Y)}return typeof Y=="function"&&bd(M,Y),typeof Y=="symbol"&&vd(M,Y),null}function lt(D,M,N,Y){if(typeof N!="object"||N===null)return Y;switch(N.$$typeof){case Js:case Zr:h(D,M,N);var nt=N.key;if(typeof nt!="string")break;if(Y===null){Y=new Set,Y.add(nt);break}if(!Y.has(nt)){Y.add(nt);break}ft(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 Fn:N=la(N),lt(D,M,N,Y)}return Y}function Et(D,M,N,Y){for(var nt=null,Rt=null,ct=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],Y);if(Re===null){Dt===null&&(Dt=he);break}nt=lt(D,Re,N[Mt],nt),e&&Dt&&Re.alternate===null&&n(D,Dt),M=f(Re,M,Mt),ct===null?Rt=Re:ct.sibling=Re,ct=Re,Dt=he}if(Mt===N.length)return s(D,Dt),Yt&&Ua(D,Mt),Rt;if(Dt===null){for(;Mt<N.length;Mt++)Dt=V(D,N[Mt],Y),Dt!==null&&(nt=lt(D,Dt,N[Mt],nt),M=f(Dt,M,Mt),ct===null?Rt=Dt:ct.sibling=Dt,ct=Dt);return Yt&&Ua(D,Mt),Rt}for(Dt=o(Dt);Mt<N.length;Mt++)he=q(Dt,D,Mt,N[Mt],Y),he!==null&&(nt=lt(D,he,N[Mt],nt),e&&he.alternate!==null&&Dt.delete(he.key===null?Mt:he.key),M=f(he,M,Mt),ct===null?Rt=he:ct.sibling=he,ct=he);return e&&Dt.forEach(function(Ms){return n(D,Ms)}),Yt&&Ua(D,Mt),Rt}function ue(D,M,N,Y){if(N==null)throw Error("An iterable object provided no iterator.");for(var nt=null,Rt=null,ct=M,Dt=M=0,Mt=null,he=null,Re=N.next();ct!==null&&!Re.done;Dt++,Re=N.next()){ct.index>Dt?(Mt=ct,ct=null):Mt=ct.sibling;var Ms=z(D,ct,Re.value,Y);if(Ms===null){ct===null&&(ct=Mt);break}he=lt(D,Ms,Re.value,he),e&&ct&&Ms.alternate===null&&n(D,ct),M=f(Ms,M,Dt),Rt===null?nt=Ms:Rt.sibling=Ms,Rt=Ms,ct=Mt}if(Re.done)return s(D,ct),Yt&&Ua(D,Dt),nt;if(ct===null){for(;!Re.done;Dt++,Re=N.next())ct=V(D,Re.value,Y),ct!==null&&(he=lt(D,ct,Re.value,he),M=f(ct,M,Dt),Rt===null?nt=ct:Rt.sibling=ct,Rt=ct);return Yt&&Ua(D,Dt),nt}for(ct=o(ct);!Re.done;Dt++,Re=N.next())Mt=q(ct,D,Dt,Re.value,Y),Mt!==null&&(he=lt(D,Mt,Re.value,he),e&&Mt.alternate!==null&&ct.delete(Mt.key===null?Dt:Mt.key),M=f(Mt,M,Dt),Rt===null?nt=Mt:Rt.sibling=Mt,Rt=Mt);return e&&ct.forEach(function(RI){return n(D,RI)}),Yt&&Ua(D,Dt),nt}function Ft(D,M,N,Y){if(typeof N=="object"&&N!==null&&N.type===Jr&&N.key===null&&(md(N,null,D),N=N.props.children),typeof N=="object"&&N!==null){switch(N.$$typeof){case Js:var nt=We(N._debugInfo);t:{for(var Rt=N.key;M!==null;){if(M.key===Rt){if(Rt=N.type,Rt===Jr){if(M.tag===7){s(D,M.sibling),Y=d(M,N.props.children),Y.return=D,Y._debugOwner=N._owner,Y._debugInfo=kt,md(N,Y,D),D=Y;break t}}else if(M.elementType===Rt||xS(M,N)||typeof Rt=="object"&&Rt!==null&&Rt.$$typeof===Fn&&la(Rt)===M.type){s(D,M.sibling),Y=d(M,N.props),Ul(Y,N),Y.return=D,Y._debugOwner=N._owner,Y._debugInfo=kt,D=Y;break t}s(D,M);break}else n(D,M);M=M.sibling}N.type===Jr?(Y=Pa(N.props.children,D.mode,Y,N.key),Y.return=D,Y._debugOwner=D,Y._debugTask=D._debugTask,Y._debugInfo=kt,md(N,Y,D),D=Y):(Y=Qu(N,D.mode,Y),Ul(Y,N),Y.return=D,Y._debugInfo=kt,D=Y)}return D=v(D),kt=nt,D;case Zr: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),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=Pp(nt,D.mode,Y),Y.return=D,D=Y}return v(D);case Fn:return nt=We(N._debugInfo),N=la(N),D=Ft(D,M,N,Y),kt=nt,D}if(Ze(N))return nt=We(N._debugInfo),D=Et(D,M,N,Y),kt=nt,D;if(F(N)){if(nt=We(N._debugInfo),Rt=F(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 ct=Rt.call(N);return ct===N?(D.tag!==0||Object.prototype.toString.call(D.type)!=="[object GeneratorFunction]"||Object.prototype.toString.call(ct)!=="[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||uy||(console.error("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),uy=!0),D=ue(D,M,ct,Y),kt=nt,D}if(typeof N.then=="function")return nt=We(N._debugInfo),D=Ft(D,M,gd(N),Y),kt=nt,D;if(N.$$typeof===Bi)return Ft(D,M,Ju(D,N),Y);yd(D,N)}return typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint"?(nt=""+N,M!==null&&M.tag===6?(s(D,M.sibling),Y=d(M,nt),Y.return=D,D=Y):(s(D,M),Y=Ip(nt,D.mode,Y),Y.return=D,Y._debugOwner=D,Y._debugTask=D._debugTask,Y._debugInfo=kt,D=Y),v(D)):(typeof N=="function"&&bd(D,N),typeof N=="symbol"&&vd(D,N),s(D,M))}return function(D,M,N,Y){var nt=kt;kt=null;try{Ec=0;var Rt=Ft(D,M,N,Y);return Ao=null,Rt}catch(he){if(he===yc||he===ah)throw he;var ct=b(29,he,null,D.mode);ct.lanes=Y,ct.return=D;var Dt=ct._debugInfo=kt;if(ct._debugOwner=D._debugOwner,ct._debugTask=D._debugTask,Dt!=null){for(var Mt=Dt.length-1;0<=Mt;Mt--)if(typeof Dt[Mt].stack=="string"){ct._debugOwner=Dt[Mt],ct._debugTask=Dt[Mt].debugTask;break}}return ct}finally{kt=nt}}}function Xs(e){var n=e.alternate;ot(Be,Be.current&To,e),ot(ui,e,e),Xi===null&&(n===null||vo.current!==null||n.memoizedState!==null)&&(Xi=e)}function SE(e){if(e.tag===22){if(ot(Be,Be.current,e),ot(ui,e,e),Xi===null){var n=e.alternate;n!==null&&n.memoizedState!==null&&(Xi=e)}}else Ws(e)}function Ws(e){ot(Be,Be.current,e),ot(ui,ui.current,e)}function us(e){Z(ui,e),Xi===e&&(Xi=null),Z(Be,e)}function Sd(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||cg(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 Am(e){if(e!==null&&typeof e!="function"){var n=String(e);a1.has(n)||(a1.add(n),console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",e))}}function _m(e,n,s,o){var d=e.memoizedState,f=s(o,d);if(e.mode&on){At(!0);try{f=s(o,d)}finally{At(!1)}}f===void 0&&(n=j(n)||"Component",e1.has(n)||(e1.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){At(!0);try{s=E.shouldComponentUpdate(o,f,v)}finally{At(!1)}}return s===void 0&&console.error("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",j(n)||"Component"),s}return n.prototype&&n.prototype.isPureReactComponent?!Tl(s,o)||!Tl(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=X(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)),dy.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){hy(e),console.warn(`%s
163
163
 
164
164
  %s
165
165
  `,wo?"An error occurred in the <"+wo+"> component.":"An error occurred in one of your React components.",`Consider adding an error boundary to your tree to customize error handling behavior.
@@ -168,21 +168,21 @@ Visit https://react.dev/link/error-boundaries to learn more about error boundari
168
168
  %s
169
169
 
170
170
  %s
171
- `,e,n,s].slice(0),typeof e[0]=="string"?e.splice(0,1,Uw+e[0],zw,Dh+o+Dh,Hw):e.splice(0,0,Uw,zw,Dh+o+Dh,Hw),e.unshift(console),o=xI.apply(console.error,e),o()}else console.error(`%o
171
+ `,e,n,s].slice(0),typeof e[0]=="string"?e.splice(0,1,U1+e[0],z1,Dh+o+Dh,H1):e.splice(0,0,U1,z1,Dh+o+Dh,H1),e.unshift(console),o=xI.apply(console.error,e),o()}else console.error(`%o
172
172
 
173
173
  %s
174
174
 
175
175
  %s
176
- `,e,n,s)}function wE(e){hy(e)}function Ed(e,n){try{wo=n.source?X(n.source):null,fy=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{wo=s.source?X(s.source):null,fy=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 Tm(e,n,s){return s=Vs(s),s.tag=ny,s.payload={element:null},s.callback=function(){ft(n.source,Ed,e,n)},s}function wm(e){return e=Vs(e),e.tag=ny,e}function xm(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),ft(o.source,xE,n,s,o)}}var v=s.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(e.callback=function(){CS(s),ft(o.source,xE,n,s,o),typeof d!="function"&&(ha===null?ha=new Set([this]):ha.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 PN(e,n,s,o,d){if(s.flags|=32768,Si&&Gl(e,d),o!==null&&typeof o=="object"&&typeof o.then=="function"){if(n=s.alternate,n!==null&&Rl(n,s,d,!0),Yt&&(As=!0),s=ui.current,s!==null){switch(s.tag){case 13:return Xi===null?Vm():s.alternate===null&&Se===xs&&(Se=yy),s.flags&=-257,s.flags|=65536,s.lanes=d,o===ey?s.flags|=16384:(n=s.updateQueue,n===null?s.updateQueue=new Set([o]):n.add(o),Xm(e,o,d)),!1;case 22:return s.flags|=65536,o===ey?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)),Xm(e,o,d)),!1}throw Error("Unexpected Suspense handler tag ("+s.tag+"). This is a bug in React.")}return Xm(e,o,d),Vm(),!1}if(Yt)return As=!0,n=ui.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=d,o!==Kg&&Cl(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!==Kg&&Cl(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=Tm(e.stateNode,o,d),sd(e,d),Se!==ir&&(Se=Do)),!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(Dc===null?Dc=[f]:Dc.push(f),Se!==ir&&(Se=Do),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=Tm(s.stateNode,o,e),sd(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"&&(ha===null||!ha.has(f))))return s.flags|=65536,d&=-d,s.lanes|=d,d=wm(d),xm(d,e,s,o),sd(s,d),!1}s=s.return}while(s!==null);return!1}function Qe(e,n,s,o){n.child=e===null?XT(n,null,s,o):_o(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),Te(n),o=Kp(e,n,s,v,f,d),E=Jp(),Xe(),e!==null&&!$e?(tm(e,n,d),ds(e,n,d)):(Yt&&E&&Up(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"&&!kp(f)&&f.defaultProps===void 0&&s.compare===null?(s=Ia(f),n.tag=15,n.type=s,Rm(n,f),DE(e,n,s,o,d)):(e=Lp(s.type,null,o,n,n.mode,d),e.ref=n.ref,e.return=n,n.child=e)}if(f=e.child,!Lm(e,d)){var v=f.memoizedProps;if(s=s.compare,s=s!==null?s:Tl,s(v,o)&&e.ref===n.ref)return ds(e,n,d)}return n.flags|=1,e=os(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(Tl(f,o)&&e.ref===n.ref&&n.type===e.type)if($e=!1,n.pendingProps=o=f,Lm(e,d))(e.flags&131072)!==0&&($e=!0);else return n.lanes=e.lanes,ds(e,n,d)}return Cm(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&&nd(n,f!==null?f.cachePool:null),f!==null?VS(n,f):Xp(n),SE(n);else return n.lanes=n.childLanes=536870912,OE(e,n,f!==null?f.baseLanes|s:s,s)}else f!==null?(nd(n,f.cachePool),VS(n,f),Ws(n),n.memoizedState=null):(e!==null&&nd(n,null),Xp(n),Ws(n));return Qe(e,n,d,s),n.child}function OE(e,n,s,o){var d=Vp();return d=d===null?null:{parent:ze._currentValue,pool:d},n.memoizedState={baseLanes:s,cachePool:d},e!==null&&nd(n,null),Xp(n),SE(n),e!==null&&Rl(e,n,o,!0),null}function Ad(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 Cm(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&&(Rm(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),Te(n),s=Kp(e,n,s,o,void 0,d),o=Jp(),Xe(),e!==null&&!$e?(tm(e,n,d),ds(e,n,d)):(Yt&&o&&Up(n),n.flags|=1,Qe(e,n,s,d),n.child)}function NE(e,n,s,o,d,f){return Fa(n),Te(n),Ts=-1,Sc=e!==null&&e.type!==n.type,n.updateQueue=null,s=Zp(n,o,s,d),qS(e,n),o=Jp(),Xe(),e!==null&&!$e?(tm(e,n,f),ds(e,n,f)):(Yt&&o&&Up(n),n.flags|=1,Qe(e,n,s,f),n.child)}function kE(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=wm(E),xm(E,v,n,zn(f,n)),sd(n,E)}if(Fa(n),n.stateNode===null){if(v=aa,f=s.contextType,"contextType"in s&&f!==null&&(f===void 0||f.$$typeof!==Bi)&&!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===Eg?" 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=me(f)),f=new s(o,v),n.mode&on){At(!0);try{f=new s(o,v)}finally{At(!1)}}if(v=n.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=dy,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.
176
+ `,e,n,s)}function wE(e){hy(e)}function Ed(e,n){try{wo=n.source?X(n.source):null,fy=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{wo=s.source?X(s.source):null,fy=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 Tm(e,n,s){return s=Vs(s),s.tag=ny,s.payload={element:null},s.callback=function(){ft(n.source,Ed,e,n)},s}function wm(e){return e=Vs(e),e.tag=ny,e}function xm(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),ft(o.source,xE,n,s,o)}}var v=s.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(e.callback=function(){CS(s),ft(o.source,xE,n,s,o),typeof d!="function"&&(ha===null?ha=new Set([this]):ha.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 PN(e,n,s,o,d){if(s.flags|=32768,Si&&Gl(e,d),o!==null&&typeof o=="object"&&typeof o.then=="function"){if(n=s.alternate,n!==null&&Rl(n,s,d,!0),Yt&&(As=!0),s=ui.current,s!==null){switch(s.tag){case 13:return Xi===null?Vm():s.alternate===null&&Se===xs&&(Se=yy),s.flags&=-257,s.flags|=65536,s.lanes=d,o===ey?s.flags|=16384:(n=s.updateQueue,n===null?s.updateQueue=new Set([o]):n.add(o),Xm(e,o,d)),!1;case 22:return s.flags|=65536,o===ey?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)),Xm(e,o,d)),!1}throw Error("Unexpected Suspense handler tag ("+s.tag+"). This is a bug in React.")}return Xm(e,o,d),Vm(),!1}if(Yt)return As=!0,n=ui.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=d,o!==Kg&&Cl(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!==Kg&&Cl(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=Tm(e.stateNode,o,d),sd(e,d),Se!==ir&&(Se=Do)),!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(Dc===null?Dc=[f]:Dc.push(f),Se!==ir&&(Se=Do),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=Tm(s.stateNode,o,e),sd(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"&&(ha===null||!ha.has(f))))return s.flags|=65536,d&=-d,s.lanes|=d,d=wm(d),xm(d,e,s,o),sd(s,d),!1}s=s.return}while(s!==null);return!1}function Qe(e,n,s,o){n.child=e===null?XT(n,null,s,o):_o(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 ja(n),Te(n),o=Kp(e,n,s,v,f,d),E=Jp(),Xe(),e!==null&&!$e?(tm(e,n,d),ds(e,n,d)):(Yt&&E&&Up(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"&&!kp(f)&&f.defaultProps===void 0&&s.compare===null?(s=Ia(f),n.tag=15,n.type=s,Rm(n,f),DE(e,n,s,o,d)):(e=Lp(s.type,null,o,n,n.mode,d),e.ref=n.ref,e.return=n,n.child=e)}if(f=e.child,!Lm(e,d)){var v=f.memoizedProps;if(s=s.compare,s=s!==null?s:Tl,s(v,o)&&e.ref===n.ref)return ds(e,n,d)}return n.flags|=1,e=os(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(Tl(f,o)&&e.ref===n.ref&&n.type===e.type)if($e=!1,n.pendingProps=o=f,Lm(e,d))(e.flags&131072)!==0&&($e=!0);else return n.lanes=e.lanes,ds(e,n,d)}return Cm(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&&nd(n,f!==null?f.cachePool:null),f!==null?VS(n,f):Xp(n),SE(n);else return n.lanes=n.childLanes=536870912,OE(e,n,f!==null?f.baseLanes|s:s,s)}else f!==null?(nd(n,f.cachePool),VS(n,f),Ws(n),n.memoizedState=null):(e!==null&&nd(n,null),Xp(n),Ws(n));return Qe(e,n,d,s),n.child}function OE(e,n,s,o){var d=Vp();return d=d===null?null:{parent:ze._currentValue,pool:d},n.memoizedState={baseLanes:s,cachePool:d},e!==null&&nd(n,null),Xp(n),SE(n),e!==null&&Rl(e,n,o,!0),null}function Ad(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 Cm(e,n,s,o,d){if(s.prototype&&typeof s.prototype.render=="function"){var f=j(s)||"Unknown";o1[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),o1[f]=!0)}return n.mode&on&&Ai.recordLegacyContextWarning(n,null),e===null&&(Rm(n,n.type),s.contextTypes&&(f=j(s)||"Unknown",c1[f]||(c1[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)))),ja(n),Te(n),s=Kp(e,n,s,o,void 0,d),o=Jp(),Xe(),e!==null&&!$e?(tm(e,n,d),ds(e,n,d)):(Yt&&o&&Up(n),n.flags|=1,Qe(e,n,s,d),n.child)}function NE(e,n,s,o,d,f){return ja(n),Te(n),Ts=-1,Sc=e!==null&&e.type!==n.type,n.updateQueue=null,s=Zp(n,o,s,d),qS(e,n),o=Jp(),Xe(),e!==null&&!$e?(tm(e,n,f),ds(e,n,f)):(Yt&&o&&Up(n),n.flags|=1,Qe(e,n,s,f),n.child)}function kE(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=wm(E),xm(E,v,n,zn(f,n)),sd(n,E)}if(ja(n),n.stateNode===null){if(v=aa,f=s.contextType,"contextType"in s&&f!==null&&(f===void 0||f.$$typeof!==Bi)&&!s1.has(s)&&(s1.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===Eg?" 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",j(s)||"Component",E)),typeof f=="object"&&f!==null&&(v=me(f)),f=new s(o,v),n.mode&on){At(!0);try{f=new s(o,v)}finally{At(!1)}}if(v=n.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=dy,n.stateNode=f,f._reactInternals=n,f._reactInternalInstance=WT,typeof s.getDerivedStateFromProps=="function"&&v===null&&(v=j(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=j(s)||"Component";var x=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,C,v!==null?`
181
+ https://react.dev/link/unsafe-component-lifecycles`,f,x,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&&!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={},qp(n),v=s.contextType,f.context=typeof v=="object"&&v!==null?me(v):aa,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"&&(_m(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"),dy.enqueueReplaceState(f,f.state,null)),kl(n,o,f,d),Nl(),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=aa,typeof w=="object"&&w!==null&&(v=me(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),ra=!1;var z=n.memoizedState;f.state=z,kl(n,o,f,d),Nl(),V=n.memoizedState,H||z!==V||ra?(typeof C=="function"&&(_m(n,s,C,o),V=n.memoizedState),(E=ra||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,Yp(e,n),v=n.memoizedProps,w=qa(s,v),f.props=w,C=n.pendingProps,z=f.context,V=s.contextType,E=aa,typeof V=="object"&&V!==null&&(E=me(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),ra=!1,z=n.memoizedState,f.state=z,kl(n,o,f,d),Nl();var q=n.memoizedState;v!==C||z!==q||ra||e!==null&&e.dependencies!==null&&Zu(e.dependencies)?(typeof H=="function"&&(_m(n,s,H,o),q=n.memoizedState),(w=ra||EE(n,s,w,o,z,q,E)||e!==null&&e.dependencies!==null&&Zu(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,Ad(e,n),v=(n.flags&128)!==0,E||v){if(E=n.stateNode,vp(n),v&&typeof s.getDerivedStateFromError!="function")s=null,Dn=-1;else{if(Te(n),s=LT(E),n.mode&on){At(!0);try{LT(E)}finally{At(!1)}}Xe()}n.flags|=1,e!==null&&v?(n.child=_o(n,e.child,null,d),n.child=_o(n,null,s,d)):Qe(e,n,s,d),n.memoizedState=E.state,e=n.child}else e=ds(e,n,d);return d=n.stateNode,f&&d.props!==o&&(xo||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"),xo=!0),e}function LE(e,n,s,o){return xl(),n.flags|=256,Qe(e,n,s,o),n.child}function Rm(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 Dm(e){return{baseLanes:e,cachePool:US()}}function Mm(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&Ac)!==0),o&&(f=!0,n.flags&=-129),o=(n.flags&32)!==0,n.flags&=-33,e===null){if(Yt){if(f?Xs(n):Ws(n),Yt){var E=ve,w;if(!(w=!E)){t:{var C=E;for(w=qi;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:Ss,overflow:Es}:null,retryLane:536870912,hydrationErrors:null},C=b(18,null,null,de),C.stateNode=w,C.return=n,n.child=C,yn=n,ve=null,w=!0):w=!1,w=!w}w&&(Hp(n,E),Ba(n))}if(E=n.memoizedState,E!==null&&(E=E.dehydrated,E!==null))return cg(E)?n.lanes=32:n.lanes=536870912,null;us(n)}return E=d.children,d=d.fallback,f?(Ws(n),f=n.mode,E=_d({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=Dm(s),f.childLanes=Mm(e,o,s),n.memoizedState=my,d):(Xs(n),Om(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=Nm(e,n,s)):n.memoizedState!==null?(Ws(n),n.child=e.child,n.flags|=128,n=null):(Ws(n),f=d.fallback,E=n.mode,d=_d({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,_o(n,e.child,null,s),d=n.child,d.memoizedState=Dm(s),d.childLanes=Mm(e,o,s),n.memoizedState=my,n=f);else if(Xs(n),Yt&&console.error("We should not be hydrating here. This is a bug in React. Please file a bug."),cg(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"&&Wg.set(f,d),Cl(d),n=Nm(e,n,s)}else if($e||Rl(e,n,s,!1),o=(s&e.childLanes)!==0,$e||o){if(o=ce,o!==null&&(d=s&-s,d=(d&42)!==0?1:pl(d),d=(d&(o.suspendedLanes|s))!==0?0:d,d!==0&&d!==H.retryLane))throw H.retryLane=d,wn(e,d),xe(o,e,d),rw;E.data===Cs||Vm(),n=Nm(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,As=!1,ri=null,qi=!1,e!==null&&(za(),si[ai++]=Ss,si[ai++]=Es,si[ai++]=Qa,Ss=e.id,Es=e.overflow,Qa=n),n=Om(n,d.children),n.flags|=4096);return n}return f?(Ws(n),f=d.fallback,E=n.mode,w=e.child,C=w.sibling,d=os(w,{mode:"hidden",children:d.children}),d.subtreeFlags=w.subtreeFlags&65011712,C!==null?f=os(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=Dm(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=Mm(e,o,s),n.memoizedState=my,d):(Xs(n),s=e.child,e=s.sibling,s=os(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 Om(e,n){return n=_d({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function _d(e,n){return e=b(22,e,null,n),e.lanes=0,e.stateNode={_visibility:Kd,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function Nm(e,n,s){return _o(n,e.child,null,s),e=Om(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),Bp(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 km(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||py[f]||(f!=="collapsed"&&f!=="hidden"?(py[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"&&(py[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&Ac)!==0)o=o&To|Ac,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&=To}switch(ot(Be,o,n),d){case"forwards":for(s=n.child,d=null;s!==null;)e=s.alternate,e!==null&&Sd(e)===null&&(d=s),s=s.sibling;s=d,s===null?(d=n.child,n.child=null):(d=s.sibling,s.sibling=null),km(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&&Sd(e)===null){n.child=d;break}e=d.sibling,d.sibling=s,s=d,d=e}km(n,!0,s,null,f);break;case"together":km(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function ds(e,n,s){if(e!==null&&(n.dependencies=e.dependencies),Dn=-1,ua|=n.lanes,(s&n.childLanes)===0)if(e!==null){if(Rl(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=os(e,e.pendingProps),n.child=s,s.return=n;e.sibling!==null;)e=e.sibling,s=s.sibling=os(e,e.pendingProps),s.return=n;s.sibling=null}return n.child}function Lm(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&Zu(e)))}function UN(e,n,s){switch(n.tag){case 3:yt(n,n.stateNode.containerInfo),Gs(n,ze,e.memoizedState.cache),xl();break;case 27:case 5:K(n);break;case 4:yt(n,n.stateNode.containerInfo);break;case 10:Gs(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=ds(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||(Rl(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),ot(Be,Be.current,n),o)break;return null;case 22:case 23:return n.lanes=0,ME(e,n,s);case 24:Gs(n,ze,e.memoizedState.cache)}return ds(e,n,s)}function Im(e,n,s){if(n._debugNeedsRemount&&e!==null){s=Lp(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(!Lm(e,s)&&(n.flags&128)===0)return $e=!1,UN(e,n,s);$e=(e.flags&131072)!==0}else $e=!1,(o=Yt)&&(za(),o=(n.flags&1048576)!==0),o&&(o=n.index,za(),DS(n,Jd,o));switch(n.lanes=0,n.tag){case 16:t:if(o=n.pendingProps,e=la(n.elementType),n.type=e,typeof e=="function")kp(e)?(o=qa(e,o),n.tag=1,n.type=e=Ia(e),n=kE(null,n,e,o,s)):(n.tag=0,Rm(n,e),n.type=e=Ia(e),n=Cm(null,n,e,o,s));else{if(e!=null){if(d=e.$$typeof,d===Zl){n.tag=11,n.type=e=Op(e),n=CE(null,n,e,o,s);break t}else if(d===Bd){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 Cm(e,n,n.type,n.pendingProps,s);case 1:return o=n.type,d=qa(o,n.pendingProps),kE(e,n,o,d,s);case 3:t:{if(yt(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,Yp(e,n),kl(n,o,null,s);var v=n.memoizedState;if(o=v.cache,Gs(n,ze,o),o!==f.cache&&Fp(n,[ze],s,!0),Nl(),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),Cl(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(ve=ti(e.firstChild),yn=n,Yt=!0,Ka=null,As=!1,ri=null,qi=!0,e=XT(n,null,o,s),n.child=e;e;)e.flags=e.flags&-3|4096,e=e.sibling}else{if(xl(),o===d){n=ds(e,n,s);break t}Qe(e,n,o,s)}n=n.child}return n;case 26:return Ad(e,n),e===null?(e=i_(n.type,null,n.pendingProps,null))?n.memoizedState=e:Yt||(e=n.type,s=n.pendingProps,o=St(ea.current),o=Od(o).createElement(e),o[rn]=n,o[Rn]=s,Ke(o,e,s),I(o),n.stateNode=o):n.memoizedState=i_(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return K(n),e===null&&Yt&&(o=St(ea.current),d=B(),o=n.stateNode=e_(n.type,n.pendingProps,o,d,!1),As||(d=qA(o,n.type,n.pendingProps,d),d!==null&&(Ha(n,0).serverProps=d)),yn=n,qi=!0,d=ve,Zs(n.type)?(zy=d,ve=ti(o.firstChild)):ve=d),Qe(e,n,n.pendingProps.children,s),Ad(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&Yt&&(f=B(),o=xp(n.type,f.ancestorInfo),d=ve,(v=!d)||(v=Sk(d,n.type,n.pendingProps,qi),v!==null?(n.stateNode=v,As||(f=qA(v,n.type,n.pendingProps,f),f!==null&&(Ha(n,0).serverProps=f)),yn=n,ve=ti(v.firstChild),qi=!1,f=!0):f=!1,v=!f),v&&(o&&Hp(n,d),Ba(n))),K(n),d=n.type,f=n.pendingProps,v=e!==null?e.memoizedProps:null,o=f.children,og(d,f)?o=null:v!==null&&og(d,v)&&(n.flags|=32),n.memoizedState!==null&&(d=Kp(e,n,ON,null,null,s),Uc._currentValue=d),Ad(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?$u(e,o.tag,s.ancestorInfo.implicitRootScope):!0,s=ve,(o=!s)||(o=Ek(s,n.pendingProps,qi),o!==null?(n.stateNode=o,yn=n,ve=null,o=!0):o=!1,o=!o),o&&(e&&Hp(n,s),Ba(n))),null;case 13:return IE(e,n,s);case 4:return yt(n,n.stateNode.containerInfo),o=n.pendingProps,e===null?n.child=_o(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?")),Gs(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=me(d),Te(n),o=ly(o,d,void 0),Xe(),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=_d(o,s),e.ref=n.ref,n.child=e,e.return=n,n=e):(e=os(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=me(ze),e===null?(d=Vp(),d===null&&(d=ce,f=jp(),d.pooledCache=f,ja(f),f!==null&&(d.pooledCacheLanes|=s),d=f),n.memoizedState={parent:o,cache:d},qp(n),Gs(n,ze,d)):((e.lanes&s)!==0&&(Yp(e,n),kl(n,null,null,s),Nl()),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),Gs(n,ze,o)):(o=f.cache,Gs(n,ze,o),o!==d.cache&&Fp(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 hs(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 bc=ey,AT;e.flags|=8192}}function Td(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?Oa():536870912,e.lanes|=n,rr|=n)}function zl(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 ge(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 zN(e,n,s){var o=n.pendingProps;switch(zp(n),n.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ge(n),null;case 1:return ge(n),null;case 3:return s=n.stateNode,o=null,e!==null&&(o=e.memoizedState.cache),n.memoizedState.cache!==o&&(n.flags|=2048),ls(ze,n),Gt(n),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(e===null||e.child===null)&&(wl(n)?(kS(),hs(n)):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,NS())),ge(n),null;case 26:return s=n.memoizedState,e===null?(hs(n),s!==null?(ge(n),HE(n,s)):(ge(n),n.flags&=-16777217)):s?s!==e.memoizedState?(hs(n),ge(n),HE(n,s)):(ge(n),n.flags&=-16777217):(e.memoizedProps!==o&&hs(n),ge(n),n.flags&=-16777217),null;case 27:ut(n),s=St(ea.current);var d=n.type;if(e!==null&&n.stateNode!=null)e.memoizedProps!==o&&hs(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 ge(n),null}e=B(),wl(n)?MS(n):(e=e_(d,o,s,e,!0),n.stateNode=e,hs(n))}return ge(n),null;case 5:if(ut(n),s=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==o&&hs(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 ge(n),null}if(d=B(),wl(n))MS(n);else{switch(e=St(ea.current),xp(s,d.ancestorInfo),d=d.context,e=Od(e),d){case Io:e=e.createElementNS(io,s);break;case xh:e=e.createElementNS(qd,s);break;default:switch(s){case"svg":e=e.createElementNS(io,s);break;case"math":e=e.createElementNS(qd,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]"||ys.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[Rn]=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&&hs(n)}}return ge(n),n.flags&=-16777217,null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==o&&hs(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=St(ea.current),s=B(),wl(n)){e=n.stateNode,s=n.memoizedProps,d=!As,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&&$u(o,d.tag,s.ancestorInfo.implicitRootScope),e=Od(e).createTextNode(o),e[rn]=n,n.stateNode=e}return ge(n),null;case 13:if(o=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(d=wl(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,ge(n),(n.mode&Je)!==de&&o!==null&&(d=n.child,d!==null&&(n.treeBaseDuration-=d.treeBaseDuration))}else kS(),xl(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4,ge(n),(n.mode&Je)!==de&&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?(us(n),n):(us(n),null)}return us(n),(n.flags&128)!==0?(n.lanes=s,(n.mode&Je)!==de&&ed(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),Td(n,n.updateQueue),ge(n),(n.mode&Je)!==de&&s&&(e=n.child,e!==null&&(n.treeBaseDuration-=e.treeBaseDuration)),null);case 4:return Gt(n),e===null&&tg(n.stateNode.containerInfo),ge(n),null;case 10:return ls(n.type,n),ge(n),null;case 19:if(Z(Be,n),d=n.memoizedState,d===null)return ge(n),null;if(o=(n.flags&128)!==0,f=d.rendering,f===null)if(o)zl(d,!1);else{if(Se!==xs||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(f=Sd(e),f!==null){for(n.flags|=128,zl(d,!1),e=f.updateQueue,n.updateQueue=e,Td(n,e),n.subtreeFlags=0,e=s,s=n.child;s!==null;)RS(s,e),s=s.sibling;return ot(Be,Be.current&To|Ac,n),n.child}e=e.sibling}d.tail!==null&&Fi()>ph&&(n.flags|=128,o=!0,zl(d,!1),n.lanes=4194304)}else{if(!o)if(e=Sd(f),e!==null){if(n.flags|=128,o=!0,e=e.updateQueue,n.updateQueue=e,Td(n,e),zl(d,!0),d.tail===null&&d.tailMode==="hidden"&&!f.alternate&&!Yt)return ge(n),null}else 2*Fi()-d.renderingStartTime>ph&&s!==536870912&&(n.flags|=128,o=!0,zl(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=Fi(),e.sibling=null,s=Be.current,s=o?s&To|Ac:s&To,ot(Be,s,n),e):(ge(n),null);case 22:case 23:return us(n),Wp(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&&(ge(n),n.subtreeFlags&6&&(n.flags|=8192)):ge(n),s=n.updateQueue,s!==null&&Td(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&&Z(tr,n),null;case 24:return s=null,e!==null&&(s=e.memoizedState.cache),n.memoizedState.cache!==s&&(n.flags|=2048),ls(ze,n),ge(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 HN(e,n){switch(zp(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,(n.mode&Je)!==de&&ed(n),n):null;case 3:return ls(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 ut(n),null;case 13:if(us(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.");xl()}return e=n.flags,e&65536?(n.flags=e&-65537|128,(n.mode&Je)!==de&&ed(n),n):null;case 19:return Z(Be,n),null;case 4:return Gt(n),null;case 10:return ls(n.type,n),null;case 22:case 23:return us(n),Wp(n),e!==null&&Z(tr,n),e=n.flags,e&65536?(n.flags=e&-65537|128,(n.mode&Je)!==de&&ed(n),n):null;case 24:return ls(ze,n),null;case 25:return null;default:return null}}function BE(e,n){switch(zp(n),n.tag){case 3:ls(ze,n),Gt(n);break;case 26:case 27:case 5:ut(n);break;case 4:Gt(n);break;case 13:us(n);break;case 19:Z(Be,n);break;case 10:ls(n.type,n);break;case 22:case 23:us(n),Wp(n),e!==null&&Z(tr,n);break;case 24:ls(ze,n)}}function Ii(e){return(e.mode&Je)!==de}function FE(e,n){Ii(e)?(Li(),Hl(n,e),ki()):Hl(n,e)}function Pm(e,n,s){Ii(e)?(Li(),$r(s,e,n),ki()):$r(s,e,n)}function Hl(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?at!==null&&typeof at.markComponentPassiveEffectMountStarted=="function"&&at.markComponentPassiveEffectMountStarted(n):(e&tn)!==oi&&at!==null&&typeof at.markComponentLayoutEffectMountStarted=="function"&&at.markComponentLayoutEffectMountStarted(n),o=void 0,(e&bn)!==oi&&(ko=!0),o=ft(n,sI,s),(e&bn)!==oi&&(ko=!1),(e&He)!==oi?at!==null&&typeof at.markComponentPassiveEffectMountStopped=="function"&&at.markComponentPassiveEffectMountStopped():(e&tn)!==oi&&at!==null&&typeof at.markComponentLayoutEffectMountStopped=="function"&&at.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=j(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&&!i1.has(s)&&(i1.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&&!n1.has(s)&&(n1.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.",j(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.",j(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={},qp(n),v=s.contextType,f.context=typeof v=="object"&&v!==null?me(v):aa,f.state===o&&(v=j(s)||"Component",t1.has(v)||(t1.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"&&(_m(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"),dy.enqueueReplaceState(f,f.state,null)),kl(n,o,f,d),Nl(),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=aa,typeof w=="object"&&w!==null&&(v=me(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)&&AE(n,f,o,v),ra=!1;var z=n.memoizedState;f.state=z,kl(n,o,f,d),Nl(),V=n.memoizedState,H||z!==V||ra?(typeof x=="function"&&(_m(n,s,x,o),V=n.memoizedState),(E=ra||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,Yp(e,n),v=n.memoizedProps,w=qa(s,v),f.props=w,x=n.pendingProps,z=f.context,V=s.contextType,E=aa,typeof V=="object"&&V!==null&&(E=me(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)&&AE(n,f,o,E),ra=!1,z=n.memoizedState,f.state=z,kl(n,o,f,d),Nl();var q=n.memoizedState;v!==x||z!==q||ra||e!==null&&e.dependencies!==null&&Zu(e.dependencies)?(typeof H=="function"&&(_m(n,s,H,o),q=n.memoizedState),(w=ra||EE(n,s,w,o,z,q,E)||e!==null&&e.dependencies!==null&&Zu(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,Ad(e,n),v=(n.flags&128)!==0,E||v){if(E=n.stateNode,vp(n),v&&typeof s.getDerivedStateFromError!="function")s=null,Dn=-1;else{if(Te(n),s=LT(E),n.mode&on){At(!0);try{LT(E)}finally{At(!1)}}Xe()}n.flags|=1,e!==null&&v?(n.child=_o(n,e.child,null,d),n.child=_o(n,null,s,d)):Qe(e,n,s,d),n.memoizedState=E.state,e=n.child}else e=ds(e,n,d);return d=n.stateNode,f&&d.props!==o&&(xo||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"),xo=!0),e}function LE(e,n,s,o){return xl(),n.flags|=256,Qe(e,n,s,o),n.child}function Rm(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=j(n)||"Unknown",u1[e]||(console.error("%s: Function components do not support getDerivedStateFromProps.",e),u1[e]=!0)),typeof n.contextType=="object"&&n.contextType!==null&&(n=j(n)||"Unknown",l1[n]||(console.error("%s: Function components do not support contextType.",n),l1[n]=!0))}function Dm(e){return{baseLanes:e,cachePool:US()}}function Mm(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&Ac)!==0),o&&(f=!0,n.flags&=-129),o=(n.flags&32)!==0,n.flags&=-33,e===null){if(Yt){if(f?Xs(n):Ws(n),Yt){var E=ve,w;if(!(w=!E)){t:{var x=E;for(w=qi;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:Ss,overflow:Es}:null,retryLane:536870912,hydrationErrors:null},x=b(18,null,null,de),x.stateNode=w,x.return=n,n.child=x,yn=n,ve=null,w=!0):w=!1,w=!w}w&&(Hp(n,E),Ba(n))}if(E=n.memoizedState,E!==null&&(E=E.dehydrated,E!==null))return cg(E)?n.lanes=32:n.lanes=536870912,null;us(n)}return E=d.children,d=d.fallback,f?(Ws(n),f=n.mode,E=_d({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=Dm(s),f.childLanes=Mm(e,o,s),n.memoizedState=my,d):(Xs(n),Om(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=Nm(e,n,s)):n.memoizedState!==null?(Ws(n),n.child=e.child,n.flags|=128,n=null):(Ws(n),f=d.fallback,E=n.mode,d=_d({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,_o(n,e.child,null,s),d=n.child,d.memoizedState=Dm(s),d.childLanes=Mm(e,o,s),n.memoizedState=my,n=f);else if(Xs(n),Yt&&console.error("We should not be hydrating here. This is a bug in React. Please file a bug."),cg(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"&&Wg.set(f,d),Cl(d),n=Nm(e,n,s)}else if($e||Rl(e,n,s,!1),o=(s&e.childLanes)!==0,$e||o){if(o=ce,o!==null&&(d=s&-s,d=(d&42)!==0?1:pl(d),d=(d&(o.suspendedLanes|s))!==0?0:d,d!==0&&d!==H.retryLane))throw H.retryLane=d,wn(e,d),xe(o,e,d),r1;E.data===Cs||Vm(),n=Nm(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,As=!1,ri=null,qi=!1,e!==null&&(za(),si[ai++]=Ss,si[ai++]=Es,si[ai++]=Qa,Ss=e.id,Es=e.overflow,Qa=n),n=Om(n,d.children),n.flags|=4096);return n}return f?(Ws(n),f=d.fallback,E=n.mode,w=e.child,x=w.sibling,d=os(w,{mode:"hidden",children:d.children}),d.subtreeFlags=w.subtreeFlags&65011712,x!==null?f=os(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=Dm(s):(w=E.cachePool,w!==null?(x=ze._currentValue,w=w.parent!==x?{parent:x,pool:x}:w):w=US(),E={baseLanes:E.baseLanes|s,cachePool:w}),f.memoizedState=E,f.childLanes=Mm(e,o,s),n.memoizedState=my,d):(Xs(n),s=e.child,e=s.sibling,s=os(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 Om(e,n){return n=_d({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function _d(e,n){return e=b(22,e,null,n),e.lanes=0,e.stateNode={_visibility:Kd,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function Nm(e,n,s){return _o(n,e.child,null,s),e=Om(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),Bp(e.return,n,s)}function UE(e,n){var s=Ze(e);return e=!s&&typeof F(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 km(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"&&!d1[d])if(d1[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||py[f]||(f!=="collapsed"&&f!=="hidden"?(py[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"&&(py[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=F(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&Ac)!==0)o=o&To|Ac,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&=To}switch(ot(Be,o,n),d){case"forwards":for(s=n.child,d=null;s!==null;)e=s.alternate,e!==null&&Sd(e)===null&&(d=s),s=s.sibling;s=d,s===null?(d=n.child,n.child=null):(d=s.sibling,s.sibling=null),km(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&&Sd(e)===null){n.child=d;break}e=d.sibling,d.sibling=s,s=d,d=e}km(n,!0,s,null,f);break;case"together":km(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function ds(e,n,s){if(e!==null&&(n.dependencies=e.dependencies),Dn=-1,ua|=n.lanes,(s&n.childLanes)===0)if(e!==null){if(Rl(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=os(e,e.pendingProps),n.child=s,s.return=n;e.sibling!==null;)e=e.sibling,s=s.sibling=os(e,e.pendingProps),s.return=n;s.sibling=null}return n.child}function Lm(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&Zu(e)))}function UN(e,n,s){switch(n.tag){case 3:yt(n,n.stateNode.containerInfo),Gs(n,ze,e.memoizedState.cache),xl();break;case 27:case 5:K(n);break;case 4:yt(n,n.stateNode.containerInfo);break;case 10:Gs(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=ds(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||(Rl(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),ot(Be,Be.current,n),o)break;return null;case 22:case 23:return n.lanes=0,ME(e,n,s);case 24:Gs(n,ze,e.memoizedState.cache)}return ds(e,n,s)}function Im(e,n,s){if(n._debugNeedsRemount&&e!==null){s=Lp(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(!Lm(e,s)&&(n.flags&128)===0)return $e=!1,UN(e,n,s);$e=(e.flags&131072)!==0}else $e=!1,(o=Yt)&&(za(),o=(n.flags&1048576)!==0),o&&(o=n.index,za(),DS(n,Jd,o));switch(n.lanes=0,n.tag){case 16:t:if(o=n.pendingProps,e=la(n.elementType),n.type=e,typeof e=="function")kp(e)?(o=qa(e,o),n.tag=1,n.type=e=Ia(e),n=kE(null,n,e,o,s)):(n.tag=0,Rm(n,e),n.type=e=Ia(e),n=Cm(null,n,e,o,s));else{if(e!=null){if(d=e.$$typeof,d===Zl){n.tag=11,n.type=e=Op(e),n=CE(null,n,e,o,s);break t}else if(d===Bd){n.tag=14,n=RE(null,n,e,o,s);break t}}throw n="",e!==null&&typeof e=="object"&&e.$$typeof===Fn&&(n=" Did you wrap a component in React.lazy() more than once?"),e=j(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 Cm(e,n,n.type,n.pendingProps,s);case 1:return o=n.type,d=qa(o,n.pendingProps),kE(e,n,o,d,s);case 3:t:{if(yt(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,Yp(e,n),kl(n,o,null,s);var v=n.memoizedState;if(o=v.cache,Gs(n,ze,o),o!==f.cache&&jp(n,[ze],s,!0),Nl(),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),Cl(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(ve=ti(e.firstChild),yn=n,Yt=!0,Ka=null,As=!1,ri=null,qi=!0,e=XT(n,null,o,s),n.child=e;e;)e.flags=e.flags&-3|4096,e=e.sibling}else{if(xl(),o===d){n=ds(e,n,s);break t}Qe(e,n,o,s)}n=n.child}return n;case 26:return Ad(e,n),e===null?(e=i_(n.type,null,n.pendingProps,null))?n.memoizedState=e:Yt||(e=n.type,s=n.pendingProps,o=St(ea.current),o=Od(o).createElement(e),o[rn]=n,o[Rn]=s,Ke(o,e,s),I(o),n.stateNode=o):n.memoizedState=i_(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return K(n),e===null&&Yt&&(o=St(ea.current),d=B(),o=n.stateNode=e_(n.type,n.pendingProps,o,d,!1),As||(d=qA(o,n.type,n.pendingProps,d),d!==null&&(Ha(n,0).serverProps=d)),yn=n,qi=!0,d=ve,Zs(n.type)?(zy=d,ve=ti(o.firstChild)):ve=d),Qe(e,n,n.pendingProps.children,s),Ad(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&Yt&&(f=B(),o=xp(n.type,f.ancestorInfo),d=ve,(v=!d)||(v=Sk(d,n.type,n.pendingProps,qi),v!==null?(n.stateNode=v,As||(f=qA(v,n.type,n.pendingProps,f),f!==null&&(Ha(n,0).serverProps=f)),yn=n,ve=ti(v.firstChild),qi=!1,f=!0):f=!1,v=!f),v&&(o&&Hp(n,d),Ba(n))),K(n),d=n.type,f=n.pendingProps,v=e!==null?e.memoizedProps:null,o=f.children,og(d,f)?o=null:v!==null&&og(d,v)&&(n.flags|=32),n.memoizedState!==null&&(d=Kp(e,n,ON,null,null,s),Uc._currentValue=d),Ad(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?$u(e,o.tag,s.ancestorInfo.implicitRootScope):!0,s=ve,(o=!s)||(o=Ek(s,n.pendingProps,qi),o!==null?(n.stateNode=o,yn=n,ve=null,o=!0):o=!1,o=!o),o&&(e&&Hp(n,s),Ba(n))),null;case 13:return IE(e,n,s);case 4:return yt(n,n.stateNode.containerInfo),o=n.pendingProps,e===null?n.child=_o(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||h1||(h1=!0,console.error("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?")),Gs(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."),ja(n),d=me(d),Te(n),o=ly(o,d,void 0),Xe(),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=_d(o,s),e.ref=n.ref,n.child=e,e.return=n,n=e):(e=os(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 ja(n),o=me(ze),e===null?(d=Vp(),d===null&&(d=ce,f=Fp(),d.pooledCache=f,Fa(f),f!==null&&(d.pooledCacheLanes|=s),d=f),n.memoizedState={parent:o,cache:d},qp(n),Gs(n,ze,d)):((e.lanes&s)!==0&&(Yp(e,n),kl(n,null,null,s),Nl()),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),Gs(n,ze,o)):(o=f.cache,Gs(n,ze,o),o!==d.cache&&jp(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 hs(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 bc=ey,AT;e.flags|=8192}}function Td(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?Oa():536870912,e.lanes|=n,rr|=n)}function zl(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 ge(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 zN(e,n,s){var o=n.pendingProps;switch(zp(n),n.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ge(n),null;case 1:return ge(n),null;case 3:return s=n.stateNode,o=null,e!==null&&(o=e.memoizedState.cache),n.memoizedState.cache!==o&&(n.flags|=2048),ls(ze,n),Gt(n),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(e===null||e.child===null)&&(wl(n)?(kS(),hs(n)):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,NS())),ge(n),null;case 26:return s=n.memoizedState,e===null?(hs(n),s!==null?(ge(n),HE(n,s)):(ge(n),n.flags&=-16777217)):s?s!==e.memoizedState?(hs(n),ge(n),HE(n,s)):(ge(n),n.flags&=-16777217):(e.memoizedProps!==o&&hs(n),ge(n),n.flags&=-16777217),null;case 27:ut(n),s=St(ea.current);var d=n.type;if(e!==null&&n.stateNode!=null)e.memoizedProps!==o&&hs(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 ge(n),null}e=B(),wl(n)?MS(n):(e=e_(d,o,s,e,!0),n.stateNode=e,hs(n))}return ge(n),null;case 5:if(ut(n),s=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==o&&hs(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 ge(n),null}if(d=B(),wl(n))MS(n);else{switch(e=St(ea.current),xp(s,d.ancestorInfo),d=d.context,e=Od(e),d){case Io:e=e.createElementNS(io,s);break;case xh:e=e.createElementNS(qd,s);break;default:switch(s){case"svg":e=e.createElementNS(io,s);break;case"math":e=e.createElementNS(qd,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]"||ys.call(O1,s)||(O1[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[Rn]=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&&hs(n)}}return ge(n),n.flags&=-16777217,null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==o&&hs(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=St(ea.current),s=B(),wl(n)){e=n.stateNode,s=n.memoizedProps,d=!As,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||jA(e.nodeValue,s)),e||Ba(n)}else d=s.ancestorInfo.current,d!=null&&$u(o,d.tag,s.ancestorInfo.implicitRootScope),e=Od(e).createTextNode(o),e[rn]=n,n.stateNode=e}return ge(n),null;case 13:if(o=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(d=wl(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,ge(n),(n.mode&Je)!==de&&o!==null&&(d=n.child,d!==null&&(n.treeBaseDuration-=d.treeBaseDuration))}else kS(),xl(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4,ge(n),(n.mode&Je)!==de&&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?(us(n),n):(us(n),null)}return us(n),(n.flags&128)!==0?(n.lanes=s,(n.mode&Je)!==de&&ed(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),Td(n,n.updateQueue),ge(n),(n.mode&Je)!==de&&s&&(e=n.child,e!==null&&(n.treeBaseDuration-=e.treeBaseDuration)),null);case 4:return Gt(n),e===null&&tg(n.stateNode.containerInfo),ge(n),null;case 10:return ls(n.type,n),ge(n),null;case 19:if(Z(Be,n),d=n.memoizedState,d===null)return ge(n),null;if(o=(n.flags&128)!==0,f=d.rendering,f===null)if(o)zl(d,!1);else{if(Se!==xs||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(f=Sd(e),f!==null){for(n.flags|=128,zl(d,!1),e=f.updateQueue,n.updateQueue=e,Td(n,e),n.subtreeFlags=0,e=s,s=n.child;s!==null;)RS(s,e),s=s.sibling;return ot(Be,Be.current&To|Ac,n),n.child}e=e.sibling}d.tail!==null&&ji()>ph&&(n.flags|=128,o=!0,zl(d,!1),n.lanes=4194304)}else{if(!o)if(e=Sd(f),e!==null){if(n.flags|=128,o=!0,e=e.updateQueue,n.updateQueue=e,Td(n,e),zl(d,!0),d.tail===null&&d.tailMode==="hidden"&&!f.alternate&&!Yt)return ge(n),null}else 2*ji()-d.renderingStartTime>ph&&s!==536870912&&(n.flags|=128,o=!0,zl(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=ji(),e.sibling=null,s=Be.current,s=o?s&To|Ac:s&To,ot(Be,s,n),e):(ge(n),null);case 22:case 23:return us(n),Wp(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&&(ge(n),n.subtreeFlags&6&&(n.flags|=8192)):ge(n),s=n.updateQueue,s!==null&&Td(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&&Z(tr,n),null;case 24:return s=null,e!==null&&(s=e.memoizedState.cache),n.memoizedState.cache!==s&&(n.flags|=2048),ls(ze,n),ge(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 HN(e,n){switch(zp(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,(n.mode&Je)!==de&&ed(n),n):null;case 3:return ls(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 ut(n),null;case 13:if(us(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.");xl()}return e=n.flags,e&65536?(n.flags=e&-65537|128,(n.mode&Je)!==de&&ed(n),n):null;case 19:return Z(Be,n),null;case 4:return Gt(n),null;case 10:return ls(n.type,n),null;case 22:case 23:return us(n),Wp(n),e!==null&&Z(tr,n),e=n.flags,e&65536?(n.flags=e&-65537|128,(n.mode&Je)!==de&&ed(n),n):null;case 24:return ls(ze,n),null;case 25:return null;default:return null}}function BE(e,n){switch(zp(n),n.tag){case 3:ls(ze,n),Gt(n);break;case 26:case 27:case 5:ut(n);break;case 4:Gt(n);break;case 13:us(n);break;case 19:Z(Be,n);break;case 10:ls(n.type,n);break;case 22:case 23:us(n),Wp(n),e!==null&&Z(tr,n);break;case 24:ls(ze,n)}}function Ii(e){return(e.mode&Je)!==de}function jE(e,n){Ii(e)?(Li(),Hl(n,e),ki()):Hl(n,e)}function Pm(e,n,s){Ii(e)?(Li(),$r(s,e,n),ki()):$r(s,e,n)}function Hl(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?at!==null&&typeof at.markComponentPassiveEffectMountStarted=="function"&&at.markComponentPassiveEffectMountStarted(n):(e&tn)!==oi&&at!==null&&typeof at.markComponentLayoutEffectMountStarted=="function"&&at.markComponentLayoutEffectMountStarted(n),o=void 0,(e&bn)!==oi&&(ko=!0),o=ft(n,sI,s),(e&bn)!==oi&&(ko=!1),(e&He)!==oi?at!==null&&typeof at.markComponentPassiveEffectMountStopped=="function"&&at.markComponentPassiveEffectMountStopped():(e&tn)!==oi&&at!==null&&typeof at.markComponentLayoutEffectMountStopped=="function"&&at.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,7 +195,7 @@ 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,ft(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){re(n,n.return,E)}}function $r(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?at!==null&&typeof at.markComponentPassiveEffectUnmountStarted=="function"&&at.markComponentPassiveEffectUnmountStarted(n):(e&tn)!==oi&&at!==null&&typeof at.markComponentLayoutEffectUnmountStarted=="function"&&at.markComponentLayoutEffectUnmountStarted(n),(e&bn)!==oi&&(ko=!0),d=n,ft(d,aI,d,s,E),(e&bn)!==oi&&(ko=!1),(e&He)!==oi?at!==null&&typeof at.markComponentPassiveEffectUnmountStopped=="function"&&at.markComponentPassiveEffectUnmountStopped():(e&tn)!==oi&&at!==null&&typeof at.markComponentLayoutEffectUnmountStopped=="function"&&at.markComponentLayoutEffectUnmountStopped())}o=o.next}while(o!==f)}}catch(w){re(n,n.return,w)}}function jE(e,n){Ii(e)?(Li(),Hl(n,e),ki()):Hl(n,e)}function Um(e,n,s){Ii(e)?(Li(),$r(s,e,n),ki()):$r(s,e,n)}function $E(e){var n=e.updateQueue;if(n!==null){var s=e.stateNode;e.type.defaultProps||"ref"in e.memoizedProps||xo||(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{ft(e,GS,n,s)}catch(o){re(e,e.return,o)}}}function BN(e,n,s){return e.getSnapshotBeforeUpdate(n,s)}function FN(e,n){var s=n.memoizedProps,o=n.memoizedState;n=e.stateNode,e.type.defaultProps||"ref"in e.memoizedProps||xo||(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=ft(e,BN,n,d,o);s=fw,f!==void 0||s.has(e.type)||(s.add(e.type),ft(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){re(e,e.return,v)}}function GE(e,n,s){s.props=qa(e.type,e.memoizedProps),s.state=e.memoizedState,Ii(e)?(Li(),ft(e,BT,e,n,s),ki()):ft(e,BT,e,n,s)}function jN(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(Ii(e))try{Li(),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 Bl(e,n){try{ft(e,jN,e)}catch(s){re(e,n,s)}}function Pi(e,n){var s=e.ref,o=e.refCleanup;if(s!==null)if(typeof o=="function")try{if(Ii(e))try{Li(),ft(e,o)}finally{ki(e)}else ft(e,o)}catch(d){re(e,n,d)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof s=="function")try{if(Ii(e))try{Li(),ft(e,s,null)}finally{ki(e)}else ft(e,s,null)}catch(d){re(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",nh&&(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 $N(e,n,s,o){var d=e.memoizedProps;e=d.id,d=d.onPostCommit,n=n===null?"mount":"update",nh&&(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{ft(e,dk,o,n,s,e)}catch(d){re(e,e.return,d)}}function zm(e,n,s){try{ft(e,hk,e.stateNode,e.type,s,n,e)}catch(o){re(e,e.return,o)}}function YE(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zs(e.type)||e.tag===4}function Hm(e){t:for(;;){for(;e.sibling===null;){if(e.return===null||YE(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&&Zs(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 Bm(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=Md));else if(o!==4&&(o===27&&Zs(e.type)&&(s=e.stateNode,n=null),e=e.child,e!==null))for(Bm(e,n,s),e=e.sibling;e!==null;)Bm(e,n,s),e=e.sibling}function wd(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&&Zs(e.type)&&(s=e.stateNode),e=e.child,e!==null))for(wd(e,n,s),e=e.sibling;e!==null;)wd(e,n,s),e=e.sibling}function GN(e){for(var n,s=e.return;s!==null;){if(YE(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=Hm(e),wd(e,s,n);break;case 5:s=n.stateNode,n.flags&32&&(WA(s),n.flags&=-33),n=Hm(e),wd(e,n,s);break;case 3:case 4:n=n.stateNode.containerInfo,s=Hm(e),Bm(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 XE(e){var n=e.stateNode,s=e.memoizedProps;try{ft(e,wk,e.type,s,n,e)}catch(o){re(e,e.return,o)}}function VN(e,n){if(e=e.containerInfo,Iy=Mh,e=_S(e),Dp(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(Py={focusedElem:e,selectionRange:s},Mh=!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&&FN(e,s);break;case 3:if((d&1024)!==0){if(e=e.stateNode.containerInfo,s=e.nodeType,s===9)lg(e);else if(s===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":lg(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:ps(e,s),o&4&&FE(s,tn|li);break;case 1:if(ps(e,s),o&4)if(e=s.stateNode,n===null)s.type.defaultProps||"ref"in s.memoizedProps||xo||(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")),Ii(s)?(Li(),ft(s,cy,s,e),ki()):ft(s,cy,s,e);else{var d=qa(s.type,n.memoizedProps);n=n.memoizedState,s.type.defaultProps||"ref"in s.memoizedProps||xo||(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")),Ii(s)?(Li(),ft(s,UT,s,e,d,n,e.__reactInternalSnapshotBeforeUpdate),ki()):ft(s,UT,s,e,d,n,e.__reactInternalSnapshotBeforeUpdate)}o&64&&$E(s),o&512&&Bl(s,s.return);break;case 3:if(n=cs(),ps(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{ft(s,GS,o,d)}catch(v){re(s,s.return,v)}}e.effectDuration+=td(n);break;case 27:n===null&&o&4&&XE(s);case 26:case 5:ps(e,s),n===null&&o&4&&qE(s),o&512&&Bl(s,s.return);break;case 12:if(o&4){o=cs(),ps(e,s),e=s.stateNode,e.effectDuration+=Ml(o);try{ft(s,VE,s,n,eh,e.effectDuration)}catch(v){re(s,s.return,v)}}else ps(e,s);break;case 13:ps(e,s),o&4&&ZE(e,s),o&64&&(e=s.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(s=tk.bind(null,s),Ak(e,s))));break;case 22:if(o=s.memoizedState!==null||ws,!o){n=n!==null&&n.memoizedState!==null||Ce,d=ws;var f=Ce;ws=o,(Ce=n)&&!f?ms(e,s,(s.subtreeFlags&8772)!==0):ps(e,s),ws=d,Ce=f}break;case 30:break;default:ps(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&&js(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 fs(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(eo,s)}catch(f){ji||(ji=!0,console.error("React instrumentation encountered an error: %s",f))}switch(s.tag){case 26:Ce||Pi(s,n),fs(e,n,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:Ce||Pi(s,n);var o=Pe,d=Mn;Zs(s.type)&&(Pe=s.stateNode,Mn=!1),fs(e,n,s),ft(s,Yl,s.stateNode),Pe=o,Mn=d;break;case 5:Ce||Pi(s,n);case 6:if(o=Pe,d=Mn,Pe=null,fs(e,n,s),Pe=o,Mn=d,Pe!==null)if(Mn)try{ft(s,mk,Pe,s.stateNode)}catch(f){re(s,n,f)}else try{ft(s,pk,Pe,s.stateNode)}catch(f){re(s,n,f)}break;case 18:Pe!==null&&(Mn?(e=Pe,QA(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,s.stateNode),Kl(e)):QA(Pe,s.stateNode));break;case 4:o=Pe,d=Mn,Pe=s.stateNode.containerInfo,Mn=!0,fs(e,n,s),Pe=o,Mn=d;break;case 0:case 11:case 14:case 15:Ce||$r(bn,s,n),Ce||Pm(s,n,tn),fs(e,n,s);break;case 1:Ce||(Pi(s,n),o=s.stateNode,typeof o.componentWillUnmount=="function"&&GE(s,n,o)),fs(e,n,s);break;case 21:fs(e,n,s);break;case 22:Ce=(o=Ce)||s.memoizedState!==null,fs(e,n,s),Ce=o;break;default:fs(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{ft(n,Tk,e)}catch(s){re(n,n.return,s)}}function qN(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 Fm(e,n){var s=qN(e);n.forEach(function(o){var d=ek.bind(null,e,o);if(!s.has(o)){if(s.add(o),Si)if(Co!==null&&Ro!==null)Gl(Ro,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(Zs(E.type)){Pe=E.stateNode,Mn=!1;break t}break;case 5:Pe=E.stateNode,Mn=!1;break t;case 3:case 4:Pe=E.stateNode.containerInfo,Mn=!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,Mn=!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&&($r(bn|li,e,e.return),Hl(bn|li,e),Pm(e,e.return,tn|li));break;case 1:Hn(n,e),Bn(e),o&512&&(Ce||s===null||Pi(s,s.return)),o&64&&ws&&(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||Pi(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[tc]||d[rn]||d.namespaceURI===io||d.hasAttribute("itemprop"))&&(d=n.createElement(o),n.head.insertBefore(d,n.querySelector("head > title"))),Ke(d,o,s),d[rn]=e,I(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],Q(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,I(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&&zm(e,e.memoizedProps,s.memoizedProps);break;case 27:Hn(n,e),Bn(e),o&512&&(Ce||s===null||Pi(s,s.return)),s!==null&&o&4&&zm(e,e.memoizedProps,s.memoizedProps);break;case 5:if(Hn(n,e),Bn(e),o&512&&(Ce||s===null||Pi(s,s.return)),e.flags&32){n=e.stateNode;try{ft(e,WA,n)}catch(H){re(e,e.return,H)}}o&4&&e.stateNode!=null&&(n=e.memoizedProps,zm(e,n,s!==null?s.memoizedProps:n)),o&1024&&(gy=!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{ft(e,fk,n,s,o)}catch(H){re(e,e.return,H)}}break;case 3:if(d=cs(),Ch=null,f=Ti,Ti=Nd(n.containerInfo),Hn(n,e),Ti=f,Bn(e),o&4&&s!==null&&s.memoizedState.isDehydrated)try{ft(e,_k,n.containerInfo)}catch(H){re(e,e.return,H)}gy&&(gy=!1,tA(e)),n.effectDuration+=td(d);break;case 4:o=Ti,Ti=Nd(e.stateNode.containerInfo),Hn(n,e),Bn(e),Ti=o;break;case 12:o=cs(),Hn(n,e),Bn(e),e.stateNode.effectDuration+=Ml(o);break;case 13:Hn(n,e),Bn(e),e.child.flags&8192&&e.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(Ay=Fi()),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,Fm(e,o)));break;case 22:d=e.memoizedState!==null;var E=s!==null&&s.memoizedState!==null,w=ws,C=Ce;if(ws=w||d,Ce=C||E,Hn(n,e),Ce=C,ws=w,Bn(e),o&8192)t:for(n=e.stateNode,n._visibility=d?n._visibility&~Kd:n._visibility|Kd,d&&(s===null||E||ws||Ce||Ya(e)),s=null,n=e;;){if(n.tag===5||n.tag===26){if(s===null){E=s=n;try{f=E.stateNode,d?ft(E,gk,f):ft(E,bk,E.stateNode,E.memoizedProps)}catch(H){re(E,E.return,H)}}}else if(n.tag===6){if(s===null){E=n;try{v=E.stateNode,d?ft(E,yk,v):ft(E,vk,v,E.memoizedProps)}catch(H){re(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,Fm(e,s))));break;case 19:Hn(n,e),Bn(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,Fm(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{ft(e,GN,e)}catch(s){re(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 ps(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:Pm(e,e.return,tn),Ya(e);break;case 1:Pi(e,e.return);var n=e.stateNode;typeof n.componentWillUnmount=="function"&&GE(e,e.return,n),Ya(e);break;case 27:ft(e,Yl,e.stateNode);case 26:case 5:Pi(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;)eA(e),e=e.sibling}function nA(e,n,s,o){var d=s.flags;switch(s.tag){case 0:case 11:case 15:ms(e,s,o),FE(s,tn);break;case 1:if(ms(e,s,o),n=s.stateNode,typeof n.componentDidMount=="function"&&ft(s,cy,s,n),n=s.updateQueue,n!==null){e=s.stateNode;try{ft(s,MN,n,e)}catch(f){re(s,s.return,f)}}o&&d&64&&$E(s),Bl(s,s.return);break;case 27:XE(s);case 26:case 5:ms(e,s,o),o&&n===null&&d&4&&qE(s),Bl(s,s.return);break;case 12:if(o&&d&4){d=cs(),ms(e,s,o),o=s.stateNode,o.effectDuration+=Ml(d);try{ft(s,VE,s,n,eh,o.effectDuration)}catch(f){re(s,s.return,f)}}else ms(e,s,o);break;case 13:ms(e,s,o),o&&d&4&&ZE(e,s);break;case 22:s.memoizedState===null&&ms(e,s,o),Bl(s,s.return);break;case 30:break;default:ms(e,s,o)}}function ms(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 jm(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&&Dl(s))}function $m(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(ja(n),e!=null&&Dl(e))}function Ui(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:Ui(e,n,s,o),d&2048&&jE(n,He|li);break;case 1:Ui(e,n,s,o);break;case 3:var f=cs();Ui(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&&Dl(s))),e.passiveEffectDuration+=td(f);break;case 12:if(d&2048){d=cs(),Ui(e,n,s,o),e=n.stateNode,e.passiveEffectDuration+=Ml(d);try{ft(n,$N,n,n.alternate,eh,e.passiveEffectDuration)}catch(E){re(n,n.return,E)}}else Ui(e,n,s,o);break;case 13:Ui(e,n,s,o);break;case 23:break;case 22:f=n.stateNode;var v=n.alternate;n.memoizedState!==null?f._visibility&vs?Ui(e,n,s,o):Fl(e,n):f._visibility&vs?Ui(e,n,s,o):(f._visibility|=vs,Gr(e,n,s,o,(n.subtreeFlags&10256)!==0)),d&2048&&jm(v,n);break;case 24:Ui(e,n,s,o),d&2048&&$m(n.alternate,n);break;default:Ui(e,n,s,o)}}function Gr(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:Gr(e,n,s,o,d),jE(n,He);break;case 23:break;case 22:var v=n.stateNode;n.memoizedState!==null?v._visibility&vs?Gr(e,n,s,o,d):Fl(e,n):(v._visibility|=vs,Gr(e,n,s,o,d)),d&&f&2048&&jm(n.alternate,n);break;case 24:Gr(e,n,s,o,d),d&&f&2048&&$m(n.alternate,n);break;default:Gr(e,n,s,o,d)}}function Fl(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:Fl(s,o),d&2048&&jm(o.alternate,o);break;case 24:Fl(s,o),d&2048&&$m(o.alternate,o);break;default:Fl(s,o)}n=n.sibling}}function Vr(e){if(e.subtreeFlags&_c)for(e=e.child;e!==null;)aA(e),e=e.sibling}function aA(e){switch(e.tag){case 26:Vr(e),e.flags&_c&&e.memoizedState!==null&&Dk(Ti,e.memoizedState,e.memoizedProps);break;case 5:Vr(e);break;case 3:case 4:var n=Ti;Ti=Nd(e.stateNode.containerInfo),Vr(e),Ti=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=_c,_c=16777216,Vr(e),_c=n):Vr(e));break;default:Vr(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 jl(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:jl(e),e.flags&2048&&Um(e,e.return,He|li);break;case 3:var n=cs();jl(e),e.stateNode.passiveEffectDuration+=td(n);break;case 12:n=cs(),jl(e),e.stateNode.passiveEffectDuration+=Ml(n);break;case 22:n=e.stateNode,e.memoizedState!==null&&n._visibility&vs&&(e.return===null||e.return.tag!==13)?(n._visibility&=~vs,xd(e)):jl(e);break;default:jl(e)}}function xd(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:Um(e,e.return,He),xd(e);break;case 22:var n=e.stateNode;n._visibility&vs&&(n._visibility&=~vs,xd(e));break;default:xd(e)}}function cA(e,n){for(;Ge!==null;){var s=Ge,o=s;switch(o.tag){case 0:case 11:case 15:Um(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:Dl(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 YN(){oI.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((Jt&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:Zm()):yl()}function dA(){qn===0&&(qn=(Bt&536870912)===0||Yt?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."),Cy&&(mh=!0),(e===ce&&(te===sr||te===ar)||e.cancelPendingCommit!==null)&&(Yr(e,0),Qs(e,Bt,qn,!1)),Fs(e,s),(Jt&vn)!==0&&e===ce){if(Gi)switch(n.tag){case 0:case 11:case 15:e=Ut&&X(Ut)||"Unknown",Tw.has(e)||(Tw.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:_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&&ml(e,n,s),ik(n),e===ce&&((Jt&vn)===Gn&&(da|=s),Se===ir&&Qs(e,Bt,qn,!1)),zi(e)}function hA(e,n,s){if((Jt&(vn|wi))!==Gn)throw Error("Should not already be working.");var o=!s&&(n&124)===0&&(n&e.expiredLanes)===0||Bs(e,n),d=o?WN(e,n):qm(e,n,!0),f=o;do{if(d===xs){Oo&&!o&&Qs(e,n,0,!1);break}else{if(s=e.current.alternate,f&&!XN(s)){d=qm(e,n,!1),f=!1;continue}if(d===Do){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=Dc;var w=d.current.memoizedState.isDehydrated;if(w&&(Yr(d,E).flags|=256),E=qm(d,E,!1),E!==Do){if(Sy&&!w){d.errorRecoveryDisabledLanes|=f,da|=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!==Do)continue}}if(d===wc){Yr(e,0),Qs(e,n,0,!0);break}t:{switch(o=e,d){case xs:case wc:throw Error("Root did not complete. This is a bug in React.");case ir:if((n&4194048)!==n)break;case hh:Qs(o,n,qn,!ca);break t;case Do:Sn=null;break;case yy:case mw:break;default:throw Error("Unknown root exit status.")}if(G.actQueue!==null)Ym(o,s,n,Sn,Mc,fh,qn,da,rr);else{if((n&62914560)===n&&(f=Ay+yw-Fi(),10<f)){if(Qs(o,n,qn,!ca),as(o,0,!0)!==0)break t;o.timeoutHandle=Nw(fA.bind(null,o,s,Sn,Mc,fh,n,qn,da,rr,ca,d,dI,vT,0),f);break t}fA(o,s,Sn,Mc,fh,n,qn,da,rr,ca,d,cI,vT,0)}}}break}while(!0);zi(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)&&(Pc={stylesheets:null,count:0,unsuspend:Rk},aA(n),V=Mk(),V!==null)){e.cancelPendingCommit=V(Ym.bind(null,e,n,f,s,o,d,v,E,w,H,uI,z,q)),Qs(e,f,v,!C);return}Ym(e,n,f,s,o,d,v,E,w)}function XN(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 Qs(e,n,s,o){n&=~Ey,n&=~da,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&&fl(e,s,n)}function qr(){return(Jt&(vn|wi))===Gn?(Vl(0),!1):!0}function Gm(){if(Ut!==null){if(te===On)var e=Ut.return;else e=Ut,Ku(),em(e),Ao=null,Ec=0,e=Ut;for(;e!==null;)BE(e.alternate,e),e=e.return;Ut=null}}function Yr(e,n){var s=e.timeoutHandle;s!==dr&&(e.timeoutHandle=dr,TI(s)),s=e.cancelPendingCommit,s!==null&&(e.cancelPendingCommit=null,s()),Gm(),ce=e,Ut=s=os(e.current,null),Bt=n,te=On,Vn=null,ca=!1,Oo=Bs(e,n),Sy=!1,Se=xs,rr=qn=Ey=da=ua=0,Sn=Dc=null,fh=!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 Wi=n,Yu(),n=yT(),1e3<n-gT&&(G.recentlyCreatedOwnerStacks=0,gT=n),Ai.discardPendingWarnings(),s}function pA(e,n){_t=null,G.H=uh,G.getCurrentStack=null,Gi=!1,$n=null,n===yc||n===ah?(n=FS(),te=Cc):n===AT?(n=FS(),te=gw):te=n===rw?vy:n!==null&&typeof n=="object"&&typeof n.then=="function"?Mo:xc,Vn=n;var s=Ut;if(s===null)Se=wc,Ed(e,zn(n,e.current));else switch(s.mode&Je&&Gp(s),Xe(),te){case xc:at!==null&&typeof at.markComponentErrored=="function"&&at.markComponentErrored(s,n,Bt);break;case sr:case ar:case Cc:case Mo:case Rc:at!==null&&typeof at.markComponentSuspended=="function"&&at.markComponentSuspended(s,n,Bt)}}function mA(){var e=G.H;return G.H=uh,e===null?uh:e}function gA(){var e=G.A;return G.A=rI,e}function Vm(){Se=ir,ca||(Bt&4194048)!==Bt&&ui.current!==null||(Oo=!0),(ua&134217727)===0&&(da&134217727)===0||ce===null||Qs(ce,Bt,qn,!1)}function qm(e,n,s){var o=Jt;Jt|=vn;var d=mA(),f=gA();if(ce!==e||Bt!==n){if(Si){var v=e.memoizedUpdaters;0<v.size&&(Gl(e,Bt),v.clear()),gl(e,n)}Mc=null,Yr(e,n)}Pn(n),n=!1,v=Se;t:do try{if(te!==On&&Ut!==null){var E=Ut,w=Vn;switch(te){case vy:Gm(),v=hh;break t;case Cc:case sr:case ar:case Mo:ui.current===null&&(n=!0);var C=te;if(te=On,Vn=null,Xr(e,E,w,C),s&&Oo){v=xs;break t}break;default:C=te,te=On,Vn=null,Xr(e,E,w,C)}}yA(),v=Se;break}catch(H){pA(e,H)}while(!0);return n&&e.shellSuspendCounter++,Ku(),Jt=o,G.H=d,G.A=f,ss(),Ut===null&&(ce=null,Bt=0,Yu()),v}function yA(){for(;Ut!==null;)bA(Ut)}function WN(e,n){var s=Jt;Jt|=vn;var o=mA(),d=gA();if(ce!==e||Bt!==n){if(Si){var f=e.memoizedUpdaters;0<f.size&&(Gl(e,Bt),f.clear()),gl(e,n)}Mc=null,ph=Fi()+bw,Yr(e,n)}else Oo=Bs(e,n);Pn(n);t:do try{if(te!==On&&Ut!==null)e:switch(n=Ut,f=Vn,te){case xc:te=On,Vn=null,Xr(e,n,f,xc);break;case sr:case ar:if(HS(f)){te=On,Vn=null,vA(n);break}n=function(){te!==sr&&te!==ar||ce!==e||(te=Rc),zi(e)},f.then(n,n);break t;case Cc:te=Rc;break t;case gw:te=by;break t;case Rc:HS(f)?(te=On,Vn=null,vA(n)):(te=On,Vn=null,Xr(e,n,f,Rc));break;case by:var v=null;switch(Ut.tag){case 26:v=Ut.memoizedState;case 5:case 27:var E=Ut;if(!v||l_(v)){te=On,Vn=null;var w=E.sibling;if(w!==null)Ut=w;else{var C=E.return;C!==null?(Ut=C,Cd(C)):Ut=null}break e}break;default:console.error("Unexpected type of fiber triggered a suspensey commit. This is a bug in React.")}te=On,Vn=null,Xr(e,n,f,by);break;case Mo:te=On,Vn=null,Xr(e,n,f,Mo);break;case vy:Gm(),Se=hh;break t;default:throw Error("Unexpected SuspendedReason. This is a bug in React.")}G.actQueue!==null?yA():QN();break}catch(H){pA(e,H)}while(!0);return Ku(),G.H=o,G.A=d,Jt=s,Ut!==null?(at!==null&&typeof at.markRenderYielded=="function"&&at.markRenderYielded(),xs):(ss(),ce=null,Bt=0,Yu(),Se)}function QN(){for(;Ut!==null&&!qk();)bA(Ut)}function bA(e){var n=e.alternate;(e.mode&Je)!==de?($p(e),n=ft(e,Im,n,e,Wi),Gp(e)):n=ft(e,Im,n,e,Wi),e.memoizedProps=e.pendingProps,n===null?Cd(e):Ut=n}function vA(e){var n=ft(e,KN,e);e.memoizedProps=e.pendingProps,n===null?Cd(e):Ut=n}function KN(e){var n=e.alternate,s=(e.mode&Je)!==de;switch(s&&$p(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:em(e);default:BE(n,e),e=Ut=RS(e,Wi),n=Im(n,e,Wi)}return s&&Gp(e),n}function Xr(e,n,s,o){Ku(),em(n),Ao=null,Ec=0;var d=n.return;try{if(PN(e,d,n,s,Bt)){Se=wc,Ed(e,zn(s,e.current)),Ut=null;return}}catch(f){if(d!==null)throw Ut=d,f;Se=wc,Ed(e,zn(s,e.current)),Ut=null;return}n.flags&32768?(Yt||o===xc?e=!0:Oo||(Bt&536870912)!==0?e=!1:(ca=e=!0,(o===sr||o===ar||o===Cc||o===Mo)&&(o=ui.current,o!==null&&o.tag===13&&(o.flags|=16384))),SA(n,e)):Cd(n)}function Cd(e){var n=e;do{if((n.flags&32768)!==0){SA(n,ca);return}var s=n.alternate;if(e=n.return,$p(n),s=ft(n,zN,s,n,Wi),(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);Se===xs&&(Se=mw)}function SA(e,n){do{var s=HN(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);Se=hh,Ut=null}function Ym(e,n,s,o,d,f,v,E,w){e.cancelPendingCommit=null;do $l();while(en!==or);if(Ai.flushLegacyContextWarning(),Ai.flushPendingUnsafeLifecycleWarnings(),(Jt&(vn|wi))!==Gn)throw Error("Should not already be working.");if(at!==null&&typeof at.markCommitStarted=="function"&&at.markCommitStarted(s),n===null)Kt();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|=Qg,Uu(e,s,f,v,E,w),e===ce&&(Ut=ce=null,Bt=0),No=n,fa=e,pa=s,Ty=f,wy=d,Aw=o,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,nk(to,function(){return wA(),null})):(e.callbackNode=null,e.callbackPriority=0),eh=yo(),o=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||o){o=G.T,G.T=null,d=Zt.p,Zt.p=ei,v=Jt,Jt|=wi;try{VN(e,n,s)}finally{Jt=v,Zt.p=d,G.T=o}}en=vw,EA(),AA(),_A()}}function EA(){if(en===vw){en=or;var e=fa,n=No,s=pa,o=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||o){o=G.T,G.T=null;var d=Zt.p;Zt.p=ei;var f=Jt;Jt|=wi;try{Co=s,Ro=e,JE(n,e),Ro=Co=null,s=Py;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&&Dp(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(),lt=E.textContent.length,Et=Math.min(w.start,lt),ue=w.end===void 0?Et:Math.min(w.end,lt);!q.extend&&Et>ue&&(v=ue,ue=Et,Et=v);var jt=ES(E,Et),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(),Et>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 k=V[E];k.element.scrollLeft=k.left,k.element.scrollTop=k.top}}Mh=!!Iy,Py=Iy=null}finally{Jt=f,Zt.p=d,G.T=o}}e.current=n,en=Sw}}function AA(){if(en===Sw){en=or;var e=fa,n=No,s=pa,o=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||o){o=G.T,G.T=null;var d=Zt.p;Zt.p=ei;var f=Jt;Jt|=wi;try{at!==null&&typeof at.markLayoutEffectsStarted=="function"&&at.markLayoutEffectsStarted(s),Co=s,Ro=e,WE(e,n.alternate,n),Ro=Co=null,at!==null&&typeof at.markLayoutEffectsStopped=="function"&&at.markLayoutEffectsStopped()}finally{Jt=f,Zt.p=d,G.T=o}}en=Ew}}function _A(){if(en===hI||en===Ew){en=or,Yk();var e=fa,n=No,s=pa,o=Aw,d=(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0;d?en=_y:(en=or,No=fa=null,TA(e,e.pendingLanes),lr=0,Nc=null);var f=e.pendingLanes;if(f===0&&(ha=null),d||DA(e),d=Lr(s),n=n.stateNode,an&&typeof an.onCommitFiberRoot=="function")try{var v=(n.current.flags&128)===128;switch(d){case ei:var E=Rg;break;case $i:E=Dg;break;case bs:E=to;break;case Gd:E=Mg;break;default:E=to}an.onCommitFiberRoot(eo,n,E,v)}catch(V){ji||(ji=!0,console.error("React instrumentation encountered an error: %s",V))}if(Si&&e.memoizedUpdaters.clear(),YN(),o!==null){v=G.T,E=Zt.p,Zt.p=ei,G.T=null;try{var w=e.onRecoverableError;for(n=0;n<o.length;n++){var C=o[n],H=ZN(C.stack);ft(C.source,w,C.value,H)}}finally{G.T=v,Zt.p=E}}(pa&3)!==0&&$l(),zi(e),f=e.pendingLanes,(s&4194090)!==0&&(f&42)!==0?(ih=!0,e===xy?Oc++:(Oc=0,xy=e)):Oc=0,Vl(0),Kt()}}function ZN(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,Dl(n)))}function $l(e){return EA(),AA(),_A(),wA()}function wA(){if(en!==_y)return!1;var e=fa,n=Ty;Ty=0;var s=Lr(pa),o=bs>s?bs:s;s=G.T;var d=Zt.p;try{Zt.p=o,G.T=null,o=wy,wy=null;var f=fa,v=pa;if(en=or,No=fa=null,pa=0,(Jt&(vn|wi))!==Gn)throw Error("Cannot flush passive effects while already rendering.");Cy=!0,mh=!1,at!==null&&typeof at.markPassiveEffectsStarted=="function"&&at.markPassiveEffectsStarted(v);var E=Jt;if(Jt|=wi,oA(f.current),iA(f,f.current,v,o),at!==null&&typeof at.markPassiveEffectsStopped=="function"&&at.markPassiveEffectsStopped(),DA(f),Jt=E,Vl(0,!1),mh?f===Nc?lr++:(lr=0,Nc=f):lr=0,mh=Cy=!1,an&&typeof an.onPostCommitFiberRoot=="function")try{an.onPostCommitFiberRoot(eo,f)}catch(C){ji||(ji=!0,console.error("React instrumentation encountered an error: %s",C))}var w=f.current.stateNode;return w.effectDuration=0,w.passiveEffectDuration=0,!0}finally{Zt.p=d,G.T=s,TA(e,n)}}function xA(e,n,s){n=zn(s,n),n=Tm(e.stateNode,n,2),e=qs(e,n,2),e!==null&&(Fs(e,2),zi(e))}function re(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"&&(ha===null||!ha.has(o))){e=zn(s,e),s=wm(2),o=qs(n,s,2),o!==null&&(xm(s,o,n,e),Fs(o,2),zi(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,ft(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){re(n,n.return,E)}}function $r(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?at!==null&&typeof at.markComponentPassiveEffectUnmountStarted=="function"&&at.markComponentPassiveEffectUnmountStarted(n):(e&tn)!==oi&&at!==null&&typeof at.markComponentLayoutEffectUnmountStarted=="function"&&at.markComponentLayoutEffectUnmountStarted(n),(e&bn)!==oi&&(ko=!0),d=n,ft(d,aI,d,s,E),(e&bn)!==oi&&(ko=!1),(e&He)!==oi?at!==null&&typeof at.markComponentPassiveEffectUnmountStopped=="function"&&at.markComponentPassiveEffectUnmountStopped():(e&tn)!==oi&&at!==null&&typeof at.markComponentLayoutEffectUnmountStopped=="function"&&at.markComponentLayoutEffectUnmountStopped())}o=o.next}while(o!==f)}}catch(w){re(n,n.return,w)}}function FE(e,n){Ii(e)?(Li(),Hl(n,e),ki()):Hl(n,e)}function Um(e,n,s){Ii(e)?(Li(),$r(s,e,n),ki()):$r(s,e,n)}function $E(e){var n=e.updateQueue;if(n!==null){var s=e.stateNode;e.type.defaultProps||"ref"in e.memoizedProps||xo||(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{ft(e,GS,n,s)}catch(o){re(e,e.return,o)}}}function BN(e,n,s){return e.getSnapshotBeforeUpdate(n,s)}function jN(e,n){var s=n.memoizedProps,o=n.memoizedState;n=e.stateNode,e.type.defaultProps||"ref"in e.memoizedProps||xo||(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=ft(e,BN,n,d,o);s=f1,f!==void 0||s.has(e.type)||(s.add(e.type),ft(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){re(e,e.return,v)}}function GE(e,n,s){s.props=qa(e.type,e.memoizedProps),s.state=e.memoizedState,Ii(e)?(Li(),ft(e,BT,e,n,s),ki()):ft(e,BT,e,n,s)}function FN(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(Ii(e))try{Li(),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 Bl(e,n){try{ft(e,FN,e)}catch(s){re(e,n,s)}}function Pi(e,n){var s=e.ref,o=e.refCleanup;if(s!==null)if(typeof o=="function")try{if(Ii(e))try{Li(),ft(e,o)}finally{ki(e)}else ft(e,o)}catch(d){re(e,n,d)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof s=="function")try{if(Ii(e))try{Li(),ft(e,s,null)}finally{ki(e)}else ft(e,s,null)}catch(d){re(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",nh&&(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 $N(e,n,s,o){var d=e.memoizedProps;e=d.id,d=d.onPostCommit,n=n===null?"mount":"update",nh&&(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{ft(e,dk,o,n,s,e)}catch(d){re(e,e.return,d)}}function zm(e,n,s){try{ft(e,hk,e.stateNode,e.type,s,n,e)}catch(o){re(e,e.return,o)}}function YE(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zs(e.type)||e.tag===4}function Hm(e){t:for(;;){for(;e.sibling===null;){if(e.return===null||YE(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&&Zs(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 Bm(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=Md));else if(o!==4&&(o===27&&Zs(e.type)&&(s=e.stateNode,n=null),e=e.child,e!==null))for(Bm(e,n,s),e=e.sibling;e!==null;)Bm(e,n,s),e=e.sibling}function wd(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&&Zs(e.type)&&(s=e.stateNode),e=e.child,e!==null))for(wd(e,n,s),e=e.sibling;e!==null;)wd(e,n,s),e=e.sibling}function GN(e){for(var n,s=e.return;s!==null;){if(YE(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=Hm(e),wd(e,s,n);break;case 5:s=n.stateNode,n.flags&32&&(WA(s),n.flags&=-33),n=Hm(e),wd(e,n,s);break;case 3:case 4:n=n.stateNode.containerInfo,s=Hm(e),Bm(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 XE(e){var n=e.stateNode,s=e.memoizedProps;try{ft(e,wk,e.type,s,n,e)}catch(o){re(e,e.return,o)}}function VN(e,n){if(e=e.containerInfo,Iy=Mh,e=_S(e),Dp(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(Py={focusedElem:e,selectionRange:s},Mh=!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&&jN(e,s);break;case 3:if((d&1024)!==0){if(e=e.stateNode.containerInfo,s=e.nodeType,s===9)lg(e);else if(s===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":lg(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:ps(e,s),o&4&&jE(s,tn|li);break;case 1:if(ps(e,s),o&4)if(e=s.stateNode,n===null)s.type.defaultProps||"ref"in s.memoizedProps||xo||(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")),Ii(s)?(Li(),ft(s,cy,s,e),ki()):ft(s,cy,s,e);else{var d=qa(s.type,n.memoizedProps);n=n.memoizedState,s.type.defaultProps||"ref"in s.memoizedProps||xo||(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")),Ii(s)?(Li(),ft(s,UT,s,e,d,n,e.__reactInternalSnapshotBeforeUpdate),ki()):ft(s,UT,s,e,d,n,e.__reactInternalSnapshotBeforeUpdate)}o&64&&$E(s),o&512&&Bl(s,s.return);break;case 3:if(n=cs(),ps(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{ft(s,GS,o,d)}catch(v){re(s,s.return,v)}}e.effectDuration+=td(n);break;case 27:n===null&&o&4&&XE(s);case 26:case 5:ps(e,s),n===null&&o&4&&qE(s),o&512&&Bl(s,s.return);break;case 12:if(o&4){o=cs(),ps(e,s),e=s.stateNode,e.effectDuration+=Ml(o);try{ft(s,VE,s,n,eh,e.effectDuration)}catch(v){re(s,s.return,v)}}else ps(e,s);break;case 13:ps(e,s),o&4&&ZE(e,s),o&64&&(e=s.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(s=tk.bind(null,s),Ak(e,s))));break;case 22:if(o=s.memoizedState!==null||ws,!o){n=n!==null&&n.memoizedState!==null||Ce,d=ws;var f=Ce;ws=o,(Ce=n)&&!f?ms(e,s,(s.subtreeFlags&8772)!==0):ps(e,s),ws=d,Ce=f}break;case 30:break;default:ps(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 fs(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(eo,s)}catch(f){Fi||(Fi=!0,console.error("React instrumentation encountered an error: %s",f))}switch(s.tag){case 26:Ce||Pi(s,n),fs(e,n,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:Ce||Pi(s,n);var o=Pe,d=Mn;Zs(s.type)&&(Pe=s.stateNode,Mn=!1),fs(e,n,s),ft(s,Yl,s.stateNode),Pe=o,Mn=d;break;case 5:Ce||Pi(s,n);case 6:if(o=Pe,d=Mn,Pe=null,fs(e,n,s),Pe=o,Mn=d,Pe!==null)if(Mn)try{ft(s,mk,Pe,s.stateNode)}catch(f){re(s,n,f)}else try{ft(s,pk,Pe,s.stateNode)}catch(f){re(s,n,f)}break;case 18:Pe!==null&&(Mn?(e=Pe,QA(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,s.stateNode),Kl(e)):QA(Pe,s.stateNode));break;case 4:o=Pe,d=Mn,Pe=s.stateNode.containerInfo,Mn=!0,fs(e,n,s),Pe=o,Mn=d;break;case 0:case 11:case 14:case 15:Ce||$r(bn,s,n),Ce||Pm(s,n,tn),fs(e,n,s);break;case 1:Ce||(Pi(s,n),o=s.stateNode,typeof o.componentWillUnmount=="function"&&GE(s,n,o)),fs(e,n,s);break;case 21:fs(e,n,s);break;case 22:Ce=(o=Ce)||s.memoizedState!==null,fs(e,n,s),Ce=o;break;default:fs(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{ft(n,Tk,e)}catch(s){re(n,n.return,s)}}function qN(e){switch(e.tag){case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new p1),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new p1),n;default:throw Error("Unexpected Suspense handler tag ("+e.tag+"). This is a bug in React.")}}function jm(e,n){var s=qN(e);n.forEach(function(o){var d=ek.bind(null,e,o);if(!s.has(o)){if(s.add(o),Si)if(Co!==null&&Ro!==null)Gl(Ro,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(Zs(E.type)){Pe=E.stateNode,Mn=!1;break t}break;case 5:Pe=E.stateNode,Mn=!1;break t;case 3:case 4:Pe=E.stateNode.containerInfo,Mn=!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,Mn=!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&&($r(bn|li,e,e.return),Hl(bn|li,e),Pm(e,e.return,tn|li));break;case 1:Hn(n,e),Bn(e),o&512&&(Ce||s===null||Pi(s,s.return)),o&64&&ws&&(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||Pi(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[tc]||d[rn]||d.namespaceURI===io||d.hasAttribute("itemprop"))&&(d=n.createElement(o),n.head.insertBefore(d,n.querySelector("head > title"))),Ke(d,o,s),d[rn]=e,I(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],Q(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,I(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&&zm(e,e.memoizedProps,s.memoizedProps);break;case 27:Hn(n,e),Bn(e),o&512&&(Ce||s===null||Pi(s,s.return)),s!==null&&o&4&&zm(e,e.memoizedProps,s.memoizedProps);break;case 5:if(Hn(n,e),Bn(e),o&512&&(Ce||s===null||Pi(s,s.return)),e.flags&32){n=e.stateNode;try{ft(e,WA,n)}catch(H){re(e,e.return,H)}}o&4&&e.stateNode!=null&&(n=e.memoizedProps,zm(e,n,s!==null?s.memoizedProps:n)),o&1024&&(gy=!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{ft(e,fk,n,s,o)}catch(H){re(e,e.return,H)}}break;case 3:if(d=cs(),Ch=null,f=Ti,Ti=Nd(n.containerInfo),Hn(n,e),Ti=f,Bn(e),o&4&&s!==null&&s.memoizedState.isDehydrated)try{ft(e,_k,n.containerInfo)}catch(H){re(e,e.return,H)}gy&&(gy=!1,tA(e)),n.effectDuration+=td(d);break;case 4:o=Ti,Ti=Nd(e.stateNode.containerInfo),Hn(n,e),Bn(e),Ti=o;break;case 12:o=cs(),Hn(n,e),Bn(e),e.stateNode.effectDuration+=Ml(o);break;case 13:Hn(n,e),Bn(e),e.child.flags&8192&&e.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(Ay=ji()),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,jm(e,o)));break;case 22:d=e.memoizedState!==null;var E=s!==null&&s.memoizedState!==null,w=ws,x=Ce;if(ws=w||d,Ce=x||E,Hn(n,e),Ce=x,ws=w,Bn(e),o&8192)t:for(n=e.stateNode,n._visibility=d?n._visibility&~Kd:n._visibility|Kd,d&&(s===null||E||ws||Ce||Ya(e)),s=null,n=e;;){if(n.tag===5||n.tag===26){if(s===null){E=s=n;try{f=E.stateNode,d?ft(E,gk,f):ft(E,bk,E.stateNode,E.memoizedProps)}catch(H){re(E,E.return,H)}}}else if(n.tag===6){if(s===null){E=n;try{v=E.stateNode,d?ft(E,yk,v):ft(E,vk,v,E.memoizedProps)}catch(H){re(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,jm(e,s))));break;case 19:Hn(n,e),Bn(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,jm(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{ft(e,GN,e)}catch(s){re(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 ps(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:Pm(e,e.return,tn),Ya(e);break;case 1:Pi(e,e.return);var n=e.stateNode;typeof n.componentWillUnmount=="function"&&GE(e,e.return,n),Ya(e);break;case 27:ft(e,Yl,e.stateNode);case 26:case 5:Pi(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;)eA(e),e=e.sibling}function nA(e,n,s,o){var d=s.flags;switch(s.tag){case 0:case 11:case 15:ms(e,s,o),jE(s,tn);break;case 1:if(ms(e,s,o),n=s.stateNode,typeof n.componentDidMount=="function"&&ft(s,cy,s,n),n=s.updateQueue,n!==null){e=s.stateNode;try{ft(s,MN,n,e)}catch(f){re(s,s.return,f)}}o&&d&64&&$E(s),Bl(s,s.return);break;case 27:XE(s);case 26:case 5:ms(e,s,o),o&&n===null&&d&4&&qE(s),Bl(s,s.return);break;case 12:if(o&&d&4){d=cs(),ms(e,s,o),o=s.stateNode,o.effectDuration+=Ml(d);try{ft(s,VE,s,n,eh,o.effectDuration)}catch(f){re(s,s.return,f)}}else ms(e,s,o);break;case 13:ms(e,s,o),o&&d&4&&ZE(e,s);break;case 22:s.memoizedState===null&&ms(e,s,o),Bl(s,s.return);break;case 30:break;default:ms(e,s,o)}}function ms(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 Fm(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&&Fa(e),s!=null&&Dl(s))}function $m(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(Fa(n),e!=null&&Dl(e))}function Ui(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:Ui(e,n,s,o),d&2048&&FE(n,He|li);break;case 1:Ui(e,n,s,o);break;case 3:var f=cs();Ui(e,n,s,o),d&2048&&(s=null,n.alternate!==null&&(s=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==s&&(Fa(n),s!=null&&Dl(s))),e.passiveEffectDuration+=td(f);break;case 12:if(d&2048){d=cs(),Ui(e,n,s,o),e=n.stateNode,e.passiveEffectDuration+=Ml(d);try{ft(n,$N,n,n.alternate,eh,e.passiveEffectDuration)}catch(E){re(n,n.return,E)}}else Ui(e,n,s,o);break;case 13:Ui(e,n,s,o);break;case 23:break;case 22:f=n.stateNode;var v=n.alternate;n.memoizedState!==null?f._visibility&vs?Ui(e,n,s,o):jl(e,n):f._visibility&vs?Ui(e,n,s,o):(f._visibility|=vs,Gr(e,n,s,o,(n.subtreeFlags&10256)!==0)),d&2048&&Fm(v,n);break;case 24:Ui(e,n,s,o),d&2048&&$m(n.alternate,n);break;default:Ui(e,n,s,o)}}function Gr(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:Gr(e,n,s,o,d),FE(n,He);break;case 23:break;case 22:var v=n.stateNode;n.memoizedState!==null?v._visibility&vs?Gr(e,n,s,o,d):jl(e,n):(v._visibility|=vs,Gr(e,n,s,o,d)),d&&f&2048&&Fm(n.alternate,n);break;case 24:Gr(e,n,s,o,d),d&&f&2048&&$m(n.alternate,n);break;default:Gr(e,n,s,o,d)}}function jl(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:jl(s,o),d&2048&&Fm(o.alternate,o);break;case 24:jl(s,o),d&2048&&$m(o.alternate,o);break;default:jl(s,o)}n=n.sibling}}function Vr(e){if(e.subtreeFlags&_c)for(e=e.child;e!==null;)aA(e),e=e.sibling}function aA(e){switch(e.tag){case 26:Vr(e),e.flags&_c&&e.memoizedState!==null&&Dk(Ti,e.memoizedState,e.memoizedProps);break;case 5:Vr(e);break;case 3:case 4:var n=Ti;Ti=Nd(e.stateNode.containerInfo),Vr(e),Ti=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=_c,_c=16777216,Vr(e),_c=n):Vr(e));break;default:Vr(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 Fl(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:Fl(e),e.flags&2048&&Um(e,e.return,He|li);break;case 3:var n=cs();Fl(e),e.stateNode.passiveEffectDuration+=td(n);break;case 12:n=cs(),Fl(e),e.stateNode.passiveEffectDuration+=Ml(n);break;case 22:n=e.stateNode,e.memoizedState!==null&&n._visibility&vs&&(e.return===null||e.return.tag!==13)?(n._visibility&=~vs,xd(e)):Fl(e);break;default:Fl(e)}}function xd(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:Um(e,e.return,He),xd(e);break;case 22:var n=e.stateNode;n._visibility&vs&&(n._visibility&=~vs,xd(e));break;default:xd(e)}}function cA(e,n){for(;Ge!==null;){var s=Ge,o=s;switch(o.tag){case 0:case 11:case 15:Um(o,n,He);break;case 23:case 22:o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(o=o.memoizedState.cachePool.pool,o!=null&&Fa(o));break;case 24:Dl(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 YN(){oI.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 jn(e){if((Jt&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:Zm()):yl()}function dA(){qn===0&&(qn=(Bt&536870912)===0||Yt?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."),Cy&&(mh=!0),(e===ce&&(te===sr||te===ar)||e.cancelPendingCommit!==null)&&(Yr(e,0),Qs(e,Bt,qn,!1)),js(e,s),(Jt&vn)!==0&&e===ce){if(Gi)switch(n.tag){case 0:case 11:case 15:e=Ut&&X(Ut)||"Unknown",T1.has(e)||(T1.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:_1||(console.error("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),_1=!0)}}else Si&&ml(e,n,s),ik(n),e===ce&&((Jt&vn)===Gn&&(da|=s),Se===ir&&Qs(e,Bt,qn,!1)),zi(e)}function hA(e,n,s){if((Jt&(vn|wi))!==Gn)throw Error("Should not already be working.");var o=!s&&(n&124)===0&&(n&e.expiredLanes)===0||Bs(e,n),d=o?WN(e,n):qm(e,n,!0),f=o;do{if(d===xs){Oo&&!o&&Qs(e,n,0,!1);break}else{if(s=e.current.alternate,f&&!XN(s)){d=qm(e,n,!1),f=!1;continue}if(d===Do){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=Dc;var w=d.current.memoizedState.isDehydrated;if(w&&(Yr(d,E).flags|=256),E=qm(d,E,!1),E!==Do){if(Sy&&!w){d.errorRecoveryDisabledLanes|=f,da|=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!==Do)continue}}if(d===wc){Yr(e,0),Qs(e,n,0,!0);break}t:{switch(o=e,d){case xs:case wc:throw Error("Root did not complete. This is a bug in React.");case ir:if((n&4194048)!==n)break;case hh:Qs(o,n,qn,!ca);break t;case Do:Sn=null;break;case yy:case m1:break;default:throw Error("Unknown root exit status.")}if(G.actQueue!==null)Ym(o,s,n,Sn,Mc,fh,qn,da,rr);else{if((n&62914560)===n&&(f=Ay+y1-ji(),10<f)){if(Qs(o,n,qn,!ca),as(o,0,!0)!==0)break t;o.timeoutHandle=N1(fA.bind(null,o,s,Sn,Mc,fh,n,qn,da,rr,ca,d,dI,vT,0),f);break t}fA(o,s,Sn,Mc,fh,n,qn,da,rr,ca,d,cI,vT,0)}}}break}while(!0);zi(e)}function fA(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)&&(Pc={stylesheets:null,count:0,unsuspend:Rk},aA(n),V=Mk(),V!==null)){e.cancelPendingCommit=V(Ym.bind(null,e,n,f,s,o,d,v,E,w,H,uI,z,q)),Qs(e,f,v,!x);return}Ym(e,n,f,s,o,d,v,E,w)}function XN(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 Qs(e,n,s,o){n&=~Ey,n&=~da,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&&fl(e,s,n)}function qr(){return(Jt&(vn|wi))===Gn?(Vl(0),!1):!0}function Gm(){if(Ut!==null){if(te===On)var e=Ut.return;else e=Ut,Ku(),em(e),Ao=null,Ec=0,e=Ut;for(;e!==null;)BE(e.alternate,e),e=e.return;Ut=null}}function Yr(e,n){var s=e.timeoutHandle;s!==dr&&(e.timeoutHandle=dr,TI(s)),s=e.cancelPendingCommit,s!==null&&(e.cancelPendingCommit=null,s()),Gm(),ce=e,Ut=s=os(e.current,null),Bt=n,te=On,Vn=null,ca=!1,Oo=Bs(e,n),Sy=!1,Se=xs,rr=qn=Ey=da=ua=0,Sn=Dc=null,fh=!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 Wi=n,Yu(),n=yT(),1e3<n-gT&&(G.recentlyCreatedOwnerStacks=0,gT=n),Ai.discardPendingWarnings(),s}function pA(e,n){_t=null,G.H=uh,G.getCurrentStack=null,Gi=!1,$n=null,n===yc||n===ah?(n=jS(),te=Cc):n===AT?(n=jS(),te=g1):te=n===r1?vy:n!==null&&typeof n=="object"&&typeof n.then=="function"?Mo:xc,Vn=n;var s=Ut;if(s===null)Se=wc,Ed(e,zn(n,e.current));else switch(s.mode&Je&&Gp(s),Xe(),te){case xc:at!==null&&typeof at.markComponentErrored=="function"&&at.markComponentErrored(s,n,Bt);break;case sr:case ar:case Cc:case Mo:case Rc:at!==null&&typeof at.markComponentSuspended=="function"&&at.markComponentSuspended(s,n,Bt)}}function mA(){var e=G.H;return G.H=uh,e===null?uh:e}function gA(){var e=G.A;return G.A=rI,e}function Vm(){Se=ir,ca||(Bt&4194048)!==Bt&&ui.current!==null||(Oo=!0),(ua&134217727)===0&&(da&134217727)===0||ce===null||Qs(ce,Bt,qn,!1)}function qm(e,n,s){var o=Jt;Jt|=vn;var d=mA(),f=gA();if(ce!==e||Bt!==n){if(Si){var v=e.memoizedUpdaters;0<v.size&&(Gl(e,Bt),v.clear()),gl(e,n)}Mc=null,Yr(e,n)}Pn(n),n=!1,v=Se;t:do try{if(te!==On&&Ut!==null){var E=Ut,w=Vn;switch(te){case vy:Gm(),v=hh;break t;case Cc:case sr:case ar:case Mo:ui.current===null&&(n=!0);var x=te;if(te=On,Vn=null,Xr(e,E,w,x),s&&Oo){v=xs;break t}break;default:x=te,te=On,Vn=null,Xr(e,E,w,x)}}yA(),v=Se;break}catch(H){pA(e,H)}while(!0);return n&&e.shellSuspendCounter++,Ku(),Jt=o,G.H=d,G.A=f,ss(),Ut===null&&(ce=null,Bt=0,Yu()),v}function yA(){for(;Ut!==null;)bA(Ut)}function WN(e,n){var s=Jt;Jt|=vn;var o=mA(),d=gA();if(ce!==e||Bt!==n){if(Si){var f=e.memoizedUpdaters;0<f.size&&(Gl(e,Bt),f.clear()),gl(e,n)}Mc=null,ph=ji()+b1,Yr(e,n)}else Oo=Bs(e,n);Pn(n);t:do try{if(te!==On&&Ut!==null)e:switch(n=Ut,f=Vn,te){case xc:te=On,Vn=null,Xr(e,n,f,xc);break;case sr:case ar:if(HS(f)){te=On,Vn=null,vA(n);break}n=function(){te!==sr&&te!==ar||ce!==e||(te=Rc),zi(e)},f.then(n,n);break t;case Cc:te=Rc;break t;case g1:te=by;break t;case Rc:HS(f)?(te=On,Vn=null,vA(n)):(te=On,Vn=null,Xr(e,n,f,Rc));break;case by:var v=null;switch(Ut.tag){case 26:v=Ut.memoizedState;case 5:case 27:var E=Ut;if(!v||l_(v)){te=On,Vn=null;var w=E.sibling;if(w!==null)Ut=w;else{var x=E.return;x!==null?(Ut=x,Cd(x)):Ut=null}break e}break;default:console.error("Unexpected type of fiber triggered a suspensey commit. This is a bug in React.")}te=On,Vn=null,Xr(e,n,f,by);break;case Mo:te=On,Vn=null,Xr(e,n,f,Mo);break;case vy:Gm(),Se=hh;break t;default:throw Error("Unexpected SuspendedReason. This is a bug in React.")}G.actQueue!==null?yA():QN();break}catch(H){pA(e,H)}while(!0);return Ku(),G.H=o,G.A=d,Jt=s,Ut!==null?(at!==null&&typeof at.markRenderYielded=="function"&&at.markRenderYielded(),xs):(ss(),ce=null,Bt=0,Yu(),Se)}function QN(){for(;Ut!==null&&!qk();)bA(Ut)}function bA(e){var n=e.alternate;(e.mode&Je)!==de?($p(e),n=ft(e,Im,n,e,Wi),Gp(e)):n=ft(e,Im,n,e,Wi),e.memoizedProps=e.pendingProps,n===null?Cd(e):Ut=n}function vA(e){var n=ft(e,KN,e);e.memoizedProps=e.pendingProps,n===null?Cd(e):Ut=n}function KN(e){var n=e.alternate,s=(e.mode&Je)!==de;switch(s&&$p(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:em(e);default:BE(n,e),e=Ut=RS(e,Wi),n=Im(n,e,Wi)}return s&&Gp(e),n}function Xr(e,n,s,o){Ku(),em(n),Ao=null,Ec=0;var d=n.return;try{if(PN(e,d,n,s,Bt)){Se=wc,Ed(e,zn(s,e.current)),Ut=null;return}}catch(f){if(d!==null)throw Ut=d,f;Se=wc,Ed(e,zn(s,e.current)),Ut=null;return}n.flags&32768?(Yt||o===xc?e=!0:Oo||(Bt&536870912)!==0?e=!1:(ca=e=!0,(o===sr||o===ar||o===Cc||o===Mo)&&(o=ui.current,o!==null&&o.tag===13&&(o.flags|=16384))),SA(n,e)):Cd(n)}function Cd(e){var n=e;do{if((n.flags&32768)!==0){SA(n,ca);return}var s=n.alternate;if(e=n.return,$p(n),s=ft(n,zN,s,n,Wi),(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);Se===xs&&(Se=m1)}function SA(e,n){do{var s=HN(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);Se=hh,Ut=null}function Ym(e,n,s,o,d,f,v,E,w){e.cancelPendingCommit=null;do $l();while(en!==or);if(Ai.flushLegacyContextWarning(),Ai.flushPendingUnsafeLifecycleWarnings(),(Jt&(vn|wi))!==Gn)throw Error("Should not already be working.");if(at!==null&&typeof at.markCommitStarted=="function"&&at.markCommitStarted(s),n===null)Kt();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|=Qg,Uu(e,s,f,v,E,w),e===ce&&(Ut=ce=null,Bt=0),No=n,fa=e,pa=s,Ty=f,wy=d,A1=o,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,nk(to,function(){return wA(),null})):(e.callbackNode=null,e.callbackPriority=0),eh=yo(),o=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||o){o=G.T,G.T=null,d=Zt.p,Zt.p=ei,v=Jt,Jt|=wi;try{VN(e,n,s)}finally{Jt=v,Zt.p=d,G.T=o}}en=v1,EA(),AA(),_A()}}function EA(){if(en===v1){en=or;var e=fa,n=No,s=pa,o=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||o){o=G.T,G.T=null;var d=Zt.p;Zt.p=ei;var f=Jt;Jt|=wi;try{Co=s,Ro=e,JE(n,e),Ro=Co=null,s=Py;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&&Dp(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(),lt=E.textContent.length,Et=Math.min(w.start,lt),ue=w.end===void 0?Et:Math.min(w.end,lt);!q.extend&&Et>ue&&(v=ue,ue=Et,Et=v);var Ft=ES(E,Et),D=ES(E,ue);if(Ft&&D&&(q.rangeCount!==1||q.anchorNode!==Ft.node||q.anchorOffset!==Ft.offset||q.focusNode!==D.node||q.focusOffset!==D.offset)){var M=V.createRange();M.setStart(Ft.node,Ft.offset),q.removeAllRanges(),Et>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}}Mh=!!Iy,Py=Iy=null}finally{Jt=f,Zt.p=d,G.T=o}}e.current=n,en=S1}}function AA(){if(en===S1){en=or;var e=fa,n=No,s=pa,o=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||o){o=G.T,G.T=null;var d=Zt.p;Zt.p=ei;var f=Jt;Jt|=wi;try{at!==null&&typeof at.markLayoutEffectsStarted=="function"&&at.markLayoutEffectsStarted(s),Co=s,Ro=e,WE(e,n.alternate,n),Ro=Co=null,at!==null&&typeof at.markLayoutEffectsStopped=="function"&&at.markLayoutEffectsStopped()}finally{Jt=f,Zt.p=d,G.T=o}}en=E1}}function _A(){if(en===hI||en===E1){en=or,Yk();var e=fa,n=No,s=pa,o=A1,d=(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0;d?en=_y:(en=or,No=fa=null,TA(e,e.pendingLanes),lr=0,Nc=null);var f=e.pendingLanes;if(f===0&&(ha=null),d||DA(e),d=Lr(s),n=n.stateNode,an&&typeof an.onCommitFiberRoot=="function")try{var v=(n.current.flags&128)===128;switch(d){case ei:var E=Rg;break;case $i:E=Dg;break;case bs:E=to;break;case Gd:E=Mg;break;default:E=to}an.onCommitFiberRoot(eo,n,E,v)}catch(V){Fi||(Fi=!0,console.error("React instrumentation encountered an error: %s",V))}if(Si&&e.memoizedUpdaters.clear(),YN(),o!==null){v=G.T,E=Zt.p,Zt.p=ei,G.T=null;try{var w=e.onRecoverableError;for(n=0;n<o.length;n++){var x=o[n],H=ZN(x.stack);ft(x.source,w,x.value,H)}}finally{G.T=v,Zt.p=E}}(pa&3)!==0&&$l(),zi(e),f=e.pendingLanes,(s&4194090)!==0&&(f&42)!==0?(ih=!0,e===xy?Oc++:(Oc=0,xy=e)):Oc=0,Vl(0),Kt()}}function ZN(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,Dl(n)))}function $l(e){return EA(),AA(),_A(),wA()}function wA(){if(en!==_y)return!1;var e=fa,n=Ty;Ty=0;var s=Lr(pa),o=bs>s?bs:s;s=G.T;var d=Zt.p;try{Zt.p=o,G.T=null,o=wy,wy=null;var f=fa,v=pa;if(en=or,No=fa=null,pa=0,(Jt&(vn|wi))!==Gn)throw Error("Cannot flush passive effects while already rendering.");Cy=!0,mh=!1,at!==null&&typeof at.markPassiveEffectsStarted=="function"&&at.markPassiveEffectsStarted(v);var E=Jt;if(Jt|=wi,oA(f.current),iA(f,f.current,v,o),at!==null&&typeof at.markPassiveEffectsStopped=="function"&&at.markPassiveEffectsStopped(),DA(f),Jt=E,Vl(0,!1),mh?f===Nc?lr++:(lr=0,Nc=f):lr=0,mh=Cy=!1,an&&typeof an.onPostCommitFiberRoot=="function")try{an.onPostCommitFiberRoot(eo,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{Zt.p=d,G.T=s,TA(e,n)}}function xA(e,n,s){n=zn(s,n),n=Tm(e.stateNode,n,2),e=qs(e,n,2),e!==null&&(js(e,2),zi(e))}function re(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"&&(ha===null||!ha.has(o))){e=zn(s,e),s=wm(2),o=qs(n,s,2),o!==null&&(xm(s,o,n,e),js(o,2),zi(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
 
@@ -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`),ce===e&&(Bt&s)===s&&(Se===ir||Se===yy&&(Bt&62914560)===Bt&&Fi()-Ay<yw?(Jt&vn)===Gn&&Yr(e,0):Ey|=s,rr===Bt&&(rr=0)),zi(e)}function CA(e,n){n===0&&(n=Oa()),e=wn(e,n),e!==null&&(Fs(e,n),zi(e))}function tk(e){var n=e.memoizedState,s=0;n!==null&&(s=n.retryLane),CA(e,s)}function ek(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 Wm(e,n,s){if((n.subtreeFlags&67117056)!==0)for(n=n.child;n!==null;){var o=e,d=n,f=d.type===Hd;f=s||f,d.tag!==22?d.flags&67108864?f&&ft(d,RA,o,d,(d.mode&fT)===de):Wm(o,d,f):d.memoizedState===null&&(f&&d.flags&8192?ft(d,RA,o,d):d.subtreeFlags&67108864&&ft(d,Wm,o,d,f)),n=n.sibling}}function RA(e,n){var s=2<arguments.length&&arguments[2]!==void 0?arguments[2]:!0;At(!0);try{eA(n),s&&lA(n),nA(e,n.alternate,n,!1),s&&sA(e,n,0,null,!1,0)}finally{At(!1)}}function DA(e){var n=!0;e.current.mode&(on|Ei)||(n=!1),Wm(e,e.current,n)}function MA(e){if((Jt&vn)===Gn){var n=e.tag;if(n===3||n===1||n===0||n===11||n===14||n===15){if(n=X(e)||"ReactComponent",gh!==null){if(gh.has(n))return;gh.add(n)}else gh=new Set([n]);ft(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 Gl(e,n){Si&&e.memoizedUpdaters.forEach(function(s){ml(e,s,n)})}function nk(e,n){var s=G.actQueue;return s!==null?(s.push(n),mI):Cg(e,n)}function ik(e){uA()&&G.actQueue===null&&ft(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&&(Se===ir||Se===yy&&(Bt&62914560)===Bt&&ji()-Ay<y1?(Jt&vn)===Gn&&Yr(e,0):Ey|=s,rr===Bt&&(rr=0)),zi(e)}function CA(e,n){n===0&&(n=Oa()),e=wn(e,n),e!==null&&(js(e,n),zi(e))}function tk(e){var n=e.memoizedState,s=0;n!==null&&(s=n.retryLane),CA(e,s)}function ek(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 Wm(e,n,s){if((n.subtreeFlags&67117056)!==0)for(n=n.child;n!==null;){var o=e,d=n,f=d.type===Hd;f=s||f,d.tag!==22?d.flags&67108864?f&&ft(d,RA,o,d,(d.mode&fT)===de):Wm(o,d,f):d.memoizedState===null&&(f&&d.flags&8192?ft(d,RA,o,d):d.subtreeFlags&67108864&&ft(d,Wm,o,d,f)),n=n.sibling}}function RA(e,n){var s=2<arguments.length&&arguments[2]!==void 0?arguments[2]:!0;At(!0);try{eA(n),s&&lA(n),nA(e,n.alternate,n,!1),s&&sA(e,n,0,null,!1,0)}finally{At(!1)}}function DA(e){var n=!0;e.current.mode&(on|Ei)||(n=!1),Wm(e,e.current,n)}function MA(e){if((Jt&vn)===Gn){var n=e.tag;if(n===3||n===1||n===0||n===11||n===14||n===15){if(n=X(e)||"ReactComponent",gh!==null){if(gh.has(n))return;gh.add(n)}else gh=new Set([n]);ft(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 Gl(e,n){Si&&e.memoizedUpdaters.forEach(function(s){ml(e,s,n)})}function nk(e,n){var s=G.actQueue;return s!==null?(s.push(n),mI):Cg(e,n)}function ik(e){uA()&&G.actQueue===null&&ft(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 zi(e){e!==Lo&&e.next===null&&(Lo===null?yh=Lo=e:Lo=Lo.next=e),bh=!0,G.actQueue!==null?Dy||(Dy=!0,LA()):Ry||(Ry=!0,LA())}function Vl(e,n){if(!My&&bh){My=!0;do for(var s=!1,o=yh;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,kA(o,f))}else f=Bt,f=as(o,o===ce?f:0,o.cancelPendingCommit!==null||o.timeoutHandle!==dr),(f&3)===0||Bs(o,f)||(s=!0,kA(o,f));o=o.next}while(s);My=!1}}function sk(){Qm()}function Qm(){bh=Dy=Ry=!1;var e=0;cr!==0&&(ck()&&(e=cr),cr=0);for(var n=Fi(),s=null,o=yh;o!==null;){var d=o.next,f=OA(o,n);f===0?(o.next=null,s===null?yh=d:s.next=d,d===null&&(Lo=s)):(s=o,(e!==0||(f&3)!==0)&&(bh=!0)),o=d}Vl(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]=mp(E,n)):w<=n&&(e.expiredLanes|=E),f&=~E}if(n=ce,s=Bt,s=as(e,e===n?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==dr),o=e.callbackNode,s===0||e===n&&(te===sr||te===ar)||e.cancelPendingCommit!==null)return o!==null&&Km(o),e.callbackNode=null,e.callbackPriority=0;if((s&3)===0||Bs(e,s)){if(n=s&-s,n!==e.callbackPriority||G.actQueue!==null&&o!==Oy)Km(o);else return n;switch(Lr(s)){case ei:case $i:s=Dg;break;case bs:s=to;break;case Gd:s=Mg;break;default:s=to}return o=NA.bind(null,e),G.actQueue!==null?(G.actQueue.push(o),s=Oy):s=Cg(s,o),e.callbackPriority=n,e.callbackNode=s,n}return o!==null&&Km(o),e.callbackPriority=2,e.callbackNode=null,2}function NA(e,n){if(ih=nh=!1,en!==or&&en!==_y)return e.callbackNode=null,e.callbackPriority=0,null;var s=e.callbackNode;if($l()&&e.callbackNode!==s)return null;var o=Bt;return o=as(e,e===ce?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==dr),o===0?null:(hA(e,o,n),OA(e,Fi()),e.callbackNode!=null&&e.callbackNode===s?NA.bind(null,e):null)}function kA(e,n){if($l())return null;nh=ih,ih=!1,hA(e,n,!0)}function Km(e){e!==Oy&&e!==null&&Vk(e)}function LA(){G.actQueue!==null&&G.actQueue.push(function(){return Qm(),null}),wI(function(){(Jt&(vn|wi))!==Gn?Cg(Rg,sk):Qm()})}function Zm(){return cr===0&&(cr=Pt()),cr}function IA(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:(Q(e,"action"),Al(""+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 ak(e,n,s,o,d){if(n==="submit"&&s&&s.stateNode===d){var f=IA((d[Rn]||null).action),v=o.submitter;v&&(n=(n=v[Rn]||null)?IA(n.formAction):v.getAttribute("formAction"),n!==null&&(f=n,v=null));var E=new Wd("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),ym(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),ym(s,C,f,w))},currentTarget:d}]})}}function Rd(e,n,s){e.currentTarget=s;try{n(e)}catch(o){hy(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?ft(w,Rd,f,E,C):Rd(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?ft(w,Rd,f,E,C):Rd(f,E,C),d=w}}}}function Ft(e,n){Ny.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[Og];s===void 0&&(s=n[Og]=new Set);var o=e+"__bubble";s.has(o)||(zA(n,e,2,!1),s.add(o))}function Jm(e,n,s){Ny.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 tg(e){if(!e[vh]){e[vh]=!0,E_.forEach(function(s){s!=="selectionchange"&&(Ny.has(s)||Jm(s,!1,e),Jm(s,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[vh]||(n[vh]=!0,Jm("selectionchange",!1,n))}}function zA(e,n,s,o){switch(f_(n)){case ei:var d=Ik;break;case $i:d=Pk;break;default:d=mg}s=d.bind(null,n,s,e),d=void 0,!Hg||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 eg(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=Cp(s),V=[];t:{var z=hT.get(e);if(z!==void 0){var q=Wd,lt=e;switch(e){case"keypress":if(Gu(s)===0)break t;case"keydown":case"keyup":q=NL;break;case"focusin":lt="focus",q=$g;break;case"focusout":lt="blur",q=$g;break;case"beforeblur":case"afterblur":q=$g;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=SL;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":q=IL;break;case lT:case cT:case uT:q=_L;break;case dT: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=tT;break;case"toggle":case"beforetoggle":q=FL}var Et=(n&4)!==0,ue=!Et&&(e==="scroll"||e==="scrollend"),jt=Et?z!==null?z+"Capture":null:z;Et=[];for(var D=C,M;D!==null;){var k=D;if(M=k.stateNode,k=k.tag,k!==5&&k!==26&&k!==27||M===null||jt===null||(k=_l(D,jt),k!=null&&Et.push(ql(D,k,M))),ue)break;D=D.return}0<Et.length&&(z=new q(z,lt,null,s,H),V.push({event:z,listeners:Et}))}}if((n&7)===0){t:{if(z=e==="mouseover"||e==="pointerover",q=e==="mouseout"||e==="pointerout",z&&s!==nc&&(lt=s.relatedTarget||s.fromElement)&&(gi(lt)||lt[ia]))break t;if((q||z)&&(z=H.window===H?H:(z=H.ownerDocument)?z.defaultView||z.parentWindow:window,q?(lt=s.relatedTarget||s.toElement,q=C,lt=lt?gi(lt):null,lt!==null&&(ue=x(lt),Et=lt.tag,lt!==ue||Et!==5&&Et!==27&&Et!==6)&&(lt=null)):(q=null,lt=C),q!==lt)){if(Et=Z_,k="onMouseLeave",jt="onMouseEnter",D="mouse",(e==="pointerout"||e==="pointerover")&&(Et=tT,k="onPointerLeave",jt="onPointerEnter",D="pointer"),ue=q==null?z:$s(q),M=lt==null?z:$s(lt),z=new Et(k,D+"leave",q,s,H),z.target=ue,z.relatedTarget=M,k=null,gi(H)===C&&(Et=new Et(jt,D+"enter",lt,s,H),Et.target=M,Et.relatedTarget=ue,k=Et),ue=k,q&&lt)e:{for(Et=q,jt=lt,D=0,M=Et;M;M=Wr(M))D++;for(M=0,k=jt;k;k=Wr(k))M++;for(;0<D-M;)Et=Wr(Et),D--;for(;0<M-D;)jt=Wr(jt),M--;for(;D--;){if(Et===jt||jt!==null&&Et===jt.alternate)break e;Et=Wr(Et),jt=Wr(jt)}Et=null}else Et=null;q!==null&&HA(V,z,q,Et,!1),lt!==null&&ue!==null&&HA(V,ue,lt,Et,!0)}}t:{if(z=C?$s(C):window,q=z.nodeName&&z.nodeName.toLowerCase(),q==="select"||q==="input"&&z.type==="file")var Y=yS;else if(mS(z))if(rT)Y=wN;else{Y=_N;var nt=AN}else q=z.nodeName,!q||q.toLowerCase()!=="input"||z.type!=="checkbox"&&z.type!=="radio"?C&&El(C.elementType)&&(Y=yS):Y=TN;if(Y&&(Y=Y(e,C))){gS(V,Y,s,H);break t}nt&&nt(e,z,C),e==="focusout"&&C&&z.type==="number"&&C.memoizedProps.value!=null&&Ep(z,"number",z.value)}switch(nt=C?$s(C):window,e){case"focusin":(mS(nt)||nt.contentEditable==="true")&&(lo=nt,Vg=C,cc=null);break;case"focusout":cc=Vg=lo=null;break;case"mousedown":qg=!0;break;case"contextmenu":case"mouseup":case"dragend":qg=!1,TS(V,s,H);break;case"selectionchange":if(VL)break;case"keydown":case"keyup":TS(V,s,H)}var Rt;if(Gg)t:{switch(e){case"compositionstart":var ct="onCompositionStart";break t;case"compositionend":ct="onCompositionEnd";break t;case"compositionupdate":ct="onCompositionUpdate";break t}ct=void 0}else oo?fS(e,s)&&(ct="onCompositionEnd"):e==="keydown"&&s.keyCode===eT&&(ct="onCompositionStart");ct&&(nT&&s.locale!=="ko"&&(oo||ct!=="onCompositionStart"?ct==="onCompositionEnd"&&oo&&(Rt=dS()):(sa=H,Bg="value"in sa?sa.value:sa.textContent,oo=!0)),nt=Dd(C,ct),0<nt.length&&(ct=new J_(ct,e,null,s,H),V.push({event:ct,listeners:nt}),Rt?ct.data=Rt:(Rt=pS(s),Rt!==null&&(ct.data=Rt)))),(Rt=$L?bN(e,s):vN(e,s))&&(ct=Dd(C,"onBeforeInput"),0<ct.length&&(nt=new CL("onBeforeInput","beforeinput",null,s,H),V.push({event:nt,listeners:ct}),nt.data=Rt)),ak(V,e,C,s,H)}UA(V,n)})}function ql(e,n,s){return{instance:e,listener:n,currentTarget:s}}function Dd(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=_l(e,s),d!=null&&o.unshift(ql(e,d,f)),d=_l(e,n),d!=null&&o.push(ql(e,d,f))),e.tag===3)return o;e=e.return}return[]}function Wr(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=_l(s,f),C!=null&&v.unshift(ql(s,C,w))):d||(C=_l(s,f),C!=null&&v.push(ql(s,C,w)))),s=s.return}v.length!==0&&e.push({event:n,listeners:v})}function ng(e,n){pN(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:Xa,possibleRegistrationNames:Ng};El(e)||typeof n.is=="string"||gN(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=Ks(s),Ks(n)!==s&&(o[e]=n))}function rk(e,n,s){n.forEach(function(o){s[jA(o)]=o==="style"?sg(e):e.getAttribute(o)})}function Hi(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===qd||e.namespaceURI===io?e.ownerDocument.createElementNS(e.namespaceURI,e.tagName):e.ownerDocument.createElement(e.tagName),e.innerHTML=n,e.innerHTML}function Ks(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.",wt(e)),dt(e)),(typeof e=="string"?e:""+e).replace(gI,`
221
- `).replace(yI,"")}function FA(e,n){return n=Ks(n),Ks(e)===n}function Md(){}function oe(e,n,s,o,d,f){switch(s){case"children":typeof o=="string"?($u(o,n,!1),n==="body"||n==="textarea"&&o===""||Sl(e,o)):(typeof o=="number"||typeof o=="bigint")&&($u(""+o,n,!1),n!=="body"&&Sl(e,""+o));break;case"className":Nt(e,"class",o);break;case"tabIndex":Nt(e,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":Nt(e,s,o);break;case"style":oS(e,o,f);break;case"data":if(n!=="object"){Nt(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}Q(o,s),o=Al(""+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||Ah||(Ah=!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||Eh||(Eh=!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"||Sh?n!=="button"||d.type==null||d.type==="submit"||Sh?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||Ah||(Ah=!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||Eh||(Eh=!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."))):(Sh=!0,console.error('A button can only specify a formAction along with type="submit" or no type.')):(Sh=!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"&&oe(e,n,"name",d.name,d,null),oe(e,n,"formEncType",d.formEncType,d,null),oe(e,n,"formMethod",d.formMethod,d,null),oe(e,n,"formTarget",d.formTarget,d,null)):(oe(e,n,"encType",d.encType,d,null),oe(e,n,"method",d.method,d,null),oe(e,n,"target",d.target,d,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(s);break}Q(o,s),o=Al(""+o),e.setAttribute(s,o);break;case"onClick":o!=null&&(typeof o!="function"&&Hi(s,o),e.onclick=Md);break;case"onScroll":o!=null&&(typeof o!="function"&&Hi(s,o),Ft("scroll",e));break;case"onScrollEnd":o!=null&&(typeof o!="function"&&Hi(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}Q(o,s),s=Al(""+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"?(Q(o,s),e.setAttribute(s,""+o)):e.removeAttribute(s);break;case"inert":o!==""||_h[s]||(_h[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"?(Q(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?(Q(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):(Q(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,ky,"xml:base",o);break;case"xmlLang":Fe(e,ky,"xml:lang",o);break;case"xmlSpace":Fe(e,ky,"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)):Xa.hasOwnProperty(s)&&o!=null&&typeof o!="function"&&Hi(s,o)}}function ig(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"?Sl(e,o):(typeof o=="number"||typeof o=="bigint")&&Sl(e,""+o);break;case"onScroll":o!=null&&(typeof o!="function"&&Hi(s,o),Ft("scroll",e));break;case"onScrollEnd":o!=null&&(typeof o!="function"&&Hi(s,o),Ft("scrollend",e));break;case"onClick":o!=null&&(typeof o!="function"&&Hi(s,o),e.onclick=Md);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"&&Hi(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[Rn]||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(ng(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:oe(e,n,f,v,s,null)}}d&&oe(e,n,"srcSet",s.srcSet,s,null),o&&oe(e,n,"src",s.src,s,null);return;case"input":ht("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:oe(e,n,o,H,s,null)}}V0(e,s),q0(e,f,E,w,C,v,d,!1),Bu(e);return;case"select":ht("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:oe(e,n,d,E,s,null)}W0(e,s),n=f,s=v,e.multiple=!!o,n!=null?Pr(e,!!o,n,!1):s!=null&&Pr(e,!!o,s,!0);return;case"textarea":ht("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:oe(e,n,v,E,s,null)}Q0(e,s),Z0(e,o,d,f),Bu(e);return;case"option":Y0(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:oe(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<kc.length;o++)Ft(kc[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:oe(e,n,C,o,s,null)}return;default:if(El(n)){for(H in s)s.hasOwnProperty(H)&&(o=s[H],o!==void 0&&ig(e,n,H,o,s,void 0));return}}for(E in s)s.hasOwnProperty(E)&&(o=s[E],o!=null&&oe(e,n,E,o,s,null))}function ok(e,n,s,o){switch(ng(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)||oe(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&&oe(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),Sp(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)||oe(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&&oe(e,n,d,f,o,w)}o=E,n=v,s=q,z!=null?Pr(e,!!n,z,!1):!!s!=!!n&&(o!=null?Pr(e,!!n,o,!0):Pr(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:oe(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&&oe(e,n,v,d,o,f)}K0(e,z,q);return;case"option":for(var lt in s)if(z=s[lt],s.hasOwnProperty(lt)&&z!=null&&!o.hasOwnProperty(lt))switch(lt){case"selected":e.selected=!1;break;default:oe(e,n,lt,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:oe(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 Et in s)z=s[Et],s.hasOwnProperty(Et)&&z!=null&&!o.hasOwnProperty(Et)&&oe(e,n,Et,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:oe(e,n,C,z,o,q)}return;default:if(El(n)){for(var ue in s)z=s[ue],s.hasOwnProperty(ue)&&z!==void 0&&!o.hasOwnProperty(ue)&&ig(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||ig(e,n,H,z,o,q);return}}for(var jt in s)z=s[jt],s.hasOwnProperty(jt)&&z!=null&&!o.hasOwnProperty(jt)&&oe(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||oe(e,n,V,z,o,q)}function jA(e){switch(e){case"class":return"className";case"for":return"htmlFor";default:return e}}function sg(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||X_.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=Ks(o),Ks(n)!==o&&(s.style=sg(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(Q(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 ag(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(Q(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)&&(Q(o,n),e===""+o))return}je(n,e,o,f)}function rg(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(Q(o,n),s=Al(""+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(El(n)){for(var w in s)if(s.hasOwnProperty(w)){var C=s[w];if(C!=null){if(Xa.hasOwnProperty(w))typeof C!="function"&&Hi(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===Rs&&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(Xa.hasOwnProperty(C))typeof w!="function"&&Hi(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}rg(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===bI){f.delete(C.toLowerCase()),je(C,"function",w,d);continue}rg(e,C,C.toLowerCase(),w,f,d);continue;case"xlinkHref":rg(e,C,"xlink:href",w,f,d);continue;case"contentEditable":ag(e,C,"contenteditable",w,f,d);continue;case"spellCheck":ag(e,C,"spellcheck",w,f,d);continue;case"draggable":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":ag(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(Q(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)&&(Q(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!==""||_h[C]||(_h[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===Rs&&n!=="svg"&&n!=="math"?f.delete(E.toLowerCase()):(H=C.toLowerCase(),H=Yd.hasOwnProperty(H)&&Yd[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),Q(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&&rk(e,f,d),Object.keys(d).length===0?null:d}function lk(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 Od(e){return e.nodeType===9?e:e.ownerDocument}function YA(e){switch(e){case io:return Io;case qd:return xh;default:return Rs}}function XA(e,n){if(e===Rs)switch(n){case"svg":return Io;case"math":return xh;default:return Rs}return e===Io&&n==="foreignObject"?Rs:e}function og(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 ck(){var e=window.event;return e&&e.type==="popstate"?e===Uy?!1:(Uy=e,!0):(Uy=null,!1)}function uk(e){setTimeout(function(){throw e})}function dk(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 hk(e,n,s,o){ok(e,n,s,o),e[Rn]=o}function WA(e){Sl(e,"")}function fk(e,n,s){e.nodeValue=s}function Zs(e){return e==="head"}function pk(e,n){e.removeChild(n)}function mk(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===wh){if(0<o&&8>o){s=o;var v=e.ownerDocument;if(s&SI&&Yl(v.documentElement),s&EI&&Yl(v.body),s&AI)for(s=v.head,Yl(s),v=s.firstChild;v;){var E=v.nextSibling,w=v.nodeName;v[tc]||w==="SCRIPT"||w==="STYLE"||w==="LINK"&&v.rel.toLowerCase()==="stylesheet"||s.removeChild(v),v=E}}if(d===0){e.removeChild(f),Kl(n);return}d--}else s===Th||s===Cs||s===Lc?d++:o=s.charCodeAt(0)-48;else o=0;s=f}while(s);Kl(n)}function gk(e){e=e.style,typeof e.setProperty=="function"?e.setProperty("display","none","important"):e.display="none"}function yk(e){e.nodeValue=""}function bk(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 vk(e,n){e.nodeValue=n}function lg(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":lg(s),js(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}e.removeChild(s)}}function Sk(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[tc])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"){Q(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 Ek(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 cg(e){return e.data===Lc||e.data===Cs&&e.ownerDocument.readyState===Mw}function Ak(e,n){var s=e.ownerDocument;if(e.data!==Cs||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===Th||n===Lc||n===Cs||n===Ly||n===Dw)break;if(n===wh)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"?sg(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[vI]!==!0?(e.nodeValue===n?e=null:(n=Ks(n),e=Ks(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===wh){if(n===0)return ti(e.nextSibling);n--}else s!==Th&&s!==Lc&&s!==Cs||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===Th||s===Lc||s===Cs){if(n===0)return e;n--}else s===wh&&n++}e=e.previousSibling}return null}function _k(e){Kl(e)}function Tk(e){Kl(e)}function e_(e,n,s,o,d){switch(d&&xp(e,o.ancestorInfo),n=Od(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 wk(e,n,s,o){if(!s[ia]&&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[Rn]=n}function Yl(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);js(e)}function Nd(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}function n_(e,n,s){var o=Po;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),I(n),o.head.appendChild(n)))}}function i_(e,n,s,o){var d=(d=ea.current)?Nd(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=Qr(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=Qr(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(Xl(e)))&&!f._p&&(v.instance=f,v.state.loading=Ic|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||xk(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`,X(e))})}function zi(e){e!==Lo&&e.next===null&&(Lo===null?yh=Lo=e:Lo=Lo.next=e),bh=!0,G.actQueue!==null?Dy||(Dy=!0,LA()):Ry||(Ry=!0,LA())}function Vl(e,n){if(!My&&bh){My=!0;do for(var s=!1,o=yh;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,kA(o,f))}else f=Bt,f=as(o,o===ce?f:0,o.cancelPendingCommit!==null||o.timeoutHandle!==dr),(f&3)===0||Bs(o,f)||(s=!0,kA(o,f));o=o.next}while(s);My=!1}}function sk(){Qm()}function Qm(){bh=Dy=Ry=!1;var e=0;cr!==0&&(ck()&&(e=cr),cr=0);for(var n=ji(),s=null,o=yh;o!==null;){var d=o.next,f=OA(o,n);f===0?(o.next=null,s===null?yh=d:s.next=d,d===null&&(Lo=s)):(s=o,(e!==0||(f&3)!==0)&&(bh=!0)),o=d}Vl(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]=mp(E,n)):w<=n&&(e.expiredLanes|=E),f&=~E}if(n=ce,s=Bt,s=as(e,e===n?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==dr),o=e.callbackNode,s===0||e===n&&(te===sr||te===ar)||e.cancelPendingCommit!==null)return o!==null&&Km(o),e.callbackNode=null,e.callbackPriority=0;if((s&3)===0||Bs(e,s)){if(n=s&-s,n!==e.callbackPriority||G.actQueue!==null&&o!==Oy)Km(o);else return n;switch(Lr(s)){case ei:case $i:s=Dg;break;case bs:s=to;break;case Gd:s=Mg;break;default:s=to}return o=NA.bind(null,e),G.actQueue!==null?(G.actQueue.push(o),s=Oy):s=Cg(s,o),e.callbackPriority=n,e.callbackNode=s,n}return o!==null&&Km(o),e.callbackPriority=2,e.callbackNode=null,2}function NA(e,n){if(ih=nh=!1,en!==or&&en!==_y)return e.callbackNode=null,e.callbackPriority=0,null;var s=e.callbackNode;if($l()&&e.callbackNode!==s)return null;var o=Bt;return o=as(e,e===ce?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==dr),o===0?null:(hA(e,o,n),OA(e,ji()),e.callbackNode!=null&&e.callbackNode===s?NA.bind(null,e):null)}function kA(e,n){if($l())return null;nh=ih,ih=!1,hA(e,n,!0)}function Km(e){e!==Oy&&e!==null&&Vk(e)}function LA(){G.actQueue!==null&&G.actQueue.push(function(){return Qm(),null}),wI(function(){(Jt&(vn|wi))!==Gn?Cg(Rg,sk):Qm()})}function Zm(){return cr===0&&(cr=Pt()),cr}function IA(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:(Q(e,"action"),Al(""+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 ak(e,n,s,o,d){if(n==="submit"&&s&&s.stateNode===d){var f=IA((d[Rn]||null).action),v=o.submitter;v&&(n=(n=v[Rn]||null)?IA(n.formAction):v.getAttribute("formAction"),n!==null&&(f=n,v=null));var E=new Wd("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),x={pending:!0,data:w,method:d.method,action:f};Object.freeze(x),ym(s,x,null,w)}}else typeof f=="function"&&(E.preventDefault(),w=v?PA(d,v):new FormData(d),x={pending:!0,data:w,method:d.method,action:f},Object.freeze(x),ym(s,x,f,w))},currentTarget:d}]})}}function Rd(e,n,s){e.currentTarget=s;try{n(e)}catch(o){hy(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,x=E.currentTarget;if(E=E.listener,w!==d&&f.isPropagationStopped())break t;w!==null?ft(w,Rd,f,E,x):Rd(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?ft(w,Rd,f,E,x):Rd(f,E,x),d=w}}}}function jt(e,n){Ny.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[Og];s===void 0&&(s=n[Og]=new Set);var o=e+"__bubble";s.has(o)||(zA(n,e,2,!1),s.add(o))}function Jm(e,n,s){Ny.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 tg(e){if(!e[vh]){e[vh]=!0,E_.forEach(function(s){s!=="selectionchange"&&(Ny.has(s)||Jm(s,!1,e),Jm(s,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[vh]||(n[vh]=!0,Jm("selectionchange",!1,n))}}function zA(e,n,s,o){switch(f_(n)){case ei:var d=Ik;break;case $i:d=Pk;break;default:d=mg}s=d.bind(null,n,s,e),d=void 0,!Hg||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 eg(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 x=f,H=Cp(s),V=[];t:{var z=hT.get(e);if(z!==void 0){var q=Wd,lt=e;switch(e){case"keypress":if(Gu(s)===0)break t;case"keydown":case"keyup":q=NL;break;case"focusin":lt="focus",q=$g;break;case"focusout":lt="blur",q=$g;break;case"beforeblur":case"afterblur":q=$g;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=SL;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":q=IL;break;case lT:case cT:case uT:q=_L;break;case dT: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=tT;break;case"toggle":case"beforetoggle":q=jL}var Et=(n&4)!==0,ue=!Et&&(e==="scroll"||e==="scrollend"),Ft=Et?z!==null?z+"Capture":null:z;Et=[];for(var D=x,M;D!==null;){var N=D;if(M=N.stateNode,N=N.tag,N!==5&&N!==26&&N!==27||M===null||Ft===null||(N=_l(D,Ft),N!=null&&Et.push(ql(D,N,M))),ue)break;D=D.return}0<Et.length&&(z=new q(z,lt,null,s,H),V.push({event:z,listeners:Et}))}}if((n&7)===0){t:{if(z=e==="mouseover"||e==="pointerover",q=e==="mouseout"||e==="pointerout",z&&s!==nc&&(lt=s.relatedTarget||s.fromElement)&&(gi(lt)||lt[ia]))break t;if((q||z)&&(z=H.window===H?H:(z=H.ownerDocument)?z.defaultView||z.parentWindow:window,q?(lt=s.relatedTarget||s.toElement,q=x,lt=lt?gi(lt):null,lt!==null&&(ue=R(lt),Et=lt.tag,lt!==ue||Et!==5&&Et!==27&&Et!==6)&&(lt=null)):(q=null,lt=x),q!==lt)){if(Et=Z_,N="onMouseLeave",Ft="onMouseEnter",D="mouse",(e==="pointerout"||e==="pointerover")&&(Et=tT,N="onPointerLeave",Ft="onPointerEnter",D="pointer"),ue=q==null?z:$s(q),M=lt==null?z:$s(lt),z=new Et(N,D+"leave",q,s,H),z.target=ue,z.relatedTarget=M,N=null,gi(H)===x&&(Et=new Et(Ft,D+"enter",lt,s,H),Et.target=M,Et.relatedTarget=ue,N=Et),ue=N,q&&lt)e:{for(Et=q,Ft=lt,D=0,M=Et;M;M=Wr(M))D++;for(M=0,N=Ft;N;N=Wr(N))M++;for(;0<D-M;)Et=Wr(Et),D--;for(;0<M-D;)Ft=Wr(Ft),M--;for(;D--;){if(Et===Ft||Ft!==null&&Et===Ft.alternate)break e;Et=Wr(Et),Ft=Wr(Ft)}Et=null}else Et=null;q!==null&&HA(V,z,q,Et,!1),lt!==null&&ue!==null&&HA(V,ue,lt,Et,!0)}}t:{if(z=x?$s(x):window,q=z.nodeName&&z.nodeName.toLowerCase(),q==="select"||q==="input"&&z.type==="file")var Y=yS;else if(mS(z))if(rT)Y=wN;else{Y=_N;var nt=AN}else q=z.nodeName,!q||q.toLowerCase()!=="input"||z.type!=="checkbox"&&z.type!=="radio"?x&&El(x.elementType)&&(Y=yS):Y=TN;if(Y&&(Y=Y(e,x))){gS(V,Y,s,H);break t}nt&&nt(e,z,x),e==="focusout"&&x&&z.type==="number"&&x.memoizedProps.value!=null&&Ep(z,"number",z.value)}switch(nt=x?$s(x):window,e){case"focusin":(mS(nt)||nt.contentEditable==="true")&&(lo=nt,Vg=x,cc=null);break;case"focusout":cc=Vg=lo=null;break;case"mousedown":qg=!0;break;case"contextmenu":case"mouseup":case"dragend":qg=!1,TS(V,s,H);break;case"selectionchange":if(VL)break;case"keydown":case"keyup":TS(V,s,H)}var Rt;if(Gg)t:{switch(e){case"compositionstart":var ct="onCompositionStart";break t;case"compositionend":ct="onCompositionEnd";break t;case"compositionupdate":ct="onCompositionUpdate";break t}ct=void 0}else oo?fS(e,s)&&(ct="onCompositionEnd"):e==="keydown"&&s.keyCode===eT&&(ct="onCompositionStart");ct&&(nT&&s.locale!=="ko"&&(oo||ct!=="onCompositionStart"?ct==="onCompositionEnd"&&oo&&(Rt=dS()):(sa=H,Bg="value"in sa?sa.value:sa.textContent,oo=!0)),nt=Dd(x,ct),0<nt.length&&(ct=new J_(ct,e,null,s,H),V.push({event:ct,listeners:nt}),Rt?ct.data=Rt:(Rt=pS(s),Rt!==null&&(ct.data=Rt)))),(Rt=$L?bN(e,s):vN(e,s))&&(ct=Dd(x,"onBeforeInput"),0<ct.length&&(nt=new CL("onBeforeInput","beforeinput",null,s,H),V.push({event:nt,listeners:ct}),nt.data=Rt)),ak(V,e,x,s,H)}UA(V,n)})}function ql(e,n,s){return{instance:e,listener:n,currentTarget:s}}function Dd(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=_l(e,s),d!=null&&o.unshift(ql(e,d,f)),d=_l(e,n),d!=null&&o.push(ql(e,d,f))),e.tag===3)return o;e=e.return}return[]}function Wr(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,x=E.stateNode;if(E=E.tag,w!==null&&w===o)break;E!==5&&E!==26&&E!==27||x===null||(w=x,d?(x=_l(s,f),x!=null&&v.unshift(ql(s,x,w))):d||(x=_l(s,f),x!=null&&v.push(ql(s,x,w)))),s=s.return}v.length!==0&&e.push({event:n,listeners:v})}function ng(e,n){pN(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:Xa,possibleRegistrationNames:Ng};El(e)||typeof n.is=="string"||gN(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 Fe(e,n,s,o){n!==s&&(s=Ks(s),Ks(n)!==s&&(o[e]=n))}function rk(e,n,s){n.forEach(function(o){s[FA(o)]=o==="style"?sg(e):e.getAttribute(o)})}function Hi(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===qd||e.namespaceURI===io?e.ownerDocument.createElementNS(e.namespaceURI,e.tagName):e.ownerDocument.createElement(e.tagName),e.innerHTML=n,e.innerHTML}function Ks(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.",wt(e)),dt(e)),(typeof e=="string"?e:""+e).replace(gI,`
221
+ `).replace(yI,"")}function jA(e,n){return n=Ks(n),Ks(e)===n}function Md(){}function oe(e,n,s,o,d,f){switch(s){case"children":typeof o=="string"?($u(o,n,!1),n==="body"||n==="textarea"&&o===""||Sl(e,o)):(typeof o=="number"||typeof o=="bigint")&&($u(""+o,n,!1),n!=="body"&&Sl(e,""+o));break;case"className":Nt(e,"class",o);break;case"tabIndex":Nt(e,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":Nt(e,s,o);break;case"style":oS(e,o,f);break;case"data":if(n!=="object"){Nt(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}Q(o,s),o=Al(""+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||Ah||(Ah=!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||Eh||(Eh=!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"||Sh?n!=="button"||d.type==null||d.type==="submit"||Sh?typeof o=="function"&&(d.name==null||C1||(C1=!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||Ah||(Ah=!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||Eh||(Eh=!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."))):(Sh=!0,console.error('A button can only specify a formAction along with type="submit" or no type.')):(Sh=!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"&&oe(e,n,"name",d.name,d,null),oe(e,n,"formEncType",d.formEncType,d,null),oe(e,n,"formMethod",d.formMethod,d,null),oe(e,n,"formTarget",d.formTarget,d,null)):(oe(e,n,"encType",d.encType,d,null),oe(e,n,"method",d.method,d,null),oe(e,n,"target",d.target,d,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(s);break}Q(o,s),o=Al(""+o),e.setAttribute(s,o);break;case"onClick":o!=null&&(typeof o!="function"&&Hi(s,o),e.onclick=Md);break;case"onScroll":o!=null&&(typeof o!="function"&&Hi(s,o),jt("scroll",e));break;case"onScrollEnd":o!=null&&(typeof o!="function"&&Hi(s,o),jt("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}Q(o,s),s=Al(""+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"?(Q(o,s),e.setAttribute(s,""+o)):e.removeAttribute(s);break;case"inert":o!==""||_h[s]||(_h[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"?(Q(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?(Q(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):(Q(o,s),e.setAttribute(s,o));break;case"popover":jt("beforetoggle",e),jt("toggle",e),qt(e,"popover",o);break;case"xlinkActuate":je(e,ur,"xlink:actuate",o);break;case"xlinkArcrole":je(e,ur,"xlink:arcrole",o);break;case"xlinkRole":je(e,ur,"xlink:role",o);break;case"xlinkShow":je(e,ur,"xlink:show",o);break;case"xlinkTitle":je(e,ur,"xlink:title",o);break;case"xlinkType":je(e,ur,"xlink:type",o);break;case"xmlBase":je(e,ky,"xml:base",o);break;case"xmlLang":je(e,ky,"xml:lang",o);break;case"xmlSpace":je(e,ky,"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":R1||o==null||typeof o!="object"||(R1=!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)):Xa.hasOwnProperty(s)&&o!=null&&typeof o!="function"&&Hi(s,o)}}function ig(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"?Sl(e,o):(typeof o=="number"||typeof o=="bigint")&&Sl(e,""+o);break;case"onScroll":o!=null&&(typeof o!="function"&&Hi(s,o),jt("scroll",e));break;case"onScrollEnd":o!=null&&(typeof o!="function"&&Hi(s,o),jt("scrollend",e));break;case"onClick":o!=null&&(typeof o!="function"&&Hi(s,o),e.onclick=Md);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"&&Hi(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[Rn]||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(ng(n,s),n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":jt("error",e),jt("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:oe(e,n,f,v,s,null)}}d&&oe(e,n,"srcSet",s.srcSet,s,null),o&&oe(e,n,"src",s.src,s,null);return;case"input":ht("input",s),jt("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:oe(e,n,o,H,s,null)}}V0(e,s),q0(e,f,E,w,x,v,d,!1),Bu(e);return;case"select":ht("select",s),jt("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:oe(e,n,d,E,s,null)}W0(e,s),n=f,s=v,e.multiple=!!o,n!=null?Pr(e,!!o,n,!1):s!=null&&Pr(e,!!o,s,!0);return;case"textarea":ht("textarea",s),jt("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:oe(e,n,v,E,s,null)}Q0(e,s),Z0(e,o,d,f),Bu(e);return;case"option":Y0(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:oe(e,n,w,o,s,null)}return;case"dialog":jt("beforetoggle",e),jt("toggle",e),jt("cancel",e),jt("close",e);break;case"iframe":case"object":jt("load",e);break;case"video":case"audio":for(o=0;o<kc.length;o++)jt(kc[o],e);break;case"image":jt("error",e),jt("load",e);break;case"details":jt("toggle",e);break;case"embed":case"source":case"link":jt("error",e),jt("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:oe(e,n,x,o,s,null)}return;default:if(El(n)){for(H in s)s.hasOwnProperty(H)&&(o=s[H],o!==void 0&&ig(e,n,H,o,s,void 0));return}}for(E in s)s.hasOwnProperty(E)&&(o=s[E],o!=null&&oe(e,n,E,o,s,null))}function ok(e,n,s,o){switch(ng(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)||oe(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&&oe(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||x1||(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"),x1=!0),!n||o||w1||(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"),w1=!0),Sp(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)||oe(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&&oe(e,n,d,f,o,w)}o=E,n=v,s=q,z!=null?Pr(e,!!n,z,!1):!!s!=!!n&&(o!=null?Pr(e,!!n,o,!0):Pr(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:oe(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&&oe(e,n,v,d,o,f)}K0(e,z,q);return;case"option":for(var lt in s)if(z=s[lt],s.hasOwnProperty(lt)&&z!=null&&!o.hasOwnProperty(lt))switch(lt){case"selected":e.selected=!1;break;default:oe(e,n,lt,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:oe(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 Et in s)z=s[Et],s.hasOwnProperty(Et)&&z!=null&&!o.hasOwnProperty(Et)&&oe(e,n,Et,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:oe(e,n,x,z,o,q)}return;default:if(El(n)){for(var ue in s)z=s[ue],s.hasOwnProperty(ue)&&z!==void 0&&!o.hasOwnProperty(ue)&&ig(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||ig(e,n,H,z,o,q);return}}for(var Ft in s)z=s[Ft],s.hasOwnProperty(Ft)&&z!=null&&!o.hasOwnProperty(Ft)&&oe(e,n,Ft,null,o,z);for(V in o)z=o[V],q=s[V],!o.hasOwnProperty(V)||z===q||z==null&&q==null||oe(e,n,V,z,o,q)}function FA(e){switch(e){case"class":return"className";case"for":return"htmlFor";default:return e}}function sg(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||X_.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=Ks(o),Ks(n)!==o&&(s.style=sg(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(Q(o,n),e===""+o)return}Fe(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}Fe(n,e,o,f)}function ag(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(Q(o,s),e===""+o)return}Fe(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)&&(Q(o,n),e===""+o))return}Fe(n,e,o,f)}function rg(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(Q(o,n),s=Al(""+o),e===s)return}Fe(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(El(n)){for(var w in s)if(s.hasOwnProperty(w)){var x=s[w];if(x!=null){if(Xa.hasOwnProperty(w))typeof x!="function"&&Hi(w,x);else if(s.suppressHydrationWarning!==!0)switch(w){case"children":typeof x!="string"&&typeof x!="number"||Fe("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=BA(e,x),Fe(w,v,x,d));continue;case"style":f.delete(w),$A(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),Fe("className",v,x,d);continue;default:o.context===Rs&&n!=="svg"&&n!=="math"?f.delete(w.toLowerCase()):f.delete(w),v=Ot(e,w,x),Fe(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"&&Hi(x,w);else if(s.suppressHydrationWarning!==!0)switch(x){case"children":typeof w!="string"&&typeof w!="number"||Fe("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[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),$A(e,w,d);continue;case"multiple":f.delete(x),Fe(x,e.multiple,w,d);continue;case"muted":f.delete(x),Fe(x,e.muted,w,d);continue;case"autoFocus":f.delete("autofocus"),Fe(x,e.autofocus,w,d);continue;case"data":if(n!=="object"){f.delete(x),v=e.getAttribute("data"),Fe(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}rg(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()),Fe(x,"function",w,d);continue}rg(e,x,x.toLowerCase(),w,f,d);continue;case"xlinkHref":rg(e,x,"xlink:href",w,f,d);continue;case"contentEditable":ag(e,x,"contenteditable",w,f,d);continue;case"spellCheck":ag(e,x,"spellcheck",w,f,d);continue;case"draggable":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":ag(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":GA(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(Q(w,v),E===""+w)break t}Fe(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)&&(Q(w,v),E===""+w))break t}Fe(v,E,w,V)}continue;case"rowSpan":VA(e,x,"rowspan",w,f,d);continue;case"start":VA(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!==""||_h[x]||(_h[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)),GA(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=lS(x),v=!1,o.context===Rs&&n!=="svg"&&n!=="math"?f.delete(E.toLowerCase()):(H=x.toLowerCase(),H=Yd.hasOwnProperty(H)&&Yd[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),Q(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||Fe(x,E,w,d)}}}return 0<f.size&&s.suppressHydrationWarning!==!0&&rk(e,f,d),Object.keys(d).length===0?null:d}function lk(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 Od(e){return e.nodeType===9?e:e.ownerDocument}function YA(e){switch(e){case io:return Io;case qd:return xh;default:return Rs}}function XA(e,n){if(e===Rs)switch(n){case"svg":return Io;case"math":return xh;default:return Rs}return e===Io&&n==="foreignObject"?Rs:e}function og(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 ck(){var e=window.event;return e&&e.type==="popstate"?e===Uy?!1:(Uy=e,!0):(Uy=null,!1)}function uk(e){setTimeout(function(){throw e})}function dk(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 hk(e,n,s,o){ok(e,n,s,o),e[Rn]=o}function WA(e){Sl(e,"")}function fk(e,n,s){e.nodeValue=s}function Zs(e){return e==="head"}function pk(e,n){e.removeChild(n)}function mk(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===wh){if(0<o&&8>o){s=o;var v=e.ownerDocument;if(s&SI&&Yl(v.documentElement),s&EI&&Yl(v.body),s&AI)for(s=v.head,Yl(s),v=s.firstChild;v;){var E=v.nextSibling,w=v.nodeName;v[tc]||w==="SCRIPT"||w==="STYLE"||w==="LINK"&&v.rel.toLowerCase()==="stylesheet"||s.removeChild(v),v=E}}if(d===0){e.removeChild(f),Kl(n);return}d--}else s===Th||s===Cs||s===Lc?d++:o=s.charCodeAt(0)-48;else o=0;s=f}while(s);Kl(n)}function gk(e){e=e.style,typeof e.setProperty=="function"?e.setProperty("display","none","important"):e.display="none"}function yk(e){e.nodeValue=""}function bk(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 vk(e,n){e.nodeValue=n}function lg(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":lg(s),Fs(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}e.removeChild(s)}}function Sk(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[tc])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"){Q(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 Ek(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 cg(e){return e.data===Lc||e.data===Cs&&e.ownerDocument.readyState===M1}function Ak(e,n){var s=e.ownerDocument;if(e.data!==Cs||s.readyState===M1)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===Th||n===Lc||n===Cs||n===Ly||n===D1)break;if(n===wh)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[FA(f.name)]=f.name.toLowerCase()==="style"?sg(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[vI]!==!0?(e.nodeValue===n?e=null:(n=Ks(n),e=Ks(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===wh){if(n===0)return ti(e.nextSibling);n--}else s!==Th&&s!==Lc&&s!==Cs||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===Th||s===Lc||s===Cs){if(n===0)return e;n--}else s===wh&&n++}e=e.previousSibling}return null}function _k(e){Kl(e)}function Tk(e){Kl(e)}function e_(e,n,s,o,d){switch(d&&xp(e,o.ancestorInfo),n=Od(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 wk(e,n,s,o){if(!s[ia]&&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[Rn]=n}function Yl(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);Fs(e)}function Nd(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}function n_(e,n,s){var o=Po;if(o&&typeof n=="string"&&n){var d=Zn(n);d='link[rel="'+e+'"][href="'+d+'"]',typeof s=="string"&&(d+='[crossorigin="'+s+'"]'),P1.has(d)||(P1.add(d),e={rel:e,crossOrigin:s,href:n},o.querySelector(d)===null&&(n=o.createElement("link"),Ke(n,"link",e),I(n),o.head.appendChild(n)))}}function i_(e,n,s,o){var d=(d=ea.current)?Nd(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=Qr(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=Qr(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(Xl(e)))&&!f._p&&(v.instance=f,v.state.loading=Ic|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||xk(d,e,E,v.state)}if(n&&o===null)throw s=`
222
222
 
223
223
  - `+kd(n)+`
224
224
  + `+kd(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
226
  - `+kd(n)+`
227
- + `+kd(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=Kr(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 kd(e){var n=0,s="<link";return typeof e.rel=="string"?(n++,s+=' rel="'+e.rel+'"'):ys.call(e,"rel")&&(n++,s+=' rel="'+(e.rel===null?"null":"invalid type "+typeof e.rel)+'"'),typeof e.href=="string"?(n++,s+=' href="'+e.href+'"'):ys.call(e,"href")&&(n++,s+=' href="'+(e.href===null?"null":"invalid type "+typeof e.href)+'"'),typeof e.precedence=="string"?(n++,s+=' precedence="'+e.precedence+'"'):ys.call(e,"precedence")&&(n++,s+=" precedence={"+(e.precedence===null?"null":"invalid type "+typeof e.precedence)+"}"),Object.getOwnPropertyNames(e).length>n&&(s+=" ..."),s+" />"}function Qr(e){return'href="'+Zn(e)+'"'}function Xl(e){return'link[rel="stylesheet"]['+e+"]"}function s_(e){return It({},e,{"data-precedence":e.precedence,precedence:null})}function xk(e,n,s,o){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?o.loading=Ic:(n=e.createElement("link"),o.preload=n,n.addEventListener("load",function(){return o.loading|=Ic}),n.addEventListener("error",function(){return o.loading|=Lw}),Ke(n,"link",s),I(n),e.head.appendChild(n))}function Kr(e){return'[src="'+Zn(e)+'"]'}function Wl(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,I(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"),I(o),Ke(o,"style",d),Ld(o,s.precedence,e),n.instance=o;case"stylesheet":d=Qr(s.href);var f=e.querySelector(Xl(d));if(f)return n.state.loading|=di,n.instance=f,I(f),f;o=s_(s),(d=hi.get(d))&&ug(o,d),f=(e.ownerDocument||e).createElement("link"),I(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,Ld(f,s.precedence,e),n.instance=f;case"script":return f=Kr(s.src),(d=e.querySelector(Wl(f)))?(n.instance=d,I(d),d):(o=s,(d=hi.get(f))&&(o=It({},s),dg(o,d)),e=e.ownerDocument||e,d=e.createElement("script"),I(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,Ld(o,s.precedence,e));return n.instance}function Ld(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 ug(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function dg(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(Ch===null){var o=new Map,d=Ch=new Map;d.set(s,o)}else d=Ch,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[tc]||f[rn]||e==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!==io){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 Ck(e,n,s){var o=!s.ancestorInfo.containerTagInScope;if(s.context===Io||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=lk(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 Rk(){}function Dk(e,n,s){if(Pc===null)throw Error("Internal React Error: suspendedState null when it was expected to exists. Please report this as a React bug.");var o=Pc;if(n.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(n.state.loading&di)===hr){if(n.instance===null){var d=Qr(s.href),f=e.querySelector(Xl(d));if(f){e=f._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(o.count++,o=Id.bind(o),e.then(o,o)),n.state.loading|=di,n.instance=f,I(f);return}f=e.ownerDocument||e,s=s_(s),(d=hi.get(d))&&ug(s,d),f=f.createElement("link"),I(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=Id.bind(o),e.addEventListener("load",n),e.addEventListener("error",n))}}function Mk(){if(Pc===null)throw Error("Internal React Error: suspendedState null when it was expected to exists. Please report this as a React bug.");var e=Pc;return e.stylesheets&&e.count===0&&hg(e,e.stylesheets),0<e.count?function(n){var s=setTimeout(function(){if(e.stylesheets&&hg(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 Id(){if(this.count--,this.count===0){if(this.stylesheets)hg(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}function hg(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Rh=new Map,n.forEach(Ok,e),Rh=null,Id.call(e))}function Ok(e,n){if(!(n.state.loading&di)){var s=Rh.get(e);if(s)var o=s.get(Hy);else{s=new Map,Rh.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(Hy,o)}d=n.instance,v=d.getAttribute("data-precedence"),f=s.get(v)||o,f===o&&s.set(Hy,d),s.set(v,d),this.count++,o=Id.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 Nk(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 Nk(e,n,s,v,E,w,C,V),n=WL,f===!0&&(n|=on|Ei),Si&&(n|=Je),f=b(3,null,null,n),e.current=f,f.stateNode=e,n=jp(),ja(n),e.pooledCache=n,ja(n),f.memoizedState={element:o,isDehydrated:s,cache:n},qp(f),e}function u_(e){return e?(e=aa,e):aa}function fg(e,n,s,o,d,f){if(an&&typeof an.onScheduleFiberRoot=="function")try{an.onScheduleFiberRoot(eo,o,s)}catch(v){ji||(ji=!0,console.error("React instrumentation encountered an error: %s",v))}at!==null&&typeof at.markRenderScheduled=="function"&&at.markRenderScheduled(n),d=u_(d),o.context===null?o.context=d:o.pendingContext=d,Gi&&$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.
227
+ + `+kd(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=Kr(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 kd(e){var n=0,s="<link";return typeof e.rel=="string"?(n++,s+=' rel="'+e.rel+'"'):ys.call(e,"rel")&&(n++,s+=' rel="'+(e.rel===null?"null":"invalid type "+typeof e.rel)+'"'),typeof e.href=="string"?(n++,s+=' href="'+e.href+'"'):ys.call(e,"href")&&(n++,s+=' href="'+(e.href===null?"null":"invalid type "+typeof e.href)+'"'),typeof e.precedence=="string"?(n++,s+=' precedence="'+e.precedence+'"'):ys.call(e,"precedence")&&(n++,s+=" precedence={"+(e.precedence===null?"null":"invalid type "+typeof e.precedence)+"}"),Object.getOwnPropertyNames(e).length>n&&(s+=" ..."),s+" />"}function Qr(e){return'href="'+Zn(e)+'"'}function Xl(e){return'link[rel="stylesheet"]['+e+"]"}function s_(e){return It({},e,{"data-precedence":e.precedence,precedence:null})}function xk(e,n,s,o){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?o.loading=Ic:(n=e.createElement("link"),o.preload=n,n.addEventListener("load",function(){return o.loading|=Ic}),n.addEventListener("error",function(){return o.loading|=L1}),Ke(n,"link",s),I(n),e.head.appendChild(n))}function Kr(e){return'[src="'+Zn(e)+'"]'}function Wl(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,I(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"),I(o),Ke(o,"style",d),Ld(o,s.precedence,e),n.instance=o;case"stylesheet":d=Qr(s.href);var f=e.querySelector(Xl(d));if(f)return n.state.loading|=di,n.instance=f,I(f),f;o=s_(s),(d=hi.get(d))&&ug(o,d),f=(e.ownerDocument||e).createElement("link"),I(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,Ld(f,s.precedence,e),n.instance=f;case"script":return f=Kr(s.src),(d=e.querySelector(Wl(f)))?(n.instance=d,I(d),d):(o=s,(d=hi.get(f))&&(o=It({},s),dg(o,d)),e=e.ownerDocument||e,d=e.createElement("script"),I(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,Ld(o,s.precedence,e));return n.instance}function Ld(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 ug(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function dg(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(Ch===null){var o=new Map,d=Ch=new Map;d.set(s,o)}else d=Ch,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[tc]||f[rn]||e==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!==io){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 Ck(e,n,s){var o=!s.ancestorInfo.containerTagInScope;if(s.context===Io||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=lk(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&I1)===hr)}function Rk(){}function Dk(e,n,s){if(Pc===null)throw Error("Internal React Error: suspendedState null when it was expected to exists. Please report this as a React bug.");var o=Pc;if(n.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(n.state.loading&di)===hr){if(n.instance===null){var d=Qr(s.href),f=e.querySelector(Xl(d));if(f){e=f._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(o.count++,o=Id.bind(o),e.then(o,o)),n.state.loading|=di,n.instance=f,I(f);return}f=e.ownerDocument||e,s=s_(s),(d=hi.get(d))&&ug(s,d),f=f.createElement("link"),I(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&I1)===hr&&(o.count++,n=Id.bind(o),e.addEventListener("load",n),e.addEventListener("error",n))}}function Mk(){if(Pc===null)throw Error("Internal React Error: suspendedState null when it was expected to exists. Please report this as a React bug.");var e=Pc;return e.stylesheets&&e.count===0&&hg(e,e.stylesheets),0<e.count?function(n){var s=setTimeout(function(){if(e.stylesheets&&hg(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 Id(){if(this.count--,this.count===0){if(this.stylesheets)hg(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}function hg(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Rh=new Map,n.forEach(Ok,e),Rh=null,Id.call(e))}function Ok(e,n){if(!(n.state.loading&di)){var s=Rh.get(e);if(s)var o=s.get(Hy);else{s=new Map,Rh.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(Hy,o)}d=n.instance,v=d.getAttribute("data-precedence"),f=s.get(v)||o,f===o&&s.set(Hy,d),s.set(v,d),this.count++,o=Id.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 Nk(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,x,H,V){return e=new Nk(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=Fp(),Fa(n),e.pooledCache=n,Fa(n),f.memoizedState={element:o,isDehydrated:s,cache:n},qp(f),e}function u_(e){return e?(e=aa,e):aa}function fg(e,n,s,o,d,f){if(an&&typeof an.onScheduleFiberRoot=="function")try{an.onScheduleFiberRoot(eo,o,s)}catch(v){Fi||(Fi=!0,console.error("React instrumentation encountered an error: %s",v))}at!==null&&typeof at.markRenderScheduled=="function"&&at.markRenderScheduled(n),d=u_(d),o.context===null?o.context=d:o.pendingContext=d,Gi&&$n!==null&&!B1&&(B1=!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=Vs(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=qs(e,o,n),s!==null&&(xe(s,e,n),Ol(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 pg(e,n){d_(e,n),(e=e.alternate)&&d_(e,n)}function h_(e){if(e.tag===13){var n=wn(e,67108864);n!==null&&xe(n,e,67108864),pg(e,67108864)}}function kk(){return $n}function Lk(){for(var e=new Map,n=1,s=0;31>s;s++){var o=hl(n);e.set(n,o),n*=2}return e}function Ik(e,n,s,o){var d=G.T;G.T=null;var f=Zt.p;try{Zt.p=ei,mg(e,n,s,o)}finally{Zt.p=f,G.T=d}}function Pk(e,n,s,o){var d=G.T;G.T=null;var f=Zt.p;try{Zt.p=$i,mg(e,n,s,o)}finally{Zt.p=f,G.T=d}}function mg(e,n,s,o){if(Mh){var d=gg(o);if(d===null)eg(e,n,o,Oh,s),p_(e,o);else if(Uk(d,e,n,s,o))o.stopPropagation();else if(p_(e,o),n&4&&-1<CI.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=ke(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}zi(f),(Jt&(vn|wi))===Gn&&(ph=Fi()+bw,Vl(0))}}break;case 13:E=wn(f,2),E!==null&&xe(E,f,2),qr(),pg(f,2)}if(f=gg(o),f===null&&eg(e,n,o,Oh,s),f===d)break;d=f}d!==null&&o.stopPropagation()}else eg(e,n,o,null,s)}}function gg(e){return e=Cp(e),yg(e)}function yg(e){if(Oh=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 Oh=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 $i;case"message":switch(Xk()){case Rg:return ei;case Dg:return $i;case to:case Wk:return bs;case Mg:return Gd;default:return bs}default:return bs}}function p_(e,n){switch(e){case"focusin":case"focusout":ma=null;break;case"dragenter":case"dragleave":ga=null;break;case"mouseover":case"mouseout":ya=null;break;case"pointerover":case"pointerout":zc.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Hc.delete(n.pointerId)}}function Ql(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 Uk(e,n,s,o,d){switch(n){case"focusin":return ma=Ql(ma,e,n,s,o,d),!0;case"dragenter":return ga=Ql(ga,e,n,s,o,d),!0;case"mouseover":return ya=Ql(ya,e,n,s,o,d),!0;case"pointerover":var f=d.pointerId;return zc.set(f,Ql(zc.get(f)||null,e,n,s,o,d)),!0;case"gotpointercapture":return f=d.pointerId,Hc.set(f,Ql(Hc.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,Ir(e.priority,function(){if(s.tag===13){var o=Fn(s);o=pl(o);var d=wn(s,o);d!==null&&xe(d,s,o),pg(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 Pd(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var s=gg(e.nativeEvent);if(s===null){s=e.nativeEvent;var o=new s.constructor(s.type,s),d=o;nc!==null&&console.error("Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue."),nc=d,s.target.dispatchEvent(o),nc===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."),nc=null}else return n=yi(s),n!==null&&h_(n),e.blockedOn=s,!1;n.shift()}return!0}function g_(e,n,s){Pd(e)&&s.delete(n)}function zk(){By=!1,ma!==null&&Pd(ma)&&(ma=null),ga!==null&&Pd(ga)&&(ga=null),ya!==null&&Pd(ya)&&(ya=null),zc.forEach(g_),Hc.forEach(g_)}function Ud(e,n){e.blockedOn===n&&(e.blockedOn=null,By||(By=!0,Le.unstable_scheduleCallback(Le.unstable_NormalPriority,zk)))}function y_(e){Nh!==e&&(Nh=e,Le.unstable_scheduleCallback(Le.unstable_NormalPriority,function(){Nh===e&&(Nh=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(yg(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),ym(f,s,o,d))}}))}function Kl(e){function n(w){return Ud(w,e)}ma!==null&&Ud(ma,e),ga!==null&&Ud(ga,e),ya!==null&&Ud(ya,e),zc.forEach(n),Hc.forEach(n);for(var s=0;s<ba.length;s++){var o=ba[s];o.blockedOn===e&&(o.blockedOn=null)}for(;0<ba.length&&(s=ba[0],s.blockedOn===null);)m_(s),s.blockedOn===null&&ba.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[Rn]||null;if(typeof f=="function")v||y_(s);else if(v){var E=null;if(f&&f.hasAttribute("formAction")){if(d=f,v=f[Rn]||null)E=v.formAction;else if(yg(d)!==null)continue}else E=v.action;typeof E=="function"?s[o+1]=E:(s.splice(o,3),o-=3),y_(s)}}}function bg(e){this._internalRoot=e}function zd(e){this._internalRoot=e}function b_(e){e[ia]&&(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(),vg=pu(),Hk=ZD(),It=Object.assign,Bk=Symbol.for("react.element"),Js=Symbol.for("react.transitional.element"),Zr=Symbol.for("react.portal"),Jr=Symbol.for("react.fragment"),Hd=Symbol.for("react.strict_mode"),Sg=Symbol.for("react.profiler"),Fk=Symbol.for("react.provider"),Eg=Symbol.for("react.consumer"),Bi=Symbol.for("react.context"),Zl=Symbol.for("react.forward_ref"),Ag=Symbol.for("react.suspense"),_g=Symbol.for("react.suspense_list"),Bd=Symbol.for("react.memo"),jn=Symbol.for("react.lazy"),Tg=Symbol.for("react.activity"),jk=Symbol.for("react.memo_cache_sentinel"),v_=Symbol.iterator,$k=Symbol.for("react.client.reference"),Ze=Array.isArray,G=vg.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Zt=Hk.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Gk=Object.freeze({pending:!1,data:null,method:null,action:null}),wg=[],xg=[],gs=-1,ta=st(null),Jl=st(null),ea=st(null),Fd=st(null),ys=Object.prototype.hasOwnProperty,Cg=Le.unstable_scheduleCallback,Vk=Le.unstable_cancelCallback,qk=Le.unstable_shouldYield,Yk=Le.unstable_requestPaint,Fi=Le.unstable_now,Xk=Le.unstable_getCurrentPriorityLevel,Rg=Le.unstable_ImmediatePriority,Dg=Le.unstable_UserBlockingPriority,to=Le.unstable_NormalPriority,Wk=Le.unstable_LowPriority,Mg=Le.unstable_IdlePriority,Qk=Le.log,Kk=Le.unstable_setDisableYieldValue,eo=null,an=null,at=null,ji=!1,Si=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u",pn=Math.clz32?Math.clz32:Nr,Zk=Math.log,Jk=Math.LN2,jd=256,$d=4194304,ei=2,$i=8,bs=32,Gd=268435456,na=Math.random().toString(36).slice(2),rn="__reactFiber$"+na,Rn="__reactProps$"+na,ia="__reactContainer$"+na,Og="__reactEvents$"+na,tL="__reactListeners$"+na,eL="__reactHandles$"+na,S_="__reactResources$"+na,tc="__reactMarker$"+na,E_=new Set,Xa={},Ng={},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]*$"),A_={},__={},ec=0,T_,w_,x_,C_,R_,D_,M_;rs.__reactDisabledLog=!0;var kg,O_,Lg=!1,Ig=new(typeof WeakMap=="function"?WeakMap:Map),$n=null,Gi=!1,sL=/[\n"\\]/g,N_=!1,k_=!1,L_=!1,I_=!1,P_=!1,U_=!1,z_=["value","defaultValue"],H_=!1,B_=/["'&<>\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(" "),F_="applet caption html table td th marquee object template foreignObject desc title".split(" "),rL=F_.concat(["button"]),oL="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},Vd={},Pg={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-/,lL=/^(?:webkit|moz|o)[A-Z]/,cL=/^-ms-/,uL=/-(.)/g,V_=/;\s*$/,no={},Ug={},q_=!1,Y_=!1,X_=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(" ")),qd="http://www.w3.org/1998/Math/MathML",io="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"]]),Yd={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},so={},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]*$"),Q_=!1,mn={},K_=/^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,nc=null,ao=null,ro=null,zg=!1,Vi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Hg=!1;if(Vi)try{var ic={};Object.defineProperty(ic,"passive",{get:function(){Hg=!0}}),window.addEventListener("test",ic,ic),window.removeEventListener("test",ic,ic)}catch{Hg=!1}var sa=null,Bg=null,Xd=null,Wa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Wd=Tn(Wa),sc=It({},Wa,{view:0,detail:0}),bL=Tn(sc),Fg,jg,ac,Qd=It({},sc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Rp,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!==ac&&(ac&&e.type==="mousemove"?(Fg=e.screenX-ac.screenX,jg=e.screenY-ac.screenY):jg=Fg=0,ac=e),Fg)},movementY:function(e){return"movementY"in e?e.movementY:jg}}),Z_=Tn(Qd),vL=It({},Qd,{dataTransfer:0}),SL=Tn(vL),EL=It({},sc,{relatedTarget:0}),$g=Tn(EL),AL=It({},Wa,{animationName:0,elapsedTime:0,pseudoElement:0}),_L=Tn(AL),TL=It({},Wa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),wL=Tn(TL),xL=It({},Wa,{data:0}),J_=Tn(xL),CL=J_,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({},sc,{key:function(e){if(e.key){var n=RL[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=Gu(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:Rp,charCode:function(e){return e.type==="keypress"?Gu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Gu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),NL=Tn(OL),kL=It({},Qd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),tT=Tn(kL),LL=It({},sc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Rp}),IL=Tn(LL),PL=It({},Wa,{propertyName:0,elapsedTime:0,pseudoElement:0}),UL=Tn(PL),zL=It({},Qd,{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=Tn(zL),BL=It({},Wa,{newState:0,oldState:0}),FL=Tn(BL),jL=[9,13,27,32],eT=229,Gg=Vi&&"CompositionEvent"in window,rc=null;Vi&&"documentMode"in document&&(rc=document.documentMode);var $L=Vi&&"TextEvent"in window&&!rc,nT=Vi&&(!Gg||rc&&8<rc&&11>=rc),iT=32,sT=String.fromCharCode(iT),aT=!1,oo=!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},oc=null,lc=null,rT=!1;Vi&&(rT=SN("input")&&(!document.documentMode||9<document.documentMode));var gn=typeof Object.is=="function"?Object.is:xN,VL=Vi&&"documentMode"in document&&11>=document.documentMode,lo=null,Vg=null,cc=null,qg=!1,co={animationend:ka("Animation","AnimationEnd"),animationiteration:ka("Animation","AnimationIteration"),animationstart:ka("Animation","AnimationStart"),transitionrun:ka("Transition","TransitionRun"),transitionstart:ka("Transition","TransitionStart"),transitioncancel:ka("Transition","TransitionCancel"),transitionend:ka("Transition","TransitionEnd")},Yg={},oT={};Vi&&(oT=document.createElement("div").style,"AnimationEvent"in window||(delete co.animationend.animation,delete co.animationiteration.animation,delete co.animationstart.animation),"TransitionEvent"in window||delete co.transitionend.transition);var lT=La("animationend"),cT=La("animationiteration"),uT=La("animationstart"),qL=La("transitionrun"),YL=La("transitionstart"),XL=La("transitioncancel"),dT=La("transitionend"),hT=new Map,Xg="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(" ");Xg.push("scrollEnd");var Wg=new WeakMap,Kd=1,vs=2,ni=[],uo=0,Qg=0,aa={};Object.freeze(aa);var ii=null,ho=null,de=0,WL=1,Je=2,on=8,Ei=16,fT=64,pT=!1;try{var mT=Object.preventExtensions({})}catch{pT=!0}var fo=[],po=0,Zd=null,Jd=0,si=[],ai=0,Qa=null,Ss=1,Es="",yn=null,ve=null,Yt=!1,As=!1,ri=null,Ka=null,qi=!1,Kg=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 QL=performance,yT=function(){return QL.now()};else{var KL=Date;yT=function(){return KL.now()}}var Zg=st(null),Jg=st(null),bT={},th=null,mo=null,go=!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:Bi,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0,_currentRenderer:null,_currentRenderer2:null},yo=Le.unstable_now,vT=-0,eh=-0,Dn=-1.1,Za=-0,nh=!1,ih=!1,uc=null,ty=0,Ja=0,bo=null,ST=G.S;G.S=function(e,n){typeof n=="object"&&n!==null&&typeof n.then=="function"&&RN(e,n),ST!==null&&ST(e,n)};var tr=st(null),Ai={recordUnsafeLifecycleWarnings:function(){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}},dc=[],hc=[],fc=[],pc=[],mc=[],gc=[],er=new Set;Ai.recordUnsafeLifecycleWarnings=function(e,n){er.has(e.type)||(typeof n.componentWillMount=="function"&&n.componentWillMount.__suppressDeprecationWarning!==!0&&dc.push(e),e.mode&on&&typeof n.UNSAFE_componentWillMount=="function"&&hc.push(e),typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps.__suppressDeprecationWarning!==!0&&fc.push(e),e.mode&on&&typeof n.UNSAFE_componentWillReceiveProps=="function"&&pc.push(e),typeof n.componentWillUpdate=="function"&&n.componentWillUpdate.__suppressDeprecationWarning!==!0&&mc.push(e),e.mode&on&&typeof n.UNSAFE_componentWillUpdate=="function"&&gc.push(e))},Ai.flushPendingUnsafeLifecycleWarnings=function(){var e=new Set;0<dc.length&&(dc.forEach(function(E){e.add(X(E)||"Component"),er.add(E.type)}),dc=[]);var n=new Set;0<hc.length&&(hc.forEach(function(E){n.add(X(E)||"Component"),er.add(E.type)}),hc=[]);var s=new Set;0<fc.length&&(fc.forEach(function(E){s.add(X(E)||"Component"),er.add(E.type)}),fc=[]);var o=new Set;0<pc.length&&(pc.forEach(function(E){o.add(X(E)||"Component"),er.add(E.type)}),pc=[]);var d=new Set;0<mc.length&&(mc.forEach(function(E){d.add(X(E)||"Component"),er.add(E.type)}),mc=[]);var f=new Set;if(0<gc.length&&(gc.forEach(function(E){f.add(X(E)||"Component"),er.add(E.type)}),gc=[]),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.`,X($n)||"Unknown")),o=Vs(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=qs(e,o,n),s!==null&&(xe(s,e,n),Ol(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 pg(e,n){d_(e,n),(e=e.alternate)&&d_(e,n)}function h_(e){if(e.tag===13){var n=wn(e,67108864);n!==null&&xe(n,e,67108864),pg(e,67108864)}}function kk(){return $n}function Lk(){for(var e=new Map,n=1,s=0;31>s;s++){var o=hl(n);e.set(n,o),n*=2}return e}function Ik(e,n,s,o){var d=G.T;G.T=null;var f=Zt.p;try{Zt.p=ei,mg(e,n,s,o)}finally{Zt.p=f,G.T=d}}function Pk(e,n,s,o){var d=G.T;G.T=null;var f=Zt.p;try{Zt.p=$i,mg(e,n,s,o)}finally{Zt.p=f,G.T=d}}function mg(e,n,s,o){if(Mh){var d=gg(o);if(d===null)eg(e,n,o,Oh,s),p_(e,o);else if(Uk(d,e,n,s,o))o.stopPropagation();else if(p_(e,o),n&4&&-1<CI.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=ke(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}zi(f),(Jt&(vn|wi))===Gn&&(ph=ji()+b1,Vl(0))}}break;case 13:E=wn(f,2),E!==null&&xe(E,f,2),qr(),pg(f,2)}if(f=gg(o),f===null&&eg(e,n,o,Oh,s),f===d)break;d=f}d!==null&&o.stopPropagation()}else eg(e,n,o,null,s)}}function gg(e){return e=Cp(e),yg(e)}function yg(e){if(Oh=null,e=gi(e),e!==null){var n=R(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 Oh=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 $i;case"message":switch(Xk()){case Rg:return ei;case Dg:return $i;case to:case Wk:return bs;case Mg:return Gd;default:return bs}default:return bs}}function p_(e,n){switch(e){case"focusin":case"focusout":ma=null;break;case"dragenter":case"dragleave":ga=null;break;case"mouseover":case"mouseout":ya=null;break;case"pointerover":case"pointerout":zc.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Hc.delete(n.pointerId)}}function Ql(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 Uk(e,n,s,o,d){switch(n){case"focusin":return ma=Ql(ma,e,n,s,o,d),!0;case"dragenter":return ga=Ql(ga,e,n,s,o,d),!0;case"mouseover":return ya=Ql(ya,e,n,s,o,d),!0;case"pointerover":var f=d.pointerId;return zc.set(f,Ql(zc.get(f)||null,e,n,s,o,d)),!0;case"gotpointercapture":return f=d.pointerId,Hc.set(f,Ql(Hc.get(f)||null,e,n,s,o,d)),!0}return!1}function m_(e){var n=gi(e.target);if(n!==null){var s=R(n);if(s!==null){if(n=s.tag,n===13){if(n=L(s),n!==null){e.blockedOn=n,Ir(e.priority,function(){if(s.tag===13){var o=jn(s);o=pl(o);var d=wn(s,o);d!==null&&xe(d,s,o),pg(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 Pd(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var s=gg(e.nativeEvent);if(s===null){s=e.nativeEvent;var o=new s.constructor(s.type,s),d=o;nc!==null&&console.error("Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue."),nc=d,s.target.dispatchEvent(o),nc===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."),nc=null}else return n=yi(s),n!==null&&h_(n),e.blockedOn=s,!1;n.shift()}return!0}function g_(e,n,s){Pd(e)&&s.delete(n)}function zk(){By=!1,ma!==null&&Pd(ma)&&(ma=null),ga!==null&&Pd(ga)&&(ga=null),ya!==null&&Pd(ya)&&(ya=null),zc.forEach(g_),Hc.forEach(g_)}function Ud(e,n){e.blockedOn===n&&(e.blockedOn=null,By||(By=!0,Le.unstable_scheduleCallback(Le.unstable_NormalPriority,zk)))}function y_(e){Nh!==e&&(Nh=e,Le.unstable_scheduleCallback(Le.unstable_NormalPriority,function(){Nh===e&&(Nh=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(yg(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),ym(f,s,o,d))}}))}function Kl(e){function n(w){return Ud(w,e)}ma!==null&&Ud(ma,e),ga!==null&&Ud(ga,e),ya!==null&&Ud(ya,e),zc.forEach(n),Hc.forEach(n);for(var s=0;s<ba.length;s++){var o=ba[s];o.blockedOn===e&&(o.blockedOn=null)}for(;0<ba.length&&(s=ba[0],s.blockedOn===null);)m_(s),s.blockedOn===null&&ba.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[Rn]||null;if(typeof f=="function")v||y_(s);else if(v){var E=null;if(f&&f.hasAttribute("formAction")){if(d=f,v=f[Rn]||null)E=v.formAction;else if(yg(d)!==null)continue}else E=v.action;typeof E=="function"?s[o+1]=E:(s.splice(o,3),o-=3),y_(s)}}}function bg(e){this._internalRoot=e}function zd(e){this._internalRoot=e}function b_(e){e[ia]&&(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(),vg=pu(),Hk=ZD(),It=Object.assign,Bk=Symbol.for("react.element"),Js=Symbol.for("react.transitional.element"),Zr=Symbol.for("react.portal"),Jr=Symbol.for("react.fragment"),Hd=Symbol.for("react.strict_mode"),Sg=Symbol.for("react.profiler"),jk=Symbol.for("react.provider"),Eg=Symbol.for("react.consumer"),Bi=Symbol.for("react.context"),Zl=Symbol.for("react.forward_ref"),Ag=Symbol.for("react.suspense"),_g=Symbol.for("react.suspense_list"),Bd=Symbol.for("react.memo"),Fn=Symbol.for("react.lazy"),Tg=Symbol.for("react.activity"),Fk=Symbol.for("react.memo_cache_sentinel"),v_=Symbol.iterator,$k=Symbol.for("react.client.reference"),Ze=Array.isArray,G=vg.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Zt=Hk.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Gk=Object.freeze({pending:!1,data:null,method:null,action:null}),wg=[],xg=[],gs=-1,ta=st(null),Jl=st(null),ea=st(null),jd=st(null),ys=Object.prototype.hasOwnProperty,Cg=Le.unstable_scheduleCallback,Vk=Le.unstable_cancelCallback,qk=Le.unstable_shouldYield,Yk=Le.unstable_requestPaint,ji=Le.unstable_now,Xk=Le.unstable_getCurrentPriorityLevel,Rg=Le.unstable_ImmediatePriority,Dg=Le.unstable_UserBlockingPriority,to=Le.unstable_NormalPriority,Wk=Le.unstable_LowPriority,Mg=Le.unstable_IdlePriority,Qk=Le.log,Kk=Le.unstable_setDisableYieldValue,eo=null,an=null,at=null,Fi=!1,Si=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u",pn=Math.clz32?Math.clz32:Nr,Zk=Math.log,Jk=Math.LN2,Fd=256,$d=4194304,ei=2,$i=8,bs=32,Gd=268435456,na=Math.random().toString(36).slice(2),rn="__reactFiber$"+na,Rn="__reactProps$"+na,ia="__reactContainer$"+na,Og="__reactEvents$"+na,tL="__reactListeners$"+na,eL="__reactHandles$"+na,S_="__reactResources$"+na,tc="__reactMarker$"+na,E_=new Set,Xa={},Ng={},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]*$"),A_={},__={},ec=0,T_,w_,x_,C_,R_,D_,M_;rs.__reactDisabledLog=!0;var kg,O_,Lg=!1,Ig=new(typeof WeakMap=="function"?WeakMap:Map),$n=null,Gi=!1,sL=/[\n"\\]/g,N_=!1,k_=!1,L_=!1,I_=!1,P_=!1,U_=!1,z_=["value","defaultValue"],H_=!1,B_=/["'&<>\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(" "),F_={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null,containerTagInScope:null,implicitRootScope:!1},Vd={},Pg={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-/,lL=/^(?:webkit|moz|o)[A-Z]/,cL=/^-ms-/,uL=/-(.)/g,V_=/;\s*$/,no={},Ug={},q_=!1,Y_=!1,X_=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(" ")),qd="http://www.w3.org/1998/Math/MathML",io="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"]]),Yd={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},so={},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]*$"),Q_=!1,mn={},K_=/^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,nc=null,ao=null,ro=null,zg=!1,Vi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Hg=!1;if(Vi)try{var ic={};Object.defineProperty(ic,"passive",{get:function(){Hg=!0}}),window.addEventListener("test",ic,ic),window.removeEventListener("test",ic,ic)}catch{Hg=!1}var sa=null,Bg=null,Xd=null,Wa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Wd=Tn(Wa),sc=It({},Wa,{view:0,detail:0}),bL=Tn(sc),jg,Fg,ac,Qd=It({},sc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Rp,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!==ac&&(ac&&e.type==="mousemove"?(jg=e.screenX-ac.screenX,Fg=e.screenY-ac.screenY):Fg=jg=0,ac=e),jg)},movementY:function(e){return"movementY"in e?e.movementY:Fg}}),Z_=Tn(Qd),vL=It({},Qd,{dataTransfer:0}),SL=Tn(vL),EL=It({},sc,{relatedTarget:0}),$g=Tn(EL),AL=It({},Wa,{animationName:0,elapsedTime:0,pseudoElement:0}),_L=Tn(AL),TL=It({},Wa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),wL=Tn(TL),xL=It({},Wa,{data:0}),J_=Tn(xL),CL=J_,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({},sc,{key:function(e){if(e.key){var n=RL[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=Gu(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:Rp,charCode:function(e){return e.type==="keypress"?Gu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Gu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),NL=Tn(OL),kL=It({},Qd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),tT=Tn(kL),LL=It({},sc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Rp}),IL=Tn(LL),PL=It({},Wa,{propertyName:0,elapsedTime:0,pseudoElement:0}),UL=Tn(PL),zL=It({},Qd,{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=Tn(zL),BL=It({},Wa,{newState:0,oldState:0}),jL=Tn(BL),FL=[9,13,27,32],eT=229,Gg=Vi&&"CompositionEvent"in window,rc=null;Vi&&"documentMode"in document&&(rc=document.documentMode);var $L=Vi&&"TextEvent"in window&&!rc,nT=Vi&&(!Gg||rc&&8<rc&&11>=rc),iT=32,sT=String.fromCharCode(iT),aT=!1,oo=!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},oc=null,lc=null,rT=!1;Vi&&(rT=SN("input")&&(!document.documentMode||9<document.documentMode));var gn=typeof Object.is=="function"?Object.is:xN,VL=Vi&&"documentMode"in document&&11>=document.documentMode,lo=null,Vg=null,cc=null,qg=!1,co={animationend:ka("Animation","AnimationEnd"),animationiteration:ka("Animation","AnimationIteration"),animationstart:ka("Animation","AnimationStart"),transitionrun:ka("Transition","TransitionRun"),transitionstart:ka("Transition","TransitionStart"),transitioncancel:ka("Transition","TransitionCancel"),transitionend:ka("Transition","TransitionEnd")},Yg={},oT={};Vi&&(oT=document.createElement("div").style,"AnimationEvent"in window||(delete co.animationend.animation,delete co.animationiteration.animation,delete co.animationstart.animation),"TransitionEvent"in window||delete co.transitionend.transition);var lT=La("animationend"),cT=La("animationiteration"),uT=La("animationstart"),qL=La("transitionrun"),YL=La("transitionstart"),XL=La("transitioncancel"),dT=La("transitionend"),hT=new Map,Xg="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(" ");Xg.push("scrollEnd");var Wg=new WeakMap,Kd=1,vs=2,ni=[],uo=0,Qg=0,aa={};Object.freeze(aa);var ii=null,ho=null,de=0,WL=1,Je=2,on=8,Ei=16,fT=64,pT=!1;try{var mT=Object.preventExtensions({})}catch{pT=!0}var fo=[],po=0,Zd=null,Jd=0,si=[],ai=0,Qa=null,Ss=1,Es="",yn=null,ve=null,Yt=!1,As=!1,ri=null,Ka=null,qi=!1,Kg=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 QL=performance,yT=function(){return QL.now()};else{var KL=Date;yT=function(){return KL.now()}}var Zg=st(null),Jg=st(null),bT={},th=null,mo=null,go=!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:Bi,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0,_currentRenderer:null,_currentRenderer2:null},yo=Le.unstable_now,vT=-0,eh=-0,Dn=-1.1,Za=-0,nh=!1,ih=!1,uc=null,ty=0,Ja=0,bo=null,ST=G.S;G.S=function(e,n){typeof n=="object"&&n!==null&&typeof n.then=="function"&&RN(e,n),ST!==null&&ST(e,n)};var tr=st(null),Ai={recordUnsafeLifecycleWarnings:function(){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}},dc=[],hc=[],fc=[],pc=[],mc=[],gc=[],er=new Set;Ai.recordUnsafeLifecycleWarnings=function(e,n){er.has(e.type)||(typeof n.componentWillMount=="function"&&n.componentWillMount.__suppressDeprecationWarning!==!0&&dc.push(e),e.mode&on&&typeof n.UNSAFE_componentWillMount=="function"&&hc.push(e),typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps.__suppressDeprecationWarning!==!0&&fc.push(e),e.mode&on&&typeof n.UNSAFE_componentWillReceiveProps=="function"&&pc.push(e),typeof n.componentWillUpdate=="function"&&n.componentWillUpdate.__suppressDeprecationWarning!==!0&&mc.push(e),e.mode&on&&typeof n.UNSAFE_componentWillUpdate=="function"&&gc.push(e))},Ai.flushPendingUnsafeLifecycleWarnings=function(){var e=new Set;0<dc.length&&(dc.forEach(function(E){e.add(X(E)||"Component"),er.add(E.type)}),dc=[]);var n=new Set;0<hc.length&&(hc.forEach(function(E){n.add(X(E)||"Component"),er.add(E.type)}),hc=[]);var s=new Set;0<fc.length&&(fc.forEach(function(E){s.add(X(E)||"Component"),er.add(E.type)}),fc=[]);var o=new Set;0<pc.length&&(pc.forEach(function(E){o.add(X(E)||"Component"),er.add(E.type)}),pc=[]);var d=new Set;0<mc.length&&(mc.forEach(function(E){d.add(X(E)||"Component"),er.add(E.type)}),mc=[]);var f=new Set;if(0<gc.length&&(gc.forEach(function(E){f.add(X(E)||"Component"),er.add(E.type)}),gc=[]),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
 
@@ -261,18 +261,18 @@ The old API will be supported in all 16.x releases, but applications using it sh
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(){dc=[],hc=[],fc=[],pc=[],mc=[],gc=[],sh=new Map};var yc=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."),ah=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."),ey={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.')}},bc=null,rh=!1,oi=0,li=1,bn=2,tn=4,He=8,_T=0,TT=1,wT=2,ny=3,ra=!1,xT=!1,iy=null,sy=!1,vo=st(null),oh=st(0),So,CT=new Set,RT=new Set,ay=new Set,DT=new Set,oa=0,_t=null,le=null,Ie=null,lh=!1,Eo=!1,nr=!1,ch=0,vc=0,_s=null,eI=0,nI=25,$=null,ci=null,Ts=-1,Sc=!1,uh={readContext:me,use:Ys,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},ry=null,MT=null,oy=null,OT=null,Yi=null,_i=null,dh=null;ry={readContext:function(e){return me(e)},use:Ys,useCallback:function(e,n){return $="useCallback",Ht(),Hr(n),fm(e,n)},useContext:function(e){return $="useContext",Ht(),me(e)},useEffect:function(e,n){return $="useEffect",Ht(),Hr(n),ud(e,n)},useImperativeHandle:function(e,n,s){return $="useImperativeHandle",Ht(),Hr(s),hm(e,n,s)},useInsertionEffect:function(e,n){$="useInsertionEffect",Ht(),Hr(n),Ga(4,bn,e,n)},useLayoutEffect:function(e,n){return $="useLayoutEffect",Ht(),Hr(n),dm(e,n)},useMemo:function(e,n){$="useMemo",Ht(),Hr(n);var s=G.H;G.H=Yi;try{return pm(e,n)}finally{G.H=s}},useReducer:function(e,n,s){$="useReducer",Ht();var o=G.H;G.H=Yi;try{return im(e,n,s)}finally{G.H=o}},useRef:function(e){return $="useRef",Ht(),um(e)},useState:function(e){$="useState",Ht();var n=G.H;G.H=Yi;try{return om(e)}finally{G.H=n}},useDebugValue:function(){$="useDebugValue",Ht()},useDeferredValue:function(e,n){return $="useDeferredValue",Ht(),mm(e,n)},useTransition:function(){return $="useTransition",Ht(),bm()},useSyncExternalStore:function(e,n,s){return $="useSyncExternalStore",Ht(),am(e,n,s)},useId:function(){return $="useId",Ht(),vm()},useFormState:function(e,n){return $="useFormState",Ht(),ad(),Fr(e,n)},useActionState:function(e,n){return $="useActionState",Ht(),Fr(e,n)},useOptimistic:function(e){return $="useOptimistic",Ht(),lm(e)},useHostTransitionStatus:Va,useMemoCache:$a,useCacheRefresh:function(){return $="useCacheRefresh",Ht(),Sm()}},MT={readContext:function(e){return me(e)},use:Ys,useCallback:function(e,n){return $="useCallback",J(),fm(e,n)},useContext:function(e){return $="useContext",J(),me(e)},useEffect:function(e,n){return $="useEffect",J(),ud(e,n)},useImperativeHandle:function(e,n,s){return $="useImperativeHandle",J(),hm(e,n,s)},useInsertionEffect:function(e,n){$="useInsertionEffect",J(),Ga(4,bn,e,n)},useLayoutEffect:function(e,n){return $="useLayoutEffect",J(),dm(e,n)},useMemo:function(e,n){$="useMemo",J();var s=G.H;G.H=Yi;try{return pm(e,n)}finally{G.H=s}},useReducer:function(e,n,s){$="useReducer",J();var o=G.H;G.H=Yi;try{return im(e,n,s)}finally{G.H=o}},useRef:function(e){return $="useRef",J(),um(e)},useState:function(e){$="useState",J();var n=G.H;G.H=Yi;try{return om(e)}finally{G.H=n}},useDebugValue:function(){$="useDebugValue",J()},useDeferredValue:function(e,n){return $="useDeferredValue",J(),mm(e,n)},useTransition:function(){return $="useTransition",J(),bm()},useSyncExternalStore:function(e,n,s){return $="useSyncExternalStore",J(),am(e,n,s)},useId:function(){return $="useId",J(),vm()},useActionState:function(e,n){return $="useActionState",J(),Fr(e,n)},useFormState:function(e,n){return $="useFormState",J(),ad(),Fr(e,n)},useOptimistic:function(e){return $="useOptimistic",J(),lm(e)},useHostTransitionStatus:Va,useMemoCache:$a,useCacheRefresh:function(){return $="useCacheRefresh",J(),Sm()}},oy={readContext:function(e){return me(e)},use:Ys,useCallback:function(e,n){return $="useCallback",J(),hd(e,n)},useContext:function(e){return $="useContext",J(),me(e)},useEffect:function(e,n){$="useEffect",J(),Cn(2048,He,e,n)},useImperativeHandle:function(e,n,s){return $="useImperativeHandle",J(),dd(e,n,s)},useInsertionEffect:function(e,n){return $="useInsertionEffect",J(),Cn(4,bn,e,n)},useLayoutEffect:function(e,n){return $="useLayoutEffect",J(),Cn(4,tn,e,n)},useMemo:function(e,n){$="useMemo",J();var s=G.H;G.H=_i;try{return fd(e,n)}finally{G.H=s}},useReducer:function(e,n,s){$="useReducer",J();var o=G.H;G.H=_i;try{return Br(e,n,s)}finally{G.H=o}},useRef:function(){return $="useRef",J(),ee().memoizedState},useState:function(){$="useState",J();var e=G.H;G.H=_i;try{return Br(vi)}finally{G.H=e}},useDebugValue:function(){$="useDebugValue",J()},useDeferredValue:function(e,n){return $="useDeferredValue",J(),lE(e,n)},useTransition:function(){return $="useTransition",J(),pE()},useSyncExternalStore:function(e,n,s){return $="useSyncExternalStore",J(),rd(e,n,s)},useId:function(){return $="useId",J(),ee().memoizedState},useFormState:function(e){return $="useFormState",J(),ad(),od(e)},useActionState:function(e){return $="useActionState",J(),od(e)},useOptimistic:function(e,n){return $="useOptimistic",J(),ZS(e,n)},useHostTransitionStatus:Va,useMemoCache:$a,useCacheRefresh:function(){return $="useCacheRefresh",J(),ee().memoizedState}},OT={readContext:function(e){return me(e)},use:Ys,useCallback:function(e,n){return $="useCallback",J(),hd(e,n)},useContext:function(e){return $="useContext",J(),me(e)},useEffect:function(e,n){$="useEffect",J(),Cn(2048,He,e,n)},useImperativeHandle:function(e,n,s){return $="useImperativeHandle",J(),dd(e,n,s)},useInsertionEffect:function(e,n){return $="useInsertionEffect",J(),Cn(4,bn,e,n)},useLayoutEffect:function(e,n){return $="useLayoutEffect",J(),Cn(4,tn,e,n)},useMemo:function(e,n){$="useMemo",J();var s=G.H;G.H=dh;try{return fd(e,n)}finally{G.H=s}},useReducer:function(e,n,s){$="useReducer",J();var o=G.H;G.H=dh;try{return Il(e,n,s)}finally{G.H=o}},useRef:function(){return $="useRef",J(),ee().memoizedState},useState:function(){$="useState",J();var e=G.H;G.H=dh;try{return Il(vi)}finally{G.H=e}},useDebugValue:function(){$="useDebugValue",J()},useDeferredValue:function(e,n){return $="useDeferredValue",J(),cE(e,n)},useTransition:function(){return $="useTransition",J(),mE()},useSyncExternalStore:function(e,n,s){return $="useSyncExternalStore",J(),rd(e,n,s)},useId:function(){return $="useId",J(),ee().memoizedState},useFormState:function(e){return $="useFormState",J(),ad(),ld(e)},useActionState:function(e){return $="useActionState",J(),ld(e)},useOptimistic:function(e,n){return $="useOptimistic",J(),tE(e,n)},useHostTransitionStatus:Va,useMemoCache:$a,useCacheRefresh:function(){return $="useCacheRefresh",J(),ee().memoizedState}},Yi={readContext:function(e){return m(),me(e)},use:function(e){return p(),Ys(e)},useCallback:function(e,n){return $="useCallback",p(),Ht(),fm(e,n)},useContext:function(e){return $="useContext",p(),Ht(),me(e)},useEffect:function(e,n){return $="useEffect",p(),Ht(),ud(e,n)},useImperativeHandle:function(e,n,s){return $="useImperativeHandle",p(),Ht(),hm(e,n,s)},useInsertionEffect:function(e,n){$="useInsertionEffect",p(),Ht(),Ga(4,bn,e,n)},useLayoutEffect:function(e,n){return $="useLayoutEffect",p(),Ht(),dm(e,n)},useMemo:function(e,n){$="useMemo",p(),Ht();var s=G.H;G.H=Yi;try{return pm(e,n)}finally{G.H=s}},useReducer:function(e,n,s){$="useReducer",p(),Ht();var o=G.H;G.H=Yi;try{return im(e,n,s)}finally{G.H=o}},useRef:function(e){return $="useRef",p(),Ht(),um(e)},useState:function(e){$="useState",p(),Ht();var n=G.H;G.H=Yi;try{return om(e)}finally{G.H=n}},useDebugValue:function(){$="useDebugValue",p(),Ht()},useDeferredValue:function(e,n){return $="useDeferredValue",p(),Ht(),mm(e,n)},useTransition:function(){return $="useTransition",p(),Ht(),bm()},useSyncExternalStore:function(e,n,s){return $="useSyncExternalStore",p(),Ht(),am(e,n,s)},useId:function(){return $="useId",p(),Ht(),vm()},useFormState:function(e,n){return $="useFormState",p(),Ht(),Fr(e,n)},useActionState:function(e,n){return $="useActionState",p(),Ht(),Fr(e,n)},useOptimistic:function(e){return $="useOptimistic",p(),Ht(),lm(e)},useMemoCache:function(e){return p(),$a(e)},useHostTransitionStatus:Va,useCacheRefresh:function(){return $="useCacheRefresh",Ht(),Sm()}},_i={readContext:function(e){return m(),me(e)},use:function(e){return p(),Ys(e)},useCallback:function(e,n){return $="useCallback",p(),J(),hd(e,n)},useContext:function(e){return $="useContext",p(),J(),me(e)},useEffect:function(e,n){$="useEffect",p(),J(),Cn(2048,He,e,n)},useImperativeHandle:function(e,n,s){return $="useImperativeHandle",p(),J(),dd(e,n,s)},useInsertionEffect:function(e,n){return $="useInsertionEffect",p(),J(),Cn(4,bn,e,n)},useLayoutEffect:function(e,n){return $="useLayoutEffect",p(),J(),Cn(4,tn,e,n)},useMemo:function(e,n){$="useMemo",p(),J();var s=G.H;G.H=_i;try{return fd(e,n)}finally{G.H=s}},useReducer:function(e,n,s){$="useReducer",p(),J();var o=G.H;G.H=_i;try{return Br(e,n,s)}finally{G.H=o}},useRef:function(){return $="useRef",p(),J(),ee().memoizedState},useState:function(){$="useState",p(),J();var e=G.H;G.H=_i;try{return Br(vi)}finally{G.H=e}},useDebugValue:function(){$="useDebugValue",p(),J()},useDeferredValue:function(e,n){return $="useDeferredValue",p(),J(),lE(e,n)},useTransition:function(){return $="useTransition",p(),J(),pE()},useSyncExternalStore:function(e,n,s){return $="useSyncExternalStore",p(),J(),rd(e,n,s)},useId:function(){return $="useId",p(),J(),ee().memoizedState},useFormState:function(e){return $="useFormState",p(),J(),od(e)},useActionState:function(e){return $="useActionState",p(),J(),od(e)},useOptimistic:function(e,n){return $="useOptimistic",p(),J(),ZS(e,n)},useMemoCache:function(e){return p(),$a(e)},useHostTransitionStatus:Va,useCacheRefresh:function(){return $="useCacheRefresh",J(),ee().memoizedState}},dh={readContext:function(e){return m(),me(e)},use:function(e){return p(),Ys(e)},useCallback:function(e,n){return $="useCallback",p(),J(),hd(e,n)},useContext:function(e){return $="useContext",p(),J(),me(e)},useEffect:function(e,n){$="useEffect",p(),J(),Cn(2048,He,e,n)},useImperativeHandle:function(e,n,s){return $="useImperativeHandle",p(),J(),dd(e,n,s)},useInsertionEffect:function(e,n){return $="useInsertionEffect",p(),J(),Cn(4,bn,e,n)},useLayoutEffect:function(e,n){return $="useLayoutEffect",p(),J(),Cn(4,tn,e,n)},useMemo:function(e,n){$="useMemo",p(),J();var s=G.H;G.H=_i;try{return fd(e,n)}finally{G.H=s}},useReducer:function(e,n,s){$="useReducer",p(),J();var o=G.H;G.H=_i;try{return Il(e,n,s)}finally{G.H=o}},useRef:function(){return $="useRef",p(),J(),ee().memoizedState},useState:function(){$="useState",p(),J();var e=G.H;G.H=_i;try{return Il(vi)}finally{G.H=e}},useDebugValue:function(){$="useDebugValue",p(),J()},useDeferredValue:function(e,n){return $="useDeferredValue",p(),J(),cE(e,n)},useTransition:function(){return $="useTransition",p(),J(),mE()},useSyncExternalStore:function(e,n,s){return $="useSyncExternalStore",p(),J(),rd(e,n,s)},useId:function(){return $="useId",p(),J(),ee().memoizedState},useFormState:function(e){return $="useFormState",p(),J(),ld(e)},useActionState:function(e){return $="useActionState",p(),J(),ld(e)},useOptimistic:function(e,n){return $="useOptimistic",p(),J(),tE(e,n)},useMemoCache:function(e){return p(),$a(e)},useHostTransitionStatus:Va,useCacheRefresh:function(){return $="useCacheRefresh",J(),ee().memoizedState}};var NT={"react-stack-bottom-frame":function(e,n,s){var o=Gi;Gi=!0;try{return e(n,s)}finally{Gi=o}}},ly=NT["react-stack-bottom-frame"].bind(NT),kT={"react-stack-bottom-frame":function(e){var n=Gi;Gi=!0;try{return e.render()}finally{Gi=n}}},LT=kT["react-stack-bottom-frame"].bind(kT),IT={"react-stack-bottom-frame":function(e,n){try{n.componentDidMount()}catch(s){re(e,e.return,s)}}},cy=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){re(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:""})}},iI=zT["react-stack-bottom-frame"].bind(zT),HT={"react-stack-bottom-frame":function(e,n,s){try{s.componentWillUnmount()}catch(o){re(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}},sI=FT["react-stack-bottom-frame"].bind(FT),jT={"react-stack-bottom-frame":function(e,n,s){try{s()}catch(o){re(e,n,o)}}},aI=jT["react-stack-bottom-frame"].bind(jT),$T={"react-stack-bottom-frame":function(e){var n=e._init;return n(e._payload)}},la=$T["react-stack-bottom-frame"].bind($T),Ao=null,Ec=0,kt=null,uy,GT=uy=!1,VT={},qT={},YT={};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(!VT[d]){VT[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(){dc=[],hc=[],fc=[],pc=[],mc=[],gc=[],sh=new Map};var yc=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."),ah=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."),ey={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.')}},bc=null,rh=!1,oi=0,li=1,bn=2,tn=4,He=8,_T=0,TT=1,wT=2,ny=3,ra=!1,xT=!1,iy=null,sy=!1,vo=st(null),oh=st(0),So,CT=new Set,RT=new Set,ay=new Set,DT=new Set,oa=0,_t=null,le=null,Ie=null,lh=!1,Eo=!1,nr=!1,ch=0,vc=0,_s=null,eI=0,nI=25,$=null,ci=null,Ts=-1,Sc=!1,uh={readContext:me,use:Ys,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},ry=null,MT=null,oy=null,OT=null,Yi=null,_i=null,dh=null;ry={readContext:function(e){return me(e)},use:Ys,useCallback:function(e,n){return $="useCallback",Ht(),Hr(n),fm(e,n)},useContext:function(e){return $="useContext",Ht(),me(e)},useEffect:function(e,n){return $="useEffect",Ht(),Hr(n),ud(e,n)},useImperativeHandle:function(e,n,s){return $="useImperativeHandle",Ht(),Hr(s),hm(e,n,s)},useInsertionEffect:function(e,n){$="useInsertionEffect",Ht(),Hr(n),Ga(4,bn,e,n)},useLayoutEffect:function(e,n){return $="useLayoutEffect",Ht(),Hr(n),dm(e,n)},useMemo:function(e,n){$="useMemo",Ht(),Hr(n);var s=G.H;G.H=Yi;try{return pm(e,n)}finally{G.H=s}},useReducer:function(e,n,s){$="useReducer",Ht();var o=G.H;G.H=Yi;try{return im(e,n,s)}finally{G.H=o}},useRef:function(e){return $="useRef",Ht(),um(e)},useState:function(e){$="useState",Ht();var n=G.H;G.H=Yi;try{return om(e)}finally{G.H=n}},useDebugValue:function(){$="useDebugValue",Ht()},useDeferredValue:function(e,n){return $="useDeferredValue",Ht(),mm(e,n)},useTransition:function(){return $="useTransition",Ht(),bm()},useSyncExternalStore:function(e,n,s){return $="useSyncExternalStore",Ht(),am(e,n,s)},useId:function(){return $="useId",Ht(),vm()},useFormState:function(e,n){return $="useFormState",Ht(),ad(),jr(e,n)},useActionState:function(e,n){return $="useActionState",Ht(),jr(e,n)},useOptimistic:function(e){return $="useOptimistic",Ht(),lm(e)},useHostTransitionStatus:Va,useMemoCache:$a,useCacheRefresh:function(){return $="useCacheRefresh",Ht(),Sm()}},MT={readContext:function(e){return me(e)},use:Ys,useCallback:function(e,n){return $="useCallback",J(),fm(e,n)},useContext:function(e){return $="useContext",J(),me(e)},useEffect:function(e,n){return $="useEffect",J(),ud(e,n)},useImperativeHandle:function(e,n,s){return $="useImperativeHandle",J(),hm(e,n,s)},useInsertionEffect:function(e,n){$="useInsertionEffect",J(),Ga(4,bn,e,n)},useLayoutEffect:function(e,n){return $="useLayoutEffect",J(),dm(e,n)},useMemo:function(e,n){$="useMemo",J();var s=G.H;G.H=Yi;try{return pm(e,n)}finally{G.H=s}},useReducer:function(e,n,s){$="useReducer",J();var o=G.H;G.H=Yi;try{return im(e,n,s)}finally{G.H=o}},useRef:function(e){return $="useRef",J(),um(e)},useState:function(e){$="useState",J();var n=G.H;G.H=Yi;try{return om(e)}finally{G.H=n}},useDebugValue:function(){$="useDebugValue",J()},useDeferredValue:function(e,n){return $="useDeferredValue",J(),mm(e,n)},useTransition:function(){return $="useTransition",J(),bm()},useSyncExternalStore:function(e,n,s){return $="useSyncExternalStore",J(),am(e,n,s)},useId:function(){return $="useId",J(),vm()},useActionState:function(e,n){return $="useActionState",J(),jr(e,n)},useFormState:function(e,n){return $="useFormState",J(),ad(),jr(e,n)},useOptimistic:function(e){return $="useOptimistic",J(),lm(e)},useHostTransitionStatus:Va,useMemoCache:$a,useCacheRefresh:function(){return $="useCacheRefresh",J(),Sm()}},oy={readContext:function(e){return me(e)},use:Ys,useCallback:function(e,n){return $="useCallback",J(),hd(e,n)},useContext:function(e){return $="useContext",J(),me(e)},useEffect:function(e,n){$="useEffect",J(),Cn(2048,He,e,n)},useImperativeHandle:function(e,n,s){return $="useImperativeHandle",J(),dd(e,n,s)},useInsertionEffect:function(e,n){return $="useInsertionEffect",J(),Cn(4,bn,e,n)},useLayoutEffect:function(e,n){return $="useLayoutEffect",J(),Cn(4,tn,e,n)},useMemo:function(e,n){$="useMemo",J();var s=G.H;G.H=_i;try{return fd(e,n)}finally{G.H=s}},useReducer:function(e,n,s){$="useReducer",J();var o=G.H;G.H=_i;try{return Br(e,n,s)}finally{G.H=o}},useRef:function(){return $="useRef",J(),ee().memoizedState},useState:function(){$="useState",J();var e=G.H;G.H=_i;try{return Br(vi)}finally{G.H=e}},useDebugValue:function(){$="useDebugValue",J()},useDeferredValue:function(e,n){return $="useDeferredValue",J(),lE(e,n)},useTransition:function(){return $="useTransition",J(),pE()},useSyncExternalStore:function(e,n,s){return $="useSyncExternalStore",J(),rd(e,n,s)},useId:function(){return $="useId",J(),ee().memoizedState},useFormState:function(e){return $="useFormState",J(),ad(),od(e)},useActionState:function(e){return $="useActionState",J(),od(e)},useOptimistic:function(e,n){return $="useOptimistic",J(),ZS(e,n)},useHostTransitionStatus:Va,useMemoCache:$a,useCacheRefresh:function(){return $="useCacheRefresh",J(),ee().memoizedState}},OT={readContext:function(e){return me(e)},use:Ys,useCallback:function(e,n){return $="useCallback",J(),hd(e,n)},useContext:function(e){return $="useContext",J(),me(e)},useEffect:function(e,n){$="useEffect",J(),Cn(2048,He,e,n)},useImperativeHandle:function(e,n,s){return $="useImperativeHandle",J(),dd(e,n,s)},useInsertionEffect:function(e,n){return $="useInsertionEffect",J(),Cn(4,bn,e,n)},useLayoutEffect:function(e,n){return $="useLayoutEffect",J(),Cn(4,tn,e,n)},useMemo:function(e,n){$="useMemo",J();var s=G.H;G.H=dh;try{return fd(e,n)}finally{G.H=s}},useReducer:function(e,n,s){$="useReducer",J();var o=G.H;G.H=dh;try{return Il(e,n,s)}finally{G.H=o}},useRef:function(){return $="useRef",J(),ee().memoizedState},useState:function(){$="useState",J();var e=G.H;G.H=dh;try{return Il(vi)}finally{G.H=e}},useDebugValue:function(){$="useDebugValue",J()},useDeferredValue:function(e,n){return $="useDeferredValue",J(),cE(e,n)},useTransition:function(){return $="useTransition",J(),mE()},useSyncExternalStore:function(e,n,s){return $="useSyncExternalStore",J(),rd(e,n,s)},useId:function(){return $="useId",J(),ee().memoizedState},useFormState:function(e){return $="useFormState",J(),ad(),ld(e)},useActionState:function(e){return $="useActionState",J(),ld(e)},useOptimistic:function(e,n){return $="useOptimistic",J(),tE(e,n)},useHostTransitionStatus:Va,useMemoCache:$a,useCacheRefresh:function(){return $="useCacheRefresh",J(),ee().memoizedState}},Yi={readContext:function(e){return m(),me(e)},use:function(e){return p(),Ys(e)},useCallback:function(e,n){return $="useCallback",p(),Ht(),fm(e,n)},useContext:function(e){return $="useContext",p(),Ht(),me(e)},useEffect:function(e,n){return $="useEffect",p(),Ht(),ud(e,n)},useImperativeHandle:function(e,n,s){return $="useImperativeHandle",p(),Ht(),hm(e,n,s)},useInsertionEffect:function(e,n){$="useInsertionEffect",p(),Ht(),Ga(4,bn,e,n)},useLayoutEffect:function(e,n){return $="useLayoutEffect",p(),Ht(),dm(e,n)},useMemo:function(e,n){$="useMemo",p(),Ht();var s=G.H;G.H=Yi;try{return pm(e,n)}finally{G.H=s}},useReducer:function(e,n,s){$="useReducer",p(),Ht();var o=G.H;G.H=Yi;try{return im(e,n,s)}finally{G.H=o}},useRef:function(e){return $="useRef",p(),Ht(),um(e)},useState:function(e){$="useState",p(),Ht();var n=G.H;G.H=Yi;try{return om(e)}finally{G.H=n}},useDebugValue:function(){$="useDebugValue",p(),Ht()},useDeferredValue:function(e,n){return $="useDeferredValue",p(),Ht(),mm(e,n)},useTransition:function(){return $="useTransition",p(),Ht(),bm()},useSyncExternalStore:function(e,n,s){return $="useSyncExternalStore",p(),Ht(),am(e,n,s)},useId:function(){return $="useId",p(),Ht(),vm()},useFormState:function(e,n){return $="useFormState",p(),Ht(),jr(e,n)},useActionState:function(e,n){return $="useActionState",p(),Ht(),jr(e,n)},useOptimistic:function(e){return $="useOptimistic",p(),Ht(),lm(e)},useMemoCache:function(e){return p(),$a(e)},useHostTransitionStatus:Va,useCacheRefresh:function(){return $="useCacheRefresh",Ht(),Sm()}},_i={readContext:function(e){return m(),me(e)},use:function(e){return p(),Ys(e)},useCallback:function(e,n){return $="useCallback",p(),J(),hd(e,n)},useContext:function(e){return $="useContext",p(),J(),me(e)},useEffect:function(e,n){$="useEffect",p(),J(),Cn(2048,He,e,n)},useImperativeHandle:function(e,n,s){return $="useImperativeHandle",p(),J(),dd(e,n,s)},useInsertionEffect:function(e,n){return $="useInsertionEffect",p(),J(),Cn(4,bn,e,n)},useLayoutEffect:function(e,n){return $="useLayoutEffect",p(),J(),Cn(4,tn,e,n)},useMemo:function(e,n){$="useMemo",p(),J();var s=G.H;G.H=_i;try{return fd(e,n)}finally{G.H=s}},useReducer:function(e,n,s){$="useReducer",p(),J();var o=G.H;G.H=_i;try{return Br(e,n,s)}finally{G.H=o}},useRef:function(){return $="useRef",p(),J(),ee().memoizedState},useState:function(){$="useState",p(),J();var e=G.H;G.H=_i;try{return Br(vi)}finally{G.H=e}},useDebugValue:function(){$="useDebugValue",p(),J()},useDeferredValue:function(e,n){return $="useDeferredValue",p(),J(),lE(e,n)},useTransition:function(){return $="useTransition",p(),J(),pE()},useSyncExternalStore:function(e,n,s){return $="useSyncExternalStore",p(),J(),rd(e,n,s)},useId:function(){return $="useId",p(),J(),ee().memoizedState},useFormState:function(e){return $="useFormState",p(),J(),od(e)},useActionState:function(e){return $="useActionState",p(),J(),od(e)},useOptimistic:function(e,n){return $="useOptimistic",p(),J(),ZS(e,n)},useMemoCache:function(e){return p(),$a(e)},useHostTransitionStatus:Va,useCacheRefresh:function(){return $="useCacheRefresh",J(),ee().memoizedState}},dh={readContext:function(e){return m(),me(e)},use:function(e){return p(),Ys(e)},useCallback:function(e,n){return $="useCallback",p(),J(),hd(e,n)},useContext:function(e){return $="useContext",p(),J(),me(e)},useEffect:function(e,n){$="useEffect",p(),J(),Cn(2048,He,e,n)},useImperativeHandle:function(e,n,s){return $="useImperativeHandle",p(),J(),dd(e,n,s)},useInsertionEffect:function(e,n){return $="useInsertionEffect",p(),J(),Cn(4,bn,e,n)},useLayoutEffect:function(e,n){return $="useLayoutEffect",p(),J(),Cn(4,tn,e,n)},useMemo:function(e,n){$="useMemo",p(),J();var s=G.H;G.H=_i;try{return fd(e,n)}finally{G.H=s}},useReducer:function(e,n,s){$="useReducer",p(),J();var o=G.H;G.H=_i;try{return Il(e,n,s)}finally{G.H=o}},useRef:function(){return $="useRef",p(),J(),ee().memoizedState},useState:function(){$="useState",p(),J();var e=G.H;G.H=_i;try{return Il(vi)}finally{G.H=e}},useDebugValue:function(){$="useDebugValue",p(),J()},useDeferredValue:function(e,n){return $="useDeferredValue",p(),J(),cE(e,n)},useTransition:function(){return $="useTransition",p(),J(),mE()},useSyncExternalStore:function(e,n,s){return $="useSyncExternalStore",p(),J(),rd(e,n,s)},useId:function(){return $="useId",p(),J(),ee().memoizedState},useFormState:function(e){return $="useFormState",p(),J(),ld(e)},useActionState:function(e){return $="useActionState",p(),J(),ld(e)},useOptimistic:function(e,n){return $="useOptimistic",p(),J(),tE(e,n)},useMemoCache:function(e){return p(),$a(e)},useHostTransitionStatus:Va,useCacheRefresh:function(){return $="useCacheRefresh",J(),ee().memoizedState}};var NT={"react-stack-bottom-frame":function(e,n,s){var o=Gi;Gi=!0;try{return e(n,s)}finally{Gi=o}}},ly=NT["react-stack-bottom-frame"].bind(NT),kT={"react-stack-bottom-frame":function(e){var n=Gi;Gi=!0;try{return e.render()}finally{Gi=n}}},LT=kT["react-stack-bottom-frame"].bind(kT),IT={"react-stack-bottom-frame":function(e,n){try{n.componentDidMount()}catch(s){re(e,e.return,s)}}},cy=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){re(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:""})}},iI=zT["react-stack-bottom-frame"].bind(zT),HT={"react-stack-bottom-frame":function(e,n,s){try{s.componentWillUnmount()}catch(o){re(e,n,o)}}},BT=HT["react-stack-bottom-frame"].bind(HT),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),FT={"react-stack-bottom-frame":function(e,n,s){try{s()}catch(o){re(e,n,o)}}},aI=FT["react-stack-bottom-frame"].bind(FT),$T={"react-stack-bottom-frame":function(e){var n=e._init;return n(e._payload)}},la=$T["react-stack-bottom-frame"].bind($T),Ao=null,Ec=0,kt=null,uy,GT=uy=!1,VT={},qT={},YT={};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(!VT[d]){VT[d]=!0,s=s._owner,e=e._debugOwner;var f="";e&&typeof e.tag=="number"&&(d=X(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+".")),ft(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 _o=vE(!0),XT=vE(!1),ui=st(null),Xi=null,To=1,Ac=2,Be=st(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 dy={enqueueSetState:function(e,n,s){e=e._reactInternals;var o=Fn(e),d=Vs(o);d.payload=n,s!=null&&(Am(s),d.callback=s),n=qs(e,d,o),n!==null&&(xe(n,e,o),Ol(n,e,o)),mi(e,o)},enqueueReplaceState:function(e,n,s){e=e._reactInternals;var o=Fn(e),d=Vs(o);d.tag=TT,d.payload=n,s!=null&&(Am(s),d.callback=s),n=qs(e,d,o),n!==null&&(xe(n,e,o),Ol(n,e,o)),mi(e,o)},enqueueForceUpdate:function(e,n){e=e._reactInternals;var s=Fn(e),o=Vs(s);o.tag=wT,n!=null&&(Am(n),o.callback=n),n=qs(e,o,s),n!==null&&(xe(n,e,s),Ol(n,e,s)),at!==null&&typeof at.markForceUpdateScheduled=="function"&&at.markForceUpdateScheduled(e,s)}},hy=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)},wo=null,fy=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={},xo=!1,dw={},py={},my={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null},hw=!1,fw=null;fw=new Set;var ws=!1,Ce=!1,gy=!1,pw=typeof WeakSet=="function"?WeakSet:Set,Ge=null,Co=null,Ro=null,Pe=null,Mn=!1,Ti=null,_c=8192,rI={getCacheForType:function(e){var n=me(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 Tc=Symbol.for;Tc("selector.component"),Tc("selector.has_pseudo_class"),Tc("selector.role"),Tc("selector.test_id"),Tc("selector.text")}var oI=[],lI=typeof WeakMap=="function"?WeakMap:Map,Gn=0,vn=2,wi=4,xs=0,wc=1,Do=2,yy=3,ir=4,hh=6,mw=5,Jt=Gn,ce=null,Ut=null,Bt=0,On=0,xc=1,sr=2,Cc=3,gw=4,by=5,Mo=6,Rc=7,vy=8,ar=9,te=On,Vn=null,ca=!1,Oo=!1,Sy=!1,Wi=0,Se=xs,ua=0,da=0,Ey=0,qn=0,rr=0,Dc=null,Sn=null,fh=!1,Ay=0,yw=300,ph=1/0,bw=500,Mc=null,ha=null,cI=0,uI=1,dI=2,or=0,vw=1,Sw=2,Ew=3,hI=4,_y=5,en=0,fa=null,No=null,pa=0,Ty=0,wy=null,Aw=null,fI=50,Oc=0,xy=null,Cy=!1,mh=!1,pI=50,lr=0,Nc=null,ko=!1,gh=null,_w=!1,Tw=new Set,mI={},yh=null,Lo=null,Ry=!1,Dy=!1,bh=!1,My=!1,cr=0,Oy={};(function(){for(var e=0;e<Xg.length;e++){var n=Xg[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(qL,"onTransitionRun"),bi(YL,"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 kc="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(" "),Ny=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(kc)),vh="_reactListening"+Math.random().toString(36).slice(2),ww=!1,xw=!1,Sh=!1,Cw=!1,Eh=!1,Ah=!1,Rw=!1,_h={},gI=/\r\n?/g,yI=/\u0000|\uFFFD/g,ur="http://www.w3.org/1999/xlink",ky="http://www.w3.org/XML/1998/namespace",bI="javascript:throw new Error('React form unexpectedly submitted.')",vI="suppressHydrationWarning",Th="$",wh="/$",Cs="$?",Lc="$!",SI=1,EI=2,AI=4,Ly="F!",Dw="F",Mw="complete",_I="style",Rs=0,Io=1,xh=2,Iy=null,Py=null,Ow={dialog:!0,webview:!0},Uy=null,Nw=typeof setTimeout=="function"?setTimeout:void 0,TI=typeof clearTimeout=="function"?clearTimeout:void 0,dr=-1,kw=typeof Promise=="function"?Promise:void 0,wI=typeof queueMicrotask=="function"?queueMicrotask:typeof kw<"u"?function(e){return kw.resolve(null).then(e).catch(uk)}:Nw,zy=null,hr=0,Ic=1,Lw=2,Iw=3,di=4,hi=new Map,Pw=new Set,Ds=Zt.d;Zt.d={f:function(){var e=Ds.f(),n=qr();return e||n},r:function(e){var n=yi(e);n!==null&&n.tag===5&&n.type==="form"?fE(n):Ds.r(e)},D:function(e){Ds.D(e),n_("dns-prefetch",e,null)},C:function(e,n){Ds.C(e,n),n_("preconnect",e,n)},L:function(e,n,s){Ds.L(e,n,s);var o=Po;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=Qr(e);break;case"script":f=Kr(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(Xl(f))||n==="script"&&o.querySelector(Wl(f))||(n=o.createElement("link"),Ke(n,"link",e),I(n),o.head.appendChild(n)))}},m:function(e,n){Ds.m(e,n);var s=Po;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=Kr(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(Wl(f)))return}o=s.createElement("link"),Ke(o,"link",e),I(o),s.head.appendChild(o)}}},X:function(e,n){Ds.X(e,n);var s=Po;if(s&&e){var o=T(s).hoistableScripts,d=Kr(e),f=o.get(d);f||(f=s.querySelector(Wl(d)),f||(e=It({src:e,async:!0},n),(n=hi.get(d))&&dg(e,n),f=s.createElement("script"),I(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){Ds.S(e,n,s);var o=Po;if(o&&e){var d=T(o).hoistableStyles,f=Qr(e);n=n||"default";var v=d.get(f);if(!v){var E={loading:hr,preload:null};if(v=o.querySelector(Xl(f)))E.loading=Ic|di;else{e=It({rel:"stylesheet",href:e,"data-precedence":n},s),(s=hi.get(f))&&ug(e,s);var w=v=o.createElement("link");I(w),Ke(w,"link",e),w._p=new Promise(function(C,H){w.onload=C,w.onerror=H}),w.addEventListener("load",function(){E.loading|=Ic}),w.addEventListener("error",function(){E.loading|=Lw}),E.loading|=di,Ld(v,n,o)}v={type:"stylesheet",instance:v,count:1,state:E},d.set(f,v)}}},M:function(e,n){Ds.M(e,n);var s=Po;if(s&&e){var o=T(s).hoistableScripts,d=Kr(e),f=o.get(d);f||(f=s.querySelector(Wl(d)),f||(e=It({src:e,async:!0,type:"module"},n),(n=hi.get(d))&&dg(e,n),f=s.createElement("script"),I(f),Ke(f,"link",e),s.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},o.set(d,f))}}};var Po=typeof document>"u"?null:document,Ch=null,Pc=null,Hy=null,Rh=null,fr=Gk,Uc={$$typeof:Bi,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="",Dh=" ",xI=Function.prototype.bind,Bw=!1,Fw=null,jw=null,$w=null,Gw=null,Vw=null,qw=null,Yw=null,Xw=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=wn(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=wn(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=wn(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=wn(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=wn(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=wn(e,2),n!==null&&xe(n,e,2)},Yw=function(e){var n=wn(e,2);n!==null&&xe(n,e,2)},Xw=function(e){u=e},Ww=function(e){c=e};var Mh=!0,Oh=null,By=!1,ma=null,ga=null,ya=null,zc=new Map,Hc=new Map,ba=[],CI="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(" "),Nh=null;if(zd.prototype.render=bg.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);fg(o,d,s,n,null,null)},zd.prototype.unmount=bg.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;(Jt&(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."),fg(e.current,2,null,e,null,null),qr(),n[ia]=null}},zd.prototype.unstable_scheduleHydration=function(e){if(e){var n=yl();e={blockedOn:null,target:e,priority:n};for(var s=0;s<ba.length&&n!==0&&n<ba[s].priority;s++);ba.splice(s,0,e),s===0&&m_(e)}},function(){var e=vg.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=X(s):typeof s.name=="string"&&(o=s.name),o&&(v=" It was passed a child from "+o+".")),ft(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 _o=vE(!0),XT=vE(!1),ui=st(null),Xi=null,To=1,Ac=2,Be=st(0),WT={},QT=new Set,KT=new Set,ZT=new Set,JT=new Set,t1=new Set,e1=new Set,n1=new Set,i1=new Set,s1=new Set,a1=new Set;Object.freeze(WT);var dy={enqueueSetState:function(e,n,s){e=e._reactInternals;var o=jn(e),d=Vs(o);d.payload=n,s!=null&&(Am(s),d.callback=s),n=qs(e,d,o),n!==null&&(xe(n,e,o),Ol(n,e,o)),mi(e,o)},enqueueReplaceState:function(e,n,s){e=e._reactInternals;var o=jn(e),d=Vs(o);d.tag=TT,d.payload=n,s!=null&&(Am(s),d.callback=s),n=qs(e,d,o),n!==null&&(xe(n,e,o),Ol(n,e,o)),mi(e,o)},enqueueForceUpdate:function(e,n){e=e._reactInternals;var s=jn(e),o=Vs(s);o.tag=wT,n!=null&&(Am(n),o.callback=n),n=qs(e,o,s),n!==null&&(xe(n,e,s),Ol(n,e,s)),at!==null&&typeof at.markForceUpdateScheduled=="function"&&at.markForceUpdateScheduled(e,s)}},hy=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)},wo=null,fy=null,r1=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,o1={},l1={},c1={},u1={},xo=!1,d1={},py={},my={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null},h1=!1,f1=null;f1=new Set;var ws=!1,Ce=!1,gy=!1,p1=typeof WeakSet=="function"?WeakSet:Set,Ge=null,Co=null,Ro=null,Pe=null,Mn=!1,Ti=null,_c=8192,rI={getCacheForType:function(e){var n=me(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 Tc=Symbol.for;Tc("selector.component"),Tc("selector.has_pseudo_class"),Tc("selector.role"),Tc("selector.test_id"),Tc("selector.text")}var oI=[],lI=typeof WeakMap=="function"?WeakMap:Map,Gn=0,vn=2,wi=4,xs=0,wc=1,Do=2,yy=3,ir=4,hh=6,m1=5,Jt=Gn,ce=null,Ut=null,Bt=0,On=0,xc=1,sr=2,Cc=3,g1=4,by=5,Mo=6,Rc=7,vy=8,ar=9,te=On,Vn=null,ca=!1,Oo=!1,Sy=!1,Wi=0,Se=xs,ua=0,da=0,Ey=0,qn=0,rr=0,Dc=null,Sn=null,fh=!1,Ay=0,y1=300,ph=1/0,b1=500,Mc=null,ha=null,cI=0,uI=1,dI=2,or=0,v1=1,S1=2,E1=3,hI=4,_y=5,en=0,fa=null,No=null,pa=0,Ty=0,wy=null,A1=null,fI=50,Oc=0,xy=null,Cy=!1,mh=!1,pI=50,lr=0,Nc=null,ko=!1,gh=null,_1=!1,T1=new Set,mI={},yh=null,Lo=null,Ry=!1,Dy=!1,bh=!1,My=!1,cr=0,Oy={};(function(){for(var e=0;e<Xg.length;e++){var n=Xg[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(qL,"onTransitionRun"),bi(YL,"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 kc="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(" "),Ny=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(kc)),vh="_reactListening"+Math.random().toString(36).slice(2),w1=!1,x1=!1,Sh=!1,C1=!1,Eh=!1,Ah=!1,R1=!1,_h={},gI=/\r\n?/g,yI=/\u0000|\uFFFD/g,ur="http://www.w3.org/1999/xlink",ky="http://www.w3.org/XML/1998/namespace",bI="javascript:throw new Error('React form unexpectedly submitted.')",vI="suppressHydrationWarning",Th="$",wh="/$",Cs="$?",Lc="$!",SI=1,EI=2,AI=4,Ly="F!",D1="F",M1="complete",_I="style",Rs=0,Io=1,xh=2,Iy=null,Py=null,O1={dialog:!0,webview:!0},Uy=null,N1=typeof setTimeout=="function"?setTimeout:void 0,TI=typeof clearTimeout=="function"?clearTimeout:void 0,dr=-1,k1=typeof Promise=="function"?Promise:void 0,wI=typeof queueMicrotask=="function"?queueMicrotask:typeof k1<"u"?function(e){return k1.resolve(null).then(e).catch(uk)}:N1,zy=null,hr=0,Ic=1,L1=2,I1=3,di=4,hi=new Map,P1=new Set,Ds=Zt.d;Zt.d={f:function(){var e=Ds.f(),n=qr();return e||n},r:function(e){var n=yi(e);n!==null&&n.tag===5&&n.type==="form"?fE(n):Ds.r(e)},D:function(e){Ds.D(e),n_("dns-prefetch",e,null)},C:function(e,n){Ds.C(e,n),n_("preconnect",e,n)},L:function(e,n,s){Ds.L(e,n,s);var o=Po;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=Qr(e);break;case"script":f=Kr(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(Xl(f))||n==="script"&&o.querySelector(Wl(f))||(n=o.createElement("link"),Ke(n,"link",e),I(n),o.head.appendChild(n)))}},m:function(e,n){Ds.m(e,n);var s=Po;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=Kr(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(Wl(f)))return}o=s.createElement("link"),Ke(o,"link",e),I(o),s.head.appendChild(o)}}},X:function(e,n){Ds.X(e,n);var s=Po;if(s&&e){var o=T(s).hoistableScripts,d=Kr(e),f=o.get(d);f||(f=s.querySelector(Wl(d)),f||(e=It({src:e,async:!0},n),(n=hi.get(d))&&dg(e,n),f=s.createElement("script"),I(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){Ds.S(e,n,s);var o=Po;if(o&&e){var d=T(o).hoistableStyles,f=Qr(e);n=n||"default";var v=d.get(f);if(!v){var E={loading:hr,preload:null};if(v=o.querySelector(Xl(f)))E.loading=Ic|di;else{e=It({rel:"stylesheet",href:e,"data-precedence":n},s),(s=hi.get(f))&&ug(e,s);var w=v=o.createElement("link");I(w),Ke(w,"link",e),w._p=new Promise(function(x,H){w.onload=x,w.onerror=H}),w.addEventListener("load",function(){E.loading|=Ic}),w.addEventListener("error",function(){E.loading|=L1}),E.loading|=di,Ld(v,n,o)}v={type:"stylesheet",instance:v,count:1,state:E},d.set(f,v)}}},M:function(e,n){Ds.M(e,n);var s=Po;if(s&&e){var o=T(s).hoistableScripts,d=Kr(e),f=o.get(d);f||(f=s.querySelector(Wl(d)),f||(e=It({src:e,async:!0,type:"module"},n),(n=hi.get(d))&&dg(e,n),f=s.createElement("script"),I(f),Ke(f,"link",e),s.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},o.set(d,f))}}};var Po=typeof document>"u"?null:document,Ch=null,Pc=null,Hy=null,Rh=null,fr=Gk,Uc={$$typeof:Bi,Provider:null,Consumer:null,_currentValue:fr,_currentValue2:fr,_threadCount:0},U1="%c%s%c ",z1="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",H1="",Dh=" ",xI=Function.prototype.bind,B1=!1,j1=null,F1=null,$1=null,G1=null,V1=null,q1=null,Y1=null,X1=null,W1=null;j1=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=wn(e,2),s!==null&&xe(s,e,2))},F1=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=wn(e,2),s!==null&&xe(s,e,2))},$1=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=wn(e,2),s!==null&&xe(s,e,2))},G1=function(e,n,s){e.pendingProps=t(e.memoizedProps,n,0,s),e.alternate&&(e.alternate.pendingProps=e.pendingProps),n=wn(e,2),n!==null&&xe(n,e,2)},V1=function(e,n){e.pendingProps=r(e.memoizedProps,n,0),e.alternate&&(e.alternate.pendingProps=e.pendingProps),n=wn(e,2),n!==null&&xe(n,e,2)},q1=function(e,n,s){e.pendingProps=i(e.memoizedProps,n,s),e.alternate&&(e.alternate.pendingProps=e.pendingProps),n=wn(e,2),n!==null&&xe(n,e,2)},Y1=function(e){var n=wn(e,2);n!==null&&xe(n,e,2)},X1=function(e){u=e},W1=function(e){c=e};var Mh=!0,Oh=null,By=!1,ma=null,ga=null,ya=null,zc=new Map,Hc=new Map,ba=[],CI="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(" "),Nh=null;if(zd.prototype.render=bg.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()."):C(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=jn(o);fg(o,d,s,n,null,null)},zd.prototype.unmount=bg.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;(Jt&(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."),fg(e.current,2,null,e,null,null),qr(),n[ia]=null}},zd.prototype.unstable_scheduleHydration=function(e){if(e){var n=yl();e={blockedOn:null,target:e,priority:n};for(var s=0;s<ba.length&&n!==0&&n<ba[s].priority;s++);ba.splice(s,0,e),s===0&&m_(e)}},function(){var e=vg.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"),Zt.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?P(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=Yw,e.setErrorHandler=Xw,e.setSuspenseHandler=Ww,e.scheduleRefresh=A,e.scheduleRoot=S,e.setRefreshHandler=_,e.getCurrentFiber=kk,e.getLaneLabelMap=Lk,e.injectProfilingHooks=Wt,ae(e)}()&&Vi&&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")}Wo.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===Js&&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"),Zt.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?P(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=j1,e.overrideHookStateDeletePath=F1,e.overrideHookStateRenamePath=$1,e.overrideProps=G1,e.overridePropsDeletePath=V1,e.overridePropsRenamePath=q1,e.scheduleUpdate=Y1,e.setErrorHandler=X1,e.setSuspenseHandler=W1,e.scheduleRefresh=A,e.scheduleRoot=S,e.setRefreshHandler=_,e.getCurrentFiber=kk,e.getLaneLabelMap=Lk,e.injectProfilingHooks=Wt,ae(e)}()&&Vi&&window.top===window.self&&(-1<navigator.userAgent.indexOf("Chrome")&&navigator.userAgent.indexOf("Edge")===-1||-1<navigator.userAgent.indexOf("Firefox"))){var Q1=window.location.protocol;/^(https?|file):$/.test(Q1)&&console.info("%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools"+(Q1==="file:"?`
272
+ You might need to use a local HTTP server (instead of file://): https://react.dev/link/react-devtools-faq`:""),"font-weight:bold")}Wo.createRoot=function(e,n){if(!C(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===Js&&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=c_(e,1,!1,null,null,s,o,d,f,v,E,null),e[ia]=n.current,tg(e),new bg(n)},Wo.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=pl(o),d=Vs(o),d.callback=null,qs(s,d,o),s=o,n.current.lanes=s,Fs(n,s),zi(n),e[ia]=n.current,tg(e),new zd(n)},Wo.version="19.1.0",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}(),Wo}var Uv;function tM(){return Uv||(Uv=1,xf.exports=JD()),xf.exports}var eM=tM(),Mf={exports:{}},mu={},zv;function nM(){if(zv)return mu;zv=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[ia]=n.current,tg(e),new bg(n)},Wo.hydrateRoot=function(e,n,s){if(!C(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,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=c_(e,1,!0,n,s??null,o,d,f,v,E,w,x),n.context=u_(null),s=n.current,o=jn(s),o=pl(o),d=Vs(o),d.callback=null,qs(s,d,o),s=o,n.current.lanes=s,js(n,s),zi(n),e[ia]=n.current,tg(e),new zd(n)},Wo.version="19.1.0",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}(),Wo}var Uv;function tM(){return Uv||(Uv=1,xf.exports=JD()),xf.exports}var eM=tM(),Mf={exports:{}},mu={},zv;function nM(){if(zv)return mu;zv=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===st?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 P: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 N:return(W.displayName||"Context")+".Provider";case L:return(W._context.displayName||"Context")+".Consumer";case U:var dt=W.render;return W=W.displayName,W||(W=dt.displayName||dt.name||"",W=W!==""?"ForwardRef("+W+")":"ForwardRef"),W;case F:return dt=W.displayName||null,dt!==null?dt:l(W.type)||"Memo";case tt:dt=W._payload,W=W._init;try{return l(W(dt))}catch{}}return null}function t(W){return""+W}function i(W){try{t(W);var dt=!1}catch{dt=!0}if(dt){dt=console;var Q=dt.error,vt=typeof Symbol=="function"&&Symbol.toStringTag&&W[Symbol.toStringTag]||W.constructor.name||"Object";return Q.call(dt,"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===tt)return"<...>";try{var dt=l(W);return dt?"<"+dt+">":"<...>"}catch{return"<...>"}}function r(){var W=Z.A;return W===null?null:W.getOwner()}function c(){return Error("react-stack-top-frame")}function u(W){if(ot.call(W,"key")){var dt=Object.getOwnPropertyDescriptor(W,"key").get;if(dt&&dt.isReactWarning)return!1}return W.key!==void 0}function h(W,dt){function Q(){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)",dt))}Q.isReactWarning=!0,Object.defineProperty(W,"key",{get:Q,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,dt,Q,vt,Vt,ae,At,Wt){return Q=ae.ref,W={$$typeof:S,type:W,key:dt,props:ae,_owner:Vt},(Q!==void 0?Q: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:At}),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,dt,Q,vt,Vt,ae,At,Wt){var Kt=dt.children;if(Kt!==void 0)if(vt)if(St(Kt)){for(vt=0;vt<Kt.length;vt++)y(Kt[vt]);Object.freeze&&Object.freeze(Kt)}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(Kt);if(ot.call(dt,"key")){Kt=l(W);var Te=Object.keys(dt).filter(function(Pn){return Pn!=="key"});vt=0<Te.length?"{key: someKey, "+Te.join(": ..., ")+": ...}":"{key: someKey}",wt[Kt+vt]||(Te=0<Te.length?"{"+Te.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===st?null:W.displayName||W.name||null;if(typeof W=="string")return W;switch(W){case _:return"Fragment";case R:return"Profiler";case C:return"StrictMode";case P:return"Suspense";case F: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 L:return(W._context.displayName||"Context")+".Consumer";case U:var dt=W.render;return W=W.displayName,W||(W=dt.displayName||dt.name||"",W=W!==""?"ForwardRef("+W+")":"ForwardRef"),W;case j:return dt=W.displayName||null,dt!==null?dt:l(W.type)||"Memo";case tt:dt=W._payload,W=W._init;try{return l(W(dt))}catch{}}return null}function t(W){return""+W}function i(W){try{t(W);var dt=!1}catch{dt=!0}if(dt){dt=console;var Q=dt.error,vt=typeof Symbol=="function"&&Symbol.toStringTag&&W[Symbol.toStringTag]||W.constructor.name||"Object";return Q.call(dt,"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===tt)return"<...>";try{var dt=l(W);return dt?"<"+dt+">":"<...>"}catch{return"<...>"}}function r(){var W=Z.A;return W===null?null:W.getOwner()}function c(){return Error("react-stack-top-frame")}function u(W){if(ot.call(W,"key")){var dt=Object.getOwnPropertyDescriptor(W,"key").get;if(dt&&dt.isReactWarning)return!1}return W.key!==void 0}function h(W,dt){function Q(){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)",dt))}Q.isReactWarning=!0,Object.defineProperty(W,"key",{get:Q,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,dt,Q,vt,Vt,ae,At,Wt){return Q=ae.ref,W={$$typeof:S,type:W,key:dt,props:ae,_owner:Vt},(Q!==void 0?Q: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:At}),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,dt,Q,vt,Vt,ae,At,Wt){var Kt=dt.children;if(Kt!==void 0)if(vt)if(St(Kt)){for(vt=0;vt<Kt.length;vt++)y(Kt[vt]);Object.freeze&&Object.freeze(Kt)}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(Kt);if(ot.call(dt,"key")){Kt=l(W);var Te=Object.keys(dt).filter(function(Pn){return Pn!=="key"});vt=0<Te.length?"{key: someKey, "+Te.join(": ..., ")+": ...}":"{key: someKey}",wt[Kt+vt]||(Te=0<Te.length?"{"+Te.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,Kt,Te,Kt),wt[Kt+vt]=!0)}if(Kt=null,Q!==void 0&&(i(Q),Kt=""+Q),u(dt)&&(i(dt.key),Kt=""+dt.key),"key"in dt){Q={};for(var Xe in dt)Xe!=="key"&&(Q[Xe]=dt[Xe])}else Q=dt;return Kt&&h(Q,typeof W=="function"?W.displayName||W.name||"Unknown":W),m(W,Kt,ae,Vt,r(),Q,At,Wt)}function y(W){typeof W=="object"&&W!==null&&W.$$typeof===S&&W._store&&(W._store.validated=1)}var b=pu(),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"),N=Symbol.for("react.context"),U=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),j=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),tt=Symbol.for("react.lazy"),X=Symbol.for("react.activity"),st=Symbol.for("react.client.reference"),Z=b.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ot=Object.prototype.hasOwnProperty,St=Array.isArray,yt=console.createTask?console.createTask:function(){return null};b={"react-stack-bottom-frame":function(W){return W()}};var Gt,B={},K=b["react-stack-bottom-frame"].bind(b,c)(),ut=yt(a(c)),wt={};mu.Fragment=_,mu.jsxDEV=function(W,dt,Q,vt,Vt,ae){var At=1e4>Z.recentlyCreatedOwnerStacks++;return g(W,dt,Q,vt,Vt,ae,At?Error("react-stack-top-frame"):K,At?yt(a(W)):ut)}}(),mu}var Hv;function iM(){return Hv||(Hv=1,Mf.exports=nM()),Mf.exports}var ie=iM();const sM=({size:l=32,...t})=>ie.jsxDEV("svg",{xmlns:"http://www.w3.org/2000/svg",width:l,height:l,viewBox:"0 0 1011 865",preserveAspectRatio:"xMidYMid meet",fill:"currentColor",...t,children:ie.jsxDEV("g",{transform:"translate(0,865) scale(0.1,-0.1)",stroke:"none",children:ie.jsxDEV("path",{d:"M5151 8487 c0 -4 -10 -49 -21 -100 -10 -50 -31 -157 -45 -237 -23 -137 -43 -244 -116 -640 -16 -91 -41 -226 -54 -300 -14 -74 -34 -182 -44 -240 -11 -58 -34 -181 -51 -275 -17 -93 -46 -253 -65 -355 -32 -175 -53 -290 -125 -687 -17 -93 -44 -238 -60 -323 -16 -85 -32 -179 -36 -208 -5 -42 -11 -55 -29 -62 -20 -8 -154 -46 -475 -136 -69 -19 -171 -48 -227 -65 -57 -16 -149 -42 -205 -58 -57 -17 -161 -46 -233 -66 -71 -20 -166 -47 -210 -60 -44 -13 -179 -51 -300 -85 -121 -33 -265 -74 -320 -90 -55 -16 -205 -59 -333 -95 -128 -36 -321 -94 -430 -130 -108 -35 -285 -92 -392 -126 -107 -35 -196 -65 -198 -68 -5 -12 -113 -204 -241 -431 -240 -421 -302 -532 -409 -725 -187 -338 -176 -315 -155 -331 16 -11 -3 -13 -138 -14 -86 0 -158 -2 -161 -5 -3 -3 3 -60 13 -128 48 -319 174 -568 372 -737 195 -166 409 -243 677 -243 147 0 270 20 390 63 414 151 660 478 660 877 0 61 -3 125 -6 142 l-7 31 -146 1 c-112 0 -142 3 -129 11 14 10 -26 95 -348 741 -201 401 -362 732 -359 735 5 6 96 0 625 -43 102 -8 320 -21 485 -30 165 -8 433 -21 595 -30 162 -8 439 -22 615 -31 176 -9 473 -23 659 -33 279 -13 340 -19 347 -31 4 -8 17 -82 28 -165 22 -154 53 -370 116 -790 19 -132 47 -316 60 -410 14 -93 41 -278 61 -410 19 -132 48 -328 64 -435 47 -318 87 -590 125 -845 64 -437 85 -580 85 -595 1 -39 19 22 33 115 9 55 32 199 51 320 19 121 49 310 66 420 17 110 40 250 50 310 11 61 31 184 45 275 13 91 39 251 56 355 16 105 39 246 49 315 11 69 31 195 45 280 14 85 41 256 60 380 20 124 47 293 60 375 14 83 32 195 40 250 25 167 43 257 52 265 4 4 130 13 278 19 149 7 335 16 415 22 80 5 375 20 655 34 668 33 1212 63 1355 75 325 26 600 44 606 37 4 -3 2 -12 -3 -19 -6 -7 -25 -40 -44 -73 -18 -33 -49 -88 -68 -122 -20 -35 -71 -125 -113 -200 -43 -76 -110 -194 -149 -263 -39 -69 -104 -183 -144 -255 -40 -71 -81 -146 -92 -165 -105 -186 -193 -350 -193 -359 0 -6 5 -11 10 -11 6 0 10 -4 10 -10 0 -6 -59 -10 -156 -10 l-156 0 7 -57 c62 -514 311 -865 711 -1002 120 -41 206 -54 354 -54 239 0 458 66 650 197 74 50 198 175 249 251 57 86 116 222 132 307 13 66 16 329 5 347 -5 7 -57 11 -148 11 -122 0 -139 2 -128 15 10 12 -53 143 -349 736 -199 397 -361 730 -361 739 0 11 -13 20 -42 27 -24 6 -97 26 -163 46 -376 111 -577 170 -655 192 -50 15 -227 66 -430 126 -74 22 -171 51 -215 63 -121 35 -443 129 -600 176 -136 40 -243 72 -490 144 -66 19 -160 47 -210 61 -49 15 -142 42 -205 60 -63 19 -155 46 -205 60 -49 15 -98 30 -107 32 -10 3 -20 19 -23 37 -2 17 -9 58 -15 92 -6 33 -21 139 -35 235 -26 179 -70 486 -125 854 -17 116 -44 303 -60 416 -16 113 -31 217 -35 230 -3 13 -16 105 -30 204 -23 166 -42 297 -124 855 -17 113 -37 255 -46 315 -17 119 -32 205 -34 192z m-3733 -5400 c133 -265 242 -488 242 -495 0 -9 -115 -12 -520 -12 -359 0 -520 3 -520 11 0 12 177 337 358 654 68 121 138 244 154 273 16 28 33 52 36 52 4 0 116 -217 250 -483z m7811 -11 c133 -263 241 -483 241 -487 0 -5 -235 -9 -525 -9 -289 0 -525 3 -525 8 0 4 13 30 28 57 16 28 85 151 154 275 182 327 326 581 355 629 8 13 19 19 23 15 4 -5 117 -224 249 -488z"},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/components/ChatJTIcon.tsx",lineNumber:19,columnNumber:17},void 0)},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/components/ChatJTIcon.tsx",lineNumber:18,columnNumber:13},void 0)},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/components/ChatJTIcon.tsx",lineNumber:9,columnNumber:9},void 0),aM=({size:l=32,className:t="",...i})=>ie.jsxDEV("svg",{xmlns:"http://www.w3.org/2000/svg",width:l,height:l,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round",className:`${t} lucide lucide-chevron-right-icon lucide-chevron-right`,...i,children:ie.jsxDEV("path",{d:"m9 18 6-6-6-6"},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/components/ChevronRight.tsx",lineNumber:11,columnNumber:13},void 0)},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/components/ChevronRight.tsx",lineNumber:10,columnNumber:9},void 0),rM=()=>{const l=Xt.app.iframe_url,t=Xt.ui.panel.min_width,i=Xt.ui.panel.max_width_ratio,a=540,r=()=>{try{const Q=localStorage.getItem("chatjt-panel-width");return Q?parseInt(Q,10):a}catch{return a}},c=Q=>{try{localStorage.setItem("chatjt-panel-width",Q.toString())}catch{}},[u,h]=En.useState(!1),[p,m]=En.useState(!1),[g,y]=En.useState(!1),[b,S]=En.useState(!1),[A,_]=En.useState(r()||a),[R,x]=En.useState(!1),L=En.useRef(null),N=En.useRef(null),U=En.useRef(null);En.useEffect(()=>{const Q=U.current,vt=L.current;if(!Q||!vt)return;let Vt=!1;const ae=Kt=>{if(!R)return;const Te=window.innerWidth*i,Xe=window.innerWidth-Kt.clientX;if(Xe>=t){const Pn=Math.max(t,Math.min(Te,Xe));_(Pn),S(!1),Vt=!1}else _(t),S(!0),Vt=!0},At=()=>{R&&(x(!1),document.body.style.userSelect="",N.current&&(N.current.style.pointerEvents="auto"),Q.style.backgroundColor="transparent",Vt?h(!1):c(A),S(!1),Vt=!1),x(!1)},Wt=()=>{x(!0),document.body.style.userSelect="none",N.current&&(N.current.style.pointerEvents="none"),Q.style.backgroundColor="#1591EA90"};return Q.addEventListener("mousedown",Wt),window.addEventListener("mousemove",ae),window.addEventListener("mouseup",At),()=>{Q.removeEventListener("mousedown",Wt),window.removeEventListener("mousemove",ae),window.removeEventListener("mouseup",At)}},[t,i,R,A]),En.useEffect(()=>{!u&&A!==r()&&c(A)},[u,A]),En.useEffect(()=>{u&&S(!1)},[u]);const P=()=>{m(!0),y(!1)},j=()=>{y(!0)},F=()=>{y(!1),N.current?.contentWindow?.location.reload()},tt={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"},X={position:"fixed",top:0,right:0,height:"100vh",width:A,backgroundColor:"#f8f9fa",borderLeft:"1px solid #111827",boxShadow:"-5px 0 15px rgba(0, 0, 0, 0.1)",zIndex:9999,display:"flex",flexDirection:"column",transition:u?"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:u?"translateX(0)":"translateX(100%)",visibility:u?"visible":"hidden"},st={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:b?1:0,visibility:b?"visible":"hidden",transition:"opacity 0.2s ease, visibility 0.2s ease"},Z={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:b?"chatjt-pulse 1.5s ease-in-out infinite":""},ot={position:"absolute",top:0,left:-8,width:8,height:"100%",cursor:"col-resize",backgroundColor:"transparent",zIndex:10002},St={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"},yt={position:"relative",flexGrow:1,overflow:"hidden"},Gt={width:"100%",height:"100%",border:"none",transition:"opacity 0.3s ease"},B={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},K={textAlign:"center",color:"white"},ut={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"},wt={fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",fontSize:14,fontWeight:500,marginBottom:12},W={fontSize:32,marginBottom:12,animation:"chatjt-pulse 2s ease-in-out infinite"},dt={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 Q=document.createElement("style");return Q.innerHTML=`
288
+ <%s key={someKey} {...props} />`,vt,Kt,Te,Kt),wt[Kt+vt]=!0)}if(Kt=null,Q!==void 0&&(i(Q),Kt=""+Q),u(dt)&&(i(dt.key),Kt=""+dt.key),"key"in dt){Q={};for(var Xe in dt)Xe!=="key"&&(Q[Xe]=dt[Xe])}else Q=dt;return Kt&&h(Q,typeof W=="function"?W.displayName||W.name||"Unknown":W),m(W,Kt,ae,Vt,r(),Q,At,Wt)}function y(W){typeof W=="object"&&W!==null&&W.$$typeof===S&&W._store&&(W._store.validated=1)}var b=pu(),S=Symbol.for("react.transitional.element"),A=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),L=Symbol.for("react.consumer"),O=Symbol.for("react.context"),U=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),F=Symbol.for("react.suspense_list"),j=Symbol.for("react.memo"),tt=Symbol.for("react.lazy"),X=Symbol.for("react.activity"),st=Symbol.for("react.client.reference"),Z=b.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ot=Object.prototype.hasOwnProperty,St=Array.isArray,yt=console.createTask?console.createTask:function(){return null};b={"react-stack-bottom-frame":function(W){return W()}};var Gt,B={},K=b["react-stack-bottom-frame"].bind(b,c)(),ut=yt(a(c)),wt={};mu.Fragment=_,mu.jsxDEV=function(W,dt,Q,vt,Vt,ae){var At=1e4>Z.recentlyCreatedOwnerStacks++;return g(W,dt,Q,vt,Vt,ae,At?Error("react-stack-top-frame"):K,At?yt(a(W)):ut)}}(),mu}var Hv;function iM(){return Hv||(Hv=1,Mf.exports=nM()),Mf.exports}var ie=iM();const sM=({size:l=32,...t})=>ie.jsxDEV("svg",{xmlns:"http://www.w3.org/2000/svg",width:l,height:l,viewBox:"0 0 1011 865",preserveAspectRatio:"xMidYMid meet",fill:"currentColor",...t,children:ie.jsxDEV("g",{transform:"translate(0,865) scale(0.1,-0.1)",stroke:"none",children:ie.jsxDEV("path",{d:"M5151 8487 c0 -4 -10 -49 -21 -100 -10 -50 -31 -157 -45 -237 -23 -137 -43 -244 -116 -640 -16 -91 -41 -226 -54 -300 -14 -74 -34 -182 -44 -240 -11 -58 -34 -181 -51 -275 -17 -93 -46 -253 -65 -355 -32 -175 -53 -290 -125 -687 -17 -93 -44 -238 -60 -323 -16 -85 -32 -179 -36 -208 -5 -42 -11 -55 -29 -62 -20 -8 -154 -46 -475 -136 -69 -19 -171 -48 -227 -65 -57 -16 -149 -42 -205 -58 -57 -17 -161 -46 -233 -66 -71 -20 -166 -47 -210 -60 -44 -13 -179 -51 -300 -85 -121 -33 -265 -74 -320 -90 -55 -16 -205 -59 -333 -95 -128 -36 -321 -94 -430 -130 -108 -35 -285 -92 -392 -126 -107 -35 -196 -65 -198 -68 -5 -12 -113 -204 -241 -431 -240 -421 -302 -532 -409 -725 -187 -338 -176 -315 -155 -331 16 -11 -3 -13 -138 -14 -86 0 -158 -2 -161 -5 -3 -3 3 -60 13 -128 48 -319 174 -568 372 -737 195 -166 409 -243 677 -243 147 0 270 20 390 63 414 151 660 478 660 877 0 61 -3 125 -6 142 l-7 31 -146 1 c-112 0 -142 3 -129 11 14 10 -26 95 -348 741 -201 401 -362 732 -359 735 5 6 96 0 625 -43 102 -8 320 -21 485 -30 165 -8 433 -21 595 -30 162 -8 439 -22 615 -31 176 -9 473 -23 659 -33 279 -13 340 -19 347 -31 4 -8 17 -82 28 -165 22 -154 53 -370 116 -790 19 -132 47 -316 60 -410 14 -93 41 -278 61 -410 19 -132 48 -328 64 -435 47 -318 87 -590 125 -845 64 -437 85 -580 85 -595 1 -39 19 22 33 115 9 55 32 199 51 320 19 121 49 310 66 420 17 110 40 250 50 310 11 61 31 184 45 275 13 91 39 251 56 355 16 105 39 246 49 315 11 69 31 195 45 280 14 85 41 256 60 380 20 124 47 293 60 375 14 83 32 195 40 250 25 167 43 257 52 265 4 4 130 13 278 19 149 7 335 16 415 22 80 5 375 20 655 34 668 33 1212 63 1355 75 325 26 600 44 606 37 4 -3 2 -12 -3 -19 -6 -7 -25 -40 -44 -73 -18 -33 -49 -88 -68 -122 -20 -35 -71 -125 -113 -200 -43 -76 -110 -194 -149 -263 -39 -69 -104 -183 -144 -255 -40 -71 -81 -146 -92 -165 -105 -186 -193 -350 -193 -359 0 -6 5 -11 10 -11 6 0 10 -4 10 -10 0 -6 -59 -10 -156 -10 l-156 0 7 -57 c62 -514 311 -865 711 -1002 120 -41 206 -54 354 -54 239 0 458 66 650 197 74 50 198 175 249 251 57 86 116 222 132 307 13 66 16 329 5 347 -5 7 -57 11 -148 11 -122 0 -139 2 -128 15 10 12 -53 143 -349 736 -199 397 -361 730 -361 739 0 11 -13 20 -42 27 -24 6 -97 26 -163 46 -376 111 -577 170 -655 192 -50 15 -227 66 -430 126 -74 22 -171 51 -215 63 -121 35 -443 129 -600 176 -136 40 -243 72 -490 144 -66 19 -160 47 -210 61 -49 15 -142 42 -205 60 -63 19 -155 46 -205 60 -49 15 -98 30 -107 32 -10 3 -20 19 -23 37 -2 17 -9 58 -15 92 -6 33 -21 139 -35 235 -26 179 -70 486 -125 854 -17 116 -44 303 -60 416 -16 113 -31 217 -35 230 -3 13 -16 105 -30 204 -23 166 -42 297 -124 855 -17 113 -37 255 -46 315 -17 119 -32 205 -34 192z m-3733 -5400 c133 -265 242 -488 242 -495 0 -9 -115 -12 -520 -12 -359 0 -520 3 -520 11 0 12 177 337 358 654 68 121 138 244 154 273 16 28 33 52 36 52 4 0 116 -217 250 -483z m7811 -11 c133 -263 241 -483 241 -487 0 -5 -235 -9 -525 -9 -289 0 -525 3 -525 8 0 4 13 30 28 57 16 28 85 151 154 275 182 327 326 581 355 629 8 13 19 19 23 15 4 -5 117 -224 249 -488z"},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/components/ChatJTIcon.tsx",lineNumber:19,columnNumber:17},void 0)},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/components/ChatJTIcon.tsx",lineNumber:18,columnNumber:13},void 0)},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/components/ChatJTIcon.tsx",lineNumber:9,columnNumber:9},void 0),aM=({size:l=32,className:t="",...i})=>ie.jsxDEV("svg",{xmlns:"http://www.w3.org/2000/svg",width:l,height:l,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round",className:`${t} lucide lucide-chevron-right-icon lucide-chevron-right`,...i,children:ie.jsxDEV("path",{d:"m9 18 6-6-6-6"},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/components/ChevronRight.tsx",lineNumber:11,columnNumber:13},void 0)},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/components/ChevronRight.tsx",lineNumber:10,columnNumber:9},void 0),rM=()=>{const l=Xt.app.iframe_url,t=Xt.ui.panel.min_width,i=Xt.ui.panel.max_width_ratio,a=540,r=()=>{try{const Q=localStorage.getItem("chatjt-panel-width");return Q?parseInt(Q,10):a}catch{return a}},c=Q=>{try{localStorage.setItem("chatjt-panel-width",Q.toString())}catch{}},[u,h]=En.useState(!1),[p,m]=En.useState(!1),[g,y]=En.useState(!1),[b,S]=En.useState(!1),[A,_]=En.useState(r()||a),[C,R]=En.useState(!1),L=En.useRef(null),O=En.useRef(null),U=En.useRef(null);En.useEffect(()=>{const Q=U.current,vt=L.current;if(!Q||!vt)return;let Vt=!1;const ae=Kt=>{if(!C)return;const Te=window.innerWidth*i,Xe=window.innerWidth-Kt.clientX;if(Xe>=t){const Pn=Math.max(t,Math.min(Te,Xe));_(Pn),S(!1),Vt=!1}else _(t),S(!0),Vt=!0},At=()=>{C&&(R(!1),document.body.style.userSelect="",O.current&&(O.current.style.pointerEvents="auto"),Q.style.backgroundColor="transparent",Vt?h(!1):c(A),S(!1),Vt=!1),R(!1)},Wt=()=>{R(!0),document.body.style.userSelect="none",O.current&&(O.current.style.pointerEvents="none"),Q.style.backgroundColor="#1591EA90"};return Q.addEventListener("mousedown",Wt),window.addEventListener("mousemove",ae),window.addEventListener("mouseup",At),()=>{Q.removeEventListener("mousedown",Wt),window.removeEventListener("mousemove",ae),window.removeEventListener("mouseup",At)}},[t,i,C,A]),En.useEffect(()=>{!u&&A!==r()&&c(A)},[u,A]),En.useEffect(()=>{u&&S(!1)},[u]);const P=()=>{m(!0),y(!1)},F=()=>{y(!0)},j=()=>{y(!1),O.current?.contentWindow?.location.reload()},tt={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"},X={position:"fixed",top:0,right:0,height:"100vh",width:A,backgroundColor:"#f8f9fa",borderLeft:"1px solid #111827",boxShadow:"-5px 0 15px rgba(0, 0, 0, 0.1)",zIndex:9999,display:"flex",flexDirection:"column",transition:u?"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:u?"translateX(0)":"translateX(100%)",visibility:u?"visible":"hidden"},st={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:b?1:0,visibility:b?"visible":"hidden",transition:"opacity 0.2s ease, visibility 0.2s ease"},Z={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:b?"chatjt-pulse 1.5s ease-in-out infinite":""},ot={position:"absolute",top:0,left:-8,width:8,height:"100%",cursor:"col-resize",backgroundColor:"transparent",zIndex:10002},St={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"},yt={position:"relative",flexGrow:1,overflow:"hidden"},Gt={width:"100%",height:"100%",border:"none",transition:"opacity 0.3s ease"},B={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},K={textAlign:"center",color:"white"},ut={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"},wt={fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",fontSize:14,fontWeight:500,marginBottom:12},W={fontSize:32,marginBottom:12,animation:"chatjt-pulse 2s ease-in-out infinite"},dt={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 Q=document.createElement("style");return Q.innerHTML=`
289
289
  @keyframes chatjt-spin {
290
290
  to { transform: rotate(360deg); }
291
291
  }
@@ -293,10 +293,10 @@ 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(Q),()=>{document.head.removeChild(Q)}},[]),ie.jsxDEV(ie.Fragment,{children:[!u&&ie.jsxDEV("button",{id:"chatjt-open-button",style:tt,onClick:()=>h(!0),onMouseEnter:Q=>{Q.currentTarget.style.transform="translateY(-10%) scale(1.05)",Q.currentTarget.style.boxShadow="0 4px 12px rgba(0, 0, 0, 0.2)"},onMouseLeave:Q=>{Q.currentTarget.style.transform="",Q.currentTarget.style.boxShadow="0 4px 8px rgba(0, 0, 0, 0.2)"},children:ie.jsxDEV(sM,{},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/ExtensionPanel.tsx",lineNumber:425,columnNumber:21},void 0)},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/ExtensionPanel.tsx",lineNumber:412,columnNumber:17},void 0),ie.jsxDEV("div",{id:"chatjt-panel",ref:L,style:X,children:[ie.jsxDEV("div",{id:"chatjt-resizer",ref:U,style:ot,onMouseMove:Q=>{R?(Q.currentTarget.style.background="linear-gradient(to right, transparent 95%, #1591EA90 95%)",Q.currentTarget.style.left="-160px",Q.currentTarget.style.width="160px"):(Q.currentTarget.style.left="-8px",Q.currentTarget.style.width="8px")},onMouseEnter:Q=>{R||(Q.currentTarget.style.background="#11182750")},onMouseLeave:Q=>{R||(Q.currentTarget.style.background="transparent")}},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/ExtensionPanel.tsx",lineNumber:436,columnNumber:17},void 0),ie.jsxDEV("div",{id:"chatjt-iframe-container",style:yt,children:[g?ie.jsxDEV("div",{id:"chatjt-loading",style:B,children:ie.jsxDEV("div",{style:K,children:[ie.jsxDEV("div",{style:W,children:"⚠️"},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/ExtensionPanel.tsx",lineNumber:468,columnNumber:33},void 0),ie.jsxDEV("div",{style:wt,children:"Erro ao carregar ChatJT"},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/ExtensionPanel.tsx",lineNumber:469,columnNumber:33},void 0),ie.jsxDEV("button",{style:dt,onClick:F,onMouseEnter:Q=>{Q.currentTarget.style.background="rgba(255,255,255,0.3)",Q.currentTarget.style.borderColor="rgba(255,255,255,0.5)",Q.currentTarget.style.transform="translateY(-1px)"},onMouseLeave:Q=>{Q.currentTarget.style.background="rgba(255,255,255,0.2)",Q.currentTarget.style.borderColor="rgba(255,255,255,0.3)",Q.currentTarget.style.transform=""},onMouseDown:Q=>{Q.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:470,columnNumber:33},void 0)]},void 0,!0,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/ExtensionPanel.tsx",lineNumber:467,columnNumber:29},void 0)},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/ExtensionPanel.tsx",lineNumber:466,columnNumber:25},void 0):ie.jsxDEV(ie.Fragment,{children:[!p&&ie.jsxDEV("div",{id:"chatjt-loading",style:B,children:ie.jsxDEV("div",{style:K,children:[ie.jsxDEV("div",{style:ut},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/ExtensionPanel.tsx",lineNumber:496,columnNumber:41},void 0),ie.jsxDEV("div",{style:wt,children:"Carregando ChatJT..."},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/ExtensionPanel.tsx",lineNumber:497,columnNumber:41},void 0)]},void 0,!0,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/ExtensionPanel.tsx",lineNumber:495,columnNumber:37},void 0)},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/ExtensionPanel.tsx",lineNumber:494,columnNumber:33},void 0),ie.jsxDEV("iframe",{id:"chatjt-iframe",ref:N,src:l,style:Gt,onLoad:P,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:501,columnNumber:29},void 0)]},void 0,!0,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/ExtensionPanel.tsx",lineNumber:492,columnNumber:25},void 0),ie.jsxDEV("div",{style:st,children:ie.jsxDEV("div",{style:Z,children:"Solte para fechar"},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/ExtensionPanel.tsx",lineNumber:516,columnNumber:25},void 0)},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/ExtensionPanel.tsx",lineNumber:515,columnNumber:21},void 0)]},void 0,!0,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/ExtensionPanel.tsx",lineNumber:464,columnNumber:17},void 0),ie.jsxDEV("div",{id:"chatjt-close-button",style:St,title:"Fechar painel","aria-label":"Fechar painel",onClick:()=>h(!1),onMouseEnter:Q=>{Q.currentTarget.style.transform="translateY(-50%) scale(1.1)",Q.currentTarget.style.boxShadow="0 4px 12px rgba(0, 0, 0, 0.2)"},onMouseLeave:Q=>{Q.currentTarget.style.transform="translateY(-50%)",Q.currentTarget.style.boxShadow=""},children:ie.jsxDEV(aM,{size:24},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/ExtensionPanel.tsx",lineNumber:538,columnNumber:21},void 0)},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/ExtensionPanel.tsx",lineNumber:523,columnNumber:17},void 0)]},void 0,!0,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/ExtensionPanel.tsx",lineNumber:430,columnNumber:13},void 0)]},void 0,!0,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/ExtensionPanel.tsx",lineNumber:409,columnNumber:9},void 0)},Of="chatjt-container",Bv="chatjt-open-button",Fv="chatjt-panel";class oM{root=null;container=null;async init(){try{if(document.getElementById(Of))return;this.container=document.createElement("div"),this.container.id=Of,this.container.style.pointerEvents="auto",document.body.appendChild(this.container),this.root=eM.createRoot(this.container),this.root.render(XD.createElement(rM)),O.info("UI da extensão inicializada via React"),setTimeout(()=>{const t=document.getElementById(Bv),i=document.getElementById(Fv);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(Of);t&&t.remove();const i=document.getElementById(Bv);i&&i.remove();const a=document.getElementById(Fv);a&&a.remove(),O.info("UI da extensão destruída")}catch(t){O.error("Erro ao destruir UI:",t)}}}const Nf={EXTENSION:"extension",IFRAME:"iframe"},fe={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",METADATA_DETECTION:"METADATA_DETECTION",METADATA_CLEANUP:"METADATA_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 lM=class{source;isHandshakeComplete=!1;messageQueue=[];listeners=new Map;iframe;version="0.0.0";constructor(t=Nf.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)}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):t.source!==Nf.IFRAME?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[fe.GENERIC_ERROR,fe.UNSUPPORTED_MESSAGE].includes(t)}handleMessage(t,i){if(O.info(`Mensagem recebida: ${t.type}`,t),t.type===fe.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,this.version);O.info("Ações disponíveis para a URL do iframe:",i),this.sendMessage(fe.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):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)}set_version(t){this.version=t}get_version(){return this.version}};const un=typeof process=="object"&&process+""=="[object process]"&&!process.versions.nw&&!(process.versions.electron&&process.type&&process.type!=="browser"),kf=[.001,0,0,.001,0,0],Lf=1.35,kn={ANY:1,DISPLAY:2,PRINT:4,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,IS_EDITING:128,OPLIST:256},Ps={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},jv="pdfjs_internal_editor_",xt={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},gu={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},yu={ERRORS:0,WARNINGS:1,INFOS:5},bu={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},vu={moveTo:0,lineTo:1,curveTo:2,closePath:3},uM={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};let Su=yu.WARNINGS;function dM(l){Number.isInteger(l)&&(Su=l)}function hM(){return Su}function Eu(l){Su>=yu.INFOS&&console.log(`Info: ${l}`)}function Ct(l){Su>=yu.WARNINGS&&console.log(`Warning: ${l}`)}function se(l){throw new Error(l)}function Me(l,t){l||se(t)}function fM(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=bM(l)}catch{}const a=t?URL.parse(l,t):URL.parse(l);return fM(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 _a=function(){function t(i,a){this.message=i,this.name=a}return t.prototype=new Error,t.constructor=t,t}();class Vv extends _a{constructor(t,i){super(t,"PasswordException"),this.code=i}}class If extends _a{constructor(t,i){super(t,"UnknownErrorException"),this.details=i}}class Pf extends _a{constructor(t){super(t,"InvalidPDFException")}}class Au extends _a{constructor(t,i,a){super(t,"ResponseException"),this.status=i,this.missing=a}}class pM extends _a{constructor(t){super(t,"FormatError")}}class Us extends _a{constructor(t){super(t,"AbortException")}}function qv(l){(typeof l!="object"||l?.length===void 0)&&se("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 Qo(l){typeof l!="string"&&se("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 Uf=Array.from(Array(256).keys(),l=>l.toString(16).padStart(2,"0"));class pt{static makeHexColor(t,i,a){return`#${Uf[t]}${Uf[i]}${Uf[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,N=L,U=h*S+m,P=U;if(c!==0||u!==0){const j=c*g,F=c*b,tt=u*y,X=u*S;A+=tt,x+=tt,R+=X,_+=X,L+=j,P+=j,U+=F,N+=F}a[0]=Math.min(a[0],A,R,_,x),a[1]=Math.min(a[1],L,U,N,P),a[2]=Math.max(a[2],A,R,_,x),a[3]=Math.max(a[3],L,U,N,P)}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 zf=null,Yv=null;function vM(l){return zf||(zf=/([\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,Yv=new Map([["ſt","ſt"]])),l.replaceAll(zf,(t,i,a)=>i?i.normalize("NFKC"):Yv.get(a))}function Xv(){if(typeof crypto.randomUUID=="function")return crypto.randomUUID();const l=new Uint8Array(32);return crypto.getRandomValues(l),qv(l)}const Hf="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 Wv(l){return Uint8Array.prototype.toBase64?l.toBase64():btoa(qv(l))}function EM(l){return Uint8Array.fromBase64?Uint8Array.fromBase64(l):Qo(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 es="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 Ko(l,t="text"){if(Jo(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 Zo{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 Zo({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 pt.applyTransform(a,this.transform),a}convertToViewportRectangle(t){const i=[t[0],t[1]];pt.applyTransform(i,this.transform);const a=[t[2],t[3]];return pt.applyTransform(a,this.transform),[i[0],i[1],a[0],a[1]]}convertToPdfPoint(t,i){const a=[t,i];return pt.applyInverseTransform(a,this.transform),a}}class Bf extends _a{constructor(t,i=0){super(t,"RenderingCancelledException"),this.extraDelay=i}}function _u(l){const t=l.length;let i=0;for(;i<t&&l[i].trim()==="";)i++;return l.substring(i,i+5).toLowerCase()==="data:"}function Ff(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(_u(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 Qv{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 Jo(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 jf{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 Zo({viewBox:c,userUnit:1,scale:t,rotation:i})}function Tu(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 xM(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,Tu(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 Ta(l,t,i=!1,a=!0){if(t instanceof Zo){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 $f=["image/apng","image/avif","image/bmp","image/gif","image/jpeg","image/png","image/svg+xml","image/webp","image/x-icon"];class tl{#t=null;#e=null;#n;#i=null;#a=null;#s=null;#r=null;static#o=null;constructor(t){this.#n=t,tl.#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",tl.#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",tl.#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 CM{#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 Kv(l,t,i){for(const a of i)t.addEventListener(a,l[a].bind(l))}class RM{#t=0;get id(){return`${jv}${this.#t++}`}}class Gf{#t=Xv();#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 Ko(i,"blob")):i instanceof File?r=a.file=i:i instanceof Blob&&(r=i),r.type==="image/svg+xml"){const c=Gf._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 el{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 Vf{static _colorsMapping=new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]]);get _colors(){const t=new Map([["CanvasText",null],["Canvas",null]]);return xM(t),zt(this,"_colors",t)}convert(t){const i=Tu(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 Vf._colorsMapping.get(a);return i}getHexCode(t){const i=this._colors.get(t);return i?pt.makeHexColor(...i):t}}class zs{#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;#C=!1;#x=null;#N=null;#U=null;#k=null;#F=null;#w=xt.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=zs.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 el([[["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.#k?.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===xt.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(xt.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 CM(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!==xt.HIGHLIGHT&&this.#w!==xt.NONE)&&(this.#w===xt.HIGHLIGHT&&this.showAllEditors("highlight",!0,!0),this.#D=this.isShiftKeyDown,!this.isShiftKeyDown)){const c=this.#w===xt.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===xt.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.#N=[i,t],i._focusEventsAllowed=!1;break}}focus(){if(!this.#N)return;const[t,i]=this.#N;this.#N=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){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!==xt.NONE&&!this.isEditorHandlingKeyboard&&zs._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===xt.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!==xt.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===xt.NONE){this.setEditingState(!1),this.#dt(),this._editorUndoBar?.hide(),this.#P.resolve();return}t===xt.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.#k?.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!==xt.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 Gf)}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===xt.NONE&&!a.hasBeenModified||a.renderAnnotationElement(t))}setMissingCanvas(t,i,a){const r=this.#k?.get(t);r&&(r.setCanvas(i,a),this.#k.delete(t))}addMissingCanvas(t,i){(this.#k||=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 wu{#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 xu{#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)<=xu.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 N=[(r+u)/2,(c+h)/2];this.#s?.(N,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 gt{#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;#_=gt._zIndex++;static _borderLineWidth=-1;static _colorManager=new Vf;static _zIndex=1;static _telemetryTimeout=1e3;static get _resizerKeyboardManager(){const t=gt.prototype._resizeWithKeyboard,i=zs.TRANSLATE_SMALL,a=zs.TRANSLATE_BIG;return zt(this,"_resizerKeyboardManager",new el([[["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"],gt.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(gt._l10n??=t,gt._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"}),gt._borderLineWidth!==-1)return;const a=getComputedStyle(document.documentElement);gt._borderLineWidth=parseFloat(a.getPropertyValue("--outline-width"))||0}static updateDefaultParams(t,i){}static get defaultPropertiesToUpdate(){return[]}static isHandlingMimeForPasting(t){return!1}static paste(t,i){se("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}=gt,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 gt.#R(t,i,this.parentRotation)}pageTranslationToScreen(t,i){return gt.#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.#N.bind(this,a),{signal:i}),r.addEventListener("contextmenu",Yn,{signal:i}),r.tabIndex=-1}this.div.prepend(this.#u)}#N(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.#k()};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(){}#k(){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=gt.MIN_SIZE/a,g=gt.MIN_SIZE/r,y=this.#C(this.rotation),b=(B,K)=>[y[0]*B+y[2]*K,y[1]*B+y[3]*K],S=this.#C(360-this.rotation),A=(B,K)=>[S[0]*B+S[2]*K,S[1]*B+S[3]*K];let _,R,x=!1,L=!1;switch(t){case"topLeft":x=!0,_=(B,K)=>[0,0],R=(B,K)=>[B,K];break;case"topMiddle":_=(B,K)=>[B/2,0],R=(B,K)=>[B/2,K];break;case"topRight":x=!0,_=(B,K)=>[B,0],R=(B,K)=>[0,K];break;case"middleRight":L=!0,_=(B,K)=>[B,K/2],R=(B,K)=>[0,K/2];break;case"bottomRight":x=!0,_=(B,K)=>[B,K],R=(B,K)=>[0,0];break;case"bottomMiddle":_=(B,K)=>[B/2,K],R=(B,K)=>[B/2,0];break;case"bottomLeft":x=!0,_=(B,K)=>[0,K],R=(B,K)=>[B,0];break;case"middleLeft":L=!0,_=(B,K)=>[0,K/2],R=(B,K)=>[B,K/2];break}const N=_(h,p),U=R(h,p);let P=b(...U);const j=gt._round(c+P[0]),F=gt._round(u+P[1]);let tt=1,X=1,st,Z;if(i.fromKeyboard)({deltaX:st,deltaY:Z}=i);else{const{screenX:B,screenY:K}=i,[ut,wt]=this.#c;[st,Z]=this.screenToPageTranslation(B-ut,K-wt),this.#c[0]=B,this.#c[1]=K}if([st,Z]=A(st/a,Z/r),x){const B=Math.hypot(h,p);tt=X=Math.max(Math.min(Math.hypot(U[0]-N[0]-st,U[1]-N[1]-Z)/B,1/h,1/p),m/h,g/p)}else L?tt=dn(Math.abs(U[0]-N[0]-st),m,1)/h:X=dn(Math.abs(U[1]-N[1]-Z),g,1)/p;const ot=gt._round(h*tt),St=gt._round(p*X);P=b(...R(ot,St));const yt=j-P[0],Gt=F-P[1];this.#f||=[this.x,this.y,this.width,this.height],this.width=ot,this.height=St,this.x=yt,this.y=Gt,this.setDims(a*ot,r*St),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 tl(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(gt._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 wu(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 wu(this)),this.#i.data=t}setCommentData(t){this.#i||(this.#i=new wu(this)),this.#i.setInitialText(t)}get hasEditedComment(){return this.#i?.hasBeenEdited()}async editComment(){this.#i||(this.#i=new wu(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 xu({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=gt.MIN_SIZE/p,_=gt.MIN_SIZE/m;c=Math.max(Math.min(c,1/b,1/S),A/b,_/S);const R=gt._round(b*c),x=gt._round(S*c);if(R===b&&x===S)return;this.#f||=[g,y,b,S];const L=h(b/2,S/2),N=gt._round(g+L[0]),U=gt._round(y+L[1]),P=h(R/2,x/2);this.x=N-P[0],this.y=U-P[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.#k()}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){se("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",gt._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",gt._l10nResizer[m])}}this.#I(0),this.#v=!0,this.#u.firstChild.focus({focusVisible:!0}),t.preventDefault(),t.stopImmediatePropagation()}#q(t){gt._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.#k()}_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)},gt._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 gt{constructor(t){super(t),this.annotationElementId=t.annotationElementId,this.deleted=!0}serialize(){return this.serializeDeleted()}}const Zv=3285377520,Xn=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&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 qf=Object.freeze({map:null,hash:"",transfer:void 0});class Yf{#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 gt)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 gt&&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 qf;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 gt?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}:qf}get editorStats(){let t=null;const i=new Map;for(const a of this.#n.values()){if(!(a instanceof gt))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 gt)||!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 Yf{#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(){se("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}se("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,P){return U.charCodeAt(P)<<24|U.charCodeAt(P+1)<<16|U.charCodeAt(P+2)<<8|U.charCodeAt(P+3)&255}function r(U,P,j,F){const tt=U.substring(0,P),X=U.substring(P+j);return tt+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,P){if(++m>30){Ct("Load test font never loaded."),P();return}if(p.font="30px "+U,p.fillText(".",0,20),p.getImageData(0,0,1,1).data[3]>0){P();return}setTimeout(g.bind(null,U,P))}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 x=`url(data:font/opentype;base64,${btoa(b)});`,L=`@font-face {font-family:"${y}";src:${x}}`;this.insertRule(L);const N=this._document.createElement("div");N.style.visibility="hidden",N.style.width=N.style.height="10px",N.style.position="absolute",N.style.top=N.style.left="0px";for(const U of[t.loadedName,y]){const P=this._document.createElement("span");P.textContent="Hi",P.style.fontFamily=U,N.append(P)}this._document.body.append(N),g(y,()=>{N.remove(),i.complete()})}}class NM{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){Ct(`getPathGenerator - ignoring character: "${u}".`)}const c=new Path2D(r||"");return this.fontExtraProperties||t.delete(a),this.compiledGlyphs[i]=c}}function kM(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 Qo(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 Cu(l){if(typeof l!="string")return null;if(l.endsWith("/"))return l;throw new Error(`Invalid factory url: "${l}" must include trailing slash.`)}const Xf=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,Xf,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 Ru={DATA:1,ERROR:2},Ne={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 Us||l instanceof Pf||l instanceof Vv||l instanceof Au||l instanceof If)return l;switch(l instanceof Error||typeof l=="object"&&l!==null||se('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),l.name){case"AbortException":return new Us(l.message);case"InvalidPDFException":return new Pf(l.message);case"PasswordException":return new Vv(l.message,l.code);case"ResponseException":return new Au(l.message,l.status,l.missing);case"UnknownErrorException":return new If(l.message,l.details)}return new If(l.message,l.toString())}class nl{#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===Ru.DATA)r.resolve(t.data);else if(t.callback===Ru.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:Ru.DATA,callbackId:t.callbackId,data:u})},function(u){c.postMessage({sourceName:a,targetName:r,callback:Ru.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:Ne.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:Ne.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:Ne.ENQUEUE,streamId:i,chunk:m},y)},close(){this.isCancelled||(this.isCancelled=!0,c.postMessage({sourceName:a,targetName:r,stream:Ne.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:Ne.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:Ne.START_COMPLETE,streamId:i,success:!0})},function(m){c.postMessage({sourceName:a,targetName:r,stream:Ne.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 Ne.START_COMPLETE:t.success?u.startCall.resolve():u.startCall.reject(An(t.reason));break;case Ne.PULL_COMPLETE:t.success?u.pullCall.resolve():u.pullCall.reject(An(t.reason));break;case Ne.PULL:if(!h){c.postMessage({sourceName:a,targetName:r,stream:Ne.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:Ne.PULL_COMPLETE,streamId:i,success:!0})},function(m){c.postMessage({sourceName:a,targetName:r,stream:Ne.PULL_COMPLETE,streamId:i,reason:An(m)})});break;case Ne.ENQUEUE:if(Me(u,"enqueue should have stream controller"),u.isClosed)break;u.controller.enqueue(t.chunk);break;case Ne.CLOSE:if(Me(u,"close should have stream controller"),u.isClosed)break;u.isClosed=!0,u.controller.close(),this.#a(u,i);break;case Ne.ERROR:Me(u,"error should have stream controller"),u.controller.error(An(t.reason)),this.#a(u,i);break;case Ne.CANCEL_COMPLETE:t.success?u.cancelCall.resolve():u.cancelCall.reject(An(t.reason)),this.#a(u,i);break;case Ne.CANCEL:if(!h)break;const p=An(t.reason);Promise.try(h.onCancel||e0,p).then(function(){c.postMessage({sourceName:a,targetName:r,stream:Ne.CANCEL_COMPLETE,streamId:i,success:!0})},function(m){c.postMessage({sourceName:a,targetName:r,stream:Ne.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){se("Abstract method `_createCanvas` called.")}}class zM 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){se("Abstract method `_fetch` called.")}}class s0 extends i0{async _fetch(t){const i=await Ko(t,this.isCompressed?"arraybuffer":"text");return i instanceof ArrayBuffer?new Uint8Array(i):Qo(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 HM 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(es,"svg");a.setAttribute("width",0),a.setAttribute("height",0),this.#n=this.#a.createElementNS(es,"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&&(_u(i)?Ct('#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=pt.makeHexColor(...u);const h=this.#y(i);if(i=pt.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,N)=>{const U=new Array(256),P=(y-g)/N,j=x/255,F=(L-x)/(255*N);let tt=0;for(let X=0;X<=N;X++){const st=Math.round(g+X*P),Z=j+X*F;for(let ot=tt;ot<=st;ot++)U[ot]=Z;tt=st+1}for(let X=tt;X<256;X++)U[X]=U[tt-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(es,"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(es,"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(es,"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(es,i);r.setAttribute("type","discrete"),r.setAttribute("tableValues",a),t.append(r)}#m(t,i,a,r){const c=this.#a.createElementNS(es,"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(es,"feComponentTransfer");i.append(a),this.#d(a,"feFuncA",t)}#y(t){return this.#c.style.color=t,Tu(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){se("Abstract method `_fetch` called.")}}class o0 extends r0{async _fetch(t){const i=await Ko(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){se("Abstract method `_fetch` called.")}}class c0 extends l0{async _fetch(t){const i=await Ko(t,"arraybuffer");return new Uint8Array(i)}}un&&Ct("Please use the `legacy` build in Node.js environments.");async function Wf(l){const i=await process.getBuiltinModule("fs").promises.readFile(l);return new Uint8Array(i)}class BM extends a0{}class FM 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:ne&&ne.tagName.toUpperCase()==="SCRIPT"&&ne.src||new URL("corisco.umd.js",document.baseURI).href)("@napi-rs/canvas").createCanvas(t,i)}}class jM extends i0{async _fetch(t){return Wf(t)}}class $M extends r0{async _fetch(t){return Wf(t)}}class GM extends l0{async _fetch(t){return Wf(t)}}const qe={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};function Qf(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 Kf{isModifyingCurrentTransform(){return!1}getPattern(){se("Abstract method `getPattern` called.")}}class VM extends Kf{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=pt.transform(a,[1,0,0,1,u[0],u[1]]),g.transform(...i.baseTransform),this.matrix&&g.transform(...this.matrix),Qf(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 Qf(t,this._bbox),c=this._createGradient(t);return c}}function Zf(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 N=m[c],U=m[c+1],P=m[c+2],j=m[u],F=m[u+1],tt=m[u+2],X=m[h],st=m[h+1],Z=m[h+2],ot=Math.round(A),St=Math.round(L);let yt,Gt,B,K,ut,wt,W,dt;for(let Q=ot;Q<=St;Q++){if(Q<R){const Wt=Q<A?0:(A-Q)/(A-R);yt=S-(S-_)*Wt,Gt=N-(N-j)*Wt,B=U-(U-F)*Wt,K=P-(P-tt)*Wt}else{let Wt;Q>L?Wt=1:R===L?Wt=0:Wt=(R-Q)/(R-L),yt=_-(_-x)*Wt,Gt=j-(j-X)*Wt,B=F-(F-st)*Wt,K=tt-(tt-Z)*Wt}let vt;Q<A?vt=0:Q>L?vt=1:vt=(A-Q)/(A-L),ut=S-(S-x)*vt,wt=N-(N-X)*vt,W=U-(U-st)*vt,dt=P-(P-Z)*vt;const Vt=Math.round(Math.min(yt,ut)),ae=Math.round(Math.max(yt,ut));let At=y*Q+Vt*4;for(let Wt=Vt;Wt<=ae;Wt++)vt=(yt-Wt)/(yt-ut),vt<0?vt=0:vt>1&&(vt=1),g[At++]=Gt-(Gt-wt)*vt|0,g[At++]=B-(B-W)*vt|0,g[At++]=K-(K-dt)*vt|0,g[At++]=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++)Zf(l,i,a[g],a[g+1],a[g+h],r[g],r[g+1],r[g+h]),Zf(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)Zf(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 Kf{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),N=L.context,U=N.createImageData(y,b);if(i){const j=U.data;for(let F=0,tt=j.length;F<tt;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 N.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){Qf(t,this._bbox);const c=new Float32Array(2);if(r===qe.SHADING)pt.singularValueDecompose2dScale(be(t),c);else if(this.matrix){pt.singularValueDecompose2dScale(this.matrix,c);const[h,p]=c;pt.singularValueDecompose2dScale(i.baseTransform,c),c[0]*=h,c[1]*=p}else pt.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 Kf{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 u0={COLORED:1,UNCOLORED:2};class Jf{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),Eu("TilingType: "+c);const g=i[0],y=i[1],b=i[2],S=i[3],A=b-g,_=S-y,R=new Float32Array(2);pt.singularValueDecompose2dScale(this.matrix,R);const[x,L]=R;pt.singularValueDecompose2dScale(this.baseTransform,R);const N=x*R[0],U=L*R[1];let P=A,j=_,F=!1,tt=!1;const X=Math.ceil(p*N),st=Math.ceil(m*U),Z=Math.ceil(A*N),ot=Math.ceil(_*U);X>=Z?P=p:F=!0,st>=ot?j=m:tt=!0;const St=this.getSizeAndScale(P,this.ctx.canvas.width,N),yt=this.getSizeAndScale(j,this.ctx.canvas.height,U),Gt=t.cachedCanvases.getCanvas("pattern",St.size,yt.size),B=Gt.context,K=h.createCanvasGraphics(B);if(K.groupLevel=t.groupLevel,this.setFillAndStrokeStyleToContext(K,r,u),B.translate(-St.scale*g,-yt.scale*y),K.transform(St.scale,0,0,yt.scale,0,0),B.save(),this.clipBbox(K,g,y,b,S),K.baseTransform=be(K.ctx),K.executeOperatorList(a),K.endDrawing(),B.restore(),F||tt){const ut=Gt.canvas;F&&(P=p),tt&&(j=m);const wt=this.getSizeAndScale(P,this.ctx.canvas.width,N),W=this.getSizeAndScale(j,this.ctx.canvas.height,U),dt=wt.size,Q=W.size,vt=t.cachedCanvases.getCanvas("pattern-workaround",dt,Q),Vt=vt.context,ae=F?Math.floor(A/p):0,At=tt?Math.floor(_/m):0;for(let Wt=0;Wt<=ae;Wt++)for(let Kt=0;Kt<=At;Kt++)Vt.drawImage(ut,dt*Wt,Q*Kt,dt,Q,0,0,dt,Q);return{canvas:vt.canvas,scaleX:wt.scale,scaleY:W.scale,offsetX:g,offsetY:y}}return{canvas:Gt.canvas,scaleX:St.scale,scaleY:yt.scale,offsetX:g,offsetY:y}}getSizeAndScale(t,i,a){const r=Math.max(Jf.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),pt.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 pM(`Unsupported paint type: ${i}`)}}isModifyingCurrentTransform(){return!1}getPattern(t,i,a,r){let c=a;r!==qe.SHADING&&(c=pt.transform(c,i.baseTransform),this.matrix&&(c=pt.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 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,KM=15,f0=10,_n=16,tp=new DOMMatrix,Ln=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 Du(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,N=Math.round(L),U=h*S+_,P=Math.round(U),j=(u+p)*g+A,F=Math.abs(Math.round(j)-N)||1,tt=(h+m)*S+_,X=Math.abs(Math.round(tt)-P)||1;return l.setTransform(Math.sign(g),0,0,Math.sign(S),N,P),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 L=h*b+A,N=Math.round(L),U=u*y+_,P=Math.round(U),j=(h+m)*b+A,F=Math.abs(Math.round(j)-N)||1,tt=(u+p)*y+_,X=Math.abs(Math.round(tt)-P)||1;return l.setTransform(0,Math.sign(y),Math.sign(b),0,N,P),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),x=Math.hypot(b,S);return[R*p,x*m]}class p0{alphaIsShape=!1;fontSize=0;fontSizeScale=1;textMatrix=null;textMatrixScale=1;fontMatrix=kf;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||se("Stroke bounding box must include transform."),pt.singularValueDecompose2dScale(i,Ln);const r=Ln[0]*this.lineWidth/2,c=Ln[1]*this.lineWidth/2;a[0]-=r,a[1]-=c,a[2]+=r,a[3]+=c}return a}updateClipFromPath(){const t=pt.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 pt.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===gu.GRAYSCALE_1BPP){const R=g.byteLength,x=new Uint32Array(y.buffer,0,y.byteLength>>2),L=x.length,N=a+7>>3,U=4294967295,P=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 tt=j>N?a:j*8-7,X=tt&-8;let st=0,Z=0;for(;F<X;F+=8)Z=g[p++],x[m++]=Z&128?U:P,x[m++]=Z&64?U:P,x[m++]=Z&32?U:P,x[m++]=Z&16?U:P,x[m++]=Z&8?U:P,x[m++]=Z&4?U:P,x[m++]=Z&2?U:P,x[m++]=Z&1?U:P;for(;F<tt;F++)st===0&&(Z=g[p++],st=128),x[m++]=Z&st?U:P,st>>=1}for(;m<L;)x[m++]=0;l.putImageData(h,0,b*_n)}}else if(t.kind===gu.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===gu.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}=QM({src:m,srcPos:p,dest:g,width:a,height:b,nonBlackColor:0})),l.putImageData(h,0,y*_n)}}function il(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 Mu(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;pt.singularValueDecompose2dScale(l,Ln);const i=Math.fround(Ri.pixelRatio*Tr.PDF_TO_CSS_UNITS);return Ln[0]<=i&&Ln[1]<=i}const tO=["butt","round","square"],eO=["miter","round","bevel"],nO={},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 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(...be(this.compositeCtx))}this.ctx.save(),Mu(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()+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!==bu.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 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 st=p.get(m);if(st&&!u){const Z=Math.round(Math.min(h[0],h[2])+h[4]),ot=Math.round(Math.min(h[1],h[3])+h[5]);return{canvas:st,offsetX:Z,offsetY:ot}}g=st}g||(y=this.cachedCanvases.getCanvas("maskCanvas",a,r),g0(y.context,t));let b=pt.transform(h,[1/a,0,0,-1/r,0,0]);b=pt.transform(b,[1,0,0,1,0,-r]);const S=wr.slice();pt.axialAlignedBoundingBox([0,0,a,r],b,S);const[A,_,R,x]=S,L=Math.round(R-A)||1,N=Math.round(x-_)||1,U=this.cachedCanvases.getCanvas("fillCanvas",L,N),P=U.context,j=A,F=_;P.translate(-j,-F),P.transform(...b),g||(g=this._scaleImage(y.canvas,Ci(P)),g=g.img,p&&u&&p.set(m,g)),P.imageSmoothingEnabled=y0(be(P),t.interpolate),Du(P,g,0,0,g.width,g.height,0,0,a,r),P.globalCompositeOperation="source-in";const tt=pt.transform(Ci(P),[1,0,0,1,-j,-F]);return P.fillStyle=u?c.getPattern(i,this,tt,qe.FILL):c,P.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()),il(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(),il(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&&il(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&&il(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 vu.moveTo:c.moveTo(r[u++],r[u++]);break;case vu.lineTo:c.lineTo(r[u++],r[u++]);break;case vu.curveTo:c.bezierCurveTo(r[u++],r[u++],r[u++],r[u++],r[u++],r[u++]);break;case vu.closePath:c.closePath();break;default:Ct(`Unrecognized drawing path operator: ${r[u-1]}`);break}r=c}pt.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=nO}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||kf,(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<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:N,d:U}=R,P=pt.inverseTransform(c),j=pt.transform([x,L,N,U,0,0],P);pt.singularValueDecompose2dScale(j,Ln),u.lineWidth*=Math.max(Ln[0],Ln[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 N=i.lineWidth;const U=i.textMatrixScale;if(U===0||N===0){const F=i.textRenderingMode&sn.FILL_STROKE_MASK;(F===sn.STROKE||F===sn.FILL_STROKE)&&(N=this.getSinglePixelWidth())}else N/=U;if(u!==1&&(c.scale(u,u),N/=u),c.lineWidth=N,a.isInvalidPDFjsFont){const F=[];let tt=0;for(const X of t)F.push(X.unicode),tt+=X.width;c.fillText(F.join(""),0,0),i.x+=tt*_*g,c.restore(),this.compose();return}let P=0,j;for(j=0;j<y;++j){const F=t[j];if(typeof F=="number"){P+=S*F*r/1e3;continue}let tt=!1;const X=(F.isSpace?p:0)+h,st=F.fontChar,Z=F.accent;let ot,St,yt=F.width;if(b){const B=F.vmetric||A,K=-(F.vmetric?B[1]:yt*.5)*_,ut=B[2]*_;yt=B?-B[0]:yt,ot=K/u,St=(P+ut)/u}else ot=P/u,St=0;if(a.remeasure&&yt>0){const B=c.measureText(st).width*1e3/r*u;if(yt<B&&this.isFontSubpixelAAEnabled){const K=yt/B;tt=!0,c.save(),c.scale(K,1),ot/=K}else yt!==B&&(ot+=(yt-B)/2e3*r/u)}if(this.contentVisible&&(F.isInFont||a.missingFile)){if(R&&!Z)c.fillText(st,ot,St);else if(this.paintChar(st,ot,St,x,L),Z){const B=ot+r*Z.offset.x/u,K=St-r*Z.offset.y/u;this.paintChar(Z.fontChar,B,K,x,L)}}const Gt=b?yt*_-X*m:yt*_+X*m;P+=Gt,tt&&c.restore()}b?i.y-=P:i.x+=P*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||kf,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,N=r.charProcOperatorList[_.operatorListId];N?this.contentVisible&&(this.save(),i.scale(c,c),i.transform(...y),this.executeOperatorList(N),this.restore()):Ct(`Type3 character "${_.operatorListId}" is not available.`);const U=[_.width,0];pt.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 Jf(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,Ci(i),qe.SHADING);const r=Ci(i);if(r){const{width:c,height:u}=i.canvas,h=wr.slice();pt.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(){se("Should not call beginInlineImage")}beginImageData(){se("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)){pt.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||Eu("TODO: Support non-isolated groups."),t.knockout&&Ct("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();pt.axialAlignedBoundingBox(t.bbox,be(i),r);const c=[0,0,i.canvas.width,i.canvas.height];r=pt.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()),il(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();pt.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(),Mu(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,pt.singularValueDecompose2dScale(be(this.ctx),Ln);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(Ln[0],0,0,-Ln[1],0,h*Ln[1]),Mu(this.ctx)}else{Mu(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=pt.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),Du(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;m0(m,t),u=this.applyTransferMapsToCanvas(m)}const h=this._scaleImage(u,Ci(r));r.imageSmoothingEnabled=y0(be(r),t.interpolate),Du(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),Du(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),tp.a=1/c,tp.d=1/u;const p=new Path2D;if(p.addPath(t,tp),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 bu)xr.prototype[l]!==void 0&&(xr.prototype[bu[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 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&kn.DISPLAY),this.#e=!!(t&kn.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&&se("Internal method `_setVisible` called."),this.#n=a,this.#i=i}}class aO{#t=null;#e=new Map;#n=null;#i=null;constructor(t,i=kn.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 Eu("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 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 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=Ff(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=Qo(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 Ou(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=cO(t);if(i.includes("%"))try{i=decodeURIComponent(i)}catch{}if(Ff(i))return i}return null}function sl(l,t){return new Au(`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:(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=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 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,_0(a,this._withCredentials,this._abortController)).then(c=>{if(t._responseOrigin=Ou(c.url),!A0(c.status))throw sl(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 Us("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 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,_0(c,this._withCredentials,this._abortController)).then(h=>{const p=Ou(h.url);if(p!==t._responseOrigin)throw new Error(`Expected range response-origin "${p}" to match "${t._responseOrigin}".`);if(!A0(h.status))throw sl(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 ep=200,np=206;function fO(l){const t=l.response;return typeof t!="string"?t:Qo(t).buffer}class pO{_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=np):r.expectedStatus=ep,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||ep;if(!(c===ep&&a.expectedStatus===np)&&c!==a.expectedStatus){a.onError(r.status);return}const h=fO(r);if(c===np){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=Ou(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=sl(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=Ou(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??=sl(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=sl(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 Us("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 al=Symbol("INITIAL_DATA");class w0{#t=Object.create(null);#e(t){return this.#t[t]||={...Promise.withResolvers(),data:al}}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===al)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!==al}delete(t){const i=this.#t[t];return!i||i.data===al?!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!==al&&(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.#x(),Ta(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,Ta(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 Us("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=pt.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.#N(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#N(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&&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 rl{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(rl.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 C0(l={}){typeof l=="string"||l instanceof URL?l={url:l}:(l instanceof ArrayBuffer||ArrayBuffer.isView(l))&&(l={data:l});const t=new ip,{docId:i}=t,a=l.url?kM(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 R0?l.range:null,m=Number.isInteger(l.rangeChunkSize)&&l.rangeChunkSize>0?l.rangeChunkSize:2**16;let g=l.worker instanceof ol?l.worker:null;const y=l.verbosity,b=typeof l.docBaseUrl=="string"&&!_u(l.docBaseUrl)?l.docBaseUrl:null,S=Cu(l.cMapUrl),A=l.cMapPacked!==!1,_=l.CMapReaderFactory||(un?jM:s0),R=Cu(l.iccUrl),x=Cu(l.standardFontDataUrl),L=l.StandardFontDataFactory||(un?$M:o0),N=Cu(l.wasmUrl),U=l.WasmFactory||(un?GM:c0),P=l.stopAtErrors!==!0,j=Number.isInteger(l.maxImageSize)&&l.maxImageSize>-1?l.maxImageSize:-1,F=l.isEvalSupported!==!1,tt=typeof l.isOffscreenCanvasSupported=="boolean"?l.isOffscreenCanvasSupported:!un,X=typeof l.isImageDecoderSupported=="boolean"?l.isImageDecoderSupported:!un&&(Ve.platform.isFirefox||!globalThis.chrome),st=Number.isInteger(l.canvasMaxAreaInBytes)?l.canvasMaxAreaInBytes:-1,Z=typeof l.disableFontFace=="boolean"?l.disableFontFace:un,ot=l.fontExtraProperties===!0,St=l.enableXfa===!0,yt=l.ownerDocument||globalThis.document,Gt=l.disableRange===!0,B=l.disableStream===!0,K=l.disableAutoFetch===!0,ut=l.pdfBug===!0,wt=l.CanvasFactory||(un?FM:zM),W=l.FilterFactory||(un?BM:HM),dt=l.enableHWA===!0,Q=l.useWasm!==!1,vt=p?p.length:l.length??NaN,Vt=typeof l.useSystemFonts=="boolean"?l.useSystemFonts:!un&&!Z,ae=typeof l.useWorkerFetch=="boolean"?l.useWorkerFetch:!!(_===s0&&L===o0&&U===c0&&S&&x&&N&&Jo(S,document.baseURI)&&Jo(x,document.baseURI)&&Jo(N,document.baseURI)),At=null;dM(y);const Wt={canvasFactory:new wt({ownerDocument:yt,enableHWA:dt}),filterFactory:new W({docId:i,ownerDocument:yt}),cMapReaderFactory:ae?null:new _({baseUrl:S,isCompressed:A}),standardFontDataFactory:ae?null:new L({baseUrl:x}),wasmFactory:ae?null:new U({baseUrl:N})};g||(g=ol.create({verbosity:y,port:Cr.workerPort}),t._worker=g);const Kt={docId:i,apiVersion:"5.4.54",data:r,password:h,disableAutoFetch:K,rangeChunkSize:m,length:vt,docBaseUrl:b,enableXfa:St,evaluatorOptions:{maxImageSize:j,disableFontFace:Z,ignoreErrors:P,isEvalSupported:F,isOffscreenCanvasSupported:tt,isImageDecoderSupported:X,canvasMaxAreaInBytes:st,fontExtraProperties:ot,useSystemFonts:Vt,useWasm:Q,useWorkerFetch:ae,cMapUrl:S,iccUrl:R,standardFontDataUrl:x,wasmUrl:N}},Te={ownerDocument:yt,pdfBug:ut,styleElement:At,loadingParams:{disableAutoFetch:K,enableXfa:St}};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",Kt,r?[r.buffer]:null);let Pn;if(p)Pn=new rO(p,{disableRange:Gt,disableStream:B});else if(!r){if(!a)throw new Error("getDocument - no `url` parameter provided.");const ss=Jo(a)?uO:un?SO:mO;Pn=new ss({url:a,length:vt,httpHeaders:c,withCredentials:u,rangeChunkSize:m,disableRange:Gt,disableStream:B})}return Xe.then(ss=>{if(t.destroyed)throw new Error("Loading aborted");if(g.destroyed)throw new Error("Worker was destroyed");const mi=new nl(i,ss,g.port),Nr=new CO(mi,t,Pn,Te,Wt,dt);t._transport=Nr,mi.send("Ready",null)})}).catch(t._capability.reject),t}class ip{static#t=0;_capability=Promise.withResolvers();_transport=null;_worker=null;docId=`d${ip.#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){se("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 xO{#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 Zo({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=Ps.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&kn.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=P=>{R.renderTasks.delete(N),x&&(this.#t=!0),this.#e(),P?(N.capability.reject(P),this._abortOperatorList({intentState:R,reason:P instanceof Error?P:new Error(P)})):N.capability.resolve(),this._stats&&(this._stats.timeEnd("Rendering"),this._stats.timeEnd("Overall"),globalThis.Stats?.enabled&&globalThis.Stats.add(this.pageNumber,this._stats))},N=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(N);const U=N.task;return Promise.all([R.displayReadyCapability.promise,p]).then(([P,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.");N.initializeGraphics({transparency:P,optionalContentConfig:j}),N.operatorListChanged()}).catch(L),U}getOperatorList({intent:t="display",annotationMode:i=Ps.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=>rl.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 Bf){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 Us(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 pe=class pe{constructor({name:t=null,port:i=null,verbosity:a=hM()}={}){Qi(this,fn);Qi(this,Hs,Promise.withResolvers());Qi(this,pi,null);Qi(this,is,null);Qi(this,Ra,null);if(this.name=t,this.destroyed=!1,this.verbosity=a,i){if(ye(pe,Ma).has(i))throw new Error("Cannot use more than one PDFWorker per port.");ye(pe,Ma).set(i,this),Ki(this,fn,Jw).call(this,i)}else Ki(this,fn,t1).call(this)}get promise(){return ye(this,Hs).promise}get port(){return ye(this,is)}get messageHandler(){return ye(this,pi)}destroy(){this.destroyed=!0,ye(this,Ra)?.terminate(),Nn(this,Ra,null),ye(pe,Ma).delete(ye(this,is)),Nn(this,is,null),ye(this,pi)?.destroy(),Nn(this,pi,null)}static create(t){const i=ye(this,Ma).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 pe(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()=>ye(this,Or,Lh)?ye(this,Or,Lh):(await import(this.workerSrc)).WorkerMessageHandler)())}};Hs=new WeakMap,pi=new WeakMap,is=new WeakMap,Ra=new WeakMap,Pu=new WeakMap,Da=new WeakMap,Ma=new WeakMap,fn=new WeakSet,kh=function(){ye(this,Hs).resolve(),ye(this,pi).send("configure",{verbosity:this.verbosity})},Jw=function(t){Nn(this,is,t),Nn(this,pi,new nl("main","worker",t)),ye(this,pi).on("ready",()=>{}),Ki(this,fn,kh).call(this)},t1=function(){if(ye(pe,Da)||ye(pe,Or,Lh)){Ki(this,fn,Bc).call(this);return}let{workerSrc:t}=pe;try{pe._isSameOrigin(window.location,t)||(t=pe._createCDNWrapper(new URL(t,window.location).href));const i=new Worker(t,{type:"module"}),a=new nl("main","worker",i),r=()=>{c.abort(),a.destroy(),i.terminate(),this.destroyed?ye(this,Hs).reject(new Error("Worker was destroyed")):Ki(this,fn,Bc).call(this)},c=new AbortController;i.addEventListener("error",()=>{ye(this,Ra)||r()},{signal:c.signal}),a.on("test",h=>{if(c.abort(),this.destroyed||!h){r();return}Nn(this,pi,a),Nn(this,is,i),Nn(this,Ra,i),Ki(this,fn,kh).call(this)}),a.on("ready",h=>{if(c.abort(),this.destroyed){r();return}try{u()}catch{Ki(this,fn,Bc).call(this)}});const u=()=>{const h=new Uint8Array;a.send("test",h,[h.buffer])};u();return}catch{Eu("The worker has been disabled.")}Ki(this,fn,Bc).call(this)},Bc=function(){ye(pe,Da)||(Ct("Setting up fake worker."),Nn(pe,Da,!0)),pe._setupFakeWorkerGlobal.then(t=>{if(this.destroyed){ye(this,Hs).reject(new Error("Worker was destroyed"));return}const i=new UM;Nn(this,is,i);const a=`fake${Zw(pe,Pu)._++}`,r=new nl(a+"_worker",a,i);t.setup(r,i),Nn(this,pi,new nl(a,a+"_worker",i)),Ki(this,fn,kh).call(this)}).catch(t=>{ye(this,Hs).reject(new Error(`Setting up fake worker failed: "${t.message}".`))})},Or=new WeakSet,Lh=function(){try{return globalThis.pdfjsWorker?.WorkerMessageHandler||null}catch{return null}},Qi(pe,Or),Qi(pe,Pu,0),Qi(pe,Da,!1),Qi(pe,Ma,new WeakMap),un&&(Nn(pe,Da,!0),Cr.workerSrc||="./pdf.worker.mjs"),pe._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},pe._createCDNWrapper=t=>{const i=`await import("${t}");`;return URL.createObjectURL(new Blob([i],{type:"text/javascript"}))},pe.fromPort=t=>{if(TM("`PDFWorker.fromPort` - please use `PDFWorker.create` instead."),!t?.port)throw new Error("PDFWorker.fromPort - invalid method signature.");return pe.create(t)};let ol=pe;class CO{#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 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 Yf)}getRenderingIntent(t,i=Ps.ENABLE,a=null,r=!1,c=!1){let u=kn.DISPLAY,h=qf;switch(t){case"any":u=kn.ANY;break;case"display":break;case"print":u=kn.PRINT;break;default:Ct(`getRenderingIntent - invalid intent: ${t}`)}const p=u&kn.PRINT&&a instanceof t0?a:this.annotationStorage;switch(i){case Ps.DISABLE:u+=kn.ANNOTATIONS_DISABLE;break;case Ps.ENABLE:break;case Ps.ENABLE_FORMS:u+=kn.ANNOTATIONS_FORMS;break;case Ps.ENABLE_STORAGE:u+=kn.ANNOTATIONS_STORAGE,h=p.serializable;break;default:Ct(`getRenderingIntent - invalid annotationMode: ${i}`)}r&&(u+=kn.IS_EDITING),c&&(u+=kn.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 Us("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 NM(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 xO(i,c,this,this._params.pdfBug);return this.#e.set(i,u),u});return this.#n.set(i,r),r}getPageIndex(t){return Xf(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(!Xf(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 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 Bf(`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 el([[["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 ll{#t=null;#e=null;#n=null;static#i=null;constructor(t){this.#e=t,this.#n=t._uiManager,ll.#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",ll.#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 cl(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=cl(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(cl)}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[cl(1-Math.min(1,t+r)),cl(1-Math.min(1,a+r)),cl(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){se("Abstract method `_createSVG` called.")}}class Nu extends OO{_createSVG(t){return document.createElementNS(es,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&&rl.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&&rl.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 NO=9,wa=new WeakSet,kO=new Date().getTimezoneOffset()*60*1e3;class N0{static create(t){switch(t.data.annotationType){case De.LINK:return new sp(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 k0(t):t.data.checkBox?new UO(t):new zO(t);case"Ch":return new HO(t);case"Sig":return new PO(t)}return new xa(t);case De.POPUP:return new ap(t);case De.FREETEXT:return new L0(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 I0(t);case De.CARET:return new VO(t);case De.INK:return new rp(t);case De.POLYGON:return new GO(t);case De.HIGHLIGHT:return new P0(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 U0(t);case De.FILEATTACHMENT:return new WO(t);default:return new Ae(t)}}}class Ae{#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 Ae._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 xa)&&!(this instanceof sp)&&(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 ap){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 k0){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:Ct("Unimplemented border style: beveled");break;case _r.INSET:Ct("Unimplemented border style: inset");break;case _r.UNDERLINE:u.borderBottomStyle="solid";break}const x=i.borderColor||null;x?(this.#e=!0,u.borderColor=pt.makeHexColor(x[0]|0,x[1]|0,x[2]|0)):u.borderWidth=0}const m=pt.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],N=t[_+2],U=t[_+3],P=g.createElement("rect"),j=(N-i)/p,F=(c-L)/m,tt=(x-N)/p,X=(L-U)/m;P.setAttribute("x",j),P.setAttribute("y",F),P.setAttribute("width",tt),P.setAttribute("height",X),S.append(P),h?.push(`<rect vector-effect="non-scaling-stroke" x="${j}" y="${F}" width="${tt}" 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 ap({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(){se("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&&!wa.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&&wa.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 sp extends Ae{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(!wa.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 Ae{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 xa extends Ae{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":pt.makeHexColor(i[0],i[1],i[2])}_setTextStyle(t){const i=["left","center","right"],{fontColor:a}=this.data.defaultAppearanceData,r=this.data.defaultAppearanceData.fontSize||NO,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/(Lf*r))||1,y=m/g;u=Math.min(r,p(y/Lf))}else{const m=Math.abs(this.data.rect[3]-this.data.rect[1]-h);u=Math.min(r,p(m/Lf))}c.fontSize=`calc(${u}px * var(--total-scale-factor))`,c.color=pt.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 xa{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),wa.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),N=[L.getHours(),L.getMinutes(),L.getSeconds()];R.value=N.map(U=>U.toString().padStart(2,"0")).join(":")}else R.value=new Date(x-kO).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 N={formattedValue:L};b&&(N.value=L),t.setValue(i,N)},selRange(x){x.target.setSelectionRange(...x.detail.selRange)},charLimit:x=>{const{charLimit:L}=x.detail,{target:N}=x;if(L===0){N.removeAttribute("maxLength");return}N.setAttribute("maxLength",L);let U=p.userValue;!U||U.length<=L||(U=U.slice(0,L),N.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:N.selectionStart,selEnd:N.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(N=>parseInt(N,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:N,selectionEnd:U}=x;let P=N,j=U;switch(_.inputType){case"deleteWordBackward":{const F=L.substring(0,N).match(/\w*[^\w]*$/);F&&(P-=F[0].length);break}case"deleteWordForward":{const F=L.substring(N).match(/^[^\w]*\w*/);F&&(j+=F[0].length);break}case"deleteContentBackward":N===U&&(P-=1);break;case"deleteContentForward":N===U&&(j+=1);break}_.preventDefault(),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:i,name:"Keystroke",value:L,change:R||"",willCommit:!1,selStart:P,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 xa{constructor(t){super(t,{isRenderable:!!t.data.hasOwnCanvas})}}class UO extends xa{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 wa.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 k0 extends xa{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(wa.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 sp{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 xa{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");wa.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 ap extends Ae{constructor(t){const{data:i,elements:a}=t;super(t,{isRenderable:Ae._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=>`${Hf}${r}`).join(",")),this.container}}class BO{#t=this.#M.bind(this);#e=this.#N.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=jf.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=pt.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=jf.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||pt.intersect(A.data.rect,h)!==null){h=A.data.rect,u=!0;break}const p=pt.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.#N(),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)}#N(){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 Ae{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0}),this.textContent=t.data.textContent,this.textPosition=t.data.textPosition,this.annotationEditorType=xt.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 Ae{#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 Ae{#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 Ae{#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 Ae{#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 I0{constructor(t){super(t),this.containerClassName="polygonAnnotation",this.svgElementName="svg:polygon"}}class VO extends Ae{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 rp extends Ae{#t=null;#e=[];constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0}),this.containerClassName="inkAnnotation",this.svgElementName="svg:polyline",this.annotationEditorType=this.data.it==="InkHighlight"?xt.HIGHLIGHT:xt.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 Ae{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0}),this.annotationEditorType=xt.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 Ae{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 Ae{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 Ae{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 Ae{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0}),this.annotationEditorType=xt.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 Ae{#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 op{#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=`${Hf}${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;Ta(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 Nu,annotationStorage:t.annotationStorage||new Yf,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 Nu,parent:this};for(const r of t){r.borderStyle||=op._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,Ta(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 ku=/\r\n?|\n/g;class Ue extends gt{#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=zs.TRANSLATE_SMALL,r=zs.TRANSLATE_BIG;return zt(this,"_keyboardManager",new el([[["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=xt.FREETEXT;constructor(t){super({...t,name:"freeTextEditor"}),this.#t=t.color||Ue._defaultColor||gt._defaultLineColor,this.#a=t.fontSize||Ue._defaultFontSize,this.annotationElementId||this._uiManager.a11yAlert("pdfjs-editor-freetext-added-alert")}static initialize(t,i){gt.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||gt._defaultLineColor]]}get propertiesToUpdate(){return[[$t.FREETEXT_SIZE,this.#a],[$t.FREETEXT_COLOR,this.#t]]}get toolbarButtons(){return this._colorPicker||=new ll(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(Q),()=>{document.head.removeChild(Q)}},[]),ie.jsxDEV(ie.Fragment,{children:[!u&&ie.jsxDEV("button",{id:"chatjt-open-button",style:tt,onClick:()=>h(!0),onMouseEnter:Q=>{Q.currentTarget.style.transform="translateY(-10%) scale(1.05)",Q.currentTarget.style.boxShadow="0 4px 12px rgba(0, 0, 0, 0.2)"},onMouseLeave:Q=>{Q.currentTarget.style.transform="",Q.currentTarget.style.boxShadow="0 4px 8px rgba(0, 0, 0, 0.2)"},children:ie.jsxDEV(sM,{},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/ExtensionPanel.tsx",lineNumber:425,columnNumber:21},void 0)},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/ExtensionPanel.tsx",lineNumber:412,columnNumber:17},void 0),ie.jsxDEV("div",{id:"chatjt-panel",ref:L,style:X,children:[ie.jsxDEV("div",{id:"chatjt-resizer",ref:U,style:ot,onMouseMove:Q=>{C?(Q.currentTarget.style.background="linear-gradient(to right, transparent 95%, #1591EA90 95%)",Q.currentTarget.style.left="-160px",Q.currentTarget.style.width="160px"):(Q.currentTarget.style.left="-8px",Q.currentTarget.style.width="8px")},onMouseEnter:Q=>{C||(Q.currentTarget.style.background="#11182750")},onMouseLeave:Q=>{C||(Q.currentTarget.style.background="transparent")}},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/ExtensionPanel.tsx",lineNumber:436,columnNumber:17},void 0),ie.jsxDEV("div",{id:"chatjt-iframe-container",style:yt,children:[g?ie.jsxDEV("div",{id:"chatjt-loading",style:B,children:ie.jsxDEV("div",{style:K,children:[ie.jsxDEV("div",{style:W,children:"⚠️"},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/ExtensionPanel.tsx",lineNumber:468,columnNumber:33},void 0),ie.jsxDEV("div",{style:wt,children:"Erro ao carregar ChatJT"},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/ExtensionPanel.tsx",lineNumber:469,columnNumber:33},void 0),ie.jsxDEV("button",{style:dt,onClick:j,onMouseEnter:Q=>{Q.currentTarget.style.background="rgba(255,255,255,0.3)",Q.currentTarget.style.borderColor="rgba(255,255,255,0.5)",Q.currentTarget.style.transform="translateY(-1px)"},onMouseLeave:Q=>{Q.currentTarget.style.background="rgba(255,255,255,0.2)",Q.currentTarget.style.borderColor="rgba(255,255,255,0.3)",Q.currentTarget.style.transform=""},onMouseDown:Q=>{Q.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:470,columnNumber:33},void 0)]},void 0,!0,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/ExtensionPanel.tsx",lineNumber:467,columnNumber:29},void 0)},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/ExtensionPanel.tsx",lineNumber:466,columnNumber:25},void 0):ie.jsxDEV(ie.Fragment,{children:[!p&&ie.jsxDEV("div",{id:"chatjt-loading",style:B,children:ie.jsxDEV("div",{style:K,children:[ie.jsxDEV("div",{style:ut},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/ExtensionPanel.tsx",lineNumber:496,columnNumber:41},void 0),ie.jsxDEV("div",{style:wt,children:"Carregando ChatJT..."},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/ExtensionPanel.tsx",lineNumber:497,columnNumber:41},void 0)]},void 0,!0,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/ExtensionPanel.tsx",lineNumber:495,columnNumber:37},void 0)},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/ExtensionPanel.tsx",lineNumber:494,columnNumber:33},void 0),ie.jsxDEV("iframe",{id:"chatjt-iframe",ref:O,src:l,style:Gt,onLoad:P,onError:F,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:501,columnNumber:29},void 0)]},void 0,!0,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/ExtensionPanel.tsx",lineNumber:492,columnNumber:25},void 0),ie.jsxDEV("div",{style:st,children:ie.jsxDEV("div",{style:Z,children:"Solte para fechar"},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/ExtensionPanel.tsx",lineNumber:516,columnNumber:25},void 0)},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/ExtensionPanel.tsx",lineNumber:515,columnNumber:21},void 0)]},void 0,!0,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/ExtensionPanel.tsx",lineNumber:464,columnNumber:17},void 0),ie.jsxDEV("div",{id:"chatjt-close-button",style:St,title:"Fechar painel","aria-label":"Fechar painel",onClick:()=>h(!1),onMouseEnter:Q=>{Q.currentTarget.style.transform="translateY(-50%) scale(1.1)",Q.currentTarget.style.boxShadow="0 4px 12px rgba(0, 0, 0, 0.2)"},onMouseLeave:Q=>{Q.currentTarget.style.transform="translateY(-50%)",Q.currentTarget.style.boxShadow=""},children:ie.jsxDEV(aM,{size:24},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/ExtensionPanel.tsx",lineNumber:538,columnNumber:21},void 0)},void 0,!1,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/ExtensionPanel.tsx",lineNumber:523,columnNumber:17},void 0)]},void 0,!0,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/ExtensionPanel.tsx",lineNumber:430,columnNumber:13},void 0)]},void 0,!0,{fileName:"C:/Users/guilherme.moreira/git/chat-jt-extensao/apps/corisco/src/ui/ExtensionPanel.tsx",lineNumber:409,columnNumber:9},void 0)},Of="chatjt-container",Bv="chatjt-open-button",jv="chatjt-panel";class oM{root=null;container=null;async init(){try{if(document.getElementById(Of))return;this.container=document.createElement("div"),this.container.id=Of,this.container.style.pointerEvents="auto",document.body.appendChild(this.container),this.root=eM.createRoot(this.container),this.root.render(XD.createElement(rM)),k.info("UI da extensão inicializada via React"),setTimeout(()=>{const t=document.getElementById(Bv),i=document.getElementById(jv);k.info("Elementos criados:",{button:!!t,panel:!!i})},100)}catch(t){k.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(Of);t&&t.remove();const i=document.getElementById(Bv);i&&i.remove();const a=document.getElementById(jv);a&&a.remove(),k.info("UI da extensão destruída")}catch(t){k.error("Erro ao destruir UI:",t)}}}const Nf={EXTENSION:"extension",IFRAME:"iframe"},fe={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",METADATA_DETECTION:"METADATA_DETECTION",METADATA_CLEANUP:"METADATA_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 lM=class{source;isHandshakeComplete=!1;messageQueue=[];listeners=new Map;iframe;version="0.0.0";constructor(t=Nf.EXTENSION){this.source=t,this.iframe=null,this.initializeIframe(),this.setupMessageListener()}initializeIframe(){this.iframe=document.querySelector("#chatjt-iframe"),this.iframe?(k.info("Iframe encontrado e inicializado"),this.onIframeReady()):(k.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,k.info("Iframe detectado via MutationObserver"),this.onIframeReady(),t.disconnect())}})})});t.observe(document.body,{childList:!0,subtree:!0}),setTimeout(()=>{t.disconnect(),this.iframe||k.error("Timeout: Iframe não foi encontrado após 10 segundos")},1e4)}onIframeReady(){this.iframe&&(this.iframe.contentWindow?this.processQueuedMessages():this.iframe.addEventListener("load",()=>{k.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){k.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?(k.warn(`Mensagem de erro própria ignorada: ${t.type}`,t),null):t.source!==Nf.IFRAME?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[fe.GENERIC_ERROR,fe.UNSUPPORTED_MESSAGE].includes(t)}handleMessage(t,i){if(k.info(`Mensagem recebida: ${t.type}`,t),t.type===fe.HANDSHAKE){this.handleHandshake();return}if(!this.isHandshakeComplete){this.messageQueue.push({message:t,event:i}),k.info(`Mensagem enfileirada - handshake pendente: ${t.type}`);return}this.processMessage(t,i)}handleHandshake(){k.info("Handshake recebido do iframe"),this.isHandshakeComplete=!0;let t="";try{t=window.location.href}catch{t="unknown"}k.info("URL do iframe:",t);const i=VD(t,this.version);k.info("Ações disponíveis para a URL do iframe:",i),this.sendMessage(fe.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):k.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();k.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(k.info(`Enviando mensagem: ${t}`,c),!this.iframe||!this.iframe.contentWindow){k.warn(`Iframe não disponível, enfileirando mensagem: ${t}`),this.messageQueue.push({message:c,event:null});return}try{this.iframe.contentWindow.postMessage(c,"*"),k.info(`Mensagem enviada para o iframe: ${t}`)}catch(u){k.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)}set_version(t){this.version=t}get_version(){return this.version}};const un=typeof process=="object"&&process+""=="[object process]"&&!process.versions.nw&&!(process.versions.electron&&process.type&&process.type!=="browser"),kf=[.001,0,0,.001,0,0],Lf=1.35,kn={ANY:1,DISPLAY:2,PRINT:4,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,IS_EDITING:128,OPLIST:256},Ps={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},Fv="pdfjs_internal_editor_",xt={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},gu={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},yu={ERRORS:0,WARNINGS:1,INFOS:5},bu={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},vu={moveTo:0,lineTo:1,curveTo:2,closePath:3},uM={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};let Su=yu.WARNINGS;function dM(l){Number.isInteger(l)&&(Su=l)}function hM(){return Su}function Eu(l){Su>=yu.INFOS&&console.log(`Info: ${l}`)}function Ct(l){Su>=yu.WARNINGS&&console.log(`Warning: ${l}`)}function se(l){throw new Error(l)}function Me(l,t){l||se(t)}function fM(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=bM(l)}catch{}const a=t?URL.parse(l,t):URL.parse(l);return fM(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 _a=function(){function t(i,a){this.message=i,this.name=a}return t.prototype=new Error,t.constructor=t,t}();class Vv extends _a{constructor(t,i){super(t,"PasswordException"),this.code=i}}class If extends _a{constructor(t,i){super(t,"UnknownErrorException"),this.details=i}}class Pf extends _a{constructor(t){super(t,"InvalidPDFException")}}class Au extends _a{constructor(t,i,a){super(t,"ResponseException"),this.status=i,this.missing=a}}class pM extends _a{constructor(t){super(t,"FormatError")}}class Us extends _a{constructor(t){super(t,"AbortException")}}function qv(l){(typeof l!="object"||l?.length===void 0)&&se("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 Qo(l){typeof l!="string"&&se("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 Uf=Array.from(Array(256).keys(),l=>l.toString(16).padStart(2,"0"));class pt{static makeHexColor(t,i,a){return`#${Uf[t]}${Uf[i]}${Uf[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,C=r*b+p,R=C,L=h*y+m,O=L,U=h*S+m,P=U;if(c!==0||u!==0){const F=c*g,j=c*b,tt=u*y,X=u*S;A+=tt,R+=tt,C+=X,_+=X,L+=F,P+=F,U+=j,O+=j}a[0]=Math.min(a[0],A,C,_,R),a[1]=Math.min(a[1],L,U,O,P),a[2]=Math.max(a[2],A,C,_,R),a[3]=Math.max(a[3],L,U,O,P)}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 zf=null,Yv=null;function vM(l){return zf||(zf=/([\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,Yv=new Map([["ſt","ſt"]])),l.replaceAll(zf,(t,i,a)=>i?i.normalize("NFKC"):Yv.get(a))}function Xv(){if(typeof crypto.randomUUID=="function")return crypto.randomUUID();const l=new Uint8Array(32);return crypto.getRandomValues(l),qv(l)}const Hf="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 Wv(l){return Uint8Array.prototype.toBase64?l.toBase64():btoa(qv(l))}function EM(l){return Uint8Array.fromBase64?Uint8Array.fromBase64(l):Qo(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 es="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 Ko(l,t="text"){if(Jo(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 Zo{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,_,C,R;g===0?(A=Math.abs(m-t[1])*a+c,_=Math.abs(p-t[0])*a+u,C=(t[3]-t[1])*a,R=(t[2]-t[0])*a):(A=Math.abs(p-t[0])*a+c,_=Math.abs(m-t[1])*a+u,C=(t[2]-t[0])*a,R=(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=C,this.height=R}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 Zo({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 pt.applyTransform(a,this.transform),a}convertToViewportRectangle(t){const i=[t[0],t[1]];pt.applyTransform(i,this.transform);const a=[t[2],t[3]];return pt.applyTransform(a,this.transform),[i[0],i[1],a[0],a[1]]}convertToPdfPoint(t,i){const a=[t,i];return pt.applyInverseTransform(a,this.transform),a}}class Bf extends _a{constructor(t,i=0){super(t,"RenderingCancelledException"),this.extraDelay=i}}function _u(l){const t=l.length;let i=0;for(;i<t&&l[i].trim()==="";)i++;return l.substring(i,i+5).toLowerCase()==="data:"}function jf(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(_u(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 Qv{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 Jo(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 Ff{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 Zo({viewBox:c,userUnit:1,scale:t,rotation:i})}function Tu(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 xM(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,Tu(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 Ta(l,t,i=!1,a=!0){if(t instanceof Zo){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 $f=["image/apng","image/avif","image/bmp","image/gif","image/jpeg","image/png","image/svg+xml","image/webp","image/x-icon"];class tl{#t=null;#e=null;#n;#i=null;#a=null;#s=null;#r=null;static#o=null;constructor(t){this.#n=t,tl.#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",tl.#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",tl.#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 CM{#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 Kv(l,t,i){for(const a of i)t.addEventListener(a,l[a].bind(l))}class RM{#t=0;get id(){return`${Fv}${this.#t++}`}}class Gf{#t=Xv();#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 Ko(i,"blob")):i instanceof File?r=a.file=i:i instanceof Blob&&(r=i),r.type==="image/svg+xml"){const c=Gf._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 el{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 Vf{static _colorsMapping=new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]]);get _colors(){const t=new Map([["CanvasText",null],["Canvas",null]]);return xM(t),zt(this,"_colors",t)}convert(t){const i=Tu(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 Vf._colorsMapping.get(a);return i}getHexCode(t){const i=this._colors.get(t);return i?pt.makeHexColor(...i):t}}class zs{#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;#C=!1;#x=null;#N=null;#U=null;#k=null;#j=null;#w=xt.NONE;#S=new Set;#z=null;#H=null;#F=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=zs.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 el([[["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,_,C){const R=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:R}),h._on("pagechanging",this.onPageChanging.bind(this),{signal:R}),h._on("scalechanging",this.onScaleChanging.bind(this),{signal:R}),h._on("rotationchanging",this.onRotationChanging.bind(this),{signal:R}),h._on("setpreference",this.onSetPreference.bind(this),{signal:R}),h._on("switchannotationeditorparams",L=>this.updateParams(L.type,L.value),{signal:R}),this.#at(),this.#ct(),this.#Z(),this.#s=p.annotationStorage,this.#E=p.filterFactory,this.#F=m,this.#T=g||null,this.#m=y,this.#v=b,this.#y=S,this.#j=A||null,this.viewParameters={realScale:Tr.PDF_TO_CSS_UNITS,rotation:0},this.isShiftKeyDown=!1,this._editorUndoBar=_||null,this._supportsPinchToZoom=C!==!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.#k?.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.#j}get useNewAltTextFlow(){return this.#v}get useNewAltTextWhenAddingImage(){return this.#y}get hcmFilter(){return zt(this,"hcmFilter",this.#F?this.#E.addHCMFilter(this.#F.foreground,this.#F.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.#F;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===xt.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(xt.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 CM(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!==xt.HIGHLIGHT&&this.#w!==xt.NONE)&&(this.#w===xt.HIGHLIGHT&&this.showAllEditors("highlight",!0,!0),this.#D=this.isShiftKeyDown,!this.isShiftKeyDown)){const c=this.#w===xt.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===xt.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.#N=[i,t],i._focusEventsAllowed=!1;break}}focus(){if(!this.#N)return;const[t,i]=this.#N;this.#N=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){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!==xt.NONE&&!this.isEditorHandlingKeyboard&&zs._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===xt.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!==xt.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===xt.NONE){this.setEditingState(!1),this.#dt(),this._editorUndoBar?.hide(),this.#P.resolve();return}t===xt.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.#k?.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!==xt.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 Gf)}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===xt.NONE&&!a.hasBeenModified||a.renderAnnotationElement(t))}setMissingCanvas(t,i,a){const r=this.#k?.get(t);r&&(r.setCanvas(i,a),this.#k.delete(t))}addMissingCanvas(t,i){(this.#k||=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 wu{#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 xu{#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,C=h-c,R=Math.hypot(_,C)||1,L=Math.hypot(S,A)||1;if(!this.#e&&Math.abs(L-R)<=xu.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,L,R)}#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 gt{#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;#_=gt._zIndex++;static _borderLineWidth=-1;static _colorManager=new Vf;static _zIndex=1;static _telemetryTimeout=1e3;static get _resizerKeyboardManager(){const t=gt.prototype._resizeWithKeyboard,i=zs.TRANSLATE_SMALL,a=zs.TRANSLATE_BIG;return zt(this,"_resizerKeyboardManager",new el([[["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"],gt.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(gt._l10n??=t,gt._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"}),gt._borderLineWidth!==-1)return;const a=getComputedStyle(document.documentElement);gt._borderLineWidth=parseFloat(a.getPropertyValue("--outline-width"))||0}static updateDefaultParams(t,i){}static get defaultPropertiesToUpdate(){return[]}static isHandlingMimeForPasting(t){return!1}static paste(t,i){se("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}=gt,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 gt.#R(t,i,this.parentRotation)}pageTranslationToScreen(t,i){return gt.#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.#N.bind(this,a),{signal:i}),r.addEventListener("contextmenu",Yn,{signal:i}),r.tabIndex=-1}this.div.prepend(this.#u)}#N(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.#j.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.#k()};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(){}#k(){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}#j(t,i){const[a,r]=this.parentDimensions,c=this.x,u=this.y,h=this.width,p=this.height,m=gt.MIN_SIZE/a,g=gt.MIN_SIZE/r,y=this.#C(this.rotation),b=(B,K)=>[y[0]*B+y[2]*K,y[1]*B+y[3]*K],S=this.#C(360-this.rotation),A=(B,K)=>[S[0]*B+S[2]*K,S[1]*B+S[3]*K];let _,C,R=!1,L=!1;switch(t){case"topLeft":R=!0,_=(B,K)=>[0,0],C=(B,K)=>[B,K];break;case"topMiddle":_=(B,K)=>[B/2,0],C=(B,K)=>[B/2,K];break;case"topRight":R=!0,_=(B,K)=>[B,0],C=(B,K)=>[0,K];break;case"middleRight":L=!0,_=(B,K)=>[B,K/2],C=(B,K)=>[0,K/2];break;case"bottomRight":R=!0,_=(B,K)=>[B,K],C=(B,K)=>[0,0];break;case"bottomMiddle":_=(B,K)=>[B/2,K],C=(B,K)=>[B/2,0];break;case"bottomLeft":R=!0,_=(B,K)=>[0,K],C=(B,K)=>[B,0];break;case"middleLeft":L=!0,_=(B,K)=>[0,K/2],C=(B,K)=>[B,K/2];break}const O=_(h,p),U=C(h,p);let P=b(...U);const F=gt._round(c+P[0]),j=gt._round(u+P[1]);let tt=1,X=1,st,Z;if(i.fromKeyboard)({deltaX:st,deltaY:Z}=i);else{const{screenX:B,screenY:K}=i,[ut,wt]=this.#c;[st,Z]=this.screenToPageTranslation(B-ut,K-wt),this.#c[0]=B,this.#c[1]=K}if([st,Z]=A(st/a,Z/r),R){const B=Math.hypot(h,p);tt=X=Math.max(Math.min(Math.hypot(U[0]-O[0]-st,U[1]-O[1]-Z)/B,1/h,1/p),m/h,g/p)}else L?tt=dn(Math.abs(U[0]-O[0]-st),m,1)/h:X=dn(Math.abs(U[1]-O[1]-Z),g,1)/p;const ot=gt._round(h*tt),St=gt._round(p*X);P=b(...C(ot,St));const yt=F-P[0],Gt=j-P[1];this.#f||=[this.x,this.y,this.width,this.height],this.width=ot,this.height=St,this.x=yt,this.y=Gt,this.setDims(a*ot,r*St),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 tl(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(gt._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 wu(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 wu(this)),this.#i.data=t}setCommentData(t){this.#i||(this.#i=new wu(this)),this.#i.setInitialText(t)}get hasEditedComment(){return this.#i?.hasBeenEdited()}async editComment(){this.#i||(this.#i=new wu(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 xu({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=(F,j)=>[u[0]*F+u[2]*j,u[1]*F+u[3]*j],[p,m]=this.parentDimensions,g=this.x,y=this.y,b=this.width,S=this.height,A=gt.MIN_SIZE/p,_=gt.MIN_SIZE/m;c=Math.max(Math.min(c,1/b,1/S),A/b,_/S);const C=gt._round(b*c),R=gt._round(S*c);if(C===b&&R===S)return;this.#f||=[g,y,b,S];const L=h(b/2,S/2),O=gt._round(g+L[0]),U=gt._round(y+L[1]),P=h(C/2,R/2);this.x=O-P[0],this.y=U-P[1],this.width=C,this.height=R,this.setDims(p*C,m*R),this.fixAndSetPosition(),this._onResizing()}#z(){this.#n?.toggle(!0),this.parent.togglePointerEvents(!0),this.#k()}pointerdown(t){const{isMac:i}=Ve.platform;if(t.button!==0||t.ctrlKey&&i){t.preventDefault();return}if(this.#g=!0,this._isDraggable){this.#F(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)}#F(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){se("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",gt._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",gt._l10nResizer[m])}}this.#I(0),this.#v=!0,this.#u.firstChild.focus({focusVisible:!0}),t.preventDefault(),t.stopImmediatePropagation()}#q(t){gt._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.#j(this.#p,{deltaX:t,deltaY:i,fromKeyboard:!0})}#G(){this.#v=!1,this.#I(-1),this.#k()}_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)},gt._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 gt{constructor(t){super(t),this.annotationElementId=t.annotationElementId,this.deleted=!0}serialize(){return this.serializeDeleted()}}const Zv=3285377520,Xn=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,C=t.length;_<C;_++){const R=t.charCodeAt(_);R<=255?i[a++]=R:(i[a++]=R>>>8,i[a++]=R&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 qf=Object.freeze({map:null,hash:"",transfer:void 0});class Yf{#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 gt)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 gt&&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 qf;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 gt?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}:qf}get editorStats(){let t=null;const i=new Map;for(const a of this.#n.values()){if(!(a instanceof gt))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 gt)||!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 Yf{#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(){se("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}se("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,P){return U.charCodeAt(P)<<24|U.charCodeAt(P+1)<<16|U.charCodeAt(P+2)<<8|U.charCodeAt(P+3)&255}function r(U,P,F,j){const tt=U.substring(0,P),X=U.substring(P+F);return tt+j+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,P){if(++m>30){Ct("Load test font never loaded."),P();return}if(p.font="30px "+U,p.fillText(".",0,20),p.getImageData(0,0,1,1).data[3]>0){P();return}setTimeout(g.bind(null,U,P))}const y=`lt${Date.now()}${this.loadTestFontId++}`;let b=this._loadTestFont;b=r(b,976,y.length,y);const A=16,_=1482184792;let C=a(b,A);for(c=0,u=y.length-3;c<u;c+=4)C=C-_+a(y,c)|0;c<y.length&&(C=C-_+a(y+"XXX",c)|0),b=r(b,A,4,mM(C));const R=`url(data:font/opentype;base64,${btoa(b)});`,L=`@font-face {font-family:"${y}";src:${R}}`;this.insertRule(L);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 P=this._document.createElement("span");P.textContent="Hi",P.style.fontFamily=U,O.append(P)}this._document.body.append(O),g(y,()=>{O.remove(),i.complete()})}}class NM{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){Ct(`getPathGenerator - ignoring character: "${u}".`)}const c=new Path2D(r||"");return this.fontExtraProperties||t.delete(a),this.compiledGlyphs[i]=c}}function kM(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 Qo(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 Cu(l){if(typeof l!="string")return null;if(l.endsWith("/"))return l;throw new Error(`Invalid factory url: "${l}" must include trailing slash.`)}const Xf=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,Xf,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 Ru={DATA:1,ERROR:2},Ne={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 Us||l instanceof Pf||l instanceof Vv||l instanceof Au||l instanceof If)return l;switch(l instanceof Error||typeof l=="object"&&l!==null||se('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),l.name){case"AbortException":return new Us(l.message);case"InvalidPDFException":return new Pf(l.message);case"PasswordException":return new Vv(l.message,l.code);case"ResponseException":return new Au(l.message,l.status,l.missing);case"UnknownErrorException":return new If(l.message,l.details)}return new If(l.message,l.toString())}class nl{#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===Ru.DATA)r.resolve(t.data);else if(t.callback===Ru.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:Ru.DATA,callbackId:t.callbackId,data:u})},function(u){c.postMessage({sourceName:a,targetName:r,callback:Ru.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:Ne.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:Ne.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:Ne.ENQUEUE,streamId:i,chunk:m},y)},close(){this.isCancelled||(this.isCancelled=!0,c.postMessage({sourceName:a,targetName:r,stream:Ne.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:Ne.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:Ne.START_COMPLETE,streamId:i,success:!0})},function(m){c.postMessage({sourceName:a,targetName:r,stream:Ne.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 Ne.START_COMPLETE:t.success?u.startCall.resolve():u.startCall.reject(An(t.reason));break;case Ne.PULL_COMPLETE:t.success?u.pullCall.resolve():u.pullCall.reject(An(t.reason));break;case Ne.PULL:if(!h){c.postMessage({sourceName:a,targetName:r,stream:Ne.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:Ne.PULL_COMPLETE,streamId:i,success:!0})},function(m){c.postMessage({sourceName:a,targetName:r,stream:Ne.PULL_COMPLETE,streamId:i,reason:An(m)})});break;case Ne.ENQUEUE:if(Me(u,"enqueue should have stream controller"),u.isClosed)break;u.controller.enqueue(t.chunk);break;case Ne.CLOSE:if(Me(u,"close should have stream controller"),u.isClosed)break;u.isClosed=!0,u.controller.close(),this.#a(u,i);break;case Ne.ERROR:Me(u,"error should have stream controller"),u.controller.error(An(t.reason)),this.#a(u,i);break;case Ne.CANCEL_COMPLETE:t.success?u.cancelCall.resolve():u.cancelCall.reject(An(t.reason)),this.#a(u,i);break;case Ne.CANCEL:if(!h)break;const p=An(t.reason);Promise.try(h.onCancel||e0,p).then(function(){c.postMessage({sourceName:a,targetName:r,stream:Ne.CANCEL_COMPLETE,streamId:i,success:!0})},function(m){c.postMessage({sourceName:a,targetName:r,stream:Ne.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){se("Abstract method `_createCanvas` called.")}}class zM 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){se("Abstract method `_fetch` called.")}}class s0 extends i0{async _fetch(t){const i=await Ko(t,this.isCompressed?"arraybuffer":"text");return i instanceof ArrayBuffer?new Uint8Array(i):Qo(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 HM 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(es,"svg");a.setAttribute("width",0),a.setAttribute("height",0),this.#n=this.#a.createElementNS(es,"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&&(_u(i)?Ct('#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=pt.makeHexColor(...u);const h=this.#y(i);if(i=pt.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,C=h[S]/255,R=new Array(A+1);for(let L=0;L<=A;L++)R[L]=_+L/A*(C-_);return R.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=(R,L,O)=>{const U=new Array(256),P=(y-g)/O,F=R/255,j=(L-R)/(255*O);let tt=0;for(let X=0;X<=O;X++){const st=Math.round(g+X*P),Z=F+X*j;for(let ot=tt;ot<=st;ot++)U[ot]=Z;tt=st+1}for(let X=tt;X<256;X++)U[X]=U[tt-1];return U.join(",")},_=`g_${this.#i}_hcm_${t}_filter`,C=h.filter=this.#f(_);return this.#g(C),this.#m(A(b[0],S[0],5),A(b[1],S[1],5),A(b[2],S[2],5),C),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(es,"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(es,"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(es,"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(es,i);r.setAttribute("type","discrete"),r.setAttribute("tableValues",a),t.append(r)}#m(t,i,a,r){const c=this.#a.createElementNS(es,"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(es,"feComponentTransfer");i.append(a),this.#d(a,"feFuncA",t)}#y(t){return this.#c.style.color=t,Tu(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){se("Abstract method `_fetch` called.")}}class o0 extends r0{async _fetch(t){const i=await Ko(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){se("Abstract method `_fetch` called.")}}class c0 extends l0{async _fetch(t){const i=await Ko(t,"arraybuffer");return new Uint8Array(i)}}un&&Ct("Please use the `legacy` build in Node.js environments.");async function Wf(l){const i=await process.getBuiltinModule("fs").promises.readFile(l);return new Uint8Array(i)}class BM extends a0{}class jM 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:ne&&ne.tagName.toUpperCase()==="SCRIPT"&&ne.src||new URL("corisco.umd.js",document.baseURI).href)("@napi-rs/canvas").createCanvas(t,i)}}class FM extends i0{async _fetch(t){return Wf(t)}}class $M extends r0{async _fetch(t){return Wf(t)}}class GM extends l0{async _fetch(t){return Wf(t)}}const qe={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};function Qf(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 Kf{isModifyingCurrentTransform(){return!1}getPattern(){se("Abstract method `getPattern` called.")}}class VM extends Kf{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=pt.transform(a,[1,0,0,1,u[0],u[1]]),g.transform(...i.baseTransform),this.matrix&&g.transform(...this.matrix),Qf(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 Qf(t,this._bbox),c=this._createGradient(t);return c}}function Zf(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,C=(p[a+1]+t.offsetY)*t.scaleY,R=(p[r]+t.offsetX)*t.scaleX,L=(p[r+1]+t.offsetY)*t.scaleY;if(A>=L)return;const O=m[c],U=m[c+1],P=m[c+2],F=m[u],j=m[u+1],tt=m[u+2],X=m[h],st=m[h+1],Z=m[h+2],ot=Math.round(A),St=Math.round(L);let yt,Gt,B,K,ut,wt,W,dt;for(let Q=ot;Q<=St;Q++){if(Q<C){const Wt=Q<A?0:(A-Q)/(A-C);yt=S-(S-_)*Wt,Gt=O-(O-F)*Wt,B=U-(U-j)*Wt,K=P-(P-tt)*Wt}else{let Wt;Q>L?Wt=1:C===L?Wt=0:Wt=(C-Q)/(C-L),yt=_-(_-R)*Wt,Gt=F-(F-X)*Wt,B=j-(j-st)*Wt,K=tt-(tt-Z)*Wt}let vt;Q<A?vt=0:Q>L?vt=1:vt=(A-Q)/(A-L),ut=S-(S-R)*vt,wt=O-(O-X)*vt,W=U-(U-st)*vt,dt=P-(P-Z)*vt;const Vt=Math.round(Math.min(yt,ut)),ae=Math.round(Math.max(yt,ut));let At=y*Q+Vt*4;for(let Wt=Vt;Wt<=ae;Wt++)vt=(yt-Wt)/(yt-ut),vt<0?vt=0:vt>1&&(vt=1),g[At++]=Gt-(Gt-wt)*vt|0,g[At++]=B-(B-W)*vt|0,g[At++]=K-(K-dt)*vt|0,g[At++]=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++)Zf(l,i,a[g],a[g+1],a[g+h],r[g],r[g+1],r[g+h]),Zf(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)Zf(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 Kf{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},C=y+4,R=b+4,L=a.getCanvas("mesh",C,R),O=L.context,U=O.createImageData(y,b);if(i){const F=U.data;for(let j=0,tt=F.length;j<tt;j+=4)F[j]=i[0],F[j+1]=i[1],F[j+2]=i[2],F[j+3]=255}for(const F of this._figures)qM(U,F,_);return O.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){Qf(t,this._bbox);const c=new Float32Array(2);if(r===qe.SHADING)pt.singularValueDecompose2dScale(be(t),c);else if(this.matrix){pt.singularValueDecompose2dScale(this.matrix,c);const[h,p]=c;pt.singularValueDecompose2dScale(i.baseTransform,c),c[0]*=h,c[1]*=p}else pt.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 Kf{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 u0={COLORED:1,UNCOLORED:2};class Jf{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),Eu("TilingType: "+c);const g=i[0],y=i[1],b=i[2],S=i[3],A=b-g,_=S-y,C=new Float32Array(2);pt.singularValueDecompose2dScale(this.matrix,C);const[R,L]=C;pt.singularValueDecompose2dScale(this.baseTransform,C);const O=R*C[0],U=L*C[1];let P=A,F=_,j=!1,tt=!1;const X=Math.ceil(p*O),st=Math.ceil(m*U),Z=Math.ceil(A*O),ot=Math.ceil(_*U);X>=Z?P=p:j=!0,st>=ot?F=m:tt=!0;const St=this.getSizeAndScale(P,this.ctx.canvas.width,O),yt=this.getSizeAndScale(F,this.ctx.canvas.height,U),Gt=t.cachedCanvases.getCanvas("pattern",St.size,yt.size),B=Gt.context,K=h.createCanvasGraphics(B);if(K.groupLevel=t.groupLevel,this.setFillAndStrokeStyleToContext(K,r,u),B.translate(-St.scale*g,-yt.scale*y),K.transform(St.scale,0,0,yt.scale,0,0),B.save(),this.clipBbox(K,g,y,b,S),K.baseTransform=be(K.ctx),K.executeOperatorList(a),K.endDrawing(),B.restore(),j||tt){const ut=Gt.canvas;j&&(P=p),tt&&(F=m);const wt=this.getSizeAndScale(P,this.ctx.canvas.width,O),W=this.getSizeAndScale(F,this.ctx.canvas.height,U),dt=wt.size,Q=W.size,vt=t.cachedCanvases.getCanvas("pattern-workaround",dt,Q),Vt=vt.context,ae=j?Math.floor(A/p):0,At=tt?Math.floor(_/m):0;for(let Wt=0;Wt<=ae;Wt++)for(let Kt=0;Kt<=At;Kt++)Vt.drawImage(ut,dt*Wt,Q*Kt,dt,Q,0,0,dt,Q);return{canvas:vt.canvas,scaleX:wt.scale,scaleY:W.scale,offsetX:g,offsetY:y}}return{canvas:Gt.canvas,scaleX:St.scale,scaleY:yt.scale,offsetX:g,offsetY:y}}getSizeAndScale(t,i,a){const r=Math.max(Jf.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),pt.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 pM(`Unsupported paint type: ${i}`)}}isModifyingCurrentTransform(){return!1}getPattern(t,i,a,r){let c=a;r!==qe.SHADING&&(c=pt.transform(c,i.baseTransform),this.matrix&&(c=pt.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 C=t+g;t<C;t++){const R=t<b?l[t]:255;i[S++]=R&128?m:p,i[S++]=R&64?m:p,i[S++]=R&32?m:p,i[S++]=R&16?m:p,i[S++]=R&8?m:p,i[S++]=R&4?m:p,i[S++]=R&2?m:p,i[S++]=R&1?m:p}if(y===0)continue;const _=t<b?l[t++]:255;for(let C=0;C<y;C++)i[S++]=_&1<<7-C?m:p}return{srcPos:t,destPos:S}}const d0=16,h0=100,KM=15,f0=10,_n=16,tp=new DOMMatrix,Ln=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 Du(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,O=Math.round(L),U=h*S+_,P=Math.round(U),F=(u+p)*g+A,j=Math.abs(Math.round(F)-O)||1,tt=(h+m)*S+_,X=Math.abs(Math.round(tt)-P)||1;return l.setTransform(Math.sign(g),0,0,Math.sign(S),O,P),l.drawImage(t,i,a,r,c,0,0,j,X),l.setTransform(g,y,b,S,A,_),[j,X]}if(g===0&&S===0){const L=h*b+A,O=Math.round(L),U=u*y+_,P=Math.round(U),F=(h+m)*b+A,j=Math.abs(Math.round(F)-O)||1,tt=(u+p)*y+_,X=Math.abs(Math.round(tt)-P)||1;return l.setTransform(0,Math.sign(y),Math.sign(b),0,O,P),l.drawImage(t,i,a,r,c,0,0,X,j),l.setTransform(g,y,b,S,A,_),[X,j]}l.drawImage(t,i,a,r,c,u,h,p,m);const C=Math.hypot(g,y),R=Math.hypot(b,S);return[C*p,R*m]}class p0{alphaIsShape=!1;fontSize=0;fontSizeScale=1;textMatrix=null;textMatrixScale=1;fontMatrix=kf;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||se("Stroke bounding box must include transform."),pt.singularValueDecompose2dScale(i,Ln);const r=Ln[0]*this.lineWidth/2,c=Ln[1]*this.lineWidth/2;a[0]-=r,a[1]-=c,a[2]+=r,a[3]+=c}return a}updateClipFromPath(){const t=pt.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 pt.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===gu.GRAYSCALE_1BPP){const C=g.byteLength,R=new Uint32Array(y.buffer,0,y.byteLength>>2),L=R.length,O=a+7>>3,U=4294967295,P=Ve.isLittleEndian?4278190080:255;for(b=0;b<u;b++){for(A=b<c?_n:r,m=0,S=0;S<A;S++){const F=C-p;let j=0;const tt=F>O?a:F*8-7,X=tt&-8;let st=0,Z=0;for(;j<X;j+=8)Z=g[p++],R[m++]=Z&128?U:P,R[m++]=Z&64?U:P,R[m++]=Z&32?U:P,R[m++]=Z&16?U:P,R[m++]=Z&8?U:P,R[m++]=Z&4?U:P,R[m++]=Z&2?U:P,R[m++]=Z&1?U:P;for(;j<tt;j++)st===0&&(Z=g[p++],st=128),R[m++]=Z&st?U:P,st>>=1}for(;m<L;)R[m++]=0;l.putImageData(h,0,b*_n)}}else if(t.kind===gu.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===gu.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}=QM({src:m,srcPos:p,dest:g,width:a,height:b,nonBlackColor:0})),l.putImageData(h,0,y*_n)}}function il(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 Mu(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;pt.singularValueDecompose2dScale(l,Ln);const i=Math.fround(Ri.pixelRatio*Tr.PDF_TO_CSS_UNITS);return Ln[0]<=i&&Ln[1]<=i}const tO=["butt","round","square"],eO=["miter","round","bevel"],nO={},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 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(...be(this.compositeCtx))}this.ctx.save(),Mu(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()+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!==bu.dependency)this[A].apply(this,c[h]);else for(const _ of c[h]){const C=_.startsWith("g_")?b:S;if(!C.has(_))return C.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 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 st=p.get(m);if(st&&!u){const Z=Math.round(Math.min(h[0],h[2])+h[4]),ot=Math.round(Math.min(h[1],h[3])+h[5]);return{canvas:st,offsetX:Z,offsetY:ot}}g=st}g||(y=this.cachedCanvases.getCanvas("maskCanvas",a,r),g0(y.context,t));let b=pt.transform(h,[1/a,0,0,-1/r,0,0]);b=pt.transform(b,[1,0,0,1,0,-r]);const S=wr.slice();pt.axialAlignedBoundingBox([0,0,a,r],b,S);const[A,_,C,R]=S,L=Math.round(C-A)||1,O=Math.round(R-_)||1,U=this.cachedCanvases.getCanvas("fillCanvas",L,O),P=U.context,F=A,j=_;P.translate(-F,-j),P.transform(...b),g||(g=this._scaleImage(y.canvas,Ci(P)),g=g.img,p&&u&&p.set(m,g)),P.imageSmoothingEnabled=y0(be(P),t.interpolate),Du(P,g,0,0,g.width,g.height,0,0,a,r),P.globalCompositeOperation="source-in";const tt=pt.transform(Ci(P),[1,0,0,1,-F,-j]);return P.fillStyle=u?c.getPattern(i,this,tt,qe.FILL):c,P.fillRect(0,0,a,r),p&&!u&&(this.cachedCanvases.delete("fillCanvas"),p.set(m,U.canvas)),{canvas:U.canvas,offsetX:Math.round(F),offsetY:Math.round(j)}}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()),il(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(),il(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 C=this.cachedCanvases.getCanvas("maskExtension",a,r),R=C.context;R.drawImage(b,-S,-A),R.globalCompositeOperation="destination-atop",R.fillStyle=u,R.fillRect(0,0,a,r),R.globalCompositeOperation="source-over",b=C.canvas,S=A=0}else{t.save(),t.globalAlpha=1,t.setTransform(1,0,0,1,0,0);const C=new Path2D;C.rect(S,A,a,r),t.clip(C),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&&il(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&&il(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 vu.moveTo:c.moveTo(r[u++],r[u++]);break;case vu.lineTo:c.lineTo(r[u++],r[u++]);break;case vu.curveTo:c.bezierCurveTo(r[u++],r[u++],r[u++],r[u++],r[u++],r[u++]);break;case vu.closePath:c.closePath();break;default:Ct(`Unrecognized drawing path operator: ${r[u-1]}`);break}r=c}pt.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=nO}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||kf,(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<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 C;if((y===sn.FILL||y===sn.FILL_STROKE)&&(r?(C=u.getTransform(),u.setTransform(...r),u.fill(this.#n(_,C,r))):u.fill(_)),y===sn.STROKE||y===sn.FILL_STROKE)if(c){C||=u.getTransform(),u.setTransform(...c);const{a:R,b:L,c:O,d:U}=C,P=pt.inverseTransform(c),F=pt.transform([R,L,O,U,0,0],P);pt.singularValueDecompose2dScale(F,Ln),u.lineWidth*=Math.max(Ln[0],Ln[1])/g,u.stroke(this.#n(_,C,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],C=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 R,L;if(i.patternFill){c.save();const j=i.fillColor.getPattern(c,this,Ci(c),qe.FILL);R=be(c),c.restore(),c.fillStyle=j}if(i.patternStroke){c.save();const j=i.strokeColor.getPattern(c,this,Ci(c),qe.STROKE);L=be(c),c.restore(),c.strokeStyle=j}let O=i.lineWidth;const U=i.textMatrixScale;if(U===0||O===0){const j=i.textRenderingMode&sn.FILL_STROKE_MASK;(j===sn.STROKE||j===sn.FILL_STROKE)&&(O=this.getSinglePixelWidth())}else O/=U;if(u!==1&&(c.scale(u,u),O/=u),c.lineWidth=O,a.isInvalidPDFjsFont){const j=[];let tt=0;for(const X of t)j.push(X.unicode),tt+=X.width;c.fillText(j.join(""),0,0),i.x+=tt*_*g,c.restore(),this.compose();return}let P=0,F;for(F=0;F<y;++F){const j=t[F];if(typeof j=="number"){P+=S*j*r/1e3;continue}let tt=!1;const X=(j.isSpace?p:0)+h,st=j.fontChar,Z=j.accent;let ot,St,yt=j.width;if(b){const B=j.vmetric||A,K=-(j.vmetric?B[1]:yt*.5)*_,ut=B[2]*_;yt=B?-B[0]:yt,ot=K/u,St=(P+ut)/u}else ot=P/u,St=0;if(a.remeasure&&yt>0){const B=c.measureText(st).width*1e3/r*u;if(yt<B&&this.isFontSubpixelAAEnabled){const K=yt/B;tt=!0,c.save(),c.scale(K,1),ot/=K}else yt!==B&&(ot+=(yt-B)/2e3*r/u)}if(this.contentVisible&&(j.isInFont||a.missingFile)){if(C&&!Z)c.fillText(st,ot,St);else if(this.paintChar(st,ot,St,R,L),Z){const B=ot+r*Z.offset.x/u,K=St-r*Z.offset.y/u;this.paintChar(Z.fontChar,B,K,R,L)}}const Gt=b?yt*_-X*m:yt*_+X*m;P+=Gt,tt&&c.restore()}b?i.y-=P:i.x+=P*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||kf,b=t.length,S=a.textRenderingMode===sn.INVISIBLE;let A,_,C,R;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"){R=h*_*c/1e3,this.ctx.translate(R,0),a.x+=R*g;continue}const L=(_.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];pt.applyTransform(U,y),C=U[0]*c+L,i.translate(C,0),a.x+=C*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 Jf(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,Ci(i),qe.SHADING);const r=Ci(i);if(r){const{width:c,height:u}=i.canvas,h=wr.slice();pt.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(){se("Should not call beginInlineImage")}beginImageData(){se("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)){pt.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||Eu("TODO: Support non-isolated groups."),t.knockout&&Ct("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();pt.axialAlignedBoundingBox(t.bbox,be(i),r);const c=[0,0,i.canvas.width,i.canvas.height];r=pt.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,_,C,R]=t.bbox;if(S.rect(A,_,C-A,R-_),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()),il(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();pt.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(),Mu(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,pt.singularValueDecompose2dScale(be(this.ctx),Ln);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(Ln[0],0,0,-Ln[1],0,h*Ln[1]),Mu(this.ctx)}else{Mu(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=pt.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),Du(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;m0(m,t),u=this.applyTransferMapsToCanvas(m)}const h=this._scaleImage(u,Ci(r));r.imageSmoothingEnabled=y0(be(r),t.interpolate),Du(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),Du(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),tp.a=1/c,tp.d=1/u;const p=new Path2D;if(p.addPath(t,tp),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 bu)xr.prototype[l]!==void 0&&(xr.prototype[bu[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 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&kn.DISPLAY),this.#e=!!(t&kn.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&&se("Internal method `_setVisible` called."),this.#n=a,this.#i=i}}class aO{#t=null;#e=new Map;#n=null;#i=null;constructor(t,i=kn.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 Eu("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 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 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=jf(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=Qo(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[,_,C,R]=b;if(_=parseInt(_,10),_ in y){if(_===0)break;continue}y[_]=[C,R]}const A=[];for(let _=0;_<y.length&&_ in y;++_){let[C,R]=y[_];R=h(R),C&&(R=unescape(R),_===0&&(R=p(R))),A.push(R)}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(_,C){return String.fromCharCode(parseInt(C,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 Ou(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=cO(t);if(i.includes("%"))try{i=decodeURIComponent(i)}catch{}if(jf(i))return i}return null}function sl(l,t){return new Au(`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:(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=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 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,_0(a,this._withCredentials,this._abortController)).then(c=>{if(t._responseOrigin=Ou(c.url),!A0(c.status))throw sl(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 Us("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 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,_0(c,this._withCredentials,this._abortController)).then(h=>{const p=Ou(h.url);if(p!==t._responseOrigin)throw new Error(`Expected range response-origin "${p}" to match "${t._responseOrigin}".`);if(!A0(h.status))throw sl(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 ep=200,np=206;function fO(l){const t=l.response;return typeof t!="string"?t:Qo(t).buffer}class pO{_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=np):r.expectedStatus=ep,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||ep;if(!(c===ep&&a.expectedStatus===np)&&c!==a.expectedStatus){a.onError(r.status);return}const h=fO(r);if(c===np){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=Ou(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=sl(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=Ou(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??=sl(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=sl(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 Us("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 al=Symbol("INITIAL_DATA");class w0{#t=Object.create(null);#e(t){return this.#t[t]||={...Promise.withResolvers(),data:al}}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===al)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!==al}delete(t){const i=this.#t[t];return!i||i.data===al?!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!==al&&(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.#x(),Ta(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,Ta(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 Us("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=pt.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.#N(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]),C=Math.abs(t.transform[3]);_!==C&&Math.max(_,C)/Math.min(_,C)>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#N(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&&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 rl{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(rl.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 C0(l={}){typeof l=="string"||l instanceof URL?l={url:l}:(l instanceof ArrayBuffer||ArrayBuffer.isView(l))&&(l={data:l});const t=new ip,{docId:i}=t,a=l.url?kM(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 R0?l.range:null,m=Number.isInteger(l.rangeChunkSize)&&l.rangeChunkSize>0?l.rangeChunkSize:2**16;let g=l.worker instanceof ol?l.worker:null;const y=l.verbosity,b=typeof l.docBaseUrl=="string"&&!_u(l.docBaseUrl)?l.docBaseUrl:null,S=Cu(l.cMapUrl),A=l.cMapPacked!==!1,_=l.CMapReaderFactory||(un?FM:s0),C=Cu(l.iccUrl),R=Cu(l.standardFontDataUrl),L=l.StandardFontDataFactory||(un?$M:o0),O=Cu(l.wasmUrl),U=l.WasmFactory||(un?GM:c0),P=l.stopAtErrors!==!0,F=Number.isInteger(l.maxImageSize)&&l.maxImageSize>-1?l.maxImageSize:-1,j=l.isEvalSupported!==!1,tt=typeof l.isOffscreenCanvasSupported=="boolean"?l.isOffscreenCanvasSupported:!un,X=typeof l.isImageDecoderSupported=="boolean"?l.isImageDecoderSupported:!un&&(Ve.platform.isFirefox||!globalThis.chrome),st=Number.isInteger(l.canvasMaxAreaInBytes)?l.canvasMaxAreaInBytes:-1,Z=typeof l.disableFontFace=="boolean"?l.disableFontFace:un,ot=l.fontExtraProperties===!0,St=l.enableXfa===!0,yt=l.ownerDocument||globalThis.document,Gt=l.disableRange===!0,B=l.disableStream===!0,K=l.disableAutoFetch===!0,ut=l.pdfBug===!0,wt=l.CanvasFactory||(un?jM:zM),W=l.FilterFactory||(un?BM:HM),dt=l.enableHWA===!0,Q=l.useWasm!==!1,vt=p?p.length:l.length??NaN,Vt=typeof l.useSystemFonts=="boolean"?l.useSystemFonts:!un&&!Z,ae=typeof l.useWorkerFetch=="boolean"?l.useWorkerFetch:!!(_===s0&&L===o0&&U===c0&&S&&R&&O&&Jo(S,document.baseURI)&&Jo(R,document.baseURI)&&Jo(O,document.baseURI)),At=null;dM(y);const Wt={canvasFactory:new wt({ownerDocument:yt,enableHWA:dt}),filterFactory:new W({docId:i,ownerDocument:yt}),cMapReaderFactory:ae?null:new _({baseUrl:S,isCompressed:A}),standardFontDataFactory:ae?null:new L({baseUrl:R}),wasmFactory:ae?null:new U({baseUrl:O})};g||(g=ol.create({verbosity:y,port:Cr.workerPort}),t._worker=g);const Kt={docId:i,apiVersion:"5.4.54",data:r,password:h,disableAutoFetch:K,rangeChunkSize:m,length:vt,docBaseUrl:b,enableXfa:St,evaluatorOptions:{maxImageSize:F,disableFontFace:Z,ignoreErrors:P,isEvalSupported:j,isOffscreenCanvasSupported:tt,isImageDecoderSupported:X,canvasMaxAreaInBytes:st,fontExtraProperties:ot,useSystemFonts:Vt,useWasm:Q,useWorkerFetch:ae,cMapUrl:S,iccUrl:C,standardFontDataUrl:R,wasmUrl:O}},Te={ownerDocument:yt,pdfBug:ut,styleElement:At,loadingParams:{disableAutoFetch:K,enableXfa:St}};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",Kt,r?[r.buffer]:null);let Pn;if(p)Pn=new rO(p,{disableRange:Gt,disableStream:B});else if(!r){if(!a)throw new Error("getDocument - no `url` parameter provided.");const ss=Jo(a)?uO:un?SO:mO;Pn=new ss({url:a,length:vt,httpHeaders:c,withCredentials:u,rangeChunkSize:m,disableRange:Gt,disableStream:B})}return Xe.then(ss=>{if(t.destroyed)throw new Error("Loading aborted");if(g.destroyed)throw new Error("Worker was destroyed");const mi=new nl(i,ss,g.port),Nr=new CO(mi,t,Pn,Te,Wt,dt);t._transport=Nr,mi.send("Ready",null)})}).catch(t._capability.reject),t}class ip{static#t=0;_capability=Promise.withResolvers();_transport=null;_worker=null;docId=`d${ip.#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){se("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 xO{#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 Zo({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=Ps.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 C=this._intentStates.get(_);C||(C=Object.create(null),this._intentStates.set(_,C)),C.streamReaderCancelTimeout&&(clearTimeout(C.streamReaderCancelTimeout),C.streamReaderCancelTimeout=null);const R=!!(A&kn.PRINT);C.displayReadyCapability||(C.displayReadyCapability=Promise.withResolvers(),C.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},this._stats?.time("Page Request"),this._pumpOperatorList(S));const L=P=>{C.renderTasks.delete(O),R&&(this.#t=!0),this.#e(),P?(O.capability.reject(P),this._abortOperatorList({intentState:C,reason:P instanceof Error?P:new Error(P)})):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:L,params:{canvas:i,canvasContext:t,viewport:a,transform:u,background:h},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:m,operatorList:C.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!R,pdfBug:this._pdfBug,pageColors:g,enableHWA:this._transport.enableHWA});(C.renderTasks||=new Set).add(O);const U=O.task;return Promise.all([C.displayReadyCapability.promise,p]).then(([P,F])=>{if(this.destroyed){L();return}if(this._stats?.time("Rendering"),!(F.renderingIntent&A))throw new Error("Must use the same `intent`-argument when calling the `PDFPageProxy.render` and `PDFDocumentProxy.getOptionalContentConfig` methods.");O.initializeGraphics({transparency:P,optionalContentConfig:F}),O.operatorListChanged()}).catch(L),U}getOperatorList({intent:t="display",annotationMode:i=Ps.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=>rl.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 Bf){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 Us(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 pe=class pe{constructor({name:t=null,port:i=null,verbosity:a=hM()}={}){Qi(this,fn);Qi(this,Hs,Promise.withResolvers());Qi(this,pi,null);Qi(this,is,null);Qi(this,Ra,null);if(this.name=t,this.destroyed=!1,this.verbosity=a,i){if(ye(pe,Ma).has(i))throw new Error("Cannot use more than one PDFWorker per port.");ye(pe,Ma).set(i,this),Ki(this,fn,J1).call(this,i)}else Ki(this,fn,tw).call(this)}get promise(){return ye(this,Hs).promise}get port(){return ye(this,is)}get messageHandler(){return ye(this,pi)}destroy(){this.destroyed=!0,ye(this,Ra)?.terminate(),Nn(this,Ra,null),ye(pe,Ma).delete(ye(this,is)),Nn(this,is,null),ye(this,pi)?.destroy(),Nn(this,pi,null)}static create(t){const i=ye(this,Ma).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 pe(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()=>ye(this,Or,Lh)?ye(this,Or,Lh):(await import(this.workerSrc)).WorkerMessageHandler)())}};Hs=new WeakMap,pi=new WeakMap,is=new WeakMap,Ra=new WeakMap,Pu=new WeakMap,Da=new WeakMap,Ma=new WeakMap,fn=new WeakSet,kh=function(){ye(this,Hs).resolve(),ye(this,pi).send("configure",{verbosity:this.verbosity})},J1=function(t){Nn(this,is,t),Nn(this,pi,new nl("main","worker",t)),ye(this,pi).on("ready",()=>{}),Ki(this,fn,kh).call(this)},tw=function(){if(ye(pe,Da)||ye(pe,Or,Lh)){Ki(this,fn,Bc).call(this);return}let{workerSrc:t}=pe;try{pe._isSameOrigin(window.location,t)||(t=pe._createCDNWrapper(new URL(t,window.location).href));const i=new Worker(t,{type:"module"}),a=new nl("main","worker",i),r=()=>{c.abort(),a.destroy(),i.terminate(),this.destroyed?ye(this,Hs).reject(new Error("Worker was destroyed")):Ki(this,fn,Bc).call(this)},c=new AbortController;i.addEventListener("error",()=>{ye(this,Ra)||r()},{signal:c.signal}),a.on("test",h=>{if(c.abort(),this.destroyed||!h){r();return}Nn(this,pi,a),Nn(this,is,i),Nn(this,Ra,i),Ki(this,fn,kh).call(this)}),a.on("ready",h=>{if(c.abort(),this.destroyed){r();return}try{u()}catch{Ki(this,fn,Bc).call(this)}});const u=()=>{const h=new Uint8Array;a.send("test",h,[h.buffer])};u();return}catch{Eu("The worker has been disabled.")}Ki(this,fn,Bc).call(this)},Bc=function(){ye(pe,Da)||(Ct("Setting up fake worker."),Nn(pe,Da,!0)),pe._setupFakeWorkerGlobal.then(t=>{if(this.destroyed){ye(this,Hs).reject(new Error("Worker was destroyed"));return}const i=new UM;Nn(this,is,i);const a=`fake${Z1(pe,Pu)._++}`,r=new nl(a+"_worker",a,i);t.setup(r,i),Nn(this,pi,new nl(a,a+"_worker",i)),Ki(this,fn,kh).call(this)}).catch(t=>{ye(this,Hs).reject(new Error(`Setting up fake worker failed: "${t.message}".`))})},Or=new WeakSet,Lh=function(){try{return globalThis.pdfjsWorker?.WorkerMessageHandler||null}catch{return null}},Qi(pe,Or),Qi(pe,Pu,0),Qi(pe,Da,!1),Qi(pe,Ma,new WeakMap),un&&(Nn(pe,Da,!0),Cr.workerSrc||="./pdf.worker.mjs"),pe._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},pe._createCDNWrapper=t=>{const i=`await import("${t}");`;return URL.createObjectURL(new Blob([i],{type:"text/javascript"}))},pe.fromPort=t=>{if(TM("`PDFWorker.fromPort` - please use `PDFWorker.create` instead."),!t?.port)throw new Error("PDFWorker.fromPort - invalid method signature.");return pe.create(t)};let ol=pe;class CO{#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 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 Yf)}getRenderingIntent(t,i=Ps.ENABLE,a=null,r=!1,c=!1){let u=kn.DISPLAY,h=qf;switch(t){case"any":u=kn.ANY;break;case"display":break;case"print":u=kn.PRINT;break;default:Ct(`getRenderingIntent - invalid intent: ${t}`)}const p=u&kn.PRINT&&a instanceof t0?a:this.annotationStorage;switch(i){case Ps.DISABLE:u+=kn.ANNOTATIONS_DISABLE;break;case Ps.ENABLE:break;case Ps.ENABLE_FORMS:u+=kn.ANNOTATIONS_FORMS;break;case Ps.ENABLE_STORAGE:u+=kn.ANNOTATIONS_STORAGE,h=p.serializable;break;default:Ct(`getRenderingIntent - invalid annotationMode: ${i}`)}r&&(u+=kn.IS_EDITING),c&&(u+=kn.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 Us("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 NM(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 xO(i,c,this,this._params.pdfBug);return this.#e.set(i,u),u});return this.#n.set(i,r),r}getPageIndex(t){return Xf(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(!Xf(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 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 Bf(`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 el([[["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 ll{#t=null;#e=null;#n=null;static#i=null;constructor(t){this.#e=t,this.#n=t._uiManager,ll.#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",ll.#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 cl(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=cl(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(cl)}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[cl(1-Math.min(1,t+r)),cl(1-Math.min(1,a+r)),cl(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){se("Abstract method `_createSVG` called.")}}class Nu extends OO{_createSVG(t){return document.createElementNS(es,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&&rl.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 R=document.createTextNode(A.value);m.push(R),S.append(R);continue}const C=A?.attributes?.xmlns?document.createElementNS(A.attributes.xmlns,_):document.createElement(_);if(S.append(C),A.attributes&&this.setAttributes({html:C,element:A,storage:i,intent:c,linkService:a}),A.children?.length>0)g.push([A,-1,C]);else if(A.value){const R=document.createTextNode(A.value);h&&rl.shouldBuildText(_)&&m.push(R),C.append(R)}}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 NO=9,wa=new WeakSet,kO=new Date().getTimezoneOffset()*60*1e3;class N0{static create(t){switch(t.data.annotationType){case De.LINK:return new sp(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 k0(t):t.data.checkBox?new UO(t):new zO(t);case"Ch":return new HO(t);case"Sig":return new PO(t)}return new xa(t);case De.POPUP:return new ap(t);case De.FREETEXT:return new L0(t);case De.LINE:return new jO(t);case De.SQUARE:return new FO(t);case De.CIRCLE:return new $O(t);case De.POLYLINE:return new I0(t);case De.CARET:return new VO(t);case De.INK:return new rp(t);case De.POLYGON:return new GO(t);case De.HIGHLIGHT:return new P0(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 U0(t);case De.FILEATTACHMENT:return new WO(t);default:return new Ae(t)}}}class Ae{#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 Ae._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 xa)&&!(this instanceof sp)&&(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 ap){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,C=i.borderStyle.verticalCornerRadius;if(_>0||C>0){const L=`calc(${_}px * var(--total-scale-factor)) / calc(${C}px * var(--total-scale-factor))`;u.borderRadius=L}else if(this instanceof k0){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:Ct("Unimplemented border style: beveled");break;case _r.INSET:Ct("Unimplemented border style: inset");break;case _r.UNDERLINE:u.borderBottomStyle="solid";break}const R=i.borderColor||null;R?(this.#e=!0,u.borderColor=pt.makeHexColor(R[0]|0,R[1]|0,R[2]|0)):u.borderWidth=0}const m=pt.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[_,C,R,L]=t.subarray(2,6);if(r===_&&c===C&&i===R&&a===L)return}const{style:u}=this.container;let h;if(this.#e){const{borderColor:_,borderWidth:C}=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="${C}">`],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,C=t.length;_<C;_+=8){const R=t[_],L=t[_+1],O=t[_+2],U=t[_+3],P=g.createElement("rect"),F=(O-i)/p,j=(c-L)/m,tt=(R-O)/p,X=(L-U)/m;P.setAttribute("x",F),P.setAttribute("y",j),P.setAttribute("width",tt),P.setAttribute("height",X),S.append(P),h?.push(`<rect vector-effect="non-scaling-stroke" x="${F}" y="${j}" width="${tt}" 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 ap({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(){se("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&&!wa.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&&wa.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 sp extends Ae{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(!wa.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 Ae{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 xa extends Ae{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":pt.makeHexColor(i[0],i[1],i[2])}_setTextStyle(t){const i=["left","center","right"],{fontColor:a}=this.data.defaultAppearanceData,r=this.data.defaultAppearanceData.fontSize||NO,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/(Lf*r))||1,y=m/g;u=Math.min(r,p(y/Lf))}else{const m=Math.abs(this.data.rect[3]-this.data.rect[1]-h);u=Math.min(r,p(m/Lf))}c.fontSize=`calc(${u}px * var(--total-scale-factor))`,c.color=pt.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 xa{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),wa.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:C}=_;if(b&&(C.type=g,y&&(C.step=y)),p.userValue){const R=p.userValue;if(b)if(g==="time"){const L=new Date(R),O=[L.getHours(),L.getMinutes(),L.getSeconds()];C.value=O.map(U=>U.toString().padStart(2,"0")).join(":")}else C.value=new Date(R-kO).toISOString().split(g==="date"?"T":".",1)[0];else C.value=R}p.lastCommittedValue=C.value,p.commitKey=1,this.data.actions?.Focus||(p.focused=!0)}),a.addEventListener("updatefromsandbox",_=>{this.showElementAndHideCanvas(_.target);const C={value(R){p.userValue=R.detail.value??"",b||t.setValue(i,{value:p.userValue.toString()}),R.target.value=p.userValue},formattedValue(R){const{formattedValue:L}=R.detail;p.formattedValue=L,L!=null&&R.target!==document.activeElement&&(R.target.value=L);const O={formattedValue:L};b&&(O.value=L),t.setValue(i,O)},selRange(R){R.target.setSelectionRange(...R.detail.selRange)},charLimit:R=>{const{charLimit:L}=R.detail,{target:O}=R;if(L===0){O.removeAttribute("maxLength");return}O.setAttribute("maxLength",L);let U=p.userValue;!U||U.length<=L||(U=U.slice(0,L),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(C,_)}),a.addEventListener("keydown",_=>{p.commitKey=1;let C=-1;if(_.key==="Escape"?C=0:_.key==="Enter"&&!this.data.multiLine?C=2:_.key==="Tab"&&(p.commitKey=3),C===-1)return;const{value:R}=_.target;p.lastCommittedValue!==R&&(p.lastCommittedValue=R,p.userValue=R,this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:i,name:"Keystroke",value:R,willCommit:!0,commitKey:C,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:C}=_;let{value:R}=C;if(b){if(R&&g==="time"){const L=R.split(":").map(O=>parseInt(O,10));R=new Date(2e3,0,1,L[0],L[1],L[2]||0).valueOf(),C.step=""}else R=new Date(R).valueOf();C.type="text"}p.userValue=R,p.lastCommittedValue!==R&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:i,name:"Keystroke",value:R,willCommit:!0,commitKey:p.commitKey,selStart:_.target.selectionStart,selEnd:_.target.selectionEnd}}),A(_)}),this.data.actions?.Keystroke&&a.addEventListener("beforeinput",_=>{p.lastCommittedValue=null;const{data:C,target:R}=_,{value:L,selectionStart:O,selectionEnd:U}=R;let P=O,F=U;switch(_.inputType){case"deleteWordBackward":{const j=L.substring(0,O).match(/\w*[^\w]*$/);j&&(P-=j[0].length);break}case"deleteWordForward":{const j=L.substring(O).match(/^[^\w]*\w*/);j&&(F+=j[0].length);break}case"deleteContentBackward":O===U&&(P-=1);break;case"deleteContentForward":O===U&&(F+=1);break}_.preventDefault(),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:i,name:"Keystroke",value:L,change:C||"",willCommit:!1,selStart:P,selEnd:F}})}),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 xa{constructor(t){super(t,{isRenderable:!!t.data.hasOwnCanvas})}}class UO extends xa{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 wa.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 k0 extends xa{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(wa.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 sp{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 xa{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");wa.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,C=>C.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,C=r.children[S],R=document.createElement("option");R.textContent=A,R.value=_,C?C.before(R):r.append(R),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:C}=A,R=document.createElement("option");R.textContent=_,R.value=C,r.append(R)}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 ap extends Ae{constructor(t){const{data:i,elements:a}=t;super(t,{isRenderable:Ae._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=>`${Hf}${r}`).join(",")),this.container}}class BO{#t=this.#M.bind(this);#e=this.#N.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=Ff.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=pt.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=Ff.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||pt.intersect(A.data.rect,h)!==null){h=A.data.rect,u=!0;break}const p=pt.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.#N(),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)}#N(){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 Ae{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0}),this.textContent=t.data.textContent,this.textPosition=t.data.textPosition,this.annotationEditorType=xt.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 jO extends Ae{#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 FO extends Ae{#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 Ae{#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 Ae{#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 I0{constructor(t){super(t),this.containerClassName="polygonAnnotation",this.svgElementName="svg:polygon"}}class VO extends Ae{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 rp extends Ae{#t=null;#e=[];constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0}),this.containerClassName="inkAnnotation",this.svgElementName="svg:polyline",this.annotationEditorType=this.data.it==="InkHighlight"?xt.HIGHLIGHT:xt.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 Ae{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0}),this.annotationEditorType=xt.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 Ae{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 Ae{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 Ae{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 Ae{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0}),this.annotationEditorType=xt.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 Ae{#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 op{#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=`${Hf}${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;Ta(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 Nu,annotationStorage:t.annotationStorage||new Yf,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 Nu,parent:this};for(const r of t){r.borderStyle||=op._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,Ta(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 ku=/\r\n?|\n/g;class Ue extends gt{#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=zs.TRANSLATE_SMALL,r=zs.TRANSLATE_BIG;return zt(this,"_keyboardManager",new el([[["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=xt.FREETEXT;constructor(t){super({...t,name:"freeTextEditor"}),this.#t=t.color||Ue._defaultColor||gt._defaultLineColor,this.#a=t.fontSize||Ue._defaultFontSize,this.annotationElementId||this._uiManager.a11yAlert("pdfjs-editor-freetext-added-alert")}static initialize(t,i){gt.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||gt._defaultLineColor]]}get propertiesToUpdate(){return[[$t.FREETEXT_SIZE,this.#a],[$t.FREETEXT_COLOR,this.#t]]}get toolbarButtons(){return this._colorPicker||=new ll(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(ku,"")}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(ku,`
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(ku,"")),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(ku,""))}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(`
@@ -304,17 +304,13 @@ React keys must be passed directly to JSX without using spread:
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
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:xt.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=pt.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=gt._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:this.#t),c={annotationType:xt.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 rt{static PRECISION=1e-4;toSVGPath(){se("Abstract method `toSVGPath` must be implemented.")}get box(){se("Abstract getter `box` must be implemented.")}serialize(t,i){se("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,x=_*b;let L=h,N=p;h=m,p=g,m+=R,g+=x,this.#p?.push(t,i);const U=-x/A,P=R/A,j=U*this.#l,F=P*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,N,h,p,m,g],6),!this.isEmpty()):(this.#s.set([L,N,h,p,m,g],6),Math.abs(Math.atan2(N-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,N]=this.#s.subarray(14,18),this.#e.push(NaN,NaN,NaN,NaN,((L+h)/2-a)/c,((N+p)/2-r)/u),!0):([L,N,h,p,m,g]=this.#s.subarray(0,6),this.#a.push(((L+5*h)/6-a)/c,((N+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,N]=this.#s.subarray(12,18),this.#e.push(((L+5*h)/6-a)/c,((N+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 rt{#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=rt._rescale(this.#r,t,r,u,-h),m=rt._rescale(this.#a,t,r,u,-h);break;case 90:p=rt._rescaleAndSwap(this.#r,t,i,u,h),m=rt._rescaleAndSwap(this.#a,t,i,u,h);break;case 180:p=rt._rescale(this.#r,a,i,-u,h),m=rt._rescale(this.#a,a,i,-u,h);break;case 270:p=rt._rescaleAndSwap(this.#r,a,r,-u,-h),m=rt._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]))pt.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];pt.bezierBoundingBox(a,r,...i.slice(g,g+6),A),pt.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 lp{#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,N=Math.floor((A-i)/u)*u,U=Math.ceil((A+R+i)/u)*u,P=[x,N,U,!0],j=[L,N,U,!1];this.#n.push(P,j),pt.rectBoundingBox(x,N,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 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 rt{#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 cp extends Ca{newFreeDrawOutline(t,i,a,r,c,u){return new KO(t,i,a,r,c,u)}}class KO extends z0{newOutliner(t,i,a,r,c,u=0){return new cp(t,i,a,r,c,u)}}class _e extends gt{#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=xt.HIGHLIGHT;static _freeHighlightId=-1;static _freeHighlight=null;static _freeHighlightClipId="";static get _keyboardManager(){const t=_e.prototype;return zt(this,"_keyboardManager",new el([[["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||_e._defaultColor,this.#m=t.thickness||_e._defaultThickness,this.#g=t.opacity||_e._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 lp(this.#n,.001);this.#c=t.getOutlines(),[this.x,this.y,this.width,this.height]=this.#c.box;const i=new lp(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:_e.#M(this.#c.box,(g-this.rotation+360)%360),path:{d:t.toSVGPath()}}),this.parent.drawLayer.updateProperties(this.#f,{bbox:_e.#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){gt.initialize(t,i),_e._defaultColor||=i.highlightColors?.values().next().value||"#fff066"}static updateDefaultParams(t,i){switch(t){case $t.HIGHLIGHT_COLOR:_e._defaultColor=i;break;case $t.HIGHLIGHT_THICKNESS:_e._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,_e._defaultColor],[$t.HIGHLIGHT_THICKNESS,_e._defaultThickness]]}get propertiesToUpdate(){return[[$t.HIGHLIGHT_COLOR,this.color||_e._defaultColor],[$t.HIGHLIGHT_THICKNESS,this.#m||_e._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,_e._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=_e.#M(this.#c.box,t)):a=_e.#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:_e.#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){_e._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}#N(){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",Yn,{signal:y}),a.addEventListener("pointermove",this.#k.bind(this,t),{signal:y}),this._freeHighlight=new cp({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#k(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:N,popupRef:U,contentsObj:P},parent:{page:{pageNumber:j}}}=t;r=t={annotationType:xt.HIGHLIGHT,color:Array.from(L),opacity:N,quadPoints:A,boxes:null,pageIndex:j-1,rect:_.slice(0),rotation:R,annotationElementId:x,id:x,deleted:!1,popupRef:U,comment:P?.str||null}}else if(t instanceof rp){const{data:{inkLists:A,rect:_,rotation:R,id:x,color:L,borderStyle:{rawWidth:N},popupRef:U,contentsObj:P},parent:{page:{pageNumber:j}}}=t;r=t={annotationType:xt.HIGHLIGHT,color:Array.from(L),thickness:N,inkLists:A,boxes:null,pageIndex:j-1,rect:_.slice(0),rotation:R,annotationElementId:x,id:x,deleted:!1,popupRef:U,comment:P?.str||null}}const{color:c,quadPoints:u,inkLists:h,opacity:p}=t,m=await super.deserialize(t,i,a);m.color=pt.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 cp(_,[0,0,g,y],1,m.#m/2,!0,.001);for(let N=0,U=A.length;N<U;N+=2)_.x=A[N]-b,_.y=y-(A[N+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=gt._colorManager.convert(this._uiManager.getNonHCMColor(this.color)),r={annotationType:xt.HIGHLIGHT,color:a,opacity:this.#g,thickness:this.#m,quadPoints:this.#N(),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(){se("Not implemented")}}class bt extends gt{#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(bt._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){se("Not implemented")}static get typesMap(){se("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&&(bt.#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,bt._mergeSVGProperties(this.#t.getPathResizingSVGProperties(this.#f()),{bbox:this.#m()}))}_onResized(){this.parent?.drawLayer.updateProperties(this._drawId,bt._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,bt._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,bt._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){se("Not implemented")}static startDrawing(t,i,a,r){const{target:c,offsetX:u,offsetY:h,pointerId:p,pointerType:m}=r;if(bt.#r&&bt.#r!==m)return;const{viewport:{rotation:g}}=t,{width:y,height:b}=c.getBoundingClientRect(),S=bt.#i=new AbortController,A=t.combinedSignal(S);if(bt.#s||=p,bt.#r??=m,window.addEventListener("pointerup",_=>{bt.#s===_.pointerId?this._endDraw(_):bt.#o?.delete(_.pointerId)},{signal:A}),window.addEventListener("pointercancel",_=>{bt.#s===_.pointerId?this._currentParent.endDrawingSession():bt.#o?.delete(_.pointerId)},{signal:A}),window.addEventListener("pointerdown",_=>{bt.#r===_.pointerType&&((bt.#o||=new Set).add(_.pointerId),bt.#n.isCancellable()&&(bt.#n.removeLastElement(),bt.#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===bt.#u&&Oe(_)},{signal:A}),t.toggleDrawing(),i._editorUndoBar?.hide(),bt.#n){t.drawLayer.updateProperties(this._currentDrawId,bt.#n.startNew(u,h,y,b,g));return}i.updateUIForDefaultProperties(this),bt.#n=this.createDrawerInstance(u,h,y,b,g),bt.#a=this.getDefaultDrawingOptions(),this._currentParent=t,{id:this._currentDrawId}=t.drawLayer.draw(this._mergeSVGProperties(bt.#a.toSVGProperties(),bt.#n.defaultSVGProperties),!0,!1)}static _drawMove(t){if(bt.#u=-1,!bt.#n)return;const{offsetX:i,offsetY:a,pointerId:r}=t;if(bt.#s===r){if(bt.#o?.size>=1){this._endDraw(t);return}this._currentParent.drawLayer.updateProperties(this._currentDrawId,bt.#n.add(i,a)),bt.#u=t.timeStamp,Oe(t)}}static _cleanup(t){t&&(this._currentDrawId=-1,this._currentParent=null,bt.#n=null,bt.#a=null,bt.#r=null,bt.#u=NaN),bt.#i&&(bt.#i.abort(),bt.#i=null,bt.#s=NaN,bt.#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,bt.#n.end(t.offsetX,t.offsetY)),this.supportMultipleDrawings){const a=bt.#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),!bt.#n.isEmpty()){const{pageDimensions:[a,r],scale:c}=i,u=i.createAndAddNewEditor({offsetX:0,offsetY:0},!1,{drawId:this._currentDrawId,drawOutlines:bt.#n.getOutlines(a*c,r*c,c,this._INNER_MARGIN),drawingOptions:bt.#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){se("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 ul;#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 rt._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(...rt.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=rt.svgRound(this.#e[4]),i=rt.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=rt.svgRound(this.#e[10]),c=rt.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(rt.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 ul extends rt{#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${rt.svgRound(i[4])} ${rt.svgRound(i[5])}`),i.length===6){t.push("Z");continue}if(i.length===12&&isNaN(i[6])){t.push(`L${rt.svgRound(i[10])} ${rt.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(rt.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,N,U;switch(this.#o){case 0:U=rt._rescale,b=t,S=i+r,A=a,_=-r,R=t+p*a,x=i+(1-m-y)*r,L=t+(p+g)*a,N=i+(1-m)*r;break;case 90:U=rt._rescaleAndSwap,b=t,S=i,A=a,_=r,R=t+m*a,x=i+p*r,L=t+(m+y)*a,N=i+(p+g)*r;break;case 180:U=rt._rescale,b=t+a,S=i,A=-a,_=r,R=t+(1-p-g)*a,x=i+m*r,L=t+(1-p)*a,N=i+(m+y)*r;break;case 270:U=rt._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,N=i+(1-p)*r;break}for(const{line:P,points:j}of this.#i)u.push(U(P,b,S,A,_,c?new Array(P.length):null)),h.push(U(j,b,S,A,_,c?new Array(j.length):null));return{lines:u,points:h,rect:[R,x,L,N]}}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:_=rt._rescale,y=-t/a,b=i/r+1,S=1/a,A=-1/r;break;case 90:_=rt._rescaleAndSwap,y=-i/r,b=-t/a,S=1/r,A=1/a;break;case 180:_=rt._rescale,y=t/a+1,b=-i/r,S=-1/a,A=1/r;break;case 270:_=rt._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 N=new Float32Array(3*(L-2));u.push(N);let[U,P,j,F]=x.subarray(0,4);N.set([NaN,NaN,NaN,NaN,U,P],0);for(let tt=4;tt<L;tt+=2){const X=x[tt],st=x[tt+1];N.set(rt.createBezierPoints(U,P,j,F,X,st),(tt-2)*3),[U,P,j,F]=[j,F,X,st]}}}for(let x=0,L=u.length;x<L;x++)g.push({line:_(u[x].map(N=>N??NaN),y,b,S,A),points:_(h[x].map(N=>N??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)pt.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);pt.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(rt.svgRound).join(" ")}get defaultProperties(){const[t,i]=this.#t;return{root:{viewBox:this.viewBox},path:{"transform-origin":`${rt.svgRound(t)} ${rt.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} ${rt.svgRound(h)} ${rt.svgRound(p)})`}getPathResizingSVGProperties([t,i,a,r]){const[c,u]=this.#c(),[h,p,m,g]=this.#t;if(Math.abs(m-c)<=rt.PRECISION||Math.abs(g-u)<=rt.PRECISION){const _=t+a/2-(h+m/2),R=i+r/2-(p+g/2);return{path:{"transform-origin":`${rt.svgRound(t)} ${rt.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":`${rt.svgRound(h)} ${rt.svgRound(p)}`,transform:`${this.rotationTransform} scale(${S} ${A}) translate(${rt.svgRound(c)} ${rt.svgRound(u)}) scale(${y} ${b}) translate(${rt.svgRound(-c)} ${rt.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)<=rt.PRECISION||Math.abs(y-u)<=rt.PRECISION){const R=t+a/2-(p+g/2),x=i+r/2-(m+y/2);for(const{line:L,points:N}of this.#i)rt._translate(L,R,x,L),rt._translate(N,R,x,N);return{root:{viewBox:this.viewBox},path:{"transform-origin":`${rt.svgRound(t)} ${rt.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)rt._rescale(R,A,_,b,S,R),rt._rescale(x,A,_,b,S,x);return{root:{viewBox:this.viewBox},path:{"transform-origin":`${rt.svgRound(t)} ${rt.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)rt._translate(m,h,p,m),rt._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)rt._rescale(y,h,p,m,g,y),rt._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":`${rt.svgRound(t)} ${rt.svgRound(i)}`}}}get defaultSVGProperties(){const t=this.#t;return{root:{viewBox:this.viewBox},rootClass:{draw:!0},path:{d:this.toSVGPath(),"transform-origin":`${rt.svgRound(t[0])} ${rt.svgRound(t[1])}`,transform:this.rotationTransform||null},bbox:t}}}class Lu extends H0{constructor(t){super(),this._viewParameters=t,super.updateProperties({fill:"none",stroke:gt._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 Lu(this._viewParameters);return t.updateAll(this),t}}class up extends bt{static _type="ink";static _editorType=xt.INK;static _defaultDrawingOptions=null;constructor(t){super({...t,name:"inkEditor"}),this._willKeepAspectRatio=!0,this.defaultL10nId="pdfjs-editor-ink-editor"}static initialize(t,i){gt.initialize(t,i),this._defaultDrawingOptions=new Lu(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 ul.deserialize(t,i,a,r,c,u)}static async deserialize(t,i,a){let r=null;if(t instanceof rp){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:xt.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 ll(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=up.getDefaultDrawingOptions({stroke:pt.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:xt.INK,color:gt._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 dp extends ul{toSVGPath(){let t=super.toSVGPath();return t.endsWith("Z")||(t+="Z"),t}}const Iu=8,dl=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 N;for(const Z of m)if(Z.id===p){N=Z;break}N?N.isHole?L.parent=x?N.parent:p:L.parent=x?p:N.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 P=this.#n[2*U],j=this.#n[2*U+1];const F=g+P,tt=y+j;A=F,_=tt;let X=g,st=y;for(;;){const Z=this.#a(u,i,X,st,A,_,1);P=this.#n[2*Z],j=this.#n[2*Z+1];const ot=X+P,St=st+j;R.push(St,ot);const yt=X*i+st;if(u[yt+1]===0?u[yt]=-h:u[yt]===1&&(u[yt]=h),ot===g&&St===y&&X===F&&st===tt){u[b]!==1&&(p=Math.abs(u[b]));break}else A=X,_=st,X=ot,st=St}}}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)),N=A*(1-L+L**2),U=Math.max(Math.atan(Math.abs(x+R)*N),Math.atan(Math.abs(x-R)*N));let P=0,j=i;for(let F=i+2;F<a-2;F+=2){const tt=Math.abs(b-g*t[F+1]+y*t[F]);tt>P&&(j=F,P=tt)}P>(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 N=0,U=0;for(let j=0;j<u;j++){const F=_+j-m;if(!(F<0||F>=a))for(let tt=0;tt<u;tt++){const X=R+tt-m;if(X<0||X>=i)continue;const st=t[F*i+X],Z=h[j*u+tt]*g[Math.abs(st-L)];N+=st*Z,U+=Z}}const P=S[x]=Math.round(N/U);A[P]++}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:N}=g.measureText(t),U=1.5,P=Math.ceil(Math.max(Math.abs(S)+Math.abs(A)||0,N)*U),j=Math.ceil(Math.max(Math.abs(_)+Math.abs(R)||y,Math.abs(x)+Math.abs(L)||y)*U);m=new OffscreenCanvas(P,j),g=m.getContext("2d",{alpha:!0,willReadFrequently:!0}),g.font=b,g.filter="grayscale(1)",g.fillStyle="white",g.fillRect(0,0,P,j),g.fillStyle="black",g.fillText(t,P*(U-1)/2,j*(3-U)/2);const F=this.#h(g.getImageData(0,0,P,j).data),tt=this.#c(F),X=this.#l(tt),st=this.#s(F,P,j,X);return this.processDrawnLines({lines:{curves:st,width:P,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 N=u?this.#o(L):L;if(!N)continue;R.push(N);const U=N.length,P=new Float32Array(U),j=new Float32Array(3*(U===2?2:U-2));if(b.push({line:j,points:P}),U===2){P[0]=N[0]*A,P[1]=N[1]*_,j.set([NaN,NaN,NaN,NaN,P[0],P[1]],0);continue}let[F,tt,X,st]=N;F*=A,tt*=_,X*=A,st*=_,P.set([F,tt,X,st],0),j.set([NaN,NaN,NaN,NaN,F,tt],0);for(let Z=4;Z<U;Z+=2){const ot=P[Z]=N[Z]*A,St=P[Z+1]=N[Z+1]*_;j.set(rt.createBezierPoints(F,tt,X,st,ot,St),(Z-2)*3),[F,tt,X,st]=[X,st,ot,St]}}if(b.length===0)return null;const x=h?new dp:new ul;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 N of t){p+=N.length;for(let U=2,P=N.length;U<P;U++){const j=N[U]-N[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=Iu+dl*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 N of t)b[S++]=N.length-2,b[S++]=N[0],b[S++]=N[1];const A=new CompressionStream("deflate-raw"),_=A.writable.getWriter();await _.ready,_.write(b);const R=m.prototype.constructor;for(const N of t){const U=new R(N.length-2);for(let P=2,j=N.length;P<j;P++)U[P-2]=N[P]-N[P-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=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 N of a)u||=new Uint8Array(new Uint32Array(N.buffer,0,4)[0]),u.set(N,h),h+=N.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=(Iu+dl*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 N=0;N<A;N++){const U=p[dl*N+Iu],P=new Float32Array(U+2);R.push(P);for(let j=0;j<dl-1;j++)P[j]=p[dl*N+Iu+j+1];for(let j=0;j<U;j++)P[j+2]=P[j]+L[h++]}return{areContours:b,thickness:S,outlines:R,width:g,height:y}}catch(i){return Ct(`decompressSignature: ${i}`),null}}}class hp extends H0{constructor(){super(),super.updateProperties({fill:gt._defaultLineColor,"stroke-width":0})}clone(){const t=new hp;return t.updateAll(this),t}}class fp extends Lu{constructor(t){super(t),super.updateProperties({stroke:gt._defaultLineColor,"stroke-width":1})}clone(){const t=new fp(this._viewParameters);return t.updateAll(this),t}}class Oi extends bt{#t=!1;#e=null;#n=null;#i=null;static _type="signature";static _editorType=xt.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){gt.initialize(t,i),this._defaultDrawingOptions=new hp,this._defaultDrawnSignatureOptions=new fp(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 dp,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:xt.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?dp.deserialize(t,i,a,r,c,u):ul.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 gt{#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=xt.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){gt.initialize(t,i)}static isHandlingMimeForPasting(t){return $f.includes(t)}static paste(t,i){i.pasteEditor({mode:xt.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=$f.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,N=x*u.sy,U=new OffscreenCanvas(L*2,N*2),P=U.getContext("2d");P.fillStyle=_,P.fillRect(0,0,L*2,N*2),P.fillStyle=R,P.fillRect(0,0,L,N),P.fillRect(L,N,L,N),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:N,contentsObj:U},container:P,parent:{page:{pageNumber:j}},canvas:F}=t;let tt,X;F?(delete t.canvas,{id:tt,bitmap:X}=a.imageManager.getFromCanvas(P.id,F),F.remove()):(c=!0,t._hasNoCanvas=!0);const st=(await i._structTree.getAriaAttributes(`${Hf}${x}`))?.get("aria-label")||"";r=t={annotationType:xt.STAMP,bitmapId:tt,bitmap:X,pageIndex:j-1,rect:_.slice(0),rotation:R,annotationElementId:x,id:x,deleted:!1,accessibilityData:{decorative:!1,altText:st},isSvg:!1,structParent:L,popupRef:N,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:xt.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 ns{#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,up,JO,_e,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=[...ns.#m.values()];if(!ns._initialized){ns._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()===xt.NONE}updateToolbar(t){this.#d.updateToolbar(t)}updateMode(t=this.#d.getMode()){switch(this.#b(),t){case xt.NONE:this.disableTextSelection(),this.togglePointerEvents(!1),this.toggleAnnotationLayerPointerEvents(!0),this.disableClick();return;case xt.INK:this.disableTextSelection(),this.togglePointerEvents(!0),this.enableClick();break;case xt.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 ns.#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 ns.#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(),_e.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),gt.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 ns.#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 ns.#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===xt.STAMP||a===xt.SIGNATURE){this.#d.unselectAll();return}this.createAndAddNewEditor(t,!1)}pointerdown(t){if(this.#d.getMode()===xt.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,Ta(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,Ta(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 Nu)}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:lp},globalThis.pdfjsLib={AbortException:Us,AnnotationEditorLayer:ns,AnnotationEditorParamsType:$t,AnnotationEditorType:xt,AnnotationEditorUIManager:zs,AnnotationLayer:op,AnnotationMode:Ps,AnnotationType:De,build:MO,ColorPicker:Wn,createValidAbsoluteUrl:$v,DOMSVGFactory:Nu,DrawLayer:Ye,FeatureTest:Ve,fetchData:Ko,getDocument:C0,getFilenameFromUrl:AM,getPdfFilenameFromUrl:_M,getRGB:Tu,getUuid:Xv,getXfaPageViewport:wM,GlobalWorkerOptions:Cr,ImageKind:gu,InvalidPDFException:Pf,isDataScheme:_u,isPdfFile:Ff,isValidExplicitDest:PM,MathClamp:dn,noContextMenu:Yn,normalizeUnicode:vM,OPS:bu,OutputScale:Ri,PasswordResponses:uM,PDFDataRangeTransport:R0,PDFDateString:jf,PDFWorker:ol,PermissionFlag:cM,PixelsPerInch:Tr,RenderingCancelledException:Bf,ResponseException:Au,setLayerDimensions:Ta,shadow:zt,SignatureExtractor:Mr,stopEvent:Oe,SupportedImageMimeTypes:$f,TextLayer:hn,TouchManager:xu,updateUrlHash:Gv,Util:pt,VerbosityLevel:yu,version:DO,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 tN{ID_NOT_FOUND="not_found";extractProcessId(){try{const t=window.location.href;let i=t.match(/\/processo\/(\d+)\//);if(i&&i[1]||(i=t.match(/\/pjekz\/processo\/(\d+)\//),i&&i[1]))return 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 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
-
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(`
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 rt{static PRECISION=1e-4;toSVGPath(){se("Abstract method `toSVGPath` must be implemented.")}get box(){se("Abstract getter `box` must be implemented.")}serialize(t,i){se("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,C=_*y,R=_*b;let L=h,O=p;h=m,p=g,m+=C,g+=R,this.#p?.push(t,i);const U=-R/A,P=C/A,F=U*this.#l,j=P*this.#l;return this.#s.set(this.#s.subarray(2,8),0),this.#s.set([m+F,g+j],4),this.#s.set(this.#s.subarray(14,18),12),this.#s.set([m-F,g-j],16),isNaN(this.#s[6])?(this.#a.length===0&&(this.#s.set([h+F,p+j],2),this.#a.push(NaN,NaN,NaN,NaN,(h+F-a)/c,(p+j-r)/u),this.#s.set([h-F,p-j],14),this.#e.push(NaN,NaN,NaN,NaN,(h-F-a)/c,(p-j-r)/u)),this.#s.set([L,O,h,p,m,g],6),!this.isEmpty()):(this.#s.set([L,O,h,p,m,g],6),Math.abs(Math.atan2(O-p,L-h)-Math.atan2(R,C))<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,O]=this.#s.subarray(14,18),this.#e.push(NaN,NaN,NaN,NaN,((L+h)/2-a)/c,((O+p)/2-r)/u),!0):([L,O,h,p,m,g]=this.#s.subarray(0,6),this.#a.push(((L+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,L,O]=this.#s.subarray(12,18),this.#e.push(((L+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 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 rt{#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=rt._rescale(this.#r,t,r,u,-h),m=rt._rescale(this.#a,t,r,u,-h);break;case 90:p=rt._rescaleAndSwap(this.#r,t,i,u,h),m=rt._rescaleAndSwap(this.#a,t,i,u,h);break;case 180:p=rt._rescale(this.#r,a,i,-u,h),m=rt._rescale(this.#a,a,i,-u,h);break;case 270:p=rt._rescaleAndSwap(this.#r,a,r,-u,-h),m=rt._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]))pt.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];pt.bezierBoundingBox(a,r,...i.slice(g,g+6),A),pt.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 C=2;C<this.#a.length;C+=2)_.add({x:this.#a[C]*y+S,y:this.#a[C+1]*b+A});return _.getOutlines()}}class lp{#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:C}of t){const R=Math.floor((S-i)/u)*u,L=Math.ceil((S+_+i)/u)*u,O=Math.floor((A-i)/u)*u,U=Math.ceil((A+C+i)/u)*u,P=[R,O,U,!0],F=[L,O,U,!1];this.#n.push(P,F),pt.rectBoundingBox(R,O,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,_,C]=S;S[0]=(A-m)/h,S[1]=(_-g)/p,S[2]=(C-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 rt{#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 cp extends Ca{newFreeDrawOutline(t,i,a,r,c,u){return new KO(t,i,a,r,c,u)}}class KO extends z0{newOutliner(t,i,a,r,c,u=0){return new cp(t,i,a,r,c,u)}}class _e extends gt{#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=xt.HIGHLIGHT;static _freeHighlightId=-1;static _freeHighlight=null;static _freeHighlightClipId="";static get _keyboardManager(){const t=_e.prototype;return zt(this,"_keyboardManager",new el([[["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||_e._defaultColor,this.#m=t.thickness||_e._defaultThickness,this.#g=t.opacity||_e._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 lp(this.#n,.001);this.#c=t.getOutlines(),[this.x,this.y,this.width,this.height]=this.#c.box;const i=new lp(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:_e.#M(this.#c.box,(g-this.rotation+360)%360),path:{d:t.toSVGPath()}}),this.parent.drawLayer.updateProperties(this.#f,{bbox:_e.#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){gt.initialize(t,i),_e._defaultColor||=i.highlightColors?.values().next().value||"#fff066"}static updateDefaultParams(t,i){switch(t){case $t.HIGHLIGHT_COLOR:_e._defaultColor=i;break;case $t.HIGHLIGHT_THICKNESS:_e._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,_e._defaultColor],[$t.HIGHLIGHT_THICKNESS,_e._defaultThickness]]}get propertiesToUpdate(){return[[$t.HIGHLIGHT_COLOR,this.color||_e._defaultColor],[$t.HIGHLIGHT_THICKNESS,this.#m||_e._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,_e._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=_e.#M(this.#c.box,t)):a=_e.#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:_e.#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){_e._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}#N(){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.#j(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.#k.bind(this,t),{signal:y}),this._freeHighlight=new cp({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#k(t,i){this._freeHighlight.add(i)&&t.drawLayer.updateProperties(this._freeHighlightId,{path:{d:this._freeHighlight.toSVGPath()}})}static#j(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:C,id:R,color:L,opacity:O,popupRef:U,contentsObj:P},parent:{page:{pageNumber:F}}}=t;r=t={annotationType:xt.HIGHLIGHT,color:Array.from(L),opacity:O,quadPoints:A,boxes:null,pageIndex:F-1,rect:_.slice(0),rotation:C,annotationElementId:R,id:R,deleted:!1,popupRef:U,comment:P?.str||null}}else if(t instanceof rp){const{data:{inkLists:A,rect:_,rotation:C,id:R,color:L,borderStyle:{rawWidth:O},popupRef:U,contentsObj:P},parent:{page:{pageNumber:F}}}=t;r=t={annotationType:xt.HIGHLIGHT,color:Array.from(L),thickness:O,inkLists:A,boxes:null,pageIndex:F-1,rect:_.slice(0),rotation:C,annotationElementId:R,id:R,deleted:!1,popupRef:U,comment:P?.str||null}}const{color:c,quadPoints:u,inkLists:h,opacity:p}=t,m=await super.deserialize(t,i,a);m.color=pt.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)},C=new cp(_,[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),C.add(_);const{id:R,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:C.toSVGPath()}},!0,!0);m.#E({highlightOutlines:C.getOutlines(),highlightId:R,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=gt._colorManager.convert(this._uiManager.getNonHCMColor(this.color)),r={annotationType:xt.HIGHLIGHT,color:a,opacity:this.#g,thickness:this.#m,quadPoints:this.#N(),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(){se("Not implemented")}}class bt extends gt{#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(bt._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){se("Not implemented")}static get typesMap(){se("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&&(bt.#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,bt._mergeSVGProperties(this.#t.getPathResizingSVGProperties(this.#f()),{bbox:this.#m()}))}_onResized(){this.parent?.drawLayer.updateProperties(this._drawId,bt._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,bt._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,bt._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){se("Not implemented")}static startDrawing(t,i,a,r){const{target:c,offsetX:u,offsetY:h,pointerId:p,pointerType:m}=r;if(bt.#r&&bt.#r!==m)return;const{viewport:{rotation:g}}=t,{width:y,height:b}=c.getBoundingClientRect(),S=bt.#i=new AbortController,A=t.combinedSignal(S);if(bt.#s||=p,bt.#r??=m,window.addEventListener("pointerup",_=>{bt.#s===_.pointerId?this._endDraw(_):bt.#o?.delete(_.pointerId)},{signal:A}),window.addEventListener("pointercancel",_=>{bt.#s===_.pointerId?this._currentParent.endDrawingSession():bt.#o?.delete(_.pointerId)},{signal:A}),window.addEventListener("pointerdown",_=>{bt.#r===_.pointerType&&((bt.#o||=new Set).add(_.pointerId),bt.#n.isCancellable()&&(bt.#n.removeLastElement(),bt.#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===bt.#u&&Oe(_)},{signal:A}),t.toggleDrawing(),i._editorUndoBar?.hide(),bt.#n){t.drawLayer.updateProperties(this._currentDrawId,bt.#n.startNew(u,h,y,b,g));return}i.updateUIForDefaultProperties(this),bt.#n=this.createDrawerInstance(u,h,y,b,g),bt.#a=this.getDefaultDrawingOptions(),this._currentParent=t,{id:this._currentDrawId}=t.drawLayer.draw(this._mergeSVGProperties(bt.#a.toSVGProperties(),bt.#n.defaultSVGProperties),!0,!1)}static _drawMove(t){if(bt.#u=-1,!bt.#n)return;const{offsetX:i,offsetY:a,pointerId:r}=t;if(bt.#s===r){if(bt.#o?.size>=1){this._endDraw(t);return}this._currentParent.drawLayer.updateProperties(this._currentDrawId,bt.#n.add(i,a)),bt.#u=t.timeStamp,Oe(t)}}static _cleanup(t){t&&(this._currentDrawId=-1,this._currentParent=null,bt.#n=null,bt.#a=null,bt.#r=null,bt.#u=NaN),bt.#i&&(bt.#i.abort(),bt.#i=null,bt.#s=NaN,bt.#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,bt.#n.end(t.offsetX,t.offsetY)),this.supportMultipleDrawings){const a=bt.#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),!bt.#n.isEmpty()){const{pageDimensions:[a,r],scale:c}=i,u=i.createAndAddNewEditor({offsetX:0,offsetY:0},!1,{drawId:this._currentDrawId,drawOutlines:bt.#n.getOutlines(a*c,r*c,c,this._INNER_MARGIN),drawingOptions:bt.#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){se("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 ul;#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 rt._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(...rt.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=rt.svgRound(this.#e[4]),i=rt.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=rt.svgRound(this.#e[10]),c=rt.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(rt.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 ul extends rt{#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${rt.svgRound(i[4])} ${rt.svgRound(i[5])}`),i.length===6){t.push("Z");continue}if(i.length===12&&isNaN(i[6])){t.push(`L${rt.svgRound(i[10])} ${rt.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(rt.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,_,C,R,L,O,U;switch(this.#o){case 0:U=rt._rescale,b=t,S=i+r,A=a,_=-r,C=t+p*a,R=i+(1-m-y)*r,L=t+(p+g)*a,O=i+(1-m)*r;break;case 90:U=rt._rescaleAndSwap,b=t,S=i,A=a,_=r,C=t+m*a,R=i+p*r,L=t+(m+y)*a,O=i+(p+g)*r;break;case 180:U=rt._rescale,b=t+a,S=i,A=-a,_=r,C=t+(1-p-g)*a,R=i+m*r,L=t+(1-p)*a,O=i+(m+y)*r;break;case 270:U=rt._rescaleAndSwap,b=t+a,S=i+r,A=-a,_=-r,C=t+(1-m-y)*a,R=i+(1-p-g)*r,L=t+(1-m)*a,O=i+(1-p)*r;break}for(const{line:P,points:F}of this.#i)u.push(U(P,b,S,A,_,c?new Array(P.length):null)),h.push(U(F,b,S,A,_,c?new Array(F.length):null));return{lines:u,points:h,rect:[C,R,L,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:_=rt._rescale,y=-t/a,b=i/r+1,S=1/a,A=-1/r;break;case 90:_=rt._rescaleAndSwap,y=-i/r,b=-t/a,S=1/r,A=1/a;break;case 180:_=rt._rescale,y=t/a+1,b=-i/r,S=-1/a,A=1/r;break;case 270:_=rt._rescaleAndSwap,y=i/r+1,b=t/a+1,S=-1/r,A=-1/a;break}if(!u){u=[];for(const R of h){const L=R.length;if(L===2){u.push(new Float32Array([NaN,NaN,NaN,NaN,R[0],R[1]]));continue}if(L===4){u.push(new Float32Array([NaN,NaN,NaN,NaN,R[0],R[1],NaN,NaN,NaN,NaN,R[2],R[3]]));continue}const O=new Float32Array(3*(L-2));u.push(O);let[U,P,F,j]=R.subarray(0,4);O.set([NaN,NaN,NaN,NaN,U,P],0);for(let tt=4;tt<L;tt+=2){const X=R[tt],st=R[tt+1];O.set(rt.createBezierPoints(U,P,F,j,X,st),(tt-2)*3),[U,P,F,j]=[F,j,X,st]}}}for(let R=0,L=u.length;R<L;R++)g.push({line:_(u[R].map(O=>O??NaN),y,b,S,A),points:_(h[R].map(O=>O??NaN),y,b,S,A)});const C=new this.prototype.constructor;return C.build(g,a,r,1,p,m,c),C}#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)pt.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);pt.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(rt.svgRound).join(" ")}get defaultProperties(){const[t,i]=this.#t;return{root:{viewBox:this.viewBox},path:{"transform-origin":`${rt.svgRound(t)} ${rt.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} ${rt.svgRound(h)} ${rt.svgRound(p)})`}getPathResizingSVGProperties([t,i,a,r]){const[c,u]=this.#c(),[h,p,m,g]=this.#t;if(Math.abs(m-c)<=rt.PRECISION||Math.abs(g-u)<=rt.PRECISION){const _=t+a/2-(h+m/2),C=i+r/2-(p+g/2);return{path:{"transform-origin":`${rt.svgRound(t)} ${rt.svgRound(i)}`,transform:`${this.rotationTransform} translate(${_} ${C})`}}}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":`${rt.svgRound(h)} ${rt.svgRound(p)}`,transform:`${this.rotationTransform} scale(${S} ${A}) translate(${rt.svgRound(c)} ${rt.svgRound(u)}) scale(${y} ${b}) translate(${rt.svgRound(-c)} ${rt.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)<=rt.PRECISION||Math.abs(y-u)<=rt.PRECISION){const C=t+a/2-(p+g/2),R=i+r/2-(m+y/2);for(const{line:L,points:O}of this.#i)rt._translate(L,C,R,L),rt._translate(O,C,R,O);return{root:{viewBox:this.viewBox},path:{"transform-origin":`${rt.svgRound(t)} ${rt.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:C,points:R}of this.#i)rt._rescale(C,A,_,b,S,C),rt._rescale(R,A,_,b,S,R);return{root:{viewBox:this.viewBox},path:{"transform-origin":`${rt.svgRound(t)} ${rt.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)rt._translate(m,h,p,m),rt._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)rt._rescale(y,h,p,m,g,y),rt._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":`${rt.svgRound(t)} ${rt.svgRound(i)}`}}}get defaultSVGProperties(){const t=this.#t;return{root:{viewBox:this.viewBox},rootClass:{draw:!0},path:{d:this.toSVGPath(),"transform-origin":`${rt.svgRound(t[0])} ${rt.svgRound(t[1])}`,transform:this.rotationTransform||null},bbox:t}}}class Lu extends H0{constructor(t){super(),this._viewParameters=t,super.updateProperties({fill:"none",stroke:gt._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 Lu(this._viewParameters);return t.updateAll(this),t}}class up extends bt{static _type="ink";static _editorType=xt.INK;static _defaultDrawingOptions=null;constructor(t){super({...t,name:"inkEditor"}),this._willKeepAspectRatio=!0,this.defaultL10nId="pdfjs-editor-ink-editor"}static initialize(t,i){gt.initialize(t,i),this._defaultDrawingOptions=new Lu(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 ul.deserialize(t,i,a,r,c,u)}static async deserialize(t,i,a){let r=null;if(t instanceof rp){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:xt.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 ll(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=up.getDefaultDrawingOptions({stroke:pt.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:xt.INK,color:gt._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 dp extends ul{toSVGPath(){let t=super.toSVGPath();return t.endsWith("Z")||(t+="Z"),t}}const Iu=8,dl=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 C=[y,g],R=_===y+1,L={isHole:R,points:C,id:h,parent:0};m.push(L);let O;for(const Z of m)if(Z.id===p){O=Z;break}O?O.isHole?L.parent=R?O.parent:p:L.parent=R?p:O.parent:L.parent=R?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 P=this.#n[2*U],F=this.#n[2*U+1];const j=g+P,tt=y+F;A=j,_=tt;let X=g,st=y;for(;;){const Z=this.#a(u,i,X,st,A,_,1);P=this.#n[2*Z],F=this.#n[2*Z+1];const ot=X+P,St=st+F;C.push(St,ot);const yt=X*i+st;if(u[yt+1]===0?u[yt]=-h:u[yt]===1&&(u[yt]=h),ot===g&&St===y&&X===j&&st===tt){u[b]!==1&&(p=Math.abs(u[b]));break}else A=X,_=st,X=ot,st=St}}}return m}static#r(t,i,a,r){if(a-i<=4){for(let j=i;j<a-2;j+=2)r.push(t[j],t[j+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),C=Math.cos(_),R=Math.sin(_),L=A*(Math.abs(C)+Math.abs(R)),O=A*(1-L+L**2),U=Math.max(Math.atan(Math.abs(R+C)*O),Math.atan(Math.abs(R-C)*O));let P=0,F=i;for(let j=i+2;j<a-2;j+=2){const tt=Math.abs(b-g*t[j+1]+y*t[j]);tt>P&&(F=j,P=tt)}P>(m*U)**2?(this.#r(t,i,F+2,r),this.#r(t,F,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 C=(_-m)**2;for(let R=0;R<u;R++)h[_*u+R]=Math.exp((C+(R-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 C=0;C<i;C++){const R=_*i+C,L=t[R];let O=0,U=0;for(let F=0;F<u;F++){const j=_+F-m;if(!(j<0||j>=a))for(let tt=0;tt<u;tt++){const X=C+tt-m;if(X<0||X>=i)continue;const st=t[j*i+X],Z=h[F*u+tt]*g[Math.abs(st-L)];O+=st*Z,U+=Z}}const P=S[R]=Math.round(O/U);A[P]++}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 R=0;R<A;R++){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 C=Math.min(c/u,c/h);u=Math.round(u*C),h=Math.round(h*C)}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:C,fontBoundingBoxAscent:R,fontBoundingBoxDescent:L,width:O}=g.measureText(t),U=1.5,P=Math.ceil(Math.max(Math.abs(S)+Math.abs(A)||0,O)*U),F=Math.ceil(Math.max(Math.abs(_)+Math.abs(C)||y,Math.abs(R)+Math.abs(L)||y)*U);m=new OffscreenCanvas(P,F),g=m.getContext("2d",{alpha:!0,willReadFrequently:!0}),g.font=b,g.filter="grayscale(1)",g.fillStyle="white",g.fillRect(0,0,P,F),g.fillStyle="black",g.fillText(t,P*(U-1)/2,F*(3-U)/2);const j=this.#h(g.getImageData(0,0,P,F).data),tt=this.#c(j),X=this.#l(tt),st=this.#s(j,P,F,X);return this.processDrawnLines({lines:{curves:st,width:P,height:F},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,C=[];for(const{points:L}of p){const O=u?this.#o(L):L;if(!O)continue;C.push(O);const U=O.length,P=new Float32Array(U),F=new Float32Array(3*(U===2?2:U-2));if(b.push({line:F,points:P}),U===2){P[0]=O[0]*A,P[1]=O[1]*_,F.set([NaN,NaN,NaN,NaN,P[0],P[1]],0);continue}let[j,tt,X,st]=O;j*=A,tt*=_,X*=A,st*=_,P.set([j,tt,X,st],0),F.set([NaN,NaN,NaN,NaN,j,tt],0);for(let Z=4;Z<U;Z+=2){const ot=P[Z]=O[Z]*A,St=P[Z+1]=O[Z+1]*_;F.set(rt.createBezierPoints(j,tt,X,st,ot,St),(Z-2)*3),[j,tt,X,st]=[X,st,ot,St]}}if(b.length===0)return null;const R=h?new dp:new ul;return R.build(b,i,a,1,r,h?0:y,c),{outline:R,newCurves:C,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,P=O.length;U<P;U++){const F=O[U]-O[U-2];u=Math.min(u,F),h=Math.max(h,F)}}let m;u>=-128&&h<=127?m=Int8Array:u>=-32768&&h<=32767?m=Int16Array:m=Int32Array;const g=t.length,y=Iu+dl*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 C=m.prototype.constructor;for(const O of t){const U=new C(O.length-2);for(let P=2,F=O.length;P<F;P++)U[P-2]=O[P]-O[P-2];_.write(U)}_.close();const R=await new Response(A.readable).arrayBuffer(),L=new Uint8Array(R);return Wv(L)}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],C=[],R=(Iu+dl*A)*Uint32Array.BYTES_PER_ELEMENT;let L;switch(_){case Int8Array.BYTES_PER_ELEMENT:L=new Int8Array(u.buffer,R);break;case Int16Array.BYTES_PER_ELEMENT:L=new Int16Array(u.buffer,R);break;case Int32Array.BYTES_PER_ELEMENT:L=new Int32Array(u.buffer,R);break}h=0;for(let O=0;O<A;O++){const U=p[dl*O+Iu],P=new Float32Array(U+2);C.push(P);for(let F=0;F<dl-1;F++)P[F]=p[dl*O+Iu+F+1];for(let F=0;F<U;F++)P[F+2]=P[F]+L[h++]}return{areContours:b,thickness:S,outlines:C,width:g,height:y}}catch(i){return Ct(`decompressSignature: ${i}`),null}}}class hp extends H0{constructor(){super(),super.updateProperties({fill:gt._defaultLineColor,"stroke-width":0})}clone(){const t=new hp;return t.updateAll(this),t}}class fp extends Lu{constructor(t){super(t),super.updateProperties({stroke:gt._defaultLineColor,"stroke-width":1})}clone(){const t=new fp(this._viewParameters);return t.updateAll(this),t}}class Oi extends bt{#t=!1;#e=null;#n=null;#i=null;static _type="signature";static _editorType=xt.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){gt.initialize(t,i),this._defaultDrawingOptions=new hp,this._defaultDrawnSignatureOptions=new fp(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 dp,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:xt.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?dp.deserialize(t,i,a,r,c,u):ul.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 gt{#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=xt.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){gt.initialize(t,i)}static isHandlingMimeForPasting(t){return $f.includes(t)}static paste(t,i){i.pasteEditor({mode:xt.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=$f.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 F=Math.min(i/r,i/c);p=Math.floor(r*F),m=Math.floor(c*F)}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",C="#cfcfd8";this._uiManager.hcmFilter!=="none"?C="black":window.matchMedia?.("(prefers-color-scheme: dark)").matches&&(_="#8f8f9d",C="#42414d");const R=15,L=R*u.sx,O=R*u.sy,U=new OffscreenCanvas(L*2,O*2),P=U.getContext("2d");P.fillStyle=_,P.fillRect(0,0,L*2,O*2),P.fillStyle=C,P.fillRect(0,0,L,O),P.fillRect(L,O,L,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 C=Math.min(t/r,t/c);b=Math.floor(r*C),S=Math.floor(c*C),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:C,id:R,structParent:L,popupRef:O,contentsObj:U},container:P,parent:{page:{pageNumber:F}},canvas:j}=t;let tt,X;j?(delete t.canvas,{id:tt,bitmap:X}=a.imageManager.getFromCanvas(P.id,j),j.remove()):(c=!0,t._hasNoCanvas=!0);const st=(await i._structTree.getAriaAttributes(`${Hf}${R}`))?.get("aria-label")||"";r=t={annotationType:xt.STAMP,bitmapId:tt,bitmap:X,pageIndex:F-1,rect:_.slice(0),rotation:C,annotationElementId:R,id:R,deleted:!1,accessibilityData:{decorative:!1,altText:st},isSvg:!1,structParent:L,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:xt.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 ns{#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,up,JO,_e,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=[...ns.#m.values()];if(!ns._initialized){ns._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()===xt.NONE}updateToolbar(t){this.#d.updateToolbar(t)}updateMode(t=this.#d.getMode()){switch(this.#b(),t){case xt.NONE:this.disableTextSelection(),this.togglePointerEvents(!1),this.toggleAnnotationLayerPointerEvents(!0),this.disableClick();return;case xt.INK:this.disableTextSelection(),this.togglePointerEvents(!0),this.enableClick();break;case xt.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 ns.#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(`^${Fv}[0-9]+$`);for(const C of b)if(A.test(C.id)){S=C.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 ns.#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(),_e.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),gt.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 ns.#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 ns.#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===xt.STAMP||a===xt.SIGNATURE){this.#d.unselectAll();return}this.createAndAddNewEditor(t,!1)}pointerdown(t){if(this.#d.getMode()===xt.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,Ta(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,Ta(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 Nu)}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:lp},globalThis.pdfjsLib={AbortException:Us,AnnotationEditorLayer:ns,AnnotationEditorParamsType:$t,AnnotationEditorType:xt,AnnotationEditorUIManager:zs,AnnotationLayer:op,AnnotationMode:Ps,AnnotationType:De,build:MO,ColorPicker:Wn,createValidAbsoluteUrl:$v,DOMSVGFactory:Nu,DrawLayer:Ye,FeatureTest:Ve,fetchData:Ko,getDocument:C0,getFilenameFromUrl:AM,getPdfFilenameFromUrl:_M,getRGB:Tu,getUuid:Xv,getXfaPageViewport:wM,GlobalWorkerOptions:Cr,ImageKind:gu,InvalidPDFException:Pf,isDataScheme:_u,isPdfFile:jf,isValidExplicitDest:PM,MathClamp:dn,noContextMenu:Yn,normalizeUnicode:vM,OPS:bu,OutputScale:Ri,PasswordResponses:uM,PDFDataRangeTransport:R0,PDFDateString:Ff,PDFWorker:ol,PermissionFlag:cM,PixelsPerInch:Tr,RenderingCancelledException:Bf,ResponseException:Au,setLayerDimensions:Ta,shadow:zt,SignatureExtractor:Mr,stopEvent:Oe,SupportedImageMimeTypes:$f,TextLayer:hn,TouchManager:xu,updateUrlHash:Gv,Util:pt,VerbosityLevel:yu,version:DO,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 tN{ID_NOT_FOUND="id_not_found";apiBaseUrl;constructor(t){this.apiBaseUrl=t||window.location.origin}encontraIdProcesso(){try{const t=window.location.href;let i=t.match(/\/processo\/(\d+)\//);if(i&&i[1]||(i=t.match(/\/pjekz\/processo\/(\d+)\//),i&&i[1]))return 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 u}return k.warn("ID do processo não encontrado na URL"),null}catch(t){return k.error("Erro ao extrair ID do processo:",t),null}}constroiUrlDocumentos(t,i,a="pdf"){if(!t||!i)return k.warn("IDs do processo ou documento não fornecidos para construir URL"),null;if(a==="txt"){const r=`${this.apiBaseUrl}/pje-comum-api/api/processos/id/${t}/documentos/id/${i}/conteudo`;return k.detail(`URL do TXT construída: ${r}`),r}else if(a==="pdf"){k.detail(`Construindo URL para PDF: processoId=${t}, documentId=${i}`);const r=`${this.apiBaseUrl}/pje-comum-api/api/processos/id/${t}/documentos/id/${i}/conteudo?incluirCapa=false&incluirAssinatura=true`;return k.detail(`URL do PDF construída: ${r}`),r}else return k.warn(`Tipo de conteúdo desconhecido: ${a}`),null}constroiUrlProcessoCompleto(t){if(!t)return k.warn("ID do processo não fornecido para construir URL completa"),null;const i=`${this.apiBaseUrl}/pje-comum-api/api/processos/id/${t}/documentos/agrupados?processoCompleto=true`;return k.detail(`URL completa do processo construída: ${i}`),i}async downloadDocumento(t,i){try{k.info("Tentando baixar documento:",{processoId:t,idNumerico:i});const a=this.constroiUrlDocumentos(t,i);k.info("Tentando baixar PDF da API construída:",a);try{const r=await this.download(a);r||k.warn("Falha ao baixar PDF da API construída.");const c=r;if(c.mimeType==="application/pdf"){if(k.info("PDF baixado com sucesso da API construída."),c.content instanceof ArrayBuffer)return{data:new Blob([c.content],{type:"application/pdf"}),type:"pdf"}}else if(c.mimeType==="application/json"&&(k.info("API retornou JSON, tentando capturar como TXT no JSON."),typeof c.content=="string")){const u=this.extraiTextoJsonBase64(c.content);if(u)return k.info("Conteúdo capturado como TXT da API."),{data:u,type:"txt"}}}catch(r){return k.warn("Falha ao baixar da API construída:",String(r)),null}return k.warn("Nenhum documento PDF ou TXT capturado, retornando nulo."),null}catch(a){return k.error("Erro ao capturar documento:",a),null}}async download(t){if(!t)throw new Error("URL do PDF não fornecida");k.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(k.info(`Tipo de conteúdo recebido: ${a}`),a.startsWith("application/json")){const r=await i.text();if(k.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 k.info(`PDF baixado com sucesso, tamanho: ${r.byteLength} bytes`),{content:r,mimeType:"application/pdf"}}return null}async extractTextFromPdf(t){try{k.info("Iniciando extração de texto do PDF...");const i=await t.arrayBuffer(),r=await C0({data:i,useSystemFonts:!0,verbosity:0}).promise,c=[];k.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
308
  --- Página ${h} ---
311
309
  ${g}
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(`
310
+ `),h%10===0&&k.info(`Extraído texto de ${h}/${r.numPages} páginas`)}catch(p){k.warn(`Erro ao extrair texto da página ${h}:`,p),c.push(`
313
311
  --- Página ${h} (erro na extração) ---
314
312
  `)}const u=c.join(`
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}}extractVisibleDocumentId(){let t=this.ID_NOT_FOUND;const i=document.querySelector("mat-card-title");return i&&(i.textContent.toLowerCase().startsWith("minuta")?t=this.findVisibleDocumentIdInTimeline()||this.ID_NOT_FOUND:t=this.extractVisibleDocumentIdFromTitle()||this.ID_NOT_FOUND),t}extractVisibleDocumentIdFromTitle(){let t=null;const i=document.querySelector("mat-card-title");if(!i)return null;const a=i.textContent,r=[/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 c of r){const u=a.match(c);if(u&&u[1]){t=u[1];break}}return t}findVisibleDocumentIdInTimeline(){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}}extractAllProcessDocuments(){const t=[];try{const i=document.querySelectorAll('li.tl-item-container[id^="doc_"]');for(const a of i){const r=a.id.match(/^doc_([a-zA-Z0-9]+)$/),c=r&&r[1]?r[1]:"";c&&t.push({id:c,desc:"",sigiloso:!1,possui_anexos:!1});const u=a.querySelector('mat-card[id^="doc_"]');if(u&&u.id){const h=u.textContent||(u instanceof HTMLElement?u.innerText:"")||"",p=/Sigiloso/i.test(h),m=/Anexo\(s\):/i.test(h),g=h.replace(/Sigiloso/i,"").replace(/Anexo\(s\):/i,"").trim();t.find(y=>y.id===c).desc=g.substring(0,100),t.find(y=>y.id===c).sigiloso=p,t.find(y=>y.id===c).possui_anexos=m}}}catch(i){O.info("Erro ao buscar documentos do processo:",i)}return t}}class eN{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 In,setTimeout(()=>{this.observeDocuments()},500)}handleMessage(t){t.data.type===fe.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(fe.AUTO_CAPTURE_DETECTION)}notifyDocumentRemoved(){O.detail("Notificando documento removido."),this.pjeManager.sendSuccessMessage(fe.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(fe.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(fe.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())}}if(t=this.pjeManager.pjeUtils.extractVisibleDocumentId(),t!==this.ID_NOT_FOUND&&!r&&(i=this.findNumericIdInTimeline(t,a)),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}}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
-
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 nN{pjeManager;constructor(t){this.pjeManager=t}handleMessage(t){const i=t.data;i.type===fe.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 N=x.getAttribute("aria-label");if(N&&!c){const U=N.match(/Título:\s*(.*)/);U&&U[1]&&(L=U[1].trim());const P=N.match(/- Id:\s*([a-zA-Z0-9]+)/);P&&P[1]?(p=P[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(fe.EXTRACTION_ERROR,"Nenhum documento selecionado encontrado",t);return}O.info(`${i.length} documentos selecionados encontrados`),this.pjeManager.sendSuccessMessage(fe.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(fe.EXTRACTION_ERROR,`Erro ao extrair documentos selecionados: ${i.message}`,t)}}destroy(){}}class iN{pjeManager;extractionTimeout=null;TIMEOUT=6e4;MAX_PDF_SIZE=Xt.max_pdf_size*1024*1024;isExtracting=!1;constructor(t){this.pjeManager=t||new In}async handleMessage(t){const i=t.data;if(i.type===fe.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(fe.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(fe.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(fe.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(fe.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 Ni{static instance=null;pjeManager;extractionTimeout=null;TIMEOUT=6e4;isExtracting=!1;observer=null;checkTimeout=null;lastExtractedMetadata=null;isInitialized=!1;constructor(t){if(this.pjeManager=t,Ni.instance)return O.warn("PjeMetadados já foi inicializado, retornando instância existente"),Ni.instance;Ni.instance=this,this.isInitialized||(this.isInitialized=!0,setTimeout(()=>{this.observePageChange()},1e3))}async observePageChange(){let t=window.location.href;const i=()=>{const a=window.location.href;a!==t&&(t=a,O.info(`URL mudou para ${a}, solicitando extração de metadados`),this.notifyMetadataDetected()),this.checkTimeout=setTimeout(i,500)};i(),this.observer=new MutationObserver(async a=>{let r=!1;for(const c of a)if(c.type==="childList"&&c.addedNodes.length>0){const u=await this.extractMetadata(window.location.href);u&&Object.keys(u).length>0&&JSON.stringify(u)!==JSON.stringify(this.lastExtractedMetadata)&&(r=!0,O.detail("Alteração detectada nos metadados extraídos"),this.lastExtractedMetadata=u)}r&&(O.info("Mudança relevante no DOM detectada, agendando notificação"),this.notifyMetadataDetected())}),this.observer.observe(document.body,{childList:!0,subtree:!0}),O.detail("Observador de metadados iniciado")}notifyMetadataDetected(){O.detail("Notificando metadados detectados"),this.pjeManager.sendSuccessMessage(fe.METADATA_DETECTION)}async handleMessage(t){const i=t.data;if(i.type===fe.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(fe.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{const c=await this.extractMetadata(r);!a&&this.isExtracting&&(this.clearTimeout(),this.isExtracting=!1,this.sendExtractionResult(c,i.id),JSON.stringify(c)!==JSON.stringify(this.lastExtractedMetadata)&&(this.lastExtractedMetadata=c),O.info("Metadados enviados com sucesso:",c))}catch(c){O.error("Erro ao extrair metadados:",c),!a&&this.isExtracting&&(this.clearTimeout(),this.isExtracting=!1,this.pjeManager.sendError(fe.EXTRACTION_ERROR,`Erro durante extração: ${c}`,i.id))}}}clearTimeout(){this.extractionTimeout&&(clearTimeout(this.extractionTimeout),this.extractionTimeout=null)}async extractMetadata(t){let i={};return/processo\/\d+\/detalhe/.test(t)&&(i=await this.extractMetadataDetalheProcesso()||{},i&&Object.keys(i).length>0&&JSON.stringify(i)!==JSON.stringify(this.lastExtractedMetadata)&&O.detail("Metadados extraídos da página de detalhe do processo:",i)),/painel\/global\/\d+\/lista-processos/.test(t)&&(i=await this.extractMetadataPainelListaProcessos()||{}),i}async extractMetadataDetalheProcesso(){try{const t=this.extractNumeroProcesso(),i=this.extractVara(),a=this.pjeManager.pjeUtils.extractProcessId(),r=this.pjeManager.pjeUtils.extractAllProcessDocuments();return{numero_processo:t,id_processo:a,orgao_julgador:i,documentos_processo:r}}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.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(){try{return{lista_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(fe.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(fe.METADATA_EXTRACTED,t,i)}destroy(){this.reset(),Ni.instance=null,this.isInitialized=!1}reset(){this.clearTimeout(),this.isExtracting=!1,this.observer&&(this.observer.disconnect(),this.observer=null),this.checkTimeout&&(clearTimeout(this.checkTimeout),this.checkTimeout=null),O.detail("Estado de extração resetado")}static getInstance(t){return!Ni.instance&&t&&(Ni.instance=new Ni(t)),Ni.instance}}class In extends lM{static instance=null;instances;pjeUtils;actions;constructor(t,i){if(In.instance)return O.warn("PJeManager já foi inicializado, retornando instância existente"),In.instance;super(Nf.EXTENSION),this.instances=new Map,this.pjeUtils=new tN,super.set_version(t||"0.0.0"),O.info(`PJeManager iniciado - Versão: ${this.get_version()}`),this.actions=i?.filter(a=>{if(!a.versao_min||!a.versao_max)return!1;const r=fu(this.get_version(),a.versao_min)>=0,c=fu(this.get_version(),a.versao_max)<=0;return r&&c})||[],O.info(`Actions disponíveis após filtro de versão: ${this.actions.map(a=>a.job).join(", ")}`),In.instance=this,this.initializeModules()}static getInstance(t,i){return In.instance||(In.instance=new In(t,i)),In.instance}static hasInstance(){return In.instance!==null}initializeModules(){const t=new eN(this),i=new nN(this),a=new iN(this),r=Ni.getInstance(this);this.instances.set("pje-doc-visualizado",t),this.instances.set("pje-docs-selecionados",i),this.instances.set("pje-processo-completo",a),this.instances.set("pje-metadados",r);for(const c of this.actions)this.onMessage(c.message,(u,h)=>{const p=this.instances.get(c.job);p&&p.handleMessage(h)}),O.info(`Listener registrado para ação: ${c.job} com mensagem: ${c.message}`);O.info("PJeManager: Módulos inicializados")}destroy(){this.instances.forEach(t=>t.destroy()),this.instances.clear(),In.instance=null,O.info("PJeManager destruído")}}function sN(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 aN{config=null;ui=null;manager=null;initialized=!1;lastCheckedUrl=null;showUi={mapped:!1,unmapped:!1};argsCache=[];constructor(){this.config=Xt}async start(...t){try{sN(this.config?.env||"unk"),this.config=Xt,this.argsCache=t,O.info("Corisco iniciado",this.config,t),await this.checkUrlAndToggleState(!0),setInterval(()=>this.checkUrlAndToggleState(!1),500)}catch(i){O.error("Erro ao inicializar Corisco:",i)}}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=Dv(i);if(a&&this.showUi.mapped){await this.initializeComponents(i);return}else if(!a&&this.showUi.unmapped){await this.initializeComponents(i);return}else{this.destroy();return}}async initializeComponents(t){if(!this.initialized){if(this.ui=new oM,await this.ui.init(),!this.config){O.error("Configuração ou versão da aplicação não encontrada.");return}for(const i of this.config.action_map)if(i.allowed_hosts.some(r=>{try{return new RegExp(r.slice(1,-1)).test(t)}catch(c){return O.warn(`Padrão de host inválido: ${r}`,c),!1}})){O.info(`Host correspondente encontrado para a ferramenta: ${i.tool}`);const r=this.argsCache[0]||null;switch(i.tool){case"pje":this.manager=In.getInstance(r,i.actions);break;default:O.warn(`Nenhum gerenciador encontrado para a ferramenta: ${i.tool}`)}break}this.initialized=!0,O.info("Componentes da extensão inicializados com sucesso")}}destroy(){this.initialized&&(this.ui?.destroy(),this.manager?.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;return Rv(t)}isHostUrlMapped(){const t=window.location.href;return Dv(t)}async toggleShowUi(t,i){this.showUi[t]=i,O.info(`Configuração atualizada: Mostrar UI para '${t}' = ${i}`),await this.checkUrlAndToggleState(!0)}}const pp=new aN;return typeof window<"u"&&(window.Corisco=pp),typeof globalThis<"u"&&(globalThis.Corisco=pp),pp});
313
+ `);return k.info(`Extração concluída. Texto extraído: ${u.length} caracteres`),u}catch(i){throw k.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`}encontraNumeroProcesso(){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 k.detail(`Número do processo extraído (pje-descricao-processo): ${a}`),a}}return k.warn("Número do processo não encontrado"),null}extraiTextoJsonBase64(t){const i=JSON.parse(t),a=i?.conteudoBase64;if(!i||!a)return k.warn("Conteúdo Base64 não encontrado na resposta da API"),null;const r=atob(a),u=new DOMParser().parseFromString(r,"text/html");k.info("Conteúdo do documento HTML capturado com sucesso",u);const h=this.extraiTextoDocHtml(u);return h?(k.info("Texto extraído com sucesso do documento"),h):(k.warn("Nenhum texto significativo encontrado no documento"),"")}extraiTextoDocHtml(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,`
314
+ `).replace(/\s+/g," ").trim(),h&&h.length>100)return k.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(`
315
+ `).trim();if(u.length>100)return k.detail("Conteúdo extraído de parágrafos estruturais"),u}}const r=t.body?.textContent?.trim();return r&&r.length>50?(k.detail("Conteúdo extraído do body completo"),r.replace(/\n\s*\n/g,`
316
+ `).replace(/\s+/g," ").trim()):(k.warn("Nenhum conteúdo textual significativo encontrado"),null)}catch(i){return k.error("Erro ao extrair texto do documento parseado:",i),null}}encontraIdAlfanumDocVisualizado(){let t=this.ID_NOT_FOUND;const i=document.querySelector("mat-card-title");return i&&(i.textContent.toLowerCase().startsWith("minuta")?t=this.encontraIdAlfanumericoNaTimeline()||this.ID_NOT_FOUND:t=this.encontraIdAlfanumericoNoTitulo()||this.ID_NOT_FOUND),t}encontraIdAlfanumericoNoTitulo(){let t=null;const i=document.querySelector("mat-card-title");if(!i)return null;const a=i.textContent,r=[/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 c of r){const u=a.match(c);if(u&&u[1]){t=u[1];break}}return t}encontraIdAlfanumericoNaTimeline(){try{const t=document.querySelector('[aria-label="Documento não assinado"]');if(t){let i=t;for(;i&&i.parentElement;){i=i.parentElement;const a=i.querySelector('mat-card[id^="doc_"], tr[id^="doc_"]');if(a&&a.id){const r=a.id.match(/^doc_([a-zA-Z0-9]+)$/);if(r&&r[1])return k.detail(`ID alfanumérico do documento encontrado via aria-label: ${r[1]}`),r[1]}if(i.id&&i.id.startsWith("doc_")){const r=i.id.match(/^doc_(\d+)$/);if(r&&r[1]){const c=this.encontraIdAlfanumParaIdNumerico(r[1]);return c!==this.ID_NOT_FOUND?(k.detail(`ID alfanumérico encontrado para numérico ${r[1]}: ${c}`),c):(k.detail(`ID numérico do documento encontrado via aria-label: ${r[1]}`),r[1])}}}}}catch(t){k.info("Erro ao buscar ID do documento na timeline:",t)}return this.ID_NOT_FOUND}encontraIdAlfanumParaIdNumerico(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 k.info("Erro ao buscar ID alfanumérico para numérico:",i),this.ID_NOT_FOUND}}encontraTodosDocsProcesso(){const t=[];try{const i=document.querySelectorAll('li.tl-item-container[id^="doc_"], tr.tr-item-container[id^="doc_"]');for(const a of i){const r=a.id.match(/^doc_([0-9]+)$/);let c=r&&r[1]?r[1]:"",u="",h=!1;if(!c||c.length===7){h=!0;const p=a.querySelector('a[href*="/documento/"]');if(p&&p.href){const g=p.href.match(/\/documento\/([0-9]+)\//);g&&g[1]&&(c=g[1])}const m=a.id.match(/^doc_([a-zA-Z0-9]+)$/);m&&m[1]&&(u=m[1])}if(c?t.push({id:c,id_ref:u,tipo:"",desc:"",sigiloso:!1,possui_anexos:!1}):k.warn("Não foi possível extrair o ID numérico do documento na timeline/tabela."),u||(u=this.encontraIdAlfanumParaIdNumerico(c),t.find(p=>p.id===c).id_ref=u!==this.ID_NOT_FOUND?u:""),h){const p=a.querySelectorAll("td.tipo");if(p&&p[0]){const S=(p[0].textContent||(p[0]instanceof HTMLElement?p[0].innerText:"")||"").toLowerCase().split("(")[0]||"";t.find(A=>A.id===c).tipo=S}const m=a.querySelectorAll("td.coluna-descricao");if(m&&m[0]){const b=m[0].textContent||(m[0]instanceof HTMLElement?m[0].innerText:"")||"";t.find(S=>S.id===c).desc=b.trim().substring(0,200)}const g=a.classList.contains("is-sigiloso");t.find(b=>b.id===c).sigiloso=g;const y=a.querySelectorAll('td button[aria-label*="Abrir anexos"]').length>0;t.find(b=>b.id===c).possui_anexos=y}else{const p=a.querySelector('mat-card[id^="doc_"]');if(p&&p.id){const m=p.textContent||(p instanceof HTMLElement?p.innerText:"")||"",g=/Sigiloso/i.test(m);t.find(_=>_.id===c).sigiloso=g;const y=/Anexo\(s\):/i.test(m);t.find(_=>_.id===c).possui_anexos=y;const b=m.replace(/Sigiloso/i,"").replace(/Anexo\(s\):/i,"").trim(),S=b.toLowerCase().split("(")[0]||"";t.find(_=>_.id===c).tipo=S;const A=b.split("(")[1]?.split(")")[0]?.trim()||"";t.find(_=>_.id===c).desc=A.substring(0,200)}}}}catch(i){k.info("Erro ao buscar documentos do processo:",i)}return t}}class eN{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 In,setTimeout(()=>{this.observeDocuments()},500)}handleMessage(t){t.data.type===fe.EXTRACT_VISIBLE_DOCUMENT&&(k.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}),k.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.encontraInfosDocumento(),r=a.id||this.ID_NOT_FOUND;r!==this.lastDocId&&(this.lastDocId=r,k.info("Novo documento detectado:",a),this.notifyDocumentDetected())}else this.lastDocId&&(this.lastDocId=null,k.info("Documento removido ou não encontrado."),this.notifyDocumentRemoved())}catch(t){k.error("Erro ao verificar documentos:",t)}}notifyDocumentDetected(){k.detail("Notificando documento detectado."),this.pjeManager.sendSuccessMessage(fe.AUTO_CAPTURE_DETECTION)}notifyDocumentRemoved(){k.detail("Notificando documento removido."),this.pjeManager.sendSuccessMessage(fe.AUTO_CAPTURE_CLEANUP)}async extractDocumentAndSendResponse(t){try{k.info("Iniciando captura automática do documento...");const i=await this.capturaDocumento();i?(k.info("Documento capturado com sucesso:",i),this.pjeManager.sendSuccessMessage(fe.SINGLE_DOCUMENT_EXTRACTED,i,t),k.info("Documento enviado com sucesso:",i.id)):k.warn("Nenhum documento encontrado para captura.")}catch(i){k.error("Erro ao capturar documento:",i),this.pjeManager.sendError(fe.EXTRACTION_ERROR,String(i),t)}}async capturaDocumento(){const t=this.encontraInfosDocumento(),i=this.pjeManager.pjeUtils.encontraIdProcesso();if(!i||i===this.ID_NOT_FOUND)return k.warn("ID do processo não encontrado, não será possível capturar o documento."),null;const a=await this.pjeManager.pjeUtils.downloadDocumento(i,t.numericId);return a&&a.data?(k.info("Documento capturado"),{id:t.id||t.numericId||this.ID_NOT_FOUND,title:t.id||this.TITLE_NOT_FOUND,subtitle:t.name||void 0,type:a.type,mimeType:a.type==="pdf"?"application/pdf":"text/plain",size:a.data instanceof Blob?a.data.size:a.data.length,content:a.data instanceof Blob?a.data:new Blob([a.data],{type:"text/plain"}),extractedAt:new Date,isAutoCapture:!0}):(k.info("Nenhum conteúdo de documento foi capturado."),null)}encontraInfosDocumento(){let t=this.ID_NOT_FOUND,i=this.NUM_ID_NOT_FOUND,a=this.TITLE_NOT_FOUND;try{const r=document.querySelector("mat-card-title");r&&(a=r.textContent.trim()),t=this.pjeManager.pjeUtils.encontraIdAlfanumDocVisualizado(),t!==this.ID_NOT_FOUND&&(i=this.encontraIdNumericoNaTimeline(t)),k.detail("Informações extraídas:",{documentId:t,idNumericoDocumento:i,documentName:a})}catch(r){k.info("Erro ao extrair informações do documento:",r)}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}}encontraIdNumericoNaTimeline(t){try{const i=document.querySelectorAll(`li.tl-item-container[id^="doc_"] div.tl-item mat-card[id^="doc_${t}"]`);if(i.length===0)k.info(`Nenhum item da timeline encontrado para ID alfanumérico: ${t}`);else{k.info(`${i.length} itens da timeline encontrados para ID alfanumérico: ${t}`);for(const c of i){const u=c.closest("li.tl-item-container");if(u){k.detail(`Verificando elemento da timeline com ID: ${u.id}`);const p=u.id.match(/^doc_(\d+)$/);if(p&&p[1])return k.detail(`Timeline: ID numérico ${p[1]} encontrado para ID alfanumérico ${t}`),p[1]}const h=c.querySelectorAll('a[href*="documento/"]');for(const p of h){const m=p.getAttribute("href")||"";if(m.includes("conteudo")){const g=m.split("documento/")[1].split("/")[0];if(g)return k.detail(`Timeline: ID numérico ${g} extraído do link para ID alfanumérico ${t}`),g}}}}const a=document.querySelectorAll(`div.tl-item-anexo[id^="doc_${t}"] a.tl-documento[id^="anexo_"]`);if(a.length===0)k.info(`Nenhum anexo da timeline encontrado para ID alfanumérico: ${t}`);else{k.info(`${a.length} anexos da timeline encontrados para ID alfanumérico: ${t}`);for(const c of a){k.detail(`Verificando anexo da timeline com ID: ${c.id}`);const u=c.id.match(/^anexo_(\d+)$/);if(u&&u[1])return k.detail(`Anexo: ID numérico ${u[1]} encontrado para ID alfanumérico ${t}`),u[1]}}const r=document.querySelectorAll(`tr.tr-item-container[id^="doc_${t}"] td.coluna-descricao div span a.tl-documento[href*="documento/"]`);if(r.length===0)k.info(`Nenhum item da tabela de documentos encontrado para ID alfanumérico: ${t}`);else{k.info(`${r.length} itens da tabela de documentos encontrados para ID alfanumérico: ${t}`);for(const c of r){const u=c.getAttribute("href")||"";if(u.includes("conteudo")){const h=u.split("documento/")[1].split("/")[0];if(h)return k.detail(`Tabela: ID numérico ${h} extraído do link para ID alfanumérico ${t}`),h}}}return k.info(`ID numérico não encontrado na timeline para ID alfanumérico: ${t}`),this.NUM_ID_NOT_FOUND}catch(i){return k.info("Erro ao buscar ID numérico na timeline:",i),this.NUM_ID_NOT_FOUND}}destroy(){this.observer&&(this.observer.disconnect(),this.observer=null),this.checkTimeout&&(clearTimeout(this.checkTimeout),this.checkTimeout=null)}}class nN{pjeManager;constructor(t){this.pjeManager=t}handleMessage(t){const i=t.data;i.type===fe.EXTRACT_SELECTED_DOCUMENTS&&(k.info("Mensagem de extração de documentos selecionados recebida"),this.extractAndSendSelectedDocuments(i.id))}async getSelectedDocuments(){k.info("PJe: Buscando documentos selecionados na timeline...");const t=[],i=this.pjeManager.pjeUtils.encontraIdProcesso();if(!i)return k.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(k.info(`PJe: Encontrados ${a.length} checkboxes marcados`),a.length===0)return t;for(const r of a){const c=this.findDocumentContainer(r);if(c){k.info(`PJe: Processando container com ID: ${c.id}`);const u=await this.extractDocumentFromContainer(c,i);u&&(t.push(u),k.info(`PJe: Documento extraído: ${u.title}`))}}return t}catch(a){return k.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_")||i.classList.contains("tr-item-container")&&i.id&&i.id.startsWith("doc_"),u=i.classList.contains("tl-item-anexo")&&i.id&&i.id.startsWith("doc_")||i.classList.contains("tr-item-anexo")&&i.id&&i.id.startsWith("doc_");if(c||u){const h=u?"ANEXO":"DOCUMENTO";return k.info(`PJe: Container ${h} encontrado: ${i.id}`),i}}return null}async extractDocumentFromContainer(t,i){try{const a=t.id.match(/^doc_([a-zA-Z0-9]+)$/);if(!a||!a[1])return k.warn(`PJe: ID de documento/anexo inválido no container: ${t.id}`),null;const r=a[1],c=t.classList.contains("tl-item-anexo"),u=t.classList.contains("tr-item-container");let h=`${c?"Anexo":"Documento"} ${r}`,p=r,m=r;if(c||u){const b=t.querySelector('a[href*="/documento/"]');if(b&&b.href){const S=b.href.match(/\/documento\/(\d+)\/conteudo/);if(S&&S[1])m=S[1],k.info(`PJe: ID numérico extraído do link do anexo: ${m}`);else return k.warn(`PJe: Não foi possível extrair ID numérico do link do anexo: ${b.href}`),null}else return k.warn(`PJe: Link de download não encontrado para anexo ${r}`),null}let g=[];c?g=[t.querySelector("a.tl-documento[aria-label]"),t.querySelector("a.tl-documento"),t.querySelector(".tl-subitem-detalhe")]:u?g=[t.querySelector("a.descricao")]:g=[t.querySelector("a.tl-documento"),t.querySelector('a[aria-label*="Título:"]'),t.querySelector("span:not(.sr-only)")];for(const b of g)if(b){let S=null;const A=b.getAttribute("aria-label");if(A&&!c&&!u){const _=A.match(/Título:\s*(.*)/);_&&_[1]&&(S=_[1].trim());const C=A.match(/- Id:\s*([a-zA-Z0-9]+)/);C&&C[1]&&(p=C[1].trim())}if(S||(S=b.textContent||b.innerText),S&&S.trim()&&!S.includes("sr-only")){const _=S.match(/\(([^)]+)\)/);h=_?_[1]:S.trim(),k.info(`PJe: Nome do ${c?"anexo":"documento"} extraído: ${h}`);break}}const y=await this.pjeManager.pjeUtils.downloadDocumento(i,m);return y&&y.data?(k.info("Documento capturado"),{id:p||m||crypto.randomUUID().substring(0,6),title:p||m||"id_not_found",subtitle:h||void 0,type:y.type,mimeType:y.type==="pdf"?"application/pdf":"text/plain",size:y.data instanceof Blob?y.data.size:y.data.length,content:y.data instanceof Blob?y.data:new Blob([y.data],{type:"text/plain"}),extractedAt:new Date,isAutoCapture:!0}):(k.warn("Documento não capturado pela API construída"),null)}catch(a){return k.error("PJe: Erro ao extrair documento/anexo do container:",a),null}}async extractAndSendSelectedDocuments(t){try{k.info("Iniciando extração de documentos selecionados...");const i=await this.getSelectedDocuments();if(i.length===0){this.pjeManager.sendError(fe.EXTRACTION_ERROR,"Nenhum documento selecionado encontrado",t);return}k.info(`${i.length} documentos selecionados encontrados`),this.pjeManager.sendSuccessMessage(fe.MULTIPLE_DOCUMENTS_EXTRACTED,i,t),k.info("Documentos selecionados enviados com sucesso")}catch(i){k.error("Erro ao extrair documentos selecionados:",i),this.pjeManager.sendError(fe.EXTRACTION_ERROR,`Erro ao extrair documentos selecionados: ${i.message}`,t)}}destroy(){}}class iN{pjeManager;extractionTimeout=null;TIMEOUT=6e4;MAX_PDF_SIZE=Xt.max_pdf_size*1024*1024;isExtracting=!1;constructor(t){this.pjeManager=t||new In}async handleMessage(t){const i=t.data;if(i.type===fe.EXTRACT_FULL_PROCESS){if(k.info("Mensagem de extração de processo completo recebida"),this.isExtracting){k.info("Extração já em andamento, ignorando nova solicitação");return}this.isExtracting=!0,this.clearTimeout();let a=!1;this.extractionTimeout=setTimeout(()=>{a=!0,k.warn("Tempo limite de extração de processo completo atingido, abortando..."),this.pjeManager.sendError(fe.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),k.info("Processo completo extraído com sucesso:",r))}catch(r){k.error("Erro ao extrair processo completo:",r),!a&&this.isExtracting&&(this.clearTimeout(),this.isExtracting=!1,this.pjeManager.sendError(fe.EXTRACTION_ERROR,`Erro durante extração: ${r}`,i.id))}}}clearTimeout(){this.extractionTimeout&&(clearTimeout(this.extractionTimeout),this.extractionTimeout=null,k.detail("Timeout de extração limpo"))}async extractFullProcess(){k.info("Iniciando extração do processo completo...");try{const t=this.pjeManager.pjeUtils.encontraIdProcesso();if(!t)return k.warn("ID do processo não encontrado, abortando extração."),null;k.info("ID do processo encontrado:",t);const i=this.pjeManager.pjeUtils.constroiUrlProcessoCompleto(t),a=this.pjeManager.pjeUtils.encontraNumeroProcesso();if(k.info("Número do processo extraído:",a),k.info("URL do processo completo:",i),!i)return k.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(k.info(`PDF baixado com tamanho: ${this.pjeManager.pjeUtils.formatFileSize(c)}`),c>this.MAX_PDF_SIZE){k.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){k.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 k.error("Erro na extração do processo completo:",t),t}}sendExtractionResult(t,i){if(!t){k.warn("Nenhum dado de documento capturado."),this.pjeManager.sendError(fe.EXTRACTION_ERROR,"Nenhum dado de documento capturado durante a extração do processo completo",i);return}k.info("Enviando resultado da extração do processo completo:",t),this.pjeManager.sendSuccessMessage(fe.SINGLE_DOCUMENT_EXTRACTED,t,i)}async capturePdfFromUrl(t){if(!t)return k.warn("URL de PDF nula"),null;try{const i=await this.pjeManager.pjeUtils.download(t);if(!i)return k.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 k.error("Erro ao capturar PDF da URL:",i),null}}destroy(){this.reset()}reset(){this.clearTimeout(),this.isExtracting=!1,k.detail("Estado de extração resetado")}}class Ni{static instance=null;pjeManager;extractionTimeout=null;TIMEOUT=6e4;isExtracting=!1;observer=null;checkTimeout=null;lastExtractedMetadata=null;isInitialized=!1;constructor(t){if(this.pjeManager=t,Ni.instance)return k.warn("PjeMetadados já foi inicializado, retornando instância existente"),Ni.instance;Ni.instance=this,this.isInitialized||(this.isInitialized=!0,setTimeout(()=>{this.observePageChange()},1e3))}async observePageChange(){let t=window.location.href;const i=()=>{const a=window.location.href;a!==t&&(t=a,k.info(`URL mudou para ${a}, solicitando extração de metadados`),this.notifyMetadataDetected()),this.checkTimeout=setTimeout(i,500)};i(),this.observer=new MutationObserver(async a=>{let r=!1;for(const c of a)if(c.type==="childList"&&c.addedNodes.length>0){const u=await this.extractMetadata(window.location.href);u&&Object.keys(u).length>0&&JSON.stringify(u)!==JSON.stringify(this.lastExtractedMetadata)&&(r=!0,k.detail("Alteração detectada nos metadados extraídos"),this.lastExtractedMetadata=u)}r&&(k.info("Mudança relevante no DOM detectada, agendando notificação"),this.notifyMetadataDetected())}),this.observer.observe(document.body,{childList:!0,subtree:!0}),k.detail("Observador de metadados iniciado")}notifyMetadataDetected(){k.detail("Notificando metadados detectados"),this.pjeManager.sendSuccessMessage(fe.METADATA_DETECTION)}async handleMessage(t){const i=t.data;if(i.type===fe.EXTRACT_METADATA){if(k.info("Mensagem de extração de metadados recebida"),this.isExtracting){k.info("Extração já em andamento, ignorando nova solicitação");return}this.isExtracting=!0,this.clearTimeout();let a=!1;this.extractionTimeout=setTimeout(()=>{a=!0,k.warn("Tempo limite de extração de metadados atingido, abortando..."),this.pjeManager.sendError(fe.EXTRACTION_ERROR,"Tempo limite de extração de metadados atingido. Tente novamente mais tarde.",i.id)},this.TIMEOUT);const r=window.location.href;k.detail(`URL atual para extração de metadados: ${r}`);try{const c=await this.extractMetadata(r);!a&&this.isExtracting&&(this.clearTimeout(),this.isExtracting=!1,this.sendExtractionResult(c,i.id),JSON.stringify(c)!==JSON.stringify(this.lastExtractedMetadata)&&(this.lastExtractedMetadata=c),k.info("Metadados enviados com sucesso:",c))}catch(c){k.error("Erro ao extrair metadados:",c),!a&&this.isExtracting&&(this.clearTimeout(),this.isExtracting=!1,this.pjeManager.sendError(fe.EXTRACTION_ERROR,`Erro durante extração: ${c}`,i.id))}}}clearTimeout(){this.extractionTimeout&&(clearTimeout(this.extractionTimeout),this.extractionTimeout=null)}incluiUrl(t){return{url:window.location.href,...t}}async extractMetadata(t){let i={};return/processo\/\d+\/detalhe/.test(t)&&(i=await this.extractMetadataDetalheProcesso()||{},i&&Object.keys(i).length>0&&JSON.stringify(i)!==JSON.stringify(this.lastExtractedMetadata)&&k.detail("Metadados extraídos da página de detalhe do processo:",i)),/painel\/global\/\d+\/lista-processos/.test(t)&&(i=await this.extractMetadataPainelListaProcessos()||{}),this.incluiUrl(i)}async extractMetadataDetalheProcesso(){try{const t=this.extractNumeroProcesso(),i=this.extractOrgaoJulgador(),a=this.pjeManager.pjeUtils.encontraIdProcesso(),r=this.pjeManager.pjeUtils.encontraTodosDocsProcesso();return{numero_processo:t,id_processo:a,orgao_julgador:i,documentos_processo:r}}catch(t){throw k.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||(k.warn("Número do processo não encontrado no cabeçalho."),null)}extractOrgaoJulgador(){const t=document.querySelector("section.oj-cargo"),i=t?t.textContent?.trim():null;return i?i.split("/")[0].trim():null}async extractMetadataPainelListaProcessos(){try{return{lista_processos:[...document.querySelectorAll("table tbody tr span pje-descricao-processo a span")].map(a=>a.textContent?.trim()||"").filter(a=>a)}}catch(t){throw k.error("Erro na extração de metadados da página de lista de processos:",t),t}}sendExtractionResult(t,i){if(!t){k.warn("Nenhum dado de documento capturado."),this.pjeManager.sendError(fe.EXTRACTION_ERROR,"Nenhum dado de documento capturado durante a extração de metadados",i);return}k.info("Enviando resultado da extração de metadados:",t),this.pjeManager.sendSuccessMessage(fe.METADATA_EXTRACTED,t,i)}destroy(){this.reset(),Ni.instance=null,this.isInitialized=!1}reset(){this.clearTimeout(),this.isExtracting=!1,this.observer&&(this.observer.disconnect(),this.observer=null),this.checkTimeout&&(clearTimeout(this.checkTimeout),this.checkTimeout=null),k.detail("Estado de extração resetado")}static getInstance(t){return!Ni.instance&&t&&(Ni.instance=new Ni(t)),Ni.instance}}class In extends lM{static instance=null;instances;pjeUtils;actions;constructor(t,i,a){if(In.instance)return k.warn("PJeManager já foi inicializado, retornando instância existente"),In.instance;super(Nf.EXTENSION),this.instances=new Map,this.pjeUtils=new tN(a),super.set_version(i||"0.0.0"),k.info(`PJeManager iniciado - Versão: ${this.get_version()}`),this.actions=t?.filter(r=>{if(!r.versao_min||!r.versao_max)return!1;const c=fu(this.get_version(),r.versao_min)>=0,u=fu(this.get_version(),r.versao_max)<=0;return c&&u})||[],k.info(`Actions disponíveis após filtro de versão: ${this.actions.map(r=>r.job).join(", ")}`),In.instance=this,this.initializeModules()}static getInstance(t,i,a){return In.instance||(In.instance=new In(t,i,a)),In.instance}static hasInstance(){return In.instance!==null}initializeModules(){const t=new eN(this),i=new nN(this),a=new iN(this),r=Ni.getInstance(this);this.instances.set("pje-doc-visualizado",t),this.instances.set("pje-docs-selecionados",i),this.instances.set("pje-processo-completo",a),this.instances.set("pje-metadados",r);for(const c of this.actions)this.onMessage(c.message,(u,h)=>{const p=this.instances.get(c.job);p&&p.handleMessage(h)}),k.info(`Listener registrado para ação: ${c.job} com mensagem: ${c.message}`);k.info("PJeManager: Módulos inicializados")}destroy(){this.instances.forEach(t=>t.destroy()),this.instances.clear(),In.instance=null,k.info("PJeManager destruído")}}function sN(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 aN{config=null;ui=null;manager=null;initialized=!1;lastCheckedUrl=null;showUi={mapped:!1,unmapped:!1};argsCache=[];constructor(){this.config=Xt}async start(...t){try{sN(this.config?.env||"unk"),this.config=Xt,this.argsCache=t,k.info("Corisco iniciado",this.config,t),await this.checkUrlAndToggleState(!0),setInterval(()=>this.checkUrlAndToggleState(!1),500)}catch(i){k.error("Erro ao inicializar Corisco:",i)}}async checkUrlAndToggleState(t=!1){const i=window.location.href;if(i===this.lastCheckedUrl&&!t)return;if(this.lastCheckedUrl=i,!this.isHostAllowed()){k.info(`Host não permitido (${i}). Destruindo componentes se inicializados.`),this.destroy();return}const a=Dv(i);if(a&&this.showUi.mapped){await this.initializeComponents(i);return}else if(!a&&this.showUi.unmapped){await this.initializeComponents(i);return}else{this.destroy();return}}async initializeComponents(t){if(!this.initialized){if(this.ui=new oM,await this.ui.init(),!this.config){k.error("Configuração ou versão da aplicação não encontrada.");return}for(const i of this.config.action_map){const a=i.allowed_hosts.some(r=>{try{return new RegExp(r.slice(1,-1)).test(t)}catch(c){return k.warn(`Padrão de host inválido: ${r}`,c),!1}});if(!a){k.info(`Host não correspondente encontrado para a ferramenta: ${i.tool}`);continue}if(a){k.info(`Host correspondente encontrado para a ferramenta: ${i.tool}`);const r=/\b(\d+\.\d+\.\d+)\b/;let c;for(const p of this.argsCache)try{if((typeof p=="string"?p:JSON.stringify(p)).match(r)){c=p||void 0,k.info(`Versão extraída dos argumentos: ${c}`);break}}catch(m){k.warn(`Erro ao processar argumento para versão: ${p}`,m),c=void 0;continue}const u=/^(https?:\/\/[^/]+)/;let h;for(const p of this.argsCache)try{if((typeof p=="string"?p:JSON.stringify(p)).match(u)){h=p||void 0,k.info(`URL base da API extraída dos argumentos: ${h}`);break}}catch(m){k.warn(`Erro ao processar argumento para URL base da API: ${p}`,m),h=void 0;continue}switch(i.tool){case"pje":this.manager=In.getInstance(i.actions,c,h);break;default:k.warn(`Nenhum gerenciador encontrado para a ferramenta: ${i.tool}`)}break}}this.initialized=!0,k.info("Componentes da extensão inicializados com sucesso")}}destroy(){this.initialized&&(this.ui?.destroy(),this.manager?.destroy(),this.initialized=!1)}isInitialized(){return k.info("Verificando estado de inicialização, retornando:",this.initialized),this.initialized}getVersion(){return k.info("Obtendo versão da aplicação, retornando:",this.config?.app.version||"unk"),this.config?.app.version||"unk"}getEnv(){return k.info("Obtendo ambiente da aplicação, retornando:",this.config?.env||"unk"),this.config?.env||"unk"}isHostAllowed(){const t=window.location.href;return Rv(t)}isHostUrlMapped(){const t=window.location.href;return Dv(t)}async toggleShowUi(t,i){this.showUi[t]=i,k.info(`Configuração atualizada: Mostrar UI para '${t}' = ${i}`),await this.checkUrlAndToggleState(!0)}}const pp=new aN;return typeof window<"u"&&(window.Corisco=pp),typeof globalThis<"u"&&(globalThis.Corisco=pp),pp});