@sveltia/cms 0.60.1 → 0.60.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.
@@ -195,10 +195,10 @@ td {border:1px solid var(--sui-textbox-border-color);padding:8px;}blockquote {ma
195
195
  [aria-readonly=true] *,
196
196
  [inert] * {cursor:default;pointer-events:none;-webkit-user-select:none;user-select:none;}.font-loader.svelte-jkihe5 {position:absolute;left:-99999px;font-family:var(--sui-font-family-default);}.app-shell.svelte-jkihe5 {position:fixed;inset:0;overflow:hidden;width:100%;height:100%;color:var(--sui-primary-foreground-color);background-color:var(--sui-primary-background-color);font-family:var(--sui-font-family-default);font-size:var(--sui-font-size-default);font-weight:var(--sui-font-weight-normal, normal);word-spacing:var(--sui-word-spacing-normal);-webkit-user-select:none;user-select:none;touch-action:none;cursor:default;}.app-shell.horizontal.svelte-jkihe5 {display:flex;flex-direction:row;overflow:hidden;}.app-shell.vertical.svelte-jkihe5 {display:flex;flex-direction:column;overflow:hidden;}`};function SF(t,e){se(e,!0),Te(t,kF);let n=P(e,"orientation",3,"horizontal"),r=at(e,["$$slots","$$events","$$legacy","orientation","children"]);const i=["https://fonts.googleapis.com/css2?family=Merriweather+Sans:ital,wght@0,300..800;1,300..800&family=Noto+Sans+Mono:wght@100..900&display=swap","https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=block"];let s=ae(void 0);cn(()=>{const g=globalThis.matchMedia("(prefers-color-scheme: dark)"),{dataset:m}=document.documentElement,v=()=>{m.autoTheming!=="false"&&(m.theme=g.matches?"dark":"light")};v(),g.onchange=()=>{v()},globalThis.setTimeout(()=>{l(s)?.remove()},1e3)});var o=xF();sk(g=>{var m=wF(),v=D(M(m),8);ft(v,17,()=>i,cr,(_,b)=>{var y=yF(),x=M(y),k=D(x,2);q(()=>{ke(x,"href",l(b)),ke(k,"href",l(b))}),T(_,y)}),T(g,m)});var a=M(o);Yr(a,"opacity","0"),$t(a,g=>$(s,g),()=>l(s));var c=D(a,2),u=g=>g.preventDefault(),d=g=>g.preventDefault(),f=g=>{!document.documentElement.matches('[data-env="dev"]')&&!g.target?.matches('input[type="text"], textarea')&&g.preventDefault()};let h;var p=R(c);Re(p,()=>e.children??Fe),q(()=>h=St(c,h,{...r,role:"none",class:`sui app-shell ${n()??""}`,ondragover:u,ondrop:d,oncontextmenu:f},"svelte-jkihe5")),T(t,o),oe()}var EF=F('<div><div role="none" class="inner svelte-3h03g8"><!></div></div>');const TF={hash:"svelte-3h03g8",code:".inner.svelte-3h03g8 {display:contents;}"};function _r(t,e){Te(t,TF);let n=P(e,"hidden",3,!1),r=P(e,"disabled",3,!1),i=at(e,["$$slots","$$events","$$legacy","class","hidden","disabled","children"]);var s=EF();let o;var a=R(s),c=R(a);Re(c,()=>e.children??Fe),q(()=>{o=St(s,o,{...i,role:"group",class:`sui group ${e.class??""}`,hidden:n(),"aria-hidden":n(),"aria-disabled":r()},"svelte-3h03g8"),a.inert=r()}),T(t,s)}const FE=({fallbackLocale:t="en",initialLocale:e="en"}={})=>{Object.entries(Object.assign({"./locales/en.js":tO,"./locales/ja.js":rO})).forEach(([r,{strings:i}])=>{const[,s]=r.match(/([a-zA-Z-]+)\.js/);rb(s,{_sui:i})}),d$({fallbackLocale:t,initialLocale:e})};FE();const zE={"application/prs.cww":["cww"],"application/prs.xsf+xml":["xsf"],"application/vnd.1000minds.decision-model+xml":["1km"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["*xfdf"],"application/vnd.age":["age"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.keynote":["key"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.apple.numbers":["numbers"],"application/vnd.apple.pages":["pages"],"application/vnd.apple.pkpass":["pkpass"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.balsamiq.bmml+xml":["bmml"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.citationstyles.style+xml":["csl"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dbf":["dbf"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["*fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.slides":["ggs"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-apps.document":["gdoc"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.spreadsheet":["gsheet"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.gov.sk.xmldatacontainer+xml":["xdcf"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.hydrostatix.sof-data":["sfd-hdstx"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mapbox-vector-tile":["mvt"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-outlook":["msg"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["*stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["*mpp","mpt"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.nato.bindingdataobject+xml":["bdo"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.ac+xml":["*ac"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.n-gage.symbian.install":["n-gage"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openblox.game+xml":["obgx"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openstreetmap.data+xml":["osm"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.pwg-xhtml-print+xml":["xhtm"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.rar":["rar"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.software602.filler.form+xml":["fo"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.wadl+xml":["wadl"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.syncml.dmddf+xml":["ddf"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml","uo"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":["*dmg"],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":["*bdoc"],"application/x-bittorrent":["torrent"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-cocoa":["cco"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["*deb","udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-iso9660-image":["*iso"],"application/x-iwork-keynote-sffkey":["*key"],"application/x-iwork-numbers-sffnumbers":["*numbers"],"application/x-iwork-pages-sffpages":["*pages"],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-keepass2":["kdbx"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["*prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdos-program":["*exe"],"application/x-msdownload":["*exe","*dll","com","bat","*msi"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["*wmf","*wmz","*emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":["*prc","*pdb"],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["*rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["*sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["*obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"application/x-xfig":["fig"],"application/x-xliff+xml":["*xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/x-aac":["*aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":["*m4a"],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-realaudio":["*ra"],"audio/x-wav":["*wav"],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"image/prs.btif":["btif","btf"],"image/prs.pti":["pti"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.airzip.accelerator.azv":["azv"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":["*sub"],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.microsoft.icon":["ico"],"image/vnd.ms-dds":["dds"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.pco.b16":["b16"],"image/vnd.tencent.tap":["tap"],"image/vnd.valve.source.texture":["vtf"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/vnd.zbrush.pcx":["pcx"],"image/x-3ds":["3ds"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["*ico"],"image/x-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":["*bmp"],"image/x-pcx":["*pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"message/vnd.wfa.wsc":["wsc"],"model/vnd.bary":["bary"],"model/vnd.cld":["cld"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["*mts"],"model/vnd.opengex":["ogex"],"model/vnd.parasolid.transmit.binary":["x_b"],"model/vnd.parasolid.transmit.text":["x_t"],"model/vnd.pytha.pyox":["pyo","pyox"],"model/vnd.sap.vds":["vds"],"model/vnd.usda":["usda"],"model/vnd.usdz+zip":["usdz"],"model/vnd.valve.source.compiled-map":["bsp"],"model/vnd.vtu":["vtu"],"text/prs.lines.tag":["dsc"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.familysearch.gedcom":["ged"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":["*org"],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]};Object.freeze(zE);const jE={"application/andrew-inset":["ez"],"application/appinstaller":["appinstaller"],"application/applixware":["aw"],"application/appx":["appx"],"application/appxbundle":["appxbundle"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/automationml-aml+xml":["aml"],"application/automationml-amlx+zip":["amlx"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cpl+xml":["cpl"],"application/cu-seeme":["cu"],"application/cwl":["cwl"],"application/dash+xml":["mpd"],"application/dash-patch+xml":["mpp"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdf":["fdf"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["*js"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/media-policy-dataset+xml":["mpf"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["*mp4","*mpg4","mp4s","m4p"],"application/msix":["msix"],"application/msixbundle":["msixbundle"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-keys":["asc"],"application/pgp-signature":["sig","*asc"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/sql":["sql"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/watcherinfo+xml":["wif"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xfdf":["xfdf"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/aac":["adts","aac"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avci":["avci"],"image/avcs":["avcs"],"image/avif":["avif"],"image/bmp":["bmp","dib"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/dpx":["dpx"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm","jpgm"],"image/jpx":["jpx","jpf"],"image/jxl":["jxl"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/jt":["jt"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/prc":["prc"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/u3d":["u3d"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/javascript":["js","mjs"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["md","markdown"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/wgsl":["wgsl"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","*jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts","m2t","m2ts","mts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]};Object.freeze(jE);var bi=function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},_l,fu,sa;class CF{constructor(...e){_l.set(this,new Map),fu.set(this,new Map),sa.set(this,new Map);for(const n of e)this.define(n)}define(e,n=!1){for(let[r,i]of Object.entries(e)){r=r.toLowerCase(),i=i.map(a=>a.toLowerCase()),bi(this,sa,"f").has(r)||bi(this,sa,"f").set(r,new Set);const s=bi(this,sa,"f").get(r);let o=!0;for(let a of i){const c=a.startsWith("*");if(a=c?a.slice(1):a,s?.add(a),o&&bi(this,fu,"f").set(r,a),o=!1,c)continue;const u=bi(this,_l,"f").get(a);if(u&&u!=r&&!n)throw new Error(`"${r} -> ${a}" conflicts with "${u} -> ${a}". Pass \`force=true\` to override this definition.`);bi(this,_l,"f").set(a,r)}}return this}getType(e){if(typeof e!="string")return null;const n=e.replace(/^.*[/\\]/,"").toLowerCase(),r=n.replace(/^.*\./,"").toLowerCase(),i=n.length<e.length;return!(r.length<n.length-1)&&i?null:bi(this,_l,"f").get(r)??null}getExtension(e){return typeof e!="string"?null:(e=e?.split?.(";")[0],(e&&bi(this,fu,"f").get(e.trim().toLowerCase()))??null)}getAllExtensions(e){return typeof e!="string"?null:bi(this,sa,"f").get(e.toLowerCase())??null}_freeze(){this.define=()=>{throw new Error("define() not allowed for built-in Mime objects. See https://github.com/broofa/mime/blob/main/README.md#custom-mime-instances")},Object.freeze(this);for(const e of bi(this,sa,"f").values())Object.freeze(e);return this}_getTestState(){return{types:bi(this,_l,"f"),extensions:bi(this,fu,"f")}}}_l=new WeakMap,fu=new WeakMap,sa=new WeakMap;const Jo=new CF(jE,zE)._freeze(),UE='<svg viewBox="0 0 800 800" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="a" gradientUnits="userSpaceOnUse" x1="400" x2="400" y1="0" y2="800"><stop offset="0" stop-color="#f0980b"/><stop offset="1" stop-color="#ff1d00"/></linearGradient><clipPath id="b"><rect height="800" rx="80" width="800"/></clipPath><rect fill="url(#a)" height="800" rx="80" width="800"/><g style="clip-path:url(#b);fill:none;stroke:#fff;stroke-linecap:round;stroke-linejoin:round;stroke-width:180"><path d="m320-80-200 320 200 320-200 320"/><path d="m400 240 200 320 200-320"/></g></svg>';var Yg,f0;function h0(){if(f0)return Yg;f0=1;const{entries:t,setPrototypeOf:e,isFrozen:n,getPrototypeOf:r,getOwnPropertyDescriptor:i}=Object;let{freeze:s,seal:o,create:a}=Object,{apply:c,construct:u}=typeof Reflect<"u"&&Reflect;s||(s=function(xe){return xe}),o||(o=function(xe){return xe}),c||(c=function(xe,Ne,me){return xe.apply(Ne,me)}),u||(u=function(xe,Ne){return new xe(...Ne)});const d=E(Array.prototype.forEach),f=E(Array.prototype.lastIndexOf),h=E(Array.prototype.pop),p=E(Array.prototype.push),g=E(Array.prototype.splice),m=E(String.prototype.toLowerCase),v=E(String.prototype.toString),_=E(String.prototype.match),b=E(String.prototype.replace),y=E(String.prototype.indexOf),x=E(String.prototype.trim),k=E(Object.prototype.hasOwnProperty),S=E(RegExp.prototype.test),C=A(TypeError);function E(we){return function(xe){for(var Ne=arguments.length,me=new Array(Ne>1?Ne-1:0),Pe=1;Pe<Ne;Pe++)me[Pe-1]=arguments[Pe];return c(we,xe,me)}}function A(we){return function(){for(var xe=arguments.length,Ne=new Array(xe),me=0;me<xe;me++)Ne[me]=arguments[me];return u(we,Ne)}}function O(we,xe){let Ne=arguments.length>2&&arguments[2]!==void 0?arguments[2]:m;e&&e(we,null);let me=xe.length;for(;me--;){let Pe=xe[me];if(typeof Pe=="string"){const qe=Ne(Pe);qe!==Pe&&(n(xe)||(xe[me]=qe),Pe=qe)}we[Pe]=!0}return we}function L(we){for(let xe=0;xe<we.length;xe++)k(we,xe)||(we[xe]=null);return we}function I(we){const xe=a(null);for(const[Ne,me]of t(we))k(we,Ne)&&(Array.isArray(me)?xe[Ne]=L(me):me&&typeof me=="object"&&me.constructor===Object?xe[Ne]=I(me):xe[Ne]=me);return xe}function N(we,xe){for(;we!==null;){const me=i(we,xe);if(me){if(me.get)return E(me.get);if(typeof me.value=="function")return E(me.value)}we=r(we)}function Ne(){return null}return Ne}const j=s(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),H=s(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),B=s(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),V=s(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),G=s(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),K=s(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ee=s(["#text"]),J=s(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Y=s(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),te=s(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ce=s(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),he=o(/\{\{[\w\W]*|[\w\W]*\}\}/gm),re=o(/<%[\w\W]*|[\w\W]*%>/gm),X=o(/\$\{[\w\W]*/gm),fe=o(/^data-[\-\w.\u00B7-\uFFFF]+$/),be=o(/^aria-[\-\w]+$/),ue=o(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Ee=o(/^(?:\w+script|data):/i),_e=o(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ae=o(/^html$/i),Ce=o(/^[a-z][.\w]*(-[.\w]+)+$/i);var $e=Object.freeze({__proto__:null,ARIA_ATTR:be,ATTR_WHITESPACE:_e,CUSTOM_ELEMENT:Ce,DATA_ATTR:fe,DOCTYPE_NAME:Ae,ERB_EXPR:re,IS_ALLOWED_URI:ue,IS_SCRIPT_OR_DATA:Ee,MUSTACHE_EXPR:he,TMPLIT_EXPR:X});const Ve={element:1,text:3,progressingInstruction:7,comment:8,document:9},We=function(){return typeof window>"u"?null:window},ht=function(xe,Ne){if(typeof xe!="object"||typeof xe.createPolicy!="function")return null;let me=null;const Pe="data-tt-policy-suffix";Ne&&Ne.hasAttribute(Pe)&&(me=Ne.getAttribute(Pe));const qe="dompurify"+(me?"#"+me:"");try{return xe.createPolicy(qe,{createHTML(Xe){return Xe},createScriptURL(Xe){return Xe}})}catch{return console.warn("TrustedTypes policy "+qe+" could not be created."),null}},Ge=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function pe(){let we=arguments.length>0&&arguments[0]!==void 0?arguments[0]:We();const xe=gt=>pe(gt);if(xe.version="3.2.4",xe.removed=[],!we||!we.document||we.document.nodeType!==Ve.document||!we.Element)return xe.isSupported=!1,xe;let{document:Ne}=we;const me=Ne,Pe=me.currentScript,{DocumentFragment:qe,HTMLTemplateElement:Xe,Node:ct,Element:Ke,NodeFilter:nt,NamedNodeMap:dt=we.NamedNodeMap||we.MozNamedAttrMap,HTMLFormElement:ut,DOMParser:bt,trustedTypes:Ct}=we,sn=Ke.prototype,Rn=N(sn,"cloneNode"),Xn=N(sn,"remove"),kr=N(sn,"nextSibling"),zi=N(sn,"childNodes"),mi=N(sn,"parentNode");if(typeof Xe=="function"){const gt=Ne.createElement("template");gt.content&&gt.content.ownerDocument&&(Ne=gt.content.ownerDocument)}let Lt,yn="";const{implementation:Gt,createNodeIterator:yt,createDocumentFragment:Xt,getElementsByTagName:$n}=Ne,{importNode:wn}=me;let qt=Ge();xe.isSupported=typeof t=="function"&&typeof mi=="function"&&Gt&&Gt.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:Yt,ERB_EXPR:fn,TMPLIT_EXPR:Dn,DATA_ATTR:Qn,ARIA_ATTR:er,IS_SCRIPT_OR_DATA:si,ATTR_WHITESPACE:cs,CUSTOM_ELEMENT:fr}=$e;let{IS_ALLOWED_URI:Bn}=$e,zt=null;const oi=O({},[...j,...H,...B,...G,...ee]);let Ht=null;const Qt=O({},[...J,...Y,...te,...ce]);let Qe=Object.seal(a(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),xt=null,xn=null,tr=!0,js=!0,vo=!1,qn=!0,nr=!1,ji=!0,Ui=!1,ea=!1,hr=!1,rr=!1,vi=!1,qd=!1,Ty=!0,Cy=!1;const s2="user-content-";let dg=!0,Hc=!1,il={},sl=null;const Ay=O({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Py=null;const Oy=O({},["audio","video","img","source","image","track"]);let fg=null;const $y=O({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Hd="http://www.w3.org/1998/Math/MathML",Vd="http://www.w3.org/2000/svg",Us="http://www.w3.org/1999/xhtml";let ol=Us,hg=!1,pg=null;const o2=O({},[Hd,Vd,Us],v);let Wd=O({},["mi","mo","mn","ms","mtext"]),Gd=O({},["annotation-xml"]);const a2=O({},["title","style","font","a","script"]);let Vc=null;const l2=["application/xhtml+xml","text/html"],c2="text/html";let ir=null,al=null;const u2=Ne.createElement("form"),Ly=function(Q){return Q instanceof RegExp||Q instanceof Function},gg=function(){let Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(al&&al===Q)){if((!Q||typeof Q!="object")&&(Q={}),Q=I(Q),Vc=l2.indexOf(Q.PARSER_MEDIA_TYPE)===-1?c2:Q.PARSER_MEDIA_TYPE,ir=Vc==="application/xhtml+xml"?v:m,zt=k(Q,"ALLOWED_TAGS")?O({},Q.ALLOWED_TAGS,ir):oi,Ht=k(Q,"ALLOWED_ATTR")?O({},Q.ALLOWED_ATTR,ir):Qt,pg=k(Q,"ALLOWED_NAMESPACES")?O({},Q.ALLOWED_NAMESPACES,v):o2,fg=k(Q,"ADD_URI_SAFE_ATTR")?O(I($y),Q.ADD_URI_SAFE_ATTR,ir):$y,Py=k(Q,"ADD_DATA_URI_TAGS")?O(I(Oy),Q.ADD_DATA_URI_TAGS,ir):Oy,sl=k(Q,"FORBID_CONTENTS")?O({},Q.FORBID_CONTENTS,ir):Ay,xt=k(Q,"FORBID_TAGS")?O({},Q.FORBID_TAGS,ir):{},xn=k(Q,"FORBID_ATTR")?O({},Q.FORBID_ATTR,ir):{},il=k(Q,"USE_PROFILES")?Q.USE_PROFILES:!1,tr=Q.ALLOW_ARIA_ATTR!==!1,js=Q.ALLOW_DATA_ATTR!==!1,vo=Q.ALLOW_UNKNOWN_PROTOCOLS||!1,qn=Q.ALLOW_SELF_CLOSE_IN_ATTR!==!1,nr=Q.SAFE_FOR_TEMPLATES||!1,ji=Q.SAFE_FOR_XML!==!1,Ui=Q.WHOLE_DOCUMENT||!1,rr=Q.RETURN_DOM||!1,vi=Q.RETURN_DOM_FRAGMENT||!1,qd=Q.RETURN_TRUSTED_TYPE||!1,hr=Q.FORCE_BODY||!1,Ty=Q.SANITIZE_DOM!==!1,Cy=Q.SANITIZE_NAMED_PROPS||!1,dg=Q.KEEP_CONTENT!==!1,Hc=Q.IN_PLACE||!1,Bn=Q.ALLOWED_URI_REGEXP||ue,ol=Q.NAMESPACE||Us,Wd=Q.MATHML_TEXT_INTEGRATION_POINTS||Wd,Gd=Q.HTML_INTEGRATION_POINTS||Gd,Qe=Q.CUSTOM_ELEMENT_HANDLING||{},Q.CUSTOM_ELEMENT_HANDLING&&Ly(Q.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Qe.tagNameCheck=Q.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Q.CUSTOM_ELEMENT_HANDLING&&Ly(Q.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Qe.attributeNameCheck=Q.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Q.CUSTOM_ELEMENT_HANDLING&&typeof Q.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Qe.allowCustomizedBuiltInElements=Q.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),nr&&(js=!1),vi&&(rr=!0),il&&(zt=O({},ee),Ht=[],il.html===!0&&(O(zt,j),O(Ht,J)),il.svg===!0&&(O(zt,H),O(Ht,Y),O(Ht,ce)),il.svgFilters===!0&&(O(zt,B),O(Ht,Y),O(Ht,ce)),il.mathMl===!0&&(O(zt,G),O(Ht,te),O(Ht,ce))),Q.ADD_TAGS&&(zt===oi&&(zt=I(zt)),O(zt,Q.ADD_TAGS,ir)),Q.ADD_ATTR&&(Ht===Qt&&(Ht=I(Ht)),O(Ht,Q.ADD_ATTR,ir)),Q.ADD_URI_SAFE_ATTR&&O(fg,Q.ADD_URI_SAFE_ATTR,ir),Q.FORBID_CONTENTS&&(sl===Ay&&(sl=I(sl)),O(sl,Q.FORBID_CONTENTS,ir)),dg&&(zt["#text"]=!0),Ui&&O(zt,["html","head","body"]),zt.table&&(O(zt,["tbody"]),delete xt.tbody),Q.TRUSTED_TYPES_POLICY){if(typeof Q.TRUSTED_TYPES_POLICY.createHTML!="function")throw C('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Q.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw C('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Lt=Q.TRUSTED_TYPES_POLICY,yn=Lt.createHTML("")}else Lt===void 0&&(Lt=ht(Ct,Pe)),Lt!==null&&typeof yn=="string"&&(yn=Lt.createHTML(""));s&&s(Q),al=Q}},Ny=O({},[...H,...B,...V]),Iy=O({},[...G,...K]),d2=function(Q){let De=mi(Q);(!De||!De.tagName)&&(De={namespaceURI:ol,tagName:"template"});const lt=m(Q.tagName),hn=m(De.tagName);return pg[Q.namespaceURI]?Q.namespaceURI===Vd?De.namespaceURI===Us?lt==="svg":De.namespaceURI===Hd?lt==="svg"&&(hn==="annotation-xml"||Wd[hn]):!!Ny[lt]:Q.namespaceURI===Hd?De.namespaceURI===Us?lt==="math":De.namespaceURI===Vd?lt==="math"&&Gd[hn]:!!Iy[lt]:Q.namespaceURI===Us?De.namespaceURI===Vd&&!Gd[hn]||De.namespaceURI===Hd&&!Wd[hn]?!1:!Iy[lt]&&(a2[lt]||!Ny[lt]):!!(Vc==="application/xhtml+xml"&&pg[Q.namespaceURI]):!1},us=function(Q){p(xe.removed,{element:Q});try{mi(Q).removeChild(Q)}catch{Xn(Q)}},Kd=function(Q,De){try{p(xe.removed,{attribute:De.getAttributeNode(Q),from:De})}catch{p(xe.removed,{attribute:null,from:De})}if(De.removeAttribute(Q),Q==="is")if(rr||vi)try{us(De)}catch{}else try{De.setAttribute(Q,"")}catch{}},Ry=function(Q){let De=null,lt=null;if(hr)Q="<remove></remove>"+Q;else{const pr=_(Q,/^[\r\n\t ]+/);lt=pr&&pr[0]}Vc==="application/xhtml+xml"&&ol===Us&&(Q='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+Q+"</body></html>");const hn=Lt?Lt.createHTML(Q):Q;if(ol===Us)try{De=new bt().parseFromString(hn,Vc)}catch{}if(!De||!De.documentElement){De=Gt.createDocument(ol,"template",null);try{De.documentElement.innerHTML=hg?yn:hn}catch{}}const Sr=De.body||De.documentElement;return Q&&lt&&Sr.insertBefore(Ne.createTextNode(lt),Sr.childNodes[0]||null),ol===Us?$n.call(De,Ui?"html":"body")[0]:Ui?De.documentElement:Sr},Dy=function(Q){return yt.call(Q.ownerDocument||Q,Q,nt.SHOW_ELEMENT|nt.SHOW_COMMENT|nt.SHOW_TEXT|nt.SHOW_PROCESSING_INSTRUCTION|nt.SHOW_CDATA_SECTION,null)},mg=function(Q){return Q instanceof ut&&(typeof Q.nodeName!="string"||typeof Q.textContent!="string"||typeof Q.removeChild!="function"||!(Q.attributes instanceof dt)||typeof Q.removeAttribute!="function"||typeof Q.setAttribute!="function"||typeof Q.namespaceURI!="string"||typeof Q.insertBefore!="function"||typeof Q.hasChildNodes!="function")},My=function(Q){return typeof ct=="function"&&Q instanceof ct};function Bs(gt,Q,De){d(gt,lt=>{lt.call(xe,Q,De,al)})}const Fy=function(Q){let De=null;if(Bs(qt.beforeSanitizeElements,Q,null),mg(Q))return us(Q),!0;const lt=ir(Q.nodeName);if(Bs(qt.uponSanitizeElement,Q,{tagName:lt,allowedTags:zt}),Q.hasChildNodes()&&!My(Q.firstElementChild)&&S(/<[/\w]/g,Q.innerHTML)&&S(/<[/\w]/g,Q.textContent)||Q.nodeType===Ve.progressingInstruction||ji&&Q.nodeType===Ve.comment&&S(/<[/\w]/g,Q.data))return us(Q),!0;if(!zt[lt]||xt[lt]){if(!xt[lt]&&jy(lt)&&(Qe.tagNameCheck instanceof RegExp&&S(Qe.tagNameCheck,lt)||Qe.tagNameCheck instanceof Function&&Qe.tagNameCheck(lt)))return!1;if(dg&&!sl[lt]){const hn=mi(Q)||Q.parentNode,Sr=zi(Q)||Q.childNodes;if(Sr&&hn){const pr=Sr.length;for(let Gr=pr-1;Gr>=0;--Gr){const ds=Rn(Sr[Gr],!0);ds.__removalCount=(Q.__removalCount||0)+1,hn.insertBefore(ds,kr(Q))}}}return us(Q),!0}return Q instanceof Ke&&!d2(Q)||(lt==="noscript"||lt==="noembed"||lt==="noframes")&&S(/<\/no(script|embed|frames)/i,Q.innerHTML)?(us(Q),!0):(nr&&Q.nodeType===Ve.text&&(De=Q.textContent,d([Yt,fn,Dn],hn=>{De=b(De,hn," ")}),Q.textContent!==De&&(p(xe.removed,{element:Q.cloneNode()}),Q.textContent=De)),Bs(qt.afterSanitizeElements,Q,null),!1)},zy=function(Q,De,lt){if(Ty&&(De==="id"||De==="name")&&(lt in Ne||lt in u2))return!1;if(!(js&&!xn[De]&&S(Qn,De))){if(!(tr&&S(er,De))){if(!Ht[De]||xn[De]){if(!(jy(Q)&&(Qe.tagNameCheck instanceof RegExp&&S(Qe.tagNameCheck,Q)||Qe.tagNameCheck instanceof Function&&Qe.tagNameCheck(Q))&&(Qe.attributeNameCheck instanceof RegExp&&S(Qe.attributeNameCheck,De)||Qe.attributeNameCheck instanceof Function&&Qe.attributeNameCheck(De))||De==="is"&&Qe.allowCustomizedBuiltInElements&&(Qe.tagNameCheck instanceof RegExp&&S(Qe.tagNameCheck,lt)||Qe.tagNameCheck instanceof Function&&Qe.tagNameCheck(lt))))return!1}else if(!fg[De]){if(!S(Bn,b(lt,cs,""))){if(!((De==="src"||De==="xlink:href"||De==="href")&&Q!=="script"&&y(lt,"data:")===0&&Py[Q])){if(!(vo&&!S(si,b(lt,cs,"")))){if(lt)return!1}}}}}}return!0},jy=function(Q){return Q!=="annotation-xml"&&_(Q,fr)},Uy=function(Q){Bs(qt.beforeSanitizeAttributes,Q,null);const{attributes:De}=Q;if(!De||mg(Q))return;const lt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ht,forceKeepAttr:void 0};let hn=De.length;for(;hn--;){const Sr=De[hn],{name:pr,namespaceURI:Gr,value:ds}=Sr,Wc=ir(pr);let Ir=pr==="value"?ds:x(ds);if(lt.attrName=Wc,lt.attrValue=Ir,lt.keepAttr=!0,lt.forceKeepAttr=void 0,Bs(qt.uponSanitizeAttribute,Q,lt),Ir=lt.attrValue,Cy&&(Wc==="id"||Wc==="name")&&(Kd(pr,Q),Ir=s2+Ir),ji&&S(/((--!?|])>)|<\/(style|title)/i,Ir)){Kd(pr,Q);continue}if(lt.forceKeepAttr||(Kd(pr,Q),!lt.keepAttr))continue;if(!qn&&S(/\/>/i,Ir)){Kd(pr,Q);continue}nr&&d([Yt,fn,Dn],qy=>{Ir=b(Ir,qy," ")});const By=ir(Q.nodeName);if(zy(By,Wc,Ir)){if(Lt&&typeof Ct=="object"&&typeof Ct.getAttributeType=="function"&&!Gr)switch(Ct.getAttributeType(By,Wc)){case"TrustedHTML":{Ir=Lt.createHTML(Ir);break}case"TrustedScriptURL":{Ir=Lt.createScriptURL(Ir);break}}try{Gr?Q.setAttributeNS(Gr,pr,Ir):Q.setAttribute(pr,Ir),mg(Q)?us(Q):h(xe.removed)}catch{}}}Bs(qt.afterSanitizeAttributes,Q,null)},f2=function gt(Q){let De=null;const lt=Dy(Q);for(Bs(qt.beforeSanitizeShadowDOM,Q,null);De=lt.nextNode();)Bs(qt.uponSanitizeShadowNode,De,null),Fy(De),Uy(De),De.content instanceof qe&&gt(De.content);Bs(qt.afterSanitizeShadowDOM,Q,null)};return xe.sanitize=function(gt){let Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},De=null,lt=null,hn=null,Sr=null;if(hg=!gt,hg&&(gt="<!-->"),typeof gt!="string"&&!My(gt))if(typeof gt.toString=="function"){if(gt=gt.toString(),typeof gt!="string")throw C("dirty is not a string, aborting")}else throw C("toString is not a function");if(!xe.isSupported)return gt;if(ea||gg(Q),xe.removed=[],typeof gt=="string"&&(Hc=!1),Hc){if(gt.nodeName){const ds=ir(gt.nodeName);if(!zt[ds]||xt[ds])throw C("root node is forbidden and cannot be sanitized in-place")}}else if(gt instanceof ct)De=Ry("<!---->"),lt=De.ownerDocument.importNode(gt,!0),lt.nodeType===Ve.element&&lt.nodeName==="BODY"||lt.nodeName==="HTML"?De=lt:De.appendChild(lt);else{if(!rr&&!nr&&!Ui&&gt.indexOf("<")===-1)return Lt&&qd?Lt.createHTML(gt):gt;if(De=Ry(gt),!De)return rr?null:qd?yn:""}De&&hr&&us(De.firstChild);const pr=Dy(Hc?gt:De);for(;hn=pr.nextNode();)Fy(hn),Uy(hn),hn.content instanceof qe&&f2(hn.content);if(Hc)return gt;if(rr){if(vi)for(Sr=Xt.call(De.ownerDocument);De.firstChild;)Sr.appendChild(De.firstChild);else Sr=De;return(Ht.shadowroot||Ht.shadowrootmode)&&(Sr=wn.call(me,Sr,!0)),Sr}let Gr=Ui?De.outerHTML:De.innerHTML;return Ui&&zt["!doctype"]&&De.ownerDocument&&De.ownerDocument.doctype&&De.ownerDocument.doctype.name&&S(Ae,De.ownerDocument.doctype.name)&&(Gr="<!DOCTYPE "+De.ownerDocument.doctype.name+`>
197
197
  `+Gr),nr&&d([Yt,fn,Dn],ds=>{Gr=b(Gr,ds," ")}),Lt&&qd?Lt.createHTML(Gr):Gr},xe.setConfig=function(){let gt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};gg(gt),ea=!0},xe.clearConfig=function(){al=null,ea=!1},xe.isValidAttribute=function(gt,Q,De){al||gg({});const lt=ir(gt),hn=ir(Q);return zy(lt,hn,De)},xe.addHook=function(gt,Q){typeof Q=="function"&&p(qt[gt],Q)},xe.removeHook=function(gt,Q){if(Q!==void 0){const De=f(qt[gt],Q);return De===-1?void 0:g(qt[gt],De,1)[0]}return h(qt[gt])},xe.removeHooks=function(gt){qt[gt]=[]},xe.removeAllHooks=function(){qt=Ge()},xe}var ye=pe();return Yg=ye,Yg}var Jg,p0;function AF(){return p0||(p0=1,Jg=window.DOMPurify||(window.DOMPurify=h0().default||h0())),Jg}var BE=AF();const fi=ip(BE);function Qb(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let Ya=Qb();function qE(t){Ya=t}const Eu={exec:()=>null};function Wt(t,e=""){let n=typeof t=="string"?t:t.source;const r={replace:(i,s)=>{let o=typeof s=="string"?s:s.source;return o=o.replace(jr.caret,"$1"),n=n.replace(i,o),r},getRegex:()=>new RegExp(n,e)};return r}const jr={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},PF=/^(?:[ \t]*(?:\n|$))+/,OF=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,$F=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Td=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,LF=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,e_=/(?:[*+-]|\d{1,9}[.)])/,HE=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,VE=Wt(HE).replace(/bull/g,e_).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),NF=Wt(HE).replace(/bull/g,e_).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),t_=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,IF=/^[^\n]+/,n_=/(?!\s*\])(?:\\.|[^\[\]\\])+/,RF=Wt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",n_).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),DF=Wt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,e_).getRegex(),Cp="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",r_=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,MF=Wt("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",r_).replace("tag",Cp).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),WE=Wt(t_).replace("hr",Td).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Cp).getRegex(),FF=Wt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",WE).getRegex(),i_={blockquote:FF,code:OF,def:RF,fences:$F,heading:LF,hr:Td,html:MF,lheading:VE,list:DF,newline:PF,paragraph:WE,table:Eu,text:IF},g0=Wt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Td).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Cp).getRegex(),zF={...i_,lheading:NF,table:g0,paragraph:Wt(t_).replace("hr",Td).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",g0).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Cp).getRegex()},jF={...i_,html:Wt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",r_).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Eu,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Wt(t_).replace("hr",Td).replace("heading",` *#{1,6} *[^
198
- ]`).replace("lheading",VE).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},UF=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,BF=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,GE=/^( {2,}|\\)\n(?!\s*$)/,qF=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Ap=/[\p{P}\p{S}]/u,s_=/[\s\p{P}\p{S}]/u,KE=/[^\s\p{P}\p{S}]/u,HF=Wt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,s_).getRegex(),YE=/(?!~)[\p{P}\p{S}]/u,VF=/(?!~)[\s\p{P}\p{S}]/u,WF=/(?:[^\s\p{P}\p{S}]|~)/u,GF=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,JE=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,KF=Wt(JE,"u").replace(/punct/g,Ap).getRegex(),YF=Wt(JE,"u").replace(/punct/g,YE).getRegex(),ZE="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",JF=Wt(ZE,"gu").replace(/notPunctSpace/g,KE).replace(/punctSpace/g,s_).replace(/punct/g,Ap).getRegex(),ZF=Wt(ZE,"gu").replace(/notPunctSpace/g,WF).replace(/punctSpace/g,VF).replace(/punct/g,YE).getRegex(),XF=Wt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,KE).replace(/punctSpace/g,s_).replace(/punct/g,Ap).getRegex(),QF=Wt(/\\(punct)/,"gu").replace(/punct/g,Ap).getRegex(),ez=Wt(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),tz=Wt(r_).replace("(?:-->|$)","-->").getRegex(),nz=Wt("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",tz).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Th=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,rz=Wt(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Th).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),XE=Wt(/^!?\[(label)\]\[(ref)\]/).replace("label",Th).replace("ref",n_).getRegex(),QE=Wt(/^!?\[(ref)\](?:\[\])?/).replace("ref",n_).getRegex(),iz=Wt("reflink|nolink(?!\\()","g").replace("reflink",XE).replace("nolink",QE).getRegex(),o_={_backpedal:Eu,anyPunctuation:QF,autolink:ez,blockSkip:GF,br:GE,code:BF,del:Eu,emStrongLDelim:KF,emStrongRDelimAst:JF,emStrongRDelimUnd:XF,escape:UF,link:rz,nolink:QE,punctuation:HF,reflink:XE,reflinkSearch:iz,tag:nz,text:qF,url:Eu},sz={...o_,link:Wt(/^!?\[(label)\]\((.*?)\)/).replace("label",Th).getRegex(),reflink:Wt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Th).getRegex()},cv={...o_,emStrongRDelimAst:ZF,emStrongLDelim:YF,url:Wt(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},oz={...cv,br:Wt(GE).replace("{2,}","*").getRegex(),text:Wt(cv.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},uf={normal:i_,gfm:zF,pedantic:jF},Xc={normal:o_,gfm:cv,breaks:oz,pedantic:sz},az={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},m0=t=>az[t];function fs(t,e){if(e){if(jr.escapeTest.test(t))return t.replace(jr.escapeReplace,m0)}else if(jr.escapeTestNoEncode.test(t))return t.replace(jr.escapeReplaceNoEncode,m0);return t}function v0(t){try{t=encodeURI(t).replace(jr.percentDecode,"%")}catch{return null}return t}function b0(t,e){const n=t.replace(jr.findPipe,(s,o,a)=>{let c=!1,u=o;for(;--u>=0&&a[u]==="\\";)c=!c;return c?"|":" |"}),r=n.split(jr.splitPipe);let i=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(jr.slashPipe,"|");return r}function Qc(t,e,n){const r=t.length;if(r===0)return"";let i=0;for(;i<r&&t.charAt(r-i-1)===e;)i++;return t.slice(0,r-i)}function lz(t,e){if(t.indexOf(e[1])===-1)return-1;let n=0;for(let r=0;r<t.length;r++)if(t[r]==="\\")r++;else if(t[r]===e[0])n++;else if(t[r]===e[1]&&(n--,n<0))return r;return-1}function _0(t,e,n,r,i){const s=e.href,o=e.title||null,a=t[1].replace(i.other.outputLinkReplace,"$1");if(t[0].charAt(0)!=="!"){r.state.inLink=!0;const c={type:"link",raw:n,href:s,title:o,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,c}return{type:"image",raw:n,href:s,title:o,text:a}}function cz(t,e,n){const r=t.match(n.other.indentCodeCompensation);if(r===null)return e;const i=r[1];return e.split(`
198
+ ]`).replace("lheading",VE).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},UF=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,BF=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,GE=/^( {2,}|\\)\n(?!\s*$)/,qF=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Ap=/[\p{P}\p{S}]/u,s_=/[\s\p{P}\p{S}]/u,KE=/[^\s\p{P}\p{S}]/u,HF=Wt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,s_).getRegex(),YE=/(?!~)[\p{P}\p{S}]/u,VF=/(?!~)[\s\p{P}\p{S}]/u,WF=/(?:[^\s\p{P}\p{S}]|~)/u,GF=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,JE=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,KF=Wt(JE,"u").replace(/punct/g,Ap).getRegex(),YF=Wt(JE,"u").replace(/punct/g,YE).getRegex(),ZE="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",JF=Wt(ZE,"gu").replace(/notPunctSpace/g,KE).replace(/punctSpace/g,s_).replace(/punct/g,Ap).getRegex(),ZF=Wt(ZE,"gu").replace(/notPunctSpace/g,WF).replace(/punctSpace/g,VF).replace(/punct/g,YE).getRegex(),XF=Wt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,KE).replace(/punctSpace/g,s_).replace(/punct/g,Ap).getRegex(),QF=Wt(/\\(punct)/,"gu").replace(/punct/g,Ap).getRegex(),e3=Wt(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),t3=Wt(r_).replace("(?:-->|$)","-->").getRegex(),n3=Wt("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",t3).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Th=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,r3=Wt(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Th).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),XE=Wt(/^!?\[(label)\]\[(ref)\]/).replace("label",Th).replace("ref",n_).getRegex(),QE=Wt(/^!?\[(ref)\](?:\[\])?/).replace("ref",n_).getRegex(),i3=Wt("reflink|nolink(?!\\()","g").replace("reflink",XE).replace("nolink",QE).getRegex(),o_={_backpedal:Eu,anyPunctuation:QF,autolink:e3,blockSkip:GF,br:GE,code:BF,del:Eu,emStrongLDelim:KF,emStrongRDelimAst:JF,emStrongRDelimUnd:XF,escape:UF,link:r3,nolink:QE,punctuation:HF,reflink:XE,reflinkSearch:i3,tag:n3,text:qF,url:Eu},s3={...o_,link:Wt(/^!?\[(label)\]\((.*?)\)/).replace("label",Th).getRegex(),reflink:Wt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Th).getRegex()},cv={...o_,emStrongRDelimAst:ZF,emStrongLDelim:YF,url:Wt(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},o3={...cv,br:Wt(GE).replace("{2,}","*").getRegex(),text:Wt(cv.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},uf={normal:i_,gfm:zF,pedantic:jF},Xc={normal:o_,gfm:cv,breaks:o3,pedantic:s3},a3={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},m0=t=>a3[t];function fs(t,e){if(e){if(jr.escapeTest.test(t))return t.replace(jr.escapeReplace,m0)}else if(jr.escapeTestNoEncode.test(t))return t.replace(jr.escapeReplaceNoEncode,m0);return t}function v0(t){try{t=encodeURI(t).replace(jr.percentDecode,"%")}catch{return null}return t}function b0(t,e){const n=t.replace(jr.findPipe,(s,o,a)=>{let c=!1,u=o;for(;--u>=0&&a[u]==="\\";)c=!c;return c?"|":" |"}),r=n.split(jr.splitPipe);let i=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(jr.slashPipe,"|");return r}function Qc(t,e,n){const r=t.length;if(r===0)return"";let i=0;for(;i<r&&t.charAt(r-i-1)===e;)i++;return t.slice(0,r-i)}function l3(t,e){if(t.indexOf(e[1])===-1)return-1;let n=0;for(let r=0;r<t.length;r++)if(t[r]==="\\")r++;else if(t[r]===e[0])n++;else if(t[r]===e[1]&&(n--,n<0))return r;return-1}function _0(t,e,n,r,i){const s=e.href,o=e.title||null,a=t[1].replace(i.other.outputLinkReplace,"$1");if(t[0].charAt(0)!=="!"){r.state.inLink=!0;const c={type:"link",raw:n,href:s,title:o,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,c}return{type:"image",raw:n,href:s,title:o,text:a}}function c3(t,e,n){const r=t.match(n.other.indentCodeCompensation);if(r===null)return e;const i=r[1];return e.split(`
199
199
  `).map(s=>{const o=s.match(n.other.beginningSpace);if(o===null)return s;const[a]=o;return a.length>=i.length?s.slice(i.length):s}).join(`
200
200
  `)}class Ch{options;rules;lexer;constructor(e){this.options=e||Ya}space(e){const n=this.rules.block.newline.exec(e);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(e){const n=this.rules.block.code.exec(e);if(n){const r=n[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:Qc(r,`
201
- `)}}}fences(e){const n=this.rules.block.fences.exec(e);if(n){const r=n[0],i=cz(r,n[3]||"",this.rules);return{type:"code",raw:r,lang:n[2]?n[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):n[2],text:i}}}heading(e){const n=this.rules.block.heading.exec(e);if(n){let r=n[2].trim();if(this.rules.other.endingHash.test(r)){const i=Qc(r,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(r=i.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(e){const n=this.rules.block.hr.exec(e);if(n)return{type:"hr",raw:Qc(n[0],`
201
+ `)}}}fences(e){const n=this.rules.block.fences.exec(e);if(n){const r=n[0],i=c3(r,n[3]||"",this.rules);return{type:"code",raw:r,lang:n[2]?n[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):n[2],text:i}}}heading(e){const n=this.rules.block.heading.exec(e);if(n){let r=n[2].trim();if(this.rules.other.endingHash.test(r)){const i=Qc(r,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(r=i.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(e){const n=this.rules.block.hr.exec(e);if(n)return{type:"hr",raw:Qc(n[0],`
202
202
  `)}}blockquote(e){const n=this.rules.block.blockquote.exec(e);if(n){let r=Qc(n[0],`
203
203
  `).split(`
204
204
  `),i="",s="";const o=[];for(;r.length>0;){let a=!1;const c=[];let u;for(u=0;u<r.length;u++)if(this.rules.other.blockquoteStart.test(r[u]))c.push(r[u]),a=!0;else if(!a)c.push(r[u]);else break;r=r.slice(u);const d=c.join(`
@@ -219,7 +219,7 @@ ${f}`:f;const h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.block
219
219
  `+p}!g&&!p.trim()&&(g=!0),d+=C+`
220
220
  `,e=e.substring(C.length+1),h=E.slice(m)}}s.loose||(a?s.loose=!0:this.rules.other.doubleBlankLine.test(d)&&(a=!0));let v=null,_;this.options.gfm&&(v=this.rules.other.listIsTask.exec(f),v&&(_=v[0]!=="[ ] ",f=f.replace(this.rules.other.listReplaceTask,""))),s.items.push({type:"list_item",raw:d,task:!!v,checked:_,loose:!1,text:f,tokens:[]}),s.raw+=d}const c=s.items.at(-1);if(c)c.raw=c.raw.trimEnd(),c.text=c.text.trimEnd();else return;s.raw=s.raw.trimEnd();for(let u=0;u<s.items.length;u++)if(this.lexer.state.top=!1,s.items[u].tokens=this.lexer.blockTokens(s.items[u].text,[]),!s.loose){const d=s.items[u].tokens.filter(h=>h.type==="space"),f=d.length>0&&d.some(h=>this.rules.other.anyLine.test(h.raw));s.loose=f}if(s.loose)for(let u=0;u<s.items.length;u++)s.items[u].loose=!0;return s}}html(e){const n=this.rules.block.html.exec(e);if(n)return{type:"html",block:!0,raw:n[0],pre:n[1]==="pre"||n[1]==="script"||n[1]==="style",text:n[0]}}def(e){const n=this.rules.block.def.exec(e);if(n){const r=n[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),i=n[2]?n[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):n[3];return{type:"def",tag:r,raw:n[0],href:i,title:s}}}table(e){const n=this.rules.block.table.exec(e);if(!n||!this.rules.other.tableDelimiter.test(n[2]))return;const r=b0(n[1]),i=n[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=n[3]?.trim()?n[3].replace(this.rules.other.tableRowBlankLine,"").split(`
221
221
  `):[],o={type:"table",raw:n[0],header:[],align:[],rows:[]};if(r.length===i.length){for(const a of i)this.rules.other.tableAlignRight.test(a)?o.align.push("right"):this.rules.other.tableAlignCenter.test(a)?o.align.push("center"):this.rules.other.tableAlignLeft.test(a)?o.align.push("left"):o.align.push(null);for(let a=0;a<r.length;a++)o.header.push({text:r[a],tokens:this.lexer.inline(r[a]),header:!0,align:o.align[a]});for(const a of s)o.rows.push(b0(a,o.header.length).map((c,u)=>({text:c,tokens:this.lexer.inline(c),header:!1,align:o.align[u]})));return o}}lheading(e){const n=this.rules.block.lheading.exec(e);if(n)return{type:"heading",raw:n[0],depth:n[2].charAt(0)==="="?1:2,text:n[1],tokens:this.lexer.inline(n[1])}}paragraph(e){const n=this.rules.block.paragraph.exec(e);if(n){const r=n[1].charAt(n[1].length-1)===`
222
- `?n[1].slice(0,-1):n[1];return{type:"paragraph",raw:n[0],text:r,tokens:this.lexer.inline(r)}}}text(e){const n=this.rules.block.text.exec(e);if(n)return{type:"text",raw:n[0],text:n[0],tokens:this.lexer.inline(n[0])}}escape(e){const n=this.rules.inline.escape.exec(e);if(n)return{type:"escape",raw:n[0],text:n[1]}}tag(e){const n=this.rules.inline.tag.exec(e);if(n)return!this.lexer.state.inLink&&this.rules.other.startATag.test(n[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:n[0]}}link(e){const n=this.rules.inline.link.exec(e);if(n){const r=n[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;const o=Qc(r.slice(0,-1),"\\");if((r.length-o.length)%2===0)return}else{const o=lz(n[2],"()");if(o>-1){const c=(n[0].indexOf("!")===0?5:4)+n[1].length+o;n[2]=n[2].substring(0,o),n[0]=n[0].substring(0,c).trim(),n[3]=""}}let i=n[2],s="";if(this.options.pedantic){const o=this.rules.other.pedanticHrefTitle.exec(i);o&&(i=o[1],s=o[3])}else s=n[3]?n[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?i=i.slice(1):i=i.slice(1,-1)),_0(n,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},n[0],this.lexer,this.rules)}}reflink(e,n){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){const i=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=n[i.toLowerCase()];if(!s){const o=r[0].charAt(0);return{type:"text",raw:o,text:o}}return _0(r,s,r[0],this.lexer,this.rules)}}emStrong(e,n,r=""){let i=this.rules.inline.emStrongLDelim.exec(e);if(!i||i[3]&&r.match(this.rules.other.unicodeAlphaNumeric))return;if(!(i[1]||i[2]||"")||!r||this.rules.inline.punctuation.exec(r)){const o=[...i[0]].length-1;let a,c,u=o,d=0;const f=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(f.lastIndex=0,n=n.slice(-1*e.length+o);(i=f.exec(n))!=null;){if(a=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!a)continue;if(c=[...a].length,i[3]||i[4]){u+=c;continue}else if((i[5]||i[6])&&o%3&&!((o+c)%3)){d+=c;continue}if(u-=c,u>0)continue;c=Math.min(c,c+u+d);const h=[...i[0]][0].length,p=e.slice(0,o+i.index+h+c);if(Math.min(o,c)%2){const m=p.slice(1,-1);return{type:"em",raw:p,text:m,tokens:this.lexer.inlineTokens(m)}}const g=p.slice(2,-2);return{type:"strong",raw:p,text:g,tokens:this.lexer.inlineTokens(g)}}}}codespan(e){const n=this.rules.inline.code.exec(e);if(n){let r=n[2].replace(this.rules.other.newLineCharGlobal," ");const i=this.rules.other.nonSpaceChar.test(r),s=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return i&&s&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:n[0],text:r}}}br(e){const n=this.rules.inline.br.exec(e);if(n)return{type:"br",raw:n[0]}}del(e){const n=this.rules.inline.del.exec(e);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(e){const n=this.rules.inline.autolink.exec(e);if(n){let r,i;return n[2]==="@"?(r=n[1],i="mailto:"+r):(r=n[1],i=r),{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}url(e){let n;if(n=this.rules.inline.url.exec(e)){let r,i;if(n[2]==="@")r=n[0],i="mailto:"+r;else{let s;do s=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])?.[0]??"";while(s!==n[0]);r=n[0],n[1]==="www."?i="http://"+n[0]:i=n[0]}return{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(e){const n=this.rules.inline.text.exec(e);if(n){const r=this.lexer.state.inRawBlock;return{type:"text",raw:n[0],text:n[0],escaped:r}}}}class ki{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Ya,this.options.tokenizer=this.options.tokenizer||new Ch,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const n={other:jr,block:uf.normal,inline:Xc.normal};this.options.pedantic?(n.block=uf.pedantic,n.inline=Xc.pedantic):this.options.gfm&&(n.block=uf.gfm,this.options.breaks?n.inline=Xc.breaks:n.inline=Xc.gfm),this.tokenizer.rules=n}static get rules(){return{block:uf,inline:Xc}}static lex(e,n){return new ki(n).lex(e)}static lexInline(e,n){return new ki(n).inlineTokens(e)}lex(e){e=e.replace(jr.carriageReturn,`
222
+ `?n[1].slice(0,-1):n[1];return{type:"paragraph",raw:n[0],text:r,tokens:this.lexer.inline(r)}}}text(e){const n=this.rules.block.text.exec(e);if(n)return{type:"text",raw:n[0],text:n[0],tokens:this.lexer.inline(n[0])}}escape(e){const n=this.rules.inline.escape.exec(e);if(n)return{type:"escape",raw:n[0],text:n[1]}}tag(e){const n=this.rules.inline.tag.exec(e);if(n)return!this.lexer.state.inLink&&this.rules.other.startATag.test(n[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:n[0]}}link(e){const n=this.rules.inline.link.exec(e);if(n){const r=n[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;const o=Qc(r.slice(0,-1),"\\");if((r.length-o.length)%2===0)return}else{const o=l3(n[2],"()");if(o>-1){const c=(n[0].indexOf("!")===0?5:4)+n[1].length+o;n[2]=n[2].substring(0,o),n[0]=n[0].substring(0,c).trim(),n[3]=""}}let i=n[2],s="";if(this.options.pedantic){const o=this.rules.other.pedanticHrefTitle.exec(i);o&&(i=o[1],s=o[3])}else s=n[3]?n[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?i=i.slice(1):i=i.slice(1,-1)),_0(n,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},n[0],this.lexer,this.rules)}}reflink(e,n){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){const i=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=n[i.toLowerCase()];if(!s){const o=r[0].charAt(0);return{type:"text",raw:o,text:o}}return _0(r,s,r[0],this.lexer,this.rules)}}emStrong(e,n,r=""){let i=this.rules.inline.emStrongLDelim.exec(e);if(!i||i[3]&&r.match(this.rules.other.unicodeAlphaNumeric))return;if(!(i[1]||i[2]||"")||!r||this.rules.inline.punctuation.exec(r)){const o=[...i[0]].length-1;let a,c,u=o,d=0;const f=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(f.lastIndex=0,n=n.slice(-1*e.length+o);(i=f.exec(n))!=null;){if(a=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!a)continue;if(c=[...a].length,i[3]||i[4]){u+=c;continue}else if((i[5]||i[6])&&o%3&&!((o+c)%3)){d+=c;continue}if(u-=c,u>0)continue;c=Math.min(c,c+u+d);const h=[...i[0]][0].length,p=e.slice(0,o+i.index+h+c);if(Math.min(o,c)%2){const m=p.slice(1,-1);return{type:"em",raw:p,text:m,tokens:this.lexer.inlineTokens(m)}}const g=p.slice(2,-2);return{type:"strong",raw:p,text:g,tokens:this.lexer.inlineTokens(g)}}}}codespan(e){const n=this.rules.inline.code.exec(e);if(n){let r=n[2].replace(this.rules.other.newLineCharGlobal," ");const i=this.rules.other.nonSpaceChar.test(r),s=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return i&&s&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:n[0],text:r}}}br(e){const n=this.rules.inline.br.exec(e);if(n)return{type:"br",raw:n[0]}}del(e){const n=this.rules.inline.del.exec(e);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(e){const n=this.rules.inline.autolink.exec(e);if(n){let r,i;return n[2]==="@"?(r=n[1],i="mailto:"+r):(r=n[1],i=r),{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}url(e){let n;if(n=this.rules.inline.url.exec(e)){let r,i;if(n[2]==="@")r=n[0],i="mailto:"+r;else{let s;do s=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])?.[0]??"";while(s!==n[0]);r=n[0],n[1]==="www."?i="http://"+n[0]:i=n[0]}return{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(e){const n=this.rules.inline.text.exec(e);if(n){const r=this.lexer.state.inRawBlock;return{type:"text",raw:n[0],text:n[0],escaped:r}}}}class ki{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Ya,this.options.tokenizer=this.options.tokenizer||new Ch,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const n={other:jr,block:uf.normal,inline:Xc.normal};this.options.pedantic?(n.block=uf.pedantic,n.inline=Xc.pedantic):this.options.gfm&&(n.block=uf.gfm,this.options.breaks?n.inline=Xc.breaks:n.inline=Xc.gfm),this.tokenizer.rules=n}static get rules(){return{block:uf,inline:Xc}}static lex(e,n){return new ki(n).lex(e)}static lexInline(e,n){return new ki(n).inlineTokens(e)}lex(e){e=e.replace(jr.carriageReturn,`
223
223
  `),this.blockTokens(e,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){const r=this.inlineQueue[n];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,n=[],r=!1){for(this.options.pedantic&&(e=e.replace(jr.tabCharGlobal," ").replace(jr.spaceLine,""));e;){let i;if(this.options.extensions?.block?.some(o=>(i=o.call({lexer:this},e,n))?(e=e.substring(i.raw.length),n.push(i),!0):!1))continue;if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length);const o=n.at(-1);i.raw.length===1&&o!==void 0?o.raw+=`
224
224
  `:n.push(i);continue}if(i=this.tokenizer.code(e)){e=e.substring(i.raw.length);const o=n.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=`
225
225
  `+i.raw,o.text+=`
@@ -248,9 +248,9 @@ ${this.parser.parse(e)}</blockquote>
248
248
  ${e}</tr>
249
249
  `}tablecell(e){const n=this.parser.parseInline(e.tokens),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+n+`</${r}>
250
250
  `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${fs(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:n,tokens:r}){const i=this.parser.parseInline(r),s=v0(e);if(s===null)return i;e=s;let o='<a href="'+e+'"';return n&&(o+=' title="'+fs(n)+'"'),o+=">"+i+"</a>",o}image({href:e,title:n,text:r}){const i=v0(e);if(i===null)return fs(r);e=i;let s=`<img src="${e}" alt="${r}"`;return n&&(s+=` title="${fs(n)}"`),s+=">",s}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:fs(e.text)}}class a_{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}}class Si{options;renderer;textRenderer;constructor(e){this.options=e||Ya,this.options.renderer=this.options.renderer||new Ah,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new a_}static parse(e,n){return new Si(n).parse(e)}static parseInline(e,n){return new Si(n).parseInline(e)}parse(e,n=!0){let r="";for(let i=0;i<e.length;i++){const s=e[i];if(this.options.extensions?.renderers?.[s.type]){const a=s,c=this.options.extensions.renderers[a.type].call({parser:this},a);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(a.type)){r+=c||"";continue}}const o=s;switch(o.type){case"space":{r+=this.renderer.space(o);continue}case"hr":{r+=this.renderer.hr(o);continue}case"heading":{r+=this.renderer.heading(o);continue}case"code":{r+=this.renderer.code(o);continue}case"table":{r+=this.renderer.table(o);continue}case"blockquote":{r+=this.renderer.blockquote(o);continue}case"list":{r+=this.renderer.list(o);continue}case"html":{r+=this.renderer.html(o);continue}case"paragraph":{r+=this.renderer.paragraph(o);continue}case"text":{let a=o,c=this.renderer.text(a);for(;i+1<e.length&&e[i+1].type==="text";)a=e[++i],c+=`
251
- `+this.renderer.text(a);n?r+=this.renderer.paragraph({type:"paragraph",raw:c,text:c,tokens:[{type:"text",raw:c,text:c,escaped:!0}]}):r+=c;continue}default:{const a='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return r}parseInline(e,n=this.renderer){let r="";for(let i=0;i<e.length;i++){const s=e[i];if(this.options.extensions?.renderers?.[s.type]){const a=this.options.extensions.renderers[s.type].call({parser:this},s);if(a!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){r+=a||"";continue}}const o=s;switch(o.type){case"escape":{r+=n.text(o);break}case"html":{r+=n.html(o);break}case"link":{r+=n.link(o);break}case"image":{r+=n.image(o);break}case"strong":{r+=n.strong(o);break}case"em":{r+=n.em(o);break}case"codespan":{r+=n.codespan(o);break}case"br":{r+=n.br(o);break}case"del":{r+=n.del(o);break}case"text":{r+=n.text(o);break}default:{const a='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return r}}class $f{options;block;constructor(e){this.options=e||Ya}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?ki.lex:ki.lexInline}provideParser(){return this.block?Si.parse:Si.parseInline}}class uz{defaults=Qb();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Si;Renderer=Ah;TextRenderer=a_;Lexer=ki;Tokenizer=Ch;Hooks=$f;constructor(...e){this.use(...e)}walkTokens(e,n){let r=[];for(const i of e)switch(r=r.concat(n.call(this,i)),i.type){case"table":{const s=i;for(const o of s.header)r=r.concat(this.walkTokens(o.tokens,n));for(const o of s.rows)for(const a of o)r=r.concat(this.walkTokens(a.tokens,n));break}case"list":{const s=i;r=r.concat(this.walkTokens(s.items,n));break}default:{const s=i;this.defaults.extensions?.childTokens?.[s.type]?this.defaults.extensions.childTokens[s.type].forEach(o=>{const a=s[o].flat(1/0);r=r.concat(this.walkTokens(a,n))}):s.tokens&&(r=r.concat(this.walkTokens(s.tokens,n)))}}return r}use(...e){const n=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(r=>{const i={...r};if(i.async=this.defaults.async||i.async||!1,r.extensions&&(r.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){const o=n.renderers[s.name];o?n.renderers[s.name]=function(...a){let c=s.renderer.apply(this,a);return c===!1&&(c=o.apply(this,a)),c}:n.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const o=n[s.level];o?o.unshift(s.tokenizer):n[s.level]=[s.tokenizer],s.start&&(s.level==="block"?n.startBlock?n.startBlock.push(s.start):n.startBlock=[s.start]:s.level==="inline"&&(n.startInline?n.startInline.push(s.start):n.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(n.childTokens[s.name]=s.childTokens)}),i.extensions=n),r.renderer){const s=this.defaults.renderer||new Ah(this.defaults);for(const o in r.renderer){if(!(o in s))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;const a=o,c=r.renderer[a],u=s[a];s[a]=(...d)=>{let f=c.apply(s,d);return f===!1&&(f=u.apply(s,d)),f||""}}i.renderer=s}if(r.tokenizer){const s=this.defaults.tokenizer||new Ch(this.defaults);for(const o in r.tokenizer){if(!(o in s))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;const a=o,c=r.tokenizer[a],u=s[a];s[a]=(...d)=>{let f=c.apply(s,d);return f===!1&&(f=u.apply(s,d)),f}}i.tokenizer=s}if(r.hooks){const s=this.defaults.hooks||new $f;for(const o in r.hooks){if(!(o in s))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;const a=o,c=r.hooks[a],u=s[a];$f.passThroughHooks.has(o)?s[a]=d=>{if(this.defaults.async)return Promise.resolve(c.call(s,d)).then(h=>u.call(s,h));const f=c.call(s,d);return u.call(s,f)}:s[a]=(...d)=>{let f=c.apply(s,d);return f===!1&&(f=u.apply(s,d)),f}}i.hooks=s}if(r.walkTokens){const s=this.defaults.walkTokens,o=r.walkTokens;i.walkTokens=function(a){let c=[];return c.push(o.call(this,a)),s&&(c=c.concat(s.call(this,a))),c}}this.defaults={...this.defaults,...i}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,n){return ki.lex(e,n??this.defaults)}parser(e,n){return Si.parse(e,n??this.defaults)}parseMarkdown(e){return(r,i)=>{const s={...i},o={...this.defaults,...s},a=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&s.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=e);const c=o.hooks?o.hooks.provideLexer():e?ki.lex:ki.lexInline,u=o.hooks?o.hooks.provideParser():e?Si.parse:Si.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(r):r).then(d=>c(d,o)).then(d=>o.hooks?o.hooks.processAllTokens(d):d).then(d=>o.walkTokens?Promise.all(this.walkTokens(d,o.walkTokens)).then(()=>d):d).then(d=>u(d,o)).then(d=>o.hooks?o.hooks.postprocess(d):d).catch(a);try{o.hooks&&(r=o.hooks.preprocess(r));let d=c(r,o);o.hooks&&(d=o.hooks.processAllTokens(d)),o.walkTokens&&this.walkTokens(d,o.walkTokens);let f=u(d,o);return o.hooks&&(f=o.hooks.postprocess(f)),f}catch(d){return a(d)}}}onError(e,n){return r=>{if(r.message+=`
252
- Please report this to https://github.com/markedjs/marked.`,e){const i="<p>An error occurred:</p><pre>"+fs(r.message+"",!0)+"</pre>";return n?Promise.resolve(i):i}if(n)return Promise.reject(r);throw r}}}const Ma=new uz;function Ot(t,e){return Ma.parse(t,e)}Ot.options=Ot.setOptions=function(t){return Ma.setOptions(t),Ot.defaults=Ma.defaults,qE(Ot.defaults),Ot};Ot.getDefaults=Qb;Ot.defaults=Ya;Ot.use=function(...t){return Ma.use(...t),Ot.defaults=Ma.defaults,qE(Ot.defaults),Ot};Ot.walkTokens=function(t,e){return Ma.walkTokens(t,e)};Ot.parseInline=Ma.parseInline;Ot.Parser=Si;Ot.parser=Si.parse;Ot.Renderer=Ah;Ot.TextRenderer=a_;Ot.Lexer=ki;Ot.lexer=ki.lex;Ot.Tokenizer=Ch;Ot.Hooks=$f;Ot.parse=Ot;Ot.options;Ot.setOptions;Ot.use;Ot.walkTokens;const dz=Ot.parseInline;Si.parse;ki.lex;class jo{#t;#n="";#e="";#o={};#i=[];constructor(e,n,{keyPath:r,autoIncrement:i,indexes:s=[]}={}){this.#t=void 0,this.#n=e,this.#e=n,this.#o={keyPath:r,autoIncrement:i},this.#i=s}async#a(e){return new Promise(n=>{const r=globalThis.indexedDB.open(this.#n,e);r.onupgradeneeded=()=>{const i=r.result,s=this.#e,o=i.objectStoreNames.contains(s)?i.transaction(s,"readwrite").objectStore(s):i.createObjectStore(s,this.#o);this.#i.forEach(({name:a,keyPath:c,options:u})=>{o.indexNames.contains(a)||o.createIndex(a,c,u)})},r.onsuccess=()=>{n(r.result)}})}async#l(){let e=!1,n=await this.#a();const{version:r,objectStoreNames:i}=n,s=this.#e;if(i.contains(s)){const o=n.transaction(s).objectStore(s);e=this.#i.some(({name:a})=>!o.indexNames.contains(a))}else e=!0;return e&&(n.close(),n=await this.#a(r+1)),n.onversionchange=()=>{n.close(),this.#t=void 0},n}async#r(e){this.#t??=await this.#l();const n=this.#t,r=this.#e,i=n.transaction(r,"readwrite"),s=e(i.objectStore(r));return s?new Promise(o=>{s.onsuccess=()=>{o(s.result)}}):new Promise(o=>{i.oncomplete=()=>{o(void 0)}})}async set(e,n){return this.#r(r=>r.put(n,e))}async put(e){return this.#r(n=>n.put(e))}async saveEntries(e){return this.#r(n=>{e.forEach(([r,i])=>{n.put(i,r)})})}async get(e){return this.#r(n=>n.get(e))}async keys(){return this.#r(e=>e.getAllKeys())}async values(){return this.#r(e=>e.getAll())}async entries(){const[e,n]=await Promise.all([this.keys(),this.values()]);return e.map((r,i)=>[r,n[i]])}async#s({callback:e=void 0,index:n=void 0,query:r=void 0,direction:i="next",multiple:s=!1}){return new Promise(o=>{this.#r(a=>{const c=(n?a.index(n):a).openCursor(r,i),u=[];c.onsuccess=()=>{const d=c.result;if(d){const{value:f}=d;typeof e!="function"||e(f)?s?(u.push(f),d.continue()):o(f):d.continue()}else o(s?u:void 0)}})})}async find(e,{index:n,query:r}={}){return this.#s({callback:e,index:n,query:r})}async findLast(e,{index:n,query:r}={}){return this.#s({callback:e,index:n,query:r,direction:"prev"})}async filter(e,{index:n,query:r}={}){return this.#s({callback:e,index:n,query:r,multiple:!0})}async delete(e){await this.#r(n=>n.delete(e))}async deleteEntries(e){await this.#r(n=>{e.forEach(r=>{n.delete(r)})})}async clear(){await this.#r(e=>e.clear())}}class ti{static async set(e,n){globalThis.localStorage.setItem(e,JSON.stringify(n))}static async get(e){const n=globalThis.localStorage.getItem(e);return n?JSON.parse(n):null}static async delete(e){globalThis.localStorage.removeItem(e)}static async clear(){globalThis.localStorage.clear()}static async keys(){return Object.keys(globalThis.localStorage)}static async values(){return Object.values(globalThis.localStorage).map(e=>JSON.parse(e))}static async entries(){return Object.entries(globalThis.localStorage).map(([e,n])=>[e,JSON.parse(n)])}}const eT=st(!1),tT=async({backendName:t,authURL:e})=>{const{availHeight:i,availWidth:s}=window.screen,o=i/2-800/2,a=s/2-600/2,c=window.open(e,"auth",`width=600,height=800,top=${o},left=${a}`);return new Promise((u,d)=>{const f=t==="github"?setInterval(()=>{c?.closed&&(clearInterval(f),d(Object.assign(new Error("Authentication aborted"),{name:"AbortError"})))},1e3):0,h=({origin:p,data:g})=>{if(p!==new URL(e).origin||typeof g!="string")return;const m=t;if(g===`authorizing:${m}`){c?.postMessage(g,p);return}const{result:v}=g.match(`^authorization:${m}:(success|error):(?<result>.+)`)?.groups??{};let _;try{_=v?JSON.parse(v):{error:"No data"}}catch{_={error:"Malformed data"}}typeof _.token=="string"?u(_.token):d(new Error("Authentication failed",{cause:new Error(_.errorCode?ne(le)(`sign_in_error.${_.errorCode}`,{default:_.error}):_.error)})),window.removeEventListener("message",h),clearInterval(f),c?.close()};window.addEventListener("message",h)})},nT=async({backendName:t,siteDomain:e,authURL:n,scope:r})=>{try{new URL(n).origin==="https://api.netlify.com"&&(e=new URL(`https://${e}`).hostname)}catch{}const i=new URLSearchParams({provider:t,site_id:e,scope:r});return tT({backendName:t,authURL:`${n}?${i.toString()}`})},fz=async()=>{const t=`${wm()}${wm()}`,e=btoa(await Pa(t,{algorithm:"SHA-256",format:"binary"})).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"");return{csrfToken:Gn().replaceAll("-",""),codeVerifier:t,codeChallenge:e}},hz=async({backendName:t,clientId:e,authURL:n,scope:r})=>{const{csrfToken:i,codeVerifier:s,codeChallenge:o}=await fz(),{origin:a,pathname:c}=window.location,u=`${a}${c}`,d=new URLSearchParams({client_id:e,redirect_uri:u,response_type:"code",state:i,scope:r,code_challenge:o,code_challenge_method:"S256"});return await ti.set("sveltia-cms.auth",{csrfToken:i,codeVerifier:s,realAuthURL:`${n}?${d.toString()}`}),await ti.set("sveltia-cms.user",{backendName:t}),tT({backendName:t,authURL:u})},df=({provider:t="unknown",token:e,error:n,errorCode:r})=>{const i=n?"error":"success",s=n?{provider:t,error:n,errorCode:r}:{provider:t,token:e};window.addEventListener("message",({data:o,origin:a})=>{o===`authorizing:${t}`&&window.opener?.postMessage(`authorization:${t}:${i}:${JSON.stringify(s)}`,a)}),window.opener?.postMessage(`authorizing:${t}`,"*")},pz=async({backendName:t,clientId:e,authURL:n,code:r,state:i})=>{const{origin:s,pathname:o}=new URL(window.location.href),{csrfToken:a,codeVerifier:c}=await ti.get("sveltia-cms.auth")??{},u=t,d=`${s}${o}`;if(await ti.delete("sveltia-cms.auth"),!a||!c||i!==a)return df({provider:u,error:ne(le)("sign_in_error.CSRF_DETECTED"),errorCode:"CSRF_DETECTED"});let f,h="",p="";try{f=await fetch(n,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({client_id:e,code:r,grant_type:"authorization_code",redirect_uri:d,code_verifier:c})})}catch{}if(!f)return df({provider:u,error:ne(le)("sign_in_error.TOKEN_REQUEST_FAILED"),errorCode:"TOKEN_REQUEST_FAILED"});try{({access_token:h,error:p}=await f.json())}catch{return df({provider:u,error:ne(le)("sign_in_error.MALFORMED_RESPONSE"),errorCode:"MALFORMED_RESPONSE"})}return df({provider:u,token:h,error:p})},gz=async({backendName:t,clientId:e,authURL:n})=>{eT.set(!0);const{search:r}=window.location,{code:i,state:s}=Object.fromEntries(new URLSearchParams(r));if(i&&s)await pz({backendName:t,clientId:e,authURL:n,code:i,state:s});else{const{realAuthURL:o}=await ti.get("sveltia-cms.auth")??{};o&&(window.location.href=o)}},l_=Symbol.for("yaml.alias"),uv=Symbol.for("yaml.document"),Io=Symbol.for("yaml.map"),rT=Symbol.for("yaml.pair"),Os=Symbol.for("yaml.scalar"),Ic=Symbol.for("yaml.seq"),Ii=Symbol.for("yaml.node.type"),Ja=t=>!!t&&typeof t=="object"&&t[Ii]===l_,Za=t=>!!t&&typeof t=="object"&&t[Ii]===uv,Rc=t=>!!t&&typeof t=="object"&&t[Ii]===Io,bn=t=>!!t&&typeof t=="object"&&t[Ii]===rT,rn=t=>!!t&&typeof t=="object"&&t[Ii]===Os,Dc=t=>!!t&&typeof t=="object"&&t[Ii]===Ic;function Tn(t){if(t&&typeof t=="object")switch(t[Ii]){case Io:case Ic:return!0}return!1}function An(t){if(t&&typeof t=="object")switch(t[Ii]){case l_:case Io:case Os:case Ic:return!0}return!1}const mz=t=>(rn(t)||Tn(t))&&!!t.anchor,Jr=Symbol("break visit"),iT=Symbol("skip children"),Es=Symbol("remove node");function Uo(t,e){const n=sT(e);Za(t)?kl(null,t.contents,n,Object.freeze([t]))===Es&&(t.contents=null):kl(null,t,n,Object.freeze([]))}Uo.BREAK=Jr;Uo.SKIP=iT;Uo.REMOVE=Es;function kl(t,e,n,r){const i=oT(t,e,n,r);if(An(i)||bn(i))return aT(t,r,i),kl(t,i,n,r);if(typeof i!="symbol"){if(Tn(e)){r=Object.freeze(r.concat(e));for(let s=0;s<e.items.length;++s){const o=kl(s,e.items[s],n,r);if(typeof o=="number")s=o-1;else{if(o===Jr)return Jr;o===Es&&(e.items.splice(s,1),s-=1)}}}else if(bn(e)){r=Object.freeze(r.concat(e));const s=kl("key",e.key,n,r);if(s===Jr)return Jr;s===Es&&(e.key=null);const o=kl("value",e.value,n,r);if(o===Jr)return Jr;o===Es&&(e.value=null)}}return i}async function Pp(t,e){const n=sT(e);Za(t)?await Sl(null,t.contents,n,Object.freeze([t]))===Es&&(t.contents=null):await Sl(null,t,n,Object.freeze([]))}Pp.BREAK=Jr;Pp.SKIP=iT;Pp.REMOVE=Es;async function Sl(t,e,n,r){const i=await oT(t,e,n,r);if(An(i)||bn(i))return aT(t,r,i),Sl(t,i,n,r);if(typeof i!="symbol"){if(Tn(e)){r=Object.freeze(r.concat(e));for(let s=0;s<e.items.length;++s){const o=await Sl(s,e.items[s],n,r);if(typeof o=="number")s=o-1;else{if(o===Jr)return Jr;o===Es&&(e.items.splice(s,1),s-=1)}}}else if(bn(e)){r=Object.freeze(r.concat(e));const s=await Sl("key",e.key,n,r);if(s===Jr)return Jr;s===Es&&(e.key=null);const o=await Sl("value",e.value,n,r);if(o===Jr)return Jr;o===Es&&(e.value=null)}}return i}function sT(t){return typeof t=="object"&&(t.Collection||t.Node||t.Value)?Object.assign({Alias:t.Node,Map:t.Node,Scalar:t.Node,Seq:t.Node},t.Value&&{Map:t.Value,Scalar:t.Value,Seq:t.Value},t.Collection&&{Map:t.Collection,Seq:t.Collection},t):t}function oT(t,e,n,r){if(typeof n=="function")return n(t,e,r);if(Rc(e))return n.Map?.(t,e,r);if(Dc(e))return n.Seq?.(t,e,r);if(bn(e))return n.Pair?.(t,e,r);if(rn(e))return n.Scalar?.(t,e,r);if(Ja(e))return n.Alias?.(t,e,r)}function aT(t,e,n){const r=e[e.length-1];if(Tn(r))r.items[t]=n;else if(bn(r))t==="key"?r.key=n:r.value=n;else if(Za(r))r.contents=n;else{const i=Ja(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}const vz={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},bz=t=>t.replace(/[!,[\]{}]/g,e=>vz[e]);class Fr{constructor(e,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},Fr.defaultYaml,e),this.tags=Object.assign({},Fr.defaultTags,n)}clone(){const e=new Fr(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new Fr(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:Fr.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},Fr.defaultTags);break}return e}add(e,n){this.atNextDocument&&(this.yaml={explicit:Fr.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},Fr.defaultTags),this.atNextDocument=!1);const r=e.trim().split(/[ \t]+/),i=r.shift();switch(i){case"%TAG":{if(r.length!==2&&(n(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;const[s,o]=r;return this.tags[s]=o,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return n(0,"%YAML directive should contain exactly one part"),!1;const[s]=r;if(s==="1.1"||s==="1.2")return this.yaml.version=s,!0;{const o=/^\d+\.\d+$/.test(s);return n(6,`Unsupported YAML version ${s}`,o),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(e,n){if(e==="!")return"!";if(e[0]!=="!")return n(`Not a valid tag: ${e}`),null;if(e[1]==="<"){const o=e.slice(2,-1);return o==="!"||o==="!!"?(n(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&n("Verbatim tags must end with a >"),o)}const[,r,i]=e.match(/^(.*!)([^!]*)$/s);i||n(`The ${e} tag has no suffix`);const s=this.tags[r];if(s)try{return s+decodeURIComponent(i)}catch(o){return n(String(o)),null}return r==="!"?e:(n(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[n,r]of Object.entries(this.tags))if(e.startsWith(r))return n+bz(e.substring(r.length));return e[0]==="!"?e:`!<${e}>`}toString(e){const n=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags);let i;if(e&&r.length>0&&An(e.contents)){const s={};Uo(e.contents,(o,a)=>{An(a)&&a.tag&&(s[a.tag]=!0)}),i=Object.keys(s)}else i=[];for(const[s,o]of r)s==="!!"&&o==="tag:yaml.org,2002:"||(!e||i.some(a=>a.startsWith(o)))&&n.push(`%TAG ${s} ${o}`);return n.join(`
253
- `)}}Fr.defaultYaml={explicit:!1,version:"1.2"};Fr.defaultTags={"!!":"tag:yaml.org,2002:"};function lT(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){const n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(t)}`;throw new Error(n)}return!0}function cT(t){const e=new Set;return Uo(t,{Value(n,r){r.anchor&&e.add(r.anchor)}}),e}function uT(t,e){for(let n=1;;++n){const r=`${t}${n}`;if(!e.has(r))return r}}function _z(t,e){const n=[],r=new Map;let i=null;return{onAnchor:s=>{n.push(s),i||(i=cT(t));const o=uT(e,i);return i.add(o),o},setAnchors:()=>{for(const s of n){const o=r.get(s);if(typeof o=="object"&&o.anchor&&(rn(o.node)||Tn(o.node)))o.node.anchor=o.anchor;else{const a=new Error("Failed to resolve repeated object (this should not happen)");throw a.source=s,a}}},sourceObjects:r}}function El(t,e,n,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let i=0,s=r.length;i<s;++i){const o=r[i],a=El(t,r,String(i),o);a===void 0?delete r[i]:a!==o&&(r[i]=a)}else if(r instanceof Map)for(const i of Array.from(r.keys())){const s=r.get(i),o=El(t,r,i,s);o===void 0?r.delete(i):o!==s&&r.set(i,o)}else if(r instanceof Set)for(const i of Array.from(r)){const s=El(t,r,i,i);s===void 0?r.delete(i):s!==i&&(r.delete(i),r.add(s))}else for(const[i,s]of Object.entries(r)){const o=El(t,r,i,s);o===void 0?delete r[i]:o!==s&&(r[i]=o)}return t.call(e,n,r)}function Pi(t,e,n){if(Array.isArray(t))return t.map((r,i)=>Pi(r,String(i),n));if(t&&typeof t.toJSON=="function"){if(!n||!mz(t))return t.toJSON(e,n);const r={aliasCount:0,count:1,res:void 0};n.anchors.set(t,r),n.onCreate=s=>{r.res=s,delete n.onCreate};const i=t.toJSON(e,n);return n.onCreate&&n.onCreate(i),i}return typeof t=="bigint"&&!n?.keep?Number(t):t}class c_{constructor(e){Object.defineProperty(this,Ii,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:n,maxAliasCount:r,onAnchor:i,reviver:s}={}){if(!Za(e))throw new TypeError("A document argument is required");const o={anchors:new Map,doc:e,keep:!0,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},a=Pi(this,"",o);if(typeof i=="function")for(const{count:c,res:u}of o.anchors.values())i(u,c);return typeof s=="function"?El(s,{"":a},"",a):a}}class Op extends c_{constructor(e){super(l_),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let n;return Uo(e,{Node:(r,i)=>{if(i===this)return Uo.BREAK;i.anchor===this.source&&(n=i)}}),n}toJSON(e,n){if(!n)return{source:this.source};const{anchors:r,doc:i,maxAliasCount:s}=n,o=this.resolve(i);if(!o){const c=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(c)}let a=r.get(o);if(a||(Pi(o,null,n),a=r.get(o)),!a||a.res===void 0){const c="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(c)}if(s>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=Lf(i,o,r)),a.count*a.aliasCount>s)){const c="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(c)}return a.res}toString(e,n,r){const i=`*${this.source}`;if(e){if(lT(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(s)}if(e.implicitKey)return`${i} `}return i}}function Lf(t,e,n){if(Ja(e)){const r=e.resolve(t),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}else if(Tn(e)){let r=0;for(const i of e.items){const s=Lf(t,i,n);s>r&&(r=s)}return r}else if(bn(e)){const r=Lf(t,e.key,n),i=Lf(t,e.value,n);return Math.max(r,i)}return 1}const dT=t=>!t||typeof t!="function"&&typeof t!="object";class _t extends c_{constructor(e){super(Os),this.value=e}toJSON(e,n){return n?.keep?this.value:Pi(this.value,e,n)}toString(){return String(this.value)}}_t.BLOCK_FOLDED="BLOCK_FOLDED";_t.BLOCK_LITERAL="BLOCK_LITERAL";_t.PLAIN="PLAIN";_t.QUOTE_DOUBLE="QUOTE_DOUBLE";_t.QUOTE_SINGLE="QUOTE_SINGLE";const yz="tag:yaml.org,2002:";function wz(t,e,n){if(e){const r=n.filter(s=>s.tag===e),i=r.find(s=>!s.format)??r[0];if(!i)throw new Error(`Tag ${e} not found`);return i}return n.find(r=>r.identify?.(t)&&!r.format)}function Ju(t,e,n){if(Za(t)&&(t=t.contents),An(t))return t;if(bn(t)){const f=n.schema[Io].createNode?.(n.schema,null,n);return f.items.push(t),f}(t instanceof String||t instanceof Number||t instanceof Boolean||typeof BigInt<"u"&&t instanceof BigInt)&&(t=t.valueOf());const{aliasDuplicateObjects:r,onAnchor:i,onTagObj:s,schema:o,sourceObjects:a}=n;let c;if(r&&t&&typeof t=="object"){if(c=a.get(t),c)return c.anchor||(c.anchor=i(t)),new Op(c.anchor);c={anchor:null,node:null},a.set(t,c)}e?.startsWith("!!")&&(e=yz+e.slice(2));let u=wz(t,e,o.tags);if(!u){if(t&&typeof t.toJSON=="function"&&(t=t.toJSON()),!t||typeof t!="object"){const f=new _t(t);return c&&(c.node=f),f}u=t instanceof Map?o[Io]:Symbol.iterator in Object(t)?o[Ic]:o[Io]}s&&(s(u),delete n.onTagObj);const d=u?.createNode?u.createNode(n.schema,t,n):typeof u?.nodeClass?.from=="function"?u.nodeClass.from(n.schema,t,n):new _t(t);return e?d.tag=e:u.default||(d.tag=u.tag),c&&(c.node=d),d}function Ph(t,e,n){let r=n;for(let i=e.length-1;i>=0;--i){const s=e[i];if(typeof s=="number"&&Number.isInteger(s)&&s>=0){const o=[];o[s]=r,r=o}else r=new Map([[s,r]])}return Ju(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:t,sourceObjects:new Map})}const hu=t=>t==null||typeof t=="object"&&!!t[Symbol.iterator]().next().done;class fT extends c_{constructor(e,n){super(e),Object.defineProperty(this,"schema",{value:n,configurable:!0,enumerable:!1,writable:!0})}clone(e){const n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(n.schema=e),n.items=n.items.map(r=>An(r)||bn(r)?r.clone(e):r),this.range&&(n.range=this.range.slice()),n}addIn(e,n){if(hu(e))this.add(n);else{const[r,...i]=e,s=this.get(r,!0);if(Tn(s))s.addIn(i,n);else if(s===void 0&&this.schema)this.set(r,Ph(this.schema,i,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}}deleteIn(e){const[n,...r]=e;if(r.length===0)return this.delete(n);const i=this.get(n,!0);if(Tn(i))return i.deleteIn(r);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}getIn(e,n){const[r,...i]=e,s=this.get(r,!0);return i.length===0?!n&&rn(s)?s.value:s:Tn(s)?s.getIn(i,n):void 0}hasAllNullValues(e){return this.items.every(n=>{if(!bn(n))return!1;const r=n.value;return r==null||e&&rn(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(e){const[n,...r]=e;if(r.length===0)return this.has(n);const i=this.get(n,!0);return Tn(i)?i.hasIn(r):!1}setIn(e,n){const[r,...i]=e;if(i.length===0)this.set(r,n);else{const s=this.get(r,!0);if(Tn(s))s.setIn(i,n);else if(s===void 0&&this.schema)this.set(r,Ph(this.schema,i,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}}}const xz=t=>t.replace(/^(?!$)(?: $)?/gm,"#");function Xs(t,e){return/^\n+$/.test(t)?t.substring(1):e?t.replace(/^(?! *$)/gm,e):t}const ha=(t,e,n)=>t.endsWith(`
251
+ `+this.renderer.text(a);n?r+=this.renderer.paragraph({type:"paragraph",raw:c,text:c,tokens:[{type:"text",raw:c,text:c,escaped:!0}]}):r+=c;continue}default:{const a='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return r}parseInline(e,n=this.renderer){let r="";for(let i=0;i<e.length;i++){const s=e[i];if(this.options.extensions?.renderers?.[s.type]){const a=this.options.extensions.renderers[s.type].call({parser:this},s);if(a!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){r+=a||"";continue}}const o=s;switch(o.type){case"escape":{r+=n.text(o);break}case"html":{r+=n.html(o);break}case"link":{r+=n.link(o);break}case"image":{r+=n.image(o);break}case"strong":{r+=n.strong(o);break}case"em":{r+=n.em(o);break}case"codespan":{r+=n.codespan(o);break}case"br":{r+=n.br(o);break}case"del":{r+=n.del(o);break}case"text":{r+=n.text(o);break}default:{const a='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return r}}class $f{options;block;constructor(e){this.options=e||Ya}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?ki.lex:ki.lexInline}provideParser(){return this.block?Si.parse:Si.parseInline}}class u3{defaults=Qb();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Si;Renderer=Ah;TextRenderer=a_;Lexer=ki;Tokenizer=Ch;Hooks=$f;constructor(...e){this.use(...e)}walkTokens(e,n){let r=[];for(const i of e)switch(r=r.concat(n.call(this,i)),i.type){case"table":{const s=i;for(const o of s.header)r=r.concat(this.walkTokens(o.tokens,n));for(const o of s.rows)for(const a of o)r=r.concat(this.walkTokens(a.tokens,n));break}case"list":{const s=i;r=r.concat(this.walkTokens(s.items,n));break}default:{const s=i;this.defaults.extensions?.childTokens?.[s.type]?this.defaults.extensions.childTokens[s.type].forEach(o=>{const a=s[o].flat(1/0);r=r.concat(this.walkTokens(a,n))}):s.tokens&&(r=r.concat(this.walkTokens(s.tokens,n)))}}return r}use(...e){const n=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(r=>{const i={...r};if(i.async=this.defaults.async||i.async||!1,r.extensions&&(r.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){const o=n.renderers[s.name];o?n.renderers[s.name]=function(...a){let c=s.renderer.apply(this,a);return c===!1&&(c=o.apply(this,a)),c}:n.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const o=n[s.level];o?o.unshift(s.tokenizer):n[s.level]=[s.tokenizer],s.start&&(s.level==="block"?n.startBlock?n.startBlock.push(s.start):n.startBlock=[s.start]:s.level==="inline"&&(n.startInline?n.startInline.push(s.start):n.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(n.childTokens[s.name]=s.childTokens)}),i.extensions=n),r.renderer){const s=this.defaults.renderer||new Ah(this.defaults);for(const o in r.renderer){if(!(o in s))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;const a=o,c=r.renderer[a],u=s[a];s[a]=(...d)=>{let f=c.apply(s,d);return f===!1&&(f=u.apply(s,d)),f||""}}i.renderer=s}if(r.tokenizer){const s=this.defaults.tokenizer||new Ch(this.defaults);for(const o in r.tokenizer){if(!(o in s))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;const a=o,c=r.tokenizer[a],u=s[a];s[a]=(...d)=>{let f=c.apply(s,d);return f===!1&&(f=u.apply(s,d)),f}}i.tokenizer=s}if(r.hooks){const s=this.defaults.hooks||new $f;for(const o in r.hooks){if(!(o in s))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;const a=o,c=r.hooks[a],u=s[a];$f.passThroughHooks.has(o)?s[a]=d=>{if(this.defaults.async)return Promise.resolve(c.call(s,d)).then(h=>u.call(s,h));const f=c.call(s,d);return u.call(s,f)}:s[a]=(...d)=>{let f=c.apply(s,d);return f===!1&&(f=u.apply(s,d)),f}}i.hooks=s}if(r.walkTokens){const s=this.defaults.walkTokens,o=r.walkTokens;i.walkTokens=function(a){let c=[];return c.push(o.call(this,a)),s&&(c=c.concat(s.call(this,a))),c}}this.defaults={...this.defaults,...i}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,n){return ki.lex(e,n??this.defaults)}parser(e,n){return Si.parse(e,n??this.defaults)}parseMarkdown(e){return(r,i)=>{const s={...i},o={...this.defaults,...s},a=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&s.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=e);const c=o.hooks?o.hooks.provideLexer():e?ki.lex:ki.lexInline,u=o.hooks?o.hooks.provideParser():e?Si.parse:Si.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(r):r).then(d=>c(d,o)).then(d=>o.hooks?o.hooks.processAllTokens(d):d).then(d=>o.walkTokens?Promise.all(this.walkTokens(d,o.walkTokens)).then(()=>d):d).then(d=>u(d,o)).then(d=>o.hooks?o.hooks.postprocess(d):d).catch(a);try{o.hooks&&(r=o.hooks.preprocess(r));let d=c(r,o);o.hooks&&(d=o.hooks.processAllTokens(d)),o.walkTokens&&this.walkTokens(d,o.walkTokens);let f=u(d,o);return o.hooks&&(f=o.hooks.postprocess(f)),f}catch(d){return a(d)}}}onError(e,n){return r=>{if(r.message+=`
252
+ Please report this to https://github.com/markedjs/marked.`,e){const i="<p>An error occurred:</p><pre>"+fs(r.message+"",!0)+"</pre>";return n?Promise.resolve(i):i}if(n)return Promise.reject(r);throw r}}}const Ma=new u3;function Ot(t,e){return Ma.parse(t,e)}Ot.options=Ot.setOptions=function(t){return Ma.setOptions(t),Ot.defaults=Ma.defaults,qE(Ot.defaults),Ot};Ot.getDefaults=Qb;Ot.defaults=Ya;Ot.use=function(...t){return Ma.use(...t),Ot.defaults=Ma.defaults,qE(Ot.defaults),Ot};Ot.walkTokens=function(t,e){return Ma.walkTokens(t,e)};Ot.parseInline=Ma.parseInline;Ot.Parser=Si;Ot.parser=Si.parse;Ot.Renderer=Ah;Ot.TextRenderer=a_;Ot.Lexer=ki;Ot.lexer=ki.lex;Ot.Tokenizer=Ch;Ot.Hooks=$f;Ot.parse=Ot;Ot.options;Ot.setOptions;Ot.use;Ot.walkTokens;const d3=Ot.parseInline;Si.parse;ki.lex;class jo{#t;#n="";#e="";#o={};#i=[];constructor(e,n,{keyPath:r,autoIncrement:i,indexes:s=[]}={}){this.#t=void 0,this.#n=e,this.#e=n,this.#o={keyPath:r,autoIncrement:i},this.#i=s}async#a(e){return new Promise(n=>{const r=globalThis.indexedDB.open(this.#n,e);r.onupgradeneeded=()=>{const i=r.result,s=this.#e,o=i.objectStoreNames.contains(s)?i.transaction(s,"readwrite").objectStore(s):i.createObjectStore(s,this.#o);this.#i.forEach(({name:a,keyPath:c,options:u})=>{o.indexNames.contains(a)||o.createIndex(a,c,u)})},r.onsuccess=()=>{n(r.result)}})}async#l(){let e=!1,n=await this.#a();const{version:r,objectStoreNames:i}=n,s=this.#e;if(i.contains(s)){const o=n.transaction(s).objectStore(s);e=this.#i.some(({name:a})=>!o.indexNames.contains(a))}else e=!0;return e&&(n.close(),n=await this.#a(r+1)),n.onversionchange=()=>{n.close(),this.#t=void 0},n}async#r(e){this.#t??=await this.#l();const n=this.#t,r=this.#e,i=n.transaction(r,"readwrite"),s=e(i.objectStore(r));return s?new Promise(o=>{s.onsuccess=()=>{o(s.result)}}):new Promise(o=>{i.oncomplete=()=>{o(void 0)}})}async set(e,n){return this.#r(r=>r.put(n,e))}async put(e){return this.#r(n=>n.put(e))}async saveEntries(e){return this.#r(n=>{e.forEach(([r,i])=>{n.put(i,r)})})}async get(e){return this.#r(n=>n.get(e))}async keys(){return this.#r(e=>e.getAllKeys())}async values(){return this.#r(e=>e.getAll())}async entries(){const[e,n]=await Promise.all([this.keys(),this.values()]);return e.map((r,i)=>[r,n[i]])}async#s({callback:e=void 0,index:n=void 0,query:r=void 0,direction:i="next",multiple:s=!1}){return new Promise(o=>{this.#r(a=>{const c=(n?a.index(n):a).openCursor(r,i),u=[];c.onsuccess=()=>{const d=c.result;if(d){const{value:f}=d;typeof e!="function"||e(f)?s?(u.push(f),d.continue()):o(f):d.continue()}else o(s?u:void 0)}})})}async find(e,{index:n,query:r}={}){return this.#s({callback:e,index:n,query:r})}async findLast(e,{index:n,query:r}={}){return this.#s({callback:e,index:n,query:r,direction:"prev"})}async filter(e,{index:n,query:r}={}){return this.#s({callback:e,index:n,query:r,multiple:!0})}async delete(e){await this.#r(n=>n.delete(e))}async deleteEntries(e){await this.#r(n=>{e.forEach(r=>{n.delete(r)})})}async clear(){await this.#r(e=>e.clear())}}class ti{static async set(e,n){globalThis.localStorage.setItem(e,JSON.stringify(n))}static async get(e){const n=globalThis.localStorage.getItem(e);return n?JSON.parse(n):null}static async delete(e){globalThis.localStorage.removeItem(e)}static async clear(){globalThis.localStorage.clear()}static async keys(){return Object.keys(globalThis.localStorage)}static async values(){return Object.values(globalThis.localStorage).map(e=>JSON.parse(e))}static async entries(){return Object.entries(globalThis.localStorage).map(([e,n])=>[e,JSON.parse(n)])}}const eT=st(!1),tT=async({backendName:t,authURL:e})=>{const{availHeight:i,availWidth:s}=window.screen,o=i/2-800/2,a=s/2-600/2,c=window.open(e,"auth",`width=600,height=800,top=${o},left=${a}`);return new Promise((u,d)=>{const f=t==="github"?setInterval(()=>{c?.closed&&(clearInterval(f),d(Object.assign(new Error("Authentication aborted"),{name:"AbortError"})))},1e3):0,h=({origin:p,data:g})=>{if(p!==new URL(e).origin||typeof g!="string")return;const m=t;if(g===`authorizing:${m}`){c?.postMessage(g,p);return}const{result:v}=g.match(`^authorization:${m}:(success|error):(?<result>.+)`)?.groups??{};let _;try{_=v?JSON.parse(v):{error:"No data"}}catch{_={error:"Malformed data"}}typeof _.token=="string"?u(_.token):d(new Error("Authentication failed",{cause:new Error(_.errorCode?ne(le)(`sign_in_error.${_.errorCode}`,{default:_.error}):_.error)})),window.removeEventListener("message",h),clearInterval(f),c?.close()};window.addEventListener("message",h)})},nT=async({backendName:t,siteDomain:e,authURL:n,scope:r})=>{try{new URL(n).origin==="https://api.netlify.com"&&(e=new URL(`https://${e}`).hostname)}catch{}const i=new URLSearchParams({provider:t,site_id:e,scope:r});return tT({backendName:t,authURL:`${n}?${i.toString()}`})},f3=async()=>{const t=`${wm()}${wm()}`,e=btoa(await Pa(t,{algorithm:"SHA-256",format:"binary"})).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"");return{csrfToken:Gn().replaceAll("-",""),codeVerifier:t,codeChallenge:e}},h3=async({backendName:t,clientId:e,authURL:n,scope:r})=>{const{csrfToken:i,codeVerifier:s,codeChallenge:o}=await f3(),{origin:a,pathname:c}=window.location,u=`${a}${c}`,d=new URLSearchParams({client_id:e,redirect_uri:u,response_type:"code",state:i,scope:r,code_challenge:o,code_challenge_method:"S256"});return await ti.set("sveltia-cms.auth",{csrfToken:i,codeVerifier:s,realAuthURL:`${n}?${d.toString()}`}),await ti.set("sveltia-cms.user",{backendName:t}),tT({backendName:t,authURL:u})},df=({provider:t="unknown",token:e,error:n,errorCode:r})=>{const i=n?"error":"success",s=n?{provider:t,error:n,errorCode:r}:{provider:t,token:e};window.addEventListener("message",({data:o,origin:a})=>{o===`authorizing:${t}`&&window.opener?.postMessage(`authorization:${t}:${i}:${JSON.stringify(s)}`,a)}),window.opener?.postMessage(`authorizing:${t}`,"*")},p3=async({backendName:t,clientId:e,authURL:n,code:r,state:i})=>{const{origin:s,pathname:o}=new URL(window.location.href),{csrfToken:a,codeVerifier:c}=await ti.get("sveltia-cms.auth")??{},u=t,d=`${s}${o}`;if(await ti.delete("sveltia-cms.auth"),!a||!c||i!==a)return df({provider:u,error:ne(le)("sign_in_error.CSRF_DETECTED"),errorCode:"CSRF_DETECTED"});let f,h="",p="";try{f=await fetch(n,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({client_id:e,code:r,grant_type:"authorization_code",redirect_uri:d,code_verifier:c})})}catch{}if(!f)return df({provider:u,error:ne(le)("sign_in_error.TOKEN_REQUEST_FAILED"),errorCode:"TOKEN_REQUEST_FAILED"});try{({access_token:h,error:p}=await f.json())}catch{return df({provider:u,error:ne(le)("sign_in_error.MALFORMED_RESPONSE"),errorCode:"MALFORMED_RESPONSE"})}return df({provider:u,token:h,error:p})},g3=async({backendName:t,clientId:e,authURL:n})=>{eT.set(!0);const{search:r}=window.location,{code:i,state:s}=Object.fromEntries(new URLSearchParams(r));if(i&&s)await p3({backendName:t,clientId:e,authURL:n,code:i,state:s});else{const{realAuthURL:o}=await ti.get("sveltia-cms.auth")??{};o&&(window.location.href=o)}},l_=Symbol.for("yaml.alias"),uv=Symbol.for("yaml.document"),Io=Symbol.for("yaml.map"),rT=Symbol.for("yaml.pair"),Os=Symbol.for("yaml.scalar"),Ic=Symbol.for("yaml.seq"),Ii=Symbol.for("yaml.node.type"),Ja=t=>!!t&&typeof t=="object"&&t[Ii]===l_,Za=t=>!!t&&typeof t=="object"&&t[Ii]===uv,Rc=t=>!!t&&typeof t=="object"&&t[Ii]===Io,bn=t=>!!t&&typeof t=="object"&&t[Ii]===rT,rn=t=>!!t&&typeof t=="object"&&t[Ii]===Os,Dc=t=>!!t&&typeof t=="object"&&t[Ii]===Ic;function Tn(t){if(t&&typeof t=="object")switch(t[Ii]){case Io:case Ic:return!0}return!1}function An(t){if(t&&typeof t=="object")switch(t[Ii]){case l_:case Io:case Os:case Ic:return!0}return!1}const m3=t=>(rn(t)||Tn(t))&&!!t.anchor,Jr=Symbol("break visit"),iT=Symbol("skip children"),Es=Symbol("remove node");function Uo(t,e){const n=sT(e);Za(t)?kl(null,t.contents,n,Object.freeze([t]))===Es&&(t.contents=null):kl(null,t,n,Object.freeze([]))}Uo.BREAK=Jr;Uo.SKIP=iT;Uo.REMOVE=Es;function kl(t,e,n,r){const i=oT(t,e,n,r);if(An(i)||bn(i))return aT(t,r,i),kl(t,i,n,r);if(typeof i!="symbol"){if(Tn(e)){r=Object.freeze(r.concat(e));for(let s=0;s<e.items.length;++s){const o=kl(s,e.items[s],n,r);if(typeof o=="number")s=o-1;else{if(o===Jr)return Jr;o===Es&&(e.items.splice(s,1),s-=1)}}}else if(bn(e)){r=Object.freeze(r.concat(e));const s=kl("key",e.key,n,r);if(s===Jr)return Jr;s===Es&&(e.key=null);const o=kl("value",e.value,n,r);if(o===Jr)return Jr;o===Es&&(e.value=null)}}return i}async function Pp(t,e){const n=sT(e);Za(t)?await Sl(null,t.contents,n,Object.freeze([t]))===Es&&(t.contents=null):await Sl(null,t,n,Object.freeze([]))}Pp.BREAK=Jr;Pp.SKIP=iT;Pp.REMOVE=Es;async function Sl(t,e,n,r){const i=await oT(t,e,n,r);if(An(i)||bn(i))return aT(t,r,i),Sl(t,i,n,r);if(typeof i!="symbol"){if(Tn(e)){r=Object.freeze(r.concat(e));for(let s=0;s<e.items.length;++s){const o=await Sl(s,e.items[s],n,r);if(typeof o=="number")s=o-1;else{if(o===Jr)return Jr;o===Es&&(e.items.splice(s,1),s-=1)}}}else if(bn(e)){r=Object.freeze(r.concat(e));const s=await Sl("key",e.key,n,r);if(s===Jr)return Jr;s===Es&&(e.key=null);const o=await Sl("value",e.value,n,r);if(o===Jr)return Jr;o===Es&&(e.value=null)}}return i}function sT(t){return typeof t=="object"&&(t.Collection||t.Node||t.Value)?Object.assign({Alias:t.Node,Map:t.Node,Scalar:t.Node,Seq:t.Node},t.Value&&{Map:t.Value,Scalar:t.Value,Seq:t.Value},t.Collection&&{Map:t.Collection,Seq:t.Collection},t):t}function oT(t,e,n,r){if(typeof n=="function")return n(t,e,r);if(Rc(e))return n.Map?.(t,e,r);if(Dc(e))return n.Seq?.(t,e,r);if(bn(e))return n.Pair?.(t,e,r);if(rn(e))return n.Scalar?.(t,e,r);if(Ja(e))return n.Alias?.(t,e,r)}function aT(t,e,n){const r=e[e.length-1];if(Tn(r))r.items[t]=n;else if(bn(r))t==="key"?r.key=n:r.value=n;else if(Za(r))r.contents=n;else{const i=Ja(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}const v3={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},b3=t=>t.replace(/[!,[\]{}]/g,e=>v3[e]);class Fr{constructor(e,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},Fr.defaultYaml,e),this.tags=Object.assign({},Fr.defaultTags,n)}clone(){const e=new Fr(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new Fr(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:Fr.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},Fr.defaultTags);break}return e}add(e,n){this.atNextDocument&&(this.yaml={explicit:Fr.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},Fr.defaultTags),this.atNextDocument=!1);const r=e.trim().split(/[ \t]+/),i=r.shift();switch(i){case"%TAG":{if(r.length!==2&&(n(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;const[s,o]=r;return this.tags[s]=o,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return n(0,"%YAML directive should contain exactly one part"),!1;const[s]=r;if(s==="1.1"||s==="1.2")return this.yaml.version=s,!0;{const o=/^\d+\.\d+$/.test(s);return n(6,`Unsupported YAML version ${s}`,o),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(e,n){if(e==="!")return"!";if(e[0]!=="!")return n(`Not a valid tag: ${e}`),null;if(e[1]==="<"){const o=e.slice(2,-1);return o==="!"||o==="!!"?(n(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&n("Verbatim tags must end with a >"),o)}const[,r,i]=e.match(/^(.*!)([^!]*)$/s);i||n(`The ${e} tag has no suffix`);const s=this.tags[r];if(s)try{return s+decodeURIComponent(i)}catch(o){return n(String(o)),null}return r==="!"?e:(n(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[n,r]of Object.entries(this.tags))if(e.startsWith(r))return n+b3(e.substring(r.length));return e[0]==="!"?e:`!<${e}>`}toString(e){const n=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags);let i;if(e&&r.length>0&&An(e.contents)){const s={};Uo(e.contents,(o,a)=>{An(a)&&a.tag&&(s[a.tag]=!0)}),i=Object.keys(s)}else i=[];for(const[s,o]of r)s==="!!"&&o==="tag:yaml.org,2002:"||(!e||i.some(a=>a.startsWith(o)))&&n.push(`%TAG ${s} ${o}`);return n.join(`
253
+ `)}}Fr.defaultYaml={explicit:!1,version:"1.2"};Fr.defaultTags={"!!":"tag:yaml.org,2002:"};function lT(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){const n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(t)}`;throw new Error(n)}return!0}function cT(t){const e=new Set;return Uo(t,{Value(n,r){r.anchor&&e.add(r.anchor)}}),e}function uT(t,e){for(let n=1;;++n){const r=`${t}${n}`;if(!e.has(r))return r}}function _3(t,e){const n=[],r=new Map;let i=null;return{onAnchor:s=>{n.push(s),i||(i=cT(t));const o=uT(e,i);return i.add(o),o},setAnchors:()=>{for(const s of n){const o=r.get(s);if(typeof o=="object"&&o.anchor&&(rn(o.node)||Tn(o.node)))o.node.anchor=o.anchor;else{const a=new Error("Failed to resolve repeated object (this should not happen)");throw a.source=s,a}}},sourceObjects:r}}function El(t,e,n,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let i=0,s=r.length;i<s;++i){const o=r[i],a=El(t,r,String(i),o);a===void 0?delete r[i]:a!==o&&(r[i]=a)}else if(r instanceof Map)for(const i of Array.from(r.keys())){const s=r.get(i),o=El(t,r,i,s);o===void 0?r.delete(i):o!==s&&r.set(i,o)}else if(r instanceof Set)for(const i of Array.from(r)){const s=El(t,r,i,i);s===void 0?r.delete(i):s!==i&&(r.delete(i),r.add(s))}else for(const[i,s]of Object.entries(r)){const o=El(t,r,i,s);o===void 0?delete r[i]:o!==s&&(r[i]=o)}return t.call(e,n,r)}function Pi(t,e,n){if(Array.isArray(t))return t.map((r,i)=>Pi(r,String(i),n));if(t&&typeof t.toJSON=="function"){if(!n||!m3(t))return t.toJSON(e,n);const r={aliasCount:0,count:1,res:void 0};n.anchors.set(t,r),n.onCreate=s=>{r.res=s,delete n.onCreate};const i=t.toJSON(e,n);return n.onCreate&&n.onCreate(i),i}return typeof t=="bigint"&&!n?.keep?Number(t):t}class c_{constructor(e){Object.defineProperty(this,Ii,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:n,maxAliasCount:r,onAnchor:i,reviver:s}={}){if(!Za(e))throw new TypeError("A document argument is required");const o={anchors:new Map,doc:e,keep:!0,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},a=Pi(this,"",o);if(typeof i=="function")for(const{count:c,res:u}of o.anchors.values())i(u,c);return typeof s=="function"?El(s,{"":a},"",a):a}}class Op extends c_{constructor(e){super(l_),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let n;return Uo(e,{Node:(r,i)=>{if(i===this)return Uo.BREAK;i.anchor===this.source&&(n=i)}}),n}toJSON(e,n){if(!n)return{source:this.source};const{anchors:r,doc:i,maxAliasCount:s}=n,o=this.resolve(i);if(!o){const c=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(c)}let a=r.get(o);if(a||(Pi(o,null,n),a=r.get(o)),!a||a.res===void 0){const c="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(c)}if(s>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=Lf(i,o,r)),a.count*a.aliasCount>s)){const c="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(c)}return a.res}toString(e,n,r){const i=`*${this.source}`;if(e){if(lT(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(s)}if(e.implicitKey)return`${i} `}return i}}function Lf(t,e,n){if(Ja(e)){const r=e.resolve(t),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}else if(Tn(e)){let r=0;for(const i of e.items){const s=Lf(t,i,n);s>r&&(r=s)}return r}else if(bn(e)){const r=Lf(t,e.key,n),i=Lf(t,e.value,n);return Math.max(r,i)}return 1}const dT=t=>!t||typeof t!="function"&&typeof t!="object";class _t extends c_{constructor(e){super(Os),this.value=e}toJSON(e,n){return n?.keep?this.value:Pi(this.value,e,n)}toString(){return String(this.value)}}_t.BLOCK_FOLDED="BLOCK_FOLDED";_t.BLOCK_LITERAL="BLOCK_LITERAL";_t.PLAIN="PLAIN";_t.QUOTE_DOUBLE="QUOTE_DOUBLE";_t.QUOTE_SINGLE="QUOTE_SINGLE";const y3="tag:yaml.org,2002:";function w3(t,e,n){if(e){const r=n.filter(s=>s.tag===e),i=r.find(s=>!s.format)??r[0];if(!i)throw new Error(`Tag ${e} not found`);return i}return n.find(r=>r.identify?.(t)&&!r.format)}function Ju(t,e,n){if(Za(t)&&(t=t.contents),An(t))return t;if(bn(t)){const f=n.schema[Io].createNode?.(n.schema,null,n);return f.items.push(t),f}(t instanceof String||t instanceof Number||t instanceof Boolean||typeof BigInt<"u"&&t instanceof BigInt)&&(t=t.valueOf());const{aliasDuplicateObjects:r,onAnchor:i,onTagObj:s,schema:o,sourceObjects:a}=n;let c;if(r&&t&&typeof t=="object"){if(c=a.get(t),c)return c.anchor||(c.anchor=i(t)),new Op(c.anchor);c={anchor:null,node:null},a.set(t,c)}e?.startsWith("!!")&&(e=y3+e.slice(2));let u=w3(t,e,o.tags);if(!u){if(t&&typeof t.toJSON=="function"&&(t=t.toJSON()),!t||typeof t!="object"){const f=new _t(t);return c&&(c.node=f),f}u=t instanceof Map?o[Io]:Symbol.iterator in Object(t)?o[Ic]:o[Io]}s&&(s(u),delete n.onTagObj);const d=u?.createNode?u.createNode(n.schema,t,n):typeof u?.nodeClass?.from=="function"?u.nodeClass.from(n.schema,t,n):new _t(t);return e?d.tag=e:u.default||(d.tag=u.tag),c&&(c.node=d),d}function Ph(t,e,n){let r=n;for(let i=e.length-1;i>=0;--i){const s=e[i];if(typeof s=="number"&&Number.isInteger(s)&&s>=0){const o=[];o[s]=r,r=o}else r=new Map([[s,r]])}return Ju(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:t,sourceObjects:new Map})}const hu=t=>t==null||typeof t=="object"&&!!t[Symbol.iterator]().next().done;class fT extends c_{constructor(e,n){super(e),Object.defineProperty(this,"schema",{value:n,configurable:!0,enumerable:!1,writable:!0})}clone(e){const n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(n.schema=e),n.items=n.items.map(r=>An(r)||bn(r)?r.clone(e):r),this.range&&(n.range=this.range.slice()),n}addIn(e,n){if(hu(e))this.add(n);else{const[r,...i]=e,s=this.get(r,!0);if(Tn(s))s.addIn(i,n);else if(s===void 0&&this.schema)this.set(r,Ph(this.schema,i,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}}deleteIn(e){const[n,...r]=e;if(r.length===0)return this.delete(n);const i=this.get(n,!0);if(Tn(i))return i.deleteIn(r);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}getIn(e,n){const[r,...i]=e,s=this.get(r,!0);return i.length===0?!n&&rn(s)?s.value:s:Tn(s)?s.getIn(i,n):void 0}hasAllNullValues(e){return this.items.every(n=>{if(!bn(n))return!1;const r=n.value;return r==null||e&&rn(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(e){const[n,...r]=e;if(r.length===0)return this.has(n);const i=this.get(n,!0);return Tn(i)?i.hasIn(r):!1}setIn(e,n){const[r,...i]=e;if(i.length===0)this.set(r,n);else{const s=this.get(r,!0);if(Tn(s))s.setIn(i,n);else if(s===void 0&&this.schema)this.set(r,Ph(this.schema,i,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}}}const x3=t=>t.replace(/^(?!$)(?: $)?/gm,"#");function Xs(t,e){return/^\n+$/.test(t)?t.substring(1):e?t.replace(/^(?! *$)/gm,e):t}const ha=(t,e,n)=>t.endsWith(`
254
254
  `)?Xs(n,e):n.includes(`
255
255
  `)?`
256
256
  `+Xs(n,e):(t.endsWith(" ")?"":" ")+n,hT="flow",dv="block",Nf="quoted";function $p(t,e,n="flow",{indentAtStart:r,lineWidth:i=80,minContentWidth:s=20,onFold:o,onOverflow:a}={}){if(!i||i<0)return t;i<s&&(s=0);const c=Math.max(1+s,1+i-e.length);if(t.length<=c)return t;const u=[],d={};let f=i-e.length;typeof r=="number"&&(r>i-Math.max(2,s)?u.push(0):f=i-r);let h,p,g=!1,m=-1,v=-1,_=-1;n===dv&&(m=y0(t,m,e.length),m!==-1&&(f=m+c));for(let y;y=t[m+=1];){if(n===Nf&&y==="\\"){switch(v=m,t[m+1]){case"x":m+=3;break;case"u":m+=5;break;case"U":m+=9;break;default:m+=1}_=m}if(y===`
@@ -259,7 +259,7 @@ Please report this to https://github.com/markedjs/marked.`,e){const i="<p>An err
259
259
  `&&x!==" "&&(h=m)}if(m>=f)if(h)u.push(h),f=h+c,h=void 0;else if(n===Nf){for(;p===" "||p===" ";)p=y,y=t[m+=1],g=!0;const x=m>_+1?m-2:v-1;if(d[x])return t;u.push(x),d[x]=!0,f=x+c,h=void 0}else g=!0}p=y}if(g&&a&&a(),u.length===0)return t;o&&o();let b=t.slice(0,u[0]);for(let y=0;y<u.length;++y){const x=u[y],k=u[y+1]||t.length;x===0?b=`
260
260
  ${e}${t.slice(0,k)}`:(n===Nf&&d[x]&&(b+=`${t[x]}\\`),b+=`
261
261
  ${e}${t.slice(x+1,k)}`)}return b}function y0(t,e,n){let r=e,i=e+1,s=t[i];for(;s===" "||s===" ";)if(e<i+n)s=t[++e];else{do s=t[++e];while(s&&s!==`
262
- `);r=e,i=e+1,s=t[i]}return r}const Lp=(t,e)=>({indentAtStart:e?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth}),Np=t=>/^(%|---|\.\.\.)/m.test(t);function kz(t,e,n){if(!e||e<0)return!1;const r=e-n,i=t.length;if(i<=r)return!1;for(let s=0,o=0;s<i;++s)if(t[s]===`
262
+ `);r=e,i=e+1,s=t[i]}return r}const Lp=(t,e)=>({indentAtStart:e?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth}),Np=t=>/^(%|---|\.\.\.)/m.test(t);function k3(t,e,n){if(!e||e<0)return!1;const r=e-n,i=t.length;if(i<=r)return!1;for(let s=0,o=0;s<i;++s)if(t[s]===`
263
263
  `){if(s-o>r)return!0;if(o=s+1,i-o<=r)return!1}return!0}function Tu(t,e){const n=JSON.stringify(t);if(e.options.doubleQuotedAsJSON)return n;const{implicitKey:r}=e,i=e.options.doubleQuotedMinMultiLineLength,s=e.indent||(Np(t)?" ":"");let o="",a=0;for(let c=0,u=n[c];u;u=n[++c])if(u===" "&&n[c+1]==="\\"&&n[c+2]==="n"&&(o+=n.slice(a,c)+"\\ ",c+=1,a=c,u="\\"),u==="\\")switch(n[c+1]){case"u":{o+=n.slice(a,c);const d=n.substr(c+2,4);switch(d){case"0000":o+="\\0";break;case"0007":o+="\\a";break;case"000b":o+="\\v";break;case"001b":o+="\\e";break;case"0085":o+="\\N";break;case"00a0":o+="\\_";break;case"2028":o+="\\L";break;case"2029":o+="\\P";break;default:d.substr(0,2)==="00"?o+="\\x"+d.substr(2):o+=n.substr(c,6)}c+=5,a=c+1}break;case"n":if(r||n[c+2]==='"'||n.length<i)c+=1;else{for(o+=n.slice(a,c)+`
264
264
 
265
265
  `;n[c+2]==="\\"&&n[c+3]==="n"&&n[c+4]!=='"';)o+=`
@@ -268,7 +268,7 @@ ${e}${t.slice(x+1,k)}`)}return b}function y0(t,e,n){let r=e,i=e+1,s=t[i];for(;s=
268
268
  ${n}`)+"'";return e.implicitKey?r:$p(r,n,hT,Lp(e,!1))}function Tl(t,e){const{singleQuote:n}=e.options;let r;if(n===!1)r=Tu;else{const i=t.includes('"'),s=t.includes("'");i&&!s?r=fv:s&&!i?r=Tu:r=n?fv:Tu}return r(t,e)}let hv;try{hv=new RegExp(`(^|(?<!
269
269
  ))
270
270
  +(?!
271
- |$)`,"g")}catch{hv=/\n+(?!\n|$)/g}function If({comment:t,type:e,value:n},r,i,s){const{blockQuote:o,commentString:a,lineWidth:c}=r.options;if(!o||/\n[\t ]+$/.test(n)||/^\s*$/.test(n))return Tl(n,r);const u=r.indent||(r.forceBlockIndent||Np(n)?" ":""),d=o==="literal"?!0:o==="folded"||e===_t.BLOCK_FOLDED?!1:e===_t.BLOCK_LITERAL?!0:!kz(n,c,u.length);if(!n)return d?`|
271
+ |$)`,"g")}catch{hv=/\n+(?!\n|$)/g}function If({comment:t,type:e,value:n},r,i,s){const{blockQuote:o,commentString:a,lineWidth:c}=r.options;if(!o||/\n[\t ]+$/.test(n)||/^\s*$/.test(n))return Tl(n,r);const u=r.indent||(r.forceBlockIndent||Np(n)?" ":""),d=o==="literal"?!0:o==="folded"||e===_t.BLOCK_FOLDED?!1:e===_t.BLOCK_LITERAL?!0:!k3(n,c,u.length);if(!n)return d?`|
272
272
  `:`>
273
273
  `;let f,h;for(h=n.length;h>0;--h){const k=n[h-1];if(k!==`
274
274
  `&&k!==" "&&k!==" ")break}let p=n.substring(h);const g=p.indexOf(`
@@ -277,12 +277,12 @@ ${n}`)+"'";return e.implicitKey?r:$p(r,n,hT,Lp(e,!1))}function Tl(t,e){const{sin
277
277
  `)_=v;else break}let b=n.substring(0,_<v?_+1:v);b&&(n=n.substring(b.length),b=b.replace(/\n+/g,`$&${u}`));let x=(m?u?"2":"1":"")+f;if(t&&(x+=" "+a(t.replace(/ ?[\r\n]+/g," ")),i&&i()),!d){const k=n.replace(/\n+/g,`
278
278
  $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${u}`);let S=!1;const C=Lp(r,!0);o!=="folded"&&e!==_t.BLOCK_FOLDED&&(C.onOverflow=()=>{S=!0});const E=$p(`${b}${k}${p}`,u,dv,C);if(!S)return`>${x}
279
279
  ${u}${E}`}return n=n.replace(/\n+/g,`$&${u}`),`|${x}
280
- ${u}${b}${n}${p}`}function Sz(t,e,n,r){const{type:i,value:s}=t,{actualString:o,implicitKey:a,indent:c,indentStep:u,inFlow:d}=e;if(a&&s.includes(`
280
+ ${u}${b}${n}${p}`}function S3(t,e,n,r){const{type:i,value:s}=t,{actualString:o,implicitKey:a,indent:c,indentStep:u,inFlow:d}=e;if(a&&s.includes(`
281
281
  `)||d&&/[[\]{},]/.test(s))return Tl(s,e);if(!s||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(s))return a||d||!s.includes(`
282
282
  `)?Tl(s,e):If(t,e,n,r);if(!a&&!d&&i!==_t.PLAIN&&s.includes(`
283
283
  `))return If(t,e,n,r);if(Np(s)){if(c==="")return e.forceBlockIndent=!0,If(t,e,n,r);if(a&&c===u)return Tl(s,e)}const f=s.replace(/\n+/g,`$&
284
- ${c}`);if(o){const h=m=>m.default&&m.tag!=="tag:yaml.org,2002:str"&&m.test?.test(f),{compat:p,tags:g}=e.doc.schema;if(g.some(h)||p?.some(h))return Tl(s,e)}return a?f:$p(f,c,hT,Lp(e,!1))}function Cd(t,e,n,r){const{implicitKey:i,inFlow:s}=e,o=typeof t.value=="string"?t:Object.assign({},t,{value:String(t.value)});let{type:a}=t;a!==_t.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(a=_t.QUOTE_DOUBLE);const c=d=>{switch(d){case _t.BLOCK_FOLDED:case _t.BLOCK_LITERAL:return i||s?Tl(o.value,e):If(o,e,n,r);case _t.QUOTE_DOUBLE:return Tu(o.value,e);case _t.QUOTE_SINGLE:return fv(o.value,e);case _t.PLAIN:return Sz(o,e,n,r);default:return null}};let u=c(a);if(u===null){const{defaultKeyType:d,defaultStringType:f}=e.options,h=i&&d||f;if(u=c(h),u===null)throw new Error(`Unsupported default string type ${h}`)}return u}function pT(t,e){const n=Object.assign({blockQuote:!0,commentString:xz,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},t.schema.toStringOptions,e);let r;switch(n.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:t,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:typeof n.indent=="number"?" ".repeat(n.indent):" ",inFlow:r,options:n}}function Ez(t,e){if(e.tag){const i=t.filter(s=>s.tag===e.tag);if(i.length>0)return i.find(s=>s.format===e.format)??i[0]}let n,r;if(rn(e)){r=e.value;let i=t.filter(s=>s.identify?.(r));if(i.length>1){const s=i.filter(o=>o.test);s.length>0&&(i=s)}n=i.find(s=>s.format===e.format)??i.find(s=>!s.format)}else r=e,n=t.find(i=>i.nodeClass&&r instanceof i.nodeClass);if(!n){const i=r?.constructor?.name??typeof r;throw new Error(`Tag not resolved for ${i} value`)}return n}function Tz(t,e,{anchors:n,doc:r}){if(!r.directives)return"";const i=[],s=(rn(t)||Tn(t))&&t.anchor;s&&lT(s)&&(n.add(s),i.push(`&${s}`));const o=t.tag?t.tag:e.default?null:e.tag;return o&&i.push(r.directives.tagString(o)),i.join(" ")}function ic(t,e,n,r){if(bn(t))return t.toString(e,n,r);if(Ja(t)){if(e.doc.directives)return t.toString(e);if(e.resolvedAliases?.has(t))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(t):e.resolvedAliases=new Set([t]),t=t.resolve(e.doc)}let i;const s=An(t)?t:e.doc.createNode(t,{onTagObj:c=>i=c});i||(i=Ez(e.doc.schema.tags,s));const o=Tz(s,i,e);o.length>0&&(e.indentAtStart=(e.indentAtStart??0)+o.length+1);const a=typeof i.stringify=="function"?i.stringify(s,e,n,r):rn(s)?Cd(s,e,n,r):s.toString(e,n,r);return o?rn(s)||a[0]==="{"||a[0]==="["?`${o} ${a}`:`${o}
285
- ${e.indent}${a}`:a}function Cz({key:t,value:e},n,r,i){const{allNullValues:s,doc:o,indent:a,indentStep:c,options:{commentString:u,indentSeq:d,simpleKeys:f}}=n;let h=An(t)&&t.comment||null;if(f){if(h)throw new Error("With simple keys, key nodes cannot have comments");if(Tn(t)||!An(t)&&typeof t=="object"){const C="With simple keys, collection cannot be used as a key value";throw new Error(C)}}let p=!f&&(!t||h&&e==null&&!n.inFlow||Tn(t)||(rn(t)?t.type===_t.BLOCK_FOLDED||t.type===_t.BLOCK_LITERAL:typeof t=="object"));n=Object.assign({},n,{allNullValues:!1,implicitKey:!p&&(f||!s),indent:a+c});let g=!1,m=!1,v=ic(t,n,()=>g=!0,()=>m=!0);if(!p&&!n.inFlow&&v.length>1024){if(f)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");p=!0}if(n.inFlow){if(s||e==null)return g&&r&&r(),v===""?"?":p?`? ${v}`:v}else if(s&&!f||e==null&&p)return v=`? ${v}`,h&&!g?v+=ha(v,n.indent,u(h)):m&&i&&i(),v;g&&(h=null),p?(h&&(v+=ha(v,n.indent,u(h))),v=`? ${v}
284
+ ${c}`);if(o){const h=m=>m.default&&m.tag!=="tag:yaml.org,2002:str"&&m.test?.test(f),{compat:p,tags:g}=e.doc.schema;if(g.some(h)||p?.some(h))return Tl(s,e)}return a?f:$p(f,c,hT,Lp(e,!1))}function Cd(t,e,n,r){const{implicitKey:i,inFlow:s}=e,o=typeof t.value=="string"?t:Object.assign({},t,{value:String(t.value)});let{type:a}=t;a!==_t.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(a=_t.QUOTE_DOUBLE);const c=d=>{switch(d){case _t.BLOCK_FOLDED:case _t.BLOCK_LITERAL:return i||s?Tl(o.value,e):If(o,e,n,r);case _t.QUOTE_DOUBLE:return Tu(o.value,e);case _t.QUOTE_SINGLE:return fv(o.value,e);case _t.PLAIN:return S3(o,e,n,r);default:return null}};let u=c(a);if(u===null){const{defaultKeyType:d,defaultStringType:f}=e.options,h=i&&d||f;if(u=c(h),u===null)throw new Error(`Unsupported default string type ${h}`)}return u}function pT(t,e){const n=Object.assign({blockQuote:!0,commentString:x3,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},t.schema.toStringOptions,e);let r;switch(n.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:t,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:typeof n.indent=="number"?" ".repeat(n.indent):" ",inFlow:r,options:n}}function E3(t,e){if(e.tag){const i=t.filter(s=>s.tag===e.tag);if(i.length>0)return i.find(s=>s.format===e.format)??i[0]}let n,r;if(rn(e)){r=e.value;let i=t.filter(s=>s.identify?.(r));if(i.length>1){const s=i.filter(o=>o.test);s.length>0&&(i=s)}n=i.find(s=>s.format===e.format)??i.find(s=>!s.format)}else r=e,n=t.find(i=>i.nodeClass&&r instanceof i.nodeClass);if(!n){const i=r?.constructor?.name??typeof r;throw new Error(`Tag not resolved for ${i} value`)}return n}function T3(t,e,{anchors:n,doc:r}){if(!r.directives)return"";const i=[],s=(rn(t)||Tn(t))&&t.anchor;s&&lT(s)&&(n.add(s),i.push(`&${s}`));const o=t.tag?t.tag:e.default?null:e.tag;return o&&i.push(r.directives.tagString(o)),i.join(" ")}function ic(t,e,n,r){if(bn(t))return t.toString(e,n,r);if(Ja(t)){if(e.doc.directives)return t.toString(e);if(e.resolvedAliases?.has(t))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(t):e.resolvedAliases=new Set([t]),t=t.resolve(e.doc)}let i;const s=An(t)?t:e.doc.createNode(t,{onTagObj:c=>i=c});i||(i=E3(e.doc.schema.tags,s));const o=T3(s,i,e);o.length>0&&(e.indentAtStart=(e.indentAtStart??0)+o.length+1);const a=typeof i.stringify=="function"?i.stringify(s,e,n,r):rn(s)?Cd(s,e,n,r):s.toString(e,n,r);return o?rn(s)||a[0]==="{"||a[0]==="["?`${o} ${a}`:`${o}
285
+ ${e.indent}${a}`:a}function C3({key:t,value:e},n,r,i){const{allNullValues:s,doc:o,indent:a,indentStep:c,options:{commentString:u,indentSeq:d,simpleKeys:f}}=n;let h=An(t)&&t.comment||null;if(f){if(h)throw new Error("With simple keys, key nodes cannot have comments");if(Tn(t)||!An(t)&&typeof t=="object"){const C="With simple keys, collection cannot be used as a key value";throw new Error(C)}}let p=!f&&(!t||h&&e==null&&!n.inFlow||Tn(t)||(rn(t)?t.type===_t.BLOCK_FOLDED||t.type===_t.BLOCK_LITERAL:typeof t=="object"));n=Object.assign({},n,{allNullValues:!1,implicitKey:!p&&(f||!s),indent:a+c});let g=!1,m=!1,v=ic(t,n,()=>g=!0,()=>m=!0);if(!p&&!n.inFlow&&v.length>1024){if(f)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");p=!0}if(n.inFlow){if(s||e==null)return g&&r&&r(),v===""?"?":p?`? ${v}`:v}else if(s&&!f||e==null&&p)return v=`? ${v}`,h&&!g?v+=ha(v,n.indent,u(h)):m&&i&&i(),v;g&&(h=null),p?(h&&(v+=ha(v,n.indent,u(h))),v=`? ${v}
286
286
  ${a}:`):(v=`${v}:`,h&&(v+=ha(v,n.indent,u(h))));let _,b,y;An(e)?(_=!!e.spaceBefore,b=e.commentBefore,y=e.comment):(_=!1,b=null,y=null,e&&typeof e=="object"&&(e=o.createNode(e))),n.implicitKey=!1,!p&&!h&&rn(e)&&(n.indentAtStart=v.length+1),m=!1,!d&&c.length>=2&&!n.inFlow&&!p&&Dc(e)&&!e.flow&&!e.tag&&!e.anchor&&(n.indent=n.indent.substring(2));let x=!1;const k=ic(e,n,()=>x=!0,()=>m=!0);let S=" ";if(h||_||b){if(S=_?`
287
287
  `:"",b){const C=u(b);S+=`
288
288
  ${Xs(C,n.indent)}`}k===""&&!n.inFlow?S===`
@@ -292,32 +292,32 @@ ${Xs(C,n.indent)}`}k===""&&!n.inFlow?S===`
292
292
  ${n.indent}`}else if(!p&&Tn(e)){const C=k[0],E=k.indexOf(`
293
293
  `),A=E!==-1,O=n.inFlow??e.flow??e.items.length===0;if(A||!O){let L=!1;if(A&&(C==="&"||C==="!")){let I=k.indexOf(" ");C==="&"&&I!==-1&&I<E&&k[I+1]==="!"&&(I=k.indexOf(" ",I+1)),(I===-1||E<I)&&(L=!0)}L||(S=`
294
294
  ${n.indent}`)}}else(k===""||k[0]===`
295
- `)&&(S="");return v+=S+k,n.inFlow?x&&r&&r():y&&!x?v+=ha(v,n.indent,u(y)):m&&i&&i(),v}function gT(t,e){(t==="debug"||t==="warn")&&console.warn(e)}const ff="<<",no={identify:t=>t===ff||typeof t=="symbol"&&t.description===ff,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new _t(Symbol(ff)),{addToJSMap:mT}),stringify:()=>ff},Az=(t,e)=>(no.identify(e)||rn(e)&&(!e.type||e.type===_t.PLAIN)&&no.identify(e.value))&&t?.doc.schema.tags.some(n=>n.tag===no.tag&&n.default);function mT(t,e,n){if(n=t&&Ja(n)?n.resolve(t.doc):n,Dc(n))for(const r of n.items)Zg(t,e,r);else if(Array.isArray(n))for(const r of n)Zg(t,e,r);else Zg(t,e,n)}function Zg(t,e,n){const r=t&&Ja(n)?n.resolve(t.doc):n;if(!Rc(r))throw new Error("Merge sources must be maps or map aliases");const i=r.toJSON(null,t,Map);for(const[s,o]of i)e instanceof Map?e.has(s)||e.set(s,o):e instanceof Set?e.add(s):Object.prototype.hasOwnProperty.call(e,s)||Object.defineProperty(e,s,{value:o,writable:!0,enumerable:!0,configurable:!0});return e}function vT(t,e,{key:n,value:r}){if(An(n)&&n.addToJSMap)n.addToJSMap(t,e,r);else if(Az(t,n))mT(t,e,r);else{const i=Pi(n,"",t);if(e instanceof Map)e.set(i,Pi(r,i,t));else if(e instanceof Set)e.add(i);else{const s=Pz(n,i,t),o=Pi(r,s,t);s in e?Object.defineProperty(e,s,{value:o,writable:!0,enumerable:!0,configurable:!0}):e[s]=o}}return e}function Pz(t,e,n){if(e===null)return"";if(typeof e!="object")return String(e);if(An(t)&&n?.doc){const r=pT(n.doc,{});r.anchors=new Set;for(const s of n.anchors.keys())r.anchors.add(s.anchor);r.inFlow=!0,r.inStringifyKey=!0;const i=t.toString(r);if(!n.mapKeyWarned){let s=JSON.stringify(i);s.length>40&&(s=s.substring(0,36)+'..."'),gT(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${s}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return i}return JSON.stringify(e)}function u_(t,e,n){const r=Ju(t,void 0,n),i=Ju(e,void 0,n);return new Pr(r,i)}class Pr{constructor(e,n=null){Object.defineProperty(this,Ii,{value:rT}),this.key=e,this.value=n}clone(e){let{key:n,value:r}=this;return An(n)&&(n=n.clone(e)),An(r)&&(r=r.clone(e)),new Pr(n,r)}toJSON(e,n){const r=n?.mapAsMap?new Map:{};return vT(n,r,this)}toString(e,n,r){return e?.doc?Cz(this,e,n,r):JSON.stringify(this)}}function bT(t,e,n){return(e.inFlow??t.flow?$z:Oz)(t,e,n)}function Oz({comment:t,items:e},n,{blockItemPrefix:r,flowChars:i,itemIndent:s,onChompKeep:o,onComment:a}){const{indent:c,options:{commentString:u}}=n,d=Object.assign({},n,{indent:s,type:null});let f=!1;const h=[];for(let g=0;g<e.length;++g){const m=e[g];let v=null;if(An(m))!f&&m.spaceBefore&&h.push(""),Oh(n,h,m.commentBefore,f),m.comment&&(v=m.comment);else if(bn(m)){const b=An(m.key)?m.key:null;b&&(!f&&b.spaceBefore&&h.push(""),Oh(n,h,b.commentBefore,f))}f=!1;let _=ic(m,d,()=>v=null,()=>f=!0);v&&(_+=ha(_,s,u(v))),f&&v&&(f=!1),h.push(r+_)}let p;if(h.length===0)p=i.start+i.end;else{p=h[0];for(let g=1;g<h.length;++g){const m=h[g];p+=m?`
295
+ `)&&(S="");return v+=S+k,n.inFlow?x&&r&&r():y&&!x?v+=ha(v,n.indent,u(y)):m&&i&&i(),v}function gT(t,e){(t==="debug"||t==="warn")&&console.warn(e)}const ff="<<",no={identify:t=>t===ff||typeof t=="symbol"&&t.description===ff,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new _t(Symbol(ff)),{addToJSMap:mT}),stringify:()=>ff},A3=(t,e)=>(no.identify(e)||rn(e)&&(!e.type||e.type===_t.PLAIN)&&no.identify(e.value))&&t?.doc.schema.tags.some(n=>n.tag===no.tag&&n.default);function mT(t,e,n){if(n=t&&Ja(n)?n.resolve(t.doc):n,Dc(n))for(const r of n.items)Zg(t,e,r);else if(Array.isArray(n))for(const r of n)Zg(t,e,r);else Zg(t,e,n)}function Zg(t,e,n){const r=t&&Ja(n)?n.resolve(t.doc):n;if(!Rc(r))throw new Error("Merge sources must be maps or map aliases");const i=r.toJSON(null,t,Map);for(const[s,o]of i)e instanceof Map?e.has(s)||e.set(s,o):e instanceof Set?e.add(s):Object.prototype.hasOwnProperty.call(e,s)||Object.defineProperty(e,s,{value:o,writable:!0,enumerable:!0,configurable:!0});return e}function vT(t,e,{key:n,value:r}){if(An(n)&&n.addToJSMap)n.addToJSMap(t,e,r);else if(A3(t,n))mT(t,e,r);else{const i=Pi(n,"",t);if(e instanceof Map)e.set(i,Pi(r,i,t));else if(e instanceof Set)e.add(i);else{const s=P3(n,i,t),o=Pi(r,s,t);s in e?Object.defineProperty(e,s,{value:o,writable:!0,enumerable:!0,configurable:!0}):e[s]=o}}return e}function P3(t,e,n){if(e===null)return"";if(typeof e!="object")return String(e);if(An(t)&&n?.doc){const r=pT(n.doc,{});r.anchors=new Set;for(const s of n.anchors.keys())r.anchors.add(s.anchor);r.inFlow=!0,r.inStringifyKey=!0;const i=t.toString(r);if(!n.mapKeyWarned){let s=JSON.stringify(i);s.length>40&&(s=s.substring(0,36)+'..."'),gT(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${s}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return i}return JSON.stringify(e)}function u_(t,e,n){const r=Ju(t,void 0,n),i=Ju(e,void 0,n);return new Pr(r,i)}class Pr{constructor(e,n=null){Object.defineProperty(this,Ii,{value:rT}),this.key=e,this.value=n}clone(e){let{key:n,value:r}=this;return An(n)&&(n=n.clone(e)),An(r)&&(r=r.clone(e)),new Pr(n,r)}toJSON(e,n){const r=n?.mapAsMap?new Map:{};return vT(n,r,this)}toString(e,n,r){return e?.doc?C3(this,e,n,r):JSON.stringify(this)}}function bT(t,e,n){return(e.inFlow??t.flow?$3:O3)(t,e,n)}function O3({comment:t,items:e},n,{blockItemPrefix:r,flowChars:i,itemIndent:s,onChompKeep:o,onComment:a}){const{indent:c,options:{commentString:u}}=n,d=Object.assign({},n,{indent:s,type:null});let f=!1;const h=[];for(let g=0;g<e.length;++g){const m=e[g];let v=null;if(An(m))!f&&m.spaceBefore&&h.push(""),Oh(n,h,m.commentBefore,f),m.comment&&(v=m.comment);else if(bn(m)){const b=An(m.key)?m.key:null;b&&(!f&&b.spaceBefore&&h.push(""),Oh(n,h,b.commentBefore,f))}f=!1;let _=ic(m,d,()=>v=null,()=>f=!0);v&&(_+=ha(_,s,u(v))),f&&v&&(f=!1),h.push(r+_)}let p;if(h.length===0)p=i.start+i.end;else{p=h[0];for(let g=1;g<h.length;++g){const m=h[g];p+=m?`
296
296
  ${c}${m}`:`
297
297
  `}}return t?(p+=`
298
- `+Xs(u(t),c),a&&a()):f&&o&&o(),p}function $z({items:t},e,{flowChars:n,itemIndent:r}){const{indent:i,indentStep:s,flowCollectionPadding:o,options:{commentString:a}}=e;r+=s;const c=Object.assign({},e,{indent:r,inFlow:!0,type:null});let u=!1,d=0;const f=[];for(let g=0;g<t.length;++g){const m=t[g];let v=null;if(An(m))m.spaceBefore&&f.push(""),Oh(e,f,m.commentBefore,!1),m.comment&&(v=m.comment);else if(bn(m)){const b=An(m.key)?m.key:null;b&&(b.spaceBefore&&f.push(""),Oh(e,f,b.commentBefore,!1),b.comment&&(u=!0));const y=An(m.value)?m.value:null;y?(y.comment&&(v=y.comment),y.commentBefore&&(u=!0)):m.value==null&&b?.comment&&(v=b.comment)}v&&(u=!0);let _=ic(m,c,()=>v=null);g<t.length-1&&(_+=","),v&&(_+=ha(_,r,a(v))),!u&&(f.length>d||_.includes(`
298
+ `+Xs(u(t),c),a&&a()):f&&o&&o(),p}function $3({items:t},e,{flowChars:n,itemIndent:r}){const{indent:i,indentStep:s,flowCollectionPadding:o,options:{commentString:a}}=e;r+=s;const c=Object.assign({},e,{indent:r,inFlow:!0,type:null});let u=!1,d=0;const f=[];for(let g=0;g<t.length;++g){const m=t[g];let v=null;if(An(m))m.spaceBefore&&f.push(""),Oh(e,f,m.commentBefore,!1),m.comment&&(v=m.comment);else if(bn(m)){const b=An(m.key)?m.key:null;b&&(b.spaceBefore&&f.push(""),Oh(e,f,b.commentBefore,!1),b.comment&&(u=!0));const y=An(m.value)?m.value:null;y?(y.comment&&(v=y.comment),y.commentBefore&&(u=!0)):m.value==null&&b?.comment&&(v=b.comment)}v&&(u=!0);let _=ic(m,c,()=>v=null);g<t.length-1&&(_+=","),v&&(_+=ha(_,r,a(v))),!u&&(f.length>d||_.includes(`
299
299
  `))&&(u=!0),f.push(_),d=f.length}const{start:h,end:p}=n;if(f.length===0)return h+p;if(!u){const g=f.reduce((m,v)=>m+v.length+2,2);u=e.options.lineWidth>0&&g>e.options.lineWidth}if(u){let g=h;for(const m of f)g+=m?`
300
300
  ${s}${i}${m}`:`
301
301
  `;return`${g}
302
- ${i}${p}`}else return`${h}${o}${f.join(" ")}${o}${p}`}function Oh({indent:t,options:{commentString:e}},n,r,i){if(r&&i&&(r=r.replace(/^\n+/,"")),r){const s=Xs(e(r),t);n.push(s.trimStart())}}function pa(t,e){const n=rn(e)?e.value:e;for(const r of t)if(bn(r)&&(r.key===e||r.key===n||rn(r.key)&&r.key.value===n))return r}class ci extends fT{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(Io,e),this.items=[]}static from(e,n,r){const{keepUndefined:i,replacer:s}=r,o=new this(e),a=(c,u)=>{if(typeof s=="function")u=s.call(n,c,u);else if(Array.isArray(s)&&!s.includes(c))return;(u!==void 0||i)&&o.items.push(u_(c,u,r))};if(n instanceof Map)for(const[c,u]of n)a(c,u);else if(n&&typeof n=="object")for(const c of Object.keys(n))a(c,n[c]);return typeof e.sortMapEntries=="function"&&o.items.sort(e.sortMapEntries),o}add(e,n){let r;bn(e)?r=e:!e||typeof e!="object"||!("key"in e)?r=new Pr(e,e?.value):r=new Pr(e.key,e.value);const i=pa(this.items,r.key),s=this.schema?.sortMapEntries;if(i){if(!n)throw new Error(`Key ${r.key} already set`);rn(i.value)&&dT(r.value)?i.value.value=r.value:i.value=r.value}else if(s){const o=this.items.findIndex(a=>s(r,a)<0);o===-1?this.items.push(r):this.items.splice(o,0,r)}else this.items.push(r)}delete(e){const n=pa(this.items,e);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(e,n){const i=pa(this.items,e)?.value;return(!n&&rn(i)?i.value:i)??void 0}has(e){return!!pa(this.items,e)}set(e,n){this.add(new Pr(e,n),!0)}toJSON(e,n,r){const i=r?new r:n?.mapAsMap?new Map:{};n?.onCreate&&n.onCreate(i);for(const s of this.items)vT(n,i,s);return i}toString(e,n,r){if(!e)return JSON.stringify(this);for(const i of this.items)if(!bn(i))throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),bT(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:r,onComment:n})}}const Mc={collection:"map",default:!0,nodeClass:ci,tag:"tag:yaml.org,2002:map",resolve(t,e){return Rc(t)||e("Expected a mapping for this tag"),t},createNode:(t,e,n)=>ci.from(t,e,n)};class Bo extends fT{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(Ic,e),this.items=[]}add(e){this.items.push(e)}delete(e){const n=hf(e);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(e,n){const r=hf(e);if(typeof r!="number")return;const i=this.items[r];return!n&&rn(i)?i.value:i}has(e){const n=hf(e);return typeof n=="number"&&n<this.items.length}set(e,n){const r=hf(e);if(typeof r!="number")throw new Error(`Expected a valid index, not ${e}.`);const i=this.items[r];rn(i)&&dT(n)?i.value=n:this.items[r]=n}toJSON(e,n){const r=[];n?.onCreate&&n.onCreate(r);let i=0;for(const s of this.items)r.push(Pi(s,String(i++),n));return r}toString(e,n,r){return e?bT(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:r,onComment:n}):JSON.stringify(this)}static from(e,n,r){const{replacer:i}=r,s=new this(e);if(n&&Symbol.iterator in Object(n)){let o=0;for(let a of n){if(typeof i=="function"){const c=n instanceof Set?a:String(o++);a=i.call(n,c,a)}s.items.push(Ju(a,void 0,r))}}return s}}function hf(t){let e=rn(t)?t.value:t;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}const Fc={collection:"seq",default:!0,nodeClass:Bo,tag:"tag:yaml.org,2002:seq",resolve(t,e){return Dc(t)||e("Expected a sequence for this tag"),t},createNode:(t,e,n)=>Bo.from(t,e,n)},Ip={identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify(t,e,n,r){return e=Object.assign({actualString:!0},e),Cd(t,e,n,r)}},Rp={identify:t=>t==null,createNode:()=>new _t(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new _t(null),stringify:({source:t},e)=>typeof t=="string"&&Rp.test.test(t)?t:e.options.nullStr},d_={identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new _t(t[0]==="t"||t[0]==="T"),stringify({source:t,value:e},n){if(t&&d_.test.test(t)){const r=t[0]==="t"||t[0]==="T";if(e===r)return t}return e?n.options.trueStr:n.options.falseStr}};function os({format:t,minFractionDigits:e,tag:n,value:r}){if(typeof r=="bigint")return String(r);const i=typeof r=="number"?r:Number(r);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let s=JSON.stringify(r);if(!t&&e&&(!n||n==="tag:yaml.org,2002:float")&&/^\d/.test(s)){let o=s.indexOf(".");o<0&&(o=s.length,s+=".");let a=e-(s.length-o-1);for(;a-- >0;)s+="0"}return s}const _T={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:os},yT={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t),stringify(t){const e=Number(t.value);return isFinite(e)?e.toExponential():os(t)}},wT={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(t){const e=new _t(parseFloat(t)),n=t.indexOf(".");return n!==-1&&t[t.length-1]==="0"&&(e.minFractionDigits=t.length-n-1),e},stringify:os},Dp=t=>typeof t=="bigint"||Number.isInteger(t),f_=(t,e,n,{intAsBigInt:r})=>r?BigInt(t):parseInt(t.substring(e),n);function xT(t,e,n){const{value:r}=t;return Dp(r)&&r>=0?n+r.toString(e):os(t)}const kT={identify:t=>Dp(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(t,e,n)=>f_(t,2,8,n),stringify:t=>xT(t,8,"0o")},ST={identify:Dp,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(t,e,n)=>f_(t,0,10,n),stringify:os},ET={identify:t=>Dp(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(t,e,n)=>f_(t,2,16,n),stringify:t=>xT(t,16,"0x")},Lz=[Mc,Fc,Ip,Rp,d_,kT,ST,ET,_T,yT,wT];function w0(t){return typeof t=="bigint"||Number.isInteger(t)}const pf=({value:t})=>JSON.stringify(t),Nz=[{identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify:pf},{identify:t=>t==null,createNode:()=>new _t(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:pf},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:t=>t==="true",stringify:pf},{identify:w0,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(t,e,{intAsBigInt:n})=>n?BigInt(t):parseInt(t,10),stringify:({value:t})=>w0(t)?t.toString():JSON.stringify(t)},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:t=>parseFloat(t),stringify:pf}],Iz={default:!0,tag:"",test:/^/,resolve(t,e){return e(`Unresolved plain scalar ${JSON.stringify(t)}`),t}},Rz=[Mc,Fc].concat(Nz,Iz),h_={identify:t=>t instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(t,e){if(typeof atob=="function"){const n=atob(t.replace(/[\n\r]/g,"")),r=new Uint8Array(n.length);for(let i=0;i<n.length;++i)r[i]=n.charCodeAt(i);return r}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),t},stringify({comment:t,type:e,value:n},r,i,s){const o=n;let a;if(typeof btoa=="function"){let c="";for(let u=0;u<o.length;++u)c+=String.fromCharCode(o[u]);a=btoa(c)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e||(e=_t.BLOCK_LITERAL),e!==_t.QUOTE_DOUBLE){const c=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),u=Math.ceil(a.length/c),d=new Array(u);for(let f=0,h=0;f<u;++f,h+=c)d[f]=a.substr(h,c);a=d.join(e===_t.BLOCK_LITERAL?`
302
+ ${i}${p}`}else return`${h}${o}${f.join(" ")}${o}${p}`}function Oh({indent:t,options:{commentString:e}},n,r,i){if(r&&i&&(r=r.replace(/^\n+/,"")),r){const s=Xs(e(r),t);n.push(s.trimStart())}}function pa(t,e){const n=rn(e)?e.value:e;for(const r of t)if(bn(r)&&(r.key===e||r.key===n||rn(r.key)&&r.key.value===n))return r}class ci extends fT{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(Io,e),this.items=[]}static from(e,n,r){const{keepUndefined:i,replacer:s}=r,o=new this(e),a=(c,u)=>{if(typeof s=="function")u=s.call(n,c,u);else if(Array.isArray(s)&&!s.includes(c))return;(u!==void 0||i)&&o.items.push(u_(c,u,r))};if(n instanceof Map)for(const[c,u]of n)a(c,u);else if(n&&typeof n=="object")for(const c of Object.keys(n))a(c,n[c]);return typeof e.sortMapEntries=="function"&&o.items.sort(e.sortMapEntries),o}add(e,n){let r;bn(e)?r=e:!e||typeof e!="object"||!("key"in e)?r=new Pr(e,e?.value):r=new Pr(e.key,e.value);const i=pa(this.items,r.key),s=this.schema?.sortMapEntries;if(i){if(!n)throw new Error(`Key ${r.key} already set`);rn(i.value)&&dT(r.value)?i.value.value=r.value:i.value=r.value}else if(s){const o=this.items.findIndex(a=>s(r,a)<0);o===-1?this.items.push(r):this.items.splice(o,0,r)}else this.items.push(r)}delete(e){const n=pa(this.items,e);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(e,n){const i=pa(this.items,e)?.value;return(!n&&rn(i)?i.value:i)??void 0}has(e){return!!pa(this.items,e)}set(e,n){this.add(new Pr(e,n),!0)}toJSON(e,n,r){const i=r?new r:n?.mapAsMap?new Map:{};n?.onCreate&&n.onCreate(i);for(const s of this.items)vT(n,i,s);return i}toString(e,n,r){if(!e)return JSON.stringify(this);for(const i of this.items)if(!bn(i))throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),bT(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:r,onComment:n})}}const Mc={collection:"map",default:!0,nodeClass:ci,tag:"tag:yaml.org,2002:map",resolve(t,e){return Rc(t)||e("Expected a mapping for this tag"),t},createNode:(t,e,n)=>ci.from(t,e,n)};class Bo extends fT{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(Ic,e),this.items=[]}add(e){this.items.push(e)}delete(e){const n=hf(e);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(e,n){const r=hf(e);if(typeof r!="number")return;const i=this.items[r];return!n&&rn(i)?i.value:i}has(e){const n=hf(e);return typeof n=="number"&&n<this.items.length}set(e,n){const r=hf(e);if(typeof r!="number")throw new Error(`Expected a valid index, not ${e}.`);const i=this.items[r];rn(i)&&dT(n)?i.value=n:this.items[r]=n}toJSON(e,n){const r=[];n?.onCreate&&n.onCreate(r);let i=0;for(const s of this.items)r.push(Pi(s,String(i++),n));return r}toString(e,n,r){return e?bT(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:r,onComment:n}):JSON.stringify(this)}static from(e,n,r){const{replacer:i}=r,s=new this(e);if(n&&Symbol.iterator in Object(n)){let o=0;for(let a of n){if(typeof i=="function"){const c=n instanceof Set?a:String(o++);a=i.call(n,c,a)}s.items.push(Ju(a,void 0,r))}}return s}}function hf(t){let e=rn(t)?t.value:t;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}const Fc={collection:"seq",default:!0,nodeClass:Bo,tag:"tag:yaml.org,2002:seq",resolve(t,e){return Dc(t)||e("Expected a sequence for this tag"),t},createNode:(t,e,n)=>Bo.from(t,e,n)},Ip={identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify(t,e,n,r){return e=Object.assign({actualString:!0},e),Cd(t,e,n,r)}},Rp={identify:t=>t==null,createNode:()=>new _t(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new _t(null),stringify:({source:t},e)=>typeof t=="string"&&Rp.test.test(t)?t:e.options.nullStr},d_={identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new _t(t[0]==="t"||t[0]==="T"),stringify({source:t,value:e},n){if(t&&d_.test.test(t)){const r=t[0]==="t"||t[0]==="T";if(e===r)return t}return e?n.options.trueStr:n.options.falseStr}};function os({format:t,minFractionDigits:e,tag:n,value:r}){if(typeof r=="bigint")return String(r);const i=typeof r=="number"?r:Number(r);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let s=JSON.stringify(r);if(!t&&e&&(!n||n==="tag:yaml.org,2002:float")&&/^\d/.test(s)){let o=s.indexOf(".");o<0&&(o=s.length,s+=".");let a=e-(s.length-o-1);for(;a-- >0;)s+="0"}return s}const _T={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:os},yT={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t),stringify(t){const e=Number(t.value);return isFinite(e)?e.toExponential():os(t)}},wT={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(t){const e=new _t(parseFloat(t)),n=t.indexOf(".");return n!==-1&&t[t.length-1]==="0"&&(e.minFractionDigits=t.length-n-1),e},stringify:os},Dp=t=>typeof t=="bigint"||Number.isInteger(t),f_=(t,e,n,{intAsBigInt:r})=>r?BigInt(t):parseInt(t.substring(e),n);function xT(t,e,n){const{value:r}=t;return Dp(r)&&r>=0?n+r.toString(e):os(t)}const kT={identify:t=>Dp(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(t,e,n)=>f_(t,2,8,n),stringify:t=>xT(t,8,"0o")},ST={identify:Dp,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(t,e,n)=>f_(t,0,10,n),stringify:os},ET={identify:t=>Dp(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(t,e,n)=>f_(t,2,16,n),stringify:t=>xT(t,16,"0x")},L3=[Mc,Fc,Ip,Rp,d_,kT,ST,ET,_T,yT,wT];function w0(t){return typeof t=="bigint"||Number.isInteger(t)}const pf=({value:t})=>JSON.stringify(t),N3=[{identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify:pf},{identify:t=>t==null,createNode:()=>new _t(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:pf},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:t=>t==="true",stringify:pf},{identify:w0,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(t,e,{intAsBigInt:n})=>n?BigInt(t):parseInt(t,10),stringify:({value:t})=>w0(t)?t.toString():JSON.stringify(t)},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:t=>parseFloat(t),stringify:pf}],I3={default:!0,tag:"",test:/^/,resolve(t,e){return e(`Unresolved plain scalar ${JSON.stringify(t)}`),t}},R3=[Mc,Fc].concat(N3,I3),h_={identify:t=>t instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(t,e){if(typeof atob=="function"){const n=atob(t.replace(/[\n\r]/g,"")),r=new Uint8Array(n.length);for(let i=0;i<n.length;++i)r[i]=n.charCodeAt(i);return r}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),t},stringify({comment:t,type:e,value:n},r,i,s){const o=n;let a;if(typeof btoa=="function"){let c="";for(let u=0;u<o.length;++u)c+=String.fromCharCode(o[u]);a=btoa(c)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e||(e=_t.BLOCK_LITERAL),e!==_t.QUOTE_DOUBLE){const c=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),u=Math.ceil(a.length/c),d=new Array(u);for(let f=0,h=0;f<u;++f,h+=c)d[f]=a.substr(h,c);a=d.join(e===_t.BLOCK_LITERAL?`
303
303
  `:" ")}return Cd({comment:t,type:e,value:a},r,i,s)}};function TT(t,e){if(Dc(t))for(let n=0;n<t.items.length;++n){let r=t.items[n];if(!bn(r)){if(Rc(r)){r.items.length>1&&e("Each pair must have its own sequence indicator");const i=r.items[0]||new Pr(new _t(null));if(r.commentBefore&&(i.key.commentBefore=i.key.commentBefore?`${r.commentBefore}
304
304
  ${i.key.commentBefore}`:r.commentBefore),r.comment){const s=i.value??i.key;s.comment=s.comment?`${r.comment}
305
- ${s.comment}`:r.comment}r=i}t.items[n]=bn(r)?r:new Pr(r)}}else e("Expected a sequence for this tag");return t}function CT(t,e,n){const{replacer:r}=n,i=new Bo(t);i.tag="tag:yaml.org,2002:pairs";let s=0;if(e&&Symbol.iterator in Object(e))for(let o of e){typeof r=="function"&&(o=r.call(e,String(s++),o));let a,c;if(Array.isArray(o))if(o.length===2)a=o[0],c=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){const u=Object.keys(o);if(u.length===1)a=u[0],c=o[a];else throw new TypeError(`Expected tuple with one key, not ${u.length} keys`)}else a=o;i.items.push(u_(a,c,n))}return i}const p_={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:TT,createNode:CT};class Dl extends Bo{constructor(){super(),this.add=ci.prototype.add.bind(this),this.delete=ci.prototype.delete.bind(this),this.get=ci.prototype.get.bind(this),this.has=ci.prototype.has.bind(this),this.set=ci.prototype.set.bind(this),this.tag=Dl.tag}toJSON(e,n){if(!n)return super.toJSON(e);const r=new Map;n?.onCreate&&n.onCreate(r);for(const i of this.items){let s,o;if(bn(i)?(s=Pi(i.key,"",n),o=Pi(i.value,s,n)):s=Pi(i,"",n),r.has(s))throw new Error("Ordered maps must not include duplicate keys");r.set(s,o)}return r}static from(e,n,r){const i=CT(e,n,r),s=new this;return s.items=i.items,s}}Dl.tag="tag:yaml.org,2002:omap";const g_={collection:"seq",identify:t=>t instanceof Map,nodeClass:Dl,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,e){const n=TT(t,e),r=[];for(const{key:i}of n.items)rn(i)&&(r.includes(i.value)?e(`Ordered maps must not include duplicate keys: ${i.value}`):r.push(i.value));return Object.assign(new Dl,n)},createNode:(t,e,n)=>Dl.from(t,e,n)};function AT({value:t,source:e},n){return e&&(t?PT:OT).test.test(e)?e:t?n.options.trueStr:n.options.falseStr}const PT={identify:t=>t===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new _t(!0),stringify:AT},OT={identify:t=>t===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new _t(!1),stringify:AT},Dz={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:os},Mz={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t.replace(/_/g,"")),stringify(t){const e=Number(t.value);return isFinite(e)?e.toExponential():os(t)}},Fz={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){const e=new _t(parseFloat(t.replace(/_/g,""))),n=t.indexOf(".");if(n!==-1){const r=t.substring(n+1).replace(/_/g,"");r[r.length-1]==="0"&&(e.minFractionDigits=r.length)}return e},stringify:os},Ad=t=>typeof t=="bigint"||Number.isInteger(t);function Mp(t,e,n,{intAsBigInt:r}){const i=t[0];if((i==="-"||i==="+")&&(e+=1),t=t.substring(e).replace(/_/g,""),r){switch(n){case 2:t=`0b${t}`;break;case 8:t=`0o${t}`;break;case 16:t=`0x${t}`;break}const o=BigInt(t);return i==="-"?BigInt(-1)*o:o}const s=parseInt(t,n);return i==="-"?-1*s:s}function m_(t,e,n){const{value:r}=t;if(Ad(r)){const i=r.toString(e);return r<0?"-"+n+i.substr(1):n+i}return os(t)}const zz={identify:Ad,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(t,e,n)=>Mp(t,2,2,n),stringify:t=>m_(t,2,"0b")},jz={identify:Ad,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(t,e,n)=>Mp(t,1,8,n),stringify:t=>m_(t,8,"0")},Uz={identify:Ad,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(t,e,n)=>Mp(t,0,10,n),stringify:os},Bz={identify:Ad,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(t,e,n)=>Mp(t,2,16,n),stringify:t=>m_(t,16,"0x")};class Ml extends ci{constructor(e){super(e),this.tag=Ml.tag}add(e){let n;bn(e)?n=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?n=new Pr(e.key,null):n=new Pr(e,null),pa(this.items,n.key)||this.items.push(n)}get(e,n){const r=pa(this.items,e);return!n&&bn(r)?rn(r.key)?r.key.value:r.key:r}set(e,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);const r=pa(this.items,e);r&&!n?this.items.splice(this.items.indexOf(r),1):!r&&n&&this.items.push(new Pr(e))}toJSON(e,n){return super.toJSON(e,n,Set)}toString(e,n,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),n,r);throw new Error("Set items must all have null values")}static from(e,n,r){const{replacer:i}=r,s=new this(e);if(n&&Symbol.iterator in Object(n))for(let o of n)typeof i=="function"&&(o=i.call(n,o,o)),s.items.push(u_(o,null,r));return s}}Ml.tag="tag:yaml.org,2002:set";const v_={collection:"map",identify:t=>t instanceof Set,nodeClass:Ml,default:!1,tag:"tag:yaml.org,2002:set",createNode:(t,e,n)=>Ml.from(t,e,n),resolve(t,e){if(Rc(t)){if(t.hasAllNullValues(!0))return Object.assign(new Ml,t);e("Set items must all have null values")}else e("Expected a mapping for this tag");return t}};function b_(t,e){const n=t[0],r=n==="-"||n==="+"?t.substring(1):t,i=o=>e?BigInt(o):Number(o),s=r.replace(/_/g,"").split(":").reduce((o,a)=>o*i(60)+i(a),i(0));return n==="-"?i(-1)*s:s}function $T(t){let{value:e}=t,n=o=>o;if(typeof e=="bigint")n=o=>BigInt(o);else if(isNaN(e)||!isFinite(e))return os(t);let r="";e<0&&(r="-",e*=n(-1));const i=n(60),s=[e%i];return e<60?s.unshift(0):(e=(e-s[0])/i,s.unshift(e%i),e>=60&&(e=(e-s[0])/i,s.unshift(e))),r+s.map(o=>String(o).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const LT={identify:t=>typeof t=="bigint"||Number.isInteger(t),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(t,e,{intAsBigInt:n})=>b_(t,n),stringify:$T},NT={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:t=>b_(t,!1),stringify:$T},Fp={identify:t=>t instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(t){const e=t.match(Fp.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,n,r,i,s,o,a]=e.map(Number),c=e[7]?Number((e[7]+"00").substr(1,3)):0;let u=Date.UTC(n,r-1,i,s||0,o||0,a||0,c);const d=e[8];if(d&&d!=="Z"){let f=b_(d,!1);Math.abs(f)<30&&(f*=60),u-=6e4*f}return new Date(u)},stringify:({value:t})=>t.toISOString().replace(/(T00:00:00)?\.000Z$/,"")},x0=[Mc,Fc,Ip,Rp,PT,OT,zz,jz,Uz,Bz,Dz,Mz,Fz,h_,no,g_,p_,v_,LT,NT,Fp],k0=new Map([["core",Lz],["failsafe",[Mc,Fc,Ip]],["json",Rz],["yaml11",x0],["yaml-1.1",x0]]),S0={binary:h_,bool:d_,float:wT,floatExp:yT,floatNaN:_T,floatTime:NT,int:ST,intHex:ET,intOct:kT,intTime:LT,map:Mc,merge:no,null:Rp,omap:g_,pairs:p_,seq:Fc,set:v_,timestamp:Fp},qz={"tag:yaml.org,2002:binary":h_,"tag:yaml.org,2002:merge":no,"tag:yaml.org,2002:omap":g_,"tag:yaml.org,2002:pairs":p_,"tag:yaml.org,2002:set":v_,"tag:yaml.org,2002:timestamp":Fp};function Xg(t,e,n){const r=k0.get(e);if(r&&!t)return n&&!r.includes(no)?r.concat(no):r.slice();let i=r;if(!i)if(Array.isArray(t))i=[];else{const s=Array.from(k0.keys()).filter(o=>o!=="yaml11").map(o=>JSON.stringify(o)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${s} or define customTags array`)}if(Array.isArray(t))for(const s of t)i=i.concat(s);else typeof t=="function"&&(i=t(i.slice()));return n&&(i=i.concat(no)),i.reduce((s,o)=>{const a=typeof o=="string"?S0[o]:o;if(!a){const c=JSON.stringify(o),u=Object.keys(S0).map(d=>JSON.stringify(d)).join(", ");throw new Error(`Unknown custom tag ${c}; use one of ${u}`)}return s.includes(a)||s.push(a),s},[])}const Hz=(t,e)=>t.key<e.key?-1:t.key>e.key?1:0;class zp{constructor({compat:e,customTags:n,merge:r,resolveKnownTags:i,schema:s,sortMapEntries:o,toStringDefaults:a}){this.compat=Array.isArray(e)?Xg(e,"compat"):e?Xg(null,e):null,this.name=typeof s=="string"&&s||"core",this.knownTags=i?qz:{},this.tags=Xg(n,this.name,r),this.toStringOptions=a??null,Object.defineProperty(this,Io,{value:Mc}),Object.defineProperty(this,Os,{value:Ip}),Object.defineProperty(this,Ic,{value:Fc}),this.sortMapEntries=typeof o=="function"?o:o===!0?Hz:null}clone(){const e=Object.create(zp.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}function Vz(t,e){const n=[];let r=e.directives===!0;if(e.directives!==!1&&t.directives){const c=t.directives.toString(t);c?(n.push(c),r=!0):t.directives.docStart&&(r=!0)}r&&n.push("---");const i=pT(t,e),{commentString:s}=i.options;if(t.commentBefore){n.length!==1&&n.unshift("");const c=s(t.commentBefore);n.unshift(Xs(c,""))}let o=!1,a=null;if(t.contents){if(An(t.contents)){if(t.contents.spaceBefore&&r&&n.push(""),t.contents.commentBefore){const d=s(t.contents.commentBefore);n.push(Xs(d,""))}i.forceBlockIndent=!!t.comment,a=t.contents.comment}const c=a?void 0:()=>o=!0;let u=ic(t.contents,i,()=>a=null,c);a&&(u+=ha(u,"",s(a))),(u[0]==="|"||u[0]===">")&&n[n.length-1]==="---"?n[n.length-1]=`--- ${u}`:n.push(u)}else n.push(ic(t.contents,i));if(t.directives?.docEnd)if(t.comment){const c=s(t.comment);c.includes(`
305
+ ${s.comment}`:r.comment}r=i}t.items[n]=bn(r)?r:new Pr(r)}}else e("Expected a sequence for this tag");return t}function CT(t,e,n){const{replacer:r}=n,i=new Bo(t);i.tag="tag:yaml.org,2002:pairs";let s=0;if(e&&Symbol.iterator in Object(e))for(let o of e){typeof r=="function"&&(o=r.call(e,String(s++),o));let a,c;if(Array.isArray(o))if(o.length===2)a=o[0],c=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){const u=Object.keys(o);if(u.length===1)a=u[0],c=o[a];else throw new TypeError(`Expected tuple with one key, not ${u.length} keys`)}else a=o;i.items.push(u_(a,c,n))}return i}const p_={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:TT,createNode:CT};class Dl extends Bo{constructor(){super(),this.add=ci.prototype.add.bind(this),this.delete=ci.prototype.delete.bind(this),this.get=ci.prototype.get.bind(this),this.has=ci.prototype.has.bind(this),this.set=ci.prototype.set.bind(this),this.tag=Dl.tag}toJSON(e,n){if(!n)return super.toJSON(e);const r=new Map;n?.onCreate&&n.onCreate(r);for(const i of this.items){let s,o;if(bn(i)?(s=Pi(i.key,"",n),o=Pi(i.value,s,n)):s=Pi(i,"",n),r.has(s))throw new Error("Ordered maps must not include duplicate keys");r.set(s,o)}return r}static from(e,n,r){const i=CT(e,n,r),s=new this;return s.items=i.items,s}}Dl.tag="tag:yaml.org,2002:omap";const g_={collection:"seq",identify:t=>t instanceof Map,nodeClass:Dl,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,e){const n=TT(t,e),r=[];for(const{key:i}of n.items)rn(i)&&(r.includes(i.value)?e(`Ordered maps must not include duplicate keys: ${i.value}`):r.push(i.value));return Object.assign(new Dl,n)},createNode:(t,e,n)=>Dl.from(t,e,n)};function AT({value:t,source:e},n){return e&&(t?PT:OT).test.test(e)?e:t?n.options.trueStr:n.options.falseStr}const PT={identify:t=>t===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new _t(!0),stringify:AT},OT={identify:t=>t===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new _t(!1),stringify:AT},D3={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:os},M3={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t.replace(/_/g,"")),stringify(t){const e=Number(t.value);return isFinite(e)?e.toExponential():os(t)}},F3={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){const e=new _t(parseFloat(t.replace(/_/g,""))),n=t.indexOf(".");if(n!==-1){const r=t.substring(n+1).replace(/_/g,"");r[r.length-1]==="0"&&(e.minFractionDigits=r.length)}return e},stringify:os},Ad=t=>typeof t=="bigint"||Number.isInteger(t);function Mp(t,e,n,{intAsBigInt:r}){const i=t[0];if((i==="-"||i==="+")&&(e+=1),t=t.substring(e).replace(/_/g,""),r){switch(n){case 2:t=`0b${t}`;break;case 8:t=`0o${t}`;break;case 16:t=`0x${t}`;break}const o=BigInt(t);return i==="-"?BigInt(-1)*o:o}const s=parseInt(t,n);return i==="-"?-1*s:s}function m_(t,e,n){const{value:r}=t;if(Ad(r)){const i=r.toString(e);return r<0?"-"+n+i.substr(1):n+i}return os(t)}const z3={identify:Ad,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(t,e,n)=>Mp(t,2,2,n),stringify:t=>m_(t,2,"0b")},j3={identify:Ad,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(t,e,n)=>Mp(t,1,8,n),stringify:t=>m_(t,8,"0")},U3={identify:Ad,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(t,e,n)=>Mp(t,0,10,n),stringify:os},B3={identify:Ad,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(t,e,n)=>Mp(t,2,16,n),stringify:t=>m_(t,16,"0x")};class Ml extends ci{constructor(e){super(e),this.tag=Ml.tag}add(e){let n;bn(e)?n=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?n=new Pr(e.key,null):n=new Pr(e,null),pa(this.items,n.key)||this.items.push(n)}get(e,n){const r=pa(this.items,e);return!n&&bn(r)?rn(r.key)?r.key.value:r.key:r}set(e,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);const r=pa(this.items,e);r&&!n?this.items.splice(this.items.indexOf(r),1):!r&&n&&this.items.push(new Pr(e))}toJSON(e,n){return super.toJSON(e,n,Set)}toString(e,n,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),n,r);throw new Error("Set items must all have null values")}static from(e,n,r){const{replacer:i}=r,s=new this(e);if(n&&Symbol.iterator in Object(n))for(let o of n)typeof i=="function"&&(o=i.call(n,o,o)),s.items.push(u_(o,null,r));return s}}Ml.tag="tag:yaml.org,2002:set";const v_={collection:"map",identify:t=>t instanceof Set,nodeClass:Ml,default:!1,tag:"tag:yaml.org,2002:set",createNode:(t,e,n)=>Ml.from(t,e,n),resolve(t,e){if(Rc(t)){if(t.hasAllNullValues(!0))return Object.assign(new Ml,t);e("Set items must all have null values")}else e("Expected a mapping for this tag");return t}};function b_(t,e){const n=t[0],r=n==="-"||n==="+"?t.substring(1):t,i=o=>e?BigInt(o):Number(o),s=r.replace(/_/g,"").split(":").reduce((o,a)=>o*i(60)+i(a),i(0));return n==="-"?i(-1)*s:s}function $T(t){let{value:e}=t,n=o=>o;if(typeof e=="bigint")n=o=>BigInt(o);else if(isNaN(e)||!isFinite(e))return os(t);let r="";e<0&&(r="-",e*=n(-1));const i=n(60),s=[e%i];return e<60?s.unshift(0):(e=(e-s[0])/i,s.unshift(e%i),e>=60&&(e=(e-s[0])/i,s.unshift(e))),r+s.map(o=>String(o).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const LT={identify:t=>typeof t=="bigint"||Number.isInteger(t),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(t,e,{intAsBigInt:n})=>b_(t,n),stringify:$T},NT={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:t=>b_(t,!1),stringify:$T},Fp={identify:t=>t instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(t){const e=t.match(Fp.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,n,r,i,s,o,a]=e.map(Number),c=e[7]?Number((e[7]+"00").substr(1,3)):0;let u=Date.UTC(n,r-1,i,s||0,o||0,a||0,c);const d=e[8];if(d&&d!=="Z"){let f=b_(d,!1);Math.abs(f)<30&&(f*=60),u-=6e4*f}return new Date(u)},stringify:({value:t})=>t.toISOString().replace(/(T00:00:00)?\.000Z$/,"")},x0=[Mc,Fc,Ip,Rp,PT,OT,z3,j3,U3,B3,D3,M3,F3,h_,no,g_,p_,v_,LT,NT,Fp],k0=new Map([["core",L3],["failsafe",[Mc,Fc,Ip]],["json",R3],["yaml11",x0],["yaml-1.1",x0]]),S0={binary:h_,bool:d_,float:wT,floatExp:yT,floatNaN:_T,floatTime:NT,int:ST,intHex:ET,intOct:kT,intTime:LT,map:Mc,merge:no,null:Rp,omap:g_,pairs:p_,seq:Fc,set:v_,timestamp:Fp},q3={"tag:yaml.org,2002:binary":h_,"tag:yaml.org,2002:merge":no,"tag:yaml.org,2002:omap":g_,"tag:yaml.org,2002:pairs":p_,"tag:yaml.org,2002:set":v_,"tag:yaml.org,2002:timestamp":Fp};function Xg(t,e,n){const r=k0.get(e);if(r&&!t)return n&&!r.includes(no)?r.concat(no):r.slice();let i=r;if(!i)if(Array.isArray(t))i=[];else{const s=Array.from(k0.keys()).filter(o=>o!=="yaml11").map(o=>JSON.stringify(o)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${s} or define customTags array`)}if(Array.isArray(t))for(const s of t)i=i.concat(s);else typeof t=="function"&&(i=t(i.slice()));return n&&(i=i.concat(no)),i.reduce((s,o)=>{const a=typeof o=="string"?S0[o]:o;if(!a){const c=JSON.stringify(o),u=Object.keys(S0).map(d=>JSON.stringify(d)).join(", ");throw new Error(`Unknown custom tag ${c}; use one of ${u}`)}return s.includes(a)||s.push(a),s},[])}const H3=(t,e)=>t.key<e.key?-1:t.key>e.key?1:0;class zp{constructor({compat:e,customTags:n,merge:r,resolveKnownTags:i,schema:s,sortMapEntries:o,toStringDefaults:a}){this.compat=Array.isArray(e)?Xg(e,"compat"):e?Xg(null,e):null,this.name=typeof s=="string"&&s||"core",this.knownTags=i?q3:{},this.tags=Xg(n,this.name,r),this.toStringOptions=a??null,Object.defineProperty(this,Io,{value:Mc}),Object.defineProperty(this,Os,{value:Ip}),Object.defineProperty(this,Ic,{value:Fc}),this.sortMapEntries=typeof o=="function"?o:o===!0?H3:null}clone(){const e=Object.create(zp.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}function V3(t,e){const n=[];let r=e.directives===!0;if(e.directives!==!1&&t.directives){const c=t.directives.toString(t);c?(n.push(c),r=!0):t.directives.docStart&&(r=!0)}r&&n.push("---");const i=pT(t,e),{commentString:s}=i.options;if(t.commentBefore){n.length!==1&&n.unshift("");const c=s(t.commentBefore);n.unshift(Xs(c,""))}let o=!1,a=null;if(t.contents){if(An(t.contents)){if(t.contents.spaceBefore&&r&&n.push(""),t.contents.commentBefore){const d=s(t.contents.commentBefore);n.push(Xs(d,""))}i.forceBlockIndent=!!t.comment,a=t.contents.comment}const c=a?void 0:()=>o=!0;let u=ic(t.contents,i,()=>a=null,c);a&&(u+=ha(u,"",s(a))),(u[0]==="|"||u[0]===">")&&n[n.length-1]==="---"?n[n.length-1]=`--- ${u}`:n.push(u)}else n.push(ic(t.contents,i));if(t.directives?.docEnd)if(t.comment){const c=s(t.comment);c.includes(`
306
306
  `)?(n.push("..."),n.push(Xs(c,""))):n.push(`... ${c}`)}else n.push("...");else{let c=t.comment;c&&o&&(c=c.replace(/^\n+/,"")),c&&((!o||a)&&n[n.length-1]!==""&&n.push(""),n.push(Xs(s(c),"")))}return n.join(`
307
307
  `)+`
308
- `}class zc{constructor(e,n,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Ii,{value:uv});let i=null;typeof n=="function"||Array.isArray(n)?i=n:r===void 0&&n&&(r=n,n=void 0);const s=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=s;let{version:o}=s;r?._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new Fr({version:o}),this.setSchema(o,r),this.contents=e===void 0?null:this.createNode(e,i,r)}clone(){const e=Object.create(zc.prototype,{[Ii]:{value:uv}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=An(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){pl(this.contents)&&this.contents.add(e)}addIn(e,n){pl(this.contents)&&this.contents.addIn(e,n)}createAlias(e,n){if(!e.anchor){const r=cT(this);e.anchor=!n||r.has(n)?uT(n||"a",r):n}return new Op(e.anchor)}createNode(e,n,r){let i;if(typeof n=="function")e=n.call({"":e},"",e),i=n;else if(Array.isArray(n)){const v=b=>typeof b=="number"||b instanceof String||b instanceof Number,_=n.filter(v).map(String);_.length>0&&(n=n.concat(_)),i=n}else r===void 0&&n&&(r=n,n=void 0);const{aliasDuplicateObjects:s,anchorPrefix:o,flow:a,keepUndefined:c,onTagObj:u,tag:d}=r??{},{onAnchor:f,setAnchors:h,sourceObjects:p}=_z(this,o||"a"),g={aliasDuplicateObjects:s??!0,keepUndefined:c??!1,onAnchor:f,onTagObj:u,replacer:i,schema:this.schema,sourceObjects:p},m=Ju(e,d,g);return a&&Tn(m)&&(m.flow=!0),h(),m}createPair(e,n,r={}){const i=this.createNode(e,null,r),s=this.createNode(n,null,r);return new Pr(i,s)}delete(e){return pl(this.contents)?this.contents.delete(e):!1}deleteIn(e){return hu(e)?this.contents==null?!1:(this.contents=null,!0):pl(this.contents)?this.contents.deleteIn(e):!1}get(e,n){return Tn(this.contents)?this.contents.get(e,n):void 0}getIn(e,n){return hu(e)?!n&&rn(this.contents)?this.contents.value:this.contents:Tn(this.contents)?this.contents.getIn(e,n):void 0}has(e){return Tn(this.contents)?this.contents.has(e):!1}hasIn(e){return hu(e)?this.contents!==void 0:Tn(this.contents)?this.contents.hasIn(e):!1}set(e,n){this.contents==null?this.contents=Ph(this.schema,[e],n):pl(this.contents)&&this.contents.set(e,n)}setIn(e,n){hu(e)?this.contents=n:this.contents==null?this.contents=Ph(this.schema,Array.from(e),n):pl(this.contents)&&this.contents.setIn(e,n)}setSchema(e,n={}){typeof e=="number"&&(e=String(e));let r;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Fr({version:"1.1"}),r={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new Fr({version:e}),r={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{const i=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${i}`)}}if(n.schema instanceof Object)this.schema=n.schema;else if(r)this.schema=new zp(Object.assign(r,n));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:n,mapAsMap:r,maxAliasCount:i,onAnchor:s,reviver:o}={}){const a={anchors:new Map,doc:this,keep:!e,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100},c=Pi(this.contents,n??"",a);if(typeof s=="function")for(const{count:u,res:d}of a.anchors.values())s(d,u);return typeof o=="function"?El(o,{"":c},"",c):c}toJSON(e,n){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:n})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const n=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${n}`)}return Vz(this,e)}}function pl(t){if(Tn(t))return!0;throw new Error("Expected a YAML collection as document contents")}class __ extends Error{constructor(e,n,r,i){super(),this.name=e,this.code=r,this.message=i,this.pos=n}}class ga extends __{constructor(e,n,r){super("YAMLParseError",e,n,r)}}class IT extends __{constructor(e,n,r){super("YAMLWarning",e,n,r)}}const $h=(t,e)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(a=>e.linePos(a));const{line:r,col:i}=n.linePos[0];n.message+=` at line ${r}, column ${i}`;let s=i-1,o=t.substring(e.lineStarts[r-1],e.lineStarts[r]).replace(/[\n\r]+$/,"");if(s>=60&&o.length>80){const a=Math.min(s-39,o.length-79);o="…"+o.substring(a),s-=a-1}if(o.length>80&&(o=o.substring(0,79)+"…"),r>1&&/^ *$/.test(o.substring(0,s))){let a=t.substring(e.lineStarts[r-2],e.lineStarts[r-1]);a.length>80&&(a=a.substring(0,79)+`…
308
+ `}class zc{constructor(e,n,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Ii,{value:uv});let i=null;typeof n=="function"||Array.isArray(n)?i=n:r===void 0&&n&&(r=n,n=void 0);const s=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=s;let{version:o}=s;r?._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new Fr({version:o}),this.setSchema(o,r),this.contents=e===void 0?null:this.createNode(e,i,r)}clone(){const e=Object.create(zc.prototype,{[Ii]:{value:uv}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=An(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){pl(this.contents)&&this.contents.add(e)}addIn(e,n){pl(this.contents)&&this.contents.addIn(e,n)}createAlias(e,n){if(!e.anchor){const r=cT(this);e.anchor=!n||r.has(n)?uT(n||"a",r):n}return new Op(e.anchor)}createNode(e,n,r){let i;if(typeof n=="function")e=n.call({"":e},"",e),i=n;else if(Array.isArray(n)){const v=b=>typeof b=="number"||b instanceof String||b instanceof Number,_=n.filter(v).map(String);_.length>0&&(n=n.concat(_)),i=n}else r===void 0&&n&&(r=n,n=void 0);const{aliasDuplicateObjects:s,anchorPrefix:o,flow:a,keepUndefined:c,onTagObj:u,tag:d}=r??{},{onAnchor:f,setAnchors:h,sourceObjects:p}=_3(this,o||"a"),g={aliasDuplicateObjects:s??!0,keepUndefined:c??!1,onAnchor:f,onTagObj:u,replacer:i,schema:this.schema,sourceObjects:p},m=Ju(e,d,g);return a&&Tn(m)&&(m.flow=!0),h(),m}createPair(e,n,r={}){const i=this.createNode(e,null,r),s=this.createNode(n,null,r);return new Pr(i,s)}delete(e){return pl(this.contents)?this.contents.delete(e):!1}deleteIn(e){return hu(e)?this.contents==null?!1:(this.contents=null,!0):pl(this.contents)?this.contents.deleteIn(e):!1}get(e,n){return Tn(this.contents)?this.contents.get(e,n):void 0}getIn(e,n){return hu(e)?!n&&rn(this.contents)?this.contents.value:this.contents:Tn(this.contents)?this.contents.getIn(e,n):void 0}has(e){return Tn(this.contents)?this.contents.has(e):!1}hasIn(e){return hu(e)?this.contents!==void 0:Tn(this.contents)?this.contents.hasIn(e):!1}set(e,n){this.contents==null?this.contents=Ph(this.schema,[e],n):pl(this.contents)&&this.contents.set(e,n)}setIn(e,n){hu(e)?this.contents=n:this.contents==null?this.contents=Ph(this.schema,Array.from(e),n):pl(this.contents)&&this.contents.setIn(e,n)}setSchema(e,n={}){typeof e=="number"&&(e=String(e));let r;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Fr({version:"1.1"}),r={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new Fr({version:e}),r={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{const i=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${i}`)}}if(n.schema instanceof Object)this.schema=n.schema;else if(r)this.schema=new zp(Object.assign(r,n));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:n,mapAsMap:r,maxAliasCount:i,onAnchor:s,reviver:o}={}){const a={anchors:new Map,doc:this,keep:!e,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100},c=Pi(this.contents,n??"",a);if(typeof s=="function")for(const{count:u,res:d}of a.anchors.values())s(d,u);return typeof o=="function"?El(o,{"":c},"",c):c}toJSON(e,n){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:n})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const n=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${n}`)}return V3(this,e)}}function pl(t){if(Tn(t))return!0;throw new Error("Expected a YAML collection as document contents")}class __ extends Error{constructor(e,n,r,i){super(),this.name=e,this.code=r,this.message=i,this.pos=n}}class ga extends __{constructor(e,n,r){super("YAMLParseError",e,n,r)}}class IT extends __{constructor(e,n,r){super("YAMLWarning",e,n,r)}}const $h=(t,e)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(a=>e.linePos(a));const{line:r,col:i}=n.linePos[0];n.message+=` at line ${r}, column ${i}`;let s=i-1,o=t.substring(e.lineStarts[r-1],e.lineStarts[r]).replace(/[\n\r]+$/,"");if(s>=60&&o.length>80){const a=Math.min(s-39,o.length-79);o="…"+o.substring(a),s-=a-1}if(o.length>80&&(o=o.substring(0,79)+"…"),r>1&&/^ *$/.test(o.substring(0,s))){let a=t.substring(e.lineStarts[r-2],e.lineStarts[r-1]);a.length>80&&(a=a.substring(0,79)+`…
309
309
  `),o=a+o}if(/[^ ]/.test(o)){let a=1;const c=n.linePos[1];c&&c.line===r&&c.col>i&&(a=Math.max(1,Math.min(c.col-i,80-s)));const u=" ".repeat(s)+"^".repeat(a);n.message+=`:
310
310
 
311
311
  ${o}
312
312
  ${u}
313
313
  `}};function sc(t,{flow:e,indicator:n,next:r,offset:i,onError:s,parentIndent:o,startOnNewline:a}){let c=!1,u=a,d=a,f="",h="",p=!1,g=!1,m=null,v=null,_=null,b=null,y=null,x=null,k=null;for(const E of t)switch(g&&(E.type!=="space"&&E.type!=="newline"&&E.type!=="comma"&&s(E.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),g=!1),m&&(u&&E.type!=="comment"&&E.type!=="newline"&&s(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),m=null),E.type){case"space":!e&&(n!=="doc-start"||r?.type!=="flow-collection")&&E.source.includes(" ")&&(m=E),d=!0;break;case"comment":{d||s(E,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const A=E.source.substring(1)||" ";f?f+=h+A:f=A,h="",u=!1;break}case"newline":u?f?f+=E.source:(!x||n!=="seq-item-ind")&&(c=!0):h+=E.source,u=!0,p=!0,(v||_)&&(b=E),d=!0;break;case"anchor":v&&s(E,"MULTIPLE_ANCHORS","A node can have at most one anchor"),E.source.endsWith(":")&&s(E.offset+E.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),v=E,k===null&&(k=E.offset),u=!1,d=!1,g=!0;break;case"tag":{_&&s(E,"MULTIPLE_TAGS","A node can have at most one tag"),_=E,k===null&&(k=E.offset),u=!1,d=!1,g=!0;break}case n:(v||_)&&s(E,"BAD_PROP_ORDER",`Anchors and tags must be after the ${E.source} indicator`),x&&s(E,"UNEXPECTED_TOKEN",`Unexpected ${E.source} in ${e??"collection"}`),x=E,u=n==="seq-item-ind"||n==="explicit-key-ind",d=!1;break;case"comma":if(e){y&&s(E,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),y=E,u=!1,d=!1;break}default:s(E,"UNEXPECTED_TOKEN",`Unexpected ${E.type} token`),u=!1,d=!1}const S=t[t.length-1],C=S?S.offset+S.source.length:i;return g&&r&&r.type!=="space"&&r.type!=="newline"&&r.type!=="comma"&&(r.type!=="scalar"||r.source!=="")&&s(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),m&&(u&&m.indent<=o||r?.type==="block-map"||r?.type==="block-seq")&&s(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:y,found:x,spaceBefore:c,comment:f,hasNewline:p,anchor:v,tag:_,newlineAfterProp:b,end:C,start:k??C}}function Zu(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes(`
314
- `))return!0;if(t.end){for(const e of t.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(const e of t.items){for(const n of e.start)if(n.type==="newline")return!0;if(e.sep){for(const n of e.sep)if(n.type==="newline")return!0}if(Zu(e.key)||Zu(e.value))return!0}return!1;default:return!0}}function pv(t,e,n){if(e?.type==="flow-collection"){const r=e.end[0];r.indent===t&&(r.source==="]"||r.source==="}")&&Zu(e)&&n(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function RT(t,e,n){const{uniqueKeys:r}=t.options;if(r===!1)return!1;const i=typeof r=="function"?r:(s,o)=>s===o||rn(s)&&rn(o)&&s.value===o.value;return e.some(s=>i(s.key,n))}const E0="All mapping items must start at the same column";function Wz({composeNode:t,composeEmptyNode:e},n,r,i,s){const o=s?.nodeClass??ci,a=new o(n.schema);n.atRoot&&(n.atRoot=!1);let c=r.offset,u=null;for(const d of r.items){const{start:f,key:h,sep:p,value:g}=d,m=sc(f,{indicator:"explicit-key-ind",next:h??p?.[0],offset:c,onError:i,parentIndent:r.indent,startOnNewline:!0}),v=!m.found;if(v){if(h&&(h.type==="block-seq"?i(c,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in h&&h.indent!==r.indent&&i(c,"BAD_INDENT",E0)),!m.anchor&&!m.tag&&!p){u=m.end,m.comment&&(a.comment?a.comment+=`
314
+ `))return!0;if(t.end){for(const e of t.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(const e of t.items){for(const n of e.start)if(n.type==="newline")return!0;if(e.sep){for(const n of e.sep)if(n.type==="newline")return!0}if(Zu(e.key)||Zu(e.value))return!0}return!1;default:return!0}}function pv(t,e,n){if(e?.type==="flow-collection"){const r=e.end[0];r.indent===t&&(r.source==="]"||r.source==="}")&&Zu(e)&&n(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function RT(t,e,n){const{uniqueKeys:r}=t.options;if(r===!1)return!1;const i=typeof r=="function"?r:(s,o)=>s===o||rn(s)&&rn(o)&&s.value===o.value;return e.some(s=>i(s.key,n))}const E0="All mapping items must start at the same column";function W3({composeNode:t,composeEmptyNode:e},n,r,i,s){const o=s?.nodeClass??ci,a=new o(n.schema);n.atRoot&&(n.atRoot=!1);let c=r.offset,u=null;for(const d of r.items){const{start:f,key:h,sep:p,value:g}=d,m=sc(f,{indicator:"explicit-key-ind",next:h??p?.[0],offset:c,onError:i,parentIndent:r.indent,startOnNewline:!0}),v=!m.found;if(v){if(h&&(h.type==="block-seq"?i(c,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in h&&h.indent!==r.indent&&i(c,"BAD_INDENT",E0)),!m.anchor&&!m.tag&&!p){u=m.end,m.comment&&(a.comment?a.comment+=`
315
315
  `+m.comment:a.comment=m.comment);continue}(m.newlineAfterProp||Zu(h))&&i(h??f[f.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else m.found?.indent!==r.indent&&i(c,"BAD_INDENT",E0);n.atKey=!0;const _=m.end,b=h?t(n,h,m,i):e(n,_,f,null,m,i);n.schema.compat&&pv(r.indent,h,i),n.atKey=!1,RT(n,a.items,b)&&i(_,"DUPLICATE_KEY","Map keys must be unique");const y=sc(p??[],{indicator:"map-value-ind",next:g,offset:b.range[2],onError:i,parentIndent:r.indent,startOnNewline:!h||h.type==="block-scalar"});if(c=y.end,y.found){v&&(g?.type==="block-map"&&!y.hasNewline&&i(c,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&m.start<y.found.offset-1024&&i(b.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const x=g?t(n,g,y,i):e(n,c,p,null,y,i);n.schema.compat&&pv(r.indent,g,i),c=x.range[2];const k=new Pr(b,x);n.options.keepSourceTokens&&(k.srcToken=d),a.items.push(k)}else{v&&i(b.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),y.comment&&(b.comment?b.comment+=`
316
- `+y.comment:b.comment=y.comment);const x=new Pr(b);n.options.keepSourceTokens&&(x.srcToken=d),a.items.push(x)}}return u&&u<c&&i(u,"IMPOSSIBLE","Map comment with trailing content"),a.range=[r.offset,c,u??c],a}function Gz({composeNode:t,composeEmptyNode:e},n,r,i,s){const o=s?.nodeClass??Bo,a=new o(n.schema);n.atRoot&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let c=r.offset,u=null;for(const{start:d,value:f}of r.items){const h=sc(d,{indicator:"seq-item-ind",next:f,offset:c,onError:i,parentIndent:r.indent,startOnNewline:!0});if(!h.found)if(h.anchor||h.tag||f)f&&f.type==="block-seq"?i(h.end,"BAD_INDENT","All sequence items must start at the same column"):i(c,"MISSING_CHAR","Sequence item without - indicator");else{u=h.end,h.comment&&(a.comment=h.comment);continue}const p=f?t(n,f,h,i):e(n,h.end,d,null,h,i);n.schema.compat&&pv(r.indent,f,i),c=p.range[2],a.items.push(p)}return a.range=[r.offset,c,u??c],a}function Pd(t,e,n,r){let i="";if(t){let s=!1,o="";for(const a of t){const{source:c,type:u}=a;switch(u){case"space":s=!0;break;case"comment":{n&&!s&&r(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const d=c.substring(1)||" ";i?i+=o+d:i=d,o="";break}case"newline":i&&(o+=c),s=!0;break;default:r(a,"UNEXPECTED_TOKEN",`Unexpected ${u} at node end`)}e+=c.length}}return{comment:i,offset:e}}const Qg="Block collections are not allowed within flow collections",em=t=>t&&(t.type==="block-map"||t.type==="block-seq");function Kz({composeNode:t,composeEmptyNode:e},n,r,i,s){const o=r.start.source==="{",a=o?"flow map":"flow sequence",c=s?.nodeClass??(o?ci:Bo),u=new c(n.schema);u.flow=!0;const d=n.atRoot;d&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let f=r.offset+r.start.source.length;for(let v=0;v<r.items.length;++v){const _=r.items[v],{start:b,key:y,sep:x,value:k}=_,S=sc(b,{flow:a,indicator:"explicit-key-ind",next:y??x?.[0],offset:f,onError:i,parentIndent:r.indent,startOnNewline:!1});if(!S.found){if(!S.anchor&&!S.tag&&!x&&!k){v===0&&S.comma?i(S.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`):v<r.items.length-1&&i(S.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${a}`),S.comment&&(u.comment?u.comment+=`
316
+ `+y.comment:b.comment=y.comment);const x=new Pr(b);n.options.keepSourceTokens&&(x.srcToken=d),a.items.push(x)}}return u&&u<c&&i(u,"IMPOSSIBLE","Map comment with trailing content"),a.range=[r.offset,c,u??c],a}function G3({composeNode:t,composeEmptyNode:e},n,r,i,s){const o=s?.nodeClass??Bo,a=new o(n.schema);n.atRoot&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let c=r.offset,u=null;for(const{start:d,value:f}of r.items){const h=sc(d,{indicator:"seq-item-ind",next:f,offset:c,onError:i,parentIndent:r.indent,startOnNewline:!0});if(!h.found)if(h.anchor||h.tag||f)f&&f.type==="block-seq"?i(h.end,"BAD_INDENT","All sequence items must start at the same column"):i(c,"MISSING_CHAR","Sequence item without - indicator");else{u=h.end,h.comment&&(a.comment=h.comment);continue}const p=f?t(n,f,h,i):e(n,h.end,d,null,h,i);n.schema.compat&&pv(r.indent,f,i),c=p.range[2],a.items.push(p)}return a.range=[r.offset,c,u??c],a}function Pd(t,e,n,r){let i="";if(t){let s=!1,o="";for(const a of t){const{source:c,type:u}=a;switch(u){case"space":s=!0;break;case"comment":{n&&!s&&r(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const d=c.substring(1)||" ";i?i+=o+d:i=d,o="";break}case"newline":i&&(o+=c),s=!0;break;default:r(a,"UNEXPECTED_TOKEN",`Unexpected ${u} at node end`)}e+=c.length}}return{comment:i,offset:e}}const Qg="Block collections are not allowed within flow collections",em=t=>t&&(t.type==="block-map"||t.type==="block-seq");function K3({composeNode:t,composeEmptyNode:e},n,r,i,s){const o=r.start.source==="{",a=o?"flow map":"flow sequence",c=s?.nodeClass??(o?ci:Bo),u=new c(n.schema);u.flow=!0;const d=n.atRoot;d&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let f=r.offset+r.start.source.length;for(let v=0;v<r.items.length;++v){const _=r.items[v],{start:b,key:y,sep:x,value:k}=_,S=sc(b,{flow:a,indicator:"explicit-key-ind",next:y??x?.[0],offset:f,onError:i,parentIndent:r.indent,startOnNewline:!1});if(!S.found){if(!S.anchor&&!S.tag&&!x&&!k){v===0&&S.comma?i(S.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`):v<r.items.length-1&&i(S.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${a}`),S.comment&&(u.comment?u.comment+=`
317
317
  `+S.comment:u.comment=S.comment),f=S.end;continue}!o&&n.options.strict&&Zu(y)&&i(y,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(v===0)S.comma&&i(S.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`);else if(S.comma||i(S.start,"MISSING_CHAR",`Missing , between ${a} items`),S.comment){let C="";e:for(const E of b)switch(E.type){case"comma":case"space":break;case"comment":C=E.source.substring(1);break e;default:break e}if(C){let E=u.items[u.items.length-1];bn(E)&&(E=E.value??E.key),E.comment?E.comment+=`
318
318
  `+C:E.comment=C,S.comment=S.comment.substring(C.length+1)}}if(!o&&!x&&!S.found){const C=k?t(n,k,S,i):e(n,S.end,x,null,S,i);u.items.push(C),f=C.range[2],em(k)&&i(C.range,"BLOCK_IN_FLOW",Qg)}else{n.atKey=!0;const C=S.end,E=y?t(n,y,S,i):e(n,C,b,null,S,i);em(y)&&i(E.range,"BLOCK_IN_FLOW",Qg),n.atKey=!1;const A=sc(x??[],{flow:a,indicator:"map-value-ind",next:k,offset:E.range[2],onError:i,parentIndent:r.indent,startOnNewline:!1});if(A.found){if(!o&&!S.found&&n.options.strict){if(x)for(const I of x){if(I===A.found)break;if(I.type==="newline"){i(I,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}S.start<A.found.offset-1024&&i(A.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else k&&("source"in k&&k.source&&k.source[0]===":"?i(k,"MISSING_CHAR",`Missing space after : in ${a}`):i(A.start,"MISSING_CHAR",`Missing , or : between ${a} items`));const O=k?t(n,k,A,i):A.found?e(n,A.end,x,null,A,i):null;O?em(k)&&i(O.range,"BLOCK_IN_FLOW",Qg):A.comment&&(E.comment?E.comment+=`
319
319
  `+A.comment:E.comment=A.comment);const L=new Pr(E,O);if(n.options.keepSourceTokens&&(L.srcToken=_),o){const I=u;RT(n,I.items,E)&&i(C,"DUPLICATE_KEY","Map keys must be unique"),I.items.push(L)}else{const I=new ci(n.schema);I.flow=!0,I.items.push(L);const N=(O??E).range;I.range=[E.range[0],N[1],N[2]],u.items.push(I)}f=O?O.range[2]:A.end}}const h=o?"}":"]",[p,...g]=r.end;let m=f;if(p&&p.source===h)m=p.offset+p.source.length;else{const v=a[0].toUpperCase()+a.substring(1),_=d?`${v} must end with a ${h}`:`${v} in block collection must be sufficiently indented and end with a ${h}`;i(f,d?"MISSING_CHAR":"BAD_INDENT",_),p&&p.source.length!==1&&g.unshift(p)}if(g.length>0){const v=Pd(g,m,n.options.strict,i);v.comment&&(u.comment?u.comment+=`
320
- `+v.comment:u.comment=v.comment),u.range=[r.offset,m,v.offset]}else u.range=[r.offset,m,m];return u}function tm(t,e,n,r,i,s){const o=n.type==="block-map"?Wz(t,e,n,r,s):n.type==="block-seq"?Gz(t,e,n,r,s):Kz(t,e,n,r,s),a=o.constructor;return i==="!"||i===a.tagName?(o.tag=a.tagName,o):(i&&(o.tag=i),o)}function Yz(t,e,n,r,i){const s=r.tag,o=s?e.directives.tagName(s.source,h=>i(s,"TAG_RESOLVE_FAILED",h)):null;if(n.type==="block-seq"){const{anchor:h,newlineAfterProp:p}=r,g=h&&s?h.offset>s.offset?h:s:h??s;g&&(!p||p.offset<g.offset)&&i(g,"MISSING_CHAR","Missing newline after block sequence props")}const a=n.type==="block-map"?"map":n.type==="block-seq"?"seq":n.start.source==="{"?"map":"seq";if(!s||!o||o==="!"||o===ci.tagName&&a==="map"||o===Bo.tagName&&a==="seq")return tm(t,e,n,i,o);let c=e.schema.tags.find(h=>h.tag===o&&h.collection===a);if(!c){const h=e.schema.knownTags[o];if(h&&h.collection===a)e.schema.tags.push(Object.assign({},h,{default:!1})),c=h;else return h?.collection?i(s,"BAD_COLLECTION_TYPE",`${h.tag} used for ${a} collection, but expects ${h.collection}`,!0):i(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0),tm(t,e,n,i,o)}const u=tm(t,e,n,i,o,c),d=c.resolve?.(u,h=>i(s,"TAG_RESOLVE_FAILED",h),e.options)??u,f=An(d)?d:new _t(d);return f.range=u.range,f.tag=o,c?.format&&(f.format=c.format),f}function DT(t,e,n){const r=e.offset,i=Jz(e,t.options.strict,n);if(!i)return{value:"",type:null,comment:"",range:[r,r,r]};const s=i.mode===">"?_t.BLOCK_FOLDED:_t.BLOCK_LITERAL,o=e.source?Zz(e.source):[];let a=o.length;for(let m=o.length-1;m>=0;--m){const v=o[m][1];if(v===""||v==="\r")a=m;else break}if(a===0){const m=i.chomp==="+"&&o.length>0?`
320
+ `+v.comment:u.comment=v.comment),u.range=[r.offset,m,v.offset]}else u.range=[r.offset,m,m];return u}function tm(t,e,n,r,i,s){const o=n.type==="block-map"?W3(t,e,n,r,s):n.type==="block-seq"?G3(t,e,n,r,s):K3(t,e,n,r,s),a=o.constructor;return i==="!"||i===a.tagName?(o.tag=a.tagName,o):(i&&(o.tag=i),o)}function Y3(t,e,n,r,i){const s=r.tag,o=s?e.directives.tagName(s.source,h=>i(s,"TAG_RESOLVE_FAILED",h)):null;if(n.type==="block-seq"){const{anchor:h,newlineAfterProp:p}=r,g=h&&s?h.offset>s.offset?h:s:h??s;g&&(!p||p.offset<g.offset)&&i(g,"MISSING_CHAR","Missing newline after block sequence props")}const a=n.type==="block-map"?"map":n.type==="block-seq"?"seq":n.start.source==="{"?"map":"seq";if(!s||!o||o==="!"||o===ci.tagName&&a==="map"||o===Bo.tagName&&a==="seq")return tm(t,e,n,i,o);let c=e.schema.tags.find(h=>h.tag===o&&h.collection===a);if(!c){const h=e.schema.knownTags[o];if(h&&h.collection===a)e.schema.tags.push(Object.assign({},h,{default:!1})),c=h;else return h?.collection?i(s,"BAD_COLLECTION_TYPE",`${h.tag} used for ${a} collection, but expects ${h.collection}`,!0):i(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0),tm(t,e,n,i,o)}const u=tm(t,e,n,i,o,c),d=c.resolve?.(u,h=>i(s,"TAG_RESOLVE_FAILED",h),e.options)??u,f=An(d)?d:new _t(d);return f.range=u.range,f.tag=o,c?.format&&(f.format=c.format),f}function DT(t,e,n){const r=e.offset,i=J3(e,t.options.strict,n);if(!i)return{value:"",type:null,comment:"",range:[r,r,r]};const s=i.mode===">"?_t.BLOCK_FOLDED:_t.BLOCK_LITERAL,o=e.source?Z3(e.source):[];let a=o.length;for(let m=o.length-1;m>=0;--m){const v=o[m][1];if(v===""||v==="\r")a=m;else break}if(a===0){const m=i.chomp==="+"&&o.length>0?`
321
321
  `.repeat(Math.max(1,o.length-1)):"";let v=r+i.length;return e.source&&(v+=e.source.length),{value:m,type:s,comment:i.comment,range:[r,v,v]}}let c=e.indent+i.indent,u=e.offset+i.length,d=0;for(let m=0;m<a;++m){const[v,_]=o[m];if(_===""||_==="\r")i.indent===0&&v.length>c&&(c=v.length);else{v.length<c&&n(u+v.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),i.indent===0&&(c=v.length),d=m,c===0&&!t.atRoot&&n(u,"BAD_INDENT","Block scalar values in collections must be indented");break}u+=v.length+_.length+1}for(let m=o.length-1;m>=a;--m)o[m][0].length>c&&(a=m+1);let f="",h="",p=!1;for(let m=0;m<d;++m)f+=o[m][0].slice(c)+`
322
322
  `;for(let m=d;m<a;++m){let[v,_]=o[m];u+=v.length+_.length+1;const b=_[_.length-1]==="\r";if(b&&(_=_.slice(0,-1)),_&&v.length<c){const x=`Block scalar lines must not be less indented than their ${i.indent?"explicit indentation indicator":"first line"}`;n(u-_.length-(b?2:1),"BAD_INDENT",x),v=""}s===_t.BLOCK_LITERAL?(f+=h+v.slice(c)+_,h=`
323
323
  `):v.length>c||_[0]===" "?(h===" "?h=`
@@ -332,41 +332,41 @@ ${u}
332
332
  `+o[m][0].slice(c);f[f.length-1]!==`
333
333
  `&&(f+=`
334
334
  `);break;default:f+=`
335
- `}const g=r+i.length+e.source.length;return{value:f,type:s,comment:i.comment,range:[r,g,g]}}function Jz({offset:t,props:e},n,r){if(e[0].type!=="block-scalar-header")return r(e[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:i}=e[0],s=i[0];let o=0,a="",c=-1;for(let h=1;h<i.length;++h){const p=i[h];if(!a&&(p==="-"||p==="+"))a=p;else{const g=Number(p);!o&&g?o=g:c===-1&&(c=t+h)}}c!==-1&&r(c,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${i}`);let u=!1,d="",f=i.length;for(let h=1;h<e.length;++h){const p=e[h];switch(p.type){case"space":u=!0;case"newline":f+=p.source.length;break;case"comment":n&&!u&&r(p,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),f+=p.source.length,d=p.source.substring(1);break;case"error":r(p,"UNEXPECTED_TOKEN",p.message),f+=p.source.length;break;default:{const g=`Unexpected token in block scalar header: ${p.type}`;r(p,"UNEXPECTED_TOKEN",g);const m=p.source;m&&typeof m=="string"&&(f+=m.length)}}}return{mode:s,indent:o,chomp:a,comment:d,length:f}}function Zz(t){const e=t.split(/\n( *)/),n=e[0],r=n.match(/^( *)/),s=[r?.[1]?[r[1],n.slice(r[1].length)]:["",n]];for(let o=1;o<e.length;o+=2)s.push([e[o],e[o+1]]);return s}function MT(t,e,n){const{offset:r,type:i,source:s,end:o}=t;let a,c;const u=(h,p,g)=>n(r+h,p,g);switch(i){case"scalar":a=_t.PLAIN,c=Xz(s,u);break;case"single-quoted-scalar":a=_t.QUOTE_SINGLE,c=Qz(s,u);break;case"double-quoted-scalar":a=_t.QUOTE_DOUBLE,c=e3(s,u);break;default:return n(t,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${i}`),{value:"",type:null,comment:"",range:[r,r+s.length,r+s.length]}}const d=r+s.length,f=Pd(o,d,e,n);return{value:c,type:a,comment:f.comment,range:[r,d,f.offset]}}function Xz(t,e){let n="";switch(t[0]){case" ":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":{n=`block scalar indicator ${t[0]}`;break}case"@":case"`":{n=`reserved character ${t[0]}`;break}}return n&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`),FT(t)}function Qz(t,e){return(t[t.length-1]!=="'"||t.length===1)&&e(t.length,"MISSING_CHAR","Missing closing 'quote"),FT(t.slice(1,-1)).replace(/''/g,"'")}function FT(t){let e,n;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
335
+ `}const g=r+i.length+e.source.length;return{value:f,type:s,comment:i.comment,range:[r,g,g]}}function J3({offset:t,props:e},n,r){if(e[0].type!=="block-scalar-header")return r(e[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:i}=e[0],s=i[0];let o=0,a="",c=-1;for(let h=1;h<i.length;++h){const p=i[h];if(!a&&(p==="-"||p==="+"))a=p;else{const g=Number(p);!o&&g?o=g:c===-1&&(c=t+h)}}c!==-1&&r(c,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${i}`);let u=!1,d="",f=i.length;for(let h=1;h<e.length;++h){const p=e[h];switch(p.type){case"space":u=!0;case"newline":f+=p.source.length;break;case"comment":n&&!u&&r(p,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),f+=p.source.length,d=p.source.substring(1);break;case"error":r(p,"UNEXPECTED_TOKEN",p.message),f+=p.source.length;break;default:{const g=`Unexpected token in block scalar header: ${p.type}`;r(p,"UNEXPECTED_TOKEN",g);const m=p.source;m&&typeof m=="string"&&(f+=m.length)}}}return{mode:s,indent:o,chomp:a,comment:d,length:f}}function Z3(t){const e=t.split(/\n( *)/),n=e[0],r=n.match(/^( *)/),s=[r?.[1]?[r[1],n.slice(r[1].length)]:["",n]];for(let o=1;o<e.length;o+=2)s.push([e[o],e[o+1]]);return s}function MT(t,e,n){const{offset:r,type:i,source:s,end:o}=t;let a,c;const u=(h,p,g)=>n(r+h,p,g);switch(i){case"scalar":a=_t.PLAIN,c=X3(s,u);break;case"single-quoted-scalar":a=_t.QUOTE_SINGLE,c=Q3(s,u);break;case"double-quoted-scalar":a=_t.QUOTE_DOUBLE,c=ez(s,u);break;default:return n(t,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${i}`),{value:"",type:null,comment:"",range:[r,r+s.length,r+s.length]}}const d=r+s.length,f=Pd(o,d,e,n);return{value:c,type:a,comment:f.comment,range:[r,d,f.offset]}}function X3(t,e){let n="";switch(t[0]){case" ":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":{n=`block scalar indicator ${t[0]}`;break}case"@":case"`":{n=`reserved character ${t[0]}`;break}}return n&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`),FT(t)}function Q3(t,e){return(t[t.length-1]!=="'"||t.length===1)&&e(t.length,"MISSING_CHAR","Missing closing 'quote"),FT(t.slice(1,-1)).replace(/''/g,"'")}function FT(t){let e,n;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
336
336
  `,"sy"),n=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
337
337
  `,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=e.exec(t);if(!r)return t;let i=r[1],s=" ",o=e.lastIndex;for(n.lastIndex=o;r=n.exec(t);)r[1]===""?s===`
338
338
  `?i+=s:s=`
339
- `:(i+=s+r[1],s=" "),o=n.lastIndex;const a=/[ \t]*(.*)/sy;return a.lastIndex=o,r=a.exec(t),i+s+(r?.[1]??"")}function e3(t,e){let n="";for(let r=1;r<t.length-1;++r){const i=t[r];if(!(i==="\r"&&t[r+1]===`
339
+ `:(i+=s+r[1],s=" "),o=n.lastIndex;const a=/[ \t]*(.*)/sy;return a.lastIndex=o,r=a.exec(t),i+s+(r?.[1]??"")}function ez(t,e){let n="";for(let r=1;r<t.length-1;++r){const i=t[r];if(!(i==="\r"&&t[r+1]===`
340
340
  `))if(i===`
341
- `){const{fold:s,offset:o}=t3(t,r);n+=s,r=o}else if(i==="\\"){let s=t[++r];const o=n3[s];if(o)n+=o;else if(s===`
341
+ `){const{fold:s,offset:o}=tz(t,r);n+=s,r=o}else if(i==="\\"){let s=t[++r];const o=nz[s];if(o)n+=o;else if(s===`
342
342
  `)for(s=t[r+1];s===" "||s===" ";)s=t[++r+1];else if(s==="\r"&&t[r+1]===`
343
- `)for(s=t[++r+1];s===" "||s===" ";)s=t[++r+1];else if(s==="x"||s==="u"||s==="U"){const a={x:2,u:4,U:8}[s];n+=r3(t,r+1,a,e),r+=a}else{const a=t.substr(r-1,2);e(r-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),n+=a}}else if(i===" "||i===" "){const s=r;let o=t[r+1];for(;o===" "||o===" ";)o=t[++r+1];o!==`
343
+ `)for(s=t[++r+1];s===" "||s===" ";)s=t[++r+1];else if(s==="x"||s==="u"||s==="U"){const a={x:2,u:4,U:8}[s];n+=rz(t,r+1,a,e),r+=a}else{const a=t.substr(r-1,2);e(r-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),n+=a}}else if(i===" "||i===" "){const s=r;let o=t[r+1];for(;o===" "||o===" ";)o=t[++r+1];o!==`
344
344
  `&&!(o==="\r"&&t[r+2]===`
345
- `)&&(n+=r>s?t.slice(s,r+1):i)}else n+=i}return(t[t.length-1]!=='"'||t.length===1)&&e(t.length,"MISSING_CHAR",'Missing closing "quote'),n}function t3(t,e){let n="",r=t[e+1];for(;(r===" "||r===" "||r===`
345
+ `)&&(n+=r>s?t.slice(s,r+1):i)}else n+=i}return(t[t.length-1]!=='"'||t.length===1)&&e(t.length,"MISSING_CHAR",'Missing closing "quote'),n}function tz(t,e){let n="",r=t[e+1];for(;(r===" "||r===" "||r===`
346
346
  `||r==="\r")&&!(r==="\r"&&t[e+2]!==`
347
347
  `);)r===`
348
348
  `&&(n+=`
349
- `),e+=1,r=t[e+1];return n||(n=" "),{fold:n,offset:e}}const n3={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
350
- `,r:"\r",t:" ",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function r3(t,e,n,r){const i=t.substr(e,n),o=i.length===n&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;if(isNaN(o)){const a=t.substr(e-2,n+2);return r(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}return String.fromCodePoint(o)}function zT(t,e,n,r){const{value:i,type:s,comment:o,range:a}=e.type==="block-scalar"?DT(t,e,r):MT(e,t.options.strict,r),c=n?t.directives.tagName(n.source,f=>r(n,"TAG_RESOLVE_FAILED",f)):null;let u;t.options.stringKeys&&t.atKey?u=t.schema[Os]:c?u=i3(t.schema,i,c,n,r):e.type==="scalar"?u=s3(t,i,e,r):u=t.schema[Os];let d;try{const f=u.resolve(i,h=>r(n??e,"TAG_RESOLVE_FAILED",h),t.options);d=rn(f)?f:new _t(f)}catch(f){const h=f instanceof Error?f.message:String(f);r(n??e,"TAG_RESOLVE_FAILED",h),d=new _t(i)}return d.range=a,d.source=i,s&&(d.type=s),c&&(d.tag=c),u.format&&(d.format=u.format),o&&(d.comment=o),d}function i3(t,e,n,r,i){if(n==="!")return t[Os];const s=[];for(const a of t.tags)if(!a.collection&&a.tag===n)if(a.default&&a.test)s.push(a);else return a;for(const a of s)if(a.test?.test(e))return a;const o=t.knownTags[n];return o&&!o.collection?(t.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(i(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,n!=="tag:yaml.org,2002:str"),t[Os])}function s3({atKey:t,directives:e,schema:n},r,i,s){const o=n.tags.find(a=>(a.default===!0||t&&a.default==="key")&&a.test?.test(r))||n[Os];if(n.compat){const a=n.compat.find(c=>c.default&&c.test?.test(r))??n[Os];if(o.tag!==a.tag){const c=e.tagString(o.tag),u=e.tagString(a.tag),d=`Value may be parsed as either ${c} or ${u}`;s(i,"TAG_RESOLVE_FAILED",d,!0)}}return o}function o3(t,e,n){if(e){n===null&&(n=e.length);for(let r=n-1;r>=0;--r){let i=e[r];switch(i.type){case"space":case"comment":case"newline":t-=i.source.length;continue}for(i=e[++r];i?.type==="space";)t+=i.source.length,i=e[++r];break}}return t}const a3={composeNode:jT,composeEmptyNode:y_};function jT(t,e,n,r){const i=t.atKey,{spaceBefore:s,comment:o,anchor:a,tag:c}=n;let u,d=!0;switch(e.type){case"alias":u=l3(t,e,r),(a||c)&&r(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":u=zT(t,e,c,r),a&&(u.anchor=a.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":u=Yz(a3,t,e,n,r),a&&(u.anchor=a.source.substring(1));break;default:{const f=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;r(e,"UNEXPECTED_TOKEN",f),u=y_(t,e.offset,void 0,null,n,r),d=!1}}return a&&u.anchor===""&&r(a,"BAD_ALIAS","Anchor cannot be an empty string"),i&&t.options.stringKeys&&(!rn(u)||typeof u.value!="string"||u.tag&&u.tag!=="tag:yaml.org,2002:str")&&r(c??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),s&&(u.spaceBefore=!0),o&&(e.type==="scalar"&&e.source===""?u.comment=o:u.commentBefore=o),t.options.keepSourceTokens&&d&&(u.srcToken=e),u}function y_(t,e,n,r,{spaceBefore:i,comment:s,anchor:o,tag:a,end:c},u){const d={type:"scalar",offset:o3(e,n,r),indent:-1,source:""},f=zT(t,d,a,u);return o&&(f.anchor=o.source.substring(1),f.anchor===""&&u(o,"BAD_ALIAS","Anchor cannot be an empty string")),i&&(f.spaceBefore=!0),s&&(f.comment=s,f.range[2]=c),f}function l3({options:t},{offset:e,source:n,end:r},i){const s=new Op(n.substring(1));s.source===""&&i(e,"BAD_ALIAS","Alias cannot be an empty string"),s.source.endsWith(":")&&i(e+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const o=e+n.length,a=Pd(r,o,t.strict,i);return s.range=[e,o,a.offset],a.comment&&(s.comment=a.comment),s}function c3(t,e,{offset:n,start:r,value:i,end:s},o){const a=Object.assign({_directives:e},t),c=new zc(void 0,a),u={atKey:!1,atRoot:!0,directives:c.directives,options:c.options,schema:c.schema},d=sc(r,{indicator:"doc-start",next:i??s?.[0],offset:n,onError:o,parentIndent:0,startOnNewline:!0});d.found&&(c.directives.docStart=!0,i&&(i.type==="block-map"||i.type==="block-seq")&&!d.hasNewline&&o(d.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),c.contents=i?jT(u,i,d,o):y_(u,d.end,r,null,d,o);const f=c.contents.range[2],h=Pd(s,f,!1,o);return h.comment&&(c.comment=h.comment),c.range=[n,f,h.offset],c}function eu(t){if(typeof t=="number")return[t,t+1];if(Array.isArray(t))return t.length===2?t:[t[0],t[1]];const{offset:e,source:n}=t;return[e,e+(typeof n=="string"?n.length:1)]}function T0(t){let e="",n=!1,r=!1;for(let i=0;i<t.length;++i){const s=t[i];switch(s[0]){case"#":e+=(e===""?"":r?`
349
+ `),e+=1,r=t[e+1];return n||(n=" "),{fold:n,offset:e}}const nz={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
350
+ `,r:"\r",t:" ",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function rz(t,e,n,r){const i=t.substr(e,n),o=i.length===n&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;if(isNaN(o)){const a=t.substr(e-2,n+2);return r(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}return String.fromCodePoint(o)}function zT(t,e,n,r){const{value:i,type:s,comment:o,range:a}=e.type==="block-scalar"?DT(t,e,r):MT(e,t.options.strict,r),c=n?t.directives.tagName(n.source,f=>r(n,"TAG_RESOLVE_FAILED",f)):null;let u;t.options.stringKeys&&t.atKey?u=t.schema[Os]:c?u=iz(t.schema,i,c,n,r):e.type==="scalar"?u=sz(t,i,e,r):u=t.schema[Os];let d;try{const f=u.resolve(i,h=>r(n??e,"TAG_RESOLVE_FAILED",h),t.options);d=rn(f)?f:new _t(f)}catch(f){const h=f instanceof Error?f.message:String(f);r(n??e,"TAG_RESOLVE_FAILED",h),d=new _t(i)}return d.range=a,d.source=i,s&&(d.type=s),c&&(d.tag=c),u.format&&(d.format=u.format),o&&(d.comment=o),d}function iz(t,e,n,r,i){if(n==="!")return t[Os];const s=[];for(const a of t.tags)if(!a.collection&&a.tag===n)if(a.default&&a.test)s.push(a);else return a;for(const a of s)if(a.test?.test(e))return a;const o=t.knownTags[n];return o&&!o.collection?(t.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(i(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,n!=="tag:yaml.org,2002:str"),t[Os])}function sz({atKey:t,directives:e,schema:n},r,i,s){const o=n.tags.find(a=>(a.default===!0||t&&a.default==="key")&&a.test?.test(r))||n[Os];if(n.compat){const a=n.compat.find(c=>c.default&&c.test?.test(r))??n[Os];if(o.tag!==a.tag){const c=e.tagString(o.tag),u=e.tagString(a.tag),d=`Value may be parsed as either ${c} or ${u}`;s(i,"TAG_RESOLVE_FAILED",d,!0)}}return o}function oz(t,e,n){if(e){n===null&&(n=e.length);for(let r=n-1;r>=0;--r){let i=e[r];switch(i.type){case"space":case"comment":case"newline":t-=i.source.length;continue}for(i=e[++r];i?.type==="space";)t+=i.source.length,i=e[++r];break}}return t}const az={composeNode:jT,composeEmptyNode:y_};function jT(t,e,n,r){const i=t.atKey,{spaceBefore:s,comment:o,anchor:a,tag:c}=n;let u,d=!0;switch(e.type){case"alias":u=lz(t,e,r),(a||c)&&r(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":u=zT(t,e,c,r),a&&(u.anchor=a.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":u=Y3(az,t,e,n,r),a&&(u.anchor=a.source.substring(1));break;default:{const f=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;r(e,"UNEXPECTED_TOKEN",f),u=y_(t,e.offset,void 0,null,n,r),d=!1}}return a&&u.anchor===""&&r(a,"BAD_ALIAS","Anchor cannot be an empty string"),i&&t.options.stringKeys&&(!rn(u)||typeof u.value!="string"||u.tag&&u.tag!=="tag:yaml.org,2002:str")&&r(c??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),s&&(u.spaceBefore=!0),o&&(e.type==="scalar"&&e.source===""?u.comment=o:u.commentBefore=o),t.options.keepSourceTokens&&d&&(u.srcToken=e),u}function y_(t,e,n,r,{spaceBefore:i,comment:s,anchor:o,tag:a,end:c},u){const d={type:"scalar",offset:oz(e,n,r),indent:-1,source:""},f=zT(t,d,a,u);return o&&(f.anchor=o.source.substring(1),f.anchor===""&&u(o,"BAD_ALIAS","Anchor cannot be an empty string")),i&&(f.spaceBefore=!0),s&&(f.comment=s,f.range[2]=c),f}function lz({options:t},{offset:e,source:n,end:r},i){const s=new Op(n.substring(1));s.source===""&&i(e,"BAD_ALIAS","Alias cannot be an empty string"),s.source.endsWith(":")&&i(e+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const o=e+n.length,a=Pd(r,o,t.strict,i);return s.range=[e,o,a.offset],a.comment&&(s.comment=a.comment),s}function cz(t,e,{offset:n,start:r,value:i,end:s},o){const a=Object.assign({_directives:e},t),c=new zc(void 0,a),u={atKey:!1,atRoot:!0,directives:c.directives,options:c.options,schema:c.schema},d=sc(r,{indicator:"doc-start",next:i??s?.[0],offset:n,onError:o,parentIndent:0,startOnNewline:!0});d.found&&(c.directives.docStart=!0,i&&(i.type==="block-map"||i.type==="block-seq")&&!d.hasNewline&&o(d.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),c.contents=i?jT(u,i,d,o):y_(u,d.end,r,null,d,o);const f=c.contents.range[2],h=Pd(s,f,!1,o);return h.comment&&(c.comment=h.comment),c.range=[n,f,h.offset],c}function eu(t){if(typeof t=="number")return[t,t+1];if(Array.isArray(t))return t.length===2?t:[t[0],t[1]];const{offset:e,source:n}=t;return[e,e+(typeof n=="string"?n.length:1)]}function T0(t){let e="",n=!1,r=!1;for(let i=0;i<t.length;++i){const s=t[i];switch(s[0]){case"#":e+=(e===""?"":r?`
351
351
 
352
352
  `:`
353
353
  `)+(s.substring(1)||" "),n=!0,r=!1;break;case"%":t[i+1]?.[0]!=="#"&&(i+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:e,afterEmptyLine:r}}class w_{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(n,r,i,s)=>{const o=eu(n);s?this.warnings.push(new IT(o,r,i)):this.errors.push(new ga(o,r,i))},this.directives=new Fr({version:e.version||"1.2"}),this.options=e}decorate(e,n){const{comment:r,afterEmptyLine:i}=T0(this.prelude);if(r){const s=e.contents;if(n)e.comment=e.comment?`${e.comment}
354
354
  ${r}`:r;else if(i||e.directives.docStart||!s)e.commentBefore=r;else if(Tn(s)&&!s.flow&&s.items.length>0){let o=s.items[0];bn(o)&&(o=o.key);const a=o.commentBefore;o.commentBefore=a?`${r}
355
355
  ${a}`:r}else{const o=s.commentBefore;s.commentBefore=o?`${r}
356
- ${o}`:r}}n?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:T0(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,n=!1,r=-1){for(const i of e)yield*this.next(i);yield*this.end(n,r)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(n,r,i)=>{const s=eu(e);s[0]+=n,this.onError(s,"BAD_DIRECTIVE",r,i)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const n=c3(this.options,this.directives,e,this.onError);this.atDirectives&&!n.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(n,!1),this.doc&&(yield this.doc),this.doc=n,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const n=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,r=new ga(eu(e),"UNEXPECTED_TOKEN",n);this.atDirectives||!this.doc?this.errors.push(r):this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){const r="Unexpected doc-end without preceding document";this.errors.push(new ga(eu(e),"UNEXPECTED_TOKEN",r));break}this.doc.directives.docEnd=!0;const n=Pd(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),n.comment){const r=this.doc.comment;this.doc.comment=r?`${r}
357
- ${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.push(new ga(eu(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,n=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const r=Object.assign({_directives:this.directives},this.options),i=new zc(void 0,r);this.atDirectives&&this.onError(n,"MISSING_CHAR","Missing directives-end indicator line"),i.range=[0,n,n],this.decorate(i,!1),yield i}}}function u3(t,e=!0,n){if(t){const r=(i,s,o)=>{const a=typeof i=="number"?i:Array.isArray(i)?i[0]:i.offset;if(n)n(a,s,o);else throw new ga([a,a+1],s,o)};switch(t.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return MT(t,e,r);case"block-scalar":return DT({options:{strict:e}},t,r)}}return null}function d3(t,e){const{implicitKey:n=!1,indent:r,inFlow:i=!1,offset:s=-1,type:o="PLAIN"}=e,a=Cd({type:o,value:t},{implicitKey:n,indent:r>0?" ".repeat(r):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}}),c=e.end??[{type:"newline",offset:-1,indent:r,source:`
356
+ ${o}`:r}}n?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:T0(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,n=!1,r=-1){for(const i of e)yield*this.next(i);yield*this.end(n,r)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(n,r,i)=>{const s=eu(e);s[0]+=n,this.onError(s,"BAD_DIRECTIVE",r,i)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const n=cz(this.options,this.directives,e,this.onError);this.atDirectives&&!n.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(n,!1),this.doc&&(yield this.doc),this.doc=n,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const n=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,r=new ga(eu(e),"UNEXPECTED_TOKEN",n);this.atDirectives||!this.doc?this.errors.push(r):this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){const r="Unexpected doc-end without preceding document";this.errors.push(new ga(eu(e),"UNEXPECTED_TOKEN",r));break}this.doc.directives.docEnd=!0;const n=Pd(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),n.comment){const r=this.doc.comment;this.doc.comment=r?`${r}
357
+ ${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.push(new ga(eu(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,n=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const r=Object.assign({_directives:this.directives},this.options),i=new zc(void 0,r);this.atDirectives&&this.onError(n,"MISSING_CHAR","Missing directives-end indicator line"),i.range=[0,n,n],this.decorate(i,!1),yield i}}}function uz(t,e=!0,n){if(t){const r=(i,s,o)=>{const a=typeof i=="number"?i:Array.isArray(i)?i[0]:i.offset;if(n)n(a,s,o);else throw new ga([a,a+1],s,o)};switch(t.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return MT(t,e,r);case"block-scalar":return DT({options:{strict:e}},t,r)}}return null}function dz(t,e){const{implicitKey:n=!1,indent:r,inFlow:i=!1,offset:s=-1,type:o="PLAIN"}=e,a=Cd({type:o,value:t},{implicitKey:n,indent:r>0?" ".repeat(r):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}}),c=e.end??[{type:"newline",offset:-1,indent:r,source:`
358
358
  `}];switch(a[0]){case"|":case">":{const u=a.indexOf(`
359
359
  `),d=a.substring(0,u),f=a.substring(u+1)+`
360
360
  `,h=[{type:"block-scalar-header",offset:s,indent:r,source:d}];return UT(h,c)||h.push({type:"newline",offset:-1,indent:r,source:`
361
- `}),{type:"block-scalar",offset:s,indent:r,props:h,source:f}}case'"':return{type:"double-quoted-scalar",offset:s,indent:r,source:a,end:c};case"'":return{type:"single-quoted-scalar",offset:s,indent:r,source:a,end:c};default:return{type:"scalar",offset:s,indent:r,source:a,end:c}}}function f3(t,e,n={}){let{afterKey:r=!1,implicitKey:i=!1,inFlow:s=!1,type:o}=n,a="indent"in t?t.indent:null;if(r&&typeof a=="number"&&(a+=2),!o)switch(t.type){case"single-quoted-scalar":o="QUOTE_SINGLE";break;case"double-quoted-scalar":o="QUOTE_DOUBLE";break;case"block-scalar":{const u=t.props[0];if(u.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o=u.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:o="PLAIN"}const c=Cd({type:o,value:e},{implicitKey:i||a===null,indent:a!==null&&a>0?" ".repeat(a):"",inFlow:s,options:{blockQuote:!0,lineWidth:-1}});switch(c[0]){case"|":case">":h3(t,c);break;case'"':nm(t,c,"double-quoted-scalar");break;case"'":nm(t,c,"single-quoted-scalar");break;default:nm(t,c,"scalar")}}function h3(t,e){const n=e.indexOf(`
361
+ `}),{type:"block-scalar",offset:s,indent:r,props:h,source:f}}case'"':return{type:"double-quoted-scalar",offset:s,indent:r,source:a,end:c};case"'":return{type:"single-quoted-scalar",offset:s,indent:r,source:a,end:c};default:return{type:"scalar",offset:s,indent:r,source:a,end:c}}}function fz(t,e,n={}){let{afterKey:r=!1,implicitKey:i=!1,inFlow:s=!1,type:o}=n,a="indent"in t?t.indent:null;if(r&&typeof a=="number"&&(a+=2),!o)switch(t.type){case"single-quoted-scalar":o="QUOTE_SINGLE";break;case"double-quoted-scalar":o="QUOTE_DOUBLE";break;case"block-scalar":{const u=t.props[0];if(u.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o=u.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:o="PLAIN"}const c=Cd({type:o,value:e},{implicitKey:i||a===null,indent:a!==null&&a>0?" ".repeat(a):"",inFlow:s,options:{blockQuote:!0,lineWidth:-1}});switch(c[0]){case"|":case">":hz(t,c);break;case'"':nm(t,c,"double-quoted-scalar");break;case"'":nm(t,c,"single-quoted-scalar");break;default:nm(t,c,"scalar")}}function hz(t,e){const n=e.indexOf(`
362
362
  `),r=e.substring(0,n),i=e.substring(n+1)+`
363
363
  `;if(t.type==="block-scalar"){const s=t.props[0];if(s.type!=="block-scalar-header")throw new Error("Invalid block scalar header");s.source=r,t.source=i}else{const{offset:s}=t,o="indent"in t?t.indent:-1,a=[{type:"block-scalar-header",offset:s,indent:o,source:r}];UT(a,"end"in t?t.end:void 0)||a.push({type:"newline",offset:-1,indent:o,source:`
364
364
  `});for(const c of Object.keys(t))c!=="type"&&c!=="offset"&&delete t[c];Object.assign(t,{type:"block-scalar",indent:o,props:a,source:i})}}function UT(t,e){if(e)for(const n of e)switch(n.type){case"space":case"comment":t.push(n);break;case"newline":return t.push(n),!0}return!1}function nm(t,e,n){switch(t.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":t.type=n,t.source=e;break;case"block-scalar":{const r=t.props.slice(1);let i=e.length;t.props[0].type==="block-scalar-header"&&(i-=t.props[0].source.length);for(const s of r)s.offset+=i;delete t.props,Object.assign(t,{type:n,source:e,end:r});break}case"block-map":case"block-seq":{const i={type:"newline",offset:t.offset+e.length,indent:t.indent,source:`
365
- `};delete t.items,Object.assign(t,{type:n,source:e,end:[i]});break}default:{const r="indent"in t?t.indent:-1,i="end"in t&&Array.isArray(t.end)?t.end.filter(s=>s.type==="space"||s.type==="comment"||s.type==="newline"):[];for(const s of Object.keys(t))s!=="type"&&s!=="offset"&&delete t[s];Object.assign(t,{type:n,indent:r,source:e,end:i})}}}const p3=t=>"type"in t?Lh(t):Rf(t);function Lh(t){switch(t.type){case"block-scalar":{let e="";for(const n of t.props)e+=Lh(n);return e+t.source}case"block-map":case"block-seq":{let e="";for(const n of t.items)e+=Rf(n);return e}case"flow-collection":{let e=t.start.source;for(const n of t.items)e+=Rf(n);for(const n of t.end)e+=n.source;return e}case"document":{let e=Rf(t);if(t.end)for(const n of t.end)e+=n.source;return e}default:{let e=t.source;if("end"in t&&t.end)for(const n of t.end)e+=n.source;return e}}}function Rf({start:t,key:e,sep:n,value:r}){let i="";for(const s of t)i+=s.source;if(e&&(i+=Lh(e)),n)for(const s of n)i+=s.source;return r&&(i+=Lh(r)),i}const gv=Symbol("break visit"),g3=Symbol("skip children"),BT=Symbol("remove item");function Fa(t,e){"type"in t&&t.type==="document"&&(t={start:t.start,value:t.value}),qT(Object.freeze([]),t,e)}Fa.BREAK=gv;Fa.SKIP=g3;Fa.REMOVE=BT;Fa.itemAtPath=(t,e)=>{let n=t;for(const[r,i]of e){const s=n?.[r];if(s&&"items"in s)n=s.items[i];else return}return n};Fa.parentCollection=(t,e)=>{const n=Fa.itemAtPath(t,e.slice(0,-1)),r=e[e.length-1][0],i=n?.[r];if(i&&"items"in i)return i;throw new Error("Parent collection not found")};function qT(t,e,n){let r=n(e,t);if(typeof r=="symbol")return r;for(const i of["key","value"]){const s=e[i];if(s&&"items"in s){for(let o=0;o<s.items.length;++o){const a=qT(Object.freeze(t.concat([[i,o]])),s.items[o],n);if(typeof a=="number")o=a-1;else{if(a===gv)return gv;a===BT&&(s.items.splice(o,1),o-=1)}}typeof r=="function"&&i==="key"&&(r=r(e,t))}}return typeof r=="function"?r(e,t):r}const jp="\uFEFF",Up="",Bp="",Xu="",m3=t=>!!t&&"items"in t,v3=t=>!!t&&(t.type==="scalar"||t.type==="single-quoted-scalar"||t.type==="double-quoted-scalar"||t.type==="block-scalar");function b3(t){switch(t){case jp:return"<BOM>";case Up:return"<DOC>";case Bp:return"<FLOW_END>";case Xu:return"<SCALAR>";default:return JSON.stringify(t)}}function HT(t){switch(t){case jp:return"byte-order-mark";case Up:return"doc-mode";case Bp:return"flow-error-end";case Xu:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
365
+ `};delete t.items,Object.assign(t,{type:n,source:e,end:[i]});break}default:{const r="indent"in t?t.indent:-1,i="end"in t&&Array.isArray(t.end)?t.end.filter(s=>s.type==="space"||s.type==="comment"||s.type==="newline"):[];for(const s of Object.keys(t))s!=="type"&&s!=="offset"&&delete t[s];Object.assign(t,{type:n,indent:r,source:e,end:i})}}}const pz=t=>"type"in t?Lh(t):Rf(t);function Lh(t){switch(t.type){case"block-scalar":{let e="";for(const n of t.props)e+=Lh(n);return e+t.source}case"block-map":case"block-seq":{let e="";for(const n of t.items)e+=Rf(n);return e}case"flow-collection":{let e=t.start.source;for(const n of t.items)e+=Rf(n);for(const n of t.end)e+=n.source;return e}case"document":{let e=Rf(t);if(t.end)for(const n of t.end)e+=n.source;return e}default:{let e=t.source;if("end"in t&&t.end)for(const n of t.end)e+=n.source;return e}}}function Rf({start:t,key:e,sep:n,value:r}){let i="";for(const s of t)i+=s.source;if(e&&(i+=Lh(e)),n)for(const s of n)i+=s.source;return r&&(i+=Lh(r)),i}const gv=Symbol("break visit"),gz=Symbol("skip children"),BT=Symbol("remove item");function Fa(t,e){"type"in t&&t.type==="document"&&(t={start:t.start,value:t.value}),qT(Object.freeze([]),t,e)}Fa.BREAK=gv;Fa.SKIP=gz;Fa.REMOVE=BT;Fa.itemAtPath=(t,e)=>{let n=t;for(const[r,i]of e){const s=n?.[r];if(s&&"items"in s)n=s.items[i];else return}return n};Fa.parentCollection=(t,e)=>{const n=Fa.itemAtPath(t,e.slice(0,-1)),r=e[e.length-1][0],i=n?.[r];if(i&&"items"in i)return i;throw new Error("Parent collection not found")};function qT(t,e,n){let r=n(e,t);if(typeof r=="symbol")return r;for(const i of["key","value"]){const s=e[i];if(s&&"items"in s){for(let o=0;o<s.items.length;++o){const a=qT(Object.freeze(t.concat([[i,o]])),s.items[o],n);if(typeof a=="number")o=a-1;else{if(a===gv)return gv;a===BT&&(s.items.splice(o,1),o-=1)}}typeof r=="function"&&i==="key"&&(r=r(e,t))}}return typeof r=="function"?r(e,t):r}const jp="\uFEFF",Up="",Bp="",Xu="",mz=t=>!!t&&"items"in t,vz=t=>!!t&&(t.type==="scalar"||t.type==="single-quoted-scalar"||t.type==="double-quoted-scalar"||t.type==="block-scalar");function bz(t){switch(t){case jp:return"<BOM>";case Up:return"<DOC>";case Bp:return"<FLOW_END>";case Xu:return"<SCALAR>";default:return JSON.stringify(t)}}function HT(t){switch(t){case jp:return"byte-order-mark";case Up:return"doc-mode";case Bp:return"flow-error-end";case Xu:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
366
366
  `:case`\r
367
- `:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(t[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}const _3=Object.freeze(Object.defineProperty({__proto__:null,BOM:jp,DOCUMENT:Up,FLOW_END:Bp,SCALAR:Xu,createScalarToken:d3,isCollection:m3,isScalar:v3,prettyToken:b3,resolveAsScalar:u3,setScalarValue:f3,stringify:p3,tokenType:HT,visit:Fa},Symbol.toStringTag,{value:"Module"}));function Bi(t){switch(t){case void 0:case" ":case`
368
- `:case"\r":case" ":return!0;default:return!1}}const C0=new Set("0123456789ABCDEFabcdef"),y3=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),gf=new Set(",[]{}"),w3=new Set(` ,[]{}
369
- \r `),rm=t=>!t||w3.has(t);class VT{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,n=!1){if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!n;let r=this.next??"stream";for(;r&&(n||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let e=this.pos,n=this.buffer[e];for(;n===" "||n===" ";)n=this.buffer[++e];return!n||n==="#"||n===`
367
+ `:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(t[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}const _z=Object.freeze(Object.defineProperty({__proto__:null,BOM:jp,DOCUMENT:Up,FLOW_END:Bp,SCALAR:Xu,createScalarToken:dz,isCollection:mz,isScalar:vz,prettyToken:bz,resolveAsScalar:uz,setScalarValue:fz,stringify:pz,tokenType:HT,visit:Fa},Symbol.toStringTag,{value:"Module"}));function Bi(t){switch(t){case void 0:case" ":case`
368
+ `:case"\r":case" ":return!0;default:return!1}}const C0=new Set("0123456789ABCDEFabcdef"),yz=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),gf=new Set(",[]{}"),wz=new Set(` ,[]{}
369
+ \r `),rm=t=>!t||wz.has(t);class VT{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,n=!1){if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!n;let r=this.next??"stream";for(;r&&(n||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let e=this.pos,n=this.buffer[e];for(;n===" "||n===" ";)n=this.buffer[++e];return!n||n==="#"||n===`
370
370
  `?!0:n==="\r"?this.buffer[e+1]===`
371
371
  `:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let n=this.buffer[e];if(this.indentNext>0){let r=0;for(;n===" ";)n=this.buffer[++r+e];if(n==="\r"){const i=this.buffer[r+e+1];if(i===`
372
372
  `||!i&&!this.atEnd)return e+r+1}return n===`
@@ -381,18 +381,18 @@ ${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.pus
381
381
  `&&s>=this.pos&&s+1+n>a)e=s;else break}while(!0);return yield Xu,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let n=this.pos-1,r=this.pos-1,i;for(;i=this.buffer[++r];)if(i===":"){const s=this.buffer[r+1];if(Bi(s)||e&&gf.has(s))break;n=r}else if(Bi(i)){let s=this.buffer[r+1];if(i==="\r"&&(s===`
382
382
  `?(r+=1,i=`
383
383
  `,s=this.buffer[r+1]):n=r),s==="#"||e&&gf.has(s))break;if(i===`
384
- `){const o=this.continueScalar(r+1);if(o===-1)break;r=Math.max(r,o-2)}}else{if(e&&gf.has(i))break;n=r}return!i&&!this.atEnd?this.setNext("plain-scalar"):(yield Xu,yield*this.pushToIndex(n+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,n){const r=this.buffer.slice(this.pos,e);return r?(yield r,this.pos+=r.length,r.length):(n&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(rm))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,n=this.charAt(1);if(Bi(n)||e&&gf.has(n))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,n=this.buffer[e];for(;!Bi(n)&&n!==">";)n=this.buffer[++e];return yield*this.pushToIndex(n===">"?e+1:e,!1)}else{let e=this.pos+1,n=this.buffer[e];for(;n;)if(y3.has(n))n=this.buffer[++e];else if(n==="%"&&C0.has(this.buffer[e+1])&&C0.has(this.buffer[e+2]))n=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return e===`
384
+ `){const o=this.continueScalar(r+1);if(o===-1)break;r=Math.max(r,o-2)}}else{if(e&&gf.has(i))break;n=r}return!i&&!this.atEnd?this.setNext("plain-scalar"):(yield Xu,yield*this.pushToIndex(n+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,n){const r=this.buffer.slice(this.pos,e);return r?(yield r,this.pos+=r.length,r.length):(n&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(rm))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,n=this.charAt(1);if(Bi(n)||e&&gf.has(n))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,n=this.buffer[e];for(;!Bi(n)&&n!==">";)n=this.buffer[++e];return yield*this.pushToIndex(n===">"?e+1:e,!1)}else{let e=this.pos+1,n=this.buffer[e];for(;n;)if(yz.has(n))n=this.buffer[++e];else if(n==="%"&&C0.has(this.buffer[e+1])&&C0.has(this.buffer[e+2]))n=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return e===`
385
385
  `?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
386
386
  `?yield*this.pushCount(2):0}*pushSpaces(e){let n=this.pos-1,r;do r=this.buffer[++n];while(r===" "||e&&r===" ");const i=n-this.pos;return i>0&&(yield this.buffer.substr(this.pos,i),this.pos=n),i}*pushUntil(e){let n=this.pos,r=this.buffer[n];for(;!e(r);)r=this.buffer[++n];return yield*this.pushToIndex(n,!1)}}class WT{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let n=0,r=this.lineStarts.length;for(;n<r;){const s=n+r>>1;this.lineStarts[s]<e?n=s+1:r=s}if(this.lineStarts[n]===e)return{line:n+1,col:1};if(n===0)return{line:0,col:e};const i=this.lineStarts[n-1];return{line:n,col:e-i+1}}}}function aa(t,e){for(let n=0;n<t.length;++n)if(t[n].type===e)return!0;return!1}function A0(t){for(let e=0;e<t.length;++e)switch(t[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function GT(t){switch(t?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function mf(t){switch(t.type){case"document":return t.start;case"block-map":{const e=t.items[t.items.length-1];return e.sep??e.start}case"block-seq":return t.items[t.items.length-1].start;default:return[]}}function gl(t){if(t.length===0)return[];let e=t.length;e:for(;--e>=0;)switch(t[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;t[++e]?.type==="space";);return t.splice(e,t.length)}function P0(t){if(t.start.type==="flow-seq-start")for(const e of t.items)e.sep&&!e.value&&!aa(e.start,"explicit-key-ind")&&!aa(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,GT(e.value)?e.value.end?Array.prototype.push.apply(e.value.end,e.sep):e.value.end=e.sep:Array.prototype.push.apply(e.start,e.sep),delete e.sep)}class x_{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new VT,this.onNewLine=e}*parse(e,n=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const r of this.lexer.lex(e,n))yield*this.next(r);n||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}const n=HT(e);if(n)if(n==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=n,yield*this.step(),n){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{const r=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:r,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const e=this.peek(1);if(this.type==="doc-end"&&(!e||e.type!=="doc-end")){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){const n=e??this.stack.pop();if(!n)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield n;else{const r=this.peek(1);switch(n.type==="block-scalar"?n.indent="indent"in r?r.indent:0:n.type==="flow-collection"&&r.type==="document"&&(n.indent=0),n.type==="flow-collection"&&P0(n),r.type){case"document":r.value=n;break;case"block-scalar":r.props.push(n);break;case"block-map":{const i=r.items[r.items.length-1];if(i.value){r.items.push({start:[],key:n,sep:[]}),this.onKeyLine=!0;return}else if(i.sep)i.value=n;else{Object.assign(i,{key:n,sep:[]}),this.onKeyLine=!i.explicitKey;return}break}case"block-seq":{const i=r.items[r.items.length-1];i.value?r.items.push({start:[],value:n}):i.value=n;break}case"flow-collection":{const i=r.items[r.items.length-1];!i||i.value?r.items.push({start:[],key:n,sep:[]}):i.sep?i.value=n:Object.assign(i,{key:n,sep:[]});return}default:yield*this.pop(),yield*this.pop(n)}if((r.type==="document"||r.type==="block-map"||r.type==="block-seq")&&(n.type==="block-map"||n.type==="block-seq")){const i=n.items[n.items.length-1];i&&!i.sep&&!i.value&&i.start.length>0&&A0(i.start)===-1&&(n.indent===0||i.start.every(s=>s.type!=="comment"||s.indent<n.indent))&&(r.type==="document"?r.end=i.start:r.items.push({start:i.start}),n.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{const e={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":{A0(e.start)!==-1?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}const n=this.startBlockValue(e);n?this.stack.push(n):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type==="map-value-ind"){const n=mf(this.peek(2)),r=gl(n);let i;e.end?(i=e.end,i.push(this.sourceToken),delete e.end):i=[this.sourceToken];const s={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:r,key:e,sep:i}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=s}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let n=this.source.indexOf(`
387
387
  `)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
388
388
  `,n)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){const n=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,n.value){const r="end"in n.value?n.value.end:void 0;(Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment"?r?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)e.items.push({start:[this.sourceToken]});else if(n.sep)n.sep.push(this.sourceToken);else{if(this.atIndentedComment(n.start,e.indent)){const i=e.items[e.items.length-2]?.value?.end;if(Array.isArray(i)){Array.prototype.push.apply(i,n.start),i.push(this.sourceToken),e.items.pop();return}}n.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const r=!this.onKeyLine&&this.indent===e.indent,i=r&&(n.sep||n.explicitKey)&&this.type!=="seq-item-ind";let s=[];if(i&&n.sep&&!n.value){const o=[];for(let a=0;a<n.sep.length;++a){const c=n.sep[a];switch(c.type){case"newline":o.push(a);break;case"space":break;case"comment":c.indent>e.indent&&(o.length=0);break;default:o.length=0}}o.length>=2&&(s=n.sep.splice(o[1]))}switch(this.type){case"anchor":case"tag":i||n.value?(s.push(this.sourceToken),e.items.push({start:s}),this.onKeyLine=!0):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"explicit-key-ind":!n.sep&&!n.explicitKey?(n.start.push(this.sourceToken),n.explicitKey=!0):i||n.value?(s.push(this.sourceToken),e.items.push({start:s,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(n.explicitKey)if(n.sep)if(n.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(aa(n.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]});else if(GT(n.key)&&!aa(n.sep,"newline")){const o=gl(n.start),a=n.key,c=n.sep;c.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:a,sep:c}]})}else s.length>0?n.sep=n.sep.concat(s,this.sourceToken):n.sep.push(this.sourceToken);else if(aa(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{const o=gl(n.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]})}else n.sep?n.value||i?e.items.push({start:s,key:null,sep:[this.sourceToken]}):aa(n.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const o=this.flowScalar(this.type);i||n.value?(e.items.push({start:s,key:o,sep:[]}),this.onKeyLine=!0):n.sep?this.stack.push(o):(Object.assign(n,{key:o,sep:[]}),this.onKeyLine=!0);return}default:{const o=this.startBlockValue(e);if(o){r&&o.type!=="block-seq"&&e.items.push({start:s}),this.stack.push(o);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){const n=e.items[e.items.length-1];switch(this.type){case"newline":if(n.value){const r="end"in n.value?n.value.end:void 0;(Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment"?r?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(n.start,e.indent)){const i=e.items[e.items.length-2]?.value?.end;if(Array.isArray(i)){Array.prototype.push.apply(i,n.start),i.push(this.sourceToken),e.items.pop();return}}n.start.push(this.sourceToken)}return;case"anchor":case"tag":if(n.value||this.indent<=e.indent)break;n.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;n.value||aa(n.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return}if(this.indent>e.indent){const r=this.startBlockValue(e);if(r){this.stack.push(r);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){const n=e.items[e.items.length-1];if(this.type==="flow-error-end"){let r;do yield*this.pop(),r=this.peek(1);while(r&&r.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!n||n.sep?e.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return;case"map-value-ind":!n||n.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!n||n.value?e.items.push({start:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const i=this.flowScalar(this.type);!n||n.value?e.items.push({start:[],key:i,sep:[]}):n.sep?this.stack.push(i):Object.assign(n,{key:i,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}const r=this.startBlockValue(e);r?this.stack.push(r):(yield*this.pop(),yield*this.step())}else{const r=this.peek(2);if(r.type==="block-map"&&(this.type==="map-value-ind"&&r.indent===e.indent||this.type==="newline"&&!r.items[r.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&r.type!=="flow-collection"){const i=mf(r),s=gl(i);P0(e);const o=e.end.splice(1,e.end.length);o.push(this.sourceToken);const a={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:s,key:e,sep:o}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=a}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let n=this.source.indexOf(`
389
389
  `)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
390
- `,n)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const n=mf(e),r=gl(n);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const n=mf(e),r=gl(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,n){return this.type!=="comment"||this.indent<=n?!1:e.every(r=>r.type==="newline"||r.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function KT(t){const e=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||e&&new WT||null,prettyErrors:e}}function x3(t,e={}){const{lineCounter:n,prettyErrors:r}=KT(e),i=new x_(n?.addNewLine),s=new w_(e),o=Array.from(s.compose(i.parse(t)));if(r&&n)for(const a of o)a.errors.forEach($h(t,n)),a.warnings.forEach($h(t,n));return o.length>0?o:Object.assign([],{empty:!0},s.streamInfo())}function YT(t,e={}){const{lineCounter:n,prettyErrors:r}=KT(e),i=new x_(n?.addNewLine),s=new w_(e);let o=null;for(const a of s.compose(i.parse(t),!0,t.length))if(!o)o=a;else if(o.options.logLevel!=="silent"){o.errors.push(new ga(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&n&&(o.errors.forEach($h(t,n)),o.warnings.forEach($h(t,n))),o}function k3(t,e,n){let r;typeof e=="function"?r=e:n===void 0&&e&&typeof e=="object"&&(n=e);const i=YT(t,n);if(!i)return null;if(i.warnings.forEach(s=>gT(i.options.logLevel,s)),i.errors.length>0){if(i.options.logLevel!=="silent")throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:r},n))}function S3(t,e,n){let r=null;if(typeof e=="function"||Array.isArray(e)?r=e:n===void 0&&e&&(n=e),typeof n=="string"&&(n=n.length),typeof n=="number"){const i=Math.round(n);n=i<1?void 0:i>8?{indent:8}:{indent:i}}if(t===void 0){const{keepUndefined:i}=n??e??{};if(!i)return}return Za(t)&&!r?t.toString(n):new zc(t,r,n).toString(n)}const Od=Object.freeze(Object.defineProperty({__proto__:null,Alias:Op,CST:_3,Composer:w_,Document:zc,Lexer:VT,LineCounter:WT,Pair:Pr,Parser:x_,Scalar:_t,Schema:zp,YAMLError:__,YAMLMap:ci,YAMLParseError:ga,YAMLSeq:Bo,YAMLWarning:IT,isAlias:Ja,isCollection:Tn,isDocument:Za,isMap:Rc,isNode:An,isPair:bn,isScalar:rn,isSeq:Dc,parse:k3,parseAllDocuments:x3,parseDocument:YT,stringify:S3,visit:Uo,visitAsync:Pp},Symbol.toStringTag,{value:"Module"}));var im,O0;function E3(){return O0||(O0=1,im=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,i,s;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!t(e[i],n[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(s=Object.keys(e),r=s.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,s[i]))return!1;for(i=r;i--!==0;){var o=s[i];if(!t(e[o],n[o]))return!1}return!0}return e!==e&&n!==n}),im}var T3=E3();const zn=ip(T3),mv="sveltia-cms.prefs",vv=st(),Tt=st({},t=>{vv.set(void 0),(async()=>{try{const e=await ti.get(mv)??{};e.apiKeys??={},e.closeOnSave??=!0,e.underlineLinks??=!0,t(e)}catch{vv.set({type:"permission_denied"})}})()});Tt.subscribe(t=>{if(!t||!Object.keys(t).length)return;(async()=>{try{zn(t,await ti.get(mv))||await ti.set(mv,t)}catch{}})();const{locale:e,theme:n,underlineLinks:r=!0,devModeEnabled:i=!1}=t;e&&ne(Dk).includes(e)&&Nn.set(e);const s=!n||n==="auto",o=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";Object.assign(document.documentElement.dataset,{theme:s?o:n,autoTheming:s,underlineLinks:r,env:i?"dev":"prod"})});const Ri={i18nEnabled:!1,saveAllLocales:!0,allLocales:["_default"],initialLocales:["_default"],defaultLocale:"_default",structure:"single_file",canonicalSlug:{key:"translationKey",value:"{{slug}}"}},Nh=(t,e)=>{const n=ne(wt);let r;Jn(n.i18n)&&(r=n.i18n,t.i18n?(Jn(t.i18n)&&Object.assign(r,t.i18n),e&&(e.i18n?Jn(e.i18n)&&Object.assign(r,e.i18n):r=void 0)):r=void 0);const{structure:i="single_file",locales:s=[],default_locale:o=void 0,initial_locales:a=void 0,save_all_locales:c=!0,canonical_slug:{key:u="translationKey",value:d="{{slug}}"}={}}=r??{},f=!!s.length,h=f?s:["_default"],p=f?c===!0&&a===void 0:!0,g=f?o&&h.includes(o)?o:h[0]:"_default",m=a==="all"?h:a==="default"?[g]:h.filter(_=>_===g||(Array.isArray(a)?a.includes(_):!0)),v=e?e.file.includes("{{locale}}")?"multiple_files":"single_file":i;return{i18nEnabled:f,saveAllLocales:p,allLocales:h,defaultLocale:g,initialLocales:m,structure:v,canonicalSlug:{key:u,value:d}}},qp=t=>{let e;if(t!=="_default")try{[e]=Intl.getCanonicalLocales(t)}catch{}return e},$s=t=>{const e=qp(t);if(!e)return t;const n=new Intl.DisplayNames(ne(Nn),{type:"language"});try{return n.of(e)??t}catch(r){return console.error(r),t}},oc=(t,e={})=>new Intl.ListFormat(qp(t),{style:"narrow",type:"conjunction",...e});function JT(t){return t&&t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function ZT(t){return t}function Sa(t,e){e=e||{};const n=e.delimiter||".",r=e.maxDepth,i=e.transformKey||ZT,s={};function o(a,c,u){u=u||1,Object.keys(a).forEach(function(d){const f=a[d],h=e.safe&&Array.isArray(f),p=Object.prototype.toString.call(f),g=JT(f),m=p==="[object Object]"||p==="[object Array]",v=c?c+n+i(d):i(d);if(!h&&!g&&m&&Object.keys(f).length&&(!e.maxDepth||u<r))return o(f,v,u+1);s[v]=f})}return o(t),s}function za(t,e){e=e||{};const n=e.delimiter||".",r=e.overwrite||!1,i=e.transformKey||ZT,s={};if(JT(t)||Object.prototype.toString.call(t)!=="[object Object]")return t;function a(d){const f=Number(d);return isNaN(f)||d.indexOf(".")!==-1||e.object?d:f}function c(d,f,h){return Object.keys(h).reduce(function(p,g){return p[d+n+g]=h[g],p},f)}function u(d){const f=Object.prototype.toString.call(d),h=f==="[object Array]",p=f==="[object Object]";if(d){if(h)return!d.length;if(p)return!Object.keys(d).length}else return!0}return t=Object.keys(t).reduce(function(d,f){const h=Object.prototype.toString.call(t[f]);return!(h==="[object Object]"||h==="[object Array]")||u(t[f])?(d[f]=t[f],d):c(f,d,Sa(t[f],e))},{}),Object.keys(t).forEach(function(d){const f=d.split(n).map(i);let h=a(f.shift()),p=a(f[0]),g=s;for(;p!==void 0;){if(h==="__proto__")return;const m=Object.prototype.toString.call(g[h]),v=m==="[object Object]"||m==="[object Array]";if(!r&&!v&&typeof g[h]<"u")return;(r&&!v||!r&&g[h]==null)&&(g[h]=typeof p=="number"&&!e.object?[]:{}),g=g[h],f.length>0&&(h=a(f.shift()),p=a(f[0]))}g[h]=za(t[d],e)}),s}const $d=({date:t=new Date,timeZone:e=void 0}={})=>{const n={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"longOffset"};return Object.fromEntries(new Intl.DateTimeFormat("en-US",{...n,hour12:!1,timeZone:e}).formatToParts(t).filter(({type:r})=>r in n).map(({type:r,value:i})=>[r,r==="hour"&&i==="24"?"00":i]))};var XT;function He(){return XT.apply(null,arguments)}function C3(t){XT=t}function ts(t){return t instanceof Array||Object.prototype.toString.call(t)==="[object Array]"}function Ea(t){return t!=null&&Object.prototype.toString.call(t)==="[object Object]"}function Ut(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function k_(t){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(t).length===0;var e;for(e in t)if(Ut(t,e))return!1;return!0}function Kr(t){return t===void 0}function lo(t){return typeof t=="number"||Object.prototype.toString.call(t)==="[object Number]"}function Ld(t){return t instanceof Date||Object.prototype.toString.call(t)==="[object Date]"}function QT(t,e){var n=[],r,i=t.length;for(r=0;r<i;++r)n.push(e(t[r],r));return n}function To(t,e){for(var n in e)Ut(e,n)&&(t[n]=e[n]);return Ut(e,"toString")&&(t.toString=e.toString),Ut(e,"valueOf")&&(t.valueOf=e.valueOf),t}function Ds(t,e,n,r){return xC(t,e,n,r,!0).utc()}function A3(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function kt(t){return t._pf==null&&(t._pf=A3()),t._pf}var bv;Array.prototype.some?bv=Array.prototype.some:bv=function(t){var e=Object(this),n=e.length>>>0,r;for(r=0;r<n;r++)if(r in e&&t.call(this,e[r],r,e))return!0;return!1};function S_(t){var e=null,n=!1,r=t._d&&!isNaN(t._d.getTime());if(r&&(e=kt(t),n=bv.call(e.parsedDateParts,function(i){return i!=null}),r=e.overflow<0&&!e.empty&&!e.invalidEra&&!e.invalidMonth&&!e.invalidWeekday&&!e.weekdayMismatch&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&n),t._strict&&(r=r&&e.charsLeftOver===0&&e.unusedTokens.length===0&&e.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(t))t._isValid=r;else return r;return t._isValid}function Hp(t){var e=Ds(NaN);return t!=null?To(kt(e),t):kt(e).userInvalidated=!0,e}var $0=He.momentProperties=[],sm=!1;function E_(t,e){var n,r,i,s=$0.length;if(Kr(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),Kr(e._i)||(t._i=e._i),Kr(e._f)||(t._f=e._f),Kr(e._l)||(t._l=e._l),Kr(e._strict)||(t._strict=e._strict),Kr(e._tzm)||(t._tzm=e._tzm),Kr(e._isUTC)||(t._isUTC=e._isUTC),Kr(e._offset)||(t._offset=e._offset),Kr(e._pf)||(t._pf=kt(e)),Kr(e._locale)||(t._locale=e._locale),s>0)for(n=0;n<s;n++)r=$0[n],i=e[r],Kr(i)||(t[r]=i);return t}function Nd(t){E_(this,t),this._d=new Date(t._d!=null?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),sm===!1&&(sm=!0,He.updateOffset(this),sm=!1)}function ns(t){return t instanceof Nd||t!=null&&t._isAMomentObject!=null}function eC(t){He.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+t)}function Di(t,e){var n=!0;return To(function(){if(He.deprecationHandler!=null&&He.deprecationHandler(null,t),n){var r=[],i,s,o,a=arguments.length;for(s=0;s<a;s++){if(i="",typeof arguments[s]=="object"){i+=`
390
+ `,n)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const n=mf(e),r=gl(n);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const n=mf(e),r=gl(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,n){return this.type!=="comment"||this.indent<=n?!1:e.every(r=>r.type==="newline"||r.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function KT(t){const e=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||e&&new WT||null,prettyErrors:e}}function xz(t,e={}){const{lineCounter:n,prettyErrors:r}=KT(e),i=new x_(n?.addNewLine),s=new w_(e),o=Array.from(s.compose(i.parse(t)));if(r&&n)for(const a of o)a.errors.forEach($h(t,n)),a.warnings.forEach($h(t,n));return o.length>0?o:Object.assign([],{empty:!0},s.streamInfo())}function YT(t,e={}){const{lineCounter:n,prettyErrors:r}=KT(e),i=new x_(n?.addNewLine),s=new w_(e);let o=null;for(const a of s.compose(i.parse(t),!0,t.length))if(!o)o=a;else if(o.options.logLevel!=="silent"){o.errors.push(new ga(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&n&&(o.errors.forEach($h(t,n)),o.warnings.forEach($h(t,n))),o}function kz(t,e,n){let r;typeof e=="function"?r=e:n===void 0&&e&&typeof e=="object"&&(n=e);const i=YT(t,n);if(!i)return null;if(i.warnings.forEach(s=>gT(i.options.logLevel,s)),i.errors.length>0){if(i.options.logLevel!=="silent")throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:r},n))}function Sz(t,e,n){let r=null;if(typeof e=="function"||Array.isArray(e)?r=e:n===void 0&&e&&(n=e),typeof n=="string"&&(n=n.length),typeof n=="number"){const i=Math.round(n);n=i<1?void 0:i>8?{indent:8}:{indent:i}}if(t===void 0){const{keepUndefined:i}=n??e??{};if(!i)return}return Za(t)&&!r?t.toString(n):new zc(t,r,n).toString(n)}const Od=Object.freeze(Object.defineProperty({__proto__:null,Alias:Op,CST:_z,Composer:w_,Document:zc,Lexer:VT,LineCounter:WT,Pair:Pr,Parser:x_,Scalar:_t,Schema:zp,YAMLError:__,YAMLMap:ci,YAMLParseError:ga,YAMLSeq:Bo,YAMLWarning:IT,isAlias:Ja,isCollection:Tn,isDocument:Za,isMap:Rc,isNode:An,isPair:bn,isScalar:rn,isSeq:Dc,parse:kz,parseAllDocuments:xz,parseDocument:YT,stringify:Sz,visit:Uo,visitAsync:Pp},Symbol.toStringTag,{value:"Module"}));var im,O0;function Ez(){return O0||(O0=1,im=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,i,s;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!t(e[i],n[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(s=Object.keys(e),r=s.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,s[i]))return!1;for(i=r;i--!==0;){var o=s[i];if(!t(e[o],n[o]))return!1}return!0}return e!==e&&n!==n}),im}var Tz=Ez();const zn=ip(Tz),mv="sveltia-cms.prefs",vv=st(),Tt=st({},t=>{vv.set(void 0),(async()=>{try{const e=await ti.get(mv)??{};e.apiKeys??={},e.closeOnSave??=!0,e.underlineLinks??=!0,t(e)}catch{vv.set({type:"permission_denied"})}})()});Tt.subscribe(t=>{if(!t||!Object.keys(t).length)return;(async()=>{try{zn(t,await ti.get(mv))||await ti.set(mv,t)}catch{}})();const{locale:e,theme:n,underlineLinks:r=!0,devModeEnabled:i=!1}=t;e&&ne(Dk).includes(e)&&Nn.set(e);const s=!n||n==="auto",o=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";Object.assign(document.documentElement.dataset,{theme:s?o:n,autoTheming:s,underlineLinks:r,env:i?"dev":"prod"})});const Ri={i18nEnabled:!1,saveAllLocales:!0,allLocales:["_default"],initialLocales:["_default"],defaultLocale:"_default",structure:"single_file",canonicalSlug:{key:"translationKey",value:"{{slug}}"}},Nh=(t,e)=>{const n=ne(wt);let r;Jn(n.i18n)&&(r=n.i18n,t.i18n?(Jn(t.i18n)&&Object.assign(r,t.i18n),e&&(e.i18n?Jn(e.i18n)&&Object.assign(r,e.i18n):r=void 0)):r=void 0);const{structure:i="single_file",locales:s=[],default_locale:o=void 0,initial_locales:a=void 0,save_all_locales:c=!0,canonical_slug:{key:u="translationKey",value:d="{{slug}}"}={}}=r??{},f=!!s.length,h=f?s:["_default"],p=f?c===!0&&a===void 0:!0,g=f?o&&h.includes(o)?o:h[0]:"_default",m=a==="all"?h:a==="default"?[g]:h.filter(_=>_===g||(Array.isArray(a)?a.includes(_):!0)),v=e?e.file.includes("{{locale}}")?"multiple_files":"single_file":i;return{i18nEnabled:f,saveAllLocales:p,allLocales:h,defaultLocale:g,initialLocales:m,structure:v,canonicalSlug:{key:u,value:d}}},qp=t=>{let e;if(t!=="_default")try{[e]=Intl.getCanonicalLocales(t)}catch{}return e},$s=t=>{const e=qp(t);if(!e)return t;const n=new Intl.DisplayNames(ne(Nn),{type:"language"});try{return n.of(e)??t}catch(r){return console.error(r),t}},oc=(t,e={})=>new Intl.ListFormat(qp(t),{style:"narrow",type:"conjunction",...e});function JT(t){return t&&t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function ZT(t){return t}function Sa(t,e){e=e||{};const n=e.delimiter||".",r=e.maxDepth,i=e.transformKey||ZT,s={};function o(a,c,u){u=u||1,Object.keys(a).forEach(function(d){const f=a[d],h=e.safe&&Array.isArray(f),p=Object.prototype.toString.call(f),g=JT(f),m=p==="[object Object]"||p==="[object Array]",v=c?c+n+i(d):i(d);if(!h&&!g&&m&&Object.keys(f).length&&(!e.maxDepth||u<r))return o(f,v,u+1);s[v]=f})}return o(t),s}function za(t,e){e=e||{};const n=e.delimiter||".",r=e.overwrite||!1,i=e.transformKey||ZT,s={};if(JT(t)||Object.prototype.toString.call(t)!=="[object Object]")return t;function a(d){const f=Number(d);return isNaN(f)||d.indexOf(".")!==-1||e.object?d:f}function c(d,f,h){return Object.keys(h).reduce(function(p,g){return p[d+n+g]=h[g],p},f)}function u(d){const f=Object.prototype.toString.call(d),h=f==="[object Array]",p=f==="[object Object]";if(d){if(h)return!d.length;if(p)return!Object.keys(d).length}else return!0}return t=Object.keys(t).reduce(function(d,f){const h=Object.prototype.toString.call(t[f]);return!(h==="[object Object]"||h==="[object Array]")||u(t[f])?(d[f]=t[f],d):c(f,d,Sa(t[f],e))},{}),Object.keys(t).forEach(function(d){const f=d.split(n).map(i);let h=a(f.shift()),p=a(f[0]),g=s;for(;p!==void 0;){if(h==="__proto__")return;const m=Object.prototype.toString.call(g[h]),v=m==="[object Object]"||m==="[object Array]";if(!r&&!v&&typeof g[h]<"u")return;(r&&!v||!r&&g[h]==null)&&(g[h]=typeof p=="number"&&!e.object?[]:{}),g=g[h],f.length>0&&(h=a(f.shift()),p=a(f[0]))}g[h]=za(t[d],e)}),s}const $d=({date:t=new Date,timeZone:e=void 0}={})=>{const n={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"longOffset"};return Object.fromEntries(new Intl.DateTimeFormat("en-US",{...n,hour12:!1,timeZone:e}).formatToParts(t).filter(({type:r})=>r in n).map(({type:r,value:i})=>[r,r==="hour"&&i==="24"?"00":i]))};var XT;function He(){return XT.apply(null,arguments)}function Cz(t){XT=t}function ts(t){return t instanceof Array||Object.prototype.toString.call(t)==="[object Array]"}function Ea(t){return t!=null&&Object.prototype.toString.call(t)==="[object Object]"}function Ut(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function k_(t){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(t).length===0;var e;for(e in t)if(Ut(t,e))return!1;return!0}function Kr(t){return t===void 0}function lo(t){return typeof t=="number"||Object.prototype.toString.call(t)==="[object Number]"}function Ld(t){return t instanceof Date||Object.prototype.toString.call(t)==="[object Date]"}function QT(t,e){var n=[],r,i=t.length;for(r=0;r<i;++r)n.push(e(t[r],r));return n}function To(t,e){for(var n in e)Ut(e,n)&&(t[n]=e[n]);return Ut(e,"toString")&&(t.toString=e.toString),Ut(e,"valueOf")&&(t.valueOf=e.valueOf),t}function Ds(t,e,n,r){return xC(t,e,n,r,!0).utc()}function Az(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function kt(t){return t._pf==null&&(t._pf=Az()),t._pf}var bv;Array.prototype.some?bv=Array.prototype.some:bv=function(t){var e=Object(this),n=e.length>>>0,r;for(r=0;r<n;r++)if(r in e&&t.call(this,e[r],r,e))return!0;return!1};function S_(t){var e=null,n=!1,r=t._d&&!isNaN(t._d.getTime());if(r&&(e=kt(t),n=bv.call(e.parsedDateParts,function(i){return i!=null}),r=e.overflow<0&&!e.empty&&!e.invalidEra&&!e.invalidMonth&&!e.invalidWeekday&&!e.weekdayMismatch&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&n),t._strict&&(r=r&&e.charsLeftOver===0&&e.unusedTokens.length===0&&e.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(t))t._isValid=r;else return r;return t._isValid}function Hp(t){var e=Ds(NaN);return t!=null?To(kt(e),t):kt(e).userInvalidated=!0,e}var $0=He.momentProperties=[],sm=!1;function E_(t,e){var n,r,i,s=$0.length;if(Kr(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),Kr(e._i)||(t._i=e._i),Kr(e._f)||(t._f=e._f),Kr(e._l)||(t._l=e._l),Kr(e._strict)||(t._strict=e._strict),Kr(e._tzm)||(t._tzm=e._tzm),Kr(e._isUTC)||(t._isUTC=e._isUTC),Kr(e._offset)||(t._offset=e._offset),Kr(e._pf)||(t._pf=kt(e)),Kr(e._locale)||(t._locale=e._locale),s>0)for(n=0;n<s;n++)r=$0[n],i=e[r],Kr(i)||(t[r]=i);return t}function Nd(t){E_(this,t),this._d=new Date(t._d!=null?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),sm===!1&&(sm=!0,He.updateOffset(this),sm=!1)}function ns(t){return t instanceof Nd||t!=null&&t._isAMomentObject!=null}function eC(t){He.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+t)}function Di(t,e){var n=!0;return To(function(){if(He.deprecationHandler!=null&&He.deprecationHandler(null,t),n){var r=[],i,s,o,a=arguments.length;for(s=0;s<a;s++){if(i="",typeof arguments[s]=="object"){i+=`
391
391
  [`+s+"] ";for(o in arguments[0])Ut(arguments[0],o)&&(i+=o+": "+arguments[0][o]+", ");i=i.slice(0,-2)}else i=arguments[s];r.push(i)}eC(t+`
392
392
  Arguments: `+Array.prototype.slice.call(r).join("")+`
393
- `+new Error().stack),n=!1}return e.apply(this,arguments)},e)}var L0={};function tC(t,e){He.deprecationHandler!=null&&He.deprecationHandler(t,e),L0[t]||(eC(e),L0[t]=!0)}He.suppressDeprecationWarnings=!1;He.deprecationHandler=null;function Ms(t){return typeof Function<"u"&&t instanceof Function||Object.prototype.toString.call(t)==="[object Function]"}function P3(t){var e,n;for(n in t)Ut(t,n)&&(e=t[n],Ms(e)?this[n]=e:this["_"+n]=e);this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function _v(t,e){var n=To({},t),r;for(r in e)Ut(e,r)&&(Ea(t[r])&&Ea(e[r])?(n[r]={},To(n[r],t[r]),To(n[r],e[r])):e[r]!=null?n[r]=e[r]:delete n[r]);for(r in t)Ut(t,r)&&!Ut(e,r)&&Ea(t[r])&&(n[r]=To({},n[r]));return n}function T_(t){t!=null&&this.set(t)}var yv;Object.keys?yv=Object.keys:yv=function(t){var e,n=[];for(e in t)Ut(t,e)&&n.push(e);return n};var O3={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function $3(t,e,n){var r=this._calendar[t]||this._calendar.sameElse;return Ms(r)?r.call(e,n):r}function Ls(t,e,n){var r=""+Math.abs(t),i=e-r.length,s=t>=0;return(s?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var C_=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,vf=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,om={},Fl={};function mt(t,e,n,r){var i=r;typeof r=="string"&&(i=function(){return this[r]()}),t&&(Fl[t]=i),e&&(Fl[e[0]]=function(){return Ls(i.apply(this,arguments),e[1],e[2])}),n&&(Fl[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),t)})}function L3(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function N3(t){var e=t.match(C_),n,r;for(n=0,r=e.length;n<r;n++)Fl[e[n]]?e[n]=Fl[e[n]]:e[n]=L3(e[n]);return function(i){var s="",o;for(o=0;o<r;o++)s+=Ms(e[o])?e[o].call(i,t):e[o];return s}}function Df(t,e){return t.isValid()?(e=nC(e,t.localeData()),om[e]=om[e]||N3(e),om[e](t)):t.localeData().invalidDate()}function nC(t,e){var n=5;function r(i){return e.longDateFormat(i)||i}for(vf.lastIndex=0;n>=0&&vf.test(t);)t=t.replace(vf,r),vf.lastIndex=0,n-=1;return t}var I3={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function R3(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];return e||!n?e:(this._longDateFormat[t]=n.match(C_).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[t])}var D3="Invalid date";function M3(){return this._invalidDate}var F3="%d",z3=/\d{1,2}/;function j3(t){return this._ordinal.replace("%d",t)}var U3={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function B3(t,e,n,r){var i=this._relativeTime[n];return Ms(i)?i(t,e,n,r):i.replace(/%d/i,t)}function q3(t,e){var n=this._relativeTime[t>0?"future":"past"];return Ms(n)?n(e):n.replace(/%s/i,e)}var N0={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function Mi(t){return typeof t=="string"?N0[t]||N0[t.toLowerCase()]:void 0}function A_(t){var e={},n,r;for(r in t)Ut(t,r)&&(n=Mi(r),n&&(e[n]=t[r]));return e}var H3={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function V3(t){var e=[],n;for(n in t)Ut(t,n)&&e.push({unit:n,priority:H3[n]});return e.sort(function(r,i){return r.priority-i.priority}),e}var rC=/\d/,pi=/\d\d/,iC=/\d{3}/,P_=/\d{4}/,Vp=/[+-]?\d{6}/,dn=/\d\d?/,sC=/\d\d\d\d?/,oC=/\d\d\d\d\d\d?/,Wp=/\d{1,3}/,O_=/\d{1,4}/,Gp=/[+-]?\d{1,6}/,jc=/\d+/,Kp=/[+-]?\d+/,W3=/Z|[+-]\d\d:?\d\d/gi,Yp=/Z|[+-]\d\d(?::?\d\d)?/gi,G3=/[+-]?\d+(\.\d{1,3})?/,Id=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Uc=/^[1-9]\d?/,$_=/^([1-9]\d|\d)/,Ih;Ih={};function tt(t,e,n){Ih[t]=Ms(e)?e:function(r,i){return r&&n?n:e}}function K3(t,e){return Ut(Ih,t)?Ih[t](e._strict,e._locale):new RegExp(Y3(t))}function Y3(t){return ro(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,n,r,i,s){return n||r||i||s}))}function ro(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function yi(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function It(t){var e=+t,n=0;return e!==0&&isFinite(e)&&(n=yi(e)),n}var wv={};function Zt(t,e){var n,r=e,i;for(typeof t=="string"&&(t=[t]),lo(e)&&(r=function(s,o){o[e]=It(s)}),i=t.length,n=0;n<i;n++)wv[t[n]]=r}function Rd(t,e){Zt(t,function(n,r,i,s){i._w=i._w||{},e(n,i._w,i,s)})}function J3(t,e,n){e!=null&&Ut(wv,t)&&wv[t](e,n._a,n,t)}function Jp(t){return t%4===0&&t%100!==0||t%400===0}var Or=0,Qs=1,vs=2,Zn=3,Yi=4,eo=5,ma=6,Z3=7,X3=8;mt("Y",0,0,function(){var t=this.year();return t<=9999?Ls(t,4):"+"+t});mt(0,["YY",2],0,function(){return this.year()%100});mt(0,["YYYY",4],0,"year");mt(0,["YYYYY",5],0,"year");mt(0,["YYYYYY",6,!0],0,"year");tt("Y",Kp);tt("YY",dn,pi);tt("YYYY",O_,P_);tt("YYYYY",Gp,Vp);tt("YYYYYY",Gp,Vp);Zt(["YYYYY","YYYYYY"],Or);Zt("YYYY",function(t,e){e[Or]=t.length===2?He.parseTwoDigitYear(t):It(t)});Zt("YY",function(t,e){e[Or]=He.parseTwoDigitYear(t)});Zt("Y",function(t,e){e[Or]=parseInt(t,10)});function Cu(t){return Jp(t)?366:365}He.parseTwoDigitYear=function(t){return It(t)+(It(t)>68?1900:2e3)};var aC=Bc("FullYear",!0);function Q3(){return Jp(this.year())}function Bc(t,e){return function(n){return n!=null?(lC(this,t,n),He.updateOffset(this,e),this):Qu(this,t)}}function Qu(t,e){if(!t.isValid())return NaN;var n=t._d,r=t._isUTC;switch(e){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function lC(t,e,n){var r,i,s,o,a;if(!(!t.isValid()||isNaN(n))){switch(r=t._d,i=t._isUTC,e){case"Milliseconds":return void(i?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(i?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(i?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(i?r.setUTCHours(n):r.setHours(n));case"Date":return void(i?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}s=n,o=t.month(),a=t.date(),a=a===29&&o===1&&!Jp(s)?28:a,i?r.setUTCFullYear(s,o,a):r.setFullYear(s,o,a)}}function ej(t){return t=Mi(t),Ms(this[t])?this[t]():this}function tj(t,e){if(typeof t=="object"){t=A_(t);var n=V3(t),r,i=n.length;for(r=0;r<i;r++)this[n[r].unit](t[n[r].unit])}else if(t=Mi(t),Ms(this[t]))return this[t](e);return this}function nj(t,e){return(t%e+e)%e}var Mn;Array.prototype.indexOf?Mn=Array.prototype.indexOf:Mn=function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1};function L_(t,e){if(isNaN(t)||isNaN(e))return NaN;var n=nj(e,12);return t+=(e-n)/12,n===1?Jp(t)?29:28:31-n%7%2}mt("M",["MM",2],"Mo",function(){return this.month()+1});mt("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)});mt("MMMM",0,0,function(t){return this.localeData().months(this,t)});tt("M",dn,Uc);tt("MM",dn,pi);tt("MMM",function(t,e){return e.monthsShortRegex(t)});tt("MMMM",function(t,e){return e.monthsRegex(t)});Zt(["M","MM"],function(t,e){e[Qs]=It(t)-1});Zt(["MMM","MMMM"],function(t,e,n,r){var i=n._locale.monthsParse(t,r,n._strict);i!=null?e[Qs]=i:kt(n).invalidMonth=t});var rj="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),cC="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),uC=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,ij=Id,sj=Id;function oj(t,e){return t?ts(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||uC).test(e)?"format":"standalone"][t.month()]:ts(this._months)?this._months:this._months.standalone}function aj(t,e){return t?ts(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[uC.test(e)?"format":"standalone"][t.month()]:ts(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function lj(t,e,n){var r,i,s,o=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)s=Ds([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(s,"").toLocaleLowerCase();return n?e==="MMM"?(i=Mn.call(this._shortMonthsParse,o),i!==-1?i:null):(i=Mn.call(this._longMonthsParse,o),i!==-1?i:null):e==="MMM"?(i=Mn.call(this._shortMonthsParse,o),i!==-1?i:(i=Mn.call(this._longMonthsParse,o),i!==-1?i:null)):(i=Mn.call(this._longMonthsParse,o),i!==-1?i:(i=Mn.call(this._shortMonthsParse,o),i!==-1?i:null))}function cj(t,e,n){var r,i,s;if(this._monthsParseExact)return lj.call(this,t,e,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=Ds([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),!n&&!this._monthsParse[r]&&(s="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(s.replace(".",""),"i")),n&&e==="MMMM"&&this._longMonthsParse[r].test(t))return r;if(n&&e==="MMM"&&this._shortMonthsParse[r].test(t))return r;if(!n&&this._monthsParse[r].test(t))return r}}function dC(t,e){if(!t.isValid())return t;if(typeof e=="string"){if(/^\d+$/.test(e))e=It(e);else if(e=t.localeData().monthsParse(e),!lo(e))return t}var n=e,r=t.date();return r=r<29?r:Math.min(r,L_(t.year(),n)),t._isUTC?t._d.setUTCMonth(n,r):t._d.setMonth(n,r),t}function fC(t){return t!=null?(dC(this,t),He.updateOffset(this,!0),this):Qu(this,"Month")}function uj(){return L_(this.year(),this.month())}function dj(t){return this._monthsParseExact?(Ut(this,"_monthsRegex")||hC.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(Ut(this,"_monthsShortRegex")||(this._monthsShortRegex=ij),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)}function fj(t){return this._monthsParseExact?(Ut(this,"_monthsRegex")||hC.call(this),t?this._monthsStrictRegex:this._monthsRegex):(Ut(this,"_monthsRegex")||(this._monthsRegex=sj),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)}function hC(){function t(c,u){return u.length-c.length}var e=[],n=[],r=[],i,s,o,a;for(i=0;i<12;i++)s=Ds([2e3,i]),o=ro(this.monthsShort(s,"")),a=ro(this.months(s,"")),e.push(o),n.push(a),r.push(a),r.push(o);e.sort(t),n.sort(t),r.sort(t),this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+e.join("|")+")","i")}function hj(t,e,n,r,i,s,o){var a;return t<100&&t>=0?(a=new Date(t+400,e,n,r,i,s,o),isFinite(a.getFullYear())&&a.setFullYear(t)):a=new Date(t,e,n,r,i,s,o),a}function ed(t){var e,n;return t<100&&t>=0?(n=Array.prototype.slice.call(arguments),n[0]=t+400,e=new Date(Date.UTC.apply(null,n)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)):e=new Date(Date.UTC.apply(null,arguments)),e}function Rh(t,e,n){var r=7+e-n,i=(7+ed(t,0,r).getUTCDay()-e)%7;return-i+r-1}function pC(t,e,n,r,i){var s=(7+n-r)%7,o=Rh(t,r,i),a=1+7*(e-1)+s+o,c,u;return a<=0?(c=t-1,u=Cu(c)+a):a>Cu(t)?(c=t+1,u=a-Cu(t)):(c=t,u=a),{year:c,dayOfYear:u}}function td(t,e,n){var r=Rh(t.year(),e,n),i=Math.floor((t.dayOfYear()-r-1)/7)+1,s,o;return i<1?(o=t.year()-1,s=i+io(o,e,n)):i>io(t.year(),e,n)?(s=i-io(t.year(),e,n),o=t.year()+1):(o=t.year(),s=i),{week:s,year:o}}function io(t,e,n){var r=Rh(t,e,n),i=Rh(t+1,e,n);return(Cu(t)-r+i)/7}mt("w",["ww",2],"wo","week");mt("W",["WW",2],"Wo","isoWeek");tt("w",dn,Uc);tt("ww",dn,pi);tt("W",dn,Uc);tt("WW",dn,pi);Rd(["w","ww","W","WW"],function(t,e,n,r){e[r.substr(0,1)]=It(t)});function pj(t){return td(t,this._week.dow,this._week.doy).week}var gj={dow:0,doy:6};function mj(){return this._week.dow}function vj(){return this._week.doy}function bj(t){var e=this.localeData().week(this);return t==null?e:this.add((t-e)*7,"d")}function _j(t){var e=td(this,1,4).week;return t==null?e:this.add((t-e)*7,"d")}mt("d",0,"do","day");mt("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)});mt("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)});mt("dddd",0,0,function(t){return this.localeData().weekdays(this,t)});mt("e",0,0,"weekday");mt("E",0,0,"isoWeekday");tt("d",dn);tt("e",dn);tt("E",dn);tt("dd",function(t,e){return e.weekdaysMinRegex(t)});tt("ddd",function(t,e){return e.weekdaysShortRegex(t)});tt("dddd",function(t,e){return e.weekdaysRegex(t)});Rd(["dd","ddd","dddd"],function(t,e,n,r){var i=n._locale.weekdaysParse(t,r,n._strict);i!=null?e.d=i:kt(n).invalidWeekday=t});Rd(["d","e","E"],function(t,e,n,r){e[r]=It(t)});function yj(t,e){return typeof t!="string"?t:isNaN(t)?(t=e.weekdaysParse(t),typeof t=="number"?t:null):parseInt(t,10)}function wj(t,e){return typeof t=="string"?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}function N_(t,e){return t.slice(e,7).concat(t.slice(0,e))}var xj="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),gC="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),kj="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Sj=Id,Ej=Id,Tj=Id;function Cj(t,e){var n=ts(this._weekdays)?this._weekdays:this._weekdays[t&&t!==!0&&this._weekdays.isFormat.test(e)?"format":"standalone"];return t===!0?N_(n,this._week.dow):t?n[t.day()]:n}function Aj(t){return t===!0?N_(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort}function Pj(t){return t===!0?N_(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin}function Oj(t,e,n){var r,i,s,o=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)s=Ds([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(s,"").toLocaleLowerCase();return n?e==="dddd"?(i=Mn.call(this._weekdaysParse,o),i!==-1?i:null):e==="ddd"?(i=Mn.call(this._shortWeekdaysParse,o),i!==-1?i:null):(i=Mn.call(this._minWeekdaysParse,o),i!==-1?i:null):e==="dddd"?(i=Mn.call(this._weekdaysParse,o),i!==-1||(i=Mn.call(this._shortWeekdaysParse,o),i!==-1)?i:(i=Mn.call(this._minWeekdaysParse,o),i!==-1?i:null)):e==="ddd"?(i=Mn.call(this._shortWeekdaysParse,o),i!==-1||(i=Mn.call(this._weekdaysParse,o),i!==-1)?i:(i=Mn.call(this._minWeekdaysParse,o),i!==-1?i:null)):(i=Mn.call(this._minWeekdaysParse,o),i!==-1||(i=Mn.call(this._weekdaysParse,o),i!==-1)?i:(i=Mn.call(this._shortWeekdaysParse,o),i!==-1?i:null))}function $j(t,e,n){var r,i,s;if(this._weekdaysParseExact)return Oj.call(this,t,e,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=Ds([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(s="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(s.replace(".",""),"i")),n&&e==="dddd"&&this._fullWeekdaysParse[r].test(t))return r;if(n&&e==="ddd"&&this._shortWeekdaysParse[r].test(t))return r;if(n&&e==="dd"&&this._minWeekdaysParse[r].test(t))return r;if(!n&&this._weekdaysParse[r].test(t))return r}}function Lj(t){if(!this.isValid())return t!=null?this:NaN;var e=Qu(this,"Day");return t!=null?(t=yj(t,this.localeData()),this.add(t-e,"d")):e}function Nj(t){if(!this.isValid())return t!=null?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return t==null?e:this.add(t-e,"d")}function Ij(t){if(!this.isValid())return t!=null?this:NaN;if(t!=null){var e=wj(t,this.localeData());return this.day(this.day()%7?e:e-7)}else return this.day()||7}function Rj(t){return this._weekdaysParseExact?(Ut(this,"_weekdaysRegex")||I_.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(Ut(this,"_weekdaysRegex")||(this._weekdaysRegex=Sj),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)}function Dj(t){return this._weekdaysParseExact?(Ut(this,"_weekdaysRegex")||I_.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(Ut(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ej),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Mj(t){return this._weekdaysParseExact?(Ut(this,"_weekdaysRegex")||I_.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(Ut(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Tj),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function I_(){function t(d,f){return f.length-d.length}var e=[],n=[],r=[],i=[],s,o,a,c,u;for(s=0;s<7;s++)o=Ds([2e3,1]).day(s),a=ro(this.weekdaysMin(o,"")),c=ro(this.weekdaysShort(o,"")),u=ro(this.weekdays(o,"")),e.push(a),n.push(c),r.push(u),i.push(a),i.push(c),i.push(u);e.sort(t),n.sort(t),r.sort(t),i.sort(t),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+e.join("|")+")","i")}function R_(){return this.hours()%12||12}function Fj(){return this.hours()||24}mt("H",["HH",2],0,"hour");mt("h",["hh",2],0,R_);mt("k",["kk",2],0,Fj);mt("hmm",0,0,function(){return""+R_.apply(this)+Ls(this.minutes(),2)});mt("hmmss",0,0,function(){return""+R_.apply(this)+Ls(this.minutes(),2)+Ls(this.seconds(),2)});mt("Hmm",0,0,function(){return""+this.hours()+Ls(this.minutes(),2)});mt("Hmmss",0,0,function(){return""+this.hours()+Ls(this.minutes(),2)+Ls(this.seconds(),2)});function mC(t,e){mt(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}mC("a",!0);mC("A",!1);function vC(t,e){return e._meridiemParse}tt("a",vC);tt("A",vC);tt("H",dn,$_);tt("h",dn,Uc);tt("k",dn,Uc);tt("HH",dn,pi);tt("hh",dn,pi);tt("kk",dn,pi);tt("hmm",sC);tt("hmmss",oC);tt("Hmm",sC);tt("Hmmss",oC);Zt(["H","HH"],Zn);Zt(["k","kk"],function(t,e,n){var r=It(t);e[Zn]=r===24?0:r});Zt(["a","A"],function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t});Zt(["h","hh"],function(t,e,n){e[Zn]=It(t),kt(n).bigHour=!0});Zt("hmm",function(t,e,n){var r=t.length-2;e[Zn]=It(t.substr(0,r)),e[Yi]=It(t.substr(r)),kt(n).bigHour=!0});Zt("hmmss",function(t,e,n){var r=t.length-4,i=t.length-2;e[Zn]=It(t.substr(0,r)),e[Yi]=It(t.substr(r,2)),e[eo]=It(t.substr(i)),kt(n).bigHour=!0});Zt("Hmm",function(t,e,n){var r=t.length-2;e[Zn]=It(t.substr(0,r)),e[Yi]=It(t.substr(r))});Zt("Hmmss",function(t,e,n){var r=t.length-4,i=t.length-2;e[Zn]=It(t.substr(0,r)),e[Yi]=It(t.substr(r,2)),e[eo]=It(t.substr(i))});function zj(t){return(t+"").toLowerCase().charAt(0)==="p"}var jj=/[ap]\.?m?\.?/i,Uj=Bc("Hours",!0);function Bj(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"}var bC={calendar:O3,longDateFormat:I3,invalidDate:D3,ordinal:F3,dayOfMonthOrdinalParse:z3,relativeTime:U3,months:rj,monthsShort:cC,week:gj,weekdays:xj,weekdaysMin:kj,weekdaysShort:gC,meridiemParse:jj},gn={},tu={},nd;function qj(t,e){var n,r=Math.min(t.length,e.length);for(n=0;n<r;n+=1)if(t[n]!==e[n])return n;return r}function I0(t){return t&&t.toLowerCase().replace("_","-")}function Hj(t){for(var e=0,n,r,i,s;e<t.length;){for(s=I0(t[e]).split("-"),n=s.length,r=I0(t[e+1]),r=r?r.split("-"):null;n>0;){if(i=Zp(s.slice(0,n).join("-")),i)return i;if(r&&r.length>=n&&qj(s,r)>=n-1)break;n--}e++}return nd}function Vj(t){return!!(t&&t.match("^[^/\\\\]*$"))}function Zp(t){var e=null,n;if(gn[t]===void 0&&typeof module<"u"&&module&&module.exports&&Vj(t))try{e=nd._abbr,n=require,n("./locale/"+t),Ro(e)}catch{gn[t]=null}return gn[t]}function Ro(t,e){var n;return t&&(Kr(e)?n=go(t):n=D_(t,e),n?nd=n:typeof console<"u"&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),nd._abbr}function D_(t,e){if(e!==null){var n,r=bC;if(e.abbr=t,gn[t]!=null)tC("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=gn[t]._config;else if(e.parentLocale!=null)if(gn[e.parentLocale]!=null)r=gn[e.parentLocale]._config;else if(n=Zp(e.parentLocale),n!=null)r=n._config;else return tu[e.parentLocale]||(tu[e.parentLocale]=[]),tu[e.parentLocale].push({name:t,config:e}),null;return gn[t]=new T_(_v(r,e)),tu[t]&&tu[t].forEach(function(i){D_(i.name,i.config)}),Ro(t),gn[t]}else return delete gn[t],null}function Wj(t,e){if(e!=null){var n,r,i=bC;gn[t]!=null&&gn[t].parentLocale!=null?gn[t].set(_v(gn[t]._config,e)):(r=Zp(t),r!=null&&(i=r._config),e=_v(i,e),r==null&&(e.abbr=t),n=new T_(e),n.parentLocale=gn[t],gn[t]=n),Ro(t)}else gn[t]!=null&&(gn[t].parentLocale!=null?(gn[t]=gn[t].parentLocale,t===Ro()&&Ro(t)):gn[t]!=null&&delete gn[t]);return gn[t]}function go(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return nd;if(!ts(t)){if(e=Zp(t),e)return e;t=[t]}return Hj(t)}function Gj(){return yv(gn)}function M_(t){var e,n=t._a;return n&&kt(t).overflow===-2&&(e=n[Qs]<0||n[Qs]>11?Qs:n[vs]<1||n[vs]>L_(n[Or],n[Qs])?vs:n[Zn]<0||n[Zn]>24||n[Zn]===24&&(n[Yi]!==0||n[eo]!==0||n[ma]!==0)?Zn:n[Yi]<0||n[Yi]>59?Yi:n[eo]<0||n[eo]>59?eo:n[ma]<0||n[ma]>999?ma:-1,kt(t)._overflowDayOfYear&&(e<Or||e>vs)&&(e=vs),kt(t)._overflowWeeks&&e===-1&&(e=Z3),kt(t)._overflowWeekday&&e===-1&&(e=X3),kt(t).overflow=e),t}var Kj=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Yj=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Jj=/Z|[+-]\d\d(?::?\d\d)?/,bf=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],am=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Zj=/^\/?Date\((-?\d+)/i,Xj=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Qj={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function _C(t){var e,n,r=t._i,i=Kj.exec(r)||Yj.exec(r),s,o,a,c,u=bf.length,d=am.length;if(i){for(kt(t).iso=!0,e=0,n=u;e<n;e++)if(bf[e][1].exec(i[1])){o=bf[e][0],s=bf[e][2]!==!1;break}if(o==null){t._isValid=!1;return}if(i[3]){for(e=0,n=d;e<n;e++)if(am[e][1].exec(i[3])){a=(i[2]||" ")+am[e][0];break}if(a==null){t._isValid=!1;return}}if(!s&&a!=null){t._isValid=!1;return}if(i[4])if(Jj.exec(i[4]))c="Z";else{t._isValid=!1;return}t._f=o+(a||"")+(c||""),z_(t)}else t._isValid=!1}function e4(t,e,n,r,i,s){var o=[t4(t),cC.indexOf(e),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return s&&o.push(parseInt(s,10)),o}function t4(t){var e=parseInt(t,10);return e<=49?2e3+e:e<=999?1900+e:e}function n4(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function r4(t,e,n){if(t){var r=gC.indexOf(t),i=new Date(e[0],e[1],e[2]).getDay();if(r!==i)return kt(n).weekdayMismatch=!0,n._isValid=!1,!1}return!0}function i4(t,e,n){if(t)return Qj[t];if(e)return 0;var r=parseInt(n,10),i=r%100,s=(r-i)/100;return s*60+i}function yC(t){var e=Xj.exec(n4(t._i)),n;if(e){if(n=e4(e[4],e[3],e[2],e[5],e[6],e[7]),!r4(e[1],n,t))return;t._a=n,t._tzm=i4(e[8],e[9],e[10]),t._d=ed.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),kt(t).rfc2822=!0}else t._isValid=!1}function s4(t){var e=Zj.exec(t._i);if(e!==null){t._d=new Date(+e[1]);return}if(_C(t),t._isValid===!1)delete t._isValid;else return;if(yC(t),t._isValid===!1)delete t._isValid;else return;t._strict?t._isValid=!1:He.createFromInputFallback(t)}He.createFromInputFallback=Di("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))});function yl(t,e,n){return t??e??n}function o4(t){var e=new Date(He.now());return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function F_(t){var e,n,r=[],i,s,o;if(!t._d){for(i=o4(t),t._w&&t._a[vs]==null&&t._a[Qs]==null&&a4(t),t._dayOfYear!=null&&(o=yl(t._a[Or],i[Or]),(t._dayOfYear>Cu(o)||t._dayOfYear===0)&&(kt(t)._overflowDayOfYear=!0),n=ed(o,0,t._dayOfYear),t._a[Qs]=n.getUTCMonth(),t._a[vs]=n.getUTCDate()),e=0;e<3&&t._a[e]==null;++e)t._a[e]=r[e]=i[e];for(;e<7;e++)t._a[e]=r[e]=t._a[e]==null?e===2?1:0:t._a[e];t._a[Zn]===24&&t._a[Yi]===0&&t._a[eo]===0&&t._a[ma]===0&&(t._nextDay=!0,t._a[Zn]=0),t._d=(t._useUTC?ed:hj).apply(null,r),s=t._useUTC?t._d.getUTCDay():t._d.getDay(),t._tzm!=null&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[Zn]=24),t._w&&typeof t._w.d<"u"&&t._w.d!==s&&(kt(t).weekdayMismatch=!0)}}function a4(t){var e,n,r,i,s,o,a,c,u;e=t._w,e.GG!=null||e.W!=null||e.E!=null?(s=1,o=4,n=yl(e.GG,t._a[Or],td(un(),1,4).year),r=yl(e.W,1),i=yl(e.E,1),(i<1||i>7)&&(c=!0)):(s=t._locale._week.dow,o=t._locale._week.doy,u=td(un(),s,o),n=yl(e.gg,t._a[Or],u.year),r=yl(e.w,u.week),e.d!=null?(i=e.d,(i<0||i>6)&&(c=!0)):e.e!=null?(i=e.e+s,(e.e<0||e.e>6)&&(c=!0)):i=s),r<1||r>io(n,s,o)?kt(t)._overflowWeeks=!0:c!=null?kt(t)._overflowWeekday=!0:(a=pC(n,r,i,s,o),t._a[Or]=a.year,t._dayOfYear=a.dayOfYear)}He.ISO_8601=function(){};He.RFC_2822=function(){};function z_(t){if(t._f===He.ISO_8601){_C(t);return}if(t._f===He.RFC_2822){yC(t);return}t._a=[],kt(t).empty=!0;var e=""+t._i,n,r,i,s,o,a=e.length,c=0,u,d;for(i=nC(t._f,t._locale).match(C_)||[],d=i.length,n=0;n<d;n++)s=i[n],r=(e.match(K3(s,t))||[])[0],r&&(o=e.substr(0,e.indexOf(r)),o.length>0&&kt(t).unusedInput.push(o),e=e.slice(e.indexOf(r)+r.length),c+=r.length),Fl[s]?(r?kt(t).empty=!1:kt(t).unusedTokens.push(s),J3(s,r,t)):t._strict&&!r&&kt(t).unusedTokens.push(s);kt(t).charsLeftOver=a-c,e.length>0&&kt(t).unusedInput.push(e),t._a[Zn]<=12&&kt(t).bigHour===!0&&t._a[Zn]>0&&(kt(t).bigHour=void 0),kt(t).parsedDateParts=t._a.slice(0),kt(t).meridiem=t._meridiem,t._a[Zn]=l4(t._locale,t._a[Zn],t._meridiem),u=kt(t).era,u!==null&&(t._a[Or]=t._locale.erasConvertYear(u,t._a[Or])),F_(t),M_(t)}function l4(t,e,n){var r;return n==null?e:t.meridiemHour!=null?t.meridiemHour(e,n):(t.isPM!=null&&(r=t.isPM(n),r&&e<12&&(e+=12),!r&&e===12&&(e=0)),e)}function c4(t){var e,n,r,i,s,o,a=!1,c=t._f.length;if(c===0){kt(t).invalidFormat=!0,t._d=new Date(NaN);return}for(i=0;i<c;i++)s=0,o=!1,e=E_({},t),t._useUTC!=null&&(e._useUTC=t._useUTC),e._f=t._f[i],z_(e),S_(e)&&(o=!0),s+=kt(e).charsLeftOver,s+=kt(e).unusedTokens.length*10,kt(e).score=s,a?s<r&&(r=s,n=e):(r==null||s<r||o)&&(r=s,n=e,o&&(a=!0));To(t,n||e)}function u4(t){if(!t._d){var e=A_(t._i),n=e.day===void 0?e.date:e.day;t._a=QT([e.year,e.month,n,e.hour,e.minute,e.second,e.millisecond],function(r){return r&&parseInt(r,10)}),F_(t)}}function d4(t){var e=new Nd(M_(wC(t)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}function wC(t){var e=t._i,n=t._f;return t._locale=t._locale||go(t._l),e===null||n===void 0&&e===""?Hp({nullInput:!0}):(typeof e=="string"&&(t._i=e=t._locale.preparse(e)),ns(e)?new Nd(M_(e)):(Ld(e)?t._d=e:ts(n)?c4(t):n?z_(t):f4(t),S_(t)||(t._d=null),t))}function f4(t){var e=t._i;Kr(e)?t._d=new Date(He.now()):Ld(e)?t._d=new Date(e.valueOf()):typeof e=="string"?s4(t):ts(e)?(t._a=QT(e.slice(0),function(n){return parseInt(n,10)}),F_(t)):Ea(e)?u4(t):lo(e)?t._d=new Date(e):He.createFromInputFallback(t)}function xC(t,e,n,r,i){var s={};return(e===!0||e===!1)&&(r=e,e=void 0),(n===!0||n===!1)&&(r=n,n=void 0),(Ea(t)&&k_(t)||ts(t)&&t.length===0)&&(t=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=i,s._l=n,s._i=t,s._f=e,s._strict=r,d4(s)}function un(t,e,n,r){return xC(t,e,n,r,!1)}var h4=Di("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=un.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:Hp()}),p4=Di("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=un.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:Hp()});function kC(t,e){var n,r;if(e.length===1&&ts(e[0])&&(e=e[0]),!e.length)return un();for(n=e[0],r=1;r<e.length;++r)(!e[r].isValid()||e[r][t](n))&&(n=e[r]);return n}function g4(){var t=[].slice.call(arguments,0);return kC("isBefore",t)}function m4(){var t=[].slice.call(arguments,0);return kC("isAfter",t)}var v4=function(){return Date.now?Date.now():+new Date},nu=["year","quarter","month","week","day","hour","minute","second","millisecond"];function b4(t){var e,n=!1,r,i=nu.length;for(e in t)if(Ut(t,e)&&!(Mn.call(nu,e)!==-1&&(t[e]==null||!isNaN(t[e]))))return!1;for(r=0;r<i;++r)if(t[nu[r]]){if(n)return!1;parseFloat(t[nu[r]])!==It(t[nu[r]])&&(n=!0)}return!0}function _4(){return this._isValid}function y4(){return as(NaN)}function Xp(t){var e=A_(t),n=e.year||0,r=e.quarter||0,i=e.month||0,s=e.week||e.isoWeek||0,o=e.day||0,a=e.hour||0,c=e.minute||0,u=e.second||0,d=e.millisecond||0;this._isValid=b4(e),this._milliseconds=+d+u*1e3+c*6e4+a*1e3*60*60,this._days=+o+s*7,this._months=+i+r*3+n*12,this._data={},this._locale=go(),this._bubble()}function Mf(t){return t instanceof Xp}function xv(t){return t<0?Math.round(-1*t)*-1:Math.round(t)}function w4(t,e,n){var r=Math.min(t.length,e.length),i=Math.abs(t.length-e.length),s=0,o;for(o=0;o<r;o++)It(t[o])!==It(e[o])&&s++;return s+i}function SC(t,e){mt(t,0,0,function(){var n=this.utcOffset(),r="+";return n<0&&(n=-n,r="-"),r+Ls(~~(n/60),2)+e+Ls(~~n%60,2)})}SC("Z",":");SC("ZZ","");tt("Z",Yp);tt("ZZ",Yp);Zt(["Z","ZZ"],function(t,e,n){n._useUTC=!0,n._tzm=j_(Yp,t)});var x4=/([\+\-]|\d\d)/gi;function j_(t,e){var n=(e||"").match(t),r,i,s;return n===null?null:(r=n[n.length-1]||[],i=(r+"").match(x4)||["-",0,0],s=+(i[1]*60)+It(i[2]),s===0?0:i[0]==="+"?s:-s)}function U_(t,e){var n,r;return e._isUTC?(n=e.clone(),r=(ns(t)||Ld(t)?t.valueOf():un(t).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),He.updateOffset(n,!1),n):un(t).local()}function kv(t){return-Math.round(t._d.getTimezoneOffset())}He.updateOffset=function(){};function k4(t,e,n){var r=this._offset||0,i;if(!this.isValid())return t!=null?this:NaN;if(t!=null){if(typeof t=="string"){if(t=j_(Yp,t),t===null)return this}else Math.abs(t)<16&&!n&&(t=t*60);return!this._isUTC&&e&&(i=kv(this)),this._offset=t,this._isUTC=!0,i!=null&&this.add(i,"m"),r!==t&&(!e||this._changeInProgress?CC(this,as(t-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,He.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?r:kv(this)}function S4(t,e){return t!=null?(typeof t!="string"&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}function E4(t){return this.utcOffset(0,t)}function T4(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(kv(this),"m")),this}function C4(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var t=j_(W3,this._i);t!=null?this.utcOffset(t):this.utcOffset(0,!0)}return this}function A4(t){return this.isValid()?(t=t?un(t).utcOffset():0,(this.utcOffset()-t)%60===0):!1}function P4(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function O4(){if(!Kr(this._isDSTShifted))return this._isDSTShifted;var t={},e;return E_(t,this),t=wC(t),t._a?(e=t._isUTC?Ds(t._a):un(t._a),this._isDSTShifted=this.isValid()&&w4(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function $4(){return this.isValid()?!this._isUTC:!1}function L4(){return this.isValid()?this._isUTC:!1}function EC(){return this.isValid()?this._isUTC&&this._offset===0:!1}var N4=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,I4=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function as(t,e){var n=t,r=null,i,s,o;return Mf(t)?n={ms:t._milliseconds,d:t._days,M:t._months}:lo(t)||!isNaN(+t)?(n={},e?n[e]=+t:n.milliseconds=+t):(r=N4.exec(t))?(i=r[1]==="-"?-1:1,n={y:0,d:It(r[vs])*i,h:It(r[Zn])*i,m:It(r[Yi])*i,s:It(r[eo])*i,ms:It(xv(r[ma]*1e3))*i}):(r=I4.exec(t))?(i=r[1]==="-"?-1:1,n={y:na(r[2],i),M:na(r[3],i),w:na(r[4],i),d:na(r[5],i),h:na(r[6],i),m:na(r[7],i),s:na(r[8],i)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(o=R4(un(n.from),un(n.to)),n={},n.ms=o.milliseconds,n.M=o.months),s=new Xp(n),Mf(t)&&Ut(t,"_locale")&&(s._locale=t._locale),Mf(t)&&Ut(t,"_isValid")&&(s._isValid=t._isValid),s}as.fn=Xp.prototype;as.invalid=y4;function na(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function R0(t,e){var n={};return n.months=e.month()-t.month()+(e.year()-t.year())*12,t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function R4(t,e){var n;return t.isValid()&&e.isValid()?(e=U_(e,t),t.isBefore(e)?n=R0(t,e):(n=R0(e,t),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function TC(t,e){return function(n,r){var i,s;return r!==null&&!isNaN(+r)&&(tC(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=n,n=r,r=s),i=as(n,r),CC(this,i,t),this}}function CC(t,e,n,r){var i=e._milliseconds,s=xv(e._days),o=xv(e._months);t.isValid()&&(r=r??!0,o&&dC(t,Qu(t,"Month")+o*n),s&&lC(t,"Date",Qu(t,"Date")+s*n),i&&t._d.setTime(t._d.valueOf()+i*n),r&&He.updateOffset(t,s||o))}var D4=TC(1,"add"),M4=TC(-1,"subtract");function AC(t){return typeof t=="string"||t instanceof String}function F4(t){return ns(t)||Ld(t)||AC(t)||lo(t)||j4(t)||z4(t)||t===null||t===void 0}function z4(t){var e=Ea(t)&&!k_(t),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,s,o=r.length;for(i=0;i<o;i+=1)s=r[i],n=n||Ut(t,s);return e&&n}function j4(t){var e=ts(t),n=!1;return e&&(n=t.filter(function(r){return!lo(r)&&AC(t)}).length===0),e&&n}function U4(t){var e=Ea(t)&&!k_(t),n=!1,r=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],i,s;for(i=0;i<r.length;i+=1)s=r[i],n=n||Ut(t,s);return e&&n}function B4(t,e){var n=t.diff(e,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function q4(t,e){arguments.length===1&&(arguments[0]?F4(arguments[0])?(t=arguments[0],e=void 0):U4(arguments[0])&&(e=arguments[0],t=void 0):(t=void 0,e=void 0));var n=t||un(),r=U_(n,this).startOf("day"),i=He.calendarFormat(this,r)||"sameElse",s=e&&(Ms(e[i])?e[i].call(this,n):e[i]);return this.format(s||this.localeData().calendar(i,this,un(n)))}function H4(){return new Nd(this)}function V4(t,e){var n=ns(t)?t:un(t);return this.isValid()&&n.isValid()?(e=Mi(e)||"millisecond",e==="millisecond"?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(e).valueOf()):!1}function W4(t,e){var n=ns(t)?t:un(t);return this.isValid()&&n.isValid()?(e=Mi(e)||"millisecond",e==="millisecond"?this.valueOf()<n.valueOf():this.clone().endOf(e).valueOf()<n.valueOf()):!1}function G4(t,e,n,r){var i=ns(t)?t:un(t),s=ns(e)?e:un(e);return this.isValid()&&i.isValid()&&s.isValid()?(r=r||"()",(r[0]==="("?this.isAfter(i,n):!this.isBefore(i,n))&&(r[1]===")"?this.isBefore(s,n):!this.isAfter(s,n))):!1}function K4(t,e){var n=ns(t)?t:un(t),r;return this.isValid()&&n.isValid()?(e=Mi(e)||"millisecond",e==="millisecond"?this.valueOf()===n.valueOf():(r=n.valueOf(),this.clone().startOf(e).valueOf()<=r&&r<=this.clone().endOf(e).valueOf())):!1}function Y4(t,e){return this.isSame(t,e)||this.isAfter(t,e)}function J4(t,e){return this.isSame(t,e)||this.isBefore(t,e)}function Z4(t,e,n){var r,i,s;if(!this.isValid())return NaN;if(r=U_(t,this),!r.isValid())return NaN;switch(i=(r.utcOffset()-this.utcOffset())*6e4,e=Mi(e),e){case"year":s=Ff(this,r)/12;break;case"month":s=Ff(this,r);break;case"quarter":s=Ff(this,r)/3;break;case"second":s=(this-r)/1e3;break;case"minute":s=(this-r)/6e4;break;case"hour":s=(this-r)/36e5;break;case"day":s=(this-r-i)/864e5;break;case"week":s=(this-r-i)/6048e5;break;default:s=this-r}return n?s:yi(s)}function Ff(t,e){if(t.date()<e.date())return-Ff(e,t);var n=(e.year()-t.year())*12+(e.month()-t.month()),r=t.clone().add(n,"months"),i,s;return e-r<0?(i=t.clone().add(n-1,"months"),s=(e-r)/(r-i)):(i=t.clone().add(n+1,"months"),s=(e-r)/(i-r)),-(n+s)||0}He.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";He.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function X4(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Q4(t){if(!this.isValid())return null;var e=t!==!0,n=e?this.clone().utc():this;return n.year()<0||n.year()>9999?Df(n,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Ms(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Df(n,"Z")):Df(n,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function eU(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",e="",n,r,i,s;return this.isLocal()||(t=this.utcOffset()===0?"moment.utc":"moment.parseZone",e="Z"),n="["+t+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",s=e+'[")]',this.format(n+r+i+s)}function tU(t){t||(t=this.isUtc()?He.defaultFormatUtc:He.defaultFormat);var e=Df(this,t);return this.localeData().postformat(e)}function nU(t,e){return this.isValid()&&(ns(t)&&t.isValid()||un(t).isValid())?as({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function rU(t){return this.from(un(),t)}function iU(t,e){return this.isValid()&&(ns(t)&&t.isValid()||un(t).isValid())?as({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function sU(t){return this.to(un(),t)}function PC(t){var e;return t===void 0?this._locale._abbr:(e=go(t),e!=null&&(this._locale=e),this)}var OC=Di("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return t===void 0?this.localeData():this.locale(t)});function $C(){return this._locale}var Dh=1e3,zl=60*Dh,Mh=60*zl,LC=(365*400+97)*24*Mh;function jl(t,e){return(t%e+e)%e}function NC(t,e,n){return t<100&&t>=0?new Date(t+400,e,n)-LC:new Date(t,e,n).valueOf()}function IC(t,e,n){return t<100&&t>=0?Date.UTC(t+400,e,n)-LC:Date.UTC(t,e,n)}function oU(t){var e,n;if(t=Mi(t),t===void 0||t==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?IC:NC,t){case"year":e=n(this.year(),0,1);break;case"quarter":e=n(this.year(),this.month()-this.month()%3,1);break;case"month":e=n(this.year(),this.month(),1);break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=n(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf(),e-=jl(e+(this._isUTC?0:this.utcOffset()*zl),Mh);break;case"minute":e=this._d.valueOf(),e-=jl(e,zl);break;case"second":e=this._d.valueOf(),e-=jl(e,Dh);break}return this._d.setTime(e),He.updateOffset(this,!0),this}function aU(t){var e,n;if(t=Mi(t),t===void 0||t==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?IC:NC,t){case"year":e=n(this.year()+1,0,1)-1;break;case"quarter":e=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=n(this.year(),this.month()+1,1)-1;break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=Mh-jl(e+(this._isUTC?0:this.utcOffset()*zl),Mh)-1;break;case"minute":e=this._d.valueOf(),e+=zl-jl(e,zl)-1;break;case"second":e=this._d.valueOf(),e+=Dh-jl(e,Dh)-1;break}return this._d.setTime(e),He.updateOffset(this,!0),this}function lU(){return this._d.valueOf()-(this._offset||0)*6e4}function cU(){return Math.floor(this.valueOf()/1e3)}function uU(){return new Date(this.valueOf())}function dU(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]}function fU(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}}function hU(){return this.isValid()?this.toISOString():null}function pU(){return S_(this)}function gU(){return To({},kt(this))}function mU(){return kt(this).overflow}function vU(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}mt("N",0,0,"eraAbbr");mt("NN",0,0,"eraAbbr");mt("NNN",0,0,"eraAbbr");mt("NNNN",0,0,"eraName");mt("NNNNN",0,0,"eraNarrow");mt("y",["y",1],"yo","eraYear");mt("y",["yy",2],0,"eraYear");mt("y",["yyy",3],0,"eraYear");mt("y",["yyyy",4],0,"eraYear");tt("N",B_);tt("NN",B_);tt("NNN",B_);tt("NNNN",AU);tt("NNNNN",PU);Zt(["N","NN","NNN","NNNN","NNNNN"],function(t,e,n,r){var i=n._locale.erasParse(t,r,n._strict);i?kt(n).era=i:kt(n).invalidEra=t});tt("y",jc);tt("yy",jc);tt("yyy",jc);tt("yyyy",jc);tt("yo",OU);Zt(["y","yy","yyy","yyyy"],Or);Zt(["yo"],function(t,e,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=t.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?e[Or]=n._locale.eraYearOrdinalParse(t,i):e[Or]=parseInt(t,10)});function bU(t,e){var n,r,i,s=this._eras||go("en")._eras;for(n=0,r=s.length;n<r;++n){switch(typeof s[n].since){case"string":i=He(s[n].since).startOf("day"),s[n].since=i.valueOf();break}switch(typeof s[n].until){case"undefined":s[n].until=1/0;break;case"string":i=He(s[n].until).startOf("day").valueOf(),s[n].until=i.valueOf();break}}return s}function _U(t,e,n){var r,i,s=this.eras(),o,a,c;for(t=t.toUpperCase(),r=0,i=s.length;r<i;++r)if(o=s[r].name.toUpperCase(),a=s[r].abbr.toUpperCase(),c=s[r].narrow.toUpperCase(),n)switch(e){case"N":case"NN":case"NNN":if(a===t)return s[r];break;case"NNNN":if(o===t)return s[r];break;case"NNNNN":if(c===t)return s[r];break}else if([o,a,c].indexOf(t)>=0)return s[r]}function yU(t,e){var n=t.since<=t.until?1:-1;return e===void 0?He(t.since).year():He(t.since).year()+(e-t.offset)*n}function wU(){var t,e,n,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t)if(n=this.clone().startOf("day").valueOf(),r[t].since<=n&&n<=r[t].until||r[t].until<=n&&n<=r[t].since)return r[t].name;return""}function xU(){var t,e,n,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t)if(n=this.clone().startOf("day").valueOf(),r[t].since<=n&&n<=r[t].until||r[t].until<=n&&n<=r[t].since)return r[t].narrow;return""}function kU(){var t,e,n,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t)if(n=this.clone().startOf("day").valueOf(),r[t].since<=n&&n<=r[t].until||r[t].until<=n&&n<=r[t].since)return r[t].abbr;return""}function SU(){var t,e,n,r,i=this.localeData().eras();for(t=0,e=i.length;t<e;++t)if(n=i[t].since<=i[t].until?1:-1,r=this.clone().startOf("day").valueOf(),i[t].since<=r&&r<=i[t].until||i[t].until<=r&&r<=i[t].since)return(this.year()-He(i[t].since).year())*n+i[t].offset;return this.year()}function EU(t){return Ut(this,"_erasNameRegex")||q_.call(this),t?this._erasNameRegex:this._erasRegex}function TU(t){return Ut(this,"_erasAbbrRegex")||q_.call(this),t?this._erasAbbrRegex:this._erasRegex}function CU(t){return Ut(this,"_erasNarrowRegex")||q_.call(this),t?this._erasNarrowRegex:this._erasRegex}function B_(t,e){return e.erasAbbrRegex(t)}function AU(t,e){return e.erasNameRegex(t)}function PU(t,e){return e.erasNarrowRegex(t)}function OU(t,e){return e._eraYearOrdinalRegex||jc}function q_(){var t=[],e=[],n=[],r=[],i,s,o,a,c,u=this.eras();for(i=0,s=u.length;i<s;++i)o=ro(u[i].name),a=ro(u[i].abbr),c=ro(u[i].narrow),e.push(o),t.push(a),n.push(c),r.push(o),r.push(a),r.push(c);this._erasRegex=new RegExp("^("+r.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+e.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+t.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+n.join("|")+")","i")}mt(0,["gg",2],0,function(){return this.weekYear()%100});mt(0,["GG",2],0,function(){return this.isoWeekYear()%100});function Qp(t,e){mt(0,[t,t.length],0,e)}Qp("gggg","weekYear");Qp("ggggg","weekYear");Qp("GGGG","isoWeekYear");Qp("GGGGG","isoWeekYear");tt("G",Kp);tt("g",Kp);tt("GG",dn,pi);tt("gg",dn,pi);tt("GGGG",O_,P_);tt("gggg",O_,P_);tt("GGGGG",Gp,Vp);tt("ggggg",Gp,Vp);Rd(["gggg","ggggg","GGGG","GGGGG"],function(t,e,n,r){e[r.substr(0,2)]=It(t)});Rd(["gg","GG"],function(t,e,n,r){e[r]=He.parseTwoDigitYear(t)});function $U(t){return RC.call(this,t,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function LU(t){return RC.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)}function NU(){return io(this.year(),1,4)}function IU(){return io(this.isoWeekYear(),1,4)}function RU(){var t=this.localeData()._week;return io(this.year(),t.dow,t.doy)}function DU(){var t=this.localeData()._week;return io(this.weekYear(),t.dow,t.doy)}function RC(t,e,n,r,i){var s;return t==null?td(this,r,i).year:(s=io(t,r,i),e>s&&(e=s),MU.call(this,t,e,n,r,i))}function MU(t,e,n,r,i){var s=pC(t,e,n,r,i),o=ed(s.year,0,s.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}mt("Q",0,"Qo","quarter");tt("Q",rC);Zt("Q",function(t,e){e[Qs]=(It(t)-1)*3});function FU(t){return t==null?Math.ceil((this.month()+1)/3):this.month((t-1)*3+this.month()%3)}mt("D",["DD",2],"Do","date");tt("D",dn,Uc);tt("DD",dn,pi);tt("Do",function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient});Zt(["D","DD"],vs);Zt("Do",function(t,e){e[vs]=It(t.match(dn)[0])});var DC=Bc("Date",!0);mt("DDD",["DDDD",3],"DDDo","dayOfYear");tt("DDD",Wp);tt("DDDD",iC);Zt(["DDD","DDDD"],function(t,e,n){n._dayOfYear=It(t)});function zU(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return t==null?e:this.add(t-e,"d")}mt("m",["mm",2],0,"minute");tt("m",dn,$_);tt("mm",dn,pi);Zt(["m","mm"],Yi);var jU=Bc("Minutes",!1);mt("s",["ss",2],0,"second");tt("s",dn,$_);tt("ss",dn,pi);Zt(["s","ss"],eo);var UU=Bc("Seconds",!1);mt("S",0,0,function(){return~~(this.millisecond()/100)});mt(0,["SS",2],0,function(){return~~(this.millisecond()/10)});mt(0,["SSS",3],0,"millisecond");mt(0,["SSSS",4],0,function(){return this.millisecond()*10});mt(0,["SSSSS",5],0,function(){return this.millisecond()*100});mt(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});mt(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});mt(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});mt(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});tt("S",Wp,rC);tt("SS",Wp,pi);tt("SSS",Wp,iC);var Co,MC;for(Co="SSSS";Co.length<=9;Co+="S")tt(Co,jc);function BU(t,e){e[ma]=It(("0."+t)*1e3)}for(Co="S";Co.length<=9;Co+="S")Zt(Co,BU);MC=Bc("Milliseconds",!1);mt("z",0,0,"zoneAbbr");mt("zz",0,0,"zoneName");function qU(){return this._isUTC?"UTC":""}function HU(){return this._isUTC?"Coordinated Universal Time":""}var Ie=Nd.prototype;Ie.add=D4;Ie.calendar=q4;Ie.clone=H4;Ie.diff=Z4;Ie.endOf=aU;Ie.format=tU;Ie.from=nU;Ie.fromNow=rU;Ie.to=iU;Ie.toNow=sU;Ie.get=ej;Ie.invalidAt=mU;Ie.isAfter=V4;Ie.isBefore=W4;Ie.isBetween=G4;Ie.isSame=K4;Ie.isSameOrAfter=Y4;Ie.isSameOrBefore=J4;Ie.isValid=pU;Ie.lang=OC;Ie.locale=PC;Ie.localeData=$C;Ie.max=p4;Ie.min=h4;Ie.parsingFlags=gU;Ie.set=tj;Ie.startOf=oU;Ie.subtract=M4;Ie.toArray=dU;Ie.toObject=fU;Ie.toDate=uU;Ie.toISOString=Q4;Ie.inspect=eU;typeof Symbol<"u"&&Symbol.for!=null&&(Ie[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});Ie.toJSON=hU;Ie.toString=X4;Ie.unix=cU;Ie.valueOf=lU;Ie.creationData=vU;Ie.eraName=wU;Ie.eraNarrow=xU;Ie.eraAbbr=kU;Ie.eraYear=SU;Ie.year=aC;Ie.isLeapYear=Q3;Ie.weekYear=$U;Ie.isoWeekYear=LU;Ie.quarter=Ie.quarters=FU;Ie.month=fC;Ie.daysInMonth=uj;Ie.week=Ie.weeks=bj;Ie.isoWeek=Ie.isoWeeks=_j;Ie.weeksInYear=RU;Ie.weeksInWeekYear=DU;Ie.isoWeeksInYear=NU;Ie.isoWeeksInISOWeekYear=IU;Ie.date=DC;Ie.day=Ie.days=Lj;Ie.weekday=Nj;Ie.isoWeekday=Ij;Ie.dayOfYear=zU;Ie.hour=Ie.hours=Uj;Ie.minute=Ie.minutes=jU;Ie.second=Ie.seconds=UU;Ie.millisecond=Ie.milliseconds=MC;Ie.utcOffset=k4;Ie.utc=E4;Ie.local=T4;Ie.parseZone=C4;Ie.hasAlignedHourOffset=A4;Ie.isDST=P4;Ie.isLocal=$4;Ie.isUtcOffset=L4;Ie.isUtc=EC;Ie.isUTC=EC;Ie.zoneAbbr=qU;Ie.zoneName=HU;Ie.dates=Di("dates accessor is deprecated. Use date instead.",DC);Ie.months=Di("months accessor is deprecated. Use month instead",fC);Ie.years=Di("years accessor is deprecated. Use year instead",aC);Ie.zone=Di("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",S4);Ie.isDSTShifted=Di("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",O4);function VU(t){return un(t*1e3)}function WU(){return un.apply(null,arguments).parseZone()}function FC(t){return t}var Bt=T_.prototype;Bt.calendar=$3;Bt.longDateFormat=R3;Bt.invalidDate=M3;Bt.ordinal=j3;Bt.preparse=FC;Bt.postformat=FC;Bt.relativeTime=B3;Bt.pastFuture=q3;Bt.set=P3;Bt.eras=bU;Bt.erasParse=_U;Bt.erasConvertYear=yU;Bt.erasAbbrRegex=TU;Bt.erasNameRegex=EU;Bt.erasNarrowRegex=CU;Bt.months=oj;Bt.monthsShort=aj;Bt.monthsParse=cj;Bt.monthsRegex=fj;Bt.monthsShortRegex=dj;Bt.week=pj;Bt.firstDayOfYear=vj;Bt.firstDayOfWeek=mj;Bt.weekdays=Cj;Bt.weekdaysMin=Pj;Bt.weekdaysShort=Aj;Bt.weekdaysParse=$j;Bt.weekdaysRegex=Rj;Bt.weekdaysShortRegex=Dj;Bt.weekdaysMinRegex=Mj;Bt.isPM=zj;Bt.meridiem=Bj;function Fh(t,e,n,r){var i=go(),s=Ds().set(r,e);return i[n](s,t)}function zC(t,e,n){if(lo(t)&&(e=t,t=void 0),t=t||"",e!=null)return Fh(t,e,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=Fh(t,r,n,"month");return i}function H_(t,e,n,r){typeof t=="boolean"?(lo(e)&&(n=e,e=void 0),e=e||""):(e=t,n=e,t=!1,lo(e)&&(n=e,e=void 0),e=e||"");var i=go(),s=t?i._week.dow:0,o,a=[];if(n!=null)return Fh(e,(n+s)%7,r,"day");for(o=0;o<7;o++)a[o]=Fh(e,(o+s)%7,r,"day");return a}function GU(t,e){return zC(t,e,"months")}function KU(t,e){return zC(t,e,"monthsShort")}function YU(t,e,n){return H_(t,e,n,"weekdays")}function JU(t,e,n){return H_(t,e,n,"weekdaysShort")}function ZU(t,e,n){return H_(t,e,n,"weekdaysMin")}Ro("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,n=It(t%100/10)===1?"th":e===1?"st":e===2?"nd":e===3?"rd":"th";return t+n}});He.lang=Di("moment.lang is deprecated. Use moment.locale instead.",Ro);He.langData=Di("moment.langData is deprecated. Use moment.localeData instead.",go);var Vs=Math.abs;function XU(){var t=this._data;return this._milliseconds=Vs(this._milliseconds),this._days=Vs(this._days),this._months=Vs(this._months),t.milliseconds=Vs(t.milliseconds),t.seconds=Vs(t.seconds),t.minutes=Vs(t.minutes),t.hours=Vs(t.hours),t.months=Vs(t.months),t.years=Vs(t.years),this}function jC(t,e,n,r){var i=as(e,n);return t._milliseconds+=r*i._milliseconds,t._days+=r*i._days,t._months+=r*i._months,t._bubble()}function QU(t,e){return jC(this,t,e,1)}function eB(t,e){return jC(this,t,e,-1)}function D0(t){return t<0?Math.floor(t):Math.ceil(t)}function tB(){var t=this._milliseconds,e=this._days,n=this._months,r=this._data,i,s,o,a,c;return t>=0&&e>=0&&n>=0||t<=0&&e<=0&&n<=0||(t+=D0(Sv(n)+e)*864e5,e=0,n=0),r.milliseconds=t%1e3,i=yi(t/1e3),r.seconds=i%60,s=yi(i/60),r.minutes=s%60,o=yi(s/60),r.hours=o%24,e+=yi(o/24),c=yi(UC(e)),n+=c,e-=D0(Sv(c)),a=yi(n/12),n%=12,r.days=e,r.months=n,r.years=a,this}function UC(t){return t*4800/146097}function Sv(t){return t*146097/4800}function nB(t){if(!this.isValid())return NaN;var e,n,r=this._milliseconds;if(t=Mi(t),t==="month"||t==="quarter"||t==="year")switch(e=this._days+r/864e5,n=this._months+UC(e),t){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(e=this._days+Math.round(Sv(this._months)),t){case"week":return e/7+r/6048e5;case"day":return e+r/864e5;case"hour":return e*24+r/36e5;case"minute":return e*1440+r/6e4;case"second":return e*86400+r/1e3;case"millisecond":return Math.floor(e*864e5)+r;default:throw new Error("Unknown unit "+t)}}function mo(t){return function(){return this.as(t)}}var BC=mo("ms"),rB=mo("s"),iB=mo("m"),sB=mo("h"),oB=mo("d"),aB=mo("w"),lB=mo("M"),cB=mo("Q"),uB=mo("y"),dB=BC;function fB(){return as(this)}function hB(t){return t=Mi(t),this.isValid()?this[t+"s"]():NaN}function Xa(t){return function(){return this.isValid()?this._data[t]:NaN}}var pB=Xa("milliseconds"),gB=Xa("seconds"),mB=Xa("minutes"),vB=Xa("hours"),bB=Xa("days"),_B=Xa("months"),yB=Xa("years");function wB(){return yi(this.days()/7)}var Ws=Math.round,Cl={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function xB(t,e,n,r,i){return i.relativeTime(e||1,!!n,t,r)}function kB(t,e,n,r){var i=as(t).abs(),s=Ws(i.as("s")),o=Ws(i.as("m")),a=Ws(i.as("h")),c=Ws(i.as("d")),u=Ws(i.as("M")),d=Ws(i.as("w")),f=Ws(i.as("y")),h=s<=n.ss&&["s",s]||s<n.s&&["ss",s]||o<=1&&["m"]||o<n.m&&["mm",o]||a<=1&&["h"]||a<n.h&&["hh",a]||c<=1&&["d"]||c<n.d&&["dd",c];return n.w!=null&&(h=h||d<=1&&["w"]||d<n.w&&["ww",d]),h=h||u<=1&&["M"]||u<n.M&&["MM",u]||f<=1&&["y"]||["yy",f],h[2]=e,h[3]=+t>0,h[4]=r,xB.apply(null,h)}function SB(t){return t===void 0?Ws:typeof t=="function"?(Ws=t,!0):!1}function EB(t,e){return Cl[t]===void 0?!1:e===void 0?Cl[t]:(Cl[t]=e,t==="s"&&(Cl.ss=e-1),!0)}function TB(t,e){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=Cl,i,s;return typeof t=="object"&&(e=t,t=!1),typeof t=="boolean"&&(n=t),typeof e=="object"&&(r=Object.assign({},Cl,e),e.s!=null&&e.ss==null&&(r.ss=e.s-1)),i=this.localeData(),s=kB(this,!n,r,i),n&&(s=i.pastFuture(+this,s)),i.postformat(s)}var lm=Math.abs;function ml(t){return(t>0)-(t<0)||+t}function eg(){if(!this.isValid())return this.localeData().invalidDate();var t=lm(this._milliseconds)/1e3,e=lm(this._days),n=lm(this._months),r,i,s,o,a=this.asSeconds(),c,u,d,f;return a?(r=yi(t/60),i=yi(r/60),t%=60,r%=60,s=yi(n/12),n%=12,o=t?t.toFixed(3).replace(/\.?0+$/,""):"",c=a<0?"-":"",u=ml(this._months)!==ml(a)?"-":"",d=ml(this._days)!==ml(a)?"-":"",f=ml(this._milliseconds)!==ml(a)?"-":"",c+"P"+(s?u+s+"Y":"")+(n?u+n+"M":"")+(e?d+e+"D":"")+(i||r||t?"T":"")+(i?f+i+"H":"")+(r?f+r+"M":"")+(t?f+o+"S":"")):"P0D"}var Mt=Xp.prototype;Mt.isValid=_4;Mt.abs=XU;Mt.add=QU;Mt.subtract=eB;Mt.as=nB;Mt.asMilliseconds=BC;Mt.asSeconds=rB;Mt.asMinutes=iB;Mt.asHours=sB;Mt.asDays=oB;Mt.asWeeks=aB;Mt.asMonths=lB;Mt.asQuarters=cB;Mt.asYears=uB;Mt.valueOf=dB;Mt._bubble=tB;Mt.clone=fB;Mt.get=hB;Mt.milliseconds=pB;Mt.seconds=gB;Mt.minutes=mB;Mt.hours=vB;Mt.days=bB;Mt.weeks=wB;Mt.months=_B;Mt.years=yB;Mt.humanize=TB;Mt.toISOString=eg;Mt.toString=eg;Mt.toJSON=eg;Mt.locale=PC;Mt.localeData=$C;Mt.toIsoString=Di("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",eg);Mt.lang=OC;mt("X",0,0,"unix");mt("x",0,0,"valueOf");tt("x",Kp);tt("X",G3);Zt("X",function(t,e,n){n._d=new Date(parseFloat(t)*1e3)});Zt("x",function(t,e,n){n._d=new Date(It(t))});He.version="2.30.1";C3(un);He.fn=Ie;He.min=g4;He.max=m4;He.now=v4;He.utc=Ds;He.unix=VU;He.months=GU;He.isDate=Ld;He.locale=Ro;He.invalid=Hp;He.duration=as;He.isMoment=ns;He.weekdays=YU;He.parseZone=WU;He.localeData=go;He.isDuration=Mf;He.monthsShort=KU;He.weekdaysMin=ZU;He.defineLocale=D_;He.updateLocale=Wj;He.locales=Gj;He.weekdaysShort=JU;He.normalizeUnits=Mi;He.relativeTimeRounding=SB;He.relativeTimeThreshold=EB;He.calendarFormat=B4;He.prototype=Ie;He.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};function CB(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const AB=[["ß","ss"],["ẞ","Ss"],["ä","ae"],["Ä","Ae"],["ö","oe"],["Ö","Oe"],["ü","ue"],["Ü","Ue"],["À","A"],["Á","A"],["Â","A"],["Ã","A"],["Ä","Ae"],["Å","A"],["Æ","AE"],["Ç","C"],["È","E"],["É","E"],["Ê","E"],["Ë","E"],["Ì","I"],["Í","I"],["Î","I"],["Ï","I"],["Ð","D"],["Ñ","N"],["Ò","O"],["Ó","O"],["Ô","O"],["Õ","O"],["Ö","Oe"],["Ő","O"],["Ø","O"],["Ù","U"],["Ú","U"],["Û","U"],["Ü","Ue"],["Ű","U"],["Ý","Y"],["Þ","TH"],["ß","ss"],["à","a"],["á","a"],["â","a"],["ã","a"],["ä","ae"],["å","a"],["æ","ae"],["ç","c"],["è","e"],["é","e"],["ê","e"],["ë","e"],["ì","i"],["í","i"],["î","i"],["ï","i"],["ð","d"],["ñ","n"],["ò","o"],["ó","o"],["ô","o"],["õ","o"],["ö","oe"],["ő","o"],["ø","o"],["ù","u"],["ú","u"],["û","u"],["ü","ue"],["ű","u"],["ý","y"],["þ","th"],["ÿ","y"],["ẞ","SS"],["à","a"],["À","A"],["á","a"],["Á","A"],["â","a"],["Â","A"],["ã","a"],["Ã","A"],["è","e"],["È","E"],["é","e"],["É","E"],["ê","e"],["Ê","E"],["ì","i"],["Ì","I"],["í","i"],["Í","I"],["ò","o"],["Ò","O"],["ó","o"],["Ó","O"],["ô","o"],["Ô","O"],["õ","o"],["Õ","O"],["ù","u"],["Ù","U"],["ú","u"],["Ú","U"],["ý","y"],["Ý","Y"],["ă","a"],["Ă","A"],["Đ","D"],["đ","d"],["ĩ","i"],["Ĩ","I"],["ũ","u"],["Ũ","U"],["ơ","o"],["Ơ","O"],["ư","u"],["Ư","U"],["ạ","a"],["Ạ","A"],["ả","a"],["Ả","A"],["ấ","a"],["Ấ","A"],["ầ","a"],["Ầ","A"],["ẩ","a"],["Ẩ","A"],["ẫ","a"],["Ẫ","A"],["ậ","a"],["Ậ","A"],["ắ","a"],["Ắ","A"],["ằ","a"],["Ằ","A"],["ẳ","a"],["Ẳ","A"],["ẵ","a"],["Ẵ","A"],["ặ","a"],["Ặ","A"],["ẹ","e"],["Ẹ","E"],["ẻ","e"],["Ẻ","E"],["ẽ","e"],["Ẽ","E"],["ế","e"],["Ế","E"],["ề","e"],["Ề","E"],["ể","e"],["Ể","E"],["ễ","e"],["Ễ","E"],["ệ","e"],["Ệ","E"],["ỉ","i"],["Ỉ","I"],["ị","i"],["Ị","I"],["ọ","o"],["Ọ","O"],["ỏ","o"],["Ỏ","O"],["ố","o"],["Ố","O"],["ồ","o"],["Ồ","O"],["ổ","o"],["Ổ","O"],["ỗ","o"],["Ỗ","O"],["ộ","o"],["Ộ","O"],["ớ","o"],["Ớ","O"],["ờ","o"],["Ờ","O"],["ở","o"],["Ở","O"],["ỡ","o"],["Ỡ","O"],["ợ","o"],["Ợ","O"],["ụ","u"],["Ụ","U"],["ủ","u"],["Ủ","U"],["ứ","u"],["Ứ","U"],["ừ","u"],["Ừ","U"],["ử","u"],["Ử","U"],["ữ","u"],["Ữ","U"],["ự","u"],["Ự","U"],["ỳ","y"],["Ỳ","Y"],["ỵ","y"],["Ỵ","Y"],["ỷ","y"],["Ỷ","Y"],["ỹ","y"],["Ỹ","Y"],["ء","e"],["آ","a"],["أ","a"],["ؤ","w"],["إ","i"],["ئ","y"],["ا","a"],["ب","b"],["ة","t"],["ت","t"],["ث","th"],["ج","j"],["ح","h"],["خ","kh"],["د","d"],["ذ","dh"],["ر","r"],["ز","z"],["س","s"],["ش","sh"],["ص","s"],["ض","d"],["ط","t"],["ظ","z"],["ع","e"],["غ","gh"],["ـ","_"],["ف","f"],["ق","q"],["ك","k"],["ل","l"],["م","m"],["ن","n"],["ه","h"],["و","w"],["ى","a"],["ي","y"],["َ‎","a"],["ُ","u"],["ِ‎","i"],["٠","0"],["١","1"],["٢","2"],["٣","3"],["٤","4"],["٥","5"],["٦","6"],["٧","7"],["٨","8"],["٩","9"],["چ","ch"],["ک","k"],["گ","g"],["پ","p"],["ژ","zh"],["ی","y"],["۰","0"],["۱","1"],["۲","2"],["۳","3"],["۴","4"],["۵","5"],["۶","6"],["۷","7"],["۸","8"],["۹","9"],["ټ","p"],["ځ","z"],["څ","c"],["ډ","d"],["ﺫ","d"],["ﺭ","r"],["ړ","r"],["ﺯ","z"],["ږ","g"],["ښ","x"],["ګ","g"],["ڼ","n"],["ۀ","e"],["ې","e"],["ۍ","ai"],["ٹ","t"],["ڈ","d"],["ڑ","r"],["ں","n"],["ہ","h"],["ھ","h"],["ے","e"],["А","A"],["а","a"],["Б","B"],["б","b"],["В","V"],["в","v"],["Г","G"],["г","g"],["Д","D"],["д","d"],["ъе","ye"],["Ъе","Ye"],["ъЕ","yE"],["ЪЕ","YE"],["Е","E"],["е","e"],["Ё","Yo"],["ё","yo"],["Ж","Zh"],["ж","zh"],["З","Z"],["з","z"],["И","I"],["и","i"],["ый","iy"],["Ый","Iy"],["ЫЙ","IY"],["ыЙ","iY"],["Й","Y"],["й","y"],["К","K"],["к","k"],["Л","L"],["л","l"],["М","M"],["м","m"],["Н","N"],["н","n"],["О","O"],["о","o"],["П","P"],["п","p"],["Р","R"],["р","r"],["С","S"],["с","s"],["Т","T"],["т","t"],["У","U"],["у","u"],["Ф","F"],["ф","f"],["Х","Kh"],["х","kh"],["Ц","Ts"],["ц","ts"],["Ч","Ch"],["ч","ch"],["Ш","Sh"],["ш","sh"],["Щ","Sch"],["щ","sch"],["Ъ",""],["ъ",""],["Ы","Y"],["ы","y"],["Ь",""],["ь",""],["Э","E"],["э","e"],["Ю","Yu"],["ю","yu"],["Я","Ya"],["я","ya"],["ă","a"],["Ă","A"],["ș","s"],["Ș","S"],["ț","t"],["Ț","T"],["ţ","t"],["Ţ","T"],["ş","s"],["Ş","S"],["ç","c"],["Ç","C"],["ğ","g"],["Ğ","G"],["ı","i"],["İ","I"],["ա","a"],["Ա","A"],["բ","b"],["Բ","B"],["գ","g"],["Գ","G"],["դ","d"],["Դ","D"],["ե","ye"],["Ե","Ye"],["զ","z"],["Զ","Z"],["է","e"],["Է","E"],["ը","y"],["Ը","Y"],["թ","t"],["Թ","T"],["ժ","zh"],["Ժ","Zh"],["ի","i"],["Ի","I"],["լ","l"],["Լ","L"],["խ","kh"],["Խ","Kh"],["ծ","ts"],["Ծ","Ts"],["կ","k"],["Կ","K"],["հ","h"],["Հ","H"],["ձ","dz"],["Ձ","Dz"],["ղ","gh"],["Ղ","Gh"],["ճ","tch"],["Ճ","Tch"],["մ","m"],["Մ","M"],["յ","y"],["Յ","Y"],["ն","n"],["Ն","N"],["շ","sh"],["Շ","Sh"],["ո","vo"],["Ո","Vo"],["չ","ch"],["Չ","Ch"],["պ","p"],["Պ","P"],["ջ","j"],["Ջ","J"],["ռ","r"],["Ռ","R"],["ս","s"],["Ս","S"],["վ","v"],["Վ","V"],["տ","t"],["Տ","T"],["ր","r"],["Ր","R"],["ց","c"],["Ց","C"],["ու","u"],["ՈՒ","U"],["Ու","U"],["փ","p"],["Փ","P"],["ք","q"],["Ք","Q"],["օ","o"],["Օ","O"],["ֆ","f"],["Ֆ","F"],["և","yev"],["ა","a"],["ბ","b"],["გ","g"],["დ","d"],["ე","e"],["ვ","v"],["ზ","z"],["თ","t"],["ი","i"],["კ","k"],["ლ","l"],["მ","m"],["ნ","n"],["ო","o"],["პ","p"],["ჟ","zh"],["რ","r"],["ს","s"],["ტ","t"],["უ","u"],["ფ","ph"],["ქ","q"],["ღ","gh"],["ყ","k"],["შ","sh"],["ჩ","ch"],["ც","ts"],["ძ","dz"],["წ","ts"],["ჭ","tch"],["ხ","kh"],["ჯ","j"],["ჰ","h"],["č","c"],["ď","d"],["ě","e"],["ň","n"],["ř","r"],["š","s"],["ť","t"],["ů","u"],["ž","z"],["Č","C"],["Ď","D"],["Ě","E"],["Ň","N"],["Ř","R"],["Š","S"],["Ť","T"],["Ů","U"],["Ž","Z"],["ހ","h"],["ށ","sh"],["ނ","n"],["ރ","r"],["ބ","b"],["ޅ","lh"],["ކ","k"],["އ","a"],["ވ","v"],["މ","m"],["ފ","f"],["ދ","dh"],["ތ","th"],["ލ","l"],["ގ","g"],["ޏ","gn"],["ސ","s"],["ޑ","d"],["ޒ","z"],["ޓ","t"],["ޔ","y"],["ޕ","p"],["ޖ","j"],["ޗ","ch"],["ޘ","tt"],["ޙ","hh"],["ޚ","kh"],["ޛ","th"],["ޜ","z"],["ޝ","sh"],["ޞ","s"],["ޟ","d"],["ޠ","t"],["ޡ","z"],["ޢ","a"],["ޣ","gh"],["ޤ","q"],["ޥ","w"],["ަ","a"],["ާ","aa"],["ި","i"],["ީ","ee"],["ު","u"],["ޫ","oo"],["ެ","e"],["ޭ","ey"],["ޮ","o"],["ޯ","oa"],["ް",""],["α","a"],["β","v"],["γ","g"],["δ","d"],["ε","e"],["ζ","z"],["η","i"],["θ","th"],["ι","i"],["κ","k"],["λ","l"],["μ","m"],["ν","n"],["ξ","ks"],["ο","o"],["π","p"],["ρ","r"],["σ","s"],["τ","t"],["υ","y"],["φ","f"],["χ","x"],["ψ","ps"],["ω","o"],["ά","a"],["έ","e"],["ί","i"],["ό","o"],["ύ","y"],["ή","i"],["ώ","o"],["ς","s"],["ϊ","i"],["ΰ","y"],["ϋ","y"],["ΐ","i"],["Α","A"],["Β","B"],["Γ","G"],["Δ","D"],["Ε","E"],["Ζ","Z"],["Η","I"],["Θ","TH"],["Ι","I"],["Κ","K"],["Λ","L"],["Μ","M"],["Ν","N"],["Ξ","KS"],["Ο","O"],["Π","P"],["Ρ","R"],["Σ","S"],["Τ","T"],["Υ","Y"],["Φ","F"],["Χ","X"],["Ψ","PS"],["Ω","O"],["Ά","A"],["Έ","E"],["Ί","I"],["Ό","O"],["Ύ","Y"],["Ή","I"],["Ώ","O"],["Ϊ","I"],["Ϋ","Y"],["ā","a"],["ē","e"],["ģ","g"],["ī","i"],["ķ","k"],["ļ","l"],["ņ","n"],["ū","u"],["Ā","A"],["Ē","E"],["Ģ","G"],["Ī","I"],["Ķ","K"],["Ļ","L"],["Ņ","N"],["Ū","U"],["č","c"],["š","s"],["ž","z"],["Č","C"],["Š","S"],["Ž","Z"],["ą","a"],["č","c"],["ę","e"],["ė","e"],["į","i"],["š","s"],["ų","u"],["ū","u"],["ž","z"],["Ą","A"],["Č","C"],["Ę","E"],["Ė","E"],["Į","I"],["Š","S"],["Ų","U"],["Ū","U"],["Ќ","Kj"],["ќ","kj"],["Љ","Lj"],["љ","lj"],["Њ","Nj"],["њ","nj"],["Тс","Ts"],["тс","ts"],["ą","a"],["ć","c"],["ę","e"],["ł","l"],["ń","n"],["ś","s"],["ź","z"],["ż","z"],["Ą","A"],["Ć","C"],["Ę","E"],["Ł","L"],["Ń","N"],["Ś","S"],["Ź","Z"],["Ż","Z"],["Є","Ye"],["І","I"],["Ї","Yi"],["Ґ","G"],["є","ye"],["і","i"],["ї","yi"],["ґ","g"],["IJ","IJ"],["ij","ij"],["¢","c"],["¥","Y"],["߿","b"],["৳","t"],["૱","Bo"],["฿","B"],["₠","CE"],["₡","C"],["₢","Cr"],["₣","F"],["₥","m"],["₦","N"],["₧","Pt"],["₨","Rs"],["₩","W"],["₫","s"],["€","E"],["₭","K"],["₮","T"],["₯","Dp"],["₰","S"],["₱","P"],["₲","G"],["₳","A"],["₴","S"],["₵","C"],["₶","tt"],["₷","S"],["₸","T"],["₹","R"],["₺","L"],["₽","P"],["₿","B"],["﹩","$"],["¢","c"],["¥","Y"],["₩","W"],["𝐀","A"],["𝐁","B"],["𝐂","C"],["𝐃","D"],["𝐄","E"],["𝐅","F"],["𝐆","G"],["𝐇","H"],["𝐈","I"],["𝐉","J"],["𝐊","K"],["𝐋","L"],["𝐌","M"],["𝐍","N"],["𝐎","O"],["𝐏","P"],["𝐐","Q"],["𝐑","R"],["𝐒","S"],["𝐓","T"],["𝐔","U"],["𝐕","V"],["𝐖","W"],["𝐗","X"],["𝐘","Y"],["𝐙","Z"],["𝐚","a"],["𝐛","b"],["𝐜","c"],["𝐝","d"],["𝐞","e"],["𝐟","f"],["𝐠","g"],["𝐡","h"],["𝐢","i"],["𝐣","j"],["𝐤","k"],["𝐥","l"],["𝐦","m"],["𝐧","n"],["𝐨","o"],["𝐩","p"],["𝐪","q"],["𝐫","r"],["𝐬","s"],["𝐭","t"],["𝐮","u"],["𝐯","v"],["𝐰","w"],["𝐱","x"],["𝐲","y"],["𝐳","z"],["𝐴","A"],["𝐵","B"],["𝐶","C"],["𝐷","D"],["𝐸","E"],["𝐹","F"],["𝐺","G"],["𝐻","H"],["𝐼","I"],["𝐽","J"],["𝐾","K"],["𝐿","L"],["𝑀","M"],["𝑁","N"],["𝑂","O"],["𝑃","P"],["𝑄","Q"],["𝑅","R"],["𝑆","S"],["𝑇","T"],["𝑈","U"],["𝑉","V"],["𝑊","W"],["𝑋","X"],["𝑌","Y"],["𝑍","Z"],["𝑎","a"],["𝑏","b"],["𝑐","c"],["𝑑","d"],["𝑒","e"],["𝑓","f"],["𝑔","g"],["𝑖","i"],["𝑗","j"],["𝑘","k"],["𝑙","l"],["𝑚","m"],["𝑛","n"],["𝑜","o"],["𝑝","p"],["𝑞","q"],["𝑟","r"],["𝑠","s"],["𝑡","t"],["𝑢","u"],["𝑣","v"],["𝑤","w"],["𝑥","x"],["𝑦","y"],["𝑧","z"],["𝑨","A"],["𝑩","B"],["𝑪","C"],["𝑫","D"],["𝑬","E"],["𝑭","F"],["𝑮","G"],["𝑯","H"],["𝑰","I"],["𝑱","J"],["𝑲","K"],["𝑳","L"],["𝑴","M"],["𝑵","N"],["𝑶","O"],["𝑷","P"],["𝑸","Q"],["𝑹","R"],["𝑺","S"],["𝑻","T"],["𝑼","U"],["𝑽","V"],["𝑾","W"],["𝑿","X"],["𝒀","Y"],["𝒁","Z"],["𝒂","a"],["𝒃","b"],["𝒄","c"],["𝒅","d"],["𝒆","e"],["𝒇","f"],["𝒈","g"],["𝒉","h"],["𝒊","i"],["𝒋","j"],["𝒌","k"],["𝒍","l"],["𝒎","m"],["𝒏","n"],["𝒐","o"],["𝒑","p"],["𝒒","q"],["𝒓","r"],["𝒔","s"],["𝒕","t"],["𝒖","u"],["𝒗","v"],["𝒘","w"],["𝒙","x"],["𝒚","y"],["𝒛","z"],["𝒜","A"],["𝒞","C"],["𝒟","D"],["𝒢","g"],["𝒥","J"],["𝒦","K"],["𝒩","N"],["𝒪","O"],["𝒫","P"],["𝒬","Q"],["𝒮","S"],["𝒯","T"],["𝒰","U"],["𝒱","V"],["𝒲","W"],["𝒳","X"],["𝒴","Y"],["𝒵","Z"],["𝒶","a"],["𝒷","b"],["𝒸","c"],["𝒹","d"],["𝒻","f"],["𝒽","h"],["𝒾","i"],["𝒿","j"],["𝓀","h"],["𝓁","l"],["𝓂","m"],["𝓃","n"],["𝓅","p"],["𝓆","q"],["𝓇","r"],["𝓈","s"],["𝓉","t"],["𝓊","u"],["𝓋","v"],["𝓌","w"],["𝓍","x"],["𝓎","y"],["𝓏","z"],["𝓐","A"],["𝓑","B"],["𝓒","C"],["𝓓","D"],["𝓔","E"],["𝓕","F"],["𝓖","G"],["𝓗","H"],["𝓘","I"],["𝓙","J"],["𝓚","K"],["𝓛","L"],["𝓜","M"],["𝓝","N"],["𝓞","O"],["𝓟","P"],["𝓠","Q"],["𝓡","R"],["𝓢","S"],["𝓣","T"],["𝓤","U"],["𝓥","V"],["𝓦","W"],["𝓧","X"],["𝓨","Y"],["𝓩","Z"],["𝓪","a"],["𝓫","b"],["𝓬","c"],["𝓭","d"],["𝓮","e"],["𝓯","f"],["𝓰","g"],["𝓱","h"],["𝓲","i"],["𝓳","j"],["𝓴","k"],["𝓵","l"],["𝓶","m"],["𝓷","n"],["𝓸","o"],["𝓹","p"],["𝓺","q"],["𝓻","r"],["𝓼","s"],["𝓽","t"],["𝓾","u"],["𝓿","v"],["𝔀","w"],["𝔁","x"],["𝔂","y"],["𝔃","z"],["𝔄","A"],["𝔅","B"],["𝔇","D"],["𝔈","E"],["𝔉","F"],["𝔊","G"],["𝔍","J"],["𝔎","K"],["𝔏","L"],["𝔐","M"],["𝔑","N"],["𝔒","O"],["𝔓","P"],["𝔔","Q"],["𝔖","S"],["𝔗","T"],["𝔘","U"],["𝔙","V"],["𝔚","W"],["𝔛","X"],["𝔜","Y"],["𝔞","a"],["𝔟","b"],["𝔠","c"],["𝔡","d"],["𝔢","e"],["𝔣","f"],["𝔤","g"],["𝔥","h"],["𝔦","i"],["𝔧","j"],["𝔨","k"],["𝔩","l"],["𝔪","m"],["𝔫","n"],["𝔬","o"],["𝔭","p"],["𝔮","q"],["𝔯","r"],["𝔰","s"],["𝔱","t"],["𝔲","u"],["𝔳","v"],["𝔴","w"],["𝔵","x"],["𝔶","y"],["𝔷","z"],["𝔸","A"],["𝔹","B"],["𝔻","D"],["𝔼","E"],["𝔽","F"],["𝔾","G"],["𝕀","I"],["𝕁","J"],["𝕂","K"],["𝕃","L"],["𝕄","M"],["𝕆","N"],["𝕊","S"],["𝕋","T"],["𝕌","U"],["𝕍","V"],["𝕎","W"],["𝕏","X"],["𝕐","Y"],["𝕒","a"],["𝕓","b"],["𝕔","c"],["𝕕","d"],["𝕖","e"],["𝕗","f"],["𝕘","g"],["𝕙","h"],["𝕚","i"],["𝕛","j"],["𝕜","k"],["𝕝","l"],["𝕞","m"],["𝕟","n"],["𝕠","o"],["𝕡","p"],["𝕢","q"],["𝕣","r"],["𝕤","s"],["𝕥","t"],["𝕦","u"],["𝕧","v"],["𝕨","w"],["𝕩","x"],["𝕪","y"],["𝕫","z"],["𝕬","A"],["𝕭","B"],["𝕮","C"],["𝕯","D"],["𝕰","E"],["𝕱","F"],["𝕲","G"],["𝕳","H"],["𝕴","I"],["𝕵","J"],["𝕶","K"],["𝕷","L"],["𝕸","M"],["𝕹","N"],["𝕺","O"],["𝕻","P"],["𝕼","Q"],["𝕽","R"],["𝕾","S"],["𝕿","T"],["𝖀","U"],["𝖁","V"],["𝖂","W"],["𝖃","X"],["𝖄","Y"],["𝖅","Z"],["𝖆","a"],["𝖇","b"],["𝖈","c"],["𝖉","d"],["𝖊","e"],["𝖋","f"],["𝖌","g"],["𝖍","h"],["𝖎","i"],["𝖏","j"],["𝖐","k"],["𝖑","l"],["𝖒","m"],["𝖓","n"],["𝖔","o"],["𝖕","p"],["𝖖","q"],["𝖗","r"],["𝖘","s"],["𝖙","t"],["𝖚","u"],["𝖛","v"],["𝖜","w"],["𝖝","x"],["𝖞","y"],["𝖟","z"],["𝖠","A"],["𝖡","B"],["𝖢","C"],["𝖣","D"],["𝖤","E"],["𝖥","F"],["𝖦","G"],["𝖧","H"],["𝖨","I"],["𝖩","J"],["𝖪","K"],["𝖫","L"],["𝖬","M"],["𝖭","N"],["𝖮","O"],["𝖯","P"],["𝖰","Q"],["𝖱","R"],["𝖲","S"],["𝖳","T"],["𝖴","U"],["𝖵","V"],["𝖶","W"],["𝖷","X"],["𝖸","Y"],["𝖹","Z"],["𝖺","a"],["𝖻","b"],["𝖼","c"],["𝖽","d"],["𝖾","e"],["𝖿","f"],["𝗀","g"],["𝗁","h"],["𝗂","i"],["𝗃","j"],["𝗄","k"],["𝗅","l"],["𝗆","m"],["𝗇","n"],["𝗈","o"],["𝗉","p"],["𝗊","q"],["𝗋","r"],["𝗌","s"],["𝗍","t"],["𝗎","u"],["𝗏","v"],["𝗐","w"],["𝗑","x"],["𝗒","y"],["𝗓","z"],["𝗔","A"],["𝗕","B"],["𝗖","C"],["𝗗","D"],["𝗘","E"],["𝗙","F"],["𝗚","G"],["𝗛","H"],["𝗜","I"],["𝗝","J"],["𝗞","K"],["𝗟","L"],["𝗠","M"],["𝗡","N"],["𝗢","O"],["𝗣","P"],["𝗤","Q"],["𝗥","R"],["𝗦","S"],["𝗧","T"],["𝗨","U"],["𝗩","V"],["𝗪","W"],["𝗫","X"],["𝗬","Y"],["𝗭","Z"],["𝗮","a"],["𝗯","b"],["𝗰","c"],["𝗱","d"],["𝗲","e"],["𝗳","f"],["𝗴","g"],["𝗵","h"],["𝗶","i"],["𝗷","j"],["𝗸","k"],["𝗹","l"],["𝗺","m"],["𝗻","n"],["𝗼","o"],["𝗽","p"],["𝗾","q"],["𝗿","r"],["𝘀","s"],["𝘁","t"],["𝘂","u"],["𝘃","v"],["𝘄","w"],["𝘅","x"],["𝘆","y"],["𝘇","z"],["𝘈","A"],["𝘉","B"],["𝘊","C"],["𝘋","D"],["𝘌","E"],["𝘍","F"],["𝘎","G"],["𝘏","H"],["𝘐","I"],["𝘑","J"],["𝘒","K"],["𝘓","L"],["𝘔","M"],["𝘕","N"],["𝘖","O"],["𝘗","P"],["𝘘","Q"],["𝘙","R"],["𝘚","S"],["𝘛","T"],["𝘜","U"],["𝘝","V"],["𝘞","W"],["𝘟","X"],["𝘠","Y"],["𝘡","Z"],["𝘢","a"],["𝘣","b"],["𝘤","c"],["𝘥","d"],["𝘦","e"],["𝘧","f"],["𝘨","g"],["𝘩","h"],["𝘪","i"],["𝘫","j"],["𝘬","k"],["𝘭","l"],["𝘮","m"],["𝘯","n"],["𝘰","o"],["𝘱","p"],["𝘲","q"],["𝘳","r"],["𝘴","s"],["𝘵","t"],["𝘶","u"],["𝘷","v"],["𝘸","w"],["𝘹","x"],["𝘺","y"],["𝘻","z"],["𝘼","A"],["𝘽","B"],["𝘾","C"],["𝘿","D"],["𝙀","E"],["𝙁","F"],["𝙂","G"],["𝙃","H"],["𝙄","I"],["𝙅","J"],["𝙆","K"],["𝙇","L"],["𝙈","M"],["𝙉","N"],["𝙊","O"],["𝙋","P"],["𝙌","Q"],["𝙍","R"],["𝙎","S"],["𝙏","T"],["𝙐","U"],["𝙑","V"],["𝙒","W"],["𝙓","X"],["𝙔","Y"],["𝙕","Z"],["𝙖","a"],["𝙗","b"],["𝙘","c"],["𝙙","d"],["𝙚","e"],["𝙛","f"],["𝙜","g"],["𝙝","h"],["𝙞","i"],["𝙟","j"],["𝙠","k"],["𝙡","l"],["𝙢","m"],["𝙣","n"],["𝙤","o"],["𝙥","p"],["𝙦","q"],["𝙧","r"],["𝙨","s"],["𝙩","t"],["𝙪","u"],["𝙫","v"],["𝙬","w"],["𝙭","x"],["𝙮","y"],["𝙯","z"],["𝙰","A"],["𝙱","B"],["𝙲","C"],["𝙳","D"],["𝙴","E"],["𝙵","F"],["𝙶","G"],["𝙷","H"],["𝙸","I"],["𝙹","J"],["𝙺","K"],["𝙻","L"],["𝙼","M"],["𝙽","N"],["𝙾","O"],["𝙿","P"],["𝚀","Q"],["𝚁","R"],["𝚂","S"],["𝚃","T"],["𝚄","U"],["𝚅","V"],["𝚆","W"],["𝚇","X"],["𝚈","Y"],["𝚉","Z"],["𝚊","a"],["𝚋","b"],["𝚌","c"],["𝚍","d"],["𝚎","e"],["𝚏","f"],["𝚐","g"],["𝚑","h"],["𝚒","i"],["𝚓","j"],["𝚔","k"],["𝚕","l"],["𝚖","m"],["𝚗","n"],["𝚘","o"],["𝚙","p"],["𝚚","q"],["𝚛","r"],["𝚜","s"],["𝚝","t"],["𝚞","u"],["𝚟","v"],["𝚠","w"],["𝚡","x"],["𝚢","y"],["𝚣","z"],["𝚤","l"],["𝚥","j"],["𝛢","A"],["𝛣","B"],["𝛤","G"],["𝛥","D"],["𝛦","E"],["𝛧","Z"],["𝛨","I"],["𝛩","TH"],["𝛪","I"],["𝛫","K"],["𝛬","L"],["𝛭","M"],["𝛮","N"],["𝛯","KS"],["𝛰","O"],["𝛱","P"],["𝛲","R"],["𝛳","TH"],["𝛴","S"],["𝛵","T"],["𝛶","Y"],["𝛷","F"],["𝛸","x"],["𝛹","PS"],["𝛺","O"],["𝛻","D"],["𝛼","a"],["𝛽","b"],["𝛾","g"],["𝛿","d"],["𝜀","e"],["𝜁","z"],["𝜂","i"],["𝜃","th"],["𝜄","i"],["𝜅","k"],["𝜆","l"],["𝜇","m"],["𝜈","n"],["𝜉","ks"],["𝜊","o"],["𝜋","p"],["𝜌","r"],["𝜍","s"],["𝜎","s"],["𝜏","t"],["𝜐","y"],["𝜑","f"],["𝜒","x"],["𝜓","ps"],["𝜔","o"],["𝜕","d"],["𝜖","E"],["𝜗","TH"],["𝜘","K"],["𝜙","f"],["𝜚","r"],["𝜛","p"],["𝜜","A"],["𝜝","V"],["𝜞","G"],["𝜟","D"],["𝜠","E"],["𝜡","Z"],["𝜢","I"],["𝜣","TH"],["𝜤","I"],["𝜥","K"],["𝜦","L"],["𝜧","M"],["𝜨","N"],["𝜩","KS"],["𝜪","O"],["𝜫","P"],["𝜬","S"],["𝜭","TH"],["𝜮","S"],["𝜯","T"],["𝜰","Y"],["𝜱","F"],["𝜲","X"],["𝜳","PS"],["𝜴","O"],["𝜵","D"],["𝜶","a"],["𝜷","v"],["𝜸","g"],["𝜹","d"],["𝜺","e"],["𝜻","z"],["𝜼","i"],["𝜽","th"],["𝜾","i"],["𝜿","k"],["𝝀","l"],["𝝁","m"],["𝝂","n"],["𝝃","ks"],["𝝄","o"],["𝝅","p"],["𝝆","r"],["𝝇","s"],["𝝈","s"],["𝝉","t"],["𝝊","y"],["𝝋","f"],["𝝌","x"],["𝝍","ps"],["𝝎","o"],["𝝏","a"],["𝝐","e"],["𝝑","i"],["𝝒","k"],["𝝓","f"],["𝝔","r"],["𝝕","p"],["𝝖","A"],["𝝗","B"],["𝝘","G"],["𝝙","D"],["𝝚","E"],["𝝛","Z"],["𝝜","I"],["𝝝","TH"],["𝝞","I"],["𝝟","K"],["𝝠","L"],["𝝡","M"],["𝝢","N"],["𝝣","KS"],["𝝤","O"],["𝝥","P"],["𝝦","R"],["𝝧","TH"],["𝝨","S"],["𝝩","T"],["𝝪","Y"],["𝝫","F"],["𝝬","X"],["𝝭","PS"],["𝝮","O"],["𝝯","D"],["𝝰","a"],["𝝱","v"],["𝝲","g"],["𝝳","d"],["𝝴","e"],["𝝵","z"],["𝝶","i"],["𝝷","th"],["𝝸","i"],["𝝹","k"],["𝝺","l"],["𝝻","m"],["𝝼","n"],["𝝽","ks"],["𝝾","o"],["𝝿","p"],["𝞀","r"],["𝞁","s"],["𝞂","s"],["𝞃","t"],["𝞄","y"],["𝞅","f"],["𝞆","x"],["𝞇","ps"],["𝞈","o"],["𝞉","a"],["𝞊","e"],["𝞋","i"],["𝞌","k"],["𝞍","f"],["𝞎","r"],["𝞏","p"],["𝞐","A"],["𝞑","V"],["𝞒","G"],["𝞓","D"],["𝞔","E"],["𝞕","Z"],["𝞖","I"],["𝞗","TH"],["𝞘","I"],["𝞙","K"],["𝞚","L"],["𝞛","M"],["𝞜","N"],["𝞝","KS"],["𝞞","O"],["𝞟","P"],["𝞠","S"],["𝞡","TH"],["𝞢","S"],["𝞣","T"],["𝞤","Y"],["𝞥","F"],["𝞦","X"],["𝞧","PS"],["𝞨","O"],["𝞩","D"],["𝞪","av"],["𝞫","g"],["𝞬","d"],["𝞭","e"],["𝞮","z"],["𝞯","i"],["𝞰","i"],["𝞱","th"],["𝞲","i"],["𝞳","k"],["𝞴","l"],["𝞵","m"],["𝞶","n"],["𝞷","ks"],["𝞸","o"],["𝞹","p"],["𝞺","r"],["𝞻","s"],["𝞼","s"],["𝞽","t"],["𝞾","y"],["𝞿","f"],["𝟀","x"],["𝟁","ps"],["𝟂","o"],["𝟃","a"],["𝟄","e"],["𝟅","i"],["𝟆","k"],["𝟇","f"],["𝟈","r"],["𝟉","p"],["𝟊","F"],["𝟋","f"],["⒜","(a)"],["⒝","(b)"],["⒞","(c)"],["⒟","(d)"],["⒠","(e)"],["⒡","(f)"],["⒢","(g)"],["⒣","(h)"],["⒤","(i)"],["⒥","(j)"],["⒦","(k)"],["⒧","(l)"],["⒨","(m)"],["⒩","(n)"],["⒪","(o)"],["⒫","(p)"],["⒬","(q)"],["⒭","(r)"],["⒮","(s)"],["⒯","(t)"],["⒰","(u)"],["⒱","(v)"],["⒲","(w)"],["⒳","(x)"],["⒴","(y)"],["⒵","(z)"],["Ⓐ","(A)"],["Ⓑ","(B)"],["Ⓒ","(C)"],["Ⓓ","(D)"],["Ⓔ","(E)"],["Ⓕ","(F)"],["Ⓖ","(G)"],["Ⓗ","(H)"],["Ⓘ","(I)"],["Ⓙ","(J)"],["Ⓚ","(K)"],["Ⓛ","(L)"],["Ⓝ","(N)"],["Ⓞ","(O)"],["Ⓟ","(P)"],["Ⓠ","(Q)"],["Ⓡ","(R)"],["Ⓢ","(S)"],["Ⓣ","(T)"],["Ⓤ","(U)"],["Ⓥ","(V)"],["Ⓦ","(W)"],["Ⓧ","(X)"],["Ⓨ","(Y)"],["Ⓩ","(Z)"],["ⓐ","(a)"],["ⓑ","(b)"],["ⓒ","(b)"],["ⓓ","(c)"],["ⓔ","(e)"],["ⓕ","(f)"],["ⓖ","(g)"],["ⓗ","(h)"],["ⓘ","(i)"],["ⓙ","(j)"],["ⓚ","(k)"],["ⓛ","(l)"],["ⓜ","(m)"],["ⓝ","(n)"],["ⓞ","(o)"],["ⓟ","(p)"],["ⓠ","(q)"],["ⓡ","(r)"],["ⓢ","(s)"],["ⓣ","(t)"],["ⓤ","(u)"],["ⓥ","(v)"],["ⓦ","(w)"],["ⓧ","(x)"],["ⓨ","(y)"],["ⓩ","(z)"],["Ċ","C"],["ċ","c"],["Ġ","G"],["ġ","g"],["Ħ","H"],["ħ","h"],["Ż","Z"],["ż","z"],["𝟎","0"],["𝟏","1"],["𝟐","2"],["𝟑","3"],["𝟒","4"],["𝟓","5"],["𝟔","6"],["𝟕","7"],["𝟖","8"],["𝟗","9"],["𝟘","0"],["𝟙","1"],["𝟚","2"],["𝟛","3"],["𝟜","4"],["𝟝","5"],["𝟞","6"],["𝟟","7"],["𝟠","8"],["𝟡","9"],["𝟢","0"],["𝟣","1"],["𝟤","2"],["𝟥","3"],["𝟦","4"],["𝟧","5"],["𝟨","6"],["𝟩","7"],["𝟪","8"],["𝟫","9"],["𝟬","0"],["𝟭","1"],["𝟮","2"],["𝟯","3"],["𝟰","4"],["𝟱","5"],["𝟲","6"],["𝟳","7"],["𝟴","8"],["𝟵","9"],["𝟶","0"],["𝟷","1"],["𝟸","2"],["𝟹","3"],["𝟺","4"],["𝟻","5"],["𝟼","6"],["𝟽","7"],["𝟾","8"],["𝟿","9"],["①","1"],["②","2"],["③","3"],["④","4"],["⑤","5"],["⑥","6"],["⑦","7"],["⑧","8"],["⑨","9"],["⑩","10"],["⑪","11"],["⑫","12"],["⑬","13"],["⑭","14"],["⑮","15"],["⑯","16"],["⑰","17"],["⑱","18"],["⑲","19"],["⑳","20"],["⑴","1"],["⑵","2"],["⑶","3"],["⑷","4"],["⑸","5"],["⑹","6"],["⑺","7"],["⑻","8"],["⑼","9"],["⑽","10"],["⑾","11"],["⑿","12"],["⒀","13"],["⒁","14"],["⒂","15"],["⒃","16"],["⒄","17"],["⒅","18"],["⒆","19"],["⒇","20"],["⒈","1."],["⒉","2."],["⒊","3."],["⒋","4."],["⒌","5."],["⒍","6."],["⒎","7."],["⒏","8."],["⒐","9."],["⒑","10."],["⒒","11."],["⒓","12."],["⒔","13."],["⒕","14."],["⒖","15."],["⒗","16."],["⒘","17."],["⒙","18."],["⒚","19."],["⒛","20."],["⓪","0"],["⓫","11"],["⓬","12"],["⓭","13"],["⓮","14"],["⓯","15"],["⓰","16"],["⓱","17"],["⓲","18"],["⓳","19"],["⓴","20"],["⓵","1"],["⓶","2"],["⓷","3"],["⓸","4"],["⓹","5"],["⓺","6"],["⓻","7"],["⓼","8"],["⓽","9"],["⓾","10"],["⓿","0"],["🙰","&"],["🙱","&"],["🙲","&"],["🙳","&"],["🙴","&"],["🙵","&"],["🙶",'"'],["🙷",'"'],["🙸",'"'],["‽","?!"],["🙹","?!"],["🙺","?!"],["🙻","?!"],["🙼","/"],["🙽","\\"],["🜇","AR"],["🜈","V"],["🜉","V"],["🜆","VR"],["🜅","VF"],["🜩","2"],["🜪","5"],["🝡","f"],["🝢","W"],["🝣","U"],["🝧","V"],["🝨","T"],["🝪","V"],["🝫","MB"],["🝬","VB"],["🝲","3B"],["🝳","3B"],["💯","100"],["🔙","BACK"],["🔚","END"],["🔛","ON!"],["🔜","SOON"],["🔝","TOP"],["🔞","18"],["🔤","abc"],["🔠","ABCD"],["🔡","abcd"],["🔢","1234"],["🔣","T&@%"],["#️⃣","#"],["*️⃣","*"],["0️⃣","0"],["1️⃣","1"],["2️⃣","2"],["3️⃣","3"],["4️⃣","4"],["5️⃣","5"],["6️⃣","6"],["7️⃣","7"],["8️⃣","8"],["9️⃣","9"],["🔟","10"],["🅰️","A"],["🅱️","B"],["🆎","AB"],["🆑","CL"],["🅾️","O"],["🅿","P"],["🆘","SOS"],["🅲","C"],["🅳","D"],["🅴","E"],["🅵","F"],["🅶","G"],["🅷","H"],["🅸","I"],["🅹","J"],["🅺","K"],["🅻","L"],["🅼","M"],["🅽","N"],["🆀","Q"],["🆁","R"],["🆂","S"],["🆃","T"],["🆄","U"],["🆅","V"],["🆆","W"],["🆇","X"],["🆈","Y"],["🆉","Z"]],PB=(t,e)=>{for(const[n,r]of e)t=t.replace(new RegExp(CB(n),"g"),r);return t};function OB(t,e){if(typeof t!="string")throw new TypeError(`Expected a string, got \`${typeof t}\``);e={customReplacements:[],...e};const n=new Map([...AB,...e.customReplacements]);return t=t.normalize(),t=PB(t,n),t=t.normalize("NFD").replace(/\p{Diacritic}/gu,"").normalize(),t}const Qa=t=>{const{format:e,date_format:n=void 0,time_format:r=void 0,picker_utc:i=!1}=t;return{format:e,dateFormat:n,timeFormat:r,dateOnly:r===!1,timeOnly:n===!1,utc:i}},ac=(t,e)=>{const{format:n,timeOnly:r,utc:i}=Qa(e);if(t)try{return r?new Date(new Date(`${new Date().toJSON().split("T")[0]}T${t}`)):n?(i?He.utc:He)(t,n).toDate():new Date(t)}catch(s){console.error(s);return}},qC=t=>{const{dateOnly:e,timeOnly:n,utc:r}=Qa(t),{year:i,month:s,day:o,hour:a,minute:c}=$d({timeZone:r?"UTC":void 0}),u=`${i}-${s}-${o}`,d=`${a}:${c}`;return e?u:n?d:r?`${u}T${d}:00.000Z`:`${u}T${d}`},HC=(t,e,n)=>{const{format:r,dateOnly:i,timeOnly:s,utc:o}=Qa(n),a=`:00${e?.endsWith(".000")?".000":""}`;if(t==="")return"";if(t){if(s)return`${t}${a}`;try{return r?(o?He.utc:He)(t).format(r):i?t:o?`${t}:00.000Z`:`${t}${a}`}catch(c){console.error(c);return}}},$B=t=>{const{default:e}=t;return typeof e!="string"?"":e==="{{now}}"?HC(qC(t),"",t):e},LB=(t,e)=>{const{dateOnly:n,timeOnly:r,utc:i}=Qa(e);if(!t)return"";const s=n?t?.match(/^(?<date>\d{4}-[01]\d-[0-3]\d)\b/)?.groups?.date:r?t?.match(/^(?<time>[0-2]\d:[0-5]\d)\b/)?.groups?.time:void 0;if(s)return s;try{const{year:o,month:a,day:c,hour:u,minute:d}=$d({date:t?ac(t,e):new Date,timeZone:i?"UTC":void 0}),f=`${o}-${a}-${c}`,h=`${u}:${d}`;return n?f:r?h:`${f}T${h}`}catch(o){return console.error(o),""}},NB=/^date\('(?<format>.+?)'(?:,\s*'(?<timeZone>.+?)')?\)$/,IB=/^default\('?(?<defaultValue>.+?)'?\)$/,RB=/^ternary\('?(?<truthyValue>.*?)'?,\s*'?(?<falsyValue>.*?)'?\)$/,DB=/^truncate\((?<max>\d+)(?:,\s*'(?<ellipsis>.+?)')?\)$/,MB=({fieldConfig:t,value:e,transformation:n})=>{const r=String(e);if(n==="upper")return r.toUpperCase();if(n==="lower")return r.toLowerCase();const i=n.match(NB);if(i?.groups){const{format:c,timeZone:u}=i.groups,{dateOnly:d,utc:f}=Qa(t??{}),p=(u==="utc"||f||d&&!!r.match(/^\d{4}-[01]\d-[0-3]\d$/)||d&&!!r.match(/T\d{2}:\d{2}(?::\d{2})?(?:\.\d+)?Z$/)?He.utc:He)(r);return p.isValid()?p.format(c):""}const s=n.match(IB);if(s?.groups){const{defaultValue:c}=s.groups;return e?r:c}const o=n.match(RB);if(o?.groups){const{truthyValue:c,falsyValue:u}=o.groups;return e?c:u}const a=n.match(DB);if(a?.groups){const{max:c,ellipsis:u="…"}=a.groups;return dk(r,Number(c),{ellipsis:u})}return r},V_=({fieldConfig:t,value:e,transformations:n})=>(n.forEach(r=>{e=MB({fieldConfig:t,value:e,transformation:r})}),e),cm=t=>/{{.+?}}/.test(t)?t:`{{${t}}}`,M0=new Map,W_=(t,e,n)=>{const r=JSON.stringify({locale:t,fieldConfig:e,refEntries:n}),i=M0.get(r);if(i)return i;const s=e.value_field??e.valueField,o=e.display_fields??e.displayFields??[s],a=e.search_fields??e.searchFields??o,c=cm(s),u=o.map(cm).join(" "),d=a.map(cm).join(" "),f=e.filters??[],h=n.map(p=>{const{content:g}=p.locales[t]??p.locales._default??{};return{refEntry:p,hasContent:!!g,content:g??{}}}).filter(({hasContent:p,content:g})=>p&&f.every(({field:m,values:v})=>v.includes(g[m]))).map(({refEntry:p,content:g})=>{const m=Object.fromEntries(rc([...[...u.matchAll(/{{(.+?)}}/g)].map(x=>x[1]),...[...c.matchAll(/{{(.+?)}}/g)].map(x=>x[1]),...[...d.matchAll(/{{(.+?)}}/g)].map(x=>x[1])].map(x=>x.includes(".")?x.replace(/^([^.]+)+\.\*\.[^.]+$/,"$1.*"):x)).map(x=>{if(x.endsWith(".*")){const E=new RegExp(`^${ln(x).replace("\\.\\*","\\.\\d+\\.[^.]+")}$`),A=za(Object.fromEntries(Object.entries(g).filter(([O])=>E.test(O))));return[x,A[Object.keys(A)[0]]??""]}if(x==="slug")return[x,p.slug];const k=_n({collectionName:e.collection,keyPath:x}),S=x.replace(/^fields\./,"");if(k?.widget==="relation")return[x,G_({fieldConfig:k,valueMap:g,keyPath:S,locale:t})??""];let C=g[S];if(C===void 0){const{defaultLocale:E}=Fi(e.collection)?._i18n??{};E&&(C=p.locales[E].content[S])}return[x,C??""]})),v=Math.max(...Object.values(m).map(x=>Array.isArray(x)?x.length:1));let _=new Array(v).fill(u),b=new Array(v).fill(c),y=new Array(v).fill(d);return Object.entries(m).forEach(([x,k])=>{Array.isArray(k)?k.forEach((S,C)=>{Object.entries(S).forEach(([E,A])=>{_.forEach((O,L)=>{(C===0&&L===0||C%L===0)&&(_[C]=_[C].replaceAll(`{{${x}.${E}}}`,A),b[C]=b[C].replaceAll(`{{${x}.${E}}}`,A),y[C]=y[C].replaceAll(`{{${x}.${E}}}`,A))})})}):(_=_.map(S=>S.replaceAll(`{{${x}}}`,k)),b=b.map(S=>S.replaceAll(`{{${x}}}`,k)),y=y.map(S=>S.replaceAll(`{{${x}}}`,k)))}),_.map((x,k)=>({label:x,value:b[k],searchValue:y[k]}))}).flat(1).sort((p,g)=>ui(p.label,g.label));return M0.set(r,h),h},G_=({fieldConfig:t,valueMap:e,keyPath:n,locale:r})=>{const{multiple:i,collection:s}=t,o=rs(s),a=W_(r,t,o),c=u=>a.find(d=>d.value===u)?.label||u;return i?Object.entries(e).filter(([d])=>d.match(`^${ln(n)}\\.\\d+$`)).map(([,d])=>d).map(c):c(e[n])},um=new Map,FB=({fieldConfig:t,valueMap:e,keyPath:n})=>{const r=JSON.stringify({fieldConfig:t,valueMap:e,keyPath:n}),i=um.get(r);if(i)return i;const{multiple:s,options:o}=t,a=ME(o),c=f=>o.find(h=>h.value===f)?.label||f;if(s){const f=Object.entries(e).filter(([p])=>p.match(`^${ln(n)}\\.\\d+$`)).map(([,p])=>p),h=a?f.map(c):f;return um.set(r,h),h}const u=e[n],d=a?c(u):u;return um.set(r,d),d},dm=new Map,_n=({collectionName:t,fileName:e=void 0,valueMap:n={},keyPath:r})=>{const i=JSON.stringify({collectionName:t,fileName:e,valueMap:n,keyPath:r}),s=dm.get(i);if(s)return s;const o=Fi(t),a=e?o?._fileMap[e]:void 0;if(!o||e&&!a){dm.set(i,void 0);return}const{fields:c=[]}=a??o,u=r.split(".");let d;return u.forEach((f,h)=>{if(h===0)d=c.find(({name:p})=>p===f);else if(d){const p=/^\d+$/.test(f),g=u.slice(0,h),{field:m,fields:v,types:_,typeKey:b="type"}=d;if(m){const y=p?u[h+1]:void 0;d=!y||m.name===y?m:void 0}else v&&!p?d=v.find(({name:y})=>y===f):_&&p?d=_.find(({name:y})=>y===n[[...g,f,b].join(".")]):_&&f!==b&&(d=_.find(({name:y})=>y===n[[...g,b].join(".")])?.fields?.find(({name:y})=>y===f))}}),dm.set(i,d),d},Dd=({fieldConfig:{required:t=!0},locale:e})=>Array.isArray(t)?t.includes(e):!!t,tg=({collectionName:t,fileName:e,valueMap:n,keyPath:r,locale:i,transformations:s})=>{const o=_n({collectionName:t,fileName:e,valueMap:n,keyPath:r});let a=n[r];if(o?.widget==="relation"&&(a=G_({fieldConfig:o,valueMap:n,keyPath:r,locale:i})),o?.widget==="select"&&(a=FB({fieldConfig:o,valueMap:n,keyPath:r})),o?.widget==="list"){const{fields:c,types:u}=o;c||u||(a=oc(i).format(Object.entries(n).filter(([d,f])=>d.match(`^${ln(r)}\\.\\d+$`)&&typeof f=="string"&&!!f).map(([,d])=>d)))}return Array.isArray(a)&&(a=oc(i).format(a)),s?.length&&(a=V_({fieldConfig:o,value:a,transformations:s})),a?String(a):""},lc=({entry:t,locale:e,collectionName:n,key:r,resolveRef:i=!0})=>{const{slug:s,locales:o,commitAuthor:{name:a,login:c,email:u}={},commitDate:d}=t;if(r==="slug")return s;if(r==="commit_author")return a||c||u;if(r==="commit_date")return d;const{content:f}=o[e]??{};if(f!==void 0){if(i){const h=_n({collectionName:n,keyPath:r});if(h?.widget==="relation")return G_({fieldConfig:h,valueMap:f,keyPath:r,locale:e})}return f[r]}},zB=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],F0={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};function VC(t){const e=typeof t=="string"?t.charCodeAt(0):t;return e>=48&&e<=57}function jB(t){const e=typeof t=="string"?t.charCodeAt(0):t;return e>=97&&e<=102||e>=65&&e<=70||e>=48&&e<=57}function UB(t){const e=typeof t=="string"?t.charCodeAt(0):t;return e>=97&&e<=122||e>=65&&e<=90}function z0(t){return UB(t)||VC(t)}const j0=document.createElement("i");function U0(t){const e="&"+t+";";j0.innerHTML=e;const n=j0.textContent;return n.charCodeAt(n.length-1)===59&&t!=="semi"||n===e?!1:n}const BB=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function qB(t,e){const n={},r=typeof n.additional=="string"?n.additional.charCodeAt(0):n.additional,i=[];let s=0,o=-1,a="",c,u;n.position&&("start"in n.position||"indent"in n.position?(u=n.position.indent,c=n.position.start):c=n.position);let d=(c?c.line:0)||1,f=(c?c.column:0)||1,h=g(),p;for(s--;++s<=t.length;)if(p===10&&(f=(u?u[o]:0)||1),p=t.charCodeAt(s),p===38){const _=t.charCodeAt(s+1);if(_===9||_===10||_===12||_===32||_===38||_===60||Number.isNaN(_)||r&&_===r){a+=String.fromCharCode(p),f++;continue}const b=s+1;let y=b,x=b,k;if(_===35){x=++y;const N=t.charCodeAt(x);N===88||N===120?(k="hexadecimal",x=++y):k="decimal"}else k="named";let S="",C="",E="";const A=k==="named"?z0:k==="decimal"?VC:jB;for(x--;++x<=t.length;){const N=t.charCodeAt(x);if(!A(N))break;E+=String.fromCharCode(N),k==="named"&&zB.includes(E)&&(S=E,C=U0(E))}let O=t.charCodeAt(x)===59;if(O){x++;const N=k==="named"?U0(E):!1;N&&(S=E,C=N)}let L=1+x-b,I="";if(!(!O&&n.nonTerminated===!1))if(!E)k!=="named"&&m(4,L);else if(k==="named"){if(O&&!C)m(5,1);else if(S!==E&&(x=y+S.length,L=1+x-y,O=!1),!O){const N=S?1:3;if(n.attribute){const j=t.charCodeAt(x);j===61?(m(N,L),C=""):z0(j)?C="":m(N,L)}else m(N,L)}I=C}else{O||m(2,L);let N=Number.parseInt(E,k==="hexadecimal"?16:10);if(HB(N))m(7,L),I="�";else if(N in F0)m(6,L),I=F0[N];else{let j="";VB(N)&&m(6,L),N>65535&&(N-=65536,j+=String.fromCharCode(N>>>10|55296),N=56320|N&1023),I=j+String.fromCharCode(N)}}if(I){v(),h=g(),s=x-1,f+=x-b+1,i.push(I);const N=g();N.offset++,n.reference&&n.reference.call(n.referenceContext||void 0,I,{start:h,end:N},t.slice(b-1,x)),h=N}else E=t.slice(b-1,x),a+=E,f+=E.length,s=x-1}else p===10&&(d++,o++,f=0),Number.isNaN(p)?v():(a+=String.fromCharCode(p),f++);return i.join("");function g(){return{line:d,column:f,offset:s+((c?c.offset:0)||0)}}function m(_,b){let y;n.warning&&(y=g(),y.column+=b,y.offset+=b,n.warning.call(n.warningContext||void 0,BB[_],y,_))}function v(){a&&(i.push(a),n.text&&n.text.call(n.textContext||void 0,a,{start:h,end:g()}),a="")}}function HB(t){return t>=55296&&t<=57343||t>1114111}function VB(t){return t>=1&&t<=8||t===11||t>=13&&t<=31||t>=127&&t<=159||t>=64976&&t<=65007||(t&65535)===65535||(t&65535)===65534}const B0=(t,{allowMarkdown:e=!1}={})=>(t=dz(t),t=BE.sanitize(t,{ALLOWED_TAGS:e?["strong","em","code"]:[]}),t=qB(t),t.trim()),WC=(t,{identifierField:e="title",useBody:n=!0}={})=>{const r=[e,"title","name","label"].find(i=>typeof t[i]=="string"&&!!t[i].trim());return r?t[r].trim():n&&typeof t.body=="string"?t.body.match(/^#+\s+(?<header>.+?)(?:\s+\{#.+?\})?\s*$/m)?.groups?.header??"":""},qo=(t,e,{locale:n,useTemplate:r=!1,allowMarkdown:i=!1}={})=>{const{name:s,identifier_field:o="title",summary:a,_i18n:{defaultLocale:c}}=t,u=t._type==="entry"?t._file.basePath:void 0,{locales:d,slug:f,commitDate:h,commitAuthor:p}=e,{content:g={},path:m=""}=d[n??c]??Object.values(d)[0]??{};if(!r||!a)return B0(WC(g,{identifierField:o})||f.replaceAll("-"," "),{allowMarkdown:i});const v=b=>{if(b==="slug")return f;if(b==="dirname")return Fn(m.replace(/[^/]+$/,"").replace(u??"",""));if(b==="filename")return m.split("/").pop().split(".").shift();if(b==="extension")return m.split("/").pop().split(".").pop();if(b==="commit_date")return h??"";if(b==="commit_author")return p?.name||p?.login||p?.email},_=b=>{const[y,...x]=b.split(/\s*\|\s*/),k=g,S=y.replace(/^fields\./,"");let C=v(y);if(C===void 0&&(C=tg({collectionName:s,valueMap:k,keyPath:S,locale:c})),C===void 0)return"";if(C instanceof Date&&!x.length){const{year:E,month:A,day:O}=$d({date:C});return`${E}-${A}-${O}`}return x.length&&(C=V_({fieldConfig:_n({collectionName:s,valueMap:k,keyPath:S}),value:C,transformations:x})),String(C)};return B0(a.replace(/{{(.+?)}}/g,(b,y)=>_(y)),{allowMarkdown:i})},zh=()=>(globalThis.matchMedia("(pointer: fine)")?.matches??!1)&&"ondrop"in globalThis,K_=t=>{const e=new Intl.NumberFormat(ne(Nn),{maximumFractionDigits:1}),n=1e3,r=n*1e3,i=r*1e3,s=i*1e3;return t<n?ne(le)("file_size_units.b",{values:{size:e.format(t)}}):t<r?ne(le)("file_size_units.kb",{values:{size:e.format(t/n)}}):t<i?ne(le)("file_size_units.mb",{values:{size:e.format(t/r)}}):t<s?ne(le)("file_size_units.gb",{values:{size:e.format(t/i)}}):ne(le)("file_size_units.tb",{values:{size:e.format(t/s)}})},Y_=(t,e)=>{if(!e.length)return t;const{filename:n,extension:r}=Ln(t),i=new RegExp(`^${ln(n)}(?:-(?<num>\\d+?))?${r?`\\.${r}`:""}$`),s=e.sort((a,c)=>ui(a.split(".")[0],c.split(".")[0])).findLast(a=>i.test(a));if(!s)return t;const o=Number(s.match(i)?.groups?.num??0)+1;return`${n}-${o}${r?`.${r}`:""}`},jh=t=>t.filter(Boolean).join("/"),Ev=t=>{const e=t.split("/");let n=!1;return e.forEach((r,i)=>{if(r==="."||r===".."){if(n&&(e[i]=null,r==="..")){const s=e.findLastIndex((o,a)=>!!o&&a<i);s>-1&&(e[s]=null)}}else n=!0}),jh(e)},WB=t=>{const{slug:{encoding:e="unicode",clean_accents:n=!1,sanitize_replacement:r="-"}={}}=ne(wt)??{};let i=t;return n&&(i=OB(i).normalize("NFD").replace(/\p{Diacritic}/gu,"")),e==="ascii"?i=i.replaceAll(/[^\w-~]/g," "):i=i.replaceAll(/[\p{Z}\p{C}!"#$&'()*+,/:;<=>?@[\]^`{|}]/gu," "),i.toLocaleLowerCase().trim().replaceAll(/\s+/g,r)},ys=(t,{type:e,collection:n,content:r,currentSlug:i,entryFilePath:s,locale:o,dateTimeParts:a=$d({timeZone:"UTC"})})=>{const{name:c,identifier_field:u="title",slug_length:d=void 0}=n,f=n._type==="entry"?n._file.basePath:void 0,h=m=>{if(["year","month","day","hour","minute","second"].includes(m))return a[m];if(m==="slug"&&i)return i;if(m==="uuid")return Gn();if(m==="uuid_short")return Gn("short");if(m==="uuid_shorter")return Gn("shorter");if(e==="preview_path"&&m==="locale")return o;if(e==="preview_path"||e==="media_folder"){if(!s)return"";if(m==="dirname")return s.replace(f??"","").match(/(.+?)(?:\/[^/]+)?$/)?.[1]??"";if(m==="filename")return s.split("/").pop().split(".").shift();if(m==="extension")return s.split("/").pop().split(".").pop()}let v;return m.startsWith("fields.")?v=r[m.replace(/^fields\./,"")]:m==="slug"?v=WC(r,{identifierField:u}):v=r[m],v},p=m=>{const[v,..._]=m.split(/\s*\|\s*/);let b=h(v);return b===void 0?Gn("short"):(_.length&&(b=V_({fieldConfig:_n({collectionName:c,valueMap:r,keyPath:v}),value:b,transformations:_})),b!==void 0&&(b=WB(String(b))),b?String(b):Gn("short"))};let g=t.replace(/{{(.+?)}}/g,(m,v)=>p(v)).trim();return typeof d=="number"&&(g=dk(g,d,{ellipsis:""}).replace(/-$/,"")),i?g:Y_(g,rs(c).map(m=>o?m.locales[o]?.slug??m.slug:m.slug))},co=t=>tA(Object.values(t.locales)[0].path).map(({collectionName:e})=>Fi(e)).filter(e=>!!e),GC=(t,e,n,r)=>{const{show_preview_links:i=!0,_baseURL:s}=ne(wt)??{},{slug:o,path:a,content:c}=t.locales[e]??{},{preview_path:u,preview_path_date_field:d,fields:f}=r??n;if(!i||!s||!a||!c||!u)return;let h;if(/{{(?:year|month|day|hour|minute|second)}}/g.test(u)){const p=d?f?.find(({widget:_,name:b})=>_==="datetime"&&b===d):f?.find(({widget:_})=>_==="datetime"),g=p?c[p.name]:void 0;if(!p||!g)return;const{format:m,picker_utc:v=!1}=p;h=$d({date:(v?He.utc:He)(g,m).toDate(),timeZone:v?"UTC":void 0})}try{const p=ys(u,{type:"preview_path",collection:n,content:c,locale:e,currentSlug:o,entryFilePath:a,dateTimeParts:h});return`${s.replace(/\/$/,"")}/${p.replace(/^\//,"")}`}catch{return}},GB=(t,e)=>`${ne(In)?.repository?.blobBaseURL}/${t.locales[e]?.path}?plain=1`,Zo=(t,e)=>{const n=t.files?t._fileMap:void 0;return n?Object.values(n).filter(({_file:r,_i18n:i})=>r.fullPath===e.locales[i.defaultLocale]?.path):[]},J_=(t,e)=>ne(ii).find(n=>co(n).some(r=>r.name===t&&Zo(r,n).some(i=>i.name===e))),KB=/!\[.*?\]\((.+?)(?:\s+".*?")?\)/g,cc=st([]),rs=t=>{const e=Fi(t);if(!e)return[];const{filter:n,_i18n:{defaultLocale:r}}=e,i=n?.field,s=typeof n?.pattern=="string"?new RegExp(n.pattern):void 0,o=n?.value===void 0?[]:Array.isArray(n.value)?n.value:[n.value];return ne(ii).filter(a=>{if(!co(a).some(({name:u})=>u===t))return!1;if(!i)return!0;const c=lc({entry:a,locale:r,collectionName:t,key:i})??null;return s?s.test(c):o.includes(c)})},Tv=async(t,{entries:e=ne(ii),newURL:n=""}={})=>{const r=ne(wt)?._baseURL,i=r&&!t.startsWith("blob:")?t.replace(r,""):t,s=await Promise.all(e.map(async o=>{const{locales:a}=o,c=co(o);return(await Promise.all(Object.values(a).map(async({content:d})=>(await Promise.all(Object.entries(d).map(async([h,p])=>typeof p!="string"||!p?!1:(await Promise.all(c.map(async m=>{const v=async b=>{const y=_n({collectionName:m.name,fileName:b?.name,valueMap:d,keyPath:h});if(!y)return!1;const{widget:x="string"}=y;if(["image","file"].includes(x)){const k=await uc(p,o)===i;return k&&n&&(d[h]=n),k}if(x==="markdown"){const k=[...p.matchAll(KB)];if(k.length)return(await Promise.all(k.map(async([,S])=>{const C=await uc(S,o)===i;return C&&n&&(d[h]=d[h].replace(S,n)),C}))).some(Boolean)}return!1},_=Zo(m,o);return _.length?(await Promise.all(_.map(v))).includes(!0):v()}))).includes(!0)))).includes(!0)))).includes(!0)}));return e.filter((o,a)=>s[a])},q0="https://unpkg.com/pdfjs-dist/build";let _f;const YB=(t,e)=>{const n=e==="image",r=n?new Image:document.createElement(e);return new Promise(i=>{const s=()=>{i({dimensions:e==="audio"?void 0:{width:n?r.naturalWidth:r.videoWidth,height:n?r.naturalHeight:r.videoHeight},duration:n?void 0:r.duration})};r.addEventListener(n?"load":"loadedmetadata",s,{once:!0}),r.src=t})},JB=t=>new Date(t*1e3).toISOString().substr(11,8),KC=(t,e,n,r)=>{let i=1;return r?e>n?(i=r/e,t.width=r,t.height=n*i):(i=r/n,t.width=e*i,t.height=r):(t.width=e,t.height=n),i},YC=async(t,{format:e="png",quality:n=1,dimension:r=void 0}={})=>{let i,s=0,o=0;try{i=await createImageBitmap(t),{width:s,height:o}=i}catch{const u=URL.createObjectURL(t);i=await new Promise(d=>{if(t.type.startsWith("video/")){const f=document.createElement("video");f.addEventListener("canplay",async()=>{f.pause(),{videoWidth:s,videoHeight:o}=f,d(f)},{once:!0}),f.muted=!0,f.autoplay=!0,f.playsInline=!0,f.src=u,f.style.opacity="0",document.body.appendChild(f)}else{const f=new Image;f.addEventListener("load",()=>{({naturalWidth:s,naturalHeight:o}=f),d(f)},{once:!0}),f.src=u}}),URL.revokeObjectURL(u)}const a=new OffscreenCanvas(512,512),c=a.getContext("2d");return KC(a,s,o,r),c.drawImage(i,0,0,a.width,a.height),i instanceof HTMLVideoElement&&document.body.removeChild(i),a.convertToBlob({type:`image/${e}`,quality:n})},ZB=async(t,{format:e="png",quality:n=1,dimension:r=void 0}={})=>{if(!_f)try{_f=await Wk(()=>import(`${q0}/pdf.min.mjs`),[]),_f.GlobalWorkerOptions.workerSrc=`${q0}/pdf.worker.min.mjs`}catch{throw new Error("Failed to load PDF.js library")}const i=URL.createObjectURL(t),s=new OffscreenCanvas(512,512),o=s.getContext("2d");try{const c=await(await _f.getDocument({url:i,isEvalSupported:!1,disableAutoFetch:!0}).promise).getPage(1),u=c.getViewport({scale:1}),{width:d,height:f}=u,h=KC(s,d,f,r);await c.render({canvasContext:o,viewport:h===1?u:c.getViewport({scale:h})}).promise,URL.revokeObjectURL(i)}catch{throw new Error("Failed to render PDF")}return s.convertToBlob({type:`image/${e}`,quality:n})},XB=t=>{if(!tb(t))return!1;const{origin:e,pathname:n,searchParams:r}=new URL(t);return!!((e==="https://www.youtube.com"||e==="https://www.youtube-nocookie.com")&&(n==="/watch"&&r.has("v")||n==="/playlist"&&r.has("list")||n.startsWith("/embed/"))||e==="https://youtu.be"&&n)},QB=t=>{const e="https://www.youtube-nocookie.com",{pathname:n,search:r,searchParams:i}=new URL(t);if(n==="/watch"){const s=new URLSearchParams(i);let o=`${e}/embed/${s.get("v")}`;return s.get("list")&&(s.delete("v"),s.set("listType","playlist"),o+=`?${s.toString()}`),o}return n==="/playlist"?`${e}/embed/videoseries${r}`:n.startsWith("/embed/")?`${e}${n}${r}`:`${e}/embed${n}${r}`},JC=["image","video","audio"],e8=[...JC,"document","other"],Cv={image:/\.(?:avif|bmp|gif|ico|jpe?g|png|svg|tiff?|webp)$/i,video:/\.(?:avi|mp4|mpeg|ogv|ts|webm|3gp|3g2)$/i,audio:/\.(?:aac|midi?|mp3|opus|wav|weba)$/i,document:/\.(?:csv|docx?|odp|ods|odt|pdf|pptx?|rtf|xslx?)$/i},en=st([]),hi=st([]),Z_=ur([hi],([t],e)=>{e(t.find(({collectionName:n})=>!n))}),ni=st(),rd=st([]),uo=st(),Xo=st(!1),Ho=st(),ws=st({folder:void 0,files:[]}),Av=st(),zf=st(),ng=t=>JC.includes(t),ZC=t=>{const e=Jo.getType(t.path);return ng(t.kind)||e==="application/pdf"||!!e&&Nu(e)},XC=async t=>{let e="";if(typeof t=="string")if(t.startsWith("blob:"))try{e=(await(await fetch(t)).blob()).type}catch{}else e=Jo.getType(t)??"";else t instanceof Blob&&(e=t.type);if(!e)return;const[n,r]=e.split("/");if(ng(n)&&!r.startsWith("x-"))return n},t8=t=>{const e=Jo.getType(t.path);return!!e&&Nu(e)},X_=t=>Object.entries(Cv).find(([,e])=>e.test(t))?.[0]??"other",el=async t=>{const{file:e,blobURL:n,name:r}=t;if(n)return fetch(n).then(s=>s.blob());let i;if(e)i=e;else{const s=await ne(In)?.fetchBlob?.(t);if(!s)throw new Error("Failed to retrieve blob");i=new Blob([s],{type:Jo.getType(r)??s.type})}return t.blobURL=URL.createObjectURL(i),i},Q_=async t=>(t.blobURL||await el(t),t.blobURL);let yf;const QC=async t=>{const e=t.name.endsWith(".pdf");if(!(["image","video"].includes(t.kind)||e))return;if(yf===void 0){const{databaseName:r}=ne(In)?.repository??{};yf=r?new jo(r,"asset-thumbnails"):null}let n=await yf?.get(t.sha);if(!n){const r=await el(t),i={format:"webp",quality:.85,dimension:512};n=e?await ZB(r,i):await YC(r,i),await yf?.set(t.sha,n)}return URL.createObjectURL(n)},eA=(t,{matchSubFolders:e=!1}={})=>{const{filename:n}=Ln(t);return n.startsWith("+")?[]:ne(hi).filter(({internalPath:r,entryRelative:i})=>i?t.startsWith(`${r}/`):new RegExp(`^${r.replace(/{{.+?}}/g,".+?")}${r&&e?"\\b":"$"}`).test(Ln(t).dirname??"")).sort((r,i)=>i.internalPath.localeCompare(r.internalPath??"")??0)},ey=t=>eA(t.path,{matchSubFolders:!0}).map(({collectionName:e})=>e?Fi(e):void 0).filter(e=>!!e),ty=(t,{entry:e,collection:n}={})=>{const r=decodeURI(t);if(!/^[/@]/.test(r)){if(!e)return;const{locales:p}=e,g=({_i18n:v})=>{const{defaultLocale:_}=v,b=_ in p?_:Object.keys(p)[0],{path:y,content:x}=p[b];if(!y||!x)return;const{entryFolder:k}=y.match(/(?<entryFolder>.+?)(?:\/[^/]+)?$/)?.groups??{},S=Ev(`${k}/${r}`);return ne(en).find(C=>C.path===S)};return co(e).map(v=>{const _=Zo(v,e);return _.length?_.map(g):g(v)}).flat(1).filter(Boolean)[0]??ne(en).find(v=>v.path===r)}const i=ne(en).find(p=>p.path===Fn(r));if(i)return i;const{dirname:s="",basename:o}=Ln(r);let{collectionName:a,internalPath:c,publicPath:u}=s?ne(hi).findLast(p=>s.match(`^${p.publicPath.replace(/{{.+?}}/g,".+?")}\\b`))??{}:ne(hi)[0];if(c===void 0)return;if(!a){const p=r.replace(new RegExp(`^${ln(u||s)}`),c),g=ne(en).find(m=>m.path===p);if(g)return g}if(e&&!n&&([n]=co(e)),e&&n&&/{{.+?}}/.test(c)){const{content:p,path:g}=e.locales[n._i18n.defaultLocale];c=ys(c,{type:"media_folder",collection:n,content:Sa(p),currentSlug:e.slug,entryFilePath:g})}const d=n?._assetFolder?.publicPath,f=d?Fn(s.replace(new RegExp(`^${ln(d)}`),"")):"",h=jh([c,f,o]);return ne(en).find(p=>p.path===h)},rg=(t,{pathOnly:e=!1,allowSpecial:n=!1,entry:r=void 0}={})=>{const i=ne(hi),{publicPath:s,entryRelative:o}=i.find(({collectionName:d})=>ey(t).some(f=>f.name===d))??i.find(({collectionName:d})=>!d)??{};if(o)return e&&r&&Ln(t.path).dirname===Ln(Object.values(r.locales)[0].path).dirname?t.name:void 0;const a=t.path.replace(t.folder,s==="/"?"":s??""),c=encodeURI(a);return!c.startsWith("/")&&!n?void 0:e?c:`${ne(wt)?._baseURL}${c}`},uc=async(t,e,{thumbnail:n=!1}={})=>{if(!t)return;if(/^(?:https?|data|blob):/.test(t))return t;const r=ty(t,{entry:e});if(r)return(n?await QC(r):await Q_(r))??rg(r)},Uh={publicURL:void 0,repoBlobURL:void 0,dimensions:void 0,duration:void 0,usedEntries:[]},ig=async t=>{const{kind:e,path:n}=t,{blobBaseURL:r}=ne(In)?.repository??{},i=await Q_(t),s=rg(t),o=i??s;let a,c;return["image","video","audio"].includes(e)&&i&&({dimensions:a,duration:c}=await YB(i,e)),{publicURL:s,repoBlobURL:r?`${r}/${n}`:void 0,dimensions:a,duration:c,usedEntries:o?await Tv(o):[]}},n8=t=>ne(en).filter(e=>e.folder===t),ny=t=>ne(en).filter(e=>Ln(e.path).dirname===t);ni.subscribe(()=>{uo.set(void 0)});const Vn=st(),fm=new Map,r8=t=>{const{folder:e,fields:n,thumbnail:r}=t;return e?typeof r=="string"?[r]:Array.isArray(r)?r:n?.length?n.filter(({widget:i="string"})=>["image","file"].includes(i)).map(({name:i})=>i):[]:[]},Fi=t=>{const e=fm.get(t);if(e)return e;const n=ne(wt)?.collections.find(d=>d.name===t),r=typeof n?.folder=="string",i=!r&&Array.isArray(n?.files);if(!r&&!i){fm.set(t,void 0);return}const{folder:s,files:o}=n;r?n.folder=Fn(s):o.forEach(d=>{d.file=Fn(d.file)});const a=Nh(n),c={...n,_i18n:a,_assetFolder:ne(hi).find(({collectionName:d})=>d===t)},u=r?{...c,_type:"entry",_file:tw({rawCollection:n,_i18n:a}),_thumbnailFieldNames:r8(n)}:{...c,_type:"file",_fileMap:o?.length?Object.fromEntries(o.map(d=>{const f=Nh(n,d),h=tw({rawCollection:n,file:d,_i18n:f});return[d.name,{...d,_file:h,_i18n:f}]})):{}};return fm.set(t,u),u},dc=st(!1),Ta=st(),ry=st([]),ii=st([]),iy=st([]),tA=t=>ne(ry).filter(({collectionName:e,filePathMap:n})=>n?Object.values(n).includes(t):Fi(e)?._file?.fullPathRegEx?.test(t)).sort((e,n)=>n.folderPath?.localeCompare(e.folderPath??"")??0),i8={DEV:!1},{DEV:s8}=i8,o8=void 0,wt=st(),sy=st(),Pv=st(),H0=async({ignoreError:t=!1}={})=>{const{href:e=window.location.pathname==="/admin"?"/admin/config.yml":"./config.yml",type:n="application/yaml"}=document.querySelector('link[rel="cms-config-url"]')??{};let r;try{r=await fetch(e)}catch(o){throw new Error(ne(le)("config.error.fetch_failed"),{cause:o})}const{ok:i,status:s}=r;if(!i){if(t)return{};throw new Error(ne(le)("config.error.fetch_failed"),{cause:new Error(ne(le)("config.error.fetch_failed_not_ok",{values:{status:s}}))})}try{return n==="application/json"?r.json():Od.parse(await r.text(),{merge:!0})}catch(o){throw new Error(ne(le)("config.error.parse_failed"),{cause:o})}},a8=t=>{if(!Jn(t))throw new Error(ne(le)("config.error.parse_failed"),{cause:new Error(ne(le)("config.error.parse_failed_invalid_object"))});if(!t.collections?.length)throw new Error(ne(le)("config.error.no_collection"));if(!t.backend?.name)throw new Error(ne(le)("config.error.no_backend"));if(!(t.backend.name in ag))throw new Error(ne(le)("config.error.unsupported_backend",{values:{name:t.backend.name}}));if(typeof t.backend.repo!="string"||!/(.+)\/([^/]+)$/.test(t.backend.repo))throw new Error(ne(le)("config.error.no_repository"));if(t.backend.auth_type==="implicit")throw new Error(ne(le)("config.error.oauth_implicit_flow"));if(t.backend.auth_type==="pkce"&&!t.backend.app_id)throw new Error(ne(le)("config.error.oauth_no_app_id"));if(typeof t.media_folder!="string")throw new Error(ne(le)("config.error.no_media_folder"))},l8=async(t={})=>{wt.set(void 0),Pv.set(void 0);try{if(!window.isSecureContext)throw new Error(ne(le)("config.error.no_secure_context"));if(t&&!Jn(t))throw new Error(ne(le)("config.error.parse_failed"));let e;t?.load_config_file===!1?e=t:Object.entries(t).length?e=mk(await H0({ignoreError:!0}),t):e=await H0(),a8(e);const n=e;n._siteURL=n.site_url?.trim()||(s8?o8:window.location.origin),n._baseURL=tb(n._siteURL)?new URL(n._siteURL).origin:"",n.collections.forEach(r=>{(r.folder==="."||r.folder==="/")&&(r.folder="")}),wt.set(n),sy.set(await Pa(Od.stringify(n)))}catch(e){Pv.set({message:e.name==="Error"?e.message:ne(le)("config.error.unexpected")}),console.error(e,e.cause)}};wt.subscribe(t=>{if(ne(Tt).devModeEnabled&&console.info("siteConfig",t),!t)return;const{media_folder:e,public_folder:n,collections:r}=t,i=[...r.filter(({folder:d,hide:f,divider:h})=>typeof d=="string"&&!f&&!h).map(d=>{const{name:f,folder:h}=d,p=Fn(h),{i18nEnabled:g,structure:m,allLocales:v}=Nh(d),_=g&&m==="multiple_folders_i18n_root";return{collectionName:f,folderPath:p,folderPathMap:Object.fromEntries(v.map(b=>[b,_?`${b}/${p}`:p]))}}).sort((d,f)=>ui(d.folderPath??"",f.folderPath??"")),...r.filter(({files:d,hide:f,divider:h})=>Array.isArray(d)&&!f&&!h).map(d=>{const{name:f,files:h}=d;return(h??[]).map(p=>{const g=Fn(p.file);return{collectionName:f,fileName:p.name,filePathMap:g.includes("{{locale}}")?Object.fromEntries(Nh(d,p).allLocales.map(m=>[m,g.replace("{{locale}}",m)])):{_default:g}}})}).flat(1).sort((d,f)=>ui(Object.values(d.filePathMap)[0],Object.values(f.filePathMap)[0]))],s=Fn(e).replace(/^\.$/,""),o=n?`/${Fn(n)}`.replace(/^\/@/,"@"):`/${s}`,a={collectionName:void 0,internalPath:s,publicPath:o,entryRelative:!1},c=r.filter(({hide:d,divider:f,media_folder:h,path:p})=>(!d||!!h||!!p)&&!f).map(d=>{const{name:f,folder:h,path:p,public_folder:g}=d;let{media_folder:m}=d;if(m===void 0){if(p===void 0)return null;m=""}m=m.replace("{{media_folder}}",s);const v=!(m.startsWith("/")||m.startsWith(s));let _=Fn((g??m).replace("{{public_folder}}",o).trim());return _=_===""||_.match(/^[.@]/)?_:`/${_}`,{collectionName:f,internalPath:Fn(v?h??"":m),publicPath:_,entryRelative:v}}).filter(Boolean).sort((d,f)=>ui(d.internalPath,f.internalPath)),u=[a,...c];ry.set(i),hi.set(u),ne(Tt).devModeEnabled&&(console.info("allEntryFolders",i),console.info("allAssetFolders",u))});const gi=st();gi.subscribe(t=>{(async()=>{try{t?await ti.set("sveltia-cms.user",t):t===null&&await ti.delete("sveltia-cms.user")}catch{}})()});const c8={create:"Create {{collection}} “{{slug}}”",update:"Update {{collection}} “{{slug}}”",delete:"Delete {{collection}} “{{slug}}”",uploadMedia:"Upload “{{path}}”",deleteMedia:"Delete “{{path}}”",openAuthoring:"{{message}}"},nA=(t,{commitType:e="update",collection:n,skipCI:r=void 0})=>{const{backend:{commit_messages:i={},automatic_deployments:s}}=ne(wt),{login:o="",name:a=""}=ne(gi),[c=""]=t.map(p=>p.slug).filter(Boolean),[u,...d]=t.map(({path:p})=>p),f=n?.label_singular||n?.label||n?.name||"";let h=i[e]||c8[e]||"";return["create","update","delete"].includes(e)&&(h=h.replaceAll("{{slug}}",c).replaceAll("{{collection}}",f).replaceAll("{{path}}",u).replaceAll("{{author-login}}",o).replaceAll("{{author-name}}",a)),["uploadMedia","deleteMedia"].includes(e)&&(h=h.replaceAll("{{path}}",u).replaceAll("{{author-login}}",o).replaceAll("{{author-name}}",a),d.length&&(h+=` +${d.length}`)),["openAuthoring"].includes(e)&&(h=h.replaceAll("{{message}}",e).replaceAll("{{author-login}}",o).replaceAll("{{author-name}}",a)),!["delete","deleteMedia"].includes(e)&&(r===void 0?s===!1:r===!0)&&(h=`[skip ci] ${h}`),h},rA=t=>t.map(e=>{const{file:n,path:r,sha:i,size:s,text:o=void 0,meta:a={},folder:{internalPath:c}}=e;return{file:n,blobURL:void 0,path:r,name:Ln(r).basename,sha:i,size:s,kind:X_(r),text:o,folder:c,...a}}),iA=t=>t.length===1&&t[0].widget==="list"&&t[0].root===!0,u8=({collectionName:t,fileName:e,keyPath:n,valueMap:r,locale:i,summaryTemplate:s,hasSingleSubField:o,index:a})=>{if(!s){if(o)return r[`${n}.${a}`];const c=new RegExp(`^${ln(n)}\\.${a}[\\b\\.]`),u=Object.fromEntries(Object.entries(r).filter(([d])=>c.test(d)).map(([d,f])=>[d.replace(c,""),f]));return u.title||u.name||Object.values(u).find(d=>typeof d=="string"&&!!d)||""}return s.replaceAll(/{{(.+?)}}/g,(c,u)=>{const[d,...f]=u.split(/\s*\|\s*/),h=`${n}.${a}.${d.replace(/^fields\./,"")}`;return o&&!_n({collectionName:t,fileName:e,valueMap:r,keyPath:h})?"":tg({collectionName:t,fileName:e,valueMap:r,keyPath:o?`${n}.${a}`:h,locale:i,transformations:f})})};function d8(t,e){let n=t.slice(0,e).split(/\r\n|\n|\r/g);return[n.length,n.pop().length+1]}function f8(t,e,n){let r=t.split(/\r\n|\n|\r/g),i="",s=(Math.log10(e+1)|0)+1;for(let o=e-1;o<=e+1;o++){let a=r[o-1];a&&(i+=o.toString().padEnd(s," "),i+=": ",i+=a,i+=`
393
+ `+new Error().stack),n=!1}return e.apply(this,arguments)},e)}var L0={};function tC(t,e){He.deprecationHandler!=null&&He.deprecationHandler(t,e),L0[t]||(eC(e),L0[t]=!0)}He.suppressDeprecationWarnings=!1;He.deprecationHandler=null;function Ms(t){return typeof Function<"u"&&t instanceof Function||Object.prototype.toString.call(t)==="[object Function]"}function Pz(t){var e,n;for(n in t)Ut(t,n)&&(e=t[n],Ms(e)?this[n]=e:this["_"+n]=e);this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function _v(t,e){var n=To({},t),r;for(r in e)Ut(e,r)&&(Ea(t[r])&&Ea(e[r])?(n[r]={},To(n[r],t[r]),To(n[r],e[r])):e[r]!=null?n[r]=e[r]:delete n[r]);for(r in t)Ut(t,r)&&!Ut(e,r)&&Ea(t[r])&&(n[r]=To({},n[r]));return n}function T_(t){t!=null&&this.set(t)}var yv;Object.keys?yv=Object.keys:yv=function(t){var e,n=[];for(e in t)Ut(t,e)&&n.push(e);return n};var Oz={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function $z(t,e,n){var r=this._calendar[t]||this._calendar.sameElse;return Ms(r)?r.call(e,n):r}function Ls(t,e,n){var r=""+Math.abs(t),i=e-r.length,s=t>=0;return(s?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var C_=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,vf=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,om={},Fl={};function mt(t,e,n,r){var i=r;typeof r=="string"&&(i=function(){return this[r]()}),t&&(Fl[t]=i),e&&(Fl[e[0]]=function(){return Ls(i.apply(this,arguments),e[1],e[2])}),n&&(Fl[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),t)})}function Lz(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function Nz(t){var e=t.match(C_),n,r;for(n=0,r=e.length;n<r;n++)Fl[e[n]]?e[n]=Fl[e[n]]:e[n]=Lz(e[n]);return function(i){var s="",o;for(o=0;o<r;o++)s+=Ms(e[o])?e[o].call(i,t):e[o];return s}}function Df(t,e){return t.isValid()?(e=nC(e,t.localeData()),om[e]=om[e]||Nz(e),om[e](t)):t.localeData().invalidDate()}function nC(t,e){var n=5;function r(i){return e.longDateFormat(i)||i}for(vf.lastIndex=0;n>=0&&vf.test(t);)t=t.replace(vf,r),vf.lastIndex=0,n-=1;return t}var Iz={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function Rz(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];return e||!n?e:(this._longDateFormat[t]=n.match(C_).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[t])}var Dz="Invalid date";function Mz(){return this._invalidDate}var Fz="%d",zz=/\d{1,2}/;function jz(t){return this._ordinal.replace("%d",t)}var Uz={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Bz(t,e,n,r){var i=this._relativeTime[n];return Ms(i)?i(t,e,n,r):i.replace(/%d/i,t)}function qz(t,e){var n=this._relativeTime[t>0?"future":"past"];return Ms(n)?n(e):n.replace(/%s/i,e)}var N0={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function Mi(t){return typeof t=="string"?N0[t]||N0[t.toLowerCase()]:void 0}function A_(t){var e={},n,r;for(r in t)Ut(t,r)&&(n=Mi(r),n&&(e[n]=t[r]));return e}var Hz={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function Vz(t){var e=[],n;for(n in t)Ut(t,n)&&e.push({unit:n,priority:Hz[n]});return e.sort(function(r,i){return r.priority-i.priority}),e}var rC=/\d/,pi=/\d\d/,iC=/\d{3}/,P_=/\d{4}/,Vp=/[+-]?\d{6}/,dn=/\d\d?/,sC=/\d\d\d\d?/,oC=/\d\d\d\d\d\d?/,Wp=/\d{1,3}/,O_=/\d{1,4}/,Gp=/[+-]?\d{1,6}/,jc=/\d+/,Kp=/[+-]?\d+/,Wz=/Z|[+-]\d\d:?\d\d/gi,Yp=/Z|[+-]\d\d(?::?\d\d)?/gi,Gz=/[+-]?\d+(\.\d{1,3})?/,Id=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Uc=/^[1-9]\d?/,$_=/^([1-9]\d|\d)/,Ih;Ih={};function tt(t,e,n){Ih[t]=Ms(e)?e:function(r,i){return r&&n?n:e}}function Kz(t,e){return Ut(Ih,t)?Ih[t](e._strict,e._locale):new RegExp(Yz(t))}function Yz(t){return ro(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,n,r,i,s){return n||r||i||s}))}function ro(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function yi(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function It(t){var e=+t,n=0;return e!==0&&isFinite(e)&&(n=yi(e)),n}var wv={};function Zt(t,e){var n,r=e,i;for(typeof t=="string"&&(t=[t]),lo(e)&&(r=function(s,o){o[e]=It(s)}),i=t.length,n=0;n<i;n++)wv[t[n]]=r}function Rd(t,e){Zt(t,function(n,r,i,s){i._w=i._w||{},e(n,i._w,i,s)})}function Jz(t,e,n){e!=null&&Ut(wv,t)&&wv[t](e,n._a,n,t)}function Jp(t){return t%4===0&&t%100!==0||t%400===0}var Or=0,Qs=1,vs=2,Zn=3,Yi=4,eo=5,ma=6,Zz=7,Xz=8;mt("Y",0,0,function(){var t=this.year();return t<=9999?Ls(t,4):"+"+t});mt(0,["YY",2],0,function(){return this.year()%100});mt(0,["YYYY",4],0,"year");mt(0,["YYYYY",5],0,"year");mt(0,["YYYYYY",6,!0],0,"year");tt("Y",Kp);tt("YY",dn,pi);tt("YYYY",O_,P_);tt("YYYYY",Gp,Vp);tt("YYYYYY",Gp,Vp);Zt(["YYYYY","YYYYYY"],Or);Zt("YYYY",function(t,e){e[Or]=t.length===2?He.parseTwoDigitYear(t):It(t)});Zt("YY",function(t,e){e[Or]=He.parseTwoDigitYear(t)});Zt("Y",function(t,e){e[Or]=parseInt(t,10)});function Cu(t){return Jp(t)?366:365}He.parseTwoDigitYear=function(t){return It(t)+(It(t)>68?1900:2e3)};var aC=Bc("FullYear",!0);function Qz(){return Jp(this.year())}function Bc(t,e){return function(n){return n!=null?(lC(this,t,n),He.updateOffset(this,e),this):Qu(this,t)}}function Qu(t,e){if(!t.isValid())return NaN;var n=t._d,r=t._isUTC;switch(e){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function lC(t,e,n){var r,i,s,o,a;if(!(!t.isValid()||isNaN(n))){switch(r=t._d,i=t._isUTC,e){case"Milliseconds":return void(i?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(i?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(i?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(i?r.setUTCHours(n):r.setHours(n));case"Date":return void(i?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}s=n,o=t.month(),a=t.date(),a=a===29&&o===1&&!Jp(s)?28:a,i?r.setUTCFullYear(s,o,a):r.setFullYear(s,o,a)}}function ej(t){return t=Mi(t),Ms(this[t])?this[t]():this}function tj(t,e){if(typeof t=="object"){t=A_(t);var n=Vz(t),r,i=n.length;for(r=0;r<i;r++)this[n[r].unit](t[n[r].unit])}else if(t=Mi(t),Ms(this[t]))return this[t](e);return this}function nj(t,e){return(t%e+e)%e}var Mn;Array.prototype.indexOf?Mn=Array.prototype.indexOf:Mn=function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1};function L_(t,e){if(isNaN(t)||isNaN(e))return NaN;var n=nj(e,12);return t+=(e-n)/12,n===1?Jp(t)?29:28:31-n%7%2}mt("M",["MM",2],"Mo",function(){return this.month()+1});mt("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)});mt("MMMM",0,0,function(t){return this.localeData().months(this,t)});tt("M",dn,Uc);tt("MM",dn,pi);tt("MMM",function(t,e){return e.monthsShortRegex(t)});tt("MMMM",function(t,e){return e.monthsRegex(t)});Zt(["M","MM"],function(t,e){e[Qs]=It(t)-1});Zt(["MMM","MMMM"],function(t,e,n,r){var i=n._locale.monthsParse(t,r,n._strict);i!=null?e[Qs]=i:kt(n).invalidMonth=t});var rj="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),cC="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),uC=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,ij=Id,sj=Id;function oj(t,e){return t?ts(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||uC).test(e)?"format":"standalone"][t.month()]:ts(this._months)?this._months:this._months.standalone}function aj(t,e){return t?ts(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[uC.test(e)?"format":"standalone"][t.month()]:ts(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function lj(t,e,n){var r,i,s,o=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)s=Ds([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(s,"").toLocaleLowerCase();return n?e==="MMM"?(i=Mn.call(this._shortMonthsParse,o),i!==-1?i:null):(i=Mn.call(this._longMonthsParse,o),i!==-1?i:null):e==="MMM"?(i=Mn.call(this._shortMonthsParse,o),i!==-1?i:(i=Mn.call(this._longMonthsParse,o),i!==-1?i:null)):(i=Mn.call(this._longMonthsParse,o),i!==-1?i:(i=Mn.call(this._shortMonthsParse,o),i!==-1?i:null))}function cj(t,e,n){var r,i,s;if(this._monthsParseExact)return lj.call(this,t,e,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=Ds([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),!n&&!this._monthsParse[r]&&(s="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(s.replace(".",""),"i")),n&&e==="MMMM"&&this._longMonthsParse[r].test(t))return r;if(n&&e==="MMM"&&this._shortMonthsParse[r].test(t))return r;if(!n&&this._monthsParse[r].test(t))return r}}function dC(t,e){if(!t.isValid())return t;if(typeof e=="string"){if(/^\d+$/.test(e))e=It(e);else if(e=t.localeData().monthsParse(e),!lo(e))return t}var n=e,r=t.date();return r=r<29?r:Math.min(r,L_(t.year(),n)),t._isUTC?t._d.setUTCMonth(n,r):t._d.setMonth(n,r),t}function fC(t){return t!=null?(dC(this,t),He.updateOffset(this,!0),this):Qu(this,"Month")}function uj(){return L_(this.year(),this.month())}function dj(t){return this._monthsParseExact?(Ut(this,"_monthsRegex")||hC.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(Ut(this,"_monthsShortRegex")||(this._monthsShortRegex=ij),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)}function fj(t){return this._monthsParseExact?(Ut(this,"_monthsRegex")||hC.call(this),t?this._monthsStrictRegex:this._monthsRegex):(Ut(this,"_monthsRegex")||(this._monthsRegex=sj),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)}function hC(){function t(c,u){return u.length-c.length}var e=[],n=[],r=[],i,s,o,a;for(i=0;i<12;i++)s=Ds([2e3,i]),o=ro(this.monthsShort(s,"")),a=ro(this.months(s,"")),e.push(o),n.push(a),r.push(a),r.push(o);e.sort(t),n.sort(t),r.sort(t),this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+e.join("|")+")","i")}function hj(t,e,n,r,i,s,o){var a;return t<100&&t>=0?(a=new Date(t+400,e,n,r,i,s,o),isFinite(a.getFullYear())&&a.setFullYear(t)):a=new Date(t,e,n,r,i,s,o),a}function ed(t){var e,n;return t<100&&t>=0?(n=Array.prototype.slice.call(arguments),n[0]=t+400,e=new Date(Date.UTC.apply(null,n)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)):e=new Date(Date.UTC.apply(null,arguments)),e}function Rh(t,e,n){var r=7+e-n,i=(7+ed(t,0,r).getUTCDay()-e)%7;return-i+r-1}function pC(t,e,n,r,i){var s=(7+n-r)%7,o=Rh(t,r,i),a=1+7*(e-1)+s+o,c,u;return a<=0?(c=t-1,u=Cu(c)+a):a>Cu(t)?(c=t+1,u=a-Cu(t)):(c=t,u=a),{year:c,dayOfYear:u}}function td(t,e,n){var r=Rh(t.year(),e,n),i=Math.floor((t.dayOfYear()-r-1)/7)+1,s,o;return i<1?(o=t.year()-1,s=i+io(o,e,n)):i>io(t.year(),e,n)?(s=i-io(t.year(),e,n),o=t.year()+1):(o=t.year(),s=i),{week:s,year:o}}function io(t,e,n){var r=Rh(t,e,n),i=Rh(t+1,e,n);return(Cu(t)-r+i)/7}mt("w",["ww",2],"wo","week");mt("W",["WW",2],"Wo","isoWeek");tt("w",dn,Uc);tt("ww",dn,pi);tt("W",dn,Uc);tt("WW",dn,pi);Rd(["w","ww","W","WW"],function(t,e,n,r){e[r.substr(0,1)]=It(t)});function pj(t){return td(t,this._week.dow,this._week.doy).week}var gj={dow:0,doy:6};function mj(){return this._week.dow}function vj(){return this._week.doy}function bj(t){var e=this.localeData().week(this);return t==null?e:this.add((t-e)*7,"d")}function _j(t){var e=td(this,1,4).week;return t==null?e:this.add((t-e)*7,"d")}mt("d",0,"do","day");mt("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)});mt("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)});mt("dddd",0,0,function(t){return this.localeData().weekdays(this,t)});mt("e",0,0,"weekday");mt("E",0,0,"isoWeekday");tt("d",dn);tt("e",dn);tt("E",dn);tt("dd",function(t,e){return e.weekdaysMinRegex(t)});tt("ddd",function(t,e){return e.weekdaysShortRegex(t)});tt("dddd",function(t,e){return e.weekdaysRegex(t)});Rd(["dd","ddd","dddd"],function(t,e,n,r){var i=n._locale.weekdaysParse(t,r,n._strict);i!=null?e.d=i:kt(n).invalidWeekday=t});Rd(["d","e","E"],function(t,e,n,r){e[r]=It(t)});function yj(t,e){return typeof t!="string"?t:isNaN(t)?(t=e.weekdaysParse(t),typeof t=="number"?t:null):parseInt(t,10)}function wj(t,e){return typeof t=="string"?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}function N_(t,e){return t.slice(e,7).concat(t.slice(0,e))}var xj="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),gC="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),kj="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Sj=Id,Ej=Id,Tj=Id;function Cj(t,e){var n=ts(this._weekdays)?this._weekdays:this._weekdays[t&&t!==!0&&this._weekdays.isFormat.test(e)?"format":"standalone"];return t===!0?N_(n,this._week.dow):t?n[t.day()]:n}function Aj(t){return t===!0?N_(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort}function Pj(t){return t===!0?N_(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin}function Oj(t,e,n){var r,i,s,o=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)s=Ds([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(s,"").toLocaleLowerCase();return n?e==="dddd"?(i=Mn.call(this._weekdaysParse,o),i!==-1?i:null):e==="ddd"?(i=Mn.call(this._shortWeekdaysParse,o),i!==-1?i:null):(i=Mn.call(this._minWeekdaysParse,o),i!==-1?i:null):e==="dddd"?(i=Mn.call(this._weekdaysParse,o),i!==-1||(i=Mn.call(this._shortWeekdaysParse,o),i!==-1)?i:(i=Mn.call(this._minWeekdaysParse,o),i!==-1?i:null)):e==="ddd"?(i=Mn.call(this._shortWeekdaysParse,o),i!==-1||(i=Mn.call(this._weekdaysParse,o),i!==-1)?i:(i=Mn.call(this._minWeekdaysParse,o),i!==-1?i:null)):(i=Mn.call(this._minWeekdaysParse,o),i!==-1||(i=Mn.call(this._weekdaysParse,o),i!==-1)?i:(i=Mn.call(this._shortWeekdaysParse,o),i!==-1?i:null))}function $j(t,e,n){var r,i,s;if(this._weekdaysParseExact)return Oj.call(this,t,e,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=Ds([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(s="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(s.replace(".",""),"i")),n&&e==="dddd"&&this._fullWeekdaysParse[r].test(t))return r;if(n&&e==="ddd"&&this._shortWeekdaysParse[r].test(t))return r;if(n&&e==="dd"&&this._minWeekdaysParse[r].test(t))return r;if(!n&&this._weekdaysParse[r].test(t))return r}}function Lj(t){if(!this.isValid())return t!=null?this:NaN;var e=Qu(this,"Day");return t!=null?(t=yj(t,this.localeData()),this.add(t-e,"d")):e}function Nj(t){if(!this.isValid())return t!=null?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return t==null?e:this.add(t-e,"d")}function Ij(t){if(!this.isValid())return t!=null?this:NaN;if(t!=null){var e=wj(t,this.localeData());return this.day(this.day()%7?e:e-7)}else return this.day()||7}function Rj(t){return this._weekdaysParseExact?(Ut(this,"_weekdaysRegex")||I_.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(Ut(this,"_weekdaysRegex")||(this._weekdaysRegex=Sj),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)}function Dj(t){return this._weekdaysParseExact?(Ut(this,"_weekdaysRegex")||I_.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(Ut(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ej),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Mj(t){return this._weekdaysParseExact?(Ut(this,"_weekdaysRegex")||I_.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(Ut(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Tj),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function I_(){function t(d,f){return f.length-d.length}var e=[],n=[],r=[],i=[],s,o,a,c,u;for(s=0;s<7;s++)o=Ds([2e3,1]).day(s),a=ro(this.weekdaysMin(o,"")),c=ro(this.weekdaysShort(o,"")),u=ro(this.weekdays(o,"")),e.push(a),n.push(c),r.push(u),i.push(a),i.push(c),i.push(u);e.sort(t),n.sort(t),r.sort(t),i.sort(t),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+e.join("|")+")","i")}function R_(){return this.hours()%12||12}function Fj(){return this.hours()||24}mt("H",["HH",2],0,"hour");mt("h",["hh",2],0,R_);mt("k",["kk",2],0,Fj);mt("hmm",0,0,function(){return""+R_.apply(this)+Ls(this.minutes(),2)});mt("hmmss",0,0,function(){return""+R_.apply(this)+Ls(this.minutes(),2)+Ls(this.seconds(),2)});mt("Hmm",0,0,function(){return""+this.hours()+Ls(this.minutes(),2)});mt("Hmmss",0,0,function(){return""+this.hours()+Ls(this.minutes(),2)+Ls(this.seconds(),2)});function mC(t,e){mt(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}mC("a",!0);mC("A",!1);function vC(t,e){return e._meridiemParse}tt("a",vC);tt("A",vC);tt("H",dn,$_);tt("h",dn,Uc);tt("k",dn,Uc);tt("HH",dn,pi);tt("hh",dn,pi);tt("kk",dn,pi);tt("hmm",sC);tt("hmmss",oC);tt("Hmm",sC);tt("Hmmss",oC);Zt(["H","HH"],Zn);Zt(["k","kk"],function(t,e,n){var r=It(t);e[Zn]=r===24?0:r});Zt(["a","A"],function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t});Zt(["h","hh"],function(t,e,n){e[Zn]=It(t),kt(n).bigHour=!0});Zt("hmm",function(t,e,n){var r=t.length-2;e[Zn]=It(t.substr(0,r)),e[Yi]=It(t.substr(r)),kt(n).bigHour=!0});Zt("hmmss",function(t,e,n){var r=t.length-4,i=t.length-2;e[Zn]=It(t.substr(0,r)),e[Yi]=It(t.substr(r,2)),e[eo]=It(t.substr(i)),kt(n).bigHour=!0});Zt("Hmm",function(t,e,n){var r=t.length-2;e[Zn]=It(t.substr(0,r)),e[Yi]=It(t.substr(r))});Zt("Hmmss",function(t,e,n){var r=t.length-4,i=t.length-2;e[Zn]=It(t.substr(0,r)),e[Yi]=It(t.substr(r,2)),e[eo]=It(t.substr(i))});function zj(t){return(t+"").toLowerCase().charAt(0)==="p"}var jj=/[ap]\.?m?\.?/i,Uj=Bc("Hours",!0);function Bj(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"}var bC={calendar:Oz,longDateFormat:Iz,invalidDate:Dz,ordinal:Fz,dayOfMonthOrdinalParse:zz,relativeTime:Uz,months:rj,monthsShort:cC,week:gj,weekdays:xj,weekdaysMin:kj,weekdaysShort:gC,meridiemParse:jj},gn={},tu={},nd;function qj(t,e){var n,r=Math.min(t.length,e.length);for(n=0;n<r;n+=1)if(t[n]!==e[n])return n;return r}function I0(t){return t&&t.toLowerCase().replace("_","-")}function Hj(t){for(var e=0,n,r,i,s;e<t.length;){for(s=I0(t[e]).split("-"),n=s.length,r=I0(t[e+1]),r=r?r.split("-"):null;n>0;){if(i=Zp(s.slice(0,n).join("-")),i)return i;if(r&&r.length>=n&&qj(s,r)>=n-1)break;n--}e++}return nd}function Vj(t){return!!(t&&t.match("^[^/\\\\]*$"))}function Zp(t){var e=null,n;if(gn[t]===void 0&&typeof module<"u"&&module&&module.exports&&Vj(t))try{e=nd._abbr,n=require,n("./locale/"+t),Ro(e)}catch{gn[t]=null}return gn[t]}function Ro(t,e){var n;return t&&(Kr(e)?n=go(t):n=D_(t,e),n?nd=n:typeof console<"u"&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),nd._abbr}function D_(t,e){if(e!==null){var n,r=bC;if(e.abbr=t,gn[t]!=null)tC("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=gn[t]._config;else if(e.parentLocale!=null)if(gn[e.parentLocale]!=null)r=gn[e.parentLocale]._config;else if(n=Zp(e.parentLocale),n!=null)r=n._config;else return tu[e.parentLocale]||(tu[e.parentLocale]=[]),tu[e.parentLocale].push({name:t,config:e}),null;return gn[t]=new T_(_v(r,e)),tu[t]&&tu[t].forEach(function(i){D_(i.name,i.config)}),Ro(t),gn[t]}else return delete gn[t],null}function Wj(t,e){if(e!=null){var n,r,i=bC;gn[t]!=null&&gn[t].parentLocale!=null?gn[t].set(_v(gn[t]._config,e)):(r=Zp(t),r!=null&&(i=r._config),e=_v(i,e),r==null&&(e.abbr=t),n=new T_(e),n.parentLocale=gn[t],gn[t]=n),Ro(t)}else gn[t]!=null&&(gn[t].parentLocale!=null?(gn[t]=gn[t].parentLocale,t===Ro()&&Ro(t)):gn[t]!=null&&delete gn[t]);return gn[t]}function go(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return nd;if(!ts(t)){if(e=Zp(t),e)return e;t=[t]}return Hj(t)}function Gj(){return yv(gn)}function M_(t){var e,n=t._a;return n&&kt(t).overflow===-2&&(e=n[Qs]<0||n[Qs]>11?Qs:n[vs]<1||n[vs]>L_(n[Or],n[Qs])?vs:n[Zn]<0||n[Zn]>24||n[Zn]===24&&(n[Yi]!==0||n[eo]!==0||n[ma]!==0)?Zn:n[Yi]<0||n[Yi]>59?Yi:n[eo]<0||n[eo]>59?eo:n[ma]<0||n[ma]>999?ma:-1,kt(t)._overflowDayOfYear&&(e<Or||e>vs)&&(e=vs),kt(t)._overflowWeeks&&e===-1&&(e=Zz),kt(t)._overflowWeekday&&e===-1&&(e=Xz),kt(t).overflow=e),t}var Kj=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Yj=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Jj=/Z|[+-]\d\d(?::?\d\d)?/,bf=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],am=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Zj=/^\/?Date\((-?\d+)/i,Xj=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Qj={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function _C(t){var e,n,r=t._i,i=Kj.exec(r)||Yj.exec(r),s,o,a,c,u=bf.length,d=am.length;if(i){for(kt(t).iso=!0,e=0,n=u;e<n;e++)if(bf[e][1].exec(i[1])){o=bf[e][0],s=bf[e][2]!==!1;break}if(o==null){t._isValid=!1;return}if(i[3]){for(e=0,n=d;e<n;e++)if(am[e][1].exec(i[3])){a=(i[2]||" ")+am[e][0];break}if(a==null){t._isValid=!1;return}}if(!s&&a!=null){t._isValid=!1;return}if(i[4])if(Jj.exec(i[4]))c="Z";else{t._isValid=!1;return}t._f=o+(a||"")+(c||""),z_(t)}else t._isValid=!1}function e4(t,e,n,r,i,s){var o=[t4(t),cC.indexOf(e),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return s&&o.push(parseInt(s,10)),o}function t4(t){var e=parseInt(t,10);return e<=49?2e3+e:e<=999?1900+e:e}function n4(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function r4(t,e,n){if(t){var r=gC.indexOf(t),i=new Date(e[0],e[1],e[2]).getDay();if(r!==i)return kt(n).weekdayMismatch=!0,n._isValid=!1,!1}return!0}function i4(t,e,n){if(t)return Qj[t];if(e)return 0;var r=parseInt(n,10),i=r%100,s=(r-i)/100;return s*60+i}function yC(t){var e=Xj.exec(n4(t._i)),n;if(e){if(n=e4(e[4],e[3],e[2],e[5],e[6],e[7]),!r4(e[1],n,t))return;t._a=n,t._tzm=i4(e[8],e[9],e[10]),t._d=ed.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),kt(t).rfc2822=!0}else t._isValid=!1}function s4(t){var e=Zj.exec(t._i);if(e!==null){t._d=new Date(+e[1]);return}if(_C(t),t._isValid===!1)delete t._isValid;else return;if(yC(t),t._isValid===!1)delete t._isValid;else return;t._strict?t._isValid=!1:He.createFromInputFallback(t)}He.createFromInputFallback=Di("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))});function yl(t,e,n){return t??e??n}function o4(t){var e=new Date(He.now());return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function F_(t){var e,n,r=[],i,s,o;if(!t._d){for(i=o4(t),t._w&&t._a[vs]==null&&t._a[Qs]==null&&a4(t),t._dayOfYear!=null&&(o=yl(t._a[Or],i[Or]),(t._dayOfYear>Cu(o)||t._dayOfYear===0)&&(kt(t)._overflowDayOfYear=!0),n=ed(o,0,t._dayOfYear),t._a[Qs]=n.getUTCMonth(),t._a[vs]=n.getUTCDate()),e=0;e<3&&t._a[e]==null;++e)t._a[e]=r[e]=i[e];for(;e<7;e++)t._a[e]=r[e]=t._a[e]==null?e===2?1:0:t._a[e];t._a[Zn]===24&&t._a[Yi]===0&&t._a[eo]===0&&t._a[ma]===0&&(t._nextDay=!0,t._a[Zn]=0),t._d=(t._useUTC?ed:hj).apply(null,r),s=t._useUTC?t._d.getUTCDay():t._d.getDay(),t._tzm!=null&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[Zn]=24),t._w&&typeof t._w.d<"u"&&t._w.d!==s&&(kt(t).weekdayMismatch=!0)}}function a4(t){var e,n,r,i,s,o,a,c,u;e=t._w,e.GG!=null||e.W!=null||e.E!=null?(s=1,o=4,n=yl(e.GG,t._a[Or],td(un(),1,4).year),r=yl(e.W,1),i=yl(e.E,1),(i<1||i>7)&&(c=!0)):(s=t._locale._week.dow,o=t._locale._week.doy,u=td(un(),s,o),n=yl(e.gg,t._a[Or],u.year),r=yl(e.w,u.week),e.d!=null?(i=e.d,(i<0||i>6)&&(c=!0)):e.e!=null?(i=e.e+s,(e.e<0||e.e>6)&&(c=!0)):i=s),r<1||r>io(n,s,o)?kt(t)._overflowWeeks=!0:c!=null?kt(t)._overflowWeekday=!0:(a=pC(n,r,i,s,o),t._a[Or]=a.year,t._dayOfYear=a.dayOfYear)}He.ISO_8601=function(){};He.RFC_2822=function(){};function z_(t){if(t._f===He.ISO_8601){_C(t);return}if(t._f===He.RFC_2822){yC(t);return}t._a=[],kt(t).empty=!0;var e=""+t._i,n,r,i,s,o,a=e.length,c=0,u,d;for(i=nC(t._f,t._locale).match(C_)||[],d=i.length,n=0;n<d;n++)s=i[n],r=(e.match(Kz(s,t))||[])[0],r&&(o=e.substr(0,e.indexOf(r)),o.length>0&&kt(t).unusedInput.push(o),e=e.slice(e.indexOf(r)+r.length),c+=r.length),Fl[s]?(r?kt(t).empty=!1:kt(t).unusedTokens.push(s),Jz(s,r,t)):t._strict&&!r&&kt(t).unusedTokens.push(s);kt(t).charsLeftOver=a-c,e.length>0&&kt(t).unusedInput.push(e),t._a[Zn]<=12&&kt(t).bigHour===!0&&t._a[Zn]>0&&(kt(t).bigHour=void 0),kt(t).parsedDateParts=t._a.slice(0),kt(t).meridiem=t._meridiem,t._a[Zn]=l4(t._locale,t._a[Zn],t._meridiem),u=kt(t).era,u!==null&&(t._a[Or]=t._locale.erasConvertYear(u,t._a[Or])),F_(t),M_(t)}function l4(t,e,n){var r;return n==null?e:t.meridiemHour!=null?t.meridiemHour(e,n):(t.isPM!=null&&(r=t.isPM(n),r&&e<12&&(e+=12),!r&&e===12&&(e=0)),e)}function c4(t){var e,n,r,i,s,o,a=!1,c=t._f.length;if(c===0){kt(t).invalidFormat=!0,t._d=new Date(NaN);return}for(i=0;i<c;i++)s=0,o=!1,e=E_({},t),t._useUTC!=null&&(e._useUTC=t._useUTC),e._f=t._f[i],z_(e),S_(e)&&(o=!0),s+=kt(e).charsLeftOver,s+=kt(e).unusedTokens.length*10,kt(e).score=s,a?s<r&&(r=s,n=e):(r==null||s<r||o)&&(r=s,n=e,o&&(a=!0));To(t,n||e)}function u4(t){if(!t._d){var e=A_(t._i),n=e.day===void 0?e.date:e.day;t._a=QT([e.year,e.month,n,e.hour,e.minute,e.second,e.millisecond],function(r){return r&&parseInt(r,10)}),F_(t)}}function d4(t){var e=new Nd(M_(wC(t)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}function wC(t){var e=t._i,n=t._f;return t._locale=t._locale||go(t._l),e===null||n===void 0&&e===""?Hp({nullInput:!0}):(typeof e=="string"&&(t._i=e=t._locale.preparse(e)),ns(e)?new Nd(M_(e)):(Ld(e)?t._d=e:ts(n)?c4(t):n?z_(t):f4(t),S_(t)||(t._d=null),t))}function f4(t){var e=t._i;Kr(e)?t._d=new Date(He.now()):Ld(e)?t._d=new Date(e.valueOf()):typeof e=="string"?s4(t):ts(e)?(t._a=QT(e.slice(0),function(n){return parseInt(n,10)}),F_(t)):Ea(e)?u4(t):lo(e)?t._d=new Date(e):He.createFromInputFallback(t)}function xC(t,e,n,r,i){var s={};return(e===!0||e===!1)&&(r=e,e=void 0),(n===!0||n===!1)&&(r=n,n=void 0),(Ea(t)&&k_(t)||ts(t)&&t.length===0)&&(t=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=i,s._l=n,s._i=t,s._f=e,s._strict=r,d4(s)}function un(t,e,n,r){return xC(t,e,n,r,!1)}var h4=Di("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=un.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:Hp()}),p4=Di("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=un.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:Hp()});function kC(t,e){var n,r;if(e.length===1&&ts(e[0])&&(e=e[0]),!e.length)return un();for(n=e[0],r=1;r<e.length;++r)(!e[r].isValid()||e[r][t](n))&&(n=e[r]);return n}function g4(){var t=[].slice.call(arguments,0);return kC("isBefore",t)}function m4(){var t=[].slice.call(arguments,0);return kC("isAfter",t)}var v4=function(){return Date.now?Date.now():+new Date},nu=["year","quarter","month","week","day","hour","minute","second","millisecond"];function b4(t){var e,n=!1,r,i=nu.length;for(e in t)if(Ut(t,e)&&!(Mn.call(nu,e)!==-1&&(t[e]==null||!isNaN(t[e]))))return!1;for(r=0;r<i;++r)if(t[nu[r]]){if(n)return!1;parseFloat(t[nu[r]])!==It(t[nu[r]])&&(n=!0)}return!0}function _4(){return this._isValid}function y4(){return as(NaN)}function Xp(t){var e=A_(t),n=e.year||0,r=e.quarter||0,i=e.month||0,s=e.week||e.isoWeek||0,o=e.day||0,a=e.hour||0,c=e.minute||0,u=e.second||0,d=e.millisecond||0;this._isValid=b4(e),this._milliseconds=+d+u*1e3+c*6e4+a*1e3*60*60,this._days=+o+s*7,this._months=+i+r*3+n*12,this._data={},this._locale=go(),this._bubble()}function Mf(t){return t instanceof Xp}function xv(t){return t<0?Math.round(-1*t)*-1:Math.round(t)}function w4(t,e,n){var r=Math.min(t.length,e.length),i=Math.abs(t.length-e.length),s=0,o;for(o=0;o<r;o++)It(t[o])!==It(e[o])&&s++;return s+i}function SC(t,e){mt(t,0,0,function(){var n=this.utcOffset(),r="+";return n<0&&(n=-n,r="-"),r+Ls(~~(n/60),2)+e+Ls(~~n%60,2)})}SC("Z",":");SC("ZZ","");tt("Z",Yp);tt("ZZ",Yp);Zt(["Z","ZZ"],function(t,e,n){n._useUTC=!0,n._tzm=j_(Yp,t)});var x4=/([\+\-]|\d\d)/gi;function j_(t,e){var n=(e||"").match(t),r,i,s;return n===null?null:(r=n[n.length-1]||[],i=(r+"").match(x4)||["-",0,0],s=+(i[1]*60)+It(i[2]),s===0?0:i[0]==="+"?s:-s)}function U_(t,e){var n,r;return e._isUTC?(n=e.clone(),r=(ns(t)||Ld(t)?t.valueOf():un(t).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),He.updateOffset(n,!1),n):un(t).local()}function kv(t){return-Math.round(t._d.getTimezoneOffset())}He.updateOffset=function(){};function k4(t,e,n){var r=this._offset||0,i;if(!this.isValid())return t!=null?this:NaN;if(t!=null){if(typeof t=="string"){if(t=j_(Yp,t),t===null)return this}else Math.abs(t)<16&&!n&&(t=t*60);return!this._isUTC&&e&&(i=kv(this)),this._offset=t,this._isUTC=!0,i!=null&&this.add(i,"m"),r!==t&&(!e||this._changeInProgress?CC(this,as(t-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,He.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?r:kv(this)}function S4(t,e){return t!=null?(typeof t!="string"&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}function E4(t){return this.utcOffset(0,t)}function T4(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(kv(this),"m")),this}function C4(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var t=j_(Wz,this._i);t!=null?this.utcOffset(t):this.utcOffset(0,!0)}return this}function A4(t){return this.isValid()?(t=t?un(t).utcOffset():0,(this.utcOffset()-t)%60===0):!1}function P4(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function O4(){if(!Kr(this._isDSTShifted))return this._isDSTShifted;var t={},e;return E_(t,this),t=wC(t),t._a?(e=t._isUTC?Ds(t._a):un(t._a),this._isDSTShifted=this.isValid()&&w4(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function $4(){return this.isValid()?!this._isUTC:!1}function L4(){return this.isValid()?this._isUTC:!1}function EC(){return this.isValid()?this._isUTC&&this._offset===0:!1}var N4=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,I4=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function as(t,e){var n=t,r=null,i,s,o;return Mf(t)?n={ms:t._milliseconds,d:t._days,M:t._months}:lo(t)||!isNaN(+t)?(n={},e?n[e]=+t:n.milliseconds=+t):(r=N4.exec(t))?(i=r[1]==="-"?-1:1,n={y:0,d:It(r[vs])*i,h:It(r[Zn])*i,m:It(r[Yi])*i,s:It(r[eo])*i,ms:It(xv(r[ma]*1e3))*i}):(r=I4.exec(t))?(i=r[1]==="-"?-1:1,n={y:na(r[2],i),M:na(r[3],i),w:na(r[4],i),d:na(r[5],i),h:na(r[6],i),m:na(r[7],i),s:na(r[8],i)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(o=R4(un(n.from),un(n.to)),n={},n.ms=o.milliseconds,n.M=o.months),s=new Xp(n),Mf(t)&&Ut(t,"_locale")&&(s._locale=t._locale),Mf(t)&&Ut(t,"_isValid")&&(s._isValid=t._isValid),s}as.fn=Xp.prototype;as.invalid=y4;function na(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function R0(t,e){var n={};return n.months=e.month()-t.month()+(e.year()-t.year())*12,t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function R4(t,e){var n;return t.isValid()&&e.isValid()?(e=U_(e,t),t.isBefore(e)?n=R0(t,e):(n=R0(e,t),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function TC(t,e){return function(n,r){var i,s;return r!==null&&!isNaN(+r)&&(tC(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=n,n=r,r=s),i=as(n,r),CC(this,i,t),this}}function CC(t,e,n,r){var i=e._milliseconds,s=xv(e._days),o=xv(e._months);t.isValid()&&(r=r??!0,o&&dC(t,Qu(t,"Month")+o*n),s&&lC(t,"Date",Qu(t,"Date")+s*n),i&&t._d.setTime(t._d.valueOf()+i*n),r&&He.updateOffset(t,s||o))}var D4=TC(1,"add"),M4=TC(-1,"subtract");function AC(t){return typeof t=="string"||t instanceof String}function F4(t){return ns(t)||Ld(t)||AC(t)||lo(t)||j4(t)||z4(t)||t===null||t===void 0}function z4(t){var e=Ea(t)&&!k_(t),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,s,o=r.length;for(i=0;i<o;i+=1)s=r[i],n=n||Ut(t,s);return e&&n}function j4(t){var e=ts(t),n=!1;return e&&(n=t.filter(function(r){return!lo(r)&&AC(t)}).length===0),e&&n}function U4(t){var e=Ea(t)&&!k_(t),n=!1,r=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],i,s;for(i=0;i<r.length;i+=1)s=r[i],n=n||Ut(t,s);return e&&n}function B4(t,e){var n=t.diff(e,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function q4(t,e){arguments.length===1&&(arguments[0]?F4(arguments[0])?(t=arguments[0],e=void 0):U4(arguments[0])&&(e=arguments[0],t=void 0):(t=void 0,e=void 0));var n=t||un(),r=U_(n,this).startOf("day"),i=He.calendarFormat(this,r)||"sameElse",s=e&&(Ms(e[i])?e[i].call(this,n):e[i]);return this.format(s||this.localeData().calendar(i,this,un(n)))}function H4(){return new Nd(this)}function V4(t,e){var n=ns(t)?t:un(t);return this.isValid()&&n.isValid()?(e=Mi(e)||"millisecond",e==="millisecond"?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(e).valueOf()):!1}function W4(t,e){var n=ns(t)?t:un(t);return this.isValid()&&n.isValid()?(e=Mi(e)||"millisecond",e==="millisecond"?this.valueOf()<n.valueOf():this.clone().endOf(e).valueOf()<n.valueOf()):!1}function G4(t,e,n,r){var i=ns(t)?t:un(t),s=ns(e)?e:un(e);return this.isValid()&&i.isValid()&&s.isValid()?(r=r||"()",(r[0]==="("?this.isAfter(i,n):!this.isBefore(i,n))&&(r[1]===")"?this.isBefore(s,n):!this.isAfter(s,n))):!1}function K4(t,e){var n=ns(t)?t:un(t),r;return this.isValid()&&n.isValid()?(e=Mi(e)||"millisecond",e==="millisecond"?this.valueOf()===n.valueOf():(r=n.valueOf(),this.clone().startOf(e).valueOf()<=r&&r<=this.clone().endOf(e).valueOf())):!1}function Y4(t,e){return this.isSame(t,e)||this.isAfter(t,e)}function J4(t,e){return this.isSame(t,e)||this.isBefore(t,e)}function Z4(t,e,n){var r,i,s;if(!this.isValid())return NaN;if(r=U_(t,this),!r.isValid())return NaN;switch(i=(r.utcOffset()-this.utcOffset())*6e4,e=Mi(e),e){case"year":s=Ff(this,r)/12;break;case"month":s=Ff(this,r);break;case"quarter":s=Ff(this,r)/3;break;case"second":s=(this-r)/1e3;break;case"minute":s=(this-r)/6e4;break;case"hour":s=(this-r)/36e5;break;case"day":s=(this-r-i)/864e5;break;case"week":s=(this-r-i)/6048e5;break;default:s=this-r}return n?s:yi(s)}function Ff(t,e){if(t.date()<e.date())return-Ff(e,t);var n=(e.year()-t.year())*12+(e.month()-t.month()),r=t.clone().add(n,"months"),i,s;return e-r<0?(i=t.clone().add(n-1,"months"),s=(e-r)/(r-i)):(i=t.clone().add(n+1,"months"),s=(e-r)/(i-r)),-(n+s)||0}He.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";He.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function X4(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Q4(t){if(!this.isValid())return null;var e=t!==!0,n=e?this.clone().utc():this;return n.year()<0||n.year()>9999?Df(n,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Ms(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Df(n,"Z")):Df(n,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function eU(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",e="",n,r,i,s;return this.isLocal()||(t=this.utcOffset()===0?"moment.utc":"moment.parseZone",e="Z"),n="["+t+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",s=e+'[")]',this.format(n+r+i+s)}function tU(t){t||(t=this.isUtc()?He.defaultFormatUtc:He.defaultFormat);var e=Df(this,t);return this.localeData().postformat(e)}function nU(t,e){return this.isValid()&&(ns(t)&&t.isValid()||un(t).isValid())?as({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function rU(t){return this.from(un(),t)}function iU(t,e){return this.isValid()&&(ns(t)&&t.isValid()||un(t).isValid())?as({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function sU(t){return this.to(un(),t)}function PC(t){var e;return t===void 0?this._locale._abbr:(e=go(t),e!=null&&(this._locale=e),this)}var OC=Di("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return t===void 0?this.localeData():this.locale(t)});function $C(){return this._locale}var Dh=1e3,zl=60*Dh,Mh=60*zl,LC=(365*400+97)*24*Mh;function jl(t,e){return(t%e+e)%e}function NC(t,e,n){return t<100&&t>=0?new Date(t+400,e,n)-LC:new Date(t,e,n).valueOf()}function IC(t,e,n){return t<100&&t>=0?Date.UTC(t+400,e,n)-LC:Date.UTC(t,e,n)}function oU(t){var e,n;if(t=Mi(t),t===void 0||t==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?IC:NC,t){case"year":e=n(this.year(),0,1);break;case"quarter":e=n(this.year(),this.month()-this.month()%3,1);break;case"month":e=n(this.year(),this.month(),1);break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=n(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf(),e-=jl(e+(this._isUTC?0:this.utcOffset()*zl),Mh);break;case"minute":e=this._d.valueOf(),e-=jl(e,zl);break;case"second":e=this._d.valueOf(),e-=jl(e,Dh);break}return this._d.setTime(e),He.updateOffset(this,!0),this}function aU(t){var e,n;if(t=Mi(t),t===void 0||t==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?IC:NC,t){case"year":e=n(this.year()+1,0,1)-1;break;case"quarter":e=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=n(this.year(),this.month()+1,1)-1;break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=Mh-jl(e+(this._isUTC?0:this.utcOffset()*zl),Mh)-1;break;case"minute":e=this._d.valueOf(),e+=zl-jl(e,zl)-1;break;case"second":e=this._d.valueOf(),e+=Dh-jl(e,Dh)-1;break}return this._d.setTime(e),He.updateOffset(this,!0),this}function lU(){return this._d.valueOf()-(this._offset||0)*6e4}function cU(){return Math.floor(this.valueOf()/1e3)}function uU(){return new Date(this.valueOf())}function dU(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]}function fU(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}}function hU(){return this.isValid()?this.toISOString():null}function pU(){return S_(this)}function gU(){return To({},kt(this))}function mU(){return kt(this).overflow}function vU(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}mt("N",0,0,"eraAbbr");mt("NN",0,0,"eraAbbr");mt("NNN",0,0,"eraAbbr");mt("NNNN",0,0,"eraName");mt("NNNNN",0,0,"eraNarrow");mt("y",["y",1],"yo","eraYear");mt("y",["yy",2],0,"eraYear");mt("y",["yyy",3],0,"eraYear");mt("y",["yyyy",4],0,"eraYear");tt("N",B_);tt("NN",B_);tt("NNN",B_);tt("NNNN",AU);tt("NNNNN",PU);Zt(["N","NN","NNN","NNNN","NNNNN"],function(t,e,n,r){var i=n._locale.erasParse(t,r,n._strict);i?kt(n).era=i:kt(n).invalidEra=t});tt("y",jc);tt("yy",jc);tt("yyy",jc);tt("yyyy",jc);tt("yo",OU);Zt(["y","yy","yyy","yyyy"],Or);Zt(["yo"],function(t,e,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=t.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?e[Or]=n._locale.eraYearOrdinalParse(t,i):e[Or]=parseInt(t,10)});function bU(t,e){var n,r,i,s=this._eras||go("en")._eras;for(n=0,r=s.length;n<r;++n){switch(typeof s[n].since){case"string":i=He(s[n].since).startOf("day"),s[n].since=i.valueOf();break}switch(typeof s[n].until){case"undefined":s[n].until=1/0;break;case"string":i=He(s[n].until).startOf("day").valueOf(),s[n].until=i.valueOf();break}}return s}function _U(t,e,n){var r,i,s=this.eras(),o,a,c;for(t=t.toUpperCase(),r=0,i=s.length;r<i;++r)if(o=s[r].name.toUpperCase(),a=s[r].abbr.toUpperCase(),c=s[r].narrow.toUpperCase(),n)switch(e){case"N":case"NN":case"NNN":if(a===t)return s[r];break;case"NNNN":if(o===t)return s[r];break;case"NNNNN":if(c===t)return s[r];break}else if([o,a,c].indexOf(t)>=0)return s[r]}function yU(t,e){var n=t.since<=t.until?1:-1;return e===void 0?He(t.since).year():He(t.since).year()+(e-t.offset)*n}function wU(){var t,e,n,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t)if(n=this.clone().startOf("day").valueOf(),r[t].since<=n&&n<=r[t].until||r[t].until<=n&&n<=r[t].since)return r[t].name;return""}function xU(){var t,e,n,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t)if(n=this.clone().startOf("day").valueOf(),r[t].since<=n&&n<=r[t].until||r[t].until<=n&&n<=r[t].since)return r[t].narrow;return""}function kU(){var t,e,n,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t)if(n=this.clone().startOf("day").valueOf(),r[t].since<=n&&n<=r[t].until||r[t].until<=n&&n<=r[t].since)return r[t].abbr;return""}function SU(){var t,e,n,r,i=this.localeData().eras();for(t=0,e=i.length;t<e;++t)if(n=i[t].since<=i[t].until?1:-1,r=this.clone().startOf("day").valueOf(),i[t].since<=r&&r<=i[t].until||i[t].until<=r&&r<=i[t].since)return(this.year()-He(i[t].since).year())*n+i[t].offset;return this.year()}function EU(t){return Ut(this,"_erasNameRegex")||q_.call(this),t?this._erasNameRegex:this._erasRegex}function TU(t){return Ut(this,"_erasAbbrRegex")||q_.call(this),t?this._erasAbbrRegex:this._erasRegex}function CU(t){return Ut(this,"_erasNarrowRegex")||q_.call(this),t?this._erasNarrowRegex:this._erasRegex}function B_(t,e){return e.erasAbbrRegex(t)}function AU(t,e){return e.erasNameRegex(t)}function PU(t,e){return e.erasNarrowRegex(t)}function OU(t,e){return e._eraYearOrdinalRegex||jc}function q_(){var t=[],e=[],n=[],r=[],i,s,o,a,c,u=this.eras();for(i=0,s=u.length;i<s;++i)o=ro(u[i].name),a=ro(u[i].abbr),c=ro(u[i].narrow),e.push(o),t.push(a),n.push(c),r.push(o),r.push(a),r.push(c);this._erasRegex=new RegExp("^("+r.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+e.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+t.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+n.join("|")+")","i")}mt(0,["gg",2],0,function(){return this.weekYear()%100});mt(0,["GG",2],0,function(){return this.isoWeekYear()%100});function Qp(t,e){mt(0,[t,t.length],0,e)}Qp("gggg","weekYear");Qp("ggggg","weekYear");Qp("GGGG","isoWeekYear");Qp("GGGGG","isoWeekYear");tt("G",Kp);tt("g",Kp);tt("GG",dn,pi);tt("gg",dn,pi);tt("GGGG",O_,P_);tt("gggg",O_,P_);tt("GGGGG",Gp,Vp);tt("ggggg",Gp,Vp);Rd(["gggg","ggggg","GGGG","GGGGG"],function(t,e,n,r){e[r.substr(0,2)]=It(t)});Rd(["gg","GG"],function(t,e,n,r){e[r]=He.parseTwoDigitYear(t)});function $U(t){return RC.call(this,t,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function LU(t){return RC.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)}function NU(){return io(this.year(),1,4)}function IU(){return io(this.isoWeekYear(),1,4)}function RU(){var t=this.localeData()._week;return io(this.year(),t.dow,t.doy)}function DU(){var t=this.localeData()._week;return io(this.weekYear(),t.dow,t.doy)}function RC(t,e,n,r,i){var s;return t==null?td(this,r,i).year:(s=io(t,r,i),e>s&&(e=s),MU.call(this,t,e,n,r,i))}function MU(t,e,n,r,i){var s=pC(t,e,n,r,i),o=ed(s.year,0,s.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}mt("Q",0,"Qo","quarter");tt("Q",rC);Zt("Q",function(t,e){e[Qs]=(It(t)-1)*3});function FU(t){return t==null?Math.ceil((this.month()+1)/3):this.month((t-1)*3+this.month()%3)}mt("D",["DD",2],"Do","date");tt("D",dn,Uc);tt("DD",dn,pi);tt("Do",function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient});Zt(["D","DD"],vs);Zt("Do",function(t,e){e[vs]=It(t.match(dn)[0])});var DC=Bc("Date",!0);mt("DDD",["DDDD",3],"DDDo","dayOfYear");tt("DDD",Wp);tt("DDDD",iC);Zt(["DDD","DDDD"],function(t,e,n){n._dayOfYear=It(t)});function zU(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return t==null?e:this.add(t-e,"d")}mt("m",["mm",2],0,"minute");tt("m",dn,$_);tt("mm",dn,pi);Zt(["m","mm"],Yi);var jU=Bc("Minutes",!1);mt("s",["ss",2],0,"second");tt("s",dn,$_);tt("ss",dn,pi);Zt(["s","ss"],eo);var UU=Bc("Seconds",!1);mt("S",0,0,function(){return~~(this.millisecond()/100)});mt(0,["SS",2],0,function(){return~~(this.millisecond()/10)});mt(0,["SSS",3],0,"millisecond");mt(0,["SSSS",4],0,function(){return this.millisecond()*10});mt(0,["SSSSS",5],0,function(){return this.millisecond()*100});mt(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});mt(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});mt(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});mt(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});tt("S",Wp,rC);tt("SS",Wp,pi);tt("SSS",Wp,iC);var Co,MC;for(Co="SSSS";Co.length<=9;Co+="S")tt(Co,jc);function BU(t,e){e[ma]=It(("0."+t)*1e3)}for(Co="S";Co.length<=9;Co+="S")Zt(Co,BU);MC=Bc("Milliseconds",!1);mt("z",0,0,"zoneAbbr");mt("zz",0,0,"zoneName");function qU(){return this._isUTC?"UTC":""}function HU(){return this._isUTC?"Coordinated Universal Time":""}var Ie=Nd.prototype;Ie.add=D4;Ie.calendar=q4;Ie.clone=H4;Ie.diff=Z4;Ie.endOf=aU;Ie.format=tU;Ie.from=nU;Ie.fromNow=rU;Ie.to=iU;Ie.toNow=sU;Ie.get=ej;Ie.invalidAt=mU;Ie.isAfter=V4;Ie.isBefore=W4;Ie.isBetween=G4;Ie.isSame=K4;Ie.isSameOrAfter=Y4;Ie.isSameOrBefore=J4;Ie.isValid=pU;Ie.lang=OC;Ie.locale=PC;Ie.localeData=$C;Ie.max=p4;Ie.min=h4;Ie.parsingFlags=gU;Ie.set=tj;Ie.startOf=oU;Ie.subtract=M4;Ie.toArray=dU;Ie.toObject=fU;Ie.toDate=uU;Ie.toISOString=Q4;Ie.inspect=eU;typeof Symbol<"u"&&Symbol.for!=null&&(Ie[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});Ie.toJSON=hU;Ie.toString=X4;Ie.unix=cU;Ie.valueOf=lU;Ie.creationData=vU;Ie.eraName=wU;Ie.eraNarrow=xU;Ie.eraAbbr=kU;Ie.eraYear=SU;Ie.year=aC;Ie.isLeapYear=Qz;Ie.weekYear=$U;Ie.isoWeekYear=LU;Ie.quarter=Ie.quarters=FU;Ie.month=fC;Ie.daysInMonth=uj;Ie.week=Ie.weeks=bj;Ie.isoWeek=Ie.isoWeeks=_j;Ie.weeksInYear=RU;Ie.weeksInWeekYear=DU;Ie.isoWeeksInYear=NU;Ie.isoWeeksInISOWeekYear=IU;Ie.date=DC;Ie.day=Ie.days=Lj;Ie.weekday=Nj;Ie.isoWeekday=Ij;Ie.dayOfYear=zU;Ie.hour=Ie.hours=Uj;Ie.minute=Ie.minutes=jU;Ie.second=Ie.seconds=UU;Ie.millisecond=Ie.milliseconds=MC;Ie.utcOffset=k4;Ie.utc=E4;Ie.local=T4;Ie.parseZone=C4;Ie.hasAlignedHourOffset=A4;Ie.isDST=P4;Ie.isLocal=$4;Ie.isUtcOffset=L4;Ie.isUtc=EC;Ie.isUTC=EC;Ie.zoneAbbr=qU;Ie.zoneName=HU;Ie.dates=Di("dates accessor is deprecated. Use date instead.",DC);Ie.months=Di("months accessor is deprecated. Use month instead",fC);Ie.years=Di("years accessor is deprecated. Use year instead",aC);Ie.zone=Di("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",S4);Ie.isDSTShifted=Di("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",O4);function VU(t){return un(t*1e3)}function WU(){return un.apply(null,arguments).parseZone()}function FC(t){return t}var Bt=T_.prototype;Bt.calendar=$z;Bt.longDateFormat=Rz;Bt.invalidDate=Mz;Bt.ordinal=jz;Bt.preparse=FC;Bt.postformat=FC;Bt.relativeTime=Bz;Bt.pastFuture=qz;Bt.set=Pz;Bt.eras=bU;Bt.erasParse=_U;Bt.erasConvertYear=yU;Bt.erasAbbrRegex=TU;Bt.erasNameRegex=EU;Bt.erasNarrowRegex=CU;Bt.months=oj;Bt.monthsShort=aj;Bt.monthsParse=cj;Bt.monthsRegex=fj;Bt.monthsShortRegex=dj;Bt.week=pj;Bt.firstDayOfYear=vj;Bt.firstDayOfWeek=mj;Bt.weekdays=Cj;Bt.weekdaysMin=Pj;Bt.weekdaysShort=Aj;Bt.weekdaysParse=$j;Bt.weekdaysRegex=Rj;Bt.weekdaysShortRegex=Dj;Bt.weekdaysMinRegex=Mj;Bt.isPM=zj;Bt.meridiem=Bj;function Fh(t,e,n,r){var i=go(),s=Ds().set(r,e);return i[n](s,t)}function zC(t,e,n){if(lo(t)&&(e=t,t=void 0),t=t||"",e!=null)return Fh(t,e,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=Fh(t,r,n,"month");return i}function H_(t,e,n,r){typeof t=="boolean"?(lo(e)&&(n=e,e=void 0),e=e||""):(e=t,n=e,t=!1,lo(e)&&(n=e,e=void 0),e=e||"");var i=go(),s=t?i._week.dow:0,o,a=[];if(n!=null)return Fh(e,(n+s)%7,r,"day");for(o=0;o<7;o++)a[o]=Fh(e,(o+s)%7,r,"day");return a}function GU(t,e){return zC(t,e,"months")}function KU(t,e){return zC(t,e,"monthsShort")}function YU(t,e,n){return H_(t,e,n,"weekdays")}function JU(t,e,n){return H_(t,e,n,"weekdaysShort")}function ZU(t,e,n){return H_(t,e,n,"weekdaysMin")}Ro("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,n=It(t%100/10)===1?"th":e===1?"st":e===2?"nd":e===3?"rd":"th";return t+n}});He.lang=Di("moment.lang is deprecated. Use moment.locale instead.",Ro);He.langData=Di("moment.langData is deprecated. Use moment.localeData instead.",go);var Vs=Math.abs;function XU(){var t=this._data;return this._milliseconds=Vs(this._milliseconds),this._days=Vs(this._days),this._months=Vs(this._months),t.milliseconds=Vs(t.milliseconds),t.seconds=Vs(t.seconds),t.minutes=Vs(t.minutes),t.hours=Vs(t.hours),t.months=Vs(t.months),t.years=Vs(t.years),this}function jC(t,e,n,r){var i=as(e,n);return t._milliseconds+=r*i._milliseconds,t._days+=r*i._days,t._months+=r*i._months,t._bubble()}function QU(t,e){return jC(this,t,e,1)}function eB(t,e){return jC(this,t,e,-1)}function D0(t){return t<0?Math.floor(t):Math.ceil(t)}function tB(){var t=this._milliseconds,e=this._days,n=this._months,r=this._data,i,s,o,a,c;return t>=0&&e>=0&&n>=0||t<=0&&e<=0&&n<=0||(t+=D0(Sv(n)+e)*864e5,e=0,n=0),r.milliseconds=t%1e3,i=yi(t/1e3),r.seconds=i%60,s=yi(i/60),r.minutes=s%60,o=yi(s/60),r.hours=o%24,e+=yi(o/24),c=yi(UC(e)),n+=c,e-=D0(Sv(c)),a=yi(n/12),n%=12,r.days=e,r.months=n,r.years=a,this}function UC(t){return t*4800/146097}function Sv(t){return t*146097/4800}function nB(t){if(!this.isValid())return NaN;var e,n,r=this._milliseconds;if(t=Mi(t),t==="month"||t==="quarter"||t==="year")switch(e=this._days+r/864e5,n=this._months+UC(e),t){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(e=this._days+Math.round(Sv(this._months)),t){case"week":return e/7+r/6048e5;case"day":return e+r/864e5;case"hour":return e*24+r/36e5;case"minute":return e*1440+r/6e4;case"second":return e*86400+r/1e3;case"millisecond":return Math.floor(e*864e5)+r;default:throw new Error("Unknown unit "+t)}}function mo(t){return function(){return this.as(t)}}var BC=mo("ms"),rB=mo("s"),iB=mo("m"),sB=mo("h"),oB=mo("d"),aB=mo("w"),lB=mo("M"),cB=mo("Q"),uB=mo("y"),dB=BC;function fB(){return as(this)}function hB(t){return t=Mi(t),this.isValid()?this[t+"s"]():NaN}function Xa(t){return function(){return this.isValid()?this._data[t]:NaN}}var pB=Xa("milliseconds"),gB=Xa("seconds"),mB=Xa("minutes"),vB=Xa("hours"),bB=Xa("days"),_B=Xa("months"),yB=Xa("years");function wB(){return yi(this.days()/7)}var Ws=Math.round,Cl={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function xB(t,e,n,r,i){return i.relativeTime(e||1,!!n,t,r)}function kB(t,e,n,r){var i=as(t).abs(),s=Ws(i.as("s")),o=Ws(i.as("m")),a=Ws(i.as("h")),c=Ws(i.as("d")),u=Ws(i.as("M")),d=Ws(i.as("w")),f=Ws(i.as("y")),h=s<=n.ss&&["s",s]||s<n.s&&["ss",s]||o<=1&&["m"]||o<n.m&&["mm",o]||a<=1&&["h"]||a<n.h&&["hh",a]||c<=1&&["d"]||c<n.d&&["dd",c];return n.w!=null&&(h=h||d<=1&&["w"]||d<n.w&&["ww",d]),h=h||u<=1&&["M"]||u<n.M&&["MM",u]||f<=1&&["y"]||["yy",f],h[2]=e,h[3]=+t>0,h[4]=r,xB.apply(null,h)}function SB(t){return t===void 0?Ws:typeof t=="function"?(Ws=t,!0):!1}function EB(t,e){return Cl[t]===void 0?!1:e===void 0?Cl[t]:(Cl[t]=e,t==="s"&&(Cl.ss=e-1),!0)}function TB(t,e){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=Cl,i,s;return typeof t=="object"&&(e=t,t=!1),typeof t=="boolean"&&(n=t),typeof e=="object"&&(r=Object.assign({},Cl,e),e.s!=null&&e.ss==null&&(r.ss=e.s-1)),i=this.localeData(),s=kB(this,!n,r,i),n&&(s=i.pastFuture(+this,s)),i.postformat(s)}var lm=Math.abs;function ml(t){return(t>0)-(t<0)||+t}function eg(){if(!this.isValid())return this.localeData().invalidDate();var t=lm(this._milliseconds)/1e3,e=lm(this._days),n=lm(this._months),r,i,s,o,a=this.asSeconds(),c,u,d,f;return a?(r=yi(t/60),i=yi(r/60),t%=60,r%=60,s=yi(n/12),n%=12,o=t?t.toFixed(3).replace(/\.?0+$/,""):"",c=a<0?"-":"",u=ml(this._months)!==ml(a)?"-":"",d=ml(this._days)!==ml(a)?"-":"",f=ml(this._milliseconds)!==ml(a)?"-":"",c+"P"+(s?u+s+"Y":"")+(n?u+n+"M":"")+(e?d+e+"D":"")+(i||r||t?"T":"")+(i?f+i+"H":"")+(r?f+r+"M":"")+(t?f+o+"S":"")):"P0D"}var Mt=Xp.prototype;Mt.isValid=_4;Mt.abs=XU;Mt.add=QU;Mt.subtract=eB;Mt.as=nB;Mt.asMilliseconds=BC;Mt.asSeconds=rB;Mt.asMinutes=iB;Mt.asHours=sB;Mt.asDays=oB;Mt.asWeeks=aB;Mt.asMonths=lB;Mt.asQuarters=cB;Mt.asYears=uB;Mt.valueOf=dB;Mt._bubble=tB;Mt.clone=fB;Mt.get=hB;Mt.milliseconds=pB;Mt.seconds=gB;Mt.minutes=mB;Mt.hours=vB;Mt.days=bB;Mt.weeks=wB;Mt.months=_B;Mt.years=yB;Mt.humanize=TB;Mt.toISOString=eg;Mt.toString=eg;Mt.toJSON=eg;Mt.locale=PC;Mt.localeData=$C;Mt.toIsoString=Di("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",eg);Mt.lang=OC;mt("X",0,0,"unix");mt("x",0,0,"valueOf");tt("x",Kp);tt("X",Gz);Zt("X",function(t,e,n){n._d=new Date(parseFloat(t)*1e3)});Zt("x",function(t,e,n){n._d=new Date(It(t))});He.version="2.30.1";Cz(un);He.fn=Ie;He.min=g4;He.max=m4;He.now=v4;He.utc=Ds;He.unix=VU;He.months=GU;He.isDate=Ld;He.locale=Ro;He.invalid=Hp;He.duration=as;He.isMoment=ns;He.weekdays=YU;He.parseZone=WU;He.localeData=go;He.isDuration=Mf;He.monthsShort=KU;He.weekdaysMin=ZU;He.defineLocale=D_;He.updateLocale=Wj;He.locales=Gj;He.weekdaysShort=JU;He.normalizeUnits=Mi;He.relativeTimeRounding=SB;He.relativeTimeThreshold=EB;He.calendarFormat=B4;He.prototype=Ie;He.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};function CB(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const AB=[["ß","ss"],["ẞ","Ss"],["ä","ae"],["Ä","Ae"],["ö","oe"],["Ö","Oe"],["ü","ue"],["Ü","Ue"],["À","A"],["Á","A"],["Â","A"],["Ã","A"],["Ä","Ae"],["Å","A"],["Æ","AE"],["Ç","C"],["È","E"],["É","E"],["Ê","E"],["Ë","E"],["Ì","I"],["Í","I"],["Î","I"],["Ï","I"],["Ð","D"],["Ñ","N"],["Ò","O"],["Ó","O"],["Ô","O"],["Õ","O"],["Ö","Oe"],["Ő","O"],["Ø","O"],["Ù","U"],["Ú","U"],["Û","U"],["Ü","Ue"],["Ű","U"],["Ý","Y"],["Þ","TH"],["ß","ss"],["à","a"],["á","a"],["â","a"],["ã","a"],["ä","ae"],["å","a"],["æ","ae"],["ç","c"],["è","e"],["é","e"],["ê","e"],["ë","e"],["ì","i"],["í","i"],["î","i"],["ï","i"],["ð","d"],["ñ","n"],["ò","o"],["ó","o"],["ô","o"],["õ","o"],["ö","oe"],["ő","o"],["ø","o"],["ù","u"],["ú","u"],["û","u"],["ü","ue"],["ű","u"],["ý","y"],["þ","th"],["ÿ","y"],["ẞ","SS"],["à","a"],["À","A"],["á","a"],["Á","A"],["â","a"],["Â","A"],["ã","a"],["Ã","A"],["è","e"],["È","E"],["é","e"],["É","E"],["ê","e"],["Ê","E"],["ì","i"],["Ì","I"],["í","i"],["Í","I"],["ò","o"],["Ò","O"],["ó","o"],["Ó","O"],["ô","o"],["Ô","O"],["õ","o"],["Õ","O"],["ù","u"],["Ù","U"],["ú","u"],["Ú","U"],["ý","y"],["Ý","Y"],["ă","a"],["Ă","A"],["Đ","D"],["đ","d"],["ĩ","i"],["Ĩ","I"],["ũ","u"],["Ũ","U"],["ơ","o"],["Ơ","O"],["ư","u"],["Ư","U"],["ạ","a"],["Ạ","A"],["ả","a"],["Ả","A"],["ấ","a"],["Ấ","A"],["ầ","a"],["Ầ","A"],["ẩ","a"],["Ẩ","A"],["ẫ","a"],["Ẫ","A"],["ậ","a"],["Ậ","A"],["ắ","a"],["Ắ","A"],["ằ","a"],["Ằ","A"],["ẳ","a"],["Ẳ","A"],["ẵ","a"],["Ẵ","A"],["ặ","a"],["Ặ","A"],["ẹ","e"],["Ẹ","E"],["ẻ","e"],["Ẻ","E"],["ẽ","e"],["Ẽ","E"],["ế","e"],["Ế","E"],["ề","e"],["Ề","E"],["ể","e"],["Ể","E"],["ễ","e"],["Ễ","E"],["ệ","e"],["Ệ","E"],["ỉ","i"],["Ỉ","I"],["ị","i"],["Ị","I"],["ọ","o"],["Ọ","O"],["ỏ","o"],["Ỏ","O"],["ố","o"],["Ố","O"],["ồ","o"],["Ồ","O"],["ổ","o"],["Ổ","O"],["ỗ","o"],["Ỗ","O"],["ộ","o"],["Ộ","O"],["ớ","o"],["Ớ","O"],["ờ","o"],["Ờ","O"],["ở","o"],["Ở","O"],["ỡ","o"],["Ỡ","O"],["ợ","o"],["Ợ","O"],["ụ","u"],["Ụ","U"],["ủ","u"],["Ủ","U"],["ứ","u"],["Ứ","U"],["ừ","u"],["Ừ","U"],["ử","u"],["Ử","U"],["ữ","u"],["Ữ","U"],["ự","u"],["Ự","U"],["ỳ","y"],["Ỳ","Y"],["ỵ","y"],["Ỵ","Y"],["ỷ","y"],["Ỷ","Y"],["ỹ","y"],["Ỹ","Y"],["ء","e"],["آ","a"],["أ","a"],["ؤ","w"],["إ","i"],["ئ","y"],["ا","a"],["ب","b"],["ة","t"],["ت","t"],["ث","th"],["ج","j"],["ح","h"],["خ","kh"],["د","d"],["ذ","dh"],["ر","r"],["ز","z"],["س","s"],["ش","sh"],["ص","s"],["ض","d"],["ط","t"],["ظ","z"],["ع","e"],["غ","gh"],["ـ","_"],["ف","f"],["ق","q"],["ك","k"],["ل","l"],["م","m"],["ن","n"],["ه","h"],["و","w"],["ى","a"],["ي","y"],["َ‎","a"],["ُ","u"],["ِ‎","i"],["٠","0"],["١","1"],["٢","2"],["٣","3"],["٤","4"],["٥","5"],["٦","6"],["٧","7"],["٨","8"],["٩","9"],["چ","ch"],["ک","k"],["گ","g"],["پ","p"],["ژ","zh"],["ی","y"],["۰","0"],["۱","1"],["۲","2"],["۳","3"],["۴","4"],["۵","5"],["۶","6"],["۷","7"],["۸","8"],["۹","9"],["ټ","p"],["ځ","z"],["څ","c"],["ډ","d"],["ﺫ","d"],["ﺭ","r"],["ړ","r"],["ﺯ","z"],["ږ","g"],["ښ","x"],["ګ","g"],["ڼ","n"],["ۀ","e"],["ې","e"],["ۍ","ai"],["ٹ","t"],["ڈ","d"],["ڑ","r"],["ں","n"],["ہ","h"],["ھ","h"],["ے","e"],["А","A"],["а","a"],["Б","B"],["б","b"],["В","V"],["в","v"],["Г","G"],["г","g"],["Д","D"],["д","d"],["ъе","ye"],["Ъе","Ye"],["ъЕ","yE"],["ЪЕ","YE"],["Е","E"],["е","e"],["Ё","Yo"],["ё","yo"],["Ж","Zh"],["ж","zh"],["З","Z"],["з","z"],["И","I"],["и","i"],["ый","iy"],["Ый","Iy"],["ЫЙ","IY"],["ыЙ","iY"],["Й","Y"],["й","y"],["К","K"],["к","k"],["Л","L"],["л","l"],["М","M"],["м","m"],["Н","N"],["н","n"],["О","O"],["о","o"],["П","P"],["п","p"],["Р","R"],["р","r"],["С","S"],["с","s"],["Т","T"],["т","t"],["У","U"],["у","u"],["Ф","F"],["ф","f"],["Х","Kh"],["х","kh"],["Ц","Ts"],["ц","ts"],["Ч","Ch"],["ч","ch"],["Ш","Sh"],["ш","sh"],["Щ","Sch"],["щ","sch"],["Ъ",""],["ъ",""],["Ы","Y"],["ы","y"],["Ь",""],["ь",""],["Э","E"],["э","e"],["Ю","Yu"],["ю","yu"],["Я","Ya"],["я","ya"],["ă","a"],["Ă","A"],["ș","s"],["Ș","S"],["ț","t"],["Ț","T"],["ţ","t"],["Ţ","T"],["ş","s"],["Ş","S"],["ç","c"],["Ç","C"],["ğ","g"],["Ğ","G"],["ı","i"],["İ","I"],["ա","a"],["Ա","A"],["բ","b"],["Բ","B"],["գ","g"],["Գ","G"],["դ","d"],["Դ","D"],["ե","ye"],["Ե","Ye"],["զ","z"],["Զ","Z"],["է","e"],["Է","E"],["ը","y"],["Ը","Y"],["թ","t"],["Թ","T"],["ժ","zh"],["Ժ","Zh"],["ի","i"],["Ի","I"],["լ","l"],["Լ","L"],["խ","kh"],["Խ","Kh"],["ծ","ts"],["Ծ","Ts"],["կ","k"],["Կ","K"],["հ","h"],["Հ","H"],["ձ","dz"],["Ձ","Dz"],["ղ","gh"],["Ղ","Gh"],["ճ","tch"],["Ճ","Tch"],["մ","m"],["Մ","M"],["յ","y"],["Յ","Y"],["ն","n"],["Ն","N"],["շ","sh"],["Շ","Sh"],["ո","vo"],["Ո","Vo"],["չ","ch"],["Չ","Ch"],["պ","p"],["Պ","P"],["ջ","j"],["Ջ","J"],["ռ","r"],["Ռ","R"],["ս","s"],["Ս","S"],["վ","v"],["Վ","V"],["տ","t"],["Տ","T"],["ր","r"],["Ր","R"],["ց","c"],["Ց","C"],["ու","u"],["ՈՒ","U"],["Ու","U"],["փ","p"],["Փ","P"],["ք","q"],["Ք","Q"],["օ","o"],["Օ","O"],["ֆ","f"],["Ֆ","F"],["և","yev"],["ა","a"],["ბ","b"],["გ","g"],["დ","d"],["ე","e"],["ვ","v"],["ზ","z"],["თ","t"],["ი","i"],["კ","k"],["ლ","l"],["მ","m"],["ნ","n"],["ო","o"],["პ","p"],["ჟ","zh"],["რ","r"],["ს","s"],["ტ","t"],["უ","u"],["ფ","ph"],["ქ","q"],["ღ","gh"],["ყ","k"],["შ","sh"],["ჩ","ch"],["ც","ts"],["ძ","dz"],["წ","ts"],["ჭ","tch"],["ხ","kh"],["ჯ","j"],["ჰ","h"],["č","c"],["ď","d"],["ě","e"],["ň","n"],["ř","r"],["š","s"],["ť","t"],["ů","u"],["ž","z"],["Č","C"],["Ď","D"],["Ě","E"],["Ň","N"],["Ř","R"],["Š","S"],["Ť","T"],["Ů","U"],["Ž","Z"],["ހ","h"],["ށ","sh"],["ނ","n"],["ރ","r"],["ބ","b"],["ޅ","lh"],["ކ","k"],["އ","a"],["ވ","v"],["މ","m"],["ފ","f"],["ދ","dh"],["ތ","th"],["ލ","l"],["ގ","g"],["ޏ","gn"],["ސ","s"],["ޑ","d"],["ޒ","z"],["ޓ","t"],["ޔ","y"],["ޕ","p"],["ޖ","j"],["ޗ","ch"],["ޘ","tt"],["ޙ","hh"],["ޚ","kh"],["ޛ","th"],["ޜ","z"],["ޝ","sh"],["ޞ","s"],["ޟ","d"],["ޠ","t"],["ޡ","z"],["ޢ","a"],["ޣ","gh"],["ޤ","q"],["ޥ","w"],["ަ","a"],["ާ","aa"],["ި","i"],["ީ","ee"],["ު","u"],["ޫ","oo"],["ެ","e"],["ޭ","ey"],["ޮ","o"],["ޯ","oa"],["ް",""],["α","a"],["β","v"],["γ","g"],["δ","d"],["ε","e"],["ζ","z"],["η","i"],["θ","th"],["ι","i"],["κ","k"],["λ","l"],["μ","m"],["ν","n"],["ξ","ks"],["ο","o"],["π","p"],["ρ","r"],["σ","s"],["τ","t"],["υ","y"],["φ","f"],["χ","x"],["ψ","ps"],["ω","o"],["ά","a"],["έ","e"],["ί","i"],["ό","o"],["ύ","y"],["ή","i"],["ώ","o"],["ς","s"],["ϊ","i"],["ΰ","y"],["ϋ","y"],["ΐ","i"],["Α","A"],["Β","B"],["Γ","G"],["Δ","D"],["Ε","E"],["Ζ","Z"],["Η","I"],["Θ","TH"],["Ι","I"],["Κ","K"],["Λ","L"],["Μ","M"],["Ν","N"],["Ξ","KS"],["Ο","O"],["Π","P"],["Ρ","R"],["Σ","S"],["Τ","T"],["Υ","Y"],["Φ","F"],["Χ","X"],["Ψ","PS"],["Ω","O"],["Ά","A"],["Έ","E"],["Ί","I"],["Ό","O"],["Ύ","Y"],["Ή","I"],["Ώ","O"],["Ϊ","I"],["Ϋ","Y"],["ā","a"],["ē","e"],["ģ","g"],["ī","i"],["ķ","k"],["ļ","l"],["ņ","n"],["ū","u"],["Ā","A"],["Ē","E"],["Ģ","G"],["Ī","I"],["Ķ","K"],["Ļ","L"],["Ņ","N"],["Ū","U"],["č","c"],["š","s"],["ž","z"],["Č","C"],["Š","S"],["Ž","Z"],["ą","a"],["č","c"],["ę","e"],["ė","e"],["į","i"],["š","s"],["ų","u"],["ū","u"],["ž","z"],["Ą","A"],["Č","C"],["Ę","E"],["Ė","E"],["Į","I"],["Š","S"],["Ų","U"],["Ū","U"],["Ќ","Kj"],["ќ","kj"],["Љ","Lj"],["љ","lj"],["Њ","Nj"],["њ","nj"],["Тс","Ts"],["тс","ts"],["ą","a"],["ć","c"],["ę","e"],["ł","l"],["ń","n"],["ś","s"],["ź","z"],["ż","z"],["Ą","A"],["Ć","C"],["Ę","E"],["Ł","L"],["Ń","N"],["Ś","S"],["Ź","Z"],["Ż","Z"],["Є","Ye"],["І","I"],["Ї","Yi"],["Ґ","G"],["є","ye"],["і","i"],["ї","yi"],["ґ","g"],["IJ","IJ"],["ij","ij"],["¢","c"],["¥","Y"],["߿","b"],["৳","t"],["૱","Bo"],["฿","B"],["₠","CE"],["₡","C"],["₢","Cr"],["₣","F"],["₥","m"],["₦","N"],["₧","Pt"],["₨","Rs"],["₩","W"],["₫","s"],["€","E"],["₭","K"],["₮","T"],["₯","Dp"],["₰","S"],["₱","P"],["₲","G"],["₳","A"],["₴","S"],["₵","C"],["₶","tt"],["₷","S"],["₸","T"],["₹","R"],["₺","L"],["₽","P"],["₿","B"],["﹩","$"],["¢","c"],["¥","Y"],["₩","W"],["𝐀","A"],["𝐁","B"],["𝐂","C"],["𝐃","D"],["𝐄","E"],["𝐅","F"],["𝐆","G"],["𝐇","H"],["𝐈","I"],["𝐉","J"],["𝐊","K"],["𝐋","L"],["𝐌","M"],["𝐍","N"],["𝐎","O"],["𝐏","P"],["𝐐","Q"],["𝐑","R"],["𝐒","S"],["𝐓","T"],["𝐔","U"],["𝐕","V"],["𝐖","W"],["𝐗","X"],["𝐘","Y"],["𝐙","Z"],["𝐚","a"],["𝐛","b"],["𝐜","c"],["𝐝","d"],["𝐞","e"],["𝐟","f"],["𝐠","g"],["𝐡","h"],["𝐢","i"],["𝐣","j"],["𝐤","k"],["𝐥","l"],["𝐦","m"],["𝐧","n"],["𝐨","o"],["𝐩","p"],["𝐪","q"],["𝐫","r"],["𝐬","s"],["𝐭","t"],["𝐮","u"],["𝐯","v"],["𝐰","w"],["𝐱","x"],["𝐲","y"],["𝐳","z"],["𝐴","A"],["𝐵","B"],["𝐶","C"],["𝐷","D"],["𝐸","E"],["𝐹","F"],["𝐺","G"],["𝐻","H"],["𝐼","I"],["𝐽","J"],["𝐾","K"],["𝐿","L"],["𝑀","M"],["𝑁","N"],["𝑂","O"],["𝑃","P"],["𝑄","Q"],["𝑅","R"],["𝑆","S"],["𝑇","T"],["𝑈","U"],["𝑉","V"],["𝑊","W"],["𝑋","X"],["𝑌","Y"],["𝑍","Z"],["𝑎","a"],["𝑏","b"],["𝑐","c"],["𝑑","d"],["𝑒","e"],["𝑓","f"],["𝑔","g"],["𝑖","i"],["𝑗","j"],["𝑘","k"],["𝑙","l"],["𝑚","m"],["𝑛","n"],["𝑜","o"],["𝑝","p"],["𝑞","q"],["𝑟","r"],["𝑠","s"],["𝑡","t"],["𝑢","u"],["𝑣","v"],["𝑤","w"],["𝑥","x"],["𝑦","y"],["𝑧","z"],["𝑨","A"],["𝑩","B"],["𝑪","C"],["𝑫","D"],["𝑬","E"],["𝑭","F"],["𝑮","G"],["𝑯","H"],["𝑰","I"],["𝑱","J"],["𝑲","K"],["𝑳","L"],["𝑴","M"],["𝑵","N"],["𝑶","O"],["𝑷","P"],["𝑸","Q"],["𝑹","R"],["𝑺","S"],["𝑻","T"],["𝑼","U"],["𝑽","V"],["𝑾","W"],["𝑿","X"],["𝒀","Y"],["𝒁","Z"],["𝒂","a"],["𝒃","b"],["𝒄","c"],["𝒅","d"],["𝒆","e"],["𝒇","f"],["𝒈","g"],["𝒉","h"],["𝒊","i"],["𝒋","j"],["𝒌","k"],["𝒍","l"],["𝒎","m"],["𝒏","n"],["𝒐","o"],["𝒑","p"],["𝒒","q"],["𝒓","r"],["𝒔","s"],["𝒕","t"],["𝒖","u"],["𝒗","v"],["𝒘","w"],["𝒙","x"],["𝒚","y"],["𝒛","z"],["𝒜","A"],["𝒞","C"],["𝒟","D"],["𝒢","g"],["𝒥","J"],["𝒦","K"],["𝒩","N"],["𝒪","O"],["𝒫","P"],["𝒬","Q"],["𝒮","S"],["𝒯","T"],["𝒰","U"],["𝒱","V"],["𝒲","W"],["𝒳","X"],["𝒴","Y"],["𝒵","Z"],["𝒶","a"],["𝒷","b"],["𝒸","c"],["𝒹","d"],["𝒻","f"],["𝒽","h"],["𝒾","i"],["𝒿","j"],["𝓀","h"],["𝓁","l"],["𝓂","m"],["𝓃","n"],["𝓅","p"],["𝓆","q"],["𝓇","r"],["𝓈","s"],["𝓉","t"],["𝓊","u"],["𝓋","v"],["𝓌","w"],["𝓍","x"],["𝓎","y"],["𝓏","z"],["𝓐","A"],["𝓑","B"],["𝓒","C"],["𝓓","D"],["𝓔","E"],["𝓕","F"],["𝓖","G"],["𝓗","H"],["𝓘","I"],["𝓙","J"],["𝓚","K"],["𝓛","L"],["𝓜","M"],["𝓝","N"],["𝓞","O"],["𝓟","P"],["𝓠","Q"],["𝓡","R"],["𝓢","S"],["𝓣","T"],["𝓤","U"],["𝓥","V"],["𝓦","W"],["𝓧","X"],["𝓨","Y"],["𝓩","Z"],["𝓪","a"],["𝓫","b"],["𝓬","c"],["𝓭","d"],["𝓮","e"],["𝓯","f"],["𝓰","g"],["𝓱","h"],["𝓲","i"],["𝓳","j"],["𝓴","k"],["𝓵","l"],["𝓶","m"],["𝓷","n"],["𝓸","o"],["𝓹","p"],["𝓺","q"],["𝓻","r"],["𝓼","s"],["𝓽","t"],["𝓾","u"],["𝓿","v"],["𝔀","w"],["𝔁","x"],["𝔂","y"],["𝔃","z"],["𝔄","A"],["𝔅","B"],["𝔇","D"],["𝔈","E"],["𝔉","F"],["𝔊","G"],["𝔍","J"],["𝔎","K"],["𝔏","L"],["𝔐","M"],["𝔑","N"],["𝔒","O"],["𝔓","P"],["𝔔","Q"],["𝔖","S"],["𝔗","T"],["𝔘","U"],["𝔙","V"],["𝔚","W"],["𝔛","X"],["𝔜","Y"],["𝔞","a"],["𝔟","b"],["𝔠","c"],["𝔡","d"],["𝔢","e"],["𝔣","f"],["𝔤","g"],["𝔥","h"],["𝔦","i"],["𝔧","j"],["𝔨","k"],["𝔩","l"],["𝔪","m"],["𝔫","n"],["𝔬","o"],["𝔭","p"],["𝔮","q"],["𝔯","r"],["𝔰","s"],["𝔱","t"],["𝔲","u"],["𝔳","v"],["𝔴","w"],["𝔵","x"],["𝔶","y"],["𝔷","z"],["𝔸","A"],["𝔹","B"],["𝔻","D"],["𝔼","E"],["𝔽","F"],["𝔾","G"],["𝕀","I"],["𝕁","J"],["𝕂","K"],["𝕃","L"],["𝕄","M"],["𝕆","N"],["𝕊","S"],["𝕋","T"],["𝕌","U"],["𝕍","V"],["𝕎","W"],["𝕏","X"],["𝕐","Y"],["𝕒","a"],["𝕓","b"],["𝕔","c"],["𝕕","d"],["𝕖","e"],["𝕗","f"],["𝕘","g"],["𝕙","h"],["𝕚","i"],["𝕛","j"],["𝕜","k"],["𝕝","l"],["𝕞","m"],["𝕟","n"],["𝕠","o"],["𝕡","p"],["𝕢","q"],["𝕣","r"],["𝕤","s"],["𝕥","t"],["𝕦","u"],["𝕧","v"],["𝕨","w"],["𝕩","x"],["𝕪","y"],["𝕫","z"],["𝕬","A"],["𝕭","B"],["𝕮","C"],["𝕯","D"],["𝕰","E"],["𝕱","F"],["𝕲","G"],["𝕳","H"],["𝕴","I"],["𝕵","J"],["𝕶","K"],["𝕷","L"],["𝕸","M"],["𝕹","N"],["𝕺","O"],["𝕻","P"],["𝕼","Q"],["𝕽","R"],["𝕾","S"],["𝕿","T"],["𝖀","U"],["𝖁","V"],["𝖂","W"],["𝖃","X"],["𝖄","Y"],["𝖅","Z"],["𝖆","a"],["𝖇","b"],["𝖈","c"],["𝖉","d"],["𝖊","e"],["𝖋","f"],["𝖌","g"],["𝖍","h"],["𝖎","i"],["𝖏","j"],["𝖐","k"],["𝖑","l"],["𝖒","m"],["𝖓","n"],["𝖔","o"],["𝖕","p"],["𝖖","q"],["𝖗","r"],["𝖘","s"],["𝖙","t"],["𝖚","u"],["𝖛","v"],["𝖜","w"],["𝖝","x"],["𝖞","y"],["𝖟","z"],["𝖠","A"],["𝖡","B"],["𝖢","C"],["𝖣","D"],["𝖤","E"],["𝖥","F"],["𝖦","G"],["𝖧","H"],["𝖨","I"],["𝖩","J"],["𝖪","K"],["𝖫","L"],["𝖬","M"],["𝖭","N"],["𝖮","O"],["𝖯","P"],["𝖰","Q"],["𝖱","R"],["𝖲","S"],["𝖳","T"],["𝖴","U"],["𝖵","V"],["𝖶","W"],["𝖷","X"],["𝖸","Y"],["𝖹","Z"],["𝖺","a"],["𝖻","b"],["𝖼","c"],["𝖽","d"],["𝖾","e"],["𝖿","f"],["𝗀","g"],["𝗁","h"],["𝗂","i"],["𝗃","j"],["𝗄","k"],["𝗅","l"],["𝗆","m"],["𝗇","n"],["𝗈","o"],["𝗉","p"],["𝗊","q"],["𝗋","r"],["𝗌","s"],["𝗍","t"],["𝗎","u"],["𝗏","v"],["𝗐","w"],["𝗑","x"],["𝗒","y"],["𝗓","z"],["𝗔","A"],["𝗕","B"],["𝗖","C"],["𝗗","D"],["𝗘","E"],["𝗙","F"],["𝗚","G"],["𝗛","H"],["𝗜","I"],["𝗝","J"],["𝗞","K"],["𝗟","L"],["𝗠","M"],["𝗡","N"],["𝗢","O"],["𝗣","P"],["𝗤","Q"],["𝗥","R"],["𝗦","S"],["𝗧","T"],["𝗨","U"],["𝗩","V"],["𝗪","W"],["𝗫","X"],["𝗬","Y"],["𝗭","Z"],["𝗮","a"],["𝗯","b"],["𝗰","c"],["𝗱","d"],["𝗲","e"],["𝗳","f"],["𝗴","g"],["𝗵","h"],["𝗶","i"],["𝗷","j"],["𝗸","k"],["𝗹","l"],["𝗺","m"],["𝗻","n"],["𝗼","o"],["𝗽","p"],["𝗾","q"],["𝗿","r"],["𝘀","s"],["𝘁","t"],["𝘂","u"],["𝘃","v"],["𝘄","w"],["𝘅","x"],["𝘆","y"],["𝘇","z"],["𝘈","A"],["𝘉","B"],["𝘊","C"],["𝘋","D"],["𝘌","E"],["𝘍","F"],["𝘎","G"],["𝘏","H"],["𝘐","I"],["𝘑","J"],["𝘒","K"],["𝘓","L"],["𝘔","M"],["𝘕","N"],["𝘖","O"],["𝘗","P"],["𝘘","Q"],["𝘙","R"],["𝘚","S"],["𝘛","T"],["𝘜","U"],["𝘝","V"],["𝘞","W"],["𝘟","X"],["𝘠","Y"],["𝘡","Z"],["𝘢","a"],["𝘣","b"],["𝘤","c"],["𝘥","d"],["𝘦","e"],["𝘧","f"],["𝘨","g"],["𝘩","h"],["𝘪","i"],["𝘫","j"],["𝘬","k"],["𝘭","l"],["𝘮","m"],["𝘯","n"],["𝘰","o"],["𝘱","p"],["𝘲","q"],["𝘳","r"],["𝘴","s"],["𝘵","t"],["𝘶","u"],["𝘷","v"],["𝘸","w"],["𝘹","x"],["𝘺","y"],["𝘻","z"],["𝘼","A"],["𝘽","B"],["𝘾","C"],["𝘿","D"],["𝙀","E"],["𝙁","F"],["𝙂","G"],["𝙃","H"],["𝙄","I"],["𝙅","J"],["𝙆","K"],["𝙇","L"],["𝙈","M"],["𝙉","N"],["𝙊","O"],["𝙋","P"],["𝙌","Q"],["𝙍","R"],["𝙎","S"],["𝙏","T"],["𝙐","U"],["𝙑","V"],["𝙒","W"],["𝙓","X"],["𝙔","Y"],["𝙕","Z"],["𝙖","a"],["𝙗","b"],["𝙘","c"],["𝙙","d"],["𝙚","e"],["𝙛","f"],["𝙜","g"],["𝙝","h"],["𝙞","i"],["𝙟","j"],["𝙠","k"],["𝙡","l"],["𝙢","m"],["𝙣","n"],["𝙤","o"],["𝙥","p"],["𝙦","q"],["𝙧","r"],["𝙨","s"],["𝙩","t"],["𝙪","u"],["𝙫","v"],["𝙬","w"],["𝙭","x"],["𝙮","y"],["𝙯","z"],["𝙰","A"],["𝙱","B"],["𝙲","C"],["𝙳","D"],["𝙴","E"],["𝙵","F"],["𝙶","G"],["𝙷","H"],["𝙸","I"],["𝙹","J"],["𝙺","K"],["𝙻","L"],["𝙼","M"],["𝙽","N"],["𝙾","O"],["𝙿","P"],["𝚀","Q"],["𝚁","R"],["𝚂","S"],["𝚃","T"],["𝚄","U"],["𝚅","V"],["𝚆","W"],["𝚇","X"],["𝚈","Y"],["𝚉","Z"],["𝚊","a"],["𝚋","b"],["𝚌","c"],["𝚍","d"],["𝚎","e"],["𝚏","f"],["𝚐","g"],["𝚑","h"],["𝚒","i"],["𝚓","j"],["𝚔","k"],["𝚕","l"],["𝚖","m"],["𝚗","n"],["𝚘","o"],["𝚙","p"],["𝚚","q"],["𝚛","r"],["𝚜","s"],["𝚝","t"],["𝚞","u"],["𝚟","v"],["𝚠","w"],["𝚡","x"],["𝚢","y"],["𝚣","z"],["𝚤","l"],["𝚥","j"],["𝛢","A"],["𝛣","B"],["𝛤","G"],["𝛥","D"],["𝛦","E"],["𝛧","Z"],["𝛨","I"],["𝛩","TH"],["𝛪","I"],["𝛫","K"],["𝛬","L"],["𝛭","M"],["𝛮","N"],["𝛯","KS"],["𝛰","O"],["𝛱","P"],["𝛲","R"],["𝛳","TH"],["𝛴","S"],["𝛵","T"],["𝛶","Y"],["𝛷","F"],["𝛸","x"],["𝛹","PS"],["𝛺","O"],["𝛻","D"],["𝛼","a"],["𝛽","b"],["𝛾","g"],["𝛿","d"],["𝜀","e"],["𝜁","z"],["𝜂","i"],["𝜃","th"],["𝜄","i"],["𝜅","k"],["𝜆","l"],["𝜇","m"],["𝜈","n"],["𝜉","ks"],["𝜊","o"],["𝜋","p"],["𝜌","r"],["𝜍","s"],["𝜎","s"],["𝜏","t"],["𝜐","y"],["𝜑","f"],["𝜒","x"],["𝜓","ps"],["𝜔","o"],["𝜕","d"],["𝜖","E"],["𝜗","TH"],["𝜘","K"],["𝜙","f"],["𝜚","r"],["𝜛","p"],["𝜜","A"],["𝜝","V"],["𝜞","G"],["𝜟","D"],["𝜠","E"],["𝜡","Z"],["𝜢","I"],["𝜣","TH"],["𝜤","I"],["𝜥","K"],["𝜦","L"],["𝜧","M"],["𝜨","N"],["𝜩","KS"],["𝜪","O"],["𝜫","P"],["𝜬","S"],["𝜭","TH"],["𝜮","S"],["𝜯","T"],["𝜰","Y"],["𝜱","F"],["𝜲","X"],["𝜳","PS"],["𝜴","O"],["𝜵","D"],["𝜶","a"],["𝜷","v"],["𝜸","g"],["𝜹","d"],["𝜺","e"],["𝜻","z"],["𝜼","i"],["𝜽","th"],["𝜾","i"],["𝜿","k"],["𝝀","l"],["𝝁","m"],["𝝂","n"],["𝝃","ks"],["𝝄","o"],["𝝅","p"],["𝝆","r"],["𝝇","s"],["𝝈","s"],["𝝉","t"],["𝝊","y"],["𝝋","f"],["𝝌","x"],["𝝍","ps"],["𝝎","o"],["𝝏","a"],["𝝐","e"],["𝝑","i"],["𝝒","k"],["𝝓","f"],["𝝔","r"],["𝝕","p"],["𝝖","A"],["𝝗","B"],["𝝘","G"],["𝝙","D"],["𝝚","E"],["𝝛","Z"],["𝝜","I"],["𝝝","TH"],["𝝞","I"],["𝝟","K"],["𝝠","L"],["𝝡","M"],["𝝢","N"],["𝝣","KS"],["𝝤","O"],["𝝥","P"],["𝝦","R"],["𝝧","TH"],["𝝨","S"],["𝝩","T"],["𝝪","Y"],["𝝫","F"],["𝝬","X"],["𝝭","PS"],["𝝮","O"],["𝝯","D"],["𝝰","a"],["𝝱","v"],["𝝲","g"],["𝝳","d"],["𝝴","e"],["𝝵","z"],["𝝶","i"],["𝝷","th"],["𝝸","i"],["𝝹","k"],["𝝺","l"],["𝝻","m"],["𝝼","n"],["𝝽","ks"],["𝝾","o"],["𝝿","p"],["𝞀","r"],["𝞁","s"],["𝞂","s"],["𝞃","t"],["𝞄","y"],["𝞅","f"],["𝞆","x"],["𝞇","ps"],["𝞈","o"],["𝞉","a"],["𝞊","e"],["𝞋","i"],["𝞌","k"],["𝞍","f"],["𝞎","r"],["𝞏","p"],["𝞐","A"],["𝞑","V"],["𝞒","G"],["𝞓","D"],["𝞔","E"],["𝞕","Z"],["𝞖","I"],["𝞗","TH"],["𝞘","I"],["𝞙","K"],["𝞚","L"],["𝞛","M"],["𝞜","N"],["𝞝","KS"],["𝞞","O"],["𝞟","P"],["𝞠","S"],["𝞡","TH"],["𝞢","S"],["𝞣","T"],["𝞤","Y"],["𝞥","F"],["𝞦","X"],["𝞧","PS"],["𝞨","O"],["𝞩","D"],["𝞪","av"],["𝞫","g"],["𝞬","d"],["𝞭","e"],["𝞮","z"],["𝞯","i"],["𝞰","i"],["𝞱","th"],["𝞲","i"],["𝞳","k"],["𝞴","l"],["𝞵","m"],["𝞶","n"],["𝞷","ks"],["𝞸","o"],["𝞹","p"],["𝞺","r"],["𝞻","s"],["𝞼","s"],["𝞽","t"],["𝞾","y"],["𝞿","f"],["𝟀","x"],["𝟁","ps"],["𝟂","o"],["𝟃","a"],["𝟄","e"],["𝟅","i"],["𝟆","k"],["𝟇","f"],["𝟈","r"],["𝟉","p"],["𝟊","F"],["𝟋","f"],["⒜","(a)"],["⒝","(b)"],["⒞","(c)"],["⒟","(d)"],["⒠","(e)"],["⒡","(f)"],["⒢","(g)"],["⒣","(h)"],["⒤","(i)"],["⒥","(j)"],["⒦","(k)"],["⒧","(l)"],["⒨","(m)"],["⒩","(n)"],["⒪","(o)"],["⒫","(p)"],["⒬","(q)"],["⒭","(r)"],["⒮","(s)"],["⒯","(t)"],["⒰","(u)"],["⒱","(v)"],["⒲","(w)"],["⒳","(x)"],["⒴","(y)"],["⒵","(z)"],["Ⓐ","(A)"],["Ⓑ","(B)"],["Ⓒ","(C)"],["Ⓓ","(D)"],["Ⓔ","(E)"],["Ⓕ","(F)"],["Ⓖ","(G)"],["Ⓗ","(H)"],["Ⓘ","(I)"],["Ⓙ","(J)"],["Ⓚ","(K)"],["Ⓛ","(L)"],["Ⓝ","(N)"],["Ⓞ","(O)"],["Ⓟ","(P)"],["Ⓠ","(Q)"],["Ⓡ","(R)"],["Ⓢ","(S)"],["Ⓣ","(T)"],["Ⓤ","(U)"],["Ⓥ","(V)"],["Ⓦ","(W)"],["Ⓧ","(X)"],["Ⓨ","(Y)"],["Ⓩ","(Z)"],["ⓐ","(a)"],["ⓑ","(b)"],["ⓒ","(b)"],["ⓓ","(c)"],["ⓔ","(e)"],["ⓕ","(f)"],["ⓖ","(g)"],["ⓗ","(h)"],["ⓘ","(i)"],["ⓙ","(j)"],["ⓚ","(k)"],["ⓛ","(l)"],["ⓜ","(m)"],["ⓝ","(n)"],["ⓞ","(o)"],["ⓟ","(p)"],["ⓠ","(q)"],["ⓡ","(r)"],["ⓢ","(s)"],["ⓣ","(t)"],["ⓤ","(u)"],["ⓥ","(v)"],["ⓦ","(w)"],["ⓧ","(x)"],["ⓨ","(y)"],["ⓩ","(z)"],["Ċ","C"],["ċ","c"],["Ġ","G"],["ġ","g"],["Ħ","H"],["ħ","h"],["Ż","Z"],["ż","z"],["𝟎","0"],["𝟏","1"],["𝟐","2"],["𝟑","3"],["𝟒","4"],["𝟓","5"],["𝟔","6"],["𝟕","7"],["𝟖","8"],["𝟗","9"],["𝟘","0"],["𝟙","1"],["𝟚","2"],["𝟛","3"],["𝟜","4"],["𝟝","5"],["𝟞","6"],["𝟟","7"],["𝟠","8"],["𝟡","9"],["𝟢","0"],["𝟣","1"],["𝟤","2"],["𝟥","3"],["𝟦","4"],["𝟧","5"],["𝟨","6"],["𝟩","7"],["𝟪","8"],["𝟫","9"],["𝟬","0"],["𝟭","1"],["𝟮","2"],["𝟯","3"],["𝟰","4"],["𝟱","5"],["𝟲","6"],["𝟳","7"],["𝟴","8"],["𝟵","9"],["𝟶","0"],["𝟷","1"],["𝟸","2"],["𝟹","3"],["𝟺","4"],["𝟻","5"],["𝟼","6"],["𝟽","7"],["𝟾","8"],["𝟿","9"],["①","1"],["②","2"],["③","3"],["④","4"],["⑤","5"],["⑥","6"],["⑦","7"],["⑧","8"],["⑨","9"],["⑩","10"],["⑪","11"],["⑫","12"],["⑬","13"],["⑭","14"],["⑮","15"],["⑯","16"],["⑰","17"],["⑱","18"],["⑲","19"],["⑳","20"],["⑴","1"],["⑵","2"],["⑶","3"],["⑷","4"],["⑸","5"],["⑹","6"],["⑺","7"],["⑻","8"],["⑼","9"],["⑽","10"],["⑾","11"],["⑿","12"],["⒀","13"],["⒁","14"],["⒂","15"],["⒃","16"],["⒄","17"],["⒅","18"],["⒆","19"],["⒇","20"],["⒈","1."],["⒉","2."],["⒊","3."],["⒋","4."],["⒌","5."],["⒍","6."],["⒎","7."],["⒏","8."],["⒐","9."],["⒑","10."],["⒒","11."],["⒓","12."],["⒔","13."],["⒕","14."],["⒖","15."],["⒗","16."],["⒘","17."],["⒙","18."],["⒚","19."],["⒛","20."],["⓪","0"],["⓫","11"],["⓬","12"],["⓭","13"],["⓮","14"],["⓯","15"],["⓰","16"],["⓱","17"],["⓲","18"],["⓳","19"],["⓴","20"],["⓵","1"],["⓶","2"],["⓷","3"],["⓸","4"],["⓹","5"],["⓺","6"],["⓻","7"],["⓼","8"],["⓽","9"],["⓾","10"],["⓿","0"],["🙰","&"],["🙱","&"],["🙲","&"],["🙳","&"],["🙴","&"],["🙵","&"],["🙶",'"'],["🙷",'"'],["🙸",'"'],["‽","?!"],["🙹","?!"],["🙺","?!"],["🙻","?!"],["🙼","/"],["🙽","\\"],["🜇","AR"],["🜈","V"],["🜉","V"],["🜆","VR"],["🜅","VF"],["🜩","2"],["🜪","5"],["🝡","f"],["🝢","W"],["🝣","U"],["🝧","V"],["🝨","T"],["🝪","V"],["🝫","MB"],["🝬","VB"],["🝲","3B"],["🝳","3B"],["💯","100"],["🔙","BACK"],["🔚","END"],["🔛","ON!"],["🔜","SOON"],["🔝","TOP"],["🔞","18"],["🔤","abc"],["🔠","ABCD"],["🔡","abcd"],["🔢","1234"],["🔣","T&@%"],["#️⃣","#"],["*️⃣","*"],["0️⃣","0"],["1️⃣","1"],["2️⃣","2"],["3️⃣","3"],["4️⃣","4"],["5️⃣","5"],["6️⃣","6"],["7️⃣","7"],["8️⃣","8"],["9️⃣","9"],["🔟","10"],["🅰️","A"],["🅱️","B"],["🆎","AB"],["🆑","CL"],["🅾️","O"],["🅿","P"],["🆘","SOS"],["🅲","C"],["🅳","D"],["🅴","E"],["🅵","F"],["🅶","G"],["🅷","H"],["🅸","I"],["🅹","J"],["🅺","K"],["🅻","L"],["🅼","M"],["🅽","N"],["🆀","Q"],["🆁","R"],["🆂","S"],["🆃","T"],["🆄","U"],["🆅","V"],["🆆","W"],["🆇","X"],["🆈","Y"],["🆉","Z"]],PB=(t,e)=>{for(const[n,r]of e)t=t.replace(new RegExp(CB(n),"g"),r);return t};function OB(t,e){if(typeof t!="string")throw new TypeError(`Expected a string, got \`${typeof t}\``);e={customReplacements:[],...e};const n=new Map([...AB,...e.customReplacements]);return t=t.normalize(),t=PB(t,n),t=t.normalize("NFD").replace(/\p{Diacritic}/gu,"").normalize(),t}const Qa=t=>{const{format:e,date_format:n=void 0,time_format:r=void 0,picker_utc:i=!1}=t;return{format:e,dateFormat:n,timeFormat:r,dateOnly:r===!1,timeOnly:n===!1,utc:i}},ac=(t,e)=>{const{format:n,timeOnly:r,utc:i}=Qa(e);if(t)try{return r?new Date(new Date(`${new Date().toJSON().split("T")[0]}T${t}`)):n?(i?He.utc:He)(t,n).toDate():new Date(t)}catch(s){console.error(s);return}},qC=t=>{const{dateOnly:e,timeOnly:n,utc:r}=Qa(t),{year:i,month:s,day:o,hour:a,minute:c}=$d({timeZone:r?"UTC":void 0}),u=`${i}-${s}-${o}`,d=`${a}:${c}`;return e?u:n?d:r?`${u}T${d}:00.000Z`:`${u}T${d}`},HC=(t,e,n)=>{const{format:r,dateOnly:i,timeOnly:s,utc:o}=Qa(n),a=`:00${e?.endsWith(".000")?".000":""}`;if(t==="")return"";if(t){if(s)return`${t}${a}`;try{return r?(o?He.utc:He)(t).format(r):i?t:o?`${t}:00.000Z`:`${t}${a}`}catch(c){console.error(c);return}}},$B=t=>{const{default:e}=t;return typeof e!="string"?"":e==="{{now}}"?HC(qC(t),"",t):e},LB=(t,e)=>{const{dateOnly:n,timeOnly:r,utc:i}=Qa(e);if(!t)return"";const s=n?t?.match(/^(?<date>\d{4}-[01]\d-[0-3]\d)\b/)?.groups?.date:r?t?.match(/^(?<time>[0-2]\d:[0-5]\d)\b/)?.groups?.time:void 0;if(s)return s;try{const{year:o,month:a,day:c,hour:u,minute:d}=$d({date:t?ac(t,e):new Date,timeZone:i?"UTC":void 0}),f=`${o}-${a}-${c}`,h=`${u}:${d}`;return n?f:r?h:`${f}T${h}`}catch(o){return console.error(o),""}},NB=/^date\('(?<format>.+?)'(?:,\s*'(?<timeZone>.+?)')?\)$/,IB=/^default\('?(?<defaultValue>.+?)'?\)$/,RB=/^ternary\('?(?<truthyValue>.*?)'?,\s*'?(?<falsyValue>.*?)'?\)$/,DB=/^truncate\((?<max>\d+)(?:,\s*'(?<ellipsis>.+?)')?\)$/,MB=({fieldConfig:t,value:e,transformation:n})=>{const r=String(e);if(n==="upper")return r.toUpperCase();if(n==="lower")return r.toLowerCase();const i=n.match(NB);if(i?.groups){const{format:c,timeZone:u}=i.groups,{dateOnly:d,utc:f}=Qa(t??{}),p=(u==="utc"||f||d&&!!r.match(/^\d{4}-[01]\d-[0-3]\d$/)||d&&!!r.match(/T\d{2}:\d{2}(?::\d{2})?(?:\.\d+)?Z$/)?He.utc:He)(r);return p.isValid()?p.format(c):""}const s=n.match(IB);if(s?.groups){const{defaultValue:c}=s.groups;return e?r:c}const o=n.match(RB);if(o?.groups){const{truthyValue:c,falsyValue:u}=o.groups;return e?c:u}const a=n.match(DB);if(a?.groups){const{max:c,ellipsis:u="…"}=a.groups;return dk(r,Number(c),{ellipsis:u})}return r},V_=({fieldConfig:t,value:e,transformations:n})=>(n.forEach(r=>{e=MB({fieldConfig:t,value:e,transformation:r})}),e),cm=t=>/{{.+?}}/.test(t)?t:`{{${t}}}`,M0=new Map,W_=(t,e,n)=>{const r=JSON.stringify({locale:t,fieldConfig:e,refEntries:n}),i=M0.get(r);if(i)return i;const s=e.value_field??e.valueField,o=e.display_fields??e.displayFields??[s],a=e.search_fields??e.searchFields??o,c=cm(s),u=o.map(cm).join(" "),d=a.map(cm).join(" "),f=e.filters??[],h=n.map(p=>{const{content:g}=p.locales[t]??p.locales._default??{};return{refEntry:p,hasContent:!!g,content:g??{}}}).filter(({hasContent:p,content:g})=>p&&f.every(({field:m,values:v})=>v.includes(g[m]))).map(({refEntry:p,content:g})=>{const m=Object.fromEntries(rc([...[...u.matchAll(/{{(.+?)}}/g)].map(x=>x[1]),...[...c.matchAll(/{{(.+?)}}/g)].map(x=>x[1]),...[...d.matchAll(/{{(.+?)}}/g)].map(x=>x[1])].map(x=>x.includes(".")?x.replace(/^([^.]+)+\.\*\.[^.]+$/,"$1.*"):x)).map(x=>{if(x.endsWith(".*")){const E=new RegExp(`^${ln(x).replace("\\.\\*","\\.\\d+\\.[^.]+")}$`),A=za(Object.fromEntries(Object.entries(g).filter(([O])=>E.test(O))));return[x,A[Object.keys(A)[0]]??""]}if(x==="slug")return[x,p.slug];const k=_n({collectionName:e.collection,keyPath:x}),S=x.replace(/^fields\./,"");if(k?.widget==="relation")return[x,G_({fieldConfig:k,valueMap:g,keyPath:S,locale:t})??""];let C=g[S];if(C===void 0){const{defaultLocale:E}=Fi(e.collection)?._i18n??{};E&&(C=p.locales[E].content[S])}return[x,C??""]})),v=Math.max(...Object.values(m).map(x=>Array.isArray(x)?x.length:1));let _=new Array(v).fill(u),b=new Array(v).fill(c),y=new Array(v).fill(d);return Object.entries(m).forEach(([x,k])=>{Array.isArray(k)?k.forEach((S,C)=>{Object.entries(S).forEach(([E,A])=>{_.forEach((O,L)=>{(C===0&&L===0||C%L===0)&&(_[C]=_[C].replaceAll(`{{${x}.${E}}}`,A),b[C]=b[C].replaceAll(`{{${x}.${E}}}`,A),y[C]=y[C].replaceAll(`{{${x}.${E}}}`,A))})})}):(_=_.map(S=>S.replaceAll(`{{${x}}}`,k)),b=b.map(S=>S.replaceAll(`{{${x}}}`,k)),y=y.map(S=>S.replaceAll(`{{${x}}}`,k)))}),_.map((x,k)=>({label:x,value:b[k],searchValue:y[k]}))}).flat(1).sort((p,g)=>ui(p.label,g.label));return M0.set(r,h),h},G_=({fieldConfig:t,valueMap:e,keyPath:n,locale:r})=>{const{multiple:i,collection:s}=t,o=rs(s),a=W_(r,t,o),c=u=>a.find(d=>d.value===u)?.label||u;return i?Object.entries(e).filter(([d])=>d.match(`^${ln(n)}\\.\\d+$`)).map(([,d])=>d).map(c):c(e[n])},um=new Map,FB=({fieldConfig:t,valueMap:e,keyPath:n})=>{const r=JSON.stringify({fieldConfig:t,valueMap:e,keyPath:n}),i=um.get(r);if(i)return i;const{multiple:s,options:o}=t,a=ME(o),c=f=>o.find(h=>h.value===f)?.label||f;if(s){const f=Object.entries(e).filter(([p])=>p.match(`^${ln(n)}\\.\\d+$`)).map(([,p])=>p),h=a?f.map(c):f;return um.set(r,h),h}const u=e[n],d=a?c(u):u;return um.set(r,d),d},dm=new Map,_n=({collectionName:t,fileName:e=void 0,valueMap:n={},keyPath:r})=>{const i=JSON.stringify({collectionName:t,fileName:e,valueMap:n,keyPath:r}),s=dm.get(i);if(s)return s;const o=Fi(t),a=e?o?._fileMap[e]:void 0;if(!o||e&&!a){dm.set(i,void 0);return}const{fields:c=[]}=a??o,u=r.split(".");let d;return u.forEach((f,h)=>{if(h===0)d=c.find(({name:p})=>p===f);else if(d){const p=/^\d+$/.test(f),g=u.slice(0,h),{field:m,fields:v,types:_,typeKey:b="type"}=d;if(m){const y=p?u[h+1]:void 0;d=!y||m.name===y?m:void 0}else v&&!p?d=v.find(({name:y})=>y===f):_&&p?d=_.find(({name:y})=>y===n[[...g,f,b].join(".")]):_&&f!==b&&(d=_.find(({name:y})=>y===n[[...g,b].join(".")])?.fields?.find(({name:y})=>y===f))}}),dm.set(i,d),d},Dd=({fieldConfig:{required:t=!0},locale:e})=>Array.isArray(t)?t.includes(e):!!t,tg=({collectionName:t,fileName:e,valueMap:n,keyPath:r,locale:i,transformations:s})=>{const o=_n({collectionName:t,fileName:e,valueMap:n,keyPath:r});let a=n[r];if(o?.widget==="relation"&&(a=G_({fieldConfig:o,valueMap:n,keyPath:r,locale:i})),o?.widget==="select"&&(a=FB({fieldConfig:o,valueMap:n,keyPath:r})),o?.widget==="list"){const{fields:c,types:u}=o;c||u||(a=oc(i).format(Object.entries(n).filter(([d,f])=>d.match(`^${ln(r)}\\.\\d+$`)&&typeof f=="string"&&!!f).map(([,d])=>d)))}return Array.isArray(a)&&(a=oc(i).format(a)),s?.length&&(a=V_({fieldConfig:o,value:a,transformations:s})),a?String(a):""},lc=({entry:t,locale:e,collectionName:n,key:r,resolveRef:i=!0})=>{const{slug:s,locales:o,commitAuthor:{name:a,login:c,email:u}={},commitDate:d}=t;if(r==="slug")return s;if(r==="commit_author")return a||c||u;if(r==="commit_date")return d;const{content:f}=o[e]??{};if(f!==void 0){if(i){const h=_n({collectionName:n,keyPath:r});if(h?.widget==="relation")return G_({fieldConfig:h,valueMap:f,keyPath:r,locale:e})}return f[r]}},zB=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],F0={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};function VC(t){const e=typeof t=="string"?t.charCodeAt(0):t;return e>=48&&e<=57}function jB(t){const e=typeof t=="string"?t.charCodeAt(0):t;return e>=97&&e<=102||e>=65&&e<=70||e>=48&&e<=57}function UB(t){const e=typeof t=="string"?t.charCodeAt(0):t;return e>=97&&e<=122||e>=65&&e<=90}function z0(t){return UB(t)||VC(t)}const j0=document.createElement("i");function U0(t){const e="&"+t+";";j0.innerHTML=e;const n=j0.textContent;return n.charCodeAt(n.length-1)===59&&t!=="semi"||n===e?!1:n}const BB=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function qB(t,e){const n={},r=typeof n.additional=="string"?n.additional.charCodeAt(0):n.additional,i=[];let s=0,o=-1,a="",c,u;n.position&&("start"in n.position||"indent"in n.position?(u=n.position.indent,c=n.position.start):c=n.position);let d=(c?c.line:0)||1,f=(c?c.column:0)||1,h=g(),p;for(s--;++s<=t.length;)if(p===10&&(f=(u?u[o]:0)||1),p=t.charCodeAt(s),p===38){const _=t.charCodeAt(s+1);if(_===9||_===10||_===12||_===32||_===38||_===60||Number.isNaN(_)||r&&_===r){a+=String.fromCharCode(p),f++;continue}const b=s+1;let y=b,x=b,k;if(_===35){x=++y;const N=t.charCodeAt(x);N===88||N===120?(k="hexadecimal",x=++y):k="decimal"}else k="named";let S="",C="",E="";const A=k==="named"?z0:k==="decimal"?VC:jB;for(x--;++x<=t.length;){const N=t.charCodeAt(x);if(!A(N))break;E+=String.fromCharCode(N),k==="named"&&zB.includes(E)&&(S=E,C=U0(E))}let O=t.charCodeAt(x)===59;if(O){x++;const N=k==="named"?U0(E):!1;N&&(S=E,C=N)}let L=1+x-b,I="";if(!(!O&&n.nonTerminated===!1))if(!E)k!=="named"&&m(4,L);else if(k==="named"){if(O&&!C)m(5,1);else if(S!==E&&(x=y+S.length,L=1+x-y,O=!1),!O){const N=S?1:3;if(n.attribute){const j=t.charCodeAt(x);j===61?(m(N,L),C=""):z0(j)?C="":m(N,L)}else m(N,L)}I=C}else{O||m(2,L);let N=Number.parseInt(E,k==="hexadecimal"?16:10);if(HB(N))m(7,L),I="�";else if(N in F0)m(6,L),I=F0[N];else{let j="";VB(N)&&m(6,L),N>65535&&(N-=65536,j+=String.fromCharCode(N>>>10|55296),N=56320|N&1023),I=j+String.fromCharCode(N)}}if(I){v(),h=g(),s=x-1,f+=x-b+1,i.push(I);const N=g();N.offset++,n.reference&&n.reference.call(n.referenceContext||void 0,I,{start:h,end:N},t.slice(b-1,x)),h=N}else E=t.slice(b-1,x),a+=E,f+=E.length,s=x-1}else p===10&&(d++,o++,f=0),Number.isNaN(p)?v():(a+=String.fromCharCode(p),f++);return i.join("");function g(){return{line:d,column:f,offset:s+((c?c.offset:0)||0)}}function m(_,b){let y;n.warning&&(y=g(),y.column+=b,y.offset+=b,n.warning.call(n.warningContext||void 0,BB[_],y,_))}function v(){a&&(i.push(a),n.text&&n.text.call(n.textContext||void 0,a,{start:h,end:g()}),a="")}}function HB(t){return t>=55296&&t<=57343||t>1114111}function VB(t){return t>=1&&t<=8||t===11||t>=13&&t<=31||t>=127&&t<=159||t>=64976&&t<=65007||(t&65535)===65535||(t&65535)===65534}const B0=(t,{allowMarkdown:e=!1}={})=>(t=d3(t),t=BE.sanitize(t,{ALLOWED_TAGS:e?["strong","em","code"]:[]}),t=qB(t),t.trim()),WC=(t,{identifierField:e="title",useBody:n=!0}={})=>{const r=[e,"title","name","label"].find(i=>typeof t[i]=="string"&&!!t[i].trim());return r?t[r].trim():n&&typeof t.body=="string"?t.body.match(/^#+\s+(?<header>.+?)(?:\s+\{#.+?\})?\s*$/m)?.groups?.header??"":""},qo=(t,e,{locale:n,useTemplate:r=!1,allowMarkdown:i=!1}={})=>{const{name:s,identifier_field:o="title",summary:a,_i18n:{defaultLocale:c}}=t,u=t._type==="entry"?t._file.basePath:void 0,{locales:d,slug:f,commitDate:h,commitAuthor:p}=e,{content:g={},path:m=""}=d[n??c]??Object.values(d)[0]??{};if(!r||!a)return B0(WC(g,{identifierField:o})||f.replaceAll("-"," "),{allowMarkdown:i});const v=b=>{if(b==="slug")return f;if(b==="dirname")return Fn(m.replace(/[^/]+$/,"").replace(u??"",""));if(b==="filename")return m.split("/").pop().split(".").shift();if(b==="extension")return m.split("/").pop().split(".").pop();if(b==="commit_date")return h??"";if(b==="commit_author")return p?.name||p?.login||p?.email},_=b=>{const[y,...x]=b.split(/\s*\|\s*/),k=g,S=y.replace(/^fields\./,"");let C=v(y);if(C===void 0&&(C=tg({collectionName:s,valueMap:k,keyPath:S,locale:c})),C===void 0)return"";if(C instanceof Date&&!x.length){const{year:E,month:A,day:O}=$d({date:C});return`${E}-${A}-${O}`}return x.length&&(C=V_({fieldConfig:_n({collectionName:s,valueMap:k,keyPath:S}),value:C,transformations:x})),String(C)};return B0(a.replace(/{{(.+?)}}/g,(b,y)=>_(y)),{allowMarkdown:i})},zh=()=>(globalThis.matchMedia("(pointer: fine)")?.matches??!1)&&"ondrop"in globalThis,K_=t=>{const e=new Intl.NumberFormat(ne(Nn),{maximumFractionDigits:1}),n=1e3,r=n*1e3,i=r*1e3,s=i*1e3;return t<n?ne(le)("file_size_units.b",{values:{size:e.format(t)}}):t<r?ne(le)("file_size_units.kb",{values:{size:e.format(t/n)}}):t<i?ne(le)("file_size_units.mb",{values:{size:e.format(t/r)}}):t<s?ne(le)("file_size_units.gb",{values:{size:e.format(t/i)}}):ne(le)("file_size_units.tb",{values:{size:e.format(t/s)}})},Y_=(t,e)=>{if(!e.length)return t;const{filename:n,extension:r}=Ln(t),i=new RegExp(`^${ln(n)}(?:-(?<num>\\d+?))?${r?`\\.${r}`:""}$`),s=e.sort((a,c)=>ui(a.split(".")[0],c.split(".")[0])).findLast(a=>i.test(a));if(!s)return t;const o=Number(s.match(i)?.groups?.num??0)+1;return`${n}-${o}${r?`.${r}`:""}`},jh=t=>t.filter(Boolean).join("/"),Ev=t=>{const e=t.split("/");let n=!1;return e.forEach((r,i)=>{if(r==="."||r===".."){if(n&&(e[i]=null,r==="..")){const s=e.findLastIndex((o,a)=>!!o&&a<i);s>-1&&(e[s]=null)}}else n=!0}),jh(e)},WB=t=>{const{slug:{encoding:e="unicode",clean_accents:n=!1,sanitize_replacement:r="-"}={}}=ne(wt)??{};let i=t;return n&&(i=OB(i).normalize("NFD").replace(/\p{Diacritic}/gu,"")),e==="ascii"?i=i.replaceAll(/[^\w-~]/g," "):i=i.replaceAll(/[\p{Z}\p{C}!"#$&'()*+,/:;<=>?@[\]^`{|}]/gu," "),i.toLocaleLowerCase().trim().replaceAll(/\s+/g,r)},ys=(t,{type:e,collection:n,content:r,currentSlug:i,entryFilePath:s,locale:o,dateTimeParts:a=$d({timeZone:"UTC"})})=>{const{name:c,identifier_field:u="title",slug_length:d=void 0}=n,f=n._type==="entry"?n._file.basePath:void 0,h=m=>{if(["year","month","day","hour","minute","second"].includes(m))return a[m];if(m==="slug"&&i)return i;if(m==="uuid")return Gn();if(m==="uuid_short")return Gn("short");if(m==="uuid_shorter")return Gn("shorter");if(e==="preview_path"&&m==="locale")return o;if(e==="preview_path"||e==="media_folder"){if(!s)return"";if(m==="dirname")return s.replace(f??"","").match(/(.+?)(?:\/[^/]+)?$/)?.[1]??"";if(m==="filename")return s.split("/").pop().split(".").shift();if(m==="extension")return s.split("/").pop().split(".").pop()}let v;return m.startsWith("fields.")?v=r[m.replace(/^fields\./,"")]:m==="slug"?v=WC(r,{identifierField:u}):v=r[m],v},p=m=>{const[v,..._]=m.split(/\s*\|\s*/);let b=h(v);return b===void 0?Gn("short"):(_.length&&(b=V_({fieldConfig:_n({collectionName:c,valueMap:r,keyPath:v}),value:b,transformations:_})),b!==void 0&&(b=WB(String(b))),b?String(b):Gn("short"))};let g=t.replace(/{{(.+?)}}/g,(m,v)=>p(v)).trim();return typeof d=="number"&&(g=dk(g,d,{ellipsis:""}).replace(/-$/,"")),i?g:Y_(g,rs(c).map(m=>o?m.locales[o]?.slug:m.slug).filter(Boolean))},co=t=>tA(Object.values(t.locales)[0].path).map(({collectionName:e})=>Fi(e)).filter(e=>!!e),GC=(t,e,n,r)=>{const{show_preview_links:i=!0,_baseURL:s}=ne(wt)??{},{slug:o,path:a,content:c}=t.locales[e]??{},{preview_path:u,preview_path_date_field:d,fields:f}=r??n;if(!i||!s||!a||!c||!u)return;let h;if(/{{(?:year|month|day|hour|minute|second)}}/g.test(u)){const p=d?f?.find(({widget:_,name:b})=>_==="datetime"&&b===d):f?.find(({widget:_})=>_==="datetime"),g=p?c[p.name]:void 0;if(!p||!g)return;const{format:m,picker_utc:v=!1}=p;h=$d({date:(v?He.utc:He)(g,m).toDate(),timeZone:v?"UTC":void 0})}try{const p=ys(u,{type:"preview_path",collection:n,content:c,locale:e,currentSlug:o,entryFilePath:a,dateTimeParts:h});return`${s.replace(/\/$/,"")}/${p.replace(/^\//,"")}`}catch{return}},GB=(t,e)=>`${ne(In)?.repository?.blobBaseURL}/${t.locales[e]?.path}?plain=1`,Zo=(t,e)=>{const n=t.files?t._fileMap:void 0;return n?Object.values(n).filter(({_file:r,_i18n:i})=>r.fullPath===e.locales[i.defaultLocale]?.path):[]},J_=(t,e)=>ne(ii).find(n=>co(n).some(r=>r.name===t&&Zo(r,n).some(i=>i.name===e))),KB=/!\[.*?\]\((.+?)(?:\s+".*?")?\)/g,cc=st([]),rs=t=>{const e=Fi(t);if(!e)return[];const{filter:n,_i18n:{defaultLocale:r}}=e,i=n?.field,s=typeof n?.pattern=="string"?new RegExp(n.pattern):void 0,o=n?.value===void 0?[]:Array.isArray(n.value)?n.value:[n.value];return ne(ii).filter(a=>{if(!co(a).some(({name:u})=>u===t))return!1;if(!i)return!0;const c=lc({entry:a,locale:r,collectionName:t,key:i})??null;return s?s.test(c):o.includes(c)})},Tv=async(t,{entries:e=ne(ii),newURL:n=""}={})=>{const r=ne(wt)?._baseURL,i=r&&!t.startsWith("blob:")?t.replace(r,""):t,s=await Promise.all(e.map(async o=>{const{locales:a}=o,c=co(o);return(await Promise.all(Object.values(a).map(async({content:d})=>(await Promise.all(Object.entries(d).map(async([h,p])=>typeof p!="string"||!p?!1:(await Promise.all(c.map(async m=>{const v=async b=>{const y=_n({collectionName:m.name,fileName:b?.name,valueMap:d,keyPath:h});if(!y)return!1;const{widget:x="string"}=y;if(["image","file"].includes(x)){const k=await uc(p,o)===i;return k&&n&&(d[h]=n),k}if(x==="markdown"){const k=[...p.matchAll(KB)];if(k.length)return(await Promise.all(k.map(async([,S])=>{const C=await uc(S,o)===i;return C&&n&&(d[h]=d[h].replace(S,n)),C}))).some(Boolean)}return!1},_=Zo(m,o);return _.length?(await Promise.all(_.map(v))).includes(!0):v()}))).includes(!0)))).includes(!0)))).includes(!0)}));return e.filter((o,a)=>s[a])},q0="https://unpkg.com/pdfjs-dist/build";let _f;const YB=(t,e)=>{const n=e==="image",r=n?new Image:document.createElement(e);return new Promise(i=>{const s=()=>{i({dimensions:e==="audio"?void 0:{width:n?r.naturalWidth:r.videoWidth,height:n?r.naturalHeight:r.videoHeight},duration:n?void 0:r.duration})};r.addEventListener(n?"load":"loadedmetadata",s,{once:!0}),r.src=t})},JB=t=>new Date(t*1e3).toISOString().substr(11,8),KC=(t,e,n,r)=>{let i=1;return r?e>n?(i=r/e,t.width=r,t.height=n*i):(i=r/n,t.width=e*i,t.height=r):(t.width=e,t.height=n),i},YC=async(t,{format:e="png",quality:n=1,dimension:r=void 0}={})=>{let i,s=0,o=0;try{i=await createImageBitmap(t),{width:s,height:o}=i}catch{const u=URL.createObjectURL(t);i=await new Promise(d=>{if(t.type.startsWith("video/")){const f=document.createElement("video");f.addEventListener("canplay",async()=>{f.pause(),{videoWidth:s,videoHeight:o}=f,d(f)},{once:!0}),f.muted=!0,f.autoplay=!0,f.playsInline=!0,f.src=u,f.style.opacity="0",document.body.appendChild(f)}else{const f=new Image;f.addEventListener("load",()=>{({naturalWidth:s,naturalHeight:o}=f),d(f)},{once:!0}),f.src=u}}),URL.revokeObjectURL(u)}const a=new OffscreenCanvas(512,512),c=a.getContext("2d");return KC(a,s,o,r),c.drawImage(i,0,0,a.width,a.height),i instanceof HTMLVideoElement&&document.body.removeChild(i),a.convertToBlob({type:`image/${e}`,quality:n})},ZB=async(t,{format:e="png",quality:n=1,dimension:r=void 0}={})=>{if(!_f)try{_f=await Wk(()=>import(`${q0}/pdf.min.mjs`),[]),_f.GlobalWorkerOptions.workerSrc=`${q0}/pdf.worker.min.mjs`}catch{throw new Error("Failed to load PDF.js library")}const i=URL.createObjectURL(t),s=new OffscreenCanvas(512,512),o=s.getContext("2d");try{const c=await(await _f.getDocument({url:i,isEvalSupported:!1,disableAutoFetch:!0}).promise).getPage(1),u=c.getViewport({scale:1}),{width:d,height:f}=u,h=KC(s,d,f,r);await c.render({canvasContext:o,viewport:h===1?u:c.getViewport({scale:h})}).promise,URL.revokeObjectURL(i)}catch{throw new Error("Failed to render PDF")}return s.convertToBlob({type:`image/${e}`,quality:n})},XB=t=>{if(!tb(t))return!1;const{origin:e,pathname:n,searchParams:r}=new URL(t);return!!((e==="https://www.youtube.com"||e==="https://www.youtube-nocookie.com")&&(n==="/watch"&&r.has("v")||n==="/playlist"&&r.has("list")||n.startsWith("/embed/"))||e==="https://youtu.be"&&n)},QB=t=>{const e="https://www.youtube-nocookie.com",{pathname:n,search:r,searchParams:i}=new URL(t);if(n==="/watch"){const s=new URLSearchParams(i);let o=`${e}/embed/${s.get("v")}`;return s.get("list")&&(s.delete("v"),s.set("listType","playlist"),o+=`?${s.toString()}`),o}return n==="/playlist"?`${e}/embed/videoseries${r}`:n.startsWith("/embed/")?`${e}${n}${r}`:`${e}/embed${n}${r}`},JC=["image","video","audio"],eq=[...JC,"document","other"],Cv={image:/\.(?:avif|bmp|gif|ico|jpe?g|png|svg|tiff?|webp)$/i,video:/\.(?:avi|mp4|mpeg|ogv|ts|webm|3gp|3g2)$/i,audio:/\.(?:aac|midi?|mp3|opus|wav|weba)$/i,document:/\.(?:csv|docx?|odp|ods|odt|pdf|pptx?|rtf|xslx?)$/i},en=st([]),hi=st([]),Z_=ur([hi],([t],e)=>{e(t.find(({collectionName:n})=>!n))}),ni=st(),rd=st([]),uo=st(),Xo=st(!1),Ho=st(),ws=st({folder:void 0,files:[]}),Av=st(),zf=st(),ng=t=>JC.includes(t),ZC=t=>{const e=Jo.getType(t.path);return ng(t.kind)||e==="application/pdf"||!!e&&Nu(e)},XC=async t=>{let e="";if(typeof t=="string")if(t.startsWith("blob:"))try{e=(await(await fetch(t)).blob()).type}catch{}else e=Jo.getType(t)??"";else t instanceof Blob&&(e=t.type);if(!e)return;const[n,r]=e.split("/");if(ng(n)&&!r.startsWith("x-"))return n},tq=t=>{const e=Jo.getType(t.path);return!!e&&Nu(e)},X_=t=>Object.entries(Cv).find(([,e])=>e.test(t))?.[0]??"other",el=async t=>{const{file:e,blobURL:n,name:r}=t;if(n)return fetch(n).then(s=>s.blob());let i;if(e)i=e;else{const s=await ne(In)?.fetchBlob?.(t);if(!s)throw new Error("Failed to retrieve blob");i=new Blob([s],{type:Jo.getType(r)??s.type})}return t.blobURL=URL.createObjectURL(i),i},Q_=async t=>(t.blobURL||await el(t),t.blobURL);let yf;const QC=async t=>{const e=t.name.endsWith(".pdf");if(!(["image","video"].includes(t.kind)||e))return;if(yf===void 0){const{databaseName:r}=ne(In)?.repository??{};yf=r?new jo(r,"asset-thumbnails"):null}let n=await yf?.get(t.sha);if(!n){const r=await el(t),i={format:"webp",quality:.85,dimension:512};n=e?await ZB(r,i):await YC(r,i),await yf?.set(t.sha,n)}return URL.createObjectURL(n)},eA=(t,{matchSubFolders:e=!1}={})=>{const{filename:n}=Ln(t);return n.startsWith("+")?[]:ne(hi).filter(({internalPath:r,entryRelative:i})=>i?t.startsWith(`${r}/`):new RegExp(`^${r.replace(/{{.+?}}/g,".+?")}${r&&e?"\\b":"$"}`).test(Ln(t).dirname??"")).sort((r,i)=>i.internalPath.localeCompare(r.internalPath??"")??0)},ey=t=>eA(t.path,{matchSubFolders:!0}).map(({collectionName:e})=>e?Fi(e):void 0).filter(e=>!!e),ty=(t,{entry:e,collection:n}={})=>{const r=decodeURI(t);if(!/^[/@]/.test(r)){if(!e)return;const{locales:p}=e,g=({_i18n:v})=>{const{defaultLocale:_}=v,b=_ in p?_:Object.keys(p)[0],{path:y,content:x}=p[b];if(!y||!x)return;const{entryFolder:k}=y.match(/(?<entryFolder>.+?)(?:\/[^/]+)?$/)?.groups??{},S=Ev(`${k}/${r}`);return ne(en).find(C=>C.path===S)};return co(e).map(v=>{const _=Zo(v,e);return _.length?_.map(g):g(v)}).flat(1).filter(Boolean)[0]??ne(en).find(v=>v.path===r)}const i=ne(en).find(p=>p.path===Fn(r));if(i)return i;const{dirname:s="",basename:o}=Ln(r);let{collectionName:a,internalPath:c,publicPath:u}=s?ne(hi).findLast(p=>s.match(`^${p.publicPath.replace(/{{.+?}}/g,".+?")}\\b`))??{}:ne(hi)[0];if(c===void 0)return;if(!a){const p=r.replace(new RegExp(`^${ln(u||s)}`),c),g=ne(en).find(m=>m.path===p);if(g)return g}if(e&&!n&&([n]=co(e)),e&&n&&/{{.+?}}/.test(c)){const{content:p,path:g}=e.locales[n._i18n.defaultLocale];c=ys(c,{type:"media_folder",collection:n,content:Sa(p),currentSlug:e.slug,entryFilePath:g})}const d=n?._assetFolder?.publicPath,f=d?Fn(s.replace(new RegExp(`^${ln(d)}`),"")):"",h=jh([c,f,o]);return ne(en).find(p=>p.path===h)},rg=(t,{pathOnly:e=!1,allowSpecial:n=!1,entry:r=void 0}={})=>{const i=ne(hi),{publicPath:s,entryRelative:o}=i.find(({collectionName:d})=>ey(t).some(f=>f.name===d))??i.find(({collectionName:d})=>!d)??{};if(o)return e&&r&&Ln(t.path).dirname===Ln(Object.values(r.locales)[0].path).dirname?t.name:void 0;const a=t.path.replace(t.folder,s==="/"?"":s??""),c=encodeURI(a);return!c.startsWith("/")&&!n?void 0:e?c:`${ne(wt)?._baseURL}${c}`},uc=async(t,e,{thumbnail:n=!1}={})=>{if(!t)return;if(/^(?:https?|data|blob):/.test(t))return t;const r=ty(t,{entry:e});if(r)return(n?await QC(r):await Q_(r))??rg(r)},Uh={publicURL:void 0,repoBlobURL:void 0,dimensions:void 0,duration:void 0,usedEntries:[]},ig=async t=>{const{kind:e,path:n}=t,{blobBaseURL:r}=ne(In)?.repository??{},i=await Q_(t),s=rg(t),o=i??s;let a,c;return["image","video","audio"].includes(e)&&i&&({dimensions:a,duration:c}=await YB(i,e)),{publicURL:s,repoBlobURL:r?`${r}/${n}`:void 0,dimensions:a,duration:c,usedEntries:o?await Tv(o):[]}},nq=t=>ne(en).filter(e=>e.folder===t),ny=t=>ne(en).filter(e=>Ln(e.path).dirname===t);ni.subscribe(()=>{uo.set(void 0)});const Vn=st(),fm=new Map,rq=t=>{const{folder:e,fields:n,thumbnail:r}=t;return e?typeof r=="string"?[r]:Array.isArray(r)?r:n?.length?n.filter(({widget:i="string"})=>["image","file"].includes(i)).map(({name:i})=>i):[]:[]},Fi=t=>{const e=fm.get(t);if(e)return e;const n=ne(wt)?.collections.find(d=>d.name===t),r=typeof n?.folder=="string",i=!r&&Array.isArray(n?.files);if(!r&&!i){fm.set(t,void 0);return}const{folder:s,files:o}=n;r?n.folder=Fn(s):o.forEach(d=>{d.file=Fn(d.file)});const a=Nh(n),c={...n,_i18n:a,_assetFolder:ne(hi).find(({collectionName:d})=>d===t)},u=r?{...c,_type:"entry",_file:tw({rawCollection:n,_i18n:a}),_thumbnailFieldNames:rq(n)}:{...c,_type:"file",_fileMap:o?.length?Object.fromEntries(o.map(d=>{const f=Nh(n,d),h=tw({rawCollection:n,file:d,_i18n:f});return[d.name,{...d,_file:h,_i18n:f}]})):{}};return fm.set(t,u),u},dc=st(!1),Ta=st(),ry=st([]),ii=st([]),iy=st([]),tA=t=>ne(ry).filter(({collectionName:e,filePathMap:n})=>n?Object.values(n).includes(t):Fi(e)?._file?.fullPathRegEx?.test(t)).sort((e,n)=>n.folderPath?.localeCompare(e.folderPath??"")??0),iq={DEV:!1},{DEV:sq}=iq,oq=void 0,wt=st(),sy=st(),Pv=st(),H0=async({ignoreError:t=!1}={})=>{const{href:e=window.location.pathname==="/admin"?"/admin/config.yml":"./config.yml",type:n="application/yaml"}=document.querySelector('link[rel="cms-config-url"]')??{};let r;try{r=await fetch(e)}catch(o){throw new Error(ne(le)("config.error.fetch_failed"),{cause:o})}const{ok:i,status:s}=r;if(!i){if(t)return{};throw new Error(ne(le)("config.error.fetch_failed"),{cause:new Error(ne(le)("config.error.fetch_failed_not_ok",{values:{status:s}}))})}try{return n==="application/json"?r.json():Od.parse(await r.text(),{merge:!0})}catch(o){throw new Error(ne(le)("config.error.parse_failed"),{cause:o})}},aq=t=>{if(!Jn(t))throw new Error(ne(le)("config.error.parse_failed"),{cause:new Error(ne(le)("config.error.parse_failed_invalid_object"))});if(!t.collections?.length)throw new Error(ne(le)("config.error.no_collection"));if(!t.backend?.name)throw new Error(ne(le)("config.error.no_backend"));if(!(t.backend.name in ag))throw new Error(ne(le)("config.error.unsupported_backend",{values:{name:t.backend.name}}));if(typeof t.backend.repo!="string"||!/(.+)\/([^/]+)$/.test(t.backend.repo))throw new Error(ne(le)("config.error.no_repository"));if(t.backend.auth_type==="implicit")throw new Error(ne(le)("config.error.oauth_implicit_flow"));if(t.backend.auth_type==="pkce"&&!t.backend.app_id)throw new Error(ne(le)("config.error.oauth_no_app_id"));if(typeof t.media_folder!="string")throw new Error(ne(le)("config.error.no_media_folder"))},lq=async(t={})=>{wt.set(void 0),Pv.set(void 0);try{if(!window.isSecureContext)throw new Error(ne(le)("config.error.no_secure_context"));if(t&&!Jn(t))throw new Error(ne(le)("config.error.parse_failed"));let e;t?.load_config_file===!1?e=t:Object.entries(t).length?e=mk(await H0({ignoreError:!0}),t):e=await H0(),aq(e);const n=e;n._siteURL=n.site_url?.trim()||(sq?oq:window.location.origin),n._baseURL=tb(n._siteURL)?new URL(n._siteURL).origin:"",n.collections.forEach(r=>{(r.folder==="."||r.folder==="/")&&(r.folder="")}),wt.set(n),sy.set(await Pa(Od.stringify(n)))}catch(e){Pv.set({message:e.name==="Error"?e.message:ne(le)("config.error.unexpected")}),console.error(e,e.cause)}};wt.subscribe(t=>{if(ne(Tt).devModeEnabled&&console.info("siteConfig",t),!t)return;const{media_folder:e,public_folder:n,collections:r}=t,i=[...r.filter(({folder:d,hide:f,divider:h})=>typeof d=="string"&&!f&&!h).map(d=>{const{name:f,folder:h}=d,p=Fn(h),{i18nEnabled:g,structure:m,allLocales:v}=Nh(d),_=g&&m==="multiple_folders_i18n_root";return{collectionName:f,folderPath:p,folderPathMap:Object.fromEntries(v.map(b=>[b,_?`${b}/${p}`:p]))}}).sort((d,f)=>ui(d.folderPath??"",f.folderPath??"")),...r.filter(({files:d,hide:f,divider:h})=>Array.isArray(d)&&!f&&!h).map(d=>{const{name:f,files:h}=d;return(h??[]).map(p=>{const g=Fn(p.file);return{collectionName:f,fileName:p.name,filePathMap:g.includes("{{locale}}")?Object.fromEntries(Nh(d,p).allLocales.map(m=>[m,g.replace("{{locale}}",m)])):{_default:g}}})}).flat(1).sort((d,f)=>ui(Object.values(d.filePathMap)[0],Object.values(f.filePathMap)[0]))],s=Fn(e).replace(/^\.$/,""),o=n?`/${Fn(n)}`.replace(/^\/@/,"@"):`/${s}`,a={collectionName:void 0,internalPath:s,publicPath:o,entryRelative:!1},c=r.filter(({hide:d,divider:f,media_folder:h,path:p})=>(!d||!!h||!!p)&&!f).map(d=>{const{name:f,folder:h,path:p,public_folder:g}=d;let{media_folder:m}=d;if(m===void 0){if(p===void 0)return null;m=""}m=m.replace("{{media_folder}}",s);const v=!(m.startsWith("/")||m.startsWith(s));let _=Fn((g??m).replace("{{public_folder}}",o).trim());return _=_===""||_.match(/^[.@]/)?_:`/${_}`,{collectionName:f,internalPath:Fn(v?h??"":m),publicPath:_,entryRelative:v}}).filter(Boolean).sort((d,f)=>ui(d.internalPath,f.internalPath)),u=[a,...c];ry.set(i),hi.set(u),ne(Tt).devModeEnabled&&(console.info("allEntryFolders",i),console.info("allAssetFolders",u))});const gi=st();gi.subscribe(t=>{(async()=>{try{t?await ti.set("sveltia-cms.user",t):t===null&&await ti.delete("sveltia-cms.user")}catch{}})()});const cq={create:"Create {{collection}} “{{slug}}”",update:"Update {{collection}} “{{slug}}”",delete:"Delete {{collection}} “{{slug}}”",uploadMedia:"Upload “{{path}}”",deleteMedia:"Delete “{{path}}”",openAuthoring:"{{message}}"},nA=(t,{commitType:e="update",collection:n,skipCI:r=void 0})=>{const{backend:{commit_messages:i={},automatic_deployments:s}}=ne(wt),{login:o="",name:a=""}=ne(gi),[c=""]=t.map(p=>p.slug).filter(Boolean),[u,...d]=t.map(({path:p})=>p),f=n?.label_singular||n?.label||n?.name||"";let h=i[e]||cq[e]||"";return["create","update","delete"].includes(e)&&(h=h.replaceAll("{{slug}}",c).replaceAll("{{collection}}",f).replaceAll("{{path}}",u).replaceAll("{{author-login}}",o).replaceAll("{{author-name}}",a)),["uploadMedia","deleteMedia"].includes(e)&&(h=h.replaceAll("{{path}}",u).replaceAll("{{author-login}}",o).replaceAll("{{author-name}}",a),d.length&&(h+=` +${d.length}`)),["openAuthoring"].includes(e)&&(h=h.replaceAll("{{message}}",e).replaceAll("{{author-login}}",o).replaceAll("{{author-name}}",a)),!["delete","deleteMedia"].includes(e)&&(r===void 0?s===!1:r===!0)&&(h=`[skip ci] ${h}`),h},rA=t=>t.map(e=>{const{file:n,path:r,sha:i,size:s,text:o=void 0,meta:a={},folder:{internalPath:c}}=e;return{file:n,blobURL:void 0,path:r,name:Ln(r).basename,sha:i,size:s,kind:X_(r),text:o,folder:c,...a}}),iA=t=>t.length===1&&t[0].widget==="list"&&t[0].root===!0,uq=({collectionName:t,fileName:e,keyPath:n,valueMap:r,locale:i,summaryTemplate:s,hasSingleSubField:o,index:a})=>{if(!s){if(o)return r[`${n}.${a}`];const c=new RegExp(`^${ln(n)}\\.${a}[\\b\\.]`),u=Object.fromEntries(Object.entries(r).filter(([d])=>c.test(d)).map(([d,f])=>[d.replace(c,""),f]));return u.title||u.name||Object.values(u).find(d=>typeof d=="string"&&!!d)||""}return s.replaceAll(/{{(.+?)}}/g,(c,u)=>{const[d,...f]=u.split(/\s*\|\s*/),h=`${n}.${a}.${d.replace(/^fields\./,"")}`;return o&&!_n({collectionName:t,fileName:e,valueMap:r,keyPath:h})?"":tg({collectionName:t,fileName:e,valueMap:r,keyPath:o?`${n}.${a}`:h,locale:i,transformations:f})})};function dq(t,e){let n=t.slice(0,e).split(/\r\n|\n|\r/g);return[n.length,n.pop().length+1]}function fq(t,e,n){let r=t.split(/\r\n|\n|\r/g),i="",s=(Math.log10(e+1)|0)+1;for(let o=e-1;o<=e+1;o++){let a=r[o-1];a&&(i+=o.toString().padEnd(s," "),i+=": ",i+=a,i+=`
394
394
  `,o===e&&(i+=" ".repeat(s+n+2),i+=`^
395
- `))}return i}class Pt extends Error{line;column;codeblock;constructor(e,n){const[r,i]=d8(n.toml,n.ptr),s=f8(n.toml,r,i);super(`Invalid TOML document: ${e}
395
+ `))}return i}class Pt extends Error{line;column;codeblock;constructor(e,n){const[r,i]=dq(n.toml,n.ptr),s=fq(n.toml,r,i);super(`Invalid TOML document: ${e}
396
396
 
397
397
  ${s}`,n),this.line=r,this.column=i,this.codeblock=s}}function Bh(t,e=0,n=t.length){let r=t.indexOf(`
398
398
  `,e);return t[r-1]==="\r"&&r--,r<=n?r:-1}function oy(t,e){for(let n=e;n<t.length;n++){let r=t[n];if(r===`
@@ -401,27 +401,27 @@ ${s}`,n),this.line=r,this.column=i,this.codeblock=s}}function Bh(t,e=0,n=t.lengt
401
401
  `||i==="\r"&&t[e+1]===`
402
402
  `);)e++;return r||i!=="#"?e:so(t,oy(t,e),n)}function V0(t,e,n,r,i=!1){if(!r)return e=Bh(t,e),e<0?t.length:e;for(let s=e;s<t.length;s++){let o=t[s];if(o==="#")s=Bh(t,s);else{if(o===n)return s+1;if(o===r)return s;if(i&&(o===`
403
403
  `||o==="\r"&&t[s+1]===`
404
- `))return s}}throw new Pt("cannot find end of structure",{toml:t,ptr:e})}function sA(t,e){let n=t[e],r=n===t[e+1]&&t[e+1]===t[e+2]?t.slice(e,e+3):n;e+=r.length-1;do e=t.indexOf(r,++e);while(e>-1&&n!=="'"&&t[e-1]==="\\"&&t[e-2]!=="\\");return e>-1&&(e+=r.length,r.length>1&&(t[e]===n&&e++,t[e]===n&&e++)),e}let h8=/^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}:\d{2}(?:\.\d+)?)?(Z|[-+]\d{2}:\d{2})?$/i;class va extends Date{#t=!1;#n=!1;#e=null;constructor(e){let n=!0,r=!0,i="Z";if(typeof e=="string"){let s=e.match(h8);s?(s[1]||(n=!1,e=`0000-01-01T${e}`),r=!!s[2],s[2]&&+s[2]>23?e="":(i=s[3]||null,e=e.toUpperCase(),!i&&r&&(e+="Z"))):e=""}super(e),isNaN(this.getTime())||(this.#t=n,this.#n=r,this.#e=i)}isDateTime(){return this.#t&&this.#n}isLocal(){return!this.#t||!this.#n||!this.#e}isDate(){return this.#t&&!this.#n}isTime(){return this.#n&&!this.#t}isValid(){return this.#t||this.#n}toISOString(){let e=super.toISOString();if(this.isDate())return e.slice(0,10);if(this.isTime())return e.slice(11,23);if(this.#e===null)return e.slice(0,-1);if(this.#e==="Z")return e;let n=+this.#e.slice(1,3)*60+ +this.#e.slice(4,6);return n=this.#e[0]==="-"?n:-n,new Date(this.getTime()-n*6e4).toISOString().slice(0,-1)+this.#e}static wrapAsOffsetDateTime(e,n="Z"){let r=new va(e);return r.#e=n,r}static wrapAsLocalDateTime(e){let n=new va(e);return n.#e=null,n}static wrapAsLocalDate(e){let n=new va(e);return n.#n=!1,n.#e=null,n}static wrapAsLocalTime(e){let n=new va(e);return n.#t=!1,n.#e=null,n}}let p8=/^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/,g8=/^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/,m8=/^[+-]?0[0-9_]/,v8=/^[0-9a-f]{4,8}$/i,W0={b:"\b",t:" ",n:`
404
+ `))return s}}throw new Pt("cannot find end of structure",{toml:t,ptr:e})}function sA(t,e){let n=t[e],r=n===t[e+1]&&t[e+1]===t[e+2]?t.slice(e,e+3):n;e+=r.length-1;do e=t.indexOf(r,++e);while(e>-1&&n!=="'"&&t[e-1]==="\\"&&t[e-2]!=="\\");return e>-1&&(e+=r.length,r.length>1&&(t[e]===n&&e++,t[e]===n&&e++)),e}let hq=/^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}:\d{2}(?:\.\d+)?)?(Z|[-+]\d{2}:\d{2})?$/i;class va extends Date{#t=!1;#n=!1;#e=null;constructor(e){let n=!0,r=!0,i="Z";if(typeof e=="string"){let s=e.match(hq);s?(s[1]||(n=!1,e=`0000-01-01T${e}`),r=!!s[2],s[2]&&+s[2]>23?e="":(i=s[3]||null,e=e.toUpperCase(),!i&&r&&(e+="Z"))):e=""}super(e),isNaN(this.getTime())||(this.#t=n,this.#n=r,this.#e=i)}isDateTime(){return this.#t&&this.#n}isLocal(){return!this.#t||!this.#n||!this.#e}isDate(){return this.#t&&!this.#n}isTime(){return this.#n&&!this.#t}isValid(){return this.#t||this.#n}toISOString(){let e=super.toISOString();if(this.isDate())return e.slice(0,10);if(this.isTime())return e.slice(11,23);if(this.#e===null)return e.slice(0,-1);if(this.#e==="Z")return e;let n=+this.#e.slice(1,3)*60+ +this.#e.slice(4,6);return n=this.#e[0]==="-"?n:-n,new Date(this.getTime()-n*6e4).toISOString().slice(0,-1)+this.#e}static wrapAsOffsetDateTime(e,n="Z"){let r=new va(e);return r.#e=n,r}static wrapAsLocalDateTime(e){let n=new va(e);return n.#e=null,n}static wrapAsLocalDate(e){let n=new va(e);return n.#n=!1,n.#e=null,n}static wrapAsLocalTime(e){let n=new va(e);return n.#t=!1,n.#e=null,n}}let pq=/^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/,gq=/^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/,mq=/^[+-]?0[0-9_]/,vq=/^[0-9a-f]{4,8}$/i,W0={b:"\b",t:" ",n:`
405
405
  `,f:"\f",r:"\r",'"':'"',"\\":"\\"};function oA(t,e=0,n=t.length){let r=t[e]==="'",i=t[e++]===t[e]&&t[e]===t[e+1];i&&(n-=2,t[e+=2]==="\r"&&e++,t[e]===`
406
406
  `&&e++);let s=0,o,a="",c=e;for(;e<n-1;){let u=t[e++];if(u===`
407
407
  `||u==="\r"&&t[e]===`
408
- `){if(!i)throw new Pt("newlines are not allowed in strings",{toml:t,ptr:e-1})}else if(u<" "&&u!==" "||u==="")throw new Pt("control characters are not allowed in strings",{toml:t,ptr:e-1});if(o){if(o=!1,u==="u"||u==="U"){let d=t.slice(e,e+=u==="u"?4:8);if(!v8.test(d))throw new Pt("invalid unicode escape",{toml:t,ptr:s});try{a+=String.fromCodePoint(parseInt(d,16))}catch{throw new Pt("invalid unicode escape",{toml:t,ptr:s})}}else if(i&&(u===`
408
+ `){if(!i)throw new Pt("newlines are not allowed in strings",{toml:t,ptr:e-1})}else if(u<" "&&u!==" "||u==="")throw new Pt("control characters are not allowed in strings",{toml:t,ptr:e-1});if(o){if(o=!1,u==="u"||u==="U"){let d=t.slice(e,e+=u==="u"?4:8);if(!vq.test(d))throw new Pt("invalid unicode escape",{toml:t,ptr:s});try{a+=String.fromCodePoint(parseInt(d,16))}catch{throw new Pt("invalid unicode escape",{toml:t,ptr:s})}}else if(i&&(u===`
409
409
  `||u===" "||u===" "||u==="\r")){if(e=so(t,e-1,!0),t[e]!==`
410
- `&&t[e]!=="\r")throw new Pt("invalid escape: only line-ending whitespace may be escaped",{toml:t,ptr:s});e=so(t,e)}else if(u in W0)a+=W0[u];else throw new Pt("unrecognized escape sequence",{toml:t,ptr:s});c=e}else!r&&u==="\\"&&(s=e-1,o=!0,a+=t.slice(c,s))}return a+t.slice(c,n-1)}function b8(t,e,n){if(t==="true")return!0;if(t==="false")return!1;if(t==="-inf")return-1/0;if(t==="inf"||t==="+inf")return 1/0;if(t==="nan"||t==="+nan"||t==="-nan")return NaN;if(t==="-0")return 0;let r;if((r=p8.test(t))||g8.test(t)){if(m8.test(t))throw new Pt("leading zeroes are not allowed",{toml:e,ptr:n});let s=+t.replace(/_/g,"");if(isNaN(s))throw new Pt("invalid number",{toml:e,ptr:n});if(r&&!Number.isSafeInteger(s))throw new Pt("integer value cannot be represented losslessly",{toml:e,ptr:n});return s}let i=new va(t);if(!i.isValid())throw new Pt("invalid value",{toml:e,ptr:n});return i}function _8(t,e,n,r){let i=t.slice(e,n),s=i.indexOf("#");s>-1&&(oy(t,s),i=i.slice(0,s));let o=i.trimEnd();if(!r){let a=i.indexOf(`
411
- `,o.length);if(a>-1)throw new Pt("newlines are not allowed in inline tables",{toml:t,ptr:e+a})}return[o,s]}function ay(t,e,n,r){if(r===0)throw new Pt("document contains excessively nested structures. aborting.",{toml:t,ptr:e});let i=t[e];if(i==="["||i==="{"){let[a,c]=i==="["?x8(t,e,r):w8(t,e,r),u=V0(t,c,",",n);if(n==="}"){let d=Bh(t,c,u);if(d>-1)throw new Pt("newlines are not allowed in inline tables",{toml:t,ptr:d})}return[a,u]}let s;if(i==='"'||i==="'"){s=sA(t,e);let a=oA(t,e,s);if(n){if(s=so(t,s,n!=="]"),t[s]&&t[s]!==","&&t[s]!==n&&t[s]!==`
412
- `&&t[s]!=="\r")throw new Pt("unexpected character encountered",{toml:t,ptr:s});s+=+(t[s]===",")}return[a,s]}s=V0(t,e,",",n);let o=_8(t,e,s-+(t[s-1]===","),n==="]");if(!o[0])throw new Pt("incomplete key-value declaration: no value specified",{toml:t,ptr:e});return n&&o[1]>-1&&(s=so(t,e+o[1]),s+=+(t[s]===",")),[b8(o[0],t,e),s]}let y8=/^[a-zA-Z0-9-_]+[ \t]*$/;function Ov(t,e,n="="){let r=e-1,i=[],s=t.indexOf(n,e);if(s<0)throw new Pt("incomplete key-value: cannot find end of key",{toml:t,ptr:e});do{let o=t[e=++r];if(o!==" "&&o!==" ")if(o==='"'||o==="'"){if(o===t[e+1]&&o===t[e+2])throw new Pt("multiline strings are not allowed in keys",{toml:t,ptr:e});let a=sA(t,e);if(a<0)throw new Pt("unfinished string encountered",{toml:t,ptr:e});r=t.indexOf(".",a);let c=t.slice(a,r<0||r>s?s:r),u=Bh(c);if(u>-1)throw new Pt("newlines are not allowed in keys",{toml:t,ptr:e+r+u});if(c.trimStart())throw new Pt("found extra tokens after the string part",{toml:t,ptr:a});if(s<a&&(s=t.indexOf(n,a),s<0))throw new Pt("incomplete key-value: cannot find end of key",{toml:t,ptr:e});i.push(oA(t,e,a))}else{r=t.indexOf(".",e);let a=t.slice(e,r<0||r>s?s:r);if(!y8.test(a))throw new Pt("only letter, numbers, dashes and underscores are allowed in keys",{toml:t,ptr:e});i.push(a.trimEnd())}}while(r+1&&r<s);return[i,so(t,s+1,!0,!0)]}function w8(t,e,n){let r={},i=new Set,s,o=0;for(e++;(s=t[e++])!=="}"&&s;){if(s===`
413
- `)throw new Pt("newlines are not allowed in inline tables",{toml:t,ptr:e-1});if(s==="#")throw new Pt("inline tables cannot contain comments",{toml:t,ptr:e-1});if(s===",")throw new Pt("expected key-value, found comma",{toml:t,ptr:e-1});if(s!==" "&&s!==" "){let a,c=r,u=!1,[d,f]=Ov(t,e-1);for(let g=0;g<d.length;g++){if(g&&(c=u?c[a]:c[a]={}),a=d[g],(u=Object.hasOwn(c,a))&&(typeof c[a]!="object"||i.has(c[a])))throw new Pt("trying to redefine an already defined value",{toml:t,ptr:e});!u&&a==="__proto__"&&Object.defineProperty(c,a,{enumerable:!0,configurable:!0,writable:!0})}if(u)throw new Pt("trying to redefine an already defined value",{toml:t,ptr:e});let[h,p]=ay(t,f,"}",n-1);i.add(h),c[a]=h,e=p,o=t[e-1]===","?e-1:0}}if(o)throw new Pt("trailing commas are not allowed in inline tables",{toml:t,ptr:o});if(!s)throw new Pt("unfinished table encountered",{toml:t,ptr:e});return[r,e]}function x8(t,e,n){let r=[],i;for(e++;(i=t[e++])!=="]"&&i;){if(i===",")throw new Pt("expected value, found comma",{toml:t,ptr:e-1});if(i==="#")e=oy(t,e);else if(i!==" "&&i!==" "&&i!==`
414
- `&&i!=="\r"){let s=ay(t,e-1,"]",n-1);r.push(s[0]),e=s[1]}}if(!i)throw new Pt("unfinished array encountered",{toml:t,ptr:e});return[r,e]}function G0(t,e,n,r){let i=e,s=n,o,a=!1,c;for(let u=0;u<t.length;u++){if(u){if(i=a?i[o]:i[o]={},s=(c=s[o]).c,r===0&&(c.t===1||c.t===2))return null;if(c.t===2){let d=i.length-1;i=i[d],s=s[d].c}}if(o=t[u],(a=Object.hasOwn(i,o))&&s[o]?.t===0&&s[o]?.d)return null;a||(o==="__proto__"&&(Object.defineProperty(i,o,{enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(s,o,{enumerable:!0,configurable:!0,writable:!0})),s[o]={t:u<t.length-1&&r===2?3:r,d:!1,i:0,c:{}})}if(c=s[o],c.t!==r&&!(r===1&&c.t===3)||(r===2&&(c.d||(c.d=!0,i[o]=[]),i[o].push(i={}),c.c[c.i++]=c={t:1,d:!1,i:0,c:{}}),c.d))return null;if(c.d=!0,r===1)i=a?i[o]:i[o]={};else if(r===0&&a)return null;return[o,i,c.c]}function k8(t,e){let n=e?.maxDepth??1e3,r={},i={},s=r,o=i;for(let a=so(t,0);a<t.length;){if(t[a]==="["){let c=t[++a]==="[",u=Ov(t,a+=+c,"]");if(c){if(t[u[1]-1]!=="]")throw new Pt("expected end of table declaration",{toml:t,ptr:u[1]-1});u[1]++}let d=G0(u[0],r,i,c?2:1);if(!d)throw new Pt("trying to redefine an already defined table or value",{toml:t,ptr:a});o=d[2],s=d[1],a=u[1]}else{let c=Ov(t,a),u=G0(c[0],s,o,0);if(!u)throw new Pt("trying to redefine an already defined table or value",{toml:t,ptr:a});let d=ay(t,c[1],void 0,n);u[1][u[0]]=d[0],a=d[1]}if(a=so(t,a,!0),t[a]&&t[a]!==`
415
- `&&t[a]!=="\r")throw new Pt("each key-value declaration must be followed by an end-of-line",{toml:t,ptr:a});a=so(t,a)}return r}let aA=/^[a-z0-9-_]+$/i;function Md(t){let e=typeof t;if(e==="object"){if(Array.isArray(t))return"array";if(t instanceof Date)return"date"}return e}function S8(t){for(let e=0;e<t.length;e++)if(Md(t[e])!=="object")return!1;return t.length!=0}function ly(t){return JSON.stringify(t).replace(/\x7f/g,"\\u007f")}function cy(t,e,n){if(n===0)throw new Error("Could not stringify the object: maximum object depth exceeded");if(e==="number")return isNaN(t)?"nan":t===1/0?"inf":t===-1/0?"-inf":t.toString();if(e==="bigint"||e==="boolean")return t.toString();if(e==="string")return ly(t);if(e==="date"){if(isNaN(t.getTime()))throw new TypeError("cannot serialize invalid date");return t.toISOString()}if(e==="object")return E8(t,n);if(e==="array")return T8(t,n)}function E8(t,e){let n=Object.keys(t);if(n.length===0)return"{}";let r="{ ";for(let i=0;i<n.length;i++){let s=n[i];i&&(r+=", "),r+=aA.test(s)?s:ly(s),r+=" = ",r+=cy(t[s],Md(t[s]),e-1)}return r+" }"}function T8(t,e){if(t.length===0)return"[]";let n="[ ";for(let r=0;r<t.length;r++){if(r&&(n+=", "),t[r]===null||t[r]===void 0)throw new TypeError("arrays cannot contain null or undefined values");n+=cy(t[r],Md(t[r]),e-1)}return n+" ]"}function C8(t,e,n){if(n===0)throw new Error("Could not stringify the object: maximum object depth exceeded");let r="";for(let i=0;i<t.length;i++)r+=`[[${e}]]
410
+ `&&t[e]!=="\r")throw new Pt("invalid escape: only line-ending whitespace may be escaped",{toml:t,ptr:s});e=so(t,e)}else if(u in W0)a+=W0[u];else throw new Pt("unrecognized escape sequence",{toml:t,ptr:s});c=e}else!r&&u==="\\"&&(s=e-1,o=!0,a+=t.slice(c,s))}return a+t.slice(c,n-1)}function bq(t,e,n){if(t==="true")return!0;if(t==="false")return!1;if(t==="-inf")return-1/0;if(t==="inf"||t==="+inf")return 1/0;if(t==="nan"||t==="+nan"||t==="-nan")return NaN;if(t==="-0")return 0;let r;if((r=pq.test(t))||gq.test(t)){if(mq.test(t))throw new Pt("leading zeroes are not allowed",{toml:e,ptr:n});let s=+t.replace(/_/g,"");if(isNaN(s))throw new Pt("invalid number",{toml:e,ptr:n});if(r&&!Number.isSafeInteger(s))throw new Pt("integer value cannot be represented losslessly",{toml:e,ptr:n});return s}let i=new va(t);if(!i.isValid())throw new Pt("invalid value",{toml:e,ptr:n});return i}function _q(t,e,n,r){let i=t.slice(e,n),s=i.indexOf("#");s>-1&&(oy(t,s),i=i.slice(0,s));let o=i.trimEnd();if(!r){let a=i.indexOf(`
411
+ `,o.length);if(a>-1)throw new Pt("newlines are not allowed in inline tables",{toml:t,ptr:e+a})}return[o,s]}function ay(t,e,n,r){if(r===0)throw new Pt("document contains excessively nested structures. aborting.",{toml:t,ptr:e});let i=t[e];if(i==="["||i==="{"){let[a,c]=i==="["?xq(t,e,r):wq(t,e,r),u=V0(t,c,",",n);if(n==="}"){let d=Bh(t,c,u);if(d>-1)throw new Pt("newlines are not allowed in inline tables",{toml:t,ptr:d})}return[a,u]}let s;if(i==='"'||i==="'"){s=sA(t,e);let a=oA(t,e,s);if(n){if(s=so(t,s,n!=="]"),t[s]&&t[s]!==","&&t[s]!==n&&t[s]!==`
412
+ `&&t[s]!=="\r")throw new Pt("unexpected character encountered",{toml:t,ptr:s});s+=+(t[s]===",")}return[a,s]}s=V0(t,e,",",n);let o=_q(t,e,s-+(t[s-1]===","),n==="]");if(!o[0])throw new Pt("incomplete key-value declaration: no value specified",{toml:t,ptr:e});return n&&o[1]>-1&&(s=so(t,e+o[1]),s+=+(t[s]===",")),[bq(o[0],t,e),s]}let yq=/^[a-zA-Z0-9-_]+[ \t]*$/;function Ov(t,e,n="="){let r=e-1,i=[],s=t.indexOf(n,e);if(s<0)throw new Pt("incomplete key-value: cannot find end of key",{toml:t,ptr:e});do{let o=t[e=++r];if(o!==" "&&o!==" ")if(o==='"'||o==="'"){if(o===t[e+1]&&o===t[e+2])throw new Pt("multiline strings are not allowed in keys",{toml:t,ptr:e});let a=sA(t,e);if(a<0)throw new Pt("unfinished string encountered",{toml:t,ptr:e});r=t.indexOf(".",a);let c=t.slice(a,r<0||r>s?s:r),u=Bh(c);if(u>-1)throw new Pt("newlines are not allowed in keys",{toml:t,ptr:e+r+u});if(c.trimStart())throw new Pt("found extra tokens after the string part",{toml:t,ptr:a});if(s<a&&(s=t.indexOf(n,a),s<0))throw new Pt("incomplete key-value: cannot find end of key",{toml:t,ptr:e});i.push(oA(t,e,a))}else{r=t.indexOf(".",e);let a=t.slice(e,r<0||r>s?s:r);if(!yq.test(a))throw new Pt("only letter, numbers, dashes and underscores are allowed in keys",{toml:t,ptr:e});i.push(a.trimEnd())}}while(r+1&&r<s);return[i,so(t,s+1,!0,!0)]}function wq(t,e,n){let r={},i=new Set,s,o=0;for(e++;(s=t[e++])!=="}"&&s;){if(s===`
413
+ `)throw new Pt("newlines are not allowed in inline tables",{toml:t,ptr:e-1});if(s==="#")throw new Pt("inline tables cannot contain comments",{toml:t,ptr:e-1});if(s===",")throw new Pt("expected key-value, found comma",{toml:t,ptr:e-1});if(s!==" "&&s!==" "){let a,c=r,u=!1,[d,f]=Ov(t,e-1);for(let g=0;g<d.length;g++){if(g&&(c=u?c[a]:c[a]={}),a=d[g],(u=Object.hasOwn(c,a))&&(typeof c[a]!="object"||i.has(c[a])))throw new Pt("trying to redefine an already defined value",{toml:t,ptr:e});!u&&a==="__proto__"&&Object.defineProperty(c,a,{enumerable:!0,configurable:!0,writable:!0})}if(u)throw new Pt("trying to redefine an already defined value",{toml:t,ptr:e});let[h,p]=ay(t,f,"}",n-1);i.add(h),c[a]=h,e=p,o=t[e-1]===","?e-1:0}}if(o)throw new Pt("trailing commas are not allowed in inline tables",{toml:t,ptr:o});if(!s)throw new Pt("unfinished table encountered",{toml:t,ptr:e});return[r,e]}function xq(t,e,n){let r=[],i;for(e++;(i=t[e++])!=="]"&&i;){if(i===",")throw new Pt("expected value, found comma",{toml:t,ptr:e-1});if(i==="#")e=oy(t,e);else if(i!==" "&&i!==" "&&i!==`
414
+ `&&i!=="\r"){let s=ay(t,e-1,"]",n-1);r.push(s[0]),e=s[1]}}if(!i)throw new Pt("unfinished array encountered",{toml:t,ptr:e});return[r,e]}function G0(t,e,n,r){let i=e,s=n,o,a=!1,c;for(let u=0;u<t.length;u++){if(u){if(i=a?i[o]:i[o]={},s=(c=s[o]).c,r===0&&(c.t===1||c.t===2))return null;if(c.t===2){let d=i.length-1;i=i[d],s=s[d].c}}if(o=t[u],(a=Object.hasOwn(i,o))&&s[o]?.t===0&&s[o]?.d)return null;a||(o==="__proto__"&&(Object.defineProperty(i,o,{enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(s,o,{enumerable:!0,configurable:!0,writable:!0})),s[o]={t:u<t.length-1&&r===2?3:r,d:!1,i:0,c:{}})}if(c=s[o],c.t!==r&&!(r===1&&c.t===3)||(r===2&&(c.d||(c.d=!0,i[o]=[]),i[o].push(i={}),c.c[c.i++]=c={t:1,d:!1,i:0,c:{}}),c.d))return null;if(c.d=!0,r===1)i=a?i[o]:i[o]={};else if(r===0&&a)return null;return[o,i,c.c]}function kq(t,e){let n=e?.maxDepth??1e3,r={},i={},s=r,o=i;for(let a=so(t,0);a<t.length;){if(t[a]==="["){let c=t[++a]==="[",u=Ov(t,a+=+c,"]");if(c){if(t[u[1]-1]!=="]")throw new Pt("expected end of table declaration",{toml:t,ptr:u[1]-1});u[1]++}let d=G0(u[0],r,i,c?2:1);if(!d)throw new Pt("trying to redefine an already defined table or value",{toml:t,ptr:a});o=d[2],s=d[1],a=u[1]}else{let c=Ov(t,a),u=G0(c[0],s,o,0);if(!u)throw new Pt("trying to redefine an already defined table or value",{toml:t,ptr:a});let d=ay(t,c[1],void 0,n);u[1][u[0]]=d[0],a=d[1]}if(a=so(t,a,!0),t[a]&&t[a]!==`
415
+ `&&t[a]!=="\r")throw new Pt("each key-value declaration must be followed by an end-of-line",{toml:t,ptr:a});a=so(t,a)}return r}let aA=/^[a-z0-9-_]+$/i;function Md(t){let e=typeof t;if(e==="object"){if(Array.isArray(t))return"array";if(t instanceof Date)return"date"}return e}function Sq(t){for(let e=0;e<t.length;e++)if(Md(t[e])!=="object")return!1;return t.length!=0}function ly(t){return JSON.stringify(t).replace(/\x7f/g,"\\u007f")}function cy(t,e,n){if(n===0)throw new Error("Could not stringify the object: maximum object depth exceeded");if(e==="number")return isNaN(t)?"nan":t===1/0?"inf":t===-1/0?"-inf":t.toString();if(e==="bigint"||e==="boolean")return t.toString();if(e==="string")return ly(t);if(e==="date"){if(isNaN(t.getTime()))throw new TypeError("cannot serialize invalid date");return t.toISOString()}if(e==="object")return Eq(t,n);if(e==="array")return Tq(t,n)}function Eq(t,e){let n=Object.keys(t);if(n.length===0)return"{}";let r="{ ";for(let i=0;i<n.length;i++){let s=n[i];i&&(r+=", "),r+=aA.test(s)?s:ly(s),r+=" = ",r+=cy(t[s],Md(t[s]),e-1)}return r+" }"}function Tq(t,e){if(t.length===0)return"[]";let n="[ ";for(let r=0;r<t.length;r++){if(r&&(n+=", "),t[r]===null||t[r]===void 0)throw new TypeError("arrays cannot contain null or undefined values");n+=cy(t[r],Md(t[r]),e-1)}return n+" ]"}function Cq(t,e,n){if(n===0)throw new Error("Could not stringify the object: maximum object depth exceeded");let r="";for(let i=0;i<t.length;i++)r+=`[[${e}]]
416
416
  `,r+=uy(t[i],e,n),r+=`
417
417
 
418
- `;return r}function uy(t,e,n){if(n===0)throw new Error("Could not stringify the object: maximum object depth exceeded");let r="",i="",s=Object.keys(t);for(let o=0;o<s.length;o++){let a=s[o];if(t[a]!==null&&t[a]!==void 0){let c=Md(t[a]);if(c==="symbol"||c==="function")throw new TypeError(`cannot serialize values of type '${c}'`);let u=aA.test(a)?a:ly(a);if(c==="array"&&S8(t[a]))i+=C8(t[a],e?`${e}.${u}`:u,n-1);else if(c==="object"){let d=e?`${e}.${u}`:u;i+=`[${d}]
418
+ `;return r}function uy(t,e,n){if(n===0)throw new Error("Could not stringify the object: maximum object depth exceeded");let r="",i="",s=Object.keys(t);for(let o=0;o<s.length;o++){let a=s[o];if(t[a]!==null&&t[a]!==void 0){let c=Md(t[a]);if(c==="symbol"||c==="function")throw new TypeError(`cannot serialize values of type '${c}'`);let u=aA.test(a)?a:ly(a);if(c==="array"&&Sq(t[a]))i+=Cq(t[a],e?`${e}.${u}`:u,n-1);else if(c==="object"){let d=e?`${e}.${u}`:u;i+=`[${d}]
419
419
  `,i+=uy(t[a],d,n-1),i+=`
420
420
 
421
421
  `}else r+=u,r+=" = ",r+=cy(t[a],c,n),r+=`
422
422
  `}}return`${r}
423
- ${i}`.trim()}function A8(t,e){if(Md(t)!=="object")throw new TypeError("stringify can only be called with an object");let n=e?.maxDepth??1e3;return uy(t,"",n)}const K0=t=>JSON.parse(t),Y0=t=>nc(k8(t)),J0=t=>Od.parse(t),P8=t=>t.startsWith("+++")?"toml-frontmatter":t.startsWith("{")?"json-frontmatter":"yaml-frontmatter",O8=async({text:t="",path:e,folder:{collectionName:n,fileName:r}})=>{const i=Fi(n),s=r?i?._fileMap[r]:void 0;if(!i)throw new Error("Collection not found");if(r&&!s)throw new Error("Collection file not found");t=t.trim().replace(/\r\n?/g,`
424
- `);const{_file:{format:o,fmDelimiters:a}}=s??i,c=o==="frontmatter"?P8(t):o,u=rp[c]?.parser;if(u)return u(t);try{if(/^ya?ml$/.test(c))return J0(t);if(c==="toml")return Y0(t);if(c==="json")return K0(t);if(/^(?:yaml|toml|json)-frontmatter$/.test(c)){const[d,f]=(o==="frontmatter"?gk({format:c,delimiter:a}):a)??["---","---"],h=ln(d),p=ln(f),g=new RegExp(`^${h}\\n(?:(?<head>.*?)\\n)?${p}$(?:\\n(?<body>.+))?`,"ms"),{head:m,body:v}=t.match(g)?.groups??{};if(!m&&!v){if(t)return{body:t};throw new Error("No front matter block found")}if(c==="yaml-frontmatter")return{...J0(m),body:v};if(c==="toml-frontmatter")return{...Y0(m),body:v};if(c==="json-frontmatter")return{...K0(m),body:v}}}catch(d){throw new Error(`${e} could not be parsed due to ${d.name}: ${d.message}`)}throw new Error(`${e} could not be parsed due to an unknown format: ${c}`)},hm=({subPath:t,subPathTemplate:e})=>{if(e?.includes("{{slug}}")){const[,n]=t.match(new RegExp(`^${ln(e).replace("\\{\\{slug\\}\\}","(.+)")}$`))??[];if(n)return n}return t},$8=async({file:t,entries:e,errors:n})=>{let r;try{r=await O8(t)}catch(I){console.error(I),n.push(I)}if(!r)return;const{path:i,sha:s,meta:o={},folder:{collectionName:a,fileName:c,filePathMap:u}}=t,d=Fi(a),f=c?d?._fileMap[c]:void 0;if(!d||c&&!f)return;const{fields:h=[],_file:{fullPathRegEx:p,subPath:g,extension:m},_i18n:{i18nEnabled:v,allLocales:_,defaultLocale:b,structure:y,canonicalSlug:{key:x}}}=f??d,k=v&&y==="single_file",S=v&&y==="multiple_files",C=v&&y==="multiple_folders",E=v&&y==="multiple_folders_i18n_root";if(iA(h)){const I=h[0].name;if(k){if(!Jn(r)||!Object.values(r).every(Array.isArray))return;r=Object.fromEntries(Object.entries(r).map(([N,j])=>[N,{[I]:j}]))}else{if(!Array.isArray(r))return;r={[I]:r}}}if(!Jn(r)||/^_index(?:\..+)?\.md$/.test(Ln(i).basename)&&!(g?.split("/").pop()==="_index"&&m==="md")&&!c)return;let A,O;if(c?S||C||E?[O,A]=Object.entries(u??{}).find(([,I])=>I===i)??[]:A=i:{subPath:A,locale:O}=i.match(p)?.groups??{},!A)return;const L={id:"",sha:s,slug:"",subPath:A,locales:{},...o};if(!v){const I=c||hm({subPath:A,subPathTemplate:g});L.slug=I,L.locales._default={slug:I,path:i,sha:s,content:Sa(r)}}if(k){const I=c||hm({subPath:A,subPathTemplate:g});L.slug=I,L.locales=Object.fromEntries(_.filter(N=>N in r).map(N=>[N,{slug:I,path:i,sha:s,content:Sa(r[N])}]))}if(S||C||E){if(!O)return;const I=x&&typeof r[x]=="string"?r[x]:void 0,N=c||hm({subPath:A,subPathTemplate:g}),j={slug:N,path:i,sha:s,content:Sa(r)},H=`${a}/${I??N}`,B=e.find(V=>V.id===H);if(B){B.locales[O]=j,O===b&&(B.sha=s,B.slug=N,B.subPath=A);return}L.id=H,L.locales[O]=j,O===b&&(L.slug=N,L.sha=s)}e.push(L)},lA=async t=>{const e=[],n=[];return await Promise.all(t.map(r=>$8({file:r,entries:e,errors:n}))),{entries:e.filter(r=>(r.id=Gn(),!!r.slug&&!!Object.keys(r.locales).length)),errors:n}},L8={service:"",label:"",owner:"",repo:"",branch:""},$v=t=>{const e=[],n=[];t.forEach(i=>{const{path:s}=i,[o]=tA(s),[a]=eA(s,{matchSubFolders:!0});o&&e.push({...i,type:"entry",folder:o}),a&&!e.find(c=>c.path===s)&&n.push({...i,type:"asset",folder:a})});const r=[...e,...n];return{entryFiles:e,assetFiles:n,allFiles:r,count:r.length}},cA=async({repository:t,fetchDefaultBranchName:e,fetchLastCommit:n,fetchFileList:r,fetchFileContents:i})=>{const{databaseName:s,branch:o}=t,a=new jo(s,"meta"),c=new jo(s,"file-cache"),u=await a.get("last_commit_hash"),d=await c.entries();let f=o,h;f||(f=await e(),t.branch=f);const{hash:p,message:g}=await n();if(u&&u===p&&d.length?h=$v(d.map(([A,O])=>({path:A,...O}))):(h=$v(await r(p)),a.set("last_commit_hash",p)),Hh.set(!g.startsWith("[skip ci]")),!h.count){ii.set([]),en.set([]),dc.set(!0);return}const{entryFiles:m,assetFiles:v,allFiles:_}=h,b=Object.fromEntries(d);_.forEach(({sha:A,path:O},L)=>{b[O]?.sha===A&&Object.assign(_[L],b[O])});const y=_.filter(({meta:A})=>!A),x=y.length?await i(y):{},{entries:k,errors:S}=await lA(m.map(A=>{const{text:O,meta:L}=x[A.path]??{};return{...A,text:A.text??O,meta:A.meta??L}}));ii.set(k),iy.set(S),en.set(rA(v.map(A=>{const{meta:O,text:L,size:I}=x[A.path]??{};return{...A,name:A.path.split("/").pop(),meta:A.meta??O,size:A.size??I,text:A.text??L}}))),dc.set(!0);const C=_.map(({path:A})=>A),E=Object.keys(b).filter(A=>!C.includes(A));y.length&&await c.saveEntries(Object.entries(x)),E.length&&c.deleteEntries(E)},sg=async(t,e={},{responseType:n="json"}={})=>{let r;e.cache="no-cache",e.headers=new Headers(e.headers),n==="json"&&e.headers.set("Accept","application/json"),e.method==="POST"&&Jn(e.body)&&(e.headers.set("Content-Type","application/json"),e.body=JSON.stringify(e.body));try{r=await fetch(t,e)}catch(c){throw new Error("Failed to send the request",{cause:c})}if(n==="raw")return r;let i;try{if(n==="blob")return r.blob();if(n==="text")return r.text();i=await r.json()}catch(c){throw new Error("Failed to parse the response",{cause:c})}const{ok:s,status:o}=r;if(s&&!(t.endsWith("/graphql")&&Jn(i)&&i.errors))return i;if(!Jn(i))throw new Error("Server responded with an error",{cause:{status:o}});let a="";throw typeof i.error=="string"&&(a=i.error),typeof i.message=="string"&&(a=i.message),Array.isArray(i.errors)&&(typeof i.errors[0]=="string"&&(a=i.errors.join(", ")),Jn(i.errors[0])&&typeof i.errors[0].message=="string"&&(a=i.errors.map(c=>c.message).join(", "))),new Error("Server responded with an error",{cause:{status:o,message:a}})},id="github",uA="GitHub",N8="https://www.githubstatus.com/",I8="https://www.githubstatus.com/api/v2/status.json",ls=new Proxy({},{get:(t,e)=>{if(e in t)return t[e];const{baseURL:n,branch:r}=t;if(e==="treeBaseURL")return r?`${n}/tree/${r}`:n;if(e==="blobBaseURL")return r?`${n}/blob/${r}`:""}}),R8=async()=>{try{const{status:{indicator:t}}=await sg(I8);if(t==="none")return"none";if(t==="minor")return"minor";if(t==="major"||t==="critical")return"major"}catch{}return"unknown"},qc=async(t,e={},{token:n=ne(gi).token,responseType:r="json"}={})=>{let{api_root:i}=ne(wt).backend;return i?(i=`${new URL(i).origin}/api`,t!=="/graphql"&&(i=`${i}/v3`)):i="https://api.github.com",e.headers=new Headers(e.headers),e.headers.set("Authorization",`token ${n}`),sg(`${i}${t}`,e,{responseType:r})},og=async(t,e={})=>{const{data:n}=await qc("/graphql",{method:"POST",body:{query:t.replace(/\n\s*/g," "),variables:e}});return n},dA=()=>{const{repo:t,branch:e,api_root:n}=ne(wt).backend,[r,i]=t.split("/"),s=n?new URL(n).origin:"https://github.com";return Object.assign(ls,{service:id,label:uA,owner:r,repo:i,branch:e,baseURL:`${s}/${r}/${i}`,databaseName:`${id}:${r}/${i}`})},D8=()=>{dA()},M8=async({token:t,auto:e=!1})=>{if(e&&!t)return;const{hostname:n}=window.location,{site_domain:r=n,base_url:i="https://api.netlify.com",auth_endpoint:s="auth"}=ne(wt).backend,o=t||await nT({backendName:id,siteDomain:r,authURL:`${Fn(i)}/${Fn(s)}`,scope:"repo,user"}),{id:a,name:c,login:u,email:d,avatar_url:f,html_url:h}=await qc("/user",{},{token:o});return{backendName:id,token:o,id:a,name:c,login:u,email:d,avatarURL:f,profileURL:h}},F8=async()=>{},z8=async()=>{const{owner:t,repo:e}=ls,n=ne(gi)?.login,{ok:r}=await qc(`/repos/${t}/${e}/collaborators/${encodeURIComponent(n)}`,{headers:{Accept:"application/json"}},{responseType:"raw"});if(!r)throw new Error("Not a collaborator of the repository",{cause:new Error(ne(le)("repository_no_access",{values:{repo:e}}))})},j8=async()=>{const{owner:t,repo:e}=ls,n=await og(`
423
+ ${i}`.trim()}function Aq(t,e){if(Md(t)!=="object")throw new TypeError("stringify can only be called with an object");let n=e?.maxDepth??1e3;return uy(t,"",n)}const K0=t=>JSON.parse(t),Y0=t=>nc(kq(t)),J0=t=>Od.parse(t),Pq=t=>t.startsWith("+++")?"toml-frontmatter":t.startsWith("{")?"json-frontmatter":"yaml-frontmatter",Oq=async({text:t="",path:e,folder:{collectionName:n,fileName:r}})=>{const i=Fi(n),s=r?i?._fileMap[r]:void 0;if(!i)throw new Error("Collection not found");if(r&&!s)throw new Error("Collection file not found");t=t.trim().replace(/\r\n?/g,`
424
+ `);const{_file:{format:o,fmDelimiters:a}}=s??i,c=o==="frontmatter"?Pq(t):o,u=rp[c]?.parser;if(u)return u(t);try{if(/^ya?ml$/.test(c))return J0(t);if(c==="toml")return Y0(t);if(c==="json")return K0(t);if(/^(?:yaml|toml|json)-frontmatter$/.test(c)){const[d,f]=(o==="frontmatter"?gk({format:c,delimiter:a}):a)??["---","---"],h=ln(d),p=ln(f),g=new RegExp(`^${h}\\n(?:(?<head>.*?)\\n)?${p}$(?:\\n(?<body>.+))?`,"ms"),{head:m,body:v}=t.match(g)?.groups??{};if(!m&&!v){if(t)return{body:t};throw new Error("No front matter block found")}if(c==="yaml-frontmatter")return{...J0(m),body:v};if(c==="toml-frontmatter")return{...Y0(m),body:v};if(c==="json-frontmatter")return{...K0(m),body:v}}}catch(d){throw new Error(`${e} could not be parsed due to ${d.name}: ${d.message}`)}throw new Error(`${e} could not be parsed due to an unknown format: ${c}`)},hm=({subPath:t,subPathTemplate:e})=>{if(e?.includes("{{slug}}")){const[,n]=t.match(new RegExp(`^${ln(e).replace("\\{\\{slug\\}\\}","(.+)")}$`))??[];if(n)return n}return t},$q=async({file:t,entries:e,errors:n})=>{let r;try{r=await Oq(t)}catch(I){console.error(I),n.push(I)}if(!r)return;const{path:i,sha:s,meta:o={},folder:{collectionName:a,fileName:c,filePathMap:u}}=t,d=Fi(a),f=c?d?._fileMap[c]:void 0;if(!d||c&&!f)return;const{fields:h=[],_file:{fullPathRegEx:p,subPath:g,extension:m},_i18n:{i18nEnabled:v,allLocales:_,defaultLocale:b,structure:y,canonicalSlug:{key:x}}}=f??d,k=v&&y==="single_file",S=v&&y==="multiple_files",C=v&&y==="multiple_folders",E=v&&y==="multiple_folders_i18n_root";if(iA(h)){const I=h[0].name;if(k){if(!Jn(r)||!Object.values(r).every(Array.isArray))return;r=Object.fromEntries(Object.entries(r).map(([N,j])=>[N,{[I]:j}]))}else{if(!Array.isArray(r))return;r={[I]:r}}}if(!Jn(r)||/^_index(?:\..+)?\.md$/.test(Ln(i).basename)&&!(g?.split("/").pop()==="_index"&&m==="md")&&!c)return;let A,O;if(c?S||C||E?[O,A]=Object.entries(u??{}).find(([,I])=>I===i)??[]:A=i:{subPath:A,locale:O}=i.match(p)?.groups??{},!A)return;const L={id:"",sha:s,slug:"",subPath:A,locales:{},...o};if(!v){const I=c||hm({subPath:A,subPathTemplate:g});L.slug=I,L.locales._default={slug:I,path:i,sha:s,content:Sa(r)}}if(k){const I=c||hm({subPath:A,subPathTemplate:g});L.slug=I,L.locales=Object.fromEntries(_.filter(N=>N in r).map(N=>[N,{slug:I,path:i,sha:s,content:Sa(r[N])}]))}if(S||C||E){if(!O)return;const I=x&&typeof r[x]=="string"?r[x]:void 0,N=c||hm({subPath:A,subPathTemplate:g}),j={slug:N,path:i,sha:s,content:Sa(r)},H=`${a}/${I??N}`,B=e.find(V=>V.id===H);if(B){B.locales[O]=j,O===b&&(B.sha=s,B.slug=N,B.subPath=A);return}L.id=H,L.locales[O]=j,O===b&&(L.slug=N,L.sha=s)}e.push(L)},lA=async t=>{const e=[],n=[];return await Promise.all(t.map(r=>$q({file:r,entries:e,errors:n}))),{entries:e.filter(r=>(r.id=Gn(),!!r.slug&&!!Object.keys(r.locales).length)),errors:n}},Lq={service:"",label:"",owner:"",repo:"",branch:""},$v=t=>{const e=[],n=[];t.forEach(i=>{const{path:s}=i,[o]=tA(s),[a]=eA(s,{matchSubFolders:!0});o&&e.push({...i,type:"entry",folder:o}),a&&!e.find(c=>c.path===s)&&n.push({...i,type:"asset",folder:a})});const r=[...e,...n];return{entryFiles:e,assetFiles:n,allFiles:r,count:r.length}},cA=async({repository:t,fetchDefaultBranchName:e,fetchLastCommit:n,fetchFileList:r,fetchFileContents:i})=>{const{databaseName:s,branch:o}=t,a=new jo(s,"meta"),c=new jo(s,"file-cache"),u=await a.get("last_commit_hash"),d=await c.entries();let f=o,h;f||(f=await e(),t.branch=f);const{hash:p,message:g}=await n();if(u&&u===p&&d.length?h=$v(d.map(([A,O])=>({path:A,...O}))):(h=$v(await r(p)),a.set("last_commit_hash",p)),Hh.set(!g.startsWith("[skip ci]")),!h.count){ii.set([]),en.set([]),dc.set(!0);return}const{entryFiles:m,assetFiles:v,allFiles:_}=h,b=Object.fromEntries(d);_.forEach(({sha:A,path:O},L)=>{b[O]?.sha===A&&Object.assign(_[L],b[O])});const y=_.filter(({meta:A})=>!A),x=y.length?await i(y):{},{entries:k,errors:S}=await lA(m.map(A=>{const{text:O,meta:L}=x[A.path]??{};return{...A,text:A.text??O,meta:A.meta??L}}));ii.set(k),iy.set(S),en.set(rA(v.map(A=>{const{meta:O,text:L,size:I}=x[A.path]??{};return{...A,name:A.path.split("/").pop(),meta:A.meta??O,size:A.size??I,text:A.text??L}}))),dc.set(!0);const C=_.map(({path:A})=>A),E=Object.keys(b).filter(A=>!C.includes(A));y.length&&await c.saveEntries(Object.entries(x)),E.length&&c.deleteEntries(E)},sg=async(t,e={},{responseType:n="json"}={})=>{let r;e.cache="no-cache",e.headers=new Headers(e.headers),n==="json"&&e.headers.set("Accept","application/json"),e.method==="POST"&&Jn(e.body)&&(e.headers.set("Content-Type","application/json"),e.body=JSON.stringify(e.body));try{r=await fetch(t,e)}catch(c){throw new Error("Failed to send the request",{cause:c})}if(n==="raw")return r;let i;try{if(n==="blob")return r.blob();if(n==="text")return r.text();i=await r.json()}catch(c){throw new Error("Failed to parse the response",{cause:c})}const{ok:s,status:o}=r;if(s&&!(t.endsWith("/graphql")&&Jn(i)&&i.errors))return i;if(!Jn(i))throw new Error("Server responded with an error",{cause:{status:o}});let a="";throw typeof i.error=="string"&&(a=i.error),typeof i.message=="string"&&(a=i.message),Array.isArray(i.errors)&&(typeof i.errors[0]=="string"&&(a=i.errors.join(", ")),Jn(i.errors[0])&&typeof i.errors[0].message=="string"&&(a=i.errors.map(c=>c.message).join(", "))),new Error("Server responded with an error",{cause:{status:o,message:a}})},id="github",uA="GitHub",Nq="https://www.githubstatus.com/",Iq="https://www.githubstatus.com/api/v2/status.json",ls=new Proxy({},{get:(t,e)=>{if(e in t)return t[e];const{baseURL:n,branch:r}=t;if(e==="treeBaseURL")return r?`${n}/tree/${r}`:n;if(e==="blobBaseURL")return r?`${n}/blob/${r}`:""}}),Rq=async()=>{try{const{status:{indicator:t}}=await sg(Iq);if(t==="none")return"none";if(t==="minor")return"minor";if(t==="major"||t==="critical")return"major"}catch{}return"unknown"},qc=async(t,e={},{token:n=ne(gi).token,responseType:r="json"}={})=>{let{api_root:i}=ne(wt).backend;return i?(i=`${new URL(i).origin}/api`,t!=="/graphql"&&(i=`${i}/v3`)):i="https://api.github.com",e.headers=new Headers(e.headers),e.headers.set("Authorization",`token ${n}`),sg(`${i}${t}`,e,{responseType:r})},og=async(t,e={})=>{const{data:n}=await qc("/graphql",{method:"POST",body:{query:t.replace(/\n\s*/g," "),variables:e}});return n},dA=()=>{const{repo:t,branch:e,api_root:n}=ne(wt).backend,[r,i]=t.split("/"),s=n?new URL(n).origin:"https://github.com";return Object.assign(ls,{service:id,label:uA,owner:r,repo:i,branch:e,baseURL:`${s}/${r}/${i}`,databaseName:`${id}:${r}/${i}`})},Dq=()=>{dA()},Mq=async({token:t,auto:e=!1})=>{if(e&&!t)return;const{hostname:n}=window.location,{site_domain:r=n,base_url:i="https://api.netlify.com",auth_endpoint:s="auth"}=ne(wt).backend,o=t||await nT({backendName:id,siteDomain:r,authURL:`${Fn(i)}/${Fn(s)}`,scope:"repo,user"}),{id:a,name:c,login:u,email:d,avatar_url:f,html_url:h}=await qc("/user",{},{token:o});return{backendName:id,token:o,id:a,name:c,login:u,email:d,avatarURL:f,profileURL:h}},Fq=async()=>{},zq=async()=>{const{owner:t,repo:e}=ls,n=ne(gi)?.login,{ok:r}=await qc(`/repos/${t}/${e}/collaborators/${encodeURIComponent(n)}`,{headers:{Accept:"application/json"}},{responseType:"raw"});if(!r)throw new Error("Not a collaborator of the repository",{cause:new Error(ne(le)("repository_no_access",{values:{repo:e}}))})},jq=async()=>{const{owner:t,repo:e}=ls,n=await og(`
425
425
  query {
426
426
  repository(owner: "${t}", name: "${e}") {
427
427
  defaultBranchRef {
@@ -446,7 +446,7 @@ ${i}`.trim()}function A8(t,e){if(Md(t)!=="object")throw new TypeError("stringify
446
446
  }
447
447
  }
448
448
  }
449
- `);if(!r.repository)throw new Error("Failed to retrieve the last commit hash.",{cause:new Error(ne(le)("repository_not_found",{values:{repo:e}}))});if(!r.repository.ref)throw new Error("Failed to retrieve the last commit hash.",{cause:new Error(ne(le)("branch_not_found",{values:{repo:e,branch:n}}))});const{oid:i,message:s}=r.repository.ref.target.history.nodes[0];return{hash:i,message:s}},U8=async t=>{const{owner:e,repo:n,branch:r}=ls;return(await qc(`/repos/${e}/${n}/git/trees/${t??r}?recursive=1`)).tree.filter(({type:s})=>s==="blob").map(({path:s,sha:o,size:a})=>({path:s,sha:o,size:a}))},B8=async t=>{const{owner:e,repo:n,branch:r}=ls,i=structuredClone(t),s=[],o=250,a={},c=(d,f)=>{const h=d.map(({type:p,path:g,sha:m},v)=>{const _=[],b=f+v;return p==="entry"&&_.push(`
449
+ `);if(!r.repository)throw new Error("Failed to retrieve the last commit hash.",{cause:new Error(ne(le)("repository_not_found",{values:{repo:e}}))});if(!r.repository.ref)throw new Error("Failed to retrieve the last commit hash.",{cause:new Error(ne(le)("branch_not_found",{values:{repo:e,branch:n}}))});const{oid:i,message:s}=r.repository.ref.target.history.nodes[0];return{hash:i,message:s}},Uq=async t=>{const{owner:e,repo:n,branch:r}=ls;return(await qc(`/repos/${e}/${n}/git/trees/${t??r}?recursive=1`)).tree.filter(({type:s})=>s==="blob").map(({path:s,sha:o,size:a})=>({path:s,sha:o,size:a}))},Bq=async t=>{const{owner:e,repo:n,branch:r}=ls,i=structuredClone(t),s=[],o=250,a={},c=(d,f)=>{const h=d.map(({type:p,path:g,sha:m},v)=>{const _=[],b=f+v;return p==="entry"&&_.push(`
450
450
  content_${b}: object(oid: "${m}") {
451
451
  ... on Blob { text }
452
452
  }
@@ -476,7 +476,7 @@ ${i}`.trim()}function A8(t,e){if(Md(t)!=="object")throw new TypeError("stringify
476
476
  ${h}
477
477
  }
478
478
  }
479
- `};Ta.set(0);const u=window.setInterval(()=>{Ta.update((d=0)=>d+1)},i.length/10);for(let d=0;d<i.length;d+=o)s.push(i.slice(d,d+o));return await Promise.all(s.map(async(d,f)=>{await vn(f*500);const h=await og(c(d,f*o));Object.assign(a,h.repository)})),window.clearInterval(u),Ta.set(void 0),Object.fromEntries(t.map(({path:d,sha:f,size:h},p)=>{const{author:{name:g,email:m,user:v},committedDate:_}=a[`commit_${p}`].target.history.nodes[0],b={sha:f,size:h,text:a[`content_${p}`]?.text,meta:{commitAuthor:{name:g,email:m,id:v?.id,login:v?.login},commitDate:new Date(_)}};return[d,b]}))},q8=async()=>{await z8(),await cA({repository:ls,fetchDefaultBranchName:j8,fetchLastCommit:fA,fetchFileList:U8,fetchFileContents:B8})},H8=async t=>{const{owner:e,repo:n}=ls,{sha:r,path:i}=t,s=await qc(`/repos/${e}/${n}/git/blobs/${r}`,{headers:{Accept:"application/vnd.github.raw"}},{responseType:"raw"});return s.headers.get("Content-Type")!=="application/octet-stream"?new Blob([await s.text()],{type:Jo.getType(i)??"text/plain"}):s.blob()},V8=async(t,e)=>{const{owner:n,repo:r,branch:i}=ls,s=await Promise.all(t.filter(({action:c})=>["create","update","move"].includes(c)).map(async({path:c,data:u,base64:d})=>({path:c,contents:d??await hk(u??"")}))),o=t.filter(({action:c})=>["move","delete"].includes(c)).map(({previousPath:c,path:u})=>({path:c??u}));return(await og(`
479
+ `};Ta.set(0);const u=window.setInterval(()=>{Ta.update((d=0)=>d+1)},i.length/10);for(let d=0;d<i.length;d+=o)s.push(i.slice(d,d+o));return await Promise.all(s.map(async(d,f)=>{await vn(f*500);const h=await og(c(d,f*o));Object.assign(a,h.repository)})),window.clearInterval(u),Ta.set(void 0),Object.fromEntries(t.map(({path:d,sha:f,size:h},p)=>{const{author:{name:g,email:m,user:v},committedDate:_}=a[`commit_${p}`].target.history.nodes[0],b={sha:f,size:h,text:a[`content_${p}`]?.text,meta:{commitAuthor:{name:g,email:m,id:v?.id,login:v?.login},commitDate:new Date(_)}};return[d,b]}))},qq=async()=>{await zq(),await cA({repository:ls,fetchDefaultBranchName:jq,fetchLastCommit:fA,fetchFileList:Uq,fetchFileContents:Bq})},Hq=async t=>{const{owner:e,repo:n}=ls,{sha:r,path:i}=t,s=await qc(`/repos/${e}/${n}/git/blobs/${r}`,{headers:{Accept:"application/vnd.github.raw"}},{responseType:"raw"});return s.headers.get("Content-Type")!=="application/octet-stream"?new Blob([await s.text()],{type:Jo.getType(i)??"text/plain"}):s.blob()},Vq=async(t,e)=>{const{owner:n,repo:r,branch:i}=ls,s=await Promise.all(t.filter(({action:c})=>["create","update","move"].includes(c)).map(async({path:c,data:u,base64:d})=>({path:c,contents:d??await hk(u??"")}))),o=t.filter(({action:c})=>["move","delete"].includes(c)).map(({previousPath:c,path:u})=>({path:c??u}));return(await og(`
480
480
  mutation ($input: CreateCommitOnBranchInput!) {
481
481
  createCommitOnBranch(input: $input) {
482
482
  commit {
@@ -484,7 +484,7 @@ ${i}`.trim()}function A8(t,e){if(Md(t)!=="object")throw new TypeError("stringify
484
484
  }
485
485
  }
486
486
  }
487
- `,{input:{branch:{repositoryNameWithOwner:`${n}/${r}`,branchName:i},expectedHeadOid:(await fA()).hash,fileChanges:{additions:s,deletions:o},message:{headline:nA(t,e)}}})).createCommitOnBranch.commit.url},W8=async()=>{const{owner:t,repo:e}=ls;return qc(`/repos/${t}/${e}/dispatches`,{method:"POST",body:{event_type:"sveltia-cms-publish"}},{responseType:"raw"})},G8={name:id,label:uA,repository:ls,statusDashboardURL:N8,checkStatus:R8,getRepositoryInfo:dA,init:D8,signIn:M8,signOut:F8,fetchFiles:q8,fetchBlob:H8,commitChanges:V8,triggerDeployment:W8},ba="gitlab",hA="GitLab",K8="https://status.gitlab.com/",Y8="https://status-api.hostedstatus.com/1.0/status/5b36dc6502d06804c08349f7",Fs=new Proxy({},{get:(t,e)=>{if(e in t)return t[e];const{baseURL:n,branch:r}=t;if(e==="treeBaseURL")return r?`${n}/-/tree/${r}`:n;if(e==="blobBaseURL")return r?`${n}/-/blob/${r}`:""}}),J8=async()=>{try{const{result:{status_overall:{status_code:t}}}=await sg(Y8);if(t===100)return"none";if([200,300,400].includes(t))return"minor";if([500,600].includes(t))return"major"}catch{}return"unknown"},Fd=async(t,e={},{token:n=ne(gi)?.token,responseType:r="json"}={})=>{let{api_root:i}=ne(wt).backend;return i?i=`${new URL(i).origin}/api`:i="https://gitlab.com/api",t!=="/graphql"&&(i=`${i}/v4`),e.headers=new Headers(e.headers),e.headers.set("Authorization",`Bearer ${n}`),sg(`${i}${t}`,e,{responseType:r})},sd=async(t,e={})=>{const{data:n}=await Fd("/graphql",{method:"POST",body:{query:t.replace(/\n\s*/g," "),variables:e}});return n},pA=()=>{const{repo:t,branch:e,api_root:n}=ne(wt).backend,{owner:r,repo:i}=t.match(/(?<owner>.+)\/(?<repo>[^/]+)$/)?.groups??{},s=n?new URL(n).origin:"https://gitlab.com";return Object.assign(Fs,{service:ba,label:hA,owner:r,repo:i,branch:e,baseURL:`${s}/${r}/${i}`,databaseName:`${ba}:${r}/${i}`})},Z8=()=>{pA()},X8=async({token:t,auto:e=!1})=>{const{origin:n,hostname:r}=window.location,{site_domain:i=r,base_url:s="https://gitlab.com",auth_endpoint:o="oauth/authorize",auth_type:a,app_id:c=""}=ne(wt).backend,u=`${Fn(s)}/${Fn(o)}`,d="api";let f="";if(t)f=t;else if(a==="pkce"){if(window.opener?.origin===n&&window.name==="auth"){await gz({backendName:ba,clientId:c,authURL:u.replace("/authorize","/token")});return}if(e)return;f=await hz({backendName:ba,clientId:c,authURL:u,scope:d})}else{if(e)return;f=await nT({backendName:ba,siteDomain:i,authURL:u,scope:d})}const{id:h,name:p,username:g,email:m,avatar_url:v,web_url:_}=await Fd("/user",{},{token:f});return{backendName:ba,token:f,id:h,name:p,login:g,email:m,avatarURL:v,profileURL:_}},Q8=async()=>{},eq=async()=>{const{owner:t,repo:e}=Fs,n=ne(gi)?.id,{ok:r}=await Fd(`/projects/${encodeURIComponent(`${t}/${e}`)}/members/all/${n}`,{headers:{Accept:"application/json"}},{responseType:"raw"});if(!r)throw new Error("Not a collaborator of the repository",{cause:new Error(ne(le)("repository_no_access",{values:{repo:e}}))})},tq=async()=>{const{owner:t,repo:e}=Fs,n=await sd(`
487
+ `,{input:{branch:{repositoryNameWithOwner:`${n}/${r}`,branchName:i},expectedHeadOid:(await fA()).hash,fileChanges:{additions:s,deletions:o},message:{headline:nA(t,e)}}})).createCommitOnBranch.commit.url},Wq=async()=>{const{owner:t,repo:e}=ls;return qc(`/repos/${t}/${e}/dispatches`,{method:"POST",body:{event_type:"sveltia-cms-publish"}},{responseType:"raw"})},Gq={name:id,label:uA,repository:ls,statusDashboardURL:Nq,checkStatus:Rq,getRepositoryInfo:dA,init:Dq,signIn:Mq,signOut:Fq,fetchFiles:qq,fetchBlob:Hq,commitChanges:Vq,triggerDeployment:Wq},ba="gitlab",hA="GitLab",Kq="https://status.gitlab.com/",Yq="https://status-api.hostedstatus.com/1.0/status/5b36dc6502d06804c08349f7",Fs=new Proxy({},{get:(t,e)=>{if(e in t)return t[e];const{baseURL:n,branch:r}=t;if(e==="treeBaseURL")return r?`${n}/-/tree/${r}`:n;if(e==="blobBaseURL")return r?`${n}/-/blob/${r}`:""}}),Jq=async()=>{try{const{result:{status_overall:{status_code:t}}}=await sg(Yq);if(t===100)return"none";if([200,300,400].includes(t))return"minor";if([500,600].includes(t))return"major"}catch{}return"unknown"},Fd=async(t,e={},{token:n=ne(gi)?.token,responseType:r="json"}={})=>{let{api_root:i}=ne(wt).backend;return i?i=`${new URL(i).origin}/api`:i="https://gitlab.com/api",t!=="/graphql"&&(i=`${i}/v4`),e.headers=new Headers(e.headers),e.headers.set("Authorization",`Bearer ${n}`),sg(`${i}${t}`,e,{responseType:r})},sd=async(t,e={})=>{const{data:n}=await Fd("/graphql",{method:"POST",body:{query:t.replace(/\n\s*/g," "),variables:e}});return n},pA=()=>{const{repo:t,branch:e,api_root:n}=ne(wt).backend,{owner:r,repo:i}=t.match(/(?<owner>.+)\/(?<repo>[^/]+)$/)?.groups??{},s=n?new URL(n).origin:"https://gitlab.com";return Object.assign(Fs,{service:ba,label:hA,owner:r,repo:i,branch:e,baseURL:`${s}/${r}/${i}`,databaseName:`${ba}:${r}/${i}`})},Zq=()=>{pA()},Xq=async({token:t,auto:e=!1})=>{const{origin:n,hostname:r}=window.location,{site_domain:i=r,base_url:s="https://gitlab.com",auth_endpoint:o="oauth/authorize",auth_type:a,app_id:c=""}=ne(wt).backend,u=`${Fn(s)}/${Fn(o)}`,d="api";let f="";if(t)f=t;else if(a==="pkce"){if(window.opener?.origin===n&&window.name==="auth"){await g3({backendName:ba,clientId:c,authURL:u.replace("/authorize","/token")});return}if(e)return;f=await h3({backendName:ba,clientId:c,authURL:u,scope:d})}else{if(e)return;f=await nT({backendName:ba,siteDomain:i,authURL:u,scope:d})}const{id:h,name:p,username:g,email:m,avatar_url:v,web_url:_}=await Fd("/user",{},{token:f});return{backendName:ba,token:f,id:h,name:p,login:g,email:m,avatarURL:v,profileURL:_}},Qq=async()=>{},e5=async()=>{const{owner:t,repo:e}=Fs,n=ne(gi)?.id,{ok:r}=await Fd(`/projects/${encodeURIComponent(`${t}/${e}`)}/members/all/${n}`,{headers:{Accept:"application/json"}},{responseType:"raw"});if(!r)throw new Error("Not a collaborator of the repository",{cause:new Error(ne(le)("repository_no_access",{values:{repo:e}}))})},t5=async()=>{const{owner:t,repo:e}=Fs,n=await sd(`
488
488
  query {
489
489
  project(fullPath: "${t}/${e}") {
490
490
  repository {
@@ -492,7 +492,7 @@ ${i}`.trim()}function A8(t,e){if(Md(t)!=="object")throw new TypeError("stringify
492
492
  }
493
493
  }
494
494
  }
495
- `);if(!n.project)throw new Error("Failed to retrieve the default branch name.",{cause:new Error(ne(le)("repository_not_found",{values:{repo:e}}))});const{rootRef:r}=n.project.repository;if(!r)throw new Error("Failed to retrieve the default branch name.",{cause:new Error(ne(le)("repository_empty",{values:{repo:e}}))});return r},nq=async()=>{const{owner:t,repo:e,branch:n}=Fs,r=await sd(`
495
+ `);if(!n.project)throw new Error("Failed to retrieve the default branch name.",{cause:new Error(ne(le)("repository_not_found",{values:{repo:e}}))});const{rootRef:r}=n.project.repository;if(!r)throw new Error("Failed to retrieve the default branch name.",{cause:new Error(ne(le)("repository_empty",{values:{repo:e}}))});return r},n5=async()=>{const{owner:t,repo:e,branch:n}=Fs,r=await sd(`
496
496
  query {
497
497
  project(fullPath: "${t}/${e}") {
498
498
  repository {
@@ -505,7 +505,7 @@ ${i}`.trim()}function A8(t,e){if(Md(t)!=="object")throw new TypeError("stringify
505
505
  }
506
506
  }
507
507
  }
508
- `);if(!r.project)throw new Error("Failed to retrieve the last commit hash.",{cause:new Error(ne(le)("repository_not_found",{values:{repo:e}}))});const{lastCommit:i}=r.project.repository.tree??{};if(!i)throw new Error("Failed to retrieve the last commit hash.",{cause:new Error(ne(le)("branch_not_found",{values:{repo:e,branch:n}}))});const{sha:s,message:o}=i;return{hash:s,message:o}},rq=async()=>{const{owner:t,repo:e,branch:n}=Fs,r=[];let i="";for(;;){const s=await sd(`
508
+ `);if(!r.project)throw new Error("Failed to retrieve the last commit hash.",{cause:new Error(ne(le)("repository_not_found",{values:{repo:e}}))});const{lastCommit:i}=r.project.repository.tree??{};if(!i)throw new Error("Failed to retrieve the last commit hash.",{cause:new Error(ne(le)("branch_not_found",{values:{repo:e,branch:n}}))});const{sha:s,message:o}=i;return{hash:s,message:o}},r5=async()=>{const{owner:t,repo:e,branch:n}=Fs,r=[];let i="";for(;;){const s=await sd(`
509
509
  query {
510
510
  project(fullPath: "${t}/${e}") {
511
511
  repository {
@@ -525,7 +525,7 @@ ${i}`.trim()}function A8(t,e){if(Md(t)!=="object")throw new TypeError("stringify
525
525
  }
526
526
  }
527
527
  }
528
- `),{nodes:o,pageInfo:{endCursor:a,hasNextPage:c}}=s.project.repository.tree.blobs;if(r.push(...o),i=a,!c)break}return r.filter(({type:s})=>s==="blob").map(({path:s,sha:o})=>({path:s,sha:o}))},iq=async t=>{const{owner:e,repo:n,branch:r}=Fs,i=t.map(({path:c})=>c),s=[];let o=[...i];for(Ta.set(0);;){const c=await sd(`
528
+ `),{nodes:o,pageInfo:{endCursor:a,hasNextPage:c}}=s.project.repository.tree.blobs;if(r.push(...o),i=a,!c)break}return r.filter(({type:s})=>s==="blob").map(({path:s,sha:o})=>({path:s,sha:o}))},i5=async t=>{const{owner:e,repo:n,branch:r}=Fs,i=t.map(({path:c})=>c),s=[];let o=[...i];for(Ta.set(0);;){const c=await sd(`
529
529
  query ($paths: [String!]!) {
530
530
  project(fullPath: "${e}/${n}") {
531
531
  repository {
@@ -558,10 +558,10 @@ ${i}`.trim()}function A8(t,e){if(Md(t)!=="object")throw new TypeError("stringify
558
558
  }
559
559
  }
560
560
  }
561
- `);if(a.push(...Object.values(c.project.repository).map(({lastCommit:u})=>u)),!o.length)break}return Object.fromEntries(t.map(({path:c,sha:u},d)=>{const{size:f,rawTextBlob:h}=s[d],p=a[d],g={sha:u,size:Number(f),text:h,meta:{}};if(p){const{author:m,authorName:v,authorEmail:_,committedDate:b}=p,{id:y,username:x}=m??{},k=y?.match(/\d+/);g.meta={commitAuthor:{name:v,email:_,id:k?Number(k[0]):void 0,login:x},committedDate:new Date(b)}}return[c,g]}))},sq=async()=>{await eq(),await cA({repository:Fs,fetchDefaultBranchName:tq,fetchLastCommit:nq,fetchFileList:rq,fetchFileContents:iq})},oq=async t=>{const{owner:e,repo:n,branch:r=""}=Fs,{path:i}=t;return Fd(`/projects/${encodeURIComponent(`${e}/${n}`)}/repository/files/${encodeURIComponent(i)}/raw?ref=${encodeURIComponent(r)}`,{},{responseType:"blob"})},aq=async(t,e)=>{const{owner:n,repo:r,branch:i}=Fs;return(await Fd(`/projects/${encodeURIComponent(`${n}/${r}`)}/repository/commits`,{method:"POST",body:{branch:i,commit_message:nA(t,e),actions:await Promise.all(t.map(async({action:o,path:a,previousPath:c,data:u="",base64:d})=>({action:o,content:d??(typeof u!="string"?await hk(u):u),encoding:d||typeof u!="string"?"base64":"text",file_path:a,previous_path:c})))}})).web_url},lq={name:ba,label:hA,repository:Fs,statusDashboardURL:K8,checkStatus:J8,getRepositoryInfo:pA,init:Z8,signIn:X8,signOut:Q8,fetchFiles:sq,fetchBlob:oq,commitChanges:aq},gA="local",cq="Local Repository";let Lv;const uq=new Proxy({},{get:(t,e)=>(Lv??L8)[e]}),dy=st(null),Nv="root_dir_handle";let qh;const dq=async({forceReload:t=!1,showPicker:e=!0}={})=>{if(!("showDirectoryPicker"in window))throw new Error("unsupported");let n=t?null:await qh?.get(Nv)??null;if(n)if(await n.requestPermission({mode:"readwrite"})!=="granted")n=null;else try{await n.entries().next()}catch(r){n=null,console.error(r)}return!n&&e&&(n=await window.showDirectoryPicker(),n&&(await n.getDirectoryHandle(".git"),await qh?.set(Nv,n))),n},fq=async()=>{await qh?.delete(Nv)},hq=()=>{const{name:t}=ne(wt).backend;Lv=ag[t]?.getRepositoryInfo?.();const{databaseName:e}=Lv??{};qh=e?new jo(e,"file-system-handles"):null},pq=async({auto:t=!1})=>{const e=await dq({showPicker:!t});if(e)dy.set(e);else throw new Error("Directory handle could not be acquired");return{backendName:gA}},gq=async()=>{fq()},ru=async t=>{let e=ne(dy);if(!t)return e;const n=Fn(t).split("/"),r=!0;for(const i of n)e=await(i.includes(".")?e.getFileHandle(i,{create:r}):e.getDirectoryHandle(i,{create:r}));return e},mq=async()=>{const t=ne(dy),e=[],n=rc([...ne(ry).map(({filePathMap:o,folderPathMap:a})=>Object.values(o||(a??{}))).flat(1),...ne(hi).map(({internalPath:o})=>o)].map(o=>Fn(o??""))),r=o=>new RegExp(`^${ln(o)}\\b`),i=n.map(r),s=async o=>{for await(const[a,c]of o.entries()){if(a.startsWith("."))continue;const u=(await t?.resolve(c))?.join("/")??"",d=i.some(f=>f.test(u));if(c.kind==="file"){if(!d)continue;try{let f=await c.getFile();f=new File([f],f.name,{type:f.type,lastModified:f.lastModified}),e.push({file:f,path:u})}catch(f){console.error(f)}}if(c.kind==="directory"){const f=r(u);if(!d&&!n.some(h=>f.test(h)))continue;await s(c)}}};return await s(t),Promise.all(e.map(async({file:o,path:a})=>({file:o,path:a.normalize(),size:o.size,sha:await(async()=>{try{return await Pa(o)}catch(c){console.error(c)}return""})()})))},vq=async()=>{const{entryFiles:t,assetFiles:e}=$v(await mq());await Promise.all(t.map(async i=>{try{i.text=await qP(i.file)}catch(s){i.text="",console.error(s)}}));const{entries:n,errors:r}=await lA(t);ii.set(n),iy.set(r),en.set(rA(e)),dc.set(!0)},bq=async t=>Promise.all(t.map(async({action:e,path:n,previousPath:r,data:i})=>{try{let s;if(e==="move"&&r){const{dirname:o,basename:a}=Ln(n);s=await ru(r),o&&o!==Ln(r).dirname?await s.move(await ru(o),a):await s.move(a)}if(["create","update","move"].includes(e)&&i){s??=await ru(n);const o=await s.createWritable();try{await o.write(i)}catch{}finally{await o.close()}return s.getFile()}if(e==="delete"){const{dirname:o="",basename:a}=Ln(Fn(n));let c=await ru(o);if(await c.removeEntry(a),!o)return null;const u=o.split("/");for(;;){const d=[];for await(const h of c.keys())d.push(h);if(d.length>1||!u.length)break;const f=u.pop();c=await ru(u.join("/")),c.removeEntry(f)}}}catch(s){console.error(s)}return null})),_q={name:gA,label:cq,repository:uq,init:hq,signIn:pq,signOut:gq,fetchFiles:vq,commitChanges:bq},ag={github:G8,gitlab:lq,local:_q},zs=st(),In=ur([zs],([t],e,n)=>{n(r=>{const i=t?ag[t]:void 0;return i&&i!==r&&i.init(),i})}),Hh=st(!0),zd=st({message:"",canRetry:!1}),ja=st(!0),Iv=t=>{let e=t.cause?.message||ne(le)("unexpected_error"),n=!1;t.name==="NotFoundError"&&(e=ne(le)("sign_in_error.not_project_root"),n=!0),t.name==="AbortError"&&(e=ne(le)(ne(zs)==="local"?"sign_in_error.picker_dismissed":"sign_in_error.authentication_aborted"),n=!0),zd.set({message:e,canRetry:n}),console.error(t.message,t.cause)},yq=async()=>{const t=await ti.get("sveltia-cms.user")||await ti.get("decap-cms-user")||await ti.get("netlify-cms-user");let e=Jn(t)&&t.backendName?t:void 0;const n=e?.backendName?.replace("proxy","local")??ne(wt)?.backend?.name;zs.set(n);const r=ne(In);if(e&&r)try{e=await r.signIn({token:e.token,auto:!0})}catch{e=void 0}if(ja.set(!e),!(!e||!r)){gi.set(e);try{await r.fetchFiles(),zd.set({message:"",canRetry:!1})}catch(i){[401,403,404].includes(i.cause?.status)?ja.set(!0):Iv(i)}}},Z0=async t=>{zs.set(t);const e=ne(In);if(!e)return;let n;try{n=await e.signIn({auto:!1})}catch(r){ja.set(!0),Iv(r);return}if(ja.set(!n),!!n){gi.set(n);try{await e.fetchFiles(),zd.set({message:"",canRetry:!1})}catch(r){Iv(r)}}},wq=async()=>{await ne(In)?.signOut(),await ti.delete("sveltia-cms.user"),zs.set(void 0),gi.set(void 0),ja.set(!0),dc.set(!1)};var xq=F('<div role="alert" class="message"> </div>'),kq=F('<div role="alert"> </div>'),Sq=F('<div role="alert"><!></div>'),Eq=F('<div role="none"><!></div>'),Tq=F("<!> <!>",1),Cq=F("<!> <!>",1),Aq=F('<div role="alert"> </div>'),Pq=F('<div role="none" class="buttons svelte-8a6wia"><!> <!></div>');const Oq={hash:"svelte-8a6wia",code:".buttons.svelte-8a6wia {display:flex;flex-direction:column;align-items:center;gap:16px;}.buttons.svelte-8a6wia button {width:240px;}"};function $q(t,e){se(e,!0),Te(t,Oq);const[n,r]=ve(),i=()=>z(wt,"$siteConfig",n),s=()=>z(ja,"$unauthenticated",n),o=()=>z(le,"$_",n),a=()=>z(zd,"$signInError",n);let c=ae(!1),u=ae(!1),d=ae(!1);const f=w(()=>i()?.backend?.name),h=w(()=>l(f)?ag[l(f)]:null),p=w(()=>i()?.backend?.repo?.split("/")?.[1]);cn(()=>{const{hostname:x}=window.location;$(c,ie(x==="127.0.0.1"||x==="localhost"||x.endsWith(".localhost"))),$(u,"showDirectoryPicker"in window),$(d,ie(navigator.userAgentData?.brands.some(({brand:k})=>k==="Brave")??!1)),yq()});var g=Pq(),m=R(g);{var v=x=>{var k=xq(),S=R(k);q(C=>Z(S,C),[()=>o()("signing_in")]),T(x,k)},_=x=>{var k=W(),S=M(k);{var C=A=>{var O=kq(),L=R(O);q(I=>Z(L,I),[()=>o()("config.error.unsupported_backend",{values:{name:l(f)}})]),T(A,O)},E=A=>{var O=Cq(),L=M(O);const I=w(()=>o()("sign_in_with_x",{values:{service:l(h).label}}));Ze(L,{variant:"primary",get label(){return l(I)},onclick:async()=>{await Z0(l(f))}});var N=D(L,2);{var j=H=>{var B=Tq(),V=M(B);const G=w(()=>o()("work_with_local_repo")),K=w(()=>!l(u));Ze(V,{variant:"primary",get label(){return l(G)},get disabled(){return l(K)},onclick:async()=>{await Z0("local")}});var ee=D(V,2);{var J=te=>{var ce=Sq(),he=R(ce);{var re=fe=>{var be=W(),ue=M(be);br(ue,()=>fi.sanitize(o()("local_backend.disabled").replace("<a>",'<a href="https://github.com/sveltia/sveltia-cms#enabling-local-development-in-brave" target="_blank">'),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target"]})),T(fe,be)},X=fe=>{var be=Ue();q(ue=>Z(be,ue),[()=>o()("local_backend.unsupported_browser")]),T(fe,be)};U(he,fe=>{l(d)?fe(re):fe(X,!1)})}T(te,ce)},Y=te=>{var ce=W(),he=M(ce);{var re=X=>{var fe=Eq(),be=R(fe);{var ue=_e=>{var Ae=Ue();q(Ce=>Z(Ae,Ce),[()=>o()("work_with_local_repo_description",{values:{repo:l(p)}})]),T(_e,Ae)},Ee=_e=>{var Ae=Ue();q(Ce=>Z(Ae,Ce),[()=>o()("work_with_local_repo_description_no_repo")]),T(_e,Ae)};U(be,_e=>{l(p)?_e(ue):_e(Ee,!1)})}T(X,fe)};U(he,X=>{a().message||X(re)},!0)}T(te,ce)};U(ee,te=>{l(u)?te(Y,!1):te(J)})}T(H,B)};U(N,H=>{l(c)&&H(j)})}T(A,O)};U(S,A=>{l(h)?A(E,!1):A(C)},!0)}T(x,k)};U(m,x=>{s()?x(_,!1):x(v)})}var b=D(m,2);{var y=x=>{var k=Aq(),S=R(k);q(()=>Z(S,a().message)),T(x,k)};U(b,x=>{a().message&&a().canRetry&&x(y)})}T(t,g),oe(),r()}const rt=st(),Ji=st(!0),mA=ur([rt],([t])=>{if(!t)return!1;const{originalLocales:e,currentLocales:n,originalSlugs:r,currentSlugs:i,originalValues:s,currentValues:o}=t;return!zn(e,n)||!zn(r,i)||!zn(s,o)});rt.subscribe(t=>{ne(Tt).devModeEnabled&&console.info("entryDraft",t)});const tl=st(!1),Rv=st(!1),pu=st({show:!1,multiple:!1}),Dv=st({id:void 0,show:!1,status:"success",message:void 0,count:1,sourceLocale:void 0}),ra=st(null),_o=st(null),Ei=st(),fc=st(),Js=t=>{rt.update(e=>(e&&Object.entries(t).forEach(([n,r])=>{e.expanderStates._[n]!==r&&(e.expanderStates._[n]=r)}),e))},vA=({collectionName:t,fileName:e,valueMap:n,keyPath:r})=>{const i=new Set;return r.split(".").forEach((s,o,a)=>{const c=a.slice(0,o+1).join("."),u=_n({collectionName:t,fileName:e,valueMap:n,keyPath:c}),d=/\.\d+$/.test(c);if(u?.widget==="object")d&&i.add(c),i.add(`${c}#`);else if(u?.widget==="list")i.add(d?c:`${c}#`);else if(o>0){const f=a.slice(0,o).join("."),h=_n({collectionName:t,fileName:e,valueMap:n,keyPath:f});h?.widget==="object"&&h.fields&&i.add(`${f}.${h.name}#`),h?.widget==="list"&&h.field&&i.add(c)}}),[...i]},Lq=({collectionName:t,fileName:e,currentValues:n})=>{const r={};Object.entries(ne(rt)?.validities??{}).forEach(([i,s])=>{Object.entries(s).forEach(([o,{valid:a}])=>{a||vA({collectionName:t,fileName:e,valueMap:n[i],keyPath:o}).forEach(c=>{r[c]=!0})})}),Js(r)},Nq=async({repository:t})=>{const{databaseName:e}=t??{},n=e?new jo(e,"ui-settings"):null,r="entry-view",i={showPreview:!0,syncScrolling:!0,selectAssetsView:{type:"grid"},...await n?.get(r)??{}};Ei.set(i),fc.set(i.selectAssetsView),Ei.subscribe(s=>{(async()=>{try{zn(s,await n?.get(r))||await n?.set(r,s)}catch{}})()}),fc.subscribe(s=>{if(!s||!Object.keys(s).length)return;const o=ne(Ei)?.selectAssetsView??{};zn(s,o)||Ei.update(a=>({...a,selectAssetsView:s}))})};In.subscribe(t=>{t&&!ne(Ei)&&Nq(t)});const bA=ur([tl,Xo],([t,e])=>t||e),Mv=st(""),bs=st(""),jd=(t=window.location)=>{const{pathname:e,searchParams:n}=new URL(`${t.origin}${t.hash.substring(1)}`);return{path:decodeURIComponent(e),params:Object.fromEntries(n)}},Un=(t,{state:e={},replaceState:n=!1,notifyChange:r=!0}={})=>{const i=window.location.hash,s=`#${t}`,o=[{...e,from:i},"",s];n?window.history.replaceState(...o):window.history.pushState(...o),r&&window.dispatchEvent(new HashChangeEvent("hashchange",{oldURL:i,newURL:s}))},Ul=(t,e={})=>{window.history.state?.from?window.history.back():Un(t,e)},_A=()=>{const{display_url:t,_siteURL:e}=ne(wt);window.open(t||e||"/","_blank")};var Iq=F('<img alt="" class="logo svelte-4zxkou">'),Rq=F('<div role="alert" class="message"> </div>'),Dq=F('<div role="alert" class="message"> </div>'),Mq=F('<div role="alert" class="message"> </div>'),Fq=F('<div role="alert"><div role="none" class="message"> </div> <div role="none" class="error svelte-4zxkou"><!></div></div>'),zq=F('<div role="alert" class="message"> </div>'),jq=F('<div role="alert" class="message"> </div> <!>',1),Uq=F('<div role="none" class="container svelte-4zxkou"><div role="none" class="inner svelte-4zxkou"><!> <h1 class="svelte-4zxkou">Sveltia CMS</h1> <!></div></div>');const Bq={hash:"svelte-4zxkou",code:".container.svelte-4zxkou {position:absolute;inset:0;z-index:101;flex:auto;display:flex;justify-content:center;align-items:center;gap:16px;padding:32px;transition:filter 250ms;}.container[inert].svelte-4zxkou {filter:opacity(0);}.container.svelte-4zxkou .inner:where(.svelte-4zxkou) {display:flex;flex-direction:column;align-items:center;gap:32px;min-width:240px;max-width:800px;min-height:240px;}.container.svelte-4zxkou .logo:where(.svelte-4zxkou) {max-width:160px;height:auto;}.container.svelte-4zxkou h1:where(.svelte-4zxkou) {font-size:48px;}.container.svelte-4zxkou .logo:where(.svelte-4zxkou) ~ h1:where(.svelte-4zxkou) {font-size:var(--sui-font-size-xxx-large);}.container.svelte-4zxkou .message {margin:0 0 16px;font-size:var(--sui-font-size-large);font-weight:var(--sui-font-weight-normal);text-align:center;}.container.svelte-4zxkou .error:where(.svelte-4zxkou) {border-radius:var(--sui-control-medium-border-radius);padding:12px;background-color:var(--sui-secondary-background-color);font-size:var(--sui-font-size-default);line-height:1.5;text-align:center;}"};function qq(t,e){se(e,!0),Te(t,Bq);const[n,r]=ve(),i=()=>z(le,"$_",n),s=()=>z(gi,"$user",n),o=()=>z(dc,"$dataLoaded",n),a=()=>z(wt,"$siteConfig",n),c=()=>z(Pv,"$siteConfigError",n),u=()=>z(vv,"$prefsError",n),d=()=>z(Tt,"$prefs",n),f=()=>z(zd,"$signInError",n),h=()=>z(eT,"$inAuthPopup",n),p=()=>z(ja,"$unauthenticated",n),g=()=>z(Ta,"$dataLoadedProgress",n);Be(()=>{ot(bs,i()("welcome_to_sveltia_cms"))});var m=Uq(),v=R(m),_=R(v);{var b=S=>{var C=Iq();const E=w(()=>a()?.logo_url);q(A=>ke(C,"src",A),[()=>l(E)||`data:image/svg+xml;base64,${btoa(UE)}`]),T(S,C)};U(_,S=>{(a()||c())&&S(b)})}var y=D(_,4);{var x=S=>{var C=Rq(),E=R(C);q(A=>Z(E,`${c().message??""}
562
- ${A??""}`),[()=>i()("config.error.try_again")]),T(S,C)},k=S=>{var C=W(),E=M(C);{var A=L=>{var I=Dq(),N=R(I);q(j=>Z(N,j),[()=>i()(`prefs.error.${u().type}`)]),T(L,I)},O=L=>{var I=W(),N=M(I);{var j=B=>{var V=Mq(),G=R(V);q(K=>Z(G,K),[()=>i()("loading_site_config")]),T(B,V)},H=B=>{var V=W(),G=M(V);{var K=J=>{var Y=Fq(),te=R(Y),ce=R(te),he=D(te,2),re=R(he);br(re,()=>fi.sanitize(Ot.parseInline(f().message),{ALLOWED_TAGS:["a","code"],ALLOWED_ATTR:["href"]})),q(X=>Z(ce,X),[()=>i()("loading_site_data_error")]),T(J,Y)},ee=J=>{var Y=W(),te=M(Y);{var ce=re=>{var X=zq(),fe=R(X);q(be=>Z(fe,be),[()=>i()("authorizing")]),T(re,X)},he=re=>{var X=W(),fe=M(X);{var be=Ee=>{$q(Ee,{})},ue=Ee=>{var _e=W(),Ae=M(_e);{var Ce=$e=>{var Ve=jq(),We=M(Ve),ht=R(We),Ge=D(We,2);{var pe=ye=>{sN(ye,{get now(){return g()}})};U(Ge,ye=>{g()!==void 0&&ye(pe)})}q(ye=>Z(ht,ye),[()=>i()("loading_site_data")]),T($e,Ve)};U(Ae,$e=>{o()||$e(Ce)},!0)}T(Ee,_e)};U(fe,Ee=>{!s()||p()?Ee(be):Ee(ue,!1)},!0)}T(re,X)};U(te,re=>{h()?re(ce):re(he,!1)},!0)}T(J,Y)};U(G,J=>{f().message&&!f().canRetry?J(K):J(ee,!1)},!0)}T(B,V)};U(N,B=>{!a()||!d()?B(j):B(H,!1)},!0)}T(L,I)};U(E,L=>{u()?L(A):L(O,!1)},!0)}T(S,C)};U(y,S=>{c()?S(x):S(k,!1)})}q(()=>m.inert=s()&&o()),T(t,m),oe(),r()}var Hq=F(" <!>",1),Vq=F('<svelte-css-wrapper style="display: contents"><!></svelte-css-wrapper>',1);function Wq(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(In,"$backend",n),s=()=>z(wt,"$siteConfig",n),o=()=>z(le,"$_",n),a=5*60*1e3;let c=0,u=ae(!1),d=ae("none");const f=async()=>{i()?.checkStatus&&$(d,ie(await i().checkStatus()))},h=()=>{f(),c=window.setInterval(()=>{f()},a)},p=()=>{window.clearInterval(c),$(d,"none")},g=()=>{l(u)&&(i()?.checkStatus&&!s()?.backend.api_root?h():p())};cn(()=>($(u,!0),()=>{p()})),Be(()=>{l(u),i(),s(),g()});var m=W(),v=M(m);{var _=b=>{var y=Vq(),x=M(y);const k=w(()=>l(d)==="major"?"error":"warning");tp(x,()=>({"--sui-infobar-message-justify-content":"center"})),sb(x.lastChild,{get status(){return l(k)},children:(S,C)=>{var E=Hq(),A=M(E),O=D(A);const L=w(()=>o()("details"));Ze(O,{variant:"link",get label(){return l(L)},onclick:()=>{window.open(i()?.statusDashboardURL,"_blank")}}),q(I=>Z(A,`${I??""} `),[()=>o()(`backend_status.${l(d)}_incident`,{values:{service:i()?.label}})]),T(S,E)},$$slots:{default:!0}}),T(b,y)};U(v,b=>{["minor","major"].includes(l(d))&&b(_)})}T(t,m),oe(),r()}const Fv="0.60.1";var Gq=F(" <!>",1),Kq=F('<svelte-css-wrapper style="display: contents"><!></svelte-css-wrapper>',1);function Yq(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(le,"$_",n),s=60*60*1e3,o=10*60*1e3;let a=0,c=0,u=ae(!1);const d=async()=>{try{const g=await fetch("https://unpkg.com/@sveltia/cms/package.json");if(!g.ok)return;const{version:m}=await g.json();m&&m!==Fv&&(c=window.setTimeout(()=>{$(u,!0)},o))}catch{}};cn(()=>{if(document.querySelector('script[src^="https://unpkg.com/@sveltia/cms"]'))return d(),a=window.setInterval(()=>{d()},s),()=>{window.clearInterval(a),window.clearTimeout(c)}});var f=W(),h=M(f);{var p=g=>{var m=Kq(),v=M(m);tp(v,()=>({"--sui-infobar-message-justify-content":"center"})),sb(v.lastChild,{children:(_,b)=>{var y=Gq(),x=M(y),k=D(x);const S=w(()=>i()("update_now"));Ze(k,{variant:"link",get label(){return l(S)},onclick:()=>{window.location.reload()}}),q(C=>Z(x,`${C??""} `),[()=>i()("update_available")]),T(_,y)},$$slots:{default:!0}}),T(g,m)};U(h,g=>{l(u)&&g(p)})}T(t,f),oe(),r()}var Jq=F('<div role="none" class="empty svelte-17yv21"><!></div>');const Zq={hash:"svelte-17yv21",code:".empty.svelte-17yv21 {display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;padding:16px;width:100%;height:100%;text-align:center;}"};function Tr(t,e){Te(t,Zq);let n=P(e,"children",3,void 0);var r=Jq(),i=R(r);Re(i,()=>n()??Fe),T(t,r)}var Xq=F("<img>"),Qq=F("<video></video>",2),e5=F("<audio></audio>"),t5=F('<video playsinline="" class="svelte-1va4mre"></video>',2),n5=F('<img alt="" class="svelte-1va4mre">'),r5=F('<div role="none" class="blur svelte-1va4mre"><div role="none" class="overlay svelte-1va4mre"></div> <!></div>'),i5=F('<div role="none"><!> <!></div>');const s5={hash:"svelte-1va4mre",code:".preview.svelte-1va4mre {display:inline-flex;align-items:center;justify-content:center;position:relative;width:100%;height:100%;}.preview.tile.svelte-1va4mre {border-width:1px;border-style:solid;border-color:transparent;padding:var(--tile-padding, 12px);}.preview.tile.svelte-1va4mre .sui.icon {font-size:48px;}.preview.icon.svelte-1va4mre {border-radius:var(--sui-control-medium-border-radius);width:var(--icon-size, 32px);height:var(--icon-size, 32px);}.preview.tile.svelte-1va4mre, .preview.icon.svelte-1va4mre {overflow:hidden;aspect-ratio:1/1;}.preview.svelte-1va4mre .blur:where(.svelte-1va4mre) {display:contents;}.preview.svelte-1va4mre .blur:where(.svelte-1va4mre) > :where(.svelte-1va4mre) {position:absolute;inset:0;pointer-events:none;}.preview.svelte-1va4mre .blur:where(.svelte-1va4mre) .overlay {z-index:-1;backdrop-filter:blur(32px) brightness(0.8);}.preview.svelte-1va4mre .blur:where(.svelte-1va4mre) :is(img, video) {width:100%;height:100%;z-index:-2;object-fit:cover;transform:scale(1.2);}.preview.cover.svelte-1va4mre {padding:0;}.preview.cover.svelte-1va4mre > :is(img, video) {flex:auto;}.preview.svelte-1va4mre > :is(img, video) {flex:0;max-width:100%;max-height:100%;}.preview.dissolve.svelte-1va4mre :is(img, video) {opacity:0;transition:opacity 250ms;}.preview.dissolve.loaded.svelte-1va4mre :is(img, video) {opacity:1;}.checkerboard.svelte-1va4mre img:where(.svelte-1va4mre) {background-image:linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%), linear-gradient(45deg, #ccc 25%, #fff 25%, #fff 75%, #ccc 75%);background-size:8px 8px;background-position:0 0, 4px 4px;}.svelte-1va4mre:not(.checkerboard) img:where(.svelte-1va4mre) {background-color:#e5e5e5;}:is(img, video) {object-fit:contain;}.svelte-1va4mre:is(img, video):not([src]) {visibility:hidden;}.cover.svelte-1va4mre :is(img, video) {object-fit:cover;aspect-ratio:1/1;}"};function Ns(t,e){se(e,!0),Te(t,s5);let n=P(e,"loading",3,"lazy"),r=P(e,"asset",3,void 0),i=P(e,"src",15,void 0),s=P(e,"variant",3,void 0),o=P(e,"blurBackground",3,!1),a=P(e,"cover",3,!1),c=P(e,"checkerboard",3,!1),u=P(e,"dissolve",3,!0),d=P(e,"alt",3,""),f=P(e,"controls",3,!1),h=at(e,["$$slots","$$events","$$legacy","kind","loading","asset","src","variant","blurBackground","cover","checkerboard","dissolve","alt","controls"]),p=ae(void 0),g=ae(!1),m=ae(!1);const v=w(()=>!!r()&&!!s()),_=w(()=>l(v)||e.kind==="image"||r()?.name.endsWith(".pdf"));let b=!1;const y=async()=>{if(!(!r()||!l(p)||b)){b=!0,$(g,!1),n()==="lazy"&&await Ru(l(p));try{i(l(v)?await QC(r()):await Q_(r()))}catch{$(g,!0)}b=!1}},x=async()=>{!l(p)||!i()||((l(_)?!l(p).complete:!l(p).readyState)&&await new Promise(L=>{l(p)?.addEventListener(l(_)?"load":"loadedmetadata",()=>{L(void 0)},{once:!0})}),u()&&await Ru(l(p)),$(m,!0),r()&&l(v)&&i().startsWith("blob:")&&URL.revokeObjectURL(i()))};Be(()=>{l(p),r(),y()}),Be(()=>{l(p),i(),x()});var k=i5(),S=R(k);{var C=L=>{et(L,{name:"draft"})},E=L=>{var I=W(),N=M(I);{var j=B=>{var V=Xq();let G;$t(V,K=>$(p,K),()=>l(p)),q(()=>G=St(V,G,{loading:n(),src:i(),alt:d(),...h},"svelte-1va4mre")),T(B,V)},H=B=>{var V=W(),G=M(V);{var K=J=>{var Y=Qq();let te;$t(Y,ce=>$(p,ce),()=>l(p)),q(()=>te=St(Y,te,{src:i(),controls:f()||void 0,playsinline:!0,...h},"svelte-1va4mre")),T(J,Y)},ee=J=>{var Y=W(),te=M(Y);{var ce=re=>{var X=W(),fe=M(X);{var be=Ee=>{var _e=e5();let Ae;$t(_e,Ce=>$(p,Ce),()=>l(p)),q(()=>Ae=St(_e,Ae,{src:i(),controls:!0,playsinline:!0,...h},"svelte-1va4mre")),T(Ee,_e)},ue=Ee=>{et(Ee,{name:"audio_file"})};U(fe,Ee=>{f()?Ee(be):Ee(ue,!1)})}T(re,X)},he=re=>{et(re,{name:"draft"})};U(te,re=>{e.kind==="audio"?re(ce):re(he,!1)},!0)}T(J,Y)};U(G,J=>{e.kind==="video"?J(K):J(ee,!1)},!0)}T(B,V)};U(N,B=>{l(_)?B(j):B(H,!1)},!0)}T(L,I)};U(S,L=>{l(g)?L(C):L(E,!1)})}var A=D(S,2);{var O=L=>{var I=r5(),N=D(R(I),2);{var j=B=>{var V=t5();q(()=>ke(V,"src",i())),T(B,V)},H=B=>{var V=n5();q(()=>{ke(V,"loading",n()),ke(V,"src",i())}),T(B,V)};U(N,B=>{e.kind==="video"?B(j):B(H,!1)})}T(L,I)};U(A,L=>{o()&&L(O)})}q(()=>{Vr(k,`preview ${s()??""} svelte-1va4mre`),pt(k,"cover",a()),pt(k,"checkerboard",c()),pt(k,"dissolve",u()),pt(k,"loaded",l(m))}),T(t,k),oe()}const o5=/^(?:\d{4}-[01]\d-[0-3]\d)?(?:T?[0-2]\d:[0-5]\d)?(?::[0-5]\d)?(?:\.\d+)?(?:[+-][0-2]\d:[0-5]\d|Z)?$/,zv={year:"numeric",month:"short",day:"numeric"},jv={hour:"numeric",minute:"numeric",hour12:!0},X0=(t,e)=>{let n=()=>e?.().link,r=()=>e?.().collectionLabel,i=()=>e?.().entryLabel;var s=l5(),o=R(s);Ze(o,{role:"link",variant:"link",onclick:()=>Un(n()),children:(a,c)=>{var u=a5(),d=R(u);q(()=>Z(d,`${r()??""} › ${i()??""}`)),T(a,u)},$$slots:{default:!0}}),T(t,s)};var a5=F('<span role="none"> </span>'),l5=F("<p><!></p>"),c5=F('<div role="none" class="preview svelte-1i169qh"><!></div>'),u5=F('<section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <p> </p></section>'),d5=F('<section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <p> </p></section>'),f5=F('<a target="_blank"> </a>'),h5=F("<a> </a>"),p5=F('<section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <p> </p></section>'),g5=F('<section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <p> </p></section>'),m5=F("<p> </p>"),v5=F('<div role="none" class="detail svelte-1i169qh"><!> <section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <p> </p></section> <section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <p> </p></section> <!> <!> <section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <p><!></p></section> <section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <p><!></p></section> <!> <!> <section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <!></section></div>');const b5={hash:"svelte-1i169qh",code:".detail.svelte-1i169qh {flex:none;overflow-x:hidden;overflow-y:auto;padding:16px;width:320px;}.detail.svelte-1i169qh .preview:where(.svelte-1i169qh) {overflow:hidden;margin:0 0 16px;border-radius:var(--sui-control-large-border-radius);background-color:var(--sui-content-background-color);aspect-ratio:1/1;}.detail.svelte-1i169qh section:where(.svelte-1i169qh) {margin:0 0 16px;}.detail.svelte-1i169qh section:where(.svelte-1i169qh) > * {margin:0 0 4px;word-break:break-all;}.detail.svelte-1i169qh h4:where(.svelte-1i169qh) {font-size:var(--sui-font-size-small);font-weight:var(--sui-font-weight-bold);color:var(--sui-secondary-foreground-color);}"};function yA(t,e){se(e,!0),Te(t,b5);const[n,r]=ve(),i=()=>z(le,"$_",n),s=()=>z(Nn,"$appLocale",n);let o=P(e,"showPreview",3,!1),a=ae(ie({...Uh}));const c=w(()=>e.asset.path),u=w(()=>e.asset.size),d=w(()=>e.asset.kind),f=w(()=>e.asset.commitAuthor),h=w(()=>e.asset.commitDate),p=w(()=>l(a).publicURL),g=w(()=>l(a).repoBlobURL),m=w(()=>l(a).dimensions),v=w(()=>l(a).duration),_=w(()=>l(a).usedEntries),b=w(()=>Ln(l(c))),y=w(()=>it(l(b).extension,"")),x=w(()=>ng(l(d))||l(c).endsWith(".pdf")),k=async()=>{$(a,ie(e.asset?await ig(e.asset):{...Uh}))};Be(()=>{e.asset,k()});var S=v5(),C=R(S);{var E=me=>{var Pe=c5(),qe=R(Pe);const Xe=w(()=>l(d)==="image"),ct=w(()=>["audio","video"].includes(l(d)));Ns(qe,{get kind(){return l(d)},get asset(){return e.asset},variant:"tile",get checkerboard(){return l(Xe)},get controls(){return l(ct)}}),T(me,Pe)};U(C,me=>{o()&&l(x)&&me(E)})}var A=D(C,2),O=R(A),L=R(O),I=D(O,2),N=R(I),j=D(A,2),H=R(j),B=R(H),V=D(H,2),G=R(V),K=D(j,2);{var ee=me=>{var Pe=u5(),qe=R(Pe),Xe=R(qe),ct=D(qe,2),Ke=R(ct);q(nt=>{Z(Xe,nt),Z(Ke,l(m)?`${l(m).width}×${l(m).height}`:"–")},[()=>i()("dimensions")]),T(me,Pe)};U(K,me=>{l(x)&&me(ee)})}var J=D(K,2);{var Y=me=>{var Pe=d5(),qe=R(Pe),Xe=R(qe),ct=D(qe,2),Ke=R(ct);q((nt,dt)=>{Z(Xe,nt),Z(Ke,dt)},[()=>i()("duration"),()=>l(v)?JB(l(v)):"–"]),T(me,Pe)};U(J,me=>{["audio","video"].includes(l(d))&&me(Y)})}var te=D(J,2),ce=R(te),he=R(ce),re=D(ce,2),X=R(re);{var fe=me=>{var Pe=f5(),qe=R(Pe);q(()=>{ke(Pe,"href",l(p)),Z(qe,l(p))}),T(me,Pe)},be=me=>{var Pe=Ue("–");T(me,Pe)};U(X,me=>{l(p)?me(fe):me(be,!1)})}var ue=D(te,2),Ee=R(ue),_e=R(Ee),Ae=D(Ee,2),Ce=R(Ae);{var $e=me=>{var Pe=h5(),qe=R(Pe);q(()=>{ke(Pe,"href",l(g)),Z(qe,`/${l(c)??""}`)}),T(me,Pe)},Ve=me=>{var Pe=Ue();q(()=>Z(Pe,`/${l(c)??""}`)),T(me,Pe)};U(Ce,me=>{l(g)?me($e):me(Ve,!1)})}var We=D(ue,2);{var ht=me=>{var Pe=p5(),qe=R(Pe),Xe=R(qe),ct=D(qe,2),Ke=R(ct);q(nt=>{Z(Xe,nt),Z(Ke,l(f).name||l(f).login||l(f).email)},[()=>i()("sort_keys.commit_author")]),T(me,Pe)};U(We,me=>{l(f)&&me(ht)})}var Ge=D(We,2);{var pe=me=>{var Pe=g5(),qe=R(Pe),Xe=R(qe),ct=D(qe,2),Ke=R(ct);q((nt,dt)=>{Z(Xe,nt),Z(Ke,dt)},[()=>i()("sort_keys.commit_date"),()=>l(h).toLocaleString(s()??void 0,{...zv,...jv})]),T(me,Pe)};U(Ge,me=>{l(h)&&me(pe)})}var ye=D(Ge,2),we=R(ye),xe=R(we),Ne=D(we,2);ft(Ne,17,()=>l(_),me=>me.sha,(me,Pe)=>{var qe=W(),Xe=M(qe);ft(Xe,17,()=>co(l(Pe)),ct=>ct.name,(ct,Ke)=>{var nt=W();const dt=w(()=>l(Ke).label||l(Ke).name);var ut=M(nt);ft(ut,17,()=>Zo(l(Ke),l(Pe)),bt=>bt.name,(bt,Ct)=>{X0(bt,()=>({link:`/collections/${l(Ke).name}/entries/${l(Ct).name}`,collectionLabel:l(dt),entryLabel:l(Ct).label||l(Ct).name}))},bt=>{var Ct=Ye(()=>({link:`/collections/${l(Ke).name}/entries/${l(Pe).subPath}`,collectionLabel:l(dt),entryLabel:qo(l(Ke),l(Pe),{useTemplate:!0})}));X0(bt,()=>l(Ct))}),T(ct,nt)}),T(me,qe)},me=>{var Pe=m5(),qe=R(Pe);q(Xe=>Z(qe,Xe),[()=>i()("sort_keys.none")]),T(me,Pe)}),q((me,Pe,qe,Xe,ct,Ke,nt)=>{Z(L,me),Z(N,Pe),Z(B,qe),Z(G,Xe),Z(he,ct),Z(_e,Ke),Z(xe,nt)},[()=>i()("kind"),()=>i()(`file_type_labels.${l(y)}`,{default:Jo.getType(l(c))??l(y).toUpperCase()}),()=>i()("size"),()=>s()?K_(l(u)):"",()=>i()("public_url"),()=>i()("file_path"),()=>i()("used_in")]),T(t,S),oe(),r()}var _5=F("<!> <!> <!>",1),y5=F("<!> <!>",1);function wA(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(le,"$_",n);let s=P(e,"assets",19,()=>[]),o=ae(ie([])),a=ae(!1);const c=ie({show:!1,text:"",status:"success"}),u=w(()=>s().length===1),d=w(()=>l(o).filter(({publicURL:S})=>!!S).map(({publicURL:S})=>S));let f;const h=async()=>{if(f=void 0,!l(u))return!1;const S=await el(s()[0]);return f=S,Nu(S.type)?!0:S.type.startsWith("image/")?typeof navigator.clipboard.write=="function":!1},p=async()=>{await navigator.clipboard.writeText(l(d).join(`
561
+ `);if(a.push(...Object.values(c.project.repository).map(({lastCommit:u})=>u)),!o.length)break}return Object.fromEntries(t.map(({path:c,sha:u},d)=>{const{size:f,rawTextBlob:h}=s[d],p=a[d],g={sha:u,size:Number(f),text:h,meta:{}};if(p){const{author:m,authorName:v,authorEmail:_,committedDate:b}=p,{id:y,username:x}=m??{},k=y?.match(/\d+/);g.meta={commitAuthor:{name:v,email:_,id:k?Number(k[0]):void 0,login:x},committedDate:new Date(b)}}return[c,g]}))},s5=async()=>{await e5(),await cA({repository:Fs,fetchDefaultBranchName:t5,fetchLastCommit:n5,fetchFileList:r5,fetchFileContents:i5})},o5=async t=>{const{owner:e,repo:n,branch:r=""}=Fs,{path:i}=t;return Fd(`/projects/${encodeURIComponent(`${e}/${n}`)}/repository/files/${encodeURIComponent(i)}/raw?ref=${encodeURIComponent(r)}`,{},{responseType:"blob"})},a5=async(t,e)=>{const{owner:n,repo:r,branch:i}=Fs;return(await Fd(`/projects/${encodeURIComponent(`${n}/${r}`)}/repository/commits`,{method:"POST",body:{branch:i,commit_message:nA(t,e),actions:await Promise.all(t.map(async({action:o,path:a,previousPath:c,data:u="",base64:d})=>({action:o,content:d??(typeof u!="string"?await hk(u):u),encoding:d||typeof u!="string"?"base64":"text",file_path:a,previous_path:c})))}})).web_url},l5={name:ba,label:hA,repository:Fs,statusDashboardURL:Kq,checkStatus:Jq,getRepositoryInfo:pA,init:Zq,signIn:Xq,signOut:Qq,fetchFiles:s5,fetchBlob:o5,commitChanges:a5},gA="local",c5="Local Repository";let Lv;const u5=new Proxy({},{get:(t,e)=>(Lv??Lq)[e]}),dy=st(null),Nv="root_dir_handle";let qh;const d5=async({forceReload:t=!1,showPicker:e=!0}={})=>{if(!("showDirectoryPicker"in window))throw new Error("unsupported");let n=t?null:await qh?.get(Nv)??null;if(n)if(await n.requestPermission({mode:"readwrite"})!=="granted")n=null;else try{await n.entries().next()}catch(r){n=null,console.error(r)}return!n&&e&&(n=await window.showDirectoryPicker(),n&&(await n.getDirectoryHandle(".git"),await qh?.set(Nv,n))),n},f5=async()=>{await qh?.delete(Nv)},h5=()=>{const{name:t}=ne(wt).backend;Lv=ag[t]?.getRepositoryInfo?.();const{databaseName:e}=Lv??{};qh=e?new jo(e,"file-system-handles"):null},p5=async({auto:t=!1})=>{const e=await d5({showPicker:!t});if(e)dy.set(e);else throw new Error("Directory handle could not be acquired");return{backendName:gA}},g5=async()=>{f5()},ru=async t=>{let e=ne(dy);if(!t)return e;const n=Fn(t).split("/"),r=!0;for(const i of n)e=await(i.includes(".")?e.getFileHandle(i,{create:r}):e.getDirectoryHandle(i,{create:r}));return e},m5=async()=>{const t=ne(dy),e=[],n=rc([...ne(ry).map(({filePathMap:o,folderPathMap:a})=>Object.values(o||(a??{}))).flat(1),...ne(hi).map(({internalPath:o})=>o)].map(o=>Fn(o??""))),r=o=>new RegExp(`^${ln(o)}\\b`),i=n.map(r),s=async o=>{for await(const[a,c]of o.entries()){if(a.startsWith("."))continue;const u=(await t?.resolve(c))?.join("/")??"",d=i.some(f=>f.test(u));if(c.kind==="file"){if(!d)continue;try{let f=await c.getFile();f=new File([f],f.name,{type:f.type,lastModified:f.lastModified}),e.push({file:f,path:u})}catch(f){console.error(f)}}if(c.kind==="directory"){const f=r(u);if(!d&&!n.some(h=>f.test(h)))continue;await s(c)}}};return await s(t),Promise.all(e.map(async({file:o,path:a})=>({file:o,path:a.normalize(),size:o.size,sha:await(async()=>{try{return await Pa(o)}catch(c){console.error(c)}return""})()})))},v5=async()=>{const{entryFiles:t,assetFiles:e}=$v(await m5());await Promise.all(t.map(async i=>{try{i.text=await qP(i.file)}catch(s){i.text="",console.error(s)}}));const{entries:n,errors:r}=await lA(t);ii.set(n),iy.set(r),en.set(rA(e)),dc.set(!0)},b5=async t=>Promise.all(t.map(async({action:e,path:n,previousPath:r,data:i})=>{try{let s;if(e==="move"&&r){const{dirname:o,basename:a}=Ln(n);s=await ru(r),o&&o!==Ln(r).dirname?await s.move(await ru(o),a):await s.move(a)}if(["create","update","move"].includes(e)&&i){s??=await ru(n);const o=await s.createWritable();try{await o.write(i)}catch{}finally{await o.close()}return s.getFile()}if(e==="delete"){const{dirname:o="",basename:a}=Ln(Fn(n));let c=await ru(o);if(await c.removeEntry(a),!o)return null;const u=o.split("/");for(;;){const d=[];for await(const h of c.keys())d.push(h);if(d.length>1||!u.length)break;const f=u.pop();c=await ru(u.join("/")),c.removeEntry(f)}}}catch(s){console.error(s)}return null})),_5={name:gA,label:c5,repository:u5,init:h5,signIn:p5,signOut:g5,fetchFiles:v5,commitChanges:b5},ag={github:Gq,gitlab:l5,local:_5},zs=st(),In=ur([zs],([t],e,n)=>{n(r=>{const i=t?ag[t]:void 0;return i&&i!==r&&i.init(),i})}),Hh=st(!0),zd=st({message:"",canRetry:!1}),ja=st(!0),Iv=t=>{let e=t.cause?.message||ne(le)("unexpected_error"),n=!1;t.name==="NotFoundError"&&(e=ne(le)("sign_in_error.not_project_root"),n=!0),t.name==="AbortError"&&(e=ne(le)(ne(zs)==="local"?"sign_in_error.picker_dismissed":"sign_in_error.authentication_aborted"),n=!0),zd.set({message:e,canRetry:n}),console.error(t.message,t.cause)},y5=async()=>{const t=await ti.get("sveltia-cms.user")||await ti.get("decap-cms-user")||await ti.get("netlify-cms-user");let e=Jn(t)&&t.backendName?t:void 0;const n=e?.backendName?.replace("proxy","local")??ne(wt)?.backend?.name;zs.set(n);const r=ne(In);if(e&&r)try{e=await r.signIn({token:e.token,auto:!0})}catch{e=void 0}if(ja.set(!e),!(!e||!r)){gi.set(e);try{await r.fetchFiles(),zd.set({message:"",canRetry:!1})}catch(i){[401,403,404].includes(i.cause?.status)?ja.set(!0):Iv(i)}}},Z0=async t=>{zs.set(t);const e=ne(In);if(!e)return;let n;try{n=await e.signIn({auto:!1})}catch(r){ja.set(!0),Iv(r);return}if(ja.set(!n),!!n){gi.set(n);try{await e.fetchFiles(),zd.set({message:"",canRetry:!1})}catch(r){Iv(r)}}},w5=async()=>{await ne(In)?.signOut(),await ti.delete("sveltia-cms.user"),zs.set(void 0),gi.set(void 0),ja.set(!0),dc.set(!1)};var x5=F('<div role="alert" class="message"> </div>'),k5=F('<div role="alert"> </div>'),S5=F('<div role="alert"><!></div>'),E5=F('<div role="none"><!></div>'),T5=F("<!> <!>",1),C5=F("<!> <!>",1),A5=F('<div role="alert"> </div>'),P5=F('<div role="none" class="buttons svelte-8a6wia"><!> <!></div>');const O5={hash:"svelte-8a6wia",code:".buttons.svelte-8a6wia {display:flex;flex-direction:column;align-items:center;gap:16px;}.buttons.svelte-8a6wia button {width:240px;}"};function $5(t,e){se(e,!0),Te(t,O5);const[n,r]=ve(),i=()=>z(wt,"$siteConfig",n),s=()=>z(ja,"$unauthenticated",n),o=()=>z(le,"$_",n),a=()=>z(zd,"$signInError",n);let c=ae(!1),u=ae(!1),d=ae(!1);const f=w(()=>i()?.backend?.name),h=w(()=>l(f)?ag[l(f)]:null),p=w(()=>i()?.backend?.repo?.split("/")?.[1]);cn(()=>{const{hostname:x}=window.location;$(c,ie(x==="127.0.0.1"||x==="localhost"||x.endsWith(".localhost"))),$(u,"showDirectoryPicker"in window),$(d,ie(navigator.userAgentData?.brands.some(({brand:k})=>k==="Brave")??!1)),y5()});var g=P5(),m=R(g);{var v=x=>{var k=x5(),S=R(k);q(C=>Z(S,C),[()=>o()("signing_in")]),T(x,k)},_=x=>{var k=W(),S=M(k);{var C=A=>{var O=k5(),L=R(O);q(I=>Z(L,I),[()=>o()("config.error.unsupported_backend",{values:{name:l(f)}})]),T(A,O)},E=A=>{var O=C5(),L=M(O);const I=w(()=>o()("sign_in_with_x",{values:{service:l(h).label}}));Ze(L,{variant:"primary",get label(){return l(I)},onclick:async()=>{await Z0(l(f))}});var N=D(L,2);{var j=H=>{var B=T5(),V=M(B);const G=w(()=>o()("work_with_local_repo")),K=w(()=>!l(u));Ze(V,{variant:"primary",get label(){return l(G)},get disabled(){return l(K)},onclick:async()=>{await Z0("local")}});var ee=D(V,2);{var J=te=>{var ce=S5(),he=R(ce);{var re=fe=>{var be=W(),ue=M(be);br(ue,()=>fi.sanitize(o()("local_backend.disabled").replace("<a>",'<a href="https://github.com/sveltia/sveltia-cms#enabling-local-development-in-brave" target="_blank">'),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target"]})),T(fe,be)},X=fe=>{var be=Ue();q(ue=>Z(be,ue),[()=>o()("local_backend.unsupported_browser")]),T(fe,be)};U(he,fe=>{l(d)?fe(re):fe(X,!1)})}T(te,ce)},Y=te=>{var ce=W(),he=M(ce);{var re=X=>{var fe=E5(),be=R(fe);{var ue=_e=>{var Ae=Ue();q(Ce=>Z(Ae,Ce),[()=>o()("work_with_local_repo_description",{values:{repo:l(p)}})]),T(_e,Ae)},Ee=_e=>{var Ae=Ue();q(Ce=>Z(Ae,Ce),[()=>o()("work_with_local_repo_description_no_repo")]),T(_e,Ae)};U(be,_e=>{l(p)?_e(ue):_e(Ee,!1)})}T(X,fe)};U(he,X=>{a().message||X(re)},!0)}T(te,ce)};U(ee,te=>{l(u)?te(Y,!1):te(J)})}T(H,B)};U(N,H=>{l(c)&&H(j)})}T(A,O)};U(S,A=>{l(h)?A(E,!1):A(C)},!0)}T(x,k)};U(m,x=>{s()?x(_,!1):x(v)})}var b=D(m,2);{var y=x=>{var k=A5(),S=R(k);q(()=>Z(S,a().message)),T(x,k)};U(b,x=>{a().message&&a().canRetry&&x(y)})}T(t,g),oe(),r()}const rt=st(),Ji=st(!0),mA=ur([rt],([t])=>{if(!t)return!1;const{originalLocales:e,currentLocales:n,originalSlugs:r,currentSlugs:i,originalValues:s,currentValues:o}=t;return!zn(e,n)||!zn(r,i)||!zn(s,o)});rt.subscribe(t=>{ne(Tt).devModeEnabled&&console.info("entryDraft",t)});const tl=st(!1),Rv=st(!1),pu=st({show:!1,multiple:!1}),Dv=st({id:void 0,show:!1,status:"success",message:void 0,count:1,sourceLocale:void 0}),ra=st(null),_o=st(null),Ei=st(),fc=st(),Js=t=>{rt.update(e=>(e&&Object.entries(t).forEach(([n,r])=>{e.expanderStates._[n]!==r&&(e.expanderStates._[n]=r)}),e))},vA=({collectionName:t,fileName:e,valueMap:n,keyPath:r})=>{const i=new Set;return r.split(".").forEach((s,o,a)=>{const c=a.slice(0,o+1).join("."),u=_n({collectionName:t,fileName:e,valueMap:n,keyPath:c}),d=/\.\d+$/.test(c);if(u?.widget==="object")d&&i.add(c),i.add(`${c}#`);else if(u?.widget==="list")i.add(d?c:`${c}#`);else if(o>0){const f=a.slice(0,o).join("."),h=_n({collectionName:t,fileName:e,valueMap:n,keyPath:f});h?.widget==="object"&&h.fields&&i.add(`${f}.${h.name}#`),h?.widget==="list"&&h.field&&i.add(c)}}),[...i]},L5=({collectionName:t,fileName:e,currentValues:n})=>{const r={};Object.entries(ne(rt)?.validities??{}).forEach(([i,s])=>{Object.entries(s).forEach(([o,{valid:a}])=>{a||vA({collectionName:t,fileName:e,valueMap:n[i],keyPath:o}).forEach(c=>{r[c]=!0})})}),Js(r)},N5=async({repository:t})=>{const{databaseName:e}=t??{},n=e?new jo(e,"ui-settings"):null,r="entry-view",i={showPreview:!0,syncScrolling:!0,selectAssetsView:{type:"grid"},...await n?.get(r)??{}};Ei.set(i),fc.set(i.selectAssetsView),Ei.subscribe(s=>{(async()=>{try{zn(s,await n?.get(r))||await n?.set(r,s)}catch{}})()}),fc.subscribe(s=>{if(!s||!Object.keys(s).length)return;const o=ne(Ei)?.selectAssetsView??{};zn(s,o)||Ei.update(a=>({...a,selectAssetsView:s}))})};In.subscribe(t=>{t&&!ne(Ei)&&N5(t)});const bA=ur([tl,Xo],([t,e])=>t||e),Mv=st(""),bs=st(""),jd=(t=window.location)=>{const{pathname:e,searchParams:n}=new URL(`${t.origin}${t.hash.substring(1)}`);return{path:decodeURIComponent(e),params:Object.fromEntries(n)}},Un=(t,{state:e={},replaceState:n=!1,notifyChange:r=!0}={})=>{const i=window.location.hash,s=`#${t}`,o=[{...e,from:i},"",s];n?window.history.replaceState(...o):window.history.pushState(...o),r&&window.dispatchEvent(new HashChangeEvent("hashchange",{oldURL:i,newURL:s}))},Ul=(t,e={})=>{window.history.state?.from?window.history.back():Un(t,e)},_A=()=>{const{display_url:t,_siteURL:e}=ne(wt);window.open(t||e||"/","_blank")};var I5=F('<img alt="" class="logo svelte-4zxkou">'),R5=F('<div role="alert" class="message"> </div>'),D5=F('<div role="alert" class="message"> </div>'),M5=F('<div role="alert" class="message"> </div>'),F5=F('<div role="alert"><div role="none" class="message"> </div> <div role="none" class="error svelte-4zxkou"><!></div></div>'),z5=F('<div role="alert" class="message"> </div>'),j5=F('<div role="alert" class="message"> </div> <!>',1),U5=F('<div role="none" class="container svelte-4zxkou"><div role="none" class="inner svelte-4zxkou"><!> <h1 class="svelte-4zxkou">Sveltia CMS</h1> <!></div></div>');const B5={hash:"svelte-4zxkou",code:".container.svelte-4zxkou {position:absolute;inset:0;z-index:101;flex:auto;display:flex;justify-content:center;align-items:center;gap:16px;padding:32px;transition:filter 250ms;}.container[inert].svelte-4zxkou {filter:opacity(0);}.container.svelte-4zxkou .inner:where(.svelte-4zxkou) {display:flex;flex-direction:column;align-items:center;gap:32px;min-width:240px;max-width:800px;min-height:240px;}.container.svelte-4zxkou .logo:where(.svelte-4zxkou) {max-width:160px;height:auto;}.container.svelte-4zxkou h1:where(.svelte-4zxkou) {font-size:48px;}.container.svelte-4zxkou .logo:where(.svelte-4zxkou) ~ h1:where(.svelte-4zxkou) {font-size:var(--sui-font-size-xxx-large);}.container.svelte-4zxkou .message {margin:0 0 16px;font-size:var(--sui-font-size-large);font-weight:var(--sui-font-weight-normal);text-align:center;}.container.svelte-4zxkou .error:where(.svelte-4zxkou) {border-radius:var(--sui-control-medium-border-radius);padding:12px;background-color:var(--sui-secondary-background-color);font-size:var(--sui-font-size-default);line-height:1.5;text-align:center;}"};function q5(t,e){se(e,!0),Te(t,B5);const[n,r]=ve(),i=()=>z(le,"$_",n),s=()=>z(gi,"$user",n),o=()=>z(dc,"$dataLoaded",n),a=()=>z(wt,"$siteConfig",n),c=()=>z(Pv,"$siteConfigError",n),u=()=>z(vv,"$prefsError",n),d=()=>z(Tt,"$prefs",n),f=()=>z(zd,"$signInError",n),h=()=>z(eT,"$inAuthPopup",n),p=()=>z(ja,"$unauthenticated",n),g=()=>z(Ta,"$dataLoadedProgress",n);Be(()=>{ot(bs,i()("welcome_to_sveltia_cms"))});var m=U5(),v=R(m),_=R(v);{var b=S=>{var C=I5();const E=w(()=>a()?.logo_url);q(A=>ke(C,"src",A),[()=>l(E)||`data:image/svg+xml;base64,${btoa(UE)}`]),T(S,C)};U(_,S=>{(a()||c())&&S(b)})}var y=D(_,4);{var x=S=>{var C=R5(),E=R(C);q(A=>Z(E,`${c().message??""}
562
+ ${A??""}`),[()=>i()("config.error.try_again")]),T(S,C)},k=S=>{var C=W(),E=M(C);{var A=L=>{var I=D5(),N=R(I);q(j=>Z(N,j),[()=>i()(`prefs.error.${u().type}`)]),T(L,I)},O=L=>{var I=W(),N=M(I);{var j=B=>{var V=M5(),G=R(V);q(K=>Z(G,K),[()=>i()("loading_site_config")]),T(B,V)},H=B=>{var V=W(),G=M(V);{var K=J=>{var Y=F5(),te=R(Y),ce=R(te),he=D(te,2),re=R(he);br(re,()=>fi.sanitize(Ot.parseInline(f().message),{ALLOWED_TAGS:["a","code"],ALLOWED_ATTR:["href"]})),q(X=>Z(ce,X),[()=>i()("loading_site_data_error")]),T(J,Y)},ee=J=>{var Y=W(),te=M(Y);{var ce=re=>{var X=z5(),fe=R(X);q(be=>Z(fe,be),[()=>i()("authorizing")]),T(re,X)},he=re=>{var X=W(),fe=M(X);{var be=Ee=>{$5(Ee,{})},ue=Ee=>{var _e=W(),Ae=M(_e);{var Ce=$e=>{var Ve=j5(),We=M(Ve),ht=R(We),Ge=D(We,2);{var pe=ye=>{sN(ye,{get now(){return g()}})};U(Ge,ye=>{g()!==void 0&&ye(pe)})}q(ye=>Z(ht,ye),[()=>i()("loading_site_data")]),T($e,Ve)};U(Ae,$e=>{o()||$e(Ce)},!0)}T(Ee,_e)};U(fe,Ee=>{!s()||p()?Ee(be):Ee(ue,!1)},!0)}T(re,X)};U(te,re=>{h()?re(ce):re(he,!1)},!0)}T(J,Y)};U(G,J=>{f().message&&!f().canRetry?J(K):J(ee,!1)},!0)}T(B,V)};U(N,B=>{!a()||!d()?B(j):B(H,!1)},!0)}T(L,I)};U(E,L=>{u()?L(A):L(O,!1)},!0)}T(S,C)};U(y,S=>{c()?S(x):S(k,!1)})}q(()=>m.inert=s()&&o()),T(t,m),oe(),r()}var H5=F(" <!>",1),V5=F('<svelte-css-wrapper style="display: contents"><!></svelte-css-wrapper>',1);function W5(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(In,"$backend",n),s=()=>z(wt,"$siteConfig",n),o=()=>z(le,"$_",n),a=5*60*1e3;let c=0,u=ae(!1),d=ae("none");const f=async()=>{i()?.checkStatus&&$(d,ie(await i().checkStatus()))},h=()=>{f(),c=window.setInterval(()=>{f()},a)},p=()=>{window.clearInterval(c),$(d,"none")},g=()=>{l(u)&&(i()?.checkStatus&&!s()?.backend.api_root?h():p())};cn(()=>($(u,!0),()=>{p()})),Be(()=>{l(u),i(),s(),g()});var m=W(),v=M(m);{var _=b=>{var y=V5(),x=M(y);const k=w(()=>l(d)==="major"?"error":"warning");tp(x,()=>({"--sui-infobar-message-justify-content":"center"})),sb(x.lastChild,{get status(){return l(k)},children:(S,C)=>{var E=H5(),A=M(E),O=D(A);const L=w(()=>o()("details"));Ze(O,{variant:"link",get label(){return l(L)},onclick:()=>{window.open(i()?.statusDashboardURL,"_blank")}}),q(I=>Z(A,`${I??""} `),[()=>o()(`backend_status.${l(d)}_incident`,{values:{service:i()?.label}})]),T(S,E)},$$slots:{default:!0}}),T(b,y)};U(v,b=>{["minor","major"].includes(l(d))&&b(_)})}T(t,m),oe(),r()}const Fv="0.60.2";var G5=F(" <!>",1),K5=F('<svelte-css-wrapper style="display: contents"><!></svelte-css-wrapper>',1);function Y5(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(le,"$_",n),s=60*60*1e3,o=10*60*1e3;let a=0,c=0,u=ae(!1);const d=async()=>{try{const g=await fetch("https://unpkg.com/@sveltia/cms/package.json");if(!g.ok)return;const{version:m}=await g.json();m&&m!==Fv&&(c=window.setTimeout(()=>{$(u,!0)},o))}catch{}};cn(()=>{if(document.querySelector('script[src^="https://unpkg.com/@sveltia/cms"]'))return d(),a=window.setInterval(()=>{d()},s),()=>{window.clearInterval(a),window.clearTimeout(c)}});var f=W(),h=M(f);{var p=g=>{var m=K5(),v=M(m);tp(v,()=>({"--sui-infobar-message-justify-content":"center"})),sb(v.lastChild,{children:(_,b)=>{var y=G5(),x=M(y),k=D(x);const S=w(()=>i()("update_now"));Ze(k,{variant:"link",get label(){return l(S)},onclick:()=>{window.location.reload()}}),q(C=>Z(x,`${C??""} `),[()=>i()("update_available")]),T(_,y)},$$slots:{default:!0}}),T(g,m)};U(h,g=>{l(u)&&g(p)})}T(t,f),oe(),r()}var J5=F('<div role="none" class="empty svelte-17yv21"><!></div>');const Z5={hash:"svelte-17yv21",code:".empty.svelte-17yv21 {display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;padding:16px;width:100%;height:100%;text-align:center;}"};function Tr(t,e){Te(t,Z5);let n=P(e,"children",3,void 0);var r=J5(),i=R(r);Re(i,()=>n()??Fe),T(t,r)}var X5=F("<img>"),Q5=F("<video></video>",2),e8=F("<audio></audio>"),t8=F('<video playsinline="" class="svelte-1va4mre"></video>',2),n8=F('<img alt="" class="svelte-1va4mre">'),r8=F('<div role="none" class="blur svelte-1va4mre"><div role="none" class="overlay svelte-1va4mre"></div> <!></div>'),i8=F('<div role="none"><!> <!></div>');const s8={hash:"svelte-1va4mre",code:".preview.svelte-1va4mre {display:inline-flex;align-items:center;justify-content:center;position:relative;width:100%;height:100%;}.preview.tile.svelte-1va4mre {border-width:1px;border-style:solid;border-color:transparent;padding:var(--tile-padding, 12px);}.preview.tile.svelte-1va4mre .sui.icon {font-size:48px;}.preview.icon.svelte-1va4mre {border-radius:var(--sui-control-medium-border-radius);width:var(--icon-size, 32px);height:var(--icon-size, 32px);}.preview.tile.svelte-1va4mre, .preview.icon.svelte-1va4mre {overflow:hidden;aspect-ratio:1/1;}.preview.svelte-1va4mre .blur:where(.svelte-1va4mre) {display:contents;}.preview.svelte-1va4mre .blur:where(.svelte-1va4mre) > :where(.svelte-1va4mre) {position:absolute;inset:0;pointer-events:none;}.preview.svelte-1va4mre .blur:where(.svelte-1va4mre) .overlay {z-index:-1;backdrop-filter:blur(32px) brightness(0.8);}.preview.svelte-1va4mre .blur:where(.svelte-1va4mre) :is(img, video) {width:100%;height:100%;z-index:-2;object-fit:cover;transform:scale(1.2);}.preview.cover.svelte-1va4mre {padding:0;}.preview.cover.svelte-1va4mre > :is(img, video) {flex:auto;}.preview.svelte-1va4mre > :is(img, video) {flex:0;max-width:100%;max-height:100%;}.preview.dissolve.svelte-1va4mre :is(img, video) {opacity:0;transition:opacity 250ms;}.preview.dissolve.loaded.svelte-1va4mre :is(img, video) {opacity:1;}.checkerboard.svelte-1va4mre img:where(.svelte-1va4mre) {background-image:linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%), linear-gradient(45deg, #ccc 25%, #fff 25%, #fff 75%, #ccc 75%);background-size:8px 8px;background-position:0 0, 4px 4px;}.svelte-1va4mre:not(.checkerboard) img:where(.svelte-1va4mre) {background-color:#e5e5e5;}:is(img, video) {object-fit:contain;}.svelte-1va4mre:is(img, video):not([src]) {visibility:hidden;}.cover.svelte-1va4mre :is(img, video) {object-fit:cover;aspect-ratio:1/1;}"};function Ns(t,e){se(e,!0),Te(t,s8);let n=P(e,"loading",3,"lazy"),r=P(e,"asset",3,void 0),i=P(e,"src",15,void 0),s=P(e,"variant",3,void 0),o=P(e,"blurBackground",3,!1),a=P(e,"cover",3,!1),c=P(e,"checkerboard",3,!1),u=P(e,"dissolve",3,!0),d=P(e,"alt",3,""),f=P(e,"controls",3,!1),h=at(e,["$$slots","$$events","$$legacy","kind","loading","asset","src","variant","blurBackground","cover","checkerboard","dissolve","alt","controls"]),p=ae(void 0),g=ae(!1),m=ae(!1);const v=w(()=>!!r()&&!!s()),_=w(()=>l(v)||e.kind==="image"||r()?.name.endsWith(".pdf"));let b=!1;const y=async()=>{if(!(!r()||!l(p)||b)){b=!0,$(g,!1),n()==="lazy"&&await Ru(l(p));try{i(l(v)?await QC(r()):await Q_(r()))}catch{$(g,!0)}b=!1}},x=async()=>{!l(p)||!i()||((l(_)?!l(p).complete:!l(p).readyState)&&await new Promise(L=>{l(p)?.addEventListener(l(_)?"load":"loadedmetadata",()=>{L(void 0)},{once:!0})}),u()&&await Ru(l(p)),$(m,!0),r()&&l(v)&&i().startsWith("blob:")&&URL.revokeObjectURL(i()))};Be(()=>{l(p),r(),y()}),Be(()=>{l(p),i(),x()});var k=i8(),S=R(k);{var C=L=>{et(L,{name:"draft"})},E=L=>{var I=W(),N=M(I);{var j=B=>{var V=X5();let G;$t(V,K=>$(p,K),()=>l(p)),q(()=>G=St(V,G,{loading:n(),src:i(),alt:d(),...h},"svelte-1va4mre")),T(B,V)},H=B=>{var V=W(),G=M(V);{var K=J=>{var Y=Q5();let te;$t(Y,ce=>$(p,ce),()=>l(p)),q(()=>te=St(Y,te,{src:i(),controls:f()||void 0,playsinline:!0,...h},"svelte-1va4mre")),T(J,Y)},ee=J=>{var Y=W(),te=M(Y);{var ce=re=>{var X=W(),fe=M(X);{var be=Ee=>{var _e=e8();let Ae;$t(_e,Ce=>$(p,Ce),()=>l(p)),q(()=>Ae=St(_e,Ae,{src:i(),controls:!0,playsinline:!0,...h},"svelte-1va4mre")),T(Ee,_e)},ue=Ee=>{et(Ee,{name:"audio_file"})};U(fe,Ee=>{f()?Ee(be):Ee(ue,!1)})}T(re,X)},he=re=>{et(re,{name:"draft"})};U(te,re=>{e.kind==="audio"?re(ce):re(he,!1)},!0)}T(J,Y)};U(G,J=>{e.kind==="video"?J(K):J(ee,!1)},!0)}T(B,V)};U(N,B=>{l(_)?B(j):B(H,!1)},!0)}T(L,I)};U(S,L=>{l(g)?L(C):L(E,!1)})}var A=D(S,2);{var O=L=>{var I=r8(),N=D(R(I),2);{var j=B=>{var V=t8();q(()=>ke(V,"src",i())),T(B,V)},H=B=>{var V=n8();q(()=>{ke(V,"loading",n()),ke(V,"src",i())}),T(B,V)};U(N,B=>{e.kind==="video"?B(j):B(H,!1)})}T(L,I)};U(A,L=>{o()&&L(O)})}q(()=>{Vr(k,`preview ${s()??""} svelte-1va4mre`),pt(k,"cover",a()),pt(k,"checkerboard",c()),pt(k,"dissolve",u()),pt(k,"loaded",l(m))}),T(t,k),oe()}const o8=/^(?:\d{4}-[01]\d-[0-3]\d)?(?:T?[0-2]\d:[0-5]\d)?(?::[0-5]\d)?(?:\.\d+)?(?:[+-][0-2]\d:[0-5]\d|Z)?$/,zv={year:"numeric",month:"short",day:"numeric"},jv={hour:"numeric",minute:"numeric",hour12:!0},X0=(t,e)=>{let n=()=>e?.().link,r=()=>e?.().collectionLabel,i=()=>e?.().entryLabel;var s=l8(),o=R(s);Ze(o,{role:"link",variant:"link",onclick:()=>Un(n()),children:(a,c)=>{var u=a8(),d=R(u);q(()=>Z(d,`${r()??""} › ${i()??""}`)),T(a,u)},$$slots:{default:!0}}),T(t,s)};var a8=F('<span role="none"> </span>'),l8=F("<p><!></p>"),c8=F('<div role="none" class="preview svelte-1i169qh"><!></div>'),u8=F('<section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <p> </p></section>'),d8=F('<section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <p> </p></section>'),f8=F('<a target="_blank"> </a>'),h8=F("<a> </a>"),p8=F('<section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <p> </p></section>'),g8=F('<section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <p> </p></section>'),m8=F("<p> </p>"),v8=F('<div role="none" class="detail svelte-1i169qh"><!> <section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <p> </p></section> <section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <p> </p></section> <!> <!> <section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <p><!></p></section> <section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <p><!></p></section> <!> <!> <section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <!></section></div>');const b8={hash:"svelte-1i169qh",code:".detail.svelte-1i169qh {flex:none;overflow-x:hidden;overflow-y:auto;padding:16px;width:320px;}.detail.svelte-1i169qh .preview:where(.svelte-1i169qh) {overflow:hidden;margin:0 0 16px;border-radius:var(--sui-control-large-border-radius);background-color:var(--sui-content-background-color);aspect-ratio:1/1;}.detail.svelte-1i169qh section:where(.svelte-1i169qh) {margin:0 0 16px;}.detail.svelte-1i169qh section:where(.svelte-1i169qh) > * {margin:0 0 4px;word-break:break-all;}.detail.svelte-1i169qh h4:where(.svelte-1i169qh) {font-size:var(--sui-font-size-small);font-weight:var(--sui-font-weight-bold);color:var(--sui-secondary-foreground-color);}"};function yA(t,e){se(e,!0),Te(t,b8);const[n,r]=ve(),i=()=>z(le,"$_",n),s=()=>z(Nn,"$appLocale",n);let o=P(e,"showPreview",3,!1),a=ae(ie({...Uh}));const c=w(()=>e.asset.path),u=w(()=>e.asset.size),d=w(()=>e.asset.kind),f=w(()=>e.asset.commitAuthor),h=w(()=>e.asset.commitDate),p=w(()=>l(a).publicURL),g=w(()=>l(a).repoBlobURL),m=w(()=>l(a).dimensions),v=w(()=>l(a).duration),_=w(()=>l(a).usedEntries),b=w(()=>Ln(l(c))),y=w(()=>it(l(b).extension,"")),x=w(()=>ng(l(d))||l(c).endsWith(".pdf")),k=async()=>{$(a,ie(e.asset?await ig(e.asset):{...Uh}))};Be(()=>{e.asset,k()});var S=v8(),C=R(S);{var E=me=>{var Pe=c8(),qe=R(Pe);const Xe=w(()=>l(d)==="image"),ct=w(()=>["audio","video"].includes(l(d)));Ns(qe,{get kind(){return l(d)},get asset(){return e.asset},variant:"tile",get checkerboard(){return l(Xe)},get controls(){return l(ct)}}),T(me,Pe)};U(C,me=>{o()&&l(x)&&me(E)})}var A=D(C,2),O=R(A),L=R(O),I=D(O,2),N=R(I),j=D(A,2),H=R(j),B=R(H),V=D(H,2),G=R(V),K=D(j,2);{var ee=me=>{var Pe=u8(),qe=R(Pe),Xe=R(qe),ct=D(qe,2),Ke=R(ct);q(nt=>{Z(Xe,nt),Z(Ke,l(m)?`${l(m).width}×${l(m).height}`:"–")},[()=>i()("dimensions")]),T(me,Pe)};U(K,me=>{l(x)&&me(ee)})}var J=D(K,2);{var Y=me=>{var Pe=d8(),qe=R(Pe),Xe=R(qe),ct=D(qe,2),Ke=R(ct);q((nt,dt)=>{Z(Xe,nt),Z(Ke,dt)},[()=>i()("duration"),()=>l(v)?JB(l(v)):"–"]),T(me,Pe)};U(J,me=>{["audio","video"].includes(l(d))&&me(Y)})}var te=D(J,2),ce=R(te),he=R(ce),re=D(ce,2),X=R(re);{var fe=me=>{var Pe=f8(),qe=R(Pe);q(()=>{ke(Pe,"href",l(p)),Z(qe,l(p))}),T(me,Pe)},be=me=>{var Pe=Ue("–");T(me,Pe)};U(X,me=>{l(p)?me(fe):me(be,!1)})}var ue=D(te,2),Ee=R(ue),_e=R(Ee),Ae=D(Ee,2),Ce=R(Ae);{var $e=me=>{var Pe=h8(),qe=R(Pe);q(()=>{ke(Pe,"href",l(g)),Z(qe,`/${l(c)??""}`)}),T(me,Pe)},Ve=me=>{var Pe=Ue();q(()=>Z(Pe,`/${l(c)??""}`)),T(me,Pe)};U(Ce,me=>{l(g)?me($e):me(Ve,!1)})}var We=D(ue,2);{var ht=me=>{var Pe=p8(),qe=R(Pe),Xe=R(qe),ct=D(qe,2),Ke=R(ct);q(nt=>{Z(Xe,nt),Z(Ke,l(f).name||l(f).login||l(f).email)},[()=>i()("sort_keys.commit_author")]),T(me,Pe)};U(We,me=>{l(f)&&me(ht)})}var Ge=D(We,2);{var pe=me=>{var Pe=g8(),qe=R(Pe),Xe=R(qe),ct=D(qe,2),Ke=R(ct);q((nt,dt)=>{Z(Xe,nt),Z(Ke,dt)},[()=>i()("sort_keys.commit_date"),()=>l(h).toLocaleString(s()??void 0,{...zv,...jv})]),T(me,Pe)};U(Ge,me=>{l(h)&&me(pe)})}var ye=D(Ge,2),we=R(ye),xe=R(we),Ne=D(we,2);ft(Ne,17,()=>l(_),me=>me.sha,(me,Pe)=>{var qe=W(),Xe=M(qe);ft(Xe,17,()=>co(l(Pe)),ct=>ct.name,(ct,Ke)=>{var nt=W();const dt=w(()=>l(Ke).label||l(Ke).name);var ut=M(nt);ft(ut,17,()=>Zo(l(Ke),l(Pe)),bt=>bt.name,(bt,Ct)=>{X0(bt,()=>({link:`/collections/${l(Ke).name}/entries/${l(Ct).name}`,collectionLabel:l(dt),entryLabel:l(Ct).label||l(Ct).name}))},bt=>{var Ct=Ye(()=>({link:`/collections/${l(Ke).name}/entries/${l(Pe).subPath}`,collectionLabel:l(dt),entryLabel:qo(l(Ke),l(Pe),{useTemplate:!0})}));X0(bt,()=>l(Ct))}),T(ct,nt)}),T(me,qe)},me=>{var Pe=m8(),qe=R(Pe);q(Xe=>Z(qe,Xe),[()=>i()("sort_keys.none")]),T(me,Pe)}),q((me,Pe,qe,Xe,ct,Ke,nt)=>{Z(L,me),Z(N,Pe),Z(B,qe),Z(G,Xe),Z(he,ct),Z(_e,Ke),Z(xe,nt)},[()=>i()("kind"),()=>i()(`file_type_labels.${l(y)}`,{default:Jo.getType(l(c))??l(y).toUpperCase()}),()=>i()("size"),()=>s()?K_(l(u)):"",()=>i()("public_url"),()=>i()("file_path"),()=>i()("used_in")]),T(t,S),oe(),r()}var _8=F("<!> <!> <!>",1),y8=F("<!> <!>",1);function wA(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(le,"$_",n);let s=P(e,"assets",19,()=>[]),o=ae(ie([])),a=ae(!1);const c=ie({show:!1,text:"",status:"success"}),u=w(()=>s().length===1),d=w(()=>l(o).filter(({publicURL:S})=>!!S).map(({publicURL:S})=>S));let f;const h=async()=>{if(f=void 0,!l(u))return!1;const S=await el(s()[0]);return f=S,Nu(S.type)?!0:S.type.startsWith("image/")?typeof navigator.clipboard.write=="function":!1},p=async()=>{await navigator.clipboard.writeText(l(d).join(`
563
563
  `))},g=async()=>{await navigator.clipboard.writeText(s().map(({path:S})=>`/${S}`).join(`
564
- `))},m=async()=>{let S=f;if(Nu(S.type)){await navigator.clipboard.writeText(await S.text());return}if(!S.type.startsWith("image/"))throw new Error("Unsupported type");S.type!=="image/png"&&(S=await YC(S)),await navigator.clipboard.write([new ClipboardItem({"image/png":S})])},v=async(S,C,E)=>{try{await S(),c.status="success",c.text=l(u)?C:E}catch{c.status="error",c.text=i()("clipboard_error")}finally{c.show=!0}};Be(()=>{(async()=>($(o,ie(await Promise.all(s().map(ig)))),$(a,ie(await h()))))()});var _=y5(),b=M(_);const y=w(()=>!s().length),x=w(()=>i()("copy"));Nr(b,{variant:"ghost",get disabled(){return l(y)},get label(){return l(x)},popupPosition:"bottom-right",popup:C=>{const E=w(()=>i()("copy_options"));wr(C,{get"aria-label"(){return l(E)},children:(A,O)=>{var L=_5(),I=M(L);const N=w(()=>l(u)?i()("public_url"):i()("public_urls")),j=w(()=>!l(d).length);Nt(I,{get label(){return l(N)},get disabled(){return l(j)},onclick:()=>{v(p,i()("asset_url_copied"),i()("asset_urls_copied"))}});var H=D(I,2);const B=w(()=>l(u)?i()("file_path"):i()("file_paths"));Nt(H,{get label(){return l(B)},onclick:()=>{v(g,i()("asset_path_copied"),i()("asset_paths_copied"))}});var V=D(H,2);const G=w(()=>i()("file_data")),K=w(()=>!l(a));Nt(V,{get label(){return l(G)},get disabled(){return l(K)},onclick:()=>{v(m,i()("asset_data_copied"),i()("asset_data_copied"))}}),T(A,L)},$$slots:{default:!0}})},$$slots:{popup:!0}});var k=D(b,2);Yn(k,{get show(){return c.show},set show(S){c.show=S},children:(S,C)=>{Hn(S,{get status(){return c.status},children:(E,A)=>{var O=Ue();q(()=>Z(O,c.text)),T(E,O)},$$slots:{default:!0}})},$$slots:{default:!0}}),T(t,_),oe(),r()}const nl={saved:!1,moved:!1,renamed:!1,deleted:!1,published:!1,count:1},Au=st({...nl}),xA=async(t,e=[])=>{const n=ne(ii),r=t.map(i=>{const{locales:s,slug:o}=n.find(a=>a.id===i)??{};if(s)return Object.values(s).map(({path:a})=>({action:"delete",slug:o,path:a}))}).flat(1).filter((i,s,o)=>i&&o.findIndex(a=>a?.path===i.path)===s);e.length&&r.push(...e.map(i=>({action:"delete",path:i}))),await ne(In)?.commitChanges(r,{commitType:"delete",collection:ne(Vn)}),ii.set(n.filter(i=>!t.includes(i.id))),Au.set({...nl,deleted:!0,count:t.length}),e.length&&en.update(i=>i.filter(s=>!e.includes(s.path)))},w5=({fieldConfig:t,keyPath:e})=>{const n={},{default:r,output_code_only:i=!1,keys:s={code:"code",lang:"lang"}}=t;if(i)n[e]=typeof r=="string"?r:"";else{const o=Jn(r)?r:void 0,a=o?o[s.code]:r,c=o?o[s.lang]:"";n[e]={},n[`${e}.${s.code}`]=typeof a=="string"?a:"",n[`${e}.${s.lang}`]=typeof c=="string"?c:""}return n},kA=(t,e)=>{const{default:n}=t;return typeof n!="string"?n:n.replaceAll(/{{(.+?)}}/g,(r,i)=>i==="locale"?e:i==="datetime"?new Date().toJSON().replace(/\d+\.\d+Z$/,"00.000Z"):i==="uuid"?Gn():i==="uuid_short"?Gn("short"):i==="uuid_shorter"?Gn("shorter"):"")},x5=t=>{const{default:e,required:n=!0}=t;return e&&Jn(e)?e:n?{"":""}:{}},fy=({entryDraft:t,keyPath:e,locale:n})=>Object.entries(ne(t).currentValues[n]??{}).filter(([r])=>r.startsWith(`${e}.`)).map(([r,i])=>[r.replace(`${e}.`,""),i]),k5=({pairs:t,edited:e})=>t.map(([n],r,i)=>{if(!n.trim()&&e[r])return"empty";if(n.trim()&&i.findIndex(s=>s[0]===n)!==r)return"duplicate"}),S5=({entryDraft:t,keyPath:e,locale:n,fieldConfig:r,pairs:i})=>{const{i18n:s}=r;Ji.set(!1),t.update(o=>(o&&Object.entries(o.currentValues).forEach(([a,c])=>{(a===n||s==="duplicate")&&(Object.entries(c).forEach(([u])=>{u.startsWith(`${e}.`)&&delete c[u]}),i.forEach(([u,d])=>{c[`${e}.${u}`]=d}))}),o)),Ji.set(!0)},SA=t=>{const{prefix:e,use_b32_encoding:n}=t,r=n?wm():Gn();return e?`${e}${r}`:r},E5=({fieldConfig:t,keyPath:e,newContent:n,value:r})=>{const{widget:i="string"}=t,s=()=>{n[e]=[],r.split(/,\s*/).forEach((o,a)=>{n[`${e}.${a}`]=o})};if(i==="boolean"){n[e]=r==="true";return}if(i==="list"){const{field:o,fields:a,types:c}=t;if(!(!!o||!!a||!!c)){s();return}}if(i==="markdown"){n[e]=zP(r);return}if(i==="number"){const{value_type:o="int"}=t;if(o==="int"||o==="float"){const a=o==="int"?Number.parseInt(r,10):Number.parseFloat(r);Number.isNaN(a)||(n[e]=a)}else n[e]=r;return}if(i==="relation"||i==="select"){const{multiple:o=!1}=t;if(o){s();return}}n[e]=r},lg=(t,e,n={})=>{const r={},i=({fieldConfig:s,keyPath:o})=>{if(o in n){E5({fieldConfig:s,keyPath:o,newContent:r,value:n[o]});return}const{widget:a="string",default:c}=s,u=Dd({fieldConfig:s,locale:e}),d=Array.isArray(c)&&!!c.length;if(a==="list"){const{fields:f}=s;if(!d){r[o]=[];return}if(f){c.forEach((h,p)=>{Object.entries(h).forEach(([g,m])=>{r[[o,p,g].join(".")]=m})});return}c.forEach((h,p)=>{r[[o,p].join(".")]=h});return}if(a==="object"){const{fields:f,types:h}=s;!u||Array.isArray(h)?r[o]=null:f?.forEach(p=>{i({keyPath:[o,p.name].join("."),fieldConfig:p})});return}if(a==="boolean"){r[o]=typeof c=="boolean"?c:!1;return}if(a==="code"){Object.assign(r,w5({fieldConfig:s,keyPath:o}));return}if(a==="relation"||a==="select"){const{multiple:f=!1}=s;if(f){d?c.forEach((h,p)=>{r[[o,p].join(".")]=h}):r[o]=[];return}}if(a==="datetime"){r[o]=$B(s);return}if(a==="hidden"){r[o]=kA(s,e);return}if(a==="keyvalue"){Object.entries(x5(s)).forEach(([f,h])=>{r[`${o}.${f}`]=String(h)});return}r[o]=c!==void 0?c:""};return t.forEach(s=>{i({keyPath:s.name,fieldConfig:s})}),r},hy=({draft:{collectionName:t,fileName:e},locale:n,target:r={},getValueMap:i=void 0})=>{const s=Fi(t),o=e?s?._fileMap[e]:void 0;if(!s||e&&!o)return;const{defaultLocale:a,canonicalSlug:{key:c}}=(o??s)._i18n;return new Proxy(r,{set:(u,d,f)=>{if(u[d]!==f&&(u[d]=f),[c].includes(d))return!0;const h=typeof i=="function"?i():u,p=_n({collectionName:t,fileName:e,valueMap:h,keyPath:d});if(!p)return!0;const g=ne(rt)?.validities?.[n]?.[d];return g&&typeof f=="string"&&Dd({fieldConfig:p,locale:n})&&(g.valueMissing=!f),ne(Ji)&&p.i18n==="duplicate"&&n===a&&Object.entries(ne(rt).currentValues).forEach(([m,v])=>{if(d.includes(".")){const{path:_}=d.match(/(?<path>.+?)\.[^.]*$/)?.groups??{};if(!Object.keys(v).some(b=>b.startsWith(`${_}.`))&&!_n({collectionName:t,fileName:e,valueMap:h,keyPath:_}))return}m!==n&&v[d]!==f&&(v[d]=f)}),!0}})},gu=({collection:t,collectionFile:e,originalEntry:n={},dynamicValues:r,expanderStates:i})=>{const s=t.name,o=e?.name,{id:a,slug:c,locales:u}=n,d=a===void 0,{fields:f=[],_i18n:h}=e??t,{allLocales:p,initialLocales:g,defaultLocale:m,canonicalSlug:{key:v="translationKey"}}=h,_=d?g:p.filter(k=>!!u?.[k]?.content),b=Object.fromEntries(p.map(k=>[k,_.includes(k)])),y=d?{}:v in(u?.[m]?.content??{})?Object.fromEntries(p.map(k=>[k,u?.[k].slug])):{_:u?.[m].slug},x=Object.fromEntries(_.map(k=>d?[k,lg(f,k,r)]:[k,structuredClone(u?.[k].content)]));rt.set({isNew:d&&!o,collectionName:s,collection:t,fileName:o,collectionFile:e,originalEntry:d?void 0:n,originalLocales:b,currentLocales:structuredClone(b),originalSlugs:y,currentSlugs:structuredClone(y),originalValues:x,currentValues:Object.fromEntries(_.map(k=>[k,hy({draft:{collectionName:s,fileName:o},locale:k,target:structuredClone(x[k])})])),files:{},validities:Object.fromEntries(p.map(k=>[k,{}])),expanderStates:i??{_:{}}}),A5({collectionName:s,fileName:o,slug:c})},T5=()=>{const t=ne(rt),{collectionName:e,fileName:n,collection:r,collectionFile:i,currentValues:s,validities:o}=t,{defaultLocale:a}=(i??r)._i18n,{canonicalSlug:{key:c}}=(i??r)._i18n;Object.entries(s).forEach(([u,d])=>{delete d[c],Object.keys(d).forEach(f=>{const h=_n({collectionName:e,fileName:n,valueMap:d,keyPath:f});h?.widget==="uuid"&&(u===a||[!0,"translate"].includes(h?.i18n??!1))&&(d[f]=SA(h)),h?.widget==="hidden"&&(u===a||[!0,"translate"].includes(h?.i18n??!1))&&(d[f]=kA(h,u))})}),Object.keys(o).forEach(u=>{o[u]={}}),rt.set({...t,isNew:!0,originalEntry:void 0}),Rv.set(!0)};let Q0=0,Ca;const EA={saved:!1,restored:!1,deleted:!1},jf=st({show:!1}),Ao=st({...EA}),cg=async(t,e="")=>{await Ca?.delete([t,e])},py=async(t,e="")=>{const n=await Ca?.get([t,e]);return n?n.siteConfigVersion===ne(sy)?n:(await cg(t,e),null):null},C5=async t=>{const{collectionName:e,originalEntry:n,currentLocales:r={},currentSlugs:i={},currentValues:s={},files:o}=t,a=n?.slug||"";if(ne(mA)){const c={timestamp:new Date,siteConfigVersion:ne(sy),collectionName:e,slug:a,currentLocales:r,currentSlugs:nc(i),currentValues:nc(s),files:o};await Ca?.put(c)}else await py(e,a)&&await cg(e,a)},A5=async({collectionName:t,fileName:e,slug:n=""})=>{const r=await py(t,n);if(!r)return;const{timestamp:i,currentLocales:s,currentSlugs:o,currentValues:a,files:c}=r,u=await new Promise(d=>{jf.set({show:!0,timestamp:i,resolve:d})});u!==void 0&&(u?(Ji.set(!1),rt.update(d=>(d&&(d.currentLocales=s,d.currentSlugs=o,Object.entries(a).forEach(([f,h])=>{Object.entries(h).forEach(([p,g])=>{typeof g=="string"&&[...g.matchAll(fk("g"))].forEach(([m])=>{const v=c[m];if(v instanceof File){const _=URL.createObjectURL(v);h[p]=g.replaceAll(m,_),d.files[_]=v}})}),d.currentValues[f]?Object.assign(d.currentValues[f],h):d.currentValues[f]=hy({draft:{collectionName:t,fileName:e},locale:f,target:structuredClone(h)}),d.originalValues[f]||(d.originalValues[f]={})})),d)),Ji.set(!0)):await cg(t,n),Ao.set({restored:u,deleted:!u,saved:!1}))},P5=async()=>{const t=ne(rt);if(!t||ne(Ao).saved)return;const{collectionName:e,originalEntry:n}=t;await py(e,n?.slug)&&Ao.set({restored:!1,deleted:!1,saved:!0})},O5=()=>{Ao.set({...EA})};In.subscribe(t=>{if(t&&!Ca){const{databaseName:e}=t.repository??{};if(e){Ca=new jo(e,"draft-backups",{keyPath:["collectionName","slug"]});return}}Ca=null});rt.subscribe(t=>{globalThis.clearTimeout(Q0),t&&Ca&&(Q0=globalThis.setTimeout(()=>{C5(t)},500))});const TA=(t,e)=>{const{minlength:n,maxlength:r}=t,i=Number.isInteger(n)&&n<=(r??1/0),s=Number.isInteger(r)&&(n??0)<=r,o=e?[...e.trim()].length:0,a=i&&o<n,c=s&&o>r;return{count:o,hasMin:i,hasMax:s,tooShort:a,tooLong:c,invalid:a||c}},$5=/^\/?(?<pattern>.+?)(?:\/(?<flags>[dgimsuvy]*))?$/,L5=()=>{const{collection:t,collectionFile:e,fileName:n,currentLocales:r,currentValues:i,validities:s}=ne(rt),{i18nEnabled:o,defaultLocale:a}=(e??t)._i18n;let c=!0;return Object.entries(i).forEach(([u,d])=>{const f=Object.entries(d);if(!r[u]){s[u]=Object.fromEntries(f.map(([p])=>[p,{valid:!0}]));return}s[u]={};const h=(p,g)=>{const m=_n({collectionName:t.name,fileName:n,valueMap:d,keyPath:p});if(!m)return;const{widget:v="string",i18n:_=!1,pattern:b}=m,y=Dd({fieldConfig:m,locale:u});if(u!==a&&(!o||_===!1||_==="none"||_==="duplicate"))return;if(!["select","relation"].includes(v)&&/\.\d+$/.test(p)){const H=p.replace(/\.\d+$/,"");if(H in s[u]||h(H,void 0),v==="list"){const{field:B,fields:V,types:G}=m;if(!B&&!V&&!G)return}}const{multiple:x=!1}=m,{min:k,max:S}=m;let C=!1,E=!1,A=!1,O=!1,L=!1,I=!1,N=!1;if(v==="list"){if(p in s[u])return;const H=new RegExp(`^${ln(p)}\\.\\d+$`),B=Array.isArray(g)&&g.length?g:f.filter(([V])=>H.test(V)).map(([,V])=>V).filter(V=>V!==void 0)??[];y&&!B.length?C=!0:typeof k=="number"&&B.length<k?O=!0:typeof S=="number"&&B.length>S&&(L=!0)}if(v==="object"&&y&&!g&&(C=!0),v==="keyvalue"){const H=p.match(/(.+?)(?:\.[^.]*)?$/)?.[1],B=_n({collectionName:t.name,fileName:n,valueMap:d,keyPath:H});if(H in s[u]||B?.widget!=="keyvalue")return;p=H;const G=fy({entryDraft:rt,keyPath:H,locale:u});y&&!G.length?C=!0:typeof k=="number"&&G.length<k?O=!0:typeof S=="number"&&G.length>S&&(L=!0)}if(!["object","list","hidden","compute","keyvalue"].includes(v)){if(v==="code"){const{output_code_only:H=!1,keys:B={code:"code",lang:"lang"}}=m,V=p.match(`(.+)\\.(?:${B.code}|${B.lang})$`)?.[1]??"";if(V&&(p=V),p in s[u])return;H||(g=d[`${p}.${B.code}`])}if(typeof g=="string"&&(g=g.trim()),y&&(g==null||g===""||x&&!g.length)&&(C=!0),Array.isArray(b)&&typeof b[0]=="string"){const{pattern:H,flags:B}=b[0].match($5)?.groups??{},V=new RegExp(H,B);H&&!V.test(String(g))&&(I=!0)}if(["string","text"].includes(v)&&({tooShort:E,tooLong:A}=TA(m,g)),v==="string"&&g){const{type:H="text"}=m;if(H!=="text"){const B=document.createElement("input");B.type=H,B.value=g,{typeMismatch:N}=B.validity}H==="email"&&!N&&!g.split("@")[1]?.includes(".")&&(N=!0)}if(v==="number"){const{value_type:H="int"}=m;typeof k=="number"&&g!==null&&Number(g)<k?O=!0:typeof S=="number"&&g!==null&&Number(g)>S&&(L=!0),(H==="int"||H==="float")&&y&&g===null&&(N=!0)}}const j=new Proxy({valueMissing:C,tooShort:E,tooLong:A,rangeUnderflow:O,rangeOverflow:L,patternMismatch:I,typeMismatch:N},{get:(H,B)=>B==="valid"?!Object.values(H).some(Boolean):H[B]});s[u][p]=j,j.valid||(c=!1)};f.forEach(([p,g])=>{h(p,g)})}),rt.update(u=>({...u,validities:s})),c},e1=(t,e=ne(wt)?.output?.json??{})=>{const{indent_style:n="space",indent_size:r=n==="tab"?1:2}=e;return JSON.stringify(t,null,n==="tab"?" ".repeat(r):r).trim()},t1=t=>A8(t).trim(),n1=(t,e=ne(wt)?.output?.yaml??{},n={})=>{const{indent_size:r=2,quote:i="none"}=e,{quote:s=!1}=n;return Od.stringify(t,null,{indent:r,lineWidth:0,defaultKeyType:"PLAIN",defaultStringType:s||i==="double"?"QUOTE_DOUBLE":i==="single"?"QUOTE_SINGLE":"PLAIN",singleQuote:!(s||i==="double")}).trim()},r1=async({content:t,_file:e})=>{const{format:n,fmDelimiters:r,yamlQuote:i=!1}=e,s=rp[n]?.formatter;if(s)return`${(await s(t)).trim()}
564
+ `))},m=async()=>{let S=f;if(Nu(S.type)){await navigator.clipboard.writeText(await S.text());return}if(!S.type.startsWith("image/"))throw new Error("Unsupported type");S.type!=="image/png"&&(S=await YC(S)),await navigator.clipboard.write([new ClipboardItem({"image/png":S})])},v=async(S,C,E)=>{try{await S(),c.status="success",c.text=l(u)?C:E}catch{c.status="error",c.text=i()("clipboard_error")}finally{c.show=!0}};Be(()=>{(async()=>($(o,ie(await Promise.all(s().map(ig)))),$(a,ie(await h()))))()});var _=y8(),b=M(_);const y=w(()=>!s().length),x=w(()=>i()("copy"));Nr(b,{variant:"ghost",get disabled(){return l(y)},get label(){return l(x)},popupPosition:"bottom-right",popup:C=>{const E=w(()=>i()("copy_options"));wr(C,{get"aria-label"(){return l(E)},children:(A,O)=>{var L=_8(),I=M(L);const N=w(()=>l(u)?i()("public_url"):i()("public_urls")),j=w(()=>!l(d).length);Nt(I,{get label(){return l(N)},get disabled(){return l(j)},onclick:()=>{v(p,i()("asset_url_copied"),i()("asset_urls_copied"))}});var H=D(I,2);const B=w(()=>l(u)?i()("file_path"):i()("file_paths"));Nt(H,{get label(){return l(B)},onclick:()=>{v(g,i()("asset_path_copied"),i()("asset_paths_copied"))}});var V=D(H,2);const G=w(()=>i()("file_data")),K=w(()=>!l(a));Nt(V,{get label(){return l(G)},get disabled(){return l(K)},onclick:()=>{v(m,i()("asset_data_copied"),i()("asset_data_copied"))}}),T(A,L)},$$slots:{default:!0}})},$$slots:{popup:!0}});var k=D(b,2);Yn(k,{get show(){return c.show},set show(S){c.show=S},children:(S,C)=>{Hn(S,{get status(){return c.status},children:(E,A)=>{var O=Ue();q(()=>Z(O,c.text)),T(E,O)},$$slots:{default:!0}})},$$slots:{default:!0}}),T(t,_),oe(),r()}const nl={saved:!1,moved:!1,renamed:!1,deleted:!1,published:!1,count:1},Au=st({...nl}),xA=async(t,e=[])=>{const n=ne(ii),r=t.map(i=>{const{locales:s,slug:o}=n.find(a=>a.id===i)??{};if(s)return Object.values(s).map(({path:a})=>({action:"delete",slug:o,path:a}))}).flat(1).filter((i,s,o)=>i&&o.findIndex(a=>a?.path===i.path)===s);e.length&&r.push(...e.map(i=>({action:"delete",path:i}))),await ne(In)?.commitChanges(r,{commitType:"delete",collection:ne(Vn)}),ii.set(n.filter(i=>!t.includes(i.id))),Au.set({...nl,deleted:!0,count:t.length}),e.length&&en.update(i=>i.filter(s=>!e.includes(s.path)))},w8=({fieldConfig:t,keyPath:e})=>{const n={},{default:r,output_code_only:i=!1,keys:s={code:"code",lang:"lang"}}=t;if(i)n[e]=typeof r=="string"?r:"";else{const o=Jn(r)?r:void 0,a=o?o[s.code]:r,c=o?o[s.lang]:"";n[e]={},n[`${e}.${s.code}`]=typeof a=="string"?a:"",n[`${e}.${s.lang}`]=typeof c=="string"?c:""}return n},kA=(t,e)=>{const{default:n}=t;return typeof n!="string"?n:n.replaceAll(/{{(.+?)}}/g,(r,i)=>i==="locale"?e:i==="datetime"?new Date().toJSON().replace(/\d+\.\d+Z$/,"00.000Z"):i==="uuid"?Gn():i==="uuid_short"?Gn("short"):i==="uuid_shorter"?Gn("shorter"):"")},x8=t=>{const{default:e,required:n=!0}=t;return e&&Jn(e)?e:n?{"":""}:{}},fy=({entryDraft:t,keyPath:e,locale:n})=>Object.entries(ne(t).currentValues[n]??{}).filter(([r])=>r.startsWith(`${e}.`)).map(([r,i])=>[r.replace(`${e}.`,""),i]),k8=({pairs:t,edited:e})=>t.map(([n],r,i)=>{if(!n.trim()&&e[r])return"empty";if(n.trim()&&i.findIndex(s=>s[0]===n)!==r)return"duplicate"}),S8=({entryDraft:t,keyPath:e,locale:n,fieldConfig:r,pairs:i})=>{const{i18n:s}=r;Ji.set(!1),t.update(o=>(o&&Object.entries(o.currentValues).forEach(([a,c])=>{(a===n||s==="duplicate")&&(Object.entries(c).forEach(([u])=>{u.startsWith(`${e}.`)&&delete c[u]}),i.forEach(([u,d])=>{c[`${e}.${u}`]=d}))}),o)),Ji.set(!0)},SA=t=>{const{prefix:e,use_b32_encoding:n}=t,r=n?wm():Gn();return e?`${e}${r}`:r},E8=({fieldConfig:t,keyPath:e,newContent:n,value:r})=>{const{widget:i="string"}=t,s=()=>{n[e]=[],r.split(/,\s*/).forEach((o,a)=>{n[`${e}.${a}`]=o})};if(i==="boolean"){n[e]=r==="true";return}if(i==="list"){const{field:o,fields:a,types:c}=t;if(!(!!o||!!a||!!c)){s();return}}if(i==="markdown"){n[e]=zP(r);return}if(i==="number"){const{value_type:o="int"}=t;if(o==="int"||o==="float"){const a=o==="int"?Number.parseInt(r,10):Number.parseFloat(r);Number.isNaN(a)||(n[e]=a)}else n[e]=r;return}if(i==="relation"||i==="select"){const{multiple:o=!1}=t;if(o){s();return}}n[e]=r},lg=(t,e,n={})=>{const r={},i=({fieldConfig:s,keyPath:o})=>{if(o in n){E8({fieldConfig:s,keyPath:o,newContent:r,value:n[o]});return}const{widget:a="string",default:c}=s,u=Dd({fieldConfig:s,locale:e}),d=Array.isArray(c)&&!!c.length;if(a==="list"){const{fields:f}=s;if(!d){r[o]=[];return}if(f){c.forEach((h,p)=>{Object.entries(h).forEach(([g,m])=>{r[[o,p,g].join(".")]=m})});return}c.forEach((h,p)=>{r[[o,p].join(".")]=h});return}if(a==="object"){const{fields:f,types:h}=s;!u||Array.isArray(h)?r[o]=null:f?.forEach(p=>{i({keyPath:[o,p.name].join("."),fieldConfig:p})});return}if(a==="boolean"){r[o]=typeof c=="boolean"?c:!1;return}if(a==="code"){Object.assign(r,w8({fieldConfig:s,keyPath:o}));return}if(a==="relation"||a==="select"){const{multiple:f=!1}=s;if(f){d?c.forEach((h,p)=>{r[[o,p].join(".")]=h}):r[o]=[];return}}if(a==="datetime"){r[o]=$B(s);return}if(a==="hidden"){r[o]=kA(s,e);return}if(a==="keyvalue"){Object.entries(x8(s)).forEach(([f,h])=>{r[`${o}.${f}`]=String(h)});return}r[o]=c!==void 0?c:""};return t.forEach(s=>{i({keyPath:s.name,fieldConfig:s})}),r},hy=({draft:{collectionName:t,fileName:e},locale:n,target:r={},getValueMap:i=void 0})=>{const s=Fi(t),o=e?s?._fileMap[e]:void 0;if(!s||e&&!o)return;const{defaultLocale:a,canonicalSlug:{key:c}}=(o??s)._i18n;return new Proxy(r,{set:(u,d,f)=>{if(u[d]!==f&&(u[d]=f),[c].includes(d))return!0;const h=typeof i=="function"?i():u,p=_n({collectionName:t,fileName:e,valueMap:h,keyPath:d});if(!p)return!0;const g=ne(rt)?.validities?.[n]?.[d];return g&&typeof f=="string"&&Dd({fieldConfig:p,locale:n})&&(g.valueMissing=!f),ne(Ji)&&p.i18n==="duplicate"&&n===a&&Object.entries(ne(rt).currentValues).forEach(([m,v])=>{if(d.includes(".")){const{path:_}=d.match(/(?<path>.+?)\.[^.]*$/)?.groups??{};if(!Object.keys(v).some(b=>b.startsWith(`${_}.`))&&!_n({collectionName:t,fileName:e,valueMap:h,keyPath:_}))return}m!==n&&v[d]!==f&&(v[d]=f)}),!0}})},gu=({collection:t,collectionFile:e,originalEntry:n={},dynamicValues:r,expanderStates:i})=>{const s=t.name,o=e?.name,{id:a,slug:c,locales:u}=n,d=a===void 0,{fields:f=[],_i18n:h}=e??t,{allLocales:p,initialLocales:g,defaultLocale:m,canonicalSlug:{key:v="translationKey"}}=h,_=d?g:p.filter(k=>!!u?.[k]?.content),b=Object.fromEntries(p.map(k=>[k,_.includes(k)])),y=d?{}:v in(u?.[m]?.content??{})?Object.fromEntries(p.map(k=>[k,u?.[k]?.slug])):{_:u?.[m].slug},x=Object.fromEntries(_.map(k=>d?[k,lg(f,k,r)]:[k,structuredClone(u?.[k]?.content)]));rt.set({isNew:d&&!o,collectionName:s,collection:t,fileName:o,collectionFile:e,originalEntry:d?void 0:n,originalLocales:b,currentLocales:structuredClone(b),originalSlugs:y,currentSlugs:structuredClone(y),originalValues:x,currentValues:Object.fromEntries(_.map(k=>[k,hy({draft:{collectionName:s,fileName:o},locale:k,target:structuredClone(x[k])})])),files:{},validities:Object.fromEntries(p.map(k=>[k,{}])),expanderStates:i??{_:{}}}),A8({collectionName:s,fileName:o,slug:c})},T8=()=>{const t=ne(rt),{collectionName:e,fileName:n,collection:r,collectionFile:i,currentValues:s,validities:o}=t,{defaultLocale:a}=(i??r)._i18n,{canonicalSlug:{key:c}}=(i??r)._i18n;Object.entries(s).forEach(([u,d])=>{delete d[c],Object.keys(d).forEach(f=>{const h=_n({collectionName:e,fileName:n,valueMap:d,keyPath:f});h?.widget==="uuid"&&(u===a||[!0,"translate"].includes(h?.i18n??!1))&&(d[f]=SA(h)),h?.widget==="hidden"&&(u===a||[!0,"translate"].includes(h?.i18n??!1))&&(d[f]=kA(h,u))})}),Object.keys(o).forEach(u=>{o[u]={}}),rt.set({...t,isNew:!0,originalEntry:void 0}),Rv.set(!0)};let Q0=0,Ca;const EA={saved:!1,restored:!1,deleted:!1},jf=st({show:!1}),Ao=st({...EA}),cg=async(t,e="")=>{await Ca?.delete([t,e])},py=async(t,e="")=>{const n=await Ca?.get([t,e]);return n?n.siteConfigVersion===ne(sy)?n:(await cg(t,e),null):null},C8=async t=>{const{collectionName:e,originalEntry:n,currentLocales:r={},currentSlugs:i={},currentValues:s={},files:o}=t,a=n?.slug||"";if(ne(mA)){const c={timestamp:new Date,siteConfigVersion:ne(sy),collectionName:e,slug:a,currentLocales:r,currentSlugs:nc(i),currentValues:nc(s),files:o};await Ca?.put(c)}else await py(e,a)&&await cg(e,a)},A8=async({collectionName:t,fileName:e,slug:n=""})=>{const r=await py(t,n);if(!r)return;const{timestamp:i,currentLocales:s,currentSlugs:o,currentValues:a,files:c}=r,u=await new Promise(d=>{jf.set({show:!0,timestamp:i,resolve:d})});u!==void 0&&(u?(Ji.set(!1),rt.update(d=>(d&&(d.currentLocales=s,d.currentSlugs=o,Object.entries(a).forEach(([f,h])=>{Object.entries(h).forEach(([p,g])=>{typeof g=="string"&&[...g.matchAll(fk("g"))].forEach(([m])=>{const v=c[m];if(v instanceof File){const _=URL.createObjectURL(v);h[p]=g.replaceAll(m,_),d.files[_]=v}})}),d.currentValues[f]?Object.assign(d.currentValues[f],h):d.currentValues[f]=hy({draft:{collectionName:t,fileName:e},locale:f,target:structuredClone(h)}),d.originalValues[f]||(d.originalValues[f]={})})),d)),Ji.set(!0)):await cg(t,n),Ao.set({restored:u,deleted:!u,saved:!1}))},P8=async()=>{const t=ne(rt);if(!t||ne(Ao).saved)return;const{collectionName:e,originalEntry:n}=t;await py(e,n?.slug)&&Ao.set({restored:!1,deleted:!1,saved:!0})},O8=()=>{Ao.set({...EA})};In.subscribe(t=>{if(t&&!Ca){const{databaseName:e}=t.repository??{};if(e){Ca=new jo(e,"draft-backups",{keyPath:["collectionName","slug"]});return}}Ca=null});rt.subscribe(t=>{globalThis.clearTimeout(Q0),t&&Ca&&(Q0=globalThis.setTimeout(()=>{C8(t)},500))});const TA=(t,e)=>{const{minlength:n,maxlength:r}=t,i=Number.isInteger(n)&&n<=(r??1/0),s=Number.isInteger(r)&&(n??0)<=r,o=e?[...e.trim()].length:0,a=i&&o<n,c=s&&o>r;return{count:o,hasMin:i,hasMax:s,tooShort:a,tooLong:c,invalid:a||c}},$8=/^\/?(?<pattern>.+?)(?:\/(?<flags>[dgimsuvy]*))?$/,L8=()=>{const{collection:t,collectionFile:e,fileName:n,currentLocales:r,currentValues:i,validities:s}=ne(rt),{i18nEnabled:o,defaultLocale:a}=(e??t)._i18n;let c=!0;return Object.entries(i).forEach(([u,d])=>{const f=Object.entries(d);if(!r[u]){s[u]=Object.fromEntries(f.map(([p])=>[p,{valid:!0}]));return}s[u]={};const h=(p,g)=>{const m=_n({collectionName:t.name,fileName:n,valueMap:d,keyPath:p});if(!m)return;const{widget:v="string",i18n:_=!1,pattern:b}=m,y=Dd({fieldConfig:m,locale:u});if(u!==a&&(!o||_===!1||_==="none"||_==="duplicate"))return;if(!["select","relation"].includes(v)&&/\.\d+$/.test(p)){const H=p.replace(/\.\d+$/,"");if(H in s[u]||h(H,void 0),v==="list"){const{field:B,fields:V,types:G}=m;if(!B&&!V&&!G)return}}const{multiple:x=!1}=m,{min:k,max:S}=m;let C=!1,E=!1,A=!1,O=!1,L=!1,I=!1,N=!1;if(v==="list"){if(p in s[u])return;const H=new RegExp(`^${ln(p)}\\.\\d+$`),B=Array.isArray(g)&&g.length?g:f.filter(([V])=>H.test(V)).map(([,V])=>V).filter(V=>V!==void 0)??[];y&&!B.length?C=!0:typeof k=="number"&&B.length<k?O=!0:typeof S=="number"&&B.length>S&&(L=!0)}if(v==="object"&&y&&!g&&(C=!0),v==="keyvalue"){const H=p.match(/(.+?)(?:\.[^.]*)?$/)?.[1],B=_n({collectionName:t.name,fileName:n,valueMap:d,keyPath:H});if(H in s[u]||B?.widget!=="keyvalue")return;p=H;const G=fy({entryDraft:rt,keyPath:H,locale:u});y&&!G.length?C=!0:typeof k=="number"&&G.length<k?O=!0:typeof S=="number"&&G.length>S&&(L=!0)}if(!["object","list","hidden","compute","keyvalue"].includes(v)){if(v==="code"){const{output_code_only:H=!1,keys:B={code:"code",lang:"lang"}}=m,V=p.match(`(.+)\\.(?:${B.code}|${B.lang})$`)?.[1]??"";if(V&&(p=V),p in s[u])return;H||(g=d[`${p}.${B.code}`])}if(typeof g=="string"&&(g=g.trim()),y&&(g==null||g===""||x&&!g.length)&&(C=!0),Array.isArray(b)&&typeof b[0]=="string"){const{pattern:H,flags:B}=b[0].match($8)?.groups??{},V=new RegExp(H,B);H&&!V.test(String(g))&&(I=!0)}if(["string","text"].includes(v)&&({tooShort:E,tooLong:A}=TA(m,g)),v==="string"&&g){const{type:H="text"}=m;if(H!=="text"){const B=document.createElement("input");B.type=H,B.value=g,{typeMismatch:N}=B.validity}H==="email"&&!N&&!g.split("@")[1]?.includes(".")&&(N=!0)}if(v==="number"){const{value_type:H="int"}=m;typeof k=="number"&&g!==null&&Number(g)<k?O=!0:typeof S=="number"&&g!==null&&Number(g)>S&&(L=!0),(H==="int"||H==="float")&&y&&g===null&&(N=!0)}}const j=new Proxy({valueMissing:C,tooShort:E,tooLong:A,rangeUnderflow:O,rangeOverflow:L,patternMismatch:I,typeMismatch:N},{get:(H,B)=>B==="valid"?!Object.values(H).some(Boolean):H[B]});s[u][p]=j,j.valid||(c=!1)};f.forEach(([p,g])=>{h(p,g)})}),rt.update(u=>({...u,validities:s})),c},e1=(t,e=ne(wt)?.output?.json??{})=>{const{indent_style:n="space",indent_size:r=n==="tab"?1:2}=e;return JSON.stringify(t,null,n==="tab"?" ".repeat(r):r).trim()},t1=t=>Aq(t).trim(),n1=(t,e=ne(wt)?.output?.yaml??{},n={})=>{const{indent_size:r=2,quote:i="none"}=e,{quote:s=!1}=n;return Od.stringify(t,null,{indent:r,lineWidth:0,defaultKeyType:"PLAIN",defaultStringType:s||i==="double"?"QUOTE_DOUBLE":i==="single"?"QUOTE_SINGLE":"PLAIN",singleQuote:!(s||i==="double")}).trim()},r1=async({content:t,_file:e})=>{const{format:n,fmDelimiters:r,yamlQuote:i=!1}=e,s=rp[n]?.formatter;if(s)return`${(await s(t)).trim()}
565
565
  `;try{if(/^ya?ml$/.test(n))return`${n1(t,void 0,{quote:i})}
566
566
  `;if(n==="toml")return`${t1(t)}
567
567
  `;if(n==="json")return`${e1(t)}
@@ -578,41 +578,31 @@ ${c}
578
578
  ${e1(t)}
579
579
  ${a}
580
580
  ${c}
581
- `}catch(u){console.error(u)}}return""},N5=t=>{const{collection:e}=t,{_i18n:{structure:n},_assetFolder:r}=e,i=e._type==="entry"?e._file.subPath:void 0,s=i?.match(/(?<path>.+?)(?:\/[^/]+)?$/)?.groups?.path??"",o=["multiple_folders","multiple_folders_i18n_root"].includes(n),{entryRelative:a,internalPath:c,publicPath:u}=r??ne(hi)[0];return a?{internalBaseAssetFolder:c,internalAssetFolder:Ev(ys(jh([c,o||i?.includes("/")?s:void 0]),t)),publicAssetFolder:!o&&/^\.?$/.test(u)?u:Ev(ys(o?jh([...Array((i?.match(/\//g)??[]).length+1).fill(".."),u,s]):u,t))}:{internalBaseAssetFolder:c,internalAssetFolder:ys(c,t),publicAssetFolder:ys(u,t)}},CA=({draft:t,locale:e,slug:n})=>{const{collection:r,collectionFile:i,originalEntry:s,currentValues:o}=t;if(i)return i.file.replace("{{locale}}",e);if(s?.locales[e].slug===n)return s.locales[e].path;const a=r,{_file:{basePath:c,subPath:u,extension:d},_i18n:{defaultLocale:f,structure:h}}=a,p=u?ys(u,{collection:a,locale:e,content:o[f],currentSlug:n}):n,g={multiple_folders:`${c}/${e}/${p}.${d}`,multiple_folders_i18n_root:`${e}/${c}/${p}.${d}`,multiple_files:`${c}/${p}.${e}.${d}`,single_file:`${c}/${p}.${d}`};return g[h]??g.single_file},Uf=({field:t,keyPath:e,keyPathList:n})=>{const{widget:r}=t,i=r==="list";if(n.push(e),i||r==="object"){const{fields:s,types:o,typeKey:a="type"}=t;if(s)s.forEach(c=>{Uf({field:c,keyPath:i?`${e}.*.${c.name}`:`${e}.${c.name}`,keyPathList:n})});else if(o)n.push(i?`${e}.*.${a}`:`${e}.${a}`),o.forEach(c=>{c.fields?.forEach(u=>{Uf({field:u,keyPath:i?`${e}.*.${u.name}`:`${e}.${u.name}`,keyPathList:n})})});else if(i){const{field:c}=t;c?Uf({field:c,keyPath:`${e}.*`,keyPathList:n}):n.push(`${e}.*`)}}if(r==="select"||r==="relation"){const{multiple:s=!1}=t;n.push(s?`${e}.*`:e)}},I5=t=>{const e=[];return t.forEach(n=>{Uf({field:n,keyPath:n.name,keyPathList:e})}),e},iu=({key:t,field:e,locale:n,unsortedMap:r,sortedMap:i,isTomlOutput:s,omitEmptyOptionalFields:o})=>{let a=r[t];if(s&&typeof a=="string"&&o5.test(a)&&e?.widget==="datetime")try{a=new va(a)}catch{}o&&e&&!Dd({fieldConfig:e,locale:n})&&!Object.keys(r).some(c=>c.startsWith(`${t}.`))&&(!a||Array.isArray(a)&&!a.length||Jn(a)&&!Object.keys(a).length)||(i[t]=a),delete r[t]},R5=({collectionName:t,fileName:e,fields:n,locale:r,valueMap:i,canonicalSlugKey:s,isTomlOutput:o=!1})=>{const a=nc(i),c={},{omit_empty_optional_fields:u=!1}=ne(wt)?.output??{},d={locale:r,unsortedMap:a,sortedMap:c,isTomlOutput:o,omitEmptyOptionalFields:u};return s&&s in a&&iu({key:s,...d}),I5(n).forEach(f=>{const h=_n({collectionName:t,fileName:e,valueMap:i,keyPath:f});if(f in a)iu({key:f,field:h,...d});else if(h?.widget==="keyvalue")c[f]={},Object.entries(a).filter(([p])=>p.startsWith(`${f}.`)).forEach(([p])=>{iu({key:p,field:h,...d})});else{const p=new RegExp(`^${ln(f.replaceAll("*","\\d+")).replaceAll("\\\\d\\+","\\d+")}$`);Object.keys(a).filter(g=>p.test(g)).sort(([g,m])=>ui(g,m)).forEach(g=>{iu({key:g,field:h,...d})})}}),Object.keys(a).sort(([f,h])=>ui(f,h)).forEach(f=>{iu({key:f,...d})}),za(c)},pm=({draft:t,locale:e,valueMap:n})=>{const{collection:r,collectionFile:i}=t,{fields:s=[],_file:o,_i18n:{canonicalSlug:{key:a}}}=i??r,c=R5({collectionName:r.name,fileName:i?.name,fields:s,locale:e,valueMap:n,canonicalSlugKey:a,isTomlOutput:["toml","toml-frontmatter"].includes(o.format)});return iA(s)?c[s[0].name]??[]:c},D5=({draft:t,defaultLocaleSlug:e})=>{const{collection:n,collectionFile:r,currentLocales:i,currentSlugs:s,currentValues:o}=t,{identifier_field:a="title",slug:c=`{{${a}}}`}=n,{_i18n:{defaultLocale:u,structure:d}}=r??n,f=[...c.matchAll(/{{(?:fields\.)?(.+?)( \| localize)?}}/g)].filter(([,,p])=>!!p).map(([,p])=>p);if(d==="single_file"||!f.length)return;const h=n;return Object.fromEntries(Object.entries(i).filter(([,p])=>p).map(([p])=>[p,p===u?e:s?.[p]??s?._??ys(c,{collection:h,locale:p,content:{...o[u],...Object.fromEntries(f.map(g=>[g,o[p][g]]))}})]))},M5=({draft:t,defaultLocaleSlug:e,localizedSlugs:n,fillSlugOptions:r})=>{if(!n)return;const{collection:i,collectionFile:s}=t,{_i18n:{canonicalSlug:{value:o}}}=s??i;return o==="{{slug}}"?e:ys(o,{...r,currentSlug:e})},AA=({draft:t})=>{const{collection:e,collectionFile:n,currentValues:r}=t,{_i18n:{defaultLocale:i}}=n??e;return{collection:e,content:r[i]}},PA=({draft:t})=>{const{collection:e,collectionFile:n,fileName:r,currentSlugs:i}=t,{identifier_field:s="title",slug:o=`{{${s}}}`}=e,{_i18n:{defaultLocale:a}}=n??e,c=AA({draft:t}),u=r??i?.[a]??i?._??ys(o,c),d=D5({draft:t,defaultLocaleSlug:u}),f=M5({draft:t,defaultLocaleSlug:u,localizedSlugs:d,fillSlugOptions:c});return{defaultLocaleSlug:u,localizedSlugs:d,canonicalSlug:f}},F5=({draft:t,defaultLocaleSlug:e})=>{const{collection:n,collectionName:r,collectionFile:i}=t,s=AA({draft:t}),{_i18n:{defaultLocale:o}}=i??n,a=N5({...s,type:"media_folder",currentSlug:e,entryFilePath:CA({draft:t,locale:o,slug:e})}),{internalBaseAssetFolder:c,internalAssetFolder:u}=a,d=ny(u).map(g=>g.name.normalize()),{email:f,name:h}=ne(gi);return{assetFolderPaths:a,assetNamesInSameFolder:d,savingAssetProps:{text:void 0,collectionName:r,folder:c,commitAuthor:f?{name:h,email:f}:void 0,commitDate:new Date}}},z5=async({blobURL:t,keyPath:e,content:n,changes:r,files:i,savingAssets:s,savingAssetProps:o,assetNamesInSameFolder:a,assetFolderPaths:{internalAssetFolder:c,publicAssetFolder:u}})=>{const d=i[t];if(!d)return;const f=await Pa(d),h=s.find(m=>m.sha===f);let p="";if(h)p=h.name;else{p=Y_(d.name.normalize(),a);const m=c?`${c}/${p}`:p;a.push(p),r.push({action:"create",path:m,data:d}),s.push({...o,blobURL:URL.createObjectURL(d),name:p,path:m,sha:f,size:d.size,kind:X_(p)})}const g=encodeURI(u?`${u==="/"?"":u}/${p}`:p);n[e]=n[e].replaceAll(t,g)},j5=async({draft:t,slugs:{defaultLocaleSlug:e,canonicalSlug:n,localizedSlugs:r}})=>{const{collection:i,currentLocales:s,collectionFile:o,currentValues:a,files:c}=t,{_i18n:{canonicalSlug:{key:u}}}=o??i,d=[],f=[],h={files:c,changes:d,savingAssets:f,...F5({draft:t,defaultLocaleSlug:e})};return{localizedEntryMap:Object.fromEntries(await Promise.all(Object.entries(a).map(async([g,m])=>{const _=r?.[g]??e,b=CA({draft:t,locale:g,slug:_});return s[g]?(m[u]=n,await Promise.all(Object.entries(m).map(async([y,x])=>{if(x===void 0){delete m[y];return}typeof x=="string"&&(m[y]=x.trim(),await Promise.all([...x.matchAll(fk("g"))].map(([k])=>z5({blobURL:k,keyPath:y,content:m,...h}))))})),[g,{slug:_,path:b,sha:"",content:nc(m)}]):[g,{path:b}]}))),changes:d,savingAssets:f}},OA=async({draft:t,slugs:e})=>{const{collection:n,isNew:r,originalLocales:i,currentLocales:s,originalSlugs:o,originalEntry:a,collectionFile:c}=t,{defaultLocaleSlug:u}=e,{_file:d,_i18n:{i18nEnabled:f,allLocales:h,defaultLocale:p,structure:g}}=c??n,{localizedEntryMap:m,changes:v,savingAssets:_}=await j5({draft:t,slugs:e}),b={id:a?.id??Gn(),sha:"",slug:u,subPath:d.fullPathRegEx?m[p].path.match(d.fullPathRegEx)?.groups?.subPath??u:u,locales:Object.fromEntries(Object.entries(m).filter(([,{content:y}])=>!!y))};if(!f||g==="single_file"){const y=b.locales[p],{slug:x,path:k,content:S}=y,C=!r&&(o?.[p]??o?._)!==x,E=await r1({content:f?Object.fromEntries(Object.entries(b.locales).map(([A,O])=>[A,pm({draft:t,locale:A,valueMap:O.content})])):pm({draft:t,locale:"_default",valueMap:S}),_file:d});v.push({action:r?"create":C?"move":"update",slug:x,path:k,previousPath:C?a?.locales[p].path:void 0,data:E}),y.sha=await Pa(new Blob([E],{type:"text/plain"}))}else await Promise.all(h.map(async y=>{const x=b.locales[y],{slug:k,path:S,content:C}=x??{};if(s[y]){const E=!r&&i[y]&&(o?.[y]??o?._)!==k,A=await r1({content:pm({draft:t,locale:y,valueMap:C}),_file:d});v.push({action:r||!i[y]?"create":E?"move":"update",slug:k,path:S,previousPath:E?a?.locales[y].path:void 0,data:A}),x.sha=await Pa(new Blob([A],{type:"text/plain"}))}else i[y]&&v.push({action:"delete",slug:k,path:S});return!0}));return b.sha=b.locales[p].sha,{savingEntry:b,savingAssets:_,changes:v}},U5=async({skipCI:t=void 0}={})=>{const e=ne(rt),{collection:n,isNew:r,collectionName:i,fileName:s,currentValues:o}=e;if(!L5())throw Lq({collectionName:i,fileName:s,currentValues:o}),new Error("validation_failed");const a=PA({draft:e}),{defaultLocaleSlug:c}=a,{savingEntry:u,changes:d,savingAssets:f}=await OA({draft:e,slugs:a});try{await ne(In).commitChanges(d,{commitType:r?"create":"update",collection:n,skipCI:t})}catch(v){throw console.error(v.cause??v),new Error("saving_failed",{cause:v.cause??v})}const h=f.map(v=>v.path);ii.update(v=>[...v.filter(_=>_.id!==u.id),u]),en.update(v=>[...v.filter(_=>!h.includes(_.path)),...f]);const p=ne(zs)==="local",g=ne(wt)?.backend.automatic_deployments,m=!p&&(t===void 0?g===!0:t===!1);return Au.set({...nl,saved:!0,published:m,count:1}),Hh.set(m),cg(i,r?"":c),u},xo=st({...nl}),$A=async(t,e)=>{const{files:n,folder:r,originalAsset:i}=t,s=r?ny(r).map(h=>h.name.normalize()):[],o=n.map(h=>{const p=i?.name??Y_(h.name.normalize(),s);return s.includes(p)||s.push(p),{action:i?"update":"create",name:p,path:[r,p].join("/"),file:h}});await ne(In)?.commitChanges(o.map(({action:h,path:p,file:g})=>({action:h,path:p,data:g})),e);const a=await Promise.all(o.map(async({name:h,path:p,file:g})=>({blobURL:URL.createObjectURL(g),name:h,path:p,sha:await Pa(g),size:g.size,kind:X_(h),text:void 0,folder:r})));en.update(h=>[...h.filter(p=>!a.some(g=>g.path===p.path)),...a]);const c=ne(uo),u=ne(Ho);c&&uo.set(ne(en).find(h=>h.path===c.path)),u&&Ho.set(ne(en).find(h=>h.path===u.path));const d=ne(zs)==="local",f=ne(wt)?.backend.automatic_deployments;xo.set({...nl,saved:!0,published:!d&&f===!0,count:n.length})},B5=async(t,e)=>{const n=ne(hi),r=[],i=[],s=[];await Promise.all(e.map(async({asset:f,path:h})=>{const p=h,g=Ln(p).basename;s.push({...f,path:p,name:g}),r.push({action:"move",path:p,previousPath:f.path,data:new File([f.file??await el(f)],g)});const m=f.blobURL??rg(f),v=m?await Tv(m):[];if(!m||!v.length)return;const{publicPath:_}=n.find(({collectionName:y})=>ey(f).some(x=>x.name===y))??n.find(({collectionName:y})=>!y)??{},b=await Tv(m,{entries:structuredClone(v),newURL:p.replace(f.folder,_??"")});await Promise.all(b.map(async y=>{const{locales:x}=y,k=Object.fromEntries(Object.entries(x).map(([A])=>[A,!0])),S=Object.fromEntries(Object.entries(x).map(([A,{slug:O}])=>[A,O])),C=Object.fromEntries(Object.entries(x).map(([A,{content:O}])=>[A,O])),E={isNew:!1,originalEntry:y,originalLocales:k,currentLocales:k,originalSlugs:S,currentSlugs:S,originalValues:C,currentValues:C,files:{},validities:{},expanderStates:{}};await Promise.all(co(y).map(async A=>{const O=async I=>{const N={...E,collection:A,collectionName:A.name,collectionFile:I,fileName:I?.name},{savingEntry:j,changes:H}=await OA({draft:N,slugs:PA({draft:N})});i.push(j),r.push(...H)},L=Zo(A,y);L.length?await Promise.all(L.map(O)):await O()}))}))}));const o=await ne(In)?.commitChanges(r,{commitType:"uploadMedia"});Array.isArray(o)&&s.forEach((f,h)=>{o[h]instanceof File&&(f.blobURL=URL.createObjectURL(o[h]))});const a=e.map(f=>f.asset.path),c=i.map(f=>f.id);en.update(f=>[...f.filter(h=>!a.includes(h.path)),...s]),ii.update(f=>[...f.filter(h=>!c.includes(h.id)),...i]);const u=e.find(f=>f.asset.path===ne(uo)?.path),d=e.find(f=>f.asset.path===ne(Ho)?.path);u&&uo.set(ne(en).find(f=>f.path===u.path)),d&&Ho.set(ne(en).find(f=>f.path===d.path)),xo.set({...nl,moved:t==="move",renamed:t==="rename",count:e.length})},q5=async t=>{await ne(In)?.commitChanges(t.map(({path:e})=>({action:"delete",path:e})),{commitType:"deleteMedia"}),en.update(e=>e.filter(n=>!t.includes(n))),xo.set({...nl,deleted:!0,count:t.length})};var H5=F("<!> <!>",1);function LA(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(le,"$_",n);let s=P(e,"assets",19,()=>[]),o=P(e,"buttonDescription",3,""),a=P(e,"dialogDescription",3,""),c=P(e,"onDelete",3,void 0),u=ae(!1);var d=H5(),f=M(d);const h=w(()=>!s().length),p=w(()=>i()("delete"));Ze(f,{variant:"ghost",get disabled(){return l(h)},get label(){return l(p)},get"aria-label"(){return o()},onclick:()=>{$(u,!0)}});var g=D(f,2);const m=w(()=>s().length===1?i()("delete_asset"):i()("delete_assets")),v=w(()=>i()("delete"));xc(g,{get title(){return l(m)},get okLabel(){return l(v)},onOk:()=>{q5(s()),c()?.()},get open(){return l(u)},set open(_){$(u,ie(_))},children:(_,b)=>{var y=Ue();q(()=>Z(y,a())),T(_,y)},$$slots:{default:!0}}),T(t,d),oe(),r()}var V5=F("<!> <!>",1);function NA(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(le,"$_",n);let s=P(e,"assets",19,()=>[]),o=ae(!1);const a=async()=>{for(const p of s())VP(await el(p),p.name),await vn(300);$(o,!0)};var c=V5(),u=M(c);const d=w(()=>!s().length),f=w(()=>i()("download"));Ze(u,{variant:"ghost",get disabled(){return l(d)},get label(){return l(f)},onclick:()=>{a()}});var h=D(u,2);Yn(h,{get show(){return l(o)},set show(p){$(o,ie(p))},children:(p,g)=>{Hn(p,{status:"success",children:(m,v)=>{var _=Ue();q(b=>Z(_,b),[()=>s().length===1?i()("asset_downloaded"):i()("assets_downloaded")]),T(m,_)},$$slots:{default:!0}})},$$slots:{default:!0}}),T(t,c),oe(),r()}const _a=st(!1),W5=ur([ws],([t],e)=>{e(!!t.files.length)}),Bf=t=>t==="*"?ne(le)("all_assets"):t?ne(wt)?.collections.find(({name:e})=>e===t)?.label??"":ne(le)("uncategorized"),gy=t=>{const{media_folder:e}=ne(wt);if(!t)return Bf("*");if(t===e)return Bf(void 0);const n=ne(hi).find(({internalPath:r})=>r===t);return n?Bf(n.collectionName):""},G5=(t,{key:e,order:n}={})=>{if(!e||!n)return t;const r=[...t],i={commit_author:String,commit_date:Date}[e]||r[0]?.[e]?.constructor||String,s=o=>{const{commitAuthor:{name:a,login:c,email:u}={},commitDate:d}=o;return e==="commit_author"?a||c||u:e==="commit_date"?d:e==="name"?o.name.split(".")[0]:o[e]??""};return r.sort((o,a)=>{const c=s(o),u=s(a);return i===String?ui(c,u):i===Date?Number(c)-Number(u):c-u}),n==="descending"&&r.reverse(),r},K5=(t,{field:e,pattern:n}={field:"",pattern:""})=>{if(!e)return t;if(e==="fileType")return t.filter(({path:i})=>n==="other"?!Object.values(Cv).some(s=>s.test(i)):Cv[n].test(i));const r=typeof n=="string"?new RegExp(n):void 0;return t.filter(i=>{const s=i[e];return r?r.test(String(s??"")):s===n})},Y5=(t,{field:e,pattern:n}={field:"",pattern:void 0})=>{if(!e)return t.length?{"*":t}:{};const r=typeof n=="string"?new RegExp(n):void 0,i={},s=ne(le)("other");return t.forEach(o=>{const a=o[e];let c;r?[c=s]=String(a??"").match(r)??[]:c=a,c in i||(i[c]=[]),i[c].push(o)}),Object.fromEntries(Object.entries(i).sort(([o],[a])=>ui(o,a)))},J5={type:"grid",showInfo:!0,sort:{key:"name",order:"ascending"}},Gi=st({type:"grid",showInfo:!0}),wl=st(),Z5=ur([en,Nn],([t],e)=>{const n=["name"];t.every(r=>!!r.commitAuthor)&&n.push("commit_author"),t.every(r=>!!r.commitDate)&&n.push("commit_date"),e(n.map(r=>({key:r,label:ne(le)(`sort_keys.${r}`)})))}),rl=ur([en,ni],([t,e],n)=>{n(t&&e?t.filter(({folder:r})=>e.internalPath===r):t?[...t]:[])}),my=ur([rl,Gi],([t,e],n)=>{let r=[...t];r=G5(r,e.sort),r=K5(r,e.filter);const i=Y5(r,e.group);zn(ne(my),i)||n(i)}),X5=async({repository:t})=>{const{databaseName:e}=t??{},n=e?new jo(e,"ui-settings"):null,r="assets-view";wl.set(await n?.get(r)??{}),wl.subscribe(i=>{(async()=>{try{zn(i,await n?.get(r))||await n?.set(r,i)}catch{}})()}),ni.subscribe(i=>{const s=ne(wl)?.[i?.internalPath||"*"]??structuredClone(J5);zn(s,ne(Gi))||Gi.set(s)}),Gi.subscribe(i=>{const s=ne(ni)?.internalPath||"*",o=ne(wl)?.[s]??{};zn(i,o)||wl.update(a=>({...a,[s]:i}))})};In.subscribe(t=>{t&&!ne(wl)&&X5(t)});rl.subscribe(t=>{rd.set([]),ne(Tt).devModeEnabled&&console.info("listedAssets",t)});var Q5=F("<!> <!> <!> <!> <!> <!>",1);function IA(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(le,"$_",n),s=()=>z(Tt,"$prefs",n),o=()=>z(In,"$backend",n);let a=ae(ie({...Uh}));const c=w(()=>l(a).publicURL),u=w(()=>l(a).repoBlobURL),d=async()=>{$(a,ie(e.asset?await ig(e.asset):{...Uh}))};Be(()=>{e.asset,d()});const f=w(()=>i()("show_edit_options"));Nr(t,{variant:"ghost",iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return l(f)},popup:p=>{const g=w(()=>i()("edit_options"));wr(p,{get"aria-label"(){return l(g)},children:(m,v)=>{var _=Q5(),b=M(_);const y=w(()=>i()("edit")),x=w(()=>i()("edit_asset")),k=w(()=>!e.asset||!t8(e.asset));Nt(b,{variant:"ghost",get label(){return l(y)},get"aria-label"(){return l(x)},get disabled(){return l(k)},onclick:()=>{ot(Av,e.asset)}});var S=D(b,2);const C=w(()=>i()("rename")),E=w(()=>i()("rename_asset")),A=w(()=>!e.asset);Nt(S,{variant:"ghost",get label(){return l(C)},get"aria-label"(){return l(E)},get disabled(){return l(A)},onclick:()=>{ot(zf,e.asset)}});var O=D(S,2);const L=w(()=>i()("replace")),I=w(()=>i()("replace_asset")),N=w(()=>!e.asset);Nt(O,{variant:"ghost",get label(){return l(L)},get"aria-label"(){return l(I)},get disabled(){return l(N)},onclick:()=>{ot(ws,{folder:void 0,files:[],originalAsset:e.asset}),ot(_a,!0)}});var j=D(O,2);Ar(j,{});var H=D(j,2);const B=w(()=>i()("view_on_live_site")),V=w(()=>!l(c));Nt(H,{get label(){return l(B)},get disabled(){return l(V)},onclick:()=>{window.open(l(c))}});var G=D(H,2);{var K=ee=>{const J=w(()=>!o()?.repository||!l(u)),Y=w(()=>i()("view_on_x",{values:{service:o()?.repository?.label},default:i()("view_in_repository")}));Nt(ee,{get disabled(){return l(J)},get label(){return l(Y)},onclick:()=>{window.open(`${l(u)}?plain=1`)}})};U(G,ee=>{s().devModeEnabled&&ee(K)})}T(m,_)},$$slots:{default:!0}})},$$slots:{popup:!0}}),oe(),r()}var eH=F('<!> <h2 role="none"><strong role="none"> </strong></h2> <!> <!> <!> <!> <!>',1);function tH(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(Ho,"$overlaidAsset",n),s=()=>z(le,"$_",n),o=()=>z(ni,"$selectedAssetFolder",n),a=w(()=>i()?[i()]:[]),c=w(()=>s()("primary"));po(t,{variant:"primary",get"aria-label"(){return l(c)},children:(u,d)=>{var f=eH(),h=M(f);const p=w(()=>s()("cancel_editing"));Ze(h,{variant:"ghost",iconic:!0,get"aria-label"(){return l(p)},keyShortcuts:"Escape",onclick:()=>{Ul(o()?`/assets/${o().internalPath}`:"/assets")},startIcon:A=>{et(A,{name:"arrow_back_ios_new"})},$$slots:{startIcon:!0}});var g=D(h,2),m=R(g),v=R(m),_=D(g,2);Xr(_,{flex:!0});var b=D(_,2);wA(b,{get assets(){return l(a)}});var y=D(b,2);NA(y,{get assets(){return l(a)}});var x=D(y,2);const k=w(()=>s()("delete_asset")),S=w(()=>s()("confirm_deleting_this_asset"));LA(x,{get assets(){return l(a)},get buttonDescription(){return l(k)},get dialogDescription(){return l(S)},onDelete:()=>{Ul(o()?`/assets/${o().internalPath}`:"/assets")}});var C=D(x,2);IA(C,{get asset(){return i()}}),q(()=>Z(v,i()?.name)),T(u,f)},$$slots:{default:!0}}),oe(),r()}var nH=F('<iframe class="svelte-1lmpz2c"></iframe>'),rH=F('<div role="figure" class="markdown svelte-1lmpz2c"><!></div>'),iH=F('<pre role="figure" class="svelte-1lmpz2c"> </pre>'),sH=F('<pre role="figure" class="svelte-1lmpz2c"> </pre>'),oH=F('<span role="alert"> </span>'),aH=F('<!> <div role="none" class="row svelte-1lmpz2c"><div role="none" class="preview svelte-1lmpz2c"><!></div> <!></div>',1),lH=F('<div role="none" class="wrapper svelte-1lmpz2c"><!></div>');const cH={hash:"svelte-1lmpz2c",code:`.wrapper.svelte-1lmpz2c {display:contents;}.wrapper[hidden].svelte-1lmpz2c {display:none;}.wrapper.svelte-1lmpz2c > .sui.group {position:absolute;inset:0;z-index:100;display:flex;flex-direction:column;background-color:var(--sui-secondary-background-color);transition:filter 250ms;}.wrapper[inert].svelte-1lmpz2c > .sui.group {filter:opacity(0);}.wrapper.svelte-1lmpz2c .row:where(.svelte-1lmpz2c) {flex:auto;display:flex;overflow:hidden;}.wrapper.svelte-1lmpz2c .row:where(.svelte-1lmpz2c) .preview:where(.svelte-1lmpz2c) {flex:auto;overflow:hidden;}.wrapper.svelte-1lmpz2c .row:where(.svelte-1lmpz2c) .preview:where(.svelte-1lmpz2c) iframe:where(.svelte-1lmpz2c),
581
+ `}catch(u){console.error(u)}}return""},N8=t=>{const{collection:e}=t,{_i18n:{structure:n},_assetFolder:r}=e,i=e._type==="entry"?e._file.subPath:void 0,s=i?.match(/(?<path>.+?)(?:\/[^/]+)?$/)?.groups?.path??"",o=["multiple_folders","multiple_folders_i18n_root"].includes(n),{entryRelative:a,internalPath:c,publicPath:u}=r??ne(hi)[0];return a?{internalBaseAssetFolder:c,internalAssetFolder:Ev(ys(jh([c,o||i?.includes("/")?s:void 0]),t)),publicAssetFolder:!o&&/^\.?$/.test(u)?u:Ev(ys(o?jh([...Array((i?.match(/\//g)??[]).length+1).fill(".."),u,s]):u,t))}:{internalBaseAssetFolder:c,internalAssetFolder:ys(c,t),publicAssetFolder:ys(u,t)}},CA=({draft:t,locale:e,slug:n})=>{const{collection:r,collectionFile:i,originalEntry:s,currentValues:o}=t;if(i)return i.file.replace("{{locale}}",e);if(s?.locales[e]?.slug===n)return s.locales[e].path;const a=r,{_file:{basePath:c,subPath:u,extension:d},_i18n:{defaultLocale:f,structure:h}}=a,p=u?ys(u,{collection:a,locale:e,content:o[f],currentSlug:n}):n,g={multiple_folders:`${c}/${e}/${p}.${d}`,multiple_folders_i18n_root:`${e}/${c}/${p}.${d}`,multiple_files:`${c}/${p}.${e}.${d}`,single_file:`${c}/${p}.${d}`};return g[h]??g.single_file},Uf=({field:t,keyPath:e,keyPathList:n})=>{const{widget:r}=t,i=r==="list";if(n.push(e),i||r==="object"){const{fields:s,types:o,typeKey:a="type"}=t;if(s)s.forEach(c=>{Uf({field:c,keyPath:i?`${e}.*.${c.name}`:`${e}.${c.name}`,keyPathList:n})});else if(o)n.push(i?`${e}.*.${a}`:`${e}.${a}`),o.forEach(c=>{c.fields?.forEach(u=>{Uf({field:u,keyPath:i?`${e}.*.${u.name}`:`${e}.${u.name}`,keyPathList:n})})});else if(i){const{field:c}=t;c?Uf({field:c,keyPath:`${e}.*`,keyPathList:n}):n.push(`${e}.*`)}}if(r==="select"||r==="relation"){const{multiple:s=!1}=t;n.push(s?`${e}.*`:e)}},I8=t=>{const e=[];return t.forEach(n=>{Uf({field:n,keyPath:n.name,keyPathList:e})}),e},iu=({key:t,field:e,locale:n,unsortedMap:r,sortedMap:i,isTomlOutput:s,omitEmptyOptionalFields:o})=>{let a=r[t];if(s&&typeof a=="string"&&o8.test(a)&&e?.widget==="datetime")try{a=new va(a)}catch{}o&&e&&!Dd({fieldConfig:e,locale:n})&&!Object.keys(r).some(c=>c.startsWith(`${t}.`))&&(!a||Array.isArray(a)&&!a.length||Jn(a)&&!Object.keys(a).length)||(i[t]=a),delete r[t]},R8=({collectionName:t,fileName:e,fields:n,locale:r,valueMap:i,canonicalSlugKey:s,isTomlOutput:o=!1})=>{const a=nc(i),c={},{omit_empty_optional_fields:u=!1}=ne(wt)?.output??{},d={locale:r,unsortedMap:a,sortedMap:c,isTomlOutput:o,omitEmptyOptionalFields:u};return s&&s in a&&iu({key:s,...d}),I8(n).forEach(f=>{const h=_n({collectionName:t,fileName:e,valueMap:i,keyPath:f});if(f in a)iu({key:f,field:h,...d});else if(h?.widget==="keyvalue")c[f]={},Object.entries(a).filter(([p])=>p.startsWith(`${f}.`)).forEach(([p])=>{iu({key:p,field:h,...d})});else{const p=new RegExp(`^${ln(f.replaceAll("*","\\d+")).replaceAll("\\\\d\\+","\\d+")}$`);Object.keys(a).filter(g=>p.test(g)).sort(([g,m])=>ui(g,m)).forEach(g=>{iu({key:g,field:h,...d})})}}),Object.keys(a).sort(([f,h])=>ui(f,h)).forEach(f=>{iu({key:f,...d})}),za(c)},pm=({draft:t,locale:e,valueMap:n})=>{const{collection:r,collectionFile:i}=t,{fields:s=[],_file:o,_i18n:{canonicalSlug:{key:a}}}=i??r,c=R8({collectionName:r.name,fileName:i?.name,fields:s,locale:e,valueMap:n,canonicalSlugKey:a,isTomlOutput:["toml","toml-frontmatter"].includes(o.format)});return iA(s)?c[s[0].name]??[]:c},D8=({draft:t,defaultLocaleSlug:e})=>{const{collection:n,collectionFile:r,currentLocales:i,currentSlugs:s,currentValues:o}=t,{identifier_field:a="title",slug:c=`{{${a}}}`}=n,{_i18n:{defaultLocale:u,structure:d}}=r??n,f=[...c.matchAll(/{{(?:fields\.)?(.+?)( \| localize)?}}/g)].filter(([,,p])=>!!p).map(([,p])=>p);if(d==="single_file"||!f.length)return;const h=n;return Object.fromEntries(Object.entries(i).map(([p])=>{const g=p===u?e:s?.[p]??s?._??ys(c,{collection:h,locale:p,content:{...o[u],...Object.fromEntries(f.map(m=>[m,o[p]?.[m]]))}});return[p,g]}))},M8=({draft:t,defaultLocaleSlug:e,localizedSlugs:n,fillSlugOptions:r})=>{if(!n)return;const{collection:i,collectionFile:s}=t,{_i18n:{canonicalSlug:{value:o}}}=s??i;return o==="{{slug}}"?e:ys(o,{...r,currentSlug:e})},AA=({draft:t})=>{const{collection:e,collectionFile:n,currentValues:r}=t,{_i18n:{defaultLocale:i}}=n??e;return{collection:e,content:r[i]}},PA=({draft:t})=>{const{collection:e,collectionFile:n,fileName:r,currentSlugs:i}=t,{identifier_field:s="title",slug:o=`{{${s}}}`}=e,{_i18n:{defaultLocale:a}}=n??e,c=AA({draft:t}),u=r??i?.[a]??i?._??ys(o,c),d=D8({draft:t,defaultLocaleSlug:u}),f=M8({draft:t,defaultLocaleSlug:u,localizedSlugs:d,fillSlugOptions:c});return{defaultLocaleSlug:u,localizedSlugs:d,canonicalSlug:f}},F8=({draft:t,defaultLocaleSlug:e})=>{const{collection:n,collectionName:r,collectionFile:i}=t,s=AA({draft:t}),{_i18n:{defaultLocale:o}}=i??n,a=N8({...s,type:"media_folder",currentSlug:e,entryFilePath:CA({draft:t,locale:o,slug:e})}),{internalBaseAssetFolder:c,internalAssetFolder:u}=a,d=ny(u).map(g=>g.name.normalize()),{email:f,name:h}=ne(gi);return{assetFolderPaths:a,assetNamesInSameFolder:d,savingAssetProps:{text:void 0,collectionName:r,folder:c,commitAuthor:f?{name:h,email:f}:void 0,commitDate:new Date}}},z8=async({blobURL:t,keyPath:e,content:n,changes:r,files:i,savingAssets:s,savingAssetProps:o,assetNamesInSameFolder:a,assetFolderPaths:{internalAssetFolder:c,publicAssetFolder:u}})=>{const d=i[t];if(!d)return;const f=await Pa(d),h=s.find(m=>m.sha===f);let p="";if(h)p=h.name;else{p=Y_(d.name.normalize(),a);const m=c?`${c}/${p}`:p;a.push(p),r.push({action:"create",path:m,data:d}),s.push({...o,blobURL:URL.createObjectURL(d),name:p,path:m,sha:f,size:d.size,kind:X_(p)})}const g=encodeURI(u?`${u==="/"?"":u}/${p}`:p);n[e]=n[e].replaceAll(t,g)},j8=async({draft:t,slugs:{defaultLocaleSlug:e,canonicalSlug:n,localizedSlugs:r}})=>{const{collection:i,currentLocales:s,collectionFile:o,currentValues:a,files:c}=t,{_i18n:{canonicalSlug:{key:u}}}=o??i,d=[],f=[],h={files:c,changes:d,savingAssets:f,...F8({draft:t,defaultLocaleSlug:e})};return{localizedEntryMap:Object.fromEntries(await Promise.all(Object.entries(a).map(async([g,m])=>{const _=r?.[g]??e,b=CA({draft:t,locale:g,slug:_});return s[g]?(m[u]=n,await Promise.all(Object.entries(m).map(async([y,x])=>{if(x===void 0){delete m[y];return}typeof x=="string"&&(m[y]=x.trim(),await Promise.all([...x.matchAll(fk("g"))].map(([k])=>z8({blobURL:k,keyPath:y,content:m,...h}))))})),[g,{slug:_,path:b,sha:"",content:nc(m)}]):[g,{path:b}]}))),changes:d,savingAssets:f}},OA=async({draft:t,slugs:e})=>{const{collection:n,isNew:r,originalLocales:i,currentLocales:s,originalSlugs:o,originalEntry:a,collectionFile:c}=t,{defaultLocaleSlug:u}=e,{_file:d,_i18n:{i18nEnabled:f,allLocales:h,defaultLocale:p,structure:g}}=c??n,{localizedEntryMap:m,changes:v,savingAssets:_}=await j8({draft:t,slugs:e}),b={id:a?.id??Gn(),sha:"",slug:u,subPath:d.fullPathRegEx?m[p].path.match(d.fullPathRegEx)?.groups?.subPath??u:u,locales:Object.fromEntries(Object.entries(m))};if(!f||g==="single_file"){const y=b.locales[p],{slug:x,path:k,content:S}=y,C=!r&&(o?.[p]??o?._)!==x,E=await r1({content:f?Object.fromEntries(Object.entries(b.locales).map(([A,O])=>[A,pm({draft:t,locale:A,valueMap:O.content})])):pm({draft:t,locale:"_default",valueMap:S}),_file:d});v.push({action:r?"create":C?"move":"update",slug:x,path:k,previousPath:C?a?.locales[p].path:void 0,data:E}),y.sha=await Pa(new Blob([E],{type:"text/plain"}))}else await Promise.all(h.map(async y=>{const x=b.locales[y],{slug:k,path:S,content:C}=x??{};if(s[y]){const E=!r&&i[y]&&(o?.[y]??o?._)!==k,A=await r1({content:pm({draft:t,locale:y,valueMap:C}),_file:d});v.push({action:r||!i[y]?"create":E?"move":"update",slug:k,path:S,previousPath:E?a?.locales[y]?.path:void 0,data:A}),x.sha=await Pa(new Blob([A],{type:"text/plain"}))}else!r&&i[y]&&v.push({action:"delete",slug:k,path:S});return!0}));return b.sha=b.locales[p].sha,{savingEntry:b,savingAssets:_,changes:v}},U8=async({skipCI:t=void 0}={})=>{const e=ne(rt),{collection:n,isNew:r,collectionName:i,fileName:s,currentValues:o}=e;if(!L8())throw L5({collectionName:i,fileName:s,currentValues:o}),new Error("validation_failed");const a=PA({draft:e}),{defaultLocaleSlug:c}=a,{savingEntry:u,changes:d,savingAssets:f}=await OA({draft:e,slugs:a});try{await ne(In).commitChanges(d,{commitType:r?"create":"update",collection:n,skipCI:t})}catch(v){throw console.error(v.cause??v),new Error("saving_failed",{cause:v.cause??v})}const h=f.map(v=>v.path);ii.update(v=>[...v.filter(_=>_.id!==u.id),u]),en.update(v=>[...v.filter(_=>!h.includes(_.path)),...f]);const p=ne(zs)==="local",g=ne(wt)?.backend.automatic_deployments,m=!p&&(t===void 0?g===!0:t===!1);return Au.set({...nl,saved:!0,published:m,count:1}),Hh.set(m),cg(i,r?"":c),u},xo=st({...nl}),$A=async(t,e)=>{const{files:n,folder:r,originalAsset:i}=t,s=r?ny(r).map(h=>h.name.normalize()):[],o=n.map(h=>{const p=i?.name??Y_(h.name.normalize(),s);return s.includes(p)||s.push(p),{action:i?"update":"create",name:p,path:[r,p].join("/"),file:h}});await ne(In)?.commitChanges(o.map(({action:h,path:p,file:g})=>({action:h,path:p,data:g})),e);const a=await Promise.all(o.map(async({name:h,path:p,file:g})=>({blobURL:URL.createObjectURL(g),name:h,path:p,sha:await Pa(g),size:g.size,kind:X_(h),text:void 0,folder:r})));en.update(h=>[...h.filter(p=>!a.some(g=>g.path===p.path)),...a]);const c=ne(uo),u=ne(Ho);c&&uo.set(ne(en).find(h=>h.path===c.path)),u&&Ho.set(ne(en).find(h=>h.path===u.path));const d=ne(zs)==="local",f=ne(wt)?.backend.automatic_deployments;xo.set({...nl,saved:!0,published:!d&&f===!0,count:n.length})},B8=async(t,e)=>{const n=ne(hi),r=[],i=[],s=[];await Promise.all(e.map(async({asset:f,path:h})=>{const p=h,g=Ln(p).basename;s.push({...f,path:p,name:g}),r.push({action:"move",path:p,previousPath:f.path,data:new File([f.file??await el(f)],g)});const m=f.blobURL??rg(f),v=m?await Tv(m):[];if(!m||!v.length)return;const{publicPath:_}=n.find(({collectionName:y})=>ey(f).some(x=>x.name===y))??n.find(({collectionName:y})=>!y)??{},b=await Tv(m,{entries:structuredClone(v),newURL:p.replace(f.folder,_??"")});await Promise.all(b.map(async y=>{const{locales:x}=y,k=Object.fromEntries(Object.entries(x).map(([A])=>[A,!0])),S=Object.fromEntries(Object.entries(x).map(([A,{slug:O}])=>[A,O])),C=Object.fromEntries(Object.entries(x).map(([A,{content:O}])=>[A,O])),E={isNew:!1,originalEntry:y,originalLocales:k,currentLocales:k,originalSlugs:S,currentSlugs:S,originalValues:C,currentValues:C,files:{},validities:{},expanderStates:{}};await Promise.all(co(y).map(async A=>{const O=async I=>{const N={...E,collection:A,collectionName:A.name,collectionFile:I,fileName:I?.name},{savingEntry:j,changes:H}=await OA({draft:N,slugs:PA({draft:N})});i.push(j),r.push(...H)},L=Zo(A,y);L.length?await Promise.all(L.map(O)):await O()}))}))}));const o=await ne(In)?.commitChanges(r,{commitType:"uploadMedia"});Array.isArray(o)&&s.forEach((f,h)=>{o[h]instanceof File&&(f.blobURL=URL.createObjectURL(o[h]))});const a=e.map(f=>f.asset.path),c=i.map(f=>f.id);en.update(f=>[...f.filter(h=>!a.includes(h.path)),...s]),ii.update(f=>[...f.filter(h=>!c.includes(h.id)),...i]);const u=e.find(f=>f.asset.path===ne(uo)?.path),d=e.find(f=>f.asset.path===ne(Ho)?.path);u&&uo.set(ne(en).find(f=>f.path===u.path)),d&&Ho.set(ne(en).find(f=>f.path===d.path)),xo.set({...nl,moved:t==="move",renamed:t==="rename",count:e.length})},q8=async t=>{await ne(In)?.commitChanges(t.map(({path:e})=>({action:"delete",path:e})),{commitType:"deleteMedia"}),en.update(e=>e.filter(n=>!t.includes(n))),xo.set({...nl,deleted:!0,count:t.length})};var H8=F("<!> <!>",1);function LA(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(le,"$_",n);let s=P(e,"assets",19,()=>[]),o=P(e,"buttonDescription",3,""),a=P(e,"dialogDescription",3,""),c=P(e,"onDelete",3,void 0),u=ae(!1);var d=H8(),f=M(d);const h=w(()=>!s().length),p=w(()=>i()("delete"));Ze(f,{variant:"ghost",get disabled(){return l(h)},get label(){return l(p)},get"aria-label"(){return o()},onclick:()=>{$(u,!0)}});var g=D(f,2);const m=w(()=>s().length===1?i()("delete_asset"):i()("delete_assets")),v=w(()=>i()("delete"));xc(g,{get title(){return l(m)},get okLabel(){return l(v)},onOk:()=>{q8(s()),c()?.()},get open(){return l(u)},set open(_){$(u,ie(_))},children:(_,b)=>{var y=Ue();q(()=>Z(y,a())),T(_,y)},$$slots:{default:!0}}),T(t,d),oe(),r()}var V8=F("<!> <!>",1);function NA(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(le,"$_",n);let s=P(e,"assets",19,()=>[]),o=ae(!1);const a=async()=>{for(const p of s())VP(await el(p),p.name),await vn(300);$(o,!0)};var c=V8(),u=M(c);const d=w(()=>!s().length),f=w(()=>i()("download"));Ze(u,{variant:"ghost",get disabled(){return l(d)},get label(){return l(f)},onclick:()=>{a()}});var h=D(u,2);Yn(h,{get show(){return l(o)},set show(p){$(o,ie(p))},children:(p,g)=>{Hn(p,{status:"success",children:(m,v)=>{var _=Ue();q(b=>Z(_,b),[()=>s().length===1?i()("asset_downloaded"):i()("assets_downloaded")]),T(m,_)},$$slots:{default:!0}})},$$slots:{default:!0}}),T(t,c),oe(),r()}const _a=st(!1),W8=ur([ws],([t],e)=>{e(!!t.files.length)}),Bf=t=>t==="*"?ne(le)("all_assets"):t?ne(wt)?.collections.find(({name:e})=>e===t)?.label??"":ne(le)("uncategorized"),gy=t=>{const{media_folder:e}=ne(wt);if(!t)return Bf("*");if(t===e)return Bf(void 0);const n=ne(hi).find(({internalPath:r})=>r===t);return n?Bf(n.collectionName):""},G8=(t,{key:e,order:n}={})=>{if(!e||!n)return t;const r=[...t],i={commit_author:String,commit_date:Date}[e]||r[0]?.[e]?.constructor||String,s=o=>{const{commitAuthor:{name:a,login:c,email:u}={},commitDate:d}=o;return e==="commit_author"?a||c||u:e==="commit_date"?d:e==="name"?o.name.split(".")[0]:o[e]??""};return r.sort((o,a)=>{const c=s(o),u=s(a);return i===String?ui(c,u):i===Date?Number(c)-Number(u):c-u}),n==="descending"&&r.reverse(),r},K8=(t,{field:e,pattern:n}={field:"",pattern:""})=>{if(!e)return t;if(e==="fileType")return t.filter(({path:i})=>n==="other"?!Object.values(Cv).some(s=>s.test(i)):Cv[n].test(i));const r=typeof n=="string"?new RegExp(n):void 0;return t.filter(i=>{const s=i[e];return r?r.test(String(s??"")):s===n})},Y8=(t,{field:e,pattern:n}={field:"",pattern:void 0})=>{if(!e)return t.length?{"*":t}:{};const r=typeof n=="string"?new RegExp(n):void 0,i={},s=ne(le)("other");return t.forEach(o=>{const a=o[e];let c;r?[c=s]=String(a??"").match(r)??[]:c=a,c in i||(i[c]=[]),i[c].push(o)}),Object.fromEntries(Object.entries(i).sort(([o],[a])=>ui(o,a)))},J8={type:"grid",showInfo:!0,sort:{key:"name",order:"ascending"}},Gi=st({type:"grid",showInfo:!0}),wl=st(),Z8=ur([en,Nn],([t],e)=>{const n=["name"];t.every(r=>!!r.commitAuthor)&&n.push("commit_author"),t.every(r=>!!r.commitDate)&&n.push("commit_date"),e(n.map(r=>({key:r,label:ne(le)(`sort_keys.${r}`)})))}),rl=ur([en,ni],([t,e],n)=>{n(t&&e?t.filter(({folder:r})=>e.internalPath===r):t?[...t]:[])}),my=ur([rl,Gi],([t,e],n)=>{let r=[...t];r=G8(r,e.sort),r=K8(r,e.filter);const i=Y8(r,e.group);zn(ne(my),i)||n(i)}),X8=async({repository:t})=>{const{databaseName:e}=t??{},n=e?new jo(e,"ui-settings"):null,r="assets-view";wl.set(await n?.get(r)??{}),wl.subscribe(i=>{(async()=>{try{zn(i,await n?.get(r))||await n?.set(r,i)}catch{}})()}),ni.subscribe(i=>{const s=ne(wl)?.[i?.internalPath||"*"]??structuredClone(J8);zn(s,ne(Gi))||Gi.set(s)}),Gi.subscribe(i=>{const s=ne(ni)?.internalPath||"*",o=ne(wl)?.[s]??{};zn(i,o)||wl.update(a=>({...a,[s]:i}))})};In.subscribe(t=>{t&&!ne(wl)&&X8(t)});rl.subscribe(t=>{rd.set([]),ne(Tt).devModeEnabled&&console.info("listedAssets",t)});var Q8=F("<!> <!> <!> <!> <!> <!>",1);function IA(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(le,"$_",n),s=()=>z(Tt,"$prefs",n),o=()=>z(In,"$backend",n);let a=ae(ie({...Uh}));const c=w(()=>l(a).publicURL),u=w(()=>l(a).repoBlobURL),d=async()=>{$(a,ie(e.asset?await ig(e.asset):{...Uh}))};Be(()=>{e.asset,d()});const f=w(()=>i()("show_edit_options"));Nr(t,{variant:"ghost",iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return l(f)},popup:p=>{const g=w(()=>i()("edit_options"));wr(p,{get"aria-label"(){return l(g)},children:(m,v)=>{var _=Q8(),b=M(_);const y=w(()=>i()("edit")),x=w(()=>i()("edit_asset")),k=w(()=>!e.asset||!tq(e.asset));Nt(b,{variant:"ghost",get label(){return l(y)},get"aria-label"(){return l(x)},get disabled(){return l(k)},onclick:()=>{ot(Av,e.asset)}});var S=D(b,2);const C=w(()=>i()("rename")),E=w(()=>i()("rename_asset")),A=w(()=>!e.asset);Nt(S,{variant:"ghost",get label(){return l(C)},get"aria-label"(){return l(E)},get disabled(){return l(A)},onclick:()=>{ot(zf,e.asset)}});var O=D(S,2);const L=w(()=>i()("replace")),I=w(()=>i()("replace_asset")),N=w(()=>!e.asset);Nt(O,{variant:"ghost",get label(){return l(L)},get"aria-label"(){return l(I)},get disabled(){return l(N)},onclick:()=>{ot(ws,{folder:void 0,files:[],originalAsset:e.asset}),ot(_a,!0)}});var j=D(O,2);Ar(j,{});var H=D(j,2);const B=w(()=>i()("view_on_live_site")),V=w(()=>!l(c));Nt(H,{get label(){return l(B)},get disabled(){return l(V)},onclick:()=>{window.open(l(c))}});var G=D(H,2);{var K=ee=>{const J=w(()=>!o()?.repository||!l(u)),Y=w(()=>i()("view_on_x",{values:{service:o()?.repository?.label},default:i()("view_in_repository")}));Nt(ee,{get disabled(){return l(J)},get label(){return l(Y)},onclick:()=>{window.open(`${l(u)}?plain=1`)}})};U(G,ee=>{s().devModeEnabled&&ee(K)})}T(m,_)},$$slots:{default:!0}})},$$slots:{popup:!0}}),oe(),r()}var eH=F('<!> <h2 role="none"><strong role="none"> </strong></h2> <!> <!> <!> <!> <!>',1);function tH(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(Ho,"$overlaidAsset",n),s=()=>z(le,"$_",n),o=()=>z(ni,"$selectedAssetFolder",n),a=w(()=>i()?[i()]:[]),c=w(()=>s()("primary"));po(t,{variant:"primary",get"aria-label"(){return l(c)},children:(u,d)=>{var f=eH(),h=M(f);const p=w(()=>s()("cancel_editing"));Ze(h,{variant:"ghost",iconic:!0,get"aria-label"(){return l(p)},keyShortcuts:"Escape",onclick:()=>{Ul(o()?`/assets/${o().internalPath}`:"/assets")},startIcon:A=>{et(A,{name:"arrow_back_ios_new"})},$$slots:{startIcon:!0}});var g=D(h,2),m=R(g),v=R(m),_=D(g,2);Xr(_,{flex:!0});var b=D(_,2);wA(b,{get assets(){return l(a)}});var y=D(b,2);NA(y,{get assets(){return l(a)}});var x=D(y,2);const k=w(()=>s()("delete_asset")),S=w(()=>s()("confirm_deleting_this_asset"));LA(x,{get assets(){return l(a)},get buttonDescription(){return l(k)},get dialogDescription(){return l(S)},onDelete:()=>{Ul(o()?`/assets/${o().internalPath}`:"/assets")}});var C=D(x,2);IA(C,{get asset(){return i()}}),q(()=>Z(v,i()?.name)),T(u,f)},$$slots:{default:!0}}),oe(),r()}var nH=F('<iframe class="svelte-1lmpz2c"></iframe>'),rH=F('<div role="figure" class="markdown svelte-1lmpz2c"><!></div>'),iH=F('<pre role="figure" class="svelte-1lmpz2c"> </pre>'),sH=F('<pre role="figure" class="svelte-1lmpz2c"> </pre>'),oH=F('<span role="alert"> </span>'),aH=F('<!> <div role="none" class="row svelte-1lmpz2c"><div role="none" class="preview svelte-1lmpz2c"><!></div> <!></div>',1),lH=F('<div role="none" class="wrapper svelte-1lmpz2c"><!></div>');const cH={hash:"svelte-1lmpz2c",code:`.wrapper.svelte-1lmpz2c {display:contents;}.wrapper[hidden].svelte-1lmpz2c {display:none;}.wrapper.svelte-1lmpz2c > .sui.group {position:absolute;inset:0;z-index:100;display:flex;flex-direction:column;background-color:var(--sui-secondary-background-color);transition:filter 250ms;}.wrapper[inert].svelte-1lmpz2c > .sui.group {filter:opacity(0);}.wrapper.svelte-1lmpz2c .row:where(.svelte-1lmpz2c) {flex:auto;display:flex;overflow:hidden;}.wrapper.svelte-1lmpz2c .row:where(.svelte-1lmpz2c) .preview:where(.svelte-1lmpz2c) {flex:auto;overflow:hidden;}.wrapper.svelte-1lmpz2c .row:where(.svelte-1lmpz2c) .preview:where(.svelte-1lmpz2c) iframe:where(.svelte-1lmpz2c),
582
582
  .wrapper.svelte-1lmpz2c .row:where(.svelte-1lmpz2c) .preview:where(.svelte-1lmpz2c) pre:where(.svelte-1lmpz2c),
583
583
  .wrapper.svelte-1lmpz2c .row:where(.svelte-1lmpz2c) .preview:where(.svelte-1lmpz2c) .markdown:where(.svelte-1lmpz2c) {display:block;width:100%;height:100%;}.wrapper.svelte-1lmpz2c .row:where(.svelte-1lmpz2c) .preview:where(.svelte-1lmpz2c) pre:where(.svelte-1lmpz2c),
584
- .wrapper.svelte-1lmpz2c .row:where(.svelte-1lmpz2c) .preview:where(.svelte-1lmpz2c) .markdown:where(.svelte-1lmpz2c) {margin:0;padding:16px;overflow:auto;}.wrapper.svelte-1lmpz2c .row:where(.svelte-1lmpz2c) .preview:where(.svelte-1lmpz2c) pre:where(.svelte-1lmpz2c) {white-space:pre-wrap;}.wrapper.svelte-1lmpz2c .row:where(.svelte-1lmpz2c) .detail {background-color:var(--sui-primary-background-color);}`};function uH(t,e){se(e,!0),Te(t,cH);const[n,r]=ve(),i=()=>z(Ho,"$overlaidAsset",n),s=()=>z(Xo,"$showAssetOverlay",n),o=()=>z(le,"$_",n);let a=ae(void 0),c,u=ae(!1),d=ae(!0),f=ae(void 0);const h=w(()=>i()?.kind),p=w(()=>i()?.blobURL),g=w(()=>i()?.name),m=async()=>{await $l(),c&&(c.tabIndex=0,c.focus())};Be(()=>{i()&&(async()=>$(f,ie(await el(i()))))()}),Be(()=>{l(a)&&!c&&(c=l(a).querySelector('[role="group"]'),c.addEventListener("transitionend",()=>{s()||($(u,!1),$(d,!0))}))}),Be(()=>{l(a)&&(s()?($(u,!1),$(d,!1),m()):$(u,!0))});var v=lH(),_=R(v);const b=w(()=>o()("asset_editor"));_r(_,{get"aria-label"(){return l(b)},children:(y,x)=>{var k=W(),S=M(k);As(S,()=>i()?.sha,C=>{var E=aH(),A=M(E);tH(A,{});var O=D(A,2),L=R(O),I=R(L);{var N=V=>{const G=w(()=>["image","video"].includes(l(h))),K=w(()=>l(h)==="image"),ee=w(()=>l(h)==="image"?l(g):void 0),J=w(()=>["audio","video"].includes(l(h)));Ns(V,{get kind(){return l(h)},get asset(){return i()},get blurBackground(){return l(G)},get checkerboard(){return l(K)},get alt(){return l(ee)},get controls(){return l(J)}})},j=V=>{var G=W(),K=M(G);{var ee=Y=>{var te=nH();q(()=>{ke(te,"src",l(p)),ke(te,"title",l(g))}),T(Y,te)},J=Y=>{var te=W(),ce=M(te);{var he=X=>{var fe=W(),be=M(fe);yr(be,()=>i()?.text??l(f).text(),null,(ue,Ee)=>{var _e=W(),Ae=M(_e);{var Ce=Ve=>{var We=W(),ht=M(We);yr(ht,()=>Ot.parse(l(Ee),{breaks:!0,async:!0}),null,(Ge,pe)=>{var ye=rH(),we=R(ye);br(we,()=>fi.sanitize(l(pe))),T(Ge,ye)},Ge=>{var pe=iH(),ye=R(pe);q(()=>Z(ye,l(Ee))),T(Ge,pe)}),T(Ve,We)},$e=Ve=>{var We=sH(),ht=R(We);q(()=>Z(ht,l(Ee))),T(Ve,We)};U(Ae,Ve=>{l(g)?.endsWith(".md")?Ve(Ce):Ve($e,!1)})}T(ue,_e)}),T(X,fe)},re=X=>{Tr(X,{children:(fe,be)=>{var ue=oH(),Ee=R(ue);q(_e=>Z(Ee,_e),[()=>o()("preview_unavailable")]),T(fe,ue)},$$slots:{default:!0}})};U(ce,X=>{l(f)?.type&&Nu(l(f).type)?X(he):X(re,!1)},!0)}T(Y,te)};U(K,Y=>{l(f)?.type==="application/pdf"?Y(ee):Y(J,!1)},!0)}T(V,G)};U(I,V=>{l(h)&&ng(l(h))?V(N):V(j,!1)})}var H=D(L,2);{var B=V=>{yA(V,{get asset(){return i()}})};U(H,V=>{i()&&V(B)})}T(C,E)}),T(y,k)},$$slots:{default:!0}}),$t(v,y=>$(a,y),()=>l(a)),q(()=>{v.hidden=l(d),v.inert=!s(),pt(v,"hiding",l(u))}),T(t,v),oe(),r()}var dH=F('<div role="none" class="wrapper svelte-1wzrlmj"><!></div>');const fH={hash:"svelte-1wzrlmj",code:".wrapper.svelte-1wzrlmj {display:contents;}.wrapper.svelte-1wzrlmj textarea {min-height:40dvh;max-height:80dvh;font-family:var(--sui-font-family-monospace);font-size:var(--sui-font-size-monospace);text-wrap:nowrap;resize:vertical;}.wrapper.wrap.svelte-1wzrlmj textarea {text-wrap:wrap;}"};function hH(t,e){se(e,!0),Te(t,fH);const[n,r]=ve(),i=()=>z(Av,"$editingAsset",n),s=()=>z(Xo,"$showAssetOverlay",n),o=()=>z(le,"$_",n),a=w(i);let c=ae(!1),u=ae(void 0),d=ae(void 0),f=ae(void 0),h=ae(!1);const p=async()=>{$(u,ie(await el(l(a)))),$(d,ie(await l(u).text())),$(f,ie(l(d))),$(c,!0)},g=()=>{ot(Av,void 0),$(u,void 0),$(d,void 0),$(f,void 0)},m=async()=>{l(a)&&l(u)&&typeof l(f)=="string"&&await $A({folder:l(a).folder,files:[new File([l(f)],l(a).name,{type:l(u).type})],originalAsset:l(a)},{commitType:"uploadMedia"})};Be(()=>{l(a)&&l(u)===void 0&&p()}),Be(()=>{s()||$(c,!1)});const v=w(()=>o()("edit_x",{values:{name:l(a)?.name}})),_=w(()=>o()("save")),b=w(()=>l(f)===l(d));is(t,{size:"x-large",get title(){return l(v)},get okLabel(){return l(_)},get okDisabled(){return l(b)},onOk:()=>{m()},onClose:()=>{g()},get open(){return l(c)},set open(x){$(c,ie(x))},footerExtra:x=>{const k=w(()=>o()("wrap_long_lines"));gd(x,{get label(){return l(k)},get checked(){return l(h)},set checked(S){$(h,ie(S))}})},children:(x,k)=>{var S=dH(),C=R(S);Tp(C,{flex:!0,get value(){return l(f)},set value(E){$(f,ie(E))}}),q(()=>pt(S,"wrap",l(h))),T(x,S)},$$slots:{footerExtra:!0,default:!0}}),oe(),r()}var pH=F('<span role="none"> </span>'),gH=F('<p class="svelte-via8re"> </p> <div role="none" class="svelte-via8re"><!> <!></div> <div class="error svelte-via8re"><!></div>',1);const mH={hash:"svelte-via8re",code:"p.svelte-via8re {margin:0 0 8px;}div.svelte-via8re {display:flex;align-items:center;gap:4px;}.error.svelte-via8re {margin:0;color:var(--sui-error-foreground-color);font-size:var(--sui-font-size-small);}"};function vH(t,e){se(e,!0),Te(t,mH);const[n,r]=ve(),i=()=>z(zf,"$renamingAsset",n),s=()=>z(Xo,"$showAssetOverlay",n),o=()=>z(le,"$_",n),a=Gn("short");let c=ae(!1),u=ae(ie({filename:""})),d=ae(""),f=ae(ie([])),h=ae(ie([]));const p=w(i),g=w(()=>l(u).dirname),m=w(()=>l(u).filename),v=w(()=>l(u).extension),_=w(()=>{if(!l(d).trim())return"empty";if(l(d).includes("/"))return"character";if(l(f).includes(`${l(d)}${l(v)?`.${l(v)}`:""}`))return"duplicate"}),b=w(()=>!!l(_)),y=async()=>{l(p)&&($(u,ie(Ln(l(p).path))),$(d,ie(l(m))),$(f,ie(ny(l(g)).map(C=>C.name).filter(C=>C!==l(p).name))),await(async C=>$(h,ie(C.usedEntries)))(await ig(l(p))),$(c,!0))};Be(()=>{l(p)&&y()}),Be(()=>{s()||($(c,!1),ot(zf,void 0))});const x=w(()=>o()("rename_x",{values:{name:l(p)?.name}})),k=w(()=>o()("rename")),S=w(()=>l(d)===l(m)||l(b));is(t,{get title(){return l(x)},get okLabel(){return l(k)},get okDisabled(){return l(S)},onOk:()=>{l(p)&&B5("rename",[{asset:l(p),path:`${l(g)}/${l(d)}${l(v)?`.${l(v)}`:""}`}])},onClose:()=>{ot(zf,void 0)},get open(){return l(c)},set open(C){$(c,ie(C))},children:(C,E)=>{var A=gH(),O=M(A),L=R(O),I=D(O,2),N=R(I);Pn(N,{flex:!0,get invalid(){return l(b)},"aria-errormessage":`${a??""}-error`,get value(){return l(d)},set value(K){$(d,ie(K))}});var j=D(N,2);{var H=K=>{var ee=pH(),J=R(ee);q(()=>Z(J,`.${l(v)??""}`)),T(K,ee)};U(j,K=>{l(v)&&K(H)})}var B=D(I,2);ke(B,"id",`${a??""}-error`);var V=R(B);{var G=K=>{var ee=Ue();q(J=>Z(ee,J),[()=>o()(`enter_new_name_for_asset_error.${l(_)}`)]),T(K,ee)};U(V,K=>{l(b)&&K(G)})}q(K=>Z(L,K),[()=>o()(l(h).length===0?"enter_new_name_for_asset":l(h).length===1?"enter_new_name_for_asset_with_one_entry":"enter_new_name_for_asset_with_many_entries",{values:{count:l(h).length}})]),T(C,A)},$$slots:{default:!0}}),oe(),r()}var bH=F('<span role="none"> </span>'),_H=F("<!> <!> <!>",1);function yH(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(rl,"$listedAssets",n),s=()=>z(uo,"$focusedAsset",n),o=()=>z(rd,"$selectedAssets",n),a=w(()=>e.asset.name),c=w(()=>e.asset.kind),u=f=>{rd.update(h=>{const p=h.indexOf(e.asset);return f&&p===-1&&h.push(e.asset),!f&&p>-1&&h.splice(p,1),h})},d=w(()=>i().indexOf(e.asset));fd(t,{get"aria-rowindex"(){return l(d)},onChange:f=>{u(f.detail.selected)},onfocus:()=>{ot(uo,e.asset)},ondblclick:()=>{s()&&ZC(s())&&Un(`/assets/${s().path}`)},children:(f,h)=>{var p=_H(),g=M(p);di(g,{class:"checkbox",children:(_,b)=>{const y=w(()=>o().includes(e.asset));dd(_,{role:"none",tabindex:"-1",get checked(){return l(y)},onChange:({detail:{checked:x}})=>{u(x)}})},$$slots:{default:!0}});var m=D(g,2);di(m,{class:"image",children:(_,b)=>{const y=w(()=>e.viewType==="list"?"icon":"tile"),x=w(()=>l(c)==="image");Ns(_,{get kind(){return l(c)},get asset(){return e.asset},get variant(){return l(y)},get checkerboard(){return l(x)}})},$$slots:{default:!0}});var v=D(m,2);di(v,{class:"title",children:(_,b)=>{var y=bH(),x=R(y);q(()=>Z(x,l(a))),T(_,y)},$$slots:{default:!0}}),T(f,p)},$$slots:{default:!0}}),oe(),r()}function vy(t,e){let n=P(e,"loading",3,"lazy"),r=P(e,"asset",3,void 0),i=P(e,"src",3,void 0),s=P(e,"variant",3,void 0),o=P(e,"blurBackground",3,!1),a=P(e,"cover",3,!1),c=P(e,"checkerboard",3,!1),u=P(e,"alt",3,""),d=at(e,["$$slots","$$events","$$legacy","loading","asset","src","variant","blurBackground","cover","checkerboard","alt"]);Ns(t,nn({kind:"image",get loading(){return n()},get asset(){return r()},get src(){return i()},get variant(){return s()},get blurBackground(){return o()},get cover(){return a()},get checkerboard(){return c()},get alt(){return u()}},()=>d))}var wH=F('<span role="none" class="image svelte-1aay9a6"><!></span>'),xH=F('<div role="none" class="file svelte-1aay9a6"><!> <div role="none" class="meta svelte-1aay9a6"><div role="none" class="name"> </div> <div role="none" class="size svelte-1aay9a6"> </div></div> <!></div>'),kH=F('<div role="none" class="files svelte-1aay9a6"></div>');const SH={hash:"svelte-1aay9a6",code:".files.svelte-1aay9a6 {display:flex;flex-direction:column;gap:16px;padding:16px 0 0;}.file.svelte-1aay9a6 {display:flex;align-items:center;gap:16px;}.file.svelte-1aay9a6 .image:where(.svelte-1aay9a6) {display:flex;justify-content:center;align-items:center;width:40px;height:40px;aspect-ratio:1/1;object-fit:cover;border-radius:var(--sui-control-medium-border-radius);background-color:var(--sui-tertiary-background-color);}.file.svelte-1aay9a6 .meta:where(.svelte-1aay9a6) {flex:auto;display:flex;flex-direction:column;gap:4px;text-align:left;}.file.svelte-1aay9a6 .meta:where(.svelte-1aay9a6) .size:where(.svelte-1aay9a6) {font-size:var(--sui-font-size-small);color:var(--sui-secondary-foreground-color);}"};function RA(t,e){se(e,!0),Te(t,SH);const[n,r]=ve(),i=()=>z(Nn,"$appLocale",n),s=()=>z(le,"$_",n);let o=P(e,"files",31,()=>ie([]));var a=kH();ft(a,21,o,cr,(c,u,d)=>{var f=xH();const h=w(()=>{const{name:A,type:O,size:L}=l(u);return{name:A,type:O,size:L}}),p=w(()=>{const{extension:A=""}=Ln(l(h).name);return{extension:A}});var g=R(f);{var m=A=>{const O=w(()=>URL.createObjectURL(l(u)));vy(A,{get src(){return l(O)},variant:"icon",checkerboard:!0})},v=A=>{var O=wH(),L=R(O);et(L,{name:"draft"}),T(A,O)};U(g,A=>{l(h).type.startsWith("image/")?A(m):A(v,!1)})}var _=D(g,2),b=R(_),y=R(b),x=D(b,2),k=R(x),S=D(_,2);const C=w(()=>s()("remove")),E=w(()=>o().length===1);Ze(S,{variant:"ghost",iconic:!0,get"aria-label"(){return l(C)},get hidden(){return l(E)},onclick:A=>{A.stopPropagation(),o().splice(d,1),o([...o()])},children:(A,O)=>{et(A,{name:"close"})},$$slots:{default:!0}}),q((A,O,L)=>{Z(y,A),Z(k,`${O??""}
584
+ .wrapper.svelte-1lmpz2c .row:where(.svelte-1lmpz2c) .preview:where(.svelte-1lmpz2c) .markdown:where(.svelte-1lmpz2c) {margin:0;padding:16px;overflow:auto;}.wrapper.svelte-1lmpz2c .row:where(.svelte-1lmpz2c) .preview:where(.svelte-1lmpz2c) pre:where(.svelte-1lmpz2c) {white-space:pre-wrap;}.wrapper.svelte-1lmpz2c .row:where(.svelte-1lmpz2c) .detail {background-color:var(--sui-primary-background-color);}`};function uH(t,e){se(e,!0),Te(t,cH);const[n,r]=ve(),i=()=>z(Ho,"$overlaidAsset",n),s=()=>z(Xo,"$showAssetOverlay",n),o=()=>z(le,"$_",n);let a=ae(void 0),c,u=ae(!1),d=ae(!0),f=ae(void 0);const h=w(()=>i()?.kind),p=w(()=>i()?.blobURL),g=w(()=>i()?.name),m=async()=>{await $l(),c&&(c.tabIndex=0,c.focus())};Be(()=>{i()&&(async()=>$(f,ie(await el(i()))))()}),Be(()=>{l(a)&&!c&&(c=l(a).querySelector('[role="group"]'),c.addEventListener("transitionend",()=>{s()||($(u,!1),$(d,!0))}))}),Be(()=>{l(a)&&(s()?($(u,!1),$(d,!1),m()):$(u,!0))});var v=lH(),_=R(v);const b=w(()=>o()("asset_editor"));_r(_,{get"aria-label"(){return l(b)},children:(y,x)=>{var k=W(),S=M(k);As(S,()=>i()?.sha,C=>{var E=aH(),A=M(E);tH(A,{});var O=D(A,2),L=R(O),I=R(L);{var N=V=>{const G=w(()=>["image","video"].includes(l(h))),K=w(()=>l(h)==="image"),ee=w(()=>l(h)==="image"?l(g):void 0),J=w(()=>["audio","video"].includes(l(h)));Ns(V,{get kind(){return l(h)},get asset(){return i()},get blurBackground(){return l(G)},get checkerboard(){return l(K)},get alt(){return l(ee)},get controls(){return l(J)}})},j=V=>{var G=W(),K=M(G);{var ee=Y=>{var te=nH();q(()=>{ke(te,"src",l(p)),ke(te,"title",l(g))}),T(Y,te)},J=Y=>{var te=W(),ce=M(te);{var he=X=>{var fe=W(),be=M(fe);yr(be,()=>i()?.text??l(f).text(),null,(ue,Ee)=>{var _e=W(),Ae=M(_e);{var Ce=Ve=>{var We=W(),ht=M(We);yr(ht,()=>Ot.parse(l(Ee),{breaks:!0,async:!0}),null,(Ge,pe)=>{var ye=rH(),we=R(ye);br(we,()=>fi.sanitize(l(pe))),T(Ge,ye)},Ge=>{var pe=iH(),ye=R(pe);q(()=>Z(ye,l(Ee))),T(Ge,pe)}),T(Ve,We)},$e=Ve=>{var We=sH(),ht=R(We);q(()=>Z(ht,l(Ee))),T(Ve,We)};U(Ae,Ve=>{l(g)?.endsWith(".md")?Ve(Ce):Ve($e,!1)})}T(ue,_e)}),T(X,fe)},re=X=>{Tr(X,{children:(fe,be)=>{var ue=oH(),Ee=R(ue);q(_e=>Z(Ee,_e),[()=>o()("preview_unavailable")]),T(fe,ue)},$$slots:{default:!0}})};U(ce,X=>{l(f)?.type&&Nu(l(f).type)?X(he):X(re,!1)},!0)}T(Y,te)};U(K,Y=>{l(f)?.type==="application/pdf"?Y(ee):Y(J,!1)},!0)}T(V,G)};U(I,V=>{l(h)&&ng(l(h))?V(N):V(j,!1)})}var H=D(L,2);{var B=V=>{yA(V,{get asset(){return i()}})};U(H,V=>{i()&&V(B)})}T(C,E)}),T(y,k)},$$slots:{default:!0}}),$t(v,y=>$(a,y),()=>l(a)),q(()=>{v.hidden=l(d),v.inert=!s(),pt(v,"hiding",l(u))}),T(t,v),oe(),r()}var dH=F('<div role="none" class="wrapper svelte-1wzrlmj"><!></div>');const fH={hash:"svelte-1wzrlmj",code:".wrapper.svelte-1wzrlmj {display:contents;}.wrapper.svelte-1wzrlmj textarea {min-height:40dvh;max-height:80dvh;font-family:var(--sui-font-family-monospace);font-size:var(--sui-font-size-monospace);text-wrap:nowrap;resize:vertical;}.wrapper.wrap.svelte-1wzrlmj textarea {text-wrap:wrap;}"};function hH(t,e){se(e,!0),Te(t,fH);const[n,r]=ve(),i=()=>z(Av,"$editingAsset",n),s=()=>z(Xo,"$showAssetOverlay",n),o=()=>z(le,"$_",n),a=w(i);let c=ae(!1),u=ae(void 0),d=ae(void 0),f=ae(void 0),h=ae(!1);const p=async()=>{$(u,ie(await el(l(a)))),$(d,ie(await l(u).text())),$(f,ie(l(d))),$(c,!0)},g=()=>{ot(Av,void 0),$(u,void 0),$(d,void 0),$(f,void 0)},m=async()=>{l(a)&&l(u)&&typeof l(f)=="string"&&await $A({folder:l(a).folder,files:[new File([l(f)],l(a).name,{type:l(u).type})],originalAsset:l(a)},{commitType:"uploadMedia"})};Be(()=>{l(a)&&l(u)===void 0&&p()}),Be(()=>{s()||$(c,!1)});const v=w(()=>o()("edit_x",{values:{name:l(a)?.name}})),_=w(()=>o()("save")),b=w(()=>l(f)===l(d));is(t,{size:"x-large",get title(){return l(v)},get okLabel(){return l(_)},get okDisabled(){return l(b)},onOk:()=>{m()},onClose:()=>{g()},get open(){return l(c)},set open(x){$(c,ie(x))},footerExtra:x=>{const k=w(()=>o()("wrap_long_lines"));gd(x,{get label(){return l(k)},get checked(){return l(h)},set checked(S){$(h,ie(S))}})},children:(x,k)=>{var S=dH(),C=R(S);Tp(C,{flex:!0,get value(){return l(f)},set value(E){$(f,ie(E))}}),q(()=>pt(S,"wrap",l(h))),T(x,S)},$$slots:{footerExtra:!0,default:!0}}),oe(),r()}var pH=F('<span role="none"> </span>'),gH=F('<p class="svelte-via8re"> </p> <div role="none" class="svelte-via8re"><!> <!></div> <div class="error svelte-via8re"><!></div>',1);const mH={hash:"svelte-via8re",code:"p.svelte-via8re {margin:0 0 8px;}div.svelte-via8re {display:flex;align-items:center;gap:4px;}.error.svelte-via8re {margin:0;color:var(--sui-error-foreground-color);font-size:var(--sui-font-size-small);}"};function vH(t,e){se(e,!0),Te(t,mH);const[n,r]=ve(),i=()=>z(zf,"$renamingAsset",n),s=()=>z(Xo,"$showAssetOverlay",n),o=()=>z(le,"$_",n),a=Gn("short");let c=ae(!1),u=ae(ie({filename:""})),d=ae(""),f=ae(ie([])),h=ae(ie([]));const p=w(i),g=w(()=>l(u).dirname),m=w(()=>l(u).filename),v=w(()=>l(u).extension),_=w(()=>{if(!l(d).trim())return"empty";if(l(d).includes("/"))return"character";if(l(f).includes(`${l(d)}${l(v)?`.${l(v)}`:""}`))return"duplicate"}),b=w(()=>!!l(_)),y=async()=>{l(p)&&($(u,ie(Ln(l(p).path))),$(d,ie(l(m))),$(f,ie(ny(l(g)).map(C=>C.name).filter(C=>C!==l(p).name))),await(async C=>$(h,ie(C.usedEntries)))(await ig(l(p))),$(c,!0))};Be(()=>{l(p)&&y()}),Be(()=>{s()||($(c,!1),ot(zf,void 0))});const x=w(()=>o()("rename_x",{values:{name:l(p)?.name}})),k=w(()=>o()("rename")),S=w(()=>l(d)===l(m)||l(b));is(t,{get title(){return l(x)},get okLabel(){return l(k)},get okDisabled(){return l(S)},onOk:()=>{l(p)&&B8("rename",[{asset:l(p),path:`${l(g)}/${l(d)}${l(v)?`.${l(v)}`:""}`}])},onClose:()=>{ot(zf,void 0)},get open(){return l(c)},set open(C){$(c,ie(C))},children:(C,E)=>{var A=gH(),O=M(A),L=R(O),I=D(O,2),N=R(I);Pn(N,{flex:!0,get invalid(){return l(b)},"aria-errormessage":`${a??""}-error`,get value(){return l(d)},set value(K){$(d,ie(K))}});var j=D(N,2);{var H=K=>{var ee=pH(),J=R(ee);q(()=>Z(J,`.${l(v)??""}`)),T(K,ee)};U(j,K=>{l(v)&&K(H)})}var B=D(I,2);ke(B,"id",`${a??""}-error`);var V=R(B);{var G=K=>{var ee=Ue();q(J=>Z(ee,J),[()=>o()(`enter_new_name_for_asset_error.${l(_)}`)]),T(K,ee)};U(V,K=>{l(b)&&K(G)})}q(K=>Z(L,K),[()=>o()(l(h).length===0?"enter_new_name_for_asset":l(h).length===1?"enter_new_name_for_asset_with_one_entry":"enter_new_name_for_asset_with_many_entries",{values:{count:l(h).length}})]),T(C,A)},$$slots:{default:!0}}),oe(),r()}var bH=F('<span role="none"> </span>'),_H=F("<!> <!> <!>",1);function yH(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(rl,"$listedAssets",n),s=()=>z(uo,"$focusedAsset",n),o=()=>z(rd,"$selectedAssets",n),a=w(()=>e.asset.name),c=w(()=>e.asset.kind),u=f=>{rd.update(h=>{const p=h.indexOf(e.asset);return f&&p===-1&&h.push(e.asset),!f&&p>-1&&h.splice(p,1),h})},d=w(()=>i().indexOf(e.asset));fd(t,{get"aria-rowindex"(){return l(d)},onChange:f=>{u(f.detail.selected)},onfocus:()=>{ot(uo,e.asset)},ondblclick:()=>{s()&&ZC(s())&&Un(`/assets/${s().path}`)},children:(f,h)=>{var p=_H(),g=M(p);di(g,{class:"checkbox",children:(_,b)=>{const y=w(()=>o().includes(e.asset));dd(_,{role:"none",tabindex:"-1",get checked(){return l(y)},onChange:({detail:{checked:x}})=>{u(x)}})},$$slots:{default:!0}});var m=D(g,2);di(m,{class:"image",children:(_,b)=>{const y=w(()=>e.viewType==="list"?"icon":"tile"),x=w(()=>l(c)==="image");Ns(_,{get kind(){return l(c)},get asset(){return e.asset},get variant(){return l(y)},get checkerboard(){return l(x)}})},$$slots:{default:!0}});var v=D(m,2);di(v,{class:"title",children:(_,b)=>{var y=bH(),x=R(y);q(()=>Z(x,l(a))),T(_,y)},$$slots:{default:!0}}),T(f,p)},$$slots:{default:!0}}),oe(),r()}function vy(t,e){let n=P(e,"loading",3,"lazy"),r=P(e,"asset",3,void 0),i=P(e,"src",3,void 0),s=P(e,"variant",3,void 0),o=P(e,"blurBackground",3,!1),a=P(e,"cover",3,!1),c=P(e,"checkerboard",3,!1),u=P(e,"alt",3,""),d=at(e,["$$slots","$$events","$$legacy","loading","asset","src","variant","blurBackground","cover","checkerboard","alt"]);Ns(t,nn({kind:"image",get loading(){return n()},get asset(){return r()},get src(){return i()},get variant(){return s()},get blurBackground(){return o()},get cover(){return a()},get checkerboard(){return c()},get alt(){return u()}},()=>d))}var wH=F('<span role="none" class="image svelte-1aay9a6"><!></span>'),xH=F('<div role="none" class="file svelte-1aay9a6"><!> <div role="none" class="meta svelte-1aay9a6"><div role="none" class="name"> </div> <div role="none" class="size svelte-1aay9a6"> </div></div> <!></div>'),kH=F('<div role="none" class="files svelte-1aay9a6"></div>');const SH={hash:"svelte-1aay9a6",code:".files.svelte-1aay9a6 {display:flex;flex-direction:column;gap:16px;padding:16px 0 0;}.file.svelte-1aay9a6 {display:flex;align-items:center;gap:16px;}.file.svelte-1aay9a6 .image:where(.svelte-1aay9a6) {display:flex;justify-content:center;align-items:center;width:40px;height:40px;aspect-ratio:1/1;object-fit:cover;border-radius:var(--sui-control-medium-border-radius);background-color:var(--sui-tertiary-background-color);}.file.svelte-1aay9a6 .meta:where(.svelte-1aay9a6) {flex:auto;display:flex;flex-direction:column;gap:4px;text-align:left;}.file.svelte-1aay9a6 .meta:where(.svelte-1aay9a6) .size:where(.svelte-1aay9a6) {font-size:var(--sui-font-size-small);color:var(--sui-secondary-foreground-color);}"};function RA(t,e){se(e,!0),Te(t,SH);const[n,r]=ve(),i=()=>z(Nn,"$appLocale",n),s=()=>z(le,"$_",n);let o=P(e,"files",31,()=>ie([]));var a=kH();ft(a,21,o,cr,(c,u,d)=>{var f=xH();const h=w(()=>{const{name:A,type:O,size:L}=l(u);return{name:A,type:O,size:L}}),p=w(()=>{const{extension:A=""}=Ln(l(h).name);return{extension:A}});var g=R(f);{var m=A=>{const O=w(()=>URL.createObjectURL(l(u)));vy(A,{get src(){return l(O)},variant:"icon",checkerboard:!0})},v=A=>{var O=wH(),L=R(O);et(L,{name:"draft"}),T(A,O)};U(g,A=>{l(h).type.startsWith("image/")?A(m):A(v,!1)})}var _=D(g,2),b=R(_),y=R(b),x=D(b,2),k=R(x),S=D(_,2);const C=w(()=>s()("remove")),E=w(()=>o().length===1);Ze(S,{variant:"ghost",iconic:!0,get"aria-label"(){return l(C)},get hidden(){return l(E)},onclick:A=>{A.stopPropagation(),o().splice(d,1),o([...o()])},children:(A,O)=>{et(A,{name:"close"})},$$slots:{default:!0}}),q((A,O,L)=>{Z(y,A),Z(k,`${O??""}
585
585
  ·
586
- ${L??""}`)},[()=>l(h).name.normalize(),()=>i()?K_(l(h).size):"",()=>s()(`file_type_labels.${l(p).extension}`,{default:l(p).extension.toUpperCase()})]),T(c,f)}),T(t,a),oe(),r()}var EH=({target:t},e)=>{const n=[...t.files];e()?.({files:n,file:n[0]})},TH=F('<input type="file" hidden>');function DA(t,e){se(e,!0);let n=P(e,"accept",3,void 0),r=P(e,"multiple",3,!1),i=P(e,"onSelect",3,void 0),s=ae(void 0);const o=()=>{l(s)?.click()};var a=TH();return a.__change=[EH,i],$t(a,c=>$(s,c),()=>l(s)),q(()=>{ke(a,"accept",n()),a.multiple=r()}),wi("cancel",a,c=>{c.stopPropagation()}),T(t,a),oe({open:o})}Va(["change"]);var CH=F('<div role="alert"> </div>'),AH=F('<div role="none"> </div> <div role="none"><!></div> <!>',1),PH=F('<div role="none" class="content svelte-osk4b"><!> <!></div>'),OH=F('<div role="none" class="drop-indicator svelte-osk4b"><div role="none" class="svelte-osk4b"><!> <span role="none"> </span></div></div>'),$H=F('<div role="none" class="drop-target svelte-osk4b"><!> <!></div> <!>',1);const LH={hash:"svelte-osk4b",code:".drop-target.svelte-osk4b {display:flex;flex-direction:column;position:relative;overflow:hidden;height:100%;pointer-events:auto;}.drop-target.svelte-osk4b > .group {overflow-y:auto;padding:16px;width:100%;height:100%;}.drop-target.svelte-osk4b > :where(.svelte-osk4b) {pointer-events:none;}.drop-target.svelte-osk4b button {pointer-events:auto;}.drop-indicator.svelte-osk4b {position:absolute;inset:0;z-index:10;border-radius:var(--sui-control-large-border-radius);background-color:hsl(var(--sui-background-color-4-hsl)/80%);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);text-align:center;pointer-events:none;}.drop-indicator.svelte-osk4b div:where(.svelte-osk4b) {position:absolute;inset:0;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:4px;border:4px dashed var(--sui-primary-accent-color);border-radius:var(--sui-control-large-border-radius);font-size:var(--sui-font-size-x-large);}.drop-indicator.svelte-osk4b div:where(.svelte-osk4b) .icon {color:var(--sui-secondary-foreground-color);font-size:48px;}.content.svelte-osk4b {display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;overflow:auto;height:100%;min-height:320px;text-align:center;}"};function Ud(t,e){se(e,!0),Te(t,LH);const[n,r]=ve(),i=()=>z(le,"$_",n);let s=P(e,"accept",3,void 0),o=P(e,"disabled",3,!1),a=P(e,"multiple",3,!1),c=P(e,"showUploadButton",3,!1),u=P(e,"showFilePreview",3,!1),d=P(e,"onSelect",3,void 0),f=P(e,"children",3,void 0),h=ae(!1),p=ae(!1),g=ae(void 0),m=ae(ie([]));const v=()=>{l(g)?.open()},_=()=>{$(m,ie([])),d()?.({files:l(m)})},b=I=>{$(m,ie(a()?I:I.slice(0,1))),d()?.({files:l(m)})};var y=$H(),x=M(y),k=R(x);{var S=I=>{var N=PH(),j=R(N);{var H=G=>{var K=AH(),ee=M(K),J=R(ee),Y=D(ee,2),te=R(Y);const ce=w(()=>i()(a()?"choose_files":"choose_file"));Ze(te,{variant:"primary",get label(){return l(ce)},get disabled(){return o()},onclick:()=>{v()},startIcon:fe=>{et(fe,{name:"cloud_upload"})},$$slots:{startIcon:!0}});var he=D(Y,2);{var re=X=>{var fe=CH(),be=R(fe);q(ue=>Z(be,ue),[()=>i()("drop_files_type_mismatch",{values:{type:s()}})]),T(X,fe)};U(he,X=>{l(p)&&X(re)})}q(X=>Z(J,X),[()=>i()(a()?"drop_or_browse_files":"drop_or_browse_file")]),T(G,K)};U(j,G=>{c()&&G(H)})}var B=D(j,2);{var V=G=>{RA(G,{get files(){return l(m)},set files(K){$(m,ie(K))}})};U(B,G=>{u()&&l(m).length&&G(V)})}T(I,N)},C=I=>{var N=W(),j=M(N);Re(j,()=>f()??Fe),T(I,N)};U(k,I=>{c()||u()&&l(m).length?I(S):I(C,!1)})}var E=D(k,2);{var A=I=>{var N=OH(),j=R(N),H=R(j);et(H,{name:"download"});var B=D(H,2),V=R(B);q(G=>Z(V,G),[()=>i()(a()?"drop_files_here":"drop_file_here")]),T(I,N)};U(E,I=>{l(h)&&I(A)})}var O=D(x,2);$t(DA(O,{get accept(){return s()},get multiple(){return a()},onSelect:({files:I})=>{b(I)}}),I=>$(g,ie(I)),()=>l(g)),wi("dragover",x,I=>{I.preventDefault(),!(o()||!I.dataTransfer)&&(I.dataTransfer.dropEffect="copy",$(h,!0),$(p,!1))}),wi("dragleave",x,I=>{I.preventDefault(),!o()&&$(h,!1)}),wi("dragend",x,I=>{I.preventDefault(),!o()&&$(h,!1)}),wi("drop",x,async I=>{if(I.preventDefault(),o()||!I.dataTransfer)return;$(h,!1);const N=await BP(I.dataTransfer,{accept:s()});N.length?b(N):$(p,!0)}),T(t,y);var L=oe({openFilePicker:v,reset:_});return r(),L}var NH=F('<div role="none" class="spinner svelte-v6s0f"></div>'),IH=F("<!> <!>",1);const RH={hash:"svelte-v6s0f",code:".spinner.svelte-v6s0f {height:1px;}"};function Ua(t,e){se(e,!0),Te(t,RH);let n=P(e,"itemChunkSize",3,25),r=ae(ie(n())),i=ae(void 0);const s=w(()=>e.items.length>l(r)),o=new IntersectionObserver(([{isIntersecting:f}])=>{f&&(l(s)?$(r,l(r)+n()):o.disconnect())});Be(()=>{l(i)&&o.observe(l(i))});var a=IH(),c=M(a);ft(c,17,()=>e.items.slice(0,l(r)),f=>f[e.itemKey],(f,h)=>{var p=W(),g=M(p);Re(g,()=>e.renderItem,()=>l(h)),T(f,p)});var u=D(c,2);{var d=f=>{var h=NH();$t(h,p=>$(i,p),()=>l(i)),T(f,h)};U(u,f=>{l(s)&&f(d)})}T(t,a),oe()}var DH=F('<div role="none" class="list-container svelte-1smo9s9"><!></div>');const MH={hash:"svelte-1smo9s9",code:".list-container.svelte-1smo9s9 {flex:auto;position:relative;height:100%;overflow:hidden;}.list-container.svelte-1smo9s9 > .group {height:100%;overflow-y:auto;overscroll-behavior-y:contain;}.list-container.svelte-1smo9s9 > .group :is(.grid-view, .list-view) {display:block;padding:0 16px 16px;height:100%;overflow-y:auto;}"};function by(t,e){Te(t,MH);let n=P(e,"children",3,void 0),r=at(e,["$$slots","$$events","$$legacy","children"]);var i=DH(),s=R(i);_r(s,nn(()=>r,{children:(o,a)=>{var c=W(),u=M(c);Re(u,()=>n()??Fe),T(o,c)},$$slots:{default:!0}})),T(t,i)}var FH=F('<div role="none"><!></div>');const zH={hash:"svelte-180m7hm",code:'.grid-view.svelte-180m7hm .row-group-caption {display:block;margin:8px;grid-column:1/-1;}.grid-view.svelte-180m7hm .row-group-caption th {display:block;}.grid-view.svelte-180m7hm .grid-body {display:grid;grid-template-columns:repeat(auto-fill, minmax(var(--grid-size, 200px), 1fr));gap:16px;border-width:0;}.grid-view.svelte-180m7hm [role="row"] {display:block;position:relative;overflow:hidden;height:auto;text-align:left;}.grid-view.svelte-180m7hm [role="row"] .grid-cell {display:block;}.grid-view.svelte-180m7hm [role="row"] .grid-cell.image:empty {aspect-ratio:1/1;}.grid-view.svelte-180m7hm [role="row"] .checkbox {position:absolute;inset:4px auto auto 4px;z-index:2;}.grid-view.svelte-180m7hm [role="row"] .title span {display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden;margin:12px;height:40px;line-height:1.5;word-break:break-all;}.grid-view.svelte-180m7hm [role="row"][tabindex] {border-radius:var(--sui-control-large-border-radius);background-color:var(--sui-secondary-background-color);cursor:pointer;transition:background-color 200ms;}.grid-view.svelte-180m7hm [role="row"][tabindex]:hover, .grid-view.svelte-180m7hm [role="row"][tabindex]:focus, .grid-view.svelte-180m7hm [role="row"][tabindex]:active {background-color:var(--sui-hover-background-color);}.list-view.svelte-180m7hm {--icon-size: 36px;}.list-view.svelte-180m7hm [role="grid"] .row-group .row-group-caption + .grid-row .grid-cell {border-top-width:0 !important;}.list-view.svelte-180m7hm [role="grid"] .row-group .row-group-caption ~ .grid-row:last-child .grid-cell {border-bottom-width:0 !important;}.list-view.svelte-180m7hm [role="grid"] [role="row"] {transition-property:background-color, outline-color;transition-duration:200ms;}.list-view.svelte-180m7hm [role="grid"] [role="row"][tabindex] {cursor:pointer;}.list-view.svelte-180m7hm [role="grid"] [role="row"]:hover {background-color:var(--sui-hover-background-color);}.list-view.svelte-180m7hm [role="grid"] [role="rowheader"] {border-width:0;}.list-view.svelte-180m7hm [role="grid"] [role="gridcell"] {overflow:hidden;padding:0 16px 0 0;height:40px;max-width:100%;color:var(--sui-secondary-foreground-color);white-space:nowrap;text-overflow:ellipsis;vertical-align:middle;}.list-view.svelte-180m7hm [role="grid"] [role="gridcell"]:first-child {padding-left:16px;}.list-view.svelte-180m7hm [role="grid"] [role="gridcell"] .label {overflow:hidden;text-overflow:ellipsis;}.list-view.svelte-180m7hm [role="grid"] .grid-cell.image:empty::before {display:block;border-radius:var(--sui-control-medium-border-radius);width:var(--icon-size);height:var(--icon-size);background-color:var(--sui-secondary-background-color);content:"";}.list-view.svelte-180m7hm [role="grid"] [role="row"] [role="gridcell"] {border-width:1px 0 0;border-color:var(--sui-secondary-border-color);}.list-view.svelte-180m7hm [role="grid"] [role="row"]:last-child [role="gridcell"] {border-width:1px 0;}.list-view.svelte-180m7hm [role="grid"] [role="gridcell"].checkbox {padding-left:8px;width:44px;}.list-view.svelte-180m7hm [role="grid"] [role="gridcell"].title {width:100%; /* flex: auto */color:var(--sui-primary-foreground-color);}.list-view.svelte-180m7hm [role="grid"] [role="gridcell"].image {width:48px;}'};function od(t,e){se(e,!0),Te(t,zH);let n=P(e,"children",3,void 0),r=at(e,["$$slots","$$events","$$legacy","viewType","children"]);var i=FH(),s=R(i);yr(s,()=>vn(0),null,o=>{qL(o,nn({multiple:!0,clickToSelect:!1},()=>r,{children:(a,c)=>{var u=W(),d=M(u);Re(d,()=>n()??Fe),T(a,u)},$$slots:{default:!0}}))}),q(()=>Vr(i,`${e.viewType??""}-view svelte-180m7hm`)),T(t,i),oe()}var jH=F('<span role="none"> </span>');function UH(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(Gi,"$currentView",n),s=()=>z(ni,"$selectedAssetFolder",n),o=()=>z(le,"$_",n),a=()=>z(Z_,"$globalAssetFolder",n),c=()=>z(my,"$assetGroups",n),u=()=>z(rl,"$listedAssets",n),d=w(()=>i().type),f=w(()=>!!s()?.entryRelative),h=w(()=>o()("asset_list"));by(t,{get"aria-label"(){return l(h)},children:(p,g)=>{Ud(p,{get disabled(){return l(f)},multiple:!0,onSelect:({files:m})=>{ot(ws,{folder:s()?.internalPath||a()?.internalPath,files:m})},children:(m,v)=>{var _=W(),b=M(_);{var y=k=>{const S=w(()=>o()("assets"));od(k,{id:"asset-list",get viewType(){return l(d)},get"aria-label"(){return l(S)},get"aria-rowcount"(){return u().length},children:(C,E)=>{var A=W(),O=M(A);ft(O,1,()=>Object.entries(c()),([L,I])=>L,(L,I)=>{let N=()=>l(I)[0],j=()=>l(I)[1];const H=w(()=>N()!=="*"?N():void 0);Vk(L,{get label(){return l(H)},children:(B,V)=>{Ua(B,{get items(){return j()},itemKey:"path",renderItem:(K,ee=Fe)=>{var J=W(),Y=M(J);As(Y,()=>ee().sha,te=>{yH(te,{get asset(){return ee()},get viewType(){return l(d)}})}),T(K,J)},$$slots:{renderItem:!0}})},$$slots:{default:!0}})}),T(C,A)},$$slots:{default:!0}})},x=k=>{Tr(k,{children:(S,C)=>{var E=jH(),A=R(E);q(O=>Z(A,O),[()=>o()("no_files_found")]),T(S,E)},$$slots:{default:!0}})};U(b,k=>{Object.values(c()).flat(1).length?k(y):k(x,!1)})}T(m,_)},$$slots:{default:!0}})},$$slots:{default:!0}}),oe(),r()}var BH=F('<span class="count"> </span>'),qH=F('<div role="none" class="primary-sidebar"><!></div>');function HH(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(Nn,"$appLocale",n),s=()=>z(hi,"$allAssetFolders",n),o=()=>z(le,"$_",n),a=()=>z(ni,"$selectedAssetFolder",n),c=()=>z(en,"$allAssets",n),u=w(()=>Intl.NumberFormat(i()??void 0)),d=w(()=>[{collectionName:"*",internalPath:void 0,publicPath:void 0,entryRelative:!1},...s()]);var f=qH(),h=R(f);const p=w(()=>o()("asset_folders"));hd(h,{get"aria-label"(){return l(p)},"aria-controls":"assets-container",children:(g,m)=>{var v=W(),_=M(v);ft(_,17,()=>l(d),({collectionName:b,internalPath:y,entryRelative:x})=>b,(b,y)=>{let x=()=>l(y).collectionName,k=()=>l(y).internalPath,S=()=>l(y).entryRelative;const C=w(()=>x()?Fi(x()):void 0),E=w(S),A=w(()=>k()===void 0&&!a()||k()===a()?.internalPath),O=w(()=>i()?Bf(x()):"");mr(b,{get selected(){return l(A)},get label(){return l(O)},onSelect:()=>{Un(k()?`/assets/${k()}`:"/assets")},ondragover:N=>{N.preventDefault(),!l(E)&&(k()===void 0||l(A)?N.dataTransfer.dropEffect="none":(N.dataTransfer.dropEffect="move",N.target.classList.add("dragover")))},ondragleave:N=>{N.preventDefault(),!l(E)&&N.target.classList.remove("dragover")},ondragend:N=>{N.preventDefault(),!l(E)&&N.target.classList.remove("dragover")},ondrop:N=>{N.preventDefault(),!l(E)&&N.target.classList.remove("dragover")},startIcon:N=>{const j=w(()=>l(C)?.icon||"folder");et(N,{get name(){return l(j)}})},endIcon:N=>{var j=W(),H=M(j);As(H,c,B=>{var V=W(),G=M(V);yr(G,()=>vn(0),null,K=>{var ee=BH();const J=w(()=>(k()?n8(k()):c()).length);var Y=R(ee);q((te,ce)=>{ke(ee,"aria-label",`(${te??""})`),Z(Y,ce)},[()=>o()(l(J)>1?"many_assets":l(J)===1?"one_asset":"no_assets",{values:{count:l(J)}}),()=>l(u).format(l(J))]),T(K,ee)}),T(B,V)}),T(N,j)},$$slots:{startIcon:!0,endIcon:!0}})}),T(g,v)},$$slots:{default:!0}}),T(t,f),oe(),r()}function VH(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(le,"$_",n),s=w(()=>!e.asset||!ZC(e.asset)),o=w(()=>i()("preview")),a=w(()=>i()("show_preview"));Ze(t,{variant:"ghost",get disabled(){return l(s)},get label(){return l(o)},get"aria-label"(){return l(a)},onclick:()=>{Un(`/assets/${e.asset?.path}`)}}),oe(),r()}function WH(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(ni,"$selectedAssetFolder",n),s=()=>z(le,"$_",n),o=w(()=>!!i()?.entryRelative),a=w(()=>s()("upload")),c=w(()=>s()("upload_assets"));Ze(t,{variant:"primary",get label(){return l(a)},get disabled(){return l(o)},get"aria-label"(){return l(c)},onclick:()=>{ot(_a,!0)},startIcon:d=>{et(d,{name:"cloud_upload"})},$$slots:{startIcon:!0}}),oe(),r()}var GH=F('<span role="none"> </span>'),KH=F('<h2 role="none"> <!></h2> <!> <!> <!> <!> <!> <!> <!>',1);function YH(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(rd,"$selectedAssets",n),s=()=>z(uo,"$focusedAsset",n),o=()=>z(le,"$_",n),a=()=>z(Nn,"$appLocale",n),c=()=>z(ni,"$selectedAssetFolder",n),u=()=>z(rl,"$listedAssets",n),d=w(()=>i().length?i():s()?[s()]:[]),f=w(()=>o()("folder"));po(t,{variant:"primary",get"aria-label"(){return l(f)},children:(h,p)=>{var g=KH(),m=M(g),v=R(m),_=D(v);{var b=N=>{var j=GH(),H=R(j);q(()=>Z(H,`/${c().internalPath??""}`)),T(N,j)};U(_,N=>{c()&&N(b)})}var y=D(m,2);Xr(y,{flex:!0});var x=D(y,2);VH(x,{get asset(){return s()}});var k=D(x,2);const S=w(()=>s()?[s()]:[]);wA(k,{get assets(){return l(S)}});var C=D(k,2);NA(C,{get assets(){return l(d)}});var E=D(C,2);const A=w(()=>o()(l(d).length===1?"delete_selected_asset":"delete_selected_assets")),O=w(()=>o()(l(d).length===1?"confirm_deleting_selected_asset":l(d).length===u().length?"confirm_deleting_all_assets":"confirm_deleting_selected_assets",{values:{count:l(d).length}}));LA(E,{get assets(){return l(d)},get buttonDescription(){return l(A)},get dialogDescription(){return l(O)}});var L=D(E,2);IA(L,{get asset(){return s()}});var I=D(L,2);WH(I,{}),q(N=>Z(v,`${N??""} `),[()=>a()?gy(c()?.internalPath):""]),T(h,g)},$$slots:{default:!0}}),oe(),r()}var JH=F('<span role="none"> </span>');function ZH(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(Gi,"$currentView",n),s=()=>z(le,"$_",n),o=()=>z(uo,"$focusedAsset",n),a=w(()=>!i().showInfo),c=w(()=>s()("asset_info"));_r(t,{id:"asset-info",class:"secondary-sidebar",get hidden(){return l(a)},get"aria-label"(){return l(c)},children:(u,d)=>{var f=W(),h=M(f);{var p=m=>{yA(m,{get asset(){return o()},showPreview:!0})},g=m=>{Tr(m,{children:(v,_)=>{var b=JH(),y=R(b);q(x=>Z(y,x),[()=>s()("select_asset_show_info")]),T(v,b)},$$slots:{default:!0}})};U(h,m=>{o()?m(p):m(g,!1)})}T(u,f)},$$slots:{default:!0}}),oe(),r()}var XH=F("<!> <!>",1);function MA(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(le,"$_",n),s=()=>z(e.currentView,"$currentView",n);let o=P(e,"label",3,""),a=P(e,"disabled",3,!1),c=P(e,"multiple",3,!1),u=P(e,"noneLabel",3,""),d=P(e,"filters",19,()=>[]);const f=w(()=>o()||i()("filter"));Nr(t,{variant:"ghost",get label(){return l(f)},get disabled(){return a()},popupPosition:"bottom-right",popup:p=>{const g=w(()=>i()("filtering_options"));wr(p,{get"aria-label"(){return l(g)},get"aria-controls"(){return e["aria-controls"]},children:(m,v)=>{var _=W(),b=M(_);{var y=k=>{var S=W(),C=M(S);ft(C,17,d,cr,(E,A)=>{let O=()=>l(A).label,L=()=>l(A).field,I=()=>l(A).pattern;const N=w(()=>(s().filters||[]).findIndex(H=>H.field===L()&&H.pattern===I())),j=w(()=>l(N)>-1);eh(E,{get label(){return O()},get checked(){return l(j)},onChange:()=>{e.currentView.update(H=>{const B=H.filters?[...H.filters]:[];return l(N)>-1?B.splice(l(N),1):B.push({field:L(),pattern:I()}),{...H,filters:B}})}})}),T(k,S)},x=k=>{var S=XH(),C=M(S);const E=w(()=>u()||i()("sort_keys.none")),A=w(()=>!s().filter);Mu(C,{get label(){return l(E)},get checked(){return l(A)},onSelect:()=>{e.currentView.update(L=>({...L,filter:void 0}))}});var O=D(C,2);ft(O,17,d,cr,(L,I)=>{let N=()=>l(I).label,j=()=>l(I).field,H=()=>l(I).pattern;const B=w(()=>s().filter?.field===j()&&s().filter.pattern===H());Mu(L,{get label(){return N()},get checked(){return l(B)},onSelect:()=>{e.currentView.update(V=>({...V,filter:{field:j(),pattern:H()}}))}})}),T(k,S)};U(b,k=>{c()?k(y):k(x,!1)})}T(m,_)},$$slots:{default:!0}})},$$slots:{popup:!0}}),oe(),r()}var QH=F('<span role="none" class="svelte-1154dkn"> </span>'),e6=F('<div role="none" class="wrapper svelte-1154dkn"><!> <!></div>');const t6={hash:"svelte-1154dkn",code:".wrapper.svelte-1154dkn {display:flex;align-items:center;gap:4px;margin-inline:20px;}span.svelte-1154dkn {color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-small);}"};function FA(t,e){se(e,!0),Te(t,t6);const[n,r]=ve(),i=()=>z(e.selectedItems,"$selectedItems",n),s=()=>z(le,"$_",n),o=w(()=>e.allItems.length),a=w(()=>i().length),c=w(()=>!!l(a)),u=w(()=>l(c)&&l(a)===l(o));var d=e6(),f=R(d);const h=w(()=>!l(o)),p=w(()=>s()("select_all")),g=w(()=>l(c)&&!l(u)?"mixed":l(c));dd(f,{get disabled(){return l(h)},get"aria-label"(){return l(p)},get checked(){return l(g)},onChange:()=>{e.selectedItems.set(l(u)?[]:[...e.allItems])}});var m=D(f,2);{var v=_=>{var b=QH(),y=R(b);q(x=>Z(y,x),[()=>s()("x_of_x_selected",{values:{total:l(o),selected:l(a)}})]),T(_,b)};U(m,_=>{l(c)&&_(v)})}T(t,d),oe(),r()}function zA(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(le,"$_",n),s=()=>z(e.currentView,"$currentView",n);let o=P(e,"label",3,""),a=P(e,"disabled",3,!1),c=P(e,"fields",19,()=>[]),u=P(e,"collectionName",3,void 0);const d=["ascending","descending"],f=["date","commit_date"],h=w(()=>o()||i()("sort"));Nr(t,{variant:"ghost",get label(){return l(h)},get disabled(){return a()},popupPosition:"bottom-right",popup:g=>{const m=w(()=>i()("sorting_options"));wr(g,{get"aria-label"(){return l(m)},get"aria-controls"(){return e["aria-controls"]},children:(v,_)=>{var b=W(),y=M(b);ft(y,17,c,({key:x,label:k})=>x,(x,k)=>{let S=()=>l(k).key,C=()=>l(k).label;var E=W(),A=M(E);ft(A,16,()=>d,O=>O,(O,L)=>{const I=w(()=>i()(f.includes(S())||u()&&_n({collectionName:u(),keyPath:S()})?.widget==="datetime"?`${L}_date`:L,{values:{label:C()}})),N=w(()=>s().sort?.key===S()&&s().sort.order===L);Mu(O,{get label(){return l(I)},get checked(){return l(N)},onSelect:()=>{e.currentView.update(j=>({...j,sort:{key:S(),order:L}}))}})}),T(x,E)}),T(v,b)},$$slots:{default:!0}})},$$slots:{popup:!0}}),oe(),r()}var n6=F("<!> <!>",1),r6=F('<div role="none" class="wrapper svelte-1adg8sx"><!></div>');const i6={hash:"svelte-1adg8sx",code:".wrapper.svelte-1adg8sx {display:contents;}.wrapper.svelte-1adg8sx button {border-radius:var(--sui-button-medium-border-radius) !important;}"};function _y(t,e){se(e,!0),Te(t,i6);const[n,r]=ve(),i=()=>z(le,"$_",n),s=()=>z(e.currentView,"$currentView",n);let o=P(e,"disabled",3,!1),a=at(e,["$$slots","$$events","$$legacy","disabled","currentView"]);var c=r6(),u=R(c);const d=w(()=>i()("switch_view"));cp(u,nn({get disabled(){return o()},get"aria-label"(){return l(d)}},()=>a,{children:(f,h)=>{var p=n6(),g=M(p);const m=w(()=>s().type!=="grid"),v=w(()=>i()("list_view"));Du(g,{get disabled(){return o()},get selected(){return l(m)},variant:"ghost",iconic:!0,get"aria-label"(){return l(v)},onSelect:()=>{e.currentView.update(k=>({...k,type:"list"}))},startIcon:k=>{et(k,{name:"format_list_bulleted"})},$$slots:{startIcon:!0}});var _=D(g,2);const b=w(()=>s().type==="grid"),y=w(()=>i()("grid_view"));Du(_,{get disabled(){return o()},get selected(){return l(b)},variant:"ghost",iconic:!0,get"aria-label"(){return l(y)},onSelect:()=>{e.currentView.update(k=>({...k,type:"grid"}))},startIcon:k=>{et(k,{name:"grid_view"})},$$slots:{startIcon:!0}}),T(f,p)},$$slots:{default:!0}})),T(t,c),oe(),r()}var s6=F("<!> <!> <!> <!> <!> <!> <!>",1);function o6(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(rl,"$listedAssets",n),s=()=>z(le,"$_",n),o=()=>z(my,"$assetGroups",n),a=()=>z(Z5,"$sortFields",n),c=()=>z(Gi,"$currentView",n),u=w(()=>!!i().length),d=w(()=>i().length>1),f=w(()=>s()("asset_list"));po(t,{variant:"secondary",get"aria-label"(){return l(f)},children:(h,p)=>{var g=s6(),m=M(g);const v=w(()=>Object.values(o()).flat(1));FA(m,{get allItems(){return l(v)},selectedItems:rd});var _=D(m,2);Xr(_,{flex:!0});var b=D(_,2);const y=w(()=>!l(d));zA(b,{get disabled(){return l(y)},currentView:Gi,get fields(){return a()},"aria-controls":"asset-list"});var x=D(b,2);const k=w(()=>s()("type")),S=w(()=>!l(d)),C=w(()=>s()("all")),E=w(()=>e8.map(V=>({label:s()(V),field:"fileType",pattern:V})));MA(x,{get label(){return l(k)},get disabled(){return l(S)},currentView:Gi,get noneLabel(){return l(C)},get filters(){return l(E)},"aria-controls":"asset-list"});var A=D(x,2);const O=w(()=>!l(u));_y(A,{get disabled(){return l(O)},currentView:Gi,"aria-controls":"asset-list"});var L=D(A,2);Ar(L,{orientation:"vertical"});var I=D(L,2);const N=w(()=>!l(u)),j=w(()=>!!c().showInfo),H=w(()=>!!c().showInfo),B=w(()=>s()(c().showInfo?"hide_info":"show_info"));Ze(I,{variant:"ghost",iconic:!0,get disabled(){return l(N)},get pressed(){return l(j)},"aria-controls":"asset-info",get"aria-expanded"(){return l(H)},get"aria-label"(){return l(B)},onclick:()=>{Gi.update(G=>({...G,showInfo:!c().showInfo}))},startIcon:G=>{et(G,{name:"info"})},$$slots:{startIcon:!0}}),T(h,g)},$$slots:{default:!0}}),oe(),r()}var a6=F('<!> <div role="none" class="main-inner svelte-1fpggxh"><div role="none" class="main-inner-main svelte-1fpggxh"><!> <!></div> <!></div>',1);const l6={hash:"svelte-1fpggxh",code:'.main-inner.svelte-1fpggxh {flex:auto;display:flex;overflow:hidden;}.main-inner.svelte-1fpggxh .main-inner-main:where(.svelte-1fpggxh) {flex:auto;display:flex;flex-direction:column;overflow:hidden;}.main-inner.svelte-1fpggxh .secondary-sidebar {flex:none;overflow:auto;box-sizing:content-box;border-top-left-radius:16px;width:320px;background-color:var(--sui-secondary-background-color);}.main-inner.svelte-1fpggxh .secondary-sidebar [role="listbox"] {padding:12px;}'};function jA(t,e){Te(t,l6);let n=P(e,"primaryToolbar",3,void 0),r=P(e,"secondaryToolbar",3,void 0),i=P(e,"mainContent",3,void 0),s=P(e,"secondarySidebar",3,void 0);var o=a6(),a=M(o);Re(a,()=>n()??Fe);var c=D(a,2),u=R(c),d=R(u);Re(d,()=>r()??Fe);var f=D(d,2);Re(f,()=>i()??Fe);var h=D(u,2);Re(h,()=>s()??Fe),T(t,o)}var c6=F("<!> <!>",1),u6=F('<div role="none" id="page-container" class="outer svelte-6friv7"><!></div>');const d6={hash:"svelte-6friv7",code:'.outer.svelte-6friv7 {flex:auto;display:flex;flex-direction:column;overflow:hidden;}.outer[inert].svelte-6friv7 {display:none;}.outer.svelte-6friv7 > [role="toolbar"] {flex:none;}.outer.svelte-6friv7 > [role="toolbar"] [role="search"] {flex:auto;width:auto;max-width:480px;}.outer.svelte-6friv7 .browser {flex:auto;display:flex;overflow:hidden;}.outer.svelte-6friv7 .primary-sidebar {display:flex;flex-direction:column;flex:none;width:240px;overflow-y:auto;}.outer.svelte-6friv7 .primary-sidebar [role="radiogroup"] {width:100%;}.outer.svelte-6friv7 .primary-sidebar [role="listbox"] {margin:8px;border-width:0;background-color:transparent;}.outer.svelte-6friv7 .primary-sidebar [role="listbox"] button {display:flex;justify-content:flex-start;border-radius:var(--sui-control-medium-border-radius);width:100%;text-align:left;}.outer.svelte-6friv7 .primary-sidebar [role="listbox"] button span {flex:none;}.outer.svelte-6friv7 .primary-sidebar [role="listbox"] button .label {flex:auto;overflow:hidden;text-overflow:ellipsis;}.outer.svelte-6friv7 .primary-sidebar [role="listbox"] button .icon {transition:color 200ms;}.outer.svelte-6friv7 .primary-sidebar [role="listbox"] button .icon.check {display:none;}.outer.svelte-6friv7 .primary-sidebar [role="listbox"] button .count {padding:2px;color:var(--sui-tertiary-foreground-color);font-size:var(--sui-font-size-small);transition:color 200ms;}.outer.svelte-6friv7 .primary-sidebar [role="listbox"] button:not(:first-child) {margin-top:4px;}.outer.svelte-6friv7 .primary-sidebar [role="listbox"] button:not(:focus) {border-color:transparent;}.outer.svelte-6friv7 .primary-sidebar [role="listbox"] [role="option"][aria-selected="true"] {color:var(--sui-highlight-foreground-color);background-color:var(--sui-selected-background-color);}.outer.svelte-6friv7 .primary-sidebar [role="listbox"] [role="option"][aria-selected="true"] .count {color:var(--sui-highlighted-foreground-color);}.outer.svelte-6friv7 .primary-sidebar [role="listbox"] [role="option"].dragover {color:var(--sui-primary-accent-color-inverted) !important;background-color:var(--sui-primary-accent-color) !important;}.outer.svelte-6friv7 .primary-sidebar .sui.divider {margin:8px 0;}.outer.svelte-6friv7 .main {flex:auto;display:flex;flex-direction:column;overflow:hidden;border-top-left-radius:16px;background-color:var(--sui-primary-background-color);}.outer.svelte-6friv7 .main .primary.global[role="toolbar"] {justify-content:center;}'};function Bd(t,e){Te(t,d6);const[n,r]=ve(),i=()=>z(bA,"$hasOverlay",n);let s=P(e,"class",3,""),o=P(e,"primarySidebar",3,void 0),a=P(e,"main",3,void 0),c=at(e,["$$slots","$$events","$$legacy","class","primarySidebar","main"]);var u=u6(),d=R(u);_r(d,nn({get class(){return`browser ${s()??""}`}},()=>c,{children:(f,h)=>{var p=c6(),g=M(p);Re(g,()=>o()??Fe);var m=D(g,2);Re(m,()=>a()??Fe),T(f,p)},$$slots:{default:!0}})),q(()=>u.inert=i()),T(t,u),r()}var f6=F("<!> <!> <!> <!> <!> <!> <!> <!>",1);function h6(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(ni,"$selectedAssetFolder",n),s=()=>z(hi,"$allAssetFolders",n),o=()=>z(rl,"$listedAssets",n),a=()=>z(le,"$_",n),c=()=>z(Ho,"$overlaidAsset",n),u=()=>z(en,"$allAssets",n),d=()=>z(xo,"$assetUpdatesToast",n),f=/^\/assets(?:\/(?<folderPath>[/\-\w]+))?(?:\/(?<fileName>[^/]+\.[A-Za-z0-9]+))?$/,h=w(()=>gy(i()?.internalPath)),p=async()=>{const{path:E}=jd(),A=E.match(f);if(!A?.groups)return;const{folderPath:O,fileName:L}=A.groups;if(!O)ot(ni,void 0);else if(i()?.internalPath!==O){const I=s().find(({internalPath:N})=>O===N);I&&ot(ni,I)}if(!L){const I=o().length;await vn(100),ot(bs,a()(I>1?"viewing_x_asset_folder_many_assets":I===1?"viewing_x_asset_folder_one_asset":"viewing_x_asset_folder_no_assets",{values:{folder:l(h),count:I}}));return}ot(Ho,L?u().find(I=>I.path===`${O}/${L}`):void 0),ot(bs,c()?a()("viewing_x_asset_details",{values:{name:c().name}}):a()("file_not_found")),ot(Xo,!0)};cn(()=>{p()});var g=f6();wi("hashchange",ql,()=>{p()});var m=M(g);const v=w(()=>a()("asset_library"));Bd(m,{class:"media",get"aria-label"(){return l(v)},primarySidebar:O=>{HH(O,{})},main:O=>{const L=w(()=>a()("x_asset_folder",{values:{folder:l(h)}}));_r(O,{id:"assets-container",class:"main",get"aria-label"(){return l(L)},children:(I,N)=>{jA(I,{primaryToolbar:G=>{YH(G,{})},secondaryToolbar:G=>{var K=W(),ee=M(K);{var J=Y=>{o6(Y,{})};U(ee,Y=>{o().length&&Y(J)})}T(G,K)},mainContent:G=>{UH(G,{})},secondarySidebar:G=>{ZH(G,{})},$$slots:{primaryToolbar:!0,secondaryToolbar:!0,mainContent:!0,secondarySidebar:!0}})},$$slots:{default:!0}})},$$slots:{primarySidebar:!0,main:!0}});var _=D(m,2);uH(_,{});var b=D(_,2);hH(b,{});var y=D(b,2);vH(y,{});var x=D(y,2);Yn(x,{get show(){return d().saved},set show(E){At(xo,Se(d).saved=E,Se(d))},children:(E,A)=>{Hn(E,{status:"success",children:(O,L)=>{var I=Ue();q(N=>Z(I,N),[()=>a()(d().published?d().count===1?"asset_saved_and_published":"assets_saved_and_published":d().count===1?"asset_saved":"assets_saved",{values:{count:d().count}})]),T(O,I)},$$slots:{default:!0}})},$$slots:{default:!0}});var k=D(x,2);Yn(k,{get show(){return d().moved},set show(E){At(xo,Se(d).moved=E,Se(d))},children:(E,A)=>{Hn(E,{status:"success",children:(O,L)=>{var I=Ue();q(N=>Z(I,N),[()=>a()(d().count===1?"asset_moved":"assets_moved",{values:{count:d().count}})]),T(O,I)},$$slots:{default:!0}})},$$slots:{default:!0}});var S=D(k,2);Yn(S,{get show(){return d().renamed},set show(E){At(xo,Se(d).renamed=E,Se(d))},children:(E,A)=>{Hn(E,{status:"success",children:(O,L)=>{var I=Ue();q(N=>Z(I,N),[()=>a()(d().count===1?"asset_renamed":"assets_renamed",{values:{count:d().count}})]),T(O,I)},$$slots:{default:!0}})},$$slots:{default:!0}});var C=D(S,2);Yn(C,{get show(){return d().deleted},set show(E){At(xo,Se(d).deleted=E,Se(d))},children:(E,A)=>{Hn(E,{status:"success",children:(O,L)=>{var I=Ue();q(N=>Z(I,N),[()=>a()(d().count===1?"asset_deleted":"assets_deleted",{values:{count:d().count}})]),T(O,I)},$$slots:{default:!0}})},$$slots:{default:!0}}),T(t,g),oe(),r()}var p6=F('<div role="none"><!></div> <!>',1);function g6(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(ws,"$uploadingAssets",n),s=()=>z(Xo,"$showAssetOverlay",n),o=()=>z(W5,"$showUploadAssetsConfirmDialog",n),a=()=>z(le,"$_",n),c=w(()=>i().files),u=w(()=>i().folder),d=w(()=>i().originalAsset);let f=ae(ie([]));Be(()=>{$(f,ie([...l(c)]))}),Be(()=>{s()||ot(ws,{folder:void 0,files:[]})});const h=w(()=>a()(l(d)?"replace_asset":"upload_assets")),p=w(()=>a()(l(d)?"replace":"upload"));xc(t,{get open(){return o()},get title(){return l(h)},get okLabel(){return l(p)},onOk:async()=>{await $A(i(),{commitType:"uploadMedia"}),ot(ws,{folder:void 0,files:[]})},onCancel:()=>{ot(ws,{folder:void 0,files:[]})},children:(g,m)=>{var v=p6(),_=M(v),b=R(_);{var y=S=>{var C=Ue();q(E=>Z(C,E),[()=>a()("confirm_replacing_file",{values:{name:l(d).name}})]),T(S,C)},x=S=>{var C=Ue();q(E=>Z(C,E),[()=>a()(l(f).length===1?"confirm_uploading_file":"confirm_uploading_files",{values:{count:l(f).length,folder:`/${l(u)}`}})]),T(S,C)};U(b,S=>{l(d)?S(y):S(x,!1)})}var k=D(_,2);RA(k,{get files(){return l(f)},set files(S){$(f,ie(S))}}),T(g,v)},$$slots:{default:!0}}),oe(),r()}function m6(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(ws,"$uploadingAssets",n),s=()=>z(ni,"$selectedAssetFolder",n),o=()=>z(Z_,"$globalAssetFolder",n),a=()=>z(_a,"$showUploadAssetsDialog",n),c=()=>z(Xo,"$showAssetOverlay",n),u=()=>z(le,"$_",n);let d=ae(void 0);const f=w(()=>i().originalAsset),h=w(()=>!l(f)),p=w(()=>l(f)?Jo.getType(l(f).name)??void 0:void 0),g=y=>{y.length&&(ot(ws,{folder:l(f)?l(f).folder:s()?.internalPath||o()?.internalPath,files:y,originalAsset:l(f)}),ot(_a,!1))};Be(()=>{!zh()&&a()&&l(d)?.open()}),Be(()=>{c()||ot(_a,!1)});var m=W(),v=M(m);{var _=y=>{const x=w(()=>l(f)?u()("replace_x",{values:{name:l(f).name}}):u()("upload_assets"));is(y,{get title(){return l(x)},showOk:!1,get open(){return uk(),a()},set open(k){ot(_a,k)},children:(k,S)=>{Ud(k,{showUploadButton:!0,get accept(){return l(p)},get multiple(){return l(h)},onSelect:({files:C})=>{g(C)}})},$$slots:{default:!0}})},b=y=>{$t(DA(y,{get accept(){return l(p)},get multiple(){return l(h)},onSelect:({files:x})=>{g(x)}}),x=>$(d,ie(x)),()=>l(d))};U(v,y=>{zh()?y(_):y(b,!1)})}T(t,m),oe(),r()}var v6=F('<div role="blockquote" class="svelte-soravq"><pre class="svelte-soravq"> </pre></div>');const b6={hash:"svelte-soravq",code:"div.svelte-soravq {flex:auto;overflow:auto;}pre.svelte-soravq {margin:0;padding:16px;}"};function _6(t,e){se(e,!0),Te(t,b6);const[n,r]=ve(),i=()=>z(le,"$_",n),s=()=>z(wt,"$siteConfig",n),o=w(()=>i()("site_configuration_editor"));Bd(t,{class:"content",get"aria-label"(){return l(o)},main:c=>{var u=v6(),d=R(u),f=R(d);q((h,p)=>{ke(u,"aria-label",h),Z(f,p)},[()=>i()("site_config"),()=>Od.stringify(s())]),T(c,u)},$$slots:{main:!0}}),oe(),r()}var y6=F("<!> <!> <!> <!>",1);function w6(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(jf,"$restoreDialogState",n),s=()=>z(Nn,"$appLocale",n),o=()=>z(tl,"$showContentOverlay",n),a=()=>z(le,"$_",n),c=()=>z(Ao,"$backupToastState",n),u=w(()=>new Date),d=w(()=>i().resolve),f=w(()=>i().timestamp),h=w(()=>l(u).getUTCFullYear()===l(f)?.getUTCFullYear()),p=w(()=>l(h)&&l(u).getUTCMonth()===l(f)?.getUTCMonth()),g=w(()=>l(p)&&l(u).getUTCDate()===l(f)?.getUTCDate()),m=w(()=>l(f)?.toLocaleString(s()??void 0,{year:l(h)?void 0:"numeric",month:l(g)?void 0:"short",day:l(g)?void 0:"numeric",hour:"numeric",minute:"numeric"}));Be(()=>{!o()&&i().show&&(At(jf,Se(i).show=!1,Se(i)),l(d)?.())});var v=y6(),_=M(v);const b=w(()=>a()("restore_backup_title")),y=w(()=>a()("restore")),x=w(()=>a()("discard"));xc(_,{get title(){return l(b)},get okLabel(){return l(y)},get cancelLabel(){return l(x)},onOk:()=>{l(d)?.(!0)},onCancel:()=>{l(d)?.(!1)},get open(){return i().show},set open(E){At(jf,Se(i).show=E,Se(i))},children:(E,A)=>{var O=Ue();q(L=>Z(O,L),[()=>a()("restore_backup_description",{values:{datetime:l(m)}})]),T(E,O)},$$slots:{default:!0}});var k=D(_,2);Yn(k,{get show(){return c().saved},set show(E){At(Ao,Se(c).saved=E,Se(c))},children:(E,A)=>{Hn(E,{status:"info",children:(O,L)=>{var I=Ue();q(N=>Z(I,N),[()=>a()("draft_backup_saved")]),T(O,I)},$$slots:{default:!0}})},$$slots:{default:!0}});var S=D(k,2);Yn(S,{get show(){return c().restored},set show(E){At(Ao,Se(c).restored=E,Se(c))},children:(E,A)=>{Hn(E,{status:"success",children:(O,L)=>{var I=Ue();q(N=>Z(I,N),[()=>a()("draft_backup_restored")]),T(O,I)},$$slots:{default:!0}})},$$slots:{default:!0}});var C=D(S,2);Yn(C,{get show(){return c().deleted},set show(E){At(Ao,Se(c).deleted=E,Se(c))},children:(E,A)=>{Hn(E,{status:"info",children:(O,L)=>{var I=Ue();q(N=>Z(I,N),[()=>a()("draft_backup_deleted")]),T(O,I)},$$slots:{default:!0}})},$$slots:{default:!0}}),T(t,v),oe(),r()}const x6="deepl",k6="DeepL",S6="https://www.deepl.com/pro-api",E6="https://www.deepl.com/account/summary",T6=/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}(?::fx)?/,C6=["AR","BG","CS","DA","DE","EL","EN","ES","ET","FI","FR","HU","ID","IT","JA","KO","LT","LV","NB","NL","PL","PT","RO","RU","SK","SL","SV","TR","UK","ZH"],i1=["AR","BG","CS","DA","DE","EL","EN","EN-GB","EN-US","ES","ET","FI","FR","HU","ID","IT","JA","KO","LT","LV","NB","NL","PL","PT","PT-BR","PT-PT","RO","RU","SK","SL","SV","TR","UK","ZH","ZH-HANS","ZH-HANT"],UA=t=>{const[e]=t.toUpperCase().split("-");if(C6.includes(e))return e},BA=t=>{let e=t.toUpperCase();if(i1.includes(e))return e;if(["ZH-CN","ZH-SG"].includes(e))return"ZH-HANS";if(["ZH-HK","ZH-MO","ZH-TW"].includes(e))return"ZH-HANT";if([e]=e.split("-"),i1.includes(e))return e},A6=async(t,{sourceLocale:e,targetLocale:n,apiKey:r})=>{const i=UA(e),s=BA(n);if(!i)throw new Error("Source locale is not supported.");if(!s)throw new Error("Target locale is not supported.");const o=new URLSearchParams([...t.map(d=>["text",d]),["source_lang",i],["target_lang",s],["tag_handling","html"],["split_sentences","1"],["auth_key",r]]),c=`https://${r.endsWith(":fx")?"api-free.deepl.com":"api.deepl.com"}/v2/translate?${o.toString()}`,{translations:u}=await fetch(c).then(d=>d.json());return u.map(d=>d.text)},qA={serviceId:x6,serviceLabel:k6,developerURL:S6,apiKeyURL:E6,apiKeyPattern:T6,getSourceLanguage:UA,getTargetLanguage:BA,translate:A6},P6={deepl:qA},ug=st(qA),s1=(t,e)=>{Object.entries(e).forEach(([n,r])=>{t[n]!==r&&(t[n]=r)}),Object.keys(t).forEach(n=>{n in e||delete t[n]})},o1=(t,e)=>{const n=new RegExp(`^${ln(e)}\\b(?!#)`),r=Object.entries(t).filter(([i])=>n.test(i)).map(([i,s])=>[i.replace(n,"_"),s]).sort();return[za(Object.fromEntries(r))._??[],Object.fromEntries(Object.entries(t).filter(([i])=>!n.test(i)))]},HA=(t,e,n)=>{const r=ne(rt),{collection:i,collectionFile:s}=r,{defaultLocale:o}=(s??i)._i18n,[a,c]=o1(r.currentValues[t],e),[u,d]=t===o?o1(r.expanderStates._,e):[[],[]];n({valueList:a,expanderStateList:u}),Ji.set(!1),rt.update(f=>(s1(f.currentValues[t],{...Sa({[e]:a}),...c}),t===o&&s1(f.expanderStates._,{...Sa({[e]:u}),...d}),f)),Ji.set(!0)},VA=t=>{const e=ne(rt),{collectionName:n,fileName:r,collection:i,collectionFile:s}=e,{defaultLocale:o}=(s??i)._i18n,a=e.currentValues[o],c=rc([...Object.keys(t),...Object.keys(a)]),u={};return c.forEach(d=>{const f=_n({collectionName:n,fileName:r,keyPath:d})?.i18n==="duplicate";u[d]=(f?a[d]:void 0)??t[d]}),u},WA=t=>{rt.update(e=>{const{currentLocales:n,currentValues:r,validities:i}=e,s=!n[t];if(s&&!r[t]){const{collection:o,collectionName:a,collectionFile:c,fileName:u,originalValues:d}=e,{fields:f=[]}=c??o,h=lg(f,t);return{...e,currentLocales:{...n,[t]:s},originalValues:{...d,[t]:h},currentValues:{...r,[t]:hy({draft:{collectionName:a,fileName:u},locale:t,target:VA(h)})}}}return{...e,currentLocales:{...n,[t]:s},validities:{...i,[t]:{}}}})},GA=async(t,e,{keyPath:n="",translate:r=!1}={})=>{const{collectionName:i,fileName:s,currentValues:o}=ne(rt),a=o[t],c=Object.fromEntries(Object.entries(a).filter(([p,g])=>{const m=o[e][p],v=_n({collectionName:i,fileName:s,valueMap:a,keyPath:p});return!(n&&!p.startsWith(n)||typeof g!="string"||!g||!["markdown","text","string","list"].includes(v?.widget??"string")||v?.widget==="list"&&(v.field??v.fields)||!r&&g===m||!n&&r&&m)})),u=Object.keys(c).length,d=u===1?"one":"many",f=r?"translation":"copy",h=(p,g)=>{Dv.set({id:Date.now(),show:!0,status:p,message:g,count:u,sourceLocale:t})};if(!u){h("info",`${f}.none`);return}if(r){const p=ne(ug),g=ne(Tt).apiKeys?.[p.serviceId]||await new Promise(m=>{pu.set({show:!0,multiple:u>1,resolve:m})});if(!g)return;h("info","translation.started");try{const m=await p.translate(Object.values(c),{apiKey:g,sourceLocale:t,targetLocale:e});Object.keys(c).forEach((v,_)=>{o[e][v]=m[_]}),h("success",`translation.complete.${d}`)}catch(m){h("error","translation.error"),console.error(m)}}else Object.entries(c).forEach(([p,g])=>{o[e][p]=g}),h("success",`copy.complete.${d}`);rt.update(p=>({...p,currentValues:o}))},yy=(t="",e="")=>{const{collection:n,collectionFile:r,fileName:i,currentValues:s,originalValues:o}=ne(rt),{allLocales:a,defaultLocale:c}=(r??n)._i18n,u=t?[t]:a,d=(f,h,p=!1)=>{Object.entries(h).forEach(([g,m])=>{if(!e||g.startsWith(e)){const v=_n({collectionName:n.name,fileName:i,valueMap:h,keyPath:g});(f===c||[!0,"translate"].includes(v?.i18n??!1))&&(p?delete s[f][g]:s[f][g]=m)}})};u.forEach(f=>{d(f,s[f],!0),d(f,o[f],!1)}),rt.update(f=>({...f,currentValues:s}))};function O6(t,e){let n=P(e,"currentValue",15,!1),r=P(e,"required",3,!0),i=P(e,"readonly",3,!1),s=P(e,"invalid",3,!1);gd(t,{get readonly(){return i()},get required(){return r()},get invalid(){return s()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get checked(){return n()},set checked(o){n(o)}})}var $6=F("<p> </p>");function L6(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(le,"$_",n);let s=P(e,"currentValue",3,!1);var o=W(),a=M(o);{var c=u=>{var d=$6(),f=R(d);q(h=>Z(f,h),[()=>i()(`boolean.${s()}`)]),T(u,d)};U(a,u=>{typeof s()=="boolean"&&u(c)})}T(t,o),oe(),r()}function N6(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(rt,"$entryDraft",n);let s=P(e,"currentValue",15),o=P(e,"required",3,!0),a=P(e,"readonly",3,!1),c=P(e,"invalid",3,!1),u=ae(""),d=ae("");const f=w(()=>it(e.fieldConfig.default_language,"")),h=w(()=>it(e.fieldConfig.allow_language_selection,!0)),p=w(()=>it(e.fieldConfig.output_code_only,!1)),g=w(()=>it(e.fieldConfig.keys,()=>({code:"code",lang:"lang"}),!0)),m=w(()=>Zr(i()?.currentValues[e.locale])??{}),v=w(()=>`${e.keyPath}.${l(g).code}`),_=w(()=>`${e.keyPath}.${l(g).lang}`),b=()=>{if(l(p))typeof s()!="string"?$(u,""):l(u)!==s()&&$(u,ie(s()));else{const x=l(m)[l(v)],k=l(m)[l(_)]||l(f);typeof x!="string"?$(u,""):l(u)!==x&&$(u,ie(x)),typeof k!="string"?$(d,""):l(d)!==k&&$(d,ie(k))}},y=()=>{l(p)?s()!==l(u)&&s(l(u)):i()&&(s({}),l(m)[l(v)]!==l(u)&&At(rt,Se(i).currentValues[e.locale][l(v)]=l(u),Se(i)),l(m)[l(_)]!==l(d)&&At(rt,Se(i).currentValues[e.locale][l(_)]=l(d),Se(i)))};Be(()=>{l(m),Se(()=>{b()})}),Be(()=>{l(u),l(d),Se(()=>{y()})}),GM(t,{get showLanguageSwitcher(){return l(h)},flex:!0,get readonly(){return a()},get required(){return o()},get invalid(){return c()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get code(){return l(u)},set code(x){$(u,ie(x))},get lang(){return l(d)},set lang(x){$(d,ie(x))}}),oe(),r()}var I6=F("<pre> </pre>");function R6(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(rt,"$entryDraft",n),s=w(()=>it(e.fieldConfig.default_language,"")),o=w(()=>it(e.fieldConfig.output_code_only,!1)),a=w(()=>it(e.fieldConfig.keys,()=>({code:"code",lang:"lang"}),!0)),c=w(()=>Zr(i()?.currentValues[e.locale])??{}),u=w(()=>`${e.keyPath}.${l(a).code}`),d=w(()=>`${e.keyPath}.${l(a).lang}`),f=w(()=>l(o)?e.currentValue:l(c)[l(u)]),h=w(()=>l(o)?l(s):l(c)[l(d)]);var p=W(),g=M(p);{var m=v=>{var _=I6(),b=R(_);q(()=>{Vr(_,lk(l(h)?`language-${l(h)}`:void 0)),Z(b,l(f))}),T(v,_)};U(g,v=>{l(f)&&v(m)})}T(t,p),oe(),r()}var D6=F(" <!>",1),M6=F('<span role="none" class="value svelte-s59zhj"><!> <!></span>'),F6=F('<div role="none" class="svelte-s59zhj"><input type="color" class="svelte-s59zhj"> <!> <!></div>');const z6={hash:"svelte-s59zhj",code:"div.svelte-s59zhj {display:flex;align-items:center;gap:8px;}div.svelte-s59zhj .value:where(.svelte-s59zhj) {display:flex;align-items:center;gap:8px;}div.svelte-s59zhj .value:where(.svelte-s59zhj) .sui.text-input {width:80px;min-width:0;}div.svelte-s59zhj .value:where(.svelte-s59zhj) .sui.slider {padding:8px;--sui-slider-base-width: 80px;}input.svelte-s59zhj {font-family:var(--sui-textbox-font-family);}"};function j6(t,e){se(e,!0),Te(t,z6);const[n,r]=ve(),i=()=>z(le,"$_",n);let s=P(e,"currentValue",15,""),o=P(e,"required",3,!0),a=P(e,"readonly",3,!1),c=P(e,"invalid",3,!1),u=ae(""),d=ae(255);const f=w(()=>it(e.fieldConfig.allowInput,!1)),h=w(()=>it(e.fieldConfig.enableAlpha,!1)),p=dr("color"),g=/^#[0-9a-f]{6}$/,m=/^(?<rgb>#[0-9a-f]{6})(?<a>[0-9a-f]{2})?$/,v=()=>{if(typeof s()!="string")return;const{rgb:E,a:A="ff"}=s().match(m)?.groups??{};if(E&&l(u)!==E&&$(u,ie(E)),E&&l(h)){const O=Number.parseInt(`0x${A}`,16);l(d)!==O&&$(d,ie(O))}},_=()=>{let E=g.test(l(u))?l(u):"";E&&l(h)&&(E+=l(d).toString(16).padStart(2,"0")),s()!==E&&s(E)};Be(()=>{s(),Se(()=>{v()})}),Be(()=>{l(u),l(d),Se(()=>{_()})});var b=F6(),y=R(b);ke(y,"id",`${p??""}-picker`);var x=D(y,2);{var k=E=>{var A=M6(),O=R(A);{var L=j=>{Pn(j,{id:`${p??""}-input`,get invalid(){return c()},get readonly(){return a()},get required(){return o()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get value(){return l(u)},set value(H){$(u,ie(H))}})};U(O,j=>{l(f)&&j(L)})}var I=D(O,2);{var N=j=>{var H=D6(),B=M(H),V=D(B);const G=w(()=>!l(u)),K=w(()=>i()("opacity"));IN(V,{min:0,max:255,get disabled(){return l(G)},get"aria-label"(){return l(K)},get value(){return l(d)},set value(ee){$(d,ie(ee))}}),q(ee=>Z(B,`${ee??""} `),[()=>i()("opacity")]),T(j,H)};U(I,j=>{l(h)&&j(N)})}T(E,A)};U(x,E=>{(l(f)||l(h))&&E(k)})}var S=D(x,2);{var C=E=>{const A=w(()=>i()("clear")),O=w(()=>!l(u)),L=w(()=>`${p}-picker ${l(f)?`${p}-input`:""}`);Ze(E,{variant:"tertiary",get label(){return l(A)},get disabled(){return l(O)},get"aria-controls"(){return l(L)},onclick:()=>{$(u,""),$(d,255)}})};U(S,E=>{!a()&&!o()&&E(C)})}q(()=>{y.readOnly=a(),ke(y,"aria-invalid",c()),ke(y,"aria-readonly",a()),ke(y,"aria-required",o()),ke(y,"aria-labelledby",`${e.fieldId??""}-label`),ke(y,"aria-errormessage",`${e.fieldId??""}-error`)}),np(y,()=>l(u),E=>$(u,E)),T(t,b),oe(),r()}var U6=F('<p><span role="none" class="preview svelte-16cruwo"><span role="none" class="color svelte-16cruwo"></span> <span role="none" class="value"> </span> <span role="none" class="value"> </span></span></p>');const B6={hash:"svelte-16cruwo",code:".preview.svelte-16cruwo {display:inline-flex;align-items:center;gap:8px;}.preview.svelte-16cruwo .color:where(.svelte-16cruwo) {display:block;width:24px;height:24px;border-radius:24px;}"};function q6(t,e){se(e,!0),Te(t,B6);const n=w(()=>it(e.fieldConfig.enableAlpha,!1)),r=u=>Number.parseInt(`0x${u}`,16),i=/^#(?<r>[0-9a-f]{2})(?<g>[0-9a-f]{2})(?<b>[0-9a-f]{2})(?<a>[0-9a-f]{2})?$/,s=w(()=>{const{r:u,g:d,b:f,a:h}=e.currentValue?.match(i)?.groups??{};return u?`rgb(${r(u)} ${r(d)} ${r(f)}${l(n)&&h?` / ${Math.round(r(h)/255*100)}%`:""})`:""});var o=W(),a=M(o);{var c=u=>{var d=U6(),f=R(d),h=R(f),p=D(h,2),g=R(p),m=D(p,2),v=R(m);q(()=>{Yr(h,"background-color",e.currentValue),Z(g,e.currentValue),Z(v,l(s))}),T(u,d)};U(a,u=>{typeof e.currentValue=="string"&&e.currentValue.trim()&&u(c)})}T(t,o),oe()}function H6(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(rt,"$entryDraft",n);let s=P(e,"currentValue",15),o=P(e,"required",3,!0),a=P(e,"readonly",3,!1),c=P(e,"invalid",3,!1);const u=w(()=>it(e.fieldConfig.value,"")),d=w(()=>i()?.collectionName??""),f=w(()=>i()?.fileName),h=w(()=>Zr(i()?.currentValues[e.locale])??{}),p=w(()=>oc(e.locale)),g=()=>{const[_]=e.keyPath.split(".").splice(-2,1);return _?.match(/^\d+$/)?Number(_):void 0},m=()=>{if(!Object.keys(l(h)).includes(e.keyPath))return;const _=l(u)==="{{index}}"?g()??"":l(u).replaceAll(/{{(.+?)}}/g,(b,y)=>{if(y==="index")return String(g()??"");if(!y.startsWith("fields."))return"";const x=tg({collectionName:l(d),fileName:l(f),valueMap:l(h),keyPath:y.replace(/^fields\./,""),locale:e.locale});return Array.isArray(x)?l(p).format(x):String(x)});s()!==_&&s(_)};Be(()=>{l(h),Se(()=>{m()})});const v=w(()=>String(s()));Pn(t,{get value(){return l(v)},flex:!0,get readonly(){return a()},get required(){return o()},get invalid(){return c()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`}}),oe(),r()}var V6=F('<p dir="auto"> </p>');function W6(t,e){var n=V6(),r=R(n);q(()=>{ke(n,"lang",e.locale),Z(r,e.currentValue),n.dir=n.dir}),T(t,n)}var G6=F('<span role="none" class="utc svelte-13u8gbo">UTC</span>'),K6=F('<div role="none" class="svelte-13u8gbo"><input> <!> <!> <!></div>');const Y6={hash:"svelte-13u8gbo",code:"div.svelte-13u8gbo {display:flex;align-items:center;}.utc.svelte-13u8gbo {margin:0 8px;color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-small);}"};function J6(t,e){se(e,!0),Te(t,Y6);const[n,r]=ve(),i=()=>z(le,"$_",n);let s=P(e,"currentValue",15),o=P(e,"required",3,!0),a=P(e,"readonly",3,!1),c=P(e,"invalid",3,!1),u=ae("");const d=w(()=>Qa(e.fieldConfig)),f=w(()=>l(d).dateOnly),h=w(()=>l(d).timeOnly),p=w(()=>l(d).utc),g=()=>{const E=LB(s(),e.fieldConfig);E!==void 0&&E!==l(u)&&$(u,ie(E))},m=()=>{const E=HC(l(u),s(),e.fieldConfig);E!==void 0&&E!==s()&&Number(ac(E,e.fieldConfig))!==Number(ac(s(),e.fieldConfig))&&s(E)};Be(()=>{s(),Se(()=>{g()})}),Be(()=>{l(u),Se(()=>{m()})});var v=K6(),_=R(v),b=D(_,2);{var y=E=>{var A=G6();T(E,A)};U(b,E=>{l(p)&&E(y)})}var x=D(b,2);{var k=E=>{const A=w(()=>i()(l(f)?"today":"now"));Ze(E,{variant:"tertiary",get label(){return l(A)},onclick:()=>{const O=qC(e.fieldConfig);$(u,ie(l(p)?O.replace(/:00\.000Z$/,""):O))}})};U(x,E=>{a()||E(k)})}var S=D(x,2);{var C=E=>{const A=w(()=>i()("clear")),O=w(()=>!s());Ze(E,{variant:"tertiary",get label(){return l(A)},get disabled(){return l(O)},onclick:()=>{s("")}})};U(S,E=>{!a()&&!o()&&E(C)})}q(()=>{ke(_,"type",l(f)?"date":l(h)?"time":"datetime-local"),_.readOnly=a(),ke(_,"aria-readonly",a()),ke(_,"aria-required",o()),ke(_,"aria-invalid",c()),ke(_,"aria-labelledby",`${e.fieldId??""}-label`),ke(_,"aria-errormessage",`${e.fieldId??""}-error`)}),np(_,()=>l(u),E=>$(u,E)),T(t,v),oe(),r()}var Z6=F("<time><!></time>"),X6=F('<p dir="auto"><!> <!></p>');function Q6(t,e){se(e,!0);const n=w(()=>Qa(e.fieldConfig)),r=w(()=>l(n).dateOnly),i=w(()=>l(n).timeOnly),s=w(()=>l(n).utc),o=w(()=>ac(e.currentValue,e.fieldConfig)),a=w(()=>qp(e.locale)),c=/^\d{4}-[01]\d-[0-3]\d$/,u=/T00:00(?::00)?(?:\.000)?Z$/;var d=W(),f=M(d);{var h=p=>{var g=X6(),m=R(g);{var v=x=>{var k=Ue();q(S=>Z(k,S),[()=>l(o).toLocaleTimeString(l(a),jv)]),T(x,k)},_=x=>{var k=Z6(),S=R(k);{var C=A=>{var O=Ue();q(L=>Z(O,L),[()=>l(o).toLocaleDateString(l(a),{...zv,timeZone:l(s)||l(r)&&e.currentValue?.match(c)||l(r)&&e.currentValue?.match(u)?"UTC":void 0})]),T(A,O)},E=A=>{var O=Ue();q(L=>Z(O,L),[()=>l(o).toLocaleString(l(a),{...zv,...jv,timeZone:l(s)?"UTC":void 0,timeZoneName:l(s)?void 0:"short"})]),T(A,O)};U(S,A=>{l(r)?A(C):A(E,!1)})}q(A=>ke(k,"datetime",A),[()=>l(o).toJSON()]),T(x,k)};U(m,x=>{l(i)?x(v):x(_,!1)})}var b=D(m,2);{var y=x=>{var k=Ue("UTC");T(x,k)};U(b,x=>{l(s)&&x(y)})}q(()=>{ke(g,"lang",e.locale),g.dir=g.dir}),T(p,g)};U(f,p=>{l(o)&&p(h)})}T(t,d),oe()}P2();var e9=F('<div role="none" class="wrapper svelte-j0kdh9"><!></div>');const t9={hash:"svelte-j0kdh9",code:'.wrapper.svelte-j0kdh9 {display:contents;}.wrapper.svelte-j0kdh9 .listbox {gap:4px;overflow-x:hidden;overflow-y:auto;border-width:0;max-height:calc(100% - var(--sui-focus-ring-width) * 2);}.wrapper.svelte-j0kdh9 .listbox .option button {border-radius:var(--sui-control-medium-border-radius);padding:4px;width:100%;height:auto;transition:none;}.wrapper.svelte-j0kdh9 .listbox .option button:focus-visible {outline-color:transparent;}.wrapper.svelte-j0kdh9 .listbox .option button .preview {flex:none;border-radius:var(--sui-control-medium-border-radius);aspect-ratio:1/1;object-fit:contain;}.wrapper.svelte-j0kdh9 .listbox .option button[aria-selected="true"] .icon {display:none;}.wrapper.svelte-j0kdh9 .listbox .name {display:-webkit-box;min-height:calc(var(--sui-font-size-default) * 2);-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden;white-space:normal;line-height:var(--sui-line-height-compact);}.wrapper.svelte-j0kdh9 .listbox.grid {display:grid;grid-template-columns:repeat(auto-fill, minmax(160px, 1fr));height:auto;max-height:none;}.wrapper.svelte-j0kdh9 .listbox.grid .option button {flex-direction:column;justify-content:flex-start;}.wrapper.svelte-j0kdh9 .listbox.grid .option button .preview {width:100%;height:auto;}.wrapper.svelte-j0kdh9 .listbox.grid .option button .name {flex:none;padding:4px 8px 12px;width:100%;min-height:calc(var(--sui-font-size-default) * 3);}.wrapper.svelte-j0kdh9 .listbox.grid button[aria-selected="true"] .preview {outline-offset:-2px;outline-width:2px !important;outline-style:solid;outline-color:var(--sui-primary-accent-color-light);}.wrapper.svelte-j0kdh9:not(.wrapper.show-title) .listbox.grid .option .name {position:absolute;left:-99999px;}.wrapper.svelte-j0kdh9 .listbox.list .option button {gap:16px;}.wrapper.svelte-j0kdh9 .listbox.list .option button .preview {width:64px;}.wrapper.svelte-j0kdh9 .listbox.list .option button .name {flex:auto;}.wrapper.svelte-j0kdh9 .listbox.list .option button[aria-selected="true"] {outline-offset:-2px;outline-width:2px !important;outline-style:solid;outline-color:var(--sui-primary-accent-color-light);}'};function KA(t,e){se(e,!0),Te(t,t9);const[n,r]=ve(),i=()=>z(le,"$_",n);let s=P(e,"viewType",3,"grid"),o=P(e,"gridId",3,void 0),a=P(e,"showTitle",3,!1),c=P(e,"onChange",3,void 0),u=P(e,"children",3,void 0);var d=e9(),f=R(d);const h=w(()=>i()("assets_dialog.available_images"));hd(f,{get id(){return o()},get class(){return s()},get"aria-label"(){return l(h)},onChange:p=>{c()?.(p.detail)},children:(p,g)=>{var m=W(),v=M(m);Re(v,()=>u()??Fe),T(p,m)},$$slots:{default:!0}}),q(()=>pt(d,"show-title",a())),T(t,d),oe(),r()}var n9=F('<span role="alert"> </span>'),r9=F('<span role="alert"> </span>'),i9=F('<span role="alert"> </span>'),s9=F('<!> <span role="none" class="name"> </span>',1),o9=F('<div role="none" class="input-outer svelte-t9mjci"><!></div>'),a9=F('<div role="none" class="input-outer svelte-t9mjci"><!></div> <div role="none" class="input-outer svelte-t9mjci"><!></div> <div role="none" class="input-outer svelte-t9mjci"><!></div>',1),l9=F('<p role="alert" class="svelte-t9mjci"><!> <!></p> <!> <!>',1),c9=F('<span role="alert"> </span>');const u9={hash:"svelte-t9mjci",code:"p.svelte-t9mjci {margin:0 0 8px;}.input-outer.svelte-t9mjci {width:400px;text-align:center;}"};function a1(t,e){se(e,!0),Te(t,u9);const[n,r]=ve(),i=()=>z(Tt,"$prefs",n),s=()=>z(le,"$_",n),o=()=>z(fc,"$selectAssetsView",n);let a=P(e,"kind",3,"image"),c=P(e,"searchTerms",3,""),u=P(e,"gridId",3,void 0),d=P(e,"onSelect",3,void 0);const f=w(()=>it(e.serviceProps.serviceType,"stock_photos")),h=w(()=>it(e.serviceProps.serviceId,"")),p=w(()=>it(e.serviceProps.serviceLabel,"")),g=w(()=>it(e.serviceProps.hotlinking,!1)),m=w(()=>it(e.serviceProps.authType,"api_key")),v=w(()=>it(e.serviceProps.developerURL,"")),_=w(()=>it(e.serviceProps.apiKeyURL,"")),b=w(()=>e.serviceProps.apiKeyPattern),y=w(()=>e.serviceProps.init),x=w(()=>e.serviceProps.signIn),k=w(()=>e.serviceProps.search),S=ie({userName:"",password:""});let C=ae(!0),E=ae(!1),A=ae(""),O=ae(""),L=ae(""),I=ae("initial"),N=ae(null),j=ae(void 0),H=0;const B=async(Y="")=>{$(N,null);try{$(N,ie(await l(k)(Y,{kind:a(),apiKey:l(A),userName:l(O),password:l(L)})))}catch(te){$(j,"search_fetch_failed"),console.error(te)}},V=async Y=>{const{downloadURL:te,fileName:ce,credit:he}=Y;if(l(g)){d()?.({url:te,credit:he});return}try{const re=await fetch(te),{ok:X,status:fe}=re;if(!X)throw new Error(`The response returned with HTTP status ${fe}.`);const be=await re.blob(),ue=new File([be],ce,{type:be.type});d()?.({file:ue,credit:he})}catch(re){$(j,"image_fetch_failed"),console.error(re)}};cn(()=>{(async()=>(typeof l(y)=="function"&&($(C,!1),$(C,ie(await l(y)()))),l(C)&&($(A,ie(i().apiKeys?.[l(h)]??"")),(Y=>($(O,ie(Y[0])),$(L,ie(Y[1]))))((i().logins?.[l(h)]??"").split(" ")),$(E,ie(!!l(A)||!!l(L))),$(N,null),l(E)&&B())))()}),Be(()=>{c(),window.clearTimeout(H),H=window.setTimeout(()=>{l(E)&&B(c())},1e3)});var G=W(),K=M(G);{var ee=Y=>{var te=W(),ce=M(te);{var he=X=>{Tr(X,{children:(fe,be)=>{var ue=n9(),Ee=R(ue);q(_e=>Z(Ee,_e),[()=>s()(`assets_dialog.error.${l(j)}`)]),T(fe,ue)},$$slots:{default:!0}})},re=X=>{var fe=W(),be=M(fe);{var ue=_e=>{Tr(_e,{children:(Ae,Ce)=>{var $e=r9(),Ve=R($e);q(We=>Z(Ve,We),[()=>s()("searching")]),T(Ae,$e)},$$slots:{default:!0}})},Ee=_e=>{var Ae=W(),Ce=M(Ae);{var $e=We=>{Tr(We,{children:(ht,Ge)=>{var pe=i9(),ye=R(pe);q(we=>Z(ye,we),[()=>s()("no_files_found")]),T(ht,pe)},$$slots:{default:!0}})},Ve=We=>{const ht=w(()=>o()?.type);KA(We,{get gridId(){return u()},get viewType(){return l(ht)},onChange:({value:Ge})=>{const pe=l(N)?.find(({id:ye})=>ye===Ge);pe&&V(pe)},children:(Ge,pe)=>{Ua(Ge,{get items(){return l(N)},itemKey:"id",renderItem:(we,xe=Fe)=>{const Ne=w(()=>{const{id:me,previewURL:Pe,description:qe,kind:Xe}=xe();return{id:me,previewURL:Pe,description:qe,_kind:Xe}});mr(we,{label:"",get value(){return l(Ne).id},children:(me,Pe)=>{var qe=s9(),Xe=M(qe);Ns(Xe,{get kind(){return l(Ne)._kind},get src(){return l(Ne).previewURL},variant:"tile",crossorigin:"anonymous"});var ct=D(Xe,2),Ke=R(ct);q(()=>Z(Ke,l(Ne).description)),T(me,qe)},$$slots:{default:!0}})},$$slots:{renderItem:!0}})},$$slots:{default:!0}})};U(Ce,We=>{l(N).length?We(Ve,!1):We($e)},!0)}T(_e,Ae)};U(be,_e=>{l(N)?_e(Ee,!1):_e(ue)},!0)}T(X,fe)};U(ce,X=>{l(j)?X(he):X(re,!1)})}T(Y,te)},J=Y=>{var te=W(),ce=M(te);{var he=X=>{Tr(X,{children:(fe,be)=>{var ue=l9(),Ee=M(ue),_e=R(Ee);{var Ae=pe=>{var ye=W(),we=M(ye);br(we,()=>fi.sanitize(s()("prefs.media.stock_photos.description",{values:{service:l(p),homeHref:`href="${l(v)}"`,apiKeyHref:`href="${l(_)}"`}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})),T(pe,ye)};U(_e,pe=>{l(f)==="stock_photos"&&pe(Ae)})}var Ce=D(_e,2);{var $e=pe=>{var ye=W(),we=M(ye);br(we,()=>fi.sanitize(s()(`cloud_storage.auth.${l(I)}`,{values:{service:l(p)}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})),T(pe,ye)};U(Ce,pe=>{l(f)==="cloud_storage"&&pe($e)})}var Ve=D(Ee,2);{var We=pe=>{var ye=o9(),we=R(ye);const xe=w(()=>s()("prefs.media.stock_photos.field_label",{values:{service:l(p)}}));Pn(we,{flex:!0,spellcheck:"false",get"aria-label"(){return l(xe)},oninput:Ne=>{const me=Ne.target.value.trim();l(b)?.test(me)&&($(A,ie(me)),$(E,!0),At(Tt,Se(i).apiKeys??={},Se(i)),At(Tt,Se(i).apiKeys[l(h)]=l(A),Se(i)),B())}}),T(pe,ye)};U(Ve,pe=>{l(m)==="api_key"&&pe(We)})}var ht=D(Ve,2);{var Ge=pe=>{var ye=a9(),we=M(ye),xe=R(we);const Ne=w(()=>s()("user_name")),me=w(()=>l(I)==="requested");Pn(xe,{flex:!0,spellcheck:"false",get"aria-label"(){return l(Ne)},get disabled(){return l(me)},get value(){return S.userName},set value(bt){S.userName=bt}});var Pe=D(we,2),qe=R(Pe);const Xe=w(()=>s()("password")),ct=w(()=>l(I)==="requested");_F(qe,{get"aria-label"(){return l(Xe)},get disabled(){return l(ct)},get value(){return S.password},set value(bt){S.password=bt}});var Ke=D(Pe,2),nt=R(Ke);const dt=w(()=>s()("sign_in")),ut=w(()=>!S.userName||!S.password||l(I)==="requested");Ze(nt,{variant:"secondary",get label(){return l(dt)},get disabled(){return l(ut)},onclick:async()=>{$(I,"requested"),S.userName=S.userName.trim(),S.password=S.password.trim(),await l(x)?.(S.userName,S.password)?($(I,"success"),$(O,ie(S.userName)),$(L,ie(S.password)),$(E,!0),At(Tt,Se(i).logins??={},Se(i)),At(Tt,Se(i).logins[l(h)]=[l(O),l(L)].join(" "),Se(i)),B()):$(I,"error")}}),T(pe,ye)};U(ht,pe=>{l(m)==="password"&&pe(Ge)})}T(fe,ue)},$$slots:{default:!0}})},re=X=>{Tr(X,{children:(fe,be)=>{var ue=c9(),Ee=R(ue);q(_e=>Z(Ee,_e),[()=>s()("cloud_storage.invalid")]),T(fe,ue)},$$slots:{default:!0}})};U(ce,X=>{l(C)?X(he):X(re,!1)},!0)}T(Y,te)};U(K,Y=>{l(E)?Y(ee):Y(J,!1)})}T(t,G),oe(),r()}const hc=st(""),Pu=t=>t.normalize("NFD").replace(/\p{Diacritic}/gu,"").toLocaleLowerCase(),YA=ur([ii,en,hc],([t,e,n],r)=>{const i=n?Pu(n):"",s=c=>Pu(c).includes(i),o=!t.length||!i?[]:t.map(c=>{let u=0;return co(c).forEach(d=>{s(d.label||d.name)&&(u+=10),s(qo(d,c,{useTemplate:!0,allowMarkdown:!0}))&&(u+=10),u+=Zo(d,c).filter(f=>s(f.label||f.name)).length,Object.values(c.locales).forEach(({content:f})=>{u+=Object.values(f).filter(h=>typeof h=="string"&&!!h&&s(h)).length})}),{entry:c,points:u}}).filter(({points:c})=>c>0).sort((c,u)=>u.points-c.points).map(c=>c.entry),a=!e.length||!i?[]:e.filter(c=>Pu(c.name).includes(i));r({entries:o,assets:a})}),l1=(t,e=Fe)=>{var n=W(),r=M(n);br(r,()=>fi.sanitize(e().replace(/([-_.])/g,"$1<wbr>"),{ALLOWED_TAGS:["wbr"]})),T(t,n)};var d9=F('<strong class="svelte-7q7g7u"><!></strong>'),f9=F("<!>/",1),h9=F('<!> <span role="none" class="name svelte-7q7g7u"></span>',1),p9=F('<div role="none" class="grid-wrapper svelte-7q7g7u"><!></div>'),g9=F('<span role="none"> </span>');const m9={hash:"svelte-7q7g7u",code:'.grid-wrapper.svelte-7q7g7u {overflow-y:auto;height:100%;}.grid-wrapper.svelte-7q7g7u [role="listbox"] {background-color:transparent;}.name.svelte-7q7g7u {color:var(--sui-tertiary-foreground-color);}.name.svelte-7q7g7u strong:where(.svelte-7q7g7u) {color:var(--sui-primary-foreground-color);font-weight:var(--sui-font-weight-normal);}'};function JA(t,e){se(e,!0),Te(t,m9);const[n,r]=ve(),i=()=>z(le,"$_",n);let s=P(e,"assets",19,()=>[]),o=P(e,"viewType",3,"grid"),a=P(e,"searchTerms",3,""),c=P(e,"basePath",3,void 0),u=P(e,"gridId",3,void 0),d=P(e,"checkerboard",3,!1),f=P(e,"onSelect",3,void 0);const h=w(()=>a()?s().filter(({name:_})=>Pu(_).includes(a())):s());var p=W(),g=M(p);{var m=_=>{var b=p9(),y=R(b);KA(y,{get gridId(){return u()},get viewType(){return o()},showTitle:!0,onChange:({value:x})=>{f()?.({asset:s().find(({path:k})=>k===x)})},children:(x,k)=>{Ua(x,{get items(){return l(h)},itemKey:"path",renderItem:(C,E=Fe)=>{const A=w(()=>{const{kind:I,name:N,path:j}=E();return{kind:I,name:N,path:j}}),O=w(()=>c()?Fn(l(A).path.replace(c(),"")):l(A).name),L=w(()=>l(O).split("/"));mr(C,{label:"",get value(){return l(A).path},children:(I,N)=>{var j=h9(),H=M(j);Ns(H,{get kind(){return l(A).kind},get asset(){return E()},variant:"tile",get checkerboard(){return d()}});var B=D(H,2);ft(B,21,()=>l(L),cr,(V,G,K)=>{var ee=W(),J=M(ee);{var Y=ce=>{var he=d9(),re=R(he);l1(re,()=>l(G)),T(ce,he)},te=ce=>{var he=f9(),re=M(he);l1(re,()=>l(G)),T(ce,he)};U(J,ce=>{K===l(L).length-1?ce(Y):ce(te,!1)})}T(V,ee)}),T(I,j)},$$slots:{default:!0}})},$$slots:{renderItem:!0}})},$$slots:{default:!0}}),T(_,b)},v=_=>{Tr(_,{children:(b,y)=>{var x=g9(),k=R(x);q(S=>Z(k,S),[()=>i()("no_files_found")]),T(b,x)},$$slots:{default:!0}})};U(g,_=>{l(h).length?_(m):_(v,!1)})}T(t,p),oe(),r()}function gm(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(fc,"$selectAssetsView",n);let s=P(e,"assets",19,()=>[]),o=P(e,"selectedAsset",15,null),a=P(e,"showUploader",3,!1),c=P(e,"searchTerms",3,""),u=P(e,"basePath",3,void 0),d=ae(void 0);Be(()=>{o()||Se(()=>{l(d)?.reset()})});const f=w(()=>e.kind==="image"?"image/*":void 0);$t(Ud(t,{get accept(){return l(f)},get showUploadButton(){return a()},showFilePreview:!0,onSelect:({files:h})=>{o(h.length?{file:h[0]}:null)},children:(h,p)=>{var g=W(),m=M(g);{var v=_=>{const b=w(()=>s().sort((x,k)=>x.name.localeCompare(k.name))),y=w(()=>i()?.type);JA(_,{get assets(){return l(b)},get viewType(){return l(y)},get searchTerms(){return c()},get basePath(){return u()},gridId:"select-assets-grid",checkerboard:!0,onSelect:({asset:x})=>{o({asset:x})}})};U(m,_=>{a()||_(v)})}T(h,g)},$$slots:{default:!0}}),h=>$(d,ie(h)),()=>l(d)),oe(),r()}const v9=["en-US","pt-BR","es-ES","ca-ES","de-DE","it-IT","fr-FR","sv-SE","id-ID","pl-PL","ja-JP","zh-TW","zh-CN","ko-KR","th-TH","nl-NL","hu-HU","vi-VN","cs-CZ","da-DK","fi-FI","uk-UA","el-GR","ro-RO","nb-NO","sk-SK","tr-TR","ru-RU"],c1="https://api.pexels.com/v1",b9=async(t,{apiKey:e})=>{const n={Authorization:e},[r]=ne(Nn).toLowerCase().split("-");let i=[];if(t)for(let s=1;s<=2;s+=1){const o=new URLSearchParams({query:t,locale:v9.find(d=>d.split("-")[0]===r)||"en-US",page:s,per_page:80}),a=await fetch(`${c1}/search?${o.toString()}`,{headers:n});if(!a.ok)return Promise.reject();const{photos:c,next_page:u}=await a.json();if(i.push(...c),!u)break;await vn(50)}else{const s=new URLSearchParams({per_page:80}),o=await fetch(`${c1}/curated?${s.toString()}`,{headers:n});if(!o.ok)return Promise.reject();i=(await o.json()).photos}return i.map(({id:s,url:o,alt:a,src:{large2x:c,medium:u},photographer:d})=>({id:String(s),description:o.match(/\/photo\/(?<alt>.+?)-\d+\/$/)?.groups?.alt.replace(/-/g," ")??a,previewURL:u,downloadURL:c,fileName:`pexels-${d.split(/\s+/).join("-").toLowerCase()}-${s}.jpg`,kind:"image",credit:`<a href="${o}">Photo by ${d} on Pexels</a>`}))},_9={serviceType:"stock_photos",serviceId:"pexels",serviceLabel:"Pexels",serviceURL:"https://www.pexels.com/",showServiceLink:!0,hotlinking:!1,authType:"api_key",developerURL:"https://www.pexels.com/api/",apiKeyURL:"https://www.pexels.com/api/new/",apiKeyPattern:/^[a-zA-Z\d]{56}$/,search:b9},y9=["cs","da","de","en","es","fr","id","it","hu","nl","no","pl","pt","ro","sk","fi","sv","tr","vi","th","bg","ru","el","ja","ko","zh"],w9="https://pixabay.com/api",x9=async(t,{apiKey:e})=>{const[n]=ne(Nn).toLowerCase().split("-"),r=new URLSearchParams({key:e,q:t,lang:y9.includes(n)?n:"en",image_type:"photo",min_width:1280,editors_choice:!t,safesearch:!0,per_page:150}),i=await fetch(`${w9}/?${r.toString()}`);return i.ok?(await i.json()).hits.map(({id:o,webformatURL:a,previewURL:c,largeImageURL:u,imageWidth:d,imageHeight:f,pageURL:h,tags:p,user:g})=>({id:String(o),description:p,previewURL:a.replace("_640.",d>f?"_180.":"_340."),downloadURL:u,fileName:c.split("/").pop().replace("_150.","_1280."),kind:"image",credit:`<a href="${h}">Photo by ${g} on Pixabay`})):Promise.reject()},k9={serviceType:"stock_photos",serviceId:"pixabay",serviceLabel:"Pixabay",serviceURL:"https://pixabay.com/",showServiceLink:!0,hotlinking:!1,authType:"api_key",developerURL:"https://pixabay.com/service/about/api/",apiKeyURL:"https://pixabay.com/api/docs/#api_key",apiKeyPattern:/^\d+-[a-f\d]{25}$/,search:x9},S9=["af","sq","am","ar","hy","as","az","bn","ba","eu","bs","bg","yue","ca","lzh","zh-Hans","zh-Hant","hr","cs","da","prs","dv","nl","en","et","fo","fj","fil","fi","fr","fr-ca","gl","ka","de","el","gu","ht","he","hi","mww","hu","is","id","ikt","iu","iu-Latn","ga","it","ja","kn","kk","km","ko","ku","kmr","ky","lo","lv","lt","mk","mg","ms","ml","mt","mi","mr","mn-Cyrl","mn-Mong","my","ne","nb","or","ps","fa","pl","pt","pt-pt","pa","otq","ro","ru","sm","sr-Cyrl","sr-Latn","sk","sl","so","es","sw","sv","ty","ta","tt","te","th","bo","ti","to","tr","tk","uk","hsb","ur","ug","uz","vi","cy","yua","zu"],u1="https://api.unsplash.com",d1="utm_source=sveltia-cms&utm_medium=referral",E9=async(t,{apiKey:e})=>{const n={Authorization:`Client-ID ${e}`},[r]=ne(Nn).toLowerCase().split("-");let i=[];if(t)for(let s=1;s<=5;s+=1){const o=new URLSearchParams({query:t,lang:S9.includes(r)?r:"en",page:s,per_page:30}),a=await fetch(`${u1}/search/photos?${o.toString()}`,{headers:n});if(!a.ok)return Promise.reject();const{results:c,total_pages:u}=await a.json();if(i.push(...c),u===s)break;await vn(50)}else{const s=new URLSearchParams({per_page:30}),o=await fetch(`${u1}/photos?${s.toString()}`,{headers:n});if(!o.ok)return Promise.reject();i=await o.json()}return i.map(({id:s,description:o,alt_description:a,urls:{regular:c,thumb:u},user:{username:d,name:f}})=>({id:String(s),description:[o,a].filter(Boolean).join(" — "),previewURL:u,downloadURL:c,fileName:`${f.split(/\s+/).join("-").toLowerCase()}-${s}-unsplash.jpg`,kind:"image",credit:`Photo by <a href="https://unsplash.com/@${d}?${d1}">${f}</a> on <a href="https://unsplash.com/?${d1}">Unsplash</a>`}))},T9={serviceType:"stock_photos",serviceId:"unsplash",serviceLabel:"Unsplash",serviceURL:"https://unsplash.com/",showServiceLink:!0,hotlinking:!0,authType:"api_key",developerURL:"https://unsplash.com/developers",apiKeyURL:"https://unsplash.com/oauth/applications",apiKeyPattern:/^[a-zA-Z\d-]{40,}$/,search:E9},wf={},mu={pexels:_9,pixabay:k9,unsplash:T9};var C9=F("<!> <!>",1),A9=F("<a> </a>"),P9=F("<!> <!> <!>",1),O9=F("<!> <!>",1),$9=F("<!> <!> <!> <!>",1),L9=F('<div role="none"> </div> <!>',1),N9=F('<div role="none" class="wrapper svelte-v3cscd"><!> <div role="none" class="content-pane svelte-v3cscd"><!> <!> <!> <!></div></div>');const I9={hash:"svelte-v3cscd",code:".wrapper.svelte-v3cscd {display:flex;gap:16px;height:60vh;}.wrapper.svelte-v3cscd .listbox {flex:none;background-color:transparent;}.wrapper.svelte-v3cscd .content-pane:where(.svelte-v3cscd) {overflow:auto;flex:auto;}"};function R9(t,e){se(e,!0),Te(t,I9);const[n,r]=ve(),i=()=>z(le,"$_",n),s=()=>z(Vn,"$selectedCollection",n),o=()=>z(Tt,"$prefs",n),a=()=>z(tl,"$showContentOverlay",n),c=()=>z(fc,"$selectAssetsView",n),u=()=>z(en,"$allAssets",n),d=()=>z(Z_,"$globalAssetFolder",n);let f=P(e,"open",15,!1),h=P(e,"canEnterURL",3,!0),p=P(e,"onSelect",3,void 0),g=ae(""),m=ae(null),v=ae(""),_=ae(""),b=ae("uncategorized-assets");const y=w(()=>e.kind==="image"?i()("assets_dialog.title.image"):i()("assets_dialog.title.file")),x=w(()=>Pu(l(_))),k=w(()=>s()?._assetFolder?.internalPath??""),S=w(()=>s()?._assetFolder?.entryRelative??!1),C=w(()=>!!l(k)&&!l(S)),E=w(()=>!!e.entry&&l(S)),A=w(()=>l(b)==="upload"),O=w(()=>e.entry?Ln(Object.values(e.entry.locales)[0].path).dirname:void 0),L=w(()=>l(b).endsWith("-assets")),I=w(()=>Object.keys(mu).includes(l(b))&&o()?.apiKeys?.[l(b)]||Object.keys(wf).includes(l(b))&&o()?.logins?.[l(b)]);cn(()=>{$(g,`library-${Gn("short")}`)}),Be(()=>{$(b,ie(l(E)?"entry-assets":l(C)?"collection-assets":"uncategorized-assets"))}),Be(()=>{f()&&$(v,"")}),Be(()=>{a()||f(!1)});const N=w(()=>i()("insert")),j=w(()=>!l(m));is(t,{get title(){return l(y)},size:"x-large",get okLabel(){return l(N)},get okDisabled(){return l(j)},onOk:()=>{p()?.({asset:l(m)})},get open(){return f()},set open(V){f(V)},headerExtra:V=>{var G=W(),K=M(G);{var ee=J=>{var Y=C9(),te=M(Y);{var ce=fe=>{const be=w(()=>fc);_y(fe,{get currentView(){return l(be)},"aria-controls":"select-assets-grid"})};U(te,fe=>{c()&&fe(ce)})}var he=D(te,2);const re=w(()=>!!l(m)?.file),X=w(()=>i()(`assets_dialog.search_for_${e.kind??"file"}`));ob(he,{get disabled(){return l(re)},get"aria-label"(){return l(X)},get value(){return l(_)},set value(fe){$(_,ie(fe))}}),T(J,Y)};U(K,J=>{(l(L)||l(I))&&J(ee)})}T(V,G)},footerExtra:V=>{var G=W(),K=M(G);{var ee=J=>{var Y=W();const te=w(()=>{const{showServiceLink:re,serviceLabel:X,serviceURL:fe}=mu[l(b)]??{};return{showServiceLink:re,serviceLabel:X,serviceURL:fe}});var ce=M(Y);{var he=re=>{var X=A9(),fe=R(X);q(be=>{ke(X,"href",l(te).serviceURL),Z(fe,be)},[()=>i()("prefs.media.stock_photos.credit",{values:{service:l(te).serviceLabel}})]),T(re,X)};U(ce,re=>{l(te).showServiceLink&&re(he)})}T(J,Y)};U(K,J=>{l(I)&&J(ee)})}T(V,G)},children:(V,G)=>{var K=N9(),ee=R(K);const J=w(()=>i()("assets_dialog.locations"));hd(ee,{class:"tabs",get"aria-label"(){return l(J)},get"aria-controls"(){return`${l(g)??""}-content-pane`},onChange:ue=>{$(b,ie(ue.detail.name)),$(m,null)},children:(ue,Ee)=>{var _e=$9(),Ae=M(_e);const Ce=w(()=>i()("assets_dialog.location.repository"));Zd(Ae,{get label(){return l(Ce)},children:(ye,we)=>{var xe=P9(),Ne=M(xe);{var me=nt=>{const dt=w(()=>i()("entry_assets")),ut=w(()=>l(b)==="entry-assets");mr(nt,{name:"entry-assets",get label(){return l(dt)},get selected(){return l(ut)}})};U(Ne,nt=>{l(E)&&nt(me)})}var Pe=D(Ne,2);{var qe=nt=>{const dt=w(()=>i()("collection_assets")),ut=w(()=>l(b)==="collection-assets");mr(nt,{name:"collection-assets",get label(){return l(dt)},get selected(){return l(ut)}})};U(Pe,nt=>{l(C)&&nt(qe)})}var Xe=D(Pe,2);const ct=w(()=>i()("uncategorized")),Ke=w(()=>l(b)==="uncategorized-assets");mr(Xe,{name:"uncategorized-assets",get label(){return l(ct)},get selected(){return l(Ke)}}),T(ye,xe)},$$slots:{default:!0}});var $e=D(Ae,2);const Ve=w(()=>i()("assets_dialog.location.local"));Zd($e,{get label(){return l(Ve)},children:(ye,we)=>{const xe=w(()=>i()("upload"));mr(ye,{name:"upload",get label(){return l(xe)},get selected(){return l(A)}})},$$slots:{default:!0}});var We=D($e,2);{var ht=ye=>{const we=w(()=>i()("assets_dialog.location.external_locations"));Zd(ye,{get label(){return l(we)},children:(xe,Ne)=>{var me=O9(),Pe=M(me);{var qe=ct=>{const Ke=w(()=>i()("assets_dialog.enter_url"));mr(ct,{name:"enter-url",get label(){return l(Ke)}})};U(Pe,ct=>{h()&&ct(qe)})}var Xe=D(Pe,2);ft(Xe,17,()=>Object.values(wf),({serviceId:ct,serviceLabel:Ke})=>ct,(ct,Ke)=>{let nt=()=>l(Ke).serviceId,dt=()=>l(Ke).serviceLabel;mr(ct,{get name(){return nt()},get label(){return dt()}})}),T(xe,me)},$$slots:{default:!0}})};U(We,ye=>{(h()||Object.keys(wf).length)&&ye(ht)})}var Ge=D(We,2);const pe=w(()=>i()("assets_dialog.location.stock_photos"));Zd(Ge,{get label(){return l(pe)},children:(ye,we)=>{var xe=W(),Ne=M(xe);ft(Ne,17,()=>Object.values(mu),({serviceId:me,serviceLabel:Pe})=>me,(me,Pe)=>{let qe=()=>l(Pe).serviceId,Xe=()=>l(Pe).serviceLabel;mr(me,{get name(){return qe()},get label(){return Xe()}})}),T(ye,xe)},$$slots:{default:!0}}),T(ue,_e)},$$slots:{default:!0}});var Y=D(ee,2),te=R(Y);{var ce=ue=>{const Ee=w(()=>u().filter(_e=>(!e.kind||e.kind===_e.kind)&&Ln(_e.path).dirname===l(O)));gm(ue,{get kind(){return e.kind},get assets(){return l(Ee)},get showUploader(){return l(A)},get searchTerms(){return l(x)},get selectedAsset(){return l(m)},set selectedAsset(_e){$(m,ie(_e))}})},he=ue=>{var Ee=W(),_e=M(Ee);{var Ae=$e=>{const Ve=w(()=>u().filter(We=>(!e.kind||e.kind===We.kind)&&We.folder===l(k)));gm($e,{get kind(){return e.kind},get assets(){return l(Ve)},get showUploader(){return l(A)},get searchTerms(){return l(x)},get basePath(){return l(k)},get selectedAsset(){return l(m)},set selectedAsset(We){$(m,ie(We))}})},Ce=$e=>{var Ve=W(),We=M(Ve);{var ht=Ge=>{const pe=w(()=>u().filter(we=>(!e.kind||e.kind===we.kind)&&we.folder===d()?.internalPath)),ye=w(()=>d()?.internalPath);gm(Ge,{get kind(){return e.kind},get assets(){return l(pe)},get showUploader(){return l(A)},get searchTerms(){return l(x)},get basePath(){return l(ye)},get selectedAsset(){return l(m)},set selectedAsset(we){$(m,ie(we))}})};U(We,Ge=>{(l(b)==="uncategorized-assets"||l(A))&&Ge(ht)},!0)}T($e,Ve)};U(_e,$e=>{l(C)&&(l(b)==="collection-assets"||l(A))?$e(Ae):$e(Ce,!1)},!0)}T(ue,Ee)};U(te,ue=>{l(E)&&(l(b)==="entry-assets"||l(A))?ue(ce):ue(he,!1)})}var re=D(te,2);{var X=ue=>{Tr(ue,{children:(Ee,_e)=>{var Ae=L9(),Ce=M(Ae),$e=R(Ce),Ve=D(Ce,2);Pn(Ve,{flex:!0,oninput:()=>{$(m,ie(l(v).trim()?{url:l(v).trim()}:null))},get value(){return l(v)},set value(We){$(v,ie(We))}}),q(We=>Z($e,We),[()=>e.kind==="image"?i()("assets_dialog.enter_image_url"):i()("assets_dialog.enter_file_url")]),T(Ee,Ae)},$$slots:{default:!0}})};U(re,ue=>{h()&&l(b)==="enter-url"&&ue(X)})}var fe=D(re,2);ft(fe,17,()=>Object.entries(wf),([ue,Ee])=>ue,(ue,Ee)=>{let _e=()=>l(Ee)[0],Ae=()=>l(Ee)[1];var Ce=W(),$e=M(Ce);{var Ve=We=>{a1(We,{get kind(){return e.kind},get searchTerms(){return l(x)},get serviceProps(){return Ae()},gridId:"select-assets-grid",onSelect:ht=>{$(m,ie(ht))}})};U($e,We=>{l(b)===_e()&&We(Ve)})}T(ue,Ce)});var be=D(fe,2);ft(be,17,()=>Object.entries(mu),([ue,Ee])=>ue,(ue,Ee)=>{let _e=()=>l(Ee)[0],Ae=()=>l(Ee)[1];var Ce=W(),$e=M(Ce);{var Ve=We=>{a1(We,{get kind(){return e.kind},get searchTerms(){return l(x)},get serviceProps(){return Ae()},gridId:"select-assets-grid",onSelect:ht=>{$(m,ie(ht))}})};U($e,We=>{l(b)===_e()&&We(Ve)})}T(ue,Ce)}),q(()=>ke(Y,"id",`${l(g)??""}-content-pane`)),T(V,K)},$$slots:{headerExtra:!0,footerExtra:!0,default:!0}}),oe(),r()}var D9=F('<span role="none" class="preview no-thumbnail"><!></span>'),M9=F('<div role="textbox" tabindex="0" class="filename svelte-7plsvm"><!></div>'),F9=F('<div role="none" class="filled svelte-7plsvm"><!> <div role="none" class="svelte-7plsvm"><!> <div role="none"><!> <!></div></div></div>'),z9=F('<!> <div role="none"><!></div>',1),j9=F('<div class="empty svelte-7plsvm"><!></div>'),U9=F('<div role="none"> </div> <div role="none"><!></div>',1),B9=F("<!> <!> <!> <!>",1);const q9={hash:"svelte-7plsvm",code:".filled.svelte-7plsvm {display:flex !important;align-items:center;gap:16px;margin:var(--sui-focus-ring-width);}.filled.svelte-7plsvm .preview {flex:none;width:160px !important;height:160px !important;border-width:1px;border-color:var(--sui-control-border-color);border-radius:var(--sui-control-medium-border-radius);}.filled.svelte-7plsvm .preview.no-thumbnail {display:flex;align-items:center;justify-content:center;background-color:var(--sui-secondary-background-color);}.filled.svelte-7plsvm .preview.no-thumbnail .icon {font-size:64px;}.filled.svelte-7plsvm > div:where(.svelte-7plsvm) {flex:auto;overflow:hidden;}.filled.svelte-7plsvm > div:where(.svelte-7plsvm) .filename:where(.svelte-7plsvm) {margin:var(--sui-focus-ring-width);padding:4px;word-break:break-all;}.filled.svelte-7plsvm > div:where(.svelte-7plsvm) .filename:where(.svelte-7plsvm):empty {margin:0;padding:0;}.empty.svelte-7plsvm button {flex-direction:column;justify-content:center;height:160px;}.empty.svelte-7plsvm button .icon {color:var(--sui-secondary-foreground-color);font-size:48px;}.empty.svelte-7plsvm button:disabled {pointer-events:none !important;}.empty.svelte-7plsvm button:disabled * {opacity:0.5;}.empty.invalid.svelte-7plsvm button {border-color:var(--sui-error-border-color);}"};function f1(t,e){se(e,!1),Te(t,q9);const[n,r]=ve(),i=()=>z(rt,"$entryDraft",n),s=()=>z(le,"$_",n),o=de(),a=de(),c=de(),u=de(),d=de(),f=de();P(e,"locale",8),P(e,"keyPath",8);let h=P(e,"fieldId",8);P(e,"fieldLabel",8);let p=P(e,"fieldConfig",8),g=P(e,"currentValue",12),m=P(e,"readonly",8,!1),v=P(e,"required",8,!0),_=P(e,"invalid",8,!1),b=P(e,"inEditorComponent",8,!1),y=de(),x=de(),k,S=de(),C=de(),E,A=de(!1),O=de(!1),L=de(!1),I=de(""),N=de();const j=()=>{g(""),$(y,void 0),$(x,void 0),k=void 0,E=void 0,l(N)?.reset()},H=async X=>{j(),$(y,X.asset),$(x,X.file),k=X.url,E=X.credit,l(y)&&g(rg(l(y),{pathOnly:!0,allowSpecial:!0,entry:l(f)})),l(x)&&(l(u)&&l(c)!==void 0&&Number.isInteger(l(c))&&l(x).size>l(c)?$(O,!0):(g(URL.createObjectURL(l(x))),At(rt,Se(i).files[g()]=l(x),Se(i)))),k&&g(k),E&&($(I,fi.sanitize(E,{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href"]})),$(L,!0))},B=async()=>{g()?.startsWith("blob:")&&i()&&$(x,i().files[g()]),g()?g().startsWith("blob:")?($(y,void 0),$(S,g()?await XC(g()):void 0),$(C,g()&&l(S)?await uc(g(),l(f),{thumbnail:!0}):void 0)):l(u)&&/^https?:/.test(g())?($(y,void 0),$(S,"image"),$(C,g())):($(y,ty(g(),{entry:l(f),collection:l(d)})),$(S,void 0),$(C,void 0)):($(y,void 0),$(x,void 0),$(S,void 0),$(C,void 0))};Me(()=>(l(o),l(a),l(c),vt(p())),()=>{(X=>($(o,X.widget),$(a,it(X.choose_url,!0)),$(c,it(it(it(X.media_library,()=>({}),!0).config,()=>({}),!0).max_file_size,void 0))))(p())}),Me(()=>l(o),()=>{$(u,l(o)==="image")}),Me(()=>i(),()=>{$(d,i()?.collection)}),Me(()=>i(),()=>{$(f,i()?.originalEntry)}),Me(()=>vt(g()),()=>{g(),B()}),Hr(),Lr();var V=B9(),G=M(V);const K=Ye(()=>l(u)?"image/*":void 0);$t(Ud(G,{get disabled(){return m()},get accept(){return l(K)},onSelect:({files:X})=>{X.length&&H({file:X[0]})},children:(X,fe)=>{var be=W(),ue=M(be);{var Ee=Ae=>{var Ce=F9(),$e=R(Ce);{var Ve=qe=>{Ns(qe,{get kind(){return l(S)},get src(){return l(C)},variant:"tile",checkerboard:!0})},We=qe=>{var Xe=W(),ct=M(Xe);{var Ke=dt=>{Ns(dt,{get kind(){return l(y).kind},get asset(){return l(y)},variant:"tile",checkerboard:!0})},nt=dt=>{var ut=D9(),bt=R(ut);et(bt,{name:"draft"}),T(dt,ut)};U(ct,dt=>{l(y)?dt(Ke):dt(nt,!1)},!0)}T(qe,Xe)};U($e,qe=>{l(S)&&l(C)?qe(Ve):qe(We,!1)})}var ht=D($e,2),Ge=R(ht);{var pe=qe=>{var Xe=M9(),ct=R(Xe);{var Ke=dt=>{var ut=Ue();q(bt=>Z(ut,bt),[()=>decodeURI(l(x).name.normalize())],Ye),T(dt,ut)},nt=dt=>{var ut=W(),bt=M(ut);{var Ct=sn=>{var Rn=Ue();q(Xn=>Z(Rn,Xn),[()=>decodeURI(g())],Ye),T(sn,Rn)};U(bt,sn=>{g().startsWith("blob:")||sn(Ct)},!0)}T(dt,ut)};U(ct,dt=>{l(x)?dt(Ke):dt(nt,!1)})}q(()=>{ke(Xe,"id",`${h()??""}-value`),ke(Xe,"aria-readonly",m()),ke(Xe,"aria-invalid",_()),ke(Xe,"aria-required",v()),ke(Xe,"aria-labelledby",`${h()??""}-label`),ke(Xe,"aria-errormessage",`${h()??""}-error`)}),T(qe,Xe)};U(Ge,qe=>{typeof g()=="string"&&qe(pe)})}var ye=D(Ge,2),we=R(ye);const xe=Ye(()=>s()("replace")),Ne=Ye(()=>s()(`replace_${l(o)}`));Ze(we,{get disabled(){return m()},variant:"tertiary",get label(){return l(xe)},get"aria-label"(){return l(Ne)},get"aria-controls"(){return`${h()??""}-value`},onclick:()=>{$(A,!0)}});var me=D(we,2);{var Pe=qe=>{const Xe=Ye(()=>s()("remove")),ct=Ye(()=>s()(`remove_${l(o)}`));Ze(qe,{get disabled(){return m()},variant:"tertiary",get label(){return l(Xe)},get"aria-label"(){return l(ct)},get"aria-controls"(){return`${h()??""}-value`},onclick:()=>{j()}})};U(me,qe=>{b()||qe(Pe)})}T(Ae,Ce)},_e=Ae=>{var Ce=j9(),$e=R(Ce);Ze($e,{flex:!0,role:"button",variant:"tertiary",get disabled(){return m()},tabindex:"0",onclick:()=>{m()||$(A,!0)},children:(Ve,We)=>{var ht=z9(),Ge=M(ht);et(Ge,{name:"cloud_upload"});var pe=D(Ge,2),ye=R(pe);{var we=Ne=>{var me=Ue();q(Pe=>Z(me,Pe),[()=>s()(zh()?"drop_or_browse_image_file":"browse_file")],Ye),T(Ne,me)},xe=Ne=>{var me=Ue();q(Pe=>Z(me,Pe),[()=>s()(zh()?"drop_or_browse_file":"browse_file")],Ye),T(Ne,me)};U(ye,Ne=>{l(u)?Ne(we):Ne(xe,!1)})}T(Ve,ht)},$$slots:{default:!0}}),q(()=>pt(Ce,"invalid",_())),T(Ae,Ce)};U(ue,Ae=>{g()?Ae(Ee):Ae(_e,!1)})}T(X,be)},$$slots:{default:!0},$$legacy:!0}),X=>$(N,X),()=>l(N));var ee=D(G,2);const J=Ye(()=>l(u)?"image":void 0);R9(ee,{get kind(){return l(J)},get canEnterURL(){return l(a)},get entry(){return l(f)},onSelect:({asset:X})=>{H(X)},get open(){return l(A)},set open(X){$(A,X)},$$legacy:!0});var Y=D(ee,2);const te=Ye(()=>s()("assets_dialog.large_file.title"));Hk(Y,{get title(){return l(te)},get open(){return l(O)},set open(X){$(O,X)},children:(X,fe)=>{var be=Ue();q(ue=>Z(be,ue),[()=>s()("assets_dialog.large_file.description",{values:{size:K_(l(c))}})],Ye),T(X,be)},$$slots:{default:!0},$$legacy:!0});var ce=D(Y,2);const he=Ye(()=>s()("assets_dialog.photo_credit.title")),re=Ye(()=>s()("copy"));xc(ce,{get title(){return l(he)},get okLabel(){return l(re)},onOk:()=>{navigator.clipboard.writeText(l(I))},get open(){return l(L)},set open(X){$(L,X)},children:(X,fe)=>{var be=U9(),ue=M(be),Ee=R(ue),_e=D(ue,2),Ae=R(_e);Tp(Ae,{flex:!0,readonly:!0,get value(){return l(I)},onclick:Ce=>{Ce.target.focus(),Ce.target.select()}}),q(Ce=>Z(Ee,Ce),[()=>s()("assets_dialog.photo_credit.description")],Ye),T(X,be)},$$slots:{default:!0},$$legacy:!0}),T(t,V),oe(),r()}var H9=F("<p><!></p>"),V9=F("<p> </p>");function h1(t,e){se(e,!1);const[n,r]=ve(),i=()=>z(rt,"$entryDraft",n);P(e,"locale",8),P(e,"keyPath",8),P(e,"fieldConfig",8);let s=P(e,"currentValue",8),o=de(),a=de();const c=async()=>{$(o,s()?await XC(s()):void 0),$(a,s()&&l(o)?await uc(s(),i()?.originalEntry):void 0)};Me(()=>vt(s()),()=>{s(),c()}),Hr(),Lr();var u=W(),d=M(u);{var f=p=>{var g=H9(),m=R(g);const v=Ye(()=>["audio","video"].includes(l(o)));Ns(m,{get kind(){return l(o)},get src(){return l(a)},get controls(){return l(v)}}),T(p,g)},h=p=>{var g=W(),m=M(g);{var v=_=>{var b=V9(),y=R(b);q(()=>Z(y,s())),T(_,b)};U(m,_=>{typeof s()=="string"&&s().trim()&&!s().startsWith("blob:")&&_(v)},!0)}T(p,g)};U(d,p=>{l(o)&&l(a)?p(f):p(h,!1)})}T(t,u),oe(),r()}var W9=F('<div role="alert" class="validation svelte-1rv50nx" aria-live="polite"><div role="none" class="svelte-1rv50nx"><!> <!></div></div>');const G9={hash:"svelte-1rv50nx",code:".validation.svelte-1rv50nx {color:var(--sui-error-foreground-color) !important;font-size:var(--sui-font-size-small);}.validation.svelte-1rv50nx div:where(.svelte-1rv50nx) {display:flex;align-items:center;gap:4px;margin:4px 0;}.validation.svelte-1rv50nx div:where(.svelte-1rv50nx) .icon {flex:none;font-size:16px; /* !hardcoded */}"};function ZA(t,e){Te(t,G9);var n=W9(),r=R(n),i=R(r);et(i,{name:"error"});var s=D(i,2);Re(s,()=>e.children),q(()=>ke(n,"id",e.id)),T(t,n)}var K9=F('<th scope="col" class="action svelte-5r6rgh"></th>'),Y9=F('<td class="action svelte-5r6rgh"><!></td>'),J9=F('<tr><td class="key svelte-5r6rgh"><!></td><td class="value svelte-5r6rgh"><!></td><!></tr>'),Z9=F('<table class="svelte-5r6rgh"><thead><tr><th scope="col" class="key svelte-5r6rgh"> </th><th scope="col" class="value svelte-5r6rgh"> </th><!></tr></thead><tbody></tbody></table>'),X9=F("<!> <!>",1),Q9=F("<!> <!> <div><!></div>",1);const eV={hash:"svelte-5r6rgh",code:`table.svelte-5r6rgh {width:-moz-available;width:-webkit-fill-available;width:stretch;}th.svelte-5r6rgh,
587
- td.svelte-5r6rgh {border-width:0;}th.svelte-5r6rgh {padding-block:4px;color:var(--sui-tertiary-foreground-color);font-size:var(--sui-font-size-small);font-weight:var(--sui-font-weight-normal);text-align:left;}th.key.svelte-5r6rgh, th.value.svelte-5r6rgh {width:50%;}td.svelte-5r6rgh {padding:0;vertical-align:middle;}`};function tV(t,e){se(e,!1),Te(t,eV);const[n,r]=ve(),i=()=>z(le,"$_",n),s=()=>z(rt,"$entryDraft",n),o=de(),a=de(),c=de(),u=de();let d=P(e,"locale",8),f=P(e,"keyPath",8),h=P(e,"fieldId",8);P(e,"fieldLabel",8);let p=P(e,"fieldConfig",8);P(e,"currentValue",8);let g=P(e,"readonly",8,!1);P(e,"required",8,!0),P(e,"invalid",8,!1);let m=de([]);const v=de([]);let _=de([]),b=de([]);const y=()=>{if(!s())return;const V=fy({entryDraft:rt,keyPath:f(),locale:d()});zn(l(m),V)||($(m,V),$(_,V.map(()=>!1))),!l(m).length&&s().currentValues[d()][f()]!==null&&At(rt,Se(s).currentValues[d()][f()]=null,Se(s))},x=()=>{s()&&(Object.entries(s().currentValues).forEach(([B,V])=>{(B===d()||l(o)==="duplicate")&&delete V[f()]}),$(m,[...l(m),["",""]]),$(_,[...l(_),!1]),window.requestAnimationFrame(()=>{l(v)[l(m).length-1].querySelector("input").focus()}))},k=B=>{l(m).splice(B,1),$(m,[...l(m)]),l(_).splice(B,1),$(_,[...l(_)])},S=()=>{if($(b,k5({pairs:l(m),edited:l(_)})),!s()||l(b).some(Boolean)||l(m).some(([V])=>!V.trim()))return;S5({entryDraft:rt,fieldConfig:p(),keyPath:f(),locale:d(),pairs:l(m)})};Me(()=>(l(o),l(a),i(),l(c),l(u),vt(p())),()=>{(B=>($(o,it(B.i18n,!1)),$(a,it(B.key_label,()=>i()("key_value.key"),!0)),$(c,it(B.value_label,()=>i()("key_value.value"),!0)),$(u,it(B.max,1/0))))(p())}),Me(()=>(s(),vt(d())),()=>{s()?.currentValues[d()],y()}),Me(()=>l(m),()=>{l(m),S()}),Hr(),Lr();var C=Q9(),E=M(C);{var A=B=>{var V=Z9(),G=R(V),K=R(G),ee=R(K),J=R(ee),Y=D(ee),te=R(Y),ce=D(Y);{var he=X=>{var fe=K9();q(be=>ke(fe,"aria-label",be),[()=>i()("key_value.action")],Ye),T(X,fe)};U(ce,X=>{g()||X(he)})}var re=D(G);ft(re,5,()=>l(m),cr,(X,fe,be)=>{var ue=J9(),Ee=R(ue),_e=R(Ee);const Ae=Ye(()=>!!l(b)[be]),Ce=Ye(()=>l(b)[be]?`${h()}-kv-error`:void 0);Pn(_e,{get readonly(){return g()},flex:!0,get invalid(){return l(Ae)},get"aria-label"(){return l(a)},get"aria-errormessage"(){return l(Ce)},oninput:()=>{Hy(_,l(_)[be]=!0)},onkeydown:Ge=>{Ge.key==="Enter"&&!Ge.isComposing&&l(v)[be].querySelector("td.value input").focus()},get value(){return l(fe)[0]},set value(Ge){l(fe)[0]=Ge,Ky(()=>l(m))},$$legacy:!0});var $e=D(Ee),Ve=R($e);Pn(Ve,{get readonly(){return g()},flex:!0,get"aria-label"(){return l(c)},onkeydown:Ge=>{Ge.key==="Enter"&&!Ge.isComposing&&(be<l(m).length-1?l(v)[be+1].querySelector("input").focus():l(m).length<l(u)&&x())},get value(){return l(fe)[1]},set value(Ge){l(fe)[1]=Ge,Ky(()=>l(m))},$$legacy:!0});var We=D($e);{var ht=Ge=>{var pe=Y9(),ye=R(pe);const we=Ye(()=>i()("remove"));Ze(ye,{variant:"ghost",size:"small",iconic:!0,get"aria-label"(){return l(we)},onclick:()=>{k(be)},startIcon:Ne=>{et(Ne,{name:"close"})},$$slots:{startIcon:!0}}),T(Ge,pe)};U(We,Ge=>{g()||Ge(ht)})}$t(ue,(Ge,pe)=>Hy(v,l(v)[pe]=Ge),Ge=>l(v)?.[Ge],()=>[be]),T(X,ue)}),q(()=>{Z(J,l(a)),Z(te,l(c))}),T(B,V)};U(E,B=>{l(m).length&&B(A)})}var O=D(E,2);{var L=B=>{ZA(B,{get id(){return`${h()??""}-kv-error`},children:(V,G)=>{var K=X9(),ee=M(K);{var J=ce=>{var he=Ue();q(re=>Z(he,re),[()=>i()("key_value.empty_key")],Ye),T(ce,he)};U(ee,ce=>{l(b).includes("empty")&&ce(J)})}var Y=D(ee,2);{var te=ce=>{var he=Ue();q(re=>Z(he,re),[()=>i()("key_value.duplicate_key")],Ye),T(ce,he)};U(Y,ce=>{l(b).includes("duplicate")&&ce(te)})}T(V,K)}})};U(O,B=>{l(b).some(Boolean)&&B(L)})}var I=D(O,2),N=R(I);const j=Ye(()=>i()("add")),H=Ye(()=>g()||l(m).length>=l(u));Ze(N,{get label(){return l(j)},variant:"tertiary",get disabled(){return l(H)},onclick:()=>{x()}}),T(t,C),oe(),r()}var nV=F('<tr><td class="svelte-1ni5ht9"> </td><td class="svelte-1ni5ht9"> </td></tr>'),rV=F('<table class="svelte-1ni5ht9"><thead><tr><th scope="col" class="svelte-1ni5ht9"> </th><th scope="col" class="svelte-1ni5ht9"> </th></tr></thead><tbody></tbody></table>');const iV={hash:"svelte-1ni5ht9",code:'@charset "UTF-8";table.svelte-1ni5ht9 {width:-moz-available;width:-webkit-fill-available;width:stretch;}th.svelte-1ni5ht9 {padding-block:4px;width:50%;color:var(--sui-tertiary-foreground-color);background-color:var(--sui-tertiary-background-color);font-size:var(--sui-font-size-small);font-weight:var(--sui-font-weight-normal);text-align:left;}td.svelte-1ni5ht9:empty::after {content:" ";}'};function sV(t,e){se(e,!1),Te(t,iV);const[n,r]=ve(),i=()=>z(le,"$_",n),s=()=>z(rt,"$entryDraft",n),o=de(),a=de();let c=P(e,"locale",8),u=P(e,"keyPath",8),d=P(e,"fieldConfig",8);P(e,"currentValue",8);let f=de([]);const h=()=>{const _=fy({entryDraft:rt,keyPath:u(),locale:c()});zn(l(f),_)||$(f,_)};Me(()=>(l(o),i(),l(a),vt(d())),()=>{(v=>($(o,it(v.key_label,()=>i()("key_value.key"),!0)),$(a,it(v.value_label,()=>i()("key_value.value"),!0))))(d())}),Me(()=>(s(),vt(c())),()=>{s()&&(s().currentValues[c()],h())}),Hr(),Lr();var p=W(),g=M(p);{var m=v=>{var _=rV(),b=R(_),y=R(b),x=R(y),k=R(x),S=D(x),C=R(S),E=D(b);ft(E,5,()=>l(f),cr,(A,O)=>{let L=()=>l(O)[0],I=()=>l(O)[1];var N=nV(),j=R(N),H=R(j),B=D(j),V=R(B);q(()=>{Z(H,L()),Z(V,I())}),T(A,N)}),q(()=>{Z(k,l(o)),Z(C,l(a))}),T(v,_)};U(g,v=>{l(f).length&&v(m)})}T(t,p),oe(),r()}function Uv(t,e){se(e,!1);const[n,r]=ve(),i=()=>z(le,"$_",n),s=de(),o=de(),a=de(),c=de(),u=de(),d=de(),f=de(),h=de(),p=de();let g=P(e,"disabled",8,!1),m=P(e,"fieldConfig",8),v=P(e,"items",24,()=>[]),_=P(e,"addItem",8,S=>{});Me(()=>(l(s),l(o),l(a),l(c),vt(m())),()=>{(S=>($(s,S.widget),$(o,S.name),$(a,S.label),$(c,S.types)))(m())}),Me(()=>(l(s),vt(m())),()=>{$(u,l(s)==="list"?m():void 0)}),Me(()=>l(u),()=>{$(d,l(u)?.label_singular??"")}),Me(()=>l(u),()=>{$(f,l(u)?.max??void 0)}),Me(()=>(i(),l(d),l(a),l(o)),()=>{$(h,i()("add_x",{values:{name:l(d)||l(a)||l(o)}}))}),Me(()=>(vt(g()),l(f),vt(v())),()=>{$(p,g()||typeof l(f)=="number"&&v().length===l(f))}),Hr(),Lr();var b=W(),y=M(b);{var x=S=>{Nr(S,{variant:"tertiary",get label(){return l(h)},get disabled(){return l(p)},endIcon:A=>{et(A,{name:"add"})},popup:A=>{const O=Ye(()=>i()("select_list_type"));wr(A,{get"aria-label"(){return l(O)},children:(L,I)=>{var N=W(),j=M(N);ft(j,1,()=>l(c),({name:H,label:B})=>H,(H,B)=>{let V=()=>l(B).name,G=()=>l(B).label;const K=Ye(()=>G()||V());Nt(H,{get label(){return l(K)},onclick:()=>_()(V())})}),T(L,N)},$$slots:{default:!0}})},$$slots:{endIcon:!0,popup:!0}})},k=S=>{Ze(S,{variant:"tertiary",get label(){return l(h)},get disabled(){return l(p)},onclick:()=>_()(),startIcon:E=>{et(E,{name:"add"})},$$slots:{startIcon:!0}})};U(y,S=>{Array.isArray(l(c))?S(x):S(k,!1)})}T(t,b),oe(),r()}var oV=F('<span role="none" class="type svelte-drw5o5"> </span>'),aV=F('<div role="none" class="header svelte-drw5o5"><div role="none" class="svelte-drw5o5"><!></div> <div role="none" class="svelte-drw5o5"><!></div> <div role="none" class="svelte-drw5o5"><!></div></div>');const lV={hash:"svelte-drw5o5",code:".header.svelte-drw5o5 {display:flex;align-items:center;gap:8px;background-color:var(--sui-secondary-border-color);}.header.svelte-drw5o5 > div:where(.svelte-drw5o5) {display:flex;align-items:center;}.header.svelte-drw5o5 > div:where(.svelte-drw5o5):first-child {justify-content:flex-start;width:40%;}.header.svelte-drw5o5 > div:where(.svelte-drw5o5):nth-child(2) {width:20%;justify-content:center;}.header.svelte-drw5o5 > div:where(.svelte-drw5o5):last-child {width:40%;justify-content:flex-end;}.header.svelte-drw5o5 button {padding:0;height:16px;}.header.svelte-drw5o5 .type:where(.svelte-drw5o5) {font-size:var(--sui-font-size-small);font-weight:var(--sui-font-weight-bold);color:var(--sui-secondary-foreground-color);}"};function XA(t,e){se(e,!1),Te(t,lV);const[n,r]=ve(),i=()=>z(le,"$_",n);let s=P(e,"label",8,""),o=P(e,"controlId",8),a=P(e,"expanded",8),c=P(e,"toggleExpanded",8),u=P(e,"removeButtonVisible",8,!1),d=P(e,"removeButtonDisabled",8,!1),f=P(e,"remove",8),h=P(e,"children",8,void 0);Lr();var p=aV(),g=R(p),m=R(g);const v=Ye(()=>!c()),_=Ye(()=>a()?i()("collapse"):i()("expand"));Ze(m,{size:"small",get disabled(){return l(v)},get"aria-label"(){return l(_)},get"aria-expanded"(){return a()},get"aria-controls"(){return o()},onclick:()=>{c()?.()},startIcon:E=>{const A=Ye(()=>a()?"expand_more":"chevron_right");et(E,{get name(){return l(A)}})},children:(E,A)=>{var O=W(),L=M(O);{var I=N=>{var j=oV(),H=R(j);q(()=>Z(H,s())),T(N,j)};U(L,N=>{s()&&N(I)})}T(E,O)},$$slots:{startIcon:!0,default:!0}});var b=D(g,2),y=R(b);Re(y,()=>h()??Fe);var x=D(b,2),k=R(x);{var S=C=>{const E=Ye(()=>i()("remove_this_item"));Ze(C,{size:"small",iconic:!0,get disabled(){return d()},get"aria-label"(){return l(E)},onclick:()=>{f()()},startIcon:O=>{et(O,{name:"close"})},$$slots:{startIcon:!0}})};U(k,C=>{u()&&C(S)})}T(t,p),oe(),r()}var cV=F("<!> <!>",1),uV=F('<div role="none" class="toolbar top svelte-iirqfr"><!></div>'),dV=F("<!> <!> <!>",1),fV=F('<div role="none" class="summary svelte-iirqfr"> </div>'),hV=F('<div role="none" class="item svelte-iirqfr"><!> <div role="none" class="item-body"><!></div></div>'),pV=F('<div role="none" class="toolbar bottom svelte-iirqfr"><!> <!></div>'),gV=F('<div role="none" class="toolbar top svelte-iirqfr"><!> <div role="none" class="summary svelte-iirqfr"> </div> <!> <!></div> <!> <div role="none" class="item-list svelte-iirqfr"></div> <!>',1);const mV={hash:"svelte-iirqfr",code:".toolbar.svelte-iirqfr {display:flex;align-items:center;}.summary.svelte-iirqfr {overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}.item-list.collapsed.svelte-iirqfr {display:none;}.item.svelte-iirqfr {margin:16px 0;border-width:2px;border-color:var(--sui-secondary-border-color);border-radius:var(--sui-control-medium-border-radius);}.item.svelte-iirqfr .summary:where(.svelte-iirqfr) {padding:8px;}.item.svelte-iirqfr .summary:where(.svelte-iirqfr):empty {display:none;}"};function vV(t,e){se(e,!1),Te(t,mV);const[n,r]=ve(),i=()=>z(rt,"$entryDraft",n),s=()=>z(le,"$_",n),o=de(),a=de(),c=de(),u=de(),d=de(),f=de(),h=de(),p=de(),g=de(),m=de(),v=de(),_=de(),b=de(),y=de(),x=de(),k=de(),S=de(),C=de(),E=de(),A=de(),O=de(),L=de(),I=de(),N=de(),j=de(),H=de(),B=de(),V=de(),G=de(),K=de(),ee=de();let J=P(e,"locale",8),Y=P(e,"keyPath",8),te=P(e,"fieldId",8);P(e,"fieldLabel",8);let ce=P(e,"fieldConfig",8),he=P(e,"currentValue",8),re=P(e,"readonly",8,!1),X=P(e,"required",8,!0),fe=P(e,"invalid",8,!1),be=de(!1),ue=de(""),Ee=de("");cn(()=>{$(be,!0),$(ue,Gn("short")),Js({[l(V)]:!l(h),...Object.fromEntries(l(K).map((pe,ye)=>{const we=`${Y()}.${ye}`;return[we,l(N)?._[we]??!l(d)]}))})});const _e=()=>{const pe=he().join(", ");!/,\s*$/.test(l(Ee))&&l(Ee).trim()!==pe&&$(Ee,pe)},Ae=()=>{const pe=l(Ee).split(/,/g).map(ye=>ye.trim()).filter(ye=>ye!=="");Object.keys(i()?.currentValues??{}).forEach(ye=>{l(c)!=="duplicate"&&ye!==J()||(Object.keys(i()?.currentValues[ye]??{}).forEach(we=>{we.match(`^${ln(Y())}\\.\\d+$`)&&delete i()?.currentValues[ye][we]}),pe.forEach((we,xe)=>{At(rt,Se(i).currentValues[ye][`${Y()}.${xe}`]=we,Se(i))}))})},Ce=pe=>{Object.keys(i()?.currentValues??{}).forEach(ye=>{l(c)!=="duplicate"&&ye!==J()||HA(ye,Y(),pe)})},$e=pe=>{Ce(({valueList:ye,expanderStateList:we})=>{const xe=pe?l(_)?.find(({name:Pe})=>Pe===pe)?.fields??[]:l(m)??(l(g)?[l(g)]:[]),Ne=l(v)?0:ye.length,me=za(lg(xe,J()));pe&&(me[l(b)]=pe),ye.splice(Ne,0,l(y)&&l(g)?me[l(g).name]:me),we.splice(Ne,0,!0)})},Ve=pe=>{Ce(({valueList:ye,expanderStateList:we})=>{ye.splice(pe,1),we.splice(pe,1)})},We=pe=>{Ce(({valueList:ye,expanderStateList:we})=>{[ye[pe],ye[pe-1]]=[ye[pe-1],ye[pe]],[we[pe],we[pe-1]]=[we[pe-1],we[pe]]})},ht=pe=>{Ce(({valueList:ye,expanderStateList:we})=>{[ye[pe],ye[pe+1]]=[ye[pe+1],ye[pe]],[we[pe],we[pe+1]]=[we[pe+1],we[pe]]})},Ge=(pe,ye)=>u8({collectionName:l(A),fileName:l(L),keyPath:Y(),valueMap:l(B),locale:J(),summaryTemplate:ye,hasSingleSubField:l(y),index:pe});Me(()=>(l(o),l(a),l(c),l(u),l(d),l(f),l(h),l(p),l(g),l(m),l(v),l(_),l(b),vt(ce())),()=>{(pe=>($(o,pe.name),$(a,pe.label),$(c,pe.i18n),$(u,it(pe.allow_add,!0)),$(d,it(pe.collapsed,!1)),$(f,pe.summary),$(h,it(pe.minimize_collapsed,!1)),$(p,pe.label_singular),$(g,pe.field),$(m,pe.fields),$(v,it(pe.add_to_top,!1)),$(_,pe.types),$(b,it(pe.typeKey,"type"))))(ce())}),Me(()=>l(g),()=>{$(y,!!l(g))}),Me(()=>l(m),()=>{$(x,Array.isArray(l(m)))}),Me(()=>l(_),()=>{$(k,Array.isArray(l(_)))}),Me(()=>(l(y),l(x),l(k)),()=>{$(S,l(y)||l(x)||l(k))}),Me(()=>vt(Y()),()=>{$(C,new RegExp(`^${ln(Y())}\\.(\\d+)(.*)?`))}),Me(()=>i(),()=>{$(E,i()?.collection)}),Me(()=>i(),()=>{$(A,i()?.collectionName??"")}),Me(()=>i(),()=>{$(O,i()?.collectionFile)}),Me(()=>i(),()=>{$(L,i()?.fileName)}),Me(()=>i(),()=>{$(I,i()?.currentValues??{})}),Me(()=>i(),()=>{$(N,i()?.expanderStates)}),Me(()=>(l(j),l(O),l(E),Ri),()=>{(pe=>$(j,pe.defaultLocale))((l(O)??l(E))?._i18n??Ri)}),Me(()=>(vt(J()),l(j),l(c)),()=>{$(H,J()!==l(j)&&l(c)==="duplicate")}),Me(()=>(l(I),vt(J())),()=>{$(B,l(I)[J()])}),Me(()=>vt(Y()),()=>{$(V,`${Y()}#`)}),Me(()=>(l(N),l(V)),()=>{$(G,l(N)?._[l(V)]??!0)}),Me(()=>(l(B),l(C),vt(Y()),l(o)),()=>{$(K,za(Object.fromEntries(Object.entries(l(B)).filter(([pe])=>l(C).test(pe)).map(([pe,ye])=>[pe.replace(new RegExp(`^${ln(Y())}`),l(o)),ye])))[l(o)]??[])}),Me(()=>(l(K),vt(Y()),l(N)),()=>{$(ee,l(K).map((pe,ye)=>{const we=`${Y()}.${ye}`;return[we,l(N)?._[we]??!0]}))}),Me(()=>(l(be),l(S),vt(he())),()=>{l(be)&&!l(S)&&(he(),_e())}),Hr(),Lr(),_r(t,{get"aria-labelledby"(){return`list-${l(ue)??""}-summary`},children:(pe,ye)=>{var we=W(),xe=M(we);{var Ne=Pe=>{var qe=gV(),Xe=M(qe),ct=R(Xe);const Ke=Ye(()=>!l(K).length),nt=Ye(()=>l(G)?s()("collapse"):s()("expand"));Ze(ct,{iconic:!0,get disabled(){return l(Ke)},get"aria-label"(){return l(nt)},get"aria-expanded"(){return l(G)},get"aria-controls"(){return`list-${l(ue)??""}-item-list`},onclick:()=>{Js({[l(V)]:!l(G)})},startIcon:yn=>{const Gt=Ye(()=>l(G)?"expand_more":"chevron_right");et(yn,{get name(){return l(Gt)}})},$$slots:{startIcon:!0}});var dt=D(ct,2),ut=R(dt),bt=D(dt,2);Xr(bt,{flex:!0});var Ct=D(bt,2);{var sn=Lt=>{var yn=cV(),Gt=M(yn);const yt=Ye(()=>s()("expand_all")),Xt=Ye(()=>l(ee).every(([,Yt])=>Yt));Ze(Gt,{variant:"tertiary",size:"small",get label(){return l(yt)},get disabled(){return l(Xt)},onclick:()=>{Js(Object.fromEntries(l(ee).map(([Yt])=>[Yt,!0])))}});var $n=D(Gt,2);const wn=Ye(()=>s()("collapse_all")),qt=Ye(()=>l(ee).every(([,Yt])=>!Yt));Ze($n,{variant:"tertiary",size:"small",get label(){return l(wn)},get disabled(){return l(qt)},onclick:()=>{Js(Object.fromEntries(l(ee).map(([Yt])=>[Yt,!1])))}}),T(Lt,yn)};U(Ct,Lt=>{l(G)&&l(K).length>1&&Lt(sn)})}var Rn=D(Xe,2);{var Xn=Lt=>{var yn=uV(),Gt=R(yn);Uv(Gt,{get disabled(){return l(H)},get fieldConfig(){return ce()},get items(){return l(K)},addItem:$e}),T(Lt,yn)};U(Rn,Lt=>{l(u)&&(l(v)||!l(K).length)&&Lt(Xn)})}var kr=D(Rn,2);ft(kr,5,()=>l(K),cr,(Lt,yn,Gt)=>{var yt=hV();const Xt=Ye(()=>`${Y()}.${Gt}`),$n=Ye(()=>l(N)?._[l(Xt)]??!0),wn=Ye(()=>l(k)?l(_)?.find(({name:Bn})=>Bn===l(yn)[l(b)]):void 0),qt=Ye(()=>l(k)?l(wn)?.fields??[]:l(m)??(l(g)?[l(g)]:[])),Yt=Ye(()=>l(k)&&l(wn)?.summary||l(f));var fn=R(yt);const Dn=Ye(()=>l(k)?l(wn)?.label||l(wn)?.name:""),Qn=Ye(()=>l(qt).length?()=>Js({[l(Xt)]:!l($n)}):void 0);XA(fn,{get label(){return l(Dn)},get controlId(){return`list-${l(ue)??""}-item-${Gt??""}-body`},get expanded(){return l($n)},get toggleExpanded(){return l(Qn)},removeButtonVisible:!0,get removeButtonDisabled(){return l(H)},remove:()=>{Ve(Gt)},children:(Bn,zt)=>{var oi=dV(),Ht=M(oi);const Qt=Ye(()=>l(H)||Gt===0),Qe=Ye(()=>s()("move_up"));Ze(Ht,{size:"small",iconic:!0,get disabled(){return l(Qt)},get"aria-label"(){return l(Qe)},onclick:()=>{We(Gt)},startIcon:qn=>{et(qn,{name:"arrow_upward"})},$$slots:{startIcon:!0}});var xt=D(Ht,2);Xr(xt,{});var xn=D(xt,2);const tr=Ye(()=>l(H)||Gt===l(K).length-1),js=Ye(()=>s()("move_down"));Ze(xn,{iconic:!0,size:"small",get disabled(){return l(tr)},get"aria-label"(){return l(js)},onclick:()=>{ht(Gt)},startIcon:qn=>{et(qn,{name:"arrow_downward"})},$$slots:{startIcon:!0}}),T(Bn,oi)},$$slots:{default:!0}});var er=D(fn,2),si=R(er);{var cs=Bn=>{var zt=W(),oi=M(zt);ft(oi,1,()=>l(qt),Ht=>Ht.name,(Ht,Qt)=>{var Qe=W(),xt=M(Qe);yr(xt,()=>vn(0),null,xn=>{const tr=Ye(()=>l(y)?`${Y()}.${Gt}`:`${Y()}.${Gt}.${l(Qt).name}`);ky(xn,{get keyPath(){return l(tr)},get locale(){return J()},get fieldConfig(){return l(Qt)}})}),T(Ht,Qe)}),T(Bn,zt)},fr=Bn=>{var zt=fV(),oi=R(zt);q(Ht=>Z(oi,Ht),[()=>Ge(Gt,l(Yt))],Ye),T(Bn,zt)};U(si,Bn=>{l($n)?Bn(cs):Bn(fr,!1)})}q(()=>ke(er,"id",`list-${l(ue)??""}-item-${Gt??""}-body`)),T(Lt,yt)});var zi=D(kr,2);{var mi=Lt=>{var yn=pV(),Gt=R(yn);Uv(Gt,{get disabled(){return l(H)},get fieldConfig(){return ce()},get items(){return l(K)},addItem:$e});var yt=D(Gt,2);Xr(yt,{flex:!0}),T(Lt,yn)};U(zi,Lt=>{l(u)&&!l(v)&&l(K).length&&Lt(mi)})}q(()=>{ke(dt,"id",`object-${l(ue)??""}-summary`),Z(ut,`${l(K).length??""}
588
- ${((l(K).length===1?l(p):void 0)||l(a)||l(o))??""}`),ke(kr,"id",`list-${l(ue)??""}-item-list`),pt(kr,"collapsed",!l(G))}),T(Pe,qe)},me=Pe=>{Pn(Pe,{flex:!0,get readonly(){return re()},get required(){return X()},get invalid(){return fe()},get"aria-errormessage"(){return`${te()??""}-error`},oninput:()=>{Ae()},get value(){return l(Ee)},set value(qe){$(Ee,qe)},$$legacy:!0})};U(xe,Pe=>{l(S)?Pe(Ne):Pe(me,!1)})}T(pe,we)},$$slots:{default:!0}}),oe(),r()}var bV=(t,e)=>{t.key==="Enter"&&(t.stopPropagation(),e())},_V=(t,e)=>{t.stopPropagation(),e()},yV=F('<section role="group" tabindex="0" class="svelte-11ls1m1"><h4 class="svelte-11ls1m1"> </h4> <!></section>');const wV={hash:"svelte-11ls1m1",code:"section.svelte-11ls1m1 {overflow:hidden;margin:8px 0;padding:8px 0;}section.svelte-11ls1m1 > * {margin-right:auto;margin-left:auto;max-width:768px;}section.svelte-11ls1m1 h4:where(.svelte-11ls1m1) {color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-small);}section.svelte-11ls1m1 h4:where(.svelte-11ls1m1):not(:last-child) {margin-bottom:8px;}section.svelte-11ls1m1 p {margin:8px auto 0;-webkit-user-select:text;user-select:text;}section.svelte-11ls1m1 img {max-height:800px !important;}"};function wy(t,e){se(e,!0),Te(t,wV);const[n,r]=ve(),i=()=>z(rt,"$entryDraft",n),s=w(()=>e.fieldConfig.name),o=w(()=>it(e.fieldConfig.label,"")),a=w(()=>it(e.fieldConfig.widget,"string")),c=w(()=>it(e.fieldConfig.preview,!0)),u=w(()=>it(e.fieldConfig.i18n,!1)),d=w(()=>["relation","select"].includes(l(a))),f=w(()=>l(d)?e.fieldConfig.multiple:void 0),h=w(()=>l(a)==="list"||l(d)&&l(f)),p=w(()=>i()?.collection),g=w(()=>i()?.collectionName??""),m=w(()=>i()?.collectionFile),v=w(()=>i()?.fileName),_=w(()=>Zr(i()?.currentValues[e.locale]??{})),b=w(()=>(l(m)??l(p))?._i18n??Ri),y=w(()=>l(b).i18nEnabled),x=w(()=>l(b).defaultLocale),k=w(()=>l(y)&&(l(u)===!0||l(u)==="translate")),S=w(()=>l(y)&&l(u)==="duplicate"),C=w(()=>new RegExp(`^${ln(e.keyPath)}\\.\\d+$`)),E=w(()=>l(h)?Object.entries(l(_)).filter(([N])=>l(C).test(N)).map(([,N])=>N).filter(N=>N!==void 0):l(_)[e.keyPath]),A=()=>{Js(Object.fromEntries(vA({collectionName:l(g),fileName:l(v),valueMap:l(_),keyPath:e.keyPath}).map(N=>[N,!0]))),window.requestAnimationFrame(()=>{const N=document.querySelector(`.content-editor .pane[data-mode="edit"] .field[data-key-path="${CSS.escape(e.keyPath)}"]`);N&&(typeof N.scrollIntoViewIfNeeded=="function"?N.scrollIntoViewIfNeeded():N.scrollIntoView(),N.classList.add("highlight"),window.setTimeout(()=>{N.classList.remove("highlight")},1500))})};var O=W(),L=M(O);{var I=N=>{var j=yV();j.__keydown=[bV,A],j.__click=[_V,A];var H=R(j),B=R(H),V=D(H,2);{var G=K=>{var ee=W();const J=w(()=>v1[l(a)]);var Y=M(ee);Ci(Y,()=>l(J),(te,ce)=>{ce(te,{get keyPath(){return e.keyPath},get locale(){return e.locale},get fieldConfig(){return e.fieldConfig},get currentValue(){return l(E)}})}),T(K,ee)};U(V,K=>{l(a)in v1&&K(G)})}q(()=>{ke(j,"data-widget",l(a)),ke(j,"data-key-path",e.keyPath),Z(B,l(o)||l(s))}),T(N,j)};U(L,N=>{l(a)!=="hidden"&&l(c)&&(e.locale===l(x)||l(k)||l(S))&&N(I)})}T(t,O),oe(),r()}Va(["keydown","click"]);var xV=F('<div role="none" class="header svelte-1bztb9y"> </div>'),kV=F('<div role="group" class="subsection svelte-1bztb9y"><!> <div class="items svelte-1bztb9y"><!></div></div>');const SV={hash:"svelte-1bztb9y",code:".subsection.svelte-1bztb9y {margin:16px auto;border:2px solid var(--sui-secondary-border-color);border-radius:var(--sui-control-medium-border-radius);}.subsection.svelte-1bztb9y .title {font-size:inherit;font-weight:var(--sui-font-weight-normal);}.header.svelte-1bztb9y {display:flex;align-items:center;height:24px;padding-inline:8px;color:var(--sui-secondary-foreground-color);background-color:var(--sui-secondary-border-color);font-size:var(--sui-font-size-small);font-weight:var(--sui-font-weight-bold);}.items.svelte-1bztb9y {padding:8px 16px;}.items.svelte-1bztb9y:empty {display:none;}"};function QA(t,e){se(e,!0),Te(t,SV);const r=`${dr("section")}-header`;let i=ae(void 0);var s=kV(),o=R(s);{var a=d=>{var f=xV();ke(f,"id",r);var h=R(f);q(()=>Z(h,e.label)),T(d,f)};U(o,d=>{e.label&&d(a)})}var c=D(o,2),u=R(c);yr(u,()=>Ru(l(i)),null,d=>{var f=W(),h=M(f);Re(h,()=>e.children??Fe),T(d,f)}),$t(s,d=>$(i,d),()=>l(i)),q(()=>ke(s,"aria-labelledby",e.label?r:void 0)),T(t,s),oe()}var EV=F('<p dir="auto"> </p>');function TV(t,e){se(e,!1);const[n,r]=ve(),i=()=>z(rt,"$entryDraft",n),s=de(),o=de(),a=de(),c=de(),u=de(),d=de(),f=de(),h=de(),p=de();let g=P(e,"locale",8),m=P(e,"keyPath",8),v=P(e,"fieldConfig",8),_=P(e,"currentValue",8);Me(()=>(l(s),l(o),l(a),l(c),l(u),vt(v())),()=>{(S=>($(s,S.name),$(o,S.field),$(a,S.fields),$(c,S.types),$(u,it(S.typeKey,"type"))))(v())}),Me(()=>(l(o),l(a),l(c)),()=>{$(d,!!(l(o)??l(a)??l(c)))}),Me(()=>vt(m()),()=>{$(f,new RegExp(`^${ln(m())}\\.\\d+`))}),Me(()=>vt(g()),()=>{$(h,oc(g()))}),Me(()=>(i(),vt(g()),l(f),vt(m()),l(s)),()=>{$(p,za(Object.fromEntries(Object.entries(i()?.currentValues[g()]??{}).filter(([S])=>l(f).test(S)).map(([S,C])=>[S.replace(new RegExp(`^${ln(m())}`),l(s)),C])))[l(s)]??[])}),Hr(),Lr();var b=W(),y=M(b);{var x=S=>{var C=W(),E=M(C);ft(E,1,()=>l(p),cr,(A,O,L)=>{const I=Ye(()=>Array.isArray(l(c))?i()?.currentValues[g()][`${m()}.${L}.${l(u)}`]:void 0),N=Ye(()=>l(c)?.find(({name:B})=>B===l(I))),j=Ye(()=>l(N)?l(N).label||l(N).name:void 0),H=Ye(()=>l(I)?l(N)?.fields??[]:l(a)??(l(o)?[l(o)]:[]));QA(A,{get label(){return l(j)},children:(B,V)=>{var G=W(),K=M(G);ft(K,1,()=>l(H),ee=>ee.name,(ee,J)=>{var Y=W(),te=M(Y);yr(te,()=>vn(0),null,ce=>{const he=Ye(()=>l(o)?`${m()}.${L}`:`${m()}.${L}.${l(J).name}`);wy(ce,{get keyPath(){return l(he)},get locale(){return g()},get fieldConfig(){return l(J)}})}),T(ee,Y)}),T(B,G)},$$slots:{default:!0}})}),T(S,C)},k=S=>{var C=W(),E=M(C);{var A=O=>{var L=EV(),I=R(L);q(N=>{ke(L,"lang",g()),Z(I,N),L.dir=L.dir},[()=>l(h).format(_())],Ye),T(O,L)};U(E,O=>{Array.isArray(_())&&_().length&&O(A)},!0)}T(S,C)};U(y,S=>{l(d)?S(x):S(k,!1)})}T(t,b),oe(),r()}var CV=(t,e,n)=>{!t.target.matches("button, input, textarea")&&t.key!=="Tab"&&t.preventDefault(),t.target===l(e)&&t.key==="Backspace"&&n()(new CustomEvent("remove"))},AV=F('<section role="group" class="field svelte-z6qmsu"><header role="none"><h4 role="none" class="svelte-z6qmsu"> </h4></header> <div role="none" class="widget-wrapper"><!></div></section>'),PV=F('<div role="group" class="wrapper svelte-z6qmsu" contenteditable="false" tabindex="0"><header role="none" class="svelte-z6qmsu"><h3 role="none" class="svelte-z6qmsu"> </h3> <!></header> <!></div>');const OV={hash:"svelte-z6qmsu",code:".wrapper.svelte-z6qmsu {display:inline-block;border:1px solid var(--sui-secondary-border-color);border-radius:4px;width:100%;color:var(--sui-secondary-foreground-color);background-color:var(--sui-primary-background-color);white-space:normal;-webkit-user-select:none;user-select:none;}.wrapper.svelte-z6qmsu:focus {outline-color:var(--sui-primary-accent-color-translucent);}.wrapper.svelte-z6qmsu > header:where(.svelte-z6qmsu) {display:flex;align-items:center;justify-content:space-between;color:var(--sui-secondary-foreground-color);background-color:var(--sui-selected-background-color);}.wrapper.svelte-z6qmsu > header:where(.svelte-z6qmsu) h3:where(.svelte-z6qmsu) {padding:0 8px;font-size:var(--sui-font-size-small);font-weight:600;}.wrapper.svelte-z6qmsu > header:where(.svelte-z6qmsu) button {padding:0;height:16px;}section.svelte-z6qmsu {margin:0;border-top:1px solid var(--sui-secondary-border-color);padding:16px;}section.svelte-z6qmsu h4:where(.svelte-z6qmsu) {margin-bottom:8px;font-size:var(--sui-font-size-small);font-weight:600;color:var(--sui-secondary-foreground-color);}"};function $V(t,e){se(e,!0),Te(t,OV);const[n,r]=ve(),i=()=>z(le,"$_",n);let s=P(e,"values",19,()=>({})),o=P(e,"onChange",3,()=>{}),a=ae(void 0),c=ae(""),u=ae("");const d=ie({}),f=["image","string"],h=()=>l(a);cn(()=>{window.requestAnimationFrame(()=>{$(c,ie(l(a)?.closest("[data-locale]")?.dataset.locale)),$(u,ie(l(a)?.closest("[data-key-path]")?.dataset.keyPath))})}),Be(()=>{s(),Se(()=>{zn(s(),Zr(d))||Object.assign(d,s())})}),Be(()=>{const S=Zr(d);Se(()=>{zn(s(),S)||o()(new CustomEvent("update",{detail:S}))})});var p=PV();p.__keydown=[CV,a,o];var g=R(p),m=R(g),v=R(m),_=D(m,2);const b=w(()=>i()("remove"));Ze(_,{size:"small",iconic:!0,get"aria-label"(){return l(b)},onclick:()=>{o()(new CustomEvent("remove"))},startIcon:C=>{et(C,{name:"close"})},$$slots:{startIcon:!0}});var y=D(g,2);{var x=S=>{var C=W(),E=M(C);ft(E,17,()=>e.fields,({name:A,label:O,widget:L})=>A,(A,O)=>{let L=()=>l(O).name,I=()=>l(O).label,N=()=>l(O).widget;var j=W(),H=M(j);{var B=V=>{var G=AV();const K=w(()=>qf[N()]);var ee=R(G),J=R(ee),Y=R(J),te=D(ee,2),ce=R(te);const he=w(()=>dr("field")),re=w(()=>I()??L()),X=w(()=>({name:L(),widget:N()}));Ci(ce,()=>l(K),(fe,be)=>{be(fe,{get locale(){return l(c)},get keyPath(){return`${l(u)??""}:${L()??""}`},get fieldId(){return l(he)},get fieldLabel(){return l(re)},get fieldConfig(){return l(X)},inEditorComponent:!0,get currentValue(){return d[L()]},set currentValue(ue){d[L()]=ue}})}),q(fe=>{ke(G,"aria-label",fe),ke(G,"data-widget",N()),ke(G,"data-key-path",`${l(u)??""}:${L()??""}`),Z(Y,I())},[()=>i()("x_field",{values:{field:I()}})]),wi("keydown",G,fe=>{fe.stopPropagation()},!0),T(V,G)};U(H,V=>{N()&&f.includes(N())&&V(B)})}T(A,j)}),T(S,C)};U(y,S=>{l(c)&&l(u)&&S(x)})}$t(p,S=>$(a,S),()=>l(a)),q(()=>{ke(p,"aria-label",e.label),Z(v,e.label)}),T(t,p);var k=oe({getElement:h});return r(),k}Va(["keydown"]);const p1=t=>Object.fromEntries(Object.entries(t).map(([e,n])=>[e,typeof n=="string"?n.trim().replace(/["()[[\]]/g,"\\$&"):""])),LV=t=>({image:{id:"image",icon:"image",label:ne(le)("editor_components.image"),fields:[{name:"src",label:ne(le)("editor_components.src"),widget:"image"},{name:"alt",label:ne(le)("editor_components.alt"),widget:"string"},{name:"title",label:ne(le)("editor_components.title"),widget:"string"},{name:"link",label:ne(le)("editor_components.link"),widget:"string"}],pattern:/\[?!\[(?<alt>.*?)\]\((?<src>.*?)(?: "(?<title>.*?)")?\)(?:\]\((?<link>.*?)\))?/,toBlock:n=>{const{src:r,alt:i,title:s,link:o}=p1(n);if(!r)return"";const a=`![${i}](${r}${s?` "${s}"`:""})`;return o?`[${a}](${o})`:a},toPreview:n=>{const{src:r,alt:i,title:s,link:o}=p1(n),a=`<img src="${r}" alt="${i}" title="${s}">`;return o?`<a href="${o}">${a}</a>`:a}}})[t],NV=({id:t,label:e,fields:n,pattern:r,fromBlock:i,toBlock:s,toPreview:o})=>{const a=o({}).match(/\w+/)?.[0]??t;class c extends IS{__props;constructor(p,g){super(g),this.__props=p}static getType(){return t}isInline(){return!0}static clone(p){return new c(p.__props,p.__key)}static importJSON(p){return u().updateFromJSON(p)}exportJSON(){return{...this.__props,type:t,version:1}}createDOM(){let p,g=null;const m=async({type:_,detail:b})=>{await $l(),g??=Pb(p),g?.update(()=>{_==="update"&&(this.getWritable().__props=b),_==="remove"&&this.remove()})},v=Qv($V,{target:document.createElement("div"),props:{label:e,fields:n,values:this.__props,onChange:m}});return LP(),p=v.getElement(),window.requestAnimationFrame(()=>{p.focus()}),p}exportDOM(){return{element:this.createDOM()}}static importDOM(){const p={[a]:()=>({conversion:g=>({node:u(Object.fromEntries(n.map(({name:m})=>[m,g[m]??""])))}),priority:3})};return t==="image"&&Object.assign(p,{a:g=>{if(g.firstChild?.nodeName.toLowerCase()==="img"){const{href:m}=g,{src:v,alt:_,title:b}=g.firstChild;return{conversion:()=>({node:u({src:v,alt:_,title:b,link:m}),after:()=>[]}),priority:4}}return null}}),p}updateDOM(){return!1}decorate(){return null}}const u=h=>new c(h??Object.fromEntries(n.map(({name:p})=>[p,""]))),d=h=>h instanceof c&&h.getType()===t;return{node:c,createNode:u,transformer:{dependencies:[c],export:h=>d(h)?s(h.__props):null,importRegExp:r,regExp:r,replace:(h,p)=>{const g=p,m=i?.(g)??g.groups??{};h.replace(u(m))},type:"text-match"}}},g1=new Map;class IV{constructor(e){const{id:n}=e,r=g1.get(n),i=r??NV(e);r||g1.set(n,i),Object.assign(this,{...e,...i})}}var RV=F('<div role="none" class="wrapper svelte-1e9a0b3"><!></div>');const DV={hash:"svelte-1e9a0b3",code:`.wrapper.svelte-1e9a0b3 {display:contents;}.wrapper.minimal.svelte-1e9a0b3 [role="textbox"],
586
+ ${L??""}`)},[()=>l(h).name.normalize(),()=>i()?K_(l(h).size):"",()=>s()(`file_type_labels.${l(p).extension}`,{default:l(p).extension.toUpperCase()})]),T(c,f)}),T(t,a),oe(),r()}var EH=({target:t},e)=>{const n=[...t.files];e()?.({files:n,file:n[0]})},TH=F('<input type="file" hidden>');function DA(t,e){se(e,!0);let n=P(e,"accept",3,void 0),r=P(e,"multiple",3,!1),i=P(e,"onSelect",3,void 0),s=ae(void 0);const o=()=>{l(s)?.click()};var a=TH();return a.__change=[EH,i],$t(a,c=>$(s,c),()=>l(s)),q(()=>{ke(a,"accept",n()),a.multiple=r()}),wi("cancel",a,c=>{c.stopPropagation()}),T(t,a),oe({open:o})}Va(["change"]);var CH=F('<div role="alert"> </div>'),AH=F('<div role="none"> </div> <div role="none"><!></div> <!>',1),PH=F('<div role="none" class="content svelte-osk4b"><!> <!></div>'),OH=F('<div role="none" class="drop-indicator svelte-osk4b"><div role="none" class="svelte-osk4b"><!> <span role="none"> </span></div></div>'),$H=F('<div role="none" class="drop-target svelte-osk4b"><!> <!></div> <!>',1);const LH={hash:"svelte-osk4b",code:".drop-target.svelte-osk4b {display:flex;flex-direction:column;position:relative;overflow:hidden;height:100%;pointer-events:auto;}.drop-target.svelte-osk4b > .group {overflow-y:auto;padding:16px;width:100%;height:100%;}.drop-target.svelte-osk4b > :where(.svelte-osk4b) {pointer-events:none;}.drop-target.svelte-osk4b button {pointer-events:auto;}.drop-indicator.svelte-osk4b {position:absolute;inset:0;z-index:10;border-radius:var(--sui-control-large-border-radius);background-color:hsl(var(--sui-background-color-4-hsl)/80%);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);text-align:center;pointer-events:none;}.drop-indicator.svelte-osk4b div:where(.svelte-osk4b) {position:absolute;inset:0;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:4px;border:4px dashed var(--sui-primary-accent-color);border-radius:var(--sui-control-large-border-radius);font-size:var(--sui-font-size-x-large);}.drop-indicator.svelte-osk4b div:where(.svelte-osk4b) .icon {color:var(--sui-secondary-foreground-color);font-size:48px;}.content.svelte-osk4b {display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;overflow:auto;height:100%;min-height:320px;text-align:center;}"};function Ud(t,e){se(e,!0),Te(t,LH);const[n,r]=ve(),i=()=>z(le,"$_",n);let s=P(e,"accept",3,void 0),o=P(e,"disabled",3,!1),a=P(e,"multiple",3,!1),c=P(e,"showUploadButton",3,!1),u=P(e,"showFilePreview",3,!1),d=P(e,"onSelect",3,void 0),f=P(e,"children",3,void 0),h=ae(!1),p=ae(!1),g=ae(void 0),m=ae(ie([]));const v=()=>{l(g)?.open()},_=()=>{$(m,ie([])),d()?.({files:l(m)})},b=I=>{$(m,ie(a()?I:I.slice(0,1))),d()?.({files:l(m)})};var y=$H(),x=M(y),k=R(x);{var S=I=>{var N=PH(),j=R(N);{var H=G=>{var K=AH(),ee=M(K),J=R(ee),Y=D(ee,2),te=R(Y);const ce=w(()=>i()(a()?"choose_files":"choose_file"));Ze(te,{variant:"primary",get label(){return l(ce)},get disabled(){return o()},onclick:()=>{v()},startIcon:fe=>{et(fe,{name:"cloud_upload"})},$$slots:{startIcon:!0}});var he=D(Y,2);{var re=X=>{var fe=CH(),be=R(fe);q(ue=>Z(be,ue),[()=>i()("drop_files_type_mismatch",{values:{type:s()}})]),T(X,fe)};U(he,X=>{l(p)&&X(re)})}q(X=>Z(J,X),[()=>i()(a()?"drop_or_browse_files":"drop_or_browse_file")]),T(G,K)};U(j,G=>{c()&&G(H)})}var B=D(j,2);{var V=G=>{RA(G,{get files(){return l(m)},set files(K){$(m,ie(K))}})};U(B,G=>{u()&&l(m).length&&G(V)})}T(I,N)},C=I=>{var N=W(),j=M(N);Re(j,()=>f()??Fe),T(I,N)};U(k,I=>{c()||u()&&l(m).length?I(S):I(C,!1)})}var E=D(k,2);{var A=I=>{var N=OH(),j=R(N),H=R(j);et(H,{name:"download"});var B=D(H,2),V=R(B);q(G=>Z(V,G),[()=>i()(a()?"drop_files_here":"drop_file_here")]),T(I,N)};U(E,I=>{l(h)&&I(A)})}var O=D(x,2);$t(DA(O,{get accept(){return s()},get multiple(){return a()},onSelect:({files:I})=>{b(I)}}),I=>$(g,ie(I)),()=>l(g)),wi("dragover",x,I=>{I.preventDefault(),!(o()||!I.dataTransfer)&&(I.dataTransfer.dropEffect="copy",$(h,!0),$(p,!1))}),wi("dragleave",x,I=>{I.preventDefault(),!o()&&$(h,!1)}),wi("dragend",x,I=>{I.preventDefault(),!o()&&$(h,!1)}),wi("drop",x,async I=>{if(I.preventDefault(),o()||!I.dataTransfer)return;$(h,!1);const N=await BP(I.dataTransfer,{accept:s()});N.length?b(N):$(p,!0)}),T(t,y);var L=oe({openFilePicker:v,reset:_});return r(),L}var NH=F('<div role="none" class="spinner svelte-v6s0f"></div>'),IH=F("<!> <!>",1);const RH={hash:"svelte-v6s0f",code:".spinner.svelte-v6s0f {height:1px;}"};function Ua(t,e){se(e,!0),Te(t,RH);let n=P(e,"itemChunkSize",3,25),r=ae(ie(n())),i=ae(void 0);const s=w(()=>e.items.length>l(r)),o=new IntersectionObserver(([{isIntersecting:f}])=>{f&&(l(s)?$(r,l(r)+n()):o.disconnect())});Be(()=>{l(i)&&o.observe(l(i))});var a=IH(),c=M(a);ft(c,17,()=>e.items.slice(0,l(r)),f=>f[e.itemKey],(f,h)=>{var p=W(),g=M(p);Re(g,()=>e.renderItem,()=>l(h)),T(f,p)});var u=D(c,2);{var d=f=>{var h=NH();$t(h,p=>$(i,p),()=>l(i)),T(f,h)};U(u,f=>{l(s)&&f(d)})}T(t,a),oe()}var DH=F('<div role="none" class="list-container svelte-1smo9s9"><!></div>');const MH={hash:"svelte-1smo9s9",code:".list-container.svelte-1smo9s9 {flex:auto;position:relative;height:100%;overflow:hidden;}.list-container.svelte-1smo9s9 > .group {height:100%;overflow-y:auto;overscroll-behavior-y:contain;}.list-container.svelte-1smo9s9 > .group :is(.grid-view, .list-view) {display:block;padding:0 16px 16px;height:100%;overflow-y:auto;}"};function by(t,e){Te(t,MH);let n=P(e,"children",3,void 0),r=at(e,["$$slots","$$events","$$legacy","children"]);var i=DH(),s=R(i);_r(s,nn(()=>r,{children:(o,a)=>{var c=W(),u=M(c);Re(u,()=>n()??Fe),T(o,c)},$$slots:{default:!0}})),T(t,i)}var FH=F('<div role="none"><!></div>');const zH={hash:"svelte-180m7hm",code:'.grid-view.svelte-180m7hm .row-group-caption {display:block;margin:8px;grid-column:1/-1;}.grid-view.svelte-180m7hm .row-group-caption th {display:block;}.grid-view.svelte-180m7hm .grid-body {display:grid;grid-template-columns:repeat(auto-fill, minmax(var(--grid-size, 200px), 1fr));gap:16px;border-width:0;}.grid-view.svelte-180m7hm [role="row"] {display:block;position:relative;overflow:hidden;height:auto;text-align:left;}.grid-view.svelte-180m7hm [role="row"] .grid-cell {display:block;}.grid-view.svelte-180m7hm [role="row"] .grid-cell.image:empty {aspect-ratio:1/1;}.grid-view.svelte-180m7hm [role="row"] .checkbox {position:absolute;inset:4px auto auto 4px;z-index:2;}.grid-view.svelte-180m7hm [role="row"] .title span {display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden;margin:12px;height:40px;line-height:1.5;word-break:break-all;}.grid-view.svelte-180m7hm [role="row"][tabindex] {border-radius:var(--sui-control-large-border-radius);background-color:var(--sui-secondary-background-color);cursor:pointer;transition:background-color 200ms;}.grid-view.svelte-180m7hm [role="row"][tabindex]:hover, .grid-view.svelte-180m7hm [role="row"][tabindex]:focus, .grid-view.svelte-180m7hm [role="row"][tabindex]:active {background-color:var(--sui-hover-background-color);}.list-view.svelte-180m7hm {--icon-size: 36px;}.list-view.svelte-180m7hm [role="grid"] .row-group .row-group-caption + .grid-row .grid-cell {border-top-width:0 !important;}.list-view.svelte-180m7hm [role="grid"] .row-group .row-group-caption ~ .grid-row:last-child .grid-cell {border-bottom-width:0 !important;}.list-view.svelte-180m7hm [role="grid"] [role="row"] {transition-property:background-color, outline-color;transition-duration:200ms;}.list-view.svelte-180m7hm [role="grid"] [role="row"][tabindex] {cursor:pointer;}.list-view.svelte-180m7hm [role="grid"] [role="row"]:hover {background-color:var(--sui-hover-background-color);}.list-view.svelte-180m7hm [role="grid"] [role="rowheader"] {border-width:0;}.list-view.svelte-180m7hm [role="grid"] [role="gridcell"] {overflow:hidden;padding:0 16px 0 0;height:40px;max-width:100%;color:var(--sui-secondary-foreground-color);white-space:nowrap;text-overflow:ellipsis;vertical-align:middle;}.list-view.svelte-180m7hm [role="grid"] [role="gridcell"]:first-child {padding-left:16px;}.list-view.svelte-180m7hm [role="grid"] [role="gridcell"] .label {overflow:hidden;text-overflow:ellipsis;}.list-view.svelte-180m7hm [role="grid"] .grid-cell.image:empty::before {display:block;border-radius:var(--sui-control-medium-border-radius);width:var(--icon-size);height:var(--icon-size);background-color:var(--sui-secondary-background-color);content:"";}.list-view.svelte-180m7hm [role="grid"] [role="row"] [role="gridcell"] {border-width:1px 0 0;border-color:var(--sui-secondary-border-color);}.list-view.svelte-180m7hm [role="grid"] [role="row"]:last-child [role="gridcell"] {border-width:1px 0;}.list-view.svelte-180m7hm [role="grid"] [role="gridcell"].checkbox {padding-left:8px;width:44px;}.list-view.svelte-180m7hm [role="grid"] [role="gridcell"].title {width:100%; /* flex: auto */color:var(--sui-primary-foreground-color);}.list-view.svelte-180m7hm [role="grid"] [role="gridcell"].image {width:48px;}'};function od(t,e){se(e,!0),Te(t,zH);let n=P(e,"children",3,void 0),r=at(e,["$$slots","$$events","$$legacy","viewType","children"]);var i=FH(),s=R(i);yr(s,()=>vn(0),null,o=>{qL(o,nn({multiple:!0,clickToSelect:!1},()=>r,{children:(a,c)=>{var u=W(),d=M(u);Re(d,()=>n()??Fe),T(a,u)},$$slots:{default:!0}}))}),q(()=>Vr(i,`${e.viewType??""}-view svelte-180m7hm`)),T(t,i),oe()}var jH=F('<span role="none"> </span>');function UH(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(Gi,"$currentView",n),s=()=>z(ni,"$selectedAssetFolder",n),o=()=>z(le,"$_",n),a=()=>z(Z_,"$globalAssetFolder",n),c=()=>z(my,"$assetGroups",n),u=()=>z(rl,"$listedAssets",n),d=w(()=>i().type),f=w(()=>!!s()?.entryRelative),h=w(()=>o()("asset_list"));by(t,{get"aria-label"(){return l(h)},children:(p,g)=>{Ud(p,{get disabled(){return l(f)},multiple:!0,onSelect:({files:m})=>{ot(ws,{folder:s()?.internalPath||a()?.internalPath,files:m})},children:(m,v)=>{var _=W(),b=M(_);{var y=k=>{const S=w(()=>o()("assets"));od(k,{id:"asset-list",get viewType(){return l(d)},get"aria-label"(){return l(S)},get"aria-rowcount"(){return u().length},children:(C,E)=>{var A=W(),O=M(A);ft(O,1,()=>Object.entries(c()),([L,I])=>L,(L,I)=>{let N=()=>l(I)[0],j=()=>l(I)[1];const H=w(()=>N()!=="*"?N():void 0);Vk(L,{get label(){return l(H)},children:(B,V)=>{Ua(B,{get items(){return j()},itemKey:"path",renderItem:(K,ee=Fe)=>{var J=W(),Y=M(J);As(Y,()=>ee().sha,te=>{yH(te,{get asset(){return ee()},get viewType(){return l(d)}})}),T(K,J)},$$slots:{renderItem:!0}})},$$slots:{default:!0}})}),T(C,A)},$$slots:{default:!0}})},x=k=>{Tr(k,{children:(S,C)=>{var E=jH(),A=R(E);q(O=>Z(A,O),[()=>o()("no_files_found")]),T(S,E)},$$slots:{default:!0}})};U(b,k=>{Object.values(c()).flat(1).length?k(y):k(x,!1)})}T(m,_)},$$slots:{default:!0}})},$$slots:{default:!0}}),oe(),r()}var BH=F('<span class="count"> </span>'),qH=F('<div role="none" class="primary-sidebar"><!></div>');function HH(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(Nn,"$appLocale",n),s=()=>z(hi,"$allAssetFolders",n),o=()=>z(le,"$_",n),a=()=>z(ni,"$selectedAssetFolder",n),c=()=>z(en,"$allAssets",n),u=w(()=>Intl.NumberFormat(i()??void 0)),d=w(()=>[{collectionName:"*",internalPath:void 0,publicPath:void 0,entryRelative:!1},...s()]);var f=qH(),h=R(f);const p=w(()=>o()("asset_folders"));hd(h,{get"aria-label"(){return l(p)},"aria-controls":"assets-container",children:(g,m)=>{var v=W(),_=M(v);ft(_,17,()=>l(d),({collectionName:b,internalPath:y,entryRelative:x})=>b,(b,y)=>{let x=()=>l(y).collectionName,k=()=>l(y).internalPath,S=()=>l(y).entryRelative;const C=w(()=>x()?Fi(x()):void 0),E=w(S),A=w(()=>k()===void 0&&!a()||k()===a()?.internalPath),O=w(()=>i()?Bf(x()):"");mr(b,{get selected(){return l(A)},get label(){return l(O)},onSelect:()=>{Un(k()?`/assets/${k()}`:"/assets")},ondragover:N=>{N.preventDefault(),!l(E)&&(k()===void 0||l(A)?N.dataTransfer.dropEffect="none":(N.dataTransfer.dropEffect="move",N.target.classList.add("dragover")))},ondragleave:N=>{N.preventDefault(),!l(E)&&N.target.classList.remove("dragover")},ondragend:N=>{N.preventDefault(),!l(E)&&N.target.classList.remove("dragover")},ondrop:N=>{N.preventDefault(),!l(E)&&N.target.classList.remove("dragover")},startIcon:N=>{const j=w(()=>l(C)?.icon||"folder");et(N,{get name(){return l(j)}})},endIcon:N=>{var j=W(),H=M(j);As(H,c,B=>{var V=W(),G=M(V);yr(G,()=>vn(0),null,K=>{var ee=BH();const J=w(()=>(k()?nq(k()):c()).length);var Y=R(ee);q((te,ce)=>{ke(ee,"aria-label",`(${te??""})`),Z(Y,ce)},[()=>o()(l(J)>1?"many_assets":l(J)===1?"one_asset":"no_assets",{values:{count:l(J)}}),()=>l(u).format(l(J))]),T(K,ee)}),T(B,V)}),T(N,j)},$$slots:{startIcon:!0,endIcon:!0}})}),T(g,v)},$$slots:{default:!0}}),T(t,f),oe(),r()}function VH(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(le,"$_",n),s=w(()=>!e.asset||!ZC(e.asset)),o=w(()=>i()("preview")),a=w(()=>i()("show_preview"));Ze(t,{variant:"ghost",get disabled(){return l(s)},get label(){return l(o)},get"aria-label"(){return l(a)},onclick:()=>{Un(`/assets/${e.asset?.path}`)}}),oe(),r()}function WH(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(ni,"$selectedAssetFolder",n),s=()=>z(le,"$_",n),o=w(()=>!!i()?.entryRelative),a=w(()=>s()("upload")),c=w(()=>s()("upload_assets"));Ze(t,{variant:"primary",get label(){return l(a)},get disabled(){return l(o)},get"aria-label"(){return l(c)},onclick:()=>{ot(_a,!0)},startIcon:d=>{et(d,{name:"cloud_upload"})},$$slots:{startIcon:!0}}),oe(),r()}var GH=F('<span role="none"> </span>'),KH=F('<h2 role="none"> <!></h2> <!> <!> <!> <!> <!> <!> <!>',1);function YH(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(rd,"$selectedAssets",n),s=()=>z(uo,"$focusedAsset",n),o=()=>z(le,"$_",n),a=()=>z(Nn,"$appLocale",n),c=()=>z(ni,"$selectedAssetFolder",n),u=()=>z(rl,"$listedAssets",n),d=w(()=>i().length?i():s()?[s()]:[]),f=w(()=>o()("folder"));po(t,{variant:"primary",get"aria-label"(){return l(f)},children:(h,p)=>{var g=KH(),m=M(g),v=R(m),_=D(v);{var b=N=>{var j=GH(),H=R(j);q(()=>Z(H,`/${c().internalPath??""}`)),T(N,j)};U(_,N=>{c()&&N(b)})}var y=D(m,2);Xr(y,{flex:!0});var x=D(y,2);VH(x,{get asset(){return s()}});var k=D(x,2);const S=w(()=>s()?[s()]:[]);wA(k,{get assets(){return l(S)}});var C=D(k,2);NA(C,{get assets(){return l(d)}});var E=D(C,2);const A=w(()=>o()(l(d).length===1?"delete_selected_asset":"delete_selected_assets")),O=w(()=>o()(l(d).length===1?"confirm_deleting_selected_asset":l(d).length===u().length?"confirm_deleting_all_assets":"confirm_deleting_selected_assets",{values:{count:l(d).length}}));LA(E,{get assets(){return l(d)},get buttonDescription(){return l(A)},get dialogDescription(){return l(O)}});var L=D(E,2);IA(L,{get asset(){return s()}});var I=D(L,2);WH(I,{}),q(N=>Z(v,`${N??""} `),[()=>a()?gy(c()?.internalPath):""]),T(h,g)},$$slots:{default:!0}}),oe(),r()}var JH=F('<span role="none"> </span>');function ZH(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(Gi,"$currentView",n),s=()=>z(le,"$_",n),o=()=>z(uo,"$focusedAsset",n),a=w(()=>!i().showInfo),c=w(()=>s()("asset_info"));_r(t,{id:"asset-info",class:"secondary-sidebar",get hidden(){return l(a)},get"aria-label"(){return l(c)},children:(u,d)=>{var f=W(),h=M(f);{var p=m=>{yA(m,{get asset(){return o()},showPreview:!0})},g=m=>{Tr(m,{children:(v,_)=>{var b=JH(),y=R(b);q(x=>Z(y,x),[()=>s()("select_asset_show_info")]),T(v,b)},$$slots:{default:!0}})};U(h,m=>{o()?m(p):m(g,!1)})}T(u,f)},$$slots:{default:!0}}),oe(),r()}var XH=F("<!> <!>",1);function MA(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(le,"$_",n),s=()=>z(e.currentView,"$currentView",n);let o=P(e,"label",3,""),a=P(e,"disabled",3,!1),c=P(e,"multiple",3,!1),u=P(e,"noneLabel",3,""),d=P(e,"filters",19,()=>[]);const f=w(()=>o()||i()("filter"));Nr(t,{variant:"ghost",get label(){return l(f)},get disabled(){return a()},popupPosition:"bottom-right",popup:p=>{const g=w(()=>i()("filtering_options"));wr(p,{get"aria-label"(){return l(g)},get"aria-controls"(){return e["aria-controls"]},children:(m,v)=>{var _=W(),b=M(_);{var y=k=>{var S=W(),C=M(S);ft(C,17,d,cr,(E,A)=>{let O=()=>l(A).label,L=()=>l(A).field,I=()=>l(A).pattern;const N=w(()=>(s().filters||[]).findIndex(H=>H.field===L()&&H.pattern===I())),j=w(()=>l(N)>-1);eh(E,{get label(){return O()},get checked(){return l(j)},onChange:()=>{e.currentView.update(H=>{const B=H.filters?[...H.filters]:[];return l(N)>-1?B.splice(l(N),1):B.push({field:L(),pattern:I()}),{...H,filters:B}})}})}),T(k,S)},x=k=>{var S=XH(),C=M(S);const E=w(()=>u()||i()("sort_keys.none")),A=w(()=>!s().filter);Mu(C,{get label(){return l(E)},get checked(){return l(A)},onSelect:()=>{e.currentView.update(L=>({...L,filter:void 0}))}});var O=D(C,2);ft(O,17,d,cr,(L,I)=>{let N=()=>l(I).label,j=()=>l(I).field,H=()=>l(I).pattern;const B=w(()=>s().filter?.field===j()&&s().filter.pattern===H());Mu(L,{get label(){return N()},get checked(){return l(B)},onSelect:()=>{e.currentView.update(V=>({...V,filter:{field:j(),pattern:H()}}))}})}),T(k,S)};U(b,k=>{c()?k(y):k(x,!1)})}T(m,_)},$$slots:{default:!0}})},$$slots:{popup:!0}}),oe(),r()}var QH=F('<span role="none" class="svelte-1154dkn"> </span>'),e6=F('<div role="none" class="wrapper svelte-1154dkn"><!> <!></div>');const t6={hash:"svelte-1154dkn",code:".wrapper.svelte-1154dkn {display:flex;align-items:center;gap:4px;margin-inline:20px;}span.svelte-1154dkn {color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-small);}"};function FA(t,e){se(e,!0),Te(t,t6);const[n,r]=ve(),i=()=>z(e.selectedItems,"$selectedItems",n),s=()=>z(le,"$_",n),o=w(()=>e.allItems.length),a=w(()=>i().length),c=w(()=>!!l(a)),u=w(()=>l(c)&&l(a)===l(o));var d=e6(),f=R(d);const h=w(()=>!l(o)),p=w(()=>s()("select_all")),g=w(()=>l(c)&&!l(u)?"mixed":l(c));dd(f,{get disabled(){return l(h)},get"aria-label"(){return l(p)},get checked(){return l(g)},onChange:()=>{e.selectedItems.set(l(u)?[]:[...e.allItems])}});var m=D(f,2);{var v=_=>{var b=QH(),y=R(b);q(x=>Z(y,x),[()=>s()("x_of_x_selected",{values:{total:l(o),selected:l(a)}})]),T(_,b)};U(m,_=>{l(c)&&_(v)})}T(t,d),oe(),r()}function zA(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(le,"$_",n),s=()=>z(e.currentView,"$currentView",n);let o=P(e,"label",3,""),a=P(e,"disabled",3,!1),c=P(e,"fields",19,()=>[]),u=P(e,"collectionName",3,void 0);const d=["ascending","descending"],f=["date","commit_date"],h=w(()=>o()||i()("sort"));Nr(t,{variant:"ghost",get label(){return l(h)},get disabled(){return a()},popupPosition:"bottom-right",popup:g=>{const m=w(()=>i()("sorting_options"));wr(g,{get"aria-label"(){return l(m)},get"aria-controls"(){return e["aria-controls"]},children:(v,_)=>{var b=W(),y=M(b);ft(y,17,c,({key:x,label:k})=>x,(x,k)=>{let S=()=>l(k).key,C=()=>l(k).label;var E=W(),A=M(E);ft(A,16,()=>d,O=>O,(O,L)=>{const I=w(()=>i()(f.includes(S())||u()&&_n({collectionName:u(),keyPath:S()})?.widget==="datetime"?`${L}_date`:L,{values:{label:C()}})),N=w(()=>s().sort?.key===S()&&s().sort.order===L);Mu(O,{get label(){return l(I)},get checked(){return l(N)},onSelect:()=>{e.currentView.update(j=>({...j,sort:{key:S(),order:L}}))}})}),T(x,E)}),T(v,b)},$$slots:{default:!0}})},$$slots:{popup:!0}}),oe(),r()}var n6=F("<!> <!>",1),r6=F('<div role="none" class="wrapper svelte-1adg8sx"><!></div>');const i6={hash:"svelte-1adg8sx",code:".wrapper.svelte-1adg8sx {display:contents;}.wrapper.svelte-1adg8sx button {border-radius:var(--sui-button-medium-border-radius) !important;}"};function _y(t,e){se(e,!0),Te(t,i6);const[n,r]=ve(),i=()=>z(le,"$_",n),s=()=>z(e.currentView,"$currentView",n);let o=P(e,"disabled",3,!1),a=at(e,["$$slots","$$events","$$legacy","disabled","currentView"]);var c=r6(),u=R(c);const d=w(()=>i()("switch_view"));cp(u,nn({get disabled(){return o()},get"aria-label"(){return l(d)}},()=>a,{children:(f,h)=>{var p=n6(),g=M(p);const m=w(()=>s().type!=="grid"),v=w(()=>i()("list_view"));Du(g,{get disabled(){return o()},get selected(){return l(m)},variant:"ghost",iconic:!0,get"aria-label"(){return l(v)},onSelect:()=>{e.currentView.update(k=>({...k,type:"list"}))},startIcon:k=>{et(k,{name:"format_list_bulleted"})},$$slots:{startIcon:!0}});var _=D(g,2);const b=w(()=>s().type==="grid"),y=w(()=>i()("grid_view"));Du(_,{get disabled(){return o()},get selected(){return l(b)},variant:"ghost",iconic:!0,get"aria-label"(){return l(y)},onSelect:()=>{e.currentView.update(k=>({...k,type:"grid"}))},startIcon:k=>{et(k,{name:"grid_view"})},$$slots:{startIcon:!0}}),T(f,p)},$$slots:{default:!0}})),T(t,c),oe(),r()}var s6=F("<!> <!> <!> <!> <!> <!> <!>",1);function o6(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(rl,"$listedAssets",n),s=()=>z(le,"$_",n),o=()=>z(my,"$assetGroups",n),a=()=>z(Z8,"$sortFields",n),c=()=>z(Gi,"$currentView",n),u=w(()=>!!i().length),d=w(()=>i().length>1),f=w(()=>s()("asset_list"));po(t,{variant:"secondary",get"aria-label"(){return l(f)},children:(h,p)=>{var g=s6(),m=M(g);const v=w(()=>Object.values(o()).flat(1));FA(m,{get allItems(){return l(v)},selectedItems:rd});var _=D(m,2);Xr(_,{flex:!0});var b=D(_,2);const y=w(()=>!l(d));zA(b,{get disabled(){return l(y)},currentView:Gi,get fields(){return a()},"aria-controls":"asset-list"});var x=D(b,2);const k=w(()=>s()("type")),S=w(()=>!l(d)),C=w(()=>s()("all")),E=w(()=>eq.map(V=>({label:s()(V),field:"fileType",pattern:V})));MA(x,{get label(){return l(k)},get disabled(){return l(S)},currentView:Gi,get noneLabel(){return l(C)},get filters(){return l(E)},"aria-controls":"asset-list"});var A=D(x,2);const O=w(()=>!l(u));_y(A,{get disabled(){return l(O)},currentView:Gi,"aria-controls":"asset-list"});var L=D(A,2);Ar(L,{orientation:"vertical"});var I=D(L,2);const N=w(()=>!l(u)),j=w(()=>!!c().showInfo),H=w(()=>!!c().showInfo),B=w(()=>s()(c().showInfo?"hide_info":"show_info"));Ze(I,{variant:"ghost",iconic:!0,get disabled(){return l(N)},get pressed(){return l(j)},"aria-controls":"asset-info",get"aria-expanded"(){return l(H)},get"aria-label"(){return l(B)},onclick:()=>{Gi.update(G=>({...G,showInfo:!c().showInfo}))},startIcon:G=>{et(G,{name:"info"})},$$slots:{startIcon:!0}}),T(h,g)},$$slots:{default:!0}}),oe(),r()}var a6=F('<!> <div role="none" class="main-inner svelte-1fpggxh"><div role="none" class="main-inner-main svelte-1fpggxh"><!> <!></div> <!></div>',1);const l6={hash:"svelte-1fpggxh",code:'.main-inner.svelte-1fpggxh {flex:auto;display:flex;overflow:hidden;}.main-inner.svelte-1fpggxh .main-inner-main:where(.svelte-1fpggxh) {flex:auto;display:flex;flex-direction:column;overflow:hidden;}.main-inner.svelte-1fpggxh .secondary-sidebar {flex:none;overflow:auto;box-sizing:content-box;border-top-left-radius:16px;width:320px;background-color:var(--sui-secondary-background-color);}.main-inner.svelte-1fpggxh .secondary-sidebar [role="listbox"] {padding:12px;}'};function jA(t,e){Te(t,l6);let n=P(e,"primaryToolbar",3,void 0),r=P(e,"secondaryToolbar",3,void 0),i=P(e,"mainContent",3,void 0),s=P(e,"secondarySidebar",3,void 0);var o=a6(),a=M(o);Re(a,()=>n()??Fe);var c=D(a,2),u=R(c),d=R(u);Re(d,()=>r()??Fe);var f=D(d,2);Re(f,()=>i()??Fe);var h=D(u,2);Re(h,()=>s()??Fe),T(t,o)}var c6=F("<!> <!>",1),u6=F('<div role="none" id="page-container" class="outer svelte-6friv7"><!></div>');const d6={hash:"svelte-6friv7",code:'.outer.svelte-6friv7 {flex:auto;display:flex;flex-direction:column;overflow:hidden;}.outer[inert].svelte-6friv7 {display:none;}.outer.svelte-6friv7 > [role="toolbar"] {flex:none;}.outer.svelte-6friv7 > [role="toolbar"] [role="search"] {flex:auto;width:auto;max-width:480px;}.outer.svelte-6friv7 .browser {flex:auto;display:flex;overflow:hidden;}.outer.svelte-6friv7 .primary-sidebar {display:flex;flex-direction:column;flex:none;width:240px;overflow-y:auto;}.outer.svelte-6friv7 .primary-sidebar [role="radiogroup"] {width:100%;}.outer.svelte-6friv7 .primary-sidebar [role="listbox"] {margin:8px;border-width:0;background-color:transparent;}.outer.svelte-6friv7 .primary-sidebar [role="listbox"] button {display:flex;justify-content:flex-start;border-radius:var(--sui-control-medium-border-radius);width:100%;text-align:left;}.outer.svelte-6friv7 .primary-sidebar [role="listbox"] button span {flex:none;}.outer.svelte-6friv7 .primary-sidebar [role="listbox"] button .label {flex:auto;overflow:hidden;text-overflow:ellipsis;}.outer.svelte-6friv7 .primary-sidebar [role="listbox"] button .icon {transition:color 200ms;}.outer.svelte-6friv7 .primary-sidebar [role="listbox"] button .icon.check {display:none;}.outer.svelte-6friv7 .primary-sidebar [role="listbox"] button .count {padding:2px;color:var(--sui-tertiary-foreground-color);font-size:var(--sui-font-size-small);transition:color 200ms;}.outer.svelte-6friv7 .primary-sidebar [role="listbox"] button:not(:first-child) {margin-top:4px;}.outer.svelte-6friv7 .primary-sidebar [role="listbox"] button:not(:focus) {border-color:transparent;}.outer.svelte-6friv7 .primary-sidebar [role="listbox"] [role="option"][aria-selected="true"] {color:var(--sui-highlight-foreground-color);background-color:var(--sui-selected-background-color);}.outer.svelte-6friv7 .primary-sidebar [role="listbox"] [role="option"][aria-selected="true"] .count {color:var(--sui-highlighted-foreground-color);}.outer.svelte-6friv7 .primary-sidebar [role="listbox"] [role="option"].dragover {color:var(--sui-primary-accent-color-inverted) !important;background-color:var(--sui-primary-accent-color) !important;}.outer.svelte-6friv7 .primary-sidebar .sui.divider {margin:8px 0;}.outer.svelte-6friv7 .main {flex:auto;display:flex;flex-direction:column;overflow:hidden;border-top-left-radius:16px;background-color:var(--sui-primary-background-color);}.outer.svelte-6friv7 .main .primary.global[role="toolbar"] {justify-content:center;}'};function Bd(t,e){Te(t,d6);const[n,r]=ve(),i=()=>z(bA,"$hasOverlay",n);let s=P(e,"class",3,""),o=P(e,"primarySidebar",3,void 0),a=P(e,"main",3,void 0),c=at(e,["$$slots","$$events","$$legacy","class","primarySidebar","main"]);var u=u6(),d=R(u);_r(d,nn({get class(){return`browser ${s()??""}`}},()=>c,{children:(f,h)=>{var p=c6(),g=M(p);Re(g,()=>o()??Fe);var m=D(g,2);Re(m,()=>a()??Fe),T(f,p)},$$slots:{default:!0}})),q(()=>u.inert=i()),T(t,u),r()}var f6=F("<!> <!> <!> <!> <!> <!> <!> <!>",1);function h6(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(ni,"$selectedAssetFolder",n),s=()=>z(hi,"$allAssetFolders",n),o=()=>z(rl,"$listedAssets",n),a=()=>z(le,"$_",n),c=()=>z(Ho,"$overlaidAsset",n),u=()=>z(en,"$allAssets",n),d=()=>z(xo,"$assetUpdatesToast",n),f=/^\/assets(?:\/(?<folderPath>[/\-\w]+))?(?:\/(?<fileName>[^/]+\.[A-Za-z0-9]+))?$/,h=w(()=>gy(i()?.internalPath)),p=async()=>{const{path:E}=jd(),A=E.match(f);if(!A?.groups)return;const{folderPath:O,fileName:L}=A.groups;if(!O)ot(ni,void 0);else if(i()?.internalPath!==O){const I=s().find(({internalPath:N})=>O===N);I&&ot(ni,I)}if(!L){const I=o().length;await vn(100),ot(bs,a()(I>1?"viewing_x_asset_folder_many_assets":I===1?"viewing_x_asset_folder_one_asset":"viewing_x_asset_folder_no_assets",{values:{folder:l(h),count:I}}));return}ot(Ho,L?u().find(I=>I.path===`${O}/${L}`):void 0),ot(bs,c()?a()("viewing_x_asset_details",{values:{name:c().name}}):a()("file_not_found")),ot(Xo,!0)};cn(()=>{p()});var g=f6();wi("hashchange",ql,()=>{p()});var m=M(g);const v=w(()=>a()("asset_library"));Bd(m,{class:"media",get"aria-label"(){return l(v)},primarySidebar:O=>{HH(O,{})},main:O=>{const L=w(()=>a()("x_asset_folder",{values:{folder:l(h)}}));_r(O,{id:"assets-container",class:"main",get"aria-label"(){return l(L)},children:(I,N)=>{jA(I,{primaryToolbar:G=>{YH(G,{})},secondaryToolbar:G=>{var K=W(),ee=M(K);{var J=Y=>{o6(Y,{})};U(ee,Y=>{o().length&&Y(J)})}T(G,K)},mainContent:G=>{UH(G,{})},secondarySidebar:G=>{ZH(G,{})},$$slots:{primaryToolbar:!0,secondaryToolbar:!0,mainContent:!0,secondarySidebar:!0}})},$$slots:{default:!0}})},$$slots:{primarySidebar:!0,main:!0}});var _=D(m,2);uH(_,{});var b=D(_,2);hH(b,{});var y=D(b,2);vH(y,{});var x=D(y,2);Yn(x,{get show(){return d().saved},set show(E){At(xo,Se(d).saved=E,Se(d))},children:(E,A)=>{Hn(E,{status:"success",children:(O,L)=>{var I=Ue();q(N=>Z(I,N),[()=>a()(d().published?d().count===1?"asset_saved_and_published":"assets_saved_and_published":d().count===1?"asset_saved":"assets_saved",{values:{count:d().count}})]),T(O,I)},$$slots:{default:!0}})},$$slots:{default:!0}});var k=D(x,2);Yn(k,{get show(){return d().moved},set show(E){At(xo,Se(d).moved=E,Se(d))},children:(E,A)=>{Hn(E,{status:"success",children:(O,L)=>{var I=Ue();q(N=>Z(I,N),[()=>a()(d().count===1?"asset_moved":"assets_moved",{values:{count:d().count}})]),T(O,I)},$$slots:{default:!0}})},$$slots:{default:!0}});var S=D(k,2);Yn(S,{get show(){return d().renamed},set show(E){At(xo,Se(d).renamed=E,Se(d))},children:(E,A)=>{Hn(E,{status:"success",children:(O,L)=>{var I=Ue();q(N=>Z(I,N),[()=>a()(d().count===1?"asset_renamed":"assets_renamed",{values:{count:d().count}})]),T(O,I)},$$slots:{default:!0}})},$$slots:{default:!0}});var C=D(S,2);Yn(C,{get show(){return d().deleted},set show(E){At(xo,Se(d).deleted=E,Se(d))},children:(E,A)=>{Hn(E,{status:"success",children:(O,L)=>{var I=Ue();q(N=>Z(I,N),[()=>a()(d().count===1?"asset_deleted":"assets_deleted",{values:{count:d().count}})]),T(O,I)},$$slots:{default:!0}})},$$slots:{default:!0}}),T(t,g),oe(),r()}var p6=F('<div role="none"><!></div> <!>',1);function g6(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(ws,"$uploadingAssets",n),s=()=>z(Xo,"$showAssetOverlay",n),o=()=>z(W8,"$showUploadAssetsConfirmDialog",n),a=()=>z(le,"$_",n),c=w(()=>i().files),u=w(()=>i().folder),d=w(()=>i().originalAsset);let f=ae(ie([]));Be(()=>{$(f,ie([...l(c)]))}),Be(()=>{s()||ot(ws,{folder:void 0,files:[]})});const h=w(()=>a()(l(d)?"replace_asset":"upload_assets")),p=w(()=>a()(l(d)?"replace":"upload"));xc(t,{get open(){return o()},get title(){return l(h)},get okLabel(){return l(p)},onOk:async()=>{await $A(i(),{commitType:"uploadMedia"}),ot(ws,{folder:void 0,files:[]})},onCancel:()=>{ot(ws,{folder:void 0,files:[]})},children:(g,m)=>{var v=p6(),_=M(v),b=R(_);{var y=S=>{var C=Ue();q(E=>Z(C,E),[()=>a()("confirm_replacing_file",{values:{name:l(d).name}})]),T(S,C)},x=S=>{var C=Ue();q(E=>Z(C,E),[()=>a()(l(f).length===1?"confirm_uploading_file":"confirm_uploading_files",{values:{count:l(f).length,folder:`/${l(u)}`}})]),T(S,C)};U(b,S=>{l(d)?S(y):S(x,!1)})}var k=D(_,2);RA(k,{get files(){return l(f)},set files(S){$(f,ie(S))}}),T(g,v)},$$slots:{default:!0}}),oe(),r()}function m6(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(ws,"$uploadingAssets",n),s=()=>z(ni,"$selectedAssetFolder",n),o=()=>z(Z_,"$globalAssetFolder",n),a=()=>z(_a,"$showUploadAssetsDialog",n),c=()=>z(Xo,"$showAssetOverlay",n),u=()=>z(le,"$_",n);let d=ae(void 0);const f=w(()=>i().originalAsset),h=w(()=>!l(f)),p=w(()=>l(f)?Jo.getType(l(f).name)??void 0:void 0),g=y=>{y.length&&(ot(ws,{folder:l(f)?l(f).folder:s()?.internalPath||o()?.internalPath,files:y,originalAsset:l(f)}),ot(_a,!1))};Be(()=>{!zh()&&a()&&l(d)?.open()}),Be(()=>{c()||ot(_a,!1)});var m=W(),v=M(m);{var _=y=>{const x=w(()=>l(f)?u()("replace_x",{values:{name:l(f).name}}):u()("upload_assets"));is(y,{get title(){return l(x)},showOk:!1,get open(){return uk(),a()},set open(k){ot(_a,k)},children:(k,S)=>{Ud(k,{showUploadButton:!0,get accept(){return l(p)},get multiple(){return l(h)},onSelect:({files:C})=>{g(C)}})},$$slots:{default:!0}})},b=y=>{$t(DA(y,{get accept(){return l(p)},get multiple(){return l(h)},onSelect:({files:x})=>{g(x)}}),x=>$(d,ie(x)),()=>l(d))};U(v,y=>{zh()?y(_):y(b,!1)})}T(t,m),oe(),r()}var v6=F('<div role="blockquote" class="svelte-soravq"><pre class="svelte-soravq"> </pre></div>');const b6={hash:"svelte-soravq",code:"div.svelte-soravq {flex:auto;overflow:auto;}pre.svelte-soravq {margin:0;padding:16px;}"};function _6(t,e){se(e,!0),Te(t,b6);const[n,r]=ve(),i=()=>z(le,"$_",n),s=()=>z(wt,"$siteConfig",n),o=w(()=>i()("site_configuration_editor"));Bd(t,{class:"content",get"aria-label"(){return l(o)},main:c=>{var u=v6(),d=R(u),f=R(d);q((h,p)=>{ke(u,"aria-label",h),Z(f,p)},[()=>i()("site_config"),()=>Od.stringify(s())]),T(c,u)},$$slots:{main:!0}}),oe(),r()}var y6=F("<!> <!> <!> <!>",1);function w6(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(jf,"$restoreDialogState",n),s=()=>z(Nn,"$appLocale",n),o=()=>z(tl,"$showContentOverlay",n),a=()=>z(le,"$_",n),c=()=>z(Ao,"$backupToastState",n),u=w(()=>new Date),d=w(()=>i().resolve),f=w(()=>i().timestamp),h=w(()=>l(u).getUTCFullYear()===l(f)?.getUTCFullYear()),p=w(()=>l(h)&&l(u).getUTCMonth()===l(f)?.getUTCMonth()),g=w(()=>l(p)&&l(u).getUTCDate()===l(f)?.getUTCDate()),m=w(()=>l(f)?.toLocaleString(s()??void 0,{year:l(h)?void 0:"numeric",month:l(g)?void 0:"short",day:l(g)?void 0:"numeric",hour:"numeric",minute:"numeric"}));Be(()=>{!o()&&i().show&&(At(jf,Se(i).show=!1,Se(i)),l(d)?.())});var v=y6(),_=M(v);const b=w(()=>a()("restore_backup_title")),y=w(()=>a()("restore")),x=w(()=>a()("discard"));xc(_,{get title(){return l(b)},get okLabel(){return l(y)},get cancelLabel(){return l(x)},onOk:()=>{l(d)?.(!0)},onCancel:()=>{l(d)?.(!1)},get open(){return i().show},set open(E){At(jf,Se(i).show=E,Se(i))},children:(E,A)=>{var O=Ue();q(L=>Z(O,L),[()=>a()("restore_backup_description",{values:{datetime:l(m)}})]),T(E,O)},$$slots:{default:!0}});var k=D(_,2);Yn(k,{get show(){return c().saved},set show(E){At(Ao,Se(c).saved=E,Se(c))},children:(E,A)=>{Hn(E,{status:"info",children:(O,L)=>{var I=Ue();q(N=>Z(I,N),[()=>a()("draft_backup_saved")]),T(O,I)},$$slots:{default:!0}})},$$slots:{default:!0}});var S=D(k,2);Yn(S,{get show(){return c().restored},set show(E){At(Ao,Se(c).restored=E,Se(c))},children:(E,A)=>{Hn(E,{status:"success",children:(O,L)=>{var I=Ue();q(N=>Z(I,N),[()=>a()("draft_backup_restored")]),T(O,I)},$$slots:{default:!0}})},$$slots:{default:!0}});var C=D(S,2);Yn(C,{get show(){return c().deleted},set show(E){At(Ao,Se(c).deleted=E,Se(c))},children:(E,A)=>{Hn(E,{status:"info",children:(O,L)=>{var I=Ue();q(N=>Z(I,N),[()=>a()("draft_backup_deleted")]),T(O,I)},$$slots:{default:!0}})},$$slots:{default:!0}}),T(t,v),oe(),r()}const x6="deepl",k6="DeepL",S6="https://www.deepl.com/pro-api",E6="https://www.deepl.com/account/summary",T6=/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}(?::fx)?/,C6=["AR","BG","CS","DA","DE","EL","EN","ES","ET","FI","FR","HU","ID","IT","JA","KO","LT","LV","NB","NL","PL","PT","RO","RU","SK","SL","SV","TR","UK","ZH"],i1=["AR","BG","CS","DA","DE","EL","EN","EN-GB","EN-US","ES","ET","FI","FR","HU","ID","IT","JA","KO","LT","LV","NB","NL","PL","PT","PT-BR","PT-PT","RO","RU","SK","SL","SV","TR","UK","ZH","ZH-HANS","ZH-HANT"],UA=t=>{const[e]=t.toUpperCase().split("-");if(C6.includes(e))return e},BA=t=>{let e=t.toUpperCase();if(i1.includes(e))return e;if(["ZH-CN","ZH-SG"].includes(e))return"ZH-HANS";if(["ZH-HK","ZH-MO","ZH-TW"].includes(e))return"ZH-HANT";if([e]=e.split("-"),i1.includes(e))return e},A6=async(t,{sourceLocale:e,targetLocale:n,apiKey:r})=>{const i=UA(e),s=BA(n);if(!i)throw new Error("Source locale is not supported.");if(!s)throw new Error("Target locale is not supported.");const o=new URLSearchParams([...t.map(d=>["text",d]),["source_lang",i],["target_lang",s],["tag_handling","html"],["split_sentences","1"],["auth_key",r]]),c=`https://${r.endsWith(":fx")?"api-free.deepl.com":"api.deepl.com"}/v2/translate?${o.toString()}`,{translations:u}=await fetch(c).then(d=>d.json());return u.map(d=>d.text)},qA={serviceId:x6,serviceLabel:k6,developerURL:S6,apiKeyURL:E6,apiKeyPattern:T6,getSourceLanguage:UA,getTargetLanguage:BA,translate:A6},P6={deepl:qA},ug=st(qA),s1=(t,e)=>{Object.entries(e).forEach(([n,r])=>{t[n]!==r&&(t[n]=r)}),Object.keys(t).forEach(n=>{n in e||delete t[n]})},o1=(t,e)=>{const n=new RegExp(`^${ln(e)}\\b(?!#)`),r=Object.entries(t).filter(([i])=>n.test(i)).map(([i,s])=>[i.replace(n,"_"),s]).sort();return[za(Object.fromEntries(r))._??[],Object.fromEntries(Object.entries(t).filter(([i])=>!n.test(i)))]},HA=(t,e,n)=>{const r=ne(rt),{collection:i,collectionFile:s}=r,{defaultLocale:o}=(s??i)._i18n,[a,c]=o1(r.currentValues[t],e),[u,d]=t===o?o1(r.expanderStates._,e):[[],[]];n({valueList:a,expanderStateList:u}),Ji.set(!1),rt.update(f=>(s1(f.currentValues[t],{...Sa({[e]:a}),...c}),t===o&&s1(f.expanderStates._,{...Sa({[e]:u}),...d}),f)),Ji.set(!0)},VA=t=>{const e=ne(rt),{collectionName:n,fileName:r,collection:i,collectionFile:s}=e,{defaultLocale:o}=(s??i)._i18n,a=e.currentValues[o],c=rc([...Object.keys(t),...Object.keys(a)]),u={};return c.forEach(d=>{const f=_n({collectionName:n,fileName:r,keyPath:d})?.i18n==="duplicate";u[d]=(f?a[d]:void 0)??t[d]}),u},WA=t=>{rt.update(e=>{const{currentLocales:n,currentValues:r,validities:i}=e,s=!n[t];if(s&&!r[t]){const{collection:o,collectionName:a,collectionFile:c,fileName:u,originalValues:d}=e,{fields:f=[]}=c??o,h=lg(f,t);return{...e,currentLocales:{...n,[t]:s},originalValues:{...d,[t]:h},currentValues:{...r,[t]:hy({draft:{collectionName:a,fileName:u},locale:t,target:VA(h)})}}}return{...e,currentLocales:{...n,[t]:s},validities:{...i,[t]:{}}}})},GA=async(t,e,{keyPath:n="",translate:r=!1}={})=>{const{collectionName:i,fileName:s,currentValues:o}=ne(rt),a=o[t],c=Object.fromEntries(Object.entries(a).filter(([p,g])=>{const m=o[e][p],v=_n({collectionName:i,fileName:s,valueMap:a,keyPath:p});return!(n&&!p.startsWith(n)||typeof g!="string"||!g||!["markdown","text","string","list"].includes(v?.widget??"string")||v?.widget==="list"&&(v.field??v.fields)||!r&&g===m||!n&&r&&m)})),u=Object.keys(c).length,d=u===1?"one":"many",f=r?"translation":"copy",h=(p,g)=>{Dv.set({id:Date.now(),show:!0,status:p,message:g,count:u,sourceLocale:t})};if(!u){h("info",`${f}.none`);return}if(r){const p=ne(ug),g=ne(Tt).apiKeys?.[p.serviceId]||await new Promise(m=>{pu.set({show:!0,multiple:u>1,resolve:m})});if(!g)return;h("info","translation.started");try{const m=await p.translate(Object.values(c),{apiKey:g,sourceLocale:t,targetLocale:e});Object.keys(c).forEach((v,_)=>{o[e][v]=m[_]}),h("success",`translation.complete.${d}`)}catch(m){h("error","translation.error"),console.error(m)}}else Object.entries(c).forEach(([p,g])=>{o[e][p]=g}),h("success",`copy.complete.${d}`);rt.update(p=>({...p,currentValues:o}))},yy=(t="",e="")=>{const{collection:n,collectionFile:r,fileName:i,currentValues:s,originalValues:o}=ne(rt),{allLocales:a,defaultLocale:c}=(r??n)._i18n,u=t?[t]:a,d=(f,h,p=!1)=>{Object.entries(h).forEach(([g,m])=>{if(!e||g.startsWith(e)){const v=_n({collectionName:n.name,fileName:i,valueMap:h,keyPath:g});(f===c||[!0,"translate"].includes(v?.i18n??!1))&&(p?delete s[f][g]:s[f][g]=m)}})};u.forEach(f=>{d(f,s[f],!0),d(f,o[f],!1)}),rt.update(f=>({...f,currentValues:s}))};function O6(t,e){let n=P(e,"currentValue",15,!1),r=P(e,"required",3,!0),i=P(e,"readonly",3,!1),s=P(e,"invalid",3,!1);gd(t,{get readonly(){return i()},get required(){return r()},get invalid(){return s()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get checked(){return n()},set checked(o){n(o)}})}var $6=F("<p> </p>");function L6(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(le,"$_",n);let s=P(e,"currentValue",3,!1);var o=W(),a=M(o);{var c=u=>{var d=$6(),f=R(d);q(h=>Z(f,h),[()=>i()(`boolean.${s()}`)]),T(u,d)};U(a,u=>{typeof s()=="boolean"&&u(c)})}T(t,o),oe(),r()}function N6(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(rt,"$entryDraft",n);let s=P(e,"currentValue",15),o=P(e,"required",3,!0),a=P(e,"readonly",3,!1),c=P(e,"invalid",3,!1),u=ae(""),d=ae("");const f=w(()=>it(e.fieldConfig.default_language,"")),h=w(()=>it(e.fieldConfig.allow_language_selection,!0)),p=w(()=>it(e.fieldConfig.output_code_only,!1)),g=w(()=>it(e.fieldConfig.keys,()=>({code:"code",lang:"lang"}),!0)),m=w(()=>Zr(i()?.currentValues[e.locale])??{}),v=w(()=>`${e.keyPath}.${l(g).code}`),_=w(()=>`${e.keyPath}.${l(g).lang}`),b=()=>{if(l(p))typeof s()!="string"?$(u,""):l(u)!==s()&&$(u,ie(s()));else{const x=l(m)[l(v)],k=l(m)[l(_)]||l(f);typeof x!="string"?$(u,""):l(u)!==x&&$(u,ie(x)),typeof k!="string"?$(d,""):l(d)!==k&&$(d,ie(k))}},y=()=>{l(p)?s()!==l(u)&&s(l(u)):i()&&(s({}),l(m)[l(v)]!==l(u)&&At(rt,Se(i).currentValues[e.locale][l(v)]=l(u),Se(i)),l(m)[l(_)]!==l(d)&&At(rt,Se(i).currentValues[e.locale][l(_)]=l(d),Se(i)))};Be(()=>{l(m),Se(()=>{b()})}),Be(()=>{l(u),l(d),Se(()=>{y()})}),GM(t,{get showLanguageSwitcher(){return l(h)},flex:!0,get readonly(){return a()},get required(){return o()},get invalid(){return c()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get code(){return l(u)},set code(x){$(u,ie(x))},get lang(){return l(d)},set lang(x){$(d,ie(x))}}),oe(),r()}var I6=F("<pre> </pre>");function R6(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(rt,"$entryDraft",n),s=w(()=>it(e.fieldConfig.default_language,"")),o=w(()=>it(e.fieldConfig.output_code_only,!1)),a=w(()=>it(e.fieldConfig.keys,()=>({code:"code",lang:"lang"}),!0)),c=w(()=>Zr(i()?.currentValues[e.locale])??{}),u=w(()=>`${e.keyPath}.${l(a).code}`),d=w(()=>`${e.keyPath}.${l(a).lang}`),f=w(()=>l(o)?e.currentValue:l(c)[l(u)]),h=w(()=>l(o)?l(s):l(c)[l(d)]);var p=W(),g=M(p);{var m=v=>{var _=I6(),b=R(_);q(()=>{Vr(_,lk(l(h)?`language-${l(h)}`:void 0)),Z(b,l(f))}),T(v,_)};U(g,v=>{l(f)&&v(m)})}T(t,p),oe(),r()}var D6=F(" <!>",1),M6=F('<span role="none" class="value svelte-s59zhj"><!> <!></span>'),F6=F('<div role="none" class="svelte-s59zhj"><input type="color" class="svelte-s59zhj"> <!> <!></div>');const z6={hash:"svelte-s59zhj",code:"div.svelte-s59zhj {display:flex;align-items:center;gap:8px;}div.svelte-s59zhj .value:where(.svelte-s59zhj) {display:flex;align-items:center;gap:8px;}div.svelte-s59zhj .value:where(.svelte-s59zhj) .sui.text-input {width:80px;min-width:0;}div.svelte-s59zhj .value:where(.svelte-s59zhj) .sui.slider {padding:8px;--sui-slider-base-width: 80px;}input.svelte-s59zhj {font-family:var(--sui-textbox-font-family);}"};function j6(t,e){se(e,!0),Te(t,z6);const[n,r]=ve(),i=()=>z(le,"$_",n);let s=P(e,"currentValue",15,""),o=P(e,"required",3,!0),a=P(e,"readonly",3,!1),c=P(e,"invalid",3,!1),u=ae(""),d=ae(255);const f=w(()=>it(e.fieldConfig.allowInput,!1)),h=w(()=>it(e.fieldConfig.enableAlpha,!1)),p=dr("color"),g=/^#[0-9a-f]{6}$/,m=/^(?<rgb>#[0-9a-f]{6})(?<a>[0-9a-f]{2})?$/,v=()=>{if(typeof s()!="string")return;const{rgb:E,a:A="ff"}=s().match(m)?.groups??{};if(E&&l(u)!==E&&$(u,ie(E)),E&&l(h)){const O=Number.parseInt(`0x${A}`,16);l(d)!==O&&$(d,ie(O))}},_=()=>{let E=g.test(l(u))?l(u):"";E&&l(h)&&(E+=l(d).toString(16).padStart(2,"0")),s()!==E&&s(E)};Be(()=>{s(),Se(()=>{v()})}),Be(()=>{l(u),l(d),Se(()=>{_()})});var b=F6(),y=R(b);ke(y,"id",`${p??""}-picker`);var x=D(y,2);{var k=E=>{var A=M6(),O=R(A);{var L=j=>{Pn(j,{id:`${p??""}-input`,get invalid(){return c()},get readonly(){return a()},get required(){return o()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get value(){return l(u)},set value(H){$(u,ie(H))}})};U(O,j=>{l(f)&&j(L)})}var I=D(O,2);{var N=j=>{var H=D6(),B=M(H),V=D(B);const G=w(()=>!l(u)),K=w(()=>i()("opacity"));IN(V,{min:0,max:255,get disabled(){return l(G)},get"aria-label"(){return l(K)},get value(){return l(d)},set value(ee){$(d,ie(ee))}}),q(ee=>Z(B,`${ee??""} `),[()=>i()("opacity")]),T(j,H)};U(I,j=>{l(h)&&j(N)})}T(E,A)};U(x,E=>{(l(f)||l(h))&&E(k)})}var S=D(x,2);{var C=E=>{const A=w(()=>i()("clear")),O=w(()=>!l(u)),L=w(()=>`${p}-picker ${l(f)?`${p}-input`:""}`);Ze(E,{variant:"tertiary",get label(){return l(A)},get disabled(){return l(O)},get"aria-controls"(){return l(L)},onclick:()=>{$(u,""),$(d,255)}})};U(S,E=>{!a()&&!o()&&E(C)})}q(()=>{y.readOnly=a(),ke(y,"aria-invalid",c()),ke(y,"aria-readonly",a()),ke(y,"aria-required",o()),ke(y,"aria-labelledby",`${e.fieldId??""}-label`),ke(y,"aria-errormessage",`${e.fieldId??""}-error`)}),np(y,()=>l(u),E=>$(u,E)),T(t,b),oe(),r()}var U6=F('<p><span role="none" class="preview svelte-16cruwo"><span role="none" class="color svelte-16cruwo"></span> <span role="none" class="value"> </span> <span role="none" class="value"> </span></span></p>');const B6={hash:"svelte-16cruwo",code:".preview.svelte-16cruwo {display:inline-flex;align-items:center;gap:8px;}.preview.svelte-16cruwo .color:where(.svelte-16cruwo) {display:block;width:24px;height:24px;border-radius:24px;}"};function q6(t,e){se(e,!0),Te(t,B6);const n=w(()=>it(e.fieldConfig.enableAlpha,!1)),r=u=>Number.parseInt(`0x${u}`,16),i=/^#(?<r>[0-9a-f]{2})(?<g>[0-9a-f]{2})(?<b>[0-9a-f]{2})(?<a>[0-9a-f]{2})?$/,s=w(()=>{const{r:u,g:d,b:f,a:h}=e.currentValue?.match(i)?.groups??{};return u?`rgb(${r(u)} ${r(d)} ${r(f)}${l(n)&&h?` / ${Math.round(r(h)/255*100)}%`:""})`:""});var o=W(),a=M(o);{var c=u=>{var d=U6(),f=R(d),h=R(f),p=D(h,2),g=R(p),m=D(p,2),v=R(m);q(()=>{Yr(h,"background-color",e.currentValue),Z(g,e.currentValue),Z(v,l(s))}),T(u,d)};U(a,u=>{typeof e.currentValue=="string"&&e.currentValue.trim()&&u(c)})}T(t,o),oe()}function H6(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(rt,"$entryDraft",n);let s=P(e,"currentValue",15),o=P(e,"required",3,!0),a=P(e,"readonly",3,!1),c=P(e,"invalid",3,!1);const u=w(()=>it(e.fieldConfig.value,"")),d=w(()=>i()?.collectionName??""),f=w(()=>i()?.fileName),h=w(()=>Zr(i()?.currentValues[e.locale])??{}),p=w(()=>oc(e.locale)),g=()=>{const[_]=e.keyPath.split(".").splice(-2,1);return _?.match(/^\d+$/)?Number(_):void 0},m=()=>{if(!Object.keys(l(h)).includes(e.keyPath))return;const _=l(u)==="{{index}}"?g()??"":l(u).replaceAll(/{{(.+?)}}/g,(b,y)=>{if(y==="index")return String(g()??"");if(!y.startsWith("fields."))return"";const x=tg({collectionName:l(d),fileName:l(f),valueMap:l(h),keyPath:y.replace(/^fields\./,""),locale:e.locale});return Array.isArray(x)?l(p).format(x):String(x)});s()!==_&&s(_)};Be(()=>{l(h),Se(()=>{m()})});const v=w(()=>String(s()));Pn(t,{get value(){return l(v)},flex:!0,get readonly(){return a()},get required(){return o()},get invalid(){return c()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`}}),oe(),r()}var V6=F('<p dir="auto"> </p>');function W6(t,e){var n=V6(),r=R(n);q(()=>{ke(n,"lang",e.locale),Z(r,e.currentValue),n.dir=n.dir}),T(t,n)}var G6=F('<span role="none" class="utc svelte-13u8gbo">UTC</span>'),K6=F('<div role="none" class="svelte-13u8gbo"><input> <!> <!> <!></div>');const Y6={hash:"svelte-13u8gbo",code:"div.svelte-13u8gbo {display:flex;align-items:center;}.utc.svelte-13u8gbo {margin:0 8px;color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-small);}"};function J6(t,e){se(e,!0),Te(t,Y6);const[n,r]=ve(),i=()=>z(le,"$_",n);let s=P(e,"currentValue",15),o=P(e,"required",3,!0),a=P(e,"readonly",3,!1),c=P(e,"invalid",3,!1),u=ae("");const d=w(()=>Qa(e.fieldConfig)),f=w(()=>l(d).dateOnly),h=w(()=>l(d).timeOnly),p=w(()=>l(d).utc),g=()=>{const E=LB(s(),e.fieldConfig);E!==void 0&&E!==l(u)&&$(u,ie(E))},m=()=>{const E=HC(l(u),s(),e.fieldConfig);E!==void 0&&E!==s()&&Number(ac(E,e.fieldConfig))!==Number(ac(s(),e.fieldConfig))&&s(E)};Be(()=>{s(),Se(()=>{g()})}),Be(()=>{l(u),Se(()=>{m()})});var v=K6(),_=R(v),b=D(_,2);{var y=E=>{var A=G6();T(E,A)};U(b,E=>{l(p)&&E(y)})}var x=D(b,2);{var k=E=>{const A=w(()=>i()(l(f)?"today":"now"));Ze(E,{variant:"tertiary",get label(){return l(A)},onclick:()=>{const O=qC(e.fieldConfig);$(u,ie(l(p)?O.replace(/:00\.000Z$/,""):O))}})};U(x,E=>{a()||E(k)})}var S=D(x,2);{var C=E=>{const A=w(()=>i()("clear")),O=w(()=>!s());Ze(E,{variant:"tertiary",get label(){return l(A)},get disabled(){return l(O)},onclick:()=>{s("")}})};U(S,E=>{!a()&&!o()&&E(C)})}q(()=>{ke(_,"type",l(f)?"date":l(h)?"time":"datetime-local"),_.readOnly=a(),ke(_,"aria-readonly",a()),ke(_,"aria-required",o()),ke(_,"aria-invalid",c()),ke(_,"aria-labelledby",`${e.fieldId??""}-label`),ke(_,"aria-errormessage",`${e.fieldId??""}-error`)}),np(_,()=>l(u),E=>$(u,E)),T(t,v),oe(),r()}var Z6=F("<time><!></time>"),X6=F('<p dir="auto"><!> <!></p>');function Q6(t,e){se(e,!0);const n=w(()=>Qa(e.fieldConfig)),r=w(()=>l(n).dateOnly),i=w(()=>l(n).timeOnly),s=w(()=>l(n).utc),o=w(()=>ac(e.currentValue,e.fieldConfig)),a=w(()=>qp(e.locale)),c=/^\d{4}-[01]\d-[0-3]\d$/,u=/T00:00(?::00)?(?:\.000)?Z$/;var d=W(),f=M(d);{var h=p=>{var g=X6(),m=R(g);{var v=x=>{var k=Ue();q(S=>Z(k,S),[()=>l(o).toLocaleTimeString(l(a),jv)]),T(x,k)},_=x=>{var k=Z6(),S=R(k);{var C=A=>{var O=Ue();q(L=>Z(O,L),[()=>l(o).toLocaleDateString(l(a),{...zv,timeZone:l(s)||l(r)&&e.currentValue?.match(c)||l(r)&&e.currentValue?.match(u)?"UTC":void 0})]),T(A,O)},E=A=>{var O=Ue();q(L=>Z(O,L),[()=>l(o).toLocaleString(l(a),{...zv,...jv,timeZone:l(s)?"UTC":void 0,timeZoneName:l(s)?void 0:"short"})]),T(A,O)};U(S,A=>{l(r)?A(C):A(E,!1)})}q(A=>ke(k,"datetime",A),[()=>l(o).toJSON()]),T(x,k)};U(m,x=>{l(i)?x(v):x(_,!1)})}var b=D(m,2);{var y=x=>{var k=Ue("UTC");T(x,k)};U(b,x=>{l(s)&&x(y)})}q(()=>{ke(g,"lang",e.locale),g.dir=g.dir}),T(p,g)};U(f,p=>{l(o)&&p(h)})}T(t,d),oe()}P2();var e9=F('<div role="none" class="wrapper svelte-j0kdh9"><!></div>');const t9={hash:"svelte-j0kdh9",code:'.wrapper.svelte-j0kdh9 {display:contents;}.wrapper.svelte-j0kdh9 .listbox {gap:4px;overflow-x:hidden;overflow-y:auto;border-width:0;max-height:calc(100% - var(--sui-focus-ring-width) * 2);}.wrapper.svelte-j0kdh9 .listbox .option button {border-radius:var(--sui-control-medium-border-radius);padding:4px;width:100%;height:auto;transition:none;}.wrapper.svelte-j0kdh9 .listbox .option button:focus-visible {outline-color:transparent;}.wrapper.svelte-j0kdh9 .listbox .option button .preview {flex:none;border-radius:var(--sui-control-medium-border-radius);aspect-ratio:1/1;object-fit:contain;}.wrapper.svelte-j0kdh9 .listbox .option button[aria-selected="true"] .icon {display:none;}.wrapper.svelte-j0kdh9 .listbox .name {display:-webkit-box;min-height:calc(var(--sui-font-size-default) * 2);-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden;white-space:normal;line-height:var(--sui-line-height-compact);}.wrapper.svelte-j0kdh9 .listbox.grid {display:grid;grid-template-columns:repeat(auto-fill, minmax(160px, 1fr));height:auto;max-height:none;}.wrapper.svelte-j0kdh9 .listbox.grid .option button {flex-direction:column;justify-content:flex-start;}.wrapper.svelte-j0kdh9 .listbox.grid .option button .preview {width:100%;height:auto;}.wrapper.svelte-j0kdh9 .listbox.grid .option button .name {flex:none;padding:4px 8px 12px;width:100%;min-height:calc(var(--sui-font-size-default) * 3);}.wrapper.svelte-j0kdh9 .listbox.grid button[aria-selected="true"] .preview {outline-offset:-2px;outline-width:2px !important;outline-style:solid;outline-color:var(--sui-primary-accent-color-light);}.wrapper.svelte-j0kdh9:not(.wrapper.show-title) .listbox.grid .option .name {position:absolute;left:-99999px;}.wrapper.svelte-j0kdh9 .listbox.list .option button {gap:16px;}.wrapper.svelte-j0kdh9 .listbox.list .option button .preview {width:64px;}.wrapper.svelte-j0kdh9 .listbox.list .option button .name {flex:auto;}.wrapper.svelte-j0kdh9 .listbox.list .option button[aria-selected="true"] {outline-offset:-2px;outline-width:2px !important;outline-style:solid;outline-color:var(--sui-primary-accent-color-light);}'};function KA(t,e){se(e,!0),Te(t,t9);const[n,r]=ve(),i=()=>z(le,"$_",n);let s=P(e,"viewType",3,"grid"),o=P(e,"gridId",3,void 0),a=P(e,"showTitle",3,!1),c=P(e,"onChange",3,void 0),u=P(e,"children",3,void 0);var d=e9(),f=R(d);const h=w(()=>i()("assets_dialog.available_images"));hd(f,{get id(){return o()},get class(){return s()},get"aria-label"(){return l(h)},onChange:p=>{c()?.(p.detail)},children:(p,g)=>{var m=W(),v=M(m);Re(v,()=>u()??Fe),T(p,m)},$$slots:{default:!0}}),q(()=>pt(d,"show-title",a())),T(t,d),oe(),r()}var n9=F('<span role="alert"> </span>'),r9=F('<span role="alert"> </span>'),i9=F('<span role="alert"> </span>'),s9=F('<!> <span role="none" class="name"> </span>',1),o9=F('<div role="none" class="input-outer svelte-t9mjci"><!></div>'),a9=F('<div role="none" class="input-outer svelte-t9mjci"><!></div> <div role="none" class="input-outer svelte-t9mjci"><!></div> <div role="none" class="input-outer svelte-t9mjci"><!></div>',1),l9=F('<p role="alert" class="svelte-t9mjci"><!> <!></p> <!> <!>',1),c9=F('<span role="alert"> </span>');const u9={hash:"svelte-t9mjci",code:"p.svelte-t9mjci {margin:0 0 8px;}.input-outer.svelte-t9mjci {width:400px;text-align:center;}"};function a1(t,e){se(e,!0),Te(t,u9);const[n,r]=ve(),i=()=>z(Tt,"$prefs",n),s=()=>z(le,"$_",n),o=()=>z(fc,"$selectAssetsView",n);let a=P(e,"kind",3,"image"),c=P(e,"searchTerms",3,""),u=P(e,"gridId",3,void 0),d=P(e,"onSelect",3,void 0);const f=w(()=>it(e.serviceProps.serviceType,"stock_photos")),h=w(()=>it(e.serviceProps.serviceId,"")),p=w(()=>it(e.serviceProps.serviceLabel,"")),g=w(()=>it(e.serviceProps.hotlinking,!1)),m=w(()=>it(e.serviceProps.authType,"api_key")),v=w(()=>it(e.serviceProps.developerURL,"")),_=w(()=>it(e.serviceProps.apiKeyURL,"")),b=w(()=>e.serviceProps.apiKeyPattern),y=w(()=>e.serviceProps.init),x=w(()=>e.serviceProps.signIn),k=w(()=>e.serviceProps.search),S=ie({userName:"",password:""});let C=ae(!0),E=ae(!1),A=ae(""),O=ae(""),L=ae(""),I=ae("initial"),N=ae(null),j=ae(void 0),H=0;const B=async(Y="")=>{$(N,null);try{$(N,ie(await l(k)(Y,{kind:a(),apiKey:l(A),userName:l(O),password:l(L)})))}catch(te){$(j,"search_fetch_failed"),console.error(te)}},V=async Y=>{const{downloadURL:te,fileName:ce,credit:he}=Y;if(l(g)){d()?.({url:te,credit:he});return}try{const re=await fetch(te),{ok:X,status:fe}=re;if(!X)throw new Error(`The response returned with HTTP status ${fe}.`);const be=await re.blob(),ue=new File([be],ce,{type:be.type});d()?.({file:ue,credit:he})}catch(re){$(j,"image_fetch_failed"),console.error(re)}};cn(()=>{(async()=>(typeof l(y)=="function"&&($(C,!1),$(C,ie(await l(y)()))),l(C)&&($(A,ie(i().apiKeys?.[l(h)]??"")),(Y=>($(O,ie(Y[0])),$(L,ie(Y[1]))))((i().logins?.[l(h)]??"").split(" ")),$(E,ie(!!l(A)||!!l(L))),$(N,null),l(E)&&B())))()}),Be(()=>{c(),window.clearTimeout(H),H=window.setTimeout(()=>{l(E)&&B(c())},1e3)});var G=W(),K=M(G);{var ee=Y=>{var te=W(),ce=M(te);{var he=X=>{Tr(X,{children:(fe,be)=>{var ue=n9(),Ee=R(ue);q(_e=>Z(Ee,_e),[()=>s()(`assets_dialog.error.${l(j)}`)]),T(fe,ue)},$$slots:{default:!0}})},re=X=>{var fe=W(),be=M(fe);{var ue=_e=>{Tr(_e,{children:(Ae,Ce)=>{var $e=r9(),Ve=R($e);q(We=>Z(Ve,We),[()=>s()("searching")]),T(Ae,$e)},$$slots:{default:!0}})},Ee=_e=>{var Ae=W(),Ce=M(Ae);{var $e=We=>{Tr(We,{children:(ht,Ge)=>{var pe=i9(),ye=R(pe);q(we=>Z(ye,we),[()=>s()("no_files_found")]),T(ht,pe)},$$slots:{default:!0}})},Ve=We=>{const ht=w(()=>o()?.type);KA(We,{get gridId(){return u()},get viewType(){return l(ht)},onChange:({value:Ge})=>{const pe=l(N)?.find(({id:ye})=>ye===Ge);pe&&V(pe)},children:(Ge,pe)=>{Ua(Ge,{get items(){return l(N)},itemKey:"id",renderItem:(we,xe=Fe)=>{const Ne=w(()=>{const{id:me,previewURL:Pe,description:qe,kind:Xe}=xe();return{id:me,previewURL:Pe,description:qe,_kind:Xe}});mr(we,{label:"",get value(){return l(Ne).id},children:(me,Pe)=>{var qe=s9(),Xe=M(qe);Ns(Xe,{get kind(){return l(Ne)._kind},get src(){return l(Ne).previewURL},variant:"tile",crossorigin:"anonymous"});var ct=D(Xe,2),Ke=R(ct);q(()=>Z(Ke,l(Ne).description)),T(me,qe)},$$slots:{default:!0}})},$$slots:{renderItem:!0}})},$$slots:{default:!0}})};U(Ce,We=>{l(N).length?We(Ve,!1):We($e)},!0)}T(_e,Ae)};U(be,_e=>{l(N)?_e(Ee,!1):_e(ue)},!0)}T(X,fe)};U(ce,X=>{l(j)?X(he):X(re,!1)})}T(Y,te)},J=Y=>{var te=W(),ce=M(te);{var he=X=>{Tr(X,{children:(fe,be)=>{var ue=l9(),Ee=M(ue),_e=R(Ee);{var Ae=pe=>{var ye=W(),we=M(ye);br(we,()=>fi.sanitize(s()("prefs.media.stock_photos.description",{values:{service:l(p),homeHref:`href="${l(v)}"`,apiKeyHref:`href="${l(_)}"`}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})),T(pe,ye)};U(_e,pe=>{l(f)==="stock_photos"&&pe(Ae)})}var Ce=D(_e,2);{var $e=pe=>{var ye=W(),we=M(ye);br(we,()=>fi.sanitize(s()(`cloud_storage.auth.${l(I)}`,{values:{service:l(p)}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})),T(pe,ye)};U(Ce,pe=>{l(f)==="cloud_storage"&&pe($e)})}var Ve=D(Ee,2);{var We=pe=>{var ye=o9(),we=R(ye);const xe=w(()=>s()("prefs.media.stock_photos.field_label",{values:{service:l(p)}}));Pn(we,{flex:!0,spellcheck:"false",get"aria-label"(){return l(xe)},oninput:Ne=>{const me=Ne.target.value.trim();l(b)?.test(me)&&($(A,ie(me)),$(E,!0),At(Tt,Se(i).apiKeys??={},Se(i)),At(Tt,Se(i).apiKeys[l(h)]=l(A),Se(i)),B())}}),T(pe,ye)};U(Ve,pe=>{l(m)==="api_key"&&pe(We)})}var ht=D(Ve,2);{var Ge=pe=>{var ye=a9(),we=M(ye),xe=R(we);const Ne=w(()=>s()("user_name")),me=w(()=>l(I)==="requested");Pn(xe,{flex:!0,spellcheck:"false",get"aria-label"(){return l(Ne)},get disabled(){return l(me)},get value(){return S.userName},set value(bt){S.userName=bt}});var Pe=D(we,2),qe=R(Pe);const Xe=w(()=>s()("password")),ct=w(()=>l(I)==="requested");_F(qe,{get"aria-label"(){return l(Xe)},get disabled(){return l(ct)},get value(){return S.password},set value(bt){S.password=bt}});var Ke=D(Pe,2),nt=R(Ke);const dt=w(()=>s()("sign_in")),ut=w(()=>!S.userName||!S.password||l(I)==="requested");Ze(nt,{variant:"secondary",get label(){return l(dt)},get disabled(){return l(ut)},onclick:async()=>{$(I,"requested"),S.userName=S.userName.trim(),S.password=S.password.trim(),await l(x)?.(S.userName,S.password)?($(I,"success"),$(O,ie(S.userName)),$(L,ie(S.password)),$(E,!0),At(Tt,Se(i).logins??={},Se(i)),At(Tt,Se(i).logins[l(h)]=[l(O),l(L)].join(" "),Se(i)),B()):$(I,"error")}}),T(pe,ye)};U(ht,pe=>{l(m)==="password"&&pe(Ge)})}T(fe,ue)},$$slots:{default:!0}})},re=X=>{Tr(X,{children:(fe,be)=>{var ue=c9(),Ee=R(ue);q(_e=>Z(Ee,_e),[()=>s()("cloud_storage.invalid")]),T(fe,ue)},$$slots:{default:!0}})};U(ce,X=>{l(C)?X(he):X(re,!1)},!0)}T(Y,te)};U(K,Y=>{l(E)?Y(ee):Y(J,!1)})}T(t,G),oe(),r()}const hc=st(""),Pu=t=>t.normalize("NFD").replace(/\p{Diacritic}/gu,"").toLocaleLowerCase(),YA=ur([ii,en,hc],([t,e,n],r)=>{const i=n?Pu(n):"",s=c=>Pu(c).includes(i),o=!t.length||!i?[]:t.map(c=>{let u=0;return co(c).forEach(d=>{s(d.label||d.name)&&(u+=10),s(qo(d,c,{useTemplate:!0,allowMarkdown:!0}))&&(u+=10),u+=Zo(d,c).filter(f=>s(f.label||f.name)).length,Object.values(c.locales).forEach(({content:f})=>{u+=Object.values(f).filter(h=>typeof h=="string"&&!!h&&s(h)).length})}),{entry:c,points:u}}).filter(({points:c})=>c>0).sort((c,u)=>u.points-c.points).map(c=>c.entry),a=!e.length||!i?[]:e.filter(c=>Pu(c.name).includes(i));r({entries:o,assets:a})}),l1=(t,e=Fe)=>{var n=W(),r=M(n);br(r,()=>fi.sanitize(e().replace(/([-_.])/g,"$1<wbr>"),{ALLOWED_TAGS:["wbr"]})),T(t,n)};var d9=F('<strong class="svelte-7q7g7u"><!></strong>'),f9=F("<!>/",1),h9=F('<!> <span role="none" class="name svelte-7q7g7u"></span>',1),p9=F('<div role="none" class="grid-wrapper svelte-7q7g7u"><!></div>'),g9=F('<span role="none"> </span>');const m9={hash:"svelte-7q7g7u",code:'.grid-wrapper.svelte-7q7g7u {overflow-y:auto;height:100%;}.grid-wrapper.svelte-7q7g7u [role="listbox"] {background-color:transparent;}.name.svelte-7q7g7u {color:var(--sui-tertiary-foreground-color);}.name.svelte-7q7g7u strong:where(.svelte-7q7g7u) {color:var(--sui-primary-foreground-color);font-weight:var(--sui-font-weight-normal);}'};function JA(t,e){se(e,!0),Te(t,m9);const[n,r]=ve(),i=()=>z(le,"$_",n);let s=P(e,"assets",19,()=>[]),o=P(e,"viewType",3,"grid"),a=P(e,"searchTerms",3,""),c=P(e,"basePath",3,void 0),u=P(e,"gridId",3,void 0),d=P(e,"checkerboard",3,!1),f=P(e,"onSelect",3,void 0);const h=w(()=>a()?s().filter(({name:_})=>Pu(_).includes(a())):s());var p=W(),g=M(p);{var m=_=>{var b=p9(),y=R(b);KA(y,{get gridId(){return u()},get viewType(){return o()},showTitle:!0,onChange:({value:x})=>{f()?.({asset:s().find(({path:k})=>k===x)})},children:(x,k)=>{Ua(x,{get items(){return l(h)},itemKey:"path",renderItem:(C,E=Fe)=>{const A=w(()=>{const{kind:I,name:N,path:j}=E();return{kind:I,name:N,path:j}}),O=w(()=>c()?Fn(l(A).path.replace(c(),"")):l(A).name),L=w(()=>l(O).split("/"));mr(C,{label:"",get value(){return l(A).path},children:(I,N)=>{var j=h9(),H=M(j);Ns(H,{get kind(){return l(A).kind},get asset(){return E()},variant:"tile",get checkerboard(){return d()}});var B=D(H,2);ft(B,21,()=>l(L),cr,(V,G,K)=>{var ee=W(),J=M(ee);{var Y=ce=>{var he=d9(),re=R(he);l1(re,()=>l(G)),T(ce,he)},te=ce=>{var he=f9(),re=M(he);l1(re,()=>l(G)),T(ce,he)};U(J,ce=>{K===l(L).length-1?ce(Y):ce(te,!1)})}T(V,ee)}),T(I,j)},$$slots:{default:!0}})},$$slots:{renderItem:!0}})},$$slots:{default:!0}}),T(_,b)},v=_=>{Tr(_,{children:(b,y)=>{var x=g9(),k=R(x);q(S=>Z(k,S),[()=>i()("no_files_found")]),T(b,x)},$$slots:{default:!0}})};U(g,_=>{l(h).length?_(m):_(v,!1)})}T(t,p),oe(),r()}function gm(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(fc,"$selectAssetsView",n);let s=P(e,"assets",19,()=>[]),o=P(e,"selectedAsset",15,null),a=P(e,"showUploader",3,!1),c=P(e,"searchTerms",3,""),u=P(e,"basePath",3,void 0),d=ae(void 0);Be(()=>{o()||Se(()=>{l(d)?.reset()})});const f=w(()=>e.kind==="image"?"image/*":void 0);$t(Ud(t,{get accept(){return l(f)},get showUploadButton(){return a()},showFilePreview:!0,onSelect:({files:h})=>{o(h.length?{file:h[0]}:null)},children:(h,p)=>{var g=W(),m=M(g);{var v=_=>{const b=w(()=>s().sort((x,k)=>x.name.localeCompare(k.name))),y=w(()=>i()?.type);JA(_,{get assets(){return l(b)},get viewType(){return l(y)},get searchTerms(){return c()},get basePath(){return u()},gridId:"select-assets-grid",checkerboard:!0,onSelect:({asset:x})=>{o({asset:x})}})};U(m,_=>{a()||_(v)})}T(h,g)},$$slots:{default:!0}}),h=>$(d,ie(h)),()=>l(d)),oe(),r()}const v9=["en-US","pt-BR","es-ES","ca-ES","de-DE","it-IT","fr-FR","sv-SE","id-ID","pl-PL","ja-JP","zh-TW","zh-CN","ko-KR","th-TH","nl-NL","hu-HU","vi-VN","cs-CZ","da-DK","fi-FI","uk-UA","el-GR","ro-RO","nb-NO","sk-SK","tr-TR","ru-RU"],c1="https://api.pexels.com/v1",b9=async(t,{apiKey:e})=>{const n={Authorization:e},[r]=ne(Nn).toLowerCase().split("-");let i=[];if(t)for(let s=1;s<=2;s+=1){const o=new URLSearchParams({query:t,locale:v9.find(d=>d.split("-")[0]===r)||"en-US",page:s,per_page:80}),a=await fetch(`${c1}/search?${o.toString()}`,{headers:n});if(!a.ok)return Promise.reject();const{photos:c,next_page:u}=await a.json();if(i.push(...c),!u)break;await vn(50)}else{const s=new URLSearchParams({per_page:80}),o=await fetch(`${c1}/curated?${s.toString()}`,{headers:n});if(!o.ok)return Promise.reject();i=(await o.json()).photos}return i.map(({id:s,url:o,alt:a,src:{large2x:c,medium:u},photographer:d})=>({id:String(s),description:o.match(/\/photo\/(?<alt>.+?)-\d+\/$/)?.groups?.alt.replace(/-/g," ")??a,previewURL:u,downloadURL:c,fileName:`pexels-${d.split(/\s+/).join("-").toLowerCase()}-${s}.jpg`,kind:"image",credit:`<a href="${o}">Photo by ${d} on Pexels</a>`}))},_9={serviceType:"stock_photos",serviceId:"pexels",serviceLabel:"Pexels",serviceURL:"https://www.pexels.com/",showServiceLink:!0,hotlinking:!1,authType:"api_key",developerURL:"https://www.pexels.com/api/",apiKeyURL:"https://www.pexels.com/api/new/",apiKeyPattern:/^[a-zA-Z\d]{56}$/,search:b9},y9=["cs","da","de","en","es","fr","id","it","hu","nl","no","pl","pt","ro","sk","fi","sv","tr","vi","th","bg","ru","el","ja","ko","zh"],w9="https://pixabay.com/api",x9=async(t,{apiKey:e})=>{const[n]=ne(Nn).toLowerCase().split("-"),r=new URLSearchParams({key:e,q:t,lang:y9.includes(n)?n:"en",image_type:"photo",min_width:1280,editors_choice:!t,safesearch:!0,per_page:150}),i=await fetch(`${w9}/?${r.toString()}`);return i.ok?(await i.json()).hits.map(({id:o,webformatURL:a,previewURL:c,largeImageURL:u,imageWidth:d,imageHeight:f,pageURL:h,tags:p,user:g})=>({id:String(o),description:p,previewURL:a.replace("_640.",d>f?"_180.":"_340."),downloadURL:u,fileName:c.split("/").pop().replace("_150.","_1280."),kind:"image",credit:`<a href="${h}">Photo by ${g} on Pixabay`})):Promise.reject()},k9={serviceType:"stock_photos",serviceId:"pixabay",serviceLabel:"Pixabay",serviceURL:"https://pixabay.com/",showServiceLink:!0,hotlinking:!1,authType:"api_key",developerURL:"https://pixabay.com/service/about/api/",apiKeyURL:"https://pixabay.com/api/docs/#api_key",apiKeyPattern:/^\d+-[a-f\d]{25}$/,search:x9},S9=["af","sq","am","ar","hy","as","az","bn","ba","eu","bs","bg","yue","ca","lzh","zh-Hans","zh-Hant","hr","cs","da","prs","dv","nl","en","et","fo","fj","fil","fi","fr","fr-ca","gl","ka","de","el","gu","ht","he","hi","mww","hu","is","id","ikt","iu","iu-Latn","ga","it","ja","kn","kk","km","ko","ku","kmr","ky","lo","lv","lt","mk","mg","ms","ml","mt","mi","mr","mn-Cyrl","mn-Mong","my","ne","nb","or","ps","fa","pl","pt","pt-pt","pa","otq","ro","ru","sm","sr-Cyrl","sr-Latn","sk","sl","so","es","sw","sv","ty","ta","tt","te","th","bo","ti","to","tr","tk","uk","hsb","ur","ug","uz","vi","cy","yua","zu"],u1="https://api.unsplash.com",d1="utm_source=sveltia-cms&utm_medium=referral",E9=async(t,{apiKey:e})=>{const n={Authorization:`Client-ID ${e}`},[r]=ne(Nn).toLowerCase().split("-");let i=[];if(t)for(let s=1;s<=5;s+=1){const o=new URLSearchParams({query:t,lang:S9.includes(r)?r:"en",page:s,per_page:30}),a=await fetch(`${u1}/search/photos?${o.toString()}`,{headers:n});if(!a.ok)return Promise.reject();const{results:c,total_pages:u}=await a.json();if(i.push(...c),u===s)break;await vn(50)}else{const s=new URLSearchParams({per_page:30}),o=await fetch(`${u1}/photos?${s.toString()}`,{headers:n});if(!o.ok)return Promise.reject();i=await o.json()}return i.map(({id:s,description:o,alt_description:a,urls:{regular:c,thumb:u},user:{username:d,name:f}})=>({id:String(s),description:[o,a].filter(Boolean).join(" — "),previewURL:u,downloadURL:c,fileName:`${f.split(/\s+/).join("-").toLowerCase()}-${s}-unsplash.jpg`,kind:"image",credit:`Photo by <a href="https://unsplash.com/@${d}?${d1}">${f}</a> on <a href="https://unsplash.com/?${d1}">Unsplash</a>`}))},T9={serviceType:"stock_photos",serviceId:"unsplash",serviceLabel:"Unsplash",serviceURL:"https://unsplash.com/",showServiceLink:!0,hotlinking:!0,authType:"api_key",developerURL:"https://unsplash.com/developers",apiKeyURL:"https://unsplash.com/oauth/applications",apiKeyPattern:/^[a-zA-Z\d-]{40,}$/,search:E9},wf={},mu={pexels:_9,pixabay:k9,unsplash:T9};var C9=F("<!> <!>",1),A9=F("<a> </a>"),P9=F("<!> <!> <!>",1),O9=F("<!> <!>",1),$9=F("<!> <!> <!> <!>",1),L9=F('<div role="none"> </div> <!>',1),N9=F('<div role="none" class="wrapper svelte-v3cscd"><!> <div role="none" class="content-pane svelte-v3cscd"><!> <!> <!> <!></div></div>');const I9={hash:"svelte-v3cscd",code:".wrapper.svelte-v3cscd {display:flex;gap:16px;height:60vh;}.wrapper.svelte-v3cscd .listbox {flex:none;background-color:transparent;}.wrapper.svelte-v3cscd .content-pane:where(.svelte-v3cscd) {overflow:auto;flex:auto;}"};function R9(t,e){se(e,!0),Te(t,I9);const[n,r]=ve(),i=()=>z(le,"$_",n),s=()=>z(Vn,"$selectedCollection",n),o=()=>z(Tt,"$prefs",n),a=()=>z(tl,"$showContentOverlay",n),c=()=>z(fc,"$selectAssetsView",n),u=()=>z(en,"$allAssets",n),d=()=>z(Z_,"$globalAssetFolder",n);let f=P(e,"open",15,!1),h=P(e,"canEnterURL",3,!0),p=P(e,"onSelect",3,void 0),g=ae(""),m=ae(null),v=ae(""),_=ae(""),b=ae("uncategorized-assets");const y=w(()=>e.kind==="image"?i()("assets_dialog.title.image"):i()("assets_dialog.title.file")),x=w(()=>Pu(l(_))),k=w(()=>s()?._assetFolder?.internalPath??""),S=w(()=>s()?._assetFolder?.entryRelative??!1),C=w(()=>!!l(k)&&!l(S)),E=w(()=>!!e.entry&&l(S)),A=w(()=>l(b)==="upload"),O=w(()=>e.entry?Ln(Object.values(e.entry.locales)[0].path).dirname:void 0),L=w(()=>l(b).endsWith("-assets")),I=w(()=>Object.keys(mu).includes(l(b))&&o()?.apiKeys?.[l(b)]||Object.keys(wf).includes(l(b))&&o()?.logins?.[l(b)]);cn(()=>{$(g,`library-${Gn("short")}`)}),Be(()=>{$(b,ie(l(E)?"entry-assets":l(C)?"collection-assets":"uncategorized-assets"))}),Be(()=>{f()&&$(v,"")}),Be(()=>{a()||f(!1)});const N=w(()=>i()("insert")),j=w(()=>!l(m));is(t,{get title(){return l(y)},size:"x-large",get okLabel(){return l(N)},get okDisabled(){return l(j)},onOk:()=>{p()?.({asset:l(m)})},get open(){return f()},set open(V){f(V)},headerExtra:V=>{var G=W(),K=M(G);{var ee=J=>{var Y=C9(),te=M(Y);{var ce=fe=>{const be=w(()=>fc);_y(fe,{get currentView(){return l(be)},"aria-controls":"select-assets-grid"})};U(te,fe=>{c()&&fe(ce)})}var he=D(te,2);const re=w(()=>!!l(m)?.file),X=w(()=>i()(`assets_dialog.search_for_${e.kind??"file"}`));ob(he,{get disabled(){return l(re)},get"aria-label"(){return l(X)},get value(){return l(_)},set value(fe){$(_,ie(fe))}}),T(J,Y)};U(K,J=>{(l(L)||l(I))&&J(ee)})}T(V,G)},footerExtra:V=>{var G=W(),K=M(G);{var ee=J=>{var Y=W();const te=w(()=>{const{showServiceLink:re,serviceLabel:X,serviceURL:fe}=mu[l(b)]??{};return{showServiceLink:re,serviceLabel:X,serviceURL:fe}});var ce=M(Y);{var he=re=>{var X=A9(),fe=R(X);q(be=>{ke(X,"href",l(te).serviceURL),Z(fe,be)},[()=>i()("prefs.media.stock_photos.credit",{values:{service:l(te).serviceLabel}})]),T(re,X)};U(ce,re=>{l(te).showServiceLink&&re(he)})}T(J,Y)};U(K,J=>{l(I)&&J(ee)})}T(V,G)},children:(V,G)=>{var K=N9(),ee=R(K);const J=w(()=>i()("assets_dialog.locations"));hd(ee,{class:"tabs",get"aria-label"(){return l(J)},get"aria-controls"(){return`${l(g)??""}-content-pane`},onChange:ue=>{$(b,ie(ue.detail.name)),$(m,null)},children:(ue,Ee)=>{var _e=$9(),Ae=M(_e);const Ce=w(()=>i()("assets_dialog.location.repository"));Zd(Ae,{get label(){return l(Ce)},children:(ye,we)=>{var xe=P9(),Ne=M(xe);{var me=nt=>{const dt=w(()=>i()("entry_assets")),ut=w(()=>l(b)==="entry-assets");mr(nt,{name:"entry-assets",get label(){return l(dt)},get selected(){return l(ut)}})};U(Ne,nt=>{l(E)&&nt(me)})}var Pe=D(Ne,2);{var qe=nt=>{const dt=w(()=>i()("collection_assets")),ut=w(()=>l(b)==="collection-assets");mr(nt,{name:"collection-assets",get label(){return l(dt)},get selected(){return l(ut)}})};U(Pe,nt=>{l(C)&&nt(qe)})}var Xe=D(Pe,2);const ct=w(()=>i()("uncategorized")),Ke=w(()=>l(b)==="uncategorized-assets");mr(Xe,{name:"uncategorized-assets",get label(){return l(ct)},get selected(){return l(Ke)}}),T(ye,xe)},$$slots:{default:!0}});var $e=D(Ae,2);const Ve=w(()=>i()("assets_dialog.location.local"));Zd($e,{get label(){return l(Ve)},children:(ye,we)=>{const xe=w(()=>i()("upload"));mr(ye,{name:"upload",get label(){return l(xe)},get selected(){return l(A)}})},$$slots:{default:!0}});var We=D($e,2);{var ht=ye=>{const we=w(()=>i()("assets_dialog.location.external_locations"));Zd(ye,{get label(){return l(we)},children:(xe,Ne)=>{var me=O9(),Pe=M(me);{var qe=ct=>{const Ke=w(()=>i()("assets_dialog.enter_url"));mr(ct,{name:"enter-url",get label(){return l(Ke)}})};U(Pe,ct=>{h()&&ct(qe)})}var Xe=D(Pe,2);ft(Xe,17,()=>Object.values(wf),({serviceId:ct,serviceLabel:Ke})=>ct,(ct,Ke)=>{let nt=()=>l(Ke).serviceId,dt=()=>l(Ke).serviceLabel;mr(ct,{get name(){return nt()},get label(){return dt()}})}),T(xe,me)},$$slots:{default:!0}})};U(We,ye=>{(h()||Object.keys(wf).length)&&ye(ht)})}var Ge=D(We,2);const pe=w(()=>i()("assets_dialog.location.stock_photos"));Zd(Ge,{get label(){return l(pe)},children:(ye,we)=>{var xe=W(),Ne=M(xe);ft(Ne,17,()=>Object.values(mu),({serviceId:me,serviceLabel:Pe})=>me,(me,Pe)=>{let qe=()=>l(Pe).serviceId,Xe=()=>l(Pe).serviceLabel;mr(me,{get name(){return qe()},get label(){return Xe()}})}),T(ye,xe)},$$slots:{default:!0}}),T(ue,_e)},$$slots:{default:!0}});var Y=D(ee,2),te=R(Y);{var ce=ue=>{const Ee=w(()=>u().filter(_e=>(!e.kind||e.kind===_e.kind)&&Ln(_e.path).dirname===l(O)));gm(ue,{get kind(){return e.kind},get assets(){return l(Ee)},get showUploader(){return l(A)},get searchTerms(){return l(x)},get selectedAsset(){return l(m)},set selectedAsset(_e){$(m,ie(_e))}})},he=ue=>{var Ee=W(),_e=M(Ee);{var Ae=$e=>{const Ve=w(()=>u().filter(We=>(!e.kind||e.kind===We.kind)&&We.folder===l(k)));gm($e,{get kind(){return e.kind},get assets(){return l(Ve)},get showUploader(){return l(A)},get searchTerms(){return l(x)},get basePath(){return l(k)},get selectedAsset(){return l(m)},set selectedAsset(We){$(m,ie(We))}})},Ce=$e=>{var Ve=W(),We=M(Ve);{var ht=Ge=>{const pe=w(()=>u().filter(we=>(!e.kind||e.kind===we.kind)&&we.folder===d()?.internalPath)),ye=w(()=>d()?.internalPath);gm(Ge,{get kind(){return e.kind},get assets(){return l(pe)},get showUploader(){return l(A)},get searchTerms(){return l(x)},get basePath(){return l(ye)},get selectedAsset(){return l(m)},set selectedAsset(we){$(m,ie(we))}})};U(We,Ge=>{(l(b)==="uncategorized-assets"||l(A))&&Ge(ht)},!0)}T($e,Ve)};U(_e,$e=>{l(C)&&(l(b)==="collection-assets"||l(A))?$e(Ae):$e(Ce,!1)},!0)}T(ue,Ee)};U(te,ue=>{l(E)&&(l(b)==="entry-assets"||l(A))?ue(ce):ue(he,!1)})}var re=D(te,2);{var X=ue=>{Tr(ue,{children:(Ee,_e)=>{var Ae=L9(),Ce=M(Ae),$e=R(Ce),Ve=D(Ce,2);Pn(Ve,{flex:!0,oninput:()=>{$(m,ie(l(v).trim()?{url:l(v).trim()}:null))},get value(){return l(v)},set value(We){$(v,ie(We))}}),q(We=>Z($e,We),[()=>e.kind==="image"?i()("assets_dialog.enter_image_url"):i()("assets_dialog.enter_file_url")]),T(Ee,Ae)},$$slots:{default:!0}})};U(re,ue=>{h()&&l(b)==="enter-url"&&ue(X)})}var fe=D(re,2);ft(fe,17,()=>Object.entries(wf),([ue,Ee])=>ue,(ue,Ee)=>{let _e=()=>l(Ee)[0],Ae=()=>l(Ee)[1];var Ce=W(),$e=M(Ce);{var Ve=We=>{a1(We,{get kind(){return e.kind},get searchTerms(){return l(x)},get serviceProps(){return Ae()},gridId:"select-assets-grid",onSelect:ht=>{$(m,ie(ht))}})};U($e,We=>{l(b)===_e()&&We(Ve)})}T(ue,Ce)});var be=D(fe,2);ft(be,17,()=>Object.entries(mu),([ue,Ee])=>ue,(ue,Ee)=>{let _e=()=>l(Ee)[0],Ae=()=>l(Ee)[1];var Ce=W(),$e=M(Ce);{var Ve=We=>{a1(We,{get kind(){return e.kind},get searchTerms(){return l(x)},get serviceProps(){return Ae()},gridId:"select-assets-grid",onSelect:ht=>{$(m,ie(ht))}})};U($e,We=>{l(b)===_e()&&We(Ve)})}T(ue,Ce)}),q(()=>ke(Y,"id",`${l(g)??""}-content-pane`)),T(V,K)},$$slots:{headerExtra:!0,footerExtra:!0,default:!0}}),oe(),r()}var D9=F('<span role="none" class="preview no-thumbnail"><!></span>'),M9=F('<div role="textbox" tabindex="0" class="filename svelte-7plsvm"><!></div>'),F9=F('<div role="none" class="filled svelte-7plsvm"><!> <div role="none" class="svelte-7plsvm"><!> <div role="none"><!> <!></div></div></div>'),z9=F('<!> <div role="none"><!></div>',1),j9=F('<div class="empty svelte-7plsvm"><!></div>'),U9=F('<div role="none"> </div> <div role="none"><!></div>',1),B9=F("<!> <!> <!> <!>",1);const q9={hash:"svelte-7plsvm",code:".filled.svelte-7plsvm {display:flex !important;align-items:center;gap:16px;margin:var(--sui-focus-ring-width);}.filled.svelte-7plsvm .preview {flex:none;width:160px !important;height:160px !important;border-width:1px;border-color:var(--sui-control-border-color);border-radius:var(--sui-control-medium-border-radius);}.filled.svelte-7plsvm .preview.no-thumbnail {display:flex;align-items:center;justify-content:center;background-color:var(--sui-secondary-background-color);}.filled.svelte-7plsvm .preview.no-thumbnail .icon {font-size:64px;}.filled.svelte-7plsvm > div:where(.svelte-7plsvm) {flex:auto;overflow:hidden;}.filled.svelte-7plsvm > div:where(.svelte-7plsvm) .filename:where(.svelte-7plsvm) {margin:var(--sui-focus-ring-width);padding:4px;word-break:break-all;}.filled.svelte-7plsvm > div:where(.svelte-7plsvm) .filename:where(.svelte-7plsvm):empty {margin:0;padding:0;}.empty.svelte-7plsvm button {flex-direction:column;justify-content:center;height:160px;}.empty.svelte-7plsvm button .icon {color:var(--sui-secondary-foreground-color);font-size:48px;}.empty.svelte-7plsvm button:disabled {pointer-events:none !important;}.empty.svelte-7plsvm button:disabled * {opacity:0.5;}.empty.invalid.svelte-7plsvm button {border-color:var(--sui-error-border-color);}"};function f1(t,e){se(e,!1),Te(t,q9);const[n,r]=ve(),i=()=>z(rt,"$entryDraft",n),s=()=>z(le,"$_",n),o=de(),a=de(),c=de(),u=de(),d=de(),f=de();P(e,"locale",8),P(e,"keyPath",8);let h=P(e,"fieldId",8);P(e,"fieldLabel",8);let p=P(e,"fieldConfig",8),g=P(e,"currentValue",12),m=P(e,"readonly",8,!1),v=P(e,"required",8,!0),_=P(e,"invalid",8,!1),b=P(e,"inEditorComponent",8,!1),y=de(),x=de(),k,S=de(),C=de(),E,A=de(!1),O=de(!1),L=de(!1),I=de(""),N=de();const j=()=>{g(""),$(y,void 0),$(x,void 0),k=void 0,E=void 0,l(N)?.reset()},H=async X=>{j(),$(y,X.asset),$(x,X.file),k=X.url,E=X.credit,l(y)&&g(rg(l(y),{pathOnly:!0,allowSpecial:!0,entry:l(f)})),l(x)&&(l(u)&&l(c)!==void 0&&Number.isInteger(l(c))&&l(x).size>l(c)?$(O,!0):(g(URL.createObjectURL(l(x))),At(rt,Se(i).files[g()]=l(x),Se(i)))),k&&g(k),E&&($(I,fi.sanitize(E,{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href"]})),$(L,!0))},B=async()=>{g()?.startsWith("blob:")&&i()&&$(x,i().files[g()]),g()?g().startsWith("blob:")?($(y,void 0),$(S,g()?await XC(g()):void 0),$(C,g()&&l(S)?await uc(g(),l(f),{thumbnail:!0}):void 0)):l(u)&&/^https?:/.test(g())?($(y,void 0),$(S,"image"),$(C,g())):($(y,ty(g(),{entry:l(f),collection:l(d)})),$(S,void 0),$(C,void 0)):($(y,void 0),$(x,void 0),$(S,void 0),$(C,void 0))};Me(()=>(l(o),l(a),l(c),vt(p())),()=>{(X=>($(o,X.widget),$(a,it(X.choose_url,!0)),$(c,it(it(it(X.media_library,()=>({}),!0).config,()=>({}),!0).max_file_size,void 0))))(p())}),Me(()=>l(o),()=>{$(u,l(o)==="image")}),Me(()=>i(),()=>{$(d,i()?.collection)}),Me(()=>i(),()=>{$(f,i()?.originalEntry)}),Me(()=>vt(g()),()=>{g(),B()}),Hr(),Lr();var V=B9(),G=M(V);const K=Ye(()=>l(u)?"image/*":void 0);$t(Ud(G,{get disabled(){return m()},get accept(){return l(K)},onSelect:({files:X})=>{X.length&&H({file:X[0]})},children:(X,fe)=>{var be=W(),ue=M(be);{var Ee=Ae=>{var Ce=F9(),$e=R(Ce);{var Ve=qe=>{Ns(qe,{get kind(){return l(S)},get src(){return l(C)},variant:"tile",checkerboard:!0})},We=qe=>{var Xe=W(),ct=M(Xe);{var Ke=dt=>{Ns(dt,{get kind(){return l(y).kind},get asset(){return l(y)},variant:"tile",checkerboard:!0})},nt=dt=>{var ut=D9(),bt=R(ut);et(bt,{name:"draft"}),T(dt,ut)};U(ct,dt=>{l(y)?dt(Ke):dt(nt,!1)},!0)}T(qe,Xe)};U($e,qe=>{l(S)&&l(C)?qe(Ve):qe(We,!1)})}var ht=D($e,2),Ge=R(ht);{var pe=qe=>{var Xe=M9(),ct=R(Xe);{var Ke=dt=>{var ut=Ue();q(bt=>Z(ut,bt),[()=>decodeURI(l(x).name.normalize())],Ye),T(dt,ut)},nt=dt=>{var ut=W(),bt=M(ut);{var Ct=sn=>{var Rn=Ue();q(Xn=>Z(Rn,Xn),[()=>decodeURI(g())],Ye),T(sn,Rn)};U(bt,sn=>{g().startsWith("blob:")||sn(Ct)},!0)}T(dt,ut)};U(ct,dt=>{l(x)?dt(Ke):dt(nt,!1)})}q(()=>{ke(Xe,"id",`${h()??""}-value`),ke(Xe,"aria-readonly",m()),ke(Xe,"aria-invalid",_()),ke(Xe,"aria-required",v()),ke(Xe,"aria-labelledby",`${h()??""}-label`),ke(Xe,"aria-errormessage",`${h()??""}-error`)}),T(qe,Xe)};U(Ge,qe=>{typeof g()=="string"&&qe(pe)})}var ye=D(Ge,2),we=R(ye);const xe=Ye(()=>s()("replace")),Ne=Ye(()=>s()(`replace_${l(o)}`));Ze(we,{get disabled(){return m()},variant:"tertiary",get label(){return l(xe)},get"aria-label"(){return l(Ne)},get"aria-controls"(){return`${h()??""}-value`},onclick:()=>{$(A,!0)}});var me=D(we,2);{var Pe=qe=>{const Xe=Ye(()=>s()("remove")),ct=Ye(()=>s()(`remove_${l(o)}`));Ze(qe,{get disabled(){return m()},variant:"tertiary",get label(){return l(Xe)},get"aria-label"(){return l(ct)},get"aria-controls"(){return`${h()??""}-value`},onclick:()=>{j()}})};U(me,qe=>{b()||qe(Pe)})}T(Ae,Ce)},_e=Ae=>{var Ce=j9(),$e=R(Ce);Ze($e,{flex:!0,role:"button",variant:"tertiary",get disabled(){return m()},tabindex:"0",onclick:()=>{m()||$(A,!0)},children:(Ve,We)=>{var ht=z9(),Ge=M(ht);et(Ge,{name:"cloud_upload"});var pe=D(Ge,2),ye=R(pe);{var we=Ne=>{var me=Ue();q(Pe=>Z(me,Pe),[()=>s()(zh()?"drop_or_browse_image_file":"browse_file")],Ye),T(Ne,me)},xe=Ne=>{var me=Ue();q(Pe=>Z(me,Pe),[()=>s()(zh()?"drop_or_browse_file":"browse_file")],Ye),T(Ne,me)};U(ye,Ne=>{l(u)?Ne(we):Ne(xe,!1)})}T(Ve,ht)},$$slots:{default:!0}}),q(()=>pt(Ce,"invalid",_())),T(Ae,Ce)};U(ue,Ae=>{g()?Ae(Ee):Ae(_e,!1)})}T(X,be)},$$slots:{default:!0},$$legacy:!0}),X=>$(N,X),()=>l(N));var ee=D(G,2);const J=Ye(()=>l(u)?"image":void 0);R9(ee,{get kind(){return l(J)},get canEnterURL(){return l(a)},get entry(){return l(f)},onSelect:({asset:X})=>{H(X)},get open(){return l(A)},set open(X){$(A,X)},$$legacy:!0});var Y=D(ee,2);const te=Ye(()=>s()("assets_dialog.large_file.title"));Hk(Y,{get title(){return l(te)},get open(){return l(O)},set open(X){$(O,X)},children:(X,fe)=>{var be=Ue();q(ue=>Z(be,ue),[()=>s()("assets_dialog.large_file.description",{values:{size:K_(l(c))}})],Ye),T(X,be)},$$slots:{default:!0},$$legacy:!0});var ce=D(Y,2);const he=Ye(()=>s()("assets_dialog.photo_credit.title")),re=Ye(()=>s()("copy"));xc(ce,{get title(){return l(he)},get okLabel(){return l(re)},onOk:()=>{navigator.clipboard.writeText(l(I))},get open(){return l(L)},set open(X){$(L,X)},children:(X,fe)=>{var be=U9(),ue=M(be),Ee=R(ue),_e=D(ue,2),Ae=R(_e);Tp(Ae,{flex:!0,readonly:!0,get value(){return l(I)},onclick:Ce=>{Ce.target.focus(),Ce.target.select()}}),q(Ce=>Z(Ee,Ce),[()=>s()("assets_dialog.photo_credit.description")],Ye),T(X,be)},$$slots:{default:!0},$$legacy:!0}),T(t,V),oe(),r()}var H9=F("<p><!></p>"),V9=F("<p> </p>");function h1(t,e){se(e,!1);const[n,r]=ve(),i=()=>z(rt,"$entryDraft",n);P(e,"locale",8),P(e,"keyPath",8),P(e,"fieldConfig",8);let s=P(e,"currentValue",8),o=de(),a=de();const c=async()=>{$(o,s()?await XC(s()):void 0),$(a,s()&&l(o)?await uc(s(),i()?.originalEntry):void 0)};Me(()=>vt(s()),()=>{s(),c()}),Hr(),Lr();var u=W(),d=M(u);{var f=p=>{var g=H9(),m=R(g);const v=Ye(()=>["audio","video"].includes(l(o)));Ns(m,{get kind(){return l(o)},get src(){return l(a)},get controls(){return l(v)}}),T(p,g)},h=p=>{var g=W(),m=M(g);{var v=_=>{var b=V9(),y=R(b);q(()=>Z(y,s())),T(_,b)};U(m,_=>{typeof s()=="string"&&s().trim()&&!s().startsWith("blob:")&&_(v)},!0)}T(p,g)};U(d,p=>{l(o)&&l(a)?p(f):p(h,!1)})}T(t,u),oe(),r()}var W9=F('<div role="alert" class="validation svelte-1rv50nx" aria-live="polite"><div role="none" class="svelte-1rv50nx"><!> <!></div></div>');const G9={hash:"svelte-1rv50nx",code:".validation.svelte-1rv50nx {color:var(--sui-error-foreground-color) !important;font-size:var(--sui-font-size-small);}.validation.svelte-1rv50nx div:where(.svelte-1rv50nx) {display:flex;align-items:center;gap:4px;margin:4px 0;}.validation.svelte-1rv50nx div:where(.svelte-1rv50nx) .icon {flex:none;font-size:16px; /* !hardcoded */}"};function ZA(t,e){Te(t,G9);var n=W9(),r=R(n),i=R(r);et(i,{name:"error"});var s=D(i,2);Re(s,()=>e.children),q(()=>ke(n,"id",e.id)),T(t,n)}var K9=F('<th scope="col" class="action svelte-5r6rgh"></th>'),Y9=F('<td class="action svelte-5r6rgh"><!></td>'),J9=F('<tr><td class="key svelte-5r6rgh"><!></td><td class="value svelte-5r6rgh"><!></td><!></tr>'),Z9=F('<table class="svelte-5r6rgh"><thead><tr><th scope="col" class="key svelte-5r6rgh"> </th><th scope="col" class="value svelte-5r6rgh"> </th><!></tr></thead><tbody></tbody></table>'),X9=F("<!> <!>",1),Q9=F("<!> <!> <div><!></div>",1);const eV={hash:"svelte-5r6rgh",code:`table.svelte-5r6rgh {width:-moz-available;width:-webkit-fill-available;width:stretch;}th.svelte-5r6rgh,
587
+ td.svelte-5r6rgh {border-width:0;}th.svelte-5r6rgh {padding-block:4px;color:var(--sui-tertiary-foreground-color);font-size:var(--sui-font-size-small);font-weight:var(--sui-font-weight-normal);text-align:left;}th.key.svelte-5r6rgh, th.value.svelte-5r6rgh {width:50%;}td.svelte-5r6rgh {padding:0;vertical-align:middle;}`};function tV(t,e){se(e,!1),Te(t,eV);const[n,r]=ve(),i=()=>z(le,"$_",n),s=()=>z(rt,"$entryDraft",n),o=de(),a=de(),c=de(),u=de();let d=P(e,"locale",8),f=P(e,"keyPath",8),h=P(e,"fieldId",8);P(e,"fieldLabel",8);let p=P(e,"fieldConfig",8);P(e,"currentValue",8);let g=P(e,"readonly",8,!1);P(e,"required",8,!0),P(e,"invalid",8,!1);let m=de([]);const v=de([]);let _=de([]),b=de([]);const y=()=>{if(!s())return;const V=fy({entryDraft:rt,keyPath:f(),locale:d()});zn(l(m),V)||($(m,V),$(_,V.map(()=>!1))),!l(m).length&&s().currentValues[d()][f()]!==null&&At(rt,Se(s).currentValues[d()][f()]=null,Se(s))},x=()=>{s()&&(Object.entries(s().currentValues).forEach(([B,V])=>{(B===d()||l(o)==="duplicate")&&delete V[f()]}),$(m,[...l(m),["",""]]),$(_,[...l(_),!1]),window.requestAnimationFrame(()=>{l(v)[l(m).length-1].querySelector("input").focus()}))},k=B=>{l(m).splice(B,1),$(m,[...l(m)]),l(_).splice(B,1),$(_,[...l(_)])},S=()=>{if($(b,k8({pairs:l(m),edited:l(_)})),!s()||l(b).some(Boolean)||l(m).some(([V])=>!V.trim()))return;S8({entryDraft:rt,fieldConfig:p(),keyPath:f(),locale:d(),pairs:l(m)})};Me(()=>(l(o),l(a),i(),l(c),l(u),vt(p())),()=>{(B=>($(o,it(B.i18n,!1)),$(a,it(B.key_label,()=>i()("key_value.key"),!0)),$(c,it(B.value_label,()=>i()("key_value.value"),!0)),$(u,it(B.max,1/0))))(p())}),Me(()=>(s(),vt(d())),()=>{s()?.currentValues[d()],y()}),Me(()=>l(m),()=>{l(m),S()}),Hr(),Lr();var C=Q9(),E=M(C);{var A=B=>{var V=Z9(),G=R(V),K=R(G),ee=R(K),J=R(ee),Y=D(ee),te=R(Y),ce=D(Y);{var he=X=>{var fe=K9();q(be=>ke(fe,"aria-label",be),[()=>i()("key_value.action")],Ye),T(X,fe)};U(ce,X=>{g()||X(he)})}var re=D(G);ft(re,5,()=>l(m),cr,(X,fe,be)=>{var ue=J9(),Ee=R(ue),_e=R(Ee);const Ae=Ye(()=>!!l(b)[be]),Ce=Ye(()=>l(b)[be]?`${h()}-kv-error`:void 0);Pn(_e,{get readonly(){return g()},flex:!0,get invalid(){return l(Ae)},get"aria-label"(){return l(a)},get"aria-errormessage"(){return l(Ce)},oninput:()=>{Hy(_,l(_)[be]=!0)},onkeydown:Ge=>{Ge.key==="Enter"&&!Ge.isComposing&&l(v)[be].querySelector("td.value input").focus()},get value(){return l(fe)[0]},set value(Ge){l(fe)[0]=Ge,Ky(()=>l(m))},$$legacy:!0});var $e=D(Ee),Ve=R($e);Pn(Ve,{get readonly(){return g()},flex:!0,get"aria-label"(){return l(c)},onkeydown:Ge=>{Ge.key==="Enter"&&!Ge.isComposing&&(be<l(m).length-1?l(v)[be+1].querySelector("input").focus():l(m).length<l(u)&&x())},get value(){return l(fe)[1]},set value(Ge){l(fe)[1]=Ge,Ky(()=>l(m))},$$legacy:!0});var We=D($e);{var ht=Ge=>{var pe=Y9(),ye=R(pe);const we=Ye(()=>i()("remove"));Ze(ye,{variant:"ghost",size:"small",iconic:!0,get"aria-label"(){return l(we)},onclick:()=>{k(be)},startIcon:Ne=>{et(Ne,{name:"close"})},$$slots:{startIcon:!0}}),T(Ge,pe)};U(We,Ge=>{g()||Ge(ht)})}$t(ue,(Ge,pe)=>Hy(v,l(v)[pe]=Ge),Ge=>l(v)?.[Ge],()=>[be]),T(X,ue)}),q(()=>{Z(J,l(a)),Z(te,l(c))}),T(B,V)};U(E,B=>{l(m).length&&B(A)})}var O=D(E,2);{var L=B=>{ZA(B,{get id(){return`${h()??""}-kv-error`},children:(V,G)=>{var K=X9(),ee=M(K);{var J=ce=>{var he=Ue();q(re=>Z(he,re),[()=>i()("key_value.empty_key")],Ye),T(ce,he)};U(ee,ce=>{l(b).includes("empty")&&ce(J)})}var Y=D(ee,2);{var te=ce=>{var he=Ue();q(re=>Z(he,re),[()=>i()("key_value.duplicate_key")],Ye),T(ce,he)};U(Y,ce=>{l(b).includes("duplicate")&&ce(te)})}T(V,K)}})};U(O,B=>{l(b).some(Boolean)&&B(L)})}var I=D(O,2),N=R(I);const j=Ye(()=>i()("add")),H=Ye(()=>g()||l(m).length>=l(u));Ze(N,{get label(){return l(j)},variant:"tertiary",get disabled(){return l(H)},onclick:()=>{x()}}),T(t,C),oe(),r()}var nV=F('<tr><td class="svelte-1ni5ht9"> </td><td class="svelte-1ni5ht9"> </td></tr>'),rV=F('<table class="svelte-1ni5ht9"><thead><tr><th scope="col" class="svelte-1ni5ht9"> </th><th scope="col" class="svelte-1ni5ht9"> </th></tr></thead><tbody></tbody></table>');const iV={hash:"svelte-1ni5ht9",code:'@charset "UTF-8";table.svelte-1ni5ht9 {width:-moz-available;width:-webkit-fill-available;width:stretch;}th.svelte-1ni5ht9 {padding-block:4px;width:50%;color:var(--sui-tertiary-foreground-color);background-color:var(--sui-tertiary-background-color);font-size:var(--sui-font-size-small);font-weight:var(--sui-font-weight-normal);text-align:left;}td.svelte-1ni5ht9:empty::after {content:" ";}'};function sV(t,e){se(e,!1),Te(t,iV);const[n,r]=ve(),i=()=>z(le,"$_",n),s=()=>z(rt,"$entryDraft",n),o=de(),a=de();let c=P(e,"locale",8),u=P(e,"keyPath",8),d=P(e,"fieldConfig",8);P(e,"currentValue",8);let f=de([]);const h=()=>{const _=fy({entryDraft:rt,keyPath:u(),locale:c()});zn(l(f),_)||$(f,_)};Me(()=>(l(o),i(),l(a),vt(d())),()=>{(v=>($(o,it(v.key_label,()=>i()("key_value.key"),!0)),$(a,it(v.value_label,()=>i()("key_value.value"),!0))))(d())}),Me(()=>(s(),vt(c())),()=>{s()&&(s().currentValues[c()],h())}),Hr(),Lr();var p=W(),g=M(p);{var m=v=>{var _=rV(),b=R(_),y=R(b),x=R(y),k=R(x),S=D(x),C=R(S),E=D(b);ft(E,5,()=>l(f),cr,(A,O)=>{let L=()=>l(O)[0],I=()=>l(O)[1];var N=nV(),j=R(N),H=R(j),B=D(j),V=R(B);q(()=>{Z(H,L()),Z(V,I())}),T(A,N)}),q(()=>{Z(k,l(o)),Z(C,l(a))}),T(v,_)};U(g,v=>{l(f).length&&v(m)})}T(t,p),oe(),r()}function Uv(t,e){se(e,!1);const[n,r]=ve(),i=()=>z(le,"$_",n),s=de(),o=de(),a=de(),c=de(),u=de(),d=de(),f=de(),h=de(),p=de();let g=P(e,"disabled",8,!1),m=P(e,"fieldConfig",8),v=P(e,"items",24,()=>[]),_=P(e,"addItem",8,S=>{});Me(()=>(l(s),l(o),l(a),l(c),vt(m())),()=>{(S=>($(s,S.widget),$(o,S.name),$(a,S.label),$(c,S.types)))(m())}),Me(()=>(l(s),vt(m())),()=>{$(u,l(s)==="list"?m():void 0)}),Me(()=>l(u),()=>{$(d,l(u)?.label_singular??"")}),Me(()=>l(u),()=>{$(f,l(u)?.max??void 0)}),Me(()=>(i(),l(d),l(a),l(o)),()=>{$(h,i()("add_x",{values:{name:l(d)||l(a)||l(o)}}))}),Me(()=>(vt(g()),l(f),vt(v())),()=>{$(p,g()||typeof l(f)=="number"&&v().length===l(f))}),Hr(),Lr();var b=W(),y=M(b);{var x=S=>{Nr(S,{variant:"tertiary",get label(){return l(h)},get disabled(){return l(p)},endIcon:A=>{et(A,{name:"add"})},popup:A=>{const O=Ye(()=>i()("select_list_type"));wr(A,{get"aria-label"(){return l(O)},children:(L,I)=>{var N=W(),j=M(N);ft(j,1,()=>l(c),({name:H,label:B})=>H,(H,B)=>{let V=()=>l(B).name,G=()=>l(B).label;const K=Ye(()=>G()||V());Nt(H,{get label(){return l(K)},onclick:()=>_()(V())})}),T(L,N)},$$slots:{default:!0}})},$$slots:{endIcon:!0,popup:!0}})},k=S=>{Ze(S,{variant:"tertiary",get label(){return l(h)},get disabled(){return l(p)},onclick:()=>_()(),startIcon:E=>{et(E,{name:"add"})},$$slots:{startIcon:!0}})};U(y,S=>{Array.isArray(l(c))?S(x):S(k,!1)})}T(t,b),oe(),r()}var oV=F('<span role="none" class="type svelte-drw5o5"> </span>'),aV=F('<div role="none" class="header svelte-drw5o5"><div role="none" class="svelte-drw5o5"><!></div> <div role="none" class="svelte-drw5o5"><!></div> <div role="none" class="svelte-drw5o5"><!></div></div>');const lV={hash:"svelte-drw5o5",code:".header.svelte-drw5o5 {display:flex;align-items:center;gap:8px;background-color:var(--sui-secondary-border-color);}.header.svelte-drw5o5 > div:where(.svelte-drw5o5) {display:flex;align-items:center;}.header.svelte-drw5o5 > div:where(.svelte-drw5o5):first-child {justify-content:flex-start;width:40%;}.header.svelte-drw5o5 > div:where(.svelte-drw5o5):nth-child(2) {width:20%;justify-content:center;}.header.svelte-drw5o5 > div:where(.svelte-drw5o5):last-child {width:40%;justify-content:flex-end;}.header.svelte-drw5o5 button {padding:0;height:16px;}.header.svelte-drw5o5 .type:where(.svelte-drw5o5) {font-size:var(--sui-font-size-small);font-weight:var(--sui-font-weight-bold);color:var(--sui-secondary-foreground-color);}"};function XA(t,e){se(e,!1),Te(t,lV);const[n,r]=ve(),i=()=>z(le,"$_",n);let s=P(e,"label",8,""),o=P(e,"controlId",8),a=P(e,"expanded",8),c=P(e,"toggleExpanded",8),u=P(e,"removeButtonVisible",8,!1),d=P(e,"removeButtonDisabled",8,!1),f=P(e,"remove",8),h=P(e,"children",8,void 0);Lr();var p=aV(),g=R(p),m=R(g);const v=Ye(()=>!c()),_=Ye(()=>a()?i()("collapse"):i()("expand"));Ze(m,{size:"small",get disabled(){return l(v)},get"aria-label"(){return l(_)},get"aria-expanded"(){return a()},get"aria-controls"(){return o()},onclick:()=>{c()?.()},startIcon:E=>{const A=Ye(()=>a()?"expand_more":"chevron_right");et(E,{get name(){return l(A)}})},children:(E,A)=>{var O=W(),L=M(O);{var I=N=>{var j=oV(),H=R(j);q(()=>Z(H,s())),T(N,j)};U(L,N=>{s()&&N(I)})}T(E,O)},$$slots:{startIcon:!0,default:!0}});var b=D(g,2),y=R(b);Re(y,()=>h()??Fe);var x=D(b,2),k=R(x);{var S=C=>{const E=Ye(()=>i()("remove_this_item"));Ze(C,{size:"small",iconic:!0,get disabled(){return d()},get"aria-label"(){return l(E)},onclick:()=>{f()()},startIcon:O=>{et(O,{name:"close"})},$$slots:{startIcon:!0}})};U(k,C=>{u()&&C(S)})}T(t,p),oe(),r()}var cV=F("<!> <!>",1),uV=F('<div role="none" class="toolbar top svelte-iirqfr"><!></div>'),dV=F("<!> <!> <!>",1),fV=F('<div role="none" class="summary svelte-iirqfr"> </div>'),hV=F('<div role="none" class="item svelte-iirqfr"><!> <div role="none" class="item-body"><!></div></div>'),pV=F('<div role="none" class="toolbar bottom svelte-iirqfr"><!> <!></div>'),gV=F('<div role="none" class="toolbar top svelte-iirqfr"><!> <div role="none" class="summary svelte-iirqfr"> </div> <!> <!></div> <!> <div role="none" class="item-list svelte-iirqfr"></div> <!>',1);const mV={hash:"svelte-iirqfr",code:".toolbar.svelte-iirqfr {display:flex;align-items:center;}.summary.svelte-iirqfr {overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}.item-list.collapsed.svelte-iirqfr {display:none;}.item.svelte-iirqfr {margin:16px 0;border-width:2px;border-color:var(--sui-secondary-border-color);border-radius:var(--sui-control-medium-border-radius);}.item.svelte-iirqfr .summary:where(.svelte-iirqfr) {padding:8px;}.item.svelte-iirqfr .summary:where(.svelte-iirqfr):empty {display:none;}"};function vV(t,e){se(e,!1),Te(t,mV);const[n,r]=ve(),i=()=>z(rt,"$entryDraft",n),s=()=>z(le,"$_",n),o=de(),a=de(),c=de(),u=de(),d=de(),f=de(),h=de(),p=de(),g=de(),m=de(),v=de(),_=de(),b=de(),y=de(),x=de(),k=de(),S=de(),C=de(),E=de(),A=de(),O=de(),L=de(),I=de(),N=de(),j=de(),H=de(),B=de(),V=de(),G=de(),K=de(),ee=de();let J=P(e,"locale",8),Y=P(e,"keyPath",8),te=P(e,"fieldId",8);P(e,"fieldLabel",8);let ce=P(e,"fieldConfig",8),he=P(e,"currentValue",8),re=P(e,"readonly",8,!1),X=P(e,"required",8,!0),fe=P(e,"invalid",8,!1),be=de(!1),ue=de(""),Ee=de("");cn(()=>{$(be,!0),$(ue,Gn("short")),Js({[l(V)]:!l(h),...Object.fromEntries(l(K).map((pe,ye)=>{const we=`${Y()}.${ye}`;return[we,l(N)?._[we]??!l(d)]}))})});const _e=()=>{const pe=he().join(", ");!/,\s*$/.test(l(Ee))&&l(Ee).trim()!==pe&&$(Ee,pe)},Ae=()=>{const pe=l(Ee).split(/,/g).map(ye=>ye.trim()).filter(ye=>ye!=="");Object.keys(i()?.currentValues??{}).forEach(ye=>{l(c)!=="duplicate"&&ye!==J()||(Object.keys(i()?.currentValues[ye]??{}).forEach(we=>{we.match(`^${ln(Y())}\\.\\d+$`)&&delete i()?.currentValues[ye][we]}),pe.forEach((we,xe)=>{At(rt,Se(i).currentValues[ye][`${Y()}.${xe}`]=we,Se(i))}))})},Ce=pe=>{Object.keys(i()?.currentValues??{}).forEach(ye=>{l(c)!=="duplicate"&&ye!==J()||HA(ye,Y(),pe)})},$e=pe=>{Ce(({valueList:ye,expanderStateList:we})=>{const xe=pe?l(_)?.find(({name:Pe})=>Pe===pe)?.fields??[]:l(m)??(l(g)?[l(g)]:[]),Ne=l(v)?0:ye.length,me=za(lg(xe,J()));pe&&(me[l(b)]=pe),ye.splice(Ne,0,l(y)&&l(g)?me[l(g).name]:me),we.splice(Ne,0,!0)})},Ve=pe=>{Ce(({valueList:ye,expanderStateList:we})=>{ye.splice(pe,1),we.splice(pe,1)})},We=pe=>{Ce(({valueList:ye,expanderStateList:we})=>{[ye[pe],ye[pe-1]]=[ye[pe-1],ye[pe]],[we[pe],we[pe-1]]=[we[pe-1],we[pe]]})},ht=pe=>{Ce(({valueList:ye,expanderStateList:we})=>{[ye[pe],ye[pe+1]]=[ye[pe+1],ye[pe]],[we[pe],we[pe+1]]=[we[pe+1],we[pe]]})},Ge=(pe,ye)=>uq({collectionName:l(A),fileName:l(L),keyPath:Y(),valueMap:l(B),locale:J(),summaryTemplate:ye,hasSingleSubField:l(y),index:pe});Me(()=>(l(o),l(a),l(c),l(u),l(d),l(f),l(h),l(p),l(g),l(m),l(v),l(_),l(b),vt(ce())),()=>{(pe=>($(o,pe.name),$(a,pe.label),$(c,pe.i18n),$(u,it(pe.allow_add,!0)),$(d,it(pe.collapsed,!1)),$(f,pe.summary),$(h,it(pe.minimize_collapsed,!1)),$(p,pe.label_singular),$(g,pe.field),$(m,pe.fields),$(v,it(pe.add_to_top,!1)),$(_,pe.types),$(b,it(pe.typeKey,"type"))))(ce())}),Me(()=>l(g),()=>{$(y,!!l(g))}),Me(()=>l(m),()=>{$(x,Array.isArray(l(m)))}),Me(()=>l(_),()=>{$(k,Array.isArray(l(_)))}),Me(()=>(l(y),l(x),l(k)),()=>{$(S,l(y)||l(x)||l(k))}),Me(()=>vt(Y()),()=>{$(C,new RegExp(`^${ln(Y())}\\.(\\d+)(.*)?`))}),Me(()=>i(),()=>{$(E,i()?.collection)}),Me(()=>i(),()=>{$(A,i()?.collectionName??"")}),Me(()=>i(),()=>{$(O,i()?.collectionFile)}),Me(()=>i(),()=>{$(L,i()?.fileName)}),Me(()=>i(),()=>{$(I,i()?.currentValues??{})}),Me(()=>i(),()=>{$(N,i()?.expanderStates)}),Me(()=>(l(j),l(O),l(E),Ri),()=>{(pe=>$(j,pe.defaultLocale))((l(O)??l(E))?._i18n??Ri)}),Me(()=>(vt(J()),l(j),l(c)),()=>{$(H,J()!==l(j)&&l(c)==="duplicate")}),Me(()=>(l(I),vt(J())),()=>{$(B,l(I)[J()])}),Me(()=>vt(Y()),()=>{$(V,`${Y()}#`)}),Me(()=>(l(N),l(V)),()=>{$(G,l(N)?._[l(V)]??!0)}),Me(()=>(l(B),l(C),vt(Y()),l(o)),()=>{$(K,za(Object.fromEntries(Object.entries(l(B)).filter(([pe])=>l(C).test(pe)).map(([pe,ye])=>[pe.replace(new RegExp(`^${ln(Y())}`),l(o)),ye])))[l(o)]??[])}),Me(()=>(l(K),vt(Y()),l(N)),()=>{$(ee,l(K).map((pe,ye)=>{const we=`${Y()}.${ye}`;return[we,l(N)?._[we]??!0]}))}),Me(()=>(l(be),l(S),vt(he())),()=>{l(be)&&!l(S)&&(he(),_e())}),Hr(),Lr(),_r(t,{get"aria-labelledby"(){return`list-${l(ue)??""}-summary`},children:(pe,ye)=>{var we=W(),xe=M(we);{var Ne=Pe=>{var qe=gV(),Xe=M(qe),ct=R(Xe);const Ke=Ye(()=>!l(K).length),nt=Ye(()=>l(G)?s()("collapse"):s()("expand"));Ze(ct,{iconic:!0,get disabled(){return l(Ke)},get"aria-label"(){return l(nt)},get"aria-expanded"(){return l(G)},get"aria-controls"(){return`list-${l(ue)??""}-item-list`},onclick:()=>{Js({[l(V)]:!l(G)})},startIcon:yn=>{const Gt=Ye(()=>l(G)?"expand_more":"chevron_right");et(yn,{get name(){return l(Gt)}})},$$slots:{startIcon:!0}});var dt=D(ct,2),ut=R(dt),bt=D(dt,2);Xr(bt,{flex:!0});var Ct=D(bt,2);{var sn=Lt=>{var yn=cV(),Gt=M(yn);const yt=Ye(()=>s()("expand_all")),Xt=Ye(()=>l(ee).every(([,Yt])=>Yt));Ze(Gt,{variant:"tertiary",size:"small",get label(){return l(yt)},get disabled(){return l(Xt)},onclick:()=>{Js(Object.fromEntries(l(ee).map(([Yt])=>[Yt,!0])))}});var $n=D(Gt,2);const wn=Ye(()=>s()("collapse_all")),qt=Ye(()=>l(ee).every(([,Yt])=>!Yt));Ze($n,{variant:"tertiary",size:"small",get label(){return l(wn)},get disabled(){return l(qt)},onclick:()=>{Js(Object.fromEntries(l(ee).map(([Yt])=>[Yt,!1])))}}),T(Lt,yn)};U(Ct,Lt=>{l(G)&&l(K).length>1&&Lt(sn)})}var Rn=D(Xe,2);{var Xn=Lt=>{var yn=uV(),Gt=R(yn);Uv(Gt,{get disabled(){return l(H)},get fieldConfig(){return ce()},get items(){return l(K)},addItem:$e}),T(Lt,yn)};U(Rn,Lt=>{l(u)&&(l(v)||!l(K).length)&&Lt(Xn)})}var kr=D(Rn,2);ft(kr,5,()=>l(K),cr,(Lt,yn,Gt)=>{var yt=hV();const Xt=Ye(()=>`${Y()}.${Gt}`),$n=Ye(()=>l(N)?._[l(Xt)]??!0),wn=Ye(()=>l(k)?l(_)?.find(({name:Bn})=>Bn===l(yn)[l(b)]):void 0),qt=Ye(()=>l(k)?l(wn)?.fields??[]:l(m)??(l(g)?[l(g)]:[])),Yt=Ye(()=>l(k)&&l(wn)?.summary||l(f));var fn=R(yt);const Dn=Ye(()=>l(k)?l(wn)?.label||l(wn)?.name:""),Qn=Ye(()=>l(qt).length?()=>Js({[l(Xt)]:!l($n)}):void 0);XA(fn,{get label(){return l(Dn)},get controlId(){return`list-${l(ue)??""}-item-${Gt??""}-body`},get expanded(){return l($n)},get toggleExpanded(){return l(Qn)},removeButtonVisible:!0,get removeButtonDisabled(){return l(H)},remove:()=>{Ve(Gt)},children:(Bn,zt)=>{var oi=dV(),Ht=M(oi);const Qt=Ye(()=>l(H)||Gt===0),Qe=Ye(()=>s()("move_up"));Ze(Ht,{size:"small",iconic:!0,get disabled(){return l(Qt)},get"aria-label"(){return l(Qe)},onclick:()=>{We(Gt)},startIcon:qn=>{et(qn,{name:"arrow_upward"})},$$slots:{startIcon:!0}});var xt=D(Ht,2);Xr(xt,{});var xn=D(xt,2);const tr=Ye(()=>l(H)||Gt===l(K).length-1),js=Ye(()=>s()("move_down"));Ze(xn,{iconic:!0,size:"small",get disabled(){return l(tr)},get"aria-label"(){return l(js)},onclick:()=>{ht(Gt)},startIcon:qn=>{et(qn,{name:"arrow_downward"})},$$slots:{startIcon:!0}}),T(Bn,oi)},$$slots:{default:!0}});var er=D(fn,2),si=R(er);{var cs=Bn=>{var zt=W(),oi=M(zt);ft(oi,1,()=>l(qt),Ht=>Ht.name,(Ht,Qt)=>{var Qe=W(),xt=M(Qe);yr(xt,()=>vn(0),null,xn=>{const tr=Ye(()=>l(y)?`${Y()}.${Gt}`:`${Y()}.${Gt}.${l(Qt).name}`);ky(xn,{get keyPath(){return l(tr)},get locale(){return J()},get fieldConfig(){return l(Qt)}})}),T(Ht,Qe)}),T(Bn,zt)},fr=Bn=>{var zt=fV(),oi=R(zt);q(Ht=>Z(oi,Ht),[()=>Ge(Gt,l(Yt))],Ye),T(Bn,zt)};U(si,Bn=>{l($n)?Bn(cs):Bn(fr,!1)})}q(()=>ke(er,"id",`list-${l(ue)??""}-item-${Gt??""}-body`)),T(Lt,yt)});var zi=D(kr,2);{var mi=Lt=>{var yn=pV(),Gt=R(yn);Uv(Gt,{get disabled(){return l(H)},get fieldConfig(){return ce()},get items(){return l(K)},addItem:$e});var yt=D(Gt,2);Xr(yt,{flex:!0}),T(Lt,yn)};U(zi,Lt=>{l(u)&&!l(v)&&l(K).length&&Lt(mi)})}q(()=>{ke(dt,"id",`object-${l(ue)??""}-summary`),Z(ut,`${l(K).length??""}
588
+ ${((l(K).length===1?l(p):void 0)||l(a)||l(o))??""}`),ke(kr,"id",`list-${l(ue)??""}-item-list`),pt(kr,"collapsed",!l(G))}),T(Pe,qe)},me=Pe=>{Pn(Pe,{flex:!0,get readonly(){return re()},get required(){return X()},get invalid(){return fe()},get"aria-errormessage"(){return`${te()??""}-error`},oninput:()=>{Ae()},get value(){return l(Ee)},set value(qe){$(Ee,qe)},$$legacy:!0})};U(xe,Pe=>{l(S)?Pe(Ne):Pe(me,!1)})}T(pe,we)},$$slots:{default:!0}}),oe(),r()}var bV=(t,e)=>{t.key==="Enter"&&(t.stopPropagation(),e())},_V=(t,e)=>{t.stopPropagation(),e()},yV=F('<section role="group" tabindex="0" class="svelte-11ls1m1"><h4 class="svelte-11ls1m1"> </h4> <!></section>');const wV={hash:"svelte-11ls1m1",code:"section.svelte-11ls1m1 {overflow:hidden;margin:8px 0;padding:8px 0;}section.svelte-11ls1m1 > * {margin-right:auto;margin-left:auto;max-width:768px;}section.svelte-11ls1m1 h4:where(.svelte-11ls1m1) {color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-small);}section.svelte-11ls1m1 h4:where(.svelte-11ls1m1):not(:last-child) {margin-bottom:8px;}section.svelte-11ls1m1 p {margin:8px auto 0;-webkit-user-select:text;user-select:text;}section.svelte-11ls1m1 img {max-height:800px !important;}"};function wy(t,e){se(e,!0),Te(t,wV);const[n,r]=ve(),i=()=>z(rt,"$entryDraft",n),s=w(()=>e.fieldConfig.name),o=w(()=>it(e.fieldConfig.label,"")),a=w(()=>it(e.fieldConfig.widget,"string")),c=w(()=>it(e.fieldConfig.preview,!0)),u=w(()=>it(e.fieldConfig.i18n,!1)),d=w(()=>["relation","select"].includes(l(a))),f=w(()=>l(d)?e.fieldConfig.multiple:void 0),h=w(()=>l(a)==="list"||l(d)&&l(f)),p=w(()=>i()?.collection),g=w(()=>i()?.collectionName??""),m=w(()=>i()?.collectionFile),v=w(()=>i()?.fileName),_=w(()=>Zr(i()?.currentValues[e.locale]??{})),b=w(()=>(l(m)??l(p))?._i18n??Ri),y=w(()=>l(b).i18nEnabled),x=w(()=>l(b).defaultLocale),k=w(()=>l(y)&&(l(u)===!0||l(u)==="translate")),S=w(()=>l(y)&&l(u)==="duplicate"),C=w(()=>new RegExp(`^${ln(e.keyPath)}\\.\\d+$`)),E=w(()=>l(h)?Object.entries(l(_)).filter(([N])=>l(C).test(N)).map(([,N])=>N).filter(N=>N!==void 0):l(_)[e.keyPath]),A=()=>{Js(Object.fromEntries(vA({collectionName:l(g),fileName:l(v),valueMap:l(_),keyPath:e.keyPath}).map(N=>[N,!0]))),window.requestAnimationFrame(()=>{const N=document.querySelector(`.content-editor .pane[data-mode="edit"] .field[data-key-path="${CSS.escape(e.keyPath)}"]`);if(N){typeof N.scrollIntoViewIfNeeded=="function"?N.scrollIntoViewIfNeeded():N.scrollIntoView();const j=N.querySelector(".widget-wrapper");(j?.querySelector('[contenteditable="true"], [tabindex="0"]')??j?.querySelector("input, textarea, button"))?.focus()}})};var O=W(),L=M(O);{var I=N=>{var j=yV();j.__keydown=[bV,A],j.__click=[_V,A];var H=R(j),B=R(H),V=D(H,2);{var G=K=>{var ee=W();const J=w(()=>v1[l(a)]);var Y=M(ee);Ci(Y,()=>l(J),(te,ce)=>{ce(te,{get keyPath(){return e.keyPath},get locale(){return e.locale},get fieldConfig(){return e.fieldConfig},get currentValue(){return l(E)}})}),T(K,ee)};U(V,K=>{l(a)in v1&&K(G)})}q(()=>{ke(j,"data-widget",l(a)),ke(j,"data-key-path",e.keyPath),Z(B,l(o)||l(s))}),T(N,j)};U(L,N=>{l(a)!=="hidden"&&l(c)&&(e.locale===l(x)||l(k)||l(S))&&N(I)})}T(t,O),oe(),r()}Va(["keydown","click"]);var xV=F('<div role="none" class="header svelte-1bztb9y"> </div>'),kV=F('<div role="group" class="subsection svelte-1bztb9y"><!> <div class="items svelte-1bztb9y"><!></div></div>');const SV={hash:"svelte-1bztb9y",code:".subsection.svelte-1bztb9y {margin:16px auto;border:2px solid var(--sui-secondary-border-color);border-radius:var(--sui-control-medium-border-radius);}.subsection.svelte-1bztb9y .title {font-size:inherit;font-weight:var(--sui-font-weight-normal);}.header.svelte-1bztb9y {display:flex;align-items:center;height:24px;padding-inline:8px;color:var(--sui-secondary-foreground-color);background-color:var(--sui-secondary-border-color);font-size:var(--sui-font-size-small);font-weight:var(--sui-font-weight-bold);}.items.svelte-1bztb9y {padding:8px 16px;}.items.svelte-1bztb9y:empty {display:none;}"};function QA(t,e){se(e,!0),Te(t,SV);const r=`${dr("section")}-header`;let i=ae(void 0);var s=kV(),o=R(s);{var a=d=>{var f=xV();ke(f,"id",r);var h=R(f);q(()=>Z(h,e.label)),T(d,f)};U(o,d=>{e.label&&d(a)})}var c=D(o,2),u=R(c);yr(u,()=>Ru(l(i)),null,d=>{var f=W(),h=M(f);Re(h,()=>e.children??Fe),T(d,f)}),$t(s,d=>$(i,d),()=>l(i)),q(()=>ke(s,"aria-labelledby",e.label?r:void 0)),T(t,s),oe()}var EV=F('<p dir="auto"> </p>');function TV(t,e){se(e,!1);const[n,r]=ve(),i=()=>z(rt,"$entryDraft",n),s=de(),o=de(),a=de(),c=de(),u=de(),d=de(),f=de(),h=de(),p=de();let g=P(e,"locale",8),m=P(e,"keyPath",8),v=P(e,"fieldConfig",8),_=P(e,"currentValue",8);Me(()=>(l(s),l(o),l(a),l(c),l(u),vt(v())),()=>{(S=>($(s,S.name),$(o,S.field),$(a,S.fields),$(c,S.types),$(u,it(S.typeKey,"type"))))(v())}),Me(()=>(l(o),l(a),l(c)),()=>{$(d,!!(l(o)??l(a)??l(c)))}),Me(()=>vt(m()),()=>{$(f,new RegExp(`^${ln(m())}\\.\\d+`))}),Me(()=>vt(g()),()=>{$(h,oc(g()))}),Me(()=>(i(),vt(g()),l(f),vt(m()),l(s)),()=>{$(p,za(Object.fromEntries(Object.entries(i()?.currentValues[g()]??{}).filter(([S])=>l(f).test(S)).map(([S,C])=>[S.replace(new RegExp(`^${ln(m())}`),l(s)),C])))[l(s)]??[])}),Hr(),Lr();var b=W(),y=M(b);{var x=S=>{var C=W(),E=M(C);ft(E,1,()=>l(p),cr,(A,O,L)=>{const I=Ye(()=>Array.isArray(l(c))?i()?.currentValues[g()][`${m()}.${L}.${l(u)}`]:void 0),N=Ye(()=>l(c)?.find(({name:B})=>B===l(I))),j=Ye(()=>l(N)?l(N).label||l(N).name:void 0),H=Ye(()=>l(I)?l(N)?.fields??[]:l(a)??(l(o)?[l(o)]:[]));QA(A,{get label(){return l(j)},children:(B,V)=>{var G=W(),K=M(G);ft(K,1,()=>l(H),ee=>ee.name,(ee,J)=>{var Y=W(),te=M(Y);yr(te,()=>vn(0),null,ce=>{const he=Ye(()=>l(o)?`${m()}.${L}`:`${m()}.${L}.${l(J).name}`);wy(ce,{get keyPath(){return l(he)},get locale(){return g()},get fieldConfig(){return l(J)}})}),T(ee,Y)}),T(B,G)},$$slots:{default:!0}})}),T(S,C)},k=S=>{var C=W(),E=M(C);{var A=O=>{var L=EV(),I=R(L);q(N=>{ke(L,"lang",g()),Z(I,N),L.dir=L.dir},[()=>l(h).format(_())],Ye),T(O,L)};U(E,O=>{Array.isArray(_())&&_().length&&O(A)},!0)}T(S,C)};U(y,S=>{l(d)?S(x):S(k,!1)})}T(t,b),oe(),r()}var CV=(t,e,n)=>{!t.target.matches("button, input, textarea")&&t.key!=="Tab"&&t.preventDefault(),t.target===l(e)&&t.key==="Backspace"&&n()(new CustomEvent("remove"))},AV=F('<section role="group" class="field svelte-z6qmsu"><header role="none"><h4 role="none" class="svelte-z6qmsu"> </h4></header> <div role="none" class="widget-wrapper"><!></div></section>'),PV=F('<div role="group" class="wrapper svelte-z6qmsu" contenteditable="false" tabindex="0"><header role="none" class="svelte-z6qmsu"><h3 role="none" class="svelte-z6qmsu"> </h3> <!></header> <!></div>');const OV={hash:"svelte-z6qmsu",code:".wrapper.svelte-z6qmsu {display:inline-block;border:1px solid var(--sui-secondary-border-color);border-radius:4px;width:100%;color:var(--sui-secondary-foreground-color);background-color:var(--sui-primary-background-color);white-space:normal;-webkit-user-select:none;user-select:none;}.wrapper.svelte-z6qmsu:focus {outline-color:var(--sui-primary-accent-color-translucent);}.wrapper.svelte-z6qmsu > header:where(.svelte-z6qmsu) {display:flex;align-items:center;justify-content:space-between;color:var(--sui-secondary-foreground-color);background-color:var(--sui-selected-background-color);}.wrapper.svelte-z6qmsu > header:where(.svelte-z6qmsu) h3:where(.svelte-z6qmsu) {padding:0 8px;font-size:var(--sui-font-size-small);font-weight:600;}.wrapper.svelte-z6qmsu > header:where(.svelte-z6qmsu) button {padding:0;height:16px;}section.svelte-z6qmsu {margin:0;border-top:1px solid var(--sui-secondary-border-color);padding:16px;}section.svelte-z6qmsu h4:where(.svelte-z6qmsu) {margin-bottom:8px;font-size:var(--sui-font-size-small);font-weight:600;color:var(--sui-secondary-foreground-color);}"};function $V(t,e){se(e,!0),Te(t,OV);const[n,r]=ve(),i=()=>z(le,"$_",n);let s=P(e,"values",19,()=>({})),o=P(e,"onChange",3,()=>{}),a=ae(void 0),c=ae(""),u=ae("");const d=ie({}),f=["image","string"],h=()=>l(a);cn(()=>{window.requestAnimationFrame(()=>{$(c,ie(l(a)?.closest("[data-locale]")?.dataset.locale)),$(u,ie(l(a)?.closest("[data-key-path]")?.dataset.keyPath))})}),Be(()=>{s(),Se(()=>{zn(s(),Zr(d))||Object.assign(d,s())})}),Be(()=>{const S=Zr(d);Se(()=>{zn(s(),S)||o()(new CustomEvent("update",{detail:S}))})});var p=PV();p.__keydown=[CV,a,o];var g=R(p),m=R(g),v=R(m),_=D(m,2);const b=w(()=>i()("remove"));Ze(_,{size:"small",iconic:!0,get"aria-label"(){return l(b)},onclick:()=>{o()(new CustomEvent("remove"))},startIcon:C=>{et(C,{name:"close"})},$$slots:{startIcon:!0}});var y=D(g,2);{var x=S=>{var C=W(),E=M(C);ft(E,17,()=>e.fields,({name:A,label:O,widget:L})=>A,(A,O)=>{let L=()=>l(O).name,I=()=>l(O).label,N=()=>l(O).widget;var j=W(),H=M(j);{var B=V=>{var G=AV();const K=w(()=>qf[N()]);var ee=R(G),J=R(ee),Y=R(J),te=D(ee,2),ce=R(te);const he=w(()=>dr("field")),re=w(()=>I()??L()),X=w(()=>({name:L(),widget:N()}));Ci(ce,()=>l(K),(fe,be)=>{be(fe,{get locale(){return l(c)},get keyPath(){return`${l(u)??""}:${L()??""}`},get fieldId(){return l(he)},get fieldLabel(){return l(re)},get fieldConfig(){return l(X)},inEditorComponent:!0,get currentValue(){return d[L()]},set currentValue(ue){d[L()]=ue}})}),q(fe=>{ke(G,"aria-label",fe),ke(G,"data-widget",N()),ke(G,"data-key-path",`${l(u)??""}:${L()??""}`),Z(Y,I())},[()=>i()("x_field",{values:{field:I()}})]),wi("keydown",G,fe=>{fe.stopPropagation()},!0),T(V,G)};U(H,V=>{N()&&f.includes(N())&&V(B)})}T(A,j)}),T(S,C)};U(y,S=>{l(c)&&l(u)&&S(x)})}$t(p,S=>$(a,S),()=>l(a)),q(()=>{ke(p,"aria-label",e.label),Z(v,e.label)}),T(t,p);var k=oe({getElement:h});return r(),k}Va(["keydown"]);const p1=t=>Object.fromEntries(Object.entries(t).map(([e,n])=>[e,typeof n=="string"?n.trim().replace(/["()[[\]]/g,"\\$&"):""])),LV=t=>({image:{id:"image",icon:"image",label:ne(le)("editor_components.image"),fields:[{name:"src",label:ne(le)("editor_components.src"),widget:"image"},{name:"alt",label:ne(le)("editor_components.alt"),widget:"string"},{name:"title",label:ne(le)("editor_components.title"),widget:"string"},{name:"link",label:ne(le)("editor_components.link"),widget:"string"}],pattern:/\[?!\[(?<alt>.*?)\]\((?<src>.*?)(?: "(?<title>.*?)")?\)(?:\]\((?<link>.*?)\))?/,toBlock:n=>{const{src:r,alt:i,title:s,link:o}=p1(n);if(!r)return"";const a=`![${i}](${r}${s?` "${s}"`:""})`;return o?`[${a}](${o})`:a},toPreview:n=>{const{src:r,alt:i,title:s,link:o}=p1(n),a=`<img src="${r}" alt="${i}" title="${s}">`;return o?`<a href="${o}">${a}</a>`:a}}})[t],NV=({id:t,label:e,fields:n,pattern:r,fromBlock:i,toBlock:s,toPreview:o})=>{const a=o({}).match(/\w+/)?.[0]??t;class c extends IS{__props;constructor(p,g){super(g),this.__props=p}static getType(){return t}isInline(){return!0}static clone(p){return new c(p.__props,p.__key)}static importJSON(p){return u().updateFromJSON(p)}exportJSON(){return{...this.__props,type:t,version:1}}createDOM(){let p,g=null;const m=async({type:_,detail:b})=>{await $l(),g??=Pb(p),g?.update(()=>{_==="update"&&(this.getWritable().__props=b),_==="remove"&&this.remove()})},v=Qv($V,{target:document.createElement("div"),props:{label:e,fields:n,values:this.__props,onChange:m}});return LP(),p=v.getElement(),window.requestAnimationFrame(()=>{p.focus()}),p}exportDOM(){return{element:this.createDOM()}}static importDOM(){const p={[a]:()=>({conversion:g=>({node:u(Object.fromEntries(n.map(({name:m})=>[m,g[m]??""])))}),priority:3})};return t==="image"&&Object.assign(p,{a:g=>{if(g.firstChild?.nodeName.toLowerCase()==="img"){const{href:m}=g,{src:v,alt:_,title:b}=g.firstChild;return{conversion:()=>({node:u({src:v,alt:_,title:b,link:m}),after:()=>[]}),priority:4}}return null}}),p}updateDOM(){return!1}decorate(){return null}}const u=h=>new c(h??Object.fromEntries(n.map(({name:p})=>[p,""]))),d=h=>h instanceof c&&h.getType()===t;return{node:c,createNode:u,transformer:{dependencies:[c],export:h=>d(h)?s(h.__props):null,importRegExp:r,regExp:r,replace:(h,p)=>{const g=p,m=i?.(g)??g.groups??{};h.replace(u(m))},type:"text-match"}}},g1=new Map;class IV{constructor(e){const{id:n}=e,r=g1.get(n),i=r??NV(e);r||g1.set(n,i),Object.assign(this,{...e,...i})}}var RV=F('<div role="none" class="wrapper svelte-1e9a0b3"><!></div>');const DV={hash:"svelte-1e9a0b3",code:`.wrapper.svelte-1e9a0b3 {display:contents;}.wrapper.minimal.svelte-1e9a0b3 [role="textbox"],
589
589
  .wrapper.minimal.svelte-1e9a0b3 textarea {overflow:auto;max-height:240px;}`};function MV(t,e){se(e,!0),Te(t,DV);let n=P(e,"currentValue",15),r=P(e,"required",3,!0),i=P(e,"readonly",3,!1),s=P(e,"invalid",3,!1),o=ae("");const a=w(()=>it(e.fieldConfig.modes,()=>[...KP],!0)),c=w(()=>it(e.fieldConfig.buttons,()=>[...JP],!0)),u=w(()=>it(e.fieldConfig.editor_components,()=>[...XP],!0)),d=w(()=>it(e.fieldConfig.minimal,!1)),f=w(()=>l(a).map(b=>YP[b]).filter(Boolean)),h=w(()=>[...l(c),...l(u).includes("code-block")?["code-block"]:[]].map(b=>ZP[b]).filter(Boolean)),p=w(()=>[...l(u).map(b=>b==="code-block"||b in nw?void 0:LV(b)).filter(b=>!!b),...Object.values(nw)].map(b=>new IV(b))),g=()=>{const b=typeof n()=="string"?n():"";l(o)!==b&&$(o,ie(b))},m=()=>{const b=l(o);n()!==b&&n(b)};Be(()=>{n(),Se(()=>{g()})}),Be(()=>{l(o),Se(()=>{m()})});var v=RV(),_=R(v);yr(_,()=>vn(0),null,b=>{hF(b,{get lang(){return e.locale},get modes(){return l(f)},get buttons(){return l(h)},get components(){return l(p)},flex:!0,get readonly(){return i()},get required(){return r()},get invalid(){return s()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},autoResize:!0,get value(){return l(o)},set value(y){$(o,ie(y))}})}),q(()=>pt(v,"minimal",l(d))),T(t,v),oe()}function FV(){return{useNewRenderer:!0,renderer:{heading(...t){return Ot.Renderer.prototype.heading.call(this,...t).replace(/^<(h\d)/,'<$1 dir="auto"')},list(...t){return Ot.Renderer.prototype.list.call(this,...t).replace(/^<(ol|ul)/,'<$1 dir="auto"')},paragraph(...t){return Ot.Renderer.prototype.paragraph.call(this,...t).replace(/^<p/,'<p dir="auto"')}}}}var zV=F('<div role="none" class="svelte-xzrmoz"><!></div>');const jV={hash:"svelte-xzrmoz",code:"div.svelte-xzrmoz :is(h1, h2, h3, h4, h5, h6, p, ul, ol) {margin:1em 0 0;}div.svelte-xzrmoz :is(video, img) {max-width:100%;max-height:100%;}div.svelte-xzrmoz :is(a:has(img)) {display:inline-block;}div.svelte-xzrmoz :is(a:has(img)) :is(img) {pointer-events:none;}"};function UV(t,e){se(e,!0),Te(t,jV);const[n,r]=ve(),i=()=>z(rt,"$entryDraft",n);let s=ae("");const o=w(()=>it(e.fieldConfig.sanitize_preview,!1)),a={breaks:!0,async:!0,walkTokens:async f=>{if(f.type==="image"){const h=await uc(f.href,i()?.originalEntry);h&&(f.href=h)}}};Ot.use(FV()),Be(()=>{(async()=>$(s,ie(await Ot.parse(e.currentValue??"",a))))()});var c=zV(),u=R(c);{var d=f=>{var h=W(),p=M(h);br(p,()=>l(o)?fi.sanitize(l(s)):l(s)),T(f,h)};U(u,f=>{typeof e.currentValue=="string"&&e.currentValue.trim()&&f(d)})}T(t,c),oe(),r()}function BV(t,e){se(e,!0);let n=P(e,"currentValue",15),r=P(e,"required",3,!0),i=P(e,"readonly",3,!1),s=P(e,"invalid",3,!1),o=ae(void 0),a=ae("");const c=w(()=>it(e.fieldConfig.value_type,"int")),u=w(()=>e.fieldConfig.min),d=w(()=>e.fieldConfig.max),f=w(()=>it(e.fieldConfig.step,1)),h=w(()=>l(c)==="int"||l(c)==="float"),p=()=>{if(n()!==void 0){if(l(h)&&l(o)!==n())if(typeof n()=="number")$(o,ie(n()));else if(typeof n()=="string"){const y=n().trim()?Number(n()):NaN;$(o,ie(Number.isNaN(y)?void 0:y))}else $(o,void 0);!l(h)&&l(a)!==n()&&$(a,ie(String(n())))}},g=()=>{let y;l(h)?l(o)===void 0?y=NaN:l(c)==="int"?y=Number.parseInt(l(h)?String(l(o)):l(a),10):y=Number.parseFloat(l(h)?String(l(o)):l(a)):y=l(a),l(h)&&Number.isNaN(y)&&(y=null),n()!==y&&n(y)};Be(()=>{n(),Se(()=>{p()})}),Be(()=>{l(a),Se(()=>{g()})}),Be(()=>{l(o),Se(()=>{g()})});var m=W(),v=M(m);{var _=y=>{mF(y,{get min(){return l(u)},get max(){return l(d)},get step(){return l(f)},get readonly(){return i()},get required(){return r()},get invalid(){return s()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get value(){return l(o)},set value(x){$(o,ie(x))}})},b=y=>{Pn(y,{get readonly(){return i()},get required(){return r()},get invalid(){return s()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get value(){return l(a)},set value(x){$(a,ie(x))}})};U(v,y=>{l(h)?y(_):y(b,!1)})}T(t,m),oe()}var qV=F('<p dir="auto"><!></p>');function HV(t,e){se(e,!0);const n=w(()=>it(e.fieldConfig.value_type,"int")),r=w(()=>qp(e.locale)),i=w(()=>Intl.NumberFormat(l(r)));var s=W(),o=M(s);{var a=c=>{var u=qV(),d=R(u);{var f=p=>{var g=Ue();q(m=>Z(g,m),[()=>l(i).format(Number(e.currentValue))]),T(p,g)},h=p=>{var g=Ue();q(()=>Z(g,e.currentValue)),T(p,g)};U(d,p=>{l(n)==="int"||l(n)==="float"?p(f):p(h,!1)})}q(()=>{ke(u,"lang",e.locale),u.dir=u.dir}),T(c,u)};U(o,c=>{e.currentValue!==void 0&&e.currentValue!==null&&e.currentValue!==""&&c(a)})}T(t,s),oe()}const VV=({collectionName:t,fileName:e,keyPath:n,valueMap:r,locale:i,summaryTemplate:s})=>s?s.replaceAll(/{{(.+?)}}/g,(o,a)=>{const[c,...u]=a.split(/\s*\|\s*/);return tg({collectionName:t,fileName:e,valueMap:r,keyPath:`${n}.${c.replace(/^fields\./,"")}`,locale:i,transformations:u})}):r[`${n}.title`]||r[`${n}.name`]||Object.entries(r).find(([o,a])=>o.startsWith(`${n}.`)&&typeof a=="string"&&!!a)?.[1]||"";var WV=F('<div role="none" class="summary svelte-23x9on"> </div>'),GV=F('<!> <div role="none" class="item-list"><!></div>',1),KV=F('<div role="none" class="wrapper svelte-23x9on"><!></div>'),YV=F("<!> <!> <!>",1);const JV={hash:"svelte-23x9on",code:".wrapper.svelte-23x9on {display:contents;}.sui.checkbox + .wrapper.svelte-23x9on > .group {margin-top:8px;}.wrapper.svelte-23x9on > .group {border-width:2px;border-color:var(--sui-secondary-border-color);border-radius:var(--sui-control-medium-border-radius);}.summary.svelte-23x9on {overflow:hidden;padding:8px;white-space:nowrap;text-overflow:ellipsis;}.summary.svelte-23x9on:empty {display:none;}"};function ZV(t,e){se(e,!1),Te(t,JV);const[n,r]=ve(),i=()=>z(rt,"$entryDraft",n),s=()=>z(le,"$_",n),o=de(),a=de(),c=de(),u=de(),d=de(),f=de(),h=de(),p=de(),g=de(),m=de(),v=de(),_=de(),b=de(),y=de(),x=de(),k=de(),S=de(),C=de(),E=de(),A=de(),O=de(),L=de(),I=de(),N=de(),j=de();let H=P(e,"locale",8),B=P(e,"keyPath",8);P(e,"fieldId",8);let V=P(e,"fieldLabel",8),G=P(e,"fieldConfig",8);P(e,"currentValue",8),P(e,"readonly",8,!1);let K=P(e,"required",8,!0);P(e,"invalid",8,!1);let ee=de(""),J=de();cn(()=>{$(ee,Gn("short")),Js({[l(C)]:l(b)?._[l(C)]??!l(c)})});const Y=async _e=>{ot(Ji,!1),_e&&(Object.keys(i()?.currentValues??{}).forEach(Ce=>{(Ce===H()||l(a)==="duplicate")&&At(rt,Se(i).currentValues[Ce][l(O)]=_e,Se(i))}),await $l());const Ae=VA(Object.fromEntries(Object.entries(lg(l(I),H())).map(([Ce,$e])=>[`${B()}.${Ce}`,$e])));Object.entries(i()?.currentValues??{}).forEach(([Ce,$e])=>{(Ce===H()||l(a)==="duplicate")&&(At(rt,Se(i).currentValues[Ce]=Object.assign($e,nc({...Ae,...$e})),Se(i)),delete i().currentValues[Ce][B()])}),ot(Ji,!0)},te=()=>{ot(Ji,!1),Object.entries(i()?.currentValues??{}).forEach(([_e,Ae])=>{(_e===H()||l(a)==="duplicate")&&(Object.keys(Ae).forEach(Ce=>{Ce.startsWith(`${B()}.`)&&(At(rt,Se(i).currentValues[_e][Ce]=null,Se(i)),delete i()?.currentValues[_e][Ce])}),At(rt,Se(i).currentValues[_e][B()]=null,Se(i)))}),ot(Ji,!0)},ce=()=>VV({collectionName:l(g),fileName:l(v),keyPath:B(),valueMap:l(x),locale:H(),summaryTemplate:l(N)});Me(()=>(l(o),l(a),l(c),l(u),l(d),l(f),l(h),vt(G())),()=>{(_e=>($(o,_e.name),$(a,it(_e.i18n,!1)),$(c,it(_e.collapsed,!1)),$(u,_e.summary),$(d,_e.fields),$(f,_e.types),$(h,it(_e.typeKey,"type"))))(G())}),Me(()=>i(),()=>{$(p,i()?.collection)}),Me(()=>i(),()=>{$(g,i()?.collectionName??"")}),Me(()=>i(),()=>{$(m,i()?.collectionFile)}),Me(()=>i(),()=>{$(v,i()?.fileName)}),Me(()=>i(),()=>{$(_,i()?.currentValues??{})}),Me(()=>i(),()=>{$(b,i()?.expanderStates??{})}),Me(()=>(l(y),l(m),l(p),Ri),()=>{(_e=>$(y,_e.defaultLocale))((l(m)??l(p))?._i18n??Ri)}),Me(()=>(l(_),vt(H())),()=>{$(x,l(_)[H()])}),Me(()=>(l(x),vt(B()),l(g),l(v)),()=>{$(k,Object.entries(l(x)).some(([_e,Ae])=>!!_e.startsWith(`${B()}.`)&&(Ae!==null||_n({collectionName:l(g),fileName:l(v),valueMap:l(x),keyPath:_e})?.widget==="object")))}),Me(()=>(vt(H()),l(y),l(a)),()=>{$(S,H()===l(y)||l(a)!==!1)}),Me(()=>vt(B()),()=>{$(C,`${B()}#`)}),Me(()=>(l(b),l(C)),()=>{$(E,l(b)?._[l(C)]??!0)}),Me(()=>l(f),()=>{$(A,Array.isArray(l(f)))}),Me(()=>(vt(B()),l(h)),()=>{$(O,`${B()}.${l(h)}`)}),Me(()=>(l(A),l(f),l(x),l(O)),()=>{$(L,l(A)?l(f)?.find(({name:_e})=>_e===l(x)[l(O)]):void 0)}),Me(()=>(l(A),l(L),l(d)),()=>{$(I,(l(A)?l(L)?.fields:l(d))??[])}),Me(()=>(l(A),l(L),l(u)),()=>{$(N,l(A)&&l(L)?.summary||l(u))}),Me(()=>(vt(H()),l(y),l(a)),()=>{$(j,H()!==l(y)&&l(a)==="duplicate")}),Hr(),Lr();var he=YV(),re=M(he);{var X=_e=>{const Ae=Ye(()=>s()("add_x",{values:{name:V()||l(o)}}));dd(_e,{get label(){return l(Ae)},get checked(){return l(k)},get disabled(){return l(j)},onChange:({detail:{checked:Ce}})=>{Ce?Y():te()}})};U(re,_e=>{K()||_e(X)})}var fe=D(re,2);{var be=_e=>{Uv(_e,{get disabled(){return l(j)},get fieldConfig(){return G()},addItem:Y})};U(fe,_e=>{l(A)&&!l(k)&&_e(be)})}var ue=D(fe,2);{var Ee=_e=>{var Ae=KV(),Ce=R(Ae);const $e=Ye(()=>l(E)?void 0:`object-${l(ee)}-summary`);_r(Ce,{get"aria-labelledby"(){return l($e)},children:(Ve,We)=>{var ht=GV(),Ge=M(ht);const pe=Ye(()=>l(A)?l(L)?.label||l(L)?.name:""),ye=Ye(()=>l(I).length?()=>Js({[l(C)]:!l(E)}):void 0);XA(Ge,{get label(){return l(pe)},get controlId(){return`object-${l(ee)??""}-item-list`},get expanded(){return l(E)},get toggleExpanded(){return l(ye)},get removeButtonVisible(){return l(A)},get removeButtonDisabled(){return l(j)},remove:()=>{te()}});var we=D(Ge,2),xe=R(we);yr(xe,()=>Ru(l(J)),null,Ne=>{var me=W(),Pe=M(me);{var qe=ct=>{var Ke=W(),nt=M(Ke);ft(nt,1,()=>l(I),dt=>dt.name,(dt,ut)=>{var bt=W(),Ct=M(bt);yr(Ct,()=>vn(0),null,sn=>{const Rn=Ye(()=>[B(),l(ut).name].join("."));ky(sn,{get keyPath(){return l(Rn)},get locale(){return H()},get fieldConfig(){return l(ut)}})}),T(dt,bt)}),T(ct,Ke)},Xe=ct=>{var Ke=WV(),nt=R(Ke);q(dt=>{ke(Ke,"id",`object-${l(ee)??""}-summary`),Z(nt,dt)},[ce],Ye),T(ct,Ke)};U(Pe,ct=>{l(E)?ct(qe):ct(Xe,!1)})}T(Ne,me)}),$t(we,Ne=>$(J,Ne),()=>l(J)),q(()=>ke(we,"id",`object-${l(ee)??""}-item-list`)),T(Ve,ht)},$$slots:{default:!0}}),T(_e,Ae)};U(ue,_e=>{(!(!K()||l(A))||l(k))&&l(S)&&_e(Ee)})}T(t,he),oe(),r()}function XV(t,e){se(e,!1);const[n,r]=ve(),i=()=>z(rt,"$entryDraft",n),s=de(),o=de(),a=de(),c=de(),u=de(),d=de(),f=de(),h=de(),p=de(),g=de();let m=P(e,"locale",8),v=P(e,"keyPath",8),_=P(e,"fieldConfig",8);P(e,"currentValue",8),Me(()=>(l(s),l(o),l(a),vt(_())),()=>{(k=>($(s,k.fields),$(o,k.types),$(a,it(k.typeKey,"type"))))(_())}),Me(()=>(i(),vt(m())),()=>{$(c,i()?.currentValues[m()]??{})}),Me(()=>(l(c),vt(v())),()=>{$(u,Object.entries(l(c)).some(([k,S])=>!!k.startsWith(`${v()}.`)&&!!S))}),Me(()=>l(o),()=>{$(d,Array.isArray(l(o)))}),Me(()=>(vt(v()),l(a)),()=>{$(f,`${v()}.${l(a)}`)}),Me(()=>(l(d),l(o),l(c),l(f)),()=>{$(h,l(d)?l(o)?.find(({name:k})=>k===l(c)[l(f)]):void 0)}),Me(()=>l(h),()=>{$(p,l(h)?l(h).label||l(h).name:void 0)}),Me(()=>(l(d),l(h),l(s)),()=>{$(g,(l(d)?l(h)?.fields:l(s))??[])}),Hr(),Lr();var b=W(),y=M(b);{var x=k=>{QA(k,{get label(){return l(p)},children:(S,C)=>{var E=W(),A=M(E);ft(A,1,()=>l(g),O=>O.name,(O,L)=>{var I=W(),N=M(I);yr(N,()=>vn(0),null,j=>{const H=Ye(()=>[v(),l(L).name].join("."));wy(j,{get keyPath(){return l(H)},get locale(){return m()},get fieldConfig(){return l(L)}})}),T(O,I)}),T(S,E)},$$slots:{default:!0}})};U(y,k=>{l(u)&&k(x)})}T(t,b),oe(),r()}function QV(t,e){se(e,!1);const[n,r]=ve(),i=()=>z(rt,"$entryDraft",n),s=de(),o=de(),a=de();let c=P(e,"locale",8),u=P(e,"keyPath",8),d=P(e,"fieldId",8),f=P(e,"fieldConfig",8),h=P(e,"currentValue",8),p=P(e,"readonly",8,!1),g=P(e,"required",8,!0),m=P(e,"invalid",8,!1),v=P(e,"options",8);const _=E=>{i()&&Object.keys(i().currentValues??{}).forEach(A=>{l(s)!=="duplicate"&&A!==c()||HA(A,u(),E)})},b=E=>{_(({valueList:A})=>{A.push(E)})},y=E=>{_(({valueList:A})=>{A.splice(A.indexOf(E),1)})};Me(()=>(l(s),l(o),l(a),vt(f())),()=>{(E=>($(s,E.i18n),$(o,E.max),$(a,it(E.dropdown_threshold,5))))(f())}),Hr(),Lr();var x=W(),k=M(x);{var S=E=>{SN(E,{get disabled(){return p()},get readonly(){return p()},get required(){return g()},get invalid(){return m()},get options(){return v()},get values(){return h()},get max(){return l(o)},get"aria-labelledby"(){return`${d()??""}-label`},get"aria-errormessage"(){return`${d()??""}-error`},onAddValue:({detail:{value:A}})=>{b(A)},onRemoveValue:({detail:{value:A}})=>{y(A)}})},C=E=>{vL(E,{get"aria-labelledby"(){return`${d()??""}-label`},children:(A,O)=>{var L=W(),I=M(L);ft(I,1,v,({label:N,value:j})=>j,(N,j)=>{let H=()=>l(j).label,B=()=>l(j).value;const V=Ye(()=>h().includes(B()));dd(N,{get label(){return H()},get value(){return B()},get readonly(){return p()},get required(){return g()},get invalid(){return m()},get checked(){return l(V)},get"aria-errormessage"(){return`${d()??""}-error`},onChange:({detail:{checked:G}})=>{G?b(B()):y(B())}})}),T(A,L)},$$slots:{default:!0}})};U(k,E=>{v().length>l(a)?E(S):E(C,!1)})}T(t,x),oe(),r()}function m1(t,e){se(e,!1);const[n,r]=ve(),i=()=>z(le,"$_",n),s=de();P(e,"locale",8),P(e,"keyPath",8);let o=P(e,"fieldId",8),a=P(e,"fieldConfig",8),c=P(e,"currentValue",12),u=P(e,"readonly",8,!1),d=P(e,"required",8,!0),f=P(e,"invalid",8,!1),h=P(e,"options",8);Me(()=>(l(s),vt(a())),()=>{(_=>$(s,it(_.dropdown_threshold,5)))(a())}),Me(()=>(vt(d()),vt(h()),i()),()=>{!d()&&!h().some(({value:_})=>_==="")&&h().unshift({label:i()("unselected_option"),value:"",searchValue:""})}),Hr(),Lr();var p=W(),g=M(p);{var m=_=>{pd(_,{get readonly(){return u()},get required(){return d()},get invalid(){return f()},get"aria-labelledby"(){return`${o()??""}-label`},get"aria-errormessage"(){return`${o()??""}-error`},get value(){return c()},set value(b){c(b)},children:(b,y)=>{var x=W(),k=M(x);ft(k,1,h,({label:S,value:C,searchValue:E})=>C,(S,C)=>{let E=()=>l(C).label,A=()=>l(C).value,O=()=>l(C).searchValue;const L=Ye(()=>A()===c());mr(S,{get label(){return E()},get value(){return A()},get searchValue(){return O()},get selected(){return l(L)},wrap:!0})}),T(b,x)},$$slots:{default:!0},$$legacy:!0})},v=_=>{lN(_,{get readonly(){return u()},get required(){return d()},get invalid(){return f()},get"aria-labelledby"(){return`${o()??""}-label`},get"aria-errormessage"(){return`${o()??""}-error`},onChange:({detail:{value:b}})=>{c(b)},children:(b,y)=>{var x=W(),k=M(x);ft(k,1,h,({label:S,value:C})=>C,(S,C)=>{let E=()=>l(C).label,A=()=>l(C).value;const O=Ye(()=>A()===c());fN(S,{get label(){return E()},get value(){return A()},get checked(){return l(O)}})}),T(b,x)},$$slots:{default:!0}})};U(g,_=>{h().length>l(s)?_(m):_(v,!1)})}T(t,p),oe(),r()}function e2(t,e){se(e,!1);const n=de(),r=de(),i=de(),s=de();let o=P(e,"locale",8),a=P(e,"keyPath",8),c=P(e,"fieldId",8);P(e,"fieldLabel",8);let u=P(e,"fieldConfig",8),d=P(e,"currentValue",12),f=P(e,"sortOptions",8,!1),h=P(e,"readonly",8,!1),p=P(e,"required",8,!0),g=P(e,"invalid",8,!1);Me(()=>(l(n),l(r),vt(u())),()=>{(_=>($(n,_.options),$(r,_.multiple)))(u())}),Me(()=>(l(n),vt(f()),ui),()=>{$(i,(()=>{const _=l(n).map(b=>Jn(b)?b:{label:b,value:b});return f()&&_.sort((b,y)=>ui(b.label,y.label)),_})())}),Me(()=>(l(r),m1),()=>{$(s,l(r)?QV:m1)}),Hr(),Lr();var m=W(),v=M(m);As(v,()=>JSON.stringify(l(i)),_=>{l(s)(_,{get locale(){return o()},get keyPath(){return a()},get fieldId(){return c()},get fieldConfig(){return u()},get readonly(){return h()},get required(){return p()},get invalid(){return g()},get options(){return l(i)},get currentValue(){return d()},set currentValue(b){d(b)},$$legacy:!0})}),T(t,m),oe()}var eW=F('<div role="none" class="wrapper"><!></div>');function tW(t,e){se(e,!1);const n=de(),r=de(),i=de(),s=de();let o=P(e,"locale",8),a=P(e,"keyPath",8),c=P(e,"fieldId",8),u=P(e,"fieldLabel",8),d=P(e,"fieldConfig",8),f=P(e,"currentValue",12),h=P(e,"readonly",8,!1),p=P(e,"required",8,!0),g=P(e,"invalid",8,!1);Me(()=>(l(n),l(r),vt(d())),()=>{(b=>($(n,b.collection),$(r,b.file)))(d())}),Me(()=>(l(r),l(n),rs),()=>{$(i,l(r)?[J_(l(n),l(r))].filter(Boolean):rs(l(n)))}),Me(()=>(vt(o()),vt(d()),l(i)),()=>{$(s,W_(o(),d(),l(i)))}),Hr(),Lr();var m=eW(),v=R(m);const _=Ye(()=>({...d(),options:l(s)}));e2(v,{get locale(){return o()},get keyPath(){return a()},get fieldId(){return c()},get fieldLabel(){return u()},get fieldConfig(){return l(_)},get readonly(){return h()},get required(){return p()},get invalid(){return g()},sortOptions:!0,get currentValue(){return f()},set currentValue(b){f(b)},$$legacy:!0}),T(t,m),oe()}var nW=F('<p dir="auto"> </p>');function rW(t,e){se(e,!1);const n=de(),r=de(),i=de(),s=de(),o=de(),a=de(),c=de(),u=de();let d=P(e,"locale",8);P(e,"keyPath",8);let f=P(e,"fieldConfig",8),h=P(e,"currentValue",8);Me(()=>(l(n),l(r),l(i),l(s),vt(f())),()=>{(v=>($(n,v.collection),$(r,v.file),$(i,it(v.multiple,!1)),$(s,v.value_field)))(f())}),Me(()=>(l(r),l(n),rs),()=>{$(o,l(r)?[J_(l(n),l(r))].filter(Boolean):rs(l(n)))}),Me(()=>(vt(d()),vt(f()),l(o)),()=>{$(a,W_(d(),f(),l(o)))}),Me(()=>(l(i),vt(h()),l(a),l(s)),()=>{$(c,(l(i)?h():[h()]).filter(v=>v!==void 0).map(v=>{const _=l(a).find(b=>b.value===v)?.label;return _&&_!==v?["slug","{{slug}}","{{fields.slug}}"].includes(l(s))?_:`${_} (${v})`:v}))}),Me(()=>vt(d()),()=>{$(u,oc(d()))}),Hr(),Lr();var p=W(),g=M(p);{var m=v=>{var _=nW(),b=R(_);q(y=>{ke(_,"lang",d()),Z(b,y),_.dir=_.dir},[()=>l(u).format(l(c))],Ye),T(v,_)};U(g,v=>{l(c).length&&v(m)})}T(t,p),oe()}var iW=F('<p dir="auto"> </p>'),sW=F('<p dir="auto"> </p>');function oW(t,e){se(e,!1);const n=de(),r=de(),i=de(),s=de();let o=P(e,"locale",8);P(e,"keyPath",8);let a=P(e,"fieldConfig",8),c=P(e,"currentValue",8);const u=g=>l(i)&&l(n).find(m=>m.value===g)?.label||g;Me(()=>(l(n),l(r),vt(a())),()=>{(g=>($(n,g.options),$(r,g.multiple)))(a())}),Me(()=>l(n),()=>{$(i,ME(l(n)))}),Me(()=>vt(o()),()=>{$(s,oc(o()))}),Hr(),Lr();var d=W(),f=M(d);{var h=g=>{var m=iW(),v=R(m);q(_=>{ke(m,"lang",o()),Z(v,_),m.dir=m.dir},[()=>l(s).format(c().map(u).sort())],Ye),T(g,m)},p=g=>{var m=W(),v=M(m);{var _=b=>{var y=sW(),x=R(y);q(k=>{ke(y,"lang",o()),Z(x,k),y.dir=y.dir},[()=>u(c())],Ye),T(b,y)};U(v,b=>{c()!==void 0&&b(_)},!0)}T(g,m)};U(f,g=>{l(r)&&Array.isArray(c())&&c().length?g(h):g(p,!1)})}T(t,d),oe()}var aW=F('<div class="wrapper svelte-5qs6s0"><!> <span role="none" class="count svelte-5qs6s0"> </span> <!></div>');const lW={hash:"svelte-5qs6s0",code:".wrapper.svelte-5qs6s0 {flex:none;color:var(--sui-tertiary-foreground-color) !important;font-size:var(--sui-font-size-small);line-height:var(--sui-line-height-compact);text-align:right;}.count.invalid.svelte-5qs6s0 {color:var(--sui-error-foreground-color);}.count.svelte-5qs6s0:not(.invalid) {color:var(--sui-success-foreground-color);}"};function t2(t,e){se(e,!0),Te(t,lW);const[n,r]=ve(),i=()=>z(le,"$_",n),s=w(()=>e.fieldConfig.minlength),o=w(()=>e.fieldConfig.maxlength),a=w(()=>TA(e.fieldConfig,e.currentValue)),c=w(()=>l(a).count),u=w(()=>l(a).hasMin),d=w(()=>l(a).hasMax),f=w(()=>l(a).invalid);var h=W(),p=M(h);{var g=m=>{var v=aW(),_=R(v);{var b=C=>{var E=Ue();q(()=>Z(E,`${l(s)??""}
590
590
  / `)),T(C,E)};U(_,C=>{l(u)&&C(b)})}var y=D(_,2),x=R(y),k=D(y,2);{var S=C=>{var E=Ue();q(()=>Z(E,` /
591
- ${l(o)??""}`)),T(C,E)};U(k,C=>{l(d)&&C(S)})}q(C=>{ke(v,"aria-label",C),pt(y,"invalid",l(f)),Z(x,l(c))},[()=>i()(l(u)&&l(d)?l(c)===1?"character_counter.min_max.one":"character_counter.min_max.many":l(u)?l(c)===1?"character_counter.min.one":"character_counter.min.many":l(c)===1?"character_counter.max.one":"character_counter.max.many",{values:{count:l(c),min:l(s),max:l(o)}})]),T(m,v)};U(p,m=>{(l(u)||l(d))&&m(g)})}T(t,h),oe(),r()}function cW(t,e){se(e,!0);const[n,r]=ve();let i=P(e,"currentValue",15),s=P(e,"required",3,!0),o=P(e,"readonly",3,!1),a=P(e,"invalid",3,!1),c=ae("");const u=w(()=>it(e.fieldConfig.type,"text")),d=w(()=>it(e.fieldConfig.prefix,"")),f=w(()=>it(e.fieldConfig.suffix,"")),{extraHint:h}=Is("field-editor")??{},p=()=>{let m=typeof i()=="string"?i():"";l(d)&&m.startsWith(l(d))&&(m=m.slice(l(d).length)),l(f)&&m.endsWith(l(f))&&(m=m.slice(0,-l(f).length)),l(c)!==m&&$(c,ie(m))},g=()=>{let m=l(c).trim();m&&(l(d)||l(f))&&(m=`${l(d)}${m}${l(f)}`),i()!==m&&i(m)};Be(()=>{i(),Se(()=>{p()})}),Be(()=>{l(c),Se(()=>{g()})}),Be(()=>{h&&ot(h,t2)}),Pn(t,{get lang(){return e.locale},get type(){return l(u)},get inputmode(){return l(u)},flex:!0,get readonly(){return o()},get required(){return s()},get invalid(){return a()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get value(){return l(c)},set value(m){$(c,ie(m))}}),oe(),r()}var uW=F('<iframe frameborder="0" allow="autoplay; encrypted-media; picture-in-picture" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" class="svelte-wmmi2b"></iframe>'),dW=F("<a> </a>"),fW=F('<div role="none"><!></div>');const hW={hash:"svelte-wmmi2b",code:"iframe.svelte-wmmi2b {display:block;margin:0 auto;width:100%;height:auto;aspect-ratio:16/9;}"};function pW(t,e){se(e,!0),Te(t,hW);const[n,r]=ve(),i=()=>z(le,"$_",n);let s=ae(void 0),o=ae(!0);const a=w(()=>QB(e.url));cn(()=>{window.addEventListener("securitypolicyviolation",({blockedURI:h,violatedDirective:p})=>{h===new URL(l(a)).origin&&p==="frame-src"&&$(o,!1)})});var c=fW(),u=R(c);{var d=h=>{var p=W(),g=M(p);yr(g,()=>Ru(l(s)),null,m=>{var v=uW();q((_,b)=>{ke(v,"src",_),ke(v,"title",b)},[()=>encodeURI(l(a)),()=>i()("youtube_video_player")]),T(m,v)}),T(h,p)},f=h=>{var p=dW(),g=R(p);q(m=>{ke(p,"href",m),Z(g,e.url)},[()=>encodeURI(e.url)]),T(h,p)};U(u,h=>{l(o)?h(d):h(f,!1)})}$t(c,h=>$(s,h),()=>l(s)),T(t,c),oe(),r()}var gW=F("<a> </a>"),mW=F("<a> </a>"),vW=F('<p dir="auto" class="svelte-1dlg8zk"><!></p>');const bW={hash:"svelte-1dlg8zk",code:".title.svelte-1dlg8zk {font-size:var(--sui-font-size-xxx-large);font-weight:var(--sui-font-weight-bold);}"};function _W(t,e){se(e,!0),Te(t,bW);const n=w(()=>e.fieldConfig.name),r=w(()=>it(e.fieldConfig.type,"text"));var i=W(),s=M(i);{var o=a=>{var c=vW(),u=R(c);{var d=h=>{var p=W(),g=M(p);{var m=_=>{pW(_,{get url(){return e.currentValue}})},v=_=>{var b=gW(),y=R(b);q(x=>{ke(b,"href",x),Z(y,e.currentValue)},[()=>encodeURI(e.currentValue)]),T(_,b)};U(g,_=>{XB(e.currentValue)?_(m):_(v,!1)})}T(h,p)},f=h=>{var p=W(),g=M(p);{var m=_=>{var b=mW(),y=R(b);q(x=>{ke(b,"href",`mailto:${x??""}`),Z(y,e.currentValue)},[()=>encodeURI(e.currentValue)]),T(_,b)},v=_=>{var b=Ue();q(()=>Z(b,e.currentValue)),T(_,b)};U(g,_=>{l(r)==="email"?_(m):_(v,!1)},!0)}T(h,p)};U(u,h=>{l(r)==="url"||tb(e.currentValue)?h(d):h(f,!1)})}q(()=>{ke(c,"lang",e.locale),pt(c,"title",l(n)==="title"),c.dir=c.dir}),T(a,c)};U(s,a=>{typeof e.currentValue=="string"&&e.currentValue.trim()&&a(o)})}T(t,i),oe()}function yW(t,e){se(e,!0);const[n,r]=ve();let i=P(e,"currentValue",15),s=P(e,"required",3,!0),o=P(e,"readonly",3,!1),a=P(e,"invalid",3,!1),c=ae("");const{extraHint:u}=Is("field-editor")??{},d=()=>{const h=typeof i()=="string"?i():"";l(c)!==h&&$(c,ie(h))},f=()=>{const h=l(c);i()!==h&&i(h)};Be(()=>{i(),Se(()=>{d()})}),Be(()=>{l(c),Se(()=>{f()})}),Be(()=>{u&&ot(u,t2)}),Tp(t,{get lang(){return e.locale},flex:!0,get readonly(){return o()},get required(){return s()},get invalid(){return a()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},autoResize:!0,get value(){return l(c)},set value(h){$(c,ie(h))}}),oe(),r()}var wW=F('<p dir="auto" class="svelte-tzbr78"> </p>');const xW={hash:"svelte-tzbr78",code:"p.svelte-tzbr78 {white-space:pre-wrap;}"};function kW(t,e){se(e,!0),Te(t,xW);var n=W(),r=M(n);{var i=s=>{var o=wW(),a=R(o);q(()=>{ke(o,"lang",e.locale),Z(a,e.currentValue),o.dir=o.dir}),T(s,o)};U(r,s=>{typeof e.currentValue=="string"&&e.currentValue.trim()&&s(i)})}T(t,n),oe()}function SW(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(rt,"$entryDraft",n);let s=P(e,"currentValue",15),o=P(e,"required",3,!0),a=P(e,"readonly",3,!1),c=P(e,"invalid",3,!1);const u=w(()=>i()?.collection),d=w(()=>i()?.collectionFile),f=w(()=>(l(d)??l(u))?._i18n??Ri),h=w(()=>l(f).defaultLocale);cn(()=>{s()||(e.locale===l(h)||[!0,"translate"].includes(e.fieldConfig?.i18n??!1))&&s(SA(e.fieldConfig))});const p=w(()=>a()||e.fieldConfig.read_only!==!1);Pn(t,{flex:!0,get readonly(){return l(p)},get required(){return o()},get invalid(){return c()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get value(){return s()},set value(g){s(g)}}),oe(),r()}var EW=F('<p class="svelte-1e2mlgo"> </p>');const TW={hash:"svelte-1e2mlgo",code:"p.svelte-1e2mlgo {font-family:var(--sui-font-family-monospace);}"};function CW(t,e){se(e,!0),Te(t,TW);var n=W(),r=M(n);{var i=s=>{var o=EW(),a=R(o);q(()=>Z(a,e.currentValue)),T(s,o)};U(r,s=>{typeof e.currentValue=="string"&&e.currentValue.trim()&&s(i)})}T(t,n),oe()}const qf={boolean:O6,code:N6,color:j6,compute:H6,datetime:J6,file:f1,image:f1,keyvalue:tV,list:vV,markdown:MV,number:BV,object:ZV,relation:tW,select:e2,string:cW,text:yW,uuid:SW},v1={boolean:L6,code:R6,color:q6,compute:W6,datetime:Q6,file:h1,image:h1,keyvalue:sV,list:TV,markdown:UV,number:HV,object:XV,relation:rW,select:oW,string:_W,text:kW,uuid:CW};function xy(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(ug,"$translator",n),s=()=>z(le,"$_",n),o=()=>z(rt,"$entryDraft",n);let a=P(e,"keyPath",3,""),c=P(e,"translate",3,!1);const u=w(()=>i().getSourceLanguage),d=w(()=>i().getTargetLanguage);var f=W(),h=M(f);ft(h,17,()=>e.otherLocales,cr,(p,g)=>{const m=w(()=>s()(c()?"translate_from_x":"copy_from_x",{values:{locale:$s(l(g))}})),v=w(()=>!o()?.currentLocales[e.locale]||!o().currentLocales[l(g)]||a()&&!Zr(o().currentValues[l(g)])[a()]||!c()&&a()&&Zr(o().currentValues[l(g)])[a()]===Zr(o().currentValues[e.locale])[a()]||c()&&(!l(u)(e.locale)||!l(d)(l(g))));Nt(p,{get label(){return l(m)},get disabled(){return l(v)},onclick:()=>{GA(l(g),e.locale,{keyPath:a(),translate:c()})}})}),T(t,f),oe(),r()}function n2(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(ug,"$translator",n),s=()=>z(rt,"$entryDraft",n),o=()=>z(le,"$_",n);let a=P(e,"size",3,"medium"),c=P(e,"keyPath",3,"");const u=w(()=>i()??{}),d=w(()=>l(u).getSourceLanguage),f=w(()=>l(u).getTargetLanguage),h=w(()=>!s()?.currentLocales[e.locale]||!l(d)(e.locale));var p=W(),g=M(p);{var m=_=>{const b=w(()=>{const[k]=e.otherLocales;return{otherLocale:k}}),y=w(()=>o()("translate_from_x",{values:{locale:$s(l(b).otherLocale)}})),x=w(()=>l(h)||!s()?.currentLocales[l(b).otherLocale]||!l(f)(l(b).otherLocale));Ze(_,{variant:"ghost",get size(){return a()},iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return l(y)},get title(){return l(y)},get disabled(){return l(x)},onclick:()=>{GA(l(b).otherLocale,e.locale,{keyPath:c(),translate:!0})},startIcon:S=>{et(S,{name:"translate"})},$$slots:{startIcon:!0}})},v=_=>{const b=w(()=>o()("translate"));Nr(_,{variant:"ghost",get size(){return a()},iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return l(b)},get disabled(){return l(h)},endIcon:k=>{et(k,{name:"translate"})},popup:k=>{const S=w(()=>o()("translation_options"));wr(k,{get"aria-label"(){return l(S)},children:(C,E)=>{xy(C,{get locale(){return e.locale},get otherLocales(){return e.otherLocales},get keyPath(){return c()},translate:!0})},$$slots:{default:!0}})},$$slots:{endIcon:!0,popup:!0}})};U(g,_=>{e.otherLocales.length===1?_(m):_(v,!1)})}T(t,p),oe(),r()}var AW=F('<div class="required svelte-1vsh88z">*</div>'),PW=F("<!> <!>",1),OW=F('<p class="comment svelte-1vsh88z"><!></p>'),$W=F("<!> <!> <!> <!> <!> <!> <!>",1),LW=F('<div role="none" class="svelte-1vsh88z"> </div>'),NW=F('<div role="none" class="before-input svelte-1vsh88z"><!></div>'),IW=F('<div role="none" class="prefix svelte-1vsh88z"> </div>'),RW=F('<div role="none" class="suffix svelte-1vsh88z"> </div>'),DW=F('<div role="none" class="after-input svelte-1vsh88z"><!></div>'),MW=F("<!> <!> <!> <!> <!>",1),FW=F('<p class="hint svelte-1vsh88z"><!></p>'),zW=F('<div role="none" class="footer svelte-1vsh88z"><!> <!></div>'),jW=F('<section role="group" class="field svelte-1vsh88z"><header role="none" class="svelte-1vsh88z"><h4 role="none" class="svelte-1vsh88z"> </h4> <!> <!> <!> <!></header> <!> <!> <div role="none" class="widget-wrapper svelte-1vsh88z"><!></div> <!></section>');const UW={hash:"svelte-1vsh88z",code:`@keyframes svelte-1vsh88z-highlight {
592
- 50% {
593
- opacity: 0.2;
594
- }
595
- }section.svelte-1vsh88z {padding:16px;}section.svelte-1vsh88z:not(:last-child) {border-width:0 0 1px;border-color:var(--sui-secondary-border-color);}section.svelte-1vsh88z > :where(.svelte-1vsh88z) {margin-right:auto;margin-left:auto;max-width:768px;}
596
- @media (prefers-reduced-motion) {section.svelte-1vsh88z.highlight {outline-width:4px !important;outline-color:var(--sui-primary-accent-color-translucent);outline-offset:-4px;}
597
- }section.svelte-1vsh88z.highlight > * {
598
- animation: svelte-1vsh88z-highlight 750ms 2;}
599
- @media (prefers-reduced-motion) {section.svelte-1vsh88z.highlight > * {
600
- animation: none;}
601
- }header.svelte-1vsh88z {display:flex;align-items:center;margin-bottom:8px;height:var(--sui-button-small-height);}header.svelte-1vsh88z h4:where(.svelte-1vsh88z) {font-size:var(--sui-font-size-small);font-weight:var(--sui-font-weight-bold);color:var(--sui-secondary-foreground-color);}header.svelte-1vsh88z .required:where(.svelte-1vsh88z) {margin:2px 0 0 2px;color:var(--sui-error-foreground-color);font-size:var(--sui-font-size-large);}.widget-wrapper.has-extra-labels.svelte-1vsh88z {display:flex;align-items:center;justify-content:flex-start;gap:4px;}.widget-wrapper.svelte-1vsh88z input[type="text"],
602
- .widget-wrapper.svelte-1vsh88z textarea {width:100%;}.widget-wrapper.svelte-1vsh88z input[type="color"],
603
- .widget-wrapper.svelte-1vsh88z input[type="number"] {outline:0;border-width:1px;border-color:var(--sui-primary-border-color);border-radius:var(--sui-control-medium-border-radius);height:var(--sui-button-medium-height);color:inherit;background-color:var(--sui-textbox-background-color);}.widget-wrapper.svelte-1vsh88z input[type="file"],
604
- .widget-wrapper.svelte-1vsh88z input[type="checkbox"], .widget-wrapper.svelte-1vsh88z > div {color:inherit;}.widget-wrapper.svelte-1vsh88z input[type="date"],
605
- .widget-wrapper.svelte-1vsh88z input[type="datetime-local"],
606
- .widget-wrapper.svelte-1vsh88z input[type="time"] {outline:0;margin:var(--sui-focus-ring-width);border-width:var(--sui-textbox-border-width, 1px);border-color:var(--sui-primary-border-color);border-radius:var(--sui-control-medium-border-radius);padding:var(--sui-textbox-singleline-padding);width:auto;height:var(--sui-textbox-height);color:var(--sui-textbox-foreground-color);background-color:var(--sui-textbox-background-color);font-family:var(--sui-textbox-font-family);font-size:var(--sui-textbox-font-size);text-transform:uppercase;}.widget-wrapper.svelte-1vsh88z input[type="date"]:disabled,
607
- .widget-wrapper.svelte-1vsh88z input[type="datetime-local"]:disabled,
608
- .widget-wrapper.svelte-1vsh88z input[type="time"]:disabled {opacity:0.4;}.widget-wrapper.svelte-1vsh88z input[type="color"][aria-invalid="true"],
609
- .widget-wrapper.svelte-1vsh88z input[type="date"][aria-invalid="true"],
610
- .widget-wrapper.svelte-1vsh88z input[type="datetime-local"][aria-invalid="true"],
611
- .widget-wrapper.svelte-1vsh88z input[type="time"][aria-invalid="true"] {border-color:var(--sui-error-border-color);}.before-input.svelte-1vsh88z,
612
- .after-input.svelte-1vsh88z,
613
- .prefix.svelte-1vsh88z,
614
- .suffix.svelte-1vsh88z {color:var(--sui-secondary-foreground-color);white-space:nowrap;}.comment.svelte-1vsh88z {margin-block:4px;line-height:var(--sui-line-height-compact);}.footer.svelte-1vsh88z {display:flex;gap:16px;justify-content:flex-end;margin-top:4px;}.hint.svelte-1vsh88z {flex:auto;margin:0;font-size:var(--sui-font-size-small);line-height:var(--sui-line-height-compact);opacity:0.75;}`};function ky(t,e){se(e,!0),Te(t,UW);const[n,r]=ve(),i=()=>z(rt,"$entryDraft",n),s=()=>z(le,"$_",n),o=()=>z(u,"$extraHint",n),a=dr("field"),c=ye=>fi.sanitize(Ot.parseInline(ye.replaceAll("\\n","<br>")),{ALLOWED_TAGS:["strong","em","del","code","a","br"],ALLOWED_ATTR:["href"]}),u=st();Gv("field-editor",{extraHint:u});const d=w(()=>e.fieldConfig.name),f=w(()=>it(e.fieldConfig.label,"")),h=w(()=>it(e.fieldConfig.comment,"")),p=w(()=>it(e.fieldConfig.hint,"")),g=w(()=>it(e.fieldConfig.widget,"string")),m=w(()=>it(e.fieldConfig.i18n,!1)),v=w(()=>it(e.fieldConfig.pattern,()=>[],!0)),_=w(()=>Dd({fieldConfig:e.fieldConfig,locale:e.locale})),b=w(()=>e.fieldConfig.field),y=w(()=>e.fieldConfig.fields),x=w(()=>e.fieldConfig.types),k=w(()=>!!l(b)||!!l(y)||!!l(x)),S=w(()=>e.fieldConfig.min),C=w(()=>e.fieldConfig.max),E=w(()=>l(g)==="string"?e.fieldConfig.type??"text":l(g)==="number"?"number":void 0),A=w(()=>["string"].includes(l(g))),O=w(()=>l(A)?e.fieldConfig.prefix:void 0),L=w(()=>l(A)?e.fieldConfig.suffix:void 0),I=w(()=>["boolean","number","string"].includes(l(g))),N=w(()=>l(I)?e.fieldConfig.before_input:void 0),j=w(()=>l(I)?e.fieldConfig.after_input:void 0),H=w(()=>!!(l(O)||l(L)||l(N)||l(j))),B=w(()=>["relation","select"].includes(l(g))),V=w(()=>l(B)?e.fieldConfig.multiple:void 0),G=w(()=>l(g)==="list"&&l(k)||l(V)||l(g)==="keyvalue"),K=w(()=>l(g)==="list"||l(B)&&l(V)),ee=w(()=>i()?.collection),J=w(()=>i()?.collectionFile),Y=w(()=>i()?.originalValues),te=w(()=>(l(J)??l(ee))?._i18n??Ri),ce=w(()=>l(te).i18nEnabled),he=w(()=>l(te).allLocales),re=w(()=>l(te).defaultLocale),X=w(()=>l(ce)?l(he).filter(ye=>ye!==e.locale):[]),fe=w(()=>l(ce)&&(l(m)===!0||l(m)==="translate")),be=w(()=>l(ce)&&l(m)==="duplicate"),ue=w(()=>e.locale===l(re)||l(fe)||l(be)),Ee=w(()=>new RegExp(`^${ln(e.keyPath)}\\.\\d+$`)),_e=w(()=>l(K)?Object.entries(Zr(i()?.currentValues[e.locale]??{})).filter(([ye])=>l(Ee).test(ye)).map(([,ye])=>ye).filter(ye=>ye!==void 0):Zr(i()?.currentValues[e.locale])?.[e.keyPath]),Ae=w(()=>l(K)?Object.entries(l(Y)?.[e.locale]??{}).filter(([ye])=>l(Ee).test(ye)).map(([,ye])=>ye).filter(ye=>ye!==void 0):l(Y)?.[e.locale][e.keyPath]),Ce=w(()=>i()?.validities[e.locale][e.keyPath]),$e=w(()=>l(f)||l(d)),Ve=w(()=>l(m)==="duplicate"&&e.locale!==l(re)||l(g)==="compute"),We=w(()=>l(Ce)?.valid===!1);var ht=W(),Ge=M(ht);{var pe=ye=>{var we=jW();const xe=w(()=>l(fe)&&l(X).length),Ne=w(()=>!(l(be)&&e.locale!==l(re)));var me=R(we),Pe=R(me);ke(Pe,"id",`${a??""}-label`);var qe=R(Pe),Xe=D(Pe,2);{var ct=yt=>{var Xt=AW();q($n=>ke(Xt,"aria-label",$n),[()=>s()("required")]),T(yt,Xt)};U(Xe,yt=>{!l(Ve)&&l(_)&&yt(ct)})}var Ke=D(Xe,2);Xr(Ke,{flex:!0});var nt=D(Ke,2);{var dt=yt=>{n2(yt,{size:"small",get locale(){return e.locale},get otherLocales(){return l(X)},get keyPath(){return e.keyPath}})};U(nt,yt=>{l(xe)&&["markdown","string","text","list","object"].includes(l(g))&&yt(dt)})}var ut=D(nt,2);{var bt=yt=>{const Xt=w(()=>s()("show_field_options"));Nr(yt,{variant:"ghost",size:"small",iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return l(Xt)},popup:wn=>{const qt=w(()=>s()("field_options"));wr(wn,{get"aria-label"(){return l(qt)},children:(Yt,fn)=>{var Dn=PW(),Qn=M(Dn);{var er=fr=>{xy(fr,{get locale(){return e.locale},get otherLocales(){return l(X)},get keyPath(){return e.keyPath}})};U(Qn,fr=>{l(xe)&&fr(er)})}var si=D(Qn,2);{var cs=fr=>{const Bn=w(()=>s()("revert_changes")),zt=w(()=>zn(l(_e),l(Ae)));Nt(fr,{get label(){return l(Bn)},get disabled(){return l(zt)},onclick:()=>{yy(e.locale,e.keyPath)}})};U(si,fr=>{l(Ne)&&fr(cs)})}T(Yt,Dn)},$$slots:{default:!0}})},$$slots:{popup:!0}})};U(ut,yt=>{(l(xe)||l(Ne))&&yt(bt)})}var Ct=D(me,2);{var sn=yt=>{var Xt=OW(),$n=R(Xt);br($n,()=>c(l(h))),T(yt,Xt)};U(Ct,yt=>{!l(Ve)&&l(h)&&yt(sn)})}var Rn=D(Ct,2);{var Xn=yt=>{ZA(yt,{id:`${a??""}-error`,children:(Xt,$n)=>{var wn=$W(),qt=M(wn);{var Yt=Qe=>{var xt=Ue();q(xn=>Z(xt,xn),[()=>s()("validation.value_missing")]),T(Qe,xt)};U(qt,Qe=>{l(Ce).valueMissing&&Qe(Yt)})}var fn=D(qt,2);{var Dn=Qe=>{var xt=Ue();const xn=w(()=>{const{minlength:tr}=e.fieldConfig;return{minlength:tr}});q(tr=>Z(xt,tr),[()=>s()(l(xn).minlength===1?"validation.too_short.one":"validation.too_short.many",{values:{min:l(xn).minlength}})]),T(Qe,xt)};U(fn,Qe=>{l(Ce).tooShort&&Qe(Dn)})}var Qn=D(fn,2);{var er=Qe=>{var xt=Ue();const xn=w(()=>{const{maxlength:tr}=e.fieldConfig;return{maxlength:tr}});q(tr=>Z(xt,tr),[()=>s()(l(xn).maxlength===1?"validation.too_long.one":"validation.too_long.many",{values:{max:l(xn).maxlength}})]),T(Qe,xt)};U(Qn,Qe=>{l(Ce).tooLong&&Qe(er)})}var si=D(Qn,2);{var cs=Qe=>{var xt=W();const xn=w(()=>l(S)===1?"one":"many");var tr=M(xt);{var js=qn=>{var nr=Ue();q(ji=>Z(nr,ji),[()=>s()("validation.range_underflow.number",{values:{min:l(S)}})]),T(qn,nr)},vo=qn=>{var nr=W(),ji=M(nr);{var Ui=hr=>{var rr=Ue();q(vi=>Z(rr,vi),[()=>s()(`validation.range_underflow.add_${l(xn)}`,{values:{min:l(S)}})]),T(hr,rr)},ea=hr=>{var rr=Ue();q(vi=>Z(rr,vi),[()=>s()(`validation.range_underflow.select_${l(xn)}`,{values:{min:l(S)}})]),T(hr,rr)};U(ji,hr=>{l(G)?hr(Ui):hr(ea,!1)},!0)}T(qn,nr)};U(tr,qn=>{l(g)==="number"?qn(js):qn(vo,!1)})}T(Qe,xt)};U(si,Qe=>{l(Ce).rangeUnderflow&&Qe(cs)})}var fr=D(si,2);{var Bn=Qe=>{var xt=W();const xn=w(()=>l(C)===1?"one":"many");var tr=M(xt);{var js=qn=>{var nr=Ue();q(ji=>Z(nr,ji),[()=>s()("validation.range_overflow.number",{values:{max:l(C)}})]),T(qn,nr)},vo=qn=>{var nr=W(),ji=M(nr);{var Ui=hr=>{var rr=Ue();q(vi=>Z(rr,vi),[()=>s()(`validation.range_overflow.add_${l(xn)}`,{values:{max:l(C)}})]),T(hr,rr)},ea=hr=>{var rr=Ue();q(vi=>Z(rr,vi),[()=>s()(`validation.range_overflow.select_${l(xn)}`,{values:{max:l(C)}})]),T(hr,rr)};U(ji,hr=>{l(G)?hr(Ui):hr(ea,!1)},!0)}T(qn,nr)};U(tr,qn=>{l(g)==="number"?qn(js):qn(vo,!1)})}T(Qe,xt)};U(fr,Qe=>{l(Ce).rangeOverflow&&Qe(Bn)})}var zt=D(fr,2);{var oi=Qe=>{var xt=Ue();q(()=>Z(xt,l(v)[1])),T(Qe,xt)};U(zt,Qe=>{l(Ce).patternMismatch&&Qe(oi)})}var Ht=D(zt,2);{var Qt=Qe=>{var xt=Ue();q(xn=>Z(xt,xn),[()=>s()(`validation.type_mismatch.${l(E)}`)]),T(Qe,xt)};U(Ht,Qe=>{l(Ce).typeMismatch&&Qe(Qt)})}T(Xt,wn)}})};U(Rn,yt=>{l(Ce)?.valid===!1&&yt(Xn)})}var kr=D(Rn,2),zi=R(kr);{var mi=yt=>{var Xt=LW(),$n=R(Xt);q(wn=>Z($n,wn),[()=>s()("unsupported_widget_x",{values:{name:l(g)}})]),T(yt,Xt)},Lt=yt=>{var Xt=W(),$n=M(Xt);{var wn=Yt=>{var fn=W();const Dn=w(()=>qf[l(g)]);var Qn=M(fn);Ci(Qn,()=>l(Dn),(er,si)=>{si(er,{get locale(){return e.locale},get keyPath(){return e.keyPath},fieldId:a,get fieldLabel(){return l($e)},get fieldConfig(){return e.fieldConfig},get currentValue(){return l(_e)},get readonly(){return l(Ve)},get required(){return l(_)},get invalid(){return l(We)}})}),T(Yt,fn)},qt=Yt=>{var fn=MW();const Dn=w(()=>qf[l(g)]);var Qn=M(fn);{var er=Qt=>{var Qe=NW(),xt=R(Qe);br(xt,()=>c(l(N))),T(Qt,Qe)};U(Qn,Qt=>{l(N)&&Qt(er)})}var si=D(Qn,2);{var cs=Qt=>{var Qe=IW(),xt=R(Qe);q(()=>Z(xt,l(O))),T(Qt,Qe)};U(si,Qt=>{l(O)&&Qt(cs)})}var fr=D(si,2);Ci(fr,()=>l(Dn),(Qt,Qe)=>{Qe(Qt,{get locale(){return e.locale},get keyPath(){return e.keyPath},fieldId:a,get fieldLabel(){return l($e)},get fieldConfig(){return e.fieldConfig},get readonly(){return l(Ve)},get required(){return l(_)},get invalid(){return l(We)},get currentValue(){return i().currentValues[e.locale][e.keyPath]},set currentValue(xt){At(rt,Se(i).currentValues[e.locale][e.keyPath]=xt,Se(i))}})});var Bn=D(fr,2);{var zt=Qt=>{var Qe=RW(),xt=R(Qe);q(()=>Z(xt,l(L))),T(Qt,Qe)};U(Bn,Qt=>{l(L)&&Qt(zt)})}var oi=D(Bn,2);{var Ht=Qt=>{var Qe=DW(),xt=R(Qe);br(xt,()=>c(l(j))),T(Qt,Qe)};U(oi,Qt=>{l(j)&&Qt(Ht)})}T(Yt,fn)};U($n,Yt=>{l(K)?Yt(wn):Yt(qt,!1)},!0)}T(yt,Xt)};U(zi,yt=>{l(g)in qf?yt(Lt,!1):yt(mi)})}var yn=D(kr,2);{var Gt=yt=>{var Xt=zW();const $n=w(o);var wn=R(Xt);{var qt=fn=>{var Dn=FW(),Qn=R(Dn);br(Qn,()=>c(l(p))),T(fn,Dn)};U(wn,fn=>{l(p)&&fn(qt)})}var Yt=D(wn,2);Ci(Yt,()=>l($n),(fn,Dn)=>{Dn(fn,{get fieldConfig(){return e.fieldConfig},get currentValue(){return l(_e)}})}),T(yt,Xt)};U(yn,yt=>{!l(Ve)&&(l(p)||o())&&yt(Gt)})}q(yt=>{ke(we,"aria-label",yt),ke(we,"data-widget",l(g)),ke(we,"data-key-path",e.keyPath),we.hidden=l(g)==="compute",Z(qe,l($e)),pt(kr,"has-extra-labels",l(H))},[()=>s()("x_field",{values:{field:l($e)}})]),T(ye,we)};U(Ge,ye=>{i()&&l(ue)&&l(g)!=="hidden"&&ye(pe)})}T(t,ht),oe(),r()}function BW(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(rt,"$entryDraft",n),s=w(()=>i()?.collection),o=w(()=>i()?.collectionFile),a=w(()=>l(o)?.fields??l(s)?.fields??[]);var c=W(),u=M(c);ft(u,17,()=>l(a),d=>d.name,(d,f)=>{var h=W(),p=M(h);yr(p,()=>vn(0),null,g=>{ky(g,{get keyPath(){return l(f).name},get locale(){return e.locale},get fieldConfig(){return l(f)}})}),T(d,h)}),T(t,c),oe(),r()}var qW=F('<div role="document" class="svelte-t01vxl"></div>');const HW={hash:"svelte-t01vxl",code:"div.svelte-t01vxl {padding:8px 16px;}"};function VW(t,e){se(e,!0),Te(t,HW);const[n,r]=ve(),i=()=>z(rt,"$entryDraft",n),s=()=>z(le,"$_",n),o=w(()=>i()?.collection),a=w(()=>i()?.collectionFile),c=w(()=>l(a)?.fields??l(o)?.fields??[]);var u=qW();ft(u,21,()=>l(c),d=>d.name,(d,f)=>{var h=W(),p=M(h);yr(p,()=>vn(0),null,g=>{wy(g,{get keyPath(){return l(f).name},get locale(){return e.locale},get fieldConfig(){return l(f)}})}),T(d,h)}),q(d=>ke(u,"aria-label",d),[()=>s()("content_preview")]),T(t,u),oe(),r()}var WW=F('<div role="none" class="content svelte-1g8n4fi"><!></div>'),GW=F('<span role="alert"> </span> <!>',1),KW=F('<div role="none" class="wrapper svelte-1g8n4fi"><!></div>');const YW={hash:"svelte-1g8n4fi",code:'@charset "UTF-8";.wrapper.svelte-1g8n4fi {display:contents;}.wrapper.svelte-1g8n4fi > .group {display:contents;}.content.svelte-1g8n4fi {flex:auto;overflow-y:auto;scroll-behavior:auto; /* Don’t use smooth scroll for syncing */overscroll-behavior-y:contain;}'};function b1(t,e){se(e,!0),Te(t,YW);const[n,r]=ve(),i=()=>z(Ei,"$entryEditorSettings",n),s=()=>z(e.thisPane,"$thisPane",n),o=()=>z(rt,"$entryDraft",n),a=()=>z(le,"$_",n);let c=P(e,"thisPaneContentArea",15),u=P(e,"thatPaneContentArea",15);const d=w(()=>i()??{}),f=w(()=>l(d).syncScrolling),h=w(()=>s()?.locale),p=w(()=>s()?.mode),g=w(()=>!!l(h)&&!!Zr(o()?.currentValues[l(h)])),m=w(()=>({values:{locale:l(h)?$s(l(h)):""}})),v=w(()=>l(p)==="preview"?VW:BW),_=()=>{window.requestAnimationFrame(()=>{if(!l(f)||!c()||!u())return;const{x:C,y:E}=c().getBoundingClientRect(),A=document.elementsFromPoint(C+80,E).find(H=>H.matches("[data-key-path]"));if(!A)return;const{keyPath:O}=A.dataset,{top:L,height:I}=A.getBoundingClientRect(),N=(E-L)/I,j=u().querySelector(`[data-key-path="${CSS.escape(O??"")}"]`);N<0||N>1||!j||u(u().scrollTop=j.offsetTop-E+j.clientHeight*N,!0)})},b={capture:!0,passive:!0};Be(()=>{c()&&(c(c().scrollTop=0,!0),c().addEventListener("wheel",_,b),c().addEventListener("touchmove",_,b))});var y=KW(),x=R(y);{var k=C=>{var E=WW(),A=R(E);Ci(A,()=>l(v),(O,L)=>{L(O,{get locale(){return l(h)}})}),$t(E,O=>c(O),()=>c()),T(C,E)},S=C=>{var E=W(),A=M(E);{var O=L=>{Tr(L,{children:(I,N)=>{var j=GW(),H=M(j),B=R(H),V=D(H,2);const G=w(()=>a()(l(g)?"reenable_x_locale":"enable_x_locale",l(m)));Ze(V,{variant:"tertiary",get label(){return l(G)},onclick:()=>{l(h)&&WA(l(h))}}),q(K=>Z(B,K),[()=>a()(l(g)?"locale_x_now_disabled":"locale_x_has_been_disabled",l(m))]),T(I,j)},$$slots:{default:!0}})};U(A,L=>{l(p)==="edit"&&L(O)},!0)}T(C,E)};U(x,C=>{l(h)&&o()?.currentLocales[l(h)]?C(k):C(S,!1)})}q(()=>ke(y,"id",e.id)),T(t,y),oe(),r()}var JW=F('<div class="inner svelte-1ivrcdt"><!> <!></div>'),ZW=F('<div class="outer svelte-1ivrcdt"><!></div>');const XW={hash:"svelte-1ivrcdt",code:`.outer.svelte-1ivrcdt {display:contents;}.outer.svelte-1ivrcdt .combobox.error [role="combobox"] {border-color:var(--sui-error-border-color);}.inner.svelte-1ivrcdt {display:contents;}.inner.svelte-1ivrcdt .error,
615
- .inner.svelte-1ivrcdt .error button {color:var(--sui-error-foreground-color) !important;}`};function QW(t,e){se(e,!0),Te(t,XW);const[n,r]=ve(),i=()=>z(wt,"$siteConfig",n),s=()=>z(rt,"$entryDraft",n),o=()=>z(d(),"$thatPane",n),a=()=>z(le,"$_",n),c=()=>z(e.thisPane,"$thisPane",n),u=()=>z(Ei,"$entryEditorSettings",n);let d=P(e,"thatPane",19,()=>st(null));const f=w(()=>i()?.editor?.preview??!0),h=w(()=>s()?.collection),p=w(()=>s()?.collectionFile),g=w(()=>(l(p)??l(h))?._i18n??Ri),m=w(()=>l(g).allLocales),v=w(()=>l(m).filter(N=>!(o()?.mode==="edit"&&o().locale===N))),_=w(()=>Object.entries(s()?.validities??{}).some(([N,j])=>l(v).includes(N)&&Object.values(j??{}).some(({valid:H})=>!H))),b=w(()=>(l(p)??l(h))?.editor?.preview??l(f)),y=w(()=>l(m).length>=5),x=w(()=>l(y)?pd:cp),k=w(()=>l(y)?mr:Du),S=w(()=>l(y)?void 0:"tertiary"),C=w(()=>l(y)?void 0:"small");var E=ZW(),A=R(E);const O=w(()=>l(_)?"error":void 0),L=w(()=>a()("switch_locale")),I=w(()=>e.id.replace("-header","-body"));Ci(A,()=>l(x),(N,j)=>{j(N,{get class(){return l(O)},get"aria-label"(){return l(L)},get"aria-controls"(){return l(I)},children:(H,B)=>{var V=JW(),G=R(V);ft(G,17,()=>l(v),cr,(J,Y)=>{var te=W();const ce=w(()=>$s(l(Y))),he=w(()=>!s()?.currentLocales[l(Y)]),re=w(()=>Object.values(s()?.validities[l(Y)]??{}).some(({valid:_e})=>!_e));var X=M(te);const fe=w(()=>l(ce)),be=w(()=>l(he)?a()("locale_content_disabled_short"):l(re)?a()("locale_content_error_short"):""),ue=w(()=>c()?.mode==="edit"&&c().locale===l(Y)),Ee=w(()=>l(re)?"error":"");Ci(X,()=>l(k),(_e,Ae)=>{Ae(_e,{get variant(){return l(S)},get size(){return l(C)},get label(){return l(ce)},get"aria-label"(){return`${l(fe)??""} ${l(be)??""}`},get selected(){return l(ue)},get class(){return l(Ee)},onSelect:()=>{ot(e.thisPane,{mode:"edit",locale:l(Y)}),o()?.mode==="preview"&&ot(d(),{mode:"preview",locale:l(Y)})},startIcon:$e=>{var Ve=W(),We=M(Ve);{var ht=pe=>{et(pe,{name:"edit_off"})},Ge=pe=>{var ye=W(),we=M(ye);{var xe=Ne=>{et(Ne,{name:"error"})};U(we,Ne=>{l(re)&&Ne(xe)},!0)}T(pe,ye)};U(We,pe=>{l(he)?pe(ht):pe(Ge,!1)})}T($e,Ve)},$$slots:{startIcon:!0}})}),T(J,te)});var K=D(G,2);{var ee=J=>{var Y=W(),te=M(Y);const ce=w(()=>a()("preview")),he=w(()=>c()?.mode==="preview");Ci(te,()=>l(k),(re,X)=>{X(re,{get variant(){return l(S)},get size(){return l(C)},get label(){return l(ce)},get selected(){return l(he)},onSelect:()=>{ot(e.thisPane,{mode:"preview",locale:o()?.locale??""})}})}),T(J,Y)};U(K,J=>{o()?.mode==="edit"&&l(b)&&u()?.showPreview&&J(ee)})}T(H,V)},$$slots:{default:!0}})}),T(t,E),oe(),r()}var e7=F('<h3 role="none"> </h3>'),t7=F("<!> <!>",1),n7=F("<!> <!> <!>",1),r7=F("<!> <!> <!> <!>",1),i7=F("<!> <!>",1),s7=F("<!> <!> <!>",1),o7=F('<div role="none" class="header svelte-2uraod"><!></div>');const a7={hash:"svelte-2uraod",code:'.header.svelte-2uraod {flex:none !important;}.header.svelte-2uraod > [role="toolbar"] {margin-right:auto;margin-left:auto;max-width:800px;}.header.svelte-2uraod > [role="toolbar"] h3 {margin:0 8px;font-size:var(--sui-font-size-default);}'};function _1(t,e){se(e,!0),Te(t,a7);const[n,r]=ve(),i=()=>z(rt,"$entryDraft",n),s=()=>z(e.thisPane,"$thisPane",n),o=()=>z(le,"$_",n),a=()=>z(Tt,"$prefs",n),c=()=>z(In,"$backend",n);let u=P(e,"thatPane",19,()=>st(null));const d=w(()=>i()?.collection),f=w(()=>i()?.collectionFile),h=w(()=>i()?.originalEntry),p=w(()=>i()?.originalValues??{}),g=w(()=>(l(f)??l(d))?._i18n??Ri),m=w(()=>l(g).i18nEnabled),v=w(()=>l(g).saveAllLocales),_=w(()=>l(g).allLocales),b=w(()=>l(g).defaultLocale),y=w(()=>i()?.currentLocales[s()?.locale??""]),x=w(()=>Object.values(i()?.currentLocales??{}).filter(I=>I).length===1),k=w(()=>l(m)?l(_).filter(I=>I!==s()?.locale):[]),S=w(()=>!!l(k).length),C=w(()=>s()?.locale&&!zn(Zr(i()?.currentValues[s().locale]),l(p)[s().locale])),E=w(()=>l(d)&&l(h)&&s()?.locale?GC(l(h),s().locale,l(d),l(f)):void 0);var A=o7(),O=R(A);const L=w(()=>o()("secondary"));po(O,{variant:"secondary",get"aria-label"(){return l(L)},children:(I,N)=>{var j=s7(),H=M(j);{var B=J=>{QW(J,{get id(){return e.id},get thisPane(){return e.thisPane},get thatPane(){return u()}})},V=J=>{var Y=e7(),te=R(Y);q(ce=>Z(te,ce),[()=>s()?.mode==="preview"?o()("preview"):o()("edit")]),T(J,Y)};U(H,J=>{l(m)?J(B):J(V,!1)})}var G=D(H,2);Xr(G,{flex:!0});var K=D(G,2);{var ee=J=>{var Y=i7();const te=w(()=>$s(s().locale));var ce=M(Y);{var he=fe=>{n2(fe,{get locale(){return s().locale},get otherLocales(){return l(k)}})};U(ce,fe=>{l(S)&&fe(he)})}var re=D(ce,2);const X=w(()=>o()("show_content_options_x_locale",{values:{locale:l(te)}}));Nr(re,{variant:"ghost",iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return l(X)},popup:be=>{const ue=w(()=>o()("content_options_x_locale",{values:{locale:l(te)}}));wr(be,{get"aria-label"(){return l(ue)},children:(Ee,_e)=>{var Ae=r7(),Ce=M(Ae);{var $e=xe=>{xy(xe,{get locale(){return s().locale},get otherLocales(){return l(k)}})};U(Ce,xe=>{l(S)&&s()?.locale&&xe($e)})}var Ve=D(Ce,2);const We=w(()=>o()("revert_changes")),ht=w(()=>!l(C));Nt(Ve,{get label(){return l(We)},get disabled(){return l(ht)},onclick:()=>{yy(s()?.locale)}});var Ge=D(Ve,2);{var pe=xe=>{var Ne=t7(),me=M(Ne);Ar(me,{});var Pe=D(me,2);const qe=w(()=>o()(l(y)?"disable_x_locale":Zr(i()?.currentValues[s().locale])?"reenable_x_locale":"enable_x_locale",{values:{locale:l(te)}})),Xe=w(()=>s().locale===l(b)||l(y)&&l(x));Nt(Pe,{get label(){return l(qe)},get disabled(){return l(Xe)},onclick:()=>{WA(s()?.locale??"")}}),T(xe,Ne)};U(Ge,xe=>{!l(v)&&s()?.locale&&xe(pe)})}var ye=D(Ge,2);{var we=xe=>{var Ne=n7(),me=M(Ne);Ar(me,{});var Pe=D(me,2);{var qe=Ke=>{const nt=w(()=>o()("view_on_live_site"));Nt(Ke,{get label(){return l(nt)},onclick:()=>{window.open(l(E))}})};U(Pe,Ke=>{l(E)&&Ke(qe)})}var Xe=D(Pe,2);{var ct=Ke=>{const nt=w(()=>!c()?.repository?.blobBaseURL),dt=w(()=>o()("view_on_x",{values:{service:c()?.repository?.label},default:o()("view_in_repository")}));Nt(Ke,{get disabled(){return l(nt)},get label(){return l(dt)},onclick:()=>{l(h)&&s()&&window.open(GB(l(h),s().locale))}})};U(Xe,Ke=>{a().devModeEnabled&&Ke(ct)})}T(xe,Ne)};U(ye,xe=>{l(h)&&(l(E)||a().devModeEnabled)&&xe(we)})}T(Ee,Ae)},$$slots:{default:!0}})},$$slots:{popup:!0}}),T(J,Y)};U(K,J=>{s()?.mode==="edit"&&J(ee)})}T(I,j)},$$slots:{default:!0}}),q(()=>ke(A,"id",e.id)),T(t,A),oe(),r()}var l7=F('<div role="none" class="svelte-ypyuow"><h3 class="svelte-ypyuow"> </h3></div>'),c7=F('<section class="svelte-ypyuow"><!> <div role="none" class="svelte-ypyuow"><!> <p class="error svelte-ypyuow"><!> <!></p></div></section>'),u7=F('<!> <div role="none" class="locales svelte-ypyuow"></div>',1);const d7={hash:"svelte-ypyuow",code:"p.svelte-ypyuow:not(:empty) {margin-top:0;}.locales.svelte-ypyuow {display:table;margin:16px 0 0;width:100%;}.locales.svelte-ypyuow section:where(.svelte-ypyuow) {display:table-row;}.locales.svelte-ypyuow section:where(.svelte-ypyuow) div:where(.svelte-ypyuow) {display:table-cell;vertical-align:middle;white-space:nowrap;}.locales.svelte-ypyuow section:where(.svelte-ypyuow) div:where(.svelte-ypyuow):last-child {width:90%;}.locales.svelte-ypyuow section:where(.svelte-ypyuow) h3:where(.svelte-ypyuow) {margin-right:8px;font-size:inherit;}.locales.svelte-ypyuow section:where(.svelte-ypyuow) p.error:where(.svelte-ypyuow) {margin:0;color:var(--sui-error-foreground-color);font-size:var(--sui-font-size-small);}"};function f7(t,e){se(e,!0),Te(t,d7);const[n,r]=ve(),i=()=>z(rt,"$entryDraft",n),s=()=>z(le,"$_",n);let o=P(e,"open",15,!1);const a=w(()=>i()?.collectionName??""),c=w(()=>i()?.currentSlugs??{});let u=ae(ie([]));const d=ie({}),f=ie({}),h=Gn("short"),p=()=>{$(u,ie(rs(l(a)).map(_=>Object.values(_.locales).map(({slug:b})=>b)).flat(1).filter(_=>!Object.values(l(c)).includes(_)))),Object.assign(d,l(c)),Object.assign(f,Object.fromEntries(Object.keys(l(c)).map(_=>[_,!1])))};Be(()=>{o()&&p()});const g=w(()=>s()("edit_slug")),m=w(()=>s()("update")),v=w(()=>zn(l(c),d)||Object.values(f).some(_=>_!==!1));is(t,{get title(){return l(g)},get okLabel(){return l(m)},get okDisabled(){return l(v)},onOk:()=>{At(rt,Se(i).currentSlugs=d,Se(i))},get open(){return o()},set open(_){o(_)},children:(_,b)=>{var y=u7(),x=M(y);Hn(x,{status:"warning",children:(S,C)=>{var E=Ue();q(A=>Z(E,A),[()=>s()("edit_slug_warning")]),T(S,E)},$$slots:{default:!0}});var k=D(x,2);ft(k,21,()=>Object.keys(d),cr,(S,C)=>{var E=c7(),A=R(E);{var O=K=>{var ee=l7(),J=R(ee),Y=R(J);q(te=>Z(Y,te),[()=>$s(l(C))]),T(K,ee)};U(A,K=>{["_","_default"].includes(l(C))||K(O)})}var L=D(A,2),I=R(L);const N=w(()=>f[l(C)]!==!1);Pn(I,{flex:!0,oninput:()=>{f[l(C)]=d[l(C)].trim()?l(u).includes(d[l(C)])?"duplicate":!1:"empty"},get invalid(){return l(N)},get"aria-errormessage"(){return`${h??""}-${l(C)??""}-error`},get value(){return d[l(C)]},set value(K){d[l(C)]=K}});var j=D(I,2),H=R(j);{var B=K=>{var ee=Ue();q(J=>Z(ee,J),[()=>s()("edit_slug_error.empty")]),T(K,ee)};U(H,K=>{f[l(C)]==="empty"&&K(B)})}var V=D(H,2);{var G=K=>{var ee=Ue();q(J=>Z(ee,J),[()=>s()("edit_slug_error.duplicate")]),T(K,ee)};U(V,K=>{f[l(C)]==="duplicate"&&K(G)})}q(()=>ke(j,"id",`${h??""}-${l(C)??""}-error`)),T(S,E)}),T(_,y)},$$slots:{default:!0}}),oe(),r()}const r2=async(t,e)=>{const{_i18n:{defaultLocale:n},_thumbnailFieldNames:r}=t,{locales:i}=e,{content:s}=i[n]??Object.values(i)[0]??{};if(!s)return;const o=r.map(a=>{if(a.includes("*")){const c=new RegExp(`^${ln(a).replace("\\*",".+")}$`);return Object.keys(s).filter(u=>c.test(u))}return a}).flat(1);for(const a of o){const c=s[a]?await uc(s[a],e,{thumbnail:!0}):void 0;if(c)return c}},i2=({entry:t,collectionName:e,relative:n=!1})=>{const{locales:r}=t,i=Fi(e),s=Object.values(r).map(({content:o})=>Object.entries(o).map(([a,c])=>{if(typeof c=="string"&&(!n||!/^[/@]/.test(c))&&["image","file"].includes(_n({collectionName:e,keyPath:a})?.widget??"string")){const u=ty(c,{entry:t,collection:i});if(u&&ey(u).some(d=>d.name===e))return u}})).flat(1).filter((o,a,c)=>!!o&&c.indexOf(o)===a);if(n&&i?._assetFolder?.entryRelative){const o=Ln(Object.values(t.locales)[0].path).dirname;ne(en).forEach(a=>{Ln(a.path).dirname===o&&!s.find(({path:c})=>c===a.path)&&s.push(a)})}return s};var h7=F("<!> <!>",1),p7=F("<!> <!> <!> <!> <!>",1),g7=F('<!> <h2 role="none"><strong role="none"><!></strong></h2> <!> <!> <!> <!> <!>',1),m7=F('<div class="error svelte-1432d6m"> </div>'),v7=F(" <!>",1),b7=F("<!> <!> <!> <!> <!> <!>",1);const _7={hash:"svelte-1432d6m",code:".error.svelte-1432d6m {margin-top:8px;border-radius:var(--sui-control-medium-border-radius);padding:12px;background-color:var(--sui-secondary-background-color);font-size:var(--sui-font-size-default);line-height:1.5;}"};function y7(t,e){se(e,!0),Te(t,_7);const[n,r]=ve(),i=()=>z(rt,"$entryDraft",n),s=()=>z(wt,"$siteConfig",n),o=()=>z(zs,"$backendName",n),a=()=>z(mA,"$entryDraftModified",n),c=()=>z(Tt,"$prefs",n),u=()=>z(le,"$_",n),d=()=>z(Ei,"$entryEditorSettings",n),f=()=>z(Dv,"$copyFromLocaleToast",n);let h=P(e,"disabled",3,!1),p=ae(!1),g=ae(!1),m=ae(!1),v=ae(!1),_=ae(""),b=ae(!1),y=ae(void 0);const x=w(()=>i()?.isNew??!0),k=w(()=>i()?.collection),S=w(()=>i()?.collectionFile),C=w(()=>i()?.originalEntry),E=w(()=>s()?.editor?.preview??!0),A=w(()=>s()?.backend.automatic_deployments),O=w(()=>o()!=="local"&&typeof l(A)=="boolean"),L=w(()=>(l(S)??l(k))?._i18n??Ri),I=w(()=>l(L).defaultLocale),N=w(()=>l(k)?.name),j=w(()=>l(k)?.label||l(N)),H=w(()=>l(k)?.label_singular||l(j)),B=w(()=>(l(S)??l(k))?.editor?.preview??l(E)),V=w(()=>l(x)||a()),G=w(()=>Object.values(i()?.validities??{}).map(Ae=>Object.values(Ae).map(({valid:Ce})=>!Ce)).flat(1).filter(Boolean).length),K=w(()=>l(N)&&l(C)&&l(k)?._assetFolder?.entryRelative?i2({entry:l(C),collectionName:l(N),relative:!0}):[]),ee=w(()=>l(k)&&l(C)?GC(l(C),l(I),l(k),l(S)):void 0),J=async({skipCI:Ae=void 0}={})=>{if($(b,!0),!!l(k))try{const Ce=await U5({skipCI:Ae});c()?.closeOnSave??!0?(Ul(`/collections/${l(N)}`),ot(rt,null)):(l(x)&&Un(`/collections/${l(N)}/entries/${Ce.subPath}`,{replaceState:!0,notifyChange:!1}),gu({collection:l(k),collectionFile:l(S),originalEntry:Ce,expanderStates:i()?.expanderStates}))}catch(Ce){Ce.message==="validation_failed"?$(p,!0):Ce.message==="saving_failed"?($(v,!0),$(_,ie(Ce.cause?.message??Ce.message??u()("unexpected_error")))):($(v,!0),$(_,""),console.error(Ce))}finally{$(b,!1)}};var Y=b7(),te=M(Y);const ce=w(()=>u()("primary"));po(te,{variant:"primary",get"aria-label"(){return l(ce)},children:(Ae,Ce)=>{var $e=g7(),Ve=M($e);const We=w(()=>u()("cancel_editing"));Ze(Ve,{variant:"ghost",iconic:!0,get"aria-label"(){return l(We)},keyShortcuts:"Escape",onclick:()=>{Ul(`/collections/${l(N)}`)},startIcon:bt=>{et(bt,{name:"arrow_back_ios_new"})},$$slots:{startIcon:!0}});var ht=D(Ve,2),Ge=R(ht),pe=R(Ge);{var ye=ut=>{var bt=Ue();q(Ct=>Z(bt,Ct),[()=>u()("creating_x",{values:{name:l(H)}})]),T(ut,bt)},we=ut=>{var bt=Ue();q(Ct=>Z(bt,Ct),[()=>u()("editing_x_in_x",{values:{collection:l(j),entry:l(S)?l(S).label||l(S).name:l(k)&&l(C)?qo(l(k),l(C)):""}})]),T(ut,bt)};U(pe,ut=>{l(x)?ut(ye):ut(we,!1)})}var xe=D(ht,2);Xr(xe,{flex:!0});var Ne=D(xe,2);{var me=ut=>{const bt=w(()=>u()("view_on_live_site"));Ze(ut,{variant:"tertiary",get label(){return l(bt)},onclick:()=>{window.open(l(ee))}})};U(Ne,ut=>{!h()&&l(ee)&&ut(me)})}var Pe=D(Ne,2);{var qe=ut=>{var bt=h7(),Ct=M(bt);const sn=w(()=>u()("duplicate")),Rn=w(()=>u()("duplicate_entry")),Xn=w(()=>l(k)?.create===!1);Ze(Ct,{variant:"ghost",get label(){return l(sn)},get"aria-label"(){return l(Rn)},get disabled(){return l(Xn)},onclick:()=>{Un(`/collections/${l(N)}/new`,{replaceState:!0,notifyChange:!1}),T5()}});var kr=D(Ct,2);const zi=w(()=>u()("delete")),mi=w(()=>u()("delete_entry")),Lt=w(()=>l(k)?.delete===!1);Ze(kr,{variant:"ghost",get label(){return l(zi)},get"aria-label"(){return l(mi)},get disabled(){return l(Lt)},onclick:()=>{$(m,!0)}}),T(ut,bt)};U(Pe,ut=>{!h()&&!l(S)&&!l(x)&&ut(qe)})}var Xe=D(Pe,2);const ct=w(()=>u()("show_editor_options"));$t(Nr(Xe,{get disabled(){return h()},variant:"ghost",iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return l(ct)},popup:bt=>{const Ct=w(()=>u()("editor_options"));wr(bt,{get"aria-label"(){return l(Ct)},children:(sn,Rn)=>{var Xn=p7(),kr=M(Xn);const zi=w(()=>u()("show_preview")),mi=w(()=>d()?.showPreview),Lt=w(()=>!l(B));eh(kr,{get label(){return l(zi)},get checked(){return l(mi)},get disabled(){return l(Lt)},onChange:()=>{Ei.update((er={})=>({...er,showPreview:!er.showPreview}))}});var yn=D(kr,2);const Gt=w(()=>u()("sync_scrolling")),yt=w(()=>d()?.syncScrolling),Xt=w(()=>!l(B)&&Object.keys(i()?.currentValues??{}).length===1);eh(yn,{get label(){return l(Gt)},get checked(){return l(yt)},get disabled(){return l(Xt)},onChange:()=>{Ei.update((er={})=>({...er,syncScrolling:!er.syncScrolling}))}});var $n=D(yn,2);Ar($n,{});var wn=D($n,2);const qt=w(()=>u()("edit_slug")),Yt=w(()=>!!l(S)||l(x)||l(k)?.delete===!1);Nt(wn,{get label(){return l(qt)},get disabled(){return l(Yt)},onclick:()=>{$(g,!0)}});var fn=D(wn,2);const Dn=w(()=>u()("revert_all_changes")),Qn=w(()=>!l(V));Nt(fn,{get label(){return l(Dn)},get disabled(){return l(Qn)},onclick:()=>{yy()}}),T(sn,Xn)},$$slots:{default:!0}})},$$slots:{popup:!0}}),bt=>$(y,ie(bt)),()=>l(y));var Ke=D(Xe,2);{var nt=ut=>{const bt=w(()=>u()(l(b)?"saving":"save")),Ct=w(()=>h()||!l(V)||l(b));uL(ut,{variant:"primary",get label(){return l(bt)},get disabled(){return l(Ct)},keyShortcuts:"Accel+S",onclick:()=>{J()},popup:Rn=>{wr(Rn,{children:(Xn,kr)=>{const zi=w(()=>u()(l(A)?"save_without_publishing":"save_and_publish"));Nt(Xn,{get label(){return l(zi)},onclick:()=>{J({skipCI:l(A)})}})},$$slots:{default:!0}})},$$slots:{popup:!0}})},dt=ut=>{const bt=w(()=>u()(l(b)?"saving":"save")),Ct=w(()=>h()||!l(V)||l(b));Ze(ut,{variant:"primary",get label(){return l(bt)},get disabled(){return l(Ct)},keyShortcuts:"Accel+S",onclick:()=>{J()}})};U(Ke,ut=>{l(O)?ut(nt):ut(dt,!1)})}T(Ae,$e)},$$slots:{default:!0}});var he=D(te,2);Yn(he,{get show(){return l(p)},set show(Ae){$(p,ie(Ae))},children:(Ae,Ce)=>{Hn(Ae,{status:"error",children:($e,Ve)=>{var We=Ue();q(ht=>Z(We,ht),[()=>u()(l(G)===1?"entry_validation_error":"entry_validation_errors",{values:{count:l(G)}})]),T($e,We)},$$slots:{default:!0}})},$$slots:{default:!0}});var re=D(he,2);Yn(re,{get id(){return f().id},get show(){return f().show},set show(Ae){At(Dv,Se(f).show=Ae,Se(f))},children:(Ae,Ce)=>{const $e=w(()=>{const{status:Ve,message:We,count:ht,sourceLocale:Ge}=f();return{status:Ve,message:We,count:ht,sourceLocale:Ge}});Hn(Ae,{get status(){return l($e).status},children:(Ve,We)=>{var ht=Ue();q(Ge=>Z(ht,Ge),[()=>u()(`editor.${l($e).message}`,{values:{count:l($e).count,source:l($e).sourceLocale?$s(l($e).sourceLocale):""}})]),T(Ve,ht)},$$slots:{default:!0}})},$$slots:{default:!0}});var X=D(re,2);f7(X,{get open(){return l(g)},set open(Ae){$(g,ie(Ae))}});var fe=D(X,2);const be=w(()=>u()("delete_entry")),ue=w(()=>u()("delete"));xc(fe,{get title(){return l(be)},get okLabel(){return l(ue)},onOk:async()=>{l(C)&&await xA([l(C).id],l(K).map(({path:Ae})=>Ae)),Ul(`/collections/${l(N)}`)},onClose:()=>{l(y).focus()},get open(){return l(m)},set open(Ae){$(m,ie(Ae))},children:(Ae,Ce)=>{var $e=Ue();q(Ve=>Z($e,Ve),[()=>u()(l(K).length?"confirm_deleting_this_entry_with_assets":"confirm_deleting_this_entry")]),T(Ae,$e)},$$slots:{default:!0}});var Ee=D(fe,2);const _e=w(()=>u()("saving_entry.error.title"));Hk(Ee,{get title(){return l(_e)},onClose:()=>{l(y).focus()},get open(){return l(v)},set open(Ae){$(v,ie(Ae))},children:(Ae,Ce)=>{var $e=v7(),Ve=M($e),We=D(Ve);{var ht=Ge=>{var pe=m7(),ye=R(pe);q(()=>Z(ye,l(_))),T(Ge,pe)};U(We,Ge=>{l(_)&&Ge(ht)})}q(Ge=>Z(Ve,`${Ge??""} `),[()=>u()("saving_entry.error.description")]),T(Ae,$e)},$$slots:{default:!0}}),T(t,Y),oe(),r()}var w7=F('<div role="none"><!></div> <div role="none"><!></div>',1),x7=F("<!> <!>",1),k7=F("<!> <!>",1),S7=F("<!> <!>",1),E7=F('<div role="none" class="cols svelte-1pb3yei"><!></div>'),T7=F("<!> <!>",1),C7=F('<div role="none" class="wrapper svelte-1pb3yei"><!></div> <!> <!>',1);const A7={hash:"svelte-1pb3yei",code:'.wrapper.svelte-1pb3yei {display:contents;}.wrapper[hidden].svelte-1pb3yei {display:none;}.wrapper.svelte-1pb3yei > .sui.group {position:absolute;inset:0;z-index:100;display:flex;flex-direction:column;background-color:var(--sui-secondary-background-color);transition:filter 250ms;}.wrapper[inert].svelte-1pb3yei > .sui.group {filter:opacity(0);}.wrapper.svelte-1pb3yei .cols:where(.svelte-1pb3yei) {flex:auto;overflow:hidden;display:flex;gap:4px;background-color:var(--sui-secondary-background-color);}.wrapper.svelte-1pb3yei .cols:where(.svelte-1pb3yei) > div {display:flex;flex-direction:column;min-width:480px;background-color:var(--sui-primary-background-color);transition:all 500ms;}.wrapper.svelte-1pb3yei .cols:where(.svelte-1pb3yei) > [data-mode="edit"] {flex:1 1;}.wrapper.svelte-1pb3yei .cols:where(.svelte-1pb3yei) > [data-mode="preview"] {flex:2 1;}'};function P7(t,e){se(e,!0),Te(t,A7);const[n,r]=ve(),i=()=>z(wt,"$siteConfig",n),s=()=>z(rt,"$entryDraft",n),o=()=>z(Ei,"$entryEditorSettings",n),a=()=>z(ra,"$editorLeftPane",n),c=()=>z(_o,"$editorRightPane",n),u=()=>z(tl,"$showContentOverlay",n),d=()=>z(le,"$_",n),f=()=>z(Rv,"$showDuplicateToast",n);let h,p=!1,g=ae(!1),m=ae(!0),v=ae(void 0),_=ae(void 0),b=ae(void 0);const y=w(()=>i()?.editor?.preview??!0),x=w(()=>s()?.isNew??!0),k=w(()=>s()?.collection),S=w(()=>s()?.collectionFile),C=w(()=>s()?.originalEntry),E=w(()=>l(C)?.id??[l(k)?.name??"-",l(S)?.name??"-"].join("/")),A=w(()=>o()??{}),O=w(()=>l(A).showPreview),L=w(()=>(l(S)??l(k))?._i18n??Ri),I=w(()=>l(L).i18nEnabled),N=w(()=>l(L).allLocales),j=w(()=>l(L).defaultLocale),H=w(()=>(l(S)??l(k))?.editor?.preview??l(y)),B=w(()=>l(S)?.name?[l(k)?.name,l(S).name].join("|"):l(k)?.name),V=w(()=>l(k)?.create??!1),G=w(()=>l(k)?.limit??1/0),K=w(()=>l(x)&&(!l(V)||rs(l(k)?.name??"").length>=l(G))),ee=async()=>{const[ue,Ee]=o()?.paneStates?.[l(B)??""]??[];return p||!ue||!Ee||ue.locale&&!l(N).includes(ue.locale)||Ee.locale&&!l(N).includes(Ee.locale)||(!l(O)||!l(H))&&(ue.mode==="preview"||Ee.mode==="preview")?!1:(p=!0,await $l(),ot(ra,ue),ot(_o,Ee),await $l(),p=!1,!0)},J=async()=>{if(s()&&!await ee())if(ot(ra,{mode:"edit",locale:a()?.locale??l(j)}),!l(O)||!l(H)){const ue=l(I)?l(N).filter(Ee=>Ee!==a()?.locale):[];ot(_o,ue.length?{mode:"edit",locale:ue[0]}:null)}else ot(_o,{mode:"preview",locale:a().locale})},Y=()=>{!l(k)||p||!a()||!c()||!l(B)||Ei.update((ue={})=>({...ue,paneStates:{...ue.paneStates??{},[l(B)]:[a(),c()]}}))},te=async()=>{await $l(),h&&(h.tabIndex=0,h.focus())};cn(()=>{h=l(v)?.querySelector('[role="group"]'),h.addEventListener("transitionend",()=>{u()||($(g,!1),$(m,!0),ot(rt,null))})}),Be(()=>{l(B)&&(ot(ra,null),ot(_o,null))}),Be(()=>{l(O),l(H),J()}),Be(()=>{a(),c(),Y()}),Be(()=>{l(v)&&(u()?l(m)&&($(g,!1),$(m,!1),J(),te(),O5()):($(g,!0),P5()))});var ce=C7(),he=M(ce),re=R(he);const X=w(()=>d()("content_editor"));_r(re,{class:"content-editor",get"aria-label"(){return l(X)},children:(ue,Ee)=>{var _e=W(),Ae=M(_e);As(Ae,()=>l(E),Ce=>{var $e=T7(),Ve=M($e);y7(Ve,{get disabled(){return l(K)}});var We=D(Ve,2);{var ht=pe=>{Tr(pe,{children:(ye,we)=>{var xe=w7(),Ne=M(xe),me=R(Ne);{var Pe=Ke=>{var nt=Ue();q(dt=>Z(nt,dt),[()=>d()("creating_entries_disabled_by_admin")]),T(Ke,nt)},qe=Ke=>{var nt=Ue();q(dt=>Z(nt,dt),[()=>d()("creating_entries_disabled_by_limit",{values:{limit:l(G)}})]),T(Ke,nt)};U(me,Ke=>{l(V)?Ke(qe,!1):Ke(Pe)})}var Xe=D(Ne,2),ct=R(Xe);Ze(ct,{variant:"primary",onclick:()=>{Un(`/collection/${l(k)?.name}`,{replaceState:!0})},children:(Ke,nt)=>{var dt=Ue();q(ut=>Z(dt,ut),[()=>d()("back_to_collection")]),T(Ke,dt)},$$slots:{default:!0}}),T(ye,xe)},$$slots:{default:!0}})},Ge=pe=>{var ye=E7(),we=R(ye);{var xe=Ne=>{var me=S7(),Pe=M(me);{var qe=Ke=>{const nt=w(()=>{const{locale:ut,mode:bt}=a();return{locale:ut,mode:bt}}),dt=w(()=>d()(l(nt).mode==="edit"?"edit_x_locale":"preview_x_locale",{values:{locale:$s(l(nt).locale)}}));_r(Ke,{class:"pane",get"aria-label"(){return l(dt)},get"data-locale"(){return l(nt).locale},get"data-mode"(){return l(nt).mode},children:(ut,bt)=>{var Ct=x7(),sn=M(Ct);_1(sn,{id:"left-pane-header",thisPane:ra,thatPane:_o});var Rn=D(sn,2);b1(Rn,{id:"left-pane-body",thisPane:ra,get thatPaneContentArea(){return l(b)},get thisPaneContentArea(){return l(_)},set thisPaneContentArea(Xn){$(_,ie(Xn))}}),T(ut,Ct)},$$slots:{default:!0}})};U(Pe,Ke=>{a()&&Ke(qe)})}var Xe=D(Pe,2);{var ct=Ke=>{const nt=w(()=>{const{locale:ut,mode:bt}=c();return{locale:ut,mode:bt}}),dt=w(()=>d()(l(nt).mode==="edit"?"edit_x_locale":"preview_x_locale",{values:{locale:$s(l(nt).locale)}}));_r(Ke,{get"aria-label"(){return l(dt)},get"data-locale"(){return l(nt).locale},get"data-mode"(){return l(nt).mode},children:(ut,bt)=>{var Ct=k7(),sn=M(Ct);_1(sn,{id:"right-pane-header",thisPane:_o,thatPane:ra});var Rn=D(sn,2);b1(Rn,{id:"right-pane-body",thisPane:_o,get thatPaneContentArea(){return l(_)},get thisPaneContentArea(){return l(b)},set thisPaneContentArea(Xn){$(b,ie(Xn))}}),T(ut,Ct)},$$slots:{default:!0}})};U(Xe,Ke=>{c()&&Ke(ct)})}T(Ne,me)};U(we,Ne=>{l(k)&&Ne(xe)})}T(pe,ye)};U(We,pe=>{l(K)?pe(ht):pe(Ge,!1)})}T(Ce,$e)}),T(ue,_e)},$$slots:{default:!0}}),$t(he,ue=>$(v,ue),()=>l(v));var fe=D(he,2);w6(fe,{});var be=D(fe,2);Yn(be,{get show(){return uk(),f()},set show(ue){ot(Rv,ue)},children:(ue,Ee)=>{Hn(ue,{status:"success",children:(_e,Ae)=>{var Ce=Ue();q($e=>Z(Ce,$e),[()=>d()("entry_duplicated")]),T(_e,Ce)},$$slots:{default:!0}})},$$slots:{default:!0}}),q(()=>{he.hidden=l(m),he.inert=!u(),pt(he,"hiding",l(g))}),T(t,ce),oe(),r()}const O7=["title","name","date","author","description"],li=st({type:"list"}),y1=t=>t.replace(/[_*`]+/g,""),$7=(t,e,{key:n,order:r}={})=>{const i=[...t],{name:s,_i18n:{defaultLocale:o}}=e;if(n===void 0){const f={useTemplate:!0,allowMarkdown:!0};return i.sort((h,p)=>qo(e,h,f).localeCompare(qo(e,p,f)))}const a={slug:String,commit_author:String,commit_date:Date}[n]||(i.length?lc({entry:i[0],locale:o,collectionName:s,key:n})?.constructor:String)||String,c=Object.fromEntries(i.map(f=>[f.slug,lc({entry:f,locale:o,collectionName:s,key:n})])),u=_n({collectionName:s,keyPath:n}),d=u?.widget==="datetime"?u:void 0;return i.sort((f,h)=>{const p=c[f.slug],g=c[h.slug];if(p===void 0||g===void 0)return 0;if(d){const m=ac(p,d),v=ac(g,d);if(m&&v)return Number(m)-Number(v)}return a===String?ui(y1(p),y1(g)):a===Date?Number(p)-Number(g):p-g}),r==="descending"&&i.reverse(),i},L7=(t,e,n)=>{const{name:r,view_filters:i=[],_i18n:{defaultLocale:s}}=e,o=n.filter(({field:a,pattern:c})=>a!==void 0&&c!==void 0&&i.some(u=>u.field===a&&u.pattern===c));return t.filter(a=>o.every(({field:c,pattern:u})=>{const d={entry:a,locale:s,collectionName:r,key:c},f=lc({...d,resolveRef:!1}),h=lc({...d}),p=typeof u=="string"?new RegExp(u):void 0;return f===void 0||h===void 0?!1:p?p.test(String(f))||p.test(String(h)):f===u||h===u}))},N7=(t,e,{field:n,pattern:r}={field:"",pattern:void 0})=>{if(!n)return t.length?[{name:"*",entries:t}]:[];const{name:i,_i18n:{defaultLocale:s}}=e,o=ne(li).sort,a=typeof r=="string"?new RegExp(r):void 0,c={},u=ne(le)("other");t.forEach(f=>{const h=lc({entry:f,locale:s,collectionName:i,key:n});if(h===void 0)return;const p=a?String(h).match(a)?.[0]??u:String(h);p in c||(c[p]=[]),c[p].push(f)});const d=Object.entries(c).map(([f,h])=>({name:f,entries:h})).sort(({name:f},{name:h})=>ui(f,h));return o?.key===n&&o.order==="descending"&&d.reverse(),d},Al=st(),I7=t=>{const{name:e,identifier_field:n,sortable_fields:r}=t;let i=[],s,o;if(r){if(Array.isArray(r)&&(i=r),Jn(r)){const a=r;Array.isArray(a.fields)&&(i=a.fields),a.default&&Jn(a.default)&&(s=a.default.field,o=["descending","Descending"].includes(a.default.direction??"")?"descending":"ascending")}}else i=[...O7],n&&(i.unshift(n),s=n);return i=rc(i).filter(a=>!!_n({collectionName:e,keyPath:a})),{fields:i,default:{key:s??i[0],order:o??"ascending"}}},R7=(t,e)=>["name","commit_author","commit_date"].includes(e)?ne(le)(`sort_keys.${e}`):e.includes(".")?e.split(".").map((n,r,i)=>{if(/^\d+$/.test(n))return;const s=i.slice(0,r+1).join(".");return _n({collectionName:t.name,keyPath:s})?.label||n}).filter(Boolean).join(" – "):t.fields?.find(({name:n})=>n===e)?.label||e,D7=ur([Vn,ii,Nn],([t,e],n)=>{if(!t?.folder){n([]);return}const r=t,{fields:i,default:s}=I7(r),o=ne(Al)?.[r.name]??{type:"list"};o.sort??=s,e.every(a=>!!a.commitAuthor)&&!i.includes("author")&&i.push("commit_author"),e.every(a=>!!a.commitDate)&&!i.includes("date")&&i.push("commit_date"),n(i.map(a=>({key:a,label:R7(r,a)}))),zn(o,ne(li))||li.set(o)}),Qo=ur([ii,Vn],([t,e],n)=>{n(t&&e?rs(e.name):[])}),Sy=ur([Qo,li],([t,e],n)=>{const r=ne(Vn);let i=[...t];if(!i.length||Zo(r,i[0]).length)n([]);else{i=$7(i,r,e.sort),e.filters&&(i=L7(i,r,e.filters));const s=N7(i,r,e.group);zn(ne(Sy),s)||n(s)}}),M7=async({repository:t})=>{const{databaseName:e}=t??{},n=e?new jo(e,"ui-settings"):null,r="contents-view";Al.set(await n?.get(r)??{}),Al.subscribe(i=>{(async()=>{try{zn(i,await n?.get(r))||await n?.set(r,i)}catch{}})()}),li.subscribe(i=>{const{name:s}=ne(Vn)??{},o=ne(Al)?.[s??""]??{};s&&!zn(i,o)&&Al.update(a=>({...a,[s]:i}))})};In.subscribe(t=>{t&&!ne(Al)&&M7(t)});Qo.subscribe(t=>{cc.set([]),ne(Tt).devModeEnabled&&console.info("listedEntries",t)});Vn.subscribe(t=>{t&&ne(Tt).devModeEnabled&&console.info("selectedCollection",t)});var F7=F('<span role="none"><!></span>'),z7=F("<!> <!> <!>",1);function j7(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(Qo,"$listedEntries",n),s=()=>z(cc,"$selectedEntries",n),o=c=>{cc.update(u=>{const d=u.indexOf(e.entry);return c&&d===-1&&u.push(e.entry),!c&&d>-1&&u.splice(d,1),u})},a=w(()=>i().indexOf(e.entry));fd(t,{get"aria-rowindex"(){return l(a)},onChange:c=>{o(c.detail.selected)},onclick:()=>{Un(`/collections/${e.collection.name}/entries/${e.entry.subPath}`)},children:(c,u)=>{var d=z7(),f=M(d);di(f,{class:"checkbox",children:(m,v)=>{const _=w(()=>s().includes(e.entry));dd(m,{role:"none",tabindex:"-1",get checked(){return l(_)},onChange:({detail:{checked:b}})=>{o(b)}})},$$slots:{default:!0}});var h=D(f,2);{var p=m=>{di(m,{class:"image",children:(v,_)=>{var b=W(),y=M(b);yr(y,()=>r2(e.collection,e.entry),null,(x,k)=>{var S=W(),C=M(S);{var E=A=>{const O=w(()=>e.viewType==="list"?"icon":"tile");vy(A,{get src(){return l(k)},get variant(){return l(O)},cover:!0})};U(C,A=>{l(k)&&A(E)})}T(x,S)}),T(v,b)},$$slots:{default:!0}})};U(h,m=>{e.collection._thumbnailFieldNames.length&&m(p)})}var g=D(h,2);di(g,{class:"title",children:(m,v)=>{var _=F7(),b=R(_);br(b,()=>qo(e.collection,e.entry,{useTemplate:!0,allowMarkdown:!0})),T(m,_)},$$slots:{default:!0}}),T(c,d)},$$slots:{default:!0}}),oe(),r()}var U7=F('<span role="none"> </span>'),B7=F('<span role="none"> </span> <!>',1),q7=F('<span role="none"> </span>');function H7(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(Vn,"$selectedCollection",n),s=()=>z(li,"$currentView",n),o=()=>z(Sy,"$entryGroups",n),a=()=>z(le,"$_",n),c=()=>z(Qo,"$listedEntries",n),u=w(i),d=w(()=>s().type),f=w(()=>o().map(({entries:p})=>p).flat(1)),h=w(()=>l(u)?.files?a()("file_list"):a()("entry_list"));by(t,{get"aria-label"(){return l(h)},children:(p,g)=>{var m=W(),v=M(m);{var _=y=>{var x=W(),k=M(x);{var S=E=>{const A=w(()=>{const{defaultLocale:L}=l(u)._i18n;return{defaultLocale:L}}),O=w(()=>a()("entries"));od(E,{get viewType(){return l(d)},id:"entry-list",get"aria-label"(){return l(O)},get"aria-rowcount"(){return c().length},children:(L,I)=>{var N=W(),j=M(N);ft(j,1,o,({name:H,entries:B})=>H,(H,B)=>{let V=()=>l(B).name,G=()=>l(B).entries;const K=w(()=>V()!=="*"?V():void 0);Vk(H,{get label(){return l(K)},children:(ee,J)=>{const Y=w(()=>G().filter(({locales:te})=>!!(te[l(A).defaultLocale]??Object.values(te)[0])?.content));Ua(ee,{get items(){return l(Y)},itemKey:"id",renderItem:(ce,he=Fe)=>{j7(ce,{get collection(){return l(u)},get entry(){return he()},get viewType(){return l(d)}})},$$slots:{renderItem:!0}})},$$slots:{default:!0}})}),T(L,N)},$$slots:{default:!0}})},C=E=>{var A=W(),O=M(A);{var L=N=>{Tr(N,{children:(j,H)=>{var B=U7(),V=R(B);q(G=>Z(V,G),[()=>a()("no_entries_found")]),T(j,B)},$$slots:{default:!0}})},I=N=>{Tr(N,{children:(j,H)=>{var B=B7(),V=M(B),G=R(V),K=D(V,2);const ee=w(()=>!l(u).create),J=w(()=>a()("create_new_entry"));Ze(K,{variant:"primary",get disabled(){return l(ee)},get label(){return l(J)},onclick:()=>{Un(`/collections/${l(u).name}/new`)},startIcon:te=>{et(te,{name:"edit"})},$$slots:{startIcon:!0}}),q(Y=>Z(G,Y),[()=>a()("no_entries_created")]),T(j,B)},$$slots:{default:!0}})};U(O,N=>{c().length?N(L):N(I,!1)},!0)}T(E,A)};U(k,E=>{l(f).length?E(S):E(C,!1)})}T(y,x)},b=y=>{Tr(y,{children:(x,k)=>{var S=q7(),C=R(S);q(E=>Z(C,E),[()=>a()("collection_not_found")]),T(x,S)},$$slots:{default:!0}})};U(v,y=>{l(u)?y(_):y(b,!1)})}T(p,m)},$$slots:{default:!0}}),oe(),r()}var V7=F('<span role="none"> </span>');function W7(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(le,"$_",n),s=()=>z(Vn,"$selectedCollection",n),o=w(()=>i()("file_list"));by(t,{get"aria-label"(){return l(o)},children:(a,c)=>{var u=W(),d=M(u);{var f=p=>{const g=w(()=>i()("files"));od(p,{viewType:"list",get"aria-label"(){return l(g)},get"aria-rowcount"(){return s().files.length},children:(m,v)=>{Ua(m,{get items(){return s().files},itemKey:"name",renderItem:(b,y)=>{let x=()=>y?.().name,k=()=>y?.().label;fd(b,{onclick:()=>{Un(`/collections/${s().name}/entries/${x()}`)},children:(S,C)=>{di(S,{class:"title",children:(E,A)=>{var O=Ue();q(()=>Z(O,k()||x())),T(E,O)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{renderItem:!0}})},$$slots:{default:!0}})},h=p=>{Tr(p,{children:(g,m)=>{var v=V7(),_=R(v);q(b=>Z(_,b),[()=>i()("no_files_in_collection")]),T(g,v)},$$slots:{default:!0}})};U(d,p=>{s()?.files?.length?p(f):p(h,!1)})}T(a,u)},$$slots:{default:!0}}),oe(),r()}var G7=F('<span class="count"> </span>'),K7=F('<div role="none" class="primary-sidebar"><!></div>');function Y7(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(Nn,"$appLocale",n),s=()=>z(wt,"$siteConfig",n),o=()=>z(le,"$_",n),a=()=>z(Vn,"$selectedCollection",n),c=()=>z(ii,"$allEntries",n),u=w(()=>Intl.NumberFormat(i()??void 0)),d=w(()=>s()?.collections.filter(({hide:g})=>!g)??[]);var f=K7(),h=R(f);const p=w(()=>o()("collections"));hd(h,{get"aria-label"(){return l(p)},"aria-controls":"collection-container",children:(g,m)=>{var v=W(),_=M(v);ft(_,17,()=>l(d),({name:b,label:y,icon:x,files:k,divider:S=!1})=>b,(b,y)=>{let x=()=>l(y).name,k=()=>l(y).label,S=()=>l(y).icon,C=()=>l(y).files,E=Ye(()=>it(l(y).divider,!1));var A=W(),O=M(A);{var L=N=>{Ar(N,{})},I=N=>{const j=w(()=>k()||x()),H=w(()=>a()?.name===x());mr(N,{get label(){return l(j)},get selected(){return l(H)},onSelect:()=>{Un(`/collections/${x()}`)},startIcon:G=>{const K=w(()=>S()||"edit_note");et(G,{get name(){return l(K)}})},endIcon:G=>{var K=W(),ee=M(K);As(ee,c,J=>{var Y=W(),te=M(Y);yr(te,()=>vn(0),null,ce=>{var he=G7();const re=w(()=>(C()??rs(x())).length);var X=R(he);q((fe,be)=>{ke(he,"aria-label",`(${fe??""})`),Z(X,be)},[()=>o()(l(re)>1?"many_entries":l(re)===1?"one_entry":"no_entries",{values:{count:l(re)}}),()=>l(u).format(l(re))]),T(ce,he)}),T(J,Y)}),T(G,K)},$$slots:{startIcon:!0,endIcon:!0}})};U(O,N=>{l(E)?N(L):N(I,!1)})}T(b,A)}),T(g,v)},$$slots:{default:!0}}),T(t,f),oe(),r()}function J7(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(cc,"$selectedEntries",n),s=()=>z(Vn,"$selectedCollection",n),o=()=>z(le,"$_",n),a=()=>z(Qo,"$listedEntries",n);let c=P(e,"open",15,!1);const u=w(()=>{if(i().length&&s()?._assetFolder?.entryRelative){const h=s().name;return i().map(p=>i2({entry:p,collectionName:h,relative:!0})).flat(1)}return[]}),d=w(()=>i().length===1?o()("delete_entry"):o()("delete_entries")),f=w(()=>o()("delete"));xc(t,{get title(){return l(d)},get okLabel(){return l(f)},onOk:()=>{xA(i().map(({id:h})=>h),l(u).map(({path:h})=>h))},get open(){return c()},set open(h){c(h)},children:(h,p)=>{var g=W(),m=M(g);{var v=b=>{var y=Ue();q(x=>Z(y,x),[()=>o()(l(u).length?"confirm_deleting_selected_entry_with_assets":"confirm_deleting_selected_entry")]),T(b,y)},_=b=>{var y=W(),x=M(y);{var k=C=>{var E=Ue();q(A=>Z(E,A),[()=>o()(l(u).length?"confirm_deleting_all_entries_with_assets":"confirm_deleting_all_entries")]),T(C,E)},S=C=>{var E=Ue();q(A=>Z(E,A),[()=>o()(l(u).length?"confirm_deleting_selected_entries_with_assets":"confirm_deleting_selected_entries",{values:{count:i().length}})]),T(C,E)};U(x,C=>{i().length===a().length?C(k):C(S,!1)},!0)}T(b,y)};U(m,b=>{i().length===1?b(v):b(_,!1)})}T(h,g)},$$slots:{default:!0}}),oe(),r()}var Z7=F("<!> <!>",1),X7=F('<h2 role="none"> </h2> <div role="none" class="description svelte-1koahme"><!></div> <!> <!>',1),Q7=F('<svelte-css-wrapper style="display: contents"><!></svelte-css-wrapper>',1),eG=F("<!> <!>",1),tG=F("<!> <!>",1);const nG={hash:"svelte-1koahme",code:".description.svelte-1koahme {flex:auto;font-size:var(--sui-font-size-small);opacity:0.8;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}"};function rG(t,e){se(e,!0),Te(t,nG);const[n,r]=ve(),i=()=>z(Vn,"$selectedCollection",n),s=()=>z(Qo,"$listedEntries",n),o=()=>z(le,"$_",n),a=()=>z(cc,"$selectedEntries",n);let c=ae(!1);const u=C=>fi.sanitize(Ot.parseInline(C),{ALLOWED_TAGS:["strong","em","del","code","a"],ALLOWED_ATTR:["href"]}),d=w(()=>i()?.name),f=w(()=>i()?.label),h=w(()=>i()?.description),p=w(()=>i()?._type==="entry"),g=w(()=>i()?.create??!1),m=w(()=>i()?.delete??!0),v=w(()=>i()?.limit??1/0),_=w(()=>l(p)&&(!l(g)||s().length>=l(v))),b=w(()=>l(f)||l(d)||"");var y=tG(),x=M(y);{var k=C=>{var E=eG(),A=M(E);const O=w(()=>o()("collection"));po(A,{variant:"primary",get"aria-label"(){return l(O)},children:(N,j)=>{var H=X7(),B=M(H),V=R(B),G=D(B,2),K=R(G);br(K,()=>u(l(h)||""));var ee=D(G,2);Xr(ee,{flex:!0});var J=D(ee,2);{var Y=te=>{var ce=Z7(),he=M(ce);const re=w(()=>o()("delete")),X=w(()=>a().length===1?o()("delete_selected_entry"):o()("delete_selected_entries")),fe=w(()=>!a().length||!l(m));Ze(he,{variant:"ghost",get label(){return l(re)},get"aria-label"(){return l(X)},get disabled(){return l(fe)},onclick:()=>{$(c,!0)}});var be=D(he,2);const ue=w(()=>o()("create")),Ee=w(()=>o()("create_new_entry"));Ze(be,{variant:"primary",get disabled(){return l(_)},get label(){return l(ue)},get"aria-label"(){return l(Ee)},keyShortcuts:"Accel+E",onclick:()=>{Un(`/collections/${l(d)}/new`)},startIcon:Ae=>{et(Ae,{name:"edit"})},$$slots:{startIcon:!0}}),T(te,ce)};U(J,te=>{l(p)&&te(Y)})}q(()=>Z(V,l(b))),T(N,H)},$$slots:{default:!0}});var L=D(A,2);{var I=N=>{var j=Q7(),H=M(j);tp(H,()=>({"--sui-infobar-border-width":"1px 0","--sui-infobar-message-justify-content":"center"})),sb(H.lastChild,{dismissible:!1,children:(B,V)=>{var G=W(),K=M(G);{var ee=Y=>{var te=Ue();q(ce=>Z(te,ce),[()=>o()("creating_entries_disabled_by_admin")]),T(Y,te)},J=Y=>{var te=Ue();q(ce=>Z(te,ce),[()=>o()("creating_entries_disabled_by_limit",{values:{limit:l(v)}})]),T(Y,te)};U(K,Y=>{l(g)?Y(J,!1):Y(ee)})}T(B,G)},$$slots:{default:!0}}),T(N,j)};U(L,N=>{l(_)&&N(I)})}T(C,E)};U(x,C=>{i()&&C(k)})}var S=D(x,2);J7(S,{get open(){return l(c)},set open(C){$(c,ie(C))}}),T(t,y),oe(),r()}function iG(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(Vn,"$selectedCollection",n),s=()=>z(li,"$currentView",n),o=()=>z(le,"$_",n),a=()=>z(en,"$allAssets",n),c=w(()=>i()?._assetFolder?.internalPath),u=w(()=>i()?._assetFolder?.entryRelative),d=w(()=>!!l(u));var f=W(),h=M(f);{var p=g=>{const m=w(()=>!s().showMedia),v=w(()=>o()("collection_assets"));_r(g,{id:"collection-assets",class:"secondary-sidebar",get hidden(){return l(m)},get"aria-label"(){return l(v)},children:(_,b)=>{Ud(_,{get disabled(){return l(d)},multiple:!0,onSelect:({files:y})=>{ot(ws,{folder:l(c),files:y})},children:(y,x)=>{const k=w(()=>a().filter(({folder:S})=>l(c)===S));JA(y,{get assets(){return l(k)},onSelect:({asset:S})=>{Un(`/assets/${S.path}`)}})},$$slots:{default:!0}})},$$slots:{default:!0}})};U(h,g=>{l(c)&&g(p)})}T(t,f),oe(),r()}var sG=F("<!> <!>",1);function oG(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(le,"$_",n),s=()=>z(e.currentView,"$currentView",n);let o=P(e,"label",3,""),a=P(e,"disabled",3,!1),c=P(e,"noneLabel",3,""),u=P(e,"groups",19,()=>[]);const d=w(()=>o()||i()("group"));Nr(t,{variant:"ghost",get label(){return l(d)},get disabled(){return a()},popupPosition:"bottom-right",popup:h=>{const p=w(()=>i()("grouping_options"));wr(h,{get"aria-label"(){return l(p)},get"aria-controls"(){return e["aria-controls"]},children:(g,m)=>{var v=sG(),_=M(v);const b=w(()=>c()||i()("sort_keys.none")),y=w(()=>!s().group);Mu(_,{get label(){return l(b)},get checked(){return l(y)},onSelect:()=>{e.currentView.update(k=>({...k,group:void 0}))}});var x=D(_,2);ft(x,17,u,cr,(k,S)=>{let C=()=>l(S).label,E=()=>l(S).field,A=()=>l(S).pattern;const O=w(()=>s().group?.field===E()&&s().group.pattern===A());Mu(k,{get label(){return C()},get checked(){return l(O)},onSelect:()=>{e.currentView.update(L=>({...L,group:{field:E(),pattern:A()}}))}})}),T(g,v)},$$slots:{default:!0}})},$$slots:{popup:!0}}),oe(),r()}var aG=F("<!> <!> <!> <!> <!> <!> <!> <!>",1);function lG(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(Vn,"$selectedCollection",n),s=()=>z(Qo,"$listedEntries",n),o=()=>z(le,"$_",n),a=()=>z(Sy,"$entryGroups",n),c=()=>z(D7,"$sortFields",n),u=()=>z(li,"$currentView",n),d=w(()=>i()?._type==="entry"?i():void 0),f=w(()=>l(d)?.name),h=w(()=>l(d)?._thumbnailFieldNames??[]),p=w(()=>!!s().length),g=w(()=>s().length>1);var m=W(),v=M(m);{var _=b=>{const y=w(()=>o()("entry_list"));po(b,{variant:"secondary",get"aria-label"(){return l(y)},children:(x,k)=>{var S=aG(),C=M(S);const E=w(()=>a().map(({entries:te})=>te).flat(1));FA(C,{get allItems(){return l(E)},selectedItems:cc});var A=D(C,2);Xr(A,{flex:!0});var O=D(A,2);const L=w(()=>!l(g)||!c().length);zA(O,{get disabled(){return l(L)},currentView:li,get fields(){return c()},get collectionName(){return l(f)},"aria-controls":"entry-list"});var I=D(O,2);{var N=te=>{const ce=w(()=>!l(g));MA(te,{get disabled(){return l(ce)},currentView:li,get filters(){return l(d).view_filters},multiple:!0,"aria-controls":"entry-list"})};U(I,te=>{l(d).view_filters?.length&&te(N)})}var j=D(I,2);{var H=te=>{const ce=w(()=>!l(g));oG(te,{get disabled(){return l(ce)},currentView:li,get groups(){return l(d).view_groups},"aria-controls":"entry-list"})};U(j,te=>{l(d).view_groups?.length&&te(H)})}var B=D(j,2);const V=w(()=>!l(p)||!l(h).length);_y(B,{get disabled(){return l(V)},currentView:li,"aria-controls":"entry-list"});var G=D(B,2);Ar(G,{orientation:"vertical"});var K=D(G,2);const ee=w(()=>!l(p)||!l(d)._assetFolder),J=w(()=>!!u().showMedia),Y=w(()=>o()(u().showMedia?"hide_assets":"show_assets"));Ze(K,{variant:"ghost",iconic:!0,get disabled(){return l(ee)},get pressed(){return l(J)},"aria-controls":"collection-assets",get"aria-expanded"(){return u().showMedia},get"aria-label"(){return l(Y)},onclick:()=>{li.update(ce=>({...ce,showMedia:!u().showMedia}))},startIcon:ce=>{et(ce,{name:"photo_library"})},$$slots:{startIcon:!0}}),T(x,S)},$$slots:{default:!0}})};U(v,b=>{l(d)&&b(_)})}T(t,m),oe(),r()}var cG=F("<!> <!> <!> <!>",1);function uG(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(Vn,"$selectedCollection",n),s=()=>z(le,"$_",n),o=()=>z(Qo,"$listedEntries",n),a=()=>z(Au,"$contentUpdatesToast",n),c=/^\/collections\/(?<_collectionName>[^/]+)(?:\/(?<routeType>new|entries))?(?:\/(?<subPath>.+?))?$/,u=w(()=>i()?.files?W7:H7),d=()=>{const{path:_,params:b}=jd(),y=_.match(c);if(!y?.groups)return;const{_collectionName:x,routeType:k,subPath:S}=y.groups,C=x?Fi(x):void 0;if(!C||C.hide?ot(Vn,void 0):i()?.name!==C.name&&ot(Vn,C),!C||!i()){ot(bs,s()("collection_not_found"));return}const{name:E,label:A,files:O}=i(),L=A||E,I=O?i()._fileMap:void 0;if(!k){const N=o().length;ot(bs,s()(N>1?"viewing_x_collection_many_entries":N===1?"viewing_x_collection_one_entry":"viewing_x_collection_no_entries",{values:{collection:L,count:N}}));return}if(ot(tl,!0),I){if(k==="entries"&&S){const N=J_(E,S),j=I[S];gu(N?{collection:C,collectionFile:j,originalEntry:N}:{collection:C,collectionFile:j,originalEntry:{slug:j.name,locales:Object.fromEntries(j._i18n.initialLocales.map(H=>[H,{}]))}}),ot(bs,s()("editing_x_collection_file",{values:{collection:L,file:j.label||j.name}}))}}else if(k==="new"&&!S&&(gu({collection:C,dynamicValues:b}),ot(bs,s()("creating_x_collection_entry",{values:{collection:L}}))),k==="entries"&&S){const N=o().find(j=>j.subPath===S);N&&(gu({collection:C,originalEntry:N}),ot(bs,s()("editing_x_collection_entry",{values:{collection:L,entry:qo(i(),N)}})))}};cn(()=>{d()});var f=cG();wi("hashchange",ql,()=>{d()});var h=M(f);const p=w(()=>s()("content_library"));Bd(h,{class:"content",get"aria-label"(){return l(p)},primarySidebar:y=>{Y7(y,{})},main:y=>{const x=w(()=>s()("x_collection",{values:{collection:i()?.label||i()?.name}})),k=w(()=>i()?.description);_r(y,{id:"collection-container",class:"main",get"aria-label"(){return l(x)},get"aria-description"(){return l(k)},children:(S,C)=>{jA(S,{primaryToolbar:I=>{rG(I,{})},secondaryToolbar:I=>{var N=W(),j=M(N);{var H=B=>{lG(B,{})};U(j,B=>{i()?._type==="entry"&&o().length&&B(H)})}T(I,N)},mainContent:I=>{var N=W(),j=M(N);Ci(j,()=>l(u),(H,B)=>{B(H,{})}),T(I,N)},secondarySidebar:I=>{iG(I,{})},$$slots:{primaryToolbar:!0,secondaryToolbar:!0,mainContent:!0,secondarySidebar:!0}})},$$slots:{default:!0}})},$$slots:{primarySidebar:!0,main:!0}});var g=D(h,2);P7(g,{});var m=D(g,2);Yn(m,{get show(){return a().saved},set show(_){At(Au,Se(a).saved=_,Se(a))},children:(_,b)=>{Hn(_,{status:"success",children:(y,x)=>{var k=Ue();q(S=>Z(k,S),[()=>s()(a().published?"entry_saved_and_published":"entry_saved")]),T(y,k)},$$slots:{default:!0}})},$$slots:{default:!0}});var v=D(m,2);Yn(v,{get show(){return a().deleted},set show(_){At(Au,Se(a).deleted=_,Se(a))},children:(_,b)=>{Hn(_,{status:"success",children:(y,x)=>{var k=Ue();q(S=>Z(k,S),[()=>s()(a().count===1?"entry_deleted":"entries_deleted",{values:{count:a().count}})]),T(y,k)},$$slots:{default:!0}})},$$slots:{default:!0}}),T(t,f),oe(),r()}function dG(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(ug,"$translator",n),s=()=>z(tl,"$showContentOverlay",n),o=()=>z(pu,"$translatorApiKeyDialogState",n),a=()=>z(le,"$_",n),c=()=>z(Tt,"$prefs",n),u=w(()=>i().serviceId),d=w(()=>i().serviceLabel),f=w(()=>i().developerURL),h=w(()=>i().apiKeyURL),p=w(()=>i().apiKeyPattern);Be(()=>{!s()&&o().show&&(At(pu,Se(o).show=!1,Se(o)),o().resolve?.())});const g=w(()=>a()(o().multiple?"translate_fields":"translate_field")),m=w(()=>({spellcheck:!1,"aria-label":a()("api_key")}));NL(t,{get title(){return l(g)},showOk:!1,get textboxAttrs(){return l(m)},oninput:v=>{const _=v.target.value.trim();l(p)?.test(_)&&(At(Tt,Se(c).apiKeys??={},Se(c)),At(Tt,Se(c).apiKeys[l(u)]=_,Se(c)),At(pu,Se(o).show=!1,Se(o)),o().resolve?.(_))},onCancel:()=>{o().resolve?.()},get open(){return o().show},set open(v){At(pu,Se(o).show=v,Se(o))},children:(v,_)=>{var b=W(),y=M(b);br(y,()=>fi.sanitize(a()("prefs.languages.translator.description",{values:{service:l(d),homeHref:`href="${l(f)}"`,apiKeyHref:`href="${l(h)}"`}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})),T(v,b)},$$slots:{default:!0}}),oe(),r()}function fG(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(iy,"$entryParseErrors",n),s=()=>z(le,"$_",n);let o=ae(!!i().length);Yn(t,{get show(){return l(o)},set show(a){$(o,ie(a))},children:(a,c)=>{Hn(a,{status:"error",children:(u,d)=>{var f=Ue();q(h=>Z(f,h),[()=>s()(i().length===1?"entry_parse_error":"entry_parse_errors")]),T(u,f)},$$slots:{default:!0}})},$$slots:{default:!0}}),oe(),r()}var hG=F('<section><h4> </h4> <p> </p> <div role="none"><!></div></section>');function pG(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(Tt,"$prefs",n),s=()=>z(le,"$_",n);P(e,"onChange",3,void 0);let o=ae(!0);Be(()=>{$(o,ie(i().underlineLinks??!0))}),Be(()=>{i().underlineLinks!==l(o)&&At(Tt,Se(i).underlineLinks=l(o),Se(i))}),kc(t,{id:"prefs-tab-accessibility",children:(a,c)=>{var u=hG(),d=R(u),f=R(d),h=D(d,2),p=R(h),g=D(h,2),m=R(g);const v=w(()=>s()("prefs.accessibility.underline_links.switch_label"));gd(m,{get label(){return l(v)},get checked(){return l(o)},set checked(_){$(o,ie(_))}}),q((_,b)=>{Z(f,_),Z(p,b)},[()=>s()("prefs.accessibility.underline_links.title"),()=>s()("prefs.accessibility.underline_links.description")]),T(a,u)},$$slots:{default:!0}}),oe(),r()}var gG=F('<section><h4> </h4> <p> </p> <div role="none"><!></div></section>'),mG=F('<!> <section><h4> </h4> <p> </p> <div role="none"><!></div></section>',1);function vG(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(wt,"$siteConfig",n),s=()=>z(Tt,"$prefs",n),o=()=>z(le,"$_",n);let a=P(e,"onChange",3,void 0);const c=w(()=>i()?.backend.automatic_deployments);let u=ae(!1);Be(()=>{$(u,ie(s().devModeEnabled??!1))}),Be(()=>{s().devModeEnabled!==l(u)&&At(Tt,Se(s).devModeEnabled=l(u),Se(s))}),kc(t,{id:"prefs-tab-advanced",children:(d,f)=>{var h=mG(),p=M(h);{var g=C=>{var E=gG(),A=R(E),O=R(A),L=D(A,2),I=R(L),N=D(L,2),j=R(N);const H=w(()=>o()("prefs.advanced.deploy_hook.field_label"));Pn(j,{flex:!0,get label(){return l(H)},onchange:()=>{a()?.({message:o()(s().deployHookURL?"prefs.advanced.deploy_hook.url_saved":"prefs.advanced.deploy_hook.url_removed")})},get value(){return s().deployHookURL},set value(B){At(Tt,Se(s).deployHookURL=B,Se(s))}}),q((B,V)=>{Z(O,B),Z(I,V)},[()=>o()("prefs.advanced.deploy_hook.title"),()=>o()("prefs.advanced.deploy_hook.description")]),T(C,E)};U(p,C=>{typeof l(c)=="boolean"&&C(g)})}var m=D(p,2),v=R(m),_=R(v),b=D(v,2),y=R(b),x=D(b,2),k=R(x);const S=w(()=>o()("prefs.advanced.developer_mode.switch_label"));gd(k,{get label(){return l(S)},get checked(){return l(u)},set checked(C){$(u,ie(C))}}),q((C,E)=>{Z(_,C),Z(y,E)},[()=>o()("prefs.advanced.developer_mode.title"),()=>o()("prefs.advanced.developer_mode.description")]),T(d,h)},$$slots:{default:!0}}),oe(),r()}var bG=F('<section><h4> </h4> <div role="none"><!></div></section>');function _G(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(le,"$_",n),s=()=>z(Tt,"$prefs",n);P(e,"onChange",3,void 0),kc(t,{id:"prefs-tab-appearance",children:(o,a)=>{var c=bG(),u=R(c),d=R(u),f=D(u,2),h=R(f);const p=w(()=>i()("prefs.appearance.select_theme"));cp(h,{get"aria-label"(){return l(p)},onChange:g=>{ot(Tt,{...s(),theme:g.detail.value})},children:(g,m)=>{var v=W(),_=M(v);ft(_,16,()=>["auto","dark","light"],cr,(b,y)=>{const x=w(()=>i()(`prefs.theme.${y}`)),k=w(()=>!s().theme&&y==="auto"||s().theme===y);Du(b,{variant:"tertiary",get label(){return l(x)},get value(){return y},get selected(){return l(k)}})}),T(g,v)},$$slots:{default:!0}}),q(g=>Z(d,g),[()=>i()("prefs.appearance.theme")]),T(o,c)},$$slots:{default:!0}}),oe(),r()}var yG=F('<section><h4> </h4> <div role="none"><!></div></section>');function wG(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(Tt,"$prefs",n),s=()=>z(le,"$_",n);P(e,"onChange",3,void 0);let o=ae(!0);Be(()=>{$(o,ie(i().closeOnSave??!0))}),Be(()=>{i().closeOnSave!==l(o)&&At(Tt,Se(i).closeOnSave=l(o),Se(i))}),kc(t,{id:"prefs-tab-contents",children:(a,c)=>{var u=yG(),d=R(u),f=R(d),h=D(d,2),p=R(h);const g=w(()=>s()("prefs.contents.editor.close_on_save.switch_label"));gd(p,{get label(){return l(g)},get checked(){return l(o)},set checked(m){$(o,ie(m))}}),q(m=>Z(f,m),[()=>s()("prefs.contents.editor.title")]),T(a,u)},$$slots:{default:!0}}),oe(),r()}var xG=F('<section><h4> </h4> <p><!></p> <div role="none"><!></div></section>'),kG=F('<section><h4> </h4> <div role="none"><!></div></section> <!>',1);function SG(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(le,"$_",n),s=()=>z(Nn,"$appLocale",n),o=()=>z(Tt,"$prefs",n),a=()=>z(Dk,"$appLocales",n),c=()=>z(wt,"$siteConfig",n);let u=P(e,"onChange",3,void 0);kc(t,{id:"prefs-tab-languages",children:(d,f)=>{var h=kG(),p=M(h),g=R(p),m=R(g),v=D(g,2),_=R(v);As(_,s,x=>{const k=w(()=>i()("prefs.languages.ui_language.select_language")),S=w(()=>s()??void 0);pd(x,{get"aria-label"(){return l(k)},get value(){return l(S)},onChange:C=>{ot(Tt,{...o(),locale:C.detail.value})},children:(C,E)=>{var A=W(),O=M(A);ft(O,1,a,cr,(L,I)=>{const N=w(()=>$s(l(I))),j=w(()=>l(I)===s());mr(L,{get label(){return l(N)},get value(){return l(I)},get selected(){return l(j)}})}),T(C,A)},$$slots:{default:!0}})});var b=D(p,2);{var y=x=>{var k=W(),S=M(k);ft(S,17,()=>Object.entries(P6),([C,E])=>C,(C,E)=>{let A=()=>l(E)[0],O=()=>l(E)[1];var L=xG();const I=w(()=>{const{serviceLabel:ee,developerURL:J,apiKeyURL:Y}=O();return{serviceLabel:ee,developerURL:J,apiKeyURL:Y}});var N=R(L),j=R(N),H=D(N,2),B=R(H);br(B,()=>fi.sanitize(i()("prefs.languages.translator.description",{values:{service:l(I).serviceLabel,homeHref:`href="${l(I).developerURL}"`,apiKeyHref:`href="${l(I).apiKeyURL}"`}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]}));var V=D(H,2),G=R(V);{var K=ee=>{const J=w(()=>i()("prefs.languages.translator.field_label",{values:{service:l(I).serviceLabel}}));Pn(ee,{flex:!0,spellcheck:"false",get"aria-label"(){return l(J)},onchange:()=>{u()?.({message:i()(o().apiKeys?.[A()]?"prefs.changes.api_key_saved":"prefs.changes.api_key_removed")})},get value(){return o().apiKeys[A()]},set value(Y){At(Tt,Se(o).apiKeys[A()]=Y,Se(o))}})};U(G,ee=>{o().apiKeys&&ee(K)})}q(ee=>Z(j,ee),[()=>i()("prefs.languages.translator.title",{values:{service:l(I).serviceLabel}})]),T(C,L)}),T(x,k)};U(b,x=>{(c()?.i18n?.locales?.length??0)>1&&x(y)})}q(x=>Z(m,x),[()=>i()("prefs.languages.ui_language.title")]),T(d,h)},$$slots:{default:!0}}),oe(),r()}var EG=F('<section><h4> </h4> <p><!></p> <div role="none"><!></div></section>');function TG(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(le,"$_",n),s=()=>z(Tt,"$prefs",n);let o=P(e,"onChange",3,void 0);kc(t,{id:"prefs-tab-media",children:(a,c)=>{var u=W(),d=M(u);ft(d,17,()=>Object.entries(mu),([f,h])=>f,(f,h)=>{let p=()=>l(h)[0],g=()=>l(h)[1];var m=EG();const v=w(()=>{const{serviceLabel:E,developerURL:A,apiKeyURL:O}=g();return{serviceLabel:E,developerURL:A,apiKeyURL:O}});var _=R(m),b=R(_),y=D(_,2),x=R(y);br(x,()=>fi.sanitize(i()("prefs.media.stock_photos.description",{values:{service:l(v).serviceLabel,homeHref:`href="${l(v).developerURL}"`,apiKeyHref:`href="${l(v).apiKeyURL}"`}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]}));var k=D(y,2),S=R(k);{var C=E=>{const A=w(()=>i()("prefs.media.stock_photos.field_label",{values:{service:l(v).serviceLabel}}));Pn(E,{flex:!0,spellcheck:"false",get"aria-label"(){return l(A)},onchange:()=>{o()?.({message:i()(s().apiKeys?.[p()]?"prefs.changes.api_key_saved":"prefs.changes.api_key_removed")})},get value(){return s().apiKeys[p()]},set value(O){At(Tt,Se(s).apiKeys[p()]=O,Se(s))}})};U(S,E=>{s().apiKeys&&E(C)})}q(E=>Z(b,E),[()=>i()("prefs.media.stock_photos.title",{values:{service:l(v).serviceLabel}})]),T(f,m)}),T(a,u)},$$slots:{default:!0}}),oe(),r()}var CG=F('<div role="none" class="wrapper svelte-z6esgm"><!> <!></div>'),AG=F("<!> <!>",1);const PG={hash:"svelte-z6esgm",code:".wrapper.svelte-z6esgm {display:flex;}.wrapper.svelte-z6esgm .tab-list {flex:none;}.wrapper.svelte-z6esgm .tab-panel {flex:auto;border-width:0;}.wrapper.svelte-z6esgm .tab-panel section:not(:first-child) {margin:16px 0 0;}.wrapper.svelte-z6esgm .tab-panel p {margin-top:0;}.wrapper.svelte-z6esgm .tab-panel h4 {font-size:inherit;}.wrapper.svelte-z6esgm .tab-panel h4 ~ div {margin:8px 0 0;}.wrapper.svelte-z6esgm .tab-panel h4 ~ p {margin:8px 0 0;color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-small);}"};function OG(t,e){se(e,!0),Te(t,PG);const[n,r]=ve(),i=()=>z(le,"$_",n);let s=P(e,"open",15,!1),o=P(e,"onClose",3,void 0),a=ae("appearance"),c=ae(""),u=ae(!1);const d=[{key:"appearance",icon:"palette",component:_G},{key:"languages",icon:"language",component:SG},{key:"contents",icon:"library_books",component:wG},{key:"media",icon:"photo_library",component:TG},{key:"accessibility",icon:"accessibility_new",component:pG},{key:"advanced",icon:"build",component:vG}];var f=AG(),h=M(f);const p=w(()=>i()("settings"));is(h,{get title(){return l(p)},showOk:!1,showCancel:!1,showClose:!0,onClose:()=>{o()?.()},get open(){return s()},set open(m){s(m)},children:(m,v)=>{var _=CG(),b=R(_);const y=w(()=>i()("categories"));GN(b,{orientation:"vertical",get"aria-label"(){return l(y)},children:(k,S)=>{var C=W(),E=M(C);ft(E,17,()=>d,({key:A,icon:O})=>A,(A,O)=>{let L=()=>l(O).key,I=()=>l(O).icon;const N=w(()=>i()(`prefs.${L()}.title`)),j=w(()=>L()===l(a));JN(A,{get label(){return l(N)},get selected(){return l(j)},get"aria-controls"(){return`prefs-tab-${L()??""}`},onSelect:()=>{$(a,ie(L()))},startIcon:B=>{et(B,{get name(){return I()}})},$$slots:{startIcon:!0}})}),T(k,C)},$$slots:{default:!0}});var x=D(b,2);ft(x,17,()=>d,({key:k,component:S})=>k,(k,S)=>{let C=()=>l(S).component;var E=W(),A=M(E);Ci(A,C,(O,L)=>{L(O,{onChange:({message:I})=>{$(c,ie(I)),$(u,!0)}})}),T(k,E)}),T(m,_)},$$slots:{default:!0}});var g=D(h,2);Yn(g,{get show(){return l(u)},set show(m){$(u,ie(m))},children:(m,v)=>{Hn(m,{status:"success",children:(_,b)=>{var y=Ue();q(()=>Z(y,l(c))),T(_,y)},$$slots:{default:!0}})},$$slots:{default:!0}}),T(t,f),oe(),r()}var $G=F('<img class="avatar svelte-xssn1c" loading="lazy" alt="">'),LG=F("<!> <!>",1),NG=F("<!> <!> <!> <!> <!> <!> <!> <!>",1),IG=F('<div role="none" class="wrapper svelte-xssn1c"><!></div> <!>',1);const RG={hash:"svelte-xssn1c",code:".wrapper.svelte-xssn1c {display:contents;}.wrapper.svelte-xssn1c button.avatar {border-width:0;background-color:transparent;}.avatar.svelte-xssn1c {width:32px;height:32px;border-radius:32px;object-fit:cover;}"};function DG(t,e){se(e,!0),Te(t,RG);const[n,r]=ve(),i=()=>z(gi,"$user",n),s=()=>z(zs,"$backendName",n),o=()=>z(le,"$_",n),a=()=>z(Tt,"$prefs",n),c=()=>z(In,"$backend",n);let u=ae(void 0),d=ae(!1);const f=w(()=>!!i()?.avatarURL),h=w(()=>s()==="local");var p=IG(),g=M(p),m=R(g);const v=w(()=>l(f)?"avatar":""),_=w(()=>o()("show_account_menu"));$t(Nr(m,{variant:"ghost",iconic:!0,get class(){return l(v)},popupPosition:"bottom-right",get"aria-label"(){return l(_)},endIcon:k=>{var S=W(),C=M(S);{var E=O=>{var L=$G();q(()=>ke(L,"src",i()?.avatarURL)),T(O,L)},A=O=>{et(O,{name:"account_circle"})};U(C,O=>{l(f)?O(E):O(A,!1)})}T(k,S)},popup:k=>{const S=w(()=>o()("account"));wr(k,{get"aria-label"(){return l(S)},children:(C,E)=>{var A=NG(),O=M(A);const L=w(()=>l(h)?o()("working_with_local_repo"):o()("signed_in_as_x",{values:{name:i()?.login}}));Nt(O,{get label(){return l(L)},get disabled(){return l(h)},onclick:()=>{window.open(i()?.profileURL,"_blank")}});var I=D(O,2);Ar(I,{});var N=D(I,2);const j=w(()=>o()("live_site"));Nt(N,{get label(){return l(j)},onclick:()=>{_A()}});var H=D(N,2);{var B=te=>{var ce=LG(),he=M(ce);const re=w(()=>o()("git_repository")),X=w(()=>!c()?.repository?.treeBaseURL);Nt(he,{get label(){return l(re)},get disabled(){return l(X)},onclick:()=>{window.open(c()?.repository?.treeBaseURL)}});var fe=D(he,2);const be=w(()=>o()("site_config"));Nt(fe,{get label(){return l(be)},onclick:()=>{Un("/config")}}),T(te,ce)};U(H,te=>{a().devModeEnabled&&te(B)})}var V=D(H,2);Ar(V,{});var G=D(V,2);const K=w(()=>o()("settings"));Nt(G,{get label(){return l(K)},onclick:()=>{$(d,!0)}});var ee=D(G,2);Ar(ee,{});var J=D(ee,2);const Y=w(()=>o()("sign_out"));Nt(J,{get label(){return l(Y)},onclick:async()=>{window.requestAnimationFrame(()=>{wq()})}}),T(C,A)},$$slots:{default:!0}})},$$slots:{endIcon:!0,popup:!0}}),k=>$(u,ie(k)),()=>l(u));var b=D(g,2);OG(b,{onClose:()=>{l(u)?.focus()},get open(){return l(d)},set open(y){$(d,ie(y))}}),T(t,p),oe(),r()}var MG=F("<!> <!>",1),FG=F("<!> <!>",1);function zG(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(wt,"$siteConfig",n),s=()=>z(le,"$_",n),o=w(()=>(i()?.collections??[]).filter(({folder:c,hide:u=!1,divider:d=!1})=>typeof c=="string"&&!u&&!d)),a=w(()=>s()("create_entry_or_assets"));Nr(t,{variant:"ghost",iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return l(a)},endIcon:d=>{et(d,{name:"add"})},popup:d=>{const f=w(()=>s()("create_entry_or_assets"));wr(d,{get"aria-label"(){return l(f)},children:(h,p)=>{var g=FG(),m=M(g);{var v=y=>{var x=MG(),k=M(x);ft(k,17,()=>l(o),C=>C.name,(C,E)=>{const A=w(()=>{const{name:I,label:N,label_singular:j,create:H=!1,limit:B=1/0}=l(E);return{name:I,label:N,labelSingular:j,create:H,limit:B}}),O=w(()=>l(A).labelSingular||l(A).label||l(A).name),L=w(()=>!l(A).create||rs(l(A).name).length>=l(A).limit);Nt(C,{get label(){return l(O)},get disabled(){return l(L)},onclick:()=>{Un(`/collections/${l(A).name}/new`)}})});var S=D(k,2);Ar(S,{}),T(y,x)};U(m,y=>{l(o).length&&y(v)})}var _=D(m,2);const b=w(()=>s()("assets"));Nt(_,{get label(){return l(b)},onclick:async()=>{Un("/assets"),await vn(100),ot(_a,!0)}}),T(h,g)},$$slots:{default:!0}})},$$slots:{endIcon:!0,popup:!0}}),oe(),r()}var jG=F('<kbd class="svelte-h10dbf"> </kbd>'),UG=F("<!> <!>",1),BG=F('<div role="none" class="wrapper svelte-h10dbf"><!></div>');const qG={hash:"svelte-h10dbf",code:".wrapper.svelte-h10dbf {display:contents;}.wrapper.svelte-h10dbf .table-row {display:flex;align-items:center;gap:16px;padding:8px 0;border-top:1px solid var(--sui-secondary-border-color);}.wrapper.svelte-h10dbf .table-row:last-child {border-bottom:1px solid var(--sui-secondary-border-color);}.wrapper.svelte-h10dbf .table-row .feature {flex:auto;}.wrapper.svelte-h10dbf .table-row .keys {display:flex;gap:8px;}kbd.svelte-h10dbf {display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;border-color:var(--sui-primary-accent-color);border-radius:4px;padding:0 8px;height:32px;min-width:32px;background-color:var(--sui-tertiary-background-color);font-family:var(--sui-control-font-family);font-size:var(--sui-control-font-size);line-height:var(--sui-control-line-height);}"};function HG(t,e){se(e,!0),Te(t,qG);const[n,r]=ve(),i=()=>z(le,"$_",n);let s=P(e,"open",15,!1),o=P(e,"onClose",3,void 0);const a=[{feature:"view_content_library",keys:"Alt+1"},{feature:"view_asset_library",keys:"Alt+2"},{feature:"search",keys:"Accel+F"},{feature:"create_entry",keys:"Accel+E"},{feature:"save_entry",keys:"Accel+S"},{feature:"cancel_editing",keys:"Escape"}];let c=ae("Ctrl");cn(()=>{(navigator.userAgentData?.platform==="macOS"||navigator.platform.startsWith("Mac"))&&$(c,"⌘")});const u=w(()=>i()("help.keyboard_shortcuts"));is(t,{get title(){return l(u)},showOk:!1,showCancel:!1,showClose:!0,onClose:()=>{o()?.()},get open(){return s()},set open(d){s(d)},children:(d,f)=>{var h=BG(),p=R(h);const g=w(()=>i()("help.keyboard_shortcuts"));HN(p,{get"aria-label"(){return l(g)},children:(m,v)=>{var _=W(),b=M(_);ft(b,17,()=>a,({feature:y,keys:x})=>x,(y,x)=>{let k=()=>l(x).feature,S=()=>l(x).keys;UN(y,{children:(C,E)=>{var A=UG(),O=M(A);bw(O,{class:"feature",children:(I,N)=>{var j=Ue();q(H=>Z(j,H),[()=>i()(`keyboard_shortcuts_.${k()}`)]),T(I,j)},$$slots:{default:!0}});var L=D(O,2);bw(L,{class:"keys",children:(I,N)=>{var j=W(),H=M(j);ft(H,17,()=>S().split("+"),cr,(B,V)=>{var G=jG(),K=R(G);q(ee=>Z(K,ee),[()=>l(V).replace("Accel",l(c))]),T(B,G)}),T(I,j)},$$slots:{default:!0}}),T(C,A)},$$slots:{default:!0}})}),T(m,_)},$$slots:{default:!0}}),T(d,h)},$$slots:{default:!0}}),oe(),r()}var VG=F('<span class="version svelte-69n4ux"></span>'),WG=F("<!> <!> <!> <!> <!> <!> <!> <!> <!>",1),GG=F('<div role="none" class="wrapper svelte-69n4ux"><!></div> <!>',1);const KG={hash:"svelte-69n4ux",code:".wrapper.svelte-69n4ux {display:contents;}.version.svelte-69n4ux {border-radius:4px;padding:0 6px;color:var(--sui-secondary-foreground-color);background-color:var(--sui-selected-background-color);font-size:var(--sui-font-size-small);}"};function YG(t,e){se(e,!0),Te(t,KG);const[n,r]=ve(),i=()=>z(le,"$_",n),s=()=>z(Tt,"$prefs",n);let o=ae(void 0),a=ae(!1);var c=GG(),u=M(c),d=R(u);const f=w(()=>i()("show_help_menu"));$t(Nr(d,{variant:"ghost",iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return l(f)},endIcon:m=>{et(m,{name:"help"})},popup:m=>{const v=w(()=>i()("help"));wr(m,{get"aria-label"(){return l(v)},children:(_,b)=>{var y=WG(),x=M(y);{var k=ee=>{const J=w(()=>i()("keyboard_shortcuts"));Nt(ee,{get label(){return l(J)},onclick:()=>{$(a,!0)}})};U(x,ee=>{window.matchMedia("(pointer: fine)").matches&&ee(k)})}var S=D(x,2);const C=w(()=>i()("documentation"));Nt(S,{get label(){return l(C)},onclick:()=>{window.open("https://github.com/sveltia/sveltia-cms/blob/main/README.md","_blank")}});var E=D(S,2);const A=w(()=>i()("release_notes"));Nt(E,{get label(){return l(A)},onclick:()=>{window.open("https://github.com/sveltia/sveltia-cms/releases","_blank")},endIcon:J=>{var Y=W(),te=M(Y);{var ce=he=>{var re=VG();re.textContent=`v${Fv}`,q(X=>ke(re,"aria-label",`(${X??""})`),[()=>i()("version_x",{values:{version:Fv}})]),T(he,re)};U(te,he=>{s().devModeEnabled&&he(ce)})}T(J,Y)},$$slots:{endIcon:!0}});var O=D(E,2);Ar(O,{});var L=D(O,2);const I=w(()=>i()("report_issue"));Nt(L,{get label(){return l(I)},onclick:()=>{window.open("https://github.com/sveltia/sveltia-cms/issues/new?labels=bug","_blank")}});var N=D(L,2);const j=w(()=>i()("share_feedback"));Nt(N,{get label(){return l(j)},onclick:()=>{window.open("https://github.com/sveltia/sveltia-cms/discussions/new?category=general","_blank")}});var H=D(N,2);const B=w(()=>i()("get_help"));Nt(H,{get label(){return l(B)},onclick:()=>{window.open("https://github.com/sveltia/sveltia-cms/discussions/new?category=q-a","_blank")}});var V=D(H,2);Ar(V,{});var G=D(V,2);const K=w(()=>i()("join_discord"));Nt(G,{get label(){return l(K)},onclick:()=>{window.open("https://discord.gg/5hwCGqup5b","_blank")}}),T(_,y)},$$slots:{default:!0}})},$$slots:{endIcon:!0,popup:!0}}),m=>$(o,ie(m)),()=>l(o));var h=D(u,2);HG(h,{onClose:()=>{l(o)?.focus()},get open(){return l(a)},set open(p){$(a,ie(p))}}),T(t,c),oe(),r()}function JG(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(le,"$_",n),s=w(()=>i()("show_notifications"));Ze(t,{variant:"ghost",iconic:!0,hidden:!0,get"aria-label"(){return l(s)},onclick:()=>{},startIcon:a=>{et(a,{name:"notifications"})},$$slots:{startIcon:!0}}),oe(),r()}var ZG=F('<div role="none" class="wrapper svelte-1wpllk"><!></div>');const XG={hash:"svelte-1wpllk",code:".wrapper.svelte-1wpllk {display:contents;}.wrapper.svelte-1wpllk .sui.select-button-group {gap:4px;}.wrapper.svelte-1wpllk .sui.button {border-radius:var(--sui-button-medium-border-radius) !important;}"};function QG(t,e){se(e,!0),Te(t,XG);const[n,r]=ve(),i=()=>z(le,"$_",n),s=()=>z(Vn,"$selectedCollection",n),o=()=>z(wt,"$siteConfig",n),a=()=>z(ni,"$selectedAssetFolder",n),c=()=>z(Mv,"$selectedPageName",n),u=w(()=>[{key:"collections",label:i()("contents"),icon:"library_books",link:`/collections/${s()?.name??o()?.collections[0].name}`},{key:"assets",label:i()("assets"),icon:"photo_library",link:a()?`/assets/${a().internalPath}`:"/assets"}]);var d=ZG(),f=R(d);const h=w(()=>i()("switch_page"));cp(f,{get"aria-label"(){return l(h)},"aria-controls":"page-container",children:(p,g)=>{var m=W(),v=M(m);ft(v,19,()=>l(u),({key:_,label:b,icon:y,link:x})=>_,(_,b,y)=>{let x=()=>l(b).key,k=()=>l(b).label,S=()=>l(b).icon,C=()=>l(b).link;const E=w(()=>c()===x()),A=w(()=>l(y)+1);Du(_,{variant:"ghost",iconic:!0,get selected(){return l(E)},get"aria-label"(){return k()},get keyShortcuts(){return`Alt+${l(A)??""}`},onSelect:()=>{Un(C())},startIcon:L=>{et(L,{get name(){return S()}})},$$slots:{startIcon:!0}})}),T(p,m)},$$slots:{default:!0}}),T(t,d),oe(),r()}var eK=F("<!> <!>",1);function tK(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(wt,"$siteConfig",n),s=()=>z(Tt,"$prefs",n),o=()=>z(In,"$backend",n),a=()=>z(zs,"$backendName",n),c=()=>z(Hh,"$isLastCommitPublished",n),u=()=>z(le,"$_",n),d=w(()=>i()?.backend.automatic_deployments),f=w(()=>s().deployHookURL),h=w(()=>o()?.triggerDeployment),p=w(()=>a()!=="local"&&typeof l(d)=="boolean"),g=w(()=>(!!l(f)||typeof l(h)=="function")&&!c());let m=ae("info"),v=ae(!1);const _=async()=>{$(m,"info"),$(v,!0);try{const{ok:k,status:S}=l(f)?await fetch(l(f),{method:"POST",mode:"no-cors"}):await l(h)?.()??{};if(!k&&S!==0)throw new Error(`Webhook returned ${S} error`);ot(Hh,!0)}catch(k){$(m,"error"),$(v,!0),console.error(k)}};var b=W(),y=M(b);{var x=k=>{var S=eK(),C=M(S);const E=w(()=>u()("publish_changes")),A=w(()=>!l(g));Ze(C,{variant:"secondary",get label(){return l(E)},get disabled(){return l(A)},onclick:()=>_()});var O=D(C,2);Yn(O,{get show(){return l(v)},set show(L){$(v,ie(L))},children:(L,I)=>{Hn(L,{get status(){return l(m)},children:(N,j)=>{var H=Ue();q(B=>Z(H,B),[()=>u()(l(m)==="error"?"publishing_changes_failed":"publishing_changes")]),T(N,H)},$$slots:{default:!0}})},$$slots:{default:!0}}),T(k,S)};U(y,k=>{l(p)&&k(x)})}T(t,b),oe(),r()}var nK=F('<div role="none" class="wrapper svelte-ns8gcu"><svelte-css-wrapper style="display: contents"><!></svelte-css-wrapper></div>');const rK={hash:"svelte-ns8gcu",code:".wrapper.svelte-ns8gcu {display:contents;--sui-textbox-border-width: 0;}"};function iK(t,e){se(e,!0),Te(t,rK);const[n,r]=ve(),i=()=>z(hc,"$searchTerms",n),s=()=>z(Vn,"$selectedCollection",n),o=()=>z(wt,"$siteConfig",n),a=()=>z(le,"$_",n),c=g=>{const m=!!i(),{path:v}=jd(),_=v.startsWith("/search/");ot(hc,g),g?Un(`/search/${g}`,{replaceState:_}):m&&_&&Ul(`/collections/${s()?.name??o()?.collections[0].name}`)};let u=ae(void 0),d=ae(void 0);Be(()=>{l(d)&&i()!==l(d)?.value&&(l(d).value=i())});var f=nK(),h=R(f);const p=w(()=>a()("search_placeholder"));tp(h,()=>({"--sui-textbox-placeholder-text-align":"center"})),$t(ob(h.lastChild,{keyShortcuts:"Accel+F",showInlineLabel:!0,get"aria-label"(){return l(p)},oninput:({target:g})=>{c(g.value.trim())}}),g=>$(d,ie(g)),()=>l(d)),$t(f,g=>$(u,g),()=>l(u)),T(t,f),oe(),r()}var sK=F('<img loading="lazy" alt="" class="logo svelte-14sy0eb">');const oK={hash:"svelte-14sy0eb",code:"img.svelte-14sy0eb {width:24px;height:24px;object-fit:contain;}"};function aK(t,e){se(e,!0),Te(t,oK);const[n,r]=ve(),i=()=>z(wt,"$siteConfig",n),s=()=>z(le,"$_",n);var o=W(),a=M(o);{var c=u=>{const d=w(()=>s()("visit_live_site"));Ze(u,{variant:"ghost",iconic:!0,get"aria-label"(){return l(d)},onclick:()=>{_A()},children:(f,h)=>{var p=sK();q(()=>ke(p,"src",i().logo_url)),T(f,p)},$$slots:{default:!0}})};U(a,u=>{i()?.logo_url&&u(c)})}T(t,o),oe(),r()}var lK=F('<div role="none" class="buttons"><!> <!></div> <!> <div role="none" class="buttons"><!> <!> <!> <!> <!></div>',1),cK=F('<div role="none" class="toolbar-wrapper svelte-ornzx3"><!></div>');const uK={hash:"svelte-ornzx3",code:".toolbar-wrapper.svelte-ornzx3 {display:contents;}.toolbar-wrapper[inert].svelte-ornzx3 {display:none;}.toolbar-wrapper.svelte-ornzx3 > .toolbar .buttons {flex:auto;display:flex;align-items:center;width:50%;}.toolbar-wrapper.svelte-ornzx3 > .toolbar .buttons:last-child {justify-content:flex-end;}.toolbar-wrapper.svelte-ornzx3 > .toolbar .search-bar {flex:none;width:640px;max-width:50%;}"};function dK(t,e){se(e,!0),Te(t,uK);const[n,r]=ve(),i=()=>z(bA,"$hasOverlay",n),s=()=>z(le,"$_",n);var o=cK(),a=R(o);const c=w(()=>s()("global"));po(a,{variant:"primary",get"aria-label"(){return l(c)},children:(u,d)=>{var f=lK(),h=M(f),p=R(h);aK(p,{});var g=D(p,2);QG(g,{});var m=D(h,2);iK(m,{});var v=D(m,2),_=R(v);tK(_,{});var b=D(_,2);zG(b,{});var y=D(b,2);JG(y,{});var x=D(y,2);YG(x,{});var k=D(x,2);DG(k,{}),T(u,f)},$$slots:{default:!0}}),q(()=>o.inert=i()),T(t,o),oe(),r()}var fK=F("<!> <!> <!>",1);function hK(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(Nn,"$appLocale",n),s=w(()=>e.asset.path),o=w(()=>e.asset.name),a=w(()=>e.asset.folder),c=w(()=>e.asset.kind);fd(t,{onclick:()=>{Un(`/assets/${l(s)}`)},children:(u,d)=>{var f=fK(),h=M(f);di(h,{class:"image",children:(m,v)=>{Ns(m,{get kind(){return l(c)},get asset(){return e.asset},variant:"icon",cover:!0})},$$slots:{default:!0}});var p=D(h,2);di(p,{class:"collection",children:(m,v)=>{var _=Ue();q(b=>Z(_,b),[()=>i()?gy(l(a)):""]),T(m,_)},$$slots:{default:!0}});var g=D(p,2);di(g,{class:"title",children:(m,v)=>{var _=Ue();q(()=>Z(_,l(o))),T(m,_)},$$slots:{default:!0}}),T(u,f)},$$slots:{default:!0}}),oe(),r()}var pK=F("<!> <!> <!>",1);function gK(t,e){se(e,!0);const n=(a,c)=>{let u=()=>c?.().collection,d=()=>c?.().collectionFile;var f=W();const h=w(()=>{const{defaultLocale:v}=(d()??u())._i18n??Ri;return{defaultLocale:v}}),p=w(()=>{const{content:v}=l(r)[l(h).defaultLocale]??Object.values(l(r))[0]??{};return{content:v}});var g=M(f);{var m=v=>{fd(v,{onclick:()=>{Un(`/collections/${u().name}/entries/${d()?.name||l(i)}`)},children:(_,b)=>{var y=pK(),x=M(y);di(x,{class:"image",children:(C,E)=>{var A=W(),O=M(A);{var L=I=>{var N=W(),j=M(N);yr(j,()=>r2(u(),e.entry),null,(H,B)=>{var V=W(),G=M(V);{var K=ee=>{vy(ee,{get src(){return l(B)},variant:"icon",cover:!0})};U(G,ee=>{l(B)&&ee(K)})}T(H,V)}),T(I,N)};U(O,I=>{u()._type==="entry"&&I(L)})}T(C,A)},$$slots:{default:!0}});var k=D(x,2);di(k,{class:"collection",children:(C,E)=>{var A=Ue();q(()=>Z(A,u().label||u().name)),T(C,A)},$$slots:{default:!0}});var S=D(k,2);di(S,{class:"title",children:(C,E)=>{var A=W(),O=M(A);{var L=N=>{var j=Ue();q(()=>Z(j,d().label||d().name)),T(N,j)},I=N=>{var j=W(),H=M(j);br(H,()=>qo(u(),e.entry,{useTemplate:!0,allowMarkdown:!0})),T(N,j)};U(O,N=>{d()?N(L):N(I,!1)})}T(C,A)},$$slots:{default:!0}}),T(_,y)},$$slots:{default:!0}})};U(g,v=>{l(p).content&&v(m)})}T(a,f)},r=w(()=>e.entry.locales),i=w(()=>e.entry.subPath);var s=W(),o=M(s);ft(o,17,()=>co(e.entry),a=>a.name,(a,c)=>{var u=W(),d=M(u);ft(d,17,()=>Zo(l(c),e.entry),f=>f.name,(f,h)=>{n(f,()=>({collection:l(c),collectionFile:l(h)}))},f=>{n(f,()=>({collection:l(c)}))}),T(a,u)}),T(t,s),oe()}var mK=F('<h3 role="none" id="search-results-entries" class="svelte-11iebi8"> </h3> <div role="none" class="svelte-11iebi8"><!></div>',1),vK=F('<h3 role="none" id="search-results-assets" class="svelte-11iebi8"> </h3> <div role="none" class="svelte-11iebi8"><!></div>',1),bK=F('<div role="none" class="wrapper svelte-11iebi8"><header role="none" class="svelte-11iebi8"><h2 role="none" class="svelte-11iebi8"> </h2></header> <div role="none" class="results svelte-11iebi8"><!> <!></div></div>');const _K={hash:"svelte-11iebi8",code:".wrapper.svelte-11iebi8 {display:flex;flex-direction:column;width:100%;}header.svelte-11iebi8 {display:flex;align-items:center;padding:0 16px;height:40px;background-color:var(--sui-tertiary-background-color);}header.svelte-11iebi8 h2:where(.svelte-11iebi8) {font-size:var(--sui-font-size-x-large);}.results.svelte-11iebi8 {flex:auto;display:flex;gap:16px;overflow:hidden;padding:16px;height:100%;}.results.svelte-11iebi8 > .group {flex:auto;display:flex;flex-direction:column;overflow:hidden;width:50%;height:100%;}.results.svelte-11iebi8 h3:where(.svelte-11iebi8) {flex:none;margin:0 0 8px;color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-large);}.results.svelte-11iebi8 h3:where(.svelte-11iebi8) + div:where(.svelte-11iebi8) {overflow:auto;flex:auto;}"};function yK(t,e){se(e,!0),Te(t,_K);const[n,r]=ve(),i=()=>z(le,"$_",n),s=()=>z(hc,"$searchTerms",n),o=()=>z(YA,"$searchResults",n);var a=bK(),c=R(a),u=R(c),d=R(u),f=D(c,2),h=R(f);_r(h,{"aria-labelledby":"search-results-entries",children:(g,m)=>{var v=mK(),_=M(v),b=R(_),y=D(_,2),x=R(y);{var k=C=>{const E=w(()=>i()("entries"));od(C,{viewType:"list",get"aria-label"(){return l(E)},get"aria-rowcount"(){return o().entries.length},children:(A,O)=>{var L=W(),I=M(L);As(I,s,N=>{Ua(N,{get items(){return o().entries},itemKey:"id",renderItem:(H,B=Fe)=>{gK(H,{get entry(){return B()}})},$$slots:{renderItem:!0}})}),T(A,L)},$$slots:{default:!0}})},S=C=>{var E=Ue();q(A=>Z(E,A),[()=>i()("no_entries_found")]),T(C,E)};U(x,C=>{o().entries.length?C(k):C(S,!1)})}q(C=>Z(b,C),[()=>i()("entries")]),T(g,v)},$$slots:{default:!0}});var p=D(h,2);_r(p,{"aria-labelledby":"search-results-assets",children:(g,m)=>{var v=vK(),_=M(v),b=R(_),y=D(_,2),x=R(y);{var k=C=>{const E=w(()=>i()("assets"));od(C,{viewType:"list",get"aria-label"(){return l(E)},get"aria-rowcount"(){return o().assets.length},children:(A,O)=>{var L=W(),I=M(L);As(I,s,N=>{Ua(N,{get items(){return o().assets},itemKey:"path",renderItem:(H,B=Fe)=>{hK(H,{get asset(){return B()}})},$$slots:{renderItem:!0}})}),T(A,L)},$$slots:{default:!0}})},S=C=>{var E=Ue();q(A=>Z(E,A),[()=>i()("no_files_found")]),T(C,E)};U(x,C=>{o().assets.length?C(k):C(S,!1)})}q(C=>Z(b,C),[()=>i()("assets")]),T(g,v)},$$slots:{default:!0}}),q(g=>Z(d,g),[()=>i()("search_results_for_x",{values:{terms:s()}})]),T(t,a),oe(),r()}function wK(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(hc,"$searchTerms",n),s=()=>z(YA,"$searchResults",n),o=()=>z(le,"$_",n),a=/^\/search\/(?<terms>.+)$/,c=()=>{const{path:d}=jd(),{terms:f}=d.match(a)?.groups??{};f&&f!==i()&&ot(hc,f);const{entries:h,assets:p}=s(),g=h.length,m=p.length;ot(bs,o()("viewing_search_results",{values:{terms:i(),entries:g>1?o()("many_entries",{values:{count:g}}):g===1?o()("one_entry"):o()("no_entries"),assets:m>1?o()("many_assets",{values:{count:m}}):m===1?o()("one_asset"):o()("no_assets")}}))};cn(()=>{c()}),wi("hashchange",ql,()=>{c()});const u=w(()=>o()("search_results_for_x",{values:{terms:i()}}));Bd(t,{class:"content",get"aria-label"(){return l(u)},main:f=>{yK(f,{})},$$slots:{main:!0}}),oe(),r()}var xK=F('<header role="none" class="svelte-1lr8kgc"><h3 role="none" id="draft-column-title" class="svelte-1lr8kgc"> </h3></header>'),kK=F('<header role="none" class="svelte-1lr8kgc"><h3 role="none" id="review-column-title" class="svelte-1lr8kgc"> </h3></header>'),SK=F('<header role="none" class="svelte-1lr8kgc"><h3 role="none" id="ready-column-title" class="svelte-1lr8kgc"> </h3></header>'),EK=F('<div role="none" class="columns svelte-1lr8kgc"><!> <!> <!></div>');const TK={hash:"svelte-1lr8kgc",code:".columns.svelte-1lr8kgc {flex:auto;display:flex;gap:4px;background-color:var(--sui-secondary-background-color);}.columns.svelte-1lr8kgc .column {flex:auto;width:33.3333333333%;background-color:var(--sui-primary-background-color);}.columns.svelte-1lr8kgc header:where(.svelte-1lr8kgc) {display:flex;align-items:center;padding:0 16px;height:40px;background-color:var(--sui-tertiary-background-color);}.columns.svelte-1lr8kgc header:where(.svelte-1lr8kgc) h3:where(.svelte-1lr8kgc) {font-size:var(--sui-font-size-x-large);}"};function CK(t,e){se(e,!0),Te(t,TK);const[n,r]=ve(),i=()=>z(le,"$_",n),s=w(()=>i()("editorial_workflow"));Bd(t,{class:"content",get"aria-label"(){return l(s)},main:a=>{var c=EK(),u=R(c);_r(u,{class:"column","aria-labelledby":"draft-column-title",children:(h,p)=>{var g=xK(),m=R(g),v=R(m);q(_=>Z(v,_),[()=>i()("status.drafts")]),T(h,g)},$$slots:{default:!0}});var d=D(u,2);_r(d,{class:"column","aria-labelledby":"review-column-title",children:(h,p)=>{var g=kK(),m=R(g),v=R(m);q(_=>Z(v,_),[()=>i()("status.in_review")]),T(h,g)},$$slots:{default:!0}});var f=D(d,2);_r(f,{class:"column","aria-labelledby":"ready-column-title",children:(h,p)=>{var g=SK(),m=R(g),v=R(m);q(_=>Z(v,_),[()=>i()("status.ready")]),T(h,g)},$$slots:{default:!0}}),T(a,c)},$$slots:{main:!0}}),oe(),r()}var AK=F("<!> <!> <!> <!> <!> <!>",1);function PK(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(Mv,"$selectedPageName",n),s=()=>z(Vn,"$selectedCollection",n),o=()=>z(wt,"$siteConfig",n),a={collections:uG,assets:h6,search:wK,workflow:CK,config:_6},c=w(()=>a[i()]),u=()=>{ot(tl,!1),ot(Xo,!1);const{path:b}=jd(),{pageName:y}=b.match(`^\\/(?<pageName>${Object.keys(a).join("|")})\\b`)?.groups??{};y?i()!==y&&ot(Mv,y):window.location.replace(`#/collections/${s()?.name??o()?.collections[0].name}`)};cn(()=>{u()});var d=AK();wi("hashchange",ql,()=>{u()});var f=M(d);dK(f,{});var h=D(f,2);Ci(h,()=>l(c),(b,y)=>{y(b,{})});var p=D(h,2);m6(p,{});var g=D(p,2);g6(g,{});var m=D(g,2);dG(m,{});var v=D(m,2);fG(v,{}),T(t,d);var _=oe({pages:a,selectPage:u});return r(),_}const OK={collections:"Collections",contents:"Contents",entries:"Entries",assets:"Assets",media:"Media",workflow:"Workflow",editorial_workflow:"Editorial Workflow",user_name:"User Name",password:"Password",sign_in:"Sign In",signed_in_as_x:"Signed In as {name}",working_with_local_repo:"Working with Local Repository",sign_out:"Sign Out",create:"New",select:"Select",select_all:"Select All",upload:"Upload",copy:"Copy",download:"Download",duplicate:"Duplicate",delete:"Delete",save:"Save",saving:"Saving…",rename:"Rename",update:"Update",replace:"Replace",add:"Add",remove:"Remove",remove_x:"Remove {name}",clear:"Clear",expand:"Expand",expand_all:"Expand All",collapse:"Collapse",collapse_all:"Collapse All",insert:"Insert",restore:"Restore",discard:"Discard",searching:"Searching…",global:"Global",primary:"Primary",secondary:"Secondary",collection:"Collection",folder:"Folder",api_key:"API Key",details:"Details",clipboard_error:"There was an error while copying data.",welcome_to_sveltia_cms:"Welcome to Sveltia CMS",loading_site_config:"Loading Site Configuration…",loading_site_data:"Loading Site Data…",loading_site_data_error:"There was an error while loading site data.",sign_in_with_x:"Sign In with {service}",authorizing:"Authorizing…",signing_in:"Signing in…",work_with_local_repo:"Work with Local Repository",work_with_local_repo_description:"Click the button to select the root directory of the “{repo}” repository.",work_with_local_repo_description_no_repo:"Click the button to select the root directory of your Git repository.",sign_in_error:{not_project_root:"The folder you have selected is not a repository root directory. Please try again.",picker_dismissed:"A repository root directory could not be selected. Please try again.",authentication_aborted:"Authentication aborted. Please try again.",UNSUPPORTED_BACKEND:"Your Git backend is not supported by the authenticator.",UNSUPPORTED_DOMAIN:"Your domain is not allowed to use the authenticator.",MISCONFIGURED_CLIENT:"OAuth app client ID or secret is not configured.",AUTH_CODE_REQUEST_FAILED:"Failed to receive an authorization code. Please try again later.",CSRF_DETECTED:"Potential CSRF attack detected. Authentication flow aborted.",TOKEN_REQUEST_FAILED:"Failed to request an access token. Please try again later.",MALFORMED_RESPONSE:"Server responded with malformed data. Please try again later."},repository_no_access:"You don’t have access to the “{repo}” repository.",repository_not_found:"The “{repo}” repository doesn’t exist.",repository_empty:"The “{repo}” repository has no branches.",branch_not_found:"The “{repo}” repository doesn’t have the “{branch}” branch.",unexpected_error:"Unexpected Error",entry_parse_error:"There was an error while parsing an entry file. Check the browser console for details.",entry_parse_errors:"There were errors while parsing entry files. Check the browser console for details.",visit_live_site:"Visit Live Site",switch_page:"Switch Page",search_placeholder:"Search for entries and assets…",create_entry_or_assets:"Create Entry or Assets",publish_changes:"Publish Changes",publishing_changes:"Publishing Changes…",publishing_changes_failed:"Changes could not be published. Please try again later.",show_notifications:"Show Notifications",notifications:"Notifications",show_account_menu:"Show Account Menu",account:"Account",live_site:"Live Site",git_repository:"Git Repository",settings:"Settings",site_config:"Site Configuration",show_help_menu:"Show Help Menu",help:"Help",keyboard_shortcuts:"Keyboard Shortcuts",documentation:"Documentation",release_notes:"Release Notes",version_x:"Version {version}",report_issue:"Report Issue",share_feedback:"Share Feedback",get_help:"Get Help",join_discord:"Join Us on Discord",update_available:"The latest version of Sveltia CMS is available.",update_now:"Update Now",backend_status:{minor_incident:"{service} is experiencing a minor incident. Your workflow may be potentially affected.",major_incident:"{service} is experiencing a major incident. You may want to wait until the situation has improved."},content_library:"Content Library",asset_library:"Asset Library",collection_assets:"Collection Assets",entry_assets:"Entry Assets",entry_list:"Entry List",file_list:"File List",asset_list:"Asset List",x_collection:"“{collection}” Collection",x_asset_folder:"“{folder}” Asset Folder",viewing_x_collection_many_entries:"You’re now viewing the “{collection}” collection, which has {count} entries.",viewing_x_collection_one_entry:"You’re now viewing the “{collection}” collection, which has one entry.",viewing_x_collection_no_entries:"You’re now viewing the “{collection}” collection, which has no entries yet.",viewing_x_asset_folder_many_assets:"You’re now viewing the “{folder}” asset folder, which has {count} assets.",viewing_x_asset_folder_one_asset:"You’re now viewing the “{folder}” asset folder, which has one asset.",viewing_x_asset_folder_no_assets:"You’re now viewing the “{folder}” asset folder, which has no assets yet.",collection_not_found:"Collection not found",file_not_found:"File not found.",x_of_x_selected:"{selected} of {total} selected",switch_view:"Switch View",list_view:"List View",grid_view:"Grid View",sort:"Sort",sorting_options:"Sorting Options",sort_keys:{none:"None",name:"Name",commit_author:"Updated by",commit_date:"Updated on"},ascending:"{label}, A to Z",ascending_date:"{label}, old to new",descending:"{label}, Z to A",descending_date:"{label}, new to old",filter:"Filter",filtering_options:"Filtering Options",group:"Group",grouping_options:"Grouping Options",type:"Type",all:"All",image:"Image",video:"Video",audio:"Audio",document:"Document",other:"Other",show_assets:"Show Assets",hide_assets:"Hide Assets",show_info:"Show Info",hide_info:"Hide Info",asset_folders:"Asset Folders",all_assets:"All Assets",uncategorized:"Uncategorized",creating_entries_disabled_by_admin:"Creating new entries in this collection is disabled by the administrator.",creating_entries_disabled_by_limit:"You cannot add new entries to this collection because it has reached its limit of {limit} entries.",back_to_collection:"Back to Collection",search_results_for_x:"Search Results for “{terms}”",viewing_search_results:"You’re now viewing search results for “{terms}”. We’ve found {entries} and {assets}.",many_entries:"{count} entries",one_entry:"one entry",no_entries:"no entries",many_assets:"{count} assets",one_asset:"one asset",no_assets:"no assets",no_files_found:"No files found.",no_entries_found:"No entries found.",upload_assets:"Upload New Assets",edit_options:"Edit Options",show_edit_options:"Show Edit Options",edit_asset:"Edit Asset",edit_x:"Edit {name}",wrap_long_lines:"Wrap Long Lines",rename_asset:"Rename Asset",rename_x:"Rename {name}",enter_new_name_for_asset:"Enter a new name below.",enter_new_name_for_asset_with_one_entry:"Enter a new name below. An entry using the asset will also be updated.",enter_new_name_for_asset_with_many_entries:"Enter a new name below. {count} entries using the asset will also be updated.",enter_new_name_for_asset_error:{empty:"File name cannot be empty.",character:"File name cannot contain special characters.",duplicate:"This file name is used for another asset."},replace_asset:"Replace Asset",replace_x:"Replace {name}",browse_file:"Click to browse",drop_or_browse_file:"Drop a file here or click to browse",drop_or_browse_files:"Drop files here or click to browse",drop_or_browse_image_file:"Drop an image file here or click to browse",drop_or_browse_image_files:"Drop image files here or click to browse",drop_file_here:"Drop a file here",drop_files_here:"Drop files here",drop_files_type_mismatch:"The dropped file is not the “{type}” type. Please try again.",choose_file:"Choose File",choose_files:"Choose Files",delete_asset:"Delete Asset",delete_assets:"Delete Assets",delete_selected_asset:"Delete Selected Asset",delete_selected_assets:"Delete Selected Assets",confirm_deleting_this_asset:"Are you sure to delete this asset?",confirm_deleting_selected_asset:"Are you sure to delete the selected asset?",confirm_deleting_selected_assets:"Are you sure to delete the selected {count} assets?",confirm_deleting_all_assets:"Are you sure to delete all the assets?",delete_entry:"Delete Entry",delete_entries:"Delete Entries",delete_selected_entry:"Delete Selected Entry",delete_selected_entries:"Delete Selected Entries",confirm_deleting_this_entry:"Are you sure to delete this entry?",confirm_deleting_this_entry_with_assets:"Are you sure to delete this entry and associated assets?",confirm_deleting_selected_entry:"Are you sure to delete the selected entry?",confirm_deleting_selected_entry_with_assets:"Are you sure to delete the selected entry and associated assets?",confirm_deleting_selected_entries:"Are you sure to delete the selected {count} entries?",confirm_deleting_selected_entries_with_assets:"Are you sure to delete the selected {count} entries and associated assets?",confirm_deleting_all_entries:"Are you sure to delete all the entries?",confirm_deleting_all_entries_with_assets:"Are you sure to delete all the entries and associated assets?",confirm_replacing_file:"Are you sure to replace “{name}” with the following file?",confirm_uploading_file:"Are you sure to save the following file to the “{folder}” folder?",confirm_uploading_files:"Are you sure to save the following {count} files to the “{folder}” folder?",no_entries_created:"This collection has no entries yet.",create_new_entry:"Create New Entry",no_files_in_collection:"No files available in this collection.",asset_info:"Asset Info",select_asset_show_info:"Select an asset to show the info.",duplicate_entry:"Duplicate Entry",entry_duplicated:"Entry has been duplicated. It’s now a new draft.",entry_validation_error:"One field has an error. Please correct it to save the entry.",entry_validation_errors:"{count} fields have an error. Please correct them to save the entry.",entry_saved:"Entry has been saved.",entry_saved_and_published:"Entry has been saved and published.",entry_deleted:"Entry has been deleted.",entries_deleted:"{count} entries have been deleted.",asset_saved:"Asset has been saved.",asset_saved_and_published:"Asset has been saved and published.",assets_saved:"{count} assets have been saved.",assets_saved_and_published:"{count} assets have been saved and published.",asset_url_copied:"Asset URL has been copied to clipboard.",asset_urls_copied:"Asset URLs have been copied to clipboard.",asset_path_copied:"Asset file path has been copied to clipboard.",asset_paths_copied:"Asset file paths have been copied to clipboard.",asset_data_copied:"Asset file has been copied to clipboard.",asset_downloaded:"Asset file has been downloaded.",assets_downloaded:"Asset files have been downloaded.",asset_moved:"Asset has been moved.",assets_moved:"{count} assets have been moved.",asset_renamed:"Asset has been renamed.",assets_renamed:"{count} assets have been renamed.",asset_deleted:"Asset has been deleted.",assets_deleted:"{count} assets have been deleted.",content_editor:"Content Editor",restore_backup_title:"Restore Draft",restore_backup_description:"This entry has a backup from {datetime}. Do you want to restore the edited draft?",draft_backup_saved:"Draft backup has been saved.",draft_backup_restored:"Draft backup has been restored.",draft_backup_deleted:"Draft backup has been deleted.",cancel_editing:"Cancel Editing",creating_x:"Creating {name}",creating_x_collection_entry:"You’re now creating a new entry in the “{collection}” collection.",editing_x_in_x:"Editing {collection} › {entry}",editing_x_collection_entry:"You’re now editing the “{entry}” entry in the “{collection}” collection.",editing_x_collection_file:"You’re now editing the “{file}” file in the “{collection}” collection.",save_and_publish:"Save and Publish",save_without_publishing:"Save without Publishing",show_editor_options:"Show Editor Options",editor_options:"Editor Options",show_preview:"Show Preview",sync_scrolling:"Sync Scrolling",switch_locale:"Switch Locale",locale_content_disabled_short:"(disabled)",locale_content_error_short:"(error)",edit:"Edit",preview:"Preview",edit_x_locale:"Edit {locale} Content",preview_x_locale:"Preview {locale} Content",content_preview:"Content Preview",show_content_options_x_locale:"Show {locale} Content Options",content_options_x_locale:"{locale} Content Options",x_field:"“{field}” Field",show_field_options:"Show Field Options",field_options:"Field Options",unsupported_widget_x:"Unsupported widget: {name}",enable_x_locale:"Enable {locale}",reenable_x_locale:"Reenable {locale}",disable_x_locale:"Disable {locale}",locale_x_has_been_disabled:"The {locale} content has been disabled.",locale_x_now_disabled:"The {locale} content is now disabled. It will be deleted when you save the entry.",view_in_repository:"View in Repository",view_on_x:"View on {service}",view_on_live_site:"View on Live Site",copy_from:"Copy from…",copy_from_x:"Copy from {locale}",translation_options:"Translation Options",translate:"Translate",translate_field:"Translate Field",translate_fields:"Translate Fields",translate_from:"Translate from…",translate_from_x:"Translate from {locale}",revert_changes:"Revert Changes",revert_all_changes:"Revert All Changes",edit_slug:"Edit Slug",edit_slug_warning:"Changing the slug may break internal and external links to the entry. Currently, Sveltia CMS does not update references created with the Relation widget, so you’ll need to manually update such references along with other links.",edit_slug_error:{empty:"The slug cannot be empty.",duplicate:"This slug is used for another entry."},required:"Required",editor:{translation:{none:"Nothing has been translated.",started:"Translating…",error:"There was an error while translating.",complete:{one:"Translated the field from {source}.",many:"Translated {count} fields from {source}."}},copy:{none:"Nothing has been copied.",complete:{one:"Copied the field from {source}.",many:"Copied {count} fields from {source}."}}},validation:{value_missing:"This field is required.",range_underflow:{number:"Value must be greater than or equal to {min}.",select_many:"You have to select at least {min} items.",select_one:"You have to select at least {min} item.",add_many:"You have to add at least {min} items.",add_one:"You have to add at least {min} item."},range_overflow:{number:"Value must be less than or equal to {max}.",select_many:"You cannot select more than {max} items.",select_one:"You cannot select more than {max} item.",add_many:"You cannot add more than {max} items.",add_one:"You cannot add more than {max} item."},too_short:{one:"You must enter at least {min} character.",many:"You must enter at least {min} characters."},too_long:{one:"You cannot enter more than {max} character.",many:"You cannot enter more than {max} characters."},type_mismatch:{number:"Please enter a number.",email:"Please enter a valid email.",url:"Please enter a valid URL."}},saving_entry:{error:{title:"Error",description:"There was an error while saving the entry. Please try again later."}},viewing_x_asset_details:"You’re viewing the details of the “{name}” asset.",asset_editor:"Asset Editor",preview_unavailable:"Preview Unavailable.",public_url:"Public URL",public_urls:"Public URLs",file_path:"File Path",file_paths:"File Paths",file_data:"File Data",kind:"Kind",size:"Size",dimensions:"Dimensions",duration:"Duration",used_in:"Used in",select_file:"Select File",select_image:"Select Image",replace_file:"Replace File",replace_image:"Replace Image",remove_file:"Remove File",remove_image:"Remove Image",remove_this_item:"Remove This Item",move_up:"Move Up",move_down:"Move Down",add_x:"Add {name}",select_list_type:"Select List Type",opacity:"Opacity",unselected_option:"(None)",assets_dialog:{title:{file:"Select File",image:"Select Image"},search_for_file:"Search for Files",search_for_image:"Search for Images",locations:"Locations",location:{local:"Your Computer",repository:"This Repository",external_locations:"External Locations",stock_photos:"Stock Photos"},error:{invalid_key:"Your API Key is invalid or expired. Please double check and try again.",search_fetch_failed:"There was an error while searching assets. Please try again later.",image_fetch_failed:"There was an error while downloading the selected asset. Please try again later."},available_images:"Available Images",enter_url:"Enter URL",enter_file_url:"Enter URL of the file:",enter_image_url:"Enter URL of the image:",large_file:{title:"Large File",description:"This file exceeds the maximum size of {size}. Please choose another."},photo_credit:{title:"Photo Credit",description:"Use the following credit if possible:"}},character_counter:{min_max:{one:"{count} character entered. Minimum: {min}. Maximum: {max}.",many:"{count} characters entered. Minimum: {min}. Maximum: {max}."},min:{one:"{count} character entered. Minimum: {min}.",many:"{count} characters entered. Minimum: {min}."},max:{one:"{count} character entered. Maximum: {max}.",many:"{count} characters entered. Maximum: {max}."}},youtube_video_player:"YouTube video player",today:"Today",now:"Now",editor_components:{image:"Image",src:"Source",alt:"Alt Text",title:"Title",link:"Link"},key_value:{key:"Key",value:"Value",action:"Action",empty_key:"Key is required.",duplicate_key:"Key must be unique."},boolean:{true:"Yes",false:"No"},cloud_storage:{invalid:"The service is not configured properly.",auth:{initial:"Sign into {service} to insert media on the storage to entry fields.",requested:"Signing in…",error:"User name or password is incorrect. Please double check and try again."}},config:{error:{no_secure_context:"Sveltia CMS only works with HTTPS or localhost URLs.",fetch_failed:"The configuration file could not be retrieved.",fetch_failed_not_ok:"HTTP response returned with status {status}.",parse_failed:"The configuration file could not be parsed.",parse_failed_invalid_object:"The configuration file is not a valid JavaScript object.",no_collection:"Collections are not defined in the configuration file.",no_backend:"The backend is not defined in the configuration file.",unsupported_backend:"The configured “{name}” backend is not supported.",no_repository:"The repository is not defined in the configuration file.",oauth_implicit_flow:"The configured authentication method (implicit flow) is not supported.",oauth_no_app_id:"OAuth application ID is not defined in the configuration file.",no_media_folder:"The media folder is not defined in the configuration file.",unexpected:"There was an unexpected error while validating the configuration file.",try_again:"Please solve the issue and try again."}},local_backend:{unsupported_browser:"Local development is not supported in your browser. Please use Chrome or Edge instead.",disabled:"Local development is disabled in your browser. <a>Here’s how to enable it</a>."},status:{drafts:"Drafts",in_review:"In Review",ready:"Ready"},categories:"Categories",prefs:{changes:{api_key_saved:"API key has been saved.",api_key_removed:"API key has been removed."},error:{permission_denied:"Browser storage (Cookie) access has been denied. Please check the permission and try again."},appearance:{title:"Appearance",theme:"Theme",select_theme:"Select Theme"},theme:{auto:"Auto",dark:"Dark",light:"Light"},languages:{title:"Languages",ui_language:{title:"User Interface Language",select_language:"Select Language"},translator:{title:"{service} Translator",field_label:"{service} API Authentication Key",description:"Sign up for <a {homeHref}>{service} API</a> and enter <a {apiKeyHref}>your Authentication Key</a> here to enable quick translation of text entry fields."}},contents:{title:"Contents",editor:{title:"Editor",close_on_save:{switch_label:"Close the editor after saving a draft"}}},media:{title:"Media",stock_photos:{title:"{service} Free Images",field_label:"{service} API Key",description:"Sign up for <a {homeHref}>{service} API</a> and enter <a {apiKeyHref}>your API Key</a> here to insert free stock photos to image entry fields.",credit:"Photos provided by {service}"}},accessibility:{title:"Accessibility",underline_links:{title:"Underline Links",description:"Show underline for links in the entry preview and user interface labels.",switch_label:"Always Underline Links"}},advanced:{title:"Advanced",deploy_hook:{title:"Deploy Hook",description:"Enter a webhook URL to be called when you manually trigger a deployment by selecting Publish Changes. This can be left blank if you’re using GitHub Actions.",field_label:"Deploy Hook URL",url_saved:"Webhook URL has been saved.",url_removed:"Webhook URL has been removed."},developer_mode:{title:"Developer Mode",description:"Enable some features, including detailed console logs and native context menus.",switch_label:"Enable Developer Mode"}}},keyboard_shortcuts_:{view_content_library:"View Content Library",view_asset_library:"View Asset Library",search:"Search for entries and assets",create_entry:"Create a new entry",save_entry:"Save an entry",cancel_editing:"Cancel entry editing"},file_type_labels:{avif:"AVIF image",bmp:"Bitmap image",gif:"GIF image",ico:"Icon",jpeg:"JPEG image",jpg:"JPEG image",png:"PNG image",svg:"SVG image",tif:"TIFF image",tiff:"TIFF image",webp:"WebP image",avi:"AVI video",mp4:"MP4 video",mpeg:"MPEG video",ogv:"OGG video",ts:"MPEG video",webm:"WebM video","3gp":"3GPP video","3g2":"3GPP2 video",aac:"AAC audio",mid:"MIDI",midi:"MIDI",mp3:"MP3 audio",opus:"OPUS audio",wav:"WAV audio",weba:"WebM audio",csv:"CSV spreadsheet",doc:"Word document",docx:"Word document",odp:"OpenDocument presentation",ods:"OpenDocument spreadsheet",odt:"OpenDocument text",pdf:"PDF document",ppt:"PowerPoint presentation",pptx:"PowerPoint presentation",rtf:"Rich text document",xls:"Excel spreadsheet",xlsx:"Excel spreadsheet",html:"HTML text",js:"JavaScript",json:"JSON text",md:"Markdown text",toml:"TOML text",yaml:"YAML text",yml:"YAML text"},file_size_units:{b:"{size} bytes",kb:"{size} KB",mb:"{size} MB",gb:"{size} GB",tb:"{size} TB"}},$K=Object.freeze(Object.defineProperty({__proto__:null,strings:OK},Symbol.toStringTag,{value:"Module"})),LK={collections:"コレクション",contents:"コンテンツ",entries:"エントリー",assets:"アセット",media:"メディア",workflow:"ワークフロー",editorial_workflow:"編集ワークフロー",user_name:"ユーザー名",password:"パスワード",sign_in:"ログイン",signed_in_as_x:"{name} としてログイン中",working_with_local_repo:"ローカルレポジトリで作業中",sign_out:"ログアウト",create:"新規作成",select:"選択",select_all:"すべて選択",upload:"アップロード",copy:"コピー",download:"ダウンロード",duplicate:"複製",delete:"削除",save:"保存",saving:"保存中…",rename:"名前を変更",update:"更新",replace:"差し替え",add:"追加",remove:"削除",remove_x:"{name} を削除",clear:"クリア",expand:"広げる",expand_all:"すべて広げる",collapse:"折り畳む",collapse_all:"すべて折り畳む",insert:"挿入",restore:"復元",discard:"破棄",searching:"検索中…",global:"グローバル",primary:"プライマリー",secondary:"セカンダリー",collection:"コレクション",folder:"フォルダー",api_key:"API キー",details:"詳細",clipboard_error:"データのコピー中に問題が発生しました。",welcome_to_sveltia_cms:"Sveltia CMS へようこそ",loading_site_config:"サイト設定を読み込んでいます…",loading_site_data:"サイトデータを読み込んでいます…",loading_site_data_error:"サイトデータの読み込み中にエラーが発生しました。",sign_in_with_x:"{service} でログイン",authorizing:"認証中…",signing_in:"ログイン中…",work_with_local_repo:"ローカルレポジトリで作業",work_with_local_repo_description:"ボタンをクリックして「{repo}」レポジトリのルートディレクトリを選択してください。",work_with_local_repo_description_no_repo:"ボタンをクリックして Git レポジトリのルートディレクトリを選択してください。",sign_in_error:{not_project_root:"選択されたフォルダーはレポジトリのルートディレクトリではありません。再度お試しください。",picker_dismissed:"レポジトリのルートディレクトリを選択できませんでした。再度お試しください。",authentication_aborted:"認証が中断されました。再度お試しください。",UNSUPPORTED_BACKEND:"この認証アプリはお使いの Git バックエンドに対応していません。",UNSUPPORTED_DOMAIN:"この認証アプリではお使いのドメインの使用は許可されていません。",MISCONFIGURED_CLIENT:"OAuth アプリのクライアント ID またはシークレットが設定されていません。",AUTH_CODE_REQUEST_FAILED:"認証コードを取得できませんでした。後で再度お試しください。",CSRF_DETECTED:"CSRF 攻撃の可能性が検出されたため、認証フローは中断されました。",TOKEN_REQUEST_FAILED:"アクセストークンを要求できませんでした。後で再度お試しください。",MALFORMED_RESPONSE:"サーバーから不正なデータが返されました。後で再度お試しください。"},repository_no_access:"あなたには「{repo}」レポジトリへのアクセス権がありません。",repository_not_found:"「{repo}」レポジトリは存在しません。",repository_empty:"「{repo}」レポジトリにはブランチがありません。",branch_not_found:"「{repo}」レポジトリに「{branch}」ブランチは存在しません。",unexpected_error:"予期せぬエラー",entry_parse_error:"エントリーファイルの読み込み中にエラーが発生しました。詳しくはブラウザーのコンソールを確認してください。",entry_parse_errors:"エントリーファイルの読み込み中にエラーが発生しました。詳しくはブラウザーのコンソールを確認してください。",visit_live_site:"管理対象サイトを開く",switch_page:"ページを切り替え",search_placeholder:"エントリーとアセットを検索…",create_entry_or_assets:"エントリーまたはアセットを作成",publish_changes:"変更を公開",publishing_changes:"変更を公開しています…",publishing_changes_failed:"変更を公開できませんでした。後で再度お試しください。",show_notifications:"通知を表示",notifications:"通知",show_account_menu:"アカウントメニューを表示",account:"アカウント",live_site:"管理対象サイト",git_repository:"Git レポジトリ",settings:"設定",site_config:"サイト設定",show_help_menu:"ヘルプメニューを表示",help:"ヘルプ",keyboard_shortcuts:"キーボードショートカット",documentation:"ドキュメンテーション",release_notes:"リリースノート",version_x:"バージョン {version}",report_issue:"問題を報告",share_feedback:"フィードバックを共有",get_help:"サポート",join_discord:"Discord チャンネルに参加",update_available:"Sveltia CMS の最新版が利用可能です。",update_now:"今すぐ更新",backend_status:{minor_incident:"{service} で軽微な障害が発生しています。ワークフローに潜在的な影響が及ぶ可能性があります。",major_incident:"{service} で重大な障害が発生しています。状況が改善されるまで待った方が良いかもしれません。"},content_library:"コンテンツライブラリ",asset_library:"アセットライブラリ",collection_assets:"コレクションアセット",entry_assets:"エントリーアセット",entry_list:"エントリーリスト",file_list:"ファイルリスト",asset_list:"アセットリスト",x_collection:"「{collection}」コレクション",x_asset_folder:"「{folder}」アセットフォルダー",viewing_x_collection_many_entries:"「{collection}」コレクションを表示しています。ここには {count} 個のエントリーがあります。",viewing_x_collection_one_entry:"「{collection}」コレクションを表示しています。ここにはひとつのエントリーがあります。",viewing_x_collection_no_entries:"「{collection}」コレクションを表示しています。ここにはまだエントリーがありません。",viewing_x_asset_folder_many_assets:"「{folder}」アセットフォルダーを表示しています。ここには {count} 個のアセットがあります。",viewing_x_asset_folder_one_asset:"「{folder}」アセットフォルダーを表示しています。ここにはひとつのアセットがあります。",viewing_x_asset_folder_no_assets:"「{folder}」アセットフォルダーを表示しています。ここにはまだアセットがありません。",collection_not_found:"コレクションが見つかりませんでした",file_not_found:"ファイルが見つかりませんでした",x_of_x_selected:"{total} 個のうち {selected} 個を選択中",switch_view:"ビューを切り替え",list_view:"リストビュー",grid_view:"グリッドビュー",sort:"並び替え",sorting_options:"並べ替えオプション",sort_keys:{none:"なし",name:"名前",commit_author:"更新者",commit_date:"更新日時"},ascending:"{label} (A–Z)",ascending_date:"{label} (古い順)",descending:"{label} (Z–A)",descending_date:"{label} (新しい順)",filter:"絞り込み",filtering_options:"絞り込みオプション",group:"グループ化",grouping_options:"グループ化オプション",type:"種類",all:"すべて",image:"画像",video:"動画",audio:"音声",document:"書類",other:"その他",show_assets:"アセットを表示",hide_assets:"アセットを隠す",show_info:"情報を表示",hide_info:"情報を隠す",asset_folders:"アセットフォルダー",all_assets:"すべてのアセット",uncategorized:"未分類",creating_entries_disabled_by_admin:"このコレクションへの新しいエントリーの作成は、管理者によって無効化されています。",creating_entries_disabled_by_limit:"このコレクションは最大の {limit} エントリーに達したため、新しいエントリーを作成することはできません。",back_to_collection:"コレクションへ戻る",search_results_for_x:"「{terms}」の検索結果",viewing_search_results:"「{terms}」の検索結果を表示しています。{entries} と {assets} が見つかりました。",many_entries:"{count} 個のエントリー",one_entry:"1 個のエントリー",no_entries:"0 個のエントリー",many_assets:"{count} 個のアセット",one_asset:"1 個のアセット",no_assets:"0 個のアセット",no_files_found:"ファイルは見つかりませんでした。",no_entries_found:"エントリーは見つかりませんでした。",upload_assets:"新しいアセットをアップロード",edit_options:"編集オプション",show_edit_options:"編集オプションを表示",edit_asset:"アセットを編集",edit_x:"{name} を編集",wrap_long_lines:"長い行を折り返す",rename_asset:"アセットの名前を変更",rename_x:"{name} の名前を変更",enter_new_name_for_asset:"新しい名前を以下に入力してください。",enter_new_name_for_asset_with_one_entry:"新しい名前を以下に入力してください。このアセットを使用している 1 個のエントリーも更新されます。",enter_new_name_for_asset_with_many_entries:"新しい名前を以下に入力してください。このアセットを使用している {count} 個のエントリーも更新されます。",enter_new_name_for_asset_error:{empty:"ファイル名を空白にすることはできません。",character:"ファイル名に特別な文字を含めることはできません。",duplicate:"このファイル名は他のアセットに使われています。"},replace_asset:"アセットを差し替え",replace_x:"{name} を差し替え",browse_file:"クリックして参照",drop_or_browse_file:"ここにファイルをドロップするかクリックして参照",drop_or_browse_files:"ここにファイルをドロップするかクリックして参照",drop_or_browse_image_file:"ここに画像ファイルをドロップするかクリックして参照",drop_or_browse_image_files:"ここに画像ファイルをドロップするかクリックして参照",drop_file_here:"ここにファイルをドロップ",drop_files_here:"ここにファイルをドロップ",drop_files_type_mismatch:"ドロップされたファイルは「{type}」形式ではありません。再度お試しください。",choose_file:"ファイルを選択",choose_files:"ファイルを選択",delete_asset:"アセットを削除",delete_assets:"アセットを削除",delete_selected_asset:"選択されたアセットを削除",delete_selected_assets:"選択されたアセットを削除",confirm_deleting_this_asset:"このアセットを削除してもよろしいですか?",confirm_deleting_selected_asset:"選択されたファイルを削除してもよろしいですか?",confirm_deleting_selected_assets:"選択された {count} 個のファイルを削除してもよろしいですか?",confirm_deleting_all_assets:"すべてのアセットを削除してもよろしいですか?",delete_entry:"エントリーを削除",delete_entries:"エントリーを削除",delete_selected_entry:"選択されたエントリーを削除",delete_selected_entries:"選択されたエントリーを削除",confirm_deleting_this_entry:"このエントリーを削除してもよろしいですか?",confirm_deleting_this_entry_with_assets:"このエントリーと関連アセットを削除してもよろしいですか?",confirm_deleting_selected_entry:"選択されたエントリーを削除してもよろしいですか?",confirm_deleting_selected_entry_with_assets:"選択されたエントリーと関連アセットを削除してもよろしいですか?",confirm_deleting_selected_entries:"選択された {count} 個のエントリーを削除してもよろしいですか?",confirm_deleting_selected_entries_with_assets:"選択された {count} 個のエントリーと関連アセットを削除してもよろしいですか?",confirm_deleting_all_entries:"すべてのエントリーを削除してもよろしいですか?",confirm_deleting_all_entries_with_assets:"すべてのエントリーと関連アセットを削除してもよろしいですか?",confirm_replacing_file:"「{name}」を以下のファイルと差し替えてもよろしいですか?",confirm_uploading_file:"以下のファイルを「{folder}」フォルダーに保存してもよろしいですか?",confirm_uploading_files:"以下の {count} 個のファイルを「{folder}」フォルダーに保存してもよろしいですか?",no_entries_created:"このコレクションにはまだエントリーがありません。",create_new_entry:"新しいエントリーを作成",no_files_in_collection:"このコレクションにはファイルがありません。",asset_info:"アセット情報",select_asset_show_info:"アセットを選択すると情報が表示されます。",duplicate_entry:"エントリーを複製",entry_duplicated:"エントリーが複製され、新しい下書きとなりました。",entry_validation_error:"ひとつのフィールドにエラーがあります。エントリーを保存するには問題を修正してください。",entry_validation_errors:"{count} 個のフィールドにエラーがあります。エントリーを保存するには問題を修正してください。",entry_saved:"エントリーが保存されました。",entry_saved_and_published:"エントリーが保存、公開されました。",entry_deleted:"エントリーが削除されました。",entries_deleted:"{count} 個のエントリーが削除されました。",asset_saved:"アセットが保存されました。",asset_saved_and_published:"アセットが保存、公開されました。",assets_saved:"{count} 個のアセットが保存されました。",assets_saved_and_published:"{count} 個のアセットが保存、公開されました。",asset_url_copied:"アセット URL がクリップボードにコピーされました。",asset_urls_copied:"アセット URL がクリップボードにコピーされました。",asset_path_copied:"アセットファイルパスがクリップボードにコピーされました。",asset_paths_copied:"アセットファイルパスがクリップボードにコピーされました。",asset_data_copied:"アセットファイルがクリップボードにコピーされました。",asset_downloaded:"アセットファイルがダウンロードされました。",assets_downloaded:"アセットファイルがダウンロードされました。",asset_moved:"アセットが移動されました。",assets_moved:"{count} 個のアセットが移動されました。",asset_renamed:"アセットの名前が変更されました。",assets_renamed:"{count} 個のアセットの名前が変更されました。",asset_deleted:"アセットが削除されました。",assets_deleted:"{count} 個のアセットが削除されました。",content_editor:"コンテンツエディター",restore_backup_title:"下書きを復元",restore_backup_description:"このエントリーには {datetime} に保存されたバックアップがあります。その編集済みの下書きを復元しますか?",draft_backup_saved:"下書きのバックアップが保存されました。",draft_backup_restored:"下書きのバックアップが復元されました。",draft_backup_deleted:"下書きのバックアップが削除されました。",cancel_editing:"編集をキャンセル",creating_x:"{name} を作成",creating_x_collection_entry:"「{collection}」コレクションの新しいエントリーを作成しています。",editing_x_in_x:"{collection} › {entry} を編集",editing_x_collection_entry:"「{collection}」コレクションの「{entry}」エントリーを編集しています。",editing_x_collection_file:"「{collection}」コレクションの「{file}」ファイルを編集しています。",save_and_publish:"保存して公開",save_without_publishing:"公開せずに保存",show_editor_options:"エディターオプションを表示",editor_options:"エディターオプション",show_preview:"プレビューを表示",sync_scrolling:"スクロールを同期",switch_locale:"ロケールを切り替え",locale_content_disabled_short:"(無効)",locale_content_error_short:"(エラー)",edit:"編集",preview:"プレビュー",edit_x_locale:"{locale} コンテンツを編集",preview_x_locale:"{locale} コンテンツをプレビュー",content_preview:"コンテンツプレビュー",show_content_options_x_locale:"{locale} コンテンツのオプションを表示",content_options_x_locale:"{locale} コンテンツのオプション",x_field:"「{field}」フィールド",show_field_options:"フィールドオプションを表示",field_options:"フィールドオプション",unsupported_widget_x:"非対応ウィジェット: {name}",enable_x_locale:"{locale} を有効化",reenable_x_locale:"{locale} を再度有効化",disable_x_locale:"{locale} を無効化",locale_x_has_been_disabled:"{locale} コンテンツは無効化されています。",locale_x_now_disabled:"{locale} コンテンツは無効化されました。エントリーを保存する際に削除されます。",view_in_repository:"レポジトリ内で見る",view_on_x:"{service} で見る",view_on_live_site:"管理対象サイトで見る",copy_from:"他の言語からコピー…",copy_from_x:"{locale} からコピー",translation_options:"翻訳オプション",translate:"翻訳",translate_field:"フィールドを翻訳",translate_fields:"フィールドを翻訳",translate_from:"他の言語から翻訳…",translate_from_x:"{locale} から翻訳",revert_changes:"変更を取り消す",revert_all_changes:"すべての変更を取り消す",edit_slug:"スラッグを編集",edit_slug_warning:"スラッグを変更すると、エントリーへの内部・外部リンクが壊れる可能性があります。現在のところ、Sveltia CMS は Relation ウィジェットで作成された参照を更新しないため、そのような参照は他のリンクとともに手動で更新する必要があります。",edit_slug_error:{empty:"スラッグは空白にはできません。",duplicate:"このスラッグは他のエントリーに使われています。"},required:"必須",editor:{translation:{none:"翻訳されたフィールドはありません。",started:"翻訳中…",error:"翻訳中に問題が発生しました。",complete:{one:"{source} からフィールドを翻訳しました。",many:"{source} から {count} 個のフィールドを翻訳しました。"}},copy:{none:"コピーされたフィールドはありません。",complete:{one:"{source} からフィールドをコピーしました。",many:"{source} から {count} 個のフィールドをコピーしました。"}}},validation:{value_missing:"この項目は必須です。",range_underflow:{select_many:"少なくとも {min} 個の項目を選択してください。",select_one:"少なくとも {min} 個の項目を選択してください。",add_many:"少なくとも {min} 個の項目を追加してください。",add_one:"少なくとも {min} 個の項目を追加してください。"},range_overflow:{select_many:"選択できるのは最大で {max} 項目です。",select_one:"選択できるのは最大で {max} 項目です。",add_many:"追加できるのは最大で {max} 項目です。",add_one:"追加できるのは最大で {max} 項目です。"},too_short:{one:"少なくとも {min} 文字は入力してください。",many:"少なくとも {min} 文字は入力してください。"},too_long:{one:"{max} 文字を超える入力はできません。",many:"{max} 文字を超える入力はできません。"},type_mismatch:{email:"正しいメールアドレスを入力してください。",url:"正しい URL を入力してください。"}},saving_entry:{error:{title:"エラー",description:"エントリーを保存中に問題が発生しました。後で再度お試しください。"}},viewing_x_asset_details:"「{name}」アセットの詳細を表示しています。",asset_editor:"アセットエディター",preview_unavailable:"プレビューは表示できません",public_url:"公開 URL",public_urls:"公開 URL",file_path:"ファイルパス",file_paths:"ファイルパス",file_data:"ファイルデータ",kind:"種類",size:"サイズ",dimensions:"大きさ",duration:"再生時間",used_in:"使われているエントリー",select_file:"ファイルを選択",select_image:"画像を選択",replace_file:"ファイルを差し替え",replace_image:"画像を差し替え",remove_file:"ファイルを削除",remove_image:"画像を削除",remove_this_item:"このアイテムを削除",move_up:"上へ移動",move_down:"下へ移動",add_x:"{name} を追加",select_list_type:"リストタイプを選択",opacity:"透明度",unselected_option:"(なし)",assets_dialog:{title:{file:"ファイルを選択",image:"画像を選択"},search_for_file:"ファイルを検索",search_for_image:"画像を検索",locations:"場所",location:{local:"お使いのコンピューター",repository:"このレポジトリ",external_locations:"外部の場所",stock_photos:"ストックフォト"},error:{invalid_key:"あなたの API キーは正しくないか期限切れです。確認の上、再度お試しください。",search_fetch_failed:"アセットを検索中に問題が発生しました。後で再度お試しください。",image_fetch_failed:"選択されたアセットをダウンロード中に問題が発生しました。後で再度お試しください。"},available_images:"利用可能な画像",enter_url:"URL を入力",enter_file_url:"ファイルの URL を入力:",enter_image_url:"画像の URL を入力:",large_file:{title:"大きなファイル",description:"このファイルは最大サイズ {size} を超えています。他のファイルを選んでください。"},photo_credit:{title:"写真クレジット",description:"可能であれば以下のクレジットを使ってください:"}},character_counter:{min_max:{one:"{count} 文字入力されています。最小: {min}。最大 {max}。",many:"{count} 文字入力されています。最小: {min}。最大 {max}。"},min:{one:"{count} 文字入力されています。最小: {min}。",many:"{count} 文字入力されています。最小: {min}。"},max:{one:"{count} 文字入力されています。最大: {max}。",many:"{count} 文字入力されています。最大: {max}。"}},youtube_video_player:"YouTube 動画プレーヤー",today:"今日",now:"現在時刻",editor_components:{image:"画像",src:"ソース",alt:"代替テキスト",title:"タイトル",link:"リンク"},key_value:{key:"キー",value:"値",action:"アクション",empty_key:"キーは必須です。",duplicate_key:"キーが重複しています。"},boolean:{true:"はい",false:"いいえ"},cloud_storage:{invalid:"このサービスは正しく設定されていません。",auth:{initial:"{service} へログインすると、ストレージ上のメディアをエントリー項目へ挿入できます。",requested:"ログイン中…",error:"ユーザー名またはパスワードが間違っています。確認の上、再度お試しください。"}},config:{error:{no_secure_context:"Sveltia CMS は HTTPS またはローカルホスト URL でのみ動作します。",fetch_failed:"設定ファイルを読み込めませんでした。",fetch_failed_not_ok:"HTTP レスポンスがステータス {status} で返されました。",parse_failed:"設定ファイルを解析できませんでした。",parse_failed_invalid_object:"設定ファイルが有効な JavaScript オブジェクトではありません。",no_collection:"設定ファイル内でコレクションが定義されていません。",no_backend:"設定ファイル内でバックエンドが定義されていません。",unsupported_backend:"設定されている「{name}」バックエンドは非対応です。",no_repository:"設定ファイル内でレポジトリが定義されていません。",oauth_implicit_flow:"設定されている認証方式 (暗黙的フロー) は非対応です。",oauth_no_app_id:"設定ファイル内で OAuth アプリケーション ID が定義されていません。",no_media_folder:"設定ファイル内でメディアフォルダーが定義されていません。",unexpected:"設定ファイルを検証中に予期せぬ問題が発生しました。",try_again:"問題を解決してから再度お試しください。"}},local_backend:{unsupported_browser:"お使いのブラウザーはローカル開発に対応していません。代わりに Chrome か Edge を使ってください。",disabled:"お使いのブラウザーではローカル開発が無効化されています。<a>有効化する方法はこちら</a>。"},status:{drafts:"下書き",in_review:"レビュー中",ready:"公開可"},categories:"カテゴリ",prefs:{changes:{api_key_saved:"API キーが保存されました。",api_key_removed:"API キーが削除されました。"},error:{permission_denied:"ブラウザーストレージ (Cookie) アクセスが拒否されました。許可設定を確認の上、再度お試しください。"},appearance:{title:"アピアランス",theme:"テーマ",select_theme:"テーマを選択"},theme:{auto:"自動",dark:"ダーク",light:"ライト"},languages:{title:"言語",ui_language:{title:"ユーザーインターフェース言語",select_language:"言語を選択"},translator:{title:"{service} 翻訳",field_label:"{service} API 認証キー",description:"<a {homeHref}>{service} API</a> にユーザー登録して、<a {apiKeyHref}>発行された認証キー</a> をここに入力すると、テキストエントリー項目の素早い翻訳が可能となります。"}},contents:{title:"コンテンツ",editor:{title:"エディター",close_on_save:{switch_label:"下書き保存後にエディターを閉じる"}}},media:{title:"メディア",stock_photos:{title:"{service} 無料画像素材",field_label:"{service} API キー",description:"<a {homeHref}>{service} API</a> にユーザー登録して、<a {apiKeyHref}>発行された API キー</a> をここに入力すると、画像エントリー項目に無料のストックフォトを挿入できます。",credit:"写真提供: {service}"}},accessibility:{title:"アクセシビリティ",underline_links:{title:"リンクに下線を付ける",description:"エントリープレビューやユーザーインターフェイスラベル内のリンクに下線を表示します。",switch_label:"常に下線を付ける"}},advanced:{title:"詳細",deploy_hook:{title:"デプロイフック",description:"「変更を公開」を選択して手動でデプロイを実行する際に呼び出すウェブフック URL を入力してください。GitHub Actions を使用する場合は空欄のままで構いません。",field_label:"デプロイフック URL",url_saved:"ウェブフック URL が保存されました。",url_removed:"ウェブフック URL が削除されました。"},developer_mode:{title:"開発者モード",description:"詳細なコンソールログやネイティブコンテキストメニューなど、いくつかの機能を有効化します。",switch_label:"開発者モードを有効にする"}}},keyboard_shortcuts_:{view_content_library:"コンテンツライブラリを表示",view_asset_library:"アセットライブラリを表示",search:"エントリーとアセットを検索",create_entry:"新しいエントリーを作成",save_entry:"エントリーを保存",cancel_editing:"エントリーの編集をキャンセル"},file_type_labels:{avif:"AVIF 画像",bmp:"Bitmap 画像",gif:"GIF 画像",ico:"アイコン",jpeg:"JPEG 画像",jpg:"JPEG 画像",png:"PNG 画像",svg:"SVG 画像",tif:"TIFF 画像",tiff:"TIFF 画像",webp:"WebP 画像",avi:"AVI 動画",mp4:"MP4 動画",mpeg:"MPEG 動画",ogv:"OGG 動画",ts:"MPEG 動画",webm:"WebM 動画","3gp":"3GPP 動画","3g2":"3GPP2 動画",aac:"AAC 音声",mid:"MIDI",midi:"MIDI",mp3:"MP3 音声",opus:"OPUS 音声",wav:"WAV 音声",weba:"WebM 音声",csv:"CSV スプレッドシート",doc:"Word ドキュメント",docx:"Word ドキュメント",odp:"OpenDocument プレゼンテーション",ods:"OpenDocument スプレッドシート",odt:"OpenDocument テキスト",pdf:"PDF ドキュメント",ppt:"PowerPoint プレゼンテーション",pptx:"PowerPoint プレゼンテーション",rtf:"リッチテキストドキュメント",xls:"Excel スプレッドシート",xlsx:"Excel スプレッドシート",html:"HTML テキスト",js:"JavaScript",json:"JSON テキスト",md:"Markdown テキスト",toml:"TOML テキスト",yaml:"YAML テキスト",yml:"YAML テキスト"},file_size_units:{b:"{size} バイト",kb:"{size} KB",mb:"{size} MB",gb:"{size} GB",tb:"{size} TB"}},NK=Object.freeze(Object.defineProperty({__proto__:null,strings:LK},Symbol.toStringTag,{value:"Module"})),IK=()=>{Object.entries(Object.assign({"/src/lib/locales/en.js":$K,"/src/lib/locales/ja.js":NK})).forEach(([e,{strings:n}])=>{const r=Ln(e).filename;rb(r,n)}),FE({fallbackLocale:"en",initialLocale:ne(Tt).locale||(y$()??"").split("-")[0]||"en"})};var RK=F('<link rel="icon">'),DK=F('<meta name="referrer" content="same-origin"> <meta name="robots" content="noindex"> <!> <!>',1),MK=F('<div role="none" class="outer svelte-1729mpr"><!> <!> <div role="none" class="main svelte-1729mpr"><!> <!></div></div>'),FK=F('<!> <div role="status" class="svelte-1729mpr"> </div>',1);const zK={hash:"svelte-1729mpr",code:"body:not(:has(#nc-root)) {overflow:hidden;}#nc-root > .sui.app-shell {position:absolute;}.outer.svelte-1729mpr {display:flex;flex-direction:column;position:absolute;inset:0;overflow:hidden;}.main.svelte-1729mpr {position:relative;flex:auto;display:flex;flex-direction:column;overflow:hidden;background-color:var(--sui-secondary-background-color);}[role=status].svelte-1729mpr {position:absolute;z-index:-1;opacity:0;pointer-events:none;-webkit-user-select:none;user-select:none;}"};function jK(t,e){se(e,!0),Te(t,zK);const[n,r]=ve(),i=()=>z(wt,"$siteConfig",n),s=()=>z(Cf,"$isLoading",n),o=()=>z(In,"$backend",n),a=()=>z(gi,"$user",n),c=()=>z(dc,"$dataLoaded",n),u=()=>z(bs,"$announcedPageStatus",n);cn(()=>{IK(),l8(e.config)}),cn(()=>{const d=document.querySelector("#nc-root");if(d&&window.getComputedStyle(d).position==="static"){const{top:f,height:h}=d.getBoundingClientRect();h?d.style.position="relative":(d.style.position="fixed",d.style.inset=`${f}px 0 0 0`)}}),sk(d=>{var f=DK(),h=D(M(f),4);{var p=m=>{var v=RK();const _=w(()=>i().logo_url);q((b,y)=>{ke(v,"href",b),ke(v,"type",y)},[()=>l(_)||`data:image/svg+xml;base64,${btoa(UE)}`,()=>l(_)?Jo.getType(l(_))??void 0:"image/svg+xml"]),T(m,v)};U(h,m=>{i()&&m(p)})}var g=D(h,2);U(g,m=>{}),T(d,f)}),wi("mousedown",Kv.body,d=>{d.target?.matches("a")&&d.target.origin!==window.location.origin&&(d.target.target="_blank")}),SF(t,{children:(d,f)=>{var h=FK(),p=M(h);{var g=_=>{var b=MK(),y=R(b);Yq(y,{});var x=D(y,2);{var k=O=>{Wq(O,{})};U(x,O=>{o()&&O(k)})}var S=D(x,2),C=R(S);qq(C,{});var E=D(C,2);{var A=O=>{PK(O,{})};U(E,O=>{a()&&c()&&O(A)})}T(_,b)};U(p,_=>{s()||_(g)})}var m=D(p,2),v=R(m);q(()=>Z(v,u())),T(d,h)},$$slots:{default:!0}}),oe(),r()}const UK=["registerEditorComponent","registerEventListener","registerPreviewStyle","registerPreviewTemplate","registerWidget"],BK=["getBackend","getCustomFormats","getCustomFormatsExtensions","getCustomFormatsFormatters","getEditorComponents","getEventListeners","getLocale","getMediaLibrary","getPreviewStyles","getPreviewTemplate","getRemarkPlugins","getWidget","getWidgetValueSerializer","getWidgets","invokeEvent","moment","registerBackend","registerLocale","registerMediaLibrary","registerRemarkPlugin","registerWidgetValueSerializer","removeEventListener","resolveWidget"],qK="https://github.com/sveltia/sveltia-cms#compatibility";let w1=!1;const Ey=async({config:t={}}={})=>{w1||(w1=!0,document.readyState==="loading"&&!document.querySelector("#nc-root")&&await new Promise(e=>{window.addEventListener("DOMContentLoaded",()=>e(void 0),{once:!0})}),Qv(jK,{target:document.querySelector("#nc-root")??document.body,props:{config:t}}))},HK=(t,e,{fromFile:n,toFile:r})=>{rp[t]={extension:e,parser:n,formatter:r}},VK=new Proxy({init:Ey,registerCustomFormat:HK},{get:(t,e)=>{if(e in t)return t[e];let n="";if(UK.includes(e)&&(n="CMS.%s() is not yet supported in Sveltia CMS, but we plan to implement it soon."),BK.includes(e)&&(n="CMS.%s() is not supported in Sveltia CMS, and we don’t have any plans to implement it."),n)return console.error(`${n} See %s for compatibility information.`,e,qK),()=>{}}});window.CMS=VK;window.initCMS=Ey;!window.CMS_MANUAL_INIT&&(document.currentScript||document.querySelector('script[src$="/sveltia-cms.js"]'))&&Ey();export{VK as default,Ey as init};
591
+ ${l(o)??""}`)),T(C,E)};U(k,C=>{l(d)&&C(S)})}q(C=>{ke(v,"aria-label",C),pt(y,"invalid",l(f)),Z(x,l(c))},[()=>i()(l(u)&&l(d)?l(c)===1?"character_counter.min_max.one":"character_counter.min_max.many":l(u)?l(c)===1?"character_counter.min.one":"character_counter.min.many":l(c)===1?"character_counter.max.one":"character_counter.max.many",{values:{count:l(c),min:l(s),max:l(o)}})]),T(m,v)};U(p,m=>{(l(u)||l(d))&&m(g)})}T(t,h),oe(),r()}function cW(t,e){se(e,!0);const[n,r]=ve();let i=P(e,"currentValue",15),s=P(e,"required",3,!0),o=P(e,"readonly",3,!1),a=P(e,"invalid",3,!1),c=ae("");const u=w(()=>it(e.fieldConfig.type,"text")),d=w(()=>it(e.fieldConfig.prefix,"")),f=w(()=>it(e.fieldConfig.suffix,"")),{extraHint:h}=Is("field-editor")??{},p=()=>{let m=typeof i()=="string"?i():"";l(d)&&m.startsWith(l(d))&&(m=m.slice(l(d).length)),l(f)&&m.endsWith(l(f))&&(m=m.slice(0,-l(f).length)),l(c)!==m&&$(c,ie(m))},g=()=>{let m=l(c).trim();m&&(l(d)||l(f))&&(m=`${l(d)}${m}${l(f)}`),i()!==m&&i(m)};Be(()=>{i(),Se(()=>{p()})}),Be(()=>{l(c),Se(()=>{g()})}),Be(()=>{h&&ot(h,t2)}),Pn(t,{get lang(){return e.locale},get type(){return l(u)},get inputmode(){return l(u)},flex:!0,get readonly(){return o()},get required(){return s()},get invalid(){return a()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get value(){return l(c)},set value(m){$(c,ie(m))}}),oe(),r()}var uW=F('<iframe frameborder="0" allow="autoplay; encrypted-media; picture-in-picture" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" class="svelte-wmmi2b"></iframe>'),dW=F("<a> </a>"),fW=F('<div role="none"><!></div>');const hW={hash:"svelte-wmmi2b",code:"iframe.svelte-wmmi2b {display:block;margin:0 auto;width:100%;height:auto;aspect-ratio:16/9;}"};function pW(t,e){se(e,!0),Te(t,hW);const[n,r]=ve(),i=()=>z(le,"$_",n);let s=ae(void 0),o=ae(!0);const a=w(()=>QB(e.url));cn(()=>{window.addEventListener("securitypolicyviolation",({blockedURI:h,violatedDirective:p})=>{h===new URL(l(a)).origin&&p==="frame-src"&&$(o,!1)})});var c=fW(),u=R(c);{var d=h=>{var p=W(),g=M(p);yr(g,()=>Ru(l(s)),null,m=>{var v=uW();q((_,b)=>{ke(v,"src",_),ke(v,"title",b)},[()=>encodeURI(l(a)),()=>i()("youtube_video_player")]),T(m,v)}),T(h,p)},f=h=>{var p=dW(),g=R(p);q(m=>{ke(p,"href",m),Z(g,e.url)},[()=>encodeURI(e.url)]),T(h,p)};U(u,h=>{l(o)?h(d):h(f,!1)})}$t(c,h=>$(s,h),()=>l(s)),T(t,c),oe(),r()}var gW=F("<a> </a>"),mW=F("<a> </a>"),vW=F('<p dir="auto" class="svelte-1dlg8zk"><!></p>');const bW={hash:"svelte-1dlg8zk",code:".title.svelte-1dlg8zk {font-size:var(--sui-font-size-xxx-large);font-weight:var(--sui-font-weight-bold);}"};function _W(t,e){se(e,!0),Te(t,bW);const n=w(()=>e.fieldConfig.name),r=w(()=>it(e.fieldConfig.type,"text"));var i=W(),s=M(i);{var o=a=>{var c=vW(),u=R(c);{var d=h=>{var p=W(),g=M(p);{var m=_=>{pW(_,{get url(){return e.currentValue}})},v=_=>{var b=gW(),y=R(b);q(x=>{ke(b,"href",x),Z(y,e.currentValue)},[()=>encodeURI(e.currentValue)]),T(_,b)};U(g,_=>{XB(e.currentValue)?_(m):_(v,!1)})}T(h,p)},f=h=>{var p=W(),g=M(p);{var m=_=>{var b=mW(),y=R(b);q(x=>{ke(b,"href",`mailto:${x??""}`),Z(y,e.currentValue)},[()=>encodeURI(e.currentValue)]),T(_,b)},v=_=>{var b=Ue();q(()=>Z(b,e.currentValue)),T(_,b)};U(g,_=>{l(r)==="email"?_(m):_(v,!1)},!0)}T(h,p)};U(u,h=>{l(r)==="url"||tb(e.currentValue)?h(d):h(f,!1)})}q(()=>{ke(c,"lang",e.locale),pt(c,"title",l(n)==="title"),c.dir=c.dir}),T(a,c)};U(s,a=>{typeof e.currentValue=="string"&&e.currentValue.trim()&&a(o)})}T(t,i),oe()}function yW(t,e){se(e,!0);const[n,r]=ve();let i=P(e,"currentValue",15),s=P(e,"required",3,!0),o=P(e,"readonly",3,!1),a=P(e,"invalid",3,!1),c=ae("");const{extraHint:u}=Is("field-editor")??{},d=()=>{const h=typeof i()=="string"?i():"";l(c)!==h&&$(c,ie(h))},f=()=>{const h=l(c);i()!==h&&i(h)};Be(()=>{i(),Se(()=>{d()})}),Be(()=>{l(c),Se(()=>{f()})}),Be(()=>{u&&ot(u,t2)}),Tp(t,{get lang(){return e.locale},flex:!0,get readonly(){return o()},get required(){return s()},get invalid(){return a()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},autoResize:!0,get value(){return l(c)},set value(h){$(c,ie(h))}}),oe(),r()}var wW=F('<p dir="auto" class="svelte-tzbr78"> </p>');const xW={hash:"svelte-tzbr78",code:"p.svelte-tzbr78 {white-space:pre-wrap;}"};function kW(t,e){se(e,!0),Te(t,xW);var n=W(),r=M(n);{var i=s=>{var o=wW(),a=R(o);q(()=>{ke(o,"lang",e.locale),Z(a,e.currentValue),o.dir=o.dir}),T(s,o)};U(r,s=>{typeof e.currentValue=="string"&&e.currentValue.trim()&&s(i)})}T(t,n),oe()}function SW(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(rt,"$entryDraft",n);let s=P(e,"currentValue",15),o=P(e,"required",3,!0),a=P(e,"readonly",3,!1),c=P(e,"invalid",3,!1);const u=w(()=>i()?.collection),d=w(()=>i()?.collectionFile),f=w(()=>(l(d)??l(u))?._i18n??Ri),h=w(()=>l(f).defaultLocale);cn(()=>{s()||(e.locale===l(h)||[!0,"translate"].includes(e.fieldConfig?.i18n??!1))&&s(SA(e.fieldConfig))});const p=w(()=>a()||e.fieldConfig.read_only!==!1);Pn(t,{flex:!0,get readonly(){return l(p)},get required(){return o()},get invalid(){return c()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get value(){return s()},set value(g){s(g)}}),oe(),r()}var EW=F('<p class="svelte-1e2mlgo"> </p>');const TW={hash:"svelte-1e2mlgo",code:"p.svelte-1e2mlgo {font-family:var(--sui-font-family-monospace);}"};function CW(t,e){se(e,!0),Te(t,TW);var n=W(),r=M(n);{var i=s=>{var o=EW(),a=R(o);q(()=>Z(a,e.currentValue)),T(s,o)};U(r,s=>{typeof e.currentValue=="string"&&e.currentValue.trim()&&s(i)})}T(t,n),oe()}const qf={boolean:O6,code:N6,color:j6,compute:H6,datetime:J6,file:f1,image:f1,keyvalue:tV,list:vV,markdown:MV,number:BV,object:ZV,relation:tW,select:e2,string:cW,text:yW,uuid:SW},v1={boolean:L6,code:R6,color:q6,compute:W6,datetime:Q6,file:h1,image:h1,keyvalue:sV,list:TV,markdown:UV,number:HV,object:XV,relation:rW,select:oW,string:_W,text:kW,uuid:CW};function xy(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(ug,"$translator",n),s=()=>z(le,"$_",n),o=()=>z(rt,"$entryDraft",n);let a=P(e,"keyPath",3,""),c=P(e,"translate",3,!1);const u=w(()=>i().getSourceLanguage),d=w(()=>i().getTargetLanguage);var f=W(),h=M(f);ft(h,17,()=>e.otherLocales,cr,(p,g)=>{const m=w(()=>s()(c()?"translate_from_x":"copy_from_x",{values:{locale:$s(l(g))}})),v=w(()=>!o()?.currentLocales[e.locale]||!o().currentLocales[l(g)]||a()&&!Zr(o().currentValues[l(g)])[a()]||!c()&&a()&&Zr(o().currentValues[l(g)])[a()]===Zr(o().currentValues[e.locale])[a()]||c()&&(!l(u)(e.locale)||!l(d)(l(g))));Nt(p,{get label(){return l(m)},get disabled(){return l(v)},onclick:()=>{GA(l(g),e.locale,{keyPath:a(),translate:c()})}})}),T(t,f),oe(),r()}function n2(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(ug,"$translator",n),s=()=>z(rt,"$entryDraft",n),o=()=>z(le,"$_",n);let a=P(e,"size",3,"medium"),c=P(e,"keyPath",3,"");const u=w(()=>i()??{}),d=w(()=>l(u).getSourceLanguage),f=w(()=>l(u).getTargetLanguage),h=w(()=>!s()?.currentLocales[e.locale]||!l(d)(e.locale));var p=W(),g=M(p);{var m=_=>{const b=w(()=>{const[k]=e.otherLocales;return{otherLocale:k}}),y=w(()=>o()("translate_from_x",{values:{locale:$s(l(b).otherLocale)}})),x=w(()=>l(h)||!s()?.currentLocales[l(b).otherLocale]||!l(f)(l(b).otherLocale));Ze(_,{variant:"ghost",get size(){return a()},iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return l(y)},get title(){return l(y)},get disabled(){return l(x)},onclick:()=>{GA(l(b).otherLocale,e.locale,{keyPath:c(),translate:!0})},startIcon:S=>{et(S,{name:"translate"})},$$slots:{startIcon:!0}})},v=_=>{const b=w(()=>o()("translate"));Nr(_,{variant:"ghost",get size(){return a()},iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return l(b)},get disabled(){return l(h)},endIcon:k=>{et(k,{name:"translate"})},popup:k=>{const S=w(()=>o()("translation_options"));wr(k,{get"aria-label"(){return l(S)},children:(C,E)=>{xy(C,{get locale(){return e.locale},get otherLocales(){return e.otherLocales},get keyPath(){return c()},translate:!0})},$$slots:{default:!0}})},$$slots:{endIcon:!0,popup:!0}})};U(g,_=>{e.otherLocales.length===1?_(m):_(v,!1)})}T(t,p),oe(),r()}var AW=F('<div class="required svelte-1tqwg2k">*</div>'),PW=F("<!> <!>",1),OW=F('<p class="comment svelte-1tqwg2k"><!></p>'),$W=F("<!> <!> <!> <!> <!> <!> <!>",1),LW=F('<div role="none"> </div>'),NW=F('<div role="none" class="before-input svelte-1tqwg2k"><!></div>'),IW=F('<div role="none" class="prefix svelte-1tqwg2k"> </div>'),RW=F('<div role="none" class="suffix svelte-1tqwg2k"> </div>'),DW=F('<div role="none" class="after-input svelte-1tqwg2k"><!></div>'),MW=F("<!> <!> <!> <!> <!>",1),FW=F('<p class="hint svelte-1tqwg2k"><!></p>'),zW=F('<div role="none" class="footer svelte-1tqwg2k"><!> <!></div>'),jW=F('<section role="group" class="field svelte-1tqwg2k"><header role="none" class="svelte-1tqwg2k"><h4 role="none" class="svelte-1tqwg2k"> </h4> <!> <!> <!> <!></header> <!> <!> <div role="none" class="widget-wrapper svelte-1tqwg2k"><!></div> <!></section>');const UW={hash:"svelte-1tqwg2k",code:`section.svelte-1tqwg2k {padding:16px;}section.svelte-1tqwg2k:not(:last-child) {border-width:0 0 1px;border-color:var(--sui-secondary-border-color);}section.svelte-1tqwg2k > :where(.svelte-1tqwg2k) {margin-right:auto;margin-left:auto;max-width:768px;}header.svelte-1tqwg2k {display:flex;align-items:center;margin-bottom:8px;height:var(--sui-button-small-height);}header.svelte-1tqwg2k h4:where(.svelte-1tqwg2k) {font-size:var(--sui-font-size-small);font-weight:var(--sui-font-weight-bold);color:var(--sui-secondary-foreground-color);}header.svelte-1tqwg2k .required:where(.svelte-1tqwg2k) {margin:2px 0 0 2px;color:var(--sui-error-foreground-color);font-size:var(--sui-font-size-large);}.widget-wrapper.has-extra-labels.svelte-1tqwg2k {display:flex;align-items:center;justify-content:flex-start;gap:4px;}.widget-wrapper.svelte-1tqwg2k input[type="text"],
592
+ .widget-wrapper.svelte-1tqwg2k textarea {width:100%;}.widget-wrapper.svelte-1tqwg2k input[type="color"],
593
+ .widget-wrapper.svelte-1tqwg2k input[type="number"] {outline:0;border-width:1px;border-color:var(--sui-primary-border-color);border-radius:var(--sui-control-medium-border-radius);height:var(--sui-button-medium-height);color:inherit;background-color:var(--sui-textbox-background-color);}.widget-wrapper.svelte-1tqwg2k input[type="file"],
594
+ .widget-wrapper.svelte-1tqwg2k input[type="checkbox"], .widget-wrapper.svelte-1tqwg2k > div {color:inherit;}.widget-wrapper.svelte-1tqwg2k input[type="date"],
595
+ .widget-wrapper.svelte-1tqwg2k input[type="datetime-local"],
596
+ .widget-wrapper.svelte-1tqwg2k input[type="time"] {outline:0;margin:var(--sui-focus-ring-width);border-width:var(--sui-textbox-border-width, 1px);border-color:var(--sui-primary-border-color);border-radius:var(--sui-control-medium-border-radius);padding:var(--sui-textbox-singleline-padding);width:auto;height:var(--sui-textbox-height);color:var(--sui-textbox-foreground-color);background-color:var(--sui-textbox-background-color);font-family:var(--sui-textbox-font-family);font-size:var(--sui-textbox-font-size);text-transform:uppercase;}.widget-wrapper.svelte-1tqwg2k input[type="date"]:disabled,
597
+ .widget-wrapper.svelte-1tqwg2k input[type="datetime-local"]:disabled,
598
+ .widget-wrapper.svelte-1tqwg2k input[type="time"]:disabled {opacity:0.4;}.widget-wrapper.svelte-1tqwg2k input[type="color"][aria-invalid="true"],
599
+ .widget-wrapper.svelte-1tqwg2k input[type="date"][aria-invalid="true"],
600
+ .widget-wrapper.svelte-1tqwg2k input[type="datetime-local"][aria-invalid="true"],
601
+ .widget-wrapper.svelte-1tqwg2k input[type="time"][aria-invalid="true"] {border-color:var(--sui-error-border-color);}.before-input.svelte-1tqwg2k,
602
+ .after-input.svelte-1tqwg2k,
603
+ .prefix.svelte-1tqwg2k,
604
+ .suffix.svelte-1tqwg2k {color:var(--sui-secondary-foreground-color);white-space:nowrap;}.comment.svelte-1tqwg2k {margin-block:4px;line-height:var(--sui-line-height-compact);}.footer.svelte-1tqwg2k {display:flex;gap:16px;justify-content:flex-end;margin-top:4px;}.hint.svelte-1tqwg2k {flex:auto;margin:0;font-size:var(--sui-font-size-small);line-height:var(--sui-line-height-compact);opacity:0.75;}`};function ky(t,e){se(e,!0),Te(t,UW);const[n,r]=ve(),i=()=>z(rt,"$entryDraft",n),s=()=>z(le,"$_",n),o=()=>z(u,"$extraHint",n),a=dr("field"),c=ye=>fi.sanitize(Ot.parseInline(ye.replaceAll("\\n","<br>")),{ALLOWED_TAGS:["strong","em","del","code","a","br"],ALLOWED_ATTR:["href"]}),u=st();Gv("field-editor",{extraHint:u});const d=w(()=>e.fieldConfig.name),f=w(()=>it(e.fieldConfig.label,"")),h=w(()=>it(e.fieldConfig.comment,"")),p=w(()=>it(e.fieldConfig.hint,"")),g=w(()=>it(e.fieldConfig.widget,"string")),m=w(()=>it(e.fieldConfig.i18n,!1)),v=w(()=>it(e.fieldConfig.pattern,()=>[],!0)),_=w(()=>Dd({fieldConfig:e.fieldConfig,locale:e.locale})),b=w(()=>e.fieldConfig.field),y=w(()=>e.fieldConfig.fields),x=w(()=>e.fieldConfig.types),k=w(()=>!!l(b)||!!l(y)||!!l(x)),S=w(()=>e.fieldConfig.min),C=w(()=>e.fieldConfig.max),E=w(()=>l(g)==="string"?e.fieldConfig.type??"text":l(g)==="number"?"number":void 0),A=w(()=>["string"].includes(l(g))),O=w(()=>l(A)?e.fieldConfig.prefix:void 0),L=w(()=>l(A)?e.fieldConfig.suffix:void 0),I=w(()=>["boolean","number","string"].includes(l(g))),N=w(()=>l(I)?e.fieldConfig.before_input:void 0),j=w(()=>l(I)?e.fieldConfig.after_input:void 0),H=w(()=>!!(l(O)||l(L)||l(N)||l(j))),B=w(()=>["relation","select"].includes(l(g))),V=w(()=>l(B)?e.fieldConfig.multiple:void 0),G=w(()=>l(g)==="list"&&l(k)||l(V)||l(g)==="keyvalue"),K=w(()=>l(g)==="list"||l(B)&&l(V)),ee=w(()=>i()?.collection),J=w(()=>i()?.collectionFile),Y=w(()=>i()?.originalValues),te=w(()=>(l(J)??l(ee))?._i18n??Ri),ce=w(()=>l(te).i18nEnabled),he=w(()=>l(te).allLocales),re=w(()=>l(te).defaultLocale),X=w(()=>l(ce)?l(he).filter(ye=>ye!==e.locale):[]),fe=w(()=>l(ce)&&(l(m)===!0||l(m)==="translate")),be=w(()=>l(ce)&&l(m)==="duplicate"),ue=w(()=>e.locale===l(re)||l(fe)||l(be)),Ee=w(()=>new RegExp(`^${ln(e.keyPath)}\\.\\d+$`)),_e=w(()=>l(K)?Object.entries(Zr(i()?.currentValues[e.locale]??{})).filter(([ye])=>l(Ee).test(ye)).map(([,ye])=>ye).filter(ye=>ye!==void 0):Zr(i()?.currentValues[e.locale])?.[e.keyPath]),Ae=w(()=>l(K)?Object.entries(l(Y)?.[e.locale]??{}).filter(([ye])=>l(Ee).test(ye)).map(([,ye])=>ye).filter(ye=>ye!==void 0):l(Y)?.[e.locale]?.[e.keyPath]),Ce=w(()=>i()?.validities[e.locale][e.keyPath]),$e=w(()=>l(f)||l(d)),Ve=w(()=>l(m)==="duplicate"&&e.locale!==l(re)||l(g)==="compute"),We=w(()=>l(Ce)?.valid===!1);var ht=W(),Ge=M(ht);{var pe=ye=>{var we=jW();const xe=w(()=>l(fe)&&l(X).length),Ne=w(()=>!(l(be)&&e.locale!==l(re)));var me=R(we),Pe=R(me);ke(Pe,"id",`${a??""}-label`);var qe=R(Pe),Xe=D(Pe,2);{var ct=yt=>{var Xt=AW();q($n=>ke(Xt,"aria-label",$n),[()=>s()("required")]),T(yt,Xt)};U(Xe,yt=>{!l(Ve)&&l(_)&&yt(ct)})}var Ke=D(Xe,2);Xr(Ke,{flex:!0});var nt=D(Ke,2);{var dt=yt=>{n2(yt,{size:"small",get locale(){return e.locale},get otherLocales(){return l(X)},get keyPath(){return e.keyPath}})};U(nt,yt=>{l(xe)&&["markdown","string","text","list","object"].includes(l(g))&&yt(dt)})}var ut=D(nt,2);{var bt=yt=>{const Xt=w(()=>s()("show_field_options"));Nr(yt,{variant:"ghost",size:"small",iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return l(Xt)},popup:wn=>{const qt=w(()=>s()("field_options"));wr(wn,{get"aria-label"(){return l(qt)},children:(Yt,fn)=>{var Dn=PW(),Qn=M(Dn);{var er=fr=>{xy(fr,{get locale(){return e.locale},get otherLocales(){return l(X)},get keyPath(){return e.keyPath}})};U(Qn,fr=>{l(xe)&&fr(er)})}var si=D(Qn,2);{var cs=fr=>{const Bn=w(()=>s()("revert_changes")),zt=w(()=>zn(l(_e),l(Ae)));Nt(fr,{get label(){return l(Bn)},get disabled(){return l(zt)},onclick:()=>{yy(e.locale,e.keyPath)}})};U(si,fr=>{l(Ne)&&fr(cs)})}T(Yt,Dn)},$$slots:{default:!0}})},$$slots:{popup:!0}})};U(ut,yt=>{(l(xe)||l(Ne))&&yt(bt)})}var Ct=D(me,2);{var sn=yt=>{var Xt=OW(),$n=R(Xt);br($n,()=>c(l(h))),T(yt,Xt)};U(Ct,yt=>{!l(Ve)&&l(h)&&yt(sn)})}var Rn=D(Ct,2);{var Xn=yt=>{ZA(yt,{id:`${a??""}-error`,children:(Xt,$n)=>{var wn=$W(),qt=M(wn);{var Yt=Qe=>{var xt=Ue();q(xn=>Z(xt,xn),[()=>s()("validation.value_missing")]),T(Qe,xt)};U(qt,Qe=>{l(Ce).valueMissing&&Qe(Yt)})}var fn=D(qt,2);{var Dn=Qe=>{var xt=Ue();const xn=w(()=>{const{minlength:tr}=e.fieldConfig;return{minlength:tr}});q(tr=>Z(xt,tr),[()=>s()(l(xn).minlength===1?"validation.too_short.one":"validation.too_short.many",{values:{min:l(xn).minlength}})]),T(Qe,xt)};U(fn,Qe=>{l(Ce).tooShort&&Qe(Dn)})}var Qn=D(fn,2);{var er=Qe=>{var xt=Ue();const xn=w(()=>{const{maxlength:tr}=e.fieldConfig;return{maxlength:tr}});q(tr=>Z(xt,tr),[()=>s()(l(xn).maxlength===1?"validation.too_long.one":"validation.too_long.many",{values:{max:l(xn).maxlength}})]),T(Qe,xt)};U(Qn,Qe=>{l(Ce).tooLong&&Qe(er)})}var si=D(Qn,2);{var cs=Qe=>{var xt=W();const xn=w(()=>l(S)===1?"one":"many");var tr=M(xt);{var js=qn=>{var nr=Ue();q(ji=>Z(nr,ji),[()=>s()("validation.range_underflow.number",{values:{min:l(S)}})]),T(qn,nr)},vo=qn=>{var nr=W(),ji=M(nr);{var Ui=hr=>{var rr=Ue();q(vi=>Z(rr,vi),[()=>s()(`validation.range_underflow.add_${l(xn)}`,{values:{min:l(S)}})]),T(hr,rr)},ea=hr=>{var rr=Ue();q(vi=>Z(rr,vi),[()=>s()(`validation.range_underflow.select_${l(xn)}`,{values:{min:l(S)}})]),T(hr,rr)};U(ji,hr=>{l(G)?hr(Ui):hr(ea,!1)},!0)}T(qn,nr)};U(tr,qn=>{l(g)==="number"?qn(js):qn(vo,!1)})}T(Qe,xt)};U(si,Qe=>{l(Ce).rangeUnderflow&&Qe(cs)})}var fr=D(si,2);{var Bn=Qe=>{var xt=W();const xn=w(()=>l(C)===1?"one":"many");var tr=M(xt);{var js=qn=>{var nr=Ue();q(ji=>Z(nr,ji),[()=>s()("validation.range_overflow.number",{values:{max:l(C)}})]),T(qn,nr)},vo=qn=>{var nr=W(),ji=M(nr);{var Ui=hr=>{var rr=Ue();q(vi=>Z(rr,vi),[()=>s()(`validation.range_overflow.add_${l(xn)}`,{values:{max:l(C)}})]),T(hr,rr)},ea=hr=>{var rr=Ue();q(vi=>Z(rr,vi),[()=>s()(`validation.range_overflow.select_${l(xn)}`,{values:{max:l(C)}})]),T(hr,rr)};U(ji,hr=>{l(G)?hr(Ui):hr(ea,!1)},!0)}T(qn,nr)};U(tr,qn=>{l(g)==="number"?qn(js):qn(vo,!1)})}T(Qe,xt)};U(fr,Qe=>{l(Ce).rangeOverflow&&Qe(Bn)})}var zt=D(fr,2);{var oi=Qe=>{var xt=Ue();q(()=>Z(xt,l(v)[1])),T(Qe,xt)};U(zt,Qe=>{l(Ce).patternMismatch&&Qe(oi)})}var Ht=D(zt,2);{var Qt=Qe=>{var xt=Ue();q(xn=>Z(xt,xn),[()=>s()(`validation.type_mismatch.${l(E)}`)]),T(Qe,xt)};U(Ht,Qe=>{l(Ce).typeMismatch&&Qe(Qt)})}T(Xt,wn)}})};U(Rn,yt=>{l(Ce)?.valid===!1&&yt(Xn)})}var kr=D(Rn,2),zi=R(kr);{var mi=yt=>{var Xt=LW(),$n=R(Xt);q(wn=>Z($n,wn),[()=>s()("unsupported_widget_x",{values:{name:l(g)}})]),T(yt,Xt)},Lt=yt=>{var Xt=W(),$n=M(Xt);{var wn=Yt=>{var fn=W();const Dn=w(()=>qf[l(g)]);var Qn=M(fn);Ci(Qn,()=>l(Dn),(er,si)=>{si(er,{get locale(){return e.locale},get keyPath(){return e.keyPath},fieldId:a,get fieldLabel(){return l($e)},get fieldConfig(){return e.fieldConfig},get currentValue(){return l(_e)},get readonly(){return l(Ve)},get required(){return l(_)},get invalid(){return l(We)}})}),T(Yt,fn)},qt=Yt=>{var fn=MW();const Dn=w(()=>qf[l(g)]);var Qn=M(fn);{var er=Qt=>{var Qe=NW(),xt=R(Qe);br(xt,()=>c(l(N))),T(Qt,Qe)};U(Qn,Qt=>{l(N)&&Qt(er)})}var si=D(Qn,2);{var cs=Qt=>{var Qe=IW(),xt=R(Qe);q(()=>Z(xt,l(O))),T(Qt,Qe)};U(si,Qt=>{l(O)&&Qt(cs)})}var fr=D(si,2);Ci(fr,()=>l(Dn),(Qt,Qe)=>{Qe(Qt,{get locale(){return e.locale},get keyPath(){return e.keyPath},fieldId:a,get fieldLabel(){return l($e)},get fieldConfig(){return e.fieldConfig},get readonly(){return l(Ve)},get required(){return l(_)},get invalid(){return l(We)},get currentValue(){return i().currentValues[e.locale][e.keyPath]},set currentValue(xt){At(rt,Se(i).currentValues[e.locale][e.keyPath]=xt,Se(i))}})});var Bn=D(fr,2);{var zt=Qt=>{var Qe=RW(),xt=R(Qe);q(()=>Z(xt,l(L))),T(Qt,Qe)};U(Bn,Qt=>{l(L)&&Qt(zt)})}var oi=D(Bn,2);{var Ht=Qt=>{var Qe=DW(),xt=R(Qe);br(xt,()=>c(l(j))),T(Qt,Qe)};U(oi,Qt=>{l(j)&&Qt(Ht)})}T(Yt,fn)};U($n,Yt=>{l(K)?Yt(wn):Yt(qt,!1)},!0)}T(yt,Xt)};U(zi,yt=>{l(g)in qf?yt(Lt,!1):yt(mi)})}var yn=D(kr,2);{var Gt=yt=>{var Xt=zW();const $n=w(o);var wn=R(Xt);{var qt=fn=>{var Dn=FW(),Qn=R(Dn);br(Qn,()=>c(l(p))),T(fn,Dn)};U(wn,fn=>{l(p)&&fn(qt)})}var Yt=D(wn,2);Ci(Yt,()=>l($n),(fn,Dn)=>{Dn(fn,{get fieldConfig(){return e.fieldConfig},get currentValue(){return l(_e)}})}),T(yt,Xt)};U(yn,yt=>{!l(Ve)&&(l(p)||o())&&yt(Gt)})}q(yt=>{ke(we,"aria-label",yt),ke(we,"data-widget",l(g)),ke(we,"data-key-path",e.keyPath),we.hidden=l(g)==="compute",Z(qe,l($e)),pt(kr,"has-extra-labels",l(H))},[()=>s()("x_field",{values:{field:l($e)}})]),T(ye,we)};U(Ge,ye=>{i()&&l(ue)&&l(g)!=="hidden"&&ye(pe)})}T(t,ht),oe(),r()}function BW(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(rt,"$entryDraft",n),s=w(()=>i()?.collection),o=w(()=>i()?.collectionFile),a=w(()=>l(o)?.fields??l(s)?.fields??[]);var c=W(),u=M(c);ft(u,17,()=>l(a),d=>d.name,(d,f)=>{var h=W(),p=M(h);yr(p,()=>vn(0),null,g=>{ky(g,{get keyPath(){return l(f).name},get locale(){return e.locale},get fieldConfig(){return l(f)}})}),T(d,h)}),T(t,c),oe(),r()}var qW=F('<div role="document" class="svelte-t01vxl"></div>');const HW={hash:"svelte-t01vxl",code:"div.svelte-t01vxl {padding:8px 16px;}"};function VW(t,e){se(e,!0),Te(t,HW);const[n,r]=ve(),i=()=>z(rt,"$entryDraft",n),s=()=>z(le,"$_",n),o=w(()=>i()?.collection),a=w(()=>i()?.collectionFile),c=w(()=>l(a)?.fields??l(o)?.fields??[]);var u=qW();ft(u,21,()=>l(c),d=>d.name,(d,f)=>{var h=W(),p=M(h);yr(p,()=>vn(0),null,g=>{wy(g,{get keyPath(){return l(f).name},get locale(){return e.locale},get fieldConfig(){return l(f)}})}),T(d,h)}),q(d=>ke(u,"aria-label",d),[()=>s()("content_preview")]),T(t,u),oe(),r()}var WW=F('<div role="none" class="content svelte-1g8n4fi"><!></div>'),GW=F('<span role="alert"> </span> <!>',1),KW=F('<div role="none" class="wrapper svelte-1g8n4fi"><!></div>');const YW={hash:"svelte-1g8n4fi",code:'@charset "UTF-8";.wrapper.svelte-1g8n4fi {display:contents;}.wrapper.svelte-1g8n4fi > .group {display:contents;}.content.svelte-1g8n4fi {flex:auto;overflow-y:auto;scroll-behavior:auto; /* Don’t use smooth scroll for syncing */overscroll-behavior-y:contain;}'};function b1(t,e){se(e,!0),Te(t,YW);const[n,r]=ve(),i=()=>z(Ei,"$entryEditorSettings",n),s=()=>z(e.thisPane,"$thisPane",n),o=()=>z(rt,"$entryDraft",n),a=()=>z(le,"$_",n);let c=P(e,"thisPaneContentArea",15),u=P(e,"thatPaneContentArea",15);const d=w(()=>i()??{}),f=w(()=>l(d).syncScrolling),h=w(()=>s()?.locale),p=w(()=>s()?.mode),g=w(()=>!!l(h)&&!!Zr(o()?.currentValues[l(h)])),m=w(()=>({values:{locale:l(h)?$s(l(h)):""}})),v=w(()=>l(p)==="preview"?VW:BW),_=()=>{window.requestAnimationFrame(()=>{if(!l(f)||!c()||!u())return;const{x:C,y:E}=c().getBoundingClientRect(),A=document.elementsFromPoint(C+80,E).find(H=>H.matches("[data-key-path]"));if(!A)return;const{keyPath:O}=A.dataset,{top:L,height:I}=A.getBoundingClientRect(),N=(E-L)/I,j=u().querySelector(`[data-key-path="${CSS.escape(O??"")}"]`);N<0||N>1||!j||u(u().scrollTop=j.offsetTop-E+j.clientHeight*N,!0)})},b={capture:!0,passive:!0};Be(()=>{c()&&(c(c().scrollTop=0,!0),c().addEventListener("wheel",_,b),c().addEventListener("touchmove",_,b))});var y=KW(),x=R(y);{var k=C=>{var E=WW(),A=R(E);Ci(A,()=>l(v),(O,L)=>{L(O,{get locale(){return l(h)}})}),$t(E,O=>c(O),()=>c()),T(C,E)},S=C=>{var E=W(),A=M(E);{var O=L=>{Tr(L,{children:(I,N)=>{var j=GW(),H=M(j),B=R(H),V=D(H,2);const G=w(()=>a()(l(g)?"reenable_x_locale":"enable_x_locale",l(m)));Ze(V,{variant:"tertiary",get label(){return l(G)},onclick:()=>{l(h)&&WA(l(h))}}),q(K=>Z(B,K),[()=>a()(l(g)?"locale_x_now_disabled":"locale_x_has_been_disabled",l(m))]),T(I,j)},$$slots:{default:!0}})};U(A,L=>{l(p)==="edit"&&L(O)},!0)}T(C,E)};U(x,C=>{l(h)&&o()?.currentLocales[l(h)]?C(k):C(S,!1)})}q(()=>ke(y,"id",e.id)),T(t,y),oe(),r()}var JW=F('<div class="inner svelte-1ivrcdt"><!> <!></div>'),ZW=F('<div class="outer svelte-1ivrcdt"><!></div>');const XW={hash:"svelte-1ivrcdt",code:`.outer.svelte-1ivrcdt {display:contents;}.outer.svelte-1ivrcdt .combobox.error [role="combobox"] {border-color:var(--sui-error-border-color);}.inner.svelte-1ivrcdt {display:contents;}.inner.svelte-1ivrcdt .error,
605
+ .inner.svelte-1ivrcdt .error button {color:var(--sui-error-foreground-color) !important;}`};function QW(t,e){se(e,!0),Te(t,XW);const[n,r]=ve(),i=()=>z(wt,"$siteConfig",n),s=()=>z(rt,"$entryDraft",n),o=()=>z(d(),"$thatPane",n),a=()=>z(le,"$_",n),c=()=>z(e.thisPane,"$thisPane",n),u=()=>z(Ei,"$entryEditorSettings",n);let d=P(e,"thatPane",19,()=>st(null));const f=w(()=>i()?.editor?.preview??!0),h=w(()=>s()?.collection),p=w(()=>s()?.collectionFile),g=w(()=>(l(p)??l(h))?._i18n??Ri),m=w(()=>l(g).allLocales),v=w(()=>l(m).filter(N=>!(o()?.mode==="edit"&&o().locale===N))),_=w(()=>Object.entries(s()?.validities??{}).some(([N,j])=>l(v).includes(N)&&Object.values(j??{}).some(({valid:H})=>!H))),b=w(()=>(l(p)??l(h))?.editor?.preview??l(f)),y=w(()=>l(m).length>=5),x=w(()=>l(y)?pd:cp),k=w(()=>l(y)?mr:Du),S=w(()=>l(y)?void 0:"tertiary"),C=w(()=>l(y)?void 0:"small");var E=ZW(),A=R(E);const O=w(()=>l(_)?"error":void 0),L=w(()=>a()("switch_locale")),I=w(()=>e.id.replace("-header","-body"));Ci(A,()=>l(x),(N,j)=>{j(N,{get class(){return l(O)},get"aria-label"(){return l(L)},get"aria-controls"(){return l(I)},children:(H,B)=>{var V=JW(),G=R(V);ft(G,17,()=>l(v),cr,(J,Y)=>{var te=W();const ce=w(()=>$s(l(Y))),he=w(()=>!s()?.currentLocales[l(Y)]),re=w(()=>Object.values(s()?.validities[l(Y)]??{}).some(({valid:_e})=>!_e));var X=M(te);const fe=w(()=>l(ce)),be=w(()=>l(he)?a()("locale_content_disabled_short"):l(re)?a()("locale_content_error_short"):""),ue=w(()=>c()?.mode==="edit"&&c().locale===l(Y)),Ee=w(()=>l(re)?"error":"");Ci(X,()=>l(k),(_e,Ae)=>{Ae(_e,{get variant(){return l(S)},get size(){return l(C)},get label(){return l(ce)},get"aria-label"(){return`${l(fe)??""} ${l(be)??""}`},get selected(){return l(ue)},get class(){return l(Ee)},onSelect:()=>{ot(e.thisPane,{mode:"edit",locale:l(Y)}),o()?.mode==="preview"&&ot(d(),{mode:"preview",locale:l(Y)})},startIcon:$e=>{var Ve=W(),We=M(Ve);{var ht=pe=>{et(pe,{name:"edit_off"})},Ge=pe=>{var ye=W(),we=M(ye);{var xe=Ne=>{et(Ne,{name:"error"})};U(we,Ne=>{l(re)&&Ne(xe)},!0)}T(pe,ye)};U(We,pe=>{l(he)?pe(ht):pe(Ge,!1)})}T($e,Ve)},$$slots:{startIcon:!0}})}),T(J,te)});var K=D(G,2);{var ee=J=>{var Y=W(),te=M(Y);const ce=w(()=>a()("preview")),he=w(()=>c()?.mode==="preview");Ci(te,()=>l(k),(re,X)=>{X(re,{get variant(){return l(S)},get size(){return l(C)},get label(){return l(ce)},get selected(){return l(he)},onSelect:()=>{ot(e.thisPane,{mode:"preview",locale:o()?.locale??""})}})}),T(J,Y)};U(K,J=>{o()?.mode==="edit"&&l(b)&&u()?.showPreview&&J(ee)})}T(H,V)},$$slots:{default:!0}})}),T(t,E),oe(),r()}var e7=F('<h3 role="none"> </h3>'),t7=F("<!> <!>",1),n7=F("<!> <!> <!>",1),r7=F("<!> <!> <!> <!>",1),i7=F("<!> <!>",1),s7=F("<!> <!> <!>",1),o7=F('<div role="none" class="header svelte-2uraod"><!></div>');const a7={hash:"svelte-2uraod",code:'.header.svelte-2uraod {flex:none !important;}.header.svelte-2uraod > [role="toolbar"] {margin-right:auto;margin-left:auto;max-width:800px;}.header.svelte-2uraod > [role="toolbar"] h3 {margin:0 8px;font-size:var(--sui-font-size-default);}'};function _1(t,e){se(e,!0),Te(t,a7);const[n,r]=ve(),i=()=>z(rt,"$entryDraft",n),s=()=>z(e.thisPane,"$thisPane",n),o=()=>z(le,"$_",n),a=()=>z(Tt,"$prefs",n),c=()=>z(In,"$backend",n);let u=P(e,"thatPane",19,()=>st(null));const d=w(()=>i()?.collection),f=w(()=>i()?.collectionFile),h=w(()=>i()?.originalEntry),p=w(()=>i()?.originalValues??{}),g=w(()=>(l(f)??l(d))?._i18n??Ri),m=w(()=>l(g).i18nEnabled),v=w(()=>l(g).saveAllLocales),_=w(()=>l(g).allLocales),b=w(()=>l(g).defaultLocale),y=w(()=>i()?.currentLocales[s()?.locale??""]),x=w(()=>Object.values(i()?.currentLocales??{}).filter(I=>I).length===1),k=w(()=>l(m)?l(_).filter(I=>I!==s()?.locale):[]),S=w(()=>!!l(k).length),C=w(()=>s()?.locale&&!zn(Zr(i()?.currentValues[s().locale]),l(p)[s().locale])),E=w(()=>l(d)&&l(h)&&s()?.locale?GC(l(h),s().locale,l(d),l(f)):void 0);var A=o7(),O=R(A);const L=w(()=>o()("secondary"));po(O,{variant:"secondary",get"aria-label"(){return l(L)},children:(I,N)=>{var j=s7(),H=M(j);{var B=J=>{QW(J,{get id(){return e.id},get thisPane(){return e.thisPane},get thatPane(){return u()}})},V=J=>{var Y=e7(),te=R(Y);q(ce=>Z(te,ce),[()=>s()?.mode==="preview"?o()("preview"):o()("edit")]),T(J,Y)};U(H,J=>{l(m)?J(B):J(V,!1)})}var G=D(H,2);Xr(G,{flex:!0});var K=D(G,2);{var ee=J=>{var Y=i7();const te=w(()=>$s(s().locale));var ce=M(Y);{var he=fe=>{n2(fe,{get locale(){return s().locale},get otherLocales(){return l(k)}})};U(ce,fe=>{l(S)&&fe(he)})}var re=D(ce,2);const X=w(()=>o()("show_content_options_x_locale",{values:{locale:l(te)}}));Nr(re,{variant:"ghost",iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return l(X)},popup:be=>{const ue=w(()=>o()("content_options_x_locale",{values:{locale:l(te)}}));wr(be,{get"aria-label"(){return l(ue)},children:(Ee,_e)=>{var Ae=r7(),Ce=M(Ae);{var $e=xe=>{xy(xe,{get locale(){return s().locale},get otherLocales(){return l(k)}})};U(Ce,xe=>{l(S)&&s()?.locale&&xe($e)})}var Ve=D(Ce,2);const We=w(()=>o()("revert_changes")),ht=w(()=>!l(C));Nt(Ve,{get label(){return l(We)},get disabled(){return l(ht)},onclick:()=>{yy(s()?.locale)}});var Ge=D(Ve,2);{var pe=xe=>{var Ne=t7(),me=M(Ne);Ar(me,{});var Pe=D(me,2);const qe=w(()=>o()(l(y)?"disable_x_locale":Zr(i()?.currentValues[s().locale])?"reenable_x_locale":"enable_x_locale",{values:{locale:l(te)}})),Xe=w(()=>s().locale===l(b)||l(y)&&l(x));Nt(Pe,{get label(){return l(qe)},get disabled(){return l(Xe)},onclick:()=>{WA(s()?.locale??"")}}),T(xe,Ne)};U(Ge,xe=>{!l(v)&&s()?.locale&&xe(pe)})}var ye=D(Ge,2);{var we=xe=>{var Ne=n7(),me=M(Ne);Ar(me,{});var Pe=D(me,2);{var qe=Ke=>{const nt=w(()=>o()("view_on_live_site"));Nt(Ke,{get label(){return l(nt)},onclick:()=>{window.open(l(E))}})};U(Pe,Ke=>{l(E)&&Ke(qe)})}var Xe=D(Pe,2);{var ct=Ke=>{const nt=w(()=>!c()?.repository?.blobBaseURL),dt=w(()=>o()("view_on_x",{values:{service:c()?.repository?.label},default:o()("view_in_repository")}));Nt(Ke,{get disabled(){return l(nt)},get label(){return l(dt)},onclick:()=>{l(h)&&s()&&window.open(GB(l(h),s().locale))}})};U(Xe,Ke=>{a().devModeEnabled&&Ke(ct)})}T(xe,Ne)};U(ye,xe=>{l(h)&&(l(E)||a().devModeEnabled)&&xe(we)})}T(Ee,Ae)},$$slots:{default:!0}})},$$slots:{popup:!0}}),T(J,Y)};U(K,J=>{s()?.mode==="edit"&&J(ee)})}T(I,j)},$$slots:{default:!0}}),q(()=>ke(A,"id",e.id)),T(t,A),oe(),r()}var l7=F('<div role="none" class="svelte-ypyuow"><h3 class="svelte-ypyuow"> </h3></div>'),c7=F('<section class="svelte-ypyuow"><!> <div role="none" class="svelte-ypyuow"><!> <p class="error svelte-ypyuow"><!> <!></p></div></section>'),u7=F('<!> <div role="none" class="locales svelte-ypyuow"></div>',1);const d7={hash:"svelte-ypyuow",code:"p.svelte-ypyuow:not(:empty) {margin-top:0;}.locales.svelte-ypyuow {display:table;margin:16px 0 0;width:100%;}.locales.svelte-ypyuow section:where(.svelte-ypyuow) {display:table-row;}.locales.svelte-ypyuow section:where(.svelte-ypyuow) div:where(.svelte-ypyuow) {display:table-cell;vertical-align:middle;white-space:nowrap;}.locales.svelte-ypyuow section:where(.svelte-ypyuow) div:where(.svelte-ypyuow):last-child {width:90%;}.locales.svelte-ypyuow section:where(.svelte-ypyuow) h3:where(.svelte-ypyuow) {margin-right:8px;font-size:inherit;}.locales.svelte-ypyuow section:where(.svelte-ypyuow) p.error:where(.svelte-ypyuow) {margin:0;color:var(--sui-error-foreground-color);font-size:var(--sui-font-size-small);}"};function f7(t,e){se(e,!0),Te(t,d7);const[n,r]=ve(),i=()=>z(rt,"$entryDraft",n),s=()=>z(le,"$_",n);let o=P(e,"open",15,!1);const a=w(()=>i()?.collectionName??""),c=w(()=>i()?.currentSlugs??{});let u=ae(ie([]));const d=ie({}),f=ie({}),h=Gn("short"),p=()=>{$(u,ie(rs(l(a)).map(_=>Object.values(_.locales).map(({slug:b})=>b)).flat(1).filter(_=>!Object.values(l(c)).includes(_)))),Object.assign(d,l(c)),Object.assign(f,Object.fromEntries(Object.keys(l(c)).map(_=>[_,!1])))};Be(()=>{o()&&p()});const g=w(()=>s()("edit_slug")),m=w(()=>s()("update")),v=w(()=>zn(l(c),d)||Object.values(f).some(_=>_!==!1));is(t,{get title(){return l(g)},get okLabel(){return l(m)},get okDisabled(){return l(v)},onOk:()=>{At(rt,Se(i).currentSlugs=d,Se(i))},get open(){return o()},set open(_){o(_)},children:(_,b)=>{var y=u7(),x=M(y);Hn(x,{status:"warning",children:(S,C)=>{var E=Ue();q(A=>Z(E,A),[()=>s()("edit_slug_warning")]),T(S,E)},$$slots:{default:!0}});var k=D(x,2);ft(k,21,()=>Object.keys(d),cr,(S,C)=>{var E=c7(),A=R(E);{var O=K=>{var ee=l7(),J=R(ee),Y=R(J);q(te=>Z(Y,te),[()=>$s(l(C))]),T(K,ee)};U(A,K=>{["_","_default"].includes(l(C))||K(O)})}var L=D(A,2),I=R(L);const N=w(()=>f[l(C)]!==!1);Pn(I,{flex:!0,oninput:()=>{f[l(C)]=d[l(C)].trim()?l(u).includes(d[l(C)])?"duplicate":!1:"empty"},get invalid(){return l(N)},get"aria-errormessage"(){return`${h??""}-${l(C)??""}-error`},get value(){return d[l(C)]},set value(K){d[l(C)]=K}});var j=D(I,2),H=R(j);{var B=K=>{var ee=Ue();q(J=>Z(ee,J),[()=>s()("edit_slug_error.empty")]),T(K,ee)};U(H,K=>{f[l(C)]==="empty"&&K(B)})}var V=D(H,2);{var G=K=>{var ee=Ue();q(J=>Z(ee,J),[()=>s()("edit_slug_error.duplicate")]),T(K,ee)};U(V,K=>{f[l(C)]==="duplicate"&&K(G)})}q(()=>ke(j,"id",`${h??""}-${l(C)??""}-error`)),T(S,E)}),T(_,y)},$$slots:{default:!0}}),oe(),r()}const r2=async(t,e)=>{const{_i18n:{defaultLocale:n},_thumbnailFieldNames:r}=t,{locales:i}=e,{content:s}=i[n]??Object.values(i)[0]??{};if(!s)return;const o=r.map(a=>{if(a.includes("*")){const c=new RegExp(`^${ln(a).replace("\\*",".+")}$`);return Object.keys(s).filter(u=>c.test(u))}return a}).flat(1);for(const a of o){const c=s[a]?await uc(s[a],e,{thumbnail:!0}):void 0;if(c)return c}},i2=({entry:t,collectionName:e,relative:n=!1})=>{const{locales:r}=t,i=Fi(e),s=Object.values(r).map(({content:o})=>Object.entries(o).map(([a,c])=>{if(typeof c=="string"&&(!n||!/^[/@]/.test(c))&&["image","file"].includes(_n({collectionName:e,keyPath:a})?.widget??"string")){const u=ty(c,{entry:t,collection:i});if(u&&ey(u).some(d=>d.name===e))return u}})).flat(1).filter((o,a,c)=>!!o&&c.indexOf(o)===a);if(n&&i?._assetFolder?.entryRelative){const o=Ln(Object.values(t.locales)[0].path).dirname;ne(en).forEach(a=>{Ln(a.path).dirname===o&&!s.find(({path:c})=>c===a.path)&&s.push(a)})}return s};var h7=F("<!> <!>",1),p7=F("<!> <!> <!> <!> <!>",1),g7=F('<!> <h2 role="none"><strong role="none"><!></strong></h2> <!> <!> <!> <!> <!>',1),m7=F('<div class="error svelte-1432d6m"> </div>'),v7=F(" <!>",1),b7=F("<!> <!> <!> <!> <!> <!>",1);const _7={hash:"svelte-1432d6m",code:".error.svelte-1432d6m {margin-top:8px;border-radius:var(--sui-control-medium-border-radius);padding:12px;background-color:var(--sui-secondary-background-color);font-size:var(--sui-font-size-default);line-height:1.5;}"};function y7(t,e){se(e,!0),Te(t,_7);const[n,r]=ve(),i=()=>z(rt,"$entryDraft",n),s=()=>z(wt,"$siteConfig",n),o=()=>z(zs,"$backendName",n),a=()=>z(mA,"$entryDraftModified",n),c=()=>z(Tt,"$prefs",n),u=()=>z(le,"$_",n),d=()=>z(Ei,"$entryEditorSettings",n),f=()=>z(Dv,"$copyFromLocaleToast",n);let h=P(e,"disabled",3,!1),p=ae(!1),g=ae(!1),m=ae(!1),v=ae(!1),_=ae(""),b=ae(!1),y=ae(void 0);const x=w(()=>i()?.isNew??!0),k=w(()=>i()?.collection),S=w(()=>i()?.collectionFile),C=w(()=>i()?.originalEntry),E=w(()=>s()?.editor?.preview??!0),A=w(()=>s()?.backend.automatic_deployments),O=w(()=>o()!=="local"&&typeof l(A)=="boolean"),L=w(()=>(l(S)??l(k))?._i18n??Ri),I=w(()=>l(L).defaultLocale),N=w(()=>l(k)?.name),j=w(()=>l(k)?.label||l(N)),H=w(()=>l(k)?.label_singular||l(j)),B=w(()=>(l(S)??l(k))?.editor?.preview??l(E)),V=w(()=>l(x)||a()),G=w(()=>Object.values(i()?.validities??{}).map(Ae=>Object.values(Ae).map(({valid:Ce})=>!Ce)).flat(1).filter(Boolean).length),K=w(()=>l(N)&&l(C)&&l(k)?._assetFolder?.entryRelative?i2({entry:l(C),collectionName:l(N),relative:!0}):[]),ee=w(()=>l(k)&&l(C)?GC(l(C),l(I),l(k),l(S)):void 0),J=async({skipCI:Ae=void 0}={})=>{if($(b,!0),!!l(k))try{const Ce=await U8({skipCI:Ae});c()?.closeOnSave??!0?(Ul(`/collections/${l(N)}`),ot(rt,null)):(l(x)&&Un(`/collections/${l(N)}/entries/${Ce.subPath}`,{replaceState:!0,notifyChange:!1}),gu({collection:l(k),collectionFile:l(S),originalEntry:Ce,expanderStates:i()?.expanderStates}))}catch(Ce){Ce.message==="validation_failed"?$(p,!0):Ce.message==="saving_failed"?($(v,!0),$(_,ie(Ce.cause?.message??Ce.message??u()("unexpected_error")))):($(v,!0),$(_,""),console.error(Ce))}finally{$(b,!1)}};var Y=b7(),te=M(Y);const ce=w(()=>u()("primary"));po(te,{variant:"primary",get"aria-label"(){return l(ce)},children:(Ae,Ce)=>{var $e=g7(),Ve=M($e);const We=w(()=>u()("cancel_editing"));Ze(Ve,{variant:"ghost",iconic:!0,get"aria-label"(){return l(We)},keyShortcuts:"Escape",onclick:()=>{Ul(`/collections/${l(N)}`)},startIcon:bt=>{et(bt,{name:"arrow_back_ios_new"})},$$slots:{startIcon:!0}});var ht=D(Ve,2),Ge=R(ht),pe=R(Ge);{var ye=ut=>{var bt=Ue();q(Ct=>Z(bt,Ct),[()=>u()("creating_x",{values:{name:l(H)}})]),T(ut,bt)},we=ut=>{var bt=Ue();q(Ct=>Z(bt,Ct),[()=>u()("editing_x_in_x",{values:{collection:l(j),entry:l(S)?l(S).label||l(S).name:l(k)&&l(C)?qo(l(k),l(C)):""}})]),T(ut,bt)};U(pe,ut=>{l(x)?ut(ye):ut(we,!1)})}var xe=D(ht,2);Xr(xe,{flex:!0});var Ne=D(xe,2);{var me=ut=>{const bt=w(()=>u()("view_on_live_site"));Ze(ut,{variant:"tertiary",get label(){return l(bt)},onclick:()=>{window.open(l(ee))}})};U(Ne,ut=>{!h()&&l(ee)&&ut(me)})}var Pe=D(Ne,2);{var qe=ut=>{var bt=h7(),Ct=M(bt);const sn=w(()=>u()("duplicate")),Rn=w(()=>u()("duplicate_entry")),Xn=w(()=>l(k)?.create===!1);Ze(Ct,{variant:"ghost",get label(){return l(sn)},get"aria-label"(){return l(Rn)},get disabled(){return l(Xn)},onclick:()=>{Un(`/collections/${l(N)}/new`,{replaceState:!0,notifyChange:!1}),T8()}});var kr=D(Ct,2);const zi=w(()=>u()("delete")),mi=w(()=>u()("delete_entry")),Lt=w(()=>l(k)?.delete===!1);Ze(kr,{variant:"ghost",get label(){return l(zi)},get"aria-label"(){return l(mi)},get disabled(){return l(Lt)},onclick:()=>{$(m,!0)}}),T(ut,bt)};U(Pe,ut=>{!h()&&!l(S)&&!l(x)&&ut(qe)})}var Xe=D(Pe,2);const ct=w(()=>u()("show_editor_options"));$t(Nr(Xe,{get disabled(){return h()},variant:"ghost",iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return l(ct)},popup:bt=>{const Ct=w(()=>u()("editor_options"));wr(bt,{get"aria-label"(){return l(Ct)},children:(sn,Rn)=>{var Xn=p7(),kr=M(Xn);const zi=w(()=>u()("show_preview")),mi=w(()=>d()?.showPreview),Lt=w(()=>!l(B));eh(kr,{get label(){return l(zi)},get checked(){return l(mi)},get disabled(){return l(Lt)},onChange:()=>{Ei.update((er={})=>({...er,showPreview:!er.showPreview}))}});var yn=D(kr,2);const Gt=w(()=>u()("sync_scrolling")),yt=w(()=>d()?.syncScrolling),Xt=w(()=>!l(B)&&Object.keys(i()?.currentValues??{}).length===1);eh(yn,{get label(){return l(Gt)},get checked(){return l(yt)},get disabled(){return l(Xt)},onChange:()=>{Ei.update((er={})=>({...er,syncScrolling:!er.syncScrolling}))}});var $n=D(yn,2);Ar($n,{});var wn=D($n,2);const qt=w(()=>u()("edit_slug")),Yt=w(()=>!!l(S)||l(x)||l(k)?.delete===!1);Nt(wn,{get label(){return l(qt)},get disabled(){return l(Yt)},onclick:()=>{$(g,!0)}});var fn=D(wn,2);const Dn=w(()=>u()("revert_all_changes")),Qn=w(()=>!l(V));Nt(fn,{get label(){return l(Dn)},get disabled(){return l(Qn)},onclick:()=>{yy()}}),T(sn,Xn)},$$slots:{default:!0}})},$$slots:{popup:!0}}),bt=>$(y,ie(bt)),()=>l(y));var Ke=D(Xe,2);{var nt=ut=>{const bt=w(()=>u()(l(b)?"saving":"save")),Ct=w(()=>h()||!l(V)||l(b));uL(ut,{variant:"primary",get label(){return l(bt)},get disabled(){return l(Ct)},keyShortcuts:"Accel+S",onclick:()=>{J()},popup:Rn=>{wr(Rn,{children:(Xn,kr)=>{const zi=w(()=>u()(l(A)?"save_without_publishing":"save_and_publish"));Nt(Xn,{get label(){return l(zi)},onclick:()=>{J({skipCI:l(A)})}})},$$slots:{default:!0}})},$$slots:{popup:!0}})},dt=ut=>{const bt=w(()=>u()(l(b)?"saving":"save")),Ct=w(()=>h()||!l(V)||l(b));Ze(ut,{variant:"primary",get label(){return l(bt)},get disabled(){return l(Ct)},keyShortcuts:"Accel+S",onclick:()=>{J()}})};U(Ke,ut=>{l(O)?ut(nt):ut(dt,!1)})}T(Ae,$e)},$$slots:{default:!0}});var he=D(te,2);Yn(he,{get show(){return l(p)},set show(Ae){$(p,ie(Ae))},children:(Ae,Ce)=>{Hn(Ae,{status:"error",children:($e,Ve)=>{var We=Ue();q(ht=>Z(We,ht),[()=>u()(l(G)===1?"entry_validation_error":"entry_validation_errors",{values:{count:l(G)}})]),T($e,We)},$$slots:{default:!0}})},$$slots:{default:!0}});var re=D(he,2);Yn(re,{get id(){return f().id},get show(){return f().show},set show(Ae){At(Dv,Se(f).show=Ae,Se(f))},children:(Ae,Ce)=>{const $e=w(()=>{const{status:Ve,message:We,count:ht,sourceLocale:Ge}=f();return{status:Ve,message:We,count:ht,sourceLocale:Ge}});Hn(Ae,{get status(){return l($e).status},children:(Ve,We)=>{var ht=Ue();q(Ge=>Z(ht,Ge),[()=>u()(`editor.${l($e).message}`,{values:{count:l($e).count,source:l($e).sourceLocale?$s(l($e).sourceLocale):""}})]),T(Ve,ht)},$$slots:{default:!0}})},$$slots:{default:!0}});var X=D(re,2);f7(X,{get open(){return l(g)},set open(Ae){$(g,ie(Ae))}});var fe=D(X,2);const be=w(()=>u()("delete_entry")),ue=w(()=>u()("delete"));xc(fe,{get title(){return l(be)},get okLabel(){return l(ue)},onOk:async()=>{l(C)&&await xA([l(C).id],l(K).map(({path:Ae})=>Ae)),Ul(`/collections/${l(N)}`)},onClose:()=>{l(y).focus()},get open(){return l(m)},set open(Ae){$(m,ie(Ae))},children:(Ae,Ce)=>{var $e=Ue();q(Ve=>Z($e,Ve),[()=>u()(l(K).length?"confirm_deleting_this_entry_with_assets":"confirm_deleting_this_entry")]),T(Ae,$e)},$$slots:{default:!0}});var Ee=D(fe,2);const _e=w(()=>u()("saving_entry.error.title"));Hk(Ee,{get title(){return l(_e)},onClose:()=>{l(y).focus()},get open(){return l(v)},set open(Ae){$(v,ie(Ae))},children:(Ae,Ce)=>{var $e=v7(),Ve=M($e),We=D(Ve);{var ht=Ge=>{var pe=m7(),ye=R(pe);q(()=>Z(ye,l(_))),T(Ge,pe)};U(We,Ge=>{l(_)&&Ge(ht)})}q(Ge=>Z(Ve,`${Ge??""} `),[()=>u()("saving_entry.error.description")]),T(Ae,$e)},$$slots:{default:!0}}),T(t,Y),oe(),r()}var w7=F('<div role="none"><!></div> <div role="none"><!></div>',1),x7=F("<!> <!>",1),k7=F("<!> <!>",1),S7=F("<!> <!>",1),E7=F('<div role="none" class="cols svelte-1pb3yei"><!></div>'),T7=F("<!> <!>",1),C7=F('<div role="none" class="wrapper svelte-1pb3yei"><!></div> <!> <!>',1);const A7={hash:"svelte-1pb3yei",code:'.wrapper.svelte-1pb3yei {display:contents;}.wrapper[hidden].svelte-1pb3yei {display:none;}.wrapper.svelte-1pb3yei > .sui.group {position:absolute;inset:0;z-index:100;display:flex;flex-direction:column;background-color:var(--sui-secondary-background-color);transition:filter 250ms;}.wrapper[inert].svelte-1pb3yei > .sui.group {filter:opacity(0);}.wrapper.svelte-1pb3yei .cols:where(.svelte-1pb3yei) {flex:auto;overflow:hidden;display:flex;gap:4px;background-color:var(--sui-secondary-background-color);}.wrapper.svelte-1pb3yei .cols:where(.svelte-1pb3yei) > div {display:flex;flex-direction:column;min-width:480px;background-color:var(--sui-primary-background-color);transition:all 500ms;}.wrapper.svelte-1pb3yei .cols:where(.svelte-1pb3yei) > [data-mode="edit"] {flex:1 1;}.wrapper.svelte-1pb3yei .cols:where(.svelte-1pb3yei) > [data-mode="preview"] {flex:2 1;}'};function P7(t,e){se(e,!0),Te(t,A7);const[n,r]=ve(),i=()=>z(wt,"$siteConfig",n),s=()=>z(rt,"$entryDraft",n),o=()=>z(Ei,"$entryEditorSettings",n),a=()=>z(ra,"$editorLeftPane",n),c=()=>z(_o,"$editorRightPane",n),u=()=>z(tl,"$showContentOverlay",n),d=()=>z(le,"$_",n),f=()=>z(Rv,"$showDuplicateToast",n);let h,p=!1,g=ae(!1),m=ae(!0),v=ae(void 0),_=ae(void 0),b=ae(void 0);const y=w(()=>i()?.editor?.preview??!0),x=w(()=>s()?.isNew??!0),k=w(()=>s()?.collection),S=w(()=>s()?.collectionFile),C=w(()=>s()?.originalEntry),E=w(()=>l(C)?.id??[l(k)?.name??"-",l(S)?.name??"-"].join("/")),A=w(()=>o()??{}),O=w(()=>l(A).showPreview),L=w(()=>(l(S)??l(k))?._i18n??Ri),I=w(()=>l(L).i18nEnabled),N=w(()=>l(L).allLocales),j=w(()=>l(L).defaultLocale),H=w(()=>(l(S)??l(k))?.editor?.preview??l(y)),B=w(()=>l(S)?.name?[l(k)?.name,l(S).name].join("|"):l(k)?.name),V=w(()=>l(k)?.create??!1),G=w(()=>l(k)?.limit??1/0),K=w(()=>l(x)&&(!l(V)||rs(l(k)?.name??"").length>=l(G))),ee=async()=>{const[ue,Ee]=o()?.paneStates?.[l(B)??""]??[];return p||!ue||!Ee||ue.locale&&!l(N).includes(ue.locale)||Ee.locale&&!l(N).includes(Ee.locale)||(!l(O)||!l(H))&&(ue.mode==="preview"||Ee.mode==="preview")?!1:(p=!0,await $l(),ot(ra,ue),ot(_o,Ee),await $l(),p=!1,!0)},J=async()=>{if(s()&&!await ee())if(ot(ra,{mode:"edit",locale:a()?.locale??l(j)}),!l(O)||!l(H)){const ue=l(I)?l(N).filter(Ee=>Ee!==a()?.locale):[];ot(_o,ue.length?{mode:"edit",locale:ue[0]}:null)}else ot(_o,{mode:"preview",locale:a().locale})},Y=()=>{!l(k)||p||!a()||!c()||!l(B)||Ei.update((ue={})=>({...ue,paneStates:{...ue.paneStates??{},[l(B)]:[a(),c()]}}))},te=async()=>{await $l(),h&&(h.tabIndex=0,h.focus())};cn(()=>{h=l(v)?.querySelector('[role="group"]'),h.addEventListener("transitionend",()=>{u()||($(g,!1),$(m,!0),ot(rt,null))})}),Be(()=>{l(B)&&(ot(ra,null),ot(_o,null))}),Be(()=>{l(O),l(H),J()}),Be(()=>{a(),c(),Y()}),Be(()=>{l(v)&&(u()?l(m)&&($(g,!1),$(m,!1),J(),te(),O8()):($(g,!0),P8()))});var ce=C7(),he=M(ce),re=R(he);const X=w(()=>d()("content_editor"));_r(re,{class:"content-editor",get"aria-label"(){return l(X)},children:(ue,Ee)=>{var _e=W(),Ae=M(_e);As(Ae,()=>l(E),Ce=>{var $e=T7(),Ve=M($e);y7(Ve,{get disabled(){return l(K)}});var We=D(Ve,2);{var ht=pe=>{Tr(pe,{children:(ye,we)=>{var xe=w7(),Ne=M(xe),me=R(Ne);{var Pe=Ke=>{var nt=Ue();q(dt=>Z(nt,dt),[()=>d()("creating_entries_disabled_by_admin")]),T(Ke,nt)},qe=Ke=>{var nt=Ue();q(dt=>Z(nt,dt),[()=>d()("creating_entries_disabled_by_limit",{values:{limit:l(G)}})]),T(Ke,nt)};U(me,Ke=>{l(V)?Ke(qe,!1):Ke(Pe)})}var Xe=D(Ne,2),ct=R(Xe);Ze(ct,{variant:"primary",onclick:()=>{Un(`/collection/${l(k)?.name}`,{replaceState:!0})},children:(Ke,nt)=>{var dt=Ue();q(ut=>Z(dt,ut),[()=>d()("back_to_collection")]),T(Ke,dt)},$$slots:{default:!0}}),T(ye,xe)},$$slots:{default:!0}})},Ge=pe=>{var ye=E7(),we=R(ye);{var xe=Ne=>{var me=S7(),Pe=M(me);{var qe=Ke=>{const nt=w(()=>{const{locale:ut,mode:bt}=a();return{locale:ut,mode:bt}}),dt=w(()=>d()(l(nt).mode==="edit"?"edit_x_locale":"preview_x_locale",{values:{locale:$s(l(nt).locale)}}));_r(Ke,{class:"pane",get"aria-label"(){return l(dt)},get"data-locale"(){return l(nt).locale},get"data-mode"(){return l(nt).mode},children:(ut,bt)=>{var Ct=x7(),sn=M(Ct);_1(sn,{id:"left-pane-header",thisPane:ra,thatPane:_o});var Rn=D(sn,2);b1(Rn,{id:"left-pane-body",thisPane:ra,get thatPaneContentArea(){return l(b)},get thisPaneContentArea(){return l(_)},set thisPaneContentArea(Xn){$(_,ie(Xn))}}),T(ut,Ct)},$$slots:{default:!0}})};U(Pe,Ke=>{a()&&Ke(qe)})}var Xe=D(Pe,2);{var ct=Ke=>{const nt=w(()=>{const{locale:ut,mode:bt}=c();return{locale:ut,mode:bt}}),dt=w(()=>d()(l(nt).mode==="edit"?"edit_x_locale":"preview_x_locale",{values:{locale:$s(l(nt).locale)}}));_r(Ke,{get"aria-label"(){return l(dt)},get"data-locale"(){return l(nt).locale},get"data-mode"(){return l(nt).mode},children:(ut,bt)=>{var Ct=k7(),sn=M(Ct);_1(sn,{id:"right-pane-header",thisPane:_o,thatPane:ra});var Rn=D(sn,2);b1(Rn,{id:"right-pane-body",thisPane:_o,get thatPaneContentArea(){return l(_)},get thisPaneContentArea(){return l(b)},set thisPaneContentArea(Xn){$(b,ie(Xn))}}),T(ut,Ct)},$$slots:{default:!0}})};U(Xe,Ke=>{c()&&Ke(ct)})}T(Ne,me)};U(we,Ne=>{l(k)&&Ne(xe)})}T(pe,ye)};U(We,pe=>{l(K)?pe(ht):pe(Ge,!1)})}T(Ce,$e)}),T(ue,_e)},$$slots:{default:!0}}),$t(he,ue=>$(v,ue),()=>l(v));var fe=D(he,2);w6(fe,{});var be=D(fe,2);Yn(be,{get show(){return uk(),f()},set show(ue){ot(Rv,ue)},children:(ue,Ee)=>{Hn(ue,{status:"success",children:(_e,Ae)=>{var Ce=Ue();q($e=>Z(Ce,$e),[()=>d()("entry_duplicated")]),T(_e,Ce)},$$slots:{default:!0}})},$$slots:{default:!0}}),q(()=>{he.hidden=l(m),he.inert=!u(),pt(he,"hiding",l(g))}),T(t,ce),oe(),r()}const O7=["title","name","date","author","description"],li=st({type:"list"}),y1=t=>t.replace(/[_*`]+/g,""),$7=(t,e,{key:n,order:r}={})=>{const i=[...t],{name:s,_i18n:{defaultLocale:o}}=e;if(n===void 0){const f={useTemplate:!0,allowMarkdown:!0};return i.sort((h,p)=>qo(e,h,f).localeCompare(qo(e,p,f)))}const a={slug:String,commit_author:String,commit_date:Date}[n]||(i.length?lc({entry:i[0],locale:o,collectionName:s,key:n})?.constructor:String)||String,c=Object.fromEntries(i.map(f=>[f.slug,lc({entry:f,locale:o,collectionName:s,key:n})])),u=_n({collectionName:s,keyPath:n}),d=u?.widget==="datetime"?u:void 0;return i.sort((f,h)=>{const p=c[f.slug],g=c[h.slug];if(p===void 0||g===void 0)return 0;if(d){const m=ac(p,d),v=ac(g,d);if(m&&v)return Number(m)-Number(v)}return a===String?ui(y1(p),y1(g)):a===Date?Number(p)-Number(g):p-g}),r==="descending"&&i.reverse(),i},L7=(t,e,n)=>{const{name:r,view_filters:i=[],_i18n:{defaultLocale:s}}=e,o=n.filter(({field:a,pattern:c})=>a!==void 0&&c!==void 0&&i.some(u=>u.field===a&&u.pattern===c));return t.filter(a=>o.every(({field:c,pattern:u})=>{const d={entry:a,locale:s,collectionName:r,key:c},f=lc({...d,resolveRef:!1}),h=lc({...d}),p=typeof u=="string"?new RegExp(u):void 0;return f===void 0||h===void 0?!1:p?p.test(String(f))||p.test(String(h)):f===u||h===u}))},N7=(t,e,{field:n,pattern:r}={field:"",pattern:void 0})=>{if(!n)return t.length?[{name:"*",entries:t}]:[];const{name:i,_i18n:{defaultLocale:s}}=e,o=ne(li).sort,a=typeof r=="string"?new RegExp(r):void 0,c={},u=ne(le)("other");t.forEach(f=>{const h=lc({entry:f,locale:s,collectionName:i,key:n});if(h===void 0)return;const p=a?String(h).match(a)?.[0]??u:String(h);p in c||(c[p]=[]),c[p].push(f)});const d=Object.entries(c).map(([f,h])=>({name:f,entries:h})).sort(({name:f},{name:h})=>ui(f,h));return o?.key===n&&o.order==="descending"&&d.reverse(),d},Al=st(),I7=t=>{const{name:e,identifier_field:n,sortable_fields:r}=t;let i=[],s,o;if(r){if(Array.isArray(r)&&(i=r),Jn(r)){const a=r;Array.isArray(a.fields)&&(i=a.fields),a.default&&Jn(a.default)&&(s=a.default.field,o=["descending","Descending"].includes(a.default.direction??"")?"descending":"ascending")}}else i=[...O7],n&&(i.unshift(n),s=n);return i=rc(i).filter(a=>!!_n({collectionName:e,keyPath:a})),{fields:i,default:{key:s??i[0],order:o??"ascending"}}},R7=(t,e)=>["name","commit_author","commit_date"].includes(e)?ne(le)(`sort_keys.${e}`):e.includes(".")?e.split(".").map((n,r,i)=>{if(/^\d+$/.test(n))return;const s=i.slice(0,r+1).join(".");return _n({collectionName:t.name,keyPath:s})?.label||n}).filter(Boolean).join(" – "):t.fields?.find(({name:n})=>n===e)?.label||e,D7=ur([Vn,ii,Nn],([t,e],n)=>{if(!t?.folder){n([]);return}const r=t,{fields:i,default:s}=I7(r),o=ne(Al)?.[r.name]??{type:"list"};o.sort??=s,e.every(a=>!!a.commitAuthor)&&!i.includes("author")&&i.push("commit_author"),e.every(a=>!!a.commitDate)&&!i.includes("date")&&i.push("commit_date"),n(i.map(a=>({key:a,label:R7(r,a)}))),zn(o,ne(li))||li.set(o)}),Qo=ur([ii,Vn],([t,e],n)=>{n(t&&e?rs(e.name):[])}),Sy=ur([Qo,li],([t,e],n)=>{const r=ne(Vn);let i=[...t];if(!i.length||Zo(r,i[0]).length)n([]);else{i=$7(i,r,e.sort),e.filters&&(i=L7(i,r,e.filters));const s=N7(i,r,e.group);zn(ne(Sy),s)||n(s)}}),M7=async({repository:t})=>{const{databaseName:e}=t??{},n=e?new jo(e,"ui-settings"):null,r="contents-view";Al.set(await n?.get(r)??{}),Al.subscribe(i=>{(async()=>{try{zn(i,await n?.get(r))||await n?.set(r,i)}catch{}})()}),li.subscribe(i=>{const{name:s}=ne(Vn)??{},o=ne(Al)?.[s??""]??{};s&&!zn(i,o)&&Al.update(a=>({...a,[s]:i}))})};In.subscribe(t=>{t&&!ne(Al)&&M7(t)});Qo.subscribe(t=>{cc.set([]),ne(Tt).devModeEnabled&&console.info("listedEntries",t)});Vn.subscribe(t=>{t&&ne(Tt).devModeEnabled&&console.info("selectedCollection",t)});var F7=F('<span role="none"><!></span>'),z7=F("<!> <!> <!>",1);function j7(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(Qo,"$listedEntries",n),s=()=>z(cc,"$selectedEntries",n),o=c=>{cc.update(u=>{const d=u.indexOf(e.entry);return c&&d===-1&&u.push(e.entry),!c&&d>-1&&u.splice(d,1),u})},a=w(()=>i().indexOf(e.entry));fd(t,{get"aria-rowindex"(){return l(a)},onChange:c=>{o(c.detail.selected)},onclick:()=>{Un(`/collections/${e.collection.name}/entries/${e.entry.subPath}`)},children:(c,u)=>{var d=z7(),f=M(d);di(f,{class:"checkbox",children:(m,v)=>{const _=w(()=>s().includes(e.entry));dd(m,{role:"none",tabindex:"-1",get checked(){return l(_)},onChange:({detail:{checked:b}})=>{o(b)}})},$$slots:{default:!0}});var h=D(f,2);{var p=m=>{di(m,{class:"image",children:(v,_)=>{var b=W(),y=M(b);yr(y,()=>r2(e.collection,e.entry),null,(x,k)=>{var S=W(),C=M(S);{var E=A=>{const O=w(()=>e.viewType==="list"?"icon":"tile");vy(A,{get src(){return l(k)},get variant(){return l(O)},cover:!0})};U(C,A=>{l(k)&&A(E)})}T(x,S)}),T(v,b)},$$slots:{default:!0}})};U(h,m=>{e.collection._thumbnailFieldNames.length&&m(p)})}var g=D(h,2);di(g,{class:"title",children:(m,v)=>{var _=F7(),b=R(_);br(b,()=>qo(e.collection,e.entry,{useTemplate:!0,allowMarkdown:!0})),T(m,_)},$$slots:{default:!0}}),T(c,d)},$$slots:{default:!0}}),oe(),r()}var U7=F('<span role="none"> </span>'),B7=F('<span role="none"> </span> <!>',1),q7=F('<span role="none"> </span>');function H7(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(Vn,"$selectedCollection",n),s=()=>z(li,"$currentView",n),o=()=>z(Sy,"$entryGroups",n),a=()=>z(le,"$_",n),c=()=>z(Qo,"$listedEntries",n),u=w(i),d=w(()=>s().type),f=w(()=>o().map(({entries:p})=>p).flat(1)),h=w(()=>l(u)?.files?a()("file_list"):a()("entry_list"));by(t,{get"aria-label"(){return l(h)},children:(p,g)=>{var m=W(),v=M(m);{var _=y=>{var x=W(),k=M(x);{var S=E=>{const A=w(()=>{const{defaultLocale:L}=l(u)._i18n;return{defaultLocale:L}}),O=w(()=>a()("entries"));od(E,{get viewType(){return l(d)},id:"entry-list",get"aria-label"(){return l(O)},get"aria-rowcount"(){return c().length},children:(L,I)=>{var N=W(),j=M(N);ft(j,1,o,({name:H,entries:B})=>H,(H,B)=>{let V=()=>l(B).name,G=()=>l(B).entries;const K=w(()=>V()!=="*"?V():void 0);Vk(H,{get label(){return l(K)},children:(ee,J)=>{const Y=w(()=>G().filter(({locales:te})=>!!(te[l(A).defaultLocale]??Object.values(te)[0])?.content));Ua(ee,{get items(){return l(Y)},itemKey:"id",renderItem:(ce,he=Fe)=>{j7(ce,{get collection(){return l(u)},get entry(){return he()},get viewType(){return l(d)}})},$$slots:{renderItem:!0}})},$$slots:{default:!0}})}),T(L,N)},$$slots:{default:!0}})},C=E=>{var A=W(),O=M(A);{var L=N=>{Tr(N,{children:(j,H)=>{var B=U7(),V=R(B);q(G=>Z(V,G),[()=>a()("no_entries_found")]),T(j,B)},$$slots:{default:!0}})},I=N=>{Tr(N,{children:(j,H)=>{var B=B7(),V=M(B),G=R(V),K=D(V,2);const ee=w(()=>!l(u).create),J=w(()=>a()("create_new_entry"));Ze(K,{variant:"primary",get disabled(){return l(ee)},get label(){return l(J)},onclick:()=>{Un(`/collections/${l(u).name}/new`)},startIcon:te=>{et(te,{name:"edit"})},$$slots:{startIcon:!0}}),q(Y=>Z(G,Y),[()=>a()("no_entries_created")]),T(j,B)},$$slots:{default:!0}})};U(O,N=>{c().length?N(L):N(I,!1)},!0)}T(E,A)};U(k,E=>{l(f).length?E(S):E(C,!1)})}T(y,x)},b=y=>{Tr(y,{children:(x,k)=>{var S=q7(),C=R(S);q(E=>Z(C,E),[()=>a()("collection_not_found")]),T(x,S)},$$slots:{default:!0}})};U(v,y=>{l(u)?y(_):y(b,!1)})}T(p,m)},$$slots:{default:!0}}),oe(),r()}var V7=F('<span role="none"> </span>');function W7(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(le,"$_",n),s=()=>z(Vn,"$selectedCollection",n),o=w(()=>i()("file_list"));by(t,{get"aria-label"(){return l(o)},children:(a,c)=>{var u=W(),d=M(u);{var f=p=>{const g=w(()=>i()("files"));od(p,{viewType:"list",get"aria-label"(){return l(g)},get"aria-rowcount"(){return s().files.length},children:(m,v)=>{Ua(m,{get items(){return s().files},itemKey:"name",renderItem:(b,y)=>{let x=()=>y?.().name,k=()=>y?.().label;fd(b,{onclick:()=>{Un(`/collections/${s().name}/entries/${x()}`)},children:(S,C)=>{di(S,{class:"title",children:(E,A)=>{var O=Ue();q(()=>Z(O,k()||x())),T(E,O)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{renderItem:!0}})},$$slots:{default:!0}})},h=p=>{Tr(p,{children:(g,m)=>{var v=V7(),_=R(v);q(b=>Z(_,b),[()=>i()("no_files_in_collection")]),T(g,v)},$$slots:{default:!0}})};U(d,p=>{s()?.files?.length?p(f):p(h,!1)})}T(a,u)},$$slots:{default:!0}}),oe(),r()}var G7=F('<span class="count"> </span>'),K7=F('<div role="none" class="primary-sidebar"><!></div>');function Y7(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(Nn,"$appLocale",n),s=()=>z(wt,"$siteConfig",n),o=()=>z(le,"$_",n),a=()=>z(Vn,"$selectedCollection",n),c=()=>z(ii,"$allEntries",n),u=w(()=>Intl.NumberFormat(i()??void 0)),d=w(()=>s()?.collections.filter(({hide:g})=>!g)??[]);var f=K7(),h=R(f);const p=w(()=>o()("collections"));hd(h,{get"aria-label"(){return l(p)},"aria-controls":"collection-container",children:(g,m)=>{var v=W(),_=M(v);ft(_,17,()=>l(d),({name:b,label:y,icon:x,files:k,divider:S=!1})=>b,(b,y)=>{let x=()=>l(y).name,k=()=>l(y).label,S=()=>l(y).icon,C=()=>l(y).files,E=Ye(()=>it(l(y).divider,!1));var A=W(),O=M(A);{var L=N=>{Ar(N,{})},I=N=>{const j=w(()=>k()||x()),H=w(()=>a()?.name===x());mr(N,{get label(){return l(j)},get selected(){return l(H)},onSelect:()=>{Un(`/collections/${x()}`)},startIcon:G=>{const K=w(()=>S()||"edit_note");et(G,{get name(){return l(K)}})},endIcon:G=>{var K=W(),ee=M(K);As(ee,c,J=>{var Y=W(),te=M(Y);yr(te,()=>vn(0),null,ce=>{var he=G7();const re=w(()=>(C()??rs(x())).length);var X=R(he);q((fe,be)=>{ke(he,"aria-label",`(${fe??""})`),Z(X,be)},[()=>o()(l(re)>1?"many_entries":l(re)===1?"one_entry":"no_entries",{values:{count:l(re)}}),()=>l(u).format(l(re))]),T(ce,he)}),T(J,Y)}),T(G,K)},$$slots:{startIcon:!0,endIcon:!0}})};U(O,N=>{l(E)?N(L):N(I,!1)})}T(b,A)}),T(g,v)},$$slots:{default:!0}}),T(t,f),oe(),r()}function J7(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(cc,"$selectedEntries",n),s=()=>z(Vn,"$selectedCollection",n),o=()=>z(le,"$_",n),a=()=>z(Qo,"$listedEntries",n);let c=P(e,"open",15,!1);const u=w(()=>{if(i().length&&s()?._assetFolder?.entryRelative){const h=s().name;return i().map(p=>i2({entry:p,collectionName:h,relative:!0})).flat(1)}return[]}),d=w(()=>i().length===1?o()("delete_entry"):o()("delete_entries")),f=w(()=>o()("delete"));xc(t,{get title(){return l(d)},get okLabel(){return l(f)},onOk:()=>{xA(i().map(({id:h})=>h),l(u).map(({path:h})=>h))},get open(){return c()},set open(h){c(h)},children:(h,p)=>{var g=W(),m=M(g);{var v=b=>{var y=Ue();q(x=>Z(y,x),[()=>o()(l(u).length?"confirm_deleting_selected_entry_with_assets":"confirm_deleting_selected_entry")]),T(b,y)},_=b=>{var y=W(),x=M(y);{var k=C=>{var E=Ue();q(A=>Z(E,A),[()=>o()(l(u).length?"confirm_deleting_all_entries_with_assets":"confirm_deleting_all_entries")]),T(C,E)},S=C=>{var E=Ue();q(A=>Z(E,A),[()=>o()(l(u).length?"confirm_deleting_selected_entries_with_assets":"confirm_deleting_selected_entries",{values:{count:i().length}})]),T(C,E)};U(x,C=>{i().length===a().length?C(k):C(S,!1)},!0)}T(b,y)};U(m,b=>{i().length===1?b(v):b(_,!1)})}T(h,g)},$$slots:{default:!0}}),oe(),r()}var Z7=F("<!> <!>",1),X7=F('<h2 role="none"> </h2> <div role="none" class="description svelte-1koahme"><!></div> <!> <!>',1),Q7=F('<svelte-css-wrapper style="display: contents"><!></svelte-css-wrapper>',1),eG=F("<!> <!>",1),tG=F("<!> <!>",1);const nG={hash:"svelte-1koahme",code:".description.svelte-1koahme {flex:auto;font-size:var(--sui-font-size-small);opacity:0.8;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}"};function rG(t,e){se(e,!0),Te(t,nG);const[n,r]=ve(),i=()=>z(Vn,"$selectedCollection",n),s=()=>z(Qo,"$listedEntries",n),o=()=>z(le,"$_",n),a=()=>z(cc,"$selectedEntries",n);let c=ae(!1);const u=C=>fi.sanitize(Ot.parseInline(C),{ALLOWED_TAGS:["strong","em","del","code","a"],ALLOWED_ATTR:["href"]}),d=w(()=>i()?.name),f=w(()=>i()?.label),h=w(()=>i()?.description),p=w(()=>i()?._type==="entry"),g=w(()=>i()?.create??!1),m=w(()=>i()?.delete??!0),v=w(()=>i()?.limit??1/0),_=w(()=>l(p)&&(!l(g)||s().length>=l(v))),b=w(()=>l(f)||l(d)||"");var y=tG(),x=M(y);{var k=C=>{var E=eG(),A=M(E);const O=w(()=>o()("collection"));po(A,{variant:"primary",get"aria-label"(){return l(O)},children:(N,j)=>{var H=X7(),B=M(H),V=R(B),G=D(B,2),K=R(G);br(K,()=>u(l(h)||""));var ee=D(G,2);Xr(ee,{flex:!0});var J=D(ee,2);{var Y=te=>{var ce=Z7(),he=M(ce);const re=w(()=>o()("delete")),X=w(()=>a().length===1?o()("delete_selected_entry"):o()("delete_selected_entries")),fe=w(()=>!a().length||!l(m));Ze(he,{variant:"ghost",get label(){return l(re)},get"aria-label"(){return l(X)},get disabled(){return l(fe)},onclick:()=>{$(c,!0)}});var be=D(he,2);const ue=w(()=>o()("create")),Ee=w(()=>o()("create_new_entry"));Ze(be,{variant:"primary",get disabled(){return l(_)},get label(){return l(ue)},get"aria-label"(){return l(Ee)},keyShortcuts:"Accel+E",onclick:()=>{Un(`/collections/${l(d)}/new`)},startIcon:Ae=>{et(Ae,{name:"edit"})},$$slots:{startIcon:!0}}),T(te,ce)};U(J,te=>{l(p)&&te(Y)})}q(()=>Z(V,l(b))),T(N,H)},$$slots:{default:!0}});var L=D(A,2);{var I=N=>{var j=Q7(),H=M(j);tp(H,()=>({"--sui-infobar-border-width":"1px 0","--sui-infobar-message-justify-content":"center"})),sb(H.lastChild,{dismissible:!1,children:(B,V)=>{var G=W(),K=M(G);{var ee=Y=>{var te=Ue();q(ce=>Z(te,ce),[()=>o()("creating_entries_disabled_by_admin")]),T(Y,te)},J=Y=>{var te=Ue();q(ce=>Z(te,ce),[()=>o()("creating_entries_disabled_by_limit",{values:{limit:l(v)}})]),T(Y,te)};U(K,Y=>{l(g)?Y(J,!1):Y(ee)})}T(B,G)},$$slots:{default:!0}}),T(N,j)};U(L,N=>{l(_)&&N(I)})}T(C,E)};U(x,C=>{i()&&C(k)})}var S=D(x,2);J7(S,{get open(){return l(c)},set open(C){$(c,ie(C))}}),T(t,y),oe(),r()}function iG(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(Vn,"$selectedCollection",n),s=()=>z(li,"$currentView",n),o=()=>z(le,"$_",n),a=()=>z(en,"$allAssets",n),c=w(()=>i()?._assetFolder?.internalPath),u=w(()=>i()?._assetFolder?.entryRelative),d=w(()=>!!l(u));var f=W(),h=M(f);{var p=g=>{const m=w(()=>!s().showMedia),v=w(()=>o()("collection_assets"));_r(g,{id:"collection-assets",class:"secondary-sidebar",get hidden(){return l(m)},get"aria-label"(){return l(v)},children:(_,b)=>{Ud(_,{get disabled(){return l(d)},multiple:!0,onSelect:({files:y})=>{ot(ws,{folder:l(c),files:y})},children:(y,x)=>{const k=w(()=>a().filter(({folder:S})=>l(c)===S));JA(y,{get assets(){return l(k)},onSelect:({asset:S})=>{Un(`/assets/${S.path}`)}})},$$slots:{default:!0}})},$$slots:{default:!0}})};U(h,g=>{l(c)&&g(p)})}T(t,f),oe(),r()}var sG=F("<!> <!>",1);function oG(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(le,"$_",n),s=()=>z(e.currentView,"$currentView",n);let o=P(e,"label",3,""),a=P(e,"disabled",3,!1),c=P(e,"noneLabel",3,""),u=P(e,"groups",19,()=>[]);const d=w(()=>o()||i()("group"));Nr(t,{variant:"ghost",get label(){return l(d)},get disabled(){return a()},popupPosition:"bottom-right",popup:h=>{const p=w(()=>i()("grouping_options"));wr(h,{get"aria-label"(){return l(p)},get"aria-controls"(){return e["aria-controls"]},children:(g,m)=>{var v=sG(),_=M(v);const b=w(()=>c()||i()("sort_keys.none")),y=w(()=>!s().group);Mu(_,{get label(){return l(b)},get checked(){return l(y)},onSelect:()=>{e.currentView.update(k=>({...k,group:void 0}))}});var x=D(_,2);ft(x,17,u,cr,(k,S)=>{let C=()=>l(S).label,E=()=>l(S).field,A=()=>l(S).pattern;const O=w(()=>s().group?.field===E()&&s().group.pattern===A());Mu(k,{get label(){return C()},get checked(){return l(O)},onSelect:()=>{e.currentView.update(L=>({...L,group:{field:E(),pattern:A()}}))}})}),T(g,v)},$$slots:{default:!0}})},$$slots:{popup:!0}}),oe(),r()}var aG=F("<!> <!> <!> <!> <!> <!> <!> <!>",1);function lG(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(Vn,"$selectedCollection",n),s=()=>z(Qo,"$listedEntries",n),o=()=>z(le,"$_",n),a=()=>z(Sy,"$entryGroups",n),c=()=>z(D7,"$sortFields",n),u=()=>z(li,"$currentView",n),d=w(()=>i()?._type==="entry"?i():void 0),f=w(()=>l(d)?.name),h=w(()=>l(d)?._thumbnailFieldNames??[]),p=w(()=>!!s().length),g=w(()=>s().length>1);var m=W(),v=M(m);{var _=b=>{const y=w(()=>o()("entry_list"));po(b,{variant:"secondary",get"aria-label"(){return l(y)},children:(x,k)=>{var S=aG(),C=M(S);const E=w(()=>a().map(({entries:te})=>te).flat(1));FA(C,{get allItems(){return l(E)},selectedItems:cc});var A=D(C,2);Xr(A,{flex:!0});var O=D(A,2);const L=w(()=>!l(g)||!c().length);zA(O,{get disabled(){return l(L)},currentView:li,get fields(){return c()},get collectionName(){return l(f)},"aria-controls":"entry-list"});var I=D(O,2);{var N=te=>{const ce=w(()=>!l(g));MA(te,{get disabled(){return l(ce)},currentView:li,get filters(){return l(d).view_filters},multiple:!0,"aria-controls":"entry-list"})};U(I,te=>{l(d).view_filters?.length&&te(N)})}var j=D(I,2);{var H=te=>{const ce=w(()=>!l(g));oG(te,{get disabled(){return l(ce)},currentView:li,get groups(){return l(d).view_groups},"aria-controls":"entry-list"})};U(j,te=>{l(d).view_groups?.length&&te(H)})}var B=D(j,2);const V=w(()=>!l(p)||!l(h).length);_y(B,{get disabled(){return l(V)},currentView:li,"aria-controls":"entry-list"});var G=D(B,2);Ar(G,{orientation:"vertical"});var K=D(G,2);const ee=w(()=>!l(p)||!l(d)._assetFolder),J=w(()=>!!u().showMedia),Y=w(()=>o()(u().showMedia?"hide_assets":"show_assets"));Ze(K,{variant:"ghost",iconic:!0,get disabled(){return l(ee)},get pressed(){return l(J)},"aria-controls":"collection-assets",get"aria-expanded"(){return u().showMedia},get"aria-label"(){return l(Y)},onclick:()=>{li.update(ce=>({...ce,showMedia:!u().showMedia}))},startIcon:ce=>{et(ce,{name:"photo_library"})},$$slots:{startIcon:!0}}),T(x,S)},$$slots:{default:!0}})};U(v,b=>{l(d)&&b(_)})}T(t,m),oe(),r()}var cG=F("<!> <!> <!> <!>",1);function uG(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(Vn,"$selectedCollection",n),s=()=>z(le,"$_",n),o=()=>z(Qo,"$listedEntries",n),a=()=>z(Au,"$contentUpdatesToast",n),c=/^\/collections\/(?<_collectionName>[^/]+)(?:\/(?<routeType>new|entries))?(?:\/(?<subPath>.+?))?$/,u=w(()=>i()?.files?W7:H7),d=()=>{const{path:_,params:b}=jd(),y=_.match(c);if(!y?.groups)return;const{_collectionName:x,routeType:k,subPath:S}=y.groups,C=x?Fi(x):void 0;if(!C||C.hide?ot(Vn,void 0):i()?.name!==C.name&&ot(Vn,C),!C||!i()){ot(bs,s()("collection_not_found"));return}const{name:E,label:A,files:O}=i(),L=A||E,I=O?i()._fileMap:void 0;if(!k){const N=o().length;ot(bs,s()(N>1?"viewing_x_collection_many_entries":N===1?"viewing_x_collection_one_entry":"viewing_x_collection_no_entries",{values:{collection:L,count:N}}));return}if(ot(tl,!0),I){if(k==="entries"&&S){const N=J_(E,S),j=I[S];gu(N?{collection:C,collectionFile:j,originalEntry:N}:{collection:C,collectionFile:j,originalEntry:{slug:j.name,locales:Object.fromEntries(j._i18n.initialLocales.map(H=>[H,{}]))}}),ot(bs,s()("editing_x_collection_file",{values:{collection:L,file:j.label||j.name}}))}}else if(k==="new"&&!S&&(gu({collection:C,dynamicValues:b}),ot(bs,s()("creating_x_collection_entry",{values:{collection:L}}))),k==="entries"&&S){const N=o().find(j=>j.subPath===S);N&&(gu({collection:C,originalEntry:N}),ot(bs,s()("editing_x_collection_entry",{values:{collection:L,entry:qo(i(),N)}})))}};cn(()=>{d()});var f=cG();wi("hashchange",ql,()=>{d()});var h=M(f);const p=w(()=>s()("content_library"));Bd(h,{class:"content",get"aria-label"(){return l(p)},primarySidebar:y=>{Y7(y,{})},main:y=>{const x=w(()=>s()("x_collection",{values:{collection:i()?.label||i()?.name}})),k=w(()=>i()?.description);_r(y,{id:"collection-container",class:"main",get"aria-label"(){return l(x)},get"aria-description"(){return l(k)},children:(S,C)=>{jA(S,{primaryToolbar:I=>{rG(I,{})},secondaryToolbar:I=>{var N=W(),j=M(N);{var H=B=>{lG(B,{})};U(j,B=>{i()?._type==="entry"&&o().length&&B(H)})}T(I,N)},mainContent:I=>{var N=W(),j=M(N);Ci(j,()=>l(u),(H,B)=>{B(H,{})}),T(I,N)},secondarySidebar:I=>{iG(I,{})},$$slots:{primaryToolbar:!0,secondaryToolbar:!0,mainContent:!0,secondarySidebar:!0}})},$$slots:{default:!0}})},$$slots:{primarySidebar:!0,main:!0}});var g=D(h,2);P7(g,{});var m=D(g,2);Yn(m,{get show(){return a().saved},set show(_){At(Au,Se(a).saved=_,Se(a))},children:(_,b)=>{Hn(_,{status:"success",children:(y,x)=>{var k=Ue();q(S=>Z(k,S),[()=>s()(a().published?"entry_saved_and_published":"entry_saved")]),T(y,k)},$$slots:{default:!0}})},$$slots:{default:!0}});var v=D(m,2);Yn(v,{get show(){return a().deleted},set show(_){At(Au,Se(a).deleted=_,Se(a))},children:(_,b)=>{Hn(_,{status:"success",children:(y,x)=>{var k=Ue();q(S=>Z(k,S),[()=>s()(a().count===1?"entry_deleted":"entries_deleted",{values:{count:a().count}})]),T(y,k)},$$slots:{default:!0}})},$$slots:{default:!0}}),T(t,f),oe(),r()}function dG(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(ug,"$translator",n),s=()=>z(tl,"$showContentOverlay",n),o=()=>z(pu,"$translatorApiKeyDialogState",n),a=()=>z(le,"$_",n),c=()=>z(Tt,"$prefs",n),u=w(()=>i().serviceId),d=w(()=>i().serviceLabel),f=w(()=>i().developerURL),h=w(()=>i().apiKeyURL),p=w(()=>i().apiKeyPattern);Be(()=>{!s()&&o().show&&(At(pu,Se(o).show=!1,Se(o)),o().resolve?.())});const g=w(()=>a()(o().multiple?"translate_fields":"translate_field")),m=w(()=>({spellcheck:!1,"aria-label":a()("api_key")}));NL(t,{get title(){return l(g)},showOk:!1,get textboxAttrs(){return l(m)},oninput:v=>{const _=v.target.value.trim();l(p)?.test(_)&&(At(Tt,Se(c).apiKeys??={},Se(c)),At(Tt,Se(c).apiKeys[l(u)]=_,Se(c)),At(pu,Se(o).show=!1,Se(o)),o().resolve?.(_))},onCancel:()=>{o().resolve?.()},get open(){return o().show},set open(v){At(pu,Se(o).show=v,Se(o))},children:(v,_)=>{var b=W(),y=M(b);br(y,()=>fi.sanitize(a()("prefs.languages.translator.description",{values:{service:l(d),homeHref:`href="${l(f)}"`,apiKeyHref:`href="${l(h)}"`}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})),T(v,b)},$$slots:{default:!0}}),oe(),r()}function fG(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(iy,"$entryParseErrors",n),s=()=>z(le,"$_",n);let o=ae(!!i().length);Yn(t,{get show(){return l(o)},set show(a){$(o,ie(a))},children:(a,c)=>{Hn(a,{status:"error",children:(u,d)=>{var f=Ue();q(h=>Z(f,h),[()=>s()(i().length===1?"entry_parse_error":"entry_parse_errors")]),T(u,f)},$$slots:{default:!0}})},$$slots:{default:!0}}),oe(),r()}var hG=F('<section><h4> </h4> <p> </p> <div role="none"><!></div></section>');function pG(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(Tt,"$prefs",n),s=()=>z(le,"$_",n);P(e,"onChange",3,void 0);let o=ae(!0);Be(()=>{$(o,ie(i().underlineLinks??!0))}),Be(()=>{i().underlineLinks!==l(o)&&At(Tt,Se(i).underlineLinks=l(o),Se(i))}),kc(t,{id:"prefs-tab-accessibility",children:(a,c)=>{var u=hG(),d=R(u),f=R(d),h=D(d,2),p=R(h),g=D(h,2),m=R(g);const v=w(()=>s()("prefs.accessibility.underline_links.switch_label"));gd(m,{get label(){return l(v)},get checked(){return l(o)},set checked(_){$(o,ie(_))}}),q((_,b)=>{Z(f,_),Z(p,b)},[()=>s()("prefs.accessibility.underline_links.title"),()=>s()("prefs.accessibility.underline_links.description")]),T(a,u)},$$slots:{default:!0}}),oe(),r()}var gG=F('<section><h4> </h4> <p> </p> <div role="none"><!></div></section>'),mG=F('<!> <section><h4> </h4> <p> </p> <div role="none"><!></div></section>',1);function vG(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(wt,"$siteConfig",n),s=()=>z(Tt,"$prefs",n),o=()=>z(le,"$_",n);let a=P(e,"onChange",3,void 0);const c=w(()=>i()?.backend.automatic_deployments);let u=ae(!1);Be(()=>{$(u,ie(s().devModeEnabled??!1))}),Be(()=>{s().devModeEnabled!==l(u)&&At(Tt,Se(s).devModeEnabled=l(u),Se(s))}),kc(t,{id:"prefs-tab-advanced",children:(d,f)=>{var h=mG(),p=M(h);{var g=C=>{var E=gG(),A=R(E),O=R(A),L=D(A,2),I=R(L),N=D(L,2),j=R(N);const H=w(()=>o()("prefs.advanced.deploy_hook.field_label"));Pn(j,{flex:!0,get label(){return l(H)},onchange:()=>{a()?.({message:o()(s().deployHookURL?"prefs.advanced.deploy_hook.url_saved":"prefs.advanced.deploy_hook.url_removed")})},get value(){return s().deployHookURL},set value(B){At(Tt,Se(s).deployHookURL=B,Se(s))}}),q((B,V)=>{Z(O,B),Z(I,V)},[()=>o()("prefs.advanced.deploy_hook.title"),()=>o()("prefs.advanced.deploy_hook.description")]),T(C,E)};U(p,C=>{typeof l(c)=="boolean"&&C(g)})}var m=D(p,2),v=R(m),_=R(v),b=D(v,2),y=R(b),x=D(b,2),k=R(x);const S=w(()=>o()("prefs.advanced.developer_mode.switch_label"));gd(k,{get label(){return l(S)},get checked(){return l(u)},set checked(C){$(u,ie(C))}}),q((C,E)=>{Z(_,C),Z(y,E)},[()=>o()("prefs.advanced.developer_mode.title"),()=>o()("prefs.advanced.developer_mode.description")]),T(d,h)},$$slots:{default:!0}}),oe(),r()}var bG=F('<section><h4> </h4> <div role="none"><!></div></section>');function _G(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(le,"$_",n),s=()=>z(Tt,"$prefs",n);P(e,"onChange",3,void 0),kc(t,{id:"prefs-tab-appearance",children:(o,a)=>{var c=bG(),u=R(c),d=R(u),f=D(u,2),h=R(f);const p=w(()=>i()("prefs.appearance.select_theme"));cp(h,{get"aria-label"(){return l(p)},onChange:g=>{ot(Tt,{...s(),theme:g.detail.value})},children:(g,m)=>{var v=W(),_=M(v);ft(_,16,()=>["auto","dark","light"],cr,(b,y)=>{const x=w(()=>i()(`prefs.theme.${y}`)),k=w(()=>!s().theme&&y==="auto"||s().theme===y);Du(b,{variant:"tertiary",get label(){return l(x)},get value(){return y},get selected(){return l(k)}})}),T(g,v)},$$slots:{default:!0}}),q(g=>Z(d,g),[()=>i()("prefs.appearance.theme")]),T(o,c)},$$slots:{default:!0}}),oe(),r()}var yG=F('<section><h4> </h4> <div role="none"><!></div></section>');function wG(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(Tt,"$prefs",n),s=()=>z(le,"$_",n);P(e,"onChange",3,void 0);let o=ae(!0);Be(()=>{$(o,ie(i().closeOnSave??!0))}),Be(()=>{i().closeOnSave!==l(o)&&At(Tt,Se(i).closeOnSave=l(o),Se(i))}),kc(t,{id:"prefs-tab-contents",children:(a,c)=>{var u=yG(),d=R(u),f=R(d),h=D(d,2),p=R(h);const g=w(()=>s()("prefs.contents.editor.close_on_save.switch_label"));gd(p,{get label(){return l(g)},get checked(){return l(o)},set checked(m){$(o,ie(m))}}),q(m=>Z(f,m),[()=>s()("prefs.contents.editor.title")]),T(a,u)},$$slots:{default:!0}}),oe(),r()}var xG=F('<section><h4> </h4> <p><!></p> <div role="none"><!></div></section>'),kG=F('<section><h4> </h4> <div role="none"><!></div></section> <!>',1);function SG(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(le,"$_",n),s=()=>z(Nn,"$appLocale",n),o=()=>z(Tt,"$prefs",n),a=()=>z(Dk,"$appLocales",n),c=()=>z(wt,"$siteConfig",n);let u=P(e,"onChange",3,void 0);kc(t,{id:"prefs-tab-languages",children:(d,f)=>{var h=kG(),p=M(h),g=R(p),m=R(g),v=D(g,2),_=R(v);As(_,s,x=>{const k=w(()=>i()("prefs.languages.ui_language.select_language")),S=w(()=>s()??void 0);pd(x,{get"aria-label"(){return l(k)},get value(){return l(S)},onChange:C=>{ot(Tt,{...o(),locale:C.detail.value})},children:(C,E)=>{var A=W(),O=M(A);ft(O,1,a,cr,(L,I)=>{const N=w(()=>$s(l(I))),j=w(()=>l(I)===s());mr(L,{get label(){return l(N)},get value(){return l(I)},get selected(){return l(j)}})}),T(C,A)},$$slots:{default:!0}})});var b=D(p,2);{var y=x=>{var k=W(),S=M(k);ft(S,17,()=>Object.entries(P6),([C,E])=>C,(C,E)=>{let A=()=>l(E)[0],O=()=>l(E)[1];var L=xG();const I=w(()=>{const{serviceLabel:ee,developerURL:J,apiKeyURL:Y}=O();return{serviceLabel:ee,developerURL:J,apiKeyURL:Y}});var N=R(L),j=R(N),H=D(N,2),B=R(H);br(B,()=>fi.sanitize(i()("prefs.languages.translator.description",{values:{service:l(I).serviceLabel,homeHref:`href="${l(I).developerURL}"`,apiKeyHref:`href="${l(I).apiKeyURL}"`}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]}));var V=D(H,2),G=R(V);{var K=ee=>{const J=w(()=>i()("prefs.languages.translator.field_label",{values:{service:l(I).serviceLabel}}));Pn(ee,{flex:!0,spellcheck:"false",get"aria-label"(){return l(J)},onchange:()=>{u()?.({message:i()(o().apiKeys?.[A()]?"prefs.changes.api_key_saved":"prefs.changes.api_key_removed")})},get value(){return o().apiKeys[A()]},set value(Y){At(Tt,Se(o).apiKeys[A()]=Y,Se(o))}})};U(G,ee=>{o().apiKeys&&ee(K)})}q(ee=>Z(j,ee),[()=>i()("prefs.languages.translator.title",{values:{service:l(I).serviceLabel}})]),T(C,L)}),T(x,k)};U(b,x=>{(c()?.i18n?.locales?.length??0)>1&&x(y)})}q(x=>Z(m,x),[()=>i()("prefs.languages.ui_language.title")]),T(d,h)},$$slots:{default:!0}}),oe(),r()}var EG=F('<section><h4> </h4> <p><!></p> <div role="none"><!></div></section>');function TG(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(le,"$_",n),s=()=>z(Tt,"$prefs",n);let o=P(e,"onChange",3,void 0);kc(t,{id:"prefs-tab-media",children:(a,c)=>{var u=W(),d=M(u);ft(d,17,()=>Object.entries(mu),([f,h])=>f,(f,h)=>{let p=()=>l(h)[0],g=()=>l(h)[1];var m=EG();const v=w(()=>{const{serviceLabel:E,developerURL:A,apiKeyURL:O}=g();return{serviceLabel:E,developerURL:A,apiKeyURL:O}});var _=R(m),b=R(_),y=D(_,2),x=R(y);br(x,()=>fi.sanitize(i()("prefs.media.stock_photos.description",{values:{service:l(v).serviceLabel,homeHref:`href="${l(v).developerURL}"`,apiKeyHref:`href="${l(v).apiKeyURL}"`}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]}));var k=D(y,2),S=R(k);{var C=E=>{const A=w(()=>i()("prefs.media.stock_photos.field_label",{values:{service:l(v).serviceLabel}}));Pn(E,{flex:!0,spellcheck:"false",get"aria-label"(){return l(A)},onchange:()=>{o()?.({message:i()(s().apiKeys?.[p()]?"prefs.changes.api_key_saved":"prefs.changes.api_key_removed")})},get value(){return s().apiKeys[p()]},set value(O){At(Tt,Se(s).apiKeys[p()]=O,Se(s))}})};U(S,E=>{s().apiKeys&&E(C)})}q(E=>Z(b,E),[()=>i()("prefs.media.stock_photos.title",{values:{service:l(v).serviceLabel}})]),T(f,m)}),T(a,u)},$$slots:{default:!0}}),oe(),r()}var CG=F('<div role="none" class="wrapper svelte-z6esgm"><!> <!></div>'),AG=F("<!> <!>",1);const PG={hash:"svelte-z6esgm",code:".wrapper.svelte-z6esgm {display:flex;}.wrapper.svelte-z6esgm .tab-list {flex:none;}.wrapper.svelte-z6esgm .tab-panel {flex:auto;border-width:0;}.wrapper.svelte-z6esgm .tab-panel section:not(:first-child) {margin:16px 0 0;}.wrapper.svelte-z6esgm .tab-panel p {margin-top:0;}.wrapper.svelte-z6esgm .tab-panel h4 {font-size:inherit;}.wrapper.svelte-z6esgm .tab-panel h4 ~ div {margin:8px 0 0;}.wrapper.svelte-z6esgm .tab-panel h4 ~ p {margin:8px 0 0;color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-small);}"};function OG(t,e){se(e,!0),Te(t,PG);const[n,r]=ve(),i=()=>z(le,"$_",n);let s=P(e,"open",15,!1),o=P(e,"onClose",3,void 0),a=ae("appearance"),c=ae(""),u=ae(!1);const d=[{key:"appearance",icon:"palette",component:_G},{key:"languages",icon:"language",component:SG},{key:"contents",icon:"library_books",component:wG},{key:"media",icon:"photo_library",component:TG},{key:"accessibility",icon:"accessibility_new",component:pG},{key:"advanced",icon:"build",component:vG}];var f=AG(),h=M(f);const p=w(()=>i()("settings"));is(h,{get title(){return l(p)},showOk:!1,showCancel:!1,showClose:!0,onClose:()=>{o()?.()},get open(){return s()},set open(m){s(m)},children:(m,v)=>{var _=CG(),b=R(_);const y=w(()=>i()("categories"));GN(b,{orientation:"vertical",get"aria-label"(){return l(y)},children:(k,S)=>{var C=W(),E=M(C);ft(E,17,()=>d,({key:A,icon:O})=>A,(A,O)=>{let L=()=>l(O).key,I=()=>l(O).icon;const N=w(()=>i()(`prefs.${L()}.title`)),j=w(()=>L()===l(a));JN(A,{get label(){return l(N)},get selected(){return l(j)},get"aria-controls"(){return`prefs-tab-${L()??""}`},onSelect:()=>{$(a,ie(L()))},startIcon:B=>{et(B,{get name(){return I()}})},$$slots:{startIcon:!0}})}),T(k,C)},$$slots:{default:!0}});var x=D(b,2);ft(x,17,()=>d,({key:k,component:S})=>k,(k,S)=>{let C=()=>l(S).component;var E=W(),A=M(E);Ci(A,C,(O,L)=>{L(O,{onChange:({message:I})=>{$(c,ie(I)),$(u,!0)}})}),T(k,E)}),T(m,_)},$$slots:{default:!0}});var g=D(h,2);Yn(g,{get show(){return l(u)},set show(m){$(u,ie(m))},children:(m,v)=>{Hn(m,{status:"success",children:(_,b)=>{var y=Ue();q(()=>Z(y,l(c))),T(_,y)},$$slots:{default:!0}})},$$slots:{default:!0}}),T(t,f),oe(),r()}var $G=F('<img class="avatar svelte-xssn1c" loading="lazy" alt="">'),LG=F("<!> <!>",1),NG=F("<!> <!> <!> <!> <!> <!> <!> <!>",1),IG=F('<div role="none" class="wrapper svelte-xssn1c"><!></div> <!>',1);const RG={hash:"svelte-xssn1c",code:".wrapper.svelte-xssn1c {display:contents;}.wrapper.svelte-xssn1c button.avatar {border-width:0;background-color:transparent;}.avatar.svelte-xssn1c {width:32px;height:32px;border-radius:32px;object-fit:cover;}"};function DG(t,e){se(e,!0),Te(t,RG);const[n,r]=ve(),i=()=>z(gi,"$user",n),s=()=>z(zs,"$backendName",n),o=()=>z(le,"$_",n),a=()=>z(Tt,"$prefs",n),c=()=>z(In,"$backend",n);let u=ae(void 0),d=ae(!1);const f=w(()=>!!i()?.avatarURL),h=w(()=>s()==="local");var p=IG(),g=M(p),m=R(g);const v=w(()=>l(f)?"avatar":""),_=w(()=>o()("show_account_menu"));$t(Nr(m,{variant:"ghost",iconic:!0,get class(){return l(v)},popupPosition:"bottom-right",get"aria-label"(){return l(_)},endIcon:k=>{var S=W(),C=M(S);{var E=O=>{var L=$G();q(()=>ke(L,"src",i()?.avatarURL)),T(O,L)},A=O=>{et(O,{name:"account_circle"})};U(C,O=>{l(f)?O(E):O(A,!1)})}T(k,S)},popup:k=>{const S=w(()=>o()("account"));wr(k,{get"aria-label"(){return l(S)},children:(C,E)=>{var A=NG(),O=M(A);const L=w(()=>l(h)?o()("working_with_local_repo"):o()("signed_in_as_x",{values:{name:i()?.login}}));Nt(O,{get label(){return l(L)},get disabled(){return l(h)},onclick:()=>{window.open(i()?.profileURL,"_blank")}});var I=D(O,2);Ar(I,{});var N=D(I,2);const j=w(()=>o()("live_site"));Nt(N,{get label(){return l(j)},onclick:()=>{_A()}});var H=D(N,2);{var B=te=>{var ce=LG(),he=M(ce);const re=w(()=>o()("git_repository")),X=w(()=>!c()?.repository?.treeBaseURL);Nt(he,{get label(){return l(re)},get disabled(){return l(X)},onclick:()=>{window.open(c()?.repository?.treeBaseURL)}});var fe=D(he,2);const be=w(()=>o()("site_config"));Nt(fe,{get label(){return l(be)},onclick:()=>{Un("/config")}}),T(te,ce)};U(H,te=>{a().devModeEnabled&&te(B)})}var V=D(H,2);Ar(V,{});var G=D(V,2);const K=w(()=>o()("settings"));Nt(G,{get label(){return l(K)},onclick:()=>{$(d,!0)}});var ee=D(G,2);Ar(ee,{});var J=D(ee,2);const Y=w(()=>o()("sign_out"));Nt(J,{get label(){return l(Y)},onclick:async()=>{window.requestAnimationFrame(()=>{w5()})}}),T(C,A)},$$slots:{default:!0}})},$$slots:{endIcon:!0,popup:!0}}),k=>$(u,ie(k)),()=>l(u));var b=D(g,2);OG(b,{onClose:()=>{l(u)?.focus()},get open(){return l(d)},set open(y){$(d,ie(y))}}),T(t,p),oe(),r()}var MG=F("<!> <!>",1),FG=F("<!> <!>",1);function zG(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(wt,"$siteConfig",n),s=()=>z(le,"$_",n),o=w(()=>(i()?.collections??[]).filter(({folder:c,hide:u=!1,divider:d=!1})=>typeof c=="string"&&!u&&!d)),a=w(()=>s()("create_entry_or_assets"));Nr(t,{variant:"ghost",iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return l(a)},endIcon:d=>{et(d,{name:"add"})},popup:d=>{const f=w(()=>s()("create_entry_or_assets"));wr(d,{get"aria-label"(){return l(f)},children:(h,p)=>{var g=FG(),m=M(g);{var v=y=>{var x=MG(),k=M(x);ft(k,17,()=>l(o),C=>C.name,(C,E)=>{const A=w(()=>{const{name:I,label:N,label_singular:j,create:H=!1,limit:B=1/0}=l(E);return{name:I,label:N,labelSingular:j,create:H,limit:B}}),O=w(()=>l(A).labelSingular||l(A).label||l(A).name),L=w(()=>!l(A).create||rs(l(A).name).length>=l(A).limit);Nt(C,{get label(){return l(O)},get disabled(){return l(L)},onclick:()=>{Un(`/collections/${l(A).name}/new`)}})});var S=D(k,2);Ar(S,{}),T(y,x)};U(m,y=>{l(o).length&&y(v)})}var _=D(m,2);const b=w(()=>s()("assets"));Nt(_,{get label(){return l(b)},onclick:async()=>{Un("/assets"),await vn(100),ot(_a,!0)}}),T(h,g)},$$slots:{default:!0}})},$$slots:{endIcon:!0,popup:!0}}),oe(),r()}var jG=F('<kbd class="svelte-h10dbf"> </kbd>'),UG=F("<!> <!>",1),BG=F('<div role="none" class="wrapper svelte-h10dbf"><!></div>');const qG={hash:"svelte-h10dbf",code:".wrapper.svelte-h10dbf {display:contents;}.wrapper.svelte-h10dbf .table-row {display:flex;align-items:center;gap:16px;padding:8px 0;border-top:1px solid var(--sui-secondary-border-color);}.wrapper.svelte-h10dbf .table-row:last-child {border-bottom:1px solid var(--sui-secondary-border-color);}.wrapper.svelte-h10dbf .table-row .feature {flex:auto;}.wrapper.svelte-h10dbf .table-row .keys {display:flex;gap:8px;}kbd.svelte-h10dbf {display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;border-color:var(--sui-primary-accent-color);border-radius:4px;padding:0 8px;height:32px;min-width:32px;background-color:var(--sui-tertiary-background-color);font-family:var(--sui-control-font-family);font-size:var(--sui-control-font-size);line-height:var(--sui-control-line-height);}"};function HG(t,e){se(e,!0),Te(t,qG);const[n,r]=ve(),i=()=>z(le,"$_",n);let s=P(e,"open",15,!1),o=P(e,"onClose",3,void 0);const a=[{feature:"view_content_library",keys:"Alt+1"},{feature:"view_asset_library",keys:"Alt+2"},{feature:"search",keys:"Accel+F"},{feature:"create_entry",keys:"Accel+E"},{feature:"save_entry",keys:"Accel+S"},{feature:"cancel_editing",keys:"Escape"}];let c=ae("Ctrl");cn(()=>{(navigator.userAgentData?.platform==="macOS"||navigator.platform.startsWith("Mac"))&&$(c,"⌘")});const u=w(()=>i()("help.keyboard_shortcuts"));is(t,{get title(){return l(u)},showOk:!1,showCancel:!1,showClose:!0,onClose:()=>{o()?.()},get open(){return s()},set open(d){s(d)},children:(d,f)=>{var h=BG(),p=R(h);const g=w(()=>i()("help.keyboard_shortcuts"));HN(p,{get"aria-label"(){return l(g)},children:(m,v)=>{var _=W(),b=M(_);ft(b,17,()=>a,({feature:y,keys:x})=>x,(y,x)=>{let k=()=>l(x).feature,S=()=>l(x).keys;UN(y,{children:(C,E)=>{var A=UG(),O=M(A);bw(O,{class:"feature",children:(I,N)=>{var j=Ue();q(H=>Z(j,H),[()=>i()(`keyboard_shortcuts_.${k()}`)]),T(I,j)},$$slots:{default:!0}});var L=D(O,2);bw(L,{class:"keys",children:(I,N)=>{var j=W(),H=M(j);ft(H,17,()=>S().split("+"),cr,(B,V)=>{var G=jG(),K=R(G);q(ee=>Z(K,ee),[()=>l(V).replace("Accel",l(c))]),T(B,G)}),T(I,j)},$$slots:{default:!0}}),T(C,A)},$$slots:{default:!0}})}),T(m,_)},$$slots:{default:!0}}),T(d,h)},$$slots:{default:!0}}),oe(),r()}var VG=F('<span class="version svelte-69n4ux"></span>'),WG=F("<!> <!> <!> <!> <!> <!> <!> <!> <!>",1),GG=F('<div role="none" class="wrapper svelte-69n4ux"><!></div> <!>',1);const KG={hash:"svelte-69n4ux",code:".wrapper.svelte-69n4ux {display:contents;}.version.svelte-69n4ux {border-radius:4px;padding:0 6px;color:var(--sui-secondary-foreground-color);background-color:var(--sui-selected-background-color);font-size:var(--sui-font-size-small);}"};function YG(t,e){se(e,!0),Te(t,KG);const[n,r]=ve(),i=()=>z(le,"$_",n),s=()=>z(Tt,"$prefs",n);let o=ae(void 0),a=ae(!1);var c=GG(),u=M(c),d=R(u);const f=w(()=>i()("show_help_menu"));$t(Nr(d,{variant:"ghost",iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return l(f)},endIcon:m=>{et(m,{name:"help"})},popup:m=>{const v=w(()=>i()("help"));wr(m,{get"aria-label"(){return l(v)},children:(_,b)=>{var y=WG(),x=M(y);{var k=ee=>{const J=w(()=>i()("keyboard_shortcuts"));Nt(ee,{get label(){return l(J)},onclick:()=>{$(a,!0)}})};U(x,ee=>{window.matchMedia("(pointer: fine)").matches&&ee(k)})}var S=D(x,2);const C=w(()=>i()("documentation"));Nt(S,{get label(){return l(C)},onclick:()=>{window.open("https://github.com/sveltia/sveltia-cms/blob/main/README.md","_blank")}});var E=D(S,2);const A=w(()=>i()("release_notes"));Nt(E,{get label(){return l(A)},onclick:()=>{window.open("https://github.com/sveltia/sveltia-cms/releases","_blank")},endIcon:J=>{var Y=W(),te=M(Y);{var ce=he=>{var re=VG();re.textContent=`v${Fv}`,q(X=>ke(re,"aria-label",`(${X??""})`),[()=>i()("version_x",{values:{version:Fv}})]),T(he,re)};U(te,he=>{s().devModeEnabled&&he(ce)})}T(J,Y)},$$slots:{endIcon:!0}});var O=D(E,2);Ar(O,{});var L=D(O,2);const I=w(()=>i()("report_issue"));Nt(L,{get label(){return l(I)},onclick:()=>{window.open("https://github.com/sveltia/sveltia-cms/issues/new?labels=bug","_blank")}});var N=D(L,2);const j=w(()=>i()("share_feedback"));Nt(N,{get label(){return l(j)},onclick:()=>{window.open("https://github.com/sveltia/sveltia-cms/discussions/new?category=general","_blank")}});var H=D(N,2);const B=w(()=>i()("get_help"));Nt(H,{get label(){return l(B)},onclick:()=>{window.open("https://github.com/sveltia/sveltia-cms/discussions/new?category=q-a","_blank")}});var V=D(H,2);Ar(V,{});var G=D(V,2);const K=w(()=>i()("join_discord"));Nt(G,{get label(){return l(K)},onclick:()=>{window.open("https://discord.gg/5hwCGqup5b","_blank")}}),T(_,y)},$$slots:{default:!0}})},$$slots:{endIcon:!0,popup:!0}}),m=>$(o,ie(m)),()=>l(o));var h=D(u,2);HG(h,{onClose:()=>{l(o)?.focus()},get open(){return l(a)},set open(p){$(a,ie(p))}}),T(t,c),oe(),r()}function JG(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(le,"$_",n),s=w(()=>i()("show_notifications"));Ze(t,{variant:"ghost",iconic:!0,hidden:!0,get"aria-label"(){return l(s)},onclick:()=>{},startIcon:a=>{et(a,{name:"notifications"})},$$slots:{startIcon:!0}}),oe(),r()}var ZG=F('<div role="none" class="wrapper svelte-1wpllk"><!></div>');const XG={hash:"svelte-1wpllk",code:".wrapper.svelte-1wpllk {display:contents;}.wrapper.svelte-1wpllk .sui.select-button-group {gap:4px;}.wrapper.svelte-1wpllk .sui.button {border-radius:var(--sui-button-medium-border-radius) !important;}"};function QG(t,e){se(e,!0),Te(t,XG);const[n,r]=ve(),i=()=>z(le,"$_",n),s=()=>z(Vn,"$selectedCollection",n),o=()=>z(wt,"$siteConfig",n),a=()=>z(ni,"$selectedAssetFolder",n),c=()=>z(Mv,"$selectedPageName",n),u=w(()=>[{key:"collections",label:i()("contents"),icon:"library_books",link:`/collections/${s()?.name??o()?.collections[0].name}`},{key:"assets",label:i()("assets"),icon:"photo_library",link:a()?`/assets/${a().internalPath}`:"/assets"}]);var d=ZG(),f=R(d);const h=w(()=>i()("switch_page"));cp(f,{get"aria-label"(){return l(h)},"aria-controls":"page-container",children:(p,g)=>{var m=W(),v=M(m);ft(v,19,()=>l(u),({key:_,label:b,icon:y,link:x})=>_,(_,b,y)=>{let x=()=>l(b).key,k=()=>l(b).label,S=()=>l(b).icon,C=()=>l(b).link;const E=w(()=>c()===x()),A=w(()=>l(y)+1);Du(_,{variant:"ghost",iconic:!0,get selected(){return l(E)},get"aria-label"(){return k()},get keyShortcuts(){return`Alt+${l(A)??""}`},onSelect:()=>{Un(C())},startIcon:L=>{et(L,{get name(){return S()}})},$$slots:{startIcon:!0}})}),T(p,m)},$$slots:{default:!0}}),T(t,d),oe(),r()}var eK=F("<!> <!>",1);function tK(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(wt,"$siteConfig",n),s=()=>z(Tt,"$prefs",n),o=()=>z(In,"$backend",n),a=()=>z(zs,"$backendName",n),c=()=>z(Hh,"$isLastCommitPublished",n),u=()=>z(le,"$_",n),d=w(()=>i()?.backend.automatic_deployments),f=w(()=>s().deployHookURL),h=w(()=>o()?.triggerDeployment),p=w(()=>a()!=="local"&&typeof l(d)=="boolean"),g=w(()=>(!!l(f)||typeof l(h)=="function")&&!c());let m=ae("info"),v=ae(!1);const _=async()=>{$(m,"info"),$(v,!0);try{const{ok:k,status:S}=l(f)?await fetch(l(f),{method:"POST",mode:"no-cors"}):await l(h)?.()??{};if(!k&&S!==0)throw new Error(`Webhook returned ${S} error`);ot(Hh,!0)}catch(k){$(m,"error"),$(v,!0),console.error(k)}};var b=W(),y=M(b);{var x=k=>{var S=eK(),C=M(S);const E=w(()=>u()("publish_changes")),A=w(()=>!l(g));Ze(C,{variant:"secondary",get label(){return l(E)},get disabled(){return l(A)},onclick:()=>_()});var O=D(C,2);Yn(O,{get show(){return l(v)},set show(L){$(v,ie(L))},children:(L,I)=>{Hn(L,{get status(){return l(m)},children:(N,j)=>{var H=Ue();q(B=>Z(H,B),[()=>u()(l(m)==="error"?"publishing_changes_failed":"publishing_changes")]),T(N,H)},$$slots:{default:!0}})},$$slots:{default:!0}}),T(k,S)};U(y,k=>{l(p)&&k(x)})}T(t,b),oe(),r()}var nK=F('<div role="none" class="wrapper svelte-ns8gcu"><svelte-css-wrapper style="display: contents"><!></svelte-css-wrapper></div>');const rK={hash:"svelte-ns8gcu",code:".wrapper.svelte-ns8gcu {display:contents;--sui-textbox-border-width: 0;}"};function iK(t,e){se(e,!0),Te(t,rK);const[n,r]=ve(),i=()=>z(hc,"$searchTerms",n),s=()=>z(Vn,"$selectedCollection",n),o=()=>z(wt,"$siteConfig",n),a=()=>z(le,"$_",n),c=g=>{const m=!!i(),{path:v}=jd(),_=v.startsWith("/search/");ot(hc,g),g?Un(`/search/${g}`,{replaceState:_}):m&&_&&Ul(`/collections/${s()?.name??o()?.collections[0].name}`)};let u=ae(void 0),d=ae(void 0);Be(()=>{l(d)&&i()!==l(d)?.value&&(l(d).value=i())});var f=nK(),h=R(f);const p=w(()=>a()("search_placeholder"));tp(h,()=>({"--sui-textbox-placeholder-text-align":"center"})),$t(ob(h.lastChild,{keyShortcuts:"Accel+F",showInlineLabel:!0,get"aria-label"(){return l(p)},oninput:({target:g})=>{c(g.value.trim())}}),g=>$(d,ie(g)),()=>l(d)),$t(f,g=>$(u,g),()=>l(u)),T(t,f),oe(),r()}var sK=F('<img loading="lazy" alt="" class="logo svelte-14sy0eb">');const oK={hash:"svelte-14sy0eb",code:"img.svelte-14sy0eb {width:24px;height:24px;object-fit:contain;}"};function aK(t,e){se(e,!0),Te(t,oK);const[n,r]=ve(),i=()=>z(wt,"$siteConfig",n),s=()=>z(le,"$_",n);var o=W(),a=M(o);{var c=u=>{const d=w(()=>s()("visit_live_site"));Ze(u,{variant:"ghost",iconic:!0,get"aria-label"(){return l(d)},onclick:()=>{_A()},children:(f,h)=>{var p=sK();q(()=>ke(p,"src",i().logo_url)),T(f,p)},$$slots:{default:!0}})};U(a,u=>{i()?.logo_url&&u(c)})}T(t,o),oe(),r()}var lK=F('<div role="none" class="buttons"><!> <!></div> <!> <div role="none" class="buttons"><!> <!> <!> <!> <!></div>',1),cK=F('<div role="none" class="toolbar-wrapper svelte-ornzx3"><!></div>');const uK={hash:"svelte-ornzx3",code:".toolbar-wrapper.svelte-ornzx3 {display:contents;}.toolbar-wrapper[inert].svelte-ornzx3 {display:none;}.toolbar-wrapper.svelte-ornzx3 > .toolbar .buttons {flex:auto;display:flex;align-items:center;width:50%;}.toolbar-wrapper.svelte-ornzx3 > .toolbar .buttons:last-child {justify-content:flex-end;}.toolbar-wrapper.svelte-ornzx3 > .toolbar .search-bar {flex:none;width:640px;max-width:50%;}"};function dK(t,e){se(e,!0),Te(t,uK);const[n,r]=ve(),i=()=>z(bA,"$hasOverlay",n),s=()=>z(le,"$_",n);var o=cK(),a=R(o);const c=w(()=>s()("global"));po(a,{variant:"primary",get"aria-label"(){return l(c)},children:(u,d)=>{var f=lK(),h=M(f),p=R(h);aK(p,{});var g=D(p,2);QG(g,{});var m=D(h,2);iK(m,{});var v=D(m,2),_=R(v);tK(_,{});var b=D(_,2);zG(b,{});var y=D(b,2);JG(y,{});var x=D(y,2);YG(x,{});var k=D(x,2);DG(k,{}),T(u,f)},$$slots:{default:!0}}),q(()=>o.inert=i()),T(t,o),oe(),r()}var fK=F("<!> <!> <!>",1);function hK(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(Nn,"$appLocale",n),s=w(()=>e.asset.path),o=w(()=>e.asset.name),a=w(()=>e.asset.folder),c=w(()=>e.asset.kind);fd(t,{onclick:()=>{Un(`/assets/${l(s)}`)},children:(u,d)=>{var f=fK(),h=M(f);di(h,{class:"image",children:(m,v)=>{Ns(m,{get kind(){return l(c)},get asset(){return e.asset},variant:"icon",cover:!0})},$$slots:{default:!0}});var p=D(h,2);di(p,{class:"collection",children:(m,v)=>{var _=Ue();q(b=>Z(_,b),[()=>i()?gy(l(a)):""]),T(m,_)},$$slots:{default:!0}});var g=D(p,2);di(g,{class:"title",children:(m,v)=>{var _=Ue();q(()=>Z(_,l(o))),T(m,_)},$$slots:{default:!0}}),T(u,f)},$$slots:{default:!0}}),oe(),r()}var pK=F("<!> <!> <!>",1);function gK(t,e){se(e,!0);const n=(a,c)=>{let u=()=>c?.().collection,d=()=>c?.().collectionFile;var f=W();const h=w(()=>{const{defaultLocale:v}=(d()??u())._i18n??Ri;return{defaultLocale:v}}),p=w(()=>{const{content:v}=l(r)[l(h).defaultLocale]??Object.values(l(r))[0]??{};return{content:v}});var g=M(f);{var m=v=>{fd(v,{onclick:()=>{Un(`/collections/${u().name}/entries/${d()?.name||l(i)}`)},children:(_,b)=>{var y=pK(),x=M(y);di(x,{class:"image",children:(C,E)=>{var A=W(),O=M(A);{var L=I=>{var N=W(),j=M(N);yr(j,()=>r2(u(),e.entry),null,(H,B)=>{var V=W(),G=M(V);{var K=ee=>{vy(ee,{get src(){return l(B)},variant:"icon",cover:!0})};U(G,ee=>{l(B)&&ee(K)})}T(H,V)}),T(I,N)};U(O,I=>{u()._type==="entry"&&I(L)})}T(C,A)},$$slots:{default:!0}});var k=D(x,2);di(k,{class:"collection",children:(C,E)=>{var A=Ue();q(()=>Z(A,u().label||u().name)),T(C,A)},$$slots:{default:!0}});var S=D(k,2);di(S,{class:"title",children:(C,E)=>{var A=W(),O=M(A);{var L=N=>{var j=Ue();q(()=>Z(j,d().label||d().name)),T(N,j)},I=N=>{var j=W(),H=M(j);br(H,()=>qo(u(),e.entry,{useTemplate:!0,allowMarkdown:!0})),T(N,j)};U(O,N=>{d()?N(L):N(I,!1)})}T(C,A)},$$slots:{default:!0}}),T(_,y)},$$slots:{default:!0}})};U(g,v=>{l(p).content&&v(m)})}T(a,f)},r=w(()=>e.entry.locales),i=w(()=>e.entry.subPath);var s=W(),o=M(s);ft(o,17,()=>co(e.entry),a=>a.name,(a,c)=>{var u=W(),d=M(u);ft(d,17,()=>Zo(l(c),e.entry),f=>f.name,(f,h)=>{n(f,()=>({collection:l(c),collectionFile:l(h)}))},f=>{n(f,()=>({collection:l(c)}))}),T(a,u)}),T(t,s),oe()}var mK=F('<h3 role="none" id="search-results-entries" class="svelte-11iebi8"> </h3> <div role="none" class="svelte-11iebi8"><!></div>',1),vK=F('<h3 role="none" id="search-results-assets" class="svelte-11iebi8"> </h3> <div role="none" class="svelte-11iebi8"><!></div>',1),bK=F('<div role="none" class="wrapper svelte-11iebi8"><header role="none" class="svelte-11iebi8"><h2 role="none" class="svelte-11iebi8"> </h2></header> <div role="none" class="results svelte-11iebi8"><!> <!></div></div>');const _K={hash:"svelte-11iebi8",code:".wrapper.svelte-11iebi8 {display:flex;flex-direction:column;width:100%;}header.svelte-11iebi8 {display:flex;align-items:center;padding:0 16px;height:40px;background-color:var(--sui-tertiary-background-color);}header.svelte-11iebi8 h2:where(.svelte-11iebi8) {font-size:var(--sui-font-size-x-large);}.results.svelte-11iebi8 {flex:auto;display:flex;gap:16px;overflow:hidden;padding:16px;height:100%;}.results.svelte-11iebi8 > .group {flex:auto;display:flex;flex-direction:column;overflow:hidden;width:50%;height:100%;}.results.svelte-11iebi8 h3:where(.svelte-11iebi8) {flex:none;margin:0 0 8px;color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-large);}.results.svelte-11iebi8 h3:where(.svelte-11iebi8) + div:where(.svelte-11iebi8) {overflow:auto;flex:auto;}"};function yK(t,e){se(e,!0),Te(t,_K);const[n,r]=ve(),i=()=>z(le,"$_",n),s=()=>z(hc,"$searchTerms",n),o=()=>z(YA,"$searchResults",n);var a=bK(),c=R(a),u=R(c),d=R(u),f=D(c,2),h=R(f);_r(h,{"aria-labelledby":"search-results-entries",children:(g,m)=>{var v=mK(),_=M(v),b=R(_),y=D(_,2),x=R(y);{var k=C=>{const E=w(()=>i()("entries"));od(C,{viewType:"list",get"aria-label"(){return l(E)},get"aria-rowcount"(){return o().entries.length},children:(A,O)=>{var L=W(),I=M(L);As(I,s,N=>{Ua(N,{get items(){return o().entries},itemKey:"id",renderItem:(H,B=Fe)=>{gK(H,{get entry(){return B()}})},$$slots:{renderItem:!0}})}),T(A,L)},$$slots:{default:!0}})},S=C=>{var E=Ue();q(A=>Z(E,A),[()=>i()("no_entries_found")]),T(C,E)};U(x,C=>{o().entries.length?C(k):C(S,!1)})}q(C=>Z(b,C),[()=>i()("entries")]),T(g,v)},$$slots:{default:!0}});var p=D(h,2);_r(p,{"aria-labelledby":"search-results-assets",children:(g,m)=>{var v=vK(),_=M(v),b=R(_),y=D(_,2),x=R(y);{var k=C=>{const E=w(()=>i()("assets"));od(C,{viewType:"list",get"aria-label"(){return l(E)},get"aria-rowcount"(){return o().assets.length},children:(A,O)=>{var L=W(),I=M(L);As(I,s,N=>{Ua(N,{get items(){return o().assets},itemKey:"path",renderItem:(H,B=Fe)=>{hK(H,{get asset(){return B()}})},$$slots:{renderItem:!0}})}),T(A,L)},$$slots:{default:!0}})},S=C=>{var E=Ue();q(A=>Z(E,A),[()=>i()("no_files_found")]),T(C,E)};U(x,C=>{o().assets.length?C(k):C(S,!1)})}q(C=>Z(b,C),[()=>i()("assets")]),T(g,v)},$$slots:{default:!0}}),q(g=>Z(d,g),[()=>i()("search_results_for_x",{values:{terms:s()}})]),T(t,a),oe(),r()}function wK(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(hc,"$searchTerms",n),s=()=>z(YA,"$searchResults",n),o=()=>z(le,"$_",n),a=/^\/search\/(?<terms>.+)$/,c=()=>{const{path:d}=jd(),{terms:f}=d.match(a)?.groups??{};f&&f!==i()&&ot(hc,f);const{entries:h,assets:p}=s(),g=h.length,m=p.length;ot(bs,o()("viewing_search_results",{values:{terms:i(),entries:g>1?o()("many_entries",{values:{count:g}}):g===1?o()("one_entry"):o()("no_entries"),assets:m>1?o()("many_assets",{values:{count:m}}):m===1?o()("one_asset"):o()("no_assets")}}))};cn(()=>{c()}),wi("hashchange",ql,()=>{c()});const u=w(()=>o()("search_results_for_x",{values:{terms:i()}}));Bd(t,{class:"content",get"aria-label"(){return l(u)},main:f=>{yK(f,{})},$$slots:{main:!0}}),oe(),r()}var xK=F('<header role="none" class="svelte-1lr8kgc"><h3 role="none" id="draft-column-title" class="svelte-1lr8kgc"> </h3></header>'),kK=F('<header role="none" class="svelte-1lr8kgc"><h3 role="none" id="review-column-title" class="svelte-1lr8kgc"> </h3></header>'),SK=F('<header role="none" class="svelte-1lr8kgc"><h3 role="none" id="ready-column-title" class="svelte-1lr8kgc"> </h3></header>'),EK=F('<div role="none" class="columns svelte-1lr8kgc"><!> <!> <!></div>');const TK={hash:"svelte-1lr8kgc",code:".columns.svelte-1lr8kgc {flex:auto;display:flex;gap:4px;background-color:var(--sui-secondary-background-color);}.columns.svelte-1lr8kgc .column {flex:auto;width:33.3333333333%;background-color:var(--sui-primary-background-color);}.columns.svelte-1lr8kgc header:where(.svelte-1lr8kgc) {display:flex;align-items:center;padding:0 16px;height:40px;background-color:var(--sui-tertiary-background-color);}.columns.svelte-1lr8kgc header:where(.svelte-1lr8kgc) h3:where(.svelte-1lr8kgc) {font-size:var(--sui-font-size-x-large);}"};function CK(t,e){se(e,!0),Te(t,TK);const[n,r]=ve(),i=()=>z(le,"$_",n),s=w(()=>i()("editorial_workflow"));Bd(t,{class:"content",get"aria-label"(){return l(s)},main:a=>{var c=EK(),u=R(c);_r(u,{class:"column","aria-labelledby":"draft-column-title",children:(h,p)=>{var g=xK(),m=R(g),v=R(m);q(_=>Z(v,_),[()=>i()("status.drafts")]),T(h,g)},$$slots:{default:!0}});var d=D(u,2);_r(d,{class:"column","aria-labelledby":"review-column-title",children:(h,p)=>{var g=kK(),m=R(g),v=R(m);q(_=>Z(v,_),[()=>i()("status.in_review")]),T(h,g)},$$slots:{default:!0}});var f=D(d,2);_r(f,{class:"column","aria-labelledby":"ready-column-title",children:(h,p)=>{var g=SK(),m=R(g),v=R(m);q(_=>Z(v,_),[()=>i()("status.ready")]),T(h,g)},$$slots:{default:!0}}),T(a,c)},$$slots:{main:!0}}),oe(),r()}var AK=F("<!> <!> <!> <!> <!> <!>",1);function PK(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(Mv,"$selectedPageName",n),s=()=>z(Vn,"$selectedCollection",n),o=()=>z(wt,"$siteConfig",n),a={collections:uG,assets:h6,search:wK,workflow:CK,config:_6},c=w(()=>a[i()]),u=()=>{ot(tl,!1),ot(Xo,!1);const{path:b}=jd(),{pageName:y}=b.match(`^\\/(?<pageName>${Object.keys(a).join("|")})\\b`)?.groups??{};y?i()!==y&&ot(Mv,y):window.location.replace(`#/collections/${s()?.name??o()?.collections[0].name}`)};cn(()=>{u()});var d=AK();wi("hashchange",ql,()=>{u()});var f=M(d);dK(f,{});var h=D(f,2);Ci(h,()=>l(c),(b,y)=>{y(b,{})});var p=D(h,2);m6(p,{});var g=D(p,2);g6(g,{});var m=D(g,2);dG(m,{});var v=D(m,2);fG(v,{}),T(t,d);var _=oe({pages:a,selectPage:u});return r(),_}const OK={collections:"Collections",contents:"Contents",entries:"Entries",assets:"Assets",media:"Media",workflow:"Workflow",editorial_workflow:"Editorial Workflow",user_name:"User Name",password:"Password",sign_in:"Sign In",signed_in_as_x:"Signed In as {name}",working_with_local_repo:"Working with Local Repository",sign_out:"Sign Out",create:"New",select:"Select",select_all:"Select All",upload:"Upload",copy:"Copy",download:"Download",duplicate:"Duplicate",delete:"Delete",save:"Save",saving:"Saving…",rename:"Rename",update:"Update",replace:"Replace",add:"Add",remove:"Remove",remove_x:"Remove {name}",clear:"Clear",expand:"Expand",expand_all:"Expand All",collapse:"Collapse",collapse_all:"Collapse All",insert:"Insert",restore:"Restore",discard:"Discard",searching:"Searching…",global:"Global",primary:"Primary",secondary:"Secondary",collection:"Collection",folder:"Folder",api_key:"API Key",details:"Details",clipboard_error:"There was an error while copying data.",welcome_to_sveltia_cms:"Welcome to Sveltia CMS",loading_site_config:"Loading Site Configuration…",loading_site_data:"Loading Site Data…",loading_site_data_error:"There was an error while loading site data.",sign_in_with_x:"Sign In with {service}",authorizing:"Authorizing…",signing_in:"Signing in…",work_with_local_repo:"Work with Local Repository",work_with_local_repo_description:"Click the button to select the root directory of the “{repo}” repository.",work_with_local_repo_description_no_repo:"Click the button to select the root directory of your Git repository.",sign_in_error:{not_project_root:"The folder you have selected is not a repository root directory. Please try again.",picker_dismissed:"A repository root directory could not be selected. Please try again.",authentication_aborted:"Authentication aborted. Please try again.",UNSUPPORTED_BACKEND:"Your Git backend is not supported by the authenticator.",UNSUPPORTED_DOMAIN:"Your domain is not allowed to use the authenticator.",MISCONFIGURED_CLIENT:"OAuth app client ID or secret is not configured.",AUTH_CODE_REQUEST_FAILED:"Failed to receive an authorization code. Please try again later.",CSRF_DETECTED:"Potential CSRF attack detected. Authentication flow aborted.",TOKEN_REQUEST_FAILED:"Failed to request an access token. Please try again later.",MALFORMED_RESPONSE:"Server responded with malformed data. Please try again later."},repository_no_access:"You don’t have access to the “{repo}” repository.",repository_not_found:"The “{repo}” repository doesn’t exist.",repository_empty:"The “{repo}” repository has no branches.",branch_not_found:"The “{repo}” repository doesn’t have the “{branch}” branch.",unexpected_error:"Unexpected Error",entry_parse_error:"There was an error while parsing an entry file. Check the browser console for details.",entry_parse_errors:"There were errors while parsing entry files. Check the browser console for details.",visit_live_site:"Visit Live Site",switch_page:"Switch Page",search_placeholder:"Search for entries and assets…",create_entry_or_assets:"Create Entry or Assets",publish_changes:"Publish Changes",publishing_changes:"Publishing Changes…",publishing_changes_failed:"Changes could not be published. Please try again later.",show_notifications:"Show Notifications",notifications:"Notifications",show_account_menu:"Show Account Menu",account:"Account",live_site:"Live Site",git_repository:"Git Repository",settings:"Settings",site_config:"Site Configuration",show_help_menu:"Show Help Menu",help:"Help",keyboard_shortcuts:"Keyboard Shortcuts",documentation:"Documentation",release_notes:"Release Notes",version_x:"Version {version}",report_issue:"Report Issue",share_feedback:"Share Feedback",get_help:"Get Help",join_discord:"Join Us on Discord",update_available:"The latest version of Sveltia CMS is available.",update_now:"Update Now",backend_status:{minor_incident:"{service} is experiencing a minor incident. Your workflow may be potentially affected.",major_incident:"{service} is experiencing a major incident. You may want to wait until the situation has improved."},content_library:"Content Library",asset_library:"Asset Library",collection_assets:"Collection Assets",entry_assets:"Entry Assets",entry_list:"Entry List",file_list:"File List",asset_list:"Asset List",x_collection:"“{collection}” Collection",x_asset_folder:"“{folder}” Asset Folder",viewing_x_collection_many_entries:"You’re now viewing the “{collection}” collection, which has {count} entries.",viewing_x_collection_one_entry:"You’re now viewing the “{collection}” collection, which has one entry.",viewing_x_collection_no_entries:"You’re now viewing the “{collection}” collection, which has no entries yet.",viewing_x_asset_folder_many_assets:"You’re now viewing the “{folder}” asset folder, which has {count} assets.",viewing_x_asset_folder_one_asset:"You’re now viewing the “{folder}” asset folder, which has one asset.",viewing_x_asset_folder_no_assets:"You’re now viewing the “{folder}” asset folder, which has no assets yet.",collection_not_found:"Collection not found",file_not_found:"File not found.",x_of_x_selected:"{selected} of {total} selected",switch_view:"Switch View",list_view:"List View",grid_view:"Grid View",sort:"Sort",sorting_options:"Sorting Options",sort_keys:{none:"None",name:"Name",commit_author:"Updated by",commit_date:"Updated on"},ascending:"{label}, A to Z",ascending_date:"{label}, old to new",descending:"{label}, Z to A",descending_date:"{label}, new to old",filter:"Filter",filtering_options:"Filtering Options",group:"Group",grouping_options:"Grouping Options",type:"Type",all:"All",image:"Image",video:"Video",audio:"Audio",document:"Document",other:"Other",show_assets:"Show Assets",hide_assets:"Hide Assets",show_info:"Show Info",hide_info:"Hide Info",asset_folders:"Asset Folders",all_assets:"All Assets",uncategorized:"Uncategorized",creating_entries_disabled_by_admin:"Creating new entries in this collection is disabled by the administrator.",creating_entries_disabled_by_limit:"You cannot add new entries to this collection because it has reached its limit of {limit} entries.",back_to_collection:"Back to Collection",search_results_for_x:"Search Results for “{terms}”",viewing_search_results:"You’re now viewing search results for “{terms}”. We’ve found {entries} and {assets}.",many_entries:"{count} entries",one_entry:"one entry",no_entries:"no entries",many_assets:"{count} assets",one_asset:"one asset",no_assets:"no assets",no_files_found:"No files found.",no_entries_found:"No entries found.",upload_assets:"Upload New Assets",edit_options:"Edit Options",show_edit_options:"Show Edit Options",edit_asset:"Edit Asset",edit_x:"Edit {name}",wrap_long_lines:"Wrap Long Lines",rename_asset:"Rename Asset",rename_x:"Rename {name}",enter_new_name_for_asset:"Enter a new name below.",enter_new_name_for_asset_with_one_entry:"Enter a new name below. An entry using the asset will also be updated.",enter_new_name_for_asset_with_many_entries:"Enter a new name below. {count} entries using the asset will also be updated.",enter_new_name_for_asset_error:{empty:"File name cannot be empty.",character:"File name cannot contain special characters.",duplicate:"This file name is used for another asset."},replace_asset:"Replace Asset",replace_x:"Replace {name}",browse_file:"Click to browse",drop_or_browse_file:"Drop a file here or click to browse",drop_or_browse_files:"Drop files here or click to browse",drop_or_browse_image_file:"Drop an image file here or click to browse",drop_or_browse_image_files:"Drop image files here or click to browse",drop_file_here:"Drop a file here",drop_files_here:"Drop files here",drop_files_type_mismatch:"The dropped file is not the “{type}” type. Please try again.",choose_file:"Choose File",choose_files:"Choose Files",delete_asset:"Delete Asset",delete_assets:"Delete Assets",delete_selected_asset:"Delete Selected Asset",delete_selected_assets:"Delete Selected Assets",confirm_deleting_this_asset:"Are you sure to delete this asset?",confirm_deleting_selected_asset:"Are you sure to delete the selected asset?",confirm_deleting_selected_assets:"Are you sure to delete the selected {count} assets?",confirm_deleting_all_assets:"Are you sure to delete all the assets?",delete_entry:"Delete Entry",delete_entries:"Delete Entries",delete_selected_entry:"Delete Selected Entry",delete_selected_entries:"Delete Selected Entries",confirm_deleting_this_entry:"Are you sure to delete this entry?",confirm_deleting_this_entry_with_assets:"Are you sure to delete this entry and associated assets?",confirm_deleting_selected_entry:"Are you sure to delete the selected entry?",confirm_deleting_selected_entry_with_assets:"Are you sure to delete the selected entry and associated assets?",confirm_deleting_selected_entries:"Are you sure to delete the selected {count} entries?",confirm_deleting_selected_entries_with_assets:"Are you sure to delete the selected {count} entries and associated assets?",confirm_deleting_all_entries:"Are you sure to delete all the entries?",confirm_deleting_all_entries_with_assets:"Are you sure to delete all the entries and associated assets?",confirm_replacing_file:"Are you sure to replace “{name}” with the following file?",confirm_uploading_file:"Are you sure to save the following file to the “{folder}” folder?",confirm_uploading_files:"Are you sure to save the following {count} files to the “{folder}” folder?",no_entries_created:"This collection has no entries yet.",create_new_entry:"Create New Entry",no_files_in_collection:"No files available in this collection.",asset_info:"Asset Info",select_asset_show_info:"Select an asset to show the info.",duplicate_entry:"Duplicate Entry",entry_duplicated:"Entry has been duplicated. It’s now a new draft.",entry_validation_error:"One field has an error. Please correct it to save the entry.",entry_validation_errors:"{count} fields have an error. Please correct them to save the entry.",entry_saved:"Entry has been saved.",entry_saved_and_published:"Entry has been saved and published.",entry_deleted:"Entry has been deleted.",entries_deleted:"{count} entries have been deleted.",asset_saved:"Asset has been saved.",asset_saved_and_published:"Asset has been saved and published.",assets_saved:"{count} assets have been saved.",assets_saved_and_published:"{count} assets have been saved and published.",asset_url_copied:"Asset URL has been copied to clipboard.",asset_urls_copied:"Asset URLs have been copied to clipboard.",asset_path_copied:"Asset file path has been copied to clipboard.",asset_paths_copied:"Asset file paths have been copied to clipboard.",asset_data_copied:"Asset file has been copied to clipboard.",asset_downloaded:"Asset file has been downloaded.",assets_downloaded:"Asset files have been downloaded.",asset_moved:"Asset has been moved.",assets_moved:"{count} assets have been moved.",asset_renamed:"Asset has been renamed.",assets_renamed:"{count} assets have been renamed.",asset_deleted:"Asset has been deleted.",assets_deleted:"{count} assets have been deleted.",content_editor:"Content Editor",restore_backup_title:"Restore Draft",restore_backup_description:"This entry has a backup from {datetime}. Do you want to restore the edited draft?",draft_backup_saved:"Draft backup has been saved.",draft_backup_restored:"Draft backup has been restored.",draft_backup_deleted:"Draft backup has been deleted.",cancel_editing:"Cancel Editing",creating_x:"Creating {name}",creating_x_collection_entry:"You’re now creating a new entry in the “{collection}” collection.",editing_x_in_x:"Editing {collection} › {entry}",editing_x_collection_entry:"You’re now editing the “{entry}” entry in the “{collection}” collection.",editing_x_collection_file:"You’re now editing the “{file}” file in the “{collection}” collection.",save_and_publish:"Save and Publish",save_without_publishing:"Save without Publishing",show_editor_options:"Show Editor Options",editor_options:"Editor Options",show_preview:"Show Preview",sync_scrolling:"Sync Scrolling",switch_locale:"Switch Locale",locale_content_disabled_short:"(disabled)",locale_content_error_short:"(error)",edit:"Edit",preview:"Preview",edit_x_locale:"Edit {locale} Content",preview_x_locale:"Preview {locale} Content",content_preview:"Content Preview",show_content_options_x_locale:"Show {locale} Content Options",content_options_x_locale:"{locale} Content Options",x_field:"“{field}” Field",show_field_options:"Show Field Options",field_options:"Field Options",unsupported_widget_x:"Unsupported widget: {name}",enable_x_locale:"Enable {locale}",reenable_x_locale:"Reenable {locale}",disable_x_locale:"Disable {locale}",locale_x_has_been_disabled:"The {locale} content has been disabled.",locale_x_now_disabled:"The {locale} content is now disabled. It will be deleted when you save the entry.",view_in_repository:"View in Repository",view_on_x:"View on {service}",view_on_live_site:"View on Live Site",copy_from:"Copy from…",copy_from_x:"Copy from {locale}",translation_options:"Translation Options",translate:"Translate",translate_field:"Translate Field",translate_fields:"Translate Fields",translate_from:"Translate from…",translate_from_x:"Translate from {locale}",revert_changes:"Revert Changes",revert_all_changes:"Revert All Changes",edit_slug:"Edit Slug",edit_slug_warning:"Changing the slug may break internal and external links to the entry. Currently, Sveltia CMS does not update references created with the Relation widget, so you’ll need to manually update such references along with other links.",edit_slug_error:{empty:"The slug cannot be empty.",duplicate:"This slug is used for another entry."},required:"Required",editor:{translation:{none:"Nothing has been translated.",started:"Translating…",error:"There was an error while translating.",complete:{one:"Translated the field from {source}.",many:"Translated {count} fields from {source}."}},copy:{none:"Nothing has been copied.",complete:{one:"Copied the field from {source}.",many:"Copied {count} fields from {source}."}}},validation:{value_missing:"This field is required.",range_underflow:{number:"Value must be greater than or equal to {min}.",select_many:"You have to select at least {min} items.",select_one:"You have to select at least {min} item.",add_many:"You have to add at least {min} items.",add_one:"You have to add at least {min} item."},range_overflow:{number:"Value must be less than or equal to {max}.",select_many:"You cannot select more than {max} items.",select_one:"You cannot select more than {max} item.",add_many:"You cannot add more than {max} items.",add_one:"You cannot add more than {max} item."},too_short:{one:"You must enter at least {min} character.",many:"You must enter at least {min} characters."},too_long:{one:"You cannot enter more than {max} character.",many:"You cannot enter more than {max} characters."},type_mismatch:{number:"Please enter a number.",email:"Please enter a valid email.",url:"Please enter a valid URL."}},saving_entry:{error:{title:"Error",description:"There was an error while saving the entry. Please try again later."}},viewing_x_asset_details:"You’re viewing the details of the “{name}” asset.",asset_editor:"Asset Editor",preview_unavailable:"Preview Unavailable.",public_url:"Public URL",public_urls:"Public URLs",file_path:"File Path",file_paths:"File Paths",file_data:"File Data",kind:"Kind",size:"Size",dimensions:"Dimensions",duration:"Duration",used_in:"Used in",select_file:"Select File",select_image:"Select Image",replace_file:"Replace File",replace_image:"Replace Image",remove_file:"Remove File",remove_image:"Remove Image",remove_this_item:"Remove This Item",move_up:"Move Up",move_down:"Move Down",add_x:"Add {name}",select_list_type:"Select List Type",opacity:"Opacity",unselected_option:"(None)",assets_dialog:{title:{file:"Select File",image:"Select Image"},search_for_file:"Search for Files",search_for_image:"Search for Images",locations:"Locations",location:{local:"Your Computer",repository:"This Repository",external_locations:"External Locations",stock_photos:"Stock Photos"},error:{invalid_key:"Your API Key is invalid or expired. Please double check and try again.",search_fetch_failed:"There was an error while searching assets. Please try again later.",image_fetch_failed:"There was an error while downloading the selected asset. Please try again later."},available_images:"Available Images",enter_url:"Enter URL",enter_file_url:"Enter URL of the file:",enter_image_url:"Enter URL of the image:",large_file:{title:"Large File",description:"This file exceeds the maximum size of {size}. Please choose another."},photo_credit:{title:"Photo Credit",description:"Use the following credit if possible:"}},character_counter:{min_max:{one:"{count} character entered. Minimum: {min}. Maximum: {max}.",many:"{count} characters entered. Minimum: {min}. Maximum: {max}."},min:{one:"{count} character entered. Minimum: {min}.",many:"{count} characters entered. Minimum: {min}."},max:{one:"{count} character entered. Maximum: {max}.",many:"{count} characters entered. Maximum: {max}."}},youtube_video_player:"YouTube video player",today:"Today",now:"Now",editor_components:{image:"Image",src:"Source",alt:"Alt Text",title:"Title",link:"Link"},key_value:{key:"Key",value:"Value",action:"Action",empty_key:"Key is required.",duplicate_key:"Key must be unique."},boolean:{true:"Yes",false:"No"},cloud_storage:{invalid:"The service is not configured properly.",auth:{initial:"Sign into {service} to insert media on the storage to entry fields.",requested:"Signing in…",error:"User name or password is incorrect. Please double check and try again."}},config:{error:{no_secure_context:"Sveltia CMS only works with HTTPS or localhost URLs.",fetch_failed:"The configuration file could not be retrieved.",fetch_failed_not_ok:"HTTP response returned with status {status}.",parse_failed:"The configuration file could not be parsed.",parse_failed_invalid_object:"The configuration file is not a valid JavaScript object.",no_collection:"Collections are not defined in the configuration file.",no_backend:"The backend is not defined in the configuration file.",unsupported_backend:"The configured “{name}” backend is not supported.",no_repository:"The repository is not defined in the configuration file.",oauth_implicit_flow:"The configured authentication method (implicit flow) is not supported.",oauth_no_app_id:"OAuth application ID is not defined in the configuration file.",no_media_folder:"The media folder is not defined in the configuration file.",unexpected:"There was an unexpected error while validating the configuration file.",try_again:"Please solve the issue and try again."}},local_backend:{unsupported_browser:"Local development is not supported in your browser. Please use Chrome or Edge instead.",disabled:"Local development is disabled in your browser. <a>Here’s how to enable it</a>."},status:{drafts:"Drafts",in_review:"In Review",ready:"Ready"},categories:"Categories",prefs:{changes:{api_key_saved:"API key has been saved.",api_key_removed:"API key has been removed."},error:{permission_denied:"Browser storage (Cookie) access has been denied. Please check the permission and try again."},appearance:{title:"Appearance",theme:"Theme",select_theme:"Select Theme"},theme:{auto:"Auto",dark:"Dark",light:"Light"},languages:{title:"Languages",ui_language:{title:"User Interface Language",select_language:"Select Language"},translator:{title:"{service} Translator",field_label:"{service} API Authentication Key",description:"Sign up for <a {homeHref}>{service} API</a> and enter <a {apiKeyHref}>your Authentication Key</a> here to enable quick translation of text entry fields."}},contents:{title:"Contents",editor:{title:"Editor",close_on_save:{switch_label:"Close the editor after saving a draft"}}},media:{title:"Media",stock_photos:{title:"{service} Free Images",field_label:"{service} API Key",description:"Sign up for <a {homeHref}>{service} API</a> and enter <a {apiKeyHref}>your API Key</a> here to insert free stock photos to image entry fields.",credit:"Photos provided by {service}"}},accessibility:{title:"Accessibility",underline_links:{title:"Underline Links",description:"Show underline for links in the entry preview and user interface labels.",switch_label:"Always Underline Links"}},advanced:{title:"Advanced",deploy_hook:{title:"Deploy Hook",description:"Enter a webhook URL to be called when you manually trigger a deployment by selecting Publish Changes. This can be left blank if you’re using GitHub Actions.",field_label:"Deploy Hook URL",url_saved:"Webhook URL has been saved.",url_removed:"Webhook URL has been removed."},developer_mode:{title:"Developer Mode",description:"Enable some features, including detailed console logs and native context menus.",switch_label:"Enable Developer Mode"}}},keyboard_shortcuts_:{view_content_library:"View Content Library",view_asset_library:"View Asset Library",search:"Search for entries and assets",create_entry:"Create a new entry",save_entry:"Save an entry",cancel_editing:"Cancel entry editing"},file_type_labels:{avif:"AVIF image",bmp:"Bitmap image",gif:"GIF image",ico:"Icon",jpeg:"JPEG image",jpg:"JPEG image",png:"PNG image",svg:"SVG image",tif:"TIFF image",tiff:"TIFF image",webp:"WebP image",avi:"AVI video",mp4:"MP4 video",mpeg:"MPEG video",ogv:"OGG video",ts:"MPEG video",webm:"WebM video","3gp":"3GPP video","3g2":"3GPP2 video",aac:"AAC audio",mid:"MIDI",midi:"MIDI",mp3:"MP3 audio",opus:"OPUS audio",wav:"WAV audio",weba:"WebM audio",csv:"CSV spreadsheet",doc:"Word document",docx:"Word document",odp:"OpenDocument presentation",ods:"OpenDocument spreadsheet",odt:"OpenDocument text",pdf:"PDF document",ppt:"PowerPoint presentation",pptx:"PowerPoint presentation",rtf:"Rich text document",xls:"Excel spreadsheet",xlsx:"Excel spreadsheet",html:"HTML text",js:"JavaScript",json:"JSON text",md:"Markdown text",toml:"TOML text",yaml:"YAML text",yml:"YAML text"},file_size_units:{b:"{size} bytes",kb:"{size} KB",mb:"{size} MB",gb:"{size} GB",tb:"{size} TB"}},$K=Object.freeze(Object.defineProperty({__proto__:null,strings:OK},Symbol.toStringTag,{value:"Module"})),LK={collections:"コレクション",contents:"コンテンツ",entries:"エントリー",assets:"アセット",media:"メディア",workflow:"ワークフロー",editorial_workflow:"編集ワークフロー",user_name:"ユーザー名",password:"パスワード",sign_in:"ログイン",signed_in_as_x:"{name} としてログイン中",working_with_local_repo:"ローカルレポジトリで作業中",sign_out:"ログアウト",create:"新規作成",select:"選択",select_all:"すべて選択",upload:"アップロード",copy:"コピー",download:"ダウンロード",duplicate:"複製",delete:"削除",save:"保存",saving:"保存中…",rename:"名前を変更",update:"更新",replace:"差し替え",add:"追加",remove:"削除",remove_x:"{name} を削除",clear:"クリア",expand:"広げる",expand_all:"すべて広げる",collapse:"折り畳む",collapse_all:"すべて折り畳む",insert:"挿入",restore:"復元",discard:"破棄",searching:"検索中…",global:"グローバル",primary:"プライマリー",secondary:"セカンダリー",collection:"コレクション",folder:"フォルダー",api_key:"API キー",details:"詳細",clipboard_error:"データのコピー中に問題が発生しました。",welcome_to_sveltia_cms:"Sveltia CMS へようこそ",loading_site_config:"サイト設定を読み込んでいます…",loading_site_data:"サイトデータを読み込んでいます…",loading_site_data_error:"サイトデータの読み込み中にエラーが発生しました。",sign_in_with_x:"{service} でログイン",authorizing:"認証中…",signing_in:"ログイン中…",work_with_local_repo:"ローカルレポジトリで作業",work_with_local_repo_description:"ボタンをクリックして「{repo}」レポジトリのルートディレクトリを選択してください。",work_with_local_repo_description_no_repo:"ボタンをクリックして Git レポジトリのルートディレクトリを選択してください。",sign_in_error:{not_project_root:"選択されたフォルダーはレポジトリのルートディレクトリではありません。再度お試しください。",picker_dismissed:"レポジトリのルートディレクトリを選択できませんでした。再度お試しください。",authentication_aborted:"認証が中断されました。再度お試しください。",UNSUPPORTED_BACKEND:"この認証アプリはお使いの Git バックエンドに対応していません。",UNSUPPORTED_DOMAIN:"この認証アプリではお使いのドメインの使用は許可されていません。",MISCONFIGURED_CLIENT:"OAuth アプリのクライアント ID またはシークレットが設定されていません。",AUTH_CODE_REQUEST_FAILED:"認証コードを取得できませんでした。後で再度お試しください。",CSRF_DETECTED:"CSRF 攻撃の可能性が検出されたため、認証フローは中断されました。",TOKEN_REQUEST_FAILED:"アクセストークンを要求できませんでした。後で再度お試しください。",MALFORMED_RESPONSE:"サーバーから不正なデータが返されました。後で再度お試しください。"},repository_no_access:"あなたには「{repo}」レポジトリへのアクセス権がありません。",repository_not_found:"「{repo}」レポジトリは存在しません。",repository_empty:"「{repo}」レポジトリにはブランチがありません。",branch_not_found:"「{repo}」レポジトリに「{branch}」ブランチは存在しません。",unexpected_error:"予期せぬエラー",entry_parse_error:"エントリーファイルの読み込み中にエラーが発生しました。詳しくはブラウザーのコンソールを確認してください。",entry_parse_errors:"エントリーファイルの読み込み中にエラーが発生しました。詳しくはブラウザーのコンソールを確認してください。",visit_live_site:"管理対象サイトを開く",switch_page:"ページを切り替え",search_placeholder:"エントリーとアセットを検索…",create_entry_or_assets:"エントリーまたはアセットを作成",publish_changes:"変更を公開",publishing_changes:"変更を公開しています…",publishing_changes_failed:"変更を公開できませんでした。後で再度お試しください。",show_notifications:"通知を表示",notifications:"通知",show_account_menu:"アカウントメニューを表示",account:"アカウント",live_site:"管理対象サイト",git_repository:"Git レポジトリ",settings:"設定",site_config:"サイト設定",show_help_menu:"ヘルプメニューを表示",help:"ヘルプ",keyboard_shortcuts:"キーボードショートカット",documentation:"ドキュメンテーション",release_notes:"リリースノート",version_x:"バージョン {version}",report_issue:"問題を報告",share_feedback:"フィードバックを共有",get_help:"サポート",join_discord:"Discord チャンネルに参加",update_available:"Sveltia CMS の最新版が利用可能です。",update_now:"今すぐ更新",backend_status:{minor_incident:"{service} で軽微な障害が発生しています。ワークフローに潜在的な影響が及ぶ可能性があります。",major_incident:"{service} で重大な障害が発生しています。状況が改善されるまで待った方が良いかもしれません。"},content_library:"コンテンツライブラリ",asset_library:"アセットライブラリ",collection_assets:"コレクションアセット",entry_assets:"エントリーアセット",entry_list:"エントリーリスト",file_list:"ファイルリスト",asset_list:"アセットリスト",x_collection:"「{collection}」コレクション",x_asset_folder:"「{folder}」アセットフォルダー",viewing_x_collection_many_entries:"「{collection}」コレクションを表示しています。ここには {count} 個のエントリーがあります。",viewing_x_collection_one_entry:"「{collection}」コレクションを表示しています。ここにはひとつのエントリーがあります。",viewing_x_collection_no_entries:"「{collection}」コレクションを表示しています。ここにはまだエントリーがありません。",viewing_x_asset_folder_many_assets:"「{folder}」アセットフォルダーを表示しています。ここには {count} 個のアセットがあります。",viewing_x_asset_folder_one_asset:"「{folder}」アセットフォルダーを表示しています。ここにはひとつのアセットがあります。",viewing_x_asset_folder_no_assets:"「{folder}」アセットフォルダーを表示しています。ここにはまだアセットがありません。",collection_not_found:"コレクションが見つかりませんでした",file_not_found:"ファイルが見つかりませんでした",x_of_x_selected:"{total} 個のうち {selected} 個を選択中",switch_view:"ビューを切り替え",list_view:"リストビュー",grid_view:"グリッドビュー",sort:"並び替え",sorting_options:"並べ替えオプション",sort_keys:{none:"なし",name:"名前",commit_author:"更新者",commit_date:"更新日時"},ascending:"{label} (A–Z)",ascending_date:"{label} (古い順)",descending:"{label} (Z–A)",descending_date:"{label} (新しい順)",filter:"絞り込み",filtering_options:"絞り込みオプション",group:"グループ化",grouping_options:"グループ化オプション",type:"種類",all:"すべて",image:"画像",video:"動画",audio:"音声",document:"書類",other:"その他",show_assets:"アセットを表示",hide_assets:"アセットを隠す",show_info:"情報を表示",hide_info:"情報を隠す",asset_folders:"アセットフォルダー",all_assets:"すべてのアセット",uncategorized:"未分類",creating_entries_disabled_by_admin:"このコレクションへの新しいエントリーの作成は、管理者によって無効化されています。",creating_entries_disabled_by_limit:"このコレクションは最大の {limit} エントリーに達したため、新しいエントリーを作成することはできません。",back_to_collection:"コレクションへ戻る",search_results_for_x:"「{terms}」の検索結果",viewing_search_results:"「{terms}」の検索結果を表示しています。{entries} と {assets} が見つかりました。",many_entries:"{count} 個のエントリー",one_entry:"1 個のエントリー",no_entries:"0 個のエントリー",many_assets:"{count} 個のアセット",one_asset:"1 個のアセット",no_assets:"0 個のアセット",no_files_found:"ファイルは見つかりませんでした。",no_entries_found:"エントリーは見つかりませんでした。",upload_assets:"新しいアセットをアップロード",edit_options:"編集オプション",show_edit_options:"編集オプションを表示",edit_asset:"アセットを編集",edit_x:"{name} を編集",wrap_long_lines:"長い行を折り返す",rename_asset:"アセットの名前を変更",rename_x:"{name} の名前を変更",enter_new_name_for_asset:"新しい名前を以下に入力してください。",enter_new_name_for_asset_with_one_entry:"新しい名前を以下に入力してください。このアセットを使用している 1 個のエントリーも更新されます。",enter_new_name_for_asset_with_many_entries:"新しい名前を以下に入力してください。このアセットを使用している {count} 個のエントリーも更新されます。",enter_new_name_for_asset_error:{empty:"ファイル名を空白にすることはできません。",character:"ファイル名に特別な文字を含めることはできません。",duplicate:"このファイル名は他のアセットに使われています。"},replace_asset:"アセットを差し替え",replace_x:"{name} を差し替え",browse_file:"クリックして参照",drop_or_browse_file:"ここにファイルをドロップするかクリックして参照",drop_or_browse_files:"ここにファイルをドロップするかクリックして参照",drop_or_browse_image_file:"ここに画像ファイルをドロップするかクリックして参照",drop_or_browse_image_files:"ここに画像ファイルをドロップするかクリックして参照",drop_file_here:"ここにファイルをドロップ",drop_files_here:"ここにファイルをドロップ",drop_files_type_mismatch:"ドロップされたファイルは「{type}」形式ではありません。再度お試しください。",choose_file:"ファイルを選択",choose_files:"ファイルを選択",delete_asset:"アセットを削除",delete_assets:"アセットを削除",delete_selected_asset:"選択されたアセットを削除",delete_selected_assets:"選択されたアセットを削除",confirm_deleting_this_asset:"このアセットを削除してもよろしいですか?",confirm_deleting_selected_asset:"選択されたファイルを削除してもよろしいですか?",confirm_deleting_selected_assets:"選択された {count} 個のファイルを削除してもよろしいですか?",confirm_deleting_all_assets:"すべてのアセットを削除してもよろしいですか?",delete_entry:"エントリーを削除",delete_entries:"エントリーを削除",delete_selected_entry:"選択されたエントリーを削除",delete_selected_entries:"選択されたエントリーを削除",confirm_deleting_this_entry:"このエントリーを削除してもよろしいですか?",confirm_deleting_this_entry_with_assets:"このエントリーと関連アセットを削除してもよろしいですか?",confirm_deleting_selected_entry:"選択されたエントリーを削除してもよろしいですか?",confirm_deleting_selected_entry_with_assets:"選択されたエントリーと関連アセットを削除してもよろしいですか?",confirm_deleting_selected_entries:"選択された {count} 個のエントリーを削除してもよろしいですか?",confirm_deleting_selected_entries_with_assets:"選択された {count} 個のエントリーと関連アセットを削除してもよろしいですか?",confirm_deleting_all_entries:"すべてのエントリーを削除してもよろしいですか?",confirm_deleting_all_entries_with_assets:"すべてのエントリーと関連アセットを削除してもよろしいですか?",confirm_replacing_file:"「{name}」を以下のファイルと差し替えてもよろしいですか?",confirm_uploading_file:"以下のファイルを「{folder}」フォルダーに保存してもよろしいですか?",confirm_uploading_files:"以下の {count} 個のファイルを「{folder}」フォルダーに保存してもよろしいですか?",no_entries_created:"このコレクションにはまだエントリーがありません。",create_new_entry:"新しいエントリーを作成",no_files_in_collection:"このコレクションにはファイルがありません。",asset_info:"アセット情報",select_asset_show_info:"アセットを選択すると情報が表示されます。",duplicate_entry:"エントリーを複製",entry_duplicated:"エントリーが複製され、新しい下書きとなりました。",entry_validation_error:"ひとつのフィールドにエラーがあります。エントリーを保存するには問題を修正してください。",entry_validation_errors:"{count} 個のフィールドにエラーがあります。エントリーを保存するには問題を修正してください。",entry_saved:"エントリーが保存されました。",entry_saved_and_published:"エントリーが保存、公開されました。",entry_deleted:"エントリーが削除されました。",entries_deleted:"{count} 個のエントリーが削除されました。",asset_saved:"アセットが保存されました。",asset_saved_and_published:"アセットが保存、公開されました。",assets_saved:"{count} 個のアセットが保存されました。",assets_saved_and_published:"{count} 個のアセットが保存、公開されました。",asset_url_copied:"アセット URL がクリップボードにコピーされました。",asset_urls_copied:"アセット URL がクリップボードにコピーされました。",asset_path_copied:"アセットファイルパスがクリップボードにコピーされました。",asset_paths_copied:"アセットファイルパスがクリップボードにコピーされました。",asset_data_copied:"アセットファイルがクリップボードにコピーされました。",asset_downloaded:"アセットファイルがダウンロードされました。",assets_downloaded:"アセットファイルがダウンロードされました。",asset_moved:"アセットが移動されました。",assets_moved:"{count} 個のアセットが移動されました。",asset_renamed:"アセットの名前が変更されました。",assets_renamed:"{count} 個のアセットの名前が変更されました。",asset_deleted:"アセットが削除されました。",assets_deleted:"{count} 個のアセットが削除されました。",content_editor:"コンテンツエディター",restore_backup_title:"下書きを復元",restore_backup_description:"このエントリーには {datetime} に保存されたバックアップがあります。その編集済みの下書きを復元しますか?",draft_backup_saved:"下書きのバックアップが保存されました。",draft_backup_restored:"下書きのバックアップが復元されました。",draft_backup_deleted:"下書きのバックアップが削除されました。",cancel_editing:"編集をキャンセル",creating_x:"{name} を作成",creating_x_collection_entry:"「{collection}」コレクションの新しいエントリーを作成しています。",editing_x_in_x:"{collection} › {entry} を編集",editing_x_collection_entry:"「{collection}」コレクションの「{entry}」エントリーを編集しています。",editing_x_collection_file:"「{collection}」コレクションの「{file}」ファイルを編集しています。",save_and_publish:"保存して公開",save_without_publishing:"公開せずに保存",show_editor_options:"エディターオプションを表示",editor_options:"エディターオプション",show_preview:"プレビューを表示",sync_scrolling:"スクロールを同期",switch_locale:"ロケールを切り替え",locale_content_disabled_short:"(無効)",locale_content_error_short:"(エラー)",edit:"編集",preview:"プレビュー",edit_x_locale:"{locale} コンテンツを編集",preview_x_locale:"{locale} コンテンツをプレビュー",content_preview:"コンテンツプレビュー",show_content_options_x_locale:"{locale} コンテンツのオプションを表示",content_options_x_locale:"{locale} コンテンツのオプション",x_field:"「{field}」フィールド",show_field_options:"フィールドオプションを表示",field_options:"フィールドオプション",unsupported_widget_x:"非対応ウィジェット: {name}",enable_x_locale:"{locale} を有効化",reenable_x_locale:"{locale} を再度有効化",disable_x_locale:"{locale} を無効化",locale_x_has_been_disabled:"{locale} コンテンツは無効化されています。",locale_x_now_disabled:"{locale} コンテンツは無効化されました。エントリーを保存する際に削除されます。",view_in_repository:"レポジトリ内で見る",view_on_x:"{service} で見る",view_on_live_site:"管理対象サイトで見る",copy_from:"他の言語からコピー…",copy_from_x:"{locale} からコピー",translation_options:"翻訳オプション",translate:"翻訳",translate_field:"フィールドを翻訳",translate_fields:"フィールドを翻訳",translate_from:"他の言語から翻訳…",translate_from_x:"{locale} から翻訳",revert_changes:"変更を取り消す",revert_all_changes:"すべての変更を取り消す",edit_slug:"スラッグを編集",edit_slug_warning:"スラッグを変更すると、エントリーへの内部・外部リンクが壊れる可能性があります。現在のところ、Sveltia CMS は Relation ウィジェットで作成された参照を更新しないため、そのような参照は他のリンクとともに手動で更新する必要があります。",edit_slug_error:{empty:"スラッグは空白にはできません。",duplicate:"このスラッグは他のエントリーに使われています。"},required:"必須",editor:{translation:{none:"翻訳されたフィールドはありません。",started:"翻訳中…",error:"翻訳中に問題が発生しました。",complete:{one:"{source} からフィールドを翻訳しました。",many:"{source} から {count} 個のフィールドを翻訳しました。"}},copy:{none:"コピーされたフィールドはありません。",complete:{one:"{source} からフィールドをコピーしました。",many:"{source} から {count} 個のフィールドをコピーしました。"}}},validation:{value_missing:"この項目は必須です。",range_underflow:{select_many:"少なくとも {min} 個の項目を選択してください。",select_one:"少なくとも {min} 個の項目を選択してください。",add_many:"少なくとも {min} 個の項目を追加してください。",add_one:"少なくとも {min} 個の項目を追加してください。"},range_overflow:{select_many:"選択できるのは最大で {max} 項目です。",select_one:"選択できるのは最大で {max} 項目です。",add_many:"追加できるのは最大で {max} 項目です。",add_one:"追加できるのは最大で {max} 項目です。"},too_short:{one:"少なくとも {min} 文字は入力してください。",many:"少なくとも {min} 文字は入力してください。"},too_long:{one:"{max} 文字を超える入力はできません。",many:"{max} 文字を超える入力はできません。"},type_mismatch:{email:"正しいメールアドレスを入力してください。",url:"正しい URL を入力してください。"}},saving_entry:{error:{title:"エラー",description:"エントリーを保存中に問題が発生しました。後で再度お試しください。"}},viewing_x_asset_details:"「{name}」アセットの詳細を表示しています。",asset_editor:"アセットエディター",preview_unavailable:"プレビューは表示できません",public_url:"公開 URL",public_urls:"公開 URL",file_path:"ファイルパス",file_paths:"ファイルパス",file_data:"ファイルデータ",kind:"種類",size:"サイズ",dimensions:"大きさ",duration:"再生時間",used_in:"使われているエントリー",select_file:"ファイルを選択",select_image:"画像を選択",replace_file:"ファイルを差し替え",replace_image:"画像を差し替え",remove_file:"ファイルを削除",remove_image:"画像を削除",remove_this_item:"このアイテムを削除",move_up:"上へ移動",move_down:"下へ移動",add_x:"{name} を追加",select_list_type:"リストタイプを選択",opacity:"透明度",unselected_option:"(なし)",assets_dialog:{title:{file:"ファイルを選択",image:"画像を選択"},search_for_file:"ファイルを検索",search_for_image:"画像を検索",locations:"場所",location:{local:"お使いのコンピューター",repository:"このレポジトリ",external_locations:"外部の場所",stock_photos:"ストックフォト"},error:{invalid_key:"あなたの API キーは正しくないか期限切れです。確認の上、再度お試しください。",search_fetch_failed:"アセットを検索中に問題が発生しました。後で再度お試しください。",image_fetch_failed:"選択されたアセットをダウンロード中に問題が発生しました。後で再度お試しください。"},available_images:"利用可能な画像",enter_url:"URL を入力",enter_file_url:"ファイルの URL を入力:",enter_image_url:"画像の URL を入力:",large_file:{title:"大きなファイル",description:"このファイルは最大サイズ {size} を超えています。他のファイルを選んでください。"},photo_credit:{title:"写真クレジット",description:"可能であれば以下のクレジットを使ってください:"}},character_counter:{min_max:{one:"{count} 文字入力されています。最小: {min}。最大 {max}。",many:"{count} 文字入力されています。最小: {min}。最大 {max}。"},min:{one:"{count} 文字入力されています。最小: {min}。",many:"{count} 文字入力されています。最小: {min}。"},max:{one:"{count} 文字入力されています。最大: {max}。",many:"{count} 文字入力されています。最大: {max}。"}},youtube_video_player:"YouTube 動画プレーヤー",today:"今日",now:"現在時刻",editor_components:{image:"画像",src:"ソース",alt:"代替テキスト",title:"タイトル",link:"リンク"},key_value:{key:"キー",value:"値",action:"アクション",empty_key:"キーは必須です。",duplicate_key:"キーが重複しています。"},boolean:{true:"はい",false:"いいえ"},cloud_storage:{invalid:"このサービスは正しく設定されていません。",auth:{initial:"{service} へログインすると、ストレージ上のメディアをエントリー項目へ挿入できます。",requested:"ログイン中…",error:"ユーザー名またはパスワードが間違っています。確認の上、再度お試しください。"}},config:{error:{no_secure_context:"Sveltia CMS は HTTPS またはローカルホスト URL でのみ動作します。",fetch_failed:"設定ファイルを読み込めませんでした。",fetch_failed_not_ok:"HTTP レスポンスがステータス {status} で返されました。",parse_failed:"設定ファイルを解析できませんでした。",parse_failed_invalid_object:"設定ファイルが有効な JavaScript オブジェクトではありません。",no_collection:"設定ファイル内でコレクションが定義されていません。",no_backend:"設定ファイル内でバックエンドが定義されていません。",unsupported_backend:"設定されている「{name}」バックエンドは非対応です。",no_repository:"設定ファイル内でレポジトリが定義されていません。",oauth_implicit_flow:"設定されている認証方式 (暗黙的フロー) は非対応です。",oauth_no_app_id:"設定ファイル内で OAuth アプリケーション ID が定義されていません。",no_media_folder:"設定ファイル内でメディアフォルダーが定義されていません。",unexpected:"設定ファイルを検証中に予期せぬ問題が発生しました。",try_again:"問題を解決してから再度お試しください。"}},local_backend:{unsupported_browser:"お使いのブラウザーはローカル開発に対応していません。代わりに Chrome か Edge を使ってください。",disabled:"お使いのブラウザーではローカル開発が無効化されています。<a>有効化する方法はこちら</a>。"},status:{drafts:"下書き",in_review:"レビュー中",ready:"公開可"},categories:"カテゴリ",prefs:{changes:{api_key_saved:"API キーが保存されました。",api_key_removed:"API キーが削除されました。"},error:{permission_denied:"ブラウザーストレージ (Cookie) アクセスが拒否されました。許可設定を確認の上、再度お試しください。"},appearance:{title:"アピアランス",theme:"テーマ",select_theme:"テーマを選択"},theme:{auto:"自動",dark:"ダーク",light:"ライト"},languages:{title:"言語",ui_language:{title:"ユーザーインターフェース言語",select_language:"言語を選択"},translator:{title:"{service} 翻訳",field_label:"{service} API 認証キー",description:"<a {homeHref}>{service} API</a> にユーザー登録して、<a {apiKeyHref}>発行された認証キー</a> をここに入力すると、テキストエントリー項目の素早い翻訳が可能となります。"}},contents:{title:"コンテンツ",editor:{title:"エディター",close_on_save:{switch_label:"下書き保存後にエディターを閉じる"}}},media:{title:"メディア",stock_photos:{title:"{service} 無料画像素材",field_label:"{service} API キー",description:"<a {homeHref}>{service} API</a> にユーザー登録して、<a {apiKeyHref}>発行された API キー</a> をここに入力すると、画像エントリー項目に無料のストックフォトを挿入できます。",credit:"写真提供: {service}"}},accessibility:{title:"アクセシビリティ",underline_links:{title:"リンクに下線を付ける",description:"エントリープレビューやユーザーインターフェイスラベル内のリンクに下線を表示します。",switch_label:"常に下線を付ける"}},advanced:{title:"詳細",deploy_hook:{title:"デプロイフック",description:"「変更を公開」を選択して手動でデプロイを実行する際に呼び出すウェブフック URL を入力してください。GitHub Actions を使用する場合は空欄のままで構いません。",field_label:"デプロイフック URL",url_saved:"ウェブフック URL が保存されました。",url_removed:"ウェブフック URL が削除されました。"},developer_mode:{title:"開発者モード",description:"詳細なコンソールログやネイティブコンテキストメニューなど、いくつかの機能を有効化します。",switch_label:"開発者モードを有効にする"}}},keyboard_shortcuts_:{view_content_library:"コンテンツライブラリを表示",view_asset_library:"アセットライブラリを表示",search:"エントリーとアセットを検索",create_entry:"新しいエントリーを作成",save_entry:"エントリーを保存",cancel_editing:"エントリーの編集をキャンセル"},file_type_labels:{avif:"AVIF 画像",bmp:"Bitmap 画像",gif:"GIF 画像",ico:"アイコン",jpeg:"JPEG 画像",jpg:"JPEG 画像",png:"PNG 画像",svg:"SVG 画像",tif:"TIFF 画像",tiff:"TIFF 画像",webp:"WebP 画像",avi:"AVI 動画",mp4:"MP4 動画",mpeg:"MPEG 動画",ogv:"OGG 動画",ts:"MPEG 動画",webm:"WebM 動画","3gp":"3GPP 動画","3g2":"3GPP2 動画",aac:"AAC 音声",mid:"MIDI",midi:"MIDI",mp3:"MP3 音声",opus:"OPUS 音声",wav:"WAV 音声",weba:"WebM 音声",csv:"CSV スプレッドシート",doc:"Word ドキュメント",docx:"Word ドキュメント",odp:"OpenDocument プレゼンテーション",ods:"OpenDocument スプレッドシート",odt:"OpenDocument テキスト",pdf:"PDF ドキュメント",ppt:"PowerPoint プレゼンテーション",pptx:"PowerPoint プレゼンテーション",rtf:"リッチテキストドキュメント",xls:"Excel スプレッドシート",xlsx:"Excel スプレッドシート",html:"HTML テキスト",js:"JavaScript",json:"JSON テキスト",md:"Markdown テキスト",toml:"TOML テキスト",yaml:"YAML テキスト",yml:"YAML テキスト"},file_size_units:{b:"{size} バイト",kb:"{size} KB",mb:"{size} MB",gb:"{size} GB",tb:"{size} TB"}},NK=Object.freeze(Object.defineProperty({__proto__:null,strings:LK},Symbol.toStringTag,{value:"Module"})),IK=()=>{Object.entries(Object.assign({"/src/lib/locales/en.js":$K,"/src/lib/locales/ja.js":NK})).forEach(([e,{strings:n}])=>{const r=Ln(e).filename;rb(r,n)}),FE({fallbackLocale:"en",initialLocale:ne(Tt).locale||(y$()??"").split("-")[0]||"en"})};var RK=F('<link rel="icon">'),DK=F('<meta name="referrer" content="same-origin"> <meta name="robots" content="noindex"> <!> <!>',1),MK=F('<div role="none" class="outer svelte-1729mpr"><!> <!> <div role="none" class="main svelte-1729mpr"><!> <!></div></div>'),FK=F('<!> <div role="status" class="svelte-1729mpr"> </div>',1);const zK={hash:"svelte-1729mpr",code:"body:not(:has(#nc-root)) {overflow:hidden;}#nc-root > .sui.app-shell {position:absolute;}.outer.svelte-1729mpr {display:flex;flex-direction:column;position:absolute;inset:0;overflow:hidden;}.main.svelte-1729mpr {position:relative;flex:auto;display:flex;flex-direction:column;overflow:hidden;background-color:var(--sui-secondary-background-color);}[role=status].svelte-1729mpr {position:absolute;z-index:-1;opacity:0;pointer-events:none;-webkit-user-select:none;user-select:none;}"};function jK(t,e){se(e,!0),Te(t,zK);const[n,r]=ve(),i=()=>z(wt,"$siteConfig",n),s=()=>z(Cf,"$isLoading",n),o=()=>z(In,"$backend",n),a=()=>z(gi,"$user",n),c=()=>z(dc,"$dataLoaded",n),u=()=>z(bs,"$announcedPageStatus",n);cn(()=>{IK(),lq(e.config)}),cn(()=>{const d=document.querySelector("#nc-root");if(d&&window.getComputedStyle(d).position==="static"){const{top:f,height:h}=d.getBoundingClientRect();h?d.style.position="relative":(d.style.position="fixed",d.style.inset=`${f}px 0 0 0`)}}),sk(d=>{var f=DK(),h=D(M(f),4);{var p=m=>{var v=RK();const _=w(()=>i().logo_url);q((b,y)=>{ke(v,"href",b),ke(v,"type",y)},[()=>l(_)||`data:image/svg+xml;base64,${btoa(UE)}`,()=>l(_)?Jo.getType(l(_))??void 0:"image/svg+xml"]),T(m,v)};U(h,m=>{i()&&m(p)})}var g=D(h,2);U(g,m=>{}),T(d,f)}),wi("mousedown",Kv.body,d=>{d.target?.matches("a")&&d.target.origin!==window.location.origin&&(d.target.target="_blank")}),SF(t,{children:(d,f)=>{var h=FK(),p=M(h);{var g=_=>{var b=MK(),y=R(b);Y5(y,{});var x=D(y,2);{var k=O=>{W5(O,{})};U(x,O=>{o()&&O(k)})}var S=D(x,2),C=R(S);q5(C,{});var E=D(C,2);{var A=O=>{PK(O,{})};U(E,O=>{a()&&c()&&O(A)})}T(_,b)};U(p,_=>{s()||_(g)})}var m=D(p,2),v=R(m);q(()=>Z(v,u())),T(d,h)},$$slots:{default:!0}}),oe(),r()}const UK=["registerEditorComponent","registerEventListener","registerPreviewStyle","registerPreviewTemplate","registerWidget"],BK=["getBackend","getCustomFormats","getCustomFormatsExtensions","getCustomFormatsFormatters","getEditorComponents","getEventListeners","getLocale","getMediaLibrary","getPreviewStyles","getPreviewTemplate","getRemarkPlugins","getWidget","getWidgetValueSerializer","getWidgets","invokeEvent","moment","registerBackend","registerLocale","registerMediaLibrary","registerRemarkPlugin","registerWidgetValueSerializer","removeEventListener","resolveWidget"],qK="https://github.com/sveltia/sveltia-cms#compatibility";let w1=!1;const Ey=async({config:t={}}={})=>{w1||(w1=!0,document.readyState==="loading"&&!document.querySelector("#nc-root")&&await new Promise(e=>{window.addEventListener("DOMContentLoaded",()=>e(void 0),{once:!0})}),Qv(jK,{target:document.querySelector("#nc-root")??document.body,props:{config:t}}))},HK=(t,e,{fromFile:n,toFile:r})=>{rp[t]={extension:e,parser:n,formatter:r}},VK=new Proxy({init:Ey,registerCustomFormat:HK},{get:(t,e)=>{if(e in t)return t[e];let n="";if(UK.includes(e)&&(n="CMS.%s() is not yet supported in Sveltia CMS, but we plan to implement it soon."),BK.includes(e)&&(n="CMS.%s() is not supported in Sveltia CMS, and we don’t have any plans to implement it."),n)return console.error(`${n} See %s for compatibility information.`,e,qK),()=>{}}});window.CMS=VK;window.initCMS=Ey;!window.CMS_MANUAL_INIT&&(document.currentScript||document.querySelector('script[src$="/sveltia-cms.js"]'))&&Ey();export{VK as default,Ey as init};
616
606
  /**
617
607
  * Prism: Lightweight, robust, elegant syntax highlighting
618
608
  *