@qratilabs/qrati-connect 2.5.0 → 2.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/element/{AuthLayout-EC2U3nsK.js → AuthLayout-IGFGeMq5.js} +1 -1
- package/element/{ContentsPage-BGtOyWxg.js → ContentsPage-Bu42OF-F.js} +1 -1
- package/element/{CuratePage-BLa771HN.js → CuratePage-CBMluidb.js} +1 -1
- package/element/{Dialog-D3m_eBiJ.js → Dialog-DVSvxBn8.js} +1 -1
- package/element/{DotLottiePlayer-FgGW1IR7.js → DotLottiePlayer-DHVhIw5H.js} +1 -1
- package/element/{EventHeaderAdminButtons-CW2SupWX.js → EventHeaderAdminButtons-zE3NbEUA.js} +1 -1
- package/element/{FolderBreadcrumb-CUpIfUTx.js → FolderBreadcrumb-1w72I1FP.js} +1 -1
- package/element/{ForgotPasswordPage-Cd0Oj-RE.js → ForgotPasswordPage-CIw8RrkZ.js} +1 -1
- package/element/{InputField-B_y35j-5.js → InputField-XP30segE.js} +1 -1
- package/element/{LazyLoadImage-CQL8-B3z.js → LazyLoadImage-n94OUygV.js} +1 -1
- package/element/{LeaderboardPage-BRBrFWpp.js → LeaderboardPage-CGuP207i.js} +1 -1
- package/element/{LoginPage-Ba9HTjV1.js → LoginPage-B15CMpYe.js} +1 -1
- package/element/{NCMVHL6D-CCAMoHuQ.js → NCMVHL6D-D_O5jdHL.js} +1 -1
- package/element/{PublicEvents-CddoYNW6.js → PublicEvents-DOp9N4xU.js} +1 -1
- package/element/{RegisterPage-DZGdPdu_.js → RegisterPage-D-6uVKjj.js} +1 -1
- package/element/{SocialLoginButton-BSK0uHQy.js → SocialLoginButton-BuZ03WV-.js} +1 -1
- package/element/{UploadPage-6k9f8u8c.js → UploadPage-Dhjmh06j.js} +1 -1
- package/element/{VideoPlayer-B6NcsNiP.js → VideoPlayer-cWSLl4fO.js} +1 -1
- package/element/element.es.js +1 -1
- package/element/{heic2any-JTWseCtt.js → heic2any-Dui1sz1X.js} +1 -1
- package/element/{index-Dq8XMn-B.js → index-DsN-W6V_.js} +1 -1
- package/element/{index-jVkC2DYJ.js → index-jzNVBihK.js} +1 -1
- package/element/{index.esm-mRBXJrk0.js → index.esm-CsbPHPGO.js} +1 -1
- package/element/{photoswipe-BdJR2C9a.js → photoswipe-5mcef1lI.js} +1 -1
- package/element/styles.css +1 -1
- package/element/{tslib.es6-CT89L4O4.js → tslib.es6-Dp_1P0Dk.js} +1 -1
- package/element/{useOrgAccess-DHToEbG_.js → useOrgAccess-B1cbGHT_.js} +1 -1
- package/element/web.es.js +1 -1
- package/package.json +1 -1
- package/react/{DPgWGmoG.js → 6xRxF6pz.js} +1 -1
- package/react/{BEzP8sbl.js → BZvhXg2G.js} +1 -1
- package/react/{BDeLdfbp.js → BaA7RHRf.js} +1 -1
- package/react/{CImTSnHg.js → Bebe5T7J.js} +1 -1
- package/react/{B5w5BP6w.js → C565I04Q.js} +1 -1
- package/react/{DPeVo4aL.js → CE-MbwCB.js} +1 -1
- package/react/{DH_wlDkr.js → CIlaT7eJ.js} +1 -1
- package/react/{JfRXqbqu.js → CS7icy9d.js} +1 -1
- package/react/{BUZq1uY0.js → Cp86U6va.js} +1 -1
- package/react/{LF1Cet66.js → Cv7EiFQU.js} +1 -1
- package/react/{eUvYQTPt.js → D1emifDo.js} +1 -1
- package/react/{BwHqpHe9.js → DPtqYlwJ.js} +1 -1
- package/react/{DcQdnYr8.js → DS2UD7gV.js} +1 -1
- package/react/{CYoLgOTC.js → DZitaH5o.js} +1 -1
- package/react/{CQHQocew.js → DjmC7CGh.js} +1 -1
- package/react/{BYYb8zAx.js → DwNWOPAY.js} +1 -1
- package/react/{6z8qI7He.js → Dyk2_V8r.js} +1 -1
- package/react/{CldWPPzn.js → LMErjmPc.js} +1 -1
- package/react/{BeDQQM0T.js → VOx0knsi.js} +1 -1
- package/react/{C-Ri1Eh9.js → W8TabW9M.js} +1 -1
- package/react/{CtX-oYOP.js → cWB0y40v.js} +1 -1
- package/react/index.es.js +1 -1
- package/react/{U9LCogz5.js → jM4FWKDA.js} +1 -1
- package/react/styles.css +1 -1
- package/react/{D464cx8y.js → vmkon26e.js} +1 -1
- package/umd/web.umd.js +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{L as t,a as e,Z as n,j as i,y as r,c as o,_ as a,$ as s,d as c,e as l,u as p,M as u,k as d,l as f,a0 as m,E as h,S as g,i as v,N as x,P as y,T as b,h as w,O as A,a1 as S,a2 as C}from"./index-Dq8XMn-B.js";import{r as P}from"./index-BEtvIXWu.js";import{_ as k}from"./tslib.es6-CT89L4O4.js";import{d as T,E}from"./EventHeaderAdminButtons-CW2SupWX.js";import{V as I}from"./VideoPlayer-B6NcsNiP.js";const M=[];for(let t=0;t<256;++t)M.push((t+256).toString(16).slice(1));let j;const D=new Uint8Array(16);const F={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function U(t,e,n){const i=(t=t||{}).random??t.rng?.()??function(){if(!j){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");j=crypto.getRandomValues.bind(crypto)}return j(D)}();if(i.length<16)throw new Error("Random bytes length must be >= 16");return i[6]=15&i[6]|64,i[8]=63&i[8]|128,function(t,e=0){return(M[t[e+0]]+M[t[e+1]]+M[t[e+2]]+M[t[e+3]]+"-"+M[t[e+4]]+M[t[e+5]]+"-"+M[t[e+6]]+M[t[e+7]]+"-"+M[t[e+8]]+M[t[e+9]]+"-"+M[t[e+10]]+M[t[e+11]]+M[t[e+12]]+M[t[e+13]]+M[t[e+14]]+M[t[e+15]]).toLowerCase()}(i)}function R(t,e,n){return F.randomUUID&&!t?F.randomUUID():U(t)}const O=Object.prototype.hasOwnProperty;class L extends Event{constructor(t,e){super(t),this.detail=e}}class N extends EventTarget{constructor(t={}){super();const{concurrency:e=1/0,timeout:n=0,autostart:i=!1,results:r=null}=t;this.concurrency=e,this.timeout=n,this.autostart=i,this.results=r,this.pending=0,this.session=0,this.running=!1,this.jobs=[],this.timers=[],this.addEventListener("error",this._errorHandler)}_errorHandler(t){this.end(t.detail.error)}pop(){return this.jobs.pop()}shift(){return this.jobs.shift()}indexOf(t,e){return this.jobs.indexOf(t,e)}lastIndexOf(t,e){return void 0!==e?this.jobs.lastIndexOf(t,e):this.jobs.lastIndexOf(t)}slice(t,e){return this.jobs=this.jobs.slice(t,e),this}reverse(){return this.jobs.reverse(),this}push(...t){const e=this.jobs.push(...t);return this.autostart&&this._start(),e}unshift(...t){const e=this.jobs.unshift(...t);return this.autostart&&this._start(),e}splice(t,e,...n){return this.jobs.splice(t,e,...n),this.autostart&&this._start(),this}get length(){return this.pending+this.jobs.length}start(t){if(this.running)throw new Error("already started");let e;return t?this._addCallbackToEndEvent(t):e=this._createPromiseToEndEvent(),this._start(),e}_start(){if(this.running=!0,this.pending>=this.concurrency)return;if(0===this.jobs.length)return void(0===this.pending&&this.done());const t=this.jobs.shift(),e=this.session,n=void 0!==t&&O.call(t,"timeout")?t.timeout:this.timeout;let i=!0,r=null,o=!1,a=null;const s=(n,...s)=>{i&&this.session===e&&(i=!1,this.pending--,null!==r&&(this.timers=this.timers.filter(t=>t!==r),clearTimeout(r)),n?this.dispatchEvent(new L("error",{error:n,job:t})):o||(null!==a&&null!==this.results&&(this.results[a]=[...s]),this.dispatchEvent(new L("success",{result:[...s],job:t}))),this.session===e&&(0===this.pending&&0===this.jobs.length?this.done():this.running&&this._start()))};n&&(r=setTimeout(()=>{o=!0,this.dispatchEvent(new L("timeout",{next:s,job:t})),s()},n),this.timers.push(r)),null!=this.results&&(a=this.results.length,this.results[a]=null),this.pending++,this.dispatchEvent(new L("start",{job:t})),t.promise=t(s),void 0!==t.promise&&"function"==typeof t.promise.then&&t.promise.then(function(t){return s(void 0,t)}).catch(function(t){return s(t||!0)}),this.running&&this.jobs.length>0&&this._start()}stop(){this.running=!1}end(t){this.clearTimers(),this.jobs.length=0,this.pending=0,this.done(t)}clearTimers(){this.timers.forEach(t=>{clearTimeout(t)}),this.timers=[]}_addCallbackToEndEvent(t){const e=n=>{this.removeEventListener("end",e),t(n.detail.error,this.results)};this.addEventListener("end",e)}_createPromiseToEndEvent(){return new Promise((t,e)=>{this._addCallbackToEndEvent((n,i)=>{n?e(n):t(i)})})}done(t){this.session++,this.running=!1,this.dispatchEvent(new L("end",{error:t}))}}const B=t(P()),V=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function q(t,e,n){const i=function(t){const{name:e}=t;if(e&&-1!==e.lastIndexOf(".")&&!t.type){const n=e.split(".").pop().toLowerCase(),i=V.get(n);i&&Object.defineProperty(t,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return t}(t),{webkitRelativePath:r}=t,o="string"==typeof e?e:"string"==typeof r&&r.length>0?r:`./${t.name}`;return"string"!=typeof i.path&&z(i,"path",o),z(i,"relativePath",o),i}function z(t,e,n){Object.defineProperty(t,e,{value:n,writable:!1,configurable:!1,enumerable:!0})}const _=[".DS_Store","Thumbs.db"];function G(t){return"object"==typeof t&&null!==t}function $(t){return t.filter(t=>-1===_.indexOf(t.name))}function H(t){if(null===t)return[];const e=[];for(let n=0;n<t.length;n++){const i=t[n];e.push(i)}return e}function W(t){if("function"!=typeof t.webkitGetAsEntry)return Y(t);const e=t.webkitGetAsEntry();return e&&e.isDirectory?Z(e):Y(t,e)}function X(t){return t.reduce((t,e)=>[...t,...Array.isArray(e)?X(e):[e]],[])}function Y(t,e){return k(this,void 0,void 0,function*(){var n;if(globalThis.isSecureContext&&"function"==typeof t.getAsFileSystemHandle){const e=yield t.getAsFileSystemHandle();if(null===e)throw new Error(`${t} is not a File`);if(void 0!==e){const t=yield e.getFile();return t.handle=e,q(t)}}const i=t.getAsFile();if(!i)throw new Error(`${t} is not a File`);return q(i,null!==(n=e?.fullPath)&&void 0!==n?n:void 0)})}function K(t){return k(this,void 0,void 0,function*(){return t.isDirectory?Z(t):function(t){return k(this,void 0,void 0,function*(){return new Promise((e,n)=>{t.file(n=>{const i=q(n,t.fullPath);e(i)},t=>{n(t)})})})}(t)})}function Z(t){const e=t.createReader();return new Promise((t,n)=>{const i=[];!function r(){e.readEntries(e=>k(this,void 0,void 0,function*(){if(e.length){const t=Promise.all(e.map(K));i.push(t),r()}else try{const e=yield Promise.all(i);t(e)}catch(t){n(t)}}),t=>{n(t)})}()})}var Q,J={};var tt=(Q||(Q=1,J.__esModule=!0,J.default=function(t,e){if(t&&e){var n=Array.isArray(e)?e:e.split(",");if(0===n.length)return!0;var i=t.name||"",r=(t.type||"").toLowerCase(),o=r.replace(/\/.*$/,"");return n.some(function(t){var e=t.trim().toLowerCase();return"."===e.charAt(0)?i.toLowerCase().endsWith(e):e.endsWith("/*")?o===e.replace(/\/.*$/,""):r===e})}return!0}),J);const et=t(tt);function nt(t){return function(t){if(Array.isArray(t))return ct(t)}(t)||function(t){if(typeof Symbol<"u"&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||st(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function it(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function rt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?it(Object(n),!0).forEach(function(e){ot(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):it(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function ot(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function at(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,r,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(i=n.next()).done)&&(o.push(i.value),!e||o.length!==e);a=!0);}catch(t){s=!0,r=t}finally{try{!a&&null!=n.return&&n.return()}finally{if(s)throw r}}return o}}(t,e)||st(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function st(t,e){if(t){if("string"==typeof t)return ct(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ct(t,e)}}function ct(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var lt="function"==typeof et?et:et.default,pt=function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split(","),e=t.length>1?"one of ".concat(t.join(", ")):t[0];return{code:"file-invalid-type",message:"File type must be ".concat(e)}},ut=function(t){return{code:"file-too-large",message:"File is larger than ".concat(t," ").concat(1===t?"byte":"bytes")}},dt=function(t){return{code:"file-too-small",message:"File is smaller than ".concat(t," ").concat(1===t?"byte":"bytes")}},ft={code:"too-many-files",message:"Too many files"};function mt(t,e){var n="application/x-moz-file"===t.type||lt(t,e);return[n,n?null:pt(e)]}function ht(t,e,n){if(gt(t.size))if(gt(e)&>(n)){if(t.size>n)return[!1,ut(n)];if(t.size<e)return[!1,dt(e)]}else{if(gt(e)&&t.size<e)return[!1,dt(e)];if(gt(n)&&t.size>n)return[!1,ut(n)]}return[!0,null]}function gt(t){return null!=t}function vt(t){return"function"==typeof t.isPropagationStopped?t.isPropagationStopped():typeof t.cancelBubble<"u"&&t.cancelBubble}function xt(t){return t.dataTransfer?Array.prototype.some.call(t.dataTransfer.types,function(t){return"Files"===t||"application/x-moz-file"===t}):!!t.target&&!!t.target.files}function yt(t){t.preventDefault()}function bt(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return e.some(function(e){return!vt(t)&&e&&e.apply(void 0,[t].concat(i)),vt(t)})}}function wt(t){return"audio/*"===t||"video/*"===t||"image/*"===t||"text/*"===t||"application/*"===t||/\w+\/[-+.\w]+/g.test(t)}function At(t){return/^.*\.[\w]+$/.test(t)}var St=["children"],Ct=["open"],Pt=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],kt=["refKey","onChange","onClick"];function Tt(t){return function(t){if(Array.isArray(t))return Mt(t)}(t)||function(t){if(typeof Symbol<"u"&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||It(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Et(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,r,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(i=n.next()).done)&&(o.push(i.value),!e||o.length!==e);a=!0);}catch(t){s=!0,r=t}finally{try{!a&&null!=n.return&&n.return()}finally{if(s)throw r}}return o}}(t,e)||It(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function It(t,e){if(t){if("string"==typeof t)return Mt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Mt(t,e)}}function Mt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function jt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function Dt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?jt(Object(n),!0).forEach(function(e){Ft(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):jt(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Ft(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ut(t,e){if(null==t)return{};var n,i,r=function(t,e){if(null==t)return{};var n,i,r={},o=Object.keys(t);for(i=0;i<o.length;i++)n=o[i],!(e.indexOf(n)>=0)&&(r[n]=t[n]);return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)n=o[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}var Rt=e.forwardRef(function(t,i){var r=t.children,o=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=Dt(Dt({},Ot),t),i=n.accept,r=n.disabled,o=n.getFilesFromEvent,a=n.maxSize,s=n.minSize,c=n.multiple,l=n.maxFiles,p=n.onDragEnter,u=n.onDragLeave,d=n.onDragOver,f=n.onDrop,m=n.onDropAccepted,h=n.onDropRejected,g=n.onFileDialogCancel,v=n.onFileDialogOpen,x=n.useFsAccessApi,y=n.autoFocus,b=n.preventDropOnDocument,w=n.noClick,A=n.noKeyboard,S=n.noDrag,C=n.noDragEventsBubbling,P=n.onError,k=n.validator,T=e.useMemo(function(){return function(t){if(gt(t))return Object.entries(t).reduce(function(t,e){var n=at(e,2),i=n[0],r=n[1];return[].concat(nt(t),[i],nt(r))},[]).filter(function(t){return wt(t)||At(t)}).join(",")}(i)},[i]),E=e.useMemo(function(){return function(t){return gt(t)?[{description:"Files",accept:Object.entries(t).filter(function(t){var e=at(t,2),n=e[0],i=e[1],r=!0;return wt(n)||(console.warn('Skipped "'.concat(n,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),r=!1),(!Array.isArray(i)||!i.every(At))&&(console.warn('Skipped "'.concat(n,'" because an invalid file extension was provided.')),r=!1),r}).reduce(function(t,e){var n=at(e,2),i=n[0],r=n[1];return rt(rt({},t),{},ot({},i,r))},{})}]:t}(i)},[i]),I=e.useMemo(function(){return"function"==typeof v?v:Bt},[v]),M=e.useMemo(function(){return"function"==typeof g?g:Bt},[g]),j=e.useRef(null),D=e.useRef(null),F=Et(e.useReducer(Nt,Lt),2),U=F[0],R=F[1],O=U.isFocused,L=U.isFileDialogActive,N=e.useRef(typeof window<"u"&&window.isSecureContext&&x&&"showOpenFilePicker"in window),B=function(){!N.current&&L&&setTimeout(function(){D.current&&(D.current.files.length||(R({type:"closeDialog"}),M()))},300)};e.useEffect(function(){return window.addEventListener("focus",B,!1),function(){window.removeEventListener("focus",B,!1)}},[D,L,M,N]);var V=e.useRef([]),q=function(t){j.current&&j.current.contains(t.target)||(t.preventDefault(),V.current=[])};e.useEffect(function(){return b&&(document.addEventListener("dragover",yt,!1),document.addEventListener("drop",q,!1)),function(){b&&(document.removeEventListener("dragover",yt),document.removeEventListener("drop",q))}},[j,b]),e.useEffect(function(){return!r&&y&&j.current&&j.current.focus(),function(){}},[j,y,r]);var z=e.useCallback(function(t){P?P(t):console.error(t)},[P]),_=e.useCallback(function(t){t.preventDefault(),t.persist(),it(t),V.current=[].concat(Tt(V.current),[t.target]),xt(t)&&Promise.resolve(o(t)).then(function(e){if(!vt(t)||C){var n=e.length,i=n>0&&function(t){var e=t.files,n=t.accept,i=t.minSize,r=t.maxSize,o=t.multiple,a=t.maxFiles,s=t.validator;return!(!o&&e.length>1||o&&a>=1&&e.length>a)&&e.every(function(t){var e=at(mt(t,n),1)[0],o=at(ht(t,i,r),1)[0],a=s?s(t):null;return e&&o&&!a})}({files:e,accept:T,minSize:s,maxSize:a,multiple:c,maxFiles:l,validator:k});R({isDragAccept:i,isDragReject:n>0&&!i,isDragActive:!0,type:"setDraggedFiles"}),p&&p(t)}}).catch(function(t){return z(t)})},[o,p,z,C,T,s,a,c,l,k]),G=e.useCallback(function(t){t.preventDefault(),t.persist(),it(t);var e=xt(t);if(e&&t.dataTransfer)try{t.dataTransfer.dropEffect="copy"}catch{}return e&&d&&d(t),!1},[d,C]),$=e.useCallback(function(t){t.preventDefault(),t.persist(),it(t);var e=V.current.filter(function(t){return j.current&&j.current.contains(t)}),n=e.indexOf(t.target);-1!==n&&e.splice(n,1),V.current=e,!(e.length>0)&&(R({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),xt(t)&&u&&u(t))},[j,u,C]),H=e.useCallback(function(t,e){var n=[],i=[];t.forEach(function(t){var e=Et(mt(t,T),2),r=e[0],o=e[1],c=Et(ht(t,s,a),2),l=c[0],p=c[1],u=k?k(t):null;if(r&&l&&!u)n.push(t);else{var d=[o,p];u&&(d=d.concat(u)),i.push({file:t,errors:d.filter(function(t){return t})})}}),(!c&&n.length>1||c&&l>=1&&n.length>l)&&(n.forEach(function(t){i.push({file:t,errors:[ft]})}),n.splice(0)),R({acceptedFiles:n,fileRejections:i,isDragReject:i.length>0,type:"setFiles"}),f&&f(n,i,e),i.length>0&&h&&h(i,e),n.length>0&&m&&m(n,e)},[R,c,T,s,a,l,f,m,h,k]),W=e.useCallback(function(t){t.preventDefault(),t.persist(),it(t),V.current=[],xt(t)&&Promise.resolve(o(t)).then(function(e){vt(t)&&!C||H(e,t)}).catch(function(t){return z(t)}),R({type:"reset"})},[o,H,z,C]),X=e.useCallback(function(){if(N.current){R({type:"openDialog"}),I();var t={multiple:c,types:E};window.showOpenFilePicker(t).then(function(t){return o(t)}).then(function(t){H(t,null),R({type:"closeDialog"})}).catch(function(t){!function(t){return t instanceof DOMException&&("AbortError"===t.name||t.code===t.ABORT_ERR)}(t)?function(t){return t instanceof DOMException&&("SecurityError"===t.name||t.code===t.SECURITY_ERR)}(t)?(N.current=!1,D.current?(D.current.value=null,D.current.click()):z(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):z(t):(M(t),R({type:"closeDialog"}))})}else D.current&&(R({type:"openDialog"}),I(),D.current.value=null,D.current.click())},[R,I,M,x,H,z,E,c]),Y=e.useCallback(function(t){!j.current||!j.current.isEqualNode(t.target)||(" "===t.key||"Enter"===t.key||32===t.keyCode||13===t.keyCode)&&(t.preventDefault(),X())},[j,X]),K=e.useCallback(function(){R({type:"focus"})},[]),Z=e.useCallback(function(){R({type:"blur"})},[]),Q=e.useCallback(function(){w||(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return function(t){return-1!==t.indexOf("MSIE")||-1!==t.indexOf("Trident/")}(t)||function(t){return-1!==t.indexOf("Edge/")}(t)}()?setTimeout(X,0):X())},[w,X]),J=function(t){return r?null:t},tt=function(t){return A?null:J(t)},et=function(t){return S?null:J(t)},it=function(t){C&&t.stopPropagation()},st=e.useMemo(function(){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.refKey,n=void 0===e?"ref":e,i=t.role,o=t.onKeyDown,a=t.onFocus,s=t.onBlur,c=t.onClick,l=t.onDragEnter,p=t.onDragOver,u=t.onDragLeave,d=t.onDrop,f=Ut(t,Pt);return Dt(Dt(Ft({onKeyDown:tt(bt(o,Y)),onFocus:tt(bt(a,K)),onBlur:tt(bt(s,Z)),onClick:J(bt(c,Q)),onDragEnter:et(bt(l,_)),onDragOver:et(bt(p,G)),onDragLeave:et(bt(u,$)),onDrop:et(bt(d,W)),role:"string"==typeof i&&""!==i?i:"presentation"},n,j),r||A?{}:{tabIndex:0}),f)}},[j,Y,K,Z,Q,_,G,$,W,A,S,r]),ct=e.useCallback(function(t){t.stopPropagation()},[]),lt=e.useMemo(function(){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.refKey,n=void 0===e?"ref":e,i=t.onChange,r=t.onClick,o=Ut(t,kt);return Dt(Dt({},Ft({accept:T,multiple:c,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:J(bt(i,W)),onClick:J(bt(r,ct)),tabIndex:-1},n,D)),o)}},[D,i,c,W,r]);return Dt(Dt({},U),{},{isFocused:O&&!r,getRootProps:st,getInputProps:lt,rootRef:j,inputRef:D,open:J(X)})}(Ut(t,St)),a=o.open,s=Ut(o,Ct);return e.useImperativeHandle(i,function(){return{open:a}},[a]),n.createElement(e.Fragment,null,r(Dt(Dt({},s),{},{open:a})))});Rt.displayName="Dropzone";var Ot={disabled:!1,getFilesFromEvent:function(t){return k(this,void 0,void 0,function*(){return G(t)&&function(t){return G(t)}(t.dataTransfer)?function(t,e){return k(this,void 0,void 0,function*(){if(t.items){const n=H(t.items).filter(t=>"file"===t.kind);if("drop"!==e)return n;return $(X(yield Promise.all(n.map(W))))}return $(H(t.files).map(t=>q(t)))})}(t.dataTransfer,t.type):function(t){return G(t)&&G(t.target)}(t)?function(t){return H(t.target.files).map(t=>q(t))}(t):Array.isArray(t)&&t.every(t=>"getFile"in t&&"function"==typeof t.getFile)?function(t){return k(this,void 0,void 0,function*(){return(yield Promise.all(t.map(t=>t.getFile()))).map(t=>q(t))})}(t):[]})},maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};Rt.defaultProps=Ot,Rt.propTypes={children:B.func,accept:B.objectOf(B.arrayOf(B.string)),multiple:B.bool,preventDropOnDocument:B.bool,noClick:B.bool,noKeyboard:B.bool,noDrag:B.bool,noDragEventsBubbling:B.bool,minSize:B.number,maxSize:B.number,maxFiles:B.number,disabled:B.bool,getFilesFromEvent:B.func,onFileDialogCancel:B.func,onFileDialogOpen:B.func,useFsAccessApi:B.bool,autoFocus:B.bool,onDragEnter:B.func,onDragLeave:B.func,onDragOver:B.func,onDrop:B.func,onDropAccepted:B.func,onDropRejected:B.func,onError:B.func,validator:B.func};var Lt={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Nt(t,e){switch(e.type){case"focus":return Dt(Dt({},t),{},{isFocused:!0});case"blur":return Dt(Dt({},t),{},{isFocused:!1});case"openDialog":return Dt(Dt({},Lt),{},{isFileDialogActive:!0});case"closeDialog":return Dt(Dt({},t),{},{isFileDialogActive:!1});case"setDraggedFiles":return Dt(Dt({},t),{},{isDragActive:e.isDragActive,isDragAccept:e.isDragAccept,isDragReject:e.isDragReject});case"setFiles":return Dt(Dt({},t),{},{acceptedFiles:e.acceptedFiles,fileRejections:e.fileRejections,isDragReject:e.isDragReject});case"reset":return Dt({},Lt);default:return t}}function Bt(){}const Vt=e.createContext({});function qt(t){const n=e.useRef(null);return null===n.current&&(n.current=t()),n.current}const zt=typeof window<"u",_t=zt?e.useLayoutEffect:e.useEffect,Gt=e.createContext(null);function $t(t,e){-1===t.indexOf(e)&&t.push(e)}function Ht(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const Wt=(t,e,n)=>n>e?e:n<t?t:n;function Xt(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}let Yt=()=>{},Kt=()=>{};"production"!=={}.NODE_ENV&&(Yt=(t,e,n)=>{!t&&typeof console<"u"&&console.warn(Xt(e,n))},Kt=(t,e,n)=>{if(!t)throw new Error(Xt(e,n))});const Zt={},Qt=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function Jt(t){return"object"==typeof t&&null!==t}const te=t=>/^0[^.\s]+$/u.test(t);function ee(t){let e;return()=>(void 0===e&&(e=t()),e)}const ne=t=>t,ie=(t,e)=>n=>e(t(n)),re=(...t)=>t.reduce(ie),oe=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i};class ae{constructor(){this.subscriptions=[]}add(t){return $t(this.subscriptions,t),()=>Ht(this.subscriptions,t)}notify(t,e,n){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](t,e,n);else for(let r=0;r<i;r++){const i=this.subscriptions[r];i&&i(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const se=t=>1e3*t,ce=t=>t/1e3;function le(t,e){return e?t*(1e3/e):0}const pe=new Set;function ue(t,e,n){t||pe.has(e)||(console.warn(Xt(e,n)),pe.add(e))}const de=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function fe(t,e,n,i){if(t===e&&n===i)return ne;const r=e=>function(t,e,n,i,r){let o,a,s=0;do{a=e+(n-e)/2,o=de(a,i,r)-t,o>0?n=a:e=a}while(Math.abs(o)>1e-7&&++s<12);return a}(e,0,1,t,n);return t=>0===t||1===t?t:de(r(t),e,i)}const me=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,he=t=>e=>1-t(1-e),ge=fe(.33,1.53,.69,.99),ve=he(ge),xe=me(ve),ye=t=>(t*=2)<1?.5*ve(t):.5*(2-Math.pow(2,-10*(t-1))),be=t=>1-Math.sin(Math.acos(t)),we=he(be),Ae=me(be),Se=fe(.42,0,1,1),Ce=fe(0,0,.58,1),Pe=fe(.42,0,.58,1),ke=t=>Array.isArray(t)&&"number"==typeof t[0],Te={linear:ne,easeIn:Se,easeInOut:Pe,easeOut:Ce,circIn:be,circInOut:Ae,circOut:we,backIn:ve,backInOut:xe,backOut:ge,anticipate:ye},Ee=t=>{if(ke(t)){Kt(4===t.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[e,n,i,r]=t;return fe(e,n,i,r)}return(t=>"string"==typeof t)(t)?(Kt(void 0!==Te[t],`Invalid easing type '${t}'`,"invalid-easing-type"),Te[t]):t},Ie=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Me(t,e){let n=!1,i=!0;const r={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,a=Ie.reduce((t,e)=>(t[e]=function(t){let e=new Set,n=new Set,i=!1,r=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function s(e){o.has(e)&&(c.schedule(e),t()),e(a)}const c={schedule:(t,r=!1,a=!1)=>{const s=a&&i?e:n;return r&&o.add(t),s.has(t)||s.add(t),t},cancel:t=>{n.delete(t),o.delete(t)},process:t=>{a=t,i?r=!0:(i=!0,[e,n]=[n,e],e.forEach(s),e.clear(),i=!1,r&&(r=!1,c.process(t)))}};return c}(o),t),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:p,update:u,preRender:d,render:f,postRender:m}=a,h=()=>{const o=Zt.useManualTiming?r.timestamp:performance.now();n=!1,Zt.useManualTiming||(r.delta=i?1e3/60:Math.max(Math.min(o-r.timestamp,40),1)),r.timestamp=o,r.isProcessing=!0,s.process(r),c.process(r),l.process(r),p.process(r),u.process(r),d.process(r),f.process(r),m.process(r),r.isProcessing=!1,n&&e&&(i=!1,t(h))};return{schedule:Ie.reduce((e,o)=>{const s=a[o];return e[o]=(e,o=!1,a=!1)=>(n||(n=!0,i=!0,r.isProcessing||t(h)),s.schedule(e,o,a)),e},{}),cancel:t=>{for(let e=0;e<Ie.length;e++)a[Ie[e]].cancel(t)},state:r,steps:a}}const{schedule:je,cancel:De,state:Fe,steps:Ue}=Me(typeof requestAnimationFrame<"u"?requestAnimationFrame:ne,!0);let Re;function Oe(){Re=void 0}const Le={now:()=>(void 0===Re&&Le.set(Fe.isProcessing||Zt.useManualTiming?Fe.timestamp:performance.now()),Re),set:t=>{Re=t,queueMicrotask(Oe)}},Ne=t=>e=>"string"==typeof e&&e.startsWith(t),Be=Ne("--"),Ve=Ne("var(--"),qe=t=>!!Ve(t)&&ze.test(t.split("/*")[0].trim()),ze=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,_e={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},Ge={..._e,transform:t=>Wt(0,1,t)},$e={..._e,default:1},He=t=>Math.round(1e5*t)/1e5,We=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const Xe=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Ye=(t,e)=>n=>!!("string"==typeof n&&Xe.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),Ke=(t,e,n)=>i=>{if("string"!=typeof i)return i;const[r,o,a,s]=i.match(We);return{[t]:parseFloat(r),[e]:parseFloat(o),[n]:parseFloat(a),alpha:void 0!==s?parseFloat(s):1}},Ze={..._e,transform:t=>Math.round((t=>Wt(0,255,t))(t))},Qe={test:Ye("rgb","red"),parse:Ke("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+Ze.transform(t)+", "+Ze.transform(e)+", "+Ze.transform(n)+", "+He(Ge.transform(i))+")"};const Je={test:Ye("#"),parse:function(t){let e="",n="",i="",r="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),r=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),r=t.substring(4,5),e+=e,n+=n,i+=i,r+=r),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:r?parseInt(r,16)/255:1}},transform:Qe.transform},tn=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),en=tn("deg"),nn=tn("%"),rn=tn("px"),on=tn("vh"),an=tn("vw"),sn={...nn,parse:t=>nn.parse(t)/100,transform:t=>nn.transform(100*t)},cn={test:Ye("hsl","hue"),parse:Ke("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+nn.transform(He(e))+", "+nn.transform(He(n))+", "+He(Ge.transform(i))+")"},ln={test:t=>Qe.test(t)||Je.test(t)||cn.test(t),parse:t=>Qe.test(t)?Qe.parse(t):cn.test(t)?cn.parse(t):Je.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?Qe.transform(t):cn.transform(t),getAnimatableNone:t=>{const e=ln.parse(t);return e.alpha=0,ln.transform(e)}},pn=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const un="number",dn="color",fn=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function mn(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},r=[];let o=0;const a=e.replace(fn,t=>(ln.test(t)?(i.color.push(o),r.push(dn),n.push(ln.parse(t))):t.startsWith("var(")?(i.var.push(o),r.push("var"),n.push(t)):(i.number.push(o),r.push(un),n.push(parseFloat(t))),++o,"${}")).split("${}");return{values:n,split:a,indexes:i,types:r}}function hn(t){return mn(t).values}function gn(t){const{split:e,types:n}=mn(t),i=e.length;return t=>{let r="";for(let o=0;o<i;o++)if(r+=e[o],void 0!==t[o]){const e=n[o];r+=e===un?He(t[o]):e===dn?ln.transform(t[o]):t[o]}return r}}const vn=t=>"number"==typeof t?0:ln.test(t)?ln.getAnimatableNone(t):t;const xn={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(We)?.length||0)+(t.match(pn)?.length||0)>0},parse:hn,createTransformer:gn,getAnimatableNone:function(t){const e=hn(t);return gn(t)(e.map(vn))}};function yn(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function bn(t,e){return n=>n>0?e:t}const wn=(t,e,n)=>t+(e-t)*n,An=(t,e,n)=>{const i=t*t,r=n*(e*e-i)+i;return r<0?0:Math.sqrt(r)},Sn=[Je,Qe,cn];function Cn(t){const e=(t=>Sn.find(e=>e.test(t)))(t);if(Yt(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!e)return!1;let n=e.parse(t);return e===cn&&(n=function({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let r=0,o=0,a=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,s=2*n-i;r=yn(s,i,t+1/3),o=yn(s,i,t),a=yn(s,i,t-1/3)}else r=o=a=n;return{red:Math.round(255*r),green:Math.round(255*o),blue:Math.round(255*a),alpha:i}}(n)),n}const Pn=(t,e)=>{const n=Cn(t),i=Cn(e);if(!n||!i)return bn(t,e);const r={...n};return t=>(r.red=An(n.red,i.red,t),r.green=An(n.green,i.green,t),r.blue=An(n.blue,i.blue,t),r.alpha=wn(n.alpha,i.alpha,t),Qe.transform(r))},kn=new Set(["none","hidden"]);function Tn(t,e){return n=>wn(t,e,n)}function En(t){return"number"==typeof t?Tn:"string"==typeof t?qe(t)?bn:ln.test(t)?Pn:jn:Array.isArray(t)?In:"object"==typeof t?ln.test(t)?Pn:Mn:bn}function In(t,e){const n=[...t],i=n.length,r=t.map((t,n)=>En(t)(t,e[n]));return t=>{for(let e=0;e<i;e++)n[e]=r[e](t);return n}}function Mn(t,e){const n={...t,...e},i={};for(const r in n)void 0!==t[r]&&void 0!==e[r]&&(i[r]=En(t[r])(t[r],e[r]));return t=>{for(const e in i)n[e]=i[e](t);return n}}const jn=(t,e)=>{const n=xn.createTransformer(e),i=mn(t),r=mn(e);return i.indexes.var.length===r.indexes.var.length&&i.indexes.color.length===r.indexes.color.length&&i.indexes.number.length>=r.indexes.number.length?kn.has(t)&&!r.values.length||kn.has(e)&&!i.values.length?function(t,e){return kn.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):re(In(function(t,e){const n=[],i={color:0,var:0,number:0};for(let r=0;r<e.values.length;r++){const o=e.types[r],a=t.indexes[o][i[o]],s=t.values[a]??0;n[r]=s,i[o]++}return n}(i,r),r.values),n):(Yt(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),bn(t,e))};function Dn(t,e,n){return"number"==typeof t&&"number"==typeof e&&"number"==typeof n?wn(t,e,n):En(t)(t,e)}const Fn=t=>{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>je.update(e,t),stop:()=>De(e),now:()=>Fe.isProcessing?Fe.timestamp:Le.now()}},Un=(t,e,n=10)=>{let i="";const r=Math.max(Math.round(e/n),2);for(let e=0;e<r;e++)i+=Math.round(1e4*t(e/(r-1)))/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},Rn=2e4;function On(t){let e=0;let n=t.next(e);for(;!n.done&&e<Rn;)e+=50,n=t.next(e);return e>=Rn?1/0:e}function Ln(t,e,n){const i=Math.max(e-5,0);return le(n-t(i),e-i)}const Nn=100,Bn=10,Vn=1,qn=0,zn=800,_n=.3,Gn=.3,$n={granular:.01,default:2},Hn={granular:.005,default:.5},Wn=.01,Xn=10,Yn=.05,Kn=1,Zn=.001;function Qn({duration:t=zn,bounce:e=_n,velocity:n=qn,mass:i=Vn}){let r,o;Yt(t<=se(Xn),"Spring duration must be 10 seconds or less","spring-duration-limit");let a=1-e;a=Wt(Yn,Kn,a),t=Wt(Wn,Xn,ce(t)),a<1?(r=e=>{const i=e*a,r=i*t,o=i-n,s=ti(e,a),c=Math.exp(-r);return Zn-o/s*c},o=e=>{const i=e*a*t,o=i*n+n,s=Math.pow(a,2)*Math.pow(e,2)*t,c=Math.exp(-i),l=ti(Math.pow(e,2),a);return(-r(e)+Zn>0?-1:1)*((o-s)*c)/l}):(r=e=>Math.exp(-e*t)*((e-n)*t+1)-Zn,o=e=>Math.exp(-e*t)*(t*t*(n-e)));const s=function(t,e,n){let i=n;for(let n=1;n<Jn;n++)i-=t(i)/e(i);return i}(r,o,5/t);if(t=se(t),isNaN(s))return{stiffness:Nn,damping:Bn,duration:t};{const e=Math.pow(s,2)*i;return{stiffness:e,damping:2*a*Math.sqrt(i*e),duration:t}}}const Jn=12;function ti(t,e){return t*Math.sqrt(1-e*e)}const ei=["duration","bounce"],ni=["stiffness","damping","mass"];function ii(t,e){return e.some(e=>void 0!==t[e])}function ri(t=Gn,e=_n){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:i,restDelta:r}=n;const o=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],s={done:!1,value:o},{stiffness:c,damping:l,mass:p,duration:u,velocity:d,isResolvedFromDuration:f}=function(t){let e={velocity:qn,stiffness:Nn,damping:Bn,mass:Vn,isResolvedFromDuration:!1,...t};if(!ii(t,ni)&&ii(t,ei))if(t.visualDuration){const n=t.visualDuration,i=2*Math.PI/(1.2*n),r=i*i,o=2*Wt(.05,1,1-(t.bounce||0))*Math.sqrt(r);e={...e,mass:Vn,stiffness:r,damping:o}}else{const n=Qn(t);e={...e,...n,mass:Vn},e.isResolvedFromDuration=!0}return e}({...n,velocity:-ce(n.velocity||0)}),m=d||0,h=l/(2*Math.sqrt(c*p)),g=a-o,v=ce(Math.sqrt(c/p)),x=Math.abs(g)<5;let y;if(i||(i=x?$n.granular:$n.default),r||(r=x?Hn.granular:Hn.default),h<1){const t=ti(v,h);y=e=>{const n=Math.exp(-h*v*e);return a-n*((m+h*v*g)/t*Math.sin(t*e)+g*Math.cos(t*e))}}else if(1===h)y=t=>a-Math.exp(-v*t)*(g+(m+v*g)*t);else{const t=v*Math.sqrt(h*h-1);y=e=>{const n=Math.exp(-h*v*e),i=Math.min(t*e,300);return a-n*((m+h*v*g)*Math.sinh(i)+t*g*Math.cosh(i))/t}}const b={calculatedDuration:f&&u||null,next:t=>{const e=y(t);if(f)s.done=t>=u;else{let n=0===t?m:0;h<1&&(n=0===t?se(m):Ln(y,t,e));const o=Math.abs(n)<=i,c=Math.abs(a-e)<=r;s.done=o&&c}return s.value=s.done?a:e,s},toString:()=>{const t=Math.min(On(b),Rn),e=Un(e=>b.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return b}function oi({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:r=10,bounceStiffness:o=500,modifyTarget:a,min:s,max:c,restDelta:l=.5,restSpeed:p}){const u=t[0],d={done:!1,value:u},f=t=>void 0===s?c:void 0===c||Math.abs(s-t)<Math.abs(c-t)?s:c;let m=n*e;const h=u+m,g=void 0===a?h:a(h);g!==h&&(m=g-u);const v=t=>-m*Math.exp(-t/i),x=t=>g+v(t),y=t=>{const e=v(t),n=x(t);d.done=Math.abs(e)<=l,d.value=d.done?g:n};let b,w;const A=t=>{(t=>void 0!==s&&t<s||void 0!==c&&t>c)(d.value)&&(b=t,w=ri({keyframes:[d.value,f(d.value)],velocity:Ln(x,t,d.value),damping:r,stiffness:o,restDelta:l,restSpeed:p}))};return A(0),{calculatedDuration:null,next:t=>{let e=!1;return!w&&void 0===b&&(e=!0,y(t),A(t)),void 0!==b&&t>=b?w.next(t-b):(!e&&y(t),d)}}}function ai(t,e,{clamp:n=!0,ease:i,mixer:r}={}){const o=t.length;if(Kt(o===e.length,"Both input and output ranges must be the same length","range-length"),1===o)return()=>e[0];if(2===o&&e[0]===e[1])return()=>e[1];const a=t[0]===t[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const s=function(t,e,n){const i=[],r=n||Zt.mix||Dn,o=t.length-1;for(let n=0;n<o;n++){let o=r(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]||ne:e;o=re(t,o)}i.push(o)}return i}(e,i,r),c=s.length,l=n=>{if(a&&n<t[0])return e[0];let i=0;if(c>1)for(;i<t.length-2&&!(n<t[i+1]);i++);const r=oe(t[i],t[i+1],n);return s[i](r)};return n?e=>l(Wt(t[0],t[o-1],e)):l}function si(t){const e=[0];return function(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const r=oe(0,e,i);t.push(wn(n,1,r))}}(e,t.length-1),e}function ci(t,e){return t.map(()=>e||Pe).splice(0,t.length-1)}function li({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const r=(t=>Array.isArray(t)&&"number"!=typeof t[0])(i)?i.map(Ee):Ee(i),o={done:!1,value:e[0]},a=function(t,e){return t.map(t=>t*e)}(n&&n.length===e.length?n:si(e),t),s=ai(a,e,{ease:Array.isArray(r)?r:ci(e,r)});return{calculatedDuration:t,next:e=>(o.value=s(e),o.done=e>=t,o)}}ri.applyToOptions=t=>{const e=function(t,e=100,n){const i=n({...t,keyframes:[0,e]}),r=Math.min(On(i),Rn);return{type:"keyframes",ease:t=>i.next(r*t).value/e,duration:ce(r)}}(t,100,ri);return t.ease=e.ease,t.duration=se(e.duration),t.type="keyframes",t};const pi=t=>null!==t;function ui(t,{repeat:e,repeatType:n="loop"},i,r=1){const o=t.filter(pi),a=r<0||e&&"loop"!==n&&e%2==1?0:o.length-1;return a&&void 0!==i?i:o[a]}const di={decay:oi,inertia:oi,tween:li,keyframes:li,spring:ri};function fi(t){"string"==typeof t.type&&(t.type=di[t.type])}class mi{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}var hi={};const gi=t=>t/100;class vi extends mi{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==Le.now()&&this.tick(Le.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause()}initAnimation(){const{options:t}=this;fi(t);const{type:e=li,repeat:n=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=t;let{keyframes:a}=t;const s=e||li;"production"!==hi.NODE_ENV&&s!==li&&Kt(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),s!==li&&"number"!=typeof a[0]&&(this.mixKeyframes=re(gi,Dn(a[0],a[1])),a=[0,100]);const c=s({...t,keyframes:a});"mirror"===r&&(this.mirroredGenerator=s({...t,keyframes:[...a].reverse(),velocity:-o})),null===c.calculatedDuration&&(c.calculatedDuration=On(c));const{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+i,this.totalDuration=this.resolvedDuration*(n+1)-i,this.generator=c}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){const{generator:n,totalDuration:i,mixKeyframes:r,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:s}=this;if(null===this.startTime)return n.next(0);const{delay:c=0,keyframes:l,repeat:p,repeatType:u,repeatDelay:d,type:f,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);const g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?g<0:g>i;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=i);let x=this.currentTime,y=n;if(p){const t=Math.min(this.currentTime,i)/a;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,p+1),!!(e%2)&&("reverse"===u?(n=1-n,d&&(n-=d/a)):"mirror"===u&&(y=o)),x=Wt(0,1,n)*a}const b=v?{done:!1,value:l[0]}:y.next(x);r&&(b.value=r(b.value));let{done:w}=b;!v&&null!==s&&(w=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const A=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return A&&f!==oi&&(b.value=ui(l,this.options,h,this.speed)),m&&m(b.value),A&&this.finish(),b}then(t,e){return this.finished.then(t,e)}get duration(){return ce(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ce(t)}get time(){return ce(this.currentTime)}set time(t){t=se(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Le.now());const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=ce(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Fn,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=e??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Le.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}const xi=t=>180*t/Math.PI,yi=t=>{const e=xi(Math.atan2(t[1],t[0]));return wi(e)},bi={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:yi,rotateZ:yi,skewX:t=>xi(Math.atan(t[1])),skewY:t=>xi(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},wi=t=>((t%=360)<0&&(t+=360),t),Ai=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Si=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Ci={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Ai,scaleY:Si,scale:t=>(Ai(t)+Si(t))/2,rotateX:t=>wi(xi(Math.atan2(t[6],t[5]))),rotateY:t=>wi(xi(Math.atan2(-t[2],t[0]))),rotateZ:yi,rotate:yi,skewX:t=>xi(Math.atan(t[4])),skewY:t=>xi(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Pi(t){return t.includes("scale")?1:0}function ki(t,e){if(!t||"none"===t)return Pi(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,r;if(n)i=Ci,r=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=bi,r=e}if(!r)return Pi(e);const o=i[e],a=r[1].split(",").map(Ti);return"function"==typeof o?o(a):a[o]}function Ti(t){return parseFloat(t.trim())}const Ei=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ii=new Set(Ei),Mi=t=>t===_e||t===rn,ji=new Set(["x","y","z"]),Di=Ei.filter(t=>!ji.has(t));const Fi={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>ki(e,"x"),y:(t,{transform:e})=>ki(e,"y")};Fi.translateX=Fi.x,Fi.translateY=Fi.y;const Ui=new Set;let Ri=!1,Oi=!1,Li=!1;function Ni(){if(Oi){const t=Array.from(Ui).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),n=new Map;e.forEach(t=>{const e=function(t){const e=[];return Di.forEach(n=>{const i=t.getValue(n);void 0!==i&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),e}(t);e.length&&(n.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=n.get(t);e&&e.forEach(([e,n])=>{t.getValue(e)?.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}Oi=!1,Ri=!1,Ui.forEach(t=>t.complete(Li)),Ui.clear()}function Bi(){Ui.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Oi=!0)})}class Vi{constructor(t,e,n,i,r,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=i,this.element=r,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Ui.add(this),Ri||(Ri=!0,je.read(Bi),je.resolveKeyframes(Ni))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:i}=this;if(null===t[0]){const r=i?.get(),o=t[t.length-1];if(void 0!==r)t[0]=r;else if(n&&e){const i=n.readValue(e,o);null!=i&&(t[0]=i)}void 0===t[0]&&(t[0]=o),i&&void 0===r&&i.set(t[0])}!function(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Ui.delete(this)}cancel(){"scheduled"===this.state&&(Ui.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const qi=ee(()=>void 0!==window.ScrollTimeline),zi={};function _i(t,e){const n=ee(t);return()=>zi[e]??n()}const Gi=_i(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),$i=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,Hi={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:$i([0,.65,.55,1]),circOut:$i([.55,0,1,.45]),backIn:$i([.31,.01,.66,-.59]),backOut:$i([.33,1.53,.69,.99])};function Wi(t,e){if(t)return"function"==typeof t?Gi()?Un(t,e):"ease-out":ke(t)?$i(t):Array.isArray(t)?t.map(t=>Wi(t,e)||Hi.easeOut):Hi[t]}function Xi(t,e,n,{delay:i=0,duration:r=300,repeat:o=0,repeatType:a="loop",ease:s="easeOut",times:c}={},l=void 0){const p={[e]:n};c&&(p.offset=c);const u=Wi(s,r);Array.isArray(u)&&(p.easing=u);const d={delay:i,duration:r,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:o+1,direction:"reverse"===a?"alternate":"normal"};return l&&(d.pseudoElement=l),t.animate(p,d)}function Yi(t){return"function"==typeof t&&"applyToOptions"in t}class Ki extends mi{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:e,name:n,keyframes:i,pseudoElement:r,allowFlatten:o=!1,finalKeyframe:a,onComplete:s}=t;this.isPseudoElement=!!r,this.allowFlatten=o,this.options=t,Kt("string"!=typeof t.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const c=function({type:t,...e}){return Yi(t)&&Gi()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}(t);this.animation=Xi(e,n,i,c,r),!1===c.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const t=ui(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(t):function(t,e,n){(t=>t.startsWith("--"))(e)?t.style.setProperty(e,n):t.style[e]=n}(e,n,t),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;"idle"===t||"finished"===t||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return ce(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ce(t)}get time(){return ce(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=se(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:e}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&qi()?(this.animation.timeline=t,ne):e(this)}}const Zi={anticipate:ye,backInOut:xe,circInOut:Ae};function Qi(t){"string"==typeof t.ease&&function(t){return t in Zi}(t.ease)&&(t.ease=Zi[t.ease])}class Ji extends Ki{constructor(t){Qi(t),fi(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:e,onUpdate:n,onComplete:i,element:r,...o}=this.options;if(!e)return;if(void 0!==t)return void e.set(t);const a=new vi({...o,autoplay:!1}),s=se(this.finishedTime??this.time);e.setWithVelocity(a.sample(s-10).value,a.sample(s).value,10),a.stop()}}const tr=(t,e)=>"zIndex"!==e&&!("number"!=typeof t&&!Array.isArray(t)&&("string"!=typeof t||!xn.test(t)&&"0"!==t||t.startsWith("url(")));function er(t){t.duration=0,t.type="keyframes"}const nr=new Set(["opacity","clipPath","filter","transform"]),ir=ee(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class rr extends mi{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",keyframes:a,name:s,motionValue:c,element:l,...p}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Le.now();const u={autoplay:t,delay:e,type:n,repeat:i,repeatDelay:r,repeatType:o,name:s,motionValue:c,element:l,...p},d=l?.KeyframeResolver||Vi;this.keyframeResolver=new d(a,(t,e,n)=>this.onKeyframesResolved(t,e,u,!n),s,c,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,e,n,i){this.keyframeResolver=void 0;const{name:r,type:o,velocity:a,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=Le.now(),function(t,e,n,i){const r=t[0];if(null===r)return!1;if("display"===e||"visibility"===e)return!0;const o=t[t.length-1],a=tr(r,e),s=tr(o,e);return Yt(a===s,`You are trying to animate ${e} from "${r}" to "${o}". "${a?o:r}" is not an animatable value.`,"value-not-animatable"),!(!a||!s)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}(t)||("spring"===n||Yi(n))&&i)}(t,r,o,a)||((Zt.instantAnimations||!s)&&l?.(ui(t,n,e)),t[0]=t[t.length-1],er(n),n.repeat=0);const p={startTime:i?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:e,...n,keyframes:t},u=!c&&function(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:r,damping:o,type:a}=t;if(!(e?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:s,transformTemplate:c}=e.owner.getProps();return ir()&&n&&nr.has(n)&&("transform"!==n||!c)&&!s&&!i&&"mirror"!==r&&0!==o&&"inertia"!==a}(p)?new Ji({...p,element:p.motionValue.owner.current}):new vi(p);u.finished.then(()=>this.notifyFinished()).catch(ne),this.pendingTimeline&&(this.stopTimeline=u.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=u}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Li=!0,Bi(),Ni(),Li=!1),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const or=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ar(t,e,n=1){Kt(n<=4,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[i,r]=function(t){const e=or.exec(t);if(!e)return[,];const[,n,i,r]=e;return[`--${n??i}`,r]}(t);if(!i)return;const o=window.getComputedStyle(e).getPropertyValue(i);if(o){const t=o.trim();return Qt(t)?parseFloat(t):t}return qe(r)?ar(r,e,n+1):r}function sr(t,e){return t?.[e]??t?.default??t}const cr=new Set(["width","height","top","left","right","bottom",...Ei]),lr=t=>e=>e.test(t),pr=[_e,rn,nn,en,an,on,{test:t=>"auto"===t,parse:t=>t}],ur=t=>pr.find(lr(t));function dr(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||te(t))}const fr=new Set(["brightness","contrast","saturate","opacity"]);function mr(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(We)||[];if(!i)return t;const r=n.replace(i,"");let o=fr.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+r+")"}const hr=/\b([a-z-]*)\(.*?\)/gu,gr={...xn,getAnimatableNone:t=>{const e=t.match(hr);return e?e.map(mr).join(" "):t}},vr={..._e,transform:Math.round},xr={borderWidth:rn,borderTopWidth:rn,borderRightWidth:rn,borderBottomWidth:rn,borderLeftWidth:rn,borderRadius:rn,radius:rn,borderTopLeftRadius:rn,borderTopRightRadius:rn,borderBottomRightRadius:rn,borderBottomLeftRadius:rn,width:rn,maxWidth:rn,height:rn,maxHeight:rn,top:rn,right:rn,bottom:rn,left:rn,padding:rn,paddingTop:rn,paddingRight:rn,paddingBottom:rn,paddingLeft:rn,margin:rn,marginTop:rn,marginRight:rn,marginBottom:rn,marginLeft:rn,backgroundPositionX:rn,backgroundPositionY:rn,...{rotate:en,rotateX:en,rotateY:en,rotateZ:en,scale:$e,scaleX:$e,scaleY:$e,scaleZ:$e,skew:en,skewX:en,skewY:en,distance:rn,translateX:rn,translateY:rn,translateZ:rn,x:rn,y:rn,z:rn,perspective:rn,transformPerspective:rn,opacity:Ge,originX:sn,originY:sn,originZ:rn},zIndex:vr,fillOpacity:Ge,strokeOpacity:Ge,numOctaves:vr},yr={...xr,color:ln,backgroundColor:ln,outlineColor:ln,fill:ln,stroke:ln,borderColor:ln,borderTopColor:ln,borderRightColor:ln,borderBottomColor:ln,borderLeftColor:ln,filter:gr,WebkitFilter:gr},br=t=>yr[t];function wr(t,e){let n=br(t);return n!==gr&&(n=xn),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Ar=new Set(["auto","none","0"]);class Sr extends Vi{constructor(t,e,n,i,r){super(t,e,n,i,r,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let n=0;n<t.length;n++){let i=t[n];if("string"==typeof i&&(i=i.trim(),qe(i))){const r=ar(i,e.current);void 0!==r&&(t[n]=r),n===t.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!cr.has(n)||2!==t.length)return;const[i,r]=t,o=ur(i),a=ur(r);if(o!==a)if(Mi(o)&&Mi(a))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else Fi[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)(null===t[e]||dr(t[e]))&&n.push(e);n.length&&function(t,e,n){let i,r=0;for(;r<t.length&&!i;){const e=t[r];"string"==typeof e&&!Ar.has(e)&&mn(e).values.length&&(i=t[r]),r++}if(i&&n)for(const r of e)t[r]=wr(n,i)}(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t||!t.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Fi[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const i=e[e.length-1];void 0!==i&&t.getValue(n,i).jump(i,!1)}measureEndState(){const{element:t,name:e,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const i=t.getValue(e);i&&i.jump(this.measuredOrigin,!1);const r=n.length-1,o=n[r];n[r]=Fi[e](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==o&&void 0===this.finalKeyframe&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([e,n])=>{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}}const Cr=(t,e)=>e&&"number"==typeof t?e.transform(t):t;function Pr(t){return Jt(t)&&"offsetHeight"in t}var kr={};class Tr{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{const e=Le.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=Le.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return"production"!==kr.NODE_ENV&&ue(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new ae);const n=this.events[t].add(e);return"change"===t?()=>{n(),je.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Le.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return le(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Er(t,e){return new Tr(t,e)}const{schedule:Ir}=Me(queueMicrotask,!1),Mr={x:!1,y:!1};function jr(){return Mr.x||Mr.y}function Dr(t,e){const n=function(t,e,n){if(t instanceof EventTarget)return[t];if("string"==typeof t){let e=document;const i=n?.[t]??e.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},()=>i.abort()]}function Fr(t){return!("touch"===t.pointerType||jr())}const Ur=(t,e)=>!!e&&(t===e||Ur(t,e.parentElement)),Rr=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,Or=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const Lr=new WeakSet;function Nr(t){return e=>{"Enter"===e.key&&t(e)}}function Br(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function Vr(t){return Rr(t)&&!jr()}function qr(t,e,n={}){const[i,r,o]=Dr(t,n),a=t=>{const i=t.currentTarget;if(!Vr(t))return;Lr.add(i);const o=e(i,t),a=(t,e)=>{window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",c),Lr.has(i)&&Lr.delete(i),Vr(t)&&"function"==typeof o&&o(t,{success:e})},s=t=>{a(t,i===window||i===document||n.useGlobalTarget||Ur(i,t.target))},c=t=>{a(t,!1)};window.addEventListener("pointerup",s,r),window.addEventListener("pointercancel",c,r)};return i.forEach(t=>{(n.useGlobalTarget?window:t).addEventListener("pointerdown",a,r),Pr(t)&&(t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const i=Nr(()=>{if(Lr.has(n))return;Br(n,"down");const t=Nr(()=>{Br(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>Br(n,"cancel"),e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)})(t,r)),!function(t){return Or.has(t.tagName)||-1!==t.tabIndex}(t)&&!t.hasAttribute("tabindex")&&(t.tabIndex=0))}),o}function zr(t){return Jt(t)&&"ownerSVGElement"in t}const _r=t=>!(!t||!t.getVelocity),Gr=[...pr,ln,xn],$r=e.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function Hr(t,e){if("function"==typeof t)return t(e);null!=t&&(t.current=e)}function Wr(...t){return e.useCallback(function(...t){return e=>{let n=!1;const i=t.map(t=>{const i=Hr(t,e);return!n&&"function"==typeof i&&(n=!0),i});if(n)return()=>{for(let e=0;e<i.length;e++){const n=i[e];"function"==typeof n?n():Hr(t[e],null)}}}}(...t),t)}class Xr extends e.Component{getSnapshotBeforeUpdate(t){const e=this.props.childRef.current;if(e&&t.isPresent&&!this.props.isPresent){const t=e.offsetParent,n=Pr(t)&&t.offsetWidth||0,i=this.props.sizeRef.current;i.height=e.offsetHeight||0,i.width=e.offsetWidth||0,i.top=e.offsetTop,i.left=e.offsetLeft,i.right=n-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function Yr({children:t,isPresent:n,anchorX:r,root:o}){const a=e.useId(),s=e.useRef(null),c=e.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:l}=e.useContext($r),p=Wr(s,t?.ref);return e.useInsertionEffect(()=>{const{width:t,height:e,top:i,left:p,right:u}=c.current;if(n||!s.current||!t||!e)return;const d="left"===r?`left: ${p}`:`right: ${u}`;s.current.dataset.motionPopId=a;const f=document.createElement("style");l&&(f.nonce=l);const m=o??document.head;return m.appendChild(f),f.sheet&&f.sheet.insertRule(`\n [data-motion-pop-id="${a}"] {\n position: absolute !important;\n width: ${t}px !important;\n height: ${e}px !important;\n ${d}px !important;\n top: ${i}px !important;\n }\n `),()=>{m.contains(f)&&m.removeChild(f)}},[n]),i.jsx(Xr,{isPresent:n,childRef:s,sizeRef:c,children:e.cloneElement(t,{ref:p})})}const Kr=({children:t,initial:n,isPresent:r,onExitComplete:o,custom:a,presenceAffectsLayout:s,mode:c,anchorX:l,root:p})=>{const u=qt(Zr),d=e.useId();let f=!0,m=e.useMemo(()=>(f=!1,{id:d,initial:n,isPresent:r,custom:a,onExitComplete:t=>{u.set(t,!0);for(const t of u.values())if(!t)return;o&&o()},register:t=>(u.set(t,!1),()=>u.delete(t))}),[r,u,o]);return s&&f&&(m={...m}),e.useMemo(()=>{u.forEach((t,e)=>u.set(e,!1))},[r]),e.useEffect(()=>{!r&&!u.size&&o&&o()},[r]),"popLayout"===c&&(t=i.jsx(Yr,{isPresent:r,anchorX:l,root:p,children:t})),i.jsx(Gt.Provider,{value:m,children:t})};function Zr(){return new Map}function Qr(t=!0){const n=e.useContext(Gt);if(null===n)return[!0,null];const{isPresent:i,onExitComplete:r,register:o}=n,a=e.useId();e.useEffect(()=>{if(t)return o(a)},[t]);const s=e.useCallback(()=>t&&r&&r(a),[a,r,t]);return!i&&r?[!1,s]:[!0]}const Jr=t=>t.key||"";function to(t){const n=[];return e.Children.forEach(t,t=>{e.isValidElement(t)&&n.push(t)}),n}var eo={};const no=({children:t,custom:n,initial:r=!0,onExitComplete:o,presenceAffectsLayout:a=!0,mode:s="sync",propagate:c=!1,anchorX:l="left",root:p})=>{const[u,d]=Qr(c),f=e.useMemo(()=>to(t),[t]),m=c&&!u?[]:f.map(Jr),h=e.useRef(!0),g=e.useRef(f),v=qt(()=>new Map),[x,y]=e.useState(f),[b,w]=e.useState(f);_t(()=>{h.current=!1,g.current=f;for(let t=0;t<b.length;t++){const e=Jr(b[t]);m.includes(e)?v.delete(e):!0!==v.get(e)&&v.set(e,!1)}},[b,m.length,m.join("-")]);const A=[];if(f!==x){let t=[...f];for(let e=0;e<b.length;e++){const n=b[e],i=Jr(n);m.includes(i)||(t.splice(e,0,n),A.push(n))}return"wait"===s&&A.length&&(t=A),w(to(t)),y(f),null}"production"!==eo.NODE_ENV&&"wait"===s&&b.length>1&&console.warn('You\'re attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.');const{forceRender:S}=e.useContext(Vt);return i.jsx(i.Fragment,{children:b.map(t=>{const e=Jr(t),x=!(c&&!u)&&(f===b||m.includes(e));return i.jsx(Kr,{isPresent:x,initial:!(h.current&&!r)&&void 0,custom:n,presenceAffectsLayout:a,mode:s,root:p,onExitComplete:x?void 0:()=>{if(!v.has(e))return;v.set(e,!0);let t=!0;v.forEach(e=>{e||(t=!1)}),t&&(S?.(),w(g.current),c&&d?.(),o&&o())},anchorX:l,children:t},e)})})},io=e.createContext({strict:!1}),ro={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},oo={};for(const t in ro)oo[t]={isEnabled:e=>ro[t].some(t=>!!e[t])};const ao=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function so(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||ao.has(t)}let co=t=>!so(t);try{"function"==typeof(lo=require("@emotion/is-prop-valid").default)&&(co=t=>t.startsWith("on")?!so(t):lo(t))}catch{}var lo;const po=e.createContext({});function uo(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function fo(t){return"string"==typeof t||Array.isArray(t)}const mo=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ho=["initial",...mo];function go(t){return uo(t.animate)||ho.some(e=>fo(t[e]))}function vo(t){return!(!go(t)&&!t.variants)}function xo(t){const{initial:n,animate:i}=function(t,e){if(go(t)){const{initial:e,animate:n}=t;return{initial:!1===e||fo(e)?e:void 0,animate:fo(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,e.useContext(po));return e.useMemo(()=>({initial:n,animate:i}),[yo(n),yo(i)])}function yo(t){return Array.isArray(t)?t.join(" "):t}const bo={};function wo(t,{layout:e,layoutId:n}){return Ii.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!bo[t]||"opacity"===t)}const Ao={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},So=Ei.length;function Co(t,e,n){const{style:i,vars:r,transformOrigin:o}=t;let a=!1,s=!1;for(const t in e){const n=e[t];if(Ii.has(t))a=!0;else if(Be(t))r[t]=n;else{const e=Cr(n,xr[t]);t.startsWith("origin")?(s=!0,o[t]=e):i[t]=e}}if(e.transform||(a||n?i.transform=function(t,e,n){let i="",r=!0;for(let o=0;o<So;o++){const a=Ei[o],s=t[a];if(void 0===s)continue;let c=!0;if(c="number"==typeof s?s===(a.startsWith("scale")?1:0):0===parseFloat(s),!c||n){const t=Cr(s,xr[a]);c||(r=!1,i+=`${Ao[a]||a}(${t}) `),n&&(e[a]=t)}}return i=i.trim(),n?i=n(e,r?"":i):r&&(i="none"),i}(e,t.transform,n):i.transform&&(i.transform="none")),s){const{originX:t="50%",originY:e="50%",originZ:n=0}=o;i.transformOrigin=`${t} ${e} ${n}`}}const Po=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ko(t,e,n){for(const i in e)!_r(e[i])&&!wo(i,n)&&(t[i]=e[i])}function To(t,n){const i={};return ko(i,t.style||{},t),Object.assign(i,function({transformTemplate:t},n){return e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{}};return Co(e,n,t),Object.assign({},e.vars,e.style)},[n])}(t,n)),i}function Eo(t,e){const n={},i=To(t,e);return t.drag&&!1!==t.dragListener&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=i,n}const Io={offset:"stroke-dashoffset",array:"stroke-dasharray"},Mo={offset:"strokeDashoffset",array:"strokeDasharray"};function jo(t,{attrX:e,attrY:n,attrScale:i,pathLength:r,pathSpacing:o=1,pathOffset:a=0,...s},c,l,p){if(Co(t,s,l),c)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:u,style:d}=t;u.transform&&(d.transform=u.transform,delete u.transform),(d.transform||u.transformOrigin)&&(d.transformOrigin=u.transformOrigin??"50% 50%",delete u.transformOrigin),d.transform&&(d.transformBox=p?.transformBox??"fill-box",delete u.transformBox),void 0!==e&&(u.x=e),void 0!==n&&(u.y=n),void 0!==i&&(u.scale=i),void 0!==r&&function(t,e,n=1,i=0,r=!0){t.pathLength=1;const o=r?Io:Mo;t[o.offset]=rn.transform(-i);const a=rn.transform(e),s=rn.transform(n);t[o.array]=`${a} ${s}`}(u,r,o,a,!1)}const Do=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}}),Fo=t=>"string"==typeof t&&"svg"===t.toLowerCase();function Uo(t,n,i,r){const o=e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return jo(e,n,Fo(r),t.transformTemplate,t.style),{...e.attrs,style:{...e.style}}},[n]);if(t.style){const e={};ko(e,t.style,t),o.style={...e,...o.style}}return o}const Ro=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Oo(t){return"string"==typeof t&&!t.includes("-")&&!!(Ro.indexOf(t)>-1||/[A-Z]/u.test(t))}function Lo(t,n,i,{latestValues:r},o,a=!1){const s=(Oo(t)?Uo:Eo)(n,r,o,t),c=function(t,e,n){const i={};for(const r in t)"values"===r&&"object"==typeof t.values||(co(r)||!0===n&&so(r)||!e&&!so(r)||t.draggable&&r.startsWith("onDrag"))&&(i[r]=t[r]);return i}(n,"string"==typeof t,a),l=t!==e.Fragment?{...c,...s,ref:i}:{},{children:p}=n,u=e.useMemo(()=>_r(p)?p.get():p,[p]);return e.createElement(t,{...l,children:u})}function No(t){const e=[{},{}];return t?.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function Bo(t,e,n,i){if("function"==typeof e){const[r,o]=No(i);e=e(void 0!==n?n:t.custom,r,o)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[r,o]=No(i);e=e(void 0!==n?n:t.custom,r,o)}return e}function Vo(t){return _r(t)?t.get():t}function qo(t,e,n,i){const r={},o=i(t,{});for(const t in o)r[t]=Vo(o[t]);let{initial:a,animate:s}=t;const c=go(t),l=vo(t);e&&l&&!c&&!1!==t.inherit&&(void 0===a&&(a=e.initial),void 0===s&&(s=e.animate));let p=!!n&&!1===n.initial;p=p||!1===a;const u=p?s:a;if(u&&"boolean"!=typeof u&&!uo(u)){const e=Array.isArray(u)?u:[u];for(let n=0;n<e.length;n++){const i=Bo(t,e[n]);if(i){const{transitionEnd:t,transition:e,...n}=i;for(const t in n){let e=n[t];if(Array.isArray(e)){e=e[p?e.length-1:0]}null!==e&&(r[t]=e)}for(const e in t)r[e]=t[e]}}}return r}const zo=t=>(n,i)=>{const r=e.useContext(po),o=e.useContext(Gt),a=()=>function({scrapeMotionValuesFromProps:t,createRenderState:e},n,i,r){return{latestValues:qo(n,i,r,t),renderState:e()}}(t,n,r,o);return i?a():qt(a)};function _o(t,e,n){const{style:i}=t,r={};for(const o in i)(_r(i[o])||e.style&&_r(e.style[o])||wo(o,t)||void 0!==n?.getValue(o)?.liveStyle)&&(r[o]=i[o]);return r}const Go=zo({scrapeMotionValuesFromProps:_o,createRenderState:Po});function $o(t,e,n){const i=_o(t,e,n);for(const n in t)if(_r(t[n])||_r(e[n])){i[-1!==Ei.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return i}const Ho=zo({scrapeMotionValuesFromProps:$o,createRenderState:Do}),Wo=Symbol.for("motionComponentSymbol");function Xo(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function Yo(t,n,i){return e.useCallback(e=>{e&&t.onMount&&t.onMount(e),n&&(e?n.mount(e):n.unmount()),i&&("function"==typeof i?i(e):Xo(i)&&(i.current=e))},[n])}const Ko=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Zo="data-"+Ko("framerAppearId"),Qo=e.createContext({});function Jo(t,n,i,r,o){const{visualElement:a}=e.useContext(po),s=e.useContext(io),c=e.useContext(Gt),l=e.useContext($r).reducedMotion,p=e.useRef(null);r=r||s.renderer,!p.current&&r&&(p.current=r(t,{visualState:n,parent:a,props:i,presenceContext:c,blockInitialAnimation:!!c&&!1===c.initial,reducedMotionConfig:l}));const u=p.current,d=e.useContext(Qo);u&&!u.projection&&o&&("html"===u.type||"svg"===u.type)&&function(t,e,n,i){const{layoutId:r,layout:o,drag:a,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutCrossfade:p}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:ta(t.parent)),t.projection.setOptions({layoutId:r,layout:o,alwaysMeasureLayout:!!a||s&&Xo(s),visualElement:t,animationType:"string"==typeof o?o:"both",initialPromotionConfig:i,crossfade:p,layoutScroll:c,layoutRoot:l})}(p.current,i,o,d);const f=e.useRef(!1);e.useInsertionEffect(()=>{u&&f.current&&u.update(i,c)});const m=i[Zo],h=e.useRef(!!m&&!window.MotionHandoffIsComplete?.(m)&&window.MotionHasOptimisedAnimation?.(m));return _t(()=>{u&&(f.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),u.scheduleRenderMicrotask(),h.current&&u.animationState&&u.animationState.animateChanges())}),e.useEffect(()=>{u&&(!h.current&&u.animationState&&u.animationState.animateChanges(),h.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(m)}),h.current=!1),u.enteringChildren=void 0)}),u}function ta(t){if(t)return!1!==t.options.allowProjection?t.projection:ta(t.parent)}var ea={};function na(t,{forwardMotionProps:n=!1}={},r,o){r&&function(t){for(const e in t)oo[e]={...oo[e],...t[e]}}(r);const a=Oo(t)?Ho:Go;function s(s,c){let l;const p={...e.useContext($r),...s,layoutId:ia(s)},{isStatic:u}=p,d=xo(s),f=a(s,u);if(!u&&zt){!function(t,n){const i=e.useContext(io).strict;if("production"!==ea.NODE_ENV&&n&&i){const e="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";t.ignoreStrict?Yt(!1,e,"lazy-strict-mode"):Kt(!1,e,"lazy-strict-mode")}}(p,r);const n=function(t){const{drag:e,layout:n}=oo;if(!e&&!n)return{};const i={...e,...n};return{MeasureLayout:e?.isEnabled(t)||n?.isEnabled(t)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}(p);l=n.MeasureLayout,d.visualElement=Jo(t,f,p,o,n.ProjectionNode)}return i.jsxs(po.Provider,{value:d,children:[l&&d.visualElement?i.jsx(l,{visualElement:d.visualElement,...p}):null,Lo(t,s,Yo(f,d.visualElement,c),f,u,n)]})}s.displayName=`motion.${"string"==typeof t?t:`create(${t.displayName??t.name??""})`}`;const c=e.forwardRef(s);return c[Wo]=t,c}function ia({layoutId:t}){const n=e.useContext(Vt).id;return n&&void 0!==t?n+"-"+t:t}var ra={};function oa(t,e){if(typeof Proxy>"u")return na;const n=new Map,i=(n,i)=>na(n,i,t,e);return new Proxy((t,e)=>("production"!==ra.NODE_ENV&&ue(!1,"motion() is deprecated. Use motion.create() instead."),i(t,e)),{get:(r,o)=>"create"===o?i:(n.has(o)||n.set(o,na(o,void 0,t,e)),n.get(o))})}function aa({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function sa(t){return void 0===t||1===t}function ca({scale:t,scaleX:e,scaleY:n}){return!sa(t)||!sa(e)||!sa(n)}function la(t){return ca(t)||pa(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function pa(t){return ua(t.x)||ua(t.y)}function ua(t){return t&&"0%"!==t}function da(t,e,n){return n+e*(t-n)}function fa(t,e,n,i,r){return void 0!==r&&(t=da(t,r,i)),da(t,n,i)+e}function ma(t,e=0,n=1,i,r){t.min=fa(t.min,e,n,i,r),t.max=fa(t.max,e,n,i,r)}function ha(t,{x:e,y:n}){ma(t.x,e.translate,e.scale,e.originPoint),ma(t.y,n.translate,n.scale,n.originPoint)}const ga=.999999999999,va=1.0000000000001;function xa(t,e){t.min=t.min+e,t.max=t.max+e}function ya(t,e,n,i,r=.5){ma(t,e,n,wn(t.min,t.max,r),i)}function ba(t,e){ya(t.x,e.x,e.scaleX,e.scale,e.originX),ya(t.y,e.y,e.scaleY,e.scale,e.originY)}function wa(t,e){return aa(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}(t.getBoundingClientRect(),e))}const Aa=()=>({x:{min:0,max:0},y:{min:0,max:0}}),Sa={current:null},Ca={current:!1};const Pa=new WeakMap;var ka={};const Ta=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Ea{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,blockInitialAnimation:r,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Vi,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const t=Le.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,je.render(this.render,!1,!0))};const{latestValues:s,renderState:c}=o;this.latestValues=s,this.baseTarget={...s},this.initialValues=e.initial?{...s}:{},this.renderState=c,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!r,this.isControllingVariants=go(e),this.isVariantNode=vo(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!(!t||!t.current);const{willChange:l,...p}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in p){const e=p[t];void 0!==s[t]&&_r(e)&&e.set(s[t])}}mount(t){this.current=t,Pa.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),Ca.current||function(){if(Ca.current=!0,zt)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Sa.current=t.matches;t.addEventListener("change",e),e()}else Sa.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Sa.current),"production"!==ka.NODE_ENV&&ue(!0!==this.shouldReduceMotion,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),De(this.notifyUpdate),De(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,e){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=Ii.has(t);n&&this.onBindTransform&&this.onBindTransform();const i=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&je.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{i(),r&&r(),e.owner&&e.stop()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in oo){const e=oo[t];if(!e)continue;const{isEnabled:n,Feature:i}=e;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<Ta.length;e++){const n=Ta[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const i=t["on"+n];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=function(t,e,n){for(const i in e){const r=e[i],o=n[i];if(_r(r))t.addValue(i,r);else if(_r(o))t.addValue(i,Er(r,{owner:t}));else if(o!==r)if(t.hasValue(i)){const e=t.getValue(i);!0===e.liveStyle?e.jump(r):e.hasAnimated||e.set(r)}else{const e=t.getStaticValue(i);t.addValue(i,Er(void 0!==e?e:r,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=Er(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){let n=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];return null!=n&&("string"==typeof n&&(Qt(n)||te(n))?n=parseFloat(n):!(t=>Gr.find(lr(t)))(n)&&xn.test(e)&&(n=wr(t,e)),this.setBaseTarget(t,_r(n)?n.get():n)),_r(n)?n.get():n}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){const{initial:e}=this.props;let n;if("string"==typeof e||"object"==typeof e){const i=Bo(this.props,e,this.presenceContext?.custom);i&&(n=i[t])}if(e&&void 0!==n)return n;const i=this.getBaseTargetFromProps(this.props,t);return void 0===i||_r(i)?void 0!==this.initialValues[t]&&void 0===n?void 0:this.baseTarget[t]:i}on(t,e){return this.events[t]||(this.events[t]=new ae),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}scheduleRenderMicrotask(){Ir.render(this.render)}}class Ia extends Ea{constructor(){super(...arguments),this.KeyframeResolver=Sr}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;_r(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}function Ma(t,{style:e,vars:n},i,r){const o=t.style;let a;for(a in e)o[a]=e[a];for(a in r?.applyProjectionStyles(o,i),n)o.setProperty(a,n[a])}class ja extends Ia{constructor(){super(...arguments),this.type="html",this.renderInstance=Ma}readValueFromInstance(t,e){if(Ii.has(e))return this.projection?.isProjecting?Pi(e):((t,e)=>{const{transform:n="none"}=getComputedStyle(t);return ki(n,e)})(t,e);{const n=function(t){return window.getComputedStyle(t)}(t),i=(Be(e)?n.getPropertyValue(e):n[e])||0;return"string"==typeof i?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:e}){return wa(t,e)}build(t,e,n){Co(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return _o(t,e,n)}}const Da=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);class Fa extends Ia{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Aa}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(Ii.has(e)){const t=br(e);return t&&t.default||0}return e=Da.has(e)?e:Ko(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return $o(t,e,n)}build(t,e,n){jo(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,i){!function(t,e,n,i){Ma(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(Da.has(n)?n:Ko(n),e.attrs[n])}(t,e,0,i)}mount(t){this.isSVGTag=Fo(t.tagName),super.mount(t)}}const Ua=(t,n)=>Oo(t)?new Fa(n):new ja(n,{allowProjection:t!==e.Fragment});function Ra(t,e,n){const i=t.getProps();return Bo(i,e,void 0!==n?n:i.custom,t)}const Oa=t=>Array.isArray(t);function La(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Er(n))}function Na(t){return Oa(t)?t[t.length-1]||0:t}function Ba(t,e){const n=t.getValue("willChange");if(function(t){return!(!_r(t)||!t.add)}(n))return n.add(e);if(!n&&Zt.WillChange){const n=new Zt.WillChange("auto");t.addValue("willChange",n),n.add(e)}}function Va(t){return t.props[Zo]}const qa=t=>null!==t;const za={type:"spring",stiffness:500,damping:25,restSpeed:10},_a={type:"keyframes",duration:.8},Ga={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},$a=(t,{keyframes:e})=>e.length>2?_a:Ii.has(t)?t.startsWith("scale")?(t=>({type:"spring",stiffness:550,damping:0===t?2*Math.sqrt(550):30,restSpeed:10}))(e[1]):za:Ga;const Ha=(t,e,n,i={},r,o)=>a=>{const s=sr(i,t)||{},c=s.delay||i.delay||0;let{elapsed:l=0}=i;l-=se(c);const p={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...s,delay:-l,onUpdate:t=>{e.set(t),s.onUpdate&&s.onUpdate(t)},onComplete:()=>{a(),s.onComplete&&s.onComplete()},name:t,motionValue:e,element:o?void 0:r};(function({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:r,repeat:o,repeatType:a,repeatDelay:s,from:c,elapsed:l,...p}){return!!Object.keys(p).length})(s)||Object.assign(p,$a(t,p)),p.duration&&(p.duration=se(p.duration)),p.repeatDelay&&(p.repeatDelay=se(p.repeatDelay)),void 0!==p.from&&(p.keyframes[0]=p.from);let u=!1;if((!1===p.type||0===p.duration&&!p.repeatDelay)&&(er(p),0===p.delay&&(u=!0)),(Zt.instantAnimations||Zt.skipAnimations)&&(u=!0,er(p),p.delay=0),p.allowFlatten=!s.type&&!s.ease,u&&!o&&void 0!==e.get()){const t=function(t,{repeat:e,repeatType:n="loop"}){const i=t.filter(qa);return i[e&&"loop"!==n&&e%2==1?0:i.length-1]}(p.keyframes,s);if(void 0!==t)return void je.update(()=>{p.onUpdate(t),p.onComplete()})}return s.isSync?new vi(p):new rr(p)};function Wa({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function Xa(t,e,{delay:n=0,transitionOverride:i,type:r}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:a,...s}=e;i&&(o=i);const c=[],l=r&&t.animationState&&t.animationState.getState()[r];for(const e in s){const i=t.getValue(e,t.latestValues[e]??null),r=s[e];if(void 0===r||l&&Wa(l,e))continue;const a={delay:n,...sr(o||{},e)},p=i.get();if(void 0!==p&&!i.isAnimating&&!Array.isArray(r)&&r===p&&!a.velocity)continue;let u=!1;if(window.MotionHandoffAnimation){const n=Va(t);if(n){const t=window.MotionHandoffAnimation(n,e,je);null!==t&&(a.startTime=t,u=!0)}}Ba(t,e),i.start(Ha(e,i,r,t.shouldReduceMotion&&cr.has(e)?{type:!1}:a,t,u));const d=i.animation;d&&c.push(d)}return a&&Promise.all(c).then(()=>{je.update(()=>{a&&function(t,e){const n=Ra(t,e);let{transitionEnd:i={},transition:r={},...o}=n||{};o={...o,...i};for(const e in o)La(t,e,Na(o[e]))}(t,a)})}),c}function Ya(t,e,n,i=0,r=1){const o=Array.from(t).sort((t,e)=>t.sortNodePosition(e)).indexOf(e),a=t.size,s=(a-1)*i;return"function"==typeof n?n(o,a):1===r?o*i:s-o*i}function Ka(t,e,n={}){const i=Ra(t,e,"exit"===n.type?t.presenceContext?.custom:void 0);let{transition:r=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(r=n.transitionOverride);const o=i?()=>Promise.all(Xa(t,i,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(i=0)=>{const{delayChildren:o=0,staggerChildren:a,staggerDirection:s}=r;return function(t,e,n=0,i=0,r=0,o=1,a){const s=[];for(const c of t.variantChildren)c.notify("AnimationStart",e),s.push(Ka(c,e,{...a,delay:n+("function"==typeof i?0:i)+Ya(t.variantChildren,c,i,r,o)}).then(()=>c.notify("AnimationComplete",e)));return Promise.all(s)}(t,e,i,o,a,s,n)}:()=>Promise.resolve(),{when:s}=r;if(s){const[t,e]="beforeChildren"===s?[o,a]:[a,o];return t().then(()=>e())}return Promise.all([o(),a(n.delay)])}function Za(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}const Qa=ho.length;function Ja(t){if(!t)return;if(!t.isControllingVariants){const e=t.parent&&Ja(t.parent)||{};return void 0!==t.props.initial&&(e.initial=t.props.initial),e}const e={};for(let n=0;n<Qa;n++){const i=ho[n],r=t.props[i];(fo(r)||!1===r)&&(e[i]=r)}return e}const ts=[...mo].reverse(),es=mo.length;function ns(t){return e=>Promise.all(e.map(({animation:e,options:n})=>function(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const r=e.map(e=>Ka(t,e,n));i=Promise.all(r)}else if("string"==typeof e)i=Ka(t,e,n);else{const r="function"==typeof e?Ra(t,e,n.custom):e;i=Promise.all(Xa(t,r,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}(t,e,n)))}function is(t){let e=ns(t),n=as(),i=!0;const r=e=>(n,i)=>{const r=Ra(t,i,"exit"===e?t.presenceContext?.custom:void 0);if(r){const{transition:t,transitionEnd:e,...i}=r;n={...n,...i,...e}}return n};function o(o){const{props:a}=t,s=Ja(t.parent)||{},c=[],l=new Set;let p={},u=1/0;for(let e=0;e<es;e++){const d=ts[e],f=n[d],m=void 0!==a[d]?a[d]:s[d],h=fo(m),g=d===o?f.isActive:null;!1===g&&(u=e);let v=m===s[d]&&m!==a[d]&&h;if(v&&i&&t.manuallyAnimateOnMount&&(v=!1),f.protectedKeys={...p},!f.isActive&&null===g||!m&&!f.prevProp||uo(m)||"boolean"==typeof m)continue;const x=rs(f.prevProp,m);let y=x||d===o&&f.isActive&&!v&&h||e>u&&h,b=!1;const w=Array.isArray(m)?m:[m];let A=w.reduce(r(d),{});!1===g&&(A={});const{prevResolvedValues:S={}}=f,C={...S,...A},P=e=>{y=!0,l.has(e)&&(b=!0,l.delete(e)),f.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)};for(const t in C){const e=A[t],n=S[t];if(p.hasOwnProperty(t))continue;let i=!1;i=Oa(e)&&Oa(n)?!Za(e,n):e!==n,i?null!=e?P(t):l.add(t):void 0!==e&&l.has(t)?P(t):f.protectedKeys[t]=!0}f.prevProp=m,f.prevResolvedValues=A,f.isActive&&(p={...p,...A}),i&&t.blockInitialAnimation&&(y=!1);const k=v&&x;y&&(!k||b)&&c.push(...w.map(e=>{const n={type:d};if("string"==typeof e&&i&&!k&&t.manuallyAnimateOnMount&&t.parent){const{parent:i}=t,r=Ra(i,e);if(i.enteringChildren&&r){const{delayChildren:e}=r.transition||{};n.delay=Ya(i.enteringChildren,t,e)}}return{animation:e,options:n}}))}if(l.size){const e={};if("boolean"!=typeof a.initial){const n=Ra(t,Array.isArray(a.initial)?a.initial[0]:a.initial);n&&n.transition&&(e.transition=n.transition)}l.forEach(n=>{const i=t.getBaseTarget(n),r=t.getValue(n);r&&(r.liveStyle=!0),e[n]=i??null}),c.push({animation:e})}let d=!!c.length;return i&&(!1===a.initial||a.initial===a.animate)&&!t.manuallyAnimateOnMount&&(d=!1),i=!1,d?e(c):Promise.resolve()}return{animateChanges:o,setActive:function(e,i){if(n[e].isActive===i)return Promise.resolve();t.variantChildren?.forEach(t=>t.animationState?.setActive(e,i)),n[e].isActive=i;const r=o(e);for(const t in n)n[t].protectedKeys={};return r},setAnimateFunction:function(n){e=n(t)},getState:()=>n,reset:()=>{n=as()}}}function rs(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!Za(e,t)}function os(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function as(){return{animate:os(!0),whileInView:os(),whileHover:os(),whileTap:os(),whileDrag:os(),whileFocus:os(),exit:os()}}class ss{constructor(t){this.isMounted=!1,this.node=t}update(){}}let cs=0;const ls={animation:{Feature:class extends ss{constructor(t){super(t),t.animationState||(t.animationState=is(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();uo(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}},exit:{Feature:class extends ss{constructor(){super(...arguments),this.id=cs++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const i=this.node.animationState.setActive("exit",!t);e&&!t&&i.then(()=>{e(this.id)})}mount(){const{register:t,onExitComplete:e}=this.node.presenceContext||{};e&&e(this.id),t&&(this.unmount=t(this.id))}unmount(){}}}};function ps(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}function us(t){return{point:{x:t.pageX,y:t.pageY}}}function ds(t,e,n,i){return ps(t,e,(t=>e=>Rr(e)&&t(e,us(e)))(n),i)}function fs(t){return t.max-t.min}function ms(t,e,n,i=.5){t.origin=i,t.originPoint=wn(e.min,e.max,t.origin),t.scale=fs(n)/fs(e),t.translate=wn(n.min,n.max,t.origin)-t.originPoint,(t.scale>=.9999&&t.scale<=1.0001||isNaN(t.scale))&&(t.scale=1),(t.translate>=-.01&&t.translate<=.01||isNaN(t.translate))&&(t.translate=0)}function hs(t,e,n,i){ms(t.x,e.x,n.x,i?i.originX:void 0),ms(t.y,e.y,n.y,i?i.originY:void 0)}function gs(t,e,n){t.min=n.min+e.min,t.max=t.min+fs(e)}function vs(t,e,n){t.min=e.min-n.min,t.max=t.min+fs(e)}function xs(t,e,n){vs(t.x,e.x,n.x),vs(t.y,e.y,n.y)}function ys(t){return[t("x"),t("y")]}const bs=({current:t})=>t?t.ownerDocument.defaultView:null,ws=(t,e)=>Math.abs(t-e);class As{constructor(t,e,{transformPagePoint:n,contextWindow:i=window,dragSnapToOrigin:r=!1,distanceThreshold:o=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const t=Ps(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=function(t,e){const n=ws(t.x,e.x),i=ws(t.y,e.y);return Math.sqrt(n**2+i**2)}(t.offset,{x:0,y:0})>=this.distanceThreshold;if(!e&&!n)return;const{point:i}=t,{timestamp:r}=Fe;this.history.push({...i,timestamp:r});const{onStart:o,onMove:a}=this.handlers;e||(o&&o(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),a&&a(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=Ss(e,this.transformPagePoint),je.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();const{onEnd:n,onSessionEnd:i,resumeAnimation:r}=this.handlers;if(this.dragSnapToOrigin&&r&&r(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=Ps("pointercancel"===t.type?this.lastMoveEventInfo:Ss(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,o),i&&i(t,o)},!Rr(t))return;this.dragSnapToOrigin=r,this.handlers=e,this.transformPagePoint=n,this.distanceThreshold=o,this.contextWindow=i||window;const a=Ss(us(t),this.transformPagePoint),{point:s}=a,{timestamp:c}=Fe;this.history=[{...s,timestamp:c}];const{onSessionStart:l}=e;l&&l(t,Ps(a,this.history)),this.removeListeners=re(ds(this.contextWindow,"pointermove",this.handlePointerMove),ds(this.contextWindow,"pointerup",this.handlePointerUp),ds(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),De(this.updatePoint)}}function Ss(t,e){return e?{point:e(t.point)}:t}function Cs(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Ps({point:t},e){return{point:t,delta:Cs(t,Ts(e)),offset:Cs(t,ks(e)),velocity:Es(e,.1)}}function ks(t){return t[0]}function Ts(t){return t[t.length-1]}function Es(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const r=Ts(t);for(;n>=0&&(i=t[n],!(r.timestamp-i.timestamp>se(e)));)n--;if(!i)return{x:0,y:0};const o=ce(r.timestamp-i.timestamp);if(0===o)return{x:0,y:0};const a={x:(r.x-i.x)/o,y:(r.y-i.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Is(t,e,n){return{min:void 0!==e?t.min+e:void 0,max:void 0!==n?t.max+n-(t.max-t.min):void 0}}function Ms(t,e){let n=e.min-t.min,i=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,i]=[i,n]),{min:n,max:i}}const js=.35;function Ds(t,e,n){return{min:Fs(t,e),max:Fs(t,n)}}function Fs(t,e){return"number"==typeof t?t:t[e]||0}const Us=new WeakMap;class Rs{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:e=!1,distanceThreshold:n}={}){const{presenceContext:i}=this.visualElement;if(i&&!1===i.isPresent)return;const{dragSnapToOrigin:r}=this.getProps();this.panSession=new As(t,{onSessionStart:t=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),e&&this.snapToCursor(us(t).point)},onStart:(t,e)=>{const{drag:n,dragPropagation:i,onDragStart:r}=this.getProps();if(n&&!i&&(this.openDragLock&&this.openDragLock(),this.openDragLock=function(t){return"x"===t||"y"===t?Mr[t]?null:(Mr[t]=!0,()=>{Mr[t]=!1}):Mr.x||Mr.y?null:(Mr.x=Mr.y=!0,()=>{Mr.x=Mr.y=!1})}(n),!this.openDragLock))return;this.latestPointerEvent=t,this.latestPanInfo=e,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ys(t=>{let e=this.getAxisMotionValue(t).get()||0;if(nn.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const i=n.layout.layoutBox[t];i&&(e=fs(i)*(parseFloat(e)/100))}}this.originPoint[t]=e}),r&&je.postRender(()=>r(t,e)),Ba(this.visualElement,"transform");const{animationState:o}=this.visualElement;o&&o.setActive("whileDrag",!0)},onMove:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e;const{dragPropagation:n,dragDirectionLock:i,onDirectionLock:r,onDrag:o}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:a}=e;if(i&&null===this.currentDirection)return this.currentDirection=function(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}(a),void(null!==this.currentDirection&&r&&r(this.currentDirection));this.updateAxis("x",e.point,a),this.updateAxis("y",e.point,a),this.visualElement.render(),o&&o(t,e)},onSessionEnd:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e,this.stop(t,e),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>ys(t=>"paused"===this.getAnimationState(t)&&this.getAxisMotionValue(t).animation?.play())},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:r,distanceThreshold:n,contextWindow:bs(this.visualElement)})}stop(t,e){const n=t||this.latestPointerEvent,i=e||this.latestPanInfo,r=this.isDragging;if(this.cancel(),!r||!i||!n)return;const{velocity:o}=i;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&je.postRender(()=>a(n,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),e&&e.setActive("whileDrag",!1)}updateAxis(t,e,n){const{drag:i}=this.getProps();if(!n||!Os(t,i,this.currentDirection))return;const r=this.getAxisMotionValue(t);let o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=function(t,{min:e,max:n},i){return void 0!==e&&t<e?t=i?wn(e,t,i.min):Math.max(t,e):void 0!==n&&t>n&&(t=i?wn(n,t,i.max):Math.min(t,n)),t}(o,this.constraints[t],this.elastic[t])),r.set(o)}resolveConstraints(){const{dragConstraints:t,dragElastic:e}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;t&&Xo(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!n)&&function(t,{top:e,left:n,bottom:i,right:r}){return{x:Is(t.x,n,r),y:Is(t.y,e,i)}}(n.layoutBox,t),this.elastic=function(t=js){return!1===t?t=0:!0===t&&(t=js),{x:Ds(t,"left","right"),y:Ds(t,"top","bottom")}}(e),i!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&ys(t=>{!1!==this.constraints&&this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){const n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(n.layoutBox[t],this.constraints[t]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!t||!Xo(t))return!1;const n=t.current;Kt(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const r=function(t,e,n){const i=wa(t,n),{scroll:r}=e;return r&&(xa(i.x,r.offset.x),xa(i.y,r.offset.y)),i}(n,i.root,this.visualElement.getTransformPagePoint());let o=function(t,e){return{x:Ms(t.x,e.x),y:Ms(t.y,e.y)}}(i.layout.layoutBox,r);if(e){const t=e(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(o));this.hasMutatedConstraints=!!t,t&&(o=aa(t))}return o}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:i,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),s=this.constraints||{},c=ys(a=>{if(!Os(a,e,this.currentDirection))return;let c=s&&s[a]||{};o&&(c={min:0,max:0});const l=i?200:1e6,p=i?40:1e7,u={type:"inertia",velocity:n?t[a]:0,bounceStiffness:l,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...r,...c};return this.startAxisValueAnimation(a,u)});return Promise.all(c).then(a)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return Ba(this.visualElement,t),n.start(Ha(t,n,0,e,this.visualElement,!1))}stopAnimation(){ys(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){ys(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const e=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps();return n[e]||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){ys(e=>{const{drag:n}=this.getProps();if(!Os(e,n,this.currentDirection))return;const{projection:i}=this.visualElement,r=this.getAxisMotionValue(e);if(i&&i.layout){const{min:n,max:o}=i.layout.layoutBox[e];r.set(t[e]-wn(n,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!Xo(e)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};ys(t=>{const e=this.getAxisMotionValue(t);if(e&&!1!==this.constraints){const n=e.get();i[t]=function(t,e){let n=.5;const i=fs(t),r=fs(e);return r>i?n=oe(e.min,e.max-i,t.min):i>r&&(n=oe(t.min,t.max-r,e.min)),Wt(0,1,n)}({min:n,max:n},this.constraints[t])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),ys(e=>{if(!Os(e,t,null))return;const n=this.getAxisMotionValue(e),{min:r,max:o}=this.constraints[e];n.set(wn(r,o,i[e]))})}addListeners(){if(!this.visualElement.current)return;Us.set(this.visualElement,this);const t=ds(this.visualElement.current,"pointerdown",t=>{const{drag:e,dragListener:n=!0}=this.getProps();e&&n&&this.start(t)}),e=()=>{const{dragConstraints:t}=this.getProps();Xo(t)&&t.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,i=n.addEventListener("measure",e);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),je.read(e);const r=ps(window,"resize",()=>this.scalePositionWithinConstraints()),o=n.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(ys(e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))}),this.visualElement.render())});return()=>{r(),t(),i(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:r=!1,dragElastic:o=js,dragMomentum:a=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:i,dragConstraints:r,dragElastic:o,dragMomentum:a}}}function Os(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const Ls=t=>(e,n)=>{t&&je.postRender(()=>t(e,n))};const Ns={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Bs(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Vs={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!rn.test(t))return t;t=parseFloat(t)}return`${Bs(t,e.target.x)}% ${Bs(t,e.target.y)}%`}},qs={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,r=xn.parse(t);if(r.length>5)return i;const o=xn.createTransformer(t),a="number"!=typeof r[0]?1:0,s=n.x.scale*e.x,c=n.y.scale*e.y;r[0+a]/=s,r[1+a]/=c;const l=wn(s,c,.5);return"number"==typeof r[2+a]&&(r[2+a]/=l),"number"==typeof r[3+a]&&(r[3+a]/=l),o(r)}};let zs=!1;class _s extends e.Component{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:i}=this.props,{projection:r}=t;(function(t){for(const e in t)bo[e]=t[e],Be(e)&&(bo[e].isCSSVariable=!0)})($s),r&&(e.group&&e.group.add(r),n&&n.register&&i&&n.register(r),zs&&r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,onExitComplete:()=>this.safeToRemove()})),Ns.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:i,isPresent:r}=this.props,{projection:o}=n;return o&&(o.isPresent=r,zs=!0,i||t.layoutDependency!==e||void 0===e||t.isPresent!==r?o.willUpdate():this.safeToRemove(),t.isPresent!==r&&(r?o.promote():o.relegate()||je.postRender(()=>{const t=o.getStack();(!t||!t.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Ir.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n}=this.props,{projection:i}=t;zs=!0,i&&(i.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Gs(t){const[n,r]=Qr(),o=e.useContext(Vt);return i.jsx(_s,{...t,layoutGroup:o,switchLayoutGroup:e.useContext(Qo),isPresent:n,safeToRemove:r})}const $s={borderRadius:{...Vs,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Vs,borderTopRightRadius:Vs,borderBottomLeftRadius:Vs,borderBottomRightRadius:Vs,boxShadow:qs};const Hs=(t,e)=>t.depth-e.depth;class Ws{constructor(){this.children=[],this.isDirty=!1}add(t){$t(this.children,t),this.isDirty=!0}remove(t){Ht(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Hs),this.isDirty=!1,this.children.forEach(t)}}const Xs=["TopLeft","TopRight","BottomLeft","BottomRight"],Ys=Xs.length,Ks=t=>"string"==typeof t?parseFloat(t):t,Zs=t=>"number"==typeof t||rn.test(t);function Qs(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const Js=ec(0,.5,we),tc=ec(.5,.95,ne);function ec(t,e,n){return i=>i<t?0:i>e?1:n(oe(t,e,i))}function nc(t,e){t.min=e.min,t.max=e.max}function ic(t,e){nc(t.x,e.x),nc(t.y,e.y)}function rc(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function oc(t,e,n,i,r){return t=da(t-=e,1/n,i),void 0!==r&&(t=da(t,1/r,i)),t}function ac(t,e,[n,i,r],o,a){!function(t,e=0,n=1,i=.5,r,o=t,a=t){if(nn.test(e)&&(e=parseFloat(e),e=wn(a.min,a.max,e/100)-a.min),"number"!=typeof e)return;let s=wn(o.min,o.max,i);t===o&&(s-=e),t.min=oc(t.min,e,n,s,r),t.max=oc(t.max,e,n,s,r)}(t,e[n],e[i],e[r],e.scale,o,a)}const sc=["x","scaleX","originX"],cc=["y","scaleY","originY"];function lc(t,e,n,i){ac(t.x,e,sc,n?n.x:void 0,i?i.x:void 0),ac(t.y,e,cc,n?n.y:void 0,i?i.y:void 0)}function pc(t){return 0===t.translate&&1===t.scale}function uc(t){return pc(t.x)&&pc(t.y)}function dc(t,e){return t.min===e.min&&t.max===e.max}function fc(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function mc(t,e){return fc(t.x,e.x)&&fc(t.y,e.y)}function hc(t){return fs(t.x)/fs(t.y)}function gc(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class vc{constructor(){this.members=[]}add(t){$t(this.members,t),t.scheduleRender()}remove(t){if(Ht(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){const e=this.members.findIndex(e=>t===e);if(0===e)return!1;let n;for(let t=e;t>=0;t--){const e=this.members[t];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,e&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;!1===i&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:e,resumingFrom:n}=t;e.onExitComplete&&e.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const xc=["","X","Y","Z"];let yc=0;function bc(t,e,n,i){const{latestValues:r}=e;r[t]&&(n[t]=r[t],e.setStaticValue(t,0),i&&(i[t]=0))}function wc(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Va(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",je,!(e||i))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&wc(i)}function Ac({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:r}){return class{constructor(t={},n=e?.()){this.id=yc++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Pc),this.nodes.forEach(Dc),this.nodes.forEach(Fc),this.nodes.forEach(kc)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new Ws)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new ae),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const n=this.eventHandlers.get(t);n&&n.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e){if(this.instance)return;this.isSVG=zr(e)&&!function(t){return zr(t)&&"svg"===t.tagName}(e),this.instance=e;const{layoutId:n,layout:i,visualElement:r}=this.options;if(r&&!r.current&&r.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(i||n)&&(this.isLayoutDirty=!0),t){let n,i=0;const r=()=>this.root.updateBlockedByResize=!1;je.read(()=>{i=window.innerWidth}),t(e,()=>{const t=window.innerWidth;t!==i&&(i=t,this.root.updateBlockedByResize=!0,n&&n(),n=function(t,e){const n=Le.now(),i=({timestamp:r})=>{const o=r-n;o>=e&&(De(i),t(o-e))};return je.setup(i,!0),()=>De(i)}(r,250),Ns.hasAnimatedSinceResize&&(Ns.hasAnimatedSinceResize=!1,this.nodes.forEach(jc)))})}n&&this.root.registerSharedNode(n,this),!1!==this.options.animate&&r&&(n||i)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:n,layout:i})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||r.getDefaultTransition()||Bc,{onLayoutAnimationStart:a,onLayoutAnimationComplete:s}=r.getProps(),c=!this.targetLayout||!mc(this.targetLayout,i),l=!e&&n;if(this.options.layoutRoot||this.resumeFrom||l||e&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const e={...sr(o,"layout"),onPlay:a,onComplete:s};(r.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,l)}else e||jc(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=i})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),De(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Uc),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&wc(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:e,layout:n}=this.options;if(void 0===e&&!n)return;const i=this.getTransformTemplate();this.prevTransformTemplateValue=i?i(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(Ec);if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(Ic);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Mc),this.nodes.forEach(Sc),this.nodes.forEach(Cc)):this.nodes.forEach(Ic),this.clearAllSnapshots();const t=Le.now();Fe.delta=Wt(0,1e3/60,t-Fe.timestamp),Fe.timestamp=t,Fe.isProcessing=!0,Ue.update.process(Fe),Ue.preRender.process(Fe),Ue.render.process(Fe),Fe.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ir.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Tc),this.sharedNodes.forEach(Rc)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,je.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){je.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!fs(this.snapshot.measuredBox.x)&&!fs(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!(this.instance&&(this.updateScroll(),this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty)))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t<this.path.length;t++)this.path[t].updateScroll();const t=this.layout;this.layout=this.measure(!1),this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=!(!this.options.layoutScroll||!this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e&&this.instance){const e=i(this.instance);this.scroll={animationId:this.root.animationId,phase:t,isRoot:e,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:e}}}resetTransform(){if(!r)return;const t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,e=this.projectionDelta&&!uc(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,o=i!==this.prevTransformTemplateValue;t&&this.instance&&(e||la(this.latestValues)||o)&&(r(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let n=this.removeElementScroll(e);return t&&(n=this.removeTransform(n)),function(t){zc(t.x),zc(t.y)}(n),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const e=t.measureViewportBox();if(!this.scroll?.wasRoot&&!this.path.some(Gc)){const{scroll:t}=this.root;t&&(xa(e.x,t.offset.x),xa(e.y,t.offset.y))}return e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};if(ic(e,t),this.scroll?.wasRoot)return e;for(let n=0;n<this.path.length;n++){const i=this.path[n],{scroll:r,options:o}=i;i!==this.root&&r&&o.layoutScroll&&(r.wasRoot&&ic(e,t),xa(e.x,r.offset.x),xa(e.y,r.offset.y))}return e}applyTransform(t,e=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};ic(n,t);for(let t=0;t<this.path.length;t++){const i=this.path[t];!e&&i.options.layoutScroll&&i.scroll&&i!==i.root&&ba(n,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),la(i.latestValues)&&ba(n,i.latestValues)}return la(this.latestValues)&&ba(n,this.latestValues),n}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};ic(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!n.instance||!la(n.latestValues))continue;ca(n.latestValues)&&n.updateSnapshot();const i=Aa();ic(i,n.measurePageBox()),lc(e,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,i)}return la(this.latestValues)&&lc(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Fe.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){const e=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=e.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=e.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=e.isSharedProjectionDirty);const n=!!this.resumingFrom||this!==e;if(!(t||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:i,layoutId:r}=this.options;if(this.layout&&(i||r)){if(this.resolvedRelativeTargetAt=Fe.timestamp,!this.targetDelta&&!this.relativeTarget){const t=this.getClosestProjectingParent();t&&t.layout&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},xs(this.relativeTargetOrigin,this.layout.layoutBox,t.layout.layoutBox),ic(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if((this.relativeTarget||this.targetDelta)&&(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),function(t,e,n){gs(t.x,e.x,n.x),gs(t.y,e.y,n.y)}(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):ic(this.target,this.layout.layoutBox),ha(this.target,this.targetDelta)):ic(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const t=this.getClosestProjectingParent();t&&!!t.resumingFrom==!!this.resumingFrom&&!t.options.layoutScroll&&t.target&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},xs(this.relativeTargetOrigin,this.target,t.target),ic(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(this.parent&&!ca(this.parent.latestValues)&&!pa(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!(!(this.relativeTarget||this.targetDelta||this.options.layoutRoot)||!this.layout)}calcProjection(){const t=this.getLead(),e=!!this.resumingFrom||this!==t;let n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),e&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===Fe.timestamp&&(n=!1),n)return;const{layout:i,layoutId:r}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!i&&!r)return;ic(this.layoutCorrected,this.layout.layoutBox);const o=this.treeScale.x,a=this.treeScale.y;(function(t,e,n,i=!1){const r=n.length;if(!r)return;let o,a;e.x=e.y=1;for(let s=0;s<r;s++){o=n[s],a=o.projectionDelta;const{visualElement:r}=o.options;r&&r.props.style&&"contents"===r.props.style.display||(i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&ba(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),a&&(e.x*=a.x.scale,e.y*=a.y.scale,ha(t,a)),i&&la(o.latestValues)&&ba(t,o.latestValues))}e.x<va&&e.x>ga&&(e.x=1),e.y<va&&e.y>ga&&(e.y=1)})(this.layoutCorrected,this.treeScale,this.path,e),t.layout&&!t.target&&(1!==this.treeScale.x||1!==this.treeScale.y)&&(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:s}=t;s?(this.projectionDelta&&this.prevProjectionDelta?(rc(this.prevProjectionDelta.x,this.projectionDelta.x),rc(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),hs(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==o||this.treeScale.y!==a||!gc(this.projectionDelta.x,this.prevProjectionDelta.x)||!gc(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",s))):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){if(this.options.visualElement?.scheduleRender(),t){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(t,e=!1){const n=this.snapshot,i=n?n.latestValues:{},r={...this.latestValues},o={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const a={x:{min:0,max:0},y:{min:0,max:0}},s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),c=this.getStack(),l=!c||c.members.length<=1,p=!(!s||l||!0!==this.options.crossfade||this.path.some(Nc));let u;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;Oc(o.x,t.x,n),Oc(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(xs(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox),function(t,e,n,i){Lc(t.x,e.x,n.x,i),Lc(t.y,e.y,n.y,i)}(this.relativeTarget,this.relativeTargetOrigin,a,n),u&&function(t,e){return dc(t.x,e.x)&&dc(t.y,e.y)}(this.relativeTarget,u)&&(this.isProjectionDirty=!1),u||(u={x:{min:0,max:0},y:{min:0,max:0}}),ic(u,this.relativeTarget)),s&&(this.animationValues=r,function(t,e,n,i,r,o){r?(t.opacity=wn(0,n.opacity??1,Js(i)),t.opacityExit=wn(e.opacity??1,0,tc(i))):o&&(t.opacity=wn(e.opacity??1,n.opacity??1,i));for(let r=0;r<Ys;r++){const o=`border${Xs[r]}Radius`;let a=Qs(e,o),s=Qs(n,o);void 0===a&&void 0===s||(a||(a=0),s||(s=0),0===a||0===s||Zs(a)===Zs(s)?(t[o]=Math.max(wn(Ks(a),Ks(s),i),0),(nn.test(s)||nn.test(a))&&(t[o]+="%")):t[o]=s)}(e.rotate||n.rotate)&&(t.rotate=wn(e.rotate||0,n.rotate||0,i))}(r,i,this.latestValues,n,p,l)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(De(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=je.update(()=>{Ns.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Er(0)),this.currentAnimation=function(t,e,n){const i=_r(t)?t:Er(t);return i.start(Ha("",i,e,n)),i.animation}(this.motionValue,[0,1e3],{...t,velocity:0,isSync:!0,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onStop:()=>{},onComplete:()=>{t.onComplete&&t.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:i,latestValues:r}=t;if(e&&n&&i){if(this!==t&&this.layout&&i&&_c(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=fs(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=fs(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}ic(e,n),ba(e,r),hs(this.projectionDeltaWithTransform,this.layoutCorrected,e,r)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new vc),this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){const{layoutId:t}=this.options;return t&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:t}=this.options;return t?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const i=this.getStack();i&&i.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(e=!0),!e)return;const i={};n.z&&bc("z",t,i,this.animationValues);for(let e=0;e<xc.length;e++)bc(`rotate${xc[e]}`,t,i,this.animationValues),bc(`skew${xc[e]}`,t,i,this.animationValues);t.render();for(const e in i)t.setStaticValue(e,i[e]),this.animationValues&&(this.animationValues[e]=i[e]);t.scheduleRender()}applyProjectionStyles(t,e){if(!this.instance||this.isSVG)return;if(!this.isVisible)return void(t.visibility="hidden");const n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,t.visibility="",t.opacity="",t.pointerEvents=Vo(e?.pointerEvents)||"",void(t.transform=n?n(this.latestValues,""):"none");const i=this.getLead();if(!this.projectionDelta||!this.layout||!i.target)return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=Vo(e?.pointerEvents)||""),void(this.hasProjected&&!la(this.latestValues)&&(t.transform=n?n({},""):"none",this.hasProjected=!1));t.visibility="";const r=i.animationValues||i.latestValues;this.applyTransformsToTarget();let o=function(t,e,n){let i="";const r=t.x.translate/e.x,o=t.y.translate/e.y,a=n?.z||0;if((r||o||a)&&(i=`translate3d(${r}px, ${o}px, ${a}px) `),(1!==e.x||1!==e.y)&&(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:t,rotate:e,rotateX:r,rotateY:o,skewX:a,skewY:s}=n;t&&(i=`perspective(${t}px) ${i}`),e&&(i+=`rotate(${e}deg) `),r&&(i+=`rotateX(${r}deg) `),o&&(i+=`rotateY(${o}deg) `),a&&(i+=`skewX(${a}deg) `),s&&(i+=`skewY(${s}deg) `)}const s=t.x.scale*e.x,c=t.y.scale*e.y;return(1!==s||1!==c)&&(i+=`scale(${s}, ${c})`),i||"none"}(this.projectionDeltaWithTransform,this.treeScale,r);n&&(o=n(r,o)),t.transform=o;const{x:a,y:s}=this.projectionDelta;t.transformOrigin=`${100*a.origin}% ${100*s.origin}% 0`,i.animationValues?t.opacity=i===this?r.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:r.opacityExit:t.opacity=i===this?void 0!==r.opacity?r.opacity:"":void 0!==r.opacityExit?r.opacityExit:0;for(const e in bo){if(void 0===r[e])continue;const{correct:n,applyTo:a,isCSSVariable:s}=bo[e],c="none"===o?r[e]:n(r[e],i);if(a){const e=a.length;for(let n=0;n<e;n++)t[a[n]]=c}else s?this.options.visualElement.renderState.vars[e]=c:t[e]=c}this.options.layoutId&&(t.pointerEvents=i===this?Vo(e?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>t.currentAnimation?.stop()),this.root.nodes.forEach(Ec),this.root.sharedNodes.clear()}}}function Sc(t){t.updateLayout()}function Cc(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=t.layout,{animationType:r}=t.options,o=e.source!==t.layout.source;"size"===r?ys(t=>{const i=o?e.measuredBox[t]:e.layoutBox[t],r=fs(i);i.min=n[t].min,i.max=i.min+r}):_c(r,e.layoutBox,n)&&ys(i=>{const r=o?e.measuredBox[i]:e.layoutBox[i],a=fs(n[i]);r.max=r.min+a,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[i].max=t.relativeTarget[i].min+a)});const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};hs(a,n,e.layoutBox);const s={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o?hs(s,t.applyTransform(i,!0),e.measuredBox):hs(s,n,e.layoutBox);const c=!uc(a);let l=!1;if(!t.resumeFrom){const i=t.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:r,layout:o}=i;if(r&&o){const a={x:{min:0,max:0},y:{min:0,max:0}};xs(a,e.layoutBox,r.layoutBox);const s={x:{min:0,max:0},y:{min:0,max:0}};xs(s,n,o.layoutBox),mc(a,s)||(l=!0),i.options.layoutRoot&&(t.relativeTarget=s,t.relativeTargetOrigin=a,t.relativeParent=i)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:s,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function Pc(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function kc(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Tc(t){t.clearSnapshot()}function Ec(t){t.clearMeasurements()}function Ic(t){t.isLayoutDirty=!1}function Mc(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function jc(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Dc(t){t.resolveTargetDelta()}function Fc(t){t.calcProjection()}function Uc(t){t.resetSkewAndRotation()}function Rc(t){t.removeLeadSnapshot()}function Oc(t,e,n){t.translate=wn(e.translate,0,n),t.scale=wn(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Lc(t,e,n,i){t.min=wn(e.min,n.min,i),t.max=wn(e.max,n.max,i)}function Nc(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const Bc={duration:.45,ease:[.4,0,.1,1]},Vc=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),qc=Vc("applewebkit/")&&!Vc("chrome/")?Math.round:ne;function zc(t){t.min=qc(t.min),t.max=qc(t.max)}function _c(t,e,n){return"position"===t||"preserve-aspect"===t&&!function(t,e,n){return Math.abs(t-e)<=n}(hc(e),hc(n),.2)}function Gc(t){return t!==t.root&&t.scroll?.wasRoot}const $c=Ac({attachResizeListener:(t,e)=>ps(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Hc={current:void 0},Wc=Ac({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Hc.current){const t=new $c({});t.mount(window),t.setOptions({layoutScroll:!0}),Hc.current=t}return Hc.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>"fixed"===window.getComputedStyle(t).position}),Xc={pan:{Feature:class extends ss{constructor(){super(...arguments),this.removePointerDownListener=ne}onPointerDown(t){this.session=new As(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:bs(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:Ls(t),onStart:Ls(e),onMove:n,onEnd:(t,e)=>{delete this.session,i&&je.postRender(()=>i(t,e))}}}mount(){this.removePointerDownListener=ds(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends ss{constructor(t){super(t),this.removeGroupControls=ne,this.removeListeners=ne,this.controls=new Rs(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ne}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:Wc,MeasureLayout:Gs}};function Yc(t,e,n){const{props:i}=t;t.animationState&&i.whileHover&&t.animationState.setActive("whileHover","Start"===n);const r=i["onHover"+n];r&&je.postRender(()=>r(e,us(e)))}function Kc(t,e,n){const{props:i}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&i.whileTap&&t.animationState.setActive("whileTap","Start"===n);const r=i["onTap"+("End"===n?"":n)];r&&je.postRender(()=>r(e,us(e)))}const Zc=new WeakMap,Qc=new WeakMap,Jc=t=>{const e=Zc.get(t.target);e&&e(t)},tl=t=>{t.forEach(Jc)};function el(t,e,n){const i=function({root:t,...e}){const n=t||document;Qc.has(n)||Qc.set(n,{});const i=Qc.get(n),r=JSON.stringify(e);return i[r]||(i[r]=new IntersectionObserver(tl,{root:t,...e})),i[r]}(e);return Zc.set(t,n),i.observe(t),()=>{Zc.delete(t),i.unobserve(t)}}const nl={some:0,all:1};const il={inView:{Feature:class extends ss{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:i="some",once:r}=t,o={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof i?i:nl[i]};return el(this.node.current,o,t=>{const{isIntersecting:e}=t;if(this.isInView===e||(this.isInView=e,r&&!e&&this.hasEnteredView))return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:n,onViewportLeave:i}=this.node.getProps(),o=e?n:i;o&&o(t)})}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends ss{mount(){const{current:t}=this.node;t&&(this.unmount=qr(t,(t,e)=>(Kc(this.node,e,"Start"),(t,{success:e})=>Kc(this.node,t,e?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends ss{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=re(ps(this.node.current,"focus",()=>this.onFocus()),ps(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends ss{mount(){const{current:t}=this.node;t&&(this.unmount=function(t,e,n={}){const[i,r,o]=Dr(t,n),a=t=>{if(!Fr(t))return;const{target:n}=t,i=e(n,t);if("function"!=typeof i||!n)return;const o=t=>{Fr(t)&&(i(t),n.removeEventListener("pointerleave",o))};n.addEventListener("pointerleave",o,r)};return i.forEach(t=>{t.addEventListener("pointerenter",a,r)}),o}(t,(t,e)=>(Yc(this.node,e,"Start"),t=>Yc(this.node,t,"End"))))}unmount(){}}}},rl=oa({...ls,...il,...Xc,...{layout:{ProjectionNode:Wc,MeasureLayout:Gs}}},Ua);function ol(t,e){return new Promise(function(n,i){let r;return al(t).then(function(t){try{return r=t,n(new Blob([e.slice(0,2),r,e.slice(2)],{type:"image/jpeg"}))}catch(t){return i(t)}},i)})}const al=t=>new Promise((e,n)=>{const i=new FileReader;i.addEventListener("load",({target:{result:t}})=>{const i=new DataView(t);let r=0;if(65496!==i.getUint16(r))return n("not a valid JPEG");for(r+=2;;){const o=i.getUint16(r);if(65498===o)break;const a=i.getUint16(r+2);if(65505===o&&1165519206===i.getUint32(r+4)){const o=r+10;let s;switch(i.getUint16(o)){case 18761:s=!0;break;case 19789:s=!1;break;default:return n("TIFF header contains invalid endian")}if(42!==i.getUint16(o+2,s))return n("TIFF header contains invalid version");const c=i.getUint32(o+4,s),l=o+c+2+12*i.getUint16(o+c,s);for(let t=o+c+2;t<l;t+=12)if(274==i.getUint16(t,s)){if(3!==i.getUint16(t+2,s))return n("Orientation data type is invalid");if(1!==i.getUint32(t+4,s))return n("Orientation data count is invalid");i.setUint16(t+8,1,s);break}return e(t.slice(r,r+2+a))}r+=2+a}return e(new Blob)}),i.readAsArrayBuffer(t)});var sl,cl,ll,pl={},ul={get exports(){return pl},set exports(t){pl=t}};ll={},ul.exports=ll,ll.parse=function(t,e){for(var n=ll.bin.readUshort,i=ll.bin.readUint,r=0,o={},a=new Uint8Array(t),s=a.length-4;101010256!=i(a,s);)s--;r=s,r+=4;var c=n(a,r+=4);n(a,r+=2);var l=i(a,r+=2),p=i(a,r+=4);r+=4,r=p;for(var u=0;u<c;u++){i(a,r),r+=4,r+=4,r+=4,i(a,r+=4),l=i(a,r+=4);var d=i(a,r+=4),f=n(a,r+=4),m=n(a,r+2),h=n(a,r+4);r+=6;var g=i(a,r+=8);r+=4,r+=f+m+h,ll._readLocal(a,g,o,l,d,e)}return o},ll._readLocal=function(t,e,n,i,r,o){var a=ll.bin.readUshort,s=ll.bin.readUint;s(t,e),a(t,e+=4),a(t,e+=2);var c=a(t,e+=2);s(t,e+=2),s(t,e+=4),e+=4;var l=a(t,e+=8),p=a(t,e+=2);e+=2;var u=ll.bin.readUTF8(t,e,l);if(e+=l,e+=p,o)n[u]={size:r,csize:i};else{var d=new Uint8Array(t.buffer,e);if(0==c)n[u]=new Uint8Array(d.buffer.slice(e,e+i));else{if(8!=c)throw"unknown compression method: "+c;var f=new Uint8Array(r);ll.inflateRaw(d,f),n[u]=f}}},ll.inflateRaw=function(t,e){return ll.F.inflate(t,e)},ll.inflate=function(t,e){return t[0],t[1],ll.inflateRaw(new Uint8Array(t.buffer,t.byteOffset+2,t.length-6),e)},ll.deflate=function(t,e){null==e&&(e={level:6});var n=0,i=new Uint8Array(50+Math.floor(1.1*t.length));i[n]=120,i[n+1]=156,n+=2,n=ll.F.deflateRaw(t,i,n,e.level);var r=ll.adler(t,0,t.length);return i[n+0]=r>>>24&255,i[n+1]=r>>>16&255,i[n+2]=r>>>8&255,i[n+3]=r>>>0&255,new Uint8Array(i.buffer,0,n+4)},ll.deflateRaw=function(t,e){null==e&&(e={level:6});var n=new Uint8Array(50+Math.floor(1.1*t.length)),i=ll.F.deflateRaw(t,n,i,e.level);return new Uint8Array(n.buffer,0,i)},ll.encode=function(t,e){null==e&&(e=!1);var n=0,i=ll.bin.writeUint,r=ll.bin.writeUshort,o={};for(var a in t){var s=!ll._noNeed(a)&&!e,c=t[a],l=ll.crc.crc(c,0,c.length);o[a]={cpr:s,usize:c.length,crc:l,file:s?ll.deflateRaw(c):c}}for(var a in o)n+=o[a].file.length+30+46+2*ll.bin.sizeUTF8(a);n+=22;var p=new Uint8Array(n),u=0,d=[];for(var a in o){var f=o[a];d.push(u),u=ll._writeHeader(p,u,a,f,0)}var m=0,h=u;for(var a in o)f=o[a],d.push(u),u=ll._writeHeader(p,u,a,f,1,d[m++]);var g=u-h;return i(p,u,101010256),u+=4,r(p,u+=4,m),r(p,u+=2,m),i(p,u+=2,g),i(p,u+=4,h),u+=4,u+=2,p.buffer},ll._noNeed=function(t){var e=t.split(".").pop().toLowerCase();return-1!="png,jpg,jpeg,zip".indexOf(e)},ll._writeHeader=function(t,e,n,i,r,o){var a=ll.bin.writeUint,s=ll.bin.writeUshort,c=i.file;return a(t,e,0==r?67324752:33639248),e+=4,1==r&&(e+=2),s(t,e,20),s(t,e+=2,0),s(t,e+=2,i.cpr?8:0),a(t,e+=2,0),a(t,e+=4,i.crc),a(t,e+=4,c.length),a(t,e+=4,i.usize),s(t,e+=4,ll.bin.sizeUTF8(n)),s(t,e+=2,0),e+=2,1==r&&(e+=2,e+=2,a(t,e+=6,o),e+=4),e+=ll.bin.writeUTF8(t,e,n),0==r&&(t.set(c,e),e+=c.length),e},ll.crc={table:function(){for(var t=new Uint32Array(256),e=0;e<256;e++){for(var n=e,i=0;i<8;i++)1&n?n=3988292384^n>>>1:n>>>=1;t[e]=n}return t}(),update:function(t,e,n,i){for(var r=0;r<i;r++)t=ll.crc.table[255&(t^e[n+r])]^t>>>8;return t},crc:function(t,e,n){return 4294967295^ll.crc.update(4294967295,t,e,n)}},ll.adler=function(t,e,n){for(var i=1,r=0,o=e,a=e+n;o<a;){for(var s=Math.min(o+5552,a);o<s;)r+=i+=t[o++];i%=65521,r%=65521}return r<<16|i},ll.bin={readUshort:function(t,e){return t[e]|t[e+1]<<8},writeUshort:function(t,e,n){t[e]=255&n,t[e+1]=n>>8&255},readUint:function(t,e){return 16777216*t[e+3]+(t[e+2]<<16|t[e+1]<<8|t[e])},writeUint:function(t,e,n){t[e]=255&n,t[e+1]=n>>8&255,t[e+2]=n>>16&255,t[e+3]=n>>24&255},readASCII:function(t,e,n){for(var i="",r=0;r<n;r++)i+=String.fromCharCode(t[e+r]);return i},writeASCII:function(t,e,n){for(var i=0;i<n.length;i++)t[e+i]=n.charCodeAt(i)},pad:function(t){return t.length<2?"0"+t:t},readUTF8:function(t,e,n){for(var i,r="",o=0;o<n;o++)r+="%"+ll.bin.pad(t[e+o].toString(16));try{i=decodeURIComponent(r)}catch{return ll.bin.readASCII(t,e,n)}return i},writeUTF8:function(t,e,n){for(var i=n.length,r=0,o=0;o<i;o++){var a=n.charCodeAt(o);if(4294967168&a)if(4294965248&a)if(4294901760&a){if(4292870144&a)throw"e";t[e+r]=240|a>>18,t[e+r+1]=128|a>>12&63,t[e+r+2]=128|a>>6&63,t[e+r+3]=128|63&a,r+=4}else t[e+r]=224|a>>12,t[e+r+1]=128|a>>6&63,t[e+r+2]=128|63&a,r+=3;else t[e+r]=192|a>>6,t[e+r+1]=128|63&a,r+=2;else t[e+r]=a,r++}return r},sizeUTF8:function(t){for(var e=t.length,n=0,i=0;i<e;i++){var r=t.charCodeAt(i);if(4294967168&r)if(4294965248&r)if(4294901760&r){if(4292870144&r)throw"e";n+=4}else n+=3;else n+=2;else n++}return n}},ll.F={},ll.F.deflateRaw=function(t,e,n,i){var r=[[0,0,0,0,0],[4,4,8,4,0],[4,5,16,8,0],[4,6,16,16,0],[4,10,16,32,0],[8,16,32,32,0],[8,16,128,128,0],[8,32,128,256,0],[32,128,258,1024,1],[32,258,258,4096,1]][i],o=ll.F.U,a=ll.F._goodIndex;ll.F._hash;var s=ll.F._putsE,c=0,l=n<<3,p=0,u=t.length;if(0==i){for(;c<u;)s(e,l,c+(S=Math.min(65535,u-c))==u?1:0),l=ll.F._copyExact(t,c,S,e,l+8),c+=S;return l>>>3}var d=o.lits,f=o.strt,m=o.prev,h=0,g=0,v=0,x=0,y=0,b=0;for(u>2&&(f[b=ll.F._hash(t,0)]=0),c=0;c<u;c++){if(y=b,c+1<u-2){b=ll.F._hash(t,c+1);var w=c+1&32767;m[w]=f[b],f[b]=w}if(p<=c){(h>14e3||g>26697)&&u-c>100&&(p<c&&(d[h]=c-p,h+=2,p=c),l=ll.F._writeBlock(c==u-1||p==u?1:0,d,h,x,t,v,c-v,e,l),h=g=x=0,v=c);var A=0;c<u-2&&(A=ll.F._bestMatch(t,c,m,y,Math.min(r[2],u-c),r[3]));var S=A>>>16,C=65535&A;if(0!=A){C=65535&A;var P=a(S=A>>>16,o.of0);o.lhst[257+P]++;var k=a(C,o.df0);o.dhst[k]++,x+=o.exb[P]+o.dxb[k],d[h]=S<<23|c-p,d[h+1]=C<<16|P<<8|k,h+=2,p=c+S}else o.lhst[t[c]]++;g++}}for(v==c&&0!=t.length||(p<c&&(d[h]=c-p,h+=2,p=c),l=ll.F._writeBlock(1,d,h,x,t,v,c-v,e,l),h=0,g=0,h=g=x=0,v=c);7&l;)l++;return l>>>3},ll.F._bestMatch=function(t,e,n,i,r,o){var a=32767&e,s=n[a],c=a-s+32768&32767;if(s==a||i!=ll.F._hash(t,e-c))return 0;for(var l=0,p=0,u=Math.min(32767,e);c<=u&&0!=--o&&s!=a;){if(0==l||t[e+l]==t[e+l-c]){var d=ll.F._howLong(t,e,c);if(d>l){if(p=c,(l=d)>=r)break;c+2<d&&(d=c+2);for(var f=0,m=0;m<d-2;m++){var h=e-c+m+32768&32767,g=h-n[h]+32768&32767;g>f&&(f=g,s=h)}}}c+=(a=s)-(s=n[a])+32768&32767}return l<<16|p},ll.F._howLong=function(t,e,n){if(t[e]!=t[e-n]||t[e+1]!=t[e+1-n]||t[e+2]!=t[e+2-n])return 0;var i=e,r=Math.min(t.length,e+258);for(e+=3;e<r&&t[e]==t[e-n];)e++;return e-i},ll.F._hash=function(t,e){return(t[e]<<8|t[e+1])+(t[e+2]<<4)&65535},ll.saved=0,ll.F._writeBlock=function(t,e,n,i,r,o,a,s,c){var l,p,u,d,f,m,h,g,v,x=ll.F.U,y=ll.F._putsF,b=ll.F._putsE;x.lhst[256]++,p=(l=ll.F.getTrees())[0],u=l[1],d=l[2],f=l[3],m=l[4],h=l[5],g=l[6],v=l[7];var w=32+(c+3&7?8-(c+3&7):0)+(a<<3),A=i+ll.F.contSize(x.fltree,x.lhst)+ll.F.contSize(x.fdtree,x.dhst),S=i+ll.F.contSize(x.ltree,x.lhst)+ll.F.contSize(x.dtree,x.dhst);S+=14+3*h+ll.F.contSize(x.itree,x.ihst)+(2*x.ihst[16]+3*x.ihst[17]+7*x.ihst[18]);for(var C=0;C<286;C++)x.lhst[C]=0;for(C=0;C<30;C++)x.dhst[C]=0;for(C=0;C<19;C++)x.ihst[C]=0;var P=w<A&&w<S?0:A<S?1:2;if(y(s,c,t),y(s,c+1,P),c+=3,0==P){for(;7&c;)c++;c=ll.F._copyExact(r,o,a,s,c)}else{var k,T;if(1==P&&(k=x.fltree,T=x.fdtree),2==P){ll.F.makeCodes(x.ltree,p),ll.F.revCodes(x.ltree,p),ll.F.makeCodes(x.dtree,u),ll.F.revCodes(x.dtree,u),ll.F.makeCodes(x.itree,d),ll.F.revCodes(x.itree,d),k=x.ltree,T=x.dtree,b(s,c,f-257),b(s,c+=5,m-1),b(s,c+=5,h-4),c+=4;for(var E=0;E<h;E++)b(s,c+3*E,x.itree[1+(x.ordr[E]<<1)]);c+=3*h,c=ll.F._codeTiny(g,x.itree,s,c),c=ll.F._codeTiny(v,x.itree,s,c)}for(var I=o,M=0;M<n;M+=2){for(var j=e[M],D=j>>>23,F=I+(8388607&j);I<F;)c=ll.F._writeLit(r[I++],k,s,c);if(0!=D){var U=e[M+1],R=U>>16,O=U>>8&255,L=255&U;b(s,c=ll.F._writeLit(257+O,k,s,c),D-x.of0[O]),c+=x.exb[O],y(s,c=ll.F._writeLit(L,T,s,c),R-x.df0[L]),c+=x.dxb[L],I+=D}}c=ll.F._writeLit(256,k,s,c)}return c},ll.F._copyExact=function(t,e,n,i,r){var o=r>>>3;return i[o]=n,i[o+1]=n>>>8,i[o+2]=255-i[o],i[o+3]=255-i[o+1],o+=4,i.set(new Uint8Array(t.buffer,e,n),o),r+(n+4<<3)},ll.F.getTrees=function(){for(var t=ll.F.U,e=ll.F._hufTree(t.lhst,t.ltree,15),n=ll.F._hufTree(t.dhst,t.dtree,15),i=[],r=ll.F._lenCodes(t.ltree,i),o=[],a=ll.F._lenCodes(t.dtree,o),s=0;s<i.length;s+=2)t.ihst[i[s]]++;for(s=0;s<o.length;s+=2)t.ihst[o[s]]++;for(var c=ll.F._hufTree(t.ihst,t.itree,7),l=19;l>4&&0==t.itree[1+(t.ordr[l-1]<<1)];)l--;return[e,n,c,r,a,l,i,o]},ll.F.getSecond=function(t){for(var e=[],n=0;n<t.length;n+=2)e.push(t[n+1]);return e},ll.F.nonZero=function(t){for(var e="",n=0;n<t.length;n+=2)0!=t[n+1]&&(e+=(n>>1)+",");return e},ll.F.contSize=function(t,e){for(var n=0,i=0;i<e.length;i++)n+=e[i]*t[1+(i<<1)];return n},ll.F._codeTiny=function(t,e,n,i){for(var r=0;r<t.length;r+=2){var o=t[r],a=t[r+1];i=ll.F._writeLit(o,e,n,i);var s=16==o?2:17==o?3:7;o>15&&(ll.F._putsE(n,i,a,s),i+=s)}return i},ll.F._lenCodes=function(t,e){for(var n=t.length;2!=n&&0==t[n-1];)n-=2;for(var i=0;i<n;i+=2){var r=t[i+1],o=i+3<n?t[i+3]:-1,a=i+5<n?t[i+5]:-1,s=0==i?-1:t[i-1];if(0==r&&o==r&&a==r){for(var c=i+5;c+2<n&&t[c+2]==r;)c+=2;(l=Math.min(c+1-i>>>1,138))<11?e.push(17,l-3):e.push(18,l-11),i+=2*l-2}else if(r==s&&o==r&&a==r){for(c=i+5;c+2<n&&t[c+2]==r;)c+=2;var l=Math.min(c+1-i>>>1,6);e.push(16,l-3),i+=2*l-2}else e.push(r,0)}return n>>>1},ll.F._hufTree=function(t,e,n){var i=[],r=t.length,o=e.length,a=0;for(a=0;a<o;a+=2)e[a]=0,e[a+1]=0;for(a=0;a<r;a++)0!=t[a]&&i.push({lit:a,f:t[a]});var s=i.length,c=i.slice(0);if(0==s)return 0;if(1==s){var l=i[0].lit;return c=0==l?1:0,e[1+(l<<1)]=1,e[1+(c<<1)]=1,1}i.sort(function(t,e){return t.f-e.f});var p=i[0],u=i[1],d=0,f=1,m=2;for(i[0]={lit:-1,f:p.f+u.f,l:p,r:u,d:0};f!=s-1;)p=d!=f&&(m==s||i[d].f<i[m].f)?i[d++]:i[m++],u=d!=f&&(m==s||i[d].f<i[m].f)?i[d++]:i[m++],i[f++]={lit:-1,f:p.f+u.f,l:p,r:u};var h=ll.F.setDepth(i[f-1],0);for(h>n&&(ll.F.restrictDepth(c,n,h),h=n),a=0;a<s;a++)e[1+(c[a].lit<<1)]=c[a].d;return h},ll.F.setDepth=function(t,e){return-1!=t.lit?(t.d=e,e):Math.max(ll.F.setDepth(t.l,e+1),ll.F.setDepth(t.r,e+1))},ll.F.restrictDepth=function(t,e,n){var i=0,r=1<<n-e,o=0;for(t.sort(function(t,e){return e.d==t.d?t.f-e.f:e.d-t.d}),i=0;i<t.length&&t[i].d>e;i++){var a=t[i].d;t[i].d=e,o+=r-(1<<n-a)}for(o>>>=n-e;o>0;)(a=t[i].d)<e?(t[i].d++,o-=1<<e-a-1):i++;for(;i>=0;i--)t[i].d==e&&o<0&&(t[i].d--,o++);0!=o&&console.log("debt left")},ll.F._goodIndex=function(t,e){var n=0;return e[16|n]<=t&&(n|=16),e[8|n]<=t&&(n|=8),e[4|n]<=t&&(n|=4),e[2|n]<=t&&(n|=2),e[1|n]<=t&&(n|=1),n},ll.F._writeLit=function(t,e,n,i){return ll.F._putsF(n,i,e[t<<1]),i+e[1+(t<<1)]},ll.F.inflate=function(t,e){var n=Uint8Array;if(3==t[0]&&0==t[1])return e||new n(0);var i=ll.F,r=i._bitsF,o=i._bitsE,a=i._decodeTiny,s=i.makeCodes,c=i.codes2map,l=i._get17,p=i.U,u=null==e;u&&(e=new n(t.length>>>2<<3));for(var d,f,m=0,h=0,g=0,v=0,x=0,y=0,b=0,w=0,A=0;0==m;)if(m=r(t,A,1),h=r(t,A+1,2),A+=3,0!=h){if(u&&(e=ll.F._check(e,w+(1<<17))),1==h&&(d=p.flmap,f=p.fdmap,y=511,b=31),2==h){g=o(t,A,5)+257,v=o(t,A+5,5)+1,x=o(t,A+10,4)+4,A+=14;for(var S=0;S<38;S+=2)p.itree[S]=0,p.itree[S+1]=0;var C=1;for(S=0;S<x;S++){var P=o(t,A+3*S,3);p.itree[1+(p.ordr[S]<<1)]=P,P>C&&(C=P)}A+=3*x,s(p.itree,C),c(p.itree,C,p.imap),d=p.lmap,f=p.dmap,A=a(p.imap,(1<<C)-1,g+v,t,A,p.ttree);var k=i._copyOut(p.ttree,0,g,p.ltree);y=(1<<k)-1;var T=i._copyOut(p.ttree,g,v,p.dtree);b=(1<<T)-1,s(p.ltree,k),c(p.ltree,k,d),s(p.dtree,T),c(p.dtree,T,f)}for(;;){var E=d[l(t,A)&y];A+=15&E;var I=E>>>4;if(I>>>8){if(256==I)break;var M=w+I-254;if(I>264){var j=p.ldef[I-257];M=w+(j>>>3)+o(t,A,7&j),A+=7&j}var D=f[l(t,A)&b];A+=15&D;var F=D>>>4,U=p.ddef[F],R=(U>>>4)+r(t,A,15&U);for(A+=15&U,u&&(e=ll.F._check(e,w+(1<<17)));w<M;)e[w]=e[w++-R],e[w]=e[w++-R],e[w]=e[w++-R],e[w]=e[w++-R];w=M}else e[w++]=I}}else{7&A&&(A+=8-(7&A));var O=4+(A>>>3),L=t[O-4]|t[O-3]<<8;u&&(e=ll.F._check(e,w+L)),e.set(new n(t.buffer,t.byteOffset+O,L),w),A=O+L<<3,w+=L}return e.length==w?e:e.slice(0,w)},ll.F._check=function(t,e){var n=t.length;if(e<=n)return t;var i=new Uint8Array(Math.max(n<<1,e));return i.set(t,0),i},ll.F._decodeTiny=function(t,e,n,i,r,o){for(var a=ll.F._bitsE,s=ll.F._get17,c=0;c<n;){var l=t[s(i,r)&e];r+=15&l;var p=l>>>4;if(p<=15)o[c]=p,c++;else{var u=0,d=0;16==p?(d=3+a(i,r,2),r+=2,u=o[c-1]):17==p?(d=3+a(i,r,3),r+=3):18==p&&(d=11+a(i,r,7),r+=7);for(var f=c+d;c<f;)o[c]=u,c++}}return r},ll.F._copyOut=function(t,e,n,i){for(var r=0,o=0,a=i.length>>>1;o<n;){var s=t[o+e];i[o<<1]=0,i[1+(o<<1)]=s,s>r&&(r=s),o++}for(;o<a;)i[o<<1]=0,i[1+(o<<1)]=0,o++;return r},ll.F.makeCodes=function(t,e){for(var n,i,r,o,a=ll.F.U,s=t.length,c=a.bl_count,l=0;l<=e;l++)c[l]=0;for(l=1;l<s;l+=2)c[t[l]]++;var p=a.next_code;for(n=0,c[0]=0,i=1;i<=e;i++)n=n+c[i-1]<<1,p[i]=n;for(r=0;r<s;r+=2)0!=(o=t[r+1])&&(t[r]=p[o],p[o]++)},ll.F.codes2map=function(t,e,n){for(var i=t.length,r=ll.F.U.rev15,o=0;o<i;o+=2)if(0!=t[o+1])for(var a=o>>1,s=t[o+1],c=a<<4|s,l=e-s,p=t[o]<<l,u=p+(1<<l);p!=u;)n[r[p]>>>15-e]=c,p++},ll.F.revCodes=function(t,e){for(var n=ll.F.U.rev15,i=15-e,r=0;r<t.length;r+=2){var o=t[r]<<e-t[r+1];t[r]=n[o]>>>i}},ll.F._putsE=function(t,e,n){n<<=7&e;var i=e>>>3;t[i]|=n,t[i+1]|=n>>>8},ll.F._putsF=function(t,e,n){n<<=7&e;var i=e>>>3;t[i]|=n,t[i+1]|=n>>>8,t[i+2]|=n>>>16},ll.F._bitsE=function(t,e,n){return(t[e>>>3]|t[1+(e>>>3)]<<8)>>>(7&e)&(1<<n)-1},ll.F._bitsF=function(t,e,n){return(t[e>>>3]|t[1+(e>>>3)]<<8|t[2+(e>>>3)]<<16)>>>(7&e)&(1<<n)-1},ll.F._get17=function(t,e){return(t[e>>>3]|t[1+(e>>>3)]<<8|t[2+(e>>>3)]<<16)>>>(7&e)},ll.F._get25=function(t,e){return(t[e>>>3]|t[1+(e>>>3)]<<8|t[2+(e>>>3)]<<16|t[3+(e>>>3)]<<24)>>>(7&e)},ll.F.U=(sl=Uint16Array,cl=Uint32Array,{next_code:new sl(16),bl_count:new sl(16),ordr:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],of0:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],exb:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],ldef:new sl(32),df0:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],dxb:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],ddef:new cl(32),flmap:new sl(512),fltree:[],fdmap:new sl(32),fdtree:[],lmap:new sl(32768),ltree:[],ttree:[],dmap:new sl(32768),dtree:[],imap:new sl(512),itree:[],rev15:new sl(32768),lhst:new cl(286),dhst:new cl(30),ihst:new cl(19),lits:new cl(15e3),strt:new sl(65536),prev:new sl(32768)}),function(){for(var t=ll.F.U,e=0;e<32768;e++){var n=e;n=(4278255360&(n=(4042322160&(n=(3435973836&(n=(2863311530&n)>>>1|(1431655765&n)<<1))>>>2|(858993459&n)<<2))>>>4|(252645135&n)<<4))>>>8|(16711935&n)<<8,t.rev15[e]=(n>>>16|n<<16)>>>17}function i(t,e,n){for(;0!=e--;)t.push(0,n)}for(e=0;e<32;e++)t.ldef[e]=t.of0[e]<<3|t.exb[e],t.ddef[e]=t.df0[e]<<4|t.dxb[e];i(t.fltree,144,8),i(t.fltree,112,9),i(t.fltree,24,7),i(t.fltree,8,8),ll.F.makeCodes(t.fltree,9),ll.F.codes2map(t.fltree,9,t.flmap),ll.F.revCodes(t.fltree,9),i(t.fdtree,32,5),ll.F.makeCodes(t.fdtree,5),ll.F.codes2map(t.fdtree,5,t.fdmap),ll.F.revCodes(t.fdtree,5),i(t.itree,19,0),i(t.ltree,286,0),i(t.dtree,30,0),i(t.ttree,320,0)}();var dl=function(t,e){return e.forEach(function(e){e&&"string"!=typeof e&&!Array.isArray(e)&&Object.keys(e).forEach(function(n){if("default"!==n&&!(n in t)){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}})}),Object.freeze(t)}({__proto__:null,default:pl},[pl]);const fl=function(){var t={nextZero(t,e){for(;0!=t[e];)e++;return e},readUshort:(t,e)=>t[e]<<8|t[e+1],writeUshort(t,e,n){t[e]=n>>8&255,t[e+1]=255&n},readUint:(t,e)=>16777216*t[e]+(t[e+1]<<16|t[e+2]<<8|t[e+3]),writeUint(t,e,n){t[e]=n>>24&255,t[e+1]=n>>16&255,t[e+2]=n>>8&255,t[e+3]=255&n},readASCII(t,e,n){let i="";for(let r=0;r<n;r++)i+=String.fromCharCode(t[e+r]);return i},writeASCII(t,e,n){for(let i=0;i<n.length;i++)t[e+i]=n.charCodeAt(i)},readBytes(t,e,n){const i=[];for(let r=0;r<n;r++)i.push(t[e+r]);return i},pad:t=>t.length<2?`0${t}`:t,readUTF8(e,n,i){let r,o="";for(let r=0;r<i;r++)o+=`%${t.pad(e[n+r].toString(16))}`;try{r=decodeURIComponent(o)}catch{return t.readASCII(e,n,i)}return r}};function e(e,n,i,r){const a=n*i,s=o(r),c=Math.ceil(n*s/8),l=new Uint8Array(4*a),p=new Uint32Array(l.buffer),{ctype:u}=r,{depth:d}=r,f=t.readUshort;if(6==u){const t=a<<2;if(8==d)for(var m=0;m<t;m+=4)l[m]=e[m],l[m+1]=e[m+1],l[m+2]=e[m+2],l[m+3]=e[m+3];if(16==d)for(m=0;m<t;m++)l[m]=e[m<<1]}else if(2==u){const t=r.tabs.tRNS;if(null==t){if(8==d)for(m=0;m<a;m++){var h=3*m;p[m]=255<<24|e[h+2]<<16|e[h+1]<<8|e[h]}if(16==d)for(m=0;m<a;m++)h=6*m,p[m]=255<<24|e[h+4]<<16|e[h+2]<<8|e[h]}else{var g=t[0];const n=t[1],i=t[2];if(8==d)for(m=0;m<a;m++){var v=m<<2;h=3*m,p[m]=255<<24|e[h+2]<<16|e[h+1]<<8|e[h],e[h]==g&&e[h+1]==n&&e[h+2]==i&&(l[v+3]=0)}if(16==d)for(m=0;m<a;m++)v=m<<2,h=6*m,p[m]=255<<24|e[h+4]<<16|e[h+2]<<8|e[h],f(e,h)==g&&f(e,h+2)==n&&f(e,h+4)==i&&(l[v+3]=0)}}else if(3==u){const t=r.tabs.PLTE,o=r.tabs.tRNS,s=o?o.length:0;if(1==d)for(var x=0;x<i;x++){var y=x*c,b=x*n;for(m=0;m<n;m++){v=b+m<<2;var w=3*(A=e[y+(m>>3)]>>7-(7&m)&1);l[v]=t[w],l[v+1]=t[w+1],l[v+2]=t[w+2],l[v+3]=A<s?o[A]:255}}if(2==d)for(x=0;x<i;x++)for(y=x*c,b=x*n,m=0;m<n;m++)v=b+m<<2,w=3*(A=e[y+(m>>2)]>>6-((3&m)<<1)&3),l[v]=t[w],l[v+1]=t[w+1],l[v+2]=t[w+2],l[v+3]=A<s?o[A]:255;if(4==d)for(x=0;x<i;x++)for(y=x*c,b=x*n,m=0;m<n;m++)v=b+m<<2,w=3*(A=e[y+(m>>1)]>>4-((1&m)<<2)&15),l[v]=t[w],l[v+1]=t[w+1],l[v+2]=t[w+2],l[v+3]=A<s?o[A]:255;if(8==d)for(m=0;m<a;m++){var A;v=m<<2,w=3*(A=e[m]),l[v]=t[w],l[v+1]=t[w+1],l[v+2]=t[w+2],l[v+3]=A<s?o[A]:255}}else if(4==u){if(8==d)for(m=0;m<a;m++){v=m<<2;var S=e[C=m<<1];l[v]=S,l[v+1]=S,l[v+2]=S,l[v+3]=e[C+1]}if(16==d)for(m=0;m<a;m++){var C;v=m<<2,S=e[C=m<<2],l[v]=S,l[v+1]=S,l[v+2]=S,l[v+3]=e[C+2]}}else if(0==u)for(g=r.tabs.tRNS?r.tabs.tRNS:-1,x=0;x<i;x++){const t=x*c,i=x*n;if(1==d)for(var P=0;P<n;P++){var k=(S=255*(e[t+(P>>>3)]>>>7-(7&P)&1))==255*g?0:255;p[i+P]=k<<24|S<<16|S<<8|S}else if(2==d)for(P=0;P<n;P++)k=(S=85*(e[t+(P>>>2)]>>>6-((3&P)<<1)&3))==85*g?0:255,p[i+P]=k<<24|S<<16|S<<8|S;else if(4==d)for(P=0;P<n;P++)k=(S=17*(e[t+(P>>>1)]>>>4-((1&P)<<2)&15))==17*g?0:255,p[i+P]=k<<24|S<<16|S<<8|S;else if(8==d)for(P=0;P<n;P++)k=(S=e[t+P])==g?0:255,p[i+P]=k<<24|S<<16|S<<8|S;else if(16==d)for(P=0;P<n;P++)S=e[t+(P<<1)],k=f(e,t+(P<<1))==g?0:255,p[i+P]=k<<24|S<<16|S<<8|S}return l}function n(t,e,n,s){const c=o(t),l=Math.ceil(n*c/8),p=new Uint8Array((l+1+t.interlace)*s);return e=t.tabs.CgBI?r(e,p):i(e,p),0==t.interlace?e=a(e,t,0,n,s):1==t.interlace&&(e=function(t,e){const n=e.width,i=e.height,r=o(e),s=r>>3,c=Math.ceil(n*r/8),l=new Uint8Array(i*c);let p=0;const u=[0,0,4,0,2,0,1],d=[0,4,0,2,0,1,0],f=[8,8,8,4,4,2,2],m=[8,8,4,4,2,2,1];let h=0;for(;h<7;){const o=f[h],v=m[h];let x=0,y=0,b=u[h];for(;b<i;)b+=o,y++;let w=d[h];for(;w<n;)w+=v,x++;const A=Math.ceil(x*r/8);a(t,e,p,x,y);let S=0,C=u[h];for(;C<i;){let e=d[h],i=p+S*A<<3;for(;e<n;){var g;if(1==r&&(g=(g=t[i>>3])>>7-(7&i)&1,l[C*c+(e>>3)]|=g<<7-(7&e)),2==r&&(g=(g=t[i>>3])>>6-(7&i)&3,l[C*c+(e>>2)]|=g<<6-((3&e)<<1)),4==r&&(g=(g=t[i>>3])>>4-(7&i)&15,l[C*c+(e>>1)]|=g<<4-((1&e)<<2)),r>=8){const n=C*c+e*s;for(let e=0;e<s;e++)l[n+e]=t[(i>>3)+e]}i+=r,e+=v}S++,C+=o}x*y!=0&&(p+=y*(1+A)),h+=1}return l}(e,t)),e}function i(t,e){return r(new Uint8Array(t.buffer,2,t.length-6),e)}var r=function(){const t={H:{}};return t.H.N=function(e,n){const i=Uint8Array;let r,o,a=0,s=0,c=0,l=0,p=0,u=0,d=0,f=0,m=0;if(3==e[0]&&0==e[1])return n||new i(0);const h=t.H,g=h.b,v=h.e,x=h.R,y=h.n,b=h.A,w=h.Z,A=h.m,S=null==n;for(S&&(n=new i(e.length>>>2<<5));0==a;)if(a=g(e,m,1),s=g(e,m+1,2),m+=3,0!=s){if(S&&(n=t.H.W(n,f+(1<<17))),1==s&&(r=A.J,o=A.h,u=511,d=31),2==s){c=v(e,m,5)+257,l=v(e,m+5,5)+1,p=v(e,m+10,4)+4,m+=14;let t=1;for(var C=0;C<38;C+=2)A.Q[C]=0,A.Q[C+1]=0;for(C=0;C<p;C++){const n=v(e,m+3*C,3);A.Q[1+(A.X[C]<<1)]=n,n>t&&(t=n)}m+=3*p,y(A.Q,t),b(A.Q,t,A.u),r=A.w,o=A.d,m=x(A.u,(1<<t)-1,c+l,e,m,A.v);const n=h.V(A.v,0,c,A.C);u=(1<<n)-1;const i=h.V(A.v,c,l,A.D);d=(1<<i)-1,y(A.C,n),b(A.C,n,r),y(A.D,i),b(A.D,i,o)}for(;;){const t=r[w(e,m)&u];m+=15&t;const i=t>>>4;if(i>>>8){if(256==i)break;{let t=f+i-254;if(i>264){const n=A.q[i-257];t=f+(n>>>3)+v(e,m,7&n),m+=7&n}const r=o[w(e,m)&d];m+=15&r;const a=r>>>4,s=A.c[a],c=(s>>>4)+g(e,m,15&s);for(m+=15&s;f<t;)n[f]=n[f++-c],n[f]=n[f++-c],n[f]=n[f++-c],n[f]=n[f++-c];f=t}}else n[f++]=i}}else{7&m&&(m+=8-(7&m));const r=4+(m>>>3),o=e[r-4]|e[r-3]<<8;S&&(n=t.H.W(n,f+o)),n.set(new i(e.buffer,e.byteOffset+r,o),f),m=r+o<<3,f+=o}return n.length==f?n:n.slice(0,f)},t.H.W=function(t,e){const n=t.length;if(e<=n)return t;const i=new Uint8Array(n<<1);return i.set(t,0),i},t.H.R=function(e,n,i,r,o,a){const s=t.H.e,c=t.H.Z;let l=0;for(;l<i;){const t=e[c(r,o)&n];o+=15&t;const i=t>>>4;if(i<=15)a[l]=i,l++;else{let t=0,e=0;16==i?(e=3+s(r,o,2),o+=2,t=a[l-1]):17==i?(e=3+s(r,o,3),o+=3):18==i&&(e=11+s(r,o,7),o+=7);const n=l+e;for(;l<n;)a[l]=t,l++}}return o},t.H.V=function(t,e,n,i){let r=0,o=0;const a=i.length>>>1;for(;o<n;){const n=t[o+e];i[o<<1]=0,i[1+(o<<1)]=n,n>r&&(r=n),o++}for(;o<a;)i[o<<1]=0,i[1+(o<<1)]=0,o++;return r},t.H.n=function(e,n){const i=t.H.m,r=e.length;let o,a,s,c;const l=i.j;for(var p=0;p<=n;p++)l[p]=0;for(p=1;p<r;p+=2)l[e[p]]++;const u=i.K;for(o=0,l[0]=0,a=1;a<=n;a++)o=o+l[a-1]<<1,u[a]=o;for(s=0;s<r;s+=2)c=e[s+1],0!=c&&(e[s]=u[c],u[c]++)},t.H.A=function(e,n,i){const r=e.length,o=t.H.m.r;for(let t=0;t<r;t+=2)if(0!=e[t+1]){const r=t>>1,a=e[t+1],s=r<<4|a,c=n-a;let l=e[t]<<c;const p=l+(1<<c);for(;l!=p;)i[o[l]>>>15-n]=s,l++}},t.H.l=function(e,n){const i=t.H.m.r,r=15-n;for(let t=0;t<e.length;t+=2){const o=e[t]<<n-e[t+1];e[t]=i[o]>>>r}},t.H.M=function(t,e,n){n<<=7&e;const i=e>>>3;t[i]|=n,t[i+1]|=n>>>8},t.H.I=function(t,e,n){n<<=7&e;const i=e>>>3;t[i]|=n,t[i+1]|=n>>>8,t[i+2]|=n>>>16},t.H.e=function(t,e,n){return(t[e>>>3]|t[1+(e>>>3)]<<8)>>>(7&e)&(1<<n)-1},t.H.b=function(t,e,n){return(t[e>>>3]|t[1+(e>>>3)]<<8|t[2+(e>>>3)]<<16)>>>(7&e)&(1<<n)-1},t.H.Z=function(t,e){return(t[e>>>3]|t[1+(e>>>3)]<<8|t[2+(e>>>3)]<<16)>>>(7&e)},t.H.i=function(t,e){return(t[e>>>3]|t[1+(e>>>3)]<<8|t[2+(e>>>3)]<<16|t[3+(e>>>3)]<<24)>>>(7&e)},t.H.m=function(){const t=Uint16Array,e=Uint32Array;return{K:new t(16),j:new t(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new t(32),p:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new e(32),J:new t(512),_:[],h:new t(32),$:[],w:new t(32768),C:[],v:[],d:new t(32768),D:[],u:new t(512),Q:[],r:new t(32768),s:new e(286),Y:new e(30),a:new e(19),t:new e(15e3),k:new t(65536),g:new t(32768)}}(),function(){const e=t.H.m;for(var n=0;n<32768;n++){let t=n;t=(2863311530&t)>>>1|(1431655765&t)<<1,t=(3435973836&t)>>>2|(858993459&t)<<2,t=(4042322160&t)>>>4|(252645135&t)<<4,t=(4278255360&t)>>>8|(16711935&t)<<8,e.r[n]=(t>>>16|t<<16)>>>17}function i(t,e,n){for(;0!=e--;)t.push(0,n)}for(n=0;n<32;n++)e.q[n]=e.S[n]<<3|e.T[n],e.c[n]=e.p[n]<<4|e.z[n];i(e._,144,8),i(e._,112,9),i(e._,24,7),i(e._,8,8),t.H.n(e._,9),t.H.A(e._,9,e.J),t.H.l(e._,9),i(e.$,32,5),t.H.n(e.$,5),t.H.A(e.$,5,e.h),t.H.l(e.$,5),i(e.Q,19,0),i(e.C,286,0),i(e.D,30,0),i(e.v,320,0)}(),t.H.N}();function o(t){return[1,null,3,1,2,null,4][t.ctype]*t.depth}function a(t,e,n,i,r){let a=o(e);const c=Math.ceil(i*a/8);let l,p;a=Math.ceil(a/8);let u=t[n],d=0;if(u>1&&(t[n]=[0,0,1][u-2]),3==u)for(d=a;d<c;d++)t[d+1]=t[d+1]+(t[d+1-a]>>>1)&255;for(let e=0;e<r;e++)if(l=n+e*c,p=l+e+1,u=t[p-1],d=0,0==u)for(;d<c;d++)t[l+d]=t[p+d];else if(1==u){for(;d<a;d++)t[l+d]=t[p+d];for(;d<c;d++)t[l+d]=t[p+d]+t[l+d-a]}else if(2==u)for(;d<c;d++)t[l+d]=t[p+d]+t[l+d-c];else if(3==u){for(;d<a;d++)t[l+d]=t[p+d]+(t[l+d-c]>>>1);for(;d<c;d++)t[l+d]=t[p+d]+(t[l+d-c]+t[l+d-a]>>>1)}else{for(;d<a;d++)t[l+d]=t[p+d]+s(0,t[l+d-c],0);for(;d<c;d++)t[l+d]=t[p+d]+s(t[l+d-a],t[l+d-c],t[l+d-a-c])}return t}function s(t,e,n){const i=t+e-n,r=i-t,o=i-e,a=i-n;return r*r<=o*o&&r*r<=a*a?t:o*o<=a*a?e:n}function c(e,n,i){i.width=t.readUint(e,n),n+=4,i.height=t.readUint(e,n),n+=4,i.depth=e[n],n++,i.ctype=e[n],n++,i.compress=e[n],n++,i.filter=e[n],n++,i.interlace=e[n],n++}function l(t,e,n,i,r,o,a,s,c){const l=Math.min(e,r),p=Math.min(n,o);let u=0,d=0;for(let n=0;n<p;n++)for(let o=0;o<l;o++)if(a>=0&&s>=0?(u=n*e+o<<2,d=(s+n)*r+a+o<<2):(u=(-s+n)*e-a+o<<2,d=n*r+o<<2),0==c)i[d]=t[u],i[d+1]=t[u+1],i[d+2]=t[u+2],i[d+3]=t[u+3];else if(1==c){var f=.00392156862745098*t[u+3],m=t[u]*f,h=t[u+1]*f,g=t[u+2]*f,v=i[d+3]*(1/255),x=i[d]*v,y=i[d+1]*v,b=i[d+2]*v;const e=1-f,n=f+v*e,r=0==n?0:1/n;i[d+3]=255*n,i[d+0]=(m+x*e)*r,i[d+1]=(h+y*e)*r,i[d+2]=(g+b*e)*r}else if(2==c)f=t[u+3],m=t[u],h=t[u+1],g=t[u+2],v=i[d+3],x=i[d],y=i[d+1],b=i[d+2],f==v&&m==x&&h==y&&g==b?(i[d]=0,i[d+1]=0,i[d+2]=0,i[d+3]=0):(i[d]=m,i[d+1]=h,i[d+2]=g,i[d+3]=f);else if(3==c){if(f=t[u+3],m=t[u],h=t[u+1],g=t[u+2],v=i[d+3],x=i[d],y=i[d+1],b=i[d+2],f==v&&m==x&&h==y&&g==b)continue;if(f<220&&v>20)return!1}return!0}return{decode:function(e){const o=new Uint8Array(e);let a=8;const s=t,l=s.readUshort,p=s.readUint,u={tabs:{},frames:[]},d=new Uint8Array(o.length);let f,m=0,h=0;const g=[137,80,78,71,13,10,26,10];for(var v=0;v<8;v++)if(o[v]!=g[v])throw"The input is not a PNG file!";for(;a<o.length;){const t=s.readUint(o,a);a+=4;const e=s.readASCII(o,a,4);if(a+=4,"IHDR"==e)c(o,a,u);else if("iCCP"==e){for(var x=a;0!=o[x];)x++;s.readASCII(o,a,x-a),o[x+1];const n=o.slice(x+2,a+t);let c=null;try{c=i(n)}catch{c=r(n)}u.tabs[e]=c}else if("CgBI"==e)u.tabs[e]=o.slice(a,a+4);else if("IDAT"==e){for(v=0;v<t;v++)d[m+v]=o[a+v];m+=t}else if("acTL"==e)u.tabs[e]={num_frames:p(o,a),num_plays:p(o,a+4)},f=new Uint8Array(o.length);else if("fcTL"==e){0!=h&&((C=u.frames[u.frames.length-1]).data=n(u,f.slice(0,h),C.rect.width,C.rect.height),h=0);const t={x:p(o,a+12),y:p(o,a+16),width:p(o,a+4),height:p(o,a+8)};let e=l(o,a+22);e=l(o,a+20)/(0==e?100:e);const i={rect:t,delay:Math.round(1e3*e),dispose:o[a+24],blend:o[a+25]};u.frames.push(i)}else if("fdAT"==e){for(v=0;v<t-4;v++)f[h+v]=o[a+v+4];h+=t-4}else if("pHYs"==e)u.tabs[e]=[s.readUint(o,a),s.readUint(o,a+4),o[a+8]];else if("cHRM"==e)for(u.tabs[e]=[],v=0;v<8;v++)u.tabs[e].push(s.readUint(o,a+4*v));else if("tEXt"==e||"zTXt"==e){null==u.tabs[e]&&(u.tabs[e]={});var y=s.nextZero(o,a),b=s.readASCII(o,a,y-a),w=a+t-y-1;if("tEXt"==e)S=s.readASCII(o,y+1,w);else{var A=i(o.slice(y+2,y+2+w));S=s.readUTF8(A,0,A.length)}u.tabs[e][b]=S}else if("iTXt"==e){null==u.tabs[e]&&(u.tabs[e]={}),y=0,x=a,y=s.nextZero(o,x),b=s.readASCII(o,x,y-x);const n=o[x=y+1];var S;o[x+1],x+=2,y=s.nextZero(o,x),s.readASCII(o,x,y-x),x=y+1,y=s.nextZero(o,x),s.readUTF8(o,x,y-x),w=t-((x=y+1)-a),0==n?S=s.readUTF8(o,x,w):(A=i(o.slice(x,x+w)),S=s.readUTF8(A,0,A.length)),u.tabs[e][b]=S}else if("PLTE"==e)u.tabs[e]=s.readBytes(o,a,t);else if("hIST"==e){const t=u.tabs.PLTE.length/3;for(u.tabs[e]=[],v=0;v<t;v++)u.tabs[e].push(l(o,a+2*v))}else if("tRNS"==e)3==u.ctype?u.tabs[e]=s.readBytes(o,a,t):0==u.ctype?u.tabs[e]=l(o,a):2==u.ctype&&(u.tabs[e]=[l(o,a),l(o,a+2),l(o,a+4)]);else if("gAMA"==e)u.tabs[e]=s.readUint(o,a)/1e5;else if("sRGB"==e)u.tabs[e]=o[a];else if("bKGD"==e)0==u.ctype||4==u.ctype?u.tabs[e]=[l(o,a)]:2==u.ctype||6==u.ctype?u.tabs[e]=[l(o,a),l(o,a+2),l(o,a+4)]:3==u.ctype&&(u.tabs[e]=o[a]);else if("IEND"==e)break;a+=t,s.readUint(o,a),a+=4}var C;return 0!=h&&((C=u.frames[u.frames.length-1]).data=n(u,f.slice(0,h),C.rect.width,C.rect.height)),u.data=n(u,d,u.width,u.height),delete u.compress,delete u.interlace,delete u.filter,u},toRGBA8:function(t){const n=t.width,i=t.height;if(null==t.tabs.acTL)return[e(t.data,n,i,t).buffer];const r=[];null==t.frames[0].data&&(t.frames[0].data=t.data);const o=n*i*4,a=new Uint8Array(o),s=new Uint8Array(o),c=new Uint8Array(o);for(let u=0;u<t.frames.length;u++){const d=t.frames[u],f=d.rect.x,m=d.rect.y,h=d.rect.width,g=d.rect.height,v=e(d.data,h,g,t);if(0!=u)for(var p=0;p<o;p++)c[p]=a[p];if(0==d.blend?l(v,h,g,a,n,i,f,m,0):1==d.blend&&l(v,h,g,a,n,i,f,m,1),r.push(a.buffer.slice(0)),0!=d.dispose)if(1==d.dispose)l(s,h,g,a,n,i,f,m,0);else if(2==d.dispose)for(p=0;p<o;p++)a[p]=c[p]}return r},_paeth:s,_copyTile:l,_bin:t}}();!function(){const{_copyTile:t}=fl,{_bin:e}=fl,n=fl._paeth;var i={table:function(){const t=new Uint32Array(256);for(let e=0;e<256;e++){let n=e;for(let t=0;t<8;t++)1&n?n=3988292384^n>>>1:n>>>=1;t[e]=n}return t}(),update(t,e,n,r){for(let o=0;o<r;o++)t=i.table[255&(t^e[n+o])]^t>>>8;return t},crc:(t,e,n)=>4294967295^i.update(4294967295,t,e,n)};function r(t,e,n,i){e[n]+=t[0]*i>>4,e[n+1]+=t[1]*i>>4,e[n+2]+=t[2]*i>>4,e[n+3]+=t[3]*i>>4}function o(t){return Math.max(0,Math.min(255,t))}function a(t,e){const n=t[0]-e[0],i=t[1]-e[1],r=t[2]-e[2],o=t[3]-e[3];return n*n+i*i+r*r+o*o}function s(t,e,n,i,s,c,l){null==l&&(l=1);const p=i.length,u=[];for(var d=0;d<p;d++){const t=i[d];u.push([t>>>0&255,t>>>8&255,t>>>16&255,t>>>24&255])}for(d=0;d<p;d++){let t=4294967295;for(var f=0,m=0;m<p;m++){var h=a(u[d],u[m]);m!=d&&h<t&&(t=h,f=m)}}const g=new Uint32Array(s.buffer),v=new Int16Array(e*n*4),x=[0,8,2,10,12,4,14,6,3,11,1,9,15,7,13,5];for(d=0;d<x.length;d++)x[d]=255*((x[d]+.5)/16-.5);for(let s=0;s<n;s++)for(let b=0;b<e;b++){var y;d=4*(s*e+b),2!=l?y=[o(t[d]+v[d]),o(t[d+1]+v[d+1]),o(t[d+2]+v[d+2]),o(t[d+3]+v[d+3])]:(h=x[4*(3&s)+(3&b)],y=[o(t[d]+h),o(t[d+1]+h),o(t[d+2]+h),o(t[d+3]+h)]),f=0;let w=16777215;for(m=0;m<p;m++){const t=a(y,u[m]);t<w&&(w=t,f=m)}const A=u[f],S=[y[0]-A[0],y[1]-A[1],y[2]-A[2],y[3]-A[3]];1==l&&(b!=e-1&&r(S,v,d+4,7),s!=n-1&&(0!=b&&r(S,v,d+4*e-4,3),r(S,v,d+4*e,5),b!=e-1&&r(S,v,d+4*e+4,1))),c[d>>2]=f,g[d>>2]=i[f]}}function c(t,n,r,o,a){null==a&&(a={});const{crc:s}=i,c=e.writeUint,l=e.writeUshort,p=e.writeASCII;let u=8;const d=t.frames.length>1;let f,m=!1,h=33+(d?20:0);if(null!=a.sRGB&&(h+=13),null!=a.pHYs&&(h+=21),null!=a.iCCP&&(f=pako.deflate(a.iCCP),h+=21+f.length+4),3==t.ctype){for(var g=t.plte.length,v=0;v<g;v++)t.plte[v]>>>24!=255&&(m=!0);h+=8+3*g+4+(m?8+1*g+4:0)}for(var x=0;x<t.frames.length;x++)d&&(h+=38),h+=(A=t.frames[x]).cimg.length+12,0!=x&&(h+=4);h+=12;const y=new Uint8Array(h),b=[137,80,78,71,13,10,26,10];for(v=0;v<8;v++)y[v]=b[v];if(c(y,u,13),u+=4,p(y,u,"IHDR"),u+=4,c(y,u,n),u+=4,c(y,u,r),u+=4,y[u]=t.depth,u++,y[u]=t.ctype,u++,y[u]=0,u++,y[u]=0,u++,y[u]=0,u++,c(y,u,s(y,u-17,17)),u+=4,null!=a.sRGB&&(c(y,u,1),u+=4,p(y,u,"sRGB"),u+=4,y[u]=a.sRGB,u++,c(y,u,s(y,u-5,5)),u+=4),null!=a.iCCP){const t=13+f.length;c(y,u,t),u+=4,p(y,u,"iCCP"),u+=4,p(y,u,"ICC profile"),u+=11,u+=2,y.set(f,u),u+=f.length,c(y,u,s(y,u-(t+4),t+4)),u+=4}if(null!=a.pHYs&&(c(y,u,9),u+=4,p(y,u,"pHYs"),u+=4,c(y,u,a.pHYs[0]),u+=4,c(y,u,a.pHYs[1]),u+=4,y[u]=a.pHYs[2],u++,c(y,u,s(y,u-13,13)),u+=4),d&&(c(y,u,8),u+=4,p(y,u,"acTL"),u+=4,c(y,u,t.frames.length),u+=4,c(y,u,null!=a.loop?a.loop:0),u+=4,c(y,u,s(y,u-12,12)),u+=4),3==t.ctype){for(c(y,u,3*(g=t.plte.length)),u+=4,p(y,u,"PLTE"),u+=4,v=0;v<g;v++){const e=3*v,n=t.plte[v],i=255&n,r=n>>>8&255,o=n>>>16&255;y[u+e+0]=i,y[u+e+1]=r,y[u+e+2]=o}if(u+=3*g,c(y,u,s(y,u-3*g-4,3*g+4)),u+=4,m){for(c(y,u,g),u+=4,p(y,u,"tRNS"),u+=4,v=0;v<g;v++)y[u+v]=t.plte[v]>>>24&255;u+=g,c(y,u,s(y,u-g-4,g+4)),u+=4}}let w=0;for(x=0;x<t.frames.length;x++){var A=t.frames[x];d&&(c(y,u,26),u+=4,p(y,u,"fcTL"),u+=4,c(y,u,w++),u+=4,c(y,u,A.rect.width),u+=4,c(y,u,A.rect.height),u+=4,c(y,u,A.rect.x),u+=4,c(y,u,A.rect.y),u+=4,l(y,u,o[x]),u+=2,l(y,u,1e3),u+=2,y[u]=A.dispose,u++,y[u]=A.blend,u++,c(y,u,s(y,u-30,30)),u+=4);const e=A.cimg;c(y,u,(g=e.length)+(0==x?0:4)),u+=4;const n=u;p(y,u,0==x?"IDAT":"fdAT"),u+=4,0!=x&&(c(y,u,w++),u+=4),y.set(e,u),u+=g,c(y,u,s(y,n,u-n)),u+=4}return c(y,u,0),u+=4,p(y,u,"IEND"),u+=4,c(y,u,s(y,u-4,4)),u+=4,y.buffer}function l(t,e,n){for(let i=0;i<t.frames.length;i++){const r=t.frames[i];r.rect.width;const o=r.rect.height,a=new Uint8Array(o*r.bpl+o);r.cimg=f(r.img,o,r.bpp,r.bpl,a,e,n)}}function p(e,n,i,r,o){const a=o[0],c=o[1],l=o[2],p=o[3],f=o[4],m=o[5];let g=6,v=8,x=255;for(var y=0;y<e.length;y++){const t=new Uint8Array(e[y]);for(var b=t.length,w=0;w<b;w+=4)x&=t[w+3]}const A=255!=x,S=function(e,n,i,r,o,a){const s=[];for(var c=0;c<e.length;c++){const u=new Uint8Array(e[c]),f=new Uint32Array(u.buffer);var l;let h=0,g=0,v=n,x=i,y=r?1:0;if(0!=c){const b=a||r||1==c||0!=s[c-2].dispose?1:2;let w=0,A=1e9;for(let t=0;t<b;t++){var p=new Uint8Array(e[c-1-t]);const r=new Uint32Array(e[c-1-t]);let a=n,s=i,l=-1,u=-1;for(let t=0;t<i;t++)for(let e=0;e<n;e++)f[m=t*n+e]!=r[m]&&(e<a&&(a=e),e>l&&(l=e),t<s&&(s=t),t>u&&(u=t));-1==l&&(a=s=l=u=0),o&&(!(1&~a)&&a--,!(1&~s)&&s--);const d=(l-a+1)*(u-s+1);d<A&&(A=d,w=t,h=a,g=s,v=l-a+1,x=u-s+1)}p=new Uint8Array(e[c-1-w]),1==w&&(s[c-1].dispose=2),l=new Uint8Array(v*x*4),t(p,n,i,l,v,x,-h,-g,0),y=t(u,n,i,l,v,x,-h,-g,3)?1:0,1==y?d(u,n,i,l,{x:h,y:g,width:v,height:x}):t(u,n,i,l,v,x,-h,-g,0)}else l=u.slice(0);s.push({rect:{x:h,y:g,width:v,height:x},img:l,blend:y,dispose:0})}if(r)for(c=0;c<s.length;c++){if(1==(h=s[c]).blend)continue;const t=h.rect,r=s[c-1].rect,a=Math.min(t.x,r.x),l=Math.min(t.y,r.y),p={x:a,y:l,width:Math.max(t.x+t.width,r.x+r.width)-a,height:Math.max(t.y+t.height,r.y+r.height)-l};s[c-1].dispose=1,c-1!=0&&u(e,n,i,s,c-1,p,o),u(e,n,i,s,c,p,o)}let f=0;if(1!=e.length)for(var m=0;m<s.length;m++){var h;f+=(h=s[m]).rect.width*h.rect.height}return s}(e,n,i,a,c,l),C={},P=[],k=[];if(0!=r){const t=[];for(w=0;w<S.length;w++)t.push(S[w].img.buffer);const e=h(function(t){let e=0;for(var n=0;n<t.length;n++)e+=t[n].byteLength;const i=new Uint8Array(e);let r=0;for(n=0;n<t.length;n++){const e=new Uint8Array(t[n]),o=e.length;for(let t=0;t<o;t+=4){let n=e[t],o=e[t+1],a=e[t+2];const s=e[t+3];0==s&&(n=o=a=0),i[r+t]=n,i[r+t+1]=o,i[r+t+2]=a,i[r+t+3]=s}r+=o}return i.buffer}(t),r);for(w=0;w<e.plte.length;w++)P.push(e.plte[w].est.rgba);let n=0;for(w=0;w<S.length;w++){const t=(E=S[w]).img.length;var T=new Uint8Array(e.inds.buffer,n>>2,t>>2);k.push(T);const i=new Uint8Array(e.abuf,n,t);m&&s(E.img,E.rect.width,E.rect.height,P,i,T),E.img.set(i),n+=t}}else for(y=0;y<S.length;y++){var E=S[y];const t=new Uint32Array(E.img.buffer);var I=E.rect.width;for(b=t.length,T=new Uint8Array(b),k.push(T),w=0;w<b;w++){const e=t[w];if(0!=w&&e==t[w-1])T[w]=T[w-1];else if(w>I&&e==t[w-I])T[w]=T[w-I];else{let t=C[e];if(null==t&&(C[e]=t=P.length,P.push(e),P.length>=300))break;T[w]=t}}}const M=P.length;for(M<=256&&0==f&&(v=M<=2?1:M<=4?2:M<=16?4:8,v=Math.max(v,p)),y=0;y<S.length;y++){(E=S[y]).rect.x,E.rect.y,I=E.rect.width;const t=E.rect.height;let e=E.img;new Uint32Array(e.buffer);let n=4*I,i=4;if(M<=256&&0==f){n=Math.ceil(v*I/8);var j=new Uint8Array(n*t);const r=k[y];for(let e=0;e<t;e++){w=e*n;const t=e*I;if(8==v)for(var D=0;D<I;D++)j[w+D]=r[t+D];else if(4==v)for(D=0;D<I;D++)j[w+(D>>1)]|=r[t+D]<<4-4*(1&D);else if(2==v)for(D=0;D<I;D++)j[w+(D>>2)]|=r[t+D]<<6-2*(3&D);else if(1==v)for(D=0;D<I;D++)j[w+(D>>3)]|=r[t+D]<<7-1*(7&D)}e=j,g=3,i=1}else if(0==A&&1==S.length){j=new Uint8Array(I*t*3);const r=I*t;for(w=0;w<r;w++){const t=3*w,n=4*w;j[t]=e[n],j[t+1]=e[n+1],j[t+2]=e[n+2]}e=j,g=2,i=3,n=3*I}E.img=e,E.bpl=n,E.bpp=i}return{ctype:g,depth:v,plte:P,frames:S}}function u(e,n,i,r,o,a,s){const c=Uint8Array,l=Uint32Array,p=new c(e[o-1]),u=new l(e[o-1]),f=o+1<e.length?new c(e[o+1]):null,m=new c(e[o]),h=new l(m.buffer);let g=n,v=i,x=-1,y=-1;for(let t=0;t<a.height;t++)for(let e=0;e<a.width;e++){const i=a.x+e,s=a.y+t,c=s*n+i,l=h[c];0==l||0==r[o-1].dispose&&u[c]==l&&(null==f||0!=f[4*c+3])||(i<g&&(g=i),i>x&&(x=i),s<v&&(v=s),s>y&&(y=s))}-1==x&&(g=v=x=y=0),s&&(!(1&~g)&&g--,!(1&~v)&&v--),a={x:g,y:v,width:x-g+1,height:y-v+1};const b=r[o];b.rect=a,b.blend=1,b.img=new Uint8Array(a.width*a.height*4),0==r[o-1].dispose?(t(p,n,i,b.img,a.width,a.height,-a.x,-a.y,0),d(m,n,i,b.img,a)):t(m,n,i,b.img,a.width,a.height,-a.x,-a.y,0)}function d(e,n,i,r,o){t(e,n,i,r,o.width,o.height,-o.x,-o.y,2)}function f(t,e,n,i,r,o,a){const s=[];let c,l=[0,1,2,3,4];-1!=o?l=[o]:(e*i>5e5||1==n)&&(l=[0]),a&&(c={level:0});const p=dl;for(var u=0;u<l.length;u++){for(let o=0;o<e;o++)m(r,t,o,i,n,l[u]);s.push(p.deflate(r,c))}let d,f=1e9;for(u=0;u<s.length;u++)s[u].length<f&&(d=u,f=s[u].length);return s[d]}function m(t,e,i,r,o,a){const s=i*r;let c=s+i;if(t[c]=a,c++,0==a)if(r<500)for(var l=0;l<r;l++)t[c+l]=e[s+l];else t.set(new Uint8Array(e.buffer,s,r),c);else if(1==a){for(l=0;l<o;l++)t[c+l]=e[s+l];for(l=o;l<r;l++)t[c+l]=e[s+l]-e[s+l-o]+256&255}else if(0==i){for(l=0;l<o;l++)t[c+l]=e[s+l];if(2==a)for(l=o;l<r;l++)t[c+l]=e[s+l];if(3==a)for(l=o;l<r;l++)t[c+l]=e[s+l]-(e[s+l-o]>>1)+256&255;if(4==a)for(l=o;l<r;l++)t[c+l]=e[s+l]-n(e[s+l-o],0,0)+256&255}else{if(2==a)for(l=0;l<r;l++)t[c+l]=e[s+l]+256-e[s+l-r]&255;if(3==a){for(l=0;l<o;l++)t[c+l]=e[s+l]+256-(e[s+l-r]>>1)&255;for(l=o;l<r;l++)t[c+l]=e[s+l]+256-(e[s+l-r]+e[s+l-o]>>1)&255}if(4==a){for(l=0;l<o;l++)t[c+l]=e[s+l]+256-n(0,e[s+l-r],0)&255;for(l=o;l<r;l++)t[c+l]=e[s+l]+256-n(e[s+l-o],e[s+l-r],e[s+l-o-r])&255}}}function h(t,e){const n=new Uint8Array(t),i=n.slice(0),r=new Uint32Array(i.buffer),o=g(i,e),a=o[0],s=o[1],c=n.length,l=new Uint8Array(c>>2);let p;if(n.length<2e7)for(var u=0;u<c;u+=4)p=v(a,d=n[u]*(1/255),f=n[u+1]*(1/255),m=n[u+2]*(1/255),h=n[u+3]*(1/255)),l[u>>2]=p.ind,r[u>>2]=p.est.rgba;else for(u=0;u<c;u+=4){var d=.00392156862745098*n[u],f=n[u+1]*(1/255),m=n[u+2]*(1/255),h=n[u+3]*(1/255);for(p=a;p.left;)p=x(p.est,d,f,m,h)<=0?p.left:p.right;l[u>>2]=p.ind,r[u>>2]=p.est.rgba}return{abuf:i.buffer,inds:l,plte:s}}function g(t,e,n){null==n&&(n=1e-4);const i=new Uint32Array(t.buffer),r={i0:0,i1:t.length,bst:null,est:null,tdst:0,left:null,right:null};r.bst=w(t,r.i0,r.i1),r.est=A(r.bst);const o=[r];for(;o.length<e;){let e=0,r=0;for(var a=0;a<o.length;a++)o[a].est.L>e&&(e=o[a].est.L,r=a);if(e<n)break;const s=o[r],c=y(t,i,s.i0,s.i1,s.est.e,s.est.eMq255);if(s.i0>=c||s.i1<=c){s.est.L=0;continue}const l={i0:s.i0,i1:c,bst:null,est:null,tdst:0,left:null,right:null};l.bst=w(t,l.i0,l.i1),l.est=A(l.bst);const p={i0:c,i1:s.i1,bst:null,est:null,tdst:0,left:null,right:null};for(p.bst={R:[],m:[],N:s.bst.N-l.bst.N},a=0;a<16;a++)p.bst.R[a]=s.bst.R[a]-l.bst.R[a];for(a=0;a<4;a++)p.bst.m[a]=s.bst.m[a]-l.bst.m[a];p.est=A(p.bst),s.left=l,s.right=p,o[r]=l,o.push(p)}for(o.sort((t,e)=>e.bst.N-t.bst.N),a=0;a<o.length;a++)o[a].ind=a;return[r,o]}function v(t,e,n,i,r){if(null==t.left)return t.tdst=function(t,e,n,i,r){const o=e-t[0],a=n-t[1],s=i-t[2],c=r-t[3];return o*o+a*a+s*s+c*c}(t.est.q,e,n,i,r),t;const o=x(t.est,e,n,i,r);let a=t.left,s=t.right;o>0&&(a=t.right,s=t.left);const c=v(a,e,n,i,r);if(c.tdst<=o*o)return c;const l=v(s,e,n,i,r);return l.tdst<c.tdst?l:c}function x(t,e,n,i,r){const{e:o}=t;return o[0]*e+o[1]*n+o[2]*i+o[3]*r-t.eMq}function y(t,e,n,i,r,o){for(i-=4;n<i;){for(;b(t,n,r)<=o;)n+=4;for(;b(t,i,r)>o;)i-=4;if(n>=i)break;const a=e[n>>2];e[n>>2]=e[i>>2],e[i>>2]=a,n+=4,i-=4}for(;b(t,n,r)>o;)n-=4;return n+4}function b(t,e,n){return t[e]*n[0]+t[e+1]*n[1]+t[e+2]*n[2]+t[e+3]*n[3]}function w(t,e,n){const i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],r=[0,0,0,0],o=n-e>>2;for(let o=e;o<n;o+=4){const e=.00392156862745098*t[o],n=t[o+1]*(1/255),a=t[o+2]*(1/255),s=t[o+3]*(1/255);r[0]+=e,r[1]+=n,r[2]+=a,r[3]+=s,i[0]+=e*e,i[1]+=e*n,i[2]+=e*a,i[3]+=e*s,i[5]+=n*n,i[6]+=n*a,i[7]+=n*s,i[10]+=a*a,i[11]+=a*s,i[15]+=s*s}return i[4]=i[1],i[8]=i[2],i[9]=i[6],i[12]=i[3],i[13]=i[7],i[14]=i[11],{R:i,m:r,N:o}}function A(t){const{R:e}=t,{m:n}=t,{N:i}=t,r=n[0],o=n[1],a=n[2],s=n[3],c=0==i?0:1/i,l=[e[0]-r*r*c,e[1]-r*o*c,e[2]-r*a*c,e[3]-r*s*c,e[4]-o*r*c,e[5]-o*o*c,e[6]-o*a*c,e[7]-o*s*c,e[8]-a*r*c,e[9]-a*o*c,e[10]-a*a*c,e[11]-a*s*c,e[12]-s*r*c,e[13]-s*o*c,e[14]-s*a*c,e[15]-s*s*c],p=l,u=S;let d=[Math.random(),Math.random(),Math.random(),Math.random()],f=0,m=0;if(0!=i)for(let t=0;t<16&&(d=u.multVec(p,d),m=Math.sqrt(u.dot(d,d)),d=u.sml(1/m,d),!(0!=t&&Math.abs(m-f)<1e-9));t++)f=m;const h=[r*c,o*c,a*c,s*c];return{Cov:l,q:h,e:d,L:f,eMq255:u.dot(u.sml(255,h),d),eMq:u.dot(d,h),rgba:(Math.round(255*h[3])<<24|Math.round(255*h[2])<<16|Math.round(255*h[1])<<8|Math.round(255*h[0]))>>>0}}var S={multVec:(t,e)=>[t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3],t[4]*e[0]+t[5]*e[1]+t[6]*e[2]+t[7]*e[3],t[8]*e[0]+t[9]*e[1]+t[10]*e[2]+t[11]*e[3],t[12]*e[0]+t[13]*e[1]+t[14]*e[2]+t[15]*e[3]],dot:(t,e)=>t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3],sml:(t,e)=>[t*e[0],t*e[1],t*e[2],t*e[3]]};fl.encode=function(t,e,n,i,r,o,a){null==i&&(i=0),null==a&&(a=!1);const s=p(t,e,n,i,[!1,!1,!1,0,a,!1]);return l(s,-1),c(s,e,n,r,o)},fl.encodeLL=function(t,e,n,i,r,o,a,s){const p={ctype:0+(1==i?0:2)+(0==r?0:4),depth:o,frames:[]},u=(i+r)*o,d=u*e;for(let i=0;i<t.length;i++)p.frames.push({rect:{x:0,y:0,width:e,height:n},img:new Uint8Array(t[i]),blend:0,dispose:1,bpp:Math.ceil(u/8),bpl:Math.ceil(d/8)});return l(p,0,!0),c(p,e,n,a,s)},fl.encode.compress=p,fl.encode.dither=s,fl.quantize=h,fl.quantize.getKDtree=g,fl.quantize.getNearest=v}();const ml={toArrayBuffer(t,e){const n=t.width,i=t.height,r=n<<2,o=t.getContext("2d").getImageData(0,0,n,i),a=new Uint32Array(o.data.buffer),s=(32*n+31)/32<<2,c=s*i,l=122+c,p=new ArrayBuffer(l),u=new DataView(p),d=1<<20;let f,m,h,g,v=d,x=0,y=0,b=0;function w(t){u.setUint16(y,t,!0),y+=2}function A(t){u.setUint32(y,t,!0),y+=4}function S(t){y+=t}w(19778),A(l),S(4),A(122),A(108),A(n),A(-i>>>0),w(1),w(32),A(3),A(c),A(2835),A(2835),S(8),A(16711680),A(65280),A(255),A(4278190080),A(1466527264),function t(){for(;x<i&&v>0;){for(g=122+x*s,f=0;f<r;)v--,m=a[b++],h=m>>>24,u.setUint32(g+f,m<<8|h),f+=4;x++}b<a.length?(v=d,setTimeout(t,ml._dly)):e(p)}()},toBlob(t,e){this.toArrayBuffer(t,t=>{e(new Blob([t],{type:"image/bmp"}))})},_dly:9};var hl={CHROME:"CHROME",FIREFOX:"FIREFOX",DESKTOP_SAFARI:"DESKTOP_SAFARI",IE:"IE",IOS:"IOS",ETC:"ETC"},gl={[hl.CHROME]:16384,[hl.FIREFOX]:11180,[hl.DESKTOP_SAFARI]:16384,[hl.IE]:8192,[hl.IOS]:4096,[hl.ETC]:8192};const vl=typeof window<"u",xl=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,yl=vl&&window.cordova&&window.cordova.require&&window.cordova.require("cordova/modulemapper"),bl=(vl||xl)&&(yl&&yl.getOriginalSymbol(window,"File")||typeof File<"u"&&File),wl=(vl||xl)&&(yl&&yl.getOriginalSymbol(window,"FileReader")||typeof FileReader<"u"&&FileReader);function Al(t,e,n=Date.now()){return new Promise(i=>{const r=t.split(","),o=r[0].match(/:(.*?);/)[1],a=globalThis.atob(r[1]);let s=a.length;const c=new Uint8Array(s);for(;s--;)c[s]=a.charCodeAt(s);const l=new Blob([c],{type:o});l.name=e,l.lastModified=n,i(l)})}function Sl(t){return new Promise((e,n)=>{const i=new wl;i.onload=()=>e(i.result),i.onerror=t=>n(t),i.readAsDataURL(t)})}function Cl(t){return new Promise((e,n)=>{const i=new Image;i.onload=()=>e(i),i.onerror=t=>n(t),i.src=t})}function Pl(){if(void 0!==Pl.cachedResult)return Pl.cachedResult;let t=hl.ETC;const{userAgent:e}=navigator;return/Chrom(e|ium)/i.test(e)?t=hl.CHROME:/iP(ad|od|hone)/i.test(e)&&/WebKit/i.test(e)?t=hl.IOS:/Safari/i.test(e)?t=hl.DESKTOP_SAFARI:/Firefox/i.test(e)?t=hl.FIREFOX:(/MSIE/i.test(e)||document.documentMode)&&(t=hl.IE),Pl.cachedResult=t,Pl.cachedResult}function kl(t,e){const n=Pl(),i=gl[n];let r=t,o=e,a=r*o;const s=r>o?o/r:r/o;for(;a>i*i;){const t=(i+r)/2,e=(i+o)/2;t<e?(o=e,r=e*s):(o=t*s,r=t),a=r*o}return{width:r,height:o}}function Tl(t,e){let n,i;try{if(n=new OffscreenCanvas(t,e),i=n.getContext("2d"),null===i)throw new Error("getContext of OffscreenCanvas returns null")}catch{n=document.createElement("canvas"),i=n.getContext("2d")}return n.width=t,n.height=e,[n,i]}function El(t,e){const{width:n,height:i}=kl(t.width,t.height),[r,o]=Tl(n,i);return e&&/jpe?g/.test(e)&&(o.fillStyle="white",o.fillRect(0,0,r.width,r.height)),o.drawImage(t,0,0,r.width,r.height),r}function Il(){return void 0!==Il.cachedResult||(Il.cachedResult=["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&typeof document<"u"&&"ontouchend"in document),Il.cachedResult}function Ml(t,e={}){return new Promise(function(n,i){let r,o;var a=function(){try{return o=El(r,e.fileType||t.type),n([r,o])}catch(t){return i(t)}},s=function(e){try{var n=function(t){try{throw t}catch(t){return i(t)}};try{let e;return Sl(t).then(function(t){try{return e=t,Cl(e).then(function(t){try{return r=t,function(){try{return a()}catch(t){return i(t)}}()}catch(t){return n(t)}},n)}catch(t){return n(t)}},n)}catch(t){n(t)}}catch(t){return i(t)}};try{if(Il()||[hl.DESKTOP_SAFARI,hl.MOBILE_SAFARI].includes(Pl()))throw new Error("Skip createImageBitmap on IOS and Safari");return createImageBitmap(t).then(function(t){try{return r=t,a()}catch{return s()}},s)}catch{s()}})}function jl(t,e,n,i,r=1){return new Promise(function(o,a){let s;if("image/png"===e){let o,a,l;return o=t.getContext("2d"),({data:a}=o.getImageData(0,0,t.width,t.height)),l=fl.encode([a.buffer],t.width,t.height,4096*r),s=new Blob([l],{type:e}),s.name=n,s.lastModified=i,c.call(this)}{let o=function(){return c.call(this)};if("image/bmp"===e)return new Promise(e=>ml.toBlob(t,e)).then(function(t){try{return s=t,s.name=n,s.lastModified=i,o.call(this)}catch(t){return a(t)}}.bind(this),a);{let c=function(){return o.call(this)};if("function"==typeof OffscreenCanvas&&t instanceof OffscreenCanvas)return t.convertToBlob({type:e,quality:r}).then(function(t){try{return s=t,s.name=n,s.lastModified=i,c.call(this)}catch(t){return a(t)}}.bind(this),a);{let o;return o=t.toDataURL(e,r),Al(o,n,i).then(function(t){try{return s=t,c.call(this)}catch(t){return a(t)}}.bind(this),a)}}}function c(){return o(s)}})}function Dl(t){t.width=0,t.height=0}function Fl(){return new Promise(function(t,e){let n,i,r,o;return void 0!==Fl.cachedResult?t(Fl.cachedResult):Al("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==","test.jpg",Date.now()).then(function(a){try{return n=a,Ml(n).then(function(a){try{return i=a[1],jl(i,n.type,n.name,n.lastModified).then(function(n){try{return r=n,Dl(i),Ml(r).then(function(n){try{return o=n[0],Fl.cachedResult=1===o.width&&2===o.height,t(Fl.cachedResult)}catch(t){return e(t)}},e)}catch(t){return e(t)}},e)}catch(t){return e(t)}},e)}catch(t){return e(t)}},e)})}function Ul(t){return new Promise((e,n)=>{const i=new wl;i.onload=t=>{const n=new DataView(t.target.result);if(65496!=n.getUint16(0,!1))return e(-2);const i=n.byteLength;let r=2;for(;r<i;){if(n.getUint16(r+2,!1)<=8)return e(-1);const t=n.getUint16(r,!1);if(r+=2,65505==t){if(1165519206!=n.getUint32(r+=2,!1))return e(-1);const t=18761==n.getUint16(r+=6,!1);r+=n.getUint32(r+4,t);const i=n.getUint16(r,t);r+=2;for(let o=0;o<i;o++)if(274==n.getUint16(r+12*o,t))return e(n.getUint16(r+12*o+8,t))}else{if(65280&~t)break;r+=n.getUint16(r,!1)}}return e(-1)},i.onerror=t=>n(t),i.readAsArrayBuffer(t)})}function Rl(t,e){const{width:n}=t,{height:i}=t,{maxWidthOrHeight:r}=e;let o,a=t;return isFinite(r)&&(n>r||i>r)&&([a,o]=Tl(n,i),n>i?(a.width=r,a.height=i/n*r):(a.width=n/i*r,a.height=r),o.drawImage(t,0,0,a.width,a.height),Dl(t)),a}function Ol(t,e){const{width:n}=t,{height:i}=t,[r,o]=Tl(n,i);switch(e>4&&e<9?(r.width=i,r.height=n):(r.width=n,r.height=i),e){case 2:o.transform(-1,0,0,1,n,0);break;case 3:o.transform(-1,0,0,-1,n,i);break;case 4:o.transform(1,0,0,-1,0,i);break;case 5:o.transform(0,1,1,0,0,0);break;case 6:o.transform(0,1,-1,0,i,0);break;case 7:o.transform(0,-1,-1,0,i,n);break;case 8:o.transform(0,-1,1,0,0,n)}return o.drawImage(t,0,0,n,i),Dl(t),r}function Ll(t,e,n=0){return new Promise(function(i,r){let o,a,s,c,l,p,u,d,f,m,h,g,v,x,y,b,w,A,S,C;function P(t=5){if(e.signal&&e.signal.aborted)throw e.signal.reason;o+=t,e.onProgress(Math.min(o,100))}function k(t){if(e.signal&&e.signal.aborted)throw e.signal.reason;o=Math.min(Math.max(t,o),100),e.onProgress(o)}return o=n,a=e.maxIteration||10,s=1024*e.maxSizeMB*1024,P(),Ml(t,e).then(function(n){try{return[,c]=n,P(),l=Rl(c,e),P(),new Promise(function(n,i){var r;if(!(r=e.exifOrientation))return Ul(t).then(function(t){try{return r=t,o.call(this)}catch(t){return i(t)}}.bind(this),i);function o(){return n(r)}return o.call(this)}).then(function(n){try{return p=n,P(),Fl().then(function(n){try{return u=n?l:Ol(l,p),P(),d=e.initialQuality||1,f=e.fileType||t.type,jl(u,f,t.name,t.lastModified,d).then(function(n){try{{let p=function(){if(a--&&(y>s||y>v)){let e,n;return e=C?.95*S.width:S.width,n=C?.95*S.height:S.height,[w,A]=Tl(e,n),A.drawImage(S,0,0,e,n),d*="image/png"===f?.85:.95,jl(w,f,t.name,t.lastModified,d).then(function(t){try{return b=t,Dl(S),S=w,y=b.size,k(Math.min(99,Math.floor((x-y)/(x-s)*100))),p}catch(t){return r(t)}},r)}return[1]},T=function(){return Dl(S),Dl(w),Dl(l),Dl(u),Dl(c),k(100),i(b)};return m=n,P(),h=m.size>s,g=m.size>t.size,h||g?(v=t.size,x=m.size,y=x,S=u,C=!e.alwaysKeepResolution&&h,(o=function(t){for(;t;){if(t.then)return void t.then(o,r);try{if(t.pop){if(t.length)return t.pop()?T.call(this):t;t=p}else t=t.call(this)}catch(t){return r(t)}}}.bind(this))(p)):(k(100),i(m));var o}}catch(t){return r(t)}}.bind(this),r)}catch(t){return r(t)}}.bind(this),r)}catch(t){return r(t)}}.bind(this),r)}catch(t){return r(t)}}.bind(this),r)})}let Nl;function Bl(t,e){return new Promise(function(n,i){let r,o,a,s,c,l;if(r={...e},a=0,({onProgress:s}=r),r.maxSizeMB=r.maxSizeMB||Number.POSITIVE_INFINITY,c="boolean"!=typeof r.useWebWorker||r.useWebWorker,delete r.useWebWorker,r.onProgress=t=>{a=t,"function"==typeof s&&s(a)},!(t instanceof Blob||t instanceof bl))return i(new Error("The file given is not an instance of Blob or File"));if(!/^image/.test(t.type))return i(new Error("The file given is not an image"));if(l=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,!c||"function"!=typeof Worker||l)return Ll(t,r).then(function(t){try{return o=t,d.call(this)}catch(t){return i(t)}}.bind(this),i);var p=function(){try{return d.call(this)}catch(t){return i(t)}}.bind(this),u=function(e){try{return Ll(t,r).then(function(t){try{return o=t,p()}catch(t){return i(t)}},i)}catch(t){return i(t)}};try{return r.libURL=r.libURL||"https://cdn.jsdelivr.net/npm/browser-image-compression@2.0.2/dist/browser-image-compression.js",function(t,e){return new Promise((n,i)=>{Nl||(Nl=function(t){const e=[];return e.push(t),URL.createObjectURL(new Blob(e))}("\nlet scriptImported = false\nself.addEventListener('message', async (e) => {\n const { file, id, imageCompressionLibUrl, options } = e.data\n options.onProgress = (progress) => self.postMessage({ progress, id })\n try {\n if (!scriptImported) {\n // console.log('[worker] importScripts', imageCompressionLibUrl)\n self.importScripts(imageCompressionLibUrl)\n scriptImported = true\n }\n // console.log('[worker] self', self)\n const compressedFile = await imageCompression(file, options)\n self.postMessage({ file: compressedFile, id })\n } catch (e) {\n // console.error('[worker] error', e)\n self.postMessage({ error: e.message + '\\n' + e.stack, id })\n }\n})\n"));const r=new Worker(Nl);r.addEventListener("message",function(t){if(e.signal&&e.signal.aborted)r.terminate();else if(void 0===t.data.progress){if(t.data.error)return i(new Error(t.data.error)),void r.terminate();n(t.data.file),r.terminate()}else e.onProgress(t.data.progress)}),r.addEventListener("error",i),e.signal&&e.signal.addEventListener("abort",()=>{i(e.signal.reason),r.terminate()}),r.postMessage({file:t,imageCompressionLibUrl:e.libURL,options:{...e,onProgress:void 0,signal:void 0}})})}(t,r).then(function(t){try{return o=t,p()}catch{return u()}},u)}catch{u()}function d(){try{o.name=t.name,o.lastModified=t.lastModified}catch{}try{r.preserveExif&&"image/jpeg"===t.type&&(!r.fileType||r.fileType&&r.fileType===t.type)&&(o=ol(t,o))}catch{}return n(o)}})}Bl.getDataUrlFromFile=Sl,Bl.getFilefromDataUrl=Al,Bl.loadImage=Cl,Bl.drawImageInCanvas=El,Bl.drawFileInCanvas=Ml,Bl.canvasToFile=jl,Bl.getExifOrientation=Ul,Bl.handleMaxWidthOrHeight=Rl,Bl.followExifOrientation=Ol,Bl.cleanupCanvasMemory=Dl,Bl.isAutoOrientationInBrowser=Fl,Bl.approximateBelowMaximumCanvasSizeOfBrowser=kl,Bl.copyExifWithoutOrientation=ol,Bl.getBrowserName=Pl,Bl.version="2.0.2";let Vl=class{constructor(t){if(function(t){return"object"!=typeof t||void 0===t.length||void 0===t.readUInt8||void 0===t.readUInt16LE||void 0===t.readUInt16BE||void 0===t.readUInt32LE||void 0===t.readUInt32BE||void 0===t.readInt32LE||void 0===t.readInt32BE}(t))throw new Error("DataView: Passed buffer type is unsupported.");this.buffer=t,this.byteLength=this.buffer.length}getUint8(t){return this.buffer.readUInt8(t)}getUint16(t,e){return e?this.buffer.readUInt16LE(t):this.buffer.readUInt16BE(t)}getUint32(t,e){return e?this.buffer.readUInt32LE(t):this.buffer.readUInt32BE(t)}getInt32(t,e){return e?this.buffer.readInt32LE(t):this.buffer.readInt32BE(t)}};function ql(t,e,n){try{return new DataView(t,e,n)}catch{return new Vl(t,e,n)}}function zl(t,e,n){const i=[];for(let r=0;r<n&&e+r<t.byteLength;r++)i.push(t.getUint8(e+r));return Hl(i)}function _l(t,e){const n=[];let i=0;for(;e+i<t.byteLength;){const r=t.getUint8(e+i);if(0===r)break;n.push(r),i++}return Hl(n)}function Gl(t,e,n){const i=[];for(let r=0;r<n&&e+r<t.byteLength;r+=2)i.push(t.getUint16(e+r));return 0===i[i.length-1]&&i.pop(),Hl(i)}function $l(t,e){const n=t.getUint8(e);return[n,zl(t,e+1,n)]}function Hl(t){return t.map(t=>String.fromCharCode(t)).join("")}function Wl(){for(let t=1;t<arguments.length;t++)for(const e in arguments[t])arguments[0][e]=arguments[t][e];return arguments[0]}function Xl(t,e,n){let i=!1;Object.defineProperty(t,e,{get:()=>(i||(i=!0,Object.defineProperty(t,e,{configurable:!0,enumerable:!0,value:n.apply(t),writable:!0})),t[e]),configurable:!0,enumerable:!0})}function Yl(t){return typeof btoa<"u"?btoa("string"==typeof t?t:Array.prototype.reduce.call(new Uint8Array(t),(t,e)=>t+String.fromCharCode(e),"")):typeof Buffer>"u"?void 0:typeof Buffer.from<"u"?Buffer.from(t).toString("base64"):new Buffer(t).toString("base64")}function Kl(t,e){return new Array(e+1).join(t)}const Zl=void 0;function Ql(t,e,n,i="string"){if(0===e&&"function"==typeof DecompressionStream){const e=new DecompressionStream("deflate"),r=new Blob([t]).stream().pipeThrough(e);return"dataview"===i?new Response(r).arrayBuffer().then(t=>new DataView(t)):new Response(r).arrayBuffer().then(t=>new TextDecoder(n).decode(t))}return void 0!==e?Promise.reject(`Unknown compression method ${e}.`):t}const Jl=!0,tp=!0;function ep(t){return t.map(t=>String.fromCharCode(t)).join("")}function np(t){if(t.length>=8){const e=ep(t.slice(0,8));if("ASCII\0\0\0"===e)return ep(t.slice(8));if("JIS\0\0\0\0\0"===e)return"[JIS encoded text]";if("UNICODE\0"===e)return"[Unicode encoded text]";if("\0\0\0\0\0\0\0\0"===e)return"[Undefined encoding]"}return"Undefined"}function ip(t){return t[0][0]/t[0][1]+t[1][0]/t[1][1]/60+t[2][0]/t[2][1]/3600}const rp=18761,op=19789,ap={BIG_ENDIAN:op,LITTLE_ENDIAN:rp,getByteOrder:function(t,e){if(t.getUint16(e)===rp)return rp;if(t.getUint16(e)===op)return op;throw new Error("Illegal byte order value. Faulty image.")}};const sp={isTiffFile:function(t){return!!t&&t.byteLength>=4&&function(t){const e=t.getUint16(0)===ap.LITTLE_ENDIAN;return 42===t.getUint16(2,e)}(t)},findTiffOffsets:function(){return{hasAppMarkers:!0,tiffHeaderOffset:0}}};const cp={isJpegFile:function(t){return!!t&&t.byteLength>=lp&&t.getUint16(0)===pp},findJpegOffsets:function(t){let e,n,i,r,o,a,s,c,l,p=up;for(;p+dp+5<=t.byteLength;){if(_p(t,p))e=t.getUint16(p+fp),n=p+fp;else if(Gp(t,p))e=t.getUint16(p+fp),i=p+fp;else if(Wp(t,p))e=t.getUint16(p+fp),r=p+mp;else if(Xp(t,p))e=t.getUint16(p+fp),o=p+hp;else if(Yp(t,p))s||(s=[]),e=t.getUint16(p+fp),s.push(Zp(p,e));else if(Kp(t,p))s||(s=[]),e=t.getUint16(p+fp),s.push(Qp(p,e));else if(Jp(t,p))e=t.getUint16(p+fp),a=p+gp;else if($p(t,p)){e=t.getUint16(p+fp);const n=p+yp,i=e-(yp-fp),r=t.getUint8(p+Ap),o=t.getUint8(p+Sp);c||(c=[]),c.push({offset:n,length:i,chunkNumber:r,chunksTotal:o})}else if(Hp(t,p))e=t.getUint16(p+fp),l=p+bp;else{if(!tu(t,p)){if(eu(t,p)){p++;continue}break}e=t.getUint16(p+fp)}p+=fp+e}return{hasAppMarkers:p>up,fileDataOffset:n||i,jfifDataOffset:r,tiffHeaderOffset:o,iptcDataOffset:a,xmpChunks:s,iccChunks:c,mpfDataOffset:l}}},lp=2,pp=65496,up=2,dp=4,fp=2,mp=2,hp=10,gp=18,vp=33,xp=79,yp=18,bp=8,wp="ICC_PROFILE\0",Ap=dp+wp.length,Sp=Ap+1,Cp="MPF\0",Pp=65472,kp=65474,Tp=65476,Ep=65499,Ip=65501,Mp=65498,jp=65504,Dp=65505,Fp=65506,Up=65517,Rp=65519,Op=65534,Lp=65535,Np="JFIF",Bp="Exif",Vp="http://ns.adobe.com/xap/1.0/\0",qp="http://ns.adobe.com/xmp/extension/\0",zp="Photoshop 3.0";function _p(t,e){return t.getUint16(e)===Pp}function Gp(t,e){return t.getUint16(e)===kp}function $p(t,e){const n=wp.length;return t.getUint16(e)===Fp&&zl(t,e+dp,n)===wp}function Hp(t,e){const n=Cp.length;return t.getUint16(e)===Fp&&zl(t,e+dp,n)===Cp}function Wp(t,e){const n=Np.length;return t.getUint16(e)===jp&&zl(t,e+dp,n)===Np&&0===t.getUint8(e+dp+n)}function Xp(t,e){const n=Bp.length;return t.getUint16(e)===Dp&&zl(t,e+dp,n)===Bp&&0===t.getUint8(e+dp+n)}function Yp(t,e){return t.getUint16(e)===Dp&&function(t,e){const n=Vp.length;return zl(t,e+dp,n)===Vp}(t,e)}function Kp(t,e){return t.getUint16(e)===Dp&&function(t,e){const n=qp.length;return zl(t,e+dp,n)===qp}(t,e)}function Zp(t,e){return{dataOffset:t+vp,length:e-(vp-fp)}}function Qp(t,e){return{dataOffset:t+xp,length:e-(xp-fp)}}function Jp(t,e){const n=zp.length;return t.getUint16(e)===Up&&zl(t,e+dp,n)===zp&&0===t.getUint8(e+dp+n)}function tu(t,e){const n=t.getUint16(e);return n>=jp&&n<=Rp||n===Op||n===Pp||n===kp||n===Tp||n===Ep||n===Ip||n===Mp}function eu(t,e){return t.getUint16(e)===Lp}const nu={isPngFile:function(t){return!!t&&zl(t,0,iu.length)===iu},findPngOffsets:function(t,e){const n={hasAppMarkers:!1};let i=iu.length;for(;i+ru+ou<=t.byteLength;){if(vu(t,i))n.hasAppMarkers=!0,n.pngHeaderOffset=i+cu;else if(xu(t,i)){const e=Su(t,i);void 0!==e&&(n.hasAppMarkers=!0,n.xmpChunks=[{dataOffset:e,length:t.getUint32(i+au)-(e-(i+cu))}])}else if(yu(t,i,e)){n.hasAppMarkers=!0;const e=zl(t,i+su,ou);n.pngTextChunks||(n.pngTextChunks=[]),n.pngTextChunks.push({length:t.getUint32(i+au),type:e,offset:i+cu})}else if(bu(t,i))n.hasAppMarkers=!0,n.tiffHeaderOffset=i+cu;else if(e&&wu(t,i)){n.hasAppMarkers=!0;const e=t.getUint32(i+au),r=i+cu,{profileName:o,compressionMethod:a,compressedProfileOffset:s}=Cu(t,r);n.iccChunks||(n.iccChunks=[]),n.iccChunks.push({offset:s,length:e-(s-r),chunkNumber:1,chunksTotal:1,profileName:o,compressionMethod:a})}else Au(t,i)&&(n.hasAppMarkers=!0,n.pngChunkOffsets||(n.pngChunkOffsets=[]),n.pngChunkOffsets.push(i+au));i+=t.getUint32(i+au)+ru+ou+4}return n}},iu="PNG\r\n\n",ru=4,ou=4,au=0,su=ru,cu=ru+ou,lu="XML:com.adobe.xmp\0",pu="tEXt",uu="iTXt",du="zTXt",fu="pHYs",mu="tIME",hu="eXIf",gu="iCCP";function vu(t,e){return"IHDR"===zl(t,e+su,ou)}function xu(t,e){return zl(t,e+su,ou)===uu&&zl(t,e+cu,lu.length)===lu}function yu(t,e,n){const i=zl(t,e+su,ou);return i===pu||i===uu||i===du&&n}function bu(t,e){return zl(t,e+su,ou)===hu}function wu(t,e){return zl(t,e+su,ou)===gu}function Au(t,e){const n=[fu,mu],i=zl(t,e+su,ou);return n.includes(i)}function Su(t,e){e+=cu+lu.length+1+1;let n=0;for(;n<2&&e<t.byteLength;)0===t.getUint8(e)&&n++,e++;if(!(n<2))return e}function Cu(t,e){const n=_l(t,e);e+=n.length+1;return{profileName:n,compressionMethod:t.getUint8(e),compressedProfileOffset:e+=1}}function Pu(t,e,n,i,r,o,a,s){if(void 0===s)return[];const c=[];let l=n.items;for(let n=0;n<s;n++){const n={extents:[]};n.itemId=ku(t,l,e),l+=i.item.itemId,n.constructionMethod=1===e||2===e?15&t.getUint16(l):void 0,l+=i.item.constructionMethod,n.dataReferenceIndex=t.getUint16(l),l+=i.item.dataReferenceIndex,n.baseOffset=Eu(t,l,i.item.baseOffset),l+=i.item.baseOffset,n.extentCount=t.getUint16(l),l+=i.item.extentCount;for(let s=0;s<n.extentCount;s++){const s={};s.extentIndex=Tu(t,e,l,a),l+=i.item.extent.extentIndex,s.extentOffset=Eu(t,l,r),l+=i.item.extent.extentOffset,s.extentLength=Eu(t,l,o),l+=i.item.extent.extentLength,n.extents.push(s)}c.push(n)}return c}function ku(t,e,n){return n<2?t.getUint16(e):2===n?t.getUint32(e):void 0}function Tu(t,e,n,i){if((1===e||2===e)&&i>0)return Eu(t,n,i)}function Eu(t,e,n){return 4===n?t.getUint32(e):8===n?(console.warn("This file uses an 8-bit offset which is currently not supported by ExifReader. Contact the maintainer to get it fixed."),function(t,e){return t.getUint32(e+4)}(t,e)):0}const Iu=1165519206,Mu=1835625829,ju=1970432288;function Du(t,e){const{length:n,contentOffset:i}=function(t,e){const n=t.getUint32(e);return function(t){return 0===t}(n)?{length:t.byteLength-e,contentOffset:e+4+4}:function(t){return 1===t}(n)&&function(t,e){return 0===t.getUint32(e+8)}(t,e)?{length:t.getUint32(e+12),contentOffset:e+4+4+8}:{length:n,contentOffset:e+4+4}}(t,e);if(n<8)return;const r=t.getUint32(e+4);if(1718909296===r)return function(t,e,n){return{type:"ftyp",majorBrand:zl(t,e,4),length:n}}(t,i,n);if(1768977008===r)return function(t,e,n,i){return{type:"iprp",subBoxes:Ou(t,n,i-(n-e)),length:i}}(t,e,i,n);if(1768973167===r)return function(t,e,n,i){return{type:"ipco",properties:Ou(t,n,i-(n-e)),length:i}}(t,e,i,n);if(1668246642===r)return function(t,e,n){return{type:"colr",icc:Ru(t,e),length:n}}(t,i,n);const o=t.getUint8(i);return 1835365473===r?function(t,e,n,i){return{type:"meta",subBoxes:Ou(t,n+3,i-(n+3-e)),length:i}}(t,e,i+1,n):1768714083===r?function(t,e,n,i){const{offsets:r,sizes:o}=function(t,e){const n={item:{dataReferenceIndex:2,extentCount:2,extent:{}}};t<2?(n.itemCount=2,n.item.itemId=2):2===t&&(n.itemCount=4,n.item.itemId=4),n.item.constructionMethod=1===t||2===t?2:0;const i={offsetSize:e,lengthSize:e,baseOffsetSize:e+1,indexSize:e+1};return i.itemCount=e+2,i.items=i.itemCount+n.itemCount,i.item={itemId:0},i.item.constructionMethod=i.item.itemId+n.item.itemId,i.item.dataReferenceIndex=i.item.constructionMethod+n.item.constructionMethod,{offsets:i,sizes:n}}(e,n+3),a=t.getUint8(r.offsetSize)>>4;o.item.extent.extentOffset=a;const s=15&t.getUint8(r.lengthSize);o.item.extent.extentLength=s;const c=t.getUint8(r.baseOffsetSize)>>4;o.item.baseOffset=c;const l=function(t,e,n){if(1===n||2===n)return 15&t.getUint8(e)}(t,r.indexSize,e);o.item.extent.extentIndex=void 0!==l?l:0;const p=function(t,e,n){return n<2?t.getUint16(e):2===n?t.getUint32(e):void 0}(t,r.itemCount,e);return{type:"iloc",items:Pu(t,e,r,o,a,s,l,p),length:i}}(t,o,i+1,n):1768517222===r?function(t,e,n,i,r){const{offsets:o}=function(t,e){const n={entryCount:e+3},i={};return i.entryCount=0===t?2:4,n.itemInfos=n.entryCount+i.entryCount,{offsets:n}}(n,i);return{type:"iinf",itemInfos:Ou(t,o.itemInfos,r-(o.itemInfos-e)),length:r}}(t,e,o,i+1,n):1768842853===r?function(t,e,n,i,r){i+=3;const o={type:"infe",length:r};return(0===n||1===n)&&(o.itemId=t.getUint16(i),i+=2,o.itemProtectionIndex=t.getUint16(i),i+=2,o.itemName=_l(t,i),i+=o.itemName.length+1),n>=2&&(2===n?(o.itemId=t.getUint16(i),i+=2):3===n&&(o.itemId=t.getUint32(i),i+=4),o.itemProtectionIndex=t.getUint16(i),i+=2,o.itemType=t.getUint32(i),i+=4,o.itemName=_l(t,i),i+=o.itemName.length+1,o.itemType===Mu?(o.contentType=_l(t,i),i+=o.contentType.length+1,e+r>i&&(o.contentEncoding=_l(t,i),i+=o.contentEncoding.length+1)):o.itemType===ju&&(o.itemUri=_l(t,i),i+=o.itemUri.length+1)),o}(t,e,o,i+1,n):{type:void 0,length:n}}function Fu(t){{const e={},n=function(t){let e=0;for(;e+4+4<=t.byteLength;){const n=Du(t,e);if(void 0===n)break;if("meta"===n.type)return n;e+=n.length}}(t);return n?(e.tiffHeaderOffset=function(t,e){try{const n=function(t){return t.subBoxes.find(t=>"iinf"===t.type).itemInfos.find(t=>t.itemType===Iu)}(e).itemId,i=Uu(e,n);return function(t,e){return e+4+t.getUint32(e)}(t,i.baseOffset+i.extents[0].extentOffset)}catch{return}}(t,n),e.xmpChunks=function(t){try{const e=function(t){return t.subBoxes.find(t=>"iinf"===t.type).itemInfos.find(t=>t.itemType===Mu&&"application/rdf+xml"===t.contentType)}(t).itemId,n=Uu(t,e),i=Uu(t,e).extents[0];return[{dataOffset:n.baseOffset+i.extentOffset,length:i.extentLength}]}catch{return}}(n),e.iccChunks=function(t){try{const e=t.subBoxes.find(t=>"iprp"===t.type).subBoxes.find(t=>"ipco"===t.type).properties.find(t=>"colr"===t.type).icc;if(e)return[e]}catch{}}(n),e.hasAppMarkers=void 0!==e.tiffHeaderOffset||void 0!==e.xmpChunks||void 0!==e.iccChunks,e):{hasAppMarkers:!1}}}function Uu(t,e){return t.subBoxes.find(t=>"iloc"===t.type).items.find(t=>t.itemId===e)}function Ru(t,e){const n=zl(t,e,4);if("prof"===n||"rICC"===n)return{offset:e+4,length:t.getUint32(e+4),chunkNumber:1,chunksTotal:1}}function Ou(t,e,n){const i=[Iu,Mu],r=[];let o=e;for(;o<e+n;){const e=Du(t,o);if(void 0===e)break;void 0!==e.type&&(void 0===e.itemType||-1!==i.indexOf(e.itemType))&&r.push(e),o+=e.length}return r}const Lu={isHeicFile:function(t){if(!t)return!1;const e=["heic","heix","hevc","hevx","heim","heis","hevm","hevs","mif1"];try{const n=Du(t,0);return n&&-1!==e.indexOf(n.majorBrand)}catch{return!1}},findHeicOffsets:function(t){return Fu(t)}};const Nu={isAvifFile:function(t){if(!t)return!1;try{const e=Du(t,0);return e&&"avif"===e.majorBrand}catch{return!1}},findAvifOffsets:function(t){return Fu(t)}};const Bu={isWebpFile:function(t){const e="RIFF",n="WEBP";return!!t&&zl(t,0,4)===e&&zl(t,8,4)===n},findOffsets:function(t){const e="Exif\0\0";let n,i,r,o,a=12,s=!1;for(;a+8<t.byteLength;){const c=zl(t,a,4),l=t.getUint32(a+4,!0);"EXIF"===c?(s=!0,n=zl(t,a+8,6)===e?a+8+6:a+8):"XMP "===c?(s=!0,i=[{dataOffset:a+8,length:l}]):"ICCP"===c?(s=!0,r=[{offset:a+8,length:l,chunkNumber:1,chunksTotal:1}]):"VP8X"===c&&(s=!0,o=a+8),a+=8+(l%2==0?l:l+1)}return{hasAppMarkers:s,tiffHeaderOffset:n,xmpChunks:i,iccChunks:r,vp8xChunkOffset:o}}};const Vu={isGifFile:function(t){return!!t&&zu.includes(zl(t,0,qu))},findOffsets:function(){return{gifHeaderOffset:0}}},qu=6,zu=["GIF87a","GIF89a"];const _u={isXMLFile:function(t){return!!t&&zl(t,Gu,$u.length)===$u},findOffsets:function(t){const e=[];return e.push({dataOffset:Gu,length:t.byteLength}),{xmpChunks:e}}},Gu=0,$u="<?xpacket begin";const Hu={parseAppMarkers:function(t,e){if(sp.isTiffFile(t))return Wu(sp.findTiffOffsets(),"tiff","TIFF");if(cp.isJpegFile(t))return Wu(cp.findJpegOffsets(t),"jpeg","JPEG");if(nu.isPngFile(t))return Wu(nu.findPngOffsets(t,e),"png","PNG");if(Lu.isHeicFile(t))return Wu(Lu.findHeicOffsets(t),"heic","HEIC");if(Nu.isAvifFile(t))return Wu(Nu.findAvifOffsets(t),"avif","AVIF");if(Bu.isWebpFile(t))return Wu(Bu.findOffsets(t),"webp","WebP");if(Vu.isGifFile(t))return Wu(Vu.findOffsets(t),"gif","GIF");if(_u.isXMLFile(t))return Wu(_u.findOffsets(t),"xml","XML");throw new Error("Invalid image format")}};function Wu(t,e,n){return Wl({},t,{fileType:{value:e,description:n}})}const Xu={ApertureValue:t=>Math.pow(Math.sqrt(2),t[0]/t[1]).toFixed(2),ColorSpace:t=>1===t?"sRGB":65535===t?"Uncalibrated":"Unknown",ComponentsConfiguration:t=>t.map(t=>49===t?"Y":50===t?"Cb":51===t?"Cr":52===t?"R":53===t?"G":54===t?"B":void 0).join(""),Contrast:t=>0===t?"Normal":1===t?"Soft":2===t?"Hard":"Unknown",CustomRendered:t=>0===t?"Normal process":1===t?"Custom process":"Unknown",ExposureMode:t=>0===t?"Auto exposure":1===t?"Manual exposure":2===t?"Auto bracket":"Unknown",ExposureProgram:t=>0===t?"Undefined":1===t?"Manual":2===t?"Normal program":3===t?"Aperture priority":4===t?"Shutter priority":5===t?"Creative program":6===t?"Action program":7===t?"Portrait mode":8===t?"Landscape mode":9===t?"Bulb":"Unknown",ExposureTime(t){if(t[0]/t[1]>.25){const e=t[0]/t[1];return Number.isInteger(e)?""+e:e.toFixed(1)}return 0!==t[0]?`1/${Math.round(t[1]/t[0])}`:`0/${t[1]}`},FNumber:t=>`f/${Number(t[0]/t[1]).toFixed(1)}`,FocalLength:t=>t[0]/t[1]+" mm",FocalPlaneResolutionUnit:t=>2===t?"inches":3===t?"centimeters":4===t?"millimeters":"Unknown",LightSource:t=>1===t?"Daylight":2===t?"Fluorescent":3===t?"Tungsten (incandescent light)":4===t?"Flash":9===t?"Fine weather":10===t?"Cloudy weather":11===t?"Shade":12===t?"Daylight fluorescent (D 5700 – 7100K)":13===t?"Day white fluorescent (N 4600 – 5400K)":14===t?"Cool white fluorescent (W 3900 – 4500K)":15===t?"White fluorescent (WW 3200 – 3700K)":17===t?"Standard light A":18===t?"Standard light B":19===t?"Standard light C":20===t?"D55":21===t?"D65":22===t?"D75":23===t?"D50":24===t?"ISO studio tungsten":255===t?"Other light source":"Unknown",MeteringMode:t=>1===t?"Average":2===t?"CenterWeightedAverage":3===t?"Spot":4===t?"MultiSpot":5===t?"Pattern":6===t?"Partial":255===t?"Other":"Unknown",ResolutionUnit:t=>2===t?"inches":3===t?"centimeters":"Unknown",Saturation:t=>0===t?"Normal":1===t?"Low saturation":2===t?"High saturation":"Unknown",FocalLengthIn35mmFilm:t=>0===t?"Unknown":t+" mm",SceneCaptureType:t=>0===t?"Standard":1===t?"Landscape":2===t?"Portrait":3===t?"Night scene":"Unknown",Sharpness:t=>0===t?"Normal":1===t?"Soft":2===t?"Hard":"Unknown",ShutterSpeedValue(t){const e=Math.pow(2,t[0]/t[1]);return e<=1?`${Math.round(1/e)}`:`1/${Math.round(e)}`},WhiteBalance:t=>0===t?"Auto white balance":1===t?"Manual white balance":"Unknown",XResolution:t=>""+Math.round(t[0]/t[1]),YResolution:t=>""+Math.round(t[0]/t[1])},Yu={11:"ProcessingSoftware",254:{name:"SubfileType",description:t=>({0:"Full-resolution image",1:"Reduced-resolution image",2:"Single page of multi-page image",3:"Single page of multi-page reduced-resolution image",4:"Transparency mask",5:"Transparency mask of reduced-resolution image",6:"Transparency mask of multi-page image",7:"Transparency mask of reduced-resolution multi-page image",65537:"Alternate reduced-resolution image",4294967295:"Invalid"}[t]||"Unknown")},255:{name:"OldSubfileType",description:t=>({0:"Full-resolution image",1:"Reduced-resolution image",2:"Single page of multi-page image"}[t]||"Unknown")},256:"ImageWidth",257:"ImageLength",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",263:{name:"Thresholding",description:t=>({1:"No dithering or halftoning",2:"Ordered dither or halfton",3:"Randomized dither"}[t]||"Unknown")},264:"CellWidth",265:"CellLength",266:{name:"FillOrder",description:t=>({1:"Normal",2:"Reversed"}[t]||"Unknown")},269:"DocumentName",270:"ImageDescription",271:"Make",272:"Model",273:"StripOffsets",274:{name:"Orientation",description:t=>1===t?"top-left":2===t?"top-right":3===t?"bottom-right":4===t?"bottom-left":5===t?"left-top":6===t?"right-top":7===t?"right-bottom":8===t?"left-bottom":"Undefined"},277:"SamplesPerPixel",278:"RowsPerStrip",279:"StripByteCounts",280:"MinSampleValue",281:"MaxSampleValue",282:{name:"XResolution",description:Xu.XResolution},283:{name:"YResolution",description:Xu.YResolution},284:"PlanarConfiguration",285:"PageName",286:{name:"XPosition",description:t=>""+Math.round(t[0]/t[1])},287:{name:"YPosition",description:t=>""+Math.round(t[0]/t[1])},290:{name:"GrayResponseUnit",description:t=>({1:"0.1",2:"0.001",3:"0.0001",4:"1e-05",5:"1e-06"}[t]||"Unknown")},296:{name:"ResolutionUnit",description:Xu.ResolutionUnit},297:"PageNumber",301:"TransferFunction",305:"Software",306:"DateTime",315:"Artist",316:"HostComputer",317:"Predictor",318:{name:"WhitePoint",description:t=>t.map(t=>`${t[0]}/${t[1]}`).join(", ")},319:{name:"PrimaryChromaticities",description:t=>t.map(t=>`${t[0]}/${t[1]}`).join(", ")},321:"HalftoneHints",322:"TileWidth",323:"TileLength",330:"A100DataOffset",332:{name:"InkSet",description:t=>({1:"CMYK",2:"Not CMYK"}[t]||"Unknown")},337:"TargetPrinter",338:{name:"ExtraSamples",description:t=>({0:"Unspecified",1:"Associated Alpha",2:"Unassociated Alpha"}[t]||"Unknown")},339:{name:"SampleFormat",description:t=>{const e={1:"Unsigned",2:"Signed",3:"Float",4:"Undefined",5:"Complex int",6:"Complex float"};return Array.isArray(t)?t.map(t=>e[t]||"Unknown").join(", "):"Unknown"}},513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",529:{name:"YCbCrCoefficients",description:t=>t.map(t=>""+t[0]/t[1]).join("/")},530:"YCbCrSubSampling",531:{name:"YCbCrPositioning",description:t=>1===t?"centered":2===t?"co-sited":"undefined "+t},532:{name:"ReferenceBlackWhite",description:t=>t.map(t=>""+t[0]/t[1]).join(", ")},700:"ApplicationNotes",18246:"Rating",18249:"RatingPercent",33432:{name:"Copyright",description:t=>t.join("; ")},33550:"PixelScale",33723:"IPTC-NAA",33920:"IntergraphMatrix",33922:"ModelTiePoint",34118:"SEMInfo",34264:"ModelTransform",34377:"PhotoshopSettings",34665:"Exif IFD Pointer",34675:"ICC_Profile",34735:"GeoTiffDirectory",34736:"GeoTiffDoubleParams",34737:"GeoTiffAsciiParams",34853:"GPS Info IFD Pointer",40091:{name:"XPTitle",description:Ku},40092:{name:"XPComment",description:Ku},40093:{name:"XPAuthor",description:Ku},40094:{name:"XPKeywords",description:Ku},40095:{name:"XPSubject",description:Ku},42112:"GDALMetadata",42113:"GDALNoData",50341:"PrintIM",50707:"DNGBackwardVersion",50708:"UniqueCameraModel",50709:"LocalizedCameraModel",50721:"ColorMatrix1",50722:"ColorMatrix2",50723:"CameraCalibration1",50724:"CameraCalibration2",50725:"ReductionMatrix1",50726:"ReductionMatrix2",50727:"AnalogBalance",50728:"AsShotNeutral",50729:"AsShotWhiteXY",50730:"BaselineExposure",50731:"BaselineNoise",50732:"BaselineSharpness",50734:"LinearResponseLimit",50735:"CameraSerialNumber",50736:"DNGLensInfo",50739:"ShadowScale",50741:{name:"MakerNoteSafety",description:t=>({0:"Unsafe",1:"Safe"}[t]||"Unknown")},50778:{name:"CalibrationIlluminant1",description:Xu.LightSource},50779:{name:"CalibrationIlluminant2",description:Xu.LightSource},50781:"RawDataUniqueID",50827:"OriginalRawFileName",50828:"OriginalRawFileData",50831:"AsShotICCProfile",50832:"AsShotPreProfileMatrix",50833:"CurrentICCProfile",50834:"CurrentPreProfileMatrix",50879:"ColorimetricReference",50885:"SRawType",50898:"PanasonicTitle",50899:"PanasonicTitle2",50931:"CameraCalibrationSig",50932:"ProfileCalibrationSig",50933:"ProfileIFD",50934:"AsShotProfileName",50936:"ProfileName",50937:"ProfileHueSatMapDims",50938:"ProfileHueSatMapData1",50939:"ProfileHueSatMapData2",50940:"ProfileToneCurve",50941:{name:"ProfileEmbedPolicy",description:t=>({0:"Allow Copying",1:"Embed if Used",2:"Never Embed",3:"No Restrictions"}[t]||"Unknown")},50942:"ProfileCopyright",50964:"ForwardMatrix1",50965:"ForwardMatrix2",50966:"PreviewApplicationName",50967:"PreviewApplicationVersion",50968:"PreviewSettingsName",50969:"PreviewSettingsDigest",50970:{name:"PreviewColorSpace",description:t=>({1:"Gray Gamma 2.2",2:"sRGB",3:"Adobe RGB",4:"ProPhoto RGB"}[t]||"Unknown")},50971:"PreviewDateTime",50972:"RawImageDigest",50973:"OriginalRawFileDigest",50981:"ProfileLookTableDims",50982:"ProfileLookTableData",51043:"TimeCodes",51044:"FrameRate",51058:"TStop",51081:"ReelName",51089:"OriginalDefaultFinalSize",51090:"OriginalBestQualitySize",51091:"OriginalDefaultCropSize",51105:"CameraLabel",51107:{name:"ProfileHueSatMapEncoding",description:t=>({0:"Linear",1:"sRGB"}[t]||"Unknown")},51108:{name:"ProfileLookTableEncoding",description:t=>({0:"Linear",1:"sRGB"}[t]||"Unknown")},51109:"BaselineExposureOffset",51110:{name:"DefaultBlackRender",description:t=>({0:"Auto",1:"None"}[t]||"Unknown")},51111:"NewRawImageDigest",51112:"RawToPreviewGain"};function Ku(t){return new TextDecoder("utf-16").decode(new Uint8Array(t)).replace(/\u0000+$/,"")}const Zu={33434:{name:"ExposureTime",description:Xu.ExposureTime},33437:{name:"FNumber",description:Xu.FNumber},34850:{name:"ExposureProgram",description:Xu.ExposureProgram},34852:"SpectralSensitivity",34855:"ISOSpeedRatings",34856:{name:"OECF",description:()=>"[Raw OECF table data]"},34858:"TimeZoneOffset",34859:"SelfTimerMode",34864:{name:"SensitivityType",description:t=>({1:"Standard Output Sensitivity",2:"Recommended Exposure Index",3:"ISO Speed",4:"Standard Output Sensitivity and Recommended Exposure Index",5:"Standard Output Sensitivity and ISO Speed",6:"Recommended Exposure Index and ISO Speed",7:"Standard Output Sensitivity, Recommended Exposure Index and ISO Speed"}[t]||"Unknown")},34865:"StandardOutputSensitivity",34866:"RecommendedExposureIndex",34867:"ISOSpeed",34868:"ISOSpeedLatitudeyyy",34869:"ISOSpeedLatitudezzz",36864:{name:"ExifVersion",description:t=>ep(t)},36867:"DateTimeOriginal",36868:"DateTimeDigitized",36873:"GooglePlusUploadCode",36880:"OffsetTime",36881:"OffsetTimeOriginal",36882:"OffsetTimeDigitized",37121:{name:"ComponentsConfiguration",description:Xu.ComponentsConfiguration},37122:"CompressedBitsPerPixel",37377:{name:"ShutterSpeedValue",description:Xu.ShutterSpeedValue},37378:{name:"ApertureValue",description:Xu.ApertureValue},37379:"BrightnessValue",37380:"ExposureBiasValue",37381:{name:"MaxApertureValue",description:t=>Math.pow(Math.sqrt(2),t[0]/t[1]).toFixed(2)},37382:{name:"SubjectDistance",description:t=>t[0]/t[1]+" m"},37383:{name:"MeteringMode",description:Xu.MeteringMode},37384:{name:"LightSource",description:Xu.LightSource},37385:{name:"Flash",description:t=>0===t?"Flash did not fire":1===t?"Flash fired":5===t?"Strobe return light not detected":7===t?"Strobe return light detected":9===t?"Flash fired, compulsory flash mode":13===t?"Flash fired, compulsory flash mode, return light not detected":15===t?"Flash fired, compulsory flash mode, return light detected":16===t?"Flash did not fire, compulsory flash mode":24===t?"Flash did not fire, auto mode":25===t?"Flash fired, auto mode":29===t?"Flash fired, auto mode, return light not detected":31===t?"Flash fired, auto mode, return light detected":32===t?"No flash function":65===t?"Flash fired, red-eye reduction mode":69===t?"Flash fired, red-eye reduction mode, return light not detected":71===t?"Flash fired, red-eye reduction mode, return light detected":73===t?"Flash fired, compulsory flash mode, red-eye reduction mode":77===t?"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected":79===t?"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected":89===t?"Flash fired, auto mode, red-eye reduction mode":93===t?"Flash fired, auto mode, return light not detected, red-eye reduction mode":95===t?"Flash fired, auto mode, return light detected, red-eye reduction mode":"Unknown"},37386:{name:"FocalLength",description:Xu.FocalLength},37393:"ImageNumber",37394:{name:"SecurityClassification",description:t=>({C:"Confidential",R:"Restricted",S:"Secret",T:"Top Secret",U:"Unclassified"}[t]||"Unknown")},37395:"ImageHistory",37396:{name:"SubjectArea",description:t=>2===t.length?`Location; X: ${t[0]}, Y: ${t[1]}`:3===t.length?`Circle; X: ${t[0]}, Y: ${t[1]}, diameter: ${t[2]}`:4===t.length?`Rectangle; X: ${t[0]}, Y: ${t[1]}, width: ${t[2]}, height: ${t[3]}`:"Unknown"},37500:{name:"MakerNote",description:()=>"[Raw maker note data]"},37510:{name:"UserComment",description:np},37520:"SubSecTime",37521:"SubSecTimeOriginal",37522:"SubSecTimeDigitized",37724:"ImageSourceData",37888:{name:"AmbientTemperature",description:t=>t[0]/t[1]+" °C"},37889:{name:"Humidity",description:t=>t[0]/t[1]+" %"},37890:{name:"Pressure",description:t=>t[0]/t[1]+" hPa"},37891:{name:"WaterDepth",description:t=>t[0]/t[1]+" m"},37892:{name:"Acceleration",description:t=>t[0]/t[1]+" mGal"},37893:{name:"CameraElevationAngle",description:t=>t[0]/t[1]+" °"},40960:{name:"FlashpixVersion",description:t=>t.map(t=>String.fromCharCode(t)).join("")},40961:{name:"ColorSpace",description:Xu.ColorSpace},40962:"PixelXDimension",40963:"PixelYDimension",40964:"RelatedSoundFile",40965:"Interoperability IFD Pointer",41483:"FlashEnergy",41484:{name:"SpatialFrequencyResponse",description:()=>"[Raw SFR table data]"},41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:{name:"FocalPlaneResolutionUnit",description:Xu.FocalPlaneResolutionUnit},41492:{name:"SubjectLocation",description:([t,e])=>`X: ${t}, Y: ${e}`},41493:"ExposureIndex",41495:{name:"SensingMethod",description:t=>1===t?"Undefined":2===t?"One-chip color area sensor":3===t?"Two-chip color area sensor":4===t?"Three-chip color area sensor":5===t?"Color sequential area sensor":7===t?"Trilinear sensor":8===t?"Color sequential linear sensor":"Unknown"},41728:{name:"FileSource",description:t=>3===t?"DSC":"Unknown"},41729:{name:"SceneType",description:t=>1===t?"A directly photographed image":"Unknown"},41730:{name:"CFAPattern",description:()=>"[Raw CFA pattern table data]"},41985:{name:"CustomRendered",description:Xu.CustomRendered},41986:{name:"ExposureMode",description:Xu.ExposureMode},41987:{name:"WhiteBalance",description:Xu.WhiteBalance},41988:{name:"DigitalZoomRatio",description:t=>0===t[0]?"Digital zoom was not used":""+t[0]/t[1]},41989:{name:"FocalLengthIn35mmFilm",description:Xu.FocalLengthIn35mmFilm},41990:{name:"SceneCaptureType",description:Xu.SceneCaptureType},41991:{name:"GainControl",description:t=>0===t?"None":1===t?"Low gain up":2===t?"High gain up":3===t?"Low gain down":4===t?"High gain down":"Unknown"},41992:{name:"Contrast",description:Xu.Contrast},41993:{name:"Saturation",description:Xu.Saturation},41994:{name:"Sharpness",description:Xu.Sharpness},41995:{name:"DeviceSettingDescription",description:()=>"[Raw device settings table data]"},41996:{name:"SubjectDistanceRange",description:t=>1===t?"Macro":2===t?"Close view":3===t?"Distant view":"Unknown"},42016:"ImageUniqueID",42032:"CameraOwnerName",42033:"BodySerialNumber",42034:{name:"LensSpecification",description:t=>{const e=`${parseFloat((t[0][0]/t[0][1]).toFixed(5))}-${parseFloat((t[1][0]/t[1][1]).toFixed(5))} mm`;if(0===t[3][1])return`${e} f/?`;const n=1/(t[2][1]/t[2][1]/(t[3][0]/t[3][1]));return`${e} f/${parseFloat(n.toFixed(5))}`}},42035:"LensMake",42036:"LensModel",42037:"LensSerialNumber",42080:{name:"CompositeImage",description:t=>({1:"Not a Composite Image",2:"General Composite Image",3:"Composite Image Captured While Shooting"}[t]||"Unknown")},42081:"SourceImageNumberOfCompositeImage",42082:"SourceExposureTimesOfCompositeImage",42240:"Gamma",59932:"Padding",59933:"OffsetSchema",65e3:"OwnerName",65001:"SerialNumber",65002:"Lens",65100:"RawFile",65101:"Converter",65102:"WhiteBalance",65105:"Exposure",65106:"Shadows",65107:"Brightness",65108:"Contrast",65109:"Saturation",65110:"Sharpness",65111:"Smoothness",65112:"MoireFilter"},Qu={0:{name:"GPSVersionID",description:t=>2===t[0]&&2===t[1]&&0===t[2]&&0===t[3]?"Version 2.2":"Unknown"},1:{name:"GPSLatitudeRef",description:t=>{const e=t.join("");return"N"===e?"North latitude":"S"===e?"South latitude":"Unknown"}},2:{name:"GPSLatitude",description:ip},3:{name:"GPSLongitudeRef",description:t=>{const e=t.join("");return"E"===e?"East longitude":"W"===e?"West longitude":"Unknown"}},4:{name:"GPSLongitude",description:ip},5:{name:"GPSAltitudeRef",description:t=>0===t?"Sea level":1===t?"Sea level reference (negative value)":"Unknown"},6:{name:"GPSAltitude",description:t=>t[0]/t[1]+" m"},7:{name:"GPSTimeStamp",description:t=>t.map(([t,e])=>{const n=t/e;return/^\d(\.|$)/.test(`${n}`)?`0${n}`:n}).join(":")},8:"GPSSatellites",9:{name:"GPSStatus",description:t=>{const e=t.join("");return"A"===e?"Measurement in progress":"V"===e?"Measurement Interoperability":"Unknown"}},10:{name:"GPSMeasureMode",description:t=>{const e=t.join("");return"2"===e?"2-dimensional measurement":"3"===e?"3-dimensional measurement":"Unknown"}},11:"GPSDOP",12:{name:"GPSSpeedRef",description:t=>{const e=t.join("");return"K"===e?"Kilometers per hour":"M"===e?"Miles per hour":"N"===e?"Knots":"Unknown"}},13:"GPSSpeed",14:{name:"GPSTrackRef",description:t=>{const e=t.join("");return"T"===e?"True direction":"M"===e?"Magnetic direction":"Unknown"}},15:"GPSTrack",16:{name:"GPSImgDirectionRef",description:t=>{const e=t.join("");return"T"===e?"True direction":"M"===e?"Magnetic direction":"Unknown"}},17:"GPSImgDirection",18:"GPSMapDatum",19:{name:"GPSDestLatitudeRef",description:t=>{const e=t.join("");return"N"===e?"North latitude":"S"===e?"South latitude":"Unknown"}},20:{name:"GPSDestLatitude",description:t=>t[0][0]/t[0][1]+t[1][0]/t[1][1]/60+t[2][0]/t[2][1]/3600},21:{name:"GPSDestLongitudeRef",description:t=>{const e=t.join("");return"E"===e?"East longitude":"W"===e?"West longitude":"Unknown"}},22:{name:"GPSDestLongitude",description:t=>t[0][0]/t[0][1]+t[1][0]/t[1][1]/60+t[2][0]/t[2][1]/3600},23:{name:"GPSDestBearingRef",description:t=>{const e=t.join("");return"T"===e?"True direction":"M"===e?"Magnetic direction":"Unknown"}},24:"GPSDestBearing",25:{name:"GPSDestDistanceRef",description:t=>{const e=t.join("");return"K"===e?"Kilometers":"M"===e?"Miles":"N"===e?"Knots":"Unknown"}},26:"GPSDestDistance",27:{name:"GPSProcessingMethod",description:np},28:{name:"GPSAreaInformation",description:np},29:"GPSDateStamp",30:{name:"GPSDifferential",description:t=>0===t?"Measurement without differential correction":1===t?"Differential correction applied":"Unknown"},31:"GPSHPositioningError"},Ju={1:"InteroperabilityIndex",2:{name:"InteroperabilityVersion",description:t=>ep(t)},4096:"RelatedImageFileFormat",4097:"RelatedImageWidth",4098:"RelatedImageHeight"},td={45056:{name:"MPFVersion",description:t=>ep(t)},45057:"NumberOfImages",45058:"MPEntry",45059:"ImageUIDList",45060:"TotalFrames"},ed=Wl({},Yu,Zu),nd="0th",id="1st",rd="exif",od="gps",ad="interoperability",sd="mpf",cd="canon",ld="pentax",pd={[nd]:ed,[id]:Yu,[rd]:ed,[od]:Qu,[ad]:Ju,[sd]:td,[cd]:{4:{name:"ShotInfo",description:t=>t}},[ld]:{0:{name:"PentaxVersion",description:t=>t.join(".")},5:"PentaxModelID",555:"LevelInfo"}},ud={1:1,2:1,3:2,4:4,5:8,7:1,9:4,10:8,13:4},dd={BYTE:1,ASCII:2,SHORT:3,LONG:4,RATIONAL:5,UNDEFINED:7,SLONG:9,SRATIONAL:10,IFD:13},fd={getAsciiValue:function(t){return t.map(t=>String.fromCharCode(t))},getByteAt:md,getAsciiAt:function(t,e){return t.getUint8(e)},getShortAt:function(t,e,n){return t.getUint16(e,n===ap.LITTLE_ENDIAN)},getLongAt:hd,getRationalAt:function(t,e,n){return[hd(t,e,n),hd(t,e+4,n)]},getUndefinedAt:function(t,e){return md(t,e)},getSlongAt:gd,getSrationalAt:function(t,e,n){return[gd(t,e,n),gd(t,e+4,n)]},getIfdPointerAt:function(t,e,n){return hd(t,e,n)},typeSizes:ud,tagTypes:dd,getTypeSize:function(t){if(void 0===dd[t])throw new Error("No such type found.");return ud[dd[t]]}};function md(t,e){return t.getUint8(e)}function hd(t,e,n){return t.getUint32(e,n===ap.LITTLE_ENDIAN)}function gd(t,e,n){return t.getInt32(e,n===ap.LITTLE_ENDIAN)}const vd={1:fd.getByteAt,2:fd.getAsciiAt,3:fd.getShortAt,4:fd.getLongAt,5:fd.getRationalAt,7:fd.getUndefinedAt,9:fd.getSlongAt,10:fd.getSrationalAt,13:fd.getIfdPointerAt};function xd(t,e,n){return e+fd.getLongAt(t,e+4,n)}function yd(t,e,n,i,r,o){const a=fd.getTypeSize("SHORT"),s={},c=function(t,e,n){return e+fd.getTypeSize("SHORT")<=t.byteLength?fd.getShortAt(t,e,n):0}(t,i,r);i+=a;for(let a=0;a<c&&!(i+12>t.byteLength);a++){const a=bd(t,e,n,i,r,o);void 0!==a&&(s[a.name]={id:a.id,value:a.value,description:a.description},("MakerNote"===a.name||e===ld&&"LevelInfo"===a.name)&&(s[a.name].__offset=a.__offset)),i+=12}if(i<t.byteLength-fd.getTypeSize("LONG")){const a=fd.getLongAt(t,i,r);0!==a&&e===nd&&(s.Thumbnail=yd(t,"1st",n,n+a,r,o))}return s}function bd(t,e,n,i,r,o){const a=fd.getTypeSize("SHORT"),s=a+fd.getTypeSize("SHORT"),c=s+fd.getTypeSize("LONG"),l=fd.getShortAt(t,i,r),p=fd.getShortAt(t,i+a,r),u=fd.getLongAt(t,i+s,r);let d,f;if(void 0===fd.typeSizes[p]||!o&&void 0===pd[e][l])return;if(function(t,e){return fd.typeSizes[t]*e<=fd.getTypeSize("LONG")}(p,u))f=i+c,d=wd(t,f,p,u,r);else if(f=fd.getLongAt(t,i+c,r),function(t,e,n,i,r){return e+n+fd.typeSizes[i]*r<=t.byteLength}(t,n,f,p,u)){d=wd(t,n+f,p,u,r,33723===l)}else d="<faulty value>";p===fd.tagTypes.ASCII&&(d=function(t){const e=[];let n=0;for(let i=0;i<t.length;i++)"\0"!==t[i]?(void 0===e[n]&&(e[n]=""),e[n]+=t[i]):n++;return e}(d),d=function(t){try{return t.map(t=>decodeURIComponent(escape(t)))}catch{return t}}(d));let m=`undefined-${l}`,h=d;if(void 0!==pd[e][l])if(void 0!==pd[e][l].name&&void 0!==pd[e][l].description){m=pd[e][l].name;try{h=pd[e][l].description(d)}catch{h=Ad(d)}}else p===fd.tagTypes.RATIONAL||p===fd.tagTypes.SRATIONAL?(m=pd[e][l],h=""+d[0]/d[1]):(m=pd[e][l],h=Ad(d));return{id:l,name:m,value:d,description:h,__offset:f}}function wd(t,e,n,i,r,o=!1){let a=[];o&&(i*=fd.typeSizes[n],n=fd.tagTypes.BYTE);for(let o=0;o<i;o++)a.push(vd[n](t,e,r)),e+=fd.typeSizes[n];return n===fd.tagTypes.ASCII?a=fd.getAsciiValue(a):1===a.length&&(a=a[0]),a}function Ad(t){return t instanceof Array?t.join(", "):t}const Sd="Exif IFD Pointer",Cd="GPS Info IFD Pointer",Pd="Interoperability IFD Pointer",kd={read:function(t,e,n){const i=ap.getByteOrder(t,e);let r=function(t,e,n,i){return yd(t,nd,e,xd(t,e,n),n,i)}(t,e,i,n);return r=function(t,e,n,i,r){return void 0!==t[Sd]?Wl(t,yd(e,rd,n,n+t[Sd].value,i,r)):t}(r,t,e,i,n),r=function(t,e,n,i,r){return void 0!==t[Cd]?Wl(t,yd(e,od,n,n+t[Cd].value,i,r)):t}(r,t,e,i,n),r=function(t,e,n,i,r){return void 0!==t[Pd]?Wl(t,yd(e,ad,n,n+t[Pd].value,i,r)):t}(r,t,e,i,n),{tags:r,byteOrder:i}}};const Td={read:function(t,e,n){const i=ap.getByteOrder(t,e),r=yd(t,"mpf",e,xd(t,e,i),i,n);return function(t,e,n,i){if(!n.MPEntry)return n;const r=[];for(let o=0;o<Math.ceil(n.MPEntry.value.length/Ed);o++){r[o]={};const a=Id(n.MPEntry.value,o*Ed,fd.getTypeSize("LONG"),i);r[o].ImageFlags=Md(a),r[o].ImageFormat=jd(a),r[o].ImageType=Dd(a);const s=Id(n.MPEntry.value,o*Ed+4,fd.getTypeSize("LONG"),i);r[o].ImageSize={value:s,description:""+s};const c=Fd(o,n.MPEntry,i,e);r[o].ImageOffset={value:c,description:""+c};const l=Id(n.MPEntry.value,o*Ed+12,fd.getTypeSize("SHORT"),i);r[o].DependentImage1EntryNumber={value:l,description:""+l};const p=Id(n.MPEntry.value,o*Ed+14,fd.getTypeSize("SHORT"),i);r[o].DependentImage2EntryNumber={value:p,description:""+p},r[o].image=t.buffer.slice(c,c+s),Xl(r[o],"base64",function(){return Yl(this.image)})}return n.Images=r,n}(t,e,r,i)}},Ed=16;function Id(t,e,n,i){if(i===ap.LITTLE_ENDIAN){let i=0;for(let r=0;r<n;r++)i+=t[e+r]<<8*r;return i}let r=0;for(let i=0;i<n;i++)r+=t[e+i]<<8*(n-1-i);return r}function Md(t){const e=[t>>31&1,t>>30&1,t>>29&1],n=[];return e[0]&&n.push("Dependent Parent Image"),e[1]&&n.push("Dependent Child Image"),e[2]&&n.push("Representative Image"),{value:e,description:n.join(", ")||"None"}}function jd(t){const e=t>>24&7;return{value:e,description:0===e?"JPEG":"Unknown"}}function Dd(t){const e=16777215&t;return{value:e,description:{196608:"Baseline MP Primary Image",65537:"Large Thumbnail (VGA equivalent)",65538:"Large Thumbnail (Full HD equivalent)",131073:"Multi-Frame Image (Panorama)",131074:"Multi-Frame Image (Disparity)",131075:"Multi-Frame Image (Multi-Angle)",0:"Undefined"}[e]||"Unknown"}}function Fd(t,e,n,i){return function(t){return 0===t}(t)?0:Id(e.value,t*Ed+8,fd.getTypeSize("LONG"),n)+i}const Ud={read:function(t,e){const n=function(t,e){return fd.getShortAt(t,e)}(t,e),i=function(t,e,n){if(8>n)return;const i=fd.getByteAt(t,e+7);return{value:i,description:""+i}}(t,e,n);return{"Bits Per Sample":Rd(t,e,n),"Image Height":Od(t,e,n),"Image Width":Ld(t,e,n),"Color Components":i,Subsampling:i&&Nd(t,e,i.value,n)}}};function Rd(t,e,n){if(3>n)return;const i=fd.getByteAt(t,e+2);return{value:i,description:""+i}}function Od(t,e,n){if(5>n)return;const i=fd.getShortAt(t,e+3);return{value:i,description:`${i}px`}}function Ld(t,e,n){if(7>n)return;const i=fd.getShortAt(t,e+5);return{value:i,description:`${i}px`}}function Nd(t,e,n,i){if(8+3*n>i)return;const r=[];for(let i=0;i<n;i++){const n=e+8+3*i;r.push([fd.getByteAt(t,n),fd.getByteAt(t,n+1),fd.getByteAt(t,n+2)])}return{value:r,description:r.length>1?Bd(r)+Vd(r):""}}function Bd(t){const e={1:"Y",2:"Cb",3:"Cr",4:"I",5:"Q"};return t.map(t=>e[t[0]]).join("")}function Vd(t){const e={17:"4:4:4 (1 1)",18:"4:4:0 (1 2)",20:"4:4:1 (1 4)",33:"4:2:2 (2 1)",34:"4:2:0 (2 2)",36:"4:2:1 (2 4)",65:"4:1:1 (4 1)",66:"4:1:0 (4 2)"};return 0===t.length||void 0===t[0][1]||void 0===e[t[0][1]]?"":e[t[0][1]]}const qd={read:function(t,e){const n=function(t,e){return fd.getShortAt(t,e)}(t,e),i=function(t,e,n){if(15>n)return;const i=fd.getByteAt(t,e+14);return{value:i,description:`${i}px`}}(t,e,n),r=function(t,e,n){if(16>n)return;const i=fd.getByteAt(t,e+15);return{value:i,description:`${i}px`}}(t,e,n),o={"JFIF Version":zd(t,e,n),"Resolution Unit":_d(t,e,n),XResolution:$d(t,e,n),YResolution:Hd(t,e,n),"JFIF Thumbnail Width":i,"JFIF Thumbnail Height":r};if(void 0!==i&&void 0!==r){const a=function(t,e,n,i){return 0===n||16+n>i?void 0:{value:t.buffer.slice(e+16,e+16+n),description:"<24-bit RGB pixel data>"}}(t,e,3*i.value*r.value,n);a&&(o["JFIF Thumbnail"]=a)}for(const t in o)void 0===o[t]&&delete o[t];return o}};function zd(t,e,n){if(9>n)return;const i=fd.getByteAt(t,e+7),r=fd.getByteAt(t,e+7+1);return{value:256*i+r,description:i+"."+r}}function _d(t,e,n){if(10>n)return;const i=fd.getByteAt(t,e+9);return{value:i,description:Gd(i)}}function Gd(t){return 0===t?"None":1===t?"inches":2===t?"cm":"Unknown"}function $d(t,e,n){if(12>n)return;const i=fd.getShortAt(t,e+10);return{value:i,description:""+i}}function Hd(t,e,n){if(14>n)return;const i=fd.getShortAt(t,e+12);return{value:i,description:""+i}}const Wd={iptc:{256:{name:"Model Version",description:t=>((t[0]<<8)+t[1]).toString()},261:{name:"Destination",repeatable:!0},276:{name:"File Format",description:t=>((t[0]<<8)+t[1]).toString()},278:{name:"File Format Version",description:t=>((t[0]<<8)+t[1]).toString()},286:"Service Identifier",296:"Envelope Number",306:"Product ID",316:"Envelope Priority",326:{name:"Date Sent",description:Xd},336:{name:"Time Sent",description:Yd},346:{name:"Coded Character Set",description:Kd,encoding_name:Kd},356:"UNO",376:{name:"ARM Identifier",description:t=>((t[0]<<8)+t[1]).toString()},378:{name:"ARM Version",description:t=>((t[0]<<8)+t[1]).toString()},512:{name:"Record Version",description:t=>((t[0]<<8)+t[1]).toString()},515:"Object Type Reference",516:"Object Attribute Reference",517:"Object Name",519:"Edit Status",520:{name:"Editorial Update",description:t=>"01"===ep(t)?"Additional Language":"Unknown"},522:"Urgency",524:{name:"Subject Reference",repeatable:!0,description:t=>{const e=ep(t).split(":");return e[2]+(e[3]?"/"+e[3]:"")+(e[4]?"/"+e[4]:"")}},527:"Category",532:{name:"Supplemental Category",repeatable:!0},534:"Fixture Identifier",537:{name:"Keywords",repeatable:!0},538:{name:"Content Location Code",repeatable:!0},539:{name:"Content Location Name",repeatable:!0},542:"Release Date",547:"Release Time",549:"Expiration Date",550:"Expiration Time",552:"Special Instructions",554:{name:"Action Advised",description:t=>{const e=ep(t);return"01"===e?"Object Kill":"02"===e?"Object Replace":"03"===e?"Object Append":"04"===e?"Object Reference":"Unknown"}},557:{name:"Reference Service",repeatable:!0},559:{name:"Reference Date",repeatable:!0},562:{name:"Reference Number",repeatable:!0},567:{name:"Date Created",description:Xd},572:{name:"Time Created",description:Yd},574:{name:"Digital Creation Date",description:Xd},575:{name:"Digital Creation Time",description:Yd},577:"Originating Program",582:"Program Version",587:{name:"Object Cycle",description:t=>{const e=ep(t);return"a"===e?"morning":"p"===e?"evening":"b"===e?"both":"Unknown"}},592:{name:"By-line",repeatable:!0},597:{name:"By-line Title",repeatable:!0},602:"City",604:"Sub-location",607:"Province/State",612:"Country/Primary Location Code",613:"Country/Primary Location Name",615:"Original Transmission Reference",617:"Headline",622:"Credit",627:"Source",628:"Copyright Notice",630:{name:"Contact",repeatable:!0},632:"Caption/Abstract",634:{name:"Writer/Editor",repeatable:!0},637:{name:"Rasterized Caption",description:t=>t},642:"Image Type",643:{name:"Image Orientation",description:t=>{const e=ep(t);return"P"===e?"Portrait":"L"===e?"Landscape":"S"===e?"Square":"Unknown"}},647:"Language Identifier",662:{name:"Audio Type",description:t=>{const e=ep(t),n=e.charAt(0),i=e.charAt(1);let r="";return"1"===n?r+="Mono":"2"===n&&(r+="Stereo"),"A"===i?r+=", actuality":"C"===i?r+=", question and answer session":"M"===i?r+=", music, transmitted by itself":"Q"===i?r+=", response to a question":"R"===i?r+=", raw sound":"S"===i?r+=", scener":"V"===i?r+=", voicer":"W"===i&&(r+=", wrap"),""!==r?r:e}},663:{name:"Audio Sampling Rate",description:t=>parseInt(ep(t),10)+" Hz"},664:{name:"Audio Sampling Resolution",description:t=>{const e=parseInt(ep(t),10);return e+(1===e?" bit":" bits")}},665:{name:"Audio Duration",description:t=>{const e=ep(t);return e.length>=6?e.substr(0,2)+":"+e.substr(2,2)+":"+e.substr(4,2):e}},666:"Audio Outcue",698:"Short Document ID",699:"Unique Document ID",700:"Owner ID",712:{name:t=>2===t.length?"ObjectData Preview File Format":"Record 2 destination",description:t=>{if(2===t.length){const e=(t[0]<<8)+t[1];return 0===e?"No ObjectData":1===e?"IPTC-NAA Digital Newsphoto Parameter Record":2===e?"IPTC7901 Recommended Message Format":3===e?"Tagged Image File Format (Adobe/Aldus Image data)":4===e?"Illustrator (Adobe Graphics data)":5===e?"AppleSingle (Apple Computer Inc)":6===e?"NAA 89-3 (ANPA 1312)":7===e?"MacBinary II":8===e?"IPTC Unstructured Character Oriented File Format (UCOFF)":9===e?"United Press International ANPA 1312 variant":10===e?"United Press International Down-Load Message":11===e?"JPEG File Interchange (JFIF)":12===e?"Photo-CD Image-Pac (Eastman Kodak)":13===e?"Microsoft Bit Mapped Graphics File [*.BMP]":14===e?"Digital Audio File [*.WAV] (Microsoft & Creative Labs)":15===e?"Audio plus Moving Video [*.AVI] (Microsoft)":16===e?"PC DOS/Windows Executable Files [*.COM][*.EXE]":17===e?"Compressed Binary File [*.ZIP] (PKWare Inc)":18===e?"Audio Interchange File Format AIFF (Apple Computer Inc)":19===e?"RIFF Wave (Microsoft Corporation)":20===e?"Freehand (Macromedia/Aldus)":21===e?'Hypertext Markup Language "HTML" (The Internet Society)':22===e?"MPEG 2 Audio Layer 2 (Musicom), ISO/IEC":23===e?"MPEG 2 Audio Layer 3, ISO/IEC":24===e?"Portable Document File (*.PDF) Adobe":25===e?"News Industry Text Format (NITF)":26===e?"Tape Archive (*.TAR)":27===e?"Tidningarnas Telegrambyrå NITF version (TTNITF DTD)":28===e?"Ritzaus Bureau NITF version (RBNITF DTD)":29===e?"Corel Draw [*.CDR]":`Unknown format ${e}`}return ep(t)}},713:{name:"ObjectData Preview File Format Version",description:(t,e)=>{const n={"00":{"00":"1"},"01":{"01":"1","02":"2","03":"3","04":"4"},"02":{"04":"4"},"03":{"01":"5.0","02":"6.0"},"04":{"01":"1.40"},"05":{"01":"2"},"06":{"01":"1"},11:{"01":"1.02"},20:{"01":"3.1","02":"4.0","03":"5.0","04":"5.5"},21:{"02":"2.0"}},i=ep(t);if(e["ObjectData Preview File Format"]){const t=ep(e["ObjectData Preview File Format"].value);if(n[t]&&n[t][i])return n[t][i]}return i}},714:"ObjectData Preview Data",1802:{name:"Size Mode",description:t=>t[0].toString()},1812:{name:"Max Subfile Size",description:t=>{let e=0;for(let n=0;n<t.length;n++)e=(e<<8)+t[n];return e.toString()}},1882:{name:"ObjectData Size Announced",description:t=>{let e=0;for(let n=0;n<t.length;n++)e=(e<<8)+t[n];return e.toString()}},1887:{name:"Maximum ObjectData Size",description:t=>{let e=0;for(let n=0;n<t.length;n++)e=(e<<8)+t[n];return e.toString()}}}};function Xd(t){const e=ep(t);return e.length>=8?e.substr(0,4)+"-"+e.substr(4,2)+"-"+e.substr(6,2):e}function Yd(t){const e=ep(t);let n=e;return e.length>=6&&(n=e.substr(0,2)+":"+e.substr(2,2)+":"+e.substr(4,2),11===e.length&&(n+=e.substr(6,1)+e.substr(7,2)+":"+e.substr(9,2))),n}function Kd(t){const e=ep(t);return"%G"===e?"UTF-8":"%5"===e?"Windows-1252":"%/G"===e?"UTF-8 Level 1":"%/H"===e?"UTF-8 Level 2":"%/I"===e?"UTF-8 Level 3":"/A"===e?"ISO-8859-1":"/B"===e?"ISO-8859-2":"/C"===e?"ISO-8859-3":"/D"===e?"ISO-8859-4":"/@"===e?"ISO-8859-5":"/G"===e?"ISO-8859-6":"/F"===e?"ISO-8859-7":"/H"===e?"ISO-8859-8":"Unknown"}const Zd={get:function(){if(typeof TextDecoder<"u")return TextDecoder}};const Qd={decode:function(t,e){const n=Zd.get();if(typeof n<"u"&&void 0!==t)try{return new n(t).decode(e instanceof DataView?e.buffer:Uint8Array.from(e))}catch{}const i=e.map(t=>String.fromCharCode(t)).join("");return function(t){try{return decodeURIComponent(escape(t))}catch{return t}}(i)},TAG_HEADER_SIZE:5};const Jd={read:function(t,e,n){try{if(Array.isArray(t))return rf(new DataView(Uint8Array.from(t).buffer),{size:t.length},0,n);const{naaBlock:i,dataOffset:r}=function(t,e){for(;e+12<=t.byteLength;){const n=tf(t,e);if(ef(n))return{naaBlock:n,dataOffset:e+n.headerSize};e+=n.headerSize+n.size+nf(n)}throw new Error("No IPTC NAA resource block.")}(t,e);return rf(t,i,r,n)}catch{return{}}}};function tf(t,e){if(943868237!==t.getUint32(e,!1))throw new Error("Not an IPTC resource block.");const n=t.getUint8(e+4+2),i=(n%2==0?n+1:n)+1;return{headerSize:6+i+4,type:t.getUint16(e+4),size:t.getUint32(e+4+2+i)}}function ef(t){return 1028===t.type}function nf(t){return t.size%2!=0?1:0}function rf(t,e,n,i){const r={};let o;const a=n+e.size;for(;n<a&&n<t.byteLength;){const{tag:e,tagSize:a}=of(t,n,r,o,i);if(null===e)break;e&&("encoding"in e&&(o=e.encoding),void 0===r[e.name]||void 0===e.repeatable?r[e.name]={id:e.id,value:e.value,description:e.description}:(r[e.name]instanceof Array||(r[e.name]=[{id:r[e.name].id,value:r[e.name].value,description:r[e.name].description}]),r[e.name].push({id:e.id,value:e.value,description:e.description}))),n+=5+a}return r}function of(t,e,n,i,r){if(function(t,e){return 28!==t.getUint8(e)}(t,e))return{tag:null,tagSize:0};const o=t.getUint16(e+1),a=t.getUint16(e+3);if(!r&&!Wd.iptc[o])return{tag:void 0,tagSize:a};const s=function(t,e,n){const i=[];for(let r=0;r<n;r++)i.push(t.getUint8(e+r));return i}(t,e+5,a),c={id:o,name:af(Wd.iptc[o],o,s),value:s,description:sf(Wd.iptc[o],s,n,i)};return function(t){return Wd.iptc[t]&&Wd.iptc[t].repeatable}(o)&&(c.repeatable=!0),function(t){return Wd.iptc[t]&&void 0!==Wd.iptc[t].encoding_name}(o)&&(c.encoding=Wd.iptc[o].encoding_name(s)),{tag:c,tagSize:a}}function af(t,e,n){return t?function(t){return"string"==typeof t}(t)?t:function(t){return"function"==typeof t.name}(t)?t.name(n):t.name:`undefined-${e}`}function sf(t,e,n,i){if(function(t){return t&&void 0!==t.description}(t))try{return t.description(e,n)}catch{}return function(t,e){return t&&e instanceof Array}(t,e)?Qd.decode(i,e):e}const cf={"tiff:Orientation":t=>"1"===t?"Horizontal (normal)":"2"===t?"Mirror horizontal":"3"===t?"Rotate 180":"4"===t?"Mirror vertical":"5"===t?"Mirror horizontal and rotate 270 CW":"6"===t?"Rotate 90 CW":"7"===t?"Mirror horizontal and rotate 90 CW":"8"===t?"Rotate 270 CW":t,"tiff:ResolutionUnit":t=>Xu.ResolutionUnit(parseInt(t,10)),"tiff:XResolution":t=>lf(Xu.XResolution,t),"tiff:YResolution":t=>lf(Xu.YResolution,t),"exif:ApertureValue":t=>lf(Xu.ApertureValue,t),"exif:GPSLatitude":uf,"exif:GPSLongitude":uf,"exif:FNumber":t=>lf(Xu.FNumber,t),"exif:FocalLength":t=>lf(Xu.FocalLength,t),"exif:FocalPlaneResolutionUnit":t=>Xu.FocalPlaneResolutionUnit(parseInt(t,10)),"exif:ColorSpace":t=>Xu.ColorSpace(function(t){return"0x"===t.substring(0,2)?parseInt(t.substring(2),16):parseInt(t,10)}(t)),"exif:ComponentsConfiguration"(t,e){if(/^\d, \d, \d, \d$/.test(e)){const t=e.split(", ").map(t=>t.charCodeAt(0));return Xu.ComponentsConfiguration(t)}return e},"exif:Contrast":t=>Xu.Contrast(parseInt(t,10)),"exif:CustomRendered":t=>Xu.CustomRendered(parseInt(t,10)),"exif:ExposureMode":t=>Xu.ExposureMode(parseInt(t,10)),"exif:ExposureProgram":t=>Xu.ExposureProgram(parseInt(t,10)),"exif:ExposureTime":t=>pf(t)?Xu.ExposureTime(t.split("/").map(t=>parseInt(t,10))):t,"exif:MeteringMode":t=>Xu.MeteringMode(parseInt(t,10)),"exif:Saturation":t=>Xu.Saturation(parseInt(t,10)),"exif:SceneCaptureType":t=>Xu.SceneCaptureType(parseInt(t,10)),"exif:Sharpness":t=>Xu.Sharpness(parseInt(t,10)),"exif:ShutterSpeedValue":t=>lf(Xu.ShutterSpeedValue,t),"exif:WhiteBalance":t=>Xu.WhiteBalance(parseInt(t,10))};function lf(t,e){return pf(e)?t(e.split("/")):e}function pf(t){return/^-?\d+\/-?\d+$/.test(t)}function uf(t){const[e,n]=t.split(",");if(void 0!==e&&void 0!==n){const t=parseFloat(e),i=parseFloat(n),r=n.charAt(n.length-1);if(!Number.isNaN(t)&&!Number.isNaN(i))return""+(t+i/60)+r}return t}const df={get:function(t){if(t)return t;if(typeof DOMParser<"u")return new DOMParser;try{const{DOMParser:t,onErrorStopParsing:e}=__non_webpack_require__("@xmldom/xmldom");return new t({onError:e})}catch{return}}};function ff(t){const e=t.match(/<([A-Za-z_][A-Za-z0-9._-]*)([^>]*)>/);if(!e)return t;const n=e[1],i=function(t){const e=[],n=/xmlns:([\w-]+)=["'][^"']+["']/g;let i;for(;null!==(i=n.exec(t));)-1===e.indexOf(i[1])&&e.push(i[1]);return e}(t),r=function(t){const e=[],n=/\b([A-Za-z_][A-Za-z0-9._-]*):[A-Za-z_][A-Za-z0-9._-]*\b/g;let i;for(;null!==(i=n.exec(t));){const t=i[1];"xmlns"===t||"xml"===t||-1===e.indexOf(t)&&e.push(t)}return e}(t).filter(t=>-1===i.indexOf(t));if(0===r.length)return t;const o=function(t){const e=[];for(let n=0;n<t.length;n++){const i=t[n],r=mf[i]||"http://fallback.namespace/"+i;e.push(" xmlns:"+i+'="'+r+'"')}return e.join("")}(r);return function(t,e,n){const i=new RegExp("<"+e+"([^>]*)>");return t.replace(i,"<"+e+"$1"+n+">")}(t,n,o)}const mf={xmp:"http://ns.adobe.com/xap/1.0/",tiff:"http://ns.adobe.com/tiff/1.0/",exif:"http://ns.adobe.com/exif/1.0/",dc:"http://purl.org/dc/elements/1.1/",xmpMM:"http://ns.adobe.com/xap/1.0/mm/",stEvt:"http://ns.adobe.com/xap/1.0/sType/ResourceEvent#",stRef:"http://ns.adobe.com/xap/1.0/sType/ResourceRef#",photoshop:"http://ns.adobe.com/photoshop/1.0/"};const hf={read:function(t,e,n){const i={};if("string"==typeof t)return xf(i,t,n),i;const[r,o]=function(t,e){if(0===e.length)return[];const n=[vf(t,e.slice(0,1))];return e.length>1&&n.push(vf(t,e.slice(1))),n}(t,e),a=xf(i,r,n);if(o){const r=xf(i,o,n);!a&&!r&&(delete i._raw,xf(i,vf(t,e),n))}return i}};class gf extends Error{constructor(t){super(t),this.name="ParseError"}}function vf(t,e){const n=e.reduce((t,e)=>t+e.length,0),i=new Uint8Array(n);let r=0;for(let n=0;n<e.length;n++){const o=e[n],a=t.buffer.slice(o.dataOffset,o.dataOffset+o.length);i.set(new Uint8Array(a),r),r+=o.length}return new DataView(i.buffer)}function xf(t,e,n){try{const{doc:i,raw:r}=function(t,e){const n=df.get(e);if(!n)throw console.warn("Warning: DOMParser is not available. It is needed to be able to parse XMP tags."),new Error;const i="string"==typeof t?t:zl(t,0,t.byteLength);return{doc:bf(n,yf(i)),raw:i}}(e,n);t._raw=(t._raw||"")+r;return Wl(t,Cf(Af(wf(i),!0))),!0}catch{return!1}}function yf(t){return t.replace(/^.+(<\?xpacket begin)/,"$1").replace(/(<\?xpacket end=".*"\?>).+$/,"$1")}function bf(t,e,n=!1){try{const n=t.parseFromString(e,"application/xml"),i=n.getElementsByTagName("parsererror");if(i.length>0)throw new gf(i[0].textContent);return n}catch(i){if("ParseError"===i.name&&function(t){const e=["prefix is non-null and namespace is null","prefix not bound to a namespace","prefix inte bundet till en namnrymd",/Namespace prefix .+ is not defined/];for(let n=0;n<e.length;n++)if(new RegExp(e[n]).test(t.message))return!0;return!1}(i)&&!n)return bf(t,ff(e),!0);throw i}}function wf(t){for(let e=0;e<t.childNodes.length;e++){if("x:xmpmeta"===t.childNodes[e].tagName)return wf(t.childNodes[e]);if("rdf:RDF"===t.childNodes[e].tagName)return t.childNodes[e]}throw new Error}function Af(t,e=!1){const n=function(t){const e=[];for(let n=0;n<t.childNodes.length;n++)e.push(t.childNodes[n]);return e}(t);return function(t){return 1===t.length&&"#text"===t[0].nodeName}(n)?e?{}:function(t){return t.nodeValue}(n[0]):function(t){const e={};return t.forEach(t=>{if(function(t){return t.nodeName&&"#text"!==t.nodeName}(t)){const n=function(t){return{attributes:Sf(t),value:Af(t)}}(t);void 0!==e[t.nodeName]?(Array.isArray(e[t.nodeName])||(e[t.nodeName]=[e[t.nodeName]]),e[t.nodeName].push(n)):e[t.nodeName]=n}}),e}(n)}function Sf(t){const e={};for(let n=0;n<t.attributes.length;n++)e[t.attributes[n].nodeName]=decodeURIComponent(escape(t.attributes[n].value));return e}function Cf(t){const e={};if("string"==typeof t)return t;for(const n in t){let i=t[n];Array.isArray(i)||(i=[i]),i.forEach(t=>{Wl(e,Pf(t.attributes)),"object"==typeof t.value&&Wl(e,jf(t.value))})}return e}function Pf(t){const e={};for(const n in t)try{kf(n)&&(e[Ef(n)]={value:t[n],attributes:{},description:If(t[n],n)})}catch{}return e}function kf(t){return"rdf:parseType"!==t&&!Tf(t)}function Tf(t){return"xmlns"===t.split(":")[0]}function Ef(t){return/^MicrosoftPhoto(_\d+_)?:Rating$/i.test(t)?"RatingPercent":t.split(":")[1]}function If(t,e=void 0){if(Array.isArray(t)){const n=function(t){return t.map(t=>void 0!==t.value?If(t.value):If(t)).join(", ")}(t);return e&&"function"==typeof cf[e]?cf[e](t,n):n}if("object"==typeof t)return function(t){const e=[];for(const n in t)e.push(`${Mf(n)}: ${If(t[n].value)}`);return e.join("; ")}(t);try{return e&&"function"==typeof cf[e]?cf[e](t):decodeURIComponent(escape(t))}catch{return t}}function Mf(t){return"CiAdrCity"===t?"CreatorCity":"CiAdrCtry"===t?"CreatorCountry":"CiAdrExtadr"===t?"CreatorAddress":"CiAdrPcode"===t?"CreatorPostalCode":"CiAdrRegion"===t?"CreatorRegion":"CiEmailWork"===t?"CreatorWorkEmail":"CiTelWork"===t?"CreatorWorkPhone":"CiUrlWork"===t?"CreatorWorkUrl":t}function jf(t){const e={};for(const n in t)try{Tf(n)||(e[Ef(n)]=Df(t[n],n))}catch{}return e}function Df(t,e){return function(t){return Array.isArray(t)}(t)?function(t,e){return qf(t[t.length-1],e)}(t,e):function(t){return"Resource"===t.attributes["rdf:parseType"]&&"string"==typeof t.value&&""===t.value.trim()}(t)?{value:"",attributes:{},description:""}:Ff(t)?Uf(t,e):Of(t)?Lf(t,e):Nf(t)?Bf(t,e):function(t){return void 0!==Vf(t.value)}(t)?function(t,e){let n=Vf(t.value).value["rdf:li"];const i=Rf(t),r=[];return void 0===n?n=[]:Array.isArray(n)||(n=[n]),n.forEach(t=>{r.push(function(t){return Ff(t)?Uf(t):Of(t)?Lf(t).value:Nf(t)?Bf(t).value:qf(t)}(t))}),{value:r,attributes:i,description:If(r,e)}}(t,e):qf(t,e)}function Ff(t){return"Resource"===t.attributes["rdf:parseType"]&&void 0!==t.value["rdf:value"]||void 0!==t.value["rdf:Description"]&&void 0!==t.value["rdf:Description"].value["rdf:value"]}function Uf(t,e){const n=Rf(t);void 0!==t.value["rdf:Description"]&&(t=t.value["rdf:Description"]),Wl(n,Rf(t),function(t){const e={};for(const n in t.value)"rdf:value"!==n&&!Tf(n)&&(e[Ef(n)]=t.value[n].value);return e}(t));const i=function(t){return zf(t.value["rdf:value"])||t.value["rdf:value"].value}(t);return{value:i,attributes:n,description:If(i,e)}}function Rf(t){const e={};for(const n in t.attributes)"rdf:parseType"!==n&&"rdf:resource"!==n&&!Tf(n)&&(e[Ef(n)]=t.attributes[n]);return e}function Of(t){return"Resource"===t.attributes["rdf:parseType"]||void 0!==t.value["rdf:Description"]&&void 0===t.value["rdf:Description"].value["rdf:value"]}function Lf(t,e){const n={value:{},attributes:{}};return void 0!==t.value["rdf:Description"]&&(Wl(n.value,Pf(t.value["rdf:Description"].attributes)),Wl(n.attributes,Rf(t)),t=t.value["rdf:Description"]),Wl(n.value,jf(t.value)),n.description=If(n.value,e),n}function Nf(t){return 0===Object.keys(t.value).length&&void 0===t.attributes["xml:lang"]&&void 0===t.attributes["rdf:resource"]}function Bf(t,e){const n=Pf(t.attributes);return{value:n,attributes:{},description:If(n,e)}}function Vf(t){return t["rdf:Bag"]||t["rdf:Seq"]||t["rdf:Alt"]}function qf(t,e){const n=zf(t)||Cf(t.value);return{value:n,attributes:Rf(t),description:If(n,e)}}function zf(t){return t.attributes&&t.attributes["rdf:resource"]}const _f=0,Gf=1,$f=2,Hf=3,Wf=4,Xf=5,Yf=6,Kf=7,Zf=8,Qf={2e3:{name:"PathInformation",description:function(t){const e={},n=[];for(let i=0;i<t.byteLength;i+=26){const r=fd.getShortAt(t,i);Jf[r]&&(e[r]||(e[r]=Jf[r].description),n.push({type:r,path:Jf[r].path(t,i+2)}))}return JSON.stringify({types:e,paths:n})}},2999:{name:"ClippingPathName",description(t){const[,e]=$l(t,0);return e}}};const Jf={[_f]:{description:"Closed subpath length",path:(t,e)=>[fd.getShortAt(t,e)]},[Gf]:{description:"Closed subpath Bezier knot, linked",path:tm},[$f]:{description:"Closed subpath Bezier knot, unlinked",path:tm},[Hf]:{description:"Open subpath length",path:(t,e)=>[fd.getShortAt(t,e)]},[Wf]:{description:"Open subpath Bezier knot, linked",path:tm},[Xf]:{description:"Open subpath Bezier knot, unlinked",path:tm},[Yf]:{description:"Path fill rule",path:()=>[]},[Zf]:{description:"Initial fill rule",path:(t,e)=>[fd.getShortAt(t,e)]},[Kf]:{description:"Clipboard",path:function(t,e){return[[nm(t,e,8),nm(t,e+4,8),nm(t,e+8,8),nm(t,e+12,8)],nm(t,e+16,8)]}}};function tm(t,e){const n=[];for(let i=0;i<24;i+=8)n.push(em(t,e+i));return n}function em(t,e){const n=nm(t,e,8);return[nm(t,e+4,8),n]}function nm(t,e,n){const i=fd.getLongAt(t,e),r=i>>>31?-1:1,o=(2130706432&i)>>>32-n,a=i&parseInt(Kl("1",32-n),2);return r*function(t,e){return parseInt(t.replace(".",""),e)/Math.pow(e,(t.split(".")[1]||"").length)}(o.toString(2)+"."+function(t,e,n){return Kl(n,e-t.length)+t}(a.toString(2),32-n,"0"),2)}const im={read:function(t,e){const n=ql(new Uint8Array(t).buffer),i={};let r=0;for(;r<t.length;){const t=zl(n,r,sm);r+=sm;const o=fd.getShortAt(n,r);r+=om;const{tagName:a,tagNameSize:s}=cm(n,r);r+=s;const c=fd.getLongAt(n,r);if(r+=am,t===rm){const t=ql(n.buffer,r,c),s={id:o,value:zl(t,0,c)};if(Qf[o]){try{s.description=Qf[o].description(t)}catch{s.description="<no description formatter>"}i[a||Qf[o].name]=s}else e&&(i[`undefined-${o}`]=s)}r+=c+c%2}return i}},rm="8BIM",om=2,am=4,sm=rm.length;function cm(t,e){const[n,i]=$l(t,e);return{tagName:i,tagNameSize:1+n+(n%2==0?1:0)}}const lm={desc:{name:"ICC Description"},cprt:{name:"ICC Copyright"},dmdd:{name:"ICC Device Model Description"},vued:{name:"ICC Viewing Conditions Description"},dmnd:{name:"ICC Device Manufacturer for Display"},tech:{name:"Technology"}},pm={4:{name:"Preferred CMM type",value:(t,e)=>zl(t,e,4),description:t=>null!==t?um(t):""},8:{name:"Profile Version",value:(t,e)=>t.getUint8(e).toString(10)+"."+(t.getUint8(e+1)>>4).toString(10)+"."+(t.getUint8(e+1)%16).toString(10)},12:{name:"Profile/Device class",value:(t,e)=>zl(t,e,4),description:t=>{switch(t.toLowerCase()){case"scnr":return"Input Device profile";case"mntr":return"Display Device profile";case"prtr":return"Output Device profile";case"link":return"DeviceLink profile";case"abst":return"Abstract profile";case"spac":return"ColorSpace profile";case"nmcl":return"NamedColor profile";case"cenc":return"ColorEncodingSpace profile";case"mid ":return"MultiplexIdentification profile";case"mlnk":return"MultiplexLink profile";case"mvis":return"MultiplexVisualization profile";default:return t}}},16:{name:"Color Space",value:(t,e)=>zl(t,e,4)},20:{name:"Connection Space",value:(t,e)=>zl(t,e,4)},24:{name:"ICC Profile Date",value:(t,e)=>function(t,e){const n=t.getUint16(e),i=t.getUint16(e+2)-1,r=t.getUint16(e+4),o=t.getUint16(e+6),a=t.getUint16(e+8),s=t.getUint16(e+10);return new Date(Date.UTC(n,i,r,o,a,s))}(t,e).toISOString()},36:{name:"ICC Signature",value:(t,e)=>function(t){return String.fromCharCode.apply(null,new Uint8Array(t))}(t.buffer.slice(e,e+4))},40:{name:"Primary Platform",value:(t,e)=>zl(t,e,4),description:t=>um(t)},48:{name:"Device Manufacturer",value:(t,e)=>zl(t,e,4),description:t=>um(t)},52:{name:"Device Model Number",value:(t,e)=>zl(t,e,4)},64:{name:"Rendering Intent",value:(t,e)=>t.getUint32(e),description:t=>{switch(t){case 0:return"Perceptual";case 1:return"Relative Colorimetric";case 2:return"Saturation";case 3:return"Absolute Colorimetric";default:return t}}},80:{name:"Profile Creator",value:(t,e)=>zl(t,e,4)}};function um(t){switch(t.toLowerCase()){case"appl":return"Apple";case"adbe":return"Adobe";case"msft":return"Microsoft";case"sunw":return"Sun Microsystems";case"sgi":return"Silicon Graphics";case"tgnt":return"Taligent";default:return t}}const dm={read:function(t,e,n){return n&&e[0].compressionMethod!==Zl?function(t,e){if(!function(t){return 0===t}(e[0].compressionMethod))return{};const n=new DataView(t.buffer.slice(e[0].offset,e[0].offset+e[0].length));return Ql(n,e[0].compressionMethod,"utf-8","dataview").then(Am).catch(()=>({}))}(t,e):function(t,e){try{const n=e.reduce((t,e)=>t+e.length,0),i=new Uint8Array(n);let r=0;const o=function(t){return Array.isArray(t)?new DataView(Uint8Array.from(t).buffer).buffer:t.buffer}(t);for(let t=1;t<=e.length;t++){const n=e.find(e=>e.chunkNumber===t);if(!n)throw new Error(`ICC chunk ${t} not found`);const a=o.slice(n.offset,n.offset+n.length),s=new Uint8Array(a);i.set(s,r),r+=s.length}return Am(new DataView(i.buffer))}catch{return{}}}(t,e)}},fm=84,mm=128,hm="acsp",gm="desc",vm="mluc",xm="text",ym="sig ",bm=12;function wm(t,e){return t.length<e+bm}function Am(t){const e=t.buffer,n=t.getUint32();if(t.byteLength!==n)throw new Error("ICC profile length not matching");if(t.byteLength<fm)throw new Error("ICC profile too short");const i={},r=Object.keys(pm);for(let e=0;e<r.length;e++){const n=r[e],o=pm[n],a=o.value(t,parseInt(n,10));let s=a;o.description&&(s=o.description(a)),i[o.name]={value:a,description:s}}if(Sm(e.slice(36,40))!==hm)throw new Error("ICC profile: missing signature");if(function(t){return t.length<mm+4}(e))return i;const o=t.getUint32(128);let a=132;for(let n=0;n<o;n++){if(wm(e,a))return i;const n=zl(t,a,4),r=t.getUint32(a+4),o=t.getUint32(a+8);if(r>e.length)return i;const s=zl(t,r,4);if(s===gm){const a=t.getUint32(r+8);if(a>o)return i;Cm(i,n,Sm(e.slice(r+12,r+a+11)))}else if(s===vm){const e=t.getUint32(r+8),o=t.getUint32(r+12);let a=r+16;const s=[];for(let n=0;n<e;n++){const e=zl(t,a+0,2),n=zl(t,a+2,2),i=t.getUint32(a+4),c=t.getUint32(a+8),l=Gl(t,r+c,i);s.push({languageCode:e,countryCode:n,text:l}),a+=o}if(1===e)Cm(i,n,s[0].text);else{const t={};for(let e=0;e<s.length;e++)t[`${s[e].languageCode}-${s[e].countryCode}`]=s[e].text;Cm(i,n,t)}}else if(s===xm){Cm(i,n,Sm(e.slice(r+8,r+o-7)))}else if(s===ym){Cm(i,n,Sm(e.slice(r+8,r+12)))}a+=12}return i}function Sm(t){return String.fromCharCode.apply(null,new Uint8Array(t))}function Cm(t,e,n){lm[e]?t[lm[e].name]={value:n,description:n}:t[e]={value:n,description:n}}const Pm=27,km={read:function(t,e,n,i,r){let o=yd(t,cd,e,e+n,i,r);return o.ShotInfo&&(o=Wl({},o,function(t){const e={};return void 0!==t[Pm]&&(e.AutoRotate={value:t[Pm],description:Tm(t[Pm])}),e}(o.ShotInfo.value)),delete o.ShotInfo),o},SHOT_INFO_AUTO_ROTATE:Pm};function Tm(t){return 0===t?"None":1===t?"Rotate 90 CW":2===t?"Rotate 180":3===t?"Rotate 270 CW":"Unknown"}const Em={K3_III:78420},Im={CAMERA_ORIENTATION:1,ROLL_ANGLE:3,PITCH_ANGLE:5},Mm={read:function(t,e,n,i){const r=ap.getByteOrder(t,e+n+8),o=e+n;let a=yd(t,ld,o,o+10,r,i);return function(t){return t.PentaxModelID&&t.PentaxModelID.value===Em.K3_III&&t.LevelInfo}(a)&&(a=Wl({},a,function(t,e,n){const i={};if(e+7>t.byteLength)return i;const r=t.getInt8(e+Im.CAMERA_ORIENTATION);i.CameraOrientation={value:r,description:jm(r)};const o=t.getInt16(e+Im.ROLL_ANGLE,n===ap.LITTLE_ENDIAN);i.RollAngle={value:o,description:Dm(o)};const a=t.getInt16(e+Im.PITCH_ANGLE,n===ap.LITTLE_ENDIAN);return i.PitchAngle={value:a,description:Fm(a)},i}(t,o+a.LevelInfo.__offset,r)),delete a.LevelInfo),a},PENTAX_IFD_OFFSET:10,MODEL_ID:Em,LIK3III:Im};function jm(t){return 0===t?"Horizontal (normal)":1===t?"Rotate 270 CW":2===t?"Rotate 180":3===t?"Rotate 90 CW":4===t?"Upwards":5===t?"Downwards":"Unknown"}function Dm(t){return""+-.5*t}function Fm(t){return""+-.5*t}const Um={read:function(t,e){return{"Image Width":Rm(t,e),"Image Height":Om(t,e),"Bit Depth":Lm(t,e),"Color Type":Nm(t,e),Compression:Bm(t,e),Filter:Vm(t,e),Interlace:qm(t,e)}}};function Rm(t,e){if(e+0+4>t.byteLength)return;const n=fd.getLongAt(t,e);return{value:n,description:`${n}px`}}function Om(t,e){if(e+4+4>t.byteLength)return;const n=fd.getLongAt(t,e+4);return{value:n,description:`${n}px`}}function Lm(t,e){if(e+8+1>t.byteLength)return;const n=fd.getByteAt(t,e+8);return{value:n,description:`${n}`}}function Nm(t,e){if(e+9+1>t.byteLength)return;const n=fd.getByteAt(t,e+9);return{value:n,description:{0:"Grayscale",2:"RGB",3:"Palette",4:"Grayscale with Alpha",6:"RGB with Alpha"}[n]||"Unknown"}}function Bm(t,e){if(e+10+1>t.byteLength)return;const n=fd.getByteAt(t,e+10);return{value:n,description:0===n?"Deflate/Inflate":"Unknown"}}function Vm(t,e){if(e+11+1>t.byteLength)return;const n=fd.getByteAt(t,e+11);return{value:n,description:0===n?"Adaptive":"Unknown"}}function qm(t,e){if(e+12+1>t.byteLength)return;const n=fd.getByteAt(t,e+12);return{value:n,description:{0:"Noninterlaced",1:"Adam7 Interlace"}[n]||"Unknown"}}const zm={read:function(t,e,n,i){const r={},o=[];for(let a=0;a<e.length;a++){const{offset:s,length:c,type:l}=e[a],p=Zm(t,s,c,l,n);if(p instanceof Promise)o.push(p.then(({name:t,value:e,description:n})=>{try{if(Jl&&ih(t,e))return{__exif:kd.read(oh(e),Km,i).tags};if(tp&&rh(t,e))return{__iptc:Jd.read(oh(e),0,i)};if(t&&!ih(t,e)&&!rh(t,e))return{[t]:{value:e,description:n}}}catch{}return{}}));else{const{name:t,value:e,description:n}=p;t&&(r[t]={value:e,description:n})}}return{readTags:r,readTagsPromise:o.length>0?Promise.all(o):void 0}}},_m="STATE_KEYWORD",Gm="STATE_COMPRESSION",$m="STATE_LANG",Hm="STATE_TRANSLATED_KEYWORD",Wm="STATE_TEXT",Xm=1,Ym=1,Km=6;function Zm(t,e,n,i,r){const o=[],a=[];let s,c=_m,l=Zl;for(let r=0;r<n&&e+r<t.byteLength;r++){if(c===Gm){l=Qm({type:i,dataView:t,offset:e+r}),i===uu&&(r+=Xm),c=Jm(i,c);continue}if(c===Wm){s=new DataView(t.buffer.slice(e+r,e+n));break}const p=t.getUint8(e+r);0===p?c=Jm(i,c):c===_m?o.push(p):c===$m&&a.push(p)}if(l!==Zl&&!r)return{};const p=Ql(s,l,function(t){return t===pu||t===du?"latin1":"utf-8"}(i));return p instanceof Promise?p.then(t=>th(t,i,a,o)).catch(()=>th("<text using unknown compression>".split(""),i,a,o)):th(p,i,a,o)}function Qm({type:t,dataView:e,offset:n}){if(t===uu){if(e.getUint8(n)===Ym)return e.getUint8(n+1)}else if(t===du)return e.getUint8(n);return Zl}function Jm(t,e){return e===_m&&[uu,du].includes(t)?Gm:e===Gm?t===uu?$m:Wm:e===$m?Hm:Wm}function th(t,e,n,i){const r=function(t){return t instanceof DataView?zl(t,0,t.byteLength):t}(t);return{name:eh(e,n,i),value:r,description:e===uu?nh(t):r}}function eh(t,e,n){const i=Hl(n);if(t===pu||0===e.length)return i;return`${i} (${Hl(e)})`}function nh(t){return Qd.decode("UTF-8",t)}function ih(t,e){return"raw profile type exif"===t.toLowerCase()&&"exif"===e.substring(1,5)}function rh(t,e){return"raw profile type iptc"===t.toLowerCase()&&"iptc"===e.substring(1,5)}function oh(t){return function(t){const e=new DataView(new ArrayBuffer(t.length/2));for(let n=0;n<t.length;n+=2)e.setUint8(n/2,parseInt(t.substring(n,n+2),16));return e}(t.match(/\n(exif|iptc)\n\s*\d+\n([\s\S]*)$/)[2].replace(/\n/g,""))}const ah={read:function(t,e){const n={};for(let i=0;i<e.length;i++){const r=fd.getLongAt(t,e[i]+au),o=zl(t,e[i]+su,ou);o===fu?(n["Pixels Per Unit X"]=sh(t,e[i],r),n["Pixels Per Unit Y"]=ch(t,e[i],r),n["Pixel Units"]=lh(t,e[i],r)):o===mu&&(n["Modify Date"]=ph(t,e[i],r))}return n}};function sh(t,e,n){if(!uh(t,e,n,0,4))return;const i=fd.getLongAt(t,e+cu+0);return{value:i,description:""+i}}function ch(t,e,n){if(!uh(t,e,n,4,4))return;const i=fd.getLongAt(t,e+cu+4);return{value:i,description:""+i}}function lh(t,e,n){if(!uh(t,e,n,8,1))return;const i=fd.getByteAt(t,e+cu+8);return{value:i,description:1===i?"meters":"Unknown"}}function ph(t,e,n){if(!uh(t,e,n,0,7))return;const i=fd.getShortAt(t,e+cu),r=fd.getByteAt(t,e+cu+2),o=fd.getByteAt(t,e+cu+3),a=fd.getByteAt(t,e+cu+4),s=fd.getByteAt(t,e+cu+5),c=fd.getByteAt(t,e+cu+6);return{value:[i,r,o,a,s,c],description:`${dh(i,4)}-${dh(r,2)}-${dh(o,2)} ${dh(a,2)}:${dh(s,2)}:${dh(c,2)}`}}function uh(t,e,n,i,r){return i+r<=n&&e+cu+i+r<=t.byteLength}function dh(t,e){return`${"0".repeat(e-(""+t).length)}${t}`}const fh={read:function(t,e){const n={},i=fd.getByteAt(t,e);return n.Alpha=function(t){const e=16&t;return{value:e?1:0,description:e?"Yes":"No"}}(i),n.Animation=function(t){const e=2&t;return{value:e?1:0,description:e?"Yes":"No"}}(i),n.ImageWidth=gh(t,e+mh),n.ImageHeight=gh(t,e+hh),n}},mh=4,hh=7;function gh(t,e){const n=fd.getByteAt(t,e)+256*fd.getByteAt(t,e+1)+65536*fd.getByteAt(t,e+2)+1;return{value:n,description:n+"px"}}const vh={read:function(t){return{"GIF Version":xh(t),"Image Width":yh(t),"Image Height":bh(t),"Global Color Map":wh(t),"Bits Per Pixel":Sh(t),"Color Resolution Depth":Ah(t)}}};function xh(t){if(6>t.byteLength)return;const e=zl(t,3,3);return{value:e,description:e}}function yh(t){if(8>t.byteLength)return;const e=t.getUint16(6,!0);return{value:e,description:`${e}px`}}function bh(t){if(10>t.byteLength)return;const e=t.getUint16(8,!0);return{value:e,description:`${e}px`}}function wh(t){if(11>t.byteLength)return;const e=(128&t.getUint8(10))>>>7;return{value:e,description:1===e?"Yes":"No"}}function Ah(t){if(11>t.byteLength)return;const e=((112&t.getUint8(10))>>>4)+1;return{value:e,description:`${e} ${1===e?"bit":"bits"}`}}function Sh(t){if(11>t.byteLength)return;const e=1+(7&t.getUint8(10));return{value:e,description:`${e} ${1===e?"bit":"bits"}`}}const Ch=[6,7,99],Ph={get:function(t,e,n){if(function(t){return t&&(void 0===t.Compression||Ch.includes(t.Compression.value))&&t.JPEGInterchangeFormat&&t.JPEGInterchangeFormat.value&&t.JPEGInterchangeFormatLength&&t.JPEGInterchangeFormatLength.value}(e)){e.type="image/jpeg";const i=n+e.JPEGInterchangeFormat.value;e.image=t.buffer.slice(i,i+e.JPEGInterchangeFormatLength.value),Xl(e,"base64",function(){return Yl(this.image)})}return e}};const kh=2,Th=3,Eh=4,Ih=25.4,Mh=10,jh=1,Dh={get:function(t,e){const n={};let i=!1;const r=Fh(t,"exif","FocalLength",e),o=Fh(t,"exif","FocalPlaneXResolution",e),a=Fh(t,"exif","FocalPlaneYResolution",e),s=Fh(t,"exif","FocalPlaneResolutionUnit",e),c=Fh(t,"file","Image Width",e),l=Fh(t,"file","Image Height",e),p=Fh(t,"exif","FocalLengthIn35mmFilm",e)||function(t,e,n,i,r,o){if(t&&e&&n&&i&&r&&o)try{let a;switch(n){case kh:a=Ih;break;case Th:a=Mh;break;case Eh:a=jh;break;default:return}const s=t[0]/t[1]*a,c=e[0]/e[1]*a,l=i/s,p=r/c,u=Math.sqrt(l**2+p**2);return o[0]/o[1]*(43.27/u)}catch{}}(o,a,s,c,l,r);p&&(n.FocalLength35efl={value:p,description:Xu.FocalLengthIn35mmFilm(p)},i=!0);const u=function(t,e){if(t&&e)try{const n=e/(t[0]/t[1]);return{value:n,description:n.toFixed(1)}}catch{}}(r,p);u&&(n.ScaleFactorTo35mmEquivalent=u,i=!0);const d=function(t){if(t)try{const e=2*Math.atan(36/(2*t))*(180/Math.PI);return{value:e,description:e.toFixed(1)+" deg"}}catch{}}(p);if(d&&(n.FieldOfView=d,i=!0),i)return n}};function Fh(t,e,n,i){return i&&t[e]&&t[e][n]?t[e][n].value:!i&&t[n]?t[n].value:void 0}function Uh(t){this.name="MetadataMissingError",this.message=t||"No Exif data",this.stack=(new Error).stack}Uh.prototype=new Error;const Rh={MetadataMissingError:Uh};function Oh(t,e={}){return function(t){return"string"==typeof t}(t)?(e.async=!0,function(t,e){return/^\w+:\/\//.test(t)?typeof fetch<"u"?function(t,{length:e}={}){const n={method:"GET"};return Number.isInteger(e)&&e>=0&&(n.headers={range:"bytes=0-"+(e-1)}),fetch(t,n).then(t=>t.arrayBuffer())}(t,e):function(t,{length:e}={}){return new Promise((n,i)=>{const r={};Number.isInteger(e)&&e>=0&&(r.headers={range:"bytes=0-"+(e-1)}),function(t){return/^https:\/\//.test(t)?__non_webpack_require__("https").get:__non_webpack_require__("http").get}(t)(t,r,t=>{if(t.statusCode>=200&&t.statusCode<=299){const e=[];t.on("data",t=>e.push(Buffer.from(t))),t.on("error",t=>i(t)),t.on("end",()=>n(Buffer.concat(e)))}else i(`Could not fetch file: ${t.statusCode} ${t.statusMessage}`),t.resume()}).on("error",t=>i(t))})}(t,e):function(t){return/^data:[^;,]*(;base64)?,/.test(t)}(t)?Promise.resolve(function(t){const e=t.substring(t.indexOf(",")+1);if(-1!==t.indexOf(";base64"))return typeof atob<"u"?Uint8Array.from(atob(e),t=>t.charCodeAt(0)).buffer:typeof Buffer>"u"?void 0:typeof Buffer.from<"u"?Buffer.from(e,"base64"):new Buffer(e,"base64");const n=decodeURIComponent(e);return typeof Buffer<"u"?typeof Buffer.from<"u"?Buffer.from(n):new Buffer(n):Uint8Array.from(n,t=>t.charCodeAt(0)).buffer}(t)):function(t,{length:e}={}){return new Promise((n,i)=>{const r=function(){try{return __non_webpack_require__("fs")}catch{return}}();r.open(t,(o,a)=>{o?i(o):r.stat(t,(o,s)=>{if(o)i(o);else{const o=Math.min(s.size,void 0!==e?e:s.size),c=Buffer.alloc(o),l={buffer:c,length:o};r.read(a,l,e=>{e?i(e):r.close(a,e=>{e&&console.warn(`Could not close file ${t}:`,e),n(c)})})}})})})}(t,e)}(t,e).then(t=>Lh(t,e))):function(t){return typeof File<"u"&&t instanceof File}(t)?(e.async=!0,function(t){return new Promise((e,n)=>{const i=new FileReader;i.onload=t=>e(t.target.result),i.onerror=()=>n(i.error),i.readAsArrayBuffer(t)})}(t).then(t=>Lh(t,e))):Lh(t,e)}function Lh(t,e){return function(t){try{return Buffer.isBuffer(t)}catch{return!1}}(t)&&(t=new Uint8Array(t).buffer),function(t,{expanded:e=!1,async:n=!1,includeUnknown:i=!1,domParser:r}={expanded:!1,async:!1,includeUnknown:!1,domParser:void 0}){let o=!1,a={};const s=[],{fileType:c,fileDataOffset:l,jfifDataOffset:p,tiffHeaderOffset:u,iptcDataOffset:d,xmpChunks:f,iccChunks:m,mpfDataOffset:h,pngHeaderOffset:g,pngTextChunks:v,pngChunkOffsets:x,vp8xChunkOffset:y,gifHeaderOffset:b}=Hu.parseAppMarkers(t,n);if(function(t){return void 0!==t}(l)){o=!0;const n=Ud.read(t,l);e?a.file=n:a=Wl({},a,n)}if(function(t){return void 0!==t}(p)){o=!0;const n=qd.read(t,p);e?a.jfif=n:a=Wl({},a,n)}if(function(t){return void 0!==t}(u)){o=!0;const{tags:n,byteOrder:s}=kd.read(t,u,i);if(n.Thumbnail&&(a.Thumbnail=n.Thumbnail,delete n.Thumbnail),e?(a.exif=n,function(t){if(t.exif){if(t.exif.GPSLatitude&&t.exif.GPSLatitudeRef)try{t.gps=t.gps||{},t.gps.Latitude=ip(t.exif.GPSLatitude.value),"S"===t.exif.GPSLatitudeRef.value.join("")&&(t.gps.Latitude=-t.gps.Latitude)}catch{}if(t.exif.GPSLongitude&&t.exif.GPSLongitudeRef)try{t.gps=t.gps||{},t.gps.Longitude=ip(t.exif.GPSLongitude.value),"W"===t.exif.GPSLongitudeRef.value.join("")&&(t.gps.Longitude=-t.gps.Longitude)}catch{}if(t.exif.GPSAltitude&&t.exif.GPSAltitudeRef)try{t.gps=t.gps||{},t.gps.Altitude=t.exif.GPSAltitude.value[0]/t.exif.GPSAltitude.value[1],1===t.exif.GPSAltitudeRef.value&&(t.gps.Altitude=-t.gps.Altitude)}catch{}}}(a)):a=Wl({},a,n),n["IPTC-NAA"]&&!Nh(d)){const t=Jd.read(n["IPTC-NAA"].value,0,i);e?a.iptc=t:a=Wl({},a,t)}if(n.ApplicationNotes&&!Bh(f)){const t=hf.read(Hl(n.ApplicationNotes.value),void 0,r);e?a.xmp=t:(delete t._raw,a=Wl({},a,t))}if(n.ImageSourceData&&n.PhotoshopSettings){const t=im.read(n.PhotoshopSettings.value,i);e?a.photoshop=t:a=Wl({},a,t)}if(n.ICC_Profile&&!Vh(m)){const t=dm.read(n.ICC_Profile.value,[{offset:0,length:n.ICC_Profile.value.length,chunkNumber:1,chunksTotal:1}]);e?a.icc=t:a=Wl({},a,t)}if(n.MakerNote)if(function(t){return t.Make&&t.Make.value&&Array.isArray(t.Make.value)&&"Canon"===t.Make.value[0]&&t.MakerNote&&t.MakerNote.__offset}(n)){const r=km.read(t,u,n.MakerNote.__offset,s,i);e?a.makerNotes=r:a=Wl({},a,r)}else if(function(t){const e="PENTAX ";return t.MakerNote.value.length>e.length&&Hl(t.MakerNote.value.slice(0,e.length))===e&&t.MakerNote.__offset}(n)){const r=Mm.read(t,u,n.MakerNote.__offset,i);e?a.makerNotes=r:a=Wl({},a,r)}n.MakerNote&&delete n.MakerNote.__offset}if(Nh(d)){o=!0;const n=Jd.read(t,d,i);e?a.iptc=n:a=Wl({},a,n)}if(Bh(f)){o=!0;const n=hf.read(t,f,r);e?a.xmp=n:(delete n._raw,a=Wl({},a,n))}if(Vh(m)){o=!0;const e=dm.read(t,m,n);e instanceof Promise?s.push(e.then(S)):S(e)}if(function(t){return void 0!==t}(h)){o=!0;const n=Td.read(t,h,i);e?a.mpf=n:a=Wl({},a,n)}if(function(t){return void 0!==t}(g)){o=!0;const n=Um.read(t,g);e?(a.png=a.png?Wl({},a.png,n):n,a.pngFile=n):a=Wl({},a,n)}if(function(t){return void 0!==t}(v)){o=!0;const{readTags:e,readTagsPromise:r}=zm.read(t,v,n,i);C(e),r&&s.push(r.then(t=>t.forEach(C)))}if(function(t){return void 0!==t}(x)){o=!0;const n=ah.read(t,x);e?a.png=a.png?Wl({},a.png,n):n:a=Wl({},a,n)}if(function(t){return void 0!==t}(y)){o=!0;const n=fh.read(t,y);e?a.riff=a.riff?Wl({},a.riff,n):n:a=Wl({},a,n)}if(function(t){return void 0!==t}(b)){o=!0;const n=vh.read(t,b);e?a.gif=a.gif?Wl({},a.gif,n):n:a=Wl({},a,n)}const w=Dh.get(a,e);w&&(e?a.composite=w:a=Wl({},a,w));const A=Ph.get(t,a.Thumbnail,u);if(A?(o=!0,a.Thumbnail=A):delete a.Thumbnail,c&&(e?(a.file||(a.file={}),a.file.FileType=c):a.FileType=c,o=!0),!o)throw new Rh.MetadataMissingError;return n?Promise.all(s).then(()=>a):a;function S(t){e?a.icc=t:a=Wl({},a,t)}function C(t){if(e){for(const e of["exif","iptc"]){const n=`__${e}`;t[n]&&(a[e]=a[e]?Wl({},a.exif,t[n]):t[n],delete t[n])}a.png=a.png?Wl({},a.png,t):t,a.pngText=a.pngText?Wl({},a.png,t):t}else a=Wl({},a,t.__exif?t.__exif:{},t.__iptc?t.__iptc:{},t),delete a.__exif,delete a.__iptc}}(function(t){try{return new DataView(t)}catch{return new Vl(t)}}(t),e)}function Nh(t){return void 0!==t}function Bh(t){return Array.isArray(t)&&t.length>0}function Vh(t){return Array.isArray(t)&&t.length>0}const qh=["jpg","jpeg","png","webp","heic","tiff","bmp"],zh=["mp4","webm","ogg","mov","avi","flv","wmv","mkv","3gp","m4v","mpg","mpeg"],_h=t=>{const e=t.name.split(".").pop()?.toLowerCase();return e&&qh.includes(e)?r.IMAGE:e&&zh.includes(e)?r.VIDEO:"unknown"},Gh=({enableCaption:t,ada:n,content:c,removeImage:l,caption:p,disabled:u,onCaptionChange:d,playingVideo:f,onPlay:m,onPause:h,onEnd:g,uploadStatus:v={status:"",progress:0}})=>{const x=e.useMemo(()=>c.type===r.IMAGE?i.jsx("img",{alt:"Image not found",className:"qc:size-full qc:rounded-t qc:object-contain",src:c.compressedFile?URL.createObjectURL(c.compressedFile):""}):i.jsx(I,{fit:"contain",showFullscreen:!1,src:URL.createObjectURL(c.originalFile),playing:f,onPlay:m,onPause:h,onEnd:g}),[c.type,c.status,f]);return i.jsxs("div",{className:"qc:relative",children:[i.jsxs("div",{className:o("qc:border-border qc:relative qc:h-44 qc:max-h-screen qc:overflow-hidden qc:rounded qc:border qc:sm:h-80",!t&&"qc:rounded-b"),children:[(c.status===a.WAITING||c.status===a.PROCESSING)&&i.jsx("div",{className:"qc:absolute qc:flex qc:size-full qc:flex-col qc:items-center qc:justify-center qc:gap-2",children:i.jsx("span",{className:"qc:text-sm qc:text-gray-500",children:"Processing"})}),c.status===a.DONE&&x,(v.status===s.WAITING||v.status===s.UPLOADING)&&i.jsxs("div",{className:"qc:absolute qc:left-0 qc:top-0 qc:flex qc:size-full qc:flex-col qc:items-center qc:justify-center",children:[i.jsx("div",{className:"qc:absolute qc:left-0 qc:top-0 qc:z-0 qc:h-full qc:bg-opacity-75",style:{width:`${v.progress}%`}}),i.jsx("h3",{className:"qc:text-foreground qc:z-10 qc:text-center qc:font-medium",children:v.status===s.WAITING?"Waiting...":100===Math.round(v.progress)?"Finalizing...":`Uploading (${Math.round(v.progress)}%)`})]}),(v.status===s.DONE||v.status===s.ERROR)&&i.jsx("div",{className:"qc:bg-background qc:absolute qc:left-0 qc:top-0 qc:flex qc:size-full qc:flex-col qc:items-center qc:justify-center qc:bg-opacity-75",children:v.status===s.DONE?i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"qc:text-foreground qc:text-success qc:size-12",viewBox:"0 0 24 24",children:i.jsx("path",{fill:"currentColor",d:"m9.55 15.15l8.475-8.475q.3-.3.7-.3t.7.3t.3.713t-.3.712l-9.175 9.2q-.3.3-.7.3t-.7-.3L4.55 13q-.3-.3-.288-.712t.313-.713t.713-.3t.712.3z"})}):i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"qc:text-foreground qc:text-destructive qc:size-12",viewBox:"0 0 24 24",children:i.jsx("path",{fill:"currentColor",d:"m12 13.4l-4.9 4.9q-.275.275-.7.275t-.7-.275t-.275-.7t.275-.7l4.9-4.9l-4.9-4.9q-.275-.275-.275-.7t.275-.7t.7-.275t.7.275l4.9 4.9l4.9-4.9q.275-.275.7-.275t.7.275t.275.7t-.275.7L13.4 12l4.9 4.9q.275.275.275.7t-.275.7t-.7.275t-.7-.275z"})})})]}),i.jsx("button",{disabled:u,className:"qc:text-primary qc:bg-destructive qc:absolute qc:right-4 qc:top-4 qc:cursor-pointer qc:rounded-full qc:p-1 qc:transition-all qc:hover:bg-opacity-100 qc:sm:bg-opacity-50 qc:sm:p-2",onClick:()=>l(c.uid),children:i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"qc:size-5 qc:text-white",viewBox:"0 0 24 24",children:i.jsx("path",{fill:"currentColor",d:"m12 13.4l-4.9 4.9q-.275.275-.7.275t-.7-.275t-.275-.7t.275-.7l4.9-4.9l-4.9-4.9q-.275-.275-.275-.7t.275-.7t.7-.275t.7.275l4.9 4.9l4.9-4.9q.275-.275.7-.275t.7.275t.275.7t-.275.7L13.4 12l4.9 4.9q.275.275.275.7t-.275.7t-.7.275t-.7-.275z"})})}),(t||n)&&i.jsx("div",{className:"qc:mt-3 qc:w-full qc:space-y-3",children:i.jsx("textarea",{rows:2,value:p,className:o("qc:border-primary qc:shadow-outer qc:placeholder:text-primary qc:block qc:w-full qc:rounded qc:border qc:px-3 qc:py-2.5 qc:font-bold qc:placeholder:opacity-50 qc:focus:border-primary-light qc:focus:outline-none qc:focus:ring-primary-light",u?"qc:text-muted qc:bg-transparent":"qc:text-foreground qc:bg-white qc:bg-opacity-75"),disabled:u,onChange:t=>d(t.target.value),placeholder:"Caption"})})]},c.uid)},$h=100,Hh=52428800,Wh=new N({concurrency:1,autostart:!0}),Xh=new N({concurrency:3,autostart:!0}),Yh={hidden:{opacity:0,scale:.8},visible:t=>({opacity:1,scale:1,transition:{delay:.1*t,duration:.3}}),exit:{opacity:0,scale:.8,transition:{duration:.3}}},Kh=()=>{const{eventSlug:t}=c(),n=l(),{props:{organizationId:P,loginUrl:k},loadingUser:I,user:M,organization:j}=p(),{event:D}=u({eventSlug:t}),{increment:F}=T(D),[U,O]=e.useState(!1),[L,N]=e.useState([]),[B,V]=e.useState({}),[q,z]=e.useState(null),[_,G]=e.useState(null),[$,H]=e.useState({}),[W,X]=e.useState(0),[Y,K]=e.useState(0),[Z,Q]=e.useState({}),J=e.useRef(0);e.useEffect(()=>{M&&tt()},[M]);const tt=async()=>{O(!0);try{const e=await d.get(f.GET_UPLOAD_COUNT,{searchParams:{eventSlug:t},headers:{"x-org-id":P,Authorization:M?`Bearer ${M.token}`:void 0}}).json();if(e.error)throw new Error(e.error);H(e.data.uploadCount)}catch(t){console.error(t),z("Failed to fetch upload count")}O(!1)},et=async t=>{if(t.type===r.IMAGE){N(e=>e.map(e=>e.uid===t.uid?{...e,status:a.PROCESSING}:e));const e=await(async(t,e)=>{const n=Date.now();let i=t.originalFile,r={};try{r=await Oh(i,{expanded:!1,includeUnknown:!0}),delete r.Images,delete r.Thumbnail}catch(t){console.error(t)}try{const e=t.originalFile?.name?.split(".").pop();if(["heic","heif"].includes(e?.toLowerCase())&&typeof window<"u"){const e=(await import("./heic2any-JTWseCtt.js").then(t=>t.h)).default;i=await e({blob:t.originalFile,toType:"image/jpeg"})}}catch(t){console.error(t)}let o=i;try{i.size/1024/1024>1&&(o=await Bl(i,{maxSizeMB:2,maxWidthOrHeight:2400,useWebWorker:!0,preserveExif:!0,maxIteration:3,onProgress:e}))}catch(t){console.error(t)}return{exif:r,compressedFile:o,colors:{},clientProcessingTime:Date.now()-n}})(t);N(n=>n.map(n=>n.uid===t.uid?{...n,...e,status:a.DONE}:n))}else if(t.type===r.VIDEO){N(e=>e.map(e=>e.uid===t.uid?{...e,status:a.PROCESSING}:e));const e=await(async t=>new Promise(e=>{const n=t.originalFile;if(n){const t=document?.createElement("video");t.onloadedmetadata=()=>{e(t.duration)};const i=URL.createObjectURL(n);t.src=i}else e(0)}))(t);N(n=>n.map(n=>n.uid===t.uid?{...n,length:e,status:a.DONE}:n))}},nt=t=>{const e=L.filter(e=>e.uid!==t);N(e)},it=t=>{const e=D?.uploadLimit-$[m.APPROVED]-$[m.IN_REVIEW]-$[m.REJECTED],n=[];Array.from(t).forEach(t=>{if(!L.some(e=>e.originalFile.name===t.name)){const e={uid:R(),originalFile:t,type:_h(t),status:a.WAITING};n.push(e)}}),!(L.length+n.length>$h)&&(n.slice(0,Math.min(e-L.length,$h-L.length)).forEach(t=>Wh.push(()=>et(t))),N([...L,...n]))},rt=D?D?.uploadLimit-($?$[m.APPROVED]+$[m.IN_REVIEW]+$[m.REJECTED]:0):0,ot=e.useMemo(()=>Object.values(Z).some(t=>[s.WAITING,s.UPLOADING].includes(t.status)),[Z]);let at=!0;for(let t=0;t<L.length;t++)if(L[t].status!==a.DONE){at=!1;break}const st=U||!D||!M||D?.status!==h.OPEN||L.length>=Math.min(rt,$h)||ot,ct=D?D?.enableVideo?[...qh,...zh]:qh:[];if(I)return i.jsx(g,{className:"qc:mx-auto qc:mt-8 qc:h-6 qc:w-64"});if(!M){if(!j.customAuth)return i.jsx(x,{to:y.LOGIN,state:{referrer:n.pathname}});if(!k)return i.jsx(v,{title:"Please login to upload content"});window.history.pushState({},"",k)}return i.jsxs("div",{className:"qc:relative qc:min-h-[80vh] qc:w-full qc:space-y-8 qc:bg-background",children:[i.jsx("div",{className:"qc:flex qc:flex-row qc:justify-end",children:i.jsx(E,{event:D})}),i.jsx(b,{variant:"h3",align:"center",immutable:!0,children:D?.name}),U&&i.jsxs("div",{className:"qc:w-full qc:space-y-8 qc:pb-8",children:[i.jsx(g,{className:"qc:mx-auto qc:h-7 qc:w-64"}),i.jsx(g,{className:"qc:mx-auto qc:h-56 qc:w-full qc:max-w-xl"})]}),!U&&M&&D?D?.status!==h.OPEN?i.jsxs("div",{className:"qc:mt-16 qc:flex qc:flex-col qc:items-center qc:gap-8",children:[i.jsx(v,{title:"Event not open",description:"Please find some open event to upload content",iconSvg:i.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:"qc:size-full",viewBox:"0 0 885.86993 622.8043",xmlnsXlink:"http://www.w3.org/1999/xlink",role:"img",children:[i.jsx("title",{children:"through_the_park"}),i.jsx("polygon",{points:"461.601 348.37 400.416 348.37 400.416 350.344 409.958 350.344 409.958 369.094 411.932 369.094 411.932 350.344 449.098 350.344 449.098 369.094 451.072 369.094 451.072 350.344 461.601 350.344 461.601 348.37",fill:"#3f3d56"}),i.jsx("polygon",{points:"484.299 300.014 468.509 300.014 468.509 315.803 475.829 315.803 475.829 369.007 477.803 369.007 477.803 315.803 484.299 315.803 484.299 300.014",fill:"#3f3d56"}),i.jsx("rect",{x:"400.53636",y:"342.46486",width:"61.18538",height:"1.97372",fill:"#3f3d56"}),i.jsx("rect",{x:"400.53636",y:"337.53055",width:"61.18538",height:"1.97372",fill:"#3f3d56"}),i.jsx("rect",{x:"400.53636",y:"332.59625",width:"61.18538",height:"1.97372",fill:"#3f3d56"}),i.jsx("path",{d:"M775.57723,513.38047h-1.97372c0-93.59519-76.14539-169.7401-169.7401-169.7401-93.59518,0-169.74009,76.14491-169.74009,169.7401H432.1496c0-94.68325,77.03057-171.71382,171.71381-171.71382C698.54714,341.66665,775.57723,418.69722,775.57723,513.38047Z",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),i.jsx("circle",{cx:"161.35177",cy:"161.35177",r:"161.35177",fill:"currentColor"}),i.jsx("path",{d:"M438.4403,192.17931a161.36436,161.36436,0,0,1-268.85975,170.77,161.36567,161.36567,0,1,0,268.85975-170.77Z",transform:"translate(-157.06503 -138.59785)",opacity:"0.2"}),i.jsx("polygon",{points:"161.795 161.352 162.238 161.352 170.217 618.811 153.373 618.811 161.795 161.352",fill:"#3f3d56"}),i.jsx("rect",{x:"329.05538",y:"537.54454",width:"7.97893",height:"30.14264",transform:"translate(509.8146 -138.12101) rotate(62.23413)",fill:"#3f3d56"}),i.jsx("circle",{cx:"755.27647",cy:"229.8063",r:"130.59346",fill:"currentColor"}),i.jsx("path",{d:"M1009.48506,281.178a130.60365,130.60365,0,0,1-217.60732,138.2163A130.60471,130.60471,0,1,0,1009.48506,281.178Z",transform:"translate(-157.06503 -138.59785)",opacity:"0.2"}),i.jsx("polygon",{points:"755.635 229.806 755.994 229.806 762.452 600.06 748.819 600.06 755.635 229.806",fill:"#3f3d56"}),i.jsx("rect",{x:"920.95206",y:"560.70661",width:"6.45792",height:"24.39658",transform:"translate(843.51724 -650.35577) rotate(62.23413)",fill:"#3f3d56"}),i.jsx("circle",{cx:"369.90725",cy:"321.70366",r:"20.55846",fill:"currentColor"}),i.jsx("path",{d:"M542.265,446.57008a20.56006,20.56006,0,0,1-34.25647,21.75847A20.56023,20.56023,0,1,0,542.265,446.57008Z",transform:"translate(-157.06503 -138.59785)",opacity:"0.2"}),i.jsx("polygon",{points:"369.964 321.704 370.02 321.704 371.037 379.99 368.891 379.99 369.964 321.704",fill:"#3f3d56"}),i.jsx("rect",{x:"528.32779",y:"490.57441",width:"1.01663",height:"3.84059",transform:"translate(561.19589 -343.48173) rotate(62.23413)",fill:"#3f3d56"}),i.jsx("circle",{cx:"559.878",cy:"255.44299",r:"52.63144",fill:"currentColor"}),i.jsx("path",{d:"M756.09357,358.88718A52.63554,52.63554,0,0,1,668.394,414.59075a52.636,52.636,0,1,0,87.69954-55.70357Z",transform:"translate(-157.06503 -138.59785)",opacity:"0.2"}),i.jsx("polygon",{points:"560.023 255.443 560.167 255.443 562.77 404.662 557.275 404.662 560.023 255.443",fill:"#3f3d56"}),i.jsx("rect",{x:"720.41323",y:"471.54209",width:"2.60265",height:"9.83225",transform:"translate(650.03004 -522.71764) rotate(62.23413)",fill:"#3f3d56"}),i.jsx("path",{d:"M354.5881,734.63564s.68149-14.27971,14.65205-12.61989",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),i.jsx("circle",{cx:"193.57562",cy:"575.45671",r:"6.99217",fill:"currentColor"}),i.jsx("rect",{x:"192.43789",y:"587.23109",width:"1.97372",height:"13.81605",fill:"#3f3d56"}),i.jsx("path",{d:"M403.93115,702.06922s.68149-14.27971,14.652-12.61988",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),i.jsx("circle",{cx:"242.91867",cy:"542.89029",r:"6.99217",fill:"currentColor"}),i.jsx("rect",{x:"241.78094",y:"554.66468",width:"1.97372",height:"13.81605",fill:"#3f3d56"}),i.jsx("path",{d:"M552.67,591.58462s.54127-11.34162,11.63735-10.02331",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),i.jsx("circle",{cx:"392.46975",cy:"436.6403",r:"5.55351",fill:"currentColor"}),i.jsx("rect",{x:"391.56611",y:"445.99208",width:"1.56762",height:"10.97337",fill:"#3f3d56"}),i.jsx("path",{d:"M769.77945,556.05762s.54127-11.34162,11.63735-10.02331",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),i.jsx("circle",{cx:"609.57917",cy:"401.1133",r:"5.55351",fill:"currentColor"}),i.jsx("rect",{x:"608.67553",y:"410.46508",width:"1.56762",height:"10.97337",fill:"#3f3d56"}),i.jsx("path",{d:"M562.53864,621.19045s.54127-11.34163,11.63735-10.02331",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),i.jsx("circle",{cx:"402.33836",cy:"466.24613",r:"5.55351",fill:"currentColor"}),i.jsx("rect",{x:"401.43472",y:"475.59791",width:"1.56762",height:"10.97337",fill:"#3f3d56"}),i.jsx("path",{d:"M538.854,642.90139s.54127-11.34162,11.63735-10.02331",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),i.jsx("circle",{cx:"378.6537",cy:"487.95707",r:"5.55351",fill:"currentColor"}),i.jsx("rect",{x:"377.75006",y:"497.30885",width:"1.56762",height:"10.97337",fill:"#3f3d56"}),i.jsx("path",{d:"M803.33272,574.808s.54128-11.34162,11.63736-10.02331",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),i.jsx("circle",{cx:"643.13244",cy:"419.86366",r:"5.55351",fill:"currentColor"}),i.jsx("rect",{x:"642.22881",y:"429.21544",width:"1.56762",height:"10.97337",fill:"#3f3d56"}),i.jsx("path",{d:"M483.58976,599.47951s.54127-11.34163,11.63735-10.02332",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),i.jsx("circle",{cx:"323.38948",cy:"444.53519",r:"5.55351",fill:"currentColor"}),i.jsx("rect",{x:"322.48584",y:"453.88696",width:"1.56762",height:"10.97337",fill:"#3f3d56"}),i.jsx("path",{d:"M740.17362,543.22843s.54127-11.34162,11.63735-10.02331",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),i.jsx("circle",{cx:"579.97334",cy:"388.28411",r:"5.55351",fill:"currentColor"}),i.jsx("rect",{x:"579.0697",y:"397.63589",width:"1.56762",height:"10.97337",fill:"#3f3d56"}),i.jsx("path",{d:"M268.73119,737.59622s.68149-14.27971,14.652-12.61989",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),i.jsx("circle",{cx:"107.71872",cy:"578.41729",r:"6.99217",fill:"currentColor"}),i.jsx("rect",{x:"106.58099",y:"590.19168",width:"1.97372",height:"13.81605",fill:"#3f3d56"}),i.jsx("path",{d:"M948.67842,733.64878s.68149-14.27971,14.65205-12.61989",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),i.jsx("circle",{cx:"787.66594",cy:"574.46985",r:"6.99217",fill:"currentColor"}),i.jsx("rect",{x:"786.52822",y:"586.24423",width:"1.97372",height:"13.81605",fill:"#3f3d56"}),i.jsx("path",{d:"M891.44048,700.0955s.68149-14.27971,14.65205-12.61988",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),i.jsx("circle",{cx:"730.42801",cy:"540.91657",r:"6.99217",fill:"currentColor"}),i.jsx("rect",{x:"729.29028",y:"552.69096",width:"1.97372",height:"13.81605",fill:"#3f3d56"}),i.jsx("path",{d:"M883.54559,750.42541s.6815-14.27971,14.65205-12.61988",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),i.jsx("circle",{cx:"722.53312",cy:"591.24648",r:"6.99217",fill:"currentColor"}),i.jsx("rect",{x:"721.39539",y:"603.02087",width:"1.97372",height:"13.81605",fill:"#3f3d56"}),i.jsx("path",{d:"M280.09142,761.08258S590.95263,679.17311,587.992,595.28993c-5.42774-23.19124-42.92846-29.1124-42.92846-29.1124s-88.81749-11.84233-40.4613-40.4613,180.59557-21.71094,180.59557-21.71094-136.18682,21.71094-75.9883,33.55327c48.35619,2.96058,110.52843,15.78978,110.52843,15.78978S846.0562,579.99358,863.8197,645.12641s2.96058,115.46273,2.96058,115.46273Z",transform:"translate(-157.06503 -138.59785)",fill:"#e6e6e6"}),i.jsx("path",{d:"M618.67289,761.40215l-1.16407-1.627q2.4668-1.76367,4.85938-3.50781l1.17773,1.61719Q621.14359,759.63213,618.67289,761.40215Z",transform:"translate(-157.06503 -138.59785)",fill:"#fff"}),i.jsx("path",{d:"M633.18265,750.72832l-1.207-1.59375c3.23144-2.44727,6.41406-4.90918,9.46-7.31738l1.24023,1.56836C639.61917,745.80254,636.42484,748.27324,633.18265,750.72832Zm18.82324-14.89941-1.27734-1.53907c3.12793-2.59863,6.18652-5.21,9.09082-7.76074l1.32031,1.502C658.22171,730.59453,655.14847,733.21855,652.00589,735.82891Zm18.03223-15.86914-1.36914-1.459c2.98535-2.7998,5.86328-5.60254,8.55469-8.332l1.42382,1.4043C675.93851,714.32012,673.04105,717.14238,670.03812,719.95977Zm16.8584-17.14063-1.48828-1.33594c2.74218-3.05468,5.33593-6.11426,7.709-9.09277l1.56445,1.24609C692.28421,696.64531,689.66507,699.73516,686.89652,702.81914ZM701.84964,683.952,700.1973,682.825c2.32519-3.40723,4.42285-6.80859,6.23437-10.10938l1.75391.9629C706.34281,677.035,704.211,680.492,701.84964,683.952Zm11.5-21.21386-1.86133-.73047a69.37031,69.37031,0,0,0,3.39551-11.29l1.959.40234A71.21576,71.21576,0,0,1,713.34964,662.73809Zm2.66992-23.69629a47.10965,47.10965,0,0,0-1.60839-11.50684l1.93164-.52148a49.17317,49.17317,0,0,1,1.67675,11.99511Zm-5.98339-22.30274a60.32109,60.32109,0,0,0-6.65625-9.66406l1.5332-1.2832a62.27891,62.27891,0,0,1,6.87695,9.98632Zm-14.91993-18.10449a108.36226,108.36226,0,0,0-9.32617-7.34766l1.1543-1.63281a110.07889,110.07889,0,0,1,9.498,7.48438Zm-19.34863-13.78418c-3.27148-1.92285-6.80078-3.8418-10.4873-5.70312l.90039-1.78516c3.72558,1.87988,7.292,3.81933,10.60058,5.76367Zm-21.29687-10.81445c-3.48145-1.54688-7.18946-3.10352-11.02149-4.62793l.74024-1.85742c3.85547,1.5332,7.58789,3.10058,11.09375,4.65722ZM632.23539,565.157c-3.56348-1.292-7.37305-2.61816-11.32129-3.94141l.63476-1.89648c3.96387,1.3291,7.78906,2.66016,11.36817,3.957Zm-22.73145-7.64648c-3.48535-1.09961-7.2373-2.25684-11.47119-3.53907l.58008-1.91406c4.24072,1.28418,8.00048,2.44434,11.49267,3.54492Zm-22.979-6.99317c-4.0459-1.21-7.90332-2.36621-11.51465-3.47851l.58886-1.91211c3.60645,1.1123,7.458,2.2666,11.499,3.47461Zm-22.98389-7.1875a95.0565,95.0565,0,0,1-11.26416-4.53418l.89941-1.78711a92.76387,92.76387,0,0,0,11.019,4.43067Zm-15.103-13.11035-1.42578-1.40234c1.82324-1.85254,5.42969-3.665,11.02539-5.542l.63574,1.89649C553.45658,526.9207,550.01273,528.61992,548.438,530.21953Zm21.67676-8.30566-.4834-1.94141c3.459-.86133,7.39942-1.76269,11.71192-2.67871l.415,1.957C577.46878,520.16094,573.5513,521.05742,570.11478,521.91387Zm23.36963-5.01856-.375-1.96484c3.68506-.7041,7.65381-1.4336,11.79687-2.168l.34961,1.96875C601.12113,515.46465,597.16117,516.19219,593.48441,516.89531ZM617.05374,512.7l-.33007-1.97266q5.65283-.94775,11.83105-1.93847l.31641,1.97461Q622.69827,511.75371,617.05374,512.7Z",transform:"translate(-157.06503 -138.59785)",fill:"#fff"}),i.jsx("path",{d:"M640.9307,508.865l-.30664-1.97656q2.9165-.45119,5.93554-.91114l.30079,1.97657Q643.84281,508.41387,640.9307,508.865Z",transform:"translate(-157.06503 -138.59785)",fill:"#fff"}),i.jsx("path",{d:"M685.194,305.71659l9.08474-7.26606c-7.05753-.77863-9.95734,3.07039-11.14411,6.11693-5.51363-2.28947-11.51587.711-11.51587.711l18.17688,6.59885A13.75483,13.75483,0,0,0,685.194,305.71659Z",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),i.jsx("path",{d:"M516.44078,361.96766l9.08474-7.26605c-7.05753-.77864-9.95734,3.07039-11.14411,6.11692-5.51363-2.28946-11.51587.711-11.51587.711l18.17688,6.59885A13.75487,13.75487,0,0,0,516.44078,361.96766Z",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),i.jsx("path",{d:"M560.84953,245.51807l9.08473-7.26606c-7.05753-.77863-9.95733,3.07039-11.14411,6.11693-5.51363-2.28947-11.51587.711-11.51587.711l18.17688,6.59885A13.75484,13.75484,0,0,0,560.84953,245.51807Z",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),i.jsx("path",{d:"M659.609,569.03965s-7.86875,0-8.74306,4.80868-2.18577,57.267-1.31146,63.82431.87431,5.24584.87431,5.24584-1.743,12.4609,2.18858,13.00631S656.5489,641.607,656.5489,641.607l3.06008-53.33264Z",transform:"translate(-157.06503 -138.59785)",fill:"#9e616a"}),i.jsx("path",{d:"M693.7069,569.03965s7.86875,0,8.74306,4.80868,2.18577,57.267,1.31146,63.82431-.8743,5.24584-.8743,5.24584,1.743,12.4609-2.18859,13.00631S696.767,641.607,696.767,641.607l-3.06008-53.33263Z",transform:"translate(-157.06503 -138.59785)",fill:"#9e616a"}),i.jsx("path",{d:"M658.29752,751.76952h-3.49721a7.86866,7.86866,0,0,0-7.86875,7.86857v.00018H668.352V749.58375H658.29752Z",transform:"translate(-157.06503 -138.59785)",fill:"#2f2e41"}),i.jsx("path",{d:"M691.95829,751.76952h3.49721a7.86867,7.86867,0,0,1,7.86875,7.86857v.00018H681.90377V749.58375h10.05452Z",transform:"translate(-157.06503 -138.59785)",fill:"#2f2e41"}),i.jsx("circle",{cx:"516.09568",cy:"409.02131",r:"11.36598",fill:"#9e616a"}),i.jsx("path",{d:"M670.53781,553.73931s-1.31146,14.426-3.06008,15.73749,18.36042-.8743,18.36042-.8743-6.99444-10.49167-5.683-13.98889S670.53781,553.73931,670.53781,553.73931Z",transform:"translate(-157.06503 -138.59785)",fill:"#9e616a"}),i.jsx("path",{d:"M696.32981,569.03965s-24.04341-10.05451-39.78091,0c0,0-3.93436,10.05451-.87431,15.7375s7.86875,19.23472,3.06008,28.41493.43716,5.24584.43716,5.24584-6.12014,24.48056-6.99445,43.71525,2.62293,88.30487,5.24583,88.742,10.92883,1.31146,11.80314,0,6.99444-92.67636,6.99444-92.67636,2.62292,93.55069,5.24582,93.55069,9.61737,0,10.92883-2.18577,12.24027-86.55625,8.30591-104.04235-6.55729-26.22917-6.55729-26.22917,4.80867-3.06007,3.49723-4.80869-7.86877-20.54616-4.80869-23.60625S696.32981,569.03965,696.32981,569.03965Z",transform:"translate(-157.06503 -138.59785)",fill:"#2f2e41"}),i.jsx("circle",{cx:"523.30871",cy:"402.17104",r:"18.36042",fill:"#2f2e41"}),i.jsx("path",{d:"M691.83867,531.57749a12.36814,12.36814,0,0,1-9.33162-14.29294c-.05359.188-.104.37762-.14921.57a12.36847,12.36847,0,0,0,24.0811,5.65832c.0452-.19233.08448-.38459.12022-.57676A12.36815,12.36815,0,0,1,691.83867,531.57749Z",transform:"translate(-157.06503 -138.59785)",fill:"#2f2e41"}),i.jsx("circle",{cx:"535.52108",cy:"386.38703",r:"8.98489",fill:"#2f2e41"})]})}),i.jsx(w,{to:y.PUBLIC_EVENTS,state:{internalNavigation:!0},children:i.jsx(A,{children:"All events"})})]}):i.jsxs(e.Fragment,{children:[i.jsxs(b,{variant:"h5",align:"center",children:["Available entries : ",i.jsx("span",{className:"qc:text-primary",children:rt})]}),L.length<=0&&i.jsx("div",{className:"qc:flex qc:w-full qc:flex-auto qc:justify-center qc:mt-6",children:i.jsx(Rt,{accept:(()=>{const t={},e=ct.filter(t=>qh.includes(t)),n=ct.filter(t=>zh.includes(t));return e.length>0&&(t["image/*"]=e.map(t=>`.${t}`)),n.length>0&&(t["video/*"]=n.map(t=>`.${t}`)),t})(),multiple:!0,disabled:st,onDrop:it,children:({getRootProps:t,getInputProps:e,isDragActive:n})=>i.jsxs("div",{...t(),className:o("qc:bg-background qc:w-auto qc:max-w-2xl qc:rounded qc:border-2 qc:border-dashed qc:px-4 qc:py-12 qc:text-center",L.length>=rt?"qc:border-border":"",st?"qc:border-border qc:hover:cursor-not-allowed":"qc:border-primary qc:hover:cursor-pointer"),children:[i.jsx("input",{...e()}),i.jsxs("svg",{className:o(st?"qc:text-gray-500":"qc:text-primary","qc:mx-auto qc:size-12"),xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[i.jsx("rect",{x:"0",y:"0",width:"24",height:"24",fill:"none",stroke:"none"}),i.jsx("path",{fill:"currentColor",d:"M19.35 10.04A7.49 7.49 0 0 0 12 4C9.11 4 6.6 5.64 5.35 8.04A5.994 5.994 0 0 0 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5c0-2.64-2.05-4.78-4.65-4.96zM14 13v4h-4v-4H7l5-5l5 5h-3z"})]}),i.jsx("span",{className:o(st?"qc:text-muted":"qc:text-foreground","qc:mt-2 qc:block qc:font-medium"),children:n?"Drop files here...":`Select Images ${D?.enableVideo?"or Videos (60s)":""} to upload (${L.length}/${Math.min(rt,$h)})`}),!ot&&i.jsx("div",{className:"qc:text-muted-foreground qc:mt-6 qc:w-full qc:text-center qc:text-xs qc:italic",children:"* Only your new, original photos will be eligible for upload. Our team will review them before publication."})]})})}),i.jsx("div",{className:"qc:grid qc:grid-cols-2 qc:gap-6 qc:sm:pt-3 qc:lg:grid-cols-3 qc:xl:grid-cols-4",children:i.jsxs(no,{children:[L.map((t,e)=>i.jsx(rl.div,{layout:!0,variants:Yh,initial:"hidden",animate:"visible",exit:"exit",custom:e,className:"qc:relative",children:i.jsx(Gh,{enableCaption:D?.enableCaption,enableAICaption:D?.enableAICaption,ada:D?.ada,content:t,disabled:ot,removeImage:nt,caption:B[t.uid],onCaptionChange:e=>{V(n=>({...n,[t.uid]:e}))},playingVideo:_===t.uid,onPlay:()=>G(t.uid),onPause:()=>G(null),onEnd:()=>G(null),uploadStatus:Z[t.uid]})},t.uid)),L.length>0&&rt>0&&i.jsx(Rt,{accept:(()=>{const t={},e=ct.filter(t=>qh.includes(t)),n=ct.filter(t=>zh.includes(t));return e.length>0&&(t["image/*"]=e.map(t=>`.${t}`)),n.length>0&&(t["video/*"]=n.map(t=>`.${t}`)),t})(),multiple:!0,disabled:st,onDrop:it,children:({getRootProps:t,getInputProps:e,isDragActive:n})=>i.jsxs("div",{...t(),children:[i.jsx("input",{...e()}),i.jsxs(rl.button,{type:"button",layout:!0,initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.3},className:o("qc:border-primary qc:bg-background qc:hover:border-primary qc:text-foreground qc:hover:text-primary qc:flex qc:size-full qc:flex-col qc:items-center qc:justify-center qc:gap-3 qc:rounded qc:border-2 qc:border-dashed qc:p-12 qc:hover:border-2 qc:focus:outline-none qc:sm:min-h-72",n?"qc:bg-primary qc:bg-opacity-15":"qc:bg-background qc:bg-opacity-100"),children:[i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"qc:size-14",viewBox:"0 0 24 24",children:i.jsx("path",{fill:"currentColor",d:"M5.616 20q-.691 0-1.153-.462T4 18.384V5.616q0-.691.463-1.153T5.616 4h6.5q.212 0 .356.144t.144.357t-.144.356t-.356.143h-6.5q-.27 0-.443.173T5 5.616v12.769q0 .269.173.442t.443.173h12.769q.269 0 .442-.173t.173-.443v-6.5q0-.212.144-.356t.357-.144t.356.144t.143.356v6.5q0 .691-.462 1.153T18.384 20zm1.153-3.616h10.462L14 12.077l-3 3.789l-2-2.404zM17 7h-1.5q-.213 0-.356-.144T15 6.499t.144-.356T15.5 6H17V4.5q0-.213.144-.356T17.501 4t.356.144T18 4.5V6h1.5q.213 0 .356.144t.144.357t-.144.356T19.5 7H18v1.5q0 .213-.144.356T17.499 9t-.356-.144T17 8.5z"})}),i.jsx(b,{variant:"h5",children:n?"Drop files here...":"Add Image"})]})]})})]})}),L.length>0&&i.jsx(A,{fullWidth:!0,loading:ot,onClick:async(t=!0)=>{z(null);let e=!0;if(D?.ada)for(let t=0;t<L.length;t++)if(!B[L[t].uid]){e=!1;break}if(!e)return void z("Caption are needed for each image");X(L.length),K(0),J.current=L.length;const n=`upload-group-${R()}`;L.forEach(t=>{Xh.push(()=>(async({uid:t,groupId:e,groupContentCount:n,eventId:i,content:r,contentData:o})=>{Q(e=>({...e,[t]:{status:s.UPLOADING,progress:0}}));const a=Math.ceil(r.size/Hh);for(let c=0;c<a;c++){const l=c*Hh,p=Math.min(r.size,l+Hh),u=r.slice(l,p);try{const r=new FormData;r.append("groupId",e),r.append("groupContentCount",n),r.append("eventId",i),r.append("contentData",JSON.stringify(o)),r.append("integrationUpload",!0),r.append("uid",t),r.append("chunk",u),r.append("chunkIndex",c),r.append("totalChunks",a),await d.post(f.SINGLE_UPLOAD,{body:r,headers:{"x-org-id":P,Authorization:M?`Bearer ${M.token}`:void 0}})}catch(e){console.error(e),Q(e=>({...e,[t]:{status:s.FAILED,progress:0}}));break}}H(t=>({...t,[D?.autoApprove?m.APPROVED:m.IN_REVIEW]:t[D?.autoApprove?m.APPROVED:m.IN_REVIEW]+1})),Q(e=>({...e,[t]:{status:s.DONE,progress:100}})),J.current-=1,N(e=>e.filter(e=>e.uid!==t)),D?.autoApprove||F(),0===J.current&&(V({}),N([]),X(0),K(0),Q({}),S.success(D?.visibility===C.PRIVATE&&D?.autoApprove?"Content uploaded":"Upload successful, waiting for approval"))})({uid:t.uid,groupId:n,groupContentCount:L.length,eventId:D?._id,content:t.compressedFile?t.compressedFile:t.originalFile,contentData:{type:t.type,caption:B[t.uid],colors:t.colors,sizes:{original:t.originalFile.size,clientCompressed:t.compressedFile?.size},processingTimes:{client:t.clientProcessingTime},location:{latitude:t.exif?.GPSLatitude?.description,longitude:t.exif?.GPSLongitude?.description},exif:t.exif,capturedAt:t.exif?.DateTimeOriginal?.description}}))});const i={};L.forEach(t=>{i[t.uid]={status:s.WAITING,progress:0}}),Q(i)},icon:"material-symbols:upload-rounded",disabled:!D||ot||!at,children:ot?`Uploading (${Y}/${W})`:"Upload"})]}):null,L.length<=0&&i.jsx(w,{to:y.GALLERY(t),state:{internalNavigation:!0},children:i.jsx(b,{variant:"h5",align:"center",children:"Goto gallery"})})]})};export{Kh as default};
|
|
1
|
+
import{L as t,a as e,Z as n,j as i,y as r,c as o,_ as a,$ as s,d as c,e as l,u as p,M as u,k as d,l as f,a0 as m,E as h,S as g,i as v,N as x,P as y,T as b,h as w,O as A,a1 as S,a2 as C}from"./index-DsN-W6V_.js";import{r as P}from"./index-BEtvIXWu.js";import{_ as k}from"./tslib.es6-Dp_1P0Dk.js";import{d as T,E}from"./EventHeaderAdminButtons-zE3NbEUA.js";import{V as I}from"./VideoPlayer-cWSLl4fO.js";const M=[];for(let t=0;t<256;++t)M.push((t+256).toString(16).slice(1));let j;const D=new Uint8Array(16);const F={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function U(t,e,n){const i=(t=t||{}).random??t.rng?.()??function(){if(!j){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");j=crypto.getRandomValues.bind(crypto)}return j(D)}();if(i.length<16)throw new Error("Random bytes length must be >= 16");return i[6]=15&i[6]|64,i[8]=63&i[8]|128,function(t,e=0){return(M[t[e+0]]+M[t[e+1]]+M[t[e+2]]+M[t[e+3]]+"-"+M[t[e+4]]+M[t[e+5]]+"-"+M[t[e+6]]+M[t[e+7]]+"-"+M[t[e+8]]+M[t[e+9]]+"-"+M[t[e+10]]+M[t[e+11]]+M[t[e+12]]+M[t[e+13]]+M[t[e+14]]+M[t[e+15]]).toLowerCase()}(i)}function R(t,e,n){return F.randomUUID&&!t?F.randomUUID():U(t)}const O=Object.prototype.hasOwnProperty;class L extends Event{constructor(t,e){super(t),this.detail=e}}class N extends EventTarget{constructor(t={}){super();const{concurrency:e=1/0,timeout:n=0,autostart:i=!1,results:r=null}=t;this.concurrency=e,this.timeout=n,this.autostart=i,this.results=r,this.pending=0,this.session=0,this.running=!1,this.jobs=[],this.timers=[],this.addEventListener("error",this._errorHandler)}_errorHandler(t){this.end(t.detail.error)}pop(){return this.jobs.pop()}shift(){return this.jobs.shift()}indexOf(t,e){return this.jobs.indexOf(t,e)}lastIndexOf(t,e){return void 0!==e?this.jobs.lastIndexOf(t,e):this.jobs.lastIndexOf(t)}slice(t,e){return this.jobs=this.jobs.slice(t,e),this}reverse(){return this.jobs.reverse(),this}push(...t){const e=this.jobs.push(...t);return this.autostart&&this._start(),e}unshift(...t){const e=this.jobs.unshift(...t);return this.autostart&&this._start(),e}splice(t,e,...n){return this.jobs.splice(t,e,...n),this.autostart&&this._start(),this}get length(){return this.pending+this.jobs.length}start(t){if(this.running)throw new Error("already started");let e;return t?this._addCallbackToEndEvent(t):e=this._createPromiseToEndEvent(),this._start(),e}_start(){if(this.running=!0,this.pending>=this.concurrency)return;if(0===this.jobs.length)return void(0===this.pending&&this.done());const t=this.jobs.shift(),e=this.session,n=void 0!==t&&O.call(t,"timeout")?t.timeout:this.timeout;let i=!0,r=null,o=!1,a=null;const s=(n,...s)=>{i&&this.session===e&&(i=!1,this.pending--,null!==r&&(this.timers=this.timers.filter(t=>t!==r),clearTimeout(r)),n?this.dispatchEvent(new L("error",{error:n,job:t})):o||(null!==a&&null!==this.results&&(this.results[a]=[...s]),this.dispatchEvent(new L("success",{result:[...s],job:t}))),this.session===e&&(0===this.pending&&0===this.jobs.length?this.done():this.running&&this._start()))};n&&(r=setTimeout(()=>{o=!0,this.dispatchEvent(new L("timeout",{next:s,job:t})),s()},n),this.timers.push(r)),null!=this.results&&(a=this.results.length,this.results[a]=null),this.pending++,this.dispatchEvent(new L("start",{job:t})),t.promise=t(s),void 0!==t.promise&&"function"==typeof t.promise.then&&t.promise.then(function(t){return s(void 0,t)}).catch(function(t){return s(t||!0)}),this.running&&this.jobs.length>0&&this._start()}stop(){this.running=!1}end(t){this.clearTimers(),this.jobs.length=0,this.pending=0,this.done(t)}clearTimers(){this.timers.forEach(t=>{clearTimeout(t)}),this.timers=[]}_addCallbackToEndEvent(t){const e=n=>{this.removeEventListener("end",e),t(n.detail.error,this.results)};this.addEventListener("end",e)}_createPromiseToEndEvent(){return new Promise((t,e)=>{this._addCallbackToEndEvent((n,i)=>{n?e(n):t(i)})})}done(t){this.session++,this.running=!1,this.dispatchEvent(new L("end",{error:t}))}}const B=t(P()),V=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function q(t,e,n){const i=function(t){const{name:e}=t;if(e&&-1!==e.lastIndexOf(".")&&!t.type){const n=e.split(".").pop().toLowerCase(),i=V.get(n);i&&Object.defineProperty(t,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return t}(t),{webkitRelativePath:r}=t,o="string"==typeof e?e:"string"==typeof r&&r.length>0?r:`./${t.name}`;return"string"!=typeof i.path&&z(i,"path",o),z(i,"relativePath",o),i}function z(t,e,n){Object.defineProperty(t,e,{value:n,writable:!1,configurable:!1,enumerable:!0})}const _=[".DS_Store","Thumbs.db"];function G(t){return"object"==typeof t&&null!==t}function $(t){return t.filter(t=>-1===_.indexOf(t.name))}function H(t){if(null===t)return[];const e=[];for(let n=0;n<t.length;n++){const i=t[n];e.push(i)}return e}function W(t){if("function"!=typeof t.webkitGetAsEntry)return Y(t);const e=t.webkitGetAsEntry();return e&&e.isDirectory?Z(e):Y(t,e)}function X(t){return t.reduce((t,e)=>[...t,...Array.isArray(e)?X(e):[e]],[])}function Y(t,e){return k(this,void 0,void 0,function*(){var n;if(globalThis.isSecureContext&&"function"==typeof t.getAsFileSystemHandle){const e=yield t.getAsFileSystemHandle();if(null===e)throw new Error(`${t} is not a File`);if(void 0!==e){const t=yield e.getFile();return t.handle=e,q(t)}}const i=t.getAsFile();if(!i)throw new Error(`${t} is not a File`);return q(i,null!==(n=e?.fullPath)&&void 0!==n?n:void 0)})}function K(t){return k(this,void 0,void 0,function*(){return t.isDirectory?Z(t):function(t){return k(this,void 0,void 0,function*(){return new Promise((e,n)=>{t.file(n=>{const i=q(n,t.fullPath);e(i)},t=>{n(t)})})})}(t)})}function Z(t){const e=t.createReader();return new Promise((t,n)=>{const i=[];!function r(){e.readEntries(e=>k(this,void 0,void 0,function*(){if(e.length){const t=Promise.all(e.map(K));i.push(t),r()}else try{const e=yield Promise.all(i);t(e)}catch(t){n(t)}}),t=>{n(t)})}()})}var Q,J={};var tt=(Q||(Q=1,J.__esModule=!0,J.default=function(t,e){if(t&&e){var n=Array.isArray(e)?e:e.split(",");if(0===n.length)return!0;var i=t.name||"",r=(t.type||"").toLowerCase(),o=r.replace(/\/.*$/,"");return n.some(function(t){var e=t.trim().toLowerCase();return"."===e.charAt(0)?i.toLowerCase().endsWith(e):e.endsWith("/*")?o===e.replace(/\/.*$/,""):r===e})}return!0}),J);const et=t(tt);function nt(t){return function(t){if(Array.isArray(t))return ct(t)}(t)||function(t){if(typeof Symbol<"u"&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||st(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function it(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function rt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?it(Object(n),!0).forEach(function(e){ot(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):it(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function ot(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function at(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,r,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(i=n.next()).done)&&(o.push(i.value),!e||o.length!==e);a=!0);}catch(t){s=!0,r=t}finally{try{!a&&null!=n.return&&n.return()}finally{if(s)throw r}}return o}}(t,e)||st(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function st(t,e){if(t){if("string"==typeof t)return ct(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ct(t,e)}}function ct(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var lt="function"==typeof et?et:et.default,pt=function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split(","),e=t.length>1?"one of ".concat(t.join(", ")):t[0];return{code:"file-invalid-type",message:"File type must be ".concat(e)}},ut=function(t){return{code:"file-too-large",message:"File is larger than ".concat(t," ").concat(1===t?"byte":"bytes")}},dt=function(t){return{code:"file-too-small",message:"File is smaller than ".concat(t," ").concat(1===t?"byte":"bytes")}},ft={code:"too-many-files",message:"Too many files"};function mt(t,e){var n="application/x-moz-file"===t.type||lt(t,e);return[n,n?null:pt(e)]}function ht(t,e,n){if(gt(t.size))if(gt(e)&>(n)){if(t.size>n)return[!1,ut(n)];if(t.size<e)return[!1,dt(e)]}else{if(gt(e)&&t.size<e)return[!1,dt(e)];if(gt(n)&&t.size>n)return[!1,ut(n)]}return[!0,null]}function gt(t){return null!=t}function vt(t){return"function"==typeof t.isPropagationStopped?t.isPropagationStopped():typeof t.cancelBubble<"u"&&t.cancelBubble}function xt(t){return t.dataTransfer?Array.prototype.some.call(t.dataTransfer.types,function(t){return"Files"===t||"application/x-moz-file"===t}):!!t.target&&!!t.target.files}function yt(t){t.preventDefault()}function bt(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return e.some(function(e){return!vt(t)&&e&&e.apply(void 0,[t].concat(i)),vt(t)})}}function wt(t){return"audio/*"===t||"video/*"===t||"image/*"===t||"text/*"===t||"application/*"===t||/\w+\/[-+.\w]+/g.test(t)}function At(t){return/^.*\.[\w]+$/.test(t)}var St=["children"],Ct=["open"],Pt=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],kt=["refKey","onChange","onClick"];function Tt(t){return function(t){if(Array.isArray(t))return Mt(t)}(t)||function(t){if(typeof Symbol<"u"&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||It(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Et(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,r,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(i=n.next()).done)&&(o.push(i.value),!e||o.length!==e);a=!0);}catch(t){s=!0,r=t}finally{try{!a&&null!=n.return&&n.return()}finally{if(s)throw r}}return o}}(t,e)||It(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function It(t,e){if(t){if("string"==typeof t)return Mt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Mt(t,e)}}function Mt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function jt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function Dt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?jt(Object(n),!0).forEach(function(e){Ft(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):jt(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Ft(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ut(t,e){if(null==t)return{};var n,i,r=function(t,e){if(null==t)return{};var n,i,r={},o=Object.keys(t);for(i=0;i<o.length;i++)n=o[i],!(e.indexOf(n)>=0)&&(r[n]=t[n]);return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)n=o[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}var Rt=e.forwardRef(function(t,i){var r=t.children,o=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=Dt(Dt({},Ot),t),i=n.accept,r=n.disabled,o=n.getFilesFromEvent,a=n.maxSize,s=n.minSize,c=n.multiple,l=n.maxFiles,p=n.onDragEnter,u=n.onDragLeave,d=n.onDragOver,f=n.onDrop,m=n.onDropAccepted,h=n.onDropRejected,g=n.onFileDialogCancel,v=n.onFileDialogOpen,x=n.useFsAccessApi,y=n.autoFocus,b=n.preventDropOnDocument,w=n.noClick,A=n.noKeyboard,S=n.noDrag,C=n.noDragEventsBubbling,P=n.onError,k=n.validator,T=e.useMemo(function(){return function(t){if(gt(t))return Object.entries(t).reduce(function(t,e){var n=at(e,2),i=n[0],r=n[1];return[].concat(nt(t),[i],nt(r))},[]).filter(function(t){return wt(t)||At(t)}).join(",")}(i)},[i]),E=e.useMemo(function(){return function(t){return gt(t)?[{description:"Files",accept:Object.entries(t).filter(function(t){var e=at(t,2),n=e[0],i=e[1],r=!0;return wt(n)||(console.warn('Skipped "'.concat(n,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),r=!1),(!Array.isArray(i)||!i.every(At))&&(console.warn('Skipped "'.concat(n,'" because an invalid file extension was provided.')),r=!1),r}).reduce(function(t,e){var n=at(e,2),i=n[0],r=n[1];return rt(rt({},t),{},ot({},i,r))},{})}]:t}(i)},[i]),I=e.useMemo(function(){return"function"==typeof v?v:Bt},[v]),M=e.useMemo(function(){return"function"==typeof g?g:Bt},[g]),j=e.useRef(null),D=e.useRef(null),F=Et(e.useReducer(Nt,Lt),2),U=F[0],R=F[1],O=U.isFocused,L=U.isFileDialogActive,N=e.useRef(typeof window<"u"&&window.isSecureContext&&x&&"showOpenFilePicker"in window),B=function(){!N.current&&L&&setTimeout(function(){D.current&&(D.current.files.length||(R({type:"closeDialog"}),M()))},300)};e.useEffect(function(){return window.addEventListener("focus",B,!1),function(){window.removeEventListener("focus",B,!1)}},[D,L,M,N]);var V=e.useRef([]),q=function(t){j.current&&j.current.contains(t.target)||(t.preventDefault(),V.current=[])};e.useEffect(function(){return b&&(document.addEventListener("dragover",yt,!1),document.addEventListener("drop",q,!1)),function(){b&&(document.removeEventListener("dragover",yt),document.removeEventListener("drop",q))}},[j,b]),e.useEffect(function(){return!r&&y&&j.current&&j.current.focus(),function(){}},[j,y,r]);var z=e.useCallback(function(t){P?P(t):console.error(t)},[P]),_=e.useCallback(function(t){t.preventDefault(),t.persist(),it(t),V.current=[].concat(Tt(V.current),[t.target]),xt(t)&&Promise.resolve(o(t)).then(function(e){if(!vt(t)||C){var n=e.length,i=n>0&&function(t){var e=t.files,n=t.accept,i=t.minSize,r=t.maxSize,o=t.multiple,a=t.maxFiles,s=t.validator;return!(!o&&e.length>1||o&&a>=1&&e.length>a)&&e.every(function(t){var e=at(mt(t,n),1)[0],o=at(ht(t,i,r),1)[0],a=s?s(t):null;return e&&o&&!a})}({files:e,accept:T,minSize:s,maxSize:a,multiple:c,maxFiles:l,validator:k});R({isDragAccept:i,isDragReject:n>0&&!i,isDragActive:!0,type:"setDraggedFiles"}),p&&p(t)}}).catch(function(t){return z(t)})},[o,p,z,C,T,s,a,c,l,k]),G=e.useCallback(function(t){t.preventDefault(),t.persist(),it(t);var e=xt(t);if(e&&t.dataTransfer)try{t.dataTransfer.dropEffect="copy"}catch{}return e&&d&&d(t),!1},[d,C]),$=e.useCallback(function(t){t.preventDefault(),t.persist(),it(t);var e=V.current.filter(function(t){return j.current&&j.current.contains(t)}),n=e.indexOf(t.target);-1!==n&&e.splice(n,1),V.current=e,!(e.length>0)&&(R({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),xt(t)&&u&&u(t))},[j,u,C]),H=e.useCallback(function(t,e){var n=[],i=[];t.forEach(function(t){var e=Et(mt(t,T),2),r=e[0],o=e[1],c=Et(ht(t,s,a),2),l=c[0],p=c[1],u=k?k(t):null;if(r&&l&&!u)n.push(t);else{var d=[o,p];u&&(d=d.concat(u)),i.push({file:t,errors:d.filter(function(t){return t})})}}),(!c&&n.length>1||c&&l>=1&&n.length>l)&&(n.forEach(function(t){i.push({file:t,errors:[ft]})}),n.splice(0)),R({acceptedFiles:n,fileRejections:i,isDragReject:i.length>0,type:"setFiles"}),f&&f(n,i,e),i.length>0&&h&&h(i,e),n.length>0&&m&&m(n,e)},[R,c,T,s,a,l,f,m,h,k]),W=e.useCallback(function(t){t.preventDefault(),t.persist(),it(t),V.current=[],xt(t)&&Promise.resolve(o(t)).then(function(e){vt(t)&&!C||H(e,t)}).catch(function(t){return z(t)}),R({type:"reset"})},[o,H,z,C]),X=e.useCallback(function(){if(N.current){R({type:"openDialog"}),I();var t={multiple:c,types:E};window.showOpenFilePicker(t).then(function(t){return o(t)}).then(function(t){H(t,null),R({type:"closeDialog"})}).catch(function(t){!function(t){return t instanceof DOMException&&("AbortError"===t.name||t.code===t.ABORT_ERR)}(t)?function(t){return t instanceof DOMException&&("SecurityError"===t.name||t.code===t.SECURITY_ERR)}(t)?(N.current=!1,D.current?(D.current.value=null,D.current.click()):z(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):z(t):(M(t),R({type:"closeDialog"}))})}else D.current&&(R({type:"openDialog"}),I(),D.current.value=null,D.current.click())},[R,I,M,x,H,z,E,c]),Y=e.useCallback(function(t){!j.current||!j.current.isEqualNode(t.target)||(" "===t.key||"Enter"===t.key||32===t.keyCode||13===t.keyCode)&&(t.preventDefault(),X())},[j,X]),K=e.useCallback(function(){R({type:"focus"})},[]),Z=e.useCallback(function(){R({type:"blur"})},[]),Q=e.useCallback(function(){w||(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return function(t){return-1!==t.indexOf("MSIE")||-1!==t.indexOf("Trident/")}(t)||function(t){return-1!==t.indexOf("Edge/")}(t)}()?setTimeout(X,0):X())},[w,X]),J=function(t){return r?null:t},tt=function(t){return A?null:J(t)},et=function(t){return S?null:J(t)},it=function(t){C&&t.stopPropagation()},st=e.useMemo(function(){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.refKey,n=void 0===e?"ref":e,i=t.role,o=t.onKeyDown,a=t.onFocus,s=t.onBlur,c=t.onClick,l=t.onDragEnter,p=t.onDragOver,u=t.onDragLeave,d=t.onDrop,f=Ut(t,Pt);return Dt(Dt(Ft({onKeyDown:tt(bt(o,Y)),onFocus:tt(bt(a,K)),onBlur:tt(bt(s,Z)),onClick:J(bt(c,Q)),onDragEnter:et(bt(l,_)),onDragOver:et(bt(p,G)),onDragLeave:et(bt(u,$)),onDrop:et(bt(d,W)),role:"string"==typeof i&&""!==i?i:"presentation"},n,j),r||A?{}:{tabIndex:0}),f)}},[j,Y,K,Z,Q,_,G,$,W,A,S,r]),ct=e.useCallback(function(t){t.stopPropagation()},[]),lt=e.useMemo(function(){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.refKey,n=void 0===e?"ref":e,i=t.onChange,r=t.onClick,o=Ut(t,kt);return Dt(Dt({},Ft({accept:T,multiple:c,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:J(bt(i,W)),onClick:J(bt(r,ct)),tabIndex:-1},n,D)),o)}},[D,i,c,W,r]);return Dt(Dt({},U),{},{isFocused:O&&!r,getRootProps:st,getInputProps:lt,rootRef:j,inputRef:D,open:J(X)})}(Ut(t,St)),a=o.open,s=Ut(o,Ct);return e.useImperativeHandle(i,function(){return{open:a}},[a]),n.createElement(e.Fragment,null,r(Dt(Dt({},s),{},{open:a})))});Rt.displayName="Dropzone";var Ot={disabled:!1,getFilesFromEvent:function(t){return k(this,void 0,void 0,function*(){return G(t)&&function(t){return G(t)}(t.dataTransfer)?function(t,e){return k(this,void 0,void 0,function*(){if(t.items){const n=H(t.items).filter(t=>"file"===t.kind);if("drop"!==e)return n;return $(X(yield Promise.all(n.map(W))))}return $(H(t.files).map(t=>q(t)))})}(t.dataTransfer,t.type):function(t){return G(t)&&G(t.target)}(t)?function(t){return H(t.target.files).map(t=>q(t))}(t):Array.isArray(t)&&t.every(t=>"getFile"in t&&"function"==typeof t.getFile)?function(t){return k(this,void 0,void 0,function*(){return(yield Promise.all(t.map(t=>t.getFile()))).map(t=>q(t))})}(t):[]})},maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};Rt.defaultProps=Ot,Rt.propTypes={children:B.func,accept:B.objectOf(B.arrayOf(B.string)),multiple:B.bool,preventDropOnDocument:B.bool,noClick:B.bool,noKeyboard:B.bool,noDrag:B.bool,noDragEventsBubbling:B.bool,minSize:B.number,maxSize:B.number,maxFiles:B.number,disabled:B.bool,getFilesFromEvent:B.func,onFileDialogCancel:B.func,onFileDialogOpen:B.func,useFsAccessApi:B.bool,autoFocus:B.bool,onDragEnter:B.func,onDragLeave:B.func,onDragOver:B.func,onDrop:B.func,onDropAccepted:B.func,onDropRejected:B.func,onError:B.func,validator:B.func};var Lt={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Nt(t,e){switch(e.type){case"focus":return Dt(Dt({},t),{},{isFocused:!0});case"blur":return Dt(Dt({},t),{},{isFocused:!1});case"openDialog":return Dt(Dt({},Lt),{},{isFileDialogActive:!0});case"closeDialog":return Dt(Dt({},t),{},{isFileDialogActive:!1});case"setDraggedFiles":return Dt(Dt({},t),{},{isDragActive:e.isDragActive,isDragAccept:e.isDragAccept,isDragReject:e.isDragReject});case"setFiles":return Dt(Dt({},t),{},{acceptedFiles:e.acceptedFiles,fileRejections:e.fileRejections,isDragReject:e.isDragReject});case"reset":return Dt({},Lt);default:return t}}function Bt(){}const Vt=e.createContext({});function qt(t){const n=e.useRef(null);return null===n.current&&(n.current=t()),n.current}const zt=typeof window<"u",_t=zt?e.useLayoutEffect:e.useEffect,Gt=e.createContext(null);function $t(t,e){-1===t.indexOf(e)&&t.push(e)}function Ht(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const Wt=(t,e,n)=>n>e?e:n<t?t:n;function Xt(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}let Yt=()=>{},Kt=()=>{};"production"!=={}.NODE_ENV&&(Yt=(t,e,n)=>{!t&&typeof console<"u"&&console.warn(Xt(e,n))},Kt=(t,e,n)=>{if(!t)throw new Error(Xt(e,n))});const Zt={},Qt=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function Jt(t){return"object"==typeof t&&null!==t}const te=t=>/^0[^.\s]+$/u.test(t);function ee(t){let e;return()=>(void 0===e&&(e=t()),e)}const ne=t=>t,ie=(t,e)=>n=>e(t(n)),re=(...t)=>t.reduce(ie),oe=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i};class ae{constructor(){this.subscriptions=[]}add(t){return $t(this.subscriptions,t),()=>Ht(this.subscriptions,t)}notify(t,e,n){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](t,e,n);else for(let r=0;r<i;r++){const i=this.subscriptions[r];i&&i(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const se=t=>1e3*t,ce=t=>t/1e3;function le(t,e){return e?t*(1e3/e):0}const pe=new Set;function ue(t,e,n){t||pe.has(e)||(console.warn(Xt(e,n)),pe.add(e))}const de=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function fe(t,e,n,i){if(t===e&&n===i)return ne;const r=e=>function(t,e,n,i,r){let o,a,s=0;do{a=e+(n-e)/2,o=de(a,i,r)-t,o>0?n=a:e=a}while(Math.abs(o)>1e-7&&++s<12);return a}(e,0,1,t,n);return t=>0===t||1===t?t:de(r(t),e,i)}const me=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,he=t=>e=>1-t(1-e),ge=fe(.33,1.53,.69,.99),ve=he(ge),xe=me(ve),ye=t=>(t*=2)<1?.5*ve(t):.5*(2-Math.pow(2,-10*(t-1))),be=t=>1-Math.sin(Math.acos(t)),we=he(be),Ae=me(be),Se=fe(.42,0,1,1),Ce=fe(0,0,.58,1),Pe=fe(.42,0,.58,1),ke=t=>Array.isArray(t)&&"number"==typeof t[0],Te={linear:ne,easeIn:Se,easeInOut:Pe,easeOut:Ce,circIn:be,circInOut:Ae,circOut:we,backIn:ve,backInOut:xe,backOut:ge,anticipate:ye},Ee=t=>{if(ke(t)){Kt(4===t.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[e,n,i,r]=t;return fe(e,n,i,r)}return(t=>"string"==typeof t)(t)?(Kt(void 0!==Te[t],`Invalid easing type '${t}'`,"invalid-easing-type"),Te[t]):t},Ie=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Me(t,e){let n=!1,i=!0;const r={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,a=Ie.reduce((t,e)=>(t[e]=function(t){let e=new Set,n=new Set,i=!1,r=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function s(e){o.has(e)&&(c.schedule(e),t()),e(a)}const c={schedule:(t,r=!1,a=!1)=>{const s=a&&i?e:n;return r&&o.add(t),s.has(t)||s.add(t),t},cancel:t=>{n.delete(t),o.delete(t)},process:t=>{a=t,i?r=!0:(i=!0,[e,n]=[n,e],e.forEach(s),e.clear(),i=!1,r&&(r=!1,c.process(t)))}};return c}(o),t),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:p,update:u,preRender:d,render:f,postRender:m}=a,h=()=>{const o=Zt.useManualTiming?r.timestamp:performance.now();n=!1,Zt.useManualTiming||(r.delta=i?1e3/60:Math.max(Math.min(o-r.timestamp,40),1)),r.timestamp=o,r.isProcessing=!0,s.process(r),c.process(r),l.process(r),p.process(r),u.process(r),d.process(r),f.process(r),m.process(r),r.isProcessing=!1,n&&e&&(i=!1,t(h))};return{schedule:Ie.reduce((e,o)=>{const s=a[o];return e[o]=(e,o=!1,a=!1)=>(n||(n=!0,i=!0,r.isProcessing||t(h)),s.schedule(e,o,a)),e},{}),cancel:t=>{for(let e=0;e<Ie.length;e++)a[Ie[e]].cancel(t)},state:r,steps:a}}const{schedule:je,cancel:De,state:Fe,steps:Ue}=Me(typeof requestAnimationFrame<"u"?requestAnimationFrame:ne,!0);let Re;function Oe(){Re=void 0}const Le={now:()=>(void 0===Re&&Le.set(Fe.isProcessing||Zt.useManualTiming?Fe.timestamp:performance.now()),Re),set:t=>{Re=t,queueMicrotask(Oe)}},Ne=t=>e=>"string"==typeof e&&e.startsWith(t),Be=Ne("--"),Ve=Ne("var(--"),qe=t=>!!Ve(t)&&ze.test(t.split("/*")[0].trim()),ze=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,_e={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},Ge={..._e,transform:t=>Wt(0,1,t)},$e={..._e,default:1},He=t=>Math.round(1e5*t)/1e5,We=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const Xe=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Ye=(t,e)=>n=>!!("string"==typeof n&&Xe.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),Ke=(t,e,n)=>i=>{if("string"!=typeof i)return i;const[r,o,a,s]=i.match(We);return{[t]:parseFloat(r),[e]:parseFloat(o),[n]:parseFloat(a),alpha:void 0!==s?parseFloat(s):1}},Ze={..._e,transform:t=>Math.round((t=>Wt(0,255,t))(t))},Qe={test:Ye("rgb","red"),parse:Ke("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+Ze.transform(t)+", "+Ze.transform(e)+", "+Ze.transform(n)+", "+He(Ge.transform(i))+")"};const Je={test:Ye("#"),parse:function(t){let e="",n="",i="",r="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),r=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),r=t.substring(4,5),e+=e,n+=n,i+=i,r+=r),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:r?parseInt(r,16)/255:1}},transform:Qe.transform},tn=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),en=tn("deg"),nn=tn("%"),rn=tn("px"),on=tn("vh"),an=tn("vw"),sn={...nn,parse:t=>nn.parse(t)/100,transform:t=>nn.transform(100*t)},cn={test:Ye("hsl","hue"),parse:Ke("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+nn.transform(He(e))+", "+nn.transform(He(n))+", "+He(Ge.transform(i))+")"},ln={test:t=>Qe.test(t)||Je.test(t)||cn.test(t),parse:t=>Qe.test(t)?Qe.parse(t):cn.test(t)?cn.parse(t):Je.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?Qe.transform(t):cn.transform(t),getAnimatableNone:t=>{const e=ln.parse(t);return e.alpha=0,ln.transform(e)}},pn=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const un="number",dn="color",fn=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function mn(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},r=[];let o=0;const a=e.replace(fn,t=>(ln.test(t)?(i.color.push(o),r.push(dn),n.push(ln.parse(t))):t.startsWith("var(")?(i.var.push(o),r.push("var"),n.push(t)):(i.number.push(o),r.push(un),n.push(parseFloat(t))),++o,"${}")).split("${}");return{values:n,split:a,indexes:i,types:r}}function hn(t){return mn(t).values}function gn(t){const{split:e,types:n}=mn(t),i=e.length;return t=>{let r="";for(let o=0;o<i;o++)if(r+=e[o],void 0!==t[o]){const e=n[o];r+=e===un?He(t[o]):e===dn?ln.transform(t[o]):t[o]}return r}}const vn=t=>"number"==typeof t?0:ln.test(t)?ln.getAnimatableNone(t):t;const xn={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(We)?.length||0)+(t.match(pn)?.length||0)>0},parse:hn,createTransformer:gn,getAnimatableNone:function(t){const e=hn(t);return gn(t)(e.map(vn))}};function yn(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function bn(t,e){return n=>n>0?e:t}const wn=(t,e,n)=>t+(e-t)*n,An=(t,e,n)=>{const i=t*t,r=n*(e*e-i)+i;return r<0?0:Math.sqrt(r)},Sn=[Je,Qe,cn];function Cn(t){const e=(t=>Sn.find(e=>e.test(t)))(t);if(Yt(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!e)return!1;let n=e.parse(t);return e===cn&&(n=function({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let r=0,o=0,a=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,s=2*n-i;r=yn(s,i,t+1/3),o=yn(s,i,t),a=yn(s,i,t-1/3)}else r=o=a=n;return{red:Math.round(255*r),green:Math.round(255*o),blue:Math.round(255*a),alpha:i}}(n)),n}const Pn=(t,e)=>{const n=Cn(t),i=Cn(e);if(!n||!i)return bn(t,e);const r={...n};return t=>(r.red=An(n.red,i.red,t),r.green=An(n.green,i.green,t),r.blue=An(n.blue,i.blue,t),r.alpha=wn(n.alpha,i.alpha,t),Qe.transform(r))},kn=new Set(["none","hidden"]);function Tn(t,e){return n=>wn(t,e,n)}function En(t){return"number"==typeof t?Tn:"string"==typeof t?qe(t)?bn:ln.test(t)?Pn:jn:Array.isArray(t)?In:"object"==typeof t?ln.test(t)?Pn:Mn:bn}function In(t,e){const n=[...t],i=n.length,r=t.map((t,n)=>En(t)(t,e[n]));return t=>{for(let e=0;e<i;e++)n[e]=r[e](t);return n}}function Mn(t,e){const n={...t,...e},i={};for(const r in n)void 0!==t[r]&&void 0!==e[r]&&(i[r]=En(t[r])(t[r],e[r]));return t=>{for(const e in i)n[e]=i[e](t);return n}}const jn=(t,e)=>{const n=xn.createTransformer(e),i=mn(t),r=mn(e);return i.indexes.var.length===r.indexes.var.length&&i.indexes.color.length===r.indexes.color.length&&i.indexes.number.length>=r.indexes.number.length?kn.has(t)&&!r.values.length||kn.has(e)&&!i.values.length?function(t,e){return kn.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):re(In(function(t,e){const n=[],i={color:0,var:0,number:0};for(let r=0;r<e.values.length;r++){const o=e.types[r],a=t.indexes[o][i[o]],s=t.values[a]??0;n[r]=s,i[o]++}return n}(i,r),r.values),n):(Yt(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),bn(t,e))};function Dn(t,e,n){return"number"==typeof t&&"number"==typeof e&&"number"==typeof n?wn(t,e,n):En(t)(t,e)}const Fn=t=>{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>je.update(e,t),stop:()=>De(e),now:()=>Fe.isProcessing?Fe.timestamp:Le.now()}},Un=(t,e,n=10)=>{let i="";const r=Math.max(Math.round(e/n),2);for(let e=0;e<r;e++)i+=Math.round(1e4*t(e/(r-1)))/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},Rn=2e4;function On(t){let e=0;let n=t.next(e);for(;!n.done&&e<Rn;)e+=50,n=t.next(e);return e>=Rn?1/0:e}function Ln(t,e,n){const i=Math.max(e-5,0);return le(n-t(i),e-i)}const Nn=100,Bn=10,Vn=1,qn=0,zn=800,_n=.3,Gn=.3,$n={granular:.01,default:2},Hn={granular:.005,default:.5},Wn=.01,Xn=10,Yn=.05,Kn=1,Zn=.001;function Qn({duration:t=zn,bounce:e=_n,velocity:n=qn,mass:i=Vn}){let r,o;Yt(t<=se(Xn),"Spring duration must be 10 seconds or less","spring-duration-limit");let a=1-e;a=Wt(Yn,Kn,a),t=Wt(Wn,Xn,ce(t)),a<1?(r=e=>{const i=e*a,r=i*t,o=i-n,s=ti(e,a),c=Math.exp(-r);return Zn-o/s*c},o=e=>{const i=e*a*t,o=i*n+n,s=Math.pow(a,2)*Math.pow(e,2)*t,c=Math.exp(-i),l=ti(Math.pow(e,2),a);return(-r(e)+Zn>0?-1:1)*((o-s)*c)/l}):(r=e=>Math.exp(-e*t)*((e-n)*t+1)-Zn,o=e=>Math.exp(-e*t)*(t*t*(n-e)));const s=function(t,e,n){let i=n;for(let n=1;n<Jn;n++)i-=t(i)/e(i);return i}(r,o,5/t);if(t=se(t),isNaN(s))return{stiffness:Nn,damping:Bn,duration:t};{const e=Math.pow(s,2)*i;return{stiffness:e,damping:2*a*Math.sqrt(i*e),duration:t}}}const Jn=12;function ti(t,e){return t*Math.sqrt(1-e*e)}const ei=["duration","bounce"],ni=["stiffness","damping","mass"];function ii(t,e){return e.some(e=>void 0!==t[e])}function ri(t=Gn,e=_n){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:i,restDelta:r}=n;const o=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],s={done:!1,value:o},{stiffness:c,damping:l,mass:p,duration:u,velocity:d,isResolvedFromDuration:f}=function(t){let e={velocity:qn,stiffness:Nn,damping:Bn,mass:Vn,isResolvedFromDuration:!1,...t};if(!ii(t,ni)&&ii(t,ei))if(t.visualDuration){const n=t.visualDuration,i=2*Math.PI/(1.2*n),r=i*i,o=2*Wt(.05,1,1-(t.bounce||0))*Math.sqrt(r);e={...e,mass:Vn,stiffness:r,damping:o}}else{const n=Qn(t);e={...e,...n,mass:Vn},e.isResolvedFromDuration=!0}return e}({...n,velocity:-ce(n.velocity||0)}),m=d||0,h=l/(2*Math.sqrt(c*p)),g=a-o,v=ce(Math.sqrt(c/p)),x=Math.abs(g)<5;let y;if(i||(i=x?$n.granular:$n.default),r||(r=x?Hn.granular:Hn.default),h<1){const t=ti(v,h);y=e=>{const n=Math.exp(-h*v*e);return a-n*((m+h*v*g)/t*Math.sin(t*e)+g*Math.cos(t*e))}}else if(1===h)y=t=>a-Math.exp(-v*t)*(g+(m+v*g)*t);else{const t=v*Math.sqrt(h*h-1);y=e=>{const n=Math.exp(-h*v*e),i=Math.min(t*e,300);return a-n*((m+h*v*g)*Math.sinh(i)+t*g*Math.cosh(i))/t}}const b={calculatedDuration:f&&u||null,next:t=>{const e=y(t);if(f)s.done=t>=u;else{let n=0===t?m:0;h<1&&(n=0===t?se(m):Ln(y,t,e));const o=Math.abs(n)<=i,c=Math.abs(a-e)<=r;s.done=o&&c}return s.value=s.done?a:e,s},toString:()=>{const t=Math.min(On(b),Rn),e=Un(e=>b.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return b}function oi({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:r=10,bounceStiffness:o=500,modifyTarget:a,min:s,max:c,restDelta:l=.5,restSpeed:p}){const u=t[0],d={done:!1,value:u},f=t=>void 0===s?c:void 0===c||Math.abs(s-t)<Math.abs(c-t)?s:c;let m=n*e;const h=u+m,g=void 0===a?h:a(h);g!==h&&(m=g-u);const v=t=>-m*Math.exp(-t/i),x=t=>g+v(t),y=t=>{const e=v(t),n=x(t);d.done=Math.abs(e)<=l,d.value=d.done?g:n};let b,w;const A=t=>{(t=>void 0!==s&&t<s||void 0!==c&&t>c)(d.value)&&(b=t,w=ri({keyframes:[d.value,f(d.value)],velocity:Ln(x,t,d.value),damping:r,stiffness:o,restDelta:l,restSpeed:p}))};return A(0),{calculatedDuration:null,next:t=>{let e=!1;return!w&&void 0===b&&(e=!0,y(t),A(t)),void 0!==b&&t>=b?w.next(t-b):(!e&&y(t),d)}}}function ai(t,e,{clamp:n=!0,ease:i,mixer:r}={}){const o=t.length;if(Kt(o===e.length,"Both input and output ranges must be the same length","range-length"),1===o)return()=>e[0];if(2===o&&e[0]===e[1])return()=>e[1];const a=t[0]===t[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const s=function(t,e,n){const i=[],r=n||Zt.mix||Dn,o=t.length-1;for(let n=0;n<o;n++){let o=r(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]||ne:e;o=re(t,o)}i.push(o)}return i}(e,i,r),c=s.length,l=n=>{if(a&&n<t[0])return e[0];let i=0;if(c>1)for(;i<t.length-2&&!(n<t[i+1]);i++);const r=oe(t[i],t[i+1],n);return s[i](r)};return n?e=>l(Wt(t[0],t[o-1],e)):l}function si(t){const e=[0];return function(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const r=oe(0,e,i);t.push(wn(n,1,r))}}(e,t.length-1),e}function ci(t,e){return t.map(()=>e||Pe).splice(0,t.length-1)}function li({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const r=(t=>Array.isArray(t)&&"number"!=typeof t[0])(i)?i.map(Ee):Ee(i),o={done:!1,value:e[0]},a=function(t,e){return t.map(t=>t*e)}(n&&n.length===e.length?n:si(e),t),s=ai(a,e,{ease:Array.isArray(r)?r:ci(e,r)});return{calculatedDuration:t,next:e=>(o.value=s(e),o.done=e>=t,o)}}ri.applyToOptions=t=>{const e=function(t,e=100,n){const i=n({...t,keyframes:[0,e]}),r=Math.min(On(i),Rn);return{type:"keyframes",ease:t=>i.next(r*t).value/e,duration:ce(r)}}(t,100,ri);return t.ease=e.ease,t.duration=se(e.duration),t.type="keyframes",t};const pi=t=>null!==t;function ui(t,{repeat:e,repeatType:n="loop"},i,r=1){const o=t.filter(pi),a=r<0||e&&"loop"!==n&&e%2==1?0:o.length-1;return a&&void 0!==i?i:o[a]}const di={decay:oi,inertia:oi,tween:li,keyframes:li,spring:ri};function fi(t){"string"==typeof t.type&&(t.type=di[t.type])}class mi{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}var hi={};const gi=t=>t/100;class vi extends mi{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==Le.now()&&this.tick(Le.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause()}initAnimation(){const{options:t}=this;fi(t);const{type:e=li,repeat:n=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=t;let{keyframes:a}=t;const s=e||li;"production"!==hi.NODE_ENV&&s!==li&&Kt(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),s!==li&&"number"!=typeof a[0]&&(this.mixKeyframes=re(gi,Dn(a[0],a[1])),a=[0,100]);const c=s({...t,keyframes:a});"mirror"===r&&(this.mirroredGenerator=s({...t,keyframes:[...a].reverse(),velocity:-o})),null===c.calculatedDuration&&(c.calculatedDuration=On(c));const{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+i,this.totalDuration=this.resolvedDuration*(n+1)-i,this.generator=c}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){const{generator:n,totalDuration:i,mixKeyframes:r,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:s}=this;if(null===this.startTime)return n.next(0);const{delay:c=0,keyframes:l,repeat:p,repeatType:u,repeatDelay:d,type:f,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);const g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?g<0:g>i;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=i);let x=this.currentTime,y=n;if(p){const t=Math.min(this.currentTime,i)/a;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,p+1),!!(e%2)&&("reverse"===u?(n=1-n,d&&(n-=d/a)):"mirror"===u&&(y=o)),x=Wt(0,1,n)*a}const b=v?{done:!1,value:l[0]}:y.next(x);r&&(b.value=r(b.value));let{done:w}=b;!v&&null!==s&&(w=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const A=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return A&&f!==oi&&(b.value=ui(l,this.options,h,this.speed)),m&&m(b.value),A&&this.finish(),b}then(t,e){return this.finished.then(t,e)}get duration(){return ce(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ce(t)}get time(){return ce(this.currentTime)}set time(t){t=se(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Le.now());const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=ce(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Fn,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=e??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Le.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}const xi=t=>180*t/Math.PI,yi=t=>{const e=xi(Math.atan2(t[1],t[0]));return wi(e)},bi={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:yi,rotateZ:yi,skewX:t=>xi(Math.atan(t[1])),skewY:t=>xi(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},wi=t=>((t%=360)<0&&(t+=360),t),Ai=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Si=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Ci={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Ai,scaleY:Si,scale:t=>(Ai(t)+Si(t))/2,rotateX:t=>wi(xi(Math.atan2(t[6],t[5]))),rotateY:t=>wi(xi(Math.atan2(-t[2],t[0]))),rotateZ:yi,rotate:yi,skewX:t=>xi(Math.atan(t[4])),skewY:t=>xi(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Pi(t){return t.includes("scale")?1:0}function ki(t,e){if(!t||"none"===t)return Pi(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,r;if(n)i=Ci,r=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=bi,r=e}if(!r)return Pi(e);const o=i[e],a=r[1].split(",").map(Ti);return"function"==typeof o?o(a):a[o]}function Ti(t){return parseFloat(t.trim())}const Ei=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ii=new Set(Ei),Mi=t=>t===_e||t===rn,ji=new Set(["x","y","z"]),Di=Ei.filter(t=>!ji.has(t));const Fi={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>ki(e,"x"),y:(t,{transform:e})=>ki(e,"y")};Fi.translateX=Fi.x,Fi.translateY=Fi.y;const Ui=new Set;let Ri=!1,Oi=!1,Li=!1;function Ni(){if(Oi){const t=Array.from(Ui).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),n=new Map;e.forEach(t=>{const e=function(t){const e=[];return Di.forEach(n=>{const i=t.getValue(n);void 0!==i&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),e}(t);e.length&&(n.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=n.get(t);e&&e.forEach(([e,n])=>{t.getValue(e)?.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}Oi=!1,Ri=!1,Ui.forEach(t=>t.complete(Li)),Ui.clear()}function Bi(){Ui.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Oi=!0)})}class Vi{constructor(t,e,n,i,r,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=i,this.element=r,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Ui.add(this),Ri||(Ri=!0,je.read(Bi),je.resolveKeyframes(Ni))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:i}=this;if(null===t[0]){const r=i?.get(),o=t[t.length-1];if(void 0!==r)t[0]=r;else if(n&&e){const i=n.readValue(e,o);null!=i&&(t[0]=i)}void 0===t[0]&&(t[0]=o),i&&void 0===r&&i.set(t[0])}!function(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Ui.delete(this)}cancel(){"scheduled"===this.state&&(Ui.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const qi=ee(()=>void 0!==window.ScrollTimeline),zi={};function _i(t,e){const n=ee(t);return()=>zi[e]??n()}const Gi=_i(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),$i=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,Hi={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:$i([0,.65,.55,1]),circOut:$i([.55,0,1,.45]),backIn:$i([.31,.01,.66,-.59]),backOut:$i([.33,1.53,.69,.99])};function Wi(t,e){if(t)return"function"==typeof t?Gi()?Un(t,e):"ease-out":ke(t)?$i(t):Array.isArray(t)?t.map(t=>Wi(t,e)||Hi.easeOut):Hi[t]}function Xi(t,e,n,{delay:i=0,duration:r=300,repeat:o=0,repeatType:a="loop",ease:s="easeOut",times:c}={},l=void 0){const p={[e]:n};c&&(p.offset=c);const u=Wi(s,r);Array.isArray(u)&&(p.easing=u);const d={delay:i,duration:r,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:o+1,direction:"reverse"===a?"alternate":"normal"};return l&&(d.pseudoElement=l),t.animate(p,d)}function Yi(t){return"function"==typeof t&&"applyToOptions"in t}class Ki extends mi{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:e,name:n,keyframes:i,pseudoElement:r,allowFlatten:o=!1,finalKeyframe:a,onComplete:s}=t;this.isPseudoElement=!!r,this.allowFlatten=o,this.options=t,Kt("string"!=typeof t.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const c=function({type:t,...e}){return Yi(t)&&Gi()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}(t);this.animation=Xi(e,n,i,c,r),!1===c.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const t=ui(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(t):function(t,e,n){(t=>t.startsWith("--"))(e)?t.style.setProperty(e,n):t.style[e]=n}(e,n,t),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;"idle"===t||"finished"===t||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return ce(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ce(t)}get time(){return ce(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=se(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:e}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&qi()?(this.animation.timeline=t,ne):e(this)}}const Zi={anticipate:ye,backInOut:xe,circInOut:Ae};function Qi(t){"string"==typeof t.ease&&function(t){return t in Zi}(t.ease)&&(t.ease=Zi[t.ease])}class Ji extends Ki{constructor(t){Qi(t),fi(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:e,onUpdate:n,onComplete:i,element:r,...o}=this.options;if(!e)return;if(void 0!==t)return void e.set(t);const a=new vi({...o,autoplay:!1}),s=se(this.finishedTime??this.time);e.setWithVelocity(a.sample(s-10).value,a.sample(s).value,10),a.stop()}}const tr=(t,e)=>"zIndex"!==e&&!("number"!=typeof t&&!Array.isArray(t)&&("string"!=typeof t||!xn.test(t)&&"0"!==t||t.startsWith("url(")));function er(t){t.duration=0,t.type="keyframes"}const nr=new Set(["opacity","clipPath","filter","transform"]),ir=ee(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class rr extends mi{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",keyframes:a,name:s,motionValue:c,element:l,...p}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Le.now();const u={autoplay:t,delay:e,type:n,repeat:i,repeatDelay:r,repeatType:o,name:s,motionValue:c,element:l,...p},d=l?.KeyframeResolver||Vi;this.keyframeResolver=new d(a,(t,e,n)=>this.onKeyframesResolved(t,e,u,!n),s,c,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,e,n,i){this.keyframeResolver=void 0;const{name:r,type:o,velocity:a,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=Le.now(),function(t,e,n,i){const r=t[0];if(null===r)return!1;if("display"===e||"visibility"===e)return!0;const o=t[t.length-1],a=tr(r,e),s=tr(o,e);return Yt(a===s,`You are trying to animate ${e} from "${r}" to "${o}". "${a?o:r}" is not an animatable value.`,"value-not-animatable"),!(!a||!s)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}(t)||("spring"===n||Yi(n))&&i)}(t,r,o,a)||((Zt.instantAnimations||!s)&&l?.(ui(t,n,e)),t[0]=t[t.length-1],er(n),n.repeat=0);const p={startTime:i?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:e,...n,keyframes:t},u=!c&&function(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:r,damping:o,type:a}=t;if(!(e?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:s,transformTemplate:c}=e.owner.getProps();return ir()&&n&&nr.has(n)&&("transform"!==n||!c)&&!s&&!i&&"mirror"!==r&&0!==o&&"inertia"!==a}(p)?new Ji({...p,element:p.motionValue.owner.current}):new vi(p);u.finished.then(()=>this.notifyFinished()).catch(ne),this.pendingTimeline&&(this.stopTimeline=u.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=u}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Li=!0,Bi(),Ni(),Li=!1),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const or=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ar(t,e,n=1){Kt(n<=4,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[i,r]=function(t){const e=or.exec(t);if(!e)return[,];const[,n,i,r]=e;return[`--${n??i}`,r]}(t);if(!i)return;const o=window.getComputedStyle(e).getPropertyValue(i);if(o){const t=o.trim();return Qt(t)?parseFloat(t):t}return qe(r)?ar(r,e,n+1):r}function sr(t,e){return t?.[e]??t?.default??t}const cr=new Set(["width","height","top","left","right","bottom",...Ei]),lr=t=>e=>e.test(t),pr=[_e,rn,nn,en,an,on,{test:t=>"auto"===t,parse:t=>t}],ur=t=>pr.find(lr(t));function dr(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||te(t))}const fr=new Set(["brightness","contrast","saturate","opacity"]);function mr(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(We)||[];if(!i)return t;const r=n.replace(i,"");let o=fr.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+r+")"}const hr=/\b([a-z-]*)\(.*?\)/gu,gr={...xn,getAnimatableNone:t=>{const e=t.match(hr);return e?e.map(mr).join(" "):t}},vr={..._e,transform:Math.round},xr={borderWidth:rn,borderTopWidth:rn,borderRightWidth:rn,borderBottomWidth:rn,borderLeftWidth:rn,borderRadius:rn,radius:rn,borderTopLeftRadius:rn,borderTopRightRadius:rn,borderBottomRightRadius:rn,borderBottomLeftRadius:rn,width:rn,maxWidth:rn,height:rn,maxHeight:rn,top:rn,right:rn,bottom:rn,left:rn,padding:rn,paddingTop:rn,paddingRight:rn,paddingBottom:rn,paddingLeft:rn,margin:rn,marginTop:rn,marginRight:rn,marginBottom:rn,marginLeft:rn,backgroundPositionX:rn,backgroundPositionY:rn,...{rotate:en,rotateX:en,rotateY:en,rotateZ:en,scale:$e,scaleX:$e,scaleY:$e,scaleZ:$e,skew:en,skewX:en,skewY:en,distance:rn,translateX:rn,translateY:rn,translateZ:rn,x:rn,y:rn,z:rn,perspective:rn,transformPerspective:rn,opacity:Ge,originX:sn,originY:sn,originZ:rn},zIndex:vr,fillOpacity:Ge,strokeOpacity:Ge,numOctaves:vr},yr={...xr,color:ln,backgroundColor:ln,outlineColor:ln,fill:ln,stroke:ln,borderColor:ln,borderTopColor:ln,borderRightColor:ln,borderBottomColor:ln,borderLeftColor:ln,filter:gr,WebkitFilter:gr},br=t=>yr[t];function wr(t,e){let n=br(t);return n!==gr&&(n=xn),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Ar=new Set(["auto","none","0"]);class Sr extends Vi{constructor(t,e,n,i,r){super(t,e,n,i,r,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let n=0;n<t.length;n++){let i=t[n];if("string"==typeof i&&(i=i.trim(),qe(i))){const r=ar(i,e.current);void 0!==r&&(t[n]=r),n===t.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!cr.has(n)||2!==t.length)return;const[i,r]=t,o=ur(i),a=ur(r);if(o!==a)if(Mi(o)&&Mi(a))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else Fi[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)(null===t[e]||dr(t[e]))&&n.push(e);n.length&&function(t,e,n){let i,r=0;for(;r<t.length&&!i;){const e=t[r];"string"==typeof e&&!Ar.has(e)&&mn(e).values.length&&(i=t[r]),r++}if(i&&n)for(const r of e)t[r]=wr(n,i)}(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t||!t.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Fi[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const i=e[e.length-1];void 0!==i&&t.getValue(n,i).jump(i,!1)}measureEndState(){const{element:t,name:e,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const i=t.getValue(e);i&&i.jump(this.measuredOrigin,!1);const r=n.length-1,o=n[r];n[r]=Fi[e](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==o&&void 0===this.finalKeyframe&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([e,n])=>{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}}const Cr=(t,e)=>e&&"number"==typeof t?e.transform(t):t;function Pr(t){return Jt(t)&&"offsetHeight"in t}var kr={};class Tr{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{const e=Le.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=Le.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return"production"!==kr.NODE_ENV&&ue(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new ae);const n=this.events[t].add(e);return"change"===t?()=>{n(),je.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Le.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return le(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Er(t,e){return new Tr(t,e)}const{schedule:Ir}=Me(queueMicrotask,!1),Mr={x:!1,y:!1};function jr(){return Mr.x||Mr.y}function Dr(t,e){const n=function(t,e,n){if(t instanceof EventTarget)return[t];if("string"==typeof t){let e=document;const i=n?.[t]??e.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},()=>i.abort()]}function Fr(t){return!("touch"===t.pointerType||jr())}const Ur=(t,e)=>!!e&&(t===e||Ur(t,e.parentElement)),Rr=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,Or=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const Lr=new WeakSet;function Nr(t){return e=>{"Enter"===e.key&&t(e)}}function Br(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function Vr(t){return Rr(t)&&!jr()}function qr(t,e,n={}){const[i,r,o]=Dr(t,n),a=t=>{const i=t.currentTarget;if(!Vr(t))return;Lr.add(i);const o=e(i,t),a=(t,e)=>{window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",c),Lr.has(i)&&Lr.delete(i),Vr(t)&&"function"==typeof o&&o(t,{success:e})},s=t=>{a(t,i===window||i===document||n.useGlobalTarget||Ur(i,t.target))},c=t=>{a(t,!1)};window.addEventListener("pointerup",s,r),window.addEventListener("pointercancel",c,r)};return i.forEach(t=>{(n.useGlobalTarget?window:t).addEventListener("pointerdown",a,r),Pr(t)&&(t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const i=Nr(()=>{if(Lr.has(n))return;Br(n,"down");const t=Nr(()=>{Br(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>Br(n,"cancel"),e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)})(t,r)),!function(t){return Or.has(t.tagName)||-1!==t.tabIndex}(t)&&!t.hasAttribute("tabindex")&&(t.tabIndex=0))}),o}function zr(t){return Jt(t)&&"ownerSVGElement"in t}const _r=t=>!(!t||!t.getVelocity),Gr=[...pr,ln,xn],$r=e.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function Hr(t,e){if("function"==typeof t)return t(e);null!=t&&(t.current=e)}function Wr(...t){return e.useCallback(function(...t){return e=>{let n=!1;const i=t.map(t=>{const i=Hr(t,e);return!n&&"function"==typeof i&&(n=!0),i});if(n)return()=>{for(let e=0;e<i.length;e++){const n=i[e];"function"==typeof n?n():Hr(t[e],null)}}}}(...t),t)}class Xr extends e.Component{getSnapshotBeforeUpdate(t){const e=this.props.childRef.current;if(e&&t.isPresent&&!this.props.isPresent){const t=e.offsetParent,n=Pr(t)&&t.offsetWidth||0,i=this.props.sizeRef.current;i.height=e.offsetHeight||0,i.width=e.offsetWidth||0,i.top=e.offsetTop,i.left=e.offsetLeft,i.right=n-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function Yr({children:t,isPresent:n,anchorX:r,root:o}){const a=e.useId(),s=e.useRef(null),c=e.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:l}=e.useContext($r),p=Wr(s,t?.ref);return e.useInsertionEffect(()=>{const{width:t,height:e,top:i,left:p,right:u}=c.current;if(n||!s.current||!t||!e)return;const d="left"===r?`left: ${p}`:`right: ${u}`;s.current.dataset.motionPopId=a;const f=document.createElement("style");l&&(f.nonce=l);const m=o??document.head;return m.appendChild(f),f.sheet&&f.sheet.insertRule(`\n [data-motion-pop-id="${a}"] {\n position: absolute !important;\n width: ${t}px !important;\n height: ${e}px !important;\n ${d}px !important;\n top: ${i}px !important;\n }\n `),()=>{m.contains(f)&&m.removeChild(f)}},[n]),i.jsx(Xr,{isPresent:n,childRef:s,sizeRef:c,children:e.cloneElement(t,{ref:p})})}const Kr=({children:t,initial:n,isPresent:r,onExitComplete:o,custom:a,presenceAffectsLayout:s,mode:c,anchorX:l,root:p})=>{const u=qt(Zr),d=e.useId();let f=!0,m=e.useMemo(()=>(f=!1,{id:d,initial:n,isPresent:r,custom:a,onExitComplete:t=>{u.set(t,!0);for(const t of u.values())if(!t)return;o&&o()},register:t=>(u.set(t,!1),()=>u.delete(t))}),[r,u,o]);return s&&f&&(m={...m}),e.useMemo(()=>{u.forEach((t,e)=>u.set(e,!1))},[r]),e.useEffect(()=>{!r&&!u.size&&o&&o()},[r]),"popLayout"===c&&(t=i.jsx(Yr,{isPresent:r,anchorX:l,root:p,children:t})),i.jsx(Gt.Provider,{value:m,children:t})};function Zr(){return new Map}function Qr(t=!0){const n=e.useContext(Gt);if(null===n)return[!0,null];const{isPresent:i,onExitComplete:r,register:o}=n,a=e.useId();e.useEffect(()=>{if(t)return o(a)},[t]);const s=e.useCallback(()=>t&&r&&r(a),[a,r,t]);return!i&&r?[!1,s]:[!0]}const Jr=t=>t.key||"";function to(t){const n=[];return e.Children.forEach(t,t=>{e.isValidElement(t)&&n.push(t)}),n}var eo={};const no=({children:t,custom:n,initial:r=!0,onExitComplete:o,presenceAffectsLayout:a=!0,mode:s="sync",propagate:c=!1,anchorX:l="left",root:p})=>{const[u,d]=Qr(c),f=e.useMemo(()=>to(t),[t]),m=c&&!u?[]:f.map(Jr),h=e.useRef(!0),g=e.useRef(f),v=qt(()=>new Map),[x,y]=e.useState(f),[b,w]=e.useState(f);_t(()=>{h.current=!1,g.current=f;for(let t=0;t<b.length;t++){const e=Jr(b[t]);m.includes(e)?v.delete(e):!0!==v.get(e)&&v.set(e,!1)}},[b,m.length,m.join("-")]);const A=[];if(f!==x){let t=[...f];for(let e=0;e<b.length;e++){const n=b[e],i=Jr(n);m.includes(i)||(t.splice(e,0,n),A.push(n))}return"wait"===s&&A.length&&(t=A),w(to(t)),y(f),null}"production"!==eo.NODE_ENV&&"wait"===s&&b.length>1&&console.warn('You\'re attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.');const{forceRender:S}=e.useContext(Vt);return i.jsx(i.Fragment,{children:b.map(t=>{const e=Jr(t),x=!(c&&!u)&&(f===b||m.includes(e));return i.jsx(Kr,{isPresent:x,initial:!(h.current&&!r)&&void 0,custom:n,presenceAffectsLayout:a,mode:s,root:p,onExitComplete:x?void 0:()=>{if(!v.has(e))return;v.set(e,!0);let t=!0;v.forEach(e=>{e||(t=!1)}),t&&(S?.(),w(g.current),c&&d?.(),o&&o())},anchorX:l,children:t},e)})})},io=e.createContext({strict:!1}),ro={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},oo={};for(const t in ro)oo[t]={isEnabled:e=>ro[t].some(t=>!!e[t])};const ao=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function so(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||ao.has(t)}let co=t=>!so(t);try{"function"==typeof(lo=require("@emotion/is-prop-valid").default)&&(co=t=>t.startsWith("on")?!so(t):lo(t))}catch{}var lo;const po=e.createContext({});function uo(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function fo(t){return"string"==typeof t||Array.isArray(t)}const mo=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ho=["initial",...mo];function go(t){return uo(t.animate)||ho.some(e=>fo(t[e]))}function vo(t){return!(!go(t)&&!t.variants)}function xo(t){const{initial:n,animate:i}=function(t,e){if(go(t)){const{initial:e,animate:n}=t;return{initial:!1===e||fo(e)?e:void 0,animate:fo(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,e.useContext(po));return e.useMemo(()=>({initial:n,animate:i}),[yo(n),yo(i)])}function yo(t){return Array.isArray(t)?t.join(" "):t}const bo={};function wo(t,{layout:e,layoutId:n}){return Ii.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!bo[t]||"opacity"===t)}const Ao={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},So=Ei.length;function Co(t,e,n){const{style:i,vars:r,transformOrigin:o}=t;let a=!1,s=!1;for(const t in e){const n=e[t];if(Ii.has(t))a=!0;else if(Be(t))r[t]=n;else{const e=Cr(n,xr[t]);t.startsWith("origin")?(s=!0,o[t]=e):i[t]=e}}if(e.transform||(a||n?i.transform=function(t,e,n){let i="",r=!0;for(let o=0;o<So;o++){const a=Ei[o],s=t[a];if(void 0===s)continue;let c=!0;if(c="number"==typeof s?s===(a.startsWith("scale")?1:0):0===parseFloat(s),!c||n){const t=Cr(s,xr[a]);c||(r=!1,i+=`${Ao[a]||a}(${t}) `),n&&(e[a]=t)}}return i=i.trim(),n?i=n(e,r?"":i):r&&(i="none"),i}(e,t.transform,n):i.transform&&(i.transform="none")),s){const{originX:t="50%",originY:e="50%",originZ:n=0}=o;i.transformOrigin=`${t} ${e} ${n}`}}const Po=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ko(t,e,n){for(const i in e)!_r(e[i])&&!wo(i,n)&&(t[i]=e[i])}function To(t,n){const i={};return ko(i,t.style||{},t),Object.assign(i,function({transformTemplate:t},n){return e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{}};return Co(e,n,t),Object.assign({},e.vars,e.style)},[n])}(t,n)),i}function Eo(t,e){const n={},i=To(t,e);return t.drag&&!1!==t.dragListener&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=i,n}const Io={offset:"stroke-dashoffset",array:"stroke-dasharray"},Mo={offset:"strokeDashoffset",array:"strokeDasharray"};function jo(t,{attrX:e,attrY:n,attrScale:i,pathLength:r,pathSpacing:o=1,pathOffset:a=0,...s},c,l,p){if(Co(t,s,l),c)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:u,style:d}=t;u.transform&&(d.transform=u.transform,delete u.transform),(d.transform||u.transformOrigin)&&(d.transformOrigin=u.transformOrigin??"50% 50%",delete u.transformOrigin),d.transform&&(d.transformBox=p?.transformBox??"fill-box",delete u.transformBox),void 0!==e&&(u.x=e),void 0!==n&&(u.y=n),void 0!==i&&(u.scale=i),void 0!==r&&function(t,e,n=1,i=0,r=!0){t.pathLength=1;const o=r?Io:Mo;t[o.offset]=rn.transform(-i);const a=rn.transform(e),s=rn.transform(n);t[o.array]=`${a} ${s}`}(u,r,o,a,!1)}const Do=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}}),Fo=t=>"string"==typeof t&&"svg"===t.toLowerCase();function Uo(t,n,i,r){const o=e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return jo(e,n,Fo(r),t.transformTemplate,t.style),{...e.attrs,style:{...e.style}}},[n]);if(t.style){const e={};ko(e,t.style,t),o.style={...e,...o.style}}return o}const Ro=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Oo(t){return"string"==typeof t&&!t.includes("-")&&!!(Ro.indexOf(t)>-1||/[A-Z]/u.test(t))}function Lo(t,n,i,{latestValues:r},o,a=!1){const s=(Oo(t)?Uo:Eo)(n,r,o,t),c=function(t,e,n){const i={};for(const r in t)"values"===r&&"object"==typeof t.values||(co(r)||!0===n&&so(r)||!e&&!so(r)||t.draggable&&r.startsWith("onDrag"))&&(i[r]=t[r]);return i}(n,"string"==typeof t,a),l=t!==e.Fragment?{...c,...s,ref:i}:{},{children:p}=n,u=e.useMemo(()=>_r(p)?p.get():p,[p]);return e.createElement(t,{...l,children:u})}function No(t){const e=[{},{}];return t?.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function Bo(t,e,n,i){if("function"==typeof e){const[r,o]=No(i);e=e(void 0!==n?n:t.custom,r,o)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[r,o]=No(i);e=e(void 0!==n?n:t.custom,r,o)}return e}function Vo(t){return _r(t)?t.get():t}function qo(t,e,n,i){const r={},o=i(t,{});for(const t in o)r[t]=Vo(o[t]);let{initial:a,animate:s}=t;const c=go(t),l=vo(t);e&&l&&!c&&!1!==t.inherit&&(void 0===a&&(a=e.initial),void 0===s&&(s=e.animate));let p=!!n&&!1===n.initial;p=p||!1===a;const u=p?s:a;if(u&&"boolean"!=typeof u&&!uo(u)){const e=Array.isArray(u)?u:[u];for(let n=0;n<e.length;n++){const i=Bo(t,e[n]);if(i){const{transitionEnd:t,transition:e,...n}=i;for(const t in n){let e=n[t];if(Array.isArray(e)){e=e[p?e.length-1:0]}null!==e&&(r[t]=e)}for(const e in t)r[e]=t[e]}}}return r}const zo=t=>(n,i)=>{const r=e.useContext(po),o=e.useContext(Gt),a=()=>function({scrapeMotionValuesFromProps:t,createRenderState:e},n,i,r){return{latestValues:qo(n,i,r,t),renderState:e()}}(t,n,r,o);return i?a():qt(a)};function _o(t,e,n){const{style:i}=t,r={};for(const o in i)(_r(i[o])||e.style&&_r(e.style[o])||wo(o,t)||void 0!==n?.getValue(o)?.liveStyle)&&(r[o]=i[o]);return r}const Go=zo({scrapeMotionValuesFromProps:_o,createRenderState:Po});function $o(t,e,n){const i=_o(t,e,n);for(const n in t)if(_r(t[n])||_r(e[n])){i[-1!==Ei.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return i}const Ho=zo({scrapeMotionValuesFromProps:$o,createRenderState:Do}),Wo=Symbol.for("motionComponentSymbol");function Xo(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function Yo(t,n,i){return e.useCallback(e=>{e&&t.onMount&&t.onMount(e),n&&(e?n.mount(e):n.unmount()),i&&("function"==typeof i?i(e):Xo(i)&&(i.current=e))},[n])}const Ko=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Zo="data-"+Ko("framerAppearId"),Qo=e.createContext({});function Jo(t,n,i,r,o){const{visualElement:a}=e.useContext(po),s=e.useContext(io),c=e.useContext(Gt),l=e.useContext($r).reducedMotion,p=e.useRef(null);r=r||s.renderer,!p.current&&r&&(p.current=r(t,{visualState:n,parent:a,props:i,presenceContext:c,blockInitialAnimation:!!c&&!1===c.initial,reducedMotionConfig:l}));const u=p.current,d=e.useContext(Qo);u&&!u.projection&&o&&("html"===u.type||"svg"===u.type)&&function(t,e,n,i){const{layoutId:r,layout:o,drag:a,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutCrossfade:p}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:ta(t.parent)),t.projection.setOptions({layoutId:r,layout:o,alwaysMeasureLayout:!!a||s&&Xo(s),visualElement:t,animationType:"string"==typeof o?o:"both",initialPromotionConfig:i,crossfade:p,layoutScroll:c,layoutRoot:l})}(p.current,i,o,d);const f=e.useRef(!1);e.useInsertionEffect(()=>{u&&f.current&&u.update(i,c)});const m=i[Zo],h=e.useRef(!!m&&!window.MotionHandoffIsComplete?.(m)&&window.MotionHasOptimisedAnimation?.(m));return _t(()=>{u&&(f.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),u.scheduleRenderMicrotask(),h.current&&u.animationState&&u.animationState.animateChanges())}),e.useEffect(()=>{u&&(!h.current&&u.animationState&&u.animationState.animateChanges(),h.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(m)}),h.current=!1),u.enteringChildren=void 0)}),u}function ta(t){if(t)return!1!==t.options.allowProjection?t.projection:ta(t.parent)}var ea={};function na(t,{forwardMotionProps:n=!1}={},r,o){r&&function(t){for(const e in t)oo[e]={...oo[e],...t[e]}}(r);const a=Oo(t)?Ho:Go;function s(s,c){let l;const p={...e.useContext($r),...s,layoutId:ia(s)},{isStatic:u}=p,d=xo(s),f=a(s,u);if(!u&&zt){!function(t,n){const i=e.useContext(io).strict;if("production"!==ea.NODE_ENV&&n&&i){const e="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";t.ignoreStrict?Yt(!1,e,"lazy-strict-mode"):Kt(!1,e,"lazy-strict-mode")}}(p,r);const n=function(t){const{drag:e,layout:n}=oo;if(!e&&!n)return{};const i={...e,...n};return{MeasureLayout:e?.isEnabled(t)||n?.isEnabled(t)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}(p);l=n.MeasureLayout,d.visualElement=Jo(t,f,p,o,n.ProjectionNode)}return i.jsxs(po.Provider,{value:d,children:[l&&d.visualElement?i.jsx(l,{visualElement:d.visualElement,...p}):null,Lo(t,s,Yo(f,d.visualElement,c),f,u,n)]})}s.displayName=`motion.${"string"==typeof t?t:`create(${t.displayName??t.name??""})`}`;const c=e.forwardRef(s);return c[Wo]=t,c}function ia({layoutId:t}){const n=e.useContext(Vt).id;return n&&void 0!==t?n+"-"+t:t}var ra={};function oa(t,e){if(typeof Proxy>"u")return na;const n=new Map,i=(n,i)=>na(n,i,t,e);return new Proxy((t,e)=>("production"!==ra.NODE_ENV&&ue(!1,"motion() is deprecated. Use motion.create() instead."),i(t,e)),{get:(r,o)=>"create"===o?i:(n.has(o)||n.set(o,na(o,void 0,t,e)),n.get(o))})}function aa({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function sa(t){return void 0===t||1===t}function ca({scale:t,scaleX:e,scaleY:n}){return!sa(t)||!sa(e)||!sa(n)}function la(t){return ca(t)||pa(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function pa(t){return ua(t.x)||ua(t.y)}function ua(t){return t&&"0%"!==t}function da(t,e,n){return n+e*(t-n)}function fa(t,e,n,i,r){return void 0!==r&&(t=da(t,r,i)),da(t,n,i)+e}function ma(t,e=0,n=1,i,r){t.min=fa(t.min,e,n,i,r),t.max=fa(t.max,e,n,i,r)}function ha(t,{x:e,y:n}){ma(t.x,e.translate,e.scale,e.originPoint),ma(t.y,n.translate,n.scale,n.originPoint)}const ga=.999999999999,va=1.0000000000001;function xa(t,e){t.min=t.min+e,t.max=t.max+e}function ya(t,e,n,i,r=.5){ma(t,e,n,wn(t.min,t.max,r),i)}function ba(t,e){ya(t.x,e.x,e.scaleX,e.scale,e.originX),ya(t.y,e.y,e.scaleY,e.scale,e.originY)}function wa(t,e){return aa(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}(t.getBoundingClientRect(),e))}const Aa=()=>({x:{min:0,max:0},y:{min:0,max:0}}),Sa={current:null},Ca={current:!1};const Pa=new WeakMap;var ka={};const Ta=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Ea{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,blockInitialAnimation:r,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Vi,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const t=Le.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,je.render(this.render,!1,!0))};const{latestValues:s,renderState:c}=o;this.latestValues=s,this.baseTarget={...s},this.initialValues=e.initial?{...s}:{},this.renderState=c,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!r,this.isControllingVariants=go(e),this.isVariantNode=vo(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!(!t||!t.current);const{willChange:l,...p}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in p){const e=p[t];void 0!==s[t]&&_r(e)&&e.set(s[t])}}mount(t){this.current=t,Pa.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),Ca.current||function(){if(Ca.current=!0,zt)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Sa.current=t.matches;t.addEventListener("change",e),e()}else Sa.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Sa.current),"production"!==ka.NODE_ENV&&ue(!0!==this.shouldReduceMotion,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),De(this.notifyUpdate),De(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,e){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=Ii.has(t);n&&this.onBindTransform&&this.onBindTransform();const i=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&je.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{i(),r&&r(),e.owner&&e.stop()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in oo){const e=oo[t];if(!e)continue;const{isEnabled:n,Feature:i}=e;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<Ta.length;e++){const n=Ta[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const i=t["on"+n];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=function(t,e,n){for(const i in e){const r=e[i],o=n[i];if(_r(r))t.addValue(i,r);else if(_r(o))t.addValue(i,Er(r,{owner:t}));else if(o!==r)if(t.hasValue(i)){const e=t.getValue(i);!0===e.liveStyle?e.jump(r):e.hasAnimated||e.set(r)}else{const e=t.getStaticValue(i);t.addValue(i,Er(void 0!==e?e:r,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=Er(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){let n=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];return null!=n&&("string"==typeof n&&(Qt(n)||te(n))?n=parseFloat(n):!(t=>Gr.find(lr(t)))(n)&&xn.test(e)&&(n=wr(t,e)),this.setBaseTarget(t,_r(n)?n.get():n)),_r(n)?n.get():n}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){const{initial:e}=this.props;let n;if("string"==typeof e||"object"==typeof e){const i=Bo(this.props,e,this.presenceContext?.custom);i&&(n=i[t])}if(e&&void 0!==n)return n;const i=this.getBaseTargetFromProps(this.props,t);return void 0===i||_r(i)?void 0!==this.initialValues[t]&&void 0===n?void 0:this.baseTarget[t]:i}on(t,e){return this.events[t]||(this.events[t]=new ae),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}scheduleRenderMicrotask(){Ir.render(this.render)}}class Ia extends Ea{constructor(){super(...arguments),this.KeyframeResolver=Sr}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;_r(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}function Ma(t,{style:e,vars:n},i,r){const o=t.style;let a;for(a in e)o[a]=e[a];for(a in r?.applyProjectionStyles(o,i),n)o.setProperty(a,n[a])}class ja extends Ia{constructor(){super(...arguments),this.type="html",this.renderInstance=Ma}readValueFromInstance(t,e){if(Ii.has(e))return this.projection?.isProjecting?Pi(e):((t,e)=>{const{transform:n="none"}=getComputedStyle(t);return ki(n,e)})(t,e);{const n=function(t){return window.getComputedStyle(t)}(t),i=(Be(e)?n.getPropertyValue(e):n[e])||0;return"string"==typeof i?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:e}){return wa(t,e)}build(t,e,n){Co(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return _o(t,e,n)}}const Da=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);class Fa extends Ia{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Aa}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(Ii.has(e)){const t=br(e);return t&&t.default||0}return e=Da.has(e)?e:Ko(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return $o(t,e,n)}build(t,e,n){jo(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,i){!function(t,e,n,i){Ma(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(Da.has(n)?n:Ko(n),e.attrs[n])}(t,e,0,i)}mount(t){this.isSVGTag=Fo(t.tagName),super.mount(t)}}const Ua=(t,n)=>Oo(t)?new Fa(n):new ja(n,{allowProjection:t!==e.Fragment});function Ra(t,e,n){const i=t.getProps();return Bo(i,e,void 0!==n?n:i.custom,t)}const Oa=t=>Array.isArray(t);function La(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Er(n))}function Na(t){return Oa(t)?t[t.length-1]||0:t}function Ba(t,e){const n=t.getValue("willChange");if(function(t){return!(!_r(t)||!t.add)}(n))return n.add(e);if(!n&&Zt.WillChange){const n=new Zt.WillChange("auto");t.addValue("willChange",n),n.add(e)}}function Va(t){return t.props[Zo]}const qa=t=>null!==t;const za={type:"spring",stiffness:500,damping:25,restSpeed:10},_a={type:"keyframes",duration:.8},Ga={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},$a=(t,{keyframes:e})=>e.length>2?_a:Ii.has(t)?t.startsWith("scale")?(t=>({type:"spring",stiffness:550,damping:0===t?2*Math.sqrt(550):30,restSpeed:10}))(e[1]):za:Ga;const Ha=(t,e,n,i={},r,o)=>a=>{const s=sr(i,t)||{},c=s.delay||i.delay||0;let{elapsed:l=0}=i;l-=se(c);const p={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...s,delay:-l,onUpdate:t=>{e.set(t),s.onUpdate&&s.onUpdate(t)},onComplete:()=>{a(),s.onComplete&&s.onComplete()},name:t,motionValue:e,element:o?void 0:r};(function({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:r,repeat:o,repeatType:a,repeatDelay:s,from:c,elapsed:l,...p}){return!!Object.keys(p).length})(s)||Object.assign(p,$a(t,p)),p.duration&&(p.duration=se(p.duration)),p.repeatDelay&&(p.repeatDelay=se(p.repeatDelay)),void 0!==p.from&&(p.keyframes[0]=p.from);let u=!1;if((!1===p.type||0===p.duration&&!p.repeatDelay)&&(er(p),0===p.delay&&(u=!0)),(Zt.instantAnimations||Zt.skipAnimations)&&(u=!0,er(p),p.delay=0),p.allowFlatten=!s.type&&!s.ease,u&&!o&&void 0!==e.get()){const t=function(t,{repeat:e,repeatType:n="loop"}){const i=t.filter(qa);return i[e&&"loop"!==n&&e%2==1?0:i.length-1]}(p.keyframes,s);if(void 0!==t)return void je.update(()=>{p.onUpdate(t),p.onComplete()})}return s.isSync?new vi(p):new rr(p)};function Wa({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function Xa(t,e,{delay:n=0,transitionOverride:i,type:r}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:a,...s}=e;i&&(o=i);const c=[],l=r&&t.animationState&&t.animationState.getState()[r];for(const e in s){const i=t.getValue(e,t.latestValues[e]??null),r=s[e];if(void 0===r||l&&Wa(l,e))continue;const a={delay:n,...sr(o||{},e)},p=i.get();if(void 0!==p&&!i.isAnimating&&!Array.isArray(r)&&r===p&&!a.velocity)continue;let u=!1;if(window.MotionHandoffAnimation){const n=Va(t);if(n){const t=window.MotionHandoffAnimation(n,e,je);null!==t&&(a.startTime=t,u=!0)}}Ba(t,e),i.start(Ha(e,i,r,t.shouldReduceMotion&&cr.has(e)?{type:!1}:a,t,u));const d=i.animation;d&&c.push(d)}return a&&Promise.all(c).then(()=>{je.update(()=>{a&&function(t,e){const n=Ra(t,e);let{transitionEnd:i={},transition:r={},...o}=n||{};o={...o,...i};for(const e in o)La(t,e,Na(o[e]))}(t,a)})}),c}function Ya(t,e,n,i=0,r=1){const o=Array.from(t).sort((t,e)=>t.sortNodePosition(e)).indexOf(e),a=t.size,s=(a-1)*i;return"function"==typeof n?n(o,a):1===r?o*i:s-o*i}function Ka(t,e,n={}){const i=Ra(t,e,"exit"===n.type?t.presenceContext?.custom:void 0);let{transition:r=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(r=n.transitionOverride);const o=i?()=>Promise.all(Xa(t,i,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(i=0)=>{const{delayChildren:o=0,staggerChildren:a,staggerDirection:s}=r;return function(t,e,n=0,i=0,r=0,o=1,a){const s=[];for(const c of t.variantChildren)c.notify("AnimationStart",e),s.push(Ka(c,e,{...a,delay:n+("function"==typeof i?0:i)+Ya(t.variantChildren,c,i,r,o)}).then(()=>c.notify("AnimationComplete",e)));return Promise.all(s)}(t,e,i,o,a,s,n)}:()=>Promise.resolve(),{when:s}=r;if(s){const[t,e]="beforeChildren"===s?[o,a]:[a,o];return t().then(()=>e())}return Promise.all([o(),a(n.delay)])}function Za(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}const Qa=ho.length;function Ja(t){if(!t)return;if(!t.isControllingVariants){const e=t.parent&&Ja(t.parent)||{};return void 0!==t.props.initial&&(e.initial=t.props.initial),e}const e={};for(let n=0;n<Qa;n++){const i=ho[n],r=t.props[i];(fo(r)||!1===r)&&(e[i]=r)}return e}const ts=[...mo].reverse(),es=mo.length;function ns(t){return e=>Promise.all(e.map(({animation:e,options:n})=>function(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const r=e.map(e=>Ka(t,e,n));i=Promise.all(r)}else if("string"==typeof e)i=Ka(t,e,n);else{const r="function"==typeof e?Ra(t,e,n.custom):e;i=Promise.all(Xa(t,r,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}(t,e,n)))}function is(t){let e=ns(t),n=as(),i=!0;const r=e=>(n,i)=>{const r=Ra(t,i,"exit"===e?t.presenceContext?.custom:void 0);if(r){const{transition:t,transitionEnd:e,...i}=r;n={...n,...i,...e}}return n};function o(o){const{props:a}=t,s=Ja(t.parent)||{},c=[],l=new Set;let p={},u=1/0;for(let e=0;e<es;e++){const d=ts[e],f=n[d],m=void 0!==a[d]?a[d]:s[d],h=fo(m),g=d===o?f.isActive:null;!1===g&&(u=e);let v=m===s[d]&&m!==a[d]&&h;if(v&&i&&t.manuallyAnimateOnMount&&(v=!1),f.protectedKeys={...p},!f.isActive&&null===g||!m&&!f.prevProp||uo(m)||"boolean"==typeof m)continue;const x=rs(f.prevProp,m);let y=x||d===o&&f.isActive&&!v&&h||e>u&&h,b=!1;const w=Array.isArray(m)?m:[m];let A=w.reduce(r(d),{});!1===g&&(A={});const{prevResolvedValues:S={}}=f,C={...S,...A},P=e=>{y=!0,l.has(e)&&(b=!0,l.delete(e)),f.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)};for(const t in C){const e=A[t],n=S[t];if(p.hasOwnProperty(t))continue;let i=!1;i=Oa(e)&&Oa(n)?!Za(e,n):e!==n,i?null!=e?P(t):l.add(t):void 0!==e&&l.has(t)?P(t):f.protectedKeys[t]=!0}f.prevProp=m,f.prevResolvedValues=A,f.isActive&&(p={...p,...A}),i&&t.blockInitialAnimation&&(y=!1);const k=v&&x;y&&(!k||b)&&c.push(...w.map(e=>{const n={type:d};if("string"==typeof e&&i&&!k&&t.manuallyAnimateOnMount&&t.parent){const{parent:i}=t,r=Ra(i,e);if(i.enteringChildren&&r){const{delayChildren:e}=r.transition||{};n.delay=Ya(i.enteringChildren,t,e)}}return{animation:e,options:n}}))}if(l.size){const e={};if("boolean"!=typeof a.initial){const n=Ra(t,Array.isArray(a.initial)?a.initial[0]:a.initial);n&&n.transition&&(e.transition=n.transition)}l.forEach(n=>{const i=t.getBaseTarget(n),r=t.getValue(n);r&&(r.liveStyle=!0),e[n]=i??null}),c.push({animation:e})}let d=!!c.length;return i&&(!1===a.initial||a.initial===a.animate)&&!t.manuallyAnimateOnMount&&(d=!1),i=!1,d?e(c):Promise.resolve()}return{animateChanges:o,setActive:function(e,i){if(n[e].isActive===i)return Promise.resolve();t.variantChildren?.forEach(t=>t.animationState?.setActive(e,i)),n[e].isActive=i;const r=o(e);for(const t in n)n[t].protectedKeys={};return r},setAnimateFunction:function(n){e=n(t)},getState:()=>n,reset:()=>{n=as()}}}function rs(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!Za(e,t)}function os(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function as(){return{animate:os(!0),whileInView:os(),whileHover:os(),whileTap:os(),whileDrag:os(),whileFocus:os(),exit:os()}}class ss{constructor(t){this.isMounted=!1,this.node=t}update(){}}let cs=0;const ls={animation:{Feature:class extends ss{constructor(t){super(t),t.animationState||(t.animationState=is(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();uo(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}},exit:{Feature:class extends ss{constructor(){super(...arguments),this.id=cs++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const i=this.node.animationState.setActive("exit",!t);e&&!t&&i.then(()=>{e(this.id)})}mount(){const{register:t,onExitComplete:e}=this.node.presenceContext||{};e&&e(this.id),t&&(this.unmount=t(this.id))}unmount(){}}}};function ps(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}function us(t){return{point:{x:t.pageX,y:t.pageY}}}function ds(t,e,n,i){return ps(t,e,(t=>e=>Rr(e)&&t(e,us(e)))(n),i)}function fs(t){return t.max-t.min}function ms(t,e,n,i=.5){t.origin=i,t.originPoint=wn(e.min,e.max,t.origin),t.scale=fs(n)/fs(e),t.translate=wn(n.min,n.max,t.origin)-t.originPoint,(t.scale>=.9999&&t.scale<=1.0001||isNaN(t.scale))&&(t.scale=1),(t.translate>=-.01&&t.translate<=.01||isNaN(t.translate))&&(t.translate=0)}function hs(t,e,n,i){ms(t.x,e.x,n.x,i?i.originX:void 0),ms(t.y,e.y,n.y,i?i.originY:void 0)}function gs(t,e,n){t.min=n.min+e.min,t.max=t.min+fs(e)}function vs(t,e,n){t.min=e.min-n.min,t.max=t.min+fs(e)}function xs(t,e,n){vs(t.x,e.x,n.x),vs(t.y,e.y,n.y)}function ys(t){return[t("x"),t("y")]}const bs=({current:t})=>t?t.ownerDocument.defaultView:null,ws=(t,e)=>Math.abs(t-e);class As{constructor(t,e,{transformPagePoint:n,contextWindow:i=window,dragSnapToOrigin:r=!1,distanceThreshold:o=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const t=Ps(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=function(t,e){const n=ws(t.x,e.x),i=ws(t.y,e.y);return Math.sqrt(n**2+i**2)}(t.offset,{x:0,y:0})>=this.distanceThreshold;if(!e&&!n)return;const{point:i}=t,{timestamp:r}=Fe;this.history.push({...i,timestamp:r});const{onStart:o,onMove:a}=this.handlers;e||(o&&o(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),a&&a(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=Ss(e,this.transformPagePoint),je.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();const{onEnd:n,onSessionEnd:i,resumeAnimation:r}=this.handlers;if(this.dragSnapToOrigin&&r&&r(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=Ps("pointercancel"===t.type?this.lastMoveEventInfo:Ss(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,o),i&&i(t,o)},!Rr(t))return;this.dragSnapToOrigin=r,this.handlers=e,this.transformPagePoint=n,this.distanceThreshold=o,this.contextWindow=i||window;const a=Ss(us(t),this.transformPagePoint),{point:s}=a,{timestamp:c}=Fe;this.history=[{...s,timestamp:c}];const{onSessionStart:l}=e;l&&l(t,Ps(a,this.history)),this.removeListeners=re(ds(this.contextWindow,"pointermove",this.handlePointerMove),ds(this.contextWindow,"pointerup",this.handlePointerUp),ds(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),De(this.updatePoint)}}function Ss(t,e){return e?{point:e(t.point)}:t}function Cs(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Ps({point:t},e){return{point:t,delta:Cs(t,Ts(e)),offset:Cs(t,ks(e)),velocity:Es(e,.1)}}function ks(t){return t[0]}function Ts(t){return t[t.length-1]}function Es(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const r=Ts(t);for(;n>=0&&(i=t[n],!(r.timestamp-i.timestamp>se(e)));)n--;if(!i)return{x:0,y:0};const o=ce(r.timestamp-i.timestamp);if(0===o)return{x:0,y:0};const a={x:(r.x-i.x)/o,y:(r.y-i.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Is(t,e,n){return{min:void 0!==e?t.min+e:void 0,max:void 0!==n?t.max+n-(t.max-t.min):void 0}}function Ms(t,e){let n=e.min-t.min,i=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,i]=[i,n]),{min:n,max:i}}const js=.35;function Ds(t,e,n){return{min:Fs(t,e),max:Fs(t,n)}}function Fs(t,e){return"number"==typeof t?t:t[e]||0}const Us=new WeakMap;class Rs{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:e=!1,distanceThreshold:n}={}){const{presenceContext:i}=this.visualElement;if(i&&!1===i.isPresent)return;const{dragSnapToOrigin:r}=this.getProps();this.panSession=new As(t,{onSessionStart:t=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),e&&this.snapToCursor(us(t).point)},onStart:(t,e)=>{const{drag:n,dragPropagation:i,onDragStart:r}=this.getProps();if(n&&!i&&(this.openDragLock&&this.openDragLock(),this.openDragLock=function(t){return"x"===t||"y"===t?Mr[t]?null:(Mr[t]=!0,()=>{Mr[t]=!1}):Mr.x||Mr.y?null:(Mr.x=Mr.y=!0,()=>{Mr.x=Mr.y=!1})}(n),!this.openDragLock))return;this.latestPointerEvent=t,this.latestPanInfo=e,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ys(t=>{let e=this.getAxisMotionValue(t).get()||0;if(nn.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const i=n.layout.layoutBox[t];i&&(e=fs(i)*(parseFloat(e)/100))}}this.originPoint[t]=e}),r&&je.postRender(()=>r(t,e)),Ba(this.visualElement,"transform");const{animationState:o}=this.visualElement;o&&o.setActive("whileDrag",!0)},onMove:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e;const{dragPropagation:n,dragDirectionLock:i,onDirectionLock:r,onDrag:o}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:a}=e;if(i&&null===this.currentDirection)return this.currentDirection=function(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}(a),void(null!==this.currentDirection&&r&&r(this.currentDirection));this.updateAxis("x",e.point,a),this.updateAxis("y",e.point,a),this.visualElement.render(),o&&o(t,e)},onSessionEnd:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e,this.stop(t,e),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>ys(t=>"paused"===this.getAnimationState(t)&&this.getAxisMotionValue(t).animation?.play())},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:r,distanceThreshold:n,contextWindow:bs(this.visualElement)})}stop(t,e){const n=t||this.latestPointerEvent,i=e||this.latestPanInfo,r=this.isDragging;if(this.cancel(),!r||!i||!n)return;const{velocity:o}=i;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&je.postRender(()=>a(n,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),e&&e.setActive("whileDrag",!1)}updateAxis(t,e,n){const{drag:i}=this.getProps();if(!n||!Os(t,i,this.currentDirection))return;const r=this.getAxisMotionValue(t);let o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=function(t,{min:e,max:n},i){return void 0!==e&&t<e?t=i?wn(e,t,i.min):Math.max(t,e):void 0!==n&&t>n&&(t=i?wn(n,t,i.max):Math.min(t,n)),t}(o,this.constraints[t],this.elastic[t])),r.set(o)}resolveConstraints(){const{dragConstraints:t,dragElastic:e}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;t&&Xo(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!n)&&function(t,{top:e,left:n,bottom:i,right:r}){return{x:Is(t.x,n,r),y:Is(t.y,e,i)}}(n.layoutBox,t),this.elastic=function(t=js){return!1===t?t=0:!0===t&&(t=js),{x:Ds(t,"left","right"),y:Ds(t,"top","bottom")}}(e),i!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&ys(t=>{!1!==this.constraints&&this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){const n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(n.layoutBox[t],this.constraints[t]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!t||!Xo(t))return!1;const n=t.current;Kt(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const r=function(t,e,n){const i=wa(t,n),{scroll:r}=e;return r&&(xa(i.x,r.offset.x),xa(i.y,r.offset.y)),i}(n,i.root,this.visualElement.getTransformPagePoint());let o=function(t,e){return{x:Ms(t.x,e.x),y:Ms(t.y,e.y)}}(i.layout.layoutBox,r);if(e){const t=e(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(o));this.hasMutatedConstraints=!!t,t&&(o=aa(t))}return o}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:i,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),s=this.constraints||{},c=ys(a=>{if(!Os(a,e,this.currentDirection))return;let c=s&&s[a]||{};o&&(c={min:0,max:0});const l=i?200:1e6,p=i?40:1e7,u={type:"inertia",velocity:n?t[a]:0,bounceStiffness:l,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...r,...c};return this.startAxisValueAnimation(a,u)});return Promise.all(c).then(a)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return Ba(this.visualElement,t),n.start(Ha(t,n,0,e,this.visualElement,!1))}stopAnimation(){ys(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){ys(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const e=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps();return n[e]||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){ys(e=>{const{drag:n}=this.getProps();if(!Os(e,n,this.currentDirection))return;const{projection:i}=this.visualElement,r=this.getAxisMotionValue(e);if(i&&i.layout){const{min:n,max:o}=i.layout.layoutBox[e];r.set(t[e]-wn(n,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!Xo(e)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};ys(t=>{const e=this.getAxisMotionValue(t);if(e&&!1!==this.constraints){const n=e.get();i[t]=function(t,e){let n=.5;const i=fs(t),r=fs(e);return r>i?n=oe(e.min,e.max-i,t.min):i>r&&(n=oe(t.min,t.max-r,e.min)),Wt(0,1,n)}({min:n,max:n},this.constraints[t])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),ys(e=>{if(!Os(e,t,null))return;const n=this.getAxisMotionValue(e),{min:r,max:o}=this.constraints[e];n.set(wn(r,o,i[e]))})}addListeners(){if(!this.visualElement.current)return;Us.set(this.visualElement,this);const t=ds(this.visualElement.current,"pointerdown",t=>{const{drag:e,dragListener:n=!0}=this.getProps();e&&n&&this.start(t)}),e=()=>{const{dragConstraints:t}=this.getProps();Xo(t)&&t.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,i=n.addEventListener("measure",e);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),je.read(e);const r=ps(window,"resize",()=>this.scalePositionWithinConstraints()),o=n.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(ys(e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))}),this.visualElement.render())});return()=>{r(),t(),i(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:r=!1,dragElastic:o=js,dragMomentum:a=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:i,dragConstraints:r,dragElastic:o,dragMomentum:a}}}function Os(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const Ls=t=>(e,n)=>{t&&je.postRender(()=>t(e,n))};const Ns={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Bs(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Vs={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!rn.test(t))return t;t=parseFloat(t)}return`${Bs(t,e.target.x)}% ${Bs(t,e.target.y)}%`}},qs={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,r=xn.parse(t);if(r.length>5)return i;const o=xn.createTransformer(t),a="number"!=typeof r[0]?1:0,s=n.x.scale*e.x,c=n.y.scale*e.y;r[0+a]/=s,r[1+a]/=c;const l=wn(s,c,.5);return"number"==typeof r[2+a]&&(r[2+a]/=l),"number"==typeof r[3+a]&&(r[3+a]/=l),o(r)}};let zs=!1;class _s extends e.Component{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:i}=this.props,{projection:r}=t;(function(t){for(const e in t)bo[e]=t[e],Be(e)&&(bo[e].isCSSVariable=!0)})($s),r&&(e.group&&e.group.add(r),n&&n.register&&i&&n.register(r),zs&&r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,onExitComplete:()=>this.safeToRemove()})),Ns.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:i,isPresent:r}=this.props,{projection:o}=n;return o&&(o.isPresent=r,zs=!0,i||t.layoutDependency!==e||void 0===e||t.isPresent!==r?o.willUpdate():this.safeToRemove(),t.isPresent!==r&&(r?o.promote():o.relegate()||je.postRender(()=>{const t=o.getStack();(!t||!t.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Ir.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n}=this.props,{projection:i}=t;zs=!0,i&&(i.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Gs(t){const[n,r]=Qr(),o=e.useContext(Vt);return i.jsx(_s,{...t,layoutGroup:o,switchLayoutGroup:e.useContext(Qo),isPresent:n,safeToRemove:r})}const $s={borderRadius:{...Vs,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Vs,borderTopRightRadius:Vs,borderBottomLeftRadius:Vs,borderBottomRightRadius:Vs,boxShadow:qs};const Hs=(t,e)=>t.depth-e.depth;class Ws{constructor(){this.children=[],this.isDirty=!1}add(t){$t(this.children,t),this.isDirty=!0}remove(t){Ht(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Hs),this.isDirty=!1,this.children.forEach(t)}}const Xs=["TopLeft","TopRight","BottomLeft","BottomRight"],Ys=Xs.length,Ks=t=>"string"==typeof t?parseFloat(t):t,Zs=t=>"number"==typeof t||rn.test(t);function Qs(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const Js=ec(0,.5,we),tc=ec(.5,.95,ne);function ec(t,e,n){return i=>i<t?0:i>e?1:n(oe(t,e,i))}function nc(t,e){t.min=e.min,t.max=e.max}function ic(t,e){nc(t.x,e.x),nc(t.y,e.y)}function rc(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function oc(t,e,n,i,r){return t=da(t-=e,1/n,i),void 0!==r&&(t=da(t,1/r,i)),t}function ac(t,e,[n,i,r],o,a){!function(t,e=0,n=1,i=.5,r,o=t,a=t){if(nn.test(e)&&(e=parseFloat(e),e=wn(a.min,a.max,e/100)-a.min),"number"!=typeof e)return;let s=wn(o.min,o.max,i);t===o&&(s-=e),t.min=oc(t.min,e,n,s,r),t.max=oc(t.max,e,n,s,r)}(t,e[n],e[i],e[r],e.scale,o,a)}const sc=["x","scaleX","originX"],cc=["y","scaleY","originY"];function lc(t,e,n,i){ac(t.x,e,sc,n?n.x:void 0,i?i.x:void 0),ac(t.y,e,cc,n?n.y:void 0,i?i.y:void 0)}function pc(t){return 0===t.translate&&1===t.scale}function uc(t){return pc(t.x)&&pc(t.y)}function dc(t,e){return t.min===e.min&&t.max===e.max}function fc(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function mc(t,e){return fc(t.x,e.x)&&fc(t.y,e.y)}function hc(t){return fs(t.x)/fs(t.y)}function gc(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class vc{constructor(){this.members=[]}add(t){$t(this.members,t),t.scheduleRender()}remove(t){if(Ht(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){const e=this.members.findIndex(e=>t===e);if(0===e)return!1;let n;for(let t=e;t>=0;t--){const e=this.members[t];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,e&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;!1===i&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:e,resumingFrom:n}=t;e.onExitComplete&&e.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const xc=["","X","Y","Z"];let yc=0;function bc(t,e,n,i){const{latestValues:r}=e;r[t]&&(n[t]=r[t],e.setStaticValue(t,0),i&&(i[t]=0))}function wc(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Va(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",je,!(e||i))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&wc(i)}function Ac({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:r}){return class{constructor(t={},n=e?.()){this.id=yc++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Pc),this.nodes.forEach(Dc),this.nodes.forEach(Fc),this.nodes.forEach(kc)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new Ws)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new ae),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const n=this.eventHandlers.get(t);n&&n.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e){if(this.instance)return;this.isSVG=zr(e)&&!function(t){return zr(t)&&"svg"===t.tagName}(e),this.instance=e;const{layoutId:n,layout:i,visualElement:r}=this.options;if(r&&!r.current&&r.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(i||n)&&(this.isLayoutDirty=!0),t){let n,i=0;const r=()=>this.root.updateBlockedByResize=!1;je.read(()=>{i=window.innerWidth}),t(e,()=>{const t=window.innerWidth;t!==i&&(i=t,this.root.updateBlockedByResize=!0,n&&n(),n=function(t,e){const n=Le.now(),i=({timestamp:r})=>{const o=r-n;o>=e&&(De(i),t(o-e))};return je.setup(i,!0),()=>De(i)}(r,250),Ns.hasAnimatedSinceResize&&(Ns.hasAnimatedSinceResize=!1,this.nodes.forEach(jc)))})}n&&this.root.registerSharedNode(n,this),!1!==this.options.animate&&r&&(n||i)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:n,layout:i})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||r.getDefaultTransition()||Bc,{onLayoutAnimationStart:a,onLayoutAnimationComplete:s}=r.getProps(),c=!this.targetLayout||!mc(this.targetLayout,i),l=!e&&n;if(this.options.layoutRoot||this.resumeFrom||l||e&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const e={...sr(o,"layout"),onPlay:a,onComplete:s};(r.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,l)}else e||jc(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=i})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),De(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Uc),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&wc(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:e,layout:n}=this.options;if(void 0===e&&!n)return;const i=this.getTransformTemplate();this.prevTransformTemplateValue=i?i(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(Ec);if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(Ic);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Mc),this.nodes.forEach(Sc),this.nodes.forEach(Cc)):this.nodes.forEach(Ic),this.clearAllSnapshots();const t=Le.now();Fe.delta=Wt(0,1e3/60,t-Fe.timestamp),Fe.timestamp=t,Fe.isProcessing=!0,Ue.update.process(Fe),Ue.preRender.process(Fe),Ue.render.process(Fe),Fe.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ir.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Tc),this.sharedNodes.forEach(Rc)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,je.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){je.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!fs(this.snapshot.measuredBox.x)&&!fs(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!(this.instance&&(this.updateScroll(),this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty)))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t<this.path.length;t++)this.path[t].updateScroll();const t=this.layout;this.layout=this.measure(!1),this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=!(!this.options.layoutScroll||!this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e&&this.instance){const e=i(this.instance);this.scroll={animationId:this.root.animationId,phase:t,isRoot:e,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:e}}}resetTransform(){if(!r)return;const t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,e=this.projectionDelta&&!uc(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,o=i!==this.prevTransformTemplateValue;t&&this.instance&&(e||la(this.latestValues)||o)&&(r(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let n=this.removeElementScroll(e);return t&&(n=this.removeTransform(n)),function(t){zc(t.x),zc(t.y)}(n),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const e=t.measureViewportBox();if(!this.scroll?.wasRoot&&!this.path.some(Gc)){const{scroll:t}=this.root;t&&(xa(e.x,t.offset.x),xa(e.y,t.offset.y))}return e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};if(ic(e,t),this.scroll?.wasRoot)return e;for(let n=0;n<this.path.length;n++){const i=this.path[n],{scroll:r,options:o}=i;i!==this.root&&r&&o.layoutScroll&&(r.wasRoot&&ic(e,t),xa(e.x,r.offset.x),xa(e.y,r.offset.y))}return e}applyTransform(t,e=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};ic(n,t);for(let t=0;t<this.path.length;t++){const i=this.path[t];!e&&i.options.layoutScroll&&i.scroll&&i!==i.root&&ba(n,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),la(i.latestValues)&&ba(n,i.latestValues)}return la(this.latestValues)&&ba(n,this.latestValues),n}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};ic(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!n.instance||!la(n.latestValues))continue;ca(n.latestValues)&&n.updateSnapshot();const i=Aa();ic(i,n.measurePageBox()),lc(e,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,i)}return la(this.latestValues)&&lc(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Fe.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){const e=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=e.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=e.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=e.isSharedProjectionDirty);const n=!!this.resumingFrom||this!==e;if(!(t||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:i,layoutId:r}=this.options;if(this.layout&&(i||r)){if(this.resolvedRelativeTargetAt=Fe.timestamp,!this.targetDelta&&!this.relativeTarget){const t=this.getClosestProjectingParent();t&&t.layout&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},xs(this.relativeTargetOrigin,this.layout.layoutBox,t.layout.layoutBox),ic(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if((this.relativeTarget||this.targetDelta)&&(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),function(t,e,n){gs(t.x,e.x,n.x),gs(t.y,e.y,n.y)}(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):ic(this.target,this.layout.layoutBox),ha(this.target,this.targetDelta)):ic(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const t=this.getClosestProjectingParent();t&&!!t.resumingFrom==!!this.resumingFrom&&!t.options.layoutScroll&&t.target&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},xs(this.relativeTargetOrigin,this.target,t.target),ic(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(this.parent&&!ca(this.parent.latestValues)&&!pa(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!(!(this.relativeTarget||this.targetDelta||this.options.layoutRoot)||!this.layout)}calcProjection(){const t=this.getLead(),e=!!this.resumingFrom||this!==t;let n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),e&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===Fe.timestamp&&(n=!1),n)return;const{layout:i,layoutId:r}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!i&&!r)return;ic(this.layoutCorrected,this.layout.layoutBox);const o=this.treeScale.x,a=this.treeScale.y;(function(t,e,n,i=!1){const r=n.length;if(!r)return;let o,a;e.x=e.y=1;for(let s=0;s<r;s++){o=n[s],a=o.projectionDelta;const{visualElement:r}=o.options;r&&r.props.style&&"contents"===r.props.style.display||(i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&ba(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),a&&(e.x*=a.x.scale,e.y*=a.y.scale,ha(t,a)),i&&la(o.latestValues)&&ba(t,o.latestValues))}e.x<va&&e.x>ga&&(e.x=1),e.y<va&&e.y>ga&&(e.y=1)})(this.layoutCorrected,this.treeScale,this.path,e),t.layout&&!t.target&&(1!==this.treeScale.x||1!==this.treeScale.y)&&(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:s}=t;s?(this.projectionDelta&&this.prevProjectionDelta?(rc(this.prevProjectionDelta.x,this.projectionDelta.x),rc(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),hs(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==o||this.treeScale.y!==a||!gc(this.projectionDelta.x,this.prevProjectionDelta.x)||!gc(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",s))):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){if(this.options.visualElement?.scheduleRender(),t){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(t,e=!1){const n=this.snapshot,i=n?n.latestValues:{},r={...this.latestValues},o={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const a={x:{min:0,max:0},y:{min:0,max:0}},s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),c=this.getStack(),l=!c||c.members.length<=1,p=!(!s||l||!0!==this.options.crossfade||this.path.some(Nc));let u;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;Oc(o.x,t.x,n),Oc(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(xs(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox),function(t,e,n,i){Lc(t.x,e.x,n.x,i),Lc(t.y,e.y,n.y,i)}(this.relativeTarget,this.relativeTargetOrigin,a,n),u&&function(t,e){return dc(t.x,e.x)&&dc(t.y,e.y)}(this.relativeTarget,u)&&(this.isProjectionDirty=!1),u||(u={x:{min:0,max:0},y:{min:0,max:0}}),ic(u,this.relativeTarget)),s&&(this.animationValues=r,function(t,e,n,i,r,o){r?(t.opacity=wn(0,n.opacity??1,Js(i)),t.opacityExit=wn(e.opacity??1,0,tc(i))):o&&(t.opacity=wn(e.opacity??1,n.opacity??1,i));for(let r=0;r<Ys;r++){const o=`border${Xs[r]}Radius`;let a=Qs(e,o),s=Qs(n,o);void 0===a&&void 0===s||(a||(a=0),s||(s=0),0===a||0===s||Zs(a)===Zs(s)?(t[o]=Math.max(wn(Ks(a),Ks(s),i),0),(nn.test(s)||nn.test(a))&&(t[o]+="%")):t[o]=s)}(e.rotate||n.rotate)&&(t.rotate=wn(e.rotate||0,n.rotate||0,i))}(r,i,this.latestValues,n,p,l)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(De(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=je.update(()=>{Ns.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Er(0)),this.currentAnimation=function(t,e,n){const i=_r(t)?t:Er(t);return i.start(Ha("",i,e,n)),i.animation}(this.motionValue,[0,1e3],{...t,velocity:0,isSync:!0,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onStop:()=>{},onComplete:()=>{t.onComplete&&t.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:i,latestValues:r}=t;if(e&&n&&i){if(this!==t&&this.layout&&i&&_c(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=fs(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=fs(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}ic(e,n),ba(e,r),hs(this.projectionDeltaWithTransform,this.layoutCorrected,e,r)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new vc),this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){const{layoutId:t}=this.options;return t&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:t}=this.options;return t?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const i=this.getStack();i&&i.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(e=!0),!e)return;const i={};n.z&&bc("z",t,i,this.animationValues);for(let e=0;e<xc.length;e++)bc(`rotate${xc[e]}`,t,i,this.animationValues),bc(`skew${xc[e]}`,t,i,this.animationValues);t.render();for(const e in i)t.setStaticValue(e,i[e]),this.animationValues&&(this.animationValues[e]=i[e]);t.scheduleRender()}applyProjectionStyles(t,e){if(!this.instance||this.isSVG)return;if(!this.isVisible)return void(t.visibility="hidden");const n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,t.visibility="",t.opacity="",t.pointerEvents=Vo(e?.pointerEvents)||"",void(t.transform=n?n(this.latestValues,""):"none");const i=this.getLead();if(!this.projectionDelta||!this.layout||!i.target)return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=Vo(e?.pointerEvents)||""),void(this.hasProjected&&!la(this.latestValues)&&(t.transform=n?n({},""):"none",this.hasProjected=!1));t.visibility="";const r=i.animationValues||i.latestValues;this.applyTransformsToTarget();let o=function(t,e,n){let i="";const r=t.x.translate/e.x,o=t.y.translate/e.y,a=n?.z||0;if((r||o||a)&&(i=`translate3d(${r}px, ${o}px, ${a}px) `),(1!==e.x||1!==e.y)&&(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:t,rotate:e,rotateX:r,rotateY:o,skewX:a,skewY:s}=n;t&&(i=`perspective(${t}px) ${i}`),e&&(i+=`rotate(${e}deg) `),r&&(i+=`rotateX(${r}deg) `),o&&(i+=`rotateY(${o}deg) `),a&&(i+=`skewX(${a}deg) `),s&&(i+=`skewY(${s}deg) `)}const s=t.x.scale*e.x,c=t.y.scale*e.y;return(1!==s||1!==c)&&(i+=`scale(${s}, ${c})`),i||"none"}(this.projectionDeltaWithTransform,this.treeScale,r);n&&(o=n(r,o)),t.transform=o;const{x:a,y:s}=this.projectionDelta;t.transformOrigin=`${100*a.origin}% ${100*s.origin}% 0`,i.animationValues?t.opacity=i===this?r.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:r.opacityExit:t.opacity=i===this?void 0!==r.opacity?r.opacity:"":void 0!==r.opacityExit?r.opacityExit:0;for(const e in bo){if(void 0===r[e])continue;const{correct:n,applyTo:a,isCSSVariable:s}=bo[e],c="none"===o?r[e]:n(r[e],i);if(a){const e=a.length;for(let n=0;n<e;n++)t[a[n]]=c}else s?this.options.visualElement.renderState.vars[e]=c:t[e]=c}this.options.layoutId&&(t.pointerEvents=i===this?Vo(e?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>t.currentAnimation?.stop()),this.root.nodes.forEach(Ec),this.root.sharedNodes.clear()}}}function Sc(t){t.updateLayout()}function Cc(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=t.layout,{animationType:r}=t.options,o=e.source!==t.layout.source;"size"===r?ys(t=>{const i=o?e.measuredBox[t]:e.layoutBox[t],r=fs(i);i.min=n[t].min,i.max=i.min+r}):_c(r,e.layoutBox,n)&&ys(i=>{const r=o?e.measuredBox[i]:e.layoutBox[i],a=fs(n[i]);r.max=r.min+a,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[i].max=t.relativeTarget[i].min+a)});const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};hs(a,n,e.layoutBox);const s={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o?hs(s,t.applyTransform(i,!0),e.measuredBox):hs(s,n,e.layoutBox);const c=!uc(a);let l=!1;if(!t.resumeFrom){const i=t.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:r,layout:o}=i;if(r&&o){const a={x:{min:0,max:0},y:{min:0,max:0}};xs(a,e.layoutBox,r.layoutBox);const s={x:{min:0,max:0},y:{min:0,max:0}};xs(s,n,o.layoutBox),mc(a,s)||(l=!0),i.options.layoutRoot&&(t.relativeTarget=s,t.relativeTargetOrigin=a,t.relativeParent=i)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:s,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function Pc(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function kc(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Tc(t){t.clearSnapshot()}function Ec(t){t.clearMeasurements()}function Ic(t){t.isLayoutDirty=!1}function Mc(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function jc(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Dc(t){t.resolveTargetDelta()}function Fc(t){t.calcProjection()}function Uc(t){t.resetSkewAndRotation()}function Rc(t){t.removeLeadSnapshot()}function Oc(t,e,n){t.translate=wn(e.translate,0,n),t.scale=wn(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Lc(t,e,n,i){t.min=wn(e.min,n.min,i),t.max=wn(e.max,n.max,i)}function Nc(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const Bc={duration:.45,ease:[.4,0,.1,1]},Vc=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),qc=Vc("applewebkit/")&&!Vc("chrome/")?Math.round:ne;function zc(t){t.min=qc(t.min),t.max=qc(t.max)}function _c(t,e,n){return"position"===t||"preserve-aspect"===t&&!function(t,e,n){return Math.abs(t-e)<=n}(hc(e),hc(n),.2)}function Gc(t){return t!==t.root&&t.scroll?.wasRoot}const $c=Ac({attachResizeListener:(t,e)=>ps(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Hc={current:void 0},Wc=Ac({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Hc.current){const t=new $c({});t.mount(window),t.setOptions({layoutScroll:!0}),Hc.current=t}return Hc.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>"fixed"===window.getComputedStyle(t).position}),Xc={pan:{Feature:class extends ss{constructor(){super(...arguments),this.removePointerDownListener=ne}onPointerDown(t){this.session=new As(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:bs(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:Ls(t),onStart:Ls(e),onMove:n,onEnd:(t,e)=>{delete this.session,i&&je.postRender(()=>i(t,e))}}}mount(){this.removePointerDownListener=ds(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends ss{constructor(t){super(t),this.removeGroupControls=ne,this.removeListeners=ne,this.controls=new Rs(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ne}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:Wc,MeasureLayout:Gs}};function Yc(t,e,n){const{props:i}=t;t.animationState&&i.whileHover&&t.animationState.setActive("whileHover","Start"===n);const r=i["onHover"+n];r&&je.postRender(()=>r(e,us(e)))}function Kc(t,e,n){const{props:i}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&i.whileTap&&t.animationState.setActive("whileTap","Start"===n);const r=i["onTap"+("End"===n?"":n)];r&&je.postRender(()=>r(e,us(e)))}const Zc=new WeakMap,Qc=new WeakMap,Jc=t=>{const e=Zc.get(t.target);e&&e(t)},tl=t=>{t.forEach(Jc)};function el(t,e,n){const i=function({root:t,...e}){const n=t||document;Qc.has(n)||Qc.set(n,{});const i=Qc.get(n),r=JSON.stringify(e);return i[r]||(i[r]=new IntersectionObserver(tl,{root:t,...e})),i[r]}(e);return Zc.set(t,n),i.observe(t),()=>{Zc.delete(t),i.unobserve(t)}}const nl={some:0,all:1};const il={inView:{Feature:class extends ss{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:i="some",once:r}=t,o={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof i?i:nl[i]};return el(this.node.current,o,t=>{const{isIntersecting:e}=t;if(this.isInView===e||(this.isInView=e,r&&!e&&this.hasEnteredView))return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:n,onViewportLeave:i}=this.node.getProps(),o=e?n:i;o&&o(t)})}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends ss{mount(){const{current:t}=this.node;t&&(this.unmount=qr(t,(t,e)=>(Kc(this.node,e,"Start"),(t,{success:e})=>Kc(this.node,t,e?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends ss{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=re(ps(this.node.current,"focus",()=>this.onFocus()),ps(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends ss{mount(){const{current:t}=this.node;t&&(this.unmount=function(t,e,n={}){const[i,r,o]=Dr(t,n),a=t=>{if(!Fr(t))return;const{target:n}=t,i=e(n,t);if("function"!=typeof i||!n)return;const o=t=>{Fr(t)&&(i(t),n.removeEventListener("pointerleave",o))};n.addEventListener("pointerleave",o,r)};return i.forEach(t=>{t.addEventListener("pointerenter",a,r)}),o}(t,(t,e)=>(Yc(this.node,e,"Start"),t=>Yc(this.node,t,"End"))))}unmount(){}}}},rl=oa({...ls,...il,...Xc,...{layout:{ProjectionNode:Wc,MeasureLayout:Gs}}},Ua);function ol(t,e){return new Promise(function(n,i){let r;return al(t).then(function(t){try{return r=t,n(new Blob([e.slice(0,2),r,e.slice(2)],{type:"image/jpeg"}))}catch(t){return i(t)}},i)})}const al=t=>new Promise((e,n)=>{const i=new FileReader;i.addEventListener("load",({target:{result:t}})=>{const i=new DataView(t);let r=0;if(65496!==i.getUint16(r))return n("not a valid JPEG");for(r+=2;;){const o=i.getUint16(r);if(65498===o)break;const a=i.getUint16(r+2);if(65505===o&&1165519206===i.getUint32(r+4)){const o=r+10;let s;switch(i.getUint16(o)){case 18761:s=!0;break;case 19789:s=!1;break;default:return n("TIFF header contains invalid endian")}if(42!==i.getUint16(o+2,s))return n("TIFF header contains invalid version");const c=i.getUint32(o+4,s),l=o+c+2+12*i.getUint16(o+c,s);for(let t=o+c+2;t<l;t+=12)if(274==i.getUint16(t,s)){if(3!==i.getUint16(t+2,s))return n("Orientation data type is invalid");if(1!==i.getUint32(t+4,s))return n("Orientation data count is invalid");i.setUint16(t+8,1,s);break}return e(t.slice(r,r+2+a))}r+=2+a}return e(new Blob)}),i.readAsArrayBuffer(t)});var sl,cl,ll,pl={},ul={get exports(){return pl},set exports(t){pl=t}};ll={},ul.exports=ll,ll.parse=function(t,e){for(var n=ll.bin.readUshort,i=ll.bin.readUint,r=0,o={},a=new Uint8Array(t),s=a.length-4;101010256!=i(a,s);)s--;r=s,r+=4;var c=n(a,r+=4);n(a,r+=2);var l=i(a,r+=2),p=i(a,r+=4);r+=4,r=p;for(var u=0;u<c;u++){i(a,r),r+=4,r+=4,r+=4,i(a,r+=4),l=i(a,r+=4);var d=i(a,r+=4),f=n(a,r+=4),m=n(a,r+2),h=n(a,r+4);r+=6;var g=i(a,r+=8);r+=4,r+=f+m+h,ll._readLocal(a,g,o,l,d,e)}return o},ll._readLocal=function(t,e,n,i,r,o){var a=ll.bin.readUshort,s=ll.bin.readUint;s(t,e),a(t,e+=4),a(t,e+=2);var c=a(t,e+=2);s(t,e+=2),s(t,e+=4),e+=4;var l=a(t,e+=8),p=a(t,e+=2);e+=2;var u=ll.bin.readUTF8(t,e,l);if(e+=l,e+=p,o)n[u]={size:r,csize:i};else{var d=new Uint8Array(t.buffer,e);if(0==c)n[u]=new Uint8Array(d.buffer.slice(e,e+i));else{if(8!=c)throw"unknown compression method: "+c;var f=new Uint8Array(r);ll.inflateRaw(d,f),n[u]=f}}},ll.inflateRaw=function(t,e){return ll.F.inflate(t,e)},ll.inflate=function(t,e){return t[0],t[1],ll.inflateRaw(new Uint8Array(t.buffer,t.byteOffset+2,t.length-6),e)},ll.deflate=function(t,e){null==e&&(e={level:6});var n=0,i=new Uint8Array(50+Math.floor(1.1*t.length));i[n]=120,i[n+1]=156,n+=2,n=ll.F.deflateRaw(t,i,n,e.level);var r=ll.adler(t,0,t.length);return i[n+0]=r>>>24&255,i[n+1]=r>>>16&255,i[n+2]=r>>>8&255,i[n+3]=r>>>0&255,new Uint8Array(i.buffer,0,n+4)},ll.deflateRaw=function(t,e){null==e&&(e={level:6});var n=new Uint8Array(50+Math.floor(1.1*t.length)),i=ll.F.deflateRaw(t,n,i,e.level);return new Uint8Array(n.buffer,0,i)},ll.encode=function(t,e){null==e&&(e=!1);var n=0,i=ll.bin.writeUint,r=ll.bin.writeUshort,o={};for(var a in t){var s=!ll._noNeed(a)&&!e,c=t[a],l=ll.crc.crc(c,0,c.length);o[a]={cpr:s,usize:c.length,crc:l,file:s?ll.deflateRaw(c):c}}for(var a in o)n+=o[a].file.length+30+46+2*ll.bin.sizeUTF8(a);n+=22;var p=new Uint8Array(n),u=0,d=[];for(var a in o){var f=o[a];d.push(u),u=ll._writeHeader(p,u,a,f,0)}var m=0,h=u;for(var a in o)f=o[a],d.push(u),u=ll._writeHeader(p,u,a,f,1,d[m++]);var g=u-h;return i(p,u,101010256),u+=4,r(p,u+=4,m),r(p,u+=2,m),i(p,u+=2,g),i(p,u+=4,h),u+=4,u+=2,p.buffer},ll._noNeed=function(t){var e=t.split(".").pop().toLowerCase();return-1!="png,jpg,jpeg,zip".indexOf(e)},ll._writeHeader=function(t,e,n,i,r,o){var a=ll.bin.writeUint,s=ll.bin.writeUshort,c=i.file;return a(t,e,0==r?67324752:33639248),e+=4,1==r&&(e+=2),s(t,e,20),s(t,e+=2,0),s(t,e+=2,i.cpr?8:0),a(t,e+=2,0),a(t,e+=4,i.crc),a(t,e+=4,c.length),a(t,e+=4,i.usize),s(t,e+=4,ll.bin.sizeUTF8(n)),s(t,e+=2,0),e+=2,1==r&&(e+=2,e+=2,a(t,e+=6,o),e+=4),e+=ll.bin.writeUTF8(t,e,n),0==r&&(t.set(c,e),e+=c.length),e},ll.crc={table:function(){for(var t=new Uint32Array(256),e=0;e<256;e++){for(var n=e,i=0;i<8;i++)1&n?n=3988292384^n>>>1:n>>>=1;t[e]=n}return t}(),update:function(t,e,n,i){for(var r=0;r<i;r++)t=ll.crc.table[255&(t^e[n+r])]^t>>>8;return t},crc:function(t,e,n){return 4294967295^ll.crc.update(4294967295,t,e,n)}},ll.adler=function(t,e,n){for(var i=1,r=0,o=e,a=e+n;o<a;){for(var s=Math.min(o+5552,a);o<s;)r+=i+=t[o++];i%=65521,r%=65521}return r<<16|i},ll.bin={readUshort:function(t,e){return t[e]|t[e+1]<<8},writeUshort:function(t,e,n){t[e]=255&n,t[e+1]=n>>8&255},readUint:function(t,e){return 16777216*t[e+3]+(t[e+2]<<16|t[e+1]<<8|t[e])},writeUint:function(t,e,n){t[e]=255&n,t[e+1]=n>>8&255,t[e+2]=n>>16&255,t[e+3]=n>>24&255},readASCII:function(t,e,n){for(var i="",r=0;r<n;r++)i+=String.fromCharCode(t[e+r]);return i},writeASCII:function(t,e,n){for(var i=0;i<n.length;i++)t[e+i]=n.charCodeAt(i)},pad:function(t){return t.length<2?"0"+t:t},readUTF8:function(t,e,n){for(var i,r="",o=0;o<n;o++)r+="%"+ll.bin.pad(t[e+o].toString(16));try{i=decodeURIComponent(r)}catch{return ll.bin.readASCII(t,e,n)}return i},writeUTF8:function(t,e,n){for(var i=n.length,r=0,o=0;o<i;o++){var a=n.charCodeAt(o);if(4294967168&a)if(4294965248&a)if(4294901760&a){if(4292870144&a)throw"e";t[e+r]=240|a>>18,t[e+r+1]=128|a>>12&63,t[e+r+2]=128|a>>6&63,t[e+r+3]=128|63&a,r+=4}else t[e+r]=224|a>>12,t[e+r+1]=128|a>>6&63,t[e+r+2]=128|63&a,r+=3;else t[e+r]=192|a>>6,t[e+r+1]=128|63&a,r+=2;else t[e+r]=a,r++}return r},sizeUTF8:function(t){for(var e=t.length,n=0,i=0;i<e;i++){var r=t.charCodeAt(i);if(4294967168&r)if(4294965248&r)if(4294901760&r){if(4292870144&r)throw"e";n+=4}else n+=3;else n+=2;else n++}return n}},ll.F={},ll.F.deflateRaw=function(t,e,n,i){var r=[[0,0,0,0,0],[4,4,8,4,0],[4,5,16,8,0],[4,6,16,16,0],[4,10,16,32,0],[8,16,32,32,0],[8,16,128,128,0],[8,32,128,256,0],[32,128,258,1024,1],[32,258,258,4096,1]][i],o=ll.F.U,a=ll.F._goodIndex;ll.F._hash;var s=ll.F._putsE,c=0,l=n<<3,p=0,u=t.length;if(0==i){for(;c<u;)s(e,l,c+(S=Math.min(65535,u-c))==u?1:0),l=ll.F._copyExact(t,c,S,e,l+8),c+=S;return l>>>3}var d=o.lits,f=o.strt,m=o.prev,h=0,g=0,v=0,x=0,y=0,b=0;for(u>2&&(f[b=ll.F._hash(t,0)]=0),c=0;c<u;c++){if(y=b,c+1<u-2){b=ll.F._hash(t,c+1);var w=c+1&32767;m[w]=f[b],f[b]=w}if(p<=c){(h>14e3||g>26697)&&u-c>100&&(p<c&&(d[h]=c-p,h+=2,p=c),l=ll.F._writeBlock(c==u-1||p==u?1:0,d,h,x,t,v,c-v,e,l),h=g=x=0,v=c);var A=0;c<u-2&&(A=ll.F._bestMatch(t,c,m,y,Math.min(r[2],u-c),r[3]));var S=A>>>16,C=65535&A;if(0!=A){C=65535&A;var P=a(S=A>>>16,o.of0);o.lhst[257+P]++;var k=a(C,o.df0);o.dhst[k]++,x+=o.exb[P]+o.dxb[k],d[h]=S<<23|c-p,d[h+1]=C<<16|P<<8|k,h+=2,p=c+S}else o.lhst[t[c]]++;g++}}for(v==c&&0!=t.length||(p<c&&(d[h]=c-p,h+=2,p=c),l=ll.F._writeBlock(1,d,h,x,t,v,c-v,e,l),h=0,g=0,h=g=x=0,v=c);7&l;)l++;return l>>>3},ll.F._bestMatch=function(t,e,n,i,r,o){var a=32767&e,s=n[a],c=a-s+32768&32767;if(s==a||i!=ll.F._hash(t,e-c))return 0;for(var l=0,p=0,u=Math.min(32767,e);c<=u&&0!=--o&&s!=a;){if(0==l||t[e+l]==t[e+l-c]){var d=ll.F._howLong(t,e,c);if(d>l){if(p=c,(l=d)>=r)break;c+2<d&&(d=c+2);for(var f=0,m=0;m<d-2;m++){var h=e-c+m+32768&32767,g=h-n[h]+32768&32767;g>f&&(f=g,s=h)}}}c+=(a=s)-(s=n[a])+32768&32767}return l<<16|p},ll.F._howLong=function(t,e,n){if(t[e]!=t[e-n]||t[e+1]!=t[e+1-n]||t[e+2]!=t[e+2-n])return 0;var i=e,r=Math.min(t.length,e+258);for(e+=3;e<r&&t[e]==t[e-n];)e++;return e-i},ll.F._hash=function(t,e){return(t[e]<<8|t[e+1])+(t[e+2]<<4)&65535},ll.saved=0,ll.F._writeBlock=function(t,e,n,i,r,o,a,s,c){var l,p,u,d,f,m,h,g,v,x=ll.F.U,y=ll.F._putsF,b=ll.F._putsE;x.lhst[256]++,p=(l=ll.F.getTrees())[0],u=l[1],d=l[2],f=l[3],m=l[4],h=l[5],g=l[6],v=l[7];var w=32+(c+3&7?8-(c+3&7):0)+(a<<3),A=i+ll.F.contSize(x.fltree,x.lhst)+ll.F.contSize(x.fdtree,x.dhst),S=i+ll.F.contSize(x.ltree,x.lhst)+ll.F.contSize(x.dtree,x.dhst);S+=14+3*h+ll.F.contSize(x.itree,x.ihst)+(2*x.ihst[16]+3*x.ihst[17]+7*x.ihst[18]);for(var C=0;C<286;C++)x.lhst[C]=0;for(C=0;C<30;C++)x.dhst[C]=0;for(C=0;C<19;C++)x.ihst[C]=0;var P=w<A&&w<S?0:A<S?1:2;if(y(s,c,t),y(s,c+1,P),c+=3,0==P){for(;7&c;)c++;c=ll.F._copyExact(r,o,a,s,c)}else{var k,T;if(1==P&&(k=x.fltree,T=x.fdtree),2==P){ll.F.makeCodes(x.ltree,p),ll.F.revCodes(x.ltree,p),ll.F.makeCodes(x.dtree,u),ll.F.revCodes(x.dtree,u),ll.F.makeCodes(x.itree,d),ll.F.revCodes(x.itree,d),k=x.ltree,T=x.dtree,b(s,c,f-257),b(s,c+=5,m-1),b(s,c+=5,h-4),c+=4;for(var E=0;E<h;E++)b(s,c+3*E,x.itree[1+(x.ordr[E]<<1)]);c+=3*h,c=ll.F._codeTiny(g,x.itree,s,c),c=ll.F._codeTiny(v,x.itree,s,c)}for(var I=o,M=0;M<n;M+=2){for(var j=e[M],D=j>>>23,F=I+(8388607&j);I<F;)c=ll.F._writeLit(r[I++],k,s,c);if(0!=D){var U=e[M+1],R=U>>16,O=U>>8&255,L=255&U;b(s,c=ll.F._writeLit(257+O,k,s,c),D-x.of0[O]),c+=x.exb[O],y(s,c=ll.F._writeLit(L,T,s,c),R-x.df0[L]),c+=x.dxb[L],I+=D}}c=ll.F._writeLit(256,k,s,c)}return c},ll.F._copyExact=function(t,e,n,i,r){var o=r>>>3;return i[o]=n,i[o+1]=n>>>8,i[o+2]=255-i[o],i[o+3]=255-i[o+1],o+=4,i.set(new Uint8Array(t.buffer,e,n),o),r+(n+4<<3)},ll.F.getTrees=function(){for(var t=ll.F.U,e=ll.F._hufTree(t.lhst,t.ltree,15),n=ll.F._hufTree(t.dhst,t.dtree,15),i=[],r=ll.F._lenCodes(t.ltree,i),o=[],a=ll.F._lenCodes(t.dtree,o),s=0;s<i.length;s+=2)t.ihst[i[s]]++;for(s=0;s<o.length;s+=2)t.ihst[o[s]]++;for(var c=ll.F._hufTree(t.ihst,t.itree,7),l=19;l>4&&0==t.itree[1+(t.ordr[l-1]<<1)];)l--;return[e,n,c,r,a,l,i,o]},ll.F.getSecond=function(t){for(var e=[],n=0;n<t.length;n+=2)e.push(t[n+1]);return e},ll.F.nonZero=function(t){for(var e="",n=0;n<t.length;n+=2)0!=t[n+1]&&(e+=(n>>1)+",");return e},ll.F.contSize=function(t,e){for(var n=0,i=0;i<e.length;i++)n+=e[i]*t[1+(i<<1)];return n},ll.F._codeTiny=function(t,e,n,i){for(var r=0;r<t.length;r+=2){var o=t[r],a=t[r+1];i=ll.F._writeLit(o,e,n,i);var s=16==o?2:17==o?3:7;o>15&&(ll.F._putsE(n,i,a,s),i+=s)}return i},ll.F._lenCodes=function(t,e){for(var n=t.length;2!=n&&0==t[n-1];)n-=2;for(var i=0;i<n;i+=2){var r=t[i+1],o=i+3<n?t[i+3]:-1,a=i+5<n?t[i+5]:-1,s=0==i?-1:t[i-1];if(0==r&&o==r&&a==r){for(var c=i+5;c+2<n&&t[c+2]==r;)c+=2;(l=Math.min(c+1-i>>>1,138))<11?e.push(17,l-3):e.push(18,l-11),i+=2*l-2}else if(r==s&&o==r&&a==r){for(c=i+5;c+2<n&&t[c+2]==r;)c+=2;var l=Math.min(c+1-i>>>1,6);e.push(16,l-3),i+=2*l-2}else e.push(r,0)}return n>>>1},ll.F._hufTree=function(t,e,n){var i=[],r=t.length,o=e.length,a=0;for(a=0;a<o;a+=2)e[a]=0,e[a+1]=0;for(a=0;a<r;a++)0!=t[a]&&i.push({lit:a,f:t[a]});var s=i.length,c=i.slice(0);if(0==s)return 0;if(1==s){var l=i[0].lit;return c=0==l?1:0,e[1+(l<<1)]=1,e[1+(c<<1)]=1,1}i.sort(function(t,e){return t.f-e.f});var p=i[0],u=i[1],d=0,f=1,m=2;for(i[0]={lit:-1,f:p.f+u.f,l:p,r:u,d:0};f!=s-1;)p=d!=f&&(m==s||i[d].f<i[m].f)?i[d++]:i[m++],u=d!=f&&(m==s||i[d].f<i[m].f)?i[d++]:i[m++],i[f++]={lit:-1,f:p.f+u.f,l:p,r:u};var h=ll.F.setDepth(i[f-1],0);for(h>n&&(ll.F.restrictDepth(c,n,h),h=n),a=0;a<s;a++)e[1+(c[a].lit<<1)]=c[a].d;return h},ll.F.setDepth=function(t,e){return-1!=t.lit?(t.d=e,e):Math.max(ll.F.setDepth(t.l,e+1),ll.F.setDepth(t.r,e+1))},ll.F.restrictDepth=function(t,e,n){var i=0,r=1<<n-e,o=0;for(t.sort(function(t,e){return e.d==t.d?t.f-e.f:e.d-t.d}),i=0;i<t.length&&t[i].d>e;i++){var a=t[i].d;t[i].d=e,o+=r-(1<<n-a)}for(o>>>=n-e;o>0;)(a=t[i].d)<e?(t[i].d++,o-=1<<e-a-1):i++;for(;i>=0;i--)t[i].d==e&&o<0&&(t[i].d--,o++);0!=o&&console.log("debt left")},ll.F._goodIndex=function(t,e){var n=0;return e[16|n]<=t&&(n|=16),e[8|n]<=t&&(n|=8),e[4|n]<=t&&(n|=4),e[2|n]<=t&&(n|=2),e[1|n]<=t&&(n|=1),n},ll.F._writeLit=function(t,e,n,i){return ll.F._putsF(n,i,e[t<<1]),i+e[1+(t<<1)]},ll.F.inflate=function(t,e){var n=Uint8Array;if(3==t[0]&&0==t[1])return e||new n(0);var i=ll.F,r=i._bitsF,o=i._bitsE,a=i._decodeTiny,s=i.makeCodes,c=i.codes2map,l=i._get17,p=i.U,u=null==e;u&&(e=new n(t.length>>>2<<3));for(var d,f,m=0,h=0,g=0,v=0,x=0,y=0,b=0,w=0,A=0;0==m;)if(m=r(t,A,1),h=r(t,A+1,2),A+=3,0!=h){if(u&&(e=ll.F._check(e,w+(1<<17))),1==h&&(d=p.flmap,f=p.fdmap,y=511,b=31),2==h){g=o(t,A,5)+257,v=o(t,A+5,5)+1,x=o(t,A+10,4)+4,A+=14;for(var S=0;S<38;S+=2)p.itree[S]=0,p.itree[S+1]=0;var C=1;for(S=0;S<x;S++){var P=o(t,A+3*S,3);p.itree[1+(p.ordr[S]<<1)]=P,P>C&&(C=P)}A+=3*x,s(p.itree,C),c(p.itree,C,p.imap),d=p.lmap,f=p.dmap,A=a(p.imap,(1<<C)-1,g+v,t,A,p.ttree);var k=i._copyOut(p.ttree,0,g,p.ltree);y=(1<<k)-1;var T=i._copyOut(p.ttree,g,v,p.dtree);b=(1<<T)-1,s(p.ltree,k),c(p.ltree,k,d),s(p.dtree,T),c(p.dtree,T,f)}for(;;){var E=d[l(t,A)&y];A+=15&E;var I=E>>>4;if(I>>>8){if(256==I)break;var M=w+I-254;if(I>264){var j=p.ldef[I-257];M=w+(j>>>3)+o(t,A,7&j),A+=7&j}var D=f[l(t,A)&b];A+=15&D;var F=D>>>4,U=p.ddef[F],R=(U>>>4)+r(t,A,15&U);for(A+=15&U,u&&(e=ll.F._check(e,w+(1<<17)));w<M;)e[w]=e[w++-R],e[w]=e[w++-R],e[w]=e[w++-R],e[w]=e[w++-R];w=M}else e[w++]=I}}else{7&A&&(A+=8-(7&A));var O=4+(A>>>3),L=t[O-4]|t[O-3]<<8;u&&(e=ll.F._check(e,w+L)),e.set(new n(t.buffer,t.byteOffset+O,L),w),A=O+L<<3,w+=L}return e.length==w?e:e.slice(0,w)},ll.F._check=function(t,e){var n=t.length;if(e<=n)return t;var i=new Uint8Array(Math.max(n<<1,e));return i.set(t,0),i},ll.F._decodeTiny=function(t,e,n,i,r,o){for(var a=ll.F._bitsE,s=ll.F._get17,c=0;c<n;){var l=t[s(i,r)&e];r+=15&l;var p=l>>>4;if(p<=15)o[c]=p,c++;else{var u=0,d=0;16==p?(d=3+a(i,r,2),r+=2,u=o[c-1]):17==p?(d=3+a(i,r,3),r+=3):18==p&&(d=11+a(i,r,7),r+=7);for(var f=c+d;c<f;)o[c]=u,c++}}return r},ll.F._copyOut=function(t,e,n,i){for(var r=0,o=0,a=i.length>>>1;o<n;){var s=t[o+e];i[o<<1]=0,i[1+(o<<1)]=s,s>r&&(r=s),o++}for(;o<a;)i[o<<1]=0,i[1+(o<<1)]=0,o++;return r},ll.F.makeCodes=function(t,e){for(var n,i,r,o,a=ll.F.U,s=t.length,c=a.bl_count,l=0;l<=e;l++)c[l]=0;for(l=1;l<s;l+=2)c[t[l]]++;var p=a.next_code;for(n=0,c[0]=0,i=1;i<=e;i++)n=n+c[i-1]<<1,p[i]=n;for(r=0;r<s;r+=2)0!=(o=t[r+1])&&(t[r]=p[o],p[o]++)},ll.F.codes2map=function(t,e,n){for(var i=t.length,r=ll.F.U.rev15,o=0;o<i;o+=2)if(0!=t[o+1])for(var a=o>>1,s=t[o+1],c=a<<4|s,l=e-s,p=t[o]<<l,u=p+(1<<l);p!=u;)n[r[p]>>>15-e]=c,p++},ll.F.revCodes=function(t,e){for(var n=ll.F.U.rev15,i=15-e,r=0;r<t.length;r+=2){var o=t[r]<<e-t[r+1];t[r]=n[o]>>>i}},ll.F._putsE=function(t,e,n){n<<=7&e;var i=e>>>3;t[i]|=n,t[i+1]|=n>>>8},ll.F._putsF=function(t,e,n){n<<=7&e;var i=e>>>3;t[i]|=n,t[i+1]|=n>>>8,t[i+2]|=n>>>16},ll.F._bitsE=function(t,e,n){return(t[e>>>3]|t[1+(e>>>3)]<<8)>>>(7&e)&(1<<n)-1},ll.F._bitsF=function(t,e,n){return(t[e>>>3]|t[1+(e>>>3)]<<8|t[2+(e>>>3)]<<16)>>>(7&e)&(1<<n)-1},ll.F._get17=function(t,e){return(t[e>>>3]|t[1+(e>>>3)]<<8|t[2+(e>>>3)]<<16)>>>(7&e)},ll.F._get25=function(t,e){return(t[e>>>3]|t[1+(e>>>3)]<<8|t[2+(e>>>3)]<<16|t[3+(e>>>3)]<<24)>>>(7&e)},ll.F.U=(sl=Uint16Array,cl=Uint32Array,{next_code:new sl(16),bl_count:new sl(16),ordr:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],of0:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],exb:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],ldef:new sl(32),df0:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],dxb:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],ddef:new cl(32),flmap:new sl(512),fltree:[],fdmap:new sl(32),fdtree:[],lmap:new sl(32768),ltree:[],ttree:[],dmap:new sl(32768),dtree:[],imap:new sl(512),itree:[],rev15:new sl(32768),lhst:new cl(286),dhst:new cl(30),ihst:new cl(19),lits:new cl(15e3),strt:new sl(65536),prev:new sl(32768)}),function(){for(var t=ll.F.U,e=0;e<32768;e++){var n=e;n=(4278255360&(n=(4042322160&(n=(3435973836&(n=(2863311530&n)>>>1|(1431655765&n)<<1))>>>2|(858993459&n)<<2))>>>4|(252645135&n)<<4))>>>8|(16711935&n)<<8,t.rev15[e]=(n>>>16|n<<16)>>>17}function i(t,e,n){for(;0!=e--;)t.push(0,n)}for(e=0;e<32;e++)t.ldef[e]=t.of0[e]<<3|t.exb[e],t.ddef[e]=t.df0[e]<<4|t.dxb[e];i(t.fltree,144,8),i(t.fltree,112,9),i(t.fltree,24,7),i(t.fltree,8,8),ll.F.makeCodes(t.fltree,9),ll.F.codes2map(t.fltree,9,t.flmap),ll.F.revCodes(t.fltree,9),i(t.fdtree,32,5),ll.F.makeCodes(t.fdtree,5),ll.F.codes2map(t.fdtree,5,t.fdmap),ll.F.revCodes(t.fdtree,5),i(t.itree,19,0),i(t.ltree,286,0),i(t.dtree,30,0),i(t.ttree,320,0)}();var dl=function(t,e){return e.forEach(function(e){e&&"string"!=typeof e&&!Array.isArray(e)&&Object.keys(e).forEach(function(n){if("default"!==n&&!(n in t)){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}})}),Object.freeze(t)}({__proto__:null,default:pl},[pl]);const fl=function(){var t={nextZero(t,e){for(;0!=t[e];)e++;return e},readUshort:(t,e)=>t[e]<<8|t[e+1],writeUshort(t,e,n){t[e]=n>>8&255,t[e+1]=255&n},readUint:(t,e)=>16777216*t[e]+(t[e+1]<<16|t[e+2]<<8|t[e+3]),writeUint(t,e,n){t[e]=n>>24&255,t[e+1]=n>>16&255,t[e+2]=n>>8&255,t[e+3]=255&n},readASCII(t,e,n){let i="";for(let r=0;r<n;r++)i+=String.fromCharCode(t[e+r]);return i},writeASCII(t,e,n){for(let i=0;i<n.length;i++)t[e+i]=n.charCodeAt(i)},readBytes(t,e,n){const i=[];for(let r=0;r<n;r++)i.push(t[e+r]);return i},pad:t=>t.length<2?`0${t}`:t,readUTF8(e,n,i){let r,o="";for(let r=0;r<i;r++)o+=`%${t.pad(e[n+r].toString(16))}`;try{r=decodeURIComponent(o)}catch{return t.readASCII(e,n,i)}return r}};function e(e,n,i,r){const a=n*i,s=o(r),c=Math.ceil(n*s/8),l=new Uint8Array(4*a),p=new Uint32Array(l.buffer),{ctype:u}=r,{depth:d}=r,f=t.readUshort;if(6==u){const t=a<<2;if(8==d)for(var m=0;m<t;m+=4)l[m]=e[m],l[m+1]=e[m+1],l[m+2]=e[m+2],l[m+3]=e[m+3];if(16==d)for(m=0;m<t;m++)l[m]=e[m<<1]}else if(2==u){const t=r.tabs.tRNS;if(null==t){if(8==d)for(m=0;m<a;m++){var h=3*m;p[m]=255<<24|e[h+2]<<16|e[h+1]<<8|e[h]}if(16==d)for(m=0;m<a;m++)h=6*m,p[m]=255<<24|e[h+4]<<16|e[h+2]<<8|e[h]}else{var g=t[0];const n=t[1],i=t[2];if(8==d)for(m=0;m<a;m++){var v=m<<2;h=3*m,p[m]=255<<24|e[h+2]<<16|e[h+1]<<8|e[h],e[h]==g&&e[h+1]==n&&e[h+2]==i&&(l[v+3]=0)}if(16==d)for(m=0;m<a;m++)v=m<<2,h=6*m,p[m]=255<<24|e[h+4]<<16|e[h+2]<<8|e[h],f(e,h)==g&&f(e,h+2)==n&&f(e,h+4)==i&&(l[v+3]=0)}}else if(3==u){const t=r.tabs.PLTE,o=r.tabs.tRNS,s=o?o.length:0;if(1==d)for(var x=0;x<i;x++){var y=x*c,b=x*n;for(m=0;m<n;m++){v=b+m<<2;var w=3*(A=e[y+(m>>3)]>>7-(7&m)&1);l[v]=t[w],l[v+1]=t[w+1],l[v+2]=t[w+2],l[v+3]=A<s?o[A]:255}}if(2==d)for(x=0;x<i;x++)for(y=x*c,b=x*n,m=0;m<n;m++)v=b+m<<2,w=3*(A=e[y+(m>>2)]>>6-((3&m)<<1)&3),l[v]=t[w],l[v+1]=t[w+1],l[v+2]=t[w+2],l[v+3]=A<s?o[A]:255;if(4==d)for(x=0;x<i;x++)for(y=x*c,b=x*n,m=0;m<n;m++)v=b+m<<2,w=3*(A=e[y+(m>>1)]>>4-((1&m)<<2)&15),l[v]=t[w],l[v+1]=t[w+1],l[v+2]=t[w+2],l[v+3]=A<s?o[A]:255;if(8==d)for(m=0;m<a;m++){var A;v=m<<2,w=3*(A=e[m]),l[v]=t[w],l[v+1]=t[w+1],l[v+2]=t[w+2],l[v+3]=A<s?o[A]:255}}else if(4==u){if(8==d)for(m=0;m<a;m++){v=m<<2;var S=e[C=m<<1];l[v]=S,l[v+1]=S,l[v+2]=S,l[v+3]=e[C+1]}if(16==d)for(m=0;m<a;m++){var C;v=m<<2,S=e[C=m<<2],l[v]=S,l[v+1]=S,l[v+2]=S,l[v+3]=e[C+2]}}else if(0==u)for(g=r.tabs.tRNS?r.tabs.tRNS:-1,x=0;x<i;x++){const t=x*c,i=x*n;if(1==d)for(var P=0;P<n;P++){var k=(S=255*(e[t+(P>>>3)]>>>7-(7&P)&1))==255*g?0:255;p[i+P]=k<<24|S<<16|S<<8|S}else if(2==d)for(P=0;P<n;P++)k=(S=85*(e[t+(P>>>2)]>>>6-((3&P)<<1)&3))==85*g?0:255,p[i+P]=k<<24|S<<16|S<<8|S;else if(4==d)for(P=0;P<n;P++)k=(S=17*(e[t+(P>>>1)]>>>4-((1&P)<<2)&15))==17*g?0:255,p[i+P]=k<<24|S<<16|S<<8|S;else if(8==d)for(P=0;P<n;P++)k=(S=e[t+P])==g?0:255,p[i+P]=k<<24|S<<16|S<<8|S;else if(16==d)for(P=0;P<n;P++)S=e[t+(P<<1)],k=f(e,t+(P<<1))==g?0:255,p[i+P]=k<<24|S<<16|S<<8|S}return l}function n(t,e,n,s){const c=o(t),l=Math.ceil(n*c/8),p=new Uint8Array((l+1+t.interlace)*s);return e=t.tabs.CgBI?r(e,p):i(e,p),0==t.interlace?e=a(e,t,0,n,s):1==t.interlace&&(e=function(t,e){const n=e.width,i=e.height,r=o(e),s=r>>3,c=Math.ceil(n*r/8),l=new Uint8Array(i*c);let p=0;const u=[0,0,4,0,2,0,1],d=[0,4,0,2,0,1,0],f=[8,8,8,4,4,2,2],m=[8,8,4,4,2,2,1];let h=0;for(;h<7;){const o=f[h],v=m[h];let x=0,y=0,b=u[h];for(;b<i;)b+=o,y++;let w=d[h];for(;w<n;)w+=v,x++;const A=Math.ceil(x*r/8);a(t,e,p,x,y);let S=0,C=u[h];for(;C<i;){let e=d[h],i=p+S*A<<3;for(;e<n;){var g;if(1==r&&(g=(g=t[i>>3])>>7-(7&i)&1,l[C*c+(e>>3)]|=g<<7-(7&e)),2==r&&(g=(g=t[i>>3])>>6-(7&i)&3,l[C*c+(e>>2)]|=g<<6-((3&e)<<1)),4==r&&(g=(g=t[i>>3])>>4-(7&i)&15,l[C*c+(e>>1)]|=g<<4-((1&e)<<2)),r>=8){const n=C*c+e*s;for(let e=0;e<s;e++)l[n+e]=t[(i>>3)+e]}i+=r,e+=v}S++,C+=o}x*y!=0&&(p+=y*(1+A)),h+=1}return l}(e,t)),e}function i(t,e){return r(new Uint8Array(t.buffer,2,t.length-6),e)}var r=function(){const t={H:{}};return t.H.N=function(e,n){const i=Uint8Array;let r,o,a=0,s=0,c=0,l=0,p=0,u=0,d=0,f=0,m=0;if(3==e[0]&&0==e[1])return n||new i(0);const h=t.H,g=h.b,v=h.e,x=h.R,y=h.n,b=h.A,w=h.Z,A=h.m,S=null==n;for(S&&(n=new i(e.length>>>2<<5));0==a;)if(a=g(e,m,1),s=g(e,m+1,2),m+=3,0!=s){if(S&&(n=t.H.W(n,f+(1<<17))),1==s&&(r=A.J,o=A.h,u=511,d=31),2==s){c=v(e,m,5)+257,l=v(e,m+5,5)+1,p=v(e,m+10,4)+4,m+=14;let t=1;for(var C=0;C<38;C+=2)A.Q[C]=0,A.Q[C+1]=0;for(C=0;C<p;C++){const n=v(e,m+3*C,3);A.Q[1+(A.X[C]<<1)]=n,n>t&&(t=n)}m+=3*p,y(A.Q,t),b(A.Q,t,A.u),r=A.w,o=A.d,m=x(A.u,(1<<t)-1,c+l,e,m,A.v);const n=h.V(A.v,0,c,A.C);u=(1<<n)-1;const i=h.V(A.v,c,l,A.D);d=(1<<i)-1,y(A.C,n),b(A.C,n,r),y(A.D,i),b(A.D,i,o)}for(;;){const t=r[w(e,m)&u];m+=15&t;const i=t>>>4;if(i>>>8){if(256==i)break;{let t=f+i-254;if(i>264){const n=A.q[i-257];t=f+(n>>>3)+v(e,m,7&n),m+=7&n}const r=o[w(e,m)&d];m+=15&r;const a=r>>>4,s=A.c[a],c=(s>>>4)+g(e,m,15&s);for(m+=15&s;f<t;)n[f]=n[f++-c],n[f]=n[f++-c],n[f]=n[f++-c],n[f]=n[f++-c];f=t}}else n[f++]=i}}else{7&m&&(m+=8-(7&m));const r=4+(m>>>3),o=e[r-4]|e[r-3]<<8;S&&(n=t.H.W(n,f+o)),n.set(new i(e.buffer,e.byteOffset+r,o),f),m=r+o<<3,f+=o}return n.length==f?n:n.slice(0,f)},t.H.W=function(t,e){const n=t.length;if(e<=n)return t;const i=new Uint8Array(n<<1);return i.set(t,0),i},t.H.R=function(e,n,i,r,o,a){const s=t.H.e,c=t.H.Z;let l=0;for(;l<i;){const t=e[c(r,o)&n];o+=15&t;const i=t>>>4;if(i<=15)a[l]=i,l++;else{let t=0,e=0;16==i?(e=3+s(r,o,2),o+=2,t=a[l-1]):17==i?(e=3+s(r,o,3),o+=3):18==i&&(e=11+s(r,o,7),o+=7);const n=l+e;for(;l<n;)a[l]=t,l++}}return o},t.H.V=function(t,e,n,i){let r=0,o=0;const a=i.length>>>1;for(;o<n;){const n=t[o+e];i[o<<1]=0,i[1+(o<<1)]=n,n>r&&(r=n),o++}for(;o<a;)i[o<<1]=0,i[1+(o<<1)]=0,o++;return r},t.H.n=function(e,n){const i=t.H.m,r=e.length;let o,a,s,c;const l=i.j;for(var p=0;p<=n;p++)l[p]=0;for(p=1;p<r;p+=2)l[e[p]]++;const u=i.K;for(o=0,l[0]=0,a=1;a<=n;a++)o=o+l[a-1]<<1,u[a]=o;for(s=0;s<r;s+=2)c=e[s+1],0!=c&&(e[s]=u[c],u[c]++)},t.H.A=function(e,n,i){const r=e.length,o=t.H.m.r;for(let t=0;t<r;t+=2)if(0!=e[t+1]){const r=t>>1,a=e[t+1],s=r<<4|a,c=n-a;let l=e[t]<<c;const p=l+(1<<c);for(;l!=p;)i[o[l]>>>15-n]=s,l++}},t.H.l=function(e,n){const i=t.H.m.r,r=15-n;for(let t=0;t<e.length;t+=2){const o=e[t]<<n-e[t+1];e[t]=i[o]>>>r}},t.H.M=function(t,e,n){n<<=7&e;const i=e>>>3;t[i]|=n,t[i+1]|=n>>>8},t.H.I=function(t,e,n){n<<=7&e;const i=e>>>3;t[i]|=n,t[i+1]|=n>>>8,t[i+2]|=n>>>16},t.H.e=function(t,e,n){return(t[e>>>3]|t[1+(e>>>3)]<<8)>>>(7&e)&(1<<n)-1},t.H.b=function(t,e,n){return(t[e>>>3]|t[1+(e>>>3)]<<8|t[2+(e>>>3)]<<16)>>>(7&e)&(1<<n)-1},t.H.Z=function(t,e){return(t[e>>>3]|t[1+(e>>>3)]<<8|t[2+(e>>>3)]<<16)>>>(7&e)},t.H.i=function(t,e){return(t[e>>>3]|t[1+(e>>>3)]<<8|t[2+(e>>>3)]<<16|t[3+(e>>>3)]<<24)>>>(7&e)},t.H.m=function(){const t=Uint16Array,e=Uint32Array;return{K:new t(16),j:new t(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new t(32),p:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new e(32),J:new t(512),_:[],h:new t(32),$:[],w:new t(32768),C:[],v:[],d:new t(32768),D:[],u:new t(512),Q:[],r:new t(32768),s:new e(286),Y:new e(30),a:new e(19),t:new e(15e3),k:new t(65536),g:new t(32768)}}(),function(){const e=t.H.m;for(var n=0;n<32768;n++){let t=n;t=(2863311530&t)>>>1|(1431655765&t)<<1,t=(3435973836&t)>>>2|(858993459&t)<<2,t=(4042322160&t)>>>4|(252645135&t)<<4,t=(4278255360&t)>>>8|(16711935&t)<<8,e.r[n]=(t>>>16|t<<16)>>>17}function i(t,e,n){for(;0!=e--;)t.push(0,n)}for(n=0;n<32;n++)e.q[n]=e.S[n]<<3|e.T[n],e.c[n]=e.p[n]<<4|e.z[n];i(e._,144,8),i(e._,112,9),i(e._,24,7),i(e._,8,8),t.H.n(e._,9),t.H.A(e._,9,e.J),t.H.l(e._,9),i(e.$,32,5),t.H.n(e.$,5),t.H.A(e.$,5,e.h),t.H.l(e.$,5),i(e.Q,19,0),i(e.C,286,0),i(e.D,30,0),i(e.v,320,0)}(),t.H.N}();function o(t){return[1,null,3,1,2,null,4][t.ctype]*t.depth}function a(t,e,n,i,r){let a=o(e);const c=Math.ceil(i*a/8);let l,p;a=Math.ceil(a/8);let u=t[n],d=0;if(u>1&&(t[n]=[0,0,1][u-2]),3==u)for(d=a;d<c;d++)t[d+1]=t[d+1]+(t[d+1-a]>>>1)&255;for(let e=0;e<r;e++)if(l=n+e*c,p=l+e+1,u=t[p-1],d=0,0==u)for(;d<c;d++)t[l+d]=t[p+d];else if(1==u){for(;d<a;d++)t[l+d]=t[p+d];for(;d<c;d++)t[l+d]=t[p+d]+t[l+d-a]}else if(2==u)for(;d<c;d++)t[l+d]=t[p+d]+t[l+d-c];else if(3==u){for(;d<a;d++)t[l+d]=t[p+d]+(t[l+d-c]>>>1);for(;d<c;d++)t[l+d]=t[p+d]+(t[l+d-c]+t[l+d-a]>>>1)}else{for(;d<a;d++)t[l+d]=t[p+d]+s(0,t[l+d-c],0);for(;d<c;d++)t[l+d]=t[p+d]+s(t[l+d-a],t[l+d-c],t[l+d-a-c])}return t}function s(t,e,n){const i=t+e-n,r=i-t,o=i-e,a=i-n;return r*r<=o*o&&r*r<=a*a?t:o*o<=a*a?e:n}function c(e,n,i){i.width=t.readUint(e,n),n+=4,i.height=t.readUint(e,n),n+=4,i.depth=e[n],n++,i.ctype=e[n],n++,i.compress=e[n],n++,i.filter=e[n],n++,i.interlace=e[n],n++}function l(t,e,n,i,r,o,a,s,c){const l=Math.min(e,r),p=Math.min(n,o);let u=0,d=0;for(let n=0;n<p;n++)for(let o=0;o<l;o++)if(a>=0&&s>=0?(u=n*e+o<<2,d=(s+n)*r+a+o<<2):(u=(-s+n)*e-a+o<<2,d=n*r+o<<2),0==c)i[d]=t[u],i[d+1]=t[u+1],i[d+2]=t[u+2],i[d+3]=t[u+3];else if(1==c){var f=.00392156862745098*t[u+3],m=t[u]*f,h=t[u+1]*f,g=t[u+2]*f,v=i[d+3]*(1/255),x=i[d]*v,y=i[d+1]*v,b=i[d+2]*v;const e=1-f,n=f+v*e,r=0==n?0:1/n;i[d+3]=255*n,i[d+0]=(m+x*e)*r,i[d+1]=(h+y*e)*r,i[d+2]=(g+b*e)*r}else if(2==c)f=t[u+3],m=t[u],h=t[u+1],g=t[u+2],v=i[d+3],x=i[d],y=i[d+1],b=i[d+2],f==v&&m==x&&h==y&&g==b?(i[d]=0,i[d+1]=0,i[d+2]=0,i[d+3]=0):(i[d]=m,i[d+1]=h,i[d+2]=g,i[d+3]=f);else if(3==c){if(f=t[u+3],m=t[u],h=t[u+1],g=t[u+2],v=i[d+3],x=i[d],y=i[d+1],b=i[d+2],f==v&&m==x&&h==y&&g==b)continue;if(f<220&&v>20)return!1}return!0}return{decode:function(e){const o=new Uint8Array(e);let a=8;const s=t,l=s.readUshort,p=s.readUint,u={tabs:{},frames:[]},d=new Uint8Array(o.length);let f,m=0,h=0;const g=[137,80,78,71,13,10,26,10];for(var v=0;v<8;v++)if(o[v]!=g[v])throw"The input is not a PNG file!";for(;a<o.length;){const t=s.readUint(o,a);a+=4;const e=s.readASCII(o,a,4);if(a+=4,"IHDR"==e)c(o,a,u);else if("iCCP"==e){for(var x=a;0!=o[x];)x++;s.readASCII(o,a,x-a),o[x+1];const n=o.slice(x+2,a+t);let c=null;try{c=i(n)}catch{c=r(n)}u.tabs[e]=c}else if("CgBI"==e)u.tabs[e]=o.slice(a,a+4);else if("IDAT"==e){for(v=0;v<t;v++)d[m+v]=o[a+v];m+=t}else if("acTL"==e)u.tabs[e]={num_frames:p(o,a),num_plays:p(o,a+4)},f=new Uint8Array(o.length);else if("fcTL"==e){0!=h&&((C=u.frames[u.frames.length-1]).data=n(u,f.slice(0,h),C.rect.width,C.rect.height),h=0);const t={x:p(o,a+12),y:p(o,a+16),width:p(o,a+4),height:p(o,a+8)};let e=l(o,a+22);e=l(o,a+20)/(0==e?100:e);const i={rect:t,delay:Math.round(1e3*e),dispose:o[a+24],blend:o[a+25]};u.frames.push(i)}else if("fdAT"==e){for(v=0;v<t-4;v++)f[h+v]=o[a+v+4];h+=t-4}else if("pHYs"==e)u.tabs[e]=[s.readUint(o,a),s.readUint(o,a+4),o[a+8]];else if("cHRM"==e)for(u.tabs[e]=[],v=0;v<8;v++)u.tabs[e].push(s.readUint(o,a+4*v));else if("tEXt"==e||"zTXt"==e){null==u.tabs[e]&&(u.tabs[e]={});var y=s.nextZero(o,a),b=s.readASCII(o,a,y-a),w=a+t-y-1;if("tEXt"==e)S=s.readASCII(o,y+1,w);else{var A=i(o.slice(y+2,y+2+w));S=s.readUTF8(A,0,A.length)}u.tabs[e][b]=S}else if("iTXt"==e){null==u.tabs[e]&&(u.tabs[e]={}),y=0,x=a,y=s.nextZero(o,x),b=s.readASCII(o,x,y-x);const n=o[x=y+1];var S;o[x+1],x+=2,y=s.nextZero(o,x),s.readASCII(o,x,y-x),x=y+1,y=s.nextZero(o,x),s.readUTF8(o,x,y-x),w=t-((x=y+1)-a),0==n?S=s.readUTF8(o,x,w):(A=i(o.slice(x,x+w)),S=s.readUTF8(A,0,A.length)),u.tabs[e][b]=S}else if("PLTE"==e)u.tabs[e]=s.readBytes(o,a,t);else if("hIST"==e){const t=u.tabs.PLTE.length/3;for(u.tabs[e]=[],v=0;v<t;v++)u.tabs[e].push(l(o,a+2*v))}else if("tRNS"==e)3==u.ctype?u.tabs[e]=s.readBytes(o,a,t):0==u.ctype?u.tabs[e]=l(o,a):2==u.ctype&&(u.tabs[e]=[l(o,a),l(o,a+2),l(o,a+4)]);else if("gAMA"==e)u.tabs[e]=s.readUint(o,a)/1e5;else if("sRGB"==e)u.tabs[e]=o[a];else if("bKGD"==e)0==u.ctype||4==u.ctype?u.tabs[e]=[l(o,a)]:2==u.ctype||6==u.ctype?u.tabs[e]=[l(o,a),l(o,a+2),l(o,a+4)]:3==u.ctype&&(u.tabs[e]=o[a]);else if("IEND"==e)break;a+=t,s.readUint(o,a),a+=4}var C;return 0!=h&&((C=u.frames[u.frames.length-1]).data=n(u,f.slice(0,h),C.rect.width,C.rect.height)),u.data=n(u,d,u.width,u.height),delete u.compress,delete u.interlace,delete u.filter,u},toRGBA8:function(t){const n=t.width,i=t.height;if(null==t.tabs.acTL)return[e(t.data,n,i,t).buffer];const r=[];null==t.frames[0].data&&(t.frames[0].data=t.data);const o=n*i*4,a=new Uint8Array(o),s=new Uint8Array(o),c=new Uint8Array(o);for(let u=0;u<t.frames.length;u++){const d=t.frames[u],f=d.rect.x,m=d.rect.y,h=d.rect.width,g=d.rect.height,v=e(d.data,h,g,t);if(0!=u)for(var p=0;p<o;p++)c[p]=a[p];if(0==d.blend?l(v,h,g,a,n,i,f,m,0):1==d.blend&&l(v,h,g,a,n,i,f,m,1),r.push(a.buffer.slice(0)),0!=d.dispose)if(1==d.dispose)l(s,h,g,a,n,i,f,m,0);else if(2==d.dispose)for(p=0;p<o;p++)a[p]=c[p]}return r},_paeth:s,_copyTile:l,_bin:t}}();!function(){const{_copyTile:t}=fl,{_bin:e}=fl,n=fl._paeth;var i={table:function(){const t=new Uint32Array(256);for(let e=0;e<256;e++){let n=e;for(let t=0;t<8;t++)1&n?n=3988292384^n>>>1:n>>>=1;t[e]=n}return t}(),update(t,e,n,r){for(let o=0;o<r;o++)t=i.table[255&(t^e[n+o])]^t>>>8;return t},crc:(t,e,n)=>4294967295^i.update(4294967295,t,e,n)};function r(t,e,n,i){e[n]+=t[0]*i>>4,e[n+1]+=t[1]*i>>4,e[n+2]+=t[2]*i>>4,e[n+3]+=t[3]*i>>4}function o(t){return Math.max(0,Math.min(255,t))}function a(t,e){const n=t[0]-e[0],i=t[1]-e[1],r=t[2]-e[2],o=t[3]-e[3];return n*n+i*i+r*r+o*o}function s(t,e,n,i,s,c,l){null==l&&(l=1);const p=i.length,u=[];for(var d=0;d<p;d++){const t=i[d];u.push([t>>>0&255,t>>>8&255,t>>>16&255,t>>>24&255])}for(d=0;d<p;d++){let t=4294967295;for(var f=0,m=0;m<p;m++){var h=a(u[d],u[m]);m!=d&&h<t&&(t=h,f=m)}}const g=new Uint32Array(s.buffer),v=new Int16Array(e*n*4),x=[0,8,2,10,12,4,14,6,3,11,1,9,15,7,13,5];for(d=0;d<x.length;d++)x[d]=255*((x[d]+.5)/16-.5);for(let s=0;s<n;s++)for(let b=0;b<e;b++){var y;d=4*(s*e+b),2!=l?y=[o(t[d]+v[d]),o(t[d+1]+v[d+1]),o(t[d+2]+v[d+2]),o(t[d+3]+v[d+3])]:(h=x[4*(3&s)+(3&b)],y=[o(t[d]+h),o(t[d+1]+h),o(t[d+2]+h),o(t[d+3]+h)]),f=0;let w=16777215;for(m=0;m<p;m++){const t=a(y,u[m]);t<w&&(w=t,f=m)}const A=u[f],S=[y[0]-A[0],y[1]-A[1],y[2]-A[2],y[3]-A[3]];1==l&&(b!=e-1&&r(S,v,d+4,7),s!=n-1&&(0!=b&&r(S,v,d+4*e-4,3),r(S,v,d+4*e,5),b!=e-1&&r(S,v,d+4*e+4,1))),c[d>>2]=f,g[d>>2]=i[f]}}function c(t,n,r,o,a){null==a&&(a={});const{crc:s}=i,c=e.writeUint,l=e.writeUshort,p=e.writeASCII;let u=8;const d=t.frames.length>1;let f,m=!1,h=33+(d?20:0);if(null!=a.sRGB&&(h+=13),null!=a.pHYs&&(h+=21),null!=a.iCCP&&(f=pako.deflate(a.iCCP),h+=21+f.length+4),3==t.ctype){for(var g=t.plte.length,v=0;v<g;v++)t.plte[v]>>>24!=255&&(m=!0);h+=8+3*g+4+(m?8+1*g+4:0)}for(var x=0;x<t.frames.length;x++)d&&(h+=38),h+=(A=t.frames[x]).cimg.length+12,0!=x&&(h+=4);h+=12;const y=new Uint8Array(h),b=[137,80,78,71,13,10,26,10];for(v=0;v<8;v++)y[v]=b[v];if(c(y,u,13),u+=4,p(y,u,"IHDR"),u+=4,c(y,u,n),u+=4,c(y,u,r),u+=4,y[u]=t.depth,u++,y[u]=t.ctype,u++,y[u]=0,u++,y[u]=0,u++,y[u]=0,u++,c(y,u,s(y,u-17,17)),u+=4,null!=a.sRGB&&(c(y,u,1),u+=4,p(y,u,"sRGB"),u+=4,y[u]=a.sRGB,u++,c(y,u,s(y,u-5,5)),u+=4),null!=a.iCCP){const t=13+f.length;c(y,u,t),u+=4,p(y,u,"iCCP"),u+=4,p(y,u,"ICC profile"),u+=11,u+=2,y.set(f,u),u+=f.length,c(y,u,s(y,u-(t+4),t+4)),u+=4}if(null!=a.pHYs&&(c(y,u,9),u+=4,p(y,u,"pHYs"),u+=4,c(y,u,a.pHYs[0]),u+=4,c(y,u,a.pHYs[1]),u+=4,y[u]=a.pHYs[2],u++,c(y,u,s(y,u-13,13)),u+=4),d&&(c(y,u,8),u+=4,p(y,u,"acTL"),u+=4,c(y,u,t.frames.length),u+=4,c(y,u,null!=a.loop?a.loop:0),u+=4,c(y,u,s(y,u-12,12)),u+=4),3==t.ctype){for(c(y,u,3*(g=t.plte.length)),u+=4,p(y,u,"PLTE"),u+=4,v=0;v<g;v++){const e=3*v,n=t.plte[v],i=255&n,r=n>>>8&255,o=n>>>16&255;y[u+e+0]=i,y[u+e+1]=r,y[u+e+2]=o}if(u+=3*g,c(y,u,s(y,u-3*g-4,3*g+4)),u+=4,m){for(c(y,u,g),u+=4,p(y,u,"tRNS"),u+=4,v=0;v<g;v++)y[u+v]=t.plte[v]>>>24&255;u+=g,c(y,u,s(y,u-g-4,g+4)),u+=4}}let w=0;for(x=0;x<t.frames.length;x++){var A=t.frames[x];d&&(c(y,u,26),u+=4,p(y,u,"fcTL"),u+=4,c(y,u,w++),u+=4,c(y,u,A.rect.width),u+=4,c(y,u,A.rect.height),u+=4,c(y,u,A.rect.x),u+=4,c(y,u,A.rect.y),u+=4,l(y,u,o[x]),u+=2,l(y,u,1e3),u+=2,y[u]=A.dispose,u++,y[u]=A.blend,u++,c(y,u,s(y,u-30,30)),u+=4);const e=A.cimg;c(y,u,(g=e.length)+(0==x?0:4)),u+=4;const n=u;p(y,u,0==x?"IDAT":"fdAT"),u+=4,0!=x&&(c(y,u,w++),u+=4),y.set(e,u),u+=g,c(y,u,s(y,n,u-n)),u+=4}return c(y,u,0),u+=4,p(y,u,"IEND"),u+=4,c(y,u,s(y,u-4,4)),u+=4,y.buffer}function l(t,e,n){for(let i=0;i<t.frames.length;i++){const r=t.frames[i];r.rect.width;const o=r.rect.height,a=new Uint8Array(o*r.bpl+o);r.cimg=f(r.img,o,r.bpp,r.bpl,a,e,n)}}function p(e,n,i,r,o){const a=o[0],c=o[1],l=o[2],p=o[3],f=o[4],m=o[5];let g=6,v=8,x=255;for(var y=0;y<e.length;y++){const t=new Uint8Array(e[y]);for(var b=t.length,w=0;w<b;w+=4)x&=t[w+3]}const A=255!=x,S=function(e,n,i,r,o,a){const s=[];for(var c=0;c<e.length;c++){const u=new Uint8Array(e[c]),f=new Uint32Array(u.buffer);var l;let h=0,g=0,v=n,x=i,y=r?1:0;if(0!=c){const b=a||r||1==c||0!=s[c-2].dispose?1:2;let w=0,A=1e9;for(let t=0;t<b;t++){var p=new Uint8Array(e[c-1-t]);const r=new Uint32Array(e[c-1-t]);let a=n,s=i,l=-1,u=-1;for(let t=0;t<i;t++)for(let e=0;e<n;e++)f[m=t*n+e]!=r[m]&&(e<a&&(a=e),e>l&&(l=e),t<s&&(s=t),t>u&&(u=t));-1==l&&(a=s=l=u=0),o&&(!(1&~a)&&a--,!(1&~s)&&s--);const d=(l-a+1)*(u-s+1);d<A&&(A=d,w=t,h=a,g=s,v=l-a+1,x=u-s+1)}p=new Uint8Array(e[c-1-w]),1==w&&(s[c-1].dispose=2),l=new Uint8Array(v*x*4),t(p,n,i,l,v,x,-h,-g,0),y=t(u,n,i,l,v,x,-h,-g,3)?1:0,1==y?d(u,n,i,l,{x:h,y:g,width:v,height:x}):t(u,n,i,l,v,x,-h,-g,0)}else l=u.slice(0);s.push({rect:{x:h,y:g,width:v,height:x},img:l,blend:y,dispose:0})}if(r)for(c=0;c<s.length;c++){if(1==(h=s[c]).blend)continue;const t=h.rect,r=s[c-1].rect,a=Math.min(t.x,r.x),l=Math.min(t.y,r.y),p={x:a,y:l,width:Math.max(t.x+t.width,r.x+r.width)-a,height:Math.max(t.y+t.height,r.y+r.height)-l};s[c-1].dispose=1,c-1!=0&&u(e,n,i,s,c-1,p,o),u(e,n,i,s,c,p,o)}let f=0;if(1!=e.length)for(var m=0;m<s.length;m++){var h;f+=(h=s[m]).rect.width*h.rect.height}return s}(e,n,i,a,c,l),C={},P=[],k=[];if(0!=r){const t=[];for(w=0;w<S.length;w++)t.push(S[w].img.buffer);const e=h(function(t){let e=0;for(var n=0;n<t.length;n++)e+=t[n].byteLength;const i=new Uint8Array(e);let r=0;for(n=0;n<t.length;n++){const e=new Uint8Array(t[n]),o=e.length;for(let t=0;t<o;t+=4){let n=e[t],o=e[t+1],a=e[t+2];const s=e[t+3];0==s&&(n=o=a=0),i[r+t]=n,i[r+t+1]=o,i[r+t+2]=a,i[r+t+3]=s}r+=o}return i.buffer}(t),r);for(w=0;w<e.plte.length;w++)P.push(e.plte[w].est.rgba);let n=0;for(w=0;w<S.length;w++){const t=(E=S[w]).img.length;var T=new Uint8Array(e.inds.buffer,n>>2,t>>2);k.push(T);const i=new Uint8Array(e.abuf,n,t);m&&s(E.img,E.rect.width,E.rect.height,P,i,T),E.img.set(i),n+=t}}else for(y=0;y<S.length;y++){var E=S[y];const t=new Uint32Array(E.img.buffer);var I=E.rect.width;for(b=t.length,T=new Uint8Array(b),k.push(T),w=0;w<b;w++){const e=t[w];if(0!=w&&e==t[w-1])T[w]=T[w-1];else if(w>I&&e==t[w-I])T[w]=T[w-I];else{let t=C[e];if(null==t&&(C[e]=t=P.length,P.push(e),P.length>=300))break;T[w]=t}}}const M=P.length;for(M<=256&&0==f&&(v=M<=2?1:M<=4?2:M<=16?4:8,v=Math.max(v,p)),y=0;y<S.length;y++){(E=S[y]).rect.x,E.rect.y,I=E.rect.width;const t=E.rect.height;let e=E.img;new Uint32Array(e.buffer);let n=4*I,i=4;if(M<=256&&0==f){n=Math.ceil(v*I/8);var j=new Uint8Array(n*t);const r=k[y];for(let e=0;e<t;e++){w=e*n;const t=e*I;if(8==v)for(var D=0;D<I;D++)j[w+D]=r[t+D];else if(4==v)for(D=0;D<I;D++)j[w+(D>>1)]|=r[t+D]<<4-4*(1&D);else if(2==v)for(D=0;D<I;D++)j[w+(D>>2)]|=r[t+D]<<6-2*(3&D);else if(1==v)for(D=0;D<I;D++)j[w+(D>>3)]|=r[t+D]<<7-1*(7&D)}e=j,g=3,i=1}else if(0==A&&1==S.length){j=new Uint8Array(I*t*3);const r=I*t;for(w=0;w<r;w++){const t=3*w,n=4*w;j[t]=e[n],j[t+1]=e[n+1],j[t+2]=e[n+2]}e=j,g=2,i=3,n=3*I}E.img=e,E.bpl=n,E.bpp=i}return{ctype:g,depth:v,plte:P,frames:S}}function u(e,n,i,r,o,a,s){const c=Uint8Array,l=Uint32Array,p=new c(e[o-1]),u=new l(e[o-1]),f=o+1<e.length?new c(e[o+1]):null,m=new c(e[o]),h=new l(m.buffer);let g=n,v=i,x=-1,y=-1;for(let t=0;t<a.height;t++)for(let e=0;e<a.width;e++){const i=a.x+e,s=a.y+t,c=s*n+i,l=h[c];0==l||0==r[o-1].dispose&&u[c]==l&&(null==f||0!=f[4*c+3])||(i<g&&(g=i),i>x&&(x=i),s<v&&(v=s),s>y&&(y=s))}-1==x&&(g=v=x=y=0),s&&(!(1&~g)&&g--,!(1&~v)&&v--),a={x:g,y:v,width:x-g+1,height:y-v+1};const b=r[o];b.rect=a,b.blend=1,b.img=new Uint8Array(a.width*a.height*4),0==r[o-1].dispose?(t(p,n,i,b.img,a.width,a.height,-a.x,-a.y,0),d(m,n,i,b.img,a)):t(m,n,i,b.img,a.width,a.height,-a.x,-a.y,0)}function d(e,n,i,r,o){t(e,n,i,r,o.width,o.height,-o.x,-o.y,2)}function f(t,e,n,i,r,o,a){const s=[];let c,l=[0,1,2,3,4];-1!=o?l=[o]:(e*i>5e5||1==n)&&(l=[0]),a&&(c={level:0});const p=dl;for(var u=0;u<l.length;u++){for(let o=0;o<e;o++)m(r,t,o,i,n,l[u]);s.push(p.deflate(r,c))}let d,f=1e9;for(u=0;u<s.length;u++)s[u].length<f&&(d=u,f=s[u].length);return s[d]}function m(t,e,i,r,o,a){const s=i*r;let c=s+i;if(t[c]=a,c++,0==a)if(r<500)for(var l=0;l<r;l++)t[c+l]=e[s+l];else t.set(new Uint8Array(e.buffer,s,r),c);else if(1==a){for(l=0;l<o;l++)t[c+l]=e[s+l];for(l=o;l<r;l++)t[c+l]=e[s+l]-e[s+l-o]+256&255}else if(0==i){for(l=0;l<o;l++)t[c+l]=e[s+l];if(2==a)for(l=o;l<r;l++)t[c+l]=e[s+l];if(3==a)for(l=o;l<r;l++)t[c+l]=e[s+l]-(e[s+l-o]>>1)+256&255;if(4==a)for(l=o;l<r;l++)t[c+l]=e[s+l]-n(e[s+l-o],0,0)+256&255}else{if(2==a)for(l=0;l<r;l++)t[c+l]=e[s+l]+256-e[s+l-r]&255;if(3==a){for(l=0;l<o;l++)t[c+l]=e[s+l]+256-(e[s+l-r]>>1)&255;for(l=o;l<r;l++)t[c+l]=e[s+l]+256-(e[s+l-r]+e[s+l-o]>>1)&255}if(4==a){for(l=0;l<o;l++)t[c+l]=e[s+l]+256-n(0,e[s+l-r],0)&255;for(l=o;l<r;l++)t[c+l]=e[s+l]+256-n(e[s+l-o],e[s+l-r],e[s+l-o-r])&255}}}function h(t,e){const n=new Uint8Array(t),i=n.slice(0),r=new Uint32Array(i.buffer),o=g(i,e),a=o[0],s=o[1],c=n.length,l=new Uint8Array(c>>2);let p;if(n.length<2e7)for(var u=0;u<c;u+=4)p=v(a,d=n[u]*(1/255),f=n[u+1]*(1/255),m=n[u+2]*(1/255),h=n[u+3]*(1/255)),l[u>>2]=p.ind,r[u>>2]=p.est.rgba;else for(u=0;u<c;u+=4){var d=.00392156862745098*n[u],f=n[u+1]*(1/255),m=n[u+2]*(1/255),h=n[u+3]*(1/255);for(p=a;p.left;)p=x(p.est,d,f,m,h)<=0?p.left:p.right;l[u>>2]=p.ind,r[u>>2]=p.est.rgba}return{abuf:i.buffer,inds:l,plte:s}}function g(t,e,n){null==n&&(n=1e-4);const i=new Uint32Array(t.buffer),r={i0:0,i1:t.length,bst:null,est:null,tdst:0,left:null,right:null};r.bst=w(t,r.i0,r.i1),r.est=A(r.bst);const o=[r];for(;o.length<e;){let e=0,r=0;for(var a=0;a<o.length;a++)o[a].est.L>e&&(e=o[a].est.L,r=a);if(e<n)break;const s=o[r],c=y(t,i,s.i0,s.i1,s.est.e,s.est.eMq255);if(s.i0>=c||s.i1<=c){s.est.L=0;continue}const l={i0:s.i0,i1:c,bst:null,est:null,tdst:0,left:null,right:null};l.bst=w(t,l.i0,l.i1),l.est=A(l.bst);const p={i0:c,i1:s.i1,bst:null,est:null,tdst:0,left:null,right:null};for(p.bst={R:[],m:[],N:s.bst.N-l.bst.N},a=0;a<16;a++)p.bst.R[a]=s.bst.R[a]-l.bst.R[a];for(a=0;a<4;a++)p.bst.m[a]=s.bst.m[a]-l.bst.m[a];p.est=A(p.bst),s.left=l,s.right=p,o[r]=l,o.push(p)}for(o.sort((t,e)=>e.bst.N-t.bst.N),a=0;a<o.length;a++)o[a].ind=a;return[r,o]}function v(t,e,n,i,r){if(null==t.left)return t.tdst=function(t,e,n,i,r){const o=e-t[0],a=n-t[1],s=i-t[2],c=r-t[3];return o*o+a*a+s*s+c*c}(t.est.q,e,n,i,r),t;const o=x(t.est,e,n,i,r);let a=t.left,s=t.right;o>0&&(a=t.right,s=t.left);const c=v(a,e,n,i,r);if(c.tdst<=o*o)return c;const l=v(s,e,n,i,r);return l.tdst<c.tdst?l:c}function x(t,e,n,i,r){const{e:o}=t;return o[0]*e+o[1]*n+o[2]*i+o[3]*r-t.eMq}function y(t,e,n,i,r,o){for(i-=4;n<i;){for(;b(t,n,r)<=o;)n+=4;for(;b(t,i,r)>o;)i-=4;if(n>=i)break;const a=e[n>>2];e[n>>2]=e[i>>2],e[i>>2]=a,n+=4,i-=4}for(;b(t,n,r)>o;)n-=4;return n+4}function b(t,e,n){return t[e]*n[0]+t[e+1]*n[1]+t[e+2]*n[2]+t[e+3]*n[3]}function w(t,e,n){const i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],r=[0,0,0,0],o=n-e>>2;for(let o=e;o<n;o+=4){const e=.00392156862745098*t[o],n=t[o+1]*(1/255),a=t[o+2]*(1/255),s=t[o+3]*(1/255);r[0]+=e,r[1]+=n,r[2]+=a,r[3]+=s,i[0]+=e*e,i[1]+=e*n,i[2]+=e*a,i[3]+=e*s,i[5]+=n*n,i[6]+=n*a,i[7]+=n*s,i[10]+=a*a,i[11]+=a*s,i[15]+=s*s}return i[4]=i[1],i[8]=i[2],i[9]=i[6],i[12]=i[3],i[13]=i[7],i[14]=i[11],{R:i,m:r,N:o}}function A(t){const{R:e}=t,{m:n}=t,{N:i}=t,r=n[0],o=n[1],a=n[2],s=n[3],c=0==i?0:1/i,l=[e[0]-r*r*c,e[1]-r*o*c,e[2]-r*a*c,e[3]-r*s*c,e[4]-o*r*c,e[5]-o*o*c,e[6]-o*a*c,e[7]-o*s*c,e[8]-a*r*c,e[9]-a*o*c,e[10]-a*a*c,e[11]-a*s*c,e[12]-s*r*c,e[13]-s*o*c,e[14]-s*a*c,e[15]-s*s*c],p=l,u=S;let d=[Math.random(),Math.random(),Math.random(),Math.random()],f=0,m=0;if(0!=i)for(let t=0;t<16&&(d=u.multVec(p,d),m=Math.sqrt(u.dot(d,d)),d=u.sml(1/m,d),!(0!=t&&Math.abs(m-f)<1e-9));t++)f=m;const h=[r*c,o*c,a*c,s*c];return{Cov:l,q:h,e:d,L:f,eMq255:u.dot(u.sml(255,h),d),eMq:u.dot(d,h),rgba:(Math.round(255*h[3])<<24|Math.round(255*h[2])<<16|Math.round(255*h[1])<<8|Math.round(255*h[0]))>>>0}}var S={multVec:(t,e)=>[t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3],t[4]*e[0]+t[5]*e[1]+t[6]*e[2]+t[7]*e[3],t[8]*e[0]+t[9]*e[1]+t[10]*e[2]+t[11]*e[3],t[12]*e[0]+t[13]*e[1]+t[14]*e[2]+t[15]*e[3]],dot:(t,e)=>t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3],sml:(t,e)=>[t*e[0],t*e[1],t*e[2],t*e[3]]};fl.encode=function(t,e,n,i,r,o,a){null==i&&(i=0),null==a&&(a=!1);const s=p(t,e,n,i,[!1,!1,!1,0,a,!1]);return l(s,-1),c(s,e,n,r,o)},fl.encodeLL=function(t,e,n,i,r,o,a,s){const p={ctype:0+(1==i?0:2)+(0==r?0:4),depth:o,frames:[]},u=(i+r)*o,d=u*e;for(let i=0;i<t.length;i++)p.frames.push({rect:{x:0,y:0,width:e,height:n},img:new Uint8Array(t[i]),blend:0,dispose:1,bpp:Math.ceil(u/8),bpl:Math.ceil(d/8)});return l(p,0,!0),c(p,e,n,a,s)},fl.encode.compress=p,fl.encode.dither=s,fl.quantize=h,fl.quantize.getKDtree=g,fl.quantize.getNearest=v}();const ml={toArrayBuffer(t,e){const n=t.width,i=t.height,r=n<<2,o=t.getContext("2d").getImageData(0,0,n,i),a=new Uint32Array(o.data.buffer),s=(32*n+31)/32<<2,c=s*i,l=122+c,p=new ArrayBuffer(l),u=new DataView(p),d=1<<20;let f,m,h,g,v=d,x=0,y=0,b=0;function w(t){u.setUint16(y,t,!0),y+=2}function A(t){u.setUint32(y,t,!0),y+=4}function S(t){y+=t}w(19778),A(l),S(4),A(122),A(108),A(n),A(-i>>>0),w(1),w(32),A(3),A(c),A(2835),A(2835),S(8),A(16711680),A(65280),A(255),A(4278190080),A(1466527264),function t(){for(;x<i&&v>0;){for(g=122+x*s,f=0;f<r;)v--,m=a[b++],h=m>>>24,u.setUint32(g+f,m<<8|h),f+=4;x++}b<a.length?(v=d,setTimeout(t,ml._dly)):e(p)}()},toBlob(t,e){this.toArrayBuffer(t,t=>{e(new Blob([t],{type:"image/bmp"}))})},_dly:9};var hl={CHROME:"CHROME",FIREFOX:"FIREFOX",DESKTOP_SAFARI:"DESKTOP_SAFARI",IE:"IE",IOS:"IOS",ETC:"ETC"},gl={[hl.CHROME]:16384,[hl.FIREFOX]:11180,[hl.DESKTOP_SAFARI]:16384,[hl.IE]:8192,[hl.IOS]:4096,[hl.ETC]:8192};const vl=typeof window<"u",xl=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,yl=vl&&window.cordova&&window.cordova.require&&window.cordova.require("cordova/modulemapper"),bl=(vl||xl)&&(yl&&yl.getOriginalSymbol(window,"File")||typeof File<"u"&&File),wl=(vl||xl)&&(yl&&yl.getOriginalSymbol(window,"FileReader")||typeof FileReader<"u"&&FileReader);function Al(t,e,n=Date.now()){return new Promise(i=>{const r=t.split(","),o=r[0].match(/:(.*?);/)[1],a=globalThis.atob(r[1]);let s=a.length;const c=new Uint8Array(s);for(;s--;)c[s]=a.charCodeAt(s);const l=new Blob([c],{type:o});l.name=e,l.lastModified=n,i(l)})}function Sl(t){return new Promise((e,n)=>{const i=new wl;i.onload=()=>e(i.result),i.onerror=t=>n(t),i.readAsDataURL(t)})}function Cl(t){return new Promise((e,n)=>{const i=new Image;i.onload=()=>e(i),i.onerror=t=>n(t),i.src=t})}function Pl(){if(void 0!==Pl.cachedResult)return Pl.cachedResult;let t=hl.ETC;const{userAgent:e}=navigator;return/Chrom(e|ium)/i.test(e)?t=hl.CHROME:/iP(ad|od|hone)/i.test(e)&&/WebKit/i.test(e)?t=hl.IOS:/Safari/i.test(e)?t=hl.DESKTOP_SAFARI:/Firefox/i.test(e)?t=hl.FIREFOX:(/MSIE/i.test(e)||document.documentMode)&&(t=hl.IE),Pl.cachedResult=t,Pl.cachedResult}function kl(t,e){const n=Pl(),i=gl[n];let r=t,o=e,a=r*o;const s=r>o?o/r:r/o;for(;a>i*i;){const t=(i+r)/2,e=(i+o)/2;t<e?(o=e,r=e*s):(o=t*s,r=t),a=r*o}return{width:r,height:o}}function Tl(t,e){let n,i;try{if(n=new OffscreenCanvas(t,e),i=n.getContext("2d"),null===i)throw new Error("getContext of OffscreenCanvas returns null")}catch{n=document.createElement("canvas"),i=n.getContext("2d")}return n.width=t,n.height=e,[n,i]}function El(t,e){const{width:n,height:i}=kl(t.width,t.height),[r,o]=Tl(n,i);return e&&/jpe?g/.test(e)&&(o.fillStyle="white",o.fillRect(0,0,r.width,r.height)),o.drawImage(t,0,0,r.width,r.height),r}function Il(){return void 0!==Il.cachedResult||(Il.cachedResult=["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&typeof document<"u"&&"ontouchend"in document),Il.cachedResult}function Ml(t,e={}){return new Promise(function(n,i){let r,o;var a=function(){try{return o=El(r,e.fileType||t.type),n([r,o])}catch(t){return i(t)}},s=function(e){try{var n=function(t){try{throw t}catch(t){return i(t)}};try{let e;return Sl(t).then(function(t){try{return e=t,Cl(e).then(function(t){try{return r=t,function(){try{return a()}catch(t){return i(t)}}()}catch(t){return n(t)}},n)}catch(t){return n(t)}},n)}catch(t){n(t)}}catch(t){return i(t)}};try{if(Il()||[hl.DESKTOP_SAFARI,hl.MOBILE_SAFARI].includes(Pl()))throw new Error("Skip createImageBitmap on IOS and Safari");return createImageBitmap(t).then(function(t){try{return r=t,a()}catch{return s()}},s)}catch{s()}})}function jl(t,e,n,i,r=1){return new Promise(function(o,a){let s;if("image/png"===e){let o,a,l;return o=t.getContext("2d"),({data:a}=o.getImageData(0,0,t.width,t.height)),l=fl.encode([a.buffer],t.width,t.height,4096*r),s=new Blob([l],{type:e}),s.name=n,s.lastModified=i,c.call(this)}{let o=function(){return c.call(this)};if("image/bmp"===e)return new Promise(e=>ml.toBlob(t,e)).then(function(t){try{return s=t,s.name=n,s.lastModified=i,o.call(this)}catch(t){return a(t)}}.bind(this),a);{let c=function(){return o.call(this)};if("function"==typeof OffscreenCanvas&&t instanceof OffscreenCanvas)return t.convertToBlob({type:e,quality:r}).then(function(t){try{return s=t,s.name=n,s.lastModified=i,c.call(this)}catch(t){return a(t)}}.bind(this),a);{let o;return o=t.toDataURL(e,r),Al(o,n,i).then(function(t){try{return s=t,c.call(this)}catch(t){return a(t)}}.bind(this),a)}}}function c(){return o(s)}})}function Dl(t){t.width=0,t.height=0}function Fl(){return new Promise(function(t,e){let n,i,r,o;return void 0!==Fl.cachedResult?t(Fl.cachedResult):Al("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==","test.jpg",Date.now()).then(function(a){try{return n=a,Ml(n).then(function(a){try{return i=a[1],jl(i,n.type,n.name,n.lastModified).then(function(n){try{return r=n,Dl(i),Ml(r).then(function(n){try{return o=n[0],Fl.cachedResult=1===o.width&&2===o.height,t(Fl.cachedResult)}catch(t){return e(t)}},e)}catch(t){return e(t)}},e)}catch(t){return e(t)}},e)}catch(t){return e(t)}},e)})}function Ul(t){return new Promise((e,n)=>{const i=new wl;i.onload=t=>{const n=new DataView(t.target.result);if(65496!=n.getUint16(0,!1))return e(-2);const i=n.byteLength;let r=2;for(;r<i;){if(n.getUint16(r+2,!1)<=8)return e(-1);const t=n.getUint16(r,!1);if(r+=2,65505==t){if(1165519206!=n.getUint32(r+=2,!1))return e(-1);const t=18761==n.getUint16(r+=6,!1);r+=n.getUint32(r+4,t);const i=n.getUint16(r,t);r+=2;for(let o=0;o<i;o++)if(274==n.getUint16(r+12*o,t))return e(n.getUint16(r+12*o+8,t))}else{if(65280&~t)break;r+=n.getUint16(r,!1)}}return e(-1)},i.onerror=t=>n(t),i.readAsArrayBuffer(t)})}function Rl(t,e){const{width:n}=t,{height:i}=t,{maxWidthOrHeight:r}=e;let o,a=t;return isFinite(r)&&(n>r||i>r)&&([a,o]=Tl(n,i),n>i?(a.width=r,a.height=i/n*r):(a.width=n/i*r,a.height=r),o.drawImage(t,0,0,a.width,a.height),Dl(t)),a}function Ol(t,e){const{width:n}=t,{height:i}=t,[r,o]=Tl(n,i);switch(e>4&&e<9?(r.width=i,r.height=n):(r.width=n,r.height=i),e){case 2:o.transform(-1,0,0,1,n,0);break;case 3:o.transform(-1,0,0,-1,n,i);break;case 4:o.transform(1,0,0,-1,0,i);break;case 5:o.transform(0,1,1,0,0,0);break;case 6:o.transform(0,1,-1,0,i,0);break;case 7:o.transform(0,-1,-1,0,i,n);break;case 8:o.transform(0,-1,1,0,0,n)}return o.drawImage(t,0,0,n,i),Dl(t),r}function Ll(t,e,n=0){return new Promise(function(i,r){let o,a,s,c,l,p,u,d,f,m,h,g,v,x,y,b,w,A,S,C;function P(t=5){if(e.signal&&e.signal.aborted)throw e.signal.reason;o+=t,e.onProgress(Math.min(o,100))}function k(t){if(e.signal&&e.signal.aborted)throw e.signal.reason;o=Math.min(Math.max(t,o),100),e.onProgress(o)}return o=n,a=e.maxIteration||10,s=1024*e.maxSizeMB*1024,P(),Ml(t,e).then(function(n){try{return[,c]=n,P(),l=Rl(c,e),P(),new Promise(function(n,i){var r;if(!(r=e.exifOrientation))return Ul(t).then(function(t){try{return r=t,o.call(this)}catch(t){return i(t)}}.bind(this),i);function o(){return n(r)}return o.call(this)}).then(function(n){try{return p=n,P(),Fl().then(function(n){try{return u=n?l:Ol(l,p),P(),d=e.initialQuality||1,f=e.fileType||t.type,jl(u,f,t.name,t.lastModified,d).then(function(n){try{{let p=function(){if(a--&&(y>s||y>v)){let e,n;return e=C?.95*S.width:S.width,n=C?.95*S.height:S.height,[w,A]=Tl(e,n),A.drawImage(S,0,0,e,n),d*="image/png"===f?.85:.95,jl(w,f,t.name,t.lastModified,d).then(function(t){try{return b=t,Dl(S),S=w,y=b.size,k(Math.min(99,Math.floor((x-y)/(x-s)*100))),p}catch(t){return r(t)}},r)}return[1]},T=function(){return Dl(S),Dl(w),Dl(l),Dl(u),Dl(c),k(100),i(b)};return m=n,P(),h=m.size>s,g=m.size>t.size,h||g?(v=t.size,x=m.size,y=x,S=u,C=!e.alwaysKeepResolution&&h,(o=function(t){for(;t;){if(t.then)return void t.then(o,r);try{if(t.pop){if(t.length)return t.pop()?T.call(this):t;t=p}else t=t.call(this)}catch(t){return r(t)}}}.bind(this))(p)):(k(100),i(m));var o}}catch(t){return r(t)}}.bind(this),r)}catch(t){return r(t)}}.bind(this),r)}catch(t){return r(t)}}.bind(this),r)}catch(t){return r(t)}}.bind(this),r)})}let Nl;function Bl(t,e){return new Promise(function(n,i){let r,o,a,s,c,l;if(r={...e},a=0,({onProgress:s}=r),r.maxSizeMB=r.maxSizeMB||Number.POSITIVE_INFINITY,c="boolean"!=typeof r.useWebWorker||r.useWebWorker,delete r.useWebWorker,r.onProgress=t=>{a=t,"function"==typeof s&&s(a)},!(t instanceof Blob||t instanceof bl))return i(new Error("The file given is not an instance of Blob or File"));if(!/^image/.test(t.type))return i(new Error("The file given is not an image"));if(l=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,!c||"function"!=typeof Worker||l)return Ll(t,r).then(function(t){try{return o=t,d.call(this)}catch(t){return i(t)}}.bind(this),i);var p=function(){try{return d.call(this)}catch(t){return i(t)}}.bind(this),u=function(e){try{return Ll(t,r).then(function(t){try{return o=t,p()}catch(t){return i(t)}},i)}catch(t){return i(t)}};try{return r.libURL=r.libURL||"https://cdn.jsdelivr.net/npm/browser-image-compression@2.0.2/dist/browser-image-compression.js",function(t,e){return new Promise((n,i)=>{Nl||(Nl=function(t){const e=[];return e.push(t),URL.createObjectURL(new Blob(e))}("\nlet scriptImported = false\nself.addEventListener('message', async (e) => {\n const { file, id, imageCompressionLibUrl, options } = e.data\n options.onProgress = (progress) => self.postMessage({ progress, id })\n try {\n if (!scriptImported) {\n // console.log('[worker] importScripts', imageCompressionLibUrl)\n self.importScripts(imageCompressionLibUrl)\n scriptImported = true\n }\n // console.log('[worker] self', self)\n const compressedFile = await imageCompression(file, options)\n self.postMessage({ file: compressedFile, id })\n } catch (e) {\n // console.error('[worker] error', e)\n self.postMessage({ error: e.message + '\\n' + e.stack, id })\n }\n})\n"));const r=new Worker(Nl);r.addEventListener("message",function(t){if(e.signal&&e.signal.aborted)r.terminate();else if(void 0===t.data.progress){if(t.data.error)return i(new Error(t.data.error)),void r.terminate();n(t.data.file),r.terminate()}else e.onProgress(t.data.progress)}),r.addEventListener("error",i),e.signal&&e.signal.addEventListener("abort",()=>{i(e.signal.reason),r.terminate()}),r.postMessage({file:t,imageCompressionLibUrl:e.libURL,options:{...e,onProgress:void 0,signal:void 0}})})}(t,r).then(function(t){try{return o=t,p()}catch{return u()}},u)}catch{u()}function d(){try{o.name=t.name,o.lastModified=t.lastModified}catch{}try{r.preserveExif&&"image/jpeg"===t.type&&(!r.fileType||r.fileType&&r.fileType===t.type)&&(o=ol(t,o))}catch{}return n(o)}})}Bl.getDataUrlFromFile=Sl,Bl.getFilefromDataUrl=Al,Bl.loadImage=Cl,Bl.drawImageInCanvas=El,Bl.drawFileInCanvas=Ml,Bl.canvasToFile=jl,Bl.getExifOrientation=Ul,Bl.handleMaxWidthOrHeight=Rl,Bl.followExifOrientation=Ol,Bl.cleanupCanvasMemory=Dl,Bl.isAutoOrientationInBrowser=Fl,Bl.approximateBelowMaximumCanvasSizeOfBrowser=kl,Bl.copyExifWithoutOrientation=ol,Bl.getBrowserName=Pl,Bl.version="2.0.2";let Vl=class{constructor(t){if(function(t){return"object"!=typeof t||void 0===t.length||void 0===t.readUInt8||void 0===t.readUInt16LE||void 0===t.readUInt16BE||void 0===t.readUInt32LE||void 0===t.readUInt32BE||void 0===t.readInt32LE||void 0===t.readInt32BE}(t))throw new Error("DataView: Passed buffer type is unsupported.");this.buffer=t,this.byteLength=this.buffer.length}getUint8(t){return this.buffer.readUInt8(t)}getUint16(t,e){return e?this.buffer.readUInt16LE(t):this.buffer.readUInt16BE(t)}getUint32(t,e){return e?this.buffer.readUInt32LE(t):this.buffer.readUInt32BE(t)}getInt32(t,e){return e?this.buffer.readInt32LE(t):this.buffer.readInt32BE(t)}};function ql(t,e,n){try{return new DataView(t,e,n)}catch{return new Vl(t,e,n)}}function zl(t,e,n){const i=[];for(let r=0;r<n&&e+r<t.byteLength;r++)i.push(t.getUint8(e+r));return Hl(i)}function _l(t,e){const n=[];let i=0;for(;e+i<t.byteLength;){const r=t.getUint8(e+i);if(0===r)break;n.push(r),i++}return Hl(n)}function Gl(t,e,n){const i=[];for(let r=0;r<n&&e+r<t.byteLength;r+=2)i.push(t.getUint16(e+r));return 0===i[i.length-1]&&i.pop(),Hl(i)}function $l(t,e){const n=t.getUint8(e);return[n,zl(t,e+1,n)]}function Hl(t){return t.map(t=>String.fromCharCode(t)).join("")}function Wl(){for(let t=1;t<arguments.length;t++)for(const e in arguments[t])arguments[0][e]=arguments[t][e];return arguments[0]}function Xl(t,e,n){let i=!1;Object.defineProperty(t,e,{get:()=>(i||(i=!0,Object.defineProperty(t,e,{configurable:!0,enumerable:!0,value:n.apply(t),writable:!0})),t[e]),configurable:!0,enumerable:!0})}function Yl(t){return typeof btoa<"u"?btoa("string"==typeof t?t:Array.prototype.reduce.call(new Uint8Array(t),(t,e)=>t+String.fromCharCode(e),"")):typeof Buffer>"u"?void 0:typeof Buffer.from<"u"?Buffer.from(t).toString("base64"):new Buffer(t).toString("base64")}function Kl(t,e){return new Array(e+1).join(t)}const Zl=void 0;function Ql(t,e,n,i="string"){if(0===e&&"function"==typeof DecompressionStream){const e=new DecompressionStream("deflate"),r=new Blob([t]).stream().pipeThrough(e);return"dataview"===i?new Response(r).arrayBuffer().then(t=>new DataView(t)):new Response(r).arrayBuffer().then(t=>new TextDecoder(n).decode(t))}return void 0!==e?Promise.reject(`Unknown compression method ${e}.`):t}const Jl=!0,tp=!0;function ep(t){return t.map(t=>String.fromCharCode(t)).join("")}function np(t){if(t.length>=8){const e=ep(t.slice(0,8));if("ASCII\0\0\0"===e)return ep(t.slice(8));if("JIS\0\0\0\0\0"===e)return"[JIS encoded text]";if("UNICODE\0"===e)return"[Unicode encoded text]";if("\0\0\0\0\0\0\0\0"===e)return"[Undefined encoding]"}return"Undefined"}function ip(t){return t[0][0]/t[0][1]+t[1][0]/t[1][1]/60+t[2][0]/t[2][1]/3600}const rp=18761,op=19789,ap={BIG_ENDIAN:op,LITTLE_ENDIAN:rp,getByteOrder:function(t,e){if(t.getUint16(e)===rp)return rp;if(t.getUint16(e)===op)return op;throw new Error("Illegal byte order value. Faulty image.")}};const sp={isTiffFile:function(t){return!!t&&t.byteLength>=4&&function(t){const e=t.getUint16(0)===ap.LITTLE_ENDIAN;return 42===t.getUint16(2,e)}(t)},findTiffOffsets:function(){return{hasAppMarkers:!0,tiffHeaderOffset:0}}};const cp={isJpegFile:function(t){return!!t&&t.byteLength>=lp&&t.getUint16(0)===pp},findJpegOffsets:function(t){let e,n,i,r,o,a,s,c,l,p=up;for(;p+dp+5<=t.byteLength;){if(_p(t,p))e=t.getUint16(p+fp),n=p+fp;else if(Gp(t,p))e=t.getUint16(p+fp),i=p+fp;else if(Wp(t,p))e=t.getUint16(p+fp),r=p+mp;else if(Xp(t,p))e=t.getUint16(p+fp),o=p+hp;else if(Yp(t,p))s||(s=[]),e=t.getUint16(p+fp),s.push(Zp(p,e));else if(Kp(t,p))s||(s=[]),e=t.getUint16(p+fp),s.push(Qp(p,e));else if(Jp(t,p))e=t.getUint16(p+fp),a=p+gp;else if($p(t,p)){e=t.getUint16(p+fp);const n=p+yp,i=e-(yp-fp),r=t.getUint8(p+Ap),o=t.getUint8(p+Sp);c||(c=[]),c.push({offset:n,length:i,chunkNumber:r,chunksTotal:o})}else if(Hp(t,p))e=t.getUint16(p+fp),l=p+bp;else{if(!tu(t,p)){if(eu(t,p)){p++;continue}break}e=t.getUint16(p+fp)}p+=fp+e}return{hasAppMarkers:p>up,fileDataOffset:n||i,jfifDataOffset:r,tiffHeaderOffset:o,iptcDataOffset:a,xmpChunks:s,iccChunks:c,mpfDataOffset:l}}},lp=2,pp=65496,up=2,dp=4,fp=2,mp=2,hp=10,gp=18,vp=33,xp=79,yp=18,bp=8,wp="ICC_PROFILE\0",Ap=dp+wp.length,Sp=Ap+1,Cp="MPF\0",Pp=65472,kp=65474,Tp=65476,Ep=65499,Ip=65501,Mp=65498,jp=65504,Dp=65505,Fp=65506,Up=65517,Rp=65519,Op=65534,Lp=65535,Np="JFIF",Bp="Exif",Vp="http://ns.adobe.com/xap/1.0/\0",qp="http://ns.adobe.com/xmp/extension/\0",zp="Photoshop 3.0";function _p(t,e){return t.getUint16(e)===Pp}function Gp(t,e){return t.getUint16(e)===kp}function $p(t,e){const n=wp.length;return t.getUint16(e)===Fp&&zl(t,e+dp,n)===wp}function Hp(t,e){const n=Cp.length;return t.getUint16(e)===Fp&&zl(t,e+dp,n)===Cp}function Wp(t,e){const n=Np.length;return t.getUint16(e)===jp&&zl(t,e+dp,n)===Np&&0===t.getUint8(e+dp+n)}function Xp(t,e){const n=Bp.length;return t.getUint16(e)===Dp&&zl(t,e+dp,n)===Bp&&0===t.getUint8(e+dp+n)}function Yp(t,e){return t.getUint16(e)===Dp&&function(t,e){const n=Vp.length;return zl(t,e+dp,n)===Vp}(t,e)}function Kp(t,e){return t.getUint16(e)===Dp&&function(t,e){const n=qp.length;return zl(t,e+dp,n)===qp}(t,e)}function Zp(t,e){return{dataOffset:t+vp,length:e-(vp-fp)}}function Qp(t,e){return{dataOffset:t+xp,length:e-(xp-fp)}}function Jp(t,e){const n=zp.length;return t.getUint16(e)===Up&&zl(t,e+dp,n)===zp&&0===t.getUint8(e+dp+n)}function tu(t,e){const n=t.getUint16(e);return n>=jp&&n<=Rp||n===Op||n===Pp||n===kp||n===Tp||n===Ep||n===Ip||n===Mp}function eu(t,e){return t.getUint16(e)===Lp}const nu={isPngFile:function(t){return!!t&&zl(t,0,iu.length)===iu},findPngOffsets:function(t,e){const n={hasAppMarkers:!1};let i=iu.length;for(;i+ru+ou<=t.byteLength;){if(vu(t,i))n.hasAppMarkers=!0,n.pngHeaderOffset=i+cu;else if(xu(t,i)){const e=Su(t,i);void 0!==e&&(n.hasAppMarkers=!0,n.xmpChunks=[{dataOffset:e,length:t.getUint32(i+au)-(e-(i+cu))}])}else if(yu(t,i,e)){n.hasAppMarkers=!0;const e=zl(t,i+su,ou);n.pngTextChunks||(n.pngTextChunks=[]),n.pngTextChunks.push({length:t.getUint32(i+au),type:e,offset:i+cu})}else if(bu(t,i))n.hasAppMarkers=!0,n.tiffHeaderOffset=i+cu;else if(e&&wu(t,i)){n.hasAppMarkers=!0;const e=t.getUint32(i+au),r=i+cu,{profileName:o,compressionMethod:a,compressedProfileOffset:s}=Cu(t,r);n.iccChunks||(n.iccChunks=[]),n.iccChunks.push({offset:s,length:e-(s-r),chunkNumber:1,chunksTotal:1,profileName:o,compressionMethod:a})}else Au(t,i)&&(n.hasAppMarkers=!0,n.pngChunkOffsets||(n.pngChunkOffsets=[]),n.pngChunkOffsets.push(i+au));i+=t.getUint32(i+au)+ru+ou+4}return n}},iu="PNG\r\n\n",ru=4,ou=4,au=0,su=ru,cu=ru+ou,lu="XML:com.adobe.xmp\0",pu="tEXt",uu="iTXt",du="zTXt",fu="pHYs",mu="tIME",hu="eXIf",gu="iCCP";function vu(t,e){return"IHDR"===zl(t,e+su,ou)}function xu(t,e){return zl(t,e+su,ou)===uu&&zl(t,e+cu,lu.length)===lu}function yu(t,e,n){const i=zl(t,e+su,ou);return i===pu||i===uu||i===du&&n}function bu(t,e){return zl(t,e+su,ou)===hu}function wu(t,e){return zl(t,e+su,ou)===gu}function Au(t,e){const n=[fu,mu],i=zl(t,e+su,ou);return n.includes(i)}function Su(t,e){e+=cu+lu.length+1+1;let n=0;for(;n<2&&e<t.byteLength;)0===t.getUint8(e)&&n++,e++;if(!(n<2))return e}function Cu(t,e){const n=_l(t,e);e+=n.length+1;return{profileName:n,compressionMethod:t.getUint8(e),compressedProfileOffset:e+=1}}function Pu(t,e,n,i,r,o,a,s){if(void 0===s)return[];const c=[];let l=n.items;for(let n=0;n<s;n++){const n={extents:[]};n.itemId=ku(t,l,e),l+=i.item.itemId,n.constructionMethod=1===e||2===e?15&t.getUint16(l):void 0,l+=i.item.constructionMethod,n.dataReferenceIndex=t.getUint16(l),l+=i.item.dataReferenceIndex,n.baseOffset=Eu(t,l,i.item.baseOffset),l+=i.item.baseOffset,n.extentCount=t.getUint16(l),l+=i.item.extentCount;for(let s=0;s<n.extentCount;s++){const s={};s.extentIndex=Tu(t,e,l,a),l+=i.item.extent.extentIndex,s.extentOffset=Eu(t,l,r),l+=i.item.extent.extentOffset,s.extentLength=Eu(t,l,o),l+=i.item.extent.extentLength,n.extents.push(s)}c.push(n)}return c}function ku(t,e,n){return n<2?t.getUint16(e):2===n?t.getUint32(e):void 0}function Tu(t,e,n,i){if((1===e||2===e)&&i>0)return Eu(t,n,i)}function Eu(t,e,n){return 4===n?t.getUint32(e):8===n?(console.warn("This file uses an 8-bit offset which is currently not supported by ExifReader. Contact the maintainer to get it fixed."),function(t,e){return t.getUint32(e+4)}(t,e)):0}const Iu=1165519206,Mu=1835625829,ju=1970432288;function Du(t,e){const{length:n,contentOffset:i}=function(t,e){const n=t.getUint32(e);return function(t){return 0===t}(n)?{length:t.byteLength-e,contentOffset:e+4+4}:function(t){return 1===t}(n)&&function(t,e){return 0===t.getUint32(e+8)}(t,e)?{length:t.getUint32(e+12),contentOffset:e+4+4+8}:{length:n,contentOffset:e+4+4}}(t,e);if(n<8)return;const r=t.getUint32(e+4);if(1718909296===r)return function(t,e,n){return{type:"ftyp",majorBrand:zl(t,e,4),length:n}}(t,i,n);if(1768977008===r)return function(t,e,n,i){return{type:"iprp",subBoxes:Ou(t,n,i-(n-e)),length:i}}(t,e,i,n);if(1768973167===r)return function(t,e,n,i){return{type:"ipco",properties:Ou(t,n,i-(n-e)),length:i}}(t,e,i,n);if(1668246642===r)return function(t,e,n){return{type:"colr",icc:Ru(t,e),length:n}}(t,i,n);const o=t.getUint8(i);return 1835365473===r?function(t,e,n,i){return{type:"meta",subBoxes:Ou(t,n+3,i-(n+3-e)),length:i}}(t,e,i+1,n):1768714083===r?function(t,e,n,i){const{offsets:r,sizes:o}=function(t,e){const n={item:{dataReferenceIndex:2,extentCount:2,extent:{}}};t<2?(n.itemCount=2,n.item.itemId=2):2===t&&(n.itemCount=4,n.item.itemId=4),n.item.constructionMethod=1===t||2===t?2:0;const i={offsetSize:e,lengthSize:e,baseOffsetSize:e+1,indexSize:e+1};return i.itemCount=e+2,i.items=i.itemCount+n.itemCount,i.item={itemId:0},i.item.constructionMethod=i.item.itemId+n.item.itemId,i.item.dataReferenceIndex=i.item.constructionMethod+n.item.constructionMethod,{offsets:i,sizes:n}}(e,n+3),a=t.getUint8(r.offsetSize)>>4;o.item.extent.extentOffset=a;const s=15&t.getUint8(r.lengthSize);o.item.extent.extentLength=s;const c=t.getUint8(r.baseOffsetSize)>>4;o.item.baseOffset=c;const l=function(t,e,n){if(1===n||2===n)return 15&t.getUint8(e)}(t,r.indexSize,e);o.item.extent.extentIndex=void 0!==l?l:0;const p=function(t,e,n){return n<2?t.getUint16(e):2===n?t.getUint32(e):void 0}(t,r.itemCount,e);return{type:"iloc",items:Pu(t,e,r,o,a,s,l,p),length:i}}(t,o,i+1,n):1768517222===r?function(t,e,n,i,r){const{offsets:o}=function(t,e){const n={entryCount:e+3},i={};return i.entryCount=0===t?2:4,n.itemInfos=n.entryCount+i.entryCount,{offsets:n}}(n,i);return{type:"iinf",itemInfos:Ou(t,o.itemInfos,r-(o.itemInfos-e)),length:r}}(t,e,o,i+1,n):1768842853===r?function(t,e,n,i,r){i+=3;const o={type:"infe",length:r};return(0===n||1===n)&&(o.itemId=t.getUint16(i),i+=2,o.itemProtectionIndex=t.getUint16(i),i+=2,o.itemName=_l(t,i),i+=o.itemName.length+1),n>=2&&(2===n?(o.itemId=t.getUint16(i),i+=2):3===n&&(o.itemId=t.getUint32(i),i+=4),o.itemProtectionIndex=t.getUint16(i),i+=2,o.itemType=t.getUint32(i),i+=4,o.itemName=_l(t,i),i+=o.itemName.length+1,o.itemType===Mu?(o.contentType=_l(t,i),i+=o.contentType.length+1,e+r>i&&(o.contentEncoding=_l(t,i),i+=o.contentEncoding.length+1)):o.itemType===ju&&(o.itemUri=_l(t,i),i+=o.itemUri.length+1)),o}(t,e,o,i+1,n):{type:void 0,length:n}}function Fu(t){{const e={},n=function(t){let e=0;for(;e+4+4<=t.byteLength;){const n=Du(t,e);if(void 0===n)break;if("meta"===n.type)return n;e+=n.length}}(t);return n?(e.tiffHeaderOffset=function(t,e){try{const n=function(t){return t.subBoxes.find(t=>"iinf"===t.type).itemInfos.find(t=>t.itemType===Iu)}(e).itemId,i=Uu(e,n);return function(t,e){return e+4+t.getUint32(e)}(t,i.baseOffset+i.extents[0].extentOffset)}catch{return}}(t,n),e.xmpChunks=function(t){try{const e=function(t){return t.subBoxes.find(t=>"iinf"===t.type).itemInfos.find(t=>t.itemType===Mu&&"application/rdf+xml"===t.contentType)}(t).itemId,n=Uu(t,e),i=Uu(t,e).extents[0];return[{dataOffset:n.baseOffset+i.extentOffset,length:i.extentLength}]}catch{return}}(n),e.iccChunks=function(t){try{const e=t.subBoxes.find(t=>"iprp"===t.type).subBoxes.find(t=>"ipco"===t.type).properties.find(t=>"colr"===t.type).icc;if(e)return[e]}catch{}}(n),e.hasAppMarkers=void 0!==e.tiffHeaderOffset||void 0!==e.xmpChunks||void 0!==e.iccChunks,e):{hasAppMarkers:!1}}}function Uu(t,e){return t.subBoxes.find(t=>"iloc"===t.type).items.find(t=>t.itemId===e)}function Ru(t,e){const n=zl(t,e,4);if("prof"===n||"rICC"===n)return{offset:e+4,length:t.getUint32(e+4),chunkNumber:1,chunksTotal:1}}function Ou(t,e,n){const i=[Iu,Mu],r=[];let o=e;for(;o<e+n;){const e=Du(t,o);if(void 0===e)break;void 0!==e.type&&(void 0===e.itemType||-1!==i.indexOf(e.itemType))&&r.push(e),o+=e.length}return r}const Lu={isHeicFile:function(t){if(!t)return!1;const e=["heic","heix","hevc","hevx","heim","heis","hevm","hevs","mif1"];try{const n=Du(t,0);return n&&-1!==e.indexOf(n.majorBrand)}catch{return!1}},findHeicOffsets:function(t){return Fu(t)}};const Nu={isAvifFile:function(t){if(!t)return!1;try{const e=Du(t,0);return e&&"avif"===e.majorBrand}catch{return!1}},findAvifOffsets:function(t){return Fu(t)}};const Bu={isWebpFile:function(t){const e="RIFF",n="WEBP";return!!t&&zl(t,0,4)===e&&zl(t,8,4)===n},findOffsets:function(t){const e="Exif\0\0";let n,i,r,o,a=12,s=!1;for(;a+8<t.byteLength;){const c=zl(t,a,4),l=t.getUint32(a+4,!0);"EXIF"===c?(s=!0,n=zl(t,a+8,6)===e?a+8+6:a+8):"XMP "===c?(s=!0,i=[{dataOffset:a+8,length:l}]):"ICCP"===c?(s=!0,r=[{offset:a+8,length:l,chunkNumber:1,chunksTotal:1}]):"VP8X"===c&&(s=!0,o=a+8),a+=8+(l%2==0?l:l+1)}return{hasAppMarkers:s,tiffHeaderOffset:n,xmpChunks:i,iccChunks:r,vp8xChunkOffset:o}}};const Vu={isGifFile:function(t){return!!t&&zu.includes(zl(t,0,qu))},findOffsets:function(){return{gifHeaderOffset:0}}},qu=6,zu=["GIF87a","GIF89a"];const _u={isXMLFile:function(t){return!!t&&zl(t,Gu,$u.length)===$u},findOffsets:function(t){const e=[];return e.push({dataOffset:Gu,length:t.byteLength}),{xmpChunks:e}}},Gu=0,$u="<?xpacket begin";const Hu={parseAppMarkers:function(t,e){if(sp.isTiffFile(t))return Wu(sp.findTiffOffsets(),"tiff","TIFF");if(cp.isJpegFile(t))return Wu(cp.findJpegOffsets(t),"jpeg","JPEG");if(nu.isPngFile(t))return Wu(nu.findPngOffsets(t,e),"png","PNG");if(Lu.isHeicFile(t))return Wu(Lu.findHeicOffsets(t),"heic","HEIC");if(Nu.isAvifFile(t))return Wu(Nu.findAvifOffsets(t),"avif","AVIF");if(Bu.isWebpFile(t))return Wu(Bu.findOffsets(t),"webp","WebP");if(Vu.isGifFile(t))return Wu(Vu.findOffsets(t),"gif","GIF");if(_u.isXMLFile(t))return Wu(_u.findOffsets(t),"xml","XML");throw new Error("Invalid image format")}};function Wu(t,e,n){return Wl({},t,{fileType:{value:e,description:n}})}const Xu={ApertureValue:t=>Math.pow(Math.sqrt(2),t[0]/t[1]).toFixed(2),ColorSpace:t=>1===t?"sRGB":65535===t?"Uncalibrated":"Unknown",ComponentsConfiguration:t=>t.map(t=>49===t?"Y":50===t?"Cb":51===t?"Cr":52===t?"R":53===t?"G":54===t?"B":void 0).join(""),Contrast:t=>0===t?"Normal":1===t?"Soft":2===t?"Hard":"Unknown",CustomRendered:t=>0===t?"Normal process":1===t?"Custom process":"Unknown",ExposureMode:t=>0===t?"Auto exposure":1===t?"Manual exposure":2===t?"Auto bracket":"Unknown",ExposureProgram:t=>0===t?"Undefined":1===t?"Manual":2===t?"Normal program":3===t?"Aperture priority":4===t?"Shutter priority":5===t?"Creative program":6===t?"Action program":7===t?"Portrait mode":8===t?"Landscape mode":9===t?"Bulb":"Unknown",ExposureTime(t){if(t[0]/t[1]>.25){const e=t[0]/t[1];return Number.isInteger(e)?""+e:e.toFixed(1)}return 0!==t[0]?`1/${Math.round(t[1]/t[0])}`:`0/${t[1]}`},FNumber:t=>`f/${Number(t[0]/t[1]).toFixed(1)}`,FocalLength:t=>t[0]/t[1]+" mm",FocalPlaneResolutionUnit:t=>2===t?"inches":3===t?"centimeters":4===t?"millimeters":"Unknown",LightSource:t=>1===t?"Daylight":2===t?"Fluorescent":3===t?"Tungsten (incandescent light)":4===t?"Flash":9===t?"Fine weather":10===t?"Cloudy weather":11===t?"Shade":12===t?"Daylight fluorescent (D 5700 – 7100K)":13===t?"Day white fluorescent (N 4600 – 5400K)":14===t?"Cool white fluorescent (W 3900 – 4500K)":15===t?"White fluorescent (WW 3200 – 3700K)":17===t?"Standard light A":18===t?"Standard light B":19===t?"Standard light C":20===t?"D55":21===t?"D65":22===t?"D75":23===t?"D50":24===t?"ISO studio tungsten":255===t?"Other light source":"Unknown",MeteringMode:t=>1===t?"Average":2===t?"CenterWeightedAverage":3===t?"Spot":4===t?"MultiSpot":5===t?"Pattern":6===t?"Partial":255===t?"Other":"Unknown",ResolutionUnit:t=>2===t?"inches":3===t?"centimeters":"Unknown",Saturation:t=>0===t?"Normal":1===t?"Low saturation":2===t?"High saturation":"Unknown",FocalLengthIn35mmFilm:t=>0===t?"Unknown":t+" mm",SceneCaptureType:t=>0===t?"Standard":1===t?"Landscape":2===t?"Portrait":3===t?"Night scene":"Unknown",Sharpness:t=>0===t?"Normal":1===t?"Soft":2===t?"Hard":"Unknown",ShutterSpeedValue(t){const e=Math.pow(2,t[0]/t[1]);return e<=1?`${Math.round(1/e)}`:`1/${Math.round(e)}`},WhiteBalance:t=>0===t?"Auto white balance":1===t?"Manual white balance":"Unknown",XResolution:t=>""+Math.round(t[0]/t[1]),YResolution:t=>""+Math.round(t[0]/t[1])},Yu={11:"ProcessingSoftware",254:{name:"SubfileType",description:t=>({0:"Full-resolution image",1:"Reduced-resolution image",2:"Single page of multi-page image",3:"Single page of multi-page reduced-resolution image",4:"Transparency mask",5:"Transparency mask of reduced-resolution image",6:"Transparency mask of multi-page image",7:"Transparency mask of reduced-resolution multi-page image",65537:"Alternate reduced-resolution image",4294967295:"Invalid"}[t]||"Unknown")},255:{name:"OldSubfileType",description:t=>({0:"Full-resolution image",1:"Reduced-resolution image",2:"Single page of multi-page image"}[t]||"Unknown")},256:"ImageWidth",257:"ImageLength",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",263:{name:"Thresholding",description:t=>({1:"No dithering or halftoning",2:"Ordered dither or halfton",3:"Randomized dither"}[t]||"Unknown")},264:"CellWidth",265:"CellLength",266:{name:"FillOrder",description:t=>({1:"Normal",2:"Reversed"}[t]||"Unknown")},269:"DocumentName",270:"ImageDescription",271:"Make",272:"Model",273:"StripOffsets",274:{name:"Orientation",description:t=>1===t?"top-left":2===t?"top-right":3===t?"bottom-right":4===t?"bottom-left":5===t?"left-top":6===t?"right-top":7===t?"right-bottom":8===t?"left-bottom":"Undefined"},277:"SamplesPerPixel",278:"RowsPerStrip",279:"StripByteCounts",280:"MinSampleValue",281:"MaxSampleValue",282:{name:"XResolution",description:Xu.XResolution},283:{name:"YResolution",description:Xu.YResolution},284:"PlanarConfiguration",285:"PageName",286:{name:"XPosition",description:t=>""+Math.round(t[0]/t[1])},287:{name:"YPosition",description:t=>""+Math.round(t[0]/t[1])},290:{name:"GrayResponseUnit",description:t=>({1:"0.1",2:"0.001",3:"0.0001",4:"1e-05",5:"1e-06"}[t]||"Unknown")},296:{name:"ResolutionUnit",description:Xu.ResolutionUnit},297:"PageNumber",301:"TransferFunction",305:"Software",306:"DateTime",315:"Artist",316:"HostComputer",317:"Predictor",318:{name:"WhitePoint",description:t=>t.map(t=>`${t[0]}/${t[1]}`).join(", ")},319:{name:"PrimaryChromaticities",description:t=>t.map(t=>`${t[0]}/${t[1]}`).join(", ")},321:"HalftoneHints",322:"TileWidth",323:"TileLength",330:"A100DataOffset",332:{name:"InkSet",description:t=>({1:"CMYK",2:"Not CMYK"}[t]||"Unknown")},337:"TargetPrinter",338:{name:"ExtraSamples",description:t=>({0:"Unspecified",1:"Associated Alpha",2:"Unassociated Alpha"}[t]||"Unknown")},339:{name:"SampleFormat",description:t=>{const e={1:"Unsigned",2:"Signed",3:"Float",4:"Undefined",5:"Complex int",6:"Complex float"};return Array.isArray(t)?t.map(t=>e[t]||"Unknown").join(", "):"Unknown"}},513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",529:{name:"YCbCrCoefficients",description:t=>t.map(t=>""+t[0]/t[1]).join("/")},530:"YCbCrSubSampling",531:{name:"YCbCrPositioning",description:t=>1===t?"centered":2===t?"co-sited":"undefined "+t},532:{name:"ReferenceBlackWhite",description:t=>t.map(t=>""+t[0]/t[1]).join(", ")},700:"ApplicationNotes",18246:"Rating",18249:"RatingPercent",33432:{name:"Copyright",description:t=>t.join("; ")},33550:"PixelScale",33723:"IPTC-NAA",33920:"IntergraphMatrix",33922:"ModelTiePoint",34118:"SEMInfo",34264:"ModelTransform",34377:"PhotoshopSettings",34665:"Exif IFD Pointer",34675:"ICC_Profile",34735:"GeoTiffDirectory",34736:"GeoTiffDoubleParams",34737:"GeoTiffAsciiParams",34853:"GPS Info IFD Pointer",40091:{name:"XPTitle",description:Ku},40092:{name:"XPComment",description:Ku},40093:{name:"XPAuthor",description:Ku},40094:{name:"XPKeywords",description:Ku},40095:{name:"XPSubject",description:Ku},42112:"GDALMetadata",42113:"GDALNoData",50341:"PrintIM",50707:"DNGBackwardVersion",50708:"UniqueCameraModel",50709:"LocalizedCameraModel",50721:"ColorMatrix1",50722:"ColorMatrix2",50723:"CameraCalibration1",50724:"CameraCalibration2",50725:"ReductionMatrix1",50726:"ReductionMatrix2",50727:"AnalogBalance",50728:"AsShotNeutral",50729:"AsShotWhiteXY",50730:"BaselineExposure",50731:"BaselineNoise",50732:"BaselineSharpness",50734:"LinearResponseLimit",50735:"CameraSerialNumber",50736:"DNGLensInfo",50739:"ShadowScale",50741:{name:"MakerNoteSafety",description:t=>({0:"Unsafe",1:"Safe"}[t]||"Unknown")},50778:{name:"CalibrationIlluminant1",description:Xu.LightSource},50779:{name:"CalibrationIlluminant2",description:Xu.LightSource},50781:"RawDataUniqueID",50827:"OriginalRawFileName",50828:"OriginalRawFileData",50831:"AsShotICCProfile",50832:"AsShotPreProfileMatrix",50833:"CurrentICCProfile",50834:"CurrentPreProfileMatrix",50879:"ColorimetricReference",50885:"SRawType",50898:"PanasonicTitle",50899:"PanasonicTitle2",50931:"CameraCalibrationSig",50932:"ProfileCalibrationSig",50933:"ProfileIFD",50934:"AsShotProfileName",50936:"ProfileName",50937:"ProfileHueSatMapDims",50938:"ProfileHueSatMapData1",50939:"ProfileHueSatMapData2",50940:"ProfileToneCurve",50941:{name:"ProfileEmbedPolicy",description:t=>({0:"Allow Copying",1:"Embed if Used",2:"Never Embed",3:"No Restrictions"}[t]||"Unknown")},50942:"ProfileCopyright",50964:"ForwardMatrix1",50965:"ForwardMatrix2",50966:"PreviewApplicationName",50967:"PreviewApplicationVersion",50968:"PreviewSettingsName",50969:"PreviewSettingsDigest",50970:{name:"PreviewColorSpace",description:t=>({1:"Gray Gamma 2.2",2:"sRGB",3:"Adobe RGB",4:"ProPhoto RGB"}[t]||"Unknown")},50971:"PreviewDateTime",50972:"RawImageDigest",50973:"OriginalRawFileDigest",50981:"ProfileLookTableDims",50982:"ProfileLookTableData",51043:"TimeCodes",51044:"FrameRate",51058:"TStop",51081:"ReelName",51089:"OriginalDefaultFinalSize",51090:"OriginalBestQualitySize",51091:"OriginalDefaultCropSize",51105:"CameraLabel",51107:{name:"ProfileHueSatMapEncoding",description:t=>({0:"Linear",1:"sRGB"}[t]||"Unknown")},51108:{name:"ProfileLookTableEncoding",description:t=>({0:"Linear",1:"sRGB"}[t]||"Unknown")},51109:"BaselineExposureOffset",51110:{name:"DefaultBlackRender",description:t=>({0:"Auto",1:"None"}[t]||"Unknown")},51111:"NewRawImageDigest",51112:"RawToPreviewGain"};function Ku(t){return new TextDecoder("utf-16").decode(new Uint8Array(t)).replace(/\u0000+$/,"")}const Zu={33434:{name:"ExposureTime",description:Xu.ExposureTime},33437:{name:"FNumber",description:Xu.FNumber},34850:{name:"ExposureProgram",description:Xu.ExposureProgram},34852:"SpectralSensitivity",34855:"ISOSpeedRatings",34856:{name:"OECF",description:()=>"[Raw OECF table data]"},34858:"TimeZoneOffset",34859:"SelfTimerMode",34864:{name:"SensitivityType",description:t=>({1:"Standard Output Sensitivity",2:"Recommended Exposure Index",3:"ISO Speed",4:"Standard Output Sensitivity and Recommended Exposure Index",5:"Standard Output Sensitivity and ISO Speed",6:"Recommended Exposure Index and ISO Speed",7:"Standard Output Sensitivity, Recommended Exposure Index and ISO Speed"}[t]||"Unknown")},34865:"StandardOutputSensitivity",34866:"RecommendedExposureIndex",34867:"ISOSpeed",34868:"ISOSpeedLatitudeyyy",34869:"ISOSpeedLatitudezzz",36864:{name:"ExifVersion",description:t=>ep(t)},36867:"DateTimeOriginal",36868:"DateTimeDigitized",36873:"GooglePlusUploadCode",36880:"OffsetTime",36881:"OffsetTimeOriginal",36882:"OffsetTimeDigitized",37121:{name:"ComponentsConfiguration",description:Xu.ComponentsConfiguration},37122:"CompressedBitsPerPixel",37377:{name:"ShutterSpeedValue",description:Xu.ShutterSpeedValue},37378:{name:"ApertureValue",description:Xu.ApertureValue},37379:"BrightnessValue",37380:"ExposureBiasValue",37381:{name:"MaxApertureValue",description:t=>Math.pow(Math.sqrt(2),t[0]/t[1]).toFixed(2)},37382:{name:"SubjectDistance",description:t=>t[0]/t[1]+" m"},37383:{name:"MeteringMode",description:Xu.MeteringMode},37384:{name:"LightSource",description:Xu.LightSource},37385:{name:"Flash",description:t=>0===t?"Flash did not fire":1===t?"Flash fired":5===t?"Strobe return light not detected":7===t?"Strobe return light detected":9===t?"Flash fired, compulsory flash mode":13===t?"Flash fired, compulsory flash mode, return light not detected":15===t?"Flash fired, compulsory flash mode, return light detected":16===t?"Flash did not fire, compulsory flash mode":24===t?"Flash did not fire, auto mode":25===t?"Flash fired, auto mode":29===t?"Flash fired, auto mode, return light not detected":31===t?"Flash fired, auto mode, return light detected":32===t?"No flash function":65===t?"Flash fired, red-eye reduction mode":69===t?"Flash fired, red-eye reduction mode, return light not detected":71===t?"Flash fired, red-eye reduction mode, return light detected":73===t?"Flash fired, compulsory flash mode, red-eye reduction mode":77===t?"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected":79===t?"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected":89===t?"Flash fired, auto mode, red-eye reduction mode":93===t?"Flash fired, auto mode, return light not detected, red-eye reduction mode":95===t?"Flash fired, auto mode, return light detected, red-eye reduction mode":"Unknown"},37386:{name:"FocalLength",description:Xu.FocalLength},37393:"ImageNumber",37394:{name:"SecurityClassification",description:t=>({C:"Confidential",R:"Restricted",S:"Secret",T:"Top Secret",U:"Unclassified"}[t]||"Unknown")},37395:"ImageHistory",37396:{name:"SubjectArea",description:t=>2===t.length?`Location; X: ${t[0]}, Y: ${t[1]}`:3===t.length?`Circle; X: ${t[0]}, Y: ${t[1]}, diameter: ${t[2]}`:4===t.length?`Rectangle; X: ${t[0]}, Y: ${t[1]}, width: ${t[2]}, height: ${t[3]}`:"Unknown"},37500:{name:"MakerNote",description:()=>"[Raw maker note data]"},37510:{name:"UserComment",description:np},37520:"SubSecTime",37521:"SubSecTimeOriginal",37522:"SubSecTimeDigitized",37724:"ImageSourceData",37888:{name:"AmbientTemperature",description:t=>t[0]/t[1]+" °C"},37889:{name:"Humidity",description:t=>t[0]/t[1]+" %"},37890:{name:"Pressure",description:t=>t[0]/t[1]+" hPa"},37891:{name:"WaterDepth",description:t=>t[0]/t[1]+" m"},37892:{name:"Acceleration",description:t=>t[0]/t[1]+" mGal"},37893:{name:"CameraElevationAngle",description:t=>t[0]/t[1]+" °"},40960:{name:"FlashpixVersion",description:t=>t.map(t=>String.fromCharCode(t)).join("")},40961:{name:"ColorSpace",description:Xu.ColorSpace},40962:"PixelXDimension",40963:"PixelYDimension",40964:"RelatedSoundFile",40965:"Interoperability IFD Pointer",41483:"FlashEnergy",41484:{name:"SpatialFrequencyResponse",description:()=>"[Raw SFR table data]"},41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:{name:"FocalPlaneResolutionUnit",description:Xu.FocalPlaneResolutionUnit},41492:{name:"SubjectLocation",description:([t,e])=>`X: ${t}, Y: ${e}`},41493:"ExposureIndex",41495:{name:"SensingMethod",description:t=>1===t?"Undefined":2===t?"One-chip color area sensor":3===t?"Two-chip color area sensor":4===t?"Three-chip color area sensor":5===t?"Color sequential area sensor":7===t?"Trilinear sensor":8===t?"Color sequential linear sensor":"Unknown"},41728:{name:"FileSource",description:t=>3===t?"DSC":"Unknown"},41729:{name:"SceneType",description:t=>1===t?"A directly photographed image":"Unknown"},41730:{name:"CFAPattern",description:()=>"[Raw CFA pattern table data]"},41985:{name:"CustomRendered",description:Xu.CustomRendered},41986:{name:"ExposureMode",description:Xu.ExposureMode},41987:{name:"WhiteBalance",description:Xu.WhiteBalance},41988:{name:"DigitalZoomRatio",description:t=>0===t[0]?"Digital zoom was not used":""+t[0]/t[1]},41989:{name:"FocalLengthIn35mmFilm",description:Xu.FocalLengthIn35mmFilm},41990:{name:"SceneCaptureType",description:Xu.SceneCaptureType},41991:{name:"GainControl",description:t=>0===t?"None":1===t?"Low gain up":2===t?"High gain up":3===t?"Low gain down":4===t?"High gain down":"Unknown"},41992:{name:"Contrast",description:Xu.Contrast},41993:{name:"Saturation",description:Xu.Saturation},41994:{name:"Sharpness",description:Xu.Sharpness},41995:{name:"DeviceSettingDescription",description:()=>"[Raw device settings table data]"},41996:{name:"SubjectDistanceRange",description:t=>1===t?"Macro":2===t?"Close view":3===t?"Distant view":"Unknown"},42016:"ImageUniqueID",42032:"CameraOwnerName",42033:"BodySerialNumber",42034:{name:"LensSpecification",description:t=>{const e=`${parseFloat((t[0][0]/t[0][1]).toFixed(5))}-${parseFloat((t[1][0]/t[1][1]).toFixed(5))} mm`;if(0===t[3][1])return`${e} f/?`;const n=1/(t[2][1]/t[2][1]/(t[3][0]/t[3][1]));return`${e} f/${parseFloat(n.toFixed(5))}`}},42035:"LensMake",42036:"LensModel",42037:"LensSerialNumber",42080:{name:"CompositeImage",description:t=>({1:"Not a Composite Image",2:"General Composite Image",3:"Composite Image Captured While Shooting"}[t]||"Unknown")},42081:"SourceImageNumberOfCompositeImage",42082:"SourceExposureTimesOfCompositeImage",42240:"Gamma",59932:"Padding",59933:"OffsetSchema",65e3:"OwnerName",65001:"SerialNumber",65002:"Lens",65100:"RawFile",65101:"Converter",65102:"WhiteBalance",65105:"Exposure",65106:"Shadows",65107:"Brightness",65108:"Contrast",65109:"Saturation",65110:"Sharpness",65111:"Smoothness",65112:"MoireFilter"},Qu={0:{name:"GPSVersionID",description:t=>2===t[0]&&2===t[1]&&0===t[2]&&0===t[3]?"Version 2.2":"Unknown"},1:{name:"GPSLatitudeRef",description:t=>{const e=t.join("");return"N"===e?"North latitude":"S"===e?"South latitude":"Unknown"}},2:{name:"GPSLatitude",description:ip},3:{name:"GPSLongitudeRef",description:t=>{const e=t.join("");return"E"===e?"East longitude":"W"===e?"West longitude":"Unknown"}},4:{name:"GPSLongitude",description:ip},5:{name:"GPSAltitudeRef",description:t=>0===t?"Sea level":1===t?"Sea level reference (negative value)":"Unknown"},6:{name:"GPSAltitude",description:t=>t[0]/t[1]+" m"},7:{name:"GPSTimeStamp",description:t=>t.map(([t,e])=>{const n=t/e;return/^\d(\.|$)/.test(`${n}`)?`0${n}`:n}).join(":")},8:"GPSSatellites",9:{name:"GPSStatus",description:t=>{const e=t.join("");return"A"===e?"Measurement in progress":"V"===e?"Measurement Interoperability":"Unknown"}},10:{name:"GPSMeasureMode",description:t=>{const e=t.join("");return"2"===e?"2-dimensional measurement":"3"===e?"3-dimensional measurement":"Unknown"}},11:"GPSDOP",12:{name:"GPSSpeedRef",description:t=>{const e=t.join("");return"K"===e?"Kilometers per hour":"M"===e?"Miles per hour":"N"===e?"Knots":"Unknown"}},13:"GPSSpeed",14:{name:"GPSTrackRef",description:t=>{const e=t.join("");return"T"===e?"True direction":"M"===e?"Magnetic direction":"Unknown"}},15:"GPSTrack",16:{name:"GPSImgDirectionRef",description:t=>{const e=t.join("");return"T"===e?"True direction":"M"===e?"Magnetic direction":"Unknown"}},17:"GPSImgDirection",18:"GPSMapDatum",19:{name:"GPSDestLatitudeRef",description:t=>{const e=t.join("");return"N"===e?"North latitude":"S"===e?"South latitude":"Unknown"}},20:{name:"GPSDestLatitude",description:t=>t[0][0]/t[0][1]+t[1][0]/t[1][1]/60+t[2][0]/t[2][1]/3600},21:{name:"GPSDestLongitudeRef",description:t=>{const e=t.join("");return"E"===e?"East longitude":"W"===e?"West longitude":"Unknown"}},22:{name:"GPSDestLongitude",description:t=>t[0][0]/t[0][1]+t[1][0]/t[1][1]/60+t[2][0]/t[2][1]/3600},23:{name:"GPSDestBearingRef",description:t=>{const e=t.join("");return"T"===e?"True direction":"M"===e?"Magnetic direction":"Unknown"}},24:"GPSDestBearing",25:{name:"GPSDestDistanceRef",description:t=>{const e=t.join("");return"K"===e?"Kilometers":"M"===e?"Miles":"N"===e?"Knots":"Unknown"}},26:"GPSDestDistance",27:{name:"GPSProcessingMethod",description:np},28:{name:"GPSAreaInformation",description:np},29:"GPSDateStamp",30:{name:"GPSDifferential",description:t=>0===t?"Measurement without differential correction":1===t?"Differential correction applied":"Unknown"},31:"GPSHPositioningError"},Ju={1:"InteroperabilityIndex",2:{name:"InteroperabilityVersion",description:t=>ep(t)},4096:"RelatedImageFileFormat",4097:"RelatedImageWidth",4098:"RelatedImageHeight"},td={45056:{name:"MPFVersion",description:t=>ep(t)},45057:"NumberOfImages",45058:"MPEntry",45059:"ImageUIDList",45060:"TotalFrames"},ed=Wl({},Yu,Zu),nd="0th",id="1st",rd="exif",od="gps",ad="interoperability",sd="mpf",cd="canon",ld="pentax",pd={[nd]:ed,[id]:Yu,[rd]:ed,[od]:Qu,[ad]:Ju,[sd]:td,[cd]:{4:{name:"ShotInfo",description:t=>t}},[ld]:{0:{name:"PentaxVersion",description:t=>t.join(".")},5:"PentaxModelID",555:"LevelInfo"}},ud={1:1,2:1,3:2,4:4,5:8,7:1,9:4,10:8,13:4},dd={BYTE:1,ASCII:2,SHORT:3,LONG:4,RATIONAL:5,UNDEFINED:7,SLONG:9,SRATIONAL:10,IFD:13},fd={getAsciiValue:function(t){return t.map(t=>String.fromCharCode(t))},getByteAt:md,getAsciiAt:function(t,e){return t.getUint8(e)},getShortAt:function(t,e,n){return t.getUint16(e,n===ap.LITTLE_ENDIAN)},getLongAt:hd,getRationalAt:function(t,e,n){return[hd(t,e,n),hd(t,e+4,n)]},getUndefinedAt:function(t,e){return md(t,e)},getSlongAt:gd,getSrationalAt:function(t,e,n){return[gd(t,e,n),gd(t,e+4,n)]},getIfdPointerAt:function(t,e,n){return hd(t,e,n)},typeSizes:ud,tagTypes:dd,getTypeSize:function(t){if(void 0===dd[t])throw new Error("No such type found.");return ud[dd[t]]}};function md(t,e){return t.getUint8(e)}function hd(t,e,n){return t.getUint32(e,n===ap.LITTLE_ENDIAN)}function gd(t,e,n){return t.getInt32(e,n===ap.LITTLE_ENDIAN)}const vd={1:fd.getByteAt,2:fd.getAsciiAt,3:fd.getShortAt,4:fd.getLongAt,5:fd.getRationalAt,7:fd.getUndefinedAt,9:fd.getSlongAt,10:fd.getSrationalAt,13:fd.getIfdPointerAt};function xd(t,e,n){return e+fd.getLongAt(t,e+4,n)}function yd(t,e,n,i,r,o){const a=fd.getTypeSize("SHORT"),s={},c=function(t,e,n){return e+fd.getTypeSize("SHORT")<=t.byteLength?fd.getShortAt(t,e,n):0}(t,i,r);i+=a;for(let a=0;a<c&&!(i+12>t.byteLength);a++){const a=bd(t,e,n,i,r,o);void 0!==a&&(s[a.name]={id:a.id,value:a.value,description:a.description},("MakerNote"===a.name||e===ld&&"LevelInfo"===a.name)&&(s[a.name].__offset=a.__offset)),i+=12}if(i<t.byteLength-fd.getTypeSize("LONG")){const a=fd.getLongAt(t,i,r);0!==a&&e===nd&&(s.Thumbnail=yd(t,"1st",n,n+a,r,o))}return s}function bd(t,e,n,i,r,o){const a=fd.getTypeSize("SHORT"),s=a+fd.getTypeSize("SHORT"),c=s+fd.getTypeSize("LONG"),l=fd.getShortAt(t,i,r),p=fd.getShortAt(t,i+a,r),u=fd.getLongAt(t,i+s,r);let d,f;if(void 0===fd.typeSizes[p]||!o&&void 0===pd[e][l])return;if(function(t,e){return fd.typeSizes[t]*e<=fd.getTypeSize("LONG")}(p,u))f=i+c,d=wd(t,f,p,u,r);else if(f=fd.getLongAt(t,i+c,r),function(t,e,n,i,r){return e+n+fd.typeSizes[i]*r<=t.byteLength}(t,n,f,p,u)){d=wd(t,n+f,p,u,r,33723===l)}else d="<faulty value>";p===fd.tagTypes.ASCII&&(d=function(t){const e=[];let n=0;for(let i=0;i<t.length;i++)"\0"!==t[i]?(void 0===e[n]&&(e[n]=""),e[n]+=t[i]):n++;return e}(d),d=function(t){try{return t.map(t=>decodeURIComponent(escape(t)))}catch{return t}}(d));let m=`undefined-${l}`,h=d;if(void 0!==pd[e][l])if(void 0!==pd[e][l].name&&void 0!==pd[e][l].description){m=pd[e][l].name;try{h=pd[e][l].description(d)}catch{h=Ad(d)}}else p===fd.tagTypes.RATIONAL||p===fd.tagTypes.SRATIONAL?(m=pd[e][l],h=""+d[0]/d[1]):(m=pd[e][l],h=Ad(d));return{id:l,name:m,value:d,description:h,__offset:f}}function wd(t,e,n,i,r,o=!1){let a=[];o&&(i*=fd.typeSizes[n],n=fd.tagTypes.BYTE);for(let o=0;o<i;o++)a.push(vd[n](t,e,r)),e+=fd.typeSizes[n];return n===fd.tagTypes.ASCII?a=fd.getAsciiValue(a):1===a.length&&(a=a[0]),a}function Ad(t){return t instanceof Array?t.join(", "):t}const Sd="Exif IFD Pointer",Cd="GPS Info IFD Pointer",Pd="Interoperability IFD Pointer",kd={read:function(t,e,n){const i=ap.getByteOrder(t,e);let r=function(t,e,n,i){return yd(t,nd,e,xd(t,e,n),n,i)}(t,e,i,n);return r=function(t,e,n,i,r){return void 0!==t[Sd]?Wl(t,yd(e,rd,n,n+t[Sd].value,i,r)):t}(r,t,e,i,n),r=function(t,e,n,i,r){return void 0!==t[Cd]?Wl(t,yd(e,od,n,n+t[Cd].value,i,r)):t}(r,t,e,i,n),r=function(t,e,n,i,r){return void 0!==t[Pd]?Wl(t,yd(e,ad,n,n+t[Pd].value,i,r)):t}(r,t,e,i,n),{tags:r,byteOrder:i}}};const Td={read:function(t,e,n){const i=ap.getByteOrder(t,e),r=yd(t,"mpf",e,xd(t,e,i),i,n);return function(t,e,n,i){if(!n.MPEntry)return n;const r=[];for(let o=0;o<Math.ceil(n.MPEntry.value.length/Ed);o++){r[o]={};const a=Id(n.MPEntry.value,o*Ed,fd.getTypeSize("LONG"),i);r[o].ImageFlags=Md(a),r[o].ImageFormat=jd(a),r[o].ImageType=Dd(a);const s=Id(n.MPEntry.value,o*Ed+4,fd.getTypeSize("LONG"),i);r[o].ImageSize={value:s,description:""+s};const c=Fd(o,n.MPEntry,i,e);r[o].ImageOffset={value:c,description:""+c};const l=Id(n.MPEntry.value,o*Ed+12,fd.getTypeSize("SHORT"),i);r[o].DependentImage1EntryNumber={value:l,description:""+l};const p=Id(n.MPEntry.value,o*Ed+14,fd.getTypeSize("SHORT"),i);r[o].DependentImage2EntryNumber={value:p,description:""+p},r[o].image=t.buffer.slice(c,c+s),Xl(r[o],"base64",function(){return Yl(this.image)})}return n.Images=r,n}(t,e,r,i)}},Ed=16;function Id(t,e,n,i){if(i===ap.LITTLE_ENDIAN){let i=0;for(let r=0;r<n;r++)i+=t[e+r]<<8*r;return i}let r=0;for(let i=0;i<n;i++)r+=t[e+i]<<8*(n-1-i);return r}function Md(t){const e=[t>>31&1,t>>30&1,t>>29&1],n=[];return e[0]&&n.push("Dependent Parent Image"),e[1]&&n.push("Dependent Child Image"),e[2]&&n.push("Representative Image"),{value:e,description:n.join(", ")||"None"}}function jd(t){const e=t>>24&7;return{value:e,description:0===e?"JPEG":"Unknown"}}function Dd(t){const e=16777215&t;return{value:e,description:{196608:"Baseline MP Primary Image",65537:"Large Thumbnail (VGA equivalent)",65538:"Large Thumbnail (Full HD equivalent)",131073:"Multi-Frame Image (Panorama)",131074:"Multi-Frame Image (Disparity)",131075:"Multi-Frame Image (Multi-Angle)",0:"Undefined"}[e]||"Unknown"}}function Fd(t,e,n,i){return function(t){return 0===t}(t)?0:Id(e.value,t*Ed+8,fd.getTypeSize("LONG"),n)+i}const Ud={read:function(t,e){const n=function(t,e){return fd.getShortAt(t,e)}(t,e),i=function(t,e,n){if(8>n)return;const i=fd.getByteAt(t,e+7);return{value:i,description:""+i}}(t,e,n);return{"Bits Per Sample":Rd(t,e,n),"Image Height":Od(t,e,n),"Image Width":Ld(t,e,n),"Color Components":i,Subsampling:i&&Nd(t,e,i.value,n)}}};function Rd(t,e,n){if(3>n)return;const i=fd.getByteAt(t,e+2);return{value:i,description:""+i}}function Od(t,e,n){if(5>n)return;const i=fd.getShortAt(t,e+3);return{value:i,description:`${i}px`}}function Ld(t,e,n){if(7>n)return;const i=fd.getShortAt(t,e+5);return{value:i,description:`${i}px`}}function Nd(t,e,n,i){if(8+3*n>i)return;const r=[];for(let i=0;i<n;i++){const n=e+8+3*i;r.push([fd.getByteAt(t,n),fd.getByteAt(t,n+1),fd.getByteAt(t,n+2)])}return{value:r,description:r.length>1?Bd(r)+Vd(r):""}}function Bd(t){const e={1:"Y",2:"Cb",3:"Cr",4:"I",5:"Q"};return t.map(t=>e[t[0]]).join("")}function Vd(t){const e={17:"4:4:4 (1 1)",18:"4:4:0 (1 2)",20:"4:4:1 (1 4)",33:"4:2:2 (2 1)",34:"4:2:0 (2 2)",36:"4:2:1 (2 4)",65:"4:1:1 (4 1)",66:"4:1:0 (4 2)"};return 0===t.length||void 0===t[0][1]||void 0===e[t[0][1]]?"":e[t[0][1]]}const qd={read:function(t,e){const n=function(t,e){return fd.getShortAt(t,e)}(t,e),i=function(t,e,n){if(15>n)return;const i=fd.getByteAt(t,e+14);return{value:i,description:`${i}px`}}(t,e,n),r=function(t,e,n){if(16>n)return;const i=fd.getByteAt(t,e+15);return{value:i,description:`${i}px`}}(t,e,n),o={"JFIF Version":zd(t,e,n),"Resolution Unit":_d(t,e,n),XResolution:$d(t,e,n),YResolution:Hd(t,e,n),"JFIF Thumbnail Width":i,"JFIF Thumbnail Height":r};if(void 0!==i&&void 0!==r){const a=function(t,e,n,i){return 0===n||16+n>i?void 0:{value:t.buffer.slice(e+16,e+16+n),description:"<24-bit RGB pixel data>"}}(t,e,3*i.value*r.value,n);a&&(o["JFIF Thumbnail"]=a)}for(const t in o)void 0===o[t]&&delete o[t];return o}};function zd(t,e,n){if(9>n)return;const i=fd.getByteAt(t,e+7),r=fd.getByteAt(t,e+7+1);return{value:256*i+r,description:i+"."+r}}function _d(t,e,n){if(10>n)return;const i=fd.getByteAt(t,e+9);return{value:i,description:Gd(i)}}function Gd(t){return 0===t?"None":1===t?"inches":2===t?"cm":"Unknown"}function $d(t,e,n){if(12>n)return;const i=fd.getShortAt(t,e+10);return{value:i,description:""+i}}function Hd(t,e,n){if(14>n)return;const i=fd.getShortAt(t,e+12);return{value:i,description:""+i}}const Wd={iptc:{256:{name:"Model Version",description:t=>((t[0]<<8)+t[1]).toString()},261:{name:"Destination",repeatable:!0},276:{name:"File Format",description:t=>((t[0]<<8)+t[1]).toString()},278:{name:"File Format Version",description:t=>((t[0]<<8)+t[1]).toString()},286:"Service Identifier",296:"Envelope Number",306:"Product ID",316:"Envelope Priority",326:{name:"Date Sent",description:Xd},336:{name:"Time Sent",description:Yd},346:{name:"Coded Character Set",description:Kd,encoding_name:Kd},356:"UNO",376:{name:"ARM Identifier",description:t=>((t[0]<<8)+t[1]).toString()},378:{name:"ARM Version",description:t=>((t[0]<<8)+t[1]).toString()},512:{name:"Record Version",description:t=>((t[0]<<8)+t[1]).toString()},515:"Object Type Reference",516:"Object Attribute Reference",517:"Object Name",519:"Edit Status",520:{name:"Editorial Update",description:t=>"01"===ep(t)?"Additional Language":"Unknown"},522:"Urgency",524:{name:"Subject Reference",repeatable:!0,description:t=>{const e=ep(t).split(":");return e[2]+(e[3]?"/"+e[3]:"")+(e[4]?"/"+e[4]:"")}},527:"Category",532:{name:"Supplemental Category",repeatable:!0},534:"Fixture Identifier",537:{name:"Keywords",repeatable:!0},538:{name:"Content Location Code",repeatable:!0},539:{name:"Content Location Name",repeatable:!0},542:"Release Date",547:"Release Time",549:"Expiration Date",550:"Expiration Time",552:"Special Instructions",554:{name:"Action Advised",description:t=>{const e=ep(t);return"01"===e?"Object Kill":"02"===e?"Object Replace":"03"===e?"Object Append":"04"===e?"Object Reference":"Unknown"}},557:{name:"Reference Service",repeatable:!0},559:{name:"Reference Date",repeatable:!0},562:{name:"Reference Number",repeatable:!0},567:{name:"Date Created",description:Xd},572:{name:"Time Created",description:Yd},574:{name:"Digital Creation Date",description:Xd},575:{name:"Digital Creation Time",description:Yd},577:"Originating Program",582:"Program Version",587:{name:"Object Cycle",description:t=>{const e=ep(t);return"a"===e?"morning":"p"===e?"evening":"b"===e?"both":"Unknown"}},592:{name:"By-line",repeatable:!0},597:{name:"By-line Title",repeatable:!0},602:"City",604:"Sub-location",607:"Province/State",612:"Country/Primary Location Code",613:"Country/Primary Location Name",615:"Original Transmission Reference",617:"Headline",622:"Credit",627:"Source",628:"Copyright Notice",630:{name:"Contact",repeatable:!0},632:"Caption/Abstract",634:{name:"Writer/Editor",repeatable:!0},637:{name:"Rasterized Caption",description:t=>t},642:"Image Type",643:{name:"Image Orientation",description:t=>{const e=ep(t);return"P"===e?"Portrait":"L"===e?"Landscape":"S"===e?"Square":"Unknown"}},647:"Language Identifier",662:{name:"Audio Type",description:t=>{const e=ep(t),n=e.charAt(0),i=e.charAt(1);let r="";return"1"===n?r+="Mono":"2"===n&&(r+="Stereo"),"A"===i?r+=", actuality":"C"===i?r+=", question and answer session":"M"===i?r+=", music, transmitted by itself":"Q"===i?r+=", response to a question":"R"===i?r+=", raw sound":"S"===i?r+=", scener":"V"===i?r+=", voicer":"W"===i&&(r+=", wrap"),""!==r?r:e}},663:{name:"Audio Sampling Rate",description:t=>parseInt(ep(t),10)+" Hz"},664:{name:"Audio Sampling Resolution",description:t=>{const e=parseInt(ep(t),10);return e+(1===e?" bit":" bits")}},665:{name:"Audio Duration",description:t=>{const e=ep(t);return e.length>=6?e.substr(0,2)+":"+e.substr(2,2)+":"+e.substr(4,2):e}},666:"Audio Outcue",698:"Short Document ID",699:"Unique Document ID",700:"Owner ID",712:{name:t=>2===t.length?"ObjectData Preview File Format":"Record 2 destination",description:t=>{if(2===t.length){const e=(t[0]<<8)+t[1];return 0===e?"No ObjectData":1===e?"IPTC-NAA Digital Newsphoto Parameter Record":2===e?"IPTC7901 Recommended Message Format":3===e?"Tagged Image File Format (Adobe/Aldus Image data)":4===e?"Illustrator (Adobe Graphics data)":5===e?"AppleSingle (Apple Computer Inc)":6===e?"NAA 89-3 (ANPA 1312)":7===e?"MacBinary II":8===e?"IPTC Unstructured Character Oriented File Format (UCOFF)":9===e?"United Press International ANPA 1312 variant":10===e?"United Press International Down-Load Message":11===e?"JPEG File Interchange (JFIF)":12===e?"Photo-CD Image-Pac (Eastman Kodak)":13===e?"Microsoft Bit Mapped Graphics File [*.BMP]":14===e?"Digital Audio File [*.WAV] (Microsoft & Creative Labs)":15===e?"Audio plus Moving Video [*.AVI] (Microsoft)":16===e?"PC DOS/Windows Executable Files [*.COM][*.EXE]":17===e?"Compressed Binary File [*.ZIP] (PKWare Inc)":18===e?"Audio Interchange File Format AIFF (Apple Computer Inc)":19===e?"RIFF Wave (Microsoft Corporation)":20===e?"Freehand (Macromedia/Aldus)":21===e?'Hypertext Markup Language "HTML" (The Internet Society)':22===e?"MPEG 2 Audio Layer 2 (Musicom), ISO/IEC":23===e?"MPEG 2 Audio Layer 3, ISO/IEC":24===e?"Portable Document File (*.PDF) Adobe":25===e?"News Industry Text Format (NITF)":26===e?"Tape Archive (*.TAR)":27===e?"Tidningarnas Telegrambyrå NITF version (TTNITF DTD)":28===e?"Ritzaus Bureau NITF version (RBNITF DTD)":29===e?"Corel Draw [*.CDR]":`Unknown format ${e}`}return ep(t)}},713:{name:"ObjectData Preview File Format Version",description:(t,e)=>{const n={"00":{"00":"1"},"01":{"01":"1","02":"2","03":"3","04":"4"},"02":{"04":"4"},"03":{"01":"5.0","02":"6.0"},"04":{"01":"1.40"},"05":{"01":"2"},"06":{"01":"1"},11:{"01":"1.02"},20:{"01":"3.1","02":"4.0","03":"5.0","04":"5.5"},21:{"02":"2.0"}},i=ep(t);if(e["ObjectData Preview File Format"]){const t=ep(e["ObjectData Preview File Format"].value);if(n[t]&&n[t][i])return n[t][i]}return i}},714:"ObjectData Preview Data",1802:{name:"Size Mode",description:t=>t[0].toString()},1812:{name:"Max Subfile Size",description:t=>{let e=0;for(let n=0;n<t.length;n++)e=(e<<8)+t[n];return e.toString()}},1882:{name:"ObjectData Size Announced",description:t=>{let e=0;for(let n=0;n<t.length;n++)e=(e<<8)+t[n];return e.toString()}},1887:{name:"Maximum ObjectData Size",description:t=>{let e=0;for(let n=0;n<t.length;n++)e=(e<<8)+t[n];return e.toString()}}}};function Xd(t){const e=ep(t);return e.length>=8?e.substr(0,4)+"-"+e.substr(4,2)+"-"+e.substr(6,2):e}function Yd(t){const e=ep(t);let n=e;return e.length>=6&&(n=e.substr(0,2)+":"+e.substr(2,2)+":"+e.substr(4,2),11===e.length&&(n+=e.substr(6,1)+e.substr(7,2)+":"+e.substr(9,2))),n}function Kd(t){const e=ep(t);return"%G"===e?"UTF-8":"%5"===e?"Windows-1252":"%/G"===e?"UTF-8 Level 1":"%/H"===e?"UTF-8 Level 2":"%/I"===e?"UTF-8 Level 3":"/A"===e?"ISO-8859-1":"/B"===e?"ISO-8859-2":"/C"===e?"ISO-8859-3":"/D"===e?"ISO-8859-4":"/@"===e?"ISO-8859-5":"/G"===e?"ISO-8859-6":"/F"===e?"ISO-8859-7":"/H"===e?"ISO-8859-8":"Unknown"}const Zd={get:function(){if(typeof TextDecoder<"u")return TextDecoder}};const Qd={decode:function(t,e){const n=Zd.get();if(typeof n<"u"&&void 0!==t)try{return new n(t).decode(e instanceof DataView?e.buffer:Uint8Array.from(e))}catch{}const i=e.map(t=>String.fromCharCode(t)).join("");return function(t){try{return decodeURIComponent(escape(t))}catch{return t}}(i)},TAG_HEADER_SIZE:5};const Jd={read:function(t,e,n){try{if(Array.isArray(t))return rf(new DataView(Uint8Array.from(t).buffer),{size:t.length},0,n);const{naaBlock:i,dataOffset:r}=function(t,e){for(;e+12<=t.byteLength;){const n=tf(t,e);if(ef(n))return{naaBlock:n,dataOffset:e+n.headerSize};e+=n.headerSize+n.size+nf(n)}throw new Error("No IPTC NAA resource block.")}(t,e);return rf(t,i,r,n)}catch{return{}}}};function tf(t,e){if(943868237!==t.getUint32(e,!1))throw new Error("Not an IPTC resource block.");const n=t.getUint8(e+4+2),i=(n%2==0?n+1:n)+1;return{headerSize:6+i+4,type:t.getUint16(e+4),size:t.getUint32(e+4+2+i)}}function ef(t){return 1028===t.type}function nf(t){return t.size%2!=0?1:0}function rf(t,e,n,i){const r={};let o;const a=n+e.size;for(;n<a&&n<t.byteLength;){const{tag:e,tagSize:a}=of(t,n,r,o,i);if(null===e)break;e&&("encoding"in e&&(o=e.encoding),void 0===r[e.name]||void 0===e.repeatable?r[e.name]={id:e.id,value:e.value,description:e.description}:(r[e.name]instanceof Array||(r[e.name]=[{id:r[e.name].id,value:r[e.name].value,description:r[e.name].description}]),r[e.name].push({id:e.id,value:e.value,description:e.description}))),n+=5+a}return r}function of(t,e,n,i,r){if(function(t,e){return 28!==t.getUint8(e)}(t,e))return{tag:null,tagSize:0};const o=t.getUint16(e+1),a=t.getUint16(e+3);if(!r&&!Wd.iptc[o])return{tag:void 0,tagSize:a};const s=function(t,e,n){const i=[];for(let r=0;r<n;r++)i.push(t.getUint8(e+r));return i}(t,e+5,a),c={id:o,name:af(Wd.iptc[o],o,s),value:s,description:sf(Wd.iptc[o],s,n,i)};return function(t){return Wd.iptc[t]&&Wd.iptc[t].repeatable}(o)&&(c.repeatable=!0),function(t){return Wd.iptc[t]&&void 0!==Wd.iptc[t].encoding_name}(o)&&(c.encoding=Wd.iptc[o].encoding_name(s)),{tag:c,tagSize:a}}function af(t,e,n){return t?function(t){return"string"==typeof t}(t)?t:function(t){return"function"==typeof t.name}(t)?t.name(n):t.name:`undefined-${e}`}function sf(t,e,n,i){if(function(t){return t&&void 0!==t.description}(t))try{return t.description(e,n)}catch{}return function(t,e){return t&&e instanceof Array}(t,e)?Qd.decode(i,e):e}const cf={"tiff:Orientation":t=>"1"===t?"Horizontal (normal)":"2"===t?"Mirror horizontal":"3"===t?"Rotate 180":"4"===t?"Mirror vertical":"5"===t?"Mirror horizontal and rotate 270 CW":"6"===t?"Rotate 90 CW":"7"===t?"Mirror horizontal and rotate 90 CW":"8"===t?"Rotate 270 CW":t,"tiff:ResolutionUnit":t=>Xu.ResolutionUnit(parseInt(t,10)),"tiff:XResolution":t=>lf(Xu.XResolution,t),"tiff:YResolution":t=>lf(Xu.YResolution,t),"exif:ApertureValue":t=>lf(Xu.ApertureValue,t),"exif:GPSLatitude":uf,"exif:GPSLongitude":uf,"exif:FNumber":t=>lf(Xu.FNumber,t),"exif:FocalLength":t=>lf(Xu.FocalLength,t),"exif:FocalPlaneResolutionUnit":t=>Xu.FocalPlaneResolutionUnit(parseInt(t,10)),"exif:ColorSpace":t=>Xu.ColorSpace(function(t){return"0x"===t.substring(0,2)?parseInt(t.substring(2),16):parseInt(t,10)}(t)),"exif:ComponentsConfiguration"(t,e){if(/^\d, \d, \d, \d$/.test(e)){const t=e.split(", ").map(t=>t.charCodeAt(0));return Xu.ComponentsConfiguration(t)}return e},"exif:Contrast":t=>Xu.Contrast(parseInt(t,10)),"exif:CustomRendered":t=>Xu.CustomRendered(parseInt(t,10)),"exif:ExposureMode":t=>Xu.ExposureMode(parseInt(t,10)),"exif:ExposureProgram":t=>Xu.ExposureProgram(parseInt(t,10)),"exif:ExposureTime":t=>pf(t)?Xu.ExposureTime(t.split("/").map(t=>parseInt(t,10))):t,"exif:MeteringMode":t=>Xu.MeteringMode(parseInt(t,10)),"exif:Saturation":t=>Xu.Saturation(parseInt(t,10)),"exif:SceneCaptureType":t=>Xu.SceneCaptureType(parseInt(t,10)),"exif:Sharpness":t=>Xu.Sharpness(parseInt(t,10)),"exif:ShutterSpeedValue":t=>lf(Xu.ShutterSpeedValue,t),"exif:WhiteBalance":t=>Xu.WhiteBalance(parseInt(t,10))};function lf(t,e){return pf(e)?t(e.split("/")):e}function pf(t){return/^-?\d+\/-?\d+$/.test(t)}function uf(t){const[e,n]=t.split(",");if(void 0!==e&&void 0!==n){const t=parseFloat(e),i=parseFloat(n),r=n.charAt(n.length-1);if(!Number.isNaN(t)&&!Number.isNaN(i))return""+(t+i/60)+r}return t}const df={get:function(t){if(t)return t;if(typeof DOMParser<"u")return new DOMParser;try{const{DOMParser:t,onErrorStopParsing:e}=__non_webpack_require__("@xmldom/xmldom");return new t({onError:e})}catch{return}}};function ff(t){const e=t.match(/<([A-Za-z_][A-Za-z0-9._-]*)([^>]*)>/);if(!e)return t;const n=e[1],i=function(t){const e=[],n=/xmlns:([\w-]+)=["'][^"']+["']/g;let i;for(;null!==(i=n.exec(t));)-1===e.indexOf(i[1])&&e.push(i[1]);return e}(t),r=function(t){const e=[],n=/\b([A-Za-z_][A-Za-z0-9._-]*):[A-Za-z_][A-Za-z0-9._-]*\b/g;let i;for(;null!==(i=n.exec(t));){const t=i[1];"xmlns"===t||"xml"===t||-1===e.indexOf(t)&&e.push(t)}return e}(t).filter(t=>-1===i.indexOf(t));if(0===r.length)return t;const o=function(t){const e=[];for(let n=0;n<t.length;n++){const i=t[n],r=mf[i]||"http://fallback.namespace/"+i;e.push(" xmlns:"+i+'="'+r+'"')}return e.join("")}(r);return function(t,e,n){const i=new RegExp("<"+e+"([^>]*)>");return t.replace(i,"<"+e+"$1"+n+">")}(t,n,o)}const mf={xmp:"http://ns.adobe.com/xap/1.0/",tiff:"http://ns.adobe.com/tiff/1.0/",exif:"http://ns.adobe.com/exif/1.0/",dc:"http://purl.org/dc/elements/1.1/",xmpMM:"http://ns.adobe.com/xap/1.0/mm/",stEvt:"http://ns.adobe.com/xap/1.0/sType/ResourceEvent#",stRef:"http://ns.adobe.com/xap/1.0/sType/ResourceRef#",photoshop:"http://ns.adobe.com/photoshop/1.0/"};const hf={read:function(t,e,n){const i={};if("string"==typeof t)return xf(i,t,n),i;const[r,o]=function(t,e){if(0===e.length)return[];const n=[vf(t,e.slice(0,1))];return e.length>1&&n.push(vf(t,e.slice(1))),n}(t,e),a=xf(i,r,n);if(o){const r=xf(i,o,n);!a&&!r&&(delete i._raw,xf(i,vf(t,e),n))}return i}};class gf extends Error{constructor(t){super(t),this.name="ParseError"}}function vf(t,e){const n=e.reduce((t,e)=>t+e.length,0),i=new Uint8Array(n);let r=0;for(let n=0;n<e.length;n++){const o=e[n],a=t.buffer.slice(o.dataOffset,o.dataOffset+o.length);i.set(new Uint8Array(a),r),r+=o.length}return new DataView(i.buffer)}function xf(t,e,n){try{const{doc:i,raw:r}=function(t,e){const n=df.get(e);if(!n)throw console.warn("Warning: DOMParser is not available. It is needed to be able to parse XMP tags."),new Error;const i="string"==typeof t?t:zl(t,0,t.byteLength);return{doc:bf(n,yf(i)),raw:i}}(e,n);t._raw=(t._raw||"")+r;return Wl(t,Cf(Af(wf(i),!0))),!0}catch{return!1}}function yf(t){return t.replace(/^.+(<\?xpacket begin)/,"$1").replace(/(<\?xpacket end=".*"\?>).+$/,"$1")}function bf(t,e,n=!1){try{const n=t.parseFromString(e,"application/xml"),i=n.getElementsByTagName("parsererror");if(i.length>0)throw new gf(i[0].textContent);return n}catch(i){if("ParseError"===i.name&&function(t){const e=["prefix is non-null and namespace is null","prefix not bound to a namespace","prefix inte bundet till en namnrymd",/Namespace prefix .+ is not defined/];for(let n=0;n<e.length;n++)if(new RegExp(e[n]).test(t.message))return!0;return!1}(i)&&!n)return bf(t,ff(e),!0);throw i}}function wf(t){for(let e=0;e<t.childNodes.length;e++){if("x:xmpmeta"===t.childNodes[e].tagName)return wf(t.childNodes[e]);if("rdf:RDF"===t.childNodes[e].tagName)return t.childNodes[e]}throw new Error}function Af(t,e=!1){const n=function(t){const e=[];for(let n=0;n<t.childNodes.length;n++)e.push(t.childNodes[n]);return e}(t);return function(t){return 1===t.length&&"#text"===t[0].nodeName}(n)?e?{}:function(t){return t.nodeValue}(n[0]):function(t){const e={};return t.forEach(t=>{if(function(t){return t.nodeName&&"#text"!==t.nodeName}(t)){const n=function(t){return{attributes:Sf(t),value:Af(t)}}(t);void 0!==e[t.nodeName]?(Array.isArray(e[t.nodeName])||(e[t.nodeName]=[e[t.nodeName]]),e[t.nodeName].push(n)):e[t.nodeName]=n}}),e}(n)}function Sf(t){const e={};for(let n=0;n<t.attributes.length;n++)e[t.attributes[n].nodeName]=decodeURIComponent(escape(t.attributes[n].value));return e}function Cf(t){const e={};if("string"==typeof t)return t;for(const n in t){let i=t[n];Array.isArray(i)||(i=[i]),i.forEach(t=>{Wl(e,Pf(t.attributes)),"object"==typeof t.value&&Wl(e,jf(t.value))})}return e}function Pf(t){const e={};for(const n in t)try{kf(n)&&(e[Ef(n)]={value:t[n],attributes:{},description:If(t[n],n)})}catch{}return e}function kf(t){return"rdf:parseType"!==t&&!Tf(t)}function Tf(t){return"xmlns"===t.split(":")[0]}function Ef(t){return/^MicrosoftPhoto(_\d+_)?:Rating$/i.test(t)?"RatingPercent":t.split(":")[1]}function If(t,e=void 0){if(Array.isArray(t)){const n=function(t){return t.map(t=>void 0!==t.value?If(t.value):If(t)).join(", ")}(t);return e&&"function"==typeof cf[e]?cf[e](t,n):n}if("object"==typeof t)return function(t){const e=[];for(const n in t)e.push(`${Mf(n)}: ${If(t[n].value)}`);return e.join("; ")}(t);try{return e&&"function"==typeof cf[e]?cf[e](t):decodeURIComponent(escape(t))}catch{return t}}function Mf(t){return"CiAdrCity"===t?"CreatorCity":"CiAdrCtry"===t?"CreatorCountry":"CiAdrExtadr"===t?"CreatorAddress":"CiAdrPcode"===t?"CreatorPostalCode":"CiAdrRegion"===t?"CreatorRegion":"CiEmailWork"===t?"CreatorWorkEmail":"CiTelWork"===t?"CreatorWorkPhone":"CiUrlWork"===t?"CreatorWorkUrl":t}function jf(t){const e={};for(const n in t)try{Tf(n)||(e[Ef(n)]=Df(t[n],n))}catch{}return e}function Df(t,e){return function(t){return Array.isArray(t)}(t)?function(t,e){return qf(t[t.length-1],e)}(t,e):function(t){return"Resource"===t.attributes["rdf:parseType"]&&"string"==typeof t.value&&""===t.value.trim()}(t)?{value:"",attributes:{},description:""}:Ff(t)?Uf(t,e):Of(t)?Lf(t,e):Nf(t)?Bf(t,e):function(t){return void 0!==Vf(t.value)}(t)?function(t,e){let n=Vf(t.value).value["rdf:li"];const i=Rf(t),r=[];return void 0===n?n=[]:Array.isArray(n)||(n=[n]),n.forEach(t=>{r.push(function(t){return Ff(t)?Uf(t):Of(t)?Lf(t).value:Nf(t)?Bf(t).value:qf(t)}(t))}),{value:r,attributes:i,description:If(r,e)}}(t,e):qf(t,e)}function Ff(t){return"Resource"===t.attributes["rdf:parseType"]&&void 0!==t.value["rdf:value"]||void 0!==t.value["rdf:Description"]&&void 0!==t.value["rdf:Description"].value["rdf:value"]}function Uf(t,e){const n=Rf(t);void 0!==t.value["rdf:Description"]&&(t=t.value["rdf:Description"]),Wl(n,Rf(t),function(t){const e={};for(const n in t.value)"rdf:value"!==n&&!Tf(n)&&(e[Ef(n)]=t.value[n].value);return e}(t));const i=function(t){return zf(t.value["rdf:value"])||t.value["rdf:value"].value}(t);return{value:i,attributes:n,description:If(i,e)}}function Rf(t){const e={};for(const n in t.attributes)"rdf:parseType"!==n&&"rdf:resource"!==n&&!Tf(n)&&(e[Ef(n)]=t.attributes[n]);return e}function Of(t){return"Resource"===t.attributes["rdf:parseType"]||void 0!==t.value["rdf:Description"]&&void 0===t.value["rdf:Description"].value["rdf:value"]}function Lf(t,e){const n={value:{},attributes:{}};return void 0!==t.value["rdf:Description"]&&(Wl(n.value,Pf(t.value["rdf:Description"].attributes)),Wl(n.attributes,Rf(t)),t=t.value["rdf:Description"]),Wl(n.value,jf(t.value)),n.description=If(n.value,e),n}function Nf(t){return 0===Object.keys(t.value).length&&void 0===t.attributes["xml:lang"]&&void 0===t.attributes["rdf:resource"]}function Bf(t,e){const n=Pf(t.attributes);return{value:n,attributes:{},description:If(n,e)}}function Vf(t){return t["rdf:Bag"]||t["rdf:Seq"]||t["rdf:Alt"]}function qf(t,e){const n=zf(t)||Cf(t.value);return{value:n,attributes:Rf(t),description:If(n,e)}}function zf(t){return t.attributes&&t.attributes["rdf:resource"]}const _f=0,Gf=1,$f=2,Hf=3,Wf=4,Xf=5,Yf=6,Kf=7,Zf=8,Qf={2e3:{name:"PathInformation",description:function(t){const e={},n=[];for(let i=0;i<t.byteLength;i+=26){const r=fd.getShortAt(t,i);Jf[r]&&(e[r]||(e[r]=Jf[r].description),n.push({type:r,path:Jf[r].path(t,i+2)}))}return JSON.stringify({types:e,paths:n})}},2999:{name:"ClippingPathName",description(t){const[,e]=$l(t,0);return e}}};const Jf={[_f]:{description:"Closed subpath length",path:(t,e)=>[fd.getShortAt(t,e)]},[Gf]:{description:"Closed subpath Bezier knot, linked",path:tm},[$f]:{description:"Closed subpath Bezier knot, unlinked",path:tm},[Hf]:{description:"Open subpath length",path:(t,e)=>[fd.getShortAt(t,e)]},[Wf]:{description:"Open subpath Bezier knot, linked",path:tm},[Xf]:{description:"Open subpath Bezier knot, unlinked",path:tm},[Yf]:{description:"Path fill rule",path:()=>[]},[Zf]:{description:"Initial fill rule",path:(t,e)=>[fd.getShortAt(t,e)]},[Kf]:{description:"Clipboard",path:function(t,e){return[[nm(t,e,8),nm(t,e+4,8),nm(t,e+8,8),nm(t,e+12,8)],nm(t,e+16,8)]}}};function tm(t,e){const n=[];for(let i=0;i<24;i+=8)n.push(em(t,e+i));return n}function em(t,e){const n=nm(t,e,8);return[nm(t,e+4,8),n]}function nm(t,e,n){const i=fd.getLongAt(t,e),r=i>>>31?-1:1,o=(2130706432&i)>>>32-n,a=i&parseInt(Kl("1",32-n),2);return r*function(t,e){return parseInt(t.replace(".",""),e)/Math.pow(e,(t.split(".")[1]||"").length)}(o.toString(2)+"."+function(t,e,n){return Kl(n,e-t.length)+t}(a.toString(2),32-n,"0"),2)}const im={read:function(t,e){const n=ql(new Uint8Array(t).buffer),i={};let r=0;for(;r<t.length;){const t=zl(n,r,sm);r+=sm;const o=fd.getShortAt(n,r);r+=om;const{tagName:a,tagNameSize:s}=cm(n,r);r+=s;const c=fd.getLongAt(n,r);if(r+=am,t===rm){const t=ql(n.buffer,r,c),s={id:o,value:zl(t,0,c)};if(Qf[o]){try{s.description=Qf[o].description(t)}catch{s.description="<no description formatter>"}i[a||Qf[o].name]=s}else e&&(i[`undefined-${o}`]=s)}r+=c+c%2}return i}},rm="8BIM",om=2,am=4,sm=rm.length;function cm(t,e){const[n,i]=$l(t,e);return{tagName:i,tagNameSize:1+n+(n%2==0?1:0)}}const lm={desc:{name:"ICC Description"},cprt:{name:"ICC Copyright"},dmdd:{name:"ICC Device Model Description"},vued:{name:"ICC Viewing Conditions Description"},dmnd:{name:"ICC Device Manufacturer for Display"},tech:{name:"Technology"}},pm={4:{name:"Preferred CMM type",value:(t,e)=>zl(t,e,4),description:t=>null!==t?um(t):""},8:{name:"Profile Version",value:(t,e)=>t.getUint8(e).toString(10)+"."+(t.getUint8(e+1)>>4).toString(10)+"."+(t.getUint8(e+1)%16).toString(10)},12:{name:"Profile/Device class",value:(t,e)=>zl(t,e,4),description:t=>{switch(t.toLowerCase()){case"scnr":return"Input Device profile";case"mntr":return"Display Device profile";case"prtr":return"Output Device profile";case"link":return"DeviceLink profile";case"abst":return"Abstract profile";case"spac":return"ColorSpace profile";case"nmcl":return"NamedColor profile";case"cenc":return"ColorEncodingSpace profile";case"mid ":return"MultiplexIdentification profile";case"mlnk":return"MultiplexLink profile";case"mvis":return"MultiplexVisualization profile";default:return t}}},16:{name:"Color Space",value:(t,e)=>zl(t,e,4)},20:{name:"Connection Space",value:(t,e)=>zl(t,e,4)},24:{name:"ICC Profile Date",value:(t,e)=>function(t,e){const n=t.getUint16(e),i=t.getUint16(e+2)-1,r=t.getUint16(e+4),o=t.getUint16(e+6),a=t.getUint16(e+8),s=t.getUint16(e+10);return new Date(Date.UTC(n,i,r,o,a,s))}(t,e).toISOString()},36:{name:"ICC Signature",value:(t,e)=>function(t){return String.fromCharCode.apply(null,new Uint8Array(t))}(t.buffer.slice(e,e+4))},40:{name:"Primary Platform",value:(t,e)=>zl(t,e,4),description:t=>um(t)},48:{name:"Device Manufacturer",value:(t,e)=>zl(t,e,4),description:t=>um(t)},52:{name:"Device Model Number",value:(t,e)=>zl(t,e,4)},64:{name:"Rendering Intent",value:(t,e)=>t.getUint32(e),description:t=>{switch(t){case 0:return"Perceptual";case 1:return"Relative Colorimetric";case 2:return"Saturation";case 3:return"Absolute Colorimetric";default:return t}}},80:{name:"Profile Creator",value:(t,e)=>zl(t,e,4)}};function um(t){switch(t.toLowerCase()){case"appl":return"Apple";case"adbe":return"Adobe";case"msft":return"Microsoft";case"sunw":return"Sun Microsystems";case"sgi":return"Silicon Graphics";case"tgnt":return"Taligent";default:return t}}const dm={read:function(t,e,n){return n&&e[0].compressionMethod!==Zl?function(t,e){if(!function(t){return 0===t}(e[0].compressionMethod))return{};const n=new DataView(t.buffer.slice(e[0].offset,e[0].offset+e[0].length));return Ql(n,e[0].compressionMethod,"utf-8","dataview").then(Am).catch(()=>({}))}(t,e):function(t,e){try{const n=e.reduce((t,e)=>t+e.length,0),i=new Uint8Array(n);let r=0;const o=function(t){return Array.isArray(t)?new DataView(Uint8Array.from(t).buffer).buffer:t.buffer}(t);for(let t=1;t<=e.length;t++){const n=e.find(e=>e.chunkNumber===t);if(!n)throw new Error(`ICC chunk ${t} not found`);const a=o.slice(n.offset,n.offset+n.length),s=new Uint8Array(a);i.set(s,r),r+=s.length}return Am(new DataView(i.buffer))}catch{return{}}}(t,e)}},fm=84,mm=128,hm="acsp",gm="desc",vm="mluc",xm="text",ym="sig ",bm=12;function wm(t,e){return t.length<e+bm}function Am(t){const e=t.buffer,n=t.getUint32();if(t.byteLength!==n)throw new Error("ICC profile length not matching");if(t.byteLength<fm)throw new Error("ICC profile too short");const i={},r=Object.keys(pm);for(let e=0;e<r.length;e++){const n=r[e],o=pm[n],a=o.value(t,parseInt(n,10));let s=a;o.description&&(s=o.description(a)),i[o.name]={value:a,description:s}}if(Sm(e.slice(36,40))!==hm)throw new Error("ICC profile: missing signature");if(function(t){return t.length<mm+4}(e))return i;const o=t.getUint32(128);let a=132;for(let n=0;n<o;n++){if(wm(e,a))return i;const n=zl(t,a,4),r=t.getUint32(a+4),o=t.getUint32(a+8);if(r>e.length)return i;const s=zl(t,r,4);if(s===gm){const a=t.getUint32(r+8);if(a>o)return i;Cm(i,n,Sm(e.slice(r+12,r+a+11)))}else if(s===vm){const e=t.getUint32(r+8),o=t.getUint32(r+12);let a=r+16;const s=[];for(let n=0;n<e;n++){const e=zl(t,a+0,2),n=zl(t,a+2,2),i=t.getUint32(a+4),c=t.getUint32(a+8),l=Gl(t,r+c,i);s.push({languageCode:e,countryCode:n,text:l}),a+=o}if(1===e)Cm(i,n,s[0].text);else{const t={};for(let e=0;e<s.length;e++)t[`${s[e].languageCode}-${s[e].countryCode}`]=s[e].text;Cm(i,n,t)}}else if(s===xm){Cm(i,n,Sm(e.slice(r+8,r+o-7)))}else if(s===ym){Cm(i,n,Sm(e.slice(r+8,r+12)))}a+=12}return i}function Sm(t){return String.fromCharCode.apply(null,new Uint8Array(t))}function Cm(t,e,n){lm[e]?t[lm[e].name]={value:n,description:n}:t[e]={value:n,description:n}}const Pm=27,km={read:function(t,e,n,i,r){let o=yd(t,cd,e,e+n,i,r);return o.ShotInfo&&(o=Wl({},o,function(t){const e={};return void 0!==t[Pm]&&(e.AutoRotate={value:t[Pm],description:Tm(t[Pm])}),e}(o.ShotInfo.value)),delete o.ShotInfo),o},SHOT_INFO_AUTO_ROTATE:Pm};function Tm(t){return 0===t?"None":1===t?"Rotate 90 CW":2===t?"Rotate 180":3===t?"Rotate 270 CW":"Unknown"}const Em={K3_III:78420},Im={CAMERA_ORIENTATION:1,ROLL_ANGLE:3,PITCH_ANGLE:5},Mm={read:function(t,e,n,i){const r=ap.getByteOrder(t,e+n+8),o=e+n;let a=yd(t,ld,o,o+10,r,i);return function(t){return t.PentaxModelID&&t.PentaxModelID.value===Em.K3_III&&t.LevelInfo}(a)&&(a=Wl({},a,function(t,e,n){const i={};if(e+7>t.byteLength)return i;const r=t.getInt8(e+Im.CAMERA_ORIENTATION);i.CameraOrientation={value:r,description:jm(r)};const o=t.getInt16(e+Im.ROLL_ANGLE,n===ap.LITTLE_ENDIAN);i.RollAngle={value:o,description:Dm(o)};const a=t.getInt16(e+Im.PITCH_ANGLE,n===ap.LITTLE_ENDIAN);return i.PitchAngle={value:a,description:Fm(a)},i}(t,o+a.LevelInfo.__offset,r)),delete a.LevelInfo),a},PENTAX_IFD_OFFSET:10,MODEL_ID:Em,LIK3III:Im};function jm(t){return 0===t?"Horizontal (normal)":1===t?"Rotate 270 CW":2===t?"Rotate 180":3===t?"Rotate 90 CW":4===t?"Upwards":5===t?"Downwards":"Unknown"}function Dm(t){return""+-.5*t}function Fm(t){return""+-.5*t}const Um={read:function(t,e){return{"Image Width":Rm(t,e),"Image Height":Om(t,e),"Bit Depth":Lm(t,e),"Color Type":Nm(t,e),Compression:Bm(t,e),Filter:Vm(t,e),Interlace:qm(t,e)}}};function Rm(t,e){if(e+0+4>t.byteLength)return;const n=fd.getLongAt(t,e);return{value:n,description:`${n}px`}}function Om(t,e){if(e+4+4>t.byteLength)return;const n=fd.getLongAt(t,e+4);return{value:n,description:`${n}px`}}function Lm(t,e){if(e+8+1>t.byteLength)return;const n=fd.getByteAt(t,e+8);return{value:n,description:`${n}`}}function Nm(t,e){if(e+9+1>t.byteLength)return;const n=fd.getByteAt(t,e+9);return{value:n,description:{0:"Grayscale",2:"RGB",3:"Palette",4:"Grayscale with Alpha",6:"RGB with Alpha"}[n]||"Unknown"}}function Bm(t,e){if(e+10+1>t.byteLength)return;const n=fd.getByteAt(t,e+10);return{value:n,description:0===n?"Deflate/Inflate":"Unknown"}}function Vm(t,e){if(e+11+1>t.byteLength)return;const n=fd.getByteAt(t,e+11);return{value:n,description:0===n?"Adaptive":"Unknown"}}function qm(t,e){if(e+12+1>t.byteLength)return;const n=fd.getByteAt(t,e+12);return{value:n,description:{0:"Noninterlaced",1:"Adam7 Interlace"}[n]||"Unknown"}}const zm={read:function(t,e,n,i){const r={},o=[];for(let a=0;a<e.length;a++){const{offset:s,length:c,type:l}=e[a],p=Zm(t,s,c,l,n);if(p instanceof Promise)o.push(p.then(({name:t,value:e,description:n})=>{try{if(Jl&&ih(t,e))return{__exif:kd.read(oh(e),Km,i).tags};if(tp&&rh(t,e))return{__iptc:Jd.read(oh(e),0,i)};if(t&&!ih(t,e)&&!rh(t,e))return{[t]:{value:e,description:n}}}catch{}return{}}));else{const{name:t,value:e,description:n}=p;t&&(r[t]={value:e,description:n})}}return{readTags:r,readTagsPromise:o.length>0?Promise.all(o):void 0}}},_m="STATE_KEYWORD",Gm="STATE_COMPRESSION",$m="STATE_LANG",Hm="STATE_TRANSLATED_KEYWORD",Wm="STATE_TEXT",Xm=1,Ym=1,Km=6;function Zm(t,e,n,i,r){const o=[],a=[];let s,c=_m,l=Zl;for(let r=0;r<n&&e+r<t.byteLength;r++){if(c===Gm){l=Qm({type:i,dataView:t,offset:e+r}),i===uu&&(r+=Xm),c=Jm(i,c);continue}if(c===Wm){s=new DataView(t.buffer.slice(e+r,e+n));break}const p=t.getUint8(e+r);0===p?c=Jm(i,c):c===_m?o.push(p):c===$m&&a.push(p)}if(l!==Zl&&!r)return{};const p=Ql(s,l,function(t){return t===pu||t===du?"latin1":"utf-8"}(i));return p instanceof Promise?p.then(t=>th(t,i,a,o)).catch(()=>th("<text using unknown compression>".split(""),i,a,o)):th(p,i,a,o)}function Qm({type:t,dataView:e,offset:n}){if(t===uu){if(e.getUint8(n)===Ym)return e.getUint8(n+1)}else if(t===du)return e.getUint8(n);return Zl}function Jm(t,e){return e===_m&&[uu,du].includes(t)?Gm:e===Gm?t===uu?$m:Wm:e===$m?Hm:Wm}function th(t,e,n,i){const r=function(t){return t instanceof DataView?zl(t,0,t.byteLength):t}(t);return{name:eh(e,n,i),value:r,description:e===uu?nh(t):r}}function eh(t,e,n){const i=Hl(n);if(t===pu||0===e.length)return i;return`${i} (${Hl(e)})`}function nh(t){return Qd.decode("UTF-8",t)}function ih(t,e){return"raw profile type exif"===t.toLowerCase()&&"exif"===e.substring(1,5)}function rh(t,e){return"raw profile type iptc"===t.toLowerCase()&&"iptc"===e.substring(1,5)}function oh(t){return function(t){const e=new DataView(new ArrayBuffer(t.length/2));for(let n=0;n<t.length;n+=2)e.setUint8(n/2,parseInt(t.substring(n,n+2),16));return e}(t.match(/\n(exif|iptc)\n\s*\d+\n([\s\S]*)$/)[2].replace(/\n/g,""))}const ah={read:function(t,e){const n={};for(let i=0;i<e.length;i++){const r=fd.getLongAt(t,e[i]+au),o=zl(t,e[i]+su,ou);o===fu?(n["Pixels Per Unit X"]=sh(t,e[i],r),n["Pixels Per Unit Y"]=ch(t,e[i],r),n["Pixel Units"]=lh(t,e[i],r)):o===mu&&(n["Modify Date"]=ph(t,e[i],r))}return n}};function sh(t,e,n){if(!uh(t,e,n,0,4))return;const i=fd.getLongAt(t,e+cu+0);return{value:i,description:""+i}}function ch(t,e,n){if(!uh(t,e,n,4,4))return;const i=fd.getLongAt(t,e+cu+4);return{value:i,description:""+i}}function lh(t,e,n){if(!uh(t,e,n,8,1))return;const i=fd.getByteAt(t,e+cu+8);return{value:i,description:1===i?"meters":"Unknown"}}function ph(t,e,n){if(!uh(t,e,n,0,7))return;const i=fd.getShortAt(t,e+cu),r=fd.getByteAt(t,e+cu+2),o=fd.getByteAt(t,e+cu+3),a=fd.getByteAt(t,e+cu+4),s=fd.getByteAt(t,e+cu+5),c=fd.getByteAt(t,e+cu+6);return{value:[i,r,o,a,s,c],description:`${dh(i,4)}-${dh(r,2)}-${dh(o,2)} ${dh(a,2)}:${dh(s,2)}:${dh(c,2)}`}}function uh(t,e,n,i,r){return i+r<=n&&e+cu+i+r<=t.byteLength}function dh(t,e){return`${"0".repeat(e-(""+t).length)}${t}`}const fh={read:function(t,e){const n={},i=fd.getByteAt(t,e);return n.Alpha=function(t){const e=16&t;return{value:e?1:0,description:e?"Yes":"No"}}(i),n.Animation=function(t){const e=2&t;return{value:e?1:0,description:e?"Yes":"No"}}(i),n.ImageWidth=gh(t,e+mh),n.ImageHeight=gh(t,e+hh),n}},mh=4,hh=7;function gh(t,e){const n=fd.getByteAt(t,e)+256*fd.getByteAt(t,e+1)+65536*fd.getByteAt(t,e+2)+1;return{value:n,description:n+"px"}}const vh={read:function(t){return{"GIF Version":xh(t),"Image Width":yh(t),"Image Height":bh(t),"Global Color Map":wh(t),"Bits Per Pixel":Sh(t),"Color Resolution Depth":Ah(t)}}};function xh(t){if(6>t.byteLength)return;const e=zl(t,3,3);return{value:e,description:e}}function yh(t){if(8>t.byteLength)return;const e=t.getUint16(6,!0);return{value:e,description:`${e}px`}}function bh(t){if(10>t.byteLength)return;const e=t.getUint16(8,!0);return{value:e,description:`${e}px`}}function wh(t){if(11>t.byteLength)return;const e=(128&t.getUint8(10))>>>7;return{value:e,description:1===e?"Yes":"No"}}function Ah(t){if(11>t.byteLength)return;const e=((112&t.getUint8(10))>>>4)+1;return{value:e,description:`${e} ${1===e?"bit":"bits"}`}}function Sh(t){if(11>t.byteLength)return;const e=1+(7&t.getUint8(10));return{value:e,description:`${e} ${1===e?"bit":"bits"}`}}const Ch=[6,7,99],Ph={get:function(t,e,n){if(function(t){return t&&(void 0===t.Compression||Ch.includes(t.Compression.value))&&t.JPEGInterchangeFormat&&t.JPEGInterchangeFormat.value&&t.JPEGInterchangeFormatLength&&t.JPEGInterchangeFormatLength.value}(e)){e.type="image/jpeg";const i=n+e.JPEGInterchangeFormat.value;e.image=t.buffer.slice(i,i+e.JPEGInterchangeFormatLength.value),Xl(e,"base64",function(){return Yl(this.image)})}return e}};const kh=2,Th=3,Eh=4,Ih=25.4,Mh=10,jh=1,Dh={get:function(t,e){const n={};let i=!1;const r=Fh(t,"exif","FocalLength",e),o=Fh(t,"exif","FocalPlaneXResolution",e),a=Fh(t,"exif","FocalPlaneYResolution",e),s=Fh(t,"exif","FocalPlaneResolutionUnit",e),c=Fh(t,"file","Image Width",e),l=Fh(t,"file","Image Height",e),p=Fh(t,"exif","FocalLengthIn35mmFilm",e)||function(t,e,n,i,r,o){if(t&&e&&n&&i&&r&&o)try{let a;switch(n){case kh:a=Ih;break;case Th:a=Mh;break;case Eh:a=jh;break;default:return}const s=t[0]/t[1]*a,c=e[0]/e[1]*a,l=i/s,p=r/c,u=Math.sqrt(l**2+p**2);return o[0]/o[1]*(43.27/u)}catch{}}(o,a,s,c,l,r);p&&(n.FocalLength35efl={value:p,description:Xu.FocalLengthIn35mmFilm(p)},i=!0);const u=function(t,e){if(t&&e)try{const n=e/(t[0]/t[1]);return{value:n,description:n.toFixed(1)}}catch{}}(r,p);u&&(n.ScaleFactorTo35mmEquivalent=u,i=!0);const d=function(t){if(t)try{const e=2*Math.atan(36/(2*t))*(180/Math.PI);return{value:e,description:e.toFixed(1)+" deg"}}catch{}}(p);if(d&&(n.FieldOfView=d,i=!0),i)return n}};function Fh(t,e,n,i){return i&&t[e]&&t[e][n]?t[e][n].value:!i&&t[n]?t[n].value:void 0}function Uh(t){this.name="MetadataMissingError",this.message=t||"No Exif data",this.stack=(new Error).stack}Uh.prototype=new Error;const Rh={MetadataMissingError:Uh};function Oh(t,e={}){return function(t){return"string"==typeof t}(t)?(e.async=!0,function(t,e){return/^\w+:\/\//.test(t)?typeof fetch<"u"?function(t,{length:e}={}){const n={method:"GET"};return Number.isInteger(e)&&e>=0&&(n.headers={range:"bytes=0-"+(e-1)}),fetch(t,n).then(t=>t.arrayBuffer())}(t,e):function(t,{length:e}={}){return new Promise((n,i)=>{const r={};Number.isInteger(e)&&e>=0&&(r.headers={range:"bytes=0-"+(e-1)}),function(t){return/^https:\/\//.test(t)?__non_webpack_require__("https").get:__non_webpack_require__("http").get}(t)(t,r,t=>{if(t.statusCode>=200&&t.statusCode<=299){const e=[];t.on("data",t=>e.push(Buffer.from(t))),t.on("error",t=>i(t)),t.on("end",()=>n(Buffer.concat(e)))}else i(`Could not fetch file: ${t.statusCode} ${t.statusMessage}`),t.resume()}).on("error",t=>i(t))})}(t,e):function(t){return/^data:[^;,]*(;base64)?,/.test(t)}(t)?Promise.resolve(function(t){const e=t.substring(t.indexOf(",")+1);if(-1!==t.indexOf(";base64"))return typeof atob<"u"?Uint8Array.from(atob(e),t=>t.charCodeAt(0)).buffer:typeof Buffer>"u"?void 0:typeof Buffer.from<"u"?Buffer.from(e,"base64"):new Buffer(e,"base64");const n=decodeURIComponent(e);return typeof Buffer<"u"?typeof Buffer.from<"u"?Buffer.from(n):new Buffer(n):Uint8Array.from(n,t=>t.charCodeAt(0)).buffer}(t)):function(t,{length:e}={}){return new Promise((n,i)=>{const r=function(){try{return __non_webpack_require__("fs")}catch{return}}();r.open(t,(o,a)=>{o?i(o):r.stat(t,(o,s)=>{if(o)i(o);else{const o=Math.min(s.size,void 0!==e?e:s.size),c=Buffer.alloc(o),l={buffer:c,length:o};r.read(a,l,e=>{e?i(e):r.close(a,e=>{e&&console.warn(`Could not close file ${t}:`,e),n(c)})})}})})})}(t,e)}(t,e).then(t=>Lh(t,e))):function(t){return typeof File<"u"&&t instanceof File}(t)?(e.async=!0,function(t){return new Promise((e,n)=>{const i=new FileReader;i.onload=t=>e(t.target.result),i.onerror=()=>n(i.error),i.readAsArrayBuffer(t)})}(t).then(t=>Lh(t,e))):Lh(t,e)}function Lh(t,e){return function(t){try{return Buffer.isBuffer(t)}catch{return!1}}(t)&&(t=new Uint8Array(t).buffer),function(t,{expanded:e=!1,async:n=!1,includeUnknown:i=!1,domParser:r}={expanded:!1,async:!1,includeUnknown:!1,domParser:void 0}){let o=!1,a={};const s=[],{fileType:c,fileDataOffset:l,jfifDataOffset:p,tiffHeaderOffset:u,iptcDataOffset:d,xmpChunks:f,iccChunks:m,mpfDataOffset:h,pngHeaderOffset:g,pngTextChunks:v,pngChunkOffsets:x,vp8xChunkOffset:y,gifHeaderOffset:b}=Hu.parseAppMarkers(t,n);if(function(t){return void 0!==t}(l)){o=!0;const n=Ud.read(t,l);e?a.file=n:a=Wl({},a,n)}if(function(t){return void 0!==t}(p)){o=!0;const n=qd.read(t,p);e?a.jfif=n:a=Wl({},a,n)}if(function(t){return void 0!==t}(u)){o=!0;const{tags:n,byteOrder:s}=kd.read(t,u,i);if(n.Thumbnail&&(a.Thumbnail=n.Thumbnail,delete n.Thumbnail),e?(a.exif=n,function(t){if(t.exif){if(t.exif.GPSLatitude&&t.exif.GPSLatitudeRef)try{t.gps=t.gps||{},t.gps.Latitude=ip(t.exif.GPSLatitude.value),"S"===t.exif.GPSLatitudeRef.value.join("")&&(t.gps.Latitude=-t.gps.Latitude)}catch{}if(t.exif.GPSLongitude&&t.exif.GPSLongitudeRef)try{t.gps=t.gps||{},t.gps.Longitude=ip(t.exif.GPSLongitude.value),"W"===t.exif.GPSLongitudeRef.value.join("")&&(t.gps.Longitude=-t.gps.Longitude)}catch{}if(t.exif.GPSAltitude&&t.exif.GPSAltitudeRef)try{t.gps=t.gps||{},t.gps.Altitude=t.exif.GPSAltitude.value[0]/t.exif.GPSAltitude.value[1],1===t.exif.GPSAltitudeRef.value&&(t.gps.Altitude=-t.gps.Altitude)}catch{}}}(a)):a=Wl({},a,n),n["IPTC-NAA"]&&!Nh(d)){const t=Jd.read(n["IPTC-NAA"].value,0,i);e?a.iptc=t:a=Wl({},a,t)}if(n.ApplicationNotes&&!Bh(f)){const t=hf.read(Hl(n.ApplicationNotes.value),void 0,r);e?a.xmp=t:(delete t._raw,a=Wl({},a,t))}if(n.ImageSourceData&&n.PhotoshopSettings){const t=im.read(n.PhotoshopSettings.value,i);e?a.photoshop=t:a=Wl({},a,t)}if(n.ICC_Profile&&!Vh(m)){const t=dm.read(n.ICC_Profile.value,[{offset:0,length:n.ICC_Profile.value.length,chunkNumber:1,chunksTotal:1}]);e?a.icc=t:a=Wl({},a,t)}if(n.MakerNote)if(function(t){return t.Make&&t.Make.value&&Array.isArray(t.Make.value)&&"Canon"===t.Make.value[0]&&t.MakerNote&&t.MakerNote.__offset}(n)){const r=km.read(t,u,n.MakerNote.__offset,s,i);e?a.makerNotes=r:a=Wl({},a,r)}else if(function(t){const e="PENTAX ";return t.MakerNote.value.length>e.length&&Hl(t.MakerNote.value.slice(0,e.length))===e&&t.MakerNote.__offset}(n)){const r=Mm.read(t,u,n.MakerNote.__offset,i);e?a.makerNotes=r:a=Wl({},a,r)}n.MakerNote&&delete n.MakerNote.__offset}if(Nh(d)){o=!0;const n=Jd.read(t,d,i);e?a.iptc=n:a=Wl({},a,n)}if(Bh(f)){o=!0;const n=hf.read(t,f,r);e?a.xmp=n:(delete n._raw,a=Wl({},a,n))}if(Vh(m)){o=!0;const e=dm.read(t,m,n);e instanceof Promise?s.push(e.then(S)):S(e)}if(function(t){return void 0!==t}(h)){o=!0;const n=Td.read(t,h,i);e?a.mpf=n:a=Wl({},a,n)}if(function(t){return void 0!==t}(g)){o=!0;const n=Um.read(t,g);e?(a.png=a.png?Wl({},a.png,n):n,a.pngFile=n):a=Wl({},a,n)}if(function(t){return void 0!==t}(v)){o=!0;const{readTags:e,readTagsPromise:r}=zm.read(t,v,n,i);C(e),r&&s.push(r.then(t=>t.forEach(C)))}if(function(t){return void 0!==t}(x)){o=!0;const n=ah.read(t,x);e?a.png=a.png?Wl({},a.png,n):n:a=Wl({},a,n)}if(function(t){return void 0!==t}(y)){o=!0;const n=fh.read(t,y);e?a.riff=a.riff?Wl({},a.riff,n):n:a=Wl({},a,n)}if(function(t){return void 0!==t}(b)){o=!0;const n=vh.read(t,b);e?a.gif=a.gif?Wl({},a.gif,n):n:a=Wl({},a,n)}const w=Dh.get(a,e);w&&(e?a.composite=w:a=Wl({},a,w));const A=Ph.get(t,a.Thumbnail,u);if(A?(o=!0,a.Thumbnail=A):delete a.Thumbnail,c&&(e?(a.file||(a.file={}),a.file.FileType=c):a.FileType=c,o=!0),!o)throw new Rh.MetadataMissingError;return n?Promise.all(s).then(()=>a):a;function S(t){e?a.icc=t:a=Wl({},a,t)}function C(t){if(e){for(const e of["exif","iptc"]){const n=`__${e}`;t[n]&&(a[e]=a[e]?Wl({},a.exif,t[n]):t[n],delete t[n])}a.png=a.png?Wl({},a.png,t):t,a.pngText=a.pngText?Wl({},a.png,t):t}else a=Wl({},a,t.__exif?t.__exif:{},t.__iptc?t.__iptc:{},t),delete a.__exif,delete a.__iptc}}(function(t){try{return new DataView(t)}catch{return new Vl(t)}}(t),e)}function Nh(t){return void 0!==t}function Bh(t){return Array.isArray(t)&&t.length>0}function Vh(t){return Array.isArray(t)&&t.length>0}const qh=["jpg","jpeg","png","webp","heic","tiff","bmp"],zh=["mp4","webm","ogg","mov","avi","flv","wmv","mkv","3gp","m4v","mpg","mpeg"],_h=t=>{const e=t.name.split(".").pop()?.toLowerCase();return e&&qh.includes(e)?r.IMAGE:e&&zh.includes(e)?r.VIDEO:"unknown"},Gh=({enableCaption:t,ada:n,content:c,removeImage:l,caption:p,disabled:u,onCaptionChange:d,playingVideo:f,onPlay:m,onPause:h,onEnd:g,uploadStatus:v={status:"",progress:0}})=>{const x=e.useMemo(()=>c.type===r.IMAGE?i.jsx("img",{alt:"Image not found",className:"qc:size-full qc:rounded-t qc:object-contain",src:c.compressedFile?URL.createObjectURL(c.compressedFile):""}):i.jsx(I,{fit:"contain",showFullscreen:!1,src:URL.createObjectURL(c.originalFile),playing:f,onPlay:m,onPause:h,onEnd:g}),[c.type,c.status,f]);return i.jsxs("div",{className:"qc:relative",children:[i.jsxs("div",{className:o("qc:border-border qc:relative qc:h-44 qc:max-h-screen qc:overflow-hidden qc:rounded qc:border qc:sm:h-80",!t&&"qc:rounded-b"),children:[(c.status===a.WAITING||c.status===a.PROCESSING)&&i.jsx("div",{className:"qc:absolute qc:flex qc:size-full qc:flex-col qc:items-center qc:justify-center qc:gap-2",children:i.jsx("span",{className:"qc:text-sm qc:text-gray-500",children:"Processing"})}),c.status===a.DONE&&x,(v.status===s.WAITING||v.status===s.UPLOADING)&&i.jsxs("div",{className:"qc:absolute qc:left-0 qc:top-0 qc:flex qc:size-full qc:flex-col qc:items-center qc:justify-center",children:[i.jsx("div",{className:"qc:absolute qc:left-0 qc:top-0 qc:z-0 qc:h-full qc:bg-opacity-75",style:{width:`${v.progress}%`}}),i.jsx("h3",{className:"qc:text-foreground qc:z-10 qc:text-center qc:font-medium",children:v.status===s.WAITING?"Waiting...":100===Math.round(v.progress)?"Finalizing...":`Uploading (${Math.round(v.progress)}%)`})]}),(v.status===s.DONE||v.status===s.ERROR)&&i.jsx("div",{className:"qc:bg-background qc:absolute qc:left-0 qc:top-0 qc:flex qc:size-full qc:flex-col qc:items-center qc:justify-center qc:bg-opacity-75",children:v.status===s.DONE?i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"qc:text-foreground qc:text-success qc:size-12",viewBox:"0 0 24 24",children:i.jsx("path",{fill:"currentColor",d:"m9.55 15.15l8.475-8.475q.3-.3.7-.3t.7.3t.3.713t-.3.712l-9.175 9.2q-.3.3-.7.3t-.7-.3L4.55 13q-.3-.3-.288-.712t.313-.713t.713-.3t.712.3z"})}):i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"qc:text-foreground qc:text-destructive qc:size-12",viewBox:"0 0 24 24",children:i.jsx("path",{fill:"currentColor",d:"m12 13.4l-4.9 4.9q-.275.275-.7.275t-.7-.275t-.275-.7t.275-.7l4.9-4.9l-4.9-4.9q-.275-.275-.275-.7t.275-.7t.7-.275t.7.275l4.9 4.9l4.9-4.9q.275-.275.7-.275t.7.275t.275.7t-.275.7L13.4 12l4.9 4.9q.275.275.275.7t-.275.7t-.7.275t-.7-.275z"})})})]}),i.jsx("button",{disabled:u,className:"qc:text-primary qc:bg-destructive qc:absolute qc:right-4 qc:top-4 qc:cursor-pointer qc:rounded-full qc:p-1 qc:transition-all qc:hover:bg-opacity-100 qc:sm:bg-opacity-50 qc:sm:p-2",onClick:()=>l(c.uid),children:i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"qc:size-5 qc:text-white",viewBox:"0 0 24 24",children:i.jsx("path",{fill:"currentColor",d:"m12 13.4l-4.9 4.9q-.275.275-.7.275t-.7-.275t-.275-.7t.275-.7l4.9-4.9l-4.9-4.9q-.275-.275-.275-.7t.275-.7t.7-.275t.7.275l4.9 4.9l4.9-4.9q.275-.275.7-.275t.7.275t.275.7t-.275.7L13.4 12l4.9 4.9q.275.275.275.7t-.275.7t-.7.275t-.7-.275z"})})}),(t||n)&&i.jsx("div",{className:"qc:mt-3 qc:w-full qc:space-y-3",children:i.jsx("textarea",{rows:2,value:p,className:o("qc:border-primary qc:shadow-outer qc:placeholder:text-primary qc:block qc:w-full qc:rounded qc:border qc:px-3 qc:py-2.5 qc:font-bold qc:placeholder:opacity-50 qc:focus:border-primary-light qc:focus:outline-none qc:focus:ring-primary-light",u?"qc:text-muted qc:bg-transparent":"qc:text-foreground qc:bg-white qc:bg-opacity-75"),disabled:u,onChange:t=>d(t.target.value),placeholder:"Caption"})})]},c.uid)},$h=100,Hh=52428800,Wh=new N({concurrency:1,autostart:!0}),Xh=new N({concurrency:3,autostart:!0}),Yh={hidden:{opacity:0,scale:.8},visible:t=>({opacity:1,scale:1,transition:{delay:.1*t,duration:.3}}),exit:{opacity:0,scale:.8,transition:{duration:.3}}},Kh=()=>{const{eventSlug:t}=c(),n=l(),{props:{organizationId:P,loginUrl:k},loadingUser:I,user:M,organization:j}=p(),{event:D}=u({eventSlug:t}),{increment:F}=T(D),[U,O]=e.useState(!1),[L,N]=e.useState([]),[B,V]=e.useState({}),[q,z]=e.useState(null),[_,G]=e.useState(null),[$,H]=e.useState({}),[W,X]=e.useState(0),[Y,K]=e.useState(0),[Z,Q]=e.useState({}),J=e.useRef(0);e.useEffect(()=>{M&&tt()},[M]);const tt=async()=>{O(!0);try{const e=await d.get(f.GET_UPLOAD_COUNT,{searchParams:{eventSlug:t},headers:{"x-org-id":P,Authorization:M?`Bearer ${M.token}`:void 0}}).json();if(e.error)throw new Error(e.error);H(e.data.uploadCount)}catch(t){console.error(t),z("Failed to fetch upload count")}O(!1)},et=async t=>{if(t.type===r.IMAGE){N(e=>e.map(e=>e.uid===t.uid?{...e,status:a.PROCESSING}:e));const e=await(async(t,e)=>{const n=Date.now();let i=t.originalFile,r={};try{r=await Oh(i,{expanded:!1,includeUnknown:!0}),delete r.Images,delete r.Thumbnail}catch(t){console.error(t)}try{const e=t.originalFile?.name?.split(".").pop();if(["heic","heif"].includes(e?.toLowerCase())&&typeof window<"u"){const e=(await import("./heic2any-Dui1sz1X.js").then(t=>t.h)).default;i=await e({blob:t.originalFile,toType:"image/jpeg"})}}catch(t){console.error(t)}let o=i;try{i.size/1024/1024>1&&(o=await Bl(i,{maxSizeMB:2,maxWidthOrHeight:2400,useWebWorker:!0,preserveExif:!0,maxIteration:3,onProgress:e}))}catch(t){console.error(t)}return{exif:r,compressedFile:o,colors:{},clientProcessingTime:Date.now()-n}})(t);N(n=>n.map(n=>n.uid===t.uid?{...n,...e,status:a.DONE}:n))}else if(t.type===r.VIDEO){N(e=>e.map(e=>e.uid===t.uid?{...e,status:a.PROCESSING}:e));const e=await(async t=>new Promise(e=>{const n=t.originalFile;if(n){const t=document?.createElement("video");t.onloadedmetadata=()=>{e(t.duration)};const i=URL.createObjectURL(n);t.src=i}else e(0)}))(t);N(n=>n.map(n=>n.uid===t.uid?{...n,length:e,status:a.DONE}:n))}},nt=t=>{const e=L.filter(e=>e.uid!==t);N(e)},it=t=>{const e=D?.uploadLimit-$[m.APPROVED]-$[m.IN_REVIEW]-$[m.REJECTED],n=[];Array.from(t).forEach(t=>{if(!L.some(e=>e.originalFile.name===t.name)){const e={uid:R(),originalFile:t,type:_h(t),status:a.WAITING};n.push(e)}}),!(L.length+n.length>$h)&&(n.slice(0,Math.min(e-L.length,$h-L.length)).forEach(t=>Wh.push(()=>et(t))),N([...L,...n]))},rt=D?D?.uploadLimit-($?$[m.APPROVED]+$[m.IN_REVIEW]+$[m.REJECTED]:0):0,ot=e.useMemo(()=>Object.values(Z).some(t=>[s.WAITING,s.UPLOADING].includes(t.status)),[Z]);let at=!0;for(let t=0;t<L.length;t++)if(L[t].status!==a.DONE){at=!1;break}const st=U||!D||!M||D?.status!==h.OPEN||L.length>=Math.min(rt,$h)||ot,ct=D?D?.enableVideo?[...qh,...zh]:qh:[];if(I)return i.jsx(g,{className:"qc:mx-auto qc:mt-8 qc:h-6 qc:w-64"});if(!M){if(!j.customAuth)return i.jsx(x,{to:y.LOGIN,state:{referrer:n.pathname}});if(!k)return i.jsx(v,{title:"Please login to upload content"});window.history.pushState({},"",k)}return i.jsxs("div",{className:"qc:relative qc:min-h-[80vh] qc:w-full qc:space-y-8 qc:bg-background",children:[i.jsx("div",{className:"qc:flex qc:flex-row qc:justify-end",children:i.jsx(E,{event:D})}),i.jsx(b,{variant:"h3",align:"center",immutable:!0,children:D?.name}),U&&i.jsxs("div",{className:"qc:w-full qc:space-y-8 qc:pb-8",children:[i.jsx(g,{className:"qc:mx-auto qc:h-7 qc:w-64"}),i.jsx(g,{className:"qc:mx-auto qc:h-56 qc:w-full qc:max-w-xl"})]}),!U&&M&&D?D?.status!==h.OPEN?i.jsxs("div",{className:"qc:mt-16 qc:flex qc:flex-col qc:items-center qc:gap-8",children:[i.jsx(v,{title:"Event not open",description:"Please find some open event to upload content",iconSvg:i.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:"qc:size-full",viewBox:"0 0 885.86993 622.8043",xmlnsXlink:"http://www.w3.org/1999/xlink",role:"img",children:[i.jsx("title",{children:"through_the_park"}),i.jsx("polygon",{points:"461.601 348.37 400.416 348.37 400.416 350.344 409.958 350.344 409.958 369.094 411.932 369.094 411.932 350.344 449.098 350.344 449.098 369.094 451.072 369.094 451.072 350.344 461.601 350.344 461.601 348.37",fill:"#3f3d56"}),i.jsx("polygon",{points:"484.299 300.014 468.509 300.014 468.509 315.803 475.829 315.803 475.829 369.007 477.803 369.007 477.803 315.803 484.299 315.803 484.299 300.014",fill:"#3f3d56"}),i.jsx("rect",{x:"400.53636",y:"342.46486",width:"61.18538",height:"1.97372",fill:"#3f3d56"}),i.jsx("rect",{x:"400.53636",y:"337.53055",width:"61.18538",height:"1.97372",fill:"#3f3d56"}),i.jsx("rect",{x:"400.53636",y:"332.59625",width:"61.18538",height:"1.97372",fill:"#3f3d56"}),i.jsx("path",{d:"M775.57723,513.38047h-1.97372c0-93.59519-76.14539-169.7401-169.7401-169.7401-93.59518,0-169.74009,76.14491-169.74009,169.7401H432.1496c0-94.68325,77.03057-171.71382,171.71381-171.71382C698.54714,341.66665,775.57723,418.69722,775.57723,513.38047Z",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),i.jsx("circle",{cx:"161.35177",cy:"161.35177",r:"161.35177",fill:"currentColor"}),i.jsx("path",{d:"M438.4403,192.17931a161.36436,161.36436,0,0,1-268.85975,170.77,161.36567,161.36567,0,1,0,268.85975-170.77Z",transform:"translate(-157.06503 -138.59785)",opacity:"0.2"}),i.jsx("polygon",{points:"161.795 161.352 162.238 161.352 170.217 618.811 153.373 618.811 161.795 161.352",fill:"#3f3d56"}),i.jsx("rect",{x:"329.05538",y:"537.54454",width:"7.97893",height:"30.14264",transform:"translate(509.8146 -138.12101) rotate(62.23413)",fill:"#3f3d56"}),i.jsx("circle",{cx:"755.27647",cy:"229.8063",r:"130.59346",fill:"currentColor"}),i.jsx("path",{d:"M1009.48506,281.178a130.60365,130.60365,0,0,1-217.60732,138.2163A130.60471,130.60471,0,1,0,1009.48506,281.178Z",transform:"translate(-157.06503 -138.59785)",opacity:"0.2"}),i.jsx("polygon",{points:"755.635 229.806 755.994 229.806 762.452 600.06 748.819 600.06 755.635 229.806",fill:"#3f3d56"}),i.jsx("rect",{x:"920.95206",y:"560.70661",width:"6.45792",height:"24.39658",transform:"translate(843.51724 -650.35577) rotate(62.23413)",fill:"#3f3d56"}),i.jsx("circle",{cx:"369.90725",cy:"321.70366",r:"20.55846",fill:"currentColor"}),i.jsx("path",{d:"M542.265,446.57008a20.56006,20.56006,0,0,1-34.25647,21.75847A20.56023,20.56023,0,1,0,542.265,446.57008Z",transform:"translate(-157.06503 -138.59785)",opacity:"0.2"}),i.jsx("polygon",{points:"369.964 321.704 370.02 321.704 371.037 379.99 368.891 379.99 369.964 321.704",fill:"#3f3d56"}),i.jsx("rect",{x:"528.32779",y:"490.57441",width:"1.01663",height:"3.84059",transform:"translate(561.19589 -343.48173) rotate(62.23413)",fill:"#3f3d56"}),i.jsx("circle",{cx:"559.878",cy:"255.44299",r:"52.63144",fill:"currentColor"}),i.jsx("path",{d:"M756.09357,358.88718A52.63554,52.63554,0,0,1,668.394,414.59075a52.636,52.636,0,1,0,87.69954-55.70357Z",transform:"translate(-157.06503 -138.59785)",opacity:"0.2"}),i.jsx("polygon",{points:"560.023 255.443 560.167 255.443 562.77 404.662 557.275 404.662 560.023 255.443",fill:"#3f3d56"}),i.jsx("rect",{x:"720.41323",y:"471.54209",width:"2.60265",height:"9.83225",transform:"translate(650.03004 -522.71764) rotate(62.23413)",fill:"#3f3d56"}),i.jsx("path",{d:"M354.5881,734.63564s.68149-14.27971,14.65205-12.61989",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),i.jsx("circle",{cx:"193.57562",cy:"575.45671",r:"6.99217",fill:"currentColor"}),i.jsx("rect",{x:"192.43789",y:"587.23109",width:"1.97372",height:"13.81605",fill:"#3f3d56"}),i.jsx("path",{d:"M403.93115,702.06922s.68149-14.27971,14.652-12.61988",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),i.jsx("circle",{cx:"242.91867",cy:"542.89029",r:"6.99217",fill:"currentColor"}),i.jsx("rect",{x:"241.78094",y:"554.66468",width:"1.97372",height:"13.81605",fill:"#3f3d56"}),i.jsx("path",{d:"M552.67,591.58462s.54127-11.34162,11.63735-10.02331",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),i.jsx("circle",{cx:"392.46975",cy:"436.6403",r:"5.55351",fill:"currentColor"}),i.jsx("rect",{x:"391.56611",y:"445.99208",width:"1.56762",height:"10.97337",fill:"#3f3d56"}),i.jsx("path",{d:"M769.77945,556.05762s.54127-11.34162,11.63735-10.02331",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),i.jsx("circle",{cx:"609.57917",cy:"401.1133",r:"5.55351",fill:"currentColor"}),i.jsx("rect",{x:"608.67553",y:"410.46508",width:"1.56762",height:"10.97337",fill:"#3f3d56"}),i.jsx("path",{d:"M562.53864,621.19045s.54127-11.34163,11.63735-10.02331",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),i.jsx("circle",{cx:"402.33836",cy:"466.24613",r:"5.55351",fill:"currentColor"}),i.jsx("rect",{x:"401.43472",y:"475.59791",width:"1.56762",height:"10.97337",fill:"#3f3d56"}),i.jsx("path",{d:"M538.854,642.90139s.54127-11.34162,11.63735-10.02331",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),i.jsx("circle",{cx:"378.6537",cy:"487.95707",r:"5.55351",fill:"currentColor"}),i.jsx("rect",{x:"377.75006",y:"497.30885",width:"1.56762",height:"10.97337",fill:"#3f3d56"}),i.jsx("path",{d:"M803.33272,574.808s.54128-11.34162,11.63736-10.02331",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),i.jsx("circle",{cx:"643.13244",cy:"419.86366",r:"5.55351",fill:"currentColor"}),i.jsx("rect",{x:"642.22881",y:"429.21544",width:"1.56762",height:"10.97337",fill:"#3f3d56"}),i.jsx("path",{d:"M483.58976,599.47951s.54127-11.34163,11.63735-10.02332",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),i.jsx("circle",{cx:"323.38948",cy:"444.53519",r:"5.55351",fill:"currentColor"}),i.jsx("rect",{x:"322.48584",y:"453.88696",width:"1.56762",height:"10.97337",fill:"#3f3d56"}),i.jsx("path",{d:"M740.17362,543.22843s.54127-11.34162,11.63735-10.02331",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),i.jsx("circle",{cx:"579.97334",cy:"388.28411",r:"5.55351",fill:"currentColor"}),i.jsx("rect",{x:"579.0697",y:"397.63589",width:"1.56762",height:"10.97337",fill:"#3f3d56"}),i.jsx("path",{d:"M268.73119,737.59622s.68149-14.27971,14.652-12.61989",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),i.jsx("circle",{cx:"107.71872",cy:"578.41729",r:"6.99217",fill:"currentColor"}),i.jsx("rect",{x:"106.58099",y:"590.19168",width:"1.97372",height:"13.81605",fill:"#3f3d56"}),i.jsx("path",{d:"M948.67842,733.64878s.68149-14.27971,14.65205-12.61989",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),i.jsx("circle",{cx:"787.66594",cy:"574.46985",r:"6.99217",fill:"currentColor"}),i.jsx("rect",{x:"786.52822",y:"586.24423",width:"1.97372",height:"13.81605",fill:"#3f3d56"}),i.jsx("path",{d:"M891.44048,700.0955s.68149-14.27971,14.65205-12.61988",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),i.jsx("circle",{cx:"730.42801",cy:"540.91657",r:"6.99217",fill:"currentColor"}),i.jsx("rect",{x:"729.29028",y:"552.69096",width:"1.97372",height:"13.81605",fill:"#3f3d56"}),i.jsx("path",{d:"M883.54559,750.42541s.6815-14.27971,14.65205-12.61988",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),i.jsx("circle",{cx:"722.53312",cy:"591.24648",r:"6.99217",fill:"currentColor"}),i.jsx("rect",{x:"721.39539",y:"603.02087",width:"1.97372",height:"13.81605",fill:"#3f3d56"}),i.jsx("path",{d:"M280.09142,761.08258S590.95263,679.17311,587.992,595.28993c-5.42774-23.19124-42.92846-29.1124-42.92846-29.1124s-88.81749-11.84233-40.4613-40.4613,180.59557-21.71094,180.59557-21.71094-136.18682,21.71094-75.9883,33.55327c48.35619,2.96058,110.52843,15.78978,110.52843,15.78978S846.0562,579.99358,863.8197,645.12641s2.96058,115.46273,2.96058,115.46273Z",transform:"translate(-157.06503 -138.59785)",fill:"#e6e6e6"}),i.jsx("path",{d:"M618.67289,761.40215l-1.16407-1.627q2.4668-1.76367,4.85938-3.50781l1.17773,1.61719Q621.14359,759.63213,618.67289,761.40215Z",transform:"translate(-157.06503 -138.59785)",fill:"#fff"}),i.jsx("path",{d:"M633.18265,750.72832l-1.207-1.59375c3.23144-2.44727,6.41406-4.90918,9.46-7.31738l1.24023,1.56836C639.61917,745.80254,636.42484,748.27324,633.18265,750.72832Zm18.82324-14.89941-1.27734-1.53907c3.12793-2.59863,6.18652-5.21,9.09082-7.76074l1.32031,1.502C658.22171,730.59453,655.14847,733.21855,652.00589,735.82891Zm18.03223-15.86914-1.36914-1.459c2.98535-2.7998,5.86328-5.60254,8.55469-8.332l1.42382,1.4043C675.93851,714.32012,673.04105,717.14238,670.03812,719.95977Zm16.8584-17.14063-1.48828-1.33594c2.74218-3.05468,5.33593-6.11426,7.709-9.09277l1.56445,1.24609C692.28421,696.64531,689.66507,699.73516,686.89652,702.81914ZM701.84964,683.952,700.1973,682.825c2.32519-3.40723,4.42285-6.80859,6.23437-10.10938l1.75391.9629C706.34281,677.035,704.211,680.492,701.84964,683.952Zm11.5-21.21386-1.86133-.73047a69.37031,69.37031,0,0,0,3.39551-11.29l1.959.40234A71.21576,71.21576,0,0,1,713.34964,662.73809Zm2.66992-23.69629a47.10965,47.10965,0,0,0-1.60839-11.50684l1.93164-.52148a49.17317,49.17317,0,0,1,1.67675,11.99511Zm-5.98339-22.30274a60.32109,60.32109,0,0,0-6.65625-9.66406l1.5332-1.2832a62.27891,62.27891,0,0,1,6.87695,9.98632Zm-14.91993-18.10449a108.36226,108.36226,0,0,0-9.32617-7.34766l1.1543-1.63281a110.07889,110.07889,0,0,1,9.498,7.48438Zm-19.34863-13.78418c-3.27148-1.92285-6.80078-3.8418-10.4873-5.70312l.90039-1.78516c3.72558,1.87988,7.292,3.81933,10.60058,5.76367Zm-21.29687-10.81445c-3.48145-1.54688-7.18946-3.10352-11.02149-4.62793l.74024-1.85742c3.85547,1.5332,7.58789,3.10058,11.09375,4.65722ZM632.23539,565.157c-3.56348-1.292-7.37305-2.61816-11.32129-3.94141l.63476-1.89648c3.96387,1.3291,7.78906,2.66016,11.36817,3.957Zm-22.73145-7.64648c-3.48535-1.09961-7.2373-2.25684-11.47119-3.53907l.58008-1.91406c4.24072,1.28418,8.00048,2.44434,11.49267,3.54492Zm-22.979-6.99317c-4.0459-1.21-7.90332-2.36621-11.51465-3.47851l.58886-1.91211c3.60645,1.1123,7.458,2.2666,11.499,3.47461Zm-22.98389-7.1875a95.0565,95.0565,0,0,1-11.26416-4.53418l.89941-1.78711a92.76387,92.76387,0,0,0,11.019,4.43067Zm-15.103-13.11035-1.42578-1.40234c1.82324-1.85254,5.42969-3.665,11.02539-5.542l.63574,1.89649C553.45658,526.9207,550.01273,528.61992,548.438,530.21953Zm21.67676-8.30566-.4834-1.94141c3.459-.86133,7.39942-1.76269,11.71192-2.67871l.415,1.957C577.46878,520.16094,573.5513,521.05742,570.11478,521.91387Zm23.36963-5.01856-.375-1.96484c3.68506-.7041,7.65381-1.4336,11.79687-2.168l.34961,1.96875C601.12113,515.46465,597.16117,516.19219,593.48441,516.89531ZM617.05374,512.7l-.33007-1.97266q5.65283-.94775,11.83105-1.93847l.31641,1.97461Q622.69827,511.75371,617.05374,512.7Z",transform:"translate(-157.06503 -138.59785)",fill:"#fff"}),i.jsx("path",{d:"M640.9307,508.865l-.30664-1.97656q2.9165-.45119,5.93554-.91114l.30079,1.97657Q643.84281,508.41387,640.9307,508.865Z",transform:"translate(-157.06503 -138.59785)",fill:"#fff"}),i.jsx("path",{d:"M685.194,305.71659l9.08474-7.26606c-7.05753-.77863-9.95734,3.07039-11.14411,6.11693-5.51363-2.28947-11.51587.711-11.51587.711l18.17688,6.59885A13.75483,13.75483,0,0,0,685.194,305.71659Z",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),i.jsx("path",{d:"M516.44078,361.96766l9.08474-7.26605c-7.05753-.77864-9.95734,3.07039-11.14411,6.11692-5.51363-2.28946-11.51587.711-11.51587.711l18.17688,6.59885A13.75487,13.75487,0,0,0,516.44078,361.96766Z",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),i.jsx("path",{d:"M560.84953,245.51807l9.08473-7.26606c-7.05753-.77863-9.95733,3.07039-11.14411,6.11693-5.51363-2.28947-11.51587.711-11.51587.711l18.17688,6.59885A13.75484,13.75484,0,0,0,560.84953,245.51807Z",transform:"translate(-157.06503 -138.59785)",fill:"#3f3d56"}),i.jsx("path",{d:"M659.609,569.03965s-7.86875,0-8.74306,4.80868-2.18577,57.267-1.31146,63.82431.87431,5.24584.87431,5.24584-1.743,12.4609,2.18858,13.00631S656.5489,641.607,656.5489,641.607l3.06008-53.33264Z",transform:"translate(-157.06503 -138.59785)",fill:"#9e616a"}),i.jsx("path",{d:"M693.7069,569.03965s7.86875,0,8.74306,4.80868,2.18577,57.267,1.31146,63.82431-.8743,5.24584-.8743,5.24584,1.743,12.4609-2.18859,13.00631S696.767,641.607,696.767,641.607l-3.06008-53.33263Z",transform:"translate(-157.06503 -138.59785)",fill:"#9e616a"}),i.jsx("path",{d:"M658.29752,751.76952h-3.49721a7.86866,7.86866,0,0,0-7.86875,7.86857v.00018H668.352V749.58375H658.29752Z",transform:"translate(-157.06503 -138.59785)",fill:"#2f2e41"}),i.jsx("path",{d:"M691.95829,751.76952h3.49721a7.86867,7.86867,0,0,1,7.86875,7.86857v.00018H681.90377V749.58375h10.05452Z",transform:"translate(-157.06503 -138.59785)",fill:"#2f2e41"}),i.jsx("circle",{cx:"516.09568",cy:"409.02131",r:"11.36598",fill:"#9e616a"}),i.jsx("path",{d:"M670.53781,553.73931s-1.31146,14.426-3.06008,15.73749,18.36042-.8743,18.36042-.8743-6.99444-10.49167-5.683-13.98889S670.53781,553.73931,670.53781,553.73931Z",transform:"translate(-157.06503 -138.59785)",fill:"#9e616a"}),i.jsx("path",{d:"M696.32981,569.03965s-24.04341-10.05451-39.78091,0c0,0-3.93436,10.05451-.87431,15.7375s7.86875,19.23472,3.06008,28.41493.43716,5.24584.43716,5.24584-6.12014,24.48056-6.99445,43.71525,2.62293,88.30487,5.24583,88.742,10.92883,1.31146,11.80314,0,6.99444-92.67636,6.99444-92.67636,2.62292,93.55069,5.24582,93.55069,9.61737,0,10.92883-2.18577,12.24027-86.55625,8.30591-104.04235-6.55729-26.22917-6.55729-26.22917,4.80867-3.06007,3.49723-4.80869-7.86877-20.54616-4.80869-23.60625S696.32981,569.03965,696.32981,569.03965Z",transform:"translate(-157.06503 -138.59785)",fill:"#2f2e41"}),i.jsx("circle",{cx:"523.30871",cy:"402.17104",r:"18.36042",fill:"#2f2e41"}),i.jsx("path",{d:"M691.83867,531.57749a12.36814,12.36814,0,0,1-9.33162-14.29294c-.05359.188-.104.37762-.14921.57a12.36847,12.36847,0,0,0,24.0811,5.65832c.0452-.19233.08448-.38459.12022-.57676A12.36815,12.36815,0,0,1,691.83867,531.57749Z",transform:"translate(-157.06503 -138.59785)",fill:"#2f2e41"}),i.jsx("circle",{cx:"535.52108",cy:"386.38703",r:"8.98489",fill:"#2f2e41"})]})}),i.jsx(w,{to:y.PUBLIC_EVENTS,state:{internalNavigation:!0},children:i.jsx(A,{children:"All events"})})]}):i.jsxs(e.Fragment,{children:[i.jsxs(b,{variant:"h5",align:"center",children:["Available entries : ",i.jsx("span",{className:"qc:text-primary",children:rt})]}),L.length<=0&&i.jsx("div",{className:"qc:flex qc:w-full qc:flex-auto qc:justify-center qc:mt-6",children:i.jsx(Rt,{accept:(()=>{const t={},e=ct.filter(t=>qh.includes(t)),n=ct.filter(t=>zh.includes(t));return e.length>0&&(t["image/*"]=e.map(t=>`.${t}`)),n.length>0&&(t["video/*"]=n.map(t=>`.${t}`)),t})(),multiple:!0,disabled:st,onDrop:it,children:({getRootProps:t,getInputProps:e,isDragActive:n})=>i.jsxs("div",{...t(),className:o("qc:bg-background qc:w-auto qc:max-w-2xl qc:rounded qc:border-2 qc:border-dashed qc:px-4 qc:py-12 qc:text-center",L.length>=rt?"qc:border-border":"",st?"qc:border-border qc:hover:cursor-not-allowed":"qc:border-primary qc:hover:cursor-pointer"),children:[i.jsx("input",{...e()}),i.jsxs("svg",{className:o(st?"qc:text-gray-500":"qc:text-primary","qc:mx-auto qc:size-12"),xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[i.jsx("rect",{x:"0",y:"0",width:"24",height:"24",fill:"none",stroke:"none"}),i.jsx("path",{fill:"currentColor",d:"M19.35 10.04A7.49 7.49 0 0 0 12 4C9.11 4 6.6 5.64 5.35 8.04A5.994 5.994 0 0 0 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5c0-2.64-2.05-4.78-4.65-4.96zM14 13v4h-4v-4H7l5-5l5 5h-3z"})]}),i.jsx("span",{className:o(st?"qc:text-muted":"qc:text-foreground","qc:mt-2 qc:block qc:font-medium"),children:n?"Drop files here...":`Select Images ${D?.enableVideo?"or Videos (60s)":""} to upload (${L.length}/${Math.min(rt,$h)})`}),!ot&&i.jsx("div",{className:"qc:text-muted-foreground qc:mt-6 qc:w-full qc:text-center qc:text-xs qc:italic",children:"* Only your new, original photos will be eligible for upload. Our team will review them before publication."})]})})}),i.jsx("div",{className:"qc:grid qc:grid-cols-2 qc:gap-6 qc:sm:pt-3 qc:lg:grid-cols-3 qc:xl:grid-cols-4",children:i.jsxs(no,{children:[L.map((t,e)=>i.jsx(rl.div,{layout:!0,variants:Yh,initial:"hidden",animate:"visible",exit:"exit",custom:e,className:"qc:relative",children:i.jsx(Gh,{enableCaption:D?.enableCaption,enableAICaption:D?.enableAICaption,ada:D?.ada,content:t,disabled:ot,removeImage:nt,caption:B[t.uid],onCaptionChange:e=>{V(n=>({...n,[t.uid]:e}))},playingVideo:_===t.uid,onPlay:()=>G(t.uid),onPause:()=>G(null),onEnd:()=>G(null),uploadStatus:Z[t.uid]})},t.uid)),L.length>0&&rt>0&&i.jsx(Rt,{accept:(()=>{const t={},e=ct.filter(t=>qh.includes(t)),n=ct.filter(t=>zh.includes(t));return e.length>0&&(t["image/*"]=e.map(t=>`.${t}`)),n.length>0&&(t["video/*"]=n.map(t=>`.${t}`)),t})(),multiple:!0,disabled:st,onDrop:it,children:({getRootProps:t,getInputProps:e,isDragActive:n})=>i.jsxs("div",{...t(),children:[i.jsx("input",{...e()}),i.jsxs(rl.button,{type:"button",layout:!0,initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.3},className:o("qc:border-primary qc:bg-background qc:hover:border-primary qc:text-foreground qc:hover:text-primary qc:flex qc:size-full qc:flex-col qc:items-center qc:justify-center qc:gap-3 qc:rounded qc:border-2 qc:border-dashed qc:p-12 qc:hover:border-2 qc:focus:outline-none qc:sm:min-h-72",n?"qc:bg-primary qc:bg-opacity-15":"qc:bg-background qc:bg-opacity-100"),children:[i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"qc:size-14",viewBox:"0 0 24 24",children:i.jsx("path",{fill:"currentColor",d:"M5.616 20q-.691 0-1.153-.462T4 18.384V5.616q0-.691.463-1.153T5.616 4h6.5q.212 0 .356.144t.144.357t-.144.356t-.356.143h-6.5q-.27 0-.443.173T5 5.616v12.769q0 .269.173.442t.443.173h12.769q.269 0 .442-.173t.173-.443v-6.5q0-.212.144-.356t.357-.144t.356.144t.143.356v6.5q0 .691-.462 1.153T18.384 20zm1.153-3.616h10.462L14 12.077l-3 3.789l-2-2.404zM17 7h-1.5q-.213 0-.356-.144T15 6.499t.144-.356T15.5 6H17V4.5q0-.213.144-.356T17.501 4t.356.144T18 4.5V6h1.5q.213 0 .356.144t.144.357t-.144.356T19.5 7H18v1.5q0 .213-.144.356T17.499 9t-.356-.144T17 8.5z"})}),i.jsx(b,{variant:"h5",children:n?"Drop files here...":"Add Image"})]})]})})]})}),L.length>0&&i.jsx(A,{fullWidth:!0,loading:ot,onClick:async(t=!0)=>{z(null);let e=!0;if(D?.ada)for(let t=0;t<L.length;t++)if(!B[L[t].uid]){e=!1;break}if(!e)return void z("Caption are needed for each image");X(L.length),K(0),J.current=L.length;const n=`upload-group-${R()}`;L.forEach(t=>{Xh.push(()=>(async({uid:t,groupId:e,groupContentCount:n,eventId:i,content:r,contentData:o})=>{Q(e=>({...e,[t]:{status:s.UPLOADING,progress:0}}));const a=Math.ceil(r.size/Hh);for(let c=0;c<a;c++){const l=c*Hh,p=Math.min(r.size,l+Hh),u=r.slice(l,p);try{const r=new FormData;r.append("groupId",e),r.append("groupContentCount",n),r.append("eventId",i),r.append("contentData",JSON.stringify(o)),r.append("integrationUpload",!0),r.append("uid",t),r.append("chunk",u),r.append("chunkIndex",c),r.append("totalChunks",a),await d.post(f.SINGLE_UPLOAD,{body:r,headers:{"x-org-id":P,Authorization:M?`Bearer ${M.token}`:void 0}})}catch(e){console.error(e),Q(e=>({...e,[t]:{status:s.FAILED,progress:0}}));break}}H(t=>({...t,[D?.autoApprove?m.APPROVED:m.IN_REVIEW]:t[D?.autoApprove?m.APPROVED:m.IN_REVIEW]+1})),Q(e=>({...e,[t]:{status:s.DONE,progress:100}})),J.current-=1,N(e=>e.filter(e=>e.uid!==t)),D?.autoApprove||F(),0===J.current&&(V({}),N([]),X(0),K(0),Q({}),S.success(D?.visibility===C.PRIVATE&&D?.autoApprove?"Content uploaded":"Upload successful, waiting for approval"))})({uid:t.uid,groupId:n,groupContentCount:L.length,eventId:D?._id,content:t.compressedFile?t.compressedFile:t.originalFile,contentData:{type:t.type,caption:B[t.uid],colors:t.colors,sizes:{original:t.originalFile.size,clientCompressed:t.compressedFile?.size},processingTimes:{client:t.clientProcessingTime},location:{latitude:t.exif?.GPSLatitude?.description,longitude:t.exif?.GPSLongitude?.description},exif:t.exif,capturedAt:t.exif?.DateTimeOriginal?.description}}))});const i={};L.forEach(t=>{i[t.uid]={status:s.WAITING,progress:0}}),Q(i)},icon:"material-symbols:upload-rounded",disabled:!D||ot||!at,children:ot?`Uploading (${Y}/${W})`:"Upload"})]}):null,L.length<=0&&i.jsx(w,{to:y.GALLERY(t),state:{internalNavigation:!0},children:i.jsx(b,{variant:"h5",align:"center",children:"Goto gallery"})})]})};export{Kh as default};
|