diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index a430c4038c59b679be59b64835193a7834edc9da..b714cf6c5f96ef06e0f33b5bed86122dbac5d7b5 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -1,4 +1,4 @@ -import { createHashRouter, RouterProvider } from 'react-router-dom'; +import { createBrowserRouter, RouterProvider } from 'react-router-dom'; import { AlertContext, type AlertContextProps, type AlertParams, LanguageContext, type LanguageContextProps } from '@ifrc-go/ui/contexts'; import { useCallback, useMemo, useState, lazy, Suspense, useEffect } from 'react'; import { unique } from '@togglecorp/fujs'; @@ -48,7 +48,7 @@ const prefetchAllPages = () => { } }; -const router = createHashRouter([ +const router = createBrowserRouter([ { element: , children: [ @@ -90,7 +90,9 @@ const router = createHashRouter([ }, ], }, -]); +], { + basename: import.meta.env.BASE_URL, // This will be '/app/' from Vite +}); function Application() { const [alerts, setAlerts] = useState([]); diff --git a/py_backend/static/assets/AdminPage-KksT68Fe.js b/py_backend/static/assets/AdminPage-KksT68Fe.js new file mode 100644 index 0000000000000000000000000000000000000000..4fea7426ba8e8d2ab4d46fcf427a4059aa28cecd --- /dev/null +++ b/py_backend/static/assets/AdminPage-KksT68Fe.js @@ -0,0 +1,45 @@ +import{r as d,j as a}from"./vendor-react-BxsGb6Ph.js";import{u as we}from"./useAdmin-6S8boYmH.js";import{N as B,R as Fe,O as h,z as f,n as t,f as S}from"./vendor-ui-l_DttnRj.js";import"./vendor-DxpCibxB.js";import"./index-C6NSRolP.js";const ke="_adminContainer_j11pf_5",Te="_adminHeader_j11pf_13",Ae="_adminSection_j11pf_20",Pe="_modelSelectionArea_j11pf_29",Ie="_modelSelectionRow_j11pf_36",$e="_modelsTable_j11pf_89",Le="_promptSubsection_j11pf_97",Ee="_promptSubsectionTitle_j11pf_109",Be="_modelCode_j11pf_152",Oe="_modelId_j11pf_157",Re="_modelActions_j11pf_163",De="_addModelButtonContainer_j11pf_169",Ue="_addModelForm_j11pf_177",ze="_addModelFormTitle_j11pf_185",He="_addModelFormGrid_j11pf_193",Ge="_addModelFormField_j11pf_206",Ve="_addModelFormCheckbox_j11pf_250",Je="_addModelFormActions_j11pf_268",Ke="_modalOverlay_j11pf_277",We="_modalContent_j11pf_291",qe="_modalBody_j11pf_302",Ye="_modalTitle_j11pf_312",Qe="_modalText_j11pf_320",Xe="_modalTextLeft_j11pf_332",Ze="_modalButtons_j11pf_355",ea="_modalForm_j11pf_363",aa="_formField_j11pf_372",la="_formLabel_j11pf_376",sa="_formInput_j11pf_385",oa="_textarea_j11pf_407",l={adminContainer:ke,adminHeader:Te,adminSection:Ae,modelSelectionArea:Pe,modelSelectionRow:Ie,modelsTable:$e,promptSubsection:Le,promptSubsectionTitle:Ee,modelCode:Be,modelId:Oe,modelActions:Re,addModelButtonContainer:De,addModelForm:Ue,addModelFormTitle:ze,addModelFormGrid:He,addModelFormField:Ge,addModelFormCheckbox:Ve,addModelFormActions:Je,modalOverlay:Ke,modalContent:We,modalBody:qe,modalTitle:Ye,modalText:Qe,modalTextLeft:Xe,modalButtons:Ze,modalForm:ea,formField:aa,formLabel:la,formInput:sa,textarea:oa},w="selectedVlmModel";function ca(){const{isAuthenticated:F,isLoading:X,login:Z,logout:ee}=we(),[k,O]=d.useState(""),[R,u]=d.useState(""),[D,U]=d.useState(!1),[z,H]=d.useState([]),[ae,b]=d.useState(""),[G,le]=d.useState([]),[se,oe]=d.useState([]),[te,y]=d.useState(!1),[de,N]=d.useState(!1),[ie,T]=d.useState(null),[C,A]=d.useState(null),[n,r]=d.useState({p_code:"",label:"",metadata_instructions:"",image_type:"crisis_map",is_active:!1}),[V,P]=d.useState(!1),[ne,I]=d.useState(!1),[$,L]=d.useState(null),[o,c]=d.useState({m_code:"",label:"",model_type:"custom",provider:"huggingface",model_id:"",is_available:!1}),[re,M]=d.useState(!1),[ce,E]=d.useState(!1),[me,p]=d.useState(!1),[J,K]=d.useState(""),[he,pe]=d.useState(""),[_e,_]=d.useState(""),[ue,j]=d.useState(""),x=d.useCallback(()=>{fetch("/api/models").then(e=>e.json()).then(e=>{console.log("Models data received:",e),H(e.models||[]);const s=localStorage.getItem(w);if(e.models&&e.models.length>0)if(s==="random")b("random");else if(s&&e.models.find(i=>i.m_code===s&&i.is_available))b(s);else{const i=e.models.find(m=>m.is_available)||e.models[0];b(i.m_code),localStorage.setItem(w,i.m_code)}}).catch(()=>{})},[]),v=d.useCallback(()=>{console.log("=== fetchPrompts called ==="),fetch("/api/prompts").then(e=>e.json()).then(e=>{console.log("Prompts data received:",e),le(e||[]),console.log("State update triggered with:",e||[])}).catch(e=>{console.error("Error fetching prompts:",e)})},[]),W=d.useCallback(()=>{fetch("/api/image-types").then(e=>e.json()).then(e=>{console.log("Image types data received:",e),oe(e||[])}).catch(()=>{})},[]);d.useEffect(()=>{F&&(x(),v(),W())},[F,x,v,W]);const q=e=>{A(e),r({p_code:e.p_code,label:e.label||"",metadata_instructions:e.metadata_instructions||"",image_type:e.image_type||"crisis_map",is_active:e.is_active||!1}),y(!0)},je=async()=>{try{if(!C){alert("No prompt selected for editing");return}const e=await fetch(`/api/prompts/${C.p_code}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({label:n.label,metadata_instructions:n.metadata_instructions,image_type:n.image_type,is_active:n.is_active})});if(e.ok)v(),y(!1),A(null),r({p_code:"",label:"",metadata_instructions:"",image_type:"crisis_map",is_active:!1});else{const s=await e.json();alert(`Failed to update prompt: ${s.error||"Unknown error"}`)}}catch{alert("Error updating prompt")}},Y=async(e,s)=>{try{const i=await fetch(`/api/prompts/${e}/toggle-active?image_type=${s}`,{method:"POST",headers:{"Content-Type":"application/json"}});if(i.ok)v();else{const m=await i.json();alert(`Failed to toggle prompt active status: ${m.detail||"Unknown error"}`)}}catch{alert("Error toggling prompt active status")}},Q=e=>{T(e),r({p_code:"",label:"",metadata_instructions:"",image_type:e,is_active:!1}),N(!0)},xe=async()=>{try{const e=await fetch("/api/prompts",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(e.ok)v(),N(!1),T(null),r({p_code:"",label:"",metadata_instructions:"",image_type:"crisis_map",is_active:!1});else{const s=await e.json();alert(`Failed to create prompt: ${s.detail||"Unknown error"}`)}}catch{alert("Error creating prompt")}},ve=async(e,s)=>{try{const i=await fetch(`/api/models/${e}/toggle`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({is_available:!s})});if(i.ok)H(m=>m.map(g=>g.m_code===e?{...g,is_available:!s}:g));else{const m=await i.json();alert(`Failed to toggle model availability: ${m.error||"Unknown error"}`)}}catch{alert("Error toggling model availability")}},ge=e=>{b(e),e==="random"?localStorage.setItem(w,"random"):localStorage.setItem(w,e)},fe=async()=>{try{const e=await fetch("/api/admin/models",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${localStorage.getItem("adminToken")}`},body:JSON.stringify(o)});if(e.ok){const s=` +Model "${o.label}" added successfully! + +⚠️ IMPORTANT: Model will NOT work until you complete these steps: + +1. 🔑 Ensure API key is set and valid. + +2. 📝 Verify model_id format. + +3. 📚 Check model specific documentation for details. + `;pe(s),E(!0),P(!1),c({m_code:"",label:"",model_type:"custom",provider:"huggingface",model_id:"",is_available:!1}),x()}else{const s=await e.json();alert(`Failed to add model: ${s.detail||"Unknown error"}`)}}catch{alert("Error adding model")}},be=e=>{L(e),c({m_code:e.m_code,label:e.label,model_type:e.model_type||"custom",provider:e.provider||e.config?.provider||"huggingface",model_id:e.model_id||e.config?.model_id||e.m_code,is_available:e.is_available}),I(!0)},ye=async()=>{try{console.log("Updating model with data:",o);const e={label:o.label,model_type:o.model_type,provider:o.provider,model_id:o.model_id,is_available:o.is_available};if(console.log("Update payload:",e),!$){alert("No model selected for editing");return}const s=await fetch(`/api/admin/models/${$.m_code}`,{method:"PUT",headers:{"Content-Type":"application/json",Authorization:`Bearer ${localStorage.getItem("adminToken")}`},body:JSON.stringify(e)});if(console.log("Update response status:",s.status),s.ok){const i=await s.json();console.log("Update successful:",i),I(!1),L(null),c({m_code:"",label:"",model_type:"custom",provider:"huggingface",model_id:"",is_available:!1}),console.log("Refreshing models..."),x()}else{const i=await s.json();console.error("Update failed:",i),alert(`Failed to update model: ${i.detail||"Unknown error"}`)}}catch(e){console.error("Update error:",e),alert("Error updating model")}},Ne=async e=>{K(e),M(!0)},Ce=async()=>{try{const e=await fetch(`/api/admin/models/${J}`,{method:"DELETE",headers:{Authorization:`Bearer ${localStorage.getItem("adminToken")}`}});if(e.ok)M(!1),K(""),x();else{const s=await e.json();alert(`Failed to delete model: ${s.detail||"Unknown error"}`)}}catch{alert("Error deleting model")}},Me=async e=>{if(e.preventDefault(),!k.trim()){u("Please enter a password");return}U(!0),u("");try{await Z(k)||u("Invalid password")}catch{u("Login failed. Please try again.")}finally{U(!1)}},Se=()=>{ee(),O(""),u("")};return X?a.jsx(B,{children:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsxs("div",{className:"text-center",children:[a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-ifrcRed mx-auto mb-4"}),a.jsx("p",{className:"text-gray-600",children:"Loading..."})]})})}):F?a.jsxs(B,{children:[a.jsxs("div",{className:l.adminContainer,children:[a.jsx("div",{className:l.adminHeader,children:a.jsx(t,{name:"logout",variant:"secondary",onClick:Se,children:"Logout"})}),a.jsxs("div",{className:l.adminSection,children:[a.jsx(f,{heading:"VLM Model Selection",headingLevel:2,withHeaderBorder:!0,withInternalPadding:!0,children:a.jsxs("div",{className:l.modelSelectionArea,children:[a.jsx("p",{className:"text-gray-700",children:"Select which Vision Language Model to use for caption generation."}),a.jsx("div",{className:l.modelSelectionRow,children:a.jsx(S,{label:"Model",name:"selected-model",value:ae,onChange:e=>ge(e||""),options:[{value:"random",label:"Random"},...z.filter(e=>e.is_available).map(e=>({value:e.m_code,label:e.label}))],keySelector:e=>e.value,labelSelector:e=>e.label})})]})}),a.jsx(f,{heading:"Model Management",headingLevel:2,withHeaderBorder:!0,withInternalPadding:!0,children:a.jsxs("div",{className:l.modelManagementArea,children:[a.jsx("div",{className:l.modelsTable,children:a.jsxs("table",{children:[a.jsx("thead",{children:a.jsxs("tr",{children:[a.jsx("th",{children:"Code"}),a.jsx("th",{children:"Label"}),a.jsx("th",{children:"Provider"}),a.jsx("th",{children:"Model ID"}),a.jsx("th",{children:"Available"}),a.jsx("th",{children:"Actions"})]})}),a.jsx("tbody",{children:z.map(e=>a.jsxs("tr",{children:[a.jsx("td",{className:l.modelCode,children:e.m_code}),a.jsx("td",{children:e.label}),a.jsx("td",{children:e.provider||e.config?.provider||"huggingface"}),a.jsx("td",{className:l.modelId,children:e.model_id||e.config?.model_id||e.m_code||"N/A"}),a.jsx("td",{children:a.jsx(t,{name:`toggle-${e.m_code}`,variant:e.is_available?"primary":"secondary",size:1,onClick:()=>ve(e.m_code,e.is_available),children:e.is_available?"Enabled":"Disabled"})}),a.jsx("td",{children:a.jsxs("div",{className:l.modelActions,children:[a.jsx(t,{name:`edit-${e.m_code}`,variant:"secondary",size:1,onClick:()=>be(e),children:"Edit"}),a.jsx(t,{name:`delete-${e.m_code}`,variant:"secondary",size:1,onClick:()=>Ne(e.m_code),children:"Delete"})]})})]},e.m_code))})]})}),!V&&a.jsx("div",{className:l.addModelButtonContainer,children:a.jsx(t,{name:"show-add-form",variant:"primary",onClick:()=>P(!0),children:"Add New Model"})}),V&&a.jsxs("div",{className:l.addModelForm,children:[a.jsx("h4",{className:l.addModelFormTitle,children:"Add New Model"}),a.jsxs("div",{className:l.addModelFormGrid,children:[a.jsx("div",{className:l.addModelFormField,children:a.jsx(h,{label:"Model Code",name:"model-code",value:o.m_code,onChange:e=>c({...o,m_code:e||""}),placeholder:"e.g., NEW_MODEL_123"})}),a.jsx("div",{className:l.addModelFormField,children:a.jsx(h,{label:"Label",name:"model-label",value:o.label,onChange:e=>c({...o,label:e||""}),placeholder:"e.g., New Model Name"})}),a.jsx("div",{className:l.addModelFormField,children:a.jsx(S,{label:"Provider",name:"model-provider",value:o.provider,onChange:e=>c({...o,provider:e||"huggingface"}),options:[{value:"huggingface",label:"HuggingFace"},{value:"openai",label:"OpenAI"},{value:"google",label:"Google"}],keySelector:e=>e.value,labelSelector:e=>e.label})}),a.jsx("div",{className:l.addModelFormField,children:a.jsx(h,{label:"Model ID",name:"model-id",value:o.model_id,onChange:e=>c({...o,model_id:e||""}),placeholder:"e.g., org/model-name"})}),a.jsx("div",{className:l.addModelFormField,children:a.jsxs("div",{className:l.addModelFormCheckbox,children:[a.jsx("input",{type:"checkbox",checked:o.is_available,onChange:e=>c({...o,is_available:e.target.checked})}),a.jsx("span",{children:"Available for use"})]})})]}),a.jsxs("div",{className:l.addModelFormActions,children:[a.jsx(t,{name:"save-model",variant:"primary",onClick:fe,disabled:!o.m_code||!o.label||!o.model_id,children:"Save Model"}),a.jsx(t,{name:"cancel-add",variant:"secondary",onClick:()=>P(!1),children:"Cancel"})]})]}),ne&&a.jsxs("div",{className:l.addModelForm,children:[a.jsxs("h4",{className:l.addModelFormTitle,children:["Edit Model: ",$?.label]}),a.jsxs("div",{className:l.addModelFormGrid,children:[a.jsx("div",{className:l.addModelFormField,children:a.jsx(h,{label:"Model Code",name:"model-code",value:o.m_code,onChange:e=>c({...o,m_code:e||""}),placeholder:"e.g., NEW_MODEL_123",disabled:!0})}),a.jsx("div",{className:l.addModelFormField,children:a.jsx(h,{label:"Label",name:"model-label",value:o.label,onChange:e=>c({...o,label:e||""}),placeholder:"e.g., New Model Name"})}),a.jsx("div",{className:l.addModelFormField,children:a.jsx(S,{label:"Provider",name:"model-provider",value:o.provider,onChange:e=>c({...o,provider:e||"huggingface"}),options:[{value:"huggingface",label:"HuggingFace"},{value:"openai",label:"OpenAI"},{value:"google",label:"Google"}],keySelector:e=>e.value,labelSelector:e=>e.label})}),a.jsx("div",{className:l.addModelFormField,children:a.jsx(h,{label:"Model ID",name:"model-id",value:o.model_id,onChange:e=>c({...o,model_id:e||""}),placeholder:"e.g., org/model-name"})}),a.jsx("div",{className:l.addModelFormField,children:a.jsxs("div",{className:l.addModelFormCheckbox,children:[a.jsx("input",{type:"checkbox",checked:o.is_available,onChange:e=>c({...o,is_available:e.target.checked})}),a.jsx("span",{children:"Available for use"})]})})]}),a.jsxs("div",{className:l.addModelFormActions,children:[a.jsx(t,{name:"update-model",variant:"primary",onClick:ye,disabled:!o.m_code||!o.label||!o.model_id,children:"Update Model"}),a.jsx(t,{name:"cancel-edit",variant:"secondary",onClick:()=>{I(!1),L(null),c({m_code:"",label:"",model_type:"custom",provider:"huggingface",model_id:"",is_available:!1})},children:"Cancel"})]})]})]})}),a.jsx(f,{heading:"Prompt Management",headingLevel:2,withHeaderBorder:!0,withInternalPadding:!0,children:a.jsxs("div",{className:l.modelManagementArea,children:[a.jsxs("div",{className:l.promptSubsection,children:[a.jsx("h4",{className:l.promptSubsectionTitle,children:"Crisis Maps"}),a.jsx("div",{className:l.modelsTable,children:a.jsxs("table",{children:[a.jsx("thead",{children:a.jsxs("tr",{children:[a.jsx("th",{children:"Code"}),a.jsx("th",{children:"Label"}),a.jsx("th",{children:"Status"}),a.jsx("th",{children:"Actions"})]})}),a.jsx("tbody",{children:G.filter(e=>e.image_type==="crisis_map").sort((e,s)=>e.p_code.localeCompare(s.p_code)).map(e=>a.jsxs("tr",{children:[a.jsx("td",{className:l.modelCode,children:e.p_code}),a.jsx("td",{className:l.promptLabel,children:e.label||"No label"}),a.jsx("td",{children:a.jsx(t,{name:`toggle-crisis-${e.p_code}`,variant:e.is_active?"primary":"secondary",size:1,onClick:()=>Y(e.p_code,"crisis_map"),children:e.is_active?"Active":"Inactive"})}),a.jsx("td",{children:a.jsxs("div",{className:l.modelActions,children:[a.jsx(t,{name:`view-${e.p_code}`,variant:"secondary",size:1,onClick:()=>{_(`=== Prompt Details === +Code: ${e.p_code} +Label: ${e.label} +Image Type: ${e.image_type} +Active: ${e.is_active} + +Metadata Instructions: +${e.metadata_instructions||"No instructions available"}`),j(`Prompt: ${e.p_code}`),p(!0)},children:"View"}),a.jsx(t,{name:`edit-${e.p_code}`,variant:"secondary",size:1,onClick:()=>q(e),children:"Edit"})]})})]},e.p_code))})]})}),a.jsx("div",{className:l.addModelButtonContainer,children:a.jsx(t,{name:"add-crisis-prompt",variant:"primary",onClick:()=>Q("crisis_map"),children:"Add New Crisis Map Prompt"})})]}),a.jsxs("div",{className:l.promptSubsection,children:[a.jsx("h4",{className:l.promptSubsectionTitle,children:"Drone Images"}),a.jsx("div",{className:l.modelsTable,children:a.jsxs("table",{children:[a.jsx("thead",{children:a.jsxs("tr",{children:[a.jsx("th",{children:"Code"}),a.jsx("th",{children:"Label"}),a.jsx("th",{children:"Status"}),a.jsx("th",{children:"Actions"})]})}),a.jsx("tbody",{children:G.filter(e=>e.image_type==="drone_image").sort((e,s)=>e.p_code.localeCompare(s.p_code)).map(e=>a.jsxs("tr",{children:[a.jsx("td",{className:l.modelCode,children:e.p_code}),a.jsx("td",{className:l.promptLabel,children:e.label||"No label"}),a.jsx("td",{children:a.jsx(t,{name:`toggle-drone-${e.p_code}`,variant:e.is_active?"primary":"secondary",size:1,onClick:()=>Y(e.p_code,"drone_image"),children:e.is_active?"Active":"Inactive"})}),a.jsx("td",{children:a.jsxs("div",{className:l.modelActions,children:[a.jsx(t,{name:`view-${e.p_code}`,variant:"secondary",size:1,onClick:()=>{_(`=== Prompt Details === +Code: ${e.p_code} +Label: ${e.label} +Image Type: ${e.image_type} +Active: ${e.is_active} + +Metadata Instructions: +${e.metadata_instructions||"No instructions available"}`),j(`Prompt: ${e.p_code}`),p(!0)},children:"View"}),a.jsx(t,{name:`edit-${e.p_code}`,variant:"secondary",size:1,onClick:()=>q(e),children:"Edit"})]})})]},e.p_code))})]})}),a.jsx("div",{className:l.addModelButtonContainer,children:a.jsx(t,{name:"add-drone-prompt",variant:"primary",onClick:()=>Q("drone_image"),children:"Add New Drone Image Prompt"})})]})]})}),a.jsx(f,{heading:"Utilities",headingLevel:2,withHeaderBorder:!0,withInternalPadding:!0,children:a.jsxs("div",{className:"flex flex-wrap gap-4",children:[a.jsx(t,{name:"test-connection",variant:"secondary",onClick:async()=>{_("Testing API connection..."),j("Connection Test Results");try{const e=await fetch("/api/models");if(e.ok){const s=await e.json(),i=`✅ API connection successful! + +Found ${s.models?.length||0} models in database. + +Available models: +${s.models?.filter(m=>m.is_available).map(m=>`- ${m.label} (${m.m_code})`).join(` +`)||"None"}`;_(i)}else{const s=`❌ API connection failed: HTTP ${e.status}`;_(s)}p(!0)}catch(e){const s=`❌ Connection error: ${e}`;_(s),p(!0)}},children:"Test Connection"}),a.jsx(t,{name:"view-schemas",variant:"secondary",onClick:()=>{fetch("/api/schemas",{headers:{Authorization:`Bearer ${localStorage.getItem("adminToken")}`}}).then(e=>e.json()).then(e=>{console.log("Schemas Response:",e);let s="",i="Schemas Response";e&&Array.isArray(e)?(s=`Found ${e.length} schemas: + +`,e.forEach((m,g)=>{s+=`=== Schema ${g+1} === +`,s+=JSON.stringify(m,null,2),s+=` + +`})):e&&typeof e=="object"?s=`Prompts Response: + +Response type: ${typeof e} +Keys: ${Object.keys(e).join(", ")} + +Raw data: +${JSON.stringify(e,null,2)}`:s=`Prompts Response: + +Unexpected data type: ${typeof e} +Value: ${e}`,_(s),j(i),p(!0)}).catch(e=>{console.error("Schemas Error:",e);const s=`Failed to fetch prompts: ${e.message||"Unknown error"}`;_(s),j("Schemas Error"),p(!0)})},children:"View Schemas"})]})})]})]}),re&&a.jsx("div",{className:l.modalOverlay,onClick:()=>M(!1),children:a.jsx("div",{className:l.modalContent,onClick:e=>e.stopPropagation(),children:a.jsxs("div",{className:l.modalBody,children:[a.jsx("h3",{className:l.modalTitle,children:"Delete Model"}),a.jsxs("p",{className:l.modalText,children:["Are you sure you want to delete model ",a.jsx("span",{className:l.modelCode,children:J}),"? This action cannot be undone."]}),a.jsxs("div",{className:l.modalButtons,children:[a.jsx(t,{name:"cancel-delete",variant:"tertiary",onClick:()=>M(!1),children:"Cancel"}),a.jsx(t,{name:"confirm-delete",variant:"secondary",onClick:Ce,children:"Delete"})]})]})})}),ce&&a.jsx("div",{className:l.modalOverlay,onClick:()=>E(!1),children:a.jsx("div",{className:l.modalContent,onClick:e=>e.stopPropagation(),children:a.jsxs("div",{className:l.modalBody,children:[a.jsx("h3",{className:l.modalTitle,children:"Model Added Successfully!"}),a.jsx("div",{className:`${l.modalText} ${l.modalTextLeft}`,children:he}),a.jsx("div",{className:l.modalButtons,children:a.jsx(t,{name:"close-setup-instructions",variant:"secondary",onClick:()=>E(!1),children:"Got it!"})})]})})}),me&&a.jsx("div",{className:l.modalOverlay,onClick:()=>p(!1),children:a.jsx("div",{className:l.modalContent,onClick:e=>e.stopPropagation(),children:a.jsxs("div",{className:l.modalBody,children:[a.jsx("h3",{className:l.modalTitle,children:ue}),a.jsx("div",{className:`${l.modalText} ${l.modalTextLeft}`,children:a.jsx("div",{className:"whitespace-pre-wrap font-mono text-sm leading-relaxed",children:_e})}),a.jsx("div",{className:l.modalButtons,children:a.jsx(t,{name:"close-test-results",variant:"secondary",onClick:()=>p(!1),children:"Close"})})]})})}),te&&a.jsx("div",{className:l.modalOverlay,onClick:()=>y(!1),children:a.jsx("div",{className:l.modalContent,onClick:e=>e.stopPropagation(),children:a.jsxs("div",{className:l.modalBody,children:[a.jsxs("h3",{className:l.modalTitle,children:["Edit Prompt: ",C?.p_code]}),a.jsxs("div",{className:l.modalForm,children:[a.jsxs("div",{className:l.formField,children:[a.jsx("label",{className:l.formLabel,children:"Code:"}),a.jsx(h,{name:"prompt-code",value:C?.p_code,onChange:()=>{},disabled:!0,className:l.formInput})]}),a.jsxs("div",{className:l.formField,children:[a.jsx("label",{className:l.formLabel,children:"Label:"}),a.jsx(h,{name:"prompt-label",value:n.label,onChange:e=>r(s=>({...s,label:e||""})),className:l.formInput})]}),a.jsxs("div",{className:l.formField,children:[a.jsx("label",{className:l.formLabel,children:"Image Type:"}),a.jsx(S,{name:"prompt-image-type",value:n.image_type,onChange:e=>r(s=>({...s,image_type:e||"crisis_map"})),options:se,keySelector:e=>e.image_type,labelSelector:e=>e.label})]}),a.jsxs("div",{className:l.formField,children:[a.jsx("label",{className:l.formLabel,children:"Active Status:"}),a.jsxs("div",{className:l.addModelFormCheckbox,children:[a.jsx("input",{type:"checkbox",checked:n.is_active,onChange:e=>r(s=>({...s,is_active:e.target.checked}))}),a.jsx("span",{children:"Active for this image type"})]})]}),a.jsxs("div",{className:l.formField,children:[a.jsx("label",{className:l.formLabel,children:"Metadata Instructions:"}),a.jsx("textarea",{name:"prompt-instructions",value:n.metadata_instructions,onChange:e=>r(s=>({...s,metadata_instructions:e.target.value})),className:`${l.formInput} ${l.textarea}`,rows:8})]})]}),a.jsxs("div",{className:l.modalButtons,children:[a.jsx(t,{name:"cancel-edit-prompt",variant:"tertiary",onClick:()=>{y(!1),A(null),r({p_code:"",label:"",metadata_instructions:"",image_type:"crisis_map",is_active:!1})},children:"Cancel"}),a.jsx(t,{name:"save-prompt",variant:"primary",onClick:je,children:"Save Changes"})]})]})})}),de&&a.jsx("div",{className:l.modalOverlay,onClick:()=>N(!1),children:a.jsx("div",{className:l.modalContent,onClick:e=>e.stopPropagation(),children:a.jsxs("div",{className:l.modalBody,children:[a.jsxs("h3",{className:l.modalTitle,children:["Add New ",ie==="crisis_map"?"Crisis Map":"Drone Image"," Prompt"]}),a.jsxs("div",{className:l.modalForm,children:[a.jsxs("div",{className:l.formField,children:[a.jsx("label",{className:l.formLabel,children:"Code:"}),a.jsx(h,{name:"prompt-code",value:n.p_code,onChange:e=>r(s=>({...s,p_code:e||""})),placeholder:"e.g., CUSTOM_CRISIS_MAP_001",className:l.formInput})]}),a.jsxs("div",{className:l.formField,children:[a.jsx("label",{className:l.formLabel,children:"Label:"}),a.jsx(h,{name:"prompt-label",value:n.label,onChange:e=>r(s=>({...s,label:e||""})),placeholder:"Enter prompt description...",className:l.formInput})]}),a.jsxs("div",{className:l.formField,children:[a.jsx("label",{className:l.formLabel,children:"Image Type:"}),a.jsx(h,{name:"prompt-image-type",value:n.image_type,onChange:()=>{},disabled:!0,className:l.formInput})]}),a.jsxs("div",{className:l.formField,children:[a.jsx("label",{className:l.formLabel,children:"Active Status:"}),a.jsxs("div",{className:l.addModelFormCheckbox,children:[a.jsx("input",{type:"checkbox",checked:n.is_active,onChange:e=>r(s=>({...s,is_active:e.target.checked}))}),a.jsx("span",{children:"Active for this image type"})]})]}),a.jsxs("div",{className:l.formField,children:[a.jsx("label",{className:l.formLabel,children:"Metadata Instructions:"}),a.jsx("textarea",{name:"prompt-instructions",value:n.metadata_instructions,onChange:e=>r(s=>({...s,metadata_instructions:e.target.value})),placeholder:"Enter metadata extraction instructions...",className:`${l.formInput} ${l.textarea}`,rows:8})]})]}),a.jsxs("div",{className:l.modalButtons,children:[a.jsx(t,{name:"cancel-add-prompt",variant:"tertiary",onClick:()=>{N(!1),T(null),r({p_code:"",label:"",metadata_instructions:"",image_type:"crisis_map",is_active:!1})},children:"Cancel"}),a.jsx(t,{name:"save-new-prompt",variant:"primary",onClick:xe,disabled:!n.p_code||!n.label,children:"Create Prompt"})]})]})})})]}):a.jsx(B,{children:a.jsxs("div",{className:"mx-auto max-w-md px-4 sm:px-6 lg:px-8 py-6 sm:py-10",children:[a.jsx("div",{className:"text-center mb-8",children:a.jsx(Fe,{level:2,children:"Admin Login"})}),a.jsxs("form",{onSubmit:Me,className:"space-y-6",children:[a.jsxs("div",{children:[a.jsx("label",{htmlFor:"password",className:"block text-sm font-medium text-gray-700 mb-2",children:"Password"}),a.jsx(h,{id:"password",name:"password",type:"password",value:k,onChange:e=>O(e||""),placeholder:"Enter admin password",required:!0,className:"w-full"})]}),R&&a.jsx("div",{className:"bg-ifrcRed/10 border border-ifrcRed/20 rounded-md p-3",children:a.jsx("p",{className:"text-sm text-ifrcRed font-medium",children:R})}),a.jsx("div",{className:"flex justify-center",children:a.jsx(f,{withInternalPadding:!0,className:"p-2",children:a.jsx(t,{name:"login",type:"submit",variant:"primary",size:2,disabled:D,children:D?"Logging in...":"Login"})})})]})]})})}export{ca as default}; diff --git a/py_backend/static/assets/ExportModal-5QTtY4mk.js b/py_backend/static/assets/ExportModal-5QTtY4mk.js new file mode 100644 index 0000000000000000000000000000000000000000..9ebc1d97e391c51c3b55358a86fb9bd60b73cd7c --- /dev/null +++ b/py_backend/static/assets/ExportModal-5QTtY4mk.js @@ -0,0 +1 @@ +import{r as o,j as e}from"./vendor-react-BxsGb6Ph.js";import{z as i,n as r,F as W,O,f as v,d as P,_ as N,L as B,j as F}from"./vendor-ui-l_DttnRj.js";import{u as A}from"./index-C6NSRolP.js";function ie({sources:_,types:S,regions:f,countries:I,imageTypes:k,isLoadingFilters:a=!1}){const[d,y]=o.useState(!1),{search:T,setSearch:p,srcFilter:w,setSrcFilter:m,catFilter:z,setCatFilter:u,regionFilter:h,setRegionFilter:g,countryFilter:x,setCountryFilter:j,imageTypeFilter:M,setImageTypeFilter:b,uploadTypeFilter:E,setUploadTypeFilter:C,showReferenceExamples:c,setShowReferenceExamples:t,clearAllFilters:n}=A();return e.jsxs("div",{className:"mb-6 space-y-4",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-4",children:[e.jsx(i,{withInternalPadding:!0,className:"bg-white/20 backdrop-blur-sm rounded-md p-2",children:e.jsx(r,{name:"toggle-filters",variant:"secondary",onClick:()=>y(!d),className:"whitespace-nowrap",title:d?"Hide Filters":"Show Filters",children:e.jsx(W,{className:"w-4 h-4"})})}),e.jsx(i,{withInternalPadding:!0,className:"bg-white/20 backdrop-blur-sm rounded-md p-2 flex-1 min-w-[300px]",children:e.jsx(O,{name:"search",placeholder:"Search examples...",value:T,onChange:l=>p(l||"")})}),e.jsx(i,{withInternalPadding:!0,className:"bg-white/20 backdrop-blur-sm rounded-md p-2",children:e.jsx(r,{name:"clear-filters",variant:"secondary",onClick:n,children:"Clear Filters"})})]}),d&&e.jsx("div",{className:"bg-white/20 backdrop-blur-sm rounded-md p-4",children:e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4",children:[e.jsx(i,{withInternalPadding:!0,className:"p-2",children:e.jsx(v,{name:"source",placeholder:a?"Loading...":"All Sources",options:_,value:w||null,onChange:l=>m(l||""),keySelector:l=>l.s_code,labelSelector:l=>l.label,required:!1,disabled:a})}),e.jsx(i,{withInternalPadding:!0,className:"p-2",children:e.jsx(v,{name:"category",placeholder:a?"Loading...":"All Categories",options:S,value:z||null,onChange:l=>u(l||""),keySelector:l=>l.t_code,labelSelector:l=>l.label,required:!1,disabled:a})}),e.jsx(i,{withInternalPadding:!0,className:"p-2",children:e.jsx(v,{name:"region",placeholder:a?"Loading...":"All Regions",options:f,value:h||null,onChange:l=>g(l||""),keySelector:l=>l.r_code,labelSelector:l=>l.label,required:!1,disabled:a})}),e.jsx(i,{withInternalPadding:!0,className:"p-2",children:e.jsx(P,{name:"country",placeholder:a?"Loading...":"All Countries",options:I,value:x?[x]:[],onChange:l=>j(l[0]||""),keySelector:l=>l.c_code,labelSelector:l=>l.label,disabled:a})}),e.jsx(i,{withInternalPadding:!0,className:"p-2",children:e.jsx(v,{name:"imageType",placeholder:a?"Loading...":"All Image Types",options:k,value:M||null,onChange:l=>b(l||""),keySelector:l=>l.image_type,labelSelector:l=>l.label,required:!1,disabled:a})}),e.jsx(i,{withInternalPadding:!0,className:"p-2",children:e.jsx(v,{name:"uploadType",placeholder:"All Upload Types",options:[{key:"single",label:"Single Upload"},{key:"multiple",label:"Multiple Upload"}],value:E||null,onChange:l=>C(l||""),keySelector:l=>l.key,labelSelector:l=>l.label,required:!1,disabled:!1})})]})})]})}const R="_fullSizeModalOverlay_cyz3b_1",q="_fullSizeModalContent_cyz3b_29",G="_ratingWarningContent_cyz3b_53",U="_ratingWarningTitle_cyz3b_65",D="_exportModeSection_cyz3b_133",V="_splitConfigSection_cyz3b_143",Y="_splitConfigTitle_cyz3b_153",$="_splitInputsContainer_cyz3b_167",H="_splitInputGroup_cyz3b_183",J="_splitInputLabel_cyz3b_197",K="_splitInput_cyz3b_167",Q="_splitTotal_cyz3b_247",X="_splitTotalError_cyz3b_261",Z="_checkboxesContainer_cyz3b_271",L="_ratingWarningButtons_cyz3b_289",ee="_singleExportMessage_cyz3b_309",le="_navigateButtonContainer_cyz3b_333",se="_loadingOverlay_cyz3b_349",s={fullSizeModalOverlay:R,fullSizeModalContent:q,ratingWarningContent:G,ratingWarningTitle:U,exportModeSection:D,splitConfigSection:V,splitConfigTitle:Y,splitInputsContainer:$,splitInputGroup:H,splitInputLabel:J,splitInput:K,splitTotal:Q,splitTotalError:X,checkboxesContainer:Z,ratingWarningButtons:L,singleExportMessage:ee,navigateButtonContainer:le,loadingOverlay:se};function re({isOpen:_,onClose:S,onExport:f,crisisMapsCount:I,droneImagesCount:k,isLoading:a=!1,exportSuccess:d=!1,variant:y="bulk",onNavigateAndExport:T}){const[p,w]=o.useState("standard"),[m,z]=o.useState(80),[u,h]=o.useState(10),[g,x]=o.useState(10),[j,M]=o.useState(!0),[b,E]=o.useState(!0),C=()=>{if(y==="single"){f(p,["crisis_map","drone_image"]);return}if(!j&&!b){alert("Please select at least one image type to export.");return}const t=[];j&&t.push("crisis_map"),b&&t.push("drone_image"),f(p,t)},c=()=>{S()};return _?y==="single"?e.jsx("div",{className:s.fullSizeModalOverlay,onClick:c,children:e.jsxs("div",{className:s.fullSizeModalContent,onClick:t=>t.stopPropagation(),children:[a&&e.jsx("div",{className:s.loadingOverlay,children:e.jsxs("div",{className:"flex flex-col items-center gap-4",children:[e.jsx(N,{className:"text-ifrcRed"}),e.jsx("div",{className:"text-lg font-medium",children:"Exporting..."}),e.jsx("div",{className:"text-sm text-gray-600",children:"This might take a few seconds"})]})}),d&&e.jsx("div",{className:s.loadingOverlay,children:e.jsxs("div",{className:"flex flex-col items-center gap-4",children:[e.jsx("div",{className:"text-lg font-medium",children:"Export Successful!"}),e.jsx("div",{className:"text-sm text-gray-600",children:"Your dataset has been downloaded"}),e.jsx(r,{name:"close-export-success",onClick:c,className:"mt-4",children:"Close"})]})}),e.jsxs("div",{className:s.ratingWarningContent,children:[e.jsx("h3",{className:s.ratingWarningTitle,children:"Export Single Item"}),e.jsxs("div",{className:s.singleExportMessage,children:[e.jsx("p",{children:"This only exports the 1 item currently on display."}),e.jsx("p",{children:'You may export the entire dataset from the "list view" here:'})]}),e.jsx("div",{className:s.navigateButtonContainer,children:e.jsx(r,{name:"navigate-to-list",variant:"secondary",onClick:T,children:"Navigate to List View"})}),e.jsxs("div",{className:s.ratingWarningButtons,children:[e.jsx(r,{name:"continue-export",onClick:C,disabled:a,children:a?e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(N,{className:"text-white"}),"Exporting..."]}):"Continue"}),e.jsx(r,{name:"cancel-export",variant:"tertiary",onClick:c,disabled:a,children:"Cancel"})]})]})]})}):e.jsx("div",{className:s.fullSizeModalOverlay,onClick:c,children:e.jsxs("div",{className:s.fullSizeModalContent,onClick:t=>t.stopPropagation(),children:[a&&e.jsx("div",{className:s.loadingOverlay,children:e.jsxs("div",{className:"flex flex-col items-center gap-4",children:[e.jsx(N,{className:"text-ifrcRed"}),e.jsx("div",{className:"text-lg font-medium",children:"Exporting..."}),e.jsx("div",{className:"text-sm text-gray-600",children:"This might take a few seconds"})]})}),d&&e.jsx("div",{className:s.loadingOverlay,children:e.jsxs("div",{className:"flex flex-col items-center gap-4",children:[e.jsx("div",{className:"text-lg font-medium",children:"Export Successful!"}),e.jsx("div",{className:"text-sm text-gray-600",children:"Your dataset has been downloaded"}),e.jsx(r,{name:"close-export-success",onClick:c,className:"mt-4",children:"Close"})]})}),e.jsxs("div",{className:s.ratingWarningContent,children:[e.jsx("h3",{className:s.ratingWarningTitle,children:"Export Dataset"}),e.jsx("div",{className:s.exportModeSection,children:e.jsx(B,{name:"export-mode",value:p,onChange:t=>{(t==="standard"||t==="fine-tuning")&&w(t)},options:[{key:"standard",label:"Standard"},{key:"fine-tuning",label:"Fine-tuning"}],keySelector:t=>t.key,labelSelector:t=>t.label,disabled:a})}),p==="fine-tuning"&&e.jsxs("div",{className:s.splitConfigSection,children:[e.jsx("div",{className:s.splitConfigTitle,children:"Dataset Split Configuration"}),e.jsxs("div",{className:s.splitInputsContainer,children:[e.jsxs("div",{className:s.splitInputGroup,children:[e.jsx("label",{htmlFor:"train-split",className:s.splitInputLabel,children:"Train (%)"}),e.jsx("input",{id:"train-split",type:"number",min:"0",max:"100",value:m,onChange:t=>{const n=parseInt(t.target.value)||0,l=100-n;l>=0&&(z(n),u+g>l&&(h(Math.floor(l/2)),x(l-Math.floor(l/2))))},className:s.splitInput,disabled:a})]}),e.jsxs("div",{className:s.splitInputGroup,children:[e.jsx("label",{htmlFor:"test-split",className:s.splitInputLabel,children:"Test (%)"}),e.jsx("input",{id:"test-split",type:"number",min:"0",max:"100",value:u,onChange:t=>{const n=parseInt(t.target.value)||0,l=100-m-n;l>=0&&(h(n),x(l))},className:s.splitInput,disabled:a})]}),e.jsxs("div",{className:s.splitInputGroup,children:[e.jsx("label",{htmlFor:"val-split",className:s.splitInputLabel,children:"Val (%)"}),e.jsx("input",{id:"val-split",type:"number",min:"0",max:"100",value:g,onChange:t=>{const n=parseInt(t.target.value)||0,l=100-m-n;l>=0&&(x(n),h(l))},className:s.splitInput,disabled:a})]})]}),m+u+g!==100&&e.jsx("div",{className:s.splitTotal,children:e.jsx("span",{className:s.splitTotalError,children:"Must equal 100%"})})]}),e.jsxs("div",{className:s.checkboxesContainer,children:[e.jsx("div",{className:"flex items-center gap-3",children:e.jsx(F,{name:"crisis-maps",label:`Crisis Maps (${I} images)`,value:j,onChange:t=>M(t),disabled:a})}),e.jsx("div",{className:"flex items-center gap-3",children:e.jsx(F,{name:"drone-images",label:`Drone Images (${k} images)`,value:b,onChange:t=>E(t),disabled:a})})]}),e.jsxs("div",{className:s.ratingWarningButtons,children:[e.jsx(r,{name:"confirm-export",onClick:C,disabled:a,children:a?e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(N,{className:"text-white"}),"Exporting..."]}):"Export Selected"}),e.jsx(r,{name:"cancel-export",variant:"tertiary",onClick:c,disabled:a,children:"Cancel"})]})]})]})}):null}export{re as E,ie as F}; diff --git a/py_backend/static/assets/index-B3MZlOIS.js b/py_backend/static/assets/index-B3MZlOIS.js new file mode 100644 index 0000000000000000000000000000000000000000..69995dea05527966745d16b3bcfe3e40804ebc50 --- /dev/null +++ b/py_backend/static/assets/index-B3MZlOIS.js @@ -0,0 +1,3 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vendor-utils-Db80MiSc.js","assets/vendor-DxpCibxB.js","assets/vendor-react-BxsGb6Ph.js"])))=>i.map(i=>d[i]); +import{u as Xe,F as Ye,_ as ea}from"./index-C6NSRolP.js";import{j as a,r as g}from"./vendor-react-BxsGb6Ph.js";import{N as X,n as T,_ as ve,L as aa,z as E,C as se,c as ie,D as ta}from"./vendor-ui-l_DttnRj.js";import{u as sa}from"./useAdmin-6S8boYmH.js";import{F as ia,E as na}from"./ExportModal-5QTtY4mk.js";import{n as oa,a as ra}from"./vendor-DxpCibxB.js";const la="_tabSelector_usssr_1",ca="_imageContainer_usssr_12",da="_imagePlaceholder_usssr_33",ga="_metadataTags_usssr_45",ma="_metadataTag_usssr_45",ua="_captionContainer_usssr_67",pa="_captionText_usssr_74",fa="_gridLayout_usssr_131",ha="_detailsSection_usssr_155",_a="_loadingContainer_usssr_161",xa="_errorContainer_usssr_171",ya="_fullSizeModalOverlay_usssr_205",va="_fullSizeModalContent_usssr_219",wa="_ratingWarningContent_usssr_230",Ca="_ratingWarningTitle_usssr_236",ja="_ratingWarningText_usssr_243",Ia="_ratingWarningButtons_usssr_250",Na="_carouselContainer_usssr_365",ba="_carouselImageWrapper_usssr_370",Sa="_carouselImage_usssr_370",La="_carouselNavigation_usssr_393",Da="_carouselButton_usssr_405",ka="_carouselIndicators_usssr_429",Ma="_carouselIndicator_usssr_429",Ta="_carouselIndicatorActive_usssr_458",Fa="_singleImageContainer_usssr_488",Ea="_viewImageButtonContainer_usssr_494",p={tabSelector:la,imageContainer:ca,imagePlaceholder:da,metadataTags:ga,metadataTag:ma,captionContainer:ua,captionText:pa,gridLayout:fa,detailsSection:ha,loadingContainer:_a,errorContainer:xa,fullSizeModalOverlay:ya,fullSizeModalContent:va,ratingWarningContent:wa,ratingWarningTitle:Ca,ratingWarningText:ja,ratingWarningButtons:Ia,carouselContainer:Na,carouselImageWrapper:ba,carouselImage:Sa,carouselNavigation:La,carouselButton:Da,carouselIndicators:ka,carouselIndicator:Ma,carouselIndicatorActive:Ta,singleImageContainer:Fa,viewImageButtonContainer:Ea};function it(){const{mapId:u}=oa(),y=ra(),{isAuthenticated:ne}=sa();console.log("MapDetailsPage: Current URL:",window.location.href),console.log("MapDetailsPage: Hash:",window.location.hash),console.log("MapDetailsPage: mapId from useParams:",u),console.log("MapDetailsPage: mapId type:",typeof u),console.log("MapDetailsPage: mapId length:",u?.length),console.log("MapDetailsPage: mapId value:",JSON.stringify(u));const we=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;if(!u||u==="undefined"||u==="null"||u.trim()===""||!we.test(u))return a.jsx(X,{children:a.jsxs("div",{className:"flex flex-col items-center gap-4 text-center py-12",children:[a.jsx("div",{className:"text-4xl",children:"⚠️"}),a.jsx("div",{className:"text-xl font-semibold",children:"Invalid Map ID"}),a.jsx("div",{children:"The map ID provided is not valid."}),a.jsxs("div",{className:"text-sm text-gray-500 mt-2",children:['Debug Info: mapId = "',u,'" (type: ',typeof u,")"]}),a.jsx(T,{name:"back-to-explore",variant:"secondary",onClick:()=>y("/explore"),children:"Return to Explore"})]})});const[oe,Ce]=g.useState("mapDetails"),[e,Y]=g.useState(null),[W,P]=g.useState(!0),[re,O]=g.useState(null),[le,je]=g.useState([]),[ce,Ie]=g.useState([]),[de,Ne]=g.useState([]),[ge,be]=g.useState([]),[Se,Le]=g.useState([]),[De,ke]=g.useState(!1),[Me,Te]=g.useState(!1),[B,q]=g.useState(!1),[Fe,G]=g.useState(!1),[me,Z]=g.useState(!1),[Ee,ee]=g.useState(!1),[Re,ae]=g.useState(!1),[Ra,$a]=g.useState("standard"),[R,Pa]=g.useState(80),[J,Aa]=g.useState(10),[za,Oa]=g.useState(10),[Ua,Wa]=g.useState(!0),[Ba,Ja]=g.useState(!0),[K,Q]=g.useState(!1),[$e,ue]=g.useState(!1),[Pe,pe]=g.useState(null),[D,H]=g.useState([]),[A,z]=g.useState(0),[V,fe]=g.useState(!1),{search:d,setSearch:Ha,srcFilter:v,setSrcFilter:Va,catFilter:w,setCatFilter:qa,regionFilter:C,setRegionFilter:Ga,countryFilter:j,setCountryFilter:Za,imageTypeFilter:I,setImageTypeFilter:Ka,uploadTypeFilter:N,setUploadTypeFilter:Qa,showReferenceExamples:k,setShowReferenceExamples:Ae,clearAllFilters:ze}=Xe(),Oe=[{key:"explore",label:"List"},{key:"mapDetails",label:"Carousel"}],he=g.useCallback(async t=>{if(console.log("fetchMapData called with id:",t),console.log("fetchMapData id type:",typeof t),!t||t==="undefined"||t==="null"||t.trim()===""){console.log("fetchMapData: Invalid ID detected:",t),O("Invalid Map ID"),P(!1);return}if(!/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(t)){console.log("fetchMapData: Invalid UUID format:",t),O("Invalid Map ID format"),P(!1);return}console.log("fetchMapData: Making API call for id:",t),q(!0),P(!0);try{const f=await fetch(`/api/images/${t}`);if(!f.ok)throw new Error("Map not found");const s=await f.json();if(Y(s),s.all_image_ids&&s.all_image_ids.length>1)await _e(s.all_image_ids);else if(s.image_count&&s.image_count>1){console.log("Multi-upload detected but no all_image_ids, trying grouped endpoint");try{const l=await fetch("/api/images/grouped");if(l.ok){const r=(await l.json()).find(c=>c.all_image_ids&&c.all_image_ids.includes(s.image_id));r&&r.all_image_ids?await _e(r.all_image_ids):(H([s]),z(0))}else H([s]),z(0)}catch(l){console.error("Failed to fetch from grouped endpoint:",l),H([s]),z(0)}}else H([s]),z(0);await te(t)}catch(f){O(f instanceof Error?f.message:"Unknown error occurred")}finally{P(!1),q(!1)}},[]),_e=g.useCallback(async t=>{console.log("fetchAllImages called with imageIds:",t),fe(!0);try{const o=t.map(async s=>{const l=await fetch(`/api/images/${s}`);if(!l.ok)throw new Error(`Failed to fetch image ${s}`);return l.json()}),f=await Promise.all(o);H(f),z(0),console.log("fetchAllImages: Loaded",f.length,"images")}catch(o){console.error("fetchAllImages error:",o),O(o instanceof Error?o.message:"Failed to load all images")}finally{fe(!1)}},[]),Ue=g.useCallback(()=>{D.length>1&&z(t=>t>0?t-1:D.length-1)},[D.length]),We=g.useCallback(()=>{D.length>1&&z(t=>t{t>=0&&t{const o=t||(D.length>0?D[A]:e);o&&(pe(o),ue(!0))},[D,A,e]),Je=g.useCallback(()=>{ue(!1),pe(null)},[]);g.useEffect(()=>{if(console.log("MapDetailsPage: mapId from useParams:",u),console.log("MapDetailsPage: mapId type:",typeof u),console.log("MapDetailsPage: mapId value:",u),!u||u==="undefined"||u==="null"||u.trim()===""||u===void 0||u===null){console.log("MapDetailsPage: Invalid mapId, setting error"),O("Map ID is required"),P(!1);return}if(!/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(u)){console.log("MapDetailsPage: Invalid UUID format:",u),O("Invalid Map ID format"),P(!1);return}console.log("MapDetailsPage: Fetching data for mapId:",u),he(u)},[u,he]),g.useEffect(()=>{if(!e||W||K)return;if(!u||u==="undefined"||u==="null"||u.trim()===""){console.log("Auto-navigation skipped: Invalid mapId");return}if(!/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(u)){console.log("Auto-navigation skipped: Invalid mapId format");return}(()=>{const f=!d||e.title?.toLowerCase().includes(d.toLowerCase())||e.generated?.toLowerCase().includes(d.toLowerCase())||e.source?.toLowerCase().includes(d.toLowerCase())||e.event_type?.toLowerCase().includes(d.toLowerCase()),s=!v||e.source===v,l=!w||e.event_type===w,i=!C||e.countries.some(M=>M.r_code===C),r=!j||e.countries.some(M=>M.c_code===j),c=!I||e.image_type===I,n=!k||e.starred===!0,x=f&&s&&l&&i&&r&&c&&n;return console.log("Auto-navigation check:",{mapId:u,search:d,srcFilter:v,catFilter:w,regionFilter:C,countryFilter:j,imageTypeFilter:I,showReferenceExamples:k,matchesSearch:f,matchesSource:s,matchesCategory:l,matchesRegion:i,matchesCountry:r,matchesImageType:c,matchesReferenceExamples:n,matches:x}),x})()||(console.log("Current map does not match filters, looking for first matching item"),fetch("/api/images").then(f=>f.json()).then(f=>{console.log("Auto-navigation: Received images from API:",f.length),console.log("Auto-navigation: First few images:",f.slice(0,3).map(l=>({image_id:l.image_id,title:l.title})));const s=f.find(l=>{const i=!d||l.title?.toLowerCase().includes(d.toLowerCase())||l.generated?.toLowerCase().includes(d.toLowerCase())||l.source?.toLowerCase().includes(d.toLowerCase())||l.event_type?.toLowerCase().includes(d.toLowerCase()),r=!v||l.source===v,c=!w||l.event_type===w,n=!C||l.countries?.some(m=>m.r_code===C),x=!j||l.countries?.some(m=>m.c_code===j),M=!I||l.image_type===I,S=!k||l.starred===!0;return i&&r&&c&&n&&x&&M&&S});console.log("Auto-navigation: Found first matching image:",s?{image_id:s.image_id,title:s.title,source:s.source}:"No matching image found"),s&&s.image_id&&s.image_id!=="undefined"&&s.image_id!=="null"&&s.image_id.trim()!==""&&s.image_id!==u&&(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(s.image_id)?(console.log("Auto-navigating to:",s.image_id),y(`/map/${s.image_id}`)):console.error("Auto-navigation blocked: Invalid image_id format:",s.image_id))}).catch(console.error))},[e,d,v,w,C,j,I,k,u,y,W,K]);const te=async t=>{if(!(!t||t==="undefined"||t==="null"||t.trim()===""))try{const o=await fetch("/api/images/grouped");if(o.ok){const s=(await o.json()).filter(i=>{const r=!d||i.title?.toLowerCase().includes(d.toLowerCase())||i.generated?.toLowerCase().includes(d.toLowerCase())||i.source?.toLowerCase().includes(d.toLowerCase())||i.event_type?.toLowerCase().includes(d.toLowerCase()),c=!v||i.source===v,n=!w||i.event_type===w,x=!C||i.countries?.some(_=>_.r_code===C),M=!j||i.countries?.some(_=>_.c_code===j),S=!I||i.image_type===I,m=!N||N==="single"&&(!i.image_count||i.image_count<=1)||N==="multiple"&&i.image_count&&i.image_count>1,b=!k||i.starred===!0;return r&&c&&n&&x&&M&&S&&m&&b}),l=s.findIndex(i=>i.image_id===t);ke(s.length>1&&l>0),Te(s.length>1&&l{if(!B){q(!0);try{const o=await fetch("/api/images/grouped");if(o.ok){const f=await o.json(),s=f.filter(n=>{const x=!d||n.title?.toLowerCase().includes(d.toLowerCase())||n.generated?.toLowerCase().includes(d.toLowerCase())||n.source?.toLowerCase().includes(d.toLowerCase())||n.event_type?.toLowerCase().includes(d.toLowerCase()),M=!v||n.source===v,S=!w||n.event_type===w,m=!C||n.countries?.some($=>$.r_code===C),b=!j||n.countries?.some($=>$.c_code===j),_=!I||n.image_type===I,L=!N||N==="single"&&(!n.image_count||n.image_count<=1)||N==="multiple"&&n.image_count&&n.image_count>1,U=!k||n.starred===!0;return x&&M&&S&&m&&b&&_&&L&&U});if(s.findIndex(n=>n.image_id===u)===-1){const n=f.find(x=>x.image_id===u);n&&s.push(n)}const i=s.findIndex(n=>n.image_id===u);if(i===-1){console.error("Current image not found in filtered list");return}let r;t==="previous"?r=i>0?i-1:s.length-1:r=i{e&&u&&!W&&!K&&te(u)},[e,u,d,v,w,C,j,I,N,k,W,K,te]),g.useEffect(()=>{Promise.all([fetch("/api/sources").then(t=>t.json()),fetch("/api/types").then(t=>t.json()),fetch("/api/image-types").then(t=>t.json()),fetch("/api/regions").then(t=>t.json()),fetch("/api/countries").then(t=>t.json())]).then(([t,o,f,s,l])=>{je(t),Ie(o),Ne(f),be(s),Le(l)}).catch(console.error)},[]);const He=async()=>{e&&G(!0)},Ve=async()=>{if(e)try{(await fetch(`/api/images/${e.image_id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({starred:!e.starred})})).ok?Y(o=>o?{...o,starred:!o.starred}:null):console.error("Failed to toggle starred status")}catch(t){console.error("Error toggling starred status:",t)}},qe=async()=>{if(e){Q(!0);try{if(console.log("Deleting image with ID:",e.image_id),(await fetch(`/api/images/${e.image_id}`,{method:"DELETE"})).ok){Y(o=>o?{...o,starred:!o.starred}:null),G(!1);try{const o=await fetch("/api/images/grouped");if(o.ok){const s=(await o.json()).filter(i=>{const r=!d||i.title?.toLowerCase().includes(d.toLowerCase())||i.generated?.toLowerCase().includes(d.toLowerCase())||i.source?.toLowerCase().includes(d.toLowerCase())||i.event_type?.toLowerCase().includes(d.toLowerCase()),c=!v||i.source===v,n=!w||i.event_type===w,x=!C||i.countries?.some(_=>_.r_code===C),M=!j||i.countries?.some(_=>_.c_code===j),S=!I||i.image_type===I,m=!N||N==="single"&&(!i.image_count||i.image_count<=1)||N==="multiple"&&i.image_count&&i.image_count>1,b=!k||i.starred===!0;return r&&c&&n&&x&&M&&S&&m&&b}),l=s.filter(i=>i.image_id!==e.image_id);if(l.length>0){const i=s.findIndex(c=>c.image_id===e.image_id);let r;if(i===s.length-1?r=i-1:r=i,console.log("Navigation target:",{currentIndex:i,targetIndex:r,targetId:l[r]?.image_id}),r>=0&&r{if(!e)return null;if(!d&&!v&&!w&&!C&&!j&&!I&&!N&&!k)return e;const t=!d||e.title?.toLowerCase().includes(d.toLowerCase())||e.generated?.toLowerCase().includes(d.toLowerCase())||e.source?.toLowerCase().includes(d.toLowerCase())||e.event_type?.toLowerCase().includes(d.toLowerCase()),o=!v||e.source===v,f=!w||e.event_type===w,s=!C||e.countries.some(x=>x.r_code===C),l=!j||e.countries.some(x=>x.c_code===j),i=!I||e.image_type===I,r=!N||N==="single"&&(!e.image_count||e.image_count<=1)||N==="multiple"&&e.image_count&&e.image_count>1,c=!k||e.starred===!0,n=t&&o&&f&&s&&l&&i&&r&&c;return!n&&(d||v||w||C||j||I||N||k)?(setTimeout(()=>{Ge()},100),e):n?e:null},[e,d,v,w,C,j,I,N,k]),Ge=g.useCallback(async()=>{P(!0);try{const t=await fetch("/api/images/grouped");if(t.ok){const f=(await t.json()).filter(s=>{const l=!d||s.title?.toLowerCase().includes(d.toLowerCase())||s.generated?.toLowerCase().includes(d.toLowerCase())||s.source?.toLowerCase().includes(d.toLowerCase())||s.event_type?.toLowerCase().includes(d.toLowerCase()),i=!v||s.source===v,r=!w||s.event_type===w,c=!C||s.countries?.some(m=>m.r_code===C),n=!j||s.countries?.some(m=>m.c_code===j),x=!I||s.image_type===I,M=!N||N==="single"&&(!s.image_count||s.image_count<=1)||N==="multiple"&&s.image_count&&s.image_count>1,S=!k||s.starred===!0;return l&&i&&r&&c&&n&&x&&M&&S});if(f.length>0){const s=f[0];s&&s.image_id&&y(`/map/${s.image_id}`)}else y("/explore")}}catch(t){console.error("Failed to navigate to matching image:",t),y("/explore")}finally{P(!1)}},[d,v,w,C,j,I,N,k,y]),Ze=()=>{if(!e)return;if(!e.all_image_ids||e.all_image_ids.length<=1){const s=`/upload?step=1&contribute=true&imageIds=${[e.image_id].join(",")}`;y(s);return}const o=`/upload?step=1&contribute=true&imageIds=${e.all_image_ids.join(",")}`;y(o)},F=(t,o)=>({image:`images/${o}`,caption:t.edited||t.generated||"",metadata:{image_id:t.image_count&&t.image_count>1?t.all_image_ids||[t.image_id]:t.image_id,title:t.title,source:t.source,event_type:t.event_type,image_type:t.image_type,countries:t.countries,starred:t.starred,image_count:t.image_count||1}}),Ke=async t=>{if(e){ee(!0),ae(!1);try{const o=(await ea(async()=>{const{default:r}=await import("./vendor-utils-Db80MiSc.js").then(c=>c.j);return{default:r}},__vite__mapDeps([0,1,2]))).default,f=new o;if(e.image_type==="crisis_map"){const r=f.folder("crisis_maps_dataset"),c=r?.folder("images");if(c)try{const n=e.image_count&&e.image_count>1?e.all_image_ids||[e.image_id]:[e.image_id],x=n.map(async(m,b)=>{try{const _=await fetch(`/api/images/${m}/file`);if(!_.ok)throw new Error(`Failed to fetch image ${m}`);const L=await _.blob(),U=e.file_key.split(".").pop()||"jpg",$=`0001_${String(b+1).padStart(2,"0")}.${U}`;return c.file($,L),{success:!0,fileName:$,imageId:m}}catch(_){return console.error(`Failed to process image ${m}:`,_),{success:!1,fileName:"",imageId:m}}}),S=(await Promise.all(x)).filter(m=>m.success);if(S.length===0)throw new Error("No images could be processed");if(t==="fine-tuning"){const m=[],b=[],_=[],L=S.map(Qe=>`images/${Qe.fileName}`),U=Math.random(),$={image:L.length===1?L[0]:L,caption:e.edited||e.generated||"",metadata:{image_id:n,title:e.title,source:e.source,event_type:e.event_type,image_type:e.image_type,countries:e.countries,starred:e.starred,image_count:e.image_count||1}};U`images/${_.fileName}`),b={image:m.length===1?m[0]:m,caption:e.edited||e.generated||"",metadata:{image_id:n,title:e.title,source:e.source,event_type:e.event_type,image_type:e.image_type,countries:e.countries,starred:e.starred,image_count:e.image_count||1}};r&&r.file("0001.json",JSON.stringify(b,null,2))}}catch(n){throw console.error(`Failed to process image ${e.image_id}:`,n),n}}else if(e.image_type==="drone_image"){const r=f.folder("drone_images_dataset"),c=r?.folder("images");if(c)try{const n=await fetch(`/api/images/${e.image_id}/file`);if(!n.ok)throw new Error(`Failed to fetch image ${e.image_id}`);const x=await n.blob(),S=`0001.${e.file_key.split(".").pop()||"jpg"}`;if(c.file(S,x),t==="fine-tuning"){const m=[],b=[],_=[];if(String(e?.image_type)==="crisis_map"){const L=Math.random();L1?e.all_image_ids||[e.image_id]:e.image_id,title:e.title,source:e.source,event_type:e.event_type,image_type:e.image_type,countries:e.countries,starred:e.starred,image_count:e.image_count||1}};r&&r.file("0001.json",JSON.stringify(m,null,2))}}catch(n){throw console.error(`Failed to process image ${e.image_id}:`,n),n}}else{const r=f.folder("generic_dataset"),c=r?.folder("images");if(c)try{const n=await fetch(`/api/images/${e.image_id}/file`);if(!n.ok)throw new Error(`Failed to fetch image ${e.image_id}`);const x=await n.blob(),S=`0001.${e.file_key.split(".").pop()||"jpg"}`;if(c.file(S,x),t==="fine-tuning"){const m=[],b=[],_=[];if(String(e?.image_type)==="crisis_map"){const L=Math.random();L1?e.all_image_ids||[e.image_id]:e.image_id,title:e.title,source:e.source,event_type:e.event_type,image_type:e.image_type,countries:e.countries,starred:e.starred,image_count:e.image_count||1}};r&&r.file("0001.json",JSON.stringify(m,null,2))}}catch(n){throw console.error(`Failed to process image ${e.image_id}:`,n),n}}const s=await f.generateAsync({type:"blob"}),l=URL.createObjectURL(s),i=document.createElement("a");i.href=l,i.download=`dataset_${e.image_type}_${e.image_id}_${t}_${new Date().toISOString().split("T")[0]}.zip`,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(l),console.log(`Exported ${e.image_type} dataset with 1 image in ${t} mode`),ae(!0)}catch(o){console.error("Export failed:",o),alert("Failed to export dataset. Please try again.")}finally{ee(!1)}}};return W?a.jsx(X,{children:a.jsx("div",{className:p.loadingContainer,children:a.jsxs("div",{className:"flex flex-col items-center gap-4",children:[a.jsx(ve,{className:"text-ifrcRed"}),a.jsx("div",{children:"Loading map details..."})]})})}):re||!e?a.jsx(X,{children:a.jsx("div",{className:p.errorContainer,children:a.jsxs("div",{className:"flex flex-col items-center gap-4 text-center",children:[a.jsx("div",{className:"text-4xl",children:"⚠️"}),a.jsx("div",{className:"text-xl font-semibold",children:"Unable to load map"}),a.jsx("div",{children:re||"Map not found"}),a.jsx(T,{name:"back-to-explore",variant:"secondary",onClick:()=>y("/explore"),children:"Return to Explore"})]})})}):a.jsxs(X,{children:[a.jsxs("div",{className:"max-w-7xl mx-auto",children:[a.jsxs("div",{className:p.tabSelector,children:[a.jsx(aa,{name:"map-details-view",value:oe,onChange:t=>{(t==="mapDetails"||t==="explore")&&(Ce(t),t==="explore"&&y("/explore"))},options:Oe,keySelector:t=>t.key,labelSelector:t=>t.label}),a.jsxs("div",{className:"flex items-center gap-2 ml-auto",children:[a.jsx(E,{withInternalPadding:!0,className:"bg-white/20 backdrop-blur-sm rounded-md p-2",children:a.jsxs(T,{name:"reference-examples",variant:k?"primary":"secondary",onClick:()=>Ae(!k),className:"whitespace-nowrap",children:[a.jsx("span",{className:"mr-2",children:k?a.jsx("span",{className:"text-yellow-400",children:"★"}):a.jsx("span",{className:"text-yellow-400",children:"☆"})}),"Reference Examples"]})}),a.jsx(T,{name:"export-dataset",variant:"secondary",onClick:()=>Z(!0),children:"Export"})]})]}),a.jsx(ia,{sources:le,types:ce,regions:ge,countries:Se,imageTypes:de,isLoadingFilters:!1}),oe==="mapDetails"?a.jsx("div",{className:"relative",children:h?a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:p.gridLayout,children:[a.jsxs(E,{heading:a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{children:h.title||"Map Image"}),h.starred&&a.jsx("span",{className:"text-red-500 text-xl",title:"Starred image",children:"★"})]}),headingLevel:2,withHeaderBorder:!0,withInternalPadding:!0,spacing:"comfortable",children:[a.jsx("div",{className:p.imageContainer,children:e?.image_count&&e.image_count>1||D.length>1?a.jsxs("div",{className:p.carouselContainer,children:[a.jsx("div",{className:p.carouselImageWrapper,children:V?a.jsxs("div",{className:p.imagePlaceholder,children:[a.jsx(ve,{className:"text-ifrcRed"}),a.jsx("div",{children:"Loading images..."})]}):D[A]?.image_url?a.jsx("img",{src:D[A].image_url,alt:D[A].file_key,className:p.carouselImage}):a.jsx("div",{className:p.imagePlaceholder,children:"No image available"})}),a.jsxs("div",{className:p.carouselNavigation,children:[a.jsx(T,{name:"previous-image",variant:"tertiary",size:1,onClick:Ue,disabled:V,className:p.carouselButton,children:a.jsx(se,{className:"w-4 h-4"})}),a.jsx("div",{className:p.carouselIndicators,children:D.map((t,o)=>a.jsx("button",{onClick:()=>Be(o),className:`${p.carouselIndicator} ${o===A?p.carouselIndicatorActive:""}`,disabled:V,children:o+1},o))}),a.jsx(T,{name:"next-image",variant:"tertiary",size:1,onClick:We,disabled:V,className:p.carouselButton,children:a.jsx(ie,{className:"w-4 h-4"})})]}),a.jsx("div",{className:p.viewImageButtonContainer,children:a.jsx(T,{name:"view-full-size-carousel",variant:"secondary",size:1,onClick:()=>xe(D[A]),disabled:V||!D[A]?.image_url,children:"View Image"})})]}):a.jsxs("div",{className:p.singleImageContainer,children:[h.image_url?a.jsx("img",{src:h.image_url,alt:h.file_key}):a.jsx("div",{className:p.imagePlaceholder,children:"No image available"}),a.jsx("div",{className:p.viewImageButtonContainer,children:a.jsx(T,{name:"view-full-size-single",variant:"secondary",size:1,onClick:()=>xe(h),disabled:!h.image_url,children:"View Image"})})]})}),a.jsx(E,{withInternalPadding:!0,className:"bg-white/20 backdrop-blur-sm rounded-md p-2",children:a.jsxs("div",{className:p.metadataTags,children:[h.image_type!=="drone_image"&&a.jsx("span",{className:p.metadataTag,children:le.find(t=>t.s_code===h.source)?.label||h.source}),a.jsx("span",{className:p.metadataTag,children:ce.find(t=>t.t_code===h.event_type)?.label||h.event_type}),a.jsx("span",{className:p.metadataTag,children:de.find(t=>t.image_type===h.image_type)?.label||h.image_type}),h.countries&&h.countries.length>0&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:p.metadataTag,children:ge.find(t=>t.r_code===h.countries[0].r_code)?.label||"Unknown Region"}),a.jsx("span",{className:p.metadataTag,children:h.countries.map(t=>t.label).join(", ")})]}),h.image_count&&h.image_count>1&&a.jsxs("span",{className:p.metadataTag,title:`Multi-upload with ${h.image_count} images`,children:["📷 ",h.image_count]}),(!h.image_count||h.image_count<=1)&&a.jsx("span",{className:p.metadataTag,title:"Single Upload",children:"Single"})]})})]}),a.jsx("div",{className:p.detailsSection,children:h.edited&&h.edited.includes("Description:")||h.generated&&h.generated.includes("Description:")?a.jsx(E,{heading:"AI Generated Content",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,spacing:"comfortable",children:a.jsx("div",{className:p.captionContainer,children:a.jsx("div",{className:p.captionText,children:(h.edited||h.generated||"").split(` +`).map((t,o)=>a.jsx("div",{children:t.startsWith("Description:")||t.startsWith("Analysis:")||t.startsWith("Recommended Actions:")?a.jsx("h4",{className:"font-semibold text-gray-800 mt-4 mb-2",children:t}):t.trim()===""?a.jsx("br",{}):a.jsx("p",{className:"mb-2",children:t})},o))})})}):a.jsx(E,{heading:"Description",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,spacing:"comfortable",children:a.jsx("div",{className:p.captionContainer,children:h.generated?a.jsx("div",{className:p.captionText,children:a.jsx("p",{children:h.edited||h.generated})}):a.jsx("p",{children:"— no caption yet —"})})})})]}),a.jsx("div",{className:"flex items-center justify-center mt-8",children:a.jsx(E,{withInternalPadding:!0,className:"bg-white/20 backdrop-blur-sm rounded-lg p-4",children:a.jsxs("div",{className:"flex items-center gap-4",children:[De&&a.jsx(E,{withInternalPadding:!0,className:"rounded-md p-2",children:a.jsx(T,{name:"previous-item",variant:"tertiary",size:1,className:`bg-white/90 hover:bg-white shadow-lg border border-gray-200 ${B?"opacity-50 cursor-not-allowed":"hover:scale-110"}`,onClick:()=>ye("previous"),disabled:B,children:a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsxs("div",{className:"flex -space-x-1",children:[a.jsx(se,{className:"w-4 h-4"}),a.jsx(se,{className:"w-4 h-4"})]}),a.jsx("span",{className:"font-semibold",children:"Previous"})]})})}),ne&&a.jsx(E,{withInternalPadding:!0,className:"rounded-md p-2",children:a.jsx(T,{name:"delete",variant:"tertiary",size:1,className:"bg-red-50 hover:bg-red-100 text-red-700 border border-red-200 hover:border-red-300",onClick:He,title:"Delete","aria-label":"Delete saved image",children:a.jsx(ta,{className:"w-4 h-4"})})}),a.jsx(E,{withInternalPadding:!0,className:"rounded-md p-2",children:a.jsx(T,{name:"contribute",onClick:Ze,children:"Contribute"})}),ne&&a.jsx(E,{withInternalPadding:!0,className:"rounded-md p-2",children:a.jsx(T,{name:"toggle-star",variant:"tertiary",size:1,className:`${e?.starred?"bg-red-100 hover:bg-red-200 text-red-800 border-2 border-red-400":"bg-gray-100 hover:bg-gray-200 text-gray-600 border-2 border-gray-300"} w-16 h-8 rounded-full transition-all duration-200 flex items-center justify-center`,onClick:Ve,title:e?.starred?"Unstar image":"Star image","aria-label":e?.starred?"Unstar image":"Star image",children:a.jsx("span",{className:`text-lg transition-all duration-200 ${e?.starred?"text-red-600":"text-gray-500"}`,children:e?.starred?"★":"☆"})})}),Me&&a.jsx(E,{withInternalPadding:!0,className:"rounded-md p-2",children:a.jsx(T,{name:"next-item",variant:"tertiary",size:1,className:`bg-white/90 hover:bg-white shadow-lg border border-gray-200 ${B?"opacity-50 cursor-not-allowed":"hover:scale-110"}`,onClick:()=>ye("next"),disabled:B,children:a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx("span",{className:"font-semibold",children:"Next"}),a.jsxs("div",{className:"flex -space-x-1",children:[a.jsx(ie,{className:"w-4 h-4"}),a.jsx(ie,{className:"w-4 h-4"})]})]})})})]})})})]}):a.jsxs("div",{className:"text-center py-12",children:[a.jsx("div",{className:"text-xl font-semibold text-gray-600 mb-4",children:"No matches found"}),a.jsx("div",{className:"mt-4",children:a.jsx(T,{name:"clear-filters",variant:"secondary",onClick:ze,children:"Clear Filters"})})]})}):null]}),Fe&&a.jsx("div",{className:p.fullSizeModalOverlay,onClick:()=>G(!1),children:a.jsx("div",{className:p.fullSizeModalContent,onClick:t=>t.stopPropagation(),children:a.jsxs("div",{className:p.ratingWarningContent,children:[a.jsx("h3",{className:p.ratingWarningTitle,children:"Delete Image?"}),a.jsx("p",{className:p.ratingWarningText,children:"This action cannot be undone. Are you sure you want to delete this saved image and all related data?"}),a.jsxs("div",{className:p.ratingWarningButtons,children:[a.jsx(T,{name:"confirm-delete",variant:"secondary",onClick:qe,children:"Delete"}),a.jsx(T,{name:"cancel-delete",variant:"tertiary",onClick:()=>G(!1),children:"Cancel"})]})]})})}),me&&a.jsx(na,{isOpen:me,onClose:()=>{Z(!1),ae(!1),ee(!1)},onExport:(t,o)=>{o.includes(e.image_type)&&Ke(t)},filteredCount:1,totalCount:1,hasFilters:!1,crisisMapsCount:e.image_type==="crisis_map"?1:0,droneImagesCount:e.image_type==="drone_image"?1:0,isLoading:Ee,exportSuccess:Re,variant:"single",onNavigateToList:()=>{Z(!1),y("/explore")},onNavigateAndExport:()=>{Z(!1),y("/explore?export=true")}}),a.jsx(Ye,{isOpen:$e,imageUrl:Pe?.image_url||null,preview:null,selectedImageData:null,onClose:Je})]})}export{it as default}; diff --git a/py_backend/static/assets/index-C6NSRolP.js b/py_backend/static/assets/index-C6NSRolP.js new file mode 100644 index 0000000000000000000000000000000000000000..8a9209d83cfe878d6d0b96cb6d8139ec3d054d80 --- /dev/null +++ b/py_backend/static/assets/index-C6NSRolP.js @@ -0,0 +1,17 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DMU6q_dg.js","assets/vendor-react-BxsGb6Ph.js","assets/vendor-DxpCibxB.js","assets/vendor-ui-l_DttnRj.js","assets/vendor-ui-DpEM1HT6.css","assets/index-BsrMOmjk.css","assets/index-C8xjpbHZ.js","assets/useAdmin-6S8boYmH.js","assets/ExportModal-5QTtY4mk.js","assets/ExportModal-BoB3JpqO.css","assets/index-BzPMJFRS.css","assets/AdminPage-KksT68Fe.js","assets/AdminPage-VgSjQ50W.css","assets/index-B3MZlOIS.js","assets/index-tDgjKyWF.css"])))=>i.map(i=>d[i]); +import{r as a,j as e,L as zt,u as Ot,c as $t,R as Bt,b as Ut}from"./vendor-react-BxsGb6Ph.js";import{N as ln,G as Wt,U as Fn,S as Ht,A as Vt,z as U,n as w,M as Gt,Q as qt,a as Yt,b as Zt,L as Kt,B as cn,D as dn,C as Jt,c as Qt,O as D,f as J,d as Ln,e as Xt,_ as rn,R as te,l as ea,t as na}from"./vendor-ui-l_DttnRj.js";import{u as ta,a as un,O as aa,k as sa}from"./vendor-DxpCibxB.js";(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))p(c);new MutationObserver(c=>{for(const d of c)if(d.type==="childList")for(const _ of d.addedNodes)_.tagName==="LINK"&&_.rel==="modulepreload"&&p(_)}).observe(document,{childList:!0,subtree:!0});function o(c){const d={};return c.integrity&&(d.integrity=c.integrity),c.referrerPolicy&&(d.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?d.credentials="include":c.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function p(c){if(c.ep)return;c.ep=!0;const d=o(c);fetch(c.href,d)}})();const ia="modulepreload",oa=function(i){return"/app/"+i},Tn={},B=function(s,o,p){let c=Promise.resolve();if(o&&o.length>0){let S=function(x){return Promise.all(x.map(l=>Promise.resolve(l).then(b=>({status:"fulfilled",value:b}),b=>({status:"rejected",reason:b}))))};document.getElementsByTagName("link");const _=document.querySelector("meta[property=csp-nonce]"),C=_?.nonce||_?.getAttribute("nonce");c=S(o.map(x=>{if(x=oa(x),x in Tn)return;Tn[x]=!0;const l=x.endsWith(".css"),b=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${x}"]${b}`))return;const M=document.createElement("link");if(M.rel=l?"stylesheet":ia,l||(M.as="script"),M.crossOrigin="",M.href=x,C&&M.setAttribute("nonce",C),document.head.appendChild(M),l)return new Promise((P,j)=>{M.addEventListener("load",P),M.addEventListener("error",()=>j(new Error(`Unable to preload CSS for ${x}`)))})}))}function d(_){const C=new Event("vite:preloadError",{cancelable:!0});if(C.payload=_,window.dispatchEvent(C),!C.defaultPrevented)throw _}return c.then(_=>{for(const C of _||[])C.status==="rejected"&&d(C.reason);return s().catch(d)})},ra="_dropdownContainer_1six7_3",la="_dropdownMenu_1six7_15",ca="_dropdownContent_1six7_43",on={dropdownContainer:ra,dropdownMenu:la,dropdownContent:ca},da=[{to:"/upload",label:"Upload",Icon:Fn},{to:"/explore",label:"Explore",Icon:Ht},{to:"/analytics",label:"Analytics",Icon:Vt}];function ua(){const i=ta(),s=un(),[o,p]=a.useState(!1),c=a.useRef(null);return a.useEffect(()=>{const d=_=>{c.current&&!c.current.contains(_.target)&&p(!1)};return document.addEventListener("mousedown",d),()=>{document.removeEventListener("mousedown",d)}},[]),e.jsx("nav",{className:"border-b border-gray-200 bg-white shadow-sm sticky top-0 z-50 backdrop-blur-sm bg-white/95",children:e.jsxs(ln,{className:"border-b-2 border-ifrcRed",contentClassName:"grid grid-cols-3 items-center py-6",children:[e.jsxs("div",{className:"flex items-center gap-4 min-w-0 cursor-pointer group transition-all duration-200 hover:scale-105",onClick:()=>{if(!(i.pathname==="/upload"||i.pathname==="/")){if(i.pathname==="/upload"){if(window.confirmNavigationIfNeeded){window.confirmNavigationIfNeeded("/");return}if(!confirm("You have unsaved changes. Are you sure you want to leave?"))return}s("/")}},children:[e.jsx("div",{className:"p-2 rounded-lg bg-gradient-to-br from-ifrcRed/10 to-ifrcRed/20 group-hover:from-ifrcRed/20 group-hover:to-ifrcRed/30 transition-all duration-200",children:e.jsx(Wt,{className:"h-8 w-8 flex-shrink-0 text-ifrcRed"})}),e.jsx("div",{className:"flex flex-col",children:e.jsx("span",{className:"font-bold text-xl text-gray-900 leading-tight",children:"PromptAid Vision"})})]}),e.jsx("div",{className:"flex justify-center",children:e.jsx("nav",{className:"flex items-center space-x-4 bg-gray-50/80 rounded-xl p-2 backdrop-blur-sm",children:da.map(({to:d,label:_,Icon:C})=>{const S=i.pathname===d||d==="/upload"&&i.pathname==="/"||d==="/explore"&&i.pathname.startsWith("/map/"),x=i.pathname==="/upload"||i.pathname==="/",l=d==="/upload"||d==="/";return e.jsxs("div",{className:"relative",children:[e.jsx(U,{withInternalPadding:!0,className:"p-2",children:e.jsxs(w,{name:_.toLowerCase(),variant:S?"primary":"tertiary",size:1,className:`transition-all duration-200 ${S?"shadow-lg shadow-ifrcRed/20 transform scale-105":"hover:bg-white hover:shadow-md hover:scale-105"}`,onClick:()=>{if(!(x&&l)){if(i.pathname==="/upload"){if(window.confirmNavigationIfNeeded){window.confirmNavigationIfNeeded(d);return}if(!confirm("You have unsaved changes. Are you sure you want to leave?"))return}s(d)}},children:[e.jsx(C,{className:`w-4 h-4 transition-transform duration-200 ${S?"scale-110":"group-hover:scale-110"}`}),e.jsx("span",{className:"inline ml-2 font-semibold",children:_})]})}),S&&e.jsx("div",{className:"absolute -bottom-2 left-1/2 transform -translate-x-1/2 w-8 h-1 bg-ifrcRed rounded-full animate-pulse"})]},d)})})}),e.jsx("div",{className:"flex justify-end",children:e.jsxs("div",{className:on.dropdownContainer,ref:c,children:[e.jsx(U,{withInternalPadding:!0,className:"p-2",children:e.jsx(w,{name:"more-options",variant:o?"primary":"tertiary",size:1,className:"transition-all duration-200",onClick:()=>p(!o),children:e.jsx(Gt,{className:"w-4 h-4"})})}),o&&e.jsx("div",{className:on.dropdownMenu,children:e.jsxs("div",{className:on.dropdownContent,children:[e.jsx(U,{withInternalPadding:!0,className:"p-2",children:e.jsxs(w,{name:"help-support",variant:"tertiary",size:1,className:"w-full justify-start",onClick:()=>{if(p(!1),i.pathname==="/upload"){if(window.confirmNavigationIfNeeded){window.confirmNavigationIfNeeded("/help");return}if(!confirm("You have unsaved changes. Are you sure you want to leave?"))return}s("/help")},children:[e.jsx(qt,{className:"w-4 h-4"}),e.jsx("span",{className:"ml-2 font-semibold",children:"Help & Support"})]})}),e.jsx(U,{withInternalPadding:!0,className:"p-2",children:e.jsxs(w,{name:"dev",variant:"tertiary",size:1,className:"w-full justify-start",onClick:()=>{if(p(!1),i.pathname==="/upload"){if(window.confirmNavigationIfNeeded){window.confirmNavigationIfNeeded("/admin");return}if(!confirm("You have unsaved changes. Are you sure you want to leave?"))return}s("/admin")},children:[e.jsx(Yt,{className:"w-4 h-4"}),e.jsx("span",{className:"ml-2 font-semibold",children:"Dev"})]})})]})})]})})]})})}function ga(){return e.jsxs(e.Fragment,{children:[e.jsx(ua,{}),e.jsx(aa,{})]})}const pa="_uploadContainer_1w5i1_1",ma="_dropZone_1w5i1_9",ha="_hasFile_1w5i1_30",fa="_dropZoneIcon_1w5i1_37",xa="_dropZoneText_1w5i1_43",va="_dropZoneSubtext_1w5i1_49",_a="_filePreview_1w5i1_55",ja="_filePreviewImage_1w5i1_64",wa="_fileName_1w5i1_110",Ca="_fileInfo_1w5i1_118",ya="_helpLink_1w5i1_125",Sa="_loadingContainer_1w5i1_145",ba="_loadingText_1w5i1_153",Na="_generateButtonContainer_1w5i1_157",ka="_uploadedMapContainer_1w5i1_165",Ia="_uploadedMapImage_1w5i1_169",Ma="_formGrid_1w5i1_209",La="_titleField_1w5i1_222",Ta="_ratingDescription_1w5i1_230",Da="_ratingSlider_1w5i1_235",Pa="_ratingLabel_1w5i1_242",Ea="_ratingInput_1w5i1_251",Fa="_ratingValue_1w5i1_256",Ra="_submitSection_1w5i1_266",Aa="_successContainer_1w5i1_275",za="_successHeading_1w5i1_280",Oa="_successText_1w5i1_285",$a="_successButton_1w5i1_291",Ba="_viewFullSizeButton_1w5i1_297",Ua="_fullSizeModalOverlay_1w5i1_306",Wa="_lightModalOverlay_1w5i1_320",Ha="_fullSizeModalContent_1w5i1_334",Va="_fullSizeModalHeader_1w5i1_345",Ga="_fullSizeModalImage_1w5i1_361",qa="_confirmSection_1w5i1_398",Ya="_step2Layout_1w5i1_407",Za="_topRow_1w5i1_413",Ka="_ratingHidden_1w5i1_421",Ja="_imageSection_1w5i1_425",Qa="_ratingContent_1w5i1_435",Xa="_mapColumn_1w5i1_453",es="_contentColumn_1w5i1_458",ns="_step2bLayout_1w5i1_465",ts="_metadataSectionCard_1w5i1_562",as="_droneMetadataSection_1w5i1_571",ss="_droneMetadataHeading_1w5i1_577",is="_droneMetadataGrid_1w5i1_585",os="_rtkFixContainer_1w5i1_591",rs="_rtkFixLabel_1w5i1_597",ls="_rtkFixCheckbox_1w5i1_606",cs="_confirmButtonContainer_1w5i1_621",ds="_ratingWarningContent_1w5i1_629",us="_ratingWarningTitle_1w5i1_637",gs="_ratingWarningText_1w5i1_644",ps="_ratingWarningButtons_1w5i1_651",ms="_preprocessingProgress_1w5i1_658",hs="_carouselContainer_1w5i1_711",fs="_carouselImageWrapper_1w5i1_716",xs="_carouselImage_1w5i1_716",vs="_carouselNavigation_1w5i1_739",_s="_carouselButton_1w5i1_751",js="_carouselIndicators_1w5i1_775",ws="_carouselIndicator_1w5i1_775",Cs="_carouselIndicatorActive_1w5i1_804",ys="_viewImageButtonContainer_1w5i1_840",t={uploadContainer:pa,dropZone:ma,hasFile:ha,dropZoneIcon:fa,dropZoneText:xa,dropZoneSubtext:va,filePreview:_a,filePreviewImage:ja,fileName:wa,fileInfo:Ca,helpLink:ya,loadingContainer:Sa,loadingText:ba,generateButtonContainer:Na,uploadedMapContainer:ka,uploadedMapImage:Ia,formGrid:Ma,titleField:La,ratingDescription:Ta,ratingSlider:Da,ratingLabel:Pa,ratingInput:Ea,ratingValue:Fa,submitSection:Ra,successContainer:Aa,successHeading:za,successText:Oa,successButton:$a,viewFullSizeButton:Ba,fullSizeModalOverlay:Ua,lightModalOverlay:Wa,fullSizeModalContent:Ha,fullSizeModalHeader:Va,fullSizeModalImage:Ga,confirmSection:qa,step2Layout:Ya,topRow:Za,ratingHidden:Ka,imageSection:Ja,ratingContent:Qa,mapColumn:Xa,contentColumn:es,step2bLayout:ns,metadataSectionCard:ts,droneMetadataSection:as,droneMetadataHeading:ss,droneMetadataGrid:is,rtkFixContainer:os,rtkFixLabel:rs,rtkFixCheckbox:ls,confirmButtonContainer:cs,ratingWarningContent:ds,ratingWarningTitle:us,ratingWarningText:gs,ratingWarningButtons:ps,preprocessingProgress:ms,carouselContainer:hs,carouselImageWrapper:fs,carouselImage:xs,carouselNavigation:vs,carouselButton:_s,carouselIndicators:js,carouselIndicator:ws,carouselIndicatorActive:Cs,viewImageButtonContainer:ys},Rn=a.createContext(void 0),Ss=({children:i})=>{const[s,o]=a.useState(""),[p,c]=a.useState(""),[d,_]=a.useState(""),[C,S]=a.useState(""),[x,l]=a.useState(""),[b,M]=a.useState(""),[P,j]=a.useState(""),[F,A]=a.useState(!1),L={search:s,srcFilter:p,catFilter:d,regionFilter:C,countryFilter:x,imageTypeFilter:b,uploadTypeFilter:P,showReferenceExamples:F,setSearch:o,setSrcFilter:c,setCatFilter:_,setRegionFilter:S,setCountryFilter:l,setImageTypeFilter:M,setUploadTypeFilter:j,setShowReferenceExamples:A,clearAllFilters:()=>{o(""),c(""),_(""),S(""),l(""),M(""),j(""),A(!1)}};return e.jsx(Rn.Provider,{value:L,children:i})},bs=()=>{const i=a.useContext(Rn);if(i===void 0)throw new Error("useFilterContext must be used within a FilterProvider");return i};function Dn({files:i,file:s,preview:o,imageType:p,onFileChange:c,onRemoveImage:d,onAddImage:_,onImageTypeChange:C,onChangeFile:S}){const x=l=>{l.preventDefault();const b=l.dataTransfer.files?.[0];b&&c(b)};return e.jsxs("div",{className:"space-y-6",children:[e.jsx("p",{className:"text-gray-700 leading-relaxed max-w-2xl mx-auto",children:"This app evaluates how well multimodal AI models analyze and describe crisis maps and drone imagery. Upload an image and the AI will generate a description. Then you can review and rate the result based on your expertise."}),e.jsx("div",{className:t.helpLink,children:e.jsxs(zt,{to:"/help",className:t.helpLink,children:["More ",e.jsx(Zt,{className:"w-3 h-3"})]})}),e.jsx("div",{className:"flex justify-center",children:e.jsx(U,{withInternalPadding:!0,className:"bg-transparent border-none shadow-none",children:e.jsx(Kt,{name:"image-type",value:p,onChange:l=>C(l),options:[{key:"crisis_map",label:"Crisis Maps"},{key:"drone_image",label:"Drone Imagery"}],keySelector:l=>l.key,labelSelector:l=>l.label})})}),e.jsxs("div",{className:`${t.dropZone} ${s?t.hasFile:""}`,onDragOver:l=>l.preventDefault(),onDrop:x,children:[i.length>1?e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-5 gap-4 mb-4",children:i.map((l,b)=>e.jsxs("div",{className:"relative",children:[e.jsx("img",{src:URL.createObjectURL(l),alt:`Image ${b+1}`,className:"w-full h-32 object-cover rounded"}),e.jsx(cn,{name:"remove-image",variant:"tertiary",onClick:()=>d(b),title:"Remove image",ariaLabel:"Remove image",className:"absolute top-2 right-2 bg-white/90 hover:bg-white shadow-md hover:shadow-lg border border-gray-200 hover:border-red-300 transition-all duration-200 backdrop-blur-sm",children:e.jsx(dn,{className:"w-4 h-4"})}),e.jsx("div",{className:"text-xs text-center mt-1",children:l.name})]},b))}):s&&o?e.jsxs("div",{className:t.filePreview,children:[e.jsx("div",{className:t.filePreviewImage,children:e.jsx("img",{src:o,alt:"File preview"})}),e.jsx("p",{className:t.fileName,children:s.name}),e.jsxs("p",{className:t.fileInfo,children:[(s.size/1024/1024).toFixed(2)," MB"]})]}):e.jsxs(e.Fragment,{children:[e.jsx(Fn,{className:t.dropZoneIcon}),e.jsx("p",{className:t.dropZoneText,children:"Drag & Drop any file here"}),e.jsx("p",{className:t.dropZoneSubtext,children:"or"})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("label",{className:"inline-block cursor-pointer",children:[e.jsx("input",{type:"file",className:"sr-only",accept:".jpg,.jpeg,.png,.tiff,.tif,.heic,.heif,.webp,.gif,.pdf",onChange:l=>{s&&S?S(l.target.files?.[0]):c(l.target.files?.[0])}}),e.jsx(w,{name:"upload",variant:"secondary",size:1,onClick:()=>document.querySelector('input[type="file"]')?.click(),children:s?"Change Image":"Browse Files"})]}),s&&i.length<5&&e.jsx(w,{name:"add-image",variant:"secondary",size:1,onClick:_,children:"Add Image"})]})]})]})}function Pn({files:i,imageUrl:s,preview:o,onViewFullSize:p,currentImageIndex:c=0,onGoToPrevious:d,onGoToNext:_,onGoToImage:C,showCarousel:S=!1}){return S&&i.length>1?e.jsx(U,{heading:"Uploaded Images",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:e.jsxs("div",{className:t.carouselContainer,children:[e.jsx("div",{className:t.carouselImageWrapper,children:i[c]?e.jsx("img",{src:URL.createObjectURL(i[c]),alt:`Image ${c+1}`,className:t.carouselImage}):e.jsx("div",{className:t.imagePlaceholder,children:"No image available"})}),e.jsxs("div",{className:t.carouselNavigation,children:[e.jsx(w,{name:"previous-image",variant:"tertiary",size:1,onClick:d,className:t.carouselButton,children:e.jsx(Jt,{className:"w-4 h-4"})}),e.jsx("div",{className:t.carouselIndicators,children:i.map((x,l)=>e.jsx("button",{onClick:()=>C?.(l),className:`${t.carouselIndicator} ${l===c?t.carouselIndicatorActive:""}`,children:l+1},l))}),e.jsx(w,{name:"next-image",variant:"tertiary",size:1,onClick:_,className:t.carouselButton,children:e.jsx(Qt,{className:"w-4 h-4"})})]}),e.jsx("div",{className:t.viewImageButtonContainer,children:e.jsx(w,{name:"view-full-size-carousel",variant:"secondary",size:1,onClick:()=>p({file:i[c],index:c}),disabled:!i[c],children:"View Image"})})]})}):i.length>1?e.jsx("div",{className:"space-y-6",children:i.map((x,l)=>e.jsx(U,{heading:`Image ${l+1}: ${x.name}`,headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:e.jsxs("div",{className:t.uploadedMapContainer,children:[e.jsx("div",{className:t.uploadedMapImage,children:e.jsx("img",{src:URL.createObjectURL(x),alt:`Image ${l+1}`})}),e.jsx("div",{className:t.viewFullSizeButton,children:e.jsx(w,{name:`view-full-size-${l}`,variant:"secondary",size:1,onClick:()=>p({file:x,index:l}),children:"View Image"})})]})},l))}):e.jsx(U,{heading:"Uploaded Image",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:e.jsxs("div",{className:t.uploadedMapContainer,children:[e.jsx("div",{className:t.uploadedMapImage,children:e.jsx("img",{src:s||o||void 0,alt:"Uploaded image preview"})}),e.jsx("div",{className:t.viewFullSizeButton,children:e.jsx(w,{name:"view-full-size",variant:"secondary",size:1,onClick:()=>p(),children:"View Image"})})]})})}function Ns({files:i,imageType:s,title:o,source:p,eventType:c,epsg:d,countries:_,centerLon:C,centerLat:S,amslM:x,aglM:l,headingDeg:b,yawDeg:M,pitchDeg:P,rollDeg:j,rtkFix:F,stdHM:A,stdVM:z,metadataArray:L,sources:G,types:q,spatialReferences:Y,imageTypes:R,countriesOptions:Q,onTitleChange:Z,onSourceChange:ae,onEventTypeChange:K,onEpsgChange:se,onCountriesChange:ie,onCenterLonChange:oe,onCenterLatChange:re,onAmslMChange:le,onAglMChange:ce,onHeadingDegChange:de,onYawDegChange:ue,onPitchDegChange:ge,onRollDegChange:pe,onRtkFixChange:me,onStdHMChange:he,onStdVMChange:fe,onImageTypeChange:xe,updateMetadataForImage:E}){return i.length>1?e.jsxs("div",{children:[e.jsx("div",{className:"mb-4",children:e.jsx(D,{label:"Shared Title",name:"title",value:o,onChange:Z,placeholder:"Enter a title for all images...",required:!0})}),i.map((N,m)=>e.jsx("div",{className:"mb-6",children:e.jsx(U,{heading:`Image ${m+1}: ${N.name}`,headingLevel:4,withHeaderBorder:!0,withInternalPadding:!0,children:e.jsxs("div",{className:t.formGrid,children:[s!=="drone_image"&&e.jsx(J,{label:"Source",name:`source_${m}`,value:L[m]?.source||"",onChange:h=>E(m,"source",h),options:G,keySelector:h=>h.s_code,labelSelector:h=>h.label,required:!0}),e.jsx(J,{label:"Event Type",name:`event_type_${m}`,value:L[m]?.eventType||"",onChange:h=>E(m,"eventType",h),options:q,keySelector:h=>h.t_code,labelSelector:h=>h.label,required:s!=="drone_image"}),e.jsx(J,{label:"EPSG",name:`epsg_${m}`,value:L[m]?.epsg||"",onChange:h=>E(m,"epsg",h),options:Y,keySelector:h=>h.epsg,labelSelector:h=>`${h.srid} (EPSG:${h.epsg})`,placeholder:"EPSG",required:s!=="drone_image"}),e.jsx(Ln,{label:"Countries (optional)",name:`countries_${m}`,value:L[m]?.countries||[],onChange:h=>E(m,"countries",h),options:Q,keySelector:h=>h.c_code,labelSelector:h=>h.label,placeholder:"Select one or more"}),s==="drone_image"&&e.jsx(e.Fragment,{children:e.jsxs("div",{className:t.droneMetadataSection,children:[e.jsx("h4",{className:t.droneMetadataHeading,children:"Drone Flight Data"}),e.jsxs("div",{className:t.droneMetadataGrid,children:[e.jsx(D,{label:"Center Longitude",name:`center_lon_${m}`,value:L[m]?.centerLon||"",onChange:h=>E(m,"centerLon",h),placeholder:"e.g., -122.4194",step:"any"}),e.jsx(D,{label:"Center Latitude",name:`center_lat_${m}`,value:L[m]?.centerLat||"",onChange:h=>E(m,"centerLat",h),placeholder:"e.g., 37.7749",step:"any"}),e.jsx(D,{label:"Altitude AMSL (m)",name:`amsl_m_${m}`,value:L[m]?.amslM||"",onChange:h=>E(m,"amslM",h),placeholder:"e.g., 100.5",step:"any"}),e.jsx(D,{label:"Altitude AGL (m)",name:`agl_m_${m}`,value:L[m]?.aglM||"",onChange:h=>E(m,"aglM",h),placeholder:"e.g., 50.2",step:"any"}),e.jsx(D,{label:"Heading (degrees)",name:`heading_deg_${m}`,value:L[m]?.headingDeg||"",onChange:h=>E(m,"headingDeg",h),placeholder:"e.g., 180.0",step:"any"}),e.jsx(D,{label:"Yaw (degrees)",name:`yaw_deg_${m}`,value:L[m]?.yawDeg||"",onChange:h=>E(m,"yawDeg",h),placeholder:"e.g., 90.0",step:"any"}),e.jsx(D,{label:"Pitch (degrees)",name:`pitch_deg_${m}`,value:L[m]?.pitchDeg||"",onChange:h=>E(m,"pitchDeg",h),placeholder:"e.g., 0.0",step:"any"}),e.jsx(D,{label:"Roll (degrees)",name:`roll_deg_${m}`,value:L[m]?.rollDeg||"",onChange:h=>E(m,"rollDeg",h),placeholder:"e.g., 0.0",step:"any"}),e.jsx("div",{className:t.rtkFixContainer,children:e.jsxs("label",{className:t.rtkFixLabel,children:[e.jsx("input",{type:"checkbox",checked:L[m]?.rtkFix||!1,onChange:h=>E(m,"rtkFix",h.target.checked),className:t.rtkFixCheckbox}),"RTK Fix Available"]})}),e.jsx(D,{label:"Horizontal Std Dev (m)",name:`std_h_m_${m}`,value:L[m]?.stdHM||"",onChange:h=>E(m,"stdHM",h),placeholder:"e.g., 0.1",step:"any"}),e.jsx(D,{label:"Vertical Std Dev (m)",name:`std_v_m_${m}`,value:L[m]?.stdVM||"",onChange:h=>E(m,"stdVM",h),placeholder:"e.g., 0.2",step:"any"})]})]})})]})})},m))]}):e.jsxs("div",{className:t.formGrid,children:[e.jsx("div",{className:t.titleField,children:e.jsx(D,{label:"Title",name:"title",value:o,onChange:Z,placeholder:"Enter a title for this map...",required:!0})}),s!=="drone_image"&&e.jsx(J,{label:"Source",name:"source",value:p,onChange:ae,options:G,keySelector:N=>N.s_code,labelSelector:N=>N.label,required:!0}),e.jsx(J,{label:"Event Type",name:"event_type",value:c,onChange:K,options:q,keySelector:N=>N.t_code,labelSelector:N=>N.label,required:s!=="drone_image"}),e.jsx(J,{label:"EPSG",name:"epsg",value:d,onChange:se,options:Y,keySelector:N=>N.epsg,labelSelector:N=>`${N.srid} (EPSG:${N.epsg})`,placeholder:"EPSG",required:s!=="drone_image"}),e.jsx(J,{label:"Image Type",name:"image_type",value:s,onChange:xe,options:R,keySelector:N=>N.image_type,labelSelector:N=>N.label,required:!0}),e.jsx(Ln,{label:"Countries (optional)",name:"countries",value:_,onChange:ie,options:Q,keySelector:N=>N.c_code,labelSelector:N=>N.label,placeholder:"Select one or more"}),s==="drone_image"&&e.jsx(e.Fragment,{children:e.jsxs("div",{className:t.droneMetadataSection,children:[e.jsx("h4",{className:t.droneMetadataHeading,children:"Drone Flight Data"}),e.jsxs("div",{className:t.droneMetadataGrid,children:[e.jsx(D,{label:"Center Longitude",name:"center_lon",value:C,onChange:oe,placeholder:"e.g., -122.4194",step:"any"}),e.jsx(D,{label:"Center Latitude",name:"center_lat",value:S,onChange:re,placeholder:"e.g., 37.7749",step:"any"}),e.jsx(D,{label:"Altitude AMSL (m)",name:"amsl_m",value:x,onChange:le,placeholder:"e.g., 100.5",step:"any"}),e.jsx(D,{label:"Altitude AGL (m)",name:"agl_m",value:l,onChange:ce,placeholder:"e.g., 50.2",step:"any"}),e.jsx(D,{label:"Heading (degrees)",name:"heading_deg",value:b,onChange:de,placeholder:"e.g., 180.0",step:"any"}),e.jsx(D,{label:"Yaw (degrees)",name:"yaw_deg",value:M,onChange:ue,placeholder:"e.g., 90.0",step:"any"}),e.jsx(D,{label:"Pitch (degrees)",name:"pitch_deg",value:P,onChange:ge,placeholder:"e.g., 0.0",step:"any"}),e.jsx(D,{label:"Roll (degrees)",name:"roll_deg",value:j,onChange:pe,placeholder:"e.g., 0.0",step:"any"}),e.jsx("div",{className:t.rtkFixContainer,children:e.jsxs("label",{className:t.rtkFixLabel,children:[e.jsx("input",{type:"checkbox",checked:F,onChange:N=>me(N.target.checked),className:t.rtkFixCheckbox}),"RTK Fix Available"]})}),e.jsx(D,{label:"Horizontal Std Dev (m)",name:"std_h_m",value:A,onChange:he,placeholder:"e.g., 0.1",step:"any"}),e.jsx(D,{label:"Vertical Std Dev (m)",name:"std_v_m",value:z,onChange:fe,placeholder:"e.g., 0.2",step:"any"})]})]})})]})}function ks({isPerformanceConfirmed:i,scores:s,onScoreChange:o,onConfirmRatings:p,onEditRatings:c}){return i?null:e.jsx(U,{heading:"AI Performance Rating",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:e.jsxs("div",{className:t.ratingContent,children:[e.jsx("p",{className:t.ratingDescription,children:"How well did the AI perform on the task?"}),["accuracy","context","usability"].map(d=>e.jsxs("div",{className:t.ratingSlider,children:[e.jsx("label",{className:t.ratingLabel,children:d}),e.jsx("input",{type:"range",min:0,max:100,value:s[d],onChange:_=>o(d,Number(_.target.value)),className:t.ratingInput}),e.jsx("span",{className:t.ratingValue,children:s[d]})]},d)),e.jsx("div",{className:t.confirmButtonContainer,children:e.jsx(w,{name:"confirm-ratings",variant:"secondary",onClick:p,children:"Confirm Ratings"})})]})})}function Is({description:i,analysis:s,recommendedActions:o,onDescriptionChange:p,onAnalysisChange:c,onRecommendedActionsChange:d,onBack:_,onDelete:C,onSubmit:S,onEditRatings:x,isPerformanceConfirmed:l=!1}){const b=M=>{if(M){const P=M.split(` +`),j=P.findIndex(z=>z.startsWith("Description:")),F=P.findIndex(z=>z.startsWith("Analysis:")),A=P.findIndex(z=>z.startsWith("Recommended Actions:"));j!==-1&&F!==-1&&A!==-1&&(p(P.slice(j+1,F).join(` +`).trim()),c(P.slice(F+1,A).join(` +`).trim()),d(P.slice(A+1).join(` +`).trim()))}};return e.jsxs(U,{heading:"Generated Text",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:[e.jsx("div",{className:"text-left space-y-4",children:e.jsx("div",{children:e.jsx(Xt,{name:"generatedContent",value:`Description: +${i||"AI-generated description will appear here..."} + +Analysis: +${s||"AI-generated analysis will appear here..."} + +Recommended Actions: +${o||"AI-generated recommended actions will appear here..."}`,onChange:b,rows:12,placeholder:"AI-generated content will appear here..."})})}),e.jsxs("div",{className:t.submitSection,children:[e.jsx(w,{name:"back",variant:"secondary",onClick:_,children:"Back"}),l&&x&&e.jsx(w,{name:"edit-ratings",variant:"secondary",onClick:x,children:"Edit Ratings"}),e.jsx(cn,{name:"delete",variant:"tertiary",onClick:C,title:"Delete",ariaLabel:"Delete uploaded image",children:e.jsx(dn,{})}),e.jsx(w,{name:"submit",onClick:S,children:"Submit"})]})]})}function Ms({isOpen:i,imageUrl:s,preview:o,selectedImageData:p,onClose:c}){if(!i)return null;let d,_;return p?(d=URL.createObjectURL(p.file),_=`Image ${p.index+1}: ${p.file.name}`):(d=s||o||void 0,_="Full size map"),e.jsx("div",{className:t.fullSizeModalOverlay,onClick:c,children:e.jsxs("div",{className:t.fullSizeModalContent,onClick:C=>C.stopPropagation(),children:[e.jsx("div",{className:t.fullSizeModalHeader,children:e.jsx(w,{name:"close-modal",variant:"tertiary",size:1,onClick:c,children:"✕"})}),e.jsx("div",{className:t.fullSizeModalImage,children:e.jsx("img",{src:d,alt:_})})]})})}function Ls({isOpen:i,onClose:s}){return i?e.jsx("div",{className:t.fullSizeModalOverlay,onClick:s,children:e.jsx("div",{className:t.fullSizeModalContent,onClick:o=>o.stopPropagation(),children:e.jsxs("div",{className:t.ratingWarningContent,children:[e.jsx("h3",{className:t.ratingWarningTitle,children:"Please Confirm Your Ratings"}),e.jsx("p",{className:t.ratingWarningText,children:'You must confirm your performance ratings before submitting. Please go back to the rating section and click "Confirm Ratings".'}),e.jsx("div",{className:t.ratingWarningButtons,children:e.jsx(w,{name:"close-warning",variant:"secondary",onClick:s,children:"Close"})})]})})}):null}function Ts({isOpen:i,onConfirm:s,onCancel:o}){return i?e.jsx("div",{className:t.fullSizeModalOverlay,onClick:o,children:e.jsx("div",{className:t.fullSizeModalContent,onClick:p=>p.stopPropagation(),children:e.jsxs("div",{className:t.ratingWarningContent,children:[e.jsx("h3",{className:t.ratingWarningTitle,children:"Delete Image?"}),e.jsx("p",{className:t.ratingWarningText,children:"This action cannot be undone. Are you sure you want to delete this uploaded image?"}),e.jsxs("div",{className:t.ratingWarningButtons,children:[e.jsx(w,{name:"confirm-delete",variant:"secondary",onClick:s,children:"Delete"}),e.jsx(w,{name:"cancel-delete",variant:"tertiary",onClick:o,children:"Cancel"})]})]})})}):null}function Ds({isOpen:i,onConfirm:s,onCancel:o}){return i?e.jsx("div",{className:t.fullSizeModalOverlay,onClick:o,children:e.jsx("div",{className:t.fullSizeModalContent,onClick:p=>p.stopPropagation(),children:e.jsxs("div",{className:t.ratingWarningContent,children:[e.jsx("h3",{className:t.ratingWarningTitle,children:"Leave Page?"}),e.jsx("p",{className:t.ratingWarningText,children:"Your uploaded image will be deleted if you leave this page. Are you sure you want to continue?"}),e.jsxs("div",{className:t.ratingWarningButtons,children:[e.jsx(w,{name:"confirm-navigation",variant:"secondary",onClick:s,children:"Leave Page"}),e.jsx(w,{name:"cancel-navigation",variant:"tertiary",onClick:o,children:"Stay"})]})]})})}):null}function Ps({isOpen:i,fallbackInfo:s,onClose:o}){return!i||!s?null:e.jsx("div",{className:t.fullSizeModalOverlay,onClick:o,children:e.jsx("div",{className:t.fullSizeModalContent,onClick:p=>p.stopPropagation(),children:e.jsxs("div",{className:t.ratingWarningContent,children:[e.jsx("h3",{className:t.ratingWarningTitle,children:"Model Changed"}),e.jsxs("p",{className:t.ratingWarningText,children:[s.originalModel," is currently unavailable. We've automatically switched to ",s.fallbackModel," to complete your request."]}),e.jsx("div",{className:t.ratingWarningButtons,children:e.jsx(w,{name:"close-fallback",variant:"secondary",onClick:o,children:"Got it"})})]})})})}function Es({isOpen:i,preprocessingInfo:s,onClose:o}){return!i||!s?null:e.jsx("div",{className:t.fullSizeModalOverlay,onClick:o,children:e.jsx("div",{className:t.fullSizeModalContent,onClick:p=>p.stopPropagation(),children:e.jsxs("div",{className:t.ratingWarningContent,children:[e.jsx("h3",{className:t.ratingWarningTitle,children:"File Converted"}),e.jsxs("p",{className:t.ratingWarningText,children:["Your file ",e.jsx("strong",{children:s.original_filename})," has been converted from",e.jsxs("strong",{children:[" ",s.original_mime_type]})," to",e.jsxs("strong",{children:[" ",s.processed_mime_type]})," for optimal processing.",e.jsx("br",{}),e.jsx("br",{}),"This conversion ensures your file is in the best format for our AI models to analyze."]}),e.jsx("div",{className:t.ratingWarningButtons,children:e.jsx(w,{name:"close-preprocessing",variant:"secondary",onClick:o,children:"Got it"})})]})})})}function Fs({isOpen:i,preprocessingFile:s,isPreprocessing:o,preprocessingProgress:p,onConfirm:c,onCancel:d}){return i?e.jsx("div",{className:t.fullSizeModalOverlay,onClick:o?void 0:d,children:e.jsx("div",{className:t.fullSizeModalContent,onClick:_=>_.stopPropagation(),children:e.jsxs("div",{className:t.ratingWarningContent,children:[e.jsx("h3",{className:t.ratingWarningTitle,children:"File Conversion Required"}),e.jsx("p",{className:t.ratingWarningText,children:"The file you selected will be converted to PNG format. This ensures optimal compatibility and processing by our AI models."}),!o&&e.jsxs("div",{className:t.ratingWarningButtons,children:[e.jsx(w,{name:"confirm-preprocessing",variant:"secondary",onClick:c,children:"Convert File"}),e.jsx(w,{name:"cancel-preprocessing",variant:"tertiary",onClick:d,children:"Cancel"})]}),o&&e.jsxs("div",{className:t.preprocessingProgress,children:[e.jsx("p",{children:p}),e.jsx(rn,{className:"text-ifrcRed"})]})]})})}):null}function Rs({isOpen:i,unsupportedFile:s,onClose:o}){return!i||!s?null:e.jsx("div",{className:t.fullSizeModalOverlay,onClick:o,children:e.jsx("div",{className:t.fullSizeModalContent,onClick:p=>p.stopPropagation(),children:e.jsxs("div",{className:t.ratingWarningContent,children:[e.jsx("h3",{className:t.ratingWarningTitle,children:"Unsupported File Format"}),e.jsxs("p",{className:t.ratingWarningText,children:["The file ",e.jsx("strong",{children:s.name})," is not supported for upload.",e.jsx("br",{}),e.jsx("br",{}),e.jsx("strong",{children:"Supported formats:"}),e.jsx("br",{}),"• Images: JPEG, PNG, TIFF, HEIC, WebP, GIF",e.jsx("br",{}),"• Documents: PDF (will be converted to image)",e.jsx("br",{}),e.jsx("br",{}),e.jsx("strong",{children:"Recommendation:"})," Convert your file to JPEG or PNG format for best compatibility."]}),e.jsx("div",{className:t.ratingWarningButtons,children:e.jsx(w,{name:"close-unsupported",variant:"secondary",onClick:o,children:"Got it"})})]})})})}function As({isOpen:i,oversizedFile:s,onClose:o,onCancel:p}){return!i||!s?null:e.jsx("div",{className:t.lightModalOverlay,onClick:p,children:e.jsx("div",{className:t.fullSizeModalContent,onClick:c=>c.stopPropagation(),children:e.jsxs("div",{className:t.ratingWarningContent,children:[e.jsx("h3",{className:t.ratingWarningTitle,children:"File Size Warning"}),e.jsxs("p",{className:t.ratingWarningText,children:["The file ",e.jsx("strong",{children:s.name})," is large (",(s.size/(1024*1024)).toFixed(1),"MB).",e.jsx("br",{}),e.jsx("br",{}),e.jsx("strong",{children:"Warning:"})," This file size might exceed the limits of the AI models we use.",e.jsx("br",{}),e.jsx("br",{}),"You can still proceed, but consider using a smaller file if you encounter issues."]}),e.jsxs("div",{className:t.ratingWarningButtons,children:[e.jsx(w,{name:"continue-size-warning",variant:"secondary",onClick:o,children:"Continue"}),e.jsx(w,{name:"cancel-size-warning",variant:"tertiary",onClick:p,children:"Cancel"})]})]})})})}const Ee="selectedVlmModel";function En(){const[i]=Ot(),s=un(),[o,p]=a.useState(1),[c,d]=a.useState(!1),[_,C]=a.useState(!1),S=a.useRef(o),x=a.useRef(null),[l,b]=a.useState(null),[M,P]=a.useState(null),[j,F]=a.useState([]),[A,z]=a.useState(""),[L,G]=a.useState(""),[q,Y]=a.useState(""),[R,Q]=a.useState("crisis_map"),[Z,ae]=a.useState([]),[K,se]=a.useState(""),[ie,oe]=a.useState(""),[re,le]=a.useState(""),[ce,de]=a.useState(""),[ue,ge]=a.useState(""),[pe,me]=a.useState(""),[he,fe]=a.useState(""),[xe,E]=a.useState(""),[N,m]=a.useState(""),[h,Fe]=a.useState(!1),[Re,Ae]=a.useState(""),[ze,Oe]=a.useState(""),[$e,Se]=a.useState([]),[An,zn]=a.useState([]),[On,$n]=a.useState([]),[Bn,Un]=a.useState([]),[Wn,Hn]=a.useState([]),[Vn,Gn]=a.useState([]),[W,be]=a.useState(null),[Be,X]=a.useState([]),[Ne,gn]=a.useState(null),[qn,pn]=a.useState(""),[mn,Ue]=a.useState(""),[hn,We]=a.useState(""),[fn,He]=a.useState(""),[ke,xn]=a.useState({accuracy:50,context:50,usability:50}),[Yn,Ve]=a.useState(!1),[Zn,Ge]=a.useState(null),[ve,Ie]=a.useState(!1),[Kn,vn]=a.useState(!1),[Jn,qe]=a.useState(!1),[Qn,Me]=a.useState(!1),[Ye,Ze]=a.useState(null),[Xn,Ke]=a.useState(!1),[et,_n]=a.useState(null),[nt,Je]=a.useState(!1),[tt,jn]=a.useState(null),[at,ee]=a.useState(!1),[Qe,ne]=a.useState(null),[st,_e]=a.useState(!1),[it,H]=a.useState(""),[ot,Le]=a.useState(!1),[rt,Xe]=a.useState(null),[lt,je]=a.useState(!1),[ct,en]=a.useState(null),[dt,Te]=a.useState(0);S.current=o,x.current=W;const ut=n=>z(n||""),gt=n=>G(n||""),pt=n=>Y(n||""),nn=n=>Q(n||""),mt=n=>ae(Array.isArray(n)?n:[]),ht=n=>oe(n||""),ft=n=>le(n||""),xt=n=>de(n||""),vt=n=>ge(n||""),_t=n=>me(n||""),jt=n=>fe(n||""),wt=n=>E(n||""),Ct=n=>m(n||""),yt=n=>Fe(n||!1),St=n=>Ae(n||""),bt=n=>Oe(n||""),De=n=>p(n),Nt=a.useCallback(()=>{j.length>1&&Te(n=>n>0?n-1:j.length-1)},[j.length]),kt=a.useCallback(()=>{j.length>1&&Te(n=>n{n>=0&&n{if(j.length<5){const n=document.createElement("input");n.type="file",n.accept=".jpg,.jpeg,.png,.tiff,.tif,.heic,.heif,.webp,.gif,.pdf",n.onchange=f=>{const u=f.target;if(u.files&&u.files[0]){const g=u.files[0];tn(g)}},n.click()}},Cn=n=>{F(f=>{const u=f.filter((g,r)=>r!==n);return u.length===1?P(u[0]):u.length===0&&P(null),u}),Se(f=>f.filter((u,g)=>g!==n))},Mt=(n,f,u)=>{Se(g=>{const r=[...g];return r[n]||(r[n]={source:"",eventType:"",epsg:"",countries:[],centerLon:"",centerLat:"",amslM:"",aglM:"",headingDeg:"",yawDeg:"",pitchDeg:"",rollDeg:"",rtkFix:!1,stdHM:"",stdVM:""}),r[n]={...r[n],[f]:u},r})},yn=n=>{const f=["image/jpeg","image/jpg","image/png"],u=[".jpg",".jpeg",".png"];let g=!f.includes(n.type);if(!g&&n.name){const r=n.name.toLowerCase().substring(n.name.lastIndexOf("."));g=!u.includes(r)}return g},Sn=n=>{const f=["text/html","text/css","application/javascript","application/json","text/plain","application/xml","text/xml","application/zip","application/x-zip-compressed","application/x-rar-compressed","application/x-7z-compressed","audio/","video/","text/csv","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.ms-powerpoint","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"];for(const u of f)if(n.type.startsWith(u))return!0;if(n.name){const u=n.name.toLowerCase().substring(n.name.lastIndexOf("."));if([".html",".htm",".css",".js",".json",".txt",".xml",".zip",".rar",".7z",".csv",".xlsx",".xls",".pptx",".ppt",".docx",".doc",".mp3",".mp4",".avi",".mov"].includes(u))return!0}return!1},tn=n=>{if(n){if(console.log("File selected:",n.name,"Type:",n.type,"Size:",n.size),n.size/(1024*1024)>5&&(console.log("File too large, showing size warning modal"),en(n),je(!0)),Sn(n)){console.log("File format not supported at all, showing unsupported format modal"),Xe(n),Le(!0);return}yn(n)?(console.log("File needs preprocessing, showing modal"),ne(n),ee(!0)):(console.log("File does not need preprocessing, setting directly"),j.length===0?(P(n),F([n])):F(u=>[...u,n]))}},bn=n=>{if(n){if(console.log("File changed:",n.name,"Type:",n.type,"Size:",n.size),n.size/(1024*1024)>5&&(console.log("File too large, showing size warning modal"),en(n),je(!0)),Sn(n)){console.log("File format not supported at all, showing unsupported format modal"),Xe(n),Le(!0);return}yn(n)?(console.log("File needs preprocessing, showing modal"),ne(n),ee(!0)):(console.log("File does not need preprocessing, replacing last file"),j.length>1?(F(u=>{const g=[...u];return g[g.length-1]=n,g}),j.length===1&&P(n)):(P(n),F([n])))}};async function we(n){const f=await n.text();try{return f?JSON.parse(f):{}}catch{return{error:f}}}function an(n,f){const u=n instanceof Error?n.message:`Failed to ${f.toLowerCase()}`;alert(u)}async function Nn(){if(j.length!==0){d(!0);try{j.length===1?await Lt():await Tt()}catch(n){an(n,"Upload")}finally{d(!1)}}}async function Lt(){console.log("DEBUG: Starting single image upload");const n=new FormData;n.append("file",j[0]),n.append("title",K),n.append("image_type",R),A&&n.append("source",A),L&&n.append("event_type",L),q&&n.append("epsg",q),Z.length>0&&Z.forEach(r=>n.append("countries",r)),R==="drone_image"&&(ie&&n.append("center_lon",ie),re&&n.append("center_lat",re),ce&&n.append("amsl_m",ce),ue&&n.append("agl_m",ue),pe&&n.append("heading_deg",pe),he&&n.append("yaw_deg",he),xe&&n.append("pitch_deg",xe),N&&n.append("roll_deg",N),h&&n.append("rtk_fix",h.toString()),Re&&n.append("std_h_m",Re),ze&&n.append("std_v_m",ze));const f=localStorage.getItem(Ee);f&&n.append("model_name",f);const u=await fetch("/api/images/",{method:"POST",body:n}),g=await we(u);if(!u.ok)throw new Error(g.error||"Upload failed");console.log("DEBUG: Single upload response:",g),await kn(g,!1)}async function Tt(){console.log("DEBUG: Starting multi-image upload");const n=new FormData;j.forEach(r=>n.append("files",r)),n.append("title",K),n.append("image_type",R),$e.forEach((r,v)=>{r.source&&n.append(`source_${v}`,r.source),r.eventType&&n.append(`event_type_${v}`,r.eventType),r.epsg&&n.append(`epsg_${v}`,r.epsg),r.countries.length>0&&r.countries.forEach(T=>n.append(`countries_${v}`,T)),R==="drone_image"&&(r.centerLon&&n.append(`center_lon_${v}`,r.centerLon),r.centerLat&&n.append(`center_lat_${v}`,r.centerLat),r.amslM&&n.append(`amsl_m_${v}`,r.amslM),r.aglM&&n.append(`agl_m_${v}`,r.aglM),r.headingDeg&&n.append(`heading_deg_${v}`,r.headingDeg),r.yawDeg&&n.append(`yaw_deg_${v}`,r.yawDeg),r.pitchDeg&&n.append(`pitch_deg_${v}`,r.pitchDeg),r.rollDeg&&n.append(`roll_deg_${v}`,r.rollDeg),r.rtkFix&&n.append(`rtk_fix_${v}`,r.rtkFix.toString()),r.stdHM&&n.append(`std_h_m_${v}`,r.stdHM),r.stdVM&&n.append(`std_v_m_${v}`,r.stdVM))});const f=localStorage.getItem(Ee);f&&n.append("model_name",f);const u=await fetch("/api/images/multi",{method:"POST",body:n}),g=await we(u);if(!u.ok)throw new Error(g.error||"Upload failed");console.log("DEBUG: Multi upload response:",g),await kn(g,!0)}async function kn(n,f){gn(n.image_url),n.preprocessing_info&&typeof n.preprocessing_info=="object"&&"was_preprocessed"in n.preprocessing_info&&n.preprocessing_info.was_preprocessed===!0&&(jn(n.preprocessing_info),Je(!0));const u=n.image_id;if(!u)throw new Error("Upload failed: image_id not found");if(be(u),f)if(n.image_ids&&Array.isArray(n.image_ids)){const y=n.image_ids;console.log("DEBUG: Storing image IDs for multi-upload:",y),X(y)}else console.log("DEBUG: Multi-upload but no image_ids found, using single ID"),X([u]);else console.log("DEBUG: Storing single image ID:",u),X([u]);const g=n,r=g.raw_json?.fallback_info;r&&(_n({originalModel:r.original_model,fallbackModel:r.fallback_model,reason:r.reason}),Ke(!0));const v=g.raw_json?.metadata;if(v){const y=v.metadata||v;if(y&&typeof y=="object"){const O=[];if(f){const k=y.metadata_images;if(k&&typeof k=="object")for(let $=1;$<=j.length;$++){const Ce=`image${$}`,sn=k[Ce];if(sn&&typeof sn=="object"){const ye=sn;O.push({source:ye.source||"",eventType:ye.type||"",epsg:ye.epsg||"",countries:Array.isArray(ye.countries)?ye.countries:[],centerLon:"",centerLat:"",amslM:"",aglM:"",headingDeg:"",yawDeg:"",pitchDeg:"",rollDeg:"",rtkFix:!1,stdHM:"",stdVM:""})}else O.push({source:"",eventType:"",epsg:"",countries:[],centerLon:"",centerLat:"",amslM:"",aglM:"",headingDeg:"",yawDeg:"",pitchDeg:"",rollDeg:"",rtkFix:!1,stdHM:"",stdVM:""})}else{const $={source:y.source||"",eventType:y.type||"",epsg:y.epsg||"",countries:Array.isArray(y.countries)?y.countries:[],centerLon:"",centerLat:"",amslM:"",aglM:"",headingDeg:"",yawDeg:"",pitchDeg:"",rollDeg:"",rtkFix:!1,stdHM:"",stdVM:""};for(let Ce=0;Ce0){const k=O[0];if(y&&typeof y=="object"){const $=y.title;$&&se($||"")}z(k.source||""),G(k.eventType||""),Y(k.epsg||""),ae(k.countries||[]),R==="drone_image"&&(oe(k.centerLon||""),le(k.centerLat||""),de(k.amslM||""),ge(k.aglM||""),me(k.headingDeg||""),fe(k.yawDeg||""),E(k.pitchDeg||""),m(k.rollDeg||""),Fe(k.rtkFix||!1),Ae(k.stdHM||""),Oe(k.stdVM||""))}}}const T=g.raw_json?.metadata;T&&(T.description&&Ue(T.description),T.analysis&&We(T.analysis),T.recommended_actions&&He(T.recommended_actions)),g.generated&&pn(g.generated),De("2a")}async function Dt(){if(console.log("handleSubmit called with:",{uploadedImageId:W,title:K,draft:qn}),!W)return alert("No image to submit");if(!ve){vn(!0);return}try{const n=Be.length>0?Be:[W];console.log("DEBUG: Submit - Using image IDs:",n),console.log("DEBUG: Submit - uploadedImageIds:",Be),console.log("DEBUG: Submit - uploadedImageId:",W);for(let v=0;v{Ie(!1),p(1),P(null),F([]),b(null),be(null),X([]),gn(null),se(""),z(""),G(""),Y(""),ae([]),oe(""),le(""),de(""),ge(""),me(""),fe(""),E(""),m(""),Fe(!1),Ae(""),Oe(""),xn({accuracy:50,context:50,usability:50}),pn(""),Ue(""),We(""),He(""),Se([]),Ke(!1),_n(null),Je(!1),jn(null),ee(!1),ne(null),_e(!1),H(""),Le(!1),Xe(null),je(!1),en(null),s("/upload",{replace:!0})},Pe=a.useCallback(n=>{n==="/upload"||n==="/"||(x.current?(Ze(n),Me(!0)):s(n))},[s]);async function Et(){if(Ye&&x.current)try{await fetch(`/api/images/${x.current}`,{method:"DELETE"}),Me(!1),Ze(null),s(Ye)}catch(n){console.error("Failed to delete image before navigation:",n),Me(!1),Ze(null),s(Ye)}}const Ft=async()=>{if(Qe){_e(!0),H("Starting file conversion...");try{const n=new FormData;n.append("file",Qe),n.append("preprocess_only","true"),H("Converting file format...");const f=await fetch("/api/images/preprocess",{method:"POST",body:n});if(!f.ok)throw new Error("Preprocessing failed");const u=await f.json();H("Finalizing conversion...");const g=atob(u.processed_content),r=new Uint8Array(g.length);for(let y=0;y[...y,v]),b(T),H("Conversion complete!"),setTimeout(()=>{ee(!1),ne(null),_e(!1),H("")},1e3)}catch(n){console.error("Preprocessing error:",n),H("Conversion failed. Please try again."),setTimeout(()=>{ee(!1),ne(null),_e(!1),H("")},2e3)}}},Rt=()=>{ee(!1),ne(null),_e(!1),H("")},At=async n=>{C(!0);try{const f=n.map(async v=>{const T=await fetch(`/api/images/${v}`);if(!T.ok)throw new Error(`Failed to fetch image ${v}`);const y=await T.json(),O=await fetch(`/api/images/${v}/file`);if(!O.ok)throw new Error(`Failed to fetch image file ${v}`);const k=await O.blob(),$=y.file_key.split("/").pop()||`contributed_${v}.png`;return{file:new File([k],$,{type:k.type}),imageData:y}}),u=await Promise.all(f),g=u.map(v=>v.file),r=u[0]?.imageData;F(g),X(n),n.length===1&&be(n[0]),g.length>=1&&P(g[0]),r?.image_type&&Q(r.image_type)}catch(f){console.error("Failed to fetch contributed images:",f),alert(`Failed to load contributed images: ${f instanceof Error?f.message:"Unknown error"}`)}finally{C(!1)}};return a.useEffect(()=>{Promise.all([fetch("/api/sources").then(n=>n.json()),fetch("/api/types").then(n=>n.json()),fetch("/api/spatial-references").then(n=>n.json()),fetch("/api/image-types").then(n=>n.json()),fetch("/api/countries").then(n=>n.json()),fetch("/api/models").then(n=>n.json())]).then(([n,f,u,g,r,v])=>{!localStorage.getItem(Ee)&&v?.length&&localStorage.setItem(Ee,v[0].m_code),zn(n),$n(f),Un(u),Hn(g),Gn(r),n.length>0&&z(n[0].s_code),G("OTHER"),Y("OTHER"),g.length>0&&!i.get("imageType")&&!R&&Q(g[0].image_type)})},[i,R]),a.useEffect(()=>(window.confirmNavigationIfNeeded=n=>{Pe(n)},()=>{delete window.confirmNavigationIfNeeded}),[Pe]),a.useEffect(()=>{const n=g=>{if(x.current){const r="You have an uploaded image that will be deleted if you leave this page. Are you sure you want to leave?";return g.preventDefault(),g.returnValue=r,r}},f=()=>{x.current&&fetch(`/api/images/${x.current}`,{method:"DELETE"}).catch(console.error)},u=g=>{const r=g.target,v=r.closest("a[href]")||r.closest("[data-navigate]");if(v&&x.current){const T=v.getAttribute("href")||v.getAttribute("data-navigate");T&&T!=="#"&&!T.startsWith("javascript:")&&!T.startsWith("mailto:")&&(g.preventDefault(),g.stopPropagation(),Pe(T))}};return window.addEventListener("beforeunload",n),document.addEventListener("click",u,!0),()=>{window.removeEventListener("beforeunload",n),document.removeEventListener("click",u,!0),f()}},[Pe]),a.useEffect(()=>{if(!M){b(null);return}const n=URL.createObjectURL(M);return b(n),()=>URL.revokeObjectURL(n)},[M]),a.useEffect(()=>{const n=i.get("contribute"),f=i.get("imageIds");if(n==="true"&&f){const u=f.split(",").filter(g=>g.trim());u.length>0&&At(u)}},[i]),a.useEffect(()=>{o==="2b"&&Te(0)},[o]),e.jsxs(ln,{children:[o!==3&&e.jsx("div",{className:"max-w-7xl mx-auto",children:e.jsxs("div",{className:t.uploadContainer,"data-step":o,children:[o===1&&!i.get("step")&&!_&&e.jsx(Dn,{files:j,file:M,preview:l,imageType:R,onFileChange:tn,onRemoveImage:Cn,onAddImage:wn,onImageTypeChange:nn,onChangeFile:bn}),o===1&&i.get("contribute")==="true"&&!_&&j.length>0&&e.jsx(Dn,{files:j,file:M,preview:l,imageType:R,onFileChange:tn,onRemoveImage:Cn,onAddImage:wn,onImageTypeChange:nn,onChangeFile:bn}),c&&e.jsxs("div",{className:t.loadingContainer,children:[e.jsx(rn,{className:"text-ifrcRed"}),e.jsx("p",{className:t.loadingText,children:"Generating..."})]}),_&&e.jsxs("div",{className:t.loadingContainer,children:[e.jsx(rn,{className:"text-ifrcRed"}),e.jsx("p",{className:t.loadingText,children:"Loading contribution..."})]}),(o===1&&!c&&!_||o===1&&i.get("contribute")==="true"&&!c&&!_&&j.length>0)&&e.jsx("div",{className:t.generateButtonContainer,children:Ne?e.jsx(w,{name:"generate-from-url",onClick:Nn,children:"Generate Caption"}):e.jsx(w,{name:"generate",disabled:j.length===0,onClick:Nn,children:"Generate"})}),o==="2a"&&e.jsxs("div",{className:t.step2Layout,children:[e.jsx("div",{className:t.mapColumn,children:e.jsx(Pn,{files:j,imageUrl:Ne,preview:l,onViewFullSize:n=>{Ge(n||null),Ve(!0)}})}),e.jsx("div",{className:t.contentColumn,children:e.jsxs("div",{className:t.metadataSectionCard,children:[e.jsx(Ns,{files:j,imageType:R,title:K,source:A,eventType:L,epsg:q,countries:Z,centerLon:ie,centerLat:re,amslM:ce,aglM:ue,headingDeg:pe,yawDeg:he,pitchDeg:xe,rollDeg:N,rtkFix:h,stdHM:Re,stdVM:ze,metadataArray:$e,sources:An,types:On,spatialReferences:Bn,imageTypes:Wn,countriesOptions:Vn,onTitleChange:n=>se(n||""),onSourceChange:ut,onEventTypeChange:gt,onEpsgChange:pt,onCountriesChange:mt,onCenterLonChange:ht,onCenterLatChange:ft,onAmslMChange:xt,onAglMChange:vt,onHeadingDegChange:_t,onYawDegChange:jt,onPitchDegChange:wt,onRollDegChange:Ct,onRtkFixChange:yt,onStdHMChange:St,onStdVMChange:bt,onImageTypeChange:nn,updateMetadataForImage:Mt}),e.jsxs("div",{className:t.confirmSection,children:[e.jsx(cn,{name:"delete",variant:"tertiary",onClick:In,title:"Delete",ariaLabel:"Delete uploaded image",children:e.jsx(dn,{})}),e.jsx(w,{name:"confirm-metadata",onClick:()=>De("2b"),children:"Next"})]})]})})]}),o==="2b"&&e.jsxs("div",{className:t.step2bLayout,children:[e.jsxs("div",{className:`${t.topRow} ${ve?t.ratingHidden:""}`,children:[e.jsx("div",{className:t.imageSection,children:e.jsx(Pn,{files:j,imageUrl:Ne,preview:l,onViewFullSize:n=>{Ge(n||null),Ve(!0)},currentImageIndex:dt,onGoToPrevious:Nt,onGoToNext:kt,onGoToImage:It,showCarousel:!0})}),!ve&&e.jsx("div",{className:t.metadataSectionCard,children:e.jsx(ks,{isPerformanceConfirmed:ve,scores:ke,onScoreChange:(n,f)=>xn(u=>({...u,[n]:f})),onConfirmRatings:()=>Ie(!0),onEditRatings:()=>Ie(!1)})})]}),e.jsx("div",{className:t.metadataSectionCard,children:e.jsx(Is,{description:mn,analysis:hn,recommendedActions:fn,onDescriptionChange:n=>Ue(n||""),onAnalysisChange:n=>We(n||""),onRecommendedActionsChange:n=>He(n||""),onBack:()=>De("2a"),onDelete:In,onSubmit:Dt,onEditRatings:()=>Ie(!1),isPerformanceConfirmed:ve})})]})]})}),o===3&&e.jsxs("div",{className:t.successContainer,children:[e.jsx(te,{level:2,className:t.successHeading,children:"Saved!"}),e.jsx("p",{className:t.successText,children:i.get("contribute")==="true"?"Your contribution has been successfully saved.":"Your caption has been successfully saved."}),e.jsx("div",{className:t.successButton,children:e.jsx(w,{name:"upload-another",onClick:()=>{Mn()},children:"Upload Another"})})]}),e.jsx(Ms,{isOpen:Yn,imageUrl:Ne,preview:l,selectedImageData:Zn,onClose:()=>{Ve(!1),Ge(null)}}),e.jsx(Ls,{isOpen:Kn,onClose:()=>vn(!1)}),e.jsx(Ts,{isOpen:Jn,onConfirm:Pt,onCancel:()=>qe(!1)}),e.jsx(Ds,{isOpen:Qn,onConfirm:Et,onCancel:()=>Me(!1)}),e.jsx(Ps,{isOpen:Xn,fallbackInfo:et,onClose:()=>Ke(!1)}),e.jsx(Es,{isOpen:nt,preprocessingInfo:tt,onClose:()=>Je(!1)}),e.jsx(Fs,{isOpen:at,preprocessingFile:Qe,isPreprocessing:st,preprocessingProgress:it,onConfirm:Ft,onCancel:Rt}),e.jsx(Rs,{isOpen:ot,unsupportedFile:rt,onClose:()=>Le(!1)}),e.jsx(As,{isOpen:lt,oversizedFile:ct,onClose:()=>je(!1),onCancel:()=>je(!1)})]})}const zs="_helpContainer_1wavj_1",Os="_helpSection_1wavj_13",$s="_sectionHeader_1wavj_49",Bs="_sectionTitle_1wavj_91",Us="_sectionContent_1wavj_105",Ws="_guidelinesList_1wavj_119",Hs="_buttonContainer_1wavj_181",I={helpContainer:zs,helpSection:Os,sectionHeader:$s,sectionTitle:Bs,sectionContent:Us,guidelinesList:Ws,buttonContainer:Hs};function Vs(){const i=un(),{setShowReferenceExamples:s}=bs(),o=()=>{i("/upload")},p=()=>{s(!0),i("/explore")},c=()=>{i("/analytics?view=crisis_maps")};return e.jsx(ln,{className:"py-10",children:e.jsx("div",{className:I.helpContainer,children:e.jsxs("div",{className:"space-y-8",children:[e.jsxs("div",{className:I.helpSection,children:[e.jsx("div",{className:I.sectionHeader,children:e.jsx(te,{level:3,className:I.sectionTitle,children:"Introduction"})}),e.jsx("div",{className:I.sectionContent,children:"In collaboration with the IFRC, PromptAid Vision is a tool that generates textual descriptions of crisis maps/crisis drone images utiliing Visual language models. This prototype is for collecting data for the fine-tuning of our own models. We aim to utilize AI tools to support national societies with rapid decision making during emergencies."}),e.jsx("div",{className:I.buttonContainer,children:e.jsx(w,{name:"upload-now",variant:"secondary",onClick:o,children:"Upload now →"})})]}),e.jsxs("div",{className:I.helpSection,children:[e.jsx("div",{className:I.sectionHeader,children:e.jsx(te,{level:3,className:I.sectionTitle,children:"Guidelines"})}),e.jsxs("div",{className:I.sectionContent,children:["To make the process smoother, please follow the guidelines below:",e.jsxs("ul",{className:I.guidelinesList,children:[e.jsx("li",{children:"Avoid uploading images that are not crisis maps/crisis drone images."}),e.jsx("li",{children:"Confirm the image details prior to modifying the description."}),e.jsx("li",{children:"Before the modification, please read the description generated and provide a rating via the rating sliders."}),e.jsx("li",{children:'Click the "Submit" button to save the description.'})]})]}),e.jsx("div",{className:I.buttonContainer,children:e.jsx(w,{name:"see-examples",variant:"secondary",onClick:p,children:"See examples →"})})]}),e.jsxs("div",{className:I.helpSection,children:[e.jsx("div",{className:I.sectionHeader,children:e.jsx(te,{level:3,className:I.sectionTitle,children:"VLMs"})}),e.jsx("div",{className:I.sectionContent,children:"PromptAid Vision uses a variety of Visual Language Models (VLMs). A random VLM is selected for each upload. Therefore feel free to delete and reupload. You can view performance details here:"}),e.jsx("div",{className:I.buttonContainer,children:e.jsx(w,{name:"view-vlm-details",variant:"secondary",onClick:c,children:"View VLM details →"})})]}),e.jsxs("div",{className:I.helpSection,children:[e.jsx("div",{className:I.sectionHeader,children:e.jsx(te,{level:3,className:I.sectionTitle,children:"Dataset"})}),e.jsx("div",{className:I.sectionContent,children:"All users are able to export the dataset. You could apply filters when exporting, and it have the option to organize based on model fine-tuning formats."}),e.jsx("div",{className:I.buttonContainer,children:e.jsx(w,{name:"export-dataset",variant:"secondary",onClick:()=>{s(!1),i("/explore"),setTimeout(()=>{const d=document.querySelector('[name="export-dataset"]');d&&d.click()},100)},children:"Export dataset →"})})]}),e.jsxs("div",{className:I.helpSection,children:[e.jsx("div",{className:I.sectionHeader,children:e.jsx(te,{level:3,className:I.sectionTitle,children:"Contact us"})}),e.jsx("div",{className:I.sectionContent,children:"Need help or have questions about PromptAid Vision? Our team is here to support you."}),e.jsx("div",{className:I.buttonContainer,children:e.jsx(w,{name:"contact-support",variant:"secondary",disabled:!0,children:"Get in touch →"})})]})]})})})}const Gs=a.createContext(void 0),qs=({children:i})=>{const[s,o]=a.useState(!1),[p,c]=a.useState(!0),d=async()=>{const x=localStorage.getItem("adminToken");if(!x){o(!1),c(!1);return}try{(await fetch("/api/admin/verify",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${x}`}})).ok?o(!0):(localStorage.removeItem("adminToken"),o(!1))}catch(l){console.error("Error verifying admin token:",l),localStorage.removeItem("adminToken"),o(!1)}finally{c(!1)}},_=async x=>{try{const l=await fetch("/api/admin/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({password:x})});if(l.ok){const b=await l.json();return localStorage.setItem("adminToken",b.access_token),o(!0),!0}else return!1}catch(l){return console.error("Login error:",l),!1}},C=()=>{localStorage.removeItem("adminToken"),o(!1)};a.useEffect(()=>{d()},[]);const S={isAuthenticated:s,isLoading:p,login:_,logout:C,verifyToken:d};return e.jsx(Gs.Provider,{value:S,children:i})},Ys=a.lazy(()=>B(()=>import("./index-DMU6q_dg.js"),__vite__mapDeps([0,1,2,3,4,5]))),Zs=a.lazy(()=>B(()=>import("./index-C8xjpbHZ.js"),__vite__mapDeps([6,1,2,3,4,7,8,9,10]))),Ks=a.lazy(()=>B(()=>import("./AdminPage-KksT68Fe.js"),__vite__mapDeps([11,1,2,7,3,4,12]))),Js=a.lazy(()=>B(()=>import("./index-B3MZlOIS.js"),__vite__mapDeps([13,1,2,3,4,7,8,9,14]))),V=i=>{const s=i();return s.catch(()=>{}),s},Qs=()=>{"requestIdleCallback"in window?requestIdleCallback(()=>{V(()=>B(()=>import("./index-DMU6q_dg.js"),__vite__mapDeps([0,1,2,3,4,5]))),V(()=>B(()=>import("./index-C8xjpbHZ.js"),__vite__mapDeps([6,1,2,3,4,7,8,9,10]))),V(()=>B(()=>import("./AdminPage-KksT68Fe.js"),__vite__mapDeps([11,1,2,7,3,4,12]))),V(()=>B(()=>import("./index-B3MZlOIS.js"),__vite__mapDeps([13,1,2,3,4,7,8,9,14])))}):setTimeout(()=>{V(()=>B(()=>import("./index-DMU6q_dg.js"),__vite__mapDeps([0,1,2,3,4,5]))),V(()=>B(()=>import("./index-C8xjpbHZ.js"),__vite__mapDeps([6,1,2,3,4,7,8,9,10]))),V(()=>B(()=>import("./AdminPage-KksT68Fe.js"),__vite__mapDeps([11,1,2,7,3,4,12]))),V(()=>B(()=>import("./index-B3MZlOIS.js"),__vite__mapDeps([13,1,2,3,4,7,8,9,14])))},1e3)},Xs=$t([{element:e.jsx(ga,{}),children:[{path:"/",element:e.jsx(En,{})},{path:"/upload",element:e.jsx(En,{})},{path:"/analytics",element:e.jsx(a.Suspense,{fallback:e.jsx("div",{children:"Loading Analytics..."}),children:e.jsx(Ys,{})})},{path:"/explore",element:e.jsx(a.Suspense,{fallback:e.jsx("div",{children:"Loading Explore..."}),children:e.jsx(Zs,{})})},{path:"/help",element:e.jsx(Vs,{})},{path:"/admin",element:e.jsx(a.Suspense,{fallback:e.jsx("div",{children:"Loading Admin..."}),children:e.jsx(Ks,{})})},{path:"/map/:mapId",element:e.jsx(a.Suspense,{fallback:e.jsx("div",{children:"Loading Map Details..."}),children:e.jsx(Js,{})})}]}],{basename:"/app/"});function ei(){const[i,s]=a.useState([]);a.useEffect(()=>{Qs()},[]);const o=a.useCallback(C=>{s(S=>sa([...S,C],x=>x.name)??S)},[s]),p=a.useCallback(C=>{s(S=>{const x=S.findIndex(b=>b.name===C);if(x===-1)return S;const l=[...S];return l.splice(x,1),l})},[s]),c=a.useCallback((C,S)=>{s(x=>{const l=x.findIndex(M=>M.name===C);if(l===-1)return x;const b=[...x];return b[l]={...b[l],...S},b})},[s]),d=a.useMemo(()=>({alerts:i,addAlert:o,removeAlert:p,updateAlert:c}),[i,o,p,c]),_=a.useMemo(()=>({languageNamespaceStatus:{},setLanguageNamespaceStatus:()=>{},currentLanguage:"en",setCurrentLanguage:()=>{},strings:{},setStrings:()=>{},registerNamespace:()=>{}}),[]);return e.jsx(ea.Provider,{value:d,children:e.jsx(na.Provider,{value:_,children:e.jsx(qs,{children:e.jsx(Ss,{children:e.jsx(Bt,{router:Xs})})})})})}function ni(){return e.jsx(ei,{})}Ut.createRoot(document.getElementById("root")).render(e.jsx(a.StrictMode,{children:e.jsx(ni,{})}));export{Gs as A,Ms as F,B as _,bs as u}; diff --git a/py_backend/static/assets/index-C8xjpbHZ.js b/py_backend/static/assets/index-C8xjpbHZ.js new file mode 100644 index 0000000000000000000000000000000000000000..df5ae12592705c6ce0a914bfc920f323539c2e3c --- /dev/null +++ b/py_backend/static/assets/index-C8xjpbHZ.js @@ -0,0 +1,2 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vendor-utils-Db80MiSc.js","assets/vendor-DxpCibxB.js","assets/vendor-react-BxsGb6Ph.js"])))=>i.map(i=>d[i]); +import{u as Se,_ as Te}from"./index-C6NSRolP.js";import{r as m,j as t}from"./vendor-react-BxsGb6Ph.js";import{N as Ie,_ as ie,L as Ee,z as Z,n as D,D as be}from"./vendor-ui-l_DttnRj.js";import{u as Ce}from"./useAdmin-6S8boYmH.js";import{F as $e,E as Pe}from"./ExportModal-5QTtY4mk.js";import{a as Fe,u as De}from"./vendor-DxpCibxB.js";const ke="_tabSelector_o9y1f_1",Le="_metadataTags_o9y1f_8",Oe="_metadataTag_o9y1f_8",Me="_metadataTagSource_o9y1f_32",Re="_metadataTagType_o9y1f_43",Je="_mapItem_o9y1f_54",We="_mapItemImage_o9y1f_72",ze="_mapItemContent_o9y1f_92",Ue="_mapItemTitle_o9y1f_97",Ae="_mapItemMetadata_o9y1f_105",Be="_fullSizeModalOverlay_o9y1f_134",He="_fullSizeModalContent_o9y1f_148",Ve="_ratingWarningContent_o9y1f_159",Ge="_ratingWarningTitle_o9y1f_165",Ze="_ratingWarningText_o9y1f_172",qe="_ratingWarningButtons_o9y1f_179",g={tabSelector:ke,metadataTags:Le,metadataTag:Oe,metadataTagSource:Me,metadataTagType:Re,mapItem:Je,mapItemImage:We,mapItemContent:ze,mapItemTitle:Ue,mapItemMetadata:Ae,fullSizeModalOverlay:Be,fullSizeModalContent:He,ratingWarningContent:Ve,ratingWarningTitle:Ge,ratingWarningText:Ze,ratingWarningButtons:qe};function at(){const k=Fe(),q=De(),{isAuthenticated:ne}=Ce(),[K,oe]=m.useState("explore"),[_,L]=m.useState([]),{search:y,srcFilter:E,catFilter:b,regionFilter:C,countryFilter:$,imageTypeFilter:P,uploadTypeFilter:F,showReferenceExamples:j,setShowReferenceExamples:le}=Se(),[J,re]=m.useState([]),[W,ce]=m.useState([]),[Q,me]=m.useState([]),[ge,de]=m.useState([]),[X,pe]=m.useState([]),[ue,Y]=m.useState(!0),[z,ee]=m.useState(!0),[fe,U]=m.useState(!1),[he,A]=m.useState(!1),[_e,B]=m.useState(!1),[xe,O]=m.useState(!1),[M,te]=m.useState(""),[H,ae]=m.useState(!1),ye=[{key:"explore",label:"List"},{key:"mapDetails",label:"Carousel"}],se=()=>{ee(!0),fetch("/api/images/grouped").then(e=>e.ok?e.json():(console.error("ExplorePage: Grouped endpoint failed, trying legacy endpoint"),fetch("/api/captions/legacy").then(s=>s.ok?s.json():(console.error("ExplorePage: Legacy endpoint failed, trying regular images endpoint"),fetch("/api/images").then(o=>{if(!o.ok)throw new Error(`HTTP ${o.status}: ${o.statusText}`);return o.json()}))))).then(e=>{if(console.log("ExplorePage: API response data:",e),Array.isArray(e)){const s=e.filter(o=>{const f=o.generated&&o.model,u=o.image_id&&o.image_id!=="undefined"&&o.image_id!=="null";return u||console.error("ExplorePage: Item missing valid image_id:",o),f&&u});console.log("ExplorePage: Filtered images with captions:",s.length),L(s)}else console.error("ExplorePage: API response is not an array:",e),L([])}).catch(()=>{L([])}).finally(()=>{ee(!1)})};m.useEffect(()=>{se()},[]),m.useEffect(()=>{const e=()=>{document.hidden||se()};return document.addEventListener("visibilitychange",e),()=>{document.removeEventListener("visibilitychange",e)}},[]),m.useEffect(()=>{new URLSearchParams(q.search).get("export")==="true"&&(U(!0),k("/explore",{replace:!0}))},[q.search,k,y,E,b,C,$,P,j]),m.useEffect(()=>{Y(!0),Promise.all([fetch("/api/sources").then(e=>{if(!e.ok)throw new Error(`HTTP ${e.status}: ${e.statusText}`);return e.json()}),fetch("/api/types").then(e=>{if(!e.ok)throw new Error(`HTTP ${e.status}: ${e.statusText}`);return e.json()}),fetch("/api/regions").then(e=>{if(!e.ok)throw new Error(`HTTP ${e.status}: ${e.statusText}`);return e.json()}),fetch("/api/countries").then(e=>{if(!e.ok)throw new Error(`HTTP ${e.status}: ${e.statusText}`);return e.json()}),fetch("/api/image-types").then(e=>{if(!e.ok)throw new Error(`HTTP ${e.status}: ${e.statusText}`);return e.json()})]).then(([e,s,o,f,u])=>{re(e),ce(s),me(o),de(f),pe(u)}).catch(()=>{}).finally(()=>{Y(!1)})},[]);const v=m.useMemo(()=>_.filter(e=>{const s=!y||e.title?.toLowerCase().includes(y.toLowerCase())||e.generated?.toLowerCase().includes(y.toLowerCase())||e.source?.toLowerCase().includes(y.toLowerCase())||e.event_type?.toLowerCase().includes(y.toLowerCase()),o=!E||e.source&&e.source.split(", ").some(x=>x.trim()===E),f=!b||e.event_type&&e.event_type.split(", ").some(x=>x.trim()===b),u=!C||e.countries.some(x=>x.r_code===C),N=!$||e.countries.some(x=>x.c_code===$),V=!P||e.image_type===P,R=!F||F==="single"&&(!e.image_count||e.image_count<=1)||F==="multiple"&&e.image_count&&e.image_count>1,w=!j||e.starred===!0;return s&&o&&f&&u&&N&&V&&R&&w}),[_,y,E,b,C,$,P,F,j]),je=async(e,s="fine-tuning")=>{if(e.length===0){alert("No images to export");return}A(!0),B(!1);try{const o=(await Te(async()=>{const{default:i}=await import("./vendor-utils-Db80MiSc.js").then(S=>S.j);return{default:i}},__vite__mapDeps([0,1,2]))).default,f=new o,u=e.filter(i=>i.image_type==="crisis_map"),N=e.filter(i=>i.image_type==="drone_image");if(u.length>0){const i=f.folder("crisis_maps_dataset"),S=i?.folder("images");if(S){let T=1;for(const a of u)try{const h=a.image_count&&a.image_count>1?a.all_image_ids||[a.image_id]:[a.image_id],G=h.map(async(n,p)=>{try{const l=await fetch(`/api/images/${n}/file`);if(!l.ok)throw new Error(`Failed to fetch image ${n}`);const r=await l.blob(),c=a.file_key.split(".").pop()||"jpg",d=`${String(T).padStart(4,"0")}_${String(p+1).padStart(2,"0")}.${c}`;return S.file(d,r),{success:!0,fileName:d,imageId:n}}catch(l){return console.error(`Failed to process image ${n}:`,l),{success:!1,fileName:"",imageId:n}}}),I=(await Promise.all(G)).filter(n=>n.success);if(I.length>0){if(s==="fine-tuning"){const n=I.map(r=>`images/${r.fileName}`),p=Math.random(),l={image:n.length===1?n[0]:n,caption:a.edited||a.generated||"",metadata:{image_id:h,title:a.title,source:a.source,event_type:a.event_type,image_type:a.image_type,countries:a.countries,starred:a.starred,image_count:a.image_count||1}};if(!i)continue;if(p<.8){const r=i.file("train.jsonl");if(r){const c=await r.async("string").then(d=>JSON.parse(d||"[]")).catch(()=>[]);c.push(l),i.file("train.jsonl",JSON.stringify(c,null,2))}else i.file("train.jsonl",JSON.stringify([l],null,2))}else if(p<.9){const r=i.file("test.jsonl");if(r){const c=await r.async("string").then(d=>JSON.parse(d||"[]")).catch(()=>[]);c.push(l),i.file("test.jsonl",JSON.stringify(c,null,2))}else i.file("test.jsonl",JSON.stringify([l],null,2))}else{const r=i.file("val.jsonl");if(r){const c=await r.async("string").then(d=>JSON.parse(d||"[]")).catch(()=>[]);c.push(l),i.file("val.jsonl",JSON.stringify(c,null,2))}else i.file("val.jsonl",JSON.stringify([l],null,2))}}else{const n=I.map(l=>`images/${l.fileName}`),p={image:n.length===1?n[0]:n,caption:a.edited||a.generated||"",metadata:{image_id:h,title:a.title,source:a.source,event_type:a.event_type,image_type:a.image_type,countries:a.countries,starred:a.starred,image_count:a.image_count||1}};i&&i.file(`${String(T).padStart(4,"0")}.json`,JSON.stringify(p,null,2))}T++}}catch(h){console.error(`Failed to process caption ${a.image_id}:`,h)}}}if(N.length>0){const i=f.folder("drone_images_dataset"),S=i?.folder("images");if(S){let T=1;for(const a of N)try{const h=a.image_count&&a.image_count>1?a.all_image_ids||[a.image_id]:[a.image_id],G=h.map(async(n,p)=>{try{const l=await fetch(`/api/images/${n}/file`);if(!l.ok)throw new Error(`Failed to fetch image ${n}`);const r=await l.blob(),c=a.file_key.split(".").pop()||"jpg",d=`${String(T).padStart(4,"0")}_${String(p+1).padStart(2,"0")}.${c}`;return S.file(d,r),{success:!0,fileName:d,imageId:n}}catch(l){return console.error(`Failed to process image ${n}:`,l),{success:!1,fileName:"",imageId:n}}}),I=(await Promise.all(G)).filter(n=>n.success);if(I.length>0){if(s==="fine-tuning"){const n=I.map(r=>`images/${r.fileName}`),p=Math.random(),l={image:n.length===1?n[0]:n,caption:a.edited||a.generated||"",metadata:{image_id:h,title:a.title,source:a.source,event_type:a.event_type,image_type:a.image_type,countries:a.countries,starred:a.starred,image_count:a.image_count||1}};if(!i)continue;if(p<.8){const r=i.file("train.jsonl");if(r){const c=await r.async("string").then(d=>JSON.parse(d||"[]")).catch(()=>[]);c.push(l),i.file("train.jsonl",JSON.stringify(c,null,2))}else i.file("train.jsonl",JSON.stringify([l],null,2))}else if(p<.9){const r=i.file("test.jsonl");if(r){const c=await r.async("string").then(d=>JSON.parse(d||"[]")).catch(()=>[]);c.push(l),i.file("test.jsonl",JSON.stringify(c,null,2))}else i.file("test.jsonl",JSON.stringify([l],null,2))}else{const r=i.file("val.jsonl");if(r){const c=await r.async("string").then(d=>JSON.parse(d||"[]")).catch(()=>[]);c.push(l),i.file("val.jsonl",JSON.stringify(c,null,2))}else i.file("val.jsonl",JSON.stringify([l],null,2))}}else{const n=I.map(l=>`images/${l.fileName}`),p={image:n.length===1?n[0]:n,caption:a.edited||a.generated||"",metadata:{image_id:h,title:a.title,source:a.source,event_type:a.event_type,image_type:a.image_type,countries:a.countries,starred:a.starred,image_count:a.image_count||1}};i&&i.file(`${String(T).padStart(4,"0")}.json`,JSON.stringify(p,null,2))}T++}}catch(h){console.error(`Failed to process caption ${a.image_id}:`,h)}}}const V=await f.generateAsync({type:"blob"}),R=URL.createObjectURL(V),w=document.createElement("a");w.href=R,w.download=`datasets_${s}_${new Date().toISOString().split("T")[0]}.zip`,document.body.appendChild(w),w.click(),document.body.removeChild(w),URL.revokeObjectURL(R);const x=(u.length||0)+(N.length||0);console.log(`Exported ${s} datasets with ${x} total images:`),u.length>0&&console.log(`- Crisis maps: ${u.length} images`),N.length>0&&console.log(`- Drone images: ${N.length} images`),B(!0)}catch(o){console.error("Export failed:",o),alert("Failed to export dataset. Please try again.")}finally{A(!1)}},ve=e=>{te(e),O(!0)},Ne=async()=>{if(M){ae(!0);try{console.log("Deleting image with ID:",M),(await fetch(`/api/images/${M}`,{method:"DELETE"})).ok?(L(s=>s.filter(o=>o.image_id!==M)),O(!1),te("")):(console.error("Delete failed"),alert("Failed to delete image. Please try again."))}catch(e){console.error("Delete failed:",e),alert("Failed to delete image. Please try again.")}finally{ae(!1)}}};return t.jsxs(Ie,{children:[z?t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[60vh]",children:t.jsxs("div",{className:"flex flex-col items-center gap-4",children:[t.jsx(ie,{className:"text-ifrcRed"}),t.jsx("div",{children:"Loading examples..."})]})}):t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsxs("div",{className:g.tabSelector,children:[t.jsx(Ee,{name:"explore-view",value:K,onChange:e=>{(e==="explore"||e==="mapDetails")&&(oe(e),e==="mapDetails"&&_.length>0&&(_[0]?.image_id&&_[0].image_id!=="undefined"&&_[0].image_id!=="null"?k(`/map/${_[0].image_id}`):console.error("Invalid image_id for navigation:",_[0]?.image_id)))},options:ye,keySelector:e=>e.key,labelSelector:e=>e.label}),t.jsxs("div",{className:"flex items-center gap-2 ml-auto",children:[t.jsx(Z,{withInternalPadding:!0,className:"bg-white/20 backdrop-blur-sm rounded-md p-2",children:t.jsxs(D,{name:"reference-examples",variant:j?"primary":"secondary",onClick:()=>le(!j),className:"whitespace-nowrap",children:[t.jsx("span",{className:"mr-2",children:j?t.jsx("span",{className:"text-yellow-400",children:"★"}):t.jsx("span",{className:"text-yellow-400",children:"☆"})}),"Reference Examples"]})}),t.jsx(D,{name:"export-dataset",variant:"secondary",onClick:()=>U(!0),children:"Export"})]})]}),K==="explore"?t.jsxs("div",{className:"space-y-6",children:[t.jsx("div",{className:"mb-6 space-y-4",children:t.jsx("div",{className:"flex flex-wrap items-center gap-4",children:t.jsx(Z,{withInternalPadding:!0,className:"bg-white/20 backdrop-blur-sm rounded-md p-2 flex-1 min-w-[300px]",children:t.jsx($e,{sources:J,types:W,regions:Q,countries:ge,imageTypes:X,isLoadingFilters:ue})})})}),t.jsxs("div",{className:"space-y-4",children:[t.jsx("div",{className:"flex justify-between items-center",children:t.jsxs("p",{className:"text-sm text-gray-600",children:[v.length," of ",_.length," examples"]})}),z&&t.jsx("div",{className:"text-center py-12",children:t.jsxs("div",{className:"flex flex-col items-center gap-4",children:[t.jsx(ie,{className:"text-ifrcRed"}),t.jsx("div",{children:"Loading examples..."})]})}),!z&&t.jsxs("div",{className:"space-y-4",children:[v.map(e=>t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsxs("div",{className:`${g.mapItem} flex-1`,onClick:()=>{console.log("ExplorePage: Clicking on image with ID:",e.image_id),console.log("ExplorePage: Image data:",e),e.image_id&&e.image_id!=="undefined"&&e.image_id!=="null"?(console.log("ExplorePage: Navigating to:",`/map/${e.image_id}`),console.log("ExplorePage: Full navigation URL:",`/#/map/${e.image_id}`),k(`/map/${e.image_id}`)):(console.error("Invalid image_id for navigation:",e.image_id),console.error("Full item data:",JSON.stringify(e,null,2)),alert(`Cannot navigate: Invalid image ID (${e.image_id})`))},children:[t.jsx("div",{className:g.mapItemImage,style:{width:"120px",height:"80px"},children:e.image_url?t.jsxs(t.Fragment,{children:[console.log("ExplorePage: Rendering image with URL:",e.image_url),t.jsx("img",{src:e.image_url,alt:e.file_key,onError:s=>{console.error("ExplorePage: Image failed to load:",e.image_url);const o=s.target;o.style.display="none",o.parentElement.innerHTML="Img"},onLoad:()=>console.log("ExplorePage: Image loaded successfully:",e.image_url)})]}):t.jsxs(t.Fragment,{children:[console.log("ExplorePage: No image_url provided for item:",e),"'Img'"]})}),t.jsxs("div",{className:g.mapItemContent,children:[t.jsx("h3",{className:g.mapItemTitle,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("span",{children:e.title||"Untitled"}),e.starred&&t.jsx("span",{className:"text-red-500 text-lg",title:"Starred image",children:"★"})]})}),t.jsx("div",{className:g.mapItemMetadata,children:t.jsxs("div",{className:g.metadataTags,children:[e.image_type!=="drone_image"&&t.jsx("span",{className:g.metadataTagSource,children:e.source&&e.source.includes(", ")?e.source.split(", ").map(s=>J.find(o=>o.s_code===s.trim())?.label||s.trim()).join(", "):J.find(s=>s.s_code===e.source)?.label||e.source}),t.jsx("span",{className:g.metadataTagType,children:e.event_type&&e.event_type.includes(", ")?e.event_type.split(", ").map(s=>W.find(o=>o.t_code===s.trim())?.label||s.trim()).join(", "):W.find(s=>s.t_code===e.event_type)?.label||e.event_type}),t.jsx("span",{className:g.metadataTag,children:X.find(s=>s.image_type===e.image_type)?.label||e.image_type}),e.image_count&&e.image_count>1&&t.jsxs("span",{className:g.metadataTag,title:`Multi-upload with ${e.image_count} images`,children:["📷 ",e.image_count]}),(!e.image_count||e.image_count<=1)&&t.jsx("span",{className:g.metadataTag,title:"Single Upload",children:"Single"}),e.countries&&e.countries.length>0&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:g.metadataTag,children:Q.find(s=>s.r_code===e.countries[0].r_code)?.label||"Unknown Region"}),t.jsx("span",{className:g.metadataTag,children:e.countries.map(s=>s.label).join(", ")})]})]})})]})]}),ne&&t.jsx(Z,{withInternalPadding:!0,className:"bg-white/20 backdrop-blur-sm rounded-md p-2",children:t.jsx(D,{name:`delete-${e.image_id}`,variant:"tertiary",size:1,className:"bg-red-50 hover:bg-red-100 text-red-700 border border-red-200 hover:border-red-300",onClick:()=>ve(e.image_id),title:"Delete","aria-label":"Delete saved image",children:t.jsx(be,{className:"w-4 h-4"})})})]},e.image_id)),!v.length&&t.jsx("div",{className:"text-center py-12",children:t.jsx("p",{className:"text-gray-500",children:"No examples found."})})]})]})]}):t.jsx("div",{className:"space-y-6",children:t.jsxs("div",{className:"text-center py-12",children:[t.jsx("p",{className:"text-gray-500",children:"Map Details view coming soon..."}),t.jsx("p",{className:"text-sm text-gray-400 mt-2",children:"This will show detailed information about individual maps"})]})})]}),xe&&t.jsx("div",{className:g.fullSizeModalOverlay,onClick:()=>O(!1),children:t.jsx("div",{className:g.fullSizeModalContent,onClick:e=>e.stopPropagation(),children:t.jsxs("div",{className:g.ratingWarningContent,children:[t.jsx("h3",{className:g.ratingWarningTitle,children:"Delete Image?"}),t.jsx("p",{className:g.ratingWarningText,children:"This action cannot be undone. Are you sure you want to delete this saved image and all related data?"}),t.jsxs("div",{className:g.ratingWarningButtons,children:[t.jsx(D,{name:"confirm-delete",variant:"secondary",onClick:Ne,disabled:H,children:H?"Deleting...":"Delete"}),t.jsx(D,{name:"cancel-delete",variant:"tertiary",onClick:()=>O(!1),disabled:H,children:"Cancel"})]})]})})}),t.jsx(Pe,{isOpen:fe,onClose:()=>{U(!1),B(!1),A(!1)},onExport:(e,s)=>{const o=v.filter(f=>s.includes(f.image_type));je(o,e)},filteredCount:v.length,totalCount:_.length,hasFilters:!!(y||E||b||C||$||P||F||j),crisisMapsCount:v.filter(e=>e.image_type==="crisis_map").length,droneImagesCount:v.filter(e=>e.image_type==="drone_image").length,isLoading:he,exportSuccess:_e})]})}export{at as default}; diff --git a/py_backend/static/assets/index-DMU6q_dg.js b/py_backend/static/assets/index-DMU6q_dg.js new file mode 100644 index 0000000000000000000000000000000000000000..930a885f0d33ada94034b2cf231ae9127285310a --- /dev/null +++ b/py_backend/static/assets/index-DMU6q_dg.js @@ -0,0 +1 @@ +import{u as Oe,r as d,j as t}from"./vendor-react-BxsGb6Ph.js";import{g as C,h as u,N as $,_ as Qe,L as Ue,z as _,P as be,K as F,n as p,y as h,i as f}from"./vendor-ui-l_DttnRj.js";import"./vendor-DxpCibxB.js";const Ge="_tabSelector_vlxoe_1",$e="_progressSection_vlxoe_14",ze="_progressLabel_vlxoe_20",qe="_chartGrid_vlxoe_28",Ke="_chartContainer_vlxoe_40",We="_tableContainer_vlxoe_51",Je="_modelPerformance_vlxoe_59",Xe="_loadingContainer_vlxoe_67",Ye="_errorContainer_vlxoe_77",Ze="_userInteractionCards_vlxoe_96",et="_userInteractionCard_vlxoe_96",tt="_userInteractionCardValue_vlxoe_116",at="_userInteractionCardLabel_vlxoe_123",st="_userInteractionCardButton_vlxoe_130",nt="_summaryStatsCards_vlxoe_148",rt="_summaryStatsCard_vlxoe_148",it="_summaryStatsCardValue_vlxoe_169",ot="_summaryStatsCardLabel_vlxoe_176",i={tabSelector:Ge,progressSection:$e,progressLabel:ze,chartGrid:qe,chartContainer:Ke,tableContainer:We,modelPerformance:Je,loadingContainer:Xe,errorContainer:Ye,userInteractionCards:Ze,userInteractionCard:et,userInteractionCardValue:tt,userInteractionCardLabel:at,userInteractionCardButton:st,summaryStatsCards:nt,summaryStatsCard:rt,summaryStatsCardValue:it,summaryStatsCardLabel:ot};function ut(){const[z]=Oe(),[c,q]=d.useState(null),[Me,K]=d.useState(!0),[W,J]=d.useState("crisis_maps"),[I,Se]=d.useState([]),[w,Ie]=d.useState([]),[N,we]=d.useState([]),[b,Ne]=d.useState([]),[D,De]=d.useState(!1),[T,Te]=d.useState(!1),[k,ke]=d.useState(!1),[P,Pe]=d.useState(!1),[H,Ee]=d.useState(!1),[E,Le]=d.useState(!1),j=e=>{De(e==="editTime"),Te(e==="percentage"),ke(e==="delete"),Pe(e==="regions"),Ee(e==="sources"),Le(e==="types")},Be=[{key:"crisis_maps",label:"Crisis Maps"},{key:"drone_images",label:"Drone Images"}],G=d.useCallback((e,r)=>{if(!e||!r)return 0;const s=e.toLowerCase().replace(/[^\w\s]/g,"").split(/\s+/).filter(l=>l.length>0),a=r.toLowerCase().replace(/[^\w\s]/g,"").split(/\s+/).filter(l=>l.length>0);if(s.length===0&&a.length===0)return 1;if(s.length===0||a.length===0)return 0;const n=new Set(s),o=new Set(a),g=new Set([...n].filter(l=>o.has(l))),y=new Set([...n,...o]);return g.size/y.size},[]),X=d.useCallback(async()=>{K(!0);try{const r=await(await fetch("/api/images")).json(),s={},a=r.filter(l=>l.image_type==="crisis_map"),n=r.filter(l=>l.image_type==="drone_image"),o={totalCaptions:r.length,sources:{},types:{},regions:{},models:{},modelEditTimes:s,percentageModified:0,modelPercentageData:{},totalDeleteCount:0,deleteRate:0,crisisMaps:a,droneImages:n};r.forEach(l=>{if(l.source&&(o.sources[l.source]=(o.sources[l.source]||0)+1),l.event_type&&(o.types[l.event_type]=(o.types[l.event_type]||0)+1),l.countries&&l.countries.forEach(m=>{m.r_code&&(o.regions[m.r_code]=(o.regions[m.r_code]||0)+1)}),l.model){const m=l.model,v=o.models[m]||={count:0,avgAccuracy:0,avgContext:0,avgUsability:0,totalScore:0,deleteCount:0};if(v.count++,l.accuracy!=null&&(v.avgAccuracy+=l.accuracy),l.context!=null&&(v.avgContext+=l.context),l.usability!=null&&(v.avgUsability+=l.usability),l.created_at&&l.updated_at){const S=new Date(l.created_at).getTime(),U=new Date(l.updated_at).getTime()-S;U>0&&(s[m]||(s[m]=[]),s[m].push(U))}}}),I.forEach(l=>{l.s_code&&!o.sources[l.s_code]&&(o.sources[l.s_code]=0)}),w.forEach(l=>{l.t_code&&!o.types[l.t_code]&&(o.types[l.t_code]=0)}),N.forEach(l=>{l.r_code&&!o.regions[l.r_code]&&(o.regions[l.r_code]=0)}),["GPT-4","Claude","Gemini","Llama","Other"].forEach(l=>{o.models[l]||(o.models[l]={count:0,avgAccuracy:0,avgContext:0,avgUsability:0,totalScore:0,deleteCount:0})}),Object.values(o.models).forEach(l=>{l.count>0&&(l.avgAccuracy=Math.round(l.avgAccuracy/l.count),l.avgContext=Math.round(l.avgContext/l.count),l.avgUsability=Math.round(l.avgUsability/l.count),l.totalScore=Math.round((l.avgAccuracy+l.avgContext+l.avgUsability)/3))});const y=r.filter(l=>l.generated&&l.edited);if(y.length>0){const m=[...y.map(L=>G(L.generated,L.edited))].sort((L,U)=>L-U),v=Math.floor(m.length/2),S=m.length%2===0?(m[v-1]+m[v])/2:m[v];o.percentageModified=Math.round((1-S)*100)}const x={};r.forEach(l=>{if(l.model&&l.generated&&l.edited){const m=G(l.generated,l.edited),v=Math.round((1-m)*100);x[l.model]||(x[l.model]=[]),x[l.model].push(v)}}),o.modelPercentageData=x;try{const l=await fetch("/api/models");if(l.ok){const m=await l.json();if(m.models){m.models.forEach(S=>{o.models[S.m_code]&&(o.models[S.m_code].deleteCount=S.delete_count||0)});const v=m.models.reduce((S,L)=>S+(L.delete_count||0),0);o.totalDeleteCount=v,o.deleteRate=v>0?Math.round(v/(v+r.length)*100):0}}}catch(l){console.log("Could not fetch model delete counts:",l)}q(o)}catch{q(null)}finally{K(!1)}},[I,w,N,G]),Y=d.useCallback(async()=>{try{const[e,r,s,a]=await Promise.all([fetch("/api/sources"),fetch("/api/types"),fetch("/api/regions"),fetch("/api/models")]),n=await e.json(),o=await r.json(),g=await s.json(),y=await a.json();Se(n),Ie(o),we(g),Ne(y.models||[])}catch(e){console.log("Could not fetch lookup data:",e)}},[]);d.useEffect(()=>{const e=z.get("view");(e==="crisis_maps"||e==="drone_images")&&J(e)},[z]),d.useEffect(()=>{Y()},[Y]),d.useEffect(()=>{I.length>0&&w.length>0&&N.length>0&&b.length>0&&X()},[I,w,N,b,X]);const O=d.useCallback(e=>{const r=I.find(s=>s.s_code===e);return r?r.label:e},[I]),B=d.useCallback(e=>{if(e.length===0)return 0;const r=[...e].sort((a,n)=>a-n),s=Math.floor(r.length/2);return r.length%2===0?Math.round((r[s-1]+r[s])/2):r[s]},[]),A=d.useCallback(e=>{const r=Math.floor(e/1e3),s=Math.floor(r/60),a=Math.floor(s/60);return a>0?`${a}h ${s%60}m`:s>0?`${s}m ${r%60}s`:`${r}s`},[]),Q=d.useCallback(e=>{const r=w.find(s=>s.t_code===e);return r?r.label:e},[w]),M=d.useCallback(e=>{const r=b.find(s=>s.m_code===e);return r?r.label:e},[b]),Z=d.useMemo(()=>c?Object.entries(c.modelEditTimes||{}).filter(([,e])=>e.length>0).sort(([,e],[,r])=>B(r)-B(e)).map(([e,r],s)=>({id:s+1,name:M(e),count:r.length,avgEditTime:B(r),minEditTime:Math.min(...r),maxEditTime:Math.max(...r)})):[],[c,B,M]),ee=d.useMemo(()=>c?Object.entries(c.modelPercentageData||{}).filter(([,e])=>e.length>0).sort(([,e],[,r])=>{const s=[...e].sort((x,l)=>x-l),a=[...r].sort((x,l)=>x-l),n=Math.floor(s.length/2),o=Math.floor(a.length/2),g=s.length%2===0?(s[n-1]+s[n])/2:s[n];return(a.length%2===0?(a[o-1]+a[o])/2:a[o])-g}).map(([e,r],s)=>{const a=[...r].sort((g,y)=>g-y),n=Math.floor(a.length/2),o=a.length%2===0?Math.round((a[n-1]+a[n])/2):a[n];return{id:s+1,name:M(e),count:r.length,avgPercentageModified:o,minPercentageModified:Math.min(...r),maxPercentageModified:Math.max(...r)}}):[],[c,M]),te=d.useMemo(()=>c?Object.entries(c.models).filter(([,e])=>e.count>0).map(([e,r],s)=>{const a=[r.avgAccuracy,r.avgContext,r.avgUsability],n=a.reduce((y,x)=>y+x,0)/a.length,o=a.reduce((y,x)=>y+Math.pow(x-n,2),0)/a.length,g=Math.round(100-Math.sqrt(o));return{id:s+1,name:M(e),consistency:Math.max(0,g),avgScore:Math.round(n),count:r.count}}).sort((e,r)=>r.consistency-e.consistency):[],[c,M]),ae=d.useMemo(()=>[C("name","Region",e=>e.name),u("count","Count",e=>e.count),u("percentage","% of Total",e=>e.percentage,{suffix:"%",maximumFractionDigits:0})],[]),se=d.useMemo(()=>[C("name","Type",e=>e.name),u("count","Count",e=>e.count),u("percentage","% of Total",e=>e.percentage,{suffix:"%",maximumFractionDigits:0})],[]),Ve=d.useMemo(()=>[C("name","Source",e=>e.name),u("count","Count",e=>e.count),u("percentage","% of Total",e=>e.percentage,{suffix:"%",maximumFractionDigits:0})],[]),ne=d.useMemo(()=>[C("name","Model",e=>e.name),u("count","Count",e=>e.count),u("accuracy","Accuracy",e=>e.accuracy,{suffix:"%",maximumFractionDigits:0}),u("context","Context",e=>e.context,{suffix:"%",maximumFractionDigits:0}),u("usability","Usability",e=>e.usability,{suffix:"%",maximumFractionDigits:0}),u("totalScore","Total Score",e=>e.totalScore,{suffix:"%",maximumFractionDigits:0})],[]),re=d.useMemo(()=>[C("name","Model",e=>e.name),u("count","Count",e=>e.count),C("avgEditTime","Median Edit Time",e=>A(e.avgEditTime)),C("minEditTime","Min Edit Time",e=>A(e.minEditTime)),C("maxEditTime","Max Edit Time",e=>A(e.maxEditTime))],[]),ie=d.useMemo(()=>[C("name","Model",e=>e.name),u("count","Count",e=>e.count),u("avgPercentageModified","Median % Modified",e=>e.avgPercentageModified,{suffix:"%",maximumFractionDigits:0}),u("minPercentageModified","Min % Modified",e=>e.minPercentageModified,{suffix:"%",maximumFractionDigits:0}),u("maxPercentageModified","Max % Modified",e=>e.maxPercentageModified,{suffix:"%",maximumFractionDigits:0})],[]),oe=d.useMemo(()=>[C("name","Model",e=>e.name),u("count","Total Count",e=>e.count),u("deleteCount","Delete Count",e=>e.deleteCount),u("deleteRate","Delete Rate",e=>e.deleteRate,{suffix:"%",maximumFractionDigits:1})],[]),Ae=d.useMemo(()=>[C("source","Source",e=>e.source),u("avgQuality","Average Quality",e=>e.avgQuality,{suffix:"%",maximumFractionDigits:0}),u("count","Count",e=>e.count)],[]),ce=d.useMemo(()=>[C("eventType","Event Type",e=>e.eventType),u("avgQuality","Average Quality",e=>e.avgQuality,{suffix:"%",maximumFractionDigits:0}),u("count","Count",e=>e.count)],[]),le=d.useMemo(()=>[C("name","Model",e=>e.name),u("consistency","Consistency",e=>e.consistency,{suffix:"%",maximumFractionDigits:0}),u("avgScore","Average Score",e=>e.avgScore,{suffix:"%",maximumFractionDigits:0}),u("count","Count",e=>e.count)],[]),V=d.useCallback(e=>c?e==="crisis_map"?c.crisisMaps.length:e==="drone_image"?c.droneImages.length:0:0,[c]),de=d.useCallback(e=>{if(!c)return[];const r=e==="crisis_map"?c.crisisMaps:c.droneImages,s={};return r.forEach(a=>{a.countries&&a.countries.forEach(n=>{n.r_code&&(s[n.r_code]=(s[n.r_code]||0)+1)})}),Object.entries(s).filter(([,a])=>a>0).map(([a,n])=>({name:N.find(o=>o.r_code===a)?.label||a,value:n}))},[c,N]),ue=d.useCallback(e=>{if(!c)return[];const r=e==="crisis_map"?c.crisisMaps:c.droneImages,s={};r.forEach(n=>{n.countries&&n.countries.forEach(o=>{o.r_code&&(s[o.r_code]=(s[o.r_code]||0)+1)})});const a=N.reduce((n,o)=>(o.r_code&&(n[o.r_code]={name:o.label,count:s[o.r_code]||0}),n),{});return Object.entries(a).sort(([,n],[,o])=>o.count-n.count).map(([,{name:n,count:o}],g)=>({id:g+1,name:n,count:o,percentage:r.length>0?Math.round(o/r.length*100):0}))},[c,N]),Re=d.useCallback(e=>{if(!c)return[];const r=e==="crisis_map"?c.crisisMaps:c.droneImages,s={};return r.forEach(a=>{a.source&&(s[a.source]=(s[a.source]||0)+1)}),Object.entries(s).filter(([,a])=>a>0).map(([a,n])=>({name:I.find(o=>o.s_code===a)?.label||a,value:n}))},[c,I]),Fe=d.useCallback(e=>{if(!c)return[];const r=e==="crisis_map"?c.crisisMaps:c.droneImages,s={};return r.forEach(a=>{a.source&&(s[a.source]=(s[a.source]||0)+1)}),Object.entries(s).sort(([,a],[,n])=>n-a).map(([a,n],o)=>({id:o+1,name:O(a),count:n,percentage:r.length>0?Math.round(n/r.length*100):0}))},[c,O]),me=d.useCallback(e=>{if(!c)return[];const r=e==="crisis_map"?c.crisisMaps:c.droneImages,s={};return r.forEach(a=>{a.event_type&&(s[a.event_type]=(s[a.event_type]||0)+1)}),Object.entries(s).filter(([,a])=>a>0).map(([a,n])=>({name:w.find(o=>o.t_code===a)?.label||a,value:n}))},[c,w]),ge=d.useCallback(e=>{if(!c)return[];const r=e==="crisis_map"?c.crisisMaps:c.droneImages,s={};return r.forEach(a=>{a.event_type&&(s[a.event_type]=(s[a.event_type]||0)+1)}),Object.entries(s).sort(([,a],[,n])=>n-a).map(([a,n],o)=>({id:o+1,name:Q(a),count:n,percentage:r.length>0?Math.round(n/r.length*100):0}))},[c,Q]),he=d.useCallback(e=>{if(!c)return"No data available";const r=e==="crisis_map"?c.crisisMaps:c.droneImages,s=new Set;r.forEach(o=>{o.model&&s.add(o.model)}),console.log(`Debug ${e}:`,{totalImages:r.length,usedModels:Array.from(s),availableEditTimes:Object.keys(c.modelEditTimes),modelEditTimesData:c.modelEditTimes});const n=Object.entries(c.modelEditTimes).filter(([o])=>s.has(o)).flatMap(([,o])=>o);return n.length===0?"No data available":A(B(n))},[c,A,B]),fe=d.useCallback(()=>{if(!c)return"No data available";const e=c.totalCaptions||0,r=c.percentageModified||0;return e>0?Math.round(r/e*100):0},[c]),ye=d.useCallback(()=>c&&c.deleteRate>=0?`${c.deleteRate}%`:"No data available",[c]),xe=d.useCallback(e=>{if(!c)return[];const r=e==="crisis_map"?c.crisisMaps:c.droneImages,s=new Set;return r.forEach(n=>{n.model&&s.add(n.model)}),Z.filter(n=>{const o=b.find(g=>g.label===n.name)?.m_code;return o&&s.has(o)})},[c,Z,b]),ve=d.useCallback(e=>{if(!c)return[];const r=e==="crisis_map"?c.crisisMaps:c.droneImages,s=new Set;return r.forEach(n=>{n.model&&s.add(n.model)}),ee.filter(n=>{const o=b.find(g=>g.label===n.name)?.m_code;return o&&s.has(o)})},[c,ee,b]),Ce=d.useCallback(e=>{if(!c)return[];const r=e==="crisis_map"?c.crisisMaps:c.droneImages,s={};return r.forEach(a=>{a.model&&(s[a.model]||(s[a.model]={count:0,deleteCount:0}),s[a.model].count++)}),Object.entries(s).map(([a,n],o)=>{const y=c.models?.[a]?.deleteCount||0,x=n.count>0?Math.round(y/n.count*100*10)/10:0;return{id:o+1,name:M(a),count:n.count,deleteCount:y,deleteRate:x}}).sort((a,n)=>n.count-a.count)},[c,M]),_e=d.useCallback(e=>{if(!c)return[];const r=e==="crisis_map"?c.crisisMaps:c.droneImages,s={};return r.forEach(a=>{a.model&&(s[a.model]||(s[a.model]={count:0,totalAccuracy:0,totalContext:0,totalUsability:0}),s[a.model].count++,a.accuracy!=null&&(s[a.model].totalAccuracy+=a.accuracy),a.context!=null&&(s[a.model].totalContext+=a.context),a.usability!=null&&(s[a.model].totalUsability+=a.usability))}),Object.entries(s).map(([a,n],o)=>({id:o+1,name:M(a),count:n.count,accuracy:n.count>0?Math.round(n.totalAccuracy/n.count):0,context:n.count>0?Math.round(n.totalContext/n.count):0,usability:n.count>0?Math.round(n.totalUsability/n.count):0,totalScore:n.count>0?Math.round((n.totalAccuracy+n.totalContext+n.totalUsability)/(3*n.count)):0})).sort((a,n)=>n.totalScore-a.totalScore)},[c,M]),He=d.useCallback(e=>{if(!c)return[];const r=e==="crisis_map"?c.crisisMaps:c.droneImages,s={};return r.forEach(a=>{a.source&&(s[a.source]||(s[a.source]={total:0,count:0,totalImages:0}),s[a.source].totalImages+=1,a.accuracy!=null&&(s[a.source].total+=a.accuracy,s[a.source].count+=1))}),Object.entries(s).map(([a,n],o)=>({id:o+1,source:O(a),avgQuality:n.count>0?Math.round(n.total/n.count):0,count:n.totalImages}))},[c,O]),je=d.useCallback(e=>{if(!c)return[];const r=e==="crisis_map"?c.crisisMaps:c.droneImages,s={};return r.forEach(a=>{a.event_type&&(s[a.event_type]||(s[a.event_type]={total:0,count:0,totalImages:0}),s[a.event_type].totalImages+=1,a.accuracy!=null&&(s[a.event_type].total+=a.accuracy,s[a.event_type].count+=1))}),Object.entries(s).map(([a,n],o)=>({id:o+1,eventType:Q(a),avgQuality:n.count>0?Math.round(n.total/n.count):0,count:n.totalImages}))},[c,Q]),pe=d.useCallback(e=>{if(!c)return[];const r=e==="crisis_map"?c.crisisMaps:c.droneImages,s=new Set;return r.forEach(n=>{n.model&&s.add(n.model)}),te.filter(n=>{const o=b.find(g=>g.label===n.name)?.m_code;return o&&s.has(o)})},[c,te,b]);if(Me)return t.jsx($,{children:t.jsx("div",{className:i.loadingContainer,children:t.jsx(Qe,{})})});if(!c)return t.jsx($,{children:t.jsx("div",{className:i.errorContainer,children:t.jsx("div",{className:"text-red-500",children:"Failed to load analytics data. Please try again."})})});const R=["#F5333F","#F64752","#F75C65","#F87079","#F9858C","#FA999F","#FBADB2","#FCC2C5"];return t.jsx($,{children:t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsx("div",{className:i.tabSelector,children:t.jsx(Ue,{name:"analytics-view",value:W,onChange:e=>{(e==="crisis_maps"||e==="drone_images")&&J(e)},options:Be,keySelector:e=>e.key,labelSelector:e=>e.label})}),W==="crisis_maps"?t.jsxs("div",{className:i.chartGrid,children:[t.jsxs(_,{heading:"Summary Statistics",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:[t.jsxs("div",{className:i.summaryStatsCards,children:[t.jsxs("div",{className:i.summaryStatsCard,children:[t.jsx("div",{className:i.summaryStatsCardValue,children:V("crisis_map")}),t.jsx("div",{className:i.summaryStatsCardLabel,children:"Total Crisis Maps"})]}),t.jsxs("div",{className:i.summaryStatsCard,children:[t.jsx("div",{className:i.summaryStatsCardValue,children:"2000"}),t.jsx("div",{className:i.summaryStatsCardLabel,children:"Target Amount"})]})]}),t.jsxs("div",{className:i.progressSection,children:[t.jsxs("div",{className:i.progressLabel,children:[t.jsx("span",{children:"Progress towards target"}),t.jsxs("span",{children:[Math.round(V("crisis_map")/2e3*100),"%"]})]}),t.jsx(be,{value:V("crisis_map"),totalValue:2e3})]})]}),t.jsxs(_,{heading:"Distribution Analysis",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:[t.jsxs("div",{className:i.userInteractionCards,children:[t.jsxs("div",{className:i.userInteractionCard,children:[t.jsx("div",{className:i.userInteractionCardLabel,children:"Regions Distribution"}),t.jsx("div",{className:i.chartContainer,children:t.jsx(F,{data:de("crisis_map"),valueSelector:e=>e.value,labelSelector:e=>e.name,keySelector:e=>e.name,colors:R,showPercentageInLegend:!0})}),t.jsx(p,{name:"view-regions-details",variant:P?"primary":"secondary",onClick:()=>j(P?"none":"regions"),className:i.userInteractionCardButton,children:P?"Hide Details":"View Details"})]}),t.jsxs("div",{className:i.userInteractionCard,children:[t.jsx("div",{className:i.userInteractionCardLabel,children:"Sources Distribution"}),t.jsx("div",{className:i.chartContainer,children:t.jsx(F,{data:Re("crisis_map"),valueSelector:e=>e.value,labelSelector:e=>e.name,keySelector:e=>e.name,colors:R,showPercentageInLegend:!0})}),t.jsx(p,{name:"view-sources-details",variant:H?"primary":"secondary",onClick:()=>j(H?"none":"sources"),className:i.userInteractionCardButton,children:H?"Hide Details":"View Details"})]}),t.jsxs("div",{className:i.userInteractionCard,children:[t.jsx("div",{className:i.userInteractionCardLabel,children:"Types Distribution"}),t.jsx("div",{className:i.chartContainer,children:t.jsx(F,{data:me("crisis_map"),valueSelector:e=>e.value,labelSelector:e=>e.name,keySelector:e=>e.name,colors:R,showPercentageInLegend:!0})}),t.jsx(p,{name:"view-types-details",variant:E?"primary":"secondary",onClick:()=>j(E?"none":"types"),className:i.userInteractionCardButton,children:E?"Hide Details":"View Details"})]})]}),P&&t.jsx("div",{className:i.modelPerformance,children:t.jsx(h,{data:ue("crisis_map"),columns:ae,keySelector:f,filtered:!1,pending:!1})}),H&&t.jsx("div",{className:i.modelPerformance,children:t.jsx(h,{data:Fe("crisis_map"),columns:Ve,keySelector:f,filtered:!1,pending:!1})}),E&&t.jsx("div",{className:i.modelPerformance,children:t.jsx(h,{data:ge("crisis_map"),columns:se,keySelector:f,filtered:!1,pending:!1})})]}),t.jsxs(_,{heading:"User Interaction Statistics",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:[t.jsxs("div",{className:i.userInteractionCards,children:[t.jsxs("div",{className:i.userInteractionCard,children:[t.jsx("div",{className:i.userInteractionCardValue,children:he("crisis_map")}),t.jsx("div",{className:i.userInteractionCardLabel,children:"Median Edit Time"}),t.jsx(p,{name:"view-edit-time-details",variant:D?"primary":"secondary",onClick:()=>j(D?"none":"editTime"),className:i.userInteractionCardButton,children:D?"Hide Details":"View Details"})]}),t.jsxs("div",{className:i.userInteractionCard,children:[t.jsx("div",{className:i.userInteractionCardValue,children:fe()}),t.jsx("div",{className:i.userInteractionCardLabel,children:"Median % Modified"}),t.jsx(p,{name:"view-percentage-details",variant:T?"primary":"secondary",onClick:()=>j(T?"none":"percentage"),className:i.userInteractionCardButton,children:T?"Hide Details":"View Details"})]}),t.jsxs("div",{className:i.userInteractionCard,children:[t.jsx("div",{className:i.userInteractionCardValue,children:ye()}),t.jsx("div",{className:i.userInteractionCardLabel,children:"Delete Rate"}),t.jsx(p,{name:"view-delete-details",variant:k?"primary":"secondary",onClick:()=>j(k?"none":"delete"),className:i.userInteractionCardButton,children:k?"Hide Details":"View Details"})]})]}),D&&t.jsx("div",{className:i.modelPerformance,children:t.jsx(h,{data:xe("crisis_map"),columns:re,keySelector:f,filtered:!1,pending:!1})}),T&&t.jsx("div",{className:i.modelPerformance,children:t.jsx(h,{data:ve("crisis_map"),columns:ie,keySelector:f,filtered:!1,pending:!1})}),k&&t.jsx("div",{className:i.modelPerformance,children:t.jsx(h,{data:Ce("crisis_map"),columns:oe,keySelector:f,filtered:!1,pending:!1})})]}),t.jsx(_,{heading:"Model Performance",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:t.jsx("div",{className:i.modelPerformance,children:t.jsx(h,{data:_e("crisis_map"),columns:ne,keySelector:f,filtered:!1,pending:!1})})}),t.jsx(_,{heading:"Quality-Source Correlation",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:t.jsx("div",{className:i.tableContainer,children:t.jsx(h,{data:He("crisis_map"),columns:Ae,keySelector:f,filtered:!1,pending:!1})})}),t.jsx(_,{heading:"Quality-Event Type Correlation",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:t.jsx("div",{className:i.tableContainer,children:t.jsx(h,{data:je("crisis_map"),columns:ce,keySelector:f,filtered:!1,pending:!1})})}),t.jsx(_,{heading:"Model Consistency Analysis",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:t.jsx("div",{className:i.tableContainer,children:t.jsx(h,{data:pe("crisis_map"),columns:le,keySelector:f,filtered:!1,pending:!1})})})]}):t.jsxs("div",{className:i.chartGrid,children:[t.jsxs(_,{heading:"Summary Statistics",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:[t.jsxs("div",{className:i.summaryStatsCards,children:[t.jsxs("div",{className:i.summaryStatsCard,children:[t.jsx("div",{className:i.summaryStatsCardValue,children:V("drone_image")}),t.jsx("div",{className:i.summaryStatsCardLabel,children:"Total Drone Images"})]}),t.jsxs("div",{className:i.summaryStatsCard,children:[t.jsx("div",{className:i.summaryStatsCardValue,children:"2000"}),t.jsx("div",{className:i.summaryStatsCardLabel,children:"Target Amount"})]})]}),t.jsxs("div",{className:i.progressSection,children:[t.jsxs("div",{className:i.progressLabel,children:[t.jsx("span",{children:"Progress towards target"}),t.jsxs("span",{children:[Math.round(V("drone_image")/2e3*100),"%"]})]}),t.jsx(be,{value:V("drone_image"),totalValue:2e3})]})]}),t.jsxs(_,{heading:"Distribution Analysis",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:[t.jsxs("div",{className:i.userInteractionCards,children:[t.jsxs("div",{className:i.userInteractionCard,children:[t.jsx("div",{className:i.userInteractionCardLabel,children:"Regions Distribution"}),t.jsx("div",{className:i.chartContainer,children:t.jsx(F,{data:de("drone_image"),valueSelector:e=>e.value,labelSelector:e=>e.name,keySelector:e=>e.name,colors:R,showPercentageInLegend:!0})}),t.jsx(p,{name:"view-regions-details",variant:P?"primary":"secondary",onClick:()=>j(P?"none":"regions"),className:i.userInteractionCardButton,children:P?"Hide Details":"View Details"})]}),t.jsxs("div",{className:i.userInteractionCard,children:[t.jsx("div",{className:i.userInteractionCardLabel,children:"Types Distribution"}),t.jsx("div",{className:i.chartContainer,children:t.jsx(F,{data:me("drone_image"),valueSelector:e=>e.value,labelSelector:e=>e.name,keySelector:e=>e.name,colors:R,showPercentageInLegend:!0})}),t.jsx(p,{name:"view-types-details",variant:E?"primary":"secondary",onClick:()=>j(E?"none":"types"),className:i.userInteractionCardButton,children:E?"Hide Details":"View Details"})]})]}),P&&t.jsx("div",{className:i.modelPerformance,children:t.jsx(h,{data:ue("drone_image"),columns:ae,keySelector:f,filtered:!1,pending:!1})}),E&&t.jsx("div",{className:i.modelPerformance,children:t.jsx(h,{data:ge("drone_image"),columns:se,keySelector:f,filtered:!1,pending:!1})})]}),t.jsxs(_,{heading:"User Interaction Statistics",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:[t.jsxs("div",{className:i.userInteractionCards,children:[t.jsxs("div",{className:i.userInteractionCard,children:[t.jsx("div",{className:i.userInteractionCardValue,children:he("drone_image")}),t.jsx("div",{className:i.userInteractionCardLabel,children:"Median Edit Time"}),t.jsx(p,{name:"view-edit-time-details",variant:D?"primary":"secondary",onClick:()=>j(D?"none":"editTime"),className:i.userInteractionCardButton,children:D?"Hide Details":"View Details"})]}),t.jsxs("div",{className:i.userInteractionCard,children:[t.jsx("div",{className:i.userInteractionCardValue,children:fe()}),t.jsx("div",{className:i.userInteractionCardLabel,children:"Median % Modified"}),t.jsx(p,{name:"view-percentage-details",variant:T?"primary":"secondary",onClick:()=>j(T?"none":"percentage"),className:i.userInteractionCardButton,children:T?"Hide Details":"View Details"})]}),t.jsxs("div",{className:i.userInteractionCard,children:[t.jsx("div",{className:i.userInteractionCardValue,children:ye()}),t.jsx("div",{className:i.userInteractionCardLabel,children:"Delete Rate"}),t.jsx(p,{name:"view-delete-details",variant:k?"primary":"secondary",onClick:()=>j(k?"none":"delete"),className:i.userInteractionCardButton,children:k?"Hide Details":"View Details"})]})]}),D&&t.jsx("div",{className:i.modelPerformance,children:t.jsx(h,{data:xe("drone_image"),columns:re,keySelector:f,filtered:!1,pending:!1})}),T&&t.jsx("div",{className:i.modelPerformance,children:t.jsx(h,{data:ve("drone_image"),columns:ie,keySelector:f,filtered:!1,pending:!1})}),k&&t.jsx("div",{className:i.modelPerformance,children:t.jsx(h,{data:Ce("drone_image"),columns:oe,keySelector:f,filtered:!1,pending:!1})})]}),t.jsx(_,{heading:"Model Performance",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:t.jsx("div",{className:i.modelPerformance,children:t.jsx(h,{data:_e("drone_image"),columns:ne,keySelector:f,filtered:!1,pending:!1})})}),t.jsx(_,{heading:"Quality-Event Type Correlation",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:t.jsx("div",{className:i.tableContainer,children:t.jsx(h,{data:je("drone_image"),columns:ce,keySelector:f,filtered:!1,pending:!1})})}),t.jsx(_,{heading:"Model Consistency Analysis",headingLevel:3,withHeaderBorder:!0,withInternalPadding:!0,children:t.jsx("div",{className:i.tableContainer,children:t.jsx(h,{data:pe("drone_image"),columns:le,keySelector:f,filtered:!1,pending:!1})})})]})]})})}export{ut as default}; diff --git a/py_backend/static/assets/useAdmin-6S8boYmH.js b/py_backend/static/assets/useAdmin-6S8boYmH.js new file mode 100644 index 0000000000000000000000000000000000000000..65477d9a0f4229e0381f3527a99c12995a2033b1 --- /dev/null +++ b/py_backend/static/assets/useAdmin-6S8boYmH.js @@ -0,0 +1 @@ +import{r}from"./vendor-react-BxsGb6Ph.js";import{A as o}from"./index-C6NSRolP.js";const i=()=>{const t=r.useContext(o);if(t===void 0)throw new Error("useAdmin must be used within an AdminProvider");return t};export{i as u}; diff --git a/py_backend/static/assets/vendor-DxpCibxB.js b/py_backend/static/assets/vendor-DxpCibxB.js new file mode 100644 index 0000000000000000000000000000000000000000..62519081e13de4cda6d263b5a3aba9a92cb60a02 --- /dev/null +++ b/py_backend/static/assets/vendor-DxpCibxB.js @@ -0,0 +1,28 @@ +import{r as C}from"./vendor-react-BxsGb6Ph.js";var na=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function aa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var pt={exports:{}},vt={};/** + * @license React + * scheduler.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Vt;function zr(){return Vt||(Vt=1,function(e){function t(y,L){var U=y.length;y.push(L);e:for(;0>>1,W=y[H];if(0>>1;Ha(ie,U))oea(ce,ie)?(y[H]=ce,y[oe]=U,H=oe):(y[H]=ie,y[ue]=U,H=ue);else if(oea(ce,U))y[H]=ce,y[oe]=U,H=oe;else break e}}return L}function a(y,L){var U=y.sortIndex-L.sortIndex;return U!==0?U:y.id-L.id}if(typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var o=Date,c=o.now();e.unstable_now=function(){return o.now()-c}}var s=[],m=[],v=1,f=null,g=3,w=!1,S=!1,R=!1,_=typeof setTimeout=="function"?setTimeout:null,z=typeof clearTimeout=="function"?clearTimeout:null,F=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function G(y){for(var L=r(m);L!==null;){if(L.callback===null)n(m);else if(L.startTime<=y)n(m),L.sortIndex=L.expirationTime,t(s,L);else break;L=r(m)}}function re(y){if(R=!1,G(y),!S)if(r(s)!==null)S=!0,Re(Z);else{var L=r(m);L!==null&&Pe(re,L.startTime-y)}}function Z(y,L){S=!1,R&&(R=!1,z(B),B=-1),w=!0;var U=g;try{for(G(L),f=r(s);f!==null&&(!(f.expirationTime>L)||y&&!ne());){var H=f.callback;if(typeof H=="function"){f.callback=null,g=f.priorityLevel;var W=H(f.expirationTime<=L);L=e.unstable_now(),typeof W=="function"?f.callback=W:f===r(s)&&n(s),G(L)}else n(s);f=r(s)}if(f!==null)var fe=!0;else{var ue=r(m);ue!==null&&Pe(re,ue.startTime-L),fe=!1}return fe}finally{f=null,g=U,w=!1}}var me=!1,h=null,B=-1,Q=5,V=-1;function ne(){return!(e.unstable_now()-Vy||125H?(y.sortIndex=U,t(m,y),r(s)===null&&y===r(m)&&(R?(z(B),B=-1):R=!0,Pe(re,U-H))):(y.sortIndex=W,t(s,y),S||w||(S=!0,Re(Z))),y},e.unstable_shouldYield=ne,e.unstable_wrapCallback=function(y){var L=g;return function(){var U=g;g=L;try{return y.apply(this,arguments)}finally{g=U}}}}(vt)),vt}var $t;function ia(){return $t||($t=1,pt.exports=zr()),pt.exports}/** + * @remix-run/router v1.23.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function J(){return J=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function ke(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Hr(){return Math.random().toString(36).substr(2,8)}function Kt(e,t){return{usr:e.state,key:e.key,idx:t}}function Ge(e,t,r,n){return r===void 0&&(r=null),J({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Ce(t):t,{state:r,key:t&&t.key||n||Hr()})}function qe(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function Ce(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function Wr(e,t,r,n){n===void 0&&(n={});let{window:a=document.defaultView,v5Compat:u=!1}=n,o=a.history,c=q.Pop,s=null,m=v();m==null&&(m=0,o.replaceState(J({},o.state,{idx:m}),""));function v(){return(o.state||{idx:null}).idx}function f(){c=q.Pop;let _=v(),z=_==null?null:_-m;m=_,s&&s({action:c,location:R.location,delta:z})}function g(_,z){c=q.Push;let F=Ge(R.location,_,z);m=v()+1;let G=Kt(F,m),re=R.createHref(F);try{o.pushState(G,"",re)}catch(Z){if(Z instanceof DOMException&&Z.name==="DataCloneError")throw Z;a.location.assign(re)}u&&s&&s({action:c,location:R.location,delta:1})}function w(_,z){c=q.Replace;let F=Ge(R.location,_,z);m=v();let G=Kt(F,m),re=R.createHref(F);o.replaceState(G,"",re),u&&s&&s({action:c,location:R.location,delta:0})}function S(_){let z=a.location.origin!=="null"?a.location.origin:a.location.href,F=typeof _=="string"?_:qe(_);return F=F.replace(/ $/,"%20"),N(z,"No window.location.(origin|href) available to create URL for href: "+F),new URL(F,z)}let R={get action(){return c},get location(){return e(a,o)},listen(_){if(s)throw new Error("A history only accepts one active listener");return a.addEventListener(Jt,f),s=_,()=>{a.removeEventListener(Jt,f),s=null}},createHref(_){return t(a,_)},createURL:S,encodeLocation(_){let z=S(_);return{pathname:z.pathname,search:z.search,hash:z.hash}},push:g,replace:w,go(_){return o.go(_)}};return R}var k;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(k||(k={}));const Vr=new Set(["lazy","caseSensitive","path","id","index","children"]);function $r(e){return e.index===!0}function ut(e,t,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),e.map((a,u)=>{let o=[...r,String(u)],c=typeof a.id=="string"?a.id:o.join("-");if(N(a.index!==!0||!a.children,"Cannot specify children on an index route"),N(!n[c],'Found a route id collision on id "'+c+`". Route id's must be globally unique within Data Router usages`),$r(a)){let s=J({},a,t(a),{id:c});return n[c]=s,s}else{let s=J({},a,t(a),{id:c,children:void 0});return n[c]=s,a.children&&(s.children=ut(a.children,t,o,n)),s}})}function Ue(e,t,r){return r===void 0&&(r="/"),st(e,t,r,!1)}function st(e,t,r,n){let a=typeof t=="string"?Ce(t):t,u=Qe(a.pathname||"/",r);if(u==null)return null;let o=dr(e);Kr(o);let c=null;for(let s=0;c==null&&s{let s={relativePath:c===void 0?u.path||"":c,caseSensitive:u.caseSensitive===!0,childrenIndex:o,route:u};s.relativePath.startsWith("/")&&(N(s.relativePath.startsWith(n),'Absolute route path "'+s.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),s.relativePath=s.relativePath.slice(n.length));let m=we([n,s.relativePath]),v=r.concat(s);u.children&&u.children.length>0&&(N(u.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+m+'".')),dr(u.children,t,v,m)),!(u.path==null&&!u.index)&&t.push({path:m,score:en(m,u.index),routesMeta:v})};return e.forEach((u,o)=>{var c;if(u.path===""||!((c=u.path)!=null&&c.includes("?")))a(u,o);else for(let s of cr(u.path))a(u,o,s)}),t}function cr(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),u=r.replace(/\?$/,"");if(n.length===0)return a?[u,""]:[u];let o=cr(n.join("/")),c=[];return c.push(...o.map(s=>s===""?u:[u,s].join("/"))),a&&c.push(...o),c.map(s=>e.startsWith("/")&&s===""?"/":s)}function Kr(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:tn(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const Yr=/^:[\w-]+$/,Gr=3,Xr=2,qr=1,Qr=10,Zr=-2,Yt=e=>e==="*";function en(e,t){let r=e.split("/"),n=r.length;return r.some(Yt)&&(n+=Zr),t&&(n+=Xr),r.filter(a=>!Yt(a)).reduce((a,u)=>a+(Yr.test(u)?Gr:u===""?qr:Qr),n)}function tn(e,t){return e.length===t.length&&e.slice(0,-1).every((n,a)=>n===t[a])?e[e.length-1]-t[t.length-1]:0}function rn(e,t,r){r===void 0&&(r=!1);let{routesMeta:n}=e,a={},u="/",o=[];for(let c=0;c{let{paramName:g,isOptional:w}=v;if(g==="*"){let R=c[f]||"";o=u.slice(0,u.length-R.length).replace(/(.)\/+$/,"$1")}const S=c[f];return w&&!S?m[g]=void 0:m[g]=(S||"").replace(/%2F/g,"/"),m},{}),pathname:u,pathnameBase:o,pattern:e}}function nn(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),ke(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,c,s)=>(n.push({paramName:c,isOptional:s!=null}),s?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function an(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ke(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Qe(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function on(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?Ce(e):e;return{pathname:r?r.startsWith("/")?r:ln(r,t):t,search:un(n),hash:dn(a)}}function ln(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function gt(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function fr(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Dt(e,t){let r=fr(e);return t?r.map((n,a)=>a===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function xt(e,t,r,n){n===void 0&&(n=!1);let a;typeof e=="string"?a=Ce(e):(a=J({},e),N(!a.pathname||!a.pathname.includes("?"),gt("?","pathname","search",a)),N(!a.pathname||!a.pathname.includes("#"),gt("#","pathname","hash",a)),N(!a.search||!a.search.includes("#"),gt("#","search","hash",a)));let u=e===""||a.pathname==="",o=u?"/":a.pathname,c;if(o==null)c=r;else{let f=t.length-1;if(!n&&o.startsWith("..")){let g=o.split("/");for(;g[0]==="..";)g.shift(),f-=1;a.pathname=g.join("/")}c=f>=0?t[f]:"/"}let s=on(a,c),m=o&&o!=="/"&&o.endsWith("/"),v=(u||o===".")&&r.endsWith("/");return!s.pathname.endsWith("/")&&(m||v)&&(s.pathname+="/"),s}const we=e=>e.join("/").replace(/\/\/+/g,"/"),sn=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),un=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,dn=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class wt{constructor(t,r,n,a){a===void 0&&(a=!1),this.status=t,this.statusText=r||"",this.internal=a,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function Xe(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const hr=["post","put","patch","delete"],cn=new Set(hr),fn=["get",...hr],hn=new Set(fn),mn=new Set([301,302,303,307,308]),pn=new Set([307,308]),yt={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},vn={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Je={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},St=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,gn=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),mr="remix-router-transitions";function la(e){const t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",n=!r;N(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let a;if(e.mapRouteProperties)a=e.mapRouteProperties;else if(e.detectErrorBoundary){let i=e.detectErrorBoundary;a=l=>({hasErrorBoundary:i(l)})}else a=gn;let u={},o=ut(e.routes,a,void 0,u),c,s=e.basename||"/",m=e.dataStrategy||En,v=e.patchRoutesOnNavigation,f=J({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),g=null,w=new Set,S=null,R=null,_=null,z=e.hydrationData!=null,F=Ue(o,e.history.location,s),G=!1,re=null;if(F==null&&!v){let i=se(404,{pathname:e.history.location.pathname}),{matches:l,route:d}=or(o);F=l,re={[d.id]:i}}F&&!e.hydrationData&&nt(F,o,e.history.location.pathname).active&&(F=null);let Z;if(F)if(F.some(i=>i.route.lazy))Z=!1;else if(!F.some(i=>i.route.loader))Z=!0;else if(f.v7_partialHydration){let i=e.hydrationData?e.hydrationData.loaderData:null,l=e.hydrationData?e.hydrationData.errors:null;if(l){let d=F.findIndex(p=>l[p.route.id]!==void 0);Z=F.slice(0,d+1).every(p=>!Rt(p.route,i,l))}else Z=F.every(d=>!Rt(d.route,i,l))}else Z=e.hydrationData!=null;else if(Z=!1,F=[],f.v7_partialHydration){let i=nt(null,o,e.history.location.pathname);i.active&&i.matches&&(G=!0,F=i.matches)}let me,h={historyAction:e.history.action,location:e.history.location,matches:F,initialized:Z,navigation:yt,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||re,fetchers:new Map,blockers:new Map},B=q.Pop,Q=!1,V,ne=!1,ae=new Map,ee=null,ve=!1,ge=!1,Re=[],Pe=new Set,y=new Map,L=0,U=-1,H=new Map,W=new Set,fe=new Map,ue=new Map,ie=new Set,oe=new Map,ce=new Map,et;function Dr(){if(g=e.history.listen(i=>{let{action:l,location:d,delta:p}=i;if(et){et(),et=void 0;return}ke(ce.size===0||p!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let b=kt({currentLocation:h.location,nextLocation:d,historyAction:l});if(b&&p!=null){let M=new Promise(T=>{et=T});e.history.go(p*-1),rt(b,{state:"blocked",location:d,proceed(){rt(b,{state:"proceeding",proceed:void 0,reset:void 0,location:d}),M.then(()=>e.history.go(p))},reset(){let T=new Map(h.blockers);T.set(b,Je),le({blockers:T})}});return}return Le(l,d)}),r){Nn(t,ae);let i=()=>jn(t,ae);t.addEventListener("pagehide",i),ee=()=>t.removeEventListener("pagehide",i)}return h.initialized||Le(q.Pop,h.location,{initialHydration:!0}),me}function xr(){g&&g(),ee&&ee(),w.clear(),V&&V.abort(),h.fetchers.forEach((i,l)=>tt(l)),h.blockers.forEach((i,l)=>Bt(l))}function Sr(i){return w.add(i),()=>w.delete(i)}function le(i,l){l===void 0&&(l={}),h=J({},h,i);let d=[],p=[];f.v7_fetcherPersist&&h.fetchers.forEach((b,M)=>{b.state==="idle"&&(ie.has(M)?p.push(M):d.push(M))}),ie.forEach(b=>{!h.fetchers.has(b)&&!y.has(b)&&p.push(b)}),[...w].forEach(b=>b(h,{deletedFetchers:p,viewTransitionOpts:l.viewTransitionOpts,flushSync:l.flushSync===!0})),f.v7_fetcherPersist?(d.forEach(b=>h.fetchers.delete(b)),p.forEach(b=>tt(b))):p.forEach(b=>ie.delete(b))}function Ne(i,l,d){var p,b;let{flushSync:M}=d===void 0?{}:d,T=h.actionData!=null&&h.navigation.formMethod!=null&&he(h.navigation.formMethod)&&h.navigation.state==="loading"&&((p=i.state)==null?void 0:p._isRedirect)!==!0,P;l.actionData?Object.keys(l.actionData).length>0?P=l.actionData:P=null:T?P=h.actionData:P=null;let D=l.loaderData?ar(h.loaderData,l.loaderData,l.matches||[],l.errors):h.loaderData,E=h.blockers;E.size>0&&(E=new Map(E),E.forEach((j,te)=>E.set(te,Je)));let x=Q===!0||h.navigation.formMethod!=null&&he(h.navigation.formMethod)&&((b=i.state)==null?void 0:b._isRedirect)!==!0;c&&(o=c,c=void 0),ve||B===q.Pop||(B===q.Push?e.history.push(i,i.state):B===q.Replace&&e.history.replace(i,i.state));let I;if(B===q.Pop){let j=ae.get(h.location.pathname);j&&j.has(i.pathname)?I={currentLocation:h.location,nextLocation:i}:ae.has(i.pathname)&&(I={currentLocation:i,nextLocation:h.location})}else if(ne){let j=ae.get(h.location.pathname);j?j.add(i.pathname):(j=new Set([i.pathname]),ae.set(h.location.pathname,j)),I={currentLocation:h.location,nextLocation:i}}le(J({},l,{actionData:P,loaderData:D,historyAction:B,location:i,initialized:!0,navigation:yt,revalidation:"idle",restoreScrollPosition:Ht(i,l.matches||h.matches),preventScrollReset:x,blockers:E}),{viewTransitionOpts:I,flushSync:M===!0}),B=q.Pop,Q=!1,ne=!1,ve=!1,ge=!1,Re=[]}async function Ut(i,l){if(typeof i=="number"){e.history.go(i);return}let d=Et(h.location,h.matches,s,f.v7_prependBasename,i,f.v7_relativeSplatPath,l?.fromRouteId,l?.relative),{path:p,submission:b,error:M}=Xt(f.v7_normalizeFormMethod,!1,d,l),T=h.location,P=Ge(h.location,p,l&&l.state);P=J({},P,e.history.encodeLocation(P));let D=l&&l.replace!=null?l.replace:void 0,E=q.Push;D===!0?E=q.Replace:D===!1||b!=null&&he(b.formMethod)&&b.formAction===h.location.pathname+h.location.search&&(E=q.Replace);let x=l&&"preventScrollReset"in l?l.preventScrollReset===!0:void 0,I=(l&&l.flushSync)===!0,j=kt({currentLocation:T,nextLocation:P,historyAction:E});if(j){rt(j,{state:"blocked",location:P,proceed(){rt(j,{state:"proceeding",proceed:void 0,reset:void 0,location:P}),Ut(i,l)},reset(){let te=new Map(h.blockers);te.set(j,Je),le({blockers:te})}});return}return await Le(E,P,{submission:b,pendingError:M,preventScrollReset:x,replace:l&&l.replace,enableViewTransition:l&&l.viewTransition,flushSync:I})}function Mr(){if(ct(),le({revalidation:"loading"}),h.navigation.state!=="submitting"){if(h.navigation.state==="idle"){Le(h.historyAction,h.location,{startUninterruptedRevalidation:!0});return}Le(B||h.historyAction,h.navigation.location,{overrideNavigation:h.navigation,enableViewTransition:ne===!0})}}async function Le(i,l,d){V&&V.abort(),V=null,B=i,ve=(d&&d.startUninterruptedRevalidation)===!0,Or(h.location,h.matches),Q=(d&&d.preventScrollReset)===!0,ne=(d&&d.enableViewTransition)===!0;let p=c||o,b=d&&d.overrideNavigation,M=d!=null&&d.initialHydration&&h.matches&&h.matches.length>0&&!G?h.matches:Ue(p,l,s),T=(d&&d.flushSync)===!0;if(M&&h.initialized&&!ge&&Mn(h.location,l)&&!(d&&d.submission&&he(d.submission.formMethod))){Ne(l,{matches:M},{flushSync:T});return}let P=nt(M,p,l.pathname);if(P.active&&P.matches&&(M=P.matches),!M){let{error:$,notFoundMatches:A,route:K}=ft(l.pathname);Ne(l,{matches:A,loaderData:{},errors:{[K.id]:$}},{flushSync:T});return}V=new AbortController;let D=Be(e.history,l,V.signal,d&&d.submission),E;if(d&&d.pendingError)E=[Fe(M).route.id,{type:k.error,error:d.pendingError}];else if(d&&d.submission&&he(d.submission.formMethod)){let $=await Cr(D,l,d.submission,M,P.active,{replace:d.replace,flushSync:T});if($.shortCircuited)return;if($.pendingActionResult){let[A,K]=$.pendingActionResult;if(de(K)&&Xe(K.error)&&K.error.status===404){V=null,Ne(l,{matches:$.matches,loaderData:{},errors:{[A]:K.error}});return}}M=$.matches||M,E=$.pendingActionResult,b=bt(l,d.submission),T=!1,P.active=!1,D=Be(e.history,D.url,D.signal)}let{shortCircuited:x,matches:I,loaderData:j,errors:te}=await Lr(D,l,M,P.active,b,d&&d.submission,d&&d.fetcherSubmission,d&&d.replace,d&&d.initialHydration===!0,T,E);x||(V=null,Ne(l,J({matches:I||M},ir(E),{loaderData:j,errors:te})))}async function Cr(i,l,d,p,b,M){M===void 0&&(M={}),ct();let T=Fn(l,d);if(le({navigation:T},{flushSync:M.flushSync===!0}),b){let E=await at(p,l.pathname,i.signal);if(E.type==="aborted")return{shortCircuited:!0};if(E.type==="error"){let x=Fe(E.partialMatches).route.id;return{matches:E.partialMatches,pendingActionResult:[x,{type:k.error,error:E.error}]}}else if(E.matches)p=E.matches;else{let{notFoundMatches:x,error:I,route:j}=ft(l.pathname);return{matches:x,pendingActionResult:[j.id,{type:k.error,error:I}]}}}let P,D=Ye(p,l);if(!D.route.action&&!D.route.lazy)P={type:k.error,error:se(405,{method:i.method,pathname:l.pathname,routeId:D.route.id})};else if(P=(await He("action",h,i,[D],p,null))[D.route.id],i.signal.aborted)return{shortCircuited:!0};if(Ie(P)){let E;return M&&M.replace!=null?E=M.replace:E=tr(P.response.headers.get("Location"),new URL(i.url),s)===h.location.pathname+h.location.search,await Te(i,P,!0,{submission:d,replace:E}),{shortCircuited:!0}}if(Me(P))throw se(400,{type:"defer-action"});if(de(P)){let E=Fe(p,D.route.id);return(M&&M.replace)!==!0&&(B=q.Push),{matches:p,pendingActionResult:[E.route.id,P]}}return{matches:p,pendingActionResult:[D.route.id,P]}}async function Lr(i,l,d,p,b,M,T,P,D,E,x){let I=b||bt(l,M),j=M||T||sr(I),te=!ve&&(!f.v7_partialHydration||!D);if(p){if(te){let Y=Ft(x);le(J({navigation:I},Y!==void 0?{actionData:Y}:{}),{flushSync:E})}let O=await at(d,l.pathname,i.signal);if(O.type==="aborted")return{shortCircuited:!0};if(O.type==="error"){let Y=Fe(O.partialMatches).route.id;return{matches:O.partialMatches,loaderData:{},errors:{[Y]:O.error}}}else if(O.matches)d=O.matches;else{let{error:Y,notFoundMatches:Oe,route:$e}=ft(l.pathname);return{matches:Oe,loaderData:{},errors:{[$e.id]:Y}}}}let $=c||o,[A,K]=Qt(e.history,h,d,j,l,f.v7_partialHydration&&D===!0,f.v7_skipActionErrorRevalidation,ge,Re,Pe,ie,fe,W,$,s,x);if(ht(O=>!(d&&d.some(Y=>Y.route.id===O))||A&&A.some(Y=>Y.route.id===O)),U=++L,A.length===0&&K.length===0){let O=Ot();return Ne(l,J({matches:d,loaderData:{},errors:x&&de(x[1])?{[x[0]]:x[1].error}:null},ir(x),O?{fetchers:new Map(h.fetchers)}:{}),{flushSync:E}),{shortCircuited:!0}}if(te){let O={};if(!p){O.navigation=I;let Y=Ft(x);Y!==void 0&&(O.actionData=Y)}K.length>0&&(O.fetchers=Tr(K)),le(O,{flushSync:E})}K.forEach(O=>{xe(O.key),O.controller&&y.set(O.key,O.controller)});let je=()=>K.forEach(O=>xe(O.key));V&&V.signal.addEventListener("abort",je);let{loaderResults:We,fetcherResults:be}=await It(h,d,A,K,i);if(i.signal.aborted)return{shortCircuited:!0};V&&V.signal.removeEventListener("abort",je),K.forEach(O=>y.delete(O.key));let pe=lt(We);if(pe)return await Te(i,pe.result,!0,{replace:P}),{shortCircuited:!0};if(pe=lt(be),pe)return W.add(pe.key),await Te(i,pe.result,!0,{replace:P}),{shortCircuited:!0};let{loaderData:mt,errors:Ve}=nr(h,d,We,x,K,be,oe);oe.forEach((O,Y)=>{O.subscribe(Oe=>{(Oe||O.done)&&oe.delete(Y)})}),f.v7_partialHydration&&D&&h.errors&&(Ve=J({},h.errors,Ve));let _e=Ot(),it=At(U),ot=_e||it||K.length>0;return J({matches:d,loaderData:mt,errors:Ve},ot?{fetchers:new Map(h.fetchers)}:{})}function Ft(i){if(i&&!de(i[1]))return{[i[0]]:i[1].data};if(h.actionData)return Object.keys(h.actionData).length===0?null:h.actionData}function Tr(i){return i.forEach(l=>{let d=h.fetchers.get(l.key),p=Ke(void 0,d?d.data:void 0);h.fetchers.set(l.key,p)}),new Map(h.fetchers)}function _r(i,l,d,p){if(n)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");xe(i);let b=(p&&p.flushSync)===!0,M=c||o,T=Et(h.location,h.matches,s,f.v7_prependBasename,d,f.v7_relativeSplatPath,l,p?.relative),P=Ue(M,T,s),D=nt(P,M,T);if(D.active&&D.matches&&(P=D.matches),!P){ye(i,l,se(404,{pathname:T}),{flushSync:b});return}let{path:E,submission:x,error:I}=Xt(f.v7_normalizeFormMethod,!0,T,p);if(I){ye(i,l,I,{flushSync:b});return}let j=Ye(P,E),te=(p&&p.preventScrollReset)===!0;if(x&&he(x.formMethod)){Ur(i,l,E,j,P,D.active,b,te,x);return}fe.set(i,{routeId:l,path:E}),Fr(i,l,E,j,P,D.active,b,te,x)}async function Ur(i,l,d,p,b,M,T,P,D){ct(),fe.delete(i);function E(X){if(!X.route.action&&!X.route.lazy){let Ae=se(405,{method:D.formMethod,pathname:d,routeId:l});return ye(i,l,Ae,{flushSync:T}),!0}return!1}if(!M&&E(p))return;let x=h.fetchers.get(i);De(i,In(D,x),{flushSync:T});let I=new AbortController,j=Be(e.history,d,I.signal,D);if(M){let X=await at(b,new URL(j.url).pathname,j.signal,i);if(X.type==="aborted")return;if(X.type==="error"){ye(i,l,X.error,{flushSync:T});return}else if(X.matches){if(b=X.matches,p=Ye(b,d),E(p))return}else{ye(i,l,se(404,{pathname:d}),{flushSync:T});return}}y.set(i,I);let te=L,A=(await He("action",h,j,[p],b,i))[p.route.id];if(j.signal.aborted){y.get(i)===I&&y.delete(i);return}if(f.v7_fetcherPersist&&ie.has(i)){if(Ie(A)||de(A)){De(i,Se(void 0));return}}else{if(Ie(A))if(y.delete(i),U>te){De(i,Se(void 0));return}else return W.add(i),De(i,Ke(D)),Te(j,A,!1,{fetcherSubmission:D,preventScrollReset:P});if(de(A)){ye(i,l,A.error);return}}if(Me(A))throw se(400,{type:"defer-action"});let K=h.navigation.location||h.location,je=Be(e.history,K,I.signal),We=c||o,be=h.navigation.state!=="idle"?Ue(We,h.navigation.location,s):h.matches;N(be,"Didn't find any matches after fetcher action");let pe=++L;H.set(i,pe);let mt=Ke(D,A.data);h.fetchers.set(i,mt);let[Ve,_e]=Qt(e.history,h,be,D,K,!1,f.v7_skipActionErrorRevalidation,ge,Re,Pe,ie,fe,W,We,s,[p.route.id,A]);_e.filter(X=>X.key!==i).forEach(X=>{let Ae=X.key,Wt=h.fetchers.get(Ae),kr=Ke(void 0,Wt?Wt.data:void 0);h.fetchers.set(Ae,kr),xe(Ae),X.controller&&y.set(Ae,X.controller)}),le({fetchers:new Map(h.fetchers)});let it=()=>_e.forEach(X=>xe(X.key));I.signal.addEventListener("abort",it);let{loaderResults:ot,fetcherResults:O}=await It(h,be,Ve,_e,je);if(I.signal.aborted)return;I.signal.removeEventListener("abort",it),H.delete(i),y.delete(i),_e.forEach(X=>y.delete(X.key));let Y=lt(ot);if(Y)return Te(je,Y.result,!1,{preventScrollReset:P});if(Y=lt(O),Y)return W.add(Y.key),Te(je,Y.result,!1,{preventScrollReset:P});let{loaderData:Oe,errors:$e}=nr(h,be,ot,void 0,_e,O,oe);if(h.fetchers.has(i)){let X=Se(A.data);h.fetchers.set(i,X)}At(pe),h.navigation.state==="loading"&&pe>U?(N(B,"Expected pending action"),V&&V.abort(),Ne(h.navigation.location,{matches:be,loaderData:Oe,errors:$e,fetchers:new Map(h.fetchers)})):(le({errors:$e,loaderData:ar(h.loaderData,Oe,be,$e),fetchers:new Map(h.fetchers)}),ge=!1)}async function Fr(i,l,d,p,b,M,T,P,D){let E=h.fetchers.get(i);De(i,Ke(D,E?E.data:void 0),{flushSync:T});let x=new AbortController,I=Be(e.history,d,x.signal);if(M){let A=await at(b,new URL(I.url).pathname,I.signal,i);if(A.type==="aborted")return;if(A.type==="error"){ye(i,l,A.error,{flushSync:T});return}else if(A.matches)b=A.matches,p=Ye(b,d);else{ye(i,l,se(404,{pathname:d}),{flushSync:T});return}}y.set(i,x);let j=L,$=(await He("loader",h,I,[p],b,i))[p.route.id];if(Me($)&&($=await Mt($,I.signal,!0)||$),y.get(i)===x&&y.delete(i),!I.signal.aborted){if(ie.has(i)){De(i,Se(void 0));return}if(Ie($))if(U>j){De(i,Se(void 0));return}else{W.add(i),await Te(I,$,!1,{preventScrollReset:P});return}if(de($)){ye(i,l,$.error);return}N(!Me($),"Unhandled fetcher deferred data"),De(i,Se($.data))}}async function Te(i,l,d,p){let{submission:b,fetcherSubmission:M,preventScrollReset:T,replace:P}=p===void 0?{}:p;l.response.headers.has("X-Remix-Revalidate")&&(ge=!0);let D=l.response.headers.get("Location");N(D,"Expected a Location header on the redirect Response"),D=tr(D,new URL(i.url),s);let E=Ge(h.location,D,{_isRedirect:!0});if(r){let A=!1;if(l.response.headers.has("X-Remix-Reload-Document"))A=!0;else if(St.test(D)){const K=e.history.createURL(D);A=K.origin!==t.location.origin||Qe(K.pathname,s)==null}if(A){P?t.location.replace(D):t.location.assign(D);return}}V=null;let x=P===!0||l.response.headers.has("X-Remix-Replace")?q.Replace:q.Push,{formMethod:I,formAction:j,formEncType:te}=h.navigation;!b&&!M&&I&&j&&te&&(b=sr(h.navigation));let $=b||M;if(pn.has(l.response.status)&&$&&he($.formMethod))await Le(x,E,{submission:J({},$,{formAction:D}),preventScrollReset:T||Q,enableViewTransition:d?ne:void 0});else{let A=bt(E,b);await Le(x,E,{overrideNavigation:A,fetcherSubmission:M,preventScrollReset:T||Q,enableViewTransition:d?ne:void 0})}}async function He(i,l,d,p,b,M){let T,P={};try{T=await Rn(m,i,l,d,p,b,M,u,a)}catch(D){return p.forEach(E=>{P[E.route.id]={type:k.error,error:D}}),P}for(let[D,E]of Object.entries(T))if(Cn(E)){let x=E.result;P[D]={type:k.redirect,response:xn(x,d,D,b,s,f.v7_relativeSplatPath)}}else P[D]=await Dn(E);return P}async function It(i,l,d,p,b){let M=i.matches,T=He("loader",i,b,d,l,null),P=Promise.all(p.map(async x=>{if(x.matches&&x.match&&x.controller){let j=(await He("loader",i,Be(e.history,x.path,x.controller.signal),[x.match],x.matches,x.key))[x.match.route.id];return{[x.key]:j}}else return Promise.resolve({[x.key]:{type:k.error,error:se(404,{pathname:x.path})}})})),D=await T,E=(await P).reduce((x,I)=>Object.assign(x,I),{});return await Promise.all([_n(l,D,b.signal,M,i.loaderData),Un(l,E,p)]),{loaderResults:D,fetcherResults:E}}function ct(){ge=!0,Re.push(...ht()),fe.forEach((i,l)=>{y.has(l)&&Pe.add(l),xe(l)})}function De(i,l,d){d===void 0&&(d={}),h.fetchers.set(i,l),le({fetchers:new Map(h.fetchers)},{flushSync:(d&&d.flushSync)===!0})}function ye(i,l,d,p){p===void 0&&(p={});let b=Fe(h.matches,l);tt(i),le({errors:{[b.route.id]:d},fetchers:new Map(h.fetchers)},{flushSync:(p&&p.flushSync)===!0})}function Nt(i){return ue.set(i,(ue.get(i)||0)+1),ie.has(i)&&ie.delete(i),h.fetchers.get(i)||vn}function tt(i){let l=h.fetchers.get(i);y.has(i)&&!(l&&l.state==="loading"&&H.has(i))&&xe(i),fe.delete(i),H.delete(i),W.delete(i),f.v7_fetcherPersist&&ie.delete(i),Pe.delete(i),h.fetchers.delete(i)}function Ir(i){let l=(ue.get(i)||0)-1;l<=0?(ue.delete(i),ie.add(i),f.v7_fetcherPersist||tt(i)):ue.set(i,l),le({fetchers:new Map(h.fetchers)})}function xe(i){let l=y.get(i);l&&(l.abort(),y.delete(i))}function jt(i){for(let l of i){let d=Nt(l),p=Se(d.data);h.fetchers.set(l,p)}}function Ot(){let i=[],l=!1;for(let d of W){let p=h.fetchers.get(d);N(p,"Expected fetcher: "+d),p.state==="loading"&&(W.delete(d),i.push(d),l=!0)}return jt(i),l}function At(i){let l=[];for(let[d,p]of H)if(p0}function Nr(i,l){let d=h.blockers.get(i)||Je;return ce.get(i)!==l&&ce.set(i,l),d}function Bt(i){h.blockers.delete(i),ce.delete(i)}function rt(i,l){let d=h.blockers.get(i)||Je;N(d.state==="unblocked"&&l.state==="blocked"||d.state==="blocked"&&l.state==="blocked"||d.state==="blocked"&&l.state==="proceeding"||d.state==="blocked"&&l.state==="unblocked"||d.state==="proceeding"&&l.state==="unblocked","Invalid blocker state transition: "+d.state+" -> "+l.state);let p=new Map(h.blockers);p.set(i,l),le({blockers:p})}function kt(i){let{currentLocation:l,nextLocation:d,historyAction:p}=i;if(ce.size===0)return;ce.size>1&&ke(!1,"A router only supports one blocker at a time");let b=Array.from(ce.entries()),[M,T]=b[b.length-1],P=h.blockers.get(M);if(!(P&&P.state==="proceeding")&&T({currentLocation:l,nextLocation:d,historyAction:p}))return M}function ft(i){let l=se(404,{pathname:i}),d=c||o,{matches:p,route:b}=or(d);return ht(),{notFoundMatches:p,route:b,error:l}}function ht(i){let l=[];return oe.forEach((d,p)=>{(!i||i(p))&&(d.cancel(),l.push(p),oe.delete(p))}),l}function jr(i,l,d){if(S=i,_=l,R=d||null,!z&&h.navigation===yt){z=!0;let p=Ht(h.location,h.matches);p!=null&&le({restoreScrollPosition:p})}return()=>{S=null,_=null,R=null}}function zt(i,l){return R&&R(i,l.map(p=>Jr(p,h.loaderData)))||i.key}function Or(i,l){if(S&&_){let d=zt(i,l);S[d]=_()}}function Ht(i,l){if(S){let d=zt(i,l),p=S[d];if(typeof p=="number")return p}return null}function nt(i,l,d){if(v)if(i){if(Object.keys(i[0].params).length>0)return{active:!0,matches:st(l,d,s,!0)}}else return{active:!0,matches:st(l,d,s,!0)||[]};return{active:!1,matches:null}}async function at(i,l,d,p){if(!v)return{type:"success",matches:i};let b=i;for(;;){let M=c==null,T=c||o,P=u;try{await v({signal:d,path:l,matches:b,fetcherKey:p,patch:(x,I)=>{d.aborted||er(x,I,T,P,a)}})}catch(x){return{type:"error",error:x,partialMatches:b}}finally{M&&!d.aborted&&(o=[...o])}if(d.aborted)return{type:"aborted"};let D=Ue(T,l,s);if(D)return{type:"success",matches:D};let E=st(T,l,s,!0);if(!E||b.length===E.length&&b.every((x,I)=>x.route.id===E[I].route.id))return{type:"success",matches:null};b=E}}function Ar(i){u={},c=ut(i,a,void 0,u)}function Br(i,l){let d=c==null;er(i,l,c||o,u,a),d&&(o=[...o],le({}))}return me={get basename(){return s},get future(){return f},get state(){return h},get routes(){return o},get window(){return t},initialize:Dr,subscribe:Sr,enableScrollRestoration:jr,navigate:Ut,fetch:_r,revalidate:Mr,createHref:i=>e.history.createHref(i),encodeLocation:i=>e.history.encodeLocation(i),getFetcher:Nt,deleteFetcher:Ir,dispose:xr,getBlocker:Nr,deleteBlocker:Bt,patchRoutes:Br,_internalFetchControllers:y,_internalActiveDeferreds:oe,_internalSetRoutes:Ar},me}function yn(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Et(e,t,r,n,a,u,o,c){let s,m;if(o){s=[];for(let f of t)if(s.push(f),f.route.id===o){m=f;break}}else s=t,m=t[t.length-1];let v=xt(a||".",Dt(s,u),Qe(e.pathname,r)||e.pathname,c==="path");if(a==null&&(v.search=e.search,v.hash=e.hash),(a==null||a===""||a===".")&&m){let f=Ct(v.search);if(m.route.index&&!f)v.search=v.search?v.search.replace(/^\?/,"?index&"):"?index";else if(!m.route.index&&f){let g=new URLSearchParams(v.search),w=g.getAll("index");g.delete("index"),w.filter(R=>R).forEach(R=>g.append("index",R));let S=g.toString();v.search=S?"?"+S:""}}return n&&r!=="/"&&(v.pathname=v.pathname==="/"?r:we([r,v.pathname])),qe(v)}function Xt(e,t,r,n){if(!n||!yn(n))return{path:r};if(n.formMethod&&!Tn(n.formMethod))return{path:r,error:se(405,{method:n.formMethod})};let a=()=>({path:r,error:se(400,{type:"invalid-body"})}),u=n.formMethod||"get",o=e?u.toUpperCase():u.toLowerCase(),c=gr(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!he(o))return a();let g=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((w,S)=>{let[R,_]=S;return""+w+R+"="+_+` +`},""):String(n.body);return{path:r,submission:{formMethod:o,formAction:c,formEncType:n.formEncType,formData:void 0,json:void 0,text:g}}}else if(n.formEncType==="application/json"){if(!he(o))return a();try{let g=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:o,formAction:c,formEncType:n.formEncType,formData:void 0,json:g,text:void 0}}}catch{return a()}}}N(typeof FormData=="function","FormData is not available in this environment");let s,m;if(n.formData)s=Pt(n.formData),m=n.formData;else if(n.body instanceof FormData)s=Pt(n.body),m=n.body;else if(n.body instanceof URLSearchParams)s=n.body,m=rr(s);else if(n.body==null)s=new URLSearchParams,m=new FormData;else try{s=new URLSearchParams(n.body),m=rr(s)}catch{return a()}let v={formMethod:o,formAction:c,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:m,json:void 0,text:void 0};if(he(v.formMethod))return{path:r,submission:v};let f=Ce(r);return t&&f.search&&Ct(f.search)&&s.append("index",""),f.search="?"+s,{path:qe(f),submission:v}}function qt(e,t,r){r===void 0&&(r=!1);let n=e.findIndex(a=>a.route.id===t);return n>=0?e.slice(0,r?n+1:n):e}function Qt(e,t,r,n,a,u,o,c,s,m,v,f,g,w,S,R){let _=R?de(R[1])?R[1].error:R[1].data:void 0,z=e.createURL(t.location),F=e.createURL(a),G=r;u&&t.errors?G=qt(r,Object.keys(t.errors)[0],!0):R&&de(R[1])&&(G=qt(r,R[0]));let re=R?R[1].statusCode:void 0,Z=o&&re&&re>=400,me=G.filter((B,Q)=>{let{route:V}=B;if(V.lazy)return!0;if(V.loader==null)return!1;if(u)return Rt(V,t.loaderData,t.errors);if(bn(t.loaderData,t.matches[Q],B)||s.some(ee=>ee===B.route.id))return!0;let ne=t.matches[Q],ae=B;return Zt(B,J({currentUrl:z,currentParams:ne.params,nextUrl:F,nextParams:ae.params},n,{actionResult:_,actionStatus:re,defaultShouldRevalidate:Z?!1:c||z.pathname+z.search===F.pathname+F.search||z.search!==F.search||pr(ne,ae)}))}),h=[];return f.forEach((B,Q)=>{if(u||!r.some(ve=>ve.route.id===B.routeId)||v.has(Q))return;let V=Ue(w,B.path,S);if(!V){h.push({key:Q,routeId:B.routeId,path:B.path,matches:null,match:null,controller:null});return}let ne=t.fetchers.get(Q),ae=Ye(V,B.path),ee=!1;g.has(Q)?ee=!1:m.has(Q)?(m.delete(Q),ee=!0):ne&&ne.state!=="idle"&&ne.data===void 0?ee=c:ee=Zt(ae,J({currentUrl:z,currentParams:t.matches[t.matches.length-1].params,nextUrl:F,nextParams:r[r.length-1].params},n,{actionResult:_,actionStatus:re,defaultShouldRevalidate:Z?!1:c})),ee&&h.push({key:Q,routeId:B.routeId,path:B.path,matches:V,match:ae,controller:new AbortController})}),[me,h]}function Rt(e,t,r){if(e.lazy)return!0;if(!e.loader)return!1;let n=t!=null&&t[e.id]!==void 0,a=r!=null&&r[e.id]!==void 0;return!n&&a?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!n&&!a}function bn(e,t,r){let n=!t||r.route.id!==t.route.id,a=e[r.route.id]===void 0;return n||a}function pr(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function Zt(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}function er(e,t,r,n,a){var u;let o;if(e){let m=n[e];N(m,"No route found to patch children into: routeId = "+e),m.children||(m.children=[]),o=m.children}else o=r;let c=t.filter(m=>!o.some(v=>vr(m,v))),s=ut(c,a,[e||"_","patch",String(((u=o)==null?void 0:u.length)||"0")],n);o.push(...s)}function vr(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children.every((r,n)=>{var a;return(a=t.children)==null?void 0:a.some(u=>vr(r,u))}):!1}async function wn(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let a=r[e.id];N(a,"No route found in manifest");let u={};for(let o in n){let s=a[o]!==void 0&&o!=="hasErrorBoundary";ke(!s,'Route "'+a.id+'" has a static property "'+o+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+o+'" will be ignored.')),!s&&!Vr.has(o)&&(u[o]=n[o])}Object.assign(a,u),Object.assign(a,J({},t(a),{lazy:void 0}))}async function En(e){let{matches:t}=e,r=t.filter(a=>a.shouldLoad);return(await Promise.all(r.map(a=>a.resolve()))).reduce((a,u,o)=>Object.assign(a,{[r[o].route.id]:u}),{})}async function Rn(e,t,r,n,a,u,o,c,s,m){let v=u.map(w=>w.route.lazy?wn(w.route,s,c):void 0),f=u.map((w,S)=>{let R=v[S],_=a.some(F=>F.route.id===w.route.id);return J({},w,{shouldLoad:_,resolve:async F=>(F&&n.method==="GET"&&(w.route.lazy||w.route.loader)&&(_=!0),_?Pn(t,n,w,R,F,m):Promise.resolve({type:k.data,result:void 0}))})}),g=await e({matches:f,request:n,params:u[0].params,fetcherKey:o,context:m});try{await Promise.all(v)}catch{}return g}async function Pn(e,t,r,n,a,u){let o,c,s=m=>{let v,f=new Promise((S,R)=>v=R);c=()=>v(),t.signal.addEventListener("abort",c);let g=S=>typeof m!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+r.route.id+"]"))):m({request:t,params:r.params,context:u},...S!==void 0?[S]:[]),w=(async()=>{try{return{type:"data",result:await(a?a(R=>g(R)):g())}}catch(S){return{type:"error",result:S}}})();return Promise.race([w,f])};try{let m=r.route[e];if(n)if(m){let v,[f]=await Promise.all([s(m).catch(g=>{v=g}),n]);if(v!==void 0)throw v;o=f}else if(await n,m=r.route[e],m)o=await s(m);else if(e==="action"){let v=new URL(t.url),f=v.pathname+v.search;throw se(405,{method:t.method,pathname:f,routeId:r.route.id})}else return{type:k.data,result:void 0};else if(m)o=await s(m);else{let v=new URL(t.url),f=v.pathname+v.search;throw se(404,{pathname:f})}N(o.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(m){return{type:k.error,result:m}}finally{c&&t.signal.removeEventListener("abort",c)}return o}async function Dn(e){let{result:t,type:r}=e;if(yr(t)){let f;try{let g=t.headers.get("Content-Type");g&&/\bapplication\/json\b/.test(g)?t.body==null?f=null:f=await t.json():f=await t.text()}catch(g){return{type:k.error,error:g}}return r===k.error?{type:k.error,error:new wt(t.status,t.statusText,f),statusCode:t.status,headers:t.headers}:{type:k.data,data:f,statusCode:t.status,headers:t.headers}}if(r===k.error){if(lr(t)){var n,a;if(t.data instanceof Error){var u,o;return{type:k.error,error:t.data,statusCode:(u=t.init)==null?void 0:u.status,headers:(o=t.init)!=null&&o.headers?new Headers(t.init.headers):void 0}}return{type:k.error,error:new wt(((n=t.init)==null?void 0:n.status)||500,void 0,t.data),statusCode:Xe(t)?t.status:void 0,headers:(a=t.init)!=null&&a.headers?new Headers(t.init.headers):void 0}}return{type:k.error,error:t,statusCode:Xe(t)?t.status:void 0}}if(Ln(t)){var c,s;return{type:k.deferred,deferredData:t,statusCode:(c=t.init)==null?void 0:c.status,headers:((s=t.init)==null?void 0:s.headers)&&new Headers(t.init.headers)}}if(lr(t)){var m,v;return{type:k.data,data:t.data,statusCode:(m=t.init)==null?void 0:m.status,headers:(v=t.init)!=null&&v.headers?new Headers(t.init.headers):void 0}}return{type:k.data,data:t}}function xn(e,t,r,n,a,u){let o=e.headers.get("Location");if(N(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!St.test(o)){let c=n.slice(0,n.findIndex(s=>s.route.id===r)+1);o=Et(new URL(t.url),c,a,!0,o,u),e.headers.set("Location",o)}return e}function tr(e,t,r){if(St.test(e)){let n=e,a=n.startsWith("//")?new URL(t.protocol+n):new URL(n),u=Qe(a.pathname,r)!=null;if(a.origin===t.origin&&u)return a.pathname+a.search+a.hash}return e}function Be(e,t,r,n){let a=e.createURL(gr(t)).toString(),u={signal:r};if(n&&he(n.formMethod)){let{formMethod:o,formEncType:c}=n;u.method=o.toUpperCase(),c==="application/json"?(u.headers=new Headers({"Content-Type":c}),u.body=JSON.stringify(n.json)):c==="text/plain"?u.body=n.text:c==="application/x-www-form-urlencoded"&&n.formData?u.body=Pt(n.formData):u.body=n.formData}return new Request(a,u)}function Pt(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function rr(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function Sn(e,t,r,n,a){let u={},o=null,c,s=!1,m={},v=r&&de(r[1])?r[1].error:void 0;return e.forEach(f=>{if(!(f.route.id in t))return;let g=f.route.id,w=t[g];if(N(!Ie(w),"Cannot handle redirect results in processLoaderData"),de(w)){let S=w.error;v!==void 0&&(S=v,v=void 0),o=o||{};{let R=Fe(e,g);o[R.route.id]==null&&(o[R.route.id]=S)}u[g]=void 0,s||(s=!0,c=Xe(w.error)?w.error.status:500),w.headers&&(m[g]=w.headers)}else Me(w)?(n.set(g,w.deferredData),u[g]=w.deferredData.data,w.statusCode!=null&&w.statusCode!==200&&!s&&(c=w.statusCode),w.headers&&(m[g]=w.headers)):(u[g]=w.data,w.statusCode&&w.statusCode!==200&&!s&&(c=w.statusCode),w.headers&&(m[g]=w.headers))}),v!==void 0&&r&&(o={[r[0]]:v},u[r[0]]=void 0),{loaderData:u,errors:o,statusCode:c||200,loaderHeaders:m}}function nr(e,t,r,n,a,u,o){let{loaderData:c,errors:s}=Sn(t,r,n,o);return a.forEach(m=>{let{key:v,match:f,controller:g}=m,w=u[v];if(N(w,"Did not find corresponding fetcher result"),!(g&&g.signal.aborted))if(de(w)){let S=Fe(e.matches,f?.route.id);s&&s[S.route.id]||(s=J({},s,{[S.route.id]:w.error})),e.fetchers.delete(v)}else if(Ie(w))N(!1,"Unhandled fetcher revalidation redirect");else if(Me(w))N(!1,"Unhandled fetcher deferred data");else{let S=Se(w.data);e.fetchers.set(v,S)}}),{loaderData:c,errors:s}}function ar(e,t,r,n){let a=J({},t);for(let u of r){let o=u.route.id;if(t.hasOwnProperty(o)?t[o]!==void 0&&(a[o]=t[o]):e[o]!==void 0&&u.route.loader&&(a[o]=e[o]),n&&n.hasOwnProperty(o))break}return a}function ir(e){return e?de(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Fe(e,t){return(t?e.slice(0,e.findIndex(n=>n.route.id===t)+1):[...e]).reverse().find(n=>n.route.hasErrorBoundary===!0)||e[0]}function or(e){let t=e.length===1?e[0]:e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function se(e,t){let{pathname:r,routeId:n,method:a,type:u,message:o}=t===void 0?{}:t,c="Unknown Server Error",s="Unknown @remix-run/router error";return e===400?(c="Bad Request",a&&r&&n?s="You made a "+a+' request to "'+r+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":u==="defer-action"?s="defer() is not supported in actions":u==="invalid-body"&&(s="Unable to encode submission body")):e===403?(c="Forbidden",s='Route "'+n+'" does not match URL "'+r+'"'):e===404?(c="Not Found",s='No route matches URL "'+r+'"'):e===405&&(c="Method Not Allowed",a&&r&&n?s="You made a "+a.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request.":a&&(s='Invalid request method "'+a.toUpperCase()+'"')),new wt(e||500,c,new Error(s),!0)}function lt(e){let t=Object.entries(e);for(let r=t.length-1;r>=0;r--){let[n,a]=t[r];if(Ie(a))return{key:n,result:a}}}function gr(e){let t=typeof e=="string"?Ce(e):e;return qe(J({},t,{hash:""}))}function Mn(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Cn(e){return yr(e.result)&&mn.has(e.result.status)}function Me(e){return e.type===k.deferred}function de(e){return e.type===k.error}function Ie(e){return(e&&e.type)===k.redirect}function lr(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function Ln(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function yr(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Tn(e){return hn.has(e.toLowerCase())}function he(e){return cn.has(e.toLowerCase())}async function _n(e,t,r,n,a){let u=Object.entries(t);for(let o=0;og?.route.id===c);if(!m)continue;let v=n.find(g=>g.route.id===m.route.id),f=v!=null&&!pr(v,m)&&(a&&a[m.route.id])!==void 0;Me(s)&&f&&await Mt(s,r,!1).then(g=>{g&&(t[c]=g)})}}async function Un(e,t,r){for(let n=0;nm?.route.id===u)&&Me(c)&&(N(o,"Expected an AbortController for revalidating fetcher deferred result"),await Mt(c,o.signal,!0).then(m=>{m&&(t[a]=m)}))}}async function Mt(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:k.data,data:e.deferredData.unwrappedData}}catch(a){return{type:k.error,error:a}}return{type:k.data,data:e.deferredData.data}}}function Ct(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Ye(e,t){let r=typeof t=="string"?Ce(t).search:t.search;if(e[e.length-1].route.index&&Ct(r||""))return e[e.length-1];let n=fr(e);return n[n.length-1]}function sr(e){let{formMethod:t,formAction:r,formEncType:n,text:a,formData:u,json:o}=e;if(!(!t||!r||!n)){if(a!=null)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:a};if(u!=null)return{formMethod:t,formAction:r,formEncType:n,formData:u,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:o,text:void 0}}}function bt(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Fn(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function Ke(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function In(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Se(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Nn(e,t){try{let r=e.sessionStorage.getItem(mr);if(r){let n=JSON.parse(r);for(let[a,u]of Object.entries(n||{}))u&&Array.isArray(u)&&t.set(a,new Set(u||[]))}}catch{}}function jn(e,t){if(t.size>0){let r={};for(let[n,a]of t)r[n]=[...a];try{e.sessionStorage.setItem(mr,JSON.stringify(r))}catch(n){ke(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}/** + * React Router v6.30.1 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function dt(){return dt=Object.assign?Object.assign.bind():function(e){for(var t=1;t{c.current=!0}),C.useCallback(function(m,v){if(v===void 0&&(v={}),!c.current)return;if(typeof m=="number"){n.go(m);return}let f=xt(m,JSON.parse(o),u,v.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:we([t,f.pathname])),(v.replace?n.replace:n.push)(f,v.state,v)},[t,n,o,u,e])}const Bn=C.createContext(null);function kn(e){let t=C.useContext(Ee).outlet;return t&&C.createElement(Bn.Provider,{value:e},t)}function da(){let{matches:e}=C.useContext(Ee),t=e[e.length-1];return t?t.params:{}}function zn(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=C.useContext(ze),{matches:a}=C.useContext(Ee),{pathname:u}=_t(),o=JSON.stringify(Dt(a,n.v7_relativeSplatPath));return C.useMemo(()=>xt(e,JSON.parse(o),u,r==="path"),[e,o,u,r])}function ca(e,t,r,n){Ze()||N(!1);let{navigator:a}=C.useContext(ze),{matches:u}=C.useContext(Ee),o=u[u.length-1],c=o?o.params:{};o&&o.pathname;let s=o?o.pathnameBase:"/";o&&o.route;let m=_t(),v;v=m;let f=v.pathname||"/",g=f;if(s!=="/"){let R=s.replace(/^\//,"").split("/");g="/"+f.replace(/^\//,"").split("/").slice(R.length).join("/")}let w=Ue(e,{pathname:g});return Jn(w&&w.map(R=>Object.assign({},R,{params:Object.assign({},c,R.params),pathname:we([s,a.encodeLocation?a.encodeLocation(R.pathname).pathname:R.pathname]),pathnameBase:R.pathnameBase==="/"?s:we([s,a.encodeLocation?a.encodeLocation(R.pathnameBase).pathname:R.pathnameBase])})),u,r,n)}function Hn(){let e=Xn(),t=Xe(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return C.createElement(C.Fragment,null,C.createElement("h2",null,"Unexpected Application Error!"),C.createElement("h3",{style:{fontStyle:"italic"}},t),r?C.createElement("pre",{style:a},r):null,null)}const Wn=C.createElement(Hn,null);class Vn extends C.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?C.createElement(Ee.Provider,{value:this.props.routeContext},C.createElement(br.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function $n(e){let{routeContext:t,match:r,children:n}=e,a=C.useContext(Lt);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),C.createElement(Ee.Provider,{value:t},n)}function Jn(e,t,r,n){var a;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var u;if(!r)return null;if(r.errors)e=r.matches;else if((u=n)!=null&&u.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,c=(a=r)==null?void 0:a.errors;if(c!=null){let v=o.findIndex(f=>f.route.id&&c?.[f.route.id]!==void 0);v>=0||N(!1),o=o.slice(0,Math.min(o.length,v+1))}let s=!1,m=-1;if(r&&n&&n.v7_partialHydration)for(let v=0;v=0?o=o.slice(0,m+1):o=[o[0]];break}}}return o.reduceRight((v,f,g)=>{let w,S=!1,R=null,_=null;r&&(w=c&&f.route.id?c[f.route.id]:void 0,R=f.route.errorElement||Wn,s&&(m<0&&g===0?(Qn("route-fallback"),S=!0,_=null):m===g&&(S=!0,_=f.route.hydrateFallbackElement||null)));let z=t.concat(o.slice(0,g+1)),F=()=>{let G;return w?G=R:S?G=_:f.route.Component?G=C.createElement(f.route.Component,null):f.route.element?G=f.route.element:G=v,C.createElement($n,{match:f,routeContext:{outlet:v,matches:z,isDataRoute:r!=null},children:G})};return r&&(f.route.ErrorBoundary||f.route.errorElement||g===0)?C.createElement(Vn,{location:r.location,revalidation:r.revalidation,component:R,error:w,children:F(),routeContext:{outlet:null,matches:z,isDataRoute:!0}}):F()},null)}var Er=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Er||{}),Rr=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Rr||{});function Kn(e){let t=C.useContext(Lt);return t||N(!1),t}function Yn(e){let t=C.useContext(On);return t||N(!1),t}function Gn(e){let t=C.useContext(Ee);return t||N(!1),t}function Pr(e){let t=Gn(),r=t.matches[t.matches.length-1];return r.route.id||N(!1),r.route.id}function Xn(){var e;let t=C.useContext(br),r=Yn(),n=Pr();return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function qn(){let{router:e}=Kn(Er.UseNavigateStable),t=Pr(Rr.UseNavigateStable),r=C.useRef(!1);return wr(()=>{r.current=!0}),C.useCallback(function(a,u){u===void 0&&(u={}),r.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,dt({fromRouteId:t},u)))},[e,t])}const ur={};function Qn(e,t,r){ur[e]||(ur[e]=!0)}function fa(e,t){e?.v7_startTransition,e?.v7_relativeSplatPath===void 0&&(!t||t.v7_relativeSplatPath),t&&(t.v7_fetcherPersist,t.v7_normalizeFormMethod,t.v7_partialHydration,t.v7_skipActionErrorRevalidation)}function ha(e){return kn(e.context)}function ma(e){let{basename:t="/",children:r=null,location:n,navigationType:a=q.Pop,navigator:u,static:o=!1,future:c}=e;Ze()&&N(!1);let s=t.replace(/^\/*/,"/"),m=C.useMemo(()=>({basename:s,navigator:u,static:o,future:dt({v7_relativeSplatPath:!1},c)}),[s,c,u,o]);typeof n=="string"&&(n=Ce(n));let{pathname:v="/",search:f="",hash:g="",state:w=null,key:S="default"}=n,R=C.useMemo(()=>{let _=Qe(v,s);return _==null?null:{location:{pathname:_,search:f,hash:g,state:w,key:S},navigationType:a}},[s,v,f,g,w,S,a]);return R==null?null:C.createElement(ze.Provider,{value:m},C.createElement(Tt.Provider,{children:r,value:R}))}new Promise(()=>{});function pa(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:C.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:C.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:C.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}function Zn(e){return typeof e=="number"?Number.isNaN(e):!1}function ea(e){return e==null||Zn(e)}function va(e,t){if(ea(e))return;const r={},n=[];return e.forEach(a=>{const u=t?t(a):JSON.stringify(a);r[u]||(r[u]=!0,n.push(a))}),e.length===n.length?e:n}const ta=["Boolean","Number","String","Function","Array","Date","RegExp","Object","Error","Symbol"];ta.reduce((e,t)=>({...e,[`[object ${t}]`]:t.toLowerCase()}),{});export{Lt as D,wt as E,ze as N,ha as O,ma as R,ua as a,oa as b,la as c,On as d,sa as e,ca as f,aa as g,zn as h,qe as i,na as j,va as k,fa as l,pa as m,da as n,ia as r,Qe as s,_t as u}; diff --git a/py_backend/static/assets/vendor-react-BxsGb6Ph.js b/py_backend/static/assets/vendor-react-BxsGb6Ph.js new file mode 100644 index 0000000000000000000000000000000000000000..38c1060d300e40d7b0b2b6a651e33ac0aa1b9ed9 --- /dev/null +++ b/py_backend/static/assets/vendor-react-BxsGb6Ph.js @@ -0,0 +1,41 @@ +import{g as ja,r as Af,u as Ia,a as Ua,c as Bf,b as Hf,E as Wf,l as $f,D as Qf,d as Kf,R as Yf,N as Xf,s as Gf,e as Zf,f as Jf,h as qf,i as Ca,m as bf}from"./vendor-DxpCibxB.js";function Va(w,k){for(var d=0;dT[N]})}}}return Object.freeze(Object.defineProperty(w,Symbol.toStringTag,{value:"Module"}))}var Co={exports:{}},hr={},_o={exports:{}},M={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var _a;function ed(){if(_a)return M;_a=1;var w=Symbol.for("react.element"),k=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),N=Symbol.for("react.profiler"),O=Symbol.for("react.provider"),B=Symbol.for("react.context"),H=Symbol.for("react.forward_ref"),U=Symbol.for("react.suspense"),Y=Symbol.for("react.memo"),V=Symbol.for("react.lazy"),ce=Symbol.iterator;function pe(c){return c===null||typeof c!="object"?null:(c=ce&&c[ce]||c["@@iterator"],typeof c=="function"?c:null)}var ze={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Ae=Object.assign,J={};function A(c,S,F){this.props=c,this.context=S,this.refs=J,this.updater=F||ze}A.prototype.isReactComponent={},A.prototype.setState=function(c,S){if(typeof c!="object"&&typeof c!="function"&&c!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,c,S,"setState")},A.prototype.forceUpdate=function(c){this.updater.enqueueForceUpdate(this,c,"forceUpdate")};function be(){}be.prototype=A.prototype;function Te(c,S,F){this.props=c,this.context=S,this.refs=J,this.updater=F||ze}var me=Te.prototype=new be;me.constructor=Te,Ae(me,A.prototype),me.isPureReactComponent=!0;var oe=Array.isArray,Le=Object.prototype.hasOwnProperty,Ke={current:null},et={key:!0,ref:!0,__self:!0,__source:!0};function q(c,S,F){var Q,W={},re=null,ee=null;if(S!=null)for(Q in S.ref!==void 0&&(ee=S.ref),S.key!==void 0&&(re=""+S.key),S)Le.call(S,Q)&&!et.hasOwnProperty(Q)&&(W[Q]=S[Q]);var le=arguments.length-2;if(le===1)W.children=F;else if(1"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),U=Object.prototype.hasOwnProperty,Y=/^[: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]*$/,V={},ce={};function pe(e){return U.call(ce,e)?!0:U.call(V,e)?!1:Y.test(e)?ce[e]=!0:(V[e]=!0,!1)}function ze(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Ae(e,t,n,r){if(t===null||typeof t>"u"||ze(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function J(e,t,n,r,l,u,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=u,this.removeEmptyString=o}var A={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){A[e]=new J(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];A[t]=new J(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){A[e]=new J(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){A[e]=new J(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){A[e]=new J(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){A[e]=new J(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){A[e]=new J(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){A[e]=new J(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){A[e]=new J(e,5,!1,e.toLowerCase(),null,!1,!1)});var be=/[\-:]([a-z])/g;function Te(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(be,Te);A[t]=new J(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(be,Te);A[t]=new J(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(be,Te);A[t]=new J(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){A[e]=new J(e,1,!1,e.toLowerCase(),null,!1,!1)}),A.xlinkHref=new J("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){A[e]=new J(e,1,!1,e.toLowerCase(),null,!0,!0)});function me(e,t,n,r){var l=A.hasOwnProperty(t)?A[t]:null;(l!==null?l.type!==0:r||!(2i||l[o]!==u[i]){var s=` +`+l[o].replace(" at new "," at ");return e.displayName&&s.includes("")&&(s=s.replace("",e.displayName)),s}while(1<=o&&0<=i);break}}}finally{Q=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?F(e):""}function re(e){switch(e.tag){case 5:return F(e.type);case 16:return F("Lazy");case 13:return F("Suspense");case 19:return F("SuspenseList");case 0:case 2:case 15:return e=W(e.type,!1),e;case 11:return e=W(e.type.render,!1),e;case 1:return e=W(e.type,!0),e;default:return""}}function ee(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case et:return"Fragment";case Ke:return"Portal";case Be:return"Profiler";case q:return"StrictMode";case vt:return"Suspense";case Ee:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Wt:return(e.displayName||"Context")+".Consumer";case we:return(e._context.displayName||"Context")+".Provider";case Oe:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case st:return t=e.displayName||null,t!==null?t:ee(e.type)||"Memo";case at:t=e._payload,e=e._init;try{return ee(e(t))}catch{}}return null}function le(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ee(t);case 8:return t===q?"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 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function $(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function De(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ha(e){var t=De(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,u=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(o){r=""+o,u.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function wr(e){e._valueTracker||(e._valueTracker=Ha(e))}function zo(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=De(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Sr(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 Tl(e,t){var n=t.checked;return c({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function To(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=$(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Lo(e,t){t=t.checked,t!=null&&me(e,"checked",t,!1)}function Ll(e,t){Lo(e,t);var n=$(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Ol(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ol(e,t.type,$(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Oo(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Ol(e,t,n){(t!=="number"||Sr(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ln=Array.isArray;function un(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=kr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function On(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Dn={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Wa=["Webkit","ms","Moz","O"];Object.keys(Dn).forEach(function(e){Wa.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Dn[t]=Dn[e]})});function Uo(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Dn.hasOwnProperty(e)&&Dn[e]?(""+t).trim():t+"px"}function Vo(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=Uo(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var $a=c({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Fl(e,t){if(t){if($a[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(d(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(d(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(d(61))}if(t.style!=null&&typeof t.style!="object")throw Error(d(62))}}function jl(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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}}var Il=null;function Ul(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Vl=null,on=null,sn=null;function Ao(e){if(e=tr(e)){if(typeof Vl!="function")throw Error(d(280));var t=e.stateNode;t&&(t=$r(t),Vl(e.stateNode,e.type,t))}}function Bo(e){on?sn?sn.push(e):sn=[e]:on=e}function Ho(){if(on){var e=on,t=sn;if(sn=on=null,Ao(e),t)for(e=0;e>>=0,e===0?32:31-(tc(e)/nc|0)|0}var Pr=64,Nr=4194304;function In(e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Rr(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,u=e.pingedLanes,o=n&268435455;if(o!==0){var i=o&~l;i!==0?r=In(i):(u&=o,u!==0&&(r=In(u)))}else o=n&~l,o!==0?r=In(o):u!==0&&(r=In(u));if(r===0)return 0;if(t!==0&&t!==r&&(t&l)===0&&(l=r&-r,u=t&-t,l>=u||l===16&&(u&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Un(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-tt(t),e[t]=n}function oc(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Kn),hi=" ",yi=!1;function gi(e,t){switch(e){case"keyup":return Mc.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function wi(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var fn=!1;function jc(e,t){switch(e){case"compositionend":return wi(t);case"keypress":return t.which!==32?null:(yi=!0,hi);case"textInput":return e=t.data,e===hi&&yi?null:e;default:return null}}function Ic(e,t){if(fn)return e==="compositionend"||!ru&&gi(e,t)?(e=ci(),Dr=Jl=Rt=null,fn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Pi(n)}}function Ri(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ri(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function zi(){for(var e=window,t=Sr();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Sr(e.document)}return t}function ou(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Kc(e){var t=zi(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Ri(n.ownerDocument.documentElement,n)){if(r!==null&&ou(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=n.textContent.length,u=Math.min(r.start,l);r=r.end===void 0?u:Math.min(r.end,l),!e.extend&&u>r&&(l=r,r=u,u=l),l=Ni(n,u);var o=Ni(n,r);l&&o&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),u>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,dn=null,iu=null,Zn=null,su=!1;function Ti(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;su||dn==null||dn!==Sr(r)||(r=dn,"selectionStart"in r&&ou(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Zn&&Gn(Zn,r)||(Zn=r,r=Br(iu,"onSelect"),0yn||(e.current=Su[yn],Su[yn]=null,yn--)}function X(e,t){yn++,Su[yn]=e.current,e.current=t}var Ot={},xe=Lt(Ot),Me=Lt(!1),Xt=Ot;function gn(e,t){var n=e.type.contextTypes;if(!n)return Ot;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},u;for(u in n)l[u]=t[u];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function Fe(e){return e=e.childContextTypes,e!=null}function Qr(){Z(Me),Z(xe)}function Qi(e,t,n){if(xe.current!==Ot)throw Error(d(168));X(xe,t),X(Me,n)}function Ki(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(d(108,le(e)||"Unknown",l));return c({},n,r)}function Kr(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ot,Xt=xe.current,X(xe,e),X(Me,Me.current),!0}function Yi(e,t,n){var r=e.stateNode;if(!r)throw Error(d(169));n?(e=Ki(e,t,Xt),r.__reactInternalMemoizedMergedChildContext=e,Z(Me),Z(xe),X(xe,e)):Z(Me),X(Me,n)}var yt=null,Yr=!1,ku=!1;function Xi(e){yt===null?yt=[e]:yt.push(e)}function lf(e){Yr=!0,Xi(e)}function Dt(){if(!ku&&yt!==null){ku=!0;var e=0,t=K;try{var n=yt;for(K=1;e>=o,l-=o,gt=1<<32-tt(t)+l|n<L?(ge=z,z=null):ge=z.sibling;var I=v(f,z,p[L],g);if(I===null){z===null&&(z=ge);break}e&&z&&I.alternate===null&&t(f,z),a=u(I,a,L),R===null?P=I:R.sibling=I,R=I,z=ge}if(L===p.length)return n(f,z),b&&Zt(f,L),P;if(z===null){for(;LL?(ge=z,z=null):ge=z.sibling;var Ht=v(f,z,I.value,g);if(Ht===null){z===null&&(z=ge);break}e&&z&&Ht.alternate===null&&t(f,z),a=u(Ht,a,L),R===null?P=Ht:R.sibling=Ht,R=Ht,z=ge}if(I.done)return n(f,z),b&&Zt(f,L),P;if(z===null){for(;!I.done;L++,I=p.next())I=y(f,I.value,g),I!==null&&(a=u(I,a,L),R===null?P=I:R.sibling=I,R=I);return b&&Zt(f,L),P}for(z=r(f,z);!I.done;L++,I=p.next())I=E(z,f,L,I.value,g),I!==null&&(e&&I.alternate!==null&&z.delete(I.key===null?L:I.key),a=u(I,a,L),R===null?P=I:R.sibling=I,R=I);return e&&z.forEach(function(Vf){return t(f,Vf)}),b&&Zt(f,L),P}function se(f,a,p,g){if(typeof p=="object"&&p!==null&&p.type===et&&p.key===null&&(p=p.props.children),typeof p=="object"&&p!==null){switch(p.$$typeof){case Le:e:{for(var P=p.key,R=a;R!==null;){if(R.key===P){if(P=p.type,P===et){if(R.tag===7){n(f,R.sibling),a=l(R,p.props.children),a.return=f,f=a;break e}}else if(R.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===at&&ss(P)===R.type){n(f,R.sibling),a=l(R,p.props),a.ref=nr(f,R,p),a.return=f,f=a;break e}n(f,R);break}else t(f,R);R=R.sibling}p.type===et?(a=ln(p.props.children,f.mode,g,p.key),a.return=f,f=a):(g=kl(p.type,p.key,p.props,null,f.mode,g),g.ref=nr(f,a,p),g.return=f,f=g)}return o(f);case Ke:e:{for(R=p.key;a!==null;){if(a.key===R)if(a.tag===4&&a.stateNode.containerInfo===p.containerInfo&&a.stateNode.implementation===p.implementation){n(f,a.sibling),a=l(a,p.children||[]),a.return=f,f=a;break e}else{n(f,a);break}else t(f,a);a=a.sibling}a=wo(p,f.mode,g),a.return=f,f=a}return o(f);case at:return R=p._init,se(f,a,R(p._payload),g)}if(Ln(p))return C(f,a,p,g);if(Qt(p))return _(f,a,p,g);nl(f,p)}return typeof p=="string"&&p!==""||typeof p=="number"?(p=""+p,a!==null&&a.tag===6?(n(f,a.sibling),a=l(a,p),a.return=f,f=a):(n(f,a),a=go(p,f.mode,g),a.return=f,f=a),o(f)):n(f,a)}return se}var Cn=as(!0),cs=as(!1),rr={},dt=Lt(rr),lr=Lt(rr),ur=Lt(rr);function qt(e){if(e===rr)throw Error(d(174));return e}function Fu(e,t){switch(X(ur,t),X(lr,e),X(dt,rr),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ml(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ml(t,e)}Z(dt),X(dt,t)}function _n(){Z(dt),Z(lr),Z(ur)}function fs(e){qt(ur.current);var t=qt(dt.current),n=Ml(t,e.type);t!==n&&(X(lr,e),X(dt,n))}function ju(e){lr.current===e&&(Z(dt),Z(lr))}var te=Lt(0);function rl(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Iu=[];function Uu(){for(var e=0;en?n:4,e(!0);var r=Vu.transition;Vu.transition={};try{e(!1),t()}finally{K=n,Vu.transition=r}}function zs(){return Ze().memoizedState}function af(e,t,n){var r=Vt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Ts(e))Ls(t,n);else if(n=es(e,t,n,r),n!==null){var l=Re();it(n,e,r,l),Os(n,t,r)}}function cf(e,t,n){var r=Vt(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ts(e))Ls(t,l);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var o=t.lastRenderedState,i=u(o,n);if(l.hasEagerState=!0,l.eagerState=i,nt(i,o)){var s=t.interleaved;s===null?(l.next=l,Lu(t)):(l.next=s.next,s.next=l),t.interleaved=l;return}}catch{}finally{}n=es(e,t,l,r),n!==null&&(l=Re(),it(n,e,r,l),Os(n,t,r))}}function Ts(e){var t=e.alternate;return e===ne||t!==null&&t===ne}function Ls(e,t){or=ul=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Os(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Kl(e,n)}}var sl={readContext:Ge,useCallback:Ce,useContext:Ce,useEffect:Ce,useImperativeHandle:Ce,useInsertionEffect:Ce,useLayoutEffect:Ce,useMemo:Ce,useReducer:Ce,useRef:Ce,useState:Ce,useDebugValue:Ce,useDeferredValue:Ce,useTransition:Ce,useMutableSource:Ce,useSyncExternalStore:Ce,useId:Ce,unstable_isNewReconciler:!1},ff={readContext:Ge,useCallback:function(e,t){return pt().memoizedState=[e,t===void 0?null:t],e},useContext:Ge,useEffect:ks,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ol(4194308,4,Cs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ol(4194308,4,e,t)},useInsertionEffect:function(e,t){return ol(4,2,e,t)},useMemo:function(e,t){var n=pt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=pt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=af.bind(null,ne,e),[r.memoizedState,e]},useRef:function(e){var t=pt();return e={current:e},t.memoizedState=e},useState:ws,useDebugValue:Ku,useDeferredValue:function(e){return pt().memoizedState=e},useTransition:function(){var e=ws(!1),t=e[0];return e=sf.bind(null,e[1]),pt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ne,l=pt();if(b){if(n===void 0)throw Error(d(407));n=n()}else{if(n=t(),ye===null)throw Error(d(349));(bt&30)!==0||ms(r,t,n)}l.memoizedState=n;var u={value:n,getSnapshot:t};return l.queue=u,ks(hs.bind(null,r,u,e),[e]),r.flags|=2048,ar(9,vs.bind(null,r,u,n,t),void 0,null),n},useId:function(){var e=pt(),t=ye.identifierPrefix;if(b){var n=wt,r=gt;n=(r&~(1<<32-tt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ir++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[ft]=t,e[er]=r,Gs(e,t,!1,!1),t.stateNode=e;e:{switch(o=jl(n,r),n){case"dialog":G("cancel",e),G("close",e),l=r;break;case"iframe":case"object":case"embed":G("load",e),l=r;break;case"video":case"audio":for(l=0;lzn&&(t.flags|=128,r=!0,cr(u,!1),t.lanes=4194304)}else{if(!r)if(e=rl(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),cr(u,!0),u.tail===null&&u.tailMode==="hidden"&&!o.alternate&&!b)return _e(t),null}else 2*ie()-u.renderingStartTime>zn&&n!==1073741824&&(t.flags|=128,r=!0,cr(u,!1),t.lanes=4194304);u.isBackwards?(o.sibling=t.child,t.child=o):(n=u.last,n!==null?n.sibling=o:t.child=o,u.last=o)}return u.tail!==null?(t=u.tail,u.rendering=t,u.tail=t.sibling,u.renderingStartTime=ie(),t.sibling=null,n=te.current,X(te,r?n&1|2:n&1),t):(_e(t),null);case 22:case 23:return vo(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(Qe&1073741824)!==0&&(_e(t),t.subtreeFlags&6&&(t.flags|=8192)):_e(t),null;case 24:return null;case 25:return null}throw Error(d(156,t.tag))}function wf(e,t){switch(xu(t),t.tag){case 1:return Fe(t.type)&&Qr(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return _n(),Z(Me),Z(xe),Uu(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return ju(t),null;case 13:if(Z(te),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(d(340));kn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Z(te),null;case 4:return _n(),null;case 10:return zu(t.type._context),null;case 22:case 23:return vo(),null;case 24:return null;default:return null}}var fl=!1,Pe=!1,Sf=typeof WeakSet=="function"?WeakSet:Set,x=null;function Nn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ue(e,t,r)}else n.current=null}function no(e,t,n){try{n()}catch(r){ue(e,t,r)}}var qs=!1;function kf(e,t){if(mu=Lr,e=zi(),ou(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var l=r.anchorOffset,u=r.focusNode;r=r.focusOffset;try{n.nodeType,u.nodeType}catch{n=null;break e}var o=0,i=-1,s=-1,m=0,h=0,y=e,v=null;t:for(;;){for(var E;y!==n||l!==0&&y.nodeType!==3||(i=o+l),y!==u||r!==0&&y.nodeType!==3||(s=o+r),y.nodeType===3&&(o+=y.nodeValue.length),(E=y.firstChild)!==null;)v=y,y=E;for(;;){if(y===e)break t;if(v===n&&++m===l&&(i=o),v===u&&++h===r&&(s=o),(E=y.nextSibling)!==null)break;y=v,v=y.parentNode}y=E}n=i===-1||s===-1?null:{start:i,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(vu={focusedElem:e,selectionRange:n},Lr=!1,x=t;x!==null;)if(t=x,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,x=e;else for(;x!==null;){t=x;try{var C=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(C!==null){var _=C.memoizedProps,se=C.memoizedState,f=t.stateNode,a=f.getSnapshotBeforeUpdate(t.elementType===t.type?_:lt(t.type,_),se);f.__reactInternalSnapshotBeforeUpdate=a}break;case 3:var p=t.stateNode.containerInfo;p.nodeType===1?p.textContent="":p.nodeType===9&&p.documentElement&&p.removeChild(p.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(d(163))}}catch(g){ue(t,t.return,g)}if(e=t.sibling,e!==null){e.return=t.return,x=e;break}x=t.return}return C=qs,qs=!1,C}function fr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var u=l.destroy;l.destroy=void 0,u!==void 0&&no(t,n,u)}l=l.next}while(l!==r)}}function dl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ro(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function bs(e){var t=e.alternate;t!==null&&(e.alternate=null,bs(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ft],delete t[er],delete t[wu],delete t[nf],delete t[rf])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function ea(e){return e.tag===5||e.tag===3||e.tag===4}function ta(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ea(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.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function lo(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Wr));else if(r!==4&&(e=e.child,e!==null))for(lo(e,t,n),e=e.sibling;e!==null;)lo(e,t,n),e=e.sibling}function uo(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(uo(e,t,n),e=e.sibling;e!==null;)uo(e,t,n),e=e.sibling}var Se=null,ut=!1;function jt(e,t,n){for(n=n.child;n!==null;)na(e,t,n),n=n.sibling}function na(e,t,n){if(ct&&typeof ct.onCommitFiberUnmount=="function")try{ct.onCommitFiberUnmount(_r,n)}catch{}switch(n.tag){case 5:Pe||Nn(n,t);case 6:var r=Se,l=ut;Se=null,jt(e,t,n),Se=r,ut=l,Se!==null&&(ut?(e=Se,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Se.removeChild(n.stateNode));break;case 18:Se!==null&&(ut?(e=Se,n=n.stateNode,e.nodeType===8?gu(e.parentNode,n):e.nodeType===1&&gu(e,n),Wn(e)):gu(Se,n.stateNode));break;case 4:r=Se,l=ut,Se=n.stateNode.containerInfo,ut=!0,jt(e,t,n),Se=r,ut=l;break;case 0:case 11:case 14:case 15:if(!Pe&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var u=l,o=u.destroy;u=u.tag,o!==void 0&&((u&2)!==0||(u&4)!==0)&&no(n,t,o),l=l.next}while(l!==r)}jt(e,t,n);break;case 1:if(!Pe&&(Nn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(i){ue(n,t,i)}jt(e,t,n);break;case 21:jt(e,t,n);break;case 22:n.mode&1?(Pe=(r=Pe)||n.memoizedState!==null,jt(e,t,n),Pe=r):jt(e,t,n);break;default:jt(e,t,n)}}function ra(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Sf),t.forEach(function(r){var l=Tf.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function ot(e,t){var n=t.deletions;if(n!==null)for(var r=0;rl&&(l=o),r&=~u}if(r=l,r=ie()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*xf(r/1960))-r,10e?16:e,Ut===null)var r=!1;else{if(e=Ut,Ut=null,yl=0,(j&6)!==0)throw Error(d(331));var l=j;for(j|=4,x=e.current;x!==null;){var u=x,o=u.child;if((x.flags&16)!==0){var i=u.deletions;if(i!==null){for(var s=0;sie()-so?nn(e,0):io|=n),Ue(e,t)}function ha(e,t){t===0&&((e.mode&1)===0?t=1:(t=Nr,Nr<<=1,(Nr&130023424)===0&&(Nr=4194304)));var n=Re();e=St(e,t),e!==null&&(Un(e,t,n),Ue(e,n))}function zf(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),ha(e,n)}function Tf(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(d(314))}r!==null&&r.delete(t),ha(e,n)}var ya;ya=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Me.current)je=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return je=!1,yf(e,t,n);je=(e.flags&131072)!==0}else je=!1,b&&(t.flags&1048576)!==0&&Gi(t,Gr,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;cl(e,t),e=t.pendingProps;var l=gn(t,xe.current);xn(t,n),l=Bu(null,t,r,e,l,n);var u=Hu();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Fe(r)?(u=!0,Kr(t)):u=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,Ou(t),l.updater=tl,t.stateNode=l,l._reactInternals=t,Mu(t,r,e,n),t=Zu(null,t,r,!0,u,n)):(t.tag=0,b&&u&&Eu(t),Ne(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(cl(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=Of(r),e=lt(r,e),l){case 0:t=Gu(null,t,r,e,n);break e;case 1:t=Ws(null,t,r,e,n);break e;case 11:t=Us(null,t,r,e,n);break e;case 14:t=Vs(null,t,r,lt(r.type,e),n);break e}throw Error(d(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:lt(r,l),Gu(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:lt(r,l),Ws(e,t,r,l,n);case 3:e:{if($s(t),e===null)throw Error(d(387));r=t.pendingProps,u=t.memoizedState,l=u.element,ts(e,t),el(t,r,null,n);var o=t.memoizedState;if(r=o.element,u.isDehydrated)if(u={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){l=Pn(Error(d(423)),t),t=Qs(e,t,r,n,l);break e}else if(r!==l){l=Pn(Error(d(424)),t),t=Qs(e,t,r,n,l);break e}else for($e=Tt(t.stateNode.containerInfo.firstChild),We=t,b=!0,rt=null,n=cs(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(kn(),r===l){t=Et(e,t,n);break e}Ne(e,t,r,n)}t=t.child}return t;case 5:return fs(t),e===null&&_u(t),r=t.type,l=t.pendingProps,u=e!==null?e.memoizedProps:null,o=l.children,hu(r,l)?o=null:u!==null&&hu(r,u)&&(t.flags|=32),Hs(e,t),Ne(e,t,o,n),t.child;case 6:return e===null&&_u(t),null;case 13:return Ks(e,t,n);case 4:return Fu(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Cn(t,null,r,n):Ne(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:lt(r,l),Us(e,t,r,l,n);case 7:return Ne(e,t,t.pendingProps,n),t.child;case 8:return Ne(e,t,t.pendingProps.children,n),t.child;case 12:return Ne(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,u=t.memoizedProps,o=l.value,X(Jr,r._currentValue),r._currentValue=o,u!==null)if(nt(u.value,o)){if(u.children===l.children&&!Me.current){t=Et(e,t,n);break e}}else for(u=t.child,u!==null&&(u.return=t);u!==null;){var i=u.dependencies;if(i!==null){o=u.child;for(var s=i.firstContext;s!==null;){if(s.context===r){if(u.tag===1){s=kt(-1,n&-n),s.tag=2;var m=u.updateQueue;if(m!==null){m=m.shared;var h=m.pending;h===null?s.next=s:(s.next=h.next,h.next=s),m.pending=s}}u.lanes|=n,s=u.alternate,s!==null&&(s.lanes|=n),Tu(u.return,n,t),i.lanes|=n;break}s=s.next}}else if(u.tag===10)o=u.type===t.type?null:u.child;else if(u.tag===18){if(o=u.return,o===null)throw Error(d(341));o.lanes|=n,i=o.alternate,i!==null&&(i.lanes|=n),Tu(o,n,t),o=u.sibling}else o=u.child;if(o!==null)o.return=u;else for(o=u;o!==null;){if(o===t){o=null;break}if(u=o.sibling,u!==null){u.return=o.return,o=u;break}o=o.return}u=o}Ne(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,xn(t,n),l=Ge(l),r=r(l),t.flags|=1,Ne(e,t,r,n),t.child;case 14:return r=t.type,l=lt(r,t.pendingProps),l=lt(r.type,l),Vs(e,t,r,l,n);case 15:return As(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:lt(r,l),cl(e,t),t.tag=1,Fe(r)?(e=!0,Kr(t)):e=!1,xn(t,n),os(t,r,l),Mu(t,r,l,n),Zu(null,t,r,!0,e,n);case 19:return Xs(e,t,n);case 22:return Bs(e,t,n)}throw Error(d(156,t.tag))};function ga(e,t){return Zo(e,t)}function Lf(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function qe(e,t,n,r){return new Lf(e,t,n,r)}function yo(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Of(e){if(typeof e=="function")return yo(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Oe)return 11;if(e===st)return 14}return 2}function Bt(e,t){var n=e.alternate;return n===null?(n=qe(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function kl(e,t,n,r,l,u){var o=2;if(r=e,typeof e=="function")yo(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case et:return ln(n.children,l,u,t);case q:o=8,l|=8;break;case Be:return e=qe(12,n,t,l|2),e.elementType=Be,e.lanes=u,e;case vt:return e=qe(13,n,t,l),e.elementType=vt,e.lanes=u,e;case Ee:return e=qe(19,n,t,l),e.elementType=Ee,e.lanes=u,e;case ve:return El(n,l,u,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case we:o=10;break e;case Wt:o=9;break e;case Oe:o=11;break e;case st:o=14;break e;case at:o=16,r=null;break e}throw Error(d(130,e==null?e:typeof e,""))}return t=qe(o,n,t,l),t.elementType=e,t.type=r,t.lanes=u,t}function ln(e,t,n,r){return e=qe(7,e,r,t),e.lanes=n,e}function El(e,t,n,r){return e=qe(22,e,r,t),e.elementType=ve,e.lanes=n,e.stateNode={isHidden:!1},e}function go(e,t,n){return e=qe(6,e,null,t),e.lanes=n,e}function wo(e,t,n){return t=qe(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Df(e,t,n,r,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ql(0),this.expirationTimes=Ql(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ql(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function So(e,t,n,r,l,u,o,i,s){return e=new Df(e,t,n,i,s),t===1?(t=1,u===!0&&(t|=8)):t=0,u=qe(3,null,null,t),e.current=u,u.stateNode=e,u.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ou(u),e}function Mf(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(w)}catch(k){console.error(k)}}return w(),Po.exports=ud(),Po.exports}var La;function od(){if(La)return zl;La=1;var w=Aa();return zl.createRoot=w.createRoot,zl.hydrateRoot=w.hydrateRoot,zl}var Td=od(),Ba=Aa();const id=ja(Ba),sd=Va({__proto__:null,default:id},[Ba]);/** + * React Router DOM v6.30.1 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function gr(){return gr=Object.assign?Object.assign.bind():function(w){for(var k=1;k=0)&&(d[N]=w[N]);return d}function cd(w){return!!(w.metaKey||w.altKey||w.ctrlKey||w.shiftKey)}function fd(w,k){return w.button===0&&(!k||k==="_self")&&!cd(w)}function No(w){return w===void 0&&(w=""),new URLSearchParams(typeof w=="string"||Array.isArray(w)||w instanceof URLSearchParams?w:Object.keys(w).reduce((k,d)=>{let T=w[d];return k.concat(Array.isArray(T)?T.map(N=>[d,N]):[[d,T]])},[]))}function dd(w,k){let d=No(w);return k&&k.forEach((T,N)=>{d.has(N)||k.getAll(N).forEach(O=>{d.append(N,O)})}),d}const pd=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],md="6";try{window.__reactRouterVersion=md}catch{}function Ld(w,k){return Bf({basename:k?.basename,future:gr({},k?.future,{v7_prependBasename:!0}),history:Hf({window:k?.window}),hydrationData:k?.hydrationData||vd(),routes:w,mapRouteProperties:bf,dataStrategy:k?.dataStrategy,patchRoutesOnNavigation:k?.patchRoutesOnNavigation,window:k?.window}).initialize()}function vd(){var w;let k=(w=window)==null?void 0:w.__staticRouterHydrationData;return k&&k.errors&&(k=gr({},k,{errors:hd(k.errors)})),k}function hd(w){if(!w)return null;let k=Object.entries(w),d={};for(let[T,N]of k)if(N&&N.__type==="RouteErrorResponse")d[T]=new Wf(N.status,N.statusText,N.data,N.internal===!0);else if(N&&N.__type==="Error"){if(N.__subType){let O=window[N.__subType];if(typeof O=="function")try{let B=new O(N.message);B.stack="",d[T]=B}catch{}}if(d[T]==null){let O=new Error(N.message);O.stack="",d[T]=O}}else d[T]=N;return d}const yd=D.createContext({isTransitioning:!1}),gd=D.createContext(new Map),wd="startTransition",Oa=ld[wd],Sd="flushSync",Da=sd[Sd];function kd(w){Oa?Oa(w):w()}function yr(w){Da?Da(w):w()}class Ed{constructor(){this.status="pending",this.promise=new Promise((k,d)=>{this.resolve=T=>{this.status==="pending"&&(this.status="resolved",k(T))},this.reject=T=>{this.status==="pending"&&(this.status="rejected",d(T))}})}}function Od(w){let{fallbackElement:k,router:d,future:T}=w,[N,O]=D.useState(d.state),[B,H]=D.useState(),[U,Y]=D.useState({isTransitioning:!1}),[V,ce]=D.useState(),[pe,ze]=D.useState(),[Ae,J]=D.useState(),A=D.useRef(new Map),{v7_startTransition:be}=T||{},Te=D.useCallback(q=>{be?kd(q):q()},[be]),me=D.useCallback((q,Be)=>{let{deletedFetchers:we,flushSync:Wt,viewTransitionOpts:Oe}=Be;q.fetchers.forEach((Ee,st)=>{Ee.data!==void 0&&A.current.set(st,Ee.data)}),we.forEach(Ee=>A.current.delete(Ee));let vt=d.window==null||d.window.document==null||typeof d.window.document.startViewTransition!="function";if(!Oe||vt){Wt?yr(()=>O(q)):Te(()=>O(q));return}if(Wt){yr(()=>{pe&&(V&&V.resolve(),pe.skipTransition()),Y({isTransitioning:!0,flushSync:!0,currentLocation:Oe.currentLocation,nextLocation:Oe.nextLocation})});let Ee=d.window.document.startViewTransition(()=>{yr(()=>O(q))});Ee.finished.finally(()=>{yr(()=>{ce(void 0),ze(void 0),H(void 0),Y({isTransitioning:!1})})}),yr(()=>ze(Ee));return}pe?(V&&V.resolve(),pe.skipTransition(),J({state:q,currentLocation:Oe.currentLocation,nextLocation:Oe.nextLocation})):(H(q),Y({isTransitioning:!0,flushSync:!1,currentLocation:Oe.currentLocation,nextLocation:Oe.nextLocation}))},[d.window,pe,V,A,Te]);D.useLayoutEffect(()=>d.subscribe(me),[d,me]),D.useEffect(()=>{U.isTransitioning&&!U.flushSync&&ce(new Ed)},[U]),D.useEffect(()=>{if(V&&B&&d.window){let q=B,Be=V.promise,we=d.window.document.startViewTransition(async()=>{Te(()=>O(q)),await Be});we.finished.finally(()=>{ce(void 0),ze(void 0),H(void 0),Y({isTransitioning:!1})}),ze(we)}},[Te,B,V,d.window]),D.useEffect(()=>{V&&B&&N.location.key===B.location.key&&V.resolve()},[V,pe,N.location,B]),D.useEffect(()=>{!U.isTransitioning&&Ae&&(H(Ae.state),Y({isTransitioning:!0,flushSync:!1,currentLocation:Ae.currentLocation,nextLocation:Ae.nextLocation}),J(void 0))},[U.isTransitioning,Ae]),D.useEffect(()=>{},[]);let oe=D.useMemo(()=>({createHref:d.createHref,encodeLocation:d.encodeLocation,go:q=>d.navigate(q),push:(q,Be,we)=>d.navigate(q,{state:Be,preventScrollReset:we?.preventScrollReset}),replace:(q,Be,we)=>d.navigate(q,{replace:!0,state:Be,preventScrollReset:we?.preventScrollReset})}),[d]),Le=d.basename||"/",Ke=D.useMemo(()=>({router:d,navigator:oe,static:!1,basename:Le}),[d,oe,Le]),et=D.useMemo(()=>({v7_relativeSplatPath:d.future.v7_relativeSplatPath}),[d.future.v7_relativeSplatPath]);return D.useEffect(()=>$f(T,d.future),[T,d.future]),D.createElement(D.Fragment,null,D.createElement(Qf.Provider,{value:Ke},D.createElement(Kf.Provider,{value:N},D.createElement(gd.Provider,{value:A.current},D.createElement(yd.Provider,{value:U},D.createElement(Yf,{basename:Le,location:N.location,navigationType:N.historyAction,navigator:oe,future:et},N.initialized||d.future.v7_partialHydration?D.createElement(xd,{routes:d.routes,future:d.future,state:N}):k))))),null)}const xd=D.memo(Cd);function Cd(w){let{routes:k,future:d,state:T}=w;return Jf(k,void 0,T,d)}const _d=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Pd=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Dd=D.forwardRef(function(k,d){let{onClick:T,relative:N,reloadDocument:O,replace:B,state:H,target:U,to:Y,preventScrollReset:V,viewTransition:ce}=k,pe=ad(k,pd),{basename:ze}=D.useContext(Xf),Ae,J=!1;if(typeof Y=="string"&&Pd.test(Y)&&(Ae=Y,_d))try{let me=new URL(window.location.href),oe=Y.startsWith("//")?new URL(me.protocol+Y):new URL(Y),Le=Gf(oe.pathname,ze);oe.origin===me.origin&&Le!=null?Y=Le+oe.search+oe.hash:J=!0}catch{}let A=Zf(Y,{relative:N}),be=Nd(Y,{replace:B,state:H,target:U,preventScrollReset:V,relative:N,viewTransition:ce});function Te(me){T&&T(me),me.defaultPrevented||be(me)}return D.createElement("a",gr({},pe,{href:Ae||A,onClick:J||O?T:Te,ref:d,target:U}))});var Ma;(function(w){w.UseScrollRestoration="useScrollRestoration",w.UseSubmit="useSubmit",w.UseSubmitFetcher="useSubmitFetcher",w.UseFetcher="useFetcher",w.useViewTransitionState="useViewTransitionState"})(Ma||(Ma={}));var Fa;(function(w){w.UseFetcher="useFetcher",w.UseFetchers="useFetchers",w.UseScrollRestoration="useScrollRestoration"})(Fa||(Fa={}));function Nd(w,k){let{target:d,replace:T,state:N,preventScrollReset:O,relative:B,viewTransition:H}=k===void 0?{}:k,U=Ua(),Y=Ia(),V=qf(w,{relative:B});return D.useCallback(ce=>{if(fd(ce,d)){ce.preventDefault();let pe=T!==void 0?T:Ca(Y)===Ca(V);U(w,{replace:pe,state:N,preventScrollReset:O,relative:B,viewTransition:H})}},[Y,U,V,T,N,d,w,O,B,H])}function Md(w){let k=D.useRef(No(w)),d=D.useRef(!1),T=Ia(),N=D.useMemo(()=>dd(T.search,d.current?null:k.current),[T.search]),O=Ua(),B=D.useCallback((H,U)=>{const Y=No(typeof H=="function"?H(N):H);d.current=!0,O("?"+Y,U)},[O,N]);return[N,B]}export{Dd as L,Od as R,Ba as a,Td as b,Ld as c,rd as i,zd as j,D as r,Md as u}; diff --git a/py_backend/static/assets/vendor-ui-l_DttnRj.js b/py_backend/static/assets/vendor-ui-l_DttnRj.js new file mode 100644 index 0000000000000000000000000000000000000000..a0f3092f87678e23f9999a7a46592cb4884dea6f --- /dev/null +++ b/py_backend/static/assets/vendor-ui-l_DttnRj.js @@ -0,0 +1,78 @@ +import{r as u,i as ce,j as g,a as Gs}from"./vendor-react-BxsGb6Ph.js";function Zs(e){return typeof e=="number"?Number.isNaN(e):!1}function O(e){return e==null||Zs(e)}function V(e){return!O(e)}function Xs(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return O(e)||e===!1||t.includes(e)}function Fr(e){return Xs(e,[""])}function Vt(e){return!Fr(e)}const Qs=["Boolean","Number","String","Function","Array","Date","RegExp","Object","Error","Symbol"];Qs.reduce((e,t)=>({...e,[`[object ${t}]`]:t.toLowerCase()}),{});const Ys={sorting:void 0,setSorting:e=>{console.warn("Trying to set to ",e)}},Js=u.createContext(Ys),mv=u.createContext({alerts:[],addAlert:()=>{console.warn("AlertContext::addAlert called before it was initialized")},removeAlert:()=>{console.warn("AlertContext::removeAlert called before it was initialized")},updateAlert:()=>{console.warn("AlertContext::updateAlert called before it was initialized")}}),Ks=u.createContext({setShowDropdown:()=>{console.warn("DropdownMenuContext::setShowDropdown called without a provider")}}),Io=u.createContext({currentLanguage:"en",setCurrentLanguage:()=>{console.warn("LanguageContext::setCurrentLanguage called without a provider")},languageNamespaceStatus:{},setLanguageNamespaceStatus:()=>{console.warn("LanguageContext::setLanguageNamespaceStatus called without a provider")},strings:{},setStrings:()=>{console.warn("LanguageContext::setStrings called without a provider")},registerNamespace:()=>{console.warn("LanguageContext::registerNamespace called without a provider")}});u.createContext({variant:"primary"});function S(){for(var e=arguments.length,t=new Array(e),n=0;n{s&&s(o,f)},[s,o]);return g.jsx("button",{ref:i,name:typeof o=="string"?o:void 0,type:d,className:S($i.rawButton,a&&$i.focused,n),disabled:r,onClick:s?p:void 0,...h,children:t})}function vt(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"0";if(O(e))return"";const r=String(e);return r.length>=t?r:Array(t-r.length+1).join(n)+r}function Lo(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:16,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n="";const r=t?"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789":"abcdefghijklmnopqrstuvwxyz0123456789";for(let i=0;it+n,0)}function Ur(e,t,n){const r=Math.min(t,n),i=Math.max(t,n);return Math.max(r,Math.min(i,e))}function Ee(e){const[t]=u.useState(()=>`_${Lo()}`),{spacing:n,variant:r="md",mode:i="gap",inner:o}=e;return u.useEffect(()=>{const s=["var(--go-ui-spacing-4xs)","var(--go-ui-spacing-3xs)","var(--go-ui-spacing-2xs)","var(--go-ui-spacing-xs)","var(--go-ui-spacing-sm)","var(--go-ui-spacing-md)","var(--go-ui-spacing-lg)","var(--go-ui-spacing-xl)","var(--go-ui-spacing-2xl)","var(--go-ui-spacing-3xl)","var(--go-ui-spacing-4xl)"];let a="0";if(n!=="none"){const p={condensed:-3,compact:-2,cozy:-1,default:0,comfortable:1,relaxed:2,loose:3},f={xs:3,sm:4,md:5,lg:6,xl:7},l=o?f[r]-1:f[r],c=p[n];a=s[Ur(l+c,0,s.length-1)]}if(O(n))return;const d=document.createElement("style");if(document.head.appendChild(d),!d.sheet){d.remove();return}let h;return i==="gap"||i==="grid-gap"?h=`gap: ${a};`:i==="padding-h"?h=`padding-left: ${a}; padding-right: ${a};`:i==="padding-v"&&(h=`padding-top: ${a}; padding-bottom: ${a};`),d.sheet.insertRule(`.${t} { ${h} }`),()=>{d.remove()}},[n,r,i,o,t]),t}const il="_basic-layout_v9jro_1",ol="_with-wrap_v9jro_5",al="_icons-container_v9jro_9",sl="_children-container_v9jro_14",ll="_actions-container_v9jro_19",bt={basicLayout:il,withWrap:ol,iconsContainer:al,childrenContainer:sl,actionsContainer:ll};function zt(e){const{className:t,icons:n,children:r,actions:i,iconsContainerClassName:o,childrenContainerClassName:s,actionsContainerClassName:a,withoutWrap:d,spacing:h="default",variant:p="md"}=e,f=Ee({spacing:h,variant:p,mode:"gap"}),l=Ee({spacing:h,variant:p,mode:"gap",inner:!0}),c=S(bt.basicLayout,!d&&bt.withWrap,f,t),v=O(n)&&O(r)&&O(i)?null:g.jsxs(g.Fragment,{children:[n&&g.jsx("div",{className:S(bt.iconsContainer,l,o),children:n}),g.jsx("div",{className:S(bt.childrenContainer,l,s),children:r}),i&&g.jsx("div",{className:S(bt.actionsContainer,l,a),children:i})]});return{containerClassName:c,content:v}}const cl="_button_18a84_1",ul="_ellipsized_18a84_29",dl="_children_18a84_32",hl="_overflow-wrapper_18a84_36",pl="_primary_18a84_44",fl="_secondary_18a84_45",ml="_no-spacing_18a84_50",gl="_condensed-spacing_18a84_54",vl="_compact-spacing_18a84_58",bl="_cozy-spacing_18a84_62",yl="_default-spacing_18a84_66",wl="_comfortable-spacing_18a84_70",xl="_relaxed-spacing_18a84_74",Cl="_loose-spacing_18a84_78",_l="_disabled_18a84_88",El="_tertiary_18a84_116",Nl="_tertiary-on-dark_18a84_130",Sl="_dropdown-item_18a84_144",te={button:cl,ellipsized:ul,children:dl,overflowWrapper:hl,primary:pl,secondary:fl,noSpacing:ml,condensedSpacing:gl,compactSpacing:vl,cozySpacing:bl,defaultSpacing:yl,comfortableSpacing:wl,relaxedSpacing:xl,looseSpacing:Cl,disabled:_l,tertiary:El,tertiaryOnDark:Nl,dropdownItem:Sl},kl={primary:te.primary,secondary:te.secondary,tertiary:te.tertiary,"tertiary-on-dark":te.tertiaryOnDark,"dropdown-item":te.dropdownItem},Tl={none:te.noSpacing,condensed:te.condensedSpacing,compact:te.compactSpacing,cozy:te.cozySpacing,default:te.defaultSpacing,comfortable:te.comfortableSpacing,relaxed:te.relaxedSpacing,loose:te.looseSpacing};function Ol(e){const{actions:t,actionsContainerClassName:n,children:r,childrenContainerClassName:i,className:o,disabled:s,icons:a,iconsContainerClassName:d,variant:h="primary",spacing:p="default",ellipsize:f}=e,l=S(te.button,kl[h],Tl[p],s&&te.disabled,f&&te.ellipsized,o),c=u.useMemo(()=>f?g.jsx("div",{className:te.overflowWrapper,children:r}):r,[f,r]),{content:v,containerClassName:m}=zt({className:l,icons:a,children:c,actions:t,iconsContainerClassName:d,childrenContainerClassName:S(te.children,i),actionsContainerClassName:n,spacing:p,withoutWrap:!0,variant:"xs"});return{className:m,children:v,disabled:s}}function it(e){const{actions:t,actionsContainerClassName:n,children:r,childrenContainerClassName:i,className:o,disabled:s,icons:a,iconsContainerClassName:d,name:h,onClick:p,variant:f,type:l="button",spacing:c,...v}=e,m=u.useCallback((b,x)=>{p&&p(b,x)},[p]),w=Ol({variant:f,className:o,actionsContainerClassName:n,iconsContainerClassName:d,childrenContainerClassName:i,children:r,icons:a,actions:t,spacing:c,disabled:s||l!=="submit"&&O(p)});return g.jsx(Hr,{name:h,type:l,onClick:m,...v,...w})}const Al=({title:e,titleId:t,...n})=>u.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":t},n),e?u.createElement("title",{id:t},e):null,u.createElement("g",{clipPath:"url(#alert-line_svg__a)"},u.createElement("path",{d:"m12.866 3 9.526 16.5a1 1 0 0 1-.866 1.5H2.474a1 1 0 0 1-.866-1.5L11.134 3a1 1 0 0 1 1.732 0Zm-8.66 16h15.588L12 5.5 4.206 19ZM11 16h2v2h-2v-2Zm0-7h2v5h-2V9Z"})),u.createElement("defs",null,u.createElement("clipPath",{id:"alert-line_svg__a"},u.createElement("path",{d:"M0 0h24v24H0z"})))),$l=({title:e,titleId:t,...n})=>u.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 56 56","aria-hidden":"true",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":t},n),e?u.createElement("title",{id:t},e):null,u.createElement("g",{clipPath:"url(#analysis_svg__a)"},u.createElement("path",{d:"m12.384 37.796-7.179 7.18a4.115 4.115 0 0 0 5.82 5.819l7.179-7.18a24.009 24.009 0 0 1-5.82-5.819Zm13.619-13.798h-4a1.003 1.003 0 0 0-1 1v4.94a12.572 12.572 0 0 0 6 5.518V24.998a1.003 1.003 0 0 0-1-1Zm15.998-6h-4a1.003 1.003 0 0 0-1 1v16.458a12.572 12.572 0 0 0 6-5.519V18.998a1.003 1.003 0 0 0-1-1Zm-7.999 3h-4a1.003 1.003 0 0 0-1 1v14.138c1.972.48 4.029.48 6 0V21.998a1.003 1.003 0 0 0-1-1Z"}),u.createElement("path",{d:"M32.002 4a19.998 19.998 0 1 0 0 39.995 19.998 19.998 0 0 0 0-39.995Zm10.999 30.177a14.998 14.998 0 1 1-21.998-20.394 14.998 14.998 0 0 1 21.998 20.394Z"})),u.createElement("defs",null,u.createElement("clipPath",{id:"analysis_svg__a"},u.createElement("path",{d:"M0 0h56v56H0z"})))),Do=({title:e,titleId:t,...n})=>u.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":t},n),e?u.createElement("title",{id:t},e):null,u.createElement("g",{clipPath:"url(#arrow-down-small-fill_svg__a)"},u.createElement("path",{d:"m12 16-6-6h12l-6 6Z"})),u.createElement("defs",null,u.createElement("clipPath",{id:"arrow-down-small-fill_svg__a"},u.createElement("path",{d:"M0 0h24v24H0z"})))),jl=({title:e,titleId:t,...n})=>u.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":t},n),e?u.createElement("title",{id:t},e):null,u.createElement("g",{clipPath:"url(#arrow-drop-down-line_svg__a)"},u.createElement("path",{d:"m12 15-4.243-4.243 1.415-1.414L12 12.172l2.828-2.83 1.415 1.415L12 15Z"})),u.createElement("defs",null,u.createElement("clipPath",{id:"arrow-drop-down-line_svg__a"},u.createElement("path",{d:"M0 0h24v24H0z"})))),Ml=({title:e,titleId:t,...n})=>u.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":t},n),e?u.createElement("title",{id:t},e):null,u.createElement("g",{clipPath:"url(#arrow-drop-up-line_svg__a)"},u.createElement("path",{d:"m12 11.828-2.828 2.829-1.415-1.414L12 9l4.243 4.243-1.415 1.414L12 11.828Z"})),u.createElement("defs",null,u.createElement("clipPath",{id:"arrow-drop-up-line_svg__a"},u.createElement("path",{d:"M0 0h24v24H0z"})))),gv=({title:e,titleId:t,...n})=>u.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":t},n),e?u.createElement("title",{id:t},e):null,u.createElement("g",{clipPath:"url(#arrow-right-line_svg__a)"},u.createElement("path",{d:"m16.172 11-5.364-5.364 1.414-1.414L20 12l-7.778 7.778-1.414-1.414L16.172 13H4v-2h12.172Z"})),u.createElement("defs",null,u.createElement("clipPath",{id:"arrow-right-line_svg__a"},u.createElement("path",{d:"M0 0h24v24H0z"})))),Ro=({title:e,titleId:t,...n})=>u.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":t},n),e?u.createElement("title",{id:t},e):null,u.createElement("g",{clipPath:"url(#arrow-up-small-fill_svg__a)"},u.createElement("path",{d:"m12 8 6 6H6l6-6Z"})),u.createElement("defs",null,u.createElement("clipPath",{id:"arrow-up-small-fill_svg__a"},u.createElement("path",{d:"M0 0h24v24H0z"})))),Pl=({title:e,titleId:t,...n})=>u.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":t},n),e?u.createElement("title",{id:t},e):null,u.createElement("g",{clipPath:"url(#check-double-fill_svg__a)"},u.createElement("path",{d:"m11.602 13.76 1.412 1.412 8.466-8.466 1.414 1.414-9.88 9.88-6.364-6.364 1.414-1.414 2.125 2.125 1.413 1.412Zm.002-2.829 4.952-4.952 1.41 1.41-4.952 4.952-1.41-1.41Zm-2.827 5.656L7.364 18 1 11.636l1.414-1.414 1.413 1.412-.001.002 4.951 4.95Z"})),u.createElement("defs",null,u.createElement("clipPath",{id:"check-double-fill_svg__a"},u.createElement("path",{d:"M0 0h24v24H0z"})))),Il=({title:e,titleId:t,...n})=>u.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":t},n),e?u.createElement("title",{id:t},e):null,u.createElement("g",{clipPath:"url(#check-line_svg__a)"},u.createElement("path",{d:"m10 15.171 9.192-9.192 1.415 1.414L10 18l-6.364-6.364 1.414-1.414 4.95 4.95Z"})),u.createElement("defs",null,u.createElement("clipPath",{id:"check-line_svg__a"},u.createElement("path",{d:"M0 0h24v24H0z"})))),Ll=({title:e,titleId:t,...n})=>u.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":t},n),e?u.createElement("title",{id:t},e):null,u.createElement("g",{clipPath:"url(#checkbox-blank-circle-line_svg__a)"},u.createElement("path",{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10Zm0-2a8 8 0 1 0 0-16.001A8 8 0 0 0 12 20Z"})),u.createElement("defs",null,u.createElement("clipPath",{id:"checkbox-blank-circle-line_svg__a"},u.createElement("path",{d:"M0 0h24v24H0z"})))),qo=({title:e,titleId:t,...n})=>u.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":t},n),e?u.createElement("title",{id:t},e):null,u.createElement("g",{clipPath:"url(#checkbox-blank-line_svg__a)"},u.createElement("path",{d:"M4 3h16a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Zm1 2v14h14V5H5Z"})),u.createElement("defs",null,u.createElement("clipPath",{id:"checkbox-blank-line_svg__a"},u.createElement("path",{d:"M0 0h24v24H0z"})))),Dl=({title:e,titleId:t,...n})=>u.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":t},n),e?u.createElement("title",{id:t},e):null,u.createElement("g",{clipPath:"url(#checkbox-indeterminate-line_svg__a)"},u.createElement("path",{d:"M4 3h16a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Zm1 2v14h14V5H5Zm2 6h10v2H7v-2Z"})),u.createElement("defs",null,u.createElement("clipPath",{id:"checkbox-indeterminate-line_svg__a"},u.createElement("path",{d:"M0 0h24v24H0z"})))),Bo=({title:e,titleId:t,...n})=>u.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":t},n),e?u.createElement("title",{id:t},e):null,u.createElement("g",{clipPath:"url(#checkbox-line_svg__a)"},u.createElement("path",{d:"M4 3h16a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Zm1 2v14h14V5H5Zm6.003 11L6.76 11.757l1.414-1.414 2.829 2.829 5.656-5.657 1.415 1.414L11.003 16Z"})),u.createElement("defs",null,u.createElement("clipPath",{id:"checkbox-line_svg__a"},u.createElement("path",{d:"M0 0h24v24H0z"})))),vv=({title:e,titleId:t,...n})=>u.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":t},n),e?u.createElement("title",{id:t},e):null,u.createElement("g",{clipPath:"url(#chevron-left-line_svg__a)"},u.createElement("path",{d:"M11.05 12 16 7.05l-1.413-1.414L8.223 12l6.364 6.364L16 16.95 11.05 12Z"})),u.createElement("defs",null,u.createElement("clipPath",{id:"chevron-left-line_svg__a"},u.createElement("path",{d:"M0 24h24V0H0z"})))),bv=({title:e,titleId:t,...n})=>u.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":t},n),e?u.createElement("title",{id:t},e):null,u.createElement("g",{clipPath:"url(#chevron-right-line_svg__a)"},u.createElement("path",{d:"m13.172 12-4.95-4.95 1.414-1.414L16 12l-6.364 6.364-1.414-1.414 4.95-4.95Z"})),u.createElement("defs",null,u.createElement("clipPath",{id:"chevron-right-line_svg__a"},u.createElement("path",{d:"M0 0h24v24H0z"})))),Rl=({title:e,titleId:t,...n})=>u.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":t},n),e?u.createElement("title",{id:t},e):null,u.createElement("path",{fillRule:"evenodd",d:"m13.057 11.996 4.716-4.716a.75.75 0 1 0-1.06-1.06l-4.717 4.716L7.28 6.22a.75.75 0 1 0-1.06 1.06l4.716 4.716-4.716 4.716a.75.75 0 1 0 1.06 1.06l4.716-4.715 4.716 4.716a.748.748 0 0 0 1.061 0 .75.75 0 0 0 0-1.061l-4.716-4.716Z",clipRule:"evenodd"})),yv=({title:e,titleId:t,...n})=>u.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":t},n),e?u.createElement("title",{id:t},e):null,u.createElement("g",{clipPath:"url(#delete-bin-line_svg__a)"},u.createElement("path",{d:"M17 6h5v2h-2v13a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V8H2V6h5V3a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v3Zm1 2H6v12h12V8Zm-9 3h2v6H9v-6Zm4 0h2v6h-2v-6ZM9 4v2h6V4H9Z"})),u.createElement("defs",null,u.createElement("clipPath",{id:"delete-bin-line_svg__a"},u.createElement("path",{d:"M0 0h24v24H0z"})))),wv=({title:e,titleId:t,...n})=>u.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":t},n),e?u.createElement("title",{id:t},e):null,u.createElement("g",{clipPath:"url(#filter-line_svg__a)"},u.createElement("path",{d:"M9 13.5 4 6H3V4h18v2h-1l-5 7.5V22H9v-8.5ZM6.404 6 11 12.894V20h2v-7.106L17.596 6H6.404Z"})),u.createElement("defs",null,u.createElement("clipPath",{id:"filter-line_svg__a"},u.createElement("path",{d:"M0 0h24v24H0z"})))),xv=({title:e,titleId:t,...n})=>u.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 32 32",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":t},n),e?u.createElement("title",{id:t},e):null,u.createElement("path",{d:"M17.949 6.651a1.834 1.834 0 1 0-1.833 1.834c1.01 0 1.833-.822 1.833-1.834Zm-7.806 15.847a1.836 1.836 0 0 0-1.833 1.834c0 1.01.822 1.832 1.833 1.832a1.835 1.835 0 0 0 1.833-1.832 1.836 1.836 0 0 0-1.833-1.834Zm5.973-10.343a2.506 2.506 0 1 0 .001 5.012 2.506 2.506 0 0 0-.001-5.012Zm5.973 10.343a1.834 1.834 0 1 0 1.833 1.834 1.836 1.836 0 0 0-1.833-1.834Z"}),u.createElement("path",{fillRule:"evenodd",d:"M0 16C0 7.163 7.164 0 16 0c8.837 0 16 7.163 16 16 0 8.836-7.164 16-16 16S0 24.836 0 16Zm22.089 11.044a2.716 2.716 0 0 1-2.713-2.713c0-.828.375-1.57.962-2.068l-2.589-4.324a3.643 3.643 0 0 1-3.266 0l-2.589 4.324a2.7 2.7 0 0 1 .962 2.068 2.716 2.716 0 0 1-2.713 2.713A2.716 2.716 0 0 1 7.43 24.33a2.716 2.716 0 0 1 2.713-2.713c.352 0 .688.07.997.192l2.606-4.354a3.664 3.664 0 0 1 1.93-6.43v-1.7a2.714 2.714 0 0 1-2.273-2.674 2.716 2.716 0 0 1 2.714-2.713 2.716 2.716 0 0 1 2.712 2.713 2.714 2.714 0 0 1-2.272 2.674v1.7a3.664 3.664 0 0 1 3.226 3.636 3.651 3.651 0 0 1-1.297 2.794l2.607 4.354c.31-.122.645-.192.997-.192a2.716 2.716 0 0 1 2.712 2.713 2.716 2.716 0 0 1-2.713 2.713ZM4.497 14.677c0-1.958 1.228-3.59 3.282-3.59 1.497 0 2.754.798 2.936 2.342H9.544c-.114-.901-.901-1.363-1.765-1.363-1.47 0-2.083 1.295-2.083 2.61 0 1.316.613 2.61 2.083 2.61 1.227.02 1.899-.719 1.919-1.88H7.875v-.912h2.917v3.609h-.768l-.182-.806c-.643.73-1.227.969-2.062.969-2.055 0-3.283-1.632-3.283-3.59Z",clipRule:"evenodd"})),ql=({title:e,titleId:t,...n})=>u.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":t},n),e?u.createElement("title",{id:t},e):null,u.createElement("g",{clipPath:"url(#information-line_svg__a)"},u.createElement("path",{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10Zm0-2a8 8 0 1 0 0-16.001A8 8 0 0 0 12 20ZM11 7h2v2h-2V7Zm0 4h2v6h-2v-6Z"})),u.createElement("defs",null,u.createElement("clipPath",{id:"information-line_svg__a"},u.createElement("path",{d:"M0 0h24v24H0z"})))),Cv=({title:e,titleId:t,...n})=>u.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":t},n),e?u.createElement("title",{id:t},e):null,u.createElement("g",{clipPath:"url(#menu-line_svg__a)"},u.createElement("path",{d:"M3 4h18v2H3V4Zm0 7h18v2H3v-2Zm0 7h18v2H3v-2Z"})),u.createElement("defs",null,u.createElement("clipPath",{id:"menu-line_svg__a"},u.createElement("path",{d:"M0 0h24v24H0z"})))),_v=({title:e,titleId:t,...n})=>u.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":t},n),e?u.createElement("title",{id:t},e):null,u.createElement("g",{clipPath:"url(#question-line_svg__a)"},u.createElement("path",{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10Zm0-2a8 8 0 1 0 0-16.001A8 8 0 0 0 12 20Zm-1-5h2v2h-2v-2Zm2-1.645V14h-2v-1.5a1 1 0 0 1 1-1 1.5 1.5 0 1 0-1.471-1.794l-1.962-.393A3.5 3.5 0 1 1 13 13.355Z"})),u.createElement("defs",null,u.createElement("clipPath",{id:"question-line_svg__a"},u.createElement("path",{d:"M0 0h24v24H0z"})))),Bl=({title:e,titleId:t,...n})=>u.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":t},n),e?u.createElement("title",{id:t},e):null,u.createElement("g",{clipPath:"url(#radio-button-line_svg__a)"},u.createElement("path",{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10Zm0-2a8 8 0 1 0 0-16.001A8 8 0 0 0 12 20Zm0-3a5 5 0 1 1 0-10 5 5 0 0 1 0 10Z"})),u.createElement("defs",null,u.createElement("clipPath",{id:"radio-button-line_svg__a"},u.createElement("path",{d:"M0 0h24v24H0z"})))),Ev=({title:e,titleId:t,...n})=>u.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":t},n),e?u.createElement("title",{id:t},e):null,u.createElement("g",{clipPath:"url(#search-line_svg__a)"},u.createElement("path",{d:"m18.031 16.617 4.283 4.282-1.415 1.415-4.282-4.283A8.96 8.96 0 0 1 11 20c-4.968 0-9-4.032-9-9s4.032-9 9-9 9 4.032 9 9a8.96 8.96 0 0 1-1.969 5.617Zm-2.006-.742A6.977 6.977 0 0 0 18 11c0-3.868-3.133-7-7-7-3.868 0-7 3.132-7 7 0 3.867 3.132 7 7 7a6.977 6.977 0 0 0 4.875-1.975l.15-.15Z"})),u.createElement("defs",null,u.createElement("clipPath",{id:"search-line_svg__a"},u.createElement("path",{d:"M0 0h24v24H0z"})))),Nv=({title:e,titleId:t,...n})=>u.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 25 25",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":t},n),e?u.createElement("title",{id:t},e):null,u.createElement("path",{d:"M8.775 9.71a2.284 2.284 0 0 0-2.2 1.66H4.623a.623.623 0 0 0 0 1.247h1.952a2.284 2.284 0 0 0 4.401 0h8.804a.623.623 0 0 0 0-1.246h-8.804a2.284 2.284 0 0 0-2.2-1.661Zm0 3.322a1.038 1.038 0 1 1 0-2.076 1.038 1.038 0 0 1 0 2.076ZM15.627 4a2.284 2.284 0 0 0-2.2 1.661H4.622a.623.623 0 0 0 0 1.246h8.803a2.285 2.285 0 0 0 4.402 0h1.952a.623.623 0 1 0 0-1.246h-1.952A2.284 2.284 0 0 0 15.628 4Zm0 3.322a1.038 1.038 0 1 1 0-2.077 1.038 1.038 0 0 1 0 2.077Zm0 8.098a2.284 2.284 0 0 0-2.2 1.66H4.622a.623.623 0 0 0 0 1.246h8.803a2.285 2.285 0 0 0 4.402 0h1.952a.623.623 0 0 0 0-1.245h-1.952a2.284 2.284 0 0 0-2.2-1.661Zm0 3.322a1.038 1.038 0 1 1 0-2.077 1.038 1.038 0 0 1 0 2.077Z"})),Fl=({title:e,titleId:t,...n})=>u.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":t},n),e?u.createElement("title",{id:t},e):null,u.createElement("path",{fillRule:"evenodd",d:"m15.063 12 .937.938-4 4-4-4L8.938 12 12 15.063 15.063 12Z",clipRule:"evenodd"}),u.createElement("mask",{id:"table-sorting-line_svg__a",width:8,height:5,x:8,y:12,maskUnits:"userSpaceOnUse",style:{maskType:"luminance"}},u.createElement("path",{fillRule:"evenodd",d:"m15.063 12 .937.938-4 4-4-4L8.938 12 12 15.063 15.063 12Z",clipRule:"evenodd"})),u.createElement("g",{mask:"url(#table-sorting-line_svg__a)"},u.createElement("path",{d:"M-24-22h72v72h-72z"})),u.createElement("path",{fillRule:"evenodd",d:"M8.938 11 8 10.062l4-4 4 4-.938.938L12 7.937 8.937 11Z",clipRule:"evenodd"}),u.createElement("mask",{id:"table-sorting-line_svg__b",width:8,height:5,x:8,y:6,maskUnits:"userSpaceOnUse",style:{maskType:"luminance"}},u.createElement("path",{fillRule:"evenodd",d:"M8.938 11 8 10.062l4-4 4 4-.938.938L12 7.937 8.937 11Z",clipRule:"evenodd"})),u.createElement("g",{mask:"url(#table-sorting-line_svg__b)"},u.createElement("path",{d:"M48 45h-72v-72h72z"}))),Sv=({title:e,titleId:t,...n})=>u.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-labelledby":t},n),e?u.createElement("title",{id:t},e):null,u.createElement("g",{clipPath:"url(#upload-cloud-line_svg__a)"},u.createElement("path",{d:"M1 14.5a6.496 6.496 0 0 1 3.064-5.519 8.001 8.001 0 0 1 15.872 0 6.5 6.5 0 0 1-2.936 12l-10 .02c-3.356-.275-6-3.079-6-6.5Zm15.848 4.487a4.5 4.5 0 0 0 2.03-8.309l-.807-.503-.12-.942a6 6 0 0 0-11.903 0l-.12.942-.805.503a4.5 4.5 0 0 0 2.029 8.31l.173.012h9.35l.173-.013ZM13 13v4h-2v-4H8l4-5 4 5h-3Z"})),u.createElement("defs",null,u.createElement("clipPath",{id:"upload-cloud-line_svg__a"},u.createElement("path",{d:"M0 0h24v24H0z"})))),Hl="_spinner_50bgg_1",Ul="_spinner-bounce_50bgg_9",Yt={spinner:Hl,spinnerBounce:Ul};function Vl(e){const{className:t}=e;return g.jsxs("div",{className:S(Yt.spinner,t),children:[g.jsx("div",{className:Yt.spinnerBounce}),g.jsx("div",{className:Yt.spinnerBounce}),g.jsx("div",{className:Yt.spinnerBounce})]})}const zl="_message_176iw_1",Wl="_icon_176iw_13",Gl="_spinner_176iw_17",Zl="_title_176iw_22",Xl="_errored_176iw_27",Ql="_compact_176iw_33",Pe={message:zl,icon:Wl,spinner:Gl,title:Zl,errored:Xl,compact:Ql};function Yl(e){const{className:t,pending:n=!1,variant:r,icon:i,title:o,description:s,actions:a,compact:d=!1,errored:h,erroredTitle:p,erroredDescription:f}=e,l=V(h?p:o),c=V(h?f:s);return g.jsxs("div",{className:S(Pe.message,r==="error"&&Pe.errored,d&&Pe.compact,t),children:[(i||n)&&g.jsxs("div",{className:Pe.icon,children:[n&&g.jsx(Vl,{className:Pe.spinner}),!n&&i]}),l&&g.jsx("div",{className:Pe.title,children:h?p:o}),c&&g.jsx("div",{className:Pe.description,children:s}),a&&g.jsx("div",{className:Pe.actions,children:a})]})}function Mn(e){const{strings:t,registerNamespace:n}=u.useContext(Io);return u.useEffect(()=>{n(e.namespace,e.strings)},[n,e]),t[e.namespace]??e.strings}const Jl="common",Kl={messageTitleFetching:"Fetching data...",messageTitleFilteredDataNotAvailable:"Data is not available for selected filter!",messageTitleDataNotAvailable:"Data is not available!",messageTitleDataFailedToFetch:"Failed to fetch data!"},ec={namespace:Jl,strings:Kl},tc="_default-message_wu986_1",nc="_overlay_wu986_2",ji={defaultMessage:tc,overlay:nc};function Vr(e){const{className:t,compact:n,pending:r,overlayPending:i,filtered:o,empty:s,errored:a,emptyMessage:d,filteredEmptyMessage:h,pendingMessage:p,errorMessage:f}=e,l=Mn(ec),c=u.useMemo(()=>r?p??l.messageTitleFetching:a?f??l.messageTitleDataFailedToFetch:o?h??l.messageTitleFilteredDataNotAvailable:s?d??l.messageTitleDataNotAvailable:null,[s,r,o,a,d,h,p,f,l]);return!s&&!r&&!a?null:g.jsx(Yl,{className:S(ji.defaultMessage,r&&i&&ji.overlay,t),icon:g.jsx($l,{}),compact:n,title:c,pending:r})}const rc="_filter-bar_16xsj_1",ic="_grid-with-actions_16xsj_6",oc="_grid_16xsj_6",ac="_actions_16xsj_15",$t={filterBar:rc,gridWithActions:ic,grid:oc,actions:ac};function Mi(e){const{grid:t,actions:n,spacing:r="default"}=e,i=Ee({spacing:r,mode:"gap"}),o=Ee({spacing:r,mode:"gap",inner:!0}),s=Ee({spacing:r,mode:"grid-gap"});return O(t)&&O(n)?null:g.jsxs("div",{className:S($t.gridWithActions,i),children:[g.jsx("div",{className:S($t.grid,s),children:t}),V(n)&&g.jsx("div",{className:S($t.actions,o),children:n})]})}function sc(e){const{className:t,filters:n,filterActions:r,search:i,searchActions:o,filterPreview:s,spacing:a}=e;return O(n)&&O(r)&&O(i)&&O(o)&&O(s)?null:g.jsxs("div",{className:S($t.filterBar,t),children:[g.jsx(Mi,{grid:n,actions:r,spacing:a}),g.jsx(Mi,{grid:i,actions:o,spacing:a}),V(s)&&g.jsx("div",{className:$t.filterPreview,children:s})]})}function lc(e){const{actions:t,actionsContainerClassName:n,children:r,childrenContainerClassName:i,className:o,icons:s,iconsContainerClassName:a,spacing:d,withoutWrap:h}=e,{content:p,containerClassName:f}=zt({actions:t,actionsContainerClassName:n,children:r,childrenContainerClassName:i,className:o,icons:s,iconsContainerClassName:a,spacing:d,withoutWrap:h});return g.jsx("div",{className:f,children:p})}function cc(e,t,n){const[r,i]=u.useState(()=>e);return u.useEffect(()=>{const o=setTimeout(()=>{i(e)},300);return()=>{clearTimeout(o)}},[e,t,n]),r}function uc(e,t=!1){const[n,r]=u.useState(()=>{var i;const o=(i=e.current)==null?void 0:i.getBoundingClientRect();return{width:o?.width??0,height:o?.height??0}});return u.useEffect(()=>{const i=new ResizeObserver(s=>{const a=s.at(0),d=a?.contentRect;d&&r({width:d.width,height:d.height})}),o=e.current;return!t&&V(o)&&i.observe(o),()=>{!t&&V(o)&&i.unobserve(o)}},[t,e]),cc(n)}const dc="_heading_1uxwj_1",hc="_level-one_1uxwj_9",pc="_level-two_1uxwj_17",fc="_level-three_1uxwj_25",mc="_level-four_1uxwj_33",gc="_level-five_1uxwj_37",vc="_level-six_1uxwj_41",bc="_ellipsized-text_1uxwj_45",yc="_ellipsized_1uxwj_45",Oe={heading:dc,levelOne:hc,levelTwo:pc,levelThree:fc,levelFour:mc,levelFive:gc,levelSix:vc,ellipsizedText:bc,ellipsized:yc},wc={1:Oe.levelOne,2:Oe.levelTwo,3:Oe.levelThree,4:Oe.levelFour,5:Oe.levelFive,6:Oe.levelSix};function xc(e){const{className:t,level:n=3,children:r,ellipsize:i}=e,o=`h${n}`,s=u.useRef(null),a=uc(s);return r?g.jsxs(o,{className:S(Oe.heading,i&&Oe.ellipsized,wc[n],t),ref:s,children:[i&&g.jsx("div",{className:Oe.ellipsizedText,style:{width:`${a.width}px`},title:typeof r=="string"?r:void 0,children:r}),!i&&r]}):null}const Cc="_header_537v1_1",_c={header:Cc};function Ec(e){const{actions:t,actionsContainerClassName:n,children:r,childrenContainerClassName:i,className:o,elementRef:s,ellipsizeHeading:a,heading:d,headingClassName:h,headingLevel:p,headingDescription:f,headingDescriptionContainerClassName:l,icons:c,iconsContainerClassName:v,headingSectionClassName:m,headingContainerClassName:w,wrapHeadingContent:b=!1,spacing:x="default"}=e,C=u.useMemo(()=>O(d)&&O(f)?null:g.jsxs(g.Fragment,{children:[g.jsx(xc,{level:p,className:h,ellipsize:a,children:d}),f&&g.jsx("div",{className:l,children:f})]}),[d,a,f,h,l,p]),{content:N,containerClassName:k}=zt({actions:t,actionsContainerClassName:n,children:C,childrenContainerClassName:w,className:m,icons:c,iconsContainerClassName:v,withoutWrap:!b,spacing:x,variant:"sm"}),j=Ee({spacing:x,inner:!0});return!N&&!r?null:g.jsxs("div",{className:S(_c.header,j,o),ref:s,children:[N&&g.jsx("div",{className:k,children:N}),r&&g.jsx("div",{className:i,children:r})]})}const Nc="_container_lyve2_1",Sc="_header_lyve2_8",kc="_centered-header-description-container_lyve2_11",Tc="_centered-description_lyve2_16",Oc="_with-border-and-header-background_lyve2_23",Ac="_border_lyve2_33",$c="_content_lyve2_39",jc="_pending-overlaid_lyve2_42",Mc="_message_lyve2_47",Pc="_footer_lyve2_53",Ic="_with-grid-view_lyve2_57",Lc="_two-columns_lyve2_67",Dc="_three-columns_lyve2_82",Rc="_four-columns_lyve2_96",qc="_five-columns_lyve2_100",Bc="_with-vertical-view_lyve2_105",Fc="_with-overflow-in-content_lyve2_112",ee={container:Nc,header:Sc,centeredHeaderDescriptionContainer:kc,centeredDescription:Tc,withBorderAndHeaderBackground:Oc,border:Ac,content:$c,pendingOverlaid:jc,message:Mc,footer:Pc,withGridView:Ic,twoColumns:Lc,threeColumns:Dc,fourColumns:Rc,fiveColumns:qc,withVerticalView:Bc,withOverflowInContent:Fc},Hc={2:ee.twoColumns,3:ee.threeColumns,4:ee.fourColumns,5:ee.fiveColumns};function Fo(e){const{actions:t,actionsContainerClassName:n,children:r,childrenContainerClassName:i,className:o,containerRef:s,contentViewType:a="default",ellipsizeHeading:d,filters:h,filterActions:p,footerActions:f,footerActionsContainerClassName:l,footerClassName:c,footerContent:v,footerContentClassName:m,footerIcons:w,headerClassName:b,headerDescription:x,withCenteredHeaderDescription:C,headerDescriptionContainerClassName:N,headerElementRef:k,heading:j,headingClassName:M,headingContainerClassName:R,headingDescription:L,headingDescriptionContainerClassName:B,headingLevel:y,headingSectionClassName:_,icons:E,iconsContainerClassName:T,numPreferredGridContentColumns:A=2,spacing:P="default",withHeaderBorder:$=!1,withFooterBorder:Z=!1,withBorderAndHeaderBackground:X=!1,withOverflowInContent:J=!1,withInternalPadding:Y=!1,withoutWrapInHeading:K=!1,withoutWrapInFooter:re=!1,pending:H=!1,overlayPending:q=!1,empty:U=!1,errored:G=!1,filtered:Q=!1,compactMessage:ye=!1,errorMessage:Re,emptyMessage:Qe,pendingMessage:mt,filteredEmptyMessage:qe}=e,ie=w||v||f,oe=j||t||E||x||L,ve=Ee({spacing:P}),ae=Ee({spacing:P,mode:"padding-h"}),se=Ee({spacing:P,mode:"padding-v"}),Ye=Ee({spacing:P,mode:"gap",inner:!0}),Wn=u.useMemo(()=>O(x)?null:C?g.jsx("div",{className:ee.centeredDescription,children:x}):x,[x,C]);return!oe&&!h&&!r&&!ie&&!U&&!H&&!G&&!Q?null:g.jsxs("div",{ref:s,className:S(ee.container,!X&&ve,Y&&se,J&&ee.withOverflowInContent,X&&ee.withBorderAndHeaderBackground,a==="grid"&&ee.withGridView,a==="grid"&&Hc[A],a==="vertical"&&ee.withVerticalView,o),children:[oe&&g.jsx(Ec,{actions:t,className:S(ee.header,X&&se,(Y||X)&&ae,b),elementRef:k,actionsContainerClassName:n,ellipsizeHeading:d,heading:j,headingLevel:y,icons:E,iconsContainerClassName:T,childrenContainerClassName:S(C&&ee.centeredHeaderDescriptionContainer,N),headingSectionClassName:_,headingClassName:M,headingContainerClassName:R,wrapHeadingContent:!K,headingDescription:L,headingDescriptionContainerClassName:B,spacing:P,children:Wn}),$&&g.jsx("div",{className:ee.border}),g.jsx(sc,{filters:h,filterActions:p,spacing:P,className:S(Y&&ae)}),(r||U||H||G||Q)&&g.jsxs("div",{className:S(ee.content,a!=="default"&&Ye,(Y||X)&&ae,X&&se,q&&H&&ee.pendingOverlaid,i),children:[g.jsx(Vr,{className:ee.message,pending:H,filtered:Q,errored:G,empty:U,compact:ye,overlayPending:q,emptyMessage:Qe,filteredEmptyMessage:qe,pendingMessage:mt,errorMessage:Re}),!U&&!G&&(!H||q)&&r]}),ie&&Z&&g.jsx("div",{className:ee.border}),ie&&g.jsx(lc,{actions:f,icons:w,childrenContainerClassName:m,className:S(ee.footer,Y&&ae,X&&se,c),actionsContainerClassName:l,spacing:P,withoutWrap:re,children:v})]})}function Uc(e){const{children:t,container:n=document.body,portalKey:r}=e;return g.jsx(g.Fragment,{children:Gs.createPortal(t,n,r)})}const Vc="yyyy-MM-dd",Ho="-",zc=108;function ot(e,t,n){return O(e)?void 0:e.reduce((r,i,o)=>{const s=t(i,o);return r[s]=n?n(i,s,o,r):i,r},{})}function zr(e,t){return function(n,r){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;const o=V(n)?e(n):void 0,s=V(r)?e(r):void 0;return o===s?0:O(o)?i*1:O(s)?i*-1:i*t(o,s)}}const Wc=zr(e=>e,(e,t)=>e.localeCompare(t)),Gc=zr(e=>e,(e,t)=>e-t),Zc=(e,t,n,r)=>n?zr(i=>i,(i,o)=>{const s=n.toLowerCase(),a=i.toLowerCase().indexOf(s),d=o.toLowerCase().indexOf(s);return a===d||a===-1&&d===-1?i.localeCompare(o):d===-1?-1:a===-1?1:a-d})(e,t,r):0,Xc=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Qc=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];var Ae=function(e){return e.time="time",e.date="date",e}(Ae||{});function Pi(e,t){let n,r;return t.forEach(i=>{const o=e.indexOf(i);if(o===-1)return;const s=o+i.length;(n===void 0||or)&&(r=s)}),{start:n,end:r}}function Yc(e){const{start:t,end:n}=Pi(e,["yyyy","yy","MMM","MM","dd","EEE"]),{start:r,end:i}=Pi(e,["hh","mm","ss","aaa"]),o=e.length,s=(a,d)=>a===void 0||d===void 0?"":e.substring(a,d);return t===void 0&&r===void 0?[{value:e}].filter(a=>a.value!==""):t===void 0?[{value:s(0,r)},{type:Ae.time,value:s(r,i)},{value:s(i,o)}].filter(a=>a.value!==""):r===void 0?[{value:s(0,t)},{type:Ae.date,value:s(t,n)},{value:s(n,o)}].filter(a=>a.value!==""):ta.value!==""):[{value:s(0,r)},{type:Ae.time,value:s(r,i)},{value:s(i,t)},{type:Ae.date,value:s(t,n)},{value:s(n,o)}].filter(a=>a.value!=="")}function Jc(e,t){return e.map(n=>{if(n.type===Ae.date){const r=t.getFullYear(),i=t.getMonth(),o=t.getDate(),s=Qc[t.getDay()],a={...n};return a.value=a.value.replace("yyyy",String(r)).replace("yy",String(r%100)).replace("MMM",Xc[i]).replace("MM",vt(i+1,2)).replace("EEE",s).replace("dd",vt(o,2)),a}if(n.type===Ae.time){const r=n.value.indexOf("aaa"),i=t.getHours(),o=r>=0?(i-1)%12+1:i,s=i>=12?"PM":"AM",a=t.getMinutes(),d=t.getSeconds(),h={...n};return h.value=h.value.replace("hh",vt(o,2)).replace("mm",vt(a,2)).replace("ss",vt(d,2)).replace("aaa",s),h}return n})}function Kc(e,t,n=!0){if(O(e)||O(t))return;if(t===0)return 0;const r=e*100/t;return n?Ur(r,0,100):r}function eu(e){if(O(e))return;const t=e.filter(V);if(t.length!==0)return t}function tu(e){const t=eu(e);if(!O(t))return At(t)}function We(e,t,n){return Fr(t)?e:e.filter(r=>nl(n(r),t)).sort((r,i)=>Zc(n(r),n(i),t))}function Ii(e){if(e<1e3)return 2;const t=new Intl.NumberFormat("default",{notation:"compact"}).formatToParts(e).find(({type:n})=>n==="fraction");return O(t)||Fr(t.value)?0:Number(t.value)>.1?1:0}function nu(e,t){if(O(e))return;const n={};if(O(t))return n.maximumFractionDigits=Ii(e),new Intl.NumberFormat("default",n).format(e);const{currency:r,unit:i,maximumFractionDigits:o,compact:s,separatorHidden:a,language:d}=t;return Vt(i)&&(n.unit=i,n.unitDisplay="short"),r&&(n.currencyDisplay="narrowSymbol",n.style="currency"),s&&(n.notation="compact",n.compactDisplay="short"),n.useGrouping=!a,V(o)?n.maximumFractionDigits=o:n.maximumFractionDigits=Ii(e),new Intl.NumberFormat(d,n).format(e)}function ru(e,t=Vc){if(O(e))return;const n=new Date(e);return Number.isNaN(n.getTime())?void 0:Jc(Yc(t),n).map(r=>r.value).join("")}const iu="_number-output_1blvi_1",ou={numberOutput:iu};function Wr(e){const{className:t,invalidText:n=Ho,separatorHidden:r,compact:i,currency:o,value:s,tooltip:a,unit:d,prefix:h,suffix:p,maximumFractionDigits:f=1}=e,{currentLanguage:l}=u.useContext(Io),c=u.useMemo(()=>{if(O(s))return n;const v=nu(s,{currency:o,compact:i,separatorHidden:r,maximumFractionDigits:f,unit:d,language:l});return g.jsxs(g.Fragment,{children:[h,v,p]})},[n,s,i,r,o,d,f,h,l,p]);return g.jsx("div",{className:S(ou.numberOutput,t),title:V(a)?String(a):void 0,children:c})}const xn=parseFloat(getComputedStyle(document.documentElement).fontSize),au=16*xn,Qn=.5*xn,su={vertical:"bottom",horizontal:"right"};function lu(e){const t=window.innerWidth/2,n=window.innerHeight/2,r=e.x+e.width/2,i=e.y+e.height/2;return{horizontal:r{if(O(e.current))return;const o=e.current.getBoundingClientRect(),{x:s,y:a,width:d,height:h}=o,p=xn,f=p,l=window.innerWidth-p,c=window.innerWidth-2*p,v=lu(o),m=s+d/2,w=Ur(V(t)?t*xn:d,au,c);let b=m-w/2,x=m+w/2;if(bl){const C=x-l-p;x=l,b-=C}r({content:{bottom:v.vertical==="bottom"?`${window.innerHeight-a+Qn}px`:"unset",top:v.vertical==="top"?`${a+h+Qn}px`:"unset",left:v.horizontal==="left"?`${b}px`:"unset",right:v.horizontal==="right"?`${window.innerWidth-x}px`:"unset"},pointer:{left:`${m}px`,top:v.vertical==="top"?`${a+h}px`:`${a-Qn}px`,right:"unset",bottom:"unset"},width:`${x-b}px`,orientation:v})},[e,t]);return u.useEffect(()=>{i();const o=i,s=i;return window.addEventListener("scroll",o,!0),window.addEventListener("resize",s,!0),()=>{window.removeEventListener("scroll",o,!0),window.removeEventListener("resize",s,!0)}},[i]),n}const uu="_popup_cws49_1",du="_top-orientation_cws49_9",hu="_pointer_cws49_15",pu="_icon_cws49_25",yt={popup:uu,topOrientation:du,pointer:hu,icon:pu};function Pn(e){const{parentRef:t,elementRef:n,children:r,className:i,pointerClassName:o,preferredWidth:s}=e,{content:a,pointer:d,width:h,orientation:p}=cu(t,s);return g.jsxs(Uc,{children:[g.jsx("div",{ref:n,style:{...a,width:h},className:S(yt.popup,p.vertical==="bottom"&&yt.topOrientation,i),children:r}),g.jsx("div",{className:S(yt.pointer,p.vertical==="bottom"&&yt.topOrientation,o),style:{...d},children:g.jsx("svg",{className:yt.icon,viewBox:"0 0 200 100",children:g.jsx("path",{d:"M0 100 L100 0 L200 100Z"})})})]})}const fu="_tooltip-dummy_rbf3f_1",mu="_tooltip-content_rbf3f_7",gu="_pointer_rbf3f_14",Yn={tooltipDummy:fu,tooltipContent:mu,pointer:gu};function vu(e){const{className:t,title:n,description:r,preferredWidth:i}=e,[o,s]=u.useState(!1),[a,d]=u.useState(!1),h=u.useRef(),p=u.useRef(null);return u.useEffect(()=>{const f=()=>{d(!0)},l=()=>{d(!1)};if(O(p.current))return;const{current:{parentNode:c}}=p;if(!O(c))return h.current=c,c.addEventListener("mouseover",f),c.addEventListener("mouseout",l),s(!0),()=>{c.removeEventListener("mouseover",f),c.removeEventListener("mouseout",l)}},[]),g.jsxs(g.Fragment,{children:[!o&&g.jsx("div",{className:Yn.tooltipDummy,ref:p}),a&&g.jsx(Pn,{className:S(Yn.tooltipContent,t),parentRef:h,pointerClassName:Yn.pointer,preferredWidth:i,children:g.jsx(Fo,{heading:n,withInternalPadding:!0,contentViewType:"vertical",children:r})})]})}const bu="_input-error_1sxiz_1",yu="_pointer_1sxiz_14",Jt={inputError:bu,pointer:yu};function Gr(e){const{children:t,className:n,disabled:r}=e,[i,o]=u.useState(!1),s=u.useRef(),a=u.useRef(null);return u.useEffect(()=>{if(O(a.current))return;const{current:{parentElement:d}}=a;O(d)||(s.current=d,o(!0))},[]),g.jsxs(g.Fragment,{children:[!i&&g.jsx("div",{className:Jt.tooltipDummy,ref:a}),t&&!r&&g.jsxs(Pn,{className:S(Jt.inputError,n),pointerClassName:Jt.pointer,parentRef:s,children:[g.jsx(Al,{className:Jt.icon}),t]})]})}const wu="_input-label_3lsx4_1",xu="_disabled_3lsx4_7",Cu="_required_3lsx4_11",Jn={inputLabel:wu,disabled:xu,required:Cu};function Uo(e){const{children:t,className:n,disabled:r,required:i}=e;return t?g.jsxs("div",{className:S(Jn.inputLabel,r&&Jn.disabled,n),children:[t,i&&g.jsx("span",{"aria-hidden":!0,className:Jn.required,children:"*"})]}):null}function Vo(e){const{data:t,keySelector:n,renderer:r,rendererParams:i}=e;return O(t)?null:t.map((o,s)=>{const a=n(o,s),d=i(a,o,s,t);return g.jsx(r,{...d},String(a))})}const _u="_radio_1uudv_1",Eu="_icon_1uudv_5",Nu="_content_1uudv_10",Su="_description_1uudv_16",ku="_input_1uudv_21",Tu="_active_1uudv_37",Ou="_disabled_1uudv_43",Au="_read-only_1uudv_55",ke={radio:_u,icon:Eu,content:Nu,description:Su,input:ku,active:Tu,disabled:Ou,readOnly:Au};function $u(e){const{name:t,label:n,description:r,className:i,value:o,inputName:s,onClick:a,disabled:d,readOnly:h,actions:p}=e,f=ce.useCallback(()=>{a&&a(t)},[t,a]),{content:l,containerClassName:c}=zt({icons:o?g.jsx(Bl,{className:ke.icon}):g.jsx(Ll,{className:ke.icon}),actions:p,childrenContainerClassName:ke.content,children:g.jsxs(g.Fragment,{children:[n,r&&g.jsx("div",{className:ke.description,children:r})]}),spacing:"compact",withoutWrap:!0});return g.jsxs("label",{className:S(ke.radio,o&&ke.active,d&&ke.disabled,h&&ke.readOnly,c,i),children:[g.jsx("input",{className:ke.input,type:"radio",name:typeof s=="string"?s:void 0,checked:o,onClick:f,disabled:d,readOnly:!0}),l]})}const ju="_radio-input_17cft_1",Mu="_radio-list-container_17cft_6",Pu="_disabled_17cft_13",Iu="_input-hint_17cft_18",Kt={radioInput:ju,radioListContainer:Mu,disabled:Pu,inputHint:Iu};function Lu(e){return!!e.clearable}function Du(e){const t=Lu(e),{className:n,name:r,options:i,value:o,keySelector:s,labelSelector:a,descriptionSelector:d,label:h,labelContainerClassName:p,hint:f,hintContainerClassName:l,listContainerClassName:c,error:v,renderer:m=$u,rendererParams:w,disabled:b,readOnly:x,required:C,onChange:N,withAsterisk:k}=e,j=ce.useCallback(L=>{x||(t&&e.onChange(L===o?void 0:L,r),!t&&V(L)&&N(L,r))},[o,e,N,t,x,r]),M=ce.useCallback((L,B)=>{const y={inputName:r,label:a(B),description:d?d(B):void 0,name:L,onClick:j,value:L===o,disabled:b,readOnly:x};return{...w?w(B):void 0,...y}},[r,a,o,j,w,b,x,d]),R=k??C;return g.jsxs("div",{className:S(Kt.radioInput,b&&Kt.disabled,n),children:[g.jsx(Uo,{className:p,disabled:b,required:R,children:h}),g.jsx("div",{className:S(Kt.radioListContainer,c),children:g.jsx(Vo,{data:i,rendererParams:M,renderer:m,keySelector:s})}),f&&g.jsx("div",{className:S(Kt.inputHint,l),children:f}),g.jsx(Gr,{children:v})]})}function kv(e){return e.id}const Ru="common",qu={booleanYesLabel:"Yes",booleanNoLabel:"No"},Bu={namespace:Ru,strings:qu},Fu="_boolean-output_kg1uq_1",Hu={booleanOutput:Fu};function Uu(e){const{className:t,invalidText:n,value:r}=e,i=Mn(Bu);let o;return r===!0?o=i.booleanYesLabel:r===!1?o=i.booleanNoLabel:o=n,g.jsx("div",{className:S(Hu.booleanOutput,t),children:o})}const Vu="_button_1vbet_1",zu="_round_1vbet_31",Wu="_primary_1vbet_34",Gu="_secondary_1vbet_51",Zu="_tertiary_1vbet_69",Kn={button:Vu,round:zu,primary:Wu,secondary:Gu,tertiary:Zu};function Tv(e){const{ariaLabel:t,children:n,className:r,variant:i,round:o=!0,...s}=e,a=S(Kn.button,Kn[i],o&&Kn.round,r);return g.jsx(Hr,{className:a,"aria-label":t,...s,children:n})}function Xu(e){const{className:t,indeterminate:n,value:r}=e;return g.jsxs(g.Fragment,{children:[n&&g.jsx(Dl,{className:t}),r&&!n&&g.jsx(Bo,{className:t}),!r&&!n&&g.jsx(qo,{className:t})]})}const Qu="_checkbox_12g7n_1",Yu="_with-background_12g7n_7",Ju="_checkmark-container_12g7n_12",Ku="_input_12g7n_18",ed="_content_12g7n_33",td="_description_12g7n_40",nd="_checked_12g7n_45",rd="_checkmark_12g7n_12",id="_disabled-checkbox_12g7n_58",we={checkbox:Qu,withBackground:Yu,checkmarkContainer:Ju,input:Ku,content:ed,description:td,checked:nd,checkmark:rd,disabledCheckbox:id};function Ov(e){const{className:t,checkmark:n=Xu,checkmarkClassName:r,checkmarkContainerClassName:i,disabled:o,error:s,indeterminate:a,inputClassName:d,invertedLogic:h=!1,label:p,labelContainerClassName:f,name:l,onChange:c,readOnly:v,tooltip:m,value:w,description:b,withBackground:x,...C}=e,N=u.useCallback(M=>{const R=M.currentTarget.checked;c(h?!R:R,l)},[l,c,h]),k=h?!w:w,j=S(we.checkbox,t,!a&&k&&we.checked,x&&we.withBackground,o&&we.disabledCheckbox,v&&we.readOnly);return g.jsxs("label",{className:j,title:m,children:[g.jsxs("div",{className:S(we.checkmarkContainer,i),children:[g.jsx("input",{onChange:N,className:S(we.input,d),type:"checkbox",checked:k??!1,disabled:o||v,readOnly:v,...C}),g.jsx(n,{className:S(we.checkmark,r),value:k??!1,indeterminate:a,"aria-hidden":"true"})]}),(p||b)&&g.jsxs("div",{className:we.content,children:[p&&g.jsx("div",{className:f,children:p}),b&&g.jsx("div",{className:we.description,children:b})]}),s&&g.jsx(Gr,{children:s})]})}var I=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function od(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var he=function(){return he=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0}).sort(Ld)},Rd=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],ti=Rd.join(","),qd="".concat(ti,", [data-focus-guard]"),da=function(e,t){return Se((e.shadowRoot||e).children).reduce(function(n,r){return n.concat(r.matches(t?qd:ti)?[r]:[],da(r))},[])},Bd=function(e,t){var n;return e instanceof HTMLIFrameElement&&!((n=e.contentDocument)===null||n===void 0)&&n.body?ct([e.contentDocument.body],t):[e]},ct=function(e,t){return e.reduce(function(n,r){var i,o=da(r,t),s=(i=[]).concat.apply(i,o.map(function(a){return Bd(a,t)}));return n.concat(s,r.parentNode?Se(r.parentNode.querySelectorAll(ti)).filter(function(a){return a===r}):[])},[])},Fd=function(e){var t=e.querySelectorAll("[".concat(md,"]"));return Se(t).map(function(n){return ct([n])}).reduce(function(n,r){return n.concat(r)},[])},ni=function(e,t){return Se(e).filter(function(n){return aa(t,n)}).filter(function(n){return Md(n)})},Bi=function(e,t){return t===void 0&&(t=new Map),Se(e).filter(function(n){return sa(t,n)})},ri=function(e,t,n){return ei(ni(ct(e,n),t),!0,n)},It=function(e,t){return ei(ni(ct(e),t),!1)},Hd=function(e,t){return ni(Fd(e),t)},ze=function(e,t){return e.shadowRoot?ze(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:Se(e.children).some(function(n){var r;if(n instanceof HTMLIFrameElement){var i=(r=n.contentDocument)===null||r===void 0?void 0:r.body;return i?ze(i,t):!1}return ze(n,t)})},Ud=function(e){for(var t=new Set,n=e.length,r=0;r0&&t.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(s,a){return!t.has(a)})},ha=function(e){return e.parentNode?ha(e.parentNode):e},ii=function(e){var t=Ge(e);return t.filter(Boolean).reduce(function(n,r){var i=r.getAttribute(vr);return n.push.apply(n,i?Ud(Se(ha(r).querySelectorAll("[".concat(vr,'="').concat(i,'"]:not([').concat(Qo,'="disabled"])')))):[r]),n},[])},Vd=function(e){try{return e()}catch{return}},Lt=function(e){if(e===void 0&&(e=document),!(!e||!e.activeElement)){var t=e.activeElement;return t.shadowRoot?Lt(t.shadowRoot):t instanceof HTMLIFrameElement&&Vd(function(){return t.contentWindow.document})?Lt(t.contentWindow.document):t}},zd=function(e,t){return e===t},Wd=function(e,t){return!!Se(e.querySelectorAll("iframe")).some(function(n){return zd(n,t)})},pa=function(e,t){return t===void 0&&(t=Lt(ra(e).ownerDocument)),!t||t.dataset&&t.dataset.focusGuard?!1:ii(e).some(function(n){return ze(n,t)||Wd(n,t)})},Gd=function(e){e===void 0&&(e=document);var t=Lt(e);return t?Se(e.querySelectorAll("[".concat(fd,"]"))).some(function(n){return ze(n,t)}):!1},Zd=function(e,t){return t.filter(ua).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},oi=function(e,t){return ua(e)&&e.name?Zd(e,t):e},Xd=function(e){var t=new Set;return e.forEach(function(n){return t.add(oi(n,e))}),e.filter(function(n){return t.has(n)})},Fi=function(e){return e[0]&&e.length>1?oi(e[0],e):e[0]},Hi=function(e,t){return e.indexOf(oi(t,e))},wr="NEW_FOCUS",Qd=function(e,t,n,r,i){var o=e.length,s=e[0],a=e[o-1],d=Kr(r);if(!(r&&e.indexOf(r)>=0)){var h=r!==void 0?n.indexOf(r):-1,p=i?n.indexOf(i):h,f=i?e.indexOf(i):-1;if(h===-1)return f!==-1?f:wr;if(f===-1)return wr;var l=h-p,c=n.indexOf(s),v=n.indexOf(a),m=Xd(n),w=r!==void 0?m.indexOf(r):-1,b=w-(i?m.indexOf(i):h);if(!l&&f>=0||t.length===0)return f;var x=Hi(e,t[0]),C=Hi(e,t[t.length-1]);if(h<=c&&d&&Math.abs(l)>1)return C;if(h>=v&&d&&Math.abs(l)>1)return x;if(l&&Math.abs(b)>1)return f;if(h<=c)return C;if(h>v)return x;if(l)return Math.abs(l)>1?f:(o+f+l)%o}},Yd=function(e){return function(t){var n,r=(n=la(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},Ui=function(e,t,n){var r=e.map(function(o){var s=o.node;return s}),i=Bi(r.filter(Yd(n)));return i&&i.length?Fi(i):Fi(Bi(t))},xr=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&xr(e.parentNode.host||e.parentNode,t),t},or=function(e,t){for(var n=xr(e),r=xr(t),i=0;i=0)return o}return!1},fa=function(e,t,n){var r=Ge(e),i=Ge(t),o=r[0],s=!1;return i.filter(Boolean).forEach(function(a){s=or(s||a,a)||s,n.filter(Boolean).forEach(function(d){var h=or(o,d);h&&(!s||ze(h,s)?s=h:s=or(h,s))})}),s},Vi=function(e,t){return e.reduce(function(n,r){return n.concat(Hd(r,t))},[])},Jd=function(e,t){var n=new Map;return t.forEach(function(r){return n.set(r.node,r)}),e.map(function(r){return n.get(r)}).filter(Id)},Kd=function(e,t){var n=Lt(Ge(e).length>0?document:ra(e).ownerDocument),r=ii(e).filter(yr),i=fa(n||e,e,r),o=new Map,s=It(r,o),a=s.filter(function(v){var m=v.node;return yr(m)});if(a[0]){var d=It([i],o).map(function(v){var m=v.node;return m}),h=Jd(d,a),p=h.map(function(v){var m=v.node;return m}),f=h.filter(function(v){var m=v.tabIndex;return m>=0}).map(function(v){var m=v.node;return m}),l=Qd(p,f,d,n,t);if(l===wr){var c=Ui(s,f,Vi(r,o))||Ui(s,p,Vi(r,o));if(c)return{node:c};console.warn("focus-lock: cannot find any node to move focus into");return}return l===void 0?l:h[l]}},eh=function(e){var t=ii(e).filter(yr),n=fa(e,e,t),r=ei(ct([n],!0),!0,!0),i=ct(t,!1);return r.map(function(o){var s=o.node,a=o.index;return{node:s,index:a,lockItem:i.indexOf(s)>=0,guard:Kr(s)}})},ai=function(e,t){e&&("focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus())},ar=0,sr=!1,ma=function(e,t,n){n===void 0&&(n={});var r=Kd(e,t);if(!sr&&r){if(ar>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),sr=!0,setTimeout(function(){sr=!1},1);return}ar++,ai(r.node,n.focusOptions),ar--}};function wt(e){if(!e)return null;if(typeof WeakRef>"u")return function(){return e||null};var t=e?new WeakRef(e):null;return function(){return t?.deref()||null}}var th=function(e){if(!e)return null;for(var t=[],n=e;n&&n!==document.body;)t.push({current:wt(n),parent:wt(n.parentElement),left:wt(n.previousElementSibling),right:wt(n.nextElementSibling)}),n=n.parentElement;return{element:wt(e),stack:t,ownerDocument:e.ownerDocument}},nh=function(e){var t,n,r,i,o;if(e)for(var s=e.stack,a=e.ownerDocument,d=new Map,h=0,p=s;h-1&&(m.filter(function(b){var x=b.guard,C=b.node;return x&&C.dataset.focusAutoGuard}).forEach(function(b){var x=b.node;return x.removeAttribute("tabIndex")}),Wi(w,m.length,1,m),Wi(w,-1,-1,m))}}}return e},xa=function(e){En()&&e&&(e.stopPropagation(),e.preventDefault())},li=function(){return Jr(En)},yh=function(e){var t=e.target,n=e.currentTarget;n.contains(t)||ph(n,t)},wh=function(){return null},Ca=function(){si=!0},_a=function(){si=!1,Dt="just",Jr(function(){Dt="meanwhile"})},xh=function(){document.addEventListener("focusin",xa),document.addEventListener("focusout",li),window.addEventListener("focus",Ca),window.addEventListener("blur",_a)},Ch=function(){document.removeEventListener("focusin",xa),document.removeEventListener("focusout",li),window.removeEventListener("focus",Ca),window.removeEventListener("blur",_a)};function _h(e){return e.filter(function(t){var n=t.disabled;return!n})}var Ea={moveFocusInside:ma,focusInside:pa,focusNextElement:ah,focusPrevElement:sh,focusFirstElement:lh,focusLastElement:ch,captureFocusRestore:ga};function Eh(e){var t=e.slice(-1)[0];t&&!at&&xh();var n=at,r=n&&t&&t.id===n.id;at=t,n&&!r&&(n.onDeactivation(),e.filter(function(i){var o=i.id;return o===n.id}).length||n.returnFocus(!t)),t?(fe=null,(!r||n.observed!==t.observed)&&t.onActivation(Ea),En(),Jr(En)):(Ch(),fe=null)}Yo.assignSyncMedium(yh);Jo.assignMedium(li);vd.assignMedium(function(e){return e(Ea)});const Nh=kd(_h,Eh)(wh);Qr(Ko,Nh);var Sh=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function kh(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Sh();return t&&e.setAttribute("nonce",t),e}function Th(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Oh(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Ah=function(){var e=0,t=null;return{add:function(n){e==0&&(t=kh())&&(Th(t,n),Oh(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},$h=function(){var e=Ah();return function(t,n){u.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ci=function(){var e=$h(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},jh={left:0,top:0,right:0,gap:0},lr=function(e){return parseInt(e||"",10)||0},Mh=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[lr(n),lr(r),lr(i)]},Ph=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return jh;var t=Mh(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Ih=ci(),lt="data-scroll-locked",Lh=function(e,t,n,r){var i=e.left,o=e.top,s=e.right,a=e.gap;return n===void 0&&(n="margin"),` + .`.concat(ld,` { + overflow: hidden `).concat(r,`; + padding-right: `).concat(a,"px ").concat(r,`; + } + body[`).concat(lt,`] { + overflow: hidden `).concat(r,`; + overscroll-behavior: contain; + `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` + padding-left: `.concat(i,`px; + padding-top: `).concat(o,`px; + padding-right: `).concat(s,`px; + margin-left:0; + margin-top:0; + margin-right: `).concat(a,"px ").concat(r,`; + `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),` + } + + .`).concat(mn,` { + right: `).concat(a,"px ").concat(r,`; + } + + .`).concat(gn,` { + margin-right: `).concat(a,"px ").concat(r,`; + } + + .`).concat(mn," .").concat(mn,` { + right: 0 `).concat(r,`; + } + + .`).concat(gn," .").concat(gn,` { + margin-right: 0 `).concat(r,`; + } + + body[`).concat(lt,`] { + `).concat(cd,": ").concat(a,`px; + } +`)},Gi=function(){var e=parseInt(document.body.getAttribute(lt)||"0",10);return isFinite(e)?e:0},Dh=function(){u.useEffect(function(){return document.body.setAttribute(lt,(Gi()+1).toString()),function(){var e=Gi()-1;e<=0?document.body.removeAttribute(lt):document.body.setAttribute(lt,e.toString())}},[])},Rh=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;Dh();var o=u.useMemo(function(){return Ph(i)},[i]);return u.createElement(Ih,{styles:Lh(o,!t,i,n?"":"!important")})},Cr=!1;if(typeof window<"u")try{var en=Object.defineProperty({},"passive",{get:function(){return Cr=!0,!0}});window.addEventListener("test",en,en),window.removeEventListener("test",en,en)}catch{Cr=!1}var Je=Cr?{passive:!1}:!1,qh=function(e){return e.tagName==="TEXTAREA"},Na=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!qh(e)&&n[t]==="visible")},Bh=function(e){return Na(e,"overflowY")},Fh=function(e){return Na(e,"overflowX")},Zi=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=Sa(e,r);if(i){var o=ka(e,r),s=o[1],a=o[2];if(s>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Hh=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Uh=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Sa=function(e,t){return e==="v"?Bh(t):Fh(t)},ka=function(e,t){return e==="v"?Hh(t):Uh(t)},Vh=function(e,t){return e==="h"&&t==="rtl"?-1:1},zh=function(e,t,n,r,i){var o=Vh(e,window.getComputedStyle(t).direction),s=o*r,a=n.target,d=t.contains(a),h=!1,p=s>0,f=0,l=0;do{var c=ka(e,a),v=c[0],m=c[1],w=c[2],b=m-w-o*v;(v||b)&&Sa(e,a)&&(f+=b,l+=v),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!d&&a!==document.body||d&&(t.contains(a)||t===a));return(p&&Math.abs(f)<1||!p&&Math.abs(l)<1)&&(h=!0),h},tn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Xi=function(e){return[e.deltaX,e.deltaY]},Qi=function(e){return e&&"current"in e?e.current:e},Wh=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Gh=function(e){return` + .block-interactivity-`.concat(e,` {pointer-events: none;} + .allow-interactivity-`).concat(e,` {pointer-events: all;} +`)},Zh=0,Ke=[];function Xh(e){var t=u.useRef([]),n=u.useRef([0,0]),r=u.useRef(),i=u.useState(Zh++)[0],o=u.useState(ci)[0],s=u.useRef(e);u.useEffect(function(){s.current=e},[e]),u.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var m=sd([e.lockRef.current],(e.shards||[]).map(Qi)).filter(Boolean);return m.forEach(function(w){return w.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),m.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var a=u.useCallback(function(m,w){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!s.current.allowPinchZoom;var b=tn(m),x=n.current,C="deltaX"in m?m.deltaX:x[0]-b[0],N="deltaY"in m?m.deltaY:x[1]-b[1],k,j=m.target,M=Math.abs(C)>Math.abs(N)?"h":"v";if("touches"in m&&M==="h"&&j.type==="range")return!1;var R=Zi(M,j);if(!R)return!0;if(R?k=M:(k=M==="v"?"h":"v",R=Zi(M,j)),!R)return!1;if(!r.current&&"changedTouches"in m&&(C||N)&&(r.current=k),!k)return!0;var L=r.current||k;return zh(L,w,m,L==="h"?C:N)},[]),d=u.useCallback(function(m){var w=m;if(!(!Ke.length||Ke[Ke.length-1]!==o)){var b="deltaY"in w?Xi(w):tn(w),x=t.current.filter(function(k){return k.name===w.type&&(k.target===w.target||w.target===k.shadowParent)&&Wh(k.delta,b)})[0];if(x&&x.should){w.cancelable&&w.preventDefault();return}if(!x){var C=(s.current.shards||[]).map(Qi).filter(Boolean).filter(function(k){return k.contains(w.target)}),N=C.length>0?a(w,C[0]):!s.current.noIsolation;N&&w.cancelable&&w.preventDefault()}}},[]),h=u.useCallback(function(m,w,b,x){var C={name:m,delta:w,target:b,should:x,shadowParent:Qh(b)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(N){return N!==C})},1)},[]),p=u.useCallback(function(m){n.current=tn(m),r.current=void 0},[]),f=u.useCallback(function(m){h(m.type,Xi(m),m.target,a(m,e.lockRef.current))},[]),l=u.useCallback(function(m){h(m.type,tn(m),m.target,a(m,e.lockRef.current))},[]);u.useEffect(function(){return Ke.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:l}),document.addEventListener("wheel",d,Je),document.addEventListener("touchmove",d,Je),document.addEventListener("touchstart",p,Je),function(){Ke=Ke.filter(function(m){return m!==o}),document.removeEventListener("wheel",d,Je),document.removeEventListener("touchmove",d,Je),document.removeEventListener("touchstart",p,Je)}},[]);var c=e.removeScrollBar,v=e.inert;return u.createElement(u.Fragment,null,v?u.createElement(o,{styles:Gh(i)}):null,c?u.createElement(Rh,{gapMode:e.gapMode}):null)}function Qh(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}Qr(Xo,Xh);var Yh=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},et=new WeakMap,nn=new WeakMap,rn={},cr=0,Ta=function(e){return e&&(e.host||Ta(e.parentNode))},Jh=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Ta(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Kh=function(e,t,n,r){var i=Jh(t,Array.isArray(e)?e:[e]);rn[n]||(rn[n]=new WeakMap);var o=rn[n],s=[],a=new Set,d=new Set(i),h=function(f){!f||a.has(f)||(a.add(f),h(f.parentNode))};i.forEach(h);var p=function(f){!f||d.has(f)||Array.prototype.forEach.call(f.children,function(l){if(a.has(l))p(l);else try{var c=l.getAttribute(r),v=c!==null&&c!=="false",m=(et.get(l)||0)+1,w=(o.get(l)||0)+1;et.set(l,m),o.set(l,w),s.push(l),m===1&&v&&nn.set(l,!0),w===1&&l.setAttribute(n,"true"),v||l.setAttribute(r,"true")}catch(b){console.error("aria-hidden: cannot operate on ",l,b)}})};return p(t),a.clear(),cr++,function(){s.forEach(function(f){var l=et.get(f)-1,c=o.get(f)-1;et.set(f,l),o.set(f,c),l||(nn.has(f)||f.removeAttribute(r),nn.delete(f)),c||f.removeAttribute(n)}),cr--,cr||(et=new WeakMap,et=new WeakMap,nn=new WeakMap,rn={})}},ep=function(e,t,n){var r=Array.from(Array.isArray(e)?e:[e]),i=t||Yh(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),Kh(r,i,n,"aria-hidden")):function(){return null}},tp=ci(),np=` + [`+na+`] { + pointer-events: none !important; + } +`,rp=function(){return u.createElement(tp,{styles:np})},Yi=function(e){return"current"in e?e.current:e};function ip(e){var t=e.setLockProps,n=e.onEscapeKey,r=e.onClickOutside,i=e.shards,o=e.onActivation,s=e.onDeactivation,a=e.noIsolation,d=u.useState(void 0),h=d[0],p=d[1],f=u.useRef(null),l=u.useRef(0);return u.useEffect(function(){var c=function(b){b.defaultPrevented||(b.code==="Escape"||b.key==="Escape"||b.keyCode===27)&&n&&n(b)},v=function(b){b.defaultPrevented||b.target===f.current||b instanceof MouseEvent&&b.button!==0||i&&i.map(Yi).some(function(x){return x&&x.contains(b.target)||x===b.target})||r&&r(b)},m=function(b){v(b),l.current=b.touches.length},w=function(b){l.current=b.touches.length};if(h)return document.addEventListener("keydown",c),document.addEventListener("mousedown",v),document.addEventListener("touchstart",m),document.addEventListener("touchend",w),function(){document.removeEventListener("keydown",c),document.removeEventListener("mousedown",v),document.removeEventListener("touchstart",m),document.removeEventListener("touchend",w)}},[h,r,n]),u.useEffect(function(){if(h)return o&&o(h),function(){s&&s()}},[!!h]),u.useEffect(function(){var c=function(){return null},v=!1,m=function(b){a||(c=ep(ad([b],(i||[]).map(Yi)),document.body,na)),p(function(){return b})},w=function(){c(),v||p(null)};return t({onMouseDown:function(b){f.current=b.target},onTouchStart:function(b){f.current=b.target},onActivation:m,onDeactivation:w}),function(){v=!0,t(!1)}},[]),u.createElement(rp,null)}const op=Qr(ta,ip);var ap=function(e){return u.createElement(op,he({},e))};u.forwardRef(function(e,t){return u.createElement(Cd,he({},e,{ref:t,sideCar:ap}))});const sp="_input-container_1b4m7_1",lp="_input-section_1b4m7_4",cp="_input_1b4m7_1",up="_disabled_1b4m7_17",dp="_errored_1b4m7_25",hp="_general_1b4m7_31",pp="_read-only_1b4m7_38",fp="_input-hint_1b4m7_53",mp="_input-error_1b4m7_58",xe={inputContainer:sp,inputSection:lp,input:cp,disabled:up,errored:dp,general:hp,readOnly:pp,inputHint:fp,inputError:mp};function ui(e){const{containerRef:t,inputSectionRef:n,actions:r,className:i,disabled:o,error:s,errorOnTooltip:a=!1,hint:d,icons:h,input:p,inputSectionClassName:f,label:l,labelClassName:c,readOnly:v,required:m,variant:w="form",withAsterisk:b,actionsContainerClassName:x,errorContainerClassName:C,hintContainerClassName:N,iconsContainerClassName:k,spacing:j}=e,M=b??m,{content:R,containerClassName:L}=zt({className:S(xe.inputSection,f),icons:h,iconsContainerClassName:k,actions:r,actionsContainerClassName:x,children:p,childrenContainerClassName:xe.input,spacing:j,withoutWrap:!0,variant:"xs"});return g.jsxs("div",{ref:t,className:S(xe.inputContainer,!!s&&xe.errored,v&&xe.readOnly,w==="form"&&xe.form,w==="general"&&xe.general,o&&xe.disabled,i),title:a&&s&&typeof s=="string"?s:void 0,children:[g.jsx(Uo,{className:c,disabled:o,required:M,children:l}),g.jsx("div",{ref:n,className:L,children:R}),d&&g.jsx("div",{className:S(xe.inputHint,N),children:d}),!a&&g.jsx(Gr,{disabled:o,className:S(xe.inputError,C),children:s})]})}const gp="_raw-input_8rtzt_1",vp={rawInput:gp};function Oa(e){const{className:t,onChange:n,elementRef:r,value:i,name:o,...s}=e,a=ce.useCallback(d=>{const h=d.currentTarget.value;n&&n(h===""?void 0:h,o,d)},[o,n]);return g.jsx("input",{...s,ref:r,className:S(vp.rawInput,t),name:V(o)?String(o):void 0,onChange:a,value:i??""})}const bp="_date-output_4jzjo_1",yp={dateOutput:bp};function wp(e){const{value:t,format:n,className:r,invalidText:i}=e,o=u.useMemo(()=>ru(t,n),[t,n]);return g.jsx("div",{className:S(yp.dateOutput,r),children:o??i})}function Aa(e,t,n,r){ce.useEffect(()=>{if(!e)return;const i=o=>{const{current:s}=n,{current:a}=r,d=o.target,h=o&&s?s===o.target||s.contains(d):!1,p=a?a===o.target||a.contains(d):!1;t(h,p,o)};return document.addEventListener("click",i),()=>{document.removeEventListener("click",i)}},[e,t,n,r])}const xp="_dropdown-menu_16hml_1",Cp="_icons_16hml_4",_p="_content_16hml_5",Ep="_actions_16hml_6",Np="_dropdown-icon_16hml_10",Sp="_dropdown-content_16hml_16",Fe={dropdownMenu:xp,icons:Cp,content:_p,actions:Ep,dropdownIcon:Np,dropdownContent:Sp};function kp(e){const t=u.useRef(null),{className:n,popupClassName:r,children:i,label:o,activeClassName:s,icons:a,variant:d="secondary",actions:h,withoutDropdownIcon:p,componentRef:f,elementRef:l=t,persistent:c,preferredPopupWidth:v}=e,m=u.useRef(null),[w,b]=u.useState(!1);u.useEffect(()=>{f&&(f.current={setShowDropdown:b})},[f,b]);const x=u.useCallback(()=>{b(j=>!j)},[b]),C=u.useCallback((j,M)=>{M||j&&c||b(!1)},[b,c]);Aa(w,C,m,l);const N=u.useMemo(()=>({setShowDropdown:b}),[b]),k=!!h||!p;return g.jsxs(Ks.Provider,{value:N,children:[g.jsx(it,{name:void 0,className:S(Fe.dropdownMenu,w&&s,n),elementRef:l,onClick:x,variant:d,actionsContainerClassName:Fe.actions,iconsContainerClassName:Fe.icons,childrenContainerClassName:Fe.content,actions:k?g.jsxs(g.Fragment,{children:[h,!p&&(w?g.jsx(Ro,{className:Fe.dropdownIcon}):g.jsx(Do,{className:Fe.dropdownIcon}))]}):void 0,icons:a,children:o}),w&&g.jsx(Pn,{elementRef:m,className:S(Fe.dropdownContent,r),parentRef:l,preferredWidth:v,children:i})]})}var Ji={},Tp={},Rt={},di={},qt={},hi={};Object.defineProperty(hi,"__esModule",{value:!0});hi.default=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(function(e){return e.charCodeAt(0)}));var pi={};Object.defineProperty(pi,"__esModule",{value:!0});pi.default=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(function(e){return e.charCodeAt(0)}));var _r={};(function(e){var t;Object.defineProperty(e,"__esModule",{value:!0}),e.replaceCodePoint=e.fromCodePoint=void 0;var n=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);e.fromCodePoint=(t=String.fromCodePoint)!==null&&t!==void 0?t:function(o){var s="";return o>65535&&(o-=65536,s+=String.fromCharCode(o>>>10&1023|55296),o=56320|o&1023),s+=String.fromCharCode(o),s};function r(o){var s;return o>=55296&&o<=57343||o>1114111?65533:(s=n.get(o))!==null&&s!==void 0?s:o}e.replaceCodePoint=r;function i(o){return(0,e.fromCodePoint)(r(o))}e.default=i})(_r);(function(e){var t=I&&I.__createBinding||(Object.create?function(y,_,E,T){T===void 0&&(T=E);var A=Object.getOwnPropertyDescriptor(_,E);(!A||("get"in A?!_.__esModule:A.writable||A.configurable))&&(A={enumerable:!0,get:function(){return _[E]}}),Object.defineProperty(y,T,A)}:function(y,_,E,T){T===void 0&&(T=E),y[T]=_[E]}),n=I&&I.__setModuleDefault||(Object.create?function(y,_){Object.defineProperty(y,"default",{enumerable:!0,value:_})}:function(y,_){y.default=_}),r=I&&I.__importStar||function(y){if(y&&y.__esModule)return y;var _={};if(y!=null)for(var E in y)E!=="default"&&Object.prototype.hasOwnProperty.call(y,E)&&t(_,y,E);return n(_,y),_},i=I&&I.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(e,"__esModule",{value:!0}),e.decodeXML=e.decodeHTMLStrict=e.decodeHTMLAttribute=e.decodeHTML=e.determineBranch=e.EntityDecoder=e.DecodingMode=e.BinTrieFlags=e.fromCodePoint=e.replaceCodePoint=e.decodeCodePoint=e.xmlDecodeTree=e.htmlDecodeTree=void 0;var o=i(hi);e.htmlDecodeTree=o.default;var s=i(pi);e.xmlDecodeTree=s.default;var a=r(_r);e.decodeCodePoint=a.default;var d=_r;Object.defineProperty(e,"replaceCodePoint",{enumerable:!0,get:function(){return d.replaceCodePoint}}),Object.defineProperty(e,"fromCodePoint",{enumerable:!0,get:function(){return d.fromCodePoint}});var h;(function(y){y[y.NUM=35]="NUM",y[y.SEMI=59]="SEMI",y[y.EQUALS=61]="EQUALS",y[y.ZERO=48]="ZERO",y[y.NINE=57]="NINE",y[y.LOWER_A=97]="LOWER_A",y[y.LOWER_F=102]="LOWER_F",y[y.LOWER_X=120]="LOWER_X",y[y.LOWER_Z=122]="LOWER_Z",y[y.UPPER_A=65]="UPPER_A",y[y.UPPER_F=70]="UPPER_F",y[y.UPPER_Z=90]="UPPER_Z"})(h||(h={}));var p=32,f;(function(y){y[y.VALUE_LENGTH=49152]="VALUE_LENGTH",y[y.BRANCH_LENGTH=16256]="BRANCH_LENGTH",y[y.JUMP_TABLE=127]="JUMP_TABLE"})(f=e.BinTrieFlags||(e.BinTrieFlags={}));function l(y){return y>=h.ZERO&&y<=h.NINE}function c(y){return y>=h.UPPER_A&&y<=h.UPPER_F||y>=h.LOWER_A&&y<=h.LOWER_F}function v(y){return y>=h.UPPER_A&&y<=h.UPPER_Z||y>=h.LOWER_A&&y<=h.LOWER_Z||l(y)}function m(y){return y===h.EQUALS||v(y)}var w;(function(y){y[y.EntityStart=0]="EntityStart",y[y.NumericStart=1]="NumericStart",y[y.NumericDecimal=2]="NumericDecimal",y[y.NumericHex=3]="NumericHex",y[y.NamedEntity=4]="NamedEntity"})(w||(w={}));var b;(function(y){y[y.Legacy=0]="Legacy",y[y.Strict=1]="Strict",y[y.Attribute=2]="Attribute"})(b=e.DecodingMode||(e.DecodingMode={}));var x=function(){function y(_,E,T){this.decodeTree=_,this.emitCodePoint=E,this.errors=T,this.state=w.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=b.Strict}return y.prototype.startEntity=function(_){this.decodeMode=_,this.state=w.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1},y.prototype.write=function(_,E){switch(this.state){case w.EntityStart:return _.charCodeAt(E)===h.NUM?(this.state=w.NumericStart,this.consumed+=1,this.stateNumericStart(_,E+1)):(this.state=w.NamedEntity,this.stateNamedEntity(_,E));case w.NumericStart:return this.stateNumericStart(_,E);case w.NumericDecimal:return this.stateNumericDecimal(_,E);case w.NumericHex:return this.stateNumericHex(_,E);case w.NamedEntity:return this.stateNamedEntity(_,E)}},y.prototype.stateNumericStart=function(_,E){return E>=_.length?-1:(_.charCodeAt(E)|p)===h.LOWER_X?(this.state=w.NumericHex,this.consumed+=1,this.stateNumericHex(_,E+1)):(this.state=w.NumericDecimal,this.stateNumericDecimal(_,E))},y.prototype.addToNumericResult=function(_,E,T,A){if(E!==T){var P=T-E;this.result=this.result*Math.pow(A,P)+parseInt(_.substr(E,P),A),this.consumed+=P}},y.prototype.stateNumericHex=function(_,E){for(var T=E;E<_.length;){var A=_.charCodeAt(E);if(l(A)||c(A))E+=1;else return this.addToNumericResult(_,T,E,16),this.emitNumericEntity(A,3)}return this.addToNumericResult(_,T,E,16),-1},y.prototype.stateNumericDecimal=function(_,E){for(var T=E;E<_.length;){var A=_.charCodeAt(E);if(l(A))E+=1;else return this.addToNumericResult(_,T,E,10),this.emitNumericEntity(A,2)}return this.addToNumericResult(_,T,E,10),-1},y.prototype.emitNumericEntity=function(_,E){var T;if(this.consumed<=E)return(T=this.errors)===null||T===void 0||T.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(_===h.SEMI)this.consumed+=1;else if(this.decodeMode===b.Strict)return 0;return this.emitCodePoint((0,a.replaceCodePoint)(this.result),this.consumed),this.errors&&(_!==h.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed},y.prototype.stateNamedEntity=function(_,E){for(var T=this.decodeTree,A=T[this.treeIndex],P=(A&f.VALUE_LENGTH)>>14;E<_.length;E++,this.excess++){var $=_.charCodeAt(E);if(this.treeIndex=N(T,A,this.treeIndex+Math.max(1,P),$),this.treeIndex<0)return this.result===0||this.decodeMode===b.Attribute&&(P===0||m($))?0:this.emitNotTerminatedNamedEntity();if(A=T[this.treeIndex],P=(A&f.VALUE_LENGTH)>>14,P!==0){if($===h.SEMI)return this.emitNamedEntityData(this.treeIndex,P,this.consumed+this.excess);this.decodeMode!==b.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1},y.prototype.emitNotTerminatedNamedEntity=function(){var _,E=this,T=E.result,A=E.decodeTree,P=(A[T]&f.VALUE_LENGTH)>>14;return this.emitNamedEntityData(T,P,this.consumed),(_=this.errors)===null||_===void 0||_.missingSemicolonAfterCharacterReference(),this.consumed},y.prototype.emitNamedEntityData=function(_,E,T){var A=this.decodeTree;return this.emitCodePoint(E===1?A[_]&~f.VALUE_LENGTH:A[_+1],T),E===3&&this.emitCodePoint(A[_+2],T),T},y.prototype.end=function(){var _;switch(this.state){case w.NamedEntity:return this.result!==0&&(this.decodeMode!==b.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case w.NumericDecimal:return this.emitNumericEntity(0,2);case w.NumericHex:return this.emitNumericEntity(0,3);case w.NumericStart:return(_=this.errors)===null||_===void 0||_.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case w.EntityStart:return 0}},y}();e.EntityDecoder=x;function C(y){var _="",E=new x(y,function(T){return _+=(0,a.fromCodePoint)(T)});return function(T,A){for(var P=0,$=0;($=T.indexOf("&",$))>=0;){_+=T.slice(P,$),E.startEntity(A);var Z=E.write(T,$+1);if(Z<0){P=$+E.end();break}P=$+Z,$=Z===0?P+1:P}var X=_+T.slice(P);return _="",X}}function N(y,_,E,T){var A=(_&f.BRANCH_LENGTH)>>7,P=_&f.JUMP_TABLE;if(A===0)return P!==0&&T===P?E:-1;if(P){var $=T-P;return $<0||$>=A?-1:y[E+$]-1}for(var Z=E,X=Z+A-1;Z<=X;){var J=Z+X>>>1,Y=y[J];if(YT)X=J-1;else return y[J+A]}return-1}e.determineBranch=N;var k=C(o.default),j=C(s.default);function M(y,_){return _===void 0&&(_=b.Legacy),k(y,_)}e.decodeHTML=M;function R(y){return k(y,b.Attribute)}e.decodeHTMLAttribute=R;function L(y){return k(y,b.Strict)}e.decodeHTMLStrict=L;function B(y){return j(y,b.Strict)}e.decodeXML=B})(qt);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.QuoteType=void 0;var t=qt,n;(function(l){l[l.Tab=9]="Tab",l[l.NewLine=10]="NewLine",l[l.FormFeed=12]="FormFeed",l[l.CarriageReturn=13]="CarriageReturn",l[l.Space=32]="Space",l[l.ExclamationMark=33]="ExclamationMark",l[l.Number=35]="Number",l[l.Amp=38]="Amp",l[l.SingleQuote=39]="SingleQuote",l[l.DoubleQuote=34]="DoubleQuote",l[l.Dash=45]="Dash",l[l.Slash=47]="Slash",l[l.Zero=48]="Zero",l[l.Nine=57]="Nine",l[l.Semi=59]="Semi",l[l.Lt=60]="Lt",l[l.Eq=61]="Eq",l[l.Gt=62]="Gt",l[l.Questionmark=63]="Questionmark",l[l.UpperA=65]="UpperA",l[l.LowerA=97]="LowerA",l[l.UpperF=70]="UpperF",l[l.LowerF=102]="LowerF",l[l.UpperZ=90]="UpperZ",l[l.LowerZ=122]="LowerZ",l[l.LowerX=120]="LowerX",l[l.OpeningSquareBracket=91]="OpeningSquareBracket"})(n||(n={}));var r;(function(l){l[l.Text=1]="Text",l[l.BeforeTagName=2]="BeforeTagName",l[l.InTagName=3]="InTagName",l[l.InSelfClosingTag=4]="InSelfClosingTag",l[l.BeforeClosingTagName=5]="BeforeClosingTagName",l[l.InClosingTagName=6]="InClosingTagName",l[l.AfterClosingTagName=7]="AfterClosingTagName",l[l.BeforeAttributeName=8]="BeforeAttributeName",l[l.InAttributeName=9]="InAttributeName",l[l.AfterAttributeName=10]="AfterAttributeName",l[l.BeforeAttributeValue=11]="BeforeAttributeValue",l[l.InAttributeValueDq=12]="InAttributeValueDq",l[l.InAttributeValueSq=13]="InAttributeValueSq",l[l.InAttributeValueNq=14]="InAttributeValueNq",l[l.BeforeDeclaration=15]="BeforeDeclaration",l[l.InDeclaration=16]="InDeclaration",l[l.InProcessingInstruction=17]="InProcessingInstruction",l[l.BeforeComment=18]="BeforeComment",l[l.CDATASequence=19]="CDATASequence",l[l.InSpecialComment=20]="InSpecialComment",l[l.InCommentLike=21]="InCommentLike",l[l.BeforeSpecialS=22]="BeforeSpecialS",l[l.SpecialStartSequence=23]="SpecialStartSequence",l[l.InSpecialTag=24]="InSpecialTag",l[l.BeforeEntity=25]="BeforeEntity",l[l.BeforeNumericEntity=26]="BeforeNumericEntity",l[l.InNamedEntity=27]="InNamedEntity",l[l.InNumericEntity=28]="InNumericEntity",l[l.InHexEntity=29]="InHexEntity"})(r||(r={}));function i(l){return l===n.Space||l===n.NewLine||l===n.Tab||l===n.FormFeed||l===n.CarriageReturn}function o(l){return l===n.Slash||l===n.Gt||i(l)}function s(l){return l>=n.Zero&&l<=n.Nine}function a(l){return l>=n.LowerA&&l<=n.LowerZ||l>=n.UpperA&&l<=n.UpperZ}function d(l){return l>=n.UpperA&&l<=n.UpperF||l>=n.LowerA&&l<=n.LowerF}var h;(function(l){l[l.NoValue=0]="NoValue",l[l.Unquoted=1]="Unquoted",l[l.Single=2]="Single",l[l.Double=3]="Double"})(h=e.QuoteType||(e.QuoteType={}));var p={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101])},f=function(){function l(c,v){var m=c.xmlMode,w=m===void 0?!1:m,b=c.decodeEntities,x=b===void 0?!0:b;this.cbs=v,this.state=r.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=r.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.trieIndex=0,this.trieCurrent=0,this.entityResult=0,this.entityExcess=0,this.xmlMode=w,this.decodeEntities=x,this.entityTrie=w?t.xmlDecodeTree:t.htmlDecodeTree}return l.prototype.reset=function(){this.state=r.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=r.Text,this.currentSequence=void 0,this.running=!0,this.offset=0},l.prototype.write=function(c){this.offset+=this.buffer.length,this.buffer=c,this.parse()},l.prototype.end=function(){this.running&&this.finish()},l.prototype.pause=function(){this.running=!1},l.prototype.resume=function(){this.running=!0,this.indexthis.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=r.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&c===n.Amp&&(this.state=r.BeforeEntity)},l.prototype.stateSpecialStartSequence=function(c){var v=this.sequenceIndex===this.currentSequence.length,m=v?o(c):(c|32)===this.currentSequence[this.sequenceIndex];if(!m)this.isSpecial=!1;else if(!v){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=r.InTagName,this.stateInTagName(c)},l.prototype.stateInSpecialTag=function(c){if(this.sequenceIndex===this.currentSequence.length){if(c===n.Gt||i(c)){var v=this.index-this.currentSequence.length;if(this.sectionStart>14)-1;if(!this.allowLegacyEntity()&&c!==n.Semi)this.trieIndex+=m;else{var w=this.index-this.entityExcess+1;w>this.sectionStart&&this.emitPartial(this.sectionStart,w),this.entityResult=this.trieIndex,this.trieIndex+=m,this.entityExcess=0,this.sectionStart=this.index+1,m===0&&this.emitNamedEntity()}}},l.prototype.emitNamedEntity=function(){if(this.state=this.baseState,this.entityResult!==0){var c=(this.entityTrie[this.entityResult]&t.BinTrieFlags.VALUE_LENGTH)>>14;switch(c){case 1:{this.emitCodePoint(this.entityTrie[this.entityResult]&~t.BinTrieFlags.VALUE_LENGTH);break}case 2:{this.emitCodePoint(this.entityTrie[this.entityResult+1]);break}case 3:this.emitCodePoint(this.entityTrie[this.entityResult+1]),this.emitCodePoint(this.entityTrie[this.entityResult+2])}}},l.prototype.stateBeforeNumericEntity=function(c){(c|32)===n.LowerX?(this.entityExcess++,this.state=r.InHexEntity):(this.state=r.InNumericEntity,this.stateInNumericEntity(c))},l.prototype.emitNumericEntity=function(c){var v=this.index-this.entityExcess-1,m=v+2+ +(this.state===r.InHexEntity);m!==this.index&&(v>this.sectionStart&&this.emitPartial(this.sectionStart,v),this.sectionStart=this.index+Number(c),this.emitCodePoint((0,t.replaceCodePoint)(this.entityResult))),this.state=this.baseState},l.prototype.stateInNumericEntity=function(c){c===n.Semi?this.emitNumericEntity(!0):s(c)?(this.entityResult=this.entityResult*10+(c-n.Zero),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},l.prototype.stateInHexEntity=function(c){c===n.Semi?this.emitNumericEntity(!0):s(c)?(this.entityResult=this.entityResult*16+(c-n.Zero),this.entityExcess++):d(c)?(this.entityResult=this.entityResult*16+((c|32)-n.LowerA+10),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},l.prototype.allowLegacyEntity=function(){return!this.xmlMode&&(this.baseState===r.Text||this.baseState===r.InSpecialTag)},l.prototype.cleanup=function(){this.running&&this.sectionStart!==this.index&&(this.state===r.Text||this.state===r.InSpecialTag&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===r.InAttributeValueDq||this.state===r.InAttributeValueSq||this.state===r.InAttributeValueNq)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))},l.prototype.shouldContinue=function(){return this.index0&&s.has(this.stack[this.stack.length-1]);){var a=this.stack.pop();(r=(n=this.cbs).onclosetag)===null||r===void 0||r.call(n,a,!0)}this.isVoidElement(t)||(this.stack.push(t),ro.has(t)?this.foreignContext.push(!0):io.has(t)&&this.foreignContext.push(!1)),(o=(i=this.cbs).onopentagname)===null||o===void 0||o.call(i,t),this.cbs.onopentag&&(this.attribs={})},e.prototype.endOpenTag=function(t){var n,r;this.startIndex=this.openTagStart,this.attribs&&((r=(n=this.cbs).onopentag)===null||r===void 0||r.call(n,this.tagname,this.attribs,t),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""},e.prototype.onopentagend=function(t){this.endIndex=t,this.endOpenTag(!1),this.startIndex=t+1},e.prototype.onclosetag=function(t,n){var r,i,o,s,a,d;this.endIndex=n;var h=this.getSlice(t,n);if(this.lowerCaseTagNames&&(h=h.toLowerCase()),(ro.has(h)||io.has(h))&&this.foreignContext.pop(),this.isVoidElement(h))!this.options.xmlMode&&h==="br"&&((i=(r=this.cbs).onopentagname)===null||i===void 0||i.call(r,"br"),(s=(o=this.cbs).onopentag)===null||s===void 0||s.call(o,"br",{},!0),(d=(a=this.cbs).onclosetag)===null||d===void 0||d.call(a,"br",!1));else{var p=this.stack.lastIndexOf(h);if(p!==-1)if(this.cbs.onclosetag)for(var f=this.stack.length-p;f--;)this.cbs.onclosetag(this.stack.pop(),f!==0);else this.stack.length=p;else!this.options.xmlMode&&h==="p"&&(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=n+1},e.prototype.onselfclosingtag=function(t){this.endIndex=t,this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1]?(this.closeCurrentTag(!1),this.startIndex=t+1):this.onopentagend(t)},e.prototype.closeCurrentTag=function(t){var n,r,i=this.tagname;this.endOpenTag(t),this.stack[this.stack.length-1]===i&&((r=(n=this.cbs).onclosetag)===null||r===void 0||r.call(n,i,!t),this.stack.pop())},e.prototype.onattribname=function(t,n){this.startIndex=t;var r=this.getSlice(t,n);this.attribname=this.lowerCaseAttributeNames?r.toLowerCase():r},e.prototype.onattribdata=function(t,n){this.attribvalue+=this.getSlice(t,n)},e.prototype.onattribentity=function(t){this.attribvalue+=(0,Ki.fromCodePoint)(t)},e.prototype.onattribend=function(t,n){var r,i;this.endIndex=n,(i=(r=this.cbs).onattribute)===null||i===void 0||i.call(r,this.attribname,this.attribvalue,t===on.QuoteType.Double?'"':t===on.QuoteType.Single?"'":t===on.QuoteType.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""},e.prototype.getInstructionName=function(t){var n=t.search(Pp),r=n<0?t:t.substr(0,n);return this.lowerCaseTagNames&&(r=r.toLowerCase()),r},e.prototype.ondeclaration=function(t,n){this.endIndex=n;var r=this.getSlice(t,n);if(this.cbs.onprocessinginstruction){var i=this.getInstructionName(r);this.cbs.onprocessinginstruction("!".concat(i),"!".concat(r))}this.startIndex=n+1},e.prototype.onprocessinginstruction=function(t,n){this.endIndex=n;var r=this.getSlice(t,n);if(this.cbs.onprocessinginstruction){var i=this.getInstructionName(r);this.cbs.onprocessinginstruction("?".concat(i),"?".concat(r))}this.startIndex=n+1},e.prototype.oncomment=function(t,n,r){var i,o,s,a;this.endIndex=n,(o=(i=this.cbs).oncomment)===null||o===void 0||o.call(i,this.getSlice(t,n-r)),(a=(s=this.cbs).oncommentend)===null||a===void 0||a.call(s),this.startIndex=n+1},e.prototype.oncdata=function(t,n,r){var i,o,s,a,d,h,p,f,l,c;this.endIndex=n;var v=this.getSlice(t,n-r);this.options.xmlMode||this.options.recognizeCDATA?((o=(i=this.cbs).oncdatastart)===null||o===void 0||o.call(i),(a=(s=this.cbs).ontext)===null||a===void 0||a.call(s,v),(h=(d=this.cbs).oncdataend)===null||h===void 0||h.call(d)):((f=(p=this.cbs).oncomment)===null||f===void 0||f.call(p,"[CDATA[".concat(v,"]]")),(c=(l=this.cbs).oncommentend)===null||c===void 0||c.call(l)),this.startIndex=n+1},e.prototype.onend=function(){var t,n;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(var r=this.stack.length;r>0;this.cbs.onclosetag(this.stack[--r],!0));}(n=(t=this.cbs).onend)===null||n===void 0||n.call(t)},e.prototype.reset=function(){var t,n,r,i;(n=(t=this.cbs).onreset)===null||n===void 0||n.call(t),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,(i=(r=this.cbs).onparserinit)===null||i===void 0||i.call(r,this),this.buffers.length=0,this.bufferOffset=0,this.writeIndex=0,this.ended=!1},e.prototype.parseComplete=function(t){this.reset(),this.end(t)},e.prototype.getSlice=function(t,n){for(;t-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();for(var r=this.buffers[0].slice(t-this.bufferOffset,n-this.bufferOffset);n-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),r+=this.buffers[0].slice(0,n-this.bufferOffset);return r},e.prototype.shiftBuffer=function(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()},e.prototype.write=function(t){var n,r;if(this.ended){(r=(n=this.cbs).onerror)===null||r===void 0||r.call(n,new Error(".write() after done!"));return}this.buffers.push(t),this.tokenizer.running&&(this.tokenizer.write(t),this.writeIndex++)},e.prototype.end=function(t){var n,r;if(this.ended){(r=(n=this.cbs).onerror)===null||r===void 0||r.call(n,new Error(".end() after done!"));return}t&&this.write(t),this.ended=!0,this.tokenizer.end()},e.prototype.pause=function(){this.tokenizer.pause()},e.prototype.resume=function(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(n){this.children=n},enumerable:!1,configurable:!0}),t}(fi);F.NodeWithChildren=Ln;var Pa=function(e){De(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=pe.ElementType.CDATA,n}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(Ln);F.CDATA=Pa;var Ia=function(e){De(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=pe.ElementType.Root,n}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(Ln);F.Document=Ia;var La=function(e){De(t,e);function t(n,r,i,o){i===void 0&&(i=[]),o===void 0&&(o=n==="script"?pe.ElementType.Script:n==="style"?pe.ElementType.Style:pe.ElementType.Tag);var s=e.call(this,i)||this;return s.name=n,s.attribs=r,s.type=o,s}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(n){this.name=n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var n=this;return Object.keys(this.attribs).map(function(r){var i,o;return{name:r,value:n.attribs[r],namespace:(i=n["x-attribsNamespace"])===null||i===void 0?void 0:i[r],prefix:(o=n["x-attribsPrefix"])===null||o===void 0?void 0:o[r]}})},enumerable:!1,configurable:!0}),t}(Ln);F.Element=La;function Da(e){return(0,pe.isTag)(e)}F.isTag=Da;function Ra(e){return e.type===pe.ElementType.CDATA}F.isCDATA=Ra;function qa(e){return e.type===pe.ElementType.Text}F.isText=qa;function Ba(e){return e.type===pe.ElementType.Comment}F.isComment=Ba;function Fa(e){return e.type===pe.ElementType.Directive}F.isDirective=Fa;function Ha(e){return e.type===pe.ElementType.Root}F.isDocument=Ha;function Lp(e){return Object.prototype.hasOwnProperty.call(e,"children")}F.hasChildren=Lp;function mi(e,t){t===void 0&&(t=!1);var n;if(qa(e))n=new $a(e.data);else if(Ba(e))n=new ja(e.data);else if(Da(e)){var r=t?ur(e.children):[],i=new La(e.name,jt({},e.attribs),r);r.forEach(function(d){return d.parent=i}),e.namespace!=null&&(i.namespace=e.namespace),e["x-attribsNamespace"]&&(i["x-attribsNamespace"]=jt({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(i["x-attribsPrefix"]=jt({},e["x-attribsPrefix"])),n=i}else if(Ra(e)){var r=t?ur(e.children):[],o=new Pa(r);r.forEach(function(h){return h.parent=o}),n=o}else if(Ha(e)){var r=t?ur(e.children):[],s=new Ia(r);r.forEach(function(h){return h.parent=s}),e["x-mode"]&&(s["x-mode"]=e["x-mode"]),n=s}else if(Fa(e)){var a=new Ma(e.name,e.data);e["x-name"]!=null&&(a["x-name"]=e["x-name"],a["x-publicId"]=e["x-publicId"],a["x-systemId"]=e["x-systemId"]),n=a}else throw new Error("Not implemented yet: ".concat(e.type));return n.startIndex=e.startIndex,n.endIndex=e.endIndex,e.sourceCodeLocation!=null&&(n.sourceCodeLocation=e.sourceCodeLocation),n}F.cloneNode=mi;function ur(e){for(var t=e.map(function(r){return mi(r,!0)}),n=1;n$\x80-\uFFFF]/g;var t=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]);e.getCodePoint=String.prototype.codePointAt!=null?function(i,o){return i.codePointAt(o)}:function(i,o){return(i.charCodeAt(o)&64512)===55296?(i.charCodeAt(o)-55296)*1024+i.charCodeAt(o+1)-56320+65536:i.charCodeAt(o)};function n(i){for(var o="",s=0,a;(a=e.xmlReplacer.exec(i))!==null;){var d=a.index,h=i.charCodeAt(d),p=t.get(h);p!==void 0?(o+=i.substring(s,d)+p,s=d+1):(o+="".concat(i.substring(s,d),"&#x").concat((0,e.getCodePoint)(i,d).toString(16),";"),s=e.xmlReplacer.lastIndex+=+((h&64512)===55296))}return o+i.substr(s)}e.encodeXML=n,e.escape=n;function r(i,o){return function(s){for(var a,d=0,h="";a=i.exec(s);)d!==a.index&&(h+=s.substring(d,a.index)),h+=o.get(a[0].charCodeAt(0)),d=a.index+1;return h+s.substring(d)}}e.escapeUTF8=r(/[&<>'"]/g,t),e.escapeAttribute=r(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),e.escapeText=r(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]))})(Nn);var Dp=I&&I.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ze,"__esModule",{value:!0});Ze.encodeNonAsciiHTML=Ze.encodeHTML=void 0;var Rp=Dp(gi),Va=Nn,qp=/[\t\n!-,./:-@[-`\f{-}$\x80-\uFFFF]/g;function Bp(e){return za(qp,e)}Ze.encodeHTML=Bp;function Fp(e){return za(Va.xmlReplacer,e)}Ze.encodeNonAsciiHTML=Fp;function za(e,t){for(var n="",r=0,i;(i=e.exec(t))!==null;){var o=i.index;n+=t.substring(r,o);var s=t.charCodeAt(o),a=Rp.default.get(s);if(typeof a=="object"){if(o+10&&(r+=Dn(e.children,t)),(t.xmlMode||!oo.has(e.name))&&(r+=""))),r}function Jp(e){return"<".concat(e.data,">")}function Kp(e,t){var n,r=e.data||"";return((n=t.encodeEntities)!==null&&n!==void 0?n:t.decodeEntities)!==!1&&!(!t.xmlMode&&e.parent&&zp.has(e.parent.name))&&(r=t.xmlMode||t.encodeEntities!=="utf8"?(0,Sn.encodeXML)(r):(0,Sn.escapeText)(r)),r}function ef(e){return"")}function tf(e){return"")}var nf=I&&I.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(me,"__esModule",{value:!0});me.innerText=me.textContent=me.getText=me.getInnerHTML=me.getOuterHTML=void 0;var Ne=$e,rf=nf(Wt),of=ft;function Ga(e,t){return(0,rf.default)(e,t)}me.getOuterHTML=Ga;function af(e,t){return(0,Ne.hasChildren)(e)?e.children.map(function(n){return Ga(n,t)}).join(""):""}me.getInnerHTML=af;function bn(e){return Array.isArray(e)?e.map(bn).join(""):(0,Ne.isTag)(e)?e.name==="br"?` +`:bn(e.children):(0,Ne.isCDATA)(e)?bn(e.children):(0,Ne.isText)(e)?e.data:""}me.getText=bn;function Er(e){return Array.isArray(e)?e.map(Er).join(""):(0,Ne.hasChildren)(e)&&!(0,Ne.isComment)(e)?Er(e.children):(0,Ne.isText)(e)?e.data:""}me.textContent=Er;function Nr(e){return Array.isArray(e)?e.map(Nr).join(""):(0,Ne.hasChildren)(e)&&(e.type===of.ElementType.Tag||(0,Ne.isCDATA)(e))?Nr(e.children):(0,Ne.isText)(e)?e.data:""}me.innerText=Nr;var ne={};Object.defineProperty(ne,"__esModule",{value:!0});ne.prevElementSibling=ne.nextElementSibling=ne.getName=ne.hasAttrib=ne.getAttributeValue=ne.getSiblings=ne.getParent=ne.getChildren=void 0;var vi=$e;function Za(e){return(0,vi.hasChildren)(e)?e.children:[]}ne.getChildren=Za;function Xa(e){return e.parent||null}ne.getParent=Xa;function sf(e){var t,n,r=Xa(e);if(r!=null)return Za(r);for(var i=[e],o=e.prev,s=e.next;o!=null;)i.unshift(o),t=o,o=t.prev;for(;s!=null;)i.push(s),n=s,s=n.next;return i}ne.getSiblings=sf;function lf(e,t){var n;return(n=e.attribs)===null||n===void 0?void 0:n[t]}ne.getAttributeValue=lf;function cf(e,t){return e.attribs!=null&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&e.attribs[t]!=null}ne.hasAttrib=cf;function uf(e){return e.name}ne.getName=uf;function df(e){for(var t,n=e.next;n!==null&&!(0,vi.isTag)(n);)t=n,n=t.next;return n}ne.nextElementSibling=df;function hf(e){for(var t,n=e.prev;n!==null&&!(0,vi.isTag)(n);)t=n,n=t.prev;return n}ne.prevElementSibling=hf;var de={};Object.defineProperty(de,"__esModule",{value:!0});de.prepend=de.prependChild=de.append=de.appendChild=de.replaceElement=de.removeElement=void 0;function Gt(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){var t=e.parent.children,n=t.lastIndexOf(e);n>=0&&t.splice(n,1)}e.next=null,e.prev=null,e.parent=null}de.removeElement=Gt;function pf(e,t){var n=t.prev=e.prev;n&&(n.next=t);var r=t.next=e.next;r&&(r.prev=t);var i=t.parent=e.parent;if(i){var o=i.children;o[o.lastIndexOf(e)]=t,e.parent=null}}de.replaceElement=pf;function ff(e,t){if(Gt(t),t.next=null,t.parent=e,e.children.push(t)>1){var n=e.children[e.children.length-2];n.next=t,t.prev=n}else t.prev=null}de.appendChild=ff;function mf(e,t){Gt(t);var n=e.parent,r=e.next;if(t.next=r,t.prev=e,e.next=t,t.parent=n,r){if(r.prev=t,n){var i=n.children;i.splice(i.lastIndexOf(r),0,t)}}else n&&n.children.push(t)}de.append=mf;function gf(e,t){if(Gt(t),t.parent=e,t.prev=null,e.children.unshift(t)!==1){var n=e.children[1];n.prev=t,t.next=n}else t.next=null}de.prependChild=gf;function vf(e,t){Gt(t);var n=e.parent;if(n){var r=n.children;r.splice(r.indexOf(e),0,t)}e.prev&&(e.prev.next=t),t.parent=n,t.prev=e.prev,t.next=e,e.prev=t}de.prepend=vf;var le={};Object.defineProperty(le,"__esModule",{value:!0});le.findAll=le.existsOne=le.findOne=le.findOneChild=le.find=le.filter=void 0;var Rn=$e;function bf(e,t,n,r){return n===void 0&&(n=!0),r===void 0&&(r=1/0),Qa(e,Array.isArray(t)?t:[t],n,r)}le.filter=bf;function Qa(e,t,n,r){for(var i=[],o=[t],s=[0];;){if(s[0]>=o[0].length){if(s.length===1)return i;o.shift(),s.shift();continue}var a=o[0][s[0]++];if(e(a)&&(i.push(a),--r<=0))return i;n&&(0,Rn.hasChildren)(a)&&a.children.length>0&&(s.unshift(0),o.unshift(a.children))}}le.find=Qa;function yf(e,t){return t.find(e)}le.findOneChild=yf;function Ya(e,t,n){n===void 0&&(n=!0);for(var r=null,i=0;i0&&(r=Ya(e,o.children,!0));else continue}return r}le.findOne=Ya;function Ja(e,t){return t.some(function(n){return(0,Rn.isTag)(n)&&(e(n)||Ja(e,n.children))})}le.existsOne=Ja;function wf(e,t){for(var n=[],r=[t],i=[0];;){if(i[0]>=r[0].length){if(r.length===1)return n;r.shift(),i.shift();continue}var o=r[0][i[0]++];(0,Rn.isTag)(o)&&(e(o)&&n.push(o),o.children.length>0&&(i.unshift(0),r.unshift(o.children)))}}le.findAll=wf;var ge={};Object.defineProperty(ge,"__esModule",{value:!0});ge.getElementsByTagType=ge.getElementsByTagName=ge.getElementById=ge.getElements=ge.testElement=void 0;var Ve=$e,qn=le,kn={tag_name:function(e){return typeof e=="function"?function(t){return(0,Ve.isTag)(t)&&e(t.name)}:e==="*"?Ve.isTag:function(t){return(0,Ve.isTag)(t)&&t.name===e}},tag_type:function(e){return typeof e=="function"?function(t){return e(t.type)}:function(t){return t.type===e}},tag_contains:function(e){return typeof e=="function"?function(t){return(0,Ve.isText)(t)&&e(t.data)}:function(t){return(0,Ve.isText)(t)&&t.data===e}}};function Ka(e,t){return typeof t=="function"?function(n){return(0,Ve.isTag)(n)&&t(n.attribs[e])}:function(n){return(0,Ve.isTag)(n)&&n.attribs[e]===t}}function xf(e,t){return function(n){return e(n)||t(n)}}function es(e){var t=Object.keys(e).map(function(n){var r=e[n];return Object.prototype.hasOwnProperty.call(kn,n)?kn[n](r):Ka(n,r)});return t.length===0?null:t.reduce(xf)}function Cf(e,t){var n=es(e);return n?n(t):!0}ge.testElement=Cf;function _f(e,t,n,r){r===void 0&&(r=1/0);var i=es(e);return i?(0,qn.filter)(i,t,n,r):[]}ge.getElements=_f;function Ef(e,t,n){return n===void 0&&(n=!0),Array.isArray(t)||(t=[t]),(0,qn.findOne)(Ka("id",e),t,n)}ge.getElementById=Ef;function Nf(e,t,n,r){return n===void 0&&(n=!0),r===void 0&&(r=1/0),(0,qn.filter)(kn.tag_name(e),t,n,r)}ge.getElementsByTagName=Nf;function Sf(e,t,n,r){return n===void 0&&(n=!0),r===void 0&&(r=1/0),(0,qn.filter)(kn.tag_type(e),t,n,r)}ge.getElementsByTagType=Sf;var ts={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.uniqueSort=e.compareDocumentPosition=e.DocumentPosition=e.removeSubsets=void 0;var t=$e;function n(s){for(var a=s.length;--a>=0;){var d=s[a];if(a>0&&s.lastIndexOf(d,a-1)>=0){s.splice(a,1);continue}for(var h=d.parent;h;h=h.parent)if(s.includes(h)){s.splice(a,1);break}}return s}e.removeSubsets=n;var r;(function(s){s[s.DISCONNECTED=1]="DISCONNECTED",s[s.PRECEDING=2]="PRECEDING",s[s.FOLLOWING=4]="FOLLOWING",s[s.CONTAINS=8]="CONTAINS",s[s.CONTAINED_BY=16]="CONTAINED_BY"})(r=e.DocumentPosition||(e.DocumentPosition={}));function i(s,a){var d=[],h=[];if(s===a)return 0;for(var p=(0,t.hasChildren)(s)?s:s.parent;p;)d.unshift(p),p=p.parent;for(p=(0,t.hasChildren)(a)?a:a.parent;p;)h.unshift(p),p=p.parent;for(var f=Math.min(d.length,h.length),l=0;lv.indexOf(w)?c===a?r.FOLLOWING|r.CONTAINED_BY:r.FOLLOWING:c===s?r.PRECEDING|r.CONTAINS:r.PRECEDING}e.compareDocumentPosition=i;function o(s){return s=s.filter(function(a,d,h){return!h.includes(a,d+1)}),s.sort(function(a,d){var h=i(a,d);return h&r.PRECEDING?-1:h&r.FOLLOWING?1:0}),s}e.uniqueSort=o})(ts);var Bn={};Object.defineProperty(Bn,"__esModule",{value:!0});Bn.getFeed=void 0;var kf=me,Zt=ge;function Tf(e){var t=Tn(Mf,e);return t?t.name==="feed"?Of(t):Af(t):null}Bn.getFeed=Tf;function Of(e){var t,n=e.children,r={type:"atom",items:(0,Zt.getElementsByTagName)("entry",n).map(function(s){var a,d=s.children,h={media:ns(d)};ue(h,"id","id",d),ue(h,"title","title",d);var p=(a=Tn("link",d))===null||a===void 0?void 0:a.attribs.href;p&&(h.link=p);var f=Le("summary",d)||Le("content",d);f&&(h.description=f);var l=Le("updated",d);return l&&(h.pubDate=new Date(l)),h})};ue(r,"id","id",n),ue(r,"title","title",n);var i=(t=Tn("link",n))===null||t===void 0?void 0:t.attribs.href;i&&(r.link=i),ue(r,"description","subtitle",n);var o=Le("updated",n);return o&&(r.updated=new Date(o)),ue(r,"author","email",n,!0),r}function Af(e){var t,n,r=(n=(t=Tn("channel",e.children))===null||t===void 0?void 0:t.children)!==null&&n!==void 0?n:[],i={type:e.name.substr(0,3),id:"",items:(0,Zt.getElementsByTagName)("item",e.children).map(function(s){var a=s.children,d={media:ns(a)};ue(d,"id","guid",a),ue(d,"title","title",a),ue(d,"link","link",a),ue(d,"description","description",a);var h=Le("pubDate",a)||Le("dc:date",a);return h&&(d.pubDate=new Date(h)),d})};ue(i,"title","title",r),ue(i,"link","link",r),ue(i,"description","description",r);var o=Le("lastBuildDate",r);return o&&(i.updated=new Date(o)),ue(i,"author","managingEditor",r,!0),i}var $f=["url","type","lang"],jf=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function ns(e){return(0,Zt.getElementsByTagName)("media:content",e).map(function(t){for(var n=t.attribs,r={medium:n.medium,isDefault:!!n.isDefault},i=0,o=$f;i + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */function ao(e){return Object.prototype.toString.call(e)==="[object Object]"}function Pf(e){var t,n;return ao(e)===!1?!1:(t=e.constructor,t===void 0?!0:(n=t.prototype,!(ao(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)))}bi.isPlainObject=Pf;var If={exports:{}};(function(e){(function(t,n){e.exports?e.exports=n():t.parseSrcset=n()})(I,function(){return function(t){function n(N){return N===" "||N===" "||N===` +`||N==="\f"||N==="\r"}function r(N){var k,j=N.exec(t.substring(w));if(j)return k=j[0],w+=k.length,k}for(var i=t.length,o=/^[ \t\n\r\u000c]+/,s=/^[, \t\n\r\u000c]+/,a=/^[^ \t\n\r\u000c]+/,d=/[,]+$/,h=/^\d+$/,p=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,f,l,c,v,m,w=0,b=[];;){if(r(s),w>=i)return b;f=r(a),l=[],f.slice(-1)===","?(f=f.replace(d,""),C()):x()}function x(){for(r(o),c="",v="in descriptor";;){if(m=t.charAt(w),v==="in descriptor")if(n(m))c&&(l.push(c),c="",v="after descriptor");else if(m===","){w+=1,c&&l.push(c),C();return}else if(m==="(")c=c+m,v="in parens";else if(m===""){c&&l.push(c),C();return}else c=c+m;else if(v==="in parens")if(m===")")c=c+m,v="in descriptor";else if(m===""){l.push(c),C();return}else c=c+m;else if(v==="after descriptor"&&!n(m))if(m===""){C();return}else v="in descriptor",w-=1;w+=1}}function C(){var N=!1,k,j,M,R,L={},B,y,_,E,T;for(R=0;R",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(t){if(!this.source)return"";let n=this.source;t==null&&(t=so.isColorSupported);let r=p=>p,i=p=>p,o=p=>p;if(t){let{bold:p,gray:f,red:l}=so.createColors(!0);i=c=>p(l(c)),r=c=>f(c),lo&&(o=c=>lo(c))}let s=n.split(/\r?\n/),a=Math.max(this.line-3,0),d=Math.min(this.line+2,s.length),h=String(d).length;return s.slice(a,d).map((p,f)=>{let l=a+1+f,c=" "+(" "+l).slice(-h)+" | ";if(l===this.line){if(p.length>160){let m=20,w=Math.max(0,this.column-m),b=Math.max(this.column+m,this.endColumn+m),x=p.slice(w,b),C=r(c.replace(/\d/g," "))+p.slice(0,Math.min(this.column-1,m-1)).replace(/[^\t]/g," ");return i(">")+r(c)+o(x)+` + `+C+i("^")}let v=r(c.replace(/\d/g," "))+p.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+r(c)+o(p)+` + `+v+i("^")}return" "+r(c)+o(p)}).join(` +`)}toString(){let t=this.showSourceCode();return t&&(t=` + +`+t+` +`),this.name+": "+this.message+t}};var wi=Sr;Sr.default=Sr;const co={after:` +`,beforeClose:` +`,beforeComment:` +`,beforeDecl:` +`,beforeOpen:" ",beforeRule:` +`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function qf(e){return e[0].toUpperCase()+e.slice(1)}let kr=class{constructor(e){this.builder=e}atrule(e,t){let n="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?n+=e.raws.afterName:r&&(n+=" "),e.nodes)this.block(e,n+r);else{let i=(e.raws.between||"")+(t?";":"");this.builder(n+r+i,e)}}beforeAfter(e,t){let n;e.type==="decl"?n=this.raw(e,null,"beforeDecl"):e.type==="comment"?n=this.raw(e,null,"beforeComment"):t==="before"?n=this.raw(e,null,"beforeRule"):n=this.raw(e,null,"beforeClose");let r=e.parent,i=0;for(;r&&r.type!=="root";)i+=1,r=r.parent;if(n.includes(` +`)){let o=this.raw(e,null,"indent");if(o.length)for(let s=0;s0&&e.nodes[t].type==="comment";)t-=1;let n=this.raw(e,"semicolon");for(let r=0;r{if(r=a.raws[t],typeof r<"u")return!1})}return typeof r>"u"&&(r=co[n]),o.rawCache[n]=r,r}rawBeforeClose(e){let t;return e.walk(n=>{if(n.nodes&&n.nodes.length>0&&typeof n.raws.after<"u")return t=n.raws.after,t.includes(` +`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let n;return e.walkComments(r=>{if(typeof r.raws.before<"u")return n=r.raws.before,n.includes(` +`)&&(n=n.replace(/[^\n]+$/,"")),!1}),typeof n>"u"?n=this.raw(t,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeDecl(e,t){let n;return e.walkDecls(r=>{if(typeof r.raws.before<"u")return n=r.raws.before,n.includes(` +`)&&(n=n.replace(/[^\n]+$/,"")),!1}),typeof n>"u"?n=this.raw(t,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeOpen(e){let t;return e.walk(n=>{if(n.type!=="decl"&&(t=n.raws.between,typeof t<"u"))return!1}),t}rawBeforeRule(e){let t;return e.walk(n=>{if(n.nodes&&(n.parent!==e||e.first!==n)&&typeof n.raws.before<"u")return t=n.raws.before,t.includes(` +`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(n=>{if(typeof n.raws.between<"u")return t=n.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(n=>{if(n.nodes&&n.nodes.length===0&&(t=n.raws.after,typeof t<"u"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(n=>{let r=n.parent;if(r&&r!==e&&r.parent&&r.parent===e&&typeof n.raws.before<"u"){let i=n.raws.before.split(` +`);return t=i[i.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(n=>{if(n.nodes&&n.nodes.length&&n.last.type==="decl"&&(t=n.raws.semicolon,typeof t<"u"))return!1}),t}rawValue(e,t){let n=e[t],r=e.raws[t];return r&&r.value===n?r.raw:n}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var os=kr;kr.default=kr;let Bf=os;function Tr(e,t){new Bf(t).stringify(e)}var Fn=Tr;Tr.default=Tr;var Xt={};Xt.isClean=Symbol("isClean");Xt.my=Symbol("my");let Ff=wi,Hf=os,Uf=Fn,{isClean:xt,my:Vf}=Xt;function Or(e,t){let n=new e.constructor;for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r)||r==="proxyCache")continue;let i=e[r],o=typeof i;r==="parent"&&o==="object"?t&&(n[r]=t):r==="source"?n[r]=i:Array.isArray(i)?n[r]=i.map(s=>Or(s,n)):(o==="object"&&i!==null&&(i=Or(i)),n[r]=i)}return n}let Ar=class{constructor(e={}){this.raws={},this[xt]=!1,this[Vf]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let n of e[t])typeof n.clone=="function"?this.append(n.clone()):this.append(n)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=Or(this);for(let n in e)t[n]=e[n];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:n,start:r}=this.rangeBy(t);return this.source.input.error(e,{column:r.column,line:r.line},{column:n.column,line:n.line},t)}return new Ff(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,n){return e[t]===n||(e[t]=n,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markClean(){this[xt]=!0}markDirty(){if(this[xt]){this[xt]=!1;let e=this;for(;e=e.parent;)e[xt]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let n=this.source.start;if(e.index)n=this.positionInside(e.index,t);else if(e.word){t=this.toString();let r=t.indexOf(e.word);r!==-1&&(n=this.positionInside(r,t))}return n}positionInside(e,t){let n=t||this.toString(),r=this.source.start.column,i=this.source.start.line;for(let o=0;otypeof a=="object"&&a.toJSON?a.toJSON(null,t):a);else if(typeof s=="object"&&s.toJSON)n[o]=s.toJSON(null,t);else if(o==="source"){let a=t.get(s.input);a==null&&(a=i,t.set(s.input,i),i++),n[o]={end:s.end,inputId:a,start:s.start}}else n[o]=s}return r&&(n.inputs=[...t.keys()].map(o=>o.toJSON())),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Uf){e.stringify&&(e=e.stringify);let t="";return e(this,n=>{t+=n}),t}warn(e,t,n){let r={node:this};for(let i in n)r[i]=n[i];return e.warn(t,r)}get proxyOf(){return this}};var Hn=Ar;Ar.default=Ar;let zf=Hn,$r=class extends zf{constructor(e){super(e),this.type="comment"}};var Un=$r;$r.default=$r;let Wf=Hn,jr=class extends Wf{constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var Vn=jr;jr.default=jr;let as=Un,ss=Vn,Gf=Hn,{isClean:ls,my:cs}=Xt,xi,us,ds,Ci;function hs(e){return e.map(t=>(t.nodes&&(t.nodes=hs(t.nodes)),delete t.source,t))}function ps(e){if(e[ls]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)ps(t)}let je=class fs extends Gf{append(...t){for(let n of t){let r=this.normalize(n,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(t){if(super.cleanRaws(t),this.nodes)for(let n of this.nodes)n.cleanRaws(t)}each(t){if(!this.proxyOf.nodes)return;let n=this.getIterator(),r,i;for(;this.indexes[n]t[n](...r.map(i=>typeof i=="function"?(o,s)=>i(o.toProxy(),s):i)):n==="every"||n==="some"?r=>t[n]((i,...o)=>r(i.toProxy(),...o)):n==="root"?()=>t.root().toProxy():n==="nodes"?t.nodes.map(r=>r.toProxy()):n==="first"||n==="last"?t[n].toProxy():t[n]:t[n]},set(t,n,r){return t[n]===r||(t[n]=r,(n==="name"||n==="params"||n==="selector")&&t.markDirty()),!0}}}index(t){return typeof t=="number"?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,n){let r=this.index(t),i=this.normalize(n,this.proxyOf.nodes[r]).reverse();r=this.index(t);for(let s of i)this.proxyOf.nodes.splice(r+1,0,s);let o;for(let s in this.indexes)o=this.indexes[s],r"u")t=[];else if(Array.isArray(t)){t=t.slice(0);for(let r of t)r.parent&&r.parent.removeChild(r,"ignore")}else if(t.type==="root"&&this.type!=="document"){t=t.nodes.slice(0);for(let r of t)r.parent&&r.parent.removeChild(r,"ignore")}else if(t.type)t=[t];else if(t.prop){if(typeof t.value>"u")throw new Error("Value field is missed in node creation");typeof t.value!="string"&&(t.value=String(t.value)),t=[new ss(t)]}else if(t.selector||t.selectors)t=[new Ci(t)];else if(t.name)t=[new xi(t)];else if(t.text)t=[new as(t)];else throw new Error("Unknown node type in node creation");return t.map(r=>(r[cs]||fs.rebuild(r),r=r.proxyOf,r.parent&&r.parent.removeChild(r),r[ls]&&ps(r),r.raws||(r.raws={}),typeof r.raws.before>"u"&&n&&typeof n.raws.before<"u"&&(r.raws.before=n.raws.before.replace(/\S/g,"")),r.parent=this.proxyOf,r))}prepend(...t){t=t.reverse();for(let n of t){let r=this.normalize(n,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(t){return t.parent=this,this.proxyOf.nodes.push(t),this}removeAll(){for(let t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1);let n;for(let r in this.indexes)n=this.indexes[r],n>=t&&(this.indexes[r]=n-1);return this.markDirty(),this}replaceValues(t,n,r){return r||(r=n,n={}),this.walkDecls(i=>{n.props&&!n.props.includes(i.prop)||n.fast&&!i.value.includes(n.fast)||(i.value=i.value.replace(t,r))}),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){return this.each((n,r)=>{let i;try{i=t(n,r)}catch(o){throw n.addToError(o)}return i!==!1&&n.walk&&(i=n.walk(t)),i})}walkAtRules(t,n){return n?t instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&t.test(r.name))return n(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===t)return n(r,i)}):(n=t,this.walk((r,i)=>{if(r.type==="atrule")return n(r,i)}))}walkComments(t){return this.walk((n,r)=>{if(n.type==="comment")return t(n,r)})}walkDecls(t,n){return n?t instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&t.test(r.prop))return n(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===t)return n(r,i)}):(n=t,this.walk((r,i)=>{if(r.type==="decl")return n(r,i)}))}walkRules(t,n){return n?t instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&t.test(r.selector))return n(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===t)return n(r,i)}):(n=t,this.walk((r,i)=>{if(r.type==="rule")return n(r,i)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};je.registerParse=e=>{us=e};je.registerRule=e=>{Ci=e};je.registerAtRule=e=>{xi=e};je.registerRoot=e=>{ds=e};var Xe=je;je.default=je;je.rebuild=e=>{e.type==="atrule"?Object.setPrototypeOf(e,xi.prototype):e.type==="rule"?Object.setPrototypeOf(e,Ci.prototype):e.type==="decl"?Object.setPrototypeOf(e,ss.prototype):e.type==="comment"?Object.setPrototypeOf(e,as.prototype):e.type==="root"&&Object.setPrototypeOf(e,ds.prototype),e[cs]=!0,e.nodes&&e.nodes.forEach(t=>{je.rebuild(t)})};let ms=Xe,On=class extends ms{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var _i=On;On.default=On;ms.registerAtRule(On);let Zf=Xe,gs,vs,Bt=class extends Zf{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new gs(new vs,this,e).stringify()}};Bt.registerLazyResult=e=>{gs=e};Bt.registerProcessor=e=>{vs=e};var Ei=Bt;Bt.default=Bt;let Xf="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Qf=(e=21)=>{let t="",n=e;for(;n--;)t+=Xf[Math.random()*64|0];return t};var Yf={nanoid:Qf};let{existsSync:Jf,readFileSync:Kf}=be,{dirname:dr,join:em}=be,{SourceMapConsumer:uo,SourceMapGenerator:ho}=be;function tm(e){return Buffer?Buffer.from(e,"base64").toString():window.atob(e)}let Mr=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let n=t.map?t.map.prev:void 0,r=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=dr(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new uo(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,n=/^data:application\/json;base64,/,r=/^data:application\/json;charset=utf-?8,/,i=/^data:application\/json,/,o=e.match(r)||e.match(i);if(o)return decodeURIComponent(e.substr(o[0].length));let s=e.match(t)||e.match(n);if(s)return tm(e.substr(s[0].length));let a=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+a)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/g);if(!t)return;let n=e.lastIndexOf(t.pop()),r=e.indexOf("*/",n);n>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,r)))}loadFile(e){if(this.root=dr(e),Jf(e))return this.mapFile=e,Kf(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let n=t(e);if(n){let r=this.loadFile(n);if(!r)throw new Error("Unable to load previous source map: "+n.toString());return r}}else{if(t instanceof uo)return ho.fromSourceMap(t).toString();if(t instanceof ho)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let n=this.annotation;return e&&(n=em(dr(e),n)),this.loadFile(n)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var bs=Mr;Mr.default=Mr;let{nanoid:nm}=Yf,{isAbsolute:Pr,resolve:Ir}=be,{SourceMapConsumer:rm,SourceMapGenerator:im}=be,{fileURLToPath:po,pathToFileURL:sn}=be,fo=wi,om=bs,hr=be,pr=Symbol("fromOffsetCache"),am=!!(rm&&im),mo=!!(Ir&&Pr),An=class{constructor(e,t={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="￾"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!mo||/^\w+:\/\//.test(t.from)||Pr(t.from)?this.file=t.from:this.file=Ir(t.from)),mo&&am){let n=new om(this.css,t);if(n.text){this.map=n;let r=n.consumer().file;!this.file&&r&&(this.file=this.mapResolve(r))}}this.file||(this.id=""),this.map&&(this.map.file=this.from)}error(e,t,n,r={}){let i,o,s;if(t&&typeof t=="object"){let d=t,h=n;if(typeof d.offset=="number"){let p=this.fromOffset(d.offset);t=p.line,n=p.col}else t=d.line,n=d.column;if(typeof h.offset=="number"){let p=this.fromOffset(h.offset);o=p.line,i=p.col}else o=h.line,i=h.column}else if(!n){let d=this.fromOffset(t);t=d.line,n=d.col}let a=this.origin(t,n,o,i);return a?s=new fo(e,a.endLine===void 0?a.line:{column:a.column,line:a.line},a.endLine===void 0?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,r.plugin):s=new fo(e,o===void 0?t:{column:n,line:t},o===void 0?n:{column:i,line:o},this.css,this.file,r.plugin),s.input={column:n,endColumn:i,endLine:o,line:t,source:this.css},this.file&&(sn&&(s.input.url=sn(this.file).toString()),s.input.file=this.file),s}fromOffset(e){let t,n;if(this[pr])n=this[pr];else{let i=this.css.split(` +`);n=new Array(i.length);let o=0;for(let s=0,a=i.length;s=t)r=n.length-1;else{let i=n.length-2,o;for(;r>1),e=n[o+1])r=o+1;else{r=o;break}}return{col:e-n[r]+1,line:r+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Ir(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,n,r){if(!this.map)return!1;let i=this.map.consumer(),o=i.originalPositionFor({column:t,line:e});if(!o.source)return!1;let s;typeof n=="number"&&(s=i.originalPositionFor({column:r,line:n}));let a;Pr(o.source)?a=sn(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||sn(this.map.mapFile));let d={column:o.column,endColumn:s&&s.column,endLine:s&&s.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(po)d.file=po(a);else throw new Error("file: protocol is not available in this PostCSS build");let h=i.sourceContentFor(o.source);return h&&(d.source=h),d}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var zn=An;An.default=An;hr&&hr.registerInput&&hr.registerInput(An);let ys=Xe,ws,xs,dt=class extends ys{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,n,r){let i=super.normalize(t);if(n){if(r==="prepend")this.nodes.length>1?n.raws.before=this.nodes[1].raws.before:delete n.raws.before;else if(this.first!==n)for(let o of i)o.raws.before=n.raws.before}return i}removeChild(t,n){let r=this.index(t);return!n&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(t)}toResult(t={}){return new ws(new xs,this,t).stringify()}};dt.registerLazyResult=e=>{ws=e};dt.registerProcessor=e=>{xs=e};var Qt=dt;dt.default=dt;ys.registerRoot(dt);let Ft={comma(e){return Ft.split(e,[","],!0)},space(e){let t=[" ",` +`," "];return Ft.split(e,t)},split(e,t,n){let r=[],i="",o=!1,s=0,a=!1,d="",h=!1;for(let p of e)h?h=!1:p==="\\"?h=!0:a?p===d&&(a=!1):p==='"'||p==="'"?(a=!0,d=p):p==="("?s+=1:p===")"?s>0&&(s-=1):s===0&&t.includes(p)&&(o=!0),o?(i!==""&&r.push(i.trim()),i="",o=!1):i+=p;return(n||i!=="")&&r.push(i.trim()),r}};var Cs=Ft;Ft.default=Ft;let _s=Xe,sm=Cs,$n=class extends _s{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return sm.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n)}};var Ni=$n;$n.default=$n;_s.registerRule($n);let lm=_i,cm=Un,um=Vn,dm=zn,hm=bs,pm=Qt,fm=Ni;function Ht(e,t){if(Array.isArray(e))return e.map(i=>Ht(i));let{inputs:n,...r}=e;if(n){t=[];for(let i of n){let o={...i,__proto__:dm.prototype};o.map&&(o.map={...o.map,__proto__:hm.prototype}),t.push(o)}}if(r.nodes&&(r.nodes=e.nodes.map(i=>Ht(i,t))),r.source){let{inputId:i,...o}=r.source;r.source=o,i!=null&&(r.source.input=t[i])}if(r.type==="root")return new pm(r);if(r.type==="decl")return new um(r);if(r.type==="rule")return new fm(r);if(r.type==="comment")return new cm(r);if(r.type==="atrule")return new lm(r);throw new Error("Unknown node type: "+e.type)}var mm=Ht;Ht.default=Ht;let{dirname:yn,relative:Es,resolve:Ns,sep:Ss}=be,{SourceMapConsumer:ks,SourceMapGenerator:wn}=be,{pathToFileURL:go}=be,gm=zn,vm=!!(ks&&wn),bm=!!(yn&&Ns&&Es&&Ss),ym=class{constructor(e,t,n,r){this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=` +`;this.css.includes(`\r +`)&&(t=`\r +`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),n=e.root||yn(e.file),r;this.mapOpts.sourcesContent===!1?(r=new ks(e.text),r.sourcesContent&&(r.sourcesContent=null)):r=e.consumer(),this.map.applySourceMap(r,t,this.toUrl(this.path(n)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),bm&&vm&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=wn.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new wn({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):""});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new wn({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,n="",r={generated:{column:0,line:0},original:{column:0,line:0},source:""},i,o;this.stringify(this.root,(s,a,d)=>{if(this.css+=s,a&&d!=="end"&&(r.generated.line=e,r.generated.column=t-1,a.source&&a.source.start?(r.source=this.sourcePath(a),r.original.line=a.source.start.line,r.original.column=a.source.start.column-1,this.map.addMapping(r)):(r.source=n,r.original.line=1,r.original.column=0,this.map.addMapping(r))),o=s.match(/\n/g),o?(e+=o.length,i=s.lastIndexOf(` +`),t=s.length-i):t+=s.length,a&&d!=="start"){let h=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==h.last||h.raws.semicolon)&&(a.source&&a.source.end?(r.source=this.sourcePath(a),r.original.line=a.source.end.line,r.original.column=a.source.end.column-1,r.generated.line=e,r.generated.column=t-2,this.map.addMapping(r)):(r.source=n,r.original.line=1,r.original.column=0,r.generated.line=e,r.generated.column=t-1,this.map.addMapping(r)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let n=this.opts.to?yn(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(n=yn(Ns(n,this.mapOpts.annotation)));let r=Es(n,e);return this.memoizedPaths.set(e,r),r}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new gm(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let n=t.source.input.from;if(n&&!e[n]){e[n]=!0;let r=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(r,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(go){let n=go(e).toString();return this.memoizedFileURLs.set(e,n),n}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;Ss==="\\"&&(e=e.replace(/\\/g,"/"));let n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}};var Ts=ym;const fr=39,vo=34,ln=92,bo=47,cn=10,Ct=32,un=12,dn=9,hn=13,wm=91,xm=93,Cm=40,_m=41,Em=123,Nm=125,Sm=59,km=42,Tm=58,Om=64,pn=/[\t\n\f\r "#'()/;[\\\]{}]/g,fn=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Am=/.[\r\n"'(/\\]/,yo=/[\da-f]/i;var $m=function(e,t={}){let n=e.css.valueOf(),r=t.ignoreErrors,i,o,s,a,d,h,p,f,l,c,v=n.length,m=0,w=[],b=[];function x(){return m}function C(M){throw e.error("Unclosed "+M,m)}function N(){return b.length===0&&m>=v}function k(M){if(b.length)return b.pop();if(m>=v)return;let R=M?M.ignoreUnclosed:!1;switch(i=n.charCodeAt(m),i){case cn:case Ct:case dn:case hn:case un:{a=m;do a+=1,i=n.charCodeAt(a);while(i===Ct||i===cn||i===dn||i===hn||i===un);h=["space",n.slice(m,a)],m=a-1;break}case wm:case xm:case Em:case Nm:case Tm:case Sm:case _m:{let L=String.fromCharCode(i);h=[L,L,m];break}case Cm:{if(c=w.length?w.pop()[1]:"",l=n.charCodeAt(m+1),c==="url"&&l!==fr&&l!==vo&&l!==Ct&&l!==cn&&l!==dn&&l!==un&&l!==hn){a=m;do{if(p=!1,a=n.indexOf(")",a+1),a===-1)if(r||R){a=m;break}else C("bracket");for(f=a;n.charCodeAt(f-1)===ln;)f-=1,p=!p}while(p);h=["brackets",n.slice(m,a+1),m,a],m=a}else a=n.indexOf(")",m+1),o=n.slice(m,a+1),a===-1||Am.test(o)?h=["(","(",m]:(h=["brackets",o,m,a],m=a);break}case fr:case vo:{d=i===fr?"'":'"',a=m;do{if(p=!1,a=n.indexOf(d,a+1),a===-1)if(r||R){a=m+1;break}else C("string");for(f=a;n.charCodeAt(f-1)===ln;)f-=1,p=!p}while(p);h=["string",n.slice(m,a+1),m,a],m=a;break}case Om:{pn.lastIndex=m+1,pn.test(n),pn.lastIndex===0?a=n.length-1:a=pn.lastIndex-2,h=["at-word",n.slice(m,a+1),m,a],m=a;break}case ln:{for(a=m,s=!0;n.charCodeAt(a+1)===ln;)a+=1,s=!s;if(i=n.charCodeAt(a+1),s&&i!==bo&&i!==Ct&&i!==cn&&i!==dn&&i!==hn&&i!==un&&(a+=1,yo.test(n.charAt(a)))){for(;yo.test(n.charAt(a+1));)a+=1;n.charCodeAt(a+1)===Ct&&(a+=1)}h=["word",n.slice(m,a+1),m,a],m=a;break}default:{i===bo&&n.charCodeAt(m+1)===km?(a=n.indexOf("*/",m+2)+1,a===0&&(r||R?a=n.length:C("comment")),h=["comment",n.slice(m,a+1),m,a],m=a):(fn.lastIndex=m+1,fn.test(n),fn.lastIndex===0?a=n.length-1:a=fn.lastIndex-2,h=["word",n.slice(m,a+1),m,a],w.push(h),m=a);break}}return m++,h}function j(M){b.push(M)}return{back:j,endOfFile:N,nextToken:k,position:x}};let jm=_i,Mm=Un,Pm=Vn,Im=Qt,wo=Ni,Lm=$m;const xo={empty:!0,space:!0};function Dm(e){for(let t=e.length-1;t>=0;t--){let n=e[t],r=n[3]||n[2];if(r)return r}}let Rm=class{constructor(e){this.input=e,this.root=new Im,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new jm;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let n,r,i,o=!1,s=!1,a=[],d=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),n=e[0],n==="("||n==="["?d.push(n==="("?")":"]"):n==="{"&&d.length>0?d.push("}"):n===d[d.length-1]&&d.pop(),d.length===0)if(n===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(n==="{"){s=!0;break}else if(n==="}"){if(a.length>0){for(i=a.length-1,r=a[i];r&&r[0]==="space";)r=a[--i];r&&(t.source.end=this.getPosition(r[3]||r[2]),t.source.end.offset++)}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(t.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(t,"params",a),o&&(e=a[a.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),s&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let n=0,r;for(let i=t-1;i>=0&&(r=e[i],!(r[0]!=="space"&&(n+=1,n===2)));i--);throw this.input.error("Missed semicolon",r[0]==="word"?r[3]+1:r[2])}colon(e){let t=0,n,r,i;for(let[o,s]of e.entries()){if(r=s,i=r[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!n)this.doubleColon(r);else{if(n[0]==="word"&&n[1]==="progid")continue;return o}n=r}return!1}comment(e){let t=new Mm;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let n=e[1].slice(2,-2);if(/^\s*$/.test(n))t.text="",t.raws.left=n,t.raws.right="";else{let r=n.match(/^(\s*)([^]*\S)(\s*)$/);t.text=r[2],t.raws.left=r[1],t.raws.right=r[3]}}createTokenizer(){this.tokenizer=Lm(this.input)}decl(e,t){let n=new Pm;this.init(n,e[0][2]);let r=e[e.length-1];for(r[0]===";"&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(r[3]||r[2]||Dm(e)),n.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop="";e.length;){let a=e[0][0];if(a===":"||a==="space"||a==="comment")break;n.prop+=e.shift()[1]}n.raws.between="";let i;for(;e.length;)if(i=e.shift(),i[0]===":"){n.raws.between+=i[1];break}else i[0]==="word"&&/\w/.test(i[1])&&this.unknownWord([i]),n.raws.between+=i[1];(n.prop[0]==="_"||n.prop[0]==="*")&&(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let o=[],s;for(;e.length&&(s=e[0][0],!(s!=="space"&&s!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let a=e.length-1;a>=0;a--){if(i=e[a],i[1].toLowerCase()==="!important"){n.important=!0;let d=this.stringFrom(e,a);d=this.spacesFromEnd(e)+d,d!==" !important"&&(n.raws.important=d);break}else if(i[1].toLowerCase()==="important"){let d=e.slice(0),h="";for(let p=a;p>0;p--){let f=d[p][0];if(h.trim().startsWith("!")&&f!=="space")break;h=d.pop()[1]+h}h.trim().startsWith("!")&&(n.important=!0,n.raws.important=h,e=d)}if(i[0]!=="space"&&i[0]!=="comment")break}e.some(a=>a[0]!=="space"&&a[0]!=="comment")&&(n.raws.between+=o.map(a=>a[1]).join(""),o=[]),this.raw(n,"value",o.concat(e),t),n.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new wo;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,n=null,r=!1,i=null,o=[],s=e[1].startsWith("--"),a=[],d=e;for(;d;){if(n=d[0],a.push(d),n==="("||n==="[")i||(i=d),o.push(n==="("?")":"]");else if(s&&r&&n==="{")i||(i=d),o.push("}");else if(o.length===0)if(n===";")if(r){this.decl(a,s);return}else break;else if(n==="{"){this.rule(a);return}else if(n==="}"){this.tokenizer.back(a.pop()),t=!0;break}else n===":"&&(r=!0);else n===o[o.length-1]&&(o.pop(),o.length===0&&(i=null));d=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(i),t&&r){if(!s)for(;a.length&&(d=a[a.length-1][0],!(d!=="space"&&d!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,s)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,n,r){let i,o,s=n.length,a="",d=!0,h,p;for(let f=0;fl+c[1],"");e.raws[t]={raw:f,value:a}}e[t]=a}rule(e){e.pop();let t=new wo;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)n=e.pop()[1]+n;return n}spacesAndCommentsFromStart(e){let t,n="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)n+=e.shift()[1];return n}spacesFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],t==="space");)n=e.pop()[1]+n;return n}stringFrom(e,t){let n="";for(let r=t;re.type==="warning")}get content(){return this.css}};var ki=Dr;Dr.default=Dr;let Vm=Xe,zm=Ei,Wm=Ts,Gm=Si,Co=ki,Zm=Qt,Xm=Fn,{isClean:_e,my:Qm}=Xt;const Ym={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Jm={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},Km={Once:!0,postcssPlugin:!0,prepare:!0},ht=0;function _t(e){return typeof e=="object"&&typeof e.then=="function"}function As(e){let t=!1,n=Ym[e.type];return e.type==="decl"?t=e.prop.toLowerCase():e.type==="atrule"&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,ht,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,ht,n+"Exit"]:[n,n+"Exit"]}function _o(e){let t;return e.type==="document"?t=["Document",ht,"DocumentExit"]:e.type==="root"?t=["Root",ht,"RootExit"]:t=As(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function Rr(e){return e[_e]=!1,e.nodes&&e.nodes.forEach(t=>Rr(t)),e}let qr={},pt=class $s{constructor(t,n,r){this.stringified=!1,this.processed=!1;let i;if(typeof n=="object"&&n!==null&&(n.type==="root"||n.type==="document"))i=Rr(n);else if(n instanceof $s||n instanceof Co)i=Rr(n.root),n.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{let o=Gm;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{i=o(n,r)}catch(s){this.processed=!0,this.error=s}i&&!i[Qm]&&Vm.rebuild(i)}this.result=new Co(t,i,r),this.helpers={...qr,postcss:qr,result:this.result},this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?{...o,...o.prepare(this.result)}:o)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,n){let r=this.result.lastPlugin;try{n&&n.addToError(t),this.error=t,t.name==="CssSyntaxError"&&!t.plugin?(t.plugin=r.postcssPlugin,t.setMessage()):r.postcssVersion}catch(i){console&&console.error&&console.error(i)}return t}prepareVisitors(){this.listeners={};let t=(n,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([n,i])};for(let n of this.plugins)if(typeof n=="object")for(let r in n){if(!Jm[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Km[r])if(typeof n[r]=="object")for(let i in n[r])i==="*"?t(n,r,n[r][i]):t(n,r+"-"+i.toLowerCase(),n[r][i]);else typeof n[r]=="function"&&t(n,r,n[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let t=0;t0;){let r=this.visitTick(n);if(_t(r))try{await r}catch(i){let o=n[n.length-1].node;throw this.handleError(i,o)}}}if(this.listeners.OnceExit)for(let[n,r]of this.listeners.OnceExit){this.result.lastPlugin=n;try{if(t.type==="document"){let i=t.nodes.map(o=>r(o,this.helpers));await Promise.all(i)}else await r(t,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(t){this.result.lastPlugin=t;try{if(typeof t=="object"&&t.Once){if(this.result.root.type==="document"){let n=this.result.root.nodes.map(r=>t.Once(r,this.helpers));return _t(n[0])?Promise.all(n):n}return t.Once(this.result.root,this.helpers)}else if(typeof t=="function")return t(this.result.root,this.result)}catch(n){throw this.handleError(n)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let t=this.result.opts,n=Xm;t.syntax&&(n=t.syntax.stringify),t.stringifier&&(n=t.stringifier),n.stringify&&(n=n.stringify);let r=new Wm(n,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let t of this.plugins){let n=this.runOnRoot(t);if(_t(n))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[_e];)t[_e]=!0,this.walkSync(t);if(this.listeners.OnceExit)if(t.type==="document")for(let n of t.nodes)this.visitSync(this.listeners.OnceExit,n);else this.visitSync(this.listeners.OnceExit,t)}return this.result}then(t,n){return this.async().then(t,n)}toString(){return this.css}visitSync(t,n){for(let[r,i]of t){this.result.lastPlugin=r;let o;try{o=i(n,this.helpers)}catch(s){throw this.handleError(s,n.proxyOf)}if(n.type!=="root"&&n.type!=="document"&&!n.parent)return!0;if(_t(o))throw this.getAsyncError()}}visitTick(t){let n=t[t.length-1],{node:r,visitors:i}=n;if(r.type!=="root"&&r.type!=="document"&&!r.parent){t.pop();return}if(i.length>0&&n.visitorIndex{i[_e]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,t.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};pt.registerPostcss=e=>{qr=e};var js=pt;pt.default=pt;Zm.registerLazyResult(pt);zm.registerLazyResult(pt);let e0=Ts,t0=Si;const n0=ki;let r0=Fn,Br=class{constructor(e,t,n){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=n,this._map=void 0;let r,i=r0;this.result=new n0(this._processor,r,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let s=new e0(i,r,this._opts,t);if(s.isMap()){let[a,d]=s.generate();a&&(this.result.css=a),d&&(this.result.map=d)}else s.clearAnnotation(),this.result.css=s.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=t0;try{e=t(this._css,this._opts)}catch(n){this.error=n}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var i0=Br;Br.default=Br;let o0=Ei,a0=js,s0=i0,l0=Qt,Ut=class{constructor(t=[]){this.version="8.4.47",this.plugins=this.normalize(t)}normalize(t){let n=[];for(let r of t)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))n=n.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)n.push(r);else if(typeof r=="function")n.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return n}process(t,n={}){return!this.plugins.length&&!n.parser&&!n.stringifier&&!n.syntax?new s0(this,t,n):new a0(this,t,n)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}};var c0=Ut;Ut.default=Ut;l0.registerProcessor(Ut);o0.registerProcessor(Ut);let Ms=_i,Ps=Un,u0=Xe,d0=wi,Is=Vn,Ls=Ei,h0=mm,p0=zn,f0=js,m0=Cs,g0=Hn,v0=Si,Ti=c0,b0=ki,Ds=Qt,Rs=Ni,y0=Fn,w0=Os;function z(...e){return e.length===1&&Array.isArray(e[0])&&(e=e[0]),new Ti(e)}z.plugin=function(e,t){let n=!1;function r(...o){console&&console.warn&&!n&&(n=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide: +https://evilmartians.com/chronicles/postcss-8-plugin-migration`),Ji.LANG&&Ji.LANG.startsWith("cn")&&console.warn(e+`: 里面 postcss.plugin 被弃用. 迁移指南: +https://www.w3ctech.com/topic/2226`));let s=t(...o);return s.postcssPlugin=e,s.postcssVersion=new Ti().version,s}let i;return Object.defineProperty(r,"postcss",{get(){return i||(i=r()),i}}),r.process=function(o,s,a){return z([r(a)]).process(o,s)},r};z.stringify=y0;z.parse=v0;z.fromJSON=h0;z.list=m0;z.comment=e=>new Ps(e);z.atRule=e=>new Ms(e);z.decl=e=>new Is(e);z.rule=e=>new Rs(e);z.root=e=>new Ds(e);z.document=e=>new Ls(e);z.CssSyntaxError=d0;z.Declaration=Is;z.Container=u0;z.Processor=Ti;z.Document=Ls;z.Comment=Ps;z.Warning=w0;z.AtRule=Ms;z.Result=b0;z.Input=p0;z.Rule=Rs;z.Root=Ds;z.Node=g0;f0.registerPostcss(z);var x0=z;z.default=z;const{isPlainObject:jv}=bi,{parse:Mv}=x0,C0="_info-popup_i3rna_1",_0="_label_i3rna_2",E0="_icon_i3rna_7",N0="_dropdown-container_i3rna_15",S0="_content_i3rna_20",Et={infoPopup:C0,label:_0,icon:E0,dropdownContainer:N0,content:S0};function k0(e){const{className:t,icon:n=g.jsx(ql,{}),infoLabel:r,title:i,description:o,withoutIcon:s,popupClassName:a,descriptionClassName:d}=e;return g.jsx(kp,{label:g.jsxs("div",{className:Et.label,children:[r,!s&&n&&g.jsx("div",{className:Et.icon,children:n})]}),popupClassName:S(Et.dropdownContainer,a),className:S(Et.infoPopup,t),variant:"tertiary",withoutDropdownIcon:!0,children:g.jsx(Fo,{heading:i,childrenContainerClassName:S(d,Et.content),withInternalPadding:!0,children:o})})}const T0="_progress-wrapper_x340w_1",O0="_title_x340w_7",A0="_total_x340w_11",$0="_progress_x340w_1",Nt={progressWrapper:T0,title:O0,total:A0,progress:$0};function Pv(e){const{className:t,title:n,description:r,totalValue:i,value:o,showPercentageInTitle:s,children:a,color:d="var(--go-ui-color-primary-red)"}=e,h=V(o)?o:0,p=V(i)?i:0;let f;return p===0?f=0:f=h/p*100,g.jsxs("div",{className:S(Nt.progressWrapper,t),children:[(n||s)&&g.jsxs("div",{className:Nt.title,children:[n,s&&g.jsx(Wr,{value:f,suffix:"%"})]}),g.jsx("div",{className:Nt.total,children:g.jsx("div",{className:Nt.progress,style:{width:`${f}%`,backgroundColor:d}})}),r&&g.jsx("div",{className:Nt.description,children:r}),a]})}const j0="_legend-element_1a9ic_1",M0="_color_1a9ic_7",P0="_icon-container_1a9ic_14",I0="_icon_1a9ic_14",L0="_label_1a9ic_31",St={legendElement:j0,color:M0,iconContainer:P0,icon:I0,label:L0};function D0(e){const{className:t,colorClassName:n,iconClassName:r,color:i,label:o,iconSrc:s}=e;return g.jsxs("div",{className:S(St.legendElement,t),children:[s?g.jsx("div",{style:{backgroundColor:i},className:St.iconContainer,children:g.jsx("img",{className:S(St.icon,r),src:s,alt:""})}):g.jsx("div",{style:{backgroundColor:i},className:S(St.color,n)}),g.jsx("div",{className:St.label,children:o})]})}const R0="_list_1whuj_1",q0="_compact_1whuj_5",B0="_pending_1whuj_8",mr={list:R0,compact:q0,pending:B0};function F0(e){const{className:t,data:n,keySelector:r,renderer:i,rendererParams:o,pending:s,errored:a,filtered:d,errorMessage:h,emptyMessage:p,pendingMessage:f,filteredEmptyMessage:l,compact:c,withoutMessage:v=!1,messageClassName:m}=e,w=O(n)||n.length===0;return g.jsxs("div",{className:S(mr.list,c&&mr.compact,s&&mr.pending,t),children:[g.jsx(Vo,{data:n,keySelector:r,renderer:i,rendererParams:o}),!v&&g.jsx(Vr,{className:m,pending:s,filtered:d,empty:w,errored:a,compact:c,emptyMessage:p,filteredEmptyMessage:l,pendingMessage:f,errorMessage:h,overlayPending:!0})]})}function qs(e,t){if(O(e))return;const n={},r=[];return e.forEach(i=>{const o=t?t(i):JSON.stringify(i);n[o]||(n[o]=!0,r.push(i))}),e.length===r.length?e:r}const H0=[40,38,13,8];function U0(e,t,n){return t.findIndex((r,i)=>n(r,i)===e)}function Eo(e,t,n,r){if(n.length<=0)return;let i=U0(e,n,r);i===-1&&(i=t>0?-1:0);const o=rl(i+t,n.length);return r(n[o],o)}function V0(e,t,n,r,i,o,s,a,d){return u.useCallback(h=>{const{keyCode:p}=h,f=e?.key;if(r&&(p===9||p===27))o();else if(!r&&H0.includes(p))h.stopPropagation(),h.preventDefault(),s();else if(p===13)if(V(f)){h.stopPropagation(),h.preventDefault();const l=n.find((c,v)=>t(c,v)===f);l&&a(f,l)}else h.stopPropagation(),h.preventDefault(),d&&d();else if(p===40){h.stopPropagation(),h.preventDefault();const l=Eo(f,1,n,t);i(l?{key:l}:void 0)}else if(p===38){h.stopPropagation(),h.preventDefault();const l=Eo(f,-1,n,t);i(l?{key:l}:void 0)}},[e,r,t,i,o,a,s,d,n])}const z0="_generic-option_zv1n8_1",W0={genericOption:z0};function G0(e){const{optionContainerClassName:t,contentRenderer:n,contentRendererParam:r,option:i,onClick:o,optionKey:s,focusedKey:a}=e,d=r(s,i),{containerClassName:h,title:p,...f}=d,l=a?.key===s,c=u.useRef(null);u.useEffect(()=>{a&&a.key===s&&!a.mouse&&c.current&&c.current.scrollIntoView({behavior:"smooth",block:"center"})},[s,a]);const v=u.useCallback(()=>{o(s,i)},[s,i,o]);return g.jsx(Hr,{elementRef:c,className:S(W0.genericOption,t,h),onClick:v,title:p,name:s,focused:l,children:n(f)})}const Z0="common",X0={infoMessageAnd:"and",infoMessageMore:"more",buttonTitleSelect:"Select all",buttonTitleClear:"Clear",buttonTitleClose:"Close",buttonTitleOpen:"Open",selectInputPendingMessage:"Fetching options...",selectInputEmptyMessage:"No option available",selectInputFilteredMessage:"No option available for the search",selectInputErrorMessage:"Could not load options"},Q0={namespace:Z0,strings:X0},Y0="_popup_poyjv_1",J0="_list_poyjv_4",K0="_list-item_poyjv_9",eg="_info-message_poyjv_14",tg="_icon_poyjv_21",Ie={popup:Y0,list:J0,listItem:K0,infoMessage:eg,icon:tg},ng=[];function Bs(e){const{actions:t,actionsContainerClassName:n,className:r,disabled:i,error:o,errorContainerClassName:s,hint:a,hintContainerClassName:d,icons:h,iconsContainerClassName:p,inputSectionClassName:f,label:l,labelClassName:c,name:v,onOptionClick:m,searchText:w,onSearchTextChange:b,optionContainerClassName:x,optionKeySelector:C,optionRenderer:N,optionRendererParams:k,options:j,optionsPopupClassName:M,persistentOptionPopup:R,readOnly:L,placeholder:B,valueDisplay:y="",nonClearable:_,onClearButtonClick:E,onSelectAllButtonClick:T,optionsPending:A=!1,optionsFiltered:P=!1,optionsErrored:$=!1,focused:Z,focusedKey:X,onFocusedKeyChange:J,onFocusedChange:Y,dropdownShown:K,onDropdownShownChange:re,totalOptionsCount:H=0,hasValue:q,autoFocus:U,onEnterWithoutOption:G,withAsterisk:Q,required:ye,variant:Re,errorOnTooltip:Qe,dropdownHidden:mt}=e,qe=j??ng,ie=Mn(Q0),oe=u.useRef(null),ve=u.useRef(null),ae=u.useRef(null),se=u.useRef(null),Ye=u.useCallback(Me=>{K||re(!0),b(Me)},[K,re,b]),Wn=u.useCallback((Me,Be)=>{Be.stopPropagation(),re(!K)},[K,re]),Gn=u.useCallback(()=>{K||re(!0)},[K,re]),gt=u.useCallback(()=>{re(!1)},[re]),Us=u.useCallback(()=>{L||Gn()},[L,Gn]),Vs=u.useCallback((Me,Be)=>{Me||Be?R&&ae.current&&ae.current.focus():gt()},[gt,R]),Zn=u.useCallback((Me,Be)=>{m(Me,Be,v),R||gt()},[m,gt,R,v]),zs=u.useCallback((Me,Be)=>({contentRendererParam:k,option:Be,optionKey:Me,focusedKey:X,contentRenderer:N,onClick:Zn,onFocus:J,optionContainerClassName:S(x,Ie.listItem)}),[X,Zn,J,x,N,k]);Aa(K,Vs,se,oe);const Ws=V0(X,C,qe,K,J,gt,Gn,Zn,G),Oi=qe.length,Ai=H-Oi>0?`${ie.infoMessageAnd} ${H-Oi} ${ie.infoMessageMore}`:void 0,Xn=K&&!mt;return g.jsxs(g.Fragment,{children:[g.jsx(ui,{actionsContainerClassName:n,className:r,containerRef:oe,disabled:i,errorContainerClassName:s,error:o,errorOnTooltip:Qe,hintContainerClassName:d,hint:a,iconsContainerClassName:p,icons:h,inputSectionClassName:f,inputSectionRef:ve,labelClassName:c,label:l,readOnly:L,required:ye,variant:Re,withAsterisk:Q,actions:g.jsxs(g.Fragment,{children:[t,!L&&T&&g.jsx(it,{onClick:T,disabled:i,variant:"tertiary",name:void 0,title:ie.buttonTitleSelect,children:g.jsx(Pl,{className:Ie.icon})}),!L&&!_&&q&&g.jsx(it,{onClick:E,disabled:i,variant:"tertiary",name:void 0,title:ie.buttonTitleClear,children:g.jsx(Rl,{className:Ie.icon})}),!L&&g.jsx(it,{onClick:Wn,variant:"tertiary",name:void 0,title:Xn?ie.buttonTitleClose:ie.buttonTitleOpen,children:Xn?g.jsx(Ro,{className:Ie.icon}):g.jsx(Do,{className:Ie.icon})})]}),input:g.jsx(Oa,{name:v,elementRef:ae,readOnly:L,disabled:i,value:K||Z?w:y,onChange:Ye,onClick:Us,onFocus:()=>Y(!0),onBlur:()=>Y(!1),placeholder:Vt(y)?y:B,autoComplete:"off",onKeyDown:Ws,autoFocus:U})}),Xn&&g.jsxs(Pn,{elementRef:se,parentRef:ve,className:S(M,Ie.popup),children:[g.jsx(F0,{className:Ie.list,data:qe,keySelector:C,renderer:G0,rendererParams:zs,errored:$,filtered:P,pending:A,pendingMessage:ie.selectInputPendingMessage,emptyMessage:ie.selectInputEmptyMessage,filteredEmptyMessage:ie.selectInputFilteredMessage,errorMessage:ie.selectInputErrorMessage,compact:!0}),!A&&!$&&!!Ai&&g.jsx("div",{className:Ie.infoMessage,children:Ai})]})]})}function rg(e){const{children:t,isActive:n,iconClassName:r,labelClassName:i}=e;return g.jsxs(g.Fragment,{children:[g.jsx("div",{className:r,children:n?g.jsx(Bo,{}):g.jsx(qo,{})}),g.jsx("div",{className:i,children:t})]})}const ig="_option_1kpl9_1",og="_active_1kpl9_7",ag="_icon_1kpl9_11",sg="_label_1kpl9_17",kt={option:ig,active:og,icon:ag,label:sg},gr=[];function lg(e){const{keySelector:t,labelSelector:n,name:r,onChange:i,onOptionsChange:o,options:s,optionsPending:a,optionsErrored:d,value:h,sortFunction:p,searchOptions:f,onSearchValueChange:l,onShowDropdownChange:c,hideOptionFilter:v,selectedOnTop:m,...w}=e,b=s??gr,x=f??gr,C=h??gr,[N,k]=u.useState(),[j,M]=u.useState(!1),[R,L]=u.useState(!1),[B,y]=u.useState(),[_,E]=u.useState({}),T=u.useMemo(()=>ot(b,t,H=>H),[b,t]),A=u.useMemo(()=>ot(b,t,n),[b,t,n]),P=u.useMemo(()=>C.map(H=>A[H]??"?").join(", "),[C,A]),$=u.useMemo(()=>C.map(H=>T[H]).filter(V),[C,T]),Z=u.useMemo(()=>{const H=qs([...x,...$],t);if(!m)return p?p(H,N,n):H;const q=H.filter(G=>_[t(G)]),U=H.filter(G=>!_[t(G)]&&(O(v)||v(G)));return p?[...We(q,N,n),...p(U,N,n)]:[...We(q,N,n),...U]},[m,t,n,N,x,_,$,p,v]),X=u.useCallback(H=>{k(H),l&&l(H)},[l]),J=u.useCallback(H=>{M(H),c&&c(H),H?(E(ot(C,q=>q,()=>!0)),y(void 0)):(E({}),y(void 0),k(void 0),l&&l(void 0))},[C,l,c]),Y=u.useCallback((H,q)=>{const U=C.findIndex(G=>G===H)!==-1;return{children:n(q),containerClassName:S(kt.option,U&&kt.active),title:n(q),isActive:U,labelClassName:kt.label,iconClassName:kt.icon}},[n,C]),K=u.useCallback((H,q)=>{const U=[...C],G=C.findIndex(Q=>Q===H);G!==-1?U.splice(G,1):(U.push(H),o&&o(Q=>{const ye=Q??[];return ye.find(Re=>t(Re)===H)?Q:[...ye,q]})),i(U,r)},[C,i,r,o,t]),re=u.useCallback(()=>{i([],r)},[r,i]);return g.jsx(Bs,{...w,name:r,options:Z,optionsPending:a,optionsFiltered:Vt(N)&&N.length>0,optionsErrored:d,optionKeySelector:t,optionRenderer:rg,optionRendererParams:Y,optionContainerClassName:kt.optionContainer,onOptionClick:K,valueDisplay:P,onClearButtonClick:re,searchText:N,onSearchTextChange:X,dropdownShown:j,onDropdownShownChange:J,focused:R,onFocusedChange:L,focusedKey:B,onFocusedKeyChange:y,persistentOptionPopup:!0,nonClearable:!1,hasValue:V(C)&&C.length>0})}function Iv(e){const{name:t,options:n,keySelector:r,onChange:i,withSelectAll:o,...s}=e,a=u.useCallback(()=>{if(O(n))return;const d=n.map(r);i(d,t)},[n,t,i,r]);return g.jsx(lg,{...s,name:t,onChange:i,options:n,keySelector:r,sortFunction:We,searchOptions:n,onSelectAllButtonClick:o?a:void 0,selectedOnTop:!1})}const cg="_page-container_1cfro_1",ug="_content_1cfro_2",No={pageContainer:cg,content:ug};function Lv(e){const{className:t,contentClassName:n,children:r,contentAs:i="div",containerAs:o="div"}=e,s=i;return g.jsx(o,{className:S(No.pageContainer,t),children:g.jsx(s,{className:S(No.content,n),children:r})})}const dg="_text-output_10oza_1",hg="_with-background_10oza_6",pg="_label_10oza_11",fg="_with-colon_10oza_12",mg="_value_10oza_17",gg="_text-type_10oza_18",vg="_strong_10oza_24",Ce={textOutput:dg,withBackground:hg,label:pg,withColon:fg,value:mg,textType:gg,strong:vg};function So(e){const{className:t,label:n,icon:r,description:i,labelClassName:o,descriptionClassName:s,valueClassName:a,strongLabel:d,strongValue:h,strongDescription:p,withoutLabelColon:f,withBackground:l,invalidText:c=Ho,...v}=e,{value:m}=e;let w=c;return v.valueType==="number"?w=g.jsx(Wr,{...v,invalidText:c}):v.valueType==="date"?w=g.jsx(wp,{...v,invalidText:c}):v.valueType==="boolean"?w=g.jsx(Uu,{...v,invalidText:c}):m instanceof Date||(w=m||c),g.jsxs("div",{className:S(Ce.textOutput,l&&Ce.withBackground,t),children:[r,n&&g.jsx("div",{className:S(Ce.label,d&&Ce.strong,o,!f&&Ce.withColon),children:n}),g.jsx("div",{className:S(Ce.value,h&&Ce.strong,v.valueType==="text"&&Ce.textType,a),children:w}),i&&g.jsx("div",{className:S(Ce.description,p&&Ce.strong,s),children:i})]})}const bg="_pie-chart_pyr7m_1",yg="_legend_pyr7m_7",wg="_legend-item_pyr7m_13",Tt={pieChart:bg,legend:yg,legendItem:wg},xg=70,Cg=40;function ko(e,t=1){return Math.round(e*10**t)/10**t}function To(e,t){const n=(t-90)*Math.PI/180;return{x:ko(e+e*Math.cos(n)),y:ko(e+e*Math.sin(n))}}function _g(e,t,n){let r=n;const i=r-t===360;i&&(r-=1);const o=To(e,t),s=To(e,r),a=r-t<=180?0:1,d=["M",o.x,o.y,"A",e,e,0,a,1,s.x,s.y];return i?d.push("Z"):d.push("L",e,e,"L",o.x,o.y,"Z"),d.join(" ")}function Dv(e){const{className:t,data:n,valueSelector:r,labelSelector:i,keySelector:o,colorSelector:s,colors:a,pieRadius:d=xg,chartPadding:h=Cg,legendClassName:p,showPercentageInLegend:f}=e,l=tu(n?.map(m=>r(m))),c=O(l)||l===0?1:l,v=u.useMemo(()=>{let m=0;const w=n?.map(b=>{const x=r(b);if(O(x))return;const C=360*(x/c);return m+=C,{key:o(b),value:x,label:i(b),startAngle:m-C,percentage:Kc(x,c),endAngle:m,datum:b}}).filter(V)??[];return s?w.map(({datum:b,...x})=>({...x,color:s(b)})):w.map(({datum:b,...x},C)=>({...x,color:a[C%a.length]}))},[n,o,r,i,c,s,a]);return g.jsxs("div",{className:S(Tt.pieChart,t),children:[g.jsx("svg",{className:Tt.svg,style:{width:`${h+d*2}px`,height:`${h+d*2}px`},children:g.jsx("g",{style:{transform:`translate(${h/2}px, ${h/2}px)`},children:v.map(m=>g.jsx("path",{className:Tt.path,d:_g(d,m.startAngle,m.endAngle),fill:m.color,children:g.jsx(vu,{description:g.jsx(So,{label:m.label,value:m.value})})},m.key))})}),g.jsx("div",{className:S(Tt.legend,p),children:v.map(m=>g.jsx(D0,{className:Tt.legendItem,label:f?g.jsx(So,{label:m.label,value:m.percentage,valueType:"number",prefix:"(",suffix:"%)",withoutLabelColon:!0}):m.label,color:m.color},m.key))})]})}const Eg="_raw-input_145mq_1",Ng={rawInput:Eg};function Sg(e){const{className:t,onChange:n,elementRef:r,value:i,name:o,...s}=e,a=ce.useCallback(d=>{var h;const p=(h=d?.target)==null?void 0:h.value;n&&n(p===""?void 0:p,o,d)},[o,n]);return g.jsx("textarea",{...s,ref:r,className:S(Ng.rawInput,t),name:V(o)?String(o):void 0,onChange:a,value:i??""})}const kg="_option_11p37_1",Tg="_icon_11p37_6",Og="_label_11p37_14",Ag="_overflow-container_11p37_20",$g="_description_11p37_25",nt={option:kg,icon:Tg,label:Og,overflowContainer:Ag,description:$g};function jg(e){const{className:t,label:n,description:r,iconClassName:i,labelClassName:o}=e;return g.jsxs("div",{className:S(nt.option,t),children:[g.jsx("div",{className:S(nt.icon,i),children:g.jsx(Il,{})}),g.jsxs("div",{className:S(nt.label,o),children:[g.jsx("div",{className:nt.overflowContainer,children:n}),g.jsx("div",{className:S(nt.overflowContainer,nt.description),children:r})]})]})}const Mg="_option-container_2k92q_1",Pg="_option_2k92q_1",Ig="_active_2k92q_9",Lg="_icon_2k92q_12",Ot={optionContainer:Mg,option:Pg,active:Ig,icon:Lg},Oo=[];function Ao(e){const{keySelector:t,labelSelector:n,descriptionSelector:r,name:i,onChange:o,onOptionsChange:s,options:a,optionsPending:d,optionsErrored:h,value:p,sortFunction:f,searchOptions:l,onSearchValueChange:c,onShowDropdownChange:v,hideOptionFilter:m,selectedOnTop:w,onEnterWithoutOption:b,...x}=e,C=a??Oo,N=l??Oo,[k,j]=u.useState(),[M,R]=u.useState(!1),[L,B]=u.useState(!1),[y,_]=u.useState(),[E,T]=u.useState({}),A=u.useMemo(()=>ot(C,t,n),[C,t,n]),P=V(p)?A[p]??"?":"",$=u.useMemo(()=>{const q=C?.find(U=>t(U)===p);return O(q)?[]:[q]},[p,C,t]),Z=u.useMemo(()=>{const q=qs([...N,...$],t);if(!w)return f?f(q,k,n):q;const U=q.filter(Q=>E[t(Q)]),G=q.filter(Q=>!E[t(Q)]&&(O(m)||m(Q)));return f?[...We(U,k,n),...f(G,k,n)]:[...We(U,k,n),...G]},[w,t,n,k,N,E,$,f,m]),X=u.useCallback(q=>{j(q),c&&c(q)},[c]),J=u.useCallback(()=>{R(!1),v&&v(!1),j(void 0),c&&c(void 0),b&&b(k)},[k,v,b,c]),Y=u.useCallback(q=>{R(q),v&&v(q),q?(T(ot(p?[p]:[],U=>U,()=>!0)),_(p?{key:p}:void 0)):(T({}),_(void 0),j(void 0),c&&c(void 0))},[p,c,v]),K=u.useCallback((q,U)=>{const G=q===p;return{label:n(U),description:r?r(U):void 0,containerClassName:S(Ot.optionContainer,G&&Ot.active),title:n(U),className:Ot.option,iconClassName:Ot.icon}},[p,n,r]),re=u.useCallback((q,U)=>{s&&s(G=>{const Q=G??[];return Q.find(ye=>t(ye)===q)?G:[...Q,U]}),o(q,i,U)},[o,i,s,t]),H=u.useCallback(()=>{if(!e.nonClearable){const q=e.onChange;q(void 0,i,void 0)}},[i,e.onChange,e.nonClearable]);return g.jsx(Bs,{...x,name:i,options:Z,optionsPending:d,optionsErrored:h,optionsFiltered:Vt(k)&&k.length>0,optionKeySelector:t,optionRenderer:jg,optionRendererParams:K,optionContainerClassName:Ot.optionContainer,onOptionClick:re,valueDisplay:P,onClearButtonClick:H,searchText:k,onSearchTextChange:X,dropdownShown:M,onDropdownShownChange:Y,focused:L,onFocusedChange:B,focusedKey:y,onFocusedKeyChange:_,hasValue:V(p),persistentOptionPopup:!1,onEnterWithoutOption:J})}const Dg="_segment-input_bykt7_1",Rg="_segment-list_bykt7_4",qg="_segment_bykt7_1",Bg="_active_bykt7_18",Fg="_secondary-variant_bykt7_24",Mt={segmentInput:Dg,segmentList:Rg,segment:qg,active:Bg,secondaryVariant:Fg};function Hg(e){const{label:t,name:n,onClick:r,value:i,className:o,variant:s="primary",inputName:a,...d}=e;return g.jsx(it,{...d,className:S(Mt.segment,i&&Mt.active,s==="secondary"&&Mt.secondaryVariant,o),name:n,onClick:r,variant:"tertiary",children:t})}function Rv(e){const{rendererParams:t,listContainerClassName:n,keySelector:r,labelSelector:i,className:o,...s}=e;return g.jsx(Du,{className:S(o,Mt.segmentInput),...s,renderer:Hg,rendererParams:t,listContainerClassName:S(n,Mt.segmentList),keySelector:r,labelSelector:i})}function qv(e){const{name:t,options:n,nonClearable:r,onChange:i,...o}=e;return e.nonClearable?g.jsx(Ao,{...o,onChange:e.onChange,nonClearable:e.nonClearable,name:t,options:n,sortFunction:We,searchOptions:n,selectedOnTop:!1}):g.jsx(Ao,{...o,onChange:e.onChange,nonClearable:e.nonClearable,name:t,options:n,sortFunction:We,searchOptions:n,selectedOnTop:!1})}const Ug="_td_1k4cn_1",Vg={td:Ug};function zg(e){const{className:t,children:n,...r}=e;return g.jsx("td",{className:S(t,Vg.td),...r,children:n})}function Fs(e){const{className:t,children:n,...r}=e;return g.jsx("tr",{className:t,...r,children:n})}const Wg="_row_1829z_1",Gg="_cell_1829z_2",$o={row:Wg,cell:Gg};function Zg(e){const{data:t,keySelector:n,columns:r,rowClassName:i,cellClassName:o,rowModifier:s}=e;return g.jsx(g.Fragment,{children:t?.map((a,d)=>{const h=n(a,d),p=r.map(c=>{const{id:v,cellRenderer:m,cellRendererClassName:w,cellRendererParams:b,cellContainerClassName:x}=c,C=b(h,a,d,t),N=g.jsx(m,{className:w,...C,name:v});return g.jsx(zg,{className:S($o.cell,x,typeof o=="function"?o(h,a,v):o),children:N},v)}),f=g.jsx(Fs,{className:S($o.row,typeof i=="function"?i(h,a):i),children:p});let l=f;return s&&(l=s({rowKey:h,row:f,cells:p,columns:r,datum:a})),g.jsx(u.Fragment,{children:l},h)})})}const Xg="_th_cdv41_1",Qg="_resize-handle_cdv41_8",jo={th:Xg,resizeHandle:Qg};function Yg(e){const{className:t,children:n,onResize:r,onResizeComplete:i,name:o,...s}=e,a=u.useRef(null),d=u.useRef(),h=u.useRef(),p=u.useRef(),f=u.useCallback(c=>{var v;if(V(d.current)&&a.current&&r){c.preventDefault(),c.stopPropagation();const m=c.clientX-d.current;if(V(h.current)){const w=h.current+m;p.current=w,r(w,o)}else h.current=(v=a.current)==null?void 0:v.offsetWidth}},[r,o]),l=u.useCallback(c=>{var v;c.preventDefault(),d.current=c.clientX,h.current=(v=a.current)==null?void 0:v.offsetWidth,window.addEventListener("mousemove",f,!0)},[f]);return u.useEffect(()=>{const c=()=>{d.current=void 0,h.current=void 0,i&&V(p.current)&&i(p.current,o),window.removeEventListener("mousemove",f,!0)};return window.addEventListener("mouseup",c,!0),()=>{window.removeEventListener("mouseup",c,!0),window.removeEventListener("mousemove",f,!0)}},[f,o,i]),g.jsxs("th",{ref:a,className:S(t,jo.th),...s,children:[r&&g.jsx("div",{role:"presentation",className:jo.resizeHandle,onMouseDown:l}),n]})}const Jg="_table_nilhy_1",Kg="_table-overflow-wrapper_nilhy_8",ev="_table-element_nilhy_13",tv="_header-row_nilhy_23",nv="_header-element_nilhy_24",rv="_header-component_nilhy_29",He={table:Jg,tableOverflowWrapper:Kg,tableElement:ev,headerRow:tv,headerElement:nv,headerComponent:rv};function iv(e,t){return t??e.columnWidth??zc}function Bv(e){const{data:t,keySelector:n,columns:r,caption:i,className:o,captionClassName:s,headerRowClassName:a,headerCellClassName:d,rowClassName:h,cellClassName:p,rowModifier:f,fixedColumnWidth:l,resizableColumn:c,headersHidden:v,pending:m,filtered:w,errored:b=!1}=e,x=u.useRef(null),[C]=ce.useState(()=>Lo()),[N,k]=ce.useState({});u.useEffect(()=>{k(B=>{if(O(x.current))return B;const y=x.current.getBoundingClientRect(),{width:_}=y;let E=r.map($=>({id:$.id,stretch:!!$.columnStretch,width:iv($,B[$.id])}));const T=At(E.filter($=>$.stretch).map($=>$.width)),A=At(E.filter($=>!$.stretch).map($=>$.width)),P=(_-A)/T;return P>1&&(E=E.map($=>({...$,width:$.stretch?$.width*P:$.width}))),ot(E,$=>$.id,$=>$.width)})},[r]);const j=ce.useCallback((B,y)=>{const _=document.getElementById(`${C}-${y}`),E=Math.max(B,80);if(O(_)||(_.style.width=`${E}px`,!l))return;const T=document.getElementById(C);if(O(T))return;const A=At(r.map(P=>P.id===y?E:N[P.id]));T.style.width=`${A}px`},[C,N,r,l]),M=ce.useCallback((B,y)=>{V(y)&&k(_=>({..._,[y]:Math.max(B,80)}))},[k]),R=ce.useMemo(()=>At(r.map(B=>N[B.id])),[N,r]),L=O(t)||t.length===0||Object.keys(N).length===0;return g.jsxs("div",{ref:x,className:S(He.table,o),children:[!L&&g.jsx("div",{className:He.tableOverflowWrapper,children:g.jsxs("table",{className:He.tableElement,style:l?{width:`${R}px`}:void 0,id:C,children:[i&&g.jsx("caption",{className:s,children:i}),g.jsx("colgroup",{children:r.map(B=>{const{id:y,columnClassName:_}=B,E=N[y],T=l?{width:`${E}px`}:void 0;return g.jsx("col",{id:`${C}-${y}`,style:T,className:S(He.column,_)},y)})}),!v&&g.jsx("thead",{children:g.jsx(Fs,{className:S(He.headerRow,a),children:r.map((B,y)=>{const{id:_,title:E,headerCellRenderer:T,headerCellRendererClassName:A,headerCellRendererParams:P,headerContainerClassName:$}=B,Z=g.jsx(T,{...P,name:_,title:E,index:y,className:S(A,He.headerComponent)});return g.jsx(Yg,{scope:"col",name:_,onResize:c?j:void 0,onResizeComplete:c?M:void 0,className:S(He.headerElement,typeof d=="function"?d(_):d,$),children:Z},_)})})}),g.jsx("tbody",{children:g.jsx(Zg,{data:t,keySelector:n,columns:r,rowClassName:h,cellClassName:p,rowModifier:f})})]})}),g.jsx(Vr,{filtered:w,empty:L,errored:b,pending:m,overlayPending:!0})]})}function ov(e){const{className:t,value:n}=e;return O(n)?null:g.jsx("div",{className:t,children:n})}const av="common",sv={sortTableButtonTitle:"Sort Table"},lv={namespace:av,strings:sv},cv="_header-cell_vn24d_1",uv="_sort-button_vn24d_8",dv="_icon_vn24d_12",hv="_info-popup-icon_vn24d_17",Ue={headerCell:cv,sortButton:uv,icon:dv,infoPopupIcon:hv};function Hs(e){const{className:t,titleClassName:n,title:r,name:i,sortable:o,defaultSortDirection:s="asc",infoTitle:a,infoDescription:d}=e,{sorting:h,setSorting:p}=u.useContext(Js),f=Mn(lv),l=h?.name===i?h.direction:void 0,c=u.useRef(null),v=u.useCallback(()=>{if(O(p))return;let m;O(l)?m=s:l==="asc"?m="dsc":l==="dsc"&&(m="asc"),p(m?{name:i,direction:m}:void 0)},[i,p,l,s]);return g.jsxs("div",{ref:c,className:S(t,Ue.headerCell),children:[o&&g.jsxs(it,{name:void 0,variant:"tertiary",onClick:v,title:f.sortTableButtonTitle,className:Ue.sortButton,children:[O(l)&&g.jsx(Fl,{className:Ue.icon}),l==="asc"&&g.jsx(Ml,{className:Ue.icon}),l==="dsc"&&g.jsx(jl,{className:Ue.icon})]}),g.jsx("div",{className:S(n,Ue.title),children:r}),a&&d&&g.jsx(k0,{className:Ue.infoPopupIcon,title:a,description:d})]})}u.createContext({tabs:[],step:0,disabled:!1,activeTab:"",variant:"primary",setActiveTab:()=>{console.warn("setActiveTab called before it was initialized")},registerTab:()=>{console.warn("registerTab called before it was initialized")},unregisterTab:()=>{console.warn("unregisterTab called before it was initialized")}});const Mo="•",pv="Enter";function Fv(e){const{actions:t,className:n,disabled:r,error:i,errorOnTooltip:o,hint:s,icons:a,inputClassName:d,label:h,labelClassName:p,readOnly:f,required:l,variant:c,inputSectionClassName:v,withAsterisk:m,onChange:w,name:b,autoBullets:x=!1,rows:C=5,...N}=e,k=ce.useCallback(M=>{O(w)||M.target.value===""&&w(`${Mo} `,b)},[w,b]),j=ce.useCallback(M=>{O(w)||M.key===pv&&w(`${M.currentTarget.value}${Mo} `,b)},[w,b]);return g.jsx(ui,{actions:t,className:n,disabled:r,error:i,errorOnTooltip:o,hint:s,icons:a,inputSectionClassName:v,labelClassName:p,label:h,readOnly:f,required:l,variant:c,withAsterisk:m,input:g.jsx(Sg,{...N,readOnly:f,disabled:r,className:d,onChange:w,name:b,onFocus:x?k:void 0,onKeyUp:x?j:void 0,rows:C})})}function Hv(e){const{actions:t,className:n,disabled:r,error:i,errorOnTooltip:o,hint:s,icons:a,inputClassName:d,inputSectionClassName:h,label:p,readOnly:f,required:l,variant:c,withAsterisk:v,type:m="text",...w}=e;return g.jsx(ui,{className:n,actions:t,disabled:r,error:i,errorOnTooltip:o,hint:s,icons:a,inputSectionClassName:h,label:p,required:l,readOnly:f,variant:c,withAsterisk:v,input:g.jsx(Oa,{...w,required:l,readOnly:f,disabled:r,className:d,type:m})})}const Po={};function Uv(e,t,n,r){return{id:e,title:t,columnClassName:r?.columnClassName,headerCellRenderer:Hs,headerCellRendererClassName:r?.headerCellRendererClassName,headerContainerClassName:r?.headerContainerClassName,headerCellRendererParams:{sortable:r?.sortable,infoTitle:r?.headerInfoTitle,infoDescription:r?.headerInfoDescription},cellRendererClassName:r?.cellRendererClassName,cellContainerClassName:r?.cellContainerClassName,cellRenderer:ov,cellRendererParams:(i,o)=>({value:n(o)||"--"}),valueSelector:n,valueComparator:(i,o)=>Wc(n(i),n(o)),columnWidth:r?.columnWidth,columnStretch:r?.columnStretch,columnStyle:r?.columnStyle}}function Vv(e,t,n,r){return{id:e,title:t,columnClassName:r?.columnClassName,headerCellRenderer:Hs,headerCellRendererClassName:S(Po.numberCellHeader,r?.headerCellRendererClassName),headerContainerClassName:r?.headerContainerClassName,headerCellRendererParams:{sortable:r?.sortable,infoTitle:r?.headerInfoTitle,infoDescription:r?.headerInfoDescription},cellRendererClassName:S(Po.numberCell,r?.cellRendererClassName),cellContainerClassName:r?.cellContainerClassName,cellRenderer:Wr,cellRendererParams:(i,o)=>({value:n(o),suffix:r?.suffix,maximumFractionDigits:r?.maximumFractionDigits,invalidText:"--"}),valueSelector:n,valueComparator:(i,o)=>Gc(n(i),n(o)),columnWidth:r?.columnWidth,columnStretch:r?.columnStretch,columnStyle:r?.columnStyle}}export{$l as A,Tv as B,vv as C,yv as D,wv as F,xv as G,Dv as K,Rv as L,Cv as M,Lv as N,Hv as O,Pv as P,_v as Q,xc as R,Ev as S,Sv as U,Vl as _,Nv as a,gv as b,bv as c,Iv as d,Fv as e,qv as f,Uv as g,Vv as h,kv as i,Ov as j,mv as l,it as n,Io as t,Bv as y,Fo as z}; diff --git a/py_backend/static/assets/vendor-utils-Db80MiSc.js b/py_backend/static/assets/vendor-utils-Db80MiSc.js new file mode 100644 index 0000000000000000000000000000000000000000..19cfd238c6f2166cf5b83b7d079ba453e70dd154 --- /dev/null +++ b/py_backend/static/assets/vendor-utils-Db80MiSc.js @@ -0,0 +1,12 @@ +import{j as bt,g as It}from"./vendor-DxpCibxB.js";function vt(yt){throw new Error('Could not dynamically require "'+yt+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var kt={exports:{}};/*! + +JSZip v3.10.1 - A JavaScript class for generating and reading zip files + + +(c) 2009-2016 Stuart Knightley +Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown. + +JSZip uses the library pako released under the MIT license : +https://github.com/nodeca/pako/blob/main/LICENSE +*/var zt;function Ot(){return zt||(zt=1,function(yt,Tt){(function(b){yt.exports=b()})(function(){return function b(U,k,l){function o(_,y){if(!k[_]){if(!U[_]){var p=typeof vt=="function"&&vt;if(!y&&p)return p(_,!0);if(n)return n(_,!0);var g=new Error("Cannot find module '"+_+"'");throw g.code="MODULE_NOT_FOUND",g}var i=k[_]={exports:{}};U[_][0].call(i.exports,function(d){var r=U[_][1][d];return o(r||d)},i,i.exports,b,U,k,l)}return k[_].exports}for(var n=typeof vt=="function"&&vt,u=0;u>2,i=(3&_)<<4|y>>4,d=1>6:64,r=2>4,y=(15&g)<<4|(i=n.indexOf(u.charAt(r++)))>>2,p=(3&i)<<6|(d=n.indexOf(u.charAt(r++))),c[h++]=_,i!==64&&(c[h++]=y),d!==64&&(c[h++]=p);return c}},{"./support":30,"./utils":32}],2:[function(b,U,k){var l=b("./external"),o=b("./stream/DataWorker"),n=b("./stream/Crc32Probe"),u=b("./stream/DataLengthProbe");function _(y,p,g,i,d){this.compressedSize=y,this.uncompressedSize=p,this.crc32=g,this.compression=i,this.compressedContent=d}_.prototype={getContentWorker:function(){var y=new o(l.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new u("data_length")),p=this;return y.on("end",function(){if(this.streamInfo.data_length!==p.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),y},getCompressedWorker:function(){return new o(l.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},_.createWorkerFrom=function(y,p,g){return y.pipe(new n).pipe(new u("uncompressedSize")).pipe(p.compressWorker(g)).pipe(new u("compressedSize")).withStreamInfo("compression",p)},U.exports=_},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(b,U,k){var l=b("./stream/GenericWorker");k.STORE={magic:"\0\0",compressWorker:function(){return new l("STORE compression")},uncompressWorker:function(){return new l("STORE decompression")}},k.DEFLATE=b("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(b,U,k){var l=b("./utils"),o=function(){for(var n,u=[],_=0;_<256;_++){n=_;for(var y=0;y<8;y++)n=1&n?3988292384^n>>>1:n>>>1;u[_]=n}return u}();U.exports=function(n,u){return n!==void 0&&n.length?l.getTypeOf(n)!=="string"?function(_,y,p,g){var i=o,d=g+p;_^=-1;for(var r=g;r>>8^i[255&(_^y[r])];return-1^_}(0|u,n,n.length,0):function(_,y,p,g){var i=o,d=g+p;_^=-1;for(var r=g;r>>8^i[255&(_^y.charCodeAt(r))];return-1^_}(0|u,n,n.length,0):0}},{"./utils":32}],5:[function(b,U,k){k.base64=!1,k.binary=!1,k.dir=!1,k.createFolders=!0,k.date=null,k.compression=null,k.compressionOptions=null,k.comment=null,k.unixPermissions=null,k.dosPermissions=null},{}],6:[function(b,U,k){var l=null;l=typeof Promise<"u"?Promise:b("lie"),U.exports={Promise:l}},{lie:37}],7:[function(b,U,k){var l=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",o=b("pako"),n=b("./utils"),u=b("./stream/GenericWorker"),_=l?"uint8array":"array";function y(p,g){u.call(this,"FlateWorker/"+p),this._pako=null,this._pakoAction=p,this._pakoOptions=g,this.meta={}}k.magic="\b\0",n.inherits(y,u),y.prototype.processChunk=function(p){this.meta=p.meta,this._pako===null&&this._createPako(),this._pako.push(n.transformTo(_,p.data),!1)},y.prototype.flush=function(){u.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},y.prototype.cleanUp=function(){u.prototype.cleanUp.call(this),this._pako=null},y.prototype._createPako=function(){this._pako=new o[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var p=this;this._pako.onData=function(g){p.push({data:g,meta:p.meta})}},k.compressWorker=function(p){return new y("Deflate",p)},k.uncompressWorker=function(){return new y("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(b,U,k){function l(i,d){var r,h="";for(r=0;r>>=8;return h}function o(i,d,r,h,a,c){var v,S,x=i.file,D=i.compression,O=c!==_.utf8encode,j=n.transformTo("string",c(x.name)),I=n.transformTo("string",_.utf8encode(x.name)),W=x.comment,q=n.transformTo("string",c(W)),m=n.transformTo("string",_.utf8encode(W)),B=I.length!==x.name.length,e=m.length!==W.length,T="",J="",P="",$=x.dir,L=x.date,V={crc32:0,compressedSize:0,uncompressedSize:0};d&&!r||(V.crc32=i.crc32,V.compressedSize=i.compressedSize,V.uncompressedSize=i.uncompressedSize);var E=0;d&&(E|=8),O||!B&&!e||(E|=2048);var C=0,X=0;$&&(C|=16),a==="UNIX"?(X=798,C|=function(H,nt){var ot=H;return H||(ot=nt?16893:33204),(65535&ot)<<16}(x.unixPermissions,$)):(X=20,C|=function(H){return 63&(H||0)}(x.dosPermissions)),v=L.getUTCHours(),v<<=6,v|=L.getUTCMinutes(),v<<=5,v|=L.getUTCSeconds()/2,S=L.getUTCFullYear()-1980,S<<=4,S|=L.getUTCMonth()+1,S<<=5,S|=L.getUTCDate(),B&&(J=l(1,1)+l(y(j),4)+I,T+="up"+l(J.length,2)+J),e&&(P=l(1,1)+l(y(q),4)+m,T+="uc"+l(P.length,2)+P);var G="";return G+=` +\0`,G+=l(E,2),G+=D.magic,G+=l(v,2),G+=l(S,2),G+=l(V.crc32,4),G+=l(V.compressedSize,4),G+=l(V.uncompressedSize,4),G+=l(j.length,2),G+=l(T.length,2),{fileRecord:p.LOCAL_FILE_HEADER+G+j+T,dirRecord:p.CENTRAL_FILE_HEADER+l(X,2)+G+l(q.length,2)+"\0\0\0\0"+l(C,4)+l(h,4)+j+T+q}}var n=b("../utils"),u=b("../stream/GenericWorker"),_=b("../utf8"),y=b("../crc32"),p=b("../signature");function g(i,d,r,h){u.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=d,this.zipPlatform=r,this.encodeFileName=h,this.streamFiles=i,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}n.inherits(g,u),g.prototype.push=function(i){var d=i.meta.percent||0,r=this.entriesCount,h=this._sources.length;this.accumulate?this.contentBuffer.push(i):(this.bytesWritten+=i.data.length,u.prototype.push.call(this,{data:i.data,meta:{currentFile:this.currentFile,percent:r?(d+100*(r-h-1))/r:100}}))},g.prototype.openedSource=function(i){this.currentSourceOffset=this.bytesWritten,this.currentFile=i.file.name;var d=this.streamFiles&&!i.file.dir;if(d){var r=o(i,d,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}})}else this.accumulate=!0},g.prototype.closedSource=function(i){this.accumulate=!1;var d=this.streamFiles&&!i.file.dir,r=o(i,d,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),d)this.push({data:function(h){return p.DATA_DESCRIPTOR+l(h.crc32,4)+l(h.compressedSize,4)+l(h.uncompressedSize,4)}(i),meta:{percent:100}});else for(this.push({data:r.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},g.prototype.flush=function(){for(var i=this.bytesWritten,d=0;d=this.index;u--)_=(_<<8)+this.byteAt(u);return this.index+=n,_},readString:function(n){return l.transformTo("string",this.readData(n))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var n=this.readInt(4);return new Date(Date.UTC(1980+(n>>25&127),(n>>21&15)-1,n>>16&31,n>>11&31,n>>5&63,(31&n)<<1))}},U.exports=o},{"../utils":32}],19:[function(b,U,k){var l=b("./Uint8ArrayReader");function o(n){l.call(this,n)}b("../utils").inherits(o,l),o.prototype.readData=function(n){this.checkOffset(n);var u=this.data.slice(this.zero+this.index,this.zero+this.index+n);return this.index+=n,u},U.exports=o},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(b,U,k){var l=b("./DataReader");function o(n){l.call(this,n)}b("../utils").inherits(o,l),o.prototype.byteAt=function(n){return this.data.charCodeAt(this.zero+n)},o.prototype.lastIndexOfSignature=function(n){return this.data.lastIndexOf(n)-this.zero},o.prototype.readAndCheckSignature=function(n){return n===this.readData(4)},o.prototype.readData=function(n){this.checkOffset(n);var u=this.data.slice(this.zero+this.index,this.zero+this.index+n);return this.index+=n,u},U.exports=o},{"../utils":32,"./DataReader":18}],21:[function(b,U,k){var l=b("./ArrayReader");function o(n){l.call(this,n)}b("../utils").inherits(o,l),o.prototype.readData=function(n){if(this.checkOffset(n),n===0)return new Uint8Array(0);var u=this.data.subarray(this.zero+this.index,this.zero+this.index+n);return this.index+=n,u},U.exports=o},{"../utils":32,"./ArrayReader":17}],22:[function(b,U,k){var l=b("../utils"),o=b("../support"),n=b("./ArrayReader"),u=b("./StringReader"),_=b("./NodeBufferReader"),y=b("./Uint8ArrayReader");U.exports=function(p){var g=l.getTypeOf(p);return l.checkSupport(g),g!=="string"||o.uint8array?g==="nodebuffer"?new _(p):o.uint8array?new y(l.transformTo("uint8array",p)):new n(l.transformTo("array",p)):new u(p)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(b,U,k){k.LOCAL_FILE_HEADER="PK",k.CENTRAL_FILE_HEADER="PK",k.CENTRAL_DIRECTORY_END="PK",k.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",k.ZIP64_CENTRAL_DIRECTORY_END="PK",k.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(b,U,k){var l=b("./GenericWorker"),o=b("../utils");function n(u){l.call(this,"ConvertWorker to "+u),this.destType=u}o.inherits(n,l),n.prototype.processChunk=function(u){this.push({data:o.transformTo(this.destType,u.data),meta:u.meta})},U.exports=n},{"../utils":32,"./GenericWorker":28}],25:[function(b,U,k){var l=b("./GenericWorker"),o=b("../crc32");function n(){l.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}b("../utils").inherits(n,l),n.prototype.processChunk=function(u){this.streamInfo.crc32=o(u.data,this.streamInfo.crc32||0),this.push(u)},U.exports=n},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(b,U,k){var l=b("../utils"),o=b("./GenericWorker");function n(u){o.call(this,"DataLengthProbe for "+u),this.propName=u,this.withStreamInfo(u,0)}l.inherits(n,o),n.prototype.processChunk=function(u){if(u){var _=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=_+u.data.length}o.prototype.processChunk.call(this,u)},U.exports=n},{"../utils":32,"./GenericWorker":28}],27:[function(b,U,k){var l=b("../utils"),o=b("./GenericWorker");function n(u){o.call(this,"DataWorker");var _=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,u.then(function(y){_.dataIsReady=!0,_.data=y,_.max=y&&y.length||0,_.type=l.getTypeOf(y),_.isPaused||_._tickAndRepeat()},function(y){_.error(y)})}l.inherits(n,o),n.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this.data=null},n.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,l.delay(this._tickAndRepeat,[],this)),!0)},n.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(l.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},n.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var u=null,_=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":u=this.data.substring(this.index,_);break;case"uint8array":u=this.data.subarray(this.index,_);break;case"array":case"nodebuffer":u=this.data.slice(this.index,_)}return this.index=_,this.push({data:u,meta:{percent:this.max?this.index/this.max*100:0}})},U.exports=n},{"../utils":32,"./GenericWorker":28}],28:[function(b,U,k){function l(o){this.name=o||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}l.prototype={push:function(o){this.emit("data",o)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(o){this.emit("error",o)}return!0},error:function(o){return!this.isFinished&&(this.isPaused?this.generatedError=o:(this.isFinished=!0,this.emit("error",o),this.previous&&this.previous.error(o),this.cleanUp()),!0)},on:function(o,n){return this._listeners[o].push(n),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(o,n){if(this._listeners[o])for(var u=0;u "+o:o}},U.exports=l},{}],29:[function(b,U,k){var l=b("../utils"),o=b("./ConvertWorker"),n=b("./GenericWorker"),u=b("../base64"),_=b("../support"),y=b("../external"),p=null;if(_.nodestream)try{p=b("../nodejs/NodejsStreamOutputAdapter")}catch{}function g(d,r){return new y.Promise(function(h,a){var c=[],v=d._internalType,S=d._outputType,x=d._mimeType;d.on("data",function(D,O){c.push(D),r&&r(O)}).on("error",function(D){c=[],a(D)}).on("end",function(){try{var D=function(O,j,I){switch(O){case"blob":return l.newBlob(l.transformTo("arraybuffer",j),I);case"base64":return u.encode(j);default:return l.transformTo(O,j)}}(S,function(O,j){var I,W=0,q=null,m=0;for(I=0;I"u")k.blob=!1;else{var l=new ArrayBuffer(0);try{k.blob=new Blob([l],{type:"application/zip"}).size===0}catch{try{var o=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);o.append(l),k.blob=o.getBlob("application/zip").size===0}catch{k.blob=!1}}}try{k.nodestream=!!b("readable-stream").Readable}catch{k.nodestream=!1}},{"readable-stream":16}],31:[function(b,U,k){for(var l=b("./utils"),o=b("./support"),n=b("./nodejsUtils"),u=b("./stream/GenericWorker"),_=new Array(256),y=0;y<256;y++)_[y]=252<=y?6:248<=y?5:240<=y?4:224<=y?3:192<=y?2:1;_[254]=_[254]=1;function p(){u.call(this,"utf-8 decode"),this.leftOver=null}function g(){u.call(this,"utf-8 encode")}k.utf8encode=function(i){return o.nodebuffer?n.newBufferFrom(i,"utf-8"):function(d){var r,h,a,c,v,S=d.length,x=0;for(c=0;c>>6:(h<65536?r[v++]=224|h>>>12:(r[v++]=240|h>>>18,r[v++]=128|h>>>12&63),r[v++]=128|h>>>6&63),r[v++]=128|63&h);return r}(i)},k.utf8decode=function(i){return o.nodebuffer?l.transformTo("nodebuffer",i).toString("utf-8"):function(d){var r,h,a,c,v=d.length,S=new Array(2*v);for(r=h=0;r>10&1023,S[h++]=56320|1023&a)}return S.length!==h&&(S.subarray?S=S.subarray(0,h):S.length=h),l.applyFromCharCode(S)}(i=l.transformTo(o.uint8array?"uint8array":"array",i))},l.inherits(p,u),p.prototype.processChunk=function(i){var d=l.transformTo(o.uint8array?"uint8array":"array",i.data);if(this.leftOver&&this.leftOver.length){if(o.uint8array){var r=d;(d=new Uint8Array(r.length+this.leftOver.length)).set(this.leftOver,0),d.set(r,this.leftOver.length)}else d=this.leftOver.concat(d);this.leftOver=null}var h=function(c,v){var S;for((v=v||c.length)>c.length&&(v=c.length),S=v-1;0<=S&&(192&c[S])==128;)S--;return S<0||S===0?v:S+_[c[S]]>v?S:v}(d),a=d;h!==d.length&&(o.uint8array?(a=d.subarray(0,h),this.leftOver=d.subarray(h,d.length)):(a=d.slice(0,h),this.leftOver=d.slice(h,d.length))),this.push({data:k.utf8decode(a),meta:i.meta})},p.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:k.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},k.Utf8DecodeWorker=p,l.inherits(g,u),g.prototype.processChunk=function(i){this.push({data:k.utf8encode(i.data),meta:i.meta})},k.Utf8EncodeWorker=g},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(b,U,k){var l=b("./support"),o=b("./base64"),n=b("./nodejsUtils"),u=b("./external");function _(r){return r}function y(r,h){for(var a=0;a>8;this.dir=!!(16&this.externalFileAttributes),i==0&&(this.dosPermissions=63&this.externalFileAttributes),i==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var i=l(this.extraFields[1].value);this.uncompressedSize===o.MAX_VALUE_32BITS&&(this.uncompressedSize=i.readInt(8)),this.compressedSize===o.MAX_VALUE_32BITS&&(this.compressedSize=i.readInt(8)),this.localHeaderOffset===o.MAX_VALUE_32BITS&&(this.localHeaderOffset=i.readInt(8)),this.diskNumberStart===o.MAX_VALUE_32BITS&&(this.diskNumberStart=i.readInt(4))}},readExtraFields:function(i){var d,r,h,a=i.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});i.index+4>>6:(i<65536?g[h++]=224|i>>>12:(g[h++]=240|i>>>18,g[h++]=128|i>>>12&63),g[h++]=128|i>>>6&63),g[h++]=128|63&i);return g},k.buf2binstring=function(p){return y(p,p.length)},k.binstring2buf=function(p){for(var g=new l.Buf8(p.length),i=0,d=g.length;i>10&1023,c[d++]=56320|1023&r)}return y(c,d)},k.utf8border=function(p,g){var i;for((g=g||p.length)>p.length&&(g=p.length),i=g-1;0<=i&&(192&p[i])==128;)i--;return i<0||i===0?g:i+u[p[i]]>g?i:g}},{"./common":41}],43:[function(b,U,k){U.exports=function(l,o,n,u){for(var _=65535&l|0,y=l>>>16&65535|0,p=0;n!==0;){for(n-=p=2e3>>1:o>>>1;n[u]=o}return n}();U.exports=function(o,n,u,_){var y=l,p=_+u;o^=-1;for(var g=_;g>>8^y[255&(o^n[g])];return-1^o}},{}],46:[function(b,U,k){var l,o=b("../utils/common"),n=b("./trees"),u=b("./adler32"),_=b("./crc32"),y=b("./messages"),p=0,g=4,i=0,d=-2,r=-1,h=4,a=2,c=8,v=9,S=286,x=30,D=19,O=2*S+1,j=15,I=3,W=258,q=W+I+1,m=42,B=113,e=1,T=2,J=3,P=4;function $(t,R){return t.msg=y[R],R}function L(t){return(t<<1)-(4t.avail_out&&(A=t.avail_out),A!==0&&(o.arraySet(t.output,R.pending_buf,R.pending_out,A,t.next_out),t.next_out+=A,R.pending_out+=A,t.total_out+=A,t.avail_out-=A,R.pending-=A,R.pending===0&&(R.pending_out=0))}function C(t,R){n._tr_flush_block(t,0<=t.block_start?t.block_start:-1,t.strstart-t.block_start,R),t.block_start=t.strstart,E(t.strm)}function X(t,R){t.pending_buf[t.pending++]=R}function G(t,R){t.pending_buf[t.pending++]=R>>>8&255,t.pending_buf[t.pending++]=255&R}function H(t,R){var A,f,s=t.max_chain_length,w=t.strstart,F=t.prev_length,N=t.nice_match,z=t.strstart>t.w_size-q?t.strstart-(t.w_size-q):0,Z=t.window,K=t.w_mask,M=t.prev,Y=t.strstart+W,rt=Z[w+F-1],tt=Z[w+F];t.prev_length>=t.good_match&&(s>>=2),N>t.lookahead&&(N=t.lookahead);do if(Z[(A=R)+F]===tt&&Z[A+F-1]===rt&&Z[A]===Z[w]&&Z[++A]===Z[w+1]){w+=2,A++;do;while(Z[++w]===Z[++A]&&Z[++w]===Z[++A]&&Z[++w]===Z[++A]&&Z[++w]===Z[++A]&&Z[++w]===Z[++A]&&Z[++w]===Z[++A]&&Z[++w]===Z[++A]&&Z[++w]===Z[++A]&&wz&&--s!=0);return F<=t.lookahead?F:t.lookahead}function nt(t){var R,A,f,s,w,F,N,z,Z,K,M=t.w_size;do{if(s=t.window_size-t.lookahead-t.strstart,t.strstart>=M+(M-q)){for(o.arraySet(t.window,t.window,M,M,0),t.match_start-=M,t.strstart-=M,t.block_start-=M,R=A=t.hash_size;f=t.head[--R],t.head[R]=M<=f?f-M:0,--A;);for(R=A=M;f=t.prev[--R],t.prev[R]=M<=f?f-M:0,--A;);s+=M}if(t.strm.avail_in===0)break;if(F=t.strm,N=t.window,z=t.strstart+t.lookahead,Z=s,K=void 0,K=F.avail_in,Z=I)for(w=t.strstart-t.insert,t.ins_h=t.window[w],t.ins_h=(t.ins_h<=I&&(t.ins_h=(t.ins_h<=I)if(f=n._tr_tally(t,t.strstart-t.match_start,t.match_length-I),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=I){for(t.match_length--;t.strstart++,t.ins_h=(t.ins_h<=I&&(t.ins_h=(t.ins_h<=I&&t.match_length<=t.prev_length){for(s=t.strstart+t.lookahead-I,f=n._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-I),t.lookahead-=t.prev_length-1,t.prev_length-=2;++t.strstart<=s&&(t.ins_h=(t.ins_h<t.pending_buf_size-5&&(A=t.pending_buf_size-5);;){if(t.lookahead<=1){if(nt(t),t.lookahead===0&&R===p)return e;if(t.lookahead===0)break}t.strstart+=t.lookahead,t.lookahead=0;var f=t.block_start+A;if((t.strstart===0||t.strstart>=f)&&(t.lookahead=t.strstart-f,t.strstart=f,C(t,!1),t.strm.avail_out===0)||t.strstart-t.block_start>=t.w_size-q&&(C(t,!1),t.strm.avail_out===0))return e}return t.insert=0,R===g?(C(t,!0),t.strm.avail_out===0?J:P):(t.strstart>t.block_start&&(C(t,!1),t.strm.avail_out),e)}),new et(4,4,8,4,ot),new et(4,5,16,8,ot),new et(4,6,32,32,ot),new et(4,4,16,16,Q),new et(8,16,32,32,Q),new et(8,16,128,128,Q),new et(8,32,128,256,Q),new et(32,128,258,1024,Q),new et(32,258,258,4096,Q)],k.deflateInit=function(t,R){return ht(t,R,c,15,8,0)},k.deflateInit2=ht,k.deflateReset=lt,k.deflateResetKeep=it,k.deflateSetHeader=function(t,R){return t&&t.state?t.state.wrap!==2?d:(t.state.gzhead=R,i):d},k.deflate=function(t,R){var A,f,s,w;if(!t||!t.state||5>8&255),X(f,f.gzhead.time>>16&255),X(f,f.gzhead.time>>24&255),X(f,f.level===9?2:2<=f.strategy||f.level<2?4:0),X(f,255&f.gzhead.os),f.gzhead.extra&&f.gzhead.extra.length&&(X(f,255&f.gzhead.extra.length),X(f,f.gzhead.extra.length>>8&255)),f.gzhead.hcrc&&(t.adler=_(t.adler,f.pending_buf,f.pending,0)),f.gzindex=0,f.status=69):(X(f,0),X(f,0),X(f,0),X(f,0),X(f,0),X(f,f.level===9?2:2<=f.strategy||f.level<2?4:0),X(f,3),f.status=B);else{var F=c+(f.w_bits-8<<4)<<8;F|=(2<=f.strategy||f.level<2?0:f.level<6?1:f.level===6?2:3)<<6,f.strstart!==0&&(F|=32),F+=31-F%31,f.status=B,G(f,F),f.strstart!==0&&(G(f,t.adler>>>16),G(f,65535&t.adler)),t.adler=1}if(f.status===69)if(f.gzhead.extra){for(s=f.pending;f.gzindex<(65535&f.gzhead.extra.length)&&(f.pending!==f.pending_buf_size||(f.gzhead.hcrc&&f.pending>s&&(t.adler=_(t.adler,f.pending_buf,f.pending-s,s)),E(t),s=f.pending,f.pending!==f.pending_buf_size));)X(f,255&f.gzhead.extra[f.gzindex]),f.gzindex++;f.gzhead.hcrc&&f.pending>s&&(t.adler=_(t.adler,f.pending_buf,f.pending-s,s)),f.gzindex===f.gzhead.extra.length&&(f.gzindex=0,f.status=73)}else f.status=73;if(f.status===73)if(f.gzhead.name){s=f.pending;do{if(f.pending===f.pending_buf_size&&(f.gzhead.hcrc&&f.pending>s&&(t.adler=_(t.adler,f.pending_buf,f.pending-s,s)),E(t),s=f.pending,f.pending===f.pending_buf_size)){w=1;break}w=f.gzindexs&&(t.adler=_(t.adler,f.pending_buf,f.pending-s,s)),w===0&&(f.gzindex=0,f.status=91)}else f.status=91;if(f.status===91)if(f.gzhead.comment){s=f.pending;do{if(f.pending===f.pending_buf_size&&(f.gzhead.hcrc&&f.pending>s&&(t.adler=_(t.adler,f.pending_buf,f.pending-s,s)),E(t),s=f.pending,f.pending===f.pending_buf_size)){w=1;break}w=f.gzindexs&&(t.adler=_(t.adler,f.pending_buf,f.pending-s,s)),w===0&&(f.status=103)}else f.status=103;if(f.status===103&&(f.gzhead.hcrc?(f.pending+2>f.pending_buf_size&&E(t),f.pending+2<=f.pending_buf_size&&(X(f,255&t.adler),X(f,t.adler>>8&255),t.adler=0,f.status=B)):f.status=B),f.pending!==0){if(E(t),t.avail_out===0)return f.last_flush=-1,i}else if(t.avail_in===0&&L(R)<=L(A)&&R!==g)return $(t,-5);if(f.status===666&&t.avail_in!==0)return $(t,-5);if(t.avail_in!==0||f.lookahead!==0||R!==p&&f.status!==666){var N=f.strategy===2?function(z,Z){for(var K;;){if(z.lookahead===0&&(nt(z),z.lookahead===0)){if(Z===p)return e;break}if(z.match_length=0,K=n._tr_tally(z,0,z.window[z.strstart]),z.lookahead--,z.strstart++,K&&(C(z,!1),z.strm.avail_out===0))return e}return z.insert=0,Z===g?(C(z,!0),z.strm.avail_out===0?J:P):z.last_lit&&(C(z,!1),z.strm.avail_out===0)?e:T}(f,R):f.strategy===3?function(z,Z){for(var K,M,Y,rt,tt=z.window;;){if(z.lookahead<=W){if(nt(z),z.lookahead<=W&&Z===p)return e;if(z.lookahead===0)break}if(z.match_length=0,z.lookahead>=I&&0z.lookahead&&(z.match_length=z.lookahead)}if(z.match_length>=I?(K=n._tr_tally(z,1,z.match_length-I),z.lookahead-=z.match_length,z.strstart+=z.match_length,z.match_length=0):(K=n._tr_tally(z,0,z.window[z.strstart]),z.lookahead--,z.strstart++),K&&(C(z,!1),z.strm.avail_out===0))return e}return z.insert=0,Z===g?(C(z,!0),z.strm.avail_out===0?J:P):z.last_lit&&(C(z,!1),z.strm.avail_out===0)?e:T}(f,R):l[f.level].func(f,R);if(N!==J&&N!==P||(f.status=666),N===e||N===J)return t.avail_out===0&&(f.last_flush=-1),i;if(N===T&&(R===1?n._tr_align(f):R!==5&&(n._tr_stored_block(f,0,0,!1),R===3&&(V(f.head),f.lookahead===0&&(f.strstart=0,f.block_start=0,f.insert=0))),E(t),t.avail_out===0))return f.last_flush=-1,i}return R!==g?i:f.wrap<=0?1:(f.wrap===2?(X(f,255&t.adler),X(f,t.adler>>8&255),X(f,t.adler>>16&255),X(f,t.adler>>24&255),X(f,255&t.total_in),X(f,t.total_in>>8&255),X(f,t.total_in>>16&255),X(f,t.total_in>>24&255)):(G(f,t.adler>>>16),G(f,65535&t.adler)),E(t),0=A.w_size&&(w===0&&(V(A.head),A.strstart=0,A.block_start=0,A.insert=0),Z=new o.Buf8(A.w_size),o.arraySet(Z,R,K-A.w_size,A.w_size,0),R=Z,K=A.w_size),F=t.avail_in,N=t.next_in,z=t.input,t.avail_in=K,t.next_in=0,t.input=R,nt(A);A.lookahead>=I;){for(f=A.strstart,s=A.lookahead-(I-1);A.ins_h=(A.ins_h<>>=I=j>>>24,v-=I,(I=j>>>16&255)===0)T[y++]=65535&j;else{if(!(16&I)){if((64&I)==0){j=S[(65535&j)+(c&(1<>>=I,v-=I),v<15&&(c+=e[u++]<>>=I=j>>>24,v-=I,!(16&(I=j>>>16&255))){if((64&I)==0){j=x[(65535&j)+(c&(1<>>=I,v-=I,(I=y-p)>3,c&=(1<<(v-=W<<3))-1,l.next_in=u,l.next_out=y,l.avail_in=u<_?_-u+5:5-(u-_),l.avail_out=y>>24&255)+(m>>>8&65280)+((65280&m)<<8)+((255&m)<<24)}function c(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new l.Buf16(320),this.work=new l.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function v(m){var B;return m&&m.state?(B=m.state,m.total_in=m.total_out=B.total=0,m.msg="",B.wrap&&(m.adler=1&B.wrap),B.mode=d,B.last=0,B.havedict=0,B.dmax=32768,B.head=null,B.hold=0,B.bits=0,B.lencode=B.lendyn=new l.Buf32(r),B.distcode=B.distdyn=new l.Buf32(h),B.sane=1,B.back=-1,g):i}function S(m){var B;return m&&m.state?((B=m.state).wsize=0,B.whave=0,B.wnext=0,v(m)):i}function x(m,B){var e,T;return m&&m.state?(T=m.state,B<0?(e=0,B=-B):(e=1+(B>>4),B<48&&(B&=15)),B&&(B<8||15=P.wsize?(l.arraySet(P.window,B,e-P.wsize,P.wsize,0),P.wnext=0,P.whave=P.wsize):(T<(J=P.wsize-P.wnext)&&(J=T),l.arraySet(P.window,B,e-T,J,P.wnext),(T-=J)?(l.arraySet(P.window,B,e-T,T,0),P.wnext=T,P.whave=P.wsize):(P.wnext+=J,P.wnext===P.wsize&&(P.wnext=0),P.whave>>8&255,e.check=n(e.check,w,2,0),C=E=0,e.mode=2;break}if(e.flags=0,e.head&&(e.head.done=!1),!(1&e.wrap)||(((255&E)<<8)+(E>>8))%31){m.msg="incorrect header check",e.mode=30;break}if((15&E)!=8){m.msg="unknown compression method",e.mode=30;break}if(C-=4,t=8+(15&(E>>>=4)),e.wbits===0)e.wbits=t;else if(t>e.wbits){m.msg="invalid window size",e.mode=30;break}e.dmax=1<>8&1),512&e.flags&&(w[0]=255&E,w[1]=E>>>8&255,e.check=n(e.check,w,2,0)),C=E=0,e.mode=3;case 3:for(;C<32;){if(L===0)break t;L--,E+=T[P++]<>>8&255,w[2]=E>>>16&255,w[3]=E>>>24&255,e.check=n(e.check,w,4,0)),C=E=0,e.mode=4;case 4:for(;C<16;){if(L===0)break t;L--,E+=T[P++]<>8),512&e.flags&&(w[0]=255&E,w[1]=E>>>8&255,e.check=n(e.check,w,2,0)),C=E=0,e.mode=5;case 5:if(1024&e.flags){for(;C<16;){if(L===0)break t;L--,E+=T[P++]<>>8&255,e.check=n(e.check,w,2,0)),C=E=0}else e.head&&(e.head.extra=null);e.mode=6;case 6:if(1024&e.flags&&(L<(H=e.length)&&(H=L),H&&(e.head&&(t=e.head.extra_len-e.length,e.head.extra||(e.head.extra=new Array(e.head.extra_len)),l.arraySet(e.head.extra,T,P,H,t)),512&e.flags&&(e.check=n(e.check,T,H,P)),L-=H,P+=H,e.length-=H),e.length))break t;e.length=0,e.mode=7;case 7:if(2048&e.flags){if(L===0)break t;for(H=0;t=T[P+H++],e.head&&t&&e.length<65536&&(e.head.name+=String.fromCharCode(t)),t&&H>9&1,e.head.done=!0),m.adler=e.check=0,e.mode=12;break;case 10:for(;C<32;){if(L===0)break t;L--,E+=T[P++]<>>=7&C,C-=7&C,e.mode=27;break}for(;C<3;){if(L===0)break t;L--,E+=T[P++]<>>=1)){case 0:e.mode=14;break;case 1:if(W(e),e.mode=20,B!==6)break;E>>>=2,C-=2;break t;case 2:e.mode=17;break;case 3:m.msg="invalid block type",e.mode=30}E>>>=2,C-=2;break;case 14:for(E>>>=7&C,C-=7&C;C<32;){if(L===0)break t;L--,E+=T[P++]<>>16^65535)){m.msg="invalid stored block lengths",e.mode=30;break}if(e.length=65535&E,C=E=0,e.mode=15,B===6)break t;case 15:e.mode=16;case 16:if(H=e.length){if(L>>=5,C-=5,e.ndist=1+(31&E),E>>>=5,C-=5,e.ncode=4+(15&E),E>>>=4,C-=4,286>>=3,C-=3}for(;e.have<19;)e.lens[F[e.have++]]=0;if(e.lencode=e.lendyn,e.lenbits=7,A={bits:e.lenbits},R=_(0,e.lens,0,19,e.lencode,0,e.work,A),e.lenbits=A.bits,R){m.msg="invalid code lengths set",e.mode=30;break}e.have=0,e.mode=19;case 19:for(;e.have>>16&255,st=65535&s,!((Q=s>>>24)<=C);){if(L===0)break t;L--,E+=T[P++]<>>=Q,C-=Q,e.lens[e.have++]=st;else{if(st===16){for(f=Q+2;C>>=Q,C-=Q,e.have===0){m.msg="invalid bit length repeat",e.mode=30;break}t=e.lens[e.have-1],H=3+(3&E),E>>>=2,C-=2}else if(st===17){for(f=Q+3;C>>=Q)),E>>>=3,C-=3}else{for(f=Q+7;C>>=Q)),E>>>=7,C-=7}if(e.have+H>e.nlen+e.ndist){m.msg="invalid bit length repeat",e.mode=30;break}for(;H--;)e.lens[e.have++]=t}}if(e.mode===30)break;if(e.lens[256]===0){m.msg="invalid code -- missing end-of-block",e.mode=30;break}if(e.lenbits=9,A={bits:e.lenbits},R=_(y,e.lens,0,e.nlen,e.lencode,0,e.work,A),e.lenbits=A.bits,R){m.msg="invalid literal/lengths set",e.mode=30;break}if(e.distbits=6,e.distcode=e.distdyn,A={bits:e.distbits},R=_(p,e.lens,e.nlen,e.ndist,e.distcode,0,e.work,A),e.distbits=A.bits,R){m.msg="invalid distances set",e.mode=30;break}if(e.mode=20,B===6)break t;case 20:e.mode=21;case 21:if(6<=L&&258<=V){m.next_out=$,m.avail_out=V,m.next_in=P,m.avail_in=L,e.hold=E,e.bits=C,u(m,G),$=m.next_out,J=m.output,V=m.avail_out,P=m.next_in,T=m.input,L=m.avail_in,E=e.hold,C=e.bits,e.mode===12&&(e.back=-1);break}for(e.back=0;et=(s=e.lencode[E&(1<>>16&255,st=65535&s,!((Q=s>>>24)<=C);){if(L===0)break t;L--,E+=T[P++]<>it)])>>>16&255,st=65535&s,!(it+(Q=s>>>24)<=C);){if(L===0)break t;L--,E+=T[P++]<>>=it,C-=it,e.back+=it}if(E>>>=Q,C-=Q,e.back+=Q,e.length=st,et===0){e.mode=26;break}if(32&et){e.back=-1,e.mode=12;break}if(64&et){m.msg="invalid literal/length code",e.mode=30;break}e.extra=15&et,e.mode=22;case 22:if(e.extra){for(f=e.extra;C>>=e.extra,C-=e.extra,e.back+=e.extra}e.was=e.length,e.mode=23;case 23:for(;et=(s=e.distcode[E&(1<>>16&255,st=65535&s,!((Q=s>>>24)<=C);){if(L===0)break t;L--,E+=T[P++]<>it)])>>>16&255,st=65535&s,!(it+(Q=s>>>24)<=C);){if(L===0)break t;L--,E+=T[P++]<>>=it,C-=it,e.back+=it}if(E>>>=Q,C-=Q,e.back+=Q,64&et){m.msg="invalid distance code",e.mode=30;break}e.offset=st,e.extra=15&et,e.mode=24;case 24:if(e.extra){for(f=e.extra;C>>=e.extra,C-=e.extra,e.back+=e.extra}if(e.offset>e.dmax){m.msg="invalid distance too far back",e.mode=30;break}e.mode=25;case 25:if(V===0)break t;if(H=G-V,e.offset>H){if((H=e.offset-H)>e.whave&&e.sane){m.msg="invalid distance too far back",e.mode=30;break}nt=H>e.wnext?(H-=e.wnext,e.wsize-H):e.wnext-H,H>e.length&&(H=e.length),ot=e.window}else ot=J,nt=$-e.offset,H=e.length;for(VO?(I=nt[ot+h[B]],C[X+h[B]]):(I=96,0),c=1<>$)+(v-=c)]=j<<24|I<<16|W|0,v!==0;);for(c=1<>=1;if(c!==0?(E&=c-1,E+=c):E=0,B++,--G[m]==0){if(m===T)break;m=p[g+h[B]]}if(J>>7)]}function X(s,w){s.pending_buf[s.pending++]=255&w,s.pending_buf[s.pending++]=w>>>8&255}function G(s,w,F){s.bi_valid>a-F?(s.bi_buf|=w<>a-s.bi_valid,s.bi_valid+=F-a):(s.bi_buf|=w<>>=1,F<<=1,0<--w;);return F>>>1}function ot(s,w,F){var N,z,Z=new Array(h+1),K=0;for(N=1;N<=h;N++)Z[N]=K=K+F[N-1]<<1;for(z=0;z<=w;z++){var M=s[2*z+1];M!==0&&(s[2*z]=nt(Z[M]++,M))}}function Q(s){var w;for(w=0;w>1;1<=F;F--)it(s,Z,F);for(z=Y;F=s.heap[1],s.heap[1]=s.heap[s.heap_len--],it(s,Z,1),N=s.heap[1],s.heap[--s.heap_max]=F,s.heap[--s.heap_max]=N,Z[2*z]=Z[2*F]+Z[2*N],s.depth[z]=(s.depth[F]>=s.depth[N]?s.depth[F]:s.depth[N])+1,Z[2*F+1]=Z[2*N+1]=z,s.heap[1]=z++,it(s,Z,1),2<=s.heap_len;);s.heap[--s.heap_max]=s.heap[1],function(tt,ut){var ct,ft,pt,at,_t,wt,dt=ut.dyn_tree,xt=ut.max_code,Ct=ut.stat_desc.static_tree,Et=ut.stat_desc.has_stree,At=ut.stat_desc.extra_bits,St=ut.stat_desc.extra_base,mt=ut.stat_desc.max_length,gt=0;for(at=0;at<=h;at++)tt.bl_count[at]=0;for(dt[2*tt.heap[tt.heap_max]+1]=0,ct=tt.heap_max+1;ct>=7;z>>=1)if(1&rt&&M.dyn_ltree[2*Y]!==0)return o;if(M.dyn_ltree[18]!==0||M.dyn_ltree[20]!==0||M.dyn_ltree[26]!==0)return n;for(Y=32;Y>>3,(Z=s.static_len+3+7>>>3)<=z&&(z=Z)):z=Z=F+5,F+4<=z&&w!==-1?f(s,w,F,N):s.strategy===4||Z===z?(G(s,2+(N?1:0),3),lt(s,q,m)):(G(s,4+(N?1:0),3),function(M,Y,rt,tt){var ut;for(G(M,Y-257,5),G(M,rt-1,5),G(M,tt-4,4),ut=0;ut>>8&255,s.pending_buf[s.d_buf+2*s.last_lit+1]=255&w,s.pending_buf[s.l_buf+s.last_lit]=255&F,s.last_lit++,w===0?s.dyn_ltree[2*F]++:(s.matches++,w--,s.dyn_ltree[2*(e[F]+p+1)]++,s.dyn_dtree[2*C(w)]++),s.last_lit===s.lit_bufsize-1},k._tr_align=function(s){G(s,2,3),H(s,v,q),function(w){w.bi_valid===16?(X(w,w.bi_buf),w.bi_buf=0,w.bi_valid=0):8<=w.bi_valid&&(w.pending_buf[w.pending++]=255&w.bi_buf,w.bi_buf>>=8,w.bi_valid-=8)}(s)}},{"../utils/common":41}],53:[function(b,U,k){U.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(b,U,k){(function(l){(function(o,n){if(!o.setImmediate){var u,_,y,p,g=1,i={},d=!1,r=o.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(o);h=h&&h.setTimeout?h:o,u={}.toString.call(o.process)==="[object process]"?function(S){process.nextTick(function(){c(S)})}:function(){if(o.postMessage&&!o.importScripts){var S=!0,x=o.onmessage;return o.onmessage=function(){S=!1},o.postMessage("","*"),o.onmessage=x,S}}()?(p="setImmediate$"+Math.random()+"$",o.addEventListener?o.addEventListener("message",v,!1):o.attachEvent("onmessage",v),function(S){o.postMessage(p+S,"*")}):o.MessageChannel?((y=new MessageChannel).port1.onmessage=function(S){c(S.data)},function(S){y.port2.postMessage(S)}):r&&"onreadystatechange"in r.createElement("script")?(_=r.documentElement,function(S){var x=r.createElement("script");x.onreadystatechange=function(){c(S),x.onreadystatechange=null,_.removeChild(x),x=null},_.appendChild(x)}):function(S){setTimeout(c,0,S)},h.setImmediate=function(S){typeof S!="function"&&(S=new Function(""+S));for(var x=new Array(arguments.length-1),D=0;D"u"?l===void 0?this:l:self)}).call(this,typeof bt<"u"?bt:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})}(kt)),kt.exports}var Bt=Ot();const Rt=It(Bt),Ft=Object.freeze(Object.defineProperty({__proto__:null,default:Rt},Symbol.toStringTag,{value:"Module"}));export{Ft as j}; diff --git a/py_backend/static/index.html b/py_backend/static/index.html index 40e5a2e604484cc8a991432627f90af747c93b09..513c706f7fe0dee59e399fbad220301c26cc0ec4 100644 --- a/py_backend/static/index.html +++ b/py_backend/static/index.html @@ -35,10 +35,10 @@ }); } - - - - + + + +