@sveltia/cms 0.6.2 → 0.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/sveltia-cms.js +1 -1
- package/package.json +1 -1
package/dist/sveltia-cms.js
CHANGED
|
@@ -435,4 +435,4 @@ var _w;function fe(){return _w.apply(null,arguments)}function x8(t){_w=t}functio
|
|
|
435
435
|
[`+r+"] ";for(l in arguments[0])st(arguments[0],l)&&(s+=l+": "+arguments[0][l]+", ");s=s.slice(0,-2)}else s=arguments[r];n.push(s)}vw(t+`
|
|
436
436
|
Arguments: `+Array.prototype.slice.call(n).join("")+`
|
|
437
437
|
`+new Error().stack),i=!1}return e.apply(this,arguments)},e)}var a_={};function kw(t,e){fe.deprecationHandler!=null&&fe.deprecationHandler(t,e),a_[t]||(vw(e),a_[t]=!0)}fe.suppressDeprecationWarnings=!1;fe.deprecationHandler=null;function Mi(t){return typeof Function<"u"&&t instanceof Function||Object.prototype.toString.call(t)==="[object Function]"}function B8(t){var e,i;for(i in t)st(t,i)&&(e=t[i],Mi(e)?this[i]=e:this["_"+i]=e);this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function td(t,e){var i=bs({},t),n;for(n in e)st(e,n)&&(Js(t[n])&&Js(e[n])?(i[n]={},bs(i[n],t[n]),bs(i[n],e[n])):e[n]!=null?i[n]=e[n]:delete i[n]);for(n in t)st(t,n)&&!st(e,n)&&Js(t[n])&&(i[n]=bs({},i[n]));return i}function vp(t){t!=null&&this.set(t)}var nd;Object.keys?nd=Object.keys:nd=function(t){var e,i=[];for(e in t)st(t,e)&&i.push(e);return i};var H8={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function V8(t,e,i){var n=this._calendar[t]||this._calendar.sameElse;return Mi(n)?n.call(e,i):n}function Ii(t,e,i){var n=""+Math.abs(t),s=e-n.length,r=t>=0;return(r?i?"+":"":"-")+Math.pow(10,Math.max(0,s)).toString().substr(1)+n}var kp=/(\[[^\[]*\])|(\\)?([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,Xo=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Gu={},Gr={};function Le(t,e,i,n){var s=n;typeof n=="string"&&(s=function(){return this[n]()}),t&&(Gr[t]=s),e&&(Gr[e[0]]=function(){return Ii(s.apply(this,arguments),e[1],e[2])}),i&&(Gr[i]=function(){return this.localeData().ordinal(s.apply(this,arguments),t)})}function q8(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function Y8(t){var e=t.match(kp),i,n;for(i=0,n=e.length;i<n;i++)Gr[e[i]]?e[i]=Gr[e[i]]:e[i]=q8(e[i]);return function(s){var r="",l;for(l=0;l<n;l++)r+=Mi(e[l])?e[l].call(s,t):e[l];return r}}function pa(t,e){return t.isValid()?(e=ww(e,t.localeData()),Gu[e]=Gu[e]||Y8(e),Gu[e](t)):t.localeData().invalidDate()}function ww(t,e){var i=5;function n(s){return e.longDateFormat(s)||s}for(Xo.lastIndex=0;i>=0&&Xo.test(t);)t=t.replace(Xo,n),Xo.lastIndex=0,i-=1;return t}var G8={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 W8(t){var e=this._longDateFormat[t],i=this._longDateFormat[t.toUpperCase()];return e||!i?e:(this._longDateFormat[t]=i.match(kp).map(function(n){return n==="MMMM"||n==="MM"||n==="DD"||n==="dddd"?n.slice(1):n}).join(""),this._longDateFormat[t])}var K8="Invalid date";function Z8(){return this._invalidDate}var X8="%d",J8=/\d{1,2}/;function Q8(t){return this._ordinal.replace("%d",t)}var eI={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 tI(t,e,i,n){var s=this._relativeTime[i];return Mi(s)?s(t,e,i,n):s.replace(/%d/i,t)}function nI(t,e){var i=this._relativeTime[t>0?"future":"past"];return Mi(i)?i(e):i.replace(/%s/i,e)}var Yl={};function an(t,e){var i=t.toLowerCase();Yl[i]=Yl[i+"s"]=Yl[e]=t}function si(t){return typeof t=="string"?Yl[t]||Yl[t.toLowerCase()]:void 0}function wp(t){var e={},i,n;for(n in t)st(t,n)&&(i=si(n),i&&(e[i]=t[n]));return e}var yw={};function cn(t,e){yw[t]=e}function iI(t){var e=[],i;for(i in t)st(t,i)&&e.push({unit:i,priority:yw[i]});return e.sort(function(n,s){return n.priority-s.priority}),e}function Vc(t){return t%4===0&&t%100!==0||t%400===0}function Wn(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function Ze(t){var e=+t,i=0;return e!==0&&isFinite(e)&&(i=Wn(e)),i}function vl(t,e){return function(i){return i!=null?($w(this,t,i),fe.updateOffset(this,e),this):Qa(this,t)}}function Qa(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function $w(t,e,i){t.isValid()&&!isNaN(i)&&(e==="FullYear"&&Vc(t.year())&&t.month()===1&&t.date()===29?(i=Ze(i),t._d["set"+(t._isUTC?"UTC":"")+e](i,t.month(),Zc(i,t.month()))):t._d["set"+(t._isUTC?"UTC":"")+e](i))}function sI(t){return t=si(t),Mi(this[t])?this[t]():this}function rI(t,e){if(typeof t=="object"){t=wp(t);var i=iI(t),n,s=i.length;for(n=0;n<s;n++)this[i[n].unit](t[i[n].unit])}else if(t=si(t),Mi(this[t]))return this[t](e);return this}var Sw=/\d/,Vn=/\d\d/,Ew=/\d{3}/,yp=/\d{4}/,qc=/[+-]?\d{6}/,wt=/\d\d?/,Tw=/\d\d\d\d?/,Ow=/\d\d\d\d\d\d?/,Yc=/\d{1,3}/,$p=/\d{1,4}/,Gc=/[+-]?\d{1,6}/,kl=/\d+/,Wc=/[+-]?\d+/,lI=/Z|[+-]\d\d:?\d\d/gi,Kc=/Z|[+-]\d\d(?::?\d\d)?/gi,oI=/[+-]?\d+(\.\d{1,3})?/,No=/[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,ec;ec={};function ke(t,e,i){ec[t]=Mi(e)?e:function(n,s){return n&&i?i:e}}function aI(t,e){return st(ec,t)?ec[t](e._strict,e._locale):new RegExp(cI(t))}function cI(t){return Pn(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,i,n,s,r){return i||n||s||r}))}function Pn(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var id={};function pt(t,e){var i,n=e,s;for(typeof t=="string"&&(t=[t]),ls(e)&&(n=function(r,l){l[e]=Ze(r)}),s=t.length,i=0;i<s;i++)id[t[i]]=n}function Po(t,e){pt(t,function(i,n,s,r){s._w=s._w||{},e(i,s._w,s,r)})}function uI(t,e,i){e!=null&&st(id,t)&&id[t](e,i._a,i,t)}var rn=0,Zi=1,Si=2,Bt=3,oi=4,Xi=5,Ws=6,fI=7,dI=8;function pI(t,e){return(t%e+e)%e}var It;Array.prototype.indexOf?It=Array.prototype.indexOf:It=function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1};function Zc(t,e){if(isNaN(t)||isNaN(e))return NaN;var i=pI(e,12);return t+=(e-i)/12,i===1?Vc(t)?29:28:31-i%7%2}Le("M",["MM",2],"Mo",function(){return this.month()+1});Le("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)});Le("MMMM",0,0,function(t){return this.localeData().months(this,t)});an("month","M");cn("month",8);ke("M",wt);ke("MM",wt,Vn);ke("MMM",function(t,e){return e.monthsShortRegex(t)});ke("MMMM",function(t,e){return e.monthsRegex(t)});pt(["M","MM"],function(t,e){e[Zi]=Ze(t)-1});pt(["MMM","MMMM"],function(t,e,i,n){var s=i._locale.monthsParse(t,n,i._strict);s!=null?e[Zi]=s:Ge(i).invalidMonth=t});var mI="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Aw="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Lw=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,hI=No,gI=No;function _I(t,e){return t?di(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||Lw).test(e)?"format":"standalone"][t.month()]:di(this._months)?this._months:this._months.standalone}function bI(t,e){return t?di(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[Lw.test(e)?"format":"standalone"][t.month()]:di(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function vI(t,e,i){var n,s,r,l=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)r=Di([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(r,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(r,"").toLocaleLowerCase();return i?e==="MMM"?(s=It.call(this._shortMonthsParse,l),s!==-1?s:null):(s=It.call(this._longMonthsParse,l),s!==-1?s:null):e==="MMM"?(s=It.call(this._shortMonthsParse,l),s!==-1?s:(s=It.call(this._longMonthsParse,l),s!==-1?s:null)):(s=It.call(this._longMonthsParse,l),s!==-1?s:(s=It.call(this._shortMonthsParse,l),s!==-1?s:null))}function kI(t,e,i){var n,s,r;if(this._monthsParseExact)return vI.call(this,t,e,i);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(s=Di([2e3,n]),i&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(s,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(s,"").replace(".","")+"$","i")),!i&&!this._monthsParse[n]&&(r="^"+this.months(s,"")+"|^"+this.monthsShort(s,""),this._monthsParse[n]=new RegExp(r.replace(".",""),"i")),i&&e==="MMMM"&&this._longMonthsParse[n].test(t))return n;if(i&&e==="MMM"&&this._shortMonthsParse[n].test(t))return n;if(!i&&this._monthsParse[n].test(t))return n}}function Nw(t,e){var i;if(!t.isValid())return t;if(typeof e=="string"){if(/^\d+$/.test(e))e=Ze(e);else if(e=t.localeData().monthsParse(e),!ls(e))return t}return i=Math.min(t.date(),Zc(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,i),t}function Pw(t){return t!=null?(Nw(this,t),fe.updateOffset(this,!0),this):Qa(this,"Month")}function wI(){return Zc(this.year(),this.month())}function yI(t){return this._monthsParseExact?(st(this,"_monthsRegex")||Iw.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(st(this,"_monthsShortRegex")||(this._monthsShortRegex=hI),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)}function $I(t){return this._monthsParseExact?(st(this,"_monthsRegex")||Iw.call(this),t?this._monthsStrictRegex:this._monthsRegex):(st(this,"_monthsRegex")||(this._monthsRegex=gI),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)}function Iw(){function t(l,o){return o.length-l.length}var e=[],i=[],n=[],s,r;for(s=0;s<12;s++)r=Di([2e3,s]),e.push(this.monthsShort(r,"")),i.push(this.months(r,"")),n.push(this.months(r,"")),n.push(this.monthsShort(r,""));for(e.sort(t),i.sort(t),n.sort(t),s=0;s<12;s++)e[s]=Pn(e[s]),i[s]=Pn(i[s]);for(s=0;s<24;s++)n[s]=Pn(n[s]);this._monthsRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+e.join("|")+")","i")}Le("Y",0,0,function(){var t=this.year();return t<=9999?Ii(t,4):"+"+t});Le(0,["YY",2],0,function(){return this.year()%100});Le(0,["YYYY",4],0,"year");Le(0,["YYYYY",5],0,"year");Le(0,["YYYYYY",6,!0],0,"year");an("year","y");cn("year",1);ke("Y",Wc);ke("YY",wt,Vn);ke("YYYY",$p,yp);ke("YYYYY",Gc,qc);ke("YYYYYY",Gc,qc);pt(["YYYYY","YYYYYY"],rn);pt("YYYY",function(t,e){e[rn]=t.length===2?fe.parseTwoDigitYear(t):Ze(t)});pt("YY",function(t,e){e[rn]=fe.parseTwoDigitYear(t)});pt("Y",function(t,e){e[rn]=parseInt(t,10)});function Gl(t){return Vc(t)?366:365}fe.parseTwoDigitYear=function(t){return Ze(t)+(Ze(t)>68?1900:2e3)};var Cw=vl("FullYear",!0);function SI(){return Vc(this.year())}function EI(t,e,i,n,s,r,l){var o;return t<100&&t>=0?(o=new Date(t+400,e,i,n,s,r,l),isFinite(o.getFullYear())&&o.setFullYear(t)):o=new Date(t,e,i,n,s,r,l),o}function lo(t){var e,i;return t<100&&t>=0?(i=Array.prototype.slice.call(arguments),i[0]=t+400,e=new Date(Date.UTC.apply(null,i)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)):e=new Date(Date.UTC.apply(null,arguments)),e}function tc(t,e,i){var n=7+e-i,s=(7+lo(t,0,n).getUTCDay()-e)%7;return-s+n-1}function Dw(t,e,i,n,s){var r=(7+i-n)%7,l=tc(t,n,s),o=1+7*(e-1)+r+l,a,c;return o<=0?(a=t-1,c=Gl(a)+o):o>Gl(t)?(a=t+1,c=o-Gl(t)):(a=t,c=o),{year:a,dayOfYear:c}}function oo(t,e,i){var n=tc(t.year(),e,i),s=Math.floor((t.dayOfYear()-n-1)/7)+1,r,l;return s<1?(l=t.year()-1,r=s+ns(l,e,i)):s>ns(t.year(),e,i)?(r=s-ns(t.year(),e,i),l=t.year()+1):(l=t.year(),r=s),{week:r,year:l}}function ns(t,e,i){var n=tc(t,e,i),s=tc(t+1,e,i);return(Gl(t)-n+s)/7}Le("w",["ww",2],"wo","week");Le("W",["WW",2],"Wo","isoWeek");an("week","w");an("isoWeek","W");cn("week",5);cn("isoWeek",5);ke("w",wt);ke("ww",wt,Vn);ke("W",wt);ke("WW",wt,Vn);Po(["w","ww","W","WW"],function(t,e,i,n){e[n.substr(0,1)]=Ze(t)});function TI(t){return oo(t,this._week.dow,this._week.doy).week}var OI={dow:0,doy:6};function AI(){return this._week.dow}function LI(){return this._week.doy}function NI(t){var e=this.localeData().week(this);return t==null?e:this.add((t-e)*7,"d")}function PI(t){var e=oo(this,1,4).week;return t==null?e:this.add((t-e)*7,"d")}Le("d",0,"do","day");Le("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)});Le("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)});Le("dddd",0,0,function(t){return this.localeData().weekdays(this,t)});Le("e",0,0,"weekday");Le("E",0,0,"isoWeekday");an("day","d");an("weekday","e");an("isoWeekday","E");cn("day",11);cn("weekday",11);cn("isoWeekday",11);ke("d",wt);ke("e",wt);ke("E",wt);ke("dd",function(t,e){return e.weekdaysMinRegex(t)});ke("ddd",function(t,e){return e.weekdaysShortRegex(t)});ke("dddd",function(t,e){return e.weekdaysRegex(t)});Po(["dd","ddd","dddd"],function(t,e,i,n){var s=i._locale.weekdaysParse(t,n,i._strict);s!=null?e.d=s:Ge(i).invalidWeekday=t});Po(["d","e","E"],function(t,e,i,n){e[n]=Ze(t)});function II(t,e){return typeof t!="string"?t:isNaN(t)?(t=e.weekdaysParse(t),typeof t=="number"?t:null):parseInt(t,10)}function CI(t,e){return typeof t=="string"?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}function Sp(t,e){return t.slice(e,7).concat(t.slice(0,e))}var DI="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Mw="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),MI="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),jI=No,RI=No,FI=No;function UI(t,e){var i=di(this._weekdays)?this._weekdays:this._weekdays[t&&t!==!0&&this._weekdays.isFormat.test(e)?"format":"standalone"];return t===!0?Sp(i,this._week.dow):t?i[t.day()]:i}function xI(t){return t===!0?Sp(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort}function zI(t){return t===!0?Sp(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin}function BI(t,e,i){var n,s,r,l=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)r=Di([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(r,"").toLocaleLowerCase();return i?e==="dddd"?(s=It.call(this._weekdaysParse,l),s!==-1?s:null):e==="ddd"?(s=It.call(this._shortWeekdaysParse,l),s!==-1?s:null):(s=It.call(this._minWeekdaysParse,l),s!==-1?s:null):e==="dddd"?(s=It.call(this._weekdaysParse,l),s!==-1||(s=It.call(this._shortWeekdaysParse,l),s!==-1)?s:(s=It.call(this._minWeekdaysParse,l),s!==-1?s:null)):e==="ddd"?(s=It.call(this._shortWeekdaysParse,l),s!==-1||(s=It.call(this._weekdaysParse,l),s!==-1)?s:(s=It.call(this._minWeekdaysParse,l),s!==-1?s:null)):(s=It.call(this._minWeekdaysParse,l),s!==-1||(s=It.call(this._weekdaysParse,l),s!==-1)?s:(s=It.call(this._shortWeekdaysParse,l),s!==-1?s:null))}function HI(t,e,i){var n,s,r;if(this._weekdaysParseExact)return BI.call(this,t,e,i);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(s=Di([2e3,1]).day(n),i&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(s,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(s,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(s,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(r="^"+this.weekdays(s,"")+"|^"+this.weekdaysShort(s,"")+"|^"+this.weekdaysMin(s,""),this._weekdaysParse[n]=new RegExp(r.replace(".",""),"i")),i&&e==="dddd"&&this._fullWeekdaysParse[n].test(t))return n;if(i&&e==="ddd"&&this._shortWeekdaysParse[n].test(t))return n;if(i&&e==="dd"&&this._minWeekdaysParse[n].test(t))return n;if(!i&&this._weekdaysParse[n].test(t))return n}}function VI(t){if(!this.isValid())return t!=null?this:NaN;var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return t!=null?(t=II(t,this.localeData()),this.add(t-e,"d")):e}function qI(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 YI(t){if(!this.isValid())return t!=null?this:NaN;if(t!=null){var e=CI(t,this.localeData());return this.day(this.day()%7?e:e-7)}else return this.day()||7}function GI(t){return this._weekdaysParseExact?(st(this,"_weekdaysRegex")||Ep.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(st(this,"_weekdaysRegex")||(this._weekdaysRegex=jI),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)}function WI(t){return this._weekdaysParseExact?(st(this,"_weekdaysRegex")||Ep.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(st(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=RI),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function KI(t){return this._weekdaysParseExact?(st(this,"_weekdaysRegex")||Ep.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(st(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=FI),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Ep(){function t(u,f){return f.length-u.length}var e=[],i=[],n=[],s=[],r,l,o,a,c;for(r=0;r<7;r++)l=Di([2e3,1]).day(r),o=Pn(this.weekdaysMin(l,"")),a=Pn(this.weekdaysShort(l,"")),c=Pn(this.weekdays(l,"")),e.push(o),i.push(a),n.push(c),s.push(o),s.push(a),s.push(c);e.sort(t),i.sort(t),n.sort(t),s.sort(t),this._weekdaysRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+e.join("|")+")","i")}function Tp(){return this.hours()%12||12}function ZI(){return this.hours()||24}Le("H",["HH",2],0,"hour");Le("h",["hh",2],0,Tp);Le("k",["kk",2],0,ZI);Le("hmm",0,0,function(){return""+Tp.apply(this)+Ii(this.minutes(),2)});Le("hmmss",0,0,function(){return""+Tp.apply(this)+Ii(this.minutes(),2)+Ii(this.seconds(),2)});Le("Hmm",0,0,function(){return""+this.hours()+Ii(this.minutes(),2)});Le("Hmmss",0,0,function(){return""+this.hours()+Ii(this.minutes(),2)+Ii(this.seconds(),2)});function jw(t,e){Le(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}jw("a",!0);jw("A",!1);an("hour","h");cn("hour",13);function Rw(t,e){return e._meridiemParse}ke("a",Rw);ke("A",Rw);ke("H",wt);ke("h",wt);ke("k",wt);ke("HH",wt,Vn);ke("hh",wt,Vn);ke("kk",wt,Vn);ke("hmm",Tw);ke("hmmss",Ow);ke("Hmm",Tw);ke("Hmmss",Ow);pt(["H","HH"],Bt);pt(["k","kk"],function(t,e,i){var n=Ze(t);e[Bt]=n===24?0:n});pt(["a","A"],function(t,e,i){i._isPm=i._locale.isPM(t),i._meridiem=t});pt(["h","hh"],function(t,e,i){e[Bt]=Ze(t),Ge(i).bigHour=!0});pt("hmm",function(t,e,i){var n=t.length-2;e[Bt]=Ze(t.substr(0,n)),e[oi]=Ze(t.substr(n)),Ge(i).bigHour=!0});pt("hmmss",function(t,e,i){var n=t.length-4,s=t.length-2;e[Bt]=Ze(t.substr(0,n)),e[oi]=Ze(t.substr(n,2)),e[Xi]=Ze(t.substr(s)),Ge(i).bigHour=!0});pt("Hmm",function(t,e,i){var n=t.length-2;e[Bt]=Ze(t.substr(0,n)),e[oi]=Ze(t.substr(n))});pt("Hmmss",function(t,e,i){var n=t.length-4,s=t.length-2;e[Bt]=Ze(t.substr(0,n)),e[oi]=Ze(t.substr(n,2)),e[Xi]=Ze(t.substr(s))});function XI(t){return(t+"").toLowerCase().charAt(0)==="p"}var JI=/[ap]\.?m?\.?/i,QI=vl("Hours",!0);function eC(t,e,i){return t>11?i?"pm":"PM":i?"am":"AM"}var Fw={calendar:H8,longDateFormat:G8,invalidDate:K8,ordinal:X8,dayOfMonthOrdinalParse:J8,relativeTime:eI,months:mI,monthsShort:Aw,week:OI,weekdays:DI,weekdaysMin:MI,weekdaysShort:Mw,meridiemParse:JI},St={},Pl={},ao;function tC(t,e){var i,n=Math.min(t.length,e.length);for(i=0;i<n;i+=1)if(t[i]!==e[i])return i;return n}function c_(t){return t&&t.toLowerCase().replace("_","-")}function nC(t){for(var e=0,i,n,s,r;e<t.length;){for(r=c_(t[e]).split("-"),i=r.length,n=c_(t[e+1]),n=n?n.split("-"):null;i>0;){if(s=Xc(r.slice(0,i).join("-")),s)return s;if(n&&n.length>=i&&tC(r,n)>=i-1)break;i--}e++}return ao}function iC(t){return t.match("^[^/\\\\]*$")!=null}function Xc(t){var e=null,i;if(St[t]===void 0&&typeof ga<"u"&&ga&&ga.exports&&iC(t))try{e=ao._abbr,i=require,i("./locale/"+t),Es(e)}catch{St[t]=null}return St[t]}function Es(t,e){var i;return t&&(Sn(e)?i=us(t):i=Op(t,e),i?ao=i:typeof console<"u"&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),ao._abbr}function Op(t,e){if(e!==null){var i,n=Fw;if(e.abbr=t,St[t]!=null)kw("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."),n=St[t]._config;else if(e.parentLocale!=null)if(St[e.parentLocale]!=null)n=St[e.parentLocale]._config;else if(i=Xc(e.parentLocale),i!=null)n=i._config;else return Pl[e.parentLocale]||(Pl[e.parentLocale]=[]),Pl[e.parentLocale].push({name:t,config:e}),null;return St[t]=new vp(td(n,e)),Pl[t]&&Pl[t].forEach(function(s){Op(s.name,s.config)}),Es(t),St[t]}else return delete St[t],null}function sC(t,e){if(e!=null){var i,n,s=Fw;St[t]!=null&&St[t].parentLocale!=null?St[t].set(td(St[t]._config,e)):(n=Xc(t),n!=null&&(s=n._config),e=td(s,e),n==null&&(e.abbr=t),i=new vp(e),i.parentLocale=St[t],St[t]=i),Es(t)}else St[t]!=null&&(St[t].parentLocale!=null?(St[t]=St[t].parentLocale,t===Es()&&Es(t)):St[t]!=null&&delete St[t]);return St[t]}function us(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return ao;if(!di(t)){if(e=Xc(t),e)return e;t=[t]}return nC(t)}function rC(){return nd(St)}function Ap(t){var e,i=t._a;return i&&Ge(t).overflow===-2&&(e=i[Zi]<0||i[Zi]>11?Zi:i[Si]<1||i[Si]>Zc(i[rn],i[Zi])?Si:i[Bt]<0||i[Bt]>24||i[Bt]===24&&(i[oi]!==0||i[Xi]!==0||i[Ws]!==0)?Bt:i[oi]<0||i[oi]>59?oi:i[Xi]<0||i[Xi]>59?Xi:i[Ws]<0||i[Ws]>999?Ws:-1,Ge(t)._overflowDayOfYear&&(e<rn||e>Si)&&(e=Si),Ge(t)._overflowWeeks&&e===-1&&(e=fI),Ge(t)._overflowWeekday&&e===-1&&(e=dI),Ge(t).overflow=e),t}var lC=/^\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)?)?$/,oC=/^\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)?)?$/,aC=/Z|[+-]\d\d(?::?\d\d)?/,Jo=[["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]],Wu=[["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/]],cC=/^\/?Date\((-?\d+)/i,uC=/^(?:(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}))$/,fC={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 Uw(t){var e,i,n=t._i,s=lC.exec(n)||oC.exec(n),r,l,o,a,c=Jo.length,u=Wu.length;if(s){for(Ge(t).iso=!0,e=0,i=c;e<i;e++)if(Jo[e][1].exec(s[1])){l=Jo[e][0],r=Jo[e][2]!==!1;break}if(l==null){t._isValid=!1;return}if(s[3]){for(e=0,i=u;e<i;e++)if(Wu[e][1].exec(s[3])){o=(s[2]||" ")+Wu[e][0];break}if(o==null){t._isValid=!1;return}}if(!r&&o!=null){t._isValid=!1;return}if(s[4])if(aC.exec(s[4]))a="Z";else{t._isValid=!1;return}t._f=l+(o||"")+(a||""),Np(t)}else t._isValid=!1}function dC(t,e,i,n,s,r){var l=[pC(t),Aw.indexOf(e),parseInt(i,10),parseInt(n,10),parseInt(s,10)];return r&&l.push(parseInt(r,10)),l}function pC(t){var e=parseInt(t,10);return e<=49?2e3+e:e<=999?1900+e:e}function mC(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function hC(t,e,i){if(t){var n=Mw.indexOf(t),s=new Date(e[0],e[1],e[2]).getDay();if(n!==s)return Ge(i).weekdayMismatch=!0,i._isValid=!1,!1}return!0}function gC(t,e,i){if(t)return fC[t];if(e)return 0;var n=parseInt(i,10),s=n%100,r=(n-s)/100;return r*60+s}function xw(t){var e=uC.exec(mC(t._i)),i;if(e){if(i=dC(e[4],e[3],e[2],e[5],e[6],e[7]),!hC(e[1],i,t))return;t._a=i,t._tzm=gC(e[8],e[9],e[10]),t._d=lo.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),Ge(t).rfc2822=!0}else t._isValid=!1}function _C(t){var e=cC.exec(t._i);if(e!==null){t._d=new Date(+e[1]);return}if(Uw(t),t._isValid===!1)delete t._isValid;else return;if(xw(t),t._isValid===!1)delete t._isValid;else return;t._strict?t._isValid=!1:fe.createFromInputFallback(t)}fe.createFromInputFallback=ii("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 Cr(t,e,i){return t??e??i}function bC(t){var e=new Date(fe.now());return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function Lp(t){var e,i,n=[],s,r,l;if(!t._d){for(s=bC(t),t._w&&t._a[Si]==null&&t._a[Zi]==null&&vC(t),t._dayOfYear!=null&&(l=Cr(t._a[rn],s[rn]),(t._dayOfYear>Gl(l)||t._dayOfYear===0)&&(Ge(t)._overflowDayOfYear=!0),i=lo(l,0,t._dayOfYear),t._a[Zi]=i.getUTCMonth(),t._a[Si]=i.getUTCDate()),e=0;e<3&&t._a[e]==null;++e)t._a[e]=n[e]=s[e];for(;e<7;e++)t._a[e]=n[e]=t._a[e]==null?e===2?1:0:t._a[e];t._a[Bt]===24&&t._a[oi]===0&&t._a[Xi]===0&&t._a[Ws]===0&&(t._nextDay=!0,t._a[Bt]=0),t._d=(t._useUTC?lo:EI).apply(null,n),r=t._useUTC?t._d.getUTCDay():t._d.getDay(),t._tzm!=null&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[Bt]=24),t._w&&typeof t._w.d<"u"&&t._w.d!==r&&(Ge(t).weekdayMismatch=!0)}}function vC(t){var e,i,n,s,r,l,o,a,c;e=t._w,e.GG!=null||e.W!=null||e.E!=null?(r=1,l=4,i=Cr(e.GG,t._a[rn],oo(kt(),1,4).year),n=Cr(e.W,1),s=Cr(e.E,1),(s<1||s>7)&&(a=!0)):(r=t._locale._week.dow,l=t._locale._week.doy,c=oo(kt(),r,l),i=Cr(e.gg,t._a[rn],c.year),n=Cr(e.w,c.week),e.d!=null?(s=e.d,(s<0||s>6)&&(a=!0)):e.e!=null?(s=e.e+r,(e.e<0||e.e>6)&&(a=!0)):s=r),n<1||n>ns(i,r,l)?Ge(t)._overflowWeeks=!0:a!=null?Ge(t)._overflowWeekday=!0:(o=Dw(i,n,s,r,l),t._a[rn]=o.year,t._dayOfYear=o.dayOfYear)}fe.ISO_8601=function(){};fe.RFC_2822=function(){};function Np(t){if(t._f===fe.ISO_8601){Uw(t);return}if(t._f===fe.RFC_2822){xw(t);return}t._a=[],Ge(t).empty=!0;var e=""+t._i,i,n,s,r,l,o=e.length,a=0,c,u;for(s=ww(t._f,t._locale).match(kp)||[],u=s.length,i=0;i<u;i++)r=s[i],n=(e.match(aI(r,t))||[])[0],n&&(l=e.substr(0,e.indexOf(n)),l.length>0&&Ge(t).unusedInput.push(l),e=e.slice(e.indexOf(n)+n.length),a+=n.length),Gr[r]?(n?Ge(t).empty=!1:Ge(t).unusedTokens.push(r),uI(r,n,t)):t._strict&&!n&&Ge(t).unusedTokens.push(r);Ge(t).charsLeftOver=o-a,e.length>0&&Ge(t).unusedInput.push(e),t._a[Bt]<=12&&Ge(t).bigHour===!0&&t._a[Bt]>0&&(Ge(t).bigHour=void 0),Ge(t).parsedDateParts=t._a.slice(0),Ge(t).meridiem=t._meridiem,t._a[Bt]=kC(t._locale,t._a[Bt],t._meridiem),c=Ge(t).era,c!==null&&(t._a[rn]=t._locale.erasConvertYear(c,t._a[rn])),Lp(t),Ap(t)}function kC(t,e,i){var n;return i==null?e:t.meridiemHour!=null?t.meridiemHour(e,i):(t.isPM!=null&&(n=t.isPM(i),n&&e<12&&(e+=12),!n&&e===12&&(e=0)),e)}function wC(t){var e,i,n,s,r,l,o=!1,a=t._f.length;if(a===0){Ge(t).invalidFormat=!0,t._d=new Date(NaN);return}for(s=0;s<a;s++)r=0,l=!1,e=bp({},t),t._useUTC!=null&&(e._useUTC=t._useUTC),e._f=t._f[s],Np(e),_p(e)&&(l=!0),r+=Ge(e).charsLeftOver,r+=Ge(e).unusedTokens.length*10,Ge(e).score=r,o?r<n&&(n=r,i=e):(n==null||r<n||l)&&(n=r,i=e,l&&(o=!0));bs(t,i||e)}function yC(t){if(!t._d){var e=wp(t._i),i=e.day===void 0?e.date:e.day;t._a=bw([e.year,e.month,i,e.hour,e.minute,e.second,e.millisecond],function(n){return n&&parseInt(n,10)}),Lp(t)}}function $C(t){var e=new Lo(Ap(zw(t)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}function zw(t){var e=t._i,i=t._f;return t._locale=t._locale||us(t._l),e===null||i===void 0&&e===""?Hc({nullInput:!0}):(typeof e=="string"&&(t._i=e=t._locale.preparse(e)),pi(e)?new Lo(Ap(e)):(Ao(e)?t._d=e:di(i)?wC(t):i?Np(t):SC(t),_p(t)||(t._d=null),t))}function SC(t){var e=t._i;Sn(e)?t._d=new Date(fe.now()):Ao(e)?t._d=new Date(e.valueOf()):typeof e=="string"?_C(t):di(e)?(t._a=bw(e.slice(0),function(i){return parseInt(i,10)}),Lp(t)):Js(e)?yC(t):ls(e)?t._d=new Date(e):fe.createFromInputFallback(t)}function Bw(t,e,i,n,s){var r={};return(e===!0||e===!1)&&(n=e,e=void 0),(i===!0||i===!1)&&(n=i,i=void 0),(Js(t)&&gp(t)||di(t)&&t.length===0)&&(t=void 0),r._isAMomentObject=!0,r._useUTC=r._isUTC=s,r._l=i,r._i=t,r._f=e,r._strict=n,$C(r)}function kt(t,e,i,n){return Bw(t,e,i,n,!1)}var EC=ii("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=kt.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:Hc()}),TC=ii("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=kt.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:Hc()});function Hw(t,e){var i,n;if(e.length===1&&di(e[0])&&(e=e[0]),!e.length)return kt();for(i=e[0],n=1;n<e.length;++n)(!e[n].isValid()||e[n][t](i))&&(i=e[n]);return i}function OC(){var t=[].slice.call(arguments,0);return Hw("isBefore",t)}function AC(){var t=[].slice.call(arguments,0);return Hw("isAfter",t)}var LC=function(){return Date.now?Date.now():+new Date},Il=["year","quarter","month","week","day","hour","minute","second","millisecond"];function NC(t){var e,i=!1,n,s=Il.length;for(e in t)if(st(t,e)&&!(It.call(Il,e)!==-1&&(t[e]==null||!isNaN(t[e]))))return!1;for(n=0;n<s;++n)if(t[Il[n]]){if(i)return!1;parseFloat(t[Il[n]])!==Ze(t[Il[n]])&&(i=!0)}return!0}function PC(){return this._isValid}function IC(){return vi(NaN)}function Jc(t){var e=wp(t),i=e.year||0,n=e.quarter||0,s=e.month||0,r=e.week||e.isoWeek||0,l=e.day||0,o=e.hour||0,a=e.minute||0,c=e.second||0,u=e.millisecond||0;this._isValid=NC(e),this._milliseconds=+u+c*1e3+a*6e4+o*1e3*60*60,this._days=+l+r*7,this._months=+s+n*3+i*12,this._data={},this._locale=us(),this._bubble()}function ma(t){return t instanceof Jc}function sd(t){return t<0?Math.round(-1*t)*-1:Math.round(t)}function CC(t,e,i){var n=Math.min(t.length,e.length),s=Math.abs(t.length-e.length),r=0,l;for(l=0;l<n;l++)(i&&t[l]!==e[l]||!i&&Ze(t[l])!==Ze(e[l]))&&r++;return r+s}function Vw(t,e){Le(t,0,0,function(){var i=this.utcOffset(),n="+";return i<0&&(i=-i,n="-"),n+Ii(~~(i/60),2)+e+Ii(~~i%60,2)})}Vw("Z",":");Vw("ZZ","");ke("Z",Kc);ke("ZZ",Kc);pt(["Z","ZZ"],function(t,e,i){i._useUTC=!0,i._tzm=Pp(Kc,t)});var DC=/([\+\-]|\d\d)/gi;function Pp(t,e){var i=(e||"").match(t),n,s,r;return i===null?null:(n=i[i.length-1]||[],s=(n+"").match(DC)||["-",0,0],r=+(s[1]*60)+Ze(s[2]),r===0?0:s[0]==="+"?r:-r)}function Ip(t,e){var i,n;return e._isUTC?(i=e.clone(),n=(pi(t)||Ao(t)?t.valueOf():kt(t).valueOf())-i.valueOf(),i._d.setTime(i._d.valueOf()+n),fe.updateOffset(i,!1),i):kt(t).local()}function rd(t){return-Math.round(t._d.getTimezoneOffset())}fe.updateOffset=function(){};function MC(t,e,i){var n=this._offset||0,s;if(!this.isValid())return t!=null?this:NaN;if(t!=null){if(typeof t=="string"){if(t=Pp(Kc,t),t===null)return this}else Math.abs(t)<16&&!i&&(t=t*60);return!this._isUTC&&e&&(s=rd(this)),this._offset=t,this._isUTC=!0,s!=null&&this.add(s,"m"),n!==t&&(!e||this._changeInProgress?Gw(this,vi(t-n,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,fe.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?n:rd(this)}function jC(t,e){return t!=null?(typeof t!="string"&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}function RC(t){return this.utcOffset(0,t)}function FC(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(rd(this),"m")),this}function UC(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var t=Pp(lI,this._i);t!=null?this.utcOffset(t):this.utcOffset(0,!0)}return this}function xC(t){return this.isValid()?(t=t?kt(t).utcOffset():0,(this.utcOffset()-t)%60===0):!1}function zC(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function BC(){if(!Sn(this._isDSTShifted))return this._isDSTShifted;var t={},e;return bp(t,this),t=zw(t),t._a?(e=t._isUTC?Di(t._a):kt(t._a),this._isDSTShifted=this.isValid()&&CC(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function HC(){return this.isValid()?!this._isUTC:!1}function VC(){return this.isValid()?this._isUTC:!1}function qw(){return this.isValid()?this._isUTC&&this._offset===0:!1}var qC=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,YC=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function vi(t,e){var i=t,n=null,s,r,l;return ma(t)?i={ms:t._milliseconds,d:t._days,M:t._months}:ls(t)||!isNaN(+t)?(i={},e?i[e]=+t:i.milliseconds=+t):(n=qC.exec(t))?(s=n[1]==="-"?-1:1,i={y:0,d:Ze(n[Si])*s,h:Ze(n[Bt])*s,m:Ze(n[oi])*s,s:Ze(n[Xi])*s,ms:Ze(sd(n[Ws]*1e3))*s}):(n=YC.exec(t))?(s=n[1]==="-"?-1:1,i={y:Rs(n[2],s),M:Rs(n[3],s),w:Rs(n[4],s),d:Rs(n[5],s),h:Rs(n[6],s),m:Rs(n[7],s),s:Rs(n[8],s)}):i==null?i={}:typeof i=="object"&&("from"in i||"to"in i)&&(l=GC(kt(i.from),kt(i.to)),i={},i.ms=l.milliseconds,i.M=l.months),r=new Jc(i),ma(t)&&st(t,"_locale")&&(r._locale=t._locale),ma(t)&&st(t,"_isValid")&&(r._isValid=t._isValid),r}vi.fn=Jc.prototype;vi.invalid=IC;function Rs(t,e){var i=t&&parseFloat(t.replace(",","."));return(isNaN(i)?0:i)*e}function u_(t,e){var i={};return i.months=e.month()-t.month()+(e.year()-t.year())*12,t.clone().add(i.months,"M").isAfter(e)&&--i.months,i.milliseconds=+e-+t.clone().add(i.months,"M"),i}function GC(t,e){var i;return t.isValid()&&e.isValid()?(e=Ip(e,t),t.isBefore(e)?i=u_(t,e):(i=u_(e,t),i.milliseconds=-i.milliseconds,i.months=-i.months),i):{milliseconds:0,months:0}}function Yw(t,e){return function(i,n){var s,r;return n!==null&&!isNaN(+n)&&(kw(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."),r=i,i=n,n=r),s=vi(i,n),Gw(this,s,t),this}}function Gw(t,e,i,n){var s=e._milliseconds,r=sd(e._days),l=sd(e._months);t.isValid()&&(n=n??!0,l&&Nw(t,Qa(t,"Month")+l*i),r&&$w(t,"Date",Qa(t,"Date")+r*i),s&&t._d.setTime(t._d.valueOf()+s*i),n&&fe.updateOffset(t,r||l))}var WC=Yw(1,"add"),KC=Yw(-1,"subtract");function Ww(t){return typeof t=="string"||t instanceof String}function ZC(t){return pi(t)||Ao(t)||Ww(t)||ls(t)||JC(t)||XC(t)||t===null||t===void 0}function XC(t){var e=Js(t)&&!gp(t),i=!1,n=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],s,r,l=n.length;for(s=0;s<l;s+=1)r=n[s],i=i||st(t,r);return e&&i}function JC(t){var e=di(t),i=!1;return e&&(i=t.filter(function(n){return!ls(n)&&Ww(t)}).length===0),e&&i}function QC(t){var e=Js(t)&&!gp(t),i=!1,n=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],s,r;for(s=0;s<n.length;s+=1)r=n[s],i=i||st(t,r);return e&&i}function eD(t,e){var i=t.diff(e,"days",!0);return i<-6?"sameElse":i<-1?"lastWeek":i<0?"lastDay":i<1?"sameDay":i<2?"nextDay":i<7?"nextWeek":"sameElse"}function tD(t,e){arguments.length===1&&(arguments[0]?ZC(arguments[0])?(t=arguments[0],e=void 0):QC(arguments[0])&&(e=arguments[0],t=void 0):(t=void 0,e=void 0));var i=t||kt(),n=Ip(i,this).startOf("day"),s=fe.calendarFormat(this,n)||"sameElse",r=e&&(Mi(e[s])?e[s].call(this,i):e[s]);return this.format(r||this.localeData().calendar(s,this,kt(i)))}function nD(){return new Lo(this)}function iD(t,e){var i=pi(t)?t:kt(t);return this.isValid()&&i.isValid()?(e=si(e)||"millisecond",e==="millisecond"?this.valueOf()>i.valueOf():i.valueOf()<this.clone().startOf(e).valueOf()):!1}function sD(t,e){var i=pi(t)?t:kt(t);return this.isValid()&&i.isValid()?(e=si(e)||"millisecond",e==="millisecond"?this.valueOf()<i.valueOf():this.clone().endOf(e).valueOf()<i.valueOf()):!1}function rD(t,e,i,n){var s=pi(t)?t:kt(t),r=pi(e)?e:kt(e);return this.isValid()&&s.isValid()&&r.isValid()?(n=n||"()",(n[0]==="("?this.isAfter(s,i):!this.isBefore(s,i))&&(n[1]===")"?this.isBefore(r,i):!this.isAfter(r,i))):!1}function lD(t,e){var i=pi(t)?t:kt(t),n;return this.isValid()&&i.isValid()?(e=si(e)||"millisecond",e==="millisecond"?this.valueOf()===i.valueOf():(n=i.valueOf(),this.clone().startOf(e).valueOf()<=n&&n<=this.clone().endOf(e).valueOf())):!1}function oD(t,e){return this.isSame(t,e)||this.isAfter(t,e)}function aD(t,e){return this.isSame(t,e)||this.isBefore(t,e)}function cD(t,e,i){var n,s,r;if(!this.isValid())return NaN;if(n=Ip(t,this),!n.isValid())return NaN;switch(s=(n.utcOffset()-this.utcOffset())*6e4,e=si(e),e){case"year":r=ha(this,n)/12;break;case"month":r=ha(this,n);break;case"quarter":r=ha(this,n)/3;break;case"second":r=(this-n)/1e3;break;case"minute":r=(this-n)/6e4;break;case"hour":r=(this-n)/36e5;break;case"day":r=(this-n-s)/864e5;break;case"week":r=(this-n-s)/6048e5;break;default:r=this-n}return i?r:Wn(r)}function ha(t,e){if(t.date()<e.date())return-ha(e,t);var i=(e.year()-t.year())*12+(e.month()-t.month()),n=t.clone().add(i,"months"),s,r;return e-n<0?(s=t.clone().add(i-1,"months"),r=(e-n)/(n-s)):(s=t.clone().add(i+1,"months"),r=(e-n)/(s-n)),-(i+r)||0}fe.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";fe.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function uD(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function fD(t){if(!this.isValid())return null;var e=t!==!0,i=e?this.clone().utc():this;return i.year()<0||i.year()>9999?pa(i,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Mi(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",pa(i,"Z")):pa(i,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function dD(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",e="",i,n,s,r;return this.isLocal()||(t=this.utcOffset()===0?"moment.utc":"moment.parseZone",e="Z"),i="["+t+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",s="-MM-DD[T]HH:mm:ss.SSS",r=e+'[")]',this.format(i+n+s+r)}function pD(t){t||(t=this.isUtc()?fe.defaultFormatUtc:fe.defaultFormat);var e=pa(this,t);return this.localeData().postformat(e)}function mD(t,e){return this.isValid()&&(pi(t)&&t.isValid()||kt(t).isValid())?vi({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function hD(t){return this.from(kt(),t)}function gD(t,e){return this.isValid()&&(pi(t)&&t.isValid()||kt(t).isValid())?vi({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function _D(t){return this.to(kt(),t)}function Kw(t){var e;return t===void 0?this._locale._abbr:(e=us(t),e!=null&&(this._locale=e),this)}var Zw=ii("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 Xw(){return this._locale}var nc=1e3,Wr=60*nc,ic=60*Wr,Jw=(365*400+97)*24*ic;function Kr(t,e){return(t%e+e)%e}function Qw(t,e,i){return t<100&&t>=0?new Date(t+400,e,i)-Jw:new Date(t,e,i).valueOf()}function ey(t,e,i){return t<100&&t>=0?Date.UTC(t+400,e,i)-Jw:Date.UTC(t,e,i)}function bD(t){var e,i;if(t=si(t),t===void 0||t==="millisecond"||!this.isValid())return this;switch(i=this._isUTC?ey:Qw,t){case"year":e=i(this.year(),0,1);break;case"quarter":e=i(this.year(),this.month()-this.month()%3,1);break;case"month":e=i(this.year(),this.month(),1);break;case"week":e=i(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=i(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf(),e-=Kr(e+(this._isUTC?0:this.utcOffset()*Wr),ic);break;case"minute":e=this._d.valueOf(),e-=Kr(e,Wr);break;case"second":e=this._d.valueOf(),e-=Kr(e,nc);break}return this._d.setTime(e),fe.updateOffset(this,!0),this}function vD(t){var e,i;if(t=si(t),t===void 0||t==="millisecond"||!this.isValid())return this;switch(i=this._isUTC?ey:Qw,t){case"year":e=i(this.year()+1,0,1)-1;break;case"quarter":e=i(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=i(this.year(),this.month()+1,1)-1;break;case"week":e=i(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=i(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=ic-Kr(e+(this._isUTC?0:this.utcOffset()*Wr),ic)-1;break;case"minute":e=this._d.valueOf(),e+=Wr-Kr(e,Wr)-1;break;case"second":e=this._d.valueOf(),e+=nc-Kr(e,nc)-1;break}return this._d.setTime(e),fe.updateOffset(this,!0),this}function kD(){return this._d.valueOf()-(this._offset||0)*6e4}function wD(){return Math.floor(this.valueOf()/1e3)}function yD(){return new Date(this.valueOf())}function $D(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]}function SD(){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 ED(){return this.isValid()?this.toISOString():null}function TD(){return _p(this)}function OD(){return bs({},Ge(this))}function AD(){return Ge(this).overflow}function LD(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}Le("N",0,0,"eraAbbr");Le("NN",0,0,"eraAbbr");Le("NNN",0,0,"eraAbbr");Le("NNNN",0,0,"eraName");Le("NNNNN",0,0,"eraNarrow");Le("y",["y",1],"yo","eraYear");Le("y",["yy",2],0,"eraYear");Le("y",["yyy",3],0,"eraYear");Le("y",["yyyy",4],0,"eraYear");ke("N",Cp);ke("NN",Cp);ke("NNN",Cp);ke("NNNN",xD);ke("NNNNN",zD);pt(["N","NN","NNN","NNNN","NNNNN"],function(t,e,i,n){var s=i._locale.erasParse(t,n,i._strict);s?Ge(i).era=s:Ge(i).invalidEra=t});ke("y",kl);ke("yy",kl);ke("yyy",kl);ke("yyyy",kl);ke("yo",BD);pt(["y","yy","yyy","yyyy"],rn);pt(["yo"],function(t,e,i,n){var s;i._locale._eraYearOrdinalRegex&&(s=t.match(i._locale._eraYearOrdinalRegex)),i._locale.eraYearOrdinalParse?e[rn]=i._locale.eraYearOrdinalParse(t,s):e[rn]=parseInt(t,10)});function ND(t,e){var i,n,s,r=this._eras||us("en")._eras;for(i=0,n=r.length;i<n;++i){switch(typeof r[i].since){case"string":s=fe(r[i].since).startOf("day"),r[i].since=s.valueOf();break}switch(typeof r[i].until){case"undefined":r[i].until=1/0;break;case"string":s=fe(r[i].until).startOf("day").valueOf(),r[i].until=s.valueOf();break}}return r}function PD(t,e,i){var n,s,r=this.eras(),l,o,a;for(t=t.toUpperCase(),n=0,s=r.length;n<s;++n)if(l=r[n].name.toUpperCase(),o=r[n].abbr.toUpperCase(),a=r[n].narrow.toUpperCase(),i)switch(e){case"N":case"NN":case"NNN":if(o===t)return r[n];break;case"NNNN":if(l===t)return r[n];break;case"NNNNN":if(a===t)return r[n];break}else if([l,o,a].indexOf(t)>=0)return r[n]}function ID(t,e){var i=t.since<=t.until?1:-1;return e===void 0?fe(t.since).year():fe(t.since).year()+(e-t.offset)*i}function CD(){var t,e,i,n=this.localeData().eras();for(t=0,e=n.length;t<e;++t)if(i=this.clone().startOf("day").valueOf(),n[t].since<=i&&i<=n[t].until||n[t].until<=i&&i<=n[t].since)return n[t].name;return""}function DD(){var t,e,i,n=this.localeData().eras();for(t=0,e=n.length;t<e;++t)if(i=this.clone().startOf("day").valueOf(),n[t].since<=i&&i<=n[t].until||n[t].until<=i&&i<=n[t].since)return n[t].narrow;return""}function MD(){var t,e,i,n=this.localeData().eras();for(t=0,e=n.length;t<e;++t)if(i=this.clone().startOf("day").valueOf(),n[t].since<=i&&i<=n[t].until||n[t].until<=i&&i<=n[t].since)return n[t].abbr;return""}function jD(){var t,e,i,n,s=this.localeData().eras();for(t=0,e=s.length;t<e;++t)if(i=s[t].since<=s[t].until?1:-1,n=this.clone().startOf("day").valueOf(),s[t].since<=n&&n<=s[t].until||s[t].until<=n&&n<=s[t].since)return(this.year()-fe(s[t].since).year())*i+s[t].offset;return this.year()}function RD(t){return st(this,"_erasNameRegex")||Dp.call(this),t?this._erasNameRegex:this._erasRegex}function FD(t){return st(this,"_erasAbbrRegex")||Dp.call(this),t?this._erasAbbrRegex:this._erasRegex}function UD(t){return st(this,"_erasNarrowRegex")||Dp.call(this),t?this._erasNarrowRegex:this._erasRegex}function Cp(t,e){return e.erasAbbrRegex(t)}function xD(t,e){return e.erasNameRegex(t)}function zD(t,e){return e.erasNarrowRegex(t)}function BD(t,e){return e._eraYearOrdinalRegex||kl}function Dp(){var t=[],e=[],i=[],n=[],s,r,l=this.eras();for(s=0,r=l.length;s<r;++s)e.push(Pn(l[s].name)),t.push(Pn(l[s].abbr)),i.push(Pn(l[s].narrow)),n.push(Pn(l[s].name)),n.push(Pn(l[s].abbr)),n.push(Pn(l[s].narrow));this._erasRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+e.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+t.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+i.join("|")+")","i")}Le(0,["gg",2],0,function(){return this.weekYear()%100});Le(0,["GG",2],0,function(){return this.isoWeekYear()%100});function Qc(t,e){Le(0,[t,t.length],0,e)}Qc("gggg","weekYear");Qc("ggggg","weekYear");Qc("GGGG","isoWeekYear");Qc("GGGGG","isoWeekYear");an("weekYear","gg");an("isoWeekYear","GG");cn("weekYear",1);cn("isoWeekYear",1);ke("G",Wc);ke("g",Wc);ke("GG",wt,Vn);ke("gg",wt,Vn);ke("GGGG",$p,yp);ke("gggg",$p,yp);ke("GGGGG",Gc,qc);ke("ggggg",Gc,qc);Po(["gggg","ggggg","GGGG","GGGGG"],function(t,e,i,n){e[n.substr(0,2)]=Ze(t)});Po(["gg","GG"],function(t,e,i,n){e[n]=fe.parseTwoDigitYear(t)});function HD(t){return ty.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function VD(t){return ty.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)}function qD(){return ns(this.year(),1,4)}function YD(){return ns(this.isoWeekYear(),1,4)}function GD(){var t=this.localeData()._week;return ns(this.year(),t.dow,t.doy)}function WD(){var t=this.localeData()._week;return ns(this.weekYear(),t.dow,t.doy)}function ty(t,e,i,n,s){var r;return t==null?oo(this,n,s).year:(r=ns(t,n,s),e>r&&(e=r),KD.call(this,t,e,i,n,s))}function KD(t,e,i,n,s){var r=Dw(t,e,i,n,s),l=lo(r.year,0,r.dayOfYear);return this.year(l.getUTCFullYear()),this.month(l.getUTCMonth()),this.date(l.getUTCDate()),this}Le("Q",0,"Qo","quarter");an("quarter","Q");cn("quarter",7);ke("Q",Sw);pt("Q",function(t,e){e[Zi]=(Ze(t)-1)*3});function ZD(t){return t==null?Math.ceil((this.month()+1)/3):this.month((t-1)*3+this.month()%3)}Le("D",["DD",2],"Do","date");an("date","D");cn("date",9);ke("D",wt);ke("DD",wt,Vn);ke("Do",function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient});pt(["D","DD"],Si);pt("Do",function(t,e){e[Si]=Ze(t.match(wt)[0])});var ny=vl("Date",!0);Le("DDD",["DDDD",3],"DDDo","dayOfYear");an("dayOfYear","DDD");cn("dayOfYear",4);ke("DDD",Yc);ke("DDDD",Ew);pt(["DDD","DDDD"],function(t,e,i){i._dayOfYear=Ze(t)});function XD(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return t==null?e:this.add(t-e,"d")}Le("m",["mm",2],0,"minute");an("minute","m");cn("minute",14);ke("m",wt);ke("mm",wt,Vn);pt(["m","mm"],oi);var JD=vl("Minutes",!1);Le("s",["ss",2],0,"second");an("second","s");cn("second",15);ke("s",wt);ke("ss",wt,Vn);pt(["s","ss"],Xi);var QD=vl("Seconds",!1);Le("S",0,0,function(){return~~(this.millisecond()/100)});Le(0,["SS",2],0,function(){return~~(this.millisecond()/10)});Le(0,["SSS",3],0,"millisecond");Le(0,["SSSS",4],0,function(){return this.millisecond()*10});Le(0,["SSSSS",5],0,function(){return this.millisecond()*100});Le(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});Le(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});Le(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});Le(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});an("millisecond","ms");cn("millisecond",16);ke("S",Yc,Sw);ke("SS",Yc,Vn);ke("SSS",Yc,Ew);var vs,iy;for(vs="SSSS";vs.length<=9;vs+="S")ke(vs,kl);function eM(t,e){e[Ws]=Ze(("0."+t)*1e3)}for(vs="S";vs.length<=9;vs+="S")pt(vs,eM);iy=vl("Milliseconds",!1);Le("z",0,0,"zoneAbbr");Le("zz",0,0,"zoneName");function tM(){return this._isUTC?"UTC":""}function nM(){return this._isUTC?"Coordinated Universal Time":""}var le=Lo.prototype;le.add=WC;le.calendar=tD;le.clone=nD;le.diff=cD;le.endOf=vD;le.format=pD;le.from=mD;le.fromNow=hD;le.to=gD;le.toNow=_D;le.get=sI;le.invalidAt=AD;le.isAfter=iD;le.isBefore=sD;le.isBetween=rD;le.isSame=lD;le.isSameOrAfter=oD;le.isSameOrBefore=aD;le.isValid=TD;le.lang=Zw;le.locale=Kw;le.localeData=Xw;le.max=TC;le.min=EC;le.parsingFlags=OD;le.set=rI;le.startOf=bD;le.subtract=KC;le.toArray=$D;le.toObject=SD;le.toDate=yD;le.toISOString=fD;le.inspect=dD;typeof Symbol<"u"&&Symbol.for!=null&&(le[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});le.toJSON=ED;le.toString=uD;le.unix=wD;le.valueOf=kD;le.creationData=LD;le.eraName=CD;le.eraNarrow=DD;le.eraAbbr=MD;le.eraYear=jD;le.year=Cw;le.isLeapYear=SI;le.weekYear=HD;le.isoWeekYear=VD;le.quarter=le.quarters=ZD;le.month=Pw;le.daysInMonth=wI;le.week=le.weeks=NI;le.isoWeek=le.isoWeeks=PI;le.weeksInYear=GD;le.weeksInWeekYear=WD;le.isoWeeksInYear=qD;le.isoWeeksInISOWeekYear=YD;le.date=ny;le.day=le.days=VI;le.weekday=qI;le.isoWeekday=YI;le.dayOfYear=XD;le.hour=le.hours=QI;le.minute=le.minutes=JD;le.second=le.seconds=QD;le.millisecond=le.milliseconds=iy;le.utcOffset=MC;le.utc=RC;le.local=FC;le.parseZone=UC;le.hasAlignedHourOffset=xC;le.isDST=zC;le.isLocal=HC;le.isUtcOffset=VC;le.isUtc=qw;le.isUTC=qw;le.zoneAbbr=tM;le.zoneName=nM;le.dates=ii("dates accessor is deprecated. Use date instead.",ny);le.months=ii("months accessor is deprecated. Use month instead",Pw);le.years=ii("years accessor is deprecated. Use year instead",Cw);le.zone=ii("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",jC);le.isDSTShifted=ii("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",BC);function iM(t){return kt(t*1e3)}function sM(){return kt.apply(null,arguments).parseZone()}function sy(t){return t}var rt=vp.prototype;rt.calendar=V8;rt.longDateFormat=W8;rt.invalidDate=Z8;rt.ordinal=Q8;rt.preparse=sy;rt.postformat=sy;rt.relativeTime=tI;rt.pastFuture=nI;rt.set=B8;rt.eras=ND;rt.erasParse=PD;rt.erasConvertYear=ID;rt.erasAbbrRegex=FD;rt.erasNameRegex=RD;rt.erasNarrowRegex=UD;rt.months=_I;rt.monthsShort=bI;rt.monthsParse=kI;rt.monthsRegex=$I;rt.monthsShortRegex=yI;rt.week=TI;rt.firstDayOfYear=LI;rt.firstDayOfWeek=AI;rt.weekdays=UI;rt.weekdaysMin=zI;rt.weekdaysShort=xI;rt.weekdaysParse=HI;rt.weekdaysRegex=GI;rt.weekdaysShortRegex=WI;rt.weekdaysMinRegex=KI;rt.isPM=XI;rt.meridiem=eC;function sc(t,e,i,n){var s=us(),r=Di().set(n,e);return s[i](r,t)}function ry(t,e,i){if(ls(t)&&(e=t,t=void 0),t=t||"",e!=null)return sc(t,e,i,"month");var n,s=[];for(n=0;n<12;n++)s[n]=sc(t,n,i,"month");return s}function Mp(t,e,i,n){typeof t=="boolean"?(ls(e)&&(i=e,e=void 0),e=e||""):(e=t,i=e,t=!1,ls(e)&&(i=e,e=void 0),e=e||"");var s=us(),r=t?s._week.dow:0,l,o=[];if(i!=null)return sc(e,(i+r)%7,n,"day");for(l=0;l<7;l++)o[l]=sc(e,(l+r)%7,n,"day");return o}function rM(t,e){return ry(t,e,"months")}function lM(t,e){return ry(t,e,"monthsShort")}function oM(t,e,i){return Mp(t,e,i,"weekdays")}function aM(t,e,i){return Mp(t,e,i,"weekdaysShort")}function cM(t,e,i){return Mp(t,e,i,"weekdaysMin")}Es("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,i=Ze(t%100/10)===1?"th":e===1?"st":e===2?"nd":e===3?"rd":"th";return t+i}});fe.lang=ii("moment.lang is deprecated. Use moment.locale instead.",Es);fe.langData=ii("moment.langData is deprecated. Use moment.localeData instead.",us);var Bi=Math.abs;function uM(){var t=this._data;return this._milliseconds=Bi(this._milliseconds),this._days=Bi(this._days),this._months=Bi(this._months),t.milliseconds=Bi(t.milliseconds),t.seconds=Bi(t.seconds),t.minutes=Bi(t.minutes),t.hours=Bi(t.hours),t.months=Bi(t.months),t.years=Bi(t.years),this}function ly(t,e,i,n){var s=vi(e,i);return t._milliseconds+=n*s._milliseconds,t._days+=n*s._days,t._months+=n*s._months,t._bubble()}function fM(t,e){return ly(this,t,e,1)}function dM(t,e){return ly(this,t,e,-1)}function f_(t){return t<0?Math.floor(t):Math.ceil(t)}function pM(){var t=this._milliseconds,e=this._days,i=this._months,n=this._data,s,r,l,o,a;return t>=0&&e>=0&&i>=0||t<=0&&e<=0&&i<=0||(t+=f_(ld(i)+e)*864e5,e=0,i=0),n.milliseconds=t%1e3,s=Wn(t/1e3),n.seconds=s%60,r=Wn(s/60),n.minutes=r%60,l=Wn(r/60),n.hours=l%24,e+=Wn(l/24),a=Wn(oy(e)),i+=a,e-=f_(ld(a)),o=Wn(i/12),i%=12,n.days=e,n.months=i,n.years=o,this}function oy(t){return t*4800/146097}function ld(t){return t*146097/4800}function mM(t){if(!this.isValid())return NaN;var e,i,n=this._milliseconds;if(t=si(t),t==="month"||t==="quarter"||t==="year")switch(e=this._days+n/864e5,i=this._months+oy(e),t){case"month":return i;case"quarter":return i/3;case"year":return i/12}else switch(e=this._days+Math.round(ld(this._months)),t){case"week":return e/7+n/6048e5;case"day":return e+n/864e5;case"hour":return e*24+n/36e5;case"minute":return e*1440+n/6e4;case"second":return e*86400+n/1e3;case"millisecond":return Math.floor(e*864e5)+n;default:throw new Error("Unknown unit "+t)}}function hM(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+Ze(this._months/12)*31536e6:NaN}function fs(t){return function(){return this.as(t)}}var gM=fs("ms"),_M=fs("s"),bM=fs("m"),vM=fs("h"),kM=fs("d"),wM=fs("w"),yM=fs("M"),$M=fs("Q"),SM=fs("y");function EM(){return vi(this)}function TM(t){return t=si(t),this.isValid()?this[t+"s"]():NaN}function dr(t){return function(){return this.isValid()?this._data[t]:NaN}}var OM=dr("milliseconds"),AM=dr("seconds"),LM=dr("minutes"),NM=dr("hours"),PM=dr("days"),IM=dr("months"),CM=dr("years");function DM(){return Wn(this.days()/7)}var Vi=Math.round,zr={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function MM(t,e,i,n,s){return s.relativeTime(e||1,!!i,t,n)}function jM(t,e,i,n){var s=vi(t).abs(),r=Vi(s.as("s")),l=Vi(s.as("m")),o=Vi(s.as("h")),a=Vi(s.as("d")),c=Vi(s.as("M")),u=Vi(s.as("w")),f=Vi(s.as("y")),d=r<=i.ss&&["s",r]||r<i.s&&["ss",r]||l<=1&&["m"]||l<i.m&&["mm",l]||o<=1&&["h"]||o<i.h&&["hh",o]||a<=1&&["d"]||a<i.d&&["dd",a];return i.w!=null&&(d=d||u<=1&&["w"]||u<i.w&&["ww",u]),d=d||c<=1&&["M"]||c<i.M&&["MM",c]||f<=1&&["y"]||["yy",f],d[2]=e,d[3]=+t>0,d[4]=n,MM.apply(null,d)}function RM(t){return t===void 0?Vi:typeof t=="function"?(Vi=t,!0):!1}function FM(t,e){return zr[t]===void 0?!1:e===void 0?zr[t]:(zr[t]=e,t==="s"&&(zr.ss=e-1),!0)}function UM(t,e){if(!this.isValid())return this.localeData().invalidDate();var i=!1,n=zr,s,r;return typeof t=="object"&&(e=t,t=!1),typeof t=="boolean"&&(i=t),typeof e=="object"&&(n=Object.assign({},zr,e),e.s!=null&&e.ss==null&&(n.ss=e.s-1)),s=this.localeData(),r=jM(this,!i,n,s),i&&(r=s.pastFuture(+this,r)),s.postformat(r)}var Ku=Math.abs;function Ar(t){return(t>0)-(t<0)||+t}function eu(){if(!this.isValid())return this.localeData().invalidDate();var t=Ku(this._milliseconds)/1e3,e=Ku(this._days),i=Ku(this._months),n,s,r,l,o=this.asSeconds(),a,c,u,f;return o?(n=Wn(t/60),s=Wn(n/60),t%=60,n%=60,r=Wn(i/12),i%=12,l=t?t.toFixed(3).replace(/\.?0+$/,""):"",a=o<0?"-":"",c=Ar(this._months)!==Ar(o)?"-":"",u=Ar(this._days)!==Ar(o)?"-":"",f=Ar(this._milliseconds)!==Ar(o)?"-":"",a+"P"+(r?c+r+"Y":"")+(i?c+i+"M":"")+(e?u+e+"D":"")+(s||n||t?"T":"")+(s?f+s+"H":"")+(n?f+n+"M":"")+(t?f+l+"S":"")):"P0D"}var et=Jc.prototype;et.isValid=PC;et.abs=uM;et.add=fM;et.subtract=dM;et.as=mM;et.asMilliseconds=gM;et.asSeconds=_M;et.asMinutes=bM;et.asHours=vM;et.asDays=kM;et.asWeeks=wM;et.asMonths=yM;et.asQuarters=$M;et.asYears=SM;et.valueOf=hM;et._bubble=pM;et.clone=EM;et.get=TM;et.milliseconds=OM;et.seconds=AM;et.minutes=LM;et.hours=NM;et.days=PM;et.weeks=DM;et.months=IM;et.years=CM;et.humanize=UM;et.toISOString=eu;et.toString=eu;et.toJSON=eu;et.locale=Kw;et.localeData=Xw;et.toIsoString=ii("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",eu);et.lang=Zw;Le("X",0,0,"unix");Le("x",0,0,"valueOf");ke("x",Wc);ke("X",oI);pt("X",function(t,e,i){i._d=new Date(parseFloat(t)*1e3)});pt("x",function(t,e,i){i._d=new Date(Ze(t))});//! moment.js
|
|
438
|
-
fe.version="2.29.4";x8(kt);fe.fn=le;fe.min=OC;fe.max=AC;fe.now=LC;fe.utc=Di;fe.unix=iM;fe.months=rM;fe.isDate=Ao;fe.locale=Es;fe.invalid=Hc;fe.duration=vi;fe.isMoment=pi;fe.weekdays=oM;fe.parseZone=sM;fe.localeData=us;fe.isDuration=ma;fe.monthsShort=lM;fe.weekdaysMin=cM;fe.defineLocale=Op;fe.updateLocale=sC;fe.locales=rC;fe.weekdaysShort=aM;fe.normalizeUnits=si;fe.relativeTimeRounding=RM;fe.relativeTimeThreshold=FM;fe.calendarFormat=eD;fe.prototype=le;fe.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"};const xM=(t,e)=>{const{format:i,date_format:n,picker_utc:s=!1}=e,r=n===!1;if(t==="")return"";if(t){if(r)return t;try{return i?s?fe.utc(t).format(i):fe(t).format(i):new Date(t).toISOString()}catch{return}}},zM=(t,e)=>{const{required:i=!0,format:n,date_format:s,time_format:r,picker_utc:l=!1}=e,o=r===!1,a=s===!1;if(!(!i&&!t)){if(a)return t??"";try{const{year:c,month:u,day:f,hour:d,minute:p}=Pc({date:t?fe(t,n).toDate():new Date,timeZone:l||o&&t?.match(/^\d{4}-[01]\d-[0-3]\d$/)||o&&t?.match(/T00:00(?::00)?(?:\.000)?Z$/)?"UTC":void 0});return o?`${c}-${u}-${f}`:`${c}-${u}-${f}T${d}:${p}`}catch{return}}},BM=(t,e)=>{const{format:i,date_format:n,picker_utc:s=!1}=e,r=n===!1;if(t)try{return i?s?fe.utc(t,i).toDate():fe(t,i).toDate():r?new Date(new Date(`${new Date().toJSON().split("T")[0]}T${t}`)):new Date(t)}catch{return}};function HM(t){ve(t,"svelte-1pvuczz","div.svelte-1pvuczz.svelte-1pvuczz{display:flex;align-items:center}div.svelte-1pvuczz input.svelte-1pvuczz{margin-right:auto;color:inherit;background-color:transparent;font-family:var(--sui-textbox-font-family)}div.svelte-1pvuczz input.svelte-1pvuczz:disabled{opacity:0.4}div.svelte-1pvuczz button{margin:4px}")}function VM(t){let e,i,n;return{c(){e=I("input"),C(e,"type","datetime-local"),e.disabled=t[0],C(e,"class","svelte-1pvuczz")},m(s,r){y(s,e,r),Jn(e,t[1]),i||(n=je(e,"input",t[12]),i=!0)},p(s,r){r&1&&(e.disabled=s[0]),r&2&&Jn(e,s[1])},d(s){s&&w(e),i=!1,n()}}}function qM(t){let e,i,n;return{c(){e=I("input"),C(e,"type","time"),e.disabled=t[0],C(e,"class","svelte-1pvuczz")},m(s,r){y(s,e,r),Jn(e,t[1]),i||(n=je(e,"input",t[11]),i=!0)},p(s,r){r&1&&(e.disabled=s[0]),r&2&&Jn(e,s[1])},d(s){s&&w(e),i=!1,n()}}}function YM(t){let e,i,n;return{c(){e=I("input"),C(e,"type","date"),e.disabled=t[0],C(e,"class","svelte-1pvuczz")},m(s,r){y(s,e,r),Jn(e,t[1]),i||(n=je(e,"input",t[10]),i=!0)},p(s,r){r&1&&(e.disabled=s[0]),r&2&&Jn(e,s[1])},d(s){s&&w(e),i=!1,n()}}}function GM(t){let e;function i(r,l){return r[3]?YM:r[2]?qM:VM}let n=i(t),s=n(t);return{c(){e=I("div"),s.c(),C(e,"class","svelte-1pvuczz")},m(r,l){y(r,e,l),s.m(e,null)},p(r,[l]){n===(n=i(r))&&s?s.p(r,l):(s.d(1),s=n(r),s&&(s.c(),s.m(e,null)))},i:z,o:z,d(r){r&&w(e),s.d()}}}function WM(t,e,i){let n,s,r,l,{locale:o}=e,{keyPath:a}=e,{fieldConfig:c}=e,{currentValue:u}=e,{disabled:f=!1}=e,d;const p=()=>{const v=xM(d,c);v!==void 0&&v!==u&&i(4,u=v)},h=()=>{const v=zM(u,c);v!==void 0&&v!==d&&i(1,d=v)};function _(){d=this.value,i(1,d)}function b(){d=this.value,i(1,d)}function k(){d=this.value,i(1,d)}return t.$$set=v=>{"locale"in v&&i(5,o=v.locale),"keyPath"in v&&i(6,a=v.keyPath),"fieldConfig"in v&&i(7,c=v.fieldConfig),"currentValue"in v&&i(4,u=v.currentValue),"disabled"in v&&i(0,f=v.disabled)},t.$$.update=()=>{t.$$.dirty&128&&i(8,{date_format:n,time_format:s}=c,n,(i(9,s),i(7,c))),t.$$.dirty&512&&i(3,r=s===!1),t.$$.dirty&256&&i(2,l=n===!1),t.$$.dirty&2&&p(),t.$$.dirty&16&&h()},[f,d,l,r,u,o,a,c,n,s,_,b,k]}class d_ extends J{constructor(e){super(),X(this,e,WM,GM,Z,{locale:5,keyPath:6,fieldConfig:7,currentValue:4,disabled:0},HM)}}function p_(t){let e;function i(r,l){return r[3]?ZM:KM}let n=i(t),s=n(t);return{c(){e=I("p"),s.c()},m(r,l){y(r,e,l),s.m(e,null)},p(r,l){n===(n=i(r))&&s?s.p(r,l):(s.d(1),s=n(r),s&&(s.c(),s.m(e,null)))},d(r){r&&w(e),s.d()}}}function KM(t){let e,i;function n(l,o){return l[4]?JM:XM}let s=n(t),r=s(t);return{c(){e=I("time"),r.c(),C(e,"datetime",i=t[2].toJSON())},m(l,o){y(l,e,o),r.m(e,null)},p(l,o){s===(s=n(l))&&r?r.p(l,o):(r.d(1),r=s(l),r&&(r.c(),r.m(e,null))),o&4&&i!==(i=l[2].toJSON())&&C(e,"datetime",i)},d(l){l&&w(e),r.d()}}}function ZM(t){let e=t[2].toLocaleTimeString(t[0],t[7])+"",i;return{c(){i=q(e)},m(n,s){y(n,i,s)},p(n,s){s&5&&e!==(e=n[2].toLocaleTimeString(n[0],n[7])+"")&&W(i,e)},d(n){n&&w(i)}}}function XM(t){let e=t[2].toLocaleString(t[0],{...t[6],...t[7],timeZone:t[5]?"UTC":void 0})+"",i;return{c(){i=q(e)},m(n,s){y(n,i,s)},p(n,s){s&37&&e!==(e=n[2].toLocaleString(n[0],{...n[6],...n[7],timeZone:n[5]?"UTC":void 0})+"")&&W(i,e)},d(n){n&&w(i)}}}function JM(t){let e=t[2].toLocaleDateString(t[0],{...t[6],timeZone:t[5]||t[4]&&t[1]?.match(/^\d{4}-[01]\d-[0-3]\d$/)||t[4]&&t[1]?.match(/T00:00(?::00)?(?:\.000)?Z$/)?"UTC":void 0})+"",i;return{c(){i=q(e)},m(n,s){y(n,i,s)},p(n,s){s&55&&e!==(e=n[2].toLocaleDateString(n[0],{...n[6],timeZone:n[5]||n[4]&&n[1]?.match(/^\d{4}-[01]\d-[0-3]\d$/)||n[4]&&n[1]?.match(/T00:00(?::00)?(?:\.000)?Z$/)?"UTC":void 0})+"")&&W(i,e)},d(n){n&&w(i)}}}function QM(t){let e,i=t[2]&&p_(t);return{c(){i&&i.c(),e=K()},m(n,s){i&&i.m(n,s),y(n,e,s)},p(n,[s]){n[2]?i?i.p(n,s):(i=p_(n),i.c(),i.m(e.parentNode,e)):i&&(i.d(1),i=null)},i:z,o:z,d(n){n&&w(e),i&&i.d(n)}}}function e5(t,e,i){let n,s,r,l,o,a,{locale:c}=e,{keyPath:u}=e,{fieldConfig:f}=e,{currentValue:d}=e;const p={year:"numeric",month:"short",day:"numeric"},h={hour:"numeric",minute:"numeric",hour12:!0};return t.$$set=_=>{"locale"in _&&i(0,c=_.locale),"keyPath"in _&&i(8,u=_.keyPath),"fieldConfig"in _&&i(9,f=_.fieldConfig),"currentValue"in _&&i(1,d=_.currentValue)},t.$$.update=()=>{t.$$.dirty&512&&i(10,{date_format:n,time_format:s,picker_utc:r=!1}=f,n,(i(11,s),i(9,f)),(i(5,r),i(9,f))),t.$$.dirty&2048&&i(4,l=s===!1),t.$$.dirty&1024&&i(3,o=n===!1),t.$$.dirty&514&&i(2,a=BM(d,f))},[c,d,a,o,l,r,p,h,u,f,n,s]}class m_ extends J{constructor(e){super(),X(this,e,e5,QM,Z,{locale:0,keyPath:8,fieldConfig:9,currentValue:1})}}function t5(t){ve(t,"svelte-8fg15v",'.wrapper.svelte-8fg15v{display:contents}.wrapper.svelte-8fg15v .listbox{gap:4px;overflow-x:hidden;overflow-y:auto;border-width:0;height:100%}.wrapper.svelte-8fg15v .listbox .option button{border-radius:var(--sui-control-medium-border-radius);padding:4px;width:100%;height:auto;transition:none}.wrapper.svelte-8fg15v .listbox .option button img,.wrapper.svelte-8fg15v .listbox .option button video{flex:none;border-radius:var(--sui-control-medium-border-radius);aspect-ratio:1/1;object-fit:contain}.wrapper.svelte-8fg15v .listbox .option button[aria-selected="true"]{outline-width:4px;outline-style:solid;outline-color:var(--sui-primary-accent-color)}.wrapper.svelte-8fg15v .listbox .option button[aria-selected="true"] .icon{display:none}.wrapper.svelte-8fg15v .listbox.grid{display:grid;grid-template-columns:repeat(auto-fill, minmax(160px, 1fr));height:auto;max-height:100%}.wrapper.svelte-8fg15v .listbox.grid .option button img,.wrapper.svelte-8fg15v .listbox.grid .option button video{width:100%}.wrapper.svelte-8fg15v .listbox.grid .option button .name:not(:only-child){position:absolute;left:-99999px}.wrapper.svelte-8fg15v .listbox.list .option button{gap:16px}.wrapper.svelte-8fg15v .listbox.list .option button img,.wrapper.svelte-8fg15v .listbox.list .option button video{width:48px}.wrapper.svelte-8fg15v .listbox.list .option button .name{flex:auto;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;white-space:normal;line-height:var(--sui-line-height-compact)}')}function n5(t){let e;const i=t[1].default,n=Ne(i,t,t[3],null);return{c(){n&&n.c()},m(s,r){n&&n.m(s,r),e=!0},p(s,r){n&&n.p&&(!e||r&8)&&Ie(n,i,s,s[3],e?Pe(i,s[3],r,null):Ce(s[3]),null)},i(s){e||(m(n,s),e=!0)},o(s){g(n,s),e=!1},d(s){n&&n.d(s)}}}function i5(t){let e,i,n;return i=new _o({props:{class:t[0],$$slots:{default:[n5]},$$scope:{ctx:t}}}),i.$on("select",t[2]),{c(){e=I("div"),T(i.$$.fragment),C(e,"class","wrapper svelte-8fg15v")},m(s,r){y(s,e,r),S(i,e,null),n=!0},p(s,[r]){const l={};r&1&&(l.class=s[0]),r&8&&(l.$$scope={dirty:r,ctx:s}),i.$set(l)},i(s){n||(m(i.$$.fragment,s),n=!0)},o(s){g(i.$$.fragment,s),n=!1},d(s){s&&w(e),E(i)}}}function s5(t,e,i){let{$$slots:n={},$$scope:s}=e,{viewType:r="grid"}=e;function l(o){Ue.call(this,t,o)}return t.$$set=o=>{"viewType"in o&&i(0,r=o.viewType),"$$scope"in o&&i(3,s=o.$$scope)},[r,n,l,s]}class ay extends J{constructor(e){super(),X(this,e,s5,i5,Z,{viewType:0},t5)}}function r5(t){ve(t,"svelte-1943iam",".grid-wrapper.svelte-1943iam{display:contents}")}function h_(t,e,i){const n=t.slice();return n[7]=e[i],n}function l5(t){let e,i;return e=new Ln({props:{$$slots:{default:[a5]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&1032&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function o5(t){let e,i,n;return i=new ay({props:{viewType:t[2]?.type,$$slots:{default:[u5]},$$scope:{ctx:t}}}),i.$on("select",t[6]),{c(){e=I("div"),T(i.$$.fragment),C(e,"class","grid-wrapper svelte-1943iam")},m(s,r){y(s,e,r),S(i,e,null),n=!0},p(s,r){const l={};r&4&&(l.viewType=s[2]?.type),r&1026&&(l.$$scope={dirty:r,ctx:s}),i.$set(l)},i(s){n||(m(i.$$.fragment,s),n=!0)},o(s){g(i.$$.fragment,s),n=!1},d(s){s&&w(e),E(i)}}}function a5(t){let e,i=t[3]("no_files_found")+"",n;return{c(){e=I("span"),n=q(i)},m(s,r){y(s,e,r),O(e,n)},p(s,r){r&8&&i!==(i=s[3]("no_files_found")+"")&&W(n,i)},d(s){s&&w(e)}}}function g_(t){let e,i;return e=new bi({props:{asset:t[7],checkerboard:!0}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&2&&(r.asset=n[7]),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function __(t){let e,i;return e=new bl({props:{asset:t[7]}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&2&&(r.asset=n[7]),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function c5(t){let e,i,n,s=t[7].name+"",r,l,o,a=t[7].kind==="image"&&g_(t),c=t[7].kind==="video"&&__(t);return{c(){a&&a.c(),e=D(),c&&c.c(),i=D(),n=I("span"),r=q(s),l=D(),C(n,"class","name")},m(u,f){a&&a.m(u,f),y(u,e,f),c&&c.m(u,f),y(u,i,f),y(u,n,f),O(n,r),y(u,l,f),o=!0},p(u,f){u[7].kind==="image"?a?(a.p(u,f),f&2&&m(a,1)):(a=g_(u),a.c(),m(a,1),a.m(e.parentNode,e)):a&&(H(),g(a,1,1,()=>{a=null}),V()),u[7].kind==="video"?c?(c.p(u,f),f&2&&m(c,1)):(c=__(u),c.c(),m(c,1),c.m(i.parentNode,i)):c&&(H(),g(c,1,1,()=>{c=null}),V()),(!o||f&2)&&s!==(s=u[7].name+"")&&W(r,s)},i(u){o||(m(a),m(c),o=!0)},o(u){g(a),g(c),o=!1},d(u){u&&(w(e),w(i),w(n),w(l)),a&&a.d(u),c&&c.d(u)}}}function b_(t,e){let i,n,s;return n=new ni({props:{value:e[7].sha,$$slots:{default:[c5]},$$scope:{ctx:e}}}),{key:t,first:null,c(){i=K(),T(n.$$.fragment),this.first=i},m(r,l){y(r,i,l),S(n,r,l),s=!0},p(r,l){e=r;const o={};l&2&&(o.value=e[7].sha),l&1026&&(o.$$scope={dirty:l,ctx:e}),n.$set(o)},i(r){s||(m(n.$$.fragment,r),s=!0)},o(r){g(n.$$.fragment,r),s=!1},d(r){r&&w(i),E(n,r)}}}function u5(t){let e=[],i=new Map,n,s,r=ce(t[1]);const l=o=>o[7].path;for(let o=0;o<r.length;o+=1){let a=h_(t,r,o),c=l(a);i.set(c,e[o]=b_(c,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();n=K()},m(o,a){for(let c=0;c<e.length;c+=1)e[c]&&e[c].m(o,a);y(o,n,a),s=!0},p(o,a){a&2&&(r=ce(o[1]),H(),e=ct(e,a,l,1,o,r,i,n.parentNode,at,b_,n,h_),V())},i(o){if(!s){for(let a=0;a<r.length;a+=1)m(e[a]);s=!0}},o(o){for(let a=0;a<e.length;a+=1)g(e[a]);s=!1},d(o){o&&w(n);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function f5(t){let e,i,n,s;const r=[o5,l5],l=[];function o(a,c){return a[1].length?0:1}return e=o(t),i=l[e]=r[e](t),{c(){i.c(),n=K()},m(a,c){l[e].m(a,c),y(a,n,c),s=!0},p(a,[c]){let u=e;e=o(a),e===u?l[e].p(a,c):(H(),g(l[u],1,1,()=>{l[u]=null}),V(),i=l[e],i?i.p(a,c):(i=l[e]=r[e](a),i.c()),m(i,1),i.m(n.parentNode,n))},i(a){s||(m(i),s=!0)},o(a){g(i),s=!1},d(a){a&&w(n),l[e].d(a)}}}function d5(t,e,i){let n,s,r;U(t,To,u=>i(2,s=u)),U(t,pe,u=>i(3,r=u));const l=os();let{assets:o=[]}=e,{searchTerms:a=""}=e;const c=u=>{l("select",{asset:o.find(({sha:f})=>f===u.detail.value)})};return t.$$set=u=>{"assets"in u&&i(0,o=u.assets),"searchTerms"in u&&i(5,a=u.searchTerms)},t.$$.update=()=>{t.$$.dirty&33&&i(1,n=a?o.filter(({name:u})=>u.toLowerCase().includes(a.toLowerCase())):o)},[o,n,s,r,l,a,c]}class jp extends J{constructor(e){super(),X(this,e,d5,f5,Z,{assets:0,searchTerms:5},r5)}}function p5(t){ve(t,"svelte-t9mjci","p.svelte-t9mjci{margin:0 0 8px}.input-outer.svelte-t9mjci{width:400px;text-align:center}")}function v_(t,e,i){const n=t.slice();return n[35]=e[i].id,n[36]=e[i].previewURL,n[37]=e[i].description,n[38]=e[i].kind,n}function m5(t){let e,i;return e=new Ln({props:{$$slots:{default:[_5]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s[0]&262144|s[1]&1024&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function h5(t){let e,i;return e=new Ln({props:{$$slots:{default:[b5]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s[0]&523901|s[1]&1024&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function g5(t){let e,i,n,s;const r=[y5,w5,k5,v5],l=[];function o(a,c){return a[8]?0:a[7]?a[7].length?3:2:1}return e=o(t),i=l[e]=r[e](t),{c(){i.c(),n=K()},m(a,c){l[e].m(a,c),y(a,n,c),s=!0},p(a,c){let u=e;e=o(a),e===u?l[e].p(a,c):(H(),g(l[u],1,1,()=>{l[u]=null}),V(),i=l[e],i?i.p(a,c):(i=l[e]=r[e](a),i.c()),m(i,1),i.m(n.parentNode,n))},i(a){s||(m(i),s=!0)},o(a){g(i),s=!1},d(a){a&&w(n),l[e].d(a)}}}function _5(t){let e,i=t[18]("cloud_storage.invalid")+"",n;return{c(){e=I("p"),n=q(i),C(e,"class","svelte-t9mjci")},m(s,r){y(s,e,r),O(e,n)},p(s,r){r[0]&262144&&i!==(i=s[18]("cloud_storage.invalid")+"")&&W(n,i)},d(s){s&&w(e)}}}function k_(t){let e,i=bn.sanitize(t[18]("prefs.media.stock_photos.description",{values:{service:t[15],homeHref:`href="${t[13]}"`,apiKeyHref:`href="${t[12]}"`}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})+"",n;return{c(){e=new ad(!1),n=K(),e.a=n},m(s,r){e.m(i,s,r),y(s,n,r)},p(s,r){r[0]&307200&&i!==(i=bn.sanitize(s[18]("prefs.media.stock_photos.description",{values:{service:s[15],homeHref:`href="${s[13]}"`,apiKeyHref:`href="${s[12]}"`}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})+"")&&e.p(i)},d(s){s&&(w(n),e.d())}}}function w_(t){let e,i=bn.sanitize(t[18](`cloud_storage.auth.${t[6]}`,{values:{service:t[15]}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})+"",n;return{c(){e=new ad(!1),n=K(),e.a=n},m(s,r){e.m(i,s,r),y(s,n,r)},p(s,r){r[0]&294976&&i!==(i=bn.sanitize(s[18](`cloud_storage.auth.${s[6]}`,{values:{service:s[15]}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})+"")&&e.p(i)},d(s){s&&(w(n),e.d())}}}function y_(t){let e,i,n;return i=new Hn({props:{spellcheck:"false","aria-label":t[18]("prefs.media.stock_photos.field_label",{values:{service:t[15]}})}}),i.$on("input",t[27]),{c(){e=I("div"),T(i.$$.fragment),C(e,"class","input-outer svelte-t9mjci")},m(s,r){y(s,e,r),S(i,e,null),n=!0},p(s,r){const l={};r[0]&294912&&(l["aria-label"]=s[18]("prefs.media.stock_photos.field_label",{values:{service:s[15]}})),i.$set(l)},i(s){n||(m(i.$$.fragment,s),n=!0)},o(s){g(i.$$.fragment,s),n=!1},d(s){s&&w(e),E(i)}}}function $_(t){let e,i,n,s,r,l,o,a,c,u,f;function d(b){t[28](b)}let p={spellcheck:"false","aria-label":t[18]("user_name"),disabled:t[6]==="requested"};t[0].userName!==void 0&&(p.value=t[0].userName),i=new Hn({props:p}),ae.push(()=>ze(i,"value",d));function h(b){t[29](b)}let _={spellcheck:"false","aria-label":t[18]("password"),disabled:t[6]==="requested"};return t[0].password!==void 0&&(_.value=t[0].password),l=new BE({props:_}),ae.push(()=>ze(l,"value",h)),u=new De({props:{class:"secondary",label:t[18]("sign_in"),disabled:!t[0].userName||!t[0].password||t[6]==="requested"}}),u.$on("click",t[30]),{c(){e=I("div"),T(i.$$.fragment),s=D(),r=I("div"),T(l.$$.fragment),a=D(),c=I("div"),T(u.$$.fragment),C(e,"class","input-outer svelte-t9mjci"),C(r,"class","input-outer svelte-t9mjci"),C(c,"class","input-outer svelte-t9mjci")},m(b,k){y(b,e,k),S(i,e,null),y(b,s,k),y(b,r,k),S(l,r,null),y(b,a,k),y(b,c,k),S(u,c,null),f=!0},p(b,k){const v={};k[0]&262144&&(v["aria-label"]=b[18]("user_name")),k[0]&64&&(v.disabled=b[6]==="requested"),!n&&k[0]&1&&(n=!0,v.value=b[0].userName,He(()=>n=!1)),i.$set(v);const $={};k[0]&262144&&($["aria-label"]=b[18]("password")),k[0]&64&&($.disabled=b[6]==="requested"),!o&&k[0]&1&&(o=!0,$.value=b[0].password,He(()=>o=!1)),l.$set($);const L={};k[0]&262144&&(L.label=b[18]("sign_in")),k[0]&65&&(L.disabled=!b[0].userName||!b[0].password||b[6]==="requested"),u.$set(L)},i(b){f||(m(i.$$.fragment,b),m(l.$$.fragment,b),m(u.$$.fragment,b),f=!0)},o(b){g(i.$$.fragment,b),g(l.$$.fragment,b),g(u.$$.fragment,b),f=!1},d(b){b&&(w(e),w(s),w(r),w(a),w(c)),E(i),E(l),E(u)}}}function b5(t){let e,i,n,s,r,l,o=t[16]==="stock_photos"&&k_(t),a=t[16]==="cloud_storage"&&w_(t),c=t[14]==="api_key"&&y_(t),u=t[14]==="password"&&$_(t);return{c(){e=I("p"),o&&o.c(),i=D(),a&&a.c(),n=D(),c&&c.c(),s=D(),u&&u.c(),r=K(),C(e,"class","svelte-t9mjci")},m(f,d){y(f,e,d),o&&o.m(e,null),O(e,i),a&&a.m(e,null),y(f,n,d),c&&c.m(f,d),y(f,s,d),u&&u.m(f,d),y(f,r,d),l=!0},p(f,d){f[16]==="stock_photos"?o?o.p(f,d):(o=k_(f),o.c(),o.m(e,i)):o&&(o.d(1),o=null),f[16]==="cloud_storage"?a?a.p(f,d):(a=w_(f),a.c(),a.m(e,null)):a&&(a.d(1),a=null),f[14]==="api_key"?c?(c.p(f,d),d[0]&16384&&m(c,1)):(c=y_(f),c.c(),m(c,1),c.m(s.parentNode,s)):c&&(H(),g(c,1,1,()=>{c=null}),V()),f[14]==="password"?u?(u.p(f,d),d[0]&16384&&m(u,1)):(u=$_(f),u.c(),m(u,1),u.m(r.parentNode,r)):u&&(H(),g(u,1,1,()=>{u=null}),V())},i(f){l||(m(c),m(u),l=!0)},o(f){g(c),g(u),l=!1},d(f){f&&(w(e),w(n),w(s),w(r)),o&&o.d(),a&&a.d(),c&&c.d(f),u&&u.d(f)}}}function v5(t){let e,i;return e=new ay({props:{viewType:t[19]?.type,$$slots:{default:[S5]},$$scope:{ctx:t}}}),e.$on("select",t[26]),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s[0]&524288&&(r.viewType=n[19]?.type),s[0]&128|s[1]&1024&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function k5(t){let e,i;return e=new Ln({props:{$$slots:{default:[E5]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s[0]&262144|s[1]&1024&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function w5(t){let e,i;return e=new Ln({props:{$$slots:{default:[T5]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s[0]&262144|s[1]&1024&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function y5(t){let e,i;return e=new Ln({props:{$$slots:{default:[O5]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s[0]&262400|s[1]&1024&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function S_(t){let e,i;return e=new bi({props:{src:t[36],crossorigin:"anonymous"}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s[0]&128&&(r.src=n[36]),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function E_(t){let e,i;return e=new bl({props:{src:t[36],crossorigin:"anonymous"}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s[0]&128&&(r.src=n[36]),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function $5(t){let e,i,n,s=t[37]+"",r,l,o,a=t[38]==="image"&&S_(t),c=t[38]==="video"&&E_(t);return{c(){a&&a.c(),e=D(),c&&c.c(),i=D(),n=I("span"),r=q(s),l=D(),C(n,"class","name")},m(u,f){a&&a.m(u,f),y(u,e,f),c&&c.m(u,f),y(u,i,f),y(u,n,f),O(n,r),y(u,l,f),o=!0},p(u,f){u[38]==="image"?a?(a.p(u,f),f[0]&128&&m(a,1)):(a=S_(u),a.c(),m(a,1),a.m(e.parentNode,e)):a&&(H(),g(a,1,1,()=>{a=null}),V()),u[38]==="video"?c?(c.p(u,f),f[0]&128&&m(c,1)):(c=E_(u),c.c(),m(c,1),c.m(i.parentNode,i)):c&&(H(),g(c,1,1,()=>{c=null}),V()),(!o||f[0]&128)&&s!==(s=u[37]+"")&&W(r,s)},i(u){o||(m(a),m(c),o=!0)},o(u){g(a),g(c),o=!1},d(u){u&&(w(e),w(i),w(n),w(l)),a&&a.d(u),c&&c.d(u)}}}function T_(t,e){let i,n,s;return n=new ni({props:{value:e[35],$$slots:{default:[$5]},$$scope:{ctx:e}}}),{key:t,first:null,c(){i=K(),T(n.$$.fragment),this.first=i},m(r,l){y(r,i,l),S(n,r,l),s=!0},p(r,l){e=r;const o={};l[0]&128&&(o.value=e[35]),l[0]&128|l[1]&1024&&(o.$$scope={dirty:l,ctx:e}),n.$set(o)},i(r){s||(m(n.$$.fragment,r),s=!0)},o(r){g(n.$$.fragment,r),s=!1},d(r){r&&w(i),E(n,r)}}}function S5(t){let e=[],i=new Map,n,s,r=ce(t[7]);const l=o=>o[35];for(let o=0;o<r.length;o+=1){let a=v_(t,r,o),c=l(a);i.set(c,e[o]=T_(c,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();n=K()},m(o,a){for(let c=0;c<e.length;c+=1)e[c]&&e[c].m(o,a);y(o,n,a),s=!0},p(o,a){a[0]&128&&(r=ce(o[7]),H(),e=ct(e,a,l,1,o,r,i,n.parentNode,at,T_,n,v_),V())},i(o){if(!s){for(let a=0;a<r.length;a+=1)m(e[a]);s=!0}},o(o){for(let a=0;a<e.length;a+=1)g(e[a]);s=!1},d(o){o&&w(n);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function E5(t){let e,i=t[18]("no_files_found")+"",n;return{c(){e=I("span"),n=q(i)},m(s,r){y(s,e,r),O(e,n)},p(s,r){r[0]&262144&&i!==(i=s[18]("no_files_found")+"")&&W(n,i)},d(s){s&&w(e)}}}function T5(t){let e,i=t[18]("searching")+"",n;return{c(){e=I("span"),n=q(i)},m(s,r){y(s,e,r),O(e,n)},p(s,r){r[0]&262144&&i!==(i=s[18]("searching")+"")&&W(n,i)},d(s){s&&w(e)}}}function O5(t){let e,i=t[18](`assets_dialog.error.${t[8]}`)+"",n;return{c(){e=I("span"),n=q(i)},m(s,r){y(s,e,r),O(e,n)},p(s,r){r[0]&262400&&i!==(i=s[18](`assets_dialog.error.${s[8]}`)+"")&&W(n,i)},d(s){s&&w(e)}}}function A5(t){let e,i,n,s;const r=[g5,h5,m5],l=[];function o(a,c){return a[2]?0:a[1]?1:2}return e=o(t),i=l[e]=r[e](t),{c(){i.c(),n=K()},m(a,c){l[e].m(a,c),y(a,n,c),s=!0},p(a,c){let u=e;e=o(a),e===u?l[e].p(a,c):(H(),g(l[u],1,1,()=>{l[u]=null}),V(),i=l[e],i?i.p(a,c):(i=l[e]=r[e](a),i.c()),m(i,1),i.m(n.parentNode,n))},i(a){s||(m(i),s=!0)},o(a){g(i),s=!1},d(a){a&&w(n),l[e].d(a)}}}function L5(t,e,i){let n,s,r,l,o,a,c,u,f,d,p,h,_,b;U(t,dt,re=>i(17,h=re)),U(t,pe,re=>i(18,_=re)),U(t,To,re=>i(19,b=re));let{kind:k="image"}=e,{searchTerms:v=""}=e,{serviceProps:$}=e;const L=os(),A={userName:"",password:""};let P=!0,F=!1,j="",N="",M="",R=0,G="initial",Q=null,te;const x=async(re="")=>{i(7,Q=null);try{i(7,Q=await p(re,{kind:k,apiKey:j,userName:N,password:M}))}catch{i(8,te="search_fetch_failed")}},Y=async re=>{const{downloadURL:_e,fileName:kn,credit:ht}=re;if(l){L("select",{url:_e,credit:ht});return}try{const qt=await fetch(_e);if(!qt.ok)throw new Error;const un=new File([await qt.blob()],kn,{type:"image/jpeg"});L("select",{file:un,credit:ht})}catch{i(8,te="image_fetch_failed")}};on(()=>{(async()=>(typeof f=="function"&&(i(1,P=!1),i(1,P=await f())),P&&(i(3,j=h.apiKeys?.[s]??""),i(4,[N,M]=(h.logins?.[s]??"").split(" "),N,i(5,M)),i(2,F=!!j||!!M),i(7,Q=null),F&&x())))()});const ue=re=>{Y(Q.find(({id:_e})=>_e===re.detail.value))},Fe=re=>{const _e=re.target.value.trim();u&&_e.match(u)&&(i(3,j=_e),i(2,F=!0),Me(dt,h.apiKeys||={},h),Me(dt,h.apiKeys[s]=j,h),x())};function lt(re){t.$$.not_equal(A.userName,re)&&(A.userName=re,i(0,A))}function mt(re){t.$$.not_equal(A.password,re)&&(A.password=re,i(0,A))}const bt=async()=>{i(6,G="requested"),i(0,A.userName=A.userName.trim(),A),i(0,A.password=A.password.trim(),A),await d(A.userName,A.password)?(i(6,G="success"),i(4,N=A.userName),i(5,M=A.password),i(2,F=!0),Me(dt,h.logins||={},h),Me(dt,h.logins[s]=[N,M].join(" "),h),x()):i(6,G="error")};return t.$$set=re=>{"kind"in re&&i(22,k=re.kind),"searchTerms"in re&&i(23,v=re.searchTerms),"serviceProps"in re&&i(24,$=re.serviceProps)},t.$$.update=()=>{t.$$.dirty[0]&16777216&&i(16,{serviceType:n="stock_photos",serviceId:s="",serviceLabel:r="",hotlinking:l=!1,authType:o="api_key",developerURL:a="",apiKeyURL:c="",apiKeyPattern:u,init:f,signIn:d,search:p}=$,n,(i(9,s),i(24,$)),(i(15,r),i(24,$)),(i(14,o),i(24,$)),(i(13,a),i(24,$)),(i(12,c),i(24,$)),(i(11,u),i(24,$)),(i(10,d),i(24,$))),t.$$.dirty[0]&41943040&&v&&(window.clearTimeout(R),i(25,R=window.setTimeout(()=>{x(v)},1e3)))},[A,P,F,j,N,M,G,Q,te,s,d,u,c,a,o,r,n,h,_,b,x,Y,k,v,$,R,ue,Fe,lt,mt,bt]}class cy extends J{constructor(e){super(),X(this,e,L5,A5,Z,{kind:22,searchTerms:23,serviceProps:24},p5,[-1,-1])}}const N5=["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"].join(",").split(","),O_="https://api.pexels.com/v1",P5=async(t,{apiKey:e})=>{const i={Authorization:e},[n]=ne(Vt).toLowerCase().split("-");let s=[];if(t)for(let r=1;r<=2;r+=1){const l=new URLSearchParams({query:t,locale:N5.find(u=>u.split("-")[0]===n)||"en-US",page:r,per_page:80}),o=await fetch(`${O_}/search?${l.toString()}`,{headers:i});if(!o.ok)return Promise.reject();const{photos:a,next_page:c}=await o.json();if(s.push(...a),!c)break;await Rd(50)}else{const r=new URLSearchParams({per_page:80}),l=await fetch(`${O_}/curated?${r.toString()}`,{headers:i});if(!l.ok)return Promise.reject();s=(await l.json()).photos}return s.map(({id:r,url:l,alt:o,src:{large2x:a,tiny:c},photographer:u})=>({id:String(r),description:o,previewURL:c,downloadURL:a,fileName:`pexels-${u.split(/\s+/).join("-").toLowerCase()}-${r}.jpg`,kind:"image",credit:`<a href="${l}">Photo by ${u} on Pexels</a>`}))},I5={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:P5},C5="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".split(","),D5="https://pixabay.com/api",M5=async(t,{apiKey:e})=>{const[i]=ne(Vt).toLowerCase().split("-"),n=new URLSearchParams({key:e,q:t,lang:C5.includes(i)?i:"en",image_type:"photo",min_width:1280,editors_choice:!t,safesearch:!0,per_page:150}),s=await fetch(`${D5}/?${n.toString()}`);return s.ok?(await s.json()).hits.map(({id:l,webformatURL:o,previewURL:a,largeImageURL:c,imageWidth:u,imageHeight:f,pageURL:d,tags:p,user:h})=>({id:String(l),description:p,previewURL:o.replace("_640.",u>f?"_180.":"_340."),downloadURL:c,fileName:a.split("/").pop().replace("_150.","_1280."),kind:"image",credit:`<a href="${d}">Photo by ${h} on Pixabay`})):Promise.reject()},j5={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:M5},R5=["af,am,ar,az,be,bg,bn,bs,ca,ceb,co,cs,cy,da,de,el,en,eo,es,et,eu,fa,fi,fr,fy,ga,gd,gl,gu,ha,haw","hi,hmn,hr,ht,hu,hy,id,ig,is,it,iw,ja,jw,ka,kk,km,kn,ko,ku,ky,la,lb,lo,lt,lv,mg,mi,mk,ml,mn,mr","ms,mt,my,ne,nl,no,ny,or,pa,pl,ps,pt,ro,ru,rw,sd,si,sk,sl,sm,sn,so,sq,sr,st,su,sv,sw,ta,te,tg,th","tk,tl,tr,tt,ug,uk,ur,uz,vi,xh,yi,yo,zh,zh-TW,zu"].join(",").split(","),A_="https://api.unsplash.com",L_="utm_source=sveltia-cms&utm_medium=referral",F5=async(t,{apiKey:e})=>{const i={Authorization:`Client-ID ${e}`},[n]=ne(Vt).toLowerCase().split("-");let s=[];if(t)for(let r=1;r<=5;r+=1){const l=new URLSearchParams({query:t,lang:R5.includes(n)?n:"en",page:r,per_page:30}),o=await fetch(`${A_}/search/photos?${l.toString()}`,{headers:i});if(!o.ok)return Promise.reject();const{results:a,total_pages:c}=await o.json();if(s.push(...a),c===r)break;await Rd(50)}else{const r=new URLSearchParams({per_page:30}),l=await fetch(`${A_}/photos?${r.toString()}`,{headers:i});if(!l.ok)return Promise.reject();s=await l.json()}return s.map(({id:r,description:l,alt_description:o,urls:{regular:a,thumb:c},user:{username:u,name:f}})=>({id:String(r),description:[l,o].filter(Boolean).join(" — "),previewURL:c,downloadURL:a,fileName:`${f.split(/\s+/).join("-").toLowerCase()}-${r}-unsplash.jpg`,kind:"image",credit:`Photo by <a href="https://unsplash.com/@${u}?${L_}">${f}</a> on <a href="https://unsplash.com/?${L_}">Unsplash</a>`}))},U5={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:F5},co={},Ps={pexels:I5,pixabay:j5,unsplash:U5};function x5(t){ve(t,"svelte-magovh",".wrapper.svelte-magovh{display:flex;gap:16px;height:60vh}.wrapper.svelte-magovh .listbox{flex:none;background-color:transparent}.wrapper.svelte-magovh .content-pane{overflow:auto;flex:auto}")}function N_(t,e,i){const n=t.slice();return n[39]=e[i][0],n[40]=e[i][1],n}function P_(t,e,i){const n=t.slice();return n[39]=e[i][0],n[40]=e[i][1],n}function I_(t,e,i){const n=t.slice();return n[39]=e[i].serviceId,n[37]=e[i].serviceLabel,n}function C_(t,e,i){const n=t.slice();return n[39]=e[i].serviceId,n[37]=e[i].serviceLabel,n}function Zu(t){const e=t.slice(),i=Ps[e[3]]??{};return e[36]=i.showServiceLink,e[37]=i.serviceLabel,e[38]=i.serviceURL,e}function D_(t){let e,i;return e=new ni({props:{name:"collection-files",label:t[13]("collection_files"),"aria-selected":t[3]==="collection-files"}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s[0]&8192&&(r.label=n[13]("collection_files")),s[0]&8&&(r["aria-selected"]=n[3]==="collection-files"),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function z5(t){let e,i,n,s=t[4]&&D_(t);return i=new ni({props:{name:"all-files",label:t[13]("all_files"),"aria-selected":t[3]==="all-files"}}),{c(){s&&s.c(),e=D(),T(i.$$.fragment)},m(r,l){s&&s.m(r,l),y(r,e,l),S(i,r,l),n=!0},p(r,l){r[4]?s?(s.p(r,l),l[0]&16&&m(s,1)):(s=D_(r),s.c(),m(s,1),s.m(e.parentNode,e)):s&&(H(),g(s,1,1,()=>{s=null}),V());const o={};l[0]&8192&&(o.label=r[13]("all_files")),l[0]&8&&(o["aria-selected"]=r[3]==="all-files"),i.$set(o)},i(r){n||(m(s),m(i.$$.fragment,r),n=!0)},o(r){g(s),g(i.$$.fragment,r),n=!1},d(r){r&&w(e),s&&s.d(r),E(i,r)}}}function M_(t){let e,i;return e=new ni({props:{name:"enter-url",label:t[13]("assets_dialog.enter_url")}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s[0]&8192&&(r.label=n[13]("assets_dialog.enter_url")),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function j_(t,e){let i,n,s;return n=new ni({props:{name:e[39],label:e[37]}}),{key:t,first:null,c(){i=K(),T(n.$$.fragment),this.first=i},m(r,l){y(r,i,l),S(n,r,l),s=!0},p(r,l){e=r},i(r){s||(m(n.$$.fragment,r),s=!0)},o(r){g(n.$$.fragment,r),s=!1},d(r){r&&w(i),E(n,r)}}}function B5(t){let e,i=[],n=new Map,s,r,l=t[2]&&M_(t),o=ce(Object.values(co));const a=c=>c[39];for(let c=0;c<o.length;c+=1){let u=C_(t,o,c),f=a(u);n.set(f,i[c]=j_(f,u))}return{c(){l&&l.c(),e=D();for(let c=0;c<i.length;c+=1)i[c].c();s=K()},m(c,u){l&&l.m(c,u),y(c,e,u);for(let f=0;f<i.length;f+=1)i[f]&&i[f].m(c,u);y(c,s,u),r=!0},p(c,u){c[2]?l?(l.p(c,u),u[0]&4&&m(l,1)):(l=M_(c),l.c(),m(l,1),l.m(e.parentNode,e)):l&&(H(),g(l,1,1,()=>{l=null}),V()),u&0&&(o=ce(Object.values(co)),H(),i=ct(i,u,a,1,c,o,n,s.parentNode,at,j_,s,C_),V())},i(c){if(!r){m(l);for(let u=0;u<o.length;u+=1)m(i[u]);r=!0}},o(c){g(l);for(let u=0;u<i.length;u+=1)g(i[u]);r=!1},d(c){c&&(w(e),w(s)),l&&l.d(c);for(let u=0;u<i.length;u+=1)i[u].d(c)}}}function R_(t,e){let i,n,s;return n=new ni({props:{name:e[39],label:e[37]}}),{key:t,first:null,c(){i=K(),T(n.$$.fragment),this.first=i},m(r,l){y(r,i,l),S(n,r,l),s=!0},p(r,l){e=r},i(r){s||(m(n.$$.fragment,r),s=!0)},o(r){g(n.$$.fragment,r),s=!1},d(r){r&&w(i),E(n,r)}}}function H5(t){let e=[],i=new Map,n,s,r=ce(Object.values(Ps));const l=o=>o[39];for(let o=0;o<r.length;o+=1){let a=I_(t,r,o),c=l(a);i.set(c,e[o]=R_(c,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();n=K()},m(o,a){for(let c=0;c<e.length;c+=1)e[c]&&e[c].m(o,a);y(o,n,a),s=!0},p(o,a){a&0&&(r=ce(Object.values(Ps)),H(),e=ct(e,a,l,1,o,r,i,n.parentNode,at,R_,n,I_),V())},i(o){if(!s){for(let a=0;a<r.length;a+=1)m(e[a]);s=!0}},o(o){for(let a=0;a<e.length;a+=1)g(e[a]);s=!1},d(o){o&&w(n);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function V5(t){let e,i,n,s,r,l;return e=new $u({props:{label:t[13]("assets_dialog.location.this_repository"),$$slots:{default:[z5]},$$scope:{ctx:t}}}),n=new $u({props:{label:t[13]("assets_dialog.location.external_locations"),$$slots:{default:[B5]},$$scope:{ctx:t}}}),r=new $u({props:{label:t[13]("assets_dialog.location.stock_photos"),$$slots:{default:[H5]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment),i=D(),T(n.$$.fragment),s=D(),T(r.$$.fragment)},m(o,a){S(e,o,a),y(o,i,a),S(n,o,a),y(o,s,a),S(r,o,a),l=!0},p(o,a){const c={};a[0]&8192&&(c.label=o[13]("assets_dialog.location.this_repository")),a[0]&8216|a[1]&262144&&(c.$$scope={dirty:a,ctx:o}),e.$set(c);const u={};a[0]&8192&&(u.label=o[13]("assets_dialog.location.external_locations")),a[0]&8196|a[1]&262144&&(u.$$scope={dirty:a,ctx:o}),n.$set(u);const f={};a[0]&8192&&(f.label=o[13]("assets_dialog.location.stock_photos")),a[1]&262144&&(f.$$scope={dirty:a,ctx:o}),r.$set(f)},i(o){l||(m(e.$$.fragment,o),m(n.$$.fragment,o),m(r.$$.fragment,o),l=!0)},o(o){g(e.$$.fragment,o),g(n.$$.fragment,o),g(r.$$.fragment,o),l=!1},d(o){o&&(w(i),w(s)),E(e,o),E(n,o),E(r,o)}}}function F_(t){let e,i,n={accept:t[1]==="image"?"image/*":void 0,showFilePreview:!0,$$slots:{default:[q5]},$$scope:{ctx:t}};return e=new Bc({props:n}),t[24](e),e.$on("select",t[25]),{c(){T(e.$$.fragment)},m(s,r){S(e,s,r),i=!0},p(s,r){const l={};r[0]&2&&(l.accept=s[1]==="image"?"image/*":void 0),r[0]&17682|r[1]&262144&&(l.$$scope={dirty:r,ctx:s}),e.$set(l)},i(s){i||(m(e.$$.fragment,s),i=!0)},o(s){g(e.$$.fragment,s),i=!1},d(s){t[24](null),E(e,s)}}}function q5(t){let e,i;return e=new jp({props:{assets:t[14].filter(t[22]),searchTerms:t[10]}}),e.$on("select",t[23]),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s[0]&16402&&(r.assets=n[14].filter(n[22])),s[0]&1024&&(r.searchTerms=n[10]),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function U_(t){let e,i,n={accept:t[1]==="image"?"image/*":void 0,showFilePreview:!0,$$slots:{default:[Y5]},$$scope:{ctx:t}};return e=new Bc({props:n}),t[28](e),e.$on("select",t[29]),{c(){T(e.$$.fragment)},m(s,r){S(e,s,r),i=!0},p(s,r){const l={};r[0]&2&&(l.accept=s[1]==="image"?"image/*":void 0),r[0]&17666|r[1]&262144&&(l.$$scope={dirty:r,ctx:s}),e.$set(l)},i(s){i||(m(e.$$.fragment,s),i=!0)},o(s){g(e.$$.fragment,s),i=!1},d(s){t[28](null),E(e,s)}}}function Y5(t){let e,i;return e=new jp({props:{assets:t[14].filter(t[26]),searchTerms:t[10]}}),e.$on("select",t[27]),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s[0]&16386&&(r.assets=n[14].filter(n[26])),s[0]&1024&&(r.searchTerms=n[10]),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function x_(t){let e,i;return e=new Ln({props:{$$slots:{default:[G5]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s[0]&8962|s[1]&262144&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function G5(t){let e,i=(t[1]==="image"?t[13]("assets_dialog.enter_image_url"):t[13]("assets_dialog.enter_file_url"))+"",n,s,r,l,o;function a(u){t[30](u)}let c={};return t[9]!==void 0&&(c.value=t[9]),r=new Hn({props:c}),ae.push(()=>ze(r,"value",a)),r.$on("input",t[31]),{c(){e=I("div"),n=q(i),s=D(),T(r.$$.fragment)},m(u,f){y(u,e,f),O(e,n),y(u,s,f),S(r,u,f),o=!0},p(u,f){(!o||f[0]&8194)&&i!==(i=(u[1]==="image"?u[13]("assets_dialog.enter_image_url"):u[13]("assets_dialog.enter_file_url"))+"")&&W(n,i);const d={};!l&&f[0]&512&&(l=!0,d.value=u[9],He(()=>l=!1)),r.$set(d)},i(u){o||(m(r.$$.fragment,u),o=!0)},o(u){g(r.$$.fragment,u),o=!1},d(u){u&&(w(e),w(s)),E(r,u)}}}function z_(t){let e,i;return e=new cy({props:{kind:t[1],searchTerms:t[10],serviceProps:t[40]}}),e.$on("select",t[32]),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s[0]&2&&(r.kind=n[1]),s[0]&1024&&(r.searchTerms=n[10]),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function B_(t,e){let i,n,s,r=e[3]===e[39]&&z_(e);return{key:t,first:null,c(){i=K(),r&&r.c(),n=K(),this.first=i},m(l,o){y(l,i,o),r&&r.m(l,o),y(l,n,o),s=!0},p(l,o){e=l,e[3]===e[39]?r?(r.p(e,o),o[0]&8&&m(r,1)):(r=z_(e),r.c(),m(r,1),r.m(n.parentNode,n)):r&&(H(),g(r,1,1,()=>{r=null}),V())},i(l){s||(m(r),s=!0)},o(l){g(r),s=!1},d(l){l&&(w(i),w(n)),r&&r.d(l)}}}function H_(t){let e,i;return e=new cy({props:{kind:t[1],searchTerms:t[10],serviceProps:t[40]}}),e.$on("select",t[33]),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s[0]&2&&(r.kind=n[1]),s[0]&1024&&(r.searchTerms=n[10]),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function V_(t,e){let i,n,s,r=e[3]===e[39]&&H_(e);return{key:t,first:null,c(){i=K(),r&&r.c(),n=K(),this.first=i},m(l,o){y(l,i,o),r&&r.m(l,o),y(l,n,o),s=!0},p(l,o){e=l,e[3]===e[39]?r?(r.p(e,o),o[0]&8&&m(r,1)):(r=H_(e),r.c(),m(r,1),r.m(n.parentNode,n)):r&&(H(),g(r,1,1,()=>{r=null}),V())},i(l){s||(m(r),s=!0)},o(l){g(r),s=!1},d(l){l&&(w(i),w(n)),r&&r.d(l)}}}function W5(t){let e,i,n,s=[],r=new Map,l,o=[],a=new Map,c,u,f=t[4]&&t[3]==="collection-files"&&F_(t),d=t[3]==="all-files"&&U_(t),p=t[2]&&t[3]==="enter-url"&&x_(t),h=ce(Object.entries(co));const _=v=>v[39];for(let v=0;v<h.length;v+=1){let $=P_(t,h,v),L=_($);r.set(L,s[v]=B_(L,$))}let b=ce(Object.entries(Ps));const k=v=>v[39];for(let v=0;v<b.length;v+=1){let $=N_(t,b,v),L=k($);a.set(L,o[v]=V_(L,$))}return{c(){f&&f.c(),e=D(),d&&d.c(),i=D(),p&&p.c(),n=D();for(let v=0;v<s.length;v+=1)s[v].c();l=D();for(let v=0;v<o.length;v+=1)o[v].c();c=K()},m(v,$){f&&f.m(v,$),y(v,e,$),d&&d.m(v,$),y(v,i,$),p&&p.m(v,$),y(v,n,$);for(let L=0;L<s.length;L+=1)s[L]&&s[L].m(v,$);y(v,l,$);for(let L=0;L<o.length;L+=1)o[L]&&o[L].m(v,$);y(v,c,$),u=!0},p(v,$){v[4]&&v[3]==="collection-files"?f?(f.p(v,$),$[0]&24&&m(f,1)):(f=F_(v),f.c(),m(f,1),f.m(e.parentNode,e)):f&&(H(),g(f,1,1,()=>{f=null}),V()),v[3]==="all-files"?d?(d.p(v,$),$[0]&8&&m(d,1)):(d=U_(v),d.c(),m(d,1),d.m(i.parentNode,i)):d&&(H(),g(d,1,1,()=>{d=null}),V()),v[2]&&v[3]==="enter-url"?p?(p.p(v,$),$[0]&12&&m(p,1)):(p=x_(v),p.c(),m(p,1),p.m(n.parentNode,n)):p&&(H(),g(p,1,1,()=>{p=null}),V()),$[0]&1290&&(h=ce(Object.entries(co)),H(),s=ct(s,$,_,1,v,h,r,l.parentNode,at,B_,l,P_),V()),$[0]&1290&&(b=ce(Object.entries(Ps)),H(),o=ct(o,$,k,1,v,b,a,c.parentNode,at,V_,c,N_),V())},i(v){if(!u){m(f),m(d),m(p);for(let $=0;$<h.length;$+=1)m(s[$]);for(let $=0;$<b.length;$+=1)m(o[$]);u=!0}},o(v){g(f),g(d),g(p);for(let $=0;$<s.length;$+=1)g(s[$]);for(let $=0;$<o.length;$+=1)g(o[$]);u=!1},d(v){v&&(w(e),w(i),w(n),w(l),w(c)),f&&f.d(v),d&&d.d(v),p&&p.d(v);for(let $=0;$<s.length;$+=1)s[$].d(v);for(let $=0;$<o.length;$+=1)o[$].d(v)}}}function K5(t){let e,i,n,s,r;return i=new _o({props:{"aria-controls":t[7]+"-content-pane",class:"tabs",$$slots:{default:[V5]},$$scope:{ctx:t}}}),i.$on("select",t[21]),s=new _n({props:{id:t[7]+"-content-pane",class:"content-pane",$$slots:{default:[W5]},$$scope:{ctx:t}}}),{c(){e=I("div"),T(i.$$.fragment),n=D(),T(s.$$.fragment),C(e,"class","wrapper svelte-magovh")},m(l,o){y(l,e,o),S(i,e,null),O(e,n),S(s,e,null),r=!0},p(l,o){const a={};o[0]&128&&(a["aria-controls"]=l[7]+"-content-pane"),o[0]&8220|o[1]&262144&&(a.$$scope={dirty:o,ctx:l}),i.$set(a);const c={};o[0]&128&&(c.id=l[7]+"-content-pane"),o[0]&26494|o[1]&262144&&(c.$$scope={dirty:o,ctx:l}),s.$set(c)},i(l){r||(m(i.$$.fragment,l),m(s.$$.fragment,l),r=!0)},o(l){g(i.$$.fragment,l),g(s.$$.fragment,l),r=!1},d(l){l&&w(e),E(i),E(s)}}}function q_(t){let e,i;return e=new De({props:{class:"secondary",label:t[13]("upload")}}),e.$on("click",t[19]),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s[0]&8192&&(r.label=n[13]("upload")),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function Y_(t){let e,i,n,s,r;e=new mp({props:{currentView:To}});function l(a){t[20](a)}let o={disabled:!!t[8]?.file};return t[10]!==void 0&&(o.value=t[10]),n=new F0({props:o}),ae.push(()=>ze(n,"value",l)),{c(){T(e.$$.fragment),i=D(),T(n.$$.fragment)},m(a,c){S(e,a,c),y(a,i,c),S(n,a,c),r=!0},p(a,c){const u={};c[0]&256&&(u.disabled=!!a[8]?.file),!s&&c[0]&1024&&(s=!0,u.value=a[10],He(()=>s=!1)),n.$set(u)},i(a){r||(m(e.$$.fragment,a),m(n.$$.fragment,a),r=!0)},o(a){g(e.$$.fragment,a),g(n.$$.fragment,a),r=!1},d(a){a&&w(i),E(e,a),E(n,a)}}}function Z5(t){let e,i,n,s=t[12]&&q_(t),r=(t[12]||t[11])&&Y_(t);return{c(){s&&s.c(),e=D(),r&&r.c(),i=K()},m(l,o){s&&s.m(l,o),y(l,e,o),r&&r.m(l,o),y(l,i,o),n=!0},p(l,o){l[12]?s?(s.p(l,o),o[0]&4096&&m(s,1)):(s=q_(l),s.c(),m(s,1),s.m(e.parentNode,e)):s&&(H(),g(s,1,1,()=>{s=null}),V()),l[12]||l[11]?r?(r.p(l,o),o[0]&6144&&m(r,1)):(r=Y_(l),r.c(),m(r,1),r.m(i.parentNode,i)):r&&(H(),g(r,1,1,()=>{r=null}),V())},i(l){n||(m(s),m(r),n=!0)},o(l){g(s),g(r),n=!1},d(l){l&&(w(e),w(i)),s&&s.d(l),r&&r.d(l)}}}function G_(t){let e,i=t[36]&&W_(t);return{c(){i&&i.c(),e=K()},m(n,s){i&&i.m(n,s),y(n,e,s)},p(n,s){n[36]?i?i.p(n,s):(i=W_(n),i.c(),i.m(e.parentNode,e)):i&&(i.d(1),i=null)},d(n){n&&w(e),i&&i.d(n)}}}function W_(t){let e,i=t[13]("prefs.media.stock_photo.credit",{values:{service:t[37]}})+"",n,s;return{c(){e=I("a"),n=q(i),C(e,"href",s=t[38])},m(r,l){y(r,e,l),O(e,n)},p(r,l){l[0]&8200&&i!==(i=r[13]("prefs.media.stock_photo.credit",{values:{service:r[37]}})+"")&&W(n,i),l[0]&8&&s!==(s=r[38])&&C(e,"href",s)},d(r){r&&w(e)}}}function X5(t){let e,i=t[11]&&G_(Zu(t));return{c(){i&&i.c(),e=K()},m(n,s){i&&i.m(n,s),y(n,e,s)},p(n,s){n[11]?i?i.p(Zu(n),s):(i=G_(Zu(n)),i.c(),i.m(e.parentNode,e)):i&&(i.d(1),i=null)},d(n){n&&w(e),i&&i.d(n)}}}function J5(t){let e,i,n;function s(l){t[34](l)}let r={title:t[16],size:"x-large",okLabel:t[13]("insert"),okDisabled:!t[8],$$slots:{"footer-extra":[X5],"header-extra":[Z5],default:[K5]},$$scope:{ctx:t}};return t[0]!==void 0&&(r.open=t[0]),e=new Kn({props:r}),ae.push(()=>ze(e,"open",s)),e.$on("ok",t[35]),{c(){T(e.$$.fragment)},m(l,o){S(e,l,o),n=!0},p(l,o){const a={};o[0]&8192&&(a.okLabel=l[13]("insert")),o[0]&256&&(a.okDisabled=!l[8]),o[0]&32766|o[1]&262144&&(a.$$scope={dirty:o,ctx:l}),!i&&o[0]&1&&(i=!0,a.open=l[0],He(()=>i=!1)),e.$set(a)},i(l){n||(m(e.$$.fragment,l),n=!0)},o(l){g(e.$$.fragment,l),n=!1},d(l){E(e,l)}}}function Q5(t,e,i){let n,s,r,l,o,a,c,u;U(t,dt,_e=>i(17,o=_e)),U(t,Lt,_e=>i(18,a=_e)),U(t,pe,_e=>i(13,c=_e)),U(t,Qt,_e=>i(14,u=_e));let{open:f=!1}=e,{kind:d="image"}=e,{canEnterURL:p=!0}=e;const h=os(),_=c(d==="image"?"assets_dialog.title.image":"assets_dialog.title.file");let b,k,v="",$=null,L="",A="";on(()=>{i(7,v=`library-${Hs().split("-").pop()}`)});const P=()=>{s==="collection-files"?b.openFilePicker():k.openFilePicker()};function F(_e){A=_e,i(10,A)}const j=_e=>{i(3,s=_e.detail.name),i(8,$=null)},N=_e=>(!d||d===_e.kind)&&n===_e.folder,M=({detail:_e})=>{i(8,$=_e)};function R(_e){ae[_e?"unshift":"push"](()=>{b=_e,i(5,b)})}const G=({detail:{files:_e}})=>{i(8,$=_e.length?{file:_e[0]}:null)},Q=_e=>!d||d===_e.kind,te=({detail:_e})=>{i(8,$=_e)};function x(_e){ae[_e?"unshift":"push"](()=>{k=_e,i(6,k)})}const Y=({detail:{files:_e}})=>{i(8,$=_e.length?{file:_e[0]}:null)};function ue(_e){L=_e,i(9,L),i(0,f)}const Fe=()=>{i(8,$=L.trim()?{url:L.trim()}:null)},lt=({detail:_e})=>{i(8,$=_e)},mt=({detail:_e})=>{i(8,$=_e)};function bt(_e){f=_e,i(0,f)}const re=()=>{h("select",$)};return t.$$set=_e=>{"open"in _e&&i(0,f=_e.open),"kind"in _e&&i(1,d=_e.kind),"canEnterURL"in _e&&i(2,p=_e.canEnterURL)},t.$$.update=()=>{t.$$.dirty[0]&262144&&i(4,n=Ai(a.media_folder??"")),t.$$.dirty[0]&16&&i(3,s=n?"collection-files":"all-files"),t.$$.dirty[0]&8&&i(12,r=["collection-files","all-files"].includes(s)),t.$$.dirty[0]&131080&&i(11,l=Object.keys(Ps).includes(s)&&o?.apiKeys?.[s]||Object.keys(co).includes(s)&&o?.logins?.[s]),t.$$.dirty[0]&1&&f&&i(9,L="")},[f,d,p,s,n,b,k,v,$,L,A,l,r,c,u,h,_,o,a,P,F,j,N,M,R,G,Q,te,x,Y,ue,Fe,lt,mt,bt,re]}class ej extends J{constructor(e){super(),X(this,e,Q5,J5,Z,{open:0,kind:1,canEnterURL:2},x5,[-1,-1])}}function tj(t){ve(t,"svelte-6skeby",".image-widget.svelte-6skeby.svelte-6skeby.svelte-6skeby{display:flex !important;align-items:center;gap:16px}.image-widget.svelte-6skeby .checkerboard{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)}.image-widget.svelte-6skeby>div.svelte-6skeby.svelte-6skeby{flex:auto;overflow:hidden}.image-widget.svelte-6skeby>div.svelte-6skeby>div.svelte-6skeby:not(:last-child){margin:0 0 8px}.image-widget.svelte-6skeby>div .filename.svelte-6skeby.svelte-6skeby{word-break:break-all}")}function K_(t){let e,i,n,s={ctx:t,current:null,token:null,hasCatch:!1,pending:sj,then:ij,catch:nj,value:27,blocks:[,,,]};return Ts(i=ss(t[0],t[13].originalEntry),s),{c(){e=K(),s.block.c()},m(r,l){y(r,e,l),s.block.m(r,s.anchor=l),s.mount=()=>e.parentNode,s.anchor=e,n=!0},p(r,l){t=r,s.ctx=t,l&8193&&i!==(i=ss(t[0],t[13].originalEntry))&&Ts(i,s)||cc(s,t,l)},i(r){n||(m(s.block),n=!0)},o(r){for(let l=0;l<3;l+=1){const o=s.blocks[l];g(o)}n=!1},d(r){r&&w(e),s.block.d(r),s.token=null,s=null}}}function nj(t){return{c:z,m:z,p:z,i:z,o:z,d:z}}function ij(t){let e,i;return e=new bi({props:{src:t[27],checkerboard:!0}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&8193&&(r.src=n[27]),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function sj(t){return{c:z,m:z,p:z,i:z,o:z,d:z}}function Z_(t){let e,i;function n(l,o){if(o&1&&(i=null),l[3])return lj;if(i==null&&(i=!l[0].startsWith("data:")),i)return rj}let s=n(t,-1),r=s&&s(t);return{c(){e=I("div"),r&&r.c(),C(e,"class","filename svelte-6skeby")},m(l,o){y(l,e,o),r&&r.m(e,null)},p(l,o){s===(s=n(l,o))&&r?r.p(l,o):(r&&r.d(1),r=s&&s(l),r&&(r.c(),r.m(e,null)))},d(l){l&&w(e),r&&r.d()}}}function rj(t){let e;return{c(){e=q(t[0])},m(i,n){y(i,e,n)},p(i,n){n&1&&W(e,i[0])},d(i){i&&w(e)}}}function lj(t){let e=t[3].name+"",i;return{c(){i=q(e)},m(n,s){y(n,i,s)},p(n,s){s&8&&e!==(e=n[3].name+"")&&W(i,e)},d(n){n&&w(i)}}}function X_(t){let e,i;return e=new De({props:{disabled:t[1],class:"tertiary small",label:t[14]("remove")}}),e.$on("click",t[21]),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&2&&(r.disabled=n[1]),s&16384&&(r.label=n[14]("remove")),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function oj(t){let e=t[14]("assets_dialog.large_file.description",{values:{size:il(t[10])}})+"",i;return{c(){i=q(e)},m(n,s){y(n,i,s)},p(n,s){s&17408&&e!==(e=n[14]("assets_dialog.large_file.description",{values:{size:il(n[10])}})+"")&&W(i,e)},d(n){n&&w(i)}}}function aj(t){let e,i=t[14]("assets_dialog.photo_credit.description")+"",n,s,r,l,o;return l=new _d({props:{readonly:"readonly",value:t[9]}}),l.$on("click",uj),{c(){e=I("div"),n=q(i),s=D(),r=I("div"),T(l.$$.fragment)},m(a,c){y(a,e,c),O(e,n),y(a,s,c),y(a,r,c),S(l,r,null),o=!0},p(a,c){(!o||c&16384)&&i!==(i=a[14]("assets_dialog.photo_credit.description")+"")&&W(n,i);const u={};c&512&&(u.value=a[9]),l.$set(u)},i(a){o||(m(l.$$.fragment,a),o=!0)},o(a){g(l.$$.fragment,a),o=!1},d(a){a&&(w(e),w(s),w(r)),E(l)}}}function cj(t){let e,i,n,s,r,l,o,a,c,u,f,d,p,h,_,b,k,v=t[11]&&t[0]&&K_(t),$=typeof t[0]=="string"&&Z_(t);l=new De({props:{disabled:t[1],class:"tertiary small",label:t[0]?t[14]("replace"):t[14]("add")}}),l.$on("click",t[20]);let L=t[0]&&X_(t);function A(R){t[22](R)}let P={kind:t[11]?"image":"any",canEnterURL:t[12]};t[6]!==void 0&&(P.open=t[6]),c=new ej({props:P}),ae.push(()=>ze(c,"open",A)),c.$on("select",t[23]);function F(R){t[24](R)}let j={title:t[14]("assets_dialog.large_file.title"),showCancel:!1,$$slots:{default:[oj]},$$scope:{ctx:t}};t[7]!==void 0&&(j.open=t[7]),d=new Kn({props:j}),ae.push(()=>ze(d,"open",F));function N(R){t[25](R)}let M={title:t[14]("assets_dialog.photo_credit.title"),okLabel:t[14]("copy"),$$slots:{default:[aj]},$$scope:{ctx:t}};return t[8]!==void 0&&(M.open=t[8]),_=new Kn({props:M}),ae.push(()=>ze(_,"open",N)),_.$on("ok",t[26]),{c(){e=I("div"),v&&v.c(),i=D(),n=I("div"),$&&$.c(),s=D(),r=I("div"),T(l.$$.fragment),o=D(),L&&L.c(),a=D(),T(c.$$.fragment),f=D(),T(d.$$.fragment),h=D(),T(_.$$.fragment),C(r,"class","svelte-6skeby"),C(n,"class","svelte-6skeby"),C(e,"class","image-widget svelte-6skeby")},m(R,G){y(R,e,G),v&&v.m(e,null),O(e,i),O(e,n),$&&$.m(n,null),O(n,s),O(n,r),S(l,r,null),O(r,o),L&&L.m(r,null),y(R,a,G),S(c,R,G),y(R,f,G),S(d,R,G),y(R,h,G),S(_,R,G),k=!0},p(R,[G]){R[11]&&R[0]?v?(v.p(R,G),G&2049&&m(v,1)):(v=K_(R),v.c(),m(v,1),v.m(e,i)):v&&(H(),g(v,1,1,()=>{v=null}),V()),typeof R[0]=="string"?$?$.p(R,G):($=Z_(R),$.c(),$.m(n,s)):$&&($.d(1),$=null);const Q={};G&2&&(Q.disabled=R[1]),G&16385&&(Q.label=R[0]?R[14]("replace"):R[14]("add")),l.$set(Q),R[0]?L?(L.p(R,G),G&1&&m(L,1)):(L=X_(R),L.c(),m(L,1),L.m(r,null)):L&&(H(),g(L,1,1,()=>{L=null}),V());const te={};G&2048&&(te.kind=R[11]?"image":"any"),G&4096&&(te.canEnterURL=R[12]),!u&&G&64&&(u=!0,te.open=R[6],He(()=>u=!1)),c.$set(te);const x={};G&16384&&(x.title=R[14]("assets_dialog.large_file.title")),G&268452864&&(x.$$scope={dirty:G,ctx:R}),!p&&G&128&&(p=!0,x.open=R[7],He(()=>p=!1)),d.$set(x);const Y={};G&16384&&(Y.title=R[14]("assets_dialog.photo_credit.title")),G&16384&&(Y.okLabel=R[14]("copy")),G&268452352&&(Y.$$scope={dirty:G,ctx:R}),!b&&G&256&&(b=!0,Y.open=R[8],He(()=>b=!1)),_.$set(Y)},i(R){k||(m(v),m(l.$$.fragment,R),m(L),m(c.$$.fragment,R),m(d.$$.fragment,R),m(_.$$.fragment,R),k=!0)},o(R){g(v),g(l.$$.fragment,R),g(L),g(c.$$.fragment,R),g(d.$$.fragment,R),g(_.$$.fragment,R),k=!1},d(R){R&&(w(e),w(a),w(f),w(h)),v&&v.d(),$&&$.d(),E(l),L&&L.d(),E(c,R),E(d,R),E(_,R)}}}const uj=t=>{t.target.focus(),t.target.select()};function fj(t,e,i){let n,s,r,l,o,a;U(t,Ke,te=>i(13,o=te)),U(t,pe,te=>i(14,a=te));let{locale:c}=e,{keyPath:u}=e,{fieldConfig:f}=e,{currentValue:d}=e,{disabled:p=!1}=e,h,_,b,k,v=!1,$=!1,L=!1,A="";const P=async te=>{i(2,{asset:h,file:_,url:b,credit:k}=te,h,i(3,_),i(4,b),i(5,k)),h&&i(0,d=await io(h,{pathOnly:!0})),_&&(l&&Number.isInteger(r)&&_.size>r?i(7,$=!0):(i(0,d=await Rv(_)),Me(Ke,o.files[c][u]=_,o))),b&&i(0,d=b),k&&(i(9,A=bn.sanitize(k,{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href"]})),i(8,L=!0))},F=()=>{i(6,v=!0)},j=()=>{i(0,d=""),i(2,h=void 0),i(3,_=void 0),i(4,b=void 0),i(5,k=void 0)};function N(te){v=te,i(6,v)}const M=({detail:te})=>{P(te)};function R(te){$=te,i(7,$)}function G(te){L=te,i(8,L)}const Q=()=>{navigator.clipboard.writeText(A)};return t.$$set=te=>{"locale"in te&&i(16,c=te.locale),"keyPath"in te&&i(17,u=te.keyPath),"fieldConfig"in te&&i(18,f=te.fieldConfig),"currentValue"in te&&i(0,d=te.currentValue),"disabled"in te&&i(1,p=te.disabled)},t.$$.update=()=>{t.$$.dirty&262144&&i(19,{widget:n,choose_url:s=!0,media_library:{config:{max_file_size:r=void 0}={}}={}}=f,n,(i(12,s),i(18,f)),(i(10,r),i(18,f))),t.$$.dirty&524288&&i(11,l=n==="image")},[d,p,h,_,b,k,v,$,L,A,r,l,s,o,a,P,c,u,f,n,F,j,N,M,R,G,Q]}class J_ extends J{constructor(e){super(),X(this,e,fj,cj,Z,{locale:16,keyPath:17,fieldConfig:18,currentValue:0,disabled:1},tj)}}function dj(t){let e,i;return{c(){e=I("p"),i=q(t[0])},m(n,s){y(n,e,s),O(e,i)},p(n,s){s&1&&W(i,n[0])},i:z,o:z,d(n){n&&w(e)}}}function pj(t){let e,i,n,s={ctx:t,current:null,token:null,hasCatch:!1,pending:gj,then:hj,catch:mj,value:6,blocks:[,,,]};return Ts(i=ss(t[0],t[2].originalEntry),s),{c(){e=K(),s.block.c()},m(r,l){y(r,e,l),s.block.m(r,s.anchor=l),s.mount=()=>e.parentNode,s.anchor=e,n=!0},p(r,l){t=r,s.ctx=t,l&5&&i!==(i=ss(t[0],t[2].originalEntry))&&Ts(i,s)||cc(s,t,l)},i(r){n||(m(s.block),n=!0)},o(r){for(let l=0;l<3;l+=1){const o=s.blocks[l];g(o)}n=!1},d(r){r&&w(e),s.block.d(r),s.token=null,s=null}}}function mj(t){return{c:z,m:z,p:z,i:z,o:z,d:z}}function hj(t){let e,i,n;return i=new bi({props:{src:t[6]}}),{c(){e=I("p"),T(i.$$.fragment)},m(s,r){y(s,e,r),S(i,e,null),n=!0},p(s,r){const l={};r&5&&(l.src=s[6]),i.$set(l)},i(s){n||(m(i.$$.fragment,s),n=!0)},o(s){g(i.$$.fragment,s),n=!1},d(s){s&&w(e),E(i)}}}function gj(t){return{c:z,m:z,p:z,i:z,o:z,d:z}}function _j(t){let e,i,n,s,r;const l=[pj,dj],o=[];function a(c,u){return u&1&&(e=null),c[1]==="image"&&c[0]?0:(e==null&&(e=!!(typeof c[0]=="string"&&c[0].trim())),e?1:-1)}return~(i=a(t,-1))&&(n=o[i]=l[i](t)),{c(){n&&n.c(),s=K()},m(c,u){~i&&o[i].m(c,u),y(c,s,u),r=!0},p(c,[u]){let f=i;i=a(c,u),i===f?~i&&o[i].p(c,u):(n&&(H(),g(o[f],1,1,()=>{o[f]=null}),V()),~i?(n=o[i],n?n.p(c,u):(n=o[i]=l[i](c),n.c()),m(n,1),n.m(s.parentNode,s)):n=null)},i(c){r||(m(n),r=!0)},o(c){g(n),r=!1},d(c){c&&w(s),~i&&o[i].d(c)}}}function bj(t,e,i){let n,s;U(t,Ke,c=>i(2,s=c));let{locale:r}=e,{keyPath:l}=e,{fieldConfig:o}=e,{currentValue:a}=e;return t.$$set=c=>{"locale"in c&&i(3,r=c.locale),"keyPath"in c&&i(4,l=c.keyPath),"fieldConfig"in c&&i(5,o=c.fieldConfig),"currentValue"in c&&i(0,a=c.currentValue)},t.$$.update=()=>{t.$$.dirty&32&&i(1,{widget:n}=o,n)},[a,n,s,r,l,o]}class Q_ extends J{constructor(e){super(),X(this,e,bj,_j,Z,{locale:3,keyPath:4,fieldConfig:5,currentValue:0})}}function e1(t,e,i){const n=t.slice();return n[12]=e[i].name,n[13]=e[i].label,n}function vj(t){let e,i;return e=new De({props:{class:"tertiary",label:t[2],disabled:t[1],$$slots:{"start-icon":[wj]},$$scope:{ctx:t}}}),e.$on("click",t[11]),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&4&&(r.label=n[2]),s&2&&(r.disabled=n[1]),s&65536&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function kj(t){let e,i;return e=new as({props:{class:"tertiary",label:t[2],disabled:t[1],$$slots:{popup:[Sj],"start-icon":[yj]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&4&&(r.label=n[2]),s&2&&(r.disabled=n[1]),s&65545&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function wj(t){let e,i;return e=new we({props:{slot:"start-icon",name:"add"}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p:z,i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function yj(t){let e,i;return e=new we({props:{slot:"start-icon",name:"add"}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p:z,i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function t1(t,e){let i,n,s;function r(){return e[10](e[12])}return n=new Ct({props:{label:e[13]}}),n.$on("click",r),{key:t,first:null,c(){i=K(),T(n.$$.fragment),this.first=i},m(l,o){y(l,i,o),S(n,l,o),s=!0},p(l,o){e=l;const a={};o&8&&(a.label=e[13]),n.$set(a)},i(l){s||(m(n.$$.fragment,l),s=!0)},o(l){g(n.$$.fragment,l),s=!1},d(l){l&&w(i),E(n,l)}}}function $j(t){let e=[],i=new Map,n,s,r=ce(t[3]);const l=o=>o[12];for(let o=0;o<r.length;o+=1){let a=e1(t,r,o),c=l(a);i.set(c,e[o]=t1(c,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();n=K()},m(o,a){for(let c=0;c<e.length;c+=1)e[c]&&e[c].m(o,a);y(o,n,a),s=!0},p(o,a){a&9&&(r=ce(o[3]),H(),e=ct(e,a,l,1,o,r,i,n.parentNode,at,t1,n,e1),V())},i(o){if(!s){for(let a=0;a<r.length;a+=1)m(e[a]);s=!0}},o(o){for(let a=0;a<e.length;a+=1)g(e[a]);s=!1},d(o){o&&w(n);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function Sj(t){let e,i;return e=new Ci({props:{slot:"popup",$$slots:{default:[$j]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&65545&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function Ej(t){let e,i,n,s,r;const l=[kj,vj],o=[];function a(c,u){return u&8&&(e=null),e==null&&(e=!!Array.isArray(c[3])),e?0:1}return i=a(t,-1),n=o[i]=l[i](t),{c(){n.c(),s=K()},m(c,u){o[i].m(c,u),y(c,s,u),r=!0},p(c,[u]){let f=i;i=a(c,u),i===f?o[i].p(c,u):(H(),g(o[f],1,1,()=>{o[f]=null}),V(),n=o[i],n?n.p(c,u):(n=o[i]=l[i](c),n.c()),m(n,1),n.m(s.parentNode,s))},i(c){r||(m(n),r=!0)},o(c){g(n),r=!1},d(c){c&&w(s),o[i].d(c)}}}function Tj(t,e,i){let n,s,r,l,o,a,c;U(t,pe,_=>i(9,c=_));let{fieldConfig:u}=e,{items:f=[]}=e,{addItem:d=_=>{}}=e;const p=_=>d(_),h=()=>d();return t.$$set=_=>{"fieldConfig"in _&&i(4,u=_.fieldConfig),"items"in _&&i(5,f=_.items),"addItem"in _&&i(0,d=_.addItem)},t.$$.update=()=>{t.$$.dirty&16&&i(7,{label:n,label_singular:s,max:r,types:l}=u,n,(i(8,s),i(4,u)),(i(6,r),i(4,u)),(i(3,l),i(4,u))),t.$$.dirty&896&&i(2,o=c("add_x",{values:{name:s||n}})),t.$$.dirty&96&&i(1,a=typeof r=="number"&&f.length===r)},[d,a,o,l,u,f,r,n,s,c,p,h]}class uy extends J{constructor(e){super(),X(this,e,Tj,Ej,Z,{fieldConfig:4,items:5,addItem:0})}}function Oj(t){ve(t,"svelte-1aafx67",".toolbar.svelte-1aafx67.svelte-1aafx67.svelte-1aafx67{display:flex;align-items:center;gap:8px}.item-list.collapsed.svelte-1aafx67.svelte-1aafx67.svelte-1aafx67{display:none}.item.svelte-1aafx67.svelte-1aafx67.svelte-1aafx67{margin:4px 0;border-width:2px;border-color:var(--sui-secondary-border-color);border-radius:var(--sui-control-medium-border-radius)}.item.svelte-1aafx67 .header.svelte-1aafx67.svelte-1aafx67{display:flex;align-items:center;padding:4px;background-color:var(--sui-primary-border-color)}.item.svelte-1aafx67 .header.svelte-1aafx67>div.svelte-1aafx67{display:flex;align-items:center}.item.svelte-1aafx67 .header.svelte-1aafx67>div.svelte-1aafx67:first-child{justify-content:flex-start;width:40%}.item.svelte-1aafx67 .header.svelte-1aafx67>div.svelte-1aafx67:nth-child(2){width:20%;justify-content:center}.item.svelte-1aafx67 .header.svelte-1aafx67>div.svelte-1aafx67:last-child{width:40%;justify-content:flex-end}.item.svelte-1aafx67 .header.svelte-1aafx67 .icon{font-size:var(--sui-font-size-large)}.item.svelte-1aafx67 .header .type.svelte-1aafx67.svelte-1aafx67{font-size:var(--sui-font-size-small);font-weight:600;color:var(--sui-secondary-foreground-color)}.item.svelte-1aafx67 .summary.svelte-1aafx67.svelte-1aafx67{overflow:hidden;padding:8px;white-space:nowrap;text-overflow:ellipsis}")}function n1(t,e,i){const n=t.slice();n[50]=e[i],n[56]=i;const s=!!n[11].viewStates[n[0]][`${n[1]}.${n[56]}.expanded`];n[51]=s;const r=n[10]?n[8].find(function(...c){return t[40](n[50],...c)}):void 0;n[52]=r;const l=n[10]?n[52]?.fields??[]:n[7]??[n[6]];n[53]=l;const o=n[10]&&n[52]?.summary||n[19];return n[54]=o,n}function i1(t,e,i){const n=t.slice();return n[57]=e[i],n}function Aj(t){let e,i,n;function s(l){t[41](l)}let r={disabled:t[3]};return t[13]!==void 0&&(r.value=t[13]),e=new Hn({props:r}),ae.push(()=>ze(e,"value",s)),e.$on("input",t[42]),{c(){T(e.$$.fragment)},m(l,o){S(e,l,o),n=!0},p(l,o){const a={};o[0]&8&&(a.disabled=l[3]),!i&&o[0]&8192&&(i=!0,a.value=l[13],He(()=>i=!1)),e.$set(a)},i(l){n||(m(e.$$.fragment,l),n=!0)},o(l){g(e.$$.fragment,l),n=!1},d(l){E(e,l)}}}function Lj(t){let e,i,n,s,r=t[16].length+"",l,o,a=((t[16].length===1?t[18]:void 0)||t[21]||t[9])+"",c,u,f,d,p,h,_,b,k,v,$;i=new De({props:{disabled:!t[16].length,"aria-expanded":t[17],"aria-controls":"list-"+t[12]+"-item-list",$$slots:{"start-icon":[Nj]},$$scope:{ctx:t}}}),i.$on("click",t[35]),d=new gn({props:{flex:!0}});let L=t[20]&&(t[15]||!t[16].length)&&s1(t),A=ce(t[16]),P=[];for(let N=0;N<A.length;N+=1)P[N]=o1(n1(t,A,N));const F=N=>g(P[N],1,1,()=>{P[N]=null});let j=t[20]&&!t[15]&&t[16].length&&a1(t);return{c(){e=I("div"),T(i.$$.fragment),n=D(),s=I("div"),l=q(r),o=D(),c=q(a),f=D(),T(d.$$.fragment),p=D(),L&&L.c(),h=D(),_=I("div");for(let N=0;N<P.length;N+=1)P[N].c();k=D(),j&&j.c(),v=K(),C(s,"class","summary"),C(s,"id",u="object-"+t[12]+"-summary"),C(e,"class","toolbar top svelte-1aafx67"),C(_,"class","item-list svelte-1aafx67"),C(_,"id",b="list-"+t[12]+"-item-list"),de(_,"collapsed",!t[17])},m(N,M){y(N,e,M),S(i,e,null),O(e,n),O(e,s),O(s,l),O(s,o),O(s,c),O(e,f),S(d,e,null),O(e,p),L&&L.m(e,null),y(N,h,M),y(N,_,M);for(let R=0;R<P.length;R+=1)P[R]&&P[R].m(_,null);y(N,k,M),j&&j.m(N,M),y(N,v,M),$=!0},p(N,M){const R={};if(M[0]&65536&&(R.disabled=!N[16].length),M[0]&131072&&(R["aria-expanded"]=N[17]),M[0]&4096&&(R["aria-controls"]="list-"+N[12]+"-item-list"),M[0]&4325376|M[1]&536870912&&(R.$$scope={dirty:M,ctx:N}),i.$set(R),(!$||M[0]&65536)&&r!==(r=N[16].length+"")&&W(l,r),(!$||M[0]&2425344)&&a!==(a=((N[16].length===1?N[18]:void 0)||N[21]||N[9])+"")&&W(c,a),(!$||M[0]&4096&&u!==(u="object-"+N[12]+"-summary"))&&C(s,"id",u),N[20]&&(N[15]||!N[16].length)?L?(L.p(N,M),M[0]&1146880&&m(L,1)):(L=s1(N),L.c(),m(L,1),L.m(e,null)):L&&(H(),g(L,1,1,()=>{L=null}),V()),M[0]&508124627){A=ce(N[16]);let G;for(G=0;G<A.length;G+=1){const Q=n1(N,A,G);P[G]?(P[G].p(Q,M),m(P[G],1)):(P[G]=o1(Q),P[G].c(),m(P[G],1),P[G].m(_,null))}for(H(),G=A.length;G<P.length;G+=1)F(G);V()}(!$||M[0]&4096&&b!==(b="list-"+N[12]+"-item-list"))&&C(_,"id",b),(!$||M[0]&131072)&&de(_,"collapsed",!N[17]),N[20]&&!N[15]&&N[16].length?j?(j.p(N,M),M[0]&1146880&&m(j,1)):(j=a1(N),j.c(),m(j,1),j.m(v.parentNode,v)):j&&(H(),g(j,1,1,()=>{j=null}),V())},i(N){if(!$){m(i.$$.fragment,N),m(d.$$.fragment,N),m(L);for(let M=0;M<A.length;M+=1)m(P[M]);m(j),$=!0}},o(N){g(i.$$.fragment,N),g(d.$$.fragment,N),g(L),P=P.filter(Boolean);for(let M=0;M<P.length;M+=1)g(P[M]);g(j),$=!1},d(N){N&&(w(e),w(h),w(_),w(k),w(v)),E(i),E(d),L&&L.d(),mi(P,N),j&&j.d(N)}}}function Nj(t){let e,i;return e=new we({props:{slot:"start-icon",name:t[17]?"expand_more":"chevron_right",label:t[17]?t[22]("collapse"):t[22]("expand")}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s[0]&131072&&(r.name=n[17]?"expand_more":"chevron_right"),s[0]&4325376&&(r.label=n[17]?n[22]("collapse"):n[22]("expand")),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function s1(t){let e,i;return e=new uy({props:{fieldConfig:t[2],items:t[16],addItem:t[24]}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s[0]&4&&(r.fieldConfig=n[2]),s[0]&65536&&(r.items=n[16]),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function r1(t){let e,i=(t[52]?.label||t[52]?.name||"")+"",n;return{c(){e=I("span"),n=q(i),C(e,"class","type svelte-1aafx67")},m(s,r){y(s,e,r),O(e,n)},p(s,r){r[0]&83200&&i!==(i=(s[52]?.label||s[52]?.name||"")+"")&&W(n,i)},d(s){s&&w(e)}}}function Pj(t){let e,i=t[10]&&r1(t);return{c(){i&&i.c(),e=K()},m(n,s){i&&i.m(n,s),y(n,e,s)},p(n,s){n[10]?i?i.p(n,s):(i=r1(n),i.c(),i.m(e.parentNode,e)):i&&(i.d(1),i=null)},d(n){n&&w(e),i&&i.d(n)}}}function Ij(t){let e,i;return e=new we({props:{slot:"start-icon",name:t[51]?"expand_more":"chevron_right",label:t[51]?t[22]("collapse"):t[22]("expand")}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s[0]&2051&&(r.name=n[51]?"expand_more":"chevron_right"),s[0]&4196355&&(r.label=n[51]?n[22]("collapse"):n[22]("expand")),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function Cj(t){let e,i;return e=new we({props:{slot:"start-icon",name:"arrow_upward",label:t[22]("move_up")}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s[0]&4194304&&(r.label=n[22]("move_up")),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function Dj(t){let e,i;return e=new we({props:{slot:"start-icon",name:"arrow_downward",label:t[22]("move_down")}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s[0]&4194304&&(r.label=n[22]("move_down")),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function Mj(t){let e,i;return e=new we({props:{slot:"start-icon",name:"close",label:t[22]("delete")}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s[0]&4194304&&(r.label=n[22]("delete")),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function jj(t){let e,i=t[28](t[50],t[56],t[54])+"",n;return{c(){e=I("div"),n=q(i),C(e,"class","summary svelte-1aafx67")},m(s,r){y(s,e,r),O(e,n)},p(s,r){r[0]&607488&&i!==(i=s[28](s[50],s[56],s[54])+"")&&W(n,i)},i:z,o:z,d(s){s&&w(e)}}}function Rj(t){let e=[],i=new Map,n,s,r=ce(t[53]);const l=o=>o[57].name;for(let o=0;o<r.length;o+=1){let a=i1(t,r,o),c=l(a);i.set(c,e[o]=l1(c,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();n=K()},m(o,a){for(let c=0;c<e.length;c+=1)e[c]&&e[c].m(o,a);y(o,n,a),s=!0},p(o,a){a[0]&83411&&(r=ce(o[53]),H(),e=ct(e,a,l,1,o,r,i,n.parentNode,at,l1,n,i1),V())},i(o){if(!s){for(let a=0;a<r.length;a+=1)m(e[a]);s=!0}},o(o){for(let a=0;a<e.length;a+=1)g(e[a]);s=!1},d(o){o&&w(n);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function l1(t,e){let i,n,s;return n=new Fp({props:{keyPath:e[4]?`${e[1]}.${e[56]}`:`${e[1]}.${e[56]}.${e[57].name}`,locale:e[0],fieldConfig:e[57]}}),{key:t,first:null,c(){i=K(),T(n.$$.fragment),this.first=i},m(r,l){y(r,i,l),S(n,r,l),s=!0},p(r,l){e=r;const o={};l[0]&83410&&(o.keyPath=e[4]?`${e[1]}.${e[56]}`:`${e[1]}.${e[56]}.${e[57].name}`),l[0]&1&&(o.locale=e[0]),l[0]&83392&&(o.fieldConfig=e[57]),n.$set(o)},i(r){s||(m(n.$$.fragment,r),s=!0)},o(r){g(n.$$.fragment,r),s=!1},d(r){r&&w(i),E(n,r)}}}function o1(t){let e,i,n,s,r,l,o,a,c,u,f,d,p,h,_,b,k,v,$,L,A;function P(){return t[36](t[56],t[51])}s=new De({props:{"aria-expanded":t[51],"aria-controls":"list-"+t[12]+"-item-"+t[56]+"-body",$$slots:{"start-icon":[Ij],default:[Pj]},$$scope:{ctx:t}}}),s.$on("click",P);function F(){return t[37](t[56])}o=new De({props:{disabled:t[56]===0,$$slots:{"start-icon":[Cj]},$$scope:{ctx:t}}}),o.$on("click",F),c=new gn({});function j(){return t[38](t[56])}f=new De({props:{disabled:t[56]===t[16].length-1,$$slots:{"start-icon":[Dj]},$$scope:{ctx:t}}}),f.$on("click",j);function N(){return t[39](t[56])}h=new De({props:{$$slots:{"start-icon":[Mj]},$$scope:{ctx:t}}}),h.$on("click",N);const M=[Rj,jj],R=[];function G(Q,te){return Q[51]?0:1}return k=G(t),v=R[k]=M[k](t),{c(){e=I("div"),i=I("div"),n=I("div"),T(s.$$.fragment),r=D(),l=I("div"),T(o.$$.fragment),a=D(),T(c.$$.fragment),u=D(),T(f.$$.fragment),d=D(),p=I("div"),T(h.$$.fragment),_=D(),b=I("div"),v.c(),L=D(),C(n,"class","svelte-1aafx67"),C(l,"class","svelte-1aafx67"),C(p,"class","svelte-1aafx67"),C(i,"class","header svelte-1aafx67"),C(b,"class","item-body"),C(b,"id",$="list-"+t[12]+"-item-"+t[56]+"-body"),C(e,"class","item svelte-1aafx67")},m(Q,te){y(Q,e,te),O(e,i),O(i,n),S(s,n,null),O(i,r),O(i,l),S(o,l,null),O(l,a),S(c,l,null),O(l,u),S(f,l,null),O(i,d),O(i,p),S(h,p,null),O(e,_),O(e,b),R[k].m(b,null),O(e,L),A=!0},p(Q,te){t=Q;const x={};te[0]&2051&&(x["aria-expanded"]=t[51]),te[0]&4096&&(x["aria-controls"]="list-"+t[12]+"-item-"+t[56]+"-body"),te[0]&4279555|te[1]&536870912&&(x.$$scope={dirty:te,ctx:t}),s.$set(x);const Y={};te[0]&4194304|te[1]&536870912&&(Y.$$scope={dirty:te,ctx:t}),o.$set(Y);const ue={};te[0]&65536&&(ue.disabled=t[56]===t[16].length-1),te[0]&4194304|te[1]&536870912&&(ue.$$scope={dirty:te,ctx:t}),f.$set(ue);const Fe={};te[0]&4194304|te[1]&536870912&&(Fe.$$scope={dirty:te,ctx:t}),h.$set(Fe);let lt=k;k=G(t),k===lt?R[k].p(t,te):(H(),g(R[lt],1,1,()=>{R[lt]=null}),V(),v=R[k],v?v.p(t,te):(v=R[k]=M[k](t),v.c()),m(v,1),v.m(b,null)),(!A||te[0]&4096&&$!==($="list-"+t[12]+"-item-"+t[56]+"-body"))&&C(b,"id",$)},i(Q){A||(m(s.$$.fragment,Q),m(o.$$.fragment,Q),m(c.$$.fragment,Q),m(f.$$.fragment,Q),m(h.$$.fragment,Q),m(v),A=!0)},o(Q){g(s.$$.fragment,Q),g(o.$$.fragment,Q),g(c.$$.fragment,Q),g(f.$$.fragment,Q),g(h.$$.fragment,Q),g(v),A=!1},d(Q){Q&&w(e),E(s),E(o),E(c),E(f),E(h),R[k].d()}}}function a1(t){let e,i,n,s,r;return i=new gn({props:{flex:!0}}),s=new uy({props:{fieldConfig:t[2],items:t[16],addItem:t[24]}}),{c(){e=I("div"),T(i.$$.fragment),n=D(),T(s.$$.fragment),C(e,"class","toolbar bottom svelte-1aafx67")},m(l,o){y(l,e,o),S(i,e,null),O(e,n),S(s,e,null),r=!0},p(l,o){const a={};o[0]&4&&(a.fieldConfig=l[2]),o[0]&65536&&(a.items=l[16]),s.$set(a)},i(l){r||(m(i.$$.fragment,l),m(s.$$.fragment,l),r=!0)},o(l){g(i.$$.fragment,l),g(s.$$.fragment,l),r=!1},d(l){l&&w(e),E(i),E(s)}}}function Fj(t){let e,i,n,s;const r=[Lj,Aj],l=[];function o(a,c){return a[5]?0:1}return e=o(t),i=l[e]=r[e](t),{c(){i.c(),n=K()},m(a,c){l[e].m(a,c),y(a,n,c),s=!0},p(a,c){let u=e;e=o(a),e===u?l[e].p(a,c):(H(),g(l[u],1,1,()=>{l[u]=null}),V(),i=l[e],i?i.p(a,c):(i=l[e]=r[e](a),i.c()),m(i,1),i.m(n.parentNode,n))},i(a){s||(m(i),s=!0)},o(a){g(i),s=!1},d(a){a&&w(n),l[e].d(a)}}}function Uj(t){let e,i;return e=new _n({props:{"aria-labelledby":"list-"+t[12]+"-summary",$$slots:{default:[Fj]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s[0]&4096&&(r["aria-labelledby"]="list-"+n[12]+"-summary"),s[0]&8388607|s[1]&536870912&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function xj(t,e,i){let n,s,r,l,o,a,c,u,f,d,p,h,_,b,k,v,$,L,A,P,F,j,N,M,R,G;U(t,Ke,ie=>i(11,R=ie)),U(t,pe,ie=>i(22,G=ie));let{locale:Q}=e,{keyPath:te}=e,{fieldConfig:x}=e,{currentValue:Y}=e,{disabled:ue=!1}=e,Fe=!1,lt="",mt="";on(()=>{i(30,Fe=!0),i(12,lt=Hs().split("-").pop()),N.forEach((ie,se)=>{Me(Ke,R.viewStates[Q][`${te}.${se}.expanded`]=!o,R)})});const bt=()=>{const ie=Y.join(", ");!mt.match(/,\s*$/)&&mt!==ie&&i(13,mt=ie)},re=()=>{const ie=mt.split(/,/g).map(se=>se.trim()).filter(se=>se!=="");Object.keys(R.currentValues).forEach(se=>{r!=="duplicate"&&se!==Q||(Object.keys(R.currentValues[se]).forEach(Ee=>{Ee.match(`^${jt(te)}\\.\\d+$`)&&delete R.currentValues[se][Ee]}),ie.forEach((Ee,Ye)=>{Me(Ke,R.currentValues[se][`${te}.${Ye}`]=Ee,R)}))})},_e=ie=>{Object.keys(R.currentValues).forEach(se=>{r!=="duplicate"&&se!==Q||hw(se,te,ie)})},kn=ie=>{_e(({valueList:se,viewList:Ee})=>{const Ye=ie?h.find(({name:Ot})=>Ot===ie)?.fields??[]:d??[f],ot=p?0:se.length,nt=mw(Ye);ie&&(nt[_]=ie),se.splice(ot,0,b?nt[f.name]:nt),Ee.splice(ot,0,{expanded:!0})})},ht=ie=>{_e(({valueList:se,viewList:Ee})=>{se.splice(ie,1),Ee.splice(ie,1)})},qt=ie=>{_e(({valueList:se,viewList:Ee})=>{[se[ie],se[ie-1]]=[se[ie-1],se[ie]],[Ee[ie],Ee[ie-1]]=[Ee[ie-1],Ee[ie]]})},un=ie=>{_e(({valueList:se,viewList:Ee})=>{[se[ie],se[ie+1]]=[se[ie+1],se[ie]],[Ee[ie],Ee[ie+1]]=[Ee[ie+1],Ee[ie]]})},wn=(ie,se,Ee)=>Ee?Ee.replaceAll(/{{fields\.(.+?)}}/g,(Ye,ot)=>{const nt=Fd({collectionName:A,fileName:P,valueMap:F,keyPath:b?`${te}.${se}`:`${te}.${se}.${ot}`,locale:Q});return Array.isArray(nt)?j.format(nt):String(nt)}):ie.title||ie.name||"",ji=()=>{i(17,M=!M)},Nt=(ie,se)=>{Object.keys(R.viewStates).forEach(Ee=>{Me(Ke,R.viewStates[Ee][`${te}.${ie}.expanded`]=!se,R)})},Ri=ie=>{qt(ie)},Yt=ie=>{un(ie)},yt=ie=>{ht(ie)},Mt=(ie,{name:se})=>se===ie[_];function Rt(ie){mt=ie,i(13,mt)}const pr=()=>{re()};return t.$$set=ie=>{"locale"in ie&&i(0,Q=ie.locale),"keyPath"in ie&&i(1,te=ie.keyPath),"fieldConfig"in ie&&i(2,x=ie.fieldConfig),"currentValue"in ie&&i(29,Y=ie.currentValue),"disabled"in ie&&i(3,ue=ie.disabled)},t.$$.update=()=>{t.$$.dirty[0]&4&&i(9,{name:n,label:s,i18n:r,allow_add:l=!0,collapsed:o=!1,summary:a,minimize_collapsed:c=!1,label_singular:u,field:f,fields:d,add_to_top:p=!1,types:h,typeKey:_="type"}=x,n,(i(21,s),i(2,x)),(i(20,l),i(2,x)),(i(19,a),i(2,x)),(i(32,c),i(2,x)),(i(18,u),i(2,x)),(i(6,f),i(2,x)),(i(7,d),i(2,x)),(i(15,p),i(2,x)),(i(8,h),i(2,x)),(i(14,_),i(2,x))),t.$$.dirty[0]&64&&i(4,b=!!f),t.$$.dirty[0]&128&&i(34,k=Array.isArray(d)),t.$$.dirty[0]&256&&i(10,v=Array.isArray(h)),t.$$.dirty[0]&1040|t.$$.dirty[1]&8&&i(5,$=b||k||v),t.$$.dirty[0]&2&&i(33,L=new RegExp(`^${jt(te)}\\.(\\d+)(.*)?`)),t.$$.dirty[0]&2048&&({collectionName:A,fileName:P}=R??{}),t.$$.dirty[0]&2049&&i(31,F=R.currentValues[Q]),t.$$.dirty[0]&1&&(j=new Intl.ListFormat(Q,{style:"narrow",type:"conjunction"})),t.$$.dirty[0]&514|t.$$.dirty[1]&5&&i(16,N=ar(Object.fromEntries(Object.entries(F).filter(([ie])=>ie.match(L)).map(([ie,se])=>[ie.replace(new RegExp(`^${jt(te)}`),n),se])))[n]??[]),t.$$.dirty[1]&2&&i(17,M=!c),t.$$.dirty[0]&1610612768&&Fe&&!$&&bt()},[Q,te,x,ue,b,$,f,d,h,n,v,R,lt,mt,_,p,N,M,u,a,l,s,G,re,kn,ht,qt,un,wn,Y,Fe,F,c,L,k,ji,Nt,Ri,Yt,yt,Mt,Rt,pr]}class zj extends J{constructor(e){super(),X(this,e,xj,Uj,Z,{locale:0,keyPath:1,fieldConfig:2,currentValue:29,disabled:3},Oj,[-1,-1])}}function Bj(t){ve(t,"svelte-15wwj34","section.svelte-15wwj34.svelte-15wwj34{overflow:hidden;margin:8px 0;padding:8px 0}section.svelte-15wwj34>*{margin-right:auto;margin-left:auto;max-width:768px}section.svelte-15wwj34 h4.svelte-15wwj34{color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-small)}section.svelte-15wwj34 h4.svelte-15wwj34:not(:last-child){margin-bottom:8px}section.svelte-15wwj34 p{margin:8px auto 0;-webkit-user-select:text;user-select:text}section.svelte-15wwj34 img{max-width:100%}section.svelte-15wwj34 .subsection{border-width:2px 2px 0;border-style:solid;border-color:var(--sui-secondary-border-color);padding:8px 16px}section.svelte-15wwj34 .subsection .title{font-size:inherit;font-weight:normal}section.svelte-15wwj34 .subsection:first-of-type{border-top-right-radius:var(--sui-control-medium-border-radius);border-top-left-radius:var(--sui-control-medium-border-radius)}section.svelte-15wwj34 .subsection:last-of-type{border-bottom:2px solid var(--sui-secondary-border-color);border-bottom-right-radius:var(--sui-control-medium-border-radius);border-bottom-left-radius:var(--sui-control-medium-border-radius)}")}function c1(t){let e,i,n=(t[8]||t[9])+"",s,r,l,o=t[3]in rc&&u1(t);return{c(){e=I("section"),i=I("h4"),s=q(n),r=D(),o&&o.c(),C(i,"class","svelte-15wwj34"),C(e,"data-widget",t[3]),C(e,"data-key-path",t[1]),C(e,"class","svelte-15wwj34")},m(a,c){y(a,e,c),O(e,i),O(i,s),O(e,r),o&&o.m(e,null),l=!0},p(a,c){(!l||c&768)&&n!==(n=(a[8]||a[9])+"")&&W(s,n),a[3]in rc?o?(o.p(a,c),c&8&&m(o,1)):(o=u1(a),o.c(),m(o,1),o.m(e,null)):o&&(H(),g(o,1,1,()=>{o=null}),V()),(!l||c&8)&&C(e,"data-widget",a[3]),(!l||c&2)&&C(e,"data-key-path",a[1])},i(a){l||(m(o),l=!0)},o(a){g(o),l=!1},d(a){a&&w(e),o&&o.d()}}}function u1(t){let e,i,n;var s=rc[t[3]];function r(l,o){return{props:{keyPath:l[1],locale:l[0],fieldConfig:l[2],currentValue:l[4]}}}return s&&(e=Zt(s,r(t))),{c(){e&&T(e.$$.fragment),i=K()},m(l,o){e&&S(e,l,o),y(l,i,o),n=!0},p(l,o){if(o&8&&s!==(s=rc[l[3]])){if(e){H();const a=e;g(a.$$.fragment,1,0,()=>{E(a,1)}),V()}s?(e=Zt(s,r(l)),T(e.$$.fragment),m(e.$$.fragment,1),S(e,i.parentNode,i)):e=null}else if(s){const a={};o&2&&(a.keyPath=l[1]),o&1&&(a.locale=l[0]),o&4&&(a.fieldConfig=l[2]),o&16&&(a.currentValue=l[4]),e.$set(a)}},i(l){n||(e&&m(e.$$.fragment,l),n=!0)},o(l){e&&g(e.$$.fragment,l),n=!1},d(l){l&&w(i),e&&E(e,l)}}}function Hj(t){let e,i,n=t[3]!=="hidden"&&(t[0]===t[7]||t[6]||t[5])&&c1(t);return{c(){n&&n.c(),e=K()},m(s,r){n&&n.m(s,r),y(s,e,r),i=!0},p(s,[r]){s[3]!=="hidden"&&(s[0]===s[7]||s[6]||s[5])?n?(n.p(s,r),r&233&&m(n,1)):(n=c1(s),n.c(),m(n,1),n.m(e.parentNode,e)):n&&(H(),g(n,1,1,()=>{n=null}),V())},i(s){i||(m(n),i=!0)},o(s){g(n),i=!1},d(s){s&&w(e),n&&n.d(s)}}}function Vj(t,e,i){let n,s,r,l,o,a,c,u,f,d,p,h,_,b;U(t,Ke,L=>i(16,b=L));let{locale:k}=e,{keyPath:v}=e,{fieldConfig:$}=e;return t.$$set=L=>{"locale"in L&&i(0,k=L.locale),"keyPath"in L&&i(1,v=L.keyPath),"fieldConfig"in L&&i(2,$=L.fieldConfig)},t.$$.update=()=>{t.$$.dirty&4&&i(9,{name:n,label:s="",widget:r="string",i18n:l=!1}=$,n,(i(8,s),i(2,$)),(i(3,r),i(2,$)),(i(12,l),i(2,$))),t.$$.dirty&8&&i(15,o=["relation","select"].includes(r)),t.$$.dirty&32772&&i(14,a=o?$.multiple:void 0),t.$$.dirty&49160&&i(11,c=r==="list"||o&&a),t.$$.dirty&65536&&i(13,{hasLocales:u=!1,defaultLocale:f="default"}=b.collection._i18n??{},u,(i(7,f),i(16,b))),t.$$.dirty&12288&&i(6,d=u&&(l===!0||l==="translate")),t.$$.dirty&12288&&i(5,p=u&&l==="duplicate"),t.$$.dirty&2&&i(10,h=new RegExp(`^${jt(v)}\\.\\d+$`)),t.$$.dirty&68611&&i(4,_=c?Object.entries(b.currentValues[k]).filter(([L])=>L.match(h)).map(([,L])=>L).filter(L=>L!==void 0):b.currentValues[k][v])},[k,v,$,r,_,p,d,f,s,n,h,c,l,u,a,o,b]}class Rp extends J{constructor(e){super(),X(this,e,Vj,Hj,Z,{locale:0,keyPath:1,fieldConfig:2},Bj)}}function f1(t,e,i){const n=t.slice();n[15]=e[i],n[19]=i;const s=Array.isArray(n[3])?n[6].currentValues[n[0]][`${n[1]}.${n[19]}.${n[10]}`]:void 0;n[16]=s;const r=n[16]?n[3].find(function(...o){return t[14](n[16],...o)})?.fields??[]:n[4]??[n[5]];return n[17]=r,n}function d1(t,e,i){const n=t.slice();return n[20]=e[i],n}function qj(t){let e,i=t[8].format(t[2])+"",n;return{c(){e=I("p"),n=q(i)},m(s,r){y(s,e,r),O(e,n)},p(s,r){r&260&&i!==(i=s[8].format(s[2])+"")&&W(n,i)},i:z,o:z,d(s){s&&w(e)}}}function Yj(t){let e,i,n=ce(t[7]),s=[];for(let l=0;l<n.length;l+=1)s[l]=m1(f1(t,n,l));const r=l=>g(s[l],1,1,()=>{s[l]=null});return{c(){for(let l=0;l<s.length;l+=1)s[l].c();e=K()},m(l,o){for(let a=0;a<s.length;a+=1)s[a]&&s[a].m(l,o);y(l,e,o),i=!0},p(l,o){if(o&1275){n=ce(l[7]);let a;for(a=0;a<n.length;a+=1){const c=f1(l,n,a);s[a]?(s[a].p(c,o),m(s[a],1)):(s[a]=m1(c),s[a].c(),m(s[a],1),s[a].m(e.parentNode,e))}for(H(),a=n.length;a<s.length;a+=1)r(a);V()}},i(l){if(!i){for(let o=0;o<n.length;o+=1)m(s[o]);i=!0}},o(l){s=s.filter(Boolean);for(let o=0;o<s.length;o+=1)g(s[o]);i=!1},d(l){l&&w(e),mi(s,l)}}}function p1(t,e){let i,n,s;return n=new Rp({props:{keyPath:e[5]?`${e[1]}.${e[19]}`:`${e[1]}.${e[19]}.${e[20].name}`,locale:e[0],fieldConfig:e[20]}}),{key:t,first:null,c(){i=K(),T(n.$$.fragment),this.first=i},m(r,l){y(r,i,l),S(n,r,l),s=!0},p(r,l){e=r;const o={};l&1147&&(o.keyPath=e[5]?`${e[1]}.${e[19]}`:`${e[1]}.${e[19]}.${e[20].name}`),l&1&&(o.locale=e[0]),l&1147&&(o.fieldConfig=e[20]),n.$set(o)},i(r){s||(m(n.$$.fragment,r),s=!0)},o(r){g(n.$$.fragment,r),s=!1},d(r){r&&w(i),E(n,r)}}}function m1(t){let e,i=[],n=new Map,s,r,l=ce(t[17]);const o=a=>a[20].name;for(let a=0;a<l.length;a+=1){let c=d1(t,l,a),u=o(c);n.set(u,i[a]=p1(u,c))}return{c(){e=I("section");for(let a=0;a<i.length;a+=1)i[a].c();s=D(),C(e,"class","subsection")},m(a,c){y(a,e,c);for(let u=0;u<i.length;u+=1)i[u]&&i[u].m(e,null);O(e,s),r=!0},p(a,c){c&1147&&(l=ce(a[17]),H(),i=ct(i,c,o,1,a,l,n,e,at,p1,s,d1),V())},i(a){if(!r){for(let c=0;c<l.length;c+=1)m(i[c]);r=!0}},o(a){for(let c=0;c<i.length;c+=1)g(i[c]);r=!1},d(a){a&&w(e);for(let c=0;c<i.length;c+=1)i[c].d()}}}function Gj(t){let e,i,n,s,r;const l=[Yj,qj],o=[];function a(c,u){return u&4&&(e=null),c[9]?0:(e==null&&(e=!!(Array.isArray(c[2])&&c[2].length)),e?1:-1)}return~(i=a(t,-1))&&(n=o[i]=l[i](t)),{c(){n&&n.c(),s=K()},m(c,u){~i&&o[i].m(c,u),y(c,s,u),r=!0},p(c,[u]){let f=i;i=a(c,u),i===f?~i&&o[i].p(c,u):(n&&(H(),g(o[f],1,1,()=>{o[f]=null}),V()),~i?(n=o[i],n?n.p(c,u):(n=o[i]=l[i](c),n.c()),m(n,1),n.m(s.parentNode,s)):n=null)},i(c){r||(m(n),r=!0)},o(c){g(n),r=!1},d(c){c&&w(s),~i&&o[i].d(c)}}}function Wj(t,e,i){let n,s,r,l,o,a,c,u,f,d;U(t,Ke,v=>i(6,d=v));let{locale:p}=e,{keyPath:h}=e,{fieldConfig:_}=e,{currentValue:b}=e;const k=(v,{name:$})=>$===v;return t.$$set=v=>{"locale"in v&&i(0,p=v.locale),"keyPath"in v&&i(1,h=v.keyPath),"fieldConfig"in v&&i(11,_=v.fieldConfig),"currentValue"in v&&i(2,b=v.currentValue)},t.$$.update=()=>{t.$$.dirty&2048&&i(12,{name:n,field:s,fields:r,types:l,typeKey:o="type"}=_,n,(i(5,s),i(11,_)),(i(4,r),i(11,_)),(i(3,l),i(11,_)),(i(10,o),i(11,_))),t.$$.dirty&56&&i(9,a=!!(s??r??l)),t.$$.dirty&2&&i(13,c=new RegExp(`^${jt(h)}\\.\\d+`)),t.$$.dirty&1&&i(8,u=new Intl.ListFormat(p,{style:"narrow",type:"conjunction"})),t.$$.dirty&12355&&i(7,f=ar(Object.fromEntries(Object.entries(d.currentValues[p]).filter(([v])=>v.match(c)).map(([v,$])=>[v.replace(new RegExp(`^${jt(h)}`),n),$])))[n]??[])},[p,h,b,l,r,s,d,f,u,a,o,_,n,c,k]}class Kj extends J{constructor(e){super(),X(this,e,Wj,Gj,Z,{locale:0,keyPath:1,fieldConfig:11,currentValue:2})}}function Zj(t){let e,i,n;function s(l){t[5](l)}let r={autoResize:!0,disabled:t[1]};return t[0]!==void 0&&(r.value=t[0]),e=new _d({props:r}),ae.push(()=>ze(e,"value",s)),{c(){T(e.$$.fragment)},m(l,o){S(e,l,o),n=!0},p(l,[o]){const a={};o&2&&(a.disabled=l[1]),!i&&o&1&&(i=!0,a.value=l[0],He(()=>i=!1)),e.$set(a)},i(l){n||(m(e.$$.fragment,l),n=!0)},o(l){g(e.$$.fragment,l),n=!1},d(l){E(e,l)}}}function Xj(t,e,i){let{locale:n}=e,{keyPath:s}=e,{fieldConfig:r}=e,{currentValue:l}=e,{disabled:o=!1}=e;function a(c){l=c,i(0,l)}return t.$$set=c=>{"locale"in c&&i(2,n=c.locale),"keyPath"in c&&i(3,s=c.keyPath),"fieldConfig"in c&&i(4,r=c.fieldConfig),"currentValue"in c&&i(0,l=c.currentValue),"disabled"in c&&i(1,o=c.disabled)},[l,o,n,s,r,a]}class Jj extends J{constructor(e){super(),X(this,e,Xj,Zj,Z,{locale:2,keyPath:3,fieldConfig:4,currentValue:0,disabled:1})}}function Qj(t){ve(t,"svelte-15hu8tj","[role=document].svelte-15hu8tj :is(h1, h2, h3, h4, h5, h6, p, ul, ol){margin:1em 0 0}")}function h1(t){let e,i=(t[2]?bn.sanitize(t[1]):t[1])+"",n;return{c(){e=new ad(!1),n=K(),e.a=n},m(s,r){e.m(i,s,r),y(s,n,r)},p(s,r){r&6&&i!==(i=(s[2]?bn.sanitize(s[1]):s[1])+"")&&e.p(i)},d(s){s&&(w(n),e.d())}}}function eR(t){let e,i=typeof t[0]=="string"&&t[0].trim(),n=i&&h1(t);return{c(){e=I("div"),n&&n.c(),C(e,"role","document"),C(e,"class","svelte-15hu8tj")},m(s,r){y(s,e,r),n&&n.m(e,null)},p(s,[r]){r&1&&(i=typeof s[0]=="string"&&s[0].trim()),i?n?n.p(s,r):(n=h1(s),n.c(),n.m(e,null)):n&&(n.d(1),n=null)},i:z,o:z,d(s){s&&w(e),n&&n.d()}}}function tR(t,e,i){let n,s,{locale:r}=e,{keyPath:l}=e,{fieldConfig:o}=e,{currentValue:a}=e;return t.$$set=c=>{"locale"in c&&i(3,r=c.locale),"keyPath"in c&&i(4,l=c.keyPath),"fieldConfig"in c&&i(5,o=c.fieldConfig),"currentValue"in c&&i(0,a=c.currentValue)},t.$$.update=()=>{t.$$.dirty&32&&i(2,{sanitize_preview:n=!1}=o,n),t.$$.dirty&1&&i(1,s=tt.parse(a??""))},[a,s,n,r,l,o]}class nR extends J{constructor(e){super(),X(this,e,tR,eR,Z,{locale:3,keyPath:4,fieldConfig:5,currentValue:0},Qj)}}function iR(t){let e,i,n;function s(l){t[9](l)}let r={min:t[4],max:t[3],step:t[2],disabled:t[0]};return t[1]!==void 0&&(r.value=t[1]),e=new RE({props:r}),ae.push(()=>ze(e,"value",s)),{c(){T(e.$$.fragment)},m(l,o){S(e,l,o),n=!0},p(l,[o]){const a={};o&16&&(a.min=l[4]),o&8&&(a.max=l[3]),o&4&&(a.step=l[2]),o&1&&(a.disabled=l[0]),!i&&o&2&&(i=!0,a.value=l[1],He(()=>i=!1)),e.$set(a)},i(l){n||(m(e.$$.fragment,l),n=!0)},o(l){g(e.$$.fragment,l),n=!1},d(l){E(e,l)}}}function sR(t,e,i){let n,s,r,l,{locale:o}=e,{keyPath:a}=e,{fieldConfig:c}=e,{currentValue:u}=e,{disabled:f=!1}=e,d="";const p=()=>{u!==void 0&&d!==String(u)&&i(1,d=String(u))},h=()=>{let b;n==="int"?b=Number.parseInt(d,10):n==="float"?b=Number.parseFloat(d):b=d,(n==="int"||n==="float")&&Number.isNaN(b)&&(b=""),u!==b&&i(5,u=b)};function _(b){d=b,i(1,d)}return t.$$set=b=>{"locale"in b&&i(6,o=b.locale),"keyPath"in b&&i(7,a=b.keyPath),"fieldConfig"in b&&i(8,c=b.fieldConfig),"currentValue"in b&&i(5,u=b.currentValue),"disabled"in b&&i(0,f=b.disabled)},t.$$.update=()=>{t.$$.dirty&256&&i(4,{value_type:n="int",min:s,max:r,step:l=1}=c,s,(i(3,r),i(8,c)),(i(2,l),i(8,c))),t.$$.dirty&32&&p(),t.$$.dirty&2&&h()},[f,d,l,r,s,u,o,a,c,_]}class rR extends J{constructor(e){super(),X(this,e,sR,iR,Z,{locale:6,keyPath:7,fieldConfig:8,currentValue:5,disabled:0})}}function lR(t){let e,i;return{c(){e=I("p"),i=q(t[1])},m(n,s){y(n,e,s),O(e,i)},p(n,s){s&2&&W(i,n[1])},d(n){n&&w(e)}}}function oR(t){let e,i=Intl.NumberFormat(t[0]).format(Number(t[1]))+"",n;return{c(){e=I("p"),n=q(i)},m(s,r){y(s,e,r),O(e,n)},p(s,r){r&3&&i!==(i=Intl.NumberFormat(s[0]).format(Number(s[1]))+"")&&W(n,i)},d(s){s&&w(e)}}}function aR(t){return{c:z,m:z,p:z,d:z}}function cR(t){let e;function i(r,l){return r[1]===void 0||r[1]===""?aR:r[2]==="int"||r[2]==="float"?oR:lR}let n=i(t),s=n(t);return{c(){s.c(),e=K()},m(r,l){s.m(r,l),y(r,e,l)},p(r,[l]){n===(n=i(r))&&s?s.p(r,l):(s.d(1),s=n(r),s&&(s.c(),s.m(e.parentNode,e)))},i:z,o:z,d(r){r&&w(e),s.d(r)}}}function uR(t,e,i){let n,{locale:s}=e,{keyPath:r}=e,{fieldConfig:l}=e,{currentValue:o}=e;return t.$$set=a=>{"locale"in a&&i(0,s=a.locale),"keyPath"in a&&i(3,r=a.keyPath),"fieldConfig"in a&&i(4,l=a.fieldConfig),"currentValue"in a&&i(1,o=a.currentValue)},t.$$.update=()=>{t.$$.dirty&16&&i(2,{value_type:n="int"}=l,n)},[s,o,n,r,l]}class fR extends J{constructor(e){super(),X(this,e,uR,cR,Z,{locale:0,keyPath:3,fieldConfig:4,currentValue:1})}}function dR(t){ve(t,"svelte-7x2t0v",".toolbar.svelte-7x2t0v.svelte-7x2t0v{display:flex;align-items:center;gap:8px;padding:4px}.toolbar.svelte-7x2t0v .summary.svelte-7x2t0v{overflow:hidden;color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-small);font-weight:600;white-space:nowrap;text-overflow:ellipsis}.item-list.collapsed.svelte-7x2t0v.svelte-7x2t0v{display:none}")}function g1(t,e,i){const n=t.slice();return n[18]=e[i],n}function pR(t){let e,i;return e=new we({props:{slot:"start-icon",name:t[3]?"expand_more":"chevron_right",label:t[3]?t[5]("collapse"):t[5]("expand")}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&8&&(r.name=n[3]?"expand_more":"chevron_right"),s&40&&(r.label=n[3]?n[5]("collapse"):n[5]("expand")),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function _1(t){let e,i=t[6]()+"",n,s;return{c(){e=I("div"),n=q(i),C(e,"class","summary svelte-7x2t0v"),C(e,"id",s="object-"+t[2]+"-summary")},m(r,l){y(r,e,l),O(e,n)},p(r,l){l&4&&s!==(s="object-"+r[2]+"-summary")&&C(e,"id",s)},d(r){r&&w(e)}}}function b1(t,e){let i,n,s;return n=new Fp({props:{keyPath:[e[1],e[18].name].join("."),locale:e[0],fieldConfig:e[18]}}),{key:t,first:null,c(){i=K(),T(n.$$.fragment),this.first=i},m(r,l){y(r,i,l),S(n,r,l),s=!0},p(r,l){e=r;const o={};l&18&&(o.keyPath=[e[1],e[18].name].join(".")),l&1&&(o.locale=e[0]),l&16&&(o.fieldConfig=e[18]),n.$set(o)},i(r){s||(m(n.$$.fragment,r),s=!0)},o(r){g(n.$$.fragment,r),s=!1},d(r){r&&w(i),E(n,r)}}}function mR(t){let e,i,n,s,r,l,o,a=[],c=new Map,u,f;i=new De({props:{"aria-expanded":t[3],"aria-controls":"object-"+t[2]+"-item-list",$$slots:{"start-icon":[pR]},$$scope:{ctx:t}}}),i.$on("click",t[12]);let d=!t[3]&&_1(t);r=new gn({props:{flex:!0}});let p=ce(t[4]);const h=_=>_[18].name;for(let _=0;_<p.length;_+=1){let b=g1(t,p,_),k=h(b);c.set(k,a[_]=b1(k,b))}return{c(){e=I("div"),T(i.$$.fragment),n=D(),d&&d.c(),s=D(),T(r.$$.fragment),l=D(),o=I("div");for(let _=0;_<a.length;_+=1)a[_].c();C(e,"class","toolbar top svelte-7x2t0v"),C(o,"class","item-list svelte-7x2t0v"),C(o,"id",u="object-"+t[2]+"-item-list"),de(o,"collapsed",!t[3])},m(_,b){y(_,e,b),S(i,e,null),O(e,n),d&&d.m(e,null),O(e,s),S(r,e,null),y(_,l,b),y(_,o,b);for(let k=0;k<a.length;k+=1)a[k]&&a[k].m(o,null);f=!0},p(_,b){const k={};b&8&&(k["aria-expanded"]=_[3]),b&4&&(k["aria-controls"]="object-"+_[2]+"-item-list"),b&2097192&&(k.$$scope={dirty:b,ctx:_}),i.$set(k),_[3]?d&&(d.d(1),d=null):d?d.p(_,b):(d=_1(_),d.c(),d.m(e,s)),b&19&&(p=ce(_[4]),H(),a=ct(a,b,h,1,_,p,c,o,at,b1,null,g1),V()),(!f||b&4&&u!==(u="object-"+_[2]+"-item-list"))&&C(o,"id",u),(!f||b&8)&&de(o,"collapsed",!_[3])},i(_){if(!f){m(i.$$.fragment,_),m(r.$$.fragment,_);for(let b=0;b<p.length;b+=1)m(a[b]);f=!0}},o(_){g(i.$$.fragment,_),g(r.$$.fragment,_);for(let b=0;b<a.length;b+=1)g(a[b]);f=!1},d(_){_&&(w(e),w(l),w(o)),E(i),d&&d.d(),E(r);for(let b=0;b<a.length;b+=1)a[b].d()}}}function hR(t){let e,i;return e=new _n({props:{"aria-labelledby":"object-"+t[2]+"-summary",$$slots:{default:[mR]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,[s]){const r={};s&4&&(r["aria-labelledby"]="object-"+n[2]+"-summary"),s&2097215&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function gR(t,e,i){let n,s,r,l,o,a,c,u,f,d;U(t,Ke,A=>i(11,f=A)),U(t,pe,A=>i(5,d=A));let{locale:p}=e,{keyPath:h}=e,{fieldConfig:_}=e,{currentValue:b}=e,{disabled:k=!1}=e,v="";on(()=>{i(2,v=Hs().split("-").pop())});const $=()=>s?s.replaceAll(/{{fields\.(.+?)}}/g,(A,P)=>{const F=Fd({collectionName:l,fileName:o,valueMap:a,keyPath:`${h}.${P}`,locale:p});return Array.isArray(F)?c.format(F):String(F)}):a[`${h}.title`]??a[`${h}.name`]??"",L=()=>{i(3,u=!u)};return t.$$set=A=>{"locale"in A&&i(0,p=A.locale),"keyPath"in A&&i(1,h=A.keyPath),"fieldConfig"in A&&i(7,_=A.fieldConfig),"currentValue"in A&&i(8,b=A.currentValue),"disabled"in A&&i(9,k=A.disabled)},t.$$.update=()=>{t.$$.dirty&128&&i(10,{collapsed:n=!1,summary:s,fields:r}=_,n,(i(4,r),i(7,_))),t.$$.dirty&2048&&({collectionName:l,fileName:o}=f??{}),t.$$.dirty&2049&&(a=f.currentValues[p]),t.$$.dirty&1&&(c=new Intl.ListFormat(p,{style:"narrow",type:"conjunction"})),t.$$.dirty&1024&&i(3,u=!n)},[p,h,v,u,r,d,$,_,b,k,n,f,L]}class _R extends J{constructor(e){super(),X(this,e,gR,hR,Z,{locale:0,keyPath:1,fieldConfig:7,currentValue:8,disabled:9},dR)}}function v1(t,e,i){const n=t.slice();return n[5]=e[i],n}function k1(t,e){let i,n,s;return n=new Rp({props:{keyPath:[e[1],e[5].name].join("."),locale:e[0],fieldConfig:e[5]}}),{key:t,first:null,c(){i=K(),T(n.$$.fragment),this.first=i},m(r,l){y(r,i,l),S(n,r,l),s=!0},p(r,l){e=r;const o={};l&6&&(o.keyPath=[e[1],e[5].name].join(".")),l&1&&(o.locale=e[0]),l&4&&(o.fieldConfig=e[5]),n.$set(o)},i(r){s||(m(n.$$.fragment,r),s=!0)},o(r){g(n.$$.fragment,r),s=!1},d(r){r&&w(i),E(n,r)}}}function bR(t){let e,i=[],n=new Map,s,r=ce(t[2]);const l=o=>o[5].name;for(let o=0;o<r.length;o+=1){let a=v1(t,r,o),c=l(a);n.set(c,i[o]=k1(c,a))}return{c(){e=I("section");for(let o=0;o<i.length;o+=1)i[o].c();C(e,"class","subsection")},m(o,a){y(o,e,a);for(let c=0;c<i.length;c+=1)i[c]&&i[c].m(e,null);s=!0},p(o,[a]){a&7&&(r=ce(o[2]),H(),i=ct(i,a,l,1,o,r,n,e,at,k1,null,v1),V())},i(o){if(!s){for(let a=0;a<r.length;a+=1)m(i[a]);s=!0}},o(o){for(let a=0;a<i.length;a+=1)g(i[a]);s=!1},d(o){o&&w(e);for(let a=0;a<i.length;a+=1)i[a].d()}}}function vR(t,e,i){let n,{locale:s}=e,{keyPath:r}=e,{fieldConfig:l}=e,{currentValue:o}=e;return t.$$set=a=>{"locale"in a&&i(0,s=a.locale),"keyPath"in a&&i(1,r=a.keyPath),"fieldConfig"in a&&i(3,l=a.fieldConfig),"currentValue"in a&&i(4,o=a.currentValue)},t.$$.update=()=>{t.$$.dirty&8&&i(2,{fields:n}=l,n)},[s,r,n,l,o]}class kR extends J{constructor(e){super(),X(this,e,vR,bR,Z,{locale:0,keyPath:1,fieldConfig:3,currentValue:4})}}function wR(t){ve(t,"svelte-ego5ba",".multi-selector.svelte-ego5ba.svelte-ego5ba{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.multi-selector.disabled.svelte-ego5ba.svelte-ego5ba{pointer-events:none}.multi-selector.disabled.svelte-ego5ba>.svelte-ego5ba{opacity:0.5}.multi-selector.svelte-ego5ba span.svelte-ego5ba{display:inline-flex;align-items:center;gap:8px;padding:4px 12px;border-radius:var(--sui-control-medium-border-radius);background-color:var(--sui-secondary-background-color)}.multi-selector.svelte-ego5ba span.svelte-ego5ba .icon{font-size:var(--sui-font-size-large)}")}function w1(t,e,i){const n=t.slice();return n[21]=e[i].label,n[22]=e[i].value,n}function y1(t,e,i){const n=t.slice();return n[21]=e[i].label,n[22]=e[i].value,n}function $1(t,e,i){const n=t.slice();n[22]=e[i],n[27]=i;const s=n[2].find(function(...l){return t[15](n[22],...l)});return n[25]=s,n}function yR(t){let e,i,n;function s(l){t[18](l)}let r={disabled:t[1],label:t[2].find(t[17])?.label||void 0,$$slots:{default:[SR]},$$scope:{ctx:t}};return t[0]!==void 0&&(r.value=t[0]),e=new D0({props:r}),ae.push(()=>ze(e,"value",s)),{c(){T(e.$$.fragment)},m(l,o){S(e,l,o),n=!0},p(l,o){const a={};o&2&&(a.disabled=l[1]),o&5&&(a.label=l[2].find(l[17])?.label||void 0),o&1073741829&&(a.$$scope={dirty:o,ctx:l}),!i&&o&1&&(i=!0,a.value=l[0],He(()=>i=!1)),e.$set(a)},i(l){n||(m(e.$$.fragment,l),n=!0)},o(l){g(e.$$.fragment,l),n=!1},d(l){E(e,l)}}}function $R(t){let e,i,n,s=ce(t[0]),r=[];for(let a=0;a<s.length;a+=1)r[a]=T1($1(t,s,a));const l=a=>g(r[a],1,1,()=>{r[a]=null});let o=(typeof t[3]!="number"||t[0].length<t[3])&&t[0].length<t[2].length&&O1(t);return{c(){e=I("div");for(let a=0;a<r.length;a+=1)r[a].c();i=D(),o&&o.c(),C(e,"class","multi-selector svelte-ego5ba"),de(e,"disabled",t[1])},m(a,c){y(a,e,c);for(let u=0;u<r.length;u+=1)r[u]&&r[u].m(e,null);O(e,i),o&&o.m(e,null),n=!0},p(a,c){if(c&327){s=ce(a[0]);let u;for(u=0;u<s.length;u+=1){const f=$1(a,s,u);r[u]?(r[u].p(f,c),m(r[u],1)):(r[u]=T1(f),r[u].c(),m(r[u],1),r[u].m(e,i))}for(H(),u=s.length;u<r.length;u+=1)l(u);V()}(typeof a[3]!="number"||a[0].length<a[3])&&a[0].length<a[2].length?o?(o.p(a,c),c&13&&m(o,1)):(o=O1(a),o.c(),m(o,1),o.m(e,null)):o&&(H(),g(o,1,1,()=>{o=null}),V()),(!n||c&2)&&de(e,"disabled",a[1])},i(a){if(!n){for(let c=0;c<s.length;c+=1)m(r[c]);m(o),n=!0}},o(a){r=r.filter(Boolean);for(let c=0;c<r.length;c+=1)g(r[c]);g(o),n=!1},d(a){a&&w(e),mi(r,a),o&&o.d()}}}function S1(t,e){let i,n,s;return n=new ni({props:{label:e[21],value:e[22],selected:e[22]===e[0]}}),{key:t,first:null,c(){i=K(),T(n.$$.fragment),this.first=i},m(r,l){y(r,i,l),S(n,r,l),s=!0},p(r,l){e=r;const o={};l&4&&(o.label=e[21]),l&4&&(o.value=e[22]),l&5&&(o.selected=e[22]===e[0]),n.$set(o)},i(r){s||(m(n.$$.fragment,r),s=!0)},o(r){g(n.$$.fragment,r),s=!1},d(r){r&&w(i),E(n,r)}}}function SR(t){let e=[],i=new Map,n,s,r=ce(t[2]);const l=o=>o[22];for(let o=0;o<r.length;o+=1){let a=w1(t,r,o),c=l(a);i.set(c,e[o]=S1(c,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();n=K()},m(o,a){for(let c=0;c<e.length;c+=1)e[c]&&e[c].m(o,a);y(o,n,a),s=!0},p(o,a){a&5&&(r=ce(o[2]),H(),e=ct(e,a,l,1,o,r,i,n.parentNode,at,S1,n,w1),V())},i(o){if(!s){for(let a=0;a<r.length;a+=1)m(e[a]);s=!0}},o(o){for(let a=0;a<e.length;a+=1)g(e[a]);s=!1},d(o){o&&w(n);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function E1(t){let e,i=t[25].label+"",n,s,r,l;function o(){return t[14](t[27])}return r=new De({props:{disabled:t[1],$$slots:{"start-icon":[ER]},$$scope:{ctx:t}}}),r.$on("click",o),{c(){e=I("span"),n=q(i),s=D(),T(r.$$.fragment),C(e,"class","svelte-ego5ba")},m(a,c){y(a,e,c),O(e,n),O(e,s),S(r,e,null),l=!0},p(a,c){t=a,(!l||c&5)&&i!==(i=t[25].label+"")&&W(n,i);const u={};c&2&&(u.disabled=t[1]),c&1073741888&&(u.$$scope={dirty:c,ctx:t}),r.$set(u)},i(a){l||(m(r.$$.fragment,a),l=!0)},o(a){g(r.$$.fragment,a),l=!1},d(a){a&&w(e),E(r)}}}function ER(t){let e,i;return e=new we({props:{slot:"start-icon",name:"close",label:t[6]("delete")}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&64&&(r.label=n[6]("delete")),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function T1(t){let e,i,n=t[25]&&E1(t);return{c(){n&&n.c(),e=K()},m(s,r){n&&n.m(s,r),y(s,e,r),i=!0},p(s,r){s[25]?n?(n.p(s,r),r&5&&m(n,1)):(n=E1(s),n.c(),m(n,1),n.m(e.parentNode,e)):n&&(H(),g(n,1,1,()=>{n=null}),V())},i(s){i||(m(n),i=!0)},o(s){g(n),i=!1},d(s){s&&w(e),n&&n.d(s)}}}function O1(t){let e,i;return e=new C0({props:{disabled:t[1],$$slots:{default:[TR]},$$scope:{ctx:t}}}),e.$on("change",t[16]),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&2&&(r.disabled=n[1]),s&1073741829&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function A1(t){let e,i;return e=new ni({props:{label:t[21],value:t[22]}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&4&&(r.label=n[21]),s&4&&(r.value=n[22]),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function L1(t,e){let i,n=!e[0].includes(e[22]),s,r,l=n&&A1(e);return{key:t,first:null,c(){i=K(),l&&l.c(),s=K(),this.first=i},m(o,a){y(o,i,a),l&&l.m(o,a),y(o,s,a),r=!0},p(o,a){e=o,a&5&&(n=!e[0].includes(e[22])),n?l?(l.p(e,a),a&5&&m(l,1)):(l=A1(e),l.c(),m(l,1),l.m(s.parentNode,s)):l&&(H(),g(l,1,1,()=>{l=null}),V())},i(o){r||(m(l),r=!0)},o(o){g(l),r=!1},d(o){o&&(w(i),w(s)),l&&l.d(o)}}}function TR(t){let e=[],i=new Map,n,s,r=ce(t[2]);const l=o=>o[22];for(let o=0;o<r.length;o+=1){let a=y1(t,r,o),c=l(a);i.set(c,e[o]=L1(c,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();n=K()},m(o,a){for(let c=0;c<e.length;c+=1)e[c]&&e[c].m(o,a);y(o,n,a),s=!0},p(o,a){a&5&&(r=ce(o[2]),H(),e=ct(e,a,l,1,o,r,i,n.parentNode,at,L1,n,y1),V())},i(o){if(!s){for(let a=0;a<r.length;a+=1)m(e[a]);s=!0}},o(o){for(let a=0;a<e.length;a+=1)g(e[a]);s=!1},d(o){o&&w(n);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function OR(t){let e,i,n,s;const r=[$R,yR],l=[];function o(a,c){return a[4]?0:1}return e=o(t),i=l[e]=r[e](t),{c(){i.c(),n=K()},m(a,c){l[e].m(a,c),y(a,n,c),s=!0},p(a,[c]){let u=e;e=o(a),e===u?l[e].p(a,c):(H(),g(l[u],1,1,()=>{l[u]=null}),V(),i=l[e],i?i.p(a,c):(i=l[e]=r[e](a),i.c()),m(i,1),i.m(n.parentNode,n))},i(a){s||(m(i),s=!0)},o(a){g(i),s=!1},d(a){a&&w(n),l[e].d(a)}}}function AR(t,e,i){let n,s,r,l,o,a,c;U(t,Ke,j=>i(5,a=j)),U(t,pe,j=>i(6,c=j));let{locale:u}=e,{keyPath:f}=e,{fieldConfig:d}=e,{currentValue:p}=e,{disabled:h=!1}=e,{sortOptions:_=!1}=e;const b=j=>{Object.keys(a.currentValues).forEach(N=>{n!=="duplicate"&&N!==u||hw(N,f,j)})},k=j=>{b(({valueList:N})=>{N.push(j)})},v=j=>{b(({valueList:N})=>{N.splice(j,1)})},$=j=>{v(j)},L=(j,N)=>N.value===j,A=({detail:{target:j,value:N}})=>{a&&(k(N),window.requestAnimationFrame(()=>{j.value=""}))},P=({value:j})=>j===p;function F(j){p=j,i(0,p)}return t.$$set=j=>{"locale"in j&&i(9,u=j.locale),"keyPath"in j&&i(10,f=j.keyPath),"fieldConfig"in j&&i(11,d=j.fieldConfig),"currentValue"in j&&i(0,p=j.currentValue),"disabled"in j&&i(1,h=j.disabled),"sortOptions"in j&&i(12,_=j.sortOptions)},t.$$.update=()=>{t.$$.dirty&2048&&i(13,{i18n:n,options:s,multiple:r,max:l}=d,s,(i(4,r),i(11,d)),(i(3,l),i(11,d))),t.$$.dirty&12288&&i(2,o=(()=>{const j=s.map(N=>({label:Li(N)?N.label:N,value:Li(N)?N.value:N}));return _&&j.sort((N,M)=>N.label.localeCompare(M.label)),j})())},[p,h,o,l,r,a,c,k,v,u,f,d,_,s,$,L,A,P,F]}class fy extends J{constructor(e){super(),X(this,e,AR,OR,Z,{locale:9,keyPath:10,fieldConfig:11,currentValue:0,disabled:1,sortOptions:12},wR)}}function LR(t){let e,i,n;function s(l){t[9](l)}let r={locale:t[1],keyPath:t[2],fieldConfig:{...t[3],options:t[5]},disabled:t[4],sortOptions:!0};return t[0]!==void 0&&(r.currentValue=t[0]),e=new fy({props:r}),ae.push(()=>ze(e,"currentValue",s)),{c(){T(e.$$.fragment)},m(l,o){S(e,l,o),n=!0},p(l,[o]){const a={};o&2&&(a.locale=l[1]),o&4&&(a.keyPath=l[2]),o&40&&(a.fieldConfig={...l[3],options:l[5]}),o&16&&(a.disabled=l[4]),!i&&o&1&&(i=!0,a.currentValue=l[0],He(()=>i=!1)),e.$set(a)},i(l){n||(m(e.$$.fragment,l),n=!0)},o(l){g(e.$$.fragment,l),n=!1},d(l){E(e,l)}}}function NR(t,e,i){let n,s,r,l,{locale:o}=e,{keyPath:a}=e,{fieldConfig:c}=e,{currentValue:u}=e,{disabled:f=!1}=e;function d(p){u=p,i(0,u)}return t.$$set=p=>{"locale"in p&&i(1,o=p.locale),"keyPath"in p&&i(2,a=p.keyPath),"fieldConfig"in p&&i(3,c=p.fieldConfig),"currentValue"in p&&i(0,u=p.currentValue),"disabled"in p&&i(4,f=p.disabled)},t.$$.update=()=>{t.$$.dirty&8&&i(7,{collection:n,file:s}=c,n,(i(8,s),i(3,c))),t.$$.dirty&384&&i(6,r=s?[xd(n,s)]:$o(n)),t.$$.dirty&74&&i(5,l=Md(o,c,r))},[u,o,a,c,f,l,r,n,s,d]}class PR extends J{constructor(e){super(),X(this,e,NR,LR,Z,{locale:1,keyPath:2,fieldConfig:3,currentValue:0,disabled:4})}}function N1(t){let e,i=t[0].format(t[1])+"",n;return{c(){e=I("p"),n=q(i)},m(s,r){y(s,e,r),O(e,n)},p(s,r){r&3&&i!==(i=s[0].format(s[1])+"")&&W(n,i)},d(s){s&&w(e)}}}function IR(t){let e,i=t[1]?.length&&N1(t);return{c(){i&&i.c(),e=K()},m(n,s){i&&i.m(n,s),y(n,e,s)},p(n,[s]){n[1]?.length?i?i.p(n,s):(i=N1(n),i.c(),i.m(e.parentNode,e)):i&&(i.d(1),i=null)},i:z,o:z,d(n){n&&w(e),i&&i.d(n)}}}function CR(t,e,i){let n,s,r,l,o,a,c,u,{locale:f}=e,{keyPath:d}=e,{fieldConfig:p}=e,{currentValue:h}=e;return t.$$set=_=>{"locale"in _&&i(2,f=_.locale),"keyPath"in _&&i(3,d=_.keyPath),"fieldConfig"in _&&i(4,p=_.fieldConfig),"currentValue"in _&&i(5,h=_.currentValue)},t.$$.update=()=>{t.$$.dirty&16&&i(10,{collection:n,file:s,multiple:r=!1,value_field:l}=p,n,(i(11,s),i(4,p)),(i(8,r),i(4,p)),(i(6,l),i(4,p))),t.$$.dirty&3072&&i(9,o=s?[xd(n,s)]:$o(n)),t.$$.dirty&532&&i(7,a=Md(f,p,o)),t.$$.dirty&480&&i(1,c=(r?h:[h]).filter(_=>_!==void 0).map(_=>{const b=a.find(k=>k.value===_)?.label;return b&&b!==_?["slug","{{slug}}","{{fields.slug}}"].includes(l)?b:`${b} (${_})`:_})),t.$$.dirty&4&&i(0,u=new Intl.ListFormat(f,{style:"narrow",type:"conjunction"}))},[u,c,f,d,p,h,l,a,r,o,n,s]}class DR extends J{constructor(e){super(),X(this,e,CR,IR,Z,{locale:2,keyPath:3,fieldConfig:4,currentValue:5})}}function MR(t){let e,i=t[3](t[0])+"",n;return{c(){e=I("p"),n=q(i)},m(s,r){y(s,e,r),O(e,n)},p(s,r){r&1&&i!==(i=s[3](s[0])+"")&&W(n,i)},d(s){s&&w(e)}}}function jR(t){let e,i=t[1].format(t[0].map(t[3]))+"",n;return{c(){e=I("p"),n=q(i)},m(s,r){y(s,e,r),O(e,n)},p(s,r){r&3&&i!==(i=s[1].format(s[0].map(s[3]))+"")&&W(n,i)},d(s){s&&w(e)}}}function RR(t){let e,i;function n(l,o){if(o&5&&(e=null),e==null&&(e=!!(l[2]&&Array.isArray(l[0])&&l[0].length)),e)return jR;if(l[0]!==void 0)return MR}let s=n(t,-1),r=s&&s(t);return{c(){r&&r.c(),i=K()},m(l,o){r&&r.m(l,o),y(l,i,o)},p(l,[o]){s===(s=n(l,o))&&r?r.p(l,o):(r&&r.d(1),r=s&&s(l),r&&(r.c(),r.m(i.parentNode,i)))},i:z,o:z,d(l){l&&w(i),r&&r.d(l)}}}function FR(t,e,i){let n,s,r,l,{locale:o}=e,{keyPath:a}=e,{fieldConfig:c}=e,{currentValue:u}=e;const f=d=>r&&n.find(p=>p.value===d)?.label||d;return t.$$set=d=>{"locale"in d&&i(4,o=d.locale),"keyPath"in d&&i(5,a=d.keyPath),"fieldConfig"in d&&i(6,c=d.fieldConfig),"currentValue"in d&&i(0,u=d.currentValue)},t.$$.update=()=>{t.$$.dirty&64&&i(7,{options:n,multiple:s}=c,n,(i(2,s),i(6,c))),t.$$.dirty&128&&(r=jv(n)),t.$$.dirty&16&&i(1,l=new Intl.ListFormat(o,{style:"narrow",type:"conjunction"}))},[u,l,s,f,o,a,c,n]}class UR extends J{constructor(e){super(),X(this,e,FR,RR,Z,{locale:4,keyPath:5,fieldConfig:6,currentValue:0})}}function xR(t){let e,i,n;function s(l){t[5](l)}let r={disabled:t[1]};return t[0]!==void 0&&(r.value=t[0]),e=new Hn({props:r}),ae.push(()=>ze(e,"value",s)),{c(){T(e.$$.fragment)},m(l,o){S(e,l,o),n=!0},p(l,[o]){const a={};o&2&&(a.disabled=l[1]),!i&&o&1&&(i=!0,a.value=l[0],He(()=>i=!1)),e.$set(a)},i(l){n||(m(e.$$.fragment,l),n=!0)},o(l){g(e.$$.fragment,l),n=!1},d(l){E(e,l)}}}function zR(t,e,i){let{locale:n}=e,{keyPath:s}=e,{fieldConfig:r}=e,{currentValue:l}=e,{disabled:o=!1}=e;function a(c){l=c,i(0,l)}return t.$$set=c=>{"locale"in c&&i(2,n=c.locale),"keyPath"in c&&i(3,s=c.keyPath),"fieldConfig"in c&&i(4,r=c.fieldConfig),"currentValue"in c&&i(0,l=c.currentValue),"disabled"in c&&i(1,o=c.disabled)},[l,o,n,s,r,a]}class BR extends J{constructor(e){super(),X(this,e,zR,xR,Z,{locale:2,keyPath:3,fieldConfig:4,currentValue:0,disabled:1})}}function HR(t){ve(t,"svelte-162himw",".title.svelte-162himw{font-size:var(--sui-font-size-xxx-large);font-weight:600}")}function P1(t){let e;function i(r,l){return r[2]==="title"?YR:r[1]?qR:VR}let n=i(t),s=n(t);return{c(){s.c(),e=K()},m(r,l){s.m(r,l),y(r,e,l)},p(r,l){n===(n=i(r))&&s?s.p(r,l):(s.d(1),s=n(r),s&&(s.c(),s.m(e.parentNode,e)))},d(r){r&&w(e),s.d(r)}}}function VR(t){let e,i;return{c(){e=I("p"),i=q(t[0])},m(n,s){y(n,e,s),O(e,i)},p(n,s){s&1&&W(i,n[0])},d(n){n&&w(e)}}}function qR(t){let e,i,n;return{c(){e=I("p"),i=I("a"),n=q(t[0]),C(i,"href",t[0])},m(s,r){y(s,e,r),O(e,i),O(i,n)},p(s,r){r&1&&W(n,s[0]),r&1&&C(i,"href",s[0])},d(s){s&&w(e)}}}function YR(t){let e,i;return{c(){e=I("p"),i=q(t[0]),C(e,"class","title svelte-162himw")},m(n,s){y(n,e,s),O(e,i)},p(n,s){s&1&&W(i,n[0])},d(n){n&&w(e)}}}function GR(t){let e=typeof t[0]=="string"&&t[0].trim(),i,n=e&&P1(t);return{c(){n&&n.c(),i=K()},m(s,r){n&&n.m(s,r),y(s,i,r)},p(s,[r]){r&1&&(e=typeof s[0]=="string"&&s[0].trim()),e?n?n.p(s,r):(n=P1(s),n.c(),n.m(i.parentNode,i)):n&&(n.d(1),n=null)},i:z,o:z,d(s){s&&w(i),n&&n.d(s)}}}function WR(t,e,i){let n,s,{locale:r}=e,{keyPath:l}=e,{fieldConfig:o}=e,{currentValue:a}=e;return t.$$set=c=>{"locale"in c&&i(3,r=c.locale),"keyPath"in c&&i(4,l=c.keyPath),"fieldConfig"in c&&i(5,o=c.fieldConfig),"currentValue"in c&&i(0,a=c.currentValue)},t.$$.update=()=>{t.$$.dirty&32&&i(2,{name:n}=o,n),t.$$.dirty&1&&i(1,s=(()=>{try{return new URL(a),!0}catch{return!1}})())},[a,s,n,r,l,o]}class KR extends J{constructor(e){super(),X(this,e,WR,GR,Z,{locale:3,keyPath:4,fieldConfig:5,currentValue:0},HR)}}function ZR(t){let e,i,n;function s(l){t[5](l)}let r={autoResize:!0,disabled:t[1]};return t[0]!==void 0&&(r.value=t[0]),e=new _d({props:r}),ae.push(()=>ze(e,"value",s)),{c(){T(e.$$.fragment)},m(l,o){S(e,l,o),n=!0},p(l,[o]){const a={};o&2&&(a.disabled=l[1]),!i&&o&1&&(i=!0,a.value=l[0],He(()=>i=!1)),e.$set(a)},i(l){n||(m(e.$$.fragment,l),n=!0)},o(l){g(e.$$.fragment,l),n=!1},d(l){E(e,l)}}}function XR(t,e,i){let{locale:n}=e,{keyPath:s}=e,{fieldConfig:r}=e,{currentValue:l}=e,{disabled:o=!1}=e;function a(c){l=c,i(0,l)}return t.$$set=c=>{"locale"in c&&i(2,n=c.locale),"keyPath"in c&&i(3,s=c.keyPath),"fieldConfig"in c&&i(4,r=c.fieldConfig),"currentValue"in c&&i(0,l=c.currentValue),"disabled"in c&&i(1,o=c.disabled)},[l,o,n,s,r,a]}class JR extends J{constructor(e){super(),X(this,e,XR,ZR,Z,{locale:2,keyPath:3,fieldConfig:4,currentValue:0,disabled:1})}}function QR(t){ve(t,"svelte-tzbr78","p.svelte-tzbr78{white-space:pre-wrap}")}function I1(t){let e,i;return{c(){e=I("p"),i=q(t[0]),C(e,"class","svelte-tzbr78")},m(n,s){y(n,e,s),O(e,i)},p(n,s){s&1&&W(i,n[0])},d(n){n&&w(e)}}}function e7(t){let e=typeof t[0]=="string"&&t[0].trim(),i,n=e&&I1(t);return{c(){n&&n.c(),i=K()},m(s,r){n&&n.m(s,r),y(s,i,r)},p(s,[r]){r&1&&(e=typeof s[0]=="string"&&s[0].trim()),e?n?n.p(s,r):(n=I1(s),n.c(),n.m(i.parentNode,i)):n&&(n.d(1),n=null)},i:z,o:z,d(s){s&&w(i),n&&n.d(s)}}}function t7(t,e,i){let{locale:n}=e,{keyPath:s}=e,{fieldConfig:r}=e,{currentValue:l}=e;return t.$$set=o=>{"locale"in o&&i(1,n=o.locale),"keyPath"in o&&i(2,s=o.keyPath),"fieldConfig"in o&&i(3,r=o.fieldConfig),"currentValue"in o&&i(0,l=o.currentValue)},[l,n,s,r]}class n7 extends J{constructor(e){super(),X(this,e,t7,e7,Z,{locale:1,keyPath:2,fieldConfig:3,currentValue:0},QR)}}const uo={boolean:E8,color:M8,date:d_,datetime:d_,file:J_,image:J_,list:zj,markdown:Jj,number:rR,object:_R,relation:PR,select:fy,string:BR,text:JR},rc={boolean:A8,color:U8,date:m_,datetime:m_,file:Q_,image:Q_,list:Kj,markdown:nR,number:fR,object:kR,relation:DR,select:UR,string:KR,text:n7};function i7(t){ve(t,"svelte-yh1mmk",'section.svelte-yh1mmk.svelte-yh1mmk.svelte-yh1mmk{padding:16px}section[data-widget=object].svelte-yh1mmk>header.svelte-yh1mmk+div.svelte-yh1mmk{border-width:2px;border-color:var(--sui-secondary-border-color);border-radius:var(--sui-control-medium-border-radius)}section.svelte-yh1mmk.svelte-yh1mmk.svelte-yh1mmk:not(:last-child){border-width:0 0 1px;border-color:var(--sui-secondary-border-color)}section.svelte-yh1mmk>.svelte-yh1mmk.svelte-yh1mmk{margin-right:auto;margin-left:auto;max-width:768px}header.svelte-yh1mmk.svelte-yh1mmk.svelte-yh1mmk{display:flex;align-items:center;gap:8px;margin-bottom:8px}header.svelte-yh1mmk h4.svelte-yh1mmk.svelte-yh1mmk{font-size:var(--sui-font-size-small);font-weight:600;color:var(--sui-secondary-foreground-color)}header.svelte-yh1mmk .required.svelte-yh1mmk.svelte-yh1mmk{border:1px solid var(--sui-control-border-color);border-radius:4px;padding:2px 4px;color:var(--sui-info-foreground-color);font-size:var(--sui-font-size-x-small)}header.svelte-yh1mmk+div.svelte-yh1mmk input[type="color"],header.svelte-yh1mmk+div.svelte-yh1mmk input[type="date"],header.svelte-yh1mmk+div.svelte-yh1mmk input[type="datetime-local"],header.svelte-yh1mmk+div.svelte-yh1mmk input[type="time"],header.svelte-yh1mmk+div.svelte-yh1mmk input[type="number"]{outline:0;border:0;color:inherit}header.svelte-yh1mmk+div.svelte-yh1mmk input[type="text"],header.svelte-yh1mmk+div.svelte-yh1mmk textarea{width:100%}header.svelte-yh1mmk+div.svelte-yh1mmk input[type="color"],header.svelte-yh1mmk+div.svelte-yh1mmk input[type="number"]{background-color:var(--sui-textbox-background-color);border-width:1px;border-color:var(--sui-primary-border-color);border-radius:var(--sui-control-medium-border-radius)}header.svelte-yh1mmk+div.svelte-yh1mmk input[type="file"],header.svelte-yh1mmk+div.svelte-yh1mmk input[type="checkbox"],header.svelte-yh1mmk+div.svelte-yh1mmk>div{color:inherit}header.svelte-yh1mmk+div.svelte-yh1mmk input[type="date"],header.svelte-yh1mmk+div.svelte-yh1mmk input[type="datetime-local"],header.svelte-yh1mmk+div.svelte-yh1mmk input[type="time"]{width:auto;text-transform:uppercase;background-color:transparent}:root[data-theme="dark"] header+div.svelte-yh1mmk input[type="date"]::-webkit-calendar-picker-indicator,:root[data-theme="dark"] header+div.svelte-yh1mmk input[type="datetime-local"]::-webkit-calendar-picker-indicator,:root[data-theme="dark"] header+div.svelte-yh1mmk input[type="time"]::-webkit-calendar-picker-indicator{filter:invert(1)}header.svelte-yh1mmk+div.svelte-yh1mmk span{display:block}.validation.svelte-yh1mmk.svelte-yh1mmk.svelte-yh1mmk{color:var(--sui-error-foreground-color)}.validation.svelte-yh1mmk div.svelte-yh1mmk.svelte-yh1mmk{display:flex;gap:4px;margin:8px 0}.validation.svelte-yh1mmk div.svelte-yh1mmk .icon{flex:none;font-size:20px}.hint.svelte-yh1mmk.svelte-yh1mmk.svelte-yh1mmk{margin-top:8px;font-size:var(--sui-font-size-small);opacity:0.75}.hint.svelte-yh1mmk p{margin:0}')}function Xu(t){const e=t.slice(),i=e[12]&&e[13].length;e[28]=i;const n=!(e[11]&&e[0]!==e[4]);return e[29]=n,e}function C1(t){let e,i,n,s=(t[17]||t[18])+"",r,l,o,a,c,u,f,d,p,h,_,b,k=t[15]&&D1(t);a=new gn({props:{flex:!0}});let v=(t[28]||t[29])&&M1(t),$=t[7]?.valid===!1&&z1(t);const L=[c7,a7,o7],A=[];function P(j,N){return j[5]in uo?j[3]?1:2:0}p=P(t),h=A[p]=L[p](t);let F=t[16]&&Y1(t);return{c(){e=I("section"),i=I("header"),n=I("h4"),r=q(s),l=D(),k&&k.c(),o=D(),T(a.$$.fragment),c=D(),v&&v.c(),u=D(),$&&$.c(),f=D(),d=I("div"),h.c(),_=D(),F&&F.c(),C(n,"class","svelte-yh1mmk"),C(i,"class","svelte-yh1mmk"),C(d,"class","svelte-yh1mmk"),C(e,"data-widget",t[5]),C(e,"data-key-path",t[1]),C(e,"class","svelte-yh1mmk")},m(j,N){y(j,e,N),O(e,i),O(i,n),O(n,r),O(i,l),k&&k.m(i,null),O(i,o),S(a,i,null),O(i,c),v&&v.m(i,null),O(e,u),$&&$.m(e,null),O(e,f),O(e,d),A[p].m(d,null),O(e,_),F&&F.m(e,null),b=!0},p(j,N){(!b||N&393216)&&s!==(s=(j[17]||j[18])+"")&&W(r,s),j[15]?k?k.p(j,N):(k=D1(j),k.c(),k.m(i,o)):k&&(k.d(1),k=null),j[28]||j[29]?v?(v.p(j,N),N&14353&&m(v,1)):(v=M1(j),v.c(),m(v,1),v.m(i,null)):v&&(H(),g(v,1,1,()=>{v=null}),V()),j[7]?.valid===!1?$?($.p(j,N),N&128&&m($,1)):($=z1(j),$.c(),m($,1),$.m(e,f)):$&&(H(),g($,1,1,()=>{$=null}),V());let M=p;p=P(j),p===M?A[p].p(j,N):(H(),g(A[M],1,1,()=>{A[M]=null}),V(),h=A[p],h?h.p(j,N):(h=A[p]=L[p](j),h.c()),m(h,1),h.m(d,null)),j[16]?F?F.p(j,N):(F=Y1(j),F.c(),F.m(e,null)):F&&(F.d(1),F=null),(!b||N&32)&&C(e,"data-widget",j[5]),(!b||N&2)&&C(e,"data-key-path",j[1])},i(j){b||(m(a.$$.fragment,j),m(v),m($),m(h),b=!0)},o(j){g(a.$$.fragment,j),g(v),g($),g(h),b=!1},d(j){j&&w(e),k&&k.d(),E(a),v&&v.d(),$&&$.d(),A[p].d(),F&&F.d()}}}function D1(t){let e,i=t[19]("required")+"",n;return{c(){e=I("div"),n=q(i),C(e,"class","required svelte-yh1mmk")},m(s,r){y(s,e,r),O(e,n)},p(s,r){r&524288&&i!==(i=s[19]("required")+"")&&W(n,i)},d(s){s&&w(e)}}}function M1(t){let e,i;return e=new as({props:{class:"ghost iconic small",popupPosition:"bottom-right",$$slots:{popup:[l7],"start-icon":[s7]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&1074281267&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function s7(t){let e,i;return e=new we({props:{slot:"start-icon",name:"more_vert",label:t[19]("show_menu")}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&524288&&(r.label=n[19]("show_menu")),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function j1(t){let e=["markdown","string","text","list","object"].includes(t[5]),i,n,s,r=e&&R1(t);return n=new Ja({props:{keyPath:t[1],locale:t[0]}}),{c(){r&&r.c(),i=D(),T(n.$$.fragment)},m(l,o){r&&r.m(l,o),y(l,i,o),S(n,l,o),s=!0},p(l,o){o&32&&(e=["markdown","string","text","list","object"].includes(l[5])),e?r?(r.p(l,o),o&32&&m(r,1)):(r=R1(l),r.c(),m(r,1),r.m(i.parentNode,i)):r&&(H(),g(r,1,1,()=>{r=null}),V());const a={};o&2&&(a.keyPath=l[1]),o&1&&(a.locale=l[0]),n.$set(a)},i(l){s||(m(r),m(n.$$.fragment,l),s=!0)},o(l){g(r),g(n.$$.fragment,l),s=!1},d(l){l&&w(i),r&&r.d(l),E(n,l)}}}function R1(t){let e,i,n,s;e=new Ja({props:{keyPath:t[1],locale:t[0],translate:!0}});let r=t[13].length>1&&F1();return{c(){T(e.$$.fragment),i=D(),r&&r.c(),n=K()},m(l,o){S(e,l,o),y(l,i,o),r&&r.m(l,o),y(l,n,o),s=!0},p(l,o){const a={};o&2&&(a.keyPath=l[1]),o&1&&(a.locale=l[0]),e.$set(a),l[13].length>1?r?o&8192&&m(r,1):(r=F1(),r.c(),m(r,1),r.m(n.parentNode,n)):r&&(H(),g(r,1,1,()=>{r=null}),V())},i(l){s||(m(e.$$.fragment,l),m(r),s=!0)},o(l){g(e.$$.fragment,l),g(r),s=!1},d(l){l&&(w(i),w(n)),E(e,l),r&&r.d(l)}}}function F1(t){let e,i;return e=new Tn({}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function U1(t){let e,i;return e=new Tn({}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function x1(t){let e,i;return e=new Ct({props:{label:t[19]("revert_changes"),disabled:Un(t[9],t[8])}}),e.$on("click",t[26]),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&524288&&(r.label=n[19]("revert_changes")),s&768&&(r.disabled=Un(n[9],n[8])),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function r7(t){let e,i,n,s,r=t[28]&&j1(t),l=t[28]&&t[29]&&U1(),o=t[29]&&x1(t);return{c(){r&&r.c(),e=D(),l&&l.c(),i=D(),o&&o.c(),n=K()},m(a,c){r&&r.m(a,c),y(a,e,c),l&&l.m(a,c),y(a,i,c),o&&o.m(a,c),y(a,n,c),s=!0},p(a,c){a[28]?r?(r.p(a,c),c&12288&&m(r,1)):(r=j1(a),r.c(),m(r,1),r.m(e.parentNode,e)):r&&(H(),g(r,1,1,()=>{r=null}),V()),a[28]&&a[29]?l?c&14353&&m(l,1):(l=U1(),l.c(),m(l,1),l.m(i.parentNode,i)):l&&(H(),g(l,1,1,()=>{l=null}),V()),a[29]?o?(o.p(a,c),c&2065&&m(o,1)):(o=x1(a),o.c(),m(o,1),o.m(n.parentNode,n)):o&&(H(),g(o,1,1,()=>{o=null}),V())},i(a){s||(m(r),m(l),m(o),s=!0)},o(a){g(r),g(l),g(o),s=!1},d(a){a&&(w(e),w(i),w(n)),r&&r.d(a),l&&l.d(a),o&&o.d(a)}}}function l7(t){let e,i;return e=new Ci({props:{slot:"popup",$$slots:{default:[r7]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&1074281267&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function z1(t){let e,i,n,s,r,l=t[7].valueMissing&&B1(t),o=t[7].rangeUnderflow&&H1(t),a=t[7].rangeOverflow&&V1(t),c=t[7].patternMismatch&&q1(t);return{c(){e=I("div"),l&&l.c(),i=D(),o&&o.c(),n=D(),a&&a.c(),s=D(),c&&c.c(),C(e,"class","validation svelte-yh1mmk")},m(u,f){y(u,e,f),l&&l.m(e,null),O(e,i),o&&o.m(e,null),O(e,n),a&&a.m(e,null),O(e,s),c&&c.m(e,null),r=!0},p(u,f){u[7].valueMissing?l?(l.p(u,f),f&128&&m(l,1)):(l=B1(u),l.c(),m(l,1),l.m(e,i)):l&&(H(),g(l,1,1,()=>{l=null}),V()),u[7].rangeUnderflow?o?(o.p(u,f),f&128&&m(o,1)):(o=H1(u),o.c(),m(o,1),o.m(e,n)):o&&(H(),g(o,1,1,()=>{o=null}),V()),u[7].rangeOverflow?a?(a.p(u,f),f&128&&m(a,1)):(a=V1(u),a.c(),m(a,1),a.m(e,s)):a&&(H(),g(a,1,1,()=>{a=null}),V()),u[7].patternMismatch?c?(c.p(u,f),f&128&&m(c,1)):(c=q1(u),c.c(),m(c,1),c.m(e,null)):c&&(H(),g(c,1,1,()=>{c=null}),V())},i(u){r||(m(l),m(o),m(a),m(c),r=!0)},o(u){g(l),g(o),g(a),g(c),r=!1},d(u){u&&w(e),l&&l.d(),o&&o.d(),a&&a.d(),c&&c.d()}}}function B1(t){let e,i,n,s=t[19]("validation.value_missing")+"",r,l;return i=new we({props:{name:"error",label:t[19]("error")}}),{c(){e=I("div"),T(i.$$.fragment),n=D(),r=q(s),C(e,"class","svelte-yh1mmk")},m(o,a){y(o,e,a),S(i,e,null),O(e,n),O(e,r),l=!0},p(o,a){const c={};a&524288&&(c.label=o[19]("error")),i.$set(c),(!l||a&524288)&&s!==(s=o[19]("validation.value_missing")+"")&&W(r,s)},i(o){l||(m(i.$$.fragment,o),l=!0)},o(o){g(i.$$.fragment,o),l=!1},d(o){o&&w(e),E(i)}}}function H1(t){let e,i,n,s=t[19]("validation.range_underflow",{values:{min:t[2].min}})+"",r,l;return i=new we({props:{name:"error",label:t[19]("error")}}),{c(){e=I("div"),T(i.$$.fragment),n=D(),r=q(s),C(e,"class","svelte-yh1mmk")},m(o,a){y(o,e,a),S(i,e,null),O(e,n),O(e,r),l=!0},p(o,a){const c={};a&524288&&(c.label=o[19]("error")),i.$set(c),(!l||a&524292)&&s!==(s=o[19]("validation.range_underflow",{values:{min:o[2].min}})+"")&&W(r,s)},i(o){l||(m(i.$$.fragment,o),l=!0)},o(o){g(i.$$.fragment,o),l=!1},d(o){o&&w(e),E(i)}}}function V1(t){let e,i,n,s=t[19]("validation.range_overflow",{values:{max:t[2].max}})+"",r,l;return i=new we({props:{name:"error",label:t[19]("error")}}),{c(){e=I("div"),T(i.$$.fragment),n=D(),r=q(s),C(e,"class","svelte-yh1mmk")},m(o,a){y(o,e,a),S(i,e,null),O(e,n),O(e,r),l=!0},p(o,a){const c={};a&524288&&(c.label=o[19]("error")),i.$set(c),(!l||a&524292)&&s!==(s=o[19]("validation.range_overflow",{values:{max:o[2].max}})+"")&&W(r,s)},i(o){l||(m(i.$$.fragment,o),l=!0)},o(o){g(i.$$.fragment,o),l=!1},d(o){o&&w(e),E(i)}}}function q1(t){let e,i,n,s=(t[14]?.[1]??"")+"",r,l;return i=new we({props:{name:"error",label:t[19]("error")}}),{c(){e=I("div"),T(i.$$.fragment),n=D(),r=q(s),C(e,"class","svelte-yh1mmk")},m(o,a){y(o,e,a),S(i,e,null),O(e,n),O(e,r),l=!0},p(o,a){const c={};a&524288&&(c.label=o[19]("error")),i.$set(c),(!l||a&16384)&&s!==(s=(o[14]?.[1]??"")+"")&&W(r,s)},i(o){l||(m(i.$$.fragment,o),l=!0)},o(o){g(i.$$.fragment,o),l=!1},d(o){o&&w(e),E(i)}}}function o7(t){let e,i,n,s;function r(a){t[27](a)}var l=uo[t[5]];function o(a,c){let u={keyPath:a[1],locale:a[0],fieldConfig:a[2],disabled:a[10]};return a[6].currentValues[a[0]][a[1]]!==void 0&&(u.currentValue=a[6].currentValues[a[0]][a[1]]),{props:u}}return l&&(e=Zt(l,o(t)),ae.push(()=>ze(e,"currentValue",r))),{c(){e&&T(e.$$.fragment),n=K()},m(a,c){e&&S(e,a,c),y(a,n,c),s=!0},p(a,c){if(c&32&&l!==(l=uo[a[5]])){if(e){H();const u=e;g(u.$$.fragment,1,0,()=>{E(u,1)}),V()}l?(e=Zt(l,o(a)),ae.push(()=>ze(e,"currentValue",r)),T(e.$$.fragment),m(e.$$.fragment,1),S(e,n.parentNode,n)):e=null}else if(l){const u={};c&2&&(u.keyPath=a[1]),c&1&&(u.locale=a[0]),c&4&&(u.fieldConfig=a[2]),c&1024&&(u.disabled=a[10]),!i&&c&67&&(i=!0,u.currentValue=a[6].currentValues[a[0]][a[1]],He(()=>i=!1)),e.$set(u)}},i(a){s||(e&&m(e.$$.fragment,a),s=!0)},o(a){e&&g(e.$$.fragment,a),s=!1},d(a){a&&w(n),e&&E(e,a)}}}function a7(t){let e,i,n;var s=uo[t[5]];function r(l,o){return{props:{keyPath:l[1],locale:l[0],fieldConfig:l[2],currentValue:l[9],disabled:l[10]}}}return s&&(e=Zt(s,r(t))),{c(){e&&T(e.$$.fragment),i=K()},m(l,o){e&&S(e,l,o),y(l,i,o),n=!0},p(l,o){if(o&32&&s!==(s=uo[l[5]])){if(e){H();const a=e;g(a.$$.fragment,1,0,()=>{E(a,1)}),V()}s?(e=Zt(s,r(l)),T(e.$$.fragment),m(e.$$.fragment,1),S(e,i.parentNode,i)):e=null}else if(s){const a={};o&2&&(a.keyPath=l[1]),o&1&&(a.locale=l[0]),o&4&&(a.fieldConfig=l[2]),o&512&&(a.currentValue=l[9]),o&1024&&(a.disabled=l[10]),e.$set(a)}},i(l){n||(e&&m(e.$$.fragment,l),n=!0)},o(l){e&&g(e.$$.fragment,l),n=!1},d(l){l&&w(i),e&&E(e,l)}}}function c7(t){let e,i=t[19]("unsupported_widget_x",{values:{name:t[5]}})+"",n;return{c(){e=I("div"),n=q(i)},m(s,r){y(s,e,r),O(e,n)},p(s,r){r&524320&&i!==(i=s[19]("unsupported_widget_x",{values:{name:s[5]}})+"")&&W(n,i)},i:z,o:z,d(s){s&&w(e)}}}function Y1(t){let e,i=tt.parse(t[16])+"";return{c(){e=I("div"),C(e,"class","hint svelte-yh1mmk")},m(n,s){y(n,e,s),e.innerHTML=i},p(n,s){s&65536&&i!==(i=tt.parse(n[16])+"")&&(e.innerHTML=i)},d(n){n&&w(e)}}}function u7(t){let e,i,n=t[5]!=="hidden"&&(t[0]===t[4]||t[12]||t[11])&&C1(Xu(t));return{c(){n&&n.c(),e=K()},m(s,r){n&&n.m(s,r),y(s,e,r),i=!0},p(s,[r]){s[5]!=="hidden"&&(s[0]===s[4]||s[12]||s[11])?n?(n.p(Xu(s),r),r&6193&&m(n,1)):(n=C1(Xu(s)),n.c(),m(n,1),n.m(e.parentNode,e)):n&&(H(),g(n,1,1,()=>{n=null}),V())},i(s){i||(m(n),i=!0)},o(s){g(n),i=!1},d(s){s&&w(e),n&&n.d(s)}}}function f7(t,e,i){let n,s,r,l,o,a,c,u,f,d,p,h,_,b,k,v,$,L,A,P,F,j,N;U(t,Ke,x=>i(6,j=x)),U(t,pe,x=>i(19,N=x));let{locale:M}=e,{keyPath:R}=e,{fieldConfig:G}=e;const Q=()=>{hp(M,R)};function te(x){t.$$.not_equal(j.currentValues[M][R],x)&&(j.currentValues[M][R]=x,Ke.set(j))}return t.$$set=x=>{"locale"in x&&i(0,M=x.locale),"keyPath"in x&&i(1,R=x.keyPath),"fieldConfig"in x&&i(2,G=x.fieldConfig)},t.$$.update=()=>{t.$$.dirty&4&&i(18,{name:n,label:s="",hint:r="",widget:l="string",required:o=!0,i18n:a=!1,pattern:c=[]}=G,n,(i(17,s),i(2,G)),(i(16,r),i(2,G)),(i(5,l),i(2,G)),(i(15,o),i(2,G)),(i(21,a),i(2,G)),(i(14,c),i(2,G))),t.$$.dirty&32&&i(25,u=["relation","select"].includes(l)),t.$$.dirty&33554436&&i(24,f=u?G.multiple:void 0),t.$$.dirty&50331680&&i(3,d=l==="list"||u&&f),t.$$.dirty&64&&i(22,{hasLocales:p=!1,locales:h=["default"],defaultLocale:_="default"}=j.collection._i18n??{},p,(i(23,h),i(6,j)),(i(4,_),i(6,j))),t.$$.dirty&12582913&&i(13,b=p?h.filter(x=>x!==M):[]),t.$$.dirty&6291456&&i(12,k=p&&(a===!0||a==="translate")),t.$$.dirty&6291456&&i(11,v=p&&a==="duplicate"),t.$$.dirty&2097169&&i(10,$=a==="duplicate"&&M!==_),t.$$.dirty&2&&i(20,L=new RegExp(`^${jt(R)}\\.\\d+$`)),t.$$.dirty&1048651&&i(9,A=d?Object.entries(j.currentValues[M]).filter(([x])=>x.match(L)).map(([,x])=>x).filter(x=>x!==void 0):j.currentValues[M][R]),t.$$.dirty&1048651&&i(8,P=d?Object.entries(j.originalValues[M]).filter(([x])=>x.match(L)).map(([,x])=>x).filter(x=>x!==void 0):j.originalValues[M][R]),t.$$.dirty&67&&i(7,F=j.validities[M][R])},[M,R,G,d,_,l,j,F,P,A,$,v,k,b,c,o,r,s,n,N,L,a,p,h,f,u,Q,te]}class Fp extends J{constructor(e){super(),X(this,e,f7,u7,Z,{locale:0,keyPath:1,fieldConfig:2},i7)}}function G1(t,e,i){const n=t.slice();return n[5]=e[i],n}function W1(t,e){let i,n,s;return n=new Fp({props:{keyPath:e[5].name,locale:e[0],fieldConfig:e[5]}}),{key:t,first:null,c(){i=K(),T(n.$$.fragment),this.first=i},m(r,l){y(r,i,l),S(n,r,l),s=!0},p(r,l){e=r;const o={};l&2&&(o.keyPath=e[5].name),l&1&&(o.locale=e[0]),l&2&&(o.fieldConfig=e[5]),n.$set(o)},i(r){s||(m(n.$$.fragment,r),s=!0)},o(r){g(n.$$.fragment,r),s=!1},d(r){r&&w(i),E(n,r)}}}function d7(t){let e,i=[],n=new Map,s,r=ce(t[1]);const l=o=>o[5].name;for(let o=0;o<r.length;o+=1){let a=G1(t,r,o),c=l(a);n.set(c,i[o]=W1(c,a))}return{c(){e=I("div");for(let o=0;o<i.length;o+=1)i[o].c();C(e,"lang",t[0])},m(o,a){y(o,e,a);for(let c=0;c<i.length;c+=1)i[c]&&i[c].m(e,null);s=!0},p(o,[a]){a&3&&(r=ce(o[1]),H(),i=ct(i,a,l,1,o,r,n,e,at,W1,null,G1),V()),(!s||a&1)&&C(e,"lang",o[0])},i(o){if(!s){for(let a=0;a<r.length;a+=1)m(i[a]);s=!0}},o(o){for(let a=0;a<i.length;a+=1)g(i[a]);s=!1},d(o){o&&w(e);for(let a=0;a<i.length;a+=1)i[a].d()}}}function p7(t,e,i){let n,s,r,l;U(t,Ke,a=>i(4,l=a));let{locale:o}=e;return t.$$set=a=>{"locale"in a&&i(0,o=a.locale)},t.$$.update=()=>{t.$$.dirty&16&&i(2,{collection:n,collectionFile:s}=l??{},n,(i(3,s),i(4,l))),t.$$.dirty&12&&i(1,r=s?.fields??n?.fields)},[o,r,n,s,l]}class lc extends J{constructor(e){super(),X(this,e,p7,d7,Z,{locale:0})}}function m7(t){ve(t,"svelte-37f1h5",'.header.svelte-37f1h5{flex:none !important;background-color:var(--sui-tertiary-background-color)}.header.svelte-37f1h5>[role="toolbar"]{margin-right:auto;margin-left:auto;max-width:800px}.header.svelte-37f1h5>[role="toolbar"] h3{font-size:var(--sui-font-size-default)}.header.svelte-37f1h5>[role="toolbar"] button.error{color:var(--sui-error-foreground-color)}')}function K1(t,e,i){const n=t.slice();n[21]=e[i];const s=sr(n[21]);n[22]=s;const r=Object.values(n[9][n[21]]).some(({valid:l})=>!l);return n[23]=r,n}function h7(t){let e,i=(t[5]?.mode==="preview"?t[11]("preview"):t[11]("edit"))+"",n;return{c(){e=I("h3"),n=q(i)},m(s,r){y(s,e,r),O(e,n)},p(s,r){r&2080&&i!==(i=(s[5]?.mode==="preview"?s[11]("preview"):s[11]("edit"))+"")&&W(n,i)},i:z,o:z,d(s){s&&w(e)}}}function g7(t){let e,i;return e=new gd({props:{$$slots:{default:[b7]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&67116840&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function Z1(t){let e,i;function n(){return t[18](t[21])}return e=new Xl({props:{selected:t[5]?.mode==="edit"&&t[5]?.locale===t[21],class:"tertiary small "+(t[23]?"error":""),label:t[22],$$slots:{default:[_7]},$$scope:{ctx:t}}}),e.$on("click",n),{c(){T(e.$$.fragment)},m(s,r){S(e,s,r),i=!0},p(s,r){t=s;const l={};r&40&&(l.selected=t[5]?.mode==="edit"&&t[5]?.locale===t[21]),r&520&&(l.class="tertiary small "+(t[23]?"error":"")),r&8&&(l.label=t[22]),r&67111432&&(l.$$scope={dirty:r,ctx:t}),e.$set(l)},i(s){i||(m(e.$$.fragment,s),i=!0)},o(s){g(e.$$.fragment,s),i=!1},d(s){E(e,s)}}}function X1(t){let e,i;return e=new we({props:{slot:"end-icon",name:"error",label:t[11]("error")}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&2048&&(r.label=n[11]("error")),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function _7(t){let e,i,n=t[23]&&X1(t);return{c(){n&&n.c(),e=K()},m(s,r){n&&n.m(s,r),y(s,e,r),i=!0},p(s,r){s[23]?n?(n.p(s,r),r&520&&m(n,1)):(n=X1(s),n.c(),m(n,1),n.m(e.parentNode,e)):n&&(H(),g(n,1,1,()=>{n=null}),V())},i(s){i||(m(n),i=!0)},o(s){g(n),i=!1},d(s){s&&w(e),n&&n.d(s)}}}function J1(t){let e,i,n=!(t[10]?.mode==="edit"&&t[10]?.locale===t[21])&&Z1(t);return{c(){n&&n.c(),e=K()},m(s,r){n&&n.m(s,r),y(s,e,r),i=!0},p(s,r){s[10]?.mode==="edit"&&s[10]?.locale===s[21]?n&&(H(),g(n,1,1,()=>{n=null}),V()):n?(n.p(s,r),r&1032&&m(n,1)):(n=Z1(s),n.c(),m(n,1),n.m(e.parentNode,e))},i(s){i||(m(n),i=!0)},o(s){g(n),i=!1},d(s){s&&w(e),n&&n.d(s)}}}function Q1(t){let e,i;return e=new Xl({props:{selected:t[5]?.mode==="preview",class:"tertiary small",label:t[11]("preview")}}),e.$on("click",t[19]),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&32&&(r.selected=n[5]?.mode==="preview"),s&2048&&(r.label=n[11]("preview")),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function b7(t){let e,i,n,s=ce(t[3]),r=[];for(let a=0;a<s.length;a+=1)r[a]=J1(K1(t,s,a));const l=a=>g(r[a],1,1,()=>{r[a]=null});let o=t[10]?.mode==="edit"&&t[8]&&t[12].showPreview&&Q1(t);return{c(){for(let a=0;a<r.length;a+=1)r[a].c();e=D(),o&&o.c(),i=K()},m(a,c){for(let u=0;u<r.length;u+=1)r[u]&&r[u].m(a,c);y(a,e,c),o&&o.m(a,c),y(a,i,c),n=!0},p(a,c){if(c&3624){s=ce(a[3]);let u;for(u=0;u<s.length;u+=1){const f=K1(a,s,u);r[u]?(r[u].p(f,c),m(r[u],1)):(r[u]=J1(f),r[u].c(),m(r[u],1),r[u].m(e.parentNode,e))}for(H(),u=s.length;u<r.length;u+=1)l(u);V()}a[10]?.mode==="edit"&&a[8]&&a[12].showPreview?o?(o.p(a,c),c&5376&&m(o,1)):(o=Q1(a),o.c(),m(o,1),o.m(i.parentNode,i)):o&&(H(),g(o,1,1,()=>{o=null}),V())},i(a){if(!n){for(let c=0;c<s.length;c+=1)m(r[c]);m(o),n=!0}},o(a){r=r.filter(Boolean);for(let c=0;c<r.length;c+=1)g(r[c]);g(o),n=!1},d(a){a&&(w(e),w(i)),mi(r,a),o&&o.d(a)}}}function eb(t){let e,i;return e=new as({props:{class:"ghost iconic",popupPosition:"bottom-right",$$slots:{popup:[w7],"start-icon":[v7]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&67111140&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function v7(t){let e,i;return e=new we({props:{slot:"start-icon",name:"more_vert",label:t[11]("show_menu")}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&2048&&(r.label=n[11]("show_menu")),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function tb(t){let e,i,n,s,r,l,o;e=new Ja({props:{locale:t[5]?.locale,translate:!0}});let a=t[2].length>1&&nb();return s=new Ja({props:{locale:t[5]?.locale}}),l=new Tn({}),{c(){T(e.$$.fragment),i=D(),a&&a.c(),n=D(),T(s.$$.fragment),r=D(),T(l.$$.fragment)},m(c,u){S(e,c,u),y(c,i,u),a&&a.m(c,u),y(c,n,u),S(s,c,u),y(c,r,u),S(l,c,u),o=!0},p(c,u){const f={};u&32&&(f.locale=c[5]?.locale),e.$set(f),c[2].length>1?a?u&4&&m(a,1):(a=nb(),a.c(),m(a,1),a.m(n.parentNode,n)):a&&(H(),g(a,1,1,()=>{a=null}),V());const d={};u&32&&(d.locale=c[5]?.locale),s.$set(d)},i(c){o||(m(e.$$.fragment,c),m(a),m(s.$$.fragment,c),m(l.$$.fragment,c),o=!0)},o(c){g(e.$$.fragment,c),g(a),g(s.$$.fragment,c),g(l.$$.fragment,c),o=!1},d(c){c&&(w(i),w(n),w(r)),E(e,c),a&&a.d(c),E(s,c),E(l,c)}}}function nb(t){let e,i;return e=new Tn({}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function k7(t){let e,i,n,s=t[7]&&tb(t);return i=new Ct({props:{label:t[11]("revert_changes"),disabled:!t[6]}}),i.$on("click",t[20]),{c(){s&&s.c(),e=D(),T(i.$$.fragment)},m(r,l){s&&s.m(r,l),y(r,e,l),S(i,r,l),n=!0},p(r,l){r[7]?s?(s.p(r,l),l&128&&m(s,1)):(s=tb(r),s.c(),m(s,1),s.m(e.parentNode,e)):s&&(H(),g(s,1,1,()=>{s=null}),V());const o={};l&2048&&(o.label=r[11]("revert_changes")),l&64&&(o.disabled=!r[6]),i.$set(o)},i(r){n||(m(s),m(i.$$.fragment,r),n=!0)},o(r){g(s),g(i.$$.fragment,r),n=!1},d(r){r&&w(e),s&&s.d(r),E(i,r)}}}function w7(t){let e,i;return e=new Ci({props:{slot:"popup",$$slots:{default:[k7]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&67111140&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function y7(t){let e,i,n,s,r,l,o;const a=[g7,h7],c=[];function u(d,p){return d[4]?0:1}e=u(t),i=c[e]=a[e](t),s=new gn({props:{flex:!0}});let f=t[5]?.mode==="edit"&&eb(t);return{c(){i.c(),n=D(),T(s.$$.fragment),r=D(),f&&f.c(),l=K()},m(d,p){c[e].m(d,p),y(d,n,p),S(s,d,p),y(d,r,p),f&&f.m(d,p),y(d,l,p),o=!0},p(d,p){let h=e;e=u(d),e===h?c[e].p(d,p):(H(),g(c[h],1,1,()=>{c[h]=null}),V(),i=c[e],i?i.p(d,p):(i=c[e]=a[e](d),i.c()),m(i,1),i.m(n.parentNode,n)),d[5]?.mode==="edit"?f?(f.p(d,p),p&32&&m(f,1)):(f=eb(d),f.c(),m(f,1),f.m(l.parentNode,l)):f&&(H(),g(f,1,1,()=>{f=null}),V())},i(d){o||(m(i),m(s.$$.fragment,d),m(f),o=!0)},o(d){g(i),g(s.$$.fragment,d),g(f),o=!1},d(d){d&&(w(n),w(r),w(l)),c[e].d(d),E(s,d),f&&f.d(d)}}}function $7(t){let e,i,n;return i=new cs({props:{class:"secondary",$$slots:{default:[y7]},$$scope:{ctx:t}}}),{c(){e=I("div"),T(i.$$.fragment),C(e,"class","header svelte-37f1h5")},m(s,r){y(s,e,r),S(i,e,null),n=!0},p(s,[r]){const l={};r&67117052&&(l.$$scope={dirty:r,ctx:s}),i.$set(l)},i(s){n||(m(i.$$.fragment,s),n=!0)},o(s){g(i.$$.fragment,s),n=!1},d(s){s&&w(e),E(i)}}}function S7(t,e,i){let n,s,r,l,o,a,c,u,f,d,p,h,_=z,b=()=>(_(),_=Fn(F,G=>i(5,h=G)),F),k,v,$=z,L=()=>($(),$=Fn(j,G=>i(10,v=G)),j),A,P;U(t,Ke,G=>i(17,k=G)),U(t,pe,G=>i(11,A=G)),U(t,ts,G=>i(12,P=G)),t.$$.on_destroy.push(()=>_()),t.$$.on_destroy.push(()=>$());let{thisPane:F=Re(null)}=e;b();let{thatPane:j=Re(null)}=e;L();const N=G=>{Me(F,h={mode:"edit",locale:G},h),v?.mode==="preview"&&Me(j,v={mode:"preview",locale:G},v)},M=()=>{Me(F,h={mode:"preview",locale:v?.locale},h)},R=()=>{hp(h?.locale)};return t.$$set=G=>{"thisPane"in G&&b(i(0,F=G.thisPane)),"thatPane"in G&&L(i(1,j=G.thatPane))},t.$$.update=()=>{t.$$.dirty&131072&&i(16,{collection:n,collectionFile:s,currentValues:r,originalValues:l,validities:o}=k??{},n,(i(15,s),i(17,k)),(i(14,r),i(17,k)),(i(13,l),i(17,k)),(i(9,o),i(17,k))),t.$$.dirty&65536&&i(4,{hasLocales:a=!1,locales:c=["default"]}=n._i18n??{},a,(i(3,c),i(16,n),i(17,k))),t.$$.dirty&56&&i(2,u=a?c.filter(G=>G!==h?.locale):[]),t.$$.dirty&98304&&i(8,f=n?.editor?.preview!==!1&&s?.editor?.preview!==!1),t.$$.dirty&4&&i(7,d=!!u.length),t.$$.dirty&24608&&i(6,p=!Un(r[h?.locale],l[h?.locale]))},[F,j,u,c,a,h,p,d,f,o,v,A,P,l,r,s,n,k,N,M,R]}class dy extends J{constructor(e){super(),X(this,e,S7,$7,Z,{thisPane:0,thatPane:1},m7)}}function E7(t){ve(t,"svelte-t01vxl","div.svelte-t01vxl{padding:8px 16px}")}function ib(t,e,i){const n=t.slice();return n[5]=e[i],n}function sb(t,e){let i,n,s;return n=new Rp({props:{keyPath:e[5].name,locale:e[0],fieldConfig:e[5]}}),{key:t,first:null,c(){i=K(),T(n.$$.fragment),this.first=i},m(r,l){y(r,i,l),S(n,r,l),s=!0},p(r,l){e=r;const o={};l&2&&(o.keyPath=e[5].name),l&1&&(o.locale=e[0]),l&2&&(o.fieldConfig=e[5]),n.$set(o)},i(r){s||(m(n.$$.fragment,r),s=!0)},o(r){g(n.$$.fragment,r),s=!1},d(r){r&&w(i),E(n,r)}}}function T7(t){let e,i=[],n=new Map,s,r=ce(t[1]);const l=o=>o[5].name;for(let o=0;o<r.length;o+=1){let a=ib(t,r,o),c=l(a);n.set(c,i[o]=sb(c,a))}return{c(){e=I("div");for(let o=0;o<i.length;o+=1)i[o].c();C(e,"class","svelte-t01vxl")},m(o,a){y(o,e,a);for(let c=0;c<i.length;c+=1)i[c]&&i[c].m(e,null);s=!0},p(o,[a]){a&3&&(r=ce(o[1]),H(),i=ct(i,a,l,1,o,r,n,e,at,sb,null,ib),V())},i(o){if(!s){for(let a=0;a<r.length;a+=1)m(i[a]);s=!0}},o(o){for(let a=0;a<i.length;a+=1)g(i[a]);s=!1},d(o){o&&w(e);for(let a=0;a<i.length;a+=1)i[a].d()}}}function O7(t,e,i){let n,s,r,l;U(t,Ke,a=>i(4,l=a));let{locale:o}=e;return t.$$set=a=>{"locale"in a&&i(0,o=a.locale)},t.$$.update=()=>{t.$$.dirty&16&&i(2,{collection:n,collectionFile:s}=l??{},n,(i(3,s),i(4,l))),t.$$.dirty&12&&i(1,r=s?.fields??n?.fields)},[o,r,n,s,l]}class oc extends J{constructor(e){super(),X(this,e,O7,T7,Z,{locale:0},E7)}}const py=async t=>{const e=ne(ei),i=t.map(n=>{const s=e.find(r=>r.id===n);return s?Object.values(s.locales).map(({path:r})=>({slug:s.slug,path:r})):void 0}).flat(1).filter((n,s,r)=>n&&r.findIndex(l=>l.path===n.path)===s);await ne(fi).deleteFiles(i,{collection:ne(Lt).name}),ei.set(e.filter(n=>!t.includes(n.id)))};function A7(t){let e,i;return e=new we({props:{slot:"start-icon",name:"arrow_back_ios_new",label:t[13]("cancel")}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&8192&&(r.label=n[13]("cancel")),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function L7(t){let e=t[13]("editing_x",{values:{name:t[3]?`${t[4]} » ${t[3].label}`:t[11]}})+"",i;return{c(){i=q(e)},m(n,s){y(n,i,s)},p(n,s){s&10264&&e!==(e=n[13]("editing_x",{values:{name:n[3]?`${n[4]} » ${n[3].label}`:n[11]}})+"")&&W(i,e)},d(n){n&&w(i)}}}function N7(t){let e=t[13]("creating_x",{values:{name:t[11]}})+"",i;return{c(){i=q(e)},m(n,s){y(n,i,s)},p(n,s){s&10240&&e!==(e=n[13]("creating_x",{values:{name:n[11]}})+"")&&W(i,e)},d(n){n&&w(i)}}}function P7(t){let e,i;return e=new we({props:{slot:"start-icon",name:"more_vert",label:t[13]("show_menu")}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&8192&&(r.label=n[13]("show_menu")),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function rb(t){let e,i,n,s,r,l;return e=new Tn({}),n=new Ct({props:{label:t[13]("duplicate"),disabled:t[0]?.create===!1||t[2]}}),n.$on("click",t[23]),r=new Ct({props:{disabled:t[0]?.delete===!1||t[2],label:t[13]("delete")}}),r.$on("click",t[24]),{c(){T(e.$$.fragment),i=D(),T(n.$$.fragment),s=D(),T(r.$$.fragment)},m(o,a){S(e,o,a),y(o,i,a),S(n,o,a),y(o,s,a),S(r,o,a),l=!0},p(o,a){const c={};a&8192&&(c.label=o[13]("duplicate")),a&5&&(c.disabled=o[0]?.create===!1||o[2]),n.$set(c);const u={};a&5&&(u.disabled=o[0]?.delete===!1||o[2]),a&8192&&(u.label=o[13]("delete")),r.$set(u)},i(o){l||(m(e.$$.fragment,o),m(n.$$.fragment,o),m(r.$$.fragment,o),l=!0)},o(o){g(e.$$.fragment,o),g(n.$$.fragment,o),g(r.$$.fragment,o),l=!1},d(o){o&&(w(i),w(s)),E(e,o),E(n,o),E(r,o)}}}function I7(t){let e,i,n,s,r,l,o,a,c,u;e=new lh({props:{label:t[13]("show_preview"),checked:t[14].showPreview,disabled:!t[10]}}),e.$on("click",t[20]),n=new lh({props:{label:t[13]("sync_scrolling"),checked:t[14].syncScrolling,disabled:!t[10]&&Object.keys(t[1]).length===1}}),n.$on("click",t[21]),r=new Tn({}),o=new Ct({props:{label:t[13]("revert_all_changes"),disabled:!t[9]}}),o.$on("click",t[22]);let f=!t[3]&&rb(t);return{c(){T(e.$$.fragment),i=D(),T(n.$$.fragment),s=D(),T(r.$$.fragment),l=D(),T(o.$$.fragment),a=D(),f&&f.c(),c=K()},m(d,p){S(e,d,p),y(d,i,p),S(n,d,p),y(d,s,p),S(r,d,p),y(d,l,p),S(o,d,p),y(d,a,p),f&&f.m(d,p),y(d,c,p),u=!0},p(d,p){const h={};p&8192&&(h.label=d[13]("show_preview")),p&16384&&(h.checked=d[14].showPreview),p&1024&&(h.disabled=!d[10]),e.$set(h);const _={};p&8192&&(_.label=d[13]("sync_scrolling")),p&16384&&(_.checked=d[14].syncScrolling),p&1026&&(_.disabled=!d[10]&&Object.keys(d[1]).length===1),n.$set(_);const b={};p&8192&&(b.label=d[13]("revert_all_changes")),p&512&&(b.disabled=!d[9]),o.$set(b),d[3]?f&&(H(),g(f,1,1,()=>{f=null}),V()):f?(f.p(d,p),p&8&&m(f,1)):(f=rb(d),f.c(),m(f,1),f.m(c.parentNode,c))},i(d){u||(m(e.$$.fragment,d),m(n.$$.fragment,d),m(r.$$.fragment,d),m(o.$$.fragment,d),m(f),u=!0)},o(d){g(e.$$.fragment,d),g(n.$$.fragment,d),g(r.$$.fragment,d),g(o.$$.fragment,d),g(f),u=!1},d(d){d&&(w(i),w(s),w(l),w(a),w(c)),E(e,d),E(n,d),E(r,d),E(o,d),f&&f.d(d)}}}function C7(t){let e,i;return e=new Ci({props:{slot:"popup",$$slots:{default:[I7]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&1073768015&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function D7(t){let e,i,n,s,r,l,o,a,c,u;e=new De({props:{class:"ghost iconic",$$slots:{"start-icon":[A7]},$$scope:{ctx:t}}}),e.$on("click",t[19]);function f(h,_){return h[2]?N7:L7}let d=f(t),p=d(t);return r=new gn({props:{flex:!0}}),o=new as({props:{class:"ghost iconic",popupPosition:"bottom-right",$$slots:{popup:[C7],"start-icon":[P7]},$$scope:{ctx:t}}}),c=new De({props:{class:"primary",label:t[8]?t[13]("saving"):t[13](t[15]==="local"?"save":"save_and_publish"),disabled:!t[9]||t[8],keyShortcuts:"Accel+S"}}),c.$on("click",t[25]),{c(){T(e.$$.fragment),i=D(),n=I("h2"),p.c(),s=D(),T(r.$$.fragment),l=D(),T(o.$$.fragment),a=D(),T(c.$$.fragment)},m(h,_){S(e,h,_),y(h,i,_),y(h,n,_),p.m(n,null),y(h,s,_),S(r,h,_),y(h,l,_),S(o,h,_),y(h,a,_),S(c,h,_),u=!0},p(h,_){const b={};_&1073750016&&(b.$$scope={dirty:_,ctx:h}),e.$set(b),d===(d=f(h))&&p?p.p(h,_):(p.d(1),p=d(h),p&&(p.c(),p.m(n,null)));const k={};_&1073768015&&(k.$$scope={dirty:_,ctx:h}),o.$set(k);const v={};_&41216&&(v.label=h[8]?h[13]("saving"):h[13](h[15]==="local"?"save":"save_and_publish")),_&768&&(v.disabled=!h[9]||h[8]),c.$set(v)},i(h){u||(m(e.$$.fragment,h),m(r.$$.fragment,h),m(o.$$.fragment,h),m(c.$$.fragment,h),u=!0)},o(h){g(e.$$.fragment,h),g(r.$$.fragment,h),g(o.$$.fragment,h),g(c.$$.fragment,h),u=!1},d(h){h&&(w(i),w(n),w(s),w(l),w(a)),E(e,h),p.d(),E(r,h),E(o,h),E(c,h)}}}function M7(t){let e=t[13]("entry_duplicated")+"",i;return{c(){i=q(e)},m(n,s){y(n,i,s)},p(n,s){s&8192&&e!==(e=n[13]("entry_duplicated")+"")&&W(i,e)},d(n){n&&w(i)}}}function j7(t){let e=t[13]("confirm_deleting_this_entry")+"",i;return{c(){i=q(e)},m(n,s){y(n,i,s)},p(n,s){s&8192&&e!==(e=n[13]("confirm_deleting_this_entry")+"")&&W(i,e)},d(n){n&&w(i)}}}function R7(t){let e=t[13]("saving_entry.error.description")+"",i;return{c(){i=q(e)},m(n,s){y(n,i,s)},p(n,s){s&8192&&e!==(e=n[13]("saving_entry.error.description")+"")&&W(i,e)},d(n){n&&w(i)}}}function F7(t){let e,i,n,s,r,l,o,a,c,u,f;e=new cs({props:{class:"primary",$$slots:{default:[D7]},$$scope:{ctx:t}}});function d(v){t[26](v)}let p={showOk:!1,showCancel:!1,showClose:!1,closeOnBackdropClick:!0,style:"text-align:center",$$slots:{default:[M7]},$$scope:{ctx:t}};t[5]!==void 0&&(p.open=t[5]),n=new Kn({props:p}),ae.push(()=>ze(n,"open",d));function h(v){t[27](v)}let _={title:t[13]("delete_entry"),okLabel:t[13]("delete"),$$slots:{default:[j7]},$$scope:{ctx:t}};t[6]!==void 0&&(_.open=t[6]),l=new Kn({props:_}),ae.push(()=>ze(l,"open",h)),l.$on("ok",t[28]);function b(v){t[29](v)}let k={title:t[13]("saving_entry.error.title"),showCancel:!1,$$slots:{default:[R7]},$$scope:{ctx:t}};return t[7]!==void 0&&(k.open=t[7]),c=new Kn({props:k}),ae.push(()=>ze(c,"open",b)),{c(){T(e.$$.fragment),i=D(),T(n.$$.fragment),r=D(),T(l.$$.fragment),a=D(),T(c.$$.fragment)},m(v,$){S(e,v,$),y(v,i,$),S(n,v,$),y(v,r,$),S(l,v,$),y(v,a,$),S(c,v,$),f=!0},p(v,[$]){const L={};$&1073803231&&(L.$$scope={dirty:$,ctx:v}),e.$set(L);const A={};$&1073750016&&(A.$$scope={dirty:$,ctx:v}),!s&&$&32&&(s=!0,A.open=v[5],He(()=>s=!1)),n.$set(A);const P={};$&8192&&(P.title=v[13]("delete_entry")),$&8192&&(P.okLabel=v[13]("delete")),$&1073750016&&(P.$$scope={dirty:$,ctx:v}),!o&&$&64&&(o=!0,P.open=v[6],He(()=>o=!1)),l.$set(P);const F={};$&8192&&(F.title=v[13]("saving_entry.error.title")),$&1073750016&&(F.$$scope={dirty:$,ctx:v}),!u&&$&128&&(u=!0,F.open=v[7],He(()=>u=!1)),c.$set(F)},i(v){f||(m(e.$$.fragment,v),m(n.$$.fragment,v),m(l.$$.fragment,v),m(c.$$.fragment,v),f=!0)},o(v){g(e.$$.fragment,v),g(n.$$.fragment,v),g(l.$$.fragment,v),g(c.$$.fragment,v),f=!1},d(v){v&&(w(i),w(r),w(a)),E(e,v),E(n,v),E(l,v),E(c,v)}}}function U7(t,e,i){let n,s,r,l,o,a,c,u,f,d,p,h,_,b;U(t,Ke,ue=>i(18,p=ue)),U(t,pe,ue=>i(13,h=ue)),U(t,ts,ue=>i(14,_=ue)),U(t,_l,ue=>i(15,b=ue));let k=!1,v=!1,$=!1,L=!1;const A=async()=>{i(5,k=!0),zt(`/collections/${n?.name}/new`,{replaceState:!0,notifyChange:!1}),Me(Ke,p={...p,isNew:!0,originalEntry:void 0},p),await Rd(1e3),i(5,k=!1)},P=()=>{Yr(`/collections/${n?.name}`)},F=()=>{ts.update(ue=>({...ue,showPreview:!ue.showPreview}))},j=()=>{ts.update(ue=>({...ue,syncScrolling:!ue.syncScrolling}))},N=()=>{hp()},M=()=>{A()},R=()=>{i(6,v=!0)},G=async()=>{try{i(8,L=!0),await xP(),Yr(`/collections/${n?.name}`)}catch(ue){ue.message!=="validation_failed"&&(i(7,$=!0),console.error(ue))}finally{i(8,L=!1)}};function Q(ue){k=ue,i(5,k)}function te(ue){v=ue,i(6,v)}const x=async()=>{await py([l?.id]),Yr(`/collections/${n?.name}`)};function Y(ue){$=ue,i(7,$)}return t.$$.update=()=>{t.$$.dirty&262144&&i(0,{collection:n,collectionFile:s,isNew:r,originalEntry:l,currentValues:o,originalValues:a}=p??{},n,(i(3,s),i(18,p)),(i(2,r),i(18,p)),(i(12,l),i(18,p)),(i(1,o),i(18,p)),(i(17,a),i(18,p))),t.$$.dirty&1&&i(4,c=n?.label||n?.name),t.$$.dirty&17&&i(11,u=n?.label_singular||c),t.$$.dirty&9&&i(10,f=n?.editor?.preview!==!1&&s?.editor?.preview!==!1),t.$$.dirty&131078&&i(9,d=r||!Un(o,a))},[n,o,r,s,c,k,v,$,L,d,f,u,l,h,_,b,A,a,p,P,F,j,N,M,R,G,Q,te,x,Y]}class x7 extends J{constructor(e){super(),X(this,e,U7,F7,Z,{})}}function z7(t){ve(t,"svelte-10tip2a",'@charset "UTF-8";.editor.svelte-10tip2a.svelte-10tip2a{position:fixed;inset:0;z-index:100;display:flex;flex-direction:column;background-color:var(--sui-primary-background-color)}.editor.svelte-10tip2a .cols.svelte-10tip2a{flex:auto;overflow:hidden;display:flex}.editor.svelte-10tip2a .cols.svelte-10tip2a>div{display:flex;flex-direction:column;min-width:480px;transition:all 500ms}.editor.svelte-10tip2a .cols.svelte-10tip2a>div:first-child:not(:last-child){border-width:0 1px 0 0;border-color:var(--sui-primary-border-color)}.editor.svelte-10tip2a .cols.svelte-10tip2a>div>.content{flex:auto;overflow-y:auto;scroll-behavior:auto;overscroll-behavior-y:contain}.editor.svelte-10tip2a .cols.svelte-10tip2a>[data-mode="edit"]{flex:1 1}.editor.svelte-10tip2a .cols.svelte-10tip2a>[data-mode="preview"]{flex:2 1}')}function lb(t){let e,i,n,s=t[4]&&ob(t),r=t[3]&&ab(t);return{c(){s&&s.c(),e=D(),r&&r.c(),i=K()},m(l,o){s&&s.m(l,o),y(l,e,o),r&&r.m(l,o),y(l,i,o),n=!0},p(l,o){l[4]?s?(s.p(l,o),o&16&&m(s,1)):(s=ob(l),s.c(),m(s,1),s.m(e.parentNode,e)):s&&(H(),g(s,1,1,()=>{s=null}),V()),l[3]?r?(r.p(l,o),o&8&&m(r,1)):(r=ab(l),r.c(),m(r,1),r.m(i.parentNode,i)):r&&(H(),g(r,1,1,()=>{r=null}),V())},i(l){n||(m(s),m(r),n=!0)},o(l){g(s),g(r),n=!1},d(l){l&&(w(e),w(i)),s&&s.d(l),r&&r.d(l)}}}function ob(t){let e,i;return e=new _n({props:{"data-mode":t[4].mode,"data-locale":t[4].locale,$$slots:{default:[B7]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&16&&(r["data-mode"]=n[4].mode),s&16&&(r["data-locale"]=n[4].locale),s&8388627&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function B7(t){let e,i,n,s,r,l,o;e=new dy({props:{thisPane:Ys,thatPane:Gs}});var a=t[4].mode==="preview"?oc:lc;function c(u,f){return{props:{locale:u[4].locale}}}return a&&(s=Zt(a,c(t))),{c(){T(e.$$.fragment),i=D(),n=I("div"),s&&T(s.$$.fragment),C(n,"class","content")},m(u,f){S(e,u,f),y(u,i,f),y(u,n,f),s&&S(s,n,null),t[11](n),r=!0,l||(o=je(n,"wheel",t[12],{passive:!0,capture:!0}),l=!0)},p(u,f){if(f&16&&a!==(a=u[4].mode==="preview"?oc:lc)){if(s){H();const d=s;g(d.$$.fragment,1,0,()=>{E(d,1)}),V()}a?(s=Zt(a,c(u)),T(s.$$.fragment),m(s.$$.fragment,1),S(s,n,null)):s=null}else if(a){const d={};f&16&&(d.locale=u[4].locale),s.$set(d)}},i(u){r||(m(e.$$.fragment,u),s&&m(s.$$.fragment,u),r=!0)},o(u){g(e.$$.fragment,u),s&&g(s.$$.fragment,u),r=!1},d(u){u&&(w(i),w(n)),E(e,u),s&&E(s),t[11](null),l=!1,o()}}}function ab(t){let e,i;return e=new _n({props:{"data-mode":t[3].mode,"data-locale":t[3].locale,$$slots:{default:[H7]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&8&&(r["data-mode"]=n[3].mode),s&8&&(r["data-locale"]=n[3].locale),s&8388619&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function H7(t){let e,i,n,s,r,l,o;e=new dy({props:{thisPane:Gs,thatPane:Ys}});var a=t[3].mode==="preview"?oc:lc;function c(u,f){return{props:{locale:u[3].locale}}}return a&&(s=Zt(a,c(t))),{c(){T(e.$$.fragment),i=D(),n=I("div"),s&&T(s.$$.fragment),C(n,"class","content")},m(u,f){S(e,u,f),y(u,i,f),y(u,n,f),s&&S(s,n,null),t[13](n),r=!0,l||(o=je(n,"wheel",t[14],{passive:!0,capture:!0}),l=!0)},p(u,f){if(f&8&&a!==(a=u[3].mode==="preview"?oc:lc)){if(s){H();const d=s;g(d.$$.fragment,1,0,()=>{E(d,1)}),V()}a?(s=Zt(a,c(u)),T(s.$$.fragment),m(s.$$.fragment,1),S(s,n,null)):s=null}else if(a){const d={};f&8&&(d.locale=u[3].locale),s.$set(d)}},i(u){r||(m(e.$$.fragment,u),s&&m(s.$$.fragment,u),r=!0)},o(u){g(e.$$.fragment,u),s&&g(s.$$.fragment,u),r=!1},d(u){u&&(w(i),w(n)),E(e,u),s&&E(s),t[13](null),l=!1,o()}}}function V7(t){let e,i,n,s,r;i=new x7({});let l=t[2]&&lb(t);return{c(){e=I("div"),T(i.$$.fragment),n=D(),s=I("div"),l&&l.c(),C(s,"class","cols svelte-10tip2a"),C(e,"class","editor svelte-10tip2a")},m(o,a){y(o,e,a),S(i,e,null),O(e,n),O(e,s),l&&l.m(s,null),r=!0},p(o,[a]){o[2]?l?(l.p(o,a),a&4&&m(l,1)):(l=lb(o),l.c(),m(l,1),l.m(s,null)):l&&(H(),g(l,1,1,()=>{l=null}),V())},i(o){r||(m(i.$$.fragment,o),m(l),r=!0)},o(o){g(i.$$.fragment,o),g(l),r=!1},d(o){o&&w(e),E(i),l&&l.d()}}}function q7(t,e,i){let n,s,r,l,o,a,c,u,f,d,p,h;U(t,Ke,M=>i(9,f=M)),U(t,Gs,M=>i(3,d=M)),U(t,Ys,M=>i(4,p=M)),U(t,ts,M=>i(10,h=M));let _,b,k=!1;const v=()=>{const M=o?.[n.name];if(!Array.isArray(M))return;const[R,G]=M;if(R?.locale&&!c.includes(R.locale)||G?.locale&&!c.includes(G.locale)||(!r||!u)&&(R?.mode==="preview"||G?.mode==="preview"))throw new Error("Saved panes are invalid");Me(Ys,p=R,p),Me(Gs,d=G,d)},$=()=>{if(!k)try{v();return}catch{}finally{k=!0}if(!r||!u){const M=a?c.filter(R=>R!==p?.locale):[];Me(Ys,p.mode="edit",p),Me(Gs,d=M.length?{mode:"edit",locale:M[0]}:null,d)}else Me(Ys,p.mode="edit",p),Me(Gs,d={mode:"preview",locale:p?.locale},d)},L=()=>{n&&ts.update(M=>({...M,paneStates:{...M.paneStates??{},[n.name]:[p,d]}}))},A=(M,R)=>{!l||!R||window.requestAnimationFrame(()=>{const{x:G,y:Q}=M.getBoundingClientRect(),te=document.elementsFromPoint(G+80,Q).find(mt=>mt.matches("[data-key-path]"));if(!te)return;const{keyPath:x}=te.dataset,{top:Y,height:ue}=te.getBoundingClientRect(),Fe=(Q-Y)/ue,lt=R.querySelector(`[data-key-path="${CSS.escape(x)}"]`);Fe<0||Fe>1||!lt||(R.scrollTop=lt.offsetTop-Q+lt.clientHeight*Fe)})};on(()=>()=>{Me(Ke,f=null,f)});function P(M){ae[M?"unshift":"push"](()=>{_=M,i(0,_)})}const F=()=>{A(_,b)};function j(M){ae[M?"unshift":"push"](()=>{b=M,i(1,b)})}const N=()=>{A(b,_)};return t.$$.update=()=>{t.$$.dirty&512&&i(2,{collection:n,collectionFile:s}=f??{},n,(i(8,s),i(9,f))),t.$$.dirty&1024&&i(7,{showPreview:r,syncScrolling:l,paneStates:o}=h,r),t.$$.dirty&4&&({hasLocales:a=!1,locales:c=["default"]}=n?._i18n??{}),t.$$.dirty&260&&i(6,u=n?.editor?.preview!==!1&&s?.editor?.preview!==!1),t.$$.dirty&192&&$(),t.$$.dirty&24&&L(),t.$$.dirty&1&&_&&i(0,_.scrollTop=0,_),t.$$.dirty&2&&b&&i(1,b.scrollTop=0,b)},[_,b,n,d,p,A,u,r,s,f,h,P,F,j,N]}class Y7 extends J{constructor(e){super(),X(this,e,q7,V7,Z,{},z7)}}const od="sveltia-cms.contents-view",my=["title","name","date","author","description"],zn=Re({}),G7=(t,e,i)=>{if(e==="upper")return String(t).toUpperCase();if(e==="lower")return String(t).toLowerCase();if(e.startsWith("date")&&i){const[,n]=e.match(/^date\('(.*?)'\)$/),{time_format:s,picker_utc:r=!1}=i,l=s===!1;return(r||l&&t?.match(/^\d{4}-[01]\d-[0-3]\d$/)||l&&t.match(/T00:00(?::00)?(?:\.000)?Z$/)?fe.utc(t):fe(t)).format(n)}if(e.startsWith("default")){const[,n]=e.match(/^default\('?(.*?)'?\)$/);return t??n}if(e.startsWith("ternary")){const[,n,s]=e.match(/^ternary\('?(.*?)'?,\s*'?(.*?)'?\)$/);return t?n:s}if(e.startsWith("truncate")){const[,n,s=""]=e.match(/^truncate\((\d+)(?:,\s*'?(.*?)'?)?\)$/),r=Number(n),l=String(t).substring(0,r);return String(t).length>r?`${l}${s}`:l}return t},cb=(t,e,i,n)=>{const{name:s,folder:r,identifier_field:l,summary:o,_i18n:{defaultLocale:a="default"}}=t;if(!o)return i[l]||i.title||i.name||i.label||e.slug;const{locales:c,slug:u,commitDate:f,commitAuthor:d}=e,{path:p}=c[n],h=Zn(i),_=b=>{const[k,...v]=b.split(/\s*\|\s*/);let $=(()=>b==="slug"?u:b==="dirname"?Ai(p.replace(/[^/]+$/,"").replace(r,"")):b==="filename"?p.split("/").pop().split(".").shift():b==="extension"?p.split("/").pop().split(".").pop():b==="commit_date"?f??"":b==="commit_author"?d?.name||d?.login||d?.email:Fd({collectionName:s,valueMap:h,keyPath:k,locale:a}))();if(!$)return"";if(!v.length){if($ instanceof Date){const{year:A,month:P,day:F}=Pc({date:$});return`${A}-${P}-${F}`}return String($)}const L=gi({collectionName:s,valueMap:h,keyPath:k});return v.forEach(A=>{$=G7($,A,L)}),String($)};return o.replace(/{{(.+?)}}/g,(b,k)=>_(k)).trim()},W7=(t,{key:e,order:i}={})=>{if(!e||!i)return t;const n=[...t],{defaultLocale:s="default"}=ne(Lt)._i18n,r={slug:String,commit_author:String,commit_date:Date}[e]||(n.length?Oa(n[0],s,e)?.constructor:String)||String,l=Object.fromEntries(n.map(o=>[o.slug,Oa(o,s,e)]));return n.sort((o,a)=>{const c=l[o.slug],u=l[a.slug];return c===void 0||u===void 0?0:r===String?c.localeCompare(u):r===Date?Number(c)-Number(u):c-u}),i==="descending"&&n.reverse(),n},K7=(t,{field:e,pattern:i}={field:void 0,pattern:void 0})=>{if(!e)return t;const{defaultLocale:n="default"}=ne(Lt)._i18n,s=typeof i=="string"?new RegExp(i):void 0;return t.filter(r=>{const l=Oa(r,n,e);return l===void 0?!1:s?!!String(l).match(s):l===i})},Z7=(t,{field:e,pattern:i}={field:void 0,pattern:void 0})=>{if(!e)return t.length?[{name:"*",entries:t}]:[];const n=ne(zn).sort,{defaultLocale:s="default"}=ne(Lt)._i18n,r=typeof i=="string"?new RegExp(i):void 0,l={},o=ne(pe)("other");t.forEach(c=>{const u=Oa(c,s,e);let f;u!==void 0&&(r?[f=o]=String(u).match(r)??[]:f=u),f in l||(l[f]=[]),l[f].push(c)});const a=Object.entries(l).map(([c,u])=>({name:c,entries:u})).sort(({name:c},{name:u})=>c.localeCompare(u));return n?.key===e&&n?.order==="descending"&&a.reverse(),a},ac=Re({},t=>{(async()=>{try{t(await Xt.get(od)??{})}catch{}})()}),X7=(t,e)=>["name","commit_author","commit_date"].includes(e)?ne(pe)(`sort_keys.${e}`):e.includes(".")?e.split(".").map((i,n,s)=>{if(i.match(/^\d+$/))return;const r=s.slice(0,n+1).join(".");return gi({collectionName:t.name,keyPath:r})?.label||i}).filter(Boolean).join(" – "):t.fields?.find(({name:i})=>i===e)?.label||e,J7=vn([Lt,ei,Vt],([t,e],i)=>{const{files:n,sortable_fields:s}=t??{};if(n){i([]);return}const{commitAuthor:r,commitDate:l}=e?.[0]??{},o=(Array.isArray(s)?s:my).filter(a=>!!gi({collectionName:t.name,keyPath:a}));r&&!o.includes("author")&&o.push("commit_author"),l&&!o.includes("date")&&o.push("commit_date"),i(o.map(a=>({key:a,label:X7(t,a)})))}),wl=vn([ei,Lt],([t,e],i)=>{i(t&&e?$o(e.name):[])}),hy=vn([wl,zn],([t,e],i)=>{let n=[...t];!n.length||n[0].fileName?i([]):(n=W7(n,e?.sort),n=K7(n,e?.filter),i(Z7(n,e?.group)))});wl.subscribe(t=>{ws.set([]),ne(dt).devModeEnabled&&console.info("listedEntries",t)});Lt.subscribe(t=>{if(!t)return;ne(dt).devModeEnabled&&console.info("selectedCollection",t);const{name:e,identifier_field:i,fields:n=[],_i18n:{defaultLocale:s="default"}}=t;if(Ys.set({mode:"edit",locale:s}),Gs.set({mode:"preview",locale:s}),!n.length)return;const r={type:"list",sort:{key:i||n.find(o=>my.includes(o.name))?.name,order:"ascending"}},l=ne(ac)[e]??r;Un(l,ne(zn))||zn.set(l)});zn.subscribe(t=>{const{name:e}=ne(Lt)??{},i=ne(ac)[e]??{};Un(t,i)||ac.update(n=>({...n,[e]:t}))});ac.subscribe(t=>{!t||!Object.keys(t).length||(async()=>{try{Un(t,await Xt.get(od))||await Xt.set(od,t)}catch{}})()});function Q7(t){let e,i;return e=new I0({props:{checked:t[5].includes(t[0])}}),e.$on("change",t[6]),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&33&&(r.checked=n[5].includes(n[0])),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function ub(t){let e,i;return e=new Mn({props:{class:"image",$$slots:{default:[i9]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&531&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function e9(t){return{c:z,m:z,p:z,i:z,o:z,d:z}}function t9(t){let e,i;return e=new bi({props:{src:t[8],cover:!0}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&19&&(r.src=n[8]),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function n9(t){return{c:z,m:z,p:z,i:z,o:z,d:z}}function i9(t){let e,i,n,s={ctx:t,current:null,token:null,hasCatch:!1,pending:n9,then:t9,catch:e9,value:8,blocks:[,,,]};return Ts(i=ss(t[1][t[4]?.name],t[0]),s),{c(){e=K(),s.block.c()},m(r,l){y(r,e,l),s.block.m(r,s.anchor=l),s.mount=()=>e.parentNode,s.anchor=e,n=!0},p(r,l){t=r,s.ctx=t,l&19&&i!==(i=ss(t[1][t[4]?.name],t[0]))&&Ts(i,s)||cc(s,t,l)},i(r){n||(m(s.block),n=!0)},o(r){for(let l=0;l<3;l+=1){const o=s.blocks[l];g(o)}n=!1},d(r){r&&w(e),s.block.d(r),s.token=null,s=null}}}function s9(t){let e,i=cb(t[3],t[0],t[1],t[2])+"",n;return{c(){e=I("span"),n=q(i)},m(s,r){y(s,e,r),O(e,n)},p(s,r){r&15&&i!==(i=cb(s[3],s[0],s[1],s[2])+"")&&W(n,i)},d(s){s&&w(e)}}}function r9(t){let e,i,n,s,r;e=new Mn({props:{class:"checkbox",$$slots:{default:[Q7]},$$scope:{ctx:t}}});let l=t[4]&&ub(t);return s=new Mn({props:{class:"title",$$slots:{default:[s9]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment),i=D(),l&&l.c(),n=D(),T(s.$$.fragment)},m(o,a){S(e,o,a),y(o,i,a),l&&l.m(o,a),y(o,n,a),S(s,o,a),r=!0},p(o,a){const c={};a&545&&(c.$$scope={dirty:a,ctx:o}),e.$set(c),o[4]?l?(l.p(o,a),a&16&&m(l,1)):(l=ub(o),l.c(),m(l,1),l.m(n.parentNode,n)):l&&(H(),g(l,1,1,()=>{l=null}),V());const u={};a&527&&(u.$$scope={dirty:a,ctx:o}),s.$set(u)},i(o){r||(m(e.$$.fragment,o),m(l),m(s.$$.fragment,o),r=!0)},o(o){g(e.$$.fragment,o),g(l),g(s.$$.fragment,o),r=!1},d(o){o&&(w(i),w(n)),E(e,o),l&&l.d(o),E(s,o)}}}function l9(t){let e,i;return e=new vo({props:{"aria-selected":t[5].includes(t[0]),$$slots:{default:[r9]},$$scope:{ctx:t}}}),e.$on("click",t[7]),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,[s]){const r={};s&33&&(r["aria-selected"]=n[5].includes(n[0])),s&575&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function o9(t,e,i){let n,s,r;U(t,Lt,f=>i(3,s=f)),U(t,ws,f=>i(5,r=f));let{entry:l}=e,{content:o}=e,{locale:a}=e;const c=({detail:{checked:f}})=>{ws.update(d=>{const p=d.indexOf(l);return d&&p===-1&&d.push(l),!f&&p>-1&&d.splice(p,1),d})},u=()=>{zt(`/collections/${s.name}/entries/${l.slug}`)};return t.$$set=f=>{"entry"in f&&i(0,l=f.entry),"content"in f&&i(1,o=f.content),"locale"in f&&i(2,a=f.locale)},t.$$.update=()=>{t.$$.dirty&8&&i(4,n=s.fields?.find(({widget:f})=>f==="image"))},[l,o,a,s,n,r,c,u]}class a9 extends J{constructor(e){super(),X(this,e,o9,l9,Z,{entry:0,content:1,locale:2})}}function c9(t){ve(t,"svelte-1hh20n2",".list-container.svelte-1hh20n2{padding:16px}h3.svelte-1hh20n2{padding:8px;color:var(--sui-secondary-foreground-color);background-color:var(--sui-secondary-background-color)}h3.svelte-1hh20n2+.basic-grid-view .table{margin:16px 0}")}function fb(t,e,i){const n=t.slice();return n[8]=e[i].name,n[9]=e[i].entries,n}function db(t,e,i){const n=t.slice();n[12]=e[i];const s=n[12];n[13]=s.locales;const r=n[7]in n[13]?n[7]:Object.keys(n[13])[0];n[14]=r;const l=n[13][n[14]];return n[15]=l.content,n}function u9(t){const e=t.slice(),i=e[2]._i18n;return e[7]=i.defaultLocale!==void 0?i.defaultLocale:"default",e}function f9(t){let e,i;return e=new Ln({props:{$$slots:{default:[p9]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&262176&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function d9(t){let e,i,n,s;const r=[g9,h9,m9],l=[];function o(c,u){return c[1].length?0:c[4].length?1:2}function a(c,u){return u===0?u9(c):c}return e=o(t),i=l[e]=r[e](a(t,e)),{c(){i.c(),n=K()},m(c,u){l[e].m(c,u),y(c,n,u),s=!0},p(c,u){let f=e;e=o(c),e===f?l[e].p(a(c,e),u):(H(),g(l[f],1,1,()=>{l[f]=null}),V(),i=l[e],i?i.p(a(c,e),u):(i=l[e]=r[e](a(c,e)),i.c()),m(i,1),i.m(n.parentNode,n))},i(c){s||(m(i),s=!0)},o(c){g(i),s=!1},d(c){c&&w(n),l[e].d(c)}}}function p9(t){let e,i=t[5]("collection_not_found")+"",n;return{c(){e=I("span"),n=q(i)},m(s,r){y(s,e,r),O(e,n)},p(s,r){r&32&&i!==(i=s[5]("collection_not_found")+"")&&W(n,i)},d(s){s&&w(e)}}}function m9(t){let e,i;return e=new Ln({props:{$$slots:{default:[b9]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&262180&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function h9(t){let e,i;return e=new Ln({props:{$$slots:{default:[v9]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&262176&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function g9(t){let e=[],i=new Map,n,s,r=ce(t[0]);const l=o=>o[8];for(let o=0;o<r.length;o+=1){let a=fb(t,r,o),c=l(a);i.set(c,e[o]=gb(c,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();n=K()},m(o,a){for(let c=0;c<e.length;c+=1)e[c]&&e[c].m(o,a);y(o,n,a),s=!0},p(o,a){a&13&&(r=ce(o[0]),H(),e=ct(e,a,l,1,o,r,i,n.parentNode,at,gb,n,fb),V())},i(o){if(!s){for(let a=0;a<r.length;a+=1)m(e[a]);s=!0}},o(o){for(let a=0;a<e.length;a+=1)g(e[a]);s=!1},d(o){o&&w(n);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function _9(t){let e,i;return e=new we({props:{slot:"start-icon",name:"edit"}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p:z,i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function b9(t){let e,i=t[5]("no_entries_created")+"",n,s,r,l;return r=new De({props:{class:"primary",disabled:!t[2].create,label:t[5]("create_new_entry"),$$slots:{"start-icon":[_9]},$$scope:{ctx:t}}}),r.$on("click",t[6]),{c(){e=I("span"),n=q(i),s=D(),T(r.$$.fragment)},m(o,a){y(o,e,a),O(e,n),y(o,s,a),S(r,o,a),l=!0},p(o,a){(!l||a&32)&&i!==(i=o[5]("no_entries_created")+"")&&W(n,i);const c={};a&4&&(c.disabled=!o[2].create),a&32&&(c.label=o[5]("create_new_entry")),a&262144&&(c.$$scope={dirty:a,ctx:o}),r.$set(c)},i(o){l||(m(r.$$.fragment,o),l=!0)},o(o){g(r.$$.fragment,o),l=!1},d(o){o&&(w(e),w(s)),E(r,o)}}}function v9(t){let e,i=t[5]("no_entries_found")+"",n;return{c(){e=I("span"),n=q(i)},m(s,r){y(s,e,r),O(e,n)},p(s,r){r&32&&i!==(i=s[5]("no_entries_found")+"")&&W(n,i)},d(s){s&&w(e)}}}function pb(t){let e,i=t[8]+"",n;return{c(){e=I("h3"),n=q(i),C(e,"class","svelte-1hh20n2")},m(s,r){y(s,e,r),O(e,n)},p(s,r){r&1&&i!==(i=s[8]+"")&&W(n,i)},d(s){s&&w(e)}}}function mb(t){let e,i;return e=new a9({props:{entry:t[12],content:t[15],locale:t[14]}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&1&&(r.entry=n[12]),s&5&&(r.content=n[15]),s&5&&(r.locale=n[14]),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function hb(t,e){let i,n,s,r=e[15]&&mb(e);return{key:t,first:null,c(){i=K(),r&&r.c(),n=K(),this.first=i},m(l,o){y(l,i,o),r&&r.m(l,o),y(l,n,o),s=!0},p(l,o){e=l,e[15]?r?(r.p(e,o),o&5&&m(r,1)):(r=mb(e),r.c(),m(r,1),r.m(n.parentNode,n)):r&&(H(),g(r,1,1,()=>{r=null}),V())},i(l){s||(m(r),s=!0)},o(l){g(r),s=!1},d(l){l&&(w(i),w(n)),r&&r.d(l)}}}function k9(t){let e=[],i=new Map,n,s,r=ce(t[9]);const l=o=>o[12].slug;for(let o=0;o<r.length;o+=1){let a=db(t,r,o),c=l(a);i.set(c,e[o]=hb(c,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();n=K()},m(o,a){for(let c=0;c<e.length;c+=1)e[c]&&e[c].m(o,a);y(o,n,a),s=!0},p(o,a){a&5&&(r=ce(o[9]),H(),e=ct(e,a,l,1,o,r,i,n.parentNode,at,hb,n,db),V())},i(o){if(!s){for(let a=0;a<r.length;a+=1)m(e[a]);s=!0}},o(o){for(let a=0;a<e.length;a+=1)g(e[a]);s=!1},d(o){o&&w(n);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function w9(t){let e,i,n,s,r=t[8]!=="*"&&pb(t);var l=t[3].type==="grid"?Za:ir;function o(a,c){return{props:{$$slots:{default:[k9]},$$scope:{ctx:a}}}}return l&&(i=Zt(l,o(t))),{c(){r&&r.c(),e=D(),i&&T(i.$$.fragment),n=D()},m(a,c){r&&r.m(a,c),y(a,e,c),i&&S(i,a,c),y(a,n,c),s=!0},p(a,c){if(a[8]!=="*"?r?r.p(a,c):(r=pb(a),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null),c&8&&l!==(l=a[3].type==="grid"?Za:ir)){if(i){H();const u=i;g(u.$$.fragment,1,0,()=>{E(u,1)}),V()}l?(i=Zt(l,o(a)),T(i.$$.fragment),m(i.$$.fragment,1),S(i,n.parentNode,n)):i=null}else if(l){const u={};c&262149&&(u.$$scope={dirty:c,ctx:a}),i.$set(u)}},i(a){s||(i&&m(i.$$.fragment,a),s=!0)},o(a){i&&g(i.$$.fragment,a),s=!1},d(a){a&&(w(e),w(n)),r&&r.d(a),i&&E(i,a)}}}function gb(t,e){let i,n,s;return n=new _n({props:{$$slots:{default:[w9]},$$scope:{ctx:e}}}),{key:t,first:null,c(){i=K(),T(n.$$.fragment),this.first=i},m(r,l){y(r,i,l),S(n,r,l),s=!0},p(r,l){e=r;const o={};l&262157&&(o.$$scope={dirty:l,ctx:e}),n.$set(o)},i(r){s||(m(n.$$.fragment,r),s=!0)},o(r){g(n.$$.fragment,r),s=!1},d(r){r&&w(i),E(n,r)}}}function y9(t){let e,i,n,s;const r=[d9,f9],l=[];function o(a,c){return a[2]?0:1}return i=o(t),n=l[i]=r[i](t),{c(){e=I("div"),n.c(),C(e,"class","list-container svelte-1hh20n2")},m(a,c){y(a,e,c),l[i].m(e,null),s=!0},p(a,[c]){let u=i;i=o(a),i===u?l[i].p(a,c):(H(),g(l[u],1,1,()=>{l[u]=null}),V(),n=l[i],n?n.p(a,c):(n=l[i]=r[i](a),n.c()),m(n,1),n.m(e,null))},i(a){s||(m(n),s=!0)},o(a){g(n),s=!1},d(a){a&&w(e),l[i].d()}}}function $9(t,e,i){let n,s,r,l,o,a;U(t,hy,u=>i(0,s=u)),U(t,Lt,u=>i(2,r=u)),U(t,zn,u=>i(3,l=u)),U(t,wl,u=>i(4,o=u)),U(t,pe,u=>i(5,a=u));const c=()=>{zt(`/collections/${r.name}/new`)};return t.$$.update=()=>{t.$$.dirty&1&&i(1,n=s.map(({entries:u})=>u).flat(1))},[s,n,r,l,o,a,c]}class _b extends J{constructor(e){super(),X(this,e,$9,y9,Z,{},c9)}}function S9(t){ve(t,"svelte-x06t7k",".list-container.svelte-x06t7k{padding:16px}")}function bb(t,e,i){const n=t.slice();return n[3]=e[i].name,n[4]=e[i].label,n}function E9(t){let e,i;return e=new Ln({props:{$$slots:{default:[O9]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&130&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function T9(t){let e,i;return e=new ir({props:{$$slots:{default:[N9]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&129&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function O9(t){let e,i=t[1]("no_files_found")+"",n;return{c(){e=I("span"),n=q(i)},m(s,r){y(s,e,r),O(e,n)},p(s,r){r&2&&i!==(i=s[1]("no_files_found")+"")&&W(n,i)},d(s){s&&w(e)}}}function A9(t){let e=t[4]+"",i;return{c(){i=q(e)},m(n,s){y(n,i,s)},p(n,s){s&1&&e!==(e=n[4]+"")&&W(i,e)},d(n){n&&w(i)}}}function L9(t){let e,i,n;return e=new Mn({props:{class:"title",$$slots:{default:[A9]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment),i=D()},m(s,r){S(e,s,r),y(s,i,r),n=!0},p(s,r){const l={};r&129&&(l.$$scope={dirty:r,ctx:s}),e.$set(l)},i(s){n||(m(e.$$.fragment,s),n=!0)},o(s){g(e.$$.fragment,s),n=!1},d(s){s&&w(i),E(e,s)}}}function vb(t,e){let i,n,s;function r(){return e[2](e[3])}return n=new vo({props:{$$slots:{default:[L9]},$$scope:{ctx:e}}}),n.$on("click",r),{key:t,first:null,c(){i=K(),T(n.$$.fragment),this.first=i},m(l,o){y(l,i,o),S(n,l,o),s=!0},p(l,o){e=l;const a={};o&129&&(a.$$scope={dirty:o,ctx:e}),n.$set(a)},i(l){s||(m(n.$$.fragment,l),s=!0)},o(l){g(n.$$.fragment,l),s=!1},d(l){l&&w(i),E(n,l)}}}function N9(t){let e=[],i=new Map,n,s,r=ce(t[0].files);const l=o=>o[3];for(let o=0;o<r.length;o+=1){let a=bb(t,r,o),c=l(a);i.set(c,e[o]=vb(c,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();n=K()},m(o,a){for(let c=0;c<e.length;c+=1)e[c]&&e[c].m(o,a);y(o,n,a),s=!0},p(o,a){a&1&&(r=ce(o[0].files),H(),e=ct(e,a,l,1,o,r,i,n.parentNode,at,vb,n,bb),V())},i(o){if(!s){for(let a=0;a<r.length;a+=1)m(e[a]);s=!0}},o(o){for(let a=0;a<e.length;a+=1)g(e[a]);s=!1},d(o){o&&w(n);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function P9(t){let e,i,n,s;const r=[T9,E9],l=[];function o(a,c){return a[0].files?.length?0:1}return i=o(t),n=l[i]=r[i](t),{c(){e=I("div"),n.c(),C(e,"class","list-container svelte-x06t7k")},m(a,c){y(a,e,c),l[i].m(e,null),s=!0},p(a,[c]){let u=i;i=o(a),i===u?l[i].p(a,c):(H(),g(l[u],1,1,()=>{l[u]=null}),V(),n=l[i],n?n.p(a,c):(n=l[i]=r[i](a),n.c()),m(n,1),n.m(e,null))},i(a){s||(m(n),s=!0)},o(a){g(n),s=!1},d(a){a&&w(e),l[i].d()}}}function I9(t,e,i){let n,s;return U(t,Lt,l=>i(0,n=l)),U(t,pe,l=>i(1,s=l)),[n,s,l=>{zt(`/collections/${n.name}/entries/${l}`)}]}class kb extends J{constructor(e){super(),X(this,e,I9,P9,Z,{},S9)}}function wb(t,e,i){const n=t.slice();return n[5]=e[i].name,n[6]=e[i].label,n[7]=e[i].icon,n[8]=e[i].hide!==void 0?e[i].hide:!1,n}function yb(t){let e,i;function n(){return t[4](t[5])}return e=new ni({props:{label:t[6]||t[5],selected:t[2].name===t[5],$$slots:{"start-icon":[C9]},$$scope:{ctx:t}}}),e.$on("click",n),{c(){T(e.$$.fragment)},m(s,r){S(e,s,r),i=!0},p(s,r){t=s;const l={};r&1&&(l.label=t[6]||t[5]),r&5&&(l.selected=t[2].name===t[5]),r&2049&&(l.$$scope={dirty:r,ctx:t}),e.$set(l)},i(s){i||(m(e.$$.fragment,s),i=!0)},o(s){g(e.$$.fragment,s),i=!1},d(s){E(e,s)}}}function C9(t){let e,i;return e=new we({props:{slot:"start-icon",name:t[7]||"edit_note"}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&1&&(r.name=n[7]||"edit_note"),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function $b(t,e){let i,n,s,r=!e[8]&&yb(e);return{key:t,first:null,c(){i=K(),r&&r.c(),n=K(),this.first=i},m(l,o){y(l,i,o),r&&r.m(l,o),y(l,n,o),s=!0},p(l,o){e=l,e[8]?r&&(H(),g(r,1,1,()=>{r=null}),V()):r?(r.p(e,o),o&1&&m(r,1)):(r=yb(e),r.c(),m(r,1),r.m(n.parentNode,n))},i(l){s||(m(r),s=!0)},o(l){g(r),s=!1},d(l){l&&(w(i),w(n)),r&&r.d(l)}}}function D9(t){let e=[],i=new Map,n,s,r=ce(t[0]);const l=o=>o[5];for(let o=0;o<r.length;o+=1){let a=wb(t,r,o),c=l(a);i.set(c,e[o]=$b(c,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();n=K()},m(o,a){for(let c=0;c<e.length;c+=1)e[c]&&e[c].m(o,a);y(o,n,a),s=!0},p(o,a){a&5&&(r=ce(o[0]),H(),e=ct(e,a,l,1,o,r,i,n.parentNode,at,$b,n,wb),V())},i(o){if(!s){for(let a=0;a<r.length;a+=1)m(e[a]);s=!0}},o(o){for(let a=0;a<e.length;a+=1)g(e[a]);s=!1},d(o){o&&w(n);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function M9(t){let e,i,n=t[1]("collections")+"",s,r,l,o;return l=new _o({props:{$$slots:{default:[D9]},$$scope:{ctx:t}}}),{c(){e=I("section"),i=I("h2"),s=q(n),r=D(),T(l.$$.fragment)},m(a,c){y(a,e,c),O(e,i),O(i,s),O(e,r),S(l,e,null),o=!0},p(a,c){(!o||c&2)&&n!==(n=a[1]("collections")+"")&&W(s,n);const u={};c&2053&&(u.$$scope={dirty:c,ctx:a}),l.$set(u)},i(a){o||(m(l.$$.fragment,a),o=!0)},o(a){g(l.$$.fragment,a),o=!1},d(a){a&&w(e),E(l)}}}function j9(t){let e,i;return e=new _n({props:{class:"primary-sidebar",$$slots:{default:[M9]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,[s]){const r={};s&2055&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function R9(t,e,i){let n,s,r,l;U(t,vt,a=>i(3,s=a)),U(t,pe,a=>i(1,r=a)),U(t,Lt,a=>i(2,l=a));const o=a=>{zt(`/collections/${a}`)};return t.$$.update=()=>{t.$$.dirty&8&&i(0,n=s.collections.filter(({hide:a})=>!a))},[n,r,l,s,o]}class F9 extends J{constructor(e){super(),X(this,e,R9,j9,Z,{})}}function U9(t){let e=t[2]("confirm_deleting_selected_entries",{values:{number:t[1].length}})+"",i;return{c(){i=q(e)},m(n,s){y(n,i,s)},p(n,s){s&6&&e!==(e=n[2]("confirm_deleting_selected_entries",{values:{number:n[1].length}})+"")&&W(i,e)},d(n){n&&w(i)}}}function x9(t){let e=t[2]("confirm_deleting_all_entries")+"",i;return{c(){i=q(e)},m(n,s){y(n,i,s)},p(n,s){s&4&&e!==(e=n[2]("confirm_deleting_all_entries")+"")&&W(i,e)},d(n){n&&w(i)}}}function z9(t){let e=t[2]("confirm_deleting_selected_entry")+"",i;return{c(){i=q(e)},m(n,s){y(n,i,s)},p(n,s){s&4&&e!==(e=n[2]("confirm_deleting_selected_entry")+"")&&W(i,e)},d(n){n&&w(i)}}}function B9(t){let e;function i(r,l){return r[1].length===1?z9:r[1].length===r[3].length?x9:U9}let n=i(t),s=n(t);return{c(){s.c(),e=K()},m(r,l){s.m(r,l),y(r,e,l)},p(r,l){n===(n=i(r))&&s?s.p(r,l):(s.d(1),s=n(r),s&&(s.c(),s.m(e.parentNode,e)))},d(r){r&&w(e),s.d(r)}}}function H9(t){let e,i,n;function s(l){t[4](l)}let r={title:t[1].length===1?t[2]("delete_entry"):t[2]("delete_entries"),okLabel:t[2]("delete"),$$slots:{default:[B9]},$$scope:{ctx:t}};return t[0]!==void 0&&(r.open=t[0]),e=new Kn({props:r}),ae.push(()=>ze(e,"open",s)),e.$on("ok",t[5]),{c(){T(e.$$.fragment)},m(l,o){S(e,l,o),n=!0},p(l,[o]){const a={};o&6&&(a.title=l[1].length===1?l[2]("delete_entry"):l[2]("delete_entries")),o&4&&(a.okLabel=l[2]("delete")),o&78&&(a.$$scope={dirty:o,ctx:l}),!i&&o&1&&(i=!0,a.open=l[0],He(()=>i=!1)),e.$set(a)},i(l){n||(m(e.$$.fragment,l),n=!0)},o(l){g(e.$$.fragment,l),n=!1},d(l){E(e,l)}}}function V9(t,e,i){let n,s,r;U(t,ws,c=>i(1,n=c)),U(t,pe,c=>i(2,s=c)),U(t,wl,c=>i(3,r=c));let{open:l=!1}=e;function o(c){l=c,i(0,l)}const a=()=>{py(n.map(({id:c})=>c))};return t.$$set=c=>{"open"in c&&i(0,l=c.open)},[l,n,s,r,o,a]}class q9 extends J{constructor(e){super(),X(this,e,V9,H9,Z,{open:0})}}function Y9(t){ve(t,"svelte-90fm2w",".description.svelte-90fm2w{flex:auto;font-size:var(--sui-font-size-small);opacity:0.8;overflow:hidden;text-overflow:ellipsis}")}function Sb(t){let e,i;return e=new cs({props:{class:"primary",$$slots:{default:[K9]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&9214&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function Eb(t){let e,i,n,s;return e=new De({props:{class:"secondary",label:t[8]("delete"),disabled:!t[9].length||!t[2],$$slots:{"start-icon":[G9]},$$scope:{ctx:t}}}),e.$on("click",t[10]),n=new De({props:{class:"primary",disabled:!t[3],label:t[8]("create"),keyShortcuts:"Accel+E",$$slots:{"start-icon":[W9]},$$scope:{ctx:t}}}),n.$on("click",t[11]),{c(){T(e.$$.fragment),i=D(),T(n.$$.fragment)},m(r,l){S(e,r,l),y(r,i,l),S(n,r,l),s=!0},p(r,l){const o={};l&256&&(o.label=r[8]("delete")),l&516&&(o.disabled=!r[9].length||!r[2]),l&8192&&(o.$$scope={dirty:l,ctx:r}),e.$set(o);const a={};l&8&&(a.disabled=!r[3]),l&256&&(a.label=r[8]("create")),l&8192&&(a.$$scope={dirty:l,ctx:r}),n.$set(a)},i(r){s||(m(e.$$.fragment,r),m(n.$$.fragment,r),s=!0)},o(r){g(e.$$.fragment,r),g(n.$$.fragment,r),s=!1},d(r){r&&w(i),E(e,r),E(n,r)}}}function G9(t){let e,i;return e=new we({props:{slot:"start-icon",name:"delete"}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p:z,i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function W9(t){let e,i;return e=new we({props:{slot:"start-icon",name:"edit"}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p:z,i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function K9(t){let e,i=(t[6]??"")+"",n,s,r,l=(t[5]??"")+"",o,a,c,u,f=!t[4]&&Eb(t);return{c(){e=I("h2"),n=q(i),s=D(),r=I("div"),o=q(l),a=D(),f&&f.c(),c=K(),C(r,"class","description svelte-90fm2w")},m(d,p){y(d,e,p),O(e,n),y(d,s,p),y(d,r,p),O(r,o),y(d,a,p),f&&f.m(d,p),y(d,c,p),u=!0},p(d,p){(!u||p&64)&&i!==(i=(d[6]??"")+"")&&W(n,i),(!u||p&32)&&l!==(l=(d[5]??"")+"")&&W(o,l),d[4]?f&&(H(),g(f,1,1,()=>{f=null}),V()):f?(f.p(d,p),p&16&&m(f,1)):(f=Eb(d),f.c(),m(f,1),f.m(c.parentNode,c))},i(d){u||(m(f),u=!0)},o(d){g(f),u=!1},d(d){d&&(w(e),w(s),w(r),w(a),w(c)),f&&f.d(d)}}}function Z9(t){let e,i,n,s,r=t[0]&&Sb(t);function l(a){t[12](a)}let o={};return t[1]!==void 0&&(o.open=t[1]),i=new q9({props:o}),ae.push(()=>ze(i,"open",l)),{c(){r&&r.c(),e=D(),T(i.$$.fragment)},m(a,c){r&&r.m(a,c),y(a,e,c),S(i,a,c),s=!0},p(a,[c]){a[0]?r?(r.p(a,c),c&1&&m(r,1)):(r=Sb(a),r.c(),m(r,1),r.m(e.parentNode,e)):r&&(H(),g(r,1,1,()=>{r=null}),V());const u={};!n&&c&2&&(n=!0,u.open=a[1],He(()=>n=!1)),i.$set(u)},i(a){s||(m(r),m(i.$$.fragment,a),s=!0)},o(a){g(r),g(i.$$.fragment,a),s=!1},d(a){a&&w(e),r&&r.d(a),E(i,a)}}}function X9(t,e,i){let n,s,r,l,o,a,c,u,f;U(t,Lt,b=>i(0,c=b)),U(t,pe,b=>i(8,u=b)),U(t,ws,b=>i(9,f=b));let d=!1;const p=()=>{i(1,d=!0)},h=()=>{zt(`/collections/${n}/new`)};function _(b){d=b,i(1,d)}return t.$$.update=()=>{t.$$.dirty&1&&i(7,{name:n,label:s,description:r,files:l,create:o=!1,delete:a=!0}=c??{},n,(i(6,s),i(0,c)),(i(5,r),i(0,c)),(i(4,l),i(0,c)),(i(3,o),i(0,c)),(i(2,a),i(0,c)))},[c,d,a,o,l,r,s,n,u,f,p,h,_]}class J9 extends J{constructor(e){super(),X(this,e,X9,Z9,Z,{},Y9)}}function Tb(t){let e,i;return e=new _n({props:{class:"secondary-sidebar",$$slots:{default:[eF]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&538&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function Q9(t){let e,i;return e=new jp({props:{assets:t[4].filter(t[6])}}),e.$on("select",t[7]),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&18&&(r.assets=n[4].filter(n[6])),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function eF(t){let e,i;return e=new Bc({props:{multiple:!0,$$slots:{default:[Q9]},$$scope:{ctx:t}}}),e.$on("select",t[8]),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&530&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function tF(t){let e=t[0].startsWith("/")&&t[2]?.showMedia,i,n,s=e&&Tb(t);return{c(){s&&s.c(),i=K()},m(r,l){s&&s.m(r,l),y(r,i,l),n=!0},p(r,[l]){l&5&&(e=r[0].startsWith("/")&&r[2]?.showMedia),e?s?(s.p(r,l),l&5&&m(s,1)):(s=Tb(r),s.c(),m(s,1),s.m(i.parentNode,i)):s&&(H(),g(s,1,1,()=>{s=null}),V())},i(r){n||(m(s),n=!0)},o(r){g(s),n=!1},d(r){r&&w(i),s&&s.d(r)}}}function nF(t,e,i){let n,s,r,l,o,a;U(t,Lt,d=>i(5,r=d)),U(t,zn,d=>i(2,l=d)),U(t,Cn,d=>i(3,o=d)),U(t,Qt,d=>i(4,a=d));const c=({folder:d})=>s===d,u=({detail:{asset:d}})=>{zt(`/assets/${d.path}`)},f=({detail:{files:d}})=>{Me(Cn,o={folder:s,files:d},o)};return t.$$.update=()=>{t.$$.dirty&32&&i(0,n=r.media_folder??""),t.$$.dirty&1&&i(1,s=Ai(n))},[n,s,l,o,a,r,c,u,f]}class iF extends J{constructor(e){super(),X(this,e,nF,tF,Z,{})}}function Ob(t,e,i){const n=t.slice();return n[9]=e[i].label,n[10]=e[i].field,n[11]=e[i].pattern,n}function sF(t){let e,i;return e=new we({props:{slot:"end-icon",name:"arrow_drop_down"}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p:z,i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function Ab(t){let e,i;function n(){return t[8](t[10],t[11])}return e=new bo({props:{label:t[9],checked:t[6].group?.field===t[10]&&t[6].group?.pattern===t[11]}}),e.$on("click",n),{c(){T(e.$$.fragment)},m(s,r){S(e,s,r),i=!0},p(s,r){t=s;const l={};r&16&&(l.label=t[9]),r&80&&(l.checked=t[6].group?.field===t[10]&&t[6].group?.pattern===t[11]),e.$set(l)},i(s){i||(m(e.$$.fragment,s),i=!0)},o(s){g(e.$$.fragment,s),i=!1},d(s){E(e,s)}}}function rF(t){let e,i,n,s;e=new bo({props:{label:t[3]||t[5]("sort_keys.none"),checked:!t[6].group}}),e.$on("click",t[7]);let r=ce(t[4]),l=[];for(let a=0;a<r.length;a+=1)l[a]=Ab(Ob(t,r,a));const o=a=>g(l[a],1,1,()=>{l[a]=null});return{c(){T(e.$$.fragment),i=D();for(let a=0;a<l.length;a+=1)l[a].c();n=K()},m(a,c){S(e,a,c),y(a,i,c);for(let u=0;u<l.length;u+=1)l[u]&&l[u].m(a,c);y(a,n,c),s=!0},p(a,c){const u={};if(c&40&&(u.label=a[3]||a[5]("sort_keys.none")),c&64&&(u.checked=!a[6].group),e.$set(u),c&84){r=ce(a[4]);let f;for(f=0;f<r.length;f+=1){const d=Ob(a,r,f);l[f]?(l[f].p(d,c),m(l[f],1)):(l[f]=Ab(d),l[f].c(),m(l[f],1),l[f].m(n.parentNode,n))}for(H(),f=r.length;f<l.length;f+=1)o(f);V()}},i(a){if(!s){m(e.$$.fragment,a);for(let c=0;c<r.length;c+=1)m(l[c]);s=!0}},o(a){g(e.$$.fragment,a),l=l.filter(Boolean);for(let c=0;c<l.length;c+=1)g(l[c]);s=!1},d(a){a&&(w(i),w(n)),E(e,a),mi(l,a)}}}function lF(t){let e,i;return e=new Ci({props:{slot:"popup",$$slots:{default:[rF]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&16508&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function oF(t){let e,i;return e=new as({props:{class:"ghost",label:t[0]||t[5]("group_by"),disabled:t[1],$$slots:{popup:[lF],"end-icon":[sF]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,[s]){const r={};s&33&&(r.label=n[0]||n[5]("group_by")),s&2&&(r.disabled=n[1]),s&16508&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function aF(t,e,i){let n,s,r=z,l=()=>(r(),r=Fn(c,h=>i(6,s=h)),c);U(t,pe,h=>i(5,n=h)),t.$$.on_destroy.push(()=>r());let{label:o=""}=e,{disabled:a=!1}=e,{currentView:c=Re({})}=e;l();let{noneLabel:u=""}=e,{groups:f=[]}=e;const d=()=>{c.update(h=>({...h,group:void 0}))},p=(h,_)=>{c.update(b=>({...b,group:{field:h,pattern:_}}))};return t.$$set=h=>{"label"in h&&i(0,o=h.label),"disabled"in h&&i(1,a=h.disabled),"currentView"in h&&l(i(2,c=h.currentView)),"noneLabel"in h&&i(3,u=h.noneLabel),"groups"in h&&i(4,f=h.groups)},[o,a,c,u,f,n,s,d,p]}class cF extends J{constructor(e){super(),X(this,e,aF,oF,Z,{label:0,disabled:1,currentView:2,noneLabel:3,groups:4})}}function Lb(t){let e,i;return e=new cs({props:{class:"secondary",$$slots:{default:[fF]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&16895&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function Nb(t){let e,i;return e=new fw({props:{disabled:!t[1],currentView:zn,filters:t[0].view_filters}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&2&&(r.disabled=!n[1]),s&1&&(r.filters=n[0].view_filters),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function Pb(t){let e,i;return e=new cF({props:{disabled:!t[1],currentView:zn,groups:t[0].view_groups}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&2&&(r.disabled=!n[1]),s&1&&(r.groups=n[0].view_groups),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function uF(t){let e,i;return e=new we({props:{slot:"start-icon",name:"photo_library",label:t[6]("show_assets")}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&64&&(r.label=n[6]("show_assets")),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function fF(t){let e,i,n,s,r,l,o,a,c,u,f,d,p,h,_,b;e=new De({props:{class:"ghost",disabled:t[5].length===t[4].length,label:t[6]("select_all")}}),e.$on("click",t[11]),n=new De({props:{class:"ghost",disabled:!t[5].length,label:t[6]("clear_selection")}}),n.$on("click",t[12]),r=new gn({props:{flex:!0}}),o=new dw({props:{disabled:!t[1]||!t[7].length,currentView:zn,fields:t[7]}});let k=t[0].view_filters?.length&&Nb(t),v=t[0].view_groups?.length&&Pb(t);return f=new mp({props:{disabled:!t[2]||!t[3],currentView:zn}}),p=new Tn({}),_=new De({props:{class:"ghost iconic",disabled:!t[2]||!t[0].media_folder,pressed:!!t[8]?.showMedia,$$slots:{"start-icon":[uF]},$$scope:{ctx:t}}}),_.$on("click",t[13]),{c(){T(e.$$.fragment),i=D(),T(n.$$.fragment),s=D(),T(r.$$.fragment),l=D(),T(o.$$.fragment),a=D(),k&&k.c(),c=D(),v&&v.c(),u=D(),T(f.$$.fragment),d=D(),T(p.$$.fragment),h=D(),T(_.$$.fragment)},m($,L){S(e,$,L),y($,i,L),S(n,$,L),y($,s,L),S(r,$,L),y($,l,L),S(o,$,L),y($,a,L),k&&k.m($,L),y($,c,L),v&&v.m($,L),y($,u,L),S(f,$,L),y($,d,L),S(p,$,L),y($,h,L),S(_,$,L),b=!0},p($,L){const A={};L&48&&(A.disabled=$[5].length===$[4].length),L&64&&(A.label=$[6]("select_all")),e.$set(A);const P={};L&32&&(P.disabled=!$[5].length),L&64&&(P.label=$[6]("clear_selection")),n.$set(P);const F={};L&130&&(F.disabled=!$[1]||!$[7].length),L&128&&(F.fields=$[7]),o.$set(F),$[0].view_filters?.length?k?(k.p($,L),L&1&&m(k,1)):(k=Nb($),k.c(),m(k,1),k.m(c.parentNode,c)):k&&(H(),g(k,1,1,()=>{k=null}),V()),$[0].view_groups?.length?v?(v.p($,L),L&1&&m(v,1)):(v=Pb($),v.c(),m(v,1),v.m(u.parentNode,u)):v&&(H(),g(v,1,1,()=>{v=null}),V());const j={};L&12&&(j.disabled=!$[2]||!$[3]),f.$set(j);const N={};L&5&&(N.disabled=!$[2]||!$[0].media_folder),L&256&&(N.pressed=!!$[8]?.showMedia),L&16448&&(N.$$scope={dirty:L,ctx:$}),_.$set(N)},i($){b||(m(e.$$.fragment,$),m(n.$$.fragment,$),m(r.$$.fragment,$),m(o.$$.fragment,$),m(k),m(v),m(f.$$.fragment,$),m(p.$$.fragment,$),m(_.$$.fragment,$),b=!0)},o($){g(e.$$.fragment,$),g(n.$$.fragment,$),g(r.$$.fragment,$),g(o.$$.fragment,$),g(k),g(v),g(f.$$.fragment,$),g(p.$$.fragment,$),g(_.$$.fragment,$),b=!1},d($){$&&(w(i),w(s),w(l),w(a),w(c),w(u),w(d),w(h)),E(e,$),E(n,$),E(r,$),E(o,$),k&&k.d($),v&&v.d($),E(f,$),E(p,$),E(_,$)}}}function dF(t){let e,i,n=t[0].folder&&Lb(t);return{c(){n&&n.c(),e=K()},m(s,r){n&&n.m(s,r),y(s,e,r),i=!0},p(s,[r]){s[0].folder?n?(n.p(s,r),r&1&&m(n,1)):(n=Lb(s),n.c(),m(n,1),n.m(e.parentNode,e)):n&&(H(),g(n,1,1,()=>{n=null}),V())},i(s){i||(m(n),i=!0)},o(s){g(n),i=!1},d(s){s&&w(e),n&&n.d(s)}}}function pF(t,e,i){let n,s,r,l,o,a,c,u,f,d,p;U(t,wl,k=>i(9,o=k)),U(t,Lt,k=>i(0,a=k)),U(t,hy,k=>i(10,c=k)),U(t,ws,k=>i(5,u=k)),U(t,pe,k=>i(6,f=k)),U(t,J7,k=>i(7,d=k)),U(t,zn,k=>i(8,p=k));const h=()=>{Me(ws,u=n,u)},_=()=>{Me(ws,u=[],u)},b=()=>{zn.update(k=>({...k,showMedia:!p?.showMedia}))};return t.$$.update=()=>{t.$$.dirty&1024&&i(4,n=c.map(({entries:k})=>k).flat(1)),t.$$.dirty&1&&i(3,s=a.fields?.find(({widget:k})=>k==="image")),t.$$.dirty&512&&i(2,r=!!o.length),t.$$.dirty&512&&i(1,l=o.length>1)},[a,l,r,s,n,u,f,d,p,o,c,h,_,b]}class mF extends J{constructor(e){super(),X(this,e,pF,dF,Z,{})}}function hF(t){let e,i;return e=new F9({props:{slot:"primary_sidebar"}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p:z,i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function gF(t){let e,i;return e=new J9({props:{slot:"primary_toolbar"}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p:z,i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function _F(t){let e,i;return e=new mF({props:{slot:"secondary_toolbar"}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p:z,i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function bF(t){let e,i,n;var s=t[0].files?kb:_b;function r(l,o){return{props:{slot:"main"}}}return s&&(e=Zt(s,r())),{c(){e&&T(e.$$.fragment),i=K()},m(l,o){e&&S(e,l,o),y(l,i,o),n=!0},p(l,o){if(o&1&&s!==(s=l[0].files?kb:_b)){if(e){H();const a=e;g(a.$$.fragment,1,0,()=>{E(a,1)}),V()}s?(e=Zt(s,r()),T(e.$$.fragment),m(e.$$.fragment,1),S(e,i.parentNode,i)):e=null}},i(l){n||(e&&m(e.$$.fragment,l),n=!0)},o(l){e&&g(e.$$.fragment,l),n=!1},d(l){l&&w(i),e&&E(e,l)}}}function vF(t){let e,i;return e=new iF({props:{slot:"secondary_sidebar"}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p:z,i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function Ib(t){let e,i;return e=new Y7({}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function kF(t){let e,i,n,s,r,l;e=new Oo({props:{class:"content",$$slots:{secondary_sidebar:[vF],main:[bF],secondary_toolbar:[_F],primary_toolbar:[gF],primary_sidebar:[hF]},$$scope:{ctx:t}}});let o=t[1]&&Ib();return{c(){T(e.$$.fragment),i=D(),o&&o.c(),n=K()},m(a,c){S(e,a,c),y(a,i,c),o&&o.m(a,c),y(a,n,c),s=!0,r||(l=je(window,"hashchange",t[3]),r=!0)},p(a,[c]){const u={};c&33&&(u.$$scope={dirty:c,ctx:a}),e.$set(u),a[1]?o?c&2&&m(o,1):(o=Ib(),o.c(),m(o,1),o.m(n.parentNode,n)):o&&(H(),g(o,1,1,()=>{o=null}),V())},i(a){s||(m(e.$$.fragment,a),m(o),s=!0)},o(a){g(e.$$.fragment,a),g(o),s=!1},d(a){a&&(w(i),w(n)),E(e,a),o&&o.d(a),r=!1,l()}}}function wF(t,e,i){let n,s,r;U(t,wl,a=>i(4,n=a)),U(t,Lt,a=>i(0,s=a)),U(t,Ke,a=>i(1,r=a));const l=()=>{const{path:a,params:c}=Eo(),u=a.match(/^\/collections\/([^/]+)(?:\/(new|entries))?(?:\/(.+?))?$/);if(!u)return;const[,f,d,p]=u,h=f?_i(f):void 0;if(h&&!h.hide&&s!==h&&Me(Lt,s=h,s),Me(Ke,r=null,r),!d)return;const{name:_,files:b,_i18n:{hasLocales:k,locales:v}}=s;if(b){if(d==="entries"&&p){const $=xd(_,p),L=b.find(A=>A.name===p);$?Zo($):L&&Zo({collectionName:_,fileName:L.name,slug:L.name,locales:Object.fromEntries((k?v:["default"]).map(A=>[A,{}]))})}}else if(d==="new"&&!p&&s.create&&Zo({collectionName:_},c),d==="entries"&&p){const $=n.find(({slug:L})=>L===p);$&&Zo($)}};return on(()=>{l()}),[s,r,l,()=>{l()}]}class yF extends J{constructor(e){super(),X(this,e,wF,kF,Z,{})}}function $F(t){ve(t,"svelte-1e8uhc8","p.svelte-1e8uhc8{margin:0 0 8px}")}function SF(t){let e,i=bn.sanitize(t[7]("prefs.languages.translator.description",{values:{service:t[3],homeHref:`href="${t[2]}"`,apiKeyHref:`href="${t[1]}"`}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})+"",n,s,r,l;return r=new Hn({props:{spellcheck:"false","aria-label":t[7]("prefs.languages.translator.field_label",{values:{service:t[3]}})}}),r.$on("input",t[10]),{c(){e=I("p"),n=D(),s=I("div"),T(r.$$.fragment),C(e,"class","svelte-1e8uhc8")},m(o,a){y(o,e,a),e.innerHTML=i,y(o,n,a),y(o,s,a),S(r,s,null),l=!0},p(o,a){(!l||a&142)&&i!==(i=bn.sanitize(o[7]("prefs.languages.translator.description",{values:{service:o[3],homeHref:`href="${o[2]}"`,apiKeyHref:`href="${o[1]}"`}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})+"")&&(e.innerHTML=i);const c={};a&136&&(c["aria-label"]=o[7]("prefs.languages.translator.field_label",{values:{service:o[3]}})),r.$set(c)},i(o){l||(m(r.$$.fragment,o),l=!0)},o(o){g(r.$$.fragment,o),l=!1},d(o){o&&(w(e),w(n),w(s)),E(r)}}}function EF(t){let e,i,n;function s(l){t[11](l)}let r={showOk:!1,$$slots:{default:[SF]},$$scope:{ctx:t}};return t[5]!==void 0&&(r.open=t[5]),e=new Kn({props:r}),ae.push(()=>ze(e,"open",s)),e.$on("cancel",t[12]),{c(){T(e.$$.fragment)},m(l,o){S(e,l,o),n=!0},p(l,[o]){const a={};o&8703&&(a.$$scope={dirty:o,ctx:l}),!i&&o&32&&(i=!0,a.open=l[5],He(()=>i=!1)),e.$set(a)},i(l){n||(m(e.$$.fragment,l),n=!0)},o(l){g(e.$$.fragment,l),n=!1},d(l){E(e,l)}}}function TF(t,e,i){let n,s,r,l,o,a,c,u,f,d;U(t,Xa,b=>i(9,a=b)),U(t,Vl,b=>i(5,c=b)),U(t,ql,b=>i(6,u=b)),U(t,pe,b=>i(7,f=b)),U(t,dt,b=>i(8,d=b));const p=b=>{const k=b.target.value.trim();o&&k.match(o)&&(Me(dt,d.apiKeys||={},d),Me(dt,d.apiKeys[n]=k,d),Me(Vl,c=!1,c),u&&(gw(...u),Me(ql,u=void 0,u)))};function h(b){c=b,Vl.set(c)}const _=()=>{Me(ql,u=void 0,u)};return t.$$.update=()=>{t.$$.dirty&512&&i(4,{serviceId:n,serviceLabel:s,developerURL:r,apiKeyURL:l,apiKeyPattern:o}=a??{},n,(i(3,s),i(9,a)),(i(2,r),i(9,a)),(i(1,l),i(9,a)),(i(0,o),i(9,a)))},[o,l,r,s,n,c,u,f,d,a,p,h,_]}class OF extends J{constructor(e){super(),X(this,e,TF,EF,Z,{},$F)}}function AF(t){ve(t,"svelte-svim08",".row.svelte-svim08.svelte-svim08{display:flex;align-items:center;gap:16px;padding:8px 0;border-top:1px solid var(--sui-secondary-border-color)}.row.svelte-svim08.svelte-svim08:last-child{border-bottom:1px solid var(--sui-secondary-border-color)}.row.svelte-svim08 .feature.svelte-svim08{flex:auto}.row.svelte-svim08 .key.svelte-svim08{display:flex;gap:8px}kbd.svelte-svim08.svelte-svim08{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 LF(t){let e,i,n=t[2]("keyboard_shortcuts.search")+"",s,r,l,o,a,c,u,f,d,p,h=t[2]("keyboard_shortcuts.create_entry")+"",_,b,k,v,$,L,A,P,F,j,N=t[2]("keyboard_shortcuts.save_entry")+"",M,R,G,Q,te,x,Y;return{c(){e=I("div"),i=I("div"),s=q(n),r=D(),l=I("div"),o=I("kbd"),a=q(t[1]),c=D(),u=I("kbd"),u.textContent="F",f=D(),d=I("div"),p=I("div"),_=q(h),b=D(),k=I("div"),v=I("kbd"),$=q(t[1]),L=D(),A=I("kbd"),A.textContent="E",P=D(),F=I("div"),j=I("div"),M=q(N),R=D(),G=I("div"),Q=I("kbd"),te=q(t[1]),x=D(),Y=I("kbd"),Y.textContent="S",C(i,"class","feature svelte-svim08"),C(o,"class","svelte-svim08"),C(u,"class","svelte-svim08"),C(l,"class","key svelte-svim08"),C(e,"class","row svelte-svim08"),C(p,"class","feature svelte-svim08"),C(v,"class","svelte-svim08"),C(A,"class","svelte-svim08"),C(k,"class","key svelte-svim08"),C(d,"class","row svelte-svim08"),C(j,"class","feature svelte-svim08"),C(Q,"class","svelte-svim08"),C(Y,"class","svelte-svim08"),C(G,"class","key svelte-svim08"),C(F,"class","row svelte-svim08")},m(ue,Fe){y(ue,e,Fe),O(e,i),O(i,s),O(e,r),O(e,l),O(l,o),O(o,a),O(l,c),O(l,u),y(ue,f,Fe),y(ue,d,Fe),O(d,p),O(p,_),O(d,b),O(d,k),O(k,v),O(v,$),O(k,L),O(k,A),y(ue,P,Fe),y(ue,F,Fe),O(F,j),O(j,M),O(F,R),O(F,G),O(G,Q),O(Q,te),O(G,x),O(G,Y)},p(ue,Fe){Fe&4&&n!==(n=ue[2]("keyboard_shortcuts.search")+"")&&W(s,n),Fe&2&&W(a,ue[1]),Fe&4&&h!==(h=ue[2]("keyboard_shortcuts.create_entry")+"")&&W(_,h),Fe&2&&W($,ue[1]),Fe&4&&N!==(N=ue[2]("keyboard_shortcuts.save_entry")+"")&&W(M,N),Fe&2&&W(te,ue[1])},d(ue){ue&&(w(e),w(f),w(d),w(P),w(F))}}}function NF(t){let e,i,n;function s(l){t[3](l)}let r={title:t[2]("help.keyboard_shortcuts"),showOk:!1,showCancel:!1,showClose:!0,$$slots:{default:[LF]},$$scope:{ctx:t}};return t[0]!==void 0&&(r.open=t[0]),e=new Kn({props:r}),ae.push(()=>ze(e,"open",s)),{c(){T(e.$$.fragment)},m(l,o){S(e,l,o),n=!0},p(l,[o]){const a={};o&4&&(a.title=l[2]("help.keyboard_shortcuts")),o&22&&(a.$$scope={dirty:o,ctx:l}),!i&&o&1&&(i=!0,a.open=l[0],He(()=>i=!1)),e.$set(a)},i(l){n||(m(e.$$.fragment,l),n=!0)},o(l){g(e.$$.fragment,l),n=!1},d(l){E(e,l)}}}function PF(t,e,i){let n;U(t,pe,o=>i(2,n=o));let{open:s=!1}=e,r="Ctrl";on(()=>{(navigator.userAgentData?.platform==="macOS"||navigator.platform.startsWith("Mac"))&&i(1,r="⌘")});function l(o){s=o,i(0,s)}return t.$$set=o=>{"open"in o&&i(0,s=o.open)},[s,r,n,l]}class IF extends J{constructor(e){super(),X(this,e,PF,NF,Z,{open:0},AF)}}function CF(t){let e,i,n=t[0]("prefs.advanced.developer_mode.title")+"",s,r,l,o=t[0]("prefs.advanced.developer_mode.description")+"",a,c,u,f,d,p;function h(b){t[2](b)}let _={label:t[0]("prefs.advanced.developer_mode.switch_label")};return t[1].devModeEnabled!==void 0&&(_.checked=t[1].devModeEnabled),f=new M0({props:_}),ae.push(()=>ze(f,"checked",h)),{c(){e=I("section"),i=I("h4"),s=q(n),r=D(),l=I("p"),a=q(o),c=D(),u=I("div"),T(f.$$.fragment)},m(b,k){y(b,e,k),O(e,i),O(i,s),O(e,r),O(e,l),O(l,a),O(e,c),O(e,u),S(f,u,null),p=!0},p(b,k){(!p||k&1)&&n!==(n=b[0]("prefs.advanced.developer_mode.title")+"")&&W(s,n),(!p||k&1)&&o!==(o=b[0]("prefs.advanced.developer_mode.description")+"")&&W(a,o);const v={};k&1&&(v.label=b[0]("prefs.advanced.developer_mode.switch_label")),!d&&k&2&&(d=!0,v.checked=b[1].devModeEnabled,He(()=>d=!1)),f.$set(v)},i(b){p||(m(f.$$.fragment,b),p=!0)},o(b){g(f.$$.fragment,b),p=!1},d(b){b&&w(e),E(f)}}}function DF(t){let e,i;return e=new mc({props:{id:"prefs-tab-advanced",$$slots:{default:[CF]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,[s]){const r={};s&11&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function MF(t,e,i){let n,s;U(t,pe,l=>i(0,n=l)),U(t,dt,l=>i(1,s=l));function r(l){t.$$.not_equal(s.devModeEnabled,l)&&(s.devModeEnabled=l,dt.set(s))}return[n,s,r]}class jF extends J{constructor(e){super(),X(this,e,MF,DF,Z,{})}}function Cb(t,e,i){const n=t.slice();return n[3]=e[i],n}function Db(t){let e,i;return e=new Xl({props:{class:"tertiary",label:t[0](`prefs.theme.${t[3]}`),value:t[3],selected:!t[1].theme&&t[3]==="auto"||t[1].theme===t[3]}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&1&&(r.label=n[0](`prefs.theme.${n[3]}`)),s&2&&(r.selected=!n[1].theme&&n[3]==="auto"||n[1].theme===n[3]),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function RF(t){let e,i,n=ce(["auto","dark","light"]),s=[];for(let l=0;l<3;l+=1)s[l]=Db(Cb(t,n,l));const r=l=>g(s[l],1,1,()=>{s[l]=null});return{c(){for(let l=0;l<3;l+=1)s[l].c();e=K()},m(l,o){for(let a=0;a<3;a+=1)s[a]&&s[a].m(l,o);y(l,e,o),i=!0},p(l,o){if(o&3){n=ce(["auto","dark","light"]);let a;for(a=0;a<3;a+=1){const c=Cb(l,n,a);s[a]?(s[a].p(c,o),m(s[a],1)):(s[a]=Db(c),s[a].c(),m(s[a],1),s[a].m(e.parentNode,e))}for(H(),a=3;a<3;a+=1)r(a);V()}},i(l){if(!i){for(let o=0;o<3;o+=1)m(s[o]);i=!0}},o(l){s=s.filter(Boolean);for(let o=0;o<3;o+=1)g(s[o]);i=!1},d(l){l&&w(e),mi(s,l)}}}function FF(t){let e,i,n=t[0]("prefs.appearance.theme")+"",s,r,l,o,a;return o=new gd({props:{$$slots:{default:[RF]},$$scope:{ctx:t}}}),o.$on("change",t[2]),{c(){e=I("section"),i=I("h4"),s=q(n),r=D(),l=I("p"),T(o.$$.fragment)},m(c,u){y(c,e,u),O(e,i),O(i,s),O(e,r),O(e,l),S(o,l,null),a=!0},p(c,u){(!a||u&1)&&n!==(n=c[0]("prefs.appearance.theme")+"")&&W(s,n);const f={};u&67&&(f.$$scope={dirty:u,ctx:c}),o.$set(f)},i(c){a||(m(o.$$.fragment,c),a=!0)},o(c){g(o.$$.fragment,c),a=!1},d(c){c&&w(e),E(o)}}}function UF(t){let e,i;return e=new mc({props:{id:"prefs-tab-appearance",$$slots:{default:[FF]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,[s]){const r={};s&67&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function xF(t,e,i){let n,s;return U(t,pe,l=>i(0,n=l)),U(t,dt,l=>i(1,s=l)),[n,s,({detail:{value:l}})=>{Me(dt,s={...s,theme:l},s)}]}class zF extends J{constructor(e){super(),X(this,e,xF,UF,Z,{})}}function Mb(t,e,i){const n=t.slice();n[7]=e[i][0],n[8]=e[i][1],n[12]=e,n[13]=i;const s=n[8];return n[9]=s.serviceLabel,n[10]=s.developerURL,n[11]=s.apiKeyURL,n}function jb(t,e,i){const n=t.slice();return n[14]=e[i],n}function Rb(t){let e,i;return e=new ni({props:{label:sr(t[14]),value:t[14],selected:t[14]===t[1]}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&8&&(r.label=sr(n[14])),s&8&&(r.value=n[14]),s&10&&(r.selected=n[14]===n[1]),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function BF(t){let e,i,n=ce(t[3]),s=[];for(let l=0;l<n.length;l+=1)s[l]=Rb(jb(t,n,l));const r=l=>g(s[l],1,1,()=>{s[l]=null});return{c(){for(let l=0;l<s.length;l+=1)s[l].c();e=K()},m(l,o){for(let a=0;a<s.length;a+=1)s[a]&&s[a].m(l,o);y(l,e,o),i=!0},p(l,o){if(o&10){n=ce(l[3]);let a;for(a=0;a<n.length;a+=1){const c=jb(l,n,a);s[a]?(s[a].p(c,o),m(s[a],1)):(s[a]=Rb(c),s[a].c(),m(s[a],1),s[a].m(e.parentNode,e))}for(H(),a=n.length;a<s.length;a+=1)r(a);V()}},i(l){if(!i){for(let o=0;o<n.length;o+=1)m(s[o]);i=!0}},o(l){s=s.filter(Boolean);for(let o=0;o<s.length;o+=1)g(s[o]);i=!1},d(l){l&&w(e),mi(s,l)}}}function Fb(t){let e,i;return e=new D0({props:{label:sr(t[1]),value:t[1],$$slots:{default:[BF]},$$scope:{ctx:t}}}),e.$on("change",t[5]),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&2&&(r.label=sr(n[1])),s&2&&(r.value=n[1]),s&131082&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function Ub(t){let e=[],i=new Map,n,s,r=ce(Object.entries(Gg));const l=o=>o[7];for(let o=0;o<r.length;o+=1){let a=Mb(t,r,o),c=l(a);i.set(c,e[o]=xb(c,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();n=K()},m(o,a){for(let c=0;c<e.length;c+=1)e[c]&&e[c].m(o,a);y(o,n,a),s=!0},p(o,a){a&5&&(r=ce(Object.entries(Gg)),H(),e=ct(e,a,l,1,o,r,i,n.parentNode,at,xb,n,Mb),V())},i(o){if(!s){for(let a=0;a<r.length;a+=1)m(e[a]);s=!0}},o(o){for(let a=0;a<e.length;a+=1)g(e[a]);s=!1},d(o){o&&w(n);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function xb(t,e){let i,n,s=e[0]("prefs.languages.translator.title",{values:{service:e[9]}})+"",r,l,o,a=bn.sanitize(e[0]("prefs.languages.translator.description",{values:{service:e[9],homeHref:`href="${e[10]}"`,apiKeyHref:`href="${e[11]}"`}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})+"",c,u,f,d,p,h;function _(k){e[6](k,e[7])}let b={spellcheck:"false","aria-label":e[0]("prefs.languages.translator.field_label",{values:{service:e[9]}})};return e[2].apiKeys[e[7]]!==void 0&&(b.value=e[2].apiKeys[e[7]]),f=new Hn({props:b}),ae.push(()=>ze(f,"value",_)),{key:t,first:null,c(){i=I("section"),n=I("h4"),r=q(s),l=D(),o=I("p"),c=D(),u=I("div"),T(f.$$.fragment),p=D(),this.first=i},m(k,v){y(k,i,v),O(i,n),O(n,r),O(i,l),O(i,o),o.innerHTML=a,O(i,c),O(i,u),S(f,u,null),O(i,p),h=!0},p(k,v){e=k,(!h||v&1)&&s!==(s=e[0]("prefs.languages.translator.title",{values:{service:e[9]}})+"")&&W(r,s),(!h||v&1)&&a!==(a=bn.sanitize(e[0]("prefs.languages.translator.description",{values:{service:e[9],homeHref:`href="${e[10]}"`,apiKeyHref:`href="${e[11]}"`}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})+"")&&(o.innerHTML=a);const $={};v&1&&($["aria-label"]=e[0]("prefs.languages.translator.field_label",{values:{service:e[9]}})),!d&&v&4&&(d=!0,$.value=e[2].apiKeys[e[7]],He(()=>d=!1)),f.$set($)},i(k){h||(m(f.$$.fragment,k),h=!0)},o(k){g(f.$$.fragment,k),h=!1},d(k){k&&w(i),E(f)}}}function HF(t){let e,i,n=t[0]("prefs.languages.ui_language.title")+"",s,r,l,o=t[1],a,c,u,f=Fb(t),d=t[4].i18n?.locales?.length>1&&Ub(t);return{c(){e=I("section"),i=I("h4"),s=q(n),r=D(),l=I("p"),f.c(),a=D(),d&&d.c(),c=K()},m(p,h){y(p,e,h),O(e,i),O(i,s),O(e,r),O(e,l),f.m(l,null),y(p,a,h),d&&d.m(p,h),y(p,c,h),u=!0},p(p,h){(!u||h&1)&&n!==(n=p[0]("prefs.languages.ui_language.title")+"")&&W(s,n),h&2&&Z(o,o=p[1])?(H(),g(f,1,1,z),V(),f=Fb(p),f.c(),m(f,1),f.m(l,null)):f.p(p,h),p[4].i18n?.locales?.length>1?d?(d.p(p,h),h&16&&m(d,1)):(d=Ub(p),d.c(),m(d,1),d.m(c.parentNode,c)):d&&(H(),g(d,1,1,()=>{d=null}),V())},i(p){u||(m(f),m(d),u=!0)},o(p){g(f),g(d),u=!1},d(p){p&&(w(e),w(a),w(c)),f.d(p),d&&d.d(p)}}}function VF(t){let e,i;return e=new mc({props:{id:"prefs-tab-languages",$$slots:{default:[HF]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,[s]){const r={};s&131103&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function qF(t,e,i){let n,s,r,l,o;U(t,pe,u=>i(0,n=u)),U(t,Vt,u=>i(1,s=u)),U(t,dt,u=>i(2,r=u)),U(t,E0,u=>i(3,l=u)),U(t,vt,u=>i(4,o=u));const a=u=>{Me(dt,r={...r,locale:u.detail.value},r)};function c(u,f){t.$$.not_equal(r.apiKeys[f],u)&&(r.apiKeys[f]=u,dt.set(r))}return[n,s,r,l,o,a,c]}class YF extends J{constructor(e){super(),X(this,e,qF,VF,Z,{})}}function zb(t,e,i){const n=t.slice();n[3]=e[i][0],n[4]=e[i][1],n[8]=e,n[9]=i;const s=n[4];return n[5]=s.serviceLabel,n[6]=s.developerURL,n[7]=s.apiKeyURL,n}function Bb(t,e){let i,n,s=e[0]("prefs.media.stock_photos.title",{values:{service:e[5]}})+"",r,l,o,a=bn.sanitize(e[0]("prefs.media.stock_photos.description",{values:{service:e[5],homeHref:`href="${e[6]}"`,apiKeyHref:`href="${e[7]}"`}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})+"",c,u,f,d,p,h;function _(k){e[2](k,e[3])}let b={spellcheck:"false","aria-label":e[0]("prefs.media.stock_photos.field_label",{values:{service:e[5]}})};return e[1].apiKeys[e[3]]!==void 0&&(b.value=e[1].apiKeys[e[3]]),f=new Hn({props:b}),ae.push(()=>ze(f,"value",_)),{key:t,first:null,c(){i=I("section"),n=I("h4"),r=q(s),l=D(),o=I("p"),c=D(),u=I("div"),T(f.$$.fragment),p=D(),this.first=i},m(k,v){y(k,i,v),O(i,n),O(n,r),O(i,l),O(i,o),o.innerHTML=a,O(i,c),O(i,u),S(f,u,null),O(i,p),h=!0},p(k,v){e=k,(!h||v&1)&&s!==(s=e[0]("prefs.media.stock_photos.title",{values:{service:e[5]}})+"")&&W(r,s),(!h||v&1)&&a!==(a=bn.sanitize(e[0]("prefs.media.stock_photos.description",{values:{service:e[5],homeHref:`href="${e[6]}"`,apiKeyHref:`href="${e[7]}"`}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})+"")&&(o.innerHTML=a);const $={};v&1&&($["aria-label"]=e[0]("prefs.media.stock_photos.field_label",{values:{service:e[5]}})),!d&&v&2&&(d=!0,$.value=e[1].apiKeys[e[3]],He(()=>d=!1)),f.$set($)},i(k){h||(m(f.$$.fragment,k),h=!0)},o(k){g(f.$$.fragment,k),h=!1},d(k){k&&w(i),E(f)}}}function GF(t){let e=[],i=new Map,n,s,r=ce(Object.entries(Ps));const l=o=>o[3];for(let o=0;o<r.length;o+=1){let a=zb(t,r,o),c=l(a);i.set(c,e[o]=Bb(c,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();n=K()},m(o,a){for(let c=0;c<e.length;c+=1)e[c]&&e[c].m(o,a);y(o,n,a),s=!0},p(o,a){a&3&&(r=ce(Object.entries(Ps)),H(),e=ct(e,a,l,1,o,r,i,n.parentNode,at,Bb,n,zb),V())},i(o){if(!s){for(let a=0;a<r.length;a+=1)m(e[a]);s=!0}},o(o){for(let a=0;a<e.length;a+=1)g(e[a]);s=!1},d(o){o&&w(n);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function WF(t){let e,i;return e=new mc({props:{id:"prefs-tab-media",$$slots:{default:[GF]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,[s]){const r={};s&1027&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function KF(t,e,i){let n,s;U(t,pe,l=>i(0,n=l)),U(t,dt,l=>i(1,s=l));function r(l,o){t.$$.not_equal(s.apiKeys[o],l)&&(s.apiKeys[o]=l,dt.set(s))}return[n,s,r]}class ZF extends J{constructor(e){super(),X(this,e,KF,WF,Z,{})}}function XF(t){ve(t,"svelte-sp2rtj",".wrapper.svelte-sp2rtj{display:flex}.wrapper.svelte-sp2rtj .tab-list{flex:none;width:160px !important}.wrapper.svelte-sp2rtj .tabpanel{flex:auto;border-width:0}.wrapper.svelte-sp2rtj .tabpanel section:not(:first-child){margin:16px 0 0}.wrapper.svelte-sp2rtj .tabpanel p{margin-top:0}.wrapper.svelte-sp2rtj .tabpanel h4{font-size:inherit}.wrapper.svelte-sp2rtj .tabpanel h4~div{margin:8px 0 0}.wrapper.svelte-sp2rtj .tabpanel h4~p{margin:8px 0 0;color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-small)}")}function JF(t){let e,i;return e=new we({props:{slot:"start-icon",name:"palette"}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p:z,i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function QF(t){let e,i;return e=new we({props:{slot:"start-icon",name:"language"}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p:z,i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function eU(t){let e,i;return e=new we({props:{slot:"start-icon",name:"photo_library"}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p:z,i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function tU(t){let e,i;return e=new we({props:{slot:"start-icon",name:"build"}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p:z,i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function nU(t){let e,i,n,s,r,l,o,a;return e=new zo({props:{label:t[1]("prefs.appearance.title"),"aria-selected":!0,"aria-controls":"prefs-tab-appearance",$$slots:{"start-icon":[JF]},$$scope:{ctx:t}}}),n=new zo({props:{label:t[1]("prefs.languages.title"),"aria-controls":"prefs-tab-languages",$$slots:{"start-icon":[QF]},$$scope:{ctx:t}}}),r=new zo({props:{label:t[1]("prefs.media.title"),"aria-controls":"prefs-tab-media",$$slots:{"start-icon":[eU]},$$scope:{ctx:t}}}),o=new zo({props:{label:t[1]("prefs.advanced.title"),"aria-controls":"prefs-tab-advanced",$$slots:{"start-icon":[tU]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment),i=D(),T(n.$$.fragment),s=D(),T(r.$$.fragment),l=D(),T(o.$$.fragment)},m(c,u){S(e,c,u),y(c,i,u),S(n,c,u),y(c,s,u),S(r,c,u),y(c,l,u),S(o,c,u),a=!0},p(c,u){const f={};u&2&&(f.label=c[1]("prefs.appearance.title")),u&8&&(f.$$scope={dirty:u,ctx:c}),e.$set(f);const d={};u&2&&(d.label=c[1]("prefs.languages.title")),u&8&&(d.$$scope={dirty:u,ctx:c}),n.$set(d);const p={};u&2&&(p.label=c[1]("prefs.media.title")),u&8&&(p.$$scope={dirty:u,ctx:c}),r.$set(p);const h={};u&2&&(h.label=c[1]("prefs.advanced.title")),u&8&&(h.$$scope={dirty:u,ctx:c}),o.$set(h)},i(c){a||(m(e.$$.fragment,c),m(n.$$.fragment,c),m(r.$$.fragment,c),m(o.$$.fragment,c),a=!0)},o(c){g(e.$$.fragment,c),g(n.$$.fragment,c),g(r.$$.fragment,c),g(o.$$.fragment,c),a=!1},d(c){c&&(w(i),w(s),w(l)),E(e,c),E(n,c),E(r,c),E(o,c)}}}function iU(t){let e,i,n,s,r,l,o,a,c,u,f;return i=new hE({props:{orientation:"vertical",$$slots:{default:[nU]},$$scope:{ctx:t}}}),s=new zF({}),l=new YF({}),a=new ZF({}),u=new jF({}),{c(){e=I("div"),T(i.$$.fragment),n=D(),T(s.$$.fragment),r=D(),T(l.$$.fragment),o=D(),T(a.$$.fragment),c=D(),T(u.$$.fragment),C(e,"class","wrapper svelte-sp2rtj")},m(d,p){y(d,e,p),S(i,e,null),O(e,n),S(s,e,null),O(e,r),S(l,e,null),O(e,o),S(a,e,null),O(e,c),S(u,e,null),f=!0},p(d,p){const h={};p&10&&(h.$$scope={dirty:p,ctx:d}),i.$set(h)},i(d){f||(m(i.$$.fragment,d),m(s.$$.fragment,d),m(l.$$.fragment,d),m(a.$$.fragment,d),m(u.$$.fragment,d),f=!0)},o(d){g(i.$$.fragment,d),g(s.$$.fragment,d),g(l.$$.fragment,d),g(a.$$.fragment,d),g(u.$$.fragment,d),f=!1},d(d){d&&w(e),E(i),E(s),E(l),E(a),E(u)}}}function sU(t){let e,i,n;function s(l){t[2](l)}let r={title:t[1]("settings"),showOk:!1,showCancel:!1,showClose:!0,$$slots:{default:[iU]},$$scope:{ctx:t}};return t[0]!==void 0&&(r.open=t[0]),e=new Kn({props:r}),ae.push(()=>ze(e,"open",s)),{c(){T(e.$$.fragment)},m(l,o){S(e,l,o),n=!0},p(l,[o]){const a={};o&2&&(a.title=l[1]("settings")),o&10&&(a.$$scope={dirty:o,ctx:l}),!i&&o&1&&(i=!0,a.open=l[0],He(()=>i=!1)),e.$set(a)},i(l){n||(m(e.$$.fragment,l),n=!0)},o(l){g(e.$$.fragment,l),n=!1},d(l){E(e,l)}}}function rU(t,e,i){let n;U(t,pe,l=>i(1,n=l));let{open:s=!1}=e;function r(l){s=l,i(0,s)}return t.$$set=l=>{"open"in l&&i(0,s=l.open)},[s,n,r]}class lU extends J{constructor(e){super(),X(this,e,rU,sU,Z,{open:0},XF)}}function oU(t){ve(t,"svelte-17d7an3",".avatar.svelte-17d7an3{width:32px;height:32px;border-radius:32px;object-fit:cover}")}function Ju(t){let e,i,n,s=[{class:"avatar svelte-17d7an3"},{loading:"lazy"},{src:i=t[4]?.avatar_url},{alt:n=t[3]("account")}],r={};for(let l=0;l<s.length;l+=1)r=ee(r,s[l]);return{c(){e=I(t[4]?.avatar_url?"img":void 0),fm(t[4]?.avatar_url?"img":void 0)(e,r)},m(l,o){y(l,e,o)},p(l,o){fm(l[4]?.avatar_url?"img":void 0)(e,r=We(s,[{class:"avatar svelte-17d7an3"},{loading:"lazy"},o&16&&!Qs(e.src,i=l[4]?.avatar_url)&&{src:i},o&8&&n!==(n=l[3]("account"))&&{alt:n}]))},d(l){l&&w(e)}}}function aU(t){let e=t[4]?.avatar_url?"img":void 0,i,n=(t[4]?.avatar_url?"img":void 0)&&Ju(t);return{c(){n&&n.c(),i=K()},m(s,r){n&&n.m(s,r),y(s,i,r)},p(s,r){s[4]?.avatar_url||void 0?e?Z(e,s[4]?.avatar_url?"img":void 0)?(n.d(1),n=Ju(s),e=s[4]?.avatar_url?"img":void 0,n.c(),n.m(i.parentNode,i)):n.p(s,r):(n=Ju(s),e=s[4]?.avatar_url?"img":void 0,n.c(),n.m(i.parentNode,i)):e&&(n.d(1),n=null,e=s[4]?.avatar_url?"img":void 0)},d(s){s&&w(i),n&&n.d(s)}}}function cU(t){let e,i;return e=new we({props:{slot:"start-icon",name:t[4]?.avatar_url?void 0:"account_circle",label:t[3]("account")}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&16&&(r.name=n[4]?.avatar_url?void 0:"account_circle"),s&8&&(r.label=n[3]("account")),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function uU(t){let e,i,n,s,r,l,o,a,c,u,f,d,p,h,_,b,k,v,$,L,A,P,F,j,N,M,R,G,Q,te;return e=new Ct({props:{label:t[2]?t[3]("working_with_local_repo"):t[3]("signed_in_as_x",{values:{name:t[4]?.login}}),disabled:t[2]}}),e.$on("click",t[7]),n=new Tn({}),r=new Ct({props:{label:t[3]("live_site")}}),r.$on("click",t[8]),o=new Ct({props:{label:t[3]("git_repository"),disabled:t[2]}}),o.$on("click",t[9]),c=new Tn({}),f=new Ct({props:{label:t[3]("settings")}}),f.$on("click",t[10]),p=new Tn({}),_=new Ct({props:{label:t[3]("help.keyboard_shortcuts")}}),_.$on("click",t[11]),k=new Ct({props:{label:t[3]("help.documentation")}}),k.$on("click",t[12]),$=new Ct({props:{label:t[3]("help.release_notes")}}),$.$on("click",t[13]),A=new Tn({}),F=new Ct({props:{label:t[3]("help.issue")}}),F.$on("click",t[14]),N=new Ct({props:{label:t[3]("help.feedback")}}),N.$on("click",t[15]),R=new Tn({}),Q=new Ct({props:{label:t[3]("sign_out")}}),Q.$on("click",t[16]),{c(){T(e.$$.fragment),i=D(),T(n.$$.fragment),s=D(),T(r.$$.fragment),l=D(),T(o.$$.fragment),a=D(),T(c.$$.fragment),u=D(),T(f.$$.fragment),d=D(),T(p.$$.fragment),h=D(),T(_.$$.fragment),b=D(),T(k.$$.fragment),v=D(),T($.$$.fragment),L=D(),T(A.$$.fragment),P=D(),T(F.$$.fragment),j=D(),T(N.$$.fragment),M=D(),T(R.$$.fragment),G=D(),T(Q.$$.fragment)},m(x,Y){S(e,x,Y),y(x,i,Y),S(n,x,Y),y(x,s,Y),S(r,x,Y),y(x,l,Y),S(o,x,Y),y(x,a,Y),S(c,x,Y),y(x,u,Y),S(f,x,Y),y(x,d,Y),S(p,x,Y),y(x,h,Y),S(_,x,Y),y(x,b,Y),S(k,x,Y),y(x,v,Y),S($,x,Y),y(x,L,Y),S(A,x,Y),y(x,P,Y),S(F,x,Y),y(x,j,Y),S(N,x,Y),y(x,M,Y),S(R,x,Y),y(x,G,Y),S(Q,x,Y),te=!0},p(x,Y){const ue={};Y&28&&(ue.label=x[2]?x[3]("working_with_local_repo"):x[3]("signed_in_as_x",{values:{name:x[4]?.login}})),Y&4&&(ue.disabled=x[2]),e.$set(ue);const Fe={};Y&8&&(Fe.label=x[3]("live_site")),r.$set(Fe);const lt={};Y&8&&(lt.label=x[3]("git_repository")),Y&4&&(lt.disabled=x[2]),o.$set(lt);const mt={};Y&8&&(mt.label=x[3]("settings")),f.$set(mt);const bt={};Y&8&&(bt.label=x[3]("help.keyboard_shortcuts")),_.$set(bt);const re={};Y&8&&(re.label=x[3]("help.documentation")),k.$set(re);const _e={};Y&8&&(_e.label=x[3]("help.release_notes")),$.$set(_e);const kn={};Y&8&&(kn.label=x[3]("help.issue")),F.$set(kn);const ht={};Y&8&&(ht.label=x[3]("help.feedback")),N.$set(ht);const qt={};Y&8&&(qt.label=x[3]("sign_out")),Q.$set(qt)},i(x){te||(m(e.$$.fragment,x),m(n.$$.fragment,x),m(r.$$.fragment,x),m(o.$$.fragment,x),m(c.$$.fragment,x),m(f.$$.fragment,x),m(p.$$.fragment,x),m(_.$$.fragment,x),m(k.$$.fragment,x),m($.$$.fragment,x),m(A.$$.fragment,x),m(F.$$.fragment,x),m(N.$$.fragment,x),m(R.$$.fragment,x),m(Q.$$.fragment,x),te=!0)},o(x){g(e.$$.fragment,x),g(n.$$.fragment,x),g(r.$$.fragment,x),g(o.$$.fragment,x),g(c.$$.fragment,x),g(f.$$.fragment,x),g(p.$$.fragment,x),g(_.$$.fragment,x),g(k.$$.fragment,x),g($.$$.fragment,x),g(A.$$.fragment,x),g(F.$$.fragment,x),g(N.$$.fragment,x),g(R.$$.fragment,x),g(Q.$$.fragment,x),te=!1},d(x){x&&(w(i),w(s),w(l),w(a),w(u),w(d),w(h),w(b),w(v),w(L),w(P),w(j),w(M),w(G)),E(e,x),E(n,x),E(r,x),E(o,x),E(c,x),E(f,x),E(p,x),E(_,x),E(k,x),E($,x),E(A,x),E(F,x),E(N,x),E(R,x),E(Q,x)}}}function fU(t){let e,i;return e=new Ci({props:{slot:"popup",$$slots:{default:[uU]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&524351&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function dU(t){let e,i,n,s,r,l,o,a;e=new as({props:{class:"ghost iconic",popupPosition:"bottom-right",$$slots:{popup:[fU],"start-icon":[cU],default:[aU]},$$scope:{ctx:t}}});function c(p){t[17](p)}let u={};t[0]!==void 0&&(u.open=t[0]),n=new lU({props:u}),ae.push(()=>ze(n,"open",c));function f(p){t[18](p)}let d={};return t[1]!==void 0&&(d.open=t[1]),l=new IF({props:d}),ae.push(()=>ze(l,"open",f)),{c(){T(e.$$.fragment),i=D(),T(n.$$.fragment),r=D(),T(l.$$.fragment)},m(p,h){S(e,p,h),y(p,i,h),S(n,p,h),y(p,r,h),S(l,p,h),a=!0},p(p,[h]){const _={};h&524351&&(_.$$scope={dirty:h,ctx:p}),e.$set(_);const b={};!s&&h&1&&(s=!0,b.open=p[0],He(()=>s=!1)),n.$set(b);const k={};!o&&h&2&&(o=!0,k.open=p[1],He(()=>o=!1)),l.$set(k)},i(p){a||(m(e.$$.fragment,p),m(n.$$.fragment,p),m(l.$$.fragment,p),a=!0)},o(p){g(e.$$.fragment,p),g(n.$$.fragment,p),g(l.$$.fragment,p),a=!1},d(p){p&&(w(i),w(r)),E(e,p),E(n,p),E(l,p)}}}function pU(t,e,i){let n,s,r,l,o;U(t,_l,P=>i(6,s=P)),U(t,pe,P=>i(3,r=P)),U(t,Pi,P=>i(4,l=P)),U(t,fi,P=>i(5,o=P));let a=!1,c=!1;const u=()=>{window.open(l?.html_url,"_blank")},f=()=>{cw()},d=()=>{window.open(o.repository.url)},p=()=>{i(0,a=!0)},h=()=>{i(1,c=!0)},_=()=>{window.open("https://github.com/sveltia/sveltia-cms/blob/main/README.md","_blank")},b=()=>{window.open("https://github.com/sveltia/sveltia-cms/releases","_blank")},k=()=>{window.open("https://github.com/sveltia/sveltia-cms/issues","_blank")},v=()=>{window.open("https://github.com/sveltia/sveltia-cms/discussions","_blank")},$=async()=>{window.requestAnimationFrame(()=>{Me(Pi,l=null,l),o.signOut()})};function L(P){a=P,i(0,a)}function A(P){c=P,i(1,c)}return t.$$.update=()=>{t.$$.dirty&64&&i(2,n=s==="local")},[a,c,n,r,l,o,s,u,f,d,p,h,_,b,k,v,$,L,A]}class mU extends J{constructor(e){super(),X(this,e,pU,dU,Z,{},oU)}}function Hb(t,e,i){const n=t.slice();n[8]=e[i];const s=n[8];return n[9]=s.name,n[10]=s.label,n[11]=s.label_singular,n[12]=s.folder,n[13]=s.hide!==void 0?s.hide:!1,n[14]=s.create!==void 0?s.create:!1,n}function hU(t){let e,i;return e=new we({props:{slot:"start-icon",name:"add",label:t[2]("create")}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&4&&(r.label=n[2]("create")),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function Vb(t){let e,i;function n(){return t[4](t[9])}return e=new Ct({props:{label:t[11]||t[10]||t[9],disabled:!t[14]}}),e.$on("click",n),{c(){T(e.$$.fragment)},m(s,r){S(e,s,r),i=!0},p(s,r){t=s;const l={};r&2&&(l.label=t[11]||t[10]||t[9]),r&2&&(l.disabled=!t[14]),e.$set(l)},i(s){i||(m(e.$$.fragment,s),i=!0)},o(s){g(e.$$.fragment,s),i=!1},d(s){E(e,s)}}}function qb(t,e){let i,n,s,r=e[12]&&!e[13]&&Vb(e);return{key:t,first:null,c(){i=K(),r&&r.c(),n=K(),this.first=i},m(l,o){y(l,i,o),r&&r.m(l,o),y(l,n,o),s=!0},p(l,o){e=l,e[12]&&!e[13]?r?(r.p(e,o),o&2&&m(r,1)):(r=Vb(e),r.c(),m(r,1),r.m(n.parentNode,n)):r&&(H(),g(r,1,1,()=>{r=null}),V())},i(l){s||(m(r),s=!0)},o(l){g(r),s=!1},d(l){l&&(w(i),w(n)),r&&r.d(l)}}}function gU(t){let e=[],i=new Map,n,s,r,l,o,a=ce(t[1].collections??[]);const c=u=>u[8].name;for(let u=0;u<a.length;u+=1){let f=Hb(t,a,u),d=c(f);i.set(d,e[u]=qb(d,f))}return s=new Tn({}),l=new Ct({props:{label:t[2]("asset")}}),l.$on("click",t[5]),{c(){for(let u=0;u<e.length;u+=1)e[u].c();n=D(),T(s.$$.fragment),r=D(),T(l.$$.fragment)},m(u,f){for(let d=0;d<e.length;d+=1)e[d]&&e[d].m(u,f);y(u,n,f),S(s,u,f),y(u,r,f),S(l,u,f),o=!0},p(u,f){f&2&&(a=ce(u[1].collections??[]),H(),e=ct(e,f,c,1,u,a,i,n.parentNode,at,qb,n,Hb),V());const d={};f&4&&(d.label=u[2]("asset")),l.$set(d)},i(u){if(!o){for(let f=0;f<a.length;f+=1)m(e[f]);m(s.$$.fragment,u),m(l.$$.fragment,u),o=!0}},o(u){for(let f=0;f<e.length;f+=1)g(e[f]);g(s.$$.fragment,u),g(l.$$.fragment,u),o=!1},d(u){u&&(w(n),w(r));for(let f=0;f<e.length;f+=1)e[f].d(u);E(s,u),E(l,u)}}}function _U(t){let e,i;return e=new Ci({props:{slot:"popup",$$slots:{default:[gU]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&131079&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function bU(t){let e,i,n,s;e=new as({props:{class:"ghost iconic",popupPosition:"bottom-right",$$slots:{popup:[_U],"start-icon":[hU]},$$scope:{ctx:t}}});let r={};return n=new dp({props:r}),t[6](n),n.$on("change",t[7]),{c(){T(e.$$.fragment),i=D(),T(n.$$.fragment)},m(l,o){S(e,l,o),y(l,i,o),S(n,l,o),s=!0},p(l,[o]){const a={};o&131079&&(a.$$scope={dirty:o,ctx:l}),e.$set(a);const c={};n.$set(c)},i(l){s||(m(e.$$.fragment,l),m(n.$$.fragment,l),s=!0)},o(l){g(e.$$.fragment,l),g(n.$$.fragment,l),s=!1},d(l){l&&w(i),E(e,l),t[6](null),E(n,l)}}}function vU(t,e,i){let n,s,r;U(t,vt,f=>i(1,n=f)),U(t,pe,f=>i(2,s=f)),U(t,Cn,f=>i(3,r=f));let l;const o=f=>{zt(`/collections/${f}/new`)},a=()=>{zt("/assets"),l.open()};function c(f){ae[f?"unshift":"push"](()=>{l=f,i(0,l)})}return[l,n,s,r,o,a,c,({target:f})=>{Me(Cn,r={folder:n.media_folder,files:[...f.files]},r)}]}class kU extends J{constructor(e){super(),X(this,e,vU,bU,Z,{})}}function wU(t){let e,i;return e=new we({props:{slot:"start-icon",name:"notifications",label:t[0]("notifications")}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&1&&(r.label=n[0]("notifications")),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function yU(t){let e,i;return e=new De({props:{class:"ghost iconic",hidden:!0,$$slots:{"start-icon":[wU]},$$scope:{ctx:t}}}),e.$on("click",$U),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,[s]){const r={};s&3&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}const $U=()=>{};function SU(t,e,i){let n;return U(t,pe,s=>i(0,n=s)),[n]}class EU extends J{constructor(e){super(),X(this,e,SU,yU,Z,{})}}function TU(t){let e,i;return e=new we({props:{slot:"start-icon",name:"library_books",label:t[2]("entries")}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&4&&(r.label=n[2]("entries")),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function OU(t){let e,i;return e=new we({props:{slot:"start-icon",name:"photo_library",label:t[2]("assets")}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&4&&(r.label=n[2]("assets")),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function AU(t){let e,i;return e=new we({props:{slot:"start-icon",name:"rebase_edit",label:t[2]("editorial_workflow")}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&4&&(r.label=n[2]("editorial_workflow")),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function LU(t){let e,i;return e=new we({props:{slot:"start-icon",name:"settings",label:t[2]("site_config")}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&4&&(r.label=n[2]("site_config")),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function NU(t){let e,i,n,s,r,l,o,a;return e=new De({props:{class:"ghost iconic",pressed:t[0]==="collections",$$slots:{"start-icon":[TU]},$$scope:{ctx:t}}}),e.$on("click",t[4]),n=new De({props:{class:"ghost iconic",pressed:t[0]==="assets",$$slots:{"start-icon":[OU]},$$scope:{ctx:t}}}),n.$on("click",t[5]),r=new De({props:{class:"ghost iconic",hidden:!0,pressed:t[0]==="workflow",$$slots:{"start-icon":[AU]},$$scope:{ctx:t}}}),r.$on("click",t[6]),o=new De({props:{class:"ghost iconic",hidden:!0,pressed:t[0]==="config",$$slots:{"start-icon":[LU]},$$scope:{ctx:t}}}),o.$on("click",t[7]),{c(){T(e.$$.fragment),i=D(),T(n.$$.fragment),s=D(),T(r.$$.fragment),l=D(),T(o.$$.fragment)},m(c,u){S(e,c,u),y(c,i,u),S(n,c,u),y(c,s,u),S(r,c,u),y(c,l,u),S(o,c,u),a=!0},p(c,[u]){const f={};u&1&&(f.pressed=c[0]==="collections"),u&260&&(f.$$scope={dirty:u,ctx:c}),e.$set(f);const d={};u&1&&(d.pressed=c[0]==="assets"),u&260&&(d.$$scope={dirty:u,ctx:c}),n.$set(d);const p={};u&1&&(p.pressed=c[0]==="workflow"),u&260&&(p.$$scope={dirty:u,ctx:c}),r.$set(p);const h={};u&1&&(h.pressed=c[0]==="config"),u&260&&(h.$$scope={dirty:u,ctx:c}),o.$set(h)},i(c){a||(m(e.$$.fragment,c),m(n.$$.fragment,c),m(r.$$.fragment,c),m(o.$$.fragment,c),a=!0)},o(c){g(e.$$.fragment,c),g(n.$$.fragment,c),g(r.$$.fragment,c),g(o.$$.fragment,c),a=!1},d(c){c&&(w(i),w(s),w(l)),E(e,c),E(n,c),E(r,c),E(o,c)}}}function PU(t,e,i){let n,s,r,l;return U(t,da,f=>i(0,n=f)),U(t,Lt,f=>i(1,s=f)),U(t,pe,f=>i(2,r=f)),U(t,ai,f=>i(3,l=f)),[n,s,r,l,()=>{zt(`/collections/${s.name}`)},()=>{zt(l?`/assets/${l}`:"/assets")},()=>{zt("/workflow")},()=>{zt("/config")}]}class IU extends J{constructor(e){super(),X(this,e,PU,NU,Z,{})}}const fo=Re(""),CU=vn([ei,Qt,fo],([t,e,i],n)=>{const s=t?.length&&i?t.filter(l=>Object.values(Zn(l)).some(o=>typeof o=="string"&&o.toLowerCase().includes(i.toLowerCase()))):[],r=e?.length&&i?e.filter(l=>l.name.toLowerCase().includes(i.toLowerCase())):[];n({entries:s,assets:r})});function DU(t){ve(t,"svelte-38ttcj",".wrapper.svelte-38ttcj{display:contents}")}function MU(t){let e,i,n,s,r={keyShortcuts:"Accel+F","aria-label":t[2]("search_placeholder")};return i=new F0({props:r}),t[5](i),i.$on("input",t[6]),{c(){e=I("div"),n=I("div"),T(i.$$.fragment),dn(n,"display","contents"),dn(n,"--sui-textbox-label-align","center"),C(e,"class","wrapper svelte-38ttcj")},m(l,o){y(l,e,o),O(e,n),S(i,n,null),t[7](e),s=!0},p(l,[o]){const a={};o&4&&(a["aria-label"]=l[2]("search_placeholder")),i.$set(a)},i(l){s||(m(i.$$.fragment,l),s=!0)},o(l){g(i.$$.fragment,l),s=!1},d(l){l&&w(e),t[5](null),E(i),t[7](null)}}}function jU(t,e,i){let n,s,r;U(t,fo,d=>i(4,n=d)),U(t,Lt,d=>i(8,s=d)),U(t,pe,d=>i(2,r=d));const l=d=>{const p=!!n,{path:h}=Eo(),_=h.startsWith("/search/");Me(fo,n=d,n),d?zt(`/search/${d}`,{replaceState:_}):p&&_&&Yr(`/collections/${s.name}`)};let o,a;function c(d){ae[d?"unshift":"push"](()=>{a=d,i(0,a),i(4,n)})}const u=({target:d})=>{l(d.value.trim())};function f(d){ae[d?"unshift":"push"](()=>{o=d,i(1,o)})}return t.$$.update=()=>{t.$$.dirty&17&&a&&n!==a?.value&&i(0,a.value=n,a)},[a,o,r,l,n,c,u,f]}class RU extends J{constructor(e){super(),X(this,e,jU,MU,Z,{},DU)}}function FU(t){ve(t,"svelte-14sy0eb","img.svelte-14sy0eb{width:24px;height:24px;object-fit:contain}")}function Yb(t){let e,i;return e=new De({props:{class:"ghost iconic","aria-label":t[1]("live_site"),$$slots:{default:[UU]},$$scope:{ctx:t}}}),e.$on("click",t[2]),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&2&&(r["aria-label"]=n[1]("live_site")),s&9&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function UU(t){let e,i;return{c(){e=I("img"),C(e,"loading","lazy"),Qs(e.src,i=t[0].logo_url)||C(e,"src",i),C(e,"alt",""),C(e,"class","logo svelte-14sy0eb")},m(n,s){y(n,e,s)},p(n,s){s&1&&!Qs(e.src,i=n[0].logo_url)&&C(e,"src",i)},d(n){n&&w(e)}}}function xU(t){let e,i,n=t[0]?.logo_url&&Yb(t);return{c(){n&&n.c(),e=K()},m(s,r){n&&n.m(s,r),y(s,e,r),i=!0},p(s,[r]){s[0]?.logo_url?n?(n.p(s,r),r&1&&m(n,1)):(n=Yb(s),n.c(),m(n,1),n.m(e.parentNode,e)):n&&(H(),g(n,1,1,()=>{n=null}),V())},i(s){i||(m(n),i=!0)},o(s){g(n),i=!1},d(s){s&&w(e),n&&n.d(s)}}}function zU(t,e,i){let n,s;return U(t,vt,l=>i(0,n=l)),U(t,pe,l=>i(1,s=l)),[n,s,()=>{cw()}]}class BU extends J{constructor(e){super(),X(this,e,zU,xU,Z,{},FU)}}function HU(t){ve(t,"svelte-zkeoqb",".toolbar-wrapper.svelte-zkeoqb{display:contents}.toolbar-wrapper[hidden].svelte-zkeoqb{display:none}.toolbar-wrapper.svelte-zkeoqb>.toolbar{--toolbar-size:48px;border-width:0 0 1px 0 !important;border-color:var(--sui-primary-border-color) !important;background-color:var(--sui-tertiary-background-color)}.toolbar-wrapper.svelte-zkeoqb>.toolbar .search-bar{width:640px}")}function VU(t){let e,i,n,s,r,l,o,a,c,u,f,d,p,h,_,b;return e=new BU({}),n=new IU({}),r=new gn({props:{flex:!0}}),o=new RU({}),c=new gn({props:{flex:!0}}),f=new kU({}),p=new EU({}),_=new mU({}),{c(){T(e.$$.fragment),i=D(),T(n.$$.fragment),s=D(),T(r.$$.fragment),l=D(),T(o.$$.fragment),a=D(),T(c.$$.fragment),u=D(),T(f.$$.fragment),d=D(),T(p.$$.fragment),h=D(),T(_.$$.fragment)},m(k,v){S(e,k,v),y(k,i,v),S(n,k,v),y(k,s,v),S(r,k,v),y(k,l,v),S(o,k,v),y(k,a,v),S(c,k,v),y(k,u,v),S(f,k,v),y(k,d,v),S(p,k,v),y(k,h,v),S(_,k,v),b=!0},p:z,i(k){b||(m(e.$$.fragment,k),m(n.$$.fragment,k),m(r.$$.fragment,k),m(o.$$.fragment,k),m(c.$$.fragment,k),m(f.$$.fragment,k),m(p.$$.fragment,k),m(_.$$.fragment,k),b=!0)},o(k){g(e.$$.fragment,k),g(n.$$.fragment,k),g(r.$$.fragment,k),g(o.$$.fragment,k),g(c.$$.fragment,k),g(f.$$.fragment,k),g(p.$$.fragment,k),g(_.$$.fragment,k),b=!1},d(k){k&&(w(i),w(s),w(l),w(a),w(u),w(d),w(h)),E(e,k),E(n,k),E(r,k),E(o,k),E(c,k),E(f,k),E(p,k),E(_,k)}}}function qU(t){let e,i,n,s;return i=new cs({props:{$$slots:{default:[VU]},$$scope:{ctx:t}}}),{c(){e=I("div"),T(i.$$.fragment),C(e,"class","toolbar-wrapper svelte-zkeoqb"),e.hidden=n=t[0]?!0:void 0},m(r,l){y(r,e,l),S(i,e,null),s=!0},p(r,[l]){const o={};l&2&&(o.$$scope={dirty:l,ctx:r}),i.$set(o),(!s||l&1&&n!==(n=r[0]?!0:void 0))&&(e.hidden=n)},i(r){s||(m(i.$$.fragment,r),s=!0)},o(r){g(i.$$.fragment,r),s=!1},d(r){r&&w(e),E(i)}}}function YU(t,e,i){let n;return U(t,Ke,s=>i(0,n=s)),[n]}class GU extends J{constructor(e){super(),X(this,e,YU,qU,Z,{},HU)}}function WU(t){ve(t,"svelte-16e6z3k",".results.svelte-16e6z3k.svelte-16e6z3k.svelte-16e6z3k{flex:auto;display:flex;gap:16px;overflow:hidden;padding:16px;height:100%}.results.svelte-16e6z3k>.group{flex:auto;display:flex;flex-direction:column;overflow:hidden;width:50%;height:100%}.results.svelte-16e6z3k h3.svelte-16e6z3k.svelte-16e6z3k{flex:none;margin:0 0 8px;color:var(--sui-secondary-foreground-color)}.results.svelte-16e6z3k h3.svelte-16e6z3k+div.svelte-16e6z3k{overflow:auto;flex:auto}")}function Gb(t,e,i){const n=t.slice();n[6]=e[i];const s=n[6];return n[7]=s.path,n[8]=s.name,n[9]=s.folder,n[10]=s.kind,n}function Wb(t,e,i){const n=t.slice();n[13]=e[i];const s=n[13];n[14]=s.slug,n[15]=s.locales,n[16]=s.fileName,n[17]=s.collectionName;const r=_i(n[17]);n[18]=r;const l=n[16]?n[18].files.find(function(...f){return t[4](n[16],...f)}):void 0;n[19]=l;const o=n[18]._i18n;n[20]=o.defaultLocale!==void 0?o.defaultLocale:"default";const a=n[20]in n[15]?n[20]:Object.keys(n[15])[0];n[21]=a;const c=n[15][n[21]]??{};return n[22]=c.content,n}function Qu(t){const e=t.slice(),i=e[18].fields?.find(({widget:n})=>n==="image");return e[25]=i,e}function KU(t){let e=t[0]("no_entries_found")+"",i;return{c(){i=q(e)},m(n,s){y(n,i,s)},p(n,s){s&1&&e!==(e=n[0]("no_entries_found")+"")&&W(i,e)},i:z,o:z,d(n){n&&w(i)}}}function ZU(t){let e,i;return e=new ir({props:{$$slots:{default:[lx]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&134217730&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function Kb(t){let e,i;function n(){return t[3](t[17],t[16],t[14])}return e=new vo({props:{$$slots:{default:[rx]},$$scope:{ctx:t}}}),e.$on("click",n),{c(){T(e.$$.fragment)},m(s,r){S(e,s,r),i=!0},p(s,r){t=s;const l={};r&134217730&&(l.$$scope={dirty:r,ctx:t}),e.$set(l)},i(s){i||(m(e.$$.fragment,s),i=!0)},o(s){g(e.$$.fragment,s),i=!1},d(s){E(e,s)}}}function Zb(t){let e,i,n,s={ctx:t,current:null,token:null,hasCatch:!1,pending:QU,then:JU,catch:XU,value:26,blocks:[,,,]};return Ts(i=ss(t[22][t[25]?.name],t[13]),s),{c(){e=K(),s.block.c()},m(r,l){y(r,e,l),s.block.m(r,s.anchor=l),s.mount=()=>e.parentNode,s.anchor=e,n=!0},p(r,l){t=r,s.ctx=t,l&2&&i!==(i=ss(t[22][t[25]?.name],t[13]))&&Ts(i,s)||cc(s,t,l)},i(r){n||(m(s.block),n=!0)},o(r){for(let l=0;l<3;l+=1){const o=s.blocks[l];g(o)}n=!1},d(r){r&&w(e),s.block.d(r),s.token=null,s=null}}}function XU(t){return{c:z,m:z,p:z,i:z,o:z,d:z}}function JU(t){let e,i;return e=new bi({props:{src:t[26],cover:!0}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&2&&(r.src=n[26]),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function QU(t){return{c:z,m:z,p:z,i:z,o:z,d:z}}function ex(t){let e,i,n=!t[19]&&Zb(Qu(t));return{c(){n&&n.c(),e=K()},m(s,r){n&&n.m(s,r),y(s,e,r),i=!0},p(s,r){s[19]?n&&(H(),g(n,1,1,()=>{n=null}),V()):n?(n.p(Qu(s),r),r&2&&m(n,1)):(n=Zb(Qu(s)),n.c(),m(n,1),n.m(e.parentNode,e))},i(s){i||(m(n),i=!0)},o(s){g(n),i=!1},d(s){s&&w(e),n&&n.d(s)}}}function tx(t){let e=(t[18].label||t[18].name)+"",i;return{c(){i=q(e)},m(n,s){y(n,i,s)},p(n,s){s&2&&e!==(e=(n[18].label||n[18].name)+"")&&W(i,e)},d(n){n&&w(i)}}}function nx(t){let e=(t[22][t[18].identifier_field]||t[22].title||t[22].name||t[22].label)+"",i;return{c(){i=q(e)},m(n,s){y(n,i,s)},p(n,s){s&2&&e!==(e=(n[22][n[18].identifier_field]||n[22].title||n[22].name||n[22].label)+"")&&W(i,e)},d(n){n&&w(i)}}}function ix(t){let e=t[19].label+"",i;return{c(){i=q(e)},m(n,s){y(n,i,s)},p(n,s){s&2&&e!==(e=n[19].label+"")&&W(i,e)},d(n){n&&w(i)}}}function sx(t){let e;function i(r,l){return r[19]?ix:nx}let n=i(t),s=n(t);return{c(){s.c(),e=K()},m(r,l){s.m(r,l),y(r,e,l)},p(r,l){n===(n=i(r))&&s?s.p(r,l):(s.d(1),s=n(r),s&&(s.c(),s.m(e.parentNode,e)))},d(r){r&&w(e),s.d(r)}}}function rx(t){let e,i,n,s,r,l,o;return e=new Mn({props:{class:"image",$$slots:{default:[ex]},$$scope:{ctx:t}}}),n=new Mn({props:{class:"collection",$$slots:{default:[tx]},$$scope:{ctx:t}}}),r=new Mn({props:{class:"title",$$slots:{default:[sx]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment),i=D(),T(n.$$.fragment),s=D(),T(r.$$.fragment),l=D()},m(a,c){S(e,a,c),y(a,i,c),S(n,a,c),y(a,s,c),S(r,a,c),y(a,l,c),o=!0},p(a,c){const u={};c&134217730&&(u.$$scope={dirty:c,ctx:a}),e.$set(u);const f={};c&134217730&&(f.$$scope={dirty:c,ctx:a}),n.$set(f);const d={};c&134217730&&(d.$$scope={dirty:c,ctx:a}),r.$set(d)},i(a){o||(m(e.$$.fragment,a),m(n.$$.fragment,a),m(r.$$.fragment,a),o=!0)},o(a){g(e.$$.fragment,a),g(n.$$.fragment,a),g(r.$$.fragment,a),o=!1},d(a){a&&(w(i),w(s),w(l)),E(e,a),E(n,a),E(r,a)}}}function Xb(t,e){let i,n,s,r=e[22]&&Kb(e);return{key:t,first:null,c(){i=K(),r&&r.c(),n=K(),this.first=i},m(l,o){y(l,i,o),r&&r.m(l,o),y(l,n,o),s=!0},p(l,o){e=l,e[22]?r?(r.p(e,o),o&2&&m(r,1)):(r=Kb(e),r.c(),m(r,1),r.m(n.parentNode,n)):r&&(H(),g(r,1,1,()=>{r=null}),V())},i(l){s||(m(r),s=!0)},o(l){g(r),s=!1},d(l){l&&(w(i),w(n)),r&&r.d(l)}}}function lx(t){let e=[],i=new Map,n,s,r=ce(t[1].entries);const l=o=>o[13].id;for(let o=0;o<r.length;o+=1){let a=Wb(t,r,o),c=l(a);i.set(c,e[o]=Xb(c,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();n=K()},m(o,a){for(let c=0;c<e.length;c+=1)e[c]&&e[c].m(o,a);y(o,n,a),s=!0},p(o,a){a&2&&(r=ce(o[1].entries),H(),e=ct(e,a,l,1,o,r,i,n.parentNode,at,Xb,n,Wb),V())},i(o){if(!s){for(let a=0;a<r.length;a+=1)m(e[a]);s=!0}},o(o){for(let a=0;a<e.length;a+=1)g(e[a]);s=!1},d(o){o&&w(n);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function ox(t){let e,i=t[0]("entries")+"",n,s,r,l,o,a;const c=[ZU,KU],u=[];function f(d,p){return d[1]?.entries?.length?0:1}return l=f(t),o=u[l]=c[l](t),{c(){e=I("h3"),n=q(i),s=D(),r=I("div"),o.c(),C(e,"id","search-results-entries"),C(e,"class","svelte-16e6z3k"),C(r,"class","svelte-16e6z3k")},m(d,p){y(d,e,p),O(e,n),y(d,s,p),y(d,r,p),u[l].m(r,null),a=!0},p(d,p){(!a||p&1)&&i!==(i=d[0]("entries")+"")&&W(n,i);let h=l;l=f(d),l===h?u[l].p(d,p):(H(),g(u[h],1,1,()=>{u[h]=null}),V(),o=u[l],o?o.p(d,p):(o=u[l]=c[l](d),o.c()),m(o,1),o.m(r,null))},i(d){a||(m(o),a=!0)},o(d){g(o),a=!1},d(d){d&&(w(e),w(s),w(r)),u[l].d()}}}function ax(t){let e=t[0]("no_files_found")+"",i;return{c(){i=q(e)},m(n,s){y(n,i,s)},p(n,s){s&1&&e!==(e=n[0]("no_files_found")+"")&&W(i,e)},i:z,o:z,d(n){n&&w(i)}}}function cx(t){let e,i;return e=new ir({props:{$$slots:{default:[mx]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&134217734&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function Jb(t){let e,i;return e=new bi({props:{asset:t[6],checkerboard:!0,cover:!0}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&2&&(r.asset=n[6]),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function Qb(t){let e,i;return e=new bl({props:{asset:t[6],cover:!0}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&2&&(r.asset=n[6]),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function ux(t){let e,i,n,s=t[10]==="image"&&Jb(t),r=t[10]==="video"&&Qb(t);return{c(){s&&s.c(),e=D(),r&&r.c(),i=K()},m(l,o){s&&s.m(l,o),y(l,e,o),r&&r.m(l,o),y(l,i,o),n=!0},p(l,o){l[10]==="image"?s?(s.p(l,o),o&2&&m(s,1)):(s=Jb(l),s.c(),m(s,1),s.m(e.parentNode,e)):s&&(H(),g(s,1,1,()=>{s=null}),V()),l[10]==="video"?r?(r.p(l,o),o&2&&m(r,1)):(r=Qb(l),r.c(),m(r,1),r.m(i.parentNode,i)):r&&(H(),g(r,1,1,()=>{r=null}),V())},i(l){n||(m(s),m(r),n=!0)},o(l){g(s),g(r),n=!1},d(l){l&&(w(e),w(i)),s&&s.d(l),r&&r.d(l)}}}function fx(t){let e=(t[2]?Wa(t[9]):"")+"",i;return{c(){i=q(e)},m(n,s){y(n,i,s)},p(n,s){s&6&&e!==(e=(n[2]?Wa(n[9]):"")+"")&&W(i,e)},d(n){n&&w(i)}}}function dx(t){let e=t[8]+"",i;return{c(){i=q(e)},m(n,s){y(n,i,s)},p(n,s){s&2&&e!==(e=n[8]+"")&&W(i,e)},d(n){n&&w(i)}}}function px(t){let e,i,n,s,r,l,o;return e=new Mn({props:{class:"image",$$slots:{default:[ux]},$$scope:{ctx:t}}}),n=new Mn({props:{class:"collection",$$slots:{default:[fx]},$$scope:{ctx:t}}}),r=new Mn({props:{class:"title",$$slots:{default:[dx]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment),i=D(),T(n.$$.fragment),s=D(),T(r.$$.fragment),l=D()},m(a,c){S(e,a,c),y(a,i,c),S(n,a,c),y(a,s,c),S(r,a,c),y(a,l,c),o=!0},p(a,c){const u={};c&134217730&&(u.$$scope={dirty:c,ctx:a}),e.$set(u);const f={};c&134217734&&(f.$$scope={dirty:c,ctx:a}),n.$set(f);const d={};c&134217730&&(d.$$scope={dirty:c,ctx:a}),r.$set(d)},i(a){o||(m(e.$$.fragment,a),m(n.$$.fragment,a),m(r.$$.fragment,a),o=!0)},o(a){g(e.$$.fragment,a),g(n.$$.fragment,a),g(r.$$.fragment,a),o=!1},d(a){a&&(w(i),w(s),w(l)),E(e,a),E(n,a),E(r,a)}}}function e0(t,e){let i,n,s;function r(){return e[5](e[7])}return n=new vo({props:{$$slots:{default:[px]},$$scope:{ctx:e}}}),n.$on("click",r),{key:t,first:null,c(){i=K(),T(n.$$.fragment),this.first=i},m(l,o){y(l,i,o),S(n,l,o),s=!0},p(l,o){e=l;const a={};o&134217734&&(a.$$scope={dirty:o,ctx:e}),n.$set(a)},i(l){s||(m(n.$$.fragment,l),s=!0)},o(l){g(n.$$.fragment,l),s=!1},d(l){l&&w(i),E(n,l)}}}function mx(t){let e=[],i=new Map,n,s,r=ce(t[1].assets);const l=o=>o[6].path;for(let o=0;o<r.length;o+=1){let a=Gb(t,r,o),c=l(a);i.set(c,e[o]=e0(c,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();n=K()},m(o,a){for(let c=0;c<e.length;c+=1)e[c]&&e[c].m(o,a);y(o,n,a),s=!0},p(o,a){a&6&&(r=ce(o[1].assets),H(),e=ct(e,a,l,1,o,r,i,n.parentNode,at,e0,n,Gb),V())},i(o){if(!s){for(let a=0;a<r.length;a+=1)m(e[a]);s=!0}},o(o){for(let a=0;a<e.length;a+=1)g(e[a]);s=!1},d(o){o&&w(n);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function hx(t){let e,i=t[0]("assets")+"",n,s,r,l,o,a;const c=[cx,ax],u=[];function f(d,p){return d[1]?.assets?.length?0:1}return l=f(t),o=u[l]=c[l](t),{c(){e=I("h3"),n=q(i),s=D(),r=I("div"),o.c(),C(e,"id","search-results-assets"),C(e,"class","svelte-16e6z3k"),C(r,"class","svelte-16e6z3k")},m(d,p){y(d,e,p),O(e,n),y(d,s,p),y(d,r,p),u[l].m(r,null),a=!0},p(d,p){(!a||p&1)&&i!==(i=d[0]("assets")+"")&&W(n,i);let h=l;l=f(d),l===h?u[l].p(d,p):(H(),g(u[h],1,1,()=>{u[h]=null}),V(),o=u[l],o?o.p(d,p):(o=u[l]=c[l](d),o.c()),m(o,1),o.m(r,null))},i(d){a||(m(o),a=!0)},o(d){g(o),a=!1},d(d){d&&(w(e),w(s),w(r)),u[l].d()}}}function gx(t){let e,i,n,s,r;return i=new _n({props:{"aria-labelledby":"search-results-entries",$$slots:{default:[ox]},$$scope:{ctx:t}}}),s=new _n({props:{"aria-labelledby":"search-results-assets",$$slots:{default:[hx]},$$scope:{ctx:t}}}),{c(){e=I("div"),T(i.$$.fragment),n=D(),T(s.$$.fragment),C(e,"class","results svelte-16e6z3k")},m(l,o){y(l,e,o),S(i,e,null),O(e,n),S(s,e,null),r=!0},p(l,[o]){const a={};o&134217731&&(a.$$scope={dirty:o,ctx:l}),i.$set(a);const c={};o&134217735&&(c.$$scope={dirty:o,ctx:l}),s.$set(c)},i(l){r||(m(i.$$.fragment,l),m(s.$$.fragment,l),r=!0)},o(l){g(i.$$.fragment,l),g(s.$$.fragment,l),r=!1},d(l){l&&w(e),E(i),E(s)}}}function _x(t,e,i){let n,s,r;return U(t,pe,c=>i(0,n=c)),U(t,CU,c=>i(1,s=c)),U(t,Vt,c=>i(2,r=c)),[n,s,r,(c,u,f)=>{zt(`/collections/${c}/entries/${u||f}`)},(c,{name:u})=>u===c,c=>{zt(`/assets/${c}`)}]}class bx extends J{constructor(e){super(),X(this,e,_x,gx,Z,{},WU)}}function vx(t){let e,i=t[1]("search_results_for_x",{values:{terms:t[0]}})+"",n;return{c(){e=I("h2"),n=q(i)},m(s,r){y(s,e,r),O(e,n)},p(s,r){r&3&&i!==(i=s[1]("search_results_for_x",{values:{terms:s[0]}})+"")&&W(n,i)},d(s){s&&w(e)}}}function kx(t){let e,i;return e=new cs({props:{class:"primary",slot:"primary_toolbar",$$slots:{default:[vx]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&19&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function wx(t){let e,i;return e=new bx({props:{slot:"main"}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p:z,i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function yx(t){let e,i,n,s;return e=new Oo({props:{class:"content",$$slots:{main:[wx],primary_toolbar:[kx]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(r,l){S(e,r,l),i=!0,n||(s=je(window,"hashchange",t[3]),n=!0)},p(r,[l]){const o={};l&19&&(o.$$scope={dirty:l,ctx:r}),e.$set(o)},i(r){i||(m(e.$$.fragment,r),i=!0)},o(r){g(e.$$.fragment,r),i=!1},d(r){E(e,r),n=!1,s()}}}function $x(t,e,i){let n,s;U(t,fo,o=>i(0,n=o)),U(t,pe,o=>i(1,s=o));const r=()=>{const{path:o}=Eo(),[,a]=o.match(/^\/search\/(.+)$/)??[];a&&a!==n&&Me(fo,n=a,n)};return on(()=>{r()}),[n,s,r,()=>{r()}]}class Sx extends J{constructor(e){super(),X(this,e,$x,yx,Z,{})}}function Ex(t){ve(t,"svelte-h66xcq",".columns.svelte-h66xcq.svelte-h66xcq{flex:auto;display:flex}.columns.svelte-h66xcq .column.svelte-h66xcq{flex:auto;width:33.3333333333%}.columns.svelte-h66xcq .column.svelte-h66xcq:not(:last-child){border-width:0 1px 0 0;border-color:var(--sui-primary-border-color)}.columns.svelte-h66xcq .column header.svelte-h66xcq{display:flex;align-items:center;border-width:0 0 1px 0;border-color:var(--sui-primary-border-color);padding:0 16px;height:40px;background-color:var(--sui-tertiary-background-color)}")}function Tx(t){let e,i,n,s,r=t[0]("status.drafts")+"",l,o,a,c,u,f=t[0]("status.in_review")+"",d,p,h,_,b,k=t[0]("status.ready")+"",v,$;return{c(){e=I("div"),i=I("div"),n=I("header"),s=I("h3"),l=q(r),o=D(),a=I("div"),c=I("header"),u=I("h3"),d=q(f),p=D(),h=I("div"),_=I("header"),b=I("h3"),v=q(k),C(n,"class","svelte-h66xcq"),C(i,"class","column svelte-h66xcq"),C(c,"class","svelte-h66xcq"),C(a,"class","column svelte-h66xcq"),C(_,"class","svelte-h66xcq"),C(h,"class","column svelte-h66xcq"),C(e,"class","columns svelte-h66xcq"),C(e,"aria-label",$=t[0]("editorial_workflow"))},m(L,A){y(L,e,A),O(e,i),O(i,n),O(n,s),O(s,l),O(e,o),O(e,a),O(a,c),O(c,u),O(u,d),O(e,p),O(e,h),O(h,_),O(_,b),O(b,v)},p(L,A){A&1&&r!==(r=L[0]("status.drafts")+"")&&W(l,r),A&1&&f!==(f=L[0]("status.in_review")+"")&&W(d,f),A&1&&k!==(k=L[0]("status.ready")+"")&&W(v,k),A&1&&$!==($=L[0]("editorial_workflow"))&&C(e,"aria-label",$)},d(L){L&&w(e)}}}function Ox(t){let e,i;return e=new Oo({props:{class:"content",$$slots:{main:[Tx]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,[s]){const r={};s&3&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function Ax(t,e,i){let n;return U(t,pe,s=>i(0,n=s)),[n]}class Lx extends J{constructor(e){super(),X(this,e,Ax,Ox,Z,{},Ex)}}const{window:Nx}=s0;function Px(t){ve(t,"svelte-v9927r",".outer.svelte-v9927r{display:flex;flex-direction:column;position:fixed;inset:0;overflow:hidden}")}function Ix(t){let e,i,n,s,r,l,o,a,c,u,f;i=new GU({});var d=t[0][t[2]];function p(h,_){return{}}return d&&(s=Zt(d,p())),l=new u8({}),a=new OF({}),{c(){e=I("div"),T(i.$$.fragment),n=D(),s&&T(s.$$.fragment),r=D(),T(l.$$.fragment),o=D(),T(a.$$.fragment),C(e,"class","outer svelte-v9927r")},m(h,_){y(h,e,_),S(i,e,null),O(e,n),s&&S(s,e,null),y(h,r,_),S(l,h,_),y(h,o,_),S(a,h,_),c=!0,u||(f=je(Nx,"hashchange",t[3]),u=!0)},p(h,[_]){if(_&4&&d!==(d=h[0][h[2]])){if(s){H();const b=s;g(b.$$.fragment,1,0,()=>{E(b,1)}),V()}d?(s=Zt(d,p()),T(s.$$.fragment),m(s.$$.fragment,1),S(s,e,null)):s=null}},i(h){c||(m(i.$$.fragment,h),s&&m(s.$$.fragment,h),m(l.$$.fragment,h),m(a.$$.fragment,h),c=!0)},o(h){g(i.$$.fragment,h),s&&g(s.$$.fragment,h),g(l.$$.fragment,h),g(a.$$.fragment,h),c=!1},d(h){h&&(w(e),w(r),w(o)),E(i),s&&E(s),E(l,h),E(a,h),u=!1,f()}}}function Cx(t,e,i){let n;U(t,da,o=>i(2,n=o));const s={collections:yF,assets:s8,search:Sx,workflow:Lx,config:h8},r=()=>{const{path:o}=Eo(),[,a]=o.match(`^\\/(${Object.keys(s).join("|")})\\b`)??[];a?ne(da)!==a&&da.set(a):window.location.replace(`#/collections/${ne(Lt).name}`)};return on(()=>{r()}),[s,r,n,()=>{r()}]}class Dx extends J{constructor(e){super(),X(this,e,Cx,Ix,Z,{pages:0,selectPage:1},Px)}get pages(){return this.$$.ctx[0]}get selectPage(){return this.$$.ctx[1]}}function t0(t){let e,i,n,s;const r=[jx,Mx],l=[];function o(a,c){return a[1]&&a[2]?0:1}return e=o(t),i=l[e]=r[e](t),{c(){i.c(),n=K()},m(a,c){l[e].m(a,c),y(a,n,c),s=!0},p(a,c){let u=e;e=o(a),e!==u&&(H(),g(l[u],1,1,()=>{l[u]=null}),V(),i=l[e],i||(i=l[e]=r[e](a),i.c()),m(i,1),i.m(n.parentNode,n))},i(a){s||(m(i),s=!0)},o(a){g(i),s=!1},d(a){a&&w(n),l[e].d(a)}}}function Mx(t){let e,i;return e=new rN({}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function jx(t){let e,i;return e=new Dx({}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function Rx(t){let e,i,n=!t[0]&&t0(t);return{c(){n&&n.c(),e=K()},m(s,r){n&&n.m(s,r),y(s,e,r),i=!0},p(s,r){s[0]?n&&(H(),g(n,1,1,()=>{n=null}),V()):n?(n.p(s,r),r&1&&m(n,1)):(n=t0(s),n.c(),m(n,1),n.m(e.parentNode,e))},i(s){i||(m(n),i=!0)},o(s){g(n),i=!1},d(s){s&&w(e),n&&n.d(s)}}}function Fx(t){let e,i,n,s,r,l,o;return l=new ZE({props:{$$slots:{default:[Rx]},$$scope:{ctx:t}}}),{c(){e=I("base"),i=I("meta"),n=I("link"),s=K(),r=D(),T(l.$$.fragment),C(e,"target","_blank"),C(i,"name","referrer"),C(i,"content","same-origin"),C(n,"rel","icon"),C(n,"href","data:image/svg+xml;base64,"+btoa(df)),C(n,"type","image/svg+xml")},m(a,c){O(document.head,e),O(document.head,i),O(document.head,n),O(document.head,s),y(a,r,c),S(l,a,c),o=!0},p(a,[c]){const u={};c&23&&(u.$$scope={dirty:c,ctx:a}),l.$set(u)},i(a){o||(m(l.$$.fragment,a),o=!0)},o(a){g(l.$$.fragment,a),o=!1},d(a){a&&w(r),w(e),w(i),w(n),w(s),E(l,a)}}}function Ux(t,e,i){let n,s,r;return U(t,na,l=>i(0,n=l)),U(t,Pi,l=>i(1,s=l)),U(t,to,l=>i(2,r=l)),k8(),[n,s,r]}class xx extends J{constructor(e){super(),X(this,e,Ux,Fx,Z,{})}}new xx({target:document.getElementById("nc-root")??document.body});window.CMS=new Proxy({},{get:(t,e)=>{if(e in t)return t[e];if(["getBackend","getEditorComponents","getEventListeners","getLocale","getMediaLibrary","getPreviewStyles","getPreviewTemplate","getRemarkPlugins","getWidget","getWidgetValueSerializer","getWidgets","init","invokeEvent","moment","registerBackend","registerCustomFormat","registerEditorComponent","registerEventListener","registerLocale","registerMediaLibrary","registerPreviewStyle","registerPreviewTemplate","registerRemarkPlugin","registerWidget","registerWidgetValueSerializer","removeEventListener","resolveWidget"].includes(e))return console.error(`CMS.${e}() is not yet supported in Sveltia CMS. See https://github.com/sveltia/sveltia-cms#readme for compatibility information.`),()=>{}}})});export default zx();
|
|
438
|
+
fe.version="2.29.4";x8(kt);fe.fn=le;fe.min=OC;fe.max=AC;fe.now=LC;fe.utc=Di;fe.unix=iM;fe.months=rM;fe.isDate=Ao;fe.locale=Es;fe.invalid=Hc;fe.duration=vi;fe.isMoment=pi;fe.weekdays=oM;fe.parseZone=sM;fe.localeData=us;fe.isDuration=ma;fe.monthsShort=lM;fe.weekdaysMin=cM;fe.defineLocale=Op;fe.updateLocale=sC;fe.locales=rC;fe.weekdaysShort=aM;fe.normalizeUnits=si;fe.relativeTimeRounding=RM;fe.relativeTimeThreshold=FM;fe.calendarFormat=eD;fe.prototype=le;fe.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"};const xM=(t,e)=>{const{format:i,date_format:n,picker_utc:s=!1}=e,r=n===!1;if(t==="")return"";if(t){if(r)return t;try{return i?(s?fe.utc(t):fe(t)).format(i):new Date(t).toISOString()}catch{return}}},zM=(t,e)=>{const{required:i=!0,format:n,date_format:s,time_format:r,picker_utc:l=!1}=e,o=r===!1,a=s===!1;if(!(!i&&!t)){if(o&&t?.match(/^\d{4}-\d{2}-\d{2}$/)||a&&t?.match(/^\d{2}:\d{2}$/))return t;try{const{year:c,month:u,day:f,hour:d,minute:p}=Pc({date:t?(l?fe.utc(t,n):fe(t,n)).toDate():new Date,timeZone:l?"UTC":void 0}),h=`${c}-${u}-${f}`,_=`${d}:${p}`;return o?h:a?_:`${h}T${_}`}catch{return}}},BM=(t,e)=>{const{format:i,date_format:n,picker_utc:s=!1}=e,r=n===!1;if(t)try{return i?s?fe.utc(t,i).toDate():fe(t,i).toDate():r?new Date(new Date(`${new Date().toJSON().split("T")[0]}T${t}`)):new Date(t)}catch{return}};function HM(t){ve(t,"svelte-1pvuczz","div.svelte-1pvuczz.svelte-1pvuczz{display:flex;align-items:center}div.svelte-1pvuczz input.svelte-1pvuczz{margin-right:auto;color:inherit;background-color:transparent;font-family:var(--sui-textbox-font-family)}div.svelte-1pvuczz input.svelte-1pvuczz:disabled{opacity:0.4}div.svelte-1pvuczz button{margin:4px}")}function VM(t){let e,i,n;return{c(){e=I("input"),C(e,"type","datetime-local"),e.disabled=t[0],C(e,"class","svelte-1pvuczz")},m(s,r){y(s,e,r),Jn(e,t[1]),i||(n=je(e,"input",t[12]),i=!0)},p(s,r){r&1&&(e.disabled=s[0]),r&2&&Jn(e,s[1])},d(s){s&&w(e),i=!1,n()}}}function qM(t){let e,i,n;return{c(){e=I("input"),C(e,"type","time"),e.disabled=t[0],C(e,"class","svelte-1pvuczz")},m(s,r){y(s,e,r),Jn(e,t[1]),i||(n=je(e,"input",t[11]),i=!0)},p(s,r){r&1&&(e.disabled=s[0]),r&2&&Jn(e,s[1])},d(s){s&&w(e),i=!1,n()}}}function YM(t){let e,i,n;return{c(){e=I("input"),C(e,"type","date"),e.disabled=t[0],C(e,"class","svelte-1pvuczz")},m(s,r){y(s,e,r),Jn(e,t[1]),i||(n=je(e,"input",t[10]),i=!0)},p(s,r){r&1&&(e.disabled=s[0]),r&2&&Jn(e,s[1])},d(s){s&&w(e),i=!1,n()}}}function GM(t){let e;function i(r,l){return r[3]?YM:r[2]?qM:VM}let n=i(t),s=n(t);return{c(){e=I("div"),s.c(),C(e,"class","svelte-1pvuczz")},m(r,l){y(r,e,l),s.m(e,null)},p(r,[l]){n===(n=i(r))&&s?s.p(r,l):(s.d(1),s=n(r),s&&(s.c(),s.m(e,null)))},i:z,o:z,d(r){r&&w(e),s.d()}}}function WM(t,e,i){let n,s,r,l,{locale:o}=e,{keyPath:a}=e,{fieldConfig:c}=e,{currentValue:u}=e,{disabled:f=!1}=e,d;const p=()=>{const v=xM(d,c);v!==void 0&&v!==u&&i(4,u=v)},h=()=>{const v=zM(u,c);v!==void 0&&v!==d&&i(1,d=v)};function _(){d=this.value,i(1,d)}function b(){d=this.value,i(1,d)}function k(){d=this.value,i(1,d)}return t.$$set=v=>{"locale"in v&&i(5,o=v.locale),"keyPath"in v&&i(6,a=v.keyPath),"fieldConfig"in v&&i(7,c=v.fieldConfig),"currentValue"in v&&i(4,u=v.currentValue),"disabled"in v&&i(0,f=v.disabled)},t.$$.update=()=>{t.$$.dirty&128&&i(8,{date_format:n,time_format:s}=c,n,(i(9,s),i(7,c))),t.$$.dirty&512&&i(3,r=s===!1),t.$$.dirty&256&&i(2,l=n===!1),t.$$.dirty&2&&p(),t.$$.dirty&16&&h()},[f,d,l,r,u,o,a,c,n,s,_,b,k]}class d_ extends J{constructor(e){super(),X(this,e,WM,GM,Z,{locale:5,keyPath:6,fieldConfig:7,currentValue:4,disabled:0},HM)}}function p_(t){let e;function i(r,l){return r[3]?ZM:KM}let n=i(t),s=n(t);return{c(){e=I("p"),s.c()},m(r,l){y(r,e,l),s.m(e,null)},p(r,l){n===(n=i(r))&&s?s.p(r,l):(s.d(1),s=n(r),s&&(s.c(),s.m(e,null)))},d(r){r&&w(e),s.d()}}}function KM(t){let e,i;function n(l,o){return l[4]?JM:XM}let s=n(t),r=s(t);return{c(){e=I("time"),r.c(),C(e,"datetime",i=t[2].toJSON())},m(l,o){y(l,e,o),r.m(e,null)},p(l,o){s===(s=n(l))&&r?r.p(l,o):(r.d(1),r=s(l),r&&(r.c(),r.m(e,null))),o&4&&i!==(i=l[2].toJSON())&&C(e,"datetime",i)},d(l){l&&w(e),r.d()}}}function ZM(t){let e=t[2].toLocaleTimeString(t[0],t[7])+"",i;return{c(){i=q(e)},m(n,s){y(n,i,s)},p(n,s){s&5&&e!==(e=n[2].toLocaleTimeString(n[0],n[7])+"")&&W(i,e)},d(n){n&&w(i)}}}function XM(t){let e=t[2].toLocaleString(t[0],{...t[6],...t[7],timeZone:t[5]?"UTC":void 0})+"",i;return{c(){i=q(e)},m(n,s){y(n,i,s)},p(n,s){s&37&&e!==(e=n[2].toLocaleString(n[0],{...n[6],...n[7],timeZone:n[5]?"UTC":void 0})+"")&&W(i,e)},d(n){n&&w(i)}}}function JM(t){let e=t[2].toLocaleDateString(t[0],{...t[6],timeZone:t[5]||t[4]&&t[1]?.match(/^\d{4}-[01]\d-[0-3]\d$/)||t[4]&&t[1]?.match(/T00:00(?::00)?(?:\.000)?Z$/)?"UTC":void 0})+"",i;return{c(){i=q(e)},m(n,s){y(n,i,s)},p(n,s){s&55&&e!==(e=n[2].toLocaleDateString(n[0],{...n[6],timeZone:n[5]||n[4]&&n[1]?.match(/^\d{4}-[01]\d-[0-3]\d$/)||n[4]&&n[1]?.match(/T00:00(?::00)?(?:\.000)?Z$/)?"UTC":void 0})+"")&&W(i,e)},d(n){n&&w(i)}}}function QM(t){let e,i=t[2]&&p_(t);return{c(){i&&i.c(),e=K()},m(n,s){i&&i.m(n,s),y(n,e,s)},p(n,[s]){n[2]?i?i.p(n,s):(i=p_(n),i.c(),i.m(e.parentNode,e)):i&&(i.d(1),i=null)},i:z,o:z,d(n){n&&w(e),i&&i.d(n)}}}function e5(t,e,i){let n,s,r,l,o,a,{locale:c}=e,{keyPath:u}=e,{fieldConfig:f}=e,{currentValue:d}=e;const p={year:"numeric",month:"short",day:"numeric"},h={hour:"numeric",minute:"numeric",hour12:!0};return t.$$set=_=>{"locale"in _&&i(0,c=_.locale),"keyPath"in _&&i(8,u=_.keyPath),"fieldConfig"in _&&i(9,f=_.fieldConfig),"currentValue"in _&&i(1,d=_.currentValue)},t.$$.update=()=>{t.$$.dirty&512&&i(10,{date_format:n,time_format:s,picker_utc:r=!1}=f,n,(i(11,s),i(9,f)),(i(5,r),i(9,f))),t.$$.dirty&2048&&i(4,l=s===!1),t.$$.dirty&1024&&i(3,o=n===!1),t.$$.dirty&514&&i(2,a=BM(d,f))},[c,d,a,o,l,r,p,h,u,f,n,s]}class m_ extends J{constructor(e){super(),X(this,e,e5,QM,Z,{locale:0,keyPath:8,fieldConfig:9,currentValue:1})}}function t5(t){ve(t,"svelte-8fg15v",'.wrapper.svelte-8fg15v{display:contents}.wrapper.svelte-8fg15v .listbox{gap:4px;overflow-x:hidden;overflow-y:auto;border-width:0;height:100%}.wrapper.svelte-8fg15v .listbox .option button{border-radius:var(--sui-control-medium-border-radius);padding:4px;width:100%;height:auto;transition:none}.wrapper.svelte-8fg15v .listbox .option button img,.wrapper.svelte-8fg15v .listbox .option button video{flex:none;border-radius:var(--sui-control-medium-border-radius);aspect-ratio:1/1;object-fit:contain}.wrapper.svelte-8fg15v .listbox .option button[aria-selected="true"]{outline-width:4px;outline-style:solid;outline-color:var(--sui-primary-accent-color)}.wrapper.svelte-8fg15v .listbox .option button[aria-selected="true"] .icon{display:none}.wrapper.svelte-8fg15v .listbox.grid{display:grid;grid-template-columns:repeat(auto-fill, minmax(160px, 1fr));height:auto;max-height:100%}.wrapper.svelte-8fg15v .listbox.grid .option button img,.wrapper.svelte-8fg15v .listbox.grid .option button video{width:100%}.wrapper.svelte-8fg15v .listbox.grid .option button .name:not(:only-child){position:absolute;left:-99999px}.wrapper.svelte-8fg15v .listbox.list .option button{gap:16px}.wrapper.svelte-8fg15v .listbox.list .option button img,.wrapper.svelte-8fg15v .listbox.list .option button video{width:48px}.wrapper.svelte-8fg15v .listbox.list .option button .name{flex:auto;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;white-space:normal;line-height:var(--sui-line-height-compact)}')}function n5(t){let e;const i=t[1].default,n=Ne(i,t,t[3],null);return{c(){n&&n.c()},m(s,r){n&&n.m(s,r),e=!0},p(s,r){n&&n.p&&(!e||r&8)&&Ie(n,i,s,s[3],e?Pe(i,s[3],r,null):Ce(s[3]),null)},i(s){e||(m(n,s),e=!0)},o(s){g(n,s),e=!1},d(s){n&&n.d(s)}}}function i5(t){let e,i,n;return i=new _o({props:{class:t[0],$$slots:{default:[n5]},$$scope:{ctx:t}}}),i.$on("select",t[2]),{c(){e=I("div"),T(i.$$.fragment),C(e,"class","wrapper svelte-8fg15v")},m(s,r){y(s,e,r),S(i,e,null),n=!0},p(s,[r]){const l={};r&1&&(l.class=s[0]),r&8&&(l.$$scope={dirty:r,ctx:s}),i.$set(l)},i(s){n||(m(i.$$.fragment,s),n=!0)},o(s){g(i.$$.fragment,s),n=!1},d(s){s&&w(e),E(i)}}}function s5(t,e,i){let{$$slots:n={},$$scope:s}=e,{viewType:r="grid"}=e;function l(o){Ue.call(this,t,o)}return t.$$set=o=>{"viewType"in o&&i(0,r=o.viewType),"$$scope"in o&&i(3,s=o.$$scope)},[r,n,l,s]}class ay extends J{constructor(e){super(),X(this,e,s5,i5,Z,{viewType:0},t5)}}function r5(t){ve(t,"svelte-1943iam",".grid-wrapper.svelte-1943iam{display:contents}")}function h_(t,e,i){const n=t.slice();return n[7]=e[i],n}function l5(t){let e,i;return e=new Ln({props:{$$slots:{default:[a5]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&1032&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function o5(t){let e,i,n;return i=new ay({props:{viewType:t[2]?.type,$$slots:{default:[u5]},$$scope:{ctx:t}}}),i.$on("select",t[6]),{c(){e=I("div"),T(i.$$.fragment),C(e,"class","grid-wrapper svelte-1943iam")},m(s,r){y(s,e,r),S(i,e,null),n=!0},p(s,r){const l={};r&4&&(l.viewType=s[2]?.type),r&1026&&(l.$$scope={dirty:r,ctx:s}),i.$set(l)},i(s){n||(m(i.$$.fragment,s),n=!0)},o(s){g(i.$$.fragment,s),n=!1},d(s){s&&w(e),E(i)}}}function a5(t){let e,i=t[3]("no_files_found")+"",n;return{c(){e=I("span"),n=q(i)},m(s,r){y(s,e,r),O(e,n)},p(s,r){r&8&&i!==(i=s[3]("no_files_found")+"")&&W(n,i)},d(s){s&&w(e)}}}function g_(t){let e,i;return e=new bi({props:{asset:t[7],checkerboard:!0}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&2&&(r.asset=n[7]),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function __(t){let e,i;return e=new bl({props:{asset:t[7]}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&2&&(r.asset=n[7]),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function c5(t){let e,i,n,s=t[7].name+"",r,l,o,a=t[7].kind==="image"&&g_(t),c=t[7].kind==="video"&&__(t);return{c(){a&&a.c(),e=D(),c&&c.c(),i=D(),n=I("span"),r=q(s),l=D(),C(n,"class","name")},m(u,f){a&&a.m(u,f),y(u,e,f),c&&c.m(u,f),y(u,i,f),y(u,n,f),O(n,r),y(u,l,f),o=!0},p(u,f){u[7].kind==="image"?a?(a.p(u,f),f&2&&m(a,1)):(a=g_(u),a.c(),m(a,1),a.m(e.parentNode,e)):a&&(H(),g(a,1,1,()=>{a=null}),V()),u[7].kind==="video"?c?(c.p(u,f),f&2&&m(c,1)):(c=__(u),c.c(),m(c,1),c.m(i.parentNode,i)):c&&(H(),g(c,1,1,()=>{c=null}),V()),(!o||f&2)&&s!==(s=u[7].name+"")&&W(r,s)},i(u){o||(m(a),m(c),o=!0)},o(u){g(a),g(c),o=!1},d(u){u&&(w(e),w(i),w(n),w(l)),a&&a.d(u),c&&c.d(u)}}}function b_(t,e){let i,n,s;return n=new ni({props:{value:e[7].sha,$$slots:{default:[c5]},$$scope:{ctx:e}}}),{key:t,first:null,c(){i=K(),T(n.$$.fragment),this.first=i},m(r,l){y(r,i,l),S(n,r,l),s=!0},p(r,l){e=r;const o={};l&2&&(o.value=e[7].sha),l&1026&&(o.$$scope={dirty:l,ctx:e}),n.$set(o)},i(r){s||(m(n.$$.fragment,r),s=!0)},o(r){g(n.$$.fragment,r),s=!1},d(r){r&&w(i),E(n,r)}}}function u5(t){let e=[],i=new Map,n,s,r=ce(t[1]);const l=o=>o[7].path;for(let o=0;o<r.length;o+=1){let a=h_(t,r,o),c=l(a);i.set(c,e[o]=b_(c,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();n=K()},m(o,a){for(let c=0;c<e.length;c+=1)e[c]&&e[c].m(o,a);y(o,n,a),s=!0},p(o,a){a&2&&(r=ce(o[1]),H(),e=ct(e,a,l,1,o,r,i,n.parentNode,at,b_,n,h_),V())},i(o){if(!s){for(let a=0;a<r.length;a+=1)m(e[a]);s=!0}},o(o){for(let a=0;a<e.length;a+=1)g(e[a]);s=!1},d(o){o&&w(n);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function f5(t){let e,i,n,s;const r=[o5,l5],l=[];function o(a,c){return a[1].length?0:1}return e=o(t),i=l[e]=r[e](t),{c(){i.c(),n=K()},m(a,c){l[e].m(a,c),y(a,n,c),s=!0},p(a,[c]){let u=e;e=o(a),e===u?l[e].p(a,c):(H(),g(l[u],1,1,()=>{l[u]=null}),V(),i=l[e],i?i.p(a,c):(i=l[e]=r[e](a),i.c()),m(i,1),i.m(n.parentNode,n))},i(a){s||(m(i),s=!0)},o(a){g(i),s=!1},d(a){a&&w(n),l[e].d(a)}}}function d5(t,e,i){let n,s,r;U(t,To,u=>i(2,s=u)),U(t,pe,u=>i(3,r=u));const l=os();let{assets:o=[]}=e,{searchTerms:a=""}=e;const c=u=>{l("select",{asset:o.find(({sha:f})=>f===u.detail.value)})};return t.$$set=u=>{"assets"in u&&i(0,o=u.assets),"searchTerms"in u&&i(5,a=u.searchTerms)},t.$$.update=()=>{t.$$.dirty&33&&i(1,n=a?o.filter(({name:u})=>u.toLowerCase().includes(a.toLowerCase())):o)},[o,n,s,r,l,a,c]}class jp extends J{constructor(e){super(),X(this,e,d5,f5,Z,{assets:0,searchTerms:5},r5)}}function p5(t){ve(t,"svelte-t9mjci","p.svelte-t9mjci{margin:0 0 8px}.input-outer.svelte-t9mjci{width:400px;text-align:center}")}function v_(t,e,i){const n=t.slice();return n[35]=e[i].id,n[36]=e[i].previewURL,n[37]=e[i].description,n[38]=e[i].kind,n}function m5(t){let e,i;return e=new Ln({props:{$$slots:{default:[_5]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s[0]&262144|s[1]&1024&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function h5(t){let e,i;return e=new Ln({props:{$$slots:{default:[b5]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s[0]&523901|s[1]&1024&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function g5(t){let e,i,n,s;const r=[y5,w5,k5,v5],l=[];function o(a,c){return a[8]?0:a[7]?a[7].length?3:2:1}return e=o(t),i=l[e]=r[e](t),{c(){i.c(),n=K()},m(a,c){l[e].m(a,c),y(a,n,c),s=!0},p(a,c){let u=e;e=o(a),e===u?l[e].p(a,c):(H(),g(l[u],1,1,()=>{l[u]=null}),V(),i=l[e],i?i.p(a,c):(i=l[e]=r[e](a),i.c()),m(i,1),i.m(n.parentNode,n))},i(a){s||(m(i),s=!0)},o(a){g(i),s=!1},d(a){a&&w(n),l[e].d(a)}}}function _5(t){let e,i=t[18]("cloud_storage.invalid")+"",n;return{c(){e=I("p"),n=q(i),C(e,"class","svelte-t9mjci")},m(s,r){y(s,e,r),O(e,n)},p(s,r){r[0]&262144&&i!==(i=s[18]("cloud_storage.invalid")+"")&&W(n,i)},d(s){s&&w(e)}}}function k_(t){let e,i=bn.sanitize(t[18]("prefs.media.stock_photos.description",{values:{service:t[15],homeHref:`href="${t[13]}"`,apiKeyHref:`href="${t[12]}"`}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})+"",n;return{c(){e=new ad(!1),n=K(),e.a=n},m(s,r){e.m(i,s,r),y(s,n,r)},p(s,r){r[0]&307200&&i!==(i=bn.sanitize(s[18]("prefs.media.stock_photos.description",{values:{service:s[15],homeHref:`href="${s[13]}"`,apiKeyHref:`href="${s[12]}"`}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})+"")&&e.p(i)},d(s){s&&(w(n),e.d())}}}function w_(t){let e,i=bn.sanitize(t[18](`cloud_storage.auth.${t[6]}`,{values:{service:t[15]}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})+"",n;return{c(){e=new ad(!1),n=K(),e.a=n},m(s,r){e.m(i,s,r),y(s,n,r)},p(s,r){r[0]&294976&&i!==(i=bn.sanitize(s[18](`cloud_storage.auth.${s[6]}`,{values:{service:s[15]}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})+"")&&e.p(i)},d(s){s&&(w(n),e.d())}}}function y_(t){let e,i,n;return i=new Hn({props:{spellcheck:"false","aria-label":t[18]("prefs.media.stock_photos.field_label",{values:{service:t[15]}})}}),i.$on("input",t[27]),{c(){e=I("div"),T(i.$$.fragment),C(e,"class","input-outer svelte-t9mjci")},m(s,r){y(s,e,r),S(i,e,null),n=!0},p(s,r){const l={};r[0]&294912&&(l["aria-label"]=s[18]("prefs.media.stock_photos.field_label",{values:{service:s[15]}})),i.$set(l)},i(s){n||(m(i.$$.fragment,s),n=!0)},o(s){g(i.$$.fragment,s),n=!1},d(s){s&&w(e),E(i)}}}function $_(t){let e,i,n,s,r,l,o,a,c,u,f;function d(b){t[28](b)}let p={spellcheck:"false","aria-label":t[18]("user_name"),disabled:t[6]==="requested"};t[0].userName!==void 0&&(p.value=t[0].userName),i=new Hn({props:p}),ae.push(()=>ze(i,"value",d));function h(b){t[29](b)}let _={spellcheck:"false","aria-label":t[18]("password"),disabled:t[6]==="requested"};return t[0].password!==void 0&&(_.value=t[0].password),l=new BE({props:_}),ae.push(()=>ze(l,"value",h)),u=new De({props:{class:"secondary",label:t[18]("sign_in"),disabled:!t[0].userName||!t[0].password||t[6]==="requested"}}),u.$on("click",t[30]),{c(){e=I("div"),T(i.$$.fragment),s=D(),r=I("div"),T(l.$$.fragment),a=D(),c=I("div"),T(u.$$.fragment),C(e,"class","input-outer svelte-t9mjci"),C(r,"class","input-outer svelte-t9mjci"),C(c,"class","input-outer svelte-t9mjci")},m(b,k){y(b,e,k),S(i,e,null),y(b,s,k),y(b,r,k),S(l,r,null),y(b,a,k),y(b,c,k),S(u,c,null),f=!0},p(b,k){const v={};k[0]&262144&&(v["aria-label"]=b[18]("user_name")),k[0]&64&&(v.disabled=b[6]==="requested"),!n&&k[0]&1&&(n=!0,v.value=b[0].userName,He(()=>n=!1)),i.$set(v);const $={};k[0]&262144&&($["aria-label"]=b[18]("password")),k[0]&64&&($.disabled=b[6]==="requested"),!o&&k[0]&1&&(o=!0,$.value=b[0].password,He(()=>o=!1)),l.$set($);const L={};k[0]&262144&&(L.label=b[18]("sign_in")),k[0]&65&&(L.disabled=!b[0].userName||!b[0].password||b[6]==="requested"),u.$set(L)},i(b){f||(m(i.$$.fragment,b),m(l.$$.fragment,b),m(u.$$.fragment,b),f=!0)},o(b){g(i.$$.fragment,b),g(l.$$.fragment,b),g(u.$$.fragment,b),f=!1},d(b){b&&(w(e),w(s),w(r),w(a),w(c)),E(i),E(l),E(u)}}}function b5(t){let e,i,n,s,r,l,o=t[16]==="stock_photos"&&k_(t),a=t[16]==="cloud_storage"&&w_(t),c=t[14]==="api_key"&&y_(t),u=t[14]==="password"&&$_(t);return{c(){e=I("p"),o&&o.c(),i=D(),a&&a.c(),n=D(),c&&c.c(),s=D(),u&&u.c(),r=K(),C(e,"class","svelte-t9mjci")},m(f,d){y(f,e,d),o&&o.m(e,null),O(e,i),a&&a.m(e,null),y(f,n,d),c&&c.m(f,d),y(f,s,d),u&&u.m(f,d),y(f,r,d),l=!0},p(f,d){f[16]==="stock_photos"?o?o.p(f,d):(o=k_(f),o.c(),o.m(e,i)):o&&(o.d(1),o=null),f[16]==="cloud_storage"?a?a.p(f,d):(a=w_(f),a.c(),a.m(e,null)):a&&(a.d(1),a=null),f[14]==="api_key"?c?(c.p(f,d),d[0]&16384&&m(c,1)):(c=y_(f),c.c(),m(c,1),c.m(s.parentNode,s)):c&&(H(),g(c,1,1,()=>{c=null}),V()),f[14]==="password"?u?(u.p(f,d),d[0]&16384&&m(u,1)):(u=$_(f),u.c(),m(u,1),u.m(r.parentNode,r)):u&&(H(),g(u,1,1,()=>{u=null}),V())},i(f){l||(m(c),m(u),l=!0)},o(f){g(c),g(u),l=!1},d(f){f&&(w(e),w(n),w(s),w(r)),o&&o.d(),a&&a.d(),c&&c.d(f),u&&u.d(f)}}}function v5(t){let e,i;return e=new ay({props:{viewType:t[19]?.type,$$slots:{default:[S5]},$$scope:{ctx:t}}}),e.$on("select",t[26]),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s[0]&524288&&(r.viewType=n[19]?.type),s[0]&128|s[1]&1024&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function k5(t){let e,i;return e=new Ln({props:{$$slots:{default:[E5]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s[0]&262144|s[1]&1024&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function w5(t){let e,i;return e=new Ln({props:{$$slots:{default:[T5]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s[0]&262144|s[1]&1024&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function y5(t){let e,i;return e=new Ln({props:{$$slots:{default:[O5]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s[0]&262400|s[1]&1024&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function S_(t){let e,i;return e=new bi({props:{src:t[36],crossorigin:"anonymous"}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s[0]&128&&(r.src=n[36]),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function E_(t){let e,i;return e=new bl({props:{src:t[36],crossorigin:"anonymous"}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s[0]&128&&(r.src=n[36]),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function $5(t){let e,i,n,s=t[37]+"",r,l,o,a=t[38]==="image"&&S_(t),c=t[38]==="video"&&E_(t);return{c(){a&&a.c(),e=D(),c&&c.c(),i=D(),n=I("span"),r=q(s),l=D(),C(n,"class","name")},m(u,f){a&&a.m(u,f),y(u,e,f),c&&c.m(u,f),y(u,i,f),y(u,n,f),O(n,r),y(u,l,f),o=!0},p(u,f){u[38]==="image"?a?(a.p(u,f),f[0]&128&&m(a,1)):(a=S_(u),a.c(),m(a,1),a.m(e.parentNode,e)):a&&(H(),g(a,1,1,()=>{a=null}),V()),u[38]==="video"?c?(c.p(u,f),f[0]&128&&m(c,1)):(c=E_(u),c.c(),m(c,1),c.m(i.parentNode,i)):c&&(H(),g(c,1,1,()=>{c=null}),V()),(!o||f[0]&128)&&s!==(s=u[37]+"")&&W(r,s)},i(u){o||(m(a),m(c),o=!0)},o(u){g(a),g(c),o=!1},d(u){u&&(w(e),w(i),w(n),w(l)),a&&a.d(u),c&&c.d(u)}}}function T_(t,e){let i,n,s;return n=new ni({props:{value:e[35],$$slots:{default:[$5]},$$scope:{ctx:e}}}),{key:t,first:null,c(){i=K(),T(n.$$.fragment),this.first=i},m(r,l){y(r,i,l),S(n,r,l),s=!0},p(r,l){e=r;const o={};l[0]&128&&(o.value=e[35]),l[0]&128|l[1]&1024&&(o.$$scope={dirty:l,ctx:e}),n.$set(o)},i(r){s||(m(n.$$.fragment,r),s=!0)},o(r){g(n.$$.fragment,r),s=!1},d(r){r&&w(i),E(n,r)}}}function S5(t){let e=[],i=new Map,n,s,r=ce(t[7]);const l=o=>o[35];for(let o=0;o<r.length;o+=1){let a=v_(t,r,o),c=l(a);i.set(c,e[o]=T_(c,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();n=K()},m(o,a){for(let c=0;c<e.length;c+=1)e[c]&&e[c].m(o,a);y(o,n,a),s=!0},p(o,a){a[0]&128&&(r=ce(o[7]),H(),e=ct(e,a,l,1,o,r,i,n.parentNode,at,T_,n,v_),V())},i(o){if(!s){for(let a=0;a<r.length;a+=1)m(e[a]);s=!0}},o(o){for(let a=0;a<e.length;a+=1)g(e[a]);s=!1},d(o){o&&w(n);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function E5(t){let e,i=t[18]("no_files_found")+"",n;return{c(){e=I("span"),n=q(i)},m(s,r){y(s,e,r),O(e,n)},p(s,r){r[0]&262144&&i!==(i=s[18]("no_files_found")+"")&&W(n,i)},d(s){s&&w(e)}}}function T5(t){let e,i=t[18]("searching")+"",n;return{c(){e=I("span"),n=q(i)},m(s,r){y(s,e,r),O(e,n)},p(s,r){r[0]&262144&&i!==(i=s[18]("searching")+"")&&W(n,i)},d(s){s&&w(e)}}}function O5(t){let e,i=t[18](`assets_dialog.error.${t[8]}`)+"",n;return{c(){e=I("span"),n=q(i)},m(s,r){y(s,e,r),O(e,n)},p(s,r){r[0]&262400&&i!==(i=s[18](`assets_dialog.error.${s[8]}`)+"")&&W(n,i)},d(s){s&&w(e)}}}function A5(t){let e,i,n,s;const r=[g5,h5,m5],l=[];function o(a,c){return a[2]?0:a[1]?1:2}return e=o(t),i=l[e]=r[e](t),{c(){i.c(),n=K()},m(a,c){l[e].m(a,c),y(a,n,c),s=!0},p(a,c){let u=e;e=o(a),e===u?l[e].p(a,c):(H(),g(l[u],1,1,()=>{l[u]=null}),V(),i=l[e],i?i.p(a,c):(i=l[e]=r[e](a),i.c()),m(i,1),i.m(n.parentNode,n))},i(a){s||(m(i),s=!0)},o(a){g(i),s=!1},d(a){a&&w(n),l[e].d(a)}}}function L5(t,e,i){let n,s,r,l,o,a,c,u,f,d,p,h,_,b;U(t,dt,re=>i(17,h=re)),U(t,pe,re=>i(18,_=re)),U(t,To,re=>i(19,b=re));let{kind:k="image"}=e,{searchTerms:v=""}=e,{serviceProps:$}=e;const L=os(),A={userName:"",password:""};let P=!0,F=!1,j="",N="",M="",R=0,G="initial",Q=null,te;const x=async(re="")=>{i(7,Q=null);try{i(7,Q=await p(re,{kind:k,apiKey:j,userName:N,password:M}))}catch{i(8,te="search_fetch_failed")}},Y=async re=>{const{downloadURL:_e,fileName:kn,credit:ht}=re;if(l){L("select",{url:_e,credit:ht});return}try{const qt=await fetch(_e);if(!qt.ok)throw new Error;const un=new File([await qt.blob()],kn,{type:"image/jpeg"});L("select",{file:un,credit:ht})}catch{i(8,te="image_fetch_failed")}};on(()=>{(async()=>(typeof f=="function"&&(i(1,P=!1),i(1,P=await f())),P&&(i(3,j=h.apiKeys?.[s]??""),i(4,[N,M]=(h.logins?.[s]??"").split(" "),N,i(5,M)),i(2,F=!!j||!!M),i(7,Q=null),F&&x())))()});const ue=re=>{Y(Q.find(({id:_e})=>_e===re.detail.value))},Fe=re=>{const _e=re.target.value.trim();u&&_e.match(u)&&(i(3,j=_e),i(2,F=!0),Me(dt,h.apiKeys||={},h),Me(dt,h.apiKeys[s]=j,h),x())};function lt(re){t.$$.not_equal(A.userName,re)&&(A.userName=re,i(0,A))}function mt(re){t.$$.not_equal(A.password,re)&&(A.password=re,i(0,A))}const bt=async()=>{i(6,G="requested"),i(0,A.userName=A.userName.trim(),A),i(0,A.password=A.password.trim(),A),await d(A.userName,A.password)?(i(6,G="success"),i(4,N=A.userName),i(5,M=A.password),i(2,F=!0),Me(dt,h.logins||={},h),Me(dt,h.logins[s]=[N,M].join(" "),h),x()):i(6,G="error")};return t.$$set=re=>{"kind"in re&&i(22,k=re.kind),"searchTerms"in re&&i(23,v=re.searchTerms),"serviceProps"in re&&i(24,$=re.serviceProps)},t.$$.update=()=>{t.$$.dirty[0]&16777216&&i(16,{serviceType:n="stock_photos",serviceId:s="",serviceLabel:r="",hotlinking:l=!1,authType:o="api_key",developerURL:a="",apiKeyURL:c="",apiKeyPattern:u,init:f,signIn:d,search:p}=$,n,(i(9,s),i(24,$)),(i(15,r),i(24,$)),(i(14,o),i(24,$)),(i(13,a),i(24,$)),(i(12,c),i(24,$)),(i(11,u),i(24,$)),(i(10,d),i(24,$))),t.$$.dirty[0]&41943040&&v&&(window.clearTimeout(R),i(25,R=window.setTimeout(()=>{x(v)},1e3)))},[A,P,F,j,N,M,G,Q,te,s,d,u,c,a,o,r,n,h,_,b,x,Y,k,v,$,R,ue,Fe,lt,mt,bt]}class cy extends J{constructor(e){super(),X(this,e,L5,A5,Z,{kind:22,searchTerms:23,serviceProps:24},p5,[-1,-1])}}const N5=["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"].join(",").split(","),O_="https://api.pexels.com/v1",P5=async(t,{apiKey:e})=>{const i={Authorization:e},[n]=ne(Vt).toLowerCase().split("-");let s=[];if(t)for(let r=1;r<=2;r+=1){const l=new URLSearchParams({query:t,locale:N5.find(u=>u.split("-")[0]===n)||"en-US",page:r,per_page:80}),o=await fetch(`${O_}/search?${l.toString()}`,{headers:i});if(!o.ok)return Promise.reject();const{photos:a,next_page:c}=await o.json();if(s.push(...a),!c)break;await Rd(50)}else{const r=new URLSearchParams({per_page:80}),l=await fetch(`${O_}/curated?${r.toString()}`,{headers:i});if(!l.ok)return Promise.reject();s=(await l.json()).photos}return s.map(({id:r,url:l,alt:o,src:{large2x:a,tiny:c},photographer:u})=>({id:String(r),description:o,previewURL:c,downloadURL:a,fileName:`pexels-${u.split(/\s+/).join("-").toLowerCase()}-${r}.jpg`,kind:"image",credit:`<a href="${l}">Photo by ${u} on Pexels</a>`}))},I5={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:P5},C5="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".split(","),D5="https://pixabay.com/api",M5=async(t,{apiKey:e})=>{const[i]=ne(Vt).toLowerCase().split("-"),n=new URLSearchParams({key:e,q:t,lang:C5.includes(i)?i:"en",image_type:"photo",min_width:1280,editors_choice:!t,safesearch:!0,per_page:150}),s=await fetch(`${D5}/?${n.toString()}`);return s.ok?(await s.json()).hits.map(({id:l,webformatURL:o,previewURL:a,largeImageURL:c,imageWidth:u,imageHeight:f,pageURL:d,tags:p,user:h})=>({id:String(l),description:p,previewURL:o.replace("_640.",u>f?"_180.":"_340."),downloadURL:c,fileName:a.split("/").pop().replace("_150.","_1280."),kind:"image",credit:`<a href="${d}">Photo by ${h} on Pixabay`})):Promise.reject()},j5={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:M5},R5=["af,am,ar,az,be,bg,bn,bs,ca,ceb,co,cs,cy,da,de,el,en,eo,es,et,eu,fa,fi,fr,fy,ga,gd,gl,gu,ha,haw","hi,hmn,hr,ht,hu,hy,id,ig,is,it,iw,ja,jw,ka,kk,km,kn,ko,ku,ky,la,lb,lo,lt,lv,mg,mi,mk,ml,mn,mr","ms,mt,my,ne,nl,no,ny,or,pa,pl,ps,pt,ro,ru,rw,sd,si,sk,sl,sm,sn,so,sq,sr,st,su,sv,sw,ta,te,tg,th","tk,tl,tr,tt,ug,uk,ur,uz,vi,xh,yi,yo,zh,zh-TW,zu"].join(",").split(","),A_="https://api.unsplash.com",L_="utm_source=sveltia-cms&utm_medium=referral",F5=async(t,{apiKey:e})=>{const i={Authorization:`Client-ID ${e}`},[n]=ne(Vt).toLowerCase().split("-");let s=[];if(t)for(let r=1;r<=5;r+=1){const l=new URLSearchParams({query:t,lang:R5.includes(n)?n:"en",page:r,per_page:30}),o=await fetch(`${A_}/search/photos?${l.toString()}`,{headers:i});if(!o.ok)return Promise.reject();const{results:a,total_pages:c}=await o.json();if(s.push(...a),c===r)break;await Rd(50)}else{const r=new URLSearchParams({per_page:30}),l=await fetch(`${A_}/photos?${r.toString()}`,{headers:i});if(!l.ok)return Promise.reject();s=await l.json()}return s.map(({id:r,description:l,alt_description:o,urls:{regular:a,thumb:c},user:{username:u,name:f}})=>({id:String(r),description:[l,o].filter(Boolean).join(" — "),previewURL:c,downloadURL:a,fileName:`${f.split(/\s+/).join("-").toLowerCase()}-${r}-unsplash.jpg`,kind:"image",credit:`Photo by <a href="https://unsplash.com/@${u}?${L_}">${f}</a> on <a href="https://unsplash.com/?${L_}">Unsplash</a>`}))},U5={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:F5},co={},Ps={pexels:I5,pixabay:j5,unsplash:U5};function x5(t){ve(t,"svelte-magovh",".wrapper.svelte-magovh{display:flex;gap:16px;height:60vh}.wrapper.svelte-magovh .listbox{flex:none;background-color:transparent}.wrapper.svelte-magovh .content-pane{overflow:auto;flex:auto}")}function N_(t,e,i){const n=t.slice();return n[39]=e[i][0],n[40]=e[i][1],n}function P_(t,e,i){const n=t.slice();return n[39]=e[i][0],n[40]=e[i][1],n}function I_(t,e,i){const n=t.slice();return n[39]=e[i].serviceId,n[37]=e[i].serviceLabel,n}function C_(t,e,i){const n=t.slice();return n[39]=e[i].serviceId,n[37]=e[i].serviceLabel,n}function Zu(t){const e=t.slice(),i=Ps[e[3]]??{};return e[36]=i.showServiceLink,e[37]=i.serviceLabel,e[38]=i.serviceURL,e}function D_(t){let e,i;return e=new ni({props:{name:"collection-files",label:t[13]("collection_files"),"aria-selected":t[3]==="collection-files"}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s[0]&8192&&(r.label=n[13]("collection_files")),s[0]&8&&(r["aria-selected"]=n[3]==="collection-files"),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function z5(t){let e,i,n,s=t[4]&&D_(t);return i=new ni({props:{name:"all-files",label:t[13]("all_files"),"aria-selected":t[3]==="all-files"}}),{c(){s&&s.c(),e=D(),T(i.$$.fragment)},m(r,l){s&&s.m(r,l),y(r,e,l),S(i,r,l),n=!0},p(r,l){r[4]?s?(s.p(r,l),l[0]&16&&m(s,1)):(s=D_(r),s.c(),m(s,1),s.m(e.parentNode,e)):s&&(H(),g(s,1,1,()=>{s=null}),V());const o={};l[0]&8192&&(o.label=r[13]("all_files")),l[0]&8&&(o["aria-selected"]=r[3]==="all-files"),i.$set(o)},i(r){n||(m(s),m(i.$$.fragment,r),n=!0)},o(r){g(s),g(i.$$.fragment,r),n=!1},d(r){r&&w(e),s&&s.d(r),E(i,r)}}}function M_(t){let e,i;return e=new ni({props:{name:"enter-url",label:t[13]("assets_dialog.enter_url")}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s[0]&8192&&(r.label=n[13]("assets_dialog.enter_url")),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function j_(t,e){let i,n,s;return n=new ni({props:{name:e[39],label:e[37]}}),{key:t,first:null,c(){i=K(),T(n.$$.fragment),this.first=i},m(r,l){y(r,i,l),S(n,r,l),s=!0},p(r,l){e=r},i(r){s||(m(n.$$.fragment,r),s=!0)},o(r){g(n.$$.fragment,r),s=!1},d(r){r&&w(i),E(n,r)}}}function B5(t){let e,i=[],n=new Map,s,r,l=t[2]&&M_(t),o=ce(Object.values(co));const a=c=>c[39];for(let c=0;c<o.length;c+=1){let u=C_(t,o,c),f=a(u);n.set(f,i[c]=j_(f,u))}return{c(){l&&l.c(),e=D();for(let c=0;c<i.length;c+=1)i[c].c();s=K()},m(c,u){l&&l.m(c,u),y(c,e,u);for(let f=0;f<i.length;f+=1)i[f]&&i[f].m(c,u);y(c,s,u),r=!0},p(c,u){c[2]?l?(l.p(c,u),u[0]&4&&m(l,1)):(l=M_(c),l.c(),m(l,1),l.m(e.parentNode,e)):l&&(H(),g(l,1,1,()=>{l=null}),V()),u&0&&(o=ce(Object.values(co)),H(),i=ct(i,u,a,1,c,o,n,s.parentNode,at,j_,s,C_),V())},i(c){if(!r){m(l);for(let u=0;u<o.length;u+=1)m(i[u]);r=!0}},o(c){g(l);for(let u=0;u<i.length;u+=1)g(i[u]);r=!1},d(c){c&&(w(e),w(s)),l&&l.d(c);for(let u=0;u<i.length;u+=1)i[u].d(c)}}}function R_(t,e){let i,n,s;return n=new ni({props:{name:e[39],label:e[37]}}),{key:t,first:null,c(){i=K(),T(n.$$.fragment),this.first=i},m(r,l){y(r,i,l),S(n,r,l),s=!0},p(r,l){e=r},i(r){s||(m(n.$$.fragment,r),s=!0)},o(r){g(n.$$.fragment,r),s=!1},d(r){r&&w(i),E(n,r)}}}function H5(t){let e=[],i=new Map,n,s,r=ce(Object.values(Ps));const l=o=>o[39];for(let o=0;o<r.length;o+=1){let a=I_(t,r,o),c=l(a);i.set(c,e[o]=R_(c,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();n=K()},m(o,a){for(let c=0;c<e.length;c+=1)e[c]&&e[c].m(o,a);y(o,n,a),s=!0},p(o,a){a&0&&(r=ce(Object.values(Ps)),H(),e=ct(e,a,l,1,o,r,i,n.parentNode,at,R_,n,I_),V())},i(o){if(!s){for(let a=0;a<r.length;a+=1)m(e[a]);s=!0}},o(o){for(let a=0;a<e.length;a+=1)g(e[a]);s=!1},d(o){o&&w(n);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function V5(t){let e,i,n,s,r,l;return e=new $u({props:{label:t[13]("assets_dialog.location.this_repository"),$$slots:{default:[z5]},$$scope:{ctx:t}}}),n=new $u({props:{label:t[13]("assets_dialog.location.external_locations"),$$slots:{default:[B5]},$$scope:{ctx:t}}}),r=new $u({props:{label:t[13]("assets_dialog.location.stock_photos"),$$slots:{default:[H5]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment),i=D(),T(n.$$.fragment),s=D(),T(r.$$.fragment)},m(o,a){S(e,o,a),y(o,i,a),S(n,o,a),y(o,s,a),S(r,o,a),l=!0},p(o,a){const c={};a[0]&8192&&(c.label=o[13]("assets_dialog.location.this_repository")),a[0]&8216|a[1]&262144&&(c.$$scope={dirty:a,ctx:o}),e.$set(c);const u={};a[0]&8192&&(u.label=o[13]("assets_dialog.location.external_locations")),a[0]&8196|a[1]&262144&&(u.$$scope={dirty:a,ctx:o}),n.$set(u);const f={};a[0]&8192&&(f.label=o[13]("assets_dialog.location.stock_photos")),a[1]&262144&&(f.$$scope={dirty:a,ctx:o}),r.$set(f)},i(o){l||(m(e.$$.fragment,o),m(n.$$.fragment,o),m(r.$$.fragment,o),l=!0)},o(o){g(e.$$.fragment,o),g(n.$$.fragment,o),g(r.$$.fragment,o),l=!1},d(o){o&&(w(i),w(s)),E(e,o),E(n,o),E(r,o)}}}function F_(t){let e,i,n={accept:t[1]==="image"?"image/*":void 0,showFilePreview:!0,$$slots:{default:[q5]},$$scope:{ctx:t}};return e=new Bc({props:n}),t[24](e),e.$on("select",t[25]),{c(){T(e.$$.fragment)},m(s,r){S(e,s,r),i=!0},p(s,r){const l={};r[0]&2&&(l.accept=s[1]==="image"?"image/*":void 0),r[0]&17682|r[1]&262144&&(l.$$scope={dirty:r,ctx:s}),e.$set(l)},i(s){i||(m(e.$$.fragment,s),i=!0)},o(s){g(e.$$.fragment,s),i=!1},d(s){t[24](null),E(e,s)}}}function q5(t){let e,i;return e=new jp({props:{assets:t[14].filter(t[22]),searchTerms:t[10]}}),e.$on("select",t[23]),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s[0]&16402&&(r.assets=n[14].filter(n[22])),s[0]&1024&&(r.searchTerms=n[10]),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function U_(t){let e,i,n={accept:t[1]==="image"?"image/*":void 0,showFilePreview:!0,$$slots:{default:[Y5]},$$scope:{ctx:t}};return e=new Bc({props:n}),t[28](e),e.$on("select",t[29]),{c(){T(e.$$.fragment)},m(s,r){S(e,s,r),i=!0},p(s,r){const l={};r[0]&2&&(l.accept=s[1]==="image"?"image/*":void 0),r[0]&17666|r[1]&262144&&(l.$$scope={dirty:r,ctx:s}),e.$set(l)},i(s){i||(m(e.$$.fragment,s),i=!0)},o(s){g(e.$$.fragment,s),i=!1},d(s){t[28](null),E(e,s)}}}function Y5(t){let e,i;return e=new jp({props:{assets:t[14].filter(t[26]),searchTerms:t[10]}}),e.$on("select",t[27]),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s[0]&16386&&(r.assets=n[14].filter(n[26])),s[0]&1024&&(r.searchTerms=n[10]),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function x_(t){let e,i;return e=new Ln({props:{$$slots:{default:[G5]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s[0]&8962|s[1]&262144&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function G5(t){let e,i=(t[1]==="image"?t[13]("assets_dialog.enter_image_url"):t[13]("assets_dialog.enter_file_url"))+"",n,s,r,l,o;function a(u){t[30](u)}let c={};return t[9]!==void 0&&(c.value=t[9]),r=new Hn({props:c}),ae.push(()=>ze(r,"value",a)),r.$on("input",t[31]),{c(){e=I("div"),n=q(i),s=D(),T(r.$$.fragment)},m(u,f){y(u,e,f),O(e,n),y(u,s,f),S(r,u,f),o=!0},p(u,f){(!o||f[0]&8194)&&i!==(i=(u[1]==="image"?u[13]("assets_dialog.enter_image_url"):u[13]("assets_dialog.enter_file_url"))+"")&&W(n,i);const d={};!l&&f[0]&512&&(l=!0,d.value=u[9],He(()=>l=!1)),r.$set(d)},i(u){o||(m(r.$$.fragment,u),o=!0)},o(u){g(r.$$.fragment,u),o=!1},d(u){u&&(w(e),w(s)),E(r,u)}}}function z_(t){let e,i;return e=new cy({props:{kind:t[1],searchTerms:t[10],serviceProps:t[40]}}),e.$on("select",t[32]),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s[0]&2&&(r.kind=n[1]),s[0]&1024&&(r.searchTerms=n[10]),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function B_(t,e){let i,n,s,r=e[3]===e[39]&&z_(e);return{key:t,first:null,c(){i=K(),r&&r.c(),n=K(),this.first=i},m(l,o){y(l,i,o),r&&r.m(l,o),y(l,n,o),s=!0},p(l,o){e=l,e[3]===e[39]?r?(r.p(e,o),o[0]&8&&m(r,1)):(r=z_(e),r.c(),m(r,1),r.m(n.parentNode,n)):r&&(H(),g(r,1,1,()=>{r=null}),V())},i(l){s||(m(r),s=!0)},o(l){g(r),s=!1},d(l){l&&(w(i),w(n)),r&&r.d(l)}}}function H_(t){let e,i;return e=new cy({props:{kind:t[1],searchTerms:t[10],serviceProps:t[40]}}),e.$on("select",t[33]),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s[0]&2&&(r.kind=n[1]),s[0]&1024&&(r.searchTerms=n[10]),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function V_(t,e){let i,n,s,r=e[3]===e[39]&&H_(e);return{key:t,first:null,c(){i=K(),r&&r.c(),n=K(),this.first=i},m(l,o){y(l,i,o),r&&r.m(l,o),y(l,n,o),s=!0},p(l,o){e=l,e[3]===e[39]?r?(r.p(e,o),o[0]&8&&m(r,1)):(r=H_(e),r.c(),m(r,1),r.m(n.parentNode,n)):r&&(H(),g(r,1,1,()=>{r=null}),V())},i(l){s||(m(r),s=!0)},o(l){g(r),s=!1},d(l){l&&(w(i),w(n)),r&&r.d(l)}}}function W5(t){let e,i,n,s=[],r=new Map,l,o=[],a=new Map,c,u,f=t[4]&&t[3]==="collection-files"&&F_(t),d=t[3]==="all-files"&&U_(t),p=t[2]&&t[3]==="enter-url"&&x_(t),h=ce(Object.entries(co));const _=v=>v[39];for(let v=0;v<h.length;v+=1){let $=P_(t,h,v),L=_($);r.set(L,s[v]=B_(L,$))}let b=ce(Object.entries(Ps));const k=v=>v[39];for(let v=0;v<b.length;v+=1){let $=N_(t,b,v),L=k($);a.set(L,o[v]=V_(L,$))}return{c(){f&&f.c(),e=D(),d&&d.c(),i=D(),p&&p.c(),n=D();for(let v=0;v<s.length;v+=1)s[v].c();l=D();for(let v=0;v<o.length;v+=1)o[v].c();c=K()},m(v,$){f&&f.m(v,$),y(v,e,$),d&&d.m(v,$),y(v,i,$),p&&p.m(v,$),y(v,n,$);for(let L=0;L<s.length;L+=1)s[L]&&s[L].m(v,$);y(v,l,$);for(let L=0;L<o.length;L+=1)o[L]&&o[L].m(v,$);y(v,c,$),u=!0},p(v,$){v[4]&&v[3]==="collection-files"?f?(f.p(v,$),$[0]&24&&m(f,1)):(f=F_(v),f.c(),m(f,1),f.m(e.parentNode,e)):f&&(H(),g(f,1,1,()=>{f=null}),V()),v[3]==="all-files"?d?(d.p(v,$),$[0]&8&&m(d,1)):(d=U_(v),d.c(),m(d,1),d.m(i.parentNode,i)):d&&(H(),g(d,1,1,()=>{d=null}),V()),v[2]&&v[3]==="enter-url"?p?(p.p(v,$),$[0]&12&&m(p,1)):(p=x_(v),p.c(),m(p,1),p.m(n.parentNode,n)):p&&(H(),g(p,1,1,()=>{p=null}),V()),$[0]&1290&&(h=ce(Object.entries(co)),H(),s=ct(s,$,_,1,v,h,r,l.parentNode,at,B_,l,P_),V()),$[0]&1290&&(b=ce(Object.entries(Ps)),H(),o=ct(o,$,k,1,v,b,a,c.parentNode,at,V_,c,N_),V())},i(v){if(!u){m(f),m(d),m(p);for(let $=0;$<h.length;$+=1)m(s[$]);for(let $=0;$<b.length;$+=1)m(o[$]);u=!0}},o(v){g(f),g(d),g(p);for(let $=0;$<s.length;$+=1)g(s[$]);for(let $=0;$<o.length;$+=1)g(o[$]);u=!1},d(v){v&&(w(e),w(i),w(n),w(l),w(c)),f&&f.d(v),d&&d.d(v),p&&p.d(v);for(let $=0;$<s.length;$+=1)s[$].d(v);for(let $=0;$<o.length;$+=1)o[$].d(v)}}}function K5(t){let e,i,n,s,r;return i=new _o({props:{"aria-controls":t[7]+"-content-pane",class:"tabs",$$slots:{default:[V5]},$$scope:{ctx:t}}}),i.$on("select",t[21]),s=new _n({props:{id:t[7]+"-content-pane",class:"content-pane",$$slots:{default:[W5]},$$scope:{ctx:t}}}),{c(){e=I("div"),T(i.$$.fragment),n=D(),T(s.$$.fragment),C(e,"class","wrapper svelte-magovh")},m(l,o){y(l,e,o),S(i,e,null),O(e,n),S(s,e,null),r=!0},p(l,o){const a={};o[0]&128&&(a["aria-controls"]=l[7]+"-content-pane"),o[0]&8220|o[1]&262144&&(a.$$scope={dirty:o,ctx:l}),i.$set(a);const c={};o[0]&128&&(c.id=l[7]+"-content-pane"),o[0]&26494|o[1]&262144&&(c.$$scope={dirty:o,ctx:l}),s.$set(c)},i(l){r||(m(i.$$.fragment,l),m(s.$$.fragment,l),r=!0)},o(l){g(i.$$.fragment,l),g(s.$$.fragment,l),r=!1},d(l){l&&w(e),E(i),E(s)}}}function q_(t){let e,i;return e=new De({props:{class:"secondary",label:t[13]("upload")}}),e.$on("click",t[19]),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s[0]&8192&&(r.label=n[13]("upload")),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function Y_(t){let e,i,n,s,r;e=new mp({props:{currentView:To}});function l(a){t[20](a)}let o={disabled:!!t[8]?.file};return t[10]!==void 0&&(o.value=t[10]),n=new F0({props:o}),ae.push(()=>ze(n,"value",l)),{c(){T(e.$$.fragment),i=D(),T(n.$$.fragment)},m(a,c){S(e,a,c),y(a,i,c),S(n,a,c),r=!0},p(a,c){const u={};c[0]&256&&(u.disabled=!!a[8]?.file),!s&&c[0]&1024&&(s=!0,u.value=a[10],He(()=>s=!1)),n.$set(u)},i(a){r||(m(e.$$.fragment,a),m(n.$$.fragment,a),r=!0)},o(a){g(e.$$.fragment,a),g(n.$$.fragment,a),r=!1},d(a){a&&w(i),E(e,a),E(n,a)}}}function Z5(t){let e,i,n,s=t[12]&&q_(t),r=(t[12]||t[11])&&Y_(t);return{c(){s&&s.c(),e=D(),r&&r.c(),i=K()},m(l,o){s&&s.m(l,o),y(l,e,o),r&&r.m(l,o),y(l,i,o),n=!0},p(l,o){l[12]?s?(s.p(l,o),o[0]&4096&&m(s,1)):(s=q_(l),s.c(),m(s,1),s.m(e.parentNode,e)):s&&(H(),g(s,1,1,()=>{s=null}),V()),l[12]||l[11]?r?(r.p(l,o),o[0]&6144&&m(r,1)):(r=Y_(l),r.c(),m(r,1),r.m(i.parentNode,i)):r&&(H(),g(r,1,1,()=>{r=null}),V())},i(l){n||(m(s),m(r),n=!0)},o(l){g(s),g(r),n=!1},d(l){l&&(w(e),w(i)),s&&s.d(l),r&&r.d(l)}}}function G_(t){let e,i=t[36]&&W_(t);return{c(){i&&i.c(),e=K()},m(n,s){i&&i.m(n,s),y(n,e,s)},p(n,s){n[36]?i?i.p(n,s):(i=W_(n),i.c(),i.m(e.parentNode,e)):i&&(i.d(1),i=null)},d(n){n&&w(e),i&&i.d(n)}}}function W_(t){let e,i=t[13]("prefs.media.stock_photo.credit",{values:{service:t[37]}})+"",n,s;return{c(){e=I("a"),n=q(i),C(e,"href",s=t[38])},m(r,l){y(r,e,l),O(e,n)},p(r,l){l[0]&8200&&i!==(i=r[13]("prefs.media.stock_photo.credit",{values:{service:r[37]}})+"")&&W(n,i),l[0]&8&&s!==(s=r[38])&&C(e,"href",s)},d(r){r&&w(e)}}}function X5(t){let e,i=t[11]&&G_(Zu(t));return{c(){i&&i.c(),e=K()},m(n,s){i&&i.m(n,s),y(n,e,s)},p(n,s){n[11]?i?i.p(Zu(n),s):(i=G_(Zu(n)),i.c(),i.m(e.parentNode,e)):i&&(i.d(1),i=null)},d(n){n&&w(e),i&&i.d(n)}}}function J5(t){let e,i,n;function s(l){t[34](l)}let r={title:t[16],size:"x-large",okLabel:t[13]("insert"),okDisabled:!t[8],$$slots:{"footer-extra":[X5],"header-extra":[Z5],default:[K5]},$$scope:{ctx:t}};return t[0]!==void 0&&(r.open=t[0]),e=new Kn({props:r}),ae.push(()=>ze(e,"open",s)),e.$on("ok",t[35]),{c(){T(e.$$.fragment)},m(l,o){S(e,l,o),n=!0},p(l,o){const a={};o[0]&8192&&(a.okLabel=l[13]("insert")),o[0]&256&&(a.okDisabled=!l[8]),o[0]&32766|o[1]&262144&&(a.$$scope={dirty:o,ctx:l}),!i&&o[0]&1&&(i=!0,a.open=l[0],He(()=>i=!1)),e.$set(a)},i(l){n||(m(e.$$.fragment,l),n=!0)},o(l){g(e.$$.fragment,l),n=!1},d(l){E(e,l)}}}function Q5(t,e,i){let n,s,r,l,o,a,c,u;U(t,dt,_e=>i(17,o=_e)),U(t,Lt,_e=>i(18,a=_e)),U(t,pe,_e=>i(13,c=_e)),U(t,Qt,_e=>i(14,u=_e));let{open:f=!1}=e,{kind:d="image"}=e,{canEnterURL:p=!0}=e;const h=os(),_=c(d==="image"?"assets_dialog.title.image":"assets_dialog.title.file");let b,k,v="",$=null,L="",A="";on(()=>{i(7,v=`library-${Hs().split("-").pop()}`)});const P=()=>{s==="collection-files"?b.openFilePicker():k.openFilePicker()};function F(_e){A=_e,i(10,A)}const j=_e=>{i(3,s=_e.detail.name),i(8,$=null)},N=_e=>(!d||d===_e.kind)&&n===_e.folder,M=({detail:_e})=>{i(8,$=_e)};function R(_e){ae[_e?"unshift":"push"](()=>{b=_e,i(5,b)})}const G=({detail:{files:_e}})=>{i(8,$=_e.length?{file:_e[0]}:null)},Q=_e=>!d||d===_e.kind,te=({detail:_e})=>{i(8,$=_e)};function x(_e){ae[_e?"unshift":"push"](()=>{k=_e,i(6,k)})}const Y=({detail:{files:_e}})=>{i(8,$=_e.length?{file:_e[0]}:null)};function ue(_e){L=_e,i(9,L),i(0,f)}const Fe=()=>{i(8,$=L.trim()?{url:L.trim()}:null)},lt=({detail:_e})=>{i(8,$=_e)},mt=({detail:_e})=>{i(8,$=_e)};function bt(_e){f=_e,i(0,f)}const re=()=>{h("select",$)};return t.$$set=_e=>{"open"in _e&&i(0,f=_e.open),"kind"in _e&&i(1,d=_e.kind),"canEnterURL"in _e&&i(2,p=_e.canEnterURL)},t.$$.update=()=>{t.$$.dirty[0]&262144&&i(4,n=Ai(a.media_folder??"")),t.$$.dirty[0]&16&&i(3,s=n?"collection-files":"all-files"),t.$$.dirty[0]&8&&i(12,r=["collection-files","all-files"].includes(s)),t.$$.dirty[0]&131080&&i(11,l=Object.keys(Ps).includes(s)&&o?.apiKeys?.[s]||Object.keys(co).includes(s)&&o?.logins?.[s]),t.$$.dirty[0]&1&&f&&i(9,L="")},[f,d,p,s,n,b,k,v,$,L,A,l,r,c,u,h,_,o,a,P,F,j,N,M,R,G,Q,te,x,Y,ue,Fe,lt,mt,bt,re]}class ej extends J{constructor(e){super(),X(this,e,Q5,J5,Z,{open:0,kind:1,canEnterURL:2},x5,[-1,-1])}}function tj(t){ve(t,"svelte-6skeby",".image-widget.svelte-6skeby.svelte-6skeby.svelte-6skeby{display:flex !important;align-items:center;gap:16px}.image-widget.svelte-6skeby .checkerboard{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)}.image-widget.svelte-6skeby>div.svelte-6skeby.svelte-6skeby{flex:auto;overflow:hidden}.image-widget.svelte-6skeby>div.svelte-6skeby>div.svelte-6skeby:not(:last-child){margin:0 0 8px}.image-widget.svelte-6skeby>div .filename.svelte-6skeby.svelte-6skeby{word-break:break-all}")}function K_(t){let e,i,n,s={ctx:t,current:null,token:null,hasCatch:!1,pending:sj,then:ij,catch:nj,value:27,blocks:[,,,]};return Ts(i=ss(t[0],t[13].originalEntry),s),{c(){e=K(),s.block.c()},m(r,l){y(r,e,l),s.block.m(r,s.anchor=l),s.mount=()=>e.parentNode,s.anchor=e,n=!0},p(r,l){t=r,s.ctx=t,l&8193&&i!==(i=ss(t[0],t[13].originalEntry))&&Ts(i,s)||cc(s,t,l)},i(r){n||(m(s.block),n=!0)},o(r){for(let l=0;l<3;l+=1){const o=s.blocks[l];g(o)}n=!1},d(r){r&&w(e),s.block.d(r),s.token=null,s=null}}}function nj(t){return{c:z,m:z,p:z,i:z,o:z,d:z}}function ij(t){let e,i;return e=new bi({props:{src:t[27],checkerboard:!0}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&8193&&(r.src=n[27]),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function sj(t){return{c:z,m:z,p:z,i:z,o:z,d:z}}function Z_(t){let e,i;function n(l,o){if(o&1&&(i=null),l[3])return lj;if(i==null&&(i=!l[0].startsWith("data:")),i)return rj}let s=n(t,-1),r=s&&s(t);return{c(){e=I("div"),r&&r.c(),C(e,"class","filename svelte-6skeby")},m(l,o){y(l,e,o),r&&r.m(e,null)},p(l,o){s===(s=n(l,o))&&r?r.p(l,o):(r&&r.d(1),r=s&&s(l),r&&(r.c(),r.m(e,null)))},d(l){l&&w(e),r&&r.d()}}}function rj(t){let e;return{c(){e=q(t[0])},m(i,n){y(i,e,n)},p(i,n){n&1&&W(e,i[0])},d(i){i&&w(e)}}}function lj(t){let e=t[3].name+"",i;return{c(){i=q(e)},m(n,s){y(n,i,s)},p(n,s){s&8&&e!==(e=n[3].name+"")&&W(i,e)},d(n){n&&w(i)}}}function X_(t){let e,i;return e=new De({props:{disabled:t[1],class:"tertiary small",label:t[14]("remove")}}),e.$on("click",t[21]),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&2&&(r.disabled=n[1]),s&16384&&(r.label=n[14]("remove")),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function oj(t){let e=t[14]("assets_dialog.large_file.description",{values:{size:il(t[10])}})+"",i;return{c(){i=q(e)},m(n,s){y(n,i,s)},p(n,s){s&17408&&e!==(e=n[14]("assets_dialog.large_file.description",{values:{size:il(n[10])}})+"")&&W(i,e)},d(n){n&&w(i)}}}function aj(t){let e,i=t[14]("assets_dialog.photo_credit.description")+"",n,s,r,l,o;return l=new _d({props:{readonly:"readonly",value:t[9]}}),l.$on("click",uj),{c(){e=I("div"),n=q(i),s=D(),r=I("div"),T(l.$$.fragment)},m(a,c){y(a,e,c),O(e,n),y(a,s,c),y(a,r,c),S(l,r,null),o=!0},p(a,c){(!o||c&16384)&&i!==(i=a[14]("assets_dialog.photo_credit.description")+"")&&W(n,i);const u={};c&512&&(u.value=a[9]),l.$set(u)},i(a){o||(m(l.$$.fragment,a),o=!0)},o(a){g(l.$$.fragment,a),o=!1},d(a){a&&(w(e),w(s),w(r)),E(l)}}}function cj(t){let e,i,n,s,r,l,o,a,c,u,f,d,p,h,_,b,k,v=t[11]&&t[0]&&K_(t),$=typeof t[0]=="string"&&Z_(t);l=new De({props:{disabled:t[1],class:"tertiary small",label:t[0]?t[14]("replace"):t[14]("add")}}),l.$on("click",t[20]);let L=t[0]&&X_(t);function A(R){t[22](R)}let P={kind:t[11]?"image":"any",canEnterURL:t[12]};t[6]!==void 0&&(P.open=t[6]),c=new ej({props:P}),ae.push(()=>ze(c,"open",A)),c.$on("select",t[23]);function F(R){t[24](R)}let j={title:t[14]("assets_dialog.large_file.title"),showCancel:!1,$$slots:{default:[oj]},$$scope:{ctx:t}};t[7]!==void 0&&(j.open=t[7]),d=new Kn({props:j}),ae.push(()=>ze(d,"open",F));function N(R){t[25](R)}let M={title:t[14]("assets_dialog.photo_credit.title"),okLabel:t[14]("copy"),$$slots:{default:[aj]},$$scope:{ctx:t}};return t[8]!==void 0&&(M.open=t[8]),_=new Kn({props:M}),ae.push(()=>ze(_,"open",N)),_.$on("ok",t[26]),{c(){e=I("div"),v&&v.c(),i=D(),n=I("div"),$&&$.c(),s=D(),r=I("div"),T(l.$$.fragment),o=D(),L&&L.c(),a=D(),T(c.$$.fragment),f=D(),T(d.$$.fragment),h=D(),T(_.$$.fragment),C(r,"class","svelte-6skeby"),C(n,"class","svelte-6skeby"),C(e,"class","image-widget svelte-6skeby")},m(R,G){y(R,e,G),v&&v.m(e,null),O(e,i),O(e,n),$&&$.m(n,null),O(n,s),O(n,r),S(l,r,null),O(r,o),L&&L.m(r,null),y(R,a,G),S(c,R,G),y(R,f,G),S(d,R,G),y(R,h,G),S(_,R,G),k=!0},p(R,[G]){R[11]&&R[0]?v?(v.p(R,G),G&2049&&m(v,1)):(v=K_(R),v.c(),m(v,1),v.m(e,i)):v&&(H(),g(v,1,1,()=>{v=null}),V()),typeof R[0]=="string"?$?$.p(R,G):($=Z_(R),$.c(),$.m(n,s)):$&&($.d(1),$=null);const Q={};G&2&&(Q.disabled=R[1]),G&16385&&(Q.label=R[0]?R[14]("replace"):R[14]("add")),l.$set(Q),R[0]?L?(L.p(R,G),G&1&&m(L,1)):(L=X_(R),L.c(),m(L,1),L.m(r,null)):L&&(H(),g(L,1,1,()=>{L=null}),V());const te={};G&2048&&(te.kind=R[11]?"image":"any"),G&4096&&(te.canEnterURL=R[12]),!u&&G&64&&(u=!0,te.open=R[6],He(()=>u=!1)),c.$set(te);const x={};G&16384&&(x.title=R[14]("assets_dialog.large_file.title")),G&268452864&&(x.$$scope={dirty:G,ctx:R}),!p&&G&128&&(p=!0,x.open=R[7],He(()=>p=!1)),d.$set(x);const Y={};G&16384&&(Y.title=R[14]("assets_dialog.photo_credit.title")),G&16384&&(Y.okLabel=R[14]("copy")),G&268452352&&(Y.$$scope={dirty:G,ctx:R}),!b&&G&256&&(b=!0,Y.open=R[8],He(()=>b=!1)),_.$set(Y)},i(R){k||(m(v),m(l.$$.fragment,R),m(L),m(c.$$.fragment,R),m(d.$$.fragment,R),m(_.$$.fragment,R),k=!0)},o(R){g(v),g(l.$$.fragment,R),g(L),g(c.$$.fragment,R),g(d.$$.fragment,R),g(_.$$.fragment,R),k=!1},d(R){R&&(w(e),w(a),w(f),w(h)),v&&v.d(),$&&$.d(),E(l),L&&L.d(),E(c,R),E(d,R),E(_,R)}}}const uj=t=>{t.target.focus(),t.target.select()};function fj(t,e,i){let n,s,r,l,o,a;U(t,Ke,te=>i(13,o=te)),U(t,pe,te=>i(14,a=te));let{locale:c}=e,{keyPath:u}=e,{fieldConfig:f}=e,{currentValue:d}=e,{disabled:p=!1}=e,h,_,b,k,v=!1,$=!1,L=!1,A="";const P=async te=>{i(2,{asset:h,file:_,url:b,credit:k}=te,h,i(3,_),i(4,b),i(5,k)),h&&i(0,d=await io(h,{pathOnly:!0})),_&&(l&&Number.isInteger(r)&&_.size>r?i(7,$=!0):(i(0,d=await Rv(_)),Me(Ke,o.files[c][u]=_,o))),b&&i(0,d=b),k&&(i(9,A=bn.sanitize(k,{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href"]})),i(8,L=!0))},F=()=>{i(6,v=!0)},j=()=>{i(0,d=""),i(2,h=void 0),i(3,_=void 0),i(4,b=void 0),i(5,k=void 0)};function N(te){v=te,i(6,v)}const M=({detail:te})=>{P(te)};function R(te){$=te,i(7,$)}function G(te){L=te,i(8,L)}const Q=()=>{navigator.clipboard.writeText(A)};return t.$$set=te=>{"locale"in te&&i(16,c=te.locale),"keyPath"in te&&i(17,u=te.keyPath),"fieldConfig"in te&&i(18,f=te.fieldConfig),"currentValue"in te&&i(0,d=te.currentValue),"disabled"in te&&i(1,p=te.disabled)},t.$$.update=()=>{t.$$.dirty&262144&&i(19,{widget:n,choose_url:s=!0,media_library:{config:{max_file_size:r=void 0}={}}={}}=f,n,(i(12,s),i(18,f)),(i(10,r),i(18,f))),t.$$.dirty&524288&&i(11,l=n==="image")},[d,p,h,_,b,k,v,$,L,A,r,l,s,o,a,P,c,u,f,n,F,j,N,M,R,G,Q]}class J_ extends J{constructor(e){super(),X(this,e,fj,cj,Z,{locale:16,keyPath:17,fieldConfig:18,currentValue:0,disabled:1},tj)}}function dj(t){let e,i;return{c(){e=I("p"),i=q(t[0])},m(n,s){y(n,e,s),O(e,i)},p(n,s){s&1&&W(i,n[0])},i:z,o:z,d(n){n&&w(e)}}}function pj(t){let e,i,n,s={ctx:t,current:null,token:null,hasCatch:!1,pending:gj,then:hj,catch:mj,value:6,blocks:[,,,]};return Ts(i=ss(t[0],t[2].originalEntry),s),{c(){e=K(),s.block.c()},m(r,l){y(r,e,l),s.block.m(r,s.anchor=l),s.mount=()=>e.parentNode,s.anchor=e,n=!0},p(r,l){t=r,s.ctx=t,l&5&&i!==(i=ss(t[0],t[2].originalEntry))&&Ts(i,s)||cc(s,t,l)},i(r){n||(m(s.block),n=!0)},o(r){for(let l=0;l<3;l+=1){const o=s.blocks[l];g(o)}n=!1},d(r){r&&w(e),s.block.d(r),s.token=null,s=null}}}function mj(t){return{c:z,m:z,p:z,i:z,o:z,d:z}}function hj(t){let e,i,n;return i=new bi({props:{src:t[6]}}),{c(){e=I("p"),T(i.$$.fragment)},m(s,r){y(s,e,r),S(i,e,null),n=!0},p(s,r){const l={};r&5&&(l.src=s[6]),i.$set(l)},i(s){n||(m(i.$$.fragment,s),n=!0)},o(s){g(i.$$.fragment,s),n=!1},d(s){s&&w(e),E(i)}}}function gj(t){return{c:z,m:z,p:z,i:z,o:z,d:z}}function _j(t){let e,i,n,s,r;const l=[pj,dj],o=[];function a(c,u){return u&1&&(e=null),c[1]==="image"&&c[0]?0:(e==null&&(e=!!(typeof c[0]=="string"&&c[0].trim())),e?1:-1)}return~(i=a(t,-1))&&(n=o[i]=l[i](t)),{c(){n&&n.c(),s=K()},m(c,u){~i&&o[i].m(c,u),y(c,s,u),r=!0},p(c,[u]){let f=i;i=a(c,u),i===f?~i&&o[i].p(c,u):(n&&(H(),g(o[f],1,1,()=>{o[f]=null}),V()),~i?(n=o[i],n?n.p(c,u):(n=o[i]=l[i](c),n.c()),m(n,1),n.m(s.parentNode,s)):n=null)},i(c){r||(m(n),r=!0)},o(c){g(n),r=!1},d(c){c&&w(s),~i&&o[i].d(c)}}}function bj(t,e,i){let n,s;U(t,Ke,c=>i(2,s=c));let{locale:r}=e,{keyPath:l}=e,{fieldConfig:o}=e,{currentValue:a}=e;return t.$$set=c=>{"locale"in c&&i(3,r=c.locale),"keyPath"in c&&i(4,l=c.keyPath),"fieldConfig"in c&&i(5,o=c.fieldConfig),"currentValue"in c&&i(0,a=c.currentValue)},t.$$.update=()=>{t.$$.dirty&32&&i(1,{widget:n}=o,n)},[a,n,s,r,l,o]}class Q_ extends J{constructor(e){super(),X(this,e,bj,_j,Z,{locale:3,keyPath:4,fieldConfig:5,currentValue:0})}}function e1(t,e,i){const n=t.slice();return n[12]=e[i].name,n[13]=e[i].label,n}function vj(t){let e,i;return e=new De({props:{class:"tertiary",label:t[2],disabled:t[1],$$slots:{"start-icon":[wj]},$$scope:{ctx:t}}}),e.$on("click",t[11]),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&4&&(r.label=n[2]),s&2&&(r.disabled=n[1]),s&65536&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function kj(t){let e,i;return e=new as({props:{class:"tertiary",label:t[2],disabled:t[1],$$slots:{popup:[Sj],"start-icon":[yj]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&4&&(r.label=n[2]),s&2&&(r.disabled=n[1]),s&65545&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function wj(t){let e,i;return e=new we({props:{slot:"start-icon",name:"add"}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p:z,i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function yj(t){let e,i;return e=new we({props:{slot:"start-icon",name:"add"}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p:z,i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function t1(t,e){let i,n,s;function r(){return e[10](e[12])}return n=new Ct({props:{label:e[13]}}),n.$on("click",r),{key:t,first:null,c(){i=K(),T(n.$$.fragment),this.first=i},m(l,o){y(l,i,o),S(n,l,o),s=!0},p(l,o){e=l;const a={};o&8&&(a.label=e[13]),n.$set(a)},i(l){s||(m(n.$$.fragment,l),s=!0)},o(l){g(n.$$.fragment,l),s=!1},d(l){l&&w(i),E(n,l)}}}function $j(t){let e=[],i=new Map,n,s,r=ce(t[3]);const l=o=>o[12];for(let o=0;o<r.length;o+=1){let a=e1(t,r,o),c=l(a);i.set(c,e[o]=t1(c,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();n=K()},m(o,a){for(let c=0;c<e.length;c+=1)e[c]&&e[c].m(o,a);y(o,n,a),s=!0},p(o,a){a&9&&(r=ce(o[3]),H(),e=ct(e,a,l,1,o,r,i,n.parentNode,at,t1,n,e1),V())},i(o){if(!s){for(let a=0;a<r.length;a+=1)m(e[a]);s=!0}},o(o){for(let a=0;a<e.length;a+=1)g(e[a]);s=!1},d(o){o&&w(n);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function Sj(t){let e,i;return e=new Ci({props:{slot:"popup",$$slots:{default:[$j]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&65545&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function Ej(t){let e,i,n,s,r;const l=[kj,vj],o=[];function a(c,u){return u&8&&(e=null),e==null&&(e=!!Array.isArray(c[3])),e?0:1}return i=a(t,-1),n=o[i]=l[i](t),{c(){n.c(),s=K()},m(c,u){o[i].m(c,u),y(c,s,u),r=!0},p(c,[u]){let f=i;i=a(c,u),i===f?o[i].p(c,u):(H(),g(o[f],1,1,()=>{o[f]=null}),V(),n=o[i],n?n.p(c,u):(n=o[i]=l[i](c),n.c()),m(n,1),n.m(s.parentNode,s))},i(c){r||(m(n),r=!0)},o(c){g(n),r=!1},d(c){c&&w(s),o[i].d(c)}}}function Tj(t,e,i){let n,s,r,l,o,a,c;U(t,pe,_=>i(9,c=_));let{fieldConfig:u}=e,{items:f=[]}=e,{addItem:d=_=>{}}=e;const p=_=>d(_),h=()=>d();return t.$$set=_=>{"fieldConfig"in _&&i(4,u=_.fieldConfig),"items"in _&&i(5,f=_.items),"addItem"in _&&i(0,d=_.addItem)},t.$$.update=()=>{t.$$.dirty&16&&i(7,{label:n,label_singular:s,max:r,types:l}=u,n,(i(8,s),i(4,u)),(i(6,r),i(4,u)),(i(3,l),i(4,u))),t.$$.dirty&896&&i(2,o=c("add_x",{values:{name:s||n}})),t.$$.dirty&96&&i(1,a=typeof r=="number"&&f.length===r)},[d,a,o,l,u,f,r,n,s,c,p,h]}class uy extends J{constructor(e){super(),X(this,e,Tj,Ej,Z,{fieldConfig:4,items:5,addItem:0})}}function Oj(t){ve(t,"svelte-1aafx67",".toolbar.svelte-1aafx67.svelte-1aafx67.svelte-1aafx67{display:flex;align-items:center;gap:8px}.item-list.collapsed.svelte-1aafx67.svelte-1aafx67.svelte-1aafx67{display:none}.item.svelte-1aafx67.svelte-1aafx67.svelte-1aafx67{margin:4px 0;border-width:2px;border-color:var(--sui-secondary-border-color);border-radius:var(--sui-control-medium-border-radius)}.item.svelte-1aafx67 .header.svelte-1aafx67.svelte-1aafx67{display:flex;align-items:center;padding:4px;background-color:var(--sui-primary-border-color)}.item.svelte-1aafx67 .header.svelte-1aafx67>div.svelte-1aafx67{display:flex;align-items:center}.item.svelte-1aafx67 .header.svelte-1aafx67>div.svelte-1aafx67:first-child{justify-content:flex-start;width:40%}.item.svelte-1aafx67 .header.svelte-1aafx67>div.svelte-1aafx67:nth-child(2){width:20%;justify-content:center}.item.svelte-1aafx67 .header.svelte-1aafx67>div.svelte-1aafx67:last-child{width:40%;justify-content:flex-end}.item.svelte-1aafx67 .header.svelte-1aafx67 .icon{font-size:var(--sui-font-size-large)}.item.svelte-1aafx67 .header .type.svelte-1aafx67.svelte-1aafx67{font-size:var(--sui-font-size-small);font-weight:600;color:var(--sui-secondary-foreground-color)}.item.svelte-1aafx67 .summary.svelte-1aafx67.svelte-1aafx67{overflow:hidden;padding:8px;white-space:nowrap;text-overflow:ellipsis}")}function n1(t,e,i){const n=t.slice();n[50]=e[i],n[56]=i;const s=!!n[11].viewStates[n[0]][`${n[1]}.${n[56]}.expanded`];n[51]=s;const r=n[10]?n[8].find(function(...c){return t[40](n[50],...c)}):void 0;n[52]=r;const l=n[10]?n[52]?.fields??[]:n[7]??[n[6]];n[53]=l;const o=n[10]&&n[52]?.summary||n[19];return n[54]=o,n}function i1(t,e,i){const n=t.slice();return n[57]=e[i],n}function Aj(t){let e,i,n;function s(l){t[41](l)}let r={disabled:t[3]};return t[13]!==void 0&&(r.value=t[13]),e=new Hn({props:r}),ae.push(()=>ze(e,"value",s)),e.$on("input",t[42]),{c(){T(e.$$.fragment)},m(l,o){S(e,l,o),n=!0},p(l,o){const a={};o[0]&8&&(a.disabled=l[3]),!i&&o[0]&8192&&(i=!0,a.value=l[13],He(()=>i=!1)),e.$set(a)},i(l){n||(m(e.$$.fragment,l),n=!0)},o(l){g(e.$$.fragment,l),n=!1},d(l){E(e,l)}}}function Lj(t){let e,i,n,s,r=t[16].length+"",l,o,a=((t[16].length===1?t[18]:void 0)||t[21]||t[9])+"",c,u,f,d,p,h,_,b,k,v,$;i=new De({props:{disabled:!t[16].length,"aria-expanded":t[17],"aria-controls":"list-"+t[12]+"-item-list",$$slots:{"start-icon":[Nj]},$$scope:{ctx:t}}}),i.$on("click",t[35]),d=new gn({props:{flex:!0}});let L=t[20]&&(t[15]||!t[16].length)&&s1(t),A=ce(t[16]),P=[];for(let N=0;N<A.length;N+=1)P[N]=o1(n1(t,A,N));const F=N=>g(P[N],1,1,()=>{P[N]=null});let j=t[20]&&!t[15]&&t[16].length&&a1(t);return{c(){e=I("div"),T(i.$$.fragment),n=D(),s=I("div"),l=q(r),o=D(),c=q(a),f=D(),T(d.$$.fragment),p=D(),L&&L.c(),h=D(),_=I("div");for(let N=0;N<P.length;N+=1)P[N].c();k=D(),j&&j.c(),v=K(),C(s,"class","summary"),C(s,"id",u="object-"+t[12]+"-summary"),C(e,"class","toolbar top svelte-1aafx67"),C(_,"class","item-list svelte-1aafx67"),C(_,"id",b="list-"+t[12]+"-item-list"),de(_,"collapsed",!t[17])},m(N,M){y(N,e,M),S(i,e,null),O(e,n),O(e,s),O(s,l),O(s,o),O(s,c),O(e,f),S(d,e,null),O(e,p),L&&L.m(e,null),y(N,h,M),y(N,_,M);for(let R=0;R<P.length;R+=1)P[R]&&P[R].m(_,null);y(N,k,M),j&&j.m(N,M),y(N,v,M),$=!0},p(N,M){const R={};if(M[0]&65536&&(R.disabled=!N[16].length),M[0]&131072&&(R["aria-expanded"]=N[17]),M[0]&4096&&(R["aria-controls"]="list-"+N[12]+"-item-list"),M[0]&4325376|M[1]&536870912&&(R.$$scope={dirty:M,ctx:N}),i.$set(R),(!$||M[0]&65536)&&r!==(r=N[16].length+"")&&W(l,r),(!$||M[0]&2425344)&&a!==(a=((N[16].length===1?N[18]:void 0)||N[21]||N[9])+"")&&W(c,a),(!$||M[0]&4096&&u!==(u="object-"+N[12]+"-summary"))&&C(s,"id",u),N[20]&&(N[15]||!N[16].length)?L?(L.p(N,M),M[0]&1146880&&m(L,1)):(L=s1(N),L.c(),m(L,1),L.m(e,null)):L&&(H(),g(L,1,1,()=>{L=null}),V()),M[0]&508124627){A=ce(N[16]);let G;for(G=0;G<A.length;G+=1){const Q=n1(N,A,G);P[G]?(P[G].p(Q,M),m(P[G],1)):(P[G]=o1(Q),P[G].c(),m(P[G],1),P[G].m(_,null))}for(H(),G=A.length;G<P.length;G+=1)F(G);V()}(!$||M[0]&4096&&b!==(b="list-"+N[12]+"-item-list"))&&C(_,"id",b),(!$||M[0]&131072)&&de(_,"collapsed",!N[17]),N[20]&&!N[15]&&N[16].length?j?(j.p(N,M),M[0]&1146880&&m(j,1)):(j=a1(N),j.c(),m(j,1),j.m(v.parentNode,v)):j&&(H(),g(j,1,1,()=>{j=null}),V())},i(N){if(!$){m(i.$$.fragment,N),m(d.$$.fragment,N),m(L);for(let M=0;M<A.length;M+=1)m(P[M]);m(j),$=!0}},o(N){g(i.$$.fragment,N),g(d.$$.fragment,N),g(L),P=P.filter(Boolean);for(let M=0;M<P.length;M+=1)g(P[M]);g(j),$=!1},d(N){N&&(w(e),w(h),w(_),w(k),w(v)),E(i),E(d),L&&L.d(),mi(P,N),j&&j.d(N)}}}function Nj(t){let e,i;return e=new we({props:{slot:"start-icon",name:t[17]?"expand_more":"chevron_right",label:t[17]?t[22]("collapse"):t[22]("expand")}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s[0]&131072&&(r.name=n[17]?"expand_more":"chevron_right"),s[0]&4325376&&(r.label=n[17]?n[22]("collapse"):n[22]("expand")),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function s1(t){let e,i;return e=new uy({props:{fieldConfig:t[2],items:t[16],addItem:t[24]}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s[0]&4&&(r.fieldConfig=n[2]),s[0]&65536&&(r.items=n[16]),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function r1(t){let e,i=(t[52]?.label||t[52]?.name||"")+"",n;return{c(){e=I("span"),n=q(i),C(e,"class","type svelte-1aafx67")},m(s,r){y(s,e,r),O(e,n)},p(s,r){r[0]&83200&&i!==(i=(s[52]?.label||s[52]?.name||"")+"")&&W(n,i)},d(s){s&&w(e)}}}function Pj(t){let e,i=t[10]&&r1(t);return{c(){i&&i.c(),e=K()},m(n,s){i&&i.m(n,s),y(n,e,s)},p(n,s){n[10]?i?i.p(n,s):(i=r1(n),i.c(),i.m(e.parentNode,e)):i&&(i.d(1),i=null)},d(n){n&&w(e),i&&i.d(n)}}}function Ij(t){let e,i;return e=new we({props:{slot:"start-icon",name:t[51]?"expand_more":"chevron_right",label:t[51]?t[22]("collapse"):t[22]("expand")}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s[0]&2051&&(r.name=n[51]?"expand_more":"chevron_right"),s[0]&4196355&&(r.label=n[51]?n[22]("collapse"):n[22]("expand")),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function Cj(t){let e,i;return e=new we({props:{slot:"start-icon",name:"arrow_upward",label:t[22]("move_up")}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s[0]&4194304&&(r.label=n[22]("move_up")),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function Dj(t){let e,i;return e=new we({props:{slot:"start-icon",name:"arrow_downward",label:t[22]("move_down")}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s[0]&4194304&&(r.label=n[22]("move_down")),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function Mj(t){let e,i;return e=new we({props:{slot:"start-icon",name:"close",label:t[22]("delete")}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s[0]&4194304&&(r.label=n[22]("delete")),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function jj(t){let e,i=t[28](t[50],t[56],t[54])+"",n;return{c(){e=I("div"),n=q(i),C(e,"class","summary svelte-1aafx67")},m(s,r){y(s,e,r),O(e,n)},p(s,r){r[0]&607488&&i!==(i=s[28](s[50],s[56],s[54])+"")&&W(n,i)},i:z,o:z,d(s){s&&w(e)}}}function Rj(t){let e=[],i=new Map,n,s,r=ce(t[53]);const l=o=>o[57].name;for(let o=0;o<r.length;o+=1){let a=i1(t,r,o),c=l(a);i.set(c,e[o]=l1(c,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();n=K()},m(o,a){for(let c=0;c<e.length;c+=1)e[c]&&e[c].m(o,a);y(o,n,a),s=!0},p(o,a){a[0]&83411&&(r=ce(o[53]),H(),e=ct(e,a,l,1,o,r,i,n.parentNode,at,l1,n,i1),V())},i(o){if(!s){for(let a=0;a<r.length;a+=1)m(e[a]);s=!0}},o(o){for(let a=0;a<e.length;a+=1)g(e[a]);s=!1},d(o){o&&w(n);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function l1(t,e){let i,n,s;return n=new Fp({props:{keyPath:e[4]?`${e[1]}.${e[56]}`:`${e[1]}.${e[56]}.${e[57].name}`,locale:e[0],fieldConfig:e[57]}}),{key:t,first:null,c(){i=K(),T(n.$$.fragment),this.first=i},m(r,l){y(r,i,l),S(n,r,l),s=!0},p(r,l){e=r;const o={};l[0]&83410&&(o.keyPath=e[4]?`${e[1]}.${e[56]}`:`${e[1]}.${e[56]}.${e[57].name}`),l[0]&1&&(o.locale=e[0]),l[0]&83392&&(o.fieldConfig=e[57]),n.$set(o)},i(r){s||(m(n.$$.fragment,r),s=!0)},o(r){g(n.$$.fragment,r),s=!1},d(r){r&&w(i),E(n,r)}}}function o1(t){let e,i,n,s,r,l,o,a,c,u,f,d,p,h,_,b,k,v,$,L,A;function P(){return t[36](t[56],t[51])}s=new De({props:{"aria-expanded":t[51],"aria-controls":"list-"+t[12]+"-item-"+t[56]+"-body",$$slots:{"start-icon":[Ij],default:[Pj]},$$scope:{ctx:t}}}),s.$on("click",P);function F(){return t[37](t[56])}o=new De({props:{disabled:t[56]===0,$$slots:{"start-icon":[Cj]},$$scope:{ctx:t}}}),o.$on("click",F),c=new gn({});function j(){return t[38](t[56])}f=new De({props:{disabled:t[56]===t[16].length-1,$$slots:{"start-icon":[Dj]},$$scope:{ctx:t}}}),f.$on("click",j);function N(){return t[39](t[56])}h=new De({props:{$$slots:{"start-icon":[Mj]},$$scope:{ctx:t}}}),h.$on("click",N);const M=[Rj,jj],R=[];function G(Q,te){return Q[51]?0:1}return k=G(t),v=R[k]=M[k](t),{c(){e=I("div"),i=I("div"),n=I("div"),T(s.$$.fragment),r=D(),l=I("div"),T(o.$$.fragment),a=D(),T(c.$$.fragment),u=D(),T(f.$$.fragment),d=D(),p=I("div"),T(h.$$.fragment),_=D(),b=I("div"),v.c(),L=D(),C(n,"class","svelte-1aafx67"),C(l,"class","svelte-1aafx67"),C(p,"class","svelte-1aafx67"),C(i,"class","header svelte-1aafx67"),C(b,"class","item-body"),C(b,"id",$="list-"+t[12]+"-item-"+t[56]+"-body"),C(e,"class","item svelte-1aafx67")},m(Q,te){y(Q,e,te),O(e,i),O(i,n),S(s,n,null),O(i,r),O(i,l),S(o,l,null),O(l,a),S(c,l,null),O(l,u),S(f,l,null),O(i,d),O(i,p),S(h,p,null),O(e,_),O(e,b),R[k].m(b,null),O(e,L),A=!0},p(Q,te){t=Q;const x={};te[0]&2051&&(x["aria-expanded"]=t[51]),te[0]&4096&&(x["aria-controls"]="list-"+t[12]+"-item-"+t[56]+"-body"),te[0]&4279555|te[1]&536870912&&(x.$$scope={dirty:te,ctx:t}),s.$set(x);const Y={};te[0]&4194304|te[1]&536870912&&(Y.$$scope={dirty:te,ctx:t}),o.$set(Y);const ue={};te[0]&65536&&(ue.disabled=t[56]===t[16].length-1),te[0]&4194304|te[1]&536870912&&(ue.$$scope={dirty:te,ctx:t}),f.$set(ue);const Fe={};te[0]&4194304|te[1]&536870912&&(Fe.$$scope={dirty:te,ctx:t}),h.$set(Fe);let lt=k;k=G(t),k===lt?R[k].p(t,te):(H(),g(R[lt],1,1,()=>{R[lt]=null}),V(),v=R[k],v?v.p(t,te):(v=R[k]=M[k](t),v.c()),m(v,1),v.m(b,null)),(!A||te[0]&4096&&$!==($="list-"+t[12]+"-item-"+t[56]+"-body"))&&C(b,"id",$)},i(Q){A||(m(s.$$.fragment,Q),m(o.$$.fragment,Q),m(c.$$.fragment,Q),m(f.$$.fragment,Q),m(h.$$.fragment,Q),m(v),A=!0)},o(Q){g(s.$$.fragment,Q),g(o.$$.fragment,Q),g(c.$$.fragment,Q),g(f.$$.fragment,Q),g(h.$$.fragment,Q),g(v),A=!1},d(Q){Q&&w(e),E(s),E(o),E(c),E(f),E(h),R[k].d()}}}function a1(t){let e,i,n,s,r;return i=new gn({props:{flex:!0}}),s=new uy({props:{fieldConfig:t[2],items:t[16],addItem:t[24]}}),{c(){e=I("div"),T(i.$$.fragment),n=D(),T(s.$$.fragment),C(e,"class","toolbar bottom svelte-1aafx67")},m(l,o){y(l,e,o),S(i,e,null),O(e,n),S(s,e,null),r=!0},p(l,o){const a={};o[0]&4&&(a.fieldConfig=l[2]),o[0]&65536&&(a.items=l[16]),s.$set(a)},i(l){r||(m(i.$$.fragment,l),m(s.$$.fragment,l),r=!0)},o(l){g(i.$$.fragment,l),g(s.$$.fragment,l),r=!1},d(l){l&&w(e),E(i),E(s)}}}function Fj(t){let e,i,n,s;const r=[Lj,Aj],l=[];function o(a,c){return a[5]?0:1}return e=o(t),i=l[e]=r[e](t),{c(){i.c(),n=K()},m(a,c){l[e].m(a,c),y(a,n,c),s=!0},p(a,c){let u=e;e=o(a),e===u?l[e].p(a,c):(H(),g(l[u],1,1,()=>{l[u]=null}),V(),i=l[e],i?i.p(a,c):(i=l[e]=r[e](a),i.c()),m(i,1),i.m(n.parentNode,n))},i(a){s||(m(i),s=!0)},o(a){g(i),s=!1},d(a){a&&w(n),l[e].d(a)}}}function Uj(t){let e,i;return e=new _n({props:{"aria-labelledby":"list-"+t[12]+"-summary",$$slots:{default:[Fj]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s[0]&4096&&(r["aria-labelledby"]="list-"+n[12]+"-summary"),s[0]&8388607|s[1]&536870912&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function xj(t,e,i){let n,s,r,l,o,a,c,u,f,d,p,h,_,b,k,v,$,L,A,P,F,j,N,M,R,G;U(t,Ke,ie=>i(11,R=ie)),U(t,pe,ie=>i(22,G=ie));let{locale:Q}=e,{keyPath:te}=e,{fieldConfig:x}=e,{currentValue:Y}=e,{disabled:ue=!1}=e,Fe=!1,lt="",mt="";on(()=>{i(30,Fe=!0),i(12,lt=Hs().split("-").pop()),N.forEach((ie,se)=>{Me(Ke,R.viewStates[Q][`${te}.${se}.expanded`]=!o,R)})});const bt=()=>{const ie=Y.join(", ");!mt.match(/,\s*$/)&&mt!==ie&&i(13,mt=ie)},re=()=>{const ie=mt.split(/,/g).map(se=>se.trim()).filter(se=>se!=="");Object.keys(R.currentValues).forEach(se=>{r!=="duplicate"&&se!==Q||(Object.keys(R.currentValues[se]).forEach(Ee=>{Ee.match(`^${jt(te)}\\.\\d+$`)&&delete R.currentValues[se][Ee]}),ie.forEach((Ee,Ye)=>{Me(Ke,R.currentValues[se][`${te}.${Ye}`]=Ee,R)}))})},_e=ie=>{Object.keys(R.currentValues).forEach(se=>{r!=="duplicate"&&se!==Q||hw(se,te,ie)})},kn=ie=>{_e(({valueList:se,viewList:Ee})=>{const Ye=ie?h.find(({name:Ot})=>Ot===ie)?.fields??[]:d??[f],ot=p?0:se.length,nt=mw(Ye);ie&&(nt[_]=ie),se.splice(ot,0,b?nt[f.name]:nt),Ee.splice(ot,0,{expanded:!0})})},ht=ie=>{_e(({valueList:se,viewList:Ee})=>{se.splice(ie,1),Ee.splice(ie,1)})},qt=ie=>{_e(({valueList:se,viewList:Ee})=>{[se[ie],se[ie-1]]=[se[ie-1],se[ie]],[Ee[ie],Ee[ie-1]]=[Ee[ie-1],Ee[ie]]})},un=ie=>{_e(({valueList:se,viewList:Ee})=>{[se[ie],se[ie+1]]=[se[ie+1],se[ie]],[Ee[ie],Ee[ie+1]]=[Ee[ie+1],Ee[ie]]})},wn=(ie,se,Ee)=>Ee?Ee.replaceAll(/{{fields\.(.+?)}}/g,(Ye,ot)=>{const nt=Fd({collectionName:A,fileName:P,valueMap:F,keyPath:b?`${te}.${se}`:`${te}.${se}.${ot}`,locale:Q});return Array.isArray(nt)?j.format(nt):String(nt)}):ie.title||ie.name||"",ji=()=>{i(17,M=!M)},Nt=(ie,se)=>{Object.keys(R.viewStates).forEach(Ee=>{Me(Ke,R.viewStates[Ee][`${te}.${ie}.expanded`]=!se,R)})},Ri=ie=>{qt(ie)},Yt=ie=>{un(ie)},yt=ie=>{ht(ie)},Mt=(ie,{name:se})=>se===ie[_];function Rt(ie){mt=ie,i(13,mt)}const pr=()=>{re()};return t.$$set=ie=>{"locale"in ie&&i(0,Q=ie.locale),"keyPath"in ie&&i(1,te=ie.keyPath),"fieldConfig"in ie&&i(2,x=ie.fieldConfig),"currentValue"in ie&&i(29,Y=ie.currentValue),"disabled"in ie&&i(3,ue=ie.disabled)},t.$$.update=()=>{t.$$.dirty[0]&4&&i(9,{name:n,label:s,i18n:r,allow_add:l=!0,collapsed:o=!1,summary:a,minimize_collapsed:c=!1,label_singular:u,field:f,fields:d,add_to_top:p=!1,types:h,typeKey:_="type"}=x,n,(i(21,s),i(2,x)),(i(20,l),i(2,x)),(i(19,a),i(2,x)),(i(32,c),i(2,x)),(i(18,u),i(2,x)),(i(6,f),i(2,x)),(i(7,d),i(2,x)),(i(15,p),i(2,x)),(i(8,h),i(2,x)),(i(14,_),i(2,x))),t.$$.dirty[0]&64&&i(4,b=!!f),t.$$.dirty[0]&128&&i(34,k=Array.isArray(d)),t.$$.dirty[0]&256&&i(10,v=Array.isArray(h)),t.$$.dirty[0]&1040|t.$$.dirty[1]&8&&i(5,$=b||k||v),t.$$.dirty[0]&2&&i(33,L=new RegExp(`^${jt(te)}\\.(\\d+)(.*)?`)),t.$$.dirty[0]&2048&&({collectionName:A,fileName:P}=R??{}),t.$$.dirty[0]&2049&&i(31,F=R.currentValues[Q]),t.$$.dirty[0]&1&&(j=new Intl.ListFormat(Q,{style:"narrow",type:"conjunction"})),t.$$.dirty[0]&514|t.$$.dirty[1]&5&&i(16,N=ar(Object.fromEntries(Object.entries(F).filter(([ie])=>ie.match(L)).map(([ie,se])=>[ie.replace(new RegExp(`^${jt(te)}`),n),se])))[n]??[]),t.$$.dirty[1]&2&&i(17,M=!c),t.$$.dirty[0]&1610612768&&Fe&&!$&&bt()},[Q,te,x,ue,b,$,f,d,h,n,v,R,lt,mt,_,p,N,M,u,a,l,s,G,re,kn,ht,qt,un,wn,Y,Fe,F,c,L,k,ji,Nt,Ri,Yt,yt,Mt,Rt,pr]}class zj extends J{constructor(e){super(),X(this,e,xj,Uj,Z,{locale:0,keyPath:1,fieldConfig:2,currentValue:29,disabled:3},Oj,[-1,-1])}}function Bj(t){ve(t,"svelte-15wwj34","section.svelte-15wwj34.svelte-15wwj34{overflow:hidden;margin:8px 0;padding:8px 0}section.svelte-15wwj34>*{margin-right:auto;margin-left:auto;max-width:768px}section.svelte-15wwj34 h4.svelte-15wwj34{color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-small)}section.svelte-15wwj34 h4.svelte-15wwj34:not(:last-child){margin-bottom:8px}section.svelte-15wwj34 p{margin:8px auto 0;-webkit-user-select:text;user-select:text}section.svelte-15wwj34 img{max-width:100%}section.svelte-15wwj34 .subsection{border-width:2px 2px 0;border-style:solid;border-color:var(--sui-secondary-border-color);padding:8px 16px}section.svelte-15wwj34 .subsection .title{font-size:inherit;font-weight:normal}section.svelte-15wwj34 .subsection:first-of-type{border-top-right-radius:var(--sui-control-medium-border-radius);border-top-left-radius:var(--sui-control-medium-border-radius)}section.svelte-15wwj34 .subsection:last-of-type{border-bottom:2px solid var(--sui-secondary-border-color);border-bottom-right-radius:var(--sui-control-medium-border-radius);border-bottom-left-radius:var(--sui-control-medium-border-radius)}")}function c1(t){let e,i,n=(t[8]||t[9])+"",s,r,l,o=t[3]in rc&&u1(t);return{c(){e=I("section"),i=I("h4"),s=q(n),r=D(),o&&o.c(),C(i,"class","svelte-15wwj34"),C(e,"data-widget",t[3]),C(e,"data-key-path",t[1]),C(e,"class","svelte-15wwj34")},m(a,c){y(a,e,c),O(e,i),O(i,s),O(e,r),o&&o.m(e,null),l=!0},p(a,c){(!l||c&768)&&n!==(n=(a[8]||a[9])+"")&&W(s,n),a[3]in rc?o?(o.p(a,c),c&8&&m(o,1)):(o=u1(a),o.c(),m(o,1),o.m(e,null)):o&&(H(),g(o,1,1,()=>{o=null}),V()),(!l||c&8)&&C(e,"data-widget",a[3]),(!l||c&2)&&C(e,"data-key-path",a[1])},i(a){l||(m(o),l=!0)},o(a){g(o),l=!1},d(a){a&&w(e),o&&o.d()}}}function u1(t){let e,i,n;var s=rc[t[3]];function r(l,o){return{props:{keyPath:l[1],locale:l[0],fieldConfig:l[2],currentValue:l[4]}}}return s&&(e=Zt(s,r(t))),{c(){e&&T(e.$$.fragment),i=K()},m(l,o){e&&S(e,l,o),y(l,i,o),n=!0},p(l,o){if(o&8&&s!==(s=rc[l[3]])){if(e){H();const a=e;g(a.$$.fragment,1,0,()=>{E(a,1)}),V()}s?(e=Zt(s,r(l)),T(e.$$.fragment),m(e.$$.fragment,1),S(e,i.parentNode,i)):e=null}else if(s){const a={};o&2&&(a.keyPath=l[1]),o&1&&(a.locale=l[0]),o&4&&(a.fieldConfig=l[2]),o&16&&(a.currentValue=l[4]),e.$set(a)}},i(l){n||(e&&m(e.$$.fragment,l),n=!0)},o(l){e&&g(e.$$.fragment,l),n=!1},d(l){l&&w(i),e&&E(e,l)}}}function Hj(t){let e,i,n=t[3]!=="hidden"&&(t[0]===t[7]||t[6]||t[5])&&c1(t);return{c(){n&&n.c(),e=K()},m(s,r){n&&n.m(s,r),y(s,e,r),i=!0},p(s,[r]){s[3]!=="hidden"&&(s[0]===s[7]||s[6]||s[5])?n?(n.p(s,r),r&233&&m(n,1)):(n=c1(s),n.c(),m(n,1),n.m(e.parentNode,e)):n&&(H(),g(n,1,1,()=>{n=null}),V())},i(s){i||(m(n),i=!0)},o(s){g(n),i=!1},d(s){s&&w(e),n&&n.d(s)}}}function Vj(t,e,i){let n,s,r,l,o,a,c,u,f,d,p,h,_,b;U(t,Ke,L=>i(16,b=L));let{locale:k}=e,{keyPath:v}=e,{fieldConfig:$}=e;return t.$$set=L=>{"locale"in L&&i(0,k=L.locale),"keyPath"in L&&i(1,v=L.keyPath),"fieldConfig"in L&&i(2,$=L.fieldConfig)},t.$$.update=()=>{t.$$.dirty&4&&i(9,{name:n,label:s="",widget:r="string",i18n:l=!1}=$,n,(i(8,s),i(2,$)),(i(3,r),i(2,$)),(i(12,l),i(2,$))),t.$$.dirty&8&&i(15,o=["relation","select"].includes(r)),t.$$.dirty&32772&&i(14,a=o?$.multiple:void 0),t.$$.dirty&49160&&i(11,c=r==="list"||o&&a),t.$$.dirty&65536&&i(13,{hasLocales:u=!1,defaultLocale:f="default"}=b.collection._i18n??{},u,(i(7,f),i(16,b))),t.$$.dirty&12288&&i(6,d=u&&(l===!0||l==="translate")),t.$$.dirty&12288&&i(5,p=u&&l==="duplicate"),t.$$.dirty&2&&i(10,h=new RegExp(`^${jt(v)}\\.\\d+$`)),t.$$.dirty&68611&&i(4,_=c?Object.entries(b.currentValues[k]).filter(([L])=>L.match(h)).map(([,L])=>L).filter(L=>L!==void 0):b.currentValues[k][v])},[k,v,$,r,_,p,d,f,s,n,h,c,l,u,a,o,b]}class Rp extends J{constructor(e){super(),X(this,e,Vj,Hj,Z,{locale:0,keyPath:1,fieldConfig:2},Bj)}}function f1(t,e,i){const n=t.slice();n[15]=e[i],n[19]=i;const s=Array.isArray(n[3])?n[6].currentValues[n[0]][`${n[1]}.${n[19]}.${n[10]}`]:void 0;n[16]=s;const r=n[16]?n[3].find(function(...o){return t[14](n[16],...o)})?.fields??[]:n[4]??[n[5]];return n[17]=r,n}function d1(t,e,i){const n=t.slice();return n[20]=e[i],n}function qj(t){let e,i=t[8].format(t[2])+"",n;return{c(){e=I("p"),n=q(i)},m(s,r){y(s,e,r),O(e,n)},p(s,r){r&260&&i!==(i=s[8].format(s[2])+"")&&W(n,i)},i:z,o:z,d(s){s&&w(e)}}}function Yj(t){let e,i,n=ce(t[7]),s=[];for(let l=0;l<n.length;l+=1)s[l]=m1(f1(t,n,l));const r=l=>g(s[l],1,1,()=>{s[l]=null});return{c(){for(let l=0;l<s.length;l+=1)s[l].c();e=K()},m(l,o){for(let a=0;a<s.length;a+=1)s[a]&&s[a].m(l,o);y(l,e,o),i=!0},p(l,o){if(o&1275){n=ce(l[7]);let a;for(a=0;a<n.length;a+=1){const c=f1(l,n,a);s[a]?(s[a].p(c,o),m(s[a],1)):(s[a]=m1(c),s[a].c(),m(s[a],1),s[a].m(e.parentNode,e))}for(H(),a=n.length;a<s.length;a+=1)r(a);V()}},i(l){if(!i){for(let o=0;o<n.length;o+=1)m(s[o]);i=!0}},o(l){s=s.filter(Boolean);for(let o=0;o<s.length;o+=1)g(s[o]);i=!1},d(l){l&&w(e),mi(s,l)}}}function p1(t,e){let i,n,s;return n=new Rp({props:{keyPath:e[5]?`${e[1]}.${e[19]}`:`${e[1]}.${e[19]}.${e[20].name}`,locale:e[0],fieldConfig:e[20]}}),{key:t,first:null,c(){i=K(),T(n.$$.fragment),this.first=i},m(r,l){y(r,i,l),S(n,r,l),s=!0},p(r,l){e=r;const o={};l&1147&&(o.keyPath=e[5]?`${e[1]}.${e[19]}`:`${e[1]}.${e[19]}.${e[20].name}`),l&1&&(o.locale=e[0]),l&1147&&(o.fieldConfig=e[20]),n.$set(o)},i(r){s||(m(n.$$.fragment,r),s=!0)},o(r){g(n.$$.fragment,r),s=!1},d(r){r&&w(i),E(n,r)}}}function m1(t){let e,i=[],n=new Map,s,r,l=ce(t[17]);const o=a=>a[20].name;for(let a=0;a<l.length;a+=1){let c=d1(t,l,a),u=o(c);n.set(u,i[a]=p1(u,c))}return{c(){e=I("section");for(let a=0;a<i.length;a+=1)i[a].c();s=D(),C(e,"class","subsection")},m(a,c){y(a,e,c);for(let u=0;u<i.length;u+=1)i[u]&&i[u].m(e,null);O(e,s),r=!0},p(a,c){c&1147&&(l=ce(a[17]),H(),i=ct(i,c,o,1,a,l,n,e,at,p1,s,d1),V())},i(a){if(!r){for(let c=0;c<l.length;c+=1)m(i[c]);r=!0}},o(a){for(let c=0;c<i.length;c+=1)g(i[c]);r=!1},d(a){a&&w(e);for(let c=0;c<i.length;c+=1)i[c].d()}}}function Gj(t){let e,i,n,s,r;const l=[Yj,qj],o=[];function a(c,u){return u&4&&(e=null),c[9]?0:(e==null&&(e=!!(Array.isArray(c[2])&&c[2].length)),e?1:-1)}return~(i=a(t,-1))&&(n=o[i]=l[i](t)),{c(){n&&n.c(),s=K()},m(c,u){~i&&o[i].m(c,u),y(c,s,u),r=!0},p(c,[u]){let f=i;i=a(c,u),i===f?~i&&o[i].p(c,u):(n&&(H(),g(o[f],1,1,()=>{o[f]=null}),V()),~i?(n=o[i],n?n.p(c,u):(n=o[i]=l[i](c),n.c()),m(n,1),n.m(s.parentNode,s)):n=null)},i(c){r||(m(n),r=!0)},o(c){g(n),r=!1},d(c){c&&w(s),~i&&o[i].d(c)}}}function Wj(t,e,i){let n,s,r,l,o,a,c,u,f,d;U(t,Ke,v=>i(6,d=v));let{locale:p}=e,{keyPath:h}=e,{fieldConfig:_}=e,{currentValue:b}=e;const k=(v,{name:$})=>$===v;return t.$$set=v=>{"locale"in v&&i(0,p=v.locale),"keyPath"in v&&i(1,h=v.keyPath),"fieldConfig"in v&&i(11,_=v.fieldConfig),"currentValue"in v&&i(2,b=v.currentValue)},t.$$.update=()=>{t.$$.dirty&2048&&i(12,{name:n,field:s,fields:r,types:l,typeKey:o="type"}=_,n,(i(5,s),i(11,_)),(i(4,r),i(11,_)),(i(3,l),i(11,_)),(i(10,o),i(11,_))),t.$$.dirty&56&&i(9,a=!!(s??r??l)),t.$$.dirty&2&&i(13,c=new RegExp(`^${jt(h)}\\.\\d+`)),t.$$.dirty&1&&i(8,u=new Intl.ListFormat(p,{style:"narrow",type:"conjunction"})),t.$$.dirty&12355&&i(7,f=ar(Object.fromEntries(Object.entries(d.currentValues[p]).filter(([v])=>v.match(c)).map(([v,$])=>[v.replace(new RegExp(`^${jt(h)}`),n),$])))[n]??[])},[p,h,b,l,r,s,d,f,u,a,o,_,n,c,k]}class Kj extends J{constructor(e){super(),X(this,e,Wj,Gj,Z,{locale:0,keyPath:1,fieldConfig:11,currentValue:2})}}function Zj(t){let e,i,n;function s(l){t[5](l)}let r={autoResize:!0,disabled:t[1]};return t[0]!==void 0&&(r.value=t[0]),e=new _d({props:r}),ae.push(()=>ze(e,"value",s)),{c(){T(e.$$.fragment)},m(l,o){S(e,l,o),n=!0},p(l,[o]){const a={};o&2&&(a.disabled=l[1]),!i&&o&1&&(i=!0,a.value=l[0],He(()=>i=!1)),e.$set(a)},i(l){n||(m(e.$$.fragment,l),n=!0)},o(l){g(e.$$.fragment,l),n=!1},d(l){E(e,l)}}}function Xj(t,e,i){let{locale:n}=e,{keyPath:s}=e,{fieldConfig:r}=e,{currentValue:l}=e,{disabled:o=!1}=e;function a(c){l=c,i(0,l)}return t.$$set=c=>{"locale"in c&&i(2,n=c.locale),"keyPath"in c&&i(3,s=c.keyPath),"fieldConfig"in c&&i(4,r=c.fieldConfig),"currentValue"in c&&i(0,l=c.currentValue),"disabled"in c&&i(1,o=c.disabled)},[l,o,n,s,r,a]}class Jj extends J{constructor(e){super(),X(this,e,Xj,Zj,Z,{locale:2,keyPath:3,fieldConfig:4,currentValue:0,disabled:1})}}function Qj(t){ve(t,"svelte-15hu8tj","[role=document].svelte-15hu8tj :is(h1, h2, h3, h4, h5, h6, p, ul, ol){margin:1em 0 0}")}function h1(t){let e,i=(t[2]?bn.sanitize(t[1]):t[1])+"",n;return{c(){e=new ad(!1),n=K(),e.a=n},m(s,r){e.m(i,s,r),y(s,n,r)},p(s,r){r&6&&i!==(i=(s[2]?bn.sanitize(s[1]):s[1])+"")&&e.p(i)},d(s){s&&(w(n),e.d())}}}function eR(t){let e,i=typeof t[0]=="string"&&t[0].trim(),n=i&&h1(t);return{c(){e=I("div"),n&&n.c(),C(e,"role","document"),C(e,"class","svelte-15hu8tj")},m(s,r){y(s,e,r),n&&n.m(e,null)},p(s,[r]){r&1&&(i=typeof s[0]=="string"&&s[0].trim()),i?n?n.p(s,r):(n=h1(s),n.c(),n.m(e,null)):n&&(n.d(1),n=null)},i:z,o:z,d(s){s&&w(e),n&&n.d()}}}function tR(t,e,i){let n,s,{locale:r}=e,{keyPath:l}=e,{fieldConfig:o}=e,{currentValue:a}=e;return t.$$set=c=>{"locale"in c&&i(3,r=c.locale),"keyPath"in c&&i(4,l=c.keyPath),"fieldConfig"in c&&i(5,o=c.fieldConfig),"currentValue"in c&&i(0,a=c.currentValue)},t.$$.update=()=>{t.$$.dirty&32&&i(2,{sanitize_preview:n=!1}=o,n),t.$$.dirty&1&&i(1,s=tt.parse(a??""))},[a,s,n,r,l,o]}class nR extends J{constructor(e){super(),X(this,e,tR,eR,Z,{locale:3,keyPath:4,fieldConfig:5,currentValue:0},Qj)}}function iR(t){let e,i,n;function s(l){t[9](l)}let r={min:t[4],max:t[3],step:t[2],disabled:t[0]};return t[1]!==void 0&&(r.value=t[1]),e=new RE({props:r}),ae.push(()=>ze(e,"value",s)),{c(){T(e.$$.fragment)},m(l,o){S(e,l,o),n=!0},p(l,[o]){const a={};o&16&&(a.min=l[4]),o&8&&(a.max=l[3]),o&4&&(a.step=l[2]),o&1&&(a.disabled=l[0]),!i&&o&2&&(i=!0,a.value=l[1],He(()=>i=!1)),e.$set(a)},i(l){n||(m(e.$$.fragment,l),n=!0)},o(l){g(e.$$.fragment,l),n=!1},d(l){E(e,l)}}}function sR(t,e,i){let n,s,r,l,{locale:o}=e,{keyPath:a}=e,{fieldConfig:c}=e,{currentValue:u}=e,{disabled:f=!1}=e,d="";const p=()=>{u!==void 0&&d!==String(u)&&i(1,d=String(u))},h=()=>{let b;n==="int"?b=Number.parseInt(d,10):n==="float"?b=Number.parseFloat(d):b=d,(n==="int"||n==="float")&&Number.isNaN(b)&&(b=""),u!==b&&i(5,u=b)};function _(b){d=b,i(1,d)}return t.$$set=b=>{"locale"in b&&i(6,o=b.locale),"keyPath"in b&&i(7,a=b.keyPath),"fieldConfig"in b&&i(8,c=b.fieldConfig),"currentValue"in b&&i(5,u=b.currentValue),"disabled"in b&&i(0,f=b.disabled)},t.$$.update=()=>{t.$$.dirty&256&&i(4,{value_type:n="int",min:s,max:r,step:l=1}=c,s,(i(3,r),i(8,c)),(i(2,l),i(8,c))),t.$$.dirty&32&&p(),t.$$.dirty&2&&h()},[f,d,l,r,s,u,o,a,c,_]}class rR extends J{constructor(e){super(),X(this,e,sR,iR,Z,{locale:6,keyPath:7,fieldConfig:8,currentValue:5,disabled:0})}}function lR(t){let e,i;return{c(){e=I("p"),i=q(t[1])},m(n,s){y(n,e,s),O(e,i)},p(n,s){s&2&&W(i,n[1])},d(n){n&&w(e)}}}function oR(t){let e,i=Intl.NumberFormat(t[0]).format(Number(t[1]))+"",n;return{c(){e=I("p"),n=q(i)},m(s,r){y(s,e,r),O(e,n)},p(s,r){r&3&&i!==(i=Intl.NumberFormat(s[0]).format(Number(s[1]))+"")&&W(n,i)},d(s){s&&w(e)}}}function aR(t){return{c:z,m:z,p:z,d:z}}function cR(t){let e;function i(r,l){return r[1]===void 0||r[1]===""?aR:r[2]==="int"||r[2]==="float"?oR:lR}let n=i(t),s=n(t);return{c(){s.c(),e=K()},m(r,l){s.m(r,l),y(r,e,l)},p(r,[l]){n===(n=i(r))&&s?s.p(r,l):(s.d(1),s=n(r),s&&(s.c(),s.m(e.parentNode,e)))},i:z,o:z,d(r){r&&w(e),s.d(r)}}}function uR(t,e,i){let n,{locale:s}=e,{keyPath:r}=e,{fieldConfig:l}=e,{currentValue:o}=e;return t.$$set=a=>{"locale"in a&&i(0,s=a.locale),"keyPath"in a&&i(3,r=a.keyPath),"fieldConfig"in a&&i(4,l=a.fieldConfig),"currentValue"in a&&i(1,o=a.currentValue)},t.$$.update=()=>{t.$$.dirty&16&&i(2,{value_type:n="int"}=l,n)},[s,o,n,r,l]}class fR extends J{constructor(e){super(),X(this,e,uR,cR,Z,{locale:0,keyPath:3,fieldConfig:4,currentValue:1})}}function dR(t){ve(t,"svelte-7x2t0v",".toolbar.svelte-7x2t0v.svelte-7x2t0v{display:flex;align-items:center;gap:8px;padding:4px}.toolbar.svelte-7x2t0v .summary.svelte-7x2t0v{overflow:hidden;color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-small);font-weight:600;white-space:nowrap;text-overflow:ellipsis}.item-list.collapsed.svelte-7x2t0v.svelte-7x2t0v{display:none}")}function g1(t,e,i){const n=t.slice();return n[18]=e[i],n}function pR(t){let e,i;return e=new we({props:{slot:"start-icon",name:t[3]?"expand_more":"chevron_right",label:t[3]?t[5]("collapse"):t[5]("expand")}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&8&&(r.name=n[3]?"expand_more":"chevron_right"),s&40&&(r.label=n[3]?n[5]("collapse"):n[5]("expand")),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function _1(t){let e,i=t[6]()+"",n,s;return{c(){e=I("div"),n=q(i),C(e,"class","summary svelte-7x2t0v"),C(e,"id",s="object-"+t[2]+"-summary")},m(r,l){y(r,e,l),O(e,n)},p(r,l){l&4&&s!==(s="object-"+r[2]+"-summary")&&C(e,"id",s)},d(r){r&&w(e)}}}function b1(t,e){let i,n,s;return n=new Fp({props:{keyPath:[e[1],e[18].name].join("."),locale:e[0],fieldConfig:e[18]}}),{key:t,first:null,c(){i=K(),T(n.$$.fragment),this.first=i},m(r,l){y(r,i,l),S(n,r,l),s=!0},p(r,l){e=r;const o={};l&18&&(o.keyPath=[e[1],e[18].name].join(".")),l&1&&(o.locale=e[0]),l&16&&(o.fieldConfig=e[18]),n.$set(o)},i(r){s||(m(n.$$.fragment,r),s=!0)},o(r){g(n.$$.fragment,r),s=!1},d(r){r&&w(i),E(n,r)}}}function mR(t){let e,i,n,s,r,l,o,a=[],c=new Map,u,f;i=new De({props:{"aria-expanded":t[3],"aria-controls":"object-"+t[2]+"-item-list",$$slots:{"start-icon":[pR]},$$scope:{ctx:t}}}),i.$on("click",t[12]);let d=!t[3]&&_1(t);r=new gn({props:{flex:!0}});let p=ce(t[4]);const h=_=>_[18].name;for(let _=0;_<p.length;_+=1){let b=g1(t,p,_),k=h(b);c.set(k,a[_]=b1(k,b))}return{c(){e=I("div"),T(i.$$.fragment),n=D(),d&&d.c(),s=D(),T(r.$$.fragment),l=D(),o=I("div");for(let _=0;_<a.length;_+=1)a[_].c();C(e,"class","toolbar top svelte-7x2t0v"),C(o,"class","item-list svelte-7x2t0v"),C(o,"id",u="object-"+t[2]+"-item-list"),de(o,"collapsed",!t[3])},m(_,b){y(_,e,b),S(i,e,null),O(e,n),d&&d.m(e,null),O(e,s),S(r,e,null),y(_,l,b),y(_,o,b);for(let k=0;k<a.length;k+=1)a[k]&&a[k].m(o,null);f=!0},p(_,b){const k={};b&8&&(k["aria-expanded"]=_[3]),b&4&&(k["aria-controls"]="object-"+_[2]+"-item-list"),b&2097192&&(k.$$scope={dirty:b,ctx:_}),i.$set(k),_[3]?d&&(d.d(1),d=null):d?d.p(_,b):(d=_1(_),d.c(),d.m(e,s)),b&19&&(p=ce(_[4]),H(),a=ct(a,b,h,1,_,p,c,o,at,b1,null,g1),V()),(!f||b&4&&u!==(u="object-"+_[2]+"-item-list"))&&C(o,"id",u),(!f||b&8)&&de(o,"collapsed",!_[3])},i(_){if(!f){m(i.$$.fragment,_),m(r.$$.fragment,_);for(let b=0;b<p.length;b+=1)m(a[b]);f=!0}},o(_){g(i.$$.fragment,_),g(r.$$.fragment,_);for(let b=0;b<a.length;b+=1)g(a[b]);f=!1},d(_){_&&(w(e),w(l),w(o)),E(i),d&&d.d(),E(r);for(let b=0;b<a.length;b+=1)a[b].d()}}}function hR(t){let e,i;return e=new _n({props:{"aria-labelledby":"object-"+t[2]+"-summary",$$slots:{default:[mR]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,[s]){const r={};s&4&&(r["aria-labelledby"]="object-"+n[2]+"-summary"),s&2097215&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function gR(t,e,i){let n,s,r,l,o,a,c,u,f,d;U(t,Ke,A=>i(11,f=A)),U(t,pe,A=>i(5,d=A));let{locale:p}=e,{keyPath:h}=e,{fieldConfig:_}=e,{currentValue:b}=e,{disabled:k=!1}=e,v="";on(()=>{i(2,v=Hs().split("-").pop())});const $=()=>s?s.replaceAll(/{{fields\.(.+?)}}/g,(A,P)=>{const F=Fd({collectionName:l,fileName:o,valueMap:a,keyPath:`${h}.${P}`,locale:p});return Array.isArray(F)?c.format(F):String(F)}):a[`${h}.title`]??a[`${h}.name`]??"",L=()=>{i(3,u=!u)};return t.$$set=A=>{"locale"in A&&i(0,p=A.locale),"keyPath"in A&&i(1,h=A.keyPath),"fieldConfig"in A&&i(7,_=A.fieldConfig),"currentValue"in A&&i(8,b=A.currentValue),"disabled"in A&&i(9,k=A.disabled)},t.$$.update=()=>{t.$$.dirty&128&&i(10,{collapsed:n=!1,summary:s,fields:r}=_,n,(i(4,r),i(7,_))),t.$$.dirty&2048&&({collectionName:l,fileName:o}=f??{}),t.$$.dirty&2049&&(a=f.currentValues[p]),t.$$.dirty&1&&(c=new Intl.ListFormat(p,{style:"narrow",type:"conjunction"})),t.$$.dirty&1024&&i(3,u=!n)},[p,h,v,u,r,d,$,_,b,k,n,f,L]}class _R extends J{constructor(e){super(),X(this,e,gR,hR,Z,{locale:0,keyPath:1,fieldConfig:7,currentValue:8,disabled:9},dR)}}function v1(t,e,i){const n=t.slice();return n[5]=e[i],n}function k1(t,e){let i,n,s;return n=new Rp({props:{keyPath:[e[1],e[5].name].join("."),locale:e[0],fieldConfig:e[5]}}),{key:t,first:null,c(){i=K(),T(n.$$.fragment),this.first=i},m(r,l){y(r,i,l),S(n,r,l),s=!0},p(r,l){e=r;const o={};l&6&&(o.keyPath=[e[1],e[5].name].join(".")),l&1&&(o.locale=e[0]),l&4&&(o.fieldConfig=e[5]),n.$set(o)},i(r){s||(m(n.$$.fragment,r),s=!0)},o(r){g(n.$$.fragment,r),s=!1},d(r){r&&w(i),E(n,r)}}}function bR(t){let e,i=[],n=new Map,s,r=ce(t[2]);const l=o=>o[5].name;for(let o=0;o<r.length;o+=1){let a=v1(t,r,o),c=l(a);n.set(c,i[o]=k1(c,a))}return{c(){e=I("section");for(let o=0;o<i.length;o+=1)i[o].c();C(e,"class","subsection")},m(o,a){y(o,e,a);for(let c=0;c<i.length;c+=1)i[c]&&i[c].m(e,null);s=!0},p(o,[a]){a&7&&(r=ce(o[2]),H(),i=ct(i,a,l,1,o,r,n,e,at,k1,null,v1),V())},i(o){if(!s){for(let a=0;a<r.length;a+=1)m(i[a]);s=!0}},o(o){for(let a=0;a<i.length;a+=1)g(i[a]);s=!1},d(o){o&&w(e);for(let a=0;a<i.length;a+=1)i[a].d()}}}function vR(t,e,i){let n,{locale:s}=e,{keyPath:r}=e,{fieldConfig:l}=e,{currentValue:o}=e;return t.$$set=a=>{"locale"in a&&i(0,s=a.locale),"keyPath"in a&&i(1,r=a.keyPath),"fieldConfig"in a&&i(3,l=a.fieldConfig),"currentValue"in a&&i(4,o=a.currentValue)},t.$$.update=()=>{t.$$.dirty&8&&i(2,{fields:n}=l,n)},[s,r,n,l,o]}class kR extends J{constructor(e){super(),X(this,e,vR,bR,Z,{locale:0,keyPath:1,fieldConfig:3,currentValue:4})}}function wR(t){ve(t,"svelte-ego5ba",".multi-selector.svelte-ego5ba.svelte-ego5ba{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.multi-selector.disabled.svelte-ego5ba.svelte-ego5ba{pointer-events:none}.multi-selector.disabled.svelte-ego5ba>.svelte-ego5ba{opacity:0.5}.multi-selector.svelte-ego5ba span.svelte-ego5ba{display:inline-flex;align-items:center;gap:8px;padding:4px 12px;border-radius:var(--sui-control-medium-border-radius);background-color:var(--sui-secondary-background-color)}.multi-selector.svelte-ego5ba span.svelte-ego5ba .icon{font-size:var(--sui-font-size-large)}")}function w1(t,e,i){const n=t.slice();return n[21]=e[i].label,n[22]=e[i].value,n}function y1(t,e,i){const n=t.slice();return n[21]=e[i].label,n[22]=e[i].value,n}function $1(t,e,i){const n=t.slice();n[22]=e[i],n[27]=i;const s=n[2].find(function(...l){return t[15](n[22],...l)});return n[25]=s,n}function yR(t){let e,i,n;function s(l){t[18](l)}let r={disabled:t[1],label:t[2].find(t[17])?.label||void 0,$$slots:{default:[SR]},$$scope:{ctx:t}};return t[0]!==void 0&&(r.value=t[0]),e=new D0({props:r}),ae.push(()=>ze(e,"value",s)),{c(){T(e.$$.fragment)},m(l,o){S(e,l,o),n=!0},p(l,o){const a={};o&2&&(a.disabled=l[1]),o&5&&(a.label=l[2].find(l[17])?.label||void 0),o&1073741829&&(a.$$scope={dirty:o,ctx:l}),!i&&o&1&&(i=!0,a.value=l[0],He(()=>i=!1)),e.$set(a)},i(l){n||(m(e.$$.fragment,l),n=!0)},o(l){g(e.$$.fragment,l),n=!1},d(l){E(e,l)}}}function $R(t){let e,i,n,s=ce(t[0]),r=[];for(let a=0;a<s.length;a+=1)r[a]=T1($1(t,s,a));const l=a=>g(r[a],1,1,()=>{r[a]=null});let o=(typeof t[3]!="number"||t[0].length<t[3])&&t[0].length<t[2].length&&O1(t);return{c(){e=I("div");for(let a=0;a<r.length;a+=1)r[a].c();i=D(),o&&o.c(),C(e,"class","multi-selector svelte-ego5ba"),de(e,"disabled",t[1])},m(a,c){y(a,e,c);for(let u=0;u<r.length;u+=1)r[u]&&r[u].m(e,null);O(e,i),o&&o.m(e,null),n=!0},p(a,c){if(c&327){s=ce(a[0]);let u;for(u=0;u<s.length;u+=1){const f=$1(a,s,u);r[u]?(r[u].p(f,c),m(r[u],1)):(r[u]=T1(f),r[u].c(),m(r[u],1),r[u].m(e,i))}for(H(),u=s.length;u<r.length;u+=1)l(u);V()}(typeof a[3]!="number"||a[0].length<a[3])&&a[0].length<a[2].length?o?(o.p(a,c),c&13&&m(o,1)):(o=O1(a),o.c(),m(o,1),o.m(e,null)):o&&(H(),g(o,1,1,()=>{o=null}),V()),(!n||c&2)&&de(e,"disabled",a[1])},i(a){if(!n){for(let c=0;c<s.length;c+=1)m(r[c]);m(o),n=!0}},o(a){r=r.filter(Boolean);for(let c=0;c<r.length;c+=1)g(r[c]);g(o),n=!1},d(a){a&&w(e),mi(r,a),o&&o.d()}}}function S1(t,e){let i,n,s;return n=new ni({props:{label:e[21],value:e[22],selected:e[22]===e[0]}}),{key:t,first:null,c(){i=K(),T(n.$$.fragment),this.first=i},m(r,l){y(r,i,l),S(n,r,l),s=!0},p(r,l){e=r;const o={};l&4&&(o.label=e[21]),l&4&&(o.value=e[22]),l&5&&(o.selected=e[22]===e[0]),n.$set(o)},i(r){s||(m(n.$$.fragment,r),s=!0)},o(r){g(n.$$.fragment,r),s=!1},d(r){r&&w(i),E(n,r)}}}function SR(t){let e=[],i=new Map,n,s,r=ce(t[2]);const l=o=>o[22];for(let o=0;o<r.length;o+=1){let a=w1(t,r,o),c=l(a);i.set(c,e[o]=S1(c,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();n=K()},m(o,a){for(let c=0;c<e.length;c+=1)e[c]&&e[c].m(o,a);y(o,n,a),s=!0},p(o,a){a&5&&(r=ce(o[2]),H(),e=ct(e,a,l,1,o,r,i,n.parentNode,at,S1,n,w1),V())},i(o){if(!s){for(let a=0;a<r.length;a+=1)m(e[a]);s=!0}},o(o){for(let a=0;a<e.length;a+=1)g(e[a]);s=!1},d(o){o&&w(n);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function E1(t){let e,i=t[25].label+"",n,s,r,l;function o(){return t[14](t[27])}return r=new De({props:{disabled:t[1],$$slots:{"start-icon":[ER]},$$scope:{ctx:t}}}),r.$on("click",o),{c(){e=I("span"),n=q(i),s=D(),T(r.$$.fragment),C(e,"class","svelte-ego5ba")},m(a,c){y(a,e,c),O(e,n),O(e,s),S(r,e,null),l=!0},p(a,c){t=a,(!l||c&5)&&i!==(i=t[25].label+"")&&W(n,i);const u={};c&2&&(u.disabled=t[1]),c&1073741888&&(u.$$scope={dirty:c,ctx:t}),r.$set(u)},i(a){l||(m(r.$$.fragment,a),l=!0)},o(a){g(r.$$.fragment,a),l=!1},d(a){a&&w(e),E(r)}}}function ER(t){let e,i;return e=new we({props:{slot:"start-icon",name:"close",label:t[6]("delete")}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&64&&(r.label=n[6]("delete")),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function T1(t){let e,i,n=t[25]&&E1(t);return{c(){n&&n.c(),e=K()},m(s,r){n&&n.m(s,r),y(s,e,r),i=!0},p(s,r){s[25]?n?(n.p(s,r),r&5&&m(n,1)):(n=E1(s),n.c(),m(n,1),n.m(e.parentNode,e)):n&&(H(),g(n,1,1,()=>{n=null}),V())},i(s){i||(m(n),i=!0)},o(s){g(n),i=!1},d(s){s&&w(e),n&&n.d(s)}}}function O1(t){let e,i;return e=new C0({props:{disabled:t[1],$$slots:{default:[TR]},$$scope:{ctx:t}}}),e.$on("change",t[16]),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&2&&(r.disabled=n[1]),s&1073741829&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function A1(t){let e,i;return e=new ni({props:{label:t[21],value:t[22]}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&4&&(r.label=n[21]),s&4&&(r.value=n[22]),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function L1(t,e){let i,n=!e[0].includes(e[22]),s,r,l=n&&A1(e);return{key:t,first:null,c(){i=K(),l&&l.c(),s=K(),this.first=i},m(o,a){y(o,i,a),l&&l.m(o,a),y(o,s,a),r=!0},p(o,a){e=o,a&5&&(n=!e[0].includes(e[22])),n?l?(l.p(e,a),a&5&&m(l,1)):(l=A1(e),l.c(),m(l,1),l.m(s.parentNode,s)):l&&(H(),g(l,1,1,()=>{l=null}),V())},i(o){r||(m(l),r=!0)},o(o){g(l),r=!1},d(o){o&&(w(i),w(s)),l&&l.d(o)}}}function TR(t){let e=[],i=new Map,n,s,r=ce(t[2]);const l=o=>o[22];for(let o=0;o<r.length;o+=1){let a=y1(t,r,o),c=l(a);i.set(c,e[o]=L1(c,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();n=K()},m(o,a){for(let c=0;c<e.length;c+=1)e[c]&&e[c].m(o,a);y(o,n,a),s=!0},p(o,a){a&5&&(r=ce(o[2]),H(),e=ct(e,a,l,1,o,r,i,n.parentNode,at,L1,n,y1),V())},i(o){if(!s){for(let a=0;a<r.length;a+=1)m(e[a]);s=!0}},o(o){for(let a=0;a<e.length;a+=1)g(e[a]);s=!1},d(o){o&&w(n);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function OR(t){let e,i,n,s;const r=[$R,yR],l=[];function o(a,c){return a[4]?0:1}return e=o(t),i=l[e]=r[e](t),{c(){i.c(),n=K()},m(a,c){l[e].m(a,c),y(a,n,c),s=!0},p(a,[c]){let u=e;e=o(a),e===u?l[e].p(a,c):(H(),g(l[u],1,1,()=>{l[u]=null}),V(),i=l[e],i?i.p(a,c):(i=l[e]=r[e](a),i.c()),m(i,1),i.m(n.parentNode,n))},i(a){s||(m(i),s=!0)},o(a){g(i),s=!1},d(a){a&&w(n),l[e].d(a)}}}function AR(t,e,i){let n,s,r,l,o,a,c;U(t,Ke,j=>i(5,a=j)),U(t,pe,j=>i(6,c=j));let{locale:u}=e,{keyPath:f}=e,{fieldConfig:d}=e,{currentValue:p}=e,{disabled:h=!1}=e,{sortOptions:_=!1}=e;const b=j=>{Object.keys(a.currentValues).forEach(N=>{n!=="duplicate"&&N!==u||hw(N,f,j)})},k=j=>{b(({valueList:N})=>{N.push(j)})},v=j=>{b(({valueList:N})=>{N.splice(j,1)})},$=j=>{v(j)},L=(j,N)=>N.value===j,A=({detail:{target:j,value:N}})=>{a&&(k(N),window.requestAnimationFrame(()=>{j.value=""}))},P=({value:j})=>j===p;function F(j){p=j,i(0,p)}return t.$$set=j=>{"locale"in j&&i(9,u=j.locale),"keyPath"in j&&i(10,f=j.keyPath),"fieldConfig"in j&&i(11,d=j.fieldConfig),"currentValue"in j&&i(0,p=j.currentValue),"disabled"in j&&i(1,h=j.disabled),"sortOptions"in j&&i(12,_=j.sortOptions)},t.$$.update=()=>{t.$$.dirty&2048&&i(13,{i18n:n,options:s,multiple:r,max:l}=d,s,(i(4,r),i(11,d)),(i(3,l),i(11,d))),t.$$.dirty&12288&&i(2,o=(()=>{const j=s.map(N=>({label:Li(N)?N.label:N,value:Li(N)?N.value:N}));return _&&j.sort((N,M)=>N.label.localeCompare(M.label)),j})())},[p,h,o,l,r,a,c,k,v,u,f,d,_,s,$,L,A,P,F]}class fy extends J{constructor(e){super(),X(this,e,AR,OR,Z,{locale:9,keyPath:10,fieldConfig:11,currentValue:0,disabled:1,sortOptions:12},wR)}}function LR(t){let e,i,n;function s(l){t[9](l)}let r={locale:t[1],keyPath:t[2],fieldConfig:{...t[3],options:t[5]},disabled:t[4],sortOptions:!0};return t[0]!==void 0&&(r.currentValue=t[0]),e=new fy({props:r}),ae.push(()=>ze(e,"currentValue",s)),{c(){T(e.$$.fragment)},m(l,o){S(e,l,o),n=!0},p(l,[o]){const a={};o&2&&(a.locale=l[1]),o&4&&(a.keyPath=l[2]),o&40&&(a.fieldConfig={...l[3],options:l[5]}),o&16&&(a.disabled=l[4]),!i&&o&1&&(i=!0,a.currentValue=l[0],He(()=>i=!1)),e.$set(a)},i(l){n||(m(e.$$.fragment,l),n=!0)},o(l){g(e.$$.fragment,l),n=!1},d(l){E(e,l)}}}function NR(t,e,i){let n,s,r,l,{locale:o}=e,{keyPath:a}=e,{fieldConfig:c}=e,{currentValue:u}=e,{disabled:f=!1}=e;function d(p){u=p,i(0,u)}return t.$$set=p=>{"locale"in p&&i(1,o=p.locale),"keyPath"in p&&i(2,a=p.keyPath),"fieldConfig"in p&&i(3,c=p.fieldConfig),"currentValue"in p&&i(0,u=p.currentValue),"disabled"in p&&i(4,f=p.disabled)},t.$$.update=()=>{t.$$.dirty&8&&i(7,{collection:n,file:s}=c,n,(i(8,s),i(3,c))),t.$$.dirty&384&&i(6,r=s?[xd(n,s)]:$o(n)),t.$$.dirty&74&&i(5,l=Md(o,c,r))},[u,o,a,c,f,l,r,n,s,d]}class PR extends J{constructor(e){super(),X(this,e,NR,LR,Z,{locale:1,keyPath:2,fieldConfig:3,currentValue:0,disabled:4})}}function N1(t){let e,i=t[0].format(t[1])+"",n;return{c(){e=I("p"),n=q(i)},m(s,r){y(s,e,r),O(e,n)},p(s,r){r&3&&i!==(i=s[0].format(s[1])+"")&&W(n,i)},d(s){s&&w(e)}}}function IR(t){let e,i=t[1]?.length&&N1(t);return{c(){i&&i.c(),e=K()},m(n,s){i&&i.m(n,s),y(n,e,s)},p(n,[s]){n[1]?.length?i?i.p(n,s):(i=N1(n),i.c(),i.m(e.parentNode,e)):i&&(i.d(1),i=null)},i:z,o:z,d(n){n&&w(e),i&&i.d(n)}}}function CR(t,e,i){let n,s,r,l,o,a,c,u,{locale:f}=e,{keyPath:d}=e,{fieldConfig:p}=e,{currentValue:h}=e;return t.$$set=_=>{"locale"in _&&i(2,f=_.locale),"keyPath"in _&&i(3,d=_.keyPath),"fieldConfig"in _&&i(4,p=_.fieldConfig),"currentValue"in _&&i(5,h=_.currentValue)},t.$$.update=()=>{t.$$.dirty&16&&i(10,{collection:n,file:s,multiple:r=!1,value_field:l}=p,n,(i(11,s),i(4,p)),(i(8,r),i(4,p)),(i(6,l),i(4,p))),t.$$.dirty&3072&&i(9,o=s?[xd(n,s)]:$o(n)),t.$$.dirty&532&&i(7,a=Md(f,p,o)),t.$$.dirty&480&&i(1,c=(r?h:[h]).filter(_=>_!==void 0).map(_=>{const b=a.find(k=>k.value===_)?.label;return b&&b!==_?["slug","{{slug}}","{{fields.slug}}"].includes(l)?b:`${b} (${_})`:_})),t.$$.dirty&4&&i(0,u=new Intl.ListFormat(f,{style:"narrow",type:"conjunction"}))},[u,c,f,d,p,h,l,a,r,o,n,s]}class DR extends J{constructor(e){super(),X(this,e,CR,IR,Z,{locale:2,keyPath:3,fieldConfig:4,currentValue:5})}}function MR(t){let e,i=t[3](t[0])+"",n;return{c(){e=I("p"),n=q(i)},m(s,r){y(s,e,r),O(e,n)},p(s,r){r&1&&i!==(i=s[3](s[0])+"")&&W(n,i)},d(s){s&&w(e)}}}function jR(t){let e,i=t[1].format(t[0].map(t[3]))+"",n;return{c(){e=I("p"),n=q(i)},m(s,r){y(s,e,r),O(e,n)},p(s,r){r&3&&i!==(i=s[1].format(s[0].map(s[3]))+"")&&W(n,i)},d(s){s&&w(e)}}}function RR(t){let e,i;function n(l,o){if(o&5&&(e=null),e==null&&(e=!!(l[2]&&Array.isArray(l[0])&&l[0].length)),e)return jR;if(l[0]!==void 0)return MR}let s=n(t,-1),r=s&&s(t);return{c(){r&&r.c(),i=K()},m(l,o){r&&r.m(l,o),y(l,i,o)},p(l,[o]){s===(s=n(l,o))&&r?r.p(l,o):(r&&r.d(1),r=s&&s(l),r&&(r.c(),r.m(i.parentNode,i)))},i:z,o:z,d(l){l&&w(i),r&&r.d(l)}}}function FR(t,e,i){let n,s,r,l,{locale:o}=e,{keyPath:a}=e,{fieldConfig:c}=e,{currentValue:u}=e;const f=d=>r&&n.find(p=>p.value===d)?.label||d;return t.$$set=d=>{"locale"in d&&i(4,o=d.locale),"keyPath"in d&&i(5,a=d.keyPath),"fieldConfig"in d&&i(6,c=d.fieldConfig),"currentValue"in d&&i(0,u=d.currentValue)},t.$$.update=()=>{t.$$.dirty&64&&i(7,{options:n,multiple:s}=c,n,(i(2,s),i(6,c))),t.$$.dirty&128&&(r=jv(n)),t.$$.dirty&16&&i(1,l=new Intl.ListFormat(o,{style:"narrow",type:"conjunction"}))},[u,l,s,f,o,a,c,n]}class UR extends J{constructor(e){super(),X(this,e,FR,RR,Z,{locale:4,keyPath:5,fieldConfig:6,currentValue:0})}}function xR(t){let e,i,n;function s(l){t[5](l)}let r={disabled:t[1]};return t[0]!==void 0&&(r.value=t[0]),e=new Hn({props:r}),ae.push(()=>ze(e,"value",s)),{c(){T(e.$$.fragment)},m(l,o){S(e,l,o),n=!0},p(l,[o]){const a={};o&2&&(a.disabled=l[1]),!i&&o&1&&(i=!0,a.value=l[0],He(()=>i=!1)),e.$set(a)},i(l){n||(m(e.$$.fragment,l),n=!0)},o(l){g(e.$$.fragment,l),n=!1},d(l){E(e,l)}}}function zR(t,e,i){let{locale:n}=e,{keyPath:s}=e,{fieldConfig:r}=e,{currentValue:l}=e,{disabled:o=!1}=e;function a(c){l=c,i(0,l)}return t.$$set=c=>{"locale"in c&&i(2,n=c.locale),"keyPath"in c&&i(3,s=c.keyPath),"fieldConfig"in c&&i(4,r=c.fieldConfig),"currentValue"in c&&i(0,l=c.currentValue),"disabled"in c&&i(1,o=c.disabled)},[l,o,n,s,r,a]}class BR extends J{constructor(e){super(),X(this,e,zR,xR,Z,{locale:2,keyPath:3,fieldConfig:4,currentValue:0,disabled:1})}}function HR(t){ve(t,"svelte-162himw",".title.svelte-162himw{font-size:var(--sui-font-size-xxx-large);font-weight:600}")}function P1(t){let e;function i(r,l){return r[2]==="title"?YR:r[1]?qR:VR}let n=i(t),s=n(t);return{c(){s.c(),e=K()},m(r,l){s.m(r,l),y(r,e,l)},p(r,l){n===(n=i(r))&&s?s.p(r,l):(s.d(1),s=n(r),s&&(s.c(),s.m(e.parentNode,e)))},d(r){r&&w(e),s.d(r)}}}function VR(t){let e,i;return{c(){e=I("p"),i=q(t[0])},m(n,s){y(n,e,s),O(e,i)},p(n,s){s&1&&W(i,n[0])},d(n){n&&w(e)}}}function qR(t){let e,i,n;return{c(){e=I("p"),i=I("a"),n=q(t[0]),C(i,"href",t[0])},m(s,r){y(s,e,r),O(e,i),O(i,n)},p(s,r){r&1&&W(n,s[0]),r&1&&C(i,"href",s[0])},d(s){s&&w(e)}}}function YR(t){let e,i;return{c(){e=I("p"),i=q(t[0]),C(e,"class","title svelte-162himw")},m(n,s){y(n,e,s),O(e,i)},p(n,s){s&1&&W(i,n[0])},d(n){n&&w(e)}}}function GR(t){let e=typeof t[0]=="string"&&t[0].trim(),i,n=e&&P1(t);return{c(){n&&n.c(),i=K()},m(s,r){n&&n.m(s,r),y(s,i,r)},p(s,[r]){r&1&&(e=typeof s[0]=="string"&&s[0].trim()),e?n?n.p(s,r):(n=P1(s),n.c(),n.m(i.parentNode,i)):n&&(n.d(1),n=null)},i:z,o:z,d(s){s&&w(i),n&&n.d(s)}}}function WR(t,e,i){let n,s,{locale:r}=e,{keyPath:l}=e,{fieldConfig:o}=e,{currentValue:a}=e;return t.$$set=c=>{"locale"in c&&i(3,r=c.locale),"keyPath"in c&&i(4,l=c.keyPath),"fieldConfig"in c&&i(5,o=c.fieldConfig),"currentValue"in c&&i(0,a=c.currentValue)},t.$$.update=()=>{t.$$.dirty&32&&i(2,{name:n}=o,n),t.$$.dirty&1&&i(1,s=(()=>{try{return new URL(a),!0}catch{return!1}})())},[a,s,n,r,l,o]}class KR extends J{constructor(e){super(),X(this,e,WR,GR,Z,{locale:3,keyPath:4,fieldConfig:5,currentValue:0},HR)}}function ZR(t){let e,i,n;function s(l){t[5](l)}let r={autoResize:!0,disabled:t[1]};return t[0]!==void 0&&(r.value=t[0]),e=new _d({props:r}),ae.push(()=>ze(e,"value",s)),{c(){T(e.$$.fragment)},m(l,o){S(e,l,o),n=!0},p(l,[o]){const a={};o&2&&(a.disabled=l[1]),!i&&o&1&&(i=!0,a.value=l[0],He(()=>i=!1)),e.$set(a)},i(l){n||(m(e.$$.fragment,l),n=!0)},o(l){g(e.$$.fragment,l),n=!1},d(l){E(e,l)}}}function XR(t,e,i){let{locale:n}=e,{keyPath:s}=e,{fieldConfig:r}=e,{currentValue:l}=e,{disabled:o=!1}=e;function a(c){l=c,i(0,l)}return t.$$set=c=>{"locale"in c&&i(2,n=c.locale),"keyPath"in c&&i(3,s=c.keyPath),"fieldConfig"in c&&i(4,r=c.fieldConfig),"currentValue"in c&&i(0,l=c.currentValue),"disabled"in c&&i(1,o=c.disabled)},[l,o,n,s,r,a]}class JR extends J{constructor(e){super(),X(this,e,XR,ZR,Z,{locale:2,keyPath:3,fieldConfig:4,currentValue:0,disabled:1})}}function QR(t){ve(t,"svelte-tzbr78","p.svelte-tzbr78{white-space:pre-wrap}")}function I1(t){let e,i;return{c(){e=I("p"),i=q(t[0]),C(e,"class","svelte-tzbr78")},m(n,s){y(n,e,s),O(e,i)},p(n,s){s&1&&W(i,n[0])},d(n){n&&w(e)}}}function e7(t){let e=typeof t[0]=="string"&&t[0].trim(),i,n=e&&I1(t);return{c(){n&&n.c(),i=K()},m(s,r){n&&n.m(s,r),y(s,i,r)},p(s,[r]){r&1&&(e=typeof s[0]=="string"&&s[0].trim()),e?n?n.p(s,r):(n=I1(s),n.c(),n.m(i.parentNode,i)):n&&(n.d(1),n=null)},i:z,o:z,d(s){s&&w(i),n&&n.d(s)}}}function t7(t,e,i){let{locale:n}=e,{keyPath:s}=e,{fieldConfig:r}=e,{currentValue:l}=e;return t.$$set=o=>{"locale"in o&&i(1,n=o.locale),"keyPath"in o&&i(2,s=o.keyPath),"fieldConfig"in o&&i(3,r=o.fieldConfig),"currentValue"in o&&i(0,l=o.currentValue)},[l,n,s,r]}class n7 extends J{constructor(e){super(),X(this,e,t7,e7,Z,{locale:1,keyPath:2,fieldConfig:3,currentValue:0},QR)}}const uo={boolean:E8,color:M8,date:d_,datetime:d_,file:J_,image:J_,list:zj,markdown:Jj,number:rR,object:_R,relation:PR,select:fy,string:BR,text:JR},rc={boolean:A8,color:U8,date:m_,datetime:m_,file:Q_,image:Q_,list:Kj,markdown:nR,number:fR,object:kR,relation:DR,select:UR,string:KR,text:n7};function i7(t){ve(t,"svelte-yh1mmk",'section.svelte-yh1mmk.svelte-yh1mmk.svelte-yh1mmk{padding:16px}section[data-widget=object].svelte-yh1mmk>header.svelte-yh1mmk+div.svelte-yh1mmk{border-width:2px;border-color:var(--sui-secondary-border-color);border-radius:var(--sui-control-medium-border-radius)}section.svelte-yh1mmk.svelte-yh1mmk.svelte-yh1mmk:not(:last-child){border-width:0 0 1px;border-color:var(--sui-secondary-border-color)}section.svelte-yh1mmk>.svelte-yh1mmk.svelte-yh1mmk{margin-right:auto;margin-left:auto;max-width:768px}header.svelte-yh1mmk.svelte-yh1mmk.svelte-yh1mmk{display:flex;align-items:center;gap:8px;margin-bottom:8px}header.svelte-yh1mmk h4.svelte-yh1mmk.svelte-yh1mmk{font-size:var(--sui-font-size-small);font-weight:600;color:var(--sui-secondary-foreground-color)}header.svelte-yh1mmk .required.svelte-yh1mmk.svelte-yh1mmk{border:1px solid var(--sui-control-border-color);border-radius:4px;padding:2px 4px;color:var(--sui-info-foreground-color);font-size:var(--sui-font-size-x-small)}header.svelte-yh1mmk+div.svelte-yh1mmk input[type="color"],header.svelte-yh1mmk+div.svelte-yh1mmk input[type="date"],header.svelte-yh1mmk+div.svelte-yh1mmk input[type="datetime-local"],header.svelte-yh1mmk+div.svelte-yh1mmk input[type="time"],header.svelte-yh1mmk+div.svelte-yh1mmk input[type="number"]{outline:0;border:0;color:inherit}header.svelte-yh1mmk+div.svelte-yh1mmk input[type="text"],header.svelte-yh1mmk+div.svelte-yh1mmk textarea{width:100%}header.svelte-yh1mmk+div.svelte-yh1mmk input[type="color"],header.svelte-yh1mmk+div.svelte-yh1mmk input[type="number"]{background-color:var(--sui-textbox-background-color);border-width:1px;border-color:var(--sui-primary-border-color);border-radius:var(--sui-control-medium-border-radius)}header.svelte-yh1mmk+div.svelte-yh1mmk input[type="file"],header.svelte-yh1mmk+div.svelte-yh1mmk input[type="checkbox"],header.svelte-yh1mmk+div.svelte-yh1mmk>div{color:inherit}header.svelte-yh1mmk+div.svelte-yh1mmk input[type="date"],header.svelte-yh1mmk+div.svelte-yh1mmk input[type="datetime-local"],header.svelte-yh1mmk+div.svelte-yh1mmk input[type="time"]{width:auto;text-transform:uppercase;background-color:transparent}:root[data-theme="dark"] header+div.svelte-yh1mmk input[type="date"]::-webkit-calendar-picker-indicator,:root[data-theme="dark"] header+div.svelte-yh1mmk input[type="datetime-local"]::-webkit-calendar-picker-indicator,:root[data-theme="dark"] header+div.svelte-yh1mmk input[type="time"]::-webkit-calendar-picker-indicator{filter:invert(1)}header.svelte-yh1mmk+div.svelte-yh1mmk span{display:block}.validation.svelte-yh1mmk.svelte-yh1mmk.svelte-yh1mmk{color:var(--sui-error-foreground-color)}.validation.svelte-yh1mmk div.svelte-yh1mmk.svelte-yh1mmk{display:flex;gap:4px;margin:8px 0}.validation.svelte-yh1mmk div.svelte-yh1mmk .icon{flex:none;font-size:20px}.hint.svelte-yh1mmk.svelte-yh1mmk.svelte-yh1mmk{margin-top:8px;font-size:var(--sui-font-size-small);opacity:0.75}.hint.svelte-yh1mmk p{margin:0}')}function Xu(t){const e=t.slice(),i=e[12]&&e[13].length;e[28]=i;const n=!(e[11]&&e[0]!==e[4]);return e[29]=n,e}function C1(t){let e,i,n,s=(t[17]||t[18])+"",r,l,o,a,c,u,f,d,p,h,_,b,k=t[15]&&D1(t);a=new gn({props:{flex:!0}});let v=(t[28]||t[29])&&M1(t),$=t[7]?.valid===!1&&z1(t);const L=[c7,a7,o7],A=[];function P(j,N){return j[5]in uo?j[3]?1:2:0}p=P(t),h=A[p]=L[p](t);let F=t[16]&&Y1(t);return{c(){e=I("section"),i=I("header"),n=I("h4"),r=q(s),l=D(),k&&k.c(),o=D(),T(a.$$.fragment),c=D(),v&&v.c(),u=D(),$&&$.c(),f=D(),d=I("div"),h.c(),_=D(),F&&F.c(),C(n,"class","svelte-yh1mmk"),C(i,"class","svelte-yh1mmk"),C(d,"class","svelte-yh1mmk"),C(e,"data-widget",t[5]),C(e,"data-key-path",t[1]),C(e,"class","svelte-yh1mmk")},m(j,N){y(j,e,N),O(e,i),O(i,n),O(n,r),O(i,l),k&&k.m(i,null),O(i,o),S(a,i,null),O(i,c),v&&v.m(i,null),O(e,u),$&&$.m(e,null),O(e,f),O(e,d),A[p].m(d,null),O(e,_),F&&F.m(e,null),b=!0},p(j,N){(!b||N&393216)&&s!==(s=(j[17]||j[18])+"")&&W(r,s),j[15]?k?k.p(j,N):(k=D1(j),k.c(),k.m(i,o)):k&&(k.d(1),k=null),j[28]||j[29]?v?(v.p(j,N),N&14353&&m(v,1)):(v=M1(j),v.c(),m(v,1),v.m(i,null)):v&&(H(),g(v,1,1,()=>{v=null}),V()),j[7]?.valid===!1?$?($.p(j,N),N&128&&m($,1)):($=z1(j),$.c(),m($,1),$.m(e,f)):$&&(H(),g($,1,1,()=>{$=null}),V());let M=p;p=P(j),p===M?A[p].p(j,N):(H(),g(A[M],1,1,()=>{A[M]=null}),V(),h=A[p],h?h.p(j,N):(h=A[p]=L[p](j),h.c()),m(h,1),h.m(d,null)),j[16]?F?F.p(j,N):(F=Y1(j),F.c(),F.m(e,null)):F&&(F.d(1),F=null),(!b||N&32)&&C(e,"data-widget",j[5]),(!b||N&2)&&C(e,"data-key-path",j[1])},i(j){b||(m(a.$$.fragment,j),m(v),m($),m(h),b=!0)},o(j){g(a.$$.fragment,j),g(v),g($),g(h),b=!1},d(j){j&&w(e),k&&k.d(),E(a),v&&v.d(),$&&$.d(),A[p].d(),F&&F.d()}}}function D1(t){let e,i=t[19]("required")+"",n;return{c(){e=I("div"),n=q(i),C(e,"class","required svelte-yh1mmk")},m(s,r){y(s,e,r),O(e,n)},p(s,r){r&524288&&i!==(i=s[19]("required")+"")&&W(n,i)},d(s){s&&w(e)}}}function M1(t){let e,i;return e=new as({props:{class:"ghost iconic small",popupPosition:"bottom-right",$$slots:{popup:[l7],"start-icon":[s7]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&1074281267&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function s7(t){let e,i;return e=new we({props:{slot:"start-icon",name:"more_vert",label:t[19]("show_menu")}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&524288&&(r.label=n[19]("show_menu")),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function j1(t){let e=["markdown","string","text","list","object"].includes(t[5]),i,n,s,r=e&&R1(t);return n=new Ja({props:{keyPath:t[1],locale:t[0]}}),{c(){r&&r.c(),i=D(),T(n.$$.fragment)},m(l,o){r&&r.m(l,o),y(l,i,o),S(n,l,o),s=!0},p(l,o){o&32&&(e=["markdown","string","text","list","object"].includes(l[5])),e?r?(r.p(l,o),o&32&&m(r,1)):(r=R1(l),r.c(),m(r,1),r.m(i.parentNode,i)):r&&(H(),g(r,1,1,()=>{r=null}),V());const a={};o&2&&(a.keyPath=l[1]),o&1&&(a.locale=l[0]),n.$set(a)},i(l){s||(m(r),m(n.$$.fragment,l),s=!0)},o(l){g(r),g(n.$$.fragment,l),s=!1},d(l){l&&w(i),r&&r.d(l),E(n,l)}}}function R1(t){let e,i,n,s;e=new Ja({props:{keyPath:t[1],locale:t[0],translate:!0}});let r=t[13].length>1&&F1();return{c(){T(e.$$.fragment),i=D(),r&&r.c(),n=K()},m(l,o){S(e,l,o),y(l,i,o),r&&r.m(l,o),y(l,n,o),s=!0},p(l,o){const a={};o&2&&(a.keyPath=l[1]),o&1&&(a.locale=l[0]),e.$set(a),l[13].length>1?r?o&8192&&m(r,1):(r=F1(),r.c(),m(r,1),r.m(n.parentNode,n)):r&&(H(),g(r,1,1,()=>{r=null}),V())},i(l){s||(m(e.$$.fragment,l),m(r),s=!0)},o(l){g(e.$$.fragment,l),g(r),s=!1},d(l){l&&(w(i),w(n)),E(e,l),r&&r.d(l)}}}function F1(t){let e,i;return e=new Tn({}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function U1(t){let e,i;return e=new Tn({}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function x1(t){let e,i;return e=new Ct({props:{label:t[19]("revert_changes"),disabled:Un(t[9],t[8])}}),e.$on("click",t[26]),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&524288&&(r.label=n[19]("revert_changes")),s&768&&(r.disabled=Un(n[9],n[8])),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function r7(t){let e,i,n,s,r=t[28]&&j1(t),l=t[28]&&t[29]&&U1(),o=t[29]&&x1(t);return{c(){r&&r.c(),e=D(),l&&l.c(),i=D(),o&&o.c(),n=K()},m(a,c){r&&r.m(a,c),y(a,e,c),l&&l.m(a,c),y(a,i,c),o&&o.m(a,c),y(a,n,c),s=!0},p(a,c){a[28]?r?(r.p(a,c),c&12288&&m(r,1)):(r=j1(a),r.c(),m(r,1),r.m(e.parentNode,e)):r&&(H(),g(r,1,1,()=>{r=null}),V()),a[28]&&a[29]?l?c&14353&&m(l,1):(l=U1(),l.c(),m(l,1),l.m(i.parentNode,i)):l&&(H(),g(l,1,1,()=>{l=null}),V()),a[29]?o?(o.p(a,c),c&2065&&m(o,1)):(o=x1(a),o.c(),m(o,1),o.m(n.parentNode,n)):o&&(H(),g(o,1,1,()=>{o=null}),V())},i(a){s||(m(r),m(l),m(o),s=!0)},o(a){g(r),g(l),g(o),s=!1},d(a){a&&(w(e),w(i),w(n)),r&&r.d(a),l&&l.d(a),o&&o.d(a)}}}function l7(t){let e,i;return e=new Ci({props:{slot:"popup",$$slots:{default:[r7]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&1074281267&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function z1(t){let e,i,n,s,r,l=t[7].valueMissing&&B1(t),o=t[7].rangeUnderflow&&H1(t),a=t[7].rangeOverflow&&V1(t),c=t[7].patternMismatch&&q1(t);return{c(){e=I("div"),l&&l.c(),i=D(),o&&o.c(),n=D(),a&&a.c(),s=D(),c&&c.c(),C(e,"class","validation svelte-yh1mmk")},m(u,f){y(u,e,f),l&&l.m(e,null),O(e,i),o&&o.m(e,null),O(e,n),a&&a.m(e,null),O(e,s),c&&c.m(e,null),r=!0},p(u,f){u[7].valueMissing?l?(l.p(u,f),f&128&&m(l,1)):(l=B1(u),l.c(),m(l,1),l.m(e,i)):l&&(H(),g(l,1,1,()=>{l=null}),V()),u[7].rangeUnderflow?o?(o.p(u,f),f&128&&m(o,1)):(o=H1(u),o.c(),m(o,1),o.m(e,n)):o&&(H(),g(o,1,1,()=>{o=null}),V()),u[7].rangeOverflow?a?(a.p(u,f),f&128&&m(a,1)):(a=V1(u),a.c(),m(a,1),a.m(e,s)):a&&(H(),g(a,1,1,()=>{a=null}),V()),u[7].patternMismatch?c?(c.p(u,f),f&128&&m(c,1)):(c=q1(u),c.c(),m(c,1),c.m(e,null)):c&&(H(),g(c,1,1,()=>{c=null}),V())},i(u){r||(m(l),m(o),m(a),m(c),r=!0)},o(u){g(l),g(o),g(a),g(c),r=!1},d(u){u&&w(e),l&&l.d(),o&&o.d(),a&&a.d(),c&&c.d()}}}function B1(t){let e,i,n,s=t[19]("validation.value_missing")+"",r,l;return i=new we({props:{name:"error",label:t[19]("error")}}),{c(){e=I("div"),T(i.$$.fragment),n=D(),r=q(s),C(e,"class","svelte-yh1mmk")},m(o,a){y(o,e,a),S(i,e,null),O(e,n),O(e,r),l=!0},p(o,a){const c={};a&524288&&(c.label=o[19]("error")),i.$set(c),(!l||a&524288)&&s!==(s=o[19]("validation.value_missing")+"")&&W(r,s)},i(o){l||(m(i.$$.fragment,o),l=!0)},o(o){g(i.$$.fragment,o),l=!1},d(o){o&&w(e),E(i)}}}function H1(t){let e,i,n,s=t[19]("validation.range_underflow",{values:{min:t[2].min}})+"",r,l;return i=new we({props:{name:"error",label:t[19]("error")}}),{c(){e=I("div"),T(i.$$.fragment),n=D(),r=q(s),C(e,"class","svelte-yh1mmk")},m(o,a){y(o,e,a),S(i,e,null),O(e,n),O(e,r),l=!0},p(o,a){const c={};a&524288&&(c.label=o[19]("error")),i.$set(c),(!l||a&524292)&&s!==(s=o[19]("validation.range_underflow",{values:{min:o[2].min}})+"")&&W(r,s)},i(o){l||(m(i.$$.fragment,o),l=!0)},o(o){g(i.$$.fragment,o),l=!1},d(o){o&&w(e),E(i)}}}function V1(t){let e,i,n,s=t[19]("validation.range_overflow",{values:{max:t[2].max}})+"",r,l;return i=new we({props:{name:"error",label:t[19]("error")}}),{c(){e=I("div"),T(i.$$.fragment),n=D(),r=q(s),C(e,"class","svelte-yh1mmk")},m(o,a){y(o,e,a),S(i,e,null),O(e,n),O(e,r),l=!0},p(o,a){const c={};a&524288&&(c.label=o[19]("error")),i.$set(c),(!l||a&524292)&&s!==(s=o[19]("validation.range_overflow",{values:{max:o[2].max}})+"")&&W(r,s)},i(o){l||(m(i.$$.fragment,o),l=!0)},o(o){g(i.$$.fragment,o),l=!1},d(o){o&&w(e),E(i)}}}function q1(t){let e,i,n,s=(t[14]?.[1]??"")+"",r,l;return i=new we({props:{name:"error",label:t[19]("error")}}),{c(){e=I("div"),T(i.$$.fragment),n=D(),r=q(s),C(e,"class","svelte-yh1mmk")},m(o,a){y(o,e,a),S(i,e,null),O(e,n),O(e,r),l=!0},p(o,a){const c={};a&524288&&(c.label=o[19]("error")),i.$set(c),(!l||a&16384)&&s!==(s=(o[14]?.[1]??"")+"")&&W(r,s)},i(o){l||(m(i.$$.fragment,o),l=!0)},o(o){g(i.$$.fragment,o),l=!1},d(o){o&&w(e),E(i)}}}function o7(t){let e,i,n,s;function r(a){t[27](a)}var l=uo[t[5]];function o(a,c){let u={keyPath:a[1],locale:a[0],fieldConfig:a[2],disabled:a[10]};return a[6].currentValues[a[0]][a[1]]!==void 0&&(u.currentValue=a[6].currentValues[a[0]][a[1]]),{props:u}}return l&&(e=Zt(l,o(t)),ae.push(()=>ze(e,"currentValue",r))),{c(){e&&T(e.$$.fragment),n=K()},m(a,c){e&&S(e,a,c),y(a,n,c),s=!0},p(a,c){if(c&32&&l!==(l=uo[a[5]])){if(e){H();const u=e;g(u.$$.fragment,1,0,()=>{E(u,1)}),V()}l?(e=Zt(l,o(a)),ae.push(()=>ze(e,"currentValue",r)),T(e.$$.fragment),m(e.$$.fragment,1),S(e,n.parentNode,n)):e=null}else if(l){const u={};c&2&&(u.keyPath=a[1]),c&1&&(u.locale=a[0]),c&4&&(u.fieldConfig=a[2]),c&1024&&(u.disabled=a[10]),!i&&c&67&&(i=!0,u.currentValue=a[6].currentValues[a[0]][a[1]],He(()=>i=!1)),e.$set(u)}},i(a){s||(e&&m(e.$$.fragment,a),s=!0)},o(a){e&&g(e.$$.fragment,a),s=!1},d(a){a&&w(n),e&&E(e,a)}}}function a7(t){let e,i,n;var s=uo[t[5]];function r(l,o){return{props:{keyPath:l[1],locale:l[0],fieldConfig:l[2],currentValue:l[9],disabled:l[10]}}}return s&&(e=Zt(s,r(t))),{c(){e&&T(e.$$.fragment),i=K()},m(l,o){e&&S(e,l,o),y(l,i,o),n=!0},p(l,o){if(o&32&&s!==(s=uo[l[5]])){if(e){H();const a=e;g(a.$$.fragment,1,0,()=>{E(a,1)}),V()}s?(e=Zt(s,r(l)),T(e.$$.fragment),m(e.$$.fragment,1),S(e,i.parentNode,i)):e=null}else if(s){const a={};o&2&&(a.keyPath=l[1]),o&1&&(a.locale=l[0]),o&4&&(a.fieldConfig=l[2]),o&512&&(a.currentValue=l[9]),o&1024&&(a.disabled=l[10]),e.$set(a)}},i(l){n||(e&&m(e.$$.fragment,l),n=!0)},o(l){e&&g(e.$$.fragment,l),n=!1},d(l){l&&w(i),e&&E(e,l)}}}function c7(t){let e,i=t[19]("unsupported_widget_x",{values:{name:t[5]}})+"",n;return{c(){e=I("div"),n=q(i)},m(s,r){y(s,e,r),O(e,n)},p(s,r){r&524320&&i!==(i=s[19]("unsupported_widget_x",{values:{name:s[5]}})+"")&&W(n,i)},i:z,o:z,d(s){s&&w(e)}}}function Y1(t){let e,i=tt.parse(t[16])+"";return{c(){e=I("div"),C(e,"class","hint svelte-yh1mmk")},m(n,s){y(n,e,s),e.innerHTML=i},p(n,s){s&65536&&i!==(i=tt.parse(n[16])+"")&&(e.innerHTML=i)},d(n){n&&w(e)}}}function u7(t){let e,i,n=t[5]!=="hidden"&&(t[0]===t[4]||t[12]||t[11])&&C1(Xu(t));return{c(){n&&n.c(),e=K()},m(s,r){n&&n.m(s,r),y(s,e,r),i=!0},p(s,[r]){s[5]!=="hidden"&&(s[0]===s[4]||s[12]||s[11])?n?(n.p(Xu(s),r),r&6193&&m(n,1)):(n=C1(Xu(s)),n.c(),m(n,1),n.m(e.parentNode,e)):n&&(H(),g(n,1,1,()=>{n=null}),V())},i(s){i||(m(n),i=!0)},o(s){g(n),i=!1},d(s){s&&w(e),n&&n.d(s)}}}function f7(t,e,i){let n,s,r,l,o,a,c,u,f,d,p,h,_,b,k,v,$,L,A,P,F,j,N;U(t,Ke,x=>i(6,j=x)),U(t,pe,x=>i(19,N=x));let{locale:M}=e,{keyPath:R}=e,{fieldConfig:G}=e;const Q=()=>{hp(M,R)};function te(x){t.$$.not_equal(j.currentValues[M][R],x)&&(j.currentValues[M][R]=x,Ke.set(j))}return t.$$set=x=>{"locale"in x&&i(0,M=x.locale),"keyPath"in x&&i(1,R=x.keyPath),"fieldConfig"in x&&i(2,G=x.fieldConfig)},t.$$.update=()=>{t.$$.dirty&4&&i(18,{name:n,label:s="",hint:r="",widget:l="string",required:o=!0,i18n:a=!1,pattern:c=[]}=G,n,(i(17,s),i(2,G)),(i(16,r),i(2,G)),(i(5,l),i(2,G)),(i(15,o),i(2,G)),(i(21,a),i(2,G)),(i(14,c),i(2,G))),t.$$.dirty&32&&i(25,u=["relation","select"].includes(l)),t.$$.dirty&33554436&&i(24,f=u?G.multiple:void 0),t.$$.dirty&50331680&&i(3,d=l==="list"||u&&f),t.$$.dirty&64&&i(22,{hasLocales:p=!1,locales:h=["default"],defaultLocale:_="default"}=j.collection._i18n??{},p,(i(23,h),i(6,j)),(i(4,_),i(6,j))),t.$$.dirty&12582913&&i(13,b=p?h.filter(x=>x!==M):[]),t.$$.dirty&6291456&&i(12,k=p&&(a===!0||a==="translate")),t.$$.dirty&6291456&&i(11,v=p&&a==="duplicate"),t.$$.dirty&2097169&&i(10,$=a==="duplicate"&&M!==_),t.$$.dirty&2&&i(20,L=new RegExp(`^${jt(R)}\\.\\d+$`)),t.$$.dirty&1048651&&i(9,A=d?Object.entries(j.currentValues[M]).filter(([x])=>x.match(L)).map(([,x])=>x).filter(x=>x!==void 0):j.currentValues[M][R]),t.$$.dirty&1048651&&i(8,P=d?Object.entries(j.originalValues[M]).filter(([x])=>x.match(L)).map(([,x])=>x).filter(x=>x!==void 0):j.originalValues[M][R]),t.$$.dirty&67&&i(7,F=j.validities[M][R])},[M,R,G,d,_,l,j,F,P,A,$,v,k,b,c,o,r,s,n,N,L,a,p,h,f,u,Q,te]}class Fp extends J{constructor(e){super(),X(this,e,f7,u7,Z,{locale:0,keyPath:1,fieldConfig:2},i7)}}function G1(t,e,i){const n=t.slice();return n[5]=e[i],n}function W1(t,e){let i,n,s;return n=new Fp({props:{keyPath:e[5].name,locale:e[0],fieldConfig:e[5]}}),{key:t,first:null,c(){i=K(),T(n.$$.fragment),this.first=i},m(r,l){y(r,i,l),S(n,r,l),s=!0},p(r,l){e=r;const o={};l&2&&(o.keyPath=e[5].name),l&1&&(o.locale=e[0]),l&2&&(o.fieldConfig=e[5]),n.$set(o)},i(r){s||(m(n.$$.fragment,r),s=!0)},o(r){g(n.$$.fragment,r),s=!1},d(r){r&&w(i),E(n,r)}}}function d7(t){let e,i=[],n=new Map,s,r=ce(t[1]);const l=o=>o[5].name;for(let o=0;o<r.length;o+=1){let a=G1(t,r,o),c=l(a);n.set(c,i[o]=W1(c,a))}return{c(){e=I("div");for(let o=0;o<i.length;o+=1)i[o].c();C(e,"lang",t[0])},m(o,a){y(o,e,a);for(let c=0;c<i.length;c+=1)i[c]&&i[c].m(e,null);s=!0},p(o,[a]){a&3&&(r=ce(o[1]),H(),i=ct(i,a,l,1,o,r,n,e,at,W1,null,G1),V()),(!s||a&1)&&C(e,"lang",o[0])},i(o){if(!s){for(let a=0;a<r.length;a+=1)m(i[a]);s=!0}},o(o){for(let a=0;a<i.length;a+=1)g(i[a]);s=!1},d(o){o&&w(e);for(let a=0;a<i.length;a+=1)i[a].d()}}}function p7(t,e,i){let n,s,r,l;U(t,Ke,a=>i(4,l=a));let{locale:o}=e;return t.$$set=a=>{"locale"in a&&i(0,o=a.locale)},t.$$.update=()=>{t.$$.dirty&16&&i(2,{collection:n,collectionFile:s}=l??{},n,(i(3,s),i(4,l))),t.$$.dirty&12&&i(1,r=s?.fields??n?.fields)},[o,r,n,s,l]}class lc extends J{constructor(e){super(),X(this,e,p7,d7,Z,{locale:0})}}function m7(t){ve(t,"svelte-37f1h5",'.header.svelte-37f1h5{flex:none !important;background-color:var(--sui-tertiary-background-color)}.header.svelte-37f1h5>[role="toolbar"]{margin-right:auto;margin-left:auto;max-width:800px}.header.svelte-37f1h5>[role="toolbar"] h3{font-size:var(--sui-font-size-default)}.header.svelte-37f1h5>[role="toolbar"] button.error{color:var(--sui-error-foreground-color)}')}function K1(t,e,i){const n=t.slice();n[21]=e[i];const s=sr(n[21]);n[22]=s;const r=Object.values(n[9][n[21]]).some(({valid:l})=>!l);return n[23]=r,n}function h7(t){let e,i=(t[5]?.mode==="preview"?t[11]("preview"):t[11]("edit"))+"",n;return{c(){e=I("h3"),n=q(i)},m(s,r){y(s,e,r),O(e,n)},p(s,r){r&2080&&i!==(i=(s[5]?.mode==="preview"?s[11]("preview"):s[11]("edit"))+"")&&W(n,i)},i:z,o:z,d(s){s&&w(e)}}}function g7(t){let e,i;return e=new gd({props:{$$slots:{default:[b7]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&67116840&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function Z1(t){let e,i;function n(){return t[18](t[21])}return e=new Xl({props:{selected:t[5]?.mode==="edit"&&t[5]?.locale===t[21],class:"tertiary small "+(t[23]?"error":""),label:t[22],$$slots:{default:[_7]},$$scope:{ctx:t}}}),e.$on("click",n),{c(){T(e.$$.fragment)},m(s,r){S(e,s,r),i=!0},p(s,r){t=s;const l={};r&40&&(l.selected=t[5]?.mode==="edit"&&t[5]?.locale===t[21]),r&520&&(l.class="tertiary small "+(t[23]?"error":"")),r&8&&(l.label=t[22]),r&67111432&&(l.$$scope={dirty:r,ctx:t}),e.$set(l)},i(s){i||(m(e.$$.fragment,s),i=!0)},o(s){g(e.$$.fragment,s),i=!1},d(s){E(e,s)}}}function X1(t){let e,i;return e=new we({props:{slot:"end-icon",name:"error",label:t[11]("error")}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&2048&&(r.label=n[11]("error")),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function _7(t){let e,i,n=t[23]&&X1(t);return{c(){n&&n.c(),e=K()},m(s,r){n&&n.m(s,r),y(s,e,r),i=!0},p(s,r){s[23]?n?(n.p(s,r),r&520&&m(n,1)):(n=X1(s),n.c(),m(n,1),n.m(e.parentNode,e)):n&&(H(),g(n,1,1,()=>{n=null}),V())},i(s){i||(m(n),i=!0)},o(s){g(n),i=!1},d(s){s&&w(e),n&&n.d(s)}}}function J1(t){let e,i,n=!(t[10]?.mode==="edit"&&t[10]?.locale===t[21])&&Z1(t);return{c(){n&&n.c(),e=K()},m(s,r){n&&n.m(s,r),y(s,e,r),i=!0},p(s,r){s[10]?.mode==="edit"&&s[10]?.locale===s[21]?n&&(H(),g(n,1,1,()=>{n=null}),V()):n?(n.p(s,r),r&1032&&m(n,1)):(n=Z1(s),n.c(),m(n,1),n.m(e.parentNode,e))},i(s){i||(m(n),i=!0)},o(s){g(n),i=!1},d(s){s&&w(e),n&&n.d(s)}}}function Q1(t){let e,i;return e=new Xl({props:{selected:t[5]?.mode==="preview",class:"tertiary small",label:t[11]("preview")}}),e.$on("click",t[19]),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&32&&(r.selected=n[5]?.mode==="preview"),s&2048&&(r.label=n[11]("preview")),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function b7(t){let e,i,n,s=ce(t[3]),r=[];for(let a=0;a<s.length;a+=1)r[a]=J1(K1(t,s,a));const l=a=>g(r[a],1,1,()=>{r[a]=null});let o=t[10]?.mode==="edit"&&t[8]&&t[12].showPreview&&Q1(t);return{c(){for(let a=0;a<r.length;a+=1)r[a].c();e=D(),o&&o.c(),i=K()},m(a,c){for(let u=0;u<r.length;u+=1)r[u]&&r[u].m(a,c);y(a,e,c),o&&o.m(a,c),y(a,i,c),n=!0},p(a,c){if(c&3624){s=ce(a[3]);let u;for(u=0;u<s.length;u+=1){const f=K1(a,s,u);r[u]?(r[u].p(f,c),m(r[u],1)):(r[u]=J1(f),r[u].c(),m(r[u],1),r[u].m(e.parentNode,e))}for(H(),u=s.length;u<r.length;u+=1)l(u);V()}a[10]?.mode==="edit"&&a[8]&&a[12].showPreview?o?(o.p(a,c),c&5376&&m(o,1)):(o=Q1(a),o.c(),m(o,1),o.m(i.parentNode,i)):o&&(H(),g(o,1,1,()=>{o=null}),V())},i(a){if(!n){for(let c=0;c<s.length;c+=1)m(r[c]);m(o),n=!0}},o(a){r=r.filter(Boolean);for(let c=0;c<r.length;c+=1)g(r[c]);g(o),n=!1},d(a){a&&(w(e),w(i)),mi(r,a),o&&o.d(a)}}}function eb(t){let e,i;return e=new as({props:{class:"ghost iconic",popupPosition:"bottom-right",$$slots:{popup:[w7],"start-icon":[v7]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&67111140&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function v7(t){let e,i;return e=new we({props:{slot:"start-icon",name:"more_vert",label:t[11]("show_menu")}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&2048&&(r.label=n[11]("show_menu")),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function tb(t){let e,i,n,s,r,l,o;e=new Ja({props:{locale:t[5]?.locale,translate:!0}});let a=t[2].length>1&&nb();return s=new Ja({props:{locale:t[5]?.locale}}),l=new Tn({}),{c(){T(e.$$.fragment),i=D(),a&&a.c(),n=D(),T(s.$$.fragment),r=D(),T(l.$$.fragment)},m(c,u){S(e,c,u),y(c,i,u),a&&a.m(c,u),y(c,n,u),S(s,c,u),y(c,r,u),S(l,c,u),o=!0},p(c,u){const f={};u&32&&(f.locale=c[5]?.locale),e.$set(f),c[2].length>1?a?u&4&&m(a,1):(a=nb(),a.c(),m(a,1),a.m(n.parentNode,n)):a&&(H(),g(a,1,1,()=>{a=null}),V());const d={};u&32&&(d.locale=c[5]?.locale),s.$set(d)},i(c){o||(m(e.$$.fragment,c),m(a),m(s.$$.fragment,c),m(l.$$.fragment,c),o=!0)},o(c){g(e.$$.fragment,c),g(a),g(s.$$.fragment,c),g(l.$$.fragment,c),o=!1},d(c){c&&(w(i),w(n),w(r)),E(e,c),a&&a.d(c),E(s,c),E(l,c)}}}function nb(t){let e,i;return e=new Tn({}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function k7(t){let e,i,n,s=t[7]&&tb(t);return i=new Ct({props:{label:t[11]("revert_changes"),disabled:!t[6]}}),i.$on("click",t[20]),{c(){s&&s.c(),e=D(),T(i.$$.fragment)},m(r,l){s&&s.m(r,l),y(r,e,l),S(i,r,l),n=!0},p(r,l){r[7]?s?(s.p(r,l),l&128&&m(s,1)):(s=tb(r),s.c(),m(s,1),s.m(e.parentNode,e)):s&&(H(),g(s,1,1,()=>{s=null}),V());const o={};l&2048&&(o.label=r[11]("revert_changes")),l&64&&(o.disabled=!r[6]),i.$set(o)},i(r){n||(m(s),m(i.$$.fragment,r),n=!0)},o(r){g(s),g(i.$$.fragment,r),n=!1},d(r){r&&w(e),s&&s.d(r),E(i,r)}}}function w7(t){let e,i;return e=new Ci({props:{slot:"popup",$$slots:{default:[k7]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&67111140&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function y7(t){let e,i,n,s,r,l,o;const a=[g7,h7],c=[];function u(d,p){return d[4]?0:1}e=u(t),i=c[e]=a[e](t),s=new gn({props:{flex:!0}});let f=t[5]?.mode==="edit"&&eb(t);return{c(){i.c(),n=D(),T(s.$$.fragment),r=D(),f&&f.c(),l=K()},m(d,p){c[e].m(d,p),y(d,n,p),S(s,d,p),y(d,r,p),f&&f.m(d,p),y(d,l,p),o=!0},p(d,p){let h=e;e=u(d),e===h?c[e].p(d,p):(H(),g(c[h],1,1,()=>{c[h]=null}),V(),i=c[e],i?i.p(d,p):(i=c[e]=a[e](d),i.c()),m(i,1),i.m(n.parentNode,n)),d[5]?.mode==="edit"?f?(f.p(d,p),p&32&&m(f,1)):(f=eb(d),f.c(),m(f,1),f.m(l.parentNode,l)):f&&(H(),g(f,1,1,()=>{f=null}),V())},i(d){o||(m(i),m(s.$$.fragment,d),m(f),o=!0)},o(d){g(i),g(s.$$.fragment,d),g(f),o=!1},d(d){d&&(w(n),w(r),w(l)),c[e].d(d),E(s,d),f&&f.d(d)}}}function $7(t){let e,i,n;return i=new cs({props:{class:"secondary",$$slots:{default:[y7]},$$scope:{ctx:t}}}),{c(){e=I("div"),T(i.$$.fragment),C(e,"class","header svelte-37f1h5")},m(s,r){y(s,e,r),S(i,e,null),n=!0},p(s,[r]){const l={};r&67117052&&(l.$$scope={dirty:r,ctx:s}),i.$set(l)},i(s){n||(m(i.$$.fragment,s),n=!0)},o(s){g(i.$$.fragment,s),n=!1},d(s){s&&w(e),E(i)}}}function S7(t,e,i){let n,s,r,l,o,a,c,u,f,d,p,h,_=z,b=()=>(_(),_=Fn(F,G=>i(5,h=G)),F),k,v,$=z,L=()=>($(),$=Fn(j,G=>i(10,v=G)),j),A,P;U(t,Ke,G=>i(17,k=G)),U(t,pe,G=>i(11,A=G)),U(t,ts,G=>i(12,P=G)),t.$$.on_destroy.push(()=>_()),t.$$.on_destroy.push(()=>$());let{thisPane:F=Re(null)}=e;b();let{thatPane:j=Re(null)}=e;L();const N=G=>{Me(F,h={mode:"edit",locale:G},h),v?.mode==="preview"&&Me(j,v={mode:"preview",locale:G},v)},M=()=>{Me(F,h={mode:"preview",locale:v?.locale},h)},R=()=>{hp(h?.locale)};return t.$$set=G=>{"thisPane"in G&&b(i(0,F=G.thisPane)),"thatPane"in G&&L(i(1,j=G.thatPane))},t.$$.update=()=>{t.$$.dirty&131072&&i(16,{collection:n,collectionFile:s,currentValues:r,originalValues:l,validities:o}=k??{},n,(i(15,s),i(17,k)),(i(14,r),i(17,k)),(i(13,l),i(17,k)),(i(9,o),i(17,k))),t.$$.dirty&65536&&i(4,{hasLocales:a=!1,locales:c=["default"]}=n._i18n??{},a,(i(3,c),i(16,n),i(17,k))),t.$$.dirty&56&&i(2,u=a?c.filter(G=>G!==h?.locale):[]),t.$$.dirty&98304&&i(8,f=n?.editor?.preview!==!1&&s?.editor?.preview!==!1),t.$$.dirty&4&&i(7,d=!!u.length),t.$$.dirty&24608&&i(6,p=!Un(r[h?.locale],l[h?.locale]))},[F,j,u,c,a,h,p,d,f,o,v,A,P,l,r,s,n,k,N,M,R]}class dy extends J{constructor(e){super(),X(this,e,S7,$7,Z,{thisPane:0,thatPane:1},m7)}}function E7(t){ve(t,"svelte-t01vxl","div.svelte-t01vxl{padding:8px 16px}")}function ib(t,e,i){const n=t.slice();return n[5]=e[i],n}function sb(t,e){let i,n,s;return n=new Rp({props:{keyPath:e[5].name,locale:e[0],fieldConfig:e[5]}}),{key:t,first:null,c(){i=K(),T(n.$$.fragment),this.first=i},m(r,l){y(r,i,l),S(n,r,l),s=!0},p(r,l){e=r;const o={};l&2&&(o.keyPath=e[5].name),l&1&&(o.locale=e[0]),l&2&&(o.fieldConfig=e[5]),n.$set(o)},i(r){s||(m(n.$$.fragment,r),s=!0)},o(r){g(n.$$.fragment,r),s=!1},d(r){r&&w(i),E(n,r)}}}function T7(t){let e,i=[],n=new Map,s,r=ce(t[1]);const l=o=>o[5].name;for(let o=0;o<r.length;o+=1){let a=ib(t,r,o),c=l(a);n.set(c,i[o]=sb(c,a))}return{c(){e=I("div");for(let o=0;o<i.length;o+=1)i[o].c();C(e,"class","svelte-t01vxl")},m(o,a){y(o,e,a);for(let c=0;c<i.length;c+=1)i[c]&&i[c].m(e,null);s=!0},p(o,[a]){a&3&&(r=ce(o[1]),H(),i=ct(i,a,l,1,o,r,n,e,at,sb,null,ib),V())},i(o){if(!s){for(let a=0;a<r.length;a+=1)m(i[a]);s=!0}},o(o){for(let a=0;a<i.length;a+=1)g(i[a]);s=!1},d(o){o&&w(e);for(let a=0;a<i.length;a+=1)i[a].d()}}}function O7(t,e,i){let n,s,r,l;U(t,Ke,a=>i(4,l=a));let{locale:o}=e;return t.$$set=a=>{"locale"in a&&i(0,o=a.locale)},t.$$.update=()=>{t.$$.dirty&16&&i(2,{collection:n,collectionFile:s}=l??{},n,(i(3,s),i(4,l))),t.$$.dirty&12&&i(1,r=s?.fields??n?.fields)},[o,r,n,s,l]}class oc extends J{constructor(e){super(),X(this,e,O7,T7,Z,{locale:0},E7)}}const py=async t=>{const e=ne(ei),i=t.map(n=>{const s=e.find(r=>r.id===n);return s?Object.values(s.locales).map(({path:r})=>({slug:s.slug,path:r})):void 0}).flat(1).filter((n,s,r)=>n&&r.findIndex(l=>l.path===n.path)===s);await ne(fi).deleteFiles(i,{collection:ne(Lt).name}),ei.set(e.filter(n=>!t.includes(n.id)))};function A7(t){let e,i;return e=new we({props:{slot:"start-icon",name:"arrow_back_ios_new",label:t[13]("cancel")}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&8192&&(r.label=n[13]("cancel")),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function L7(t){let e=t[13]("editing_x",{values:{name:t[3]?`${t[4]} » ${t[3].label}`:t[11]}})+"",i;return{c(){i=q(e)},m(n,s){y(n,i,s)},p(n,s){s&10264&&e!==(e=n[13]("editing_x",{values:{name:n[3]?`${n[4]} » ${n[3].label}`:n[11]}})+"")&&W(i,e)},d(n){n&&w(i)}}}function N7(t){let e=t[13]("creating_x",{values:{name:t[11]}})+"",i;return{c(){i=q(e)},m(n,s){y(n,i,s)},p(n,s){s&10240&&e!==(e=n[13]("creating_x",{values:{name:n[11]}})+"")&&W(i,e)},d(n){n&&w(i)}}}function P7(t){let e,i;return e=new we({props:{slot:"start-icon",name:"more_vert",label:t[13]("show_menu")}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&8192&&(r.label=n[13]("show_menu")),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function rb(t){let e,i,n,s,r,l;return e=new Tn({}),n=new Ct({props:{label:t[13]("duplicate"),disabled:t[0]?.create===!1||t[2]}}),n.$on("click",t[23]),r=new Ct({props:{disabled:t[0]?.delete===!1||t[2],label:t[13]("delete")}}),r.$on("click",t[24]),{c(){T(e.$$.fragment),i=D(),T(n.$$.fragment),s=D(),T(r.$$.fragment)},m(o,a){S(e,o,a),y(o,i,a),S(n,o,a),y(o,s,a),S(r,o,a),l=!0},p(o,a){const c={};a&8192&&(c.label=o[13]("duplicate")),a&5&&(c.disabled=o[0]?.create===!1||o[2]),n.$set(c);const u={};a&5&&(u.disabled=o[0]?.delete===!1||o[2]),a&8192&&(u.label=o[13]("delete")),r.$set(u)},i(o){l||(m(e.$$.fragment,o),m(n.$$.fragment,o),m(r.$$.fragment,o),l=!0)},o(o){g(e.$$.fragment,o),g(n.$$.fragment,o),g(r.$$.fragment,o),l=!1},d(o){o&&(w(i),w(s)),E(e,o),E(n,o),E(r,o)}}}function I7(t){let e,i,n,s,r,l,o,a,c,u;e=new lh({props:{label:t[13]("show_preview"),checked:t[14].showPreview,disabled:!t[10]}}),e.$on("click",t[20]),n=new lh({props:{label:t[13]("sync_scrolling"),checked:t[14].syncScrolling,disabled:!t[10]&&Object.keys(t[1]).length===1}}),n.$on("click",t[21]),r=new Tn({}),o=new Ct({props:{label:t[13]("revert_all_changes"),disabled:!t[9]}}),o.$on("click",t[22]);let f=!t[3]&&rb(t);return{c(){T(e.$$.fragment),i=D(),T(n.$$.fragment),s=D(),T(r.$$.fragment),l=D(),T(o.$$.fragment),a=D(),f&&f.c(),c=K()},m(d,p){S(e,d,p),y(d,i,p),S(n,d,p),y(d,s,p),S(r,d,p),y(d,l,p),S(o,d,p),y(d,a,p),f&&f.m(d,p),y(d,c,p),u=!0},p(d,p){const h={};p&8192&&(h.label=d[13]("show_preview")),p&16384&&(h.checked=d[14].showPreview),p&1024&&(h.disabled=!d[10]),e.$set(h);const _={};p&8192&&(_.label=d[13]("sync_scrolling")),p&16384&&(_.checked=d[14].syncScrolling),p&1026&&(_.disabled=!d[10]&&Object.keys(d[1]).length===1),n.$set(_);const b={};p&8192&&(b.label=d[13]("revert_all_changes")),p&512&&(b.disabled=!d[9]),o.$set(b),d[3]?f&&(H(),g(f,1,1,()=>{f=null}),V()):f?(f.p(d,p),p&8&&m(f,1)):(f=rb(d),f.c(),m(f,1),f.m(c.parentNode,c))},i(d){u||(m(e.$$.fragment,d),m(n.$$.fragment,d),m(r.$$.fragment,d),m(o.$$.fragment,d),m(f),u=!0)},o(d){g(e.$$.fragment,d),g(n.$$.fragment,d),g(r.$$.fragment,d),g(o.$$.fragment,d),g(f),u=!1},d(d){d&&(w(i),w(s),w(l),w(a),w(c)),E(e,d),E(n,d),E(r,d),E(o,d),f&&f.d(d)}}}function C7(t){let e,i;return e=new Ci({props:{slot:"popup",$$slots:{default:[I7]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&1073768015&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function D7(t){let e,i,n,s,r,l,o,a,c,u;e=new De({props:{class:"ghost iconic",$$slots:{"start-icon":[A7]},$$scope:{ctx:t}}}),e.$on("click",t[19]);function f(h,_){return h[2]?N7:L7}let d=f(t),p=d(t);return r=new gn({props:{flex:!0}}),o=new as({props:{class:"ghost iconic",popupPosition:"bottom-right",$$slots:{popup:[C7],"start-icon":[P7]},$$scope:{ctx:t}}}),c=new De({props:{class:"primary",label:t[8]?t[13]("saving"):t[13](t[15]==="local"?"save":"save_and_publish"),disabled:!t[9]||t[8],keyShortcuts:"Accel+S"}}),c.$on("click",t[25]),{c(){T(e.$$.fragment),i=D(),n=I("h2"),p.c(),s=D(),T(r.$$.fragment),l=D(),T(o.$$.fragment),a=D(),T(c.$$.fragment)},m(h,_){S(e,h,_),y(h,i,_),y(h,n,_),p.m(n,null),y(h,s,_),S(r,h,_),y(h,l,_),S(o,h,_),y(h,a,_),S(c,h,_),u=!0},p(h,_){const b={};_&1073750016&&(b.$$scope={dirty:_,ctx:h}),e.$set(b),d===(d=f(h))&&p?p.p(h,_):(p.d(1),p=d(h),p&&(p.c(),p.m(n,null)));const k={};_&1073768015&&(k.$$scope={dirty:_,ctx:h}),o.$set(k);const v={};_&41216&&(v.label=h[8]?h[13]("saving"):h[13](h[15]==="local"?"save":"save_and_publish")),_&768&&(v.disabled=!h[9]||h[8]),c.$set(v)},i(h){u||(m(e.$$.fragment,h),m(r.$$.fragment,h),m(o.$$.fragment,h),m(c.$$.fragment,h),u=!0)},o(h){g(e.$$.fragment,h),g(r.$$.fragment,h),g(o.$$.fragment,h),g(c.$$.fragment,h),u=!1},d(h){h&&(w(i),w(n),w(s),w(l),w(a)),E(e,h),p.d(),E(r,h),E(o,h),E(c,h)}}}function M7(t){let e=t[13]("entry_duplicated")+"",i;return{c(){i=q(e)},m(n,s){y(n,i,s)},p(n,s){s&8192&&e!==(e=n[13]("entry_duplicated")+"")&&W(i,e)},d(n){n&&w(i)}}}function j7(t){let e=t[13]("confirm_deleting_this_entry")+"",i;return{c(){i=q(e)},m(n,s){y(n,i,s)},p(n,s){s&8192&&e!==(e=n[13]("confirm_deleting_this_entry")+"")&&W(i,e)},d(n){n&&w(i)}}}function R7(t){let e=t[13]("saving_entry.error.description")+"",i;return{c(){i=q(e)},m(n,s){y(n,i,s)},p(n,s){s&8192&&e!==(e=n[13]("saving_entry.error.description")+"")&&W(i,e)},d(n){n&&w(i)}}}function F7(t){let e,i,n,s,r,l,o,a,c,u,f;e=new cs({props:{class:"primary",$$slots:{default:[D7]},$$scope:{ctx:t}}});function d(v){t[26](v)}let p={showOk:!1,showCancel:!1,showClose:!1,closeOnBackdropClick:!0,style:"text-align:center",$$slots:{default:[M7]},$$scope:{ctx:t}};t[5]!==void 0&&(p.open=t[5]),n=new Kn({props:p}),ae.push(()=>ze(n,"open",d));function h(v){t[27](v)}let _={title:t[13]("delete_entry"),okLabel:t[13]("delete"),$$slots:{default:[j7]},$$scope:{ctx:t}};t[6]!==void 0&&(_.open=t[6]),l=new Kn({props:_}),ae.push(()=>ze(l,"open",h)),l.$on("ok",t[28]);function b(v){t[29](v)}let k={title:t[13]("saving_entry.error.title"),showCancel:!1,$$slots:{default:[R7]},$$scope:{ctx:t}};return t[7]!==void 0&&(k.open=t[7]),c=new Kn({props:k}),ae.push(()=>ze(c,"open",b)),{c(){T(e.$$.fragment),i=D(),T(n.$$.fragment),r=D(),T(l.$$.fragment),a=D(),T(c.$$.fragment)},m(v,$){S(e,v,$),y(v,i,$),S(n,v,$),y(v,r,$),S(l,v,$),y(v,a,$),S(c,v,$),f=!0},p(v,[$]){const L={};$&1073803231&&(L.$$scope={dirty:$,ctx:v}),e.$set(L);const A={};$&1073750016&&(A.$$scope={dirty:$,ctx:v}),!s&&$&32&&(s=!0,A.open=v[5],He(()=>s=!1)),n.$set(A);const P={};$&8192&&(P.title=v[13]("delete_entry")),$&8192&&(P.okLabel=v[13]("delete")),$&1073750016&&(P.$$scope={dirty:$,ctx:v}),!o&&$&64&&(o=!0,P.open=v[6],He(()=>o=!1)),l.$set(P);const F={};$&8192&&(F.title=v[13]("saving_entry.error.title")),$&1073750016&&(F.$$scope={dirty:$,ctx:v}),!u&&$&128&&(u=!0,F.open=v[7],He(()=>u=!1)),c.$set(F)},i(v){f||(m(e.$$.fragment,v),m(n.$$.fragment,v),m(l.$$.fragment,v),m(c.$$.fragment,v),f=!0)},o(v){g(e.$$.fragment,v),g(n.$$.fragment,v),g(l.$$.fragment,v),g(c.$$.fragment,v),f=!1},d(v){v&&(w(i),w(r),w(a)),E(e,v),E(n,v),E(l,v),E(c,v)}}}function U7(t,e,i){let n,s,r,l,o,a,c,u,f,d,p,h,_,b;U(t,Ke,ue=>i(18,p=ue)),U(t,pe,ue=>i(13,h=ue)),U(t,ts,ue=>i(14,_=ue)),U(t,_l,ue=>i(15,b=ue));let k=!1,v=!1,$=!1,L=!1;const A=async()=>{i(5,k=!0),zt(`/collections/${n?.name}/new`,{replaceState:!0,notifyChange:!1}),Me(Ke,p={...p,isNew:!0,originalEntry:void 0},p),await Rd(1e3),i(5,k=!1)},P=()=>{Yr(`/collections/${n?.name}`)},F=()=>{ts.update(ue=>({...ue,showPreview:!ue.showPreview}))},j=()=>{ts.update(ue=>({...ue,syncScrolling:!ue.syncScrolling}))},N=()=>{hp()},M=()=>{A()},R=()=>{i(6,v=!0)},G=async()=>{try{i(8,L=!0),await xP(),Yr(`/collections/${n?.name}`)}catch(ue){ue.message!=="validation_failed"&&(i(7,$=!0),console.error(ue))}finally{i(8,L=!1)}};function Q(ue){k=ue,i(5,k)}function te(ue){v=ue,i(6,v)}const x=async()=>{await py([l?.id]),Yr(`/collections/${n?.name}`)};function Y(ue){$=ue,i(7,$)}return t.$$.update=()=>{t.$$.dirty&262144&&i(0,{collection:n,collectionFile:s,isNew:r,originalEntry:l,currentValues:o,originalValues:a}=p??{},n,(i(3,s),i(18,p)),(i(2,r),i(18,p)),(i(12,l),i(18,p)),(i(1,o),i(18,p)),(i(17,a),i(18,p))),t.$$.dirty&1&&i(4,c=n?.label||n?.name),t.$$.dirty&17&&i(11,u=n?.label_singular||c),t.$$.dirty&9&&i(10,f=n?.editor?.preview!==!1&&s?.editor?.preview!==!1),t.$$.dirty&131078&&i(9,d=r||!Un(o,a))},[n,o,r,s,c,k,v,$,L,d,f,u,l,h,_,b,A,a,p,P,F,j,N,M,R,G,Q,te,x,Y]}class x7 extends J{constructor(e){super(),X(this,e,U7,F7,Z,{})}}function z7(t){ve(t,"svelte-10tip2a",'@charset "UTF-8";.editor.svelte-10tip2a.svelte-10tip2a{position:fixed;inset:0;z-index:100;display:flex;flex-direction:column;background-color:var(--sui-primary-background-color)}.editor.svelte-10tip2a .cols.svelte-10tip2a{flex:auto;overflow:hidden;display:flex}.editor.svelte-10tip2a .cols.svelte-10tip2a>div{display:flex;flex-direction:column;min-width:480px;transition:all 500ms}.editor.svelte-10tip2a .cols.svelte-10tip2a>div:first-child:not(:last-child){border-width:0 1px 0 0;border-color:var(--sui-primary-border-color)}.editor.svelte-10tip2a .cols.svelte-10tip2a>div>.content{flex:auto;overflow-y:auto;scroll-behavior:auto;overscroll-behavior-y:contain}.editor.svelte-10tip2a .cols.svelte-10tip2a>[data-mode="edit"]{flex:1 1}.editor.svelte-10tip2a .cols.svelte-10tip2a>[data-mode="preview"]{flex:2 1}')}function lb(t){let e,i,n,s=t[4]&&ob(t),r=t[3]&&ab(t);return{c(){s&&s.c(),e=D(),r&&r.c(),i=K()},m(l,o){s&&s.m(l,o),y(l,e,o),r&&r.m(l,o),y(l,i,o),n=!0},p(l,o){l[4]?s?(s.p(l,o),o&16&&m(s,1)):(s=ob(l),s.c(),m(s,1),s.m(e.parentNode,e)):s&&(H(),g(s,1,1,()=>{s=null}),V()),l[3]?r?(r.p(l,o),o&8&&m(r,1)):(r=ab(l),r.c(),m(r,1),r.m(i.parentNode,i)):r&&(H(),g(r,1,1,()=>{r=null}),V())},i(l){n||(m(s),m(r),n=!0)},o(l){g(s),g(r),n=!1},d(l){l&&(w(e),w(i)),s&&s.d(l),r&&r.d(l)}}}function ob(t){let e,i;return e=new _n({props:{"data-mode":t[4].mode,"data-locale":t[4].locale,$$slots:{default:[B7]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&16&&(r["data-mode"]=n[4].mode),s&16&&(r["data-locale"]=n[4].locale),s&8388627&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function B7(t){let e,i,n,s,r,l,o;e=new dy({props:{thisPane:Ys,thatPane:Gs}});var a=t[4].mode==="preview"?oc:lc;function c(u,f){return{props:{locale:u[4].locale}}}return a&&(s=Zt(a,c(t))),{c(){T(e.$$.fragment),i=D(),n=I("div"),s&&T(s.$$.fragment),C(n,"class","content")},m(u,f){S(e,u,f),y(u,i,f),y(u,n,f),s&&S(s,n,null),t[11](n),r=!0,l||(o=je(n,"wheel",t[12],{passive:!0,capture:!0}),l=!0)},p(u,f){if(f&16&&a!==(a=u[4].mode==="preview"?oc:lc)){if(s){H();const d=s;g(d.$$.fragment,1,0,()=>{E(d,1)}),V()}a?(s=Zt(a,c(u)),T(s.$$.fragment),m(s.$$.fragment,1),S(s,n,null)):s=null}else if(a){const d={};f&16&&(d.locale=u[4].locale),s.$set(d)}},i(u){r||(m(e.$$.fragment,u),s&&m(s.$$.fragment,u),r=!0)},o(u){g(e.$$.fragment,u),s&&g(s.$$.fragment,u),r=!1},d(u){u&&(w(i),w(n)),E(e,u),s&&E(s),t[11](null),l=!1,o()}}}function ab(t){let e,i;return e=new _n({props:{"data-mode":t[3].mode,"data-locale":t[3].locale,$$slots:{default:[H7]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&8&&(r["data-mode"]=n[3].mode),s&8&&(r["data-locale"]=n[3].locale),s&8388619&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function H7(t){let e,i,n,s,r,l,o;e=new dy({props:{thisPane:Gs,thatPane:Ys}});var a=t[3].mode==="preview"?oc:lc;function c(u,f){return{props:{locale:u[3].locale}}}return a&&(s=Zt(a,c(t))),{c(){T(e.$$.fragment),i=D(),n=I("div"),s&&T(s.$$.fragment),C(n,"class","content")},m(u,f){S(e,u,f),y(u,i,f),y(u,n,f),s&&S(s,n,null),t[13](n),r=!0,l||(o=je(n,"wheel",t[14],{passive:!0,capture:!0}),l=!0)},p(u,f){if(f&8&&a!==(a=u[3].mode==="preview"?oc:lc)){if(s){H();const d=s;g(d.$$.fragment,1,0,()=>{E(d,1)}),V()}a?(s=Zt(a,c(u)),T(s.$$.fragment),m(s.$$.fragment,1),S(s,n,null)):s=null}else if(a){const d={};f&8&&(d.locale=u[3].locale),s.$set(d)}},i(u){r||(m(e.$$.fragment,u),s&&m(s.$$.fragment,u),r=!0)},o(u){g(e.$$.fragment,u),s&&g(s.$$.fragment,u),r=!1},d(u){u&&(w(i),w(n)),E(e,u),s&&E(s),t[13](null),l=!1,o()}}}function V7(t){let e,i,n,s,r;i=new x7({});let l=t[2]&&lb(t);return{c(){e=I("div"),T(i.$$.fragment),n=D(),s=I("div"),l&&l.c(),C(s,"class","cols svelte-10tip2a"),C(e,"class","editor svelte-10tip2a")},m(o,a){y(o,e,a),S(i,e,null),O(e,n),O(e,s),l&&l.m(s,null),r=!0},p(o,[a]){o[2]?l?(l.p(o,a),a&4&&m(l,1)):(l=lb(o),l.c(),m(l,1),l.m(s,null)):l&&(H(),g(l,1,1,()=>{l=null}),V())},i(o){r||(m(i.$$.fragment,o),m(l),r=!0)},o(o){g(i.$$.fragment,o),g(l),r=!1},d(o){o&&w(e),E(i),l&&l.d()}}}function q7(t,e,i){let n,s,r,l,o,a,c,u,f,d,p,h;U(t,Ke,M=>i(9,f=M)),U(t,Gs,M=>i(3,d=M)),U(t,Ys,M=>i(4,p=M)),U(t,ts,M=>i(10,h=M));let _,b,k=!1;const v=()=>{const M=o?.[n.name];if(!Array.isArray(M))return;const[R,G]=M;if(R?.locale&&!c.includes(R.locale)||G?.locale&&!c.includes(G.locale)||(!r||!u)&&(R?.mode==="preview"||G?.mode==="preview"))throw new Error("Saved panes are invalid");Me(Ys,p=R,p),Me(Gs,d=G,d)},$=()=>{if(!k)try{v();return}catch{}finally{k=!0}if(!r||!u){const M=a?c.filter(R=>R!==p?.locale):[];Me(Ys,p.mode="edit",p),Me(Gs,d=M.length?{mode:"edit",locale:M[0]}:null,d)}else Me(Ys,p.mode="edit",p),Me(Gs,d={mode:"preview",locale:p?.locale},d)},L=()=>{n&&ts.update(M=>({...M,paneStates:{...M.paneStates??{},[n.name]:[p,d]}}))},A=(M,R)=>{!l||!R||window.requestAnimationFrame(()=>{const{x:G,y:Q}=M.getBoundingClientRect(),te=document.elementsFromPoint(G+80,Q).find(mt=>mt.matches("[data-key-path]"));if(!te)return;const{keyPath:x}=te.dataset,{top:Y,height:ue}=te.getBoundingClientRect(),Fe=(Q-Y)/ue,lt=R.querySelector(`[data-key-path="${CSS.escape(x)}"]`);Fe<0||Fe>1||!lt||(R.scrollTop=lt.offsetTop-Q+lt.clientHeight*Fe)})};on(()=>()=>{Me(Ke,f=null,f)});function P(M){ae[M?"unshift":"push"](()=>{_=M,i(0,_)})}const F=()=>{A(_,b)};function j(M){ae[M?"unshift":"push"](()=>{b=M,i(1,b)})}const N=()=>{A(b,_)};return t.$$.update=()=>{t.$$.dirty&512&&i(2,{collection:n,collectionFile:s}=f??{},n,(i(8,s),i(9,f))),t.$$.dirty&1024&&i(7,{showPreview:r,syncScrolling:l,paneStates:o}=h,r),t.$$.dirty&4&&({hasLocales:a=!1,locales:c=["default"]}=n?._i18n??{}),t.$$.dirty&260&&i(6,u=n?.editor?.preview!==!1&&s?.editor?.preview!==!1),t.$$.dirty&192&&$(),t.$$.dirty&24&&L(),t.$$.dirty&1&&_&&i(0,_.scrollTop=0,_),t.$$.dirty&2&&b&&i(1,b.scrollTop=0,b)},[_,b,n,d,p,A,u,r,s,f,h,P,F,j,N]}class Y7 extends J{constructor(e){super(),X(this,e,q7,V7,Z,{},z7)}}const od="sveltia-cms.contents-view",my=["title","name","date","author","description"],zn=Re({}),G7=(t,e,i)=>{if(e==="upper")return String(t).toUpperCase();if(e==="lower")return String(t).toLowerCase();if(e.startsWith("date")&&i){const[,n]=e.match(/^date\('(.*?)'\)$/),{time_format:s,picker_utc:r=!1}=i,l=s===!1;return(r||l&&t?.match(/^\d{4}-[01]\d-[0-3]\d$/)||l&&t.match(/T00:00(?::00)?(?:\.000)?Z$/)?fe.utc(t):fe(t)).format(n)}if(e.startsWith("default")){const[,n]=e.match(/^default\('?(.*?)'?\)$/);return t??n}if(e.startsWith("ternary")){const[,n,s]=e.match(/^ternary\('?(.*?)'?,\s*'?(.*?)'?\)$/);return t?n:s}if(e.startsWith("truncate")){const[,n,s=""]=e.match(/^truncate\((\d+)(?:,\s*'?(.*?)'?)?\)$/),r=Number(n),l=String(t).substring(0,r);return String(t).length>r?`${l}${s}`:l}return t},cb=(t,e,i,n)=>{const{name:s,folder:r,identifier_field:l,summary:o,_i18n:{defaultLocale:a="default"}}=t;if(!o)return i[l]||i.title||i.name||i.label||e.slug;const{locales:c,slug:u,commitDate:f,commitAuthor:d}=e,{path:p}=c[n],h=Zn(i),_=b=>{const[k,...v]=b.split(/\s*\|\s*/);let $=(()=>b==="slug"?u:b==="dirname"?Ai(p.replace(/[^/]+$/,"").replace(r,"")):b==="filename"?p.split("/").pop().split(".").shift():b==="extension"?p.split("/").pop().split(".").pop():b==="commit_date"?f??"":b==="commit_author"?d?.name||d?.login||d?.email:Fd({collectionName:s,valueMap:h,keyPath:k,locale:a}))();if(!$)return"";if(!v.length){if($ instanceof Date){const{year:A,month:P,day:F}=Pc({date:$});return`${A}-${P}-${F}`}return String($)}const L=gi({collectionName:s,valueMap:h,keyPath:k});return v.forEach(A=>{$=G7($,A,L)}),String($)};return o.replace(/{{(.+?)}}/g,(b,k)=>_(k)).trim()},W7=(t,{key:e,order:i}={})=>{if(!e||!i)return t;const n=[...t],{defaultLocale:s="default"}=ne(Lt)._i18n,r={slug:String,commit_author:String,commit_date:Date}[e]||(n.length?Oa(n[0],s,e)?.constructor:String)||String,l=Object.fromEntries(n.map(o=>[o.slug,Oa(o,s,e)]));return n.sort((o,a)=>{const c=l[o.slug],u=l[a.slug];return c===void 0||u===void 0?0:r===String?c.localeCompare(u):r===Date?Number(c)-Number(u):c-u}),i==="descending"&&n.reverse(),n},K7=(t,{field:e,pattern:i}={field:void 0,pattern:void 0})=>{if(!e)return t;const{defaultLocale:n="default"}=ne(Lt)._i18n,s=typeof i=="string"?new RegExp(i):void 0;return t.filter(r=>{const l=Oa(r,n,e);return l===void 0?!1:s?!!String(l).match(s):l===i})},Z7=(t,{field:e,pattern:i}={field:void 0,pattern:void 0})=>{if(!e)return t.length?[{name:"*",entries:t}]:[];const n=ne(zn).sort,{defaultLocale:s="default"}=ne(Lt)._i18n,r=typeof i=="string"?new RegExp(i):void 0,l={},o=ne(pe)("other");t.forEach(c=>{const u=Oa(c,s,e);let f;u!==void 0&&(r?[f=o]=String(u).match(r)??[]:f=u),f in l||(l[f]=[]),l[f].push(c)});const a=Object.entries(l).map(([c,u])=>({name:c,entries:u})).sort(({name:c},{name:u})=>c.localeCompare(u));return n?.key===e&&n?.order==="descending"&&a.reverse(),a},ac=Re({},t=>{(async()=>{try{t(await Xt.get(od)??{})}catch{}})()}),X7=(t,e)=>["name","commit_author","commit_date"].includes(e)?ne(pe)(`sort_keys.${e}`):e.includes(".")?e.split(".").map((i,n,s)=>{if(i.match(/^\d+$/))return;const r=s.slice(0,n+1).join(".");return gi({collectionName:t.name,keyPath:r})?.label||i}).filter(Boolean).join(" – "):t.fields?.find(({name:i})=>i===e)?.label||e,J7=vn([Lt,ei,Vt],([t,e],i)=>{const{files:n,sortable_fields:s}=t??{};if(n){i([]);return}const{commitAuthor:r,commitDate:l}=e?.[0]??{},o=(Array.isArray(s)?s:my).filter(a=>!!gi({collectionName:t.name,keyPath:a}));r&&!o.includes("author")&&o.push("commit_author"),l&&!o.includes("date")&&o.push("commit_date"),i(o.map(a=>({key:a,label:X7(t,a)})))}),wl=vn([ei,Lt],([t,e],i)=>{i(t&&e?$o(e.name):[])}),hy=vn([wl,zn],([t,e],i)=>{let n=[...t];!n.length||n[0].fileName?i([]):(n=W7(n,e?.sort),n=K7(n,e?.filter),i(Z7(n,e?.group)))});wl.subscribe(t=>{ws.set([]),ne(dt).devModeEnabled&&console.info("listedEntries",t)});Lt.subscribe(t=>{if(!t)return;ne(dt).devModeEnabled&&console.info("selectedCollection",t);const{name:e,identifier_field:i,fields:n=[],_i18n:{defaultLocale:s="default"}}=t;if(Ys.set({mode:"edit",locale:s}),Gs.set({mode:"preview",locale:s}),!n.length)return;const r={type:"list",sort:{key:i||n.find(o=>my.includes(o.name))?.name,order:"ascending"}},l=ne(ac)[e]??r;Un(l,ne(zn))||zn.set(l)});zn.subscribe(t=>{const{name:e}=ne(Lt)??{},i=ne(ac)[e]??{};Un(t,i)||ac.update(n=>({...n,[e]:t}))});ac.subscribe(t=>{!t||!Object.keys(t).length||(async()=>{try{Un(t,await Xt.get(od))||await Xt.set(od,t)}catch{}})()});function Q7(t){let e,i;return e=new I0({props:{checked:t[5].includes(t[0])}}),e.$on("change",t[6]),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&33&&(r.checked=n[5].includes(n[0])),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function ub(t){let e,i;return e=new Mn({props:{class:"image",$$slots:{default:[i9]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&531&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function e9(t){return{c:z,m:z,p:z,i:z,o:z,d:z}}function t9(t){let e,i;return e=new bi({props:{src:t[8],cover:!0}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&19&&(r.src=n[8]),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function n9(t){return{c:z,m:z,p:z,i:z,o:z,d:z}}function i9(t){let e,i,n,s={ctx:t,current:null,token:null,hasCatch:!1,pending:n9,then:t9,catch:e9,value:8,blocks:[,,,]};return Ts(i=ss(t[1][t[4]?.name],t[0]),s),{c(){e=K(),s.block.c()},m(r,l){y(r,e,l),s.block.m(r,s.anchor=l),s.mount=()=>e.parentNode,s.anchor=e,n=!0},p(r,l){t=r,s.ctx=t,l&19&&i!==(i=ss(t[1][t[4]?.name],t[0]))&&Ts(i,s)||cc(s,t,l)},i(r){n||(m(s.block),n=!0)},o(r){for(let l=0;l<3;l+=1){const o=s.blocks[l];g(o)}n=!1},d(r){r&&w(e),s.block.d(r),s.token=null,s=null}}}function s9(t){let e,i=cb(t[3],t[0],t[1],t[2])+"",n;return{c(){e=I("span"),n=q(i)},m(s,r){y(s,e,r),O(e,n)},p(s,r){r&15&&i!==(i=cb(s[3],s[0],s[1],s[2])+"")&&W(n,i)},d(s){s&&w(e)}}}function r9(t){let e,i,n,s,r;e=new Mn({props:{class:"checkbox",$$slots:{default:[Q7]},$$scope:{ctx:t}}});let l=t[4]&&ub(t);return s=new Mn({props:{class:"title",$$slots:{default:[s9]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment),i=D(),l&&l.c(),n=D(),T(s.$$.fragment)},m(o,a){S(e,o,a),y(o,i,a),l&&l.m(o,a),y(o,n,a),S(s,o,a),r=!0},p(o,a){const c={};a&545&&(c.$$scope={dirty:a,ctx:o}),e.$set(c),o[4]?l?(l.p(o,a),a&16&&m(l,1)):(l=ub(o),l.c(),m(l,1),l.m(n.parentNode,n)):l&&(H(),g(l,1,1,()=>{l=null}),V());const u={};a&527&&(u.$$scope={dirty:a,ctx:o}),s.$set(u)},i(o){r||(m(e.$$.fragment,o),m(l),m(s.$$.fragment,o),r=!0)},o(o){g(e.$$.fragment,o),g(l),g(s.$$.fragment,o),r=!1},d(o){o&&(w(i),w(n)),E(e,o),l&&l.d(o),E(s,o)}}}function l9(t){let e,i;return e=new vo({props:{"aria-selected":t[5].includes(t[0]),$$slots:{default:[r9]},$$scope:{ctx:t}}}),e.$on("click",t[7]),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,[s]){const r={};s&33&&(r["aria-selected"]=n[5].includes(n[0])),s&575&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function o9(t,e,i){let n,s,r;U(t,Lt,f=>i(3,s=f)),U(t,ws,f=>i(5,r=f));let{entry:l}=e,{content:o}=e,{locale:a}=e;const c=({detail:{checked:f}})=>{ws.update(d=>{const p=d.indexOf(l);return d&&p===-1&&d.push(l),!f&&p>-1&&d.splice(p,1),d})},u=()=>{zt(`/collections/${s.name}/entries/${l.slug}`)};return t.$$set=f=>{"entry"in f&&i(0,l=f.entry),"content"in f&&i(1,o=f.content),"locale"in f&&i(2,a=f.locale)},t.$$.update=()=>{t.$$.dirty&8&&i(4,n=s.fields?.find(({widget:f})=>f==="image"))},[l,o,a,s,n,r,c,u]}class a9 extends J{constructor(e){super(),X(this,e,o9,l9,Z,{entry:0,content:1,locale:2})}}function c9(t){ve(t,"svelte-1hh20n2",".list-container.svelte-1hh20n2{padding:16px}h3.svelte-1hh20n2{padding:8px;color:var(--sui-secondary-foreground-color);background-color:var(--sui-secondary-background-color)}h3.svelte-1hh20n2+.basic-grid-view .table{margin:16px 0}")}function fb(t,e,i){const n=t.slice();return n[8]=e[i].name,n[9]=e[i].entries,n}function db(t,e,i){const n=t.slice();n[12]=e[i];const s=n[12];n[13]=s.locales;const r=n[7]in n[13]?n[7]:Object.keys(n[13])[0];n[14]=r;const l=n[13][n[14]];return n[15]=l.content,n}function u9(t){const e=t.slice(),i=e[2]._i18n;return e[7]=i.defaultLocale!==void 0?i.defaultLocale:"default",e}function f9(t){let e,i;return e=new Ln({props:{$$slots:{default:[p9]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&262176&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function d9(t){let e,i,n,s;const r=[g9,h9,m9],l=[];function o(c,u){return c[1].length?0:c[4].length?1:2}function a(c,u){return u===0?u9(c):c}return e=o(t),i=l[e]=r[e](a(t,e)),{c(){i.c(),n=K()},m(c,u){l[e].m(c,u),y(c,n,u),s=!0},p(c,u){let f=e;e=o(c),e===f?l[e].p(a(c,e),u):(H(),g(l[f],1,1,()=>{l[f]=null}),V(),i=l[e],i?i.p(a(c,e),u):(i=l[e]=r[e](a(c,e)),i.c()),m(i,1),i.m(n.parentNode,n))},i(c){s||(m(i),s=!0)},o(c){g(i),s=!1},d(c){c&&w(n),l[e].d(c)}}}function p9(t){let e,i=t[5]("collection_not_found")+"",n;return{c(){e=I("span"),n=q(i)},m(s,r){y(s,e,r),O(e,n)},p(s,r){r&32&&i!==(i=s[5]("collection_not_found")+"")&&W(n,i)},d(s){s&&w(e)}}}function m9(t){let e,i;return e=new Ln({props:{$$slots:{default:[b9]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&262180&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function h9(t){let e,i;return e=new Ln({props:{$$slots:{default:[v9]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&262176&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function g9(t){let e=[],i=new Map,n,s,r=ce(t[0]);const l=o=>o[8];for(let o=0;o<r.length;o+=1){let a=fb(t,r,o),c=l(a);i.set(c,e[o]=gb(c,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();n=K()},m(o,a){for(let c=0;c<e.length;c+=1)e[c]&&e[c].m(o,a);y(o,n,a),s=!0},p(o,a){a&13&&(r=ce(o[0]),H(),e=ct(e,a,l,1,o,r,i,n.parentNode,at,gb,n,fb),V())},i(o){if(!s){for(let a=0;a<r.length;a+=1)m(e[a]);s=!0}},o(o){for(let a=0;a<e.length;a+=1)g(e[a]);s=!1},d(o){o&&w(n);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function _9(t){let e,i;return e=new we({props:{slot:"start-icon",name:"edit"}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p:z,i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function b9(t){let e,i=t[5]("no_entries_created")+"",n,s,r,l;return r=new De({props:{class:"primary",disabled:!t[2].create,label:t[5]("create_new_entry"),$$slots:{"start-icon":[_9]},$$scope:{ctx:t}}}),r.$on("click",t[6]),{c(){e=I("span"),n=q(i),s=D(),T(r.$$.fragment)},m(o,a){y(o,e,a),O(e,n),y(o,s,a),S(r,o,a),l=!0},p(o,a){(!l||a&32)&&i!==(i=o[5]("no_entries_created")+"")&&W(n,i);const c={};a&4&&(c.disabled=!o[2].create),a&32&&(c.label=o[5]("create_new_entry")),a&262144&&(c.$$scope={dirty:a,ctx:o}),r.$set(c)},i(o){l||(m(r.$$.fragment,o),l=!0)},o(o){g(r.$$.fragment,o),l=!1},d(o){o&&(w(e),w(s)),E(r,o)}}}function v9(t){let e,i=t[5]("no_entries_found")+"",n;return{c(){e=I("span"),n=q(i)},m(s,r){y(s,e,r),O(e,n)},p(s,r){r&32&&i!==(i=s[5]("no_entries_found")+"")&&W(n,i)},d(s){s&&w(e)}}}function pb(t){let e,i=t[8]+"",n;return{c(){e=I("h3"),n=q(i),C(e,"class","svelte-1hh20n2")},m(s,r){y(s,e,r),O(e,n)},p(s,r){r&1&&i!==(i=s[8]+"")&&W(n,i)},d(s){s&&w(e)}}}function mb(t){let e,i;return e=new a9({props:{entry:t[12],content:t[15],locale:t[14]}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&1&&(r.entry=n[12]),s&5&&(r.content=n[15]),s&5&&(r.locale=n[14]),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function hb(t,e){let i,n,s,r=e[15]&&mb(e);return{key:t,first:null,c(){i=K(),r&&r.c(),n=K(),this.first=i},m(l,o){y(l,i,o),r&&r.m(l,o),y(l,n,o),s=!0},p(l,o){e=l,e[15]?r?(r.p(e,o),o&5&&m(r,1)):(r=mb(e),r.c(),m(r,1),r.m(n.parentNode,n)):r&&(H(),g(r,1,1,()=>{r=null}),V())},i(l){s||(m(r),s=!0)},o(l){g(r),s=!1},d(l){l&&(w(i),w(n)),r&&r.d(l)}}}function k9(t){let e=[],i=new Map,n,s,r=ce(t[9]);const l=o=>o[12].slug;for(let o=0;o<r.length;o+=1){let a=db(t,r,o),c=l(a);i.set(c,e[o]=hb(c,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();n=K()},m(o,a){for(let c=0;c<e.length;c+=1)e[c]&&e[c].m(o,a);y(o,n,a),s=!0},p(o,a){a&5&&(r=ce(o[9]),H(),e=ct(e,a,l,1,o,r,i,n.parentNode,at,hb,n,db),V())},i(o){if(!s){for(let a=0;a<r.length;a+=1)m(e[a]);s=!0}},o(o){for(let a=0;a<e.length;a+=1)g(e[a]);s=!1},d(o){o&&w(n);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function w9(t){let e,i,n,s,r=t[8]!=="*"&&pb(t);var l=t[3].type==="grid"?Za:ir;function o(a,c){return{props:{$$slots:{default:[k9]},$$scope:{ctx:a}}}}return l&&(i=Zt(l,o(t))),{c(){r&&r.c(),e=D(),i&&T(i.$$.fragment),n=D()},m(a,c){r&&r.m(a,c),y(a,e,c),i&&S(i,a,c),y(a,n,c),s=!0},p(a,c){if(a[8]!=="*"?r?r.p(a,c):(r=pb(a),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null),c&8&&l!==(l=a[3].type==="grid"?Za:ir)){if(i){H();const u=i;g(u.$$.fragment,1,0,()=>{E(u,1)}),V()}l?(i=Zt(l,o(a)),T(i.$$.fragment),m(i.$$.fragment,1),S(i,n.parentNode,n)):i=null}else if(l){const u={};c&262149&&(u.$$scope={dirty:c,ctx:a}),i.$set(u)}},i(a){s||(i&&m(i.$$.fragment,a),s=!0)},o(a){i&&g(i.$$.fragment,a),s=!1},d(a){a&&(w(e),w(n)),r&&r.d(a),i&&E(i,a)}}}function gb(t,e){let i,n,s;return n=new _n({props:{$$slots:{default:[w9]},$$scope:{ctx:e}}}),{key:t,first:null,c(){i=K(),T(n.$$.fragment),this.first=i},m(r,l){y(r,i,l),S(n,r,l),s=!0},p(r,l){e=r;const o={};l&262157&&(o.$$scope={dirty:l,ctx:e}),n.$set(o)},i(r){s||(m(n.$$.fragment,r),s=!0)},o(r){g(n.$$.fragment,r),s=!1},d(r){r&&w(i),E(n,r)}}}function y9(t){let e,i,n,s;const r=[d9,f9],l=[];function o(a,c){return a[2]?0:1}return i=o(t),n=l[i]=r[i](t),{c(){e=I("div"),n.c(),C(e,"class","list-container svelte-1hh20n2")},m(a,c){y(a,e,c),l[i].m(e,null),s=!0},p(a,[c]){let u=i;i=o(a),i===u?l[i].p(a,c):(H(),g(l[u],1,1,()=>{l[u]=null}),V(),n=l[i],n?n.p(a,c):(n=l[i]=r[i](a),n.c()),m(n,1),n.m(e,null))},i(a){s||(m(n),s=!0)},o(a){g(n),s=!1},d(a){a&&w(e),l[i].d()}}}function $9(t,e,i){let n,s,r,l,o,a;U(t,hy,u=>i(0,s=u)),U(t,Lt,u=>i(2,r=u)),U(t,zn,u=>i(3,l=u)),U(t,wl,u=>i(4,o=u)),U(t,pe,u=>i(5,a=u));const c=()=>{zt(`/collections/${r.name}/new`)};return t.$$.update=()=>{t.$$.dirty&1&&i(1,n=s.map(({entries:u})=>u).flat(1))},[s,n,r,l,o,a,c]}class _b extends J{constructor(e){super(),X(this,e,$9,y9,Z,{},c9)}}function S9(t){ve(t,"svelte-x06t7k",".list-container.svelte-x06t7k{padding:16px}")}function bb(t,e,i){const n=t.slice();return n[3]=e[i].name,n[4]=e[i].label,n}function E9(t){let e,i;return e=new Ln({props:{$$slots:{default:[O9]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&130&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function T9(t){let e,i;return e=new ir({props:{$$slots:{default:[N9]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&129&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function O9(t){let e,i=t[1]("no_files_found")+"",n;return{c(){e=I("span"),n=q(i)},m(s,r){y(s,e,r),O(e,n)},p(s,r){r&2&&i!==(i=s[1]("no_files_found")+"")&&W(n,i)},d(s){s&&w(e)}}}function A9(t){let e=t[4]+"",i;return{c(){i=q(e)},m(n,s){y(n,i,s)},p(n,s){s&1&&e!==(e=n[4]+"")&&W(i,e)},d(n){n&&w(i)}}}function L9(t){let e,i,n;return e=new Mn({props:{class:"title",$$slots:{default:[A9]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment),i=D()},m(s,r){S(e,s,r),y(s,i,r),n=!0},p(s,r){const l={};r&129&&(l.$$scope={dirty:r,ctx:s}),e.$set(l)},i(s){n||(m(e.$$.fragment,s),n=!0)},o(s){g(e.$$.fragment,s),n=!1},d(s){s&&w(i),E(e,s)}}}function vb(t,e){let i,n,s;function r(){return e[2](e[3])}return n=new vo({props:{$$slots:{default:[L9]},$$scope:{ctx:e}}}),n.$on("click",r),{key:t,first:null,c(){i=K(),T(n.$$.fragment),this.first=i},m(l,o){y(l,i,o),S(n,l,o),s=!0},p(l,o){e=l;const a={};o&129&&(a.$$scope={dirty:o,ctx:e}),n.$set(a)},i(l){s||(m(n.$$.fragment,l),s=!0)},o(l){g(n.$$.fragment,l),s=!1},d(l){l&&w(i),E(n,l)}}}function N9(t){let e=[],i=new Map,n,s,r=ce(t[0].files);const l=o=>o[3];for(let o=0;o<r.length;o+=1){let a=bb(t,r,o),c=l(a);i.set(c,e[o]=vb(c,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();n=K()},m(o,a){for(let c=0;c<e.length;c+=1)e[c]&&e[c].m(o,a);y(o,n,a),s=!0},p(o,a){a&1&&(r=ce(o[0].files),H(),e=ct(e,a,l,1,o,r,i,n.parentNode,at,vb,n,bb),V())},i(o){if(!s){for(let a=0;a<r.length;a+=1)m(e[a]);s=!0}},o(o){for(let a=0;a<e.length;a+=1)g(e[a]);s=!1},d(o){o&&w(n);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function P9(t){let e,i,n,s;const r=[T9,E9],l=[];function o(a,c){return a[0].files?.length?0:1}return i=o(t),n=l[i]=r[i](t),{c(){e=I("div"),n.c(),C(e,"class","list-container svelte-x06t7k")},m(a,c){y(a,e,c),l[i].m(e,null),s=!0},p(a,[c]){let u=i;i=o(a),i===u?l[i].p(a,c):(H(),g(l[u],1,1,()=>{l[u]=null}),V(),n=l[i],n?n.p(a,c):(n=l[i]=r[i](a),n.c()),m(n,1),n.m(e,null))},i(a){s||(m(n),s=!0)},o(a){g(n),s=!1},d(a){a&&w(e),l[i].d()}}}function I9(t,e,i){let n,s;return U(t,Lt,l=>i(0,n=l)),U(t,pe,l=>i(1,s=l)),[n,s,l=>{zt(`/collections/${n.name}/entries/${l}`)}]}class kb extends J{constructor(e){super(),X(this,e,I9,P9,Z,{},S9)}}function wb(t,e,i){const n=t.slice();return n[5]=e[i].name,n[6]=e[i].label,n[7]=e[i].icon,n[8]=e[i].hide!==void 0?e[i].hide:!1,n}function yb(t){let e,i;function n(){return t[4](t[5])}return e=new ni({props:{label:t[6]||t[5],selected:t[2].name===t[5],$$slots:{"start-icon":[C9]},$$scope:{ctx:t}}}),e.$on("click",n),{c(){T(e.$$.fragment)},m(s,r){S(e,s,r),i=!0},p(s,r){t=s;const l={};r&1&&(l.label=t[6]||t[5]),r&5&&(l.selected=t[2].name===t[5]),r&2049&&(l.$$scope={dirty:r,ctx:t}),e.$set(l)},i(s){i||(m(e.$$.fragment,s),i=!0)},o(s){g(e.$$.fragment,s),i=!1},d(s){E(e,s)}}}function C9(t){let e,i;return e=new we({props:{slot:"start-icon",name:t[7]||"edit_note"}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&1&&(r.name=n[7]||"edit_note"),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function $b(t,e){let i,n,s,r=!e[8]&&yb(e);return{key:t,first:null,c(){i=K(),r&&r.c(),n=K(),this.first=i},m(l,o){y(l,i,o),r&&r.m(l,o),y(l,n,o),s=!0},p(l,o){e=l,e[8]?r&&(H(),g(r,1,1,()=>{r=null}),V()):r?(r.p(e,o),o&1&&m(r,1)):(r=yb(e),r.c(),m(r,1),r.m(n.parentNode,n))},i(l){s||(m(r),s=!0)},o(l){g(r),s=!1},d(l){l&&(w(i),w(n)),r&&r.d(l)}}}function D9(t){let e=[],i=new Map,n,s,r=ce(t[0]);const l=o=>o[5];for(let o=0;o<r.length;o+=1){let a=wb(t,r,o),c=l(a);i.set(c,e[o]=$b(c,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();n=K()},m(o,a){for(let c=0;c<e.length;c+=1)e[c]&&e[c].m(o,a);y(o,n,a),s=!0},p(o,a){a&5&&(r=ce(o[0]),H(),e=ct(e,a,l,1,o,r,i,n.parentNode,at,$b,n,wb),V())},i(o){if(!s){for(let a=0;a<r.length;a+=1)m(e[a]);s=!0}},o(o){for(let a=0;a<e.length;a+=1)g(e[a]);s=!1},d(o){o&&w(n);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function M9(t){let e,i,n=t[1]("collections")+"",s,r,l,o;return l=new _o({props:{$$slots:{default:[D9]},$$scope:{ctx:t}}}),{c(){e=I("section"),i=I("h2"),s=q(n),r=D(),T(l.$$.fragment)},m(a,c){y(a,e,c),O(e,i),O(i,s),O(e,r),S(l,e,null),o=!0},p(a,c){(!o||c&2)&&n!==(n=a[1]("collections")+"")&&W(s,n);const u={};c&2053&&(u.$$scope={dirty:c,ctx:a}),l.$set(u)},i(a){o||(m(l.$$.fragment,a),o=!0)},o(a){g(l.$$.fragment,a),o=!1},d(a){a&&w(e),E(l)}}}function j9(t){let e,i;return e=new _n({props:{class:"primary-sidebar",$$slots:{default:[M9]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,[s]){const r={};s&2055&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function R9(t,e,i){let n,s,r,l;U(t,vt,a=>i(3,s=a)),U(t,pe,a=>i(1,r=a)),U(t,Lt,a=>i(2,l=a));const o=a=>{zt(`/collections/${a}`)};return t.$$.update=()=>{t.$$.dirty&8&&i(0,n=s.collections.filter(({hide:a})=>!a))},[n,r,l,s,o]}class F9 extends J{constructor(e){super(),X(this,e,R9,j9,Z,{})}}function U9(t){let e=t[2]("confirm_deleting_selected_entries",{values:{number:t[1].length}})+"",i;return{c(){i=q(e)},m(n,s){y(n,i,s)},p(n,s){s&6&&e!==(e=n[2]("confirm_deleting_selected_entries",{values:{number:n[1].length}})+"")&&W(i,e)},d(n){n&&w(i)}}}function x9(t){let e=t[2]("confirm_deleting_all_entries")+"",i;return{c(){i=q(e)},m(n,s){y(n,i,s)},p(n,s){s&4&&e!==(e=n[2]("confirm_deleting_all_entries")+"")&&W(i,e)},d(n){n&&w(i)}}}function z9(t){let e=t[2]("confirm_deleting_selected_entry")+"",i;return{c(){i=q(e)},m(n,s){y(n,i,s)},p(n,s){s&4&&e!==(e=n[2]("confirm_deleting_selected_entry")+"")&&W(i,e)},d(n){n&&w(i)}}}function B9(t){let e;function i(r,l){return r[1].length===1?z9:r[1].length===r[3].length?x9:U9}let n=i(t),s=n(t);return{c(){s.c(),e=K()},m(r,l){s.m(r,l),y(r,e,l)},p(r,l){n===(n=i(r))&&s?s.p(r,l):(s.d(1),s=n(r),s&&(s.c(),s.m(e.parentNode,e)))},d(r){r&&w(e),s.d(r)}}}function H9(t){let e,i,n;function s(l){t[4](l)}let r={title:t[1].length===1?t[2]("delete_entry"):t[2]("delete_entries"),okLabel:t[2]("delete"),$$slots:{default:[B9]},$$scope:{ctx:t}};return t[0]!==void 0&&(r.open=t[0]),e=new Kn({props:r}),ae.push(()=>ze(e,"open",s)),e.$on("ok",t[5]),{c(){T(e.$$.fragment)},m(l,o){S(e,l,o),n=!0},p(l,[o]){const a={};o&6&&(a.title=l[1].length===1?l[2]("delete_entry"):l[2]("delete_entries")),o&4&&(a.okLabel=l[2]("delete")),o&78&&(a.$$scope={dirty:o,ctx:l}),!i&&o&1&&(i=!0,a.open=l[0],He(()=>i=!1)),e.$set(a)},i(l){n||(m(e.$$.fragment,l),n=!0)},o(l){g(e.$$.fragment,l),n=!1},d(l){E(e,l)}}}function V9(t,e,i){let n,s,r;U(t,ws,c=>i(1,n=c)),U(t,pe,c=>i(2,s=c)),U(t,wl,c=>i(3,r=c));let{open:l=!1}=e;function o(c){l=c,i(0,l)}const a=()=>{py(n.map(({id:c})=>c))};return t.$$set=c=>{"open"in c&&i(0,l=c.open)},[l,n,s,r,o,a]}class q9 extends J{constructor(e){super(),X(this,e,V9,H9,Z,{open:0})}}function Y9(t){ve(t,"svelte-90fm2w",".description.svelte-90fm2w{flex:auto;font-size:var(--sui-font-size-small);opacity:0.8;overflow:hidden;text-overflow:ellipsis}")}function Sb(t){let e,i;return e=new cs({props:{class:"primary",$$slots:{default:[K9]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&9214&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function Eb(t){let e,i,n,s;return e=new De({props:{class:"secondary",label:t[8]("delete"),disabled:!t[9].length||!t[2],$$slots:{"start-icon":[G9]},$$scope:{ctx:t}}}),e.$on("click",t[10]),n=new De({props:{class:"primary",disabled:!t[3],label:t[8]("create"),keyShortcuts:"Accel+E",$$slots:{"start-icon":[W9]},$$scope:{ctx:t}}}),n.$on("click",t[11]),{c(){T(e.$$.fragment),i=D(),T(n.$$.fragment)},m(r,l){S(e,r,l),y(r,i,l),S(n,r,l),s=!0},p(r,l){const o={};l&256&&(o.label=r[8]("delete")),l&516&&(o.disabled=!r[9].length||!r[2]),l&8192&&(o.$$scope={dirty:l,ctx:r}),e.$set(o);const a={};l&8&&(a.disabled=!r[3]),l&256&&(a.label=r[8]("create")),l&8192&&(a.$$scope={dirty:l,ctx:r}),n.$set(a)},i(r){s||(m(e.$$.fragment,r),m(n.$$.fragment,r),s=!0)},o(r){g(e.$$.fragment,r),g(n.$$.fragment,r),s=!1},d(r){r&&w(i),E(e,r),E(n,r)}}}function G9(t){let e,i;return e=new we({props:{slot:"start-icon",name:"delete"}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p:z,i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function W9(t){let e,i;return e=new we({props:{slot:"start-icon",name:"edit"}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p:z,i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function K9(t){let e,i=(t[6]??"")+"",n,s,r,l=(t[5]??"")+"",o,a,c,u,f=!t[4]&&Eb(t);return{c(){e=I("h2"),n=q(i),s=D(),r=I("div"),o=q(l),a=D(),f&&f.c(),c=K(),C(r,"class","description svelte-90fm2w")},m(d,p){y(d,e,p),O(e,n),y(d,s,p),y(d,r,p),O(r,o),y(d,a,p),f&&f.m(d,p),y(d,c,p),u=!0},p(d,p){(!u||p&64)&&i!==(i=(d[6]??"")+"")&&W(n,i),(!u||p&32)&&l!==(l=(d[5]??"")+"")&&W(o,l),d[4]?f&&(H(),g(f,1,1,()=>{f=null}),V()):f?(f.p(d,p),p&16&&m(f,1)):(f=Eb(d),f.c(),m(f,1),f.m(c.parentNode,c))},i(d){u||(m(f),u=!0)},o(d){g(f),u=!1},d(d){d&&(w(e),w(s),w(r),w(a),w(c)),f&&f.d(d)}}}function Z9(t){let e,i,n,s,r=t[0]&&Sb(t);function l(a){t[12](a)}let o={};return t[1]!==void 0&&(o.open=t[1]),i=new q9({props:o}),ae.push(()=>ze(i,"open",l)),{c(){r&&r.c(),e=D(),T(i.$$.fragment)},m(a,c){r&&r.m(a,c),y(a,e,c),S(i,a,c),s=!0},p(a,[c]){a[0]?r?(r.p(a,c),c&1&&m(r,1)):(r=Sb(a),r.c(),m(r,1),r.m(e.parentNode,e)):r&&(H(),g(r,1,1,()=>{r=null}),V());const u={};!n&&c&2&&(n=!0,u.open=a[1],He(()=>n=!1)),i.$set(u)},i(a){s||(m(r),m(i.$$.fragment,a),s=!0)},o(a){g(r),g(i.$$.fragment,a),s=!1},d(a){a&&w(e),r&&r.d(a),E(i,a)}}}function X9(t,e,i){let n,s,r,l,o,a,c,u,f;U(t,Lt,b=>i(0,c=b)),U(t,pe,b=>i(8,u=b)),U(t,ws,b=>i(9,f=b));let d=!1;const p=()=>{i(1,d=!0)},h=()=>{zt(`/collections/${n}/new`)};function _(b){d=b,i(1,d)}return t.$$.update=()=>{t.$$.dirty&1&&i(7,{name:n,label:s,description:r,files:l,create:o=!1,delete:a=!0}=c??{},n,(i(6,s),i(0,c)),(i(5,r),i(0,c)),(i(4,l),i(0,c)),(i(3,o),i(0,c)),(i(2,a),i(0,c)))},[c,d,a,o,l,r,s,n,u,f,p,h,_]}class J9 extends J{constructor(e){super(),X(this,e,X9,Z9,Z,{},Y9)}}function Tb(t){let e,i;return e=new _n({props:{class:"secondary-sidebar",$$slots:{default:[eF]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&538&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function Q9(t){let e,i;return e=new jp({props:{assets:t[4].filter(t[6])}}),e.$on("select",t[7]),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&18&&(r.assets=n[4].filter(n[6])),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function eF(t){let e,i;return e=new Bc({props:{multiple:!0,$$slots:{default:[Q9]},$$scope:{ctx:t}}}),e.$on("select",t[8]),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&530&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function tF(t){let e=t[0].startsWith("/")&&t[2]?.showMedia,i,n,s=e&&Tb(t);return{c(){s&&s.c(),i=K()},m(r,l){s&&s.m(r,l),y(r,i,l),n=!0},p(r,[l]){l&5&&(e=r[0].startsWith("/")&&r[2]?.showMedia),e?s?(s.p(r,l),l&5&&m(s,1)):(s=Tb(r),s.c(),m(s,1),s.m(i.parentNode,i)):s&&(H(),g(s,1,1,()=>{s=null}),V())},i(r){n||(m(s),n=!0)},o(r){g(s),n=!1},d(r){r&&w(i),s&&s.d(r)}}}function nF(t,e,i){let n,s,r,l,o,a;U(t,Lt,d=>i(5,r=d)),U(t,zn,d=>i(2,l=d)),U(t,Cn,d=>i(3,o=d)),U(t,Qt,d=>i(4,a=d));const c=({folder:d})=>s===d,u=({detail:{asset:d}})=>{zt(`/assets/${d.path}`)},f=({detail:{files:d}})=>{Me(Cn,o={folder:s,files:d},o)};return t.$$.update=()=>{t.$$.dirty&32&&i(0,n=r.media_folder??""),t.$$.dirty&1&&i(1,s=Ai(n))},[n,s,l,o,a,r,c,u,f]}class iF extends J{constructor(e){super(),X(this,e,nF,tF,Z,{})}}function Ob(t,e,i){const n=t.slice();return n[9]=e[i].label,n[10]=e[i].field,n[11]=e[i].pattern,n}function sF(t){let e,i;return e=new we({props:{slot:"end-icon",name:"arrow_drop_down"}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p:z,i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function Ab(t){let e,i;function n(){return t[8](t[10],t[11])}return e=new bo({props:{label:t[9],checked:t[6].group?.field===t[10]&&t[6].group?.pattern===t[11]}}),e.$on("click",n),{c(){T(e.$$.fragment)},m(s,r){S(e,s,r),i=!0},p(s,r){t=s;const l={};r&16&&(l.label=t[9]),r&80&&(l.checked=t[6].group?.field===t[10]&&t[6].group?.pattern===t[11]),e.$set(l)},i(s){i||(m(e.$$.fragment,s),i=!0)},o(s){g(e.$$.fragment,s),i=!1},d(s){E(e,s)}}}function rF(t){let e,i,n,s;e=new bo({props:{label:t[3]||t[5]("sort_keys.none"),checked:!t[6].group}}),e.$on("click",t[7]);let r=ce(t[4]),l=[];for(let a=0;a<r.length;a+=1)l[a]=Ab(Ob(t,r,a));const o=a=>g(l[a],1,1,()=>{l[a]=null});return{c(){T(e.$$.fragment),i=D();for(let a=0;a<l.length;a+=1)l[a].c();n=K()},m(a,c){S(e,a,c),y(a,i,c);for(let u=0;u<l.length;u+=1)l[u]&&l[u].m(a,c);y(a,n,c),s=!0},p(a,c){const u={};if(c&40&&(u.label=a[3]||a[5]("sort_keys.none")),c&64&&(u.checked=!a[6].group),e.$set(u),c&84){r=ce(a[4]);let f;for(f=0;f<r.length;f+=1){const d=Ob(a,r,f);l[f]?(l[f].p(d,c),m(l[f],1)):(l[f]=Ab(d),l[f].c(),m(l[f],1),l[f].m(n.parentNode,n))}for(H(),f=r.length;f<l.length;f+=1)o(f);V()}},i(a){if(!s){m(e.$$.fragment,a);for(let c=0;c<r.length;c+=1)m(l[c]);s=!0}},o(a){g(e.$$.fragment,a),l=l.filter(Boolean);for(let c=0;c<l.length;c+=1)g(l[c]);s=!1},d(a){a&&(w(i),w(n)),E(e,a),mi(l,a)}}}function lF(t){let e,i;return e=new Ci({props:{slot:"popup",$$slots:{default:[rF]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&16508&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function oF(t){let e,i;return e=new as({props:{class:"ghost",label:t[0]||t[5]("group_by"),disabled:t[1],$$slots:{popup:[lF],"end-icon":[sF]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,[s]){const r={};s&33&&(r.label=n[0]||n[5]("group_by")),s&2&&(r.disabled=n[1]),s&16508&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function aF(t,e,i){let n,s,r=z,l=()=>(r(),r=Fn(c,h=>i(6,s=h)),c);U(t,pe,h=>i(5,n=h)),t.$$.on_destroy.push(()=>r());let{label:o=""}=e,{disabled:a=!1}=e,{currentView:c=Re({})}=e;l();let{noneLabel:u=""}=e,{groups:f=[]}=e;const d=()=>{c.update(h=>({...h,group:void 0}))},p=(h,_)=>{c.update(b=>({...b,group:{field:h,pattern:_}}))};return t.$$set=h=>{"label"in h&&i(0,o=h.label),"disabled"in h&&i(1,a=h.disabled),"currentView"in h&&l(i(2,c=h.currentView)),"noneLabel"in h&&i(3,u=h.noneLabel),"groups"in h&&i(4,f=h.groups)},[o,a,c,u,f,n,s,d,p]}class cF extends J{constructor(e){super(),X(this,e,aF,oF,Z,{label:0,disabled:1,currentView:2,noneLabel:3,groups:4})}}function Lb(t){let e,i;return e=new cs({props:{class:"secondary",$$slots:{default:[fF]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&16895&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function Nb(t){let e,i;return e=new fw({props:{disabled:!t[1],currentView:zn,filters:t[0].view_filters}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&2&&(r.disabled=!n[1]),s&1&&(r.filters=n[0].view_filters),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function Pb(t){let e,i;return e=new cF({props:{disabled:!t[1],currentView:zn,groups:t[0].view_groups}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&2&&(r.disabled=!n[1]),s&1&&(r.groups=n[0].view_groups),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function uF(t){let e,i;return e=new we({props:{slot:"start-icon",name:"photo_library",label:t[6]("show_assets")}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&64&&(r.label=n[6]("show_assets")),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function fF(t){let e,i,n,s,r,l,o,a,c,u,f,d,p,h,_,b;e=new De({props:{class:"ghost",disabled:t[5].length===t[4].length,label:t[6]("select_all")}}),e.$on("click",t[11]),n=new De({props:{class:"ghost",disabled:!t[5].length,label:t[6]("clear_selection")}}),n.$on("click",t[12]),r=new gn({props:{flex:!0}}),o=new dw({props:{disabled:!t[1]||!t[7].length,currentView:zn,fields:t[7]}});let k=t[0].view_filters?.length&&Nb(t),v=t[0].view_groups?.length&&Pb(t);return f=new mp({props:{disabled:!t[2]||!t[3],currentView:zn}}),p=new Tn({}),_=new De({props:{class:"ghost iconic",disabled:!t[2]||!t[0].media_folder,pressed:!!t[8]?.showMedia,$$slots:{"start-icon":[uF]},$$scope:{ctx:t}}}),_.$on("click",t[13]),{c(){T(e.$$.fragment),i=D(),T(n.$$.fragment),s=D(),T(r.$$.fragment),l=D(),T(o.$$.fragment),a=D(),k&&k.c(),c=D(),v&&v.c(),u=D(),T(f.$$.fragment),d=D(),T(p.$$.fragment),h=D(),T(_.$$.fragment)},m($,L){S(e,$,L),y($,i,L),S(n,$,L),y($,s,L),S(r,$,L),y($,l,L),S(o,$,L),y($,a,L),k&&k.m($,L),y($,c,L),v&&v.m($,L),y($,u,L),S(f,$,L),y($,d,L),S(p,$,L),y($,h,L),S(_,$,L),b=!0},p($,L){const A={};L&48&&(A.disabled=$[5].length===$[4].length),L&64&&(A.label=$[6]("select_all")),e.$set(A);const P={};L&32&&(P.disabled=!$[5].length),L&64&&(P.label=$[6]("clear_selection")),n.$set(P);const F={};L&130&&(F.disabled=!$[1]||!$[7].length),L&128&&(F.fields=$[7]),o.$set(F),$[0].view_filters?.length?k?(k.p($,L),L&1&&m(k,1)):(k=Nb($),k.c(),m(k,1),k.m(c.parentNode,c)):k&&(H(),g(k,1,1,()=>{k=null}),V()),$[0].view_groups?.length?v?(v.p($,L),L&1&&m(v,1)):(v=Pb($),v.c(),m(v,1),v.m(u.parentNode,u)):v&&(H(),g(v,1,1,()=>{v=null}),V());const j={};L&12&&(j.disabled=!$[2]||!$[3]),f.$set(j);const N={};L&5&&(N.disabled=!$[2]||!$[0].media_folder),L&256&&(N.pressed=!!$[8]?.showMedia),L&16448&&(N.$$scope={dirty:L,ctx:$}),_.$set(N)},i($){b||(m(e.$$.fragment,$),m(n.$$.fragment,$),m(r.$$.fragment,$),m(o.$$.fragment,$),m(k),m(v),m(f.$$.fragment,$),m(p.$$.fragment,$),m(_.$$.fragment,$),b=!0)},o($){g(e.$$.fragment,$),g(n.$$.fragment,$),g(r.$$.fragment,$),g(o.$$.fragment,$),g(k),g(v),g(f.$$.fragment,$),g(p.$$.fragment,$),g(_.$$.fragment,$),b=!1},d($){$&&(w(i),w(s),w(l),w(a),w(c),w(u),w(d),w(h)),E(e,$),E(n,$),E(r,$),E(o,$),k&&k.d($),v&&v.d($),E(f,$),E(p,$),E(_,$)}}}function dF(t){let e,i,n=t[0].folder&&Lb(t);return{c(){n&&n.c(),e=K()},m(s,r){n&&n.m(s,r),y(s,e,r),i=!0},p(s,[r]){s[0].folder?n?(n.p(s,r),r&1&&m(n,1)):(n=Lb(s),n.c(),m(n,1),n.m(e.parentNode,e)):n&&(H(),g(n,1,1,()=>{n=null}),V())},i(s){i||(m(n),i=!0)},o(s){g(n),i=!1},d(s){s&&w(e),n&&n.d(s)}}}function pF(t,e,i){let n,s,r,l,o,a,c,u,f,d,p;U(t,wl,k=>i(9,o=k)),U(t,Lt,k=>i(0,a=k)),U(t,hy,k=>i(10,c=k)),U(t,ws,k=>i(5,u=k)),U(t,pe,k=>i(6,f=k)),U(t,J7,k=>i(7,d=k)),U(t,zn,k=>i(8,p=k));const h=()=>{Me(ws,u=n,u)},_=()=>{Me(ws,u=[],u)},b=()=>{zn.update(k=>({...k,showMedia:!p?.showMedia}))};return t.$$.update=()=>{t.$$.dirty&1024&&i(4,n=c.map(({entries:k})=>k).flat(1)),t.$$.dirty&1&&i(3,s=a.fields?.find(({widget:k})=>k==="image")),t.$$.dirty&512&&i(2,r=!!o.length),t.$$.dirty&512&&i(1,l=o.length>1)},[a,l,r,s,n,u,f,d,p,o,c,h,_,b]}class mF extends J{constructor(e){super(),X(this,e,pF,dF,Z,{})}}function hF(t){let e,i;return e=new F9({props:{slot:"primary_sidebar"}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p:z,i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function gF(t){let e,i;return e=new J9({props:{slot:"primary_toolbar"}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p:z,i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function _F(t){let e,i;return e=new mF({props:{slot:"secondary_toolbar"}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p:z,i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function bF(t){let e,i,n;var s=t[0].files?kb:_b;function r(l,o){return{props:{slot:"main"}}}return s&&(e=Zt(s,r())),{c(){e&&T(e.$$.fragment),i=K()},m(l,o){e&&S(e,l,o),y(l,i,o),n=!0},p(l,o){if(o&1&&s!==(s=l[0].files?kb:_b)){if(e){H();const a=e;g(a.$$.fragment,1,0,()=>{E(a,1)}),V()}s?(e=Zt(s,r()),T(e.$$.fragment),m(e.$$.fragment,1),S(e,i.parentNode,i)):e=null}},i(l){n||(e&&m(e.$$.fragment,l),n=!0)},o(l){e&&g(e.$$.fragment,l),n=!1},d(l){l&&w(i),e&&E(e,l)}}}function vF(t){let e,i;return e=new iF({props:{slot:"secondary_sidebar"}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p:z,i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function Ib(t){let e,i;return e=new Y7({}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function kF(t){let e,i,n,s,r,l;e=new Oo({props:{class:"content",$$slots:{secondary_sidebar:[vF],main:[bF],secondary_toolbar:[_F],primary_toolbar:[gF],primary_sidebar:[hF]},$$scope:{ctx:t}}});let o=t[1]&&Ib();return{c(){T(e.$$.fragment),i=D(),o&&o.c(),n=K()},m(a,c){S(e,a,c),y(a,i,c),o&&o.m(a,c),y(a,n,c),s=!0,r||(l=je(window,"hashchange",t[3]),r=!0)},p(a,[c]){const u={};c&33&&(u.$$scope={dirty:c,ctx:a}),e.$set(u),a[1]?o?c&2&&m(o,1):(o=Ib(),o.c(),m(o,1),o.m(n.parentNode,n)):o&&(H(),g(o,1,1,()=>{o=null}),V())},i(a){s||(m(e.$$.fragment,a),m(o),s=!0)},o(a){g(e.$$.fragment,a),g(o),s=!1},d(a){a&&(w(i),w(n)),E(e,a),o&&o.d(a),r=!1,l()}}}function wF(t,e,i){let n,s,r;U(t,wl,a=>i(4,n=a)),U(t,Lt,a=>i(0,s=a)),U(t,Ke,a=>i(1,r=a));const l=()=>{const{path:a,params:c}=Eo(),u=a.match(/^\/collections\/([^/]+)(?:\/(new|entries))?(?:\/(.+?))?$/);if(!u)return;const[,f,d,p]=u,h=f?_i(f):void 0;if(h&&!h.hide&&s!==h&&Me(Lt,s=h,s),Me(Ke,r=null,r),!d)return;const{name:_,files:b,_i18n:{hasLocales:k,locales:v}}=s;if(b){if(d==="entries"&&p){const $=xd(_,p),L=b.find(A=>A.name===p);$?Zo($):L&&Zo({collectionName:_,fileName:L.name,slug:L.name,locales:Object.fromEntries((k?v:["default"]).map(A=>[A,{}]))})}}else if(d==="new"&&!p&&s.create&&Zo({collectionName:_},c),d==="entries"&&p){const $=n.find(({slug:L})=>L===p);$&&Zo($)}};return on(()=>{l()}),[s,r,l,()=>{l()}]}class yF extends J{constructor(e){super(),X(this,e,wF,kF,Z,{})}}function $F(t){ve(t,"svelte-1e8uhc8","p.svelte-1e8uhc8{margin:0 0 8px}")}function SF(t){let e,i=bn.sanitize(t[7]("prefs.languages.translator.description",{values:{service:t[3],homeHref:`href="${t[2]}"`,apiKeyHref:`href="${t[1]}"`}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})+"",n,s,r,l;return r=new Hn({props:{spellcheck:"false","aria-label":t[7]("prefs.languages.translator.field_label",{values:{service:t[3]}})}}),r.$on("input",t[10]),{c(){e=I("p"),n=D(),s=I("div"),T(r.$$.fragment),C(e,"class","svelte-1e8uhc8")},m(o,a){y(o,e,a),e.innerHTML=i,y(o,n,a),y(o,s,a),S(r,s,null),l=!0},p(o,a){(!l||a&142)&&i!==(i=bn.sanitize(o[7]("prefs.languages.translator.description",{values:{service:o[3],homeHref:`href="${o[2]}"`,apiKeyHref:`href="${o[1]}"`}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})+"")&&(e.innerHTML=i);const c={};a&136&&(c["aria-label"]=o[7]("prefs.languages.translator.field_label",{values:{service:o[3]}})),r.$set(c)},i(o){l||(m(r.$$.fragment,o),l=!0)},o(o){g(r.$$.fragment,o),l=!1},d(o){o&&(w(e),w(n),w(s)),E(r)}}}function EF(t){let e,i,n;function s(l){t[11](l)}let r={showOk:!1,$$slots:{default:[SF]},$$scope:{ctx:t}};return t[5]!==void 0&&(r.open=t[5]),e=new Kn({props:r}),ae.push(()=>ze(e,"open",s)),e.$on("cancel",t[12]),{c(){T(e.$$.fragment)},m(l,o){S(e,l,o),n=!0},p(l,[o]){const a={};o&8703&&(a.$$scope={dirty:o,ctx:l}),!i&&o&32&&(i=!0,a.open=l[5],He(()=>i=!1)),e.$set(a)},i(l){n||(m(e.$$.fragment,l),n=!0)},o(l){g(e.$$.fragment,l),n=!1},d(l){E(e,l)}}}function TF(t,e,i){let n,s,r,l,o,a,c,u,f,d;U(t,Xa,b=>i(9,a=b)),U(t,Vl,b=>i(5,c=b)),U(t,ql,b=>i(6,u=b)),U(t,pe,b=>i(7,f=b)),U(t,dt,b=>i(8,d=b));const p=b=>{const k=b.target.value.trim();o&&k.match(o)&&(Me(dt,d.apiKeys||={},d),Me(dt,d.apiKeys[n]=k,d),Me(Vl,c=!1,c),u&&(gw(...u),Me(ql,u=void 0,u)))};function h(b){c=b,Vl.set(c)}const _=()=>{Me(ql,u=void 0,u)};return t.$$.update=()=>{t.$$.dirty&512&&i(4,{serviceId:n,serviceLabel:s,developerURL:r,apiKeyURL:l,apiKeyPattern:o}=a??{},n,(i(3,s),i(9,a)),(i(2,r),i(9,a)),(i(1,l),i(9,a)),(i(0,o),i(9,a)))},[o,l,r,s,n,c,u,f,d,a,p,h,_]}class OF extends J{constructor(e){super(),X(this,e,TF,EF,Z,{},$F)}}function AF(t){ve(t,"svelte-svim08",".row.svelte-svim08.svelte-svim08{display:flex;align-items:center;gap:16px;padding:8px 0;border-top:1px solid var(--sui-secondary-border-color)}.row.svelte-svim08.svelte-svim08:last-child{border-bottom:1px solid var(--sui-secondary-border-color)}.row.svelte-svim08 .feature.svelte-svim08{flex:auto}.row.svelte-svim08 .key.svelte-svim08{display:flex;gap:8px}kbd.svelte-svim08.svelte-svim08{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 LF(t){let e,i,n=t[2]("keyboard_shortcuts.search")+"",s,r,l,o,a,c,u,f,d,p,h=t[2]("keyboard_shortcuts.create_entry")+"",_,b,k,v,$,L,A,P,F,j,N=t[2]("keyboard_shortcuts.save_entry")+"",M,R,G,Q,te,x,Y;return{c(){e=I("div"),i=I("div"),s=q(n),r=D(),l=I("div"),o=I("kbd"),a=q(t[1]),c=D(),u=I("kbd"),u.textContent="F",f=D(),d=I("div"),p=I("div"),_=q(h),b=D(),k=I("div"),v=I("kbd"),$=q(t[1]),L=D(),A=I("kbd"),A.textContent="E",P=D(),F=I("div"),j=I("div"),M=q(N),R=D(),G=I("div"),Q=I("kbd"),te=q(t[1]),x=D(),Y=I("kbd"),Y.textContent="S",C(i,"class","feature svelte-svim08"),C(o,"class","svelte-svim08"),C(u,"class","svelte-svim08"),C(l,"class","key svelte-svim08"),C(e,"class","row svelte-svim08"),C(p,"class","feature svelte-svim08"),C(v,"class","svelte-svim08"),C(A,"class","svelte-svim08"),C(k,"class","key svelte-svim08"),C(d,"class","row svelte-svim08"),C(j,"class","feature svelte-svim08"),C(Q,"class","svelte-svim08"),C(Y,"class","svelte-svim08"),C(G,"class","key svelte-svim08"),C(F,"class","row svelte-svim08")},m(ue,Fe){y(ue,e,Fe),O(e,i),O(i,s),O(e,r),O(e,l),O(l,o),O(o,a),O(l,c),O(l,u),y(ue,f,Fe),y(ue,d,Fe),O(d,p),O(p,_),O(d,b),O(d,k),O(k,v),O(v,$),O(k,L),O(k,A),y(ue,P,Fe),y(ue,F,Fe),O(F,j),O(j,M),O(F,R),O(F,G),O(G,Q),O(Q,te),O(G,x),O(G,Y)},p(ue,Fe){Fe&4&&n!==(n=ue[2]("keyboard_shortcuts.search")+"")&&W(s,n),Fe&2&&W(a,ue[1]),Fe&4&&h!==(h=ue[2]("keyboard_shortcuts.create_entry")+"")&&W(_,h),Fe&2&&W($,ue[1]),Fe&4&&N!==(N=ue[2]("keyboard_shortcuts.save_entry")+"")&&W(M,N),Fe&2&&W(te,ue[1])},d(ue){ue&&(w(e),w(f),w(d),w(P),w(F))}}}function NF(t){let e,i,n;function s(l){t[3](l)}let r={title:t[2]("help.keyboard_shortcuts"),showOk:!1,showCancel:!1,showClose:!0,$$slots:{default:[LF]},$$scope:{ctx:t}};return t[0]!==void 0&&(r.open=t[0]),e=new Kn({props:r}),ae.push(()=>ze(e,"open",s)),{c(){T(e.$$.fragment)},m(l,o){S(e,l,o),n=!0},p(l,[o]){const a={};o&4&&(a.title=l[2]("help.keyboard_shortcuts")),o&22&&(a.$$scope={dirty:o,ctx:l}),!i&&o&1&&(i=!0,a.open=l[0],He(()=>i=!1)),e.$set(a)},i(l){n||(m(e.$$.fragment,l),n=!0)},o(l){g(e.$$.fragment,l),n=!1},d(l){E(e,l)}}}function PF(t,e,i){let n;U(t,pe,o=>i(2,n=o));let{open:s=!1}=e,r="Ctrl";on(()=>{(navigator.userAgentData?.platform==="macOS"||navigator.platform.startsWith("Mac"))&&i(1,r="⌘")});function l(o){s=o,i(0,s)}return t.$$set=o=>{"open"in o&&i(0,s=o.open)},[s,r,n,l]}class IF extends J{constructor(e){super(),X(this,e,PF,NF,Z,{open:0},AF)}}function CF(t){let e,i,n=t[0]("prefs.advanced.developer_mode.title")+"",s,r,l,o=t[0]("prefs.advanced.developer_mode.description")+"",a,c,u,f,d,p;function h(b){t[2](b)}let _={label:t[0]("prefs.advanced.developer_mode.switch_label")};return t[1].devModeEnabled!==void 0&&(_.checked=t[1].devModeEnabled),f=new M0({props:_}),ae.push(()=>ze(f,"checked",h)),{c(){e=I("section"),i=I("h4"),s=q(n),r=D(),l=I("p"),a=q(o),c=D(),u=I("div"),T(f.$$.fragment)},m(b,k){y(b,e,k),O(e,i),O(i,s),O(e,r),O(e,l),O(l,a),O(e,c),O(e,u),S(f,u,null),p=!0},p(b,k){(!p||k&1)&&n!==(n=b[0]("prefs.advanced.developer_mode.title")+"")&&W(s,n),(!p||k&1)&&o!==(o=b[0]("prefs.advanced.developer_mode.description")+"")&&W(a,o);const v={};k&1&&(v.label=b[0]("prefs.advanced.developer_mode.switch_label")),!d&&k&2&&(d=!0,v.checked=b[1].devModeEnabled,He(()=>d=!1)),f.$set(v)},i(b){p||(m(f.$$.fragment,b),p=!0)},o(b){g(f.$$.fragment,b),p=!1},d(b){b&&w(e),E(f)}}}function DF(t){let e,i;return e=new mc({props:{id:"prefs-tab-advanced",$$slots:{default:[CF]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,[s]){const r={};s&11&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function MF(t,e,i){let n,s;U(t,pe,l=>i(0,n=l)),U(t,dt,l=>i(1,s=l));function r(l){t.$$.not_equal(s.devModeEnabled,l)&&(s.devModeEnabled=l,dt.set(s))}return[n,s,r]}class jF extends J{constructor(e){super(),X(this,e,MF,DF,Z,{})}}function Cb(t,e,i){const n=t.slice();return n[3]=e[i],n}function Db(t){let e,i;return e=new Xl({props:{class:"tertiary",label:t[0](`prefs.theme.${t[3]}`),value:t[3],selected:!t[1].theme&&t[3]==="auto"||t[1].theme===t[3]}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&1&&(r.label=n[0](`prefs.theme.${n[3]}`)),s&2&&(r.selected=!n[1].theme&&n[3]==="auto"||n[1].theme===n[3]),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function RF(t){let e,i,n=ce(["auto","dark","light"]),s=[];for(let l=0;l<3;l+=1)s[l]=Db(Cb(t,n,l));const r=l=>g(s[l],1,1,()=>{s[l]=null});return{c(){for(let l=0;l<3;l+=1)s[l].c();e=K()},m(l,o){for(let a=0;a<3;a+=1)s[a]&&s[a].m(l,o);y(l,e,o),i=!0},p(l,o){if(o&3){n=ce(["auto","dark","light"]);let a;for(a=0;a<3;a+=1){const c=Cb(l,n,a);s[a]?(s[a].p(c,o),m(s[a],1)):(s[a]=Db(c),s[a].c(),m(s[a],1),s[a].m(e.parentNode,e))}for(H(),a=3;a<3;a+=1)r(a);V()}},i(l){if(!i){for(let o=0;o<3;o+=1)m(s[o]);i=!0}},o(l){s=s.filter(Boolean);for(let o=0;o<3;o+=1)g(s[o]);i=!1},d(l){l&&w(e),mi(s,l)}}}function FF(t){let e,i,n=t[0]("prefs.appearance.theme")+"",s,r,l,o,a;return o=new gd({props:{$$slots:{default:[RF]},$$scope:{ctx:t}}}),o.$on("change",t[2]),{c(){e=I("section"),i=I("h4"),s=q(n),r=D(),l=I("p"),T(o.$$.fragment)},m(c,u){y(c,e,u),O(e,i),O(i,s),O(e,r),O(e,l),S(o,l,null),a=!0},p(c,u){(!a||u&1)&&n!==(n=c[0]("prefs.appearance.theme")+"")&&W(s,n);const f={};u&67&&(f.$$scope={dirty:u,ctx:c}),o.$set(f)},i(c){a||(m(o.$$.fragment,c),a=!0)},o(c){g(o.$$.fragment,c),a=!1},d(c){c&&w(e),E(o)}}}function UF(t){let e,i;return e=new mc({props:{id:"prefs-tab-appearance",$$slots:{default:[FF]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,[s]){const r={};s&67&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function xF(t,e,i){let n,s;return U(t,pe,l=>i(0,n=l)),U(t,dt,l=>i(1,s=l)),[n,s,({detail:{value:l}})=>{Me(dt,s={...s,theme:l},s)}]}class zF extends J{constructor(e){super(),X(this,e,xF,UF,Z,{})}}function Mb(t,e,i){const n=t.slice();n[7]=e[i][0],n[8]=e[i][1],n[12]=e,n[13]=i;const s=n[8];return n[9]=s.serviceLabel,n[10]=s.developerURL,n[11]=s.apiKeyURL,n}function jb(t,e,i){const n=t.slice();return n[14]=e[i],n}function Rb(t){let e,i;return e=new ni({props:{label:sr(t[14]),value:t[14],selected:t[14]===t[1]}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&8&&(r.label=sr(n[14])),s&8&&(r.value=n[14]),s&10&&(r.selected=n[14]===n[1]),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function BF(t){let e,i,n=ce(t[3]),s=[];for(let l=0;l<n.length;l+=1)s[l]=Rb(jb(t,n,l));const r=l=>g(s[l],1,1,()=>{s[l]=null});return{c(){for(let l=0;l<s.length;l+=1)s[l].c();e=K()},m(l,o){for(let a=0;a<s.length;a+=1)s[a]&&s[a].m(l,o);y(l,e,o),i=!0},p(l,o){if(o&10){n=ce(l[3]);let a;for(a=0;a<n.length;a+=1){const c=jb(l,n,a);s[a]?(s[a].p(c,o),m(s[a],1)):(s[a]=Rb(c),s[a].c(),m(s[a],1),s[a].m(e.parentNode,e))}for(H(),a=n.length;a<s.length;a+=1)r(a);V()}},i(l){if(!i){for(let o=0;o<n.length;o+=1)m(s[o]);i=!0}},o(l){s=s.filter(Boolean);for(let o=0;o<s.length;o+=1)g(s[o]);i=!1},d(l){l&&w(e),mi(s,l)}}}function Fb(t){let e,i;return e=new D0({props:{label:sr(t[1]),value:t[1],$$slots:{default:[BF]},$$scope:{ctx:t}}}),e.$on("change",t[5]),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&2&&(r.label=sr(n[1])),s&2&&(r.value=n[1]),s&131082&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function Ub(t){let e=[],i=new Map,n,s,r=ce(Object.entries(Gg));const l=o=>o[7];for(let o=0;o<r.length;o+=1){let a=Mb(t,r,o),c=l(a);i.set(c,e[o]=xb(c,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();n=K()},m(o,a){for(let c=0;c<e.length;c+=1)e[c]&&e[c].m(o,a);y(o,n,a),s=!0},p(o,a){a&5&&(r=ce(Object.entries(Gg)),H(),e=ct(e,a,l,1,o,r,i,n.parentNode,at,xb,n,Mb),V())},i(o){if(!s){for(let a=0;a<r.length;a+=1)m(e[a]);s=!0}},o(o){for(let a=0;a<e.length;a+=1)g(e[a]);s=!1},d(o){o&&w(n);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function xb(t,e){let i,n,s=e[0]("prefs.languages.translator.title",{values:{service:e[9]}})+"",r,l,o,a=bn.sanitize(e[0]("prefs.languages.translator.description",{values:{service:e[9],homeHref:`href="${e[10]}"`,apiKeyHref:`href="${e[11]}"`}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})+"",c,u,f,d,p,h;function _(k){e[6](k,e[7])}let b={spellcheck:"false","aria-label":e[0]("prefs.languages.translator.field_label",{values:{service:e[9]}})};return e[2].apiKeys[e[7]]!==void 0&&(b.value=e[2].apiKeys[e[7]]),f=new Hn({props:b}),ae.push(()=>ze(f,"value",_)),{key:t,first:null,c(){i=I("section"),n=I("h4"),r=q(s),l=D(),o=I("p"),c=D(),u=I("div"),T(f.$$.fragment),p=D(),this.first=i},m(k,v){y(k,i,v),O(i,n),O(n,r),O(i,l),O(i,o),o.innerHTML=a,O(i,c),O(i,u),S(f,u,null),O(i,p),h=!0},p(k,v){e=k,(!h||v&1)&&s!==(s=e[0]("prefs.languages.translator.title",{values:{service:e[9]}})+"")&&W(r,s),(!h||v&1)&&a!==(a=bn.sanitize(e[0]("prefs.languages.translator.description",{values:{service:e[9],homeHref:`href="${e[10]}"`,apiKeyHref:`href="${e[11]}"`}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})+"")&&(o.innerHTML=a);const $={};v&1&&($["aria-label"]=e[0]("prefs.languages.translator.field_label",{values:{service:e[9]}})),!d&&v&4&&(d=!0,$.value=e[2].apiKeys[e[7]],He(()=>d=!1)),f.$set($)},i(k){h||(m(f.$$.fragment,k),h=!0)},o(k){g(f.$$.fragment,k),h=!1},d(k){k&&w(i),E(f)}}}function HF(t){let e,i,n=t[0]("prefs.languages.ui_language.title")+"",s,r,l,o=t[1],a,c,u,f=Fb(t),d=t[4].i18n?.locales?.length>1&&Ub(t);return{c(){e=I("section"),i=I("h4"),s=q(n),r=D(),l=I("p"),f.c(),a=D(),d&&d.c(),c=K()},m(p,h){y(p,e,h),O(e,i),O(i,s),O(e,r),O(e,l),f.m(l,null),y(p,a,h),d&&d.m(p,h),y(p,c,h),u=!0},p(p,h){(!u||h&1)&&n!==(n=p[0]("prefs.languages.ui_language.title")+"")&&W(s,n),h&2&&Z(o,o=p[1])?(H(),g(f,1,1,z),V(),f=Fb(p),f.c(),m(f,1),f.m(l,null)):f.p(p,h),p[4].i18n?.locales?.length>1?d?(d.p(p,h),h&16&&m(d,1)):(d=Ub(p),d.c(),m(d,1),d.m(c.parentNode,c)):d&&(H(),g(d,1,1,()=>{d=null}),V())},i(p){u||(m(f),m(d),u=!0)},o(p){g(f),g(d),u=!1},d(p){p&&(w(e),w(a),w(c)),f.d(p),d&&d.d(p)}}}function VF(t){let e,i;return e=new mc({props:{id:"prefs-tab-languages",$$slots:{default:[HF]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,[s]){const r={};s&131103&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function qF(t,e,i){let n,s,r,l,o;U(t,pe,u=>i(0,n=u)),U(t,Vt,u=>i(1,s=u)),U(t,dt,u=>i(2,r=u)),U(t,E0,u=>i(3,l=u)),U(t,vt,u=>i(4,o=u));const a=u=>{Me(dt,r={...r,locale:u.detail.value},r)};function c(u,f){t.$$.not_equal(r.apiKeys[f],u)&&(r.apiKeys[f]=u,dt.set(r))}return[n,s,r,l,o,a,c]}class YF extends J{constructor(e){super(),X(this,e,qF,VF,Z,{})}}function zb(t,e,i){const n=t.slice();n[3]=e[i][0],n[4]=e[i][1],n[8]=e,n[9]=i;const s=n[4];return n[5]=s.serviceLabel,n[6]=s.developerURL,n[7]=s.apiKeyURL,n}function Bb(t,e){let i,n,s=e[0]("prefs.media.stock_photos.title",{values:{service:e[5]}})+"",r,l,o,a=bn.sanitize(e[0]("prefs.media.stock_photos.description",{values:{service:e[5],homeHref:`href="${e[6]}"`,apiKeyHref:`href="${e[7]}"`}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})+"",c,u,f,d,p,h;function _(k){e[2](k,e[3])}let b={spellcheck:"false","aria-label":e[0]("prefs.media.stock_photos.field_label",{values:{service:e[5]}})};return e[1].apiKeys[e[3]]!==void 0&&(b.value=e[1].apiKeys[e[3]]),f=new Hn({props:b}),ae.push(()=>ze(f,"value",_)),{key:t,first:null,c(){i=I("section"),n=I("h4"),r=q(s),l=D(),o=I("p"),c=D(),u=I("div"),T(f.$$.fragment),p=D(),this.first=i},m(k,v){y(k,i,v),O(i,n),O(n,r),O(i,l),O(i,o),o.innerHTML=a,O(i,c),O(i,u),S(f,u,null),O(i,p),h=!0},p(k,v){e=k,(!h||v&1)&&s!==(s=e[0]("prefs.media.stock_photos.title",{values:{service:e[5]}})+"")&&W(r,s),(!h||v&1)&&a!==(a=bn.sanitize(e[0]("prefs.media.stock_photos.description",{values:{service:e[5],homeHref:`href="${e[6]}"`,apiKeyHref:`href="${e[7]}"`}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})+"")&&(o.innerHTML=a);const $={};v&1&&($["aria-label"]=e[0]("prefs.media.stock_photos.field_label",{values:{service:e[5]}})),!d&&v&2&&(d=!0,$.value=e[1].apiKeys[e[3]],He(()=>d=!1)),f.$set($)},i(k){h||(m(f.$$.fragment,k),h=!0)},o(k){g(f.$$.fragment,k),h=!1},d(k){k&&w(i),E(f)}}}function GF(t){let e=[],i=new Map,n,s,r=ce(Object.entries(Ps));const l=o=>o[3];for(let o=0;o<r.length;o+=1){let a=zb(t,r,o),c=l(a);i.set(c,e[o]=Bb(c,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();n=K()},m(o,a){for(let c=0;c<e.length;c+=1)e[c]&&e[c].m(o,a);y(o,n,a),s=!0},p(o,a){a&3&&(r=ce(Object.entries(Ps)),H(),e=ct(e,a,l,1,o,r,i,n.parentNode,at,Bb,n,zb),V())},i(o){if(!s){for(let a=0;a<r.length;a+=1)m(e[a]);s=!0}},o(o){for(let a=0;a<e.length;a+=1)g(e[a]);s=!1},d(o){o&&w(n);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function WF(t){let e,i;return e=new mc({props:{id:"prefs-tab-media",$$slots:{default:[GF]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,[s]){const r={};s&1027&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function KF(t,e,i){let n,s;U(t,pe,l=>i(0,n=l)),U(t,dt,l=>i(1,s=l));function r(l,o){t.$$.not_equal(s.apiKeys[o],l)&&(s.apiKeys[o]=l,dt.set(s))}return[n,s,r]}class ZF extends J{constructor(e){super(),X(this,e,KF,WF,Z,{})}}function XF(t){ve(t,"svelte-sp2rtj",".wrapper.svelte-sp2rtj{display:flex}.wrapper.svelte-sp2rtj .tab-list{flex:none;width:160px !important}.wrapper.svelte-sp2rtj .tabpanel{flex:auto;border-width:0}.wrapper.svelte-sp2rtj .tabpanel section:not(:first-child){margin:16px 0 0}.wrapper.svelte-sp2rtj .tabpanel p{margin-top:0}.wrapper.svelte-sp2rtj .tabpanel h4{font-size:inherit}.wrapper.svelte-sp2rtj .tabpanel h4~div{margin:8px 0 0}.wrapper.svelte-sp2rtj .tabpanel h4~p{margin:8px 0 0;color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-small)}")}function JF(t){let e,i;return e=new we({props:{slot:"start-icon",name:"palette"}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p:z,i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function QF(t){let e,i;return e=new we({props:{slot:"start-icon",name:"language"}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p:z,i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function eU(t){let e,i;return e=new we({props:{slot:"start-icon",name:"photo_library"}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p:z,i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function tU(t){let e,i;return e=new we({props:{slot:"start-icon",name:"build"}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p:z,i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function nU(t){let e,i,n,s,r,l,o,a;return e=new zo({props:{label:t[1]("prefs.appearance.title"),"aria-selected":!0,"aria-controls":"prefs-tab-appearance",$$slots:{"start-icon":[JF]},$$scope:{ctx:t}}}),n=new zo({props:{label:t[1]("prefs.languages.title"),"aria-controls":"prefs-tab-languages",$$slots:{"start-icon":[QF]},$$scope:{ctx:t}}}),r=new zo({props:{label:t[1]("prefs.media.title"),"aria-controls":"prefs-tab-media",$$slots:{"start-icon":[eU]},$$scope:{ctx:t}}}),o=new zo({props:{label:t[1]("prefs.advanced.title"),"aria-controls":"prefs-tab-advanced",$$slots:{"start-icon":[tU]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment),i=D(),T(n.$$.fragment),s=D(),T(r.$$.fragment),l=D(),T(o.$$.fragment)},m(c,u){S(e,c,u),y(c,i,u),S(n,c,u),y(c,s,u),S(r,c,u),y(c,l,u),S(o,c,u),a=!0},p(c,u){const f={};u&2&&(f.label=c[1]("prefs.appearance.title")),u&8&&(f.$$scope={dirty:u,ctx:c}),e.$set(f);const d={};u&2&&(d.label=c[1]("prefs.languages.title")),u&8&&(d.$$scope={dirty:u,ctx:c}),n.$set(d);const p={};u&2&&(p.label=c[1]("prefs.media.title")),u&8&&(p.$$scope={dirty:u,ctx:c}),r.$set(p);const h={};u&2&&(h.label=c[1]("prefs.advanced.title")),u&8&&(h.$$scope={dirty:u,ctx:c}),o.$set(h)},i(c){a||(m(e.$$.fragment,c),m(n.$$.fragment,c),m(r.$$.fragment,c),m(o.$$.fragment,c),a=!0)},o(c){g(e.$$.fragment,c),g(n.$$.fragment,c),g(r.$$.fragment,c),g(o.$$.fragment,c),a=!1},d(c){c&&(w(i),w(s),w(l)),E(e,c),E(n,c),E(r,c),E(o,c)}}}function iU(t){let e,i,n,s,r,l,o,a,c,u,f;return i=new hE({props:{orientation:"vertical",$$slots:{default:[nU]},$$scope:{ctx:t}}}),s=new zF({}),l=new YF({}),a=new ZF({}),u=new jF({}),{c(){e=I("div"),T(i.$$.fragment),n=D(),T(s.$$.fragment),r=D(),T(l.$$.fragment),o=D(),T(a.$$.fragment),c=D(),T(u.$$.fragment),C(e,"class","wrapper svelte-sp2rtj")},m(d,p){y(d,e,p),S(i,e,null),O(e,n),S(s,e,null),O(e,r),S(l,e,null),O(e,o),S(a,e,null),O(e,c),S(u,e,null),f=!0},p(d,p){const h={};p&10&&(h.$$scope={dirty:p,ctx:d}),i.$set(h)},i(d){f||(m(i.$$.fragment,d),m(s.$$.fragment,d),m(l.$$.fragment,d),m(a.$$.fragment,d),m(u.$$.fragment,d),f=!0)},o(d){g(i.$$.fragment,d),g(s.$$.fragment,d),g(l.$$.fragment,d),g(a.$$.fragment,d),g(u.$$.fragment,d),f=!1},d(d){d&&w(e),E(i),E(s),E(l),E(a),E(u)}}}function sU(t){let e,i,n;function s(l){t[2](l)}let r={title:t[1]("settings"),showOk:!1,showCancel:!1,showClose:!0,$$slots:{default:[iU]},$$scope:{ctx:t}};return t[0]!==void 0&&(r.open=t[0]),e=new Kn({props:r}),ae.push(()=>ze(e,"open",s)),{c(){T(e.$$.fragment)},m(l,o){S(e,l,o),n=!0},p(l,[o]){const a={};o&2&&(a.title=l[1]("settings")),o&10&&(a.$$scope={dirty:o,ctx:l}),!i&&o&1&&(i=!0,a.open=l[0],He(()=>i=!1)),e.$set(a)},i(l){n||(m(e.$$.fragment,l),n=!0)},o(l){g(e.$$.fragment,l),n=!1},d(l){E(e,l)}}}function rU(t,e,i){let n;U(t,pe,l=>i(1,n=l));let{open:s=!1}=e;function r(l){s=l,i(0,s)}return t.$$set=l=>{"open"in l&&i(0,s=l.open)},[s,n,r]}class lU extends J{constructor(e){super(),X(this,e,rU,sU,Z,{open:0},XF)}}function oU(t){ve(t,"svelte-17d7an3",".avatar.svelte-17d7an3{width:32px;height:32px;border-radius:32px;object-fit:cover}")}function Ju(t){let e,i,n,s=[{class:"avatar svelte-17d7an3"},{loading:"lazy"},{src:i=t[4]?.avatar_url},{alt:n=t[3]("account")}],r={};for(let l=0;l<s.length;l+=1)r=ee(r,s[l]);return{c(){e=I(t[4]?.avatar_url?"img":void 0),fm(t[4]?.avatar_url?"img":void 0)(e,r)},m(l,o){y(l,e,o)},p(l,o){fm(l[4]?.avatar_url?"img":void 0)(e,r=We(s,[{class:"avatar svelte-17d7an3"},{loading:"lazy"},o&16&&!Qs(e.src,i=l[4]?.avatar_url)&&{src:i},o&8&&n!==(n=l[3]("account"))&&{alt:n}]))},d(l){l&&w(e)}}}function aU(t){let e=t[4]?.avatar_url?"img":void 0,i,n=(t[4]?.avatar_url?"img":void 0)&&Ju(t);return{c(){n&&n.c(),i=K()},m(s,r){n&&n.m(s,r),y(s,i,r)},p(s,r){s[4]?.avatar_url||void 0?e?Z(e,s[4]?.avatar_url?"img":void 0)?(n.d(1),n=Ju(s),e=s[4]?.avatar_url?"img":void 0,n.c(),n.m(i.parentNode,i)):n.p(s,r):(n=Ju(s),e=s[4]?.avatar_url?"img":void 0,n.c(),n.m(i.parentNode,i)):e&&(n.d(1),n=null,e=s[4]?.avatar_url?"img":void 0)},d(s){s&&w(i),n&&n.d(s)}}}function cU(t){let e,i;return e=new we({props:{slot:"start-icon",name:t[4]?.avatar_url?void 0:"account_circle",label:t[3]("account")}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&16&&(r.name=n[4]?.avatar_url?void 0:"account_circle"),s&8&&(r.label=n[3]("account")),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function uU(t){let e,i,n,s,r,l,o,a,c,u,f,d,p,h,_,b,k,v,$,L,A,P,F,j,N,M,R,G,Q,te;return e=new Ct({props:{label:t[2]?t[3]("working_with_local_repo"):t[3]("signed_in_as_x",{values:{name:t[4]?.login}}),disabled:t[2]}}),e.$on("click",t[7]),n=new Tn({}),r=new Ct({props:{label:t[3]("live_site")}}),r.$on("click",t[8]),o=new Ct({props:{label:t[3]("git_repository"),disabled:t[2]}}),o.$on("click",t[9]),c=new Tn({}),f=new Ct({props:{label:t[3]("settings")}}),f.$on("click",t[10]),p=new Tn({}),_=new Ct({props:{label:t[3]("help.keyboard_shortcuts")}}),_.$on("click",t[11]),k=new Ct({props:{label:t[3]("help.documentation")}}),k.$on("click",t[12]),$=new Ct({props:{label:t[3]("help.release_notes")}}),$.$on("click",t[13]),A=new Tn({}),F=new Ct({props:{label:t[3]("help.issue")}}),F.$on("click",t[14]),N=new Ct({props:{label:t[3]("help.feedback")}}),N.$on("click",t[15]),R=new Tn({}),Q=new Ct({props:{label:t[3]("sign_out")}}),Q.$on("click",t[16]),{c(){T(e.$$.fragment),i=D(),T(n.$$.fragment),s=D(),T(r.$$.fragment),l=D(),T(o.$$.fragment),a=D(),T(c.$$.fragment),u=D(),T(f.$$.fragment),d=D(),T(p.$$.fragment),h=D(),T(_.$$.fragment),b=D(),T(k.$$.fragment),v=D(),T($.$$.fragment),L=D(),T(A.$$.fragment),P=D(),T(F.$$.fragment),j=D(),T(N.$$.fragment),M=D(),T(R.$$.fragment),G=D(),T(Q.$$.fragment)},m(x,Y){S(e,x,Y),y(x,i,Y),S(n,x,Y),y(x,s,Y),S(r,x,Y),y(x,l,Y),S(o,x,Y),y(x,a,Y),S(c,x,Y),y(x,u,Y),S(f,x,Y),y(x,d,Y),S(p,x,Y),y(x,h,Y),S(_,x,Y),y(x,b,Y),S(k,x,Y),y(x,v,Y),S($,x,Y),y(x,L,Y),S(A,x,Y),y(x,P,Y),S(F,x,Y),y(x,j,Y),S(N,x,Y),y(x,M,Y),S(R,x,Y),y(x,G,Y),S(Q,x,Y),te=!0},p(x,Y){const ue={};Y&28&&(ue.label=x[2]?x[3]("working_with_local_repo"):x[3]("signed_in_as_x",{values:{name:x[4]?.login}})),Y&4&&(ue.disabled=x[2]),e.$set(ue);const Fe={};Y&8&&(Fe.label=x[3]("live_site")),r.$set(Fe);const lt={};Y&8&&(lt.label=x[3]("git_repository")),Y&4&&(lt.disabled=x[2]),o.$set(lt);const mt={};Y&8&&(mt.label=x[3]("settings")),f.$set(mt);const bt={};Y&8&&(bt.label=x[3]("help.keyboard_shortcuts")),_.$set(bt);const re={};Y&8&&(re.label=x[3]("help.documentation")),k.$set(re);const _e={};Y&8&&(_e.label=x[3]("help.release_notes")),$.$set(_e);const kn={};Y&8&&(kn.label=x[3]("help.issue")),F.$set(kn);const ht={};Y&8&&(ht.label=x[3]("help.feedback")),N.$set(ht);const qt={};Y&8&&(qt.label=x[3]("sign_out")),Q.$set(qt)},i(x){te||(m(e.$$.fragment,x),m(n.$$.fragment,x),m(r.$$.fragment,x),m(o.$$.fragment,x),m(c.$$.fragment,x),m(f.$$.fragment,x),m(p.$$.fragment,x),m(_.$$.fragment,x),m(k.$$.fragment,x),m($.$$.fragment,x),m(A.$$.fragment,x),m(F.$$.fragment,x),m(N.$$.fragment,x),m(R.$$.fragment,x),m(Q.$$.fragment,x),te=!0)},o(x){g(e.$$.fragment,x),g(n.$$.fragment,x),g(r.$$.fragment,x),g(o.$$.fragment,x),g(c.$$.fragment,x),g(f.$$.fragment,x),g(p.$$.fragment,x),g(_.$$.fragment,x),g(k.$$.fragment,x),g($.$$.fragment,x),g(A.$$.fragment,x),g(F.$$.fragment,x),g(N.$$.fragment,x),g(R.$$.fragment,x),g(Q.$$.fragment,x),te=!1},d(x){x&&(w(i),w(s),w(l),w(a),w(u),w(d),w(h),w(b),w(v),w(L),w(P),w(j),w(M),w(G)),E(e,x),E(n,x),E(r,x),E(o,x),E(c,x),E(f,x),E(p,x),E(_,x),E(k,x),E($,x),E(A,x),E(F,x),E(N,x),E(R,x),E(Q,x)}}}function fU(t){let e,i;return e=new Ci({props:{slot:"popup",$$slots:{default:[uU]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&524351&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function dU(t){let e,i,n,s,r,l,o,a;e=new as({props:{class:"ghost iconic",popupPosition:"bottom-right",$$slots:{popup:[fU],"start-icon":[cU],default:[aU]},$$scope:{ctx:t}}});function c(p){t[17](p)}let u={};t[0]!==void 0&&(u.open=t[0]),n=new lU({props:u}),ae.push(()=>ze(n,"open",c));function f(p){t[18](p)}let d={};return t[1]!==void 0&&(d.open=t[1]),l=new IF({props:d}),ae.push(()=>ze(l,"open",f)),{c(){T(e.$$.fragment),i=D(),T(n.$$.fragment),r=D(),T(l.$$.fragment)},m(p,h){S(e,p,h),y(p,i,h),S(n,p,h),y(p,r,h),S(l,p,h),a=!0},p(p,[h]){const _={};h&524351&&(_.$$scope={dirty:h,ctx:p}),e.$set(_);const b={};!s&&h&1&&(s=!0,b.open=p[0],He(()=>s=!1)),n.$set(b);const k={};!o&&h&2&&(o=!0,k.open=p[1],He(()=>o=!1)),l.$set(k)},i(p){a||(m(e.$$.fragment,p),m(n.$$.fragment,p),m(l.$$.fragment,p),a=!0)},o(p){g(e.$$.fragment,p),g(n.$$.fragment,p),g(l.$$.fragment,p),a=!1},d(p){p&&(w(i),w(r)),E(e,p),E(n,p),E(l,p)}}}function pU(t,e,i){let n,s,r,l,o;U(t,_l,P=>i(6,s=P)),U(t,pe,P=>i(3,r=P)),U(t,Pi,P=>i(4,l=P)),U(t,fi,P=>i(5,o=P));let a=!1,c=!1;const u=()=>{window.open(l?.html_url,"_blank")},f=()=>{cw()},d=()=>{window.open(o.repository.url)},p=()=>{i(0,a=!0)},h=()=>{i(1,c=!0)},_=()=>{window.open("https://github.com/sveltia/sveltia-cms/blob/main/README.md","_blank")},b=()=>{window.open("https://github.com/sveltia/sveltia-cms/releases","_blank")},k=()=>{window.open("https://github.com/sveltia/sveltia-cms/issues","_blank")},v=()=>{window.open("https://github.com/sveltia/sveltia-cms/discussions","_blank")},$=async()=>{window.requestAnimationFrame(()=>{Me(Pi,l=null,l),o.signOut()})};function L(P){a=P,i(0,a)}function A(P){c=P,i(1,c)}return t.$$.update=()=>{t.$$.dirty&64&&i(2,n=s==="local")},[a,c,n,r,l,o,s,u,f,d,p,h,_,b,k,v,$,L,A]}class mU extends J{constructor(e){super(),X(this,e,pU,dU,Z,{},oU)}}function Hb(t,e,i){const n=t.slice();n[8]=e[i];const s=n[8];return n[9]=s.name,n[10]=s.label,n[11]=s.label_singular,n[12]=s.folder,n[13]=s.hide!==void 0?s.hide:!1,n[14]=s.create!==void 0?s.create:!1,n}function hU(t){let e,i;return e=new we({props:{slot:"start-icon",name:"add",label:t[2]("create")}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&4&&(r.label=n[2]("create")),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function Vb(t){let e,i;function n(){return t[4](t[9])}return e=new Ct({props:{label:t[11]||t[10]||t[9],disabled:!t[14]}}),e.$on("click",n),{c(){T(e.$$.fragment)},m(s,r){S(e,s,r),i=!0},p(s,r){t=s;const l={};r&2&&(l.label=t[11]||t[10]||t[9]),r&2&&(l.disabled=!t[14]),e.$set(l)},i(s){i||(m(e.$$.fragment,s),i=!0)},o(s){g(e.$$.fragment,s),i=!1},d(s){E(e,s)}}}function qb(t,e){let i,n,s,r=e[12]&&!e[13]&&Vb(e);return{key:t,first:null,c(){i=K(),r&&r.c(),n=K(),this.first=i},m(l,o){y(l,i,o),r&&r.m(l,o),y(l,n,o),s=!0},p(l,o){e=l,e[12]&&!e[13]?r?(r.p(e,o),o&2&&m(r,1)):(r=Vb(e),r.c(),m(r,1),r.m(n.parentNode,n)):r&&(H(),g(r,1,1,()=>{r=null}),V())},i(l){s||(m(r),s=!0)},o(l){g(r),s=!1},d(l){l&&(w(i),w(n)),r&&r.d(l)}}}function gU(t){let e=[],i=new Map,n,s,r,l,o,a=ce(t[1].collections??[]);const c=u=>u[8].name;for(let u=0;u<a.length;u+=1){let f=Hb(t,a,u),d=c(f);i.set(d,e[u]=qb(d,f))}return s=new Tn({}),l=new Ct({props:{label:t[2]("asset")}}),l.$on("click",t[5]),{c(){for(let u=0;u<e.length;u+=1)e[u].c();n=D(),T(s.$$.fragment),r=D(),T(l.$$.fragment)},m(u,f){for(let d=0;d<e.length;d+=1)e[d]&&e[d].m(u,f);y(u,n,f),S(s,u,f),y(u,r,f),S(l,u,f),o=!0},p(u,f){f&2&&(a=ce(u[1].collections??[]),H(),e=ct(e,f,c,1,u,a,i,n.parentNode,at,qb,n,Hb),V());const d={};f&4&&(d.label=u[2]("asset")),l.$set(d)},i(u){if(!o){for(let f=0;f<a.length;f+=1)m(e[f]);m(s.$$.fragment,u),m(l.$$.fragment,u),o=!0}},o(u){for(let f=0;f<e.length;f+=1)g(e[f]);g(s.$$.fragment,u),g(l.$$.fragment,u),o=!1},d(u){u&&(w(n),w(r));for(let f=0;f<e.length;f+=1)e[f].d(u);E(s,u),E(l,u)}}}function _U(t){let e,i;return e=new Ci({props:{slot:"popup",$$slots:{default:[gU]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&131079&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function bU(t){let e,i,n,s;e=new as({props:{class:"ghost iconic",popupPosition:"bottom-right",$$slots:{popup:[_U],"start-icon":[hU]},$$scope:{ctx:t}}});let r={};return n=new dp({props:r}),t[6](n),n.$on("change",t[7]),{c(){T(e.$$.fragment),i=D(),T(n.$$.fragment)},m(l,o){S(e,l,o),y(l,i,o),S(n,l,o),s=!0},p(l,[o]){const a={};o&131079&&(a.$$scope={dirty:o,ctx:l}),e.$set(a);const c={};n.$set(c)},i(l){s||(m(e.$$.fragment,l),m(n.$$.fragment,l),s=!0)},o(l){g(e.$$.fragment,l),g(n.$$.fragment,l),s=!1},d(l){l&&w(i),E(e,l),t[6](null),E(n,l)}}}function vU(t,e,i){let n,s,r;U(t,vt,f=>i(1,n=f)),U(t,pe,f=>i(2,s=f)),U(t,Cn,f=>i(3,r=f));let l;const o=f=>{zt(`/collections/${f}/new`)},a=()=>{zt("/assets"),l.open()};function c(f){ae[f?"unshift":"push"](()=>{l=f,i(0,l)})}return[l,n,s,r,o,a,c,({target:f})=>{Me(Cn,r={folder:n.media_folder,files:[...f.files]},r)}]}class kU extends J{constructor(e){super(),X(this,e,vU,bU,Z,{})}}function wU(t){let e,i;return e=new we({props:{slot:"start-icon",name:"notifications",label:t[0]("notifications")}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&1&&(r.label=n[0]("notifications")),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function yU(t){let e,i;return e=new De({props:{class:"ghost iconic",hidden:!0,$$slots:{"start-icon":[wU]},$$scope:{ctx:t}}}),e.$on("click",$U),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,[s]){const r={};s&3&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}const $U=()=>{};function SU(t,e,i){let n;return U(t,pe,s=>i(0,n=s)),[n]}class EU extends J{constructor(e){super(),X(this,e,SU,yU,Z,{})}}function TU(t){let e,i;return e=new we({props:{slot:"start-icon",name:"library_books",label:t[2]("entries")}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&4&&(r.label=n[2]("entries")),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function OU(t){let e,i;return e=new we({props:{slot:"start-icon",name:"photo_library",label:t[2]("assets")}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&4&&(r.label=n[2]("assets")),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function AU(t){let e,i;return e=new we({props:{slot:"start-icon",name:"rebase_edit",label:t[2]("editorial_workflow")}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&4&&(r.label=n[2]("editorial_workflow")),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function LU(t){let e,i;return e=new we({props:{slot:"start-icon",name:"settings",label:t[2]("site_config")}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&4&&(r.label=n[2]("site_config")),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function NU(t){let e,i,n,s,r,l,o,a;return e=new De({props:{class:"ghost iconic",pressed:t[0]==="collections",$$slots:{"start-icon":[TU]},$$scope:{ctx:t}}}),e.$on("click",t[4]),n=new De({props:{class:"ghost iconic",pressed:t[0]==="assets",$$slots:{"start-icon":[OU]},$$scope:{ctx:t}}}),n.$on("click",t[5]),r=new De({props:{class:"ghost iconic",hidden:!0,pressed:t[0]==="workflow",$$slots:{"start-icon":[AU]},$$scope:{ctx:t}}}),r.$on("click",t[6]),o=new De({props:{class:"ghost iconic",hidden:!0,pressed:t[0]==="config",$$slots:{"start-icon":[LU]},$$scope:{ctx:t}}}),o.$on("click",t[7]),{c(){T(e.$$.fragment),i=D(),T(n.$$.fragment),s=D(),T(r.$$.fragment),l=D(),T(o.$$.fragment)},m(c,u){S(e,c,u),y(c,i,u),S(n,c,u),y(c,s,u),S(r,c,u),y(c,l,u),S(o,c,u),a=!0},p(c,[u]){const f={};u&1&&(f.pressed=c[0]==="collections"),u&260&&(f.$$scope={dirty:u,ctx:c}),e.$set(f);const d={};u&1&&(d.pressed=c[0]==="assets"),u&260&&(d.$$scope={dirty:u,ctx:c}),n.$set(d);const p={};u&1&&(p.pressed=c[0]==="workflow"),u&260&&(p.$$scope={dirty:u,ctx:c}),r.$set(p);const h={};u&1&&(h.pressed=c[0]==="config"),u&260&&(h.$$scope={dirty:u,ctx:c}),o.$set(h)},i(c){a||(m(e.$$.fragment,c),m(n.$$.fragment,c),m(r.$$.fragment,c),m(o.$$.fragment,c),a=!0)},o(c){g(e.$$.fragment,c),g(n.$$.fragment,c),g(r.$$.fragment,c),g(o.$$.fragment,c),a=!1},d(c){c&&(w(i),w(s),w(l)),E(e,c),E(n,c),E(r,c),E(o,c)}}}function PU(t,e,i){let n,s,r,l;return U(t,da,f=>i(0,n=f)),U(t,Lt,f=>i(1,s=f)),U(t,pe,f=>i(2,r=f)),U(t,ai,f=>i(3,l=f)),[n,s,r,l,()=>{zt(`/collections/${s.name}`)},()=>{zt(l?`/assets/${l}`:"/assets")},()=>{zt("/workflow")},()=>{zt("/config")}]}class IU extends J{constructor(e){super(),X(this,e,PU,NU,Z,{})}}const fo=Re(""),CU=vn([ei,Qt,fo],([t,e,i],n)=>{const s=t?.length&&i?t.filter(l=>Object.values(Zn(l)).some(o=>typeof o=="string"&&o.toLowerCase().includes(i.toLowerCase()))):[],r=e?.length&&i?e.filter(l=>l.name.toLowerCase().includes(i.toLowerCase())):[];n({entries:s,assets:r})});function DU(t){ve(t,"svelte-38ttcj",".wrapper.svelte-38ttcj{display:contents}")}function MU(t){let e,i,n,s,r={keyShortcuts:"Accel+F","aria-label":t[2]("search_placeholder")};return i=new F0({props:r}),t[5](i),i.$on("input",t[6]),{c(){e=I("div"),n=I("div"),T(i.$$.fragment),dn(n,"display","contents"),dn(n,"--sui-textbox-label-align","center"),C(e,"class","wrapper svelte-38ttcj")},m(l,o){y(l,e,o),O(e,n),S(i,n,null),t[7](e),s=!0},p(l,[o]){const a={};o&4&&(a["aria-label"]=l[2]("search_placeholder")),i.$set(a)},i(l){s||(m(i.$$.fragment,l),s=!0)},o(l){g(i.$$.fragment,l),s=!1},d(l){l&&w(e),t[5](null),E(i),t[7](null)}}}function jU(t,e,i){let n,s,r;U(t,fo,d=>i(4,n=d)),U(t,Lt,d=>i(8,s=d)),U(t,pe,d=>i(2,r=d));const l=d=>{const p=!!n,{path:h}=Eo(),_=h.startsWith("/search/");Me(fo,n=d,n),d?zt(`/search/${d}`,{replaceState:_}):p&&_&&Yr(`/collections/${s.name}`)};let o,a;function c(d){ae[d?"unshift":"push"](()=>{a=d,i(0,a),i(4,n)})}const u=({target:d})=>{l(d.value.trim())};function f(d){ae[d?"unshift":"push"](()=>{o=d,i(1,o)})}return t.$$.update=()=>{t.$$.dirty&17&&a&&n!==a?.value&&i(0,a.value=n,a)},[a,o,r,l,n,c,u,f]}class RU extends J{constructor(e){super(),X(this,e,jU,MU,Z,{},DU)}}function FU(t){ve(t,"svelte-14sy0eb","img.svelte-14sy0eb{width:24px;height:24px;object-fit:contain}")}function Yb(t){let e,i;return e=new De({props:{class:"ghost iconic","aria-label":t[1]("live_site"),$$slots:{default:[UU]},$$scope:{ctx:t}}}),e.$on("click",t[2]),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&2&&(r["aria-label"]=n[1]("live_site")),s&9&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function UU(t){let e,i;return{c(){e=I("img"),C(e,"loading","lazy"),Qs(e.src,i=t[0].logo_url)||C(e,"src",i),C(e,"alt",""),C(e,"class","logo svelte-14sy0eb")},m(n,s){y(n,e,s)},p(n,s){s&1&&!Qs(e.src,i=n[0].logo_url)&&C(e,"src",i)},d(n){n&&w(e)}}}function xU(t){let e,i,n=t[0]?.logo_url&&Yb(t);return{c(){n&&n.c(),e=K()},m(s,r){n&&n.m(s,r),y(s,e,r),i=!0},p(s,[r]){s[0]?.logo_url?n?(n.p(s,r),r&1&&m(n,1)):(n=Yb(s),n.c(),m(n,1),n.m(e.parentNode,e)):n&&(H(),g(n,1,1,()=>{n=null}),V())},i(s){i||(m(n),i=!0)},o(s){g(n),i=!1},d(s){s&&w(e),n&&n.d(s)}}}function zU(t,e,i){let n,s;return U(t,vt,l=>i(0,n=l)),U(t,pe,l=>i(1,s=l)),[n,s,()=>{cw()}]}class BU extends J{constructor(e){super(),X(this,e,zU,xU,Z,{},FU)}}function HU(t){ve(t,"svelte-zkeoqb",".toolbar-wrapper.svelte-zkeoqb{display:contents}.toolbar-wrapper[hidden].svelte-zkeoqb{display:none}.toolbar-wrapper.svelte-zkeoqb>.toolbar{--toolbar-size:48px;border-width:0 0 1px 0 !important;border-color:var(--sui-primary-border-color) !important;background-color:var(--sui-tertiary-background-color)}.toolbar-wrapper.svelte-zkeoqb>.toolbar .search-bar{width:640px}")}function VU(t){let e,i,n,s,r,l,o,a,c,u,f,d,p,h,_,b;return e=new BU({}),n=new IU({}),r=new gn({props:{flex:!0}}),o=new RU({}),c=new gn({props:{flex:!0}}),f=new kU({}),p=new EU({}),_=new mU({}),{c(){T(e.$$.fragment),i=D(),T(n.$$.fragment),s=D(),T(r.$$.fragment),l=D(),T(o.$$.fragment),a=D(),T(c.$$.fragment),u=D(),T(f.$$.fragment),d=D(),T(p.$$.fragment),h=D(),T(_.$$.fragment)},m(k,v){S(e,k,v),y(k,i,v),S(n,k,v),y(k,s,v),S(r,k,v),y(k,l,v),S(o,k,v),y(k,a,v),S(c,k,v),y(k,u,v),S(f,k,v),y(k,d,v),S(p,k,v),y(k,h,v),S(_,k,v),b=!0},p:z,i(k){b||(m(e.$$.fragment,k),m(n.$$.fragment,k),m(r.$$.fragment,k),m(o.$$.fragment,k),m(c.$$.fragment,k),m(f.$$.fragment,k),m(p.$$.fragment,k),m(_.$$.fragment,k),b=!0)},o(k){g(e.$$.fragment,k),g(n.$$.fragment,k),g(r.$$.fragment,k),g(o.$$.fragment,k),g(c.$$.fragment,k),g(f.$$.fragment,k),g(p.$$.fragment,k),g(_.$$.fragment,k),b=!1},d(k){k&&(w(i),w(s),w(l),w(a),w(u),w(d),w(h)),E(e,k),E(n,k),E(r,k),E(o,k),E(c,k),E(f,k),E(p,k),E(_,k)}}}function qU(t){let e,i,n,s;return i=new cs({props:{$$slots:{default:[VU]},$$scope:{ctx:t}}}),{c(){e=I("div"),T(i.$$.fragment),C(e,"class","toolbar-wrapper svelte-zkeoqb"),e.hidden=n=t[0]?!0:void 0},m(r,l){y(r,e,l),S(i,e,null),s=!0},p(r,[l]){const o={};l&2&&(o.$$scope={dirty:l,ctx:r}),i.$set(o),(!s||l&1&&n!==(n=r[0]?!0:void 0))&&(e.hidden=n)},i(r){s||(m(i.$$.fragment,r),s=!0)},o(r){g(i.$$.fragment,r),s=!1},d(r){r&&w(e),E(i)}}}function YU(t,e,i){let n;return U(t,Ke,s=>i(0,n=s)),[n]}class GU extends J{constructor(e){super(),X(this,e,YU,qU,Z,{},HU)}}function WU(t){ve(t,"svelte-16e6z3k",".results.svelte-16e6z3k.svelte-16e6z3k.svelte-16e6z3k{flex:auto;display:flex;gap:16px;overflow:hidden;padding:16px;height:100%}.results.svelte-16e6z3k>.group{flex:auto;display:flex;flex-direction:column;overflow:hidden;width:50%;height:100%}.results.svelte-16e6z3k h3.svelte-16e6z3k.svelte-16e6z3k{flex:none;margin:0 0 8px;color:var(--sui-secondary-foreground-color)}.results.svelte-16e6z3k h3.svelte-16e6z3k+div.svelte-16e6z3k{overflow:auto;flex:auto}")}function Gb(t,e,i){const n=t.slice();n[6]=e[i];const s=n[6];return n[7]=s.path,n[8]=s.name,n[9]=s.folder,n[10]=s.kind,n}function Wb(t,e,i){const n=t.slice();n[13]=e[i];const s=n[13];n[14]=s.slug,n[15]=s.locales,n[16]=s.fileName,n[17]=s.collectionName;const r=_i(n[17]);n[18]=r;const l=n[16]?n[18].files.find(function(...f){return t[4](n[16],...f)}):void 0;n[19]=l;const o=n[18]._i18n;n[20]=o.defaultLocale!==void 0?o.defaultLocale:"default";const a=n[20]in n[15]?n[20]:Object.keys(n[15])[0];n[21]=a;const c=n[15][n[21]]??{};return n[22]=c.content,n}function Qu(t){const e=t.slice(),i=e[18].fields?.find(({widget:n})=>n==="image");return e[25]=i,e}function KU(t){let e=t[0]("no_entries_found")+"",i;return{c(){i=q(e)},m(n,s){y(n,i,s)},p(n,s){s&1&&e!==(e=n[0]("no_entries_found")+"")&&W(i,e)},i:z,o:z,d(n){n&&w(i)}}}function ZU(t){let e,i;return e=new ir({props:{$$slots:{default:[lx]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&134217730&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function Kb(t){let e,i;function n(){return t[3](t[17],t[16],t[14])}return e=new vo({props:{$$slots:{default:[rx]},$$scope:{ctx:t}}}),e.$on("click",n),{c(){T(e.$$.fragment)},m(s,r){S(e,s,r),i=!0},p(s,r){t=s;const l={};r&134217730&&(l.$$scope={dirty:r,ctx:t}),e.$set(l)},i(s){i||(m(e.$$.fragment,s),i=!0)},o(s){g(e.$$.fragment,s),i=!1},d(s){E(e,s)}}}function Zb(t){let e,i,n,s={ctx:t,current:null,token:null,hasCatch:!1,pending:QU,then:JU,catch:XU,value:26,blocks:[,,,]};return Ts(i=ss(t[22][t[25]?.name],t[13]),s),{c(){e=K(),s.block.c()},m(r,l){y(r,e,l),s.block.m(r,s.anchor=l),s.mount=()=>e.parentNode,s.anchor=e,n=!0},p(r,l){t=r,s.ctx=t,l&2&&i!==(i=ss(t[22][t[25]?.name],t[13]))&&Ts(i,s)||cc(s,t,l)},i(r){n||(m(s.block),n=!0)},o(r){for(let l=0;l<3;l+=1){const o=s.blocks[l];g(o)}n=!1},d(r){r&&w(e),s.block.d(r),s.token=null,s=null}}}function XU(t){return{c:z,m:z,p:z,i:z,o:z,d:z}}function JU(t){let e,i;return e=new bi({props:{src:t[26],cover:!0}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&2&&(r.src=n[26]),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function QU(t){return{c:z,m:z,p:z,i:z,o:z,d:z}}function ex(t){let e,i,n=!t[19]&&Zb(Qu(t));return{c(){n&&n.c(),e=K()},m(s,r){n&&n.m(s,r),y(s,e,r),i=!0},p(s,r){s[19]?n&&(H(),g(n,1,1,()=>{n=null}),V()):n?(n.p(Qu(s),r),r&2&&m(n,1)):(n=Zb(Qu(s)),n.c(),m(n,1),n.m(e.parentNode,e))},i(s){i||(m(n),i=!0)},o(s){g(n),i=!1},d(s){s&&w(e),n&&n.d(s)}}}function tx(t){let e=(t[18].label||t[18].name)+"",i;return{c(){i=q(e)},m(n,s){y(n,i,s)},p(n,s){s&2&&e!==(e=(n[18].label||n[18].name)+"")&&W(i,e)},d(n){n&&w(i)}}}function nx(t){let e=(t[22][t[18].identifier_field]||t[22].title||t[22].name||t[22].label)+"",i;return{c(){i=q(e)},m(n,s){y(n,i,s)},p(n,s){s&2&&e!==(e=(n[22][n[18].identifier_field]||n[22].title||n[22].name||n[22].label)+"")&&W(i,e)},d(n){n&&w(i)}}}function ix(t){let e=t[19].label+"",i;return{c(){i=q(e)},m(n,s){y(n,i,s)},p(n,s){s&2&&e!==(e=n[19].label+"")&&W(i,e)},d(n){n&&w(i)}}}function sx(t){let e;function i(r,l){return r[19]?ix:nx}let n=i(t),s=n(t);return{c(){s.c(),e=K()},m(r,l){s.m(r,l),y(r,e,l)},p(r,l){n===(n=i(r))&&s?s.p(r,l):(s.d(1),s=n(r),s&&(s.c(),s.m(e.parentNode,e)))},d(r){r&&w(e),s.d(r)}}}function rx(t){let e,i,n,s,r,l,o;return e=new Mn({props:{class:"image",$$slots:{default:[ex]},$$scope:{ctx:t}}}),n=new Mn({props:{class:"collection",$$slots:{default:[tx]},$$scope:{ctx:t}}}),r=new Mn({props:{class:"title",$$slots:{default:[sx]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment),i=D(),T(n.$$.fragment),s=D(),T(r.$$.fragment),l=D()},m(a,c){S(e,a,c),y(a,i,c),S(n,a,c),y(a,s,c),S(r,a,c),y(a,l,c),o=!0},p(a,c){const u={};c&134217730&&(u.$$scope={dirty:c,ctx:a}),e.$set(u);const f={};c&134217730&&(f.$$scope={dirty:c,ctx:a}),n.$set(f);const d={};c&134217730&&(d.$$scope={dirty:c,ctx:a}),r.$set(d)},i(a){o||(m(e.$$.fragment,a),m(n.$$.fragment,a),m(r.$$.fragment,a),o=!0)},o(a){g(e.$$.fragment,a),g(n.$$.fragment,a),g(r.$$.fragment,a),o=!1},d(a){a&&(w(i),w(s),w(l)),E(e,a),E(n,a),E(r,a)}}}function Xb(t,e){let i,n,s,r=e[22]&&Kb(e);return{key:t,first:null,c(){i=K(),r&&r.c(),n=K(),this.first=i},m(l,o){y(l,i,o),r&&r.m(l,o),y(l,n,o),s=!0},p(l,o){e=l,e[22]?r?(r.p(e,o),o&2&&m(r,1)):(r=Kb(e),r.c(),m(r,1),r.m(n.parentNode,n)):r&&(H(),g(r,1,1,()=>{r=null}),V())},i(l){s||(m(r),s=!0)},o(l){g(r),s=!1},d(l){l&&(w(i),w(n)),r&&r.d(l)}}}function lx(t){let e=[],i=new Map,n,s,r=ce(t[1].entries);const l=o=>o[13].id;for(let o=0;o<r.length;o+=1){let a=Wb(t,r,o),c=l(a);i.set(c,e[o]=Xb(c,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();n=K()},m(o,a){for(let c=0;c<e.length;c+=1)e[c]&&e[c].m(o,a);y(o,n,a),s=!0},p(o,a){a&2&&(r=ce(o[1].entries),H(),e=ct(e,a,l,1,o,r,i,n.parentNode,at,Xb,n,Wb),V())},i(o){if(!s){for(let a=0;a<r.length;a+=1)m(e[a]);s=!0}},o(o){for(let a=0;a<e.length;a+=1)g(e[a]);s=!1},d(o){o&&w(n);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function ox(t){let e,i=t[0]("entries")+"",n,s,r,l,o,a;const c=[ZU,KU],u=[];function f(d,p){return d[1]?.entries?.length?0:1}return l=f(t),o=u[l]=c[l](t),{c(){e=I("h3"),n=q(i),s=D(),r=I("div"),o.c(),C(e,"id","search-results-entries"),C(e,"class","svelte-16e6z3k"),C(r,"class","svelte-16e6z3k")},m(d,p){y(d,e,p),O(e,n),y(d,s,p),y(d,r,p),u[l].m(r,null),a=!0},p(d,p){(!a||p&1)&&i!==(i=d[0]("entries")+"")&&W(n,i);let h=l;l=f(d),l===h?u[l].p(d,p):(H(),g(u[h],1,1,()=>{u[h]=null}),V(),o=u[l],o?o.p(d,p):(o=u[l]=c[l](d),o.c()),m(o,1),o.m(r,null))},i(d){a||(m(o),a=!0)},o(d){g(o),a=!1},d(d){d&&(w(e),w(s),w(r)),u[l].d()}}}function ax(t){let e=t[0]("no_files_found")+"",i;return{c(){i=q(e)},m(n,s){y(n,i,s)},p(n,s){s&1&&e!==(e=n[0]("no_files_found")+"")&&W(i,e)},i:z,o:z,d(n){n&&w(i)}}}function cx(t){let e,i;return e=new ir({props:{$$slots:{default:[mx]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&134217734&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function Jb(t){let e,i;return e=new bi({props:{asset:t[6],checkerboard:!0,cover:!0}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&2&&(r.asset=n[6]),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function Qb(t){let e,i;return e=new bl({props:{asset:t[6],cover:!0}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&2&&(r.asset=n[6]),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function ux(t){let e,i,n,s=t[10]==="image"&&Jb(t),r=t[10]==="video"&&Qb(t);return{c(){s&&s.c(),e=D(),r&&r.c(),i=K()},m(l,o){s&&s.m(l,o),y(l,e,o),r&&r.m(l,o),y(l,i,o),n=!0},p(l,o){l[10]==="image"?s?(s.p(l,o),o&2&&m(s,1)):(s=Jb(l),s.c(),m(s,1),s.m(e.parentNode,e)):s&&(H(),g(s,1,1,()=>{s=null}),V()),l[10]==="video"?r?(r.p(l,o),o&2&&m(r,1)):(r=Qb(l),r.c(),m(r,1),r.m(i.parentNode,i)):r&&(H(),g(r,1,1,()=>{r=null}),V())},i(l){n||(m(s),m(r),n=!0)},o(l){g(s),g(r),n=!1},d(l){l&&(w(e),w(i)),s&&s.d(l),r&&r.d(l)}}}function fx(t){let e=(t[2]?Wa(t[9]):"")+"",i;return{c(){i=q(e)},m(n,s){y(n,i,s)},p(n,s){s&6&&e!==(e=(n[2]?Wa(n[9]):"")+"")&&W(i,e)},d(n){n&&w(i)}}}function dx(t){let e=t[8]+"",i;return{c(){i=q(e)},m(n,s){y(n,i,s)},p(n,s){s&2&&e!==(e=n[8]+"")&&W(i,e)},d(n){n&&w(i)}}}function px(t){let e,i,n,s,r,l,o;return e=new Mn({props:{class:"image",$$slots:{default:[ux]},$$scope:{ctx:t}}}),n=new Mn({props:{class:"collection",$$slots:{default:[fx]},$$scope:{ctx:t}}}),r=new Mn({props:{class:"title",$$slots:{default:[dx]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment),i=D(),T(n.$$.fragment),s=D(),T(r.$$.fragment),l=D()},m(a,c){S(e,a,c),y(a,i,c),S(n,a,c),y(a,s,c),S(r,a,c),y(a,l,c),o=!0},p(a,c){const u={};c&134217730&&(u.$$scope={dirty:c,ctx:a}),e.$set(u);const f={};c&134217734&&(f.$$scope={dirty:c,ctx:a}),n.$set(f);const d={};c&134217730&&(d.$$scope={dirty:c,ctx:a}),r.$set(d)},i(a){o||(m(e.$$.fragment,a),m(n.$$.fragment,a),m(r.$$.fragment,a),o=!0)},o(a){g(e.$$.fragment,a),g(n.$$.fragment,a),g(r.$$.fragment,a),o=!1},d(a){a&&(w(i),w(s),w(l)),E(e,a),E(n,a),E(r,a)}}}function e0(t,e){let i,n,s;function r(){return e[5](e[7])}return n=new vo({props:{$$slots:{default:[px]},$$scope:{ctx:e}}}),n.$on("click",r),{key:t,first:null,c(){i=K(),T(n.$$.fragment),this.first=i},m(l,o){y(l,i,o),S(n,l,o),s=!0},p(l,o){e=l;const a={};o&134217734&&(a.$$scope={dirty:o,ctx:e}),n.$set(a)},i(l){s||(m(n.$$.fragment,l),s=!0)},o(l){g(n.$$.fragment,l),s=!1},d(l){l&&w(i),E(n,l)}}}function mx(t){let e=[],i=new Map,n,s,r=ce(t[1].assets);const l=o=>o[6].path;for(let o=0;o<r.length;o+=1){let a=Gb(t,r,o),c=l(a);i.set(c,e[o]=e0(c,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();n=K()},m(o,a){for(let c=0;c<e.length;c+=1)e[c]&&e[c].m(o,a);y(o,n,a),s=!0},p(o,a){a&6&&(r=ce(o[1].assets),H(),e=ct(e,a,l,1,o,r,i,n.parentNode,at,e0,n,Gb),V())},i(o){if(!s){for(let a=0;a<r.length;a+=1)m(e[a]);s=!0}},o(o){for(let a=0;a<e.length;a+=1)g(e[a]);s=!1},d(o){o&&w(n);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function hx(t){let e,i=t[0]("assets")+"",n,s,r,l,o,a;const c=[cx,ax],u=[];function f(d,p){return d[1]?.assets?.length?0:1}return l=f(t),o=u[l]=c[l](t),{c(){e=I("h3"),n=q(i),s=D(),r=I("div"),o.c(),C(e,"id","search-results-assets"),C(e,"class","svelte-16e6z3k"),C(r,"class","svelte-16e6z3k")},m(d,p){y(d,e,p),O(e,n),y(d,s,p),y(d,r,p),u[l].m(r,null),a=!0},p(d,p){(!a||p&1)&&i!==(i=d[0]("assets")+"")&&W(n,i);let h=l;l=f(d),l===h?u[l].p(d,p):(H(),g(u[h],1,1,()=>{u[h]=null}),V(),o=u[l],o?o.p(d,p):(o=u[l]=c[l](d),o.c()),m(o,1),o.m(r,null))},i(d){a||(m(o),a=!0)},o(d){g(o),a=!1},d(d){d&&(w(e),w(s),w(r)),u[l].d()}}}function gx(t){let e,i,n,s,r;return i=new _n({props:{"aria-labelledby":"search-results-entries",$$slots:{default:[ox]},$$scope:{ctx:t}}}),s=new _n({props:{"aria-labelledby":"search-results-assets",$$slots:{default:[hx]},$$scope:{ctx:t}}}),{c(){e=I("div"),T(i.$$.fragment),n=D(),T(s.$$.fragment),C(e,"class","results svelte-16e6z3k")},m(l,o){y(l,e,o),S(i,e,null),O(e,n),S(s,e,null),r=!0},p(l,[o]){const a={};o&134217731&&(a.$$scope={dirty:o,ctx:l}),i.$set(a);const c={};o&134217735&&(c.$$scope={dirty:o,ctx:l}),s.$set(c)},i(l){r||(m(i.$$.fragment,l),m(s.$$.fragment,l),r=!0)},o(l){g(i.$$.fragment,l),g(s.$$.fragment,l),r=!1},d(l){l&&w(e),E(i),E(s)}}}function _x(t,e,i){let n,s,r;return U(t,pe,c=>i(0,n=c)),U(t,CU,c=>i(1,s=c)),U(t,Vt,c=>i(2,r=c)),[n,s,r,(c,u,f)=>{zt(`/collections/${c}/entries/${u||f}`)},(c,{name:u})=>u===c,c=>{zt(`/assets/${c}`)}]}class bx extends J{constructor(e){super(),X(this,e,_x,gx,Z,{},WU)}}function vx(t){let e,i=t[1]("search_results_for_x",{values:{terms:t[0]}})+"",n;return{c(){e=I("h2"),n=q(i)},m(s,r){y(s,e,r),O(e,n)},p(s,r){r&3&&i!==(i=s[1]("search_results_for_x",{values:{terms:s[0]}})+"")&&W(n,i)},d(s){s&&w(e)}}}function kx(t){let e,i;return e=new cs({props:{class:"primary",slot:"primary_toolbar",$$slots:{default:[vx]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,s){const r={};s&19&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function wx(t){let e,i;return e=new bx({props:{slot:"main"}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p:z,i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function yx(t){let e,i,n,s;return e=new Oo({props:{class:"content",$$slots:{main:[wx],primary_toolbar:[kx]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(r,l){S(e,r,l),i=!0,n||(s=je(window,"hashchange",t[3]),n=!0)},p(r,[l]){const o={};l&19&&(o.$$scope={dirty:l,ctx:r}),e.$set(o)},i(r){i||(m(e.$$.fragment,r),i=!0)},o(r){g(e.$$.fragment,r),i=!1},d(r){E(e,r),n=!1,s()}}}function $x(t,e,i){let n,s;U(t,fo,o=>i(0,n=o)),U(t,pe,o=>i(1,s=o));const r=()=>{const{path:o}=Eo(),[,a]=o.match(/^\/search\/(.+)$/)??[];a&&a!==n&&Me(fo,n=a,n)};return on(()=>{r()}),[n,s,r,()=>{r()}]}class Sx extends J{constructor(e){super(),X(this,e,$x,yx,Z,{})}}function Ex(t){ve(t,"svelte-h66xcq",".columns.svelte-h66xcq.svelte-h66xcq{flex:auto;display:flex}.columns.svelte-h66xcq .column.svelte-h66xcq{flex:auto;width:33.3333333333%}.columns.svelte-h66xcq .column.svelte-h66xcq:not(:last-child){border-width:0 1px 0 0;border-color:var(--sui-primary-border-color)}.columns.svelte-h66xcq .column header.svelte-h66xcq{display:flex;align-items:center;border-width:0 0 1px 0;border-color:var(--sui-primary-border-color);padding:0 16px;height:40px;background-color:var(--sui-tertiary-background-color)}")}function Tx(t){let e,i,n,s,r=t[0]("status.drafts")+"",l,o,a,c,u,f=t[0]("status.in_review")+"",d,p,h,_,b,k=t[0]("status.ready")+"",v,$;return{c(){e=I("div"),i=I("div"),n=I("header"),s=I("h3"),l=q(r),o=D(),a=I("div"),c=I("header"),u=I("h3"),d=q(f),p=D(),h=I("div"),_=I("header"),b=I("h3"),v=q(k),C(n,"class","svelte-h66xcq"),C(i,"class","column svelte-h66xcq"),C(c,"class","svelte-h66xcq"),C(a,"class","column svelte-h66xcq"),C(_,"class","svelte-h66xcq"),C(h,"class","column svelte-h66xcq"),C(e,"class","columns svelte-h66xcq"),C(e,"aria-label",$=t[0]("editorial_workflow"))},m(L,A){y(L,e,A),O(e,i),O(i,n),O(n,s),O(s,l),O(e,o),O(e,a),O(a,c),O(c,u),O(u,d),O(e,p),O(e,h),O(h,_),O(_,b),O(b,v)},p(L,A){A&1&&r!==(r=L[0]("status.drafts")+"")&&W(l,r),A&1&&f!==(f=L[0]("status.in_review")+"")&&W(d,f),A&1&&k!==(k=L[0]("status.ready")+"")&&W(v,k),A&1&&$!==($=L[0]("editorial_workflow"))&&C(e,"aria-label",$)},d(L){L&&w(e)}}}function Ox(t){let e,i;return e=new Oo({props:{class:"content",$$slots:{main:[Tx]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},p(n,[s]){const r={};s&3&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function Ax(t,e,i){let n;return U(t,pe,s=>i(0,n=s)),[n]}class Lx extends J{constructor(e){super(),X(this,e,Ax,Ox,Z,{},Ex)}}const{window:Nx}=s0;function Px(t){ve(t,"svelte-v9927r",".outer.svelte-v9927r{display:flex;flex-direction:column;position:fixed;inset:0;overflow:hidden}")}function Ix(t){let e,i,n,s,r,l,o,a,c,u,f;i=new GU({});var d=t[0][t[2]];function p(h,_){return{}}return d&&(s=Zt(d,p())),l=new u8({}),a=new OF({}),{c(){e=I("div"),T(i.$$.fragment),n=D(),s&&T(s.$$.fragment),r=D(),T(l.$$.fragment),o=D(),T(a.$$.fragment),C(e,"class","outer svelte-v9927r")},m(h,_){y(h,e,_),S(i,e,null),O(e,n),s&&S(s,e,null),y(h,r,_),S(l,h,_),y(h,o,_),S(a,h,_),c=!0,u||(f=je(Nx,"hashchange",t[3]),u=!0)},p(h,[_]){if(_&4&&d!==(d=h[0][h[2]])){if(s){H();const b=s;g(b.$$.fragment,1,0,()=>{E(b,1)}),V()}d?(s=Zt(d,p()),T(s.$$.fragment),m(s.$$.fragment,1),S(s,e,null)):s=null}},i(h){c||(m(i.$$.fragment,h),s&&m(s.$$.fragment,h),m(l.$$.fragment,h),m(a.$$.fragment,h),c=!0)},o(h){g(i.$$.fragment,h),s&&g(s.$$.fragment,h),g(l.$$.fragment,h),g(a.$$.fragment,h),c=!1},d(h){h&&(w(e),w(r),w(o)),E(i),s&&E(s),E(l,h),E(a,h),u=!1,f()}}}function Cx(t,e,i){let n;U(t,da,o=>i(2,n=o));const s={collections:yF,assets:s8,search:Sx,workflow:Lx,config:h8},r=()=>{const{path:o}=Eo(),[,a]=o.match(`^\\/(${Object.keys(s).join("|")})\\b`)??[];a?ne(da)!==a&&da.set(a):window.location.replace(`#/collections/${ne(Lt).name}`)};return on(()=>{r()}),[s,r,n,()=>{r()}]}class Dx extends J{constructor(e){super(),X(this,e,Cx,Ix,Z,{pages:0,selectPage:1},Px)}get pages(){return this.$$.ctx[0]}get selectPage(){return this.$$.ctx[1]}}function t0(t){let e,i,n,s;const r=[jx,Mx],l=[];function o(a,c){return a[1]&&a[2]?0:1}return e=o(t),i=l[e]=r[e](t),{c(){i.c(),n=K()},m(a,c){l[e].m(a,c),y(a,n,c),s=!0},p(a,c){let u=e;e=o(a),e!==u&&(H(),g(l[u],1,1,()=>{l[u]=null}),V(),i=l[e],i||(i=l[e]=r[e](a),i.c()),m(i,1),i.m(n.parentNode,n))},i(a){s||(m(i),s=!0)},o(a){g(i),s=!1},d(a){a&&w(n),l[e].d(a)}}}function Mx(t){let e,i;return e=new rN({}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function jx(t){let e,i;return e=new Dx({}),{c(){T(e.$$.fragment)},m(n,s){S(e,n,s),i=!0},i(n){i||(m(e.$$.fragment,n),i=!0)},o(n){g(e.$$.fragment,n),i=!1},d(n){E(e,n)}}}function Rx(t){let e,i,n=!t[0]&&t0(t);return{c(){n&&n.c(),e=K()},m(s,r){n&&n.m(s,r),y(s,e,r),i=!0},p(s,r){s[0]?n&&(H(),g(n,1,1,()=>{n=null}),V()):n?(n.p(s,r),r&1&&m(n,1)):(n=t0(s),n.c(),m(n,1),n.m(e.parentNode,e))},i(s){i||(m(n),i=!0)},o(s){g(n),i=!1},d(s){s&&w(e),n&&n.d(s)}}}function Fx(t){let e,i,n,s,r,l,o;return l=new ZE({props:{$$slots:{default:[Rx]},$$scope:{ctx:t}}}),{c(){e=I("base"),i=I("meta"),n=I("link"),s=K(),r=D(),T(l.$$.fragment),C(e,"target","_blank"),C(i,"name","referrer"),C(i,"content","same-origin"),C(n,"rel","icon"),C(n,"href","data:image/svg+xml;base64,"+btoa(df)),C(n,"type","image/svg+xml")},m(a,c){O(document.head,e),O(document.head,i),O(document.head,n),O(document.head,s),y(a,r,c),S(l,a,c),o=!0},p(a,[c]){const u={};c&23&&(u.$$scope={dirty:c,ctx:a}),l.$set(u)},i(a){o||(m(l.$$.fragment,a),o=!0)},o(a){g(l.$$.fragment,a),o=!1},d(a){a&&w(r),w(e),w(i),w(n),w(s),E(l,a)}}}function Ux(t,e,i){let n,s,r;return U(t,na,l=>i(0,n=l)),U(t,Pi,l=>i(1,s=l)),U(t,to,l=>i(2,r=l)),k8(),[n,s,r]}class xx extends J{constructor(e){super(),X(this,e,Ux,Fx,Z,{})}}new xx({target:document.getElementById("nc-root")??document.body});window.CMS=new Proxy({},{get:(t,e)=>{if(e in t)return t[e];if(["getBackend","getEditorComponents","getEventListeners","getLocale","getMediaLibrary","getPreviewStyles","getPreviewTemplate","getRemarkPlugins","getWidget","getWidgetValueSerializer","getWidgets","init","invokeEvent","moment","registerBackend","registerCustomFormat","registerEditorComponent","registerEventListener","registerLocale","registerMediaLibrary","registerPreviewStyle","registerPreviewTemplate","registerRemarkPlugin","registerWidget","registerWidgetValueSerializer","removeEventListener","resolveWidget"].includes(e))return console.error(`CMS.${e}() is not yet supported in Sveltia CMS. See https://github.com/sveltia/sveltia-cms#readme for compatibility information.`),()=>{}}})});export default zx();
|